Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/jsxc.nextcloud.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/build
diff options
context:
space:
mode:
authorsualko <klaus@jsxc.org>2015-07-21 13:56:56 +0300
committersualko <klaus@jsxc.org>2015-07-21 13:56:56 +0300
commitcedc088074161c40301b241304f8c779fc929ac9 (patch)
treef4232716d6484bc901c8e8068890a5e2fee73514 /build
parentb1b36fef2b860d22274d1752fa2df569a56bb47b (diff)
build v2.1.0-beta1
Diffstat (limited to 'build')
-rw-r--r--build/ajax/getUsers.php4
-rw-r--r--build/ajax/getsettings.php32
-rw-r--r--build/ajax/getturncredentials.php21
-rw-r--r--build/ajax/setsettings.php3
-rw-r--r--build/appinfo/app.php5
-rw-r--r--build/appinfo/info.xml2
-rw-r--r--build/appinfo/version2
-rw-r--r--build/css/jquery.mCustomScrollbar.css12
-rw-r--r--build/css/jsxc.oc.css2040
-rw-r--r--build/js/admin.js4
-rw-r--r--build/js/eof.js4
-rw-r--r--build/js/jsxc/css/jsxc.css2151
-rw-r--r--build/js/jsxc/css/jsxc.webrtc.css3
-rw-r--r--build/js/jsxc/img/bookmark_red.svg74
-rw-r--r--build/js/jsxc/jsxc.js6919
-rw-r--r--build/js/jsxc/jsxc.min.js14
-rw-r--r--build/js/jsxc/jsxc.min.js.map2
-rw-r--r--build/js/jsxc/lib/favico.js/favico.js843
-rw-r--r--build/js/jsxc/lib/jsxc.dep.js20927
-rw-r--r--build/js/jsxc/lib/jsxc.dep.min.js81
-rw-r--r--build/js/jsxc/lib/jsxc.dep.min.js.map2
-rw-r--r--build/js/jsxc/lib/magnific-popup/dist/jquery.magnific-popup.js2060
-rw-r--r--build/js/jsxc/lib/magnific-popup/dist/jquery.magnific-popup.min.js4
-rw-r--r--build/js/jsxc/lib/otr/build/otr.js14
-rw-r--r--build/js/jsxc/lib/otr/build/otr.min.js4
-rw-r--r--build/js/jsxc/lib/otr/lib/dsa-webworker.js23
-rw-r--r--build/js/jsxc/lib/otr/lib/sm-webworker.js18
-rw-r--r--build/js/jsxc/lib/strophe.bookmarks/index.js116
-rw-r--r--build/js/jsxc/lib/strophe.jingle/strophe.jingle.adapter.js368
-rw-r--r--build/js/jsxc/lib/strophe.jingle/strophe.jingle.js254
-rw-r--r--build/js/jsxc/lib/strophe.jingle/strophe.jingle.sdp.js785
-rw-r--r--build/js/jsxc/lib/strophe.jingle/strophe.jingle.session.js915
-rw-r--r--build/js/jsxc/lib/strophe.jinglejs/strophe.jinglejs-bundle.js17543
-rw-r--r--build/js/jsxc/lib/strophe.muc.js4
-rw-r--r--build/js/jsxc/lib/strophe.x/index.js845
-rw-r--r--build/js/jsxc/lib/translation.js2
-rw-r--r--build/js/ojsxc.js29
-rw-r--r--build/settings.php1
-rw-r--r--build/templates/settings.php9
39 files changed, 48832 insertions, 7307 deletions
diff --git a/build/ajax/getUsers.php b/build/ajax/getUsers.php
index f1f1a79..8d44d43 100644
--- a/build/ajax/getUsers.php
+++ b/build/ajax/getUsers.php
@@ -3,9 +3,9 @@ OCP\User::checkLoggedIn ();
OCP\JSON::callCheck ();
$limit = 10;
-$offset = 0;$users = OC_User::getDisplayNames((string)$_GET['search'], $limit, $offset);
+$offset = 0;
-$users = OC_User::getDisplayNames((string)$_GET['search'], $limit, $offset);
+$users = OCP\User::getDisplayNames((string)$_GET['search'], $limit, $offset);
OCP\JSON::encodedPrint ( $users );
?>
diff --git a/build/ajax/getsettings.php b/build/ajax/getsettings.php
index 19e603f..34b08eb 100644
--- a/build/ajax/getsettings.php
+++ b/build/ajax/getsettings.php
@@ -1,4 +1,8 @@
<?php
+function validateBoolean($val) {
+ return $val === true || $val === 'true';
+}
+
OCP\JSON::callCheck ();
$username = $_POST ['username'];
@@ -6,7 +10,7 @@ $password = $_POST ['password'];
$ocUser = new OCP\User ();
-$auth = ($password != null) ? $ocUser->checkPassword ( $username, $password ) : OCP\User::isLoggedIn ();
+$auth = ($password !== null) ? $ocUser->checkPassword ( $username, $password ) : OCP\User::isLoggedIn ();
if (!$auth) {
OCP\JSON::encodedPrint ( array (
@@ -20,30 +24,28 @@ $data ['xmpp'] = array ();
$data ['xmpp'] ['url'] = OCP\Config::getAppValue ( 'ojsxc', 'boshUrl' );
$data ['xmpp'] ['domain'] = OCP\Config::getAppValue ( 'ojsxc', 'xmppDomain' );
$data ['xmpp'] ['resource'] = OCP\Config::getAppValue ( 'ojsxc', 'xmppResource' );
-$data ['xmpp'] ['overwrite'] = OCP\Config::getAppValue ( 'ojsxc', 'xmppOverwrite' );
-$data ['xmpp'] ['onlogin'] = 'true';
+$data ['xmpp'] ['overwrite'] = validateBoolean(OCP\Config::getAppValue ( 'ojsxc', 'xmppOverwrite' ));
+$data ['xmpp'] ['onlogin'] = true;
-if ($data ['xmpp'] ['overwrite'] == null) {
- $data ['xmpp'] ['overwrite'] = false;
-}
-
-if ($data ['xmpp'] ['overwrite']) {
- $options = OCP\Config::getUserValue ( $username, 'ojsxc', 'options' );
+$options = OCP\Config::getUserValue ( $username, 'ojsxc', 'options' );
- if ($options !== null) {
- $options = json_decode ( $options, true );
+if ($options !== null) {
+ $options = json_decode ( $options, true );
- foreach ( $options as $prop => $value ) {
+ foreach ( $options as $prop => $value ) {
+ if ($prop !== 'xmpp' || $data ['xmpp'] ['overwrite']) {
foreach ( $value as $key => $v ) {
- if ($v != "")
- $data [$prop] [$key] = $v;
+ if ($v !== "")
+ $data [$prop] [$key] = ($v === 'false' || $v === 'true') ? validateBoolean($v) : $v;
}
}
}
}
+$data ['loginForm'] ['startMinimized'] = validateBoolean(OCP\Config::getAppValue ( 'ojsxc', 'xmppStartMinimized' ));
+
OCP\JSON::encodedPrint ( array (
'result' => 'success',
'data' => $data
) );
-?> \ No newline at end of file
+?>
diff --git a/build/ajax/getturncredentials.php b/build/ajax/getturncredentials.php
index 0f9b67e..0da71ca 100644
--- a/build/ajax/getturncredentials.php
+++ b/build/ajax/getturncredentials.php
@@ -5,11 +5,22 @@ OCP\JSON::callCheck ();
$secret = OCP\Config::getAppValue ( 'ojsxc', 'iceSecret' );
$user = OCP\User::getUser ();
-$data = array ();
-$data ['ttl'] = OCP\Config::getAppValue ( 'ojsxc', 'iceTtl' ) ? : 3600 * 24; // one day (according to TURN-REST-API)
-$data ['url'] = OCP\Config::getAppValue ( 'ojsxc', 'iceUrl' );
-$data ['username'] = OCP\Config::getAppValue ( 'ojsxc', 'iceUsername' ) ? : ($secret ? (time () + $data ['ttl']) . ':' . $user : $user);
-$data ['credential'] = OCP\Config::getAppValue ( 'ojsxc', 'iceCredential' ) ? : ($secret ? base64_encode ( hash_hmac ( 'sha1', $data ['username'], $secret, true ) ) : '');
+$ttl = OCP\Config::getAppValue ( 'ojsxc', 'iceTtl' ) ? : 3600 * 24; // one day (according to TURN-REST-API)
+$url = OCP\Config::getAppValue ( 'ojsxc', 'iceUrl' );
+$url = $url ? "turn:$url" : $url;
+$username = OCP\Config::getAppValue ( 'ojsxc', 'iceUsername' ) ? : ($secret ? (time () + $data ['ttl']) . ':' . $user : $user);
+$credential = OCP\Config::getAppValue ( 'ojsxc', 'iceCredential' ) ? : ($secret ? base64_encode ( hash_hmac ( 'sha1', $data ['username'], $secret, true ) ) : '');
+
+$data = array (
+ 'ttl' => $ttl,
+ 'iceServers' => array(
+ array(
+ 'urls' => array($url),
+ 'credential' => $credential,
+ 'username' => $username
+ )
+ )
+);
OCP\JSON::encodedPrint ( $data );
?>
diff --git a/build/ajax/setsettings.php b/build/ajax/setsettings.php
index 69d5a00..62edc2e 100644
--- a/build/ajax/setsettings.php
+++ b/build/ajax/setsettings.php
@@ -12,6 +12,7 @@ OCP\Config::setAppValue ( 'ojsxc', 'boshUrl', $_POST ['boshUrl'] );
OCP\Config::setAppValue ( 'ojsxc', 'xmppDomain', $_POST ['xmppDomain'] );
OCP\Config::setAppValue ( 'ojsxc', 'xmppResource', $_POST ['xmppResource'] );
OCP\Config::setAppValue ( 'ojsxc', 'xmppOverwrite', (isset($_POST ['xmppOverwrite']))? $_POST ['xmppOverwrite'] : 'false' );
+OCP\Config::setAppValue ( 'ojsxc', 'xmppStartMinimized', (isset($_POST ['xmppStartMinimized']))? $_POST ['xmppStartMinimized'] : 'false' );
OCP\Config::setAppValue ( 'ojsxc', 'iceUrl', $_POST ['iceUrl'] );
OCP\Config::setAppValue ( 'ojsxc', 'iceUsername', $_POST ['iceUsername'] );
@@ -19,4 +20,4 @@ OCP\Config::setAppValue ( 'ojsxc', 'iceCredential', $_POST ['iceCredential'] );
OCP\Config::setAppValue ( 'ojsxc', 'iceSecret', $_POST ['iceSecret'] );
OCP\Config::setAppValue ( 'ojsxc', 'iceTtl', $_POST ['iceTtl'] );
-echo 'true'; \ No newline at end of file
+echo 'true';
diff --git a/build/appinfo/app.php b/build/appinfo/app.php
index 5c6d7ed..c954135 100644
--- a/build/appinfo/app.php
+++ b/build/appinfo/app.php
@@ -3,10 +3,10 @@
/**
* ownCloud - JavaScript XMPP Chat
*
- * Copyright (c) 2014 Klaus Herberth <klaus@jsxc.org> <br>
+ * Copyright (c) 2014-2015 Klaus Herberth <klaus@jsxc.org> <br>
* Released under the MIT license
*
- * @author Klaus Herberth
+ * @author Klaus Herberth <klaus@jsxc.org>
*/
OCP\App::registerAdmin ( 'ojsxc', 'settings' );
@@ -24,7 +24,6 @@ OCP\Util::addScript ( 'ojsxc', 'ojsxc' );
OCP\Util::addStyle ( 'ojsxc', 'jquery.mCustomScrollbar' );
OCP\Util::addStyle ( 'ojsxc', 'jquery.colorbox' );
OCP\Util::addStyle ( 'ojsxc', 'jsxc.oc' );
-//OCP\Util::addStyle ( 'ojsxc', 'muc' );
$version = OCP\Util::getVersion();
diff --git a/build/appinfo/info.xml b/build/appinfo/info.xml
index 58a1b3e..e194104 100644
--- a/build/appinfo/info.xml
+++ b/build/appinfo/info.xml
@@ -3,7 +3,7 @@
<id>ojsxc</id>
<name>JavaScript XMPP Chat</name>
<description>XMPP Chat with OTR</description>
- <version>2.0.1</version>
+ <version>2.1.0-beta1</version>
<licence>MIT</licence>
<author>Klaus Herberth</author>
<require>5</require>
diff --git a/build/appinfo/version b/build/appinfo/version
index 10bf840..46babd4 100644
--- a/build/appinfo/version
+++ b/build/appinfo/version
@@ -1 +1 @@
-2.0.1 \ No newline at end of file
+2.1.0-beta1
diff --git a/build/css/jquery.mCustomScrollbar.css b/build/css/jquery.mCustomScrollbar.css
index 67d7ab8..5500776 100644
--- a/build/css/jquery.mCustomScrollbar.css
+++ b/build/css/jquery.mCustomScrollbar.css
@@ -24,8 +24,6 @@
.mCSB_scrollTools .mCSB_draggerContainer {
height: 100%;
- -webkit-box-sizing: border-box;
- -moz-box-sizing: border-box;
box-sizing: border-box;
}
@@ -37,8 +35,6 @@
width: 2px;
height: 100%;
margin: 0 auto;
- -webkit-border-radius: 10px;
- -moz-border-radius: 10px;
border-radius: 10px;
}
@@ -52,8 +48,6 @@
width: 4px;
height: 100%;
margin: 0 auto;
- -webkit-border-radius: 10px;
- -moz-border-radius: 10px;
border-radius: 10px;
text-align: center;
}
@@ -100,8 +94,6 @@
.mCSB_horizontal .mCSB_scrollTools .mCSB_draggerContainer {
height: 100%;
width: auto;
- -webkit-box-sizing: border-box;
- -moz-box-sizing: border-box;
box-sizing: border-box;
overflow: hidden;
}
@@ -116,8 +108,6 @@
width: 100%;
height: 2px;
margin: 7px 0;
- -webkit-border-radius: 10px;
- -moz-border-radius: 10px;
border-radius: 10px;
}
@@ -130,8 +120,6 @@
width: 100%;
height: 4px;
margin: 6px auto;
- -webkit-border-radius: 10px;
- -moz-border-radius: 10px;
border-radius: 10px;
}
diff --git a/build/css/jsxc.oc.css b/build/css/jsxc.oc.css
index 5ed6d31..b75330a 100644
--- a/build/css/jsxc.oc.css
+++ b/build/css/jsxc.oc.css
@@ -1,5 +1,5 @@
/*!
- * ojsxc v2.0.1 - 2015-05-23
+ * ojsxc v2.1.0-beta1 - 2015-07-21
*
* Copyright (c) 2015 Klaus Herberth <klaus@jsxc.org> <br>
* Released under the MIT license
@@ -7,11 +7,1849 @@
* Please see http://www.jsxc.org/
*
* @author Klaus Herberth <klaus@jsxc.org>
- * @version 2.0.1
+ * @version 2.1.0-beta1
* @license MIT
*/
@charset "UTF-8";
+/* basic scrollbar styling */
+/* vertical scrollbar */
+.mCSB_container {
+ width: auto;
+ margin-right: 30px;
+ overflow: hidden; }
+
+.mCSB_container.mCS_no_scrollbar {
+ margin-right: 0; }
+
+.mCS_disabled .mCSB_container.mCS_no_scrollbar, .mCS_destroyed .mCSB_container.mCS_no_scrollbar {
+ margin-right: 30px; }
+
+.mCustomScrollBox .mCSB_scrollTools {
+ width: 16px;
+ height: 100%;
+ top: 0;
+ right: 0; }
+
+.mCSB_scrollTools .mCSB_draggerContainer {
+ height: 100%;
+ box-sizing: border-box; }
+
+.mCSB_scrollTools .mCSB_buttonUp + .mCSB_draggerContainer {
+ padding-bottom: 40px; }
+
+.mCSB_scrollTools .mCSB_draggerRail {
+ width: 2px;
+ height: 100%;
+ margin: 0 auto;
+ border-radius: 10px; }
+
+.mCSB_scrollTools .mCSB_dragger {
+ cursor: pointer;
+ width: 100%;
+ height: 30px; }
+
+.mCSB_scrollTools .mCSB_dragger .mCSB_dragger_bar {
+ width: 4px;
+ height: 100%;
+ margin: 0 auto;
+ border-radius: 10px;
+ text-align: center; }
+
+.mCSB_scrollTools .mCSB_buttonUp, .mCSB_scrollTools .mCSB_buttonDown {
+ height: 20px;
+ overflow: hidden;
+ margin: 0 auto;
+ cursor: pointer; }
+
+.mCSB_scrollTools .mCSB_buttonDown {
+ bottom: 0;
+ margin-top: -40px; }
+
+/* horizontal scrollbar */
+.mCSB_horizontal .mCSB_container {
+ height: auto;
+ margin-right: 0;
+ margin-bottom: 30px;
+ overflow: hidden; }
+
+.mCSB_horizontal .mCSB_container.mCS_no_scrollbar {
+ margin-bottom: 0; }
+
+.mCS_disabled .mCSB_horizontal .mCSB_container.mCS_no_scrollbar, .mCS_destroyed .mCSB_horizontal .mCSB_container.mCS_no_scrollbar {
+ margin-right: 0;
+ margin-bottom: 30px; }
+
+.mCSB_horizontal.mCustomScrollBox .mCSB_scrollTools {
+ width: 100%;
+ height: 16px;
+ top: auto;
+ right: auto;
+ bottom: 0;
+ left: 0;
+ overflow: hidden; }
+
+.mCSB_horizontal .mCSB_scrollTools .mCSB_draggerContainer {
+ height: 100%;
+ width: auto;
+ box-sizing: border-box;
+ overflow: hidden; }
+
+.mCSB_horizontal .mCSB_scrollTools .mCSB_buttonLeft + .mCSB_draggerContainer {
+ padding-bottom: 0;
+ padding-right: 20px; }
+
+.mCSB_horizontal .mCSB_scrollTools .mCSB_draggerRail {
+ width: 100%;
+ height: 2px;
+ margin: 7px 0;
+ border-radius: 10px; }
+
+.mCSB_horizontal .mCSB_scrollTools .mCSB_dragger {
+ width: 30px;
+ height: 100%; }
+
+.mCSB_horizontal .mCSB_scrollTools .mCSB_dragger .mCSB_dragger_bar {
+ width: 100%;
+ height: 4px;
+ margin: 6px auto;
+ border-radius: 10px; }
+
+.mCSB_horizontal .mCSB_scrollTools .mCSB_buttonLeft, .mCSB_horizontal .mCSB_scrollTools .mCSB_buttonRight {
+ width: 20px;
+ height: 100%;
+ overflow: hidden;
+ margin: 0 auto;
+ cursor: pointer;
+ float: left; }
+
+.mCSB_horizontal .mCSB_scrollTools .mCSB_buttonRight {
+ right: 0;
+ bottom: auto;
+ margin-left: -40px;
+ margin-top: -16px;
+ float: right; }
+
+/* default scrollbar colors and backgrounds */
+.mCustomScrollBox .mCSB_scrollTools {
+ opacity: 0.75; }
+
+.mCustomScrollBox:hover .mCSB_scrollTools {
+ opacity: 1; }
+
+.mCSB_scrollTools .mCSB_draggerRail {
+ background: #000;
+ /* rgba fallback */
+ background: rgba(0, 0, 0, 0.4);
+ filter: "alpha(opacity=40)";
+ -ms-filter: "alpha(opacity=40)";
+ /* old ie */ }
+
+.mCSB_scrollTools .mCSB_dragger .mCSB_dragger_bar {
+ background: #fff;
+ /* rgba fallback */
+ background: rgba(255, 255, 255, 0.75);
+ filter: "alpha(opacity=75)";
+ -ms-filter: "alpha(opacity=75)";
+ /* old ie */ }
+
+.mCSB_scrollTools .mCSB_dragger:hover .mCSB_dragger_bar {
+ background: rgba(255, 255, 255, 0.85);
+ filter: "alpha(opacity=85)";
+ -ms-filter: "alpha(opacity=85)";
+ /* old ie */ }
+
+.mCSB_scrollTools .mCSB_dragger:active .mCSB_dragger_bar, .mCSB_scrollTools .mCSB_dragger.mCSB_dragger_onDrag .mCSB_dragger_bar {
+ background: rgba(255, 255, 255, 0.9);
+ filter: "alpha(opacity=90)";
+ -ms-filter: "alpha(opacity=90)";
+ /* old ie */ }
+
+.mCSB_scrollTools .mCSB_buttonUp, .mCSB_scrollTools .mCSB_buttonDown, .mCSB_scrollTools .mCSB_buttonLeft, .mCSB_scrollTools .mCSB_buttonRight {
+ background-image: url(mCSB_buttons.png);
+ background-repeat: no-repeat;
+ opacity: 0.4;
+ filter: "alpha(opacity=40)";
+ -ms-filter: "alpha(opacity=40)";
+ /* old ie */ }
+
+.mCSB_scrollTools .mCSB_buttonUp {
+ background-position: 0 0;
+ /*
+ sprites locations are 0 0/-16px 0/-32px 0/-48px 0 (light) and -80px 0/-96px 0/-112px 0/-128px 0 (dark)
+ */ }
+
+.mCSB_scrollTools .mCSB_buttonDown {
+ background-position: 0 -20px;
+ /*
+ sprites locations are 0 -20px/-16px -20px/-32px -20px/-48px -20px (light) and -80px -20px/-96px -20px/-112px -20px/-128px -20px (dark)
+ */ }
+
+.mCSB_scrollTools .mCSB_buttonLeft {
+ background-position: 0 -40px;
+ /*
+ sprites locations are 0 -40px/-20px -40px/-40px -40px/-60px -40px (light) and -80px -40px/-100px -40px/-120px -40px/-140px -40px (dark)
+ */ }
+
+.mCSB_scrollTools .mCSB_buttonRight {
+ background-position: 0 -56px;
+ /*
+ sprites locations are 0 -56px/-20px -56px/-40px -56px/-60px -56px (light) and -80px -56px/-100px -56px/-120px -56px/-140px -56px (dark)
+ */ }
+
+.mCSB_scrollTools .mCSB_buttonUp:hover, .mCSB_scrollTools .mCSB_buttonDown:hover, .mCSB_scrollTools .mCSB_buttonLeft:hover, .mCSB_scrollTools .mCSB_buttonRight:hover {
+ opacity: 0.75;
+ filter: "alpha(opacity=75)";
+ -ms-filter: "alpha(opacity=75)";
+ /* old ie */ }
+
+.mCSB_scrollTools .mCSB_buttonUp:active, .mCSB_scrollTools .mCSB_buttonDown:active, .mCSB_scrollTools .mCSB_buttonLeft:active, .mCSB_scrollTools .mCSB_buttonRight:active {
+ opacity: 0.9;
+ filter: "alpha(opacity=90)";
+ -ms-filter: "alpha(opacity=90)";
+ /* old ie */ }
+
+/* Magnific Popup CSS */
+.mfp-bg {
+ top: 0;
+ left: 0;
+ width: 100%;
+ height: 100%;
+ z-index: 1042;
+ overflow: hidden;
+ position: fixed;
+ background: #0b0b0b;
+ opacity: 0.8;
+ filter: alpha(opacity=80); }
+
+.mfp-wrap {
+ top: 0;
+ left: 0;
+ width: 100%;
+ height: 100%;
+ z-index: 1043;
+ position: fixed;
+ outline: none !important;
+ -webkit-backface-visibility: hidden; }
+
+.mfp-container {
+ text-align: center;
+ position: absolute;
+ width: 100%;
+ height: 100%;
+ left: 0;
+ top: 0;
+ padding: 0 8px;
+ box-sizing: border-box; }
+
+.mfp-container:before {
+ content: '';
+ display: inline-block;
+ height: 100%;
+ vertical-align: middle; }
+
+.mfp-align-top .mfp-container:before {
+ display: none; }
+
+.mfp-content {
+ position: relative;
+ display: inline-block;
+ vertical-align: middle;
+ margin: 0 auto;
+ text-align: left;
+ z-index: 1045; }
+
+.mfp-inline-holder .mfp-content, .mfp-ajax-holder .mfp-content {
+ width: 100%;
+ cursor: auto; }
+
+.mfp-ajax-cur {
+ cursor: progress; }
+
+.mfp-zoom-out-cur, .mfp-zoom-out-cur .mfp-image-holder .mfp-close {
+ cursor: -webkit-zoom-out;
+ cursor: zoom-out; }
+
+.mfp-zoom {
+ cursor: pointer;
+ cursor: -webkit-zoom-in;
+ cursor: zoom-in; }
+
+.mfp-auto-cursor .mfp-content {
+ cursor: auto; }
+
+.mfp-close, .mfp-arrow, .mfp-preloader, .mfp-counter {
+ -webkit-user-select: none;
+ -moz-user-select: none;
+ -ms-user-select: none;
+ user-select: none; }
+
+.mfp-loading.mfp-figure {
+ display: none; }
+
+.mfp-hide {
+ display: none !important; }
+
+.mfp-preloader {
+ color: #CCC;
+ position: absolute;
+ top: 50%;
+ width: auto;
+ text-align: center;
+ margin-top: -0.8em;
+ left: 8px;
+ right: 8px;
+ z-index: 1044; }
+ .mfp-preloader a {
+ color: #CCC; }
+ .mfp-preloader a:hover {
+ color: #FFF; }
+
+.mfp-s-ready .mfp-preloader {
+ display: none; }
+
+.mfp-s-error .mfp-content {
+ display: none; }
+
+button.mfp-close, button.mfp-arrow {
+ overflow: visible;
+ cursor: pointer;
+ background: transparent;
+ border: 0;
+ -webkit-appearance: none;
+ display: block;
+ outline: none;
+ padding: 0;
+ z-index: 1046;
+ box-shadow: none; }
+button::-moz-focus-inner {
+ padding: 0;
+ border: 0; }
+
+.mfp-close {
+ width: 44px;
+ height: 44px;
+ line-height: 44px;
+ position: absolute;
+ right: 0;
+ top: 0;
+ text-decoration: none;
+ text-align: center;
+ opacity: 0.65;
+ filter: alpha(opacity=65);
+ padding: 0 0 18px 10px;
+ color: #FFF;
+ font-style: normal;
+ font-size: 28px;
+ font-family: Arial, Baskerville, monospace; }
+ .mfp-close:hover, .mfp-close:focus {
+ opacity: 1;
+ filter: alpha(opacity=100); }
+ .mfp-close:active {
+ top: 1px; }
+
+.mfp-close-btn-in .mfp-close {
+ color: #333; }
+
+.mfp-image-holder .mfp-close, .mfp-iframe-holder .mfp-close {
+ color: #FFF;
+ right: -6px;
+ text-align: right;
+ padding-right: 6px;
+ width: 100%; }
+
+.mfp-counter {
+ position: absolute;
+ top: 0;
+ right: 0;
+ color: #CCC;
+ font-size: 12px;
+ line-height: 18px;
+ white-space: nowrap; }
+
+.mfp-arrow {
+ position: absolute;
+ opacity: 0.65;
+ filter: alpha(opacity=65);
+ margin: 0;
+ top: 50%;
+ margin-top: -55px;
+ padding: 0;
+ width: 90px;
+ height: 110px;
+ -webkit-tap-highlight-color: transparent; }
+ .mfp-arrow:active {
+ margin-top: -54px; }
+ .mfp-arrow:hover, .mfp-arrow:focus {
+ opacity: 1;
+ filter: alpha(opacity=100); }
+ .mfp-arrow:before, .mfp-arrow:after, .mfp-arrow .mfp-b, .mfp-arrow .mfp-a {
+ content: '';
+ display: block;
+ width: 0;
+ height: 0;
+ position: absolute;
+ left: 0;
+ top: 0;
+ margin-top: 35px;
+ margin-left: 35px;
+ border: medium inset transparent; }
+ .mfp-arrow:after, .mfp-arrow .mfp-a {
+ border-top-width: 13px;
+ border-bottom-width: 13px;
+ top: 8px; }
+ .mfp-arrow:before, .mfp-arrow .mfp-b {
+ border-top-width: 21px;
+ border-bottom-width: 21px;
+ opacity: 0.7; }
+
+.mfp-arrow-left {
+ left: 0; }
+ .mfp-arrow-left:after, .mfp-arrow-left .mfp-a {
+ border-right: 17px solid #FFF;
+ margin-left: 31px; }
+ .mfp-arrow-left:before, .mfp-arrow-left .mfp-b {
+ margin-left: 25px;
+ border-right: 27px solid #3F3F3F; }
+
+.mfp-arrow-right {
+ right: 0; }
+ .mfp-arrow-right:after, .mfp-arrow-right .mfp-a {
+ border-left: 17px solid #FFF;
+ margin-left: 39px; }
+ .mfp-arrow-right:before, .mfp-arrow-right .mfp-b {
+ border-left: 27px solid #3F3F3F; }
+
+.mfp-iframe-holder {
+ padding-top: 40px;
+ padding-bottom: 40px; }
+ .mfp-iframe-holder .mfp-content {
+ line-height: 0;
+ width: 100%;
+ max-width: 900px; }
+ .mfp-iframe-holder .mfp-close {
+ top: -40px; }
+
+.mfp-iframe-scaler {
+ width: 100%;
+ height: 0;
+ overflow: hidden;
+ padding-top: 56.25%; }
+ .mfp-iframe-scaler iframe {
+ position: absolute;
+ display: block;
+ top: 0;
+ left: 0;
+ width: 100%;
+ height: 100%;
+ box-shadow: 0 0 8px rgba(0, 0, 0, 0.6);
+ background: #000; }
+
+/* Main image in popup */
+img.mfp-img {
+ width: auto;
+ max-width: 100%;
+ height: auto;
+ display: block;
+ line-height: 0;
+ box-sizing: border-box;
+ padding: 40px 0 40px;
+ margin: 0 auto; }
+
+/* The shadow behind the image */
+.mfp-figure {
+ line-height: 0; }
+ .mfp-figure:after {
+ content: '';
+ position: absolute;
+ left: 0;
+ top: 40px;
+ bottom: 40px;
+ display: block;
+ right: 0;
+ width: auto;
+ height: auto;
+ z-index: -1;
+ box-shadow: 0 0 8px rgba(0, 0, 0, 0.6);
+ background: #444; }
+ .mfp-figure small {
+ color: #BDBDBD;
+ display: block;
+ font-size: 12px;
+ line-height: 14px; }
+ .mfp-figure figure {
+ margin: 0; }
+
+.mfp-bottom-bar {
+ margin-top: -36px;
+ position: absolute;
+ top: 100%;
+ left: 0;
+ width: 100%;
+ cursor: auto; }
+
+.mfp-title {
+ text-align: left;
+ line-height: 18px;
+ color: #F3F3F3;
+ word-wrap: break-word;
+ padding-right: 36px; }
+
+.mfp-image-holder .mfp-content {
+ max-width: 100%; }
+
+.mfp-gallery .mfp-image-holder .mfp-figure {
+ cursor: pointer; }
+
+@media screen and (max-width: 800px) and (orientation: landscape), screen and (max-height: 300px) {
+ /**
+ * Remove all paddings around the image on small screen
+ */
+ .mfp-img-mobile .mfp-image-holder {
+ padding-left: 0;
+ padding-right: 0; }
+ .mfp-img-mobile img.mfp-img {
+ padding: 0; }
+ .mfp-img-mobile .mfp-figure:after {
+ top: 0;
+ bottom: 0; }
+ .mfp-img-mobile .mfp-figure small {
+ display: inline;
+ margin-left: 5px; }
+ .mfp-img-mobile .mfp-bottom-bar {
+ background: rgba(0, 0, 0, 0.6);
+ bottom: 0;
+ margin: 0;
+ top: auto;
+ padding: 3px 5px;
+ position: fixed;
+ box-sizing: border-box; }
+ .mfp-img-mobile .mfp-bottom-bar:empty {
+ padding: 0; }
+ .mfp-img-mobile .mfp-counter {
+ right: 5px;
+ top: 3px; }
+ .mfp-img-mobile .mfp-close {
+ top: 0;
+ right: 0;
+ width: 35px;
+ height: 35px;
+ line-height: 35px;
+ background: rgba(0, 0, 0, 0.6);
+ position: fixed;
+ text-align: center;
+ padding: 0; } }
+
+@media all and (max-width: 900px) {
+ .mfp-arrow {
+ -webkit-transform: scale(0.75);
+ -ms-transform: scale(0.75);
+ transform: scale(0.75); }
+ .mfp-arrow-left {
+ -webkit-transform-origin: 0;
+ -ms-transform-origin: 0;
+ transform-origin: 0; }
+ .mfp-arrow-right {
+ -webkit-transform-origin: 100%;
+ -ms-transform-origin: 100%;
+ transform-origin: 100%; }
+ .mfp-container {
+ padding-left: 6px;
+ padding-right: 6px; } }
+
+.mfp-ie7 .mfp-img {
+ padding: 0; }
+.mfp-ie7 .mfp-bottom-bar {
+ width: 600px;
+ left: 50%;
+ margin-left: -300px;
+ margin-top: 5px;
+ padding-bottom: 5px; }
+.mfp-ie7 .mfp-container {
+ padding: 0; }
+.mfp-ie7 .mfp-content {
+ padding-top: 44px; }
+.mfp-ie7 .mfp-close {
+ top: 0;
+ right: 0;
+ padding-top: 0; }
+
+/* BEGIN: bootstrap */
+@-webkit-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; } }
+
+#jsxc_dialog {
+ @-webkit-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; } }
+ }
+ #jsxc_dialog .clearfix:before, #jsxc_dialog .clearfix:after {
+ content: " ";
+ display: table; }
+ #jsxc_dialog .clearfix:after {
+ clear: both; }
+ #jsxc_dialog .center-block {
+ display: block;
+ margin-left: auto;
+ margin-right: auto; }
+ #jsxc_dialog .pull-right {
+ float: right !important; }
+ #jsxc_dialog .pull-left {
+ float: left !important; }
+ #jsxc_dialog .hide {
+ display: none !important; }
+ #jsxc_dialog .show {
+ display: block !important; }
+ #jsxc_dialog .invisible {
+ visibility: hidden; }
+ #jsxc_dialog .text-hide {
+ font: 0/0 a;
+ color: transparent;
+ text-shadow: none;
+ background-color: transparent;
+ border: 0; }
+ #jsxc_dialog .hidden {
+ display: none !important; }
+ #jsxc_dialog .affix {
+ position: fixed; }
+ #jsxc_dialog code, #jsxc_dialog kbd, #jsxc_dialog pre, #jsxc_dialog samp {
+ font-family: Menlo, Monaco, Consolas, "Courier New", monospace; }
+ #jsxc_dialog code {
+ padding: 2px 4px;
+ font-size: 90%;
+ color: #c7254e;
+ background-color: #f9f2f4;
+ border-radius: 4px; }
+ #jsxc_dialog kbd {
+ padding: 2px 4px;
+ font-size: 90%;
+ color: #fff;
+ background-color: #333;
+ border-radius: 3px;
+ box-shadow: inset 0 -1px 0 rgba(0, 0, 0, 0.25); }
+ #jsxc_dialog kbd kbd {
+ padding: 0;
+ font-size: 100%;
+ font-weight: bold;
+ box-shadow: none; }
+ #jsxc_dialog pre {
+ display: block;
+ padding: 9.5px;
+ margin: 0 0 10px;
+ font-size: 13px;
+ line-height: 1.428571429;
+ word-break: break-all;
+ word-wrap: break-word;
+ color: #333333;
+ background-color: #f5f5f5;
+ border: 1px solid #ccc;
+ border-radius: 4px; }
+ #jsxc_dialog pre code {
+ padding: 0;
+ font-size: inherit;
+ color: inherit;
+ white-space: pre-wrap;
+ background-color: transparent;
+ border-radius: 0; }
+ #jsxc_dialog .pre-scrollable {
+ max-height: 340px;
+ overflow-y: scroll; }
+ #jsxc_dialog .container {
+ margin-right: auto;
+ margin-left: auto;
+ padding-left: 15px;
+ padding-right: 15px; }
+ #jsxc_dialog .container:before, #jsxc_dialog .container:after {
+ content: " ";
+ display: table; }
+ #jsxc_dialog .container:after {
+ clear: both; }
+ @media (min-width: 768px) {
+ #jsxc_dialog .container {
+ width: 750px; } }
+ @media (min-width: 992px) {
+ #jsxc_dialog .container {
+ width: 970px; } }
+ @media (min-width: 1200px) {
+ #jsxc_dialog .container {
+ width: 1170px; } }
+ #jsxc_dialog .container-fluid {
+ margin-right: auto;
+ margin-left: auto;
+ padding-left: 15px;
+ padding-right: 15px; }
+ #jsxc_dialog .container-fluid:before, #jsxc_dialog .container-fluid:after {
+ content: " ";
+ display: table; }
+ #jsxc_dialog .container-fluid:after {
+ clear: both; }
+ #jsxc_dialog .row {
+ margin-left: -15px;
+ margin-right: -15px; }
+ #jsxc_dialog .row:before, #jsxc_dialog .row:after {
+ content: " ";
+ display: table; }
+ #jsxc_dialog .row:after {
+ clear: both; }
+ #jsxc_dialog .col-xs-1, #jsxc_dialog .col-sm-1, #jsxc_dialog .col-md-1, #jsxc_dialog .col-lg-1, #jsxc_dialog .col-xs-2, #jsxc_dialog .col-sm-2, #jsxc_dialog .col-md-2, #jsxc_dialog .col-lg-2, #jsxc_dialog .col-xs-3, #jsxc_dialog .col-sm-3, #jsxc_dialog .col-md-3, #jsxc_dialog .col-lg-3, #jsxc_dialog .col-xs-4, #jsxc_dialog .col-sm-4, #jsxc_dialog .col-md-4, #jsxc_dialog .col-lg-4, #jsxc_dialog .col-xs-5, #jsxc_dialog .col-sm-5, #jsxc_dialog .col-md-5, #jsxc_dialog .col-lg-5, #jsxc_dialog .col-xs-6, #jsxc_dialog .col-sm-6, #jsxc_dialog .col-md-6, #jsxc_dialog .col-lg-6, #jsxc_dialog .col-xs-7, #jsxc_dialog .col-sm-7, #jsxc_dialog .col-md-7, #jsxc_dialog .col-lg-7, #jsxc_dialog .col-xs-8, #jsxc_dialog .col-sm-8, #jsxc_dialog .col-md-8, #jsxc_dialog .col-lg-8, #jsxc_dialog .col-xs-9, #jsxc_dialog .col-sm-9, #jsxc_dialog .col-md-9, #jsxc_dialog .col-lg-9, #jsxc_dialog .col-xs-10, #jsxc_dialog .col-sm-10, #jsxc_dialog .col-md-10, #jsxc_dialog .col-lg-10, #jsxc_dialog .col-xs-11, #jsxc_dialog .col-sm-11, #jsxc_dialog .col-md-11, #jsxc_dialog .col-lg-11, #jsxc_dialog .col-xs-12, #jsxc_dialog .col-sm-12, #jsxc_dialog .col-md-12, #jsxc_dialog .col-lg-12 {
+ position: relative;
+ min-height: 1px;
+ padding-left: 15px;
+ padding-right: 15px; }
+ #jsxc_dialog .col-xs-1, #jsxc_dialog .col-xs-2, #jsxc_dialog .col-xs-3, #jsxc_dialog .col-xs-4, #jsxc_dialog .col-xs-5, #jsxc_dialog .col-xs-6, #jsxc_dialog .col-xs-7, #jsxc_dialog .col-xs-8, #jsxc_dialog .col-xs-9, #jsxc_dialog .col-xs-10, #jsxc_dialog .col-xs-11, #jsxc_dialog .col-xs-12 {
+ float: left; }
+ #jsxc_dialog .col-xs-1 {
+ width: 8.3333333333%; }
+ #jsxc_dialog .col-xs-2 {
+ width: 16.6666666667%; }
+ #jsxc_dialog .col-xs-3 {
+ width: 25%; }
+ #jsxc_dialog .col-xs-4 {
+ width: 33.3333333333%; }
+ #jsxc_dialog .col-xs-5 {
+ width: 41.6666666667%; }
+ #jsxc_dialog .col-xs-6 {
+ width: 50%; }
+ #jsxc_dialog .col-xs-7 {
+ width: 58.3333333333%; }
+ #jsxc_dialog .col-xs-8 {
+ width: 66.6666666667%; }
+ #jsxc_dialog .col-xs-9 {
+ width: 75%; }
+ #jsxc_dialog .col-xs-10 {
+ width: 83.3333333333%; }
+ #jsxc_dialog .col-xs-11 {
+ width: 91.6666666667%; }
+ #jsxc_dialog .col-xs-12 {
+ width: 100%; }
+ #jsxc_dialog .col-xs-pull-0 {
+ right: auto; }
+ #jsxc_dialog .col-xs-pull-1 {
+ right: 8.3333333333%; }
+ #jsxc_dialog .col-xs-pull-2 {
+ right: 16.6666666667%; }
+ #jsxc_dialog .col-xs-pull-3 {
+ right: 25%; }
+ #jsxc_dialog .col-xs-pull-4 {
+ right: 33.3333333333%; }
+ #jsxc_dialog .col-xs-pull-5 {
+ right: 41.6666666667%; }
+ #jsxc_dialog .col-xs-pull-6 {
+ right: 50%; }
+ #jsxc_dialog .col-xs-pull-7 {
+ right: 58.3333333333%; }
+ #jsxc_dialog .col-xs-pull-8 {
+ right: 66.6666666667%; }
+ #jsxc_dialog .col-xs-pull-9 {
+ right: 75%; }
+ #jsxc_dialog .col-xs-pull-10 {
+ right: 83.3333333333%; }
+ #jsxc_dialog .col-xs-pull-11 {
+ right: 91.6666666667%; }
+ #jsxc_dialog .col-xs-pull-12 {
+ right: 100%; }
+ #jsxc_dialog .col-xs-push-0 {
+ left: auto; }
+ #jsxc_dialog .col-xs-push-1 {
+ left: 8.3333333333%; }
+ #jsxc_dialog .col-xs-push-2 {
+ left: 16.6666666667%; }
+ #jsxc_dialog .col-xs-push-3 {
+ left: 25%; }
+ #jsxc_dialog .col-xs-push-4 {
+ left: 33.3333333333%; }
+ #jsxc_dialog .col-xs-push-5 {
+ left: 41.6666666667%; }
+ #jsxc_dialog .col-xs-push-6 {
+ left: 50%; }
+ #jsxc_dialog .col-xs-push-7 {
+ left: 58.3333333333%; }
+ #jsxc_dialog .col-xs-push-8 {
+ left: 66.6666666667%; }
+ #jsxc_dialog .col-xs-push-9 {
+ left: 75%; }
+ #jsxc_dialog .col-xs-push-10 {
+ left: 83.3333333333%; }
+ #jsxc_dialog .col-xs-push-11 {
+ left: 91.6666666667%; }
+ #jsxc_dialog .col-xs-push-12 {
+ left: 100%; }
+ #jsxc_dialog .col-xs-offset-0 {
+ margin-left: 0%; }
+ #jsxc_dialog .col-xs-offset-1 {
+ margin-left: 8.3333333333%; }
+ #jsxc_dialog .col-xs-offset-2 {
+ margin-left: 16.6666666667%; }
+ #jsxc_dialog .col-xs-offset-3 {
+ margin-left: 25%; }
+ #jsxc_dialog .col-xs-offset-4 {
+ margin-left: 33.3333333333%; }
+ #jsxc_dialog .col-xs-offset-5 {
+ margin-left: 41.6666666667%; }
+ #jsxc_dialog .col-xs-offset-6 {
+ margin-left: 50%; }
+ #jsxc_dialog .col-xs-offset-7 {
+ margin-left: 58.3333333333%; }
+ #jsxc_dialog .col-xs-offset-8 {
+ margin-left: 66.6666666667%; }
+ #jsxc_dialog .col-xs-offset-9 {
+ margin-left: 75%; }
+ #jsxc_dialog .col-xs-offset-10 {
+ margin-left: 83.3333333333%; }
+ #jsxc_dialog .col-xs-offset-11 {
+ margin-left: 91.6666666667%; }
+ #jsxc_dialog .col-xs-offset-12 {
+ margin-left: 100%; }
+ @media (min-width: 768px) {
+ #jsxc_dialog .col-sm-1, #jsxc_dialog .col-sm-2, #jsxc_dialog .col-sm-3, #jsxc_dialog .col-sm-4, #jsxc_dialog .col-sm-5, #jsxc_dialog .col-sm-6, #jsxc_dialog .col-sm-7, #jsxc_dialog .col-sm-8, #jsxc_dialog .col-sm-9, #jsxc_dialog .col-sm-10, #jsxc_dialog .col-sm-11, #jsxc_dialog .col-sm-12 {
+ float: left; }
+ #jsxc_dialog .col-sm-1 {
+ width: 8.3333333333%; }
+ #jsxc_dialog .col-sm-2 {
+ width: 16.6666666667%; }
+ #jsxc_dialog .col-sm-3 {
+ width: 25%; }
+ #jsxc_dialog .col-sm-4 {
+ width: 33.3333333333%; }
+ #jsxc_dialog .col-sm-5 {
+ width: 41.6666666667%; }
+ #jsxc_dialog .col-sm-6 {
+ width: 50%; }
+ #jsxc_dialog .col-sm-7 {
+ width: 58.3333333333%; }
+ #jsxc_dialog .col-sm-8 {
+ width: 66.6666666667%; }
+ #jsxc_dialog .col-sm-9 {
+ width: 75%; }
+ #jsxc_dialog .col-sm-10 {
+ width: 83.3333333333%; }
+ #jsxc_dialog .col-sm-11 {
+ width: 91.6666666667%; }
+ #jsxc_dialog .col-sm-12 {
+ width: 100%; }
+ #jsxc_dialog .col-sm-pull-0 {
+ right: auto; }
+ #jsxc_dialog .col-sm-pull-1 {
+ right: 8.3333333333%; }
+ #jsxc_dialog .col-sm-pull-2 {
+ right: 16.6666666667%; }
+ #jsxc_dialog .col-sm-pull-3 {
+ right: 25%; }
+ #jsxc_dialog .col-sm-pull-4 {
+ right: 33.3333333333%; }
+ #jsxc_dialog .col-sm-pull-5 {
+ right: 41.6666666667%; }
+ #jsxc_dialog .col-sm-pull-6 {
+ right: 50%; }
+ #jsxc_dialog .col-sm-pull-7 {
+ right: 58.3333333333%; }
+ #jsxc_dialog .col-sm-pull-8 {
+ right: 66.6666666667%; }
+ #jsxc_dialog .col-sm-pull-9 {
+ right: 75%; }
+ #jsxc_dialog .col-sm-pull-10 {
+ right: 83.3333333333%; }
+ #jsxc_dialog .col-sm-pull-11 {
+ right: 91.6666666667%; }
+ #jsxc_dialog .col-sm-pull-12 {
+ right: 100%; }
+ #jsxc_dialog .col-sm-push-0 {
+ left: auto; }
+ #jsxc_dialog .col-sm-push-1 {
+ left: 8.3333333333%; }
+ #jsxc_dialog .col-sm-push-2 {
+ left: 16.6666666667%; }
+ #jsxc_dialog .col-sm-push-3 {
+ left: 25%; }
+ #jsxc_dialog .col-sm-push-4 {
+ left: 33.3333333333%; }
+ #jsxc_dialog .col-sm-push-5 {
+ left: 41.6666666667%; }
+ #jsxc_dialog .col-sm-push-6 {
+ left: 50%; }
+ #jsxc_dialog .col-sm-push-7 {
+ left: 58.3333333333%; }
+ #jsxc_dialog .col-sm-push-8 {
+ left: 66.6666666667%; }
+ #jsxc_dialog .col-sm-push-9 {
+ left: 75%; }
+ #jsxc_dialog .col-sm-push-10 {
+ left: 83.3333333333%; }
+ #jsxc_dialog .col-sm-push-11 {
+ left: 91.6666666667%; }
+ #jsxc_dialog .col-sm-push-12 {
+ left: 100%; }
+ #jsxc_dialog .col-sm-offset-0 {
+ margin-left: 0%; }
+ #jsxc_dialog .col-sm-offset-1 {
+ margin-left: 8.3333333333%; }
+ #jsxc_dialog .col-sm-offset-2 {
+ margin-left: 16.6666666667%; }
+ #jsxc_dialog .col-sm-offset-3 {
+ margin-left: 25%; }
+ #jsxc_dialog .col-sm-offset-4 {
+ margin-left: 33.3333333333%; }
+ #jsxc_dialog .col-sm-offset-5 {
+ margin-left: 41.6666666667%; }
+ #jsxc_dialog .col-sm-offset-6 {
+ margin-left: 50%; }
+ #jsxc_dialog .col-sm-offset-7 {
+ margin-left: 58.3333333333%; }
+ #jsxc_dialog .col-sm-offset-8 {
+ margin-left: 66.6666666667%; }
+ #jsxc_dialog .col-sm-offset-9 {
+ margin-left: 75%; }
+ #jsxc_dialog .col-sm-offset-10 {
+ margin-left: 83.3333333333%; }
+ #jsxc_dialog .col-sm-offset-11 {
+ margin-left: 91.6666666667%; }
+ #jsxc_dialog .col-sm-offset-12 {
+ margin-left: 100%; } }
+ @media (min-width: 992px) {
+ #jsxc_dialog .col-md-1, #jsxc_dialog .col-md-2, #jsxc_dialog .col-md-3, #jsxc_dialog .col-md-4, #jsxc_dialog .col-md-5, #jsxc_dialog .col-md-6, #jsxc_dialog .col-md-7, #jsxc_dialog .col-md-8, #jsxc_dialog .col-md-9, #jsxc_dialog .col-md-10, #jsxc_dialog .col-md-11, #jsxc_dialog .col-md-12 {
+ float: left; }
+ #jsxc_dialog .col-md-1 {
+ width: 8.3333333333%; }
+ #jsxc_dialog .col-md-2 {
+ width: 16.6666666667%; }
+ #jsxc_dialog .col-md-3 {
+ width: 25%; }
+ #jsxc_dialog .col-md-4 {
+ width: 33.3333333333%; }
+ #jsxc_dialog .col-md-5 {
+ width: 41.6666666667%; }
+ #jsxc_dialog .col-md-6 {
+ width: 50%; }
+ #jsxc_dialog .col-md-7 {
+ width: 58.3333333333%; }
+ #jsxc_dialog .col-md-8 {
+ width: 66.6666666667%; }
+ #jsxc_dialog .col-md-9 {
+ width: 75%; }
+ #jsxc_dialog .col-md-10 {
+ width: 83.3333333333%; }
+ #jsxc_dialog .col-md-11 {
+ width: 91.6666666667%; }
+ #jsxc_dialog .col-md-12 {
+ width: 100%; }
+ #jsxc_dialog .col-md-pull-0 {
+ right: auto; }
+ #jsxc_dialog .col-md-pull-1 {
+ right: 8.3333333333%; }
+ #jsxc_dialog .col-md-pull-2 {
+ right: 16.6666666667%; }
+ #jsxc_dialog .col-md-pull-3 {
+ right: 25%; }
+ #jsxc_dialog .col-md-pull-4 {
+ right: 33.3333333333%; }
+ #jsxc_dialog .col-md-pull-5 {
+ right: 41.6666666667%; }
+ #jsxc_dialog .col-md-pull-6 {
+ right: 50%; }
+ #jsxc_dialog .col-md-pull-7 {
+ right: 58.3333333333%; }
+ #jsxc_dialog .col-md-pull-8 {
+ right: 66.6666666667%; }
+ #jsxc_dialog .col-md-pull-9 {
+ right: 75%; }
+ #jsxc_dialog .col-md-pull-10 {
+ right: 83.3333333333%; }
+ #jsxc_dialog .col-md-pull-11 {
+ right: 91.6666666667%; }
+ #jsxc_dialog .col-md-pull-12 {
+ right: 100%; }
+ #jsxc_dialog .col-md-push-0 {
+ left: auto; }
+ #jsxc_dialog .col-md-push-1 {
+ left: 8.3333333333%; }
+ #jsxc_dialog .col-md-push-2 {
+ left: 16.6666666667%; }
+ #jsxc_dialog .col-md-push-3 {
+ left: 25%; }
+ #jsxc_dialog .col-md-push-4 {
+ left: 33.3333333333%; }
+ #jsxc_dialog .col-md-push-5 {
+ left: 41.6666666667%; }
+ #jsxc_dialog .col-md-push-6 {
+ left: 50%; }
+ #jsxc_dialog .col-md-push-7 {
+ left: 58.3333333333%; }
+ #jsxc_dialog .col-md-push-8 {
+ left: 66.6666666667%; }
+ #jsxc_dialog .col-md-push-9 {
+ left: 75%; }
+ #jsxc_dialog .col-md-push-10 {
+ left: 83.3333333333%; }
+ #jsxc_dialog .col-md-push-11 {
+ left: 91.6666666667%; }
+ #jsxc_dialog .col-md-push-12 {
+ left: 100%; }
+ #jsxc_dialog .col-md-offset-0 {
+ margin-left: 0%; }
+ #jsxc_dialog .col-md-offset-1 {
+ margin-left: 8.3333333333%; }
+ #jsxc_dialog .col-md-offset-2 {
+ margin-left: 16.6666666667%; }
+ #jsxc_dialog .col-md-offset-3 {
+ margin-left: 25%; }
+ #jsxc_dialog .col-md-offset-4 {
+ margin-left: 33.3333333333%; }
+ #jsxc_dialog .col-md-offset-5 {
+ margin-left: 41.6666666667%; }
+ #jsxc_dialog .col-md-offset-6 {
+ margin-left: 50%; }
+ #jsxc_dialog .col-md-offset-7 {
+ margin-left: 58.3333333333%; }
+ #jsxc_dialog .col-md-offset-8 {
+ margin-left: 66.6666666667%; }
+ #jsxc_dialog .col-md-offset-9 {
+ margin-left: 75%; }
+ #jsxc_dialog .col-md-offset-10 {
+ margin-left: 83.3333333333%; }
+ #jsxc_dialog .col-md-offset-11 {
+ margin-left: 91.6666666667%; }
+ #jsxc_dialog .col-md-offset-12 {
+ margin-left: 100%; } }
+ @media (min-width: 1200px) {
+ #jsxc_dialog .col-lg-1, #jsxc_dialog .col-lg-2, #jsxc_dialog .col-lg-3, #jsxc_dialog .col-lg-4, #jsxc_dialog .col-lg-5, #jsxc_dialog .col-lg-6, #jsxc_dialog .col-lg-7, #jsxc_dialog .col-lg-8, #jsxc_dialog .col-lg-9, #jsxc_dialog .col-lg-10, #jsxc_dialog .col-lg-11, #jsxc_dialog .col-lg-12 {
+ float: left; }
+ #jsxc_dialog .col-lg-1 {
+ width: 8.3333333333%; }
+ #jsxc_dialog .col-lg-2 {
+ width: 16.6666666667%; }
+ #jsxc_dialog .col-lg-3 {
+ width: 25%; }
+ #jsxc_dialog .col-lg-4 {
+ width: 33.3333333333%; }
+ #jsxc_dialog .col-lg-5 {
+ width: 41.6666666667%; }
+ #jsxc_dialog .col-lg-6 {
+ width: 50%; }
+ #jsxc_dialog .col-lg-7 {
+ width: 58.3333333333%; }
+ #jsxc_dialog .col-lg-8 {
+ width: 66.6666666667%; }
+ #jsxc_dialog .col-lg-9 {
+ width: 75%; }
+ #jsxc_dialog .col-lg-10 {
+ width: 83.3333333333%; }
+ #jsxc_dialog .col-lg-11 {
+ width: 91.6666666667%; }
+ #jsxc_dialog .col-lg-12 {
+ width: 100%; }
+ #jsxc_dialog .col-lg-pull-0 {
+ right: auto; }
+ #jsxc_dialog .col-lg-pull-1 {
+ right: 8.3333333333%; }
+ #jsxc_dialog .col-lg-pull-2 {
+ right: 16.6666666667%; }
+ #jsxc_dialog .col-lg-pull-3 {
+ right: 25%; }
+ #jsxc_dialog .col-lg-pull-4 {
+ right: 33.3333333333%; }
+ #jsxc_dialog .col-lg-pull-5 {
+ right: 41.6666666667%; }
+ #jsxc_dialog .col-lg-pull-6 {
+ right: 50%; }
+ #jsxc_dialog .col-lg-pull-7 {
+ right: 58.3333333333%; }
+ #jsxc_dialog .col-lg-pull-8 {
+ right: 66.6666666667%; }
+ #jsxc_dialog .col-lg-pull-9 {
+ right: 75%; }
+ #jsxc_dialog .col-lg-pull-10 {
+ right: 83.3333333333%; }
+ #jsxc_dialog .col-lg-pull-11 {
+ right: 91.6666666667%; }
+ #jsxc_dialog .col-lg-pull-12 {
+ right: 100%; }
+ #jsxc_dialog .col-lg-push-0 {
+ left: auto; }
+ #jsxc_dialog .col-lg-push-1 {
+ left: 8.3333333333%; }
+ #jsxc_dialog .col-lg-push-2 {
+ left: 16.6666666667%; }
+ #jsxc_dialog .col-lg-push-3 {
+ left: 25%; }
+ #jsxc_dialog .col-lg-push-4 {
+ left: 33.3333333333%; }
+ #jsxc_dialog .col-lg-push-5 {
+ left: 41.6666666667%; }
+ #jsxc_dialog .col-lg-push-6 {
+ left: 50%; }
+ #jsxc_dialog .col-lg-push-7 {
+ left: 58.3333333333%; }
+ #jsxc_dialog .col-lg-push-8 {
+ left: 66.6666666667%; }
+ #jsxc_dialog .col-lg-push-9 {
+ left: 75%; }
+ #jsxc_dialog .col-lg-push-10 {
+ left: 83.3333333333%; }
+ #jsxc_dialog .col-lg-push-11 {
+ left: 91.6666666667%; }
+ #jsxc_dialog .col-lg-push-12 {
+ left: 100%; }
+ #jsxc_dialog .col-lg-offset-0 {
+ margin-left: 0%; }
+ #jsxc_dialog .col-lg-offset-1 {
+ margin-left: 8.3333333333%; }
+ #jsxc_dialog .col-lg-offset-2 {
+ margin-left: 16.6666666667%; }
+ #jsxc_dialog .col-lg-offset-3 {
+ margin-left: 25%; }
+ #jsxc_dialog .col-lg-offset-4 {
+ margin-left: 33.3333333333%; }
+ #jsxc_dialog .col-lg-offset-5 {
+ margin-left: 41.6666666667%; }
+ #jsxc_dialog .col-lg-offset-6 {
+ margin-left: 50%; }
+ #jsxc_dialog .col-lg-offset-7 {
+ margin-left: 58.3333333333%; }
+ #jsxc_dialog .col-lg-offset-8 {
+ margin-left: 66.6666666667%; }
+ #jsxc_dialog .col-lg-offset-9 {
+ margin-left: 75%; }
+ #jsxc_dialog .col-lg-offset-10 {
+ margin-left: 83.3333333333%; }
+ #jsxc_dialog .col-lg-offset-11 {
+ margin-left: 91.6666666667%; }
+ #jsxc_dialog .col-lg-offset-12 {
+ margin-left: 100%; } }
+ #jsxc_dialog .alert {
+ padding: 15px;
+ margin-bottom: 20px;
+ border: 1px solid transparent;
+ border-radius: 4px; }
+ #jsxc_dialog .alert h4 {
+ margin-top: 0;
+ color: inherit; }
+ #jsxc_dialog .alert .alert-link {
+ font-weight: bold; }
+ #jsxc_dialog .alert > p, #jsxc_dialog .alert > ul {
+ margin-bottom: 0; }
+ #jsxc_dialog .alert > p + p {
+ margin-top: 5px; }
+ #jsxc_dialog .alert-dismissable, #jsxc_dialog .alert-dismissible {
+ padding-right: 35px; }
+ #jsxc_dialog .alert-dismissable .close, #jsxc_dialog .alert-dismissible .close {
+ position: relative;
+ top: -2px;
+ right: -21px;
+ color: inherit; }
+ #jsxc_dialog .alert-success {
+ background-color: #dff0d8;
+ border-color: #d6e9c6;
+ color: #3c763d; }
+ #jsxc_dialog .alert-success hr {
+ border-top-color: #c9e2b3; }
+ #jsxc_dialog .alert-success .alert-link {
+ color: #2b542c; }
+ #jsxc_dialog .alert-info {
+ background-color: #d9edf7;
+ border-color: #bce8f1;
+ color: #31708f; }
+ #jsxc_dialog .alert-info hr {
+ border-top-color: #a6e1ec; }
+ #jsxc_dialog .alert-info .alert-link {
+ color: #245269; }
+ #jsxc_dialog .alert-warning {
+ background-color: #fcf8e3;
+ border-color: #faebcc;
+ color: #8a6d3b; }
+ #jsxc_dialog .alert-warning hr {
+ border-top-color: #f7e1b5; }
+ #jsxc_dialog .alert-warning .alert-link {
+ color: #66512c; }
+ #jsxc_dialog .alert-danger {
+ background-color: #f2dede;
+ border-color: #ebccd1;
+ color: #a94442; }
+ #jsxc_dialog .alert-danger hr {
+ border-top-color: #e4b9c0; }
+ #jsxc_dialog .alert-danger .alert-link {
+ color: #843534; }
+ #jsxc_dialog .btn {
+ display: inline-block;
+ margin-bottom: 0;
+ font-weight: normal;
+ text-align: center;
+ vertical-align: middle;
+ -ms-touch-action: manipulation;
+ touch-action: manipulation;
+ cursor: pointer;
+ background-image: none;
+ border: 1px solid transparent;
+ white-space: nowrap;
+ padding: 6px 12px;
+ font-size: 14px;
+ line-height: 1.428571429;
+ border-radius: 4px;
+ -webkit-user-select: none;
+ -moz-user-select: none;
+ -ms-user-select: none;
+ user-select: none; }
+ #jsxc_dialog .btn:focus, #jsxc_dialog .btn.focus, #jsxc_dialog .btn:active:focus, #jsxc_dialog .btn:active.focus, #jsxc_dialog .btn.active:focus, #jsxc_dialog .btn.active.focus {
+ outline: thin dotted;
+ outline: 5px auto -webkit-focus-ring-color;
+ outline-offset: -2px; }
+ #jsxc_dialog .btn:hover, #jsxc_dialog .btn:focus, #jsxc_dialog .btn.focus {
+ color: #333;
+ text-decoration: none; }
+ #jsxc_dialog .btn:active, #jsxc_dialog .btn.active {
+ outline: 0;
+ background-image: none;
+ box-shadow: inset 0 3px 5px rgba(0, 0, 0, 0.125); }
+ #jsxc_dialog .btn.disabled, #jsxc_dialog .btn[disabled], fieldset[disabled] #jsxc_dialog .btn {
+ cursor: false;
+ pointer-events: none;
+ opacity: 0.65;
+ filter: alpha(opacity=65);
+ box-shadow: none; }
+ #jsxc_dialog .btn-default {
+ color: #333;
+ background-color: #fff;
+ border-color: #ccc; }
+ #jsxc_dialog .btn-default:hover, #jsxc_dialog .btn-default:focus, #jsxc_dialog .btn-default.focus, #jsxc_dialog .btn-default:active, #jsxc_dialog .btn-default.active, .open > #jsxc_dialog .btn-default.dropdown-toggle {
+ color: #333;
+ background-color: #e6e6e6;
+ border-color: #adadad; }
+ #jsxc_dialog .btn-default:active, #jsxc_dialog .btn-default.active, .open > #jsxc_dialog .btn-default.dropdown-toggle {
+ background-image: none; }
+ #jsxc_dialog .btn-default.disabled, #jsxc_dialog .btn-default.disabled:hover, #jsxc_dialog .btn-default.disabled:focus, #jsxc_dialog .btn-default.disabled.focus, #jsxc_dialog .btn-default.disabled:active, #jsxc_dialog .btn-default.disabled.active, #jsxc_dialog .btn-default[disabled], #jsxc_dialog .btn-default[disabled]:hover, #jsxc_dialog .btn-default[disabled]:focus, #jsxc_dialog .btn-default[disabled].focus, #jsxc_dialog .btn-default[disabled]:active, #jsxc_dialog .btn-default[disabled].active, fieldset[disabled] #jsxc_dialog .btn-default, fieldset[disabled] #jsxc_dialog .btn-default:hover, fieldset[disabled] #jsxc_dialog .btn-default:focus, fieldset[disabled] #jsxc_dialog .btn-default.focus, fieldset[disabled] #jsxc_dialog .btn-default:active, fieldset[disabled] #jsxc_dialog .btn-default.active {
+ background-color: #fff;
+ border-color: #ccc; }
+ #jsxc_dialog .btn-default .badge {
+ color: #fff;
+ background-color: #333; }
+ #jsxc_dialog .btn-primary {
+ color: #fff;
+ background-color: #337ab7;
+ border-color: #2e6da4; }
+ #jsxc_dialog .btn-primary:hover, #jsxc_dialog .btn-primary:focus, #jsxc_dialog .btn-primary.focus, #jsxc_dialog .btn-primary:active, #jsxc_dialog .btn-primary.active, .open > #jsxc_dialog .btn-primary.dropdown-toggle {
+ color: #fff;
+ background-color: #286090;
+ border-color: #204d74; }
+ #jsxc_dialog .btn-primary:active, #jsxc_dialog .btn-primary.active, .open > #jsxc_dialog .btn-primary.dropdown-toggle {
+ background-image: none; }
+ #jsxc_dialog .btn-primary.disabled, #jsxc_dialog .btn-primary.disabled:hover, #jsxc_dialog .btn-primary.disabled:focus, #jsxc_dialog .btn-primary.disabled.focus, #jsxc_dialog .btn-primary.disabled:active, #jsxc_dialog .btn-primary.disabled.active, #jsxc_dialog .btn-primary[disabled], #jsxc_dialog .btn-primary[disabled]:hover, #jsxc_dialog .btn-primary[disabled]:focus, #jsxc_dialog .btn-primary[disabled].focus, #jsxc_dialog .btn-primary[disabled]:active, #jsxc_dialog .btn-primary[disabled].active, fieldset[disabled] #jsxc_dialog .btn-primary, fieldset[disabled] #jsxc_dialog .btn-primary:hover, fieldset[disabled] #jsxc_dialog .btn-primary:focus, fieldset[disabled] #jsxc_dialog .btn-primary.focus, fieldset[disabled] #jsxc_dialog .btn-primary:active, fieldset[disabled] #jsxc_dialog .btn-primary.active {
+ background-color: #337ab7;
+ border-color: #2e6da4; }
+ #jsxc_dialog .btn-primary .badge {
+ color: #337ab7;
+ background-color: #fff; }
+ #jsxc_dialog .btn-success {
+ color: #fff;
+ background-color: #5cb85c;
+ border-color: #4cae4c; }
+ #jsxc_dialog .btn-success:hover, #jsxc_dialog .btn-success:focus, #jsxc_dialog .btn-success.focus, #jsxc_dialog .btn-success:active, #jsxc_dialog .btn-success.active, .open > #jsxc_dialog .btn-success.dropdown-toggle {
+ color: #fff;
+ background-color: #449d44;
+ border-color: #398439; }
+ #jsxc_dialog .btn-success:active, #jsxc_dialog .btn-success.active, .open > #jsxc_dialog .btn-success.dropdown-toggle {
+ background-image: none; }
+ #jsxc_dialog .btn-success.disabled, #jsxc_dialog .btn-success.disabled:hover, #jsxc_dialog .btn-success.disabled:focus, #jsxc_dialog .btn-success.disabled.focus, #jsxc_dialog .btn-success.disabled:active, #jsxc_dialog .btn-success.disabled.active, #jsxc_dialog .btn-success[disabled], #jsxc_dialog .btn-success[disabled]:hover, #jsxc_dialog .btn-success[disabled]:focus, #jsxc_dialog .btn-success[disabled].focus, #jsxc_dialog .btn-success[disabled]:active, #jsxc_dialog .btn-success[disabled].active, fieldset[disabled] #jsxc_dialog .btn-success, fieldset[disabled] #jsxc_dialog .btn-success:hover, fieldset[disabled] #jsxc_dialog .btn-success:focus, fieldset[disabled] #jsxc_dialog .btn-success.focus, fieldset[disabled] #jsxc_dialog .btn-success:active, fieldset[disabled] #jsxc_dialog .btn-success.active {
+ background-color: #5cb85c;
+ border-color: #4cae4c; }
+ #jsxc_dialog .btn-success .badge {
+ color: #5cb85c;
+ background-color: #fff; }
+ #jsxc_dialog .btn-info {
+ color: #fff;
+ background-color: #5bc0de;
+ border-color: #46b8da; }
+ #jsxc_dialog .btn-info:hover, #jsxc_dialog .btn-info:focus, #jsxc_dialog .btn-info.focus, #jsxc_dialog .btn-info:active, #jsxc_dialog .btn-info.active, .open > #jsxc_dialog .btn-info.dropdown-toggle {
+ color: #fff;
+ background-color: #31b0d5;
+ border-color: #269abc; }
+ #jsxc_dialog .btn-info:active, #jsxc_dialog .btn-info.active, .open > #jsxc_dialog .btn-info.dropdown-toggle {
+ background-image: none; }
+ #jsxc_dialog .btn-info.disabled, #jsxc_dialog .btn-info.disabled:hover, #jsxc_dialog .btn-info.disabled:focus, #jsxc_dialog .btn-info.disabled.focus, #jsxc_dialog .btn-info.disabled:active, #jsxc_dialog .btn-info.disabled.active, #jsxc_dialog .btn-info[disabled], #jsxc_dialog .btn-info[disabled]:hover, #jsxc_dialog .btn-info[disabled]:focus, #jsxc_dialog .btn-info[disabled].focus, #jsxc_dialog .btn-info[disabled]:active, #jsxc_dialog .btn-info[disabled].active, fieldset[disabled] #jsxc_dialog .btn-info, fieldset[disabled] #jsxc_dialog .btn-info:hover, fieldset[disabled] #jsxc_dialog .btn-info:focus, fieldset[disabled] #jsxc_dialog .btn-info.focus, fieldset[disabled] #jsxc_dialog .btn-info:active, fieldset[disabled] #jsxc_dialog .btn-info.active {
+ background-color: #5bc0de;
+ border-color: #46b8da; }
+ #jsxc_dialog .btn-info .badge {
+ color: #5bc0de;
+ background-color: #fff; }
+ #jsxc_dialog .btn-warning {
+ color: #fff;
+ background-color: #f0ad4e;
+ border-color: #eea236; }
+ #jsxc_dialog .btn-warning:hover, #jsxc_dialog .btn-warning:focus, #jsxc_dialog .btn-warning.focus, #jsxc_dialog .btn-warning:active, #jsxc_dialog .btn-warning.active, .open > #jsxc_dialog .btn-warning.dropdown-toggle {
+ color: #fff;
+ background-color: #ec971f;
+ border-color: #d58512; }
+ #jsxc_dialog .btn-warning:active, #jsxc_dialog .btn-warning.active, .open > #jsxc_dialog .btn-warning.dropdown-toggle {
+ background-image: none; }
+ #jsxc_dialog .btn-warning.disabled, #jsxc_dialog .btn-warning.disabled:hover, #jsxc_dialog .btn-warning.disabled:focus, #jsxc_dialog .btn-warning.disabled.focus, #jsxc_dialog .btn-warning.disabled:active, #jsxc_dialog .btn-warning.disabled.active, #jsxc_dialog .btn-warning[disabled], #jsxc_dialog .btn-warning[disabled]:hover, #jsxc_dialog .btn-warning[disabled]:focus, #jsxc_dialog .btn-warning[disabled].focus, #jsxc_dialog .btn-warning[disabled]:active, #jsxc_dialog .btn-warning[disabled].active, fieldset[disabled] #jsxc_dialog .btn-warning, fieldset[disabled] #jsxc_dialog .btn-warning:hover, fieldset[disabled] #jsxc_dialog .btn-warning:focus, fieldset[disabled] #jsxc_dialog .btn-warning.focus, fieldset[disabled] #jsxc_dialog .btn-warning:active, fieldset[disabled] #jsxc_dialog .btn-warning.active {
+ background-color: #f0ad4e;
+ border-color: #eea236; }
+ #jsxc_dialog .btn-warning .badge {
+ color: #f0ad4e;
+ background-color: #fff; }
+ #jsxc_dialog .btn-danger {
+ color: #fff;
+ background-color: #d9534f;
+ border-color: #d43f3a; }
+ #jsxc_dialog .btn-danger:hover, #jsxc_dialog .btn-danger:focus, #jsxc_dialog .btn-danger.focus, #jsxc_dialog .btn-danger:active, #jsxc_dialog .btn-danger.active, .open > #jsxc_dialog .btn-danger.dropdown-toggle {
+ color: #fff;
+ background-color: #c9302c;
+ border-color: #ac2925; }
+ #jsxc_dialog .btn-danger:active, #jsxc_dialog .btn-danger.active, .open > #jsxc_dialog .btn-danger.dropdown-toggle {
+ background-image: none; }
+ #jsxc_dialog .btn-danger.disabled, #jsxc_dialog .btn-danger.disabled:hover, #jsxc_dialog .btn-danger.disabled:focus, #jsxc_dialog .btn-danger.disabled.focus, #jsxc_dialog .btn-danger.disabled:active, #jsxc_dialog .btn-danger.disabled.active, #jsxc_dialog .btn-danger[disabled], #jsxc_dialog .btn-danger[disabled]:hover, #jsxc_dialog .btn-danger[disabled]:focus, #jsxc_dialog .btn-danger[disabled].focus, #jsxc_dialog .btn-danger[disabled]:active, #jsxc_dialog .btn-danger[disabled].active, fieldset[disabled] #jsxc_dialog .btn-danger, fieldset[disabled] #jsxc_dialog .btn-danger:hover, fieldset[disabled] #jsxc_dialog .btn-danger:focus, fieldset[disabled] #jsxc_dialog .btn-danger.focus, fieldset[disabled] #jsxc_dialog .btn-danger:active, fieldset[disabled] #jsxc_dialog .btn-danger.active {
+ background-color: #d9534f;
+ border-color: #d43f3a; }
+ #jsxc_dialog .btn-danger .badge {
+ color: #d9534f;
+ background-color: #fff; }
+ #jsxc_dialog .btn-link {
+ color: #337ab7;
+ font-weight: normal;
+ border-radius: 0; }
+ #jsxc_dialog .btn-link, #jsxc_dialog .btn-link:active, #jsxc_dialog .btn-link.active, #jsxc_dialog .btn-link[disabled], fieldset[disabled] #jsxc_dialog .btn-link {
+ background-color: transparent;
+ box-shadow: none; }
+ #jsxc_dialog .btn-link, #jsxc_dialog .btn-link:hover, #jsxc_dialog .btn-link:focus, #jsxc_dialog .btn-link:active {
+ border-color: transparent; }
+ #jsxc_dialog .btn-link:hover, #jsxc_dialog .btn-link:focus {
+ color: #23527c;
+ text-decoration: underline;
+ background-color: transparent; }
+ #jsxc_dialog .btn-link[disabled]:hover, #jsxc_dialog .btn-link[disabled]:focus, fieldset[disabled] #jsxc_dialog .btn-link:hover, fieldset[disabled] #jsxc_dialog .btn-link:focus {
+ color: #777777;
+ text-decoration: none; }
+ #jsxc_dialog .btn-lg, #jsxc_dialog .btn-group-lg > .btn {
+ padding: 10px 16px;
+ font-size: 18px;
+ line-height: 1.3333333;
+ border-radius: 6px; }
+ #jsxc_dialog .btn-sm, #jsxc_dialog .btn-group-sm > .btn {
+ padding: 5px 10px;
+ font-size: 12px;
+ line-height: 1.5;
+ border-radius: 3px; }
+ #jsxc_dialog .btn-xs, #jsxc_dialog .btn-group-xs > .btn {
+ padding: 1px 5px;
+ font-size: 12px;
+ line-height: 1.5;
+ border-radius: 3px; }
+ #jsxc_dialog .btn-block {
+ display: block;
+ width: 100%; }
+ #jsxc_dialog .btn-block + .btn-block {
+ margin-top: 5px; }
+ #jsxc_dialog input[type="submit"].btn-block, #jsxc_dialog input[type="reset"].btn-block, #jsxc_dialog input[type="button"].btn-block {
+ width: 100%; }
+ #jsxc_dialog .btn-group, #jsxc_dialog .btn-group-vertical {
+ position: relative;
+ display: inline-block;
+ vertical-align: middle; }
+ #jsxc_dialog .btn-group > .btn, #jsxc_dialog .btn-group-vertical > .btn {
+ position: relative;
+ float: left; }
+ #jsxc_dialog .btn-group > .btn:hover, #jsxc_dialog .btn-group > .btn:focus, #jsxc_dialog .btn-group > .btn:active, #jsxc_dialog .btn-group > .btn.active, #jsxc_dialog .btn-group-vertical > .btn:hover, #jsxc_dialog .btn-group-vertical > .btn:focus, #jsxc_dialog .btn-group-vertical > .btn:active, #jsxc_dialog .btn-group-vertical > .btn.active {
+ z-index: 2; }
+ #jsxc_dialog .btn-group .btn + .btn, #jsxc_dialog .btn-group .btn + .btn-group, #jsxc_dialog .btn-group .btn-group + .btn, #jsxc_dialog .btn-group .btn-group + .btn-group {
+ margin-left: -1px; }
+ #jsxc_dialog .btn-toolbar {
+ margin-left: -5px; }
+ #jsxc_dialog .btn-toolbar:before, #jsxc_dialog .btn-toolbar:after {
+ content: " ";
+ display: table; }
+ #jsxc_dialog .btn-toolbar:after {
+ clear: both; }
+ #jsxc_dialog .btn-toolbar .btn-group, #jsxc_dialog .btn-toolbar .input-group {
+ float: left; }
+ #jsxc_dialog .btn-toolbar > .btn, #jsxc_dialog .btn-toolbar > .btn-group, #jsxc_dialog .btn-toolbar > .input-group {
+ margin-left: 5px; }
+ #jsxc_dialog .btn-group > .btn:not(:first-child):not(:last-child):not(.dropdown-toggle) {
+ border-radius: 0; }
+ #jsxc_dialog .btn-group > .btn:first-child {
+ margin-left: 0; }
+ #jsxc_dialog .btn-group > .btn:first-child:not(:last-child):not(.dropdown-toggle) {
+ border-bottom-right-radius: 0;
+ border-top-right-radius: 0; }
+ #jsxc_dialog .btn-group > .btn:last-child:not(:first-child), #jsxc_dialog .btn-group > .dropdown-toggle:not(:first-child) {
+ border-bottom-left-radius: 0;
+ border-top-left-radius: 0; }
+ #jsxc_dialog .btn-group > .btn-group {
+ float: left; }
+ #jsxc_dialog .btn-group > .btn-group:not(:first-child):not(:last-child) > .btn {
+ border-radius: 0; }
+ #jsxc_dialog .btn-group > .btn-group:first-child:not(:last-child) > .btn:last-child, #jsxc_dialog .btn-group > .btn-group:first-child:not(:last-child) > .dropdown-toggle {
+ border-bottom-right-radius: 0;
+ border-top-right-radius: 0; }
+ #jsxc_dialog .btn-group > .btn-group:last-child:not(:first-child) > .btn:first-child {
+ border-bottom-left-radius: 0;
+ border-top-left-radius: 0; }
+ #jsxc_dialog .btn-group .dropdown-toggle:active, #jsxc_dialog .btn-group.open .dropdown-toggle {
+ outline: 0; }
+ #jsxc_dialog .btn-group > .btn + .dropdown-toggle {
+ padding-left: 8px;
+ padding-right: 8px; }
+ #jsxc_dialog .btn-group > .btn-lg + .dropdown-toggle, #jsxc_dialog .btn-group-lg.btn-group > .btn + .dropdown-toggle {
+ padding-left: 12px;
+ padding-right: 12px; }
+ #jsxc_dialog .btn-group.open .dropdown-toggle {
+ box-shadow: inset 0 3px 5px rgba(0, 0, 0, 0.125); }
+ #jsxc_dialog .btn-group.open .dropdown-toggle.btn-link {
+ box-shadow: none; }
+ #jsxc_dialog .btn .caret {
+ margin-left: 0; }
+ #jsxc_dialog .btn-lg .caret, #jsxc_dialog .btn-group-lg > .btn .caret {
+ border-width: 5px 5px 0;
+ border-bottom-width: 0; }
+ #jsxc_dialog .dropup .btn-lg .caret, #jsxc_dialog .dropup .btn-group-lg > .btn .caret {
+ border-width: 0 5px 5px; }
+ #jsxc_dialog .btn-group-vertical > .btn, #jsxc_dialog .btn-group-vertical > .btn-group, #jsxc_dialog .btn-group-vertical > .btn-group > .btn {
+ display: block;
+ float: none;
+ width: 100%;
+ max-width: 100%; }
+ #jsxc_dialog .btn-group-vertical > .btn-group:before, #jsxc_dialog .btn-group-vertical > .btn-group:after {
+ content: " ";
+ display: table; }
+ #jsxc_dialog .btn-group-vertical > .btn-group:after {
+ clear: both; }
+ #jsxc_dialog .btn-group-vertical > .btn-group > .btn {
+ float: none; }
+ #jsxc_dialog .btn-group-vertical > .btn + .btn, #jsxc_dialog .btn-group-vertical > .btn + .btn-group, #jsxc_dialog .btn-group-vertical > .btn-group + .btn, #jsxc_dialog .btn-group-vertical > .btn-group + .btn-group {
+ margin-top: -1px;
+ margin-left: 0; }
+ #jsxc_dialog .btn-group-vertical > .btn:not(:first-child):not(:last-child) {
+ border-radius: 0; }
+ #jsxc_dialog .btn-group-vertical > .btn:first-child:not(:last-child) {
+ border-top-right-radius: 4px;
+ border-bottom-right-radius: 0;
+ border-bottom-left-radius: 0; }
+ #jsxc_dialog .btn-group-vertical > .btn:last-child:not(:first-child) {
+ border-bottom-left-radius: 4px;
+ border-top-right-radius: 0;
+ border-top-left-radius: 0; }
+ #jsxc_dialog .btn-group-vertical > .btn-group:not(:first-child):not(:last-child) > .btn {
+ border-radius: 0; }
+ #jsxc_dialog .btn-group-vertical > .btn-group:first-child:not(:last-child) > .btn:last-child, #jsxc_dialog .btn-group-vertical > .btn-group:first-child:not(:last-child) > .dropdown-toggle {
+ border-bottom-right-radius: 0;
+ border-bottom-left-radius: 0; }
+ #jsxc_dialog .btn-group-vertical > .btn-group:last-child:not(:first-child) > .btn:first-child {
+ border-top-right-radius: 0;
+ border-top-left-radius: 0; }
+ #jsxc_dialog .btn-group-justified {
+ display: table;
+ width: 100%;
+ table-layout: fixed;
+ border-collapse: separate; }
+ #jsxc_dialog .btn-group-justified > .btn, #jsxc_dialog .btn-group-justified > .btn-group {
+ float: none;
+ display: table-cell;
+ width: 1%; }
+ #jsxc_dialog .btn-group-justified > .btn-group .btn {
+ width: 100%; }
+ #jsxc_dialog .btn-group-justified > .btn-group .dropdown-menu {
+ left: auto; }
+ #jsxc_dialog [data-toggle="buttons"] > .btn input[type="radio"], #jsxc_dialog [data-toggle="buttons"] > .btn input[type="checkbox"], #jsxc_dialog [data-toggle="buttons"] > .btn-group > .btn input[type="radio"], #jsxc_dialog [data-toggle="buttons"] > .btn-group > .btn input[type="checkbox"] {
+ position: absolute;
+ clip: rect(0, 0, 0, 0);
+ pointer-events: none; }
+ #jsxc_dialog fieldset {
+ padding: 0;
+ margin: 0;
+ border: 0;
+ min-width: 0; }
+ #jsxc_dialog legend {
+ display: block;
+ width: 100%;
+ padding: 0;
+ margin-bottom: 20px;
+ font-size: 21px;
+ line-height: inherit;
+ color: #333333;
+ border: 0;
+ border-bottom: 1px solid #e5e5e5; }
+ #jsxc_dialog label {
+ display: inline-block;
+ max-width: 100%;
+ margin-bottom: 5px;
+ font-weight: bold; }
+ #jsxc_dialog input[type="search"] {
+ box-sizing: border-box; }
+ #jsxc_dialog input[type="radio"], #jsxc_dialog input[type="checkbox"] {
+ margin: 4px 0 0;
+ margin-top: 1px \9;
+ line-height: normal; }
+ #jsxc_dialog input[type="file"] {
+ display: block; }
+ #jsxc_dialog input[type="range"] {
+ display: block;
+ width: 100%; }
+ #jsxc_dialog select[multiple], #jsxc_dialog select[size] {
+ height: auto; }
+ #jsxc_dialog input[type="file"]:focus, #jsxc_dialog input[type="radio"]:focus, #jsxc_dialog input[type="checkbox"]:focus {
+ outline: thin dotted;
+ outline: 5px auto -webkit-focus-ring-color;
+ outline-offset: -2px; }
+ #jsxc_dialog output {
+ display: block;
+ padding-top: 7px;
+ font-size: 14px;
+ line-height: 1.428571429;
+ color: #555555; }
+ #jsxc_dialog .form-control {
+ display: block;
+ width: 100%;
+ height: 34px;
+ padding: 6px 12px;
+ font-size: 14px;
+ line-height: 1.428571429;
+ color: #555555;
+ background-color: #fff;
+ background-image: none;
+ border: 1px solid #ccc;
+ border-radius: 4px;
+ box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075);
+ -webkit-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; }
+ #jsxc_dialog .form-control:focus {
+ border-color: #66afe9;
+ outline: 0;
+ box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 8px rgba(102, 175, 233, 0.6); }
+ #jsxc_dialog .form-control::-moz-placeholder {
+ color: #999;
+ opacity: 1; }
+ #jsxc_dialog .form-control:-ms-input-placeholder {
+ color: #999; }
+ #jsxc_dialog .form-control::-webkit-input-placeholder {
+ color: #999; }
+ #jsxc_dialog .form-control[disabled], #jsxc_dialog .form-control[readonly], fieldset[disabled] #jsxc_dialog .form-control {
+ background-color: #eeeeee;
+ opacity: 1; }
+ #jsxc_dialog .form-control[disabled], fieldset[disabled] #jsxc_dialog .form-control {
+ cursor: false; }
+ #jsxc_dialog textarea.form-control {
+ height: auto; }
+ #jsxc_dialog input[type="search"] {
+ -webkit-appearance: none; }
+ @media screen and (-webkit-min-device-pixel-ratio: 0) {
+ #jsxc_dialog input[type="date"], #jsxc_dialog input[type="time"], #jsxc_dialog input[type="datetime-local"], #jsxc_dialog input[type="month"] {
+ line-height: 34px; }
+ #jsxc_dialog input[type="date"].input-sm, .input-group-sm #jsxc_dialog input[type="date"], #jsxc_dialog input[type="time"].input-sm, .input-group-sm #jsxc_dialog input[type="time"], #jsxc_dialog input[type="datetime-local"].input-sm, .input-group-sm #jsxc_dialog input[type="datetime-local"], #jsxc_dialog input[type="month"].input-sm, .input-group-sm #jsxc_dialog input[type="month"] {
+ line-height: 30px; }
+ #jsxc_dialog input[type="date"].input-lg, .input-group-lg #jsxc_dialog input[type="date"], #jsxc_dialog input[type="time"].input-lg, .input-group-lg #jsxc_dialog input[type="time"], #jsxc_dialog input[type="datetime-local"].input-lg, .input-group-lg #jsxc_dialog input[type="datetime-local"], #jsxc_dialog input[type="month"].input-lg, .input-group-lg #jsxc_dialog input[type="month"] {
+ line-height: 46px; } }
+ #jsxc_dialog .form-group {
+ margin-bottom: 15px; }
+ #jsxc_dialog .radio, #jsxc_dialog .checkbox {
+ position: relative;
+ display: block;
+ margin-top: 10px;
+ margin-bottom: 10px; }
+ #jsxc_dialog .radio label, #jsxc_dialog .checkbox label {
+ min-height: 20px;
+ padding-left: 20px;
+ margin-bottom: 0;
+ font-weight: normal;
+ cursor: pointer; }
+ #jsxc_dialog .radio input[type="radio"], #jsxc_dialog .radio-inline input[type="radio"], #jsxc_dialog .checkbox input[type="checkbox"], #jsxc_dialog .checkbox-inline input[type="checkbox"] {
+ position: absolute;
+ margin-left: -20px;
+ margin-top: 4px \9; }
+ #jsxc_dialog .radio + .radio, #jsxc_dialog .checkbox + .checkbox {
+ margin-top: -5px; }
+ #jsxc_dialog .radio-inline, #jsxc_dialog .checkbox-inline {
+ position: relative;
+ display: inline-block;
+ padding-left: 20px;
+ margin-bottom: 0;
+ vertical-align: middle;
+ font-weight: normal;
+ cursor: pointer; }
+ #jsxc_dialog .radio-inline + .radio-inline, #jsxc_dialog .checkbox-inline + .checkbox-inline {
+ margin-top: 0;
+ margin-left: 10px; }
+ #jsxc_dialog input[type="radio"][disabled], #jsxc_dialog input[type="radio"].disabled, fieldset[disabled] #jsxc_dialog input[type="radio"], #jsxc_dialog input[type="checkbox"][disabled], #jsxc_dialog input[type="checkbox"].disabled, fieldset[disabled] #jsxc_dialog input[type="checkbox"] {
+ cursor: false; }
+ #jsxc_dialog .radio-inline.disabled, fieldset[disabled] #jsxc_dialog .radio-inline, #jsxc_dialog .checkbox-inline.disabled, fieldset[disabled] #jsxc_dialog .checkbox-inline {
+ cursor: false; }
+ #jsxc_dialog .radio.disabled label, fieldset[disabled] #jsxc_dialog .radio label, #jsxc_dialog .checkbox.disabled label, fieldset[disabled] #jsxc_dialog .checkbox label {
+ cursor: false; }
+ #jsxc_dialog .form-control-static {
+ padding-top: 7px;
+ padding-bottom: 7px;
+ margin-bottom: 0;
+ min-height: 34px; }
+ #jsxc_dialog .form-control-static.input-lg, #jsxc_dialog .form-control-static.input-sm {
+ padding-left: 0;
+ padding-right: 0; }
+ #jsxc_dialog .input-sm {
+ height: 30px;
+ padding: 5px 10px;
+ font-size: 12px;
+ line-height: 1.5;
+ border-radius: 3px; }
+ #jsxc_dialog select.input-sm {
+ height: 30px;
+ line-height: 30px; }
+ #jsxc_dialog textarea.input-sm, #jsxc_dialog select[multiple].input-sm {
+ height: auto; }
+ #jsxc_dialog .form-group-sm .form-control {
+ height: 30px;
+ padding: 5px 10px;
+ font-size: 12px;
+ line-height: 1.5;
+ border-radius: 3px; }
+ #jsxc_dialog .form-group-sm select.form-control {
+ height: 30px;
+ line-height: 30px; }
+ #jsxc_dialog .form-group-sm textarea.form-control, #jsxc_dialog .form-group-sm select[multiple].form-control {
+ height: auto; }
+ #jsxc_dialog .form-group-sm .form-control-static {
+ height: 30px;
+ padding: 5px 10px;
+ font-size: 12px;
+ line-height: 1.5;
+ min-height: 32px; }
+ #jsxc_dialog .input-lg {
+ height: 46px;
+ padding: 10px 16px;
+ font-size: 18px;
+ line-height: 1.3333333;
+ border-radius: 6px; }
+ #jsxc_dialog select.input-lg {
+ height: 46px;
+ line-height: 46px; }
+ #jsxc_dialog textarea.input-lg, #jsxc_dialog select[multiple].input-lg {
+ height: auto; }
+ #jsxc_dialog .form-group-lg .form-control {
+ height: 46px;
+ padding: 10px 16px;
+ font-size: 18px;
+ line-height: 1.3333333;
+ border-radius: 6px; }
+ #jsxc_dialog .form-group-lg select.form-control {
+ height: 46px;
+ line-height: 46px; }
+ #jsxc_dialog .form-group-lg textarea.form-control, #jsxc_dialog .form-group-lg select[multiple].form-control {
+ height: auto; }
+ #jsxc_dialog .form-group-lg .form-control-static {
+ height: 46px;
+ padding: 10px 16px;
+ font-size: 18px;
+ line-height: 1.3333333;
+ min-height: 38px; }
+ #jsxc_dialog .has-feedback {
+ position: relative; }
+ #jsxc_dialog .has-feedback .form-control {
+ padding-right: 42.5px; }
+ #jsxc_dialog .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; }
+ #jsxc_dialog .input-lg + .form-control-feedback {
+ width: 46px;
+ height: 46px;
+ line-height: 46px; }
+ #jsxc_dialog .input-sm + .form-control-feedback {
+ width: 30px;
+ height: 30px;
+ line-height: 30px; }
+ #jsxc_dialog .has-success .help-block, #jsxc_dialog .has-success .control-label, #jsxc_dialog .has-success .radio, #jsxc_dialog .has-success .checkbox, #jsxc_dialog .has-success .radio-inline, #jsxc_dialog .has-success .checkbox-inline, #jsxc_dialog .has-success.radio label, #jsxc_dialog .has-success.checkbox label, #jsxc_dialog .has-success.radio-inline label, #jsxc_dialog .has-success.checkbox-inline label {
+ color: #3c763d; }
+ #jsxc_dialog .has-success .form-control {
+ border-color: #3c763d;
+ box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075); }
+ #jsxc_dialog .has-success .form-control:focus {
+ border-color: #2b542c;
+ box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 6px #67b168; }
+ #jsxc_dialog .has-success .input-group-addon {
+ color: #3c763d;
+ border-color: #3c763d;
+ background-color: #dff0d8; }
+ #jsxc_dialog .has-success .form-control-feedback {
+ color: #3c763d; }
+ #jsxc_dialog .has-warning .help-block, #jsxc_dialog .has-warning .control-label, #jsxc_dialog .has-warning .radio, #jsxc_dialog .has-warning .checkbox, #jsxc_dialog .has-warning .radio-inline, #jsxc_dialog .has-warning .checkbox-inline, #jsxc_dialog .has-warning.radio label, #jsxc_dialog .has-warning.checkbox label, #jsxc_dialog .has-warning.radio-inline label, #jsxc_dialog .has-warning.checkbox-inline label {
+ color: #8a6d3b; }
+ #jsxc_dialog .has-warning .form-control {
+ border-color: #8a6d3b;
+ box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075); }
+ #jsxc_dialog .has-warning .form-control:focus {
+ border-color: #66512c;
+ box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 6px #c0a16b; }
+ #jsxc_dialog .has-warning .input-group-addon {
+ color: #8a6d3b;
+ border-color: #8a6d3b;
+ background-color: #fcf8e3; }
+ #jsxc_dialog .has-warning .form-control-feedback {
+ color: #8a6d3b; }
+ #jsxc_dialog .has-error .help-block, #jsxc_dialog .has-error .control-label, #jsxc_dialog .has-error .radio, #jsxc_dialog .has-error .checkbox, #jsxc_dialog .has-error .radio-inline, #jsxc_dialog .has-error .checkbox-inline, #jsxc_dialog .has-error.radio label, #jsxc_dialog .has-error.checkbox label, #jsxc_dialog .has-error.radio-inline label, #jsxc_dialog .has-error.checkbox-inline label {
+ color: #a94442; }
+ #jsxc_dialog .has-error .form-control {
+ border-color: #a94442;
+ box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075); }
+ #jsxc_dialog .has-error .form-control:focus {
+ border-color: #843534;
+ box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 6px #ce8483; }
+ #jsxc_dialog .has-error .input-group-addon {
+ color: #a94442;
+ border-color: #a94442;
+ background-color: #f2dede; }
+ #jsxc_dialog .has-error .form-control-feedback {
+ color: #a94442; }
+ #jsxc_dialog .has-feedback label ~ .form-control-feedback {
+ top: 25px; }
+ #jsxc_dialog .has-feedback label.sr-only ~ .form-control-feedback {
+ top: 0; }
+ #jsxc_dialog .help-block {
+ display: block;
+ margin-top: 5px;
+ margin-bottom: 10px;
+ color: #737373; }
+ @media (min-width: 768px) {
+ #jsxc_dialog .form-inline .form-group {
+ display: inline-block;
+ margin-bottom: 0;
+ vertical-align: middle; }
+ #jsxc_dialog .form-inline .form-control {
+ display: inline-block;
+ width: auto;
+ vertical-align: middle; }
+ #jsxc_dialog .form-inline .form-control-static {
+ display: inline-block; }
+ #jsxc_dialog .form-inline .input-group {
+ display: inline-table;
+ vertical-align: middle; }
+ #jsxc_dialog .form-inline .input-group .input-group-addon, #jsxc_dialog .form-inline .input-group .input-group-btn, #jsxc_dialog .form-inline .input-group .form-control {
+ width: auto; }
+ #jsxc_dialog .form-inline .input-group > .form-control {
+ width: 100%; }
+ #jsxc_dialog .form-inline .control-label {
+ margin-bottom: 0;
+ vertical-align: middle; }
+ #jsxc_dialog .form-inline .radio, #jsxc_dialog .form-inline .checkbox {
+ display: inline-block;
+ margin-top: 0;
+ margin-bottom: 0;
+ vertical-align: middle; }
+ #jsxc_dialog .form-inline .radio label, #jsxc_dialog .form-inline .checkbox label {
+ padding-left: 0; }
+ #jsxc_dialog .form-inline .radio input[type="radio"], #jsxc_dialog .form-inline .checkbox input[type="checkbox"] {
+ position: relative;
+ margin-left: 0; }
+ #jsxc_dialog .form-inline .has-feedback .form-control-feedback {
+ top: 0; } }
+ #jsxc_dialog .form-horizontal .radio, #jsxc_dialog .form-horizontal .checkbox, #jsxc_dialog .form-horizontal .radio-inline, #jsxc_dialog .form-horizontal .checkbox-inline {
+ margin-top: 0;
+ margin-bottom: 0;
+ padding-top: 7px; }
+ #jsxc_dialog .form-horizontal .radio, #jsxc_dialog .form-horizontal .checkbox {
+ min-height: 27px; }
+ #jsxc_dialog .form-horizontal .form-group {
+ margin-left: -15px;
+ margin-right: -15px; }
+ #jsxc_dialog .form-horizontal .form-group:before, #jsxc_dialog .form-horizontal .form-group:after {
+ content: " ";
+ display: table; }
+ #jsxc_dialog .form-horizontal .form-group:after {
+ clear: both; }
+ @media (min-width: 768px) {
+ #jsxc_dialog .form-horizontal .control-label {
+ text-align: right;
+ margin-bottom: 0;
+ padding-top: 7px; } }
+ #jsxc_dialog .form-horizontal .has-feedback .form-control-feedback {
+ right: 15px; }
+ @media (min-width: 768px) {
+ #jsxc_dialog .form-horizontal .form-group-lg .control-label {
+ padding-top: 14.333333px; } }
+ @media (min-width: 768px) {
+ #jsxc_dialog .form-horizontal .form-group-sm .control-label {
+ padding-top: 6px; } }
+ #jsxc_dialog .progress {
+ overflow: hidden;
+ height: 20px;
+ margin-bottom: 20px;
+ background-color: #f5f5f5;
+ border-radius: 4px;
+ box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.1); }
+ #jsxc_dialog .progress-bar {
+ float: left;
+ width: 0%;
+ height: 100%;
+ font-size: 12px;
+ line-height: 20px;
+ color: #fff;
+ text-align: center;
+ background-color: #337ab7;
+ box-shadow: inset 0 -1px 0 rgba(0, 0, 0, 0.15);
+ -webkit-transition: width .6s ease;
+ transition: width .6s ease; }
+ #jsxc_dialog .progress-striped .progress-bar, #jsxc_dialog .progress-bar-striped {
+ background-image: -webkit-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);
+ background-image: linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);
+ background-size: 40px 40px; }
+ #jsxc_dialog .progress.active .progress-bar, #jsxc_dialog .progress-bar.active {
+ -webkit-animation: progress-bar-stripes 2s linear infinite;
+ animation: progress-bar-stripes 2s linear infinite; }
+ #jsxc_dialog .progress-bar-success {
+ background-color: #5cb85c; }
+ .progress-striped #jsxc_dialog .progress-bar-success {
+ background-image: -webkit-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);
+ background-image: linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent); }
+ #jsxc_dialog .progress-bar-info {
+ background-color: #5bc0de; }
+ .progress-striped #jsxc_dialog .progress-bar-info {
+ background-image: -webkit-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);
+ background-image: linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent); }
+ #jsxc_dialog .progress-bar-warning {
+ background-color: #f0ad4e; }
+ .progress-striped #jsxc_dialog .progress-bar-warning {
+ background-image: -webkit-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);
+ background-image: linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent); }
+ #jsxc_dialog .progress-bar-danger {
+ background-color: #d9534f; }
+ .progress-striped #jsxc_dialog .progress-bar-danger {
+ background-image: -webkit-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);
+ background-image: linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent); }
+ #jsxc_dialog .progress {
+ margin-bottom: 0px; }
+
+.mfp-bg {
+ z-index: 9000; }
+
+.mfp-wrap {
+ z-index: 9010; }
+
+.mfp-content {
+ text-align: center; }
+
+#jsxc_dialog .mfp-close {
+ font-size: 23px; }
+
+/* END: bootstrap */
#jsxc_buddylist li:hover .jsxc_avatar, .jsxc_avatar {
width: 25px;
height: 25px;
@@ -89,25 +1927,24 @@ div.jsxc_transfer, div.jsxc_transfer.jsxc_disabled:hover {
#jsxc_buddylist li.jsxc_expand .jsxc_avatar img {
width: 48px;
height: 48px; }
- #jsxc_buddylist li .jsxc_name:before {
- content: ' ';
- width: 0;
- height: 0;
- display: inline-block;
- opacity: 0.0;
- -webkit-transition: width 0.5s, opacity 0.5s;
- transition: width 0.5s, opacity 0.5s; }
- #jsxc_buddylist li.jsxc_unreadMsg .jsxc_name:before {
- width: 12px;
- height: 12px;
- border-radius: 6px;
- background-color: #ffa500;
- margin-right: 3px;
- opacity: 1.0;
- -webkit-transition: width 0.5s, opacity 0.5s;
- transition: width 0.5s, opacity 0.5s; }
+ #jsxc_buddylist li.jsxc_bookmarked .jsxc_avatar:after {
+ content: " ";
+ width: 20%;
+ height: 30%;
+ position: absolute;
+ top: 0;
+ right: 2px;
+ background-size: contain;
+ background-repeat: no-repeat;
+ background-image: url("../js/jsxc/img/bookmark_red.svg"); }
+ #jsxc_buddylist li.jsxc_bookmarked .jsxc_bookmarkOptions {
+ text-indent: 9999px;
+ background-image: url("../js/jsxc/img/gear_white.svg");
+ background-size: 15px 15px; }
#jsxc_buddylist .jsxc_name {
padding-right: 30px; }
+ #jsxc_buddylist .jsxc_unreadMsg .jsxc_name {
+ padding-right: 0px; }
#jsxc_buddylist .jsxc_oneway {
opacity: 0.7; }
#jsxc_buddylist .jsxc_right {
@@ -121,6 +1958,9 @@ div.jsxc_transfer, div.jsxc_transfer.jsxc_disabled:hover {
color: #fff; }
#jsxc_buddylist .jsxc_right div:hover {
opacity: 1.0; }
+ #jsxc_buddylist .jsxc_unread {
+ margin-right: 30px;
+ margin-top: 6px; }
#jsxc_buddylist .jsxc_control {
position: absolute;
width: 30px;
@@ -294,7 +2134,7 @@ div.jsxc_transfer, div.jsxc_transfer.jsxc_disabled:hover {
border-left: 4px solid #999999;
z-index: 80;
margin-left: 10px;
- box-shadow: 0px 0px 7px #000;
+ box-shadow: 0px 0px 7px inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 6px #ce8483;
background-color: #333333; }
#jsxc_roster a {
cursor: pointer; }
@@ -349,6 +2189,10 @@ div.jsxc_transfer, div.jsxc_transfer.jsxc_disabled:hover {
display: none; }
#jsxc_roster.jsxc_noConnection > .jsxc_bottom {
display: none; }
+ #jsxc_roster.jsxc_state_hidden #jsxc_toggleRoster:before {
+ -webkit-transform: rotate(0deg);
+ -ms-transform: rotate(0deg);
+ transform: rotate(0deg); }
#jsxc_toggleRoster {
width: 14px;
@@ -361,6 +2205,19 @@ div.jsxc_transfer, div.jsxc_transfer.jsxc_disabled:hover {
cursor: pointer; }
#jsxc_toggleRoster:hover {
background-color: rgba(153, 153, 153, 0.5); }
+ #jsxc_toggleRoster:before {
+ content: '';
+ position: absolute;
+ display: block;
+ width: 0;
+ top: 50%;
+ right: 0px;
+ border-style: solid;
+ border-width: 6px 4px 6px 0;
+ border-color: transparent #333333;
+ -webkit-transform: rotate(180deg);
+ -ms-transform: rotate(180deg);
+ transform: rotate(180deg); }
#jsxc_roster > .jsxc_bottom {
position: absolute;
@@ -509,9 +2366,16 @@ li[data-type="groupchat"] .jsxc_video {
max-width: 500px; }
#jsxc_dialog {
- padding: 10px;
- min-width: 300px;
- display: inline-block; }
+ padding: 20px;
+ min-width: 320px;
+ display: inline-block;
+ text-align: left;
+ position: relative;
+ background: #FFF;
+ width: auto;
+ border-radius: 5px; }
+ #jsxc_dialog * {
+ box-sizing: border-box; }
#jsxc_dialog ul {
list-style: none;
margin: 0;
@@ -527,11 +2391,11 @@ li[data-type="groupchat"] .jsxc_video {
outline: none; }
#jsxc_dialog p input[type="submit"] {
width: auto; }
- #jsxc_dialog p label {
- display: block;
- width: 30%;
- float: left;
- padding: 6px 0; }
+ #jsxc_dialog hr {
+ border: 0;
+ border-top: 1px solid #eee;
+ margin-top: 20px;
+ margin-bottom: 20px; }
#jsxc_dialog h3 {
font-size: 120%;
font-weight: bold;
@@ -539,25 +2403,23 @@ li[data-type="groupchat"] .jsxc_video {
margin-top: 20px; }
#jsxc_dialog .jsxc_right {
margin-top: 20px; }
+ #jsxc_dialog form fieldset {
+ margin-bottom: 30px; }
#jsxc_dialog fieldset {
- border: 2px solid #cccccc; }
+ border-bottom: 1px solid #eee; }
#jsxc_dialog legend {
- padding: 0 10px;
- font-weight: bold; }
+ border: 0;
+ font-size: 20px; }
#jsxc_dialog input {
outline: none; }
#jsxc_dialog input:invalid {
border: 1px solid #f00; }
- #jsxc_dialog .jsxc_fieldset {
- width: 280px;
- padding: 10px;
- border-radius: 3px; }
- #jsxc_dialog .jsxc_fieldset label {
- display: inline-block;
- width: 100px; }
- #jsxc_dialog .jsxc_fieldset input[type="Number"] {
- display: inline-block;
- width: 50px; }
+ #jsxc_dialog .btn-group button {
+ margin-right: 0; }
+ #jsxc_dialog input[type="range"] {
+ display: inline;
+ height: 34px;
+ vertical-align: bottom; }
#jsxc_dialog input[readonly] {
background-color: #e6e6e6; }
#jsxc_dialog .jsxc_inputinfo {
@@ -615,6 +2477,23 @@ ul.jsxc_vCard {
.jsxc_spot.jsxc_offline {
background-color: #999999; }
+.jsxc_unread {
+ display: none; }
+
+.jsxc_unreadMsg .jsxc_name {
+ font-style: italic; }
+.jsxc_unreadMsg .jsxc_unread {
+ display: block;
+ background-color: #ffa500;
+ border-radius: 11px;
+ color: #000;
+ font-size: 80%;
+ padding: 2px;
+ line-height: 15px;
+ float: right;
+ margin-right: 3px;
+ margin-top: 4px; }
+
#jsxc_menu {
height: 30px;
width: 30px;
@@ -656,33 +2535,28 @@ ul.jsxc_vCard {
background-repeat: no-repeat;
background-position: center center; }
-@-webkit-keyframes bounce {
- 0% {
+@-webkit-keyframes bounce{
+ 0%{
bottom: 0;
-webkit-animation-timing-function: ease-in;
animation-timing-function: ease-in; }
-
- 12% {
+ 12%{
bottom: 5px;
-webkit-animation-timing-function: ease-out;
animation-timing-function: ease-out; }
-
- 25% {
+ 25%{
bottom: 0;
-webkit-animation-timing-function: ease-in;
animation-timing-function: ease-in; }
-
- 37% {
+ 37%{
bottom: 5px;
-webkit-animation-timing-function: ease-out;
animation-timing-function: ease-out; }
-
- 50% {
+ 50%{
bottom: 0;
-webkit-animation-timing-function: ease-in;
animation-timing-function: ease-in; }
-
- 100% {
+ 100%{
bottom: 0; } }
@keyframes bounce {
@@ -751,10 +2625,6 @@ ul.jsxc_vCard {
white-space: normal; }
#jsxc_windowList > ul > li.jsxc_min {
width: 200px !important; }
- #jsxc_windowList > ul > li.jsxc_unreadMsg .jsxc_name {
- font-style: italic; }
- #jsxc_windowList > ul > li.jsxc_unreadMsg .jsxc_cycle {
- background-color: #ffa500; }
#jsxc_windowListSB {
position: fixed;
@@ -795,14 +2665,6 @@ ul.jsxc_vCard {
box-sizing: border-box;
overflow: hidden; }
-.jsxc_cycle {
- position: absolute;
- bottom: 9px;
- right: 5px;
- height: 12px;
- width: 12px;
- border-radius: 6px; }
-
.jsxc_window {
position: absolute;
bottom: 0;
@@ -897,15 +2759,15 @@ ul.jsxc_vCard {
border-radius: 0;
box-sizing: border-box;
text-align: right; }
- .jsxc_window input::-webkit-input-placeholder {
- color: #000;
- opacity: 0.3; }
- .jsxc_window input::-moz-placeholder {
- color: #000;
- opacity: 0.3; }
- .jsxc_window input:-ms-input-placeholder {
- color: #000;
- opacity: 0.3; }
+ .jsxc_window input::-webkit-input-placeholder{
+ color: #000;
+ opacity: 0.3; }
+ .jsxc_window input::-moz-placeholder{
+ color: #000;
+ opacity: 0.3; }
+ .jsxc_window input:-ms-input-placeholder{
+ color: #000;
+ opacity: 0.3; }
.jsxc_window input::placeholder {
color: #000;
opacity: 0.3; }
@@ -1049,7 +2911,7 @@ div.jsxc_settings {
position: absolute;
top: 30px;
left: 0;
- box-shadow: 0 5px 5px -5px #000;
+ box-shadow: 0 5px 5px -5px inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 6px #ce8483;
z-index: 110;
overflow: visible;
background-color: #1a1a1a;
@@ -1258,15 +3120,15 @@ div:full-screen {
background-color: #000; }
div:full-screen.jsxc_localvideo {
border: 1px solid #fff; }
-div:-webkit-full-screen {
+div:-webkit-full-screen{
width: 100%;
height: 100%;
background-color: #000; }
-div:-moz-full-screen {
+div:-moz-full-screen{
width: 100%;
height: 100%;
background-color: #000; }
-div:-ms-fullscreen {
+div:-ms-fullscreen{
width: 100%;
height: 100%;
background-color: #000; }
@@ -1274,12 +3136,12 @@ div:fullscreen {
width: 100%;
height: 100%;
background-color: #000; }
- div:-webkit-full-screen.jsxc_localvideo {
- border: 1px solid #fff; }
- div:-moz-full-screen.jsxc_localvideo {
- border: 1px solid #fff; }
- div:-ms-fullscreen.jsxc_localvideo {
- border: 1px solid #fff; }
+ div:-webkit-full-screen.jsxc_localvideo{
+ border: 1px solid #fff; }
+ div:-moz-full-screen.jsxc_localvideo{
+ border: 1px solid #fff; }
+ div:-ms-fullscreen.jsxc_localvideo{
+ border: 1px solid #fff; }
div:fullscreen.jsxc_localvideo {
border: 1px solid #fff; }
div.jsxc_video {
@@ -1291,7 +3153,8 @@ div.jsxc_video {
background-image: url("../js/jsxc/img/camera_icon_white.svg"); }
.jsxc_controlbar {
- width: 640px; }
+ width: 640px;
+ margin-top: 10px; }
.jsxc_controlbar .jsxc_showchat {
float: right; }
@@ -1367,15 +3230,14 @@ div.jsxc_video {
-webkit-animation-delay: 0.78s;
animation-delay: 0.78s; }
-@-webkit-keyframes bubblingG {
- 0% {
+@-webkit-keyframes bubblingG{
+ 0%{
width: 16px;
height: 16px;
background-color: #000;
-webkit-transform: translateY(0);
transform: translateY(0); }
-
- 100% {
+ 100%{
width: 39px;
height: 39px;
background-color: #fff;
diff --git a/build/js/admin.js b/build/js/admin.js
index 5cd7dd2..4fca1a4 100644
--- a/build/js/admin.js
+++ b/build/js/admin.js
@@ -1,5 +1,5 @@
/*!
- * ojsxc v2.0.1 - 2015-05-23
+ * ojsxc v2.1.0-beta1 - 2015-07-21
*
* Copyright (c) 2015 Klaus Herberth <klaus@jsxc.org> <br>
* Released under the MIT license
@@ -7,7 +7,7 @@
* Please see http://www.jsxc.org/
*
* @author Klaus Herberth <klaus@jsxc.org>
- * @version 2.0.1
+ * @version 2.1.0-beta1
* @license MIT
*/
diff --git a/build/js/eof.js b/build/js/eof.js
index 340a676..0cf024e 100644
--- a/build/js/eof.js
+++ b/build/js/eof.js
@@ -1,5 +1,5 @@
/*!
- * ojsxc v2.0.1 - 2015-05-23
+ * ojsxc v2.1.0-beta1 - 2015-07-21
*
* Copyright (c) 2015 Klaus Herberth <klaus@jsxc.org> <br>
* Released under the MIT license
@@ -7,7 +7,7 @@
* Please see http://www.jsxc.org/
*
* @author Klaus Herberth <klaus@jsxc.org>
- * @version 2.0.1
+ * @version 2.1.0-beta1
* @license MIT
*/
diff --git a/build/js/jsxc/css/jsxc.css b/build/js/jsxc/css/jsxc.css
index f1cb5c1..6440c02 100644
--- a/build/js/jsxc/css/jsxc.css
+++ b/build/js/jsxc/css/jsxc.css
@@ -1,3 +1,2015 @@
+/* basic scrollbar styling */
+/* vertical scrollbar */
+.mCSB_container {
+ width: auto;
+ margin-right: 30px;
+ overflow: hidden; }
+
+.mCSB_container.mCS_no_scrollbar {
+ margin-right: 0; }
+
+.mCS_disabled .mCSB_container.mCS_no_scrollbar, .mCS_destroyed .mCSB_container.mCS_no_scrollbar {
+ margin-right: 30px; }
+
+.mCustomScrollBox .mCSB_scrollTools {
+ width: 16px;
+ height: 100%;
+ top: 0;
+ right: 0; }
+
+.mCSB_scrollTools .mCSB_draggerContainer {
+ height: 100%;
+ box-sizing: border-box; }
+
+.mCSB_scrollTools .mCSB_buttonUp + .mCSB_draggerContainer {
+ padding-bottom: 40px; }
+
+.mCSB_scrollTools .mCSB_draggerRail {
+ width: 2px;
+ height: 100%;
+ margin: 0 auto;
+ border-radius: 10px; }
+
+.mCSB_scrollTools .mCSB_dragger {
+ cursor: pointer;
+ width: 100%;
+ height: 30px; }
+
+.mCSB_scrollTools .mCSB_dragger .mCSB_dragger_bar {
+ width: 4px;
+ height: 100%;
+ margin: 0 auto;
+ border-radius: 10px;
+ text-align: center; }
+
+.mCSB_scrollTools .mCSB_buttonUp, .mCSB_scrollTools .mCSB_buttonDown {
+ height: 20px;
+ overflow: hidden;
+ margin: 0 auto;
+ cursor: pointer; }
+
+.mCSB_scrollTools .mCSB_buttonDown {
+ bottom: 0;
+ margin-top: -40px; }
+
+/* horizontal scrollbar */
+.mCSB_horizontal .mCSB_container {
+ height: auto;
+ margin-right: 0;
+ margin-bottom: 30px;
+ overflow: hidden; }
+
+.mCSB_horizontal .mCSB_container.mCS_no_scrollbar {
+ margin-bottom: 0; }
+
+.mCS_disabled .mCSB_horizontal .mCSB_container.mCS_no_scrollbar, .mCS_destroyed .mCSB_horizontal .mCSB_container.mCS_no_scrollbar {
+ margin-right: 0;
+ margin-bottom: 30px; }
+
+.mCSB_horizontal.mCustomScrollBox .mCSB_scrollTools {
+ width: 100%;
+ height: 16px;
+ top: auto;
+ right: auto;
+ bottom: 0;
+ left: 0;
+ overflow: hidden; }
+
+.mCSB_horizontal .mCSB_scrollTools .mCSB_draggerContainer {
+ height: 100%;
+ width: auto;
+ box-sizing: border-box;
+ overflow: hidden; }
+
+.mCSB_horizontal .mCSB_scrollTools .mCSB_buttonLeft + .mCSB_draggerContainer {
+ padding-bottom: 0;
+ padding-right: 20px; }
+
+.mCSB_horizontal .mCSB_scrollTools .mCSB_draggerRail {
+ width: 100%;
+ height: 2px;
+ margin: 7px 0;
+ border-radius: 10px; }
+
+.mCSB_horizontal .mCSB_scrollTools .mCSB_dragger {
+ width: 30px;
+ height: 100%; }
+
+.mCSB_horizontal .mCSB_scrollTools .mCSB_dragger .mCSB_dragger_bar {
+ width: 100%;
+ height: 4px;
+ margin: 6px auto;
+ border-radius: 10px; }
+
+.mCSB_horizontal .mCSB_scrollTools .mCSB_buttonLeft, .mCSB_horizontal .mCSB_scrollTools .mCSB_buttonRight {
+ width: 20px;
+ height: 100%;
+ overflow: hidden;
+ margin: 0 auto;
+ cursor: pointer;
+ float: left; }
+
+.mCSB_horizontal .mCSB_scrollTools .mCSB_buttonRight {
+ right: 0;
+ bottom: auto;
+ margin-left: -40px;
+ margin-top: -16px;
+ float: right; }
+
+/* default scrollbar colors and backgrounds */
+.mCustomScrollBox .mCSB_scrollTools {
+ opacity: 0.75; }
+
+.mCustomScrollBox:hover .mCSB_scrollTools {
+ opacity: 1; }
+
+.mCSB_scrollTools .mCSB_draggerRail {
+ background: #000;
+ /* rgba fallback */
+ background: rgba(0, 0, 0, 0.4);
+ filter: "alpha(opacity=40)";
+ -ms-filter: "alpha(opacity=40)";
+ /* old ie */ }
+
+.mCSB_scrollTools .mCSB_dragger .mCSB_dragger_bar {
+ background: #fff;
+ /* rgba fallback */
+ background: rgba(255, 255, 255, 0.75);
+ filter: "alpha(opacity=75)";
+ -ms-filter: "alpha(opacity=75)";
+ /* old ie */ }
+
+.mCSB_scrollTools .mCSB_dragger:hover .mCSB_dragger_bar {
+ background: rgba(255, 255, 255, 0.85);
+ filter: "alpha(opacity=85)";
+ -ms-filter: "alpha(opacity=85)";
+ /* old ie */ }
+
+.mCSB_scrollTools .mCSB_dragger:active .mCSB_dragger_bar, .mCSB_scrollTools .mCSB_dragger.mCSB_dragger_onDrag .mCSB_dragger_bar {
+ background: rgba(255, 255, 255, 0.9);
+ filter: "alpha(opacity=90)";
+ -ms-filter: "alpha(opacity=90)";
+ /* old ie */ }
+
+.mCSB_scrollTools .mCSB_buttonUp, .mCSB_scrollTools .mCSB_buttonDown, .mCSB_scrollTools .mCSB_buttonLeft, .mCSB_scrollTools .mCSB_buttonRight {
+ background-image: url(mCSB_buttons.png);
+ background-repeat: no-repeat;
+ opacity: 0.4;
+ filter: "alpha(opacity=40)";
+ -ms-filter: "alpha(opacity=40)";
+ /* old ie */ }
+
+.mCSB_scrollTools .mCSB_buttonUp {
+ background-position: 0 0;
+ /*
+ sprites locations are 0 0/-16px 0/-32px 0/-48px 0 (light) and -80px 0/-96px 0/-112px 0/-128px 0 (dark)
+ */ }
+
+.mCSB_scrollTools .mCSB_buttonDown {
+ background-position: 0 -20px;
+ /*
+ sprites locations are 0 -20px/-16px -20px/-32px -20px/-48px -20px (light) and -80px -20px/-96px -20px/-112px -20px/-128px -20px (dark)
+ */ }
+
+.mCSB_scrollTools .mCSB_buttonLeft {
+ background-position: 0 -40px;
+ /*
+ sprites locations are 0 -40px/-20px -40px/-40px -40px/-60px -40px (light) and -80px -40px/-100px -40px/-120px -40px/-140px -40px (dark)
+ */ }
+
+.mCSB_scrollTools .mCSB_buttonRight {
+ background-position: 0 -56px;
+ /*
+ sprites locations are 0 -56px/-20px -56px/-40px -56px/-60px -56px (light) and -80px -56px/-100px -56px/-120px -56px/-140px -56px (dark)
+ */ }
+
+.mCSB_scrollTools .mCSB_buttonUp:hover, .mCSB_scrollTools .mCSB_buttonDown:hover, .mCSB_scrollTools .mCSB_buttonLeft:hover, .mCSB_scrollTools .mCSB_buttonRight:hover {
+ opacity: 0.75;
+ filter: "alpha(opacity=75)";
+ -ms-filter: "alpha(opacity=75)";
+ /* old ie */ }
+
+.mCSB_scrollTools .mCSB_buttonUp:active, .mCSB_scrollTools .mCSB_buttonDown:active, .mCSB_scrollTools .mCSB_buttonLeft:active, .mCSB_scrollTools .mCSB_buttonRight:active {
+ opacity: 0.9;
+ filter: "alpha(opacity=90)";
+ -ms-filter: "alpha(opacity=90)";
+ /* old ie */ }
+
+/* Magnific Popup CSS */
+.mfp-bg {
+ top: 0;
+ left: 0;
+ width: 100%;
+ height: 100%;
+ z-index: 1042;
+ overflow: hidden;
+ position: fixed;
+ background: #0b0b0b;
+ opacity: 0.8;
+ filter: alpha(opacity=80); }
+
+.mfp-wrap {
+ top: 0;
+ left: 0;
+ width: 100%;
+ height: 100%;
+ z-index: 1043;
+ position: fixed;
+ outline: none !important;
+ -webkit-backface-visibility: hidden; }
+
+.mfp-container {
+ text-align: center;
+ position: absolute;
+ width: 100%;
+ height: 100%;
+ left: 0;
+ top: 0;
+ padding: 0 8px;
+ box-sizing: border-box; }
+
+.mfp-container:before {
+ content: '';
+ display: inline-block;
+ height: 100%;
+ vertical-align: middle; }
+
+.mfp-align-top .mfp-container:before {
+ display: none; }
+
+.mfp-content {
+ position: relative;
+ display: inline-block;
+ vertical-align: middle;
+ margin: 0 auto;
+ text-align: left;
+ z-index: 1045; }
+
+.mfp-inline-holder .mfp-content, .mfp-ajax-holder .mfp-content {
+ width: 100%;
+ cursor: auto; }
+
+.mfp-ajax-cur {
+ cursor: progress; }
+
+.mfp-zoom-out-cur, .mfp-zoom-out-cur .mfp-image-holder .mfp-close {
+ cursor: -webkit-zoom-out;
+ cursor: zoom-out; }
+
+.mfp-zoom {
+ cursor: pointer;
+ cursor: -webkit-zoom-in;
+ cursor: zoom-in; }
+
+.mfp-auto-cursor .mfp-content {
+ cursor: auto; }
+
+.mfp-close, .mfp-arrow, .mfp-preloader, .mfp-counter {
+ -webkit-user-select: none;
+ -moz-user-select: none;
+ -ms-user-select: none;
+ user-select: none; }
+
+.mfp-loading.mfp-figure {
+ display: none; }
+
+.mfp-hide {
+ display: none !important; }
+
+.mfp-preloader {
+ color: #CCC;
+ position: absolute;
+ top: 50%;
+ width: auto;
+ text-align: center;
+ margin-top: -0.8em;
+ left: 8px;
+ right: 8px;
+ z-index: 1044; }
+ .mfp-preloader a {
+ color: #CCC; }
+ .mfp-preloader a:hover {
+ color: #FFF; }
+
+.mfp-s-ready .mfp-preloader {
+ display: none; }
+
+.mfp-s-error .mfp-content {
+ display: none; }
+
+button.mfp-close, button.mfp-arrow {
+ overflow: visible;
+ cursor: pointer;
+ background: transparent;
+ border: 0;
+ -webkit-appearance: none;
+ display: block;
+ outline: none;
+ padding: 0;
+ z-index: 1046;
+ box-shadow: none; }
+button::-moz-focus-inner {
+ padding: 0;
+ border: 0; }
+
+.mfp-close {
+ width: 44px;
+ height: 44px;
+ line-height: 44px;
+ position: absolute;
+ right: 0;
+ top: 0;
+ text-decoration: none;
+ text-align: center;
+ opacity: 0.65;
+ filter: alpha(opacity=65);
+ padding: 0 0 18px 10px;
+ color: #FFF;
+ font-style: normal;
+ font-size: 28px;
+ font-family: Arial, Baskerville, monospace; }
+ .mfp-close:hover, .mfp-close:focus {
+ opacity: 1;
+ filter: alpha(opacity=100); }
+ .mfp-close:active {
+ top: 1px; }
+
+.mfp-close-btn-in .mfp-close {
+ color: #333; }
+
+.mfp-image-holder .mfp-close, .mfp-iframe-holder .mfp-close {
+ color: #FFF;
+ right: -6px;
+ text-align: right;
+ padding-right: 6px;
+ width: 100%; }
+
+.mfp-counter {
+ position: absolute;
+ top: 0;
+ right: 0;
+ color: #CCC;
+ font-size: 12px;
+ line-height: 18px;
+ white-space: nowrap; }
+
+.mfp-arrow {
+ position: absolute;
+ opacity: 0.65;
+ filter: alpha(opacity=65);
+ margin: 0;
+ top: 50%;
+ margin-top: -55px;
+ padding: 0;
+ width: 90px;
+ height: 110px;
+ -webkit-tap-highlight-color: rgba(0, 0, 0, 0); }
+ .mfp-arrow:active {
+ margin-top: -54px; }
+ .mfp-arrow:hover, .mfp-arrow:focus {
+ opacity: 1;
+ filter: alpha(opacity=100); }
+ .mfp-arrow:before, .mfp-arrow:after, .mfp-arrow .mfp-b, .mfp-arrow .mfp-a {
+ content: '';
+ display: block;
+ width: 0;
+ height: 0;
+ position: absolute;
+ left: 0;
+ top: 0;
+ margin-top: 35px;
+ margin-left: 35px;
+ border: medium inset transparent; }
+ .mfp-arrow:after, .mfp-arrow .mfp-a {
+ border-top-width: 13px;
+ border-bottom-width: 13px;
+ top: 8px; }
+ .mfp-arrow:before, .mfp-arrow .mfp-b {
+ border-top-width: 21px;
+ border-bottom-width: 21px;
+ opacity: 0.7; }
+
+.mfp-arrow-left {
+ left: 0; }
+ .mfp-arrow-left:after, .mfp-arrow-left .mfp-a {
+ border-right: 17px solid #FFF;
+ margin-left: 31px; }
+ .mfp-arrow-left:before, .mfp-arrow-left .mfp-b {
+ margin-left: 25px;
+ border-right: 27px solid #3F3F3F; }
+
+.mfp-arrow-right {
+ right: 0; }
+ .mfp-arrow-right:after, .mfp-arrow-right .mfp-a {
+ border-left: 17px solid #FFF;
+ margin-left: 39px; }
+ .mfp-arrow-right:before, .mfp-arrow-right .mfp-b {
+ border-left: 27px solid #3F3F3F; }
+
+.mfp-iframe-holder {
+ padding-top: 40px;
+ padding-bottom: 40px; }
+ .mfp-iframe-holder .mfp-content {
+ line-height: 0;
+ width: 100%;
+ max-width: 900px; }
+ .mfp-iframe-holder .mfp-close {
+ top: -40px; }
+
+.mfp-iframe-scaler {
+ width: 100%;
+ height: 0;
+ overflow: hidden;
+ padding-top: 56.25%; }
+ .mfp-iframe-scaler iframe {
+ position: absolute;
+ display: block;
+ top: 0;
+ left: 0;
+ width: 100%;
+ height: 100%;
+ box-shadow: 0 0 8px rgba(0, 0, 0, 0.6);
+ background: #000; }
+
+/* Main image in popup */
+img.mfp-img {
+ width: auto;
+ max-width: 100%;
+ height: auto;
+ display: block;
+ line-height: 0;
+ box-sizing: border-box;
+ padding: 40px 0 40px;
+ margin: 0 auto; }
+
+/* The shadow behind the image */
+.mfp-figure {
+ line-height: 0; }
+ .mfp-figure:after {
+ content: '';
+ position: absolute;
+ left: 0;
+ top: 40px;
+ bottom: 40px;
+ display: block;
+ right: 0;
+ width: auto;
+ height: auto;
+ z-index: -1;
+ box-shadow: 0 0 8px rgba(0, 0, 0, 0.6);
+ background: #444; }
+ .mfp-figure small {
+ color: #BDBDBD;
+ display: block;
+ font-size: 12px;
+ line-height: 14px; }
+ .mfp-figure figure {
+ margin: 0; }
+
+.mfp-bottom-bar {
+ margin-top: -36px;
+ position: absolute;
+ top: 100%;
+ left: 0;
+ width: 100%;
+ cursor: auto; }
+
+.mfp-title {
+ text-align: left;
+ line-height: 18px;
+ color: #F3F3F3;
+ word-wrap: break-word;
+ padding-right: 36px; }
+
+.mfp-image-holder .mfp-content {
+ max-width: 100%; }
+
+.mfp-gallery .mfp-image-holder .mfp-figure {
+ cursor: pointer; }
+
+@media screen and (max-width: 800px) and (orientation: landscape), screen and (max-height: 300px) {
+ /**
+ * Remove all paddings around the image on small screen
+ */
+ .mfp-img-mobile .mfp-image-holder {
+ padding-left: 0;
+ padding-right: 0; }
+ .mfp-img-mobile img.mfp-img {
+ padding: 0; }
+ .mfp-img-mobile .mfp-figure:after {
+ top: 0;
+ bottom: 0; }
+ .mfp-img-mobile .mfp-figure small {
+ display: inline;
+ margin-left: 5px; }
+ .mfp-img-mobile .mfp-bottom-bar {
+ background: rgba(0, 0, 0, 0.6);
+ bottom: 0;
+ margin: 0;
+ top: auto;
+ padding: 3px 5px;
+ position: fixed;
+ box-sizing: border-box; }
+ .mfp-img-mobile .mfp-bottom-bar:empty {
+ padding: 0; }
+ .mfp-img-mobile .mfp-counter {
+ right: 5px;
+ top: 3px; }
+ .mfp-img-mobile .mfp-close {
+ top: 0;
+ right: 0;
+ width: 35px;
+ height: 35px;
+ line-height: 35px;
+ background: rgba(0, 0, 0, 0.6);
+ position: fixed;
+ text-align: center;
+ padding: 0; }
+ }
+
+@media all and (max-width: 900px) {
+ .mfp-arrow {
+ -webkit-transform: scale(0.75);
+ -ms-transform: scale(0.75);
+ transform: scale(0.75); }
+
+ .mfp-arrow-left {
+ -webkit-transform-origin: 0;
+ -ms-transform-origin: 0;
+ transform-origin: 0; }
+
+ .mfp-arrow-right {
+ -webkit-transform-origin: 100%;
+ -ms-transform-origin: 100%;
+ transform-origin: 100%; }
+
+ .mfp-container {
+ padding-left: 6px;
+ padding-right: 6px; }
+ }
+
+.mfp-ie7 .mfp-img {
+ padding: 0; }
+.mfp-ie7 .mfp-bottom-bar {
+ width: 600px;
+ left: 50%;
+ margin-left: -300px;
+ margin-top: 5px;
+ padding-bottom: 5px; }
+.mfp-ie7 .mfp-container {
+ padding: 0; }
+.mfp-ie7 .mfp-content {
+ padding-top: 44px; }
+.mfp-ie7 .mfp-close {
+ top: 0;
+ right: 0;
+ padding-top: 0; }
+
+/* BEGIN: bootstrap */
+@-webkit-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; } }
+
+#jsxc_dialog {
+ @-webkit-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; } }
+ }
+ #jsxc_dialog .clearfix:before, #jsxc_dialog .clearfix:after {
+ content: " ";
+ display: table; }
+ #jsxc_dialog .clearfix:after {
+ clear: both; }
+ #jsxc_dialog .center-block {
+ display: block;
+ margin-left: auto;
+ margin-right: auto; }
+ #jsxc_dialog .pull-right {
+ float: right !important; }
+ #jsxc_dialog .pull-left {
+ float: left !important; }
+ #jsxc_dialog .hide {
+ display: none !important; }
+ #jsxc_dialog .show {
+ display: block !important; }
+ #jsxc_dialog .invisible {
+ visibility: hidden; }
+ #jsxc_dialog .text-hide {
+ font: 0/0 a;
+ color: transparent;
+ text-shadow: none;
+ background-color: transparent;
+ border: 0; }
+ #jsxc_dialog .hidden {
+ display: none !important; }
+ #jsxc_dialog .affix {
+ position: fixed; }
+ #jsxc_dialog code, #jsxc_dialog kbd, #jsxc_dialog pre, #jsxc_dialog samp {
+ font-family: Menlo, Monaco, Consolas, "Courier New", monospace; }
+ #jsxc_dialog code {
+ padding: 2px 4px;
+ font-size: 90%;
+ color: #c7254e;
+ background-color: #f9f2f4;
+ border-radius: 4px; }
+ #jsxc_dialog kbd {
+ padding: 2px 4px;
+ font-size: 90%;
+ color: #fff;
+ background-color: #333;
+ border-radius: 3px;
+ box-shadow: inset 0 -1px 0 rgba(0, 0, 0, 0.25); }
+ #jsxc_dialog kbd kbd {
+ padding: 0;
+ font-size: 100%;
+ font-weight: bold;
+ box-shadow: none; }
+ #jsxc_dialog pre {
+ display: block;
+ padding: 9.5px;
+ margin: 0 0 10px;
+ font-size: 13px;
+ line-height: 1.428571429;
+ word-break: break-all;
+ word-wrap: break-word;
+ color: #333333;
+ background-color: #f5f5f5;
+ border: 1px solid #ccc;
+ border-radius: 4px; }
+ #jsxc_dialog pre code {
+ padding: 0;
+ font-size: inherit;
+ color: inherit;
+ white-space: pre-wrap;
+ background-color: transparent;
+ border-radius: 0; }
+ #jsxc_dialog .pre-scrollable {
+ max-height: 340px;
+ overflow-y: scroll; }
+ #jsxc_dialog .container {
+ margin-right: auto;
+ margin-left: auto;
+ padding-left: 15px;
+ padding-right: 15px; }
+ #jsxc_dialog .container:before, #jsxc_dialog .container:after {
+ content: " ";
+ display: table; }
+ #jsxc_dialog .container:after {
+ clear: both; }
+ @media (min-width: 768px) {
+ #jsxc_dialog .container {
+ width: 750px; } }
+ @media (min-width: 992px) {
+ #jsxc_dialog .container {
+ width: 970px; } }
+ @media (min-width: 1200px) {
+ #jsxc_dialog .container {
+ width: 1170px; } }
+ #jsxc_dialog .container-fluid {
+ margin-right: auto;
+ margin-left: auto;
+ padding-left: 15px;
+ padding-right: 15px; }
+ #jsxc_dialog .container-fluid:before, #jsxc_dialog .container-fluid:after {
+ content: " ";
+ display: table; }
+ #jsxc_dialog .container-fluid:after {
+ clear: both; }
+ #jsxc_dialog .row {
+ margin-left: -15px;
+ margin-right: -15px; }
+ #jsxc_dialog .row:before, #jsxc_dialog .row:after {
+ content: " ";
+ display: table; }
+ #jsxc_dialog .row:after {
+ clear: both; }
+ #jsxc_dialog .col-xs-1, #jsxc_dialog .col-sm-1, #jsxc_dialog .col-md-1, #jsxc_dialog .col-lg-1, #jsxc_dialog .col-xs-2, #jsxc_dialog .col-sm-2, #jsxc_dialog .col-md-2, #jsxc_dialog .col-lg-2, #jsxc_dialog .col-xs-3, #jsxc_dialog .col-sm-3, #jsxc_dialog .col-md-3, #jsxc_dialog .col-lg-3, #jsxc_dialog .col-xs-4, #jsxc_dialog .col-sm-4, #jsxc_dialog .col-md-4, #jsxc_dialog .col-lg-4, #jsxc_dialog .col-xs-5, #jsxc_dialog .col-sm-5, #jsxc_dialog .col-md-5, #jsxc_dialog .col-lg-5, #jsxc_dialog .col-xs-6, #jsxc_dialog .col-sm-6, #jsxc_dialog .col-md-6, #jsxc_dialog .col-lg-6, #jsxc_dialog .col-xs-7, #jsxc_dialog .col-sm-7, #jsxc_dialog .col-md-7, #jsxc_dialog .col-lg-7, #jsxc_dialog .col-xs-8, #jsxc_dialog .col-sm-8, #jsxc_dialog .col-md-8, #jsxc_dialog .col-lg-8, #jsxc_dialog .col-xs-9, #jsxc_dialog .col-sm-9, #jsxc_dialog .col-md-9, #jsxc_dialog .col-lg-9, #jsxc_dialog .col-xs-10, #jsxc_dialog .col-sm-10, #jsxc_dialog .col-md-10, #jsxc_dialog .col-lg-10, #jsxc_dialog .col-xs-11, #jsxc_dialog .col-sm-11, #jsxc_dialog .col-md-11, #jsxc_dialog .col-lg-11, #jsxc_dialog .col-xs-12, #jsxc_dialog .col-sm-12, #jsxc_dialog .col-md-12, #jsxc_dialog .col-lg-12 {
+ position: relative;
+ min-height: 1px;
+ padding-left: 15px;
+ padding-right: 15px; }
+ #jsxc_dialog .col-xs-1, #jsxc_dialog .col-xs-2, #jsxc_dialog .col-xs-3, #jsxc_dialog .col-xs-4, #jsxc_dialog .col-xs-5, #jsxc_dialog .col-xs-6, #jsxc_dialog .col-xs-7, #jsxc_dialog .col-xs-8, #jsxc_dialog .col-xs-9, #jsxc_dialog .col-xs-10, #jsxc_dialog .col-xs-11, #jsxc_dialog .col-xs-12 {
+ float: left; }
+ #jsxc_dialog .col-xs-1 {
+ width: 8.3333333333%; }
+ #jsxc_dialog .col-xs-2 {
+ width: 16.6666666667%; }
+ #jsxc_dialog .col-xs-3 {
+ width: 25%; }
+ #jsxc_dialog .col-xs-4 {
+ width: 33.3333333333%; }
+ #jsxc_dialog .col-xs-5 {
+ width: 41.6666666667%; }
+ #jsxc_dialog .col-xs-6 {
+ width: 50%; }
+ #jsxc_dialog .col-xs-7 {
+ width: 58.3333333333%; }
+ #jsxc_dialog .col-xs-8 {
+ width: 66.6666666667%; }
+ #jsxc_dialog .col-xs-9 {
+ width: 75%; }
+ #jsxc_dialog .col-xs-10 {
+ width: 83.3333333333%; }
+ #jsxc_dialog .col-xs-11 {
+ width: 91.6666666667%; }
+ #jsxc_dialog .col-xs-12 {
+ width: 100%; }
+ #jsxc_dialog .col-xs-pull-0 {
+ right: auto; }
+ #jsxc_dialog .col-xs-pull-1 {
+ right: 8.3333333333%; }
+ #jsxc_dialog .col-xs-pull-2 {
+ right: 16.6666666667%; }
+ #jsxc_dialog .col-xs-pull-3 {
+ right: 25%; }
+ #jsxc_dialog .col-xs-pull-4 {
+ right: 33.3333333333%; }
+ #jsxc_dialog .col-xs-pull-5 {
+ right: 41.6666666667%; }
+ #jsxc_dialog .col-xs-pull-6 {
+ right: 50%; }
+ #jsxc_dialog .col-xs-pull-7 {
+ right: 58.3333333333%; }
+ #jsxc_dialog .col-xs-pull-8 {
+ right: 66.6666666667%; }
+ #jsxc_dialog .col-xs-pull-9 {
+ right: 75%; }
+ #jsxc_dialog .col-xs-pull-10 {
+ right: 83.3333333333%; }
+ #jsxc_dialog .col-xs-pull-11 {
+ right: 91.6666666667%; }
+ #jsxc_dialog .col-xs-pull-12 {
+ right: 100%; }
+ #jsxc_dialog .col-xs-push-0 {
+ left: auto; }
+ #jsxc_dialog .col-xs-push-1 {
+ left: 8.3333333333%; }
+ #jsxc_dialog .col-xs-push-2 {
+ left: 16.6666666667%; }
+ #jsxc_dialog .col-xs-push-3 {
+ left: 25%; }
+ #jsxc_dialog .col-xs-push-4 {
+ left: 33.3333333333%; }
+ #jsxc_dialog .col-xs-push-5 {
+ left: 41.6666666667%; }
+ #jsxc_dialog .col-xs-push-6 {
+ left: 50%; }
+ #jsxc_dialog .col-xs-push-7 {
+ left: 58.3333333333%; }
+ #jsxc_dialog .col-xs-push-8 {
+ left: 66.6666666667%; }
+ #jsxc_dialog .col-xs-push-9 {
+ left: 75%; }
+ #jsxc_dialog .col-xs-push-10 {
+ left: 83.3333333333%; }
+ #jsxc_dialog .col-xs-push-11 {
+ left: 91.6666666667%; }
+ #jsxc_dialog .col-xs-push-12 {
+ left: 100%; }
+ #jsxc_dialog .col-xs-offset-0 {
+ margin-left: 0%; }
+ #jsxc_dialog .col-xs-offset-1 {
+ margin-left: 8.3333333333%; }
+ #jsxc_dialog .col-xs-offset-2 {
+ margin-left: 16.6666666667%; }
+ #jsxc_dialog .col-xs-offset-3 {
+ margin-left: 25%; }
+ #jsxc_dialog .col-xs-offset-4 {
+ margin-left: 33.3333333333%; }
+ #jsxc_dialog .col-xs-offset-5 {
+ margin-left: 41.6666666667%; }
+ #jsxc_dialog .col-xs-offset-6 {
+ margin-left: 50%; }
+ #jsxc_dialog .col-xs-offset-7 {
+ margin-left: 58.3333333333%; }
+ #jsxc_dialog .col-xs-offset-8 {
+ margin-left: 66.6666666667%; }
+ #jsxc_dialog .col-xs-offset-9 {
+ margin-left: 75%; }
+ #jsxc_dialog .col-xs-offset-10 {
+ margin-left: 83.3333333333%; }
+ #jsxc_dialog .col-xs-offset-11 {
+ margin-left: 91.6666666667%; }
+ #jsxc_dialog .col-xs-offset-12 {
+ margin-left: 100%; }
+ @media (min-width: 768px) {
+ #jsxc_dialog .col-sm-1, #jsxc_dialog .col-sm-2, #jsxc_dialog .col-sm-3, #jsxc_dialog .col-sm-4, #jsxc_dialog .col-sm-5, #jsxc_dialog .col-sm-6, #jsxc_dialog .col-sm-7, #jsxc_dialog .col-sm-8, #jsxc_dialog .col-sm-9, #jsxc_dialog .col-sm-10, #jsxc_dialog .col-sm-11, #jsxc_dialog .col-sm-12 {
+ float: left; }
+
+ #jsxc_dialog .col-sm-1 {
+ width: 8.3333333333%; }
+
+ #jsxc_dialog .col-sm-2 {
+ width: 16.6666666667%; }
+
+ #jsxc_dialog .col-sm-3 {
+ width: 25%; }
+
+ #jsxc_dialog .col-sm-4 {
+ width: 33.3333333333%; }
+
+ #jsxc_dialog .col-sm-5 {
+ width: 41.6666666667%; }
+
+ #jsxc_dialog .col-sm-6 {
+ width: 50%; }
+
+ #jsxc_dialog .col-sm-7 {
+ width: 58.3333333333%; }
+
+ #jsxc_dialog .col-sm-8 {
+ width: 66.6666666667%; }
+
+ #jsxc_dialog .col-sm-9 {
+ width: 75%; }
+
+ #jsxc_dialog .col-sm-10 {
+ width: 83.3333333333%; }
+
+ #jsxc_dialog .col-sm-11 {
+ width: 91.6666666667%; }
+
+ #jsxc_dialog .col-sm-12 {
+ width: 100%; }
+
+ #jsxc_dialog .col-sm-pull-0 {
+ right: auto; }
+
+ #jsxc_dialog .col-sm-pull-1 {
+ right: 8.3333333333%; }
+
+ #jsxc_dialog .col-sm-pull-2 {
+ right: 16.6666666667%; }
+
+ #jsxc_dialog .col-sm-pull-3 {
+ right: 25%; }
+
+ #jsxc_dialog .col-sm-pull-4 {
+ right: 33.3333333333%; }
+
+ #jsxc_dialog .col-sm-pull-5 {
+ right: 41.6666666667%; }
+
+ #jsxc_dialog .col-sm-pull-6 {
+ right: 50%; }
+
+ #jsxc_dialog .col-sm-pull-7 {
+ right: 58.3333333333%; }
+
+ #jsxc_dialog .col-sm-pull-8 {
+ right: 66.6666666667%; }
+
+ #jsxc_dialog .col-sm-pull-9 {
+ right: 75%; }
+
+ #jsxc_dialog .col-sm-pull-10 {
+ right: 83.3333333333%; }
+
+ #jsxc_dialog .col-sm-pull-11 {
+ right: 91.6666666667%; }
+
+ #jsxc_dialog .col-sm-pull-12 {
+ right: 100%; }
+
+ #jsxc_dialog .col-sm-push-0 {
+ left: auto; }
+
+ #jsxc_dialog .col-sm-push-1 {
+ left: 8.3333333333%; }
+
+ #jsxc_dialog .col-sm-push-2 {
+ left: 16.6666666667%; }
+
+ #jsxc_dialog .col-sm-push-3 {
+ left: 25%; }
+
+ #jsxc_dialog .col-sm-push-4 {
+ left: 33.3333333333%; }
+
+ #jsxc_dialog .col-sm-push-5 {
+ left: 41.6666666667%; }
+
+ #jsxc_dialog .col-sm-push-6 {
+ left: 50%; }
+
+ #jsxc_dialog .col-sm-push-7 {
+ left: 58.3333333333%; }
+
+ #jsxc_dialog .col-sm-push-8 {
+ left: 66.6666666667%; }
+
+ #jsxc_dialog .col-sm-push-9 {
+ left: 75%; }
+
+ #jsxc_dialog .col-sm-push-10 {
+ left: 83.3333333333%; }
+
+ #jsxc_dialog .col-sm-push-11 {
+ left: 91.6666666667%; }
+
+ #jsxc_dialog .col-sm-push-12 {
+ left: 100%; }
+
+ #jsxc_dialog .col-sm-offset-0 {
+ margin-left: 0%; }
+
+ #jsxc_dialog .col-sm-offset-1 {
+ margin-left: 8.3333333333%; }
+
+ #jsxc_dialog .col-sm-offset-2 {
+ margin-left: 16.6666666667%; }
+
+ #jsxc_dialog .col-sm-offset-3 {
+ margin-left: 25%; }
+
+ #jsxc_dialog .col-sm-offset-4 {
+ margin-left: 33.3333333333%; }
+
+ #jsxc_dialog .col-sm-offset-5 {
+ margin-left: 41.6666666667%; }
+
+ #jsxc_dialog .col-sm-offset-6 {
+ margin-left: 50%; }
+
+ #jsxc_dialog .col-sm-offset-7 {
+ margin-left: 58.3333333333%; }
+
+ #jsxc_dialog .col-sm-offset-8 {
+ margin-left: 66.6666666667%; }
+
+ #jsxc_dialog .col-sm-offset-9 {
+ margin-left: 75%; }
+
+ #jsxc_dialog .col-sm-offset-10 {
+ margin-left: 83.3333333333%; }
+
+ #jsxc_dialog .col-sm-offset-11 {
+ margin-left: 91.6666666667%; }
+
+ #jsxc_dialog .col-sm-offset-12 {
+ margin-left: 100%; }
+ }
+ @media (min-width: 992px) {
+ #jsxc_dialog .col-md-1, #jsxc_dialog .col-md-2, #jsxc_dialog .col-md-3, #jsxc_dialog .col-md-4, #jsxc_dialog .col-md-5, #jsxc_dialog .col-md-6, #jsxc_dialog .col-md-7, #jsxc_dialog .col-md-8, #jsxc_dialog .col-md-9, #jsxc_dialog .col-md-10, #jsxc_dialog .col-md-11, #jsxc_dialog .col-md-12 {
+ float: left; }
+
+ #jsxc_dialog .col-md-1 {
+ width: 8.3333333333%; }
+
+ #jsxc_dialog .col-md-2 {
+ width: 16.6666666667%; }
+
+ #jsxc_dialog .col-md-3 {
+ width: 25%; }
+
+ #jsxc_dialog .col-md-4 {
+ width: 33.3333333333%; }
+
+ #jsxc_dialog .col-md-5 {
+ width: 41.6666666667%; }
+
+ #jsxc_dialog .col-md-6 {
+ width: 50%; }
+
+ #jsxc_dialog .col-md-7 {
+ width: 58.3333333333%; }
+
+ #jsxc_dialog .col-md-8 {
+ width: 66.6666666667%; }
+
+ #jsxc_dialog .col-md-9 {
+ width: 75%; }
+
+ #jsxc_dialog .col-md-10 {
+ width: 83.3333333333%; }
+
+ #jsxc_dialog .col-md-11 {
+ width: 91.6666666667%; }
+
+ #jsxc_dialog .col-md-12 {
+ width: 100%; }
+
+ #jsxc_dialog .col-md-pull-0 {
+ right: auto; }
+
+ #jsxc_dialog .col-md-pull-1 {
+ right: 8.3333333333%; }
+
+ #jsxc_dialog .col-md-pull-2 {
+ right: 16.6666666667%; }
+
+ #jsxc_dialog .col-md-pull-3 {
+ right: 25%; }
+
+ #jsxc_dialog .col-md-pull-4 {
+ right: 33.3333333333%; }
+
+ #jsxc_dialog .col-md-pull-5 {
+ right: 41.6666666667%; }
+
+ #jsxc_dialog .col-md-pull-6 {
+ right: 50%; }
+
+ #jsxc_dialog .col-md-pull-7 {
+ right: 58.3333333333%; }
+
+ #jsxc_dialog .col-md-pull-8 {
+ right: 66.6666666667%; }
+
+ #jsxc_dialog .col-md-pull-9 {
+ right: 75%; }
+
+ #jsxc_dialog .col-md-pull-10 {
+ right: 83.3333333333%; }
+
+ #jsxc_dialog .col-md-pull-11 {
+ right: 91.6666666667%; }
+
+ #jsxc_dialog .col-md-pull-12 {
+ right: 100%; }
+
+ #jsxc_dialog .col-md-push-0 {
+ left: auto; }
+
+ #jsxc_dialog .col-md-push-1 {
+ left: 8.3333333333%; }
+
+ #jsxc_dialog .col-md-push-2 {
+ left: 16.6666666667%; }
+
+ #jsxc_dialog .col-md-push-3 {
+ left: 25%; }
+
+ #jsxc_dialog .col-md-push-4 {
+ left: 33.3333333333%; }
+
+ #jsxc_dialog .col-md-push-5 {
+ left: 41.6666666667%; }
+
+ #jsxc_dialog .col-md-push-6 {
+ left: 50%; }
+
+ #jsxc_dialog .col-md-push-7 {
+ left: 58.3333333333%; }
+
+ #jsxc_dialog .col-md-push-8 {
+ left: 66.6666666667%; }
+
+ #jsxc_dialog .col-md-push-9 {
+ left: 75%; }
+
+ #jsxc_dialog .col-md-push-10 {
+ left: 83.3333333333%; }
+
+ #jsxc_dialog .col-md-push-11 {
+ left: 91.6666666667%; }
+
+ #jsxc_dialog .col-md-push-12 {
+ left: 100%; }
+
+ #jsxc_dialog .col-md-offset-0 {
+ margin-left: 0%; }
+
+ #jsxc_dialog .col-md-offset-1 {
+ margin-left: 8.3333333333%; }
+
+ #jsxc_dialog .col-md-offset-2 {
+ margin-left: 16.6666666667%; }
+
+ #jsxc_dialog .col-md-offset-3 {
+ margin-left: 25%; }
+
+ #jsxc_dialog .col-md-offset-4 {
+ margin-left: 33.3333333333%; }
+
+ #jsxc_dialog .col-md-offset-5 {
+ margin-left: 41.6666666667%; }
+
+ #jsxc_dialog .col-md-offset-6 {
+ margin-left: 50%; }
+
+ #jsxc_dialog .col-md-offset-7 {
+ margin-left: 58.3333333333%; }
+
+ #jsxc_dialog .col-md-offset-8 {
+ margin-left: 66.6666666667%; }
+
+ #jsxc_dialog .col-md-offset-9 {
+ margin-left: 75%; }
+
+ #jsxc_dialog .col-md-offset-10 {
+ margin-left: 83.3333333333%; }
+
+ #jsxc_dialog .col-md-offset-11 {
+ margin-left: 91.6666666667%; }
+
+ #jsxc_dialog .col-md-offset-12 {
+ margin-left: 100%; }
+ }
+ @media (min-width: 1200px) {
+ #jsxc_dialog .col-lg-1, #jsxc_dialog .col-lg-2, #jsxc_dialog .col-lg-3, #jsxc_dialog .col-lg-4, #jsxc_dialog .col-lg-5, #jsxc_dialog .col-lg-6, #jsxc_dialog .col-lg-7, #jsxc_dialog .col-lg-8, #jsxc_dialog .col-lg-9, #jsxc_dialog .col-lg-10, #jsxc_dialog .col-lg-11, #jsxc_dialog .col-lg-12 {
+ float: left; }
+
+ #jsxc_dialog .col-lg-1 {
+ width: 8.3333333333%; }
+
+ #jsxc_dialog .col-lg-2 {
+ width: 16.6666666667%; }
+
+ #jsxc_dialog .col-lg-3 {
+ width: 25%; }
+
+ #jsxc_dialog .col-lg-4 {
+ width: 33.3333333333%; }
+
+ #jsxc_dialog .col-lg-5 {
+ width: 41.6666666667%; }
+
+ #jsxc_dialog .col-lg-6 {
+ width: 50%; }
+
+ #jsxc_dialog .col-lg-7 {
+ width: 58.3333333333%; }
+
+ #jsxc_dialog .col-lg-8 {
+ width: 66.6666666667%; }
+
+ #jsxc_dialog .col-lg-9 {
+ width: 75%; }
+
+ #jsxc_dialog .col-lg-10 {
+ width: 83.3333333333%; }
+
+ #jsxc_dialog .col-lg-11 {
+ width: 91.6666666667%; }
+
+ #jsxc_dialog .col-lg-12 {
+ width: 100%; }
+
+ #jsxc_dialog .col-lg-pull-0 {
+ right: auto; }
+
+ #jsxc_dialog .col-lg-pull-1 {
+ right: 8.3333333333%; }
+
+ #jsxc_dialog .col-lg-pull-2 {
+ right: 16.6666666667%; }
+
+ #jsxc_dialog .col-lg-pull-3 {
+ right: 25%; }
+
+ #jsxc_dialog .col-lg-pull-4 {
+ right: 33.3333333333%; }
+
+ #jsxc_dialog .col-lg-pull-5 {
+ right: 41.6666666667%; }
+
+ #jsxc_dialog .col-lg-pull-6 {
+ right: 50%; }
+
+ #jsxc_dialog .col-lg-pull-7 {
+ right: 58.3333333333%; }
+
+ #jsxc_dialog .col-lg-pull-8 {
+ right: 66.6666666667%; }
+
+ #jsxc_dialog .col-lg-pull-9 {
+ right: 75%; }
+
+ #jsxc_dialog .col-lg-pull-10 {
+ right: 83.3333333333%; }
+
+ #jsxc_dialog .col-lg-pull-11 {
+ right: 91.6666666667%; }
+
+ #jsxc_dialog .col-lg-pull-12 {
+ right: 100%; }
+
+ #jsxc_dialog .col-lg-push-0 {
+ left: auto; }
+
+ #jsxc_dialog .col-lg-push-1 {
+ left: 8.3333333333%; }
+
+ #jsxc_dialog .col-lg-push-2 {
+ left: 16.6666666667%; }
+
+ #jsxc_dialog .col-lg-push-3 {
+ left: 25%; }
+
+ #jsxc_dialog .col-lg-push-4 {
+ left: 33.3333333333%; }
+
+ #jsxc_dialog .col-lg-push-5 {
+ left: 41.6666666667%; }
+
+ #jsxc_dialog .col-lg-push-6 {
+ left: 50%; }
+
+ #jsxc_dialog .col-lg-push-7 {
+ left: 58.3333333333%; }
+
+ #jsxc_dialog .col-lg-push-8 {
+ left: 66.6666666667%; }
+
+ #jsxc_dialog .col-lg-push-9 {
+ left: 75%; }
+
+ #jsxc_dialog .col-lg-push-10 {
+ left: 83.3333333333%; }
+
+ #jsxc_dialog .col-lg-push-11 {
+ left: 91.6666666667%; }
+
+ #jsxc_dialog .col-lg-push-12 {
+ left: 100%; }
+
+ #jsxc_dialog .col-lg-offset-0 {
+ margin-left: 0%; }
+
+ #jsxc_dialog .col-lg-offset-1 {
+ margin-left: 8.3333333333%; }
+
+ #jsxc_dialog .col-lg-offset-2 {
+ margin-left: 16.6666666667%; }
+
+ #jsxc_dialog .col-lg-offset-3 {
+ margin-left: 25%; }
+
+ #jsxc_dialog .col-lg-offset-4 {
+ margin-left: 33.3333333333%; }
+
+ #jsxc_dialog .col-lg-offset-5 {
+ margin-left: 41.6666666667%; }
+
+ #jsxc_dialog .col-lg-offset-6 {
+ margin-left: 50%; }
+
+ #jsxc_dialog .col-lg-offset-7 {
+ margin-left: 58.3333333333%; }
+
+ #jsxc_dialog .col-lg-offset-8 {
+ margin-left: 66.6666666667%; }
+
+ #jsxc_dialog .col-lg-offset-9 {
+ margin-left: 75%; }
+
+ #jsxc_dialog .col-lg-offset-10 {
+ margin-left: 83.3333333333%; }
+
+ #jsxc_dialog .col-lg-offset-11 {
+ margin-left: 91.6666666667%; }
+
+ #jsxc_dialog .col-lg-offset-12 {
+ margin-left: 100%; }
+ }
+ #jsxc_dialog .alert {
+ padding: 15px;
+ margin-bottom: 20px;
+ border: 1px solid transparent;
+ border-radius: 4px; }
+ #jsxc_dialog .alert h4 {
+ margin-top: 0;
+ color: inherit; }
+ #jsxc_dialog .alert .alert-link {
+ font-weight: bold; }
+ #jsxc_dialog .alert > p, #jsxc_dialog .alert > ul {
+ margin-bottom: 0; }
+ #jsxc_dialog .alert > p + p {
+ margin-top: 5px; }
+ #jsxc_dialog .alert-dismissable, #jsxc_dialog .alert-dismissible {
+ padding-right: 35px; }
+ #jsxc_dialog .alert-dismissable .close, #jsxc_dialog .alert-dismissible .close {
+ position: relative;
+ top: -2px;
+ right: -21px;
+ color: inherit; }
+ #jsxc_dialog .alert-success {
+ background-color: #dff0d8;
+ border-color: #d6e9c6;
+ color: #3c763d; }
+ #jsxc_dialog .alert-success hr {
+ border-top-color: #c9e2b3; }
+ #jsxc_dialog .alert-success .alert-link {
+ color: #2b542c; }
+ #jsxc_dialog .alert-info {
+ background-color: #d9edf7;
+ border-color: #bce8f1;
+ color: #31708f; }
+ #jsxc_dialog .alert-info hr {
+ border-top-color: #a6e1ec; }
+ #jsxc_dialog .alert-info .alert-link {
+ color: #245269; }
+ #jsxc_dialog .alert-warning {
+ background-color: #fcf8e3;
+ border-color: #faebcc;
+ color: #8a6d3b; }
+ #jsxc_dialog .alert-warning hr {
+ border-top-color: #f7e1b5; }
+ #jsxc_dialog .alert-warning .alert-link {
+ color: #66512c; }
+ #jsxc_dialog .alert-danger {
+ background-color: #f2dede;
+ border-color: #ebccd1;
+ color: #a94442; }
+ #jsxc_dialog .alert-danger hr {
+ border-top-color: #e4b9c0; }
+ #jsxc_dialog .alert-danger .alert-link {
+ color: #843534; }
+ #jsxc_dialog .btn {
+ display: inline-block;
+ margin-bottom: 0;
+ font-weight: normal;
+ text-align: center;
+ vertical-align: middle;
+ -ms-touch-action: manipulation;
+ touch-action: manipulation;
+ cursor: pointer;
+ background-image: none;
+ border: 1px solid transparent;
+ white-space: nowrap;
+ padding: 6px 12px;
+ font-size: 14px;
+ line-height: 1.428571429;
+ border-radius: 4px;
+ -webkit-user-select: none;
+ -moz-user-select: none;
+ -ms-user-select: none;
+ user-select: none; }
+ #jsxc_dialog .btn:focus, #jsxc_dialog .btn.focus, #jsxc_dialog .btn:active:focus, #jsxc_dialog .btn:active.focus, #jsxc_dialog .btn.active:focus, #jsxc_dialog .btn.active.focus {
+ outline: thin dotted;
+ outline: 5px auto -webkit-focus-ring-color;
+ outline-offset: -2px; }
+ #jsxc_dialog .btn:hover, #jsxc_dialog .btn:focus, #jsxc_dialog .btn.focus {
+ color: #333;
+ text-decoration: none; }
+ #jsxc_dialog .btn:active, #jsxc_dialog .btn.active {
+ outline: 0;
+ background-image: none;
+ box-shadow: inset 0 3px 5px rgba(0, 0, 0, 0.125); }
+ #jsxc_dialog .btn.disabled, #jsxc_dialog .btn[disabled], fieldset[disabled] #jsxc_dialog .btn {
+ cursor: not-allowed;
+ pointer-events: none;
+ opacity: 0.65;
+ filter: alpha(opacity=65);
+ box-shadow: none; }
+ #jsxc_dialog .btn-default {
+ color: #333;
+ background-color: #fff;
+ border-color: #ccc; }
+ #jsxc_dialog .btn-default:hover, #jsxc_dialog .btn-default:focus, #jsxc_dialog .btn-default.focus, #jsxc_dialog .btn-default:active, #jsxc_dialog .btn-default.active, .open > #jsxc_dialog .btn-default.dropdown-toggle {
+ color: #333;
+ background-color: #e6e6e6;
+ border-color: #adadad; }
+ #jsxc_dialog .btn-default:active, #jsxc_dialog .btn-default.active, .open > #jsxc_dialog .btn-default.dropdown-toggle {
+ background-image: none; }
+ #jsxc_dialog .btn-default.disabled, #jsxc_dialog .btn-default.disabled:hover, #jsxc_dialog .btn-default.disabled:focus, #jsxc_dialog .btn-default.disabled.focus, #jsxc_dialog .btn-default.disabled:active, #jsxc_dialog .btn-default.disabled.active, #jsxc_dialog .btn-default[disabled], #jsxc_dialog .btn-default[disabled]:hover, #jsxc_dialog .btn-default[disabled]:focus, #jsxc_dialog .btn-default[disabled].focus, #jsxc_dialog .btn-default[disabled]:active, #jsxc_dialog .btn-default[disabled].active, fieldset[disabled] #jsxc_dialog .btn-default, fieldset[disabled] #jsxc_dialog .btn-default:hover, fieldset[disabled] #jsxc_dialog .btn-default:focus, fieldset[disabled] #jsxc_dialog .btn-default.focus, fieldset[disabled] #jsxc_dialog .btn-default:active, fieldset[disabled] #jsxc_dialog .btn-default.active {
+ background-color: #fff;
+ border-color: #ccc; }
+ #jsxc_dialog .btn-default .badge {
+ color: #fff;
+ background-color: #333; }
+ #jsxc_dialog .btn-primary {
+ color: #fff;
+ background-color: #337ab7;
+ border-color: #2e6da4; }
+ #jsxc_dialog .btn-primary:hover, #jsxc_dialog .btn-primary:focus, #jsxc_dialog .btn-primary.focus, #jsxc_dialog .btn-primary:active, #jsxc_dialog .btn-primary.active, .open > #jsxc_dialog .btn-primary.dropdown-toggle {
+ color: #fff;
+ background-color: #286090;
+ border-color: #204d74; }
+ #jsxc_dialog .btn-primary:active, #jsxc_dialog .btn-primary.active, .open > #jsxc_dialog .btn-primary.dropdown-toggle {
+ background-image: none; }
+ #jsxc_dialog .btn-primary.disabled, #jsxc_dialog .btn-primary.disabled:hover, #jsxc_dialog .btn-primary.disabled:focus, #jsxc_dialog .btn-primary.disabled.focus, #jsxc_dialog .btn-primary.disabled:active, #jsxc_dialog .btn-primary.disabled.active, #jsxc_dialog .btn-primary[disabled], #jsxc_dialog .btn-primary[disabled]:hover, #jsxc_dialog .btn-primary[disabled]:focus, #jsxc_dialog .btn-primary[disabled].focus, #jsxc_dialog .btn-primary[disabled]:active, #jsxc_dialog .btn-primary[disabled].active, fieldset[disabled] #jsxc_dialog .btn-primary, fieldset[disabled] #jsxc_dialog .btn-primary:hover, fieldset[disabled] #jsxc_dialog .btn-primary:focus, fieldset[disabled] #jsxc_dialog .btn-primary.focus, fieldset[disabled] #jsxc_dialog .btn-primary:active, fieldset[disabled] #jsxc_dialog .btn-primary.active {
+ background-color: #337ab7;
+ border-color: #2e6da4; }
+ #jsxc_dialog .btn-primary .badge {
+ color: #337ab7;
+ background-color: #fff; }
+ #jsxc_dialog .btn-success {
+ color: #fff;
+ background-color: #5cb85c;
+ border-color: #4cae4c; }
+ #jsxc_dialog .btn-success:hover, #jsxc_dialog .btn-success:focus, #jsxc_dialog .btn-success.focus, #jsxc_dialog .btn-success:active, #jsxc_dialog .btn-success.active, .open > #jsxc_dialog .btn-success.dropdown-toggle {
+ color: #fff;
+ background-color: #449d44;
+ border-color: #398439; }
+ #jsxc_dialog .btn-success:active, #jsxc_dialog .btn-success.active, .open > #jsxc_dialog .btn-success.dropdown-toggle {
+ background-image: none; }
+ #jsxc_dialog .btn-success.disabled, #jsxc_dialog .btn-success.disabled:hover, #jsxc_dialog .btn-success.disabled:focus, #jsxc_dialog .btn-success.disabled.focus, #jsxc_dialog .btn-success.disabled:active, #jsxc_dialog .btn-success.disabled.active, #jsxc_dialog .btn-success[disabled], #jsxc_dialog .btn-success[disabled]:hover, #jsxc_dialog .btn-success[disabled]:focus, #jsxc_dialog .btn-success[disabled].focus, #jsxc_dialog .btn-success[disabled]:active, #jsxc_dialog .btn-success[disabled].active, fieldset[disabled] #jsxc_dialog .btn-success, fieldset[disabled] #jsxc_dialog .btn-success:hover, fieldset[disabled] #jsxc_dialog .btn-success:focus, fieldset[disabled] #jsxc_dialog .btn-success.focus, fieldset[disabled] #jsxc_dialog .btn-success:active, fieldset[disabled] #jsxc_dialog .btn-success.active {
+ background-color: #5cb85c;
+ border-color: #4cae4c; }
+ #jsxc_dialog .btn-success .badge {
+ color: #5cb85c;
+ background-color: #fff; }
+ #jsxc_dialog .btn-info {
+ color: #fff;
+ background-color: #5bc0de;
+ border-color: #46b8da; }
+ #jsxc_dialog .btn-info:hover, #jsxc_dialog .btn-info:focus, #jsxc_dialog .btn-info.focus, #jsxc_dialog .btn-info:active, #jsxc_dialog .btn-info.active, .open > #jsxc_dialog .btn-info.dropdown-toggle {
+ color: #fff;
+ background-color: #31b0d5;
+ border-color: #269abc; }
+ #jsxc_dialog .btn-info:active, #jsxc_dialog .btn-info.active, .open > #jsxc_dialog .btn-info.dropdown-toggle {
+ background-image: none; }
+ #jsxc_dialog .btn-info.disabled, #jsxc_dialog .btn-info.disabled:hover, #jsxc_dialog .btn-info.disabled:focus, #jsxc_dialog .btn-info.disabled.focus, #jsxc_dialog .btn-info.disabled:active, #jsxc_dialog .btn-info.disabled.active, #jsxc_dialog .btn-info[disabled], #jsxc_dialog .btn-info[disabled]:hover, #jsxc_dialog .btn-info[disabled]:focus, #jsxc_dialog .btn-info[disabled].focus, #jsxc_dialog .btn-info[disabled]:active, #jsxc_dialog .btn-info[disabled].active, fieldset[disabled] #jsxc_dialog .btn-info, fieldset[disabled] #jsxc_dialog .btn-info:hover, fieldset[disabled] #jsxc_dialog .btn-info:focus, fieldset[disabled] #jsxc_dialog .btn-info.focus, fieldset[disabled] #jsxc_dialog .btn-info:active, fieldset[disabled] #jsxc_dialog .btn-info.active {
+ background-color: #5bc0de;
+ border-color: #46b8da; }
+ #jsxc_dialog .btn-info .badge {
+ color: #5bc0de;
+ background-color: #fff; }
+ #jsxc_dialog .btn-warning {
+ color: #fff;
+ background-color: #f0ad4e;
+ border-color: #eea236; }
+ #jsxc_dialog .btn-warning:hover, #jsxc_dialog .btn-warning:focus, #jsxc_dialog .btn-warning.focus, #jsxc_dialog .btn-warning:active, #jsxc_dialog .btn-warning.active, .open > #jsxc_dialog .btn-warning.dropdown-toggle {
+ color: #fff;
+ background-color: #ec971f;
+ border-color: #d58512; }
+ #jsxc_dialog .btn-warning:active, #jsxc_dialog .btn-warning.active, .open > #jsxc_dialog .btn-warning.dropdown-toggle {
+ background-image: none; }
+ #jsxc_dialog .btn-warning.disabled, #jsxc_dialog .btn-warning.disabled:hover, #jsxc_dialog .btn-warning.disabled:focus, #jsxc_dialog .btn-warning.disabled.focus, #jsxc_dialog .btn-warning.disabled:active, #jsxc_dialog .btn-warning.disabled.active, #jsxc_dialog .btn-warning[disabled], #jsxc_dialog .btn-warning[disabled]:hover, #jsxc_dialog .btn-warning[disabled]:focus, #jsxc_dialog .btn-warning[disabled].focus, #jsxc_dialog .btn-warning[disabled]:active, #jsxc_dialog .btn-warning[disabled].active, fieldset[disabled] #jsxc_dialog .btn-warning, fieldset[disabled] #jsxc_dialog .btn-warning:hover, fieldset[disabled] #jsxc_dialog .btn-warning:focus, fieldset[disabled] #jsxc_dialog .btn-warning.focus, fieldset[disabled] #jsxc_dialog .btn-warning:active, fieldset[disabled] #jsxc_dialog .btn-warning.active {
+ background-color: #f0ad4e;
+ border-color: #eea236; }
+ #jsxc_dialog .btn-warning .badge {
+ color: #f0ad4e;
+ background-color: #fff; }
+ #jsxc_dialog .btn-danger {
+ color: #fff;
+ background-color: #d9534f;
+ border-color: #d43f3a; }
+ #jsxc_dialog .btn-danger:hover, #jsxc_dialog .btn-danger:focus, #jsxc_dialog .btn-danger.focus, #jsxc_dialog .btn-danger:active, #jsxc_dialog .btn-danger.active, .open > #jsxc_dialog .btn-danger.dropdown-toggle {
+ color: #fff;
+ background-color: #c9302c;
+ border-color: #ac2925; }
+ #jsxc_dialog .btn-danger:active, #jsxc_dialog .btn-danger.active, .open > #jsxc_dialog .btn-danger.dropdown-toggle {
+ background-image: none; }
+ #jsxc_dialog .btn-danger.disabled, #jsxc_dialog .btn-danger.disabled:hover, #jsxc_dialog .btn-danger.disabled:focus, #jsxc_dialog .btn-danger.disabled.focus, #jsxc_dialog .btn-danger.disabled:active, #jsxc_dialog .btn-danger.disabled.active, #jsxc_dialog .btn-danger[disabled], #jsxc_dialog .btn-danger[disabled]:hover, #jsxc_dialog .btn-danger[disabled]:focus, #jsxc_dialog .btn-danger[disabled].focus, #jsxc_dialog .btn-danger[disabled]:active, #jsxc_dialog .btn-danger[disabled].active, fieldset[disabled] #jsxc_dialog .btn-danger, fieldset[disabled] #jsxc_dialog .btn-danger:hover, fieldset[disabled] #jsxc_dialog .btn-danger:focus, fieldset[disabled] #jsxc_dialog .btn-danger.focus, fieldset[disabled] #jsxc_dialog .btn-danger:active, fieldset[disabled] #jsxc_dialog .btn-danger.active {
+ background-color: #d9534f;
+ border-color: #d43f3a; }
+ #jsxc_dialog .btn-danger .badge {
+ color: #d9534f;
+ background-color: #fff; }
+ #jsxc_dialog .btn-link {
+ color: #337ab7;
+ font-weight: normal;
+ border-radius: 0; }
+ #jsxc_dialog .btn-link, #jsxc_dialog .btn-link:active, #jsxc_dialog .btn-link.active, #jsxc_dialog .btn-link[disabled], fieldset[disabled] #jsxc_dialog .btn-link {
+ background-color: transparent;
+ box-shadow: none; }
+ #jsxc_dialog .btn-link, #jsxc_dialog .btn-link:hover, #jsxc_dialog .btn-link:focus, #jsxc_dialog .btn-link:active {
+ border-color: transparent; }
+ #jsxc_dialog .btn-link:hover, #jsxc_dialog .btn-link:focus {
+ color: #23527c;
+ text-decoration: underline;
+ background-color: transparent; }
+ #jsxc_dialog .btn-link[disabled]:hover, #jsxc_dialog .btn-link[disabled]:focus, fieldset[disabled] #jsxc_dialog .btn-link:hover, fieldset[disabled] #jsxc_dialog .btn-link:focus {
+ color: #777777;
+ text-decoration: none; }
+ #jsxc_dialog .btn-lg, #jsxc_dialog .btn-group-lg > .btn {
+ padding: 10px 16px;
+ font-size: 18px;
+ line-height: 1.3333333;
+ border-radius: 6px; }
+ #jsxc_dialog .btn-sm, #jsxc_dialog .btn-group-sm > .btn {
+ padding: 5px 10px;
+ font-size: 12px;
+ line-height: 1.5;
+ border-radius: 3px; }
+ #jsxc_dialog .btn-xs, #jsxc_dialog .btn-group-xs > .btn {
+ padding: 1px 5px;
+ font-size: 12px;
+ line-height: 1.5;
+ border-radius: 3px; }
+ #jsxc_dialog .btn-block {
+ display: block;
+ width: 100%; }
+ #jsxc_dialog .btn-block + .btn-block {
+ margin-top: 5px; }
+ #jsxc_dialog input[type="submit"].btn-block, #jsxc_dialog input[type="reset"].btn-block, #jsxc_dialog input[type="button"].btn-block {
+ width: 100%; }
+ #jsxc_dialog .btn-group, #jsxc_dialog .btn-group-vertical {
+ position: relative;
+ display: inline-block;
+ vertical-align: middle; }
+ #jsxc_dialog .btn-group > .btn, #jsxc_dialog .btn-group-vertical > .btn {
+ position: relative;
+ float: left; }
+ #jsxc_dialog .btn-group > .btn:hover, #jsxc_dialog .btn-group > .btn:focus, #jsxc_dialog .btn-group > .btn:active, #jsxc_dialog .btn-group > .btn.active, #jsxc_dialog .btn-group-vertical > .btn:hover, #jsxc_dialog .btn-group-vertical > .btn:focus, #jsxc_dialog .btn-group-vertical > .btn:active, #jsxc_dialog .btn-group-vertical > .btn.active {
+ z-index: 2; }
+ #jsxc_dialog .btn-group .btn + .btn, #jsxc_dialog .btn-group .btn + .btn-group, #jsxc_dialog .btn-group .btn-group + .btn, #jsxc_dialog .btn-group .btn-group + .btn-group {
+ margin-left: -1px; }
+ #jsxc_dialog .btn-toolbar {
+ margin-left: -5px; }
+ #jsxc_dialog .btn-toolbar:before, #jsxc_dialog .btn-toolbar:after {
+ content: " ";
+ display: table; }
+ #jsxc_dialog .btn-toolbar:after {
+ clear: both; }
+ #jsxc_dialog .btn-toolbar .btn-group, #jsxc_dialog .btn-toolbar .input-group {
+ float: left; }
+ #jsxc_dialog .btn-toolbar > .btn, #jsxc_dialog .btn-toolbar > .btn-group, #jsxc_dialog .btn-toolbar > .input-group {
+ margin-left: 5px; }
+ #jsxc_dialog .btn-group > .btn:not(:first-child):not(:last-child):not(.dropdown-toggle) {
+ border-radius: 0; }
+ #jsxc_dialog .btn-group > .btn:first-child {
+ margin-left: 0; }
+ #jsxc_dialog .btn-group > .btn:first-child:not(:last-child):not(.dropdown-toggle) {
+ border-bottom-right-radius: 0;
+ border-top-right-radius: 0; }
+ #jsxc_dialog .btn-group > .btn:last-child:not(:first-child), #jsxc_dialog .btn-group > .dropdown-toggle:not(:first-child) {
+ border-bottom-left-radius: 0;
+ border-top-left-radius: 0; }
+ #jsxc_dialog .btn-group > .btn-group {
+ float: left; }
+ #jsxc_dialog .btn-group > .btn-group:not(:first-child):not(:last-child) > .btn {
+ border-radius: 0; }
+ #jsxc_dialog .btn-group > .btn-group:first-child:not(:last-child) > .btn:last-child, #jsxc_dialog .btn-group > .btn-group:first-child:not(:last-child) > .dropdown-toggle {
+ border-bottom-right-radius: 0;
+ border-top-right-radius: 0; }
+ #jsxc_dialog .btn-group > .btn-group:last-child:not(:first-child) > .btn:first-child {
+ border-bottom-left-radius: 0;
+ border-top-left-radius: 0; }
+ #jsxc_dialog .btn-group .dropdown-toggle:active, #jsxc_dialog .btn-group.open .dropdown-toggle {
+ outline: 0; }
+ #jsxc_dialog .btn-group > .btn + .dropdown-toggle {
+ padding-left: 8px;
+ padding-right: 8px; }
+ #jsxc_dialog .btn-group > .btn-lg + .dropdown-toggle, #jsxc_dialog .btn-group-lg.btn-group > .btn + .dropdown-toggle {
+ padding-left: 12px;
+ padding-right: 12px; }
+ #jsxc_dialog .btn-group.open .dropdown-toggle {
+ box-shadow: inset 0 3px 5px rgba(0, 0, 0, 0.125); }
+ #jsxc_dialog .btn-group.open .dropdown-toggle.btn-link {
+ box-shadow: none; }
+ #jsxc_dialog .btn .caret {
+ margin-left: 0; }
+ #jsxc_dialog .btn-lg .caret, #jsxc_dialog .btn-group-lg > .btn .caret {
+ border-width: 5px 5px 0;
+ border-bottom-width: 0; }
+ #jsxc_dialog .dropup .btn-lg .caret, #jsxc_dialog .dropup .btn-group-lg > .btn .caret {
+ border-width: 0 5px 5px; }
+ #jsxc_dialog .btn-group-vertical > .btn, #jsxc_dialog .btn-group-vertical > .btn-group, #jsxc_dialog .btn-group-vertical > .btn-group > .btn {
+ display: block;
+ float: none;
+ width: 100%;
+ max-width: 100%; }
+ #jsxc_dialog .btn-group-vertical > .btn-group:before, #jsxc_dialog .btn-group-vertical > .btn-group:after {
+ content: " ";
+ display: table; }
+ #jsxc_dialog .btn-group-vertical > .btn-group:after {
+ clear: both; }
+ #jsxc_dialog .btn-group-vertical > .btn-group > .btn {
+ float: none; }
+ #jsxc_dialog .btn-group-vertical > .btn + .btn, #jsxc_dialog .btn-group-vertical > .btn + .btn-group, #jsxc_dialog .btn-group-vertical > .btn-group + .btn, #jsxc_dialog .btn-group-vertical > .btn-group + .btn-group {
+ margin-top: -1px;
+ margin-left: 0; }
+ #jsxc_dialog .btn-group-vertical > .btn:not(:first-child):not(:last-child) {
+ border-radius: 0; }
+ #jsxc_dialog .btn-group-vertical > .btn:first-child:not(:last-child) {
+ border-top-right-radius: 4px;
+ border-bottom-right-radius: 0;
+ border-bottom-left-radius: 0; }
+ #jsxc_dialog .btn-group-vertical > .btn:last-child:not(:first-child) {
+ border-bottom-left-radius: 4px;
+ border-top-right-radius: 0;
+ border-top-left-radius: 0; }
+ #jsxc_dialog .btn-group-vertical > .btn-group:not(:first-child):not(:last-child) > .btn {
+ border-radius: 0; }
+ #jsxc_dialog .btn-group-vertical > .btn-group:first-child:not(:last-child) > .btn:last-child, #jsxc_dialog .btn-group-vertical > .btn-group:first-child:not(:last-child) > .dropdown-toggle {
+ border-bottom-right-radius: 0;
+ border-bottom-left-radius: 0; }
+ #jsxc_dialog .btn-group-vertical > .btn-group:last-child:not(:first-child) > .btn:first-child {
+ border-top-right-radius: 0;
+ border-top-left-radius: 0; }
+ #jsxc_dialog .btn-group-justified {
+ display: table;
+ width: 100%;
+ table-layout: fixed;
+ border-collapse: separate; }
+ #jsxc_dialog .btn-group-justified > .btn, #jsxc_dialog .btn-group-justified > .btn-group {
+ float: none;
+ display: table-cell;
+ width: 1%; }
+ #jsxc_dialog .btn-group-justified > .btn-group .btn {
+ width: 100%; }
+ #jsxc_dialog .btn-group-justified > .btn-group .dropdown-menu {
+ left: auto; }
+ #jsxc_dialog [data-toggle="buttons"] > .btn input[type="radio"], #jsxc_dialog [data-toggle="buttons"] > .btn input[type="checkbox"], #jsxc_dialog [data-toggle="buttons"] > .btn-group > .btn input[type="radio"], #jsxc_dialog [data-toggle="buttons"] > .btn-group > .btn input[type="checkbox"] {
+ position: absolute;
+ clip: rect(0, 0, 0, 0);
+ pointer-events: none; }
+ #jsxc_dialog fieldset {
+ padding: 0;
+ margin: 0;
+ border: 0;
+ min-width: 0; }
+ #jsxc_dialog legend {
+ display: block;
+ width: 100%;
+ padding: 0;
+ margin-bottom: 20px;
+ font-size: 21px;
+ line-height: inherit;
+ color: #333333;
+ border: 0;
+ border-bottom: 1px solid #e5e5e5; }
+ #jsxc_dialog label {
+ display: inline-block;
+ max-width: 100%;
+ margin-bottom: 5px;
+ font-weight: bold; }
+ #jsxc_dialog input[type="search"] {
+ box-sizing: border-box; }
+ #jsxc_dialog input[type="radio"], #jsxc_dialog input[type="checkbox"] {
+ margin: 4px 0 0;
+ margin-top: 1px \9;
+ line-height: normal; }
+ #jsxc_dialog input[type="file"] {
+ display: block; }
+ #jsxc_dialog input[type="range"] {
+ display: block;
+ width: 100%; }
+ #jsxc_dialog select[multiple], #jsxc_dialog select[size] {
+ height: auto; }
+ #jsxc_dialog input[type="file"]:focus, #jsxc_dialog input[type="radio"]:focus, #jsxc_dialog input[type="checkbox"]:focus {
+ outline: thin dotted;
+ outline: 5px auto -webkit-focus-ring-color;
+ outline-offset: -2px; }
+ #jsxc_dialog output {
+ display: block;
+ padding-top: 7px;
+ font-size: 14px;
+ line-height: 1.428571429;
+ color: #555555; }
+ #jsxc_dialog .form-control {
+ display: block;
+ width: 100%;
+ height: 34px;
+ padding: 6px 12px;
+ font-size: 14px;
+ line-height: 1.428571429;
+ color: #555555;
+ background-color: #fff;
+ background-image: none;
+ border: 1px solid #ccc;
+ border-radius: 4px;
+ box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075);
+ -webkit-transition: border-color ease-in-out 0.15s, box-shadow ease-in-out 0.15s;
+ transition: border-color ease-in-out 0.15s, box-shadow ease-in-out 0.15s; }
+ #jsxc_dialog .form-control:focus {
+ border-color: #66afe9;
+ outline: 0;
+ box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 8px rgba(102, 175, 233, 0.6); }
+ #jsxc_dialog .form-control::-moz-placeholder {
+ color: #999;
+ opacity: 1; }
+ #jsxc_dialog .form-control:-ms-input-placeholder {
+ color: #999; }
+ #jsxc_dialog .form-control::-webkit-input-placeholder {
+ color: #999; }
+ #jsxc_dialog .form-control[disabled], #jsxc_dialog .form-control[readonly], fieldset[disabled] #jsxc_dialog .form-control {
+ background-color: #eeeeee;
+ opacity: 1; }
+ #jsxc_dialog .form-control[disabled], fieldset[disabled] #jsxc_dialog .form-control {
+ cursor: not-allowed; }
+ #jsxc_dialog textarea.form-control {
+ height: auto; }
+ #jsxc_dialog input[type="search"] {
+ -webkit-appearance: none; }
+ @media screen and (-webkit-min-device-pixel-ratio: 0) {
+ #jsxc_dialog input[type="date"], #jsxc_dialog input[type="time"], #jsxc_dialog input[type="datetime-local"], #jsxc_dialog input[type="month"] {
+ line-height: 34px; }
+ #jsxc_dialog input[type="date"].input-sm, .input-group-sm #jsxc_dialog input[type="date"], #jsxc_dialog input[type="time"].input-sm, .input-group-sm #jsxc_dialog input[type="time"], #jsxc_dialog input[type="datetime-local"].input-sm, .input-group-sm #jsxc_dialog input[type="datetime-local"], #jsxc_dialog input[type="month"].input-sm, .input-group-sm #jsxc_dialog input[type="month"] {
+ line-height: 30px; }
+ #jsxc_dialog input[type="date"].input-lg, .input-group-lg #jsxc_dialog input[type="date"], #jsxc_dialog input[type="time"].input-lg, .input-group-lg #jsxc_dialog input[type="time"], #jsxc_dialog input[type="datetime-local"].input-lg, .input-group-lg #jsxc_dialog input[type="datetime-local"], #jsxc_dialog input[type="month"].input-lg, .input-group-lg #jsxc_dialog input[type="month"] {
+ line-height: 46px; }
+ }
+ #jsxc_dialog .form-group {
+ margin-bottom: 15px; }
+ #jsxc_dialog .radio, #jsxc_dialog .checkbox {
+ position: relative;
+ display: block;
+ margin-top: 10px;
+ margin-bottom: 10px; }
+ #jsxc_dialog .radio label, #jsxc_dialog .checkbox label {
+ min-height: 20px;
+ padding-left: 20px;
+ margin-bottom: 0;
+ font-weight: normal;
+ cursor: pointer; }
+ #jsxc_dialog .radio input[type="radio"], #jsxc_dialog .radio-inline input[type="radio"], #jsxc_dialog .checkbox input[type="checkbox"], #jsxc_dialog .checkbox-inline input[type="checkbox"] {
+ position: absolute;
+ margin-left: -20px;
+ margin-top: 4px \9; }
+ #jsxc_dialog .radio + .radio, #jsxc_dialog .checkbox + .checkbox {
+ margin-top: -5px; }
+ #jsxc_dialog .radio-inline, #jsxc_dialog .checkbox-inline {
+ position: relative;
+ display: inline-block;
+ padding-left: 20px;
+ margin-bottom: 0;
+ vertical-align: middle;
+ font-weight: normal;
+ cursor: pointer; }
+ #jsxc_dialog .radio-inline + .radio-inline, #jsxc_dialog .checkbox-inline + .checkbox-inline {
+ margin-top: 0;
+ margin-left: 10px; }
+ #jsxc_dialog input[type="radio"][disabled], #jsxc_dialog input[type="radio"].disabled, fieldset[disabled] #jsxc_dialog input[type="radio"], #jsxc_dialog input[type="checkbox"][disabled], #jsxc_dialog input[type="checkbox"].disabled, fieldset[disabled] #jsxc_dialog input[type="checkbox"] {
+ cursor: not-allowed; }
+ #jsxc_dialog .radio-inline.disabled, fieldset[disabled] #jsxc_dialog .radio-inline, #jsxc_dialog .checkbox-inline.disabled, fieldset[disabled] #jsxc_dialog .checkbox-inline {
+ cursor: not-allowed; }
+ #jsxc_dialog .radio.disabled label, fieldset[disabled] #jsxc_dialog .radio label, #jsxc_dialog .checkbox.disabled label, fieldset[disabled] #jsxc_dialog .checkbox label {
+ cursor: not-allowed; }
+ #jsxc_dialog .form-control-static {
+ padding-top: 7px;
+ padding-bottom: 7px;
+ margin-bottom: 0;
+ min-height: 34px; }
+ #jsxc_dialog .form-control-static.input-lg, #jsxc_dialog .form-control-static.input-sm {
+ padding-left: 0;
+ padding-right: 0; }
+ #jsxc_dialog .input-sm {
+ height: 30px;
+ padding: 5px 10px;
+ font-size: 12px;
+ line-height: 1.5;
+ border-radius: 3px; }
+ #jsxc_dialog select.input-sm {
+ height: 30px;
+ line-height: 30px; }
+ #jsxc_dialog textarea.input-sm, #jsxc_dialog select[multiple].input-sm {
+ height: auto; }
+ #jsxc_dialog .form-group-sm .form-control {
+ height: 30px;
+ padding: 5px 10px;
+ font-size: 12px;
+ line-height: 1.5;
+ border-radius: 3px; }
+ #jsxc_dialog .form-group-sm select.form-control {
+ height: 30px;
+ line-height: 30px; }
+ #jsxc_dialog .form-group-sm textarea.form-control, #jsxc_dialog .form-group-sm select[multiple].form-control {
+ height: auto; }
+ #jsxc_dialog .form-group-sm .form-control-static {
+ height: 30px;
+ padding: 5px 10px;
+ font-size: 12px;
+ line-height: 1.5;
+ min-height: 32px; }
+ #jsxc_dialog .input-lg {
+ height: 46px;
+ padding: 10px 16px;
+ font-size: 18px;
+ line-height: 1.3333333;
+ border-radius: 6px; }
+ #jsxc_dialog select.input-lg {
+ height: 46px;
+ line-height: 46px; }
+ #jsxc_dialog textarea.input-lg, #jsxc_dialog select[multiple].input-lg {
+ height: auto; }
+ #jsxc_dialog .form-group-lg .form-control {
+ height: 46px;
+ padding: 10px 16px;
+ font-size: 18px;
+ line-height: 1.3333333;
+ border-radius: 6px; }
+ #jsxc_dialog .form-group-lg select.form-control {
+ height: 46px;
+ line-height: 46px; }
+ #jsxc_dialog .form-group-lg textarea.form-control, #jsxc_dialog .form-group-lg select[multiple].form-control {
+ height: auto; }
+ #jsxc_dialog .form-group-lg .form-control-static {
+ height: 46px;
+ padding: 10px 16px;
+ font-size: 18px;
+ line-height: 1.3333333;
+ min-height: 38px; }
+ #jsxc_dialog .has-feedback {
+ position: relative; }
+ #jsxc_dialog .has-feedback .form-control {
+ padding-right: 42.5px; }
+ #jsxc_dialog .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; }
+ #jsxc_dialog .input-lg + .form-control-feedback {
+ width: 46px;
+ height: 46px;
+ line-height: 46px; }
+ #jsxc_dialog .input-sm + .form-control-feedback {
+ width: 30px;
+ height: 30px;
+ line-height: 30px; }
+ #jsxc_dialog .has-success .help-block, #jsxc_dialog .has-success .control-label, #jsxc_dialog .has-success .radio, #jsxc_dialog .has-success .checkbox, #jsxc_dialog .has-success .radio-inline, #jsxc_dialog .has-success .checkbox-inline, #jsxc_dialog .has-success.radio label, #jsxc_dialog .has-success.checkbox label, #jsxc_dialog .has-success.radio-inline label, #jsxc_dialog .has-success.checkbox-inline label {
+ color: #3c763d; }
+ #jsxc_dialog .has-success .form-control {
+ border-color: #3c763d;
+ box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075); }
+ #jsxc_dialog .has-success .form-control:focus {
+ border-color: #2b542c;
+ box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 6px #67b168; }
+ #jsxc_dialog .has-success .input-group-addon {
+ color: #3c763d;
+ border-color: #3c763d;
+ background-color: #dff0d8; }
+ #jsxc_dialog .has-success .form-control-feedback {
+ color: #3c763d; }
+ #jsxc_dialog .has-warning .help-block, #jsxc_dialog .has-warning .control-label, #jsxc_dialog .has-warning .radio, #jsxc_dialog .has-warning .checkbox, #jsxc_dialog .has-warning .radio-inline, #jsxc_dialog .has-warning .checkbox-inline, #jsxc_dialog .has-warning.radio label, #jsxc_dialog .has-warning.checkbox label, #jsxc_dialog .has-warning.radio-inline label, #jsxc_dialog .has-warning.checkbox-inline label {
+ color: #8a6d3b; }
+ #jsxc_dialog .has-warning .form-control {
+ border-color: #8a6d3b;
+ box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075); }
+ #jsxc_dialog .has-warning .form-control:focus {
+ border-color: #66512c;
+ box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 6px #c0a16b; }
+ #jsxc_dialog .has-warning .input-group-addon {
+ color: #8a6d3b;
+ border-color: #8a6d3b;
+ background-color: #fcf8e3; }
+ #jsxc_dialog .has-warning .form-control-feedback {
+ color: #8a6d3b; }
+ #jsxc_dialog .has-error .help-block, #jsxc_dialog .has-error .control-label, #jsxc_dialog .has-error .radio, #jsxc_dialog .has-error .checkbox, #jsxc_dialog .has-error .radio-inline, #jsxc_dialog .has-error .checkbox-inline, #jsxc_dialog .has-error.radio label, #jsxc_dialog .has-error.checkbox label, #jsxc_dialog .has-error.radio-inline label, #jsxc_dialog .has-error.checkbox-inline label {
+ color: #a94442; }
+ #jsxc_dialog .has-error .form-control {
+ border-color: #a94442;
+ box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075); }
+ #jsxc_dialog .has-error .form-control:focus {
+ border-color: #843534;
+ box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 6px #ce8483; }
+ #jsxc_dialog .has-error .input-group-addon {
+ color: #a94442;
+ border-color: #a94442;
+ background-color: #f2dede; }
+ #jsxc_dialog .has-error .form-control-feedback {
+ color: #a94442; }
+ #jsxc_dialog .has-feedback label ~ .form-control-feedback {
+ top: 25px; }
+ #jsxc_dialog .has-feedback label.sr-only ~ .form-control-feedback {
+ top: 0; }
+ #jsxc_dialog .help-block {
+ display: block;
+ margin-top: 5px;
+ margin-bottom: 10px;
+ color: #737373; }
+ @media (min-width: 768px) {
+ #jsxc_dialog .form-inline .form-group {
+ display: inline-block;
+ margin-bottom: 0;
+ vertical-align: middle; }
+
+ #jsxc_dialog .form-inline .form-control {
+ display: inline-block;
+ width: auto;
+ vertical-align: middle; }
+
+ #jsxc_dialog .form-inline .form-control-static {
+ display: inline-block; }
+
+ #jsxc_dialog .form-inline .input-group {
+ display: inline-table;
+ vertical-align: middle; }
+ #jsxc_dialog .form-inline .input-group .input-group-addon, #jsxc_dialog .form-inline .input-group .input-group-btn, #jsxc_dialog .form-inline .input-group .form-control {
+ width: auto; }
+
+ #jsxc_dialog .form-inline .input-group > .form-control {
+ width: 100%; }
+
+ #jsxc_dialog .form-inline .control-label {
+ margin-bottom: 0;
+ vertical-align: middle; }
+
+ #jsxc_dialog .form-inline .radio, #jsxc_dialog .form-inline .checkbox {
+ display: inline-block;
+ margin-top: 0;
+ margin-bottom: 0;
+ vertical-align: middle; }
+ #jsxc_dialog .form-inline .radio label, #jsxc_dialog .form-inline .checkbox label {
+ padding-left: 0; }
+
+ #jsxc_dialog .form-inline .radio input[type="radio"], #jsxc_dialog .form-inline .checkbox input[type="checkbox"] {
+ position: relative;
+ margin-left: 0; }
+
+ #jsxc_dialog .form-inline .has-feedback .form-control-feedback {
+ top: 0; }
+ }
+ #jsxc_dialog .form-horizontal .radio, #jsxc_dialog .form-horizontal .checkbox, #jsxc_dialog .form-horizontal .radio-inline, #jsxc_dialog .form-horizontal .checkbox-inline {
+ margin-top: 0;
+ margin-bottom: 0;
+ padding-top: 7px; }
+ #jsxc_dialog .form-horizontal .radio, #jsxc_dialog .form-horizontal .checkbox {
+ min-height: 27px; }
+ #jsxc_dialog .form-horizontal .form-group {
+ margin-left: -15px;
+ margin-right: -15px; }
+ #jsxc_dialog .form-horizontal .form-group:before, #jsxc_dialog .form-horizontal .form-group:after {
+ content: " ";
+ display: table; }
+ #jsxc_dialog .form-horizontal .form-group:after {
+ clear: both; }
+ @media (min-width: 768px) {
+ #jsxc_dialog .form-horizontal .control-label {
+ text-align: right;
+ margin-bottom: 0;
+ padding-top: 7px; }
+ }
+ #jsxc_dialog .form-horizontal .has-feedback .form-control-feedback {
+ right: 15px; }
+ @media (min-width: 768px) {
+ #jsxc_dialog .form-horizontal .form-group-lg .control-label {
+ padding-top: 14.333333px; }
+ }
+ @media (min-width: 768px) {
+ #jsxc_dialog .form-horizontal .form-group-sm .control-label {
+ padding-top: 6px; }
+ }
+ #jsxc_dialog .progress {
+ overflow: hidden;
+ height: 20px;
+ margin-bottom: 20px;
+ background-color: #f5f5f5;
+ border-radius: 4px;
+ box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.1); }
+ #jsxc_dialog .progress-bar {
+ float: left;
+ width: 0%;
+ height: 100%;
+ font-size: 12px;
+ line-height: 20px;
+ color: #fff;
+ text-align: center;
+ background-color: #337ab7;
+ box-shadow: inset 0 -1px 0 rgba(0, 0, 0, 0.15);
+ -webkit-transition: width 0.6s ease;
+ transition: width 0.6s ease; }
+ #jsxc_dialog .progress-striped .progress-bar, #jsxc_dialog .progress-bar-striped {
+ background-image: -webkit-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);
+ background-image: linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);
+ background-size: 40px 40px; }
+ #jsxc_dialog .progress.active .progress-bar, #jsxc_dialog .progress-bar.active {
+ -webkit-animation: progress-bar-stripes 2s linear infinite;
+ animation: progress-bar-stripes 2s linear infinite; }
+ #jsxc_dialog .progress-bar-success {
+ background-color: #5cb85c; }
+ .progress-striped #jsxc_dialog .progress-bar-success {
+ background-image: -webkit-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);
+ background-image: linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent); }
+ #jsxc_dialog .progress-bar-info {
+ background-color: #5bc0de; }
+ .progress-striped #jsxc_dialog .progress-bar-info {
+ background-image: -webkit-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);
+ background-image: linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent); }
+ #jsxc_dialog .progress-bar-warning {
+ background-color: #f0ad4e; }
+ .progress-striped #jsxc_dialog .progress-bar-warning {
+ background-image: -webkit-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);
+ background-image: linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent); }
+ #jsxc_dialog .progress-bar-danger {
+ background-color: #d9534f; }
+ .progress-striped #jsxc_dialog .progress-bar-danger {
+ background-image: -webkit-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);
+ background-image: linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent); }
+ #jsxc_dialog .progress {
+ margin-bottom: 0px; }
+
+.mfp-bg {
+ z-index: 9000; }
+
+.mfp-wrap {
+ z-index: 9010; }
+
+.mfp-content {
+ text-align: center; }
+
+#jsxc_dialog .mfp-close {
+ font-size: 23px; }
+
+/* END: bootstrap */
#jsxc_buddylist li:hover .jsxc_avatar, .jsxc_avatar {
width: 25px;
height: 25px;
@@ -75,25 +2087,24 @@ div.jsxc_transfer, div.jsxc_transfer.jsxc_disabled:hover {
#jsxc_buddylist li.jsxc_expand .jsxc_avatar img {
width: 48px;
height: 48px; }
- #jsxc_buddylist li .jsxc_name:before {
- content: ' ';
- width: 0;
- height: 0;
- display: inline-block;
- opacity: 0;
- -webkit-transition: width 0.5s, opacity 0.5s;
- transition: width 0.5s, opacity 0.5s; }
- #jsxc_buddylist li.jsxc_unreadMsg .jsxc_name:before {
- width: 12px;
- height: 12px;
- border-radius: 6px;
- background-color: #ffa500;
- margin-right: 3px;
- opacity: 1;
- -webkit-transition: width 0.5s, opacity 0.5s;
- transition: width 0.5s, opacity 0.5s; }
+ #jsxc_buddylist li.jsxc_bookmarked .jsxc_avatar:after {
+ content: " ";
+ width: 20%;
+ height: 30%;
+ position: absolute;
+ top: 0;
+ right: 2px;
+ background-size: contain;
+ background-repeat: no-repeat;
+ background-image: url("../img/bookmark_red.svg"); }
+ #jsxc_buddylist li.jsxc_bookmarked .jsxc_bookmarkOptions {
+ text-indent: 9999px;
+ background-image: url("../img/gear_white.svg");
+ background-size: 15px 15px; }
#jsxc_buddylist .jsxc_name {
padding-right: 30px; }
+ #jsxc_buddylist .jsxc_unreadMsg .jsxc_name {
+ padding-right: 0px; }
#jsxc_buddylist .jsxc_oneway {
opacity: 0.7; }
#jsxc_buddylist .jsxc_right {
@@ -107,6 +2118,9 @@ div.jsxc_transfer, div.jsxc_transfer.jsxc_disabled:hover {
color: #fff; }
#jsxc_buddylist .jsxc_right div:hover {
opacity: 1; }
+ #jsxc_buddylist .jsxc_unread {
+ margin-right: 30px;
+ margin-top: 6px; }
#jsxc_buddylist .jsxc_control {
position: absolute;
width: 30px;
@@ -280,7 +2294,7 @@ div.jsxc_transfer, div.jsxc_transfer.jsxc_disabled:hover {
border-left: 4px solid #999999;
z-index: 80;
margin-left: 10px;
- box-shadow: 0px 0px 7px #000;
+ box-shadow: 0px 0px 7px inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 6px #ce8483;
background-color: #333333; }
#jsxc_roster a {
cursor: pointer; }
@@ -335,6 +2349,10 @@ div.jsxc_transfer, div.jsxc_transfer.jsxc_disabled:hover {
display: none; }
#jsxc_roster.jsxc_noConnection > .jsxc_bottom {
display: none; }
+ #jsxc_roster.jsxc_state_hidden #jsxc_toggleRoster:before {
+ -webkit-transform: rotate(0deg);
+ -ms-transform: rotate(0deg);
+ transform: rotate(0deg); }
#jsxc_toggleRoster {
width: 14px;
@@ -347,6 +2365,19 @@ div.jsxc_transfer, div.jsxc_transfer.jsxc_disabled:hover {
cursor: pointer; }
#jsxc_toggleRoster:hover {
background-color: rgba(153, 153, 153, 0.5); }
+ #jsxc_toggleRoster:before {
+ content: '';
+ position: absolute;
+ display: block;
+ width: 0;
+ top: 50%;
+ right: 0px;
+ border-style: solid;
+ border-width: 6px 4px 6px 0;
+ border-color: transparent #333333;
+ -webkit-transform: rotate(180deg);
+ -ms-transform: rotate(180deg);
+ transform: rotate(180deg); }
#jsxc_roster > .jsxc_bottom {
position: absolute;
@@ -495,9 +2526,16 @@ li[data-type="groupchat"] .jsxc_video {
max-width: 500px; }
#jsxc_dialog {
- padding: 10px;
- min-width: 300px;
- display: inline-block; }
+ padding: 20px;
+ min-width: 320px;
+ display: inline-block;
+ text-align: left;
+ position: relative;
+ background: #FFF;
+ width: auto;
+ border-radius: 5px; }
+ #jsxc_dialog * {
+ box-sizing: border-box; }
#jsxc_dialog ul {
list-style: none;
margin: 0;
@@ -513,11 +2551,11 @@ li[data-type="groupchat"] .jsxc_video {
outline: none; }
#jsxc_dialog p input[type="submit"] {
width: auto; }
- #jsxc_dialog p label {
- display: block;
- width: 30%;
- float: left;
- padding: 6px 0; }
+ #jsxc_dialog hr {
+ border: 0;
+ border-top: 1px solid #eee;
+ margin-top: 20px;
+ margin-bottom: 20px; }
#jsxc_dialog h3 {
font-size: 120%;
font-weight: bold;
@@ -525,25 +2563,23 @@ li[data-type="groupchat"] .jsxc_video {
margin-top: 20px; }
#jsxc_dialog .jsxc_right {
margin-top: 20px; }
+ #jsxc_dialog form fieldset {
+ margin-bottom: 30px; }
#jsxc_dialog fieldset {
- border: 2px solid #cccccc; }
+ border-bottom: 1px solid #eee; }
#jsxc_dialog legend {
- padding: 0 10px;
- font-weight: bold; }
+ border: 0;
+ font-size: 20px; }
#jsxc_dialog input {
outline: none; }
#jsxc_dialog input:invalid {
border: 1px solid #f00; }
- #jsxc_dialog .jsxc_fieldset {
- width: 280px;
- padding: 10px;
- border-radius: 3px; }
- #jsxc_dialog .jsxc_fieldset label {
- display: inline-block;
- width: 100px; }
- #jsxc_dialog .jsxc_fieldset input[type="Number"] {
- display: inline-block;
- width: 50px; }
+ #jsxc_dialog .btn-group button {
+ margin-right: 0; }
+ #jsxc_dialog input[type="range"] {
+ display: inline;
+ height: 34px;
+ vertical-align: bottom; }
#jsxc_dialog input[readonly] {
background-color: #e6e6e6; }
#jsxc_dialog .jsxc_inputinfo {
@@ -601,6 +2637,23 @@ ul.jsxc_vCard {
.jsxc_spot.jsxc_offline {
background-color: #999999; }
+.jsxc_unread {
+ display: none; }
+
+.jsxc_unreadMsg .jsxc_name {
+ font-style: italic; }
+.jsxc_unreadMsg .jsxc_unread {
+ display: block;
+ background-color: #ffa500;
+ border-radius: 11px;
+ color: #000;
+ font-size: 80%;
+ padding: 2px;
+ line-height: 15px;
+ float: right;
+ margin-right: 3px;
+ margin-top: 4px; }
+
#jsxc_menu {
height: 30px;
width: 30px;
@@ -643,32 +2696,26 @@ ul.jsxc_vCard {
background-position: center center; }
@-webkit-keyframes bounce {
-
0% {
bottom: 0;
-webkit-animation-timing-function: ease-in;
animation-timing-function: ease-in; }
-
12% {
bottom: 5px;
-webkit-animation-timing-function: ease-out;
animation-timing-function: ease-out; }
-
25% {
bottom: 0;
-webkit-animation-timing-function: ease-in;
animation-timing-function: ease-in; }
-
37% {
bottom: 5px;
-webkit-animation-timing-function: ease-out;
animation-timing-function: ease-out; }
-
50% {
bottom: 0;
-webkit-animation-timing-function: ease-in;
animation-timing-function: ease-in; }
-
100% {
bottom: 0; } }
@@ -738,10 +2785,6 @@ ul.jsxc_vCard {
white-space: normal; }
#jsxc_windowList > ul > li.jsxc_min {
width: 200px !important; }
- #jsxc_windowList > ul > li.jsxc_unreadMsg .jsxc_name {
- font-style: italic; }
- #jsxc_windowList > ul > li.jsxc_unreadMsg .jsxc_cycle {
- background-color: #ffa500; }
#jsxc_windowListSB {
position: fixed;
@@ -782,14 +2825,6 @@ ul.jsxc_vCard {
box-sizing: border-box;
overflow: hidden; }
-.jsxc_cycle {
- position: absolute;
- bottom: 9px;
- right: 5px;
- height: 12px;
- width: 12px;
- border-radius: 6px; }
-
.jsxc_window {
position: absolute;
bottom: 0;
@@ -1036,7 +3071,7 @@ div.jsxc_settings {
position: absolute;
top: 30px;
left: 0;
- box-shadow: 0 5px 5px -5px #000;
+ box-shadow: 0 5px 5px -5px inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 6px #ce8483;
z-index: 110;
overflow: visible;
background-color: #1a1a1a;
diff --git a/build/js/jsxc/css/jsxc.webrtc.css b/build/js/jsxc/css/jsxc.webrtc.css
index ec6c174..1ebfdb9 100644
--- a/build/js/jsxc/css/jsxc.webrtc.css
+++ b/build/js/jsxc/css/jsxc.webrtc.css
@@ -121,7 +121,8 @@ div.jsxc_video {
background-image: url("../img/camera_icon_white.svg"); }
.jsxc_controlbar {
- width: 640px; }
+ width: 640px;
+ margin-top: 10px; }
.jsxc_controlbar .jsxc_showchat {
float: right; }
diff --git a/build/js/jsxc/img/bookmark_red.svg b/build/js/jsxc/img/bookmark_red.svg
new file mode 100644
index 0000000..be4808b
--- /dev/null
+++ b/build/js/jsxc/img/bookmark_red.svg
@@ -0,0 +1,74 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!-- Created with Inkscape (http://www.inkscape.org/) -->
+
+<svg
+ xmlns:dc="http://purl.org/dc/elements/1.1/"
+ xmlns:cc="http://creativecommons.org/ns#"
+ xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
+ xmlns:svg="http://www.w3.org/2000/svg"
+ xmlns="http://www.w3.org/2000/svg"
+ xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
+ xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
+ width="12.923695"
+ height="19.551229"
+ viewBox="0 0 3.4193941 5.1729296"
+ id="svg2"
+ version="1.1"
+ inkscape:version="0.91+devel r"
+ sodipodi:docname="bookmark_red.svg">
+ <defs
+ id="defs4" />
+ <sodipodi:namedview
+ id="base"
+ pagecolor="#ffffff"
+ bordercolor="#666666"
+ borderopacity="1.0"
+ inkscape:pageopacity="0.0"
+ inkscape:pageshadow="2"
+ inkscape:zoom="22.4"
+ inkscape:cx="-1.621067"
+ inkscape:cy="11.999492"
+ inkscape:document-units="mm"
+ inkscape:current-layer="layer1"
+ showgrid="false"
+ units="px"
+ fit-margin-top="0"
+ fit-margin-left="0"
+ fit-margin-right="0"
+ fit-margin-bottom="0"
+ inkscape:window-width="1855"
+ inkscape:window-height="1056"
+ inkscape:window-x="65"
+ inkscape:window-y="24"
+ inkscape:window-maximized="1" />
+ <metadata
+ id="metadata7">
+ <rdf:RDF>
+ <cc:Work
+ rdf:about="">
+ <dc:format>image/svg+xml</dc:format>
+ <dc:type
+ rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
+ <dc:title></dc:title>
+ </cc:Work>
+ </rdf:RDF>
+ </metadata>
+ <g
+ inkscape:label="Layer 1"
+ inkscape:groupmode="layer"
+ id="layer1"
+ transform="translate(-0.88782864,-291.84497)">
+ <path
+ style="fill:none;fill-rule:evenodd;stroke:#800000;stroke-width:0.26458332;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
+ d="m 1.0201203,291.84497 0,4.85355 1.5774055,-1.5774 1.5774053,1.5774 0,-4.83839"
+ id="path4141"
+ inkscape:connector-curvature="0"
+ sodipodi:nodetypes="ccccc" />
+ <path
+ inkscape:connector-curvature="0"
+ id="path4162"
+ d="m 1.0201203,291.84497 0,4.85355 1.5774055,-1.5774 1.5774053,1.5774 0,-4.83839"
+ style="fill:#ff0000;fill-rule:evenodd;stroke:none;stroke-width:0.26458332;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
+ sodipodi:nodetypes="ccccc" />
+ </g>
+</svg>
diff --git a/build/js/jsxc/jsxc.js b/build/js/jsxc/jsxc.js
index bf13bc4..94d82e8 100644
--- a/build/js/jsxc/jsxc.js
+++ b/build/js/jsxc/jsxc.js
@@ -1,5 +1,5 @@
/*!
- * jsxc v2.0.1 - 2015-05-23
+ * jsxc v2.1.0-beta1 - 2015-07-21
*
* Copyright (c) 2015 Klaus Herberth <klaus@jsxc.org> <br>
* Released under the MIT license
@@ -7,7 +7,7 @@
* Please see http://www.jsxc.org/
*
* @author Klaus Herberth <klaus@jsxc.org>
- * @version 2.0.1
+ * @version 2.1.0-beta1
* @license MIT
*/
@@ -25,7 +25,7 @@ var jsxc = null, RTC = null, RTCPeerconnection = null;
*/
jsxc = {
/** Version of jsxc */
- version: '2.0.1',
+ version: '2.1.0-beta1',
/** True if i'm the master */
master: false,
@@ -48,7 +48,7 @@ jsxc = {
/** Interval for keep-alive */
keepalive: null,
- /** True if last activity was 10 min ago */
+ /** True if last activity was up to 10 min ago */
restore: false,
/** True if restore is complete */
@@ -83,7 +83,7 @@ jsxc = {
NOTIFICATION_DEFAULT: 'default',
NOTIFICATION_GRANTED: 'granted',
NOTIFICATION_DENIED: 'denied',
- STATUS: [ 'offline', 'dnd', 'xa', 'away', 'chat', 'online' ],
+ STATUS: ['offline', 'dnd', 'xa', 'away', 'chat', 'online'],
SOUNDS: {
MSG: 'incomingMessage.wav',
CALL: 'Rotary-Phone6.mp3',
@@ -113,7 +113,8 @@ jsxc = {
var year = msgDate.getFullYear();
var hours = ('0' + msgDate.getHours()).slice(-2);
var minutes = ('0' + msgDate.getMinutes()).slice(-2);
- var dateNow = new Date(), time = hours + ':' + minutes;
+ var dateNow = new Date(),
+ time = hours + ':' + minutes;
// compare dates only
dateNow.setHours(0, 0, 0, 0);
@@ -202,7 +203,7 @@ jsxc = {
}
// Check localStorage
- if (typeof (localStorage) === 'undefined') {
+ if (typeof(localStorage) === 'undefined') {
jsxc.warn("Browser doesn't support localStorage.");
return;
}
@@ -269,15 +270,15 @@ jsxc = {
$(document).on('connectionReady.jsxc', function() {
// Looking for logout element
- if (jsxc.options.logoutElement !== null && jsxc.options.logoutElement.length > 0) {
- var logout = function() {
- jsxc.options.logoutElement = $(this);
- jsxc.triggeredFromLogout = true;
- return jsxc.xmpp.logout();
- };
+ if (jsxc.options.logoutElement !== null && jsxc.options.logoutElement.length > 0) {
+ var logout = function() {
+ jsxc.options.logoutElement = $(this);
+ jsxc.triggeredFromLogout = true;
+ return jsxc.xmpp.logout();
+ };
- jsxc.options.logoutElement.off('click', null, logout).one('click', logout);
- }
+ jsxc.options.logoutElement.off('click', null, logout).one('click', logout);
+ }
});
// Check if we have to establish a new connection
@@ -288,7 +289,7 @@ jsxc = {
jsxc.storage.removeItem('sid');
// Looking for a login form
- if (!jsxc.options.loginForm.form || !(jsxc.el_exists(jsxc.options.loginForm.form) && jsxc.el_exists(jsxc.options.loginForm.jid) && jsxc.el_exists(jsxc.options.loginForm.pass))) {
+ if (!jsxc.isLoginForm()) {
if (jsxc.options.displayRosterMinimized()) {
// Show minimized roster
@@ -322,22 +323,27 @@ jsxc = {
// Add jsxc login action to form
form.submit(function() {
+ jsxc.prepareLogin(function(settings) {
+ if (settings !== false) {
+ // settings.xmpp.onlogin is deprecated since v2.1.0
+ var enabled = (settings.loginForm && settings.loginForm.enable) || (settings.xmpp && settings.xmpp.onlogin);
+ enabled = enabled === "true" || enabled === true;
- var settings = jsxc.prepareLogin();
+ if (enabled) {
+ jsxc.options.loginForm.triggered = true;
- if (settings !== false && (settings.xmpp.onlogin === "true" || settings.xmpp.onlogin === true)) {
- jsxc.options.loginForm.triggered = true;
-
- jsxc.xmpp.login();
-
- // Trigger submit in jsxc.xmpp.connected()
- return false;
- }
+ jsxc.xmpp.login();
+ }
+ } else {
+ jsxc.submitLoginForm();
+ }
+ });
- return true;
+ // Trigger submit in jsxc.xmpp.connected()
+ return false;
});
- } else {
+ } else if (!jsxc.isLoginForm() || (jsxc.options.loginForm && jsxc.options.loginForm.attachIfFound)) {
// Restore old connection
@@ -345,7 +351,7 @@ jsxc = {
jsxc.gui.init();
- if (typeof (jsxc.storage.getItem('alive')) === 'undefined' || !jsxc.restore) {
+ if (typeof(jsxc.storage.getItem('alive')) === 'undefined' || !jsxc.restore) {
jsxc.onMaster();
} else {
jsxc.checkMaster();
@@ -354,34 +360,77 @@ jsxc = {
},
/**
+ * Returns true if login form is found.
+ *
+ * @memberOf jsxc
+ * @returns {boolean} True if login form was found.
+ */
+ isLoginForm: function() {
+ return jsxc.options.loginForm.form && jsxc.el_exists(jsxc.options.loginForm.form) && jsxc.el_exists(jsxc.options.loginForm.jid) && jsxc.el_exists(jsxc.options.loginForm.pass);
+ },
+
+ /**
* Load settings and prepare jid.
*
* @memberOf jsxc
- * @returns Loaded settings
+ * @param {string} username
+ * @param {string} password
+ * @param {function} cb Called after login is prepared with result as param
*/
- prepareLogin: function() {
- var username = $(jsxc.options.loginForm.jid).val();
- var password = $(jsxc.options.loginForm.pass).val();
-
- if (typeof jsxc.options.loadSettings !== 'function') {
- jsxc.error('No loadSettings function given. Abort.');
- return;
+ prepareLogin: function(username, password, cb) {
+ if (typeof username === 'function') {
+ cb = username;
+ username = null;
}
+ username = username || $(jsxc.options.loginForm.jid).val();
+ password = password || $(jsxc.options.loginForm.pass).val();
if (!jsxc.triggeredFromBox && (jsxc.options.loginForm.onConnecting === 'dialog' || typeof jsxc.options.loginForm.onConnecting === 'undefined')) {
- jsxc.gui.showWaitAlert($.t('Logging_in'));
+ jsxc.gui.showWaitAlert($.t('Logging_in'));
}
- var settings = jsxc.options.loadSettings.call(this, username, password);
+ var settings;
- if (settings === false || settings === null || typeof settings === 'undefined') {
+ if (typeof jsxc.options.loadSettings === 'function') {
+ settings = jsxc.options.loadSettings.call(this, username, password, function(s) {
+ jsxc._prepareLogin(username, password, cb, s);
+ });
+
+ if (typeof settings !== 'undefined') {
+ jsxc._prepareLogin(username, password, cb, settings);
+ }
+ } else {
+ jsxc._prepareLogin(username, password, cb);
+ }
+ },
+
+ /**
+ * Process xmpp settings and save loaded settings.
+ *
+ * @private
+ * @memberOf jsxc
+ * @param {string} username
+ * @param {string} password
+ * @param {function} cb Called after login is prepared with result as param
+ * @param {object} [loadedSettings] additonal options
+ */
+ _prepareLogin: function(username, password, cb, loadedSettings) {
+ if (loadedSettings === false) {
jsxc.warn('No settings provided');
- return false;
+ cb(false);
+ return;
}
// prevent to modify the original object
- settings = $.extend(true, {}, settings);
+ var settings = $.extend(true, {}, jsxc.options);
+
+ if (loadedSettings) {
+ // overwrite current options with loaded settings;
+ settings = $.extend(true, settings, loadedSettings);
+ } else {
+ loadedSettings = {};
+ }
if (typeof settings.xmpp.username === 'string') {
username = settings.xmpp.username;
@@ -407,14 +456,24 @@ jsxc = {
settings.xmpp.domain = jid.split('@')[1].split('/')[0];
settings.xmpp.resource = jid.split('@')[1].split('/')[1] || "";
- $.each(settings, function(key, val) {
+ if (!loadedSettings.xmpp) {
+ // force xmpp settings to be saved to storage
+ loadedSettings.xmpp = {};
+ }
+
+ // save loaded settings to storage
+ $.each(loadedSettings, function(key) {
+ var old = jsxc.options.get(key);
+ var val = settings[key];
+ val = $.extend(true, old, val);
+
jsxc.options.set(key, val);
});
jsxc.options.xmpp.jid = jid;
jsxc.options.xmpp.password = password;
- return settings;
+ cb(settings);
},
/**
@@ -483,7 +542,7 @@ jsxc = {
// Prepare notifications
if (jsxc.restore) {
var noti = jsxc.storage.getUserItem('notification');
- noti = (typeof noti === 'number')? noti : 2;
+ noti = (typeof noti === 'number') ? noti : 2;
if (jsxc.options.notification && noti > 0 && jsxc.notification.hasSupport()) {
if (jsxc.notification.hasPermission()) {
jsxc.notification.init();
@@ -774,7 +833,7 @@ jsxc = {
return fn.apply(null, fnParams);
}
},
-
+
/**
* Hash string into 32-bit signed integer.
*
@@ -783,14 +842,15 @@ jsxc = {
* @returns {integer} 32-bit signed integer
*/
hashStr: function(str) {
- var hash = 0, i;
+ var hash = 0,
+ i;
if (str.length === 0) {
return hash;
}
-
+
for (i = 0; i < str.length; i++) {
- hash = ((hash << 5) - hash) + str.charCodeAt(i);
+ hash = ((hash << 5) - hash) + str.charCodeAt(i);
hash |= 0; // Convert to 32bit integer
}
@@ -799,13 +859,1187 @@ jsxc = {
};
/**
+ * Handle XMPP stuff.
+ *
+ * @namespace jsxc.xmpp
+ */
+jsxc.xmpp = {
+ conn: null, // connection
+
+ /**
+ * Create new connection or attach to old
+ *
+ * @name login
+ * @memberOf jsxc.xmpp
+ */
+ /**
+ * Create new connection with given parameters.
+ *
+ * @name login^2
+ * @param {string} jid
+ * @param {string} password
+ * @memberOf jsxc.xmpp
+ */
+ /**
+ * Attach connection with given parameters.
+ *
+ * @name login^3
+ * @param {string} jid
+ * @param {string} sid
+ * @param {string} rid
+ * @memberOf jsxc.xmpp
+ */
+ login: function() {
+
+ if (jsxc.xmpp.conn && jsxc.xmpp.conn.authenticated) {
+ return;
+ }
+
+ var jid = null,
+ password = null,
+ sid = null,
+ rid = null;
+
+ switch (arguments.length) {
+ case 2:
+ jid = arguments[0];
+ password = arguments[1];
+ break;
+ case 3:
+ jid = arguments[0];
+ sid = arguments[1];
+ rid = arguments[2];
+ break;
+ default:
+ sid = jsxc.storage.getItem('sid');
+ rid = jsxc.storage.getItem('rid');
+
+ if (sid !== null && rid !== null) {
+ jid = jsxc.storage.getItem('jid');
+ } else {
+ sid = null;
+ rid = null;
+ jid = jsxc.options.xmpp.jid;
+ }
+ }
+
+ var url = jsxc.options.get('xmpp').url;
+
+ if (!(jsxc.xmpp.conn && jsxc.xmpp.conn.connected)) {
+ // Register eventlistener
+ $(document).on('connected.jsxc', jsxc.xmpp.connected);
+ $(document).on('attached.jsxc', jsxc.xmpp.attached);
+ $(document).on('disconnected.jsxc', jsxc.xmpp.disconnected);
+ $(document).on('ridChange', jsxc.xmpp.onRidChange);
+ $(document).on('connfail.jsxc', jsxc.xmpp.onConnfail);
+ $(document).on('authfail.jsxc', jsxc.xmpp.onAuthFail);
+
+ Strophe.addNamespace('RECEIPTS', 'urn:xmpp:receipts');
+ }
+
+ // Create new connection (no login)
+ jsxc.xmpp.conn = new Strophe.Connection(url);
+
+ // Override default function to preserve unique id
+ var stropheGetUniqueId = jsxc.xmpp.conn.getUniqueId;
+ jsxc.xmpp.conn.getUniqueId = function(suffix) {
+ var uid = stropheGetUniqueId.call(jsxc.xmpp.conn, suffix);
+ jsxc.storage.setItem('_uniqueId', jsxc.xmpp.conn._uniqueId);
+
+ return uid;
+ };
+
+ if (jsxc.storage.getItem('debug') === true) {
+ jsxc.xmpp.conn.xmlInput = function(data) {
+ console.log('<', data);
+ };
+ jsxc.xmpp.conn.xmlOutput = function(data) {
+ console.log('>', data);
+ };
+ }
+
+ var callback = function(status, condition) {
+
+ jsxc.debug(Object.getOwnPropertyNames(Strophe.Status)[status] + ': ' + condition);
+
+ switch (status) {
+ case Strophe.Status.CONNECTING:
+ $(document).trigger('connecting.jsxc');
+ break;
+ case Strophe.Status.CONNECTED:
+ jsxc.bid = jsxc.jidToBid(jsxc.xmpp.conn.jid.toLowerCase());
+ $(document).trigger('connected.jsxc');
+ break;
+ case Strophe.Status.ATTACHED:
+ $(document).trigger('attached.jsxc');
+ break;
+ case Strophe.Status.DISCONNECTED:
+ $(document).trigger('disconnected.jsxc');
+ break;
+ case Strophe.Status.CONNFAIL:
+ $(document).trigger('connfail.jsxc');
+ break;
+ case Strophe.Status.AUTHFAIL:
+ $(document).trigger('authfail.jsxc');
+ break;
+ }
+ };
+
+ if (jsxc.xmpp.conn.caps) {
+ jsxc.xmpp.conn.caps.node = 'http://jsxc.org/';
+ }
+
+ if (jsxc.restore && sid && rid) {
+ jsxc.debug('Try to attach');
+ jsxc.debug('SID: ' + sid);
+ jsxc.xmpp.conn.attach(jid, sid, rid, callback);
+ } else {
+ jsxc.debug('New connection');
+
+ if (jsxc.xmpp.conn.caps) {
+ // Add system handler, because user handler isn't called before
+ // we are authenticated
+ jsxc.xmpp.conn._addSysHandler(function(stanza) {
+ var from = jsxc.xmpp.conn.domain,
+ c = stanza.querySelector('c'),
+ ver = c.getAttribute('ver'),
+ node = c.getAttribute('node');
+
+ var _jidNodeIndex = JSON.parse(localStorage.getItem('strophe.caps._jidNodeIndex')) || {};
+
+ jsxc.xmpp.conn.caps._jidVerIndex[from] = ver;
+ _jidNodeIndex[from] = node;
+
+ localStorage.setItem('strophe.caps._jidVerIndex', JSON.stringify(jsxc.xmpp.conn.caps._jidVerIndex));
+ localStorage.setItem('strophe.caps._jidNodeIndex', JSON.stringify(_jidNodeIndex));
+ }, Strophe.NS.CAPS);
+ }
+
+ jsxc.xmpp.conn.connect(jid || jsxc.options.xmpp.jid, password || jsxc.options.xmpp.password, callback);
+ }
+ },
+
+ /**
+ * Logs user out of his xmpp session and does some clean up.
+ *
+ * @param {boolean} complete If set to false, roster will not be removed
+ * @returns {Boolean}
+ */
+ logout: function(complete) {
+
+ // instruct all tabs
+ jsxc.storage.removeItem('sid');
+
+ // clean up
+ jsxc.storage.removeUserItem('buddylist');
+ jsxc.storage.removeUserItem('windowlist');
+ jsxc.storage.removeItem('_uniqueId');
+
+ if (!jsxc.master) {
+ $('#jsxc_roster').remove();
+ $('#jsxc_windowlist').remove();
+ return true;
+ }
+
+ if (jsxc.xmpp.conn === null) {
+ return true;
+ }
+
+ // Hide dropdown menu
+ $('body').click();
+
+ jsxc.triggeredFromElement = (typeof complete === 'boolean') ? complete : true;
+
+ // restore all otr objects
+ $.each(jsxc.storage.getUserItem('otrlist') || {}, function(i, val) {
+ jsxc.otr.create(val);
+ });
+
+ var numOtr = Object.keys(jsxc.otr.objects || {}).length + 1;
+ var disReady = function() {
+ if (--numOtr <= 0) {
+ jsxc.xmpp.conn.flush();
+
+ setTimeout(function() {
+ jsxc.xmpp.conn.disconnect();
+ }, 600);
+ }
+ };
+
+ // end all private conversations
+ $.each(jsxc.otr.objects || {}, function(key, obj) {
+ if (obj.msgstate === OTR.CONST.MSGSTATE_ENCRYPTED) {
+ obj.endOtr.call(obj, function() {
+ obj.init.call(obj);
+ jsxc.otr.backup(key);
+
+ disReady();
+ });
+ } else {
+ disReady();
+ }
+ });
+
+ disReady();
+
+ // Trigger real logout in jsxc.xmpp.disconnected()
+ return false;
+ },
+
+ /**
+ * Triggered if connection is established
+ *
+ * @private
+ */
+ connected: function() {
+
+ jsxc.xmpp.conn.pause();
+
+ var nomJid = Strophe.getBareJidFromJid(jsxc.xmpp.conn.jid).toLowerCase() + '/' + Strophe.getResourceFromJid(jsxc.xmpp.conn.jid);
+
+ // Save sid and jid
+ jsxc.storage.setItem('sid', jsxc.xmpp.conn._proto.sid);
+ jsxc.storage.setItem('jid', nomJid);
+
+ jsxc.storage.setItem('lastActivity', (new Date()).getTime());
+
+ // make shure roster will be reloaded
+ jsxc.storage.removeUserItem('buddylist');
+
+ jsxc.storage.removeUserItem('windowlist');
+ jsxc.storage.removeUserItem('own');
+ jsxc.storage.removeUserItem('avatar', 'own');
+ jsxc.storage.removeUserItem('otrlist');
+ jsxc.storage.removeUserItem('unreadMsg');
+
+ // reset user options
+ jsxc.storage.removeUserElement('options', 'RTCPeerConfig');
+
+ if (jsxc.options.loginForm.triggered) {
+ switch (jsxc.options.loginForm.onConnected || 'submit') {
+ case 'submit':
+ jsxc.submitLoginForm();
+ /* falls through */
+ case false:
+ jsxc.xmpp.connectionReady();
+ return;
+ }
+ }
+
+ // start chat
+
+ jsxc.gui.init();
+ $('#jsxc_roster').removeClass('jsxc_noConnection');
+ jsxc.onMaster();
+ jsxc.xmpp.conn.resume();
+ jsxc.gui.dialog.close();
+ jsxc.restoreCompleted = true;
+ $(document).trigger('attached.jsxc');
+ },
+
+ /**
+ * Triggered if connection is attached
+ *
+ * @private
+ */
+ attached: function() {
+
+ jsxc.xmpp.conn.addHandler(jsxc.xmpp.onRosterChanged, 'jabber:iq:roster', 'iq', 'set');
+ jsxc.xmpp.conn.addHandler(jsxc.xmpp.onMessage, null, 'message', 'chat');
+ jsxc.xmpp.conn.addHandler(jsxc.xmpp.onReceived, null, 'message');
+ jsxc.xmpp.conn.addHandler(jsxc.xmpp.onPresence, null, 'presence');
+
+ var caps = jsxc.xmpp.conn.caps;
+ var domain = jsxc.xmpp.conn.domain;
+
+ if (caps) {
+ var conditionalEnable = function() {};
+
+ if (jsxc.options.get('carbons').enable) {
+ conditionalEnable = function() {
+ if (jsxc.xmpp.conn.caps.hasFeatureByJid(domain, jsxc.CONST.NS.CARBONS)) {
+ jsxc.xmpp.carbons.enable();
+ }
+ };
+
+ $(document).on('caps.strophe', function onCaps(ev, from) {
+
+ if (from !== domain) {
+ return;
+ }
+
+ conditionalEnable();
+
+ $(document).off('caps.strophe', onCaps);
+ });
+ }
+
+ if (typeof caps._knownCapabilities[caps._jidVerIndex[domain]] === 'undefined') {
+ var _jidNodeIndex = JSON.parse(localStorage.getItem('strophe.caps._jidNodeIndex')) || {};
+
+ jsxc.debug('Request server capabilities');
+
+ caps._requestCapabilities(jsxc.xmpp.conn.domain, _jidNodeIndex[domain], caps._jidVerIndex[domain]);
+ } else {
+ // We know server caps
+ conditionalEnable();
+ }
+ }
+
+ // Only load roaster if necessary
+ if (!jsxc.restore || !jsxc.storage.getUserItem('buddylist')) {
+ // in order to not overide existing presence information, we send
+ // pres first after roster is ready
+ $(document).one('cloaded.roster.jsxc', jsxc.xmpp.sendPres);
+
+ $('#jsxc_roster > p:first').remove();
+
+ var iq = $iq({
+ type: 'get'
+ }).c('query', {
+ xmlns: 'jabber:iq:roster'
+ });
+
+ jsxc.xmpp.conn.sendIQ(iq, jsxc.xmpp.onRoster);
+ } else {
+ jsxc.xmpp.sendPres();
+ }
+
+ jsxc.xmpp.connectionReady();
+ },
+
+ /**
+ * Triggered if the connection is ready
+ */
+ connectionReady: function() {
+
+ // Load saved unique id
+ jsxc.xmpp.conn._uniqueId = jsxc.storage.getItem('_uniqueId') || new Date().getTime();
+
+ $(document).trigger('connectionReady.jsxc');
+ },
+
+ /**
+ * Sends presence stanza to server.
+ */
+ sendPres: function() {
+ // disco stuff
+ if (jsxc.xmpp.conn.disco) {
+ jsxc.xmpp.conn.disco.addIdentity('client', 'web', 'JSXC');
+ jsxc.xmpp.conn.disco.addFeature(Strophe.NS.DISCO_INFO);
+ jsxc.xmpp.conn.disco.addFeature(Strophe.NS.RECEIPTS);
+ }
+
+ // create presence stanza
+ var pres = $pres();
+
+ if (jsxc.xmpp.conn.caps) {
+ // attach caps
+ pres.c('c', jsxc.xmpp.conn.caps.generateCapsAttrs()).up();
+ }
+
+ var presState = jsxc.storage.getUserItem('presence') || 'online';
+ if (presState !== 'online') {
+ pres.c('show').t(presState).up();
+ }
+
+ var priority = jsxc.options.get('priority');
+ if (priority && typeof priority[presState] !== 'undefined' && parseInt(priority[presState]) !== 0) {
+ pres.c('priority').t(priority[presState]).up();
+ }
+
+ jsxc.debug('Send presence', pres.toString());
+ jsxc.xmpp.conn.send(pres);
+ },
+
+ /**
+ * Triggered if lost connection
+ *
+ * @private
+ */
+ disconnected: function() {
+ jsxc.debug('disconnected');
+
+ jsxc.storage.removeItem('sid');
+ jsxc.storage.removeItem('rid');
+ jsxc.storage.removeItem('lastActivity');
+ jsxc.storage.removeItem('hidden');
+ jsxc.storage.removeUserItem('avatar', 'own');
+ jsxc.storage.removeUserItem('otrlist');
+
+ $(document).off('connected.jsxc', jsxc.xmpp.connected);
+ $(document).off('attached.jsxc', jsxc.xmpp.attached);
+ $(document).off('disconnected.jsxc', jsxc.xmpp.disconnected);
+ $(document).off('ridChange', jsxc.xmpp.onRidChange);
+ $(document).off('connfail.jsxc', jsxc.xmpp.onConnfail);
+ $(document).off('authfail.jsxc', jsxc.xmpp.onAuthFail);
+
+ jsxc.xmpp.conn = null;
+
+ $('#jsxc_windowList').remove();
+
+ if (jsxc.triggeredFromElement) {
+ $(document).trigger('toggle.roster.jsxc', ['hidden', 0]);
+ $('#jsxc_roster').remove();
+
+ if (jsxc.triggeredFromLogout) {
+ window.location = jsxc.options.logoutElement.attr('href');
+ }
+ } else {
+ jsxc.gui.roster.noConnection();
+ }
+
+ window.clearInterval(jsxc.keepalive);
+ },
+
+ /**
+ * Triggered on connection fault
+ *
+ * @param {String} condition information why we lost the connection
+ * @private
+ */
+ onConnfail: function(ev, condition) {
+ jsxc.debug('XMPP connection failed: ' + condition);
+
+ if (jsxc.options.loginForm.triggered) {
+ jsxc.submitLoginForm();
+ }
+ },
+
+ /**
+ * Triggered on auth fail.
+ *
+ * @private
+ */
+ onAuthFail: function() {
+
+ if (jsxc.options.loginForm.triggered) {
+ switch (jsxc.options.loginForm.onAuthFail || 'ask') {
+ case 'ask':
+ jsxc.gui.showAuthFail();
+ break;
+ case 'submit':
+ jsxc.submitLoginForm();
+ break;
+ case 'quiet':
+ case false:
+ return;
+ }
+ }
+ },
+
+ /**
+ * Triggered on initial roster load
+ *
+ * @param {dom} iq
+ * @private
+ */
+ onRoster: function(iq) {
+ /*
+ * <iq from='' type='get' id=''> <query xmlns='jabber:iq:roster'> <item
+ * jid='' name='' subscription='' /> ... </query> </iq>
+ */
+
+ jsxc.debug('Load roster', iq);
+
+ var buddies = [];
+
+ $(iq).find('item').each(function() {
+ var jid = $(this).attr('jid');
+ var name = $(this).attr('name') || jid;
+ var bid = jsxc.jidToBid(jid);
+ var sub = $(this).attr('subscription');
+
+ buddies.push(bid);
+
+ jsxc.storage.removeUserItem('res', bid);
+
+ jsxc.storage.saveBuddy(bid, {
+ jid: jid,
+ name: name,
+ status: 0,
+ sub: sub,
+ res: []
+ });
+
+ jsxc.gui.roster.add(bid);
+ });
+
+ if (buddies.length === 0) {
+ jsxc.gui.roster.empty();
+ }
+
+ jsxc.storage.setUserItem('buddylist', buddies);
+
+ // load bookmarks
+ jsxc.xmpp.bookmarks.load();
+
+ jsxc.gui.roster.loaded = true;
+ jsxc.debug('Roster loaded');
+ $(document).trigger('cloaded.roster.jsxc');
+ },
+
+ /**
+ * Triggerd on roster changes
+ *
+ * @param {dom} iq
+ * @returns {Boolean} True to preserve handler
+ * @private
+ */
+ onRosterChanged: function(iq) {
+ /*
+ * <iq from='' type='set' id=''> <query xmlns='jabber:iq:roster'> <item
+ * jid='' name='' subscription='' /> </query> </iq>
+ */
+
+ jsxc.debug('onRosterChanged', iq);
+
+ $(iq).find('item').each(function() {
+ var jid = $(this).attr('jid');
+ var name = $(this).attr('name') || jid;
+ var bid = jsxc.jidToBid(jid);
+ var sub = $(this).attr('subscription');
+ // var ask = $(this).attr('ask');
+
+ if (sub === 'remove') {
+ jsxc.gui.roster.purge(bid);
+ } else {
+ var bl = jsxc.storage.getUserItem('buddylist');
+
+ if (bl.indexOf(bid) < 0) {
+ bl.push(bid); // (INFO) push returns the new length
+ jsxc.storage.setUserItem('buddylist', bl);
+ }
+
+ var temp = jsxc.storage.saveBuddy(bid, {
+ jid: jid,
+ name: name,
+ sub: sub
+ });
+
+ if (temp === 'updated') {
+
+ jsxc.gui.update(bid);
+ jsxc.gui.roster.reorder(bid);
+ } else {
+ jsxc.gui.roster.add(bid);
+ }
+ }
+
+ // Remove pending friendship request from notice list
+ if (sub === 'from' || sub === 'both') {
+ var notices = jsxc.storage.getUserItem('notices');
+ var noticeKey = null,
+ notice;
+
+ for (noticeKey in notices) {
+ notice = notices[noticeKey];
+
+ if (notice.fnName === 'gui.showApproveDialog' && notice.fnParams[0] === jid) {
+ jsxc.debug('Remove notice with key ' + noticeKey);
+
+ jsxc.notice.remove(noticeKey);
+ }
+ }
+ }
+ });
+
+ if (!jsxc.storage.getUserItem('buddylist') || jsxc.storage.getUserItem('buddylist').length === 0) {
+ jsxc.gui.roster.empty();
+ } else {
+ $('#jsxc_roster > p:first').remove();
+ }
+
+ // preserve handler
+ return true;
+ },
+
+ /**
+ * Triggered on incoming presence stanzas
+ *
+ * @param {dom} presence
+ * @private
+ */
+ onPresence: function(presence) {
+ /*
+ * <presence xmlns='jabber:client' type='unavailable' from='' to=''/>
+ *
+ * <presence xmlns='jabber:client' from='' to=''> <priority>5</priority>
+ * <c xmlns='http://jabber.org/protocol/caps'
+ * node='http://psi-im.org/caps' ver='caps-b75d8d2b25' ext='ca cs
+ * ep-notify-2 html'/> </presence>
+ *
+ * <presence xmlns='jabber:client' from='' to=''> <show>chat</show>
+ * <status></status> <priority>5</priority> <c
+ * xmlns='http://jabber.org/protocol/caps' node='http://psi-im.org/caps'
+ * ver='caps-b75d8d2b25' ext='ca cs ep-notify-2 html'/> </presence>
+ */
+ jsxc.debug('onPresence', presence);
+
+ var ptype = $(presence).attr('type');
+ var from = $(presence).attr('from');
+ var jid = Strophe.getBareJidFromJid(from).toLowerCase();
+ var r = Strophe.getResourceFromJid(from);
+ var bid = jsxc.jidToBid(jid);
+ var data = jsxc.storage.getUserItem('buddy', bid) || {};
+ var res = jsxc.storage.getUserItem('res', bid) || {};
+ var status = null;
+ var xVCard = $(presence).find('x[xmlns="vcard-temp:x:update"]');
+
+ if (jid === Strophe.getBareJidFromJid(jsxc.storage.getItem("jid"))) {
+ return true;
+ }
+
+ if (ptype === 'error') {
+ $(document).trigger('error.presence.jsxc', [from, presence]);
+
+ var error = $(presence).find('error');
+
+ //@TODO display error message
+ jsxc.error('[XMPP] ' + error.attr('code') + ' ' + error.find(">:first-child").prop('tagName'));
+ return true;
+ }
+
+ // incoming friendship request
+ if (ptype === 'subscribe') {
+ jsxc.storage.setUserItem('friendReq', {
+ jid: jid,
+ approve: -1
+ });
+ jsxc.notice.add($.t('Friendship_request'), $.t('from') + ' ' + jid, 'gui.showApproveDialog', [jid]);
+
+ return true;
+ } else if (ptype === 'unavailable' || ptype === 'unsubscribed') {
+ status = jsxc.CONST.STATUS.indexOf('offline');
+ } else {
+ var show = $(presence).find('show').text();
+ if (show === '') {
+ status = jsxc.CONST.STATUS.indexOf('online');
+ } else {
+ status = jsxc.CONST.STATUS.indexOf(show);
+ }
+ }
+
+ if (status === 0) {
+ delete res[r];
+ } else {
+ res[r] = status;
+ }
+
+ var maxVal = [];
+ var max = 0,
+ prop = null;
+ for (prop in res) {
+ if (res.hasOwnProperty(prop)) {
+ if (max <= res[prop]) {
+ if (max !== res[prop]) {
+ maxVal = [];
+ max = res[prop];
+ }
+ maxVal.push(prop);
+ }
+ }
+ }
+
+ if (data.status === 0 && max > 0) {
+ // buddy has come online
+ jsxc.notification.notify({
+ title: data.name,
+ msg: $.t('has_come_online'),
+ source: bid
+ });
+ }
+
+ if (data.type === 'groupchat') {
+ data.status = status;
+ } else {
+ data.status = max;
+ }
+
+ data.res = maxVal;
+ data.jid = jid;
+
+ // Looking for avatar
+ if (xVCard.length > 0 && data.type !== 'groupchat') {
+ var photo = xVCard.find('photo');
+
+ if (photo.length > 0 && photo.text() !== data.avatar) {
+ jsxc.storage.removeUserItem('avatar', data.avatar);
+ data.avatar = photo.text();
+ }
+ }
+
+ // Reset jid
+ if (jsxc.gui.window.get(bid).length > 0) {
+ jsxc.gui.window.get(bid).data('jid', jid);
+ }
+
+ jsxc.storage.setUserItem('buddy', bid, data);
+ jsxc.storage.setUserItem('res', bid, res);
+
+ jsxc.debug('Presence (' + from + '): ' + status);
+
+ jsxc.gui.update(bid);
+ jsxc.gui.roster.reorder(bid);
+
+ $(document).trigger('presence.jsxc', [from, status, presence]);
+
+ // preserve handler
+ return true;
+ },
+
+ /**
+ * Triggered on incoming message stanzas
+ *
+ * @param {dom} presence
+ * @returns {Boolean}
+ * @private
+ */
+ onMessage: function(stanza) {
+
+ var forwarded = $(stanza).find('forwarded[xmlns="' + jsxc.CONST.NS.FORWARD + '"]');
+ var message, carbon;
+
+ if (forwarded.length > 0) {
+ message = forwarded.find('> message');
+ forwarded = true;
+ carbon = $(stanza).find('> [xmlns="' + jsxc.CONST.NS.CARBONS + '"]');
+
+ if (carbon.length === 0) {
+ carbon = false;
+ }
+
+ jsxc.debug('Incoming forwarded message', message);
+ } else {
+ message = stanza;
+ forwarded = false;
+ carbon = false;
+
+ jsxc.debug('Incoming message', message);
+ }
+
+ var body = $(message).find('body:first').text();
+
+ if (!body || (body.match(/\?OTR/i) && forwarded)) {
+ return true;
+ }
+
+ var type = $(message).attr('type');
+ var from = $(message).attr('from');
+ var mid = $(message).attr('id');
+ var bid;
+
+ var delay = $(message).find('delay[xmlns="urn:xmpp:delay"]');
+
+ var stamp = (delay.length > 0) ? new Date(delay.attr('stamp')) : new Date();
+ stamp = stamp.getTime();
+
+ if (carbon) {
+ var direction = (carbon.prop("tagName") === 'sent') ? 'out' : 'in';
+ bid = jsxc.jidToBid((direction === 'out') ? $(message).attr('to') : from);
+
+ jsxc.gui.window.postMessage(bid, direction, body, false, forwarded, stamp);
+
+ return true;
+
+ } else if (forwarded) {
+ // Someone forwarded a message to us
+
+ body = from + ' ' + $.t('to') + ' ' + $(stanza).attr('to') + '"' + body + '"';
+
+ from = $(stanza).attr('from');
+ }
+
+ var jid = Strophe.getBareJidFromJid(from);
+ bid = jsxc.jidToBid(jid);
+ var data = jsxc.storage.getUserItem('buddy', bid);
+ var request = $(message).find("request[xmlns='urn:xmpp:receipts']");
+
+ if (data === null) {
+ // jid not in roster
+
+ var chat = jsxc.storage.getUserItem('chat', bid) || [];
+
+ if (chat.length === 0) {
+ jsxc.notice.add($.t('Unknown_sender'), $.t('You_received_a_message_from_an_unknown_sender') + ' (' + bid + ').', 'gui.showUnknownSender', [bid]);
+ }
+
+ var msg = jsxc.removeHTML(body);
+ msg = jsxc.escapeHTML(msg);
+
+ jsxc.storage.saveMessage(bid, 'in', msg, false, forwarded, stamp);
+
+ return true;
+ }
+
+ var win = jsxc.gui.window.init(bid);
+
+ // If we now the full jid, we use it
+ if (type === 'chat') {
+ win.data('jid', from);
+ jsxc.storage.updateUserItem('buddy', bid, {
+ jid: from
+ });
+ }
+
+ $(document).trigger('message.jsxc', [from, body]);
+
+ // create related otr object
+ if (jsxc.master && !jsxc.otr.objects[bid]) {
+ jsxc.otr.create(bid);
+ }
+
+ if (!forwarded && mid !== null && request.length && data !== null && (data.sub === 'both' || data.sub === 'from') && type === 'chat') {
+ // Send received according to XEP-0184
+ jsxc.xmpp.conn.send($msg({
+ to: from
+ }).c('received', {
+ xmlns: 'urn:xmpp:receipts',
+ id: mid
+ }));
+ }
+
+ if (jsxc.otr.objects.hasOwnProperty(bid)) {
+ jsxc.otr.objects[bid].receiveMsg(body, {
+ stamp: stamp,
+ forwarded: forwarded
+ });
+ } else {
+ jsxc.gui.window.postMessage(bid, 'in', body, false, forwarded, stamp);
+ }
+
+ // preserve handler
+ return true;
+ },
+
+ /**
+ * Triggerd if the rid changed
+ *
+ * @param {event} ev
+ * @param {obejct} data
+ * @private
+ */
+ onRidChange: function(ev, data) {
+ jsxc.storage.setItem('rid', data.rid);
+ },
+
+ /**
+ * response to friendship request
+ *
+ * @param {string} from jid from original friendship req
+ * @param {boolean} approve
+ */
+ resFriendReq: function(from, approve) {
+ if (jsxc.master) {
+ jsxc.xmpp.conn.send($pres({
+ to: from,
+ type: (approve) ? 'subscribed' : 'unsubscribed'
+ }));
+
+ jsxc.storage.removeUserItem('friendReq');
+ jsxc.gui.dialog.close();
+
+ } else {
+ jsxc.storage.updateUserItem('friendReq', 'approve', approve);
+ }
+ },
+
+ /**
+ * Add buddy to my friends
+ *
+ * @param {string} username jid
+ * @param {string} alias
+ */
+ addBuddy: function(username, alias) {
+ var bid = jsxc.jidToBid(username);
+
+ if (jsxc.master) {
+ // add buddy to roster (trigger onRosterChanged)
+ var iq = $iq({
+ type: 'set'
+ }).c('query', {
+ xmlns: 'jabber:iq:roster'
+ }).c('item', {
+ jid: username,
+ name: alias || ''
+ });
+ jsxc.xmpp.conn.sendIQ(iq);
+
+ // send subscription request to buddy (trigger onRosterChanged)
+ jsxc.xmpp.conn.send($pres({
+ to: username,
+ type: 'subscribe'
+ }));
+
+ jsxc.storage.removeUserItem('add_' + bid);
+ } else {
+ jsxc.storage.setUserItem('add_' + bid, {
+ username: username,
+ alias: alias || null
+ });
+ }
+ },
+
+ /**
+ * Remove buddy from my friends
+ *
+ * @param {type} jid
+ */
+ removeBuddy: function(jid) {
+ var bid = jsxc.jidToBid(jid);
+
+ // Shortcut to remove buddy from roster and cancle all subscriptions
+ var iq = $iq({
+ type: 'set'
+ }).c('query', {
+ xmlns: 'jabber:iq:roster'
+ }).c('item', {
+ jid: Strophe.getBareJidFromJid(jid),
+ subscription: 'remove'
+ });
+ jsxc.xmpp.conn.sendIQ(iq);
+
+ jsxc.gui.roster.purge(bid);
+ },
+
+ onReceived: function(message) {
+ var from = $(message).attr('from');
+ var jid = Strophe.getBareJidFromJid(from);
+ var bid = jsxc.jidToBid(jid);
+ var received = $(message).find("received[xmlns='urn:xmpp:receipts']");
+
+ if (received.length) {
+ var receivedId = received.attr('id').replace(/:/, '-');
+ var chat = jsxc.storage.getUserItem('chat', bid);
+ var i;
+
+ for (i = chat.length - 1; i >= 0; i--) {
+ if (chat[i].uid === receivedId) {
+ chat[i].received = true;
+
+ $('#' + receivedId).addClass('jsxc_received');
+
+ jsxc.storage.setUserItem('chat', bid, chat);
+ break;
+ }
+ }
+ }
+
+ return true;
+ },
+
+ /**
+ * Public function to send message.
+ *
+ * @memberOf jsxc.xmpp
+ * @param bid css jid of user
+ * @param msg message
+ * @param uid unique id
+ */
+ sendMessage: function(bid, msg, uid) {
+ if (jsxc.otr.objects.hasOwnProperty(bid)) {
+ jsxc.otr.objects[bid].sendMsg(msg, uid);
+ } else {
+ jsxc.xmpp._sendMessage(jsxc.gui.window.get(bid).data('jid'), msg, uid);
+ }
+ },
+
+ /**
+ * Create message stanza and send it.
+ *
+ * @memberOf jsxc.xmpp
+ * @param jid Jabber id
+ * @param msg Message
+ * @param uid unique id
+ * @private
+ */
+ _sendMessage: function(jid, msg, uid) {
+ var data = jsxc.storage.getUserItem('buddy', jsxc.jidToBid(jid)) || {};
+ var isBar = (Strophe.getBareJidFromJid(jid) === jid);
+ var type = data.type || 'chat';
+
+ var xmlMsg = $msg({
+ to: jid,
+ type: type,
+ id: uid
+ }).c('body').t(msg);
+
+ if (jsxc.xmpp.carbons.enabled && msg.match(/^\?OTR/)) {
+ xmlMsg.up().c("private", {
+ xmlns: jsxc.CONST.NS.CARBONS
+ });
+ }
+
+ if (type === 'chat' && (isBar || jsxc.xmpp.conn.caps.hasFeatureByJid(jid, Strophe.NS.RECEIPTS))) {
+ // Add request according to XEP-0184
+ xmlMsg.up().c('request', {
+ xmlns: 'urn:xmpp:receipts'
+ });
+ }
+
+ jsxc.xmpp.conn.send(xmlMsg);
+ },
+
+ /**
+ * This function loads a vcard.
+ *
+ * @memberOf jsxc.xmpp
+ * @param bid
+ * @param cb
+ * @param error_cb
+ */
+ loadVcard: function(bid, cb, error_cb) {
+ if (jsxc.master) {
+ jsxc.xmpp.conn.vcard.get(cb, bid, error_cb);
+ } else {
+ jsxc.storage.setUserItem('vcard', bid, 'request:' + (new Date()).getTime());
+
+ $(document).one('loaded.vcard.jsxc', function(ev, result) {
+ if (result && result.state === 'success') {
+ cb($(result.data).get(0));
+ } else {
+ error_cb();
+ }
+ });
+ }
+ },
+
+ /**
+ * Retrieves capabilities.
+ *
+ * @memberOf jsxc.xmpp
+ * @param jid
+ * @returns List of known capabilities
+ */
+ getCapabilitiesByJid: function(jid) {
+ if (jsxc.xmpp.conn) {
+ return jsxc.xmpp.conn.caps.getCapabilitiesByJid(jid);
+ }
+
+ var jidVerIndex = JSON.parse(localStorage.getItem('strophe.caps._jidVerIndex')) || {};
+ var knownCapabilities = JSON.parse(localStorage.getItem('strophe.caps._knownCapabilities')) || {};
+
+ if (jidVerIndex[jid]) {
+ return knownCapabilities[jidVerIndex[jid]];
+ }
+
+ return null;
+ }
+};
+
+/**
+ * Handle carbons (XEP-0280);
+ *
+ * @namespace jsxc.xmpp.carbons
+ */
+jsxc.xmpp.carbons = {
+ enabled: false,
+
+ /**
+ * Enable carbons.
+ *
+ * @memberOf jsxc.xmpp.carbons
+ * @param cb callback
+ */
+ enable: function(cb) {
+ var iq = $iq({
+ type: 'set'
+ }).c('enable', {
+ xmlns: jsxc.CONST.NS.CARBONS
+ });
+
+ jsxc.xmpp.conn.sendIQ(iq, function() {
+ jsxc.xmpp.carbons.enabled = true;
+
+ jsxc.debug('Carbons enabled');
+
+ if (cb) {
+ cb.call(this);
+ }
+ }, function(stanza) {
+ jsxc.warn('Could not enable carbons', stanza);
+ });
+ },
+
+ /**
+ * Disable carbons.
+ *
+ * @memberOf jsxc.xmpp.carbons
+ * @param cb callback
+ */
+ disable: function(cb) {
+ var iq = $iq({
+ type: 'set'
+ }).c('disable', {
+ xmlns: jsxc.CONST.NS.CARBONS
+ });
+
+ jsxc.xmpp.conn.sendIQ(iq, function() {
+ jsxc.xmpp.carbons.enabled = false;
+
+ jsxc.debug('Carbons disabled');
+
+ if (cb) {
+ cb.call(this);
+ }
+ }, function(stanza) {
+ jsxc.warn('Could not disable carbons', stanza);
+ });
+ },
+
+ /**
+ * Enable/Disable carbons depending on options key.
+ *
+ * @memberOf jsxc.xmpp.carbons
+ * @param err error message
+ */
+ refresh: function(err) {
+ if (err === false) {
+ return;
+ }
+
+ if (jsxc.options.get('carbons').enable) {
+ return jsxc.xmpp.carbons.enable();
+ }
+
+ return jsxc.xmpp.carbons.disable();
+ }
+};
+
+/* global Favico*/
+/**
* Handle functions for chat window's and buddylist
*
* @namespace jsxc.gui
*/
jsxc.gui = {
/** Smilie token to file mapping */
- emotions: [ [ 'O:-) O:)', 'angel' ], [ '>:-( >:( &gt;:-( &gt;:(', 'angry' ], [ ':-) :)', 'smile' ], [ ':-D :D', 'grin' ], [ ':-( :(', 'sad' ], [ ';-) ;)', 'wink' ], [ ':-P :P', 'tonguesmile' ], [ '=-O', 'surprised' ], [ ':kiss: :-*', 'kiss' ], [ '8-) :cool:', 'sunglassess' ], [ ':\'-( :\'( :&amp;apos;-(', 'crysad' ], [ ':-/', 'doubt' ], [ ':-X :X', 'zip' ], [ ':yes:', 'thumbsup' ], [ ':no:', 'thumbsdown' ], [ ':beer:', 'beer' ], [ ':devil:', 'devil' ], [ ':kiss: :kissing:', 'kissing' ], [ '@->-- :rose: @-&gt;--', 'rose' ], [ ':music:', 'music' ], [ ':love:', 'love' ], [ ':zzz:', 'tired' ] ],
+ emotions: [
+ ['O:-) O:)', 'angel'],
+ ['>:-( >:( &gt;:-( &gt;:(', 'angry'],
+ [':-) :)', 'smile'],
+ [':-D :D', 'grin'],
+ [':-( :(', 'sad'],
+ [';-) ;)', 'wink'],
+ [':-P :P', 'tonguesmile'],
+ ['=-O', 'surprised'],
+ [':kiss: :-*', 'kiss'],
+ ['8-) :cool:', 'sunglassess'],
+ [':\'-( :\'( :&amp;apos;-(', 'crysad'],
+ [':-/', 'doubt'],
+ [':-X :X', 'zip'],
+ [':yes:', 'thumbsup'],
+ [':no:', 'thumbsdown'],
+ [':beer:', 'beer'],
+ [':devil:', 'devil'],
+ [':kiss: :kissing:', 'kissing'],
+ ['@->-- :rose: @-&gt;--', 'rose'],
+ [':music:', 'music'],
+ [':love:', 'love'],
+ [':zzz:', 'tired']
+ ],
+
+ favicon: null,
/**
* Different uri query actions as defined in XEP-0147.
@@ -839,6 +2073,13 @@ jsxc.gui = {
/** xmpp:JID?vcard */
vcard: function(jid) {
jsxc.gui.showVcard(jid);
+ },
+
+ /** xmpp:JID?join[;password=TEXT] */
+ join: function(jid, params) {
+ var password = (params && params.password) ? params.password : null;
+
+ jsxc.muc.showJoinChat(jid, password);
}
},
@@ -872,6 +2113,17 @@ jsxc.gui = {
jsxc.gui.tooltip('#jsxc_windowList');
+ var fo = jsxc.options.get('favicon');
+ if (fo && fo.enable) {
+ jsxc.gui.favicon = new Favico({
+ animation: 'pop',
+ bgColor: fo.bgColor,
+ textColor: fo.textColor
+ });
+
+ jsxc.gui.favicon.badge(jsxc.storage.getUserItem('unreadMsg') || 0);
+ }
+
if (!jsxc.el_exists('#jsxc_roster')) {
jsxc.gui.roster.init();
}
@@ -931,7 +2183,9 @@ jsxc.gui = {
ue.add(spot).removeClass('jsxc_' + jsxc.CONST.STATUS.join(' jsxc_')).addClass('jsxc_' + jsxc.CONST.STATUS[data.status]);
// Change name and add title
- ue.find('.jsxc_name:first').add(spot).text(data.name).attr('title', $.t('is') + ' ' + jsxc.CONST.STATUS[data.status]);
+ ue.find('.jsxc_name:first').add(spot).text(data.name).attr('title', $.t('is_', {
+ status: $.t(jsxc.CONST.STATUS[data.status])
+ }));
// Update gui according to encryption state
switch (data.msgstate) {
@@ -988,8 +2242,8 @@ jsxc.gui = {
var setAvatar = function(src) {
if (src === 0 || src === '0') {
if (typeof jsxc.options.defaultAvatar === 'function') {
- jsxc.options.defaultAvatar.call(el, jid);
- return;
+ jsxc.options.defaultAvatar.call(el, jid);
+ return;
}
jsxc.gui.avatarPlaceholder(el.find('.jsxc_avatar'), jid);
return;
@@ -1002,12 +2256,12 @@ jsxc.gui = {
'text-indent': '999px'
});
};
-
+
if (typeof aid === 'undefined') {
setAvatar(0);
return;
}
-
+
var avatarSrc = jsxc.storage.getUserItem('avatar', aid);
if (avatarSrc !== null) {
@@ -1174,27 +2428,27 @@ jsxc.gui = {
jsxc.triggeredFromBox = true;
jsxc.options.loginForm.triggered = false;
- var settings = jsxc.prepareLogin();
-
- if (settings === false) {
- onAuthFail();
- } else {
- $(document).on('authfail.jsxc', onAuthFail);
+ jsxc.prepareLogin(function(settings) {
+ if (settings === false) {
+ onAuthFail();
+ } else {
+ $(document).on('authfail.jsxc', onAuthFail);
- jsxc.xmpp.login();
- }
+ jsxc.xmpp.login();
+ }
+ });
});
function onAuthFail() {
- alert.show();
- jsxc.gui.dialog.resize();
+ alert.show();
+ jsxc.gui.dialog.resize();
- $('#jsxc_dialog').find('button').trigger('btnfinished.jsxc');
+ $('#jsxc_dialog').find('button').trigger('btnfinished.jsxc');
- $('#jsxc_dialog').find('input').one('keypress', function() {
+ $('#jsxc_dialog').find('input').one('keypress', function() {
alert.hide();
jsxc.gui.dialog.resize();
- });
+ });
}
},
@@ -1233,17 +2487,18 @@ jsxc.gui = {
// Add handler
$('#jsxc_dialog > div:gt(0)').hide();
- $('#jsxc_dialog select').change(function() {
+ $('#jsxc_dialog > div:eq(0) button').click(function() {
+
+ $(this).siblings().removeClass('active');
+ $(this).addClass('active');
+ $(this).get(0).blur();
+
$('#jsxc_dialog > div:gt(0)').hide();
- $('#jsxc_dialog > div:eq(' + $(this).prop('selectedIndex') + ')').slideDown({
- complete: function() {
- jsxc.gui.dialog.resize();
- }
- });
+ $('#jsxc_dialog > div:eq(' + ($(this).index() + 1) + ')').show().find('input:first').focus();
});
// Manual
- $('#jsxc_dialog > div:eq(1) a.creation').click(function() {
+ $('#jsxc_dialog > div:eq(1) .jsxc_submit').click(function() {
if (jsxc.master) {
jsxc.otr.objects[bid].trust = true;
}
@@ -1258,7 +2513,7 @@ jsxc.gui = {
});
// Question
- $('#jsxc_dialog > div:eq(2) a.creation').click(function() {
+ $('#jsxc_dialog > div:eq(2) .jsxc_submit').click(function() {
var div = $('#jsxc_dialog > div:eq(2)');
var sec = div.find('#jsxc_secret2').val();
var quest = div.find('#jsxc_quest').val();
@@ -1288,7 +2543,7 @@ jsxc.gui = {
});
// Secret
- $('#jsxc_dialog > div:eq(3) .creation').click(function() {
+ $('#jsxc_dialog > div:eq(3) .jsxc_submit').click(function() {
var div = $('#jsxc_dialog > div:eq(3)');
var sec = div.find('#jsxc_secret').val();
@@ -1346,12 +2601,8 @@ jsxc.gui = {
// If friendship is not mutual show contact dialog
if (!data || data.sub === 'from') {
- $(document).one('close.dialog.jsxc', function() {
- jsxc.gui.showContactDialog(from);
- });
+ jsxc.gui.showContactDialog(from);
}
-
- jsxc.gui.dialog.close();
});
},
@@ -1375,19 +2626,19 @@ jsxc.gui = {
$('#jsxc_userlist').empty();
if (val !== '') {
- jsxc.options.getUsers.call(this, val, function(list) {
- $.each(list || {}, function(uid, displayname) {
- var option = $('<option>');
- option.attr('data-username', uid);
- option.attr('data-alias', displayname);
+ jsxc.options.getUsers.call(this, val, function(list) {
+ $.each(list || {}, function(uid, displayname) {
+ var option = $('<option>');
+ option.attr('data-username', uid);
+ option.attr('data-alias', displayname);
- option.attr('value', uid).appendTo('#jsxc_userlist');
+ option.attr('value', uid).appendTo('#jsxc_userlist');
- if (uid !== displayname) {
- option.clone().attr('value', displayname).appendTo('#jsxc_userlist');
- }
- });
- });
+ if (uid !== displayname) {
+ option.clone().attr('value', displayname).appendTo('#jsxc_userlist');
+ }
+ });
+ });
}
}
});
@@ -1402,7 +2653,9 @@ jsxc.gui = {
}
});
- $('#jsxc_dialog form').submit(function() {
+ $('#jsxc_dialog form').submit(function(ev) {
+ ev.preventDefault();
+
var username = $('#jsxc_username').val();
var alias = $('#jsxc_alias').val();
@@ -1440,7 +2693,7 @@ jsxc.gui = {
var data = jsxc.storage.getUserItem('buddy', bid);
- $('#jsxc_dialog .creation').click(function(ev) {
+ $('#jsxc_dialog .jsxc_remove').click(function(ev) {
ev.stopPropagation();
if (jsxc.master) {
@@ -1490,7 +2743,7 @@ jsxc.gui = {
$('#jsxc_dialog .jsxc_cancel').hide();
}
- $('#jsxc_dialog .creation').click(function() {
+ $('#jsxc_dialog .jsxc_retry').click(function() {
jsxc.gui.dialog.close();
});
@@ -1513,11 +2766,11 @@ jsxc.gui = {
});
if (confirm) {
- $('#jsxc_dialog .creation').click(confirm);
+ $('#jsxc_dialog .jsxc_confirm').click(confirm);
}
if (dismiss) {
- $('#jsxc_dialog .jsxc_cancel').click(dismiss);
+ $('#jsxc_dialog .jsxc_dismiss').click(dismiss);
}
},
@@ -1575,7 +2828,8 @@ jsxc.gui = {
if (data) {
// Display resources and corresponding information
- var i, j, res, identities, identity = null, cap, client;
+ var i, j, res, identities, identity = null,
+ cap, client;
for (i = 0; i < data.res.length; i++) {
res = data.res[i];
@@ -1704,7 +2958,7 @@ jsxc.gui = {
jsxc.gui.dialog.open(jsxc.gui.template.get('settings'));
if (jsxc.options.get('xmpp').overwrite === 'false' || jsxc.options.get('xmpp').overwrite === false) {
- $('.jsxc_fieldsetXmpp').hide();
+ $('.jsxc_fieldsetXmpp').parent().hide();
}
$('#jsxc_dialog form').each(function() {
@@ -1759,16 +3013,21 @@ jsxc.gui = {
jsxc.options.set(key, val);
});
- var err = jsxc.options.saveSettinsPermanent.call(this, data);
+ var success = jsxc.options.saveSettinsPermanent.call(this, data);
if (typeof self.attr('data-onsubmit') === 'string') {
- jsxc.exec(self.attr('data-onsubmit'), [ err ]);
+ jsxc.exec(self.attr('data-onsubmit'), [success]);
}
setTimeout(function() {
- self.find('input[type="submit"]').effect('highlight', {
- color: (err) ? 'green' : 'red'
- }, 4000);
+ if (success) {
+ self.find('button[type="submit"]').switchClass('btn-primary', 'btn-success');
+ } else {
+ self.find('button[type="submit"]').switchClass('btn-primary', 'btn-danger');
+ }
+ setTimeout(function() {
+ self.find('button[type="submit"]').switchClass('btn-danger btn-success', 'btn-primary');
+ }, 2000);
}, 200);
return false;
@@ -1807,7 +3066,9 @@ jsxc.gui = {
},
showUnknownSender: function(bid) {
- var confirmationText = $.t('You_received_a_message_from_an_unknown_sender') + ' (' + bid + '). ' + $.t('Do_you_want_to_display_them');
+ var confirmationText = $.t('You_received_a_message_from_an_unknown_sender_', {
+ sender: bid
+ });
jsxc.gui.showConfirmDialog(confirmationText, function() {
jsxc.gui.dialog.close();
@@ -1828,6 +3089,59 @@ jsxc.gui = {
});
},
+ showSelectionDialog: function(header, msg, primary, option, primaryLabel, optionLabel) {
+ var opt;
+
+ if (arguments.length === 1 && typeof header === 'object' && header !== null) {
+ opt = header;
+ } else {
+ opt = {
+ header: header,
+ msg: msg,
+ primary: {
+ label: primaryLabel,
+ cb: primary
+ },
+ option: {
+ label: optionLabel,
+ cb: option
+ }
+ };
+ }
+
+ var dialog = jsxc.gui.dialog.open(jsxc.gui.template.get('selectionDialog'), {
+ noClose: true
+ });
+
+ if (opt.header) {
+ dialog.find('h3').text(opt.header);
+ } else {
+ dialog.find('h3').hide();
+ }
+
+ if (opt.msg) {
+ dialog.find('p').text(opt.msg);
+ } else {
+ dialog.find('p').hide();
+ }
+
+ if (opt.primary && opt.primary.label) {
+ dialog.find('.btn-primary').text(opt.primary.label);
+ }
+
+ if (opt.primary && opt.option.label) {
+ dialog.find('.btn-default').text(opt.option.label);
+ }
+
+ if (opt.primary && opt.primary.cb) {
+ dialog.find('.btn-primary').click(opt.primary.cb);
+ }
+
+ if (opt.primary && opt.option.cb) {
+ dialog.find('.btn-primary').click(opt.option.cb);
+ }
+ },
+
/**
* Change own presence to pres.
*
@@ -1876,16 +3190,53 @@ jsxc.gui = {
},
/**
- * Switch read state to UNread.
+ * Switch read state to UNread and increase counter.
*
* @memberOf jsxc.gui
* @param bid
*/
unreadMsg: function(bid) {
+ var winData = jsxc.storage.getUserItem('window', bid);
+ var count = (winData && winData.unread) || 0;
+ count = (count === true) ? 1 : count + 1; //unread was boolean (<2.1.0)
+
+ // update user counter
+ winData.unread = count;
+ jsxc.storage.setUserItem('window', bid, winData);
+
+ // update counter of total unread messages
+ var total = jsxc.storage.getUserItem('unreadMsg') || 0;
+ total++;
+ jsxc.storage.setUserItem('unreadMsg', total);
+
+ if (jsxc.gui.favicon) {
+ jsxc.gui.favicon.badge(total);
+ }
+
+ jsxc.gui._unreadMsg(bid, count);
+ },
+
+ /**
+ * Switch read state to UNread.
+ *
+ * @memberOf jsxc.gui
+ * @param bid
+ * @param count
+ */
+ _unreadMsg: function(bid, count) {
var win = jsxc.gui.window.get(bid);
- jsxc.gui.roster.getItem(bid).add(win).addClass('jsxc_unreadMsg');
- jsxc.storage.updateUserItem('window', bid, 'unread', true);
+ if (typeof count !== 'number') {
+ // get counter after page reload
+ var winData = jsxc.storage.getUserItem('window', bid);
+ count = (winData && winData.unread) || 1;
+ count = (count === true) ? 1 : count; //unread was boolean (<2.1.0)
+ }
+
+ var el = jsxc.gui.roster.getItem(bid).add(win);
+
+ el.addClass('jsxc_unreadMsg');
+ el.find('.jsxc_unread').text(count);
},
/**
@@ -1896,10 +3247,26 @@ jsxc.gui = {
*/
readMsg: function(bid) {
var win = jsxc.gui.window.get(bid);
+ var winData = jsxc.storage.getUserItem('window', bid);
+ var count = (winData && winData.unread) || 0;
+ count = (count === true) ? 0 : count; //unread was boolean (<2.1.0)
+
+ var el = jsxc.gui.roster.getItem(bid).add(win);
+ el.removeClass('jsxc_unreadMsg');
+ el.find('.jsxc_unread').text(0);
- if (win.hasClass('jsxc_unreadMsg')) {
- jsxc.gui.roster.getItem(bid).add(win).removeClass('jsxc_unreadMsg');
- jsxc.storage.updateUserItem('window', bid, 'unread', false);
+ // update counters if not called from other tab
+ if (count > 0) {
+ // update counter of total unread messages
+ var total = jsxc.storage.getUserItem('unreadMsg') || 0;
+ total -= count;
+ jsxc.storage.setUserItem('unreadMsg', total);
+
+ if (jsxc.gui.favicon) {
+ jsxc.gui.favicon.badge(total);
+ }
+
+ jsxc.storage.updateUserItem('window', bid, 'unread', 0);
}
},
@@ -1985,10 +3352,10 @@ jsxc.gui = {
}
});
},
-
+
avatarPlaceholder: function(el, seed, text) {
text = text || seed;
-
+
var options = jsxc.options.get('avatarplaceholder') || {};
var hash = jsxc.hashStr(seed);
@@ -1997,16 +3364,16 @@ jsxc.gui = {
var lightness = options.lightness || 65;
el.css({
- 'background-color': 'hsl(' + hue + ', ' + saturation + '%, ' + lightness + '%)',
- 'color': '#fff',
- 'font-weight': 'bold',
- 'text-align': 'center',
- 'line-height': el.height() + 'px',
- 'font-size': el.height() * 0.6 + 'px'
- });
-
+ 'background-color': 'hsl(' + hue + ', ' + saturation + '%, ' + lightness + '%)',
+ 'color': '#fff',
+ 'font-weight': 'bold',
+ 'text-align': 'center',
+ 'line-height': el.height() + 'px',
+ 'font-size': el.height() * 0.6 + 'px'
+ });
+
if (typeof text === 'string' && text.length > 0) {
- el.text(text[0].toUpperCase());
+ el.text(text[0].toUpperCase());
}
}
};
@@ -2018,7 +3385,7 @@ jsxc.gui = {
*/
jsxc.gui.roster = {
- /** True if roster is initialised */
+ /** True if roster is initialised */
ready: false,
/** True if all items are loaded */
@@ -2115,9 +3482,13 @@ jsxc.gui.roster = {
jsxc.gui.toggleList.call($(this));
});
- if (jsxc.storage.getUserItem('roster') === 'hidden') {
- $('#jsxc_roster').css('right', '-200px');
- $('#jsxc_windowList > ul').css('paddingRight', '10px');
+ var rosterState = jsxc.storage.getUserItem('roster') || (jsxc.options.get('loginForm').startMinimized ? 'hidden' : 'shown');
+
+ $('#jsxc_roster').addClass('jsxc_state_' + rosterState);
+
+ if (rosterState === 'hidden') {
+ $('#jsxc_roster').css('right', -1 * $('#jsxc_roster').innerWidth() + 'px');
+ $('#jsxc_windowList').css('right', '10px');
}
var pres = jsxc.storage.getUserItem('presence') || 'online';
@@ -2156,10 +3527,12 @@ jsxc.gui.roster = {
return false;
});
- bud.find('.jsxc_delete').click(function() {
- jsxc.gui.showRemoveDialog(bid);
- return false;
- });
+ if (data.type !== 'groupchat') {
+ bud.find('.jsxc_delete').click(function() {
+ jsxc.gui.showRemoveDialog(bid);
+ return false;
+ });
+ }
var expandClick = function() {
bud.trigger('extra.jsxc');
@@ -2185,7 +3558,7 @@ jsxc.gui.roster = {
scrollTo: '0px'
});
- $(document).trigger('add.roster.jsxc', [ bid, data, bud ]);
+ $(document).trigger('add.roster.jsxc', [bid, data, bud]);
},
getItem: function(bid) {
@@ -2275,7 +3648,7 @@ jsxc.gui.roster = {
*/
rename: function(bid) {
var name = jsxc.gui.roster.getItem(bid).find('.jsxc_name');
- var options = jsxc.gui.roster.getItem(bid).find('.jsxc_options, .jsxc_control');
+ var options = jsxc.gui.roster.getItem(bid).find('.jsxc_options, .jsxc_control, .jsxc_unread');
var input = $('<input type="text" name="name"/>');
options.hide();
@@ -2287,7 +3660,7 @@ jsxc.gui.roster = {
return;
}
- options.show();
+ options.css('display', '');
input.replaceWith(name);
jsxc.gui.roster._rename(bid, $(this).val());
@@ -2300,7 +3673,7 @@ jsxc.gui.roster = {
});
$('html').one('click', function() {
- options.show();
+ options.css('display', '');
input.replaceWith(name);
jsxc.gui.roster._rename(bid, input.val());
});
@@ -2315,18 +3688,20 @@ jsxc.gui.roster = {
*/
_rename: function(bid, newname) {
if (jsxc.master) {
- var d = jsxc.storage.getUserItem('buddy', bid);
-
+ var d = jsxc.storage.getUserItem('buddy', bid) || {};
+
if (d.type === 'chat') {
- var iq = $iq({
- type: 'set'
- }).c('query', {
- xmlns: 'jabber:iq:roster'
- }).c('item', {
- jid: Strophe.getBareJidFromJid(d.jid),
- name: newname
- });
- jsxc.xmpp.conn.sendIQ(iq);
+ var iq = $iq({
+ type: 'set'
+ }).c('query', {
+ xmlns: 'jabber:iq:roster'
+ }).c('item', {
+ jid: Strophe.getBareJidFromJid(d.jid),
+ name: newname
+ });
+ jsxc.xmpp.conn.sendIQ(iq);
+ } else if (d.type === 'groupchat') {
+ jsxc.xmpp.bookmarks.add(bid, newname, d.nickname, d.autojoin);
}
}
@@ -2351,6 +3726,8 @@ jsxc.gui.roster = {
jsxc.storage.setUserItem('roster', state);
+ roster.removeClass('jsxc_state_hidden jsxc_state_shown').addClass('jsxc_state_' + state);
+
roster.animate({
right: ((roster_width + roster_right) * -1) + 'px'
}, duration);
@@ -2358,7 +3735,7 @@ jsxc.gui.roster = {
right: (10 - roster_right) + 'px'
}, duration);
- $(document).trigger('toggle.roster.jsxc', [ state, duration ]);
+ $(document).trigger('toggle.roster.jsxc', [state, duration]);
},
/**
@@ -2380,8 +3757,8 @@ jsxc.gui.roster = {
* @memberOf jsxc.gui.roster
*/
empty: function() {
- var text = $('<p>' + $.t('Your_roster_is_empty_add_a') + '</p>');
- var link = $('<a>' + $.t('new_buddy') + '</a>');
+ var text = $('<p>' + $.t('Your_roster_is_empty_add_') + '</p>');
+ var link = text.find('a');
link.click(function() {
jsxc.gui.showContactDialog();
@@ -2412,72 +3789,58 @@ jsxc.gui.dialog = {
var opt = o || {};
- // default options
- var options = {};
- options = {
- onComplete: function() {
- $('#jsxc_dialog .jsxc_close').click(function(ev) {
- ev.preventDefault();
-
- jsxc.gui.dialog.close();
- });
+ $.magnificPopup.open({
+ items: {
+ src: '<div id="jsxc_dialog">' + data + '</div>'
+ },
+ type: 'inline',
+ modal: opt.noClose,
+ callbacks: {
+ beforeClose: function() {
+ $(document).trigger('cleanup.dialog.jsxc');
+ },
+ afterClose: function() {
+ $(document).trigger('close.dialog.jsxc');
+ },
+ open: function() {
+ $('#jsxc_dialog .jsxc_close').click(function(ev) {
+ ev.preventDefault();
- // workaround for old colorbox version (used by firstrunwizard)
- if (options.closeButton === false) {
- $('#cboxClose').hide();
- }
+ jsxc.gui.dialog.close();
+ });
- $('#jsxc_dialog form').each(function() {
- var form = $(this);
+ $('#jsxc_dialog form').each(function() {
+ var form = $(this);
- form.find('button[data-jsxc-loading-text]').each(function(){
- var btn = $(this);
+ form.find('button[data-jsxc-loading-text]').each(function() {
+ var btn = $(this);
- btn.on('btnloading.jsxc', function(){
- if(!btn.prop('disabled')) {
- btn.prop('disabled', true);
+ btn.on('btnloading.jsxc', function() {
+ if (!btn.prop('disabled')) {
+ btn.prop('disabled', true);
- btn.data('jsxc_value', btn.text());
+ btn.data('jsxc_value', btn.text());
- btn.text(btn.attr('data-jsxc-loading-text'));
+ btn.text(btn.attr('data-jsxc-loading-text'));
}
- });
+ });
- btn.on('btnfinished.jsxc', function() {
- if(btn.prop('disabled')) {
- btn.prop('disabled', false);
+ btn.on('btnfinished.jsxc', function() {
+ if (btn.prop('disabled')) {
+ btn.prop('disabled', false);
- btn.text(btn.data('jsxc_value'));
+ btn.text(btn.data('jsxc_value'));
}
- });
- });
- });
-
- jsxc.gui.dialog.resize();
-
- $(document).trigger('complete.dialog.jsxc');
- },
- onClosed: function() {
- $(document).trigger('close.dialog.jsxc');
- },
- onCleanup: function() {
- $(document).trigger('cleanup.dialog.jsxc');
- },
- opacity: 0.5
- };
-
- if (opt.noClose) {
- options.overlayClose = false;
- options.escKey = false;
- options.closeButton = false;
- delete opt.noClose;
- }
-
- $.extend(options, opt);
+ });
+ });
+ });
- options.html = '<div id="jsxc_dialog">' + data + '</div>';
+ jsxc.gui.dialog.resize();
- $.colorbox(options);
+ $(document).trigger('complete.dialog.jsxc');
+ }
+ }
+ });
return $('#jsxc_dialog');
},
@@ -2487,7 +3850,8 @@ jsxc.gui.dialog = {
*/
close: function() {
jsxc.debug('close dialog');
- $.colorbox.close();
+
+ $.magnificPopup.close();
},
/**
@@ -2495,15 +3859,8 @@ jsxc.gui.dialog = {
*
* @param {Object} options e.g. width and height
*/
- resize: function(options) {
- options = $.extend({
- innerWidth: $('#jsxc_dialog').outerWidth(),
- innerHeight: $('#jsxc_dialog').outerHeight()
- }, options || {});
-
- $('#cboxLoadedContent').css('overflow', 'hidden');
-
- $.colorbox.resize(options);
+ resize: function() {
+
}
};
@@ -2620,7 +3977,7 @@ jsxc.gui.window = {
var offset = win.find('.slimScrollDiv').position().top;
win.find('.jsxc_emoticons').css('top', (ui.size.height + offset + 6) + 'px');
- $(document).trigger('resize.window.jsxc', [ win, bid, ui.size ]);
+ $(document).trigger('resize.window.jsxc', [win, bid, ui.size]);
}
});
@@ -2635,12 +3992,12 @@ jsxc.gui.window = {
jsxc.storage.setUserItem('window', bid, {
minimize: true,
text: '',
- unread: false
+ unread: 0
});
} else {
if (jsxc.storage.getUserItem('window', bid).unread) {
- jsxc.gui.unreadMsg(bid);
+ jsxc.gui._unreadMsg(bid);
}
}
@@ -2669,7 +4026,7 @@ jsxc.gui.window = {
jsxc.otr.enable(bid);
}
- $(document).trigger('init.window.jsxc', [ win ]);
+ $(document).trigger('init.window.jsxc', [win]);
return win;
},
@@ -2902,16 +4259,13 @@ jsxc.gui.window = {
msg = $.t('unencrypted_message_received') + ' ' + msg;
}
- if (direction === 'out' && data.sub === 'from') {
- direction = 'sys';
- msg = $.t('your_message_wasnt_send_because_you_have_no_valid_subscription');
- }
-
encrypted = encrypted || data.msgstate === OTR.CONST.MSGSTATE_ENCRYPTED;
var post = jsxc.storage.saveMessage(bid, direction, msg, encrypted, forwarded, stamp, sender);
if (direction === 'in') {
- $(document).trigger('postmessagein.jsxc', [ bid, html_msg ]);
+ jsxc.gui.unreadMsg(bid);
+
+ $(document).trigger('postmessagein.jsxc', [bid, html_msg]);
}
if (direction === 'out' && jsxc.master && forwarded !== true) {
@@ -2930,8 +4284,7 @@ jsxc.gui.window = {
*
* @param {String} bid bar jid
* @param {Object} post Post object with direction, msg, uid, received
- * @param {Bool} restore If true no highlights are used and so unread flag
- * set
+ * @param {Bool} restore If true no highlights are used
*/
_postMessage: function(bid, post, restore) {
var win = jsxc.gui.window.get(bid);
@@ -2939,7 +4292,7 @@ jsxc.gui.window = {
var direction = post.direction;
var uid = post.uid;
- if (win.find('.jsxc_textinput').is(':not(:focus)') && jsxc.restoreCompleted && direction === 'in' && !restore) {
+ if (win.find('.jsxc_textinput').is(':not(:focus)') && direction === 'in' && !restore) {
jsxc.gui.window.highlight(bid);
}
@@ -2967,7 +4320,8 @@ jsxc.gui.window = {
// escape value for alt and title, this prevents double
// replacement
- var esc = '', i;
+ var esc = '',
+ i;
for (i = 0; i < p1.length; i++) {
esc += '&#' + p1.charCodeAt(i) + ';';
}
@@ -2976,7 +4330,8 @@ jsxc.gui.window = {
});
});
- var msgDiv = $("<div>"), msgTsDiv = $("<div>");
+ var msgDiv = $("<div>"),
+ msgTsDiv = $("<div>");
msgDiv.addClass('jsxc_chatmessage jsxc_' + direction);
msgDiv.attr('id', uid);
msgDiv.html('<div>' + msg + '</div>');
@@ -3000,9 +4355,9 @@ jsxc.gui.window = {
} else if (typeof post.stamp !== 'undefined') {
msgDiv.append(msgTsDiv);
}
-
+
win.find('.jsxc_textarea').append(msgDiv);
-
+
if (typeof post.sender === 'object' && post.sender !== null) {
var title = '';
var avatarDiv = $('<div>');
@@ -3010,29 +4365,29 @@ jsxc.gui.window = {
if (typeof post.sender.jid === 'string') {
msgDiv.attr('data-bid', jsxc.jidToBid(post.sender.jid));
-
+
var data = jsxc.storage.getUserItem('buddy', jsxc.jidToBid(post.sender.jid)) || {};
jsxc.gui.updateAvatar(msgDiv, jsxc.jidToBid(post.sender.jid), data.avatar);
title = jsxc.jidToBid(post.sender.jid);
}
-
+
if (typeof post.sender.name === 'string') {
msgDiv.attr('data-name', post.sender.name);
-
+
if (typeof post.sender.jid !== 'string') {
- jsxc.gui.avatarPlaceholder(avatarDiv, post.sender.name);
+ jsxc.gui.avatarPlaceholder(avatarDiv, post.sender.name);
}
-
+
if (title !== '') {
- title = '\n' + title;
+ title = '\n' + title;
}
-
+
title = post.sender.name + title;
-
+
msgTsDiv.text(msgTsDiv.text() + ' ' + post.sender.name);
}
-
+
avatarDiv.attr('title', jsxc.escapeHTML(title));
}
@@ -3040,11 +4395,6 @@ jsxc.gui.window = {
jsxc.gui.detectEmail(win);
jsxc.gui.window.scrollDown(bid);
-
- // if window has no focus set unread flag
- if (!win.find('.jsxc_textinput').is(':focus') && jsxc.restoreCompleted && !restore) {
- jsxc.gui.unreadMsg(bid);
- }
},
/**
@@ -3085,304 +4435,67 @@ jsxc.gui.window = {
}
};
+jsxc.gui.template = {};
+
/**
- * Hold all HTML templates.
+ * Return requested template and replace all placeholder
*
- * @namespace jsxc.gui.template
+ * @memberOf jsxc.gui.template;
+ * @param {type} name template name
+ * @param {type} bid
+ * @param {type} msg
+ * @returns {String} HTML Template
*/
-jsxc.gui.template = {
- /**
- * Return requested template and replace all placeholder
- *
- * @memberOf jsxc.gui.template;
- * @param {type} name template name
- * @param {type} bid
- * @param {type} msg
- * @returns {String} HTML Template
- */
- get: function(name, bid, msg) {
-
- // common placeholder
- var ph = {
- my_priv_fingerprint: jsxc.storage.getUserItem('priv_fingerprint') ? jsxc.storage.getUserItem('priv_fingerprint').replace(/(.{8})/g, '$1 ') : $.t('not_available'),
- my_jid: jsxc.storage.getItem('jid') || '',
- my_node: Strophe.getNodeFromJid(jsxc.storage.getItem('jid') || '') || '',
- root: jsxc.options.root,
- app_name: jsxc.options.app_name
- };
+jsxc.gui.template.get = function(name, bid, msg) {
+
+ // common placeholder
+ var ph = {
+ my_priv_fingerprint: jsxc.storage.getUserItem('priv_fingerprint') ? jsxc.storage.getUserItem('priv_fingerprint').replace(/(.{8})/g, '$1 ') : $.t('not_available'),
+ my_jid: jsxc.storage.getItem('jid') || '',
+ my_node: Strophe.getNodeFromJid(jsxc.storage.getItem('jid') || '') || '',
+ root: jsxc.options.root,
+ app_name: jsxc.options.app_name,
+ version: jsxc.version
+ };
- // placeholder depending on bid
- if (bid) {
- var data = jsxc.storage.getUserItem('buddy', bid);
+ // placeholder depending on bid
+ if (bid) {
+ var data = jsxc.storage.getUserItem('buddy', bid);
- $.extend(ph, {
- bid_priv_fingerprint: (data && data.fingerprint) ? data.fingerprint.replace(/(.{8})/g, '$1 ') : $.t('not_available'),
- bid_jid: bid,
- bid_name: (data && data.name) ? data.name : bid
- });
- }
+ $.extend(ph, {
+ bid_priv_fingerprint: (data && data.fingerprint) ? data.fingerprint.replace(/(.{8})/g, '$1 ') : $.t('not_available'),
+ bid_jid: bid,
+ bid_name: (data && data.name) ? data.name : bid
+ });
+ }
- // placeholder depending on msg
- if (msg) {
- $.extend(ph, {
- msg: msg
- });
- }
+ // placeholder depending on msg
+ if (msg) {
+ $.extend(ph, {
+ msg: msg
+ });
+ }
- var ret = jsxc.gui.template[name];
+ var ret = jsxc.gui.template[name];
- if (typeof (ret) === 'string') {
- // prevent 404
- ret = ret.replace(/\{\{root\}\}/g, ph.root);
+ if (typeof(ret) === 'string') {
+ // prevent 404
+ ret = ret.replace(/\{\{root\}\}/g, ph.root);
- // convert to string
- ret = $('<div>').append($(ret).i18n()).html();
+ // convert to string
+ ret = $('<div>').append($(ret).i18n()).html();
- // replace placeholders
- ret = ret.replace(/\{\{([a-zA-Z0-9_\-]+)\}\}/g, function(s, key) {
- return (typeof ph[key] === 'string') ? ph[key] : s;
- });
+ // replace placeholders
+ ret = ret.replace(/\{\{([a-zA-Z0-9_\-]+)\}\}/g, function(s, key) {
+ return (typeof ph[key] === 'string') ? ph[key] : s;
+ });
- return ret;
- }
-
- jsxc.debug('Template not available: ' + name);
- return name;
- },
- authenticationDialog: '<h3>Verification</h3>\
- <p data-i18n="Authenticating_a_buddy_helps_"></p>\
- <div>\
- <p data-i18n="[html]How_do_you_want_to_authenticate_your_buddy" style="margin:0px;"></p>\
- <select size="1">\
- <option data-i18n="Select_method"></option>\
- <option data-i18n="Manual"></option>\
- <option data-i18n="Question"></option>\
- <option data-i18n="Secret"></option>\
- </select>\
- </div>\
- <div style="display:none">\
- <p data-i18n="To_verify_the_fingerprint_" class=".jsxc_explanation"></p>\
- <p><strong data-i18n="Your_fingerprint"></strong><br />\
- <span style="text-transform:uppercase">{{my_priv_fingerprint}}</span></p>\
- <p><strong data-i18n="Buddy_fingerprint"></strong><br />\
- <span style="text-transform:uppercase">{{bid_priv_fingerprint}}</span></p><br />\
- <p class="jsxc_right"><a href="#" data-i18n="Close" class="jsxc_close button"></a> <a href="#" data-i18n="Compared" class="button creation"></a></p>\
- </div>\
- <div style="display:none">\
- <p data-i18n="To_authenticate_using_a_question_" class=".jsxc_explanation"></p>\
- <p><label for="jsxc_quest" data-i18n="Question"></label><input type="text" name="quest" id="jsxc_quest" /></p>\
- <p><label for="jsxc_secret2" data-i18n="Secret"></label><input type="text" name="secret2" id="jsxc_secret2" /></p>\
- <p class="jsxc_right"><a href="#" class="button jsxc_close" data-i18n="Close"></a> <a href="#" class="button creation" data-i18n="Ask"></a></p>\
- </div>\
- <div style="display:none">\
- <p class=".jsxc_explanation" data-i18n="To_authenticate_pick_a_secret_"></p>\
- <p><label for="jsxc_secret" data-i18n="Secret"></label><input type="text" name="secret" id="jsxc_secret" /></p>\
- <p class="jsxc_right"><a href="#" class="button jsxc_close" data-i18n="Close"></a> <a href="#" class="button creation" data-i18n="Compare"></a></p>\
- </div>',
- fingerprintsDialog: '<div>\
- <p class="jsxc_maxWidth" data-i18n="A_fingerprint_"></p>\
- <p><strong data-i18n="Your_fingerprint"></strong><br />\
- <span style="text-transform:uppercase">{{my_priv_fingerprint}}</span></p>\
- <p><strong data-i18n="Buddy_fingerprint"></strong><br />\
- <span style="text-transform:uppercase">{{bid_priv_fingerprint}}</span></p><br />\
- <p class="jsxc_right"><a href="#" class="button jsxc_close" data-i18n="Close"></a></p>\
- </div>',
- chatWindow: '<li class="jsxc_min jsxc_windowItem">\
- <div class="jsxc_window">\
- <div class="jsxc_bar">\
- <div class="jsxc_avatar">☺</div>\
- <div class="jsxc_tools">\
- <div class="jsxc_settings">\
- <ul>\
- <li class="jsxc_fingerprints jsxc_otr jsxc_disabled" data-i18n="Fingerprints"></li>\
- <li class="jsxc_verification" data-i18n="Authentication"></li>\
- <li class="jsxc_transfer jsxc_otr jsxc_disabled" data-i18n="start_private"></li>\
- <li class="jsxc_clear" data-i18n="clear_history"></li>\
- </ul>\
- </div>\
- <div class="jsxc_transfer jsxc_otr jsxc_disabled"/>\
- <div class="jsxc_close">×</div>\
- </div>\
- <div class="jsxc_name"/>\
- <div class="jsxc_cycle"/>\
- </div>\
- <div class="jsxc_fade">\
- <div class="jsxc_gradient"/>\
- <div class="jsxc_textarea"/>\
- <div class="jsxc_emoticons"><ul/></div>\
- <input type="text" class="jsxc_textinput" data-i18n="[placeholder]Message"/>\
- </div>\
- </div>\
- </li>',
- roster: '<div id="jsxc_roster">\
- <ul id="jsxc_buddylist"></ul>\
- <div class="jsxc_bottom jsxc_presence" data-bid="own">\
- <div id="jsxc_avatar">\
- <div class="jsxc_avatar">☺</div>\
- </div>\
- <div id="jsxc_menu">\
- <span></span>\
- <ul>\
- <li class="jsxc_settings" data-i18n="Settings"></li>\
- <li class="jsxc_muteNotification" data-i18n="Mute"></li>\
- <li class="jsxc_addBuddy" data-i18n="Add_buddy"></li>\
- <li class="jsxc_hideOffline" data-i18n="Hide_offline"></li>\
- <li class="jsxc_onlineHelp" data-i18n="Online_help"></li>\
- <li class="jsxc_about" data-i18n="About"></li>\
- </ul>\
- </div>\
- <div id="jsxc_notice">\
- <span></span>\
- <ul></ul>\
- </div>\
- <div id="jsxc_presence">\
- <span data-i18n="Online"></span>\
- <ul>\
- <li data-pres="online" class="jsxc_online" data-i18n="Online"></li>\
- <li data-pres="chat" class="jsxc_chat" data-i18n="Chatty"></li>\
- <li data-pres="away" class="jsxc_away" data-i18n="Away"></li>\
- <li data-pres="xa" class="jsxc_xa" data-i18n="Extended_away"></li>\
- <li data-pres="dnd" class="jsxc_dnd" data-i18n="dnd"></li>\
- <li data-pres="offline" class="jsxc_offline" data-i18n="Offline"></li>\
- </ul>\
- </div>\
- </div>\
- <div id="jsxc_toggleRoster"></div>\
- </div>',
- windowList: '<div id="jsxc_windowList">\
- <ul></ul>\
- </div>\
- <div id="jsxc_windowListSB">\
- <div class="jsxc_scrollLeft jsxc_disabled">&lt;</div>\
- <div class="jsxc_scrollRight jsxc_disabled">&gt;</div>\
- </div>',
- rosterBuddy: '<li>\
- <div class="jsxc_avatar">☺</div>\
- <div class="jsxc_control"></div>\
- <div class="jsxc_name"/>\
- <div class="jsxc_options jsxc_right">\
- <div class="jsxc_rename" data-i18n="[title]rename_buddy">✎</div>\
- <div class="jsxc_delete" data-i18n="[title]delete_buddy">✘</div>\
- </div>\
- <div class="jsxc_options jsxc_left">\
- <div class="jsxc_chaticon" data-i18n="[title]send_message"/>\
- <div class="jsxc_vcardicon" data-i18n="[title]get_info">i</div>\
- </div>\
- </li>',
- loginBox: '<h3 data-i18n="Login"></h3>\
- <form>\
- <p><label for="jsxc_username" data-i18n="Username"></label>\
- <input type="text" name="username" id="jsxc_username" required="required" value="{{my_node}}"/></p>\
- <p><label for="jsxc_password" data-i18n="Password"></label>\
- <input type="password" name="password" required="required" id="jsxc_password" /></p>\
- <div class="jsxc_alert jsxc_alert-warning" data-i18n="Sorry_we_cant_authentikate_"></div>\
- <div class="bottom_submit_section">\
- <button type="reset" class="jsxc_btn jsxc_close" name="clear" data-i18n="Cancel"/>\
- <button type="submit" class="jsxc_btn jsxc_btn-primary" name="commit" data-i18n="[data-jsxc-loading-text]Connecting...;Connect"/>\
- </div>\
- </form>',
- contactDialog: '<h3 data-i18n="Add_buddy"></h3>\
- <p class=".jsxc_explanation" data-i18n="Type_in_the_full_username_"></p>\
- <form>\
- <p><label for="jsxc_username" data-i18n="Username"></label>\
- <input type="text" name="username" id="jsxc_username" list="jsxc_userlist" pattern="^[^\\x22&\'\\/:<>@\\s]+(@[.\\-_\\w]+)?" required="required" /></p>\
- <datalist id="jsxc_userlist"></datalist>\
- <p><label for="jsxc_alias" data-i18n="Alias"></label>\
- <input type="text" name="alias" id="jsxc_alias" /></p>\
- <p class="jsxc_right">\
- <input class="button" type="submit" data-i18n="[value]Add" />\
- </p>\
- <form>',
- approveDialog: '<h3 data-i18n="Subscription_request"></h3>\
- <p><span data-i18n="You_have_a_request_from"></span><b class="jsxc_their_jid"></b>.</p>\
- <p class="jsxc_right"><a href="#" class="button jsxc_deny" data-i18n="Deny"></a> <a href="#" class="button creation jsxc_approve" data-i18n="Approve"></a></p>',
- removeDialog: '<h3 data-i18n="Remove_buddy"></h3>\
- <p class="jsxc_maxWidth" data-i18n="[html]You_are_about_to_remove_"></p>\
- <p class="jsxc_right"><a href="#" class="button jsxc_cancel jsxc_close" data-i18n="Cancel"></a> <a href="#" class="button creation" data-i18n="Remove"></a></p>',
- waitAlert: '<h3>{{msg}}</h3>\
- <p data-i18n="Please_wait"></p>\
- <p class="jsxc_center"><img src="{{root}}/img/loading.gif" alt="wait" width="32px" height="32px" /></p>',
- alert: '<h3 data-i18n="Alert"></h3>\
- <p>{{msg}}</p>\
- <p class="jsxc_right"><a href="#" data-i18n="Ok" class="button jsxc_close jsxc_cancel"></a></p>',
- authFailDialog: '<h3 data-i18n="Login_failed"></h3>\
- <p data-i18n="Sorry_we_cant_authentikate_"></p>\
- <p class="jsxc_right">\
- <a class="button jsxc_cancel" data-i18n="Continue_without_chat"></a>\
- <a class="button creation" data-i18n="Retry"></a>\
- </p>',
- confirmDialog: '<p>{{msg}}</p>\
- <p class="jsxc_right">\
- <a class="button jsxc_cancel jsxc_close" data-i18n="Dismiss"></a>\
- <a class="button creation" data-i18n="Confirm"></a>\
- </p>',
- pleaseAccept: '<p data-i18n="Please_accept_"></p>',
- aboutDialog: '<h3>JavaScript XMPP Chat</h3>\
- <p><b>Version: </b>' + jsxc.version + '<br />\
- <a href="http://jsxc.org/" target="_blank">www.jsxc.org</a></p>\
- <p><i>Released under the MIT license</i></p>\
- <p>Real-time chat app for {{app_name}} and more.<br />\
- Requires an external <a href="https://xmpp.org/xmpp-software/servers/" target="_blank">XMPP server</a>.</p>\
- <p><b>Credits: </b> <a href="http://www.beepzoid.com/old-phones/" target="_blank">David English (Ringtone)</a>,\
- <a href="https://soundcloud.com/freefilmandgamemusic/ping-1?in=freefilmandgamemusic/sets/free-notification-sounds-and" target="_blank">CameronMusic (Ping)</a></p>\
- <p class="jsxc_libraries"><b>Libraries: </b><a href="http://strophe.im/strophejs/">strophe.js</a> (multiple), <a href="https://github.com/strophe/strophejs-plugins">strophe.js/muc</a> (MIT), <a href="https://github.com/strophe/strophejs-plugins">strophe.js/disco</a> (MIT), <a href="https://github.com/strophe/strophejs-plugins">strophe.js/caps</a> (MIT), <a href="https://github.com/strophe/strophejs-plugins">strophe.js/vcard</a> (MIT), <a href="https://github.com/ESTOS/strophe.jingle">strophe.jingle</a> (MIT), <a href="https://github.com/neoatlantis/node-salsa20">Salsa20</a> (AGPL3), <a href="www.leemon.com">bigint</a> (public domain), <a href="code.google.com/p/crypto-js">cryptojs</a> (code.google.com/p/crypto-js/wiki/license), <a href="http://git.io/ee">eventemitter</a> (MIT), <a href="https://arlolra.github.io/otr/">otr.js</a> (MPL v2.0), <a href="http://i18next.com/">i18next</a> (MIT)</p>\
- <p class="jsxc_right"><a class="button jsxc_debuglog" href="#">Show debug log</a></p>',
- vCard: '<h3><span data-i18n="Info_about"></span> <span>{{bid_name}}</span></h3>\
- <ul class="jsxc_vCard"></ul>\
- <p><img src="{{root}}/img/loading.gif" alt="wait" width="32px" height="32px" /> <span data-i18n="Please_wait"></span>...</p>',
- settings: '<h3 data-i18n="User_settings"></h3>\
- <p></p>\
- <form>\
- <fieldset class="jsxc_fieldsetXmpp jsxc_fieldset">\
- <legend data-i18n="Login_options"></legend>\
- <label for="xmpp-url" data-i18n="BOSH_url"></label><input type="text" id="xmpp-url" readonly="readonly"/><br />\
- <label for="xmpp-username" data-i18n="Username"></label><input type="text" id="xmpp-username"/><br />\
- <label for="xmpp-domain" data-i18n="Domain"></label><input type="text" id="xmpp-domain"/><br />\
- <label for="xmpp-resource" data-i18n="Resource"></label><input type="text" id="xmpp-resource"/><br />\
- <label for="xmpp-onlogin" data-i18n="On_login"></label><input type="checkbox" id="xmpp-onlogin" /><br />\
- <input type="submit" data-i18n="[value]Save"/>\
- </fieldset>\
- </form>\
- <p></p>\
- <form>\
- <fieldset class="jsxc_fieldsetPriority jsxc_fieldset">\
- <legend data-i18n="Priority"></legend>\
- <label for="priority-online" data-i18n="Online"></label><input type="number" value="0" id="priority-online" min="-128" max="127" step="1" required="required"/><br />\
- <label for="priority-chat" data-i18n="Chatty"></label><input type="number" value="0" id="priority-chat" min="-128" max="127" step="1" required="required"/><br />\
- <label for="priority-away" data-i18n="Away"></label><input type="number" value="0" id="priority-away" min="-128" max="127" step="1" required="required"/><br />\
- <label for="priority-xa" data-i18n="Extended_away"></label><input type="number" value="0" id="priority-xa" min="-128" max="127" step="1" required="required"/><br />\
- <label for="priority-dnd" data-i18n="dnd"></label><input type="number" value="0" id="priority-dnd" min="-128" max="127" step="1" required="required"/><br />\
- <input type="submit" data-i18n="[value]Save"/>\
- </fieldset>\
- </form>\
- <p></p>\
- <form data-onsubmit="xmpp.carbons.refresh">\
- <fieldset class="jsxc_fieldsetCarbons jsxc_fieldset">\
- <legend data-i18n="Carbon_copy"></legend>\
- <label for="carbons-enable" data-i18n="Enable"></label><input type="checkbox" id="carbons-enable" /><br />\
- <input type="submit" data-i18n="[value]Save"/>\
- </fieldset>\
- </form>'
-};
+ return ret;
+ }
-jsxc.gui.template.joinChat = '<h3 data-i18n="Join_chat"></h3>\
- <p class=".jsxc_explanation" data-i18n="muc_explanation"></p>\
- <p><label for="jsxc_server" data-i18n="Server"></label>\
- <input type="text" name="server" id="jsxc_server" required="required" readonly="readonly" /></p>\
- <p><label for="jsxc_room" data-i18n="Room"></label>\
- <input type="text" name="room" id="jsxc_room" autocomplete="off" list="jsxc_roomlist" required="required" pattern="^[^\\x22&\'\\/:<>@\\s]+" /></p>\
- <p class="jsxc_inputinfo jsxc_waiting jsxc_room" data-i18n="Rooms_are_loaded"></p>\
- <datalist id="jsxc_roomlist">\
- <p><label for="jsxc_roomlist_select"></label><select id="jsxc_roomlist_select"><option></option><option>workaround</option></select></p>\
- </datalist>\
- <p><label for="jsxc_nickname" data-i18n="Nickname"></label>\
- <input type="text" name="nickname" id="jsxc_nickname" /></p>\
- <p><label for="jsxc_password" data-i18n="Password"></label>\
- <input type="text" name="password" id="jsxc_password" /></p>\
- <div class="jsxc_msg"></div>\
- <p class="jsxc_right">\
- <span class="jsxc_warning"></span> <a href="#" class="button jsxc_close" data-i18n="Close"></a> <a href="#" class="button jsxc_continue" data-i18n="Continue"> <a href="#" class="button jsxc_join" data-i18n="Join"></a>\
- </p>';
+ jsxc.debug('Template not available: ' + name);
+ return name;
+};
/**
* Implements Multi-User Chat (XEP-0045).
@@ -3497,14 +4610,26 @@ jsxc.muc = {
* Open join dialog.
*
* @memberOf jsxc.muc
+ * @param {string} [r] - room jid
+ * @param {string} [p] - room password
*/
- showJoinChat: function() {
+ showJoinChat: function(r, p) {
var self = jsxc.muc;
var dialog = jsxc.gui.dialog.open(jsxc.gui.template.get('joinChat'));
// hide second step button
dialog.find('.jsxc_join').hide();
+ // prepopulate room jid
+ if (typeof r === 'string') {
+ dialog.find('#jsxc_room').val(r);
+ }
+
+ // prepopulate room password
+ if (typeof p === 'string') {
+ dialog.find('#jsxc_password').val(p);
+ }
+
// display conference server
dialog.find('#jsxc_server').val(jsxc.options.get('muc').server);
@@ -3601,6 +4726,16 @@ jsxc.muc = {
dialog.find('#jsxc_nickname').attr('placeholder', Strophe.getNodeFromJid(self.conn.jid));
+ dialog.find('#jsxc_bookmark').change(function() {
+ if ($(this).prop('checked')) {
+ $('#jsxc_autojoin').prop('disabled', false);
+ $('#jsxc_autojoin').parent('.checkbox').removeClass('disabled');
+ } else {
+ $('#jsxc_autojoin').prop('disabled', true).prop('checked', false);
+ $('#jsxc_autojoin').parent('.checkbox').addClass('disabled');
+ }
+ });
+
dialog.find('.jsxc_continue').click(function(ev) {
ev.preventDefault();
@@ -3638,7 +4773,10 @@ jsxc.muc = {
dialog.find('.jsxc_join').click(function(ev) {
ev.preventDefault();
- self.join(room, nickname, password, roomName, subject);
+ var bookmark = $("#jsxc_bookmark").prop("checked");
+ var autojoin = $('#jsxc_autojoin').prop('checked');
+
+ self.join(room, nickname, password, roomName, subject, bookmark, autojoin);
return false;
});
@@ -3709,6 +4847,83 @@ jsxc.muc = {
});
},
+ /**
+ * Request and show room configuration.
+ *
+ * @memberOf jsxc.muc
+ * @param {string} room - room jid
+ */
+ showRoomConfiguration: function(room) {
+ var self = jsxc.muc;
+
+ self.conn.muc.configure(room, function(stanza) {
+
+ var form = Strophe.x.Form.fromXML(stanza);
+
+ window.f = form;
+ self._showRoomConfiguration(room, form);
+ }, function() {
+ jsxc.debug('Could not load room configuration');
+
+ //@TODO show error
+ });
+ },
+
+ /**
+ * Show room configuration.
+ *
+ * @private
+ * @memberOf jsxc.muc
+ * @param {string} room - room jid
+ * @param {Strophe.x.Form} config - current room config as Form object
+ */
+ _showRoomConfiguration: function(room, config) {
+ var self = jsxc.muc;
+ var dialog = jsxc.gui.dialog.open(jsxc.muc.helper.formToHTML(config));
+ var form = dialog.find('form');
+
+ var submit = $('<button>');
+ submit.addClass('btn btn-primary');
+ submit.attr('type', 'submit');
+ submit.text($.t('Join'));
+
+ var cancel = $('<button>');
+ cancel.addClass('btn btn-default');
+ cancel.attr('type', 'button');
+ cancel.text($.t('Cancel'));
+
+ var formGroup = $('<div>');
+ formGroup.addClass('form-group');
+ $('<div>').addClass('col-sm-offset-6 col-sm-6').appendTo(formGroup);
+ formGroup.find('>div').append(cancel);
+ formGroup.find('>div').append(submit);
+
+ form.append(formGroup);
+
+ form.submit(function(ev) {
+ ev.preventDefault();
+
+ var config = Strophe.x.Form.fromHTML(form.get(0));
+ self.conn.muc.saveConfiguration(room, config, function() {
+ jsxc.debug('Room configuration saved.');
+ }, function() {
+ jsxc.warn('Could not save room configuration.');
+
+ //@TODO display error
+ });
+
+ jsxc.gui.dialog.close();
+
+ return false;
+ });
+
+ cancel.click(function() {
+ self.conn.muc.cancelConfigure(room);
+
+ jsxc.gui.dialog.close();
+ });
+ },
+
/**
* Join the given room.
*
@@ -3719,7 +4934,7 @@ jsxc.muc = {
* @param {string} [roomName] Room alias
* @param {string} [subject] Current subject
*/
- join: function(room, nickname, password, roomName, subject) {
+ join: function(room, nickname, password, roomName, subject, bookmark, autojoin) {
var self = jsxc.muc;
jsxc.storage.setUserItem('buddy', room, {
@@ -3728,10 +4943,17 @@ jsxc.muc = {
sub: 'both',
type: 'groupchat',
state: self.CONST.ROOMSTATE.INIT,
- subject: subject
+ subject: subject,
+ bookmarked: bookmark || false,
+ autojoin: autojoin || false,
+ nickname: nickname
});
jsxc.xmpp.conn.muc.join(room, nickname, null, null, null, password);
+
+ if (bookmark) {
+ jsxc.xmpp.bookmarks.add(room, roomName, nickname, autojoin);
+ }
},
/**
@@ -3764,6 +4986,7 @@ jsxc.muc = {
onExited: function(room) {
var self = jsxc.muc;
var own = jsxc.storage.getUserItem('ownNicknames') || {};
+ var roomdata = jsxc.storage.getUserItem('buddy', room) || {};
jsxc.storage.setUserItem('roomNames', self.conn.muc.roomNames);
@@ -3773,7 +4996,12 @@ jsxc.muc = {
jsxc.storage.removeUserItem('chat', room);
jsxc.gui.window.close(room);
- jsxc.gui.roster.purge(room);
+
+ jsxc.storage.updateUserItem('buddy', room, 'state', self.CONST.ROOMSTATE.EXITED);
+
+ if (!roomdata.bookmarked) {
+ jsxc.gui.roster.purge(room);
+ }
},
/**
@@ -3786,6 +5014,7 @@ jsxc.muc = {
*/
destroy: function(room, handler_cb, error_cb) {
var self = jsxc.muc;
+ var roomdata = jsxc.storage.getUserItem('buddy', room);
jsxc.storage.updateUserItem('buddy', room, 'state', self.CONST.ROOMSTATE.AWAIT_DESTRUCTION);
jsxc.gui.window.postMessage(room, 'sys', $.t('This_room_will_be_closed'));
@@ -3798,6 +5027,10 @@ jsxc.muc = {
}).c("destroy");
jsxc.muc.conn.sendIQ(iq.tree(), handler_cb, error_cb);
+
+ if (roomdata.bookmarked) {
+ jsxc.xmpp.bookmarks.delete(room);
+ }
},
/**
@@ -3851,7 +5084,7 @@ jsxc.muc = {
return;
}
- if (self.conn.muc.roomNames.indexOf(data.jid) < 0) {
+ if (roomdata.type !== 'groupchat') {
return;
}
@@ -3981,6 +5214,7 @@ jsxc.muc = {
onPresence: function(event, from, status, presence) {
var self = jsxc.muc;
var room = jsxc.jidToBid(from);
+ var roomdata = jsxc.storage.getUserItem('buddy', room);
var xdata = $(presence).find('x[xmlns^="' + Strophe.NS.MUC + '"]');
if (self.conn.muc.roomNames.indexOf(room) < 0 || xdata.length === 0) {
@@ -4001,7 +5235,7 @@ jsxc.muc = {
codes.push(code);
});
- if (jsxc.gui.roster.getItem(room).length === 0) {
+ if (roomdata.state === self.CONST.ROOMSTATE.INIT) {
// successfully joined
jsxc.storage.setUserItem('roomNames', jsxc.xmpp.conn.muc.roomNames);
@@ -4010,11 +5244,13 @@ jsxc.muc = {
jsxc.storage.removeUserItem('chat', room);
member = {};
- var bl = jsxc.storage.getUserItem('buddylist');
- bl.push(room);
- jsxc.storage.setUserItem('buddylist', bl);
+ if (jsxc.gui.roster.getItem(room).length === 0) {
+ var bl = jsxc.storage.getUserItem('buddylist');
+ bl.push(room);
+ jsxc.storage.setUserItem('buddylist', bl);
- jsxc.gui.roster.add(room);
+ jsxc.gui.roster.add(room);
+ }
jsxc.gui.window.open(room);
jsxc.gui.dialog.close();
@@ -4152,12 +5388,38 @@ jsxc.muc = {
170: function(room) {
jsxc.gui.window.postMessage(room, 'sys', $.t('Room_logging_is_enabled'));
},
+ /** Inform occupants that room logging is now disabled */
+ 171: function(room) {
+ jsxc.gui.window.postMessage(room, 'sys', $.t('Room_logging_is_disabled'));
+ },
+ /** Inform occupants that the room is now non-anonymous */
+ 172: function(room) {
+ jsxc.gui.window.postMessage(room, 'sys', $.t('Room_is_now_non-anoymous'));
+ },
+ /** Inform occupants that the room is now semi-anonymous */
+ 173: function(room) {
+ jsxc.gui.window.postMessage(room, 'sys', $.t('Room_is_now_semi-anonymous'));
+ },
/** Inform user that a new room has been created */
201: function(room) {
var self = jsxc.muc;
- //@TODO let user choose between instant and reserved room
- self.conn.muc.createInstantRoom(room);
+ jsxc.gui.showSelectionDialog({
+ header: $.t('Room_creation'),
+ msg: $.t('Do_you_want_to_change_the_default_room_configuration'),
+ primary: {
+ label: $.t('Default'),
+ cb: function() {
+ self.conn.muc.createInstantRoom(room);
+ }
+ },
+ option: {
+ label: $.t('Change'),
+ cb: function() {
+ self.showRoomConfiguration(room);
+ }
+ }
+ });
},
/** Inform user that he or she has been banned */
301: function(room, nickname, data, xdata) {
@@ -4463,10 +5725,213 @@ jsxc.muc = {
return;
}
- bud.find('.jsxc_delete').off('click').click(function() {
+ var bo = $('<div>');
+ bo.text('+');
+ bo.addClass('jsxc_bookmarkOptions');
+ bo.click(function(ev) {
+ ev.preventDefault();
+
+ jsxc.xmpp.bookmarks.showDialog(room);
+
+ return false;
+ });
+
+ bud.find('.jsxc_rename').before(bo);
+
+ if (data.bookmarked) {
+ bud.addClass('jsxc_bookmarked');
+ }
+
+ bud.off('click').click(function() {
+ var data = jsxc.storage.getUserItem('buddy', room);
+
+ if (data.state === self.CONST.ROOMSTATE.INIT || data.state === self.CONST.ROOMSTATE.EXITED) {
+ self.showJoinChat();
+
+ $('#jsxc_room').val(Strophe.getNodeFromJid(data.jid));
+ $('#jsxc_nickname').val(data.nickname);
+ $('#jsxc_bookmark').prop('checked', data.bookmarked);
+ $('#jsxc_autojoin').prop('checked', data.autojoin);
+ $('#jsxc_dialog .jsxc_bookmark').hide();
+ } else {
+ jsxc.gui.window.open(room);
+ }
+ });
+
+ bud.find('.jsxc_delete').click(function() {
+ if (data.bookmarked) {
+ jsxc.xmpp.bookmarks.delete(room);
+ }
+
self.leave(room);
return false;
});
+ },
+
+ /**
+ * Some helper functions.
+ *
+ * @type {Object}
+ */
+ helper: {
+ /**
+ * Convert x:data form to html.
+ *
+ * @param {Strophe.x.Form} form - x:data form
+ * @return {jQuery} jQuery representation of x:data field
+ */
+ formToHTML: function(form) {
+ if (!(form instanceof Strophe.x.Form)) {
+ return;
+ }
+
+ var html = $('<form>');
+
+ html.attr('data-type', form.type);
+ html.addClass('form-horizontal');
+
+ if (form.title) {
+ html.append("<h3>" + form.title + "</h3>");
+ }
+
+ if (form.instructions) {
+ html.append("<p>" + form.instructions + "</p>");
+ }
+
+ if (form.fields.length > 0) {
+ var i;
+ for (i = 0; i < form.fields.length; i++) {
+ html.append(jsxc.muc.helper.fieldToHtml(form.fields[i]));
+ }
+ }
+
+ return $('<div>').append(html).html();
+ },
+
+ /**
+ * Convert x:data field to html.
+ *
+ * @param {Strophe.x.Field} field - x:data field
+ * @return {html} html representation of x:data field
+ */
+ fieldToHtml: function(field) {
+ var self = field || this;
+ field = null;
+ var el, val, opt, i, o, j, k, txt, line, _ref2;
+
+ var id = "Strophe.x.Field-" + self['type'] + "-" + self['var'];
+ var html = $('<div>');
+ html.addClass('form-group');
+
+ if (self.label) {
+ var label = $('<label>');
+ label.attr('for', id);
+ label.addClass('col-sm-6 control-label');
+ label.text(self.label);
+ label.appendTo(html);
+ }
+
+ switch (self.type.toLowerCase()) {
+ case 'list-single':
+ case 'list-multi':
+ el = $('<select>');
+ if (self.type === 'list-multi') {
+ el.attr('multiple', 'multiple');
+ }
+
+ for (i = 0; i < self.options.length; i++) {
+ opt = self.options[i];
+ if (!opt) {
+ continue;
+ }
+ o = $(opt.toHTML());
+
+ for (j = 0; j < self.values; j++) {
+ k = self.values[j];
+ if (k.toString() === opt.value.toString()) {
+ o.attr('selected', 'selected');
+ }
+ }
+ o.appendTo(el);
+ }
+
+ break;
+ case 'text-multi':
+ case 'jid-multi':
+ el = $("<textarea>");
+ txt = ((function() {
+ var i, _results;
+ _results = [];
+ for (i = 0; i < self.values.length; i++) {
+ line = self.values[i];
+ _results.push(line);
+ }
+ return _results;
+ }).call(this)).join('\n');
+ if (txt) {
+ el.text(txt);
+ }
+ break;
+ case 'text-single':
+ case 'boolean':
+ case 'text-private':
+ case 'hidden':
+ case 'fixed':
+ case 'jid-single':
+ el = $("<input>");
+
+ if (self.values) {
+ el.attr('value', self.values[0]);
+ }
+ switch (self.type.toLowerCase()) {
+ case 'text-single':
+ el.attr('type', 'text');
+ el.attr('placeholder', self.desc);
+ el.addClass('form-control');
+ break;
+ case 'boolean':
+ el.attr('type', 'checkbox');
+ val = (_ref2 = self.values[0]) != null ? typeof _ref2.toString === "function" ? _ref2.toString() : void 0 : void 0;
+ if (val && (val === "true" || val === "1")) {
+ el.attr('checked', 'checked');
+ }
+ break;
+ case 'text-private':
+ el.attr('type', 'password');
+ el.addClass('form-control');
+ break;
+ case 'hidden':
+ el.attr('type', 'hidden');
+ break;
+ case 'fixed':
+ el.attr('type', 'text').attr('readonly', 'readonly');
+ el.addClass('form-control');
+ break;
+ case 'jid-single':
+ el.attr('type', 'email');
+ el.addClass('form-control');
+ }
+ break;
+ default:
+ el = $("<input type='text'>");
+ }
+
+ el.attr('id', id);
+ el.attr('name', self["var"]);
+
+ if (self.required) {
+ el.attr('required', self.required);
+ }
+
+ var inner = el;
+ el = $('<div>');
+ el.addClass('col-sm-6');
+ el.append(inner);
+
+ html.append(el);
+
+ return html.get(0);
+ }
}
};
@@ -4587,7 +6052,7 @@ jsxc.notice = {
var saved = jsxc.storage.getUserItem('notices') || [];
var has = false;
- $.each(saved, function(index, val){
+ $.each(saved, function(index, val) {
if (val.fnName === fnName) {
has = true;
@@ -4620,7 +6085,9 @@ jsxc.notification = {
var data = jsxc.storage.getUserItem('buddy', bid);
jsxc.notification.notify({
- title: $.t('New_message_from') + ' ' + data.name,
+ title: $.t('New_message_from', {
+ name: data.name
+ }),
msg: msg,
soundFile: jsxc.CONST.SOUNDS.MSG,
source: bid
@@ -4899,12 +6366,23 @@ jsxc.options = {
/** xmpp options */
xmpp: {
+ /** BOSH url */
url: null,
+
+ /** XMPP JID*/
jid: null,
+
+ /** XMPP domain */
domain: null,
+
+ /** XMPP password */
password: null,
+
+ /** True: Allow user to overwrite xmpp settings */
overwrite: false,
- onlogin: true
+
+ /** @deprecated since v2.1.0. Use now loginForm.enable. */
+ onlogin: null
},
/** default xmpp priorities */
@@ -4916,8 +6394,11 @@ jsxc.options = {
dnd: 0
},
- /** If all 3 properties are set, the login form is used */
+ /** If all 3 properties are set and enable is true, the login form is used */
loginForm: {
+ /** False, disables login through login form */
+ enable: true,
+
/** jquery object from form */
form: null,
@@ -4948,7 +6429,16 @@ jsxc.options = {
* Action after auth fail: submit [String] Submit form, false [boolean] | quiet [String] Do
* nothing, ask [String] Show auth fail dialog
*/
- onAuthFail: 'submit'
+ onAuthFail: 'submit',
+
+ /** True: Attach connection even is login form was found */
+ attachIfFound: true,
+
+ /**
+ * True: Display roster minimized after first login. Afterwards the last
+ * roster state will be used.
+ */
+ startMinimized: false
},
/** jquery object from logout element */
@@ -5003,16 +6493,21 @@ jsxc.options = {
},
/**
+ * This callback processes all settings.
+ * @callback loadSettingsCallback
+ * @param settings {object} could be every jsxc option
+ */
+
+ /**
* Returns permanent saved settings and overwrite default jsxc.options.
*
* @memberOf jsxc.options
- * @param username String username
- * @param password String password
- * @returns {object} at least xmpp.url
+ * @function
+ * @param username {string} username
+ * @param password {string} password
+ * @param cb {loadSettingsCallback} Callback that handles the result
*/
- loadSettings: function() {
-
- },
+ loadSettings: null,
/**
* Call this function to save user settings permanent.
@@ -5045,7 +6540,35 @@ jsxc.options = {
* @param {string} search Search token (start with)
* @param {getUsers-cb} cb Called with list of users
*/
- getUsers: null
+ getUsers: null,
+
+ /** Options for info in favicon */
+ favicon: {
+ enable: true,
+
+ /** Favicon info background color */
+ bgColor: '#E59400',
+
+ /** Favicon info text color */
+ textColor: '#fff'
+ },
+
+ /** @deprecated since v2.1.0. Use now RTCPeerConfig.url. */
+ turnCredentialsPath: null,
+
+ /** RTCPeerConfiguration used for audio/video calls. */
+ RTCPeerConfig: {
+ /** Time-to-live for config from url */
+ ttl: 3600,
+
+ /** [optional] If set, jsxc requests and uses RTCPeerConfig from this url */
+ url: null,
+
+ /** ICE servers like defined in http://www.w3.org/TR/webrtc/#idl-def-RTCIceServer */
+ iceServers: [{
+ urls: 'stun:stun.stunprotocol.org'
+ }]
+ }
};
/**
@@ -5143,7 +6666,9 @@ jsxc.otr = {
data.fingerprint = jsxc.otr.objects[bid].their_priv_pk.fingerprint();
data.msgstate = OTR.CONST.MSGSTATE_ENCRYPTED;
- var msg = (jsxc.otr.objects[bid].trust ? $.t('Verified') : $.t('Unverified')) + ' ' + $.t('private_conversation_started');
+ var msg_state = jsxc.otr.objects[bid].trust ? 'Verified' : 'Unverified';
+ var msg = $.t(msg_state + '_private_conversation_started');
+
jsxc.gui.window.postMessage(bid, 'sys', msg);
break;
case OTR.CONST.STATUS_END_OTR:
@@ -5258,10 +6783,10 @@ jsxc.otr = {
if (data) {
$('#jsxc_dialog > div:eq(2)').find('#jsxc_quest').val(data).prop('disabled', true);
- $('#jsxc_dialog > div:eq(2)').find('.creation').text('Answer');
- $('#jsxc_dialog > div:eq(2)').find('.jsxc_explanation').text($.t('your_buddy_is_attempting_to_determine_') + ' ' + $.t('to_authenticate_to_your_buddy') + $.t('enter_the_answer_and_click_answer'));
+ $('#jsxc_dialog > div:eq(2)').find('.jsxc_submit').text($('Answer'));
+ $('#jsxc_dialog > div:eq(2)').find('.jsxc_explanation').text($.t('onsmp_explanation_question'));
} else {
- $('#jsxc_dialog > div:eq(3)').find('.jsxc_explanation').text($.t('your_buddy_is_attempting_to_determine_') + ' ' + $.t('to_authenticate_to_your_buddy') + $.t('enter_the_secret'));
+ $('#jsxc_dialog > div:eq(3)').find('.jsxc_explanation').text($.t('onsmp_explanation_secret'));
}
$('#jsxc_dialog .jsxc_close').click(function() {
@@ -5355,7 +6880,7 @@ jsxc.otr = {
}
// all variables which should be saved
- var savekey = [ 'jid', 'our_instance_tag', 'msgstate', 'authstate', 'fragment', 'their_y', 'their_old_y', 'their_keyid', 'their_instance_tag', 'our_dh', 'our_old_dh', 'our_keyid', 'sessKeys', 'storedMgs', 'oldMacKeys', 'trust', 'transmittedRS', 'ssid', 'receivedPlaintext', 'authstate', 'send_interval' ];
+ var savekey = ['jid', 'our_instance_tag', 'msgstate', 'authstate', 'fragment', 'their_y', 'their_old_y', 'their_keyid', 'their_instance_tag', 'our_dh', 'our_old_dh', 'our_keyid', 'sessKeys', 'storedMgs', 'oldMacKeys', 'trust', 'transmittedRS', 'ssid', 'receivedPlaintext', 'authstate', 'send_interval'];
var i;
for (i = 0; i < savekey.length; i++) {
@@ -5423,9 +6948,9 @@ jsxc.otr = {
OTR = {};
OTR.CONST = {
- MSGSTATE_PLAINTEXT : 0,
- MSGSTATE_ENCRYPTED : 1,
- MSGSTATE_FINISHED : 2
+ MSGSTATE_PLAINTEXT: 0,
+ MSGSTATE_ENCRYPTED: 1,
+ MSGSTATE_FINISHED: 2
};
jsxc._onMaster();
@@ -5441,7 +6966,7 @@ jsxc.otr = {
// try to create web-worker
try {
- worker = new Worker(jsxc.options.root + '/lib/otr/build/dsa-webworker.js');
+ worker = new Worker(jsxc.options.root + '/lib/otr/lib/dsa-webworker.js');
} catch (err) {
jsxc.warn('Couldn\'t create web-worker.', err);
}
@@ -5467,7 +6992,7 @@ jsxc.otr = {
// start worker
worker.postMessage({
- imports: [ jsxc.options.root + '/lib/otr/vendor/salsa20.js', jsxc.options.root + '/lib/otr/vendor/bigint.js', jsxc.options.root + '/lib/otr/vendor/crypto.js', jsxc.options.root + '/lib/otr/vendor/eventemitter.js', jsxc.options.root + '/lib/otr/lib/const.js', jsxc.options.root + '/lib/otr/lib/helpers.js', jsxc.options.root + '/lib/otr/lib/dsa.js' ],
+ imports: [jsxc.options.root + '/lib/otr/vendor/salsa20.js', jsxc.options.root + '/lib/otr/vendor/bigint.js', jsxc.options.root + '/lib/otr/vendor/crypto.js', jsxc.options.root + '/lib/otr/vendor/eventemitter.js', jsxc.options.root + '/lib/otr/lib/const.js', jsxc.options.root + '/lib/otr/lib/helpers.js', jsxc.options.root + '/lib/otr/lib/dsa.js'],
seed: BigInt.getSeed(),
debug: true
});
@@ -5533,2720 +7058,2548 @@ jsxc.otr = {
}
};
-
-
+/**
+ * Handle long-live data
+ *
+ * @namespace jsxc.storage
+ */
+jsxc.storage = {
/**
- * Handle long-live data
+ * Prefix for localstorage
*
- * @namespace jsxc.storage
+ * @privat
*/
- jsxc.storage = {
- /**
- * Prefix for localstorage
- *
- * @privat
- */
- PREFIX: 'jsxc',
+ PREFIX: 'jsxc',
- SEP: ':',
+ SEP: ':',
- /**
- * @param {type} uk Should we generate a user prefix?
- * @returns {String} prefix
- * @memberOf jsxc.storage
- */
- getPrefix: function(uk) {
- var self = jsxc.storage;
+ /**
+ * @param {type} uk Should we generate a user prefix?
+ * @returns {String} prefix
+ * @memberOf jsxc.storage
+ */
+ getPrefix: function(uk) {
+ var self = jsxc.storage;
- return self.PREFIX + self.SEP + ((uk && jsxc.bid) ? jsxc.bid + self.SEP : '');
- },
+ return self.PREFIX + self.SEP + ((uk && jsxc.bid) ? jsxc.bid + self.SEP : '');
+ },
- /**
- * Save item to storage
- *
- * @function
- * @param {String} key variablename
- * @param {Object} value value
- * @param {String} uk Userkey? Should we add the bid as prefix?
- */
- setItem: function(key, value, uk) {
-
- // Workaround for non-conform browser
- if (jsxc.storageNotConform > 0 && key !== 'rid' && key !== 'lastActivity') {
- if (jsxc.storageNotConform > 1 && jsxc.toSNC === null) {
- jsxc.toSNC = window.setTimeout(function() {
- jsxc.storageNotConform = 0;
- jsxc.storage.setItem('storageNotConform', 0);
- }, 1000);
- }
+ /**
+ * Save item to storage
+ *
+ * @function
+ * @param {String} key variablename
+ * @param {Object} value value
+ * @param {String} uk Userkey? Should we add the bid as prefix?
+ */
+ setItem: function(key, value, uk) {
- jsxc.ls.push(JSON.stringify({
- key: key,
- value: value
- }));
+ // Workaround for non-conform browser
+ if (jsxc.storageNotConform > 0 && key !== 'rid' && key !== 'lastActivity') {
+ if (jsxc.storageNotConform > 1 && jsxc.toSNC === null) {
+ jsxc.toSNC = window.setTimeout(function() {
+ jsxc.storageNotConform = 0;
+ jsxc.storage.setItem('storageNotConform', 0);
+ }, 1000);
}
- if (typeof (value) === 'object') {
- value = JSON.stringify(value);
- }
+ jsxc.ls.push(JSON.stringify({
+ key: key,
+ value: value
+ }));
+ }
- localStorage.setItem(jsxc.storage.getPrefix(uk) + key, value);
- },
+ if (typeof(value) === 'object') {
+ value = JSON.stringify(value);
+ }
- setUserItem: function(type, key, value) {
- var self = jsxc.storage;
+ localStorage.setItem(jsxc.storage.getPrefix(uk) + key, value);
+ },
- if (arguments.length === 2) {
- value = key;
- key = type;
- type = '';
- } else if (arguments.length === 3) {
- key = type + self.SEP + key;
- }
+ setUserItem: function(type, key, value) {
+ var self = jsxc.storage;
- return jsxc.storage.setItem(key, value, true);
- },
+ if (arguments.length === 2) {
+ value = key;
+ key = type;
+ type = '';
+ } else if (arguments.length === 3) {
+ key = type + self.SEP + key;
+ }
- /**
- * Load item from storage
- *
- * @function
- * @param {String} key variablename
- * @param {String} uk Userkey? Should we add the bid as prefix?
- */
- getItem: function(key, uk) {
- key = jsxc.storage.getPrefix(uk) + key;
+ return jsxc.storage.setItem(key, value, true);
+ },
- var value = localStorage.getItem(key);
- try {
- return JSON.parse(value);
- } catch (e) {
- return value;
- }
- },
+ /**
+ * Load item from storage
+ *
+ * @function
+ * @param {String} key variablename
+ * @param {String} uk Userkey? Should we add the bid as prefix?
+ */
+ getItem: function(key, uk) {
+ key = jsxc.storage.getPrefix(uk) + key;
- /**
- * Get a user item from storage.
- *
- * @param key
- * @returns user item
- */
- getUserItem: function(type, key) {
- var self = jsxc.storage;
+ var value = localStorage.getItem(key);
+ try {
+ return JSON.parse(value);
+ } catch (e) {
+ return value;
+ }
+ },
- if (arguments.length === 1) {
- key = type;
- } else if (arguments.length === 2) {
- key = type + self.SEP + key;
- }
+ /**
+ * Get a user item from storage.
+ *
+ * @param key
+ * @returns user item
+ */
+ getUserItem: function(type, key) {
+ var self = jsxc.storage;
- return jsxc.storage.getItem(key, true);
- },
+ if (arguments.length === 1) {
+ key = type;
+ } else if (arguments.length === 2) {
+ key = type + self.SEP + key;
+ }
- /**
- * Remove item from storage
- *
- * @function
- * @param {String} key variablename
- * @param {String} uk Userkey? Should we add the bid as prefix?
- */
- removeItem: function(key, uk) {
+ return jsxc.storage.getItem(key, true);
+ },
- // Workaround for non-conform browser
- if (jsxc.storageNotConform && key !== 'rid' && key !== 'lastActivity') {
- jsxc.ls.push(JSON.stringify({
- key: jsxc.storage.prefix + key,
- value: ''
- }));
- }
+ /**
+ * Remove item from storage
+ *
+ * @function
+ * @param {String} key variablename
+ * @param {String} uk Userkey? Should we add the bid as prefix?
+ */
+ removeItem: function(key, uk) {
- localStorage.removeItem(jsxc.storage.getPrefix(uk) + key);
- },
+ // Workaround for non-conform browser
+ if (jsxc.storageNotConform && key !== 'rid' && key !== 'lastActivity') {
+ jsxc.ls.push(JSON.stringify({
+ key: jsxc.storage.prefix + key,
+ value: ''
+ }));
+ }
- /**
- * Remove user item from storage.
- *
- * @param key
- */
- removeUserItem: function(type, key) {
- var self = jsxc.storage;
+ localStorage.removeItem(jsxc.storage.getPrefix(uk) + key);
+ },
- if (arguments.length === 1) {
- key = type;
- } else if (arguments.length === 2) {
- key = type + self.SEP + key;
- }
+ /**
+ * Remove user item from storage.
+ *
+ * @param key
+ */
+ removeUserItem: function(type, key) {
+ var self = jsxc.storage;
- jsxc.storage.removeItem(key, true);
- },
+ if (arguments.length === 1) {
+ key = type;
+ } else if (arguments.length === 2) {
+ key = type + self.SEP + key;
+ }
- /**
- * Updates value of a variable in a saved object.
- *
- * @function
- * @param {String} key variablename
- * @param {String|object} variable variablename in object or object with
- * variable/key pairs
- * @param {Object} [value] value
- * @param {String} uk Userkey? Should we add the bid as prefix?
- */
- updateItem: function(key, variable, value, uk) {
+ jsxc.storage.removeItem(key, true);
+ },
- var data = jsxc.storage.getItem(key, uk) || {};
+ /**
+ * Updates value of a variable in a saved object.
+ *
+ * @function
+ * @param {String} key variablename
+ * @param {String|object} variable variablename in object or object with
+ * variable/key pairs
+ * @param {Object} [value] value
+ * @param {String} uk Userkey? Should we add the bid as prefix?
+ */
+ updateItem: function(key, variable, value, uk) {
- if (typeof (variable) === 'object') {
+ var data = jsxc.storage.getItem(key, uk) || {};
- $.each(variable, function(key, val) {
- if (typeof (data[key]) === 'undefined') {
- jsxc.debug('Variable ' + key + ' doesn\'t exist in ' + variable + '. It was created.');
- }
+ if (typeof(variable) === 'object') {
- data[key] = val;
- });
- } else {
- if (typeof (data[variable]) === 'undefined') {
- jsxc.debug('Variable ' + variable + ' doesn\'t exist. It was created.');
+ $.each(variable, function(key, val) {
+ if (typeof(data[key]) === 'undefined') {
+ jsxc.debug('Variable ' + key + ' doesn\'t exist in ' + variable + '. It was created.');
}
- data[variable] = value;
+ data[key] = val;
+ });
+ } else {
+ if (typeof(data[variable]) === 'undefined') {
+ jsxc.debug('Variable ' + variable + ' doesn\'t exist. It was created.');
}
- jsxc.storage.setItem(key, data, uk);
- },
+ data[variable] = value;
+ }
- /**
- * Updates value of a variable in a saved user object.
- *
- * @param {String} key variablename
- * @param {String|object} variable variablename in object or object with
- * variable/key pairs
- * @param {Object} [value] value
- */
- updateUserItem: function(type, key, variable, value) {
- var self = jsxc.storage;
+ jsxc.storage.setItem(key, data, uk);
+ },
- if (arguments.length === 4 || (arguments.length === 3 && typeof variable === 'object')) {
- key = type + self.SEP + key;
- } else {
- value = variable;
- variable = key;
- key = type;
- }
+ /**
+ * Updates value of a variable in a saved user object.
+ *
+ * @param {String} key variablename
+ * @param {String|object} variable variablename in object or object with
+ * variable/key pairs
+ * @param {Object} [value] value
+ */
+ updateUserItem: function(type, key, variable, value) {
+ var self = jsxc.storage;
- return jsxc.storage.updateItem(key, variable, value, true);
- },
+ if (arguments.length === 4 || (arguments.length === 3 && typeof variable === 'object')) {
+ key = type + self.SEP + key;
+ } else {
+ value = variable;
+ variable = key;
+ key = type;
+ }
- /**
- * Inkrements value
- *
- * @function
- * @param {String} key variablename
- * @param {String} uk Userkey? Should we add the bid as prefix?
- */
- ink: function(key, uk) {
+ return jsxc.storage.updateItem(key, variable, value, true);
+ },
- jsxc.storage.setItem(key, Number(jsxc.storage.getItem(key, uk)) + 1, uk);
- },
+ /**
+ * Inkrements value
+ *
+ * @function
+ * @param {String} key variablename
+ * @param {String} uk Userkey? Should we add the bid as prefix?
+ */
+ ink: function(key, uk) {
- /**
- * Remove element from array or object
- *
- * @param {string} key name of array or object
- * @param {string} name name of element in array or object
- * @param {String} uk Userkey? Should we add the bid as prefix?
- * @returns {undefined}
- */
- removeElement: function(key, name, uk) {
- var item = jsxc.storage.getItem(key, uk);
+ jsxc.storage.setItem(key, Number(jsxc.storage.getItem(key, uk)) + 1, uk);
+ },
- if ($.isArray(item)) {
- item = $.grep(item, function(e) {
- return e !== name;
- });
- } else if (typeof (item) === 'object') {
- delete item[name];
- }
+ /**
+ * Remove element from array or object
+ *
+ * @param {string} key name of array or object
+ * @param {string} name name of element in array or object
+ * @param {String} uk Userkey? Should we add the bid as prefix?
+ * @returns {undefined}
+ */
+ removeElement: function(key, name, uk) {
+ var item = jsxc.storage.getItem(key, uk);
- jsxc.storage.setItem(key, item, uk);
- },
+ if ($.isArray(item)) {
+ item = $.grep(item, function(e) {
+ return e !== name;
+ });
+ } else if (typeof(item) === 'object' && item !== null) {
+ delete item[name];
+ }
- removeUserElement: function(type, key, name) {
- var self = jsxc.storage;
+ jsxc.storage.setItem(key, item, uk);
+ },
- if (arguments.length === 2) {
- name = key;
- key = type;
- } else if (arguments.length === 3) {
- key = type + self.SEP + key;
- }
+ removeUserElement: function(type, key, name) {
+ var self = jsxc.storage;
- return jsxc.storage.removeElement(key, name, true);
- },
+ if (arguments.length === 2) {
+ name = key;
+ key = type;
+ } else if (arguments.length === 3) {
+ key = type + self.SEP + key;
+ }
- /**
- * Triggered if changes are recognized
- *
- * @function
- * @param {event} e Storageevent
- * @param {String} e.key Keyname which triggered event
- * @param {Object} e.oldValue Old Value for key
- * @param {Object} e.newValue New Value for key
- * @param {String} e.url
- */
- onStorage: function(e) {
+ return jsxc.storage.removeElement(key, name, true);
+ },
- // skip
- if (e.key === jsxc.storage.PREFIX + jsxc.storage.SEP + 'rid' || e.key === jsxc.storage.PREFIX + jsxc.storage.SEP + 'lastActivity') {
- return;
- }
+ /**
+ * Triggered if changes are recognized
+ *
+ * @function
+ * @param {event} e Storageevent
+ * @param {String} e.key Keyname which triggered event
+ * @param {Object} e.oldValue Old Value for key
+ * @param {Object} e.newValue New Value for key
+ * @param {String} e.url
+ */
+ onStorage: function(e) {
- var re = new RegExp('^' + jsxc.storage.PREFIX + jsxc.storage.SEP + '(?:[^' + jsxc.storage.SEP + ']+@[^' + jsxc.storage.SEP + ']+' + jsxc.storage.SEP + ')?(.*)', 'i');
- var key = e.key.replace(re, '$1');
+ // skip
+ if (e.key === jsxc.storage.PREFIX + jsxc.storage.SEP + 'rid' || e.key === jsxc.storage.PREFIX + jsxc.storage.SEP + 'lastActivity') {
+ return;
+ }
- // Workaround for non-conform browser: Triggered event on every page
- // (own)
- if (jsxc.storageNotConform > 0 && jsxc.ls.length > 0) {
+ var re = new RegExp('^' + jsxc.storage.PREFIX + jsxc.storage.SEP + '(?:[^' + jsxc.storage.SEP + ']+@[^' + jsxc.storage.SEP + ']+' + jsxc.storage.SEP + ')?(.*)', 'i');
+ var key = e.key.replace(re, '$1');
- var val = e.newValue;
- try {
- val = JSON.parse(val);
- } catch (err) {
- }
+ // Workaround for non-conform browser: Triggered event on every page
+ // (own)
+ if (jsxc.storageNotConform > 0 && jsxc.ls.length > 0) {
- var index = $.inArray(JSON.stringify({
- key: key,
- value: val
- }), jsxc.ls);
+ var val = e.newValue;
+ try {
+ val = JSON.parse(val);
+ } catch (err) {}
- if (index >= 0) {
+ var index = $.inArray(JSON.stringify({
+ key: key,
+ value: val
+ }), jsxc.ls);
- // confirm that the storage event is not fired regularly
- if (jsxc.storageNotConform > 1) {
- window.clearTimeout(jsxc.toSNC);
- jsxc.storageNotConform = 1;
- jsxc.storage.setItem('storageNotConform', 1);
- }
+ if (index >= 0) {
- jsxc.ls.splice(index, 1);
- return;
+ // confirm that the storage event is not fired regularly
+ if (jsxc.storageNotConform > 1) {
+ window.clearTimeout(jsxc.toSNC);
+ jsxc.storageNotConform = 1;
+ jsxc.storage.setItem('storageNotConform', 1);
}
- }
- // Workaround for non-conform browser
- if (e.oldValue === e.newValue) {
+ jsxc.ls.splice(index, 1);
return;
}
+ }
- var n, o;
- var bid = key.replace(new RegExp('[^' + jsxc.storage.SEP + ']+' + jsxc.storage.SEP + '(.*)', 'i'), '$1');
+ // Workaround for non-conform browser
+ if (e.oldValue === e.newValue) {
+ return;
+ }
- // react if someone ask, if there is a master
- if (jsxc.master && key === 'alive') {
- jsxc.debug('Master request.');
+ var n, o;
+ var bid = key.replace(new RegExp('[^' + jsxc.storage.SEP + ']+' + jsxc.storage.SEP + '(.*)', 'i'), '$1');
- jsxc.storage.ink('alive');
- return;
- }
+ // react if someone ask, if there is a master
+ if (jsxc.master && key === 'alive') {
+ jsxc.debug('Master request.');
- // master alive
- if (!jsxc.master && (key === 'alive' || key === 'alive_busy') && !jsxc.triggeredFromElement) {
+ jsxc.storage.ink('alive');
+ return;
+ }
- // reset timeout
- window.clearTimeout(jsxc.to);
- jsxc.to = window.setTimeout(jsxc.checkMaster, ((key === 'alive') ? jsxc.options.timeout : jsxc.options.busyTimeout) + jsxc.random(60));
+ // master alive
+ if (!jsxc.master && (key === 'alive' || key === 'alive_busy') && !jsxc.triggeredFromElement) {
- // only call the first time
- if (!jsxc.role_allocation) {
- jsxc.onSlave();
- }
+ // reset timeout
+ window.clearTimeout(jsxc.to);
+ jsxc.to = window.setTimeout(jsxc.checkMaster, ((key === 'alive') ? jsxc.options.timeout : jsxc.options.busyTimeout) + jsxc.random(60));
- return;
+ // only call the first time
+ if (!jsxc.role_allocation) {
+ jsxc.onSlave();
}
- if (key.match(/^notices/)) {
- jsxc.notice.load();
- }
+ return;
+ }
- if (key.match(/^presence/)) {
- jsxc.gui.changePresence(e.newValue, true);
- }
+ if (key.match(/^notices/)) {
+ jsxc.notice.load();
+ }
- if (key.match(/^options/) && e.newValue) {
- n = JSON.parse(e.newValue);
+ if (key.match(/^presence/)) {
+ jsxc.gui.changePresence(e.newValue, true);
+ }
- if (typeof n.muteNotification !== 'undefined' && n.muteNotification) {
- jsxc.notification.muteSound(true);
- } else {
- jsxc.notification.unmuteSound(true);
- }
- }
+ if (key.match(/^options/) && e.newValue) {
+ n = JSON.parse(e.newValue);
- if (key.match(/^hidden/)) {
- if (jsxc.master) {
- clearTimeout(jsxc.toNotification);
- } else {
- jsxc.isHidden();
- }
- }
-
- if (key.match(/^focus/)) {
- if (jsxc.master) {
- clearTimeout(jsxc.toNotification);
- } else {
- jsxc.hasFocus();
- }
+ if (typeof n.muteNotification !== 'undefined' && n.muteNotification) {
+ jsxc.notification.muteSound(true);
+ } else {
+ jsxc.notification.unmuteSound(true);
}
+ }
- if (key.match(new RegExp('^chat' + jsxc.storage.SEP))) {
-
- var posts = JSON.parse(e.newValue);
- var data, el;
-
- while (posts.length > 0) {
- data = posts.pop();
- el = $('#' + data.uid);
-
- if (el.length === 0) {
- if (jsxc.master && data.direction === 'out') {
- jsxc.xmpp.sendMessage(bid, data.msg, data.uid);
- }
-
- jsxc.gui.window._postMessage(bid, data);
- } else if (data.received) {
- el.addClass('jsxc_received');
- }
- }
- return;
+ if (key.match(/^hidden/)) {
+ if (jsxc.master) {
+ clearTimeout(jsxc.toNotification);
+ } else {
+ jsxc.isHidden();
}
+ }
- if (key.match(new RegExp('^window' + jsxc.storage.SEP))) {
-
- if (!e.newValue) {
- jsxc.gui.window._close(bid);
- return;
- }
-
- if (!e.oldValue) {
- jsxc.gui.window.open(bid);
- return;
- }
-
- n = JSON.parse(e.newValue);
-
- if (n.minimize) {
- jsxc.gui.window._hide(bid);
- } else {
- jsxc.gui.window._show(bid);
- }
-
- jsxc.gui.window.setText(bid, n.text);
-
- return;
+ if (key.match(/^focus/)) {
+ if (jsxc.master) {
+ clearTimeout(jsxc.toNotification);
+ } else {
+ jsxc.hasFocus();
}
+ }
- if (key.match(new RegExp('^smp' + jsxc.storage.SEP))) {
+ if (key.match(new RegExp('^chat' + jsxc.storage.SEP))) {
- if (!e.newValue) {
+ var posts = JSON.parse(e.newValue);
+ var data, el;
- jsxc.gui.dialog.close();
+ while (posts.length > 0) {
+ data = posts.pop();
+ el = $('#' + data.uid);
- if (jsxc.master) {
- jsxc.otr.objects[bid].sm.abort();
+ if (el.length === 0) {
+ if (jsxc.master && data.direction === 'out') {
+ jsxc.xmpp.sendMessage(bid, data.msg, data.uid);
}
- return;
- }
-
- n = JSON.parse(e.newValue);
-
- if (typeof (n.data) !== 'undefined') {
-
- jsxc.otr.onSmpQuestion(bid, n.data);
-
- } else if (jsxc.master && n.sec) {
- jsxc.gui.dialog.close();
-
- jsxc.otr.sendSmpReq(bid, n.sec, n.quest);
+ jsxc.gui.window._postMessage(bid, data);
+ } else if (data.received) {
+ el.addClass('jsxc_received');
}
}
+ return;
+ }
- if (!jsxc.master && key.match(new RegExp('^buddy' + jsxc.storage.SEP))) {
-
- if (!e.newValue) {
- jsxc.gui.roster.purge(bid);
- return;
- }
- if (!e.oldValue) {
- jsxc.gui.roster.add(bid);
- return;
- }
-
- n = JSON.parse(e.newValue);
- o = JSON.parse(e.oldValue);
-
- jsxc.gui.update(bid);
-
- if (o.status !== n.status || o.sub !== n.sub) {
- jsxc.gui.roster.reorder(bid);
- }
- }
-
- if (jsxc.master && key.match(new RegExp('^deletebuddy' + jsxc.storage.SEP)) && e.newValue) {
- n = JSON.parse(e.newValue);
-
- jsxc.xmpp.removeBuddy(n.jid);
- jsxc.storage.removeUserItem(key);
- }
-
- if (jsxc.master && key.match(new RegExp('^buddy' + jsxc.storage.SEP))) {
-
- n = JSON.parse(e.newValue);
- o = JSON.parse(e.oldValue);
-
- if (o.transferReq !== n.transferReq) {
- jsxc.storage.updateUserItem('buddy', bid, 'transferReq', -1);
+ if (key.match(new RegExp('^window' + jsxc.storage.SEP))) {
- if (n.transferReq === 0) {
- jsxc.otr.goPlain(bid);
- }
- if (n.transferReq === 1) {
- jsxc.otr.goEncrypt(bid);
- }
- }
-
- if (o.name !== n.name) {
- jsxc.gui.roster._rename(bid, n.name);
- }
+ if (!e.newValue) {
+ jsxc.gui.window._close(bid);
+ return;
}
- // logout
- if (key === 'sid') {
- if (!e.newValue) {
- // if (jsxc.master && jsxc.xmpp.conn) {
- // jsxc.xmpp.conn.disconnect();
- // jsxc.triggeredFromElement = true;
- // }
- jsxc.xmpp.logout();
-
- }
+ if (!e.oldValue) {
+ jsxc.gui.window.open(bid);
return;
}
- if (key === 'friendReq') {
- n = JSON.parse(e.newValue);
+ n = JSON.parse(e.newValue);
+ o = JSON.parse(e.oldValue);
- if (jsxc.master && n.approve >= 0) {
- jsxc.xmpp.resFriendReq(n.jid, n.approve);
+ if (n.minimize !== o.minimize) {
+ if (n.minimize) {
+ jsxc.gui.window._hide(bid);
+ } else {
+ jsxc.gui.window._show(bid);
}
}
- if (jsxc.master && key.match(new RegExp('^add' + jsxc.storage.SEP))) {
- n = JSON.parse(e.newValue);
-
- jsxc.xmpp.addBuddy(n.username, n.alias);
- }
-
- if (key === 'roster') {
- jsxc.gui.roster.toggle();
- }
-
- if (jsxc.master && key.match(new RegExp('^vcard' + jsxc.storage.SEP)) && e.newValue !== null && e.newValue.match(/^request:/)) {
-
- jsxc.xmpp.loadVcard(bid, function(stanza) {
- jsxc.storage.setUserItem('vcard', bid, {
- state: 'success',
- data: $('<div>').append(stanza).html()
- });
- }, function() {
- jsxc.storage.setUserItem('vcard', bid, {
- state: 'error'
- });
- });
- }
-
- if (!jsxc.master && key.match(new RegExp('^vcard' + jsxc.storage.SEP)) && e.newValue !== null && !e.newValue.match(/^request:/)) {
- n = JSON.parse(e.newValue);
+ jsxc.gui.window.setText(bid, n.text);
- if (typeof n.state !== 'undefined') {
- $(document).trigger('loaded.vcard.jsxc', n);
+ if (n.unread !== o.unread) {
+ if (n.unread === 0) {
+ jsxc.gui.readMsg(bid);
+ } else {
+ jsxc.gui._unreadMsg(bid, n.unread);
}
-
- jsxc.storage.removeUserItem('vcard', bid);
- }
- },
-
- /**
- * Save message to storage.
- *
- * @memberOf jsxc.storage
- * @param bid
- * @param direction
- * @param msg
- * @param encrypted
- * @param forwarded
- * @param sender
- * @return post
- */
- saveMessage: function(bid, direction, msg, encrypted, forwarded, stamp, sender) {
- var chat = jsxc.storage.getUserItem('chat', bid) || [];
-
- var uid = new Date().getTime() + ':msg';
-
- if (chat.length > jsxc.options.get('numberOfMsg')) {
- chat.pop();
- }
-
- var post = {
- direction: direction,
- msg: msg,
- uid: uid.replace(/:/, '-'),
- received: false,
- encrypted: encrypted || false,
- forwarded: forwarded || false,
- stamp: stamp || new Date().getTime(),
- sender: sender
- };
-
- chat.unshift(post);
- jsxc.storage.setUserItem('chat', bid, chat);
-
- return post;
- },
-
- /**
- * Save or update buddy data.
- *
- * @memberOf jsxc.storage
- * @param bid
- * @param data
- * @returns {String} Updated or created
- */
- saveBuddy: function(bid, data) {
-
- if (jsxc.storage.getUserItem('buddy', bid)) {
- jsxc.storage.updateUserItem('buddy', bid, data);
-
- return 'updated';
}
- jsxc.storage.setUserItem('buddy', bid, $.extend({
- jid: '',
- name: '',
- status: 0,
- sub: 'none',
- msgstate: 0,
- transferReq: -1,
- trust: false,
- fingerprint: null,
- res: [],
- type: 'chat'
- }, data));
+ return;
+ }
- return 'created';
+ if (key.match(/^unreadMsg/) && jsxc.gui.favicon) {
+ jsxc.gui.favicon.badge(parseInt(e.newValue) || 0);
}
- };
-/* global SDPUtil, getUserMediaWithConstraints, setupRTC, MediaStreamTrack, RTC, RTCPeerconnection */
-/* jshint -W020 */
+ if (key.match(new RegExp('^smp' + jsxc.storage.SEP))) {
-jsxc.gui.template.incomingCall = '<h3 data-i18n="Incoming_call"></h3>\
- <p><span data-i18n="Do_you_want_to_accept_the_call_from"></span> {{bid_name}}?</p>\
- <p class="jsxc_right">\
- <a href="#" class="button jsxc_reject" data-i18n="Reject"></a> <a href="#" class="button creation jsxc_accept" data-i18n="Accept"></a>\
- </p>';
-
-jsxc.gui.template.allowMediaAccess = '<p data-i18n="Please_allow_access_to_microphone_and_camera"></p>';
-
-jsxc.gui.template.videoWindow = '<div class="jsxc_webrtc">\
- <div class="jsxc_chatarea">\
- <ul></ul>\
- </div>\
- <div class="jsxc_videoContainer">\
- <video class="jsxc_localvideo" autoplay></video>\
- <video class="jsxc_remotevideo" autoplay></video>\
- <div class="jsxc_status"></div>\
- <div class="bubblingG">\
- <span id="bubblingG_1">\
- </span>\
- <span id="bubblingG_2">\
- </span>\
- <span id="bubblingG_3">\
- </span>\
- </div>\
- <div class="jsxc_noRemoteVideo">\
- <div>\
- <div></div>\
- <p data-i18n="No_video_signal"></p>\
- <div></div>\
- </div>\
- </div>\
- </div>\
- <div class="jsxc_controlbar">\
- <button type="button" class="jsxc_hangUp" data-i18n="hang_up"></button>\
- <input type="range" class="jsxc_volume" min="0.0" max="1.0" step="0.05" value="0.5" />\
- <div class="jsxc_buttongroup">\
- <button type="button" class="jsxc_snapshot" data-i18n="snapshot"></button><button type="button" class="jsxc_snapshots">&#9660;</button>\
- </div>\
- <!-- <button type="button" class="jsxc_mute_local" data-i18n="mute_my_audio"></button>\
- <button type="button" class="jsxc_pause_local" data-i18n="pause_my_video"></button> --> \
- <button type="button" class="jsxc_showchat" data-i18n="chat"></button>\
- <button type="button" class="jsxc_fullscreen" data-i18n="fullscreen"></button>\
- <button type="button" class="jsxc_info" data-i18n="Info"></button>\
- </div>\
- <div class="jsxc_multi">\
- <div class="jsxc_snapshotbar">\
- <p>No pictures yet!</p>\
- </div>\n\
- <!--<div class="jsxc_chatarea">\
- <ul></ul>\
- </div>-->\
- <div class="jsxc_infobar"></div>\
- </div>\
- </div>';
-
- /**
- * WebRTC namespace for jsxc.
- *
- * @namespace jsxc.webrtc
- */
- jsxc.webrtc = {
- /** strophe connection */
- conn: null,
-
- /** local video stream */
- localStream: null,
-
- /** remote video stream */
- remoteStream: null,
-
- /** jid of the last caller */
- last_caller: null,
-
- /** should we auto accept incoming calls? */
- AUTO_ACCEPT: false,
-
- /** required disco features */
- reqVideoFeatures: [ 'urn:xmpp:jingle:apps:rtp:video', 'urn:xmpp:jingle:apps:rtp:audio', 'urn:xmpp:jingle:transports:ice-udp:1', 'urn:xmpp:jingle:apps:dtls:0' ],
-
- /** bare jid to current jid mapping */
- chatJids: {},
+ if (!e.newValue) {
- /**
- * Initialize webrtc plugin.
- *
- * @private
- * @memberOf jsxc.webrtc
- */
- init: function() {
- var self = jsxc.webrtc;
-
- // shortcut
- self.conn = jsxc.xmpp.conn;
+ jsxc.gui.dialog.close();
- if (RTC.browser === 'firefox') {
- self.conn.jingle.media_constraints.mandatory.MozDontOfferDataChannel = true;
- }
+ if (jsxc.master) {
+ jsxc.otr.objects[bid].sm.abort();
+ }
- if (!self.conn.jingle) {
- jsxc.error('No jingle plugin found!');
return;
}
- // jingle configuration
- self.conn.jingle.PRANSWER = false;
- self.conn.jingle.AUTOACCEPT = false;
- self.conn.jingle.ice_config = jsxc.storage.getUserItem('iceConfig');
- self.conn.jingle.MULTIPARTY = false;
- self.conn.jingle.pc_constraints = RTC.pc_constraints;
-
- $(document).on('message.jsxc', $.proxy(self.onMessage, self));
- $(document).on('presence.jsxc', $.proxy(self.onPresence, self));
+ n = JSON.parse(e.newValue);
- $(document).on('mediaready.jingle', $.proxy(self.onMediaReady, self));
- $(document).on('mediafailure.jingle', $.proxy(self.onMediaFailure, self));
- $(document).on('callincoming.jingle', $.proxy(self.onCallIncoming, self));
- $(document).on('callterminated.jingle', $.proxy(self.onCallTerminated, self));
- $(document).on('ringing.jingle', $.proxy(self.onCallRinging, self));
+ if (typeof(n.data) !== 'undefined') {
- $(document).on('remotestreamadded.jingle', $.proxy(self.onRemoteStreamAdded, self));
- $(document).on('remotestreamremoved.jingle', $.proxy(self.onRemoteStreamRemoved, self));
- $(document).on('iceconnectionstatechange.jingle', $.proxy(self.onIceConnectionStateChanged, self));
- $(document).on('nostuncandidates.jingle', $.proxy(self.noStunCandidates, self));
+ jsxc.otr.onSmpQuestion(bid, n.data);
- $(document).on('error.jingle', function(ev, sid, error) {
- jsxc.error('[JINGLE]', error);
- });
-
- if (self.conn.disco) {
- self.conn.disco.addFeature('urn:xmpp:jingle:apps:dtls:0');
- }
+ } else if (jsxc.master && n.sec) {
+ jsxc.gui.dialog.close();
- if (self.conn.caps) {
- $(document).on('caps.strophe', $.proxy(self.onCaps, self));
+ jsxc.otr.sendSmpReq(bid, n.sec, n.quest);
}
+ }
- self.getTurnCrendentials();
- },
-
- /**
- * Checks if cached configuration is valid and if necessary update it.
- *
- * @memberOf jsxc.webrtc
- */
- getTurnCrendentials: function() {
+ if (!jsxc.master && key.match(new RegExp('^buddy' + jsxc.storage.SEP))) {
- if (!jsxc.options.turnCredentialsPath) {
- jsxc.debug('No path for TURN credentials defined!');
+ if (!e.newValue) {
+ jsxc.gui.roster.purge(bid);
return;
}
-
- var ttl = (jsxc.storage.getUserItem('iceValidity') || 0) - (new Date()).getTime();
- if (ttl > 0) {
- // credentials valid
-
- window.setTimeout(jsxc.webrtc.getTurnCrendentials, ttl + 500);
+ if (!e.oldValue) {
+ jsxc.gui.roster.add(bid);
return;
}
- $.ajax(jsxc.options.turnCredentialsPath, {
- async: true,
- success: function(data) {
- var iceConfig = {
- iceServers: [ {
- url: 'turn:' + data.url,
- credential: data.credential,
- username: data.username
- } ]
- };
-
- jsxc.webrtc.conn.jingle.ice_config = iceConfig;
- jsxc.storage.setUserItem('iceConfig', iceConfig);
- jsxc.storage.setUserItem('iceValidity', (new Date()).getTime() + 1000 * data.ttl);
- },
- dataType: 'json'
- });
- },
+ n = JSON.parse(e.newValue);
+ o = JSON.parse(e.oldValue);
- /**
- * Return list of video capable resources.
- *
- * @memberOf jsxc.webrtc
- * @param jid
- * @returns {Array}
- */
- getCapableRes: function(jid) {
- var self = jsxc.webrtc;
- var bid = jsxc.jidToBid(jid);
- var res = jsxc.storage.getUserItem('res', bid) || [];
-
- var available = [];
- $.each(res, function(r) {
- if (self.conn.caps.hasFeatureByJid(bid + '/' + r, self.reqVideoFeatures)) {
- available.push(r);
- }
- });
-
- return available;
- },
-
- /**
- * Add "video" button to roster
- *
- * @private
- * @memberOf jsxc.webrtc
- * @param event
- * @param bid bid of roster item
- * @param data data wich belongs to bid
- * @param el the roster item
- */
- onAddRosterItem: function(event, bid, data, el) {
- var self = jsxc.webrtc;
-
- if (!self.conn) {
- $(document).one('connectionReady.jsxc', function() {
- self.onAddRosterItem(null, bid, data, el);
- });
- return;
- }
-
- var videoIcon = $('<div class="jsxc_video jsxc_disabled" title="' + $.t("Start_video_call") + '"></div>');
-
- videoIcon.click(function() {
- self.startCall(data.jid);
- return false;
- });
-
- el.find('.jsxc_options.jsxc_left').append(videoIcon);
-
- el.on('extra.jsxc', function() {
- self.updateIcon(bid);
- });
- },
-
- /**
- * Add "video" button to window menu.
- *
- * @private
- * @memberOf jsxc.webrtc
- * @param event
- * @param win jQuery window object
- */
- initWindow: function(event, win) {
- var self = jsxc.webrtc;
-
- if (win.hasClass('jsxc_groupchat')) {
- return;
- }
-
- jsxc.debug('webrtc.initWindow');
+ jsxc.gui.update(bid);
- if (!self.conn) {
- $(document).one('connectionReady.jsxc', function() {
- self.initWindow(null, win);
- });
- return;
+ if (o.status !== n.status || o.sub !== n.sub) {
+ jsxc.gui.roster.reorder(bid);
}
+ }
- var div = $('<div>').addClass('jsxc_video');
- win.find('.jsxc_transfer:eq(1)').after(div);
-
- self.updateIcon(jsxc.jidToBid(win.data('jid')));
- },
+ if (jsxc.master && key.match(new RegExp('^deletebuddy' + jsxc.storage.SEP)) && e.newValue) {
+ n = JSON.parse(e.newValue);
- /**
- * Enable or disable "video" icon and assign full jid.
- *
- * @memberOf jsxc.webrtc
- * @param bid CSS conform jid
- */
- updateIcon: function(bid) {
- jsxc.debug('Update icon', bid);
+ jsxc.xmpp.removeBuddy(n.jid);
+ jsxc.storage.removeUserItem(key);
+ }
- var self = jsxc.webrtc;
+ if (jsxc.master && key.match(new RegExp('^buddy' + jsxc.storage.SEP))) {
- if (bid === jsxc.jidToBid(self.conn.jid)) {
- return;
- }
+ n = JSON.parse(e.newValue);
+ o = JSON.parse(e.oldValue);
- var win = jsxc.gui.window.get(bid);
- var jid = win.data('jid');
- var ls = jsxc.storage.getUserItem('buddy', bid);
+ if (o.transferReq !== n.transferReq) {
+ jsxc.storage.updateUserItem('buddy', bid, 'transferReq', -1);
- if (typeof jid !== 'string') {
- if (ls && typeof ls.jid === 'string') {
- jid = ls.jid;
- } else {
- jsxc.debug('[webrtc] Could not update icon, because could not find jid for ' + bid);
- return;
+ if (n.transferReq === 0) {
+ jsxc.otr.goPlain(bid);
+ }
+ if (n.transferReq === 1) {
+ jsxc.otr.goEncrypt(bid);
}
}
- var el = win.find('.jsxc_video').add(jsxc.gui.roster.getItem(bid).find('.jsxc_video'));
-
- var capableRes = self.getCapableRes(jid);
- var targetRes = Strophe.getResourceFromJid(jid);
-
- if (targetRes === null) {
- $.each(jsxc.storage.getUserItem('buddy', bid).res || [], function(index, val) {
- if (capableRes.indexOf(val) > -1) {
- targetRes = val;
- return false;
- }
- });
-
- jid = jid + '/' + targetRes;
- }
-
- el.off('click');
-
- if (capableRes.indexOf(targetRes) > -1) {
- el.click(function() {
- self.startCall(jid);
- });
-
- el.removeClass('jsxc_disabled');
-
- el.attr('title', $.t('Start_video_call'));
- } else {
- el.addClass('jsxc_disabled');
-
- el.attr('title', $.t('Video_call_not_possible'));
- }
- },
-
- /**
- * Check if full jid changed.
- *
- * @private
- * @memberOf jsxc.webrtc
- * @param e
- * @param from full jid
- */
- onMessage: function(e, from) {
- var self = jsxc.webrtc;
- var bid = jsxc.jidToBid(from);
-
- jsxc.debug('webrtc.onmessage', from);
-
- if (self.chatJids[bid] !== from) {
- self.updateIcon(bid);
- self.chatJids[bid] = from;
+ if (o.name !== n.name) {
+ jsxc.gui.roster._rename(bid, n.name);
}
- },
-
- /**
- * Update icon on presence.
- *
- * @memberOf jsxc.webrtc
- * @param ev
- * @param status
- * @private
- */
- onPresence: function(ev, jid, status, presence) {
- var self = jsxc.webrtc;
+ }
- if ($(presence).find('c[xmlns="' + Strophe.NS.CAPS + '"]').length === 0) {
- jsxc.debug('webrtc.onpresence', jid);
+ // logout
+ if (key === 'sid') {
+ if (!e.newValue) {
+ // if (jsxc.master && jsxc.xmpp.conn) {
+ // jsxc.xmpp.conn.disconnect();
+ // jsxc.triggeredFromElement = true;
+ // }
+ jsxc.xmpp.logout();
- self.updateIcon(jsxc.jidToBid(jid));
}
- },
-
- /**
- * Display status message to user.
- *
- * @memberOf jsxc.webrtc
- * @param txt message
- * @param d duration in ms
- */
- setStatus: function(txt, d) {
- var status = $('.jsxc_webrtc .jsxc_status');
- var duration = (typeof d === 'undefined' || d === null) ? 4000 : d;
+ return;
+ }
- jsxc.debug('[Webrtc]', txt);
+ if (key === 'friendReq') {
+ n = JSON.parse(e.newValue);
- if (status.html()) {
- // attach old messages
- txt = status.html() + '<br />' + txt;
+ if (jsxc.master && n.approve >= 0) {
+ jsxc.xmpp.resFriendReq(n.jid, n.approve);
}
+ }
- status.html(txt);
-
- status.css({
- 'margin-left': '-' + (status.width() / 2) + 'px',
- opacity: 0,
- display: 'block'
- });
+ if (jsxc.master && key.match(new RegExp('^add' + jsxc.storage.SEP))) {
+ n = JSON.parse(e.newValue);
- status.stop().animate({
- opacity: 1
- });
+ jsxc.xmpp.addBuddy(n.username, n.alias);
+ }
- clearTimeout(status.data('timeout'));
+ if (key === 'roster') {
+ jsxc.gui.roster.toggle();
+ }
- if (duration === 0) {
- return;
- }
+ if (jsxc.master && key.match(new RegExp('^vcard' + jsxc.storage.SEP)) && e.newValue !== null && e.newValue.match(/^request:/)) {
- var to = setTimeout(function() {
- status.stop().animate({
- opacity: 0
- }, function() {
- status.html('');
+ jsxc.xmpp.loadVcard(bid, function(stanza) {
+ jsxc.storage.setUserItem('vcard', bid, {
+ state: 'success',
+ data: $('<div>').append(stanza).html()
});
- }, duration);
-
- status.data('timeout', to);
- },
-
- /**
- * Update "video" button if we receive cap information.
- *
- * @private
- * @memberOf jsxc.webrtc
- * @param event
- * @param jid
- */
- onCaps: function(event, jid) {
- var self = jsxc.webrtc;
-
- if (jsxc.gui.roster.loaded) {
- self.updateIcon(jsxc.jidToBid(jid));
- } else {
- $(document).on('cloaded.roster.jsxc', function() {
- self.updateIcon(jsxc.jidToBid(jid));
+ }, function() {
+ jsxc.storage.setUserItem('vcard', bid, {
+ state: 'error'
});
- }
- },
-
- /**
- * Called if video/audio is ready. Open window and display some messages.
- *
- * @private
- * @memberOf jsxc.webrtc
- * @param event
- * @param stream
- */
- onMediaReady: function(event, stream) {
- jsxc.debug('media ready');
-
- var self = jsxc.webrtc;
-
- self.localStream = stream;
- self.conn.jingle.localStream = stream;
-
- jsxc.gui.showVideoWindow(self.last_caller);
-
- var i;
- for (i = 0; i < stream.getAudioTracks().length; i++) {
- self.setStatus((stream.getAudioTracks().length > 0) ? 'Use local audio device.' : 'No local audio device.');
+ });
+ }
- jsxc.debug('using audio device "' + stream.getAudioTracks()[i].label + '"');
- }
- for (i = 0; i < stream.getVideoTracks().length; i++) {
- self.setStatus((stream.getVideoTracks().length > 0) ? 'Use local video device.' : 'No local video device.');
+ if (!jsxc.master && key.match(new RegExp('^vcard' + jsxc.storage.SEP)) && e.newValue !== null && !e.newValue.match(/^request:/)) {
+ n = JSON.parse(e.newValue);
- jsxc.debug('using video device "' + stream.getVideoTracks()[i].label + '"');
- $('#jsxc_dialog .jsxc_localvideo').show();
+ if (typeof n.state !== 'undefined') {
+ $(document).trigger('loaded.vcard.jsxc', n);
}
- $(document).one('cleanup.dialog.jsxc', $.proxy(self.hangUp, self));
- $(document).trigger('finish.mediaready.jsxc');
- },
-
- /**
- * Called if media failes.
- *
- * @private
- * @memberOf jsxc.webrtc
- */
- onMediaFailure: function(ev, err) {
- this.setStatus('media failure');
-
- jsxc.gui.window.postMessage(jsxc.jidToBid(jsxc.webrtc.last_caller), 'sys', $.t('Media_failure') + err.name);
- jsxc.debug('media failure: ' + err.name);
- },
-
- /**
- * Called on incoming call.
- *
- * @private
- * @memberOf jsxc.webrtc
- * @param event
- * @param sid Session id
- */
- onCallIncoming: function(event, sid) {
- jsxc.debug('incoming call' + sid);
-
- var self = this;
- var sess = this.conn.jingle.sessions[sid];
- var bid = jsxc.jidToBid(sess.peerjid);
-
- jsxc.gui.window.postMessage(bid, 'sys', $.t('Incoming_call'));
+ jsxc.storage.removeUserItem('vcard', bid);
+ }
+ },
- // display notification
- jsxc.notification.notify($.t('Incoming_call'), $.t('from') + ' ' + bid);
+ /**
+ * Save message to storage.
+ *
+ * @memberOf jsxc.storage
+ * @param bid
+ * @param direction
+ * @param msg
+ * @param encrypted
+ * @param forwarded
+ * @param sender
+ * @return post
+ */
+ saveMessage: function(bid, direction, msg, encrypted, forwarded, stamp, sender) {
+ var chat = jsxc.storage.getUserItem('chat', bid) || [];
+
+ var uid = new Date().getTime() + ':msg';
+
+ if (chat.length > jsxc.options.get('numberOfMsg')) {
+ chat.pop();
+ }
+
+ var post = {
+ direction: direction,
+ msg: msg,
+ uid: uid.replace(/:/, '-'),
+ received: false,
+ encrypted: encrypted || false,
+ forwarded: forwarded || false,
+ stamp: stamp || new Date().getTime(),
+ sender: sender
+ };
- // send signal to partner
- sess.sendRinging();
+ chat.unshift(post);
+ jsxc.storage.setUserItem('chat', bid, chat);
- jsxc.webrtc.last_caller = sess.peerjid;
+ return post;
+ },
- jsxc.switchEvents({
- 'mediaready.jingle': function(event, stream) {
- self.setStatus('Accept call');
+ /**
+ * Save or update buddy data.
+ *
+ * @memberOf jsxc.storage
+ * @param bid
+ * @param data
+ * @returns {String} Updated or created
+ */
+ saveBuddy: function(bid, data) {
- sess.localStream = stream;
- sess.peerconnection.addStream(stream);
+ if (jsxc.storage.getUserItem('buddy', bid)) {
+ jsxc.storage.updateUserItem('buddy', bid, data);
- sess.sendAnswer();
- sess.accept();
- },
- 'mediafailure.jingle': function() {
- sess.sendTerminate('decline');
- sess.terminate();
- }
- });
+ return 'updated';
+ }
- if (jsxc.webrtc.AUTO_ACCEPT) {
- self.reqUserMedia();
- return;
- }
+ jsxc.storage.setUserItem('buddy', bid, $.extend({
+ jid: '',
+ name: '',
+ status: 0,
+ sub: 'none',
+ msgstate: 0,
+ transferReq: -1,
+ trust: false,
+ fingerprint: null,
+ res: [],
+ type: 'chat'
+ }, data));
- var dialog = jsxc.gui.dialog.open(jsxc.gui.template.get('incomingCall', bid), {
- noClose: true
- });
+ return 'created';
+ }
+};
- dialog.find('.jsxc_accept').click(function() {
- $(document).trigger('accept.call.jsxc');
+/* global MediaStreamTrack */
+/* jshint -W020 */
- self.reqUserMedia();
- });
+/**
+ * WebRTC namespace for jsxc.
+ *
+ * @namespace jsxc.webrtc
+ */
+jsxc.webrtc = {
+ /** strophe connection */
+ conn: null,
- dialog.find('.jsxc_reject').click(function() {
- jsxc.gui.dialog.close();
- $(document).trigger('reject.call.jsxc');
+ /** local video stream */
+ localStream: null,
- sess.sendTerminate('decline');
- sess.terminate();
- });
- },
+ /** remote video stream */
+ remoteStream: null,
- /**
- * Called if call is terminated.
- *
- * @private
- * @memberOf jsxc.webrtc
- * @param event
- * @param sid Session id
- * @param reason Reason for termination
- * @param [text] Optional explanation
- */
- onCallTerminated: function(event, sid, reason, text) {
- this.setStatus('call terminated ' + sid + (reason ? (': ' + reason + ' ' + text) : ''));
+ /** jid of the last caller */
+ last_caller: null,
- var bid = jsxc.jidToBid(jsxc.webrtc.last_caller);
+ /** should we auto accept incoming calls? */
+ AUTO_ACCEPT: false,
- if (this.localStream) {
- this.localStream.stop();
- }
+ /** required disco features */
+ reqVideoFeatures: ['urn:xmpp:jingle:apps:rtp:video', 'urn:xmpp:jingle:apps:rtp:audio', 'urn:xmpp:jingle:transports:ice-udp:1', 'urn:xmpp:jingle:apps:dtls:0'],
- if ($('.jsxc_videoContainer').length) {
- $('.jsxc_remotevideo')[0].src = "";
- $('.jsxc_localvideo')[0].src = "";
- }
+ /** bare jid to current jid mapping */
+ chatJids: {},
- this.conn.jingle.localStream = null;
- this.localStream = null;
- this.remoteStream = null;
+ /**
+ * Initialize webrtc plugin.
+ *
+ * @private
+ * @memberOf jsxc.webrtc
+ */
+ init: function() {
+ var self = jsxc.webrtc;
- var win = $('#jsxc_dialog .jsxc_chatarea > ul > li');
- $('#jsxc_windowList > ul').prepend(win.detach());
- win.find('.slimScrollDiv').resizable('enable');
+ // shortcut
+ self.conn = jsxc.xmpp.conn;
- $(document).off('cleanup.dialog.jsxc');
- $(document).off('error.jingle');
- jsxc.gui.dialog.close();
+ if (!self.conn.jingle) {
+ jsxc.error('No jingle plugin found!');
+ return;
+ }
- jsxc.gui.window.postMessage(bid, 'sys', ($.t('Call_terminated') + (reason ? (': ' + $.t(reason)) : '') + '.'));
- },
+ var manager = self.conn.jingle.manager;
- /**
- * Remote station is ringing.
- *
- * @private
- * @memberOf jsxc.webrtc
- */
- onCallRinging: function() {
- this.setStatus('ringing...', 0);
- },
+ $(document).on('message.jsxc', self.onMessage);
+ $(document).on('presence.jsxc', self.onPresence);
- /**
- * Called if we receive a remote stream.
- *
- * @private
- * @memberOf jsxc.webrtc
- * @param event
- * @param data
- * @param sid Session id
- */
- onRemoteStreamAdded: function(event, data, sid) {
- this.setStatus('Remote stream for session ' + sid + ' added.');
+ $(document).on('mediaready.jingle', self.onMediaReady);
+ $(document).on('mediafailure.jingle', self.onMediaFailure);
- var stream = data.stream;
- this.remoteStream = stream;
+ manager.on('incoming', $.proxy(self.onCallIncoming, self));
+ manager.on('terminated', $.proxy(self.onCallTerminated, self));
+ manager.on('ringing', $.proxy(self.onCallRinging, self));
- var sess = this.conn.jingle.sessions[sid];
+ manager.on('peerStreamAdded', $.proxy(self.onRemoteStreamAdded, self));
+ manager.on('peerStreamRemoved', $.proxy(self.onRemoteStreamRemoved, self));
- var isVideoDevice = stream.getVideoTracks().length > 0;
- var isAudioDevice = stream.getAudioTracks().length > 0;
+ manager.on('log:*', function(level, msg) {
+ jsxc.debug('[JINGLE][' + level + ']', msg);
+ });
- sess.remoteDevices = {
- video: isVideoDevice,
- audio: isAudioDevice
- };
+ if (self.conn.caps) {
+ $(document).on('caps.strophe', self.onCaps);
+ }
- this.setStatus(isVideoDevice ? 'Use remote video device.' : 'No remote video device');
- this.setStatus(isAudioDevice ? 'Use remote audio device.' : 'No remote audio device');
+ var url = jsxc.options.get('RTCPeerConfig').url || jsxc.options.turnCredentialsPath;
+ var peerConfig = jsxc.options.get('RTCPeerConfig');
- if ($('.jsxc_remotevideo').length) {
- RTC.attachMediaStream($('#jsxc_dialog .jsxc_remotevideo'), stream);
+ if (typeof url === 'string' && url.length > 0) {
+ self.getTurnCrendentials(url);
+ } else {
+ if (jsxc.storage.getUserItem('iceValidity')) {
+ // old ice validity found. Clean up.
+ jsxc.storage.removeUserItem('iceValidity');
- $('#jsxc_dialog .jsxc_' + (isVideoDevice ? 'remotevideo' : 'noRemoteVideo')).addClass('jsxc_deviceAvailable');
+ // Replace saved servers with the once passed to jsxc
+ peerConfig.iceServers = jsxc.options.RTCPeerConfig.iceServers;
+ jsxc.options.set('RTCPeerConfig', peerConfig);
}
- },
- /**
- * Called if the remote stream was removed.
- *
- * @private
- * @meberOf jsxc.webrtc
- * @param event
- * @param data
- * @param sid Session id
- */
- onRemoteStreamRemoved: function(event, data, sid) {
- this.setStatus('Remote stream for session ' + sid + ' removed.');
- },
-
- /**
- * Extracts local and remote ip and display it to the user.
- *
- * @private
- * @memberOf jsxc.webrtc
- * @param event
- * @param sid session id
- * @param sess
- */
- onIceConnectionStateChanged: function(event, sid, sess) {
- var sigState = sess.peerconnection.signalingState;
- var iceCon = sess.peerconnection.iceConnectionState;
-
- jsxc.debug('iceGat state for ' + sid, sess.peerconnection.iceGatheringState);
- jsxc.debug('iceCon state for ' + sid, iceCon);
- jsxc.debug('sig state for ' + sid, sigState);
-
- if (sigState === 'stable' && (iceCon === 'connected' || iceCon === 'completed')) {
-
- $('#jsxc_dialog .jsxc_deviceAvailable').show();
- $('#jsxc_dialog .bubblingG').hide();
-
- var localSDP = sess.peerconnection.localDescription.sdp;
- var remoteSDP = sess.peerconnection.remoteDescription.sdp;
-
- sess.local_fp = SDPUtil.parse_fingerprint(SDPUtil.find_line(localSDP, 'a=fingerprint:')).fingerprint;
- sess.remote_fp = SDPUtil.parse_fingerprint(SDPUtil.find_line(remoteSDP, 'a=fingerprint:')).fingerprint;
+ self.conn.jingle.setICEServers(peerConfig.iceServers);
+ }
+ },
- var text = '<p>';
- text += '<b>' + $.t('Local_Fingerprint') + ': </b>' + sess.local_fp + '<br />';
- text += '<b>' + $.t('Remote_Fingerprint') + ': </b>' + sess.remote_fp;
- text += '</p>';
+ onDisconnected: function() {
+ var self = jsxc.webrtc;
- $('#jsxc_dialog .jsxc_infobar').html(text);
- } else if (iceCon === 'failed') {
- jsxc.gui.window.postMessage(jsxc.jidToBid(sess.peerjid), 'sys', $.t('ICE_connection_failure'));
+ $(document).off('message.jsxc', self.onMessage);
+ $(document).off('presence.jsxc', self.onPresence);
- $(document).off('cleanup.dialog.jsxc');
+ $(document).off('mediaready.jingle', self.onMediaReady);
+ $(document).off('mediafailure.jingle', self.onMediaFailure);
- sess.sendTerminate('failed-transport');
- sess.terminate();
+ $(document).off('caps.strophe', self.onCaps);
+ },
- $(document).trigger('callterminated.jingle');
- }
- },
+ /**
+ * Checks if cached configuration is valid and if necessary update it.
+ *
+ * @memberOf jsxc.webrtc
+ * @param {string} [url]
+ */
+ getTurnCrendentials: function(url) {
+ var self = jsxc.webrtc;
- /**
- * No STUN candidates found
- *
- * @private
- * @memberOf jsxc.webrtc
- */
- noStunCandidates: function() {
+ url = url || jsxc.options.get('RTCPeerConfig').url || jsxc.options.turnCredentialsPath;
+ var ttl = (jsxc.storage.getUserItem('iceValidity') || 0) - (new Date()).getTime();
- },
+ // validity from jsxc < 2.1.0 is invalid
+ if (jsxc.storage.getUserItem('iceConfig')) {
+ jsxc.storage.removeUserItem('iceConfig');
+ ttl = -1;
+ }
- /**
- * Start a call to the specified jid.
- *
- * @memberOf jsxc.webrtc
- * @param jid full jid
- * @param um requested user media
- */
- startCall: function(jid, um) {
- var self = this;
+ if (ttl > 0) {
+ // credentials valid
- if (Strophe.getResourceFromJid(jid) === null) {
- jsxc.debug('We need a full jid');
- return;
- }
+ self.conn.jingle.setICEServers(jsxc.options.get('RTCPeerConfig').iceServers);
- self.last_caller = jid;
+ window.setTimeout(jsxc.webrtc.getTurnCrendentials, ttl + 500);
+ return;
+ }
- jsxc.switchEvents({
- 'finish.mediaready.jsxc': function() {
- self.setStatus('Initiate call');
+ $.ajax(url, {
+ async: true,
+ success: function(data) {
+ var ttl = data.ttl || 3600;
+ var iceServers = data.iceServers;
- jsxc.gui.window.postMessage(jsxc.jidToBid(jid), 'sys', $.t('Call_started'));
+ if (!iceServers && data.url) {
+ // parse deprecated (v2.1.0) syntax
+ jsxc.warn('Received RTCPeer configuration is deprecated. Use now RTCPeerConfig.url.');
- $(document).one('error.jingle', function(e, sid, error) {
- if (error.source !== 'offer') {
- return;
- }
+ iceServers = [{
+ urls: data.url
+ }];
- $(document).off('cleanup.dialog.jsxc');
- setTimeout(function() {
- jsxc.gui.showAlert("Sorry, we couldn't establish a connection. Maybe your buddy is offline.");
- }, 500);
- });
+ if (data.username) {
+ iceServers[0].username = data.username;
+ }
- self.conn.jingle.initiate(jid, self.conn.jid.toLowerCase());
- },
- 'mediafailure.jingle': function() {
- jsxc.gui.dialog.close();
+ if (data.credential) {
+ iceServers[0].credential = data.credential;
+ }
}
- });
- self.reqUserMedia(um);
- },
+ if (iceServers && iceServers.length > 0) {
+ // url as parameter is deprecated
+ var url = iceServers[0].url && iceServers[0].url.length > 0;
+ var urls = iceServers[0].urls && iceServers[0].urls.length > 0;
- /**
- * Hang up the current call.
- *
- * @memberOf jsxc.webrtc
- */
- hangUp: function(reason, text) {
- $(document).off('cleanup.dialog.jsxc');
+ if (urls || url) {
+ jsxc.debug('ice servers received');
- jsxc.webrtc.conn.jingle.terminate(null, reason, text);
- $(document).trigger('callterminated.jingle');
- },
+ var peerConfig = jsxc.options.get('RTCPeerConfig');
+ peerConfig.iceServers = iceServers;
+ jsxc.options.set('RTCPeerConfig', peerConfig);
- /**
- * Request video and audio from local user.
- *
- * @memberOf jsxc.webrtc
- */
- reqUserMedia: function(um) {
- if (this.localStream) {
- $(document).trigger('mediaready.jingle', [ this.localStream ]);
- return;
- }
+ self.conn.jingle.setICEServers(iceServers);
- um = um || [ 'video', 'audio' ];
-
- jsxc.gui.dialog.open(jsxc.gui.template.get('allowMediaAccess'), {
- noClose: true
- });
- this.setStatus('please allow access to microphone and camera');
-
- if (typeof MediaStreamTrack !== 'undefined' && typeof MediaStreamTrack.getSources !== 'undefined') {
- MediaStreamTrack.getSources(function(sourceInfo) {
- var availableDevices = sourceInfo.map(function(el) {
-
- return el.kind;
- });
+ jsxc.storage.setUserItem('iceValidity', (new Date()).getTime() + 1000 * ttl);
+ } else {
+ jsxc.warn('No valid url found in first ice object.');
+ }
+ }
+ },
+ dataType: 'json'
+ });
+ },
- um = um.filter(function(el) {
- return availableDevices.indexOf(el) !== -1;
- });
+ /**
+ * Return list of video capable resources.
+ *
+ * @memberOf jsxc.webrtc
+ * @param jid
+ * @returns {Array}
+ */
+ getCapableRes: function(jid) {
+ var self = jsxc.webrtc;
+ var bid = jsxc.jidToBid(jid);
+ var res = jsxc.storage.getUserItem('res', bid) || [];
- getUserMediaWithConstraints(um);
- });
- } else {
- getUserMediaWithConstraints(um);
+ var available = [];
+ $.each(res, function(r) {
+ if (self.conn.caps.hasFeatureByJid(bid + '/' + r, self.reqVideoFeatures)) {
+ available.push(r);
}
- },
+ });
- /**
- * Make a snapshot from a video stream and display it.
- *
- * @memberOf jsxc.webrtc
- * @param video Video stream
- */
- snapshot: function(video) {
- if (!video) {
- jsxc.debug('Missing video element');
- }
+ return available;
+ },
- $('.jsxc_snapshotbar p').remove();
+ /**
+ * Add "video" button to roster
+ *
+ * @private
+ * @memberOf jsxc.webrtc
+ * @param event
+ * @param bid bid of roster item
+ * @param data data wich belongs to bid
+ * @param el the roster item
+ */
+ onAddRosterItem: function(event, bid, data, el) {
+ var self = jsxc.webrtc;
- var canvas = $('<canvas/>').css('display', 'none').appendTo('body').attr({
- width: video.width(),
- height: video.height()
- }).get(0);
- var ctx = canvas.getContext('2d');
+ if (!self.conn) {
+ $(document).one('connectionReady.jsxc', function() {
+ self.onAddRosterItem(null, bid, data, el);
+ });
+ return;
+ }
- ctx.drawImage(video[0], 0, 0);
- var img = $('<img/>');
- var url = null;
+ var videoIcon = $('<div class="jsxc_video jsxc_disabled" title="' + $.t("Start_video_call") + '"></div>');
- try {
- url = canvas.toDataURL('image/jpeg');
- } catch (err) {
- jsxc.warn('Error', err);
- return;
- }
+ videoIcon.click(function() {
+ self.startCall(data.jid);
+ return false;
+ });
- img[0].src = url;
- var link = $('<a/>').attr({
- target: '_blank',
- href: url
- });
- link.append(img);
- $('.jsxc_snapshotbar').append(link);
+ el.find('.jsxc_options.jsxc_left').append(videoIcon);
- canvas.remove();
- }
- };
+ el.on('extra.jsxc', function() {
+ self.updateIcon(bid);
+ });
+ },
/**
- * Display window for video call.
+ * Add "video" button to window menu.
*
- * @memberOf jsxc.gui
+ * @private
+ * @memberOf jsxc.webrtc
+ * @param event
+ * @param win jQuery window object
*/
- jsxc.gui.showVideoWindow = function(jid) {
+ initWindow: function(event, win) {
var self = jsxc.webrtc;
- $(document).one('complete.dialog.jsxc', function() {
-
- // mute own video element to avoid echoes
- $('#jsxc_dialog .jsxc_localvideo')[0].muted = true;
- $('#jsxc_dialog .jsxc_localvideo')[0].volume = 0;
+ if (win.hasClass('jsxc_groupchat')) {
+ return;
+ }
- var rv = $('#jsxc_dialog .jsxc_remotevideo');
- var lv = $('#jsxc_dialog .jsxc_localvideo');
+ jsxc.debug('webrtc.initWindow');
- lv.draggable({
- containment: "parent"
+ if (!self.conn) {
+ $(document).one('connectionReady.jsxc', function() {
+ self.initWindow(null, win);
});
+ return;
+ }
- RTC.attachMediaStream(lv, self.localStream);
-
- var w_dialog = $('#jsxc_dialog').width();
- var w_remote = rv.width();
+ var div = $('<div>').addClass('jsxc_video');
+ win.find('.jsxc_transfer:eq(1)').after(div);
- // fit in video
- if (w_remote > w_dialog) {
- var scale = w_dialog / w_remote;
- var new_h = rv.height() * scale;
- var new_w = w_dialog;
- var vc = $('#jsxc_dialog .jsxc_videoContainer');
+ self.updateIcon(jsxc.jidToBid(win.data('jid')));
+ },
- rv.height(new_h);
- rv.width(new_w);
+ /**
+ * Enable or disable "video" icon and assign full jid.
+ *
+ * @memberOf jsxc.webrtc
+ * @param bid CSS conform jid
+ */
+ updateIcon: function(bid) {
+ jsxc.debug('Update icon', bid);
- vc.height(new_h);
- vc.width(new_w);
+ var self = jsxc.webrtc;
- lv.height(lv.height() * scale);
- lv.width(lv.width() * scale);
- }
+ if (bid === jsxc.jidToBid(self.conn.jid)) {
+ return;
+ }
- if (self.remoteStream) {
- RTC.attachMediaStream(rv, self.remoteStream);
+ var win = jsxc.gui.window.get(bid);
+ var jid = win.data('jid');
+ var ls = jsxc.storage.getUserItem('buddy', bid);
- $('#jsxc_dialog .jsxc_' + (self.remoteStream.getVideoTracks().length > 0 ? 'remotevideo' : 'noRemoteVideo')).addClass('jsxc_deviceAvailable');
+ if (typeof jid !== 'string') {
+ if (ls && typeof ls.jid === 'string') {
+ jid = ls.jid;
+ } else {
+ jsxc.debug('[webrtc] Could not update icon, because could not find jid for ' + bid);
+ return;
}
+ }
- var toggleMulti = function(elem, open) {
- $('#jsxc_dialog .jsxc_multi > div').not(elem).slideUp();
-
- var opt = {
- complete: jsxc.gui.dialog.resize
- };
-
- if (open) {
- elem.slideDown(opt);
- } else {
- elem.slideToggle(opt);
- }
- };
-
- var win = jsxc.gui.window.open(jsxc.jidToBid(jid));
-
- win.find('.slimScrollDiv').resizable('disable');
- win.find('.jsxc_textarea').slimScroll({
- height: 413
- });
- win.find('.jsxc_emoticons').css('top', (413 + 6) + 'px');
-
- $('#jsxc_dialog .jsxc_chatarea ul').append(win.detach());
-
- $('#jsxc_dialog .jsxc_hangUp').click(function() {
- jsxc.webrtc.hangUp();
- });
-
- $('#jsxc_dialog .jsxc_snapshot').click(function() {
- jsxc.webrtc.snapshot(rv);
- toggleMulti($('#jsxc_dialog .jsxc_snapshotbar'), true);
- });
-
- $('#jsxc_dialog .jsxc_snapshots').click(function() {
- toggleMulti($('#jsxc_dialog .jsxc_snapshotbar'));
- });
+ var el = win.find('.jsxc_video').add(jsxc.gui.roster.getItem(bid).find('.jsxc_video'));
- $('#jsxc_dialog .jsxc_showchat').click(function() {
- var chatarea = $('#jsxc_dialog .jsxc_chatarea');
+ var capableRes = self.getCapableRes(jid);
+ var targetRes = Strophe.getResourceFromJid(jid);
- if (chatarea.is(':hidden')) {
- chatarea.show();
- $('#jsxc_dialog .jsxc_webrtc').width('900');
- jsxc.gui.dialog.resize({
- width: '920px'
- });
- } else {
- chatarea.hide();
- $('#jsxc_dialog .jsxc_webrtc').width('650');
- jsxc.gui.dialog.resize({
- width: '660px'
- });
+ if (targetRes === null) {
+ $.each(jsxc.storage.getUserItem('buddy', bid).res || [], function(index, val) {
+ if (capableRes.indexOf(val) > -1) {
+ targetRes = val;
+ return false;
}
});
- $('#jsxc_dialog .jsxc_info').click(function() {
- toggleMulti($('#jsxc_dialog .jsxc_infobar'));
- });
-
- $('#jsxc_dialog .jsxc_fullscreen').click(function() {
-
- if ($.support.fullscreen) {
- // Reset position of localvideo
- $(document).one('disabled.fullscreen', function() {
- lv.removeAttr('style');
- });
+ jid = jid + '/' + targetRes;
+ }
- $('#jsxc_dialog .jsxc_videoContainer').fullscreen();
- }
- });
+ el.off('click');
- $('#jsxc_dialog .jsxc_volume').change(function() {
- rv[0].volume = $(this).val();
+ if (capableRes.indexOf(targetRes) > -1) {
+ el.click(function() {
+ self.startCall(jid);
});
- $('#jsxc_dialog .jsxc_volume').dblclick(function() {
- $(this).val(0.5);
- });
- });
+ el.removeClass('jsxc_disabled');
- jsxc.gui.dialog.open(jsxc.gui.template.get('videoWindow'), {
- noClose: true
- });
- };
-
- $.extend(jsxc.CONST, {
- KEYCODE_ENTER: 13,
- KEYCODE_ESC: 27
- });
-
- $(document).ready(function() {
- RTC = setupRTC();
-
- if (RTC !== null) {
- RTCPeerconnection = RTC.peerconnection;
+ el.attr('title', $.t('Start_video_call'));
+ } else {
+ el.addClass('jsxc_disabled');
- $(document).on('add.roster.jsxc', jsxc.webrtc.onAddRosterItem);
- $(document).on('init.window.jsxc', jsxc.webrtc.initWindow);
- $(document).on('attached.jsxc', jsxc.webrtc.init);
+ el.attr('title', $.t('Video_call_not_possible'));
}
- });
-
-
-/**
- * Handle XMPP stuff.
- *
- * @namespace jsxc.xmpp
- */
-jsxc.xmpp = {
- conn: null, // connection
+ },
/**
- * Create new connection or attach to old
+ * Check if full jid changed.
*
- * @name login
- * @memberOf jsxc.xmpp
- */
- /**
- * Create new connection with given parameters.
- *
- * @name login^2
- * @param {string} jid
- * @param {string} password
- * @memberOf jsxc.xmpp
- */
- /**
- * Attach connection with given parameters.
- *
- * @name login^3
- * @param {string} jid
- * @param {string} sid
- * @param {string} rid
- * @memberOf jsxc.xmpp
+ * @private
+ * @memberOf jsxc.webrtc
+ * @param e
+ * @param from full jid
*/
- login: function() {
-
- if (jsxc.xmpp.conn && jsxc.xmpp.conn.authenticated) {
- return;
- }
+ onMessage: function(e, from) {
+ var self = jsxc.webrtc;
+ var bid = jsxc.jidToBid(from);
- var jid = null, password = null, sid = null, rid = null;
+ jsxc.debug('webrtc.onmessage', from);
- switch (arguments.length) {
- case 2:
- jid = arguments[0];
- password = arguments[1];
- break;
- case 3:
- jid = arguments[0];
- sid = arguments[1];
- rid = arguments[2];
- break;
- default:
- sid = jsxc.storage.getItem('sid');
- rid = jsxc.storage.getItem('rid');
-
- if (sid !== null && rid !== null) {
- jid = jsxc.storage.getItem('jid');
- } else {
- sid = null;
- rid = null;
- jid = jsxc.options.xmpp.jid;
- }
+ if (self.chatJids[bid] !== from) {
+ self.updateIcon(bid);
+ self.chatJids[bid] = from;
}
+ },
- var url = jsxc.options.get('xmpp').url;
+ /**
+ * Update icon on presence.
+ *
+ * @memberOf jsxc.webrtc
+ * @param ev
+ * @param status
+ * @private
+ */
+ onPresence: function(ev, jid, status, presence) {
+ var self = jsxc.webrtc;
- if (!(jsxc.xmpp.conn && jsxc.xmpp.conn.connected)) {
- // Register eventlistener
- $(document).on('connected.jsxc', jsxc.xmpp.connected);
- $(document).on('attached.jsxc', jsxc.xmpp.attached);
- $(document).on('disconnected.jsxc', jsxc.xmpp.disconnected);
- $(document).on('ridChange', jsxc.xmpp.onRidChange);
- $(document).on('connfail.jsxc', jsxc.xmpp.onConnfail);
- $(document).on('authfail.jsxc', jsxc.xmpp.onAuthFail);
+ if ($(presence).find('c[xmlns="' + Strophe.NS.CAPS + '"]').length === 0) {
+ jsxc.debug('webrtc.onpresence', jid);
- Strophe.addNamespace('RECEIPTS', 'urn:xmpp:receipts');
+ self.updateIcon(jsxc.jidToBid(jid));
}
+ },
- // Create new connection (no login)
- jsxc.xmpp.conn = new Strophe.Connection(url);
-
- // Override default function to preserve unique id
- var stropheGetUniqueId = jsxc.xmpp.conn.getUniqueId;
- jsxc.xmpp.conn.getUniqueId = function(suffix) {
- var uid = stropheGetUniqueId.call(jsxc.xmpp.conn, suffix);
- jsxc.storage.setItem('_uniqueId', jsxc.xmpp.conn._uniqueId);
+ /**
+ * Display status message to user.
+ *
+ * @memberOf jsxc.webrtc
+ * @param txt message
+ * @param d duration in ms
+ */
+ setStatus: function(txt, d) {
+ var status = $('.jsxc_webrtc .jsxc_status');
+ var duration = (typeof d === 'undefined' || d === null) ? 4000 : d;
- return uid;
- };
+ jsxc.debug('[Webrtc]', txt);
- if (jsxc.storage.getItem('debug') === true) {
- jsxc.xmpp.conn.xmlInput = function(data) {
- console.log('<', data);
- };
- jsxc.xmpp.conn.xmlOutput = function(data) {
- console.log('>', data);
- };
+ if (status.html()) {
+ // attach old messages
+ txt = status.html() + '<br />' + txt;
}
- var callback = function(status, condition) {
-
- jsxc.debug(Object.getOwnPropertyNames(Strophe.Status)[status] + ': ' + condition);
+ status.html(txt);
- switch (status) {
- case Strophe.Status.CONNECTING:
- $(document).trigger('connecting.jsxc');
- break;
- case Strophe.Status.CONNECTED:
- jsxc.bid = jsxc.jidToBid(jsxc.xmpp.conn.jid.toLowerCase());
- $(document).trigger('connected.jsxc');
- break;
- case Strophe.Status.ATTACHED:
- $(document).trigger('attached.jsxc');
- break;
- case Strophe.Status.DISCONNECTED:
- $(document).trigger('disconnected.jsxc');
- break;
- case Strophe.Status.CONNFAIL:
- $(document).trigger('connfail.jsxc');
- break;
- case Strophe.Status.AUTHFAIL:
- $(document).trigger('authfail.jsxc');
- break;
- }
- };
+ status.css({
+ 'margin-left': '-' + (status.width() / 2) + 'px',
+ opacity: 0,
+ display: 'block'
+ });
- if (jsxc.xmpp.conn.caps) {
- jsxc.xmpp.conn.caps.node = 'http://jsxc.org/';
- }
+ status.stop().animate({
+ opacity: 1
+ });
- if (jsxc.restore && sid && rid) {
- jsxc.debug('Try to attach');
- jsxc.debug('SID: ' + sid);
- jsxc.xmpp.conn.attach(jid, sid, rid, callback);
- } else {
- jsxc.debug('New connection');
+ clearTimeout(status.data('timeout'));
- if (jsxc.xmpp.conn.caps) {
- // Add system handler, because user handler isn't called before
- // we are authenticated
- jsxc.xmpp.conn._addSysHandler(function(stanza) {
- var from = jsxc.xmpp.conn.domain, c = stanza.querySelector('c'), ver = c.getAttribute('ver'), node = c.getAttribute('node');
+ if (duration === 0) {
+ return;
+ }
- var _jidNodeIndex = JSON.parse(localStorage.getItem('strophe.caps._jidNodeIndex')) || {};
+ var to = setTimeout(function() {
+ status.stop().animate({
+ opacity: 0
+ }, function() {
+ status.html('');
+ });
+ }, duration);
- jsxc.xmpp.conn.caps._jidVerIndex[from] = ver;
- _jidNodeIndex[from] = node;
+ status.data('timeout', to);
+ },
- localStorage.setItem('strophe.caps._jidVerIndex', JSON.stringify(jsxc.xmpp.conn.caps._jidVerIndex));
- localStorage.setItem('strophe.caps._jidNodeIndex', JSON.stringify(_jidNodeIndex));
- }, Strophe.NS.CAPS);
- }
+ /**
+ * Update "video" button if we receive cap information.
+ *
+ * @private
+ * @memberOf jsxc.webrtc
+ * @param event
+ * @param jid
+ */
+ onCaps: function(event, jid) {
+ var self = jsxc.webrtc;
- jsxc.xmpp.conn.connect(jid || jsxc.options.xmpp.jid, password || jsxc.options.xmpp.password, callback);
+ if (jsxc.gui.roster.loaded) {
+ self.updateIcon(jsxc.jidToBid(jid));
+ } else {
+ $(document).on('cloaded.roster.jsxc', function() {
+ self.updateIcon(jsxc.jidToBid(jid));
+ });
}
},
/**
- * Logs user out of his xmpp session and does some clean up.
+ * Called if video/audio is ready. Open window and display some messages.
*
- * @param {boolean} complete If set to false, roster will not be removed
- * @returns {Boolean}
+ * @private
+ * @memberOf jsxc.webrtc
+ * @param event
+ * @param stream
*/
- logout: function(complete) {
-
- // instruct all tabs
- jsxc.storage.removeItem('sid');
+ onMediaReady: function(event, stream) {
+ jsxc.debug('media ready');
- // clean up
- jsxc.storage.removeUserItem('buddylist');
- jsxc.storage.removeUserItem('windowlist');
- jsxc.storage.removeItem('_uniqueId');
-
- if (!jsxc.master) {
- $('#jsxc_roster').remove();
- $('#jsxc_windowlist').remove();
- return true;
- }
-
- if (jsxc.xmpp.conn === null) {
- return true;
- }
+ var self = jsxc.webrtc;
- // Hide dropdown menu
- $('body').click();
+ self.localStream = stream;
+ self.conn.jingle.localStream = stream;
- jsxc.triggeredFromElement = (typeof complete === 'boolean')? complete : true;
+ var dialog = jsxc.gui.showVideoWindow(self.last_caller);
- // restore all otr objects
- $.each(jsxc.storage.getUserItem('otrlist') || {}, function(i, val) {
- jsxc.otr.create(val);
- });
+ var audioTracks = stream.getAudioTracks();
+ var videoTracks = stream.getVideoTracks();
+ var i;
- var numOtr = Object.keys(jsxc.otr.objects || {}).length + 1;
- var disReady = function() {
- if (--numOtr <= 0) {
- jsxc.xmpp.conn.flush();
+ for (i = 0; i < audioTracks.length; i++) {
+ self.setStatus((audioTracks.length > 0) ? $.t('Use_local_audio_device') : $.t('No_local_audio_device'));
- setTimeout(function() {
- jsxc.xmpp.conn.disconnect();
- }, 600);
- }
- };
+ jsxc.debug('using audio device "' + audioTracks[i].label + '"');
+ }
- // end all private conversations
- $.each(jsxc.otr.objects || {}, function(key, obj) {
- if (obj.msgstate === OTR.CONST.MSGSTATE_ENCRYPTED) {
- obj.endOtr.call(obj, function() {
- obj.init.call(obj);
- jsxc.otr.backup(key);
+ for (i = 0; i < videoTracks.length; i++) {
+ self.setStatus((videoTracks.length > 0) ? $.t('Use_local_video_device') : $.t('No_local_video_device'));
- disReady();
- });
- } else {
- disReady();
- }
- });
+ jsxc.debug('using video device "' + videoTracks[i].label + '"');
- disReady();
+ dialog.find('.jsxc_localvideo').show();
+ }
- // Trigger real logout in jsxc.xmpp.disconnected()
- return false;
+ $(document).one('cleanup.dialog.jsxc', $.proxy(self.hangUp, self));
+ $(document).trigger('finish.mediaready.jsxc');
},
/**
- * Triggered if connection is established
+ * Called if media failes.
*
* @private
+ * @memberOf jsxc.webrtc
*/
- connected: function() {
-
- jsxc.xmpp.conn.pause();
-
- var nomJid = Strophe.getBareJidFromJid(jsxc.xmpp.conn.jid).toLowerCase() + '/' + Strophe.getResourceFromJid(jsxc.xmpp.conn.jid);
-
- // Save sid and jid
- jsxc.storage.setItem('sid', jsxc.xmpp.conn._proto.sid);
- jsxc.storage.setItem('jid', nomJid);
-
- jsxc.storage.setItem('lastActivity', (new Date()).getTime());
-
- // make shure roster will be reloaded
- jsxc.storage.removeUserItem('buddylist');
-
- jsxc.storage.removeUserItem('windowlist');
- jsxc.storage.removeUserItem('own');
- jsxc.storage.removeUserItem('avatar', 'own');
- jsxc.storage.removeUserItem('otrlist');
-
- if (jsxc.options.loginForm.triggered) {
- switch (jsxc.options.loginForm.onConnected || 'submit') {
- case 'submit':
- jsxc.submitLoginForm();
- /* falls through */
- case false:
- jsxc.xmpp.connectionReady();
- return;
- }
- }
+ onMediaFailure: function(ev, err) {
+ var self = jsxc.webrtc;
- // start chat
+ self.setStatus('media failure');
- jsxc.gui.init();
- $('#jsxc_roster').removeClass('jsxc_noConnection');
- jsxc.onMaster();
- jsxc.xmpp.conn.resume();
- jsxc.gui.dialog.close();
- $(document).trigger('attached.jsxc');
+ jsxc.gui.window.postMessage(jsxc.jidToBid(jsxc.webrtc.last_caller), 'sys', $.t('Media_failure') + ': ' + $.t(err.name) + ' (' + err.name + ').');
+ jsxc.debug('media failure: ' + err.name);
},
/**
- * Triggered if connection is attached
+ * Called on incoming call.
*
* @private
+ * @memberOf jsxc.webrtc
+ * @param event
+ * @param sid Session id
*/
- attached: function() {
-
- jsxc.xmpp.conn.addHandler(jsxc.xmpp.onRosterChanged, 'jabber:iq:roster', 'iq', 'set');
- jsxc.xmpp.conn.addHandler(jsxc.xmpp.onMessage, null, 'message', 'chat');
- jsxc.xmpp.conn.addHandler(jsxc.xmpp.onReceived, null, 'message');
- jsxc.xmpp.conn.addHandler(jsxc.xmpp.onPresence, null, 'presence');
+ onCallIncoming: function(session) {
+ jsxc.debug('incoming call from ' + session.peerID);
- var caps = jsxc.xmpp.conn.caps;
- var domain = jsxc.xmpp.conn.domain;
-
- if (caps && jsxc.options.get('carbons').enable) {
- var conditionalEnable = function() {
- if (jsxc.xmpp.conn.caps.hasFeatureByJid(domain, jsxc.CONST.NS.CARBONS)) {
- jsxc.xmpp.carbons.enable();
- }
- };
+ var self = this;
+ var bid = jsxc.jidToBid(session.peerID);
- if (typeof caps._knownCapabilities[caps._jidVerIndex[domain]] === 'undefined') {
- var _jidNodeIndex = JSON.parse(localStorage.getItem('strophe.caps._jidNodeIndex')) || {};
+ session.on('change:connectionState', $.proxy(self.onIceConnectionStateChanged, self));
- $(document).on('caps.strophe', function onCaps(ev, from) {
+ jsxc.gui.window.postMessage(bid, 'sys', $.t('Incoming_call'));
- if (from !== domain) {
- return;
- }
+ // display notification
+ jsxc.notification.notify($.t('Incoming_call'), $.t('from_sender', {
+ sender: bid
+ }));
- conditionalEnable();
+ // send signal to partner
+ session.ring();
- $(document).off('caps.strophe', onCaps);
- });
+ jsxc.webrtc.last_caller = session.peerID;
- caps._requestCapabilities(jsxc.xmpp.conn.domain, _jidNodeIndex[domain], caps._jidVerIndex[domain]);
- } else {
- // We know server caps
- conditionalEnable();
- }
+ if (jsxc.webrtc.AUTO_ACCEPT) {
+ self.reqUserMedia();
+ return;
}
- // Only load roaster if necessary
- if (!jsxc.restore || !jsxc.storage.getUserItem('buddylist')) {
- // in order to not overide existing presence information, we send
- // pres first after roster is ready
- $(document).one('cloaded.roster.jsxc', jsxc.xmpp.sendPres);
+ var dialog = jsxc.gui.dialog.open(jsxc.gui.template.get('incomingCall', bid), {
+ noClose: true
+ });
- $('#jsxc_roster > p:first').remove();
+ dialog.find('.jsxc_accept').click(function() {
+ $(document).trigger('accept.call.jsxc');
- var iq = $iq({
- type: 'get'
- }).c('query', {
- xmlns: 'jabber:iq:roster'
- });
+ jsxc.switchEvents({
+ 'mediaready.jingle': function(event, stream) {
+ self.setStatus('Accept call');
- jsxc.xmpp.conn.sendIQ(iq, jsxc.xmpp.onRoster);
- } else {
- jsxc.xmpp.sendPres();
- }
+ session.addStream(stream);
- jsxc.xmpp.connectionReady();
- },
+ session.accept();
+ },
+ 'mediafailure.jingle': function() {
+ session.decline();
+ }
+ });
- /**
- * Triggered if the connection is ready
- */
- connectionReady: function() {
+ self.reqUserMedia();
+ });
- // Load saved unique id
- jsxc.xmpp.conn._uniqueId = jsxc.storage.getItem('_uniqueId') || new Date().getTime();
+ dialog.find('.jsxc_reject').click(function() {
+ jsxc.gui.dialog.close();
+ $(document).trigger('reject.call.jsxc');
- $(document).trigger('connectionReady.jsxc');
+ session.decline();
+ });
},
/**
- * Sends presence stanza to server.
+ * Called if call is terminated.
+ *
+ * @private
+ * @memberOf jsxc.webrtc
+ * @param event
+ * @param sid Session id
+ * @param reason Reason for termination
+ * @param [text] Optional explanation
*/
- sendPres: function() {
- // disco stuff
- if (jsxc.xmpp.conn.disco) {
- jsxc.xmpp.conn.disco.addIdentity('client', 'web', 'JSXC');
- jsxc.xmpp.conn.disco.addFeature(Strophe.NS.DISCO_INFO);
- jsxc.xmpp.conn.disco.addFeature(Strophe.NS.RECEIPTS);
- }
+ onCallTerminated: function(session, reason) {
+ this.setStatus('call terminated ' + session.peer + (reason ? reason.condition : ''));
- // create presence stanza
- var pres = $pres();
+ var bid = jsxc.jidToBid(session.peer);
- if (jsxc.xmpp.conn.caps) {
- // attach caps
- pres.c('c', jsxc.xmpp.conn.caps.generateCapsAttrs()).up();
+ if (this.localStream) {
+ this.localStream.stop();
}
- var presState = jsxc.storage.getUserItem('presence') || 'online';
- if (presState !== 'online') {
- pres.c('show').t(presState).up();
+ if ($('.jsxc_videoContainer').length) {
+ $('.jsxc_remotevideo')[0].src = "";
+ $('.jsxc_localvideo')[0].src = "";
}
- var priority = jsxc.options.get('priority');
- if (priority && typeof priority[presState] !== 'undefined' && parseInt(priority[presState]) !== 0) {
- pres.c('priority').t(priority[presState]).up();
- }
+ this.conn.jingle.localStream = null;
+ this.localStream = null;
+ this.remoteStream = null;
- jsxc.debug('Send presence', pres.toString());
- jsxc.xmpp.conn.send(pres);
+ var win = $('#jsxc_dialog .jsxc_chatarea > ul > li');
+ $('#jsxc_windowList > ul').prepend(win.detach());
+ win.find('.slimScrollDiv').resizable('enable');
+
+ $(document).off('cleanup.dialog.jsxc');
+ $(document).off('error.jingle');
+ jsxc.gui.dialog.close();
+
+ jsxc.gui.window.postMessage(bid, 'sys', ($.t('Call_terminated') + (reason ? (': ' + $.t('jingle_reason_' + reason.condition)) : '') + '.'));
},
/**
- * Triggered if lost connection
+ * Remote station is ringing.
*
* @private
+ * @memberOf jsxc.webrtc
*/
- disconnected: function() {
- jsxc.debug('disconnected');
+ onCallRinging: function() {
+ this.setStatus('ringing...', 0);
+ },
- jsxc.storage.removeItem('sid');
- jsxc.storage.removeItem('rid');
- jsxc.storage.removeItem('lastActivity');
- jsxc.storage.removeItem('hidden');
- jsxc.storage.removeUserItem('avatar', 'own');
- jsxc.storage.removeUserItem('otrlist');
+ /**
+ * Called if we receive a remote stream.
+ *
+ * @private
+ * @memberOf jsxc.webrtc
+ * @param event
+ * @param data
+ * @param sid Session id
+ */
+ onRemoteStreamAdded: function(session, stream) {
+ this.setStatus('Remote stream for session ' + session.sid + ' added.');
- $(document).off('connected.jsxc', jsxc.xmpp.connected);
- $(document).off('attached.jsxc', jsxc.xmpp.attached);
- $(document).off('disconnected.jsxc', jsxc.xmpp.disconnected);
- $(document).off('ridChange', jsxc.xmpp.onRidChange);
- $(document).off('connfail.jsxc', jsxc.xmpp.onConnfail);
- $(document).off('authfail.jsxc', jsxc.xmpp.onAuthFail);
+ this.remoteStream = stream;
- jsxc.xmpp.conn = null;
+ var isVideoDevice = stream.getVideoTracks().length > 0;
+ var isAudioDevice = stream.getAudioTracks().length > 0;
- $('#jsxc_windowList').remove();
+ this.setStatus(isVideoDevice ? 'Use remote video device.' : 'No remote video device');
+ this.setStatus(isAudioDevice ? 'Use remote audio device.' : 'No remote audio device');
- if (jsxc.triggeredFromElement) {
- $(document).trigger('toggle.roster.jsxc', [ 'hidden', 0 ]);
- $('#jsxc_roster').remove();
+ if ($('.jsxc_remotevideo').length) {
+ this.attachMediaStream($('#jsxc_dialog .jsxc_remotevideo'), stream);
- if (jsxc.triggeredFromLogout) {
- window.location = jsxc.options.logoutElement.attr('href');
- }
- } else {
- jsxc.gui.roster.noConnection();
+ $('#jsxc_dialog .jsxc_' + (isVideoDevice ? 'remotevideo' : 'noRemoteVideo')).addClass('jsxc_deviceAvailable');
}
-
- window.clearInterval(jsxc.keepalive);
},
/**
- * Triggered on connection fault
+ * Attach media stream to element.
*
- * @param {String} condition information why we lost the connection
- * @private
+ * @memberOf jsxc.webrtc
+ * @param element {Element|jQuery}
+ * @param stream {mediastream}
*/
- onConnfail: function(ev, condition) {
- jsxc.debug('XMPP connection failed: ' + condition);
+ attachMediaStream: function(element, stream) {
+ var self = jsxc.webrtc;
- if (jsxc.options.loginForm.triggered) {
- jsxc.submitLoginForm();
- }
+ self.conn.jingle.RTC.attachMediaStream((element instanceof jQuery) ? element.get(0) : element, stream);
},
/**
- * Triggered on auth fail.
+ * Called if the remote stream was removed.
*
* @private
+ * @meberOf jsxc.webrtc
+ * @param event
+ * @param data
+ * @param sid Session id
*/
- onAuthFail: function() {
+ onRemoteStreamRemoved: function(session) {
+ this.setStatus('Remote stream for ' + session.jid + ' removed.');
- if (jsxc.options.loginForm.triggered) {
- switch (jsxc.options.loginForm.onAuthFail || 'ask') {
- case 'ask':
- jsxc.gui.showAuthFail();
- break;
- case 'submit':
- jsxc.submitLoginForm();
- break;
- case 'quiet':
- case false:
- return;
- }
- }
+ //@TODO clean up
},
/**
- * Triggered on initial roster load
+ * Extracts local and remote ip and display it to the user.
*
- * @param {dom} iq
* @private
+ * @memberOf jsxc.webrtc
+ * @param event
+ * @param sid session id
+ * @param sess
*/
- onRoster: function(iq) {
- /*
- * <iq from='' type='get' id=''> <query xmlns='jabber:iq:roster'> <item
- * jid='' name='' subscription='' /> ... </query> </iq>
- */
+ onIceConnectionStateChanged: function(session, state) {
+ var self = jsxc.webrtc;
- jsxc.debug('Load roster', iq);
+ jsxc.debug('connection state for ' + session.sid, state);
- var buddies = [];
+ if (state === 'connected') {
- $(iq).find('item').each(function() {
- var jid = $(this).attr('jid');
- var name = $(this).attr('name') || jid;
- var bid = jsxc.jidToBid(jid);
- var sub = $(this).attr('subscription');
+ $('#jsxc_dialog .jsxc_deviceAvailable').show();
+ $('#jsxc_dialog .bubblingG').hide();
- buddies.push(bid);
-
- jsxc.storage.removeUserItem('res', bid);
+ } else if (state === 'failed') {
+ jsxc.gui.window.postMessage(jsxc.jidToBid(session.peerID), 'sys', $.t('ICE_connection_failure'));
- jsxc.storage.saveBuddy(bid, {
- jid: jid,
- name: name,
- status: 0,
- sub: sub,
- res: []
- });
+ $(document).off('cleanup.dialog.jsxc');
- jsxc.gui.roster.add(bid);
- });
+ session.end('failed-transport');
- if (buddies.length === 0) {
- jsxc.gui.roster.empty();
+ $(document).trigger('callterminated.jingle');
+ } else if (state === 'interrupted') {
+ self.setStatus($.t('Connection_interrupted'));
}
-
- jsxc.storage.setUserItem('buddylist', buddies);
-
- jsxc.gui.roster.loaded = true;
- jsxc.debug('Roster loaded');
- $(document).trigger('cloaded.roster.jsxc');
},
/**
- * Triggerd on roster changes
+ * Start a call to the specified jid.
*
- * @param {dom} iq
- * @returns {Boolean} True to preserve handler
- * @private
+ * @memberOf jsxc.webrtc
+ * @param jid full jid
+ * @param um requested user media
*/
- onRosterChanged: function(iq) {
- /*
- * <iq from='' type='set' id=''> <query xmlns='jabber:iq:roster'> <item
- * jid='' name='' subscription='' /> </query> </iq>
- */
-
- jsxc.debug('onRosterChanged', iq);
-
- $(iq).find('item').each(function() {
- var jid = $(this).attr('jid');
- var name = $(this).attr('name') || jid;
- var bid = jsxc.jidToBid(jid);
- var sub = $(this).attr('subscription');
- // var ask = $(this).attr('ask');
+ startCall: function(jid, um) {
+ var self = this;
- if (sub === 'remove') {
- jsxc.gui.roster.purge(bid);
- } else {
- var bl = jsxc.storage.getUserItem('buddylist');
+ if (Strophe.getResourceFromJid(jid) === null) {
+ jsxc.debug('We need a full jid');
+ return;
+ }
- if (bl.indexOf(bid) < 0) {
- bl.push(bid); // (INFO) push returns the new length
- jsxc.storage.setUserItem('buddylist', bl);
- }
+ self.last_caller = jid;
- var temp = jsxc.storage.saveBuddy(bid, {
- jid: jid,
- name: name,
- sub: sub
- });
-
- if (temp === 'updated') {
+ jsxc.switchEvents({
+ 'finish.mediaready.jsxc': function() {
+ self.setStatus('Initiate call');
- jsxc.gui.update(bid);
- jsxc.gui.roster.reorder(bid);
- } else {
- jsxc.gui.roster.add(bid);
- }
- }
+ jsxc.gui.window.postMessage(jsxc.jidToBid(jid), 'sys', $.t('Call_started'));
- // Remove pending friendship request from notice list
- if (sub === 'from' || sub === 'both') {
- var notices = jsxc.storage.getUserItem('notices');
- var noticeKey = null, notice;
+ $(document).one('error.jingle', function(e, sid, error) {
+ if (error.source !== 'offer') {
+ return;
+ }
- for (noticeKey in notices) {
- notice = notices[noticeKey];
+ $(document).off('cleanup.dialog.jsxc');
+ setTimeout(function() {
+ jsxc.gui.showAlert("Sorry, we couldn't establish a connection. Maybe your buddy is offline.");
+ }, 500);
+ });
- if (notice.fnName === 'gui.showApproveDialog' && notice.fnParams[0] === jid) {
- jsxc.debug('Remove notice with key ' + noticeKey);
+ var session = self.conn.jingle.initiate(jid);
- jsxc.notice.remove(noticeKey);
- }
- }
+ session.on('change:connectionState', $.proxy(self.onIceConnectionStateChanged, self));
+ },
+ 'mediafailure.jingle': function() {
+ jsxc.gui.dialog.close();
}
});
- if (!jsxc.storage.getUserItem('buddylist') || jsxc.storage.getUserItem('buddylist').length === 0) {
- jsxc.gui.roster.empty();
- } else {
- $('#jsxc_roster > p:first').remove();
- }
-
- // preserve handler
- return true;
+ self.reqUserMedia(um);
},
/**
- * Triggered on incoming presence stanzas
+ * Hang up the current call.
*
- * @param {dom} presence
- * @private
+ * @memberOf jsxc.webrtc
*/
- onPresence: function(presence) {
- /*
- * <presence xmlns='jabber:client' type='unavailable' from='' to=''/>
- *
- * <presence xmlns='jabber:client' from='' to=''> <priority>5</priority>
- * <c xmlns='http://jabber.org/protocol/caps'
- * node='http://psi-im.org/caps' ver='caps-b75d8d2b25' ext='ca cs
- * ep-notify-2 html'/> </presence>
- *
- * <presence xmlns='jabber:client' from='' to=''> <show>chat</show>
- * <status></status> <priority>5</priority> <c
- * xmlns='http://jabber.org/protocol/caps' node='http://psi-im.org/caps'
- * ver='caps-b75d8d2b25' ext='ca cs ep-notify-2 html'/> </presence>
- */
- jsxc.debug('onPresence', presence);
+ hangUp: function(reason, text) {
+ $(document).off('cleanup.dialog.jsxc');
- var ptype = $(presence).attr('type');
- var from = $(presence).attr('from');
- var jid = Strophe.getBareJidFromJid(from).toLowerCase();
- var r = Strophe.getResourceFromJid(from);
- var bid = jsxc.jidToBid(jid);
- var data = jsxc.storage.getUserItem('buddy', bid);
- var res = jsxc.storage.getUserItem('res', bid) || {};
- var status = null;
- var xVCard = $(presence).find('x[xmlns="vcard-temp:x:update"]');
+ jsxc.webrtc.conn.jingle.terminate(null, reason, text);
+ $(document).trigger('callterminated.jingle');
+ },
- if (jid === Strophe.getBareJidFromJid(jsxc.storage.getItem("jid"))) {
- return true;
+ /**
+ * Request video and audio from local user.
+ *
+ * @memberOf jsxc.webrtc
+ */
+ reqUserMedia: function(um) {
+ if (this.localStream) {
+ $(document).trigger('mediaready.jingle', [this.localStream]);
+ return;
}
- if (ptype === 'error') {
- $(document).trigger('error.presence.jsxc', [ from, presence ]);
+ um = um || ['video', 'audio'];
- jsxc.error('[XMPP] ' + $(presence).attr('code'));
- return true;
- }
+ jsxc.gui.dialog.open(jsxc.gui.template.get('allowMediaAccess'), {
+ noClose: true
+ });
+ this.setStatus('please allow access to microphone and camera');
- // incoming friendship request
- if (ptype === 'subscribe') {
- jsxc.storage.setUserItem('friendReq', {
- jid: jid,
- approve: -1
- });
- jsxc.notice.add($.t('Friendship_request'), $.t('from') + ' ' + jid, 'gui.showApproveDialog', [ jid ]);
+ if (typeof MediaStreamTrack !== 'undefined' && typeof MediaStreamTrack.getSources !== 'undefined') {
+ MediaStreamTrack.getSources(function(sourceInfo) {
+ var availableDevices = sourceInfo.map(function(el) {
- return true;
- } else if (ptype === 'unavailable' || ptype === 'unsubscribed') {
- status = jsxc.CONST.STATUS.indexOf('offline');
+ return el.kind;
+ });
+
+ um = um.filter(function(el) {
+ return availableDevices.indexOf(el) !== -1;
+ });
+
+ jsxc.webrtc.getUserMedia(um);
+ });
} else {
- var show = $(presence).find('show').text();
- if (show === '') {
- status = jsxc.CONST.STATUS.indexOf('online');
- } else {
- status = jsxc.CONST.STATUS.indexOf(show);
- }
+ jsxc.webrtc.getUserMedia(um);
}
+ },
- if (status === 0) {
- delete res[r];
- } else {
- res[r] = status;
+ getUserMedia: function(um) {
+ var self = jsxc.webrtc;
+ var constraints = {};
+
+ if (um.indexOf('video') > -1) {
+ constraints.video = true;
}
- var maxVal = [];
- var max = 0, prop = null;
- for (prop in res) {
- if (res.hasOwnProperty(prop)) {
- if (max <= res[prop]) {
- if (max !== res[prop]) {
- maxVal = [];
- max = res[prop];
- }
- maxVal.push(prop);
- }
- }
+ if (um.indexOf('audio') > -1) {
+ constraints.audio = true;
}
- if (data.status === 0 && max > 0) {
- // buddy has come online
- jsxc.notification.notify({
- title: data.name,
- msg: $.t('has_come_online'),
- source: bid
- });
+ try {
+ self.conn.jingle.RTC.getUserMedia(constraints,
+ function(stream) {
+ jsxc.debug('onUserMediaSuccess');
+ $(document).trigger('mediaready.jingle', [stream]);
+ },
+ function(error) {
+ jsxc.warn('Failed to get access to local media. Error ', error);
+ $(document).trigger('mediafailure.jingle', [error]);
+ });
+ } catch (e) {
+ jsxc.error('GUM failed: ', e);
+ $(document).trigger('mediafailure.jingle');
}
+ },
- data.status = max;
- data.res = maxVal;
- data.jid = jid;
+ /**
+ * Make a snapshot from a video stream and display it.
+ *
+ * @memberOf jsxc.webrtc
+ * @param video Video stream
+ */
+ snapshot: function(video) {
+ if (!video) {
+ jsxc.debug('Missing video element');
+ }
- // Looking for avatar
- if (xVCard.length > 0) {
- var photo = xVCard.find('photo');
+ $('.jsxc_snapshotbar p').remove();
- if (photo.length > 0 && photo.text() !== data.avatar) {
- jsxc.storage.removeUserItem('avatar', data.avatar);
- data.avatar = photo.text();
- }
- }
+ var canvas = $('<canvas/>').css('display', 'none').appendTo('body').attr({
+ width: video.width(),
+ height: video.height()
+ }).get(0);
+ var ctx = canvas.getContext('2d');
- // Reset jid
- if (jsxc.gui.window.get(bid).length > 0) {
- jsxc.gui.window.get(bid).data('jid', jid);
+ ctx.drawImage(video[0], 0, 0);
+ var img = $('<img/>');
+ var url = null;
+
+ try {
+ url = canvas.toDataURL('image/jpeg');
+ } catch (err) {
+ jsxc.warn('Error', err);
+ return;
}
- jsxc.storage.setUserItem('buddy', bid, data);
- jsxc.storage.setUserItem('res', bid, res);
+ img[0].src = url;
+ var link = $('<a/>').attr({
+ target: '_blank',
+ href: url
+ });
+ link.append(img);
+ $('.jsxc_snapshotbar').append(link);
- jsxc.debug('Presence (' + from + '): ' + status);
+ canvas.remove();
+ }
+};
- jsxc.gui.update(bid);
- jsxc.gui.roster.reorder(bid);
+/**
+ * Display window for video call.
+ *
+ * @memberOf jsxc.gui
+ */
+jsxc.gui.showVideoWindow = function(jid) {
+ var self = jsxc.webrtc;
- $(document).trigger('presence.jsxc', [ from, status, presence ]);
+ $(document).one('complete.dialog.jsxc', function() {
- // preserve handler
- return true;
- },
+ // mute own video element to avoid echoes
+ $('#jsxc_dialog .jsxc_localvideo')[0].muted = true;
+ $('#jsxc_dialog .jsxc_localvideo')[0].volume = 0;
- /**
- * Triggered on incoming message stanzas
- *
- * @param {dom} presence
- * @returns {Boolean}
- * @private
- */
- onMessage: function(stanza) {
+ var rv = $('#jsxc_dialog .jsxc_remotevideo');
+ var lv = $('#jsxc_dialog .jsxc_localvideo');
- var forwarded = $(stanza).find('forwarded[xmlns="' + jsxc.CONST.NS.FORWARD + '"]');
- var message, carbon;
+ lv.draggable({
+ containment: "parent"
+ });
- if (forwarded.length > 0) {
- message = forwarded.find('> message');
- forwarded = true;
- carbon = $(stanza).find('> [xmlns="' + jsxc.CONST.NS.CARBONS + '"]');
+ self.attachMediaStream(lv, self.localStream);
- if (carbon.length === 0) {
- carbon = false;
- }
+ var w_dialog = $('#jsxc_dialog').width();
+ var w_remote = rv.width();
- jsxc.debug('Incoming forwarded message', message);
- } else {
- message = stanza;
- forwarded = false;
- carbon = false;
+ // fit in video
+ if (w_remote > w_dialog) {
+ var scale = w_dialog / w_remote;
+ var new_h = rv.height() * scale;
+ var new_w = w_dialog;
+ var vc = $('#jsxc_dialog .jsxc_videoContainer');
- jsxc.debug('Incoming message', message);
+ rv.height(new_h);
+ rv.width(new_w);
+
+ vc.height(new_h);
+ vc.width(new_w);
+
+ lv.height(lv.height() * scale);
+ lv.width(lv.width() * scale);
}
- var body = $(message).find('body:first').text();
+ if (self.remoteStream) {
+ self.attachMediaStream(rv, self.remoteStream);
- if (!body || (body.match(/\?OTR/i) && forwarded)) {
- return true;
+ $('#jsxc_dialog .jsxc_' + (self.remoteStream.getVideoTracks().length > 0 ? 'remotevideo' : 'noRemoteVideo')).addClass('jsxc_deviceAvailable');
}
- var type = $(message).attr('type');
- var from = $(message).attr('from');
- var mid = $(message).attr('id');
- var bid;
+ var toggleMulti = function(elem, open) {
+ $('#jsxc_dialog .jsxc_multi > div').not(elem).slideUp();
- var delay = $(message).find('delay[xmlns="urn:xmpp:delay"]');
+ var opt = {
+ complete: jsxc.gui.dialog.resize
+ };
- var stamp = (delay.length > 0) ? new Date(delay.attr('stamp')) : new Date();
- stamp = stamp.getTime();
+ if (open) {
+ elem.slideDown(opt);
+ } else {
+ elem.slideToggle(opt);
+ }
+ };
- if (carbon) {
- var direction = (carbon.prop("tagName") === 'sent') ? 'out' : 'in';
- bid = jsxc.jidToBid((direction === 'out') ? $(message).attr('to') : from);
+ var win = jsxc.gui.window.open(jsxc.jidToBid(jid));
- jsxc.gui.window.postMessage(bid, direction, body, false, forwarded, stamp);
+ win.find('.slimScrollDiv').resizable('disable');
+ win.find('.jsxc_textarea').slimScroll({
+ height: 413
+ });
+ win.find('.jsxc_emoticons').css('top', (413 + 6) + 'px');
- return true;
+ $('#jsxc_dialog .jsxc_chatarea ul').append(win.detach());
- } else if (forwarded) {
- // Someone forwarded a message to us
+ $('#jsxc_dialog .jsxc_hangUp').click(function() {
+ jsxc.webrtc.hangUp('success');
+ });
- body = from + ' ' + $.t('to') + ' ' + $(stanza).attr('to') + '"' + body + '"';
+ $('#jsxc_dialog .jsxc_snapshot').click(function() {
+ jsxc.webrtc.snapshot(rv);
+ toggleMulti($('#jsxc_dialog .jsxc_snapshotbar'), true);
+ });
- from = $(stanza).attr('from');
- }
+ $('#jsxc_dialog .jsxc_snapshots').click(function() {
+ toggleMulti($('#jsxc_dialog .jsxc_snapshotbar'));
+ });
- var jid = Strophe.getBareJidFromJid(from);
- bid = jsxc.jidToBid(jid);
- var data = jsxc.storage.getUserItem('buddy', bid);
- var request = $(message).find("request[xmlns='urn:xmpp:receipts']");
+ $('#jsxc_dialog .jsxc_showchat').click(function() {
+ var chatarea = $('#jsxc_dialog .jsxc_chatarea');
- if (data === null) {
- // jid not in roster
+ if (chatarea.is(':hidden')) {
+ chatarea.show();
+ $('#jsxc_dialog .jsxc_webrtc').width('900');
+ jsxc.gui.dialog.resize({
+ width: '920px'
+ });
+ } else {
+ chatarea.hide();
+ $('#jsxc_dialog .jsxc_webrtc').width('650');
+ jsxc.gui.dialog.resize({
+ width: '660px'
+ });
+ }
+ });
- var chat = jsxc.storage.getUserItem('chat', bid) || [];
+ $('#jsxc_dialog .jsxc_fullscreen').click(function() {
- if (chat.length === 0) {
- jsxc.notice.add($.t('Unknown_sender'), $.t('You_received_a_message_from_an_unknown_sender') + ' (' + bid + ').', 'gui.showUnknownSender', [ bid ]);
+ if ($.support.fullscreen) {
+ // Reset position of localvideo
+ $(document).one('disabled.fullscreen', function() {
+ lv.removeAttr('style');
+ });
+
+ $('#jsxc_dialog .jsxc_videoContainer').fullscreen();
}
+ });
- var msg = jsxc.removeHTML(body);
- msg = jsxc.escapeHTML(msg);
+ $('#jsxc_dialog .jsxc_volume').change(function() {
+ rv[0].volume = $(this).val();
+ });
- jsxc.storage.saveMessage(bid, 'in', msg, false, forwarded, stamp);
+ $('#jsxc_dialog .jsxc_volume').dblclick(function() {
+ $(this).val(0.5);
+ });
+ });
- return true;
- }
+ // needed to trigger complete.dialog.jsxc
+ jsxc.gui.dialog.close();
- var win = jsxc.gui.window.init(bid);
+ return jsxc.gui.dialog.open(jsxc.gui.template.get('videoWindow'), {
+ noClose: true
+ });
+};
- // If we now the full jid, we use it
- if (type === 'chat') {
- win.data('jid', from);
- jsxc.storage.updateUserItem('buddy', bid, {
- jid: from
- });
- }
+$.extend(jsxc.CONST, {
+ KEYCODE_ENTER: 13,
+ KEYCODE_ESC: 27
+});
- $(document).trigger('message.jsxc', [ from, body ]);
+$(document).ready(function() {
+ $(document).on('add.roster.jsxc', jsxc.webrtc.onAddRosterItem);
+ $(document).on('init.window.jsxc', jsxc.webrtc.initWindow);
+ $(document).on('attached.jsxc', jsxc.webrtc.init);
+ $(document).on('disconnected.jsxc', jsxc.webrtc.onDisconnected);
+});
- // create related otr object
- if (jsxc.master && !jsxc.otr.objects[bid]) {
- jsxc.otr.create(bid);
- }
+/**
+ * Load and save bookmarks according to XEP-0048.
+ *
+ * @namespace jsxc.xmpp.bookmarks
+ */
+jsxc.xmpp.bookmarks = {};
- if (!forwarded && mid !== null && request.length && data !== null && (data.sub === 'both' || data.sub === 'from') && type === 'chat') {
- // Send received according to XEP-0184
- jsxc.xmpp.conn.send($msg({
- to: from
- }).c('received', {
- xmlns: 'urn:xmpp:receipts',
- id: mid
- }));
- }
+/**
+ * Determines if server is able to store bookmarks.
+ *
+ * @return {boolean} True: Server supports bookmark storage
+ */
+jsxc.xmpp.bookmarks.remote = function() {
+ return jsxc.xmpp.conn.caps && jsxc.xmpp.conn.caps.hasFeatureByJid(jsxc.xmpp.conn.domain, Strophe.NS.PUBSUB + "#publish");
+};
- if (jsxc.otr.objects.hasOwnProperty(bid)) {
- jsxc.otr.objects[bid].receiveMsg(body, {
- stamp: stamp,
- forwarded: forwarded
- });
- } else {
- jsxc.gui.window.postMessage(bid, 'in', body, false, forwarded, stamp);
- }
+/**
+ * Load bookmarks from pubsub.
+ *
+ * @memberOf jsxc.xmpp.bookmarks
+ */
+jsxc.xmpp.bookmarks.load = function() {
+ var caps = jsxc.xmpp.conn.caps;
+ var ver = caps._jidVerIndex[jsxc.xmpp.conn.domain];
- // preserve handler
- return true;
- },
+ if (!ver || !caps._knownCapabilities[ver]) {
+ // wait until we know server capabilities
+ $(document).on('caps.strophe', function(ev, from) {
- /**
- * Triggerd if the rid changed
- *
- * @param {event} ev
- * @param {obejct} data
- * @private
- */
- onRidChange: function(ev, data) {
- jsxc.storage.setItem('rid', data.rid);
- },
+ if (from !== jsxc.xmpp.conn.domain) {
+ return;
+ }
- /**
- * response to friendship request
- *
- * @param {string} from jid from original friendship req
- * @param {boolean} approve
- */
- resFriendReq: function(from, approve) {
- if (jsxc.master) {
- jsxc.xmpp.conn.send($pres({
- to: from,
- type: (approve) ? 'subscribed' : 'unsubscribed'
- }));
+ jsxc.xmpp.bookmarks.load();
+ });
+ }
- jsxc.storage.removeUserItem('friendReq');
- jsxc.gui.dialog.close();
+ if (jsxc.xmpp.bookmarks.remote()) {
+ jsxc.xmpp.bookmarks.loadFromRemote();
+ } else {
+ jsxc.xmpp.bookmarks.loadFromLocal();
+ }
+};
- } else {
- jsxc.storage.updateUserItem('friendReq', 'approve', approve);
- }
- },
+/**
+ * Load bookmarks from local storage.
+ *
+ * @private
+ */
+jsxc.xmpp.bookmarks.loadFromLocal = function() {
+ jsxc.debug('Load bookmarks from local storage');
- /**
- * Add buddy to my friends
- *
- * @param {string} username jid
- * @param {string} alias
- */
- addBuddy: function(username, alias) {
- var bid = jsxc.jidToBid(username);
+ var bookmarks = jsxc.storage.getUserItem('bookmarks') || [];
+ var bl = jsxc.storage.getUserItem('buddylist') || [];
- if (jsxc.master) {
- // add buddy to roster (trigger onRosterChanged)
- var iq = $iq({
- type: 'set'
- }).c('query', {
- xmlns: 'jabber:iq:roster'
- }).c('item', {
- jid: username,
- name: alias || ''
- });
- jsxc.xmpp.conn.sendIQ(iq);
+ $.each(bookmarks, function() {
+ var room = this;
+ var roomdata = jsxc.storage.getUserItem('buddy', room) || {};
- // send subscription request to buddy (trigger onRosterChanged)
- jsxc.xmpp.conn.send($pres({
- to: username,
- type: 'subscribe'
- }));
+ bl.push(room);
+ jsxc.gui.roster.add(room);
- jsxc.storage.removeUserItem('add_' + bid);
- } else {
- jsxc.storage.setUserItem('add_' + bid, {
- username: username,
- alias: alias || null
- });
+ if (roomdata.autojoin) {
+ jsxc.debug('auto join ' + room);
+ jsxc.xmpp.conn.muc.join(room, roomdata.nickname);
}
- },
+ });
- /**
- * Remove buddy from my friends
- *
- * @param {type} jid
- */
- removeBuddy: function(jid) {
- var bid = jsxc.jidToBid(jid);
+ jsxc.storage.setUserItem('buddylist', bl);
+};
- // Shortcut to remove buddy from roster and cancle all subscriptions
- var iq = $iq({
- type: 'set'
- }).c('query', {
- xmlns: 'jabber:iq:roster'
- }).c('item', {
- jid: Strophe.getBareJidFromJid(jid),
- subscription: 'remove'
- });
- jsxc.xmpp.conn.sendIQ(iq);
+/**
+ * Load bookmarks from remote storage.
+ *
+ * @private
+ */
+jsxc.xmpp.bookmarks.loadFromRemote = function() {
+ jsxc.debug('Load bookmarks from pubsub');
- jsxc.gui.roster.purge(bid);
- },
+ var bookmarks = jsxc.xmpp.conn.bookmarks;
- onReceived: function(message) {
- var from = $(message).attr('from');
- var jid = Strophe.getBareJidFromJid(from);
- var bid = jsxc.jidToBid(jid);
- var received = $(message).find("received[xmlns='urn:xmpp:receipts']");
+ bookmarks.get(function(stanza) {
+ var bl = jsxc.storage.getUserItem('buddylist');
- if (received.length) {
- var receivedId = received.attr('id').replace(/:/, '-');
- var chat = jsxc.storage.getUserItem('chat', bid);
- var i;
+ $(stanza).find('conference').each(function() {
+ var conference = $(this);
+ var room = conference.attr('jid');
+ var roomName = conference.attr('name') || room;
+ var autojoin = conference.attr('autojoin') || false;
+ var nickname = conference.find('nick').text();
+ nickname = (nickname.length > 0) ? nickname : Strophe.getNodeFromJid(jsxc.xmpp.conn.jid);
- for (i = chat.length - 1; i >= 0; i--) {
- if (chat[i].uid === receivedId) {
- chat[i].received = true;
+ if (autojoin === 'true') {
+ autojoin = true;
+ } else if (autojoin === 'false') {
+ autojoin = false;
+ }
- $('#' + receivedId).addClass('jsxc_received');
+ jsxc.storage.setUserItem('buddy', room, {
+ jid: room,
+ name: roomName,
+ sub: 'both',
+ status: 0,
+ type: 'groupchat',
+ state: jsxc.muc.CONST.ROOMSTATE.INIT,
+ subject: null,
+ bookmarked: true,
+ autojoin: autojoin,
+ nickname: nickname
+ });
- jsxc.storage.setUserItem('chat', bid, chat);
- break;
- }
+ bl.push(room);
+ jsxc.gui.roster.add(room);
+
+ if (autojoin) {
+ jsxc.debug('auto join ' + room);
+ jsxc.xmpp.conn.muc.join(room, nickname);
}
- }
+ });
- return true;
- },
+ jsxc.storage.setUserItem('buddylist', bl);
+ }, function(stanza) {
+ var err = jsxc.xmpp.bookmarks.parseErr(stanza);
- /**
- * Public function to send message.
- *
- * @memberOf jsxc.xmpp
- * @param bid css jid of user
- * @param msg message
- * @param uid unique id
- */
- sendMessage: function(bid, msg, uid) {
- if (jsxc.otr.objects.hasOwnProperty(bid)) {
- jsxc.otr.objects[bid].sendMsg(msg, uid);
+ if (err.reasons[0] === 'item-not-found') {
+ jsxc.debug('create bookmark node');
+
+ bookmarks.createBookmarksNode();
} else {
- jsxc.xmpp._sendMessage(jsxc.gui.window.get(bid).data('jid'), msg, uid);
+ jsxc.debug('[XMPP] Could not create bookmark: ' + err.type, err.reasons);
}
- },
+ });
+};
- /**
- * Create message stanza and send it.
- *
- * @memberOf jsxc.xmpp
- * @param jid Jabber id
- * @param msg Message
- * @param uid unique id
- * @private
- */
- _sendMessage: function(jid, msg, uid) {
- var data = jsxc.storage.getUserItem('buddy', jsxc.jidToBid(jid)) || {};
- var isBar = (Strophe.getBareJidFromJid(jid) === jid);
- var type = data.type || 'chat';
+/**
+ * Parse received error.
+ *
+ * @param {string} stanza
+ * @return {object} err - The parsed error
+ * @return {string} err.type - XMPP error type
+ * @return {array} err.reasons - Array of error reasons
+ */
+jsxc.xmpp.bookmarks.parseErr = function(stanza) {
+ var error = $(stanza).find('error');
+ var type = error.attr('type');
+ var reasons = error.children().map(function() {
+ return $(this).prop('tagName');
+ });
- var xmlMsg = $msg({
- to: jid,
- type: type,
- id: uid
- }).c('body').t(msg);
+ return {
+ type: type,
+ reasons: reasons
+ };
+};
- if (jsxc.xmpp.carbons.enabled && msg.match(/^\?OTR/)) {
- xmlMsg.up().c("private", {
- xmlns: jsxc.CONST.NS.CARBONS
- });
- }
+/**
+ * Deletes the bookmark for the given room and removes it from the roster if soft is false.
+ *
+ * @param {string} room - room jid
+ * @param {boolean} [soft=false] - True: leave room in roster
+ */
+jsxc.xmpp.bookmarks.delete = function(room, soft) {
- if (type === 'chat' && (isBar || jsxc.xmpp.conn.caps.hasFeatureByJid(jid, Strophe.NS.RECEIPTS))) {
- // Add request according to XEP-0184
- xmlMsg.up().c('request', {
- xmlns: 'urn:xmpp:receipts'
- });
- }
+ if (!soft) {
+ jsxc.gui.roster.purge(room);
+ }
- jsxc.xmpp.conn.send(xmlMsg);
- },
+ if (jsxc.xmpp.bookmarks.remote()) {
+ jsxc.xmpp.bookmarks.deleteFromRemote(room, soft);
+ } else {
+ jsxc.xmpp.bookmarks.deleteFromLocal(room, soft);
+ }
+};
- /**
- * This function loads a vcard.
- *
- * @memberOf jsxc.xmpp
- * @param bid
- * @param cb
- * @param error_cb
- */
- loadVcard: function(bid, cb, error_cb) {
- if (jsxc.master) {
- jsxc.xmpp.conn.vcard.get(cb, bid, error_cb);
- } else {
- jsxc.storage.setUserItem('vcard', bid, 'request:' + (new Date()).getTime());
+/**
+ * Delete bookmark from remote storage.
+ *
+ * @private
+ * @param {string} room - room jid
+ * @param {boolean} [soft=false] - True: leave room in roster
+ */
+jsxc.xmpp.bookmarks.deleteFromRemote = function(room, soft) {
+ var bookmarks = jsxc.xmpp.conn.bookmarks;
- $(document).one('loaded.vcard.jsxc', function(ev, result) {
- if (result && result.state === 'success') {
- cb($(result.data).get(0));
- } else {
- error_cb();
- }
- });
- }
- },
+ bookmarks.delete(room, function() {
+ jsxc.debug('Bookmark deleted ' + room);
- /**
- * Retrieves capabilities.
- *
- * @memberOf jsxc.xmpp
- * @param jid
- * @returns List of known capabilities
- */
- getCapabilitiesByJid: function(jid) {
- if (jsxc.xmpp.conn) {
- return jsxc.xmpp.conn.caps.getCapabilitiesByJid(jid);
+ if (soft) {
+ jsxc.gui.roster.getItem(room).removeClass('jsxc_bookmarked');
+ jsxc.storage.updateUserItem('buddy', room, 'bookmarked', false);
+ jsxc.storage.updateUserItem('buddy', room, 'autojoin', false);
}
+ }, function(stanza) {
+ var err = jsxc.xmpp.bookmarks.parseErr(stanza);
- var jidVerIndex = JSON.parse(localStorage.getItem('strophe.caps._jidVerIndex')) || {};
- var knownCapabilities = JSON.parse(localStorage.getItem('strophe.caps._knownCapabilities')) || {};
+ jsxc.debug('[XMPP] Could not delete bookmark: ' + err.type, err.reasons);
+ });
+};
- if (jidVerIndex[jid]) {
- return knownCapabilities[jidVerIndex[jid]];
- }
+/**
+ * Delete bookmark from local storage.
+ *
+ * @private
+ * @param {string} room - room jid
+ * @param {boolean} [soft=false] - True: leave room in roster
+ */
+jsxc.xmpp.bookmarks.deleteFromLocal = function(room, soft) {
+ var bookmarks = jsxc.storage.getUserItem('bookmarks');
+ var index = bookmarks.indexOf(room);
- return null;
+ if (index > -1) {
+ bookmarks.splice(index, 1);
+ }
+
+ jsxc.storage.setUserItem('bookmarks', bookmarks);
+
+ if (soft) {
+ jsxc.gui.roster.getItem(room).removeClass('jsxc_bookmarked');
+ jsxc.storage.updateUserItem('buddy', room, 'bookmarked', false);
+ jsxc.storage.updateUserItem('buddy', room, 'autojoin', false);
}
};
/**
- * Handle carbons (XEP-0280);
- *
- * @namespace jsxc.xmpp.carbons
+ * Adds or overwrites bookmark for given room.
+ *
+ * @param {string} room - room jid
+ * @param {string} alias - room alias
+ * @param {string} nick - preferred user nickname
+ * @param {boolean} autojoin - should we join this room after login?
*/
-jsxc.xmpp.carbons = {
- enabled: false,
+jsxc.xmpp.bookmarks.add = function(room, alias, nick, autojoin) {
+ if (jsxc.xmpp.bookmarks.remote()) {
+ jsxc.xmpp.bookmarks.addToRemote(room, alias, nick, autojoin);
+ } else {
+ jsxc.xmpp.bookmarks.addToLocal(room, alias, nick, autojoin);
+ }
+};
- /**
- * Enable carbons.
- *
- * @memberOf jsxc.xmpp.carbons
- * @param cb callback
- */
- enable: function(cb) {
- var iq = $iq({
- type: 'set'
- }).c('enable', {
- xmlns: jsxc.CONST.NS.CARBONS
- });
+/**
+ * Adds or overwrites bookmark for given room in remote storage.
+ *
+ * @private
+ * @param {string} room - room jid
+ * @param {string} alias - room alias
+ * @param {string} nick - preferred user nickname
+ * @param {boolean} autojoin - should we join this room after login?
+ */
+jsxc.xmpp.bookmarks.addToRemote = function(room, alias, nick, autojoin) {
+ var bookmarks = jsxc.xmpp.conn.bookmarks;
- jsxc.xmpp.conn.sendIQ(iq, function() {
- jsxc.xmpp.carbons.enabled = true;
+ var success = function() {
+ jsxc.debug('New bookmark created', room);
- jsxc.debug('Carbons enabled');
+ jsxc.gui.roster.getItem(room).addClass('jsxc_bookmarked');
+ jsxc.storage.updateUserItem('buddy', room, 'bookmarked', true);
+ jsxc.storage.updateUserItem('buddy', room, 'autojoin', autojoin);
+ jsxc.storage.updateUserItem('buddy', room, 'nickname', nick);
+ };
+ var error = function() {
+ jsxc.warn('Could not create bookmark', room);
+ };
- if (cb) {
- cb.call(this);
- }
- }, function(stanza) {
- jsxc.warn('Could not enable carbons', stanza);
- });
- },
+ bookmarks.add(room, alias, nick, autojoin, success, error);
+};
- /**
- * Disable carbons.
- *
- * @memberOf jsxc.xmpp.carbons
- * @param cb callback
- */
- disable: function(cb) {
- var iq = $iq({
- type: 'set'
- }).c('disable', {
- xmlns: jsxc.CONST.NS.CARBONS
- });
+/**
+ * Adds or overwrites bookmark for given room in local storage.
+ *
+ * @private
+ * @param {string} room - room jid
+ * @param {string} alias - room alias
+ * @param {string} nick - preferred user nickname
+ * @param {boolean} autojoin - should we join this room after login?
+ */
+jsxc.xmpp.bookmarks.addToLocal = function(room, alias, nick, autojoin) {
+ jsxc.gui.roster.getItem(room).addClass('jsxc_bookmarked');
+ jsxc.storage.updateUserItem('buddy', room, 'bookmarked', true);
+ jsxc.storage.updateUserItem('buddy', room, 'autojoin', autojoin);
+ jsxc.storage.updateUserItem('buddy', room, 'nickname', nick);
- jsxc.xmpp.conn.sendIQ(iq, function() {
- jsxc.xmpp.carbons.enabled = false;
+ var bookmarks = jsxc.storage.getUserItem('bookmarks') || [];
- jsxc.debug('Carbons disabled');
+ if (bookmarks.indexOf(room) < 0) {
+ bookmarks.push(room);
- if (cb) {
- cb.call(this);
- }
- }, function(stanza) {
- jsxc.warn('Could not disable carbons', stanza);
- });
- },
+ jsxc.storage.setUserItem('bookmarks', bookmarks);
+ }
+};
- /**
- * Enable/Disable carbons depending on options key.
- *
- * @memberOf jsxc.xmpp.carbons
- * @param err error message
- */
- refresh: function(err) {
- if (err === false) {
- return;
+/**
+ * Show dialog to edit bookmark.
+ *
+ * @param {string} room - room jid
+ */
+jsxc.xmpp.bookmarks.showDialog = function(room) {
+ var dialog = jsxc.gui.dialog.open(jsxc.gui.template.get('bookmarkDialog'));
+ var data = jsxc.storage.getUserItem('buddy', room);
+
+ $('#jsxc_room').val(room);
+ $('#jsxc_nickname').val(data.nickname);
+
+ $('#jsxc_bookmark').change(function() {
+ if ($(this).prop('checked')) {
+ $('#jsxc_nickname').prop('disabled', false);
+ $('#jsxc_autojoin').prop('disabled', false);
+ $('#jsxc_autojoin').parent('.checkbox').removeClass('disabled');
+ } else {
+ $('#jsxc_nickname').prop('disabled', true);
+ $('#jsxc_autojoin').prop('disabled', true).prop('checked', false);
+ $('#jsxc_autojoin').parent('.checkbox').addClass('disabled');
}
+ });
- if (jsxc.options.get('carbons').enable) {
- return jsxc.xmpp.carbons.enable();
+ $('#jsxc_bookmark').prop('checked', data.bookmarked);
+ $('#jsxc_autojoin').prop('checked', data.autojoin);
+
+ $('#jsxc_bookmark').change();
+
+ dialog.find('form').submit(function(ev) {
+ ev.preventDefault();
+
+ var bookmarked = $('#jsxc_bookmark').prop('checked');
+ var autojoin = $('#jsxc_autojoin').prop('checked');
+ var nickname = $('#jsxc_nickname').val();
+
+ if (bookmarked) {
+ jsxc.xmpp.bookmarks.add(room, data.name, nickname, autojoin);
+ } else if (data.bookmarked) {
+ // bookmarked === false
+ jsxc.xmpp.bookmarks.delete(room, true);
}
- return jsxc.xmpp.carbons.disable();
- }
+ jsxc.gui.dialog.close();
+
+ return false;
+ });
};
+
+
+jsxc.gui.template['aboutDialog'] = '<h3>JavaScript XMPP Chat</h3>\n' +
+'<p>\n' +
+' <b>Version: </b>{{version}}\n' +
+' <br /> <a href="http://jsxc.org/" target="_blank">www.jsxc.org</a>\n' +
+'</p>\n' +
+'<p>\n' +
+' <i>Released under the MIT license</i>\n' +
+'</p>\n' +
+'<p>\n' +
+' Real-time chat app for {{app_name}} and more.\n' +
+' <br /> Requires an external <a href="https://xmpp.org/xmpp-software/servers/" target="_blank">XMPP server</a>.\n' +
+'</p>\n' +
+'<p>\n' +
+' <b>Credits: </b> <a href="http://www.beepzoid.com/old-phones/" target="_blank">David English (Ringtone)</a>, <a href="https://soundcloud.com/freefilmandgamemusic/ping-1?in=freefilmandgamemusic/sets/free-notification-sounds-and" target="_blank">CameronMusic (Ping)</a>\n' +
+'</p>\n' +
+'<p class="jsxc_libraries">\n' +
+' <b>Libraries: </b>\n' +
+' < $ dep.libraries $>\n' +
+'</p>\n' +
+'\n' +
+'<button class="btn btn-default pull-right jsxc_debuglog">Show debug log</button>\n' +
+'';
+
+jsxc.gui.template['alert'] = '<h3 data-i18n="Alert"></h3>\n' +
+'<div class="alert alert-info">\n' +
+' <strong data-i18n="Info"></strong> {{msg}}\n' +
+'</div>\n' +
+'';
+
+jsxc.gui.template['allowMediaAccess'] = '<p data-i18n="Please_allow_access_to_microphone_and_camera"></p>\n' +
+'';
+
+jsxc.gui.template['approveDialog'] = '<h3 data-i18n="Subscription_request"></h3>\n' +
+'<p>\n' +
+' <span data-i18n="You_have_a_request_from"></span><b class="jsxc_their_jid"></b>.\n' +
+'</p>\n' +
+'\n' +
+'<button class="btn btn-primary jsxc_approve pull-right" data-i18n="Approve"></button>\n' +
+'<button class="btn btn-default jsxc_deny pull-right" data-i18n="Deny"></button>\n' +
+'';
+
+jsxc.gui.template['authFailDialog'] = '<h3 data-i18n="Login_failed"></h3>\n' +
+'<p data-i18n="Sorry_we_cant_authentikate_"></p>\n' +
+'\n' +
+'<button class="btn btn-primary jsxc_retry pull-right" data-i18n="Continue_without_chat"></button>\n' +
+'<button class="btn btn-default jsxc_cancel pull-right" data-i18n="Retry"></button>\n' +
+'';
+
+jsxc.gui.template['authenticationDialog'] = '<h3>Verification</h3>\n' +
+'<p data-i18n="Authenticating_a_buddy_helps_"></p>\n' +
+'<div>\n' +
+' <p data-i18n="[html]How_do_you_want_to_authenticate_your_buddy"></p>\n' +
+'\n' +
+' <div class="btn-group" role="group">\n' +
+' <button class="btn btn-default" data-i18n="Manual"></button>\n' +
+' <button class="btn btn-default" data-i18n="Question"></button>\n' +
+' <button class="btn btn-default" data-i18n="Secret"></button>\n' +
+' </div>\n' +
+'</div>\n' +
+'<hr />\n' +
+'<div style="display: none">\n' +
+' <p data-i18n="To_verify_the_fingerprint_" class=".jsxc_explanation"></p>\n' +
+' <p>\n' +
+' <strong data-i18n="Your_fingerprint"></strong>\n' +
+' <br /> <span style="text-transform: uppercase">{{my_priv_fingerprint}}</span>\n' +
+' </p>\n' +
+' <p>\n' +
+' <strong data-i18n="Buddy_fingerprint"></strong>\n' +
+' <br /> <span style="text-transform: uppercase">{{bid_priv_fingerprint}}</span>\n' +
+' </p>\n' +
+' <div class="jsxc_right">\n' +
+' <button class="btn btn-default jsxc_close" data-i18n="Close"></button>\n' +
+' <button class="btn btn-primary jsxc_submit" data-i18n="Compared"></button>\n' +
+' </div>\n' +
+'</div>\n' +
+'<div style="display: none" class="form-horizontal">\n' +
+' <p data-i18n="To_authenticate_using_a_question_" class=".jsxc_explanation"></p>\n' +
+' <div class="form-group">\n' +
+' <label class="col-sm-4 control-label" for="jsxc_quest" data-i18n="Question"></label>\n' +
+' <div class="col-sm-8">\n' +
+' <input type="text" name="quest" id="jsxc_quest" class="form-control" />\n' +
+' </div>\n' +
+' </div>\n' +
+' <div class="form-group">\n' +
+' <label class="col-sm-4 control-label" for="jsxc_secret2" data-i18n="Secret"></label>\n' +
+' <div class="col-sm-8">\n' +
+' <input type="text" name="secret2" id="jsxc_secret2" class="form-control" />\n' +
+' </div>\n' +
+' </div>\n' +
+' <div class="form-group">\n' +
+' <div class="col-sm-offset-4 col-sm-8">\n' +
+' <button class="btn btn-default jsxc_close" data-i18n="Close"></button>\n' +
+' <button class="btn btn-primary jsxc_submit" data-i18n="Ask"></button>\n' +
+' </div>\n' +
+' </div>\n' +
+'</div>\n' +
+'<div style="display: none" class="form-horizontal">\n' +
+' <p class=".jsxc_explanation" data-i18n="To_authenticate_pick_a_secret_"></p>\n' +
+' <div class="form-group">\n' +
+' <label class="col-sm-4 control-label" for="jsxc_secret" data-i18n="Secret"></label>\n' +
+' <div class="col-sm-8">\n' +
+' <input type="text" name="secret" id="jsxc_secret" class="form-control" />\n' +
+' </div>\n' +
+' </div>\n' +
+' <div class="form-group">\n' +
+' <div class="col-sm-offset-4 col-sm-8">\n' +
+' <button class="btn btn-default jsxc_close" data-i18n="Close"></button>\n' +
+' <button class="btn btn-primary jsxc_submit" data-i18n="Compare"></button>\n' +
+' </div>\n' +
+' </div>\n' +
+'</div>\n' +
+'';
+
+jsxc.gui.template['bookmarkDialog'] = '<h3 data-i18n="Edit_bookmark"></h3>\n' +
+'<form class="form-horizontal">\n' +
+' <div class="form-group">\n' +
+' <label class="col-sm-4 control-label" for="jsxc_room" data-i18n="Room"></label>\n' +
+' <div class="col-sm-8">\n' +
+' <input type="text" id="jsxc_room" class="form-control" required="required" readonly="readonly" />\n' +
+' </div>\n' +
+' </div>\n' +
+' <div class="form-group">\n' +
+' <label class="col-sm-4 control-label" for="jsxc_nickname" data-i18n="Nickname"></label>\n' +
+' <div class="col-sm-8">\n' +
+' <input type="text" disabled="disabled" required="required" name="nickname" id="jsxc_nickname" class="form-control" />\n' +
+' </div>\n' +
+' </div>\n' +
+' <div class="form-group">\n' +
+' <div class="col-sm-offset-4 col-sm-8">\n' +
+' <div class="checkbox">\n' +
+' <label>\n' +
+' <input id="jsxc_bookmark" type="checkbox"><span data-i18n="Bookmark"></span>\n' +
+' </label>\n' +
+' </div>\n' +
+' </div>\n' +
+' </div>\n' +
+' <div class="form-group">\n' +
+' <div class="col-sm-offset-4 col-sm-8">\n' +
+' <div class="checkbox disabled">\n' +
+' <label>\n' +
+' <input disabled="disabled" id="jsxc_autojoin" type="checkbox"><span data-i18n="Auto-join"></span>\n' +
+' </label>\n' +
+' </div>\n' +
+' </div>\n' +
+' </div>\n' +
+' <div class="form-group">\n' +
+' <div class="col-sm-offset-4 col-sm-8">\n' +
+' <button type="button" class="btn btn-default jsxc_close" data-i18n="Close"></button>\n' +
+' <button type="submit" class="btn btn-primary jsxc_submit" data-i18n="Save"></button>\n' +
+' </div>\n' +
+' </div>\n' +
+'</form>\n' +
+'';
+
+jsxc.gui.template['chatWindow'] = '<li class="jsxc_min jsxc_windowItem">\n' +
+' <div class="jsxc_window">\n' +
+' <div class="jsxc_bar">\n' +
+' <div class="jsxc_avatar">☺</div>\n' +
+' <div class="jsxc_tools">\n' +
+' <div class="jsxc_settings">\n' +
+' <ul>\n' +
+' <li class="jsxc_fingerprints jsxc_otr jsxc_disabled" data-i18n="Fingerprints"></li>\n' +
+' <li class="jsxc_verification" data-i18n="Authentication"></li>\n' +
+' <li class="jsxc_transfer jsxc_otr jsxc_disabled" data-i18n="start_private"></li>\n' +
+' <li class="jsxc_clear" data-i18n="clear_history"></li>\n' +
+' </ul>\n' +
+' </div>\n' +
+' <div class="jsxc_transfer jsxc_otr jsxc_disabled" />\n' +
+' <div class="jsxc_close">×</div>\n' +
+' </div>\n' +
+' <div class="jsxc_unread" />\n' +
+' <div class="jsxc_name" />\n' +
+' </div>\n' +
+' <div class="jsxc_fade">\n' +
+' <div class="jsxc_gradient" />\n' +
+' <div class="jsxc_textarea" />\n' +
+' <div class="jsxc_emoticons">\n' +
+' <ul />\n' +
+' </div>\n' +
+' <input type="text" class="jsxc_textinput" data-i18n="[placeholder]Message" />\n' +
+' </div>\n' +
+' </div>\n' +
+'</li>\n' +
+'';
+
+jsxc.gui.template['confirmDialog'] = '<p>{{msg}}</p>\n' +
+'\n' +
+'<button class="btn btn-primary jsxc_confirm pull-right" data-i18n="Confirm"></button>\n' +
+'<button class="btn btn-default jsxc_dismiss jsxc_close pull-right" data-i18n="Dismiss"></button>\n' +
+'';
+
+jsxc.gui.template['contactDialog'] = '<h3 data-i18n="Add_buddy"></h3>\n' +
+'<p class=".jsxc_explanation" data-i18n="Type_in_the_full_username_"></p>\n' +
+'<form class="form-horizontal">\n' +
+' <div class="form-group">\n' +
+' <label class="col-sm-4 control-label" for="jsxc_username" data-i18n="Username"></label>\n' +
+' <div class="col-sm-8">\n' +
+' <input type="text" name="username" id="jsxc_username" class="form-control" list="jsxc_userlist" pattern="^[^\\x22&\'\\\\/:<>@\\s]+(@[.\\-_\\w]+)?" required="required" />\n' +
+' </div>\n' +
+' </div>\n' +
+' <datalist id="jsxc_userlist"></datalist>\n' +
+' <div class="form-group">\n' +
+' <label class="col-sm-4 control-label" for="jsxc_alias" data-i18n="Alias"></label>\n' +
+' <div class="col-sm-8">\n' +
+' <input type="text" name="alias" id="jsxc_alias" class="form-control" />\n' +
+' </div>\n' +
+' </div>\n' +
+' <div class="form-group">\n' +
+' <div class="col-sm-offset-4 col-sm-8">\n' +
+' <button class="btn btn-default jsxc_close" type="button" data-i18n="Close"></button>\n' +
+' <button class="btn btn-primary" type="submit" data-i18n="Add"></button>\n' +
+' </div>\n' +
+' </div>\n' +
+'</form>\n' +
+'';
+
+jsxc.gui.template['fingerprintsDialog'] = '<div>\n' +
+' <p class="jsxc_maxWidth" data-i18n="A_fingerprint_"></p>\n' +
+' <p>\n' +
+' <strong data-i18n="Your_fingerprint"></strong>\n' +
+' <br /> <span style="text-transform: uppercase">{{my_priv_fingerprint}}</span>\n' +
+' </p>\n' +
+' <p>\n' +
+' <strong data-i18n="Buddy_fingerprint"></strong>\n' +
+' <br /> <span style="text-transform: uppercase">{{bid_priv_fingerprint}}</span>\n' +
+' </p>\n' +
+'</div>\n' +
+'';
+
+jsxc.gui.template['incomingCall'] = '<h3 data-i18n="Incoming_call"></h3>\n' +
+'<p>\n' +
+' <span data-i18n="Do_you_want_to_accept_the_call_from"></span> {{bid_name}}?\n' +
+'</p>\n' +
+'\n' +
+'<button class="btn btn-primary jsxc_accept pull-right" data-i18n="Accept"></button>\n' +
+'<button class="btn btn-default jsxc_reject pull-right" data-i18n="Reject"></button>\n' +
+'';
+
+jsxc.gui.template['joinChat'] = '<h3 data-i18n="Join_chat"></h3>\n' +
+'<p class=".jsxc_explanation" data-i18n="muc_explanation"></p>\n' +
+'<div class="form-horizontal">\n' +
+' <div class="form-group">\n' +
+' <label class="col-sm-4 control-label" for="jsxc_server" data-i18n="Server"></label>\n' +
+' <div class="col-sm-8">\n' +
+' <input type="text" name="server" id="jsxc_server" class="form-control" required="required" readonly="readonly" />\n' +
+' </div>\n' +
+' </div>\n' +
+' <div class="form-group">\n' +
+' <label class="col-sm-4 control-label" for="jsxc_room" data-i18n="Room"></label>\n' +
+' <div class="col-sm-8">\n' +
+' <input type="text" name="room" id="jsxc_room" class="form-control" autocomplete="off" list="jsxc_roomlist" required="required" pattern="^[^\\x22&\'\\/:<>@\\s]+" />\n' +
+' </div>\n' +
+' </div>\n' +
+' <p class="jsxc_inputinfo jsxc_waiting jsxc_room" data-i18n="Rooms_are_loaded"></p>\n' +
+' <datalist id="jsxc_roomlist">\n' +
+' <p>\n' +
+' <label for="jsxc_roomlist_select"></label>\n' +
+' <select id="jsxc_roomlist_select">\n' +
+' <option></option>\n' +
+' <option>workaround</option>\n' +
+' </select>\n' +
+' </p>\n' +
+' </datalist>\n' +
+' <div class="form-group">\n' +
+' <label class="col-sm-4 control-label" for="jsxc_nickname" data-i18n="Nickname"></label>\n' +
+' <div class="col-sm-8">\n' +
+' <input type="text" name="nickname" id="jsxc_nickname" class="form-control" />\n' +
+' </div>\n' +
+' </div>\n' +
+' <div class="form-group">\n' +
+' <label class="col-sm-4 control-label" for="jsxc_password" data-i18n="Password"></label>\n' +
+' <div class="col-sm-8">\n' +
+' <input type="text" name="password" id="jsxc_password" class="form-control" />\n' +
+' </div>\n' +
+' </div>\n' +
+' <div class="form-group jsxc_bookmark">\n' +
+' <div class="col-sm-offset-4 col-sm-8">\n' +
+' <div class="checkbox">\n' +
+' <label>\n' +
+' <input id="jsxc_bookmark" type="checkbox"><span data-i18n="Bookmark"></span>\n' +
+' </label>\n' +
+' </div>\n' +
+' </div>\n' +
+' </div>\n' +
+' <div class="form-group jsxc_bookmark">\n' +
+' <div class="col-sm-offset-4 col-sm-8">\n' +
+' <div class="checkbox disabled">\n' +
+' <label>\n' +
+' <input disabled="disabled" id="jsxc_autojoin" type="checkbox"><span data-i18n="Auto-join"></span>\n' +
+' </label>\n' +
+' </div>\n' +
+' </div>\n' +
+' </div>\n' +
+' <div class="jsxc_msg"></div>\n' +
+' <div class="form-group">\n' +
+' <div class="col-sm-offset-4 col-sm-8">\n' +
+' <span class="jsxc_warning"></span>\n' +
+' <button class="btn btn-default jsxc_close" data-i18n="Close"></button>\n' +
+' <button class="btn btn-primary jsxc_continue" data-i18n="Continue"></button>\n' +
+' <button class="btn btn-success jsxc_join" data-i18n="Join"></button>\n' +
+' </div>\n' +
+' </div>\n' +
+'</div>\n' +
+'';
+
+jsxc.gui.template['loginBox'] = '<h3 data-i18n="Login"></h3>\n' +
+'<form class="form-horizontal">\n' +
+' <div class="form-group">\n' +
+' <label class="col-sm-4 control-label" for="jsxc_username" data-i18n="Username"></label>\n' +
+' <div class="col-sm-8">\n' +
+' <input type="text" name="username" id="jsxc_username" class="form-control" required="required" value="{{my_node}}" />\n' +
+' </div>\n' +
+' </div>\n' +
+' <div class="form-group">\n' +
+' <label class="col-sm-4 control-label" for="jsxc_password" data-i18n="Password"></label>\n' +
+' <div class="col-sm-8">\n' +
+' <input type="password" name="password" required="required" class="form-control" id="jsxc_password" />\n' +
+' </div>\n' +
+' </div>\n' +
+' <div class="jsxc_alert jsxc_alert-warning" data-i18n="Sorry_we_cant_authentikate_"></div>\n' +
+' <div class="form-group">\n' +
+' <div class="col-sm-offset-4 col-sm-9">\n' +
+' <button type="reset" class="btn btn-default jsxc_close" name="clear" data-i18n="Cancel" />\n' +
+' <button type="submit" class="btn btn-primary" name="commit" data-i18n="[data-jsxc-loading-text]Connecting...;Connect" />\n' +
+' </div>\n' +
+' </div>\n' +
+'</form>\n' +
+'';
+
+jsxc.gui.template['pleaseAccept'] = '<p data-i18n="Please_accept_"></p>\n' +
+'';
+
+jsxc.gui.template['removeDialog'] = '<h3 data-i18n="Remove_buddy"></h3>\n' +
+'<p class="jsxc_maxWidth" data-i18n="[html]You_are_about_to_remove_"></p>\n' +
+'\n' +
+'<button class="btn btn-primary jsxc_remove pull-right" data-i18n="Remove"></button>\n' +
+'<button class="btn btn-default jsxc_cancel jsxc_close pull-right" data-i18n="Cancel"></button>\n' +
+'';
+
+jsxc.gui.template['roster'] = '<div id="jsxc_roster">\n' +
+' <ul id="jsxc_buddylist"></ul>\n' +
+' <div class="jsxc_bottom jsxc_presence" data-bid="own">\n' +
+' <div id="jsxc_avatar">\n' +
+' <div class="jsxc_avatar">☺</div>\n' +
+' </div>\n' +
+' <div id="jsxc_menu">\n' +
+' <span></span>\n' +
+' <ul>\n' +
+' <li class="jsxc_settings" data-i18n="Settings"></li>\n' +
+' <li class="jsxc_muteNotification" data-i18n="Mute"></li>\n' +
+' <li class="jsxc_addBuddy" data-i18n="Add_buddy"></li>\n' +
+' <li class="jsxc_hideOffline" data-i18n="Hide_offline"></li>\n' +
+' <li class="jsxc_onlineHelp" data-i18n="Online_help"></li>\n' +
+' <li class="jsxc_about" data-i18n="About"></li>\n' +
+' </ul>\n' +
+' </div>\n' +
+' <div id="jsxc_notice">\n' +
+' <span></span>\n' +
+' <ul></ul>\n' +
+' </div>\n' +
+' <div id="jsxc_presence">\n' +
+' <span data-i18n="Online"></span>\n' +
+' <ul>\n' +
+' <li data-pres="online" class="jsxc_online" data-i18n="Online"></li>\n' +
+' <li data-pres="chat" class="jsxc_chat" data-i18n="Chatty"></li>\n' +
+' <li data-pres="away" class="jsxc_away" data-i18n="Away"></li>\n' +
+' <li data-pres="xa" class="jsxc_xa" data-i18n="Extended_away"></li>\n' +
+' <li data-pres="dnd" class="jsxc_dnd" data-i18n="dnd"></li>\n' +
+' <li data-pres="offline" class="jsxc_offline" data-i18n="Offline"></li>\n' +
+' </ul>\n' +
+' </div>\n' +
+' </div>\n' +
+' <div id="jsxc_toggleRoster"></div>\n' +
+'</div>\n' +
+'';
+
+jsxc.gui.template['rosterBuddy'] = '<li>\n' +
+' <div class="jsxc_avatar">☺</div>\n' +
+' <div class="jsxc_control"></div>\n' +
+' <div class="jsxc_unread" />\n' +
+' <div class="jsxc_name" />\n' +
+' <div class="jsxc_options jsxc_right">\n' +
+' <div class="jsxc_rename" data-i18n="[title]rename_buddy">✎</div>\n' +
+' <div class="jsxc_delete" data-i18n="[title]delete_buddy">✘</div>\n' +
+' </div>\n' +
+' <div class="jsxc_options jsxc_left">\n' +
+' <div class="jsxc_chaticon" data-i18n="[title]send_message" />\n' +
+' <div class="jsxc_vcardicon" data-i18n="[title]get_info">i</div>\n' +
+' </div>\n' +
+'</li>\n' +
+'';
+
+jsxc.gui.template['selectionDialog'] = '<h3></h3>\n' +
+'<p></p>\n' +
+'\n' +
+'<button class="btn btn-primary pull-right jsxc_close" data-i18n="Confirm"></button>\n' +
+'<button class="btn btn-default pull-right jsxc_close" data-i18n="Dismiss"></button>\n' +
+'';
+
+jsxc.gui.template['settings'] = '<form class="form-horizontal">\n' +
+' <fieldset class="jsxc_fieldsetXmpp jsxc_fieldset">\n' +
+' <legend data-i18n="Login_options"></legend>\n' +
+' <div class="form-group">\n' +
+' <label class="col-sm-6 control-label" for="xmpp-url" data-i18n="BOSH_url"></label>\n' +
+' <div class="col-sm-6">\n' +
+' <input type="text" id="xmpp-url" class="form-control" readonly="readonly" />\n' +
+' </div>\n' +
+' </div>\n' +
+' <div class="form-group">\n' +
+' <label class="col-sm-6 control-label" for="xmpp-username" data-i18n="Username"></label>\n' +
+' <div class="col-sm-6">\n' +
+' <input type="text" id="xmpp-username" class="form-control" />\n' +
+' </div>\n' +
+' </div>\n' +
+' <div class="form-group">\n' +
+' <label class="col-sm-6 control-label" for="xmpp-domain" data-i18n="Domain"></label>\n' +
+' <div class="col-sm-6">\n' +
+' <input type="text" id="xmpp-domain" class="form-control" />\n' +
+' </div>\n' +
+' </div>\n' +
+' <div class="form-group">\n' +
+' <label class="col-sm-6 control-label" for="xmpp-resource" data-i18n="Resource"></label>\n' +
+' <div class="col-sm-6">\n' +
+' <input class="form-control" type="text" id="xmpp-resource" class="form-control" />\n' +
+' </div>\n' +
+' </div>\n' +
+' <div class="form-group">\n' +
+' <div class="col-sm-offset-6 col-sm-6">\n' +
+' <button class="btn btn-primary jsxc_continue" type="submit" data-i18n="Save"></button>\n' +
+' </div>\n' +
+' </div>\n' +
+' </fieldset>\n' +
+'</form>\n' +
+'\n' +
+'<form class="form-horizontal">\n' +
+' <fieldset class="jsxc_fieldsetLoginForm jsxc_fieldset">\n' +
+' <legend data-i18n="On_login"></legend>\n' +
+' <div class="form-group">\n' +
+' <div class="col-sm-offset-6 col-sm-6">\n' +
+' <div class="checkbox">\n' +
+' <label>\n' +
+' <input type="checkbox" id="loginForm-enable"><span data-i18n="On_login"></span>\n' +
+' </label>\n' +
+' </div>\n' +
+' </div>\n' +
+' </div>\n' +
+' <div class="form-group">\n' +
+' <div class="col-sm-offset-6 col-sm-6">\n' +
+' <button class="btn btn-primary jsxc_continue" type="submit" data-i18n="Save"></button>\n' +
+' </div>\n' +
+' </div>\n' +
+' </fieldset>\n' +
+'</form>\n' +
+'\n' +
+'<form class="form-horizontal">\n' +
+' <fieldset class="jsxc_fieldsetPriority jsxc_fieldset">\n' +
+' <legend data-i18n="Priority"></legend>\n' +
+' <div class="form-group">\n' +
+' <label class="col-sm-6 control-label" for="priority-online" data-i18n="Online"></label>\n' +
+' <div class="col-sm-6">\n' +
+' <input type="number" value="0" id="priority-online" class="form-control" min="-128" max="127" step="1" required="required" />\n' +
+' </div>\n' +
+' </div>\n' +
+' <div class="form-group">\n' +
+' <label class="col-sm-6 control-label" for="priority-chat" data-i18n="Chatty"></label>\n' +
+' <div class="col-sm-6">\n' +
+' <input type="number" value="0" id="priority-chat" class="form-control" min="-128" max="127" step="1" required="required" />\n' +
+' </div>\n' +
+' </div>\n' +
+' <div class="form-group">\n' +
+' <label class="col-sm-6 control-label" for="priority-away" data-i18n="Away"></label>\n' +
+' <div class="col-sm-6">\n' +
+' <input type="number" value="0" id="priority-away" class="form-control" min="-128" max="127" step="1" required="required" />\n' +
+' </div>\n' +
+' </div>\n' +
+' <div class="form-group">\n' +
+' <label class="col-sm-6 control-label" for="priority-xa" data-i18n="Extended_away"></label>\n' +
+' <div class="col-sm-6">\n' +
+' <input type="number" value="0" id="priority-xa" class="form-control" min="-128" max="127" step="1" required="required" />\n' +
+' </div>\n' +
+' </div>\n' +
+' <div class="form-group">\n' +
+' <label class="col-sm-6 control-label" for="priority-dnd" data-i18n="dnd"></label>\n' +
+' <div class="col-sm-6">\n' +
+' <input type="number" value="0" id="priority-dnd" class="form-control" min="-128" max="127" step="1" required="required" />\n' +
+' </div>\n' +
+' </div>\n' +
+' <div class="form-group">\n' +
+' <div class="col-sm-offset-6 col-sm-6">\n' +
+' <button class="btn btn-primary jsxc_continue" type="submit" data-i18n="Save"></button>\n' +
+' </div>\n' +
+' </div>\n' +
+' </fieldset>\n' +
+'</form>\n' +
+'\n' +
+'<form class="form-horizontal" data-onsubmit="xmpp.carbons.refresh">\n' +
+' <fieldset class="jsxc_fieldsetCarbons jsxc_fieldset">\n' +
+' <legend data-i18n="Carbon_copy"></legend>\n' +
+' <div class="form-group">\n' +
+' <div class="col-sm-offset-6 col-sm-6">\n' +
+' <div class="checkbox">\n' +
+' <label>\n' +
+' <input type="checkbox" id="carbons-enable"><span data-i18n="Enable"></span>\n' +
+' </label>\n' +
+' </div>\n' +
+' </div>\n' +
+' </div>\n' +
+' <div class="form-group">\n' +
+' <div class="col-sm-offset-6 col-sm-6">\n' +
+' <button class="btn btn-primary jsxc_continue" type="submit" data-i18n="Save"></button>\n' +
+' </div>\n' +
+' </div>\n' +
+' </fieldset>\n' +
+'</form>\n' +
+'';
+
+jsxc.gui.template['vCard'] = '<h3>\n' +
+' <span data-i18n="Info_about"></span> <span>{{bid_name}}</span>\n' +
+'</h3>\n' +
+'<ul class="jsxc_vCard"></ul>\n' +
+'<p>\n' +
+' <img src="{{root}}/img/loading.gif" alt="wait" width="32px" height="32px" /> <span data-i18n="Please_wait"></span>...\n' +
+'</p>\n' +
+'';
+
+jsxc.gui.template['videoWindow'] = '<div class="jsxc_webrtc">\n' +
+' <div class="jsxc_chatarea">\n' +
+' <ul></ul>\n' +
+' </div>\n' +
+' <div class="jsxc_videoContainer">\n' +
+' <video class="jsxc_localvideo" autoplay></video>\n' +
+' <video class="jsxc_remotevideo" autoplay></video>\n' +
+' <div class="jsxc_status"></div>\n' +
+' <div class="bubblingG">\n' +
+' <span id="bubblingG_1"> </span> <span id="bubblingG_2"> </span> <span id="bubblingG_3"> </span>\n' +
+' </div>\n' +
+' <div class="jsxc_noRemoteVideo">\n' +
+' <div>\n' +
+' <div></div>\n' +
+' <p data-i18n="No_video_signal"></p>\n' +
+' <div></div>\n' +
+' </div>\n' +
+' </div>\n' +
+' </div>\n' +
+' <div class="jsxc_controlbar">\n' +
+' <button class="btn btn-default jsxc_showchat" data-i18n="chat"></button>\n' +
+' <button class="btn btn-primary jsxc_hangUp" data-i18n="hang_up"></button>\n' +
+' <input type="range" class="jsxc_volume" min="0.0" max="1.0" step="0.05" value="0.5" style="width: 150px" />\n' +
+' <div class="btn-group">\n' +
+' <button class="btn btn-default jsxc_snapshot" data-i18n="snapshot"></button>\n' +
+' <button class="btn btn-default jsxc_snapshots">&#9660;</button>\n' +
+' </div>\n' +
+' <!-- <button type="button" class="jsxc_mute_local" data-i18n="mute_my_audio"></button>\n' +
+' <button type="button" class="jsxc_pause_local" data-i18n="pause_my_video"></button> -->\n' +
+' <button class="btn btn-default jsxc_fullscreen" data-i18n="fullscreen"></button>\n' +
+' <button class="btn btn-default jsxc_info" data-i18n="Info"></button>\n' +
+'\n' +
+' </div>\n' +
+' <div class="jsxc_multi">\n' +
+' <div class="jsxc_snapshotbar">\n' +
+' <p>No pictures yet!</p>\n' +
+' </div>\n' +
+' <!--<div class="jsxc_chatarea">\n' +
+' <ul></ul>\n' +
+' </div>-->\n' +
+' <div class="jsxc_infobar"></div>\n' +
+' </div>\n' +
+'</div>\n' +
+'';
+
+jsxc.gui.template['waitAlert'] = '<h3>{{msg}}</h3>\n' +
+'\n' +
+'<div class="progress">\n' +
+' <div class="progress-bar progress-bar-striped active" style="width: 100%" data-i18n="Please_wait">\n' +
+' </div>\n' +
+'</div>\n' +
+'';
+
+jsxc.gui.template['windowList'] = '<div id="jsxc_windowList">\n' +
+' <ul></ul>\n' +
+'</div>\n' +
+'<div id="jsxc_windowListSB">\n' +
+' <div class="jsxc_scrollLeft jsxc_disabled">&lt;</div>\n' +
+' <div class="jsxc_scrollRight jsxc_disabled">&gt;</div>\n' +
+'</div>\n' +
+'';
+
}(jQuery)); \ No newline at end of file
diff --git a/build/js/jsxc/jsxc.min.js b/build/js/jsxc/jsxc.min.js
index d1f9f35..b44b65a 100644
--- a/build/js/jsxc/jsxc.min.js
+++ b/build/js/jsxc/jsxc.min.js
@@ -1,5 +1,5 @@
/*!
- * jsxc v2.0.1 - 2015-05-23
+ * jsxc v2.1.0-beta1 - 2015-07-21
*
* Copyright (c) 2015 Klaus Herberth <klaus@jsxc.org> <br>
* Released under the MIT license
@@ -7,13 +7,13 @@
* Please see http://www.jsxc.org/
*
* @author Klaus Herberth <klaus@jsxc.org>
- * @version 2.0.1
+ * @version 2.1.0-beta1
* @license MIT
*/
/*! This file is concatenated for the browser. */
-var jsxc=null,RTC=null,RTCPeerconnection=null;!function($){"use strict";jsxc={version:"2.0.1",master:!1,role_allocation:!1,to:null,toBusy:null,toNotification:null,toNotificationDelay:500,keepalive:null,restore:!1,restoreCompleted:!1,triggeredFromBox:!1,triggeredFromElement:!1,triggeredFromLogout:!1,ls:[],storageNotConform:null,toSNC:null,bid:null,CONST:{NOTIFICATION_DEFAULT:"default",NOTIFICATION_GRANTED:"granted",NOTIFICATION_DENIED:"denied",STATUS:["offline","dnd","xa","away","chat","online"],SOUNDS:{MSG:"incomingMessage.wav",CALL:"Rotary-Phone6.mp3",NOTICE:"Ping1.mp3"},REGEX:{JID:new RegExp("\\b[^\"&'\\/:<>@\\s]+@[\\w-_.]+\\b","ig"),URL:new RegExp(/((?:https?:\/\/|www\.|([\w\-]+\.[a-zA-Z]{2,3})(?=\b))(?:(?:[\-A-Za-z0-9+&@#\/%?=~_|!:,.;]*\([\-A-Za-z0-9+&@#\/%?=~_|!:,.;]*\)([\-A-Za-z0-9+&@#\/%?=~_|!:,.;]*[\-A-Za-z0-9+&@#\/%=~_|])?)|(?:[\-A-Za-z0-9+&@#\/%?=~_|!:,.;]*[\-A-Za-z0-9+&@#\/%=~_|]))?)/gi)},NS:{CARBONS:"urn:xmpp:carbons:2",FORWARD:"urn:xmpp:forward:0"}},getFormattedTime:function(unixtime){var msgDate=new Date(parseInt(unixtime)),date=("0"+msgDate.getDate()).slice(-2),month=("0"+(msgDate.getMonth()+1)).slice(-2),year=msgDate.getFullYear(),hours=("0"+msgDate.getHours()).slice(-2),minutes=("0"+msgDate.getMinutes()).slice(-2),dateNow=new Date,time=hours+":"+minutes;return dateNow.setHours(0,0,0,0),msgDate.setHours(0,0,0,0),dateNow.getTime()!==msgDate.getTime()?date+"."+month+"."+year+" "+time:time},debug:function(msg,data,level){if(level&&(msg="["+level+"] "+msg),data){jsxc.storage.getItem("debug")===!0&&console.log(msg,data);var d;try{d=$("<span>").prepend($(data).clone()).html()}catch(err){try{d=JSON.stringify(data)}catch(err2){d="see js console"}}jsxc.log=jsxc.log+msg+": "+d+"\n"}else console.log(msg),jsxc.log=jsxc.log+msg+"\n"},warn:function(msg,data){jsxc.debug(msg,data,"WARN")},error:function(msg,data){jsxc.debug(msg,data,"ERROR")},log:"",init:function(options){if(options&&$.extend(!0,jsxc.options,options),"undefined"==typeof localStorage)return void jsxc.warn("Browser doesn't support localStorage.");jsxc.options.get=function(key){var local=jsxc.storage.getUserItem("options")||{};return local[key]||jsxc.options[key]},jsxc.options.set=function(key,value){jsxc.storage.updateItem("options",key,value,!0)},jsxc.storageNotConform=jsxc.storage.getItem("storageNotConform"),null===jsxc.storageNotConform&&(jsxc.storageNotConform=2);var lang;lang=null!==jsxc.storage.getItem("lang")?jsxc.storage.getItem("lang"):jsxc.options.autoLang&&navigator.language?navigator.language.substr(0,2):jsxc.options.defaultLang,$.i18n.init({lng:lang,fallbackLng:"en",resStore:I18next,useLocalStorage:!0,localStorageExpirationTime:864e5}),jsxc.storage.getItem("debug")===!0&&(jsxc.options.otr.debug=!0),window.addEventListener("storage",jsxc.storage.onStorage,!1);var lastActivity=jsxc.storage.getItem("lastActivity")||0;if((new Date).getTime()-lastActivity<jsxc.options.loginTimeout&&(jsxc.restore=!0),$(document).on("connectionReady.jsxc",function(){if(null!==jsxc.options.logoutElement&&jsxc.options.logoutElement.length>0){var logout=function(){return jsxc.options.logoutElement=$(this),jsxc.triggeredFromLogout=!0,jsxc.xmpp.logout()};jsxc.options.logoutElement.off("click",null,logout).one("click",logout)}}),jsxc.storage.getItem("rid")&&jsxc.storage.getItem("sid")&&jsxc.restore)jsxc.bid=jsxc.jidToBid(jsxc.storage.getItem("jid")),jsxc.gui.init(),"undefined"!=typeof jsxc.storage.getItem("alive")&&jsxc.restore?jsxc.checkMaster():jsxc.onMaster();else{if(jsxc.storage.removeItem("rid"),jsxc.storage.removeItem("sid"),!jsxc.options.loginForm.form||!(jsxc.el_exists(jsxc.options.loginForm.form)&&jsxc.el_exists(jsxc.options.loginForm.jid)&&jsxc.el_exists(jsxc.options.loginForm.pass)))return void(jsxc.options.displayRosterMinimized()&&(jsxc.storage.setUserItem("roster","hidden"),jsxc.gui.roster.init(),jsxc.gui.roster.noConnection()));"function"==typeof jsxc.options.formFound&&jsxc.options.formFound.call();var form=jsxc.options.loginForm.form=$(jsxc.options.loginForm.form),events=form.data("events")||{submit:[]},submits=[];$.each(events.submit,function(index,val){submits.push(val.handler)}),form.data("submits",submits),form.off("submit"),form.submit(function(){var settings=jsxc.prepareLogin();return settings===!1||"true"!==settings.xmpp.onlogin&&settings.xmpp.onlogin!==!0?!0:(jsxc.options.loginForm.triggered=!0,jsxc.xmpp.login(),!1)})}},prepareLogin:function(){var username=$(jsxc.options.loginForm.jid).val(),password=$(jsxc.options.loginForm.pass).val();if("function"!=typeof jsxc.options.loadSettings)return void jsxc.error("No loadSettings function given. Abort.");jsxc.triggeredFromBox||"dialog"!==jsxc.options.loginForm.onConnecting&&"undefined"!=typeof jsxc.options.loginForm.onConnecting||jsxc.gui.showWaitAlert($.t("Logging_in"));var settings=jsxc.options.loadSettings.call(this,username,password);if(settings===!1||null===settings||"undefined"==typeof settings)return jsxc.warn("No settings provided"),!1;settings=$.extend(!0,{},settings),"string"==typeof settings.xmpp.username&&(username=settings.xmpp.username);var jid,resource=settings.xmpp.resource?"/"+settings.xmpp.resource:"",domain=settings.xmpp.domain;return jid=username.match(/@(.*)$/)?username.match(/\/(.*)$/)?username:username+resource:username+"@"+domain+resource,"function"==typeof jsxc.options.loginForm.preJid&&(jid=jsxc.options.loginForm.preJid(jid)),jsxc.bid=jsxc.jidToBid(jid),settings.xmpp.username=jid.split("@")[0],settings.xmpp.domain=jid.split("@")[1].split("/")[0],settings.xmpp.resource=jid.split("@")[1].split("/")[1]||"",$.each(settings,function(key,val){jsxc.options.set(key,val)}),jsxc.options.xmpp.jid=jid,jsxc.options.xmpp.password=password,settings},onSlave:function(){jsxc.debug("I am the slave."),jsxc.role_allocation=!0,jsxc.restoreRoster(),jsxc.restoreWindows(),jsxc.restoreCompleted=!0,$(document).trigger("restoreCompleted.jsxc")},onMaster:function(){jsxc.debug("I am master."),jsxc.master=!0,jsxc.storage.setItem("alive",0),jsxc.storage.setItem("alive_busy",0),jsxc.storage.getUserItem("windowlist")||jsxc.storage.setUserItem("windowlist",[]),jsxc.startKeepAlive(),jsxc.options.get("otr").enable?jsxc.otr.createDSA():jsxc._onMaster()},_onMaster:function(){if(jsxc.role_allocation&&$.each(jsxc.storage.getUserItem("windowlist"),function(index,val){jsxc.otr.create(val)}),jsxc.role_allocation=!0,jsxc.restore&&!jsxc.restoreCompleted&&(jsxc.restoreRoster(),jsxc.restoreWindows(),jsxc.restoreCompleted=!0,$(document).trigger("restoreCompleted.jsxc")),jsxc.restore){var noti=jsxc.storage.getUserItem("notification");noti="number"==typeof noti?noti:2,jsxc.options.notification&&noti>0&&jsxc.notification.hasSupport()?jsxc.notification.hasPermission()?jsxc.notification.init():jsxc.notification.prepareRequest():jsxc.options.notification=!1}$(document).on("connectionReady.jsxc",function(){jsxc.gui.updateAvatar($("#jsxc_avatar"),jsxc.jidToBid(jsxc.storage.getItem("jid")),"own")}),jsxc.xmpp.login()},checkMaster:function(){jsxc.debug("check master"),jsxc.to=window.setTimeout(jsxc.onMaster,1e3),jsxc.storage.ink("alive")},startKeepAlive:function(){jsxc.keepalive=window.setInterval(jsxc.keepAlive,jsxc.options.timeout-1e3)},keepAlive:function(){jsxc.storage.ink("alive"),jsxc.role_allocation&&jsxc.storage.setItem("lastActivity",(new Date).getTime())},keepBusyAlive:function(){jsxc.toBusy&&window.clearTimeout(jsxc.toBusy),jsxc.keepalive&&window.clearInterval(jsxc.keepalive),jsxc.storage.ink("alive_busy"),jsxc.toBusy=window.setTimeout(jsxc.startKeepAlive,jsxc.options.busyTimeout-1e3)},random:function(max){return Math.floor(Math.random()*max)},el_exists:function(selector){return $(selector).length>0},jidToCid:function(jid){jsxc.warn("jsxc.jidToCid is deprecated!");var cid=Strophe.getBareJidFromJid(jid).replace("@","-").replace(/\./g,"-").toLowerCase();return cid},jidToBid:function(jid){return Strophe.getBareJidFromJid(jid).toLowerCase()},restoreRoster:function(){var buddies=jsxc.storage.getUserItem("buddylist");return buddies&&0!==buddies.length?($.each(buddies,function(index,value){jsxc.gui.roster.add(value)}),jsxc.gui.roster.loaded=!0,void $(document).trigger("cloaded.roster.jsxc")):(jsxc.debug("No saved buddylist."),void jsxc.gui.roster.empty())},restoreWindows:function(){var windows=jsxc.storage.getUserItem("windowlist");null!==windows&&$.each(windows,function(index,bid){var window=jsxc.storage.getUserItem("window",bid);return window?(jsxc.gui.window.init(bid),window.minimize?jsxc.gui.window.hide(bid):jsxc.gui.window.show(bid),void jsxc.gui.window.setText(bid,window.text)):(jsxc.debug("Associated window-element is missing: "+bid),!0)})},submitLoginForm:function(){var form=jsxc.options.loginForm.form.off("submit"),submits=form.data("submits")||[];$.each(submits,function(index,val){form.submit(val)}),form.find("#submit").length>0?form.find("#submit").click():form.submit()},escapeHTML:function(text){return text=text.replace(/&amp;/g,"&").replace(/&lt;/g,"<").replace(/&gt;/g,">"),text.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;")},removeHTML:function(text){return $("<span>").html(text).text()},switchEvents:function(obj){var ns=Math.random().toString(36).substr(2,12),self=this;return $.each(obj,function(key,val){$(document).one(key+"."+ns,function(){$(document).off("."+ns),val.apply(self,arguments)})}),ns},isHidden:function(){var hidden=!1;return"undefined"!=typeof document.hidden?hidden=document.hidden:"undefined"!=typeof document.webkitHidden?hidden=document.webkitHidden:"undefined"!=typeof document.mozHidden?hidden=document.mozHidden:"undefined"!=typeof document.msHidden&&(hidden=document.msHidden),hidden&&jsxc.master?jsxc.storage.ink("hidden",0):hidden||jsxc.master||jsxc.storage.ink("hidden"),hidden},hasFocus:function(){var focus=!0;return"function"==typeof document.hasFocus&&(focus=document.hasFocus()),!focus&&jsxc.master?jsxc.storage.ink("focus",0):focus&&!jsxc.master&&jsxc.storage.ink("focus"),focus},exec:function(fnName,fnParams){var i,fnList=fnName.split("."),fn=jsxc[fnList[0]];for(i=1;i<fnList.length;i++)fn=fn[fnList[i]];return"function"==typeof fn?fn.apply(null,fnParams):void 0},hashStr:function(str){var i,hash=0;if(0===str.length)return hash;for(i=0;i<str.length;i++)hash=(hash<<5)-hash+str.charCodeAt(i),hash|=0;return hash}},jsxc.gui={emotions:[["O:-) O:)","angel"],[">:-( >:( &gt;:-( &gt;:(","angry"],[":-) :)","smile"],[":-D :D","grin"],[":-( :(","sad"],[";-) ;)","wink"],[":-P :P","tonguesmile"],["=-O","surprised"],[":kiss: :-*","kiss"],["8-) :cool:","sunglassess"],[":'-( :'( :&amp;apos;-(","crysad"],[":-/","doubt"],[":-X :X","zip"],[":yes:","thumbsup"],[":no:","thumbsdown"],[":beer:","beer"],[":devil:","devil"],[":kiss: :kissing:","kissing"],["@->-- :rose: @-&gt;--","rose"],[":music:","music"],[":love:","love"],[":zzz:","tired"]],queryActions:{message:function(jid,params){var win=jsxc.gui.window.open(jsxc.jidToBid(jid));params&&"string"==typeof params.body&&win.find(".jsxc_textinput").val(params.body)},remove:function(jid){jsxc.gui.showRemoveDialog(jsxc.jidToBid(jid))},subscribe:function(jid,params){jsxc.gui.showContactDialog(jid),params&&$("#jsxc_alias").val(params.name)},vcard:function(jid){jsxc.gui.showVcard(jid)}},init:function(){$("#jsxc_windowList").length>0||($("body").append($(jsxc.gui.template.get("windowList"))),$(window).resize(jsxc.gui.updateWindowListSB),$("#jsxc_windowList").resize(jsxc.gui.updateWindowListSB),$("#jsxc_windowListSB .jsxc_scrollLeft").click(function(){jsxc.gui.scrollWindowListBy(-200)}),$("#jsxc_windowListSB .jsxc_scrollRight").click(function(){jsxc.gui.scrollWindowListBy(200)}),$("#jsxc_windowList").on("wheel",function(ev){$("#jsxc_windowList").data("isOver")&&jsxc.gui.scrollWindowListBy(ev.originalEvent.wheelDelta>0?200:-200)}),jsxc.gui.tooltip("#jsxc_windowList"),jsxc.el_exists("#jsxc_roster")||jsxc.gui.roster.init(),$.each(jsxc.gui.emotions,function(i,val){var reg=val[0].replace(/(\/|\||\*|\.|\+|\?|\^|\$|\(|\)|\[|\]|\{|\})/g,"\\$1");reg="("+reg.split(" ").join("|")+")",jsxc.gui.emotions[i][2]=new RegExp(reg,"g")}),jsxc.gui.windowTemplate=$(jsxc.gui.template.get("chatWindow")),jsxc.gui.buddyTemplate=$(jsxc.gui.template.get("rosterBuddy")))},tooltip:function(selector){$(selector).tooltip({show:{delay:600},content:function(){return $(this).attr("title").replace(/\n/g,"<br />")}})},update:function(bid){var data=jsxc.storage.getUserItem("buddy",bid);if(!data)return void jsxc.debug("No data for "+bid);var ri=jsxc.gui.roster.getItem(bid),we=jsxc.gui.window.get(bid),ue=ri.add(we),spot=$('.jsxc_spot[data-bid="'+bid+'"]');switch(ri.data(data),ue.add(spot).removeClass("jsxc_"+jsxc.CONST.STATUS.join(" jsxc_")).addClass("jsxc_"+jsxc.CONST.STATUS[data.status]),ue.find(".jsxc_name:first").add(spot).text(data.name).attr("title",$.t("is")+" "+jsxc.CONST.STATUS[data.status]),data.msgstate){case 0:we.find(".jsxc_transfer").removeClass("jsxc_enc jsxc_fin").attr("title",$.t("your_connection_is_unencrypted")),we.find(".jsxc_settings .jsxc_verification").addClass("jsxc_disabled"),we.find(".jsxc_settings .jsxc_transfer").text($.t("start_private"));break;case 1:we.find(".jsxc_transfer").addClass("jsxc_enc").attr("title",$.t("your_connection_is_encrypted")),we.find(".jsxc_settings .jsxc_verification").removeClass("jsxc_disabled"),we.find(".jsxc_settings .jsxc_transfer").text($.t("close_private"));break;case 2:we.find(".jsxc_settings .jsxc_verification").addClass("jsxc_disabled"),we.find(".jsxc_transfer").removeClass("jsxc_enc").addClass("jsxc_fin").attr("title",$.t("your_buddy_closed_the_private_connection")),we.find(".jsxc_settings .jsxc_transfer").text($.t("close_private"))}data.trust?we.find(".jsxc_transfer").addClass("jsxc_trust").attr("title",$.t("your_buddy_is_verificated")):we.find(".jsxc_transfer").removeClass("jsxc_trust"),data.sub&&"both"!==data.sub?ue.addClass("jsxc_oneway"):ue.removeClass("jsxc_oneway");var info="<b>"+Strophe.getBareJidFromJid(data.jid)+"</b>\n";info+=$.t("Subscription")+": "+$.t(data.sub)+"\n",info+=$.t("Status")+": "+$.t(jsxc.CONST.STATUS[data.status]),ri.find(".jsxc_name").attr("title",info),jsxc.gui.updateAvatar(ri.add(we.find(".jsxc_bar")),data.jid,data.avatar)},updateAvatar:function(el,jid,aid){var setAvatar=function(src){return 0===src||"0"===src?"function"==typeof jsxc.options.defaultAvatar?void jsxc.options.defaultAvatar.call(el,jid):void jsxc.gui.avatarPlaceholder(el.find(".jsxc_avatar"),jid):(el.find(".jsxc_avatar").removeAttr("style"),void el.find(".jsxc_avatar").css({"background-image":"url("+src+")","text-indent":"999px"}))};if("undefined"==typeof aid)return void setAvatar(0);var avatarSrc=jsxc.storage.getUserItem("avatar",aid);null!==avatarSrc?setAvatar(avatarSrc):jsxc.xmpp.conn.vcard.get(function(stanza){jsxc.debug("vCard",stanza);var src,vCard=$(stanza).find("vCard > PHOTO");if(0===vCard.length)jsxc.debug("No photo provided"),src="0";else if(vCard.find("EXTVAL").length>0)src=vCard.find("EXTVAL").text();else{var img=vCard.find("BINVAL").text(),type=vCard.find("TYPE").text();src="data:"+type+";base64,"+img}src=src.replace(/[\t\r\n\f]/gi,""),jsxc.storage.setUserItem("avatar",aid,src),setAvatar(src)},Strophe.getBareJidFromJid(jid),function(msg){jsxc.warn("Could not load vcard.",msg),jsxc.storage.setUserItem("avatar",aid,0),setAvatar(0)})},updateWindowListSB:function(){$("#jsxc_windowList>ul").width()>$("#jsxc_windowList").width()?$("#jsxc_windowListSB > div").removeClass("jsxc_disabled"):($("#jsxc_windowListSB > div").addClass("jsxc_disabled"),$("#jsxc_windowList>ul").css("right","0px"))},scrollWindowListBy:function(offset){var scrollWidth=$("#jsxc_windowList>ul").width(),width=$("#jsxc_windowList").width(),el=$("#jsxc_windowList>ul"),right=parseInt(el.css("right"))-offset,padding=$("#jsxc_windowListSB").width();width>scrollWidth||(right>0&&(right=0),width-scrollWidth-padding>right&&(right=width-scrollWidth-padding),el.css("right",right+"px"))},getWindow:function(bid){return jsxc.warn("jsxc.gui.getWindow is deprecated!"),jsxc.gui.window.get(bid)},toggleList:function(){var self=$(this);self.disableSelection();var ul=self.find("ul"),slideUp=null;slideUp=function(){ul.slideUp({complete:function(){self.removeClass("jsxc_opened")}}),$("body").off("click",null,slideUp)},$(this).click(function(){return ul.is(":hidden")?($("body").click(),$("body").one("click",slideUp)):$("body").off("click",null,slideUp),ul.slideToggle(),window.clearTimeout(ul.data("timer")),self.toggleClass("jsxc_opened"),!1}).mouseleave(function(){ul.data("timer",window.setTimeout(slideUp,2e3))}).mouseenter(function(){window.clearTimeout(ul.data("timer"))})},showLoginBox:function(){function onAuthFail(){alert.show(),jsxc.gui.dialog.resize(),$("#jsxc_dialog").find("button").trigger("btnfinished.jsxc"),$("#jsxc_dialog").find("input").one("keypress",function(){alert.hide(),jsxc.gui.dialog.resize()})}$(document).on("complete.dialog.jsxc",function(){$("#jsxc_password").focus()}),jsxc.gui.dialog.open(jsxc.gui.template.get("loginBox"));var alert=$("#jsxc_dialog").find(".jsxc_alert");alert.hide(),$("#jsxc_dialog").find("form").submit(function(ev){ev.preventDefault(),$(this).find("button[data-jsxc-loading-text]").trigger("btnloading.jsxc"),jsxc.options.loginForm.form=$(this),jsxc.options.loginForm.jid=$(this).find("#jsxc_username"),jsxc.options.loginForm.pass=$(this).find("#jsxc_password"),jsxc.triggeredFromBox=!0,jsxc.options.loginForm.triggered=!1;var settings=jsxc.prepareLogin();settings===!1?onAuthFail():($(document).on("authfail.jsxc",onAuthFail),jsxc.xmpp.login())})},showFingerprints:function(bid){jsxc.gui.dialog.open(jsxc.gui.template.get("fingerprintsDialog",bid))},showVerification:function(bid){return $("#jsxc_dialog").length>0?void setTimeout(function(){jsxc.gui.showVerification(bid)},3e3):jsxc.storage.getUserItem("buddy",bid).msgstate!==OTR.CONST.MSGSTATE_ENCRYPTED?void jsxc.warn("Connection not encrypted"):(jsxc.gui.dialog.open(jsxc.gui.template.get("authenticationDialog",bid)),$("#jsxc_dialog > div:gt(0)").hide(),$("#jsxc_dialog select").change(function(){$("#jsxc_dialog > div:gt(0)").hide(),$("#jsxc_dialog > div:eq("+$(this).prop("selectedIndex")+")").slideDown({complete:function(){jsxc.gui.dialog.resize()}})}),$("#jsxc_dialog > div:eq(1) a.creation").click(function(){jsxc.master&&(jsxc.otr.objects[bid].trust=!0),jsxc.storage.updateUserItem("buddy",bid,"trust",!0),jsxc.gui.dialog.close(),jsxc.storage.updateUserItem("buddy",bid,"trust",!0),jsxc.gui.window.postMessage(bid,"sys",$.t("conversation_is_now_verified")),jsxc.gui.update(bid)}),$("#jsxc_dialog > div:eq(2) a.creation").click(function(){var div=$("#jsxc_dialog > div:eq(2)"),sec=div.find("#jsxc_secret2").val(),quest=div.find("#jsxc_quest").val();return""===sec||""===quest?void div.find('input[value=""]').addClass("jsxc_invalid").keyup(function(){$(this).val().match(/.*/)&&$(this).removeClass("jsxc_invalid")}):(jsxc.master?jsxc.otr.sendSmpReq(bid,sec,quest):jsxc.storage.setUserItem("smp_"+bid,{sec:sec,quest:quest}),jsxc.gui.dialog.close(),void jsxc.gui.window.postMessage(bid,"sys",$.t("authentication_query_sent")))}),void $("#jsxc_dialog > div:eq(3) .creation").click(function(){var div=$("#jsxc_dialog > div:eq(3)"),sec=div.find("#jsxc_secret").val();return""===sec?void div.find("#jsxc_secret").addClass("jsxc_invalid").keyup(function(){$(this).val().match(/.*/)&&$(this).removeClass("jsxc_invalid")}):(jsxc.master?jsxc.otr.sendSmpReq(bid,sec):jsxc.storage.setUserItem("smp_"+bid,{sec:sec,quest:null}),jsxc.gui.dialog.close(),void jsxc.gui.window.postMessage(bid,"sys",$.t("authentication_query_sent")))}))},showApproveDialog:function(from){jsxc.gui.dialog.open(jsxc.gui.template.get("approveDialog"),{noClose:!0}),$("#jsxc_dialog .jsxc_their_jid").text(Strophe.getBareJidFromJid(from)),$("#jsxc_dialog .jsxc_deny").click(function(ev){ev.stopPropagation(),jsxc.xmpp.resFriendReq(from,!1),jsxc.gui.dialog.close()}),$("#jsxc_dialog .jsxc_approve").click(function(ev){ev.stopPropagation();var data=jsxc.storage.getUserItem("buddy",jsxc.jidToBid(from));jsxc.xmpp.resFriendReq(from,!0),data&&"from"!==data.sub||$(document).one("close.dialog.jsxc",function(){jsxc.gui.showContactDialog(from)}),jsxc.gui.dialog.close()})},showContactDialog:function(username){jsxc.gui.dialog.open(jsxc.gui.template.get("contactDialog")),username&&$("#jsxc_username").val(username),$("#jsxc_username").keyup(function(){if("function"==typeof jsxc.options.getUsers){var val=$(this).val();$("#jsxc_userlist").empty(),""!==val&&jsxc.options.getUsers.call(this,val,function(list){$.each(list||{},function(uid,displayname){var option=$("<option>");option.attr("data-username",uid),option.attr("data-alias",displayname),option.attr("value",uid).appendTo("#jsxc_userlist"),uid!==displayname&&option.clone().attr("value",displayname).appendTo("#jsxc_userlist")})})}}),$("#jsxc_username").on("input",function(){var val=$(this).val(),option=$("#jsxc_userlist").find('option[data-username="'+val+'"], option[data-alias="'+val+'"]');option.length>0&&($("#jsxc_username").val(option.attr("data-username")),$("#jsxc_alias").val(option.attr("data-alias")))}),$("#jsxc_dialog form").submit(function(){var username=$("#jsxc_username").val(),alias=$("#jsxc_alias").val();return username.match(/@(.*)$/)||(username+="@"+Strophe.getDomainFromJid(jsxc.storage.getItem("jid"))),username&&username.match(jsxc.CONST.REGEX.JID)?(jsxc.xmpp.addBuddy(username,alias),jsxc.gui.dialog.close(),!1):($("#jsxc_username").addClass("jsxc_invalid").keyup(function(){$(this).val().match(jsxc.CONST.REGEX.JID)&&$(this).removeClass("jsxc_invalid")}),!1)})},showRemoveDialog:function(bid){jsxc.gui.dialog.open(jsxc.gui.template.get("removeDialog",bid));var data=jsxc.storage.getUserItem("buddy",bid);$("#jsxc_dialog .creation").click(function(ev){ev.stopPropagation(),jsxc.master?jsxc.xmpp.removeBuddy(data.jid):jsxc.storage.setUserItem("deletebuddy",bid,{jid:data.jid}),jsxc.gui.dialog.close()})},showWaitAlert:function(msg){jsxc.gui.dialog.open(jsxc.gui.template.get("waitAlert",null,msg),{noClose:!0})},showAlert:function(msg){jsxc.gui.dialog.open(jsxc.gui.template.get("alert",null,msg))},showAuthFail:function(){jsxc.gui.dialog.open(jsxc.gui.template.get("authFailDialog")),jsxc.options.loginForm.triggered!==!1&&$("#jsxc_dialog .jsxc_cancel").hide(),$("#jsxc_dialog .creation").click(function(){jsxc.gui.dialog.close()}),$("#jsxc_dialog .jsxc_cancel").click(function(){jsxc.submitLoginForm()})},showConfirmDialog:function(msg,confirm,dismiss){jsxc.gui.dialog.open(jsxc.gui.template.get("confirmDialog",null,msg),{noClose:!0}),confirm&&$("#jsxc_dialog .creation").click(confirm),dismiss&&$("#jsxc_dialog .jsxc_cancel").click(dismiss)},showAboutDialog:function(){jsxc.gui.dialog.open(jsxc.gui.template.get("aboutDialog")),$("#jsxc_dialog .jsxc_debuglog").click(function(){jsxc.gui.showDebugLog()})},showDebugLog:function(){var userInfo="<h3>User information</h3>";if(navigator){var key;for(key in navigator)navigator.hasOwnProperty(key)&&"string"==typeof navigator[key]&&(userInfo+="<b>"+key+":</b> "+navigator[key]+"<br />")}window.screen&&(userInfo+="<b>Height:</b> "+window.screen.height+"<br />",userInfo+="<b>Width:</b> "+window.screen.width+"<br />"),userInfo+="<b>jsxc version:</b> "+jsxc.version+"<br />",jsxc.gui.dialog.open('<div class="jsxc_log">'+userInfo+"<h3>Log</h3><pre>"+jsxc.escapeHTML(jsxc.log)+"</pre></div>")},showVcard:function(jid){var bid=jsxc.jidToBid(jid);jsxc.gui.dialog.open(jsxc.gui.template.get("vCard",bid));var data=jsxc.storage.getUserItem("buddy",bid);if(data){var i,j,res,identities,cap,client,identity=null;for(i=0;i<data.res.length;i++){for(res=data.res[i],identities=[],cap=jsxc.xmpp.getCapabilitiesByJid(bid+"/"+res),null!==cap&&null!==cap.identities&&(identities=cap.identities),client="",j=0;j<identities.length;j++)identity=identities[j],"client"===identity.category&&(""!==client&&(client+=",\n"),client+=identity.name+" ("+identity.type+")");var status=jsxc.storage.getUserItem("res",bid)[res];$("#jsxc_dialog ul.jsxc_vCard").append('<li class="jsxc_sep"><strong>'+$.t("Resource")+":</strong> "+res+"</li>"),$("#jsxc_dialog ul.jsxc_vCard").append("<li><strong>"+$.t("Client")+":</strong> "+client+"</li>"),$("#jsxc_dialog ul.jsxc_vCard").append("<li><strong>"+$.t("Status")+":</strong> "+$.t(jsxc.CONST.STATUS[status])+"</li>")}}var printProp=function(el,depth){var content="";return el.each(function(){var item=$(this),children=$(this).children();content+="<li>";var prop=$.t(item[0].tagName);" "!==prop&&(content+="<strong>"+prop+":</strong> "),"PHOTO"===item[0].tagName||(children.length>0?(content+="<ul>",content+=printProp(children,depth+1),content+="</ul>"):""!==item.text()&&(content+=jsxc.escapeHTML(item.text()))),content+="</li>",0===depth&&$("#jsxc_dialog ul.jsxc_vCard").length>0&&($("#jsxc_dialog ul.jsxc_vCard li.jsxc_sep:first").length>0?$("#jsxc_dialog ul.jsxc_vCard li.jsxc_sep:first").before(content):$("#jsxc_dialog ul.jsxc_vCard").append(content),content="")}),depth>0?content:void 0},failedToLoad=function(){if(0!==$("#jsxc_dialog ul.jsxc_vCard").length){$("#jsxc_dialog p").remove();var content="<p>";content+=$.t("Sorry_your_buddy_doesnt_provide_any_information"),content+="</p>",$("#jsxc_dialog").append(content)}};jsxc.xmpp.loadVcard(bid,function(stanza){if(0!==$("#jsxc_dialog ul.jsxc_vCard").length){$("#jsxc_dialog p").remove();var photo=$(stanza).find("vCard > PHOTO");if(photo.length>0){var img=photo.find("BINVAL").text(),type=photo.find("TYPE").text(),src="data:"+type+";base64,"+img;photo.find("EXTVAL").length>0&&(src=photo.find("EXTVAL").text()),src=src.replace(/[\t\r\n\f]/gi,"");var img_el=$('<img class="jsxc_vCard" alt="avatar" />');img_el.attr("src",src),$("#jsxc_dialog h3").before(img_el)}return 0===$(stanza).find("vCard").length||1===$(stanza).find("vcard > *").length&&1===photo.length?void failedToLoad():void printProp($(stanza).find("vcard > *"),0)}},failedToLoad)},showSettings:function(){jsxc.gui.dialog.open(jsxc.gui.template.get("settings")),("false"===jsxc.options.get("xmpp").overwrite||jsxc.options.get("xmpp").overwrite===!1)&&$(".jsxc_fieldsetXmpp").hide(),$("#jsxc_dialog form").each(function(){var self=$(this);self.find('input[type!="submit"]').each(function(){var id=this.id.split("-"),prop=id[0],key=id[1],type=this.type,data=jsxc.options.get(prop);data&&"undefined"!=typeof data[key]&&("checkbox"===type?"false"!==data[key]&&data[key]!==!1&&(this.checked="checked"):$(this).val(data[key]))})}),$("#jsxc_dialog form").submit(function(){var self=$(this),data={};self.find('input[type!="submit"]').each(function(){var val,id=this.id.split("-"),prop=id[0],key=id[1],type=this.type;val="checkbox"===type?this.checked:$(this).val(),data[prop]||(data[prop]={}),data[prop][key]=val}),$.each(data,function(key,val){jsxc.options.set(key,val)});var err=jsxc.options.saveSettinsPermanent.call(this,data);return"string"==typeof self.attr("data-onsubmit")&&jsxc.exec(self.attr("data-onsubmit"),[err]),setTimeout(function(){self.find('input[type="submit"]').effect("highlight",{color:err?"green":"red"},4e3)},200),!1})},showRequestNotification:function(){jsxc.switchEvents({"notificationready.jsxc":function(){jsxc.gui.dialog.close(),jsxc.notification.init(),jsxc.storage.setUserItem("notification",1)},"notificationfailure.jsxc":function(){jsxc.gui.dialog.close(),jsxc.options.notification=!1,jsxc.storage.setUserItem("notification",0)}}),jsxc.gui.showConfirmDialog($.t("Should_we_notify_you_"),function(){jsxc.gui.dialog.open(jsxc.gui.template.get("pleaseAccept"),{noClose:!0}),jsxc.notification.requestPermission()},function(){$(document).trigger("notificationfailure.jsxc")})},showUnknownSender:function(bid){var confirmationText=$.t("You_received_a_message_from_an_unknown_sender")+" ("+bid+"). "+$.t("Do_you_want_to_display_them");jsxc.gui.showConfirmDialog(confirmationText,function(){jsxc.gui.dialog.close(),jsxc.storage.saveBuddy(bid,{jid:bid,name:bid,status:0,sub:"none",res:[]}),jsxc.gui.window.open(bid)},function(){jsxc.storage.removeUserItem("chat",bid)})},changePresence:function(pres,external){external!==!0&&jsxc.storage.setUserItem("presence",pres),jsxc.master&&jsxc.xmpp.sendPres(),$("#jsxc_presence > span").text($("#jsxc_presence > ul .jsxc_"+pres).text()),jsxc.gui.updatePresence("own",pres)},updatePresence:function(bid,pres){"own"===bid&&("dnd"===pres?($("#jsxc_menu .jsxc_muteNotification").addClass("jsxc_disabled"),jsxc.notification.muteSound(!0)):($("#jsxc_menu .jsxc_muteNotification").removeClass("jsxc_disabled"),jsxc.options.get("muteNotification")||jsxc.notification.unmuteSound(!0))),$('.jsxc_presence[data-bid="'+bid+'"]').removeClass("jsxc_"+jsxc.CONST.STATUS.join(" jsxc_")).addClass("jsxc_"+pres)},unreadMsg:function(bid){var win=jsxc.gui.window.get(bid);jsxc.gui.roster.getItem(bid).add(win).addClass("jsxc_unreadMsg"),jsxc.storage.updateUserItem("window",bid,"unread",!0)},readMsg:function(bid){var win=jsxc.gui.window.get(bid);win.hasClass("jsxc_unreadMsg")&&(jsxc.gui.roster.getItem(bid).add(win).removeClass("jsxc_unreadMsg"),jsxc.storage.updateUserItem("window",bid,"unread",!1))},detectUriScheme:function(container){container=$(container?container:"body"),container.find("a[href^='xmpp:']").each(function(){var action,element=$(this),href=element.attr("href").replace(/^xmpp:/,""),jid=href.split("?")[0],params={};if(href.indexOf("?")<0)action="message";else{var pairs=href.substring(href.indexOf("?")+1).split(";");action=pairs[0];var i,key,value;for(i=1;i<pairs.length;i++)key=pairs[i].split("=")[0],value=pairs[i].indexOf("=")>0?pairs[i].substring(pairs[i].indexOf("=")+1):null,params[decodeURIComponent(key)]=decodeURIComponent(value)}"function"==typeof jsxc.gui.queryActions[action]&&(element.addClass("jsxc_uriScheme jsxc_uriScheme_"+action),element.off("click").click(function(ev){return ev.stopPropagation(),jsxc.gui.queryActions[action].call(jsxc,jid,params),!1}))})},detectEmail:function(container){container=$(container?container:"body"),container.find('a[href^="mailto:"]').each(function(){var spot=$("<span>X</span>").addClass("jsxc_spot"),href=$(this).attr("href").replace(/^ *mailto:/,"").trim();if(""!==href&&href!==Strophe.getBareJidFromJid(jsxc.storage.getItem("jid"))){var bid=jsxc.jidToBid(href),self=$(this),s=self.prev();s.hasClass("jsxc_spot")||(s=spot.clone().attr("data-bid",bid),self.before(s)),s.off("click"),jsxc.storage.getUserItem("buddy",bid)?(jsxc.gui.update(bid),s.click(function(){return jsxc.gui.window.open(bid),!1})):s.click(function(){return jsxc.gui.showContactDialog(href),!1})}})},avatarPlaceholder:function(el,seed,text){text=text||seed;var options=jsxc.options.get("avatarplaceholder")||{},hash=jsxc.hashStr(seed),hue=Math.abs(hash)%360,saturation=options.saturation||90,lightness=options.lightness||65;el.css({"background-color":"hsl("+hue+", "+saturation+"%, "+lightness+"%)",color:"#fff","font-weight":"bold","text-align":"center","line-height":el.height()+"px","font-size":.6*el.height()+"px"}),"string"==typeof text&&text.length>0&&el.text(text[0].toUpperCase())}},jsxc.gui.roster={ready:!1,loaded:!1,init:function(){$(jsxc.options.rosterAppend+":first").append($(jsxc.gui.template.get("roster"))),jsxc.options.get("hideOffline")&&($("#jsxc_menu .jsxc_hideOffline").text($.t("Show_offline")),$("#jsxc_buddylist").addClass("jsxc_hideOffline")),$("#jsxc_menu .jsxc_settings").click(function(){jsxc.gui.showSettings()}),$("#jsxc_menu .jsxc_hideOffline").click(function(){var hideOffline=!jsxc.options.get("hideOffline");hideOffline?$("#jsxc_buddylist").addClass("jsxc_hideOffline"):$("#jsxc_buddylist").removeClass("jsxc_hideOffline"),$(this).text($.t(hideOffline?"Show_offline":"Hide_offline")),jsxc.options.set("hideOffline",hideOffline)}),jsxc.options.get("muteNotification")&&jsxc.notification.muteSound(),$("#jsxc_menu .jsxc_muteNotification").click(function(){if("dnd"!==jsxc.storage.getUserItem("presence")){var mute=!jsxc.options.get("muteNotification");mute?jsxc.notification.muteSound():jsxc.notification.unmuteSound()}}),$("#jsxc_roster .jsxc_addBuddy").click(function(){jsxc.gui.showContactDialog()}),$("#jsxc_roster .jsxc_onlineHelp").click(function(){window.open("http://www.jsxc.org/manual.html","onlineHelp")
-}),$("#jsxc_roster .jsxc_about").click(function(){jsxc.gui.showAboutDialog()}),$("#jsxc_toggleRoster").click(function(){jsxc.gui.roster.toggle()}),$("#jsxc_presence > ul > li").click(function(){var self=$(this),pres=self.data("pres");"offline"===pres?jsxc.xmpp.logout(!1):jsxc.gui.changePresence(pres)}),$("#jsxc_buddylist").slimScroll({distance:"3px",height:$("#jsxc_roster").height()-31+"px",width:$("#jsxc_buddylist").width()+"px",color:"#fff",opacity:"0.5"}),$("#jsxc_roster > .jsxc_bottom > div").each(function(){jsxc.gui.toggleList.call($(this))}),"hidden"===jsxc.storage.getUserItem("roster")&&($("#jsxc_roster").css("right","-200px"),$("#jsxc_windowList > ul").css("paddingRight","10px"));var pres=jsxc.storage.getUserItem("presence")||"online";$("#jsxc_presence > span").text($("#jsxc_presence > ul .jsxc_"+pres).text()),jsxc.gui.updatePresence("own",pres),jsxc.gui.tooltip("#jsxc_roster"),jsxc.notice.load(),jsxc.gui.roster.ready=!0,$(document).trigger("ready.roster.jsxc")},add:function(bid){var data=jsxc.storage.getUserItem("buddy",bid),bud=jsxc.gui.buddyTemplate.clone().attr("data-bid",bid).attr("data-type",data.type||"chat");jsxc.gui.roster.insert(bid,bud),bud.click(function(){jsxc.gui.window.open(bid)}),bud.find(".jsxc_chaticon").click(function(){jsxc.gui.window.open(bid)}),bud.find(".jsxc_rename").click(function(){return jsxc.gui.roster.rename(bid),!1}),bud.find(".jsxc_delete").click(function(){return jsxc.gui.showRemoveDialog(bid),!1});var expandClick=function(){return bud.trigger("extra.jsxc"),bud.toggleClass("jsxc_expand"),jsxc.gui.updateAvatar(bud,data.jid,data.avatar),!1};bud.find(".jsxc_control").click(expandClick),bud.dblclick(expandClick),bud.find(".jsxc_vcardicon").click(function(){return jsxc.gui.showVcard(data.jid),!1}),jsxc.gui.update(bid),$("#jsxc_buddylist").slimScroll({scrollTo:"0px"}),$(document).trigger("add.roster.jsxc",[bid,data,bud])},getItem:function(bid){return $("#jsxc_buddylist > li[data-bid='"+bid+"']")},insert:function(bid,li){var data=jsxc.storage.getUserItem("buddy",bid),listElements=$("#jsxc_buddylist > li"),insert=!1,status="both"===data.sub?data.status:-1;listElements.each(function(){var thisStatus="both"===$(this).data("sub")?$(this).data("status"):-1;return $(this).data("name").toLowerCase()>data.name.toLowerCase()&&thisStatus===status||status>thisStatus?($(this).before(li),insert=!0,!1):void 0}),insert||li.appendTo("#jsxc_buddylist")},reorder:function(bid){jsxc.gui.roster.insert(bid,jsxc.gui.roster.remove(bid))},remove:function(bid){return jsxc.gui.roster.getItem(bid).detach()},purge:function(bid){jsxc.master&&(jsxc.storage.removeUserItem("buddy",bid),jsxc.storage.removeUserItem("otr",bid),jsxc.storage.removeUserItem("otr_version_"+bid),jsxc.storage.removeUserItem("chat",bid),jsxc.storage.removeUserItem("window",bid),jsxc.storage.removeUserElement("buddylist",bid),jsxc.storage.removeUserElement("windowlist",bid)),jsxc.gui.window._close(bid),jsxc.gui.roster.remove(bid)},rename:function(bid){var name=jsxc.gui.roster.getItem(bid).find(".jsxc_name"),options=jsxc.gui.roster.getItem(bid).find(".jsxc_options, .jsxc_control"),input=$('<input type="text" name="name"/>');options.hide(),name=name.replaceWith(input),input.val(name.text()),input.keypress(function(ev){13===ev.which&&(options.show(),input.replaceWith(name),jsxc.gui.roster._rename(bid,$(this).val()),$("html").off("click"))}),input.click(function(){return!1}),$("html").one("click",function(){options.show(),input.replaceWith(name),jsxc.gui.roster._rename(bid,input.val())})},_rename:function(bid,newname){if(jsxc.master){var d=jsxc.storage.getUserItem("buddy",bid);if("chat"===d.type){var iq=$iq({type:"set"}).c("query",{xmlns:"jabber:iq:roster"}).c("item",{jid:Strophe.getBareJidFromJid(d.jid),name:newname});jsxc.xmpp.conn.sendIQ(iq)}}jsxc.storage.updateUserItem("buddy",bid,"name",newname),jsxc.gui.update(bid)},toggle:function(d){var duration=d||500,roster=$("#jsxc_roster"),wl=$("#jsxc_windowList"),roster_width=roster.innerWidth(),roster_right=parseFloat($("#jsxc_roster").css("right")),state=0>roster_right?"shown":"hidden";jsxc.storage.setUserItem("roster",state),roster.animate({right:-1*(roster_width+roster_right)+"px"},duration),wl.animate({right:10-roster_right+"px"},duration),$(document).trigger("toggle.roster.jsxc",[state,duration])},noConnection:function(){$("#jsxc_roster").addClass("jsxc_noConnection"),$("#jsxc_buddylist").empty(),$("#jsxc_roster").append($("<p>"+$.t("no_connection")+"</p>").append(" <a>"+$.t("relogin")+"</a>").click(function(){jsxc.gui.showLoginBox()}))},empty:function(){var text=$("<p>"+$.t("Your_roster_is_empty_add_a")+"</p>"),link=$("<a>"+$.t("new_buddy")+"</a>");link.click(function(){jsxc.gui.showContactDialog()}),text.append(link),text.append("."),$("#jsxc_roster").prepend(text)}},jsxc.gui.dialog={open:function(data,o){var opt=o||{},options={};return options={onComplete:function(){$("#jsxc_dialog .jsxc_close").click(function(ev){ev.preventDefault(),jsxc.gui.dialog.close()}),options.closeButton===!1&&$("#cboxClose").hide(),$("#jsxc_dialog form").each(function(){var form=$(this);form.find("button[data-jsxc-loading-text]").each(function(){var btn=$(this);btn.on("btnloading.jsxc",function(){btn.prop("disabled")||(btn.prop("disabled",!0),btn.data("jsxc_value",btn.text()),btn.text(btn.attr("data-jsxc-loading-text")))}),btn.on("btnfinished.jsxc",function(){btn.prop("disabled")&&(btn.prop("disabled",!1),btn.text(btn.data("jsxc_value")))})})}),jsxc.gui.dialog.resize(),$(document).trigger("complete.dialog.jsxc")},onClosed:function(){$(document).trigger("close.dialog.jsxc")},onCleanup:function(){$(document).trigger("cleanup.dialog.jsxc")},opacity:.5},opt.noClose&&(options.overlayClose=!1,options.escKey=!1,options.closeButton=!1,delete opt.noClose),$.extend(options,opt),options.html='<div id="jsxc_dialog">'+data+"</div>",$.colorbox(options),$("#jsxc_dialog")},close:function(){jsxc.debug("close dialog"),$.colorbox.close()},resize:function(options){options=$.extend({innerWidth:$("#jsxc_dialog").outerWidth(),innerHeight:$("#jsxc_dialog").outerHeight()},options||{}),$("#cboxLoadedContent").css("overflow","hidden"),$.colorbox.resize(options)}},jsxc.gui.window={init:function(bid){if(jsxc.gui.window.get(bid).length>0)return jsxc.gui.window.get(bid);var win=jsxc.gui.windowTemplate.clone().attr("data-bid",bid).hide().appendTo("#jsxc_windowList > ul").show("slow"),data=jsxc.storage.getUserItem("buddy",bid);if(win.data("jid",data.jid),jsxc.gui.toggleList.call(win.find(".jsxc_settings")),win.find(".jsxc_verification").click(function(){jsxc.gui.showVerification(bid)}),win.find(".jsxc_fingerprints").click(function(){jsxc.gui.showFingerprints(bid)}),win.find(".jsxc_transfer").click(function(){jsxc.otr.toggleTransfer(bid)}),win.find(".jsxc_bar").click(function(){jsxc.gui.window.toggle(bid)}),win.find(".jsxc_close").click(function(){jsxc.gui.window.close(bid)}),win.find(".jsxc_clear").click(function(){jsxc.gui.window.clear(bid)}),win.find(".jsxc_tools").click(function(){return!1}),win.find(".jsxc_textinput").keyup(function(ev){var body=$(this).val();13===ev.which&&(body=""),jsxc.storage.updateUserItem("window",bid,"text",body),27===ev.which&&jsxc.gui.window.close(bid)}).keypress(function(ev){13===ev.which&&$(this).val()&&(jsxc.gui.window.postMessage(bid,"out",$(this).val()),$(this).val(""))}).focus(function(){jsxc.gui.readMsg(bid)}).mouseenter(function(){$("#jsxc_windowList").data("isOver",!0)}).mouseleave(function(){$("#jsxc_windowList").data("isOver",!1)}),win.find(".jsxc_textarea").click(function(){"function"!=typeof getSelection||getSelection().toString()||win.find(".jsxc_textinput").focus()}),win.find(".jsxc_textarea").slimScroll({height:"234px",distance:"3px"}),win.find(".jsxc_fade").hide(),win.find(".jsxc_name").disableSelection(),win.find(".slimScrollDiv").resizable({handles:"w, nw, n",minHeight:234,minWidth:250,resize:function(event,ui){win.width(ui.size.width),win.find(".jsxc_textarea").slimScroll({height:ui.size.height});var offset=win.find(".slimScrollDiv").position().top;win.find(".jsxc_emoticons").css("top",ui.size.height+offset+6+"px"),$(document).trigger("resize.window.jsxc",[win,bid,ui.size])}}),$.inArray(bid,jsxc.storage.getUserItem("windowlist"))<0){var wl=jsxc.storage.getUserItem("windowlist");wl.push(bid),jsxc.storage.setUserItem("windowlist",wl),jsxc.storage.setUserItem("window",bid,{minimize:!0,text:"",unread:!1})}else jsxc.storage.getUserItem("window",bid).unread&&jsxc.gui.unreadMsg(bid);return $.each(jsxc.gui.emotions,function(i,val){var ins=val[0].split(" ")[0],li=$('<li><div title="'+ins+'" class="jsxc_'+val[1]+'"/></li>');li.click(function(){win.find("input").val(win.find("input").val()+ins),win.find("input").focus()}),win.find(".jsxc_emoticons ul").append(li)}),jsxc.gui.toggleList.call(win.find(".jsxc_emoticons")),jsxc.gui.window.restoreChat(bid),jsxc.gui.update(bid),jsxc.gui.updateWindowListSB(),jsxc.master&&!jsxc.otr.objects[bid]?jsxc.otr.create(bid):jsxc.otr.enable(bid),$(document).trigger("init.window.jsxc",[win]),win},get:function(id){return $("li.jsxc_windowItem[data-bid='"+jsxc.jidToBid(id)+"']")},open:function(bid){var win=jsxc.gui.window.init(bid);jsxc.gui.window.show(bid),jsxc.gui.window.highlight(bid);var padding=$("#jsxc_windowListSB").width(),innerWidth=$("#jsxc_windowList>ul").width(),outerWidth=$("#jsxc_windowList").width()-padding;if(innerWidth>outerWidth){var offset=parseInt($("#jsxc_windowList>ul").css("right")),width=win.outerWidth(!0),right=innerWidth-win.position().left-width+offset,left=outerWidth-(innerWidth-win.position().left)-offset;0>left&&jsxc.gui.scrollWindowListBy(-1*left),0>right&&jsxc.gui.scrollWindowListBy(right)}return win},close:function(bid){return 0===jsxc.gui.window.get(bid).length?void jsxc.warn("Want to close a window, that is not open."):(jsxc.storage.removeUserElement("windowlist",bid),jsxc.storage.removeUserItem("window",bid),jsxc.storage.getUserItem("buddylist").indexOf(bid)<0&&(jsxc.storage.removeUserItem("buddy",bid),jsxc.storage.removeUserItem("chat",bid)),void jsxc.gui.window._close(bid))},_close:function(bid){jsxc.gui.window.get(bid).hide("slow",function(){$(this).remove(),jsxc.gui.updateWindowListSB()})},toggle:function(bid){var win=jsxc.gui.window.get(bid);0!==win.parents("#jsxc_windowList").length&&(win.find(".jsxc_fade").is(":hidden")?jsxc.gui.window.show(bid):jsxc.gui.window.hide(bid),jsxc.gui.updateWindowListSB())},show:function(bid){jsxc.storage.updateUserItem("window",bid,"minimize",!1),jsxc.gui.window._show(bid)},_show:function(bid){var win=jsxc.gui.window.get(bid);jsxc.gui.window.get(bid).find(".jsxc_fade").slideDown(),win.removeClass("jsxc_min"),jsxc.gui.window.scrollDown(bid),jsxc.restoreCompleted&&win.find(".jsxc_textinput").focus(),win.trigger("show.window.jsxc")},hide:function(bid){jsxc.storage.updateUserItem("window",bid,"minimize",!0),jsxc.gui.window._hide(bid)},_hide:function(bid){jsxc.gui.window.get(bid).addClass("jsxc_min").find(" .jsxc_fade").slideUp(),jsxc.gui.window.get(bid).trigger("hidden.window.jsxc")},highlight:function(bid){var el=jsxc.gui.window.get(bid).find(" .jsxc_bar");el.is(":animated")||el.effect("highlight",{color:"orange"},2e3)},scrollDown:function(bid){var chat=jsxc.gui.window.get(bid).find(".jsxc_textarea");0!==chat.length&&chat.slimScroll({scrollTo:chat.get(0).scrollHeight+"px"})},postMessage:function(bid,direction,msg,encrypted,forwarded,stamp,sender){var data=jsxc.storage.getUserItem("buddy",bid),html_msg=msg;msg=jsxc.removeHTML(msg),msg=jsxc.escapeHTML(msg),"out"===direction&&data.msgstate===OTR.CONST.MSGSTATE_FINISHED&&forwarded!==!0&&(direction="sys",msg=$.t("your_message_wasnt_send_please_end_your_private_conversation")),"in"===direction&&data.msgstate===OTR.CONST.MSGSTATE_FINISHED&&(direction="sys",msg=$.t("unencrypted_message_received")+" "+msg),"out"===direction&&"from"===data.sub&&(direction="sys",msg=$.t("your_message_wasnt_send_because_you_have_no_valid_subscription")),encrypted=encrypted||data.msgstate===OTR.CONST.MSGSTATE_ENCRYPTED;var post=jsxc.storage.saveMessage(bid,direction,msg,encrypted,forwarded,stamp,sender);"in"===direction&&$(document).trigger("postmessagein.jsxc",[bid,html_msg]),"out"===direction&&jsxc.master&&forwarded!==!0&&jsxc.xmpp.sendMessage(bid,html_msg,post.uid),jsxc.gui.window._postMessage(bid,post),"out"===direction&&"?"===msg&&jsxc.gui.window.postMessage(bid,"sys","42")},_postMessage:function(bid,post,restore){var win=jsxc.gui.window.get(bid),msg=post.msg,direction=post.direction,uid=post.uid;win.find(".jsxc_textinput").is(":not(:focus)")&&jsxc.restoreCompleted&&"in"===direction&&!restore&&jsxc.gui.window.highlight(bid),msg=msg.replace(jsxc.CONST.REGEX.URL,function(url){var href=url.match(/^https?:\/\//i)?url:"http://"+url;return'<a href="'+href+'" target="_blank">'+url+"</a>"}),msg=msg.replace(new RegExp("(xmpp:)?("+jsxc.CONST.REGEX.JID.source+")(\\?[^\\s]+\\b)?","i"),function(match,protocol,jid,action){return"xmpp:"===protocol?("string"==typeof action&&(jid+=action),'<a href="xmpp:'+jid+'">'+jid+"</a>"):'<a href="mailto:'+jid+'" target="_blank">'+jid+"</a>"}),$.each(jsxc.gui.emotions,function(i,val){msg=msg.replace(val[2],function(match,p1){var i,esc="";for(i=0;i<p1.length;i++)esc+="&#"+p1.charCodeAt(i)+";";return'<div title="'+esc+'" class="jsxc_emoticon jsxc_'+val[1]+'"/>'})});var msgDiv=$("<div>"),msgTsDiv=$("<div>");if(msgDiv.addClass("jsxc_chatmessage jsxc_"+direction),msgDiv.attr("id",uid),msgDiv.html("<div>"+msg+"</div>"),msgTsDiv.addClass("jsxc_timestamp"),msgTsDiv.text(jsxc.getFormattedTime(post.stamp)),post.received&&msgDiv.addClass("jsxc_received"),post.forwarded&&msgDiv.addClass("jsxc_forwarded"),post.encrypted&&msgDiv.addClass("jsxc_encrypted"),"sys"===direction?jsxc.gui.window.get(bid).find(".jsxc_textarea").append('<div style="clear:both"/>'):"undefined"!=typeof post.stamp&&msgDiv.append(msgTsDiv),win.find(".jsxc_textarea").append(msgDiv),"object"==typeof post.sender&&null!==post.sender){var title="",avatarDiv=$("<div>");if(avatarDiv.addClass("jsxc_avatar").prependTo(msgDiv),"string"==typeof post.sender.jid){msgDiv.attr("data-bid",jsxc.jidToBid(post.sender.jid));var data=jsxc.storage.getUserItem("buddy",jsxc.jidToBid(post.sender.jid))||{};jsxc.gui.updateAvatar(msgDiv,jsxc.jidToBid(post.sender.jid),data.avatar),title=jsxc.jidToBid(post.sender.jid)}"string"==typeof post.sender.name&&(msgDiv.attr("data-name",post.sender.name),"string"!=typeof post.sender.jid&&jsxc.gui.avatarPlaceholder(avatarDiv,post.sender.name),""!==title&&(title="\n"+title),title=post.sender.name+title,msgTsDiv.text(msgTsDiv.text()+" "+post.sender.name)),avatarDiv.attr("title",jsxc.escapeHTML(title))}jsxc.gui.detectUriScheme(win),jsxc.gui.detectEmail(win),jsxc.gui.window.scrollDown(bid),win.find(".jsxc_textinput").is(":focus")||!jsxc.restoreCompleted||restore||jsxc.gui.unreadMsg(bid)},setText:function(bid,text){jsxc.gui.window.get(bid).find(".jsxc_textinput").val(text)},restoreChat:function(bid){for(var chat=jsxc.storage.getUserItem("chat",bid);null!==chat&&chat.length>0;){var c=chat.pop();jsxc.gui.window._postMessage(bid,c,!0)}},clear:function(bid){jsxc.storage.setUserItem("chat",bid,[]),jsxc.gui.window.get(bid).find(".jsxc_textarea").empty()}},jsxc.gui.template={get:function(name,bid,msg){var ph={my_priv_fingerprint:jsxc.storage.getUserItem("priv_fingerprint")?jsxc.storage.getUserItem("priv_fingerprint").replace(/(.{8})/g,"$1 "):$.t("not_available"),my_jid:jsxc.storage.getItem("jid")||"",my_node:Strophe.getNodeFromJid(jsxc.storage.getItem("jid")||"")||"",root:jsxc.options.root,app_name:jsxc.options.app_name};if(bid){var data=jsxc.storage.getUserItem("buddy",bid);$.extend(ph,{bid_priv_fingerprint:data&&data.fingerprint?data.fingerprint.replace(/(.{8})/g,"$1 "):$.t("not_available"),bid_jid:bid,bid_name:data&&data.name?data.name:bid})}msg&&$.extend(ph,{msg:msg});var ret=jsxc.gui.template[name];return"string"==typeof ret?(ret=ret.replace(/\{\{root\}\}/g,ph.root),ret=$("<div>").append($(ret).i18n()).html(),ret=ret.replace(/\{\{([a-zA-Z0-9_\-]+)\}\}/g,function(s,key){return"string"==typeof ph[key]?ph[key]:s})):(jsxc.debug("Template not available: "+name),name)},authenticationDialog:'<h3>Verification</h3> <p data-i18n="Authenticating_a_buddy_helps_"></p> <div> <p data-i18n="[html]How_do_you_want_to_authenticate_your_buddy" style="margin:0px;"></p> <select size="1"> <option data-i18n="Select_method"></option> <option data-i18n="Manual"></option> <option data-i18n="Question"></option> <option data-i18n="Secret"></option> </select> </div> <div style="display:none"> <p data-i18n="To_verify_the_fingerprint_" class=".jsxc_explanation"></p> <p><strong data-i18n="Your_fingerprint"></strong><br /> <span style="text-transform:uppercase">{{my_priv_fingerprint}}</span></p> <p><strong data-i18n="Buddy_fingerprint"></strong><br /> <span style="text-transform:uppercase">{{bid_priv_fingerprint}}</span></p><br /> <p class="jsxc_right"><a href="#" data-i18n="Close" class="jsxc_close button"></a> <a href="#" data-i18n="Compared" class="button creation"></a></p> </div> <div style="display:none"> <p data-i18n="To_authenticate_using_a_question_" class=".jsxc_explanation"></p> <p><label for="jsxc_quest" data-i18n="Question"></label><input type="text" name="quest" id="jsxc_quest" /></p> <p><label for="jsxc_secret2" data-i18n="Secret"></label><input type="text" name="secret2" id="jsxc_secret2" /></p> <p class="jsxc_right"><a href="#" class="button jsxc_close" data-i18n="Close"></a> <a href="#" class="button creation" data-i18n="Ask"></a></p> </div> <div style="display:none"> <p class=".jsxc_explanation" data-i18n="To_authenticate_pick_a_secret_"></p> <p><label for="jsxc_secret" data-i18n="Secret"></label><input type="text" name="secret" id="jsxc_secret" /></p> <p class="jsxc_right"><a href="#" class="button jsxc_close" data-i18n="Close"></a> <a href="#" class="button creation" data-i18n="Compare"></a></p> </div>',fingerprintsDialog:'<div> <p class="jsxc_maxWidth" data-i18n="A_fingerprint_"></p> <p><strong data-i18n="Your_fingerprint"></strong><br /> <span style="text-transform:uppercase">{{my_priv_fingerprint}}</span></p> <p><strong data-i18n="Buddy_fingerprint"></strong><br /> <span style="text-transform:uppercase">{{bid_priv_fingerprint}}</span></p><br /> <p class="jsxc_right"><a href="#" class="button jsxc_close" data-i18n="Close"></a></p> </div>',chatWindow:'<li class="jsxc_min jsxc_windowItem"> <div class="jsxc_window"> <div class="jsxc_bar"> <div class="jsxc_avatar">☺</div> <div class="jsxc_tools"> <div class="jsxc_settings"> <ul> <li class="jsxc_fingerprints jsxc_otr jsxc_disabled" data-i18n="Fingerprints"></li> <li class="jsxc_verification" data-i18n="Authentication"></li> <li class="jsxc_transfer jsxc_otr jsxc_disabled" data-i18n="start_private"></li> <li class="jsxc_clear" data-i18n="clear_history"></li> </ul> </div> <div class="jsxc_transfer jsxc_otr jsxc_disabled"/> <div class="jsxc_close">×</div> </div> <div class="jsxc_name"/> <div class="jsxc_cycle"/> </div> <div class="jsxc_fade"> <div class="jsxc_gradient"/> <div class="jsxc_textarea"/> <div class="jsxc_emoticons"><ul/></div> <input type="text" class="jsxc_textinput" data-i18n="[placeholder]Message"/> </div> </div> </li>',roster:'<div id="jsxc_roster"> <ul id="jsxc_buddylist"></ul> <div class="jsxc_bottom jsxc_presence" data-bid="own"> <div id="jsxc_avatar"> <div class="jsxc_avatar">☺</div> </div> <div id="jsxc_menu"> <span></span> <ul> <li class="jsxc_settings" data-i18n="Settings"></li> <li class="jsxc_muteNotification" data-i18n="Mute"></li> <li class="jsxc_addBuddy" data-i18n="Add_buddy"></li> <li class="jsxc_hideOffline" data-i18n="Hide_offline"></li> <li class="jsxc_onlineHelp" data-i18n="Online_help"></li> <li class="jsxc_about" data-i18n="About"></li> </ul> </div> <div id="jsxc_notice"> <span></span> <ul></ul> </div> <div id="jsxc_presence"> <span data-i18n="Online"></span> <ul> <li data-pres="online" class="jsxc_online" data-i18n="Online"></li> <li data-pres="chat" class="jsxc_chat" data-i18n="Chatty"></li> <li data-pres="away" class="jsxc_away" data-i18n="Away"></li> <li data-pres="xa" class="jsxc_xa" data-i18n="Extended_away"></li> <li data-pres="dnd" class="jsxc_dnd" data-i18n="dnd"></li> <li data-pres="offline" class="jsxc_offline" data-i18n="Offline"></li> </ul> </div> </div> <div id="jsxc_toggleRoster"></div> </div>',windowList:'<div id="jsxc_windowList"> <ul></ul> </div> <div id="jsxc_windowListSB"> <div class="jsxc_scrollLeft jsxc_disabled">&lt;</div> <div class="jsxc_scrollRight jsxc_disabled">&gt;</div> </div>',rosterBuddy:'<li> <div class="jsxc_avatar">☺</div> <div class="jsxc_control"></div> <div class="jsxc_name"/> <div class="jsxc_options jsxc_right"> <div class="jsxc_rename" data-i18n="[title]rename_buddy">✎</div> <div class="jsxc_delete" data-i18n="[title]delete_buddy">✘</div> </div> <div class="jsxc_options jsxc_left"> <div class="jsxc_chaticon" data-i18n="[title]send_message"/> <div class="jsxc_vcardicon" data-i18n="[title]get_info">i</div> </div> </li>',loginBox:'<h3 data-i18n="Login"></h3> <form> <p><label for="jsxc_username" data-i18n="Username"></label> <input type="text" name="username" id="jsxc_username" required="required" value="{{my_node}}"/></p> <p><label for="jsxc_password" data-i18n="Password"></label> <input type="password" name="password" required="required" id="jsxc_password" /></p> <div class="jsxc_alert jsxc_alert-warning" data-i18n="Sorry_we_cant_authentikate_"></div> <div class="bottom_submit_section"> <button type="reset" class="jsxc_btn jsxc_close" name="clear" data-i18n="Cancel"/> <button type="submit" class="jsxc_btn jsxc_btn-primary" name="commit" data-i18n="[data-jsxc-loading-text]Connecting...;Connect"/> </div> </form>',contactDialog:'<h3 data-i18n="Add_buddy"></h3> <p class=".jsxc_explanation" data-i18n="Type_in_the_full_username_"></p> <form> <p><label for="jsxc_username" data-i18n="Username"></label> <input type="text" name="username" id="jsxc_username" list="jsxc_userlist" pattern="^[^\\x22&\'\\/:<>@\\s]+(@[.\\-_\\w]+)?" required="required" /></p> <datalist id="jsxc_userlist"></datalist> <p><label for="jsxc_alias" data-i18n="Alias"></label> <input type="text" name="alias" id="jsxc_alias" /></p> <p class="jsxc_right"> <input class="button" type="submit" data-i18n="[value]Add" /> </p> <form>',approveDialog:'<h3 data-i18n="Subscription_request"></h3> <p><span data-i18n="You_have_a_request_from"></span><b class="jsxc_their_jid"></b>.</p> <p class="jsxc_right"><a href="#" class="button jsxc_deny" data-i18n="Deny"></a> <a href="#" class="button creation jsxc_approve" data-i18n="Approve"></a></p>',removeDialog:'<h3 data-i18n="Remove_buddy"></h3> <p class="jsxc_maxWidth" data-i18n="[html]You_are_about_to_remove_"></p> <p class="jsxc_right"><a href="#" class="button jsxc_cancel jsxc_close" data-i18n="Cancel"></a> <a href="#" class="button creation" data-i18n="Remove"></a></p>',waitAlert:'<h3>{{msg}}</h3> <p data-i18n="Please_wait"></p> <p class="jsxc_center"><img src="{{root}}/img/loading.gif" alt="wait" width="32px" height="32px" /></p>',alert:'<h3 data-i18n="Alert"></h3> <p>{{msg}}</p> <p class="jsxc_right"><a href="#" data-i18n="Ok" class="button jsxc_close jsxc_cancel"></a></p>',authFailDialog:'<h3 data-i18n="Login_failed"></h3> <p data-i18n="Sorry_we_cant_authentikate_"></p> <p class="jsxc_right"> <a class="button jsxc_cancel" data-i18n="Continue_without_chat"></a> <a class="button creation" data-i18n="Retry"></a> </p>',confirmDialog:'<p>{{msg}}</p> <p class="jsxc_right"> <a class="button jsxc_cancel jsxc_close" data-i18n="Dismiss"></a> <a class="button creation" data-i18n="Confirm"></a> </p>',pleaseAccept:'<p data-i18n="Please_accept_"></p>',aboutDialog:"<h3>JavaScript XMPP Chat</h3> <p><b>Version: </b>"+jsxc.version+'<br /> <a href="http://jsxc.org/" target="_blank">www.jsxc.org</a></p> <p><i>Released under the MIT license</i></p> <p>Real-time chat app for {{app_name}} and more.<br /> Requires an external <a href="https://xmpp.org/xmpp-software/servers/" target="_blank">XMPP server</a>.</p> <p><b>Credits: </b> <a href="http://www.beepzoid.com/old-phones/" target="_blank">David English (Ringtone)</a>, <a href="https://soundcloud.com/freefilmandgamemusic/ping-1?in=freefilmandgamemusic/sets/free-notification-sounds-and" target="_blank">CameronMusic (Ping)</a></p> <p class="jsxc_libraries"><b>Libraries: </b><a href="http://strophe.im/strophejs/">strophe.js</a> (multiple), <a href="https://github.com/strophe/strophejs-plugins">strophe.js/muc</a> (MIT), <a href="https://github.com/strophe/strophejs-plugins">strophe.js/disco</a> (MIT), <a href="https://github.com/strophe/strophejs-plugins">strophe.js/caps</a> (MIT), <a href="https://github.com/strophe/strophejs-plugins">strophe.js/vcard</a> (MIT), <a href="https://github.com/ESTOS/strophe.jingle">strophe.jingle</a> (MIT), <a href="https://github.com/neoatlantis/node-salsa20">Salsa20</a> (AGPL3), <a href="www.leemon.com">bigint</a> (public domain), <a href="code.google.com/p/crypto-js">cryptojs</a> (code.google.com/p/crypto-js/wiki/license), <a href="http://git.io/ee">eventemitter</a> (MIT), <a href="https://arlolra.github.io/otr/">otr.js</a> (MPL v2.0), <a href="http://i18next.com/">i18next</a> (MIT)</p> <p class="jsxc_right"><a class="button jsxc_debuglog" href="#">Show debug log</a></p>',vCard:'<h3><span data-i18n="Info_about"></span> <span>{{bid_name}}</span></h3> <ul class="jsxc_vCard"></ul> <p><img src="{{root}}/img/loading.gif" alt="wait" width="32px" height="32px" /> <span data-i18n="Please_wait"></span>...</p>',settings:'<h3 data-i18n="User_settings"></h3> <p></p> <form> <fieldset class="jsxc_fieldsetXmpp jsxc_fieldset"> <legend data-i18n="Login_options"></legend> <label for="xmpp-url" data-i18n="BOSH_url"></label><input type="text" id="xmpp-url" readonly="readonly"/><br /> <label for="xmpp-username" data-i18n="Username"></label><input type="text" id="xmpp-username"/><br /> <label for="xmpp-domain" data-i18n="Domain"></label><input type="text" id="xmpp-domain"/><br /> <label for="xmpp-resource" data-i18n="Resource"></label><input type="text" id="xmpp-resource"/><br /> <label for="xmpp-onlogin" data-i18n="On_login"></label><input type="checkbox" id="xmpp-onlogin" /><br /> <input type="submit" data-i18n="[value]Save"/> </fieldset> </form> <p></p> <form> <fieldset class="jsxc_fieldsetPriority jsxc_fieldset"> <legend data-i18n="Priority"></legend> <label for="priority-online" data-i18n="Online"></label><input type="number" value="0" id="priority-online" min="-128" max="127" step="1" required="required"/><br /> <label for="priority-chat" data-i18n="Chatty"></label><input type="number" value="0" id="priority-chat" min="-128" max="127" step="1" required="required"/><br /> <label for="priority-away" data-i18n="Away"></label><input type="number" value="0" id="priority-away" min="-128" max="127" step="1" required="required"/><br /> <label for="priority-xa" data-i18n="Extended_away"></label><input type="number" value="0" id="priority-xa" min="-128" max="127" step="1" required="required"/><br /> <label for="priority-dnd" data-i18n="dnd"></label><input type="number" value="0" id="priority-dnd" min="-128" max="127" step="1" required="required"/><br /> <input type="submit" data-i18n="[value]Save"/> </fieldset> </form> <p></p> <form data-onsubmit="xmpp.carbons.refresh"> <fieldset class="jsxc_fieldsetCarbons jsxc_fieldset"> <legend data-i18n="Carbon_copy"></legend> <label for="carbons-enable" data-i18n="Enable"></label><input type="checkbox" id="carbons-enable" /><br /> <input type="submit" data-i18n="[value]Save"/> </fieldset> </form>'},jsxc.gui.template.joinChat='<h3 data-i18n="Join_chat"></h3> <p class=".jsxc_explanation" data-i18n="muc_explanation"></p> <p><label for="jsxc_server" data-i18n="Server"></label> <input type="text" name="server" id="jsxc_server" required="required" readonly="readonly" /></p> <p><label for="jsxc_room" data-i18n="Room"></label> <input type="text" name="room" id="jsxc_room" autocomplete="off" list="jsxc_roomlist" required="required" pattern="^[^\\x22&\'\\/:<>@\\s]+" /></p> <p class="jsxc_inputinfo jsxc_waiting jsxc_room" data-i18n="Rooms_are_loaded"></p> <datalist id="jsxc_roomlist"> <p><label for="jsxc_roomlist_select"></label><select id="jsxc_roomlist_select"><option></option><option>workaround</option></select></p> </datalist> <p><label for="jsxc_nickname" data-i18n="Nickname"></label> <input type="text" name="nickname" id="jsxc_nickname" /></p> <p><label for="jsxc_password" data-i18n="Password"></label> <input type="text" name="password" id="jsxc_password" /></p> <div class="jsxc_msg"></div> <p class="jsxc_right"> <span class="jsxc_warning"></span> <a href="#" class="button jsxc_close" data-i18n="Close"></a> <a href="#" class="button jsxc_continue" data-i18n="Continue"> <a href="#" class="button jsxc_join" data-i18n="Join"></a> </p>',jsxc.muc={conn:null,CONST:{AFFILIATION:{ADMIN:"admin",MEMBER:"member",OUTCAST:"outcast",OWNER:"owner",NONE:"none"},ROLE:{MODERATOR:"moderator",PARTICIPANT:"participant",VISITOR:"visitor",NONE:"none"},ROOMSTATE:{INIT:0,ENTERED:1,EXITED:2,AWAIT_DESTRUCTION:3,DESTROYED:4}},init:function(o){var self=jsxc.muc;self.conn=jsxc.xmpp.conn;var options=o||jsxc.options.get("muc");return options&&"string"==typeof options.server?(jsxc.gui.roster.ready?self.initMenu():$(document).one("ready.roster.jsxc",jsxc.muc.initMenu),$(document).on("presence.jsxc",jsxc.muc.onPresence),$(document).on("error.presence.jsxc",jsxc.muc.onPresenceError),self.conn.addHandler(self.onGroupchatMessage,null,"message","groupchat"),self.conn.addHandler(self.onErrorMessage,null,"message","error"),void(self.conn.muc.roomNames=jsxc.storage.getUserItem("roomNames")||[])):(jsxc.debug("Discover muc service"),void setTimeout(function(){self.conn.disco.items(Strophe.getDomainFromJid(self.conn.jid),null,function(items){$(items).find("item").each(function(){var jid=$(this).attr("jid"),discovered=!1;
-return self.conn.disco.info(jid,null,function(info){var mucFeature=$(info).find('feature[var="'+Strophe.NS.MUC+'"]'),mucIdentity=$(info).find('identity[category="conference"][type="text"]');mucFeature.length>0&&mucIdentity.length>0&&(jsxc.debug("muc service found",jid),jsxc.options.set("muc",{server:jid,name:$(info).find("identity").attr("name")}),discovered=!0,self.init())}),!discovered})})},1e3))},initMenu:function(){var li=$("<li>").attr("class","jsxc_joinChat").text($.t("Join_chat"));li.click(jsxc.muc.showJoinChat),$("#jsxc_menu ul").append(li)},showJoinChat:function(){var self=jsxc.muc,dialog=jsxc.gui.dialog.open(jsxc.gui.template.get("joinChat"));dialog.find(".jsxc_join").hide(),dialog.find("#jsxc_server").val(jsxc.options.get("muc").server);var error_handler=function(event,condition,room){var msg;switch(condition){case"not-authorized":msg=$.t("A_password_is_required");break;case"registration-required":msg=$.t("You_are_not_on_the_member_list");break;case"forbidden":msg=$.t("You_are_banned_from_this_room");break;case"conflict":msg=$.t("Your_desired_nickname_");break;case"service-unavailable":msg=$.t("The_maximum_number_");break;case"item-not-found":msg=$.t("This_room_is_locked_");break;case"not-allowed":msg=$.t("You_are_not_allowed_to_create_");break;default:jsxc.warn("Unknown muc error condition: "+condition),msg=$.t("Error")+": "+condition}var roomIndex=self.conn.muc.roomNames.indexOf(room);roomIndex>-1&&(self.conn.muc.roomNames.splice(roomIndex,1),delete self.conn.muc.rooms[room]),dialog.find(".jsxc_warning").text(msg)};$(document).on("error.muc.jsxc",error_handler),$(document).on("close.dialog.jsxc",function(){$(document).off("error.muc.jsxc",error_handler)}),self.conn.muc.listRooms(jsxc.options.get("muc").server,function(stanza){$("#jsxc_roomlist option:last").remove(),$(stanza).find("item").each(function(){var r=$("<option>"),rjid=$(this).attr("jid").toLowerCase(),rnode=Strophe.getNodeFromJid(rjid),rname=$(this).attr("name")||rnode;r.text(rname),r.attr("data-jid",rjid),r.attr("value",rnode),$("#jsxc_roomlist select").append(r)});var set=$(stanza).find('set[xmlns="http://jabber.org/protocol/rsm"]');if(set.length>0){var count=set.find("count").text()||"?";dialog.find(".jsxc_inputinfo").removeClass("jsxc_waiting").text($.t("Could_load_only",{count:count}))}else dialog.find(".jsxc_inputinfo").hide()},function(){jsxc.warn("Could not load rooms"),dialog.find(".jsxc_inputinfo").hide()}),dialog.find("#jsxc_nickname").attr("placeholder",Strophe.getNodeFromJid(self.conn.jid)),dialog.find(".jsxc_continue").click(function(ev){ev.preventDefault();var room=$("#jsxc_room").val()?jsxc.jidToBid($("#jsxc_room").val()):null,nickname=$("#jsxc_nickname").val()||Strophe.getNodeFromJid(self.conn.jid),password=$("#jsxc_password").val()||null;if(!room||!room.match(/^[^"&\'\/:<>@\s]+$/i))return $("#jsxc_room").addClass("jsxc_invalid").keyup(function(){$(this).val()&&$(this).removeClass("jsxc_invalid")}),!1;if(room.match(/@(.*)$/)||(room+="@"+jsxc.options.get("muc").server),jsxc.xmpp.conn.muc.roomNames.indexOf(room)<0){var discoReceived=function(roomName,subject){jsxc.gui.dialog.resize(),dialog.find(".jsxc_continue").hide(),dialog.find(".jsxc_join").show().effect("highlight",{color:"green"},4e3),dialog.find(".jsxc_join").click(function(ev){return ev.preventDefault(),self.join(room,nickname,password,roomName,subject),!1})};dialog.find(".jsxc_msg").append($("<p>").text($.t("Loading_room_information")).addClass("jsxc_waiting")),jsxc.gui.dialog.resize(),self.conn.disco.info(room,null,function(stanza){dialog.find(".jsxc_msg").html("<p>"+$.t("This_room_is")+"</p>");var table=$("<table>");$(stanza).find("feature").each(function(){var feature=$(this).attr("var");if(""!==feature&&i18n.exists(feature)){var tr=$("<tr>");$("<td>").text($.t(feature+".keyword")).appendTo(tr),$("<td>").text($.t(feature+".description")).appendTo(tr),tr.appendTo(table)}}),dialog.find(".jsxc_msg").append(table);var roomName=$(stanza).find("identity").attr("name"),subject=$(stanza).find('field[var="muc#roominfo_subject"]').attr("label");discoReceived(roomName,subject)},function(){dialog.find(".jsxc_msg").empty(),$("<p>").text($.t("Room_not_found_")).appendTo(dialog.find(".jsxc_msg")),discoReceived()})}else dialog.find(".jsxc_warning").text($.t("You_already_joined_this_room"));return!1}),dialog.find("input").keydown(function(ev){return 13!==ev.which?(dialog.find(".jsxc_warning").empty(),void(dialog.find(".jsxc_continue").is(":hidden")&&(dialog.find(".jsxc_continue").show(),dialog.find(".jsxc_join").hide().off("click"),dialog.find(".jsxc_msg").empty(),jsxc.gui.dialog.resize()))):void(dialog.find(".jsxc_continue").is(":hidden")?dialog.find(".jsxc_join").click():dialog.find(".jsxc_continue").click())})},join:function(room,nickname,password,roomName,subject){var self=jsxc.muc;jsxc.storage.setUserItem("buddy",room,{jid:room,name:roomName||room,sub:"both",type:"groupchat",state:self.CONST.ROOMSTATE.INIT,subject:subject}),jsxc.xmpp.conn.muc.join(room,nickname,null,null,null,password)},leave:function(room){var self=jsxc.muc,own=jsxc.storage.getUserItem("ownNicknames")||{},data=jsxc.storage.getUserItem("buddy",room)||{};data.state===self.CONST.ROOMSTATE.ENTERED?self.conn.muc.leave(room,own[room],function(){self.onExited(room)}):self.onExited(room)},onExited:function(room){var self=jsxc.muc,own=jsxc.storage.getUserItem("ownNicknames")||{};jsxc.storage.setUserItem("roomNames",self.conn.muc.roomNames),delete own[room],jsxc.storage.setUserItem("ownNicknames",own),jsxc.storage.removeUserItem("member",room),jsxc.storage.removeUserItem("chat",room),jsxc.gui.window.close(room),jsxc.gui.roster.purge(room)},destroy:function(room,handler_cb,error_cb){var self=jsxc.muc;jsxc.storage.updateUserItem("buddy",room,"state",self.CONST.ROOMSTATE.AWAIT_DESTRUCTION),jsxc.gui.window.postMessage(room,"sys",$.t("This_room_will_be_closed"));var iq=$iq({to:room,type:"set"}).c("query",{xmlns:Strophe.NS.MUC_OWNER}).c("destroy");jsxc.muc.conn.sendIQ(iq.tree(),handler_cb,error_cb)},close:function(room){var self=jsxc.muc,roomdata=jsxc.storage.getUserItem("buddy",room)||{};self.emptyMembers(room);var roomIndex=self.conn.muc.roomNames.indexOf(room);roomIndex>-1&&(self.conn.muc.roomNames.splice(roomIndex,1),delete self.conn.muc.rooms[room]),jsxc.storage.setUserItem("roomNames",self.conn.muc.roomNames),roomdata.state===self.CONST.ROOMSTATE.AWAIT_DESTRUCTION&&self.onExited(room),roomdata.state=self.CONST.ROOMSTATE.DESTROYED,jsxc.storage.setUserItem("buddy",room,roomdata)},initWindow:function(event,win){var self=jsxc.muc,data=win.data(),bid=jsxc.jidToBid(data.jid),roomdata=jsxc.storage.getUserItem("buddy",bid);if(!jsxc.xmpp.conn)return void $(document).one("connectionReady.jsxc",function(){self.initWindow(null,win)});if(!(self.conn.muc.roomNames.indexOf(data.jid)<0)){win.addClass("jsxc_groupchat");var own=jsxc.storage.getUserItem("ownNicknames")||{},ownNickname=own[bid],mlIcon=$('<div class="jsxc_members"></div>');win.find(".jsxc_tools > .jsxc_transfer").after(mlIcon);var ml=$('<div class="jsxc_memberlist"><ul></ul></div>');win.find(".jsxc_fade").prepend(ml),ml.on("wheel",function(ev){jsxc.muc.scrollMemberListBy(bid,ev.originalEvent.wheelDelta>0?50:-50)});var toggleMl=function(ev){ev&&ev.preventDefault();var slimOptions={},ul=ml.find("ul:first"),slimHeight=null;if(ml.toggleClass("jsxc_expand"),ml.hasClass("jsxc_expand")){$("body").click(),$("body").one("click",toggleMl),ul.mouseleave(function(){ul.data("timer",window.setTimeout(toggleMl,2e3))}).mouseenter(function(){window.clearTimeout(ul.data("timer"))}).css("left","0px");var maxHeight=.8*win.find(".jsxc_textarea").height(),innerHeight=ml.find("ul").height()+3;slimHeight=innerHeight>maxHeight?maxHeight:innerHeight,slimOptions={distance:"3px",height:slimHeight+"px",width:"100%",color:"#fff",opacity:"0.5"},ml.css("height",slimHeight+"px")}else slimOptions={destroy:!0},ul.attr("style",""),ml.css("height",""),window.clearTimeout(ul.data("timer")),$("body").off("click",null,toggleMl),ul.off("mouseleave mouseenter");return ul.slimscroll(slimOptions),!1};mlIcon.click(toggleMl),win.on("resize",function(){jsxc.muc.scrollMemberListBy(bid,0)}),setTimeout(function(){var top=win.find(".jsxc_emoticons").position().top+win.find(".slimScrollDiv").position().top;win.find(".jsxc_emoticons").css("top",top+"px")},400);var destroy=$("<li>");if(destroy.text($.t("Destroy")),destroy.addClass("jsxc_destroy"),destroy.hide(),destroy.click(function(){self.destroy(bid)}),win.find(".jsxc_settings ul").append(destroy),roomdata.state>self.CONST.ROOMSTATE.INIT){var member=jsxc.storage.getUserItem("member",bid)||{};$.each(member,function(nickname,val){self.insertMember(bid,nickname,val),nickname===ownNickname&&val.affiliation===self.CONST.AFFILIATION.OWNER&&destroy.show()})}var leave=$("<li>");leave.text($.t("Leave")),leave.addClass("jsxc_leave"),leave.click(function(){self.leave(bid)}),win.find(".jsxc_settings ul").append(leave)}},onPresence:function(event,from,status,presence){var self=jsxc.muc,room=jsxc.jidToBid(from),xdata=$(presence).find('x[xmlns^="'+Strophe.NS.MUC+'"]');if(self.conn.muc.roomNames.indexOf(room)<0||0===xdata.length)return!0;var res=Strophe.getResourceFromJid(from)||"",nickname=Strophe.unescapeNode(res),own=jsxc.storage.getUserItem("ownNicknames")||{},member=jsxc.storage.getUserItem("member",room)||{},codes=[];if(xdata.find("status").each(function(){var code=$(this).attr("code");jsxc.debug("[muc][code]",code),codes.push(code)}),0===jsxc.gui.roster.getItem(room).length){jsxc.storage.setUserItem("roomNames",jsxc.xmpp.conn.muc.roomNames),jsxc.storage.removeUserItem("chat",room),member={};var bl=jsxc.storage.getUserItem("buddylist");bl.push(room),jsxc.storage.setUserItem("buddylist",bl),jsxc.gui.roster.add(room),jsxc.gui.window.open(room),jsxc.gui.dialog.close()}var jid=xdata.find("item").attr("jid")||null;if(0===status)if(xdata.find("destroy").length>0)member={},jsxc.gui.window.postMessage(room,"sys",$.t("This_room_has_been_closed")),self.close(room);else{delete member[nickname],self.removeMember(room,nickname);var newNickname=xdata.find("item").attr("nick");codes.indexOf("303")>-1&&newNickname?(newNickname=Strophe.unescapeNode(newNickname),member[newNickname]={},jsxc.gui.window.postMessage(room,"sys",$.t("is_now_known_as",{oldNickname:nickname,newNickname:newNickname,escapeInterpolation:!0}))):(0===codes.length||1===codes.length&&codes.indexOf("110")>-1)&&jsxc.gui.window.postMessage(room,"sys",$.t("left_the_building",{nickname:nickname,escapeInterpolation:!0}))}else!member[nickname]&&own[room]&&jsxc.gui.window.postMessage(room,"sys",$.t("entered_the_room",{nickname:nickname,escapeInterpolation:!0})),member[nickname]={jid:jid,status:status,roomJid:from,affiliation:xdata.find("item").attr("affiliation"),role:xdata.find("item").attr("role")},self.insertMember(room,nickname,member[nickname]);return jsxc.storage.setUserItem("member",room,member),$.each(codes,function(index,code){"function"==typeof self.onStatus[code]&&self.onStatus[code].call(this,room,nickname,member[nickname]||{},xdata),$(document).trigger("status.muc.jsxc",[code,room,nickname,member[nickname]||{},presence])}),!0},onPresenceError:function(event,from,presence){var self=jsxc.muc,xdata=$(presence).find('x[xmlns="'+Strophe.NS.MUC+'"]'),room=jsxc.jidToBid(from);if(0===xdata.length||self.conn.muc.roomNames.indexOf(room)<0)return!0;var error=$(presence).find("error"),condition=error.children()[0].tagName;return jsxc.debug("[muc][error]",condition),$(document).trigger("error.muc.jsxc",[condition,room]),!0},onStatus:{110:function(room,nickname,data){var self=jsxc.muc,own=jsxc.storage.getUserItem("ownNicknames")||{};own[room]=nickname,jsxc.storage.setUserItem("ownNicknames",own),data.affiliation===self.CONST.AFFILIATION.OWNER&&jsxc.gui.window.get(room).find(".jsxc_destroy").show();var roomdata=jsxc.storage.getUserItem("buddy",room);roomdata.state===self.CONST.ROOMSTATE.INIT&&(roomdata.state=self.CONST.ROOMSTATE.ENTERED,jsxc.storage.setUserItem("buddy",room,roomdata))},170:function(room){jsxc.gui.window.postMessage(room,"sys",$.t("Room_logging_is_enabled"))},201:function(room){var self=jsxc.muc;self.conn.muc.createInstantRoom(room)},301:function(room,nickname,data,xdata){var own=jsxc.storage.getUserItem("ownNicknames")||{};own[room]===nickname?(jsxc.muc.close(room),jsxc.gui.window.postMessage(room,"sys",$.t("muc_removed_banned")),jsxc.muc.postReason(room,xdata)):jsxc.gui.window.postMessage(room,"sys",$.t("muc_removed_info_banned",{nickname:nickname,escapeInterpolation:!0}))},307:function(room,nickname,data,xdata){var own=jsxc.storage.getUserItem("ownNicknames")||{};own[room]===nickname?(jsxc.muc.close(room),jsxc.gui.window.postMessage(room,"sys",$.t("muc_removed_kicked")),jsxc.muc.postReason(room,xdata)):jsxc.gui.window.postMessage(room,"sys",$.t("muc_removed_info_kicked",{nickname:nickname,escapeInterpolation:!0}))},321:function(room,nickname){var own=jsxc.storage.getUserItem("ownNicknames")||{};own[room]===nickname?(jsxc.muc.close(room),jsxc.gui.window.postMessage(room,"sys",$.t("muc_removed_affiliation"))):jsxc.gui.window.postMessage(room,"sys",$.t("muc_removed_info_affiliation",{nickname:nickname,escapeInterpolation:!0}))},322:function(room,nickname){var own=jsxc.storage.getUserItem("ownNicknames")||{};own[room]===nickname?(jsxc.muc.close(room),jsxc.gui.window.postMessage(room,"sys",$.t("muc_removed_membersonly"))):jsxc.gui.window.postMessage(room,"sys",$.t("muc_removed_info_membersonly",{nickname:nickname,escapeInterpolation:!0}))},332:function(room){jsxc.muc.close(room),jsxc.gui.window.postMessage(room,"sys",$.t("muc_removed_shutdown"))}},postReason:function(room,xdata){var actor={name:xdata.find("actor").attr("nick"),jid:xdata.find("actor").attr("jid")},reason=xdata.find("reason").text();""!==reason&&(reason=$.t("Reason")+": "+reason,"string"==typeof actor.name||"string"==typeof actor.jid?jsxc.gui.window.postMessage(room,"in",reason,!1,!1,null,actor):jsxc.gui.window.postMessage(room,"sys",reason))},insertMember:function(room,nickname,memberdata){var self=jsxc.muc,win=jsxc.gui.window.get(room),jid=memberdata.jid,m=win.find('.jsxc_memberlist li[data-nickname="'+nickname+'"]');if(0===m.length){var title=jsxc.escapeHTML(nickname);if(m=$('<li><div class="jsxc_avatar"></div><div class="jsxc_name"/></li>'),m.attr("data-nickname",nickname),win.find(".jsxc_memberlist ul").append(m),"string"==typeof jid){m.find(".jsxc_name").text(jsxc.jidToBid(jid)),m.attr("data-bid",jsxc.jidToBid(jid)),title=title+"\n"+jsxc.jidToBid(jid);var data=jsxc.storage.getUserItem("buddy",jsxc.jidToBid(jid));null!==data&&"object"==typeof data?jsxc.gui.updateAvatar(m,jsxc.jidToBid(jid),data.avatar):jsxc.jidToBid(jid)===jsxc.jidToBid(self.conn.jid)&&jsxc.gui.updateAvatar(m,jsxc.jidToBid(jid),"own")}else m.find(".jsxc_name").text(nickname),jsxc.gui.avatarPlaceholder(m.find(".jsxc_avatar"),nickname);m.attr("title",title)}},removeMember:function(room,nickname){var win=jsxc.gui.window.get(room),m=win.find('.jsxc_memberlist li[data-nickname="'+nickname+'"]');m.length>0&&m.remove()},scrollMemberListBy:function(room,offset){var win=jsxc.gui.window.get(room);if(!win.find(".jsxc_memberlist").hasClass("jsxc_expand")){var el=win.find(".jsxc_memberlist ul:first"),scrollWidth=el.width(),width=win.find(".jsxc_memberlist").width(),left=parseInt(el.css("left"));left=isNaN(left)?0-offset:left-offset,width>scrollWidth||left>0?left=0:width-scrollWidth>left&&(left=width-scrollWidth),el.css("left",left+"px")}},emptyMembers:function(room){var win=jsxc.gui.window.get(room);win.find(".jsxc_memberlist").empty(),jsxc.storage.setUserItem("member",room,{})},onGroupchatMessage:function(message){var id=$(message).attr("id");if(jsxc.el_exists($("#"+id)))return!0;var from=$(message).attr("from"),body=$(message).find("body:first").text(),room=jsxc.jidToBid(from),nickname=Strophe.unescapeNode(Strophe.getResourceFromJid(from));if(""!==body){var delay=$(message).find('delay[xmlns="urn:xmpp:delay"]'),stamp=delay.length>0?new Date(delay.attr("stamp")):new Date;stamp=stamp.getTime();var member=jsxc.storage.getUserItem("member",room)||{},sender={};sender.name=nickname,member[nickname]&&"string"==typeof member[nickname].jid&&(sender.jid=member[nickname].jid),jsxc.gui.window.postMessage(room,"in",body,!1,!1,stamp,sender)}var subject=$(message).find("subject");if(subject.length>0){var roomdata=jsxc.storage.getUserItem("buddy",room);roomdata.subject=subject.text(),jsxc.storage.setUserItem("buddy",room,roomdata),jsxc.gui.window.postMessage(room,"sys",$.t("changed_subject_to",{nickname:nickname,subject:subject.text()}))}return!0},onErrorMessage:function(message){var room=jsxc.jidToBid($(message).attr("from"));return 0===jsxc.gui.window.get(room).length?!0:($(message).find("item-not-found").length>0?jsxc.gui.window.postMessage(room,"sys",$.t("message_not_send_item-not-found")):$(message).find("forbidden").length>0?jsxc.gui.window.postMessage(room,"sys",$.t("message_not_send_forbidden")):$(message).find("not-acceptable").length>0?jsxc.gui.window.postMessage(room,"sys",$.t("message_not_send_not-acceptable")):jsxc.gui.window.postMessage(room,"sys",$.t("message_not_send")),jsxc.debug("[muc] error message for "+room,$(message).find("error")[0]),!0)},onAddRoster:function(event,room,data,bud){var self=jsxc.muc;"groupchat"===data.type&&bud.find(".jsxc_delete").off("click").click(function(){return self.leave(room),!1})}},$(document).on("init.window.jsxc",jsxc.muc.initWindow),$(document).on("add.roster.jsxc",jsxc.muc.onAddRoster),$(document).one("attached.jsxc",function(){jsxc.muc.init()}),$(document).one("connected.jsxc",function(){jsxc.storage.removeUserItem("roomNames"),jsxc.storage.removeUserItem("ownNicknames")}),jsxc.notice={_num:0,load:function(){$("#jsxc_notice ul li").remove(),$("#jsxc_notice > span").text(""),jsxc.notice._num=0;var saved=jsxc.storage.getUserItem("notices")||[],key=null;for(key in saved)if(saved.hasOwnProperty(key)){var val=saved[key];jsxc.notice.add(val.msg,val.description,val.fnName,val.fnParams,key)}},add:function(msg,description,fnName,fnParams,id){var nid=id||Date.now(),list=$("#jsxc_notice ul"),notice=$("<li/>");if(notice.click(function(){return jsxc.notice.remove(nid),jsxc.exec(fnName,fnParams),!1}),notice.text(msg),notice.attr("title",description||""),notice.attr("data-nid",nid),list.append(notice),$("#jsxc_notice > span").text(++jsxc.notice._num),!id){var saved=jsxc.storage.getUserItem("notices")||{};saved[nid]={msg:msg,description:description,fnName:fnName,fnParams:fnParams},jsxc.storage.setUserItem("notices",saved),jsxc.notification.notify(msg,description||"",null,!0,jsxc.CONST.SOUNDS.NOTICE)}},remove:function(nid){var el=$("#jsxc_notice li[data-nid="+nid+"]");el.remove(),$("#jsxc_notice > span").text(--jsxc.notice._num||"");var s=jsxc.storage.getUserItem("notices");delete s[nid],jsxc.storage.setUserItem("notices",s)},has:function(fnName){var saved=jsxc.storage.getUserItem("notices")||[],has=!1;return $.each(saved,function(index,val){return val.fnName===fnName?(has=!0,!1):void 0}),has}},jsxc.notification={audio:null,init:function(){$(document).on("postmessagein.jsxc",function(event,bid,msg){msg=msg.match(/^\?OTR/)?$.t("Encrypted_message"):msg;var data=jsxc.storage.getUserItem("buddy",bid);jsxc.notification.notify({title:$.t("New_message_from")+" "+data.name,msg:msg,soundFile:jsxc.CONST.SOUNDS.MSG,source:bid})}),$(document).on("callincoming.jingle",function(){jsxc.notification.playSound(jsxc.CONST.SOUNDS.CALL,!0,!0)}),$(document).on("accept.call.jsxc reject.call.jsxc",function(){jsxc.notification.stopSound()})},notify:function(title,msg,d,force,soundFile,loop,source){if(jsxc.options.notification&&jsxc.notification.hasPermission()){var o;if(o=null!==title&&"object"==typeof title?title:{title:title,msg:msg,duration:d,force:force,soundFile:soundFile,loop:loop,source:source},!jsxc.hasFocus()||o.force){var icon=o.icon||jsxc.options.root+"/img/XMPP_logo.png";if("string"==typeof o.source){var data=jsxc.storage.getUserItem("buddy",o.source),src=jsxc.storage.getUserItem("avatar",data.avatar);"string"==typeof src&&"0"!==src&&(icon=src)}jsxc.toNotification=setTimeout(function(){"string"==typeof o.soundFile&&jsxc.notification.playSound(o.soundFile,o.loop,o.force);var popup=new Notification($.t(o.title),{body:$.t(o.msg),icon:icon}),duration=o.duration||jsxc.options.popupDuration;duration>0&&setTimeout(function(){popup.close()},duration)},jsxc.toNotificationDelay)}}},hasSupport:function(){if(window.webkitNotifications){window.Notification=function(title,opt){var popup=window.webkitNotifications.createNotification(null,title,opt.body);return popup.show(),popup.close=function(){popup.cancel()},popup};var permission;switch(window.webkitNotifications.checkPermission()){case 0:permission=jsxc.CONST.NOTIFICATION_GRANTED;break;case 2:permission=jsxc.CONST.NOTIFICATION_DENIED;break;default:permission=jsxc.CONST.NOTIFICATION_DEFAULT}return window.Notification.permission=permission,window.Notification.requestPermission=function(func){window.webkitNotifications.requestPermission(func)},!0}return window.Notification?!0:!1},prepareRequest:function(){jsxc.notice.has("gui.showRequestNotification")||$(document).one("postmessagein.jsxc",function(){setTimeout(function(){jsxc.notice.add($.t("Notifications")+"?",$.t("Should_we_notify_you_"),"gui.showRequestNotification")},1e3)})},requestPermission:function(){window.Notification.requestPermission(function(status){window.Notification.permission!==status&&(window.Notification.permission=status),$(document).trigger(jsxc.notification.hasPermission()?"notificationready.jsxc":"notificationfailure.jsxc")})},hasPermission:function(){return window.Notification.permission===jsxc.CONST.NOTIFICATION_GRANTED},playSound:function(soundFile,loop,force){if(jsxc.master&&!jsxc.options.get("muteNotification")&&"dnd"!==jsxc.storage.getUserItem("presence")&&(!jsxc.hasFocus()||force)){jsxc.notification.stopSound();var audio=new Audio(jsxc.options.root+"/sound/"+soundFile);audio.loop=loop||!1,audio.play(),jsxc.notification.audio=audio}},stopSound:function(){var audio=jsxc.notification.audio;"undefined"!=typeof audio&&null!==audio&&(audio.pause(),jsxc.notification.audio=null)},muteSound:function(external){$("#jsxc_menu .jsxc_muteNotification").text($.t("Unmute")),external!==!0&&jsxc.options.set("muteNotification",!0)},unmuteSound:function(external){$("#jsxc_menu .jsxc_muteNotification").text($.t("Mute")),external!==!0&&jsxc.options.set("muteNotification",!1)}},jsxc.options={app_name:"web applications",timeout:3e3,busyTimeout:15e3,otr:{enable:!0,ERROR_START_AKE:!1,debug:!1,SEND_WHITESPACE_TAG:!0,WHITESPACE_START_AKE:!0},xmpp:{url:null,jid:null,domain:null,password:null,overwrite:!1,onlogin:!0},priority:{online:0,chat:0,away:0,xa:0,dnd:0},loginForm:{form:null,jid:null,pass:null,preJid:function(jid){return jid},onConnecting:"dialog",onConnected:"submit",onAuthFail:"submit"},logoutElement:null,numberOfMsg:10,defaultLang:"en",autoLang:!0,rosterAppend:"body",notification:!0,popupDuration:6e3,root:"",loginTimeout:6e5,displayRosterMinimized:function(){return!1},hideOffline:!1,muteNotification:!1,defaultAvatar:function(jid){jsxc.gui.avatarPlaceholder($(this).find(".jsxc_avatar"),jid)},loadSettings:function(){},saveSettinsPermanent:function(){},carbons:{enable:!1},getUsers:null},jsxc.otr={objects:{},dsaFallback:null,receiveMessage:function(d){var bid=d.bid;jsxc.otr.objects[bid].msgstate!==OTR.CONST.MSGSTATE_PLAINTEXT&&jsxc.otr.backup(bid),jsxc.otr.objects[bid].msgstate===OTR.CONST.MSGSTATE_PLAINTEXT||d.encrypted?jsxc.gui.window.postMessage(bid,"in",d.msg,d.encrypted,d.forwarded,d.stamp):jsxc.gui.window.postMessage(bid,"sys",$.t("Received_an_unencrypted_message")+". ["+d.msg+"]",d.encrypted,d.forwarded,d.stamp)},sendMessage:function(jid,msg,uid){0!==jsxc.otr.objects[jsxc.jidToBid(jid)].msgstate&&jsxc.otr.backup(jsxc.jidToBid(jid)),jsxc.xmpp._sendMessage(jid,msg,uid)},create:function(bid){if(!jsxc.otr.objects.hasOwnProperty(bid)&&jsxc.options.otr.priv){var ol=jsxc.storage.getUserItem("otrlist")||[];ol.indexOf(bid)<0&&(ol.push(bid),jsxc.storage.setUserItem("otrlist",ol)),jsxc.otr.objects[bid]=new OTR(jsxc.options.otr),jsxc.options.otr.SEND_WHITESPACE_TAG&&(jsxc.otr.objects[bid].SEND_WHITESPACE_TAG=!0),jsxc.options.otr.WHITESPACE_START_AKE&&(jsxc.otr.objects[bid].WHITESPACE_START_AKE=!0),jsxc.otr.objects[bid].on("status",function(status){var data=jsxc.storage.getUserItem("buddy",bid);if(null!==data){switch(status){case OTR.CONST.STATUS_SEND_QUERY:jsxc.gui.window.postMessage(bid,"sys",$.t("trying_to_start_private_conversation"));break;case OTR.CONST.STATUS_AKE_SUCCESS:data.fingerprint=jsxc.otr.objects[bid].their_priv_pk.fingerprint(),data.msgstate=OTR.CONST.MSGSTATE_ENCRYPTED;var msg=$.t(jsxc.otr.objects[bid].trust?"Verified":"Unverified")+" "+$.t("private_conversation_started");jsxc.gui.window.postMessage(bid,"sys",msg);break;case OTR.CONST.STATUS_END_OTR:data.fingerprint=null,jsxc.otr.objects[bid].msgstate===OTR.CONST.MSGSTATE_PLAINTEXT?(data.msgstate=OTR.CONST.MSGSTATE_PLAINTEXT,jsxc.gui.window.postMessage(bid,"sys",$.t("private_conversation_aborted"))):(data.msgstate=OTR.CONST.MSGSTATE_FINISHED,jsxc.gui.window.postMessage(bid,"sys",$.t("your_buddy_closed_the_private_conversation_you_should_do_the_same")));break;case OTR.CONST.STATUS_SMP_HANDLE:jsxc.keepBusyAlive()}jsxc.storage.setUserItem("buddy",bid,data),jsxc.gui.update(bid)}}),jsxc.otr.objects[bid].on("smp",function(type,data){switch(type){case"question":if(jsxc.gui.window.postMessage(bid,"sys",$.t("Authentication_request_received")),$("#jsxc_dialog").length>0){jsxc.otr.objects[bid].sm.abort();break}jsxc.otr.onSmpQuestion(bid,data),jsxc.storage.setUserItem("smp_"+bid,{data:data||null});break;case"trust":jsxc.otr.objects[bid].trust=data,jsxc.storage.updateUserItem("buddy",bid,"trust",data),jsxc.otr.backup(bid),jsxc.gui.update(bid),data?jsxc.gui.window.postMessage(bid,"sys",$.t("conversation_is_now_verified")):jsxc.gui.window.postMessage(bid,"sys",$.t("authentication_failed")),jsxc.storage.removeUserItem("smp_"+bid),jsxc.gui.dialog.close();break;case"abort":jsxc.gui.window.postMessage(bid,"sys",$.t("Authentication_aborted"));break;default:jsxc.debug("[OTR] sm callback: Unknown type: "+type)}}),jsxc.otr.objects[bid].on("ui",function(msg,encrypted,meta){jsxc.otr.receiveMessage({bid:bid,msg:msg,encrypted:encrypted===!0,stamp:meta.stamp,forwarded:meta.forwarded})}),jsxc.otr.objects[bid].on("io",function(msg,uid){var jid=jsxc.gui.window.get(bid).data("jid")||jsxc.otr.objects[bid].jid;jsxc.otr.objects[bid].jid=jid,jsxc.otr.sendMessage(jid,msg,uid)}),jsxc.otr.objects[bid].on("error",function(err){"Received an unencrypted message."!==err&&jsxc.gui.window.postMessage(bid,"sys","[OTR] "+$.t(err)),jsxc.error("[OTR] "+err)}),jsxc.otr.restore(bid)}},onSmpQuestion:function(bid,data){jsxc.gui.showVerification(bid),$("#jsxc_dialog select").prop("selectedIndex",data?2:3).change(),$("#jsxc_dialog > div:eq(0)").hide(),data?($("#jsxc_dialog > div:eq(2)").find("#jsxc_quest").val(data).prop("disabled",!0),$("#jsxc_dialog > div:eq(2)").find(".creation").text("Answer"),$("#jsxc_dialog > div:eq(2)").find(".jsxc_explanation").text($.t("your_buddy_is_attempting_to_determine_")+" "+$.t("to_authenticate_to_your_buddy")+$.t("enter_the_answer_and_click_answer"))):$("#jsxc_dialog > div:eq(3)").find(".jsxc_explanation").text($.t("your_buddy_is_attempting_to_determine_")+" "+$.t("to_authenticate_to_your_buddy")+$.t("enter_the_secret")),$("#jsxc_dialog .jsxc_close").click(function(){jsxc.storage.removeUserItem("smp_"+bid),jsxc.master&&jsxc.otr.objects[bid].sm.abort()})},sendSmpReq:function(bid,sec,quest){jsxc.keepBusyAlive(),jsxc.otr.objects[bid].smpSecret(sec,quest||"")},toggleTransfer:function(bid){"function"==typeof OTR&&(0===jsxc.storage.getUserItem("buddy",bid).msgstate?jsxc.otr.goEncrypt(bid):jsxc.otr.goPlain(bid))},goEncrypt:function(bid){jsxc.master?jsxc.otr.objects.hasOwnProperty(bid)&&jsxc.otr.objects[bid].sendQueryMsg():jsxc.storage.updateUserItem("buddy",bid,"transferReq",1)},goPlain:function(bid,cb){jsxc.master?jsxc.otr.objects.hasOwnProperty(bid)&&(jsxc.otr.objects[bid].endOtr.call(jsxc.otr.objects[bid],cb),jsxc.otr.objects[bid].init.call(jsxc.otr.objects[bid]),jsxc.otr.backup(bid)):jsxc.storage.updateUserItem("buddy",bid,"transferReq",0)},backup:function(bid){var o=jsxc.otr.objects[bid],r={};if(null!==o){var i,savekey=["jid","our_instance_tag","msgstate","authstate","fragment","their_y","their_old_y","their_keyid","their_instance_tag","our_dh","our_old_dh","our_keyid","sessKeys","storedMgs","oldMacKeys","trust","transmittedRS","ssid","receivedPlaintext","authstate","send_interval"];for(i=0;i<savekey.length;i++)r[savekey[i]]=JSON.stringify(o[savekey[i]]);null!==o.their_priv_pk&&(r.their_priv_pk=JSON.stringify(o.their_priv_pk.packPublic())),o.ake.otr_version&&""!==o.ake.otr_version&&(r.otr_version=JSON.stringify(o.ake.otr_version)),jsxc.storage.setUserItem("otr",bid,r)}},restore:function(bid){var o=jsxc.otr.objects[bid],d=jsxc.storage.getUserItem("otr",bid);if(null!==o||null!==d){var key;for(key in d)if(d.hasOwnProperty(key)){var val=JSON.parse(d[key]);"their_priv_pk"===key&&null!==val&&(val=DSA.parsePublic(val)),"otr_version"===key&&null!==val?o.ake.otr_version=val:o[key]=val}jsxc.otr.objects[bid]=o,1===o.msgstate&&null!==o.their_priv_pk&&o._smInit.call(jsxc.otr.objects[bid])}jsxc.otr.enable(bid)},createDSA:function(){if(!jsxc.options.otr.priv){if("function"!=typeof OTR)return jsxc.warn("OTR support disabled"),OTR={},OTR.CONST={MSGSTATE_PLAINTEXT:0,MSGSTATE_ENCRYPTED:1,MSGSTATE_FINISHED:2},void jsxc._onMaster();if(null===jsxc.storage.getUserItem("key")){var msg=$.t("Creating_your_private_key_"),worker=null;if(Worker)try{worker=new Worker(jsxc.options.root+"/lib/otr/build/dsa-webworker.js")}catch(err){jsxc.warn("Couldn't create web-worker.",err)}jsxc.otr.dsaFallback=null===worker,jsxc.otr.dsaFallback?(jsxc.gui.dialog.open(jsxc.gui.template.get("waitAlert",null,msg),{noClose:!0}),jsxc.debug("DSA key creation started."),setTimeout(function(){var dsa=new DSA;jsxc.otr.DSAready(dsa)},500)):(jsxc._onMaster(),worker.onmessage=function(e){var type=e.data.type,val=e.data.val;"debug"===type?jsxc.debug(val):"data"===type&&jsxc.otr.DSAready(DSA.parsePrivate(val))},worker.postMessage({imports:[jsxc.options.root+"/lib/otr/vendor/salsa20.js",jsxc.options.root+"/lib/otr/vendor/bigint.js",jsxc.options.root+"/lib/otr/vendor/crypto.js",jsxc.options.root+"/lib/otr/vendor/eventemitter.js",jsxc.options.root+"/lib/otr/lib/const.js",jsxc.options.root+"/lib/otr/lib/helpers.js",jsxc.options.root+"/lib/otr/lib/dsa.js"],seed:BigInt.getSeed(),debug:!0}))}else jsxc.debug("DSA key loaded"),jsxc.options.otr.priv=DSA.parsePrivate(jsxc.storage.getUserItem("key")),jsxc.otr._createDSA()}},_createDSA:function(){jsxc.storage.setUserItem("priv_fingerprint",jsxc.options.otr.priv.fingerprint()),jsxc.otr.dsaFallback!==!1&&jsxc._onMaster()},DSAready:function(dsa){jsxc.storage.setUserItem("key",dsa.packPrivate()),jsxc.options.otr.priv=dsa,jsxc.otr.dsaFallback?jsxc.gui.dialog.close():$.each(jsxc.storage.getUserItem("windowlist"),function(index,val){jsxc.otr.create(val)}),jsxc.otr._createDSA()},enable:function(bid){jsxc.gui.window.get(bid).find(".jsxc_otr").removeClass("jsxc_disabled")}},jsxc.storage={PREFIX:"jsxc",SEP:":",getPrefix:function(uk){var self=jsxc.storage;return self.PREFIX+self.SEP+(uk&&jsxc.bid?jsxc.bid+self.SEP:"")},setItem:function(key,value,uk){jsxc.storageNotConform>0&&"rid"!==key&&"lastActivity"!==key&&(jsxc.storageNotConform>1&&null===jsxc.toSNC&&(jsxc.toSNC=window.setTimeout(function(){jsxc.storageNotConform=0,jsxc.storage.setItem("storageNotConform",0)},1e3)),jsxc.ls.push(JSON.stringify({key:key,value:value}))),"object"==typeof value&&(value=JSON.stringify(value)),localStorage.setItem(jsxc.storage.getPrefix(uk)+key,value)},setUserItem:function(type,key,value){var self=jsxc.storage;return 2===arguments.length?(value=key,key=type,type=""):3===arguments.length&&(key=type+self.SEP+key),jsxc.storage.setItem(key,value,!0)},getItem:function(key,uk){key=jsxc.storage.getPrefix(uk)+key;
-var value=localStorage.getItem(key);try{return JSON.parse(value)}catch(e){return value}},getUserItem:function(type,key){var self=jsxc.storage;return 1===arguments.length?key=type:2===arguments.length&&(key=type+self.SEP+key),jsxc.storage.getItem(key,!0)},removeItem:function(key,uk){jsxc.storageNotConform&&"rid"!==key&&"lastActivity"!==key&&jsxc.ls.push(JSON.stringify({key:jsxc.storage.prefix+key,value:""})),localStorage.removeItem(jsxc.storage.getPrefix(uk)+key)},removeUserItem:function(type,key){var self=jsxc.storage;1===arguments.length?key=type:2===arguments.length&&(key=type+self.SEP+key),jsxc.storage.removeItem(key,!0)},updateItem:function(key,variable,value,uk){var data=jsxc.storage.getItem(key,uk)||{};"object"==typeof variable?$.each(variable,function(key,val){"undefined"==typeof data[key]&&jsxc.debug("Variable "+key+" doesn't exist in "+variable+". It was created."),data[key]=val}):("undefined"==typeof data[variable]&&jsxc.debug("Variable "+variable+" doesn't exist. It was created."),data[variable]=value),jsxc.storage.setItem(key,data,uk)},updateUserItem:function(type,key,variable,value){var self=jsxc.storage;return 4===arguments.length||3===arguments.length&&"object"==typeof variable?key=type+self.SEP+key:(value=variable,variable=key,key=type),jsxc.storage.updateItem(key,variable,value,!0)},ink:function(key,uk){jsxc.storage.setItem(key,Number(jsxc.storage.getItem(key,uk))+1,uk)},removeElement:function(key,name,uk){var item=jsxc.storage.getItem(key,uk);$.isArray(item)?item=$.grep(item,function(e){return e!==name}):"object"==typeof item&&delete item[name],jsxc.storage.setItem(key,item,uk)},removeUserElement:function(type,key,name){var self=jsxc.storage;return 2===arguments.length?(name=key,key=type):3===arguments.length&&(key=type+self.SEP+key),jsxc.storage.removeElement(key,name,!0)},onStorage:function(e){if(e.key!==jsxc.storage.PREFIX+jsxc.storage.SEP+"rid"&&e.key!==jsxc.storage.PREFIX+jsxc.storage.SEP+"lastActivity"){var re=new RegExp("^"+jsxc.storage.PREFIX+jsxc.storage.SEP+"(?:[^"+jsxc.storage.SEP+"]+@[^"+jsxc.storage.SEP+"]+"+jsxc.storage.SEP+")?(.*)","i"),key=e.key.replace(re,"$1");if(jsxc.storageNotConform>0&&jsxc.ls.length>0){var val=e.newValue;try{val=JSON.parse(val)}catch(err){}var index=$.inArray(JSON.stringify({key:key,value:val}),jsxc.ls);if(index>=0)return jsxc.storageNotConform>1&&(window.clearTimeout(jsxc.toSNC),jsxc.storageNotConform=1,jsxc.storage.setItem("storageNotConform",1)),void jsxc.ls.splice(index,1)}if(e.oldValue!==e.newValue){var n,o,bid=key.replace(new RegExp("[^"+jsxc.storage.SEP+"]+"+jsxc.storage.SEP+"(.*)","i"),"$1");if(jsxc.master&&"alive"===key)return jsxc.debug("Master request."),void jsxc.storage.ink("alive");if(!(jsxc.master||"alive"!==key&&"alive_busy"!==key||jsxc.triggeredFromElement))return window.clearTimeout(jsxc.to),jsxc.to=window.setTimeout(jsxc.checkMaster,("alive"===key?jsxc.options.timeout:jsxc.options.busyTimeout)+jsxc.random(60)),void(jsxc.role_allocation||jsxc.onSlave());if(key.match(/^notices/)&&jsxc.notice.load(),key.match(/^presence/)&&jsxc.gui.changePresence(e.newValue,!0),key.match(/^options/)&&e.newValue&&(n=JSON.parse(e.newValue),"undefined"!=typeof n.muteNotification&&n.muteNotification?jsxc.notification.muteSound(!0):jsxc.notification.unmuteSound(!0)),key.match(/^hidden/)&&(jsxc.master?clearTimeout(jsxc.toNotification):jsxc.isHidden()),key.match(/^focus/)&&(jsxc.master?clearTimeout(jsxc.toNotification):jsxc.hasFocus()),key.match(new RegExp("^chat"+jsxc.storage.SEP)))for(var data,el,posts=JSON.parse(e.newValue);posts.length>0;)data=posts.pop(),el=$("#"+data.uid),0===el.length?(jsxc.master&&"out"===data.direction&&jsxc.xmpp.sendMessage(bid,data.msg,data.uid),jsxc.gui.window._postMessage(bid,data)):data.received&&el.addClass("jsxc_received");else{if(key.match(new RegExp("^window"+jsxc.storage.SEP)))return e.newValue?e.oldValue?(n=JSON.parse(e.newValue),n.minimize?jsxc.gui.window._hide(bid):jsxc.gui.window._show(bid),void jsxc.gui.window.setText(bid,n.text)):void jsxc.gui.window.open(bid):void jsxc.gui.window._close(bid);if(key.match(new RegExp("^smp"+jsxc.storage.SEP))){if(!e.newValue)return jsxc.gui.dialog.close(),void(jsxc.master&&jsxc.otr.objects[bid].sm.abort());n=JSON.parse(e.newValue),"undefined"!=typeof n.data?jsxc.otr.onSmpQuestion(bid,n.data):jsxc.master&&n.sec&&(jsxc.gui.dialog.close(),jsxc.otr.sendSmpReq(bid,n.sec,n.quest))}if(!jsxc.master&&key.match(new RegExp("^buddy"+jsxc.storage.SEP))){if(!e.newValue)return void jsxc.gui.roster.purge(bid);if(!e.oldValue)return void jsxc.gui.roster.add(bid);n=JSON.parse(e.newValue),o=JSON.parse(e.oldValue),jsxc.gui.update(bid),(o.status!==n.status||o.sub!==n.sub)&&jsxc.gui.roster.reorder(bid)}if(jsxc.master&&key.match(new RegExp("^deletebuddy"+jsxc.storage.SEP))&&e.newValue&&(n=JSON.parse(e.newValue),jsxc.xmpp.removeBuddy(n.jid),jsxc.storage.removeUserItem(key)),jsxc.master&&key.match(new RegExp("^buddy"+jsxc.storage.SEP))&&(n=JSON.parse(e.newValue),o=JSON.parse(e.oldValue),o.transferReq!==n.transferReq&&(jsxc.storage.updateUserItem("buddy",bid,"transferReq",-1),0===n.transferReq&&jsxc.otr.goPlain(bid),1===n.transferReq&&jsxc.otr.goEncrypt(bid)),o.name!==n.name&&jsxc.gui.roster._rename(bid,n.name)),"sid"===key)return void(e.newValue||jsxc.xmpp.logout());"friendReq"===key&&(n=JSON.parse(e.newValue),jsxc.master&&n.approve>=0&&jsxc.xmpp.resFriendReq(n.jid,n.approve)),jsxc.master&&key.match(new RegExp("^add"+jsxc.storage.SEP))&&(n=JSON.parse(e.newValue),jsxc.xmpp.addBuddy(n.username,n.alias)),"roster"===key&&jsxc.gui.roster.toggle(),jsxc.master&&key.match(new RegExp("^vcard"+jsxc.storage.SEP))&&null!==e.newValue&&e.newValue.match(/^request:/)&&jsxc.xmpp.loadVcard(bid,function(stanza){jsxc.storage.setUserItem("vcard",bid,{state:"success",data:$("<div>").append(stanza).html()})},function(){jsxc.storage.setUserItem("vcard",bid,{state:"error"})}),jsxc.master||!key.match(new RegExp("^vcard"+jsxc.storage.SEP))||null===e.newValue||e.newValue.match(/^request:/)||(n=JSON.parse(e.newValue),"undefined"!=typeof n.state&&$(document).trigger("loaded.vcard.jsxc",n),jsxc.storage.removeUserItem("vcard",bid))}}}},saveMessage:function(bid,direction,msg,encrypted,forwarded,stamp,sender){var chat=jsxc.storage.getUserItem("chat",bid)||[],uid=(new Date).getTime()+":msg";chat.length>jsxc.options.get("numberOfMsg")&&chat.pop();var post={direction:direction,msg:msg,uid:uid.replace(/:/,"-"),received:!1,encrypted:encrypted||!1,forwarded:forwarded||!1,stamp:stamp||(new Date).getTime(),sender:sender};return chat.unshift(post),jsxc.storage.setUserItem("chat",bid,chat),post},saveBuddy:function(bid,data){return jsxc.storage.getUserItem("buddy",bid)?(jsxc.storage.updateUserItem("buddy",bid,data),"updated"):(jsxc.storage.setUserItem("buddy",bid,$.extend({jid:"",name:"",status:0,sub:"none",msgstate:0,transferReq:-1,trust:!1,fingerprint:null,res:[],type:"chat"},data)),"created")}},jsxc.gui.template.incomingCall='<h3 data-i18n="Incoming_call"></h3> <p><span data-i18n="Do_you_want_to_accept_the_call_from"></span> {{bid_name}}?</p> <p class="jsxc_right"> <a href="#" class="button jsxc_reject" data-i18n="Reject"></a> <a href="#" class="button creation jsxc_accept" data-i18n="Accept"></a> </p>',jsxc.gui.template.allowMediaAccess='<p data-i18n="Please_allow_access_to_microphone_and_camera"></p>',jsxc.gui.template.videoWindow='<div class="jsxc_webrtc"> <div class="jsxc_chatarea"> <ul></ul> </div> <div class="jsxc_videoContainer"> <video class="jsxc_localvideo" autoplay></video> <video class="jsxc_remotevideo" autoplay></video> <div class="jsxc_status"></div> <div class="bubblingG"> <span id="bubblingG_1"> </span> <span id="bubblingG_2"> </span> <span id="bubblingG_3"> </span> </div> <div class="jsxc_noRemoteVideo"> <div> <div></div> <p data-i18n="No_video_signal"></p> <div></div> </div> </div> </div> <div class="jsxc_controlbar"> <button type="button" class="jsxc_hangUp" data-i18n="hang_up"></button> <input type="range" class="jsxc_volume" min="0.0" max="1.0" step="0.05" value="0.5" /> <div class="jsxc_buttongroup"> <button type="button" class="jsxc_snapshot" data-i18n="snapshot"></button><button type="button" class="jsxc_snapshots">&#9660;</button> </div> <!-- <button type="button" class="jsxc_mute_local" data-i18n="mute_my_audio"></button> <button type="button" class="jsxc_pause_local" data-i18n="pause_my_video"></button> --> <button type="button" class="jsxc_showchat" data-i18n="chat"></button> <button type="button" class="jsxc_fullscreen" data-i18n="fullscreen"></button> <button type="button" class="jsxc_info" data-i18n="Info"></button> </div> <div class="jsxc_multi"> <div class="jsxc_snapshotbar"> <p>No pictures yet!</p> </div>\n <!--<div class="jsxc_chatarea"> <ul></ul> </div>--> <div class="jsxc_infobar"></div> </div> </div>',jsxc.webrtc={conn:null,localStream:null,remoteStream:null,last_caller:null,AUTO_ACCEPT:!1,reqVideoFeatures:["urn:xmpp:jingle:apps:rtp:video","urn:xmpp:jingle:apps:rtp:audio","urn:xmpp:jingle:transports:ice-udp:1","urn:xmpp:jingle:apps:dtls:0"],chatJids:{},init:function(){var self=jsxc.webrtc;return self.conn=jsxc.xmpp.conn,"firefox"===RTC.browser&&(self.conn.jingle.media_constraints.mandatory.MozDontOfferDataChannel=!0),self.conn.jingle?(self.conn.jingle.PRANSWER=!1,self.conn.jingle.AUTOACCEPT=!1,self.conn.jingle.ice_config=jsxc.storage.getUserItem("iceConfig"),self.conn.jingle.MULTIPARTY=!1,self.conn.jingle.pc_constraints=RTC.pc_constraints,$(document).on("message.jsxc",$.proxy(self.onMessage,self)),$(document).on("presence.jsxc",$.proxy(self.onPresence,self)),$(document).on("mediaready.jingle",$.proxy(self.onMediaReady,self)),$(document).on("mediafailure.jingle",$.proxy(self.onMediaFailure,self)),$(document).on("callincoming.jingle",$.proxy(self.onCallIncoming,self)),$(document).on("callterminated.jingle",$.proxy(self.onCallTerminated,self)),$(document).on("ringing.jingle",$.proxy(self.onCallRinging,self)),$(document).on("remotestreamadded.jingle",$.proxy(self.onRemoteStreamAdded,self)),$(document).on("remotestreamremoved.jingle",$.proxy(self.onRemoteStreamRemoved,self)),$(document).on("iceconnectionstatechange.jingle",$.proxy(self.onIceConnectionStateChanged,self)),$(document).on("nostuncandidates.jingle",$.proxy(self.noStunCandidates,self)),$(document).on("error.jingle",function(ev,sid,error){jsxc.error("[JINGLE]",error)}),self.conn.disco&&self.conn.disco.addFeature("urn:xmpp:jingle:apps:dtls:0"),self.conn.caps&&$(document).on("caps.strophe",$.proxy(self.onCaps,self)),void self.getTurnCrendentials()):void jsxc.error("No jingle plugin found!")},getTurnCrendentials:function(){if(!jsxc.options.turnCredentialsPath)return void jsxc.debug("No path for TURN credentials defined!");var ttl=(jsxc.storage.getUserItem("iceValidity")||0)-(new Date).getTime();return ttl>0?void window.setTimeout(jsxc.webrtc.getTurnCrendentials,ttl+500):void $.ajax(jsxc.options.turnCredentialsPath,{async:!0,success:function(data){var iceConfig={iceServers:[{url:"turn:"+data.url,credential:data.credential,username:data.username}]};jsxc.webrtc.conn.jingle.ice_config=iceConfig,jsxc.storage.setUserItem("iceConfig",iceConfig),jsxc.storage.setUserItem("iceValidity",(new Date).getTime()+1e3*data.ttl)},dataType:"json"})},getCapableRes:function(jid){var self=jsxc.webrtc,bid=jsxc.jidToBid(jid),res=jsxc.storage.getUserItem("res",bid)||[],available=[];return $.each(res,function(r){self.conn.caps.hasFeatureByJid(bid+"/"+r,self.reqVideoFeatures)&&available.push(r)}),available},onAddRosterItem:function(event,bid,data,el){var self=jsxc.webrtc;if(!self.conn)return void $(document).one("connectionReady.jsxc",function(){self.onAddRosterItem(null,bid,data,el)});var videoIcon=$('<div class="jsxc_video jsxc_disabled" title="'+$.t("Start_video_call")+'"></div>');videoIcon.click(function(){return self.startCall(data.jid),!1}),el.find(".jsxc_options.jsxc_left").append(videoIcon),el.on("extra.jsxc",function(){self.updateIcon(bid)})},initWindow:function(event,win){var self=jsxc.webrtc;if(!win.hasClass("jsxc_groupchat")){if(jsxc.debug("webrtc.initWindow"),!self.conn)return void $(document).one("connectionReady.jsxc",function(){self.initWindow(null,win)});var div=$("<div>").addClass("jsxc_video");win.find(".jsxc_transfer:eq(1)").after(div),self.updateIcon(jsxc.jidToBid(win.data("jid")))}},updateIcon:function(bid){jsxc.debug("Update icon",bid);var self=jsxc.webrtc;if(bid!==jsxc.jidToBid(self.conn.jid)){var win=jsxc.gui.window.get(bid),jid=win.data("jid"),ls=jsxc.storage.getUserItem("buddy",bid);if("string"!=typeof jid){if(!ls||"string"!=typeof ls.jid)return void jsxc.debug("[webrtc] Could not update icon, because could not find jid for "+bid);jid=ls.jid}var el=win.find(".jsxc_video").add(jsxc.gui.roster.getItem(bid).find(".jsxc_video")),capableRes=self.getCapableRes(jid),targetRes=Strophe.getResourceFromJid(jid);null===targetRes&&($.each(jsxc.storage.getUserItem("buddy",bid).res||[],function(index,val){return capableRes.indexOf(val)>-1?(targetRes=val,!1):void 0}),jid=jid+"/"+targetRes),el.off("click"),capableRes.indexOf(targetRes)>-1?(el.click(function(){self.startCall(jid)}),el.removeClass("jsxc_disabled"),el.attr("title",$.t("Start_video_call"))):(el.addClass("jsxc_disabled"),el.attr("title",$.t("Video_call_not_possible")))}},onMessage:function(e,from){var self=jsxc.webrtc,bid=jsxc.jidToBid(from);jsxc.debug("webrtc.onmessage",from),self.chatJids[bid]!==from&&(self.updateIcon(bid),self.chatJids[bid]=from)},onPresence:function(ev,jid,status,presence){var self=jsxc.webrtc;0===$(presence).find('c[xmlns="'+Strophe.NS.CAPS+'"]').length&&(jsxc.debug("webrtc.onpresence",jid),self.updateIcon(jsxc.jidToBid(jid)))},setStatus:function(txt,d){var status=$(".jsxc_webrtc .jsxc_status"),duration="undefined"==typeof d||null===d?4e3:d;if(jsxc.debug("[Webrtc]",txt),status.html()&&(txt=status.html()+"<br />"+txt),status.html(txt),status.css({"margin-left":"-"+status.width()/2+"px",opacity:0,display:"block"}),status.stop().animate({opacity:1}),clearTimeout(status.data("timeout")),0!==duration){var to=setTimeout(function(){status.stop().animate({opacity:0},function(){status.html("")})},duration);status.data("timeout",to)}},onCaps:function(event,jid){var self=jsxc.webrtc;jsxc.gui.roster.loaded?self.updateIcon(jsxc.jidToBid(jid)):$(document).on("cloaded.roster.jsxc",function(){self.updateIcon(jsxc.jidToBid(jid))})},onMediaReady:function(event,stream){jsxc.debug("media ready");var self=jsxc.webrtc;self.localStream=stream,self.conn.jingle.localStream=stream,jsxc.gui.showVideoWindow(self.last_caller);var i;for(i=0;i<stream.getAudioTracks().length;i++)self.setStatus(stream.getAudioTracks().length>0?"Use local audio device.":"No local audio device."),jsxc.debug('using audio device "'+stream.getAudioTracks()[i].label+'"');for(i=0;i<stream.getVideoTracks().length;i++)self.setStatus(stream.getVideoTracks().length>0?"Use local video device.":"No local video device."),jsxc.debug('using video device "'+stream.getVideoTracks()[i].label+'"'),$("#jsxc_dialog .jsxc_localvideo").show();$(document).one("cleanup.dialog.jsxc",$.proxy(self.hangUp,self)),$(document).trigger("finish.mediaready.jsxc")},onMediaFailure:function(ev,err){this.setStatus("media failure"),jsxc.gui.window.postMessage(jsxc.jidToBid(jsxc.webrtc.last_caller),"sys",$.t("Media_failure")+err.name),jsxc.debug("media failure: "+err.name)},onCallIncoming:function(event,sid){jsxc.debug("incoming call"+sid);var self=this,sess=this.conn.jingle.sessions[sid],bid=jsxc.jidToBid(sess.peerjid);if(jsxc.gui.window.postMessage(bid,"sys",$.t("Incoming_call")),jsxc.notification.notify($.t("Incoming_call"),$.t("from")+" "+bid),sess.sendRinging(),jsxc.webrtc.last_caller=sess.peerjid,jsxc.switchEvents({"mediaready.jingle":function(event,stream){self.setStatus("Accept call"),sess.localStream=stream,sess.peerconnection.addStream(stream),sess.sendAnswer(),sess.accept()},"mediafailure.jingle":function(){sess.sendTerminate("decline"),sess.terminate()}}),jsxc.webrtc.AUTO_ACCEPT)return void self.reqUserMedia();var dialog=jsxc.gui.dialog.open(jsxc.gui.template.get("incomingCall",bid),{noClose:!0});dialog.find(".jsxc_accept").click(function(){$(document).trigger("accept.call.jsxc"),self.reqUserMedia()}),dialog.find(".jsxc_reject").click(function(){jsxc.gui.dialog.close(),$(document).trigger("reject.call.jsxc"),sess.sendTerminate("decline"),sess.terminate()})},onCallTerminated:function(event,sid,reason,text){this.setStatus("call terminated "+sid+(reason?": "+reason+" "+text:""));var bid=jsxc.jidToBid(jsxc.webrtc.last_caller);this.localStream&&this.localStream.stop(),$(".jsxc_videoContainer").length&&($(".jsxc_remotevideo")[0].src="",$(".jsxc_localvideo")[0].src=""),this.conn.jingle.localStream=null,this.localStream=null,this.remoteStream=null;var win=$("#jsxc_dialog .jsxc_chatarea > ul > li");$("#jsxc_windowList > ul").prepend(win.detach()),win.find(".slimScrollDiv").resizable("enable"),$(document).off("cleanup.dialog.jsxc"),$(document).off("error.jingle"),jsxc.gui.dialog.close(),jsxc.gui.window.postMessage(bid,"sys",$.t("Call_terminated")+(reason?": "+$.t(reason):"")+".")},onCallRinging:function(){this.setStatus("ringing...",0)},onRemoteStreamAdded:function(event,data,sid){this.setStatus("Remote stream for session "+sid+" added.");var stream=data.stream;this.remoteStream=stream;var sess=this.conn.jingle.sessions[sid],isVideoDevice=stream.getVideoTracks().length>0,isAudioDevice=stream.getAudioTracks().length>0;sess.remoteDevices={video:isVideoDevice,audio:isAudioDevice},this.setStatus(isVideoDevice?"Use remote video device.":"No remote video device"),this.setStatus(isAudioDevice?"Use remote audio device.":"No remote audio device"),$(".jsxc_remotevideo").length&&(RTC.attachMediaStream($("#jsxc_dialog .jsxc_remotevideo"),stream),$("#jsxc_dialog .jsxc_"+(isVideoDevice?"remotevideo":"noRemoteVideo")).addClass("jsxc_deviceAvailable"))},onRemoteStreamRemoved:function(event,data,sid){this.setStatus("Remote stream for session "+sid+" removed.")},onIceConnectionStateChanged:function(event,sid,sess){var sigState=sess.peerconnection.signalingState,iceCon=sess.peerconnection.iceConnectionState;if(jsxc.debug("iceGat state for "+sid,sess.peerconnection.iceGatheringState),jsxc.debug("iceCon state for "+sid,iceCon),jsxc.debug("sig state for "+sid,sigState),"stable"!==sigState||"connected"!==iceCon&&"completed"!==iceCon)"failed"===iceCon&&(jsxc.gui.window.postMessage(jsxc.jidToBid(sess.peerjid),"sys",$.t("ICE_connection_failure")),$(document).off("cleanup.dialog.jsxc"),sess.sendTerminate("failed-transport"),sess.terminate(),$(document).trigger("callterminated.jingle"));else{$("#jsxc_dialog .jsxc_deviceAvailable").show(),$("#jsxc_dialog .bubblingG").hide();var localSDP=sess.peerconnection.localDescription.sdp,remoteSDP=sess.peerconnection.remoteDescription.sdp;sess.local_fp=SDPUtil.parse_fingerprint(SDPUtil.find_line(localSDP,"a=fingerprint:")).fingerprint,sess.remote_fp=SDPUtil.parse_fingerprint(SDPUtil.find_line(remoteSDP,"a=fingerprint:")).fingerprint;var text="<p>";text+="<b>"+$.t("Local_Fingerprint")+": </b>"+sess.local_fp+"<br />",text+="<b>"+$.t("Remote_Fingerprint")+": </b>"+sess.remote_fp,text+="</p>",$("#jsxc_dialog .jsxc_infobar").html(text)}},noStunCandidates:function(){},startCall:function(jid,um){var self=this;return null===Strophe.getResourceFromJid(jid)?void jsxc.debug("We need a full jid"):(self.last_caller=jid,jsxc.switchEvents({"finish.mediaready.jsxc":function(){self.setStatus("Initiate call"),jsxc.gui.window.postMessage(jsxc.jidToBid(jid),"sys",$.t("Call_started")),$(document).one("error.jingle",function(e,sid,error){"offer"===error.source&&($(document).off("cleanup.dialog.jsxc"),setTimeout(function(){jsxc.gui.showAlert("Sorry, we couldn't establish a connection. Maybe your buddy is offline.")},500))}),self.conn.jingle.initiate(jid,self.conn.jid.toLowerCase())},"mediafailure.jingle":function(){jsxc.gui.dialog.close()}}),void self.reqUserMedia(um))},hangUp:function(reason,text){$(document).off("cleanup.dialog.jsxc"),jsxc.webrtc.conn.jingle.terminate(null,reason,text),$(document).trigger("callterminated.jingle")},reqUserMedia:function(um){return this.localStream?void $(document).trigger("mediaready.jingle",[this.localStream]):(um=um||["video","audio"],jsxc.gui.dialog.open(jsxc.gui.template.get("allowMediaAccess"),{noClose:!0}),this.setStatus("please allow access to microphone and camera"),void("undefined"!=typeof MediaStreamTrack&&"undefined"!=typeof MediaStreamTrack.getSources?MediaStreamTrack.getSources(function(sourceInfo){var availableDevices=sourceInfo.map(function(el){return el.kind});um=um.filter(function(el){return-1!==availableDevices.indexOf(el)}),getUserMediaWithConstraints(um)}):getUserMediaWithConstraints(um)))},snapshot:function(video){video||jsxc.debug("Missing video element"),$(".jsxc_snapshotbar p").remove();var canvas=$("<canvas/>").css("display","none").appendTo("body").attr({width:video.width(),height:video.height()}).get(0),ctx=canvas.getContext("2d");ctx.drawImage(video[0],0,0);var img=$("<img/>"),url=null;try{url=canvas.toDataURL("image/jpeg")}catch(err){return void jsxc.warn("Error",err)}img[0].src=url;var link=$("<a/>").attr({target:"_blank",href:url});link.append(img),$(".jsxc_snapshotbar").append(link),canvas.remove()}},jsxc.gui.showVideoWindow=function(jid){var self=jsxc.webrtc;$(document).one("complete.dialog.jsxc",function(){$("#jsxc_dialog .jsxc_localvideo")[0].muted=!0,$("#jsxc_dialog .jsxc_localvideo")[0].volume=0;var rv=$("#jsxc_dialog .jsxc_remotevideo"),lv=$("#jsxc_dialog .jsxc_localvideo");lv.draggable({containment:"parent"}),RTC.attachMediaStream(lv,self.localStream);var w_dialog=$("#jsxc_dialog").width(),w_remote=rv.width();if(w_remote>w_dialog){var scale=w_dialog/w_remote,new_h=rv.height()*scale,new_w=w_dialog,vc=$("#jsxc_dialog .jsxc_videoContainer");rv.height(new_h),rv.width(new_w),vc.height(new_h),vc.width(new_w),lv.height(lv.height()*scale),lv.width(lv.width()*scale)}self.remoteStream&&(RTC.attachMediaStream(rv,self.remoteStream),$("#jsxc_dialog .jsxc_"+(self.remoteStream.getVideoTracks().length>0?"remotevideo":"noRemoteVideo")).addClass("jsxc_deviceAvailable"));var toggleMulti=function(elem,open){$("#jsxc_dialog .jsxc_multi > div").not(elem).slideUp();var opt={complete:jsxc.gui.dialog.resize};open?elem.slideDown(opt):elem.slideToggle(opt)},win=jsxc.gui.window.open(jsxc.jidToBid(jid));win.find(".slimScrollDiv").resizable("disable"),win.find(".jsxc_textarea").slimScroll({height:413}),win.find(".jsxc_emoticons").css("top","419px"),$("#jsxc_dialog .jsxc_chatarea ul").append(win.detach()),$("#jsxc_dialog .jsxc_hangUp").click(function(){jsxc.webrtc.hangUp()}),$("#jsxc_dialog .jsxc_snapshot").click(function(){jsxc.webrtc.snapshot(rv),toggleMulti($("#jsxc_dialog .jsxc_snapshotbar"),!0)}),$("#jsxc_dialog .jsxc_snapshots").click(function(){toggleMulti($("#jsxc_dialog .jsxc_snapshotbar"))}),$("#jsxc_dialog .jsxc_showchat").click(function(){var chatarea=$("#jsxc_dialog .jsxc_chatarea");chatarea.is(":hidden")?(chatarea.show(),$("#jsxc_dialog .jsxc_webrtc").width("900"),jsxc.gui.dialog.resize({width:"920px"})):(chatarea.hide(),$("#jsxc_dialog .jsxc_webrtc").width("650"),jsxc.gui.dialog.resize({width:"660px"}))}),$("#jsxc_dialog .jsxc_info").click(function(){toggleMulti($("#jsxc_dialog .jsxc_infobar"))}),$("#jsxc_dialog .jsxc_fullscreen").click(function(){$.support.fullscreen&&($(document).one("disabled.fullscreen",function(){lv.removeAttr("style")}),$("#jsxc_dialog .jsxc_videoContainer").fullscreen())}),$("#jsxc_dialog .jsxc_volume").change(function(){rv[0].volume=$(this).val()}),$("#jsxc_dialog .jsxc_volume").dblclick(function(){$(this).val(.5)})}),jsxc.gui.dialog.open(jsxc.gui.template.get("videoWindow"),{noClose:!0})},$.extend(jsxc.CONST,{KEYCODE_ENTER:13,KEYCODE_ESC:27}),$(document).ready(function(){RTC=setupRTC(),null!==RTC&&(RTCPeerconnection=RTC.peerconnection,$(document).on("add.roster.jsxc",jsxc.webrtc.onAddRosterItem),$(document).on("init.window.jsxc",jsxc.webrtc.initWindow),$(document).on("attached.jsxc",jsxc.webrtc.init))}),jsxc.xmpp={conn:null,login:function(){if(!jsxc.xmpp.conn||!jsxc.xmpp.conn.authenticated){var jid=null,password=null,sid=null,rid=null;switch(arguments.length){case 2:jid=arguments[0],password=arguments[1];break;case 3:jid=arguments[0],sid=arguments[1],rid=arguments[2];break;default:sid=jsxc.storage.getItem("sid"),rid=jsxc.storage.getItem("rid"),null!==sid&&null!==rid?jid=jsxc.storage.getItem("jid"):(sid=null,rid=null,jid=jsxc.options.xmpp.jid)}var url=jsxc.options.get("xmpp").url;jsxc.xmpp.conn&&jsxc.xmpp.conn.connected||($(document).on("connected.jsxc",jsxc.xmpp.connected),$(document).on("attached.jsxc",jsxc.xmpp.attached),$(document).on("disconnected.jsxc",jsxc.xmpp.disconnected),$(document).on("ridChange",jsxc.xmpp.onRidChange),$(document).on("connfail.jsxc",jsxc.xmpp.onConnfail),$(document).on("authfail.jsxc",jsxc.xmpp.onAuthFail),Strophe.addNamespace("RECEIPTS","urn:xmpp:receipts")),jsxc.xmpp.conn=new Strophe.Connection(url);var stropheGetUniqueId=jsxc.xmpp.conn.getUniqueId;jsxc.xmpp.conn.getUniqueId=function(suffix){var uid=stropheGetUniqueId.call(jsxc.xmpp.conn,suffix);return jsxc.storage.setItem("_uniqueId",jsxc.xmpp.conn._uniqueId),uid},jsxc.storage.getItem("debug")===!0&&(jsxc.xmpp.conn.xmlInput=function(data){console.log("<",data)},jsxc.xmpp.conn.xmlOutput=function(data){console.log(">",data)});var callback=function(status,condition){switch(jsxc.debug(Object.getOwnPropertyNames(Strophe.Status)[status]+": "+condition),status){case Strophe.Status.CONNECTING:$(document).trigger("connecting.jsxc");break;case Strophe.Status.CONNECTED:jsxc.bid=jsxc.jidToBid(jsxc.xmpp.conn.jid.toLowerCase()),$(document).trigger("connected.jsxc");break;case Strophe.Status.ATTACHED:$(document).trigger("attached.jsxc");break;case Strophe.Status.DISCONNECTED:$(document).trigger("disconnected.jsxc");break;case Strophe.Status.CONNFAIL:$(document).trigger("connfail.jsxc");break;case Strophe.Status.AUTHFAIL:$(document).trigger("authfail.jsxc")}};jsxc.xmpp.conn.caps&&(jsxc.xmpp.conn.caps.node="http://jsxc.org/"),jsxc.restore&&sid&&rid?(jsxc.debug("Try to attach"),jsxc.debug("SID: "+sid),jsxc.xmpp.conn.attach(jid,sid,rid,callback)):(jsxc.debug("New connection"),jsxc.xmpp.conn.caps&&jsxc.xmpp.conn._addSysHandler(function(stanza){var from=jsxc.xmpp.conn.domain,c=stanza.querySelector("c"),ver=c.getAttribute("ver"),node=c.getAttribute("node"),_jidNodeIndex=JSON.parse(localStorage.getItem("strophe.caps._jidNodeIndex"))||{};jsxc.xmpp.conn.caps._jidVerIndex[from]=ver,_jidNodeIndex[from]=node,localStorage.setItem("strophe.caps._jidVerIndex",JSON.stringify(jsxc.xmpp.conn.caps._jidVerIndex)),localStorage.setItem("strophe.caps._jidNodeIndex",JSON.stringify(_jidNodeIndex))},Strophe.NS.CAPS),jsxc.xmpp.conn.connect(jid||jsxc.options.xmpp.jid,password||jsxc.options.xmpp.password,callback))}},logout:function(complete){if(jsxc.storage.removeItem("sid"),jsxc.storage.removeUserItem("buddylist"),jsxc.storage.removeUserItem("windowlist"),jsxc.storage.removeItem("_uniqueId"),!jsxc.master)return $("#jsxc_roster").remove(),$("#jsxc_windowlist").remove(),!0;if(null===jsxc.xmpp.conn)return!0;$("body").click(),jsxc.triggeredFromElement="boolean"==typeof complete?complete:!0,$.each(jsxc.storage.getUserItem("otrlist")||{},function(i,val){jsxc.otr.create(val)});var numOtr=Object.keys(jsxc.otr.objects||{}).length+1,disReady=function(){--numOtr<=0&&(jsxc.xmpp.conn.flush(),setTimeout(function(){jsxc.xmpp.conn.disconnect()},600))};return $.each(jsxc.otr.objects||{},function(key,obj){obj.msgstate===OTR.CONST.MSGSTATE_ENCRYPTED?obj.endOtr.call(obj,function(){obj.init.call(obj),jsxc.otr.backup(key),disReady()}):disReady()}),disReady(),!1},connected:function(){jsxc.xmpp.conn.pause();var nomJid=Strophe.getBareJidFromJid(jsxc.xmpp.conn.jid).toLowerCase()+"/"+Strophe.getResourceFromJid(jsxc.xmpp.conn.jid);if(jsxc.storage.setItem("sid",jsxc.xmpp.conn._proto.sid),jsxc.storage.setItem("jid",nomJid),jsxc.storage.setItem("lastActivity",(new Date).getTime()),jsxc.storage.removeUserItem("buddylist"),jsxc.storage.removeUserItem("windowlist"),jsxc.storage.removeUserItem("own"),jsxc.storage.removeUserItem("avatar","own"),jsxc.storage.removeUserItem("otrlist"),jsxc.options.loginForm.triggered)switch(jsxc.options.loginForm.onConnected||"submit"){case"submit":jsxc.submitLoginForm();case!1:return void jsxc.xmpp.connectionReady()}jsxc.gui.init(),$("#jsxc_roster").removeClass("jsxc_noConnection"),jsxc.onMaster(),jsxc.xmpp.conn.resume(),jsxc.gui.dialog.close(),$(document).trigger("attached.jsxc")},attached:function(){jsxc.xmpp.conn.addHandler(jsxc.xmpp.onRosterChanged,"jabber:iq:roster","iq","set"),jsxc.xmpp.conn.addHandler(jsxc.xmpp.onMessage,null,"message","chat"),jsxc.xmpp.conn.addHandler(jsxc.xmpp.onReceived,null,"message"),jsxc.xmpp.conn.addHandler(jsxc.xmpp.onPresence,null,"presence");var caps=jsxc.xmpp.conn.caps,domain=jsxc.xmpp.conn.domain;if(caps&&jsxc.options.get("carbons").enable){var conditionalEnable=function(){jsxc.xmpp.conn.caps.hasFeatureByJid(domain,jsxc.CONST.NS.CARBONS)&&jsxc.xmpp.carbons.enable()};if("undefined"==typeof caps._knownCapabilities[caps._jidVerIndex[domain]]){var _jidNodeIndex=JSON.parse(localStorage.getItem("strophe.caps._jidNodeIndex"))||{};$(document).on("caps.strophe",function onCaps(ev,from){from===domain&&(conditionalEnable(),$(document).off("caps.strophe",onCaps))}),caps._requestCapabilities(jsxc.xmpp.conn.domain,_jidNodeIndex[domain],caps._jidVerIndex[domain])}else conditionalEnable()}if(jsxc.restore&&jsxc.storage.getUserItem("buddylist"))jsxc.xmpp.sendPres();else{$(document).one("cloaded.roster.jsxc",jsxc.xmpp.sendPres),$("#jsxc_roster > p:first").remove();var iq=$iq({type:"get"}).c("query",{xmlns:"jabber:iq:roster"});jsxc.xmpp.conn.sendIQ(iq,jsxc.xmpp.onRoster)}jsxc.xmpp.connectionReady()},connectionReady:function(){jsxc.xmpp.conn._uniqueId=jsxc.storage.getItem("_uniqueId")||(new Date).getTime(),$(document).trigger("connectionReady.jsxc")},sendPres:function(){jsxc.xmpp.conn.disco&&(jsxc.xmpp.conn.disco.addIdentity("client","web","JSXC"),jsxc.xmpp.conn.disco.addFeature(Strophe.NS.DISCO_INFO),jsxc.xmpp.conn.disco.addFeature(Strophe.NS.RECEIPTS));var pres=$pres();jsxc.xmpp.conn.caps&&pres.c("c",jsxc.xmpp.conn.caps.generateCapsAttrs()).up();var presState=jsxc.storage.getUserItem("presence")||"online";"online"!==presState&&pres.c("show").t(presState).up();var priority=jsxc.options.get("priority");priority&&"undefined"!=typeof priority[presState]&&0!==parseInt(priority[presState])&&pres.c("priority").t(priority[presState]).up(),jsxc.debug("Send presence",pres.toString()),jsxc.xmpp.conn.send(pres)},disconnected:function(){jsxc.debug("disconnected"),jsxc.storage.removeItem("sid"),jsxc.storage.removeItem("rid"),jsxc.storage.removeItem("lastActivity"),jsxc.storage.removeItem("hidden"),jsxc.storage.removeUserItem("avatar","own"),jsxc.storage.removeUserItem("otrlist"),$(document).off("connected.jsxc",jsxc.xmpp.connected),$(document).off("attached.jsxc",jsxc.xmpp.attached),$(document).off("disconnected.jsxc",jsxc.xmpp.disconnected),$(document).off("ridChange",jsxc.xmpp.onRidChange),$(document).off("connfail.jsxc",jsxc.xmpp.onConnfail),$(document).off("authfail.jsxc",jsxc.xmpp.onAuthFail),jsxc.xmpp.conn=null,$("#jsxc_windowList").remove(),jsxc.triggeredFromElement?($(document).trigger("toggle.roster.jsxc",["hidden",0]),$("#jsxc_roster").remove(),jsxc.triggeredFromLogout&&(window.location=jsxc.options.logoutElement.attr("href"))):jsxc.gui.roster.noConnection(),window.clearInterval(jsxc.keepalive)
-},onConnfail:function(ev,condition){jsxc.debug("XMPP connection failed: "+condition),jsxc.options.loginForm.triggered&&jsxc.submitLoginForm()},onAuthFail:function(){if(jsxc.options.loginForm.triggered)switch(jsxc.options.loginForm.onAuthFail||"ask"){case"ask":jsxc.gui.showAuthFail();break;case"submit":jsxc.submitLoginForm();break;case"quiet":case!1:return}},onRoster:function(iq){jsxc.debug("Load roster",iq);var buddies=[];$(iq).find("item").each(function(){var jid=$(this).attr("jid"),name=$(this).attr("name")||jid,bid=jsxc.jidToBid(jid),sub=$(this).attr("subscription");buddies.push(bid),jsxc.storage.removeUserItem("res",bid),jsxc.storage.saveBuddy(bid,{jid:jid,name:name,status:0,sub:sub,res:[]}),jsxc.gui.roster.add(bid)}),0===buddies.length&&jsxc.gui.roster.empty(),jsxc.storage.setUserItem("buddylist",buddies),jsxc.gui.roster.loaded=!0,jsxc.debug("Roster loaded"),$(document).trigger("cloaded.roster.jsxc")},onRosterChanged:function(iq){return jsxc.debug("onRosterChanged",iq),$(iq).find("item").each(function(){var jid=$(this).attr("jid"),name=$(this).attr("name")||jid,bid=jsxc.jidToBid(jid),sub=$(this).attr("subscription");if("remove"===sub)jsxc.gui.roster.purge(bid);else{var bl=jsxc.storage.getUserItem("buddylist");bl.indexOf(bid)<0&&(bl.push(bid),jsxc.storage.setUserItem("buddylist",bl));var temp=jsxc.storage.saveBuddy(bid,{jid:jid,name:name,sub:sub});"updated"===temp?(jsxc.gui.update(bid),jsxc.gui.roster.reorder(bid)):jsxc.gui.roster.add(bid)}if("from"===sub||"both"===sub){var notice,notices=jsxc.storage.getUserItem("notices"),noticeKey=null;for(noticeKey in notices)notice=notices[noticeKey],"gui.showApproveDialog"===notice.fnName&&notice.fnParams[0]===jid&&(jsxc.debug("Remove notice with key "+noticeKey),jsxc.notice.remove(noticeKey))}}),jsxc.storage.getUserItem("buddylist")&&0!==jsxc.storage.getUserItem("buddylist").length?$("#jsxc_roster > p:first").remove():jsxc.gui.roster.empty(),!0},onPresence:function(presence){jsxc.debug("onPresence",presence);var ptype=$(presence).attr("type"),from=$(presence).attr("from"),jid=Strophe.getBareJidFromJid(from).toLowerCase(),r=Strophe.getResourceFromJid(from),bid=jsxc.jidToBid(jid),data=jsxc.storage.getUserItem("buddy",bid),res=jsxc.storage.getUserItem("res",bid)||{},status=null,xVCard=$(presence).find('x[xmlns="vcard-temp:x:update"]');if(jid===Strophe.getBareJidFromJid(jsxc.storage.getItem("jid")))return!0;if("error"===ptype)return $(document).trigger("error.presence.jsxc",[from,presence]),jsxc.error("[XMPP] "+$(presence).attr("code")),!0;if("subscribe"===ptype)return jsxc.storage.setUserItem("friendReq",{jid:jid,approve:-1}),jsxc.notice.add($.t("Friendship_request"),$.t("from")+" "+jid,"gui.showApproveDialog",[jid]),!0;if("unavailable"===ptype||"unsubscribed"===ptype)status=jsxc.CONST.STATUS.indexOf("offline");else{var show=$(presence).find("show").text();status=jsxc.CONST.STATUS.indexOf(""===show?"online":show)}0===status?delete res[r]:res[r]=status;var maxVal=[],max=0,prop=null;for(prop in res)res.hasOwnProperty(prop)&&max<=res[prop]&&(max!==res[prop]&&(maxVal=[],max=res[prop]),maxVal.push(prop));if(0===data.status&&max>0&&jsxc.notification.notify({title:data.name,msg:$.t("has_come_online"),source:bid}),data.status=max,data.res=maxVal,data.jid=jid,xVCard.length>0){var photo=xVCard.find("photo");photo.length>0&&photo.text()!==data.avatar&&(jsxc.storage.removeUserItem("avatar",data.avatar),data.avatar=photo.text())}return jsxc.gui.window.get(bid).length>0&&jsxc.gui.window.get(bid).data("jid",jid),jsxc.storage.setUserItem("buddy",bid,data),jsxc.storage.setUserItem("res",bid,res),jsxc.debug("Presence ("+from+"): "+status),jsxc.gui.update(bid),jsxc.gui.roster.reorder(bid),$(document).trigger("presence.jsxc",[from,status,presence]),!0},onMessage:function(stanza){var message,carbon,forwarded=$(stanza).find('forwarded[xmlns="'+jsxc.CONST.NS.FORWARD+'"]');forwarded.length>0?(message=forwarded.find("> message"),forwarded=!0,carbon=$(stanza).find('> [xmlns="'+jsxc.CONST.NS.CARBONS+'"]'),0===carbon.length&&(carbon=!1),jsxc.debug("Incoming forwarded message",message)):(message=stanza,forwarded=!1,carbon=!1,jsxc.debug("Incoming message",message));var body=$(message).find("body:first").text();if(!body||body.match(/\?OTR/i)&&forwarded)return!0;var bid,type=$(message).attr("type"),from=$(message).attr("from"),mid=$(message).attr("id"),delay=$(message).find('delay[xmlns="urn:xmpp:delay"]'),stamp=delay.length>0?new Date(delay.attr("stamp")):new Date;if(stamp=stamp.getTime(),carbon){var direction="sent"===carbon.prop("tagName")?"out":"in";return bid=jsxc.jidToBid("out"===direction?$(message).attr("to"):from),jsxc.gui.window.postMessage(bid,direction,body,!1,forwarded,stamp),!0}forwarded&&(body=from+" "+$.t("to")+" "+$(stanza).attr("to")+'"'+body+'"',from=$(stanza).attr("from"));var jid=Strophe.getBareJidFromJid(from);bid=jsxc.jidToBid(jid);var data=jsxc.storage.getUserItem("buddy",bid),request=$(message).find("request[xmlns='urn:xmpp:receipts']");if(null===data){var chat=jsxc.storage.getUserItem("chat",bid)||[];0===chat.length&&jsxc.notice.add($.t("Unknown_sender"),$.t("You_received_a_message_from_an_unknown_sender")+" ("+bid+").","gui.showUnknownSender",[bid]);var msg=jsxc.removeHTML(body);return msg=jsxc.escapeHTML(msg),jsxc.storage.saveMessage(bid,"in",msg,!1,forwarded,stamp),!0}var win=jsxc.gui.window.init(bid);return"chat"===type&&(win.data("jid",from),jsxc.storage.updateUserItem("buddy",bid,{jid:from})),$(document).trigger("message.jsxc",[from,body]),jsxc.master&&!jsxc.otr.objects[bid]&&jsxc.otr.create(bid),forwarded||null===mid||!request.length||null===data||"both"!==data.sub&&"from"!==data.sub||"chat"!==type||jsxc.xmpp.conn.send($msg({to:from}).c("received",{xmlns:"urn:xmpp:receipts",id:mid})),jsxc.otr.objects.hasOwnProperty(bid)?jsxc.otr.objects[bid].receiveMsg(body,{stamp:stamp,forwarded:forwarded}):jsxc.gui.window.postMessage(bid,"in",body,!1,forwarded,stamp),!0},onRidChange:function(ev,data){jsxc.storage.setItem("rid",data.rid)},resFriendReq:function(from,approve){jsxc.master?(jsxc.xmpp.conn.send($pres({to:from,type:approve?"subscribed":"unsubscribed"})),jsxc.storage.removeUserItem("friendReq"),jsxc.gui.dialog.close()):jsxc.storage.updateUserItem("friendReq","approve",approve)},addBuddy:function(username,alias){var bid=jsxc.jidToBid(username);if(jsxc.master){var iq=$iq({type:"set"}).c("query",{xmlns:"jabber:iq:roster"}).c("item",{jid:username,name:alias||""});jsxc.xmpp.conn.sendIQ(iq),jsxc.xmpp.conn.send($pres({to:username,type:"subscribe"})),jsxc.storage.removeUserItem("add_"+bid)}else jsxc.storage.setUserItem("add_"+bid,{username:username,alias:alias||null})},removeBuddy:function(jid){var bid=jsxc.jidToBid(jid),iq=$iq({type:"set"}).c("query",{xmlns:"jabber:iq:roster"}).c("item",{jid:Strophe.getBareJidFromJid(jid),subscription:"remove"});jsxc.xmpp.conn.sendIQ(iq),jsxc.gui.roster.purge(bid)},onReceived:function(message){var from=$(message).attr("from"),jid=Strophe.getBareJidFromJid(from),bid=jsxc.jidToBid(jid),received=$(message).find("received[xmlns='urn:xmpp:receipts']");if(received.length){var i,receivedId=received.attr("id").replace(/:/,"-"),chat=jsxc.storage.getUserItem("chat",bid);for(i=chat.length-1;i>=0;i--)if(chat[i].uid===receivedId){chat[i].received=!0,$("#"+receivedId).addClass("jsxc_received"),jsxc.storage.setUserItem("chat",bid,chat);break}}return!0},sendMessage:function(bid,msg,uid){jsxc.otr.objects.hasOwnProperty(bid)?jsxc.otr.objects[bid].sendMsg(msg,uid):jsxc.xmpp._sendMessage(jsxc.gui.window.get(bid).data("jid"),msg,uid)},_sendMessage:function(jid,msg,uid){var data=jsxc.storage.getUserItem("buddy",jsxc.jidToBid(jid))||{},isBar=Strophe.getBareJidFromJid(jid)===jid,type=data.type||"chat",xmlMsg=$msg({to:jid,type:type,id:uid}).c("body").t(msg);jsxc.xmpp.carbons.enabled&&msg.match(/^\?OTR/)&&xmlMsg.up().c("private",{xmlns:jsxc.CONST.NS.CARBONS}),"chat"===type&&(isBar||jsxc.xmpp.conn.caps.hasFeatureByJid(jid,Strophe.NS.RECEIPTS))&&xmlMsg.up().c("request",{xmlns:"urn:xmpp:receipts"}),jsxc.xmpp.conn.send(xmlMsg)},loadVcard:function(bid,cb,error_cb){jsxc.master?jsxc.xmpp.conn.vcard.get(cb,bid,error_cb):(jsxc.storage.setUserItem("vcard",bid,"request:"+(new Date).getTime()),$(document).one("loaded.vcard.jsxc",function(ev,result){result&&"success"===result.state?cb($(result.data).get(0)):error_cb()}))},getCapabilitiesByJid:function(jid){if(jsxc.xmpp.conn)return jsxc.xmpp.conn.caps.getCapabilitiesByJid(jid);var jidVerIndex=JSON.parse(localStorage.getItem("strophe.caps._jidVerIndex"))||{},knownCapabilities=JSON.parse(localStorage.getItem("strophe.caps._knownCapabilities"))||{};return jidVerIndex[jid]?knownCapabilities[jidVerIndex[jid]]:null}},jsxc.xmpp.carbons={enabled:!1,enable:function(cb){var iq=$iq({type:"set"}).c("enable",{xmlns:jsxc.CONST.NS.CARBONS});jsxc.xmpp.conn.sendIQ(iq,function(){jsxc.xmpp.carbons.enabled=!0,jsxc.debug("Carbons enabled"),cb&&cb.call(this)},function(stanza){jsxc.warn("Could not enable carbons",stanza)})},disable:function(cb){var iq=$iq({type:"set"}).c("disable",{xmlns:jsxc.CONST.NS.CARBONS});jsxc.xmpp.conn.sendIQ(iq,function(){jsxc.xmpp.carbons.enabled=!1,jsxc.debug("Carbons disabled"),cb&&cb.call(this)},function(stanza){jsxc.warn("Could not disable carbons",stanza)})},refresh:function(err){return err!==!1?jsxc.options.get("carbons").enable?jsxc.xmpp.carbons.enable():jsxc.xmpp.carbons.disable():void 0}}}(jQuery);
+var jsxc=null,RTC=null,RTCPeerconnection=null;!function($){"use strict";jsxc={version:"2.1.0-beta1",master:!1,role_allocation:!1,to:null,toBusy:null,toNotification:null,toNotificationDelay:500,keepalive:null,restore:!1,restoreCompleted:!1,triggeredFromBox:!1,triggeredFromElement:!1,triggeredFromLogout:!1,ls:[],storageNotConform:null,toSNC:null,bid:null,CONST:{NOTIFICATION_DEFAULT:"default",NOTIFICATION_GRANTED:"granted",NOTIFICATION_DENIED:"denied",STATUS:["offline","dnd","xa","away","chat","online"],SOUNDS:{MSG:"incomingMessage.wav",CALL:"Rotary-Phone6.mp3",NOTICE:"Ping1.mp3"},REGEX:{JID:new RegExp("\\b[^\"&'\\/:<>@\\s]+@[\\w-_.]+\\b","ig"),URL:new RegExp(/((?:https?:\/\/|www\.|([\w\-]+\.[a-zA-Z]{2,3})(?=\b))(?:(?:[\-A-Za-z0-9+&@#\/%?=~_|!:,.;]*\([\-A-Za-z0-9+&@#\/%?=~_|!:,.;]*\)([\-A-Za-z0-9+&@#\/%?=~_|!:,.;]*[\-A-Za-z0-9+&@#\/%=~_|])?)|(?:[\-A-Za-z0-9+&@#\/%?=~_|!:,.;]*[\-A-Za-z0-9+&@#\/%=~_|]))?)/gi)},NS:{CARBONS:"urn:xmpp:carbons:2",FORWARD:"urn:xmpp:forward:0"}},getFormattedTime:function(unixtime){var msgDate=new Date(parseInt(unixtime)),date=("0"+msgDate.getDate()).slice(-2),month=("0"+(msgDate.getMonth()+1)).slice(-2),year=msgDate.getFullYear(),hours=("0"+msgDate.getHours()).slice(-2),minutes=("0"+msgDate.getMinutes()).slice(-2),dateNow=new Date,time=hours+":"+minutes;return dateNow.setHours(0,0,0,0),msgDate.setHours(0,0,0,0),dateNow.getTime()!==msgDate.getTime()?date+"."+month+"."+year+" "+time:time},debug:function(msg,data,level){if(level&&(msg="["+level+"] "+msg),data){jsxc.storage.getItem("debug")===!0&&console.log(msg,data);var d;try{d=$("<span>").prepend($(data).clone()).html()}catch(err){try{d=JSON.stringify(data)}catch(err2){d="see js console"}}jsxc.log=jsxc.log+msg+": "+d+"\n"}else console.log(msg),jsxc.log=jsxc.log+msg+"\n"},warn:function(msg,data){jsxc.debug(msg,data,"WARN")},error:function(msg,data){jsxc.debug(msg,data,"ERROR")},log:"",init:function(options){if(options&&$.extend(!0,jsxc.options,options),"undefined"==typeof localStorage)return void jsxc.warn("Browser doesn't support localStorage.");jsxc.options.get=function(key){var local=jsxc.storage.getUserItem("options")||{};return local[key]||jsxc.options[key]},jsxc.options.set=function(key,value){jsxc.storage.updateItem("options",key,value,!0)},jsxc.storageNotConform=jsxc.storage.getItem("storageNotConform"),null===jsxc.storageNotConform&&(jsxc.storageNotConform=2);var lang;lang=null!==jsxc.storage.getItem("lang")?jsxc.storage.getItem("lang"):jsxc.options.autoLang&&navigator.language?navigator.language.substr(0,2):jsxc.options.defaultLang,$.i18n.init({lng:lang,fallbackLng:"en",resStore:I18next,useLocalStorage:!0,localStorageExpirationTime:864e5}),jsxc.storage.getItem("debug")===!0&&(jsxc.options.otr.debug=!0),window.addEventListener("storage",jsxc.storage.onStorage,!1);var lastActivity=jsxc.storage.getItem("lastActivity")||0;if((new Date).getTime()-lastActivity<jsxc.options.loginTimeout&&(jsxc.restore=!0),$(document).on("connectionReady.jsxc",function(){if(null!==jsxc.options.logoutElement&&jsxc.options.logoutElement.length>0){var logout=function(){return jsxc.options.logoutElement=$(this),jsxc.triggeredFromLogout=!0,jsxc.xmpp.logout()};jsxc.options.logoutElement.off("click",null,logout).one("click",logout)}}),jsxc.storage.getItem("rid")&&jsxc.storage.getItem("sid")&&jsxc.restore)(!jsxc.isLoginForm()||jsxc.options.loginForm&&jsxc.options.loginForm.attachIfFound)&&(jsxc.bid=jsxc.jidToBid(jsxc.storage.getItem("jid")),jsxc.gui.init(),"undefined"!=typeof jsxc.storage.getItem("alive")&&jsxc.restore?jsxc.checkMaster():jsxc.onMaster());else{if(jsxc.storage.removeItem("rid"),jsxc.storage.removeItem("sid"),!jsxc.isLoginForm())return void(jsxc.options.displayRosterMinimized()&&(jsxc.storage.setUserItem("roster","hidden"),jsxc.gui.roster.init(),jsxc.gui.roster.noConnection()));"function"==typeof jsxc.options.formFound&&jsxc.options.formFound.call();var form=jsxc.options.loginForm.form=$(jsxc.options.loginForm.form),events=form.data("events")||{submit:[]},submits=[];$.each(events.submit,function(index,val){submits.push(val.handler)}),form.data("submits",submits),form.off("submit"),form.submit(function(){return jsxc.prepareLogin(function(settings){if(settings!==!1){var enabled=settings.loginForm&&settings.loginForm.enable||settings.xmpp&&settings.xmpp.onlogin;enabled="true"===enabled||enabled===!0,enabled&&(jsxc.options.loginForm.triggered=!0,jsxc.xmpp.login())}else jsxc.submitLoginForm()}),!1})}},isLoginForm:function(){return jsxc.options.loginForm.form&&jsxc.el_exists(jsxc.options.loginForm.form)&&jsxc.el_exists(jsxc.options.loginForm.jid)&&jsxc.el_exists(jsxc.options.loginForm.pass)},prepareLogin:function(username,password,cb){"function"==typeof username&&(cb=username,username=null),username=username||$(jsxc.options.loginForm.jid).val(),password=password||$(jsxc.options.loginForm.pass).val(),jsxc.triggeredFromBox||"dialog"!==jsxc.options.loginForm.onConnecting&&"undefined"!=typeof jsxc.options.loginForm.onConnecting||jsxc.gui.showWaitAlert($.t("Logging_in"));var settings;"function"==typeof jsxc.options.loadSettings?(settings=jsxc.options.loadSettings.call(this,username,password,function(s){jsxc._prepareLogin(username,password,cb,s)}),"undefined"!=typeof settings&&jsxc._prepareLogin(username,password,cb,settings)):jsxc._prepareLogin(username,password,cb)},_prepareLogin:function(username,password,cb,loadedSettings){if(loadedSettings===!1)return jsxc.warn("No settings provided"),void cb(!1);var settings=$.extend(!0,{},jsxc.options);loadedSettings?settings=$.extend(!0,settings,loadedSettings):loadedSettings={},"string"==typeof settings.xmpp.username&&(username=settings.xmpp.username);var jid,resource=settings.xmpp.resource?"/"+settings.xmpp.resource:"",domain=settings.xmpp.domain;jid=username.match(/@(.*)$/)?username.match(/\/(.*)$/)?username:username+resource:username+"@"+domain+resource,"function"==typeof jsxc.options.loginForm.preJid&&(jid=jsxc.options.loginForm.preJid(jid)),jsxc.bid=jsxc.jidToBid(jid),settings.xmpp.username=jid.split("@")[0],settings.xmpp.domain=jid.split("@")[1].split("/")[0],settings.xmpp.resource=jid.split("@")[1].split("/")[1]||"",loadedSettings.xmpp||(loadedSettings.xmpp={}),$.each(loadedSettings,function(key){var old=jsxc.options.get(key),val=settings[key];val=$.extend(!0,old,val),jsxc.options.set(key,val)}),jsxc.options.xmpp.jid=jid,jsxc.options.xmpp.password=password,cb(settings)},onSlave:function(){jsxc.debug("I am the slave."),jsxc.role_allocation=!0,jsxc.restoreRoster(),jsxc.restoreWindows(),jsxc.restoreCompleted=!0,$(document).trigger("restoreCompleted.jsxc")},onMaster:function(){jsxc.debug("I am master."),jsxc.master=!0,jsxc.storage.setItem("alive",0),jsxc.storage.setItem("alive_busy",0),jsxc.storage.getUserItem("windowlist")||jsxc.storage.setUserItem("windowlist",[]),jsxc.startKeepAlive(),jsxc.options.get("otr").enable?jsxc.otr.createDSA():jsxc._onMaster()},_onMaster:function(){if(jsxc.role_allocation&&$.each(jsxc.storage.getUserItem("windowlist"),function(index,val){jsxc.otr.create(val)}),jsxc.role_allocation=!0,jsxc.restore&&!jsxc.restoreCompleted&&(jsxc.restoreRoster(),jsxc.restoreWindows(),jsxc.restoreCompleted=!0,$(document).trigger("restoreCompleted.jsxc")),jsxc.restore){var noti=jsxc.storage.getUserItem("notification");noti="number"==typeof noti?noti:2,jsxc.options.notification&&noti>0&&jsxc.notification.hasSupport()?jsxc.notification.hasPermission()?jsxc.notification.init():jsxc.notification.prepareRequest():jsxc.options.notification=!1}$(document).on("connectionReady.jsxc",function(){jsxc.gui.updateAvatar($("#jsxc_avatar"),jsxc.jidToBid(jsxc.storage.getItem("jid")),"own")}),jsxc.xmpp.login()},checkMaster:function(){jsxc.debug("check master"),jsxc.to=window.setTimeout(jsxc.onMaster,1e3),jsxc.storage.ink("alive")},startKeepAlive:function(){jsxc.keepalive=window.setInterval(jsxc.keepAlive,jsxc.options.timeout-1e3)},keepAlive:function(){jsxc.storage.ink("alive"),jsxc.role_allocation&&jsxc.storage.setItem("lastActivity",(new Date).getTime())},keepBusyAlive:function(){jsxc.toBusy&&window.clearTimeout(jsxc.toBusy),jsxc.keepalive&&window.clearInterval(jsxc.keepalive),jsxc.storage.ink("alive_busy"),jsxc.toBusy=window.setTimeout(jsxc.startKeepAlive,jsxc.options.busyTimeout-1e3)},random:function(max){return Math.floor(Math.random()*max)},el_exists:function(selector){return $(selector).length>0},jidToCid:function(jid){jsxc.warn("jsxc.jidToCid is deprecated!");var cid=Strophe.getBareJidFromJid(jid).replace("@","-").replace(/\./g,"-").toLowerCase();return cid},jidToBid:function(jid){return Strophe.getBareJidFromJid(jid).toLowerCase()},restoreRoster:function(){var buddies=jsxc.storage.getUserItem("buddylist");return buddies&&0!==buddies.length?($.each(buddies,function(index,value){jsxc.gui.roster.add(value)}),jsxc.gui.roster.loaded=!0,void $(document).trigger("cloaded.roster.jsxc")):(jsxc.debug("No saved buddylist."),void jsxc.gui.roster.empty())},restoreWindows:function(){var windows=jsxc.storage.getUserItem("windowlist");null!==windows&&$.each(windows,function(index,bid){var window=jsxc.storage.getUserItem("window",bid);return window?(jsxc.gui.window.init(bid),window.minimize?jsxc.gui.window.hide(bid):jsxc.gui.window.show(bid),void jsxc.gui.window.setText(bid,window.text)):(jsxc.debug("Associated window-element is missing: "+bid),!0)})},submitLoginForm:function(){var form=jsxc.options.loginForm.form.off("submit"),submits=form.data("submits")||[];$.each(submits,function(index,val){form.submit(val)}),form.find("#submit").length>0?form.find("#submit").click():form.submit()},escapeHTML:function(text){return text=text.replace(/&amp;/g,"&").replace(/&lt;/g,"<").replace(/&gt;/g,">"),text.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;")},removeHTML:function(text){return $("<span>").html(text).text()},switchEvents:function(obj){var ns=Math.random().toString(36).substr(2,12),self=this;return $.each(obj,function(key,val){$(document).one(key+"."+ns,function(){$(document).off("."+ns),val.apply(self,arguments)})}),ns},isHidden:function(){var hidden=!1;return"undefined"!=typeof document.hidden?hidden=document.hidden:"undefined"!=typeof document.webkitHidden?hidden=document.webkitHidden:"undefined"!=typeof document.mozHidden?hidden=document.mozHidden:"undefined"!=typeof document.msHidden&&(hidden=document.msHidden),hidden&&jsxc.master?jsxc.storage.ink("hidden",0):hidden||jsxc.master||jsxc.storage.ink("hidden"),hidden},hasFocus:function(){var focus=!0;return"function"==typeof document.hasFocus&&(focus=document.hasFocus()),!focus&&jsxc.master?jsxc.storage.ink("focus",0):focus&&!jsxc.master&&jsxc.storage.ink("focus"),focus},exec:function(fnName,fnParams){var i,fnList=fnName.split("."),fn=jsxc[fnList[0]];for(i=1;i<fnList.length;i++)fn=fn[fnList[i]];return"function"==typeof fn?fn.apply(null,fnParams):void 0},hashStr:function(str){var i,hash=0;if(0===str.length)return hash;for(i=0;i<str.length;i++)hash=(hash<<5)-hash+str.charCodeAt(i),hash|=0;return hash}},jsxc.xmpp={conn:null,login:function(){if(!jsxc.xmpp.conn||!jsxc.xmpp.conn.authenticated){var jid=null,password=null,sid=null,rid=null;switch(arguments.length){case 2:jid=arguments[0],password=arguments[1];break;case 3:jid=arguments[0],sid=arguments[1],rid=arguments[2];break;default:sid=jsxc.storage.getItem("sid"),rid=jsxc.storage.getItem("rid"),null!==sid&&null!==rid?jid=jsxc.storage.getItem("jid"):(sid=null,rid=null,jid=jsxc.options.xmpp.jid)}var url=jsxc.options.get("xmpp").url;jsxc.xmpp.conn&&jsxc.xmpp.conn.connected||($(document).on("connected.jsxc",jsxc.xmpp.connected),$(document).on("attached.jsxc",jsxc.xmpp.attached),$(document).on("disconnected.jsxc",jsxc.xmpp.disconnected),$(document).on("ridChange",jsxc.xmpp.onRidChange),$(document).on("connfail.jsxc",jsxc.xmpp.onConnfail),$(document).on("authfail.jsxc",jsxc.xmpp.onAuthFail),Strophe.addNamespace("RECEIPTS","urn:xmpp:receipts")),jsxc.xmpp.conn=new Strophe.Connection(url);var stropheGetUniqueId=jsxc.xmpp.conn.getUniqueId;jsxc.xmpp.conn.getUniqueId=function(suffix){var uid=stropheGetUniqueId.call(jsxc.xmpp.conn,suffix);return jsxc.storage.setItem("_uniqueId",jsxc.xmpp.conn._uniqueId),uid},jsxc.storage.getItem("debug")===!0&&(jsxc.xmpp.conn.xmlInput=function(data){console.log("<",data)},jsxc.xmpp.conn.xmlOutput=function(data){console.log(">",data)});var callback=function(status,condition){switch(jsxc.debug(Object.getOwnPropertyNames(Strophe.Status)[status]+": "+condition),status){case Strophe.Status.CONNECTING:$(document).trigger("connecting.jsxc");break;case Strophe.Status.CONNECTED:jsxc.bid=jsxc.jidToBid(jsxc.xmpp.conn.jid.toLowerCase()),$(document).trigger("connected.jsxc");break;case Strophe.Status.ATTACHED:$(document).trigger("attached.jsxc");break;case Strophe.Status.DISCONNECTED:$(document).trigger("disconnected.jsxc");break;case Strophe.Status.CONNFAIL:$(document).trigger("connfail.jsxc");break;case Strophe.Status.AUTHFAIL:$(document).trigger("authfail.jsxc")}};jsxc.xmpp.conn.caps&&(jsxc.xmpp.conn.caps.node="http://jsxc.org/"),jsxc.restore&&sid&&rid?(jsxc.debug("Try to attach"),jsxc.debug("SID: "+sid),jsxc.xmpp.conn.attach(jid,sid,rid,callback)):(jsxc.debug("New connection"),jsxc.xmpp.conn.caps&&jsxc.xmpp.conn._addSysHandler(function(stanza){var from=jsxc.xmpp.conn.domain,c=stanza.querySelector("c"),ver=c.getAttribute("ver"),node=c.getAttribute("node"),_jidNodeIndex=JSON.parse(localStorage.getItem("strophe.caps._jidNodeIndex"))||{};jsxc.xmpp.conn.caps._jidVerIndex[from]=ver,_jidNodeIndex[from]=node,localStorage.setItem("strophe.caps._jidVerIndex",JSON.stringify(jsxc.xmpp.conn.caps._jidVerIndex)),localStorage.setItem("strophe.caps._jidNodeIndex",JSON.stringify(_jidNodeIndex))},Strophe.NS.CAPS),jsxc.xmpp.conn.connect(jid||jsxc.options.xmpp.jid,password||jsxc.options.xmpp.password,callback))}},logout:function(complete){if(jsxc.storage.removeItem("sid"),jsxc.storage.removeUserItem("buddylist"),jsxc.storage.removeUserItem("windowlist"),jsxc.storage.removeItem("_uniqueId"),!jsxc.master)return $("#jsxc_roster").remove(),$("#jsxc_windowlist").remove(),!0;if(null===jsxc.xmpp.conn)return!0;$("body").click(),jsxc.triggeredFromElement="boolean"==typeof complete?complete:!0,$.each(jsxc.storage.getUserItem("otrlist")||{},function(i,val){jsxc.otr.create(val)});var numOtr=Object.keys(jsxc.otr.objects||{}).length+1,disReady=function(){--numOtr<=0&&(jsxc.xmpp.conn.flush(),setTimeout(function(){jsxc.xmpp.conn.disconnect()},600))};return $.each(jsxc.otr.objects||{},function(key,obj){obj.msgstate===OTR.CONST.MSGSTATE_ENCRYPTED?obj.endOtr.call(obj,function(){obj.init.call(obj),jsxc.otr.backup(key),disReady()}):disReady()}),disReady(),!1},connected:function(){jsxc.xmpp.conn.pause();var nomJid=Strophe.getBareJidFromJid(jsxc.xmpp.conn.jid).toLowerCase()+"/"+Strophe.getResourceFromJid(jsxc.xmpp.conn.jid);if(jsxc.storage.setItem("sid",jsxc.xmpp.conn._proto.sid),jsxc.storage.setItem("jid",nomJid),jsxc.storage.setItem("lastActivity",(new Date).getTime()),jsxc.storage.removeUserItem("buddylist"),jsxc.storage.removeUserItem("windowlist"),jsxc.storage.removeUserItem("own"),jsxc.storage.removeUserItem("avatar","own"),jsxc.storage.removeUserItem("otrlist"),jsxc.storage.removeUserItem("unreadMsg"),jsxc.storage.removeUserElement("options","RTCPeerConfig"),jsxc.options.loginForm.triggered)switch(jsxc.options.loginForm.onConnected||"submit"){case"submit":jsxc.submitLoginForm();case!1:return void jsxc.xmpp.connectionReady()}jsxc.gui.init(),$("#jsxc_roster").removeClass("jsxc_noConnection"),jsxc.onMaster(),jsxc.xmpp.conn.resume(),jsxc.gui.dialog.close(),jsxc.restoreCompleted=!0,$(document).trigger("attached.jsxc")},attached:function(){jsxc.xmpp.conn.addHandler(jsxc.xmpp.onRosterChanged,"jabber:iq:roster","iq","set"),jsxc.xmpp.conn.addHandler(jsxc.xmpp.onMessage,null,"message","chat"),jsxc.xmpp.conn.addHandler(jsxc.xmpp.onReceived,null,"message"),jsxc.xmpp.conn.addHandler(jsxc.xmpp.onPresence,null,"presence");var caps=jsxc.xmpp.conn.caps,domain=jsxc.xmpp.conn.domain;if(caps){var conditionalEnable=function(){};if(jsxc.options.get("carbons").enable&&(conditionalEnable=function(){jsxc.xmpp.conn.caps.hasFeatureByJid(domain,jsxc.CONST.NS.CARBONS)&&jsxc.xmpp.carbons.enable()},$(document).on("caps.strophe",function onCaps(ev,from){from===domain&&(conditionalEnable(),$(document).off("caps.strophe",onCaps))})),"undefined"==typeof caps._knownCapabilities[caps._jidVerIndex[domain]]){var _jidNodeIndex=JSON.parse(localStorage.getItem("strophe.caps._jidNodeIndex"))||{};jsxc.debug("Request server capabilities"),caps._requestCapabilities(jsxc.xmpp.conn.domain,_jidNodeIndex[domain],caps._jidVerIndex[domain])}else conditionalEnable()}if(jsxc.restore&&jsxc.storage.getUserItem("buddylist"))jsxc.xmpp.sendPres();else{$(document).one("cloaded.roster.jsxc",jsxc.xmpp.sendPres),$("#jsxc_roster > p:first").remove();var iq=$iq({type:"get"}).c("query",{xmlns:"jabber:iq:roster"});jsxc.xmpp.conn.sendIQ(iq,jsxc.xmpp.onRoster)}jsxc.xmpp.connectionReady()},connectionReady:function(){jsxc.xmpp.conn._uniqueId=jsxc.storage.getItem("_uniqueId")||(new Date).getTime(),$(document).trigger("connectionReady.jsxc")},sendPres:function(){jsxc.xmpp.conn.disco&&(jsxc.xmpp.conn.disco.addIdentity("client","web","JSXC"),jsxc.xmpp.conn.disco.addFeature(Strophe.NS.DISCO_INFO),jsxc.xmpp.conn.disco.addFeature(Strophe.NS.RECEIPTS));var pres=$pres();jsxc.xmpp.conn.caps&&pres.c("c",jsxc.xmpp.conn.caps.generateCapsAttrs()).up();var presState=jsxc.storage.getUserItem("presence")||"online";"online"!==presState&&pres.c("show").t(presState).up();var priority=jsxc.options.get("priority");priority&&"undefined"!=typeof priority[presState]&&0!==parseInt(priority[presState])&&pres.c("priority").t(priority[presState]).up(),jsxc.debug("Send presence",pres.toString()),jsxc.xmpp.conn.send(pres)},disconnected:function(){jsxc.debug("disconnected"),jsxc.storage.removeItem("sid"),jsxc.storage.removeItem("rid"),jsxc.storage.removeItem("lastActivity"),jsxc.storage.removeItem("hidden"),jsxc.storage.removeUserItem("avatar","own"),jsxc.storage.removeUserItem("otrlist"),$(document).off("connected.jsxc",jsxc.xmpp.connected),$(document).off("attached.jsxc",jsxc.xmpp.attached),$(document).off("disconnected.jsxc",jsxc.xmpp.disconnected),$(document).off("ridChange",jsxc.xmpp.onRidChange),$(document).off("connfail.jsxc",jsxc.xmpp.onConnfail),$(document).off("authfail.jsxc",jsxc.xmpp.onAuthFail),jsxc.xmpp.conn=null,$("#jsxc_windowList").remove(),jsxc.triggeredFromElement?($(document).trigger("toggle.roster.jsxc",["hidden",0]),$("#jsxc_roster").remove(),jsxc.triggeredFromLogout&&(window.location=jsxc.options.logoutElement.attr("href"))):jsxc.gui.roster.noConnection(),window.clearInterval(jsxc.keepalive)},onConnfail:function(ev,condition){jsxc.debug("XMPP connection failed: "+condition),jsxc.options.loginForm.triggered&&jsxc.submitLoginForm()},onAuthFail:function(){if(jsxc.options.loginForm.triggered)switch(jsxc.options.loginForm.onAuthFail||"ask"){case"ask":jsxc.gui.showAuthFail();break;case"submit":jsxc.submitLoginForm();break;case"quiet":case!1:return}},onRoster:function(iq){jsxc.debug("Load roster",iq);var buddies=[];$(iq).find("item").each(function(){var jid=$(this).attr("jid"),name=$(this).attr("name")||jid,bid=jsxc.jidToBid(jid),sub=$(this).attr("subscription");buddies.push(bid),jsxc.storage.removeUserItem("res",bid),jsxc.storage.saveBuddy(bid,{jid:jid,name:name,status:0,sub:sub,res:[]}),jsxc.gui.roster.add(bid)}),0===buddies.length&&jsxc.gui.roster.empty(),jsxc.storage.setUserItem("buddylist",buddies),jsxc.xmpp.bookmarks.load(),jsxc.gui.roster.loaded=!0,jsxc.debug("Roster loaded"),$(document).trigger("cloaded.roster.jsxc")},onRosterChanged:function(iq){return jsxc.debug("onRosterChanged",iq),$(iq).find("item").each(function(){var jid=$(this).attr("jid"),name=$(this).attr("name")||jid,bid=jsxc.jidToBid(jid),sub=$(this).attr("subscription");if("remove"===sub)jsxc.gui.roster.purge(bid);else{var bl=jsxc.storage.getUserItem("buddylist");bl.indexOf(bid)<0&&(bl.push(bid),jsxc.storage.setUserItem("buddylist",bl));var temp=jsxc.storage.saveBuddy(bid,{jid:jid,name:name,sub:sub});"updated"===temp?(jsxc.gui.update(bid),jsxc.gui.roster.reorder(bid)):jsxc.gui.roster.add(bid)}if("from"===sub||"both"===sub){var notice,notices=jsxc.storage.getUserItem("notices"),noticeKey=null;for(noticeKey in notices)notice=notices[noticeKey],"gui.showApproveDialog"===notice.fnName&&notice.fnParams[0]===jid&&(jsxc.debug("Remove notice with key "+noticeKey),jsxc.notice.remove(noticeKey))}}),jsxc.storage.getUserItem("buddylist")&&0!==jsxc.storage.getUserItem("buddylist").length?$("#jsxc_roster > p:first").remove():jsxc.gui.roster.empty(),!0},onPresence:function(presence){jsxc.debug("onPresence",presence);var ptype=$(presence).attr("type"),from=$(presence).attr("from"),jid=Strophe.getBareJidFromJid(from).toLowerCase(),r=Strophe.getResourceFromJid(from),bid=jsxc.jidToBid(jid),data=jsxc.storage.getUserItem("buddy",bid)||{},res=jsxc.storage.getUserItem("res",bid)||{},status=null,xVCard=$(presence).find('x[xmlns="vcard-temp:x:update"]');if(jid===Strophe.getBareJidFromJid(jsxc.storage.getItem("jid")))return!0;if("error"===ptype){$(document).trigger("error.presence.jsxc",[from,presence]);var error=$(presence).find("error");return jsxc.error("[XMPP] "+error.attr("code")+" "+error.find(">:first-child").prop("tagName")),!0}if("subscribe"===ptype)return jsxc.storage.setUserItem("friendReq",{jid:jid,approve:-1}),jsxc.notice.add($.t("Friendship_request"),$.t("from")+" "+jid,"gui.showApproveDialog",[jid]),!0;if("unavailable"===ptype||"unsubscribed"===ptype)status=jsxc.CONST.STATUS.indexOf("offline");else{var show=$(presence).find("show").text();status=jsxc.CONST.STATUS.indexOf(""===show?"online":show)}0===status?delete res[r]:res[r]=status;var maxVal=[],max=0,prop=null;for(prop in res)res.hasOwnProperty(prop)&&max<=res[prop]&&(max!==res[prop]&&(maxVal=[],max=res[prop]),maxVal.push(prop));if(0===data.status&&max>0&&jsxc.notification.notify({title:data.name,msg:$.t("has_come_online"),source:bid}),data.status="groupchat"===data.type?status:max,data.res=maxVal,data.jid=jid,xVCard.length>0&&"groupchat"!==data.type){var photo=xVCard.find("photo");photo.length>0&&photo.text()!==data.avatar&&(jsxc.storage.removeUserItem("avatar",data.avatar),data.avatar=photo.text())}return jsxc.gui.window.get(bid).length>0&&jsxc.gui.window.get(bid).data("jid",jid),jsxc.storage.setUserItem("buddy",bid,data),jsxc.storage.setUserItem("res",bid,res),jsxc.debug("Presence ("+from+"): "+status),jsxc.gui.update(bid),jsxc.gui.roster.reorder(bid),$(document).trigger("presence.jsxc",[from,status,presence]),!0},onMessage:function(stanza){var message,carbon,forwarded=$(stanza).find('forwarded[xmlns="'+jsxc.CONST.NS.FORWARD+'"]');forwarded.length>0?(message=forwarded.find("> message"),forwarded=!0,carbon=$(stanza).find('> [xmlns="'+jsxc.CONST.NS.CARBONS+'"]'),0===carbon.length&&(carbon=!1),jsxc.debug("Incoming forwarded message",message)):(message=stanza,forwarded=!1,carbon=!1,jsxc.debug("Incoming message",message));var body=$(message).find("body:first").text();if(!body||body.match(/\?OTR/i)&&forwarded)return!0;var bid,type=$(message).attr("type"),from=$(message).attr("from"),mid=$(message).attr("id"),delay=$(message).find('delay[xmlns="urn:xmpp:delay"]'),stamp=delay.length>0?new Date(delay.attr("stamp")):new Date;if(stamp=stamp.getTime(),carbon){var direction="sent"===carbon.prop("tagName")?"out":"in";return bid=jsxc.jidToBid("out"===direction?$(message).attr("to"):from),jsxc.gui.window.postMessage(bid,direction,body,!1,forwarded,stamp),!0}forwarded&&(body=from+" "+$.t("to")+" "+$(stanza).attr("to")+'"'+body+'"',from=$(stanza).attr("from"));var jid=Strophe.getBareJidFromJid(from);bid=jsxc.jidToBid(jid);var data=jsxc.storage.getUserItem("buddy",bid),request=$(message).find("request[xmlns='urn:xmpp:receipts']");if(null===data){var chat=jsxc.storage.getUserItem("chat",bid)||[];0===chat.length&&jsxc.notice.add($.t("Unknown_sender"),$.t("You_received_a_message_from_an_unknown_sender")+" ("+bid+").","gui.showUnknownSender",[bid]);var msg=jsxc.removeHTML(body);return msg=jsxc.escapeHTML(msg),jsxc.storage.saveMessage(bid,"in",msg,!1,forwarded,stamp),!0}var win=jsxc.gui.window.init(bid);return"chat"===type&&(win.data("jid",from),jsxc.storage.updateUserItem("buddy",bid,{jid:from})),$(document).trigger("message.jsxc",[from,body]),jsxc.master&&!jsxc.otr.objects[bid]&&jsxc.otr.create(bid),forwarded||null===mid||!request.length||null===data||"both"!==data.sub&&"from"!==data.sub||"chat"!==type||jsxc.xmpp.conn.send($msg({to:from}).c("received",{xmlns:"urn:xmpp:receipts",id:mid})),jsxc.otr.objects.hasOwnProperty(bid)?jsxc.otr.objects[bid].receiveMsg(body,{stamp:stamp,forwarded:forwarded}):jsxc.gui.window.postMessage(bid,"in",body,!1,forwarded,stamp),!0},onRidChange:function(ev,data){jsxc.storage.setItem("rid",data.rid)},resFriendReq:function(from,approve){jsxc.master?(jsxc.xmpp.conn.send($pres({to:from,type:approve?"subscribed":"unsubscribed"})),jsxc.storage.removeUserItem("friendReq"),jsxc.gui.dialog.close()):jsxc.storage.updateUserItem("friendReq","approve",approve)},addBuddy:function(username,alias){var bid=jsxc.jidToBid(username);if(jsxc.master){var iq=$iq({type:"set"}).c("query",{xmlns:"jabber:iq:roster"}).c("item",{jid:username,name:alias||""});jsxc.xmpp.conn.sendIQ(iq),jsxc.xmpp.conn.send($pres({to:username,type:"subscribe"})),jsxc.storage.removeUserItem("add_"+bid)}else jsxc.storage.setUserItem("add_"+bid,{username:username,alias:alias||null})},removeBuddy:function(jid){var bid=jsxc.jidToBid(jid),iq=$iq({type:"set"}).c("query",{xmlns:"jabber:iq:roster"}).c("item",{jid:Strophe.getBareJidFromJid(jid),subscription:"remove"});jsxc.xmpp.conn.sendIQ(iq),jsxc.gui.roster.purge(bid)},onReceived:function(message){var from=$(message).attr("from"),jid=Strophe.getBareJidFromJid(from),bid=jsxc.jidToBid(jid),received=$(message).find("received[xmlns='urn:xmpp:receipts']");if(received.length){var i,receivedId=received.attr("id").replace(/:/,"-"),chat=jsxc.storage.getUserItem("chat",bid);for(i=chat.length-1;i>=0;i--)if(chat[i].uid===receivedId){chat[i].received=!0,$("#"+receivedId).addClass("jsxc_received"),jsxc.storage.setUserItem("chat",bid,chat);break}}return!0},sendMessage:function(bid,msg,uid){jsxc.otr.objects.hasOwnProperty(bid)?jsxc.otr.objects[bid].sendMsg(msg,uid):jsxc.xmpp._sendMessage(jsxc.gui.window.get(bid).data("jid"),msg,uid)},_sendMessage:function(jid,msg,uid){var data=jsxc.storage.getUserItem("buddy",jsxc.jidToBid(jid))||{},isBar=Strophe.getBareJidFromJid(jid)===jid,type=data.type||"chat",xmlMsg=$msg({to:jid,type:type,id:uid}).c("body").t(msg);jsxc.xmpp.carbons.enabled&&msg.match(/^\?OTR/)&&xmlMsg.up().c("private",{xmlns:jsxc.CONST.NS.CARBONS}),"chat"===type&&(isBar||jsxc.xmpp.conn.caps.hasFeatureByJid(jid,Strophe.NS.RECEIPTS))&&xmlMsg.up().c("request",{xmlns:"urn:xmpp:receipts"}),jsxc.xmpp.conn.send(xmlMsg)},loadVcard:function(bid,cb,error_cb){jsxc.master?jsxc.xmpp.conn.vcard.get(cb,bid,error_cb):(jsxc.storage.setUserItem("vcard",bid,"request:"+(new Date).getTime()),$(document).one("loaded.vcard.jsxc",function(ev,result){result&&"success"===result.state?cb($(result.data).get(0)):error_cb()}))},getCapabilitiesByJid:function(jid){if(jsxc.xmpp.conn)return jsxc.xmpp.conn.caps.getCapabilitiesByJid(jid);var jidVerIndex=JSON.parse(localStorage.getItem("strophe.caps._jidVerIndex"))||{},knownCapabilities=JSON.parse(localStorage.getItem("strophe.caps._knownCapabilities"))||{};return jidVerIndex[jid]?knownCapabilities[jidVerIndex[jid]]:null}},jsxc.xmpp.carbons={enabled:!1,enable:function(cb){var iq=$iq({type:"set"}).c("enable",{xmlns:jsxc.CONST.NS.CARBONS});jsxc.xmpp.conn.sendIQ(iq,function(){jsxc.xmpp.carbons.enabled=!0,jsxc.debug("Carbons enabled"),cb&&cb.call(this)},function(stanza){jsxc.warn("Could not enable carbons",stanza)})},disable:function(cb){var iq=$iq({type:"set"}).c("disable",{xmlns:jsxc.CONST.NS.CARBONS});jsxc.xmpp.conn.sendIQ(iq,function(){jsxc.xmpp.carbons.enabled=!1,jsxc.debug("Carbons disabled"),cb&&cb.call(this)},function(stanza){jsxc.warn("Could not disable carbons",stanza)})},refresh:function(err){return err!==!1?jsxc.options.get("carbons").enable?jsxc.xmpp.carbons.enable():jsxc.xmpp.carbons.disable():void 0}},jsxc.gui={emotions:[["O:-) O:)","angel"],[">:-( >:( &gt;:-( &gt;:(","angry"],[":-) :)","smile"],[":-D :D","grin"],[":-( :(","sad"],[";-) ;)","wink"],[":-P :P","tonguesmile"],["=-O","surprised"],[":kiss: :-*","kiss"],["8-) :cool:","sunglassess"],[":'-( :'( :&amp;apos;-(","crysad"],[":-/","doubt"],[":-X :X","zip"],[":yes:","thumbsup"],[":no:","thumbsdown"],[":beer:","beer"],[":devil:","devil"],[":kiss: :kissing:","kissing"],["@->-- :rose: @-&gt;--","rose"],[":music:","music"],[":love:","love"],[":zzz:","tired"]],favicon:null,queryActions:{message:function(jid,params){var win=jsxc.gui.window.open(jsxc.jidToBid(jid));params&&"string"==typeof params.body&&win.find(".jsxc_textinput").val(params.body)},remove:function(jid){jsxc.gui.showRemoveDialog(jsxc.jidToBid(jid))},subscribe:function(jid,params){jsxc.gui.showContactDialog(jid),params&&$("#jsxc_alias").val(params.name)},vcard:function(jid){jsxc.gui.showVcard(jid)},join:function(jid,params){var password=params&&params.password?params.password:null;jsxc.muc.showJoinChat(jid,password)}},init:function(){if(!($("#jsxc_windowList").length>0)){$("body").append($(jsxc.gui.template.get("windowList"))),$(window).resize(jsxc.gui.updateWindowListSB),$("#jsxc_windowList").resize(jsxc.gui.updateWindowListSB),$("#jsxc_windowListSB .jsxc_scrollLeft").click(function(){jsxc.gui.scrollWindowListBy(-200)}),$("#jsxc_windowListSB .jsxc_scrollRight").click(function(){jsxc.gui.scrollWindowListBy(200)}),$("#jsxc_windowList").on("wheel",function(ev){$("#jsxc_windowList").data("isOver")&&jsxc.gui.scrollWindowListBy(ev.originalEvent.wheelDelta>0?200:-200)}),jsxc.gui.tooltip("#jsxc_windowList");var fo=jsxc.options.get("favicon");fo&&fo.enable&&(jsxc.gui.favicon=new Favico({animation:"pop",bgColor:fo.bgColor,textColor:fo.textColor}),jsxc.gui.favicon.badge(jsxc.storage.getUserItem("unreadMsg")||0)),jsxc.el_exists("#jsxc_roster")||jsxc.gui.roster.init(),$.each(jsxc.gui.emotions,function(i,val){var reg=val[0].replace(/(\/|\||\*|\.|\+|\?|\^|\$|\(|\)|\[|\]|\{|\})/g,"\\$1");reg="("+reg.split(" ").join("|")+")",jsxc.gui.emotions[i][2]=new RegExp(reg,"g")}),jsxc.gui.windowTemplate=$(jsxc.gui.template.get("chatWindow")),jsxc.gui.buddyTemplate=$(jsxc.gui.template.get("rosterBuddy"))}},tooltip:function(selector){$(selector).tooltip({show:{delay:600},content:function(){return $(this).attr("title").replace(/\n/g,"<br />")}})},update:function(bid){var data=jsxc.storage.getUserItem("buddy",bid);if(!data)return void jsxc.debug("No data for "+bid);var ri=jsxc.gui.roster.getItem(bid),we=jsxc.gui.window.get(bid),ue=ri.add(we),spot=$('.jsxc_spot[data-bid="'+bid+'"]');switch(ri.data(data),ue.add(spot).removeClass("jsxc_"+jsxc.CONST.STATUS.join(" jsxc_")).addClass("jsxc_"+jsxc.CONST.STATUS[data.status]),ue.find(".jsxc_name:first").add(spot).text(data.name).attr("title",$.t("is_",{status:$.t(jsxc.CONST.STATUS[data.status])})),data.msgstate){case 0:we.find(".jsxc_transfer").removeClass("jsxc_enc jsxc_fin").attr("title",$.t("your_connection_is_unencrypted")),we.find(".jsxc_settings .jsxc_verification").addClass("jsxc_disabled"),we.find(".jsxc_settings .jsxc_transfer").text($.t("start_private"));break;case 1:we.find(".jsxc_transfer").addClass("jsxc_enc").attr("title",$.t("your_connection_is_encrypted")),we.find(".jsxc_settings .jsxc_verification").removeClass("jsxc_disabled"),we.find(".jsxc_settings .jsxc_transfer").text($.t("close_private"));break;case 2:we.find(".jsxc_settings .jsxc_verification").addClass("jsxc_disabled"),we.find(".jsxc_transfer").removeClass("jsxc_enc").addClass("jsxc_fin").attr("title",$.t("your_buddy_closed_the_private_connection")),we.find(".jsxc_settings .jsxc_transfer").text($.t("close_private"))}data.trust?we.find(".jsxc_transfer").addClass("jsxc_trust").attr("title",$.t("your_buddy_is_verificated")):we.find(".jsxc_transfer").removeClass("jsxc_trust"),data.sub&&"both"!==data.sub?ue.addClass("jsxc_oneway"):ue.removeClass("jsxc_oneway");
+var info="<b>"+Strophe.getBareJidFromJid(data.jid)+"</b>\n";info+=$.t("Subscription")+": "+$.t(data.sub)+"\n",info+=$.t("Status")+": "+$.t(jsxc.CONST.STATUS[data.status]),ri.find(".jsxc_name").attr("title",info),jsxc.gui.updateAvatar(ri.add(we.find(".jsxc_bar")),data.jid,data.avatar)},updateAvatar:function(el,jid,aid){var setAvatar=function(src){return 0===src||"0"===src?"function"==typeof jsxc.options.defaultAvatar?void jsxc.options.defaultAvatar.call(el,jid):void jsxc.gui.avatarPlaceholder(el.find(".jsxc_avatar"),jid):(el.find(".jsxc_avatar").removeAttr("style"),void el.find(".jsxc_avatar").css({"background-image":"url("+src+")","text-indent":"999px"}))};if("undefined"==typeof aid)return void setAvatar(0);var avatarSrc=jsxc.storage.getUserItem("avatar",aid);null!==avatarSrc?setAvatar(avatarSrc):jsxc.xmpp.conn.vcard.get(function(stanza){jsxc.debug("vCard",stanza);var src,vCard=$(stanza).find("vCard > PHOTO");if(0===vCard.length)jsxc.debug("No photo provided"),src="0";else if(vCard.find("EXTVAL").length>0)src=vCard.find("EXTVAL").text();else{var img=vCard.find("BINVAL").text(),type=vCard.find("TYPE").text();src="data:"+type+";base64,"+img}src=src.replace(/[\t\r\n\f]/gi,""),jsxc.storage.setUserItem("avatar",aid,src),setAvatar(src)},Strophe.getBareJidFromJid(jid),function(msg){jsxc.warn("Could not load vcard.",msg),jsxc.storage.setUserItem("avatar",aid,0),setAvatar(0)})},updateWindowListSB:function(){$("#jsxc_windowList>ul").width()>$("#jsxc_windowList").width()?$("#jsxc_windowListSB > div").removeClass("jsxc_disabled"):($("#jsxc_windowListSB > div").addClass("jsxc_disabled"),$("#jsxc_windowList>ul").css("right","0px"))},scrollWindowListBy:function(offset){var scrollWidth=$("#jsxc_windowList>ul").width(),width=$("#jsxc_windowList").width(),el=$("#jsxc_windowList>ul"),right=parseInt(el.css("right"))-offset,padding=$("#jsxc_windowListSB").width();width>scrollWidth||(right>0&&(right=0),width-scrollWidth-padding>right&&(right=width-scrollWidth-padding),el.css("right",right+"px"))},getWindow:function(bid){return jsxc.warn("jsxc.gui.getWindow is deprecated!"),jsxc.gui.window.get(bid)},toggleList:function(){var self=$(this);self.disableSelection();var ul=self.find("ul"),slideUp=null;slideUp=function(){ul.slideUp({complete:function(){self.removeClass("jsxc_opened")}}),$("body").off("click",null,slideUp)},$(this).click(function(){return ul.is(":hidden")?($("body").click(),$("body").one("click",slideUp)):$("body").off("click",null,slideUp),ul.slideToggle(),window.clearTimeout(ul.data("timer")),self.toggleClass("jsxc_opened"),!1}).mouseleave(function(){ul.data("timer",window.setTimeout(slideUp,2e3))}).mouseenter(function(){window.clearTimeout(ul.data("timer"))})},showLoginBox:function(){function onAuthFail(){alert.show(),jsxc.gui.dialog.resize(),$("#jsxc_dialog").find("button").trigger("btnfinished.jsxc"),$("#jsxc_dialog").find("input").one("keypress",function(){alert.hide(),jsxc.gui.dialog.resize()})}$(document).on("complete.dialog.jsxc",function(){$("#jsxc_password").focus()}),jsxc.gui.dialog.open(jsxc.gui.template.get("loginBox"));var alert=$("#jsxc_dialog").find(".jsxc_alert");alert.hide(),$("#jsxc_dialog").find("form").submit(function(ev){ev.preventDefault(),$(this).find("button[data-jsxc-loading-text]").trigger("btnloading.jsxc"),jsxc.options.loginForm.form=$(this),jsxc.options.loginForm.jid=$(this).find("#jsxc_username"),jsxc.options.loginForm.pass=$(this).find("#jsxc_password"),jsxc.triggeredFromBox=!0,jsxc.options.loginForm.triggered=!1,jsxc.prepareLogin(function(settings){settings===!1?onAuthFail():($(document).on("authfail.jsxc",onAuthFail),jsxc.xmpp.login())})})},showFingerprints:function(bid){jsxc.gui.dialog.open(jsxc.gui.template.get("fingerprintsDialog",bid))},showVerification:function(bid){return $("#jsxc_dialog").length>0?void setTimeout(function(){jsxc.gui.showVerification(bid)},3e3):jsxc.storage.getUserItem("buddy",bid).msgstate!==OTR.CONST.MSGSTATE_ENCRYPTED?void jsxc.warn("Connection not encrypted"):(jsxc.gui.dialog.open(jsxc.gui.template.get("authenticationDialog",bid)),$("#jsxc_dialog > div:gt(0)").hide(),$("#jsxc_dialog > div:eq(0) button").click(function(){$(this).siblings().removeClass("active"),$(this).addClass("active"),$(this).get(0).blur(),$("#jsxc_dialog > div:gt(0)").hide(),$("#jsxc_dialog > div:eq("+($(this).index()+1)+")").show().find("input:first").focus()}),$("#jsxc_dialog > div:eq(1) .jsxc_submit").click(function(){jsxc.master&&(jsxc.otr.objects[bid].trust=!0),jsxc.storage.updateUserItem("buddy",bid,"trust",!0),jsxc.gui.dialog.close(),jsxc.storage.updateUserItem("buddy",bid,"trust",!0),jsxc.gui.window.postMessage(bid,"sys",$.t("conversation_is_now_verified")),jsxc.gui.update(bid)}),$("#jsxc_dialog > div:eq(2) .jsxc_submit").click(function(){var div=$("#jsxc_dialog > div:eq(2)"),sec=div.find("#jsxc_secret2").val(),quest=div.find("#jsxc_quest").val();return""===sec||""===quest?void div.find('input[value=""]').addClass("jsxc_invalid").keyup(function(){$(this).val().match(/.*/)&&$(this).removeClass("jsxc_invalid")}):(jsxc.master?jsxc.otr.sendSmpReq(bid,sec,quest):jsxc.storage.setUserItem("smp_"+bid,{sec:sec,quest:quest}),jsxc.gui.dialog.close(),void jsxc.gui.window.postMessage(bid,"sys",$.t("authentication_query_sent")))}),void $("#jsxc_dialog > div:eq(3) .jsxc_submit").click(function(){var div=$("#jsxc_dialog > div:eq(3)"),sec=div.find("#jsxc_secret").val();return""===sec?void div.find("#jsxc_secret").addClass("jsxc_invalid").keyup(function(){$(this).val().match(/.*/)&&$(this).removeClass("jsxc_invalid")}):(jsxc.master?jsxc.otr.sendSmpReq(bid,sec):jsxc.storage.setUserItem("smp_"+bid,{sec:sec,quest:null}),jsxc.gui.dialog.close(),void jsxc.gui.window.postMessage(bid,"sys",$.t("authentication_query_sent")))}))},showApproveDialog:function(from){jsxc.gui.dialog.open(jsxc.gui.template.get("approveDialog"),{noClose:!0}),$("#jsxc_dialog .jsxc_their_jid").text(Strophe.getBareJidFromJid(from)),$("#jsxc_dialog .jsxc_deny").click(function(ev){ev.stopPropagation(),jsxc.xmpp.resFriendReq(from,!1),jsxc.gui.dialog.close()}),$("#jsxc_dialog .jsxc_approve").click(function(ev){ev.stopPropagation();var data=jsxc.storage.getUserItem("buddy",jsxc.jidToBid(from));jsxc.xmpp.resFriendReq(from,!0),data&&"from"!==data.sub||jsxc.gui.showContactDialog(from)})},showContactDialog:function(username){jsxc.gui.dialog.open(jsxc.gui.template.get("contactDialog")),username&&$("#jsxc_username").val(username),$("#jsxc_username").keyup(function(){if("function"==typeof jsxc.options.getUsers){var val=$(this).val();$("#jsxc_userlist").empty(),""!==val&&jsxc.options.getUsers.call(this,val,function(list){$.each(list||{},function(uid,displayname){var option=$("<option>");option.attr("data-username",uid),option.attr("data-alias",displayname),option.attr("value",uid).appendTo("#jsxc_userlist"),uid!==displayname&&option.clone().attr("value",displayname).appendTo("#jsxc_userlist")})})}}),$("#jsxc_username").on("input",function(){var val=$(this).val(),option=$("#jsxc_userlist").find('option[data-username="'+val+'"], option[data-alias="'+val+'"]');option.length>0&&($("#jsxc_username").val(option.attr("data-username")),$("#jsxc_alias").val(option.attr("data-alias")))}),$("#jsxc_dialog form").submit(function(ev){ev.preventDefault();var username=$("#jsxc_username").val(),alias=$("#jsxc_alias").val();return username.match(/@(.*)$/)||(username+="@"+Strophe.getDomainFromJid(jsxc.storage.getItem("jid"))),username&&username.match(jsxc.CONST.REGEX.JID)?(jsxc.xmpp.addBuddy(username,alias),jsxc.gui.dialog.close(),!1):($("#jsxc_username").addClass("jsxc_invalid").keyup(function(){$(this).val().match(jsxc.CONST.REGEX.JID)&&$(this).removeClass("jsxc_invalid")}),!1)})},showRemoveDialog:function(bid){jsxc.gui.dialog.open(jsxc.gui.template.get("removeDialog",bid));var data=jsxc.storage.getUserItem("buddy",bid);$("#jsxc_dialog .jsxc_remove").click(function(ev){ev.stopPropagation(),jsxc.master?jsxc.xmpp.removeBuddy(data.jid):jsxc.storage.setUserItem("deletebuddy",bid,{jid:data.jid}),jsxc.gui.dialog.close()})},showWaitAlert:function(msg){jsxc.gui.dialog.open(jsxc.gui.template.get("waitAlert",null,msg),{noClose:!0})},showAlert:function(msg){jsxc.gui.dialog.open(jsxc.gui.template.get("alert",null,msg))},showAuthFail:function(){jsxc.gui.dialog.open(jsxc.gui.template.get("authFailDialog")),jsxc.options.loginForm.triggered!==!1&&$("#jsxc_dialog .jsxc_cancel").hide(),$("#jsxc_dialog .jsxc_retry").click(function(){jsxc.gui.dialog.close()}),$("#jsxc_dialog .jsxc_cancel").click(function(){jsxc.submitLoginForm()})},showConfirmDialog:function(msg,confirm,dismiss){jsxc.gui.dialog.open(jsxc.gui.template.get("confirmDialog",null,msg),{noClose:!0}),confirm&&$("#jsxc_dialog .jsxc_confirm").click(confirm),dismiss&&$("#jsxc_dialog .jsxc_dismiss").click(dismiss)},showAboutDialog:function(){jsxc.gui.dialog.open(jsxc.gui.template.get("aboutDialog")),$("#jsxc_dialog .jsxc_debuglog").click(function(){jsxc.gui.showDebugLog()})},showDebugLog:function(){var userInfo="<h3>User information</h3>";if(navigator){var key;for(key in navigator)navigator.hasOwnProperty(key)&&"string"==typeof navigator[key]&&(userInfo+="<b>"+key+":</b> "+navigator[key]+"<br />")}window.screen&&(userInfo+="<b>Height:</b> "+window.screen.height+"<br />",userInfo+="<b>Width:</b> "+window.screen.width+"<br />"),userInfo+="<b>jsxc version:</b> "+jsxc.version+"<br />",jsxc.gui.dialog.open('<div class="jsxc_log">'+userInfo+"<h3>Log</h3><pre>"+jsxc.escapeHTML(jsxc.log)+"</pre></div>")},showVcard:function(jid){var bid=jsxc.jidToBid(jid);jsxc.gui.dialog.open(jsxc.gui.template.get("vCard",bid));var data=jsxc.storage.getUserItem("buddy",bid);if(data){var i,j,res,identities,cap,client,identity=null;for(i=0;i<data.res.length;i++){for(res=data.res[i],identities=[],cap=jsxc.xmpp.getCapabilitiesByJid(bid+"/"+res),null!==cap&&null!==cap.identities&&(identities=cap.identities),client="",j=0;j<identities.length;j++)identity=identities[j],"client"===identity.category&&(""!==client&&(client+=",\n"),client+=identity.name+" ("+identity.type+")");var status=jsxc.storage.getUserItem("res",bid)[res];$("#jsxc_dialog ul.jsxc_vCard").append('<li class="jsxc_sep"><strong>'+$.t("Resource")+":</strong> "+res+"</li>"),$("#jsxc_dialog ul.jsxc_vCard").append("<li><strong>"+$.t("Client")+":</strong> "+client+"</li>"),$("#jsxc_dialog ul.jsxc_vCard").append("<li><strong>"+$.t("Status")+":</strong> "+$.t(jsxc.CONST.STATUS[status])+"</li>")}}var printProp=function(el,depth){var content="";return el.each(function(){var item=$(this),children=$(this).children();content+="<li>";var prop=$.t(item[0].tagName);" "!==prop&&(content+="<strong>"+prop+":</strong> "),"PHOTO"===item[0].tagName||(children.length>0?(content+="<ul>",content+=printProp(children,depth+1),content+="</ul>"):""!==item.text()&&(content+=jsxc.escapeHTML(item.text()))),content+="</li>",0===depth&&$("#jsxc_dialog ul.jsxc_vCard").length>0&&($("#jsxc_dialog ul.jsxc_vCard li.jsxc_sep:first").length>0?$("#jsxc_dialog ul.jsxc_vCard li.jsxc_sep:first").before(content):$("#jsxc_dialog ul.jsxc_vCard").append(content),content="")}),depth>0?content:void 0},failedToLoad=function(){if(0!==$("#jsxc_dialog ul.jsxc_vCard").length){$("#jsxc_dialog p").remove();var content="<p>";content+=$.t("Sorry_your_buddy_doesnt_provide_any_information"),content+="</p>",$("#jsxc_dialog").append(content)}};jsxc.xmpp.loadVcard(bid,function(stanza){if(0!==$("#jsxc_dialog ul.jsxc_vCard").length){$("#jsxc_dialog p").remove();var photo=$(stanza).find("vCard > PHOTO");if(photo.length>0){var img=photo.find("BINVAL").text(),type=photo.find("TYPE").text(),src="data:"+type+";base64,"+img;photo.find("EXTVAL").length>0&&(src=photo.find("EXTVAL").text()),src=src.replace(/[\t\r\n\f]/gi,"");var img_el=$('<img class="jsxc_vCard" alt="avatar" />');img_el.attr("src",src),$("#jsxc_dialog h3").before(img_el)}return 0===$(stanza).find("vCard").length||1===$(stanza).find("vcard > *").length&&1===photo.length?void failedToLoad():void printProp($(stanza).find("vcard > *"),0)}},failedToLoad)},showSettings:function(){jsxc.gui.dialog.open(jsxc.gui.template.get("settings")),("false"===jsxc.options.get("xmpp").overwrite||jsxc.options.get("xmpp").overwrite===!1)&&$(".jsxc_fieldsetXmpp").parent().hide(),$("#jsxc_dialog form").each(function(){var self=$(this);self.find('input[type!="submit"]').each(function(){var id=this.id.split("-"),prop=id[0],key=id[1],type=this.type,data=jsxc.options.get(prop);data&&"undefined"!=typeof data[key]&&("checkbox"===type?"false"!==data[key]&&data[key]!==!1&&(this.checked="checked"):$(this).val(data[key]))})}),$("#jsxc_dialog form").submit(function(){var self=$(this),data={};self.find('input[type!="submit"]').each(function(){var val,id=this.id.split("-"),prop=id[0],key=id[1],type=this.type;val="checkbox"===type?this.checked:$(this).val(),data[prop]||(data[prop]={}),data[prop][key]=val}),$.each(data,function(key,val){jsxc.options.set(key,val)});var success=jsxc.options.saveSettinsPermanent.call(this,data);return"string"==typeof self.attr("data-onsubmit")&&jsxc.exec(self.attr("data-onsubmit"),[success]),setTimeout(function(){success?self.find('button[type="submit"]').switchClass("btn-primary","btn-success"):self.find('button[type="submit"]').switchClass("btn-primary","btn-danger"),setTimeout(function(){self.find('button[type="submit"]').switchClass("btn-danger btn-success","btn-primary")},2e3)},200),!1})},showRequestNotification:function(){jsxc.switchEvents({"notificationready.jsxc":function(){jsxc.gui.dialog.close(),jsxc.notification.init(),jsxc.storage.setUserItem("notification",1)},"notificationfailure.jsxc":function(){jsxc.gui.dialog.close(),jsxc.options.notification=!1,jsxc.storage.setUserItem("notification",0)}}),jsxc.gui.showConfirmDialog($.t("Should_we_notify_you_"),function(){jsxc.gui.dialog.open(jsxc.gui.template.get("pleaseAccept"),{noClose:!0}),jsxc.notification.requestPermission()},function(){$(document).trigger("notificationfailure.jsxc")})},showUnknownSender:function(bid){var confirmationText=$.t("You_received_a_message_from_an_unknown_sender_",{sender:bid});jsxc.gui.showConfirmDialog(confirmationText,function(){jsxc.gui.dialog.close(),jsxc.storage.saveBuddy(bid,{jid:bid,name:bid,status:0,sub:"none",res:[]}),jsxc.gui.window.open(bid)},function(){jsxc.storage.removeUserItem("chat",bid)})},showSelectionDialog:function(header,msg,primary,option,primaryLabel,optionLabel){var opt;opt=1===arguments.length&&"object"==typeof header&&null!==header?header:{header:header,msg:msg,primary:{label:primaryLabel,cb:primary},option:{label:optionLabel,cb:option}};var dialog=jsxc.gui.dialog.open(jsxc.gui.template.get("selectionDialog"),{noClose:!0});opt.header?dialog.find("h3").text(opt.header):dialog.find("h3").hide(),opt.msg?dialog.find("p").text(opt.msg):dialog.find("p").hide(),opt.primary&&opt.primary.label&&dialog.find(".btn-primary").text(opt.primary.label),opt.primary&&opt.option.label&&dialog.find(".btn-default").text(opt.option.label),opt.primary&&opt.primary.cb&&dialog.find(".btn-primary").click(opt.primary.cb),opt.primary&&opt.option.cb&&dialog.find(".btn-primary").click(opt.option.cb)},changePresence:function(pres,external){external!==!0&&jsxc.storage.setUserItem("presence",pres),jsxc.master&&jsxc.xmpp.sendPres(),$("#jsxc_presence > span").text($("#jsxc_presence > ul .jsxc_"+pres).text()),jsxc.gui.updatePresence("own",pres)},updatePresence:function(bid,pres){"own"===bid&&("dnd"===pres?($("#jsxc_menu .jsxc_muteNotification").addClass("jsxc_disabled"),jsxc.notification.muteSound(!0)):($("#jsxc_menu .jsxc_muteNotification").removeClass("jsxc_disabled"),jsxc.options.get("muteNotification")||jsxc.notification.unmuteSound(!0))),$('.jsxc_presence[data-bid="'+bid+'"]').removeClass("jsxc_"+jsxc.CONST.STATUS.join(" jsxc_")).addClass("jsxc_"+pres)},unreadMsg:function(bid){var winData=jsxc.storage.getUserItem("window",bid),count=winData&&winData.unread||0;count=count===!0?1:count+1,winData.unread=count,jsxc.storage.setUserItem("window",bid,winData);var total=jsxc.storage.getUserItem("unreadMsg")||0;total++,jsxc.storage.setUserItem("unreadMsg",total),jsxc.gui.favicon&&jsxc.gui.favicon.badge(total),jsxc.gui._unreadMsg(bid,count)},_unreadMsg:function(bid,count){var win=jsxc.gui.window.get(bid);if("number"!=typeof count){var winData=jsxc.storage.getUserItem("window",bid);count=winData&&winData.unread||1,count=count===!0?1:count}var el=jsxc.gui.roster.getItem(bid).add(win);el.addClass("jsxc_unreadMsg"),el.find(".jsxc_unread").text(count)},readMsg:function(bid){var win=jsxc.gui.window.get(bid),winData=jsxc.storage.getUserItem("window",bid),count=winData&&winData.unread||0;count=count===!0?0:count;var el=jsxc.gui.roster.getItem(bid).add(win);if(el.removeClass("jsxc_unreadMsg"),el.find(".jsxc_unread").text(0),count>0){var total=jsxc.storage.getUserItem("unreadMsg")||0;total-=count,jsxc.storage.setUserItem("unreadMsg",total),jsxc.gui.favicon&&jsxc.gui.favicon.badge(total),jsxc.storage.updateUserItem("window",bid,"unread",0)}},detectUriScheme:function(container){container=$(container?container:"body"),container.find("a[href^='xmpp:']").each(function(){var action,element=$(this),href=element.attr("href").replace(/^xmpp:/,""),jid=href.split("?")[0],params={};if(href.indexOf("?")<0)action="message";else{var pairs=href.substring(href.indexOf("?")+1).split(";");action=pairs[0];var i,key,value;for(i=1;i<pairs.length;i++)key=pairs[i].split("=")[0],value=pairs[i].indexOf("=")>0?pairs[i].substring(pairs[i].indexOf("=")+1):null,params[decodeURIComponent(key)]=decodeURIComponent(value)}"function"==typeof jsxc.gui.queryActions[action]&&(element.addClass("jsxc_uriScheme jsxc_uriScheme_"+action),element.off("click").click(function(ev){return ev.stopPropagation(),jsxc.gui.queryActions[action].call(jsxc,jid,params),!1}))})},detectEmail:function(container){container=$(container?container:"body"),container.find('a[href^="mailto:"]').each(function(){var spot=$("<span>X</span>").addClass("jsxc_spot"),href=$(this).attr("href").replace(/^ *mailto:/,"").trim();if(""!==href&&href!==Strophe.getBareJidFromJid(jsxc.storage.getItem("jid"))){var bid=jsxc.jidToBid(href),self=$(this),s=self.prev();s.hasClass("jsxc_spot")||(s=spot.clone().attr("data-bid",bid),self.before(s)),s.off("click"),jsxc.storage.getUserItem("buddy",bid)?(jsxc.gui.update(bid),s.click(function(){return jsxc.gui.window.open(bid),!1})):s.click(function(){return jsxc.gui.showContactDialog(href),!1})}})},avatarPlaceholder:function(el,seed,text){text=text||seed;var options=jsxc.options.get("avatarplaceholder")||{},hash=jsxc.hashStr(seed),hue=Math.abs(hash)%360,saturation=options.saturation||90,lightness=options.lightness||65;el.css({"background-color":"hsl("+hue+", "+saturation+"%, "+lightness+"%)",color:"#fff","font-weight":"bold","text-align":"center","line-height":el.height()+"px","font-size":.6*el.height()+"px"}),"string"==typeof text&&text.length>0&&el.text(text[0].toUpperCase())}},jsxc.gui.roster={ready:!1,loaded:!1,init:function(){$(jsxc.options.rosterAppend+":first").append($(jsxc.gui.template.get("roster"))),jsxc.options.get("hideOffline")&&($("#jsxc_menu .jsxc_hideOffline").text($.t("Show_offline")),$("#jsxc_buddylist").addClass("jsxc_hideOffline")),$("#jsxc_menu .jsxc_settings").click(function(){jsxc.gui.showSettings()}),$("#jsxc_menu .jsxc_hideOffline").click(function(){var hideOffline=!jsxc.options.get("hideOffline");hideOffline?$("#jsxc_buddylist").addClass("jsxc_hideOffline"):$("#jsxc_buddylist").removeClass("jsxc_hideOffline"),$(this).text($.t(hideOffline?"Show_offline":"Hide_offline")),jsxc.options.set("hideOffline",hideOffline)}),jsxc.options.get("muteNotification")&&jsxc.notification.muteSound(),$("#jsxc_menu .jsxc_muteNotification").click(function(){if("dnd"!==jsxc.storage.getUserItem("presence")){var mute=!jsxc.options.get("muteNotification");mute?jsxc.notification.muteSound():jsxc.notification.unmuteSound()}}),$("#jsxc_roster .jsxc_addBuddy").click(function(){jsxc.gui.showContactDialog()}),$("#jsxc_roster .jsxc_onlineHelp").click(function(){window.open("http://www.jsxc.org/manual.html","onlineHelp")}),$("#jsxc_roster .jsxc_about").click(function(){jsxc.gui.showAboutDialog()}),$("#jsxc_toggleRoster").click(function(){jsxc.gui.roster.toggle()}),$("#jsxc_presence > ul > li").click(function(){var self=$(this),pres=self.data("pres");"offline"===pres?jsxc.xmpp.logout(!1):jsxc.gui.changePresence(pres)}),$("#jsxc_buddylist").slimScroll({distance:"3px",height:$("#jsxc_roster").height()-31+"px",width:$("#jsxc_buddylist").width()+"px",color:"#fff",opacity:"0.5"}),$("#jsxc_roster > .jsxc_bottom > div").each(function(){jsxc.gui.toggleList.call($(this))});var rosterState=jsxc.storage.getUserItem("roster")||(jsxc.options.get("loginForm").startMinimized?"hidden":"shown");$("#jsxc_roster").addClass("jsxc_state_"+rosterState),"hidden"===rosterState&&($("#jsxc_roster").css("right",-1*$("#jsxc_roster").innerWidth()+"px"),$("#jsxc_windowList").css("right","10px"));var pres=jsxc.storage.getUserItem("presence")||"online";$("#jsxc_presence > span").text($("#jsxc_presence > ul .jsxc_"+pres).text()),jsxc.gui.updatePresence("own",pres),jsxc.gui.tooltip("#jsxc_roster"),jsxc.notice.load(),jsxc.gui.roster.ready=!0,$(document).trigger("ready.roster.jsxc")},add:function(bid){var data=jsxc.storage.getUserItem("buddy",bid),bud=jsxc.gui.buddyTemplate.clone().attr("data-bid",bid).attr("data-type",data.type||"chat");jsxc.gui.roster.insert(bid,bud),bud.click(function(){jsxc.gui.window.open(bid)}),bud.find(".jsxc_chaticon").click(function(){jsxc.gui.window.open(bid)}),bud.find(".jsxc_rename").click(function(){return jsxc.gui.roster.rename(bid),!1}),"groupchat"!==data.type&&bud.find(".jsxc_delete").click(function(){return jsxc.gui.showRemoveDialog(bid),!1});var expandClick=function(){return bud.trigger("extra.jsxc"),bud.toggleClass("jsxc_expand"),jsxc.gui.updateAvatar(bud,data.jid,data.avatar),!1};bud.find(".jsxc_control").click(expandClick),bud.dblclick(expandClick),bud.find(".jsxc_vcardicon").click(function(){return jsxc.gui.showVcard(data.jid),!1}),jsxc.gui.update(bid),$("#jsxc_buddylist").slimScroll({scrollTo:"0px"}),$(document).trigger("add.roster.jsxc",[bid,data,bud])},getItem:function(bid){return $("#jsxc_buddylist > li[data-bid='"+bid+"']")},insert:function(bid,li){var data=jsxc.storage.getUserItem("buddy",bid),listElements=$("#jsxc_buddylist > li"),insert=!1,status="both"===data.sub?data.status:-1;listElements.each(function(){var thisStatus="both"===$(this).data("sub")?$(this).data("status"):-1;return $(this).data("name").toLowerCase()>data.name.toLowerCase()&&thisStatus===status||status>thisStatus?($(this).before(li),insert=!0,!1):void 0}),insert||li.appendTo("#jsxc_buddylist")},reorder:function(bid){jsxc.gui.roster.insert(bid,jsxc.gui.roster.remove(bid))},remove:function(bid){return jsxc.gui.roster.getItem(bid).detach()},purge:function(bid){jsxc.master&&(jsxc.storage.removeUserItem("buddy",bid),jsxc.storage.removeUserItem("otr",bid),jsxc.storage.removeUserItem("otr_version_"+bid),jsxc.storage.removeUserItem("chat",bid),jsxc.storage.removeUserItem("window",bid),jsxc.storage.removeUserElement("buddylist",bid),jsxc.storage.removeUserElement("windowlist",bid)),jsxc.gui.window._close(bid),jsxc.gui.roster.remove(bid)},rename:function(bid){var name=jsxc.gui.roster.getItem(bid).find(".jsxc_name"),options=jsxc.gui.roster.getItem(bid).find(".jsxc_options, .jsxc_control, .jsxc_unread"),input=$('<input type="text" name="name"/>');options.hide(),name=name.replaceWith(input),input.val(name.text()),input.keypress(function(ev){13===ev.which&&(options.css("display",""),input.replaceWith(name),jsxc.gui.roster._rename(bid,$(this).val()),$("html").off("click"))}),input.click(function(){return!1}),$("html").one("click",function(){options.css("display",""),input.replaceWith(name),jsxc.gui.roster._rename(bid,input.val())})},_rename:function(bid,newname){if(jsxc.master){var d=jsxc.storage.getUserItem("buddy",bid)||{};if("chat"===d.type){var iq=$iq({type:"set"}).c("query",{xmlns:"jabber:iq:roster"}).c("item",{jid:Strophe.getBareJidFromJid(d.jid),name:newname});jsxc.xmpp.conn.sendIQ(iq)}else"groupchat"===d.type&&jsxc.xmpp.bookmarks.add(bid,newname,d.nickname,d.autojoin)}jsxc.storage.updateUserItem("buddy",bid,"name",newname),jsxc.gui.update(bid)},toggle:function(d){var duration=d||500,roster=$("#jsxc_roster"),wl=$("#jsxc_windowList"),roster_width=roster.innerWidth(),roster_right=parseFloat($("#jsxc_roster").css("right")),state=0>roster_right?"shown":"hidden";jsxc.storage.setUserItem("roster",state),roster.removeClass("jsxc_state_hidden jsxc_state_shown").addClass("jsxc_state_"+state),roster.animate({right:-1*(roster_width+roster_right)+"px"},duration),wl.animate({right:10-roster_right+"px"},duration),$(document).trigger("toggle.roster.jsxc",[state,duration])},noConnection:function(){$("#jsxc_roster").addClass("jsxc_noConnection"),$("#jsxc_buddylist").empty(),$("#jsxc_roster").append($("<p>"+$.t("no_connection")+"</p>").append(" <a>"+$.t("relogin")+"</a>").click(function(){jsxc.gui.showLoginBox()}))},empty:function(){var text=$("<p>"+$.t("Your_roster_is_empty_add_")+"</p>"),link=text.find("a");link.click(function(){jsxc.gui.showContactDialog()}),text.append(link),text.append("."),$("#jsxc_roster").prepend(text)}},jsxc.gui.dialog={open:function(data,o){var opt=o||{};return $.magnificPopup.open({items:{src:'<div id="jsxc_dialog">'+data+"</div>"},type:"inline",modal:opt.noClose,callbacks:{beforeClose:function(){$(document).trigger("cleanup.dialog.jsxc")},afterClose:function(){$(document).trigger("close.dialog.jsxc")},open:function(){$("#jsxc_dialog .jsxc_close").click(function(ev){ev.preventDefault(),jsxc.gui.dialog.close()}),$("#jsxc_dialog form").each(function(){var form=$(this);form.find("button[data-jsxc-loading-text]").each(function(){var btn=$(this);btn.on("btnloading.jsxc",function(){btn.prop("disabled")||(btn.prop("disabled",!0),btn.data("jsxc_value",btn.text()),btn.text(btn.attr("data-jsxc-loading-text")))}),btn.on("btnfinished.jsxc",function(){btn.prop("disabled")&&(btn.prop("disabled",!1),btn.text(btn.data("jsxc_value")))})})}),jsxc.gui.dialog.resize(),$(document).trigger("complete.dialog.jsxc")}}}),$("#jsxc_dialog")},close:function(){jsxc.debug("close dialog"),$.magnificPopup.close()},resize:function(){}},jsxc.gui.window={init:function(bid){if(jsxc.gui.window.get(bid).length>0)return jsxc.gui.window.get(bid);var win=jsxc.gui.windowTemplate.clone().attr("data-bid",bid).hide().appendTo("#jsxc_windowList > ul").show("slow"),data=jsxc.storage.getUserItem("buddy",bid);if(win.data("jid",data.jid),jsxc.gui.toggleList.call(win.find(".jsxc_settings")),win.find(".jsxc_verification").click(function(){jsxc.gui.showVerification(bid)}),win.find(".jsxc_fingerprints").click(function(){jsxc.gui.showFingerprints(bid)}),win.find(".jsxc_transfer").click(function(){jsxc.otr.toggleTransfer(bid)}),win.find(".jsxc_bar").click(function(){jsxc.gui.window.toggle(bid)}),win.find(".jsxc_close").click(function(){jsxc.gui.window.close(bid)}),win.find(".jsxc_clear").click(function(){jsxc.gui.window.clear(bid)}),win.find(".jsxc_tools").click(function(){return!1}),win.find(".jsxc_textinput").keyup(function(ev){var body=$(this).val();13===ev.which&&(body=""),jsxc.storage.updateUserItem("window",bid,"text",body),27===ev.which&&jsxc.gui.window.close(bid)}).keypress(function(ev){13===ev.which&&$(this).val()&&(jsxc.gui.window.postMessage(bid,"out",$(this).val()),$(this).val(""))}).focus(function(){jsxc.gui.readMsg(bid)}).mouseenter(function(){$("#jsxc_windowList").data("isOver",!0)}).mouseleave(function(){$("#jsxc_windowList").data("isOver",!1)}),win.find(".jsxc_textarea").click(function(){"function"!=typeof getSelection||getSelection().toString()||win.find(".jsxc_textinput").focus()}),win.find(".jsxc_textarea").slimScroll({height:"234px",distance:"3px"}),win.find(".jsxc_fade").hide(),win.find(".jsxc_name").disableSelection(),win.find(".slimScrollDiv").resizable({handles:"w, nw, n",minHeight:234,minWidth:250,resize:function(event,ui){win.width(ui.size.width),win.find(".jsxc_textarea").slimScroll({height:ui.size.height});var offset=win.find(".slimScrollDiv").position().top;win.find(".jsxc_emoticons").css("top",ui.size.height+offset+6+"px"),$(document).trigger("resize.window.jsxc",[win,bid,ui.size])}}),$.inArray(bid,jsxc.storage.getUserItem("windowlist"))<0){var wl=jsxc.storage.getUserItem("windowlist");wl.push(bid),jsxc.storage.setUserItem("windowlist",wl),jsxc.storage.setUserItem("window",bid,{minimize:!0,text:"",unread:0})}else jsxc.storage.getUserItem("window",bid).unread&&jsxc.gui._unreadMsg(bid);return $.each(jsxc.gui.emotions,function(i,val){var ins=val[0].split(" ")[0],li=$('<li><div title="'+ins+'" class="jsxc_'+val[1]+'"/></li>');li.click(function(){win.find("input").val(win.find("input").val()+ins),win.find("input").focus()}),win.find(".jsxc_emoticons ul").append(li)}),jsxc.gui.toggleList.call(win.find(".jsxc_emoticons")),jsxc.gui.window.restoreChat(bid),jsxc.gui.update(bid),jsxc.gui.updateWindowListSB(),jsxc.master&&!jsxc.otr.objects[bid]?jsxc.otr.create(bid):jsxc.otr.enable(bid),$(document).trigger("init.window.jsxc",[win]),win},get:function(id){return $("li.jsxc_windowItem[data-bid='"+jsxc.jidToBid(id)+"']")},open:function(bid){var win=jsxc.gui.window.init(bid);jsxc.gui.window.show(bid),jsxc.gui.window.highlight(bid);var padding=$("#jsxc_windowListSB").width(),innerWidth=$("#jsxc_windowList>ul").width(),outerWidth=$("#jsxc_windowList").width()-padding;if(innerWidth>outerWidth){var offset=parseInt($("#jsxc_windowList>ul").css("right")),width=win.outerWidth(!0),right=innerWidth-win.position().left-width+offset,left=outerWidth-(innerWidth-win.position().left)-offset;0>left&&jsxc.gui.scrollWindowListBy(-1*left),0>right&&jsxc.gui.scrollWindowListBy(right)}return win},close:function(bid){return 0===jsxc.gui.window.get(bid).length?void jsxc.warn("Want to close a window, that is not open."):(jsxc.storage.removeUserElement("windowlist",bid),jsxc.storage.removeUserItem("window",bid),jsxc.storage.getUserItem("buddylist").indexOf(bid)<0&&(jsxc.storage.removeUserItem("buddy",bid),jsxc.storage.removeUserItem("chat",bid)),void jsxc.gui.window._close(bid))},_close:function(bid){jsxc.gui.window.get(bid).hide("slow",function(){$(this).remove(),jsxc.gui.updateWindowListSB()})},toggle:function(bid){var win=jsxc.gui.window.get(bid);0!==win.parents("#jsxc_windowList").length&&(win.find(".jsxc_fade").is(":hidden")?jsxc.gui.window.show(bid):jsxc.gui.window.hide(bid),jsxc.gui.updateWindowListSB())},show:function(bid){jsxc.storage.updateUserItem("window",bid,"minimize",!1),jsxc.gui.window._show(bid)},_show:function(bid){var win=jsxc.gui.window.get(bid);jsxc.gui.window.get(bid).find(".jsxc_fade").slideDown(),win.removeClass("jsxc_min"),jsxc.gui.window.scrollDown(bid),jsxc.restoreCompleted&&win.find(".jsxc_textinput").focus(),win.trigger("show.window.jsxc")},hide:function(bid){jsxc.storage.updateUserItem("window",bid,"minimize",!0),jsxc.gui.window._hide(bid)},_hide:function(bid){jsxc.gui.window.get(bid).addClass("jsxc_min").find(" .jsxc_fade").slideUp(),jsxc.gui.window.get(bid).trigger("hidden.window.jsxc")},highlight:function(bid){var el=jsxc.gui.window.get(bid).find(" .jsxc_bar");el.is(":animated")||el.effect("highlight",{color:"orange"},2e3)},scrollDown:function(bid){var chat=jsxc.gui.window.get(bid).find(".jsxc_textarea");0!==chat.length&&chat.slimScroll({scrollTo:chat.get(0).scrollHeight+"px"})},postMessage:function(bid,direction,msg,encrypted,forwarded,stamp,sender){var data=jsxc.storage.getUserItem("buddy",bid),html_msg=msg;msg=jsxc.removeHTML(msg),msg=jsxc.escapeHTML(msg),"out"===direction&&data.msgstate===OTR.CONST.MSGSTATE_FINISHED&&forwarded!==!0&&(direction="sys",msg=$.t("your_message_wasnt_send_please_end_your_private_conversation")),"in"===direction&&data.msgstate===OTR.CONST.MSGSTATE_FINISHED&&(direction="sys",msg=$.t("unencrypted_message_received")+" "+msg),encrypted=encrypted||data.msgstate===OTR.CONST.MSGSTATE_ENCRYPTED;var post=jsxc.storage.saveMessage(bid,direction,msg,encrypted,forwarded,stamp,sender);"in"===direction&&(jsxc.gui.unreadMsg(bid),$(document).trigger("postmessagein.jsxc",[bid,html_msg])),"out"===direction&&jsxc.master&&forwarded!==!0&&jsxc.xmpp.sendMessage(bid,html_msg,post.uid),jsxc.gui.window._postMessage(bid,post),"out"===direction&&"?"===msg&&jsxc.gui.window.postMessage(bid,"sys","42")
+},_postMessage:function(bid,post,restore){var win=jsxc.gui.window.get(bid),msg=post.msg,direction=post.direction,uid=post.uid;win.find(".jsxc_textinput").is(":not(:focus)")&&"in"===direction&&!restore&&jsxc.gui.window.highlight(bid),msg=msg.replace(jsxc.CONST.REGEX.URL,function(url){var href=url.match(/^https?:\/\//i)?url:"http://"+url;return'<a href="'+href+'" target="_blank">'+url+"</a>"}),msg=msg.replace(new RegExp("(xmpp:)?("+jsxc.CONST.REGEX.JID.source+")(\\?[^\\s]+\\b)?","i"),function(match,protocol,jid,action){return"xmpp:"===protocol?("string"==typeof action&&(jid+=action),'<a href="xmpp:'+jid+'">'+jid+"</a>"):'<a href="mailto:'+jid+'" target="_blank">'+jid+"</a>"}),$.each(jsxc.gui.emotions,function(i,val){msg=msg.replace(val[2],function(match,p1){var i,esc="";for(i=0;i<p1.length;i++)esc+="&#"+p1.charCodeAt(i)+";";return'<div title="'+esc+'" class="jsxc_emoticon jsxc_'+val[1]+'"/>'})});var msgDiv=$("<div>"),msgTsDiv=$("<div>");if(msgDiv.addClass("jsxc_chatmessage jsxc_"+direction),msgDiv.attr("id",uid),msgDiv.html("<div>"+msg+"</div>"),msgTsDiv.addClass("jsxc_timestamp"),msgTsDiv.text(jsxc.getFormattedTime(post.stamp)),post.received&&msgDiv.addClass("jsxc_received"),post.forwarded&&msgDiv.addClass("jsxc_forwarded"),post.encrypted&&msgDiv.addClass("jsxc_encrypted"),"sys"===direction?jsxc.gui.window.get(bid).find(".jsxc_textarea").append('<div style="clear:both"/>'):"undefined"!=typeof post.stamp&&msgDiv.append(msgTsDiv),win.find(".jsxc_textarea").append(msgDiv),"object"==typeof post.sender&&null!==post.sender){var title="",avatarDiv=$("<div>");if(avatarDiv.addClass("jsxc_avatar").prependTo(msgDiv),"string"==typeof post.sender.jid){msgDiv.attr("data-bid",jsxc.jidToBid(post.sender.jid));var data=jsxc.storage.getUserItem("buddy",jsxc.jidToBid(post.sender.jid))||{};jsxc.gui.updateAvatar(msgDiv,jsxc.jidToBid(post.sender.jid),data.avatar),title=jsxc.jidToBid(post.sender.jid)}"string"==typeof post.sender.name&&(msgDiv.attr("data-name",post.sender.name),"string"!=typeof post.sender.jid&&jsxc.gui.avatarPlaceholder(avatarDiv,post.sender.name),""!==title&&(title="\n"+title),title=post.sender.name+title,msgTsDiv.text(msgTsDiv.text()+" "+post.sender.name)),avatarDiv.attr("title",jsxc.escapeHTML(title))}jsxc.gui.detectUriScheme(win),jsxc.gui.detectEmail(win),jsxc.gui.window.scrollDown(bid)},setText:function(bid,text){jsxc.gui.window.get(bid).find(".jsxc_textinput").val(text)},restoreChat:function(bid){for(var chat=jsxc.storage.getUserItem("chat",bid);null!==chat&&chat.length>0;){var c=chat.pop();jsxc.gui.window._postMessage(bid,c,!0)}},clear:function(bid){jsxc.storage.setUserItem("chat",bid,[]),jsxc.gui.window.get(bid).find(".jsxc_textarea").empty()}},jsxc.gui.template={},jsxc.gui.template.get=function(name,bid,msg){var ph={my_priv_fingerprint:jsxc.storage.getUserItem("priv_fingerprint")?jsxc.storage.getUserItem("priv_fingerprint").replace(/(.{8})/g,"$1 "):$.t("not_available"),my_jid:jsxc.storage.getItem("jid")||"",my_node:Strophe.getNodeFromJid(jsxc.storage.getItem("jid")||"")||"",root:jsxc.options.root,app_name:jsxc.options.app_name,version:jsxc.version};if(bid){var data=jsxc.storage.getUserItem("buddy",bid);$.extend(ph,{bid_priv_fingerprint:data&&data.fingerprint?data.fingerprint.replace(/(.{8})/g,"$1 "):$.t("not_available"),bid_jid:bid,bid_name:data&&data.name?data.name:bid})}msg&&$.extend(ph,{msg:msg});var ret=jsxc.gui.template[name];return"string"==typeof ret?(ret=ret.replace(/\{\{root\}\}/g,ph.root),ret=$("<div>").append($(ret).i18n()).html(),ret=ret.replace(/\{\{([a-zA-Z0-9_\-]+)\}\}/g,function(s,key){return"string"==typeof ph[key]?ph[key]:s})):(jsxc.debug("Template not available: "+name),name)},jsxc.muc={conn:null,CONST:{AFFILIATION:{ADMIN:"admin",MEMBER:"member",OUTCAST:"outcast",OWNER:"owner",NONE:"none"},ROLE:{MODERATOR:"moderator",PARTICIPANT:"participant",VISITOR:"visitor",NONE:"none"},ROOMSTATE:{INIT:0,ENTERED:1,EXITED:2,AWAIT_DESTRUCTION:3,DESTROYED:4}},init:function(o){var self=jsxc.muc;self.conn=jsxc.xmpp.conn;var options=o||jsxc.options.get("muc");return options&&"string"==typeof options.server?(jsxc.gui.roster.ready?self.initMenu():$(document).one("ready.roster.jsxc",jsxc.muc.initMenu),$(document).on("presence.jsxc",jsxc.muc.onPresence),$(document).on("error.presence.jsxc",jsxc.muc.onPresenceError),self.conn.addHandler(self.onGroupchatMessage,null,"message","groupchat"),self.conn.addHandler(self.onErrorMessage,null,"message","error"),void(self.conn.muc.roomNames=jsxc.storage.getUserItem("roomNames")||[])):(jsxc.debug("Discover muc service"),void setTimeout(function(){self.conn.disco.items(Strophe.getDomainFromJid(self.conn.jid),null,function(items){$(items).find("item").each(function(){var jid=$(this).attr("jid"),discovered=!1;return self.conn.disco.info(jid,null,function(info){var mucFeature=$(info).find('feature[var="'+Strophe.NS.MUC+'"]'),mucIdentity=$(info).find('identity[category="conference"][type="text"]');mucFeature.length>0&&mucIdentity.length>0&&(jsxc.debug("muc service found",jid),jsxc.options.set("muc",{server:jid,name:$(info).find("identity").attr("name")}),discovered=!0,self.init())}),!discovered})})},1e3))},initMenu:function(){var li=$("<li>").attr("class","jsxc_joinChat").text($.t("Join_chat"));li.click(jsxc.muc.showJoinChat),$("#jsxc_menu ul").append(li)},showJoinChat:function(r,p){var self=jsxc.muc,dialog=jsxc.gui.dialog.open(jsxc.gui.template.get("joinChat"));dialog.find(".jsxc_join").hide(),"string"==typeof r&&dialog.find("#jsxc_room").val(r),"string"==typeof p&&dialog.find("#jsxc_password").val(p),dialog.find("#jsxc_server").val(jsxc.options.get("muc").server);var error_handler=function(event,condition,room){var msg;switch(condition){case"not-authorized":msg=$.t("A_password_is_required");break;case"registration-required":msg=$.t("You_are_not_on_the_member_list");break;case"forbidden":msg=$.t("You_are_banned_from_this_room");break;case"conflict":msg=$.t("Your_desired_nickname_");break;case"service-unavailable":msg=$.t("The_maximum_number_");break;case"item-not-found":msg=$.t("This_room_is_locked_");break;case"not-allowed":msg=$.t("You_are_not_allowed_to_create_");break;default:jsxc.warn("Unknown muc error condition: "+condition),msg=$.t("Error")+": "+condition}var roomIndex=self.conn.muc.roomNames.indexOf(room);roomIndex>-1&&(self.conn.muc.roomNames.splice(roomIndex,1),delete self.conn.muc.rooms[room]),dialog.find(".jsxc_warning").text(msg)};$(document).on("error.muc.jsxc",error_handler),$(document).on("close.dialog.jsxc",function(){$(document).off("error.muc.jsxc",error_handler)}),self.conn.muc.listRooms(jsxc.options.get("muc").server,function(stanza){$("#jsxc_roomlist option:last").remove(),$(stanza).find("item").each(function(){var r=$("<option>"),rjid=$(this).attr("jid").toLowerCase(),rnode=Strophe.getNodeFromJid(rjid),rname=$(this).attr("name")||rnode;r.text(rname),r.attr("data-jid",rjid),r.attr("value",rnode),$("#jsxc_roomlist select").append(r)});var set=$(stanza).find('set[xmlns="http://jabber.org/protocol/rsm"]');if(set.length>0){var count=set.find("count").text()||"?";dialog.find(".jsxc_inputinfo").removeClass("jsxc_waiting").text($.t("Could_load_only",{count:count}))}else dialog.find(".jsxc_inputinfo").hide()},function(){jsxc.warn("Could not load rooms"),dialog.find(".jsxc_inputinfo").hide()}),dialog.find("#jsxc_nickname").attr("placeholder",Strophe.getNodeFromJid(self.conn.jid)),dialog.find("#jsxc_bookmark").change(function(){$(this).prop("checked")?($("#jsxc_autojoin").prop("disabled",!1),$("#jsxc_autojoin").parent(".checkbox").removeClass("disabled")):($("#jsxc_autojoin").prop("disabled",!0).prop("checked",!1),$("#jsxc_autojoin").parent(".checkbox").addClass("disabled"))}),dialog.find(".jsxc_continue").click(function(ev){ev.preventDefault();var room=$("#jsxc_room").val()?jsxc.jidToBid($("#jsxc_room").val()):null,nickname=$("#jsxc_nickname").val()||Strophe.getNodeFromJid(self.conn.jid),password=$("#jsxc_password").val()||null;if(!room||!room.match(/^[^"&\'\/:<>@\s]+$/i))return $("#jsxc_room").addClass("jsxc_invalid").keyup(function(){$(this).val()&&$(this).removeClass("jsxc_invalid")}),!1;if(room.match(/@(.*)$/)||(room+="@"+jsxc.options.get("muc").server),jsxc.xmpp.conn.muc.roomNames.indexOf(room)<0){var discoReceived=function(roomName,subject){jsxc.gui.dialog.resize(),dialog.find(".jsxc_continue").hide(),dialog.find(".jsxc_join").show().effect("highlight",{color:"green"},4e3),dialog.find(".jsxc_join").click(function(ev){ev.preventDefault();var bookmark=$("#jsxc_bookmark").prop("checked"),autojoin=$("#jsxc_autojoin").prop("checked");return self.join(room,nickname,password,roomName,subject,bookmark,autojoin),!1})};dialog.find(".jsxc_msg").append($("<p>").text($.t("Loading_room_information")).addClass("jsxc_waiting")),jsxc.gui.dialog.resize(),self.conn.disco.info(room,null,function(stanza){dialog.find(".jsxc_msg").html("<p>"+$.t("This_room_is")+"</p>");var table=$("<table>");$(stanza).find("feature").each(function(){var feature=$(this).attr("var");if(""!==feature&&i18n.exists(feature)){var tr=$("<tr>");$("<td>").text($.t(feature+".keyword")).appendTo(tr),$("<td>").text($.t(feature+".description")).appendTo(tr),tr.appendTo(table)}}),dialog.find(".jsxc_msg").append(table);var roomName=$(stanza).find("identity").attr("name"),subject=$(stanza).find('field[var="muc#roominfo_subject"]').attr("label");discoReceived(roomName,subject)},function(){dialog.find(".jsxc_msg").empty(),$("<p>").text($.t("Room_not_found_")).appendTo(dialog.find(".jsxc_msg")),discoReceived()})}else dialog.find(".jsxc_warning").text($.t("You_already_joined_this_room"));return!1}),dialog.find("input").keydown(function(ev){return 13!==ev.which?(dialog.find(".jsxc_warning").empty(),void(dialog.find(".jsxc_continue").is(":hidden")&&(dialog.find(".jsxc_continue").show(),dialog.find(".jsxc_join").hide().off("click"),dialog.find(".jsxc_msg").empty(),jsxc.gui.dialog.resize()))):void(dialog.find(".jsxc_continue").is(":hidden")?dialog.find(".jsxc_join").click():dialog.find(".jsxc_continue").click())})},showRoomConfiguration:function(room){var self=jsxc.muc;self.conn.muc.configure(room,function(stanza){var form=Strophe.x.Form.fromXML(stanza);window.f=form,self._showRoomConfiguration(room,form)},function(){jsxc.debug("Could not load room configuration")})},_showRoomConfiguration:function(room,config){var self=jsxc.muc,dialog=jsxc.gui.dialog.open(jsxc.muc.helper.formToHTML(config)),form=dialog.find("form"),submit=$("<button>");submit.addClass("btn btn-primary"),submit.attr("type","submit"),submit.text($.t("Join"));var cancel=$("<button>");cancel.addClass("btn btn-default"),cancel.attr("type","button"),cancel.text($.t("Cancel"));var formGroup=$("<div>");formGroup.addClass("form-group"),$("<div>").addClass("col-sm-offset-6 col-sm-6").appendTo(formGroup),formGroup.find(">div").append(cancel),formGroup.find(">div").append(submit),form.append(formGroup),form.submit(function(ev){ev.preventDefault();var config=Strophe.x.Form.fromHTML(form.get(0));return self.conn.muc.saveConfiguration(room,config,function(){jsxc.debug("Room configuration saved.")},function(){jsxc.warn("Could not save room configuration.")}),jsxc.gui.dialog.close(),!1}),cancel.click(function(){self.conn.muc.cancelConfigure(room),jsxc.gui.dialog.close()})},join:function(room,nickname,password,roomName,subject,bookmark,autojoin){var self=jsxc.muc;jsxc.storage.setUserItem("buddy",room,{jid:room,name:roomName||room,sub:"both",type:"groupchat",state:self.CONST.ROOMSTATE.INIT,subject:subject,bookmarked:bookmark||!1,autojoin:autojoin||!1,nickname:nickname}),jsxc.xmpp.conn.muc.join(room,nickname,null,null,null,password),bookmark&&jsxc.xmpp.bookmarks.add(room,roomName,nickname,autojoin)},leave:function(room){var self=jsxc.muc,own=jsxc.storage.getUserItem("ownNicknames")||{},data=jsxc.storage.getUserItem("buddy",room)||{};data.state===self.CONST.ROOMSTATE.ENTERED?self.conn.muc.leave(room,own[room],function(){self.onExited(room)}):self.onExited(room)},onExited:function(room){var self=jsxc.muc,own=jsxc.storage.getUserItem("ownNicknames")||{},roomdata=jsxc.storage.getUserItem("buddy",room)||{};jsxc.storage.setUserItem("roomNames",self.conn.muc.roomNames),delete own[room],jsxc.storage.setUserItem("ownNicknames",own),jsxc.storage.removeUserItem("member",room),jsxc.storage.removeUserItem("chat",room),jsxc.gui.window.close(room),jsxc.storage.updateUserItem("buddy",room,"state",self.CONST.ROOMSTATE.EXITED),roomdata.bookmarked||jsxc.gui.roster.purge(room)},destroy:function(room,handler_cb,error_cb){var self=jsxc.muc,roomdata=jsxc.storage.getUserItem("buddy",room);jsxc.storage.updateUserItem("buddy",room,"state",self.CONST.ROOMSTATE.AWAIT_DESTRUCTION),jsxc.gui.window.postMessage(room,"sys",$.t("This_room_will_be_closed"));var iq=$iq({to:room,type:"set"}).c("query",{xmlns:Strophe.NS.MUC_OWNER}).c("destroy");jsxc.muc.conn.sendIQ(iq.tree(),handler_cb,error_cb),roomdata.bookmarked&&jsxc.xmpp.bookmarks["delete"](room)},close:function(room){var self=jsxc.muc,roomdata=jsxc.storage.getUserItem("buddy",room)||{};self.emptyMembers(room);var roomIndex=self.conn.muc.roomNames.indexOf(room);roomIndex>-1&&(self.conn.muc.roomNames.splice(roomIndex,1),delete self.conn.muc.rooms[room]),jsxc.storage.setUserItem("roomNames",self.conn.muc.roomNames),roomdata.state===self.CONST.ROOMSTATE.AWAIT_DESTRUCTION&&self.onExited(room),roomdata.state=self.CONST.ROOMSTATE.DESTROYED,jsxc.storage.setUserItem("buddy",room,roomdata)},initWindow:function(event,win){var self=jsxc.muc,data=win.data(),bid=jsxc.jidToBid(data.jid),roomdata=jsxc.storage.getUserItem("buddy",bid);if(!jsxc.xmpp.conn)return void $(document).one("connectionReady.jsxc",function(){self.initWindow(null,win)});if("groupchat"===roomdata.type){win.addClass("jsxc_groupchat");var own=jsxc.storage.getUserItem("ownNicknames")||{},ownNickname=own[bid],mlIcon=$('<div class="jsxc_members"></div>');win.find(".jsxc_tools > .jsxc_transfer").after(mlIcon);var ml=$('<div class="jsxc_memberlist"><ul></ul></div>');win.find(".jsxc_fade").prepend(ml),ml.on("wheel",function(ev){jsxc.muc.scrollMemberListBy(bid,ev.originalEvent.wheelDelta>0?50:-50)});var toggleMl=function(ev){ev&&ev.preventDefault();var slimOptions={},ul=ml.find("ul:first"),slimHeight=null;if(ml.toggleClass("jsxc_expand"),ml.hasClass("jsxc_expand")){$("body").click(),$("body").one("click",toggleMl),ul.mouseleave(function(){ul.data("timer",window.setTimeout(toggleMl,2e3))}).mouseenter(function(){window.clearTimeout(ul.data("timer"))}).css("left","0px");var maxHeight=.8*win.find(".jsxc_textarea").height(),innerHeight=ml.find("ul").height()+3;slimHeight=innerHeight>maxHeight?maxHeight:innerHeight,slimOptions={distance:"3px",height:slimHeight+"px",width:"100%",color:"#fff",opacity:"0.5"},ml.css("height",slimHeight+"px")}else slimOptions={destroy:!0},ul.attr("style",""),ml.css("height",""),window.clearTimeout(ul.data("timer")),$("body").off("click",null,toggleMl),ul.off("mouseleave mouseenter");return ul.slimscroll(slimOptions),!1};mlIcon.click(toggleMl),win.on("resize",function(){jsxc.muc.scrollMemberListBy(bid,0)}),setTimeout(function(){var top=win.find(".jsxc_emoticons").position().top+win.find(".slimScrollDiv").position().top;win.find(".jsxc_emoticons").css("top",top+"px")},400);var destroy=$("<li>");if(destroy.text($.t("Destroy")),destroy.addClass("jsxc_destroy"),destroy.hide(),destroy.click(function(){self.destroy(bid)}),win.find(".jsxc_settings ul").append(destroy),roomdata.state>self.CONST.ROOMSTATE.INIT){var member=jsxc.storage.getUserItem("member",bid)||{};$.each(member,function(nickname,val){self.insertMember(bid,nickname,val),nickname===ownNickname&&val.affiliation===self.CONST.AFFILIATION.OWNER&&destroy.show()})}var leave=$("<li>");leave.text($.t("Leave")),leave.addClass("jsxc_leave"),leave.click(function(){self.leave(bid)}),win.find(".jsxc_settings ul").append(leave)}},onPresence:function(event,from,status,presence){var self=jsxc.muc,room=jsxc.jidToBid(from),roomdata=jsxc.storage.getUserItem("buddy",room),xdata=$(presence).find('x[xmlns^="'+Strophe.NS.MUC+'"]');if(self.conn.muc.roomNames.indexOf(room)<0||0===xdata.length)return!0;var res=Strophe.getResourceFromJid(from)||"",nickname=Strophe.unescapeNode(res),own=jsxc.storage.getUserItem("ownNicknames")||{},member=jsxc.storage.getUserItem("member",room)||{},codes=[];if(xdata.find("status").each(function(){var code=$(this).attr("code");jsxc.debug("[muc][code]",code),codes.push(code)}),roomdata.state===self.CONST.ROOMSTATE.INIT){if(jsxc.storage.setUserItem("roomNames",jsxc.xmpp.conn.muc.roomNames),jsxc.storage.removeUserItem("chat",room),member={},0===jsxc.gui.roster.getItem(room).length){var bl=jsxc.storage.getUserItem("buddylist");bl.push(room),jsxc.storage.setUserItem("buddylist",bl),jsxc.gui.roster.add(room)}jsxc.gui.window.open(room),jsxc.gui.dialog.close()}var jid=xdata.find("item").attr("jid")||null;if(0===status)if(xdata.find("destroy").length>0)member={},jsxc.gui.window.postMessage(room,"sys",$.t("This_room_has_been_closed")),self.close(room);else{delete member[nickname],self.removeMember(room,nickname);var newNickname=xdata.find("item").attr("nick");codes.indexOf("303")>-1&&newNickname?(newNickname=Strophe.unescapeNode(newNickname),member[newNickname]={},jsxc.gui.window.postMessage(room,"sys",$.t("is_now_known_as",{oldNickname:nickname,newNickname:newNickname,escapeInterpolation:!0}))):(0===codes.length||1===codes.length&&codes.indexOf("110")>-1)&&jsxc.gui.window.postMessage(room,"sys",$.t("left_the_building",{nickname:nickname,escapeInterpolation:!0}))}else!member[nickname]&&own[room]&&jsxc.gui.window.postMessage(room,"sys",$.t("entered_the_room",{nickname:nickname,escapeInterpolation:!0})),member[nickname]={jid:jid,status:status,roomJid:from,affiliation:xdata.find("item").attr("affiliation"),role:xdata.find("item").attr("role")},self.insertMember(room,nickname,member[nickname]);return jsxc.storage.setUserItem("member",room,member),$.each(codes,function(index,code){"function"==typeof self.onStatus[code]&&self.onStatus[code].call(this,room,nickname,member[nickname]||{},xdata),$(document).trigger("status.muc.jsxc",[code,room,nickname,member[nickname]||{},presence])}),!0},onPresenceError:function(event,from,presence){var self=jsxc.muc,xdata=$(presence).find('x[xmlns="'+Strophe.NS.MUC+'"]'),room=jsxc.jidToBid(from);if(0===xdata.length||self.conn.muc.roomNames.indexOf(room)<0)return!0;var error=$(presence).find("error"),condition=error.children()[0].tagName;return jsxc.debug("[muc][error]",condition),$(document).trigger("error.muc.jsxc",[condition,room]),!0},onStatus:{110:function(room,nickname,data){var self=jsxc.muc,own=jsxc.storage.getUserItem("ownNicknames")||{};own[room]=nickname,jsxc.storage.setUserItem("ownNicknames",own),data.affiliation===self.CONST.AFFILIATION.OWNER&&jsxc.gui.window.get(room).find(".jsxc_destroy").show();var roomdata=jsxc.storage.getUserItem("buddy",room);roomdata.state===self.CONST.ROOMSTATE.INIT&&(roomdata.state=self.CONST.ROOMSTATE.ENTERED,jsxc.storage.setUserItem("buddy",room,roomdata))},170:function(room){jsxc.gui.window.postMessage(room,"sys",$.t("Room_logging_is_enabled"))},171:function(room){jsxc.gui.window.postMessage(room,"sys",$.t("Room_logging_is_disabled"))},172:function(room){jsxc.gui.window.postMessage(room,"sys",$.t("Room_is_now_non-anoymous"))},173:function(room){jsxc.gui.window.postMessage(room,"sys",$.t("Room_is_now_semi-anonymous"))},201:function(room){var self=jsxc.muc;jsxc.gui.showSelectionDialog({header:$.t("Room_creation"),msg:$.t("Do_you_want_to_change_the_default_room_configuration"),primary:{label:$.t("Default"),cb:function(){self.conn.muc.createInstantRoom(room)}},option:{label:$.t("Change"),cb:function(){self.showRoomConfiguration(room)}}})},301:function(room,nickname,data,xdata){var own=jsxc.storage.getUserItem("ownNicknames")||{};own[room]===nickname?(jsxc.muc.close(room),jsxc.gui.window.postMessage(room,"sys",$.t("muc_removed_banned")),jsxc.muc.postReason(room,xdata)):jsxc.gui.window.postMessage(room,"sys",$.t("muc_removed_info_banned",{nickname:nickname,escapeInterpolation:!0}))},307:function(room,nickname,data,xdata){var own=jsxc.storage.getUserItem("ownNicknames")||{};own[room]===nickname?(jsxc.muc.close(room),jsxc.gui.window.postMessage(room,"sys",$.t("muc_removed_kicked")),jsxc.muc.postReason(room,xdata)):jsxc.gui.window.postMessage(room,"sys",$.t("muc_removed_info_kicked",{nickname:nickname,escapeInterpolation:!0}))},321:function(room,nickname){var own=jsxc.storage.getUserItem("ownNicknames")||{};own[room]===nickname?(jsxc.muc.close(room),jsxc.gui.window.postMessage(room,"sys",$.t("muc_removed_affiliation"))):jsxc.gui.window.postMessage(room,"sys",$.t("muc_removed_info_affiliation",{nickname:nickname,escapeInterpolation:!0}))},322:function(room,nickname){var own=jsxc.storage.getUserItem("ownNicknames")||{};own[room]===nickname?(jsxc.muc.close(room),jsxc.gui.window.postMessage(room,"sys",$.t("muc_removed_membersonly"))):jsxc.gui.window.postMessage(room,"sys",$.t("muc_removed_info_membersonly",{nickname:nickname,escapeInterpolation:!0}))},332:function(room){jsxc.muc.close(room),jsxc.gui.window.postMessage(room,"sys",$.t("muc_removed_shutdown"))}},postReason:function(room,xdata){var actor={name:xdata.find("actor").attr("nick"),jid:xdata.find("actor").attr("jid")},reason=xdata.find("reason").text();""!==reason&&(reason=$.t("Reason")+": "+reason,"string"==typeof actor.name||"string"==typeof actor.jid?jsxc.gui.window.postMessage(room,"in",reason,!1,!1,null,actor):jsxc.gui.window.postMessage(room,"sys",reason))},insertMember:function(room,nickname,memberdata){var self=jsxc.muc,win=jsxc.gui.window.get(room),jid=memberdata.jid,m=win.find('.jsxc_memberlist li[data-nickname="'+nickname+'"]');if(0===m.length){var title=jsxc.escapeHTML(nickname);if(m=$('<li><div class="jsxc_avatar"></div><div class="jsxc_name"/></li>'),m.attr("data-nickname",nickname),win.find(".jsxc_memberlist ul").append(m),"string"==typeof jid){m.find(".jsxc_name").text(jsxc.jidToBid(jid)),m.attr("data-bid",jsxc.jidToBid(jid)),title=title+"\n"+jsxc.jidToBid(jid);var data=jsxc.storage.getUserItem("buddy",jsxc.jidToBid(jid));null!==data&&"object"==typeof data?jsxc.gui.updateAvatar(m,jsxc.jidToBid(jid),data.avatar):jsxc.jidToBid(jid)===jsxc.jidToBid(self.conn.jid)&&jsxc.gui.updateAvatar(m,jsxc.jidToBid(jid),"own")}else m.find(".jsxc_name").text(nickname),jsxc.gui.avatarPlaceholder(m.find(".jsxc_avatar"),nickname);m.attr("title",title)}},removeMember:function(room,nickname){var win=jsxc.gui.window.get(room),m=win.find('.jsxc_memberlist li[data-nickname="'+nickname+'"]');m.length>0&&m.remove()},scrollMemberListBy:function(room,offset){var win=jsxc.gui.window.get(room);if(!win.find(".jsxc_memberlist").hasClass("jsxc_expand")){var el=win.find(".jsxc_memberlist ul:first"),scrollWidth=el.width(),width=win.find(".jsxc_memberlist").width(),left=parseInt(el.css("left"));left=isNaN(left)?0-offset:left-offset,width>scrollWidth||left>0?left=0:width-scrollWidth>left&&(left=width-scrollWidth),el.css("left",left+"px")}},emptyMembers:function(room){var win=jsxc.gui.window.get(room);win.find(".jsxc_memberlist").empty(),jsxc.storage.setUserItem("member",room,{})},onGroupchatMessage:function(message){var id=$(message).attr("id");if(jsxc.el_exists($("#"+id)))return!0;var from=$(message).attr("from"),body=$(message).find("body:first").text(),room=jsxc.jidToBid(from),nickname=Strophe.unescapeNode(Strophe.getResourceFromJid(from));if(""!==body){var delay=$(message).find('delay[xmlns="urn:xmpp:delay"]'),stamp=delay.length>0?new Date(delay.attr("stamp")):new Date;stamp=stamp.getTime();var member=jsxc.storage.getUserItem("member",room)||{},sender={};sender.name=nickname,member[nickname]&&"string"==typeof member[nickname].jid&&(sender.jid=member[nickname].jid),jsxc.gui.window.postMessage(room,"in",body,!1,!1,stamp,sender)}var subject=$(message).find("subject");if(subject.length>0){var roomdata=jsxc.storage.getUserItem("buddy",room);roomdata.subject=subject.text(),jsxc.storage.setUserItem("buddy",room,roomdata),jsxc.gui.window.postMessage(room,"sys",$.t("changed_subject_to",{nickname:nickname,subject:subject.text()}))}return!0},onErrorMessage:function(message){var room=jsxc.jidToBid($(message).attr("from"));return 0===jsxc.gui.window.get(room).length?!0:($(message).find("item-not-found").length>0?jsxc.gui.window.postMessage(room,"sys",$.t("message_not_send_item-not-found")):$(message).find("forbidden").length>0?jsxc.gui.window.postMessage(room,"sys",$.t("message_not_send_forbidden")):$(message).find("not-acceptable").length>0?jsxc.gui.window.postMessage(room,"sys",$.t("message_not_send_not-acceptable")):jsxc.gui.window.postMessage(room,"sys",$.t("message_not_send")),jsxc.debug("[muc] error message for "+room,$(message).find("error")[0]),!0)},onAddRoster:function(event,room,data,bud){var self=jsxc.muc;if("groupchat"===data.type){var bo=$("<div>");bo.text("+"),bo.addClass("jsxc_bookmarkOptions"),bo.click(function(ev){return ev.preventDefault(),jsxc.xmpp.bookmarks.showDialog(room),!1}),bud.find(".jsxc_rename").before(bo),data.bookmarked&&bud.addClass("jsxc_bookmarked"),bud.off("click").click(function(){var data=jsxc.storage.getUserItem("buddy",room);data.state===self.CONST.ROOMSTATE.INIT||data.state===self.CONST.ROOMSTATE.EXITED?(self.showJoinChat(),$("#jsxc_room").val(Strophe.getNodeFromJid(data.jid)),$("#jsxc_nickname").val(data.nickname),$("#jsxc_bookmark").prop("checked",data.bookmarked),$("#jsxc_autojoin").prop("checked",data.autojoin),$("#jsxc_dialog .jsxc_bookmark").hide()):jsxc.gui.window.open(room)}),bud.find(".jsxc_delete").click(function(){return data.bookmarked&&jsxc.xmpp.bookmarks["delete"](room),self.leave(room),!1})}},helper:{formToHTML:function(form){if(form instanceof Strophe.x.Form){var html=$("<form>");if(html.attr("data-type",form.type),html.addClass("form-horizontal"),form.title&&html.append("<h3>"+form.title+"</h3>"),form.instructions&&html.append("<p>"+form.instructions+"</p>"),form.fields.length>0){var i;for(i=0;i<form.fields.length;i++)html.append(jsxc.muc.helper.fieldToHtml(form.fields[i]))}return $("<div>").append(html).html()}},fieldToHtml:function(field){var self=field||this;field=null;var el,val,opt,i,o,j,k,txt,line,_ref2,id="Strophe.x.Field-"+self.type+"-"+self["var"],html=$("<div>");if(html.addClass("form-group"),self.label){var label=$("<label>");label.attr("for",id),label.addClass("col-sm-6 control-label"),label.text(self.label),label.appendTo(html)}switch(self.type.toLowerCase()){case"list-single":case"list-multi":for(el=$("<select>"),"list-multi"===self.type&&el.attr("multiple","multiple"),i=0;i<self.options.length;i++)if(opt=self.options[i]){for(o=$(opt.toHTML()),j=0;j<self.values;j++)k=self.values[j],k.toString()===opt.value.toString()&&o.attr("selected","selected");o.appendTo(el)}break;case"text-multi":case"jid-multi":el=$("<textarea>"),txt=function(){var i,_results;for(_results=[],i=0;i<self.values.length;i++)line=self.values[i],_results.push(line);return _results}.call(this).join("\n"),txt&&el.text(txt);break;case"text-single":case"boolean":case"text-private":case"hidden":case"fixed":case"jid-single":switch(el=$("<input>"),self.values&&el.attr("value",self.values[0]),self.type.toLowerCase()){case"text-single":el.attr("type","text"),el.attr("placeholder",self.desc),el.addClass("form-control");break;case"boolean":el.attr("type","checkbox"),val=null!=(_ref2=self.values[0])&&"function"==typeof _ref2.toString?_ref2.toString():void 0,!val||"true"!==val&&"1"!==val||el.attr("checked","checked");break;case"text-private":el.attr("type","password"),el.addClass("form-control");break;case"hidden":el.attr("type","hidden");break;case"fixed":el.attr("type","text").attr("readonly","readonly"),el.addClass("form-control");break;case"jid-single":el.attr("type","email"),el.addClass("form-control")}break;default:el=$("<input type='text'>")}el.attr("id",id),el.attr("name",self["var"]),self.required&&el.attr("required",self.required);var inner=el;return el=$("<div>"),el.addClass("col-sm-6"),el.append(inner),html.append(el),html.get(0)}}},$(document).on("init.window.jsxc",jsxc.muc.initWindow),$(document).on("add.roster.jsxc",jsxc.muc.onAddRoster),$(document).one("attached.jsxc",function(){jsxc.muc.init()}),$(document).one("connected.jsxc",function(){jsxc.storage.removeUserItem("roomNames"),jsxc.storage.removeUserItem("ownNicknames")}),jsxc.notice={_num:0,load:function(){$("#jsxc_notice ul li").remove(),$("#jsxc_notice > span").text(""),jsxc.notice._num=0;var saved=jsxc.storage.getUserItem("notices")||[],key=null;for(key in saved)if(saved.hasOwnProperty(key)){var val=saved[key];jsxc.notice.add(val.msg,val.description,val.fnName,val.fnParams,key)}},add:function(msg,description,fnName,fnParams,id){var nid=id||Date.now(),list=$("#jsxc_notice ul"),notice=$("<li/>");if(notice.click(function(){return jsxc.notice.remove(nid),jsxc.exec(fnName,fnParams),!1}),notice.text(msg),notice.attr("title",description||""),notice.attr("data-nid",nid),list.append(notice),$("#jsxc_notice > span").text(++jsxc.notice._num),!id){var saved=jsxc.storage.getUserItem("notices")||{};saved[nid]={msg:msg,description:description,fnName:fnName,fnParams:fnParams},jsxc.storage.setUserItem("notices",saved),jsxc.notification.notify(msg,description||"",null,!0,jsxc.CONST.SOUNDS.NOTICE)}},remove:function(nid){var el=$("#jsxc_notice li[data-nid="+nid+"]");el.remove(),$("#jsxc_notice > span").text(--jsxc.notice._num||"");var s=jsxc.storage.getUserItem("notices");delete s[nid],jsxc.storage.setUserItem("notices",s)},has:function(fnName){var saved=jsxc.storage.getUserItem("notices")||[],has=!1;return $.each(saved,function(index,val){return val.fnName===fnName?(has=!0,!1):void 0}),has}},jsxc.notification={audio:null,init:function(){$(document).on("postmessagein.jsxc",function(event,bid,msg){msg=msg.match(/^\?OTR/)?$.t("Encrypted_message"):msg;var data=jsxc.storage.getUserItem("buddy",bid);jsxc.notification.notify({title:$.t("New_message_from",{name:data.name}),msg:msg,soundFile:jsxc.CONST.SOUNDS.MSG,source:bid})}),$(document).on("callincoming.jingle",function(){jsxc.notification.playSound(jsxc.CONST.SOUNDS.CALL,!0,!0)}),$(document).on("accept.call.jsxc reject.call.jsxc",function(){jsxc.notification.stopSound()})},notify:function(title,msg,d,force,soundFile,loop,source){if(jsxc.options.notification&&jsxc.notification.hasPermission()){var o;if(o=null!==title&&"object"==typeof title?title:{title:title,msg:msg,duration:d,force:force,soundFile:soundFile,loop:loop,source:source},!jsxc.hasFocus()||o.force){var icon=o.icon||jsxc.options.root+"/img/XMPP_logo.png";if("string"==typeof o.source){var data=jsxc.storage.getUserItem("buddy",o.source),src=jsxc.storage.getUserItem("avatar",data.avatar);"string"==typeof src&&"0"!==src&&(icon=src)}jsxc.toNotification=setTimeout(function(){"string"==typeof o.soundFile&&jsxc.notification.playSound(o.soundFile,o.loop,o.force);var popup=new Notification($.t(o.title),{body:$.t(o.msg),icon:icon}),duration=o.duration||jsxc.options.popupDuration;duration>0&&setTimeout(function(){popup.close()},duration)},jsxc.toNotificationDelay)}}},hasSupport:function(){if(window.webkitNotifications){window.Notification=function(title,opt){var popup=window.webkitNotifications.createNotification(null,title,opt.body);return popup.show(),popup.close=function(){popup.cancel()},popup};var permission;switch(window.webkitNotifications.checkPermission()){case 0:permission=jsxc.CONST.NOTIFICATION_GRANTED;break;case 2:permission=jsxc.CONST.NOTIFICATION_DENIED;break;default:permission=jsxc.CONST.NOTIFICATION_DEFAULT}return window.Notification.permission=permission,window.Notification.requestPermission=function(func){window.webkitNotifications.requestPermission(func)},!0}return window.Notification?!0:!1},prepareRequest:function(){jsxc.notice.has("gui.showRequestNotification")||$(document).one("postmessagein.jsxc",function(){setTimeout(function(){jsxc.notice.add($.t("Notifications")+"?",$.t("Should_we_notify_you_"),"gui.showRequestNotification")},1e3)})},requestPermission:function(){window.Notification.requestPermission(function(status){window.Notification.permission!==status&&(window.Notification.permission=status),$(document).trigger(jsxc.notification.hasPermission()?"notificationready.jsxc":"notificationfailure.jsxc")
+})},hasPermission:function(){return window.Notification.permission===jsxc.CONST.NOTIFICATION_GRANTED},playSound:function(soundFile,loop,force){if(jsxc.master&&!jsxc.options.get("muteNotification")&&"dnd"!==jsxc.storage.getUserItem("presence")&&(!jsxc.hasFocus()||force)){jsxc.notification.stopSound();var audio=new Audio(jsxc.options.root+"/sound/"+soundFile);audio.loop=loop||!1,audio.play(),jsxc.notification.audio=audio}},stopSound:function(){var audio=jsxc.notification.audio;"undefined"!=typeof audio&&null!==audio&&(audio.pause(),jsxc.notification.audio=null)},muteSound:function(external){$("#jsxc_menu .jsxc_muteNotification").text($.t("Unmute")),external!==!0&&jsxc.options.set("muteNotification",!0)},unmuteSound:function(external){$("#jsxc_menu .jsxc_muteNotification").text($.t("Mute")),external!==!0&&jsxc.options.set("muteNotification",!1)}},jsxc.options={app_name:"web applications",timeout:3e3,busyTimeout:15e3,otr:{enable:!0,ERROR_START_AKE:!1,debug:!1,SEND_WHITESPACE_TAG:!0,WHITESPACE_START_AKE:!0},xmpp:{url:null,jid:null,domain:null,password:null,overwrite:!1,onlogin:null},priority:{online:0,chat:0,away:0,xa:0,dnd:0},loginForm:{enable:!0,form:null,jid:null,pass:null,preJid:function(jid){return jid},onConnecting:"dialog",onConnected:"submit",onAuthFail:"submit",attachIfFound:!0,startMinimized:!1},logoutElement:null,numberOfMsg:10,defaultLang:"en",autoLang:!0,rosterAppend:"body",notification:!0,popupDuration:6e3,root:"",loginTimeout:6e5,displayRosterMinimized:function(){return!1},hideOffline:!1,muteNotification:!1,defaultAvatar:function(jid){jsxc.gui.avatarPlaceholder($(this).find(".jsxc_avatar"),jid)},loadSettings:null,saveSettinsPermanent:function(){},carbons:{enable:!1},getUsers:null,favicon:{enable:!0,bgColor:"#E59400",textColor:"#fff"},turnCredentialsPath:null,RTCPeerConfig:{ttl:3600,url:null,iceServers:[{urls:"stun:stun.stunprotocol.org"}]}},jsxc.otr={objects:{},dsaFallback:null,receiveMessage:function(d){var bid=d.bid;jsxc.otr.objects[bid].msgstate!==OTR.CONST.MSGSTATE_PLAINTEXT&&jsxc.otr.backup(bid),jsxc.otr.objects[bid].msgstate===OTR.CONST.MSGSTATE_PLAINTEXT||d.encrypted?jsxc.gui.window.postMessage(bid,"in",d.msg,d.encrypted,d.forwarded,d.stamp):jsxc.gui.window.postMessage(bid,"sys",$.t("Received_an_unencrypted_message")+". ["+d.msg+"]",d.encrypted,d.forwarded,d.stamp)},sendMessage:function(jid,msg,uid){0!==jsxc.otr.objects[jsxc.jidToBid(jid)].msgstate&&jsxc.otr.backup(jsxc.jidToBid(jid)),jsxc.xmpp._sendMessage(jid,msg,uid)},create:function(bid){if(!jsxc.otr.objects.hasOwnProperty(bid)&&jsxc.options.otr.priv){var ol=jsxc.storage.getUserItem("otrlist")||[];ol.indexOf(bid)<0&&(ol.push(bid),jsxc.storage.setUserItem("otrlist",ol)),jsxc.otr.objects[bid]=new OTR(jsxc.options.otr),jsxc.options.otr.SEND_WHITESPACE_TAG&&(jsxc.otr.objects[bid].SEND_WHITESPACE_TAG=!0),jsxc.options.otr.WHITESPACE_START_AKE&&(jsxc.otr.objects[bid].WHITESPACE_START_AKE=!0),jsxc.otr.objects[bid].on("status",function(status){var data=jsxc.storage.getUserItem("buddy",bid);if(null!==data){switch(status){case OTR.CONST.STATUS_SEND_QUERY:jsxc.gui.window.postMessage(bid,"sys",$.t("trying_to_start_private_conversation"));break;case OTR.CONST.STATUS_AKE_SUCCESS:data.fingerprint=jsxc.otr.objects[bid].their_priv_pk.fingerprint(),data.msgstate=OTR.CONST.MSGSTATE_ENCRYPTED;var msg_state=jsxc.otr.objects[bid].trust?"Verified":"Unverified",msg=$.t(msg_state+"_private_conversation_started");jsxc.gui.window.postMessage(bid,"sys",msg);break;case OTR.CONST.STATUS_END_OTR:data.fingerprint=null,jsxc.otr.objects[bid].msgstate===OTR.CONST.MSGSTATE_PLAINTEXT?(data.msgstate=OTR.CONST.MSGSTATE_PLAINTEXT,jsxc.gui.window.postMessage(bid,"sys",$.t("private_conversation_aborted"))):(data.msgstate=OTR.CONST.MSGSTATE_FINISHED,jsxc.gui.window.postMessage(bid,"sys",$.t("your_buddy_closed_the_private_conversation_you_should_do_the_same")));break;case OTR.CONST.STATUS_SMP_HANDLE:jsxc.keepBusyAlive()}jsxc.storage.setUserItem("buddy",bid,data),jsxc.gui.update(bid)}}),jsxc.otr.objects[bid].on("smp",function(type,data){switch(type){case"question":if(jsxc.gui.window.postMessage(bid,"sys",$.t("Authentication_request_received")),$("#jsxc_dialog").length>0){jsxc.otr.objects[bid].sm.abort();break}jsxc.otr.onSmpQuestion(bid,data),jsxc.storage.setUserItem("smp_"+bid,{data:data||null});break;case"trust":jsxc.otr.objects[bid].trust=data,jsxc.storage.updateUserItem("buddy",bid,"trust",data),jsxc.otr.backup(bid),jsxc.gui.update(bid),data?jsxc.gui.window.postMessage(bid,"sys",$.t("conversation_is_now_verified")):jsxc.gui.window.postMessage(bid,"sys",$.t("authentication_failed")),jsxc.storage.removeUserItem("smp_"+bid),jsxc.gui.dialog.close();break;case"abort":jsxc.gui.window.postMessage(bid,"sys",$.t("Authentication_aborted"));break;default:jsxc.debug("[OTR] sm callback: Unknown type: "+type)}}),jsxc.otr.objects[bid].on("ui",function(msg,encrypted,meta){jsxc.otr.receiveMessage({bid:bid,msg:msg,encrypted:encrypted===!0,stamp:meta.stamp,forwarded:meta.forwarded})}),jsxc.otr.objects[bid].on("io",function(msg,uid){var jid=jsxc.gui.window.get(bid).data("jid")||jsxc.otr.objects[bid].jid;jsxc.otr.objects[bid].jid=jid,jsxc.otr.sendMessage(jid,msg,uid)}),jsxc.otr.objects[bid].on("error",function(err){"Received an unencrypted message."!==err&&jsxc.gui.window.postMessage(bid,"sys","[OTR] "+$.t(err)),jsxc.error("[OTR] "+err)}),jsxc.otr.restore(bid)}},onSmpQuestion:function(bid,data){jsxc.gui.showVerification(bid),$("#jsxc_dialog select").prop("selectedIndex",data?2:3).change(),$("#jsxc_dialog > div:eq(0)").hide(),data?($("#jsxc_dialog > div:eq(2)").find("#jsxc_quest").val(data).prop("disabled",!0),$("#jsxc_dialog > div:eq(2)").find(".jsxc_submit").text($("Answer")),$("#jsxc_dialog > div:eq(2)").find(".jsxc_explanation").text($.t("onsmp_explanation_question"))):$("#jsxc_dialog > div:eq(3)").find(".jsxc_explanation").text($.t("onsmp_explanation_secret")),$("#jsxc_dialog .jsxc_close").click(function(){jsxc.storage.removeUserItem("smp_"+bid),jsxc.master&&jsxc.otr.objects[bid].sm.abort()})},sendSmpReq:function(bid,sec,quest){jsxc.keepBusyAlive(),jsxc.otr.objects[bid].smpSecret(sec,quest||"")},toggleTransfer:function(bid){"function"==typeof OTR&&(0===jsxc.storage.getUserItem("buddy",bid).msgstate?jsxc.otr.goEncrypt(bid):jsxc.otr.goPlain(bid))},goEncrypt:function(bid){jsxc.master?jsxc.otr.objects.hasOwnProperty(bid)&&jsxc.otr.objects[bid].sendQueryMsg():jsxc.storage.updateUserItem("buddy",bid,"transferReq",1)},goPlain:function(bid,cb){jsxc.master?jsxc.otr.objects.hasOwnProperty(bid)&&(jsxc.otr.objects[bid].endOtr.call(jsxc.otr.objects[bid],cb),jsxc.otr.objects[bid].init.call(jsxc.otr.objects[bid]),jsxc.otr.backup(bid)):jsxc.storage.updateUserItem("buddy",bid,"transferReq",0)},backup:function(bid){var o=jsxc.otr.objects[bid],r={};if(null!==o){var i,savekey=["jid","our_instance_tag","msgstate","authstate","fragment","their_y","their_old_y","their_keyid","their_instance_tag","our_dh","our_old_dh","our_keyid","sessKeys","storedMgs","oldMacKeys","trust","transmittedRS","ssid","receivedPlaintext","authstate","send_interval"];for(i=0;i<savekey.length;i++)r[savekey[i]]=JSON.stringify(o[savekey[i]]);null!==o.their_priv_pk&&(r.their_priv_pk=JSON.stringify(o.their_priv_pk.packPublic())),o.ake.otr_version&&""!==o.ake.otr_version&&(r.otr_version=JSON.stringify(o.ake.otr_version)),jsxc.storage.setUserItem("otr",bid,r)}},restore:function(bid){var o=jsxc.otr.objects[bid],d=jsxc.storage.getUserItem("otr",bid);if(null!==o||null!==d){var key;for(key in d)if(d.hasOwnProperty(key)){var val=JSON.parse(d[key]);"their_priv_pk"===key&&null!==val&&(val=DSA.parsePublic(val)),"otr_version"===key&&null!==val?o.ake.otr_version=val:o[key]=val}jsxc.otr.objects[bid]=o,1===o.msgstate&&null!==o.their_priv_pk&&o._smInit.call(jsxc.otr.objects[bid])}jsxc.otr.enable(bid)},createDSA:function(){if(!jsxc.options.otr.priv){if("function"!=typeof OTR)return jsxc.warn("OTR support disabled"),OTR={},OTR.CONST={MSGSTATE_PLAINTEXT:0,MSGSTATE_ENCRYPTED:1,MSGSTATE_FINISHED:2},void jsxc._onMaster();if(null===jsxc.storage.getUserItem("key")){var msg=$.t("Creating_your_private_key_"),worker=null;if(Worker)try{worker=new Worker(jsxc.options.root+"/lib/otr/lib/dsa-webworker.js")}catch(err){jsxc.warn("Couldn't create web-worker.",err)}jsxc.otr.dsaFallback=null===worker,jsxc.otr.dsaFallback?(jsxc.gui.dialog.open(jsxc.gui.template.get("waitAlert",null,msg),{noClose:!0}),jsxc.debug("DSA key creation started."),setTimeout(function(){var dsa=new DSA;jsxc.otr.DSAready(dsa)},500)):(jsxc._onMaster(),worker.onmessage=function(e){var type=e.data.type,val=e.data.val;"debug"===type?jsxc.debug(val):"data"===type&&jsxc.otr.DSAready(DSA.parsePrivate(val))},worker.postMessage({imports:[jsxc.options.root+"/lib/otr/vendor/salsa20.js",jsxc.options.root+"/lib/otr/vendor/bigint.js",jsxc.options.root+"/lib/otr/vendor/crypto.js",jsxc.options.root+"/lib/otr/vendor/eventemitter.js",jsxc.options.root+"/lib/otr/lib/const.js",jsxc.options.root+"/lib/otr/lib/helpers.js",jsxc.options.root+"/lib/otr/lib/dsa.js"],seed:BigInt.getSeed(),debug:!0}))}else jsxc.debug("DSA key loaded"),jsxc.options.otr.priv=DSA.parsePrivate(jsxc.storage.getUserItem("key")),jsxc.otr._createDSA()}},_createDSA:function(){jsxc.storage.setUserItem("priv_fingerprint",jsxc.options.otr.priv.fingerprint()),jsxc.otr.dsaFallback!==!1&&jsxc._onMaster()},DSAready:function(dsa){jsxc.storage.setUserItem("key",dsa.packPrivate()),jsxc.options.otr.priv=dsa,jsxc.otr.dsaFallback?jsxc.gui.dialog.close():$.each(jsxc.storage.getUserItem("windowlist"),function(index,val){jsxc.otr.create(val)}),jsxc.otr._createDSA()},enable:function(bid){jsxc.gui.window.get(bid).find(".jsxc_otr").removeClass("jsxc_disabled")}},jsxc.storage={PREFIX:"jsxc",SEP:":",getPrefix:function(uk){var self=jsxc.storage;return self.PREFIX+self.SEP+(uk&&jsxc.bid?jsxc.bid+self.SEP:"")},setItem:function(key,value,uk){jsxc.storageNotConform>0&&"rid"!==key&&"lastActivity"!==key&&(jsxc.storageNotConform>1&&null===jsxc.toSNC&&(jsxc.toSNC=window.setTimeout(function(){jsxc.storageNotConform=0,jsxc.storage.setItem("storageNotConform",0)},1e3)),jsxc.ls.push(JSON.stringify({key:key,value:value}))),"object"==typeof value&&(value=JSON.stringify(value)),localStorage.setItem(jsxc.storage.getPrefix(uk)+key,value)},setUserItem:function(type,key,value){var self=jsxc.storage;return 2===arguments.length?(value=key,key=type,type=""):3===arguments.length&&(key=type+self.SEP+key),jsxc.storage.setItem(key,value,!0)},getItem:function(key,uk){key=jsxc.storage.getPrefix(uk)+key;var value=localStorage.getItem(key);try{return JSON.parse(value)}catch(e){return value}},getUserItem:function(type,key){var self=jsxc.storage;return 1===arguments.length?key=type:2===arguments.length&&(key=type+self.SEP+key),jsxc.storage.getItem(key,!0)},removeItem:function(key,uk){jsxc.storageNotConform&&"rid"!==key&&"lastActivity"!==key&&jsxc.ls.push(JSON.stringify({key:jsxc.storage.prefix+key,value:""})),localStorage.removeItem(jsxc.storage.getPrefix(uk)+key)},removeUserItem:function(type,key){var self=jsxc.storage;1===arguments.length?key=type:2===arguments.length&&(key=type+self.SEP+key),jsxc.storage.removeItem(key,!0)},updateItem:function(key,variable,value,uk){var data=jsxc.storage.getItem(key,uk)||{};"object"==typeof variable?$.each(variable,function(key,val){"undefined"==typeof data[key]&&jsxc.debug("Variable "+key+" doesn't exist in "+variable+". It was created."),data[key]=val}):("undefined"==typeof data[variable]&&jsxc.debug("Variable "+variable+" doesn't exist. It was created."),data[variable]=value),jsxc.storage.setItem(key,data,uk)},updateUserItem:function(type,key,variable,value){var self=jsxc.storage;return 4===arguments.length||3===arguments.length&&"object"==typeof variable?key=type+self.SEP+key:(value=variable,variable=key,key=type),jsxc.storage.updateItem(key,variable,value,!0)},ink:function(key,uk){jsxc.storage.setItem(key,Number(jsxc.storage.getItem(key,uk))+1,uk)},removeElement:function(key,name,uk){var item=jsxc.storage.getItem(key,uk);$.isArray(item)?item=$.grep(item,function(e){return e!==name}):"object"==typeof item&&null!==item&&delete item[name],jsxc.storage.setItem(key,item,uk)},removeUserElement:function(type,key,name){var self=jsxc.storage;return 2===arguments.length?(name=key,key=type):3===arguments.length&&(key=type+self.SEP+key),jsxc.storage.removeElement(key,name,!0)},onStorage:function(e){if(e.key!==jsxc.storage.PREFIX+jsxc.storage.SEP+"rid"&&e.key!==jsxc.storage.PREFIX+jsxc.storage.SEP+"lastActivity"){var re=new RegExp("^"+jsxc.storage.PREFIX+jsxc.storage.SEP+"(?:[^"+jsxc.storage.SEP+"]+@[^"+jsxc.storage.SEP+"]+"+jsxc.storage.SEP+")?(.*)","i"),key=e.key.replace(re,"$1");if(jsxc.storageNotConform>0&&jsxc.ls.length>0){var val=e.newValue;try{val=JSON.parse(val)}catch(err){}var index=$.inArray(JSON.stringify({key:key,value:val}),jsxc.ls);if(index>=0)return jsxc.storageNotConform>1&&(window.clearTimeout(jsxc.toSNC),jsxc.storageNotConform=1,jsxc.storage.setItem("storageNotConform",1)),void jsxc.ls.splice(index,1)}if(e.oldValue!==e.newValue){var n,o,bid=key.replace(new RegExp("[^"+jsxc.storage.SEP+"]+"+jsxc.storage.SEP+"(.*)","i"),"$1");if(jsxc.master&&"alive"===key)return jsxc.debug("Master request."),void jsxc.storage.ink("alive");if(!(jsxc.master||"alive"!==key&&"alive_busy"!==key||jsxc.triggeredFromElement))return window.clearTimeout(jsxc.to),jsxc.to=window.setTimeout(jsxc.checkMaster,("alive"===key?jsxc.options.timeout:jsxc.options.busyTimeout)+jsxc.random(60)),void(jsxc.role_allocation||jsxc.onSlave());if(key.match(/^notices/)&&jsxc.notice.load(),key.match(/^presence/)&&jsxc.gui.changePresence(e.newValue,!0),key.match(/^options/)&&e.newValue&&(n=JSON.parse(e.newValue),"undefined"!=typeof n.muteNotification&&n.muteNotification?jsxc.notification.muteSound(!0):jsxc.notification.unmuteSound(!0)),key.match(/^hidden/)&&(jsxc.master?clearTimeout(jsxc.toNotification):jsxc.isHidden()),key.match(/^focus/)&&(jsxc.master?clearTimeout(jsxc.toNotification):jsxc.hasFocus()),key.match(new RegExp("^chat"+jsxc.storage.SEP)))for(var data,el,posts=JSON.parse(e.newValue);posts.length>0;)data=posts.pop(),el=$("#"+data.uid),0===el.length?(jsxc.master&&"out"===data.direction&&jsxc.xmpp.sendMessage(bid,data.msg,data.uid),jsxc.gui.window._postMessage(bid,data)):data.received&&el.addClass("jsxc_received");else{if(key.match(new RegExp("^window"+jsxc.storage.SEP)))return e.newValue?e.oldValue?(n=JSON.parse(e.newValue),o=JSON.parse(e.oldValue),n.minimize!==o.minimize&&(n.minimize?jsxc.gui.window._hide(bid):jsxc.gui.window._show(bid)),jsxc.gui.window.setText(bid,n.text),void(n.unread!==o.unread&&(0===n.unread?jsxc.gui.readMsg(bid):jsxc.gui._unreadMsg(bid,n.unread)))):void jsxc.gui.window.open(bid):void jsxc.gui.window._close(bid);if(key.match(/^unreadMsg/)&&jsxc.gui.favicon&&jsxc.gui.favicon.badge(parseInt(e.newValue)||0),key.match(new RegExp("^smp"+jsxc.storage.SEP))){if(!e.newValue)return jsxc.gui.dialog.close(),void(jsxc.master&&jsxc.otr.objects[bid].sm.abort());n=JSON.parse(e.newValue),"undefined"!=typeof n.data?jsxc.otr.onSmpQuestion(bid,n.data):jsxc.master&&n.sec&&(jsxc.gui.dialog.close(),jsxc.otr.sendSmpReq(bid,n.sec,n.quest))}if(!jsxc.master&&key.match(new RegExp("^buddy"+jsxc.storage.SEP))){if(!e.newValue)return void jsxc.gui.roster.purge(bid);if(!e.oldValue)return void jsxc.gui.roster.add(bid);n=JSON.parse(e.newValue),o=JSON.parse(e.oldValue),jsxc.gui.update(bid),(o.status!==n.status||o.sub!==n.sub)&&jsxc.gui.roster.reorder(bid)}if(jsxc.master&&key.match(new RegExp("^deletebuddy"+jsxc.storage.SEP))&&e.newValue&&(n=JSON.parse(e.newValue),jsxc.xmpp.removeBuddy(n.jid),jsxc.storage.removeUserItem(key)),jsxc.master&&key.match(new RegExp("^buddy"+jsxc.storage.SEP))&&(n=JSON.parse(e.newValue),o=JSON.parse(e.oldValue),o.transferReq!==n.transferReq&&(jsxc.storage.updateUserItem("buddy",bid,"transferReq",-1),0===n.transferReq&&jsxc.otr.goPlain(bid),1===n.transferReq&&jsxc.otr.goEncrypt(bid)),o.name!==n.name&&jsxc.gui.roster._rename(bid,n.name)),"sid"===key)return void(e.newValue||jsxc.xmpp.logout());"friendReq"===key&&(n=JSON.parse(e.newValue),jsxc.master&&n.approve>=0&&jsxc.xmpp.resFriendReq(n.jid,n.approve)),jsxc.master&&key.match(new RegExp("^add"+jsxc.storage.SEP))&&(n=JSON.parse(e.newValue),jsxc.xmpp.addBuddy(n.username,n.alias)),"roster"===key&&jsxc.gui.roster.toggle(),jsxc.master&&key.match(new RegExp("^vcard"+jsxc.storage.SEP))&&null!==e.newValue&&e.newValue.match(/^request:/)&&jsxc.xmpp.loadVcard(bid,function(stanza){jsxc.storage.setUserItem("vcard",bid,{state:"success",data:$("<div>").append(stanza).html()})},function(){jsxc.storage.setUserItem("vcard",bid,{state:"error"})}),jsxc.master||!key.match(new RegExp("^vcard"+jsxc.storage.SEP))||null===e.newValue||e.newValue.match(/^request:/)||(n=JSON.parse(e.newValue),"undefined"!=typeof n.state&&$(document).trigger("loaded.vcard.jsxc",n),jsxc.storage.removeUserItem("vcard",bid))}}}},saveMessage:function(bid,direction,msg,encrypted,forwarded,stamp,sender){var chat=jsxc.storage.getUserItem("chat",bid)||[],uid=(new Date).getTime()+":msg";chat.length>jsxc.options.get("numberOfMsg")&&chat.pop();var post={direction:direction,msg:msg,uid:uid.replace(/:/,"-"),received:!1,encrypted:encrypted||!1,forwarded:forwarded||!1,stamp:stamp||(new Date).getTime(),sender:sender};return chat.unshift(post),jsxc.storage.setUserItem("chat",bid,chat),post},saveBuddy:function(bid,data){return jsxc.storage.getUserItem("buddy",bid)?(jsxc.storage.updateUserItem("buddy",bid,data),"updated"):(jsxc.storage.setUserItem("buddy",bid,$.extend({jid:"",name:"",status:0,sub:"none",msgstate:0,transferReq:-1,trust:!1,fingerprint:null,res:[],type:"chat"},data)),"created")}},jsxc.webrtc={conn:null,localStream:null,remoteStream:null,last_caller:null,AUTO_ACCEPT:!1,reqVideoFeatures:["urn:xmpp:jingle:apps:rtp:video","urn:xmpp:jingle:apps:rtp:audio","urn:xmpp:jingle:transports:ice-udp:1","urn:xmpp:jingle:apps:dtls:0"],chatJids:{},init:function(){var self=jsxc.webrtc;if(self.conn=jsxc.xmpp.conn,!self.conn.jingle)return void jsxc.error("No jingle plugin found!");var manager=self.conn.jingle.manager;$(document).on("message.jsxc",self.onMessage),$(document).on("presence.jsxc",self.onPresence),$(document).on("mediaready.jingle",self.onMediaReady),$(document).on("mediafailure.jingle",self.onMediaFailure),manager.on("incoming",$.proxy(self.onCallIncoming,self)),manager.on("terminated",$.proxy(self.onCallTerminated,self)),manager.on("ringing",$.proxy(self.onCallRinging,self)),manager.on("peerStreamAdded",$.proxy(self.onRemoteStreamAdded,self)),manager.on("peerStreamRemoved",$.proxy(self.onRemoteStreamRemoved,self)),manager.on("log:*",function(level,msg){jsxc.debug("[JINGLE]["+level+"]",msg)}),self.conn.caps&&$(document).on("caps.strophe",self.onCaps);var url=jsxc.options.get("RTCPeerConfig").url||jsxc.options.turnCredentialsPath,peerConfig=jsxc.options.get("RTCPeerConfig");"string"==typeof url&&url.length>0?self.getTurnCrendentials(url):(jsxc.storage.getUserItem("iceValidity")&&(jsxc.storage.removeUserItem("iceValidity"),peerConfig.iceServers=jsxc.options.RTCPeerConfig.iceServers,jsxc.options.set("RTCPeerConfig",peerConfig)),self.conn.jingle.setICEServers(peerConfig.iceServers))},onDisconnected:function(){var self=jsxc.webrtc;$(document).off("message.jsxc",self.onMessage),$(document).off("presence.jsxc",self.onPresence),$(document).off("mediaready.jingle",self.onMediaReady),$(document).off("mediafailure.jingle",self.onMediaFailure),$(document).off("caps.strophe",self.onCaps)},getTurnCrendentials:function(url){var self=jsxc.webrtc;url=url||jsxc.options.get("RTCPeerConfig").url||jsxc.options.turnCredentialsPath;var ttl=(jsxc.storage.getUserItem("iceValidity")||0)-(new Date).getTime();return jsxc.storage.getUserItem("iceConfig")&&(jsxc.storage.removeUserItem("iceConfig"),ttl=-1),ttl>0?(self.conn.jingle.setICEServers(jsxc.options.get("RTCPeerConfig").iceServers),void window.setTimeout(jsxc.webrtc.getTurnCrendentials,ttl+500)):void $.ajax(url,{async:!0,success:function(data){var ttl=data.ttl||3600,iceServers=data.iceServers;if(!iceServers&&data.url&&(jsxc.warn("Received RTCPeer configuration is deprecated. Use now RTCPeerConfig.url."),iceServers=[{urls:data.url}],data.username&&(iceServers[0].username=data.username),data.credential&&(iceServers[0].credential=data.credential)),iceServers&&iceServers.length>0){var url=iceServers[0].url&&iceServers[0].url.length>0,urls=iceServers[0].urls&&iceServers[0].urls.length>0;if(urls||url){jsxc.debug("ice servers received");var peerConfig=jsxc.options.get("RTCPeerConfig");peerConfig.iceServers=iceServers,jsxc.options.set("RTCPeerConfig",peerConfig),self.conn.jingle.setICEServers(iceServers),jsxc.storage.setUserItem("iceValidity",(new Date).getTime()+1e3*ttl)}else jsxc.warn("No valid url found in first ice object.")}},dataType:"json"})},getCapableRes:function(jid){var self=jsxc.webrtc,bid=jsxc.jidToBid(jid),res=jsxc.storage.getUserItem("res",bid)||[],available=[];return $.each(res,function(r){self.conn.caps.hasFeatureByJid(bid+"/"+r,self.reqVideoFeatures)&&available.push(r)}),available},onAddRosterItem:function(event,bid,data,el){var self=jsxc.webrtc;if(!self.conn)return void $(document).one("connectionReady.jsxc",function(){self.onAddRosterItem(null,bid,data,el)});var videoIcon=$('<div class="jsxc_video jsxc_disabled" title="'+$.t("Start_video_call")+'"></div>');videoIcon.click(function(){return self.startCall(data.jid),!1}),el.find(".jsxc_options.jsxc_left").append(videoIcon),el.on("extra.jsxc",function(){self.updateIcon(bid)})},initWindow:function(event,win){var self=jsxc.webrtc;if(!win.hasClass("jsxc_groupchat")){if(jsxc.debug("webrtc.initWindow"),!self.conn)return void $(document).one("connectionReady.jsxc",function(){self.initWindow(null,win)});var div=$("<div>").addClass("jsxc_video");win.find(".jsxc_transfer:eq(1)").after(div),self.updateIcon(jsxc.jidToBid(win.data("jid")))}},updateIcon:function(bid){jsxc.debug("Update icon",bid);var self=jsxc.webrtc;if(bid!==jsxc.jidToBid(self.conn.jid)){var win=jsxc.gui.window.get(bid),jid=win.data("jid"),ls=jsxc.storage.getUserItem("buddy",bid);if("string"!=typeof jid){if(!ls||"string"!=typeof ls.jid)return void jsxc.debug("[webrtc] Could not update icon, because could not find jid for "+bid);jid=ls.jid}var el=win.find(".jsxc_video").add(jsxc.gui.roster.getItem(bid).find(".jsxc_video")),capableRes=self.getCapableRes(jid),targetRes=Strophe.getResourceFromJid(jid);null===targetRes&&($.each(jsxc.storage.getUserItem("buddy",bid).res||[],function(index,val){return capableRes.indexOf(val)>-1?(targetRes=val,!1):void 0}),jid=jid+"/"+targetRes),el.off("click"),capableRes.indexOf(targetRes)>-1?(el.click(function(){self.startCall(jid)}),el.removeClass("jsxc_disabled"),el.attr("title",$.t("Start_video_call"))):(el.addClass("jsxc_disabled"),el.attr("title",$.t("Video_call_not_possible")))}},onMessage:function(e,from){var self=jsxc.webrtc,bid=jsxc.jidToBid(from);jsxc.debug("webrtc.onmessage",from),self.chatJids[bid]!==from&&(self.updateIcon(bid),self.chatJids[bid]=from)},onPresence:function(ev,jid,status,presence){var self=jsxc.webrtc;0===$(presence).find('c[xmlns="'+Strophe.NS.CAPS+'"]').length&&(jsxc.debug("webrtc.onpresence",jid),self.updateIcon(jsxc.jidToBid(jid)))},setStatus:function(txt,d){var status=$(".jsxc_webrtc .jsxc_status"),duration="undefined"==typeof d||null===d?4e3:d;if(jsxc.debug("[Webrtc]",txt),status.html()&&(txt=status.html()+"<br />"+txt),status.html(txt),status.css({"margin-left":"-"+status.width()/2+"px",opacity:0,display:"block"}),status.stop().animate({opacity:1}),clearTimeout(status.data("timeout")),0!==duration){var to=setTimeout(function(){status.stop().animate({opacity:0},function(){status.html("")})},duration);status.data("timeout",to)}},onCaps:function(event,jid){var self=jsxc.webrtc;jsxc.gui.roster.loaded?self.updateIcon(jsxc.jidToBid(jid)):$(document).on("cloaded.roster.jsxc",function(){self.updateIcon(jsxc.jidToBid(jid))})},onMediaReady:function(event,stream){jsxc.debug("media ready");var self=jsxc.webrtc;self.localStream=stream,self.conn.jingle.localStream=stream;var i,dialog=jsxc.gui.showVideoWindow(self.last_caller),audioTracks=stream.getAudioTracks(),videoTracks=stream.getVideoTracks();for(i=0;i<audioTracks.length;i++)self.setStatus($.t(audioTracks.length>0?"Use_local_audio_device":"No_local_audio_device")),jsxc.debug('using audio device "'+audioTracks[i].label+'"');for(i=0;i<videoTracks.length;i++)self.setStatus($.t(videoTracks.length>0?"Use_local_video_device":"No_local_video_device")),jsxc.debug('using video device "'+videoTracks[i].label+'"'),dialog.find(".jsxc_localvideo").show();$(document).one("cleanup.dialog.jsxc",$.proxy(self.hangUp,self)),$(document).trigger("finish.mediaready.jsxc")},onMediaFailure:function(ev,err){var self=jsxc.webrtc;self.setStatus("media failure"),jsxc.gui.window.postMessage(jsxc.jidToBid(jsxc.webrtc.last_caller),"sys",$.t("Media_failure")+": "+$.t(err.name)+" ("+err.name+")."),jsxc.debug("media failure: "+err.name)},onCallIncoming:function(session){jsxc.debug("incoming call from "+session.peerID);var self=this,bid=jsxc.jidToBid(session.peerID);if(session.on("change:connectionState",$.proxy(self.onIceConnectionStateChanged,self)),jsxc.gui.window.postMessage(bid,"sys",$.t("Incoming_call")),jsxc.notification.notify($.t("Incoming_call"),$.t("from_sender",{sender:bid})),session.ring(),jsxc.webrtc.last_caller=session.peerID,jsxc.webrtc.AUTO_ACCEPT)return void self.reqUserMedia();var dialog=jsxc.gui.dialog.open(jsxc.gui.template.get("incomingCall",bid),{noClose:!0});dialog.find(".jsxc_accept").click(function(){$(document).trigger("accept.call.jsxc"),jsxc.switchEvents({"mediaready.jingle":function(event,stream){self.setStatus("Accept call"),session.addStream(stream),session.accept()},"mediafailure.jingle":function(){session.decline()}}),self.reqUserMedia()}),dialog.find(".jsxc_reject").click(function(){jsxc.gui.dialog.close(),$(document).trigger("reject.call.jsxc"),session.decline()})},onCallTerminated:function(session,reason){this.setStatus("call terminated "+session.peer+(reason?reason.condition:""));var bid=jsxc.jidToBid(session.peer);this.localStream&&this.localStream.stop(),$(".jsxc_videoContainer").length&&($(".jsxc_remotevideo")[0].src="",$(".jsxc_localvideo")[0].src=""),this.conn.jingle.localStream=null,this.localStream=null,this.remoteStream=null;var win=$("#jsxc_dialog .jsxc_chatarea > ul > li");$("#jsxc_windowList > ul").prepend(win.detach()),win.find(".slimScrollDiv").resizable("enable"),$(document).off("cleanup.dialog.jsxc"),$(document).off("error.jingle"),jsxc.gui.dialog.close(),jsxc.gui.window.postMessage(bid,"sys",$.t("Call_terminated")+(reason?": "+$.t("jingle_reason_"+reason.condition):"")+".")},onCallRinging:function(){this.setStatus("ringing...",0)},onRemoteStreamAdded:function(session,stream){this.setStatus("Remote stream for session "+session.sid+" added."),this.remoteStream=stream;var isVideoDevice=stream.getVideoTracks().length>0,isAudioDevice=stream.getAudioTracks().length>0;this.setStatus(isVideoDevice?"Use remote video device.":"No remote video device"),this.setStatus(isAudioDevice?"Use remote audio device.":"No remote audio device"),$(".jsxc_remotevideo").length&&(this.attachMediaStream($("#jsxc_dialog .jsxc_remotevideo"),stream),$("#jsxc_dialog .jsxc_"+(isVideoDevice?"remotevideo":"noRemoteVideo")).addClass("jsxc_deviceAvailable"))},attachMediaStream:function(element,stream){var self=jsxc.webrtc;self.conn.jingle.RTC.attachMediaStream(element instanceof jQuery?element.get(0):element,stream)},onRemoteStreamRemoved:function(session){this.setStatus("Remote stream for "+session.jid+" removed.")},onIceConnectionStateChanged:function(session,state){var self=jsxc.webrtc;jsxc.debug("connection state for "+session.sid,state),"connected"===state?($("#jsxc_dialog .jsxc_deviceAvailable").show(),$("#jsxc_dialog .bubblingG").hide()):"failed"===state?(jsxc.gui.window.postMessage(jsxc.jidToBid(session.peerID),"sys",$.t("ICE_connection_failure")),$(document).off("cleanup.dialog.jsxc"),session.end("failed-transport"),$(document).trigger("callterminated.jingle")):"interrupted"===state&&self.setStatus($.t("Connection_interrupted"))},startCall:function(jid,um){var self=this;return null===Strophe.getResourceFromJid(jid)?void jsxc.debug("We need a full jid"):(self.last_caller=jid,jsxc.switchEvents({"finish.mediaready.jsxc":function(){self.setStatus("Initiate call"),jsxc.gui.window.postMessage(jsxc.jidToBid(jid),"sys",$.t("Call_started")),$(document).one("error.jingle",function(e,sid,error){"offer"===error.source&&($(document).off("cleanup.dialog.jsxc"),setTimeout(function(){jsxc.gui.showAlert("Sorry, we couldn't establish a connection. Maybe your buddy is offline.")},500))});var session=self.conn.jingle.initiate(jid);session.on("change:connectionState",$.proxy(self.onIceConnectionStateChanged,self))},"mediafailure.jingle":function(){jsxc.gui.dialog.close()}}),void self.reqUserMedia(um))},hangUp:function(reason,text){$(document).off("cleanup.dialog.jsxc"),jsxc.webrtc.conn.jingle.terminate(null,reason,text),$(document).trigger("callterminated.jingle")},reqUserMedia:function(um){return this.localStream?void $(document).trigger("mediaready.jingle",[this.localStream]):(um=um||["video","audio"],jsxc.gui.dialog.open(jsxc.gui.template.get("allowMediaAccess"),{noClose:!0}),this.setStatus("please allow access to microphone and camera"),void("undefined"!=typeof MediaStreamTrack&&"undefined"!=typeof MediaStreamTrack.getSources?MediaStreamTrack.getSources(function(sourceInfo){var availableDevices=sourceInfo.map(function(el){return el.kind});um=um.filter(function(el){return-1!==availableDevices.indexOf(el)}),jsxc.webrtc.getUserMedia(um)}):jsxc.webrtc.getUserMedia(um)))},getUserMedia:function(um){var self=jsxc.webrtc,constraints={};um.indexOf("video")>-1&&(constraints.video=!0),um.indexOf("audio")>-1&&(constraints.audio=!0);try{self.conn.jingle.RTC.getUserMedia(constraints,function(stream){jsxc.debug("onUserMediaSuccess"),$(document).trigger("mediaready.jingle",[stream])},function(error){jsxc.warn("Failed to get access to local media. Error ",error),$(document).trigger("mediafailure.jingle",[error])})}catch(e){jsxc.error("GUM failed: ",e),$(document).trigger("mediafailure.jingle")}},snapshot:function(video){video||jsxc.debug("Missing video element"),$(".jsxc_snapshotbar p").remove();var canvas=$("<canvas/>").css("display","none").appendTo("body").attr({width:video.width(),height:video.height()}).get(0),ctx=canvas.getContext("2d");ctx.drawImage(video[0],0,0);var img=$("<img/>"),url=null;try{url=canvas.toDataURL("image/jpeg")}catch(err){return void jsxc.warn("Error",err)}img[0].src=url;var link=$("<a/>").attr({target:"_blank",href:url});link.append(img),$(".jsxc_snapshotbar").append(link),canvas.remove()}},jsxc.gui.showVideoWindow=function(jid){var self=jsxc.webrtc;return $(document).one("complete.dialog.jsxc",function(){$("#jsxc_dialog .jsxc_localvideo")[0].muted=!0,$("#jsxc_dialog .jsxc_localvideo")[0].volume=0;var rv=$("#jsxc_dialog .jsxc_remotevideo"),lv=$("#jsxc_dialog .jsxc_localvideo");lv.draggable({containment:"parent"}),self.attachMediaStream(lv,self.localStream);var w_dialog=$("#jsxc_dialog").width(),w_remote=rv.width();if(w_remote>w_dialog){var scale=w_dialog/w_remote,new_h=rv.height()*scale,new_w=w_dialog,vc=$("#jsxc_dialog .jsxc_videoContainer");rv.height(new_h),rv.width(new_w),vc.height(new_h),vc.width(new_w),lv.height(lv.height()*scale),lv.width(lv.width()*scale)}self.remoteStream&&(self.attachMediaStream(rv,self.remoteStream),$("#jsxc_dialog .jsxc_"+(self.remoteStream.getVideoTracks().length>0?"remotevideo":"noRemoteVideo")).addClass("jsxc_deviceAvailable"));var toggleMulti=function(elem,open){$("#jsxc_dialog .jsxc_multi > div").not(elem).slideUp();var opt={complete:jsxc.gui.dialog.resize};open?elem.slideDown(opt):elem.slideToggle(opt)},win=jsxc.gui.window.open(jsxc.jidToBid(jid));win.find(".slimScrollDiv").resizable("disable"),win.find(".jsxc_textarea").slimScroll({height:413}),win.find(".jsxc_emoticons").css("top","419px"),$("#jsxc_dialog .jsxc_chatarea ul").append(win.detach()),$("#jsxc_dialog .jsxc_hangUp").click(function(){jsxc.webrtc.hangUp("success")
+}),$("#jsxc_dialog .jsxc_snapshot").click(function(){jsxc.webrtc.snapshot(rv),toggleMulti($("#jsxc_dialog .jsxc_snapshotbar"),!0)}),$("#jsxc_dialog .jsxc_snapshots").click(function(){toggleMulti($("#jsxc_dialog .jsxc_snapshotbar"))}),$("#jsxc_dialog .jsxc_showchat").click(function(){var chatarea=$("#jsxc_dialog .jsxc_chatarea");chatarea.is(":hidden")?(chatarea.show(),$("#jsxc_dialog .jsxc_webrtc").width("900"),jsxc.gui.dialog.resize({width:"920px"})):(chatarea.hide(),$("#jsxc_dialog .jsxc_webrtc").width("650"),jsxc.gui.dialog.resize({width:"660px"}))}),$("#jsxc_dialog .jsxc_fullscreen").click(function(){$.support.fullscreen&&($(document).one("disabled.fullscreen",function(){lv.removeAttr("style")}),$("#jsxc_dialog .jsxc_videoContainer").fullscreen())}),$("#jsxc_dialog .jsxc_volume").change(function(){rv[0].volume=$(this).val()}),$("#jsxc_dialog .jsxc_volume").dblclick(function(){$(this).val(.5)})}),jsxc.gui.dialog.close(),jsxc.gui.dialog.open(jsxc.gui.template.get("videoWindow"),{noClose:!0})},$.extend(jsxc.CONST,{KEYCODE_ENTER:13,KEYCODE_ESC:27}),$(document).ready(function(){$(document).on("add.roster.jsxc",jsxc.webrtc.onAddRosterItem),$(document).on("init.window.jsxc",jsxc.webrtc.initWindow),$(document).on("attached.jsxc",jsxc.webrtc.init),$(document).on("disconnected.jsxc",jsxc.webrtc.onDisconnected)}),jsxc.xmpp.bookmarks={},jsxc.xmpp.bookmarks.remote=function(){return jsxc.xmpp.conn.caps&&jsxc.xmpp.conn.caps.hasFeatureByJid(jsxc.xmpp.conn.domain,Strophe.NS.PUBSUB+"#publish")},jsxc.xmpp.bookmarks.load=function(){var caps=jsxc.xmpp.conn.caps,ver=caps._jidVerIndex[jsxc.xmpp.conn.domain];ver&&caps._knownCapabilities[ver]||$(document).on("caps.strophe",function(ev,from){from===jsxc.xmpp.conn.domain&&jsxc.xmpp.bookmarks.load()}),jsxc.xmpp.bookmarks.remote()?jsxc.xmpp.bookmarks.loadFromRemote():jsxc.xmpp.bookmarks.loadFromLocal()},jsxc.xmpp.bookmarks.loadFromLocal=function(){jsxc.debug("Load bookmarks from local storage");var bookmarks=jsxc.storage.getUserItem("bookmarks")||[],bl=jsxc.storage.getUserItem("buddylist")||[];$.each(bookmarks,function(){var room=this,roomdata=jsxc.storage.getUserItem("buddy",room)||{};bl.push(room),jsxc.gui.roster.add(room),roomdata.autojoin&&(jsxc.debug("auto join "+room),jsxc.xmpp.conn.muc.join(room,roomdata.nickname))}),jsxc.storage.setUserItem("buddylist",bl)},jsxc.xmpp.bookmarks.loadFromRemote=function(){jsxc.debug("Load bookmarks from pubsub");var bookmarks=jsxc.xmpp.conn.bookmarks;bookmarks.get(function(stanza){var bl=jsxc.storage.getUserItem("buddylist");$(stanza).find("conference").each(function(){var conference=$(this),room=conference.attr("jid"),roomName=conference.attr("name")||room,autojoin=conference.attr("autojoin")||!1,nickname=conference.find("nick").text();nickname=nickname.length>0?nickname:Strophe.getNodeFromJid(jsxc.xmpp.conn.jid),"true"===autojoin?autojoin=!0:"false"===autojoin&&(autojoin=!1),jsxc.storage.setUserItem("buddy",room,{jid:room,name:roomName,sub:"both",status:0,type:"groupchat",state:jsxc.muc.CONST.ROOMSTATE.INIT,subject:null,bookmarked:!0,autojoin:autojoin,nickname:nickname}),bl.push(room),jsxc.gui.roster.add(room),autojoin&&(jsxc.debug("auto join "+room),jsxc.xmpp.conn.muc.join(room,nickname))}),jsxc.storage.setUserItem("buddylist",bl)},function(stanza){var err=jsxc.xmpp.bookmarks.parseErr(stanza);"item-not-found"===err.reasons[0]?(jsxc.debug("create bookmark node"),bookmarks.createBookmarksNode()):jsxc.debug("[XMPP] Could not create bookmark: "+err.type,err.reasons)})},jsxc.xmpp.bookmarks.parseErr=function(stanza){var error=$(stanza).find("error"),type=error.attr("type"),reasons=error.children().map(function(){return $(this).prop("tagName")});return{type:type,reasons:reasons}},jsxc.xmpp.bookmarks["delete"]=function(room,soft){soft||jsxc.gui.roster.purge(room),jsxc.xmpp.bookmarks.remote()?jsxc.xmpp.bookmarks.deleteFromRemote(room,soft):jsxc.xmpp.bookmarks.deleteFromLocal(room,soft)},jsxc.xmpp.bookmarks.deleteFromRemote=function(room,soft){var bookmarks=jsxc.xmpp.conn.bookmarks;bookmarks["delete"](room,function(){jsxc.debug("Bookmark deleted "+room),soft&&(jsxc.gui.roster.getItem(room).removeClass("jsxc_bookmarked"),jsxc.storage.updateUserItem("buddy",room,"bookmarked",!1),jsxc.storage.updateUserItem("buddy",room,"autojoin",!1))},function(stanza){var err=jsxc.xmpp.bookmarks.parseErr(stanza);jsxc.debug("[XMPP] Could not delete bookmark: "+err.type,err.reasons)})},jsxc.xmpp.bookmarks.deleteFromLocal=function(room,soft){var bookmarks=jsxc.storage.getUserItem("bookmarks"),index=bookmarks.indexOf(room);index>-1&&bookmarks.splice(index,1),jsxc.storage.setUserItem("bookmarks",bookmarks),soft&&(jsxc.gui.roster.getItem(room).removeClass("jsxc_bookmarked"),jsxc.storage.updateUserItem("buddy",room,"bookmarked",!1),jsxc.storage.updateUserItem("buddy",room,"autojoin",!1))},jsxc.xmpp.bookmarks.add=function(room,alias,nick,autojoin){jsxc.xmpp.bookmarks.remote()?jsxc.xmpp.bookmarks.addToRemote(room,alias,nick,autojoin):jsxc.xmpp.bookmarks.addToLocal(room,alias,nick,autojoin)},jsxc.xmpp.bookmarks.addToRemote=function(room,alias,nick,autojoin){var bookmarks=jsxc.xmpp.conn.bookmarks,success=function(){jsxc.debug("New bookmark created",room),jsxc.gui.roster.getItem(room).addClass("jsxc_bookmarked"),jsxc.storage.updateUserItem("buddy",room,"bookmarked",!0),jsxc.storage.updateUserItem("buddy",room,"autojoin",autojoin),jsxc.storage.updateUserItem("buddy",room,"nickname",nick)},error=function(){jsxc.warn("Could not create bookmark",room)};bookmarks.add(room,alias,nick,autojoin,success,error)},jsxc.xmpp.bookmarks.addToLocal=function(room,alias,nick,autojoin){jsxc.gui.roster.getItem(room).addClass("jsxc_bookmarked"),jsxc.storage.updateUserItem("buddy",room,"bookmarked",!0),jsxc.storage.updateUserItem("buddy",room,"autojoin",autojoin),jsxc.storage.updateUserItem("buddy",room,"nickname",nick);var bookmarks=jsxc.storage.getUserItem("bookmarks")||[];bookmarks.indexOf(room)<0&&(bookmarks.push(room),jsxc.storage.setUserItem("bookmarks",bookmarks))},jsxc.xmpp.bookmarks.showDialog=function(room){var dialog=jsxc.gui.dialog.open(jsxc.gui.template.get("bookmarkDialog")),data=jsxc.storage.getUserItem("buddy",room);$("#jsxc_room").val(room),$("#jsxc_nickname").val(data.nickname),$("#jsxc_bookmark").change(function(){$(this).prop("checked")?($("#jsxc_nickname").prop("disabled",!1),$("#jsxc_autojoin").prop("disabled",!1),$("#jsxc_autojoin").parent(".checkbox").removeClass("disabled")):($("#jsxc_nickname").prop("disabled",!0),$("#jsxc_autojoin").prop("disabled",!0).prop("checked",!1),$("#jsxc_autojoin").parent(".checkbox").addClass("disabled"))}),$("#jsxc_bookmark").prop("checked",data.bookmarked),$("#jsxc_autojoin").prop("checked",data.autojoin),$("#jsxc_bookmark").change(),dialog.find("form").submit(function(ev){ev.preventDefault();var bookmarked=$("#jsxc_bookmark").prop("checked"),autojoin=$("#jsxc_autojoin").prop("checked"),nickname=$("#jsxc_nickname").val();return bookmarked?jsxc.xmpp.bookmarks.add(room,data.name,nickname,autojoin):data.bookmarked&&jsxc.xmpp.bookmarks["delete"](room,!0),jsxc.gui.dialog.close(),!1})},jsxc.gui.template.aboutDialog='<h3>JavaScript XMPP Chat</h3>\n<p>\n <b>Version: </b>{{version}}\n <br /> <a href="http://jsxc.org/" target="_blank">www.jsxc.org</a>\n</p>\n<p>\n <i>Released under the MIT license</i>\n</p>\n<p>\n Real-time chat app for {{app_name}} and more.\n <br /> Requires an external <a href="https://xmpp.org/xmpp-software/servers/" target="_blank">XMPP server</a>.\n</p>\n<p>\n <b>Credits: </b> <a href="http://www.beepzoid.com/old-phones/" target="_blank">David English (Ringtone)</a>, <a href="https://soundcloud.com/freefilmandgamemusic/ping-1?in=freefilmandgamemusic/sets/free-notification-sounds-and" target="_blank">CameronMusic (Ping)</a>\n</p>\n<p class="jsxc_libraries">\n <b>Libraries: </b>\n < $ dep.libraries $>\n</p>\n\n<button class="btn btn-default pull-right jsxc_debuglog">Show debug log</button>\n',jsxc.gui.template.alert='<h3 data-i18n="Alert"></h3>\n<div class="alert alert-info">\n <strong data-i18n="Info"></strong> {{msg}}\n</div>\n',jsxc.gui.template.allowMediaAccess='<p data-i18n="Please_allow_access_to_microphone_and_camera"></p>\n',jsxc.gui.template.approveDialog='<h3 data-i18n="Subscription_request"></h3>\n<p>\n <span data-i18n="You_have_a_request_from"></span><b class="jsxc_their_jid"></b>.\n</p>\n\n<button class="btn btn-primary jsxc_approve pull-right" data-i18n="Approve"></button>\n<button class="btn btn-default jsxc_deny pull-right" data-i18n="Deny"></button>\n',jsxc.gui.template.authFailDialog='<h3 data-i18n="Login_failed"></h3>\n<p data-i18n="Sorry_we_cant_authentikate_"></p>\n\n<button class="btn btn-primary jsxc_retry pull-right" data-i18n="Continue_without_chat"></button>\n<button class="btn btn-default jsxc_cancel pull-right" data-i18n="Retry"></button>\n',jsxc.gui.template.authenticationDialog='<h3>Verification</h3>\n<p data-i18n="Authenticating_a_buddy_helps_"></p>\n<div>\n <p data-i18n="[html]How_do_you_want_to_authenticate_your_buddy"></p>\n\n <div class="btn-group" role="group">\n <button class="btn btn-default" data-i18n="Manual"></button>\n <button class="btn btn-default" data-i18n="Question"></button>\n <button class="btn btn-default" data-i18n="Secret"></button>\n </div>\n</div>\n<hr />\n<div style="display: none">\n <p data-i18n="To_verify_the_fingerprint_" class=".jsxc_explanation"></p>\n <p>\n <strong data-i18n="Your_fingerprint"></strong>\n <br /> <span style="text-transform: uppercase">{{my_priv_fingerprint}}</span>\n </p>\n <p>\n <strong data-i18n="Buddy_fingerprint"></strong>\n <br /> <span style="text-transform: uppercase">{{bid_priv_fingerprint}}</span>\n </p>\n <div class="jsxc_right">\n <button class="btn btn-default jsxc_close" data-i18n="Close"></button>\n <button class="btn btn-primary jsxc_submit" data-i18n="Compared"></button>\n </div>\n</div>\n<div style="display: none" class="form-horizontal">\n <p data-i18n="To_authenticate_using_a_question_" class=".jsxc_explanation"></p>\n <div class="form-group">\n <label class="col-sm-4 control-label" for="jsxc_quest" data-i18n="Question"></label>\n <div class="col-sm-8">\n <input type="text" name="quest" id="jsxc_quest" class="form-control" />\n </div>\n </div>\n <div class="form-group">\n <label class="col-sm-4 control-label" for="jsxc_secret2" data-i18n="Secret"></label>\n <div class="col-sm-8">\n <input type="text" name="secret2" id="jsxc_secret2" class="form-control" />\n </div>\n </div>\n <div class="form-group">\n <div class="col-sm-offset-4 col-sm-8">\n <button class="btn btn-default jsxc_close" data-i18n="Close"></button>\n <button class="btn btn-primary jsxc_submit" data-i18n="Ask"></button>\n </div>\n </div>\n</div>\n<div style="display: none" class="form-horizontal">\n <p class=".jsxc_explanation" data-i18n="To_authenticate_pick_a_secret_"></p>\n <div class="form-group">\n <label class="col-sm-4 control-label" for="jsxc_secret" data-i18n="Secret"></label>\n <div class="col-sm-8">\n <input type="text" name="secret" id="jsxc_secret" class="form-control" />\n </div>\n </div>\n <div class="form-group">\n <div class="col-sm-offset-4 col-sm-8">\n <button class="btn btn-default jsxc_close" data-i18n="Close"></button>\n <button class="btn btn-primary jsxc_submit" data-i18n="Compare"></button>\n </div>\n </div>\n</div>\n',jsxc.gui.template.bookmarkDialog='<h3 data-i18n="Edit_bookmark"></h3>\n<form class="form-horizontal">\n <div class="form-group">\n <label class="col-sm-4 control-label" for="jsxc_room" data-i18n="Room"></label>\n <div class="col-sm-8">\n <input type="text" id="jsxc_room" class="form-control" required="required" readonly="readonly" />\n </div>\n </div>\n <div class="form-group">\n <label class="col-sm-4 control-label" for="jsxc_nickname" data-i18n="Nickname"></label>\n <div class="col-sm-8">\n <input type="text" disabled="disabled" required="required" name="nickname" id="jsxc_nickname" class="form-control" />\n </div>\n </div>\n <div class="form-group">\n <div class="col-sm-offset-4 col-sm-8">\n <div class="checkbox">\n <label>\n <input id="jsxc_bookmark" type="checkbox"><span data-i18n="Bookmark"></span>\n </label>\n </div>\n </div>\n </div>\n <div class="form-group">\n <div class="col-sm-offset-4 col-sm-8">\n <div class="checkbox disabled">\n <label>\n <input disabled="disabled" id="jsxc_autojoin" type="checkbox"><span data-i18n="Auto-join"></span>\n </label>\n </div>\n </div>\n </div>\n <div class="form-group">\n <div class="col-sm-offset-4 col-sm-8">\n <button type="button" class="btn btn-default jsxc_close" data-i18n="Close"></button>\n <button type="submit" class="btn btn-primary jsxc_submit" data-i18n="Save"></button>\n </div>\n </div>\n</form>\n',jsxc.gui.template.chatWindow='<li class="jsxc_min jsxc_windowItem">\n <div class="jsxc_window">\n <div class="jsxc_bar">\n <div class="jsxc_avatar">☺</div>\n <div class="jsxc_tools">\n <div class="jsxc_settings">\n <ul>\n <li class="jsxc_fingerprints jsxc_otr jsxc_disabled" data-i18n="Fingerprints"></li>\n <li class="jsxc_verification" data-i18n="Authentication"></li>\n <li class="jsxc_transfer jsxc_otr jsxc_disabled" data-i18n="start_private"></li>\n <li class="jsxc_clear" data-i18n="clear_history"></li>\n </ul>\n </div>\n <div class="jsxc_transfer jsxc_otr jsxc_disabled" />\n <div class="jsxc_close">×</div>\n </div>\n <div class="jsxc_unread" />\n <div class="jsxc_name" />\n </div>\n <div class="jsxc_fade">\n <div class="jsxc_gradient" />\n <div class="jsxc_textarea" />\n <div class="jsxc_emoticons">\n <ul />\n </div>\n <input type="text" class="jsxc_textinput" data-i18n="[placeholder]Message" />\n </div>\n </div>\n</li>\n',jsxc.gui.template.confirmDialog='<p>{{msg}}</p>\n\n<button class="btn btn-primary jsxc_confirm pull-right" data-i18n="Confirm"></button>\n<button class="btn btn-default jsxc_dismiss jsxc_close pull-right" data-i18n="Dismiss"></button>\n',jsxc.gui.template.contactDialog='<h3 data-i18n="Add_buddy"></h3>\n<p class=".jsxc_explanation" data-i18n="Type_in_the_full_username_"></p>\n<form class="form-horizontal">\n <div class="form-group">\n <label class="col-sm-4 control-label" for="jsxc_username" data-i18n="Username"></label>\n <div class="col-sm-8">\n <input type="text" name="username" id="jsxc_username" class="form-control" list="jsxc_userlist" pattern="^[^\\x22&\'\\\\/:<>@\\s]+(@[.\\-_\\w]+)?" required="required" />\n </div>\n </div>\n <datalist id="jsxc_userlist"></datalist>\n <div class="form-group">\n <label class="col-sm-4 control-label" for="jsxc_alias" data-i18n="Alias"></label>\n <div class="col-sm-8">\n <input type="text" name="alias" id="jsxc_alias" class="form-control" />\n </div>\n </div>\n <div class="form-group">\n <div class="col-sm-offset-4 col-sm-8">\n <button class="btn btn-default jsxc_close" type="button" data-i18n="Close"></button>\n <button class="btn btn-primary" type="submit" data-i18n="Add"></button>\n </div>\n </div>\n</form>\n',jsxc.gui.template.fingerprintsDialog='<div>\n <p class="jsxc_maxWidth" data-i18n="A_fingerprint_"></p>\n <p>\n <strong data-i18n="Your_fingerprint"></strong>\n <br /> <span style="text-transform: uppercase">{{my_priv_fingerprint}}</span>\n </p>\n <p>\n <strong data-i18n="Buddy_fingerprint"></strong>\n <br /> <span style="text-transform: uppercase">{{bid_priv_fingerprint}}</span>\n </p>\n</div>\n',jsxc.gui.template.incomingCall='<h3 data-i18n="Incoming_call"></h3>\n<p>\n <span data-i18n="Do_you_want_to_accept_the_call_from"></span> {{bid_name}}?\n</p>\n\n<button class="btn btn-primary jsxc_accept pull-right" data-i18n="Accept"></button>\n<button class="btn btn-default jsxc_reject pull-right" data-i18n="Reject"></button>\n',jsxc.gui.template.joinChat='<h3 data-i18n="Join_chat"></h3>\n<p class=".jsxc_explanation" data-i18n="muc_explanation"></p>\n<div class="form-horizontal">\n <div class="form-group">\n <label class="col-sm-4 control-label" for="jsxc_server" data-i18n="Server"></label>\n <div class="col-sm-8">\n <input type="text" name="server" id="jsxc_server" class="form-control" required="required" readonly="readonly" />\n </div>\n </div>\n <div class="form-group">\n <label class="col-sm-4 control-label" for="jsxc_room" data-i18n="Room"></label>\n <div class="col-sm-8">\n <input type="text" name="room" id="jsxc_room" class="form-control" autocomplete="off" list="jsxc_roomlist" required="required" pattern="^[^\\x22&\'\\/:<>@\\s]+" />\n </div>\n </div>\n <p class="jsxc_inputinfo jsxc_waiting jsxc_room" data-i18n="Rooms_are_loaded"></p>\n <datalist id="jsxc_roomlist">\n <p>\n <label for="jsxc_roomlist_select"></label>\n <select id="jsxc_roomlist_select">\n <option></option>\n <option>workaround</option>\n </select>\n </p>\n </datalist>\n <div class="form-group">\n <label class="col-sm-4 control-label" for="jsxc_nickname" data-i18n="Nickname"></label>\n <div class="col-sm-8">\n <input type="text" name="nickname" id="jsxc_nickname" class="form-control" />\n </div>\n </div>\n <div class="form-group">\n <label class="col-sm-4 control-label" for="jsxc_password" data-i18n="Password"></label>\n <div class="col-sm-8">\n <input type="text" name="password" id="jsxc_password" class="form-control" />\n </div>\n </div>\n <div class="form-group jsxc_bookmark">\n <div class="col-sm-offset-4 col-sm-8">\n <div class="checkbox">\n <label>\n <input id="jsxc_bookmark" type="checkbox"><span data-i18n="Bookmark"></span>\n </label>\n </div>\n </div>\n </div>\n <div class="form-group jsxc_bookmark">\n <div class="col-sm-offset-4 col-sm-8">\n <div class="checkbox disabled">\n <label>\n <input disabled="disabled" id="jsxc_autojoin" type="checkbox"><span data-i18n="Auto-join"></span>\n </label>\n </div>\n </div>\n </div>\n <div class="jsxc_msg"></div>\n <div class="form-group">\n <div class="col-sm-offset-4 col-sm-8">\n <span class="jsxc_warning"></span>\n <button class="btn btn-default jsxc_close" data-i18n="Close"></button>\n <button class="btn btn-primary jsxc_continue" data-i18n="Continue"></button>\n <button class="btn btn-success jsxc_join" data-i18n="Join"></button>\n </div>\n </div>\n</div>\n',jsxc.gui.template.loginBox='<h3 data-i18n="Login"></h3>\n<form class="form-horizontal">\n <div class="form-group">\n <label class="col-sm-4 control-label" for="jsxc_username" data-i18n="Username"></label>\n <div class="col-sm-8">\n <input type="text" name="username" id="jsxc_username" class="form-control" required="required" value="{{my_node}}" />\n </div>\n </div>\n <div class="form-group">\n <label class="col-sm-4 control-label" for="jsxc_password" data-i18n="Password"></label>\n <div class="col-sm-8">\n <input type="password" name="password" required="required" class="form-control" id="jsxc_password" />\n </div>\n </div>\n <div class="jsxc_alert jsxc_alert-warning" data-i18n="Sorry_we_cant_authentikate_"></div>\n <div class="form-group">\n <div class="col-sm-offset-4 col-sm-9">\n <button type="reset" class="btn btn-default jsxc_close" name="clear" data-i18n="Cancel" />\n <button type="submit" class="btn btn-primary" name="commit" data-i18n="[data-jsxc-loading-text]Connecting...;Connect" />\n </div>\n </div>\n</form>\n',jsxc.gui.template.pleaseAccept='<p data-i18n="Please_accept_"></p>\n',jsxc.gui.template.removeDialog='<h3 data-i18n="Remove_buddy"></h3>\n<p class="jsxc_maxWidth" data-i18n="[html]You_are_about_to_remove_"></p>\n\n<button class="btn btn-primary jsxc_remove pull-right" data-i18n="Remove"></button>\n<button class="btn btn-default jsxc_cancel jsxc_close pull-right" data-i18n="Cancel"></button>\n',jsxc.gui.template.roster='<div id="jsxc_roster">\n <ul id="jsxc_buddylist"></ul>\n <div class="jsxc_bottom jsxc_presence" data-bid="own">\n <div id="jsxc_avatar">\n <div class="jsxc_avatar">☺</div>\n </div>\n <div id="jsxc_menu">\n <span></span>\n <ul>\n <li class="jsxc_settings" data-i18n="Settings"></li>\n <li class="jsxc_muteNotification" data-i18n="Mute"></li>\n <li class="jsxc_addBuddy" data-i18n="Add_buddy"></li>\n <li class="jsxc_hideOffline" data-i18n="Hide_offline"></li>\n <li class="jsxc_onlineHelp" data-i18n="Online_help"></li>\n <li class="jsxc_about" data-i18n="About"></li>\n </ul>\n </div>\n <div id="jsxc_notice">\n <span></span>\n <ul></ul>\n </div>\n <div id="jsxc_presence">\n <span data-i18n="Online"></span>\n <ul>\n <li data-pres="online" class="jsxc_online" data-i18n="Online"></li>\n <li data-pres="chat" class="jsxc_chat" data-i18n="Chatty"></li>\n <li data-pres="away" class="jsxc_away" data-i18n="Away"></li>\n <li data-pres="xa" class="jsxc_xa" data-i18n="Extended_away"></li>\n <li data-pres="dnd" class="jsxc_dnd" data-i18n="dnd"></li>\n <li data-pres="offline" class="jsxc_offline" data-i18n="Offline"></li>\n </ul>\n </div>\n </div>\n <div id="jsxc_toggleRoster"></div>\n</div>\n',jsxc.gui.template.rosterBuddy='<li>\n <div class="jsxc_avatar">☺</div>\n <div class="jsxc_control"></div>\n <div class="jsxc_unread" />\n <div class="jsxc_name" />\n <div class="jsxc_options jsxc_right">\n <div class="jsxc_rename" data-i18n="[title]rename_buddy">✎</div>\n <div class="jsxc_delete" data-i18n="[title]delete_buddy">✘</div>\n </div>\n <div class="jsxc_options jsxc_left">\n <div class="jsxc_chaticon" data-i18n="[title]send_message" />\n <div class="jsxc_vcardicon" data-i18n="[title]get_info">i</div>\n </div>\n</li>\n',jsxc.gui.template.selectionDialog='<h3></h3>\n<p></p>\n\n<button class="btn btn-primary pull-right jsxc_close" data-i18n="Confirm"></button>\n<button class="btn btn-default pull-right jsxc_close" data-i18n="Dismiss"></button>\n',jsxc.gui.template.settings='<form class="form-horizontal">\n <fieldset class="jsxc_fieldsetXmpp jsxc_fieldset">\n <legend data-i18n="Login_options"></legend>\n <div class="form-group">\n <label class="col-sm-6 control-label" for="xmpp-url" data-i18n="BOSH_url"></label>\n <div class="col-sm-6">\n <input type="text" id="xmpp-url" class="form-control" readonly="readonly" />\n </div>\n </div>\n <div class="form-group">\n <label class="col-sm-6 control-label" for="xmpp-username" data-i18n="Username"></label>\n <div class="col-sm-6">\n <input type="text" id="xmpp-username" class="form-control" />\n </div>\n </div>\n <div class="form-group">\n <label class="col-sm-6 control-label" for="xmpp-domain" data-i18n="Domain"></label>\n <div class="col-sm-6">\n <input type="text" id="xmpp-domain" class="form-control" />\n </div>\n </div>\n <div class="form-group">\n <label class="col-sm-6 control-label" for="xmpp-resource" data-i18n="Resource"></label>\n <div class="col-sm-6">\n <input class="form-control" type="text" id="xmpp-resource" class="form-control" />\n </div>\n </div>\n <div class="form-group">\n <div class="col-sm-offset-6 col-sm-6">\n <button class="btn btn-primary jsxc_continue" type="submit" data-i18n="Save"></button>\n </div>\n </div>\n </fieldset>\n</form>\n\n<form class="form-horizontal">\n <fieldset class="jsxc_fieldsetLoginForm jsxc_fieldset">\n <legend data-i18n="On_login"></legend>\n <div class="form-group">\n <div class="col-sm-offset-6 col-sm-6">\n <div class="checkbox">\n <label>\n <input type="checkbox" id="loginForm-enable"><span data-i18n="On_login"></span>\n </label>\n </div>\n </div>\n </div>\n <div class="form-group">\n <div class="col-sm-offset-6 col-sm-6">\n <button class="btn btn-primary jsxc_continue" type="submit" data-i18n="Save"></button>\n </div>\n </div>\n </fieldset>\n</form>\n\n<form class="form-horizontal">\n <fieldset class="jsxc_fieldsetPriority jsxc_fieldset">\n <legend data-i18n="Priority"></legend>\n <div class="form-group">\n <label class="col-sm-6 control-label" for="priority-online" data-i18n="Online"></label>\n <div class="col-sm-6">\n <input type="number" value="0" id="priority-online" class="form-control" min="-128" max="127" step="1" required="required" />\n </div>\n </div>\n <div class="form-group">\n <label class="col-sm-6 control-label" for="priority-chat" data-i18n="Chatty"></label>\n <div class="col-sm-6">\n <input type="number" value="0" id="priority-chat" class="form-control" min="-128" max="127" step="1" required="required" />\n </div>\n </div>\n <div class="form-group">\n <label class="col-sm-6 control-label" for="priority-away" data-i18n="Away"></label>\n <div class="col-sm-6">\n <input type="number" value="0" id="priority-away" class="form-control" min="-128" max="127" step="1" required="required" />\n </div>\n </div>\n <div class="form-group">\n <label class="col-sm-6 control-label" for="priority-xa" data-i18n="Extended_away"></label>\n <div class="col-sm-6">\n <input type="number" value="0" id="priority-xa" class="form-control" min="-128" max="127" step="1" required="required" />\n </div>\n </div>\n <div class="form-group">\n <label class="col-sm-6 control-label" for="priority-dnd" data-i18n="dnd"></label>\n <div class="col-sm-6">\n <input type="number" value="0" id="priority-dnd" class="form-control" min="-128" max="127" step="1" required="required" />\n </div>\n </div>\n <div class="form-group">\n <div class="col-sm-offset-6 col-sm-6">\n <button class="btn btn-primary jsxc_continue" type="submit" data-i18n="Save"></button>\n </div>\n </div>\n </fieldset>\n</form>\n\n<form class="form-horizontal" data-onsubmit="xmpp.carbons.refresh">\n <fieldset class="jsxc_fieldsetCarbons jsxc_fieldset">\n <legend data-i18n="Carbon_copy"></legend>\n <div class="form-group">\n <div class="col-sm-offset-6 col-sm-6">\n <div class="checkbox">\n <label>\n <input type="checkbox" id="carbons-enable"><span data-i18n="Enable"></span>\n </label>\n </div>\n </div>\n </div>\n <div class="form-group">\n <div class="col-sm-offset-6 col-sm-6">\n <button class="btn btn-primary jsxc_continue" type="submit" data-i18n="Save"></button>\n </div>\n </div>\n </fieldset>\n</form>\n',jsxc.gui.template.vCard='<h3>\n <span data-i18n="Info_about"></span> <span>{{bid_name}}</span>\n</h3>\n<ul class="jsxc_vCard"></ul>\n<p>\n <img src="{{root}}/img/loading.gif" alt="wait" width="32px" height="32px" /> <span data-i18n="Please_wait"></span>...\n</p>\n',jsxc.gui.template.videoWindow='<div class="jsxc_webrtc">\n <div class="jsxc_chatarea">\n <ul></ul>\n </div>\n <div class="jsxc_videoContainer">\n <video class="jsxc_localvideo" autoplay></video>\n <video class="jsxc_remotevideo" autoplay></video>\n <div class="jsxc_status"></div>\n <div class="bubblingG">\n <span id="bubblingG_1"> </span> <span id="bubblingG_2"> </span> <span id="bubblingG_3"> </span>\n </div>\n <div class="jsxc_noRemoteVideo">\n <div>\n <div></div>\n <p data-i18n="No_video_signal"></p>\n <div></div>\n </div>\n </div>\n </div>\n <div class="jsxc_controlbar">\n <button class="btn btn-default jsxc_showchat" data-i18n="chat"></button>\n <button class="btn btn-primary jsxc_hangUp" data-i18n="hang_up"></button>\n <input type="range" class="jsxc_volume" min="0.0" max="1.0" step="0.05" value="0.5" style="width: 150px" />\n <div class="btn-group">\n <button class="btn btn-default jsxc_snapshot" data-i18n="snapshot"></button>\n <button class="btn btn-default jsxc_snapshots">&#9660;</button>\n </div>\n <!-- <button type="button" class="jsxc_mute_local" data-i18n="mute_my_audio"></button>\n <button type="button" class="jsxc_pause_local" data-i18n="pause_my_video"></button> -->\n <button class="btn btn-default jsxc_fullscreen" data-i18n="fullscreen"></button>\n <button class="btn btn-default jsxc_info" data-i18n="Info"></button>\n\n </div>\n <div class="jsxc_multi">\n <div class="jsxc_snapshotbar">\n <p>No pictures yet!</p>\n </div>\n <!--<div class="jsxc_chatarea">\n <ul></ul>\n </div>-->\n <div class="jsxc_infobar"></div>\n </div>\n</div>\n',jsxc.gui.template.waitAlert='<h3>{{msg}}</h3>\n\n<div class="progress">\n <div class="progress-bar progress-bar-striped active" style="width: 100%" data-i18n="Please_wait">\n </div>\n</div>\n',jsxc.gui.template.windowList='<div id="jsxc_windowList">\n <ul></ul>\n</div>\n<div id="jsxc_windowListSB">\n <div class="jsxc_scrollLeft jsxc_disabled">&lt;</div>\n <div class="jsxc_scrollRight jsxc_disabled">&gt;</div>\n</div>\n'}(jQuery);
//# sourceMappingURL=jsxc.min.js.map \ No newline at end of file
diff --git a/build/js/jsxc/jsxc.min.js.map b/build/js/jsxc/jsxc.min.js.map
index eb02abb..87beaf4 100644
--- a/build/js/jsxc/jsxc.min.js.map
+++ b/build/js/jsxc/jsxc.min.js.map
@@ -1 +1 @@
-{"version":3,"file":"jsxc.min.js","sources":["jsxc.js"],"names":["jsxc","RTC","RTCPeerconnection","$","version","master","role_allocation","to","toBusy","toNotification","toNotificationDelay","keepalive","restore","restoreCompleted","triggeredFromBox","triggeredFromElement","triggeredFromLogout","ls","storageNotConform","toSNC","bid","CONST","NOTIFICATION_DEFAULT","NOTIFICATION_GRANTED","NOTIFICATION_DENIED","STATUS","SOUNDS","MSG","CALL","NOTICE","REGEX","JID","RegExp","URL","NS","CARBONS","FORWARD","getFormattedTime","unixtime","msgDate","Date","parseInt","date","getDate","slice","month","getMonth","year","getFullYear","hours","getHours","minutes","getMinutes","dateNow","time","setHours","getTime","debug","msg","data","level","storage","getItem","console","log","d","prepend","clone","html","err","JSON","stringify","err2","warn","error","init","options","extend","get","key","local","getUserItem","set","value","updateItem","lang","autoLang","navigator","language","substr","defaultLang","i18n","lng","fallbackLng","resStore","I18next","useLocalStorage","localStorageExpirationTime","otr","window","addEventListener","onStorage","lastActivity","loginTimeout","document","on","logoutElement","length","logout","this","xmpp","off","one","jidToBid","gui","checkMaster","onMaster","removeItem","loginForm","form","el_exists","jid","pass","displayRosterMinimized","setUserItem","roster","noConnection","formFound","call","events","submit","submits","each","index","val","push","handler","settings","prepareLogin","onlogin","triggered","login","username","password","loadSettings","onConnecting","showWaitAlert","t","resource","domain","match","preJid","split","onSlave","restoreRoster","restoreWindows","trigger","setItem","startKeepAlive","enable","createDSA","_onMaster","create","noti","notification","hasSupport","hasPermission","prepareRequest","updateAvatar","setTimeout","ink","setInterval","keepAlive","timeout","keepBusyAlive","clearTimeout","clearInterval","busyTimeout","random","max","Math","floor","selector","jidToCid","cid","Strophe","getBareJidFromJid","replace","toLowerCase","buddies","add","loaded","empty","windows","minimize","hide","show","setText","text","submitLoginForm","find","click","escapeHTML","removeHTML","switchEvents","obj","ns","toString","self","apply","arguments","isHidden","hidden","webkitHidden","mozHidden","msHidden","hasFocus","focus","exec","fnName","fnParams","i","fnList","fn","hashStr","str","hash","charCodeAt","emotions","queryActions","message","params","win","open","body","remove","showRemoveDialog","subscribe","showContactDialog","name","vcard","showVcard","append","template","resize","updateWindowListSB","scrollWindowListBy","ev","originalEvent","wheelDelta","tooltip","reg","join","windowTemplate","buddyTemplate","delay","content","attr","update","ri","we","ue","spot","removeClass","addClass","status","msgstate","trust","sub","info","avatar","el","aid","setAvatar","src","defaultAvatar","avatarPlaceholder","removeAttr","css","background-image","text-indent","avatarSrc","conn","stanza","vCard","img","type","width","offset","scrollWidth","right","padding","getWindow","toggleList","disableSelection","ul","slideUp","complete","is","slideToggle","toggleClass","mouseleave","mouseenter","showLoginBox","onAuthFail","alert","dialog","preventDefault","showFingerprints","showVerification","OTR","MSGSTATE_ENCRYPTED","change","prop","slideDown","objects","updateUserItem","close","postMessage","div","sec","quest","keyup","sendSmpReq","showApproveDialog","from","noClose","stopPropagation","resFriendReq","getUsers","list","uid","displayname","option","appendTo","alias","getDomainFromJid","addBuddy","removeBuddy","showAlert","showAuthFail","showConfirmDialog","confirm","dismiss","showAboutDialog","showDebugLog","userInfo","hasOwnProperty","screen","height","j","res","identities","cap","client","identity","getCapabilitiesByJid","category","printProp","depth","item","children","tagName","before","failedToLoad","loadVcard","photo","img_el","showSettings","overwrite","id","checked","saveSettinsPermanent","effect","color","showRequestNotification","notificationready.jsxc","notificationfailure.jsxc","requestPermission","showUnknownSender","confirmationText","saveBuddy","removeUserItem","changePresence","pres","external","sendPres","updatePresence","muteSound","unmuteSound","unreadMsg","readMsg","hasClass","detectUriScheme","container","action","element","href","indexOf","pairs","substring","decodeURIComponent","detectEmail","trim","s","prev","seed","hue","abs","saturation","lightness","background-color","font-weight","text-align","line-height","font-size","toUpperCase","ready","rosterAppend","hideOffline","mute","toggle","slimScroll","distance","opacity","notice","load","bud","insert","rename","expandClick","dblclick","scrollTo","li","listElements","thisStatus","reorder","detach","purge","removeUserElement","_close","input","replaceWith","keypress","which","_rename","newname","iq","$iq","c","xmlns","sendIQ","duration","wl","roster_width","innerWidth","roster_right","parseFloat","state","animate","link","o","opt","onComplete","closeButton","btn","onClosed","onCleanup","overlayClose","escKey","colorbox","outerWidth","innerHeight","outerHeight","toggleTransfer","clear","getSelection","resizable","handles","minHeight","minWidth","event","ui","size","position","top","inArray","unread","ins","restoreChat","highlight","left","parents","_show","scrollDown","_hide","chat","scrollHeight","direction","encrypted","forwarded","stamp","sender","html_msg","MSGSTATE_FINISHED","post","saveMessage","sendMessage","_postMessage","url","source","protocol","p1","esc","msgDiv","msgTsDiv","received","title","avatarDiv","prependTo","pop","ph","my_priv_fingerprint","my_jid","my_node","getNodeFromJid","root","app_name","bid_priv_fingerprint","fingerprint","bid_jid","bid_name","ret","authenticationDialog","fingerprintsDialog","chatWindow","windowList","rosterBuddy","loginBox","contactDialog","approveDialog","removeDialog","waitAlert","authFailDialog","confirmDialog","pleaseAccept","aboutDialog","joinChat","muc","AFFILIATION","ADMIN","MEMBER","OUTCAST","OWNER","NONE","ROLE","MODERATOR","PARTICIPANT","VISITOR","ROOMSTATE","INIT","ENTERED","EXITED","AWAIT_DESTRUCTION","DESTROYED","server","initMenu","onPresence","onPresenceError","addHandler","onGroupchatMessage","onErrorMessage","roomNames","disco","items","discovered","mucFeature","MUC","mucIdentity","showJoinChat","error_handler","condition","room","roomIndex","splice","rooms","listRooms","r","rjid","rnode","rname","count","nickname","discoReceived","roomName","subject","table","feature","exists","tr","keydown","leave","own","onExited","destroy","handler_cb","error_cb","MUC_OWNER","tree","roomdata","emptyMembers","initWindow","ownNickname","mlIcon","after","ml","scrollMemberListBy","toggleMl","slimOptions","slimHeight","maxHeight","slimscroll","member","insertMember","affiliation","presence","xdata","getResourceFromJid","unescapeNode","codes","code","bl","removeMember","newNickname","oldNickname","escapeInterpolation","roomJid","role","onStatus",110,170,201,"createInstantRoom",301,"postReason",307,321,322,332,"actor","reason","memberdata","m","isNaN","onAddRoster","_num","saved","description","nid","now","notify","has","audio","soundFile","playSound","stopSound","force","loop","icon","popup","Notification","popupDuration","webkitNotifications","createNotification","cancel","permission","checkPermission","func","Audio","play","pause","ERROR_START_AKE","SEND_WHITESPACE_TAG","WHITESPACE_START_AKE","priority","online","away","xa","dnd","onConnected","numberOfMsg","muteNotification","carbons","dsaFallback","receiveMessage","MSGSTATE_PLAINTEXT","backup","_sendMessage","priv","ol","STATUS_SEND_QUERY","STATUS_AKE_SUCCESS","their_priv_pk","STATUS_END_OTR","STATUS_SMP_HANDLE","sm","abort","onSmpQuestion","meta","smpSecret","goEncrypt","goPlain","sendQueryMsg","cb","endOtr","savekey","packPublic","ake","otr_version","parse","DSA","parsePublic","_smInit","worker","Worker","dsa","DSAready","onmessage","e","parsePrivate","imports","BigInt","getSeed","_createDSA","packPrivate","PREFIX","SEP","getPrefix","uk","localStorage","prefix","variable","Number","removeElement","isArray","grep","re","newValue","oldValue","n","posts","transferReq","approve","unshift","incomingCall","allowMediaAccess","videoWindow","webrtc","localStream","remoteStream","last_caller","AUTO_ACCEPT","reqVideoFeatures","chatJids","browser","jingle","media_constraints","mandatory","MozDontOfferDataChannel","PRANSWER","AUTOACCEPT","ice_config","MULTIPARTY","pc_constraints","proxy","onMessage","onMediaReady","onMediaFailure","onCallIncoming","onCallTerminated","onCallRinging","onRemoteStreamAdded","onRemoteStreamRemoved","onIceConnectionStateChanged","noStunCandidates","sid","addFeature","caps","onCaps","getTurnCrendentials","turnCredentialsPath","ttl","ajax","async","success","iceConfig","iceServers","credential","dataType","getCapableRes","available","hasFeatureByJid","onAddRosterItem","videoIcon","startCall","updateIcon","capableRes","targetRes","CAPS","setStatus","txt","margin-left","display","stop","stream","showVideoWindow","getAudioTracks","label","getVideoTracks","hangUp","sess","sessions","peerjid","sendRinging","mediaready.jingle","peerconnection","addStream","sendAnswer","accept","mediafailure.jingle","sendTerminate","terminate","reqUserMedia","isVideoDevice","isAudioDevice","remoteDevices","video","attachMediaStream","sigState","signalingState","iceCon","iceConnectionState","iceGatheringState","localSDP","localDescription","sdp","remoteSDP","remoteDescription","local_fp","SDPUtil","parse_fingerprint","find_line","remote_fp","um","finish.mediaready.jsxc","initiate","MediaStreamTrack","getSources","sourceInfo","availableDevices","map","kind","filter","getUserMediaWithConstraints","snapshot","canvas","ctx","getContext","drawImage","toDataURL","target","muted","volume","rv","lv","draggable","containment","w_dialog","w_remote","scale","new_h","new_w","vc","toggleMulti","elem","not","chatarea","support","fullscreen","KEYCODE_ENTER","KEYCODE_ESC","setupRTC","authenticated","rid","connected","attached","disconnected","onRidChange","onConnfail","addNamespace","Connection","stropheGetUniqueId","getUniqueId","suffix","_uniqueId","xmlInput","xmlOutput","callback","Object","getOwnPropertyNames","Status","CONNECTING","CONNECTED","ATTACHED","DISCONNECTED","CONNFAIL","AUTHFAIL","node","attach","_addSysHandler","querySelector","ver","getAttribute","_jidNodeIndex","_jidVerIndex","connect","numOtr","keys","disReady","flush","disconnect","nomJid","_proto","connectionReady","resume","onRosterChanged","onReceived","conditionalEnable","_knownCapabilities","_requestCapabilities","onRoster","addIdentity","DISCO_INFO","RECEIPTS","$pres","generateCapsAttrs","up","presState","send","location","temp","notices","noticeKey","ptype","xVCard","maxVal","carbon","mid","request","$msg","receiveMsg","subscription","receivedId","sendMsg","isBar","xmlMsg","enabled","result","jidVerIndex","knownCapabilities","disable","refresh","jQuery"],"mappings":";;;;;;;;;;;;;AAeA,GAAIA,MAAO,KAAMC,IAAM,KAAMC,kBAAoB,MAEhD,SAASC,GACP,YAOHH,OAEGI,QAAS,QAGTC,QAAQ,EAGRC,iBAAiB,EAGjBC,GAAI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OACtB/J,KAAK8G,KAAKskB,QAAQrhB,SAGrB/J,KAAK8G,KAAKskB,QAAQsR,UARzB,UAYJE"} \ No newline at end of file
+{"version":3,"file":"jsxc.min.js","sources":["jsxc.js"],"names":["jsxc","RTC","RTCPeerconnection","$","version","master","role_allocation","to","toBusy","toNotification","toNotificationDelay","keepalive","restore","restoreCompleted","triggeredFromBox","triggeredFromElement","triggeredFromLogout","ls","storageNotConform","toSNC","bid","CONST","NOTIFICATION_DEFAULT","NOTIFICATION_GRANTED","NOTIFICATION_DENIED","STATUS","SOUNDS","MSG","CALL","NOTICE","REGEX","JID","RegExp","URL","NS","CARBONS","FORWARD","getFormattedTime","unixtime","msgDate","Date","parseInt","date","getDate","slice","month","getMonth","year","getFullYear","hours","getHours","minutes","getMinutes","dateNow","time","setHours","getTime","debug","msg","data","level","storage","getItem","console","log","d","prepend","clone","html","err","JSON","stringify","err2","warn","error","init","options","extend","get","key","local","getUserItem","set","value","updateItem","lang","autoLang","navigator","language","substr","defaultLang","i18n","lng","fallbackLng","resStore","I18next","useLocalStorage","localStorageExpirationTime","otr","window","addEventListener","onStorage","lastActivity","loginTimeout","document","on","logoutElement","length","logout","this","xmpp","off","one","isLoginForm","loginForm","attachIfFound","jidToBid","gui","checkMaster","onMaster","removeItem","displayRosterMinimized","setUserItem","roster","noConnection","formFound","call","form","events","submit","submits","each","index","val","push","handler","prepareLogin","settings","enabled","enable","onlogin","triggered","login","submitLoginForm","el_exists","jid","pass","username","password","cb","onConnecting","showWaitAlert","t","loadSettings","s","_prepareLogin","loadedSettings","resource","domain","match","preJid","split","old","onSlave","restoreRoster","restoreWindows","trigger","setItem","startKeepAlive","createDSA","_onMaster","create","noti","notification","hasSupport","hasPermission","prepareRequest","updateAvatar","setTimeout","ink","setInterval","keepAlive","timeout","keepBusyAlive","clearTimeout","clearInterval","busyTimeout","random","max","Math","floor","selector","jidToCid","cid","Strophe","getBareJidFromJid","replace","toLowerCase","buddies","add","loaded","empty","windows","minimize","hide","show","setText","text","find","click","escapeHTML","removeHTML","switchEvents","obj","ns","toString","self","apply","arguments","isHidden","hidden","webkitHidden","mozHidden","msHidden","hasFocus","focus","exec","fnName","fnParams","i","fnList","fn","hashStr","str","hash","charCodeAt","conn","authenticated","sid","rid","url","connected","attached","disconnected","onRidChange","onConnfail","onAuthFail","addNamespace","Connection","stropheGetUniqueId","getUniqueId","suffix","uid","_uniqueId","xmlInput","xmlOutput","callback","status","condition","Object","getOwnPropertyNames","Status","CONNECTING","CONNECTED","ATTACHED","DISCONNECTED","CONNFAIL","AUTHFAIL","caps","node","attach","_addSysHandler","stanza","from","c","querySelector","ver","getAttribute","_jidNodeIndex","parse","localStorage","_jidVerIndex","CAPS","connect","complete","removeUserItem","remove","numOtr","keys","objects","disReady","flush","disconnect","msgstate","OTR","MSGSTATE_ENCRYPTED","endOtr","backup","pause","nomJid","getResourceFromJid","_proto","removeUserElement","onConnected","connectionReady","removeClass","resume","dialog","close","addHandler","onRosterChanged","onMessage","onReceived","onPresence","conditionalEnable","hasFeatureByJid","carbons","onCaps","ev","_knownCapabilities","_requestCapabilities","sendPres","iq","$iq","type","xmlns","sendIQ","onRoster","disco","addIdentity","addFeature","DISCO_INFO","RECEIPTS","pres","$pres","generateCapsAttrs","up","presState","priority","send","location","attr","showAuthFail","name","sub","saveBuddy","res","bookmarks","load","purge","bl","indexOf","temp","update","reorder","notice","notices","noticeKey","presence","ptype","r","xVCard","prop","approve","maxVal","hasOwnProperty","notify","title","source","photo","avatar","message","carbon","forwarded","body","mid","delay","stamp","direction","postMessage","request","chat","saveMessage","win","updateUserItem","$msg","id","receiveMsg","resFriendReq","addBuddy","alias","removeBuddy","subscription","received","receivedId","addClass","sendMessage","sendMsg","_sendMessage","isBar","xmlMsg","loadVcard","error_cb","vcard","result","state","getCapabilitiesByJid","jidVerIndex","knownCapabilities","disable","refresh","emotions","favicon","queryActions","params","open","showRemoveDialog","subscribe","showContactDialog","showVcard","join","muc","showJoinChat","append","template","resize","updateWindowListSB","scrollWindowListBy","originalEvent","wheelDelta","tooltip","fo","Favico","animation","bgColor","textColor","badge","reg","windowTemplate","buddyTemplate","content","ri","we","ue","spot","trust","info","el","aid","setAvatar","src","defaultAvatar","avatarPlaceholder","removeAttr","css","background-image","text-indent","avatarSrc","vCard","img","width","offset","scrollWidth","right","padding","getWindow","toggleList","disableSelection","ul","slideUp","is","slideToggle","toggleClass","mouseleave","mouseenter","showLoginBox","alert","preventDefault","showFingerprints","showVerification","siblings","blur","div","sec","quest","keyup","sendSmpReq","showApproveDialog","noClose","stopPropagation","getUsers","list","displayname","option","appendTo","getDomainFromJid","showAlert","showConfirmDialog","confirm","dismiss","showAboutDialog","showDebugLog","userInfo","screen","height","j","identities","cap","client","identity","category","printProp","depth","item","children","tagName","before","failedToLoad","img_el","showSettings","overwrite","parent","checked","success","saveSettinsPermanent","switchClass","showRequestNotification","notificationready.jsxc","notificationfailure.jsxc","requestPermission","showUnknownSender","confirmationText","sender","showSelectionDialog","header","primary","primaryLabel","optionLabel","opt","label","changePresence","external","updatePresence","muteSound","unmuteSound","unreadMsg","winData","count","unread","total","_unreadMsg","readMsg","detectUriScheme","container","action","element","href","pairs","substring","decodeURIComponent","detectEmail","trim","prev","hasClass","seed","hue","abs","saturation","lightness","background-color","color","font-weight","text-align","line-height","font-size","toUpperCase","ready","rosterAppend","hideOffline","mute","toggle","slimScroll","distance","opacity","rosterState","startMinimized","innerWidth","bud","insert","rename","expandClick","dblclick","scrollTo","li","listElements","thisStatus","detach","_close","input","replaceWith","keypress","which","_rename","newname","nickname","autojoin","duration","wl","roster_width","roster_right","parseFloat","animate","link","o","magnificPopup","items","modal","callbacks","beforeClose","afterClose","btn","toggleTransfer","clear","getSelection","resizable","handles","minHeight","minWidth","event","ui","size","position","top","inArray","ins","restoreChat","highlight","outerWidth","left","parents","_show","slideDown","scrollDown","_hide","effect","scrollHeight","encrypted","html_msg","MSGSTATE_FINISHED","post","_postMessage","protocol","p1","esc","msgDiv","msgTsDiv","avatarDiv","prependTo","pop","ph","my_priv_fingerprint","my_jid","my_node","getNodeFromJid","root","app_name","bid_priv_fingerprint","fingerprint","bid_jid","bid_name","ret","AFFILIATION","ADMIN","MEMBER","OUTCAST","OWNER","NONE","ROLE","MODERATOR","PARTICIPANT","VISITOR","ROOMSTATE","INIT","ENTERED","EXITED","AWAIT_DESTRUCTION","DESTROYED","server","initMenu","onPresenceError","onGroupchatMessage","onErrorMessage","roomNames","discovered","mucFeature","MUC","mucIdentity","p","error_handler","room","roomIndex","splice","rooms","listRooms","rjid","rnode","rname","change","discoReceived","roomName","subject","bookmark","table","feature","exists","tr","keydown","showRoomConfiguration","configure","x","Form","fromXML","f","_showRoomConfiguration","config","helper","formToHTML","cancel","formGroup","fromHTML","saveConfiguration","cancelConfigure","bookmarked","leave","own","onExited","roomdata","destroy","handler_cb","MUC_OWNER","tree","emptyMembers","initWindow","ownNickname","mlIcon","after","ml","scrollMemberListBy","toggleMl","slimOptions","slimHeight","maxHeight","innerHeight","slimscroll","member","insertMember","affiliation","xdata","unescapeNode","codes","code","removeMember","newNickname","oldNickname","escapeInterpolation","roomJid","role","onStatus",110,170,171,172,173,201,"createInstantRoom",301,"postReason",307,321,322,332,"actor","reason","memberdata","m","isNaN","onAddRoster","bo","showDialog","instructions","fields","fieldToHtml","field","k","txt","line","_ref2","toHTML","values","_results","desc","required","inner","_num","saved","description","nid","now","has","audio","soundFile","playSound","stopSound","force","loop","icon","popup","Notification","popupDuration","webkitNotifications","createNotification","permission","checkPermission","func","Audio","play","ERROR_START_AKE","SEND_WHITESPACE_TAG","WHITESPACE_START_AKE","online","away","xa","dnd","numberOfMsg","muteNotification","turnCredentialsPath","RTCPeerConfig","ttl","iceServers","urls","dsaFallback","receiveMessage","MSGSTATE_PLAINTEXT","priv","ol","STATUS_SEND_QUERY","STATUS_AKE_SUCCESS","their_priv_pk","msg_state","STATUS_END_OTR","STATUS_SMP_HANDLE","sm","abort","onSmpQuestion","meta","smpSecret","goEncrypt","goPlain","sendQueryMsg","savekey","packPublic","ake","otr_version","DSA","parsePublic","_smInit","worker","Worker","dsa","DSAready","onmessage","e","parsePrivate","imports","BigInt","getSeed","_createDSA","packPrivate","PREFIX","SEP","getPrefix","uk","prefix","variable","Number","removeElement","isArray","grep","re","newValue","oldValue","n","posts","transferReq","unshift","webrtc","localStream","remoteStream","last_caller","AUTO_ACCEPT","reqVideoFeatures","chatJids","jingle","manager","onMediaReady","onMediaFailure","proxy","onCallIncoming","onCallTerminated","onCallRinging","onRemoteStreamAdded","onRemoteStreamRemoved","peerConfig","getTurnCrendentials","setICEServers","onDisconnected","ajax","async","credential","dataType","getCapableRes","available","onAddRosterItem","videoIcon","startCall","updateIcon","capableRes","targetRes","setStatus","margin-left","display","stop","stream","showVideoWindow","audioTracks","getAudioTracks","videoTracks","getVideoTracks","hangUp","session","peerID","onIceConnectionStateChanged","ring","reqUserMedia","mediaready.jingle","addStream","accept","mediafailure.jingle","decline","peer","isVideoDevice","isAudioDevice","attachMediaStream","jQuery","end","um","finish.mediaready.jsxc","initiate","terminate","MediaStreamTrack","getSources","sourceInfo","availableDevices","map","kind","filter","getUserMedia","constraints","video","snapshot","canvas","ctx","getContext","drawImage","toDataURL","target","muted","volume","rv","lv","draggable","containment","w_dialog","w_remote","scale","new_h","new_w","vc","toggleMulti","elem","not","chatarea","support","fullscreen","KEYCODE_ENTER","KEYCODE_ESC","remote","PUBSUB","loadFromRemote","loadFromLocal","conference","parseErr","reasons","createBookmarksNode","soft","deleteFromRemote","deleteFromLocal","nick","addToRemote","addToLocal"],"mappings":";;;;;;;;;;;;;AAeA,GAAIA,MAAO,KAAMC,IAAM,KAAMC,kBAAoB,MAEhD,SAASC,GACP,YAOHH,OAEGI,QAAS,cAGTC,QAAQ,EAGRC,iBAAiB,EAGjBC,GAAI,KAGJC,OAAQ,KAGRC,eAAgB,KAGhBC,oBAAqB,IAGrBC,UAAW,KAGXC,SAAS,EAGTC,kBAAkB,EAGlBC,kBAAkB,EAGlBC,sBAAsB,EA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a,KAAKqH,IAAImT,SAA6B,mBAAI,yYAa1Cxa,KAAKqH,IAAImT,SAAuB,aAAI,+SASpCxa,KAAKqH,IAAImT,SAAmB,SAAI,iqFAmEhCxa,KAAKqH,IAAImT,SAAmB,SAAI,ykCAwBhCxa,KAAKqH,IAAImT,SAAuB,aAAI,uCAGpCxa,KAAKqH,IAAImT,SAAuB,aAAI,wSAOpCxa,KAAKqH,IAAImT,SAAiB,OAAI,s6CAqC9Bxa,KAAKqH,IAAImT,SAAsB,YAAI,6hBAgBnCxa,KAAKqH,IAAImT,SAA0B,gBAAI,mMAOvCxa,KAAKqH,IAAImT,SAAmB,SAAI,wzJAqHhCxa,KAAKqH,IAAImT,SAAgB,MAAI,oPAS7Bxa,KAAKqH,IAAImT,SAAsB,YAAI,6vDA6CnCxa,KAAKqH,IAAImT,SAAoB,UAAI,yKAQjCxa,KAAKqH,IAAImT,SAAqB,WAAI,iNAShCihB"} \ No newline at end of file
diff --git a/build/js/jsxc/lib/favico.js/favico.js b/build/js/jsxc/lib/favico.js/favico.js
new file mode 100644
index 0000000..e876151
--- /dev/null
+++ b/build/js/jsxc/lib/favico.js/favico.js
@@ -0,0 +1,843 @@
+/**
+ * @license MIT
+ * @fileOverview Favico animations
+ * @author Miroslav Magda, http://blog.ejci.net
+ * @version 0.3.6
+ */
+
+/**
+ * Create new favico instance
+ * @param {Object} Options
+ * @return {Object} Favico object
+ * @example
+ * var favico = new Favico({
+ * bgColor : '#d00',
+ * textColor : '#fff',
+ * fontFamily : 'sans-serif',
+ * fontStyle : 'bold',
+ * position : 'down',
+ * type : 'circle',
+ * animation : 'slide',
+ * dataUrl: function(url){}
+ * });
+ */
+(function() {
+
+ var Favico = (function(opt) {
+ 'use strict';
+ opt = (opt) ? opt : {};
+ var _def = {
+ bgColor : '#d00',
+ textColor : '#fff',
+ fontFamily : 'sans-serif', //Arial,Verdana,Times New Roman,serif,sans-serif,...
+ fontStyle : 'bold', //normal,italic,oblique,bold,bolder,lighter,100,200,300,400,500,600,700,800,900
+ type : 'circle',
+ position : 'down', // down, up, left, leftup (upleft)
+ animation : 'slide',
+ elementId : false,
+ dataUrl : false
+ };
+ var _opt, _orig, _h, _w, _canvas, _context, _img, _ready, _lastBadge, _running, _readyCb, _stop, _browser, _animTimeout, _drawTimeout;
+
+ _browser = {};
+ _browser.ff = typeof InstallTrigger != 'undefined';
+ _browser.chrome = !!window.chrome;
+ _browser.opera = !!window.opera || navigator.userAgent.indexOf('Opera') >= 0;
+ _browser.ie = /*@cc_on!@*/false;
+ _browser.safari = Object.prototype.toString.call(window.HTMLElement).indexOf('Constructor') > 0;
+ _browser.supported = (_browser.chrome || _browser.ff || _browser.opera);
+
+ var _queue = [];
+ _readyCb = function() {
+ };
+ _ready = _stop = false;
+ /**
+ * Initialize favico
+ */
+ var init = function() {
+ //merge initial options
+ _opt = merge(_def, opt);
+ _opt.bgColor = hexToRgb(_opt.bgColor);
+ _opt.textColor = hexToRgb(_opt.textColor);
+ _opt.position = _opt.position.toLowerCase();
+ _opt.animation = (animation.types['' + _opt.animation]) ? _opt.animation : _def.animation;
+
+ var isUp = _opt.position.indexOf('up') > -1;
+ var isLeft = _opt.position.indexOf('left') > -1;
+
+ //transform animation
+ if (isUp || isLeft) {
+ for (var i = 0; i < animation.types['' + _opt.animation].length; i++) {
+ var step = animation.types['' + _opt.animation][i];
+
+ if (isUp) {
+ if (step.y < 0.6) {
+ step.y = step.y - 0.4;
+ } else {
+ step.y = step.y - 2 * step.y + (1 - step.w);
+ }
+ }
+
+ if (isLeft) {
+ if (step.x < 0.6) {
+ step.x = step.x - 0.4;
+ } else {
+ step.x = step.x - 2 * step.x + (1 - step.h);
+ }
+ }
+
+ animation.types['' + _opt.animation][i] = step;
+ }
+ }
+ _opt.type = (type['' + _opt.type]) ? _opt.type : _def.type;
+
+ _orig = link.getIcon();
+ //create temp canvas
+ _canvas = document.createElement('canvas');
+ //create temp image
+ _img = document.createElement('img');
+ if (_orig.hasAttribute('href')) {
+ _img.setAttribute('src', _orig.getAttribute('href'));
+ //get width/height
+ _img.onload = function() {
+ _h = (_img.height > 0) ? _img.height : 32;
+ _w = (_img.width > 0) ? _img.width : 32;
+ _canvas.height = _h;
+ _canvas.width = _w;
+ _context = _canvas.getContext('2d');
+ icon.ready();
+ };
+ } else {
+ _img.setAttribute('src', '');
+ _h = 32;
+ _w = 32;
+ _img.height = _h;
+ _img.width = _w;
+ _canvas.height = _h;
+ _canvas.width = _w;
+ _context = _canvas.getContext('2d');
+ icon.ready();
+ }
+
+ };
+ /**
+ * Icon namespace
+ */
+ var icon = {};
+ /**
+ * Icon is ready (reset icon) and start animation (if ther is any)
+ */
+ icon.ready = function() {
+ _ready = true;
+ icon.reset();
+ _readyCb();
+ };
+ /**
+ * Reset icon to default state
+ */
+ icon.reset = function() {
+ //reset
+ if (!_ready) {
+ return;
+ }
+ _queue = [];
+ _lastBadge = false;
+ _running = false;
+ _context.clearRect(0, 0, _w, _h);
+ _context.drawImage(_img, 0, 0, _w, _h);
+ //_stop=true;
+ link.setIcon(_canvas);
+ //webcam('stop');
+ //video('stop');
+ window.clearTimeout(_animTimeout);
+ window.clearTimeout(_drawTimeout);
+ };
+ /**
+ * Start animation
+ */
+ icon.start = function() {
+ if (!_ready || _running) {
+ return;
+ }
+ var finished = function() {
+ _lastBadge = _queue[0];
+ _running = false;
+ if (_queue.length > 0) {
+ _queue.shift();
+ icon.start();
+ } else {
+
+ }
+ };
+ if (_queue.length > 0) {
+ _running = true;
+ var run = function() {
+ // apply options for this animation
+ ['type', 'animation', 'bgColor', 'textColor', 'fontFamily', 'fontStyle'].forEach(function(a) {
+ if ( a in _queue[0].options) {
+ _opt[a] = _queue[0].options[a];
+ }
+ });
+ animation.run(_queue[0].options, function() {
+ finished();
+ }, false);
+ };
+ if (_lastBadge) {
+ animation.run(_lastBadge.options, function() {
+ run();
+ }, true);
+ } else {
+ run();
+ }
+ }
+ };
+
+ /**
+ * Badge types
+ */
+ var type = {};
+ var options = function(opt) {
+ opt.n = (( typeof opt.n) === 'number') ? Math.abs(opt.n | 0) : opt.n;
+ opt.x = _w * opt.x;
+ opt.y = _h * opt.y;
+ opt.w = _w * opt.w;
+ opt.h = _h * opt.h;
+ opt.len = ("" + opt.n).length;
+ return opt;
+ };
+ /**
+ * Generate circle
+ * @param {Object} opt Badge options
+ */
+ type.circle = function(opt) {
+ opt = options(opt);
+ var more = false;
+ if (opt.len === 2) {
+ opt.x = opt.x - opt.w * 0.4;
+ opt.w = opt.w * 1.4;
+ more = true;
+ } else if (opt.len >= 3) {
+ opt.x = opt.x - opt.w * 0.65;
+ opt.w = opt.w * 1.65;
+ more = true;
+ }
+ _context.clearRect(0, 0, _w, _h);
+ _context.drawImage(_img, 0, 0, _w, _h);
+ _context.beginPath();
+ _context.font = _opt.fontStyle + " " + Math.floor(opt.h * (opt.n > 99 ? 0.85 : 1)) + "px " + _opt.fontFamily;
+ _context.textAlign = 'center';
+ if (more) {
+ _context.moveTo(opt.x + opt.w / 2, opt.y);
+ _context.lineTo(opt.x + opt.w - opt.h / 2, opt.y);
+ _context.quadraticCurveTo(opt.x + opt.w, opt.y, opt.x + opt.w, opt.y + opt.h / 2);
+ _context.lineTo(opt.x + opt.w, opt.y + opt.h - opt.h / 2);
+ _context.quadraticCurveTo(opt.x + opt.w, opt.y + opt.h, opt.x + opt.w - opt.h / 2, opt.y + opt.h);
+ _context.lineTo(opt.x + opt.h / 2, opt.y + opt.h);
+ _context.quadraticCurveTo(opt.x, opt.y + opt.h, opt.x, opt.y + opt.h - opt.h / 2);
+ _context.lineTo(opt.x, opt.y + opt.h / 2);
+ _context.quadraticCurveTo(opt.x, opt.y, opt.x + opt.h / 2, opt.y);
+ } else {
+ _context.arc(opt.x + opt.w / 2, opt.y + opt.h / 2, opt.h / 2, 0, 2 * Math.PI);
+ }
+ _context.fillStyle = 'rgba(' + _opt.bgColor.r + ',' + _opt.bgColor.g + ',' + _opt.bgColor.b + ',' + opt.o + ')';
+ _context.fill();
+ _context.closePath();
+ _context.beginPath();
+ _context.stroke();
+ _context.fillStyle = 'rgba(' + _opt.textColor.r + ',' + _opt.textColor.g + ',' + _opt.textColor.b + ',' + opt.o + ')';
+ //_context.fillText((more) ? '9+' : opt.n, Math.floor(opt.x + opt.w / 2), Math.floor(opt.y + opt.h - opt.h * 0.15));
+ if (( typeof opt.n) === 'number' && opt.n > 999) {
+ _context.fillText(((opt.n > 9999) ? 9 : Math.floor(opt.n / 1000) ) + 'k+', Math.floor(opt.x + opt.w / 2), Math.floor(opt.y + opt.h - opt.h * 0.2));
+ } else {
+ _context.fillText(opt.n, Math.floor(opt.x + opt.w / 2), Math.floor(opt.y + opt.h - opt.h * 0.15));
+ }
+ _context.closePath();
+ };
+ /**
+ * Generate rectangle
+ * @param {Object} opt Badge options
+ */
+ type.rectangle = function(opt) {
+ opt = options(opt);
+ var more = false;
+ if (opt.len === 2) {
+ opt.x = opt.x - opt.w * 0.4;
+ opt.w = opt.w * 1.4;
+ more = true;
+ } else if (opt.len >= 3) {
+ opt.x = opt.x - opt.w * 0.65;
+ opt.w = opt.w * 1.65;
+ more = true;
+ }
+ _context.clearRect(0, 0, _w, _h);
+ _context.drawImage(_img, 0, 0, _w, _h);
+ _context.beginPath();
+ _context.font = _opt.fontStyle + " " + Math.floor(opt.h * (opt.n > 99 ? 0.9 : 1)) + "px " + _opt.fontFamily;
+ _context.textAlign = 'center';
+ _context.fillStyle = 'rgba(' + _opt.bgColor.r + ',' + _opt.bgColor.g + ',' + _opt.bgColor.b + ',' + opt.o + ')';
+ _context.fillRect(opt.x, opt.y, opt.w, opt.h);
+ _context.fillStyle = 'rgba(' + _opt.textColor.r + ',' + _opt.textColor.g + ',' + _opt.textColor.b + ',' + opt.o + ')';
+ //_context.fillText((more) ? '9+' : opt.n, Math.floor(opt.x + opt.w / 2), Math.floor(opt.y + opt.h - opt.h * 0.15));
+ if (( typeof opt.n) === 'number' && opt.n > 999) {
+ _context.fillText(((opt.n > 9999) ? 9 : Math.floor(opt.n / 1000) ) + 'k+', Math.floor(opt.x + opt.w / 2), Math.floor(opt.y + opt.h - opt.h * 0.2));
+ } else {
+ _context.fillText(opt.n, Math.floor(opt.x + opt.w / 2), Math.floor(opt.y + opt.h - opt.h * 0.15));
+ }
+ _context.closePath();
+ };
+
+ /**
+ * Set badge
+ */
+ var badge = function(number, opts) {
+ opts = (( typeof opts) === 'string' ? {
+ animation : opts
+ } : opts) || {};
+ _readyCb = function() {
+ try {
+ if ( typeof (number) === 'number' ? (number > 0) : (number !== '')) {
+ var q = {
+ type : 'badge',
+ options : {
+ n : number
+ }
+ };
+ if ('animation' in opts && animation.types['' + opts.animation]) {
+ q.options.animation = '' + opts.animation;
+ }
+ if ('type' in opts && type['' + opts.type]) {
+ q.options.type = '' + opts.type;
+ }
+ ['bgColor', 'textColor'].forEach(function(o) {
+ if ( o in opts) {
+ q.options[o] = hexToRgb(opts[o]);
+ }
+ });
+ ['fontStyle', 'fontFamily'].forEach(function(o) {
+ if ( o in opts) {
+ q.options[o] = opts[o];
+ }
+ });
+ _queue.push(q);
+ if (_queue.length > 100) {
+ throw 'Too many badges requests in queue.';
+ }
+ icon.start();
+ } else {
+ icon.reset();
+ }
+ } catch(e) {
+ throw 'Error setting badge. Message: ' + e.message;
+ }
+ };
+ if (_ready) {
+ _readyCb();
+ }
+ };
+
+ /**
+ * Set image as icon
+ */
+ var image = function(imageElement) {
+ _readyCb = function() {
+ try {
+ var w = imageElement.width;
+ var h = imageElement.height;
+ var newImg = document.createElement('img');
+ var ratio = (w / _w < h / _h) ? (w / _w) : (h / _h);
+ newImg.setAttribute('src', imageElement.getAttribute('src'));
+ newImg.height = (h / ratio);
+ newImg.width = (w / ratio);
+ _context.clearRect(0, 0, _w, _h);
+ _context.drawImage(newImg, 0, 0, _w, _h);
+ link.setIcon(_canvas);
+ } catch(e) {
+ throw 'Error setting image. Message: ' + e.message;
+ }
+ };
+ if (_ready) {
+ _readyCb();
+ }
+ };
+ /**
+ * Set video as icon
+ */
+ var video = function(videoElement) {
+ _readyCb = function() {
+ try {
+ if (videoElement === 'stop') {
+ _stop = true;
+ icon.reset();
+ _stop = false;
+ return;
+ }
+ //var w = videoElement.width;
+ //var h = videoElement.height;
+ //var ratio = (w / _w < h / _h) ? (w / _w) : (h / _h);
+ videoElement.addEventListener('play', function() {
+ drawVideo(this);
+ }, false);
+
+ } catch(e) {
+ throw 'Error setting video. Message: ' + e.message;
+ }
+ };
+ if (_ready) {
+ _readyCb();
+ }
+ };
+ /**
+ * Set video as icon
+ */
+ var webcam = function(action) {
+ //UR
+ if (!window.URL || !window.URL.createObjectURL) {
+ window.URL = window.URL || {};
+ window.URL.createObjectURL = function(obj) {
+ return obj;
+ };
+ }
+ if (_browser.supported) {
+ var newVideo = false;
+ navigator.getUserMedia = navigator.getUserMedia || navigator.oGetUserMedia || navigator.msGetUserMedia || navigator.mozGetUserMedia || navigator.webkitGetUserMedia;
+ _readyCb = function() {
+ try {
+ if (action === 'stop') {
+ _stop = true;
+ icon.reset();
+ _stop = false;
+ return;
+ }
+ newVideo = document.createElement('video');
+ newVideo.width = _w;
+ newVideo.height = _h;
+ navigator.getUserMedia({
+ video : true,
+ audio : false
+ }, function(stream) {
+ newVideo.src = URL.createObjectURL(stream);
+ newVideo.play();
+ drawVideo(newVideo);
+ }, function() {
+ });
+ } catch(e) {
+ throw 'Error setting webcam. Message: ' + e.message;
+ }
+ };
+ if (_ready) {
+ _readyCb();
+ }
+ }
+
+ };
+
+ /**
+ * Draw video to context and repeat :)
+ */
+ function drawVideo(video) {
+ if (video.paused || video.ended || _stop) {
+ return false;
+ }
+ //nasty hack for FF webcam (Thanks to Julian Ćwirko, kontakt@redsunmedia.pl)
+ try {
+ _context.clearRect(0, 0, _w, _h);
+ _context.drawImage(video, 0, 0, _w, _h);
+ } catch(e) {
+
+ }
+ _drawTimeout = setTimeout(drawVideo, animation.duration, video);
+ link.setIcon(_canvas);
+ }
+
+ var link = {};
+ /**
+ * Get icon from HEAD tag or create a new <link> element
+ */
+ link.getIcon = function() {
+ var elm = false;
+ //get link element
+ var getLink = function() {
+ var link = document.getElementsByTagName('head')[0].getElementsByTagName('link');
+ for (var l = link.length, i = (l - 1); i >= 0; i--) {
+ if ((/(^|\s)icon(\s|$)/i).test(link[i].getAttribute('rel'))) {
+ return link[i];
+ }
+ }
+ return false;
+ };
+ if (_opt.element) {
+ elm = _opt.element;
+ } else if (_opt.elementId) {
+ //if img element identified by elementId
+ elm = document.getElementById(_opt.elementId);
+ elm.setAttribute('href', elm.getAttribute('src'));
+ } else {
+ //if link element
+ elm = getLink();
+ if (elm === false) {
+ elm = document.createElement('link');
+ elm.setAttribute('rel', 'icon');
+ document.getElementsByTagName('head')[0].appendChild(elm);
+ }
+ }
+ elm.setAttribute('type', 'image/png');
+ return elm;
+ };
+ link.setIcon = function(canvas) {
+ var url = canvas.toDataURL('image/png');
+ if (_opt.dataUrl) {
+ //if using custom exporter
+ _opt.dataUrl(url);
+ }
+ if (_opt.element) {
+ _opt.element.setAttribute('src', url);
+ } else if (_opt.elementId) {
+ //if is attached to element (image)
+ document.getElementById(_opt.elementId).setAttribute('src', url);
+ } else {
+ //if is attached to fav icon
+ if (_browser.ff || _browser.opera) {
+ //for FF we need to "recreate" element, atach to dom and remove old <link>
+ //var originalType = _orig.getAttribute('rel');
+ var old = _orig;
+ _orig = document.createElement('link');
+ //_orig.setAttribute('rel', originalType);
+ if (_browser.opera) {
+ _orig.setAttribute('rel', 'icon');
+ }
+ _orig.setAttribute('rel', 'icon');
+ _orig.setAttribute('type', 'image/png');
+ document.getElementsByTagName('head')[0].appendChild(_orig);
+ _orig.setAttribute('href', url);
+ if (old.parentNode) {
+ old.parentNode.removeChild(old);
+ }
+ } else {
+ _orig.setAttribute('href', url);
+ }
+ }
+ };
+
+ //http://stackoverflow.com/questions/5623838/rgb-to-hex-and-hex-to-rgb#answer-5624139
+ //HEX to RGB convertor
+ function hexToRgb(hex) {
+ var shorthandRegex = /^#?([a-f\d])([a-f\d])([a-f\d])$/i;
+ hex = hex.replace(shorthandRegex, function(m, r, g, b) {
+ return r + r + g + g + b + b;
+ });
+ var result = /^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(hex);
+ return result ? {
+ r : parseInt(result[1], 16),
+ g : parseInt(result[2], 16),
+ b : parseInt(result[3], 16)
+ } : false;
+ }
+
+ /**
+ * Merge options
+ */
+ function merge(def, opt) {
+ var mergedOpt = {};
+ var attrname;
+ for (attrname in def) {
+ mergedOpt[attrname] = def[attrname];
+ }
+ for (attrname in opt) {
+ mergedOpt[attrname] = opt[attrname];
+ }
+ return mergedOpt;
+ }
+
+ /**
+ * Cross-browser page visibility shim
+ * http://stackoverflow.com/questions/12536562/detect-whether-a-window-is-visible
+ */
+ function isPageHidden() {
+ return document.hidden || document.msHidden || document.webkitHidden || document.mozHidden;
+ }
+
+ /**
+ * @namespace animation
+ */
+ var animation = {};
+ /**
+ * Animation "frame" duration
+ */
+ animation.duration = 40;
+ /**
+ * Animation types (none,fade,pop,slide)
+ */
+ animation.types = {};
+ animation.types.fade = [{
+ x : 0.4,
+ y : 0.4,
+ w : 0.6,
+ h : 0.6,
+ o : 0.0
+ }, {
+ x : 0.4,
+ y : 0.4,
+ w : 0.6,
+ h : 0.6,
+ o : 0.1
+ }, {
+ x : 0.4,
+ y : 0.4,
+ w : 0.6,
+ h : 0.6,
+ o : 0.2
+ }, {
+ x : 0.4,
+ y : 0.4,
+ w : 0.6,
+ h : 0.6,
+ o : 0.3
+ }, {
+ x : 0.4,
+ y : 0.4,
+ w : 0.6,
+ h : 0.6,
+ o : 0.4
+ }, {
+ x : 0.4,
+ y : 0.4,
+ w : 0.6,
+ h : 0.6,
+ o : 0.5
+ }, {
+ x : 0.4,
+ y : 0.4,
+ w : 0.6,
+ h : 0.6,
+ o : 0.6
+ }, {
+ x : 0.4,
+ y : 0.4,
+ w : 0.6,
+ h : 0.6,
+ o : 0.7
+ }, {
+ x : 0.4,
+ y : 0.4,
+ w : 0.6,
+ h : 0.6,
+ o : 0.8
+ }, {
+ x : 0.4,
+ y : 0.4,
+ w : 0.6,
+ h : 0.6,
+ o : 0.9
+ }, {
+ x : 0.4,
+ y : 0.4,
+ w : 0.6,
+ h : 0.6,
+ o : 1.0
+ }];
+ animation.types.none = [{
+ x : 0.4,
+ y : 0.4,
+ w : 0.6,
+ h : 0.6,
+ o : 1
+ }];
+ animation.types.pop = [{
+ x : 1,
+ y : 1,
+ w : 0,
+ h : 0,
+ o : 1
+ }, {
+ x : 0.9,
+ y : 0.9,
+ w : 0.1,
+ h : 0.1,
+ o : 1
+ }, {
+ x : 0.8,
+ y : 0.8,
+ w : 0.2,
+ h : 0.2,
+ o : 1
+ }, {
+ x : 0.7,
+ y : 0.7,
+ w : 0.3,
+ h : 0.3,
+ o : 1
+ }, {
+ x : 0.6,
+ y : 0.6,
+ w : 0.4,
+ h : 0.4,
+ o : 1
+ }, {
+ x : 0.5,
+ y : 0.5,
+ w : 0.5,
+ h : 0.5,
+ o : 1
+ }, {
+ x : 0.4,
+ y : 0.4,
+ w : 0.6,
+ h : 0.6,
+ o : 1
+ }];
+ animation.types.popFade = [{
+ x : 0.75,
+ y : 0.75,
+ w : 0,
+ h : 0,
+ o : 0
+ }, {
+ x : 0.65,
+ y : 0.65,
+ w : 0.1,
+ h : 0.1,
+ o : 0.2
+ }, {
+ x : 0.6,
+ y : 0.6,
+ w : 0.2,
+ h : 0.2,
+ o : 0.4
+ }, {
+ x : 0.55,
+ y : 0.55,
+ w : 0.3,
+ h : 0.3,
+ o : 0.6
+ }, {
+ x : 0.50,
+ y : 0.50,
+ w : 0.4,
+ h : 0.4,
+ o : 0.8
+ }, {
+ x : 0.45,
+ y : 0.45,
+ w : 0.5,
+ h : 0.5,
+ o : 0.9
+ }, {
+ x : 0.4,
+ y : 0.4,
+ w : 0.6,
+ h : 0.6,
+ o : 1
+ }];
+ animation.types.slide = [{
+ x : 0.4,
+ y : 1,
+ w : 0.6,
+ h : 0.6,
+ o : 1
+ }, {
+ x : 0.4,
+ y : 0.9,
+ w : 0.6,
+ h : 0.6,
+ o : 1
+ }, {
+ x : 0.4,
+ y : 0.9,
+ w : 0.6,
+ h : 0.6,
+ o : 1
+ }, {
+ x : 0.4,
+ y : 0.8,
+ w : 0.6,
+ h : 0.6,
+ o : 1
+ }, {
+ x : 0.4,
+ y : 0.7,
+ w : 0.6,
+ h : 0.6,
+ o : 1
+ }, {
+ x : 0.4,
+ y : 0.6,
+ w : 0.6,
+ h : 0.6,
+ o : 1
+ }, {
+ x : 0.4,
+ y : 0.5,
+ w : 0.6,
+ h : 0.6,
+ o : 1
+ }, {
+ x : 0.4,
+ y : 0.4,
+ w : 0.6,
+ h : 0.6,
+ o : 1
+ }];
+ /**
+ * Run animation
+ * @param {Object} opt Animation options
+ * @param {Object} cb Callabak after all steps are done
+ * @param {Object} revert Reverse order? true|false
+ * @param {Object} step Optional step number (frame bumber)
+ */
+ animation.run = function(opt, cb, revert, step) {
+ var animationType = animation.types[isPageHidden() ? 'none' : _opt.animation];
+ if (revert === true) {
+ step = ( typeof step !== 'undefined') ? step : animationType.length - 1;
+ } else {
+ step = ( typeof step !== 'undefined') ? step : 0;
+ }
+ cb = (cb) ? cb : function() {
+ };
+ if ((step < animationType.length) && (step >= 0)) {
+ type[_opt.type](merge(opt, animationType[step]));
+ _animTimeout = setTimeout(function() {
+ if (revert) {
+ step = step - 1;
+ } else {
+ step = step + 1;
+ }
+ animation.run(opt, cb, revert, step);
+ }, animation.duration);
+
+ link.setIcon(_canvas);
+ } else {
+ cb();
+ return;
+ }
+ };
+ //auto init
+ init();
+ return {
+ badge : badge,
+ video : video,
+ image : image,
+ webcam : webcam,
+ reset : icon.reset,
+ browser : {
+ supported : _browser.supported
+ }
+ };
+ });
+
+ // AMD / RequireJS
+ if ( typeof define !== 'undefined' && define.amd) {
+ define([], function() {
+ return Favico;
+ });
+ }
+ // CommonJS
+ else if ( typeof module !== 'undefined' && module.exports) {
+ module.exports = Favico;
+ }
+ // included directly via <script> tag
+ else {
+ this.Favico = Favico;
+ }
+
+})();
+
diff --git a/build/js/jsxc/lib/jsxc.dep.js b/build/js/jsxc/lib/jsxc.dep.js
index 50d0c42..7632f8e 100644
--- a/build/js/jsxc/lib/jsxc.dep.js
+++ b/build/js/jsxc/lib/jsxc.dep.js
@@ -1,5 +1,5 @@
/*!
- * jsxc v2.0.1 - 2015-05-23
+ * jsxc v2.1.0-beta1 - 2015-07-21
*
* This file concatenates all dependencies of jsxc.
*
@@ -5522,7 +5522,7 @@ Strophe.addConnectionPlugin('muc', {
}).c("query", {
xmlns: Strophe.NS.MUC_OWNER
});
- if (config instanceof Form) {
+ if (Strophe.x && config instanceof Strophe.x.Form) {
config.type = "submit";
iq.cnode(config.toXML());
} else {
@@ -6188,6 +6188,7 @@ Occupant = (function() {
})();
+
/*!
* Source: lib/strophe.disco.js, license: MIT, url: https://github.com/strophe/strophejs-plugins
*/
@@ -6771,2016 +6772,12775 @@ Strophe.addConnectionPlugin('vcard', {
});
/*!
- * Source: lib/strophe.jingle/strophe.jingle.js, license: MIT, url: https://github.com/ESTOS/strophe.jingle
+ * Source: lib/strophe.bookmarks/index.js, license: MIT, url: https://github.com/strophe/strophejs-plugins/tree/master/bookmarks
*/
-/* jshint -W117 */
-(function($){
-Strophe.addConnectionPlugin('jingle', {
- connection: null,
- sessions: {},
- jid2session: {},
- ice_config: {iceServers: []},
- pc_constraints: {},
- media_constraints: {
- mandatory: {
- 'OfferToReceiveAudio': true,
- 'OfferToReceiveVideo': true
- }
- // MozDontOfferDataChannel: true when this is firefox
+Strophe.addConnectionPlugin('bookmarks', {
+ init : function(connection) {
+ this.connection = connection;
+ Strophe.addNamespace('PRIVATE', 'jabber:iq:private');
+ Strophe.addNamespace('BOOKMARKS', 'storage:bookmarks');
+ Strophe.addNamespace('PRIVACY', 'jabber:iq:privacy');
+ Strophe.addNamespace('DELAY', 'jabber:x:delay');
+ Strophe.addNamespace('PUBSUB', 'http://jabber.org/protocol/pubsub');
+
+ },
+ /**
+ * Create private bookmark node.
+ *
+ * @param {function} [success] - Callback after success
+ * @param {function} [error] - Callback after error
+ */
+ createBookmarksNode : function(success, error) {
+ // We do this instead of using publish-options because this is not
+ // mandatory to implement according to XEP-0060
+ this.connection.sendIQ($iq({
+ type : 'set'
+ }).c('pubsub', {
+ xmlns : Strophe.NS.PUBSUB
+ }).c('create', {
+ node : 'storage:bookmarks'
+ }).up().c('configure').c('x', {
+ xmlns : 'jabber:x:data',
+ type : 'submit'
+ }).c('field', {
+ 'var' : 'FORM_TYPE',
+ type : 'hidden'
+ }).c('value').t('http://jabber.org/protocol/pubsub#node_config').up()
+ .up().c('field', {
+ 'var' : 'pubsub#persist_items'
+ }).c('value').t('1').up().up().c('field', {
+ 'var' : 'pubsub#access_model'
+ }).c('value').t('whitelist'), success, error);
+
+ return true;
+ },
+ /**
+ * Add bookmark to storage.
+ *
+ * @param {string} roomJid - The JabberID of the chat roomJid
+ * @param {string} [alias] - A friendly name for the bookmark
+ * @param {string} [nick] - The users's preferred roomnick for the chatroom
+ * @param {boolean} [autojoin=false] - Whether the client should automatically join
+ * the conference room on login.
+ * @param {function} [success] - Callback after success
+ * @param {function} [error] - Callback after error
+ */
+ add : function(roomJid, alias, nick, autojoin, success, error) {
+ var conferenceAttr = {
+ jid: roomJid,
+ autojoin: autojoin || false
+ };
+
+ if (alias) {
+ conferenceAttr.name = alias;
+ }
+
+ var stanza = $iq({
+ type : 'set'
+ }).c('pubsub', {
+ xmlns : Strophe.NS.PUBSUB
+ }).c('publish', {
+ node : Strophe.NS.BOOKMARKS
+ }).c('item', {
+ id : roomJid
+ }).c('storage', {
+ xmlns : Strophe.NS.BOOKMARKS
+ }).c('conference', conferenceAttr);
+
+ if (nick) {
+ stanza.c('nick').t(nick);
+ }
+
+ this.connection.sendIQ(stanza, success, error);
+ },
+ /**
+ * Retrieve all stored bookmarks.
+ *
+ * @param {function} [success] - Callback after success
+ * @param {function} [error] - Callback after error
+ */
+ get: function(success, error) {
+ this.connection.sendIQ($iq({
+ type : 'get'
+ }).c('pubsub', {
+ xmlns : Strophe.NS.PUBSUB
+ }).c('items', {
+ node : Strophe.NS.BOOKMARKS
+ }), success, error);
+ },
+ /**
+ * Delete the given entry for roomJid.
+ *
+ * @param {string} roomJid - The JabberID of the chat roomJid you want to remove
+ * @param {function} [success] - Callback after success
+ * @param {function} [error] - Callback after error
+ * @param {boolean} [notify=false] - True: notify all subscribers
+ */
+ delete: function(roomJid, success, error, notify) {
+ this.connection.sendIQ($iq({
+ type : 'set'
+ }).c('pubsub', {
+ xmlns : Strophe.NS.PUBSUB
+ }).c('retract', {
+ node : Strophe.NS.BOOKMARKS,
+ notify: notify || false
+ }).c('item', {
+ id: roomJid
+ }), success, error);
+ }
+
+});
+
+
+/*!
+ * Source: lib/strophe.x/index.js, license: MIT, url: https://github.com/strophe/strophejs-plugins/tree/master/dataforms
+ */
+// Generated by CoffeeScript 1.8.0
+(function() {
+ var $field, $form, $item, $opt, Field, Form, Item, Option, helper,
+ __slice = [].slice,
+ __bind = function(fn, me){ return function(){ return fn.apply(me, arguments); }; },
+ __indexOf = [].indexOf || function(item) { for (var i = 0, l = this.length; i < l; i++) { if (i in this && this[i] === item) return i; } return -1; };
+
+ helper = {
+ fill: function(src, target, klass) {
+ var f, _i, _len, _results;
+ _results = [];
+ for (_i = 0, _len = src.length; _i < _len; _i++) {
+ f = src[_i];
+ _results.push(target.push(f instanceof klass ? f : new klass(f)));
+ }
+ return _results;
},
- localStream: null,
-
- init: function (conn) {
- this.connection = conn;
- if (this.connection.disco) {
- // http://xmpp.org/extensions/xep-0167.html#support
- // http://xmpp.org/extensions/xep-0176.html#support
- this.connection.disco.addFeature('urn:xmpp:jingle:1');
- this.connection.disco.addFeature('urn:xmpp:jingle:apps:rtp:1');
- this.connection.disco.addFeature('urn:xmpp:jingle:transports:ice-udp:1');
- this.connection.disco.addFeature('urn:xmpp:jingle:apps:rtp:audio');
- this.connection.disco.addFeature('urn:xmpp:jingle:apps:rtp:video');
-
-
- // this is dealt with by SDP O/A so we don't need to annouce this
- //this.connection.disco.addFeature('urn:xmpp:jingle:apps:rtp:rtcp-fb:0'); // XEP-0293
- //this.connection.disco.addFeature('urn:xmpp:jingle:apps:rtp:rtp-hdrext:0'); // XEP-0294
- this.connection.disco.addFeature('urn:ietf:rfc:5761'); // rtcp-mux
- //this.connection.disco.addFeature('urn:ietf:rfc:5888'); // a=group, e.g. bundle
- //this.connection.disco.addFeature('urn:ietf:rfc:5576'); // a=ssrc
- }
- this.connection.addHandler(this.onJingle.bind(this), 'urn:xmpp:jingle:1', 'iq', 'set', null, null);
+ createHtmlFieldCouple: function(f) {
+ var div, id;
+ div = $("<div>");
+ id = "Strophe.x.Field-" + f.type + "-" + f["var"];
+ div.append("<label for='" + id + "'>" + (f.label || '') + "</label>").append($(f.toHTML()).attr("id", id)).append("<br />");
+ return div.children();
},
- onJingle: function (iq) {
- var sid = $(iq).find('jingle').attr('sid');
- var action = $(iq).find('jingle').attr('action');
- // send ack first
- var ack = $iq({type: 'result',
- to: iq.getAttribute('from'),
- id: iq.getAttribute('id')
- });
- var sess = this.sessions[sid];
- if ('session-initiate' != action) {
- if (sess === null) {
- ack.type = 'error';
- ack.c('error', {type: 'cancel'})
- .c('item-not-found', {xmlns: 'urn:ietf:params:xml:ns:xmpp-stanzas'}).up()
- .c('unknown-session', {xmlns: 'urn:xmpp:jingle:errors:1'});
- this.connection.send(ack);
- return true;
- }
- // compare from to sess.peerjid (bare jid comparison for later compat with message-mode)
- // local jid is not checked
- if (Strophe.getBareJidFromJid(iq.getAttribute('from')) != Strophe.getBareJidFromJid(sess.peerjid)) {
- console.warn('jid mismatch for session id', sid, iq.getAttribute('from'), sess.peerjid);
- ack.type = 'error';
- ack.c('error', {type: 'cancel'})
- .c('item-not-found', {xmlns: 'urn:ietf:params:xml:ns:xmpp-stanzas'}).up()
- .c('unknown-session', {xmlns: 'urn:xmpp:jingle:errors:1'});
- this.connection.send(ack);
- return true;
+ getHtmlFields: function(html) {
+ html = $(html);
+ return __slice.call(html.find("input")).concat(__slice.call(html.find("select")), __slice.call(html.find("textarea")));
+ }
+ };
+
+ Form = (function() {
+ Form._types = ["form", "submit", "cancel", "result"];
+
+ function Form(opt) {
+ this.toHTML = __bind(this.toHTML, this);
+ this.toJSON = __bind(this.toJSON, this);
+ this.toXML = __bind(this.toXML, this);
+ var f, i, _i, _j, _len, _len1, _ref, _ref1, _ref2, _ref3;
+ this.fields = [];
+ this.items = [];
+ this.reported = [];
+ if (opt) {
+ if (_ref = opt.type, __indexOf.call(Form._types, _ref) >= 0) {
+ this.type = opt.type;
+ }
+ this.title = opt.title;
+ this.instructions = opt.instructions;
+ helper.fill = function(src, target, klass) {
+ var f, _i, _len, _results;
+ _results = [];
+ for (_i = 0, _len = src.length; _i < _len; _i++) {
+ f = src[_i];
+ _results.push(target.push(f instanceof klass ? f : new klass(f)));
+ }
+ return _results;
+ };
+ if (opt.fields) {
+ if (opt.fields) {
+ helper.fill(opt.fields, this.fields, Field);
+ }
+ } else if (opt.items) {
+ if (opt.items) {
+ helper.fill(opt.items, this.items, Item);
+ }
+ _ref1 = this.items;
+ for (_i = 0, _len = _ref1.length; _i < _len; _i++) {
+ i = _ref1[_i];
+ _ref2 = i.fields;
+ for (_j = 0, _len1 = _ref2.length; _j < _len1; _j++) {
+ f = _ref2[_j];
+ if (!(_ref3 = f["var"], __indexOf.call(this.reported, _ref3) >= 0)) {
+ this.reported.push(f["var"]);
+ }
}
- } else if (sess !== undefined) {
- // existing session with same session id
- // this might be out-of-order if the sess.peerjid is the same as from
- ack.type = 'error';
- ack.c('error', {type: 'cancel'})
- .c('service-unavailable', {xmlns: 'urn:ietf:params:xml:ns:xmpp-stanzas'}).up();
- console.warn('duplicate session id', sid);
- this.connection.send(ack);
- return true;
+ }
}
- // FIXME: check for a defined action
- this.connection.send(ack);
- // see http://xmpp.org/extensions/xep-0166.html#concepts-session
- switch (action) {
- case 'session-initiate':
- sess = new JingleSession($(iq).attr('to'), $(iq).find('jingle').attr('sid'), this.connection);
- // configure session
- if (this.localStream) {
- sess.localStreams.push(this.localStream);
+ }
+ }
+
+ Form.prototype.type = "form";
+
+ Form.prototype.title = null;
+
+ Form.prototype.instructions = null;
+
+ Form.prototype.toXML = function() {
+ var f, i, r, xml, _i, _j, _k, _len, _len1, _len2, _ref, _ref1, _ref2;
+ xml = $build("x", {
+ xmlns: "jabber:x:data",
+ type: this.type
+ });
+ if (this.title) {
+ xml.c("title").t(this.title.toString()).up();
+ }
+ if (this.instructions) {
+ xml.c("instructions").t(this.instructions.toString()).up();
+ }
+ if (this.fields.length > 0) {
+ _ref = this.fields;
+ for (_i = 0, _len = _ref.length; _i < _len; _i++) {
+ f = _ref[_i];
+ xml.cnode(f.toXML()).up();
+ }
+ } else if (this.items.length > 0) {
+ xml.c("reported");
+ _ref1 = this.reported;
+ for (_j = 0, _len1 = _ref1.length; _j < _len1; _j++) {
+ r = _ref1[_j];
+ xml.c("field", {
+ "var": r
+ }).up();
+ }
+ xml.up();
+ _ref2 = this.items;
+ for (_k = 0, _len2 = _ref2.length; _k < _len2; _k++) {
+ i = _ref2[_k];
+ xml.cnode(i.toXML()).up();
+ }
+ }
+ return xml.tree();
+ };
+
+ Form.prototype.toJSON = function() {
+ var f, i, json, _i, _j, _len, _len1, _ref, _ref1;
+ json = {
+ type: this.type
+ };
+ if (this.title) {
+ json.title = this.title;
+ }
+ if (this.instructions) {
+ json.instructions = this.instructions;
+ }
+ if (this.fields.length > 0) {
+ json.fields = [];
+ _ref = this.fields;
+ for (_i = 0, _len = _ref.length; _i < _len; _i++) {
+ f = _ref[_i];
+ json.fields.push(f.toJSON());
+ }
+ } else if (this.items.length > 0) {
+ json.items = [];
+ json.reported = this.reported;
+ _ref1 = this.items;
+ for (_j = 0, _len1 = _ref1.length; _j < _len1; _j++) {
+ i = _ref1[_j];
+ json.items.push(i.toJSON());
+ }
+ }
+ return json;
+ };
+
+ Form.prototype.toHTML = function() {
+ var f, form, i, _i, _j, _len, _len1, _ref, _ref1;
+ form = $("<form data-type='" + this.type + "'>");
+ if (this.title) {
+ form.append("<h1>" + this.title + "</h1>");
+ }
+ if (this.instructions) {
+ form.append("<p>" + this.instructions + "</p>");
+ }
+ if (this.fields.length > 0) {
+ _ref = this.fields;
+ for (_i = 0, _len = _ref.length; _i < _len; _i++) {
+ f = _ref[_i];
+ (helper.createHtmlFieldCouple(f)).appendTo(form);
+ }
+ } else if (this.items.length > 0) {
+ _ref1 = this.items;
+ for (_j = 0, _len1 = _ref1.length; _j < _len1; _j++) {
+ i = _ref1[_j];
+ ($(i.toHTML())).appendTo(form);
+ }
+ }
+ return form[0];
+ };
+
+ Form.fromXML = function(xml) {
+ var f, fields, i, instr, items, j, r, reported, title;
+ xml = $(xml);
+ f = new Form({
+ type: xml.attr("type")
+ });
+ title = xml.find("title");
+ if (title.length === 1) {
+ f.title = title.text();
+ }
+ instr = xml.find("instructions");
+ if (instr.length === 1) {
+ f.instructions = instr.text();
+ }
+ fields = xml.find("field");
+ items = xml.find("item");
+ if (items.length > 0) {
+ f.items = (function() {
+ var _i, _len, _results;
+ _results = [];
+ for (_i = 0, _len = items.length; _i < _len; _i++) {
+ i = items[_i];
+ _results.push(Item.fromXML(i));
+ }
+ return _results;
+ })();
+ } else if (fields.length > 0) {
+ f.fields = (function() {
+ var _i, _len, _results;
+ _results = [];
+ for (_i = 0, _len = fields.length; _i < _len; _i++) {
+ j = fields[_i];
+ _results.push(Field.fromXML(j));
+ }
+ return _results;
+ })();
+ }
+ reported = xml.find("reported");
+ if (reported.length === 1) {
+ fields = reported.find("field");
+ f.reported = (function() {
+ var _i, _len, _results;
+ _results = [];
+ for (_i = 0, _len = fields.length; _i < _len; _i++) {
+ r = fields[_i];
+ _results.push(($(r)).attr("var"));
+ }
+ return _results;
+ })();
+ }
+ return f;
+ };
+
+ Form.fromHTML = function(html) {
+ var f, field, fields, i, instructions, item, items, j, title, _i, _j, _len, _len1, _ref, _ref1, _ref2;
+ html = $(html);
+ f = new Form({
+ type: html.attr("data-type")
+ });
+ title = html.find("h1").text();
+ if (title) {
+ f.title = title;
+ }
+ instructions = html.find("p").text();
+ if (instructions) {
+ f.instructions = instructions;
+ }
+ items = html.find("fieldset");
+ fields = helper.getHtmlFields(html);
+ if (items.length > 0) {
+ f.items = (function() {
+ var _i, _len, _results;
+ _results = [];
+ for (_i = 0, _len = items.length; _i < _len; _i++) {
+ i = items[_i];
+ _results.push(Item.fromHTML(i));
+ }
+ return _results;
+ })();
+ _ref = f.items;
+ for (_i = 0, _len = _ref.length; _i < _len; _i++) {
+ item = _ref[_i];
+ _ref1 = item.fields;
+ for (_j = 0, _len1 = _ref1.length; _j < _len1; _j++) {
+ field = _ref1[_j];
+ if (!(_ref2 = field["var"], __indexOf.call(f.reported, _ref2) >= 0)) {
+ f.reported.push(field["var"]);
}
- sess.media_constraints = this.media_constraints;
- sess.pc_constraints = this.pc_constraints;
- sess.ice_config = this.ice_config;
+ }
+ }
+ } else if (fields.length > 0) {
+ f.fields = (function() {
+ var _k, _len2, _results;
+ _results = [];
+ for (_k = 0, _len2 = fields.length; _k < _len2; _k++) {
+ j = fields[_k];
+ _results.push(Field.fromHTML(j));
+ }
+ return _results;
+ })();
+ }
+ return f;
+ };
+
+ return Form;
+
+ })();
+
+ Field = (function() {
+ Field._types = ["boolean", "fixed", "hidden", "jid-multi", "jid-single", "list-multi", "list-single", "text-multi", "text-private", "text-single"];
+
+ Field._multiTypes = ["list-multi", "jid-multi", "text-multi", "hidden"];
+
+ function Field(opt) {
+ this.toHTML = __bind(this.toHTML, this);
+ this.toXML = __bind(this.toXML, this);
+ this.toJSON = __bind(this.toJSON, this);
+ this.addOptions = __bind(this.addOptions, this);
+ this.addOption = __bind(this.addOption, this);
+ this.addValues = __bind(this.addValues, this);
+ this.addValue = __bind(this.addValue, this);
+ var _ref, _ref1;
+ this.options = [];
+ this.values = [];
+ if (opt) {
+ if (_ref = opt.type, __indexOf.call(Field._types, _ref) >= 0) {
+ this.type = opt.type.toString();
+ }
+ if (opt.desc) {
+ this.desc = opt.desc.toString();
+ }
+ if (opt.label) {
+ this.label = opt.label.toString();
+ }
+ this["var"] = ((_ref1 = opt["var"]) != null ? _ref1.toString() : void 0) || "_no_var_was_defined_";
+ this.required = opt.required === true || opt.required === "true";
+ if (opt.options) {
+ this.addOptions(opt.options);
+ }
+ if (opt.value) {
+ opt.values = [opt.value];
+ }
+ if (opt.values) {
+ this.addValues(opt.values);
+ }
+ }
+ }
- sess.initiate($(iq).attr('from'), false);
- sess.setRemoteDescription($(iq).find('>jingle'), 'offer');
+ Field.prototype.type = "text-single";
- this.sessions[sess.sid] = sess;
- this.jid2session[sess.peerjid] = sess;
+ Field.prototype.desc = null;
- // the callback should either
- // .sendAnswer and .accept
- // or .sendTerminate -- not necessarily synchronus
- $(document).trigger('callincoming.jingle', [sess.sid]);
- break;
- case 'session-accept':
- sess.setRemoteDescription($(iq).find('>jingle'), 'answer');
- sess.accept();
- $(document).trigger('callaccepted.jingle', [sess.sid]);
- break;
- case 'session-terminate':
- sess.terminate();
- this.terminate(sess.sid);
- if ($(iq).find('>jingle>reason').length) {
- $(document).trigger('callterminated.jingle', [
- sess.sid,
- $(iq).find('>jingle>reason>:first')[0].tagName,
- $(iq).find('>jingle>reason>text').text()
- ]);
- } else {
- $(document).trigger('callterminated.jingle', [sess.sid]);
+ Field.prototype.label = null;
+
+ Field.prototype["var"] = "_no_var_was_defined_";
+
+ Field.prototype.required = false;
+
+ Field.prototype.addValue = function(val) {
+ return this.addValues([val]);
+ };
+
+ Field.prototype.addValues = function(vals) {
+ var multi, v, _ref;
+ multi = (_ref = this.type, __indexOf.call(Field._multiTypes, _ref) >= 0);
+ if (multi || (!multi && vals.length === 1)) {
+ this.values = __slice.call(this.values).concat(__slice.call((function() {
+ var _i, _len, _results;
+ _results = [];
+ for (_i = 0, _len = vals.length; _i < _len; _i++) {
+ v = vals[_i];
+ _results.push(v.toString());
}
- break;
- case 'transport-info':
- sess.addIceCandidate($(iq).find('>jingle>content'));
- break;
- case 'session-info':
- var affected;
- if ($(iq).find('>jingle>ringing[xmlns="urn:xmpp:jingle:apps:rtp:info:1"]').length) {
- $(document).trigger('ringing.jingle', [sess.sid]);
- } else if ($(iq).find('>jingle>mute[xmlns="urn:xmpp:jingle:apps:rtp:info:1"]').length) {
- affected = $(iq).find('>jingle>mute[xmlns="urn:xmpp:jingle:apps:rtp:info:1"]').attr('name');
- $(document).trigger('mute.jingle', [sess.sid, affected]);
- } else if ($(iq).find('>jingle>unmute[xmlns="urn:xmpp:jingle:apps:rtp:info:1"]').length) {
- affected = $(iq).find('>jingle>unmute[xmlns="urn:xmpp:jingle:apps:rtp:info:1"]').attr('name');
- $(document).trigger('unmute.jingle', [sess.sid, affected]);
+ return _results;
+ })()));
+ }
+ return this;
+ };
+
+ Field.prototype.addOption = function(opt) {
+ return this.addOptions([opt]);
+ };
+
+ Field.prototype.addOptions = function(opts) {
+ var o;
+ if (this.type === "list-single" || this.type === "list-multi") {
+ if (typeof opts[0] !== "object") {
+ opts = (function() {
+ var _i, _len, _results;
+ _results = [];
+ for (_i = 0, _len = opts.length; _i < _len; _i++) {
+ o = opts[_i];
+ _results.push(new Option({
+ value: o.toString()
+ }));
}
- break;
- case 'addsource': // FIXME: proprietary
- sess.addSource($(iq).find('>jingle>content'));
- break;
- case 'removesource': // FIXME: proprietary
- sess.removeSource($(iq).find('>jingle>content'));
- break;
- default:
- console.warn('jingle action not implemented', action);
- break;
+ return _results;
+ })();
}
- return true;
- },
- initiate: function (peerjid, myjid) { // initiate a new jinglesession to peerjid
- var sess = new JingleSession(myjid || this.connection.jid,
- Math.random().toString(36).substr(2, 12), // random string
- this.connection);
- // configure session
- if (this.localStream) {
- sess.localStreams.push(this.localStream);
- }
- sess.media_constraints = this.media_constraints;
- sess.pc_constraints = this.pc_constraints;
- sess.ice_config = this.ice_config;
-
- sess.initiate(peerjid, true);
- this.sessions[sess.sid] = sess;
- this.jid2session[sess.peerjid] = sess;
- sess.sendOffer();
- return sess;
- },
- terminate: function (sid, reason, text) { // terminate by sessionid (or all sessions)
- if (sid === null || sid === undefined) {
- for (sid in this.sessions) {
- if (this.sessions[sid].state != 'ended') {
- this.sessions[sid].sendTerminate(reason || (!this.sessions[sid].active()) ? 'cancel' : null, text);
- this.sessions[sid].terminate();
+ helper.fill(opts, this.options, Option);
+ }
+ return this;
+ };
+
+ Field.prototype.toJSON = function() {
+ var json, o, _i, _len, _ref;
+ json = {
+ type: this.type,
+ "var": this["var"],
+ required: this.required
+ };
+ if (this.desc) {
+ json.desc = this.desc;
+ }
+ if (this.label) {
+ json.label = this.label;
+ }
+ if (this.values) {
+ json.values = this.values;
+ }
+ if (this.options) {
+ json.options = [];
+ _ref = this.options;
+ for (_i = 0, _len = _ref.length; _i < _len; _i++) {
+ o = _ref[_i];
+ json.options.push(o.toJSON());
+ }
+ }
+ return json;
+ };
+
+ Field.prototype.toXML = function() {
+ var attrs, o, v, xml, _i, _j, _len, _len1, _ref, _ref1;
+ attrs = {
+ type: this.type,
+ "var": this["var"]
+ };
+ if (this.label) {
+ attrs.label = this.label;
+ }
+ xml = $build("field", attrs);
+ if (this.desc) {
+ xml.c("desc").t(this.desc).up();
+ }
+ if (this.required) {
+ xml.c("required").up();
+ }
+ if (this.values) {
+ _ref = this.values;
+ for (_i = 0, _len = _ref.length; _i < _len; _i++) {
+ v = _ref[_i];
+ xml.c("value").t(v.toString()).up();
+ }
+ }
+ if (this.options) {
+ _ref1 = this.options;
+ for (_j = 0, _len1 = _ref1.length; _j < _len1; _j++) {
+ o = _ref1[_j];
+ xml.cnode(o.toXML()).up();
+ }
+ }
+ return xml.tree();
+ };
+
+ Field.prototype.toHTML = function() {
+ var el, k, line, o, opt, txt, val, _i, _j, _len, _len1, _ref, _ref1, _ref2;
+ switch (this.type.toLowerCase()) {
+ case 'list-single':
+ case 'list-multi':
+ el = $("<select>");
+ if (this.type === 'list-multi') {
+ el.attr('multiple', 'multiple');
+ }
+ if (this.options.length > 0) {
+ _ref = this.options;
+ for (_i = 0, _len = _ref.length; _i < _len; _i++) {
+ opt = _ref[_i];
+ if (!(opt)) {
+ continue;
+ }
+ o = $(opt.toHTML());
+ _ref1 = this.values;
+ for (_j = 0, _len1 = _ref1.length; _j < _len1; _j++) {
+ k = _ref1[_j];
+ if (k.toString() === opt.value.toString()) {
+ o.attr('selected', 'selected');
}
- delete this.jid2session[this.sessions[sid].peerjid];
- delete this.sessions[sid];
+ }
+ o.appendTo(el);
}
- } else if (this.sessions.hasOwnProperty(sid)) {
- if (this.sessions[sid].state != 'ended') {
- this.sessions[sid].sendTerminate(reason || (!this.sessions[sid].active()) ? 'cancel' : null, text);
- this.sessions[sid].terminate();
+ }
+ break;
+ case 'text-multi':
+ case 'jid-multi':
+ el = $("<textarea>");
+ txt = ((function() {
+ var _k, _len2, _ref2, _results;
+ _ref2 = this.values;
+ _results = [];
+ for (_k = 0, _len2 = _ref2.length; _k < _len2; _k++) {
+ line = _ref2[_k];
+ _results.push(line);
}
- delete this.jid2session[this.sessions[sid].peerjid];
- delete this.sessions[sid];
- }
- },
- terminateByJid: function (jid) {
- if (this.jid2session.hasOwnProperty(jid)) {
- var sess = this.jid2session[jid];
- if (sess) {
- sess.terminate();
- delete this.sessions[sess.sid];
- delete this.jid2session[jid];
- $(document).trigger('callterminated.jingle', [sess.sid, 'gone']);
+ return _results;
+ }).call(this)).join('\n');
+ if (txt) {
+ el.text(txt);
+ }
+ break;
+ case 'text-single':
+ case 'boolean':
+ case 'text-private':
+ case 'hidden':
+ case 'fixed':
+ case 'jid-single':
+ el = $("<input>");
+ if (this.values) {
+ el.val(this.values[0]);
+ }
+ switch (this.type.toLowerCase()) {
+ case 'text-single':
+ el.attr('type', 'text');
+ el.attr('placeholder', this.desc);
+ break;
+ case 'boolean':
+ el.attr('type', 'checkbox');
+ val = (_ref2 = this.values[0]) != null ? typeof _ref2.toString === "function" ? _ref2.toString() : void 0 : void 0;
+ if (val && (val === "true" || val === "1")) {
+ el.attr('checked', 'checked');
+ }
+ break;
+ case 'text-private':
+ el.attr('type', 'password');
+ break;
+ case 'hidden':
+ el.attr('type', 'hidden');
+ break;
+ case 'fixed':
+ el.attr('type', 'text').attr('readonly', 'readonly');
+ break;
+ case 'jid-single':
+ el.attr('type', 'email');
+ }
+ break;
+ default:
+ el = $("<input type='text'>");
+ }
+ el.attr('name', this["var"]);
+ if (this.required) {
+ el.attr('required', this.required);
+ }
+ return el[0];
+ };
+
+ Field.fromXML = function(xml) {
+ var o, v;
+ xml = $(xml);
+ return new Field({
+ type: xml.attr("type"),
+ "var": xml.attr("var"),
+ label: xml.attr("label"),
+ desc: xml.find("desc").text(),
+ required: xml.find("required").length === 1,
+ values: (function() {
+ var _i, _len, _ref, _results;
+ _ref = xml.find(">value");
+ _results = [];
+ for (_i = 0, _len = _ref.length; _i < _len; _i++) {
+ v = _ref[_i];
+ _results.push(($(v)).text());
+ }
+ return _results;
+ })(),
+ options: (function() {
+ var _i, _len, _ref, _results;
+ _ref = xml.find("option");
+ _results = [];
+ for (_i = 0, _len = _ref.length; _i < _len; _i++) {
+ o = _ref[_i];
+ _results.push(Option.fromXML(o));
+ }
+ return _results;
+ })()
+ });
+ };
+
+ Field._htmlElementToFieldType = function(el) {
+ var r, type;
+ el = $(el);
+ switch (el[0].nodeName.toLowerCase()) {
+ case "textarea":
+ type = "text-multi";
+ break;
+ case "select":
+ if (el.attr("multiple") === "multiple") {
+ type = "list-multi";
+ } else {
+ type = "list-single";
+ }
+ break;
+ case "input":
+ switch (el.attr("type")) {
+ case "checkbox":
+ type = "boolean";
+ break;
+ case "email":
+ type = "jid-single";
+ break;
+ case "hidden":
+ type = "hidden";
+ break;
+ case "password":
+ type = "text-private";
+ break;
+ case "text":
+ r = el.attr("readonly") === "readonly";
+ if (r) {
+ type = "fixed";
+ } else {
+ type = "text-single";
+ }
+ }
+ }
+ return type;
+ };
+
+ Field.fromHTML = function(html) {
+ var el, f, txt, type;
+ html = $(html);
+ type = Field._htmlElementToFieldType(html);
+ f = new Field({
+ type: type,
+ "var": html.attr("name"),
+ required: html.attr("required") === "required"
+ });
+ switch (type) {
+ case "list-multi":
+ case "list-single":
+ f.values = (function() {
+ var _i, _len, _ref, _results;
+ _ref = html.find("option:selected");
+ _results = [];
+ for (_i = 0, _len = _ref.length; _i < _len; _i++) {
+ el = _ref[_i];
+ _results.push(($(el)).val());
+ }
+ return _results;
+ })();
+ f.options = (function() {
+ var _i, _len, _ref, _results;
+ _ref = html.find("option");
+ _results = [];
+ for (_i = 0, _len = _ref.length; _i < _len; _i++) {
+ el = _ref[_i];
+ _results.push(Option.fromHTML(el));
}
+ return _results;
+ })();
+ break;
+ case "text-multi":
+ case "jid-multi":
+ txt = html.text();
+ if (txt.trim() !== "") {
+ f.values = txt.split('\n');
+ }
+ break;
+ case 'text-single':
+ case 'boolean':
+ case 'text-private':
+ case 'hidden':
+ case 'fixed':
+ case 'jid-single':
+ if (html.val().trim() !== "") {
+ f.values = [html.val()];
+ }
+ }
+ return f;
+ };
+
+ return Field;
+
+ })();
+
+ Option = (function() {
+ function Option(opt) {
+ this.toHTML = __bind(this.toHTML, this);
+ this.toJSON = __bind(this.toJSON, this);
+ this.toXML = __bind(this.toXML, this);
+ if (opt) {
+ if (opt.label) {
+ this.label = opt.label.toString();
}
+ if (opt.value) {
+ this.value = opt.value.toString();
+ }
+ }
+ }
+
+ Option.prototype.label = "";
+
+ Option.prototype.value = "";
+
+ Option.prototype.toXML = function() {
+ return $build("option", {
+ label: this.label
+ }).c("value").t(this.value.toString()).tree();
+ };
+
+ Option.prototype.toJSON = function() {
+ return {
+ label: this.label,
+ value: this.value
+ };
+ };
+
+ Option.prototype.toHTML = function() {
+ return ($("<option>")).attr('value', this.value).text(this.label || this.value)[0];
+ };
+
+ Option.fromXML = function(xml) {
+ return new Option({
+ label: ($(xml)).attr("label"),
+ value: ($(xml)).text()
+ });
+ };
+
+ Option.fromHTML = function(html) {
+ return new Option({
+ value: ($(html)).attr("value"),
+ label: ($(html)).text()
+ });
+ };
+
+ return Option;
+
+ })();
+
+ Item = (function() {
+ function Item(opts) {
+ this.toHTML = __bind(this.toHTML, this);
+ this.toJSON = __bind(this.toJSON, this);
+ this.toXML = __bind(this.toXML, this);
+ this.fields = [];
+ if (opts != null ? opts.fields : void 0) {
+ helper.fill(opts.fields, this.fields, Field);
+ }
+ }
+
+ Item.prototype.toXML = function() {
+ var f, xml, _i, _len, _ref;
+ xml = $build("item");
+ _ref = this.fields;
+ for (_i = 0, _len = _ref.length; _i < _len; _i++) {
+ f = _ref[_i];
+ xml.cnode(f.toXML()).up();
+ }
+ return xml.tree();
+ };
+
+ Item.prototype.toJSON = function() {
+ var f, json, _i, _len, _ref;
+ json = {};
+ if (this.fields) {
+ json.fields = [];
+ _ref = this.fields;
+ for (_i = 0, _len = _ref.length; _i < _len; _i++) {
+ f = _ref[_i];
+ json.fields.push(f.toJSON());
+ }
+ }
+ return json;
+ };
+
+ Item.prototype.toHTML = function() {
+ var f, fieldset, _i, _len, _ref;
+ fieldset = $("<fieldset>");
+ _ref = this.fields;
+ for (_i = 0, _len = _ref.length; _i < _len; _i++) {
+ f = _ref[_i];
+ (helper.createHtmlFieldCouple(f)).appendTo(fieldset);
+ }
+ return fieldset[0];
+ };
+
+ Item.fromXML = function(xml) {
+ var f, fields;
+ xml = $(xml);
+ fields = xml.find("field");
+ return new Item({
+ fields: (function() {
+ var _i, _len, _results;
+ _results = [];
+ for (_i = 0, _len = fields.length; _i < _len; _i++) {
+ f = fields[_i];
+ _results.push(Field.fromXML(f));
+ }
+ return _results;
+ })()
+ });
+ };
+
+ Item.fromHTML = function(html) {
+ var f;
+ return new Item({
+ fields: (function() {
+ var _i, _len, _ref, _results;
+ _ref = helper.getHtmlFields(html);
+ _results = [];
+ for (_i = 0, _len = _ref.length; _i < _len; _i++) {
+ f = _ref[_i];
+ _results.push(Field.fromHTML(f));
+ }
+ return _results;
+ })()
+ });
+ };
+
+ return Item;
+
+ })();
+
+ Strophe.x = {
+ Form: Form,
+ Field: Field,
+ Option: Option,
+ Item: Item
+ };
+
+ $form = function(opt) {
+ return new Strophe.x.Form(opt);
+ };
+
+ $field = function(opt) {
+ return new Strophe.x.Field(opt);
+ };
+
+ $opt = function(opt) {
+ return new Strophe.x.Option(opt);
+ };
+
+ $item = function(opts) {
+ return new Strophe.x.Item(opts);
+ };
+
+ Strophe.addConnectionPlugin('x', {
+ init: function(conn) {
+ var _ref, _ref1;
+ Strophe.addNamespace('DATA', 'jabber:x:data');
+ if (((_ref = conn.disco) != null ? _ref.addFeature : void 0) != null) {
+ conn.disco.addFeature(Strophe.NS.DATA);
+ }
+ if (((_ref1 = conn.disco) != null ? _ref1.addNode : void 0) != null) {
+ return conn.disco.addNode(Strophe.NS.DATA, {
+ items: []
+ });
+ }
},
- getStunAndTurnCredentials: function () {
- // get stun and turn configuration from server via xep-0215
- // uses time-limited credentials as described in
- // http://tools.ietf.org/html/draft-uberti-behave-turn-rest-00
- //
- // see https://code.google.com/p/prosody-modules/source/browse/mod_turncredentials/mod_turncredentials.lua
- // for a prosody module which implements this
- //
- // currently, this doesn't work with updateIce and therefore credentials with a long
- // validity have to be fetched before creating the peerconnection
- // TODO: implement refresh via updateIce as described in
- // https://code.google.com/p/webrtc/issues/detail?id=1650
- var self = this;
- this.connection.sendIQ(
- $iq({type: 'get', to: this.connection.domain})
- .c('services', {xmlns: 'urn:xmpp:extdisco:1'}).c('service', {host: 'turn.' + this.connection.domain}),
- function (res) {
- var iceservers = [];
- $(res).find('>services>service').each(function (idx, el) {
- el = $(el);
- var dict = {};
- switch (el.attr('type')) {
- case 'stun':
- dict.url = 'stun:' + el.attr('host');
- if (el.attr('port')) {
- dict.url += ':' + el.attr('port');
- }
- iceservers.push(dict);
- break;
- case 'turn':
- dict.url = 'turn:';
- if (el.attr('username')) {
- dict.username = el.attr('username');
- }
- dict.url += el.attr('host');
- if (el.attr('port') && el.attr('port') != '3478') {
- dict.url += ':' + el.attr('port');
- }
- if (el.attr('transport') && el.attr('transport') != 'udp') {
- dict.url += '?transport=' + el.attr('transport');
- }
- if (el.attr('password')) {
- dict.credential = el.attr('password');
- }
- iceservers.push(dict);
- break;
- }
- });
- self.ice_config.iceServers = iceservers;
- },
- function (err) {
- console.warn('getting turn credentials failed', err);
- console.warn('is mod_turncredentials or similar installed?');
- }
- );
- // implement push?
+ parseFromResult: function(result) {
+ var _ref;
+ if (result.nodeName.toLowerCase() === "x") {
+ return Form.fromXML(result);
+ } else {
+ return Form.fromXML((_ref = ($(result)).find("x")) != null ? _ref[0] : void 0);
+ }
}
-});
-}(jQuery));
+ });
+
+}).call(this);
/*!
- * Source: lib/strophe.jingle/strophe.jingle.session.js, license: MIT, url: https://github.com/ESTOS/strophe.jingle
+ * Source: lib/strophe.jinglejs/strophe.jinglejs-bundle.js, license: MIT, url: https://github.com/sualko/strophe.jinglejs
*/
-/* jshint -W117 */
-// Jingle stuff
-var JingleSession;
-
-(function($){
-JingleSession = function(me, sid, connection) {
- this.me = me;
- this.sid = sid;
- this.connection = connection;
- this.initiator = null;
- this.responder = null;
- this.isInitiator = null;
- this.peerjid = null;
- this.state = null;
- this.peerconnection = null;
- this.remoteStream = null;
- this.localSDP = null;
- this.remoteSDP = null;
- this.localStreams = [];
- this.relayedStreams = [];
- this.remoteStreams = [];
- this.startTime = null;
- this.stopTime = null;
- this.media_constraints = null;
- this.pc_constraints = null;
- this.ice_config = {};
- this.drip_container = [];
-
- this.usetrickle = true;
- this.usepranswer = false; // early transport warmup -- mind you, this might fail. depends on webrtc issue 1718
- this.usedrip = false; // dripping is sending trickle candidates not one-by-one
-
- this.hadstuncandidate = false;
- this.hadturncandidate = false;
- this.lasticecandidate = false;
-
- this.statsinterval = null;
-
- this.reason = null;
-
- this.addssrc = [];
- this.removessrc = [];
- this.pendingop = null;
-
- this.wait = true;
-
- // XEP-0172 support, non-standard
- this.nickname = null;
-
- // non-standard "please start muted" support for colibri/meet
- this.startmuted = false;
-
- // Filter for testcases with ICE Candidates
- this.filter_candidates = null;
-}
-
-JingleSession.prototype.initiate = function (peerjid, isInitiator) {
- var self = this;
- if (this.state !== null) {
- console.error('attempt to initiate on session ' + this.sid +
- 'in state ' + this.state);
- return;
+(function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o<r.length;o++)s(r[o]);return s})({1:[function(require,module,exports){
+
+},{}],2:[function(require,module,exports){
+/*!
+ * The buffer module from node.js, for the browser.
+ *
+ * @author Feross Aboukhadijeh <feross@feross.org> <http://feross.org>
+ * @license MIT
+ */
+
+var base64 = require('base64-js')
+var ieee754 = require('ieee754')
+var isArray = require('is-array')
+
+exports.Buffer = Buffer
+exports.SlowBuffer = SlowBuffer
+exports.INSPECT_MAX_BYTES = 50
+Buffer.poolSize = 8192 // not used by this implementation
+
+var kMaxLength = 0x3fffffff
+var rootParent = {}
+
+/**
+ * If `Buffer.TYPED_ARRAY_SUPPORT`:
+ * === true Use Uint8Array implementation (fastest)
+ * === false Use Object implementation (most compatible, even IE6)
+ *
+ * Browsers that support typed arrays are IE 10+, Firefox 4+, Chrome 7+, Safari 5.1+,
+ * Opera 11.6+, iOS 4.2+.
+ *
+ * Note:
+ *
+ * - Implementation must support adding new properties to `Uint8Array` instances.
+ * Firefox 4-29 lacked support, fixed in Firefox 30+.
+ * See: https://bugzilla.mozilla.org/show_bug.cgi?id=695438.
+ *
+ * - Chrome 9-10 is missing the `TypedArray.prototype.subarray` function.
+ *
+ * - IE10 has a broken `TypedArray.prototype.subarray` function which returns arrays of
+ * incorrect length in some situations.
+ *
+ * We detect these buggy browsers and set `Buffer.TYPED_ARRAY_SUPPORT` to `false` so they will
+ * get the Object implementation, which is slower but will work correctly.
+ */
+Buffer.TYPED_ARRAY_SUPPORT = (function () {
+ try {
+ var buf = new ArrayBuffer(0)
+ var arr = new Uint8Array(buf)
+ arr.foo = function () { return 42 }
+ return arr.foo() === 42 && // typed array instances can be augmented
+ typeof arr.subarray === 'function' && // chrome 9-10 lack `subarray`
+ new Uint8Array(1).subarray(1, 1).byteLength === 0 // ie10 has broken `subarray`
+ } catch (e) {
+ return false
+ }
+})()
+
+/**
+ * Class: Buffer
+ * =============
+ *
+ * The Buffer constructor returns instances of `Uint8Array` that are augmented
+ * with function properties for all the node `Buffer` API functions. We use
+ * `Uint8Array` so that square bracket notation works as expected -- it returns
+ * a single octet.
+ *
+ * By augmenting the instances, we can avoid modifying the `Uint8Array`
+ * prototype.
+ */
+function Buffer (arg) {
+ if (!(this instanceof Buffer)) {
+ // Avoid going through an ArgumentsAdaptorTrampoline in the common case.
+ if (arguments.length > 1) return new Buffer(arg, arguments[1])
+ return new Buffer(arg)
+ }
+
+ this.length = 0
+ this.parent = undefined
+
+ // Common case.
+ if (typeof arg === 'number') {
+ return fromNumber(this, arg)
+ }
+
+ // Slightly less common case.
+ if (typeof arg === 'string') {
+ return fromString(this, arg, arguments.length > 1 ? arguments[1] : 'utf8')
+ }
+
+ // Unusual.
+ return fromObject(this, arg)
+}
+
+function fromNumber (that, length) {
+ that = allocate(that, length < 0 ? 0 : checked(length) | 0)
+ if (!Buffer.TYPED_ARRAY_SUPPORT) {
+ for (var i = 0; i < length; i++) {
+ that[i] = 0
}
- this.isInitiator = isInitiator;
- this.state = 'pending';
- this.initiator = isInitiator ? this.me : peerjid;
- this.responder = !isInitiator ? this.me : peerjid;
- this.peerjid = peerjid;
- //console.log('create PeerConnection ' + JSON.stringify(this.ice_config));
- try {
- this.peerconnection = new RTCPeerconnection(this.ice_config,
- this.pc_constraints);
- } catch (e) {
- console.error('Failed to create PeerConnection, exception: ',
- e.message);
- console.error(e);
+ }
+ return that
+}
+
+function fromString (that, string, encoding) {
+ if (typeof encoding !== 'string' || encoding === '') encoding = 'utf8'
+
+ // Assumption: byteLength() return value is always < kMaxLength.
+ var length = byteLength(string, encoding) | 0
+ that = allocate(that, length)
+
+ that.write(string, encoding)
+ return that
+}
+
+function fromObject (that, object) {
+ if (Buffer.isBuffer(object)) return fromBuffer(that, object)
+
+ if (isArray(object)) return fromArray(that, object)
+
+ if (object == null) {
+ throw new TypeError('must start with number, buffer, array or string')
+ }
+
+ if (typeof ArrayBuffer !== 'undefined' && object.buffer instanceof ArrayBuffer) {
+ return fromTypedArray(that, object)
+ }
+
+ if (object.length) return fromArrayLike(that, object)
+
+ return fromJsonObject(that, object)
+}
+
+function fromBuffer (that, buffer) {
+ var length = checked(buffer.length) | 0
+ that = allocate(that, length)
+ buffer.copy(that, 0, 0, length)
+ return that
+}
+
+function fromArray (that, array) {
+ var length = checked(array.length) | 0
+ that = allocate(that, length)
+ for (var i = 0; i < length; i += 1) {
+ that[i] = array[i] & 255
+ }
+ return that
+}
+
+// Duplicate of fromArray() to keep fromArray() monomorphic.
+function fromTypedArray (that, array) {
+ var length = checked(array.length) | 0
+ that = allocate(that, length)
+ // Truncating the elements is probably not what people expect from typed
+ // arrays with BYTES_PER_ELEMENT > 1 but it's compatible with the behavior
+ // of the old Buffer constructor.
+ for (var i = 0; i < length; i += 1) {
+ that[i] = array[i] & 255
+ }
+ return that
+}
+
+function fromArrayLike (that, array) {
+ var length = checked(array.length) | 0
+ that = allocate(that, length)
+ for (var i = 0; i < length; i += 1) {
+ that[i] = array[i] & 255
+ }
+ return that
+}
+
+// Deserialize { type: 'Buffer', data: [1,2,3,...] } into a Buffer object.
+// Returns a zero-length buffer for inputs that don't conform to the spec.
+function fromJsonObject (that, object) {
+ var array
+ var length = 0
+
+ if (object.type === 'Buffer' && isArray(object.data)) {
+ array = object.data
+ length = checked(array.length) | 0
+ }
+ that = allocate(that, length)
+
+ for (var i = 0; i < length; i += 1) {
+ that[i] = array[i] & 255
+ }
+ return that
+}
+
+function allocate (that, length) {
+ if (Buffer.TYPED_ARRAY_SUPPORT) {
+ // Return an augmented `Uint8Array` instance, for best performance
+ that = Buffer._augment(new Uint8Array(length))
+ } else {
+ // Fallback: Return an object instance of the Buffer class
+ that.length = length
+ that._isBuffer = true
+ }
+
+ var fromPool = length !== 0 && length <= Buffer.poolSize >>> 1
+ if (fromPool) that.parent = rootParent
+
+ return that
+}
+
+function checked (length) {
+ // Note: cannot use `length < kMaxLength` here because that fails when
+ // length is NaN (which is otherwise coerced to zero.)
+ if (length >= kMaxLength) {
+ throw new RangeError('Attempt to allocate Buffer larger than maximum ' +
+ 'size: 0x' + kMaxLength.toString(16) + ' bytes')
+ }
+ return length | 0
+}
+
+function SlowBuffer (subject, encoding) {
+ if (!(this instanceof SlowBuffer)) return new SlowBuffer(subject, encoding)
+
+ var buf = new Buffer(subject, encoding)
+ delete buf.parent
+ return buf
+}
+
+Buffer.isBuffer = function isBuffer (b) {
+ return !!(b != null && b._isBuffer)
+}
+
+Buffer.compare = function compare (a, b) {
+ if (!Buffer.isBuffer(a) || !Buffer.isBuffer(b)) {
+ throw new TypeError('Arguments must be Buffers')
+ }
+
+ if (a === b) return 0
+
+ var x = a.length
+ var y = b.length
+
+ var i = 0
+ var len = Math.min(x, y)
+ while (i < len) {
+ if (a[i] !== b[i]) break
+
+ ++i
+ }
+
+ if (i !== len) {
+ x = a[i]
+ y = b[i]
+ }
+
+ if (x < y) return -1
+ if (y < x) return 1
+ return 0
+}
+
+Buffer.isEncoding = function isEncoding (encoding) {
+ switch (String(encoding).toLowerCase()) {
+ case 'hex':
+ case 'utf8':
+ case 'utf-8':
+ case 'ascii':
+ case 'binary':
+ case 'base64':
+ case 'raw':
+ case 'ucs2':
+ case 'ucs-2':
+ case 'utf16le':
+ case 'utf-16le':
+ return true
+ default:
+ return false
+ }
+}
+
+Buffer.concat = function concat (list, length) {
+ if (!isArray(list)) throw new TypeError('list argument must be an Array of Buffers.')
+
+ if (list.length === 0) {
+ return new Buffer(0)
+ } else if (list.length === 1) {
+ return list[0]
+ }
+
+ var i
+ if (length === undefined) {
+ length = 0
+ for (i = 0; i < list.length; i++) {
+ length += list[i].length
+ }
+ }
+
+ var buf = new Buffer(length)
+ var pos = 0
+ for (i = 0; i < list.length; i++) {
+ var item = list[i]
+ item.copy(buf, pos)
+ pos += item.length
+ }
+ return buf
+}
+
+function byteLength (string, encoding) {
+ if (typeof string !== 'string') string = String(string)
+
+ if (string.length === 0) return 0
+
+ switch (encoding || 'utf8') {
+ case 'ascii':
+ case 'binary':
+ case 'raw':
+ return string.length
+ case 'ucs2':
+ case 'ucs-2':
+ case 'utf16le':
+ case 'utf-16le':
+ return string.length * 2
+ case 'hex':
+ return string.length >>> 1
+ case 'utf8':
+ case 'utf-8':
+ return utf8ToBytes(string).length
+ case 'base64':
+ return base64ToBytes(string).length
+ default:
+ return string.length
+ }
+}
+Buffer.byteLength = byteLength
+
+// pre-set for values that may exist in the future
+Buffer.prototype.length = undefined
+Buffer.prototype.parent = undefined
+
+// toString(encoding, start=0, end=buffer.length)
+Buffer.prototype.toString = function toString (encoding, start, end) {
+ var loweredCase = false
+
+ start = start | 0
+ end = end === undefined || end === Infinity ? this.length : end | 0
+
+ if (!encoding) encoding = 'utf8'
+ if (start < 0) start = 0
+ if (end > this.length) end = this.length
+ if (end <= start) return ''
+
+ while (true) {
+ switch (encoding) {
+ case 'hex':
+ return hexSlice(this, start, end)
+
+ case 'utf8':
+ case 'utf-8':
+ return utf8Slice(this, start, end)
+
+ case 'ascii':
+ return asciiSlice(this, start, end)
+
+ case 'binary':
+ return binarySlice(this, start, end)
+
+ case 'base64':
+ return base64Slice(this, start, end)
+
+ case 'ucs2':
+ case 'ucs-2':
+ case 'utf16le':
+ case 'utf-16le':
+ return utf16leSlice(this, start, end)
+
+ default:
+ if (loweredCase) throw new TypeError('Unknown encoding: ' + encoding)
+ encoding = (encoding + '').toLowerCase()
+ loweredCase = true
+ }
+ }
+}
+
+Buffer.prototype.equals = function equals (b) {
+ if (!Buffer.isBuffer(b)) throw new TypeError('Argument must be a Buffer')
+ if (this === b) return true
+ return Buffer.compare(this, b) === 0
+}
+
+Buffer.prototype.inspect = function inspect () {
+ var str = ''
+ var max = exports.INSPECT_MAX_BYTES
+ if (this.length > 0) {
+ str = this.toString('hex', 0, max).match(/.{2}/g).join(' ')
+ if (this.length > max) str += ' ... '
+ }
+ return '<Buffer ' + str + '>'
+}
+
+Buffer.prototype.compare = function compare (b) {
+ if (!Buffer.isBuffer(b)) throw new TypeError('Argument must be a Buffer')
+ if (this === b) return 0
+ return Buffer.compare(this, b)
+}
+
+Buffer.prototype.indexOf = function indexOf (val, byteOffset) {
+ if (byteOffset > 0x7fffffff) byteOffset = 0x7fffffff
+ else if (byteOffset < -0x80000000) byteOffset = -0x80000000
+ byteOffset >>= 0
+
+ if (this.length === 0) return -1
+ if (byteOffset >= this.length) return -1
+
+ // Negative offsets start from the end of the buffer
+ if (byteOffset < 0) byteOffset = Math.max(this.length + byteOffset, 0)
+
+ if (typeof val === 'string') {
+ if (val.length === 0) return -1 // special case: looking for empty string always fails
+ return String.prototype.indexOf.call(this, val, byteOffset)
+ }
+ if (Buffer.isBuffer(val)) {
+ return arrayIndexOf(this, val, byteOffset)
+ }
+ if (typeof val === 'number') {
+ if (Buffer.TYPED_ARRAY_SUPPORT && Uint8Array.prototype.indexOf === 'function') {
+ return Uint8Array.prototype.indexOf.call(this, val, byteOffset)
+ }
+ return arrayIndexOf(this, [ val ], byteOffset)
+ }
+
+ function arrayIndexOf (arr, val, byteOffset) {
+ var foundIndex = -1
+ for (var i = 0; byteOffset + i < arr.length; i++) {
+ if (arr[byteOffset + i] === val[foundIndex === -1 ? 0 : i - foundIndex]) {
+ if (foundIndex === -1) foundIndex = i
+ if (i - foundIndex + 1 === val.length) return byteOffset + foundIndex
+ } else {
+ foundIndex = -1
+ }
+ }
+ return -1
+ }
+
+ throw new TypeError('val must be string, number or Buffer')
+}
+
+// `get` will be removed in Node 0.13+
+Buffer.prototype.get = function get (offset) {
+ console.log('.get() is deprecated. Access using array indexes instead.')
+ return this.readUInt8(offset)
+}
+
+// `set` will be removed in Node 0.13+
+Buffer.prototype.set = function set (v, offset) {
+ console.log('.set() is deprecated. Access using array indexes instead.')
+ return this.writeUInt8(v, offset)
+}
+
+function hexWrite (buf, string, offset, length) {
+ offset = Number(offset) || 0
+ var remaining = buf.length - offset
+ if (!length) {
+ length = remaining
+ } else {
+ length = Number(length)
+ if (length > remaining) {
+ length = remaining
+ }
+ }
+
+ // must be an even number of digits
+ var strLen = string.length
+ if (strLen % 2 !== 0) throw new Error('Invalid hex string')
+
+ if (length > strLen / 2) {
+ length = strLen / 2
+ }
+ for (var i = 0; i < length; i++) {
+ var parsed = parseInt(string.substr(i * 2, 2), 16)
+ if (isNaN(parsed)) throw new Error('Invalid hex string')
+ buf[offset + i] = parsed
+ }
+ return i
+}
+
+function utf8Write (buf, string, offset, length) {
+ return blitBuffer(utf8ToBytes(string, buf.length - offset), buf, offset, length)
+}
+
+function asciiWrite (buf, string, offset, length) {
+ return blitBuffer(asciiToBytes(string), buf, offset, length)
+}
+
+function binaryWrite (buf, string, offset, length) {
+ return asciiWrite(buf, string, offset, length)
+}
+
+function base64Write (buf, string, offset, length) {
+ return blitBuffer(base64ToBytes(string), buf, offset, length)
+}
+
+function ucs2Write (buf, string, offset, length) {
+ return blitBuffer(utf16leToBytes(string, buf.length - offset), buf, offset, length)
+}
+
+Buffer.prototype.write = function write (string, offset, length, encoding) {
+ // Buffer#write(string)
+ if (offset === undefined) {
+ encoding = 'utf8'
+ length = this.length
+ offset = 0
+ // Buffer#write(string, encoding)
+ } else if (length === undefined && typeof offset === 'string') {
+ encoding = offset
+ length = this.length
+ offset = 0
+ // Buffer#write(string, offset[, length][, encoding])
+ } else if (isFinite(offset)) {
+ offset = offset | 0
+ if (isFinite(length)) {
+ length = length | 0
+ if (encoding === undefined) encoding = 'utf8'
+ } else {
+ encoding = length
+ length = undefined
+ }
+ // legacy write(string, encoding, offset, length) - remove in v0.13
+ } else {
+ var swap = encoding
+ encoding = offset
+ offset = length | 0
+ length = swap
+ }
+
+ var remaining = this.length - offset
+ if (length === undefined || length > remaining) length = remaining
+
+ if ((string.length > 0 && (length < 0 || offset < 0)) || offset > this.length) {
+ throw new RangeError('attempt to write outside buffer bounds')
+ }
+
+ if (!encoding) encoding = 'utf8'
+
+ var loweredCase = false
+ for (;;) {
+ switch (encoding) {
+ case 'hex':
+ return hexWrite(this, string, offset, length)
+
+ case 'utf8':
+ case 'utf-8':
+ return utf8Write(this, string, offset, length)
+
+ case 'ascii':
+ return asciiWrite(this, string, offset, length)
+
+ case 'binary':
+ return binaryWrite(this, string, offset, length)
+
+ case 'base64':
+ // Warning: maxLength not taken into account in base64Write
+ return base64Write(this, string, offset, length)
+
+ case 'ucs2':
+ case 'ucs-2':
+ case 'utf16le':
+ case 'utf-16le':
+ return ucs2Write(this, string, offset, length)
+
+ default:
+ if (loweredCase) throw new TypeError('Unknown encoding: ' + encoding)
+ encoding = ('' + encoding).toLowerCase()
+ loweredCase = true
+ }
+ }
+}
+
+Buffer.prototype.toJSON = function toJSON () {
+ return {
+ type: 'Buffer',
+ data: Array.prototype.slice.call(this._arr || this, 0)
+ }
+}
+
+function base64Slice (buf, start, end) {
+ if (start === 0 && end === buf.length) {
+ return base64.fromByteArray(buf)
+ } else {
+ return base64.fromByteArray(buf.slice(start, end))
+ }
+}
+
+function utf8Slice (buf, start, end) {
+ var res = ''
+ var tmp = ''
+ end = Math.min(buf.length, end)
+
+ for (var i = start; i < end; i++) {
+ if (buf[i] <= 0x7F) {
+ res += decodeUtf8Char(tmp) + String.fromCharCode(buf[i])
+ tmp = ''
+ } else {
+ tmp += '%' + buf[i].toString(16)
+ }
+ }
+
+ return res + decodeUtf8Char(tmp)
+}
+
+function asciiSlice (buf, start, end) {
+ var ret = ''
+ end = Math.min(buf.length, end)
+
+ for (var i = start; i < end; i++) {
+ ret += String.fromCharCode(buf[i] & 0x7F)
+ }
+ return ret
+}
+
+function binarySlice (buf, start, end) {
+ var ret = ''
+ end = Math.min(buf.length, end)
+
+ for (var i = start; i < end; i++) {
+ ret += String.fromCharCode(buf[i])
+ }
+ return ret
+}
+
+function hexSlice (buf, start, end) {
+ var len = buf.length
+
+ if (!start || start < 0) start = 0
+ if (!end || end < 0 || end > len) end = len
+
+ var out = ''
+ for (var i = start; i < end; i++) {
+ out += toHex(buf[i])
+ }
+ return out
+}
+
+function utf16leSlice (buf, start, end) {
+ var bytes = buf.slice(start, end)
+ var res = ''
+ for (var i = 0; i < bytes.length; i += 2) {
+ res += String.fromCharCode(bytes[i] + bytes[i + 1] * 256)
+ }
+ return res
+}
+
+Buffer.prototype.slice = function slice (start, end) {
+ var len = this.length
+ start = ~~start
+ end = end === undefined ? len : ~~end
+
+ if (start < 0) {
+ start += len
+ if (start < 0) start = 0
+ } else if (start > len) {
+ start = len
+ }
+
+ if (end < 0) {
+ end += len
+ if (end < 0) end = 0
+ } else if (end > len) {
+ end = len
+ }
+
+ if (end < start) end = start
+
+ var newBuf
+ if (Buffer.TYPED_ARRAY_SUPPORT) {
+ newBuf = Buffer._augment(this.subarray(start, end))
+ } else {
+ var sliceLen = end - start
+ newBuf = new Buffer(sliceLen, undefined)
+ for (var i = 0; i < sliceLen; i++) {
+ newBuf[i] = this[i + start]
+ }
+ }
+
+ if (newBuf.length) newBuf.parent = this.parent || this
+
+ return newBuf
+}
+
+/*
+ * Need to make sure that buffer isn't trying to write out of bounds.
+ */
+function checkOffset (offset, ext, length) {
+ if ((offset % 1) !== 0 || offset < 0) throw new RangeError('offset is not uint')
+ if (offset + ext > length) throw new RangeError('Trying to access beyond buffer length')
+}
+
+Buffer.prototype.readUIntLE = function readUIntLE (offset, byteLength, noAssert) {
+ offset = offset | 0
+ byteLength = byteLength | 0
+ if (!noAssert) checkOffset(offset, byteLength, this.length)
+
+ var val = this[offset]
+ var mul = 1
+ var i = 0
+ while (++i < byteLength && (mul *= 0x100)) {
+ val += this[offset + i] * mul
+ }
+
+ return val
+}
+
+Buffer.prototype.readUIntBE = function readUIntBE (offset, byteLength, noAssert) {
+ offset = offset | 0
+ byteLength = byteLength | 0
+ if (!noAssert) {
+ checkOffset(offset, byteLength, this.length)
+ }
+
+ var val = this[offset + --byteLength]
+ var mul = 1
+ while (byteLength > 0 && (mul *= 0x100)) {
+ val += this[offset + --byteLength] * mul
+ }
+
+ return val
+}
+
+Buffer.prototype.readUInt8 = function readUInt8 (offset, noAssert) {
+ if (!noAssert) checkOffset(offset, 1, this.length)
+ return this[offset]
+}
+
+Buffer.prototype.readUInt16LE = function readUInt16LE (offset, noAssert) {
+ if (!noAssert) checkOffset(offset, 2, this.length)
+ return this[offset] | (this[offset + 1] << 8)
+}
+
+Buffer.prototype.readUInt16BE = function readUInt16BE (offset, noAssert) {
+ if (!noAssert) checkOffset(offset, 2, this.length)
+ return (this[offset] << 8) | this[offset + 1]
+}
+
+Buffer.prototype.readUInt32LE = function readUInt32LE (offset, noAssert) {
+ if (!noAssert) checkOffset(offset, 4, this.length)
+
+ return ((this[offset]) |
+ (this[offset + 1] << 8) |
+ (this[offset + 2] << 16)) +
+ (this[offset + 3] * 0x1000000)
+}
+
+Buffer.prototype.readUInt32BE = function readUInt32BE (offset, noAssert) {
+ if (!noAssert) checkOffset(offset, 4, this.length)
+
+ return (this[offset] * 0x1000000) +
+ ((this[offset + 1] << 16) |
+ (this[offset + 2] << 8) |
+ this[offset + 3])
+}
+
+Buffer.prototype.readIntLE = function readIntLE (offset, byteLength, noAssert) {
+ offset = offset | 0
+ byteLength = byteLength | 0
+ if (!noAssert) checkOffset(offset, byteLength, this.length)
+
+ var val = this[offset]
+ var mul = 1
+ var i = 0
+ while (++i < byteLength && (mul *= 0x100)) {
+ val += this[offset + i] * mul
+ }
+ mul *= 0x80
+
+ if (val >= mul) val -= Math.pow(2, 8 * byteLength)
+
+ return val
+}
+
+Buffer.prototype.readIntBE = function readIntBE (offset, byteLength, noAssert) {
+ offset = offset | 0
+ byteLength = byteLength | 0
+ if (!noAssert) checkOffset(offset, byteLength, this.length)
+
+ var i = byteLength
+ var mul = 1
+ var val = this[offset + --i]
+ while (i > 0 && (mul *= 0x100)) {
+ val += this[offset + --i] * mul
+ }
+ mul *= 0x80
+
+ if (val >= mul) val -= Math.pow(2, 8 * byteLength)
+
+ return val
+}
+
+Buffer.prototype.readInt8 = function readInt8 (offset, noAssert) {
+ if (!noAssert) checkOffset(offset, 1, this.length)
+ if (!(this[offset] & 0x80)) return (this[offset])
+ return ((0xff - this[offset] + 1) * -1)
+}
+
+Buffer.prototype.readInt16LE = function readInt16LE (offset, noAssert) {
+ if (!noAssert) checkOffset(offset, 2, this.length)
+ var val = this[offset] | (this[offset + 1] << 8)
+ return (val & 0x8000) ? val | 0xFFFF0000 : val
+}
+
+Buffer.prototype.readInt16BE = function readInt16BE (offset, noAssert) {
+ if (!noAssert) checkOffset(offset, 2, this.length)
+ var val = this[offset + 1] | (this[offset] << 8)
+ return (val & 0x8000) ? val | 0xFFFF0000 : val
+}
+
+Buffer.prototype.readInt32LE = function readInt32LE (offset, noAssert) {
+ if (!noAssert) checkOffset(offset, 4, this.length)
+
+ return (this[offset]) |
+ (this[offset + 1] << 8) |
+ (this[offset + 2] << 16) |
+ (this[offset + 3] << 24)
+}
+
+Buffer.prototype.readInt32BE = function readInt32BE (offset, noAssert) {
+ if (!noAssert) checkOffset(offset, 4, this.length)
+
+ return (this[offset] << 24) |
+ (this[offset + 1] << 16) |
+ (this[offset + 2] << 8) |
+ (this[offset + 3])
+}
+
+Buffer.prototype.readFloatLE = function readFloatLE (offset, noAssert) {
+ if (!noAssert) checkOffset(offset, 4, this.length)
+ return ieee754.read(this, offset, true, 23, 4)
+}
+
+Buffer.prototype.readFloatBE = function readFloatBE (offset, noAssert) {
+ if (!noAssert) checkOffset(offset, 4, this.length)
+ return ieee754.read(this, offset, false, 23, 4)
+}
+
+Buffer.prototype.readDoubleLE = function readDoubleLE (offset, noAssert) {
+ if (!noAssert) checkOffset(offset, 8, this.length)
+ return ieee754.read(this, offset, true, 52, 8)
+}
+
+Buffer.prototype.readDoubleBE = function readDoubleBE (offset, noAssert) {
+ if (!noAssert) checkOffset(offset, 8, this.length)
+ return ieee754.read(this, offset, false, 52, 8)
+}
+
+function checkInt (buf, value, offset, ext, max, min) {
+ if (!Buffer.isBuffer(buf)) throw new TypeError('buffer must be a Buffer instance')
+ if (value > max || value < min) throw new RangeError('value is out of bounds')
+ if (offset + ext > buf.length) throw new RangeError('index out of range')
+}
+
+Buffer.prototype.writeUIntLE = function writeUIntLE (value, offset, byteLength, noAssert) {
+ value = +value
+ offset = offset | 0
+ byteLength = byteLength | 0
+ if (!noAssert) checkInt(this, value, offset, byteLength, Math.pow(2, 8 * byteLength), 0)
+
+ var mul = 1
+ var i = 0
+ this[offset] = value & 0xFF
+ while (++i < byteLength && (mul *= 0x100)) {
+ this[offset + i] = (value / mul) & 0xFF
+ }
+
+ return offset + byteLength
+}
+
+Buffer.prototype.writeUIntBE = function writeUIntBE (value, offset, byteLength, noAssert) {
+ value = +value
+ offset = offset | 0
+ byteLength = byteLength | 0
+ if (!noAssert) checkInt(this, value, offset, byteLength, Math.pow(2, 8 * byteLength), 0)
+
+ var i = byteLength - 1
+ var mul = 1
+ this[offset + i] = value & 0xFF
+ while (--i >= 0 && (mul *= 0x100)) {
+ this[offset + i] = (value / mul) & 0xFF
+ }
+
+ return offset + byteLength
+}
+
+Buffer.prototype.writeUInt8 = function writeUInt8 (value, offset, noAssert) {
+ value = +value
+ offset = offset | 0
+ if (!noAssert) checkInt(this, value, offset, 1, 0xff, 0)
+ if (!Buffer.TYPED_ARRAY_SUPPORT) value = Math.floor(value)
+ this[offset] = value
+ return offset + 1
+}
+
+function objectWriteUInt16 (buf, value, offset, littleEndian) {
+ if (value < 0) value = 0xffff + value + 1
+ for (var i = 0, j = Math.min(buf.length - offset, 2); i < j; i++) {
+ buf[offset + i] = (value & (0xff << (8 * (littleEndian ? i : 1 - i)))) >>>
+ (littleEndian ? i : 1 - i) * 8
+ }
+}
+
+Buffer.prototype.writeUInt16LE = function writeUInt16LE (value, offset, noAssert) {
+ value = +value
+ offset = offset | 0
+ if (!noAssert) checkInt(this, value, offset, 2, 0xffff, 0)
+ if (Buffer.TYPED_ARRAY_SUPPORT) {
+ this[offset] = value
+ this[offset + 1] = (value >>> 8)
+ } else {
+ objectWriteUInt16(this, value, offset, true)
+ }
+ return offset + 2
+}
+
+Buffer.prototype.writeUInt16BE = function writeUInt16BE (value, offset, noAssert) {
+ value = +value
+ offset = offset | 0
+ if (!noAssert) checkInt(this, value, offset, 2, 0xffff, 0)
+ if (Buffer.TYPED_ARRAY_SUPPORT) {
+ this[offset] = (value >>> 8)
+ this[offset + 1] = value
+ } else {
+ objectWriteUInt16(this, value, offset, false)
+ }
+ return offset + 2
+}
+
+function objectWriteUInt32 (buf, value, offset, littleEndian) {
+ if (value < 0) value = 0xffffffff + value + 1
+ for (var i = 0, j = Math.min(buf.length - offset, 4); i < j; i++) {
+ buf[offset + i] = (value >>> (littleEndian ? i : 3 - i) * 8) & 0xff
+ }
+}
+
+Buffer.prototype.writeUInt32LE = function writeUInt32LE (value, offset, noAssert) {
+ value = +value
+ offset = offset | 0
+ if (!noAssert) checkInt(this, value, offset, 4, 0xffffffff, 0)
+ if (Buffer.TYPED_ARRAY_SUPPORT) {
+ this[offset + 3] = (value >>> 24)
+ this[offset + 2] = (value >>> 16)
+ this[offset + 1] = (value >>> 8)
+ this[offset] = value
+ } else {
+ objectWriteUInt32(this, value, offset, true)
+ }
+ return offset + 4
+}
+
+Buffer.prototype.writeUInt32BE = function writeUInt32BE (value, offset, noAssert) {
+ value = +value
+ offset = offset | 0
+ if (!noAssert) checkInt(this, value, offset, 4, 0xffffffff, 0)
+ if (Buffer.TYPED_ARRAY_SUPPORT) {
+ this[offset] = (value >>> 24)
+ this[offset + 1] = (value >>> 16)
+ this[offset + 2] = (value >>> 8)
+ this[offset + 3] = value
+ } else {
+ objectWriteUInt32(this, value, offset, false)
+ }
+ return offset + 4
+}
+
+Buffer.prototype.writeIntLE = function writeIntLE (value, offset, byteLength, noAssert) {
+ value = +value
+ offset = offset | 0
+ if (!noAssert) {
+ var limit = Math.pow(2, 8 * byteLength - 1)
+
+ checkInt(this, value, offset, byteLength, limit - 1, -limit)
+ }
+
+ var i = 0
+ var mul = 1
+ var sub = value < 0 ? 1 : 0
+ this[offset] = value & 0xFF
+ while (++i < byteLength && (mul *= 0x100)) {
+ this[offset + i] = ((value / mul) >> 0) - sub & 0xFF
+ }
+
+ return offset + byteLength
+}
+
+Buffer.prototype.writeIntBE = function writeIntBE (value, offset, byteLength, noAssert) {
+ value = +value
+ offset = offset | 0
+ if (!noAssert) {
+ var limit = Math.pow(2, 8 * byteLength - 1)
+
+ checkInt(this, value, offset, byteLength, limit - 1, -limit)
+ }
+
+ var i = byteLength - 1
+ var mul = 1
+ var sub = value < 0 ? 1 : 0
+ this[offset + i] = value & 0xFF
+ while (--i >= 0 && (mul *= 0x100)) {
+ this[offset + i] = ((value / mul) >> 0) - sub & 0xFF
+ }
+
+ return offset + byteLength
+}
+
+Buffer.prototype.writeInt8 = function writeInt8 (value, offset, noAssert) {
+ value = +value
+ offset = offset | 0
+ if (!noAssert) checkInt(this, value, offset, 1, 0x7f, -0x80)
+ if (!Buffer.TYPED_ARRAY_SUPPORT) value = Math.floor(value)
+ if (value < 0) value = 0xff + value + 1
+ this[offset] = value
+ return offset + 1
+}
+
+Buffer.prototype.writeInt16LE = function writeInt16LE (value, offset, noAssert) {
+ value = +value
+ offset = offset | 0
+ if (!noAssert) checkInt(this, value, offset, 2, 0x7fff, -0x8000)
+ if (Buffer.TYPED_ARRAY_SUPPORT) {
+ this[offset] = value
+ this[offset + 1] = (value >>> 8)
+ } else {
+ objectWriteUInt16(this, value, offset, true)
+ }
+ return offset + 2
+}
+
+Buffer.prototype.writeInt16BE = function writeInt16BE (value, offset, noAssert) {
+ value = +value
+ offset = offset | 0
+ if (!noAssert) checkInt(this, value, offset, 2, 0x7fff, -0x8000)
+ if (Buffer.TYPED_ARRAY_SUPPORT) {
+ this[offset] = (value >>> 8)
+ this[offset + 1] = value
+ } else {
+ objectWriteUInt16(this, value, offset, false)
+ }
+ return offset + 2
+}
+
+Buffer.prototype.writeInt32LE = function writeInt32LE (value, offset, noAssert) {
+ value = +value
+ offset = offset | 0
+ if (!noAssert) checkInt(this, value, offset, 4, 0x7fffffff, -0x80000000)
+ if (Buffer.TYPED_ARRAY_SUPPORT) {
+ this[offset] = value
+ this[offset + 1] = (value >>> 8)
+ this[offset + 2] = (value >>> 16)
+ this[offset + 3] = (value >>> 24)
+ } else {
+ objectWriteUInt32(this, value, offset, true)
+ }
+ return offset + 4
+}
+
+Buffer.prototype.writeInt32BE = function writeInt32BE (value, offset, noAssert) {
+ value = +value
+ offset = offset | 0
+ if (!noAssert) checkInt(this, value, offset, 4, 0x7fffffff, -0x80000000)
+ if (value < 0) value = 0xffffffff + value + 1
+ if (Buffer.TYPED_ARRAY_SUPPORT) {
+ this[offset] = (value >>> 24)
+ this[offset + 1] = (value >>> 16)
+ this[offset + 2] = (value >>> 8)
+ this[offset + 3] = value
+ } else {
+ objectWriteUInt32(this, value, offset, false)
+ }
+ return offset + 4
+}
+
+function checkIEEE754 (buf, value, offset, ext, max, min) {
+ if (value > max || value < min) throw new RangeError('value is out of bounds')
+ if (offset + ext > buf.length) throw new RangeError('index out of range')
+ if (offset < 0) throw new RangeError('index out of range')
+}
+
+function writeFloat (buf, value, offset, littleEndian, noAssert) {
+ if (!noAssert) {
+ checkIEEE754(buf, value, offset, 4, 3.4028234663852886e+38, -3.4028234663852886e+38)
+ }
+ ieee754.write(buf, value, offset, littleEndian, 23, 4)
+ return offset + 4
+}
+
+Buffer.prototype.writeFloatLE = function writeFloatLE (value, offset, noAssert) {
+ return writeFloat(this, value, offset, true, noAssert)
+}
+
+Buffer.prototype.writeFloatBE = function writeFloatBE (value, offset, noAssert) {
+ return writeFloat(this, value, offset, false, noAssert)
+}
+
+function writeDouble (buf, value, offset, littleEndian, noAssert) {
+ if (!noAssert) {
+ checkIEEE754(buf, value, offset, 8, 1.7976931348623157E+308, -1.7976931348623157E+308)
+ }
+ ieee754.write(buf, value, offset, littleEndian, 52, 8)
+ return offset + 8
+}
+
+Buffer.prototype.writeDoubleLE = function writeDoubleLE (value, offset, noAssert) {
+ return writeDouble(this, value, offset, true, noAssert)
+}
+
+Buffer.prototype.writeDoubleBE = function writeDoubleBE (value, offset, noAssert) {
+ return writeDouble(this, value, offset, false, noAssert)
+}
+
+// copy(targetBuffer, targetStart=0, sourceStart=0, sourceEnd=buffer.length)
+Buffer.prototype.copy = function copy (target, targetStart, start, end) {
+ if (!start) start = 0
+ if (!end && end !== 0) end = this.length
+ if (targetStart >= target.length) targetStart = target.length
+ if (!targetStart) targetStart = 0
+ if (end > 0 && end < start) end = start
+
+ // Copy 0 bytes; we're done
+ if (end === start) return 0
+ if (target.length === 0 || this.length === 0) return 0
+
+ // Fatal error conditions
+ if (targetStart < 0) {
+ throw new RangeError('targetStart out of bounds')
+ }
+ if (start < 0 || start >= this.length) throw new RangeError('sourceStart out of bounds')
+ if (end < 0) throw new RangeError('sourceEnd out of bounds')
+
+ // Are we oob?
+ if (end > this.length) end = this.length
+ if (target.length - targetStart < end - start) {
+ end = target.length - targetStart + start
+ }
+
+ var len = end - start
+
+ if (len < 1000 || !Buffer.TYPED_ARRAY_SUPPORT) {
+ for (var i = 0; i < len; i++) {
+ target[i + targetStart] = this[i + start]
+ }
+ } else {
+ target._set(this.subarray(start, start + len), targetStart)
+ }
+
+ return len
+}
+
+// fill(value, start=0, end=buffer.length)
+Buffer.prototype.fill = function fill (value, start, end) {
+ if (!value) value = 0
+ if (!start) start = 0
+ if (!end) end = this.length
+
+ if (end < start) throw new RangeError('end < start')
+
+ // Fill 0 bytes; we're done
+ if (end === start) return
+ if (this.length === 0) return
+
+ if (start < 0 || start >= this.length) throw new RangeError('start out of bounds')
+ if (end < 0 || end > this.length) throw new RangeError('end out of bounds')
+
+ var i
+ if (typeof value === 'number') {
+ for (i = start; i < end; i++) {
+ this[i] = value
+ }
+ } else {
+ var bytes = utf8ToBytes(value.toString())
+ var len = bytes.length
+ for (i = start; i < end; i++) {
+ this[i] = bytes[i % len]
+ }
+ }
+
+ return this
+}
+
+/**
+ * Creates a new `ArrayBuffer` with the *copied* memory of the buffer instance.
+ * Added in Node 0.12. Only available in browsers that support ArrayBuffer.
+ */
+Buffer.prototype.toArrayBuffer = function toArrayBuffer () {
+ if (typeof Uint8Array !== 'undefined') {
+ if (Buffer.TYPED_ARRAY_SUPPORT) {
+ return (new Buffer(this)).buffer
+ } else {
+ var buf = new Uint8Array(this.length)
+ for (var i = 0, len = buf.length; i < len; i += 1) {
+ buf[i] = this[i]
+ }
+ return buf.buffer
+ }
+ } else {
+ throw new TypeError('Buffer.toArrayBuffer not supported in this browser')
+ }
+}
+
+// HELPER FUNCTIONS
+// ================
+
+var BP = Buffer.prototype
+
+/**
+ * Augment a Uint8Array *instance* (not the Uint8Array class!) with Buffer methods
+ */
+Buffer._augment = function _augment (arr) {
+ arr.constructor = Buffer
+ arr._isBuffer = true
+
+ // save reference to original Uint8Array set method before overwriting
+ arr._set = arr.set
+
+ // deprecated, will be removed in node 0.13+
+ arr.get = BP.get
+ arr.set = BP.set
+
+ arr.write = BP.write
+ arr.toString = BP.toString
+ arr.toLocaleString = BP.toString
+ arr.toJSON = BP.toJSON
+ arr.equals = BP.equals
+ arr.compare = BP.compare
+ arr.indexOf = BP.indexOf
+ arr.copy = BP.copy
+ arr.slice = BP.slice
+ arr.readUIntLE = BP.readUIntLE
+ arr.readUIntBE = BP.readUIntBE
+ arr.readUInt8 = BP.readUInt8
+ arr.readUInt16LE = BP.readUInt16LE
+ arr.readUInt16BE = BP.readUInt16BE
+ arr.readUInt32LE = BP.readUInt32LE
+ arr.readUInt32BE = BP.readUInt32BE
+ arr.readIntLE = BP.readIntLE
+ arr.readIntBE = BP.readIntBE
+ arr.readInt8 = BP.readInt8
+ arr.readInt16LE = BP.readInt16LE
+ arr.readInt16BE = BP.readInt16BE
+ arr.readInt32LE = BP.readInt32LE
+ arr.readInt32BE = BP.readInt32BE
+ arr.readFloatLE = BP.readFloatLE
+ arr.readFloatBE = BP.readFloatBE
+ arr.readDoubleLE = BP.readDoubleLE
+ arr.readDoubleBE = BP.readDoubleBE
+ arr.writeUInt8 = BP.writeUInt8
+ arr.writeUIntLE = BP.writeUIntLE
+ arr.writeUIntBE = BP.writeUIntBE
+ arr.writeUInt16LE = BP.writeUInt16LE
+ arr.writeUInt16BE = BP.writeUInt16BE
+ arr.writeUInt32LE = BP.writeUInt32LE
+ arr.writeUInt32BE = BP.writeUInt32BE
+ arr.writeIntLE = BP.writeIntLE
+ arr.writeIntBE = BP.writeIntBE
+ arr.writeInt8 = BP.writeInt8
+ arr.writeInt16LE = BP.writeInt16LE
+ arr.writeInt16BE = BP.writeInt16BE
+ arr.writeInt32LE = BP.writeInt32LE
+ arr.writeInt32BE = BP.writeInt32BE
+ arr.writeFloatLE = BP.writeFloatLE
+ arr.writeFloatBE = BP.writeFloatBE
+ arr.writeDoubleLE = BP.writeDoubleLE
+ arr.writeDoubleBE = BP.writeDoubleBE
+ arr.fill = BP.fill
+ arr.inspect = BP.inspect
+ arr.toArrayBuffer = BP.toArrayBuffer
+
+ return arr
+}
+
+var INVALID_BASE64_RE = /[^+\/0-9A-z\-]/g
+
+function base64clean (str) {
+ // Node strips out invalid characters like \n and \t from the string, base64-js does not
+ str = stringtrim(str).replace(INVALID_BASE64_RE, '')
+ // Node converts strings with length < 2 to ''
+ if (str.length < 2) return ''
+ // Node allows for non-padded base64 strings (missing trailing ===), base64-js does not
+ while (str.length % 4 !== 0) {
+ str = str + '='
+ }
+ return str
+}
+
+function stringtrim (str) {
+ if (str.trim) return str.trim()
+ return str.replace(/^\s+|\s+$/g, '')
+}
+
+function toHex (n) {
+ if (n < 16) return '0' + n.toString(16)
+ return n.toString(16)
+}
+
+function utf8ToBytes (string, units) {
+ units = units || Infinity
+ var codePoint
+ var length = string.length
+ var leadSurrogate = null
+ var bytes = []
+ var i = 0
+
+ for (; i < length; i++) {
+ codePoint = string.charCodeAt(i)
+
+ // is surrogate component
+ if (codePoint > 0xD7FF && codePoint < 0xE000) {
+ // last char was a lead
+ if (leadSurrogate) {
+ // 2 leads in a row
+ if (codePoint < 0xDC00) {
+ if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD)
+ leadSurrogate = codePoint
+ continue
+ } else {
+ // valid surrogate pair
+ codePoint = leadSurrogate - 0xD800 << 10 | codePoint - 0xDC00 | 0x10000
+ leadSurrogate = null
+ }
+ } else {
+ // no lead yet
+
+ if (codePoint > 0xDBFF) {
+ // unexpected trail
+ if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD)
+ continue
+ } else if (i + 1 === length) {
+ // unpaired lead
+ if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD)
+ continue
+ } else {
+ // valid lead
+ leadSurrogate = codePoint
+ continue
+ }
+ }
+ } else if (leadSurrogate) {
+ // valid bmp char, but last char was a lead
+ if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD)
+ leadSurrogate = null
+ }
+
+ // encode utf8
+ if (codePoint < 0x80) {
+ if ((units -= 1) < 0) break
+ bytes.push(codePoint)
+ } else if (codePoint < 0x800) {
+ if ((units -= 2) < 0) break
+ bytes.push(
+ codePoint >> 0x6 | 0xC0,
+ codePoint & 0x3F | 0x80
+ )
+ } else if (codePoint < 0x10000) {
+ if ((units -= 3) < 0) break
+ bytes.push(
+ codePoint >> 0xC | 0xE0,
+ codePoint >> 0x6 & 0x3F | 0x80,
+ codePoint & 0x3F | 0x80
+ )
+ } else if (codePoint < 0x200000) {
+ if ((units -= 4) < 0) break
+ bytes.push(
+ codePoint >> 0x12 | 0xF0,
+ codePoint >> 0xC & 0x3F | 0x80,
+ codePoint >> 0x6 & 0x3F | 0x80,
+ codePoint & 0x3F | 0x80
+ )
+ } else {
+ throw new Error('Invalid code point')
+ }
+ }
+
+ return bytes
+}
+
+function asciiToBytes (str) {
+ var byteArray = []
+ for (var i = 0; i < str.length; i++) {
+ // Node's code seems to be doing this and not & 0x7F..
+ byteArray.push(str.charCodeAt(i) & 0xFF)
+ }
+ return byteArray
+}
+
+function utf16leToBytes (str, units) {
+ var c, hi, lo
+ var byteArray = []
+ for (var i = 0; i < str.length; i++) {
+ if ((units -= 2) < 0) break
+
+ c = str.charCodeAt(i)
+ hi = c >> 8
+ lo = c % 256
+ byteArray.push(lo)
+ byteArray.push(hi)
+ }
+
+ return byteArray
+}
+
+function base64ToBytes (str) {
+ return base64.toByteArray(base64clean(str))
+}
+
+function blitBuffer (src, dst, offset, length) {
+ for (var i = 0; i < length; i++) {
+ if ((i + offset >= dst.length) || (i >= src.length)) break
+ dst[i + offset] = src[i]
+ }
+ return i
+}
+
+function decodeUtf8Char (str) {
+ try {
+ return decodeURIComponent(str)
+ } catch (err) {
+ return String.fromCharCode(0xFFFD) // UTF 8 invalid char
+ }
+}
+
+},{"base64-js":3,"ieee754":4,"is-array":5}],3:[function(require,module,exports){
+var lookup = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/';
+
+;(function (exports) {
+ 'use strict';
+
+ var Arr = (typeof Uint8Array !== 'undefined')
+ ? Uint8Array
+ : Array
+
+ var PLUS = '+'.charCodeAt(0)
+ var SLASH = '/'.charCodeAt(0)
+ var NUMBER = '0'.charCodeAt(0)
+ var LOWER = 'a'.charCodeAt(0)
+ var UPPER = 'A'.charCodeAt(0)
+ var PLUS_URL_SAFE = '-'.charCodeAt(0)
+ var SLASH_URL_SAFE = '_'.charCodeAt(0)
+
+ function decode (elt) {
+ var code = elt.charCodeAt(0)
+ if (code === PLUS ||
+ code === PLUS_URL_SAFE)
+ return 62 // '+'
+ if (code === SLASH ||
+ code === SLASH_URL_SAFE)
+ return 63 // '/'
+ if (code < NUMBER)
+ return -1 //no match
+ if (code < NUMBER + 10)
+ return code - NUMBER + 26 + 26
+ if (code < UPPER + 26)
+ return code - UPPER
+ if (code < LOWER + 26)
+ return code - LOWER + 26
+ }
+
+ function b64ToByteArray (b64) {
+ var i, j, l, tmp, placeHolders, arr
+
+ if (b64.length % 4 > 0) {
+ throw new Error('Invalid string. Length must be a multiple of 4')
+ }
+
+ // the number of equal signs (place holders)
+ // if there are two placeholders, than the two characters before it
+ // represent one byte
+ // if there is only one, then the three characters before it represent 2 bytes
+ // this is just a cheap hack to not do indexOf twice
+ var len = b64.length
+ placeHolders = '=' === b64.charAt(len - 2) ? 2 : '=' === b64.charAt(len - 1) ? 1 : 0
+
+ // base64 is 4/3 + up to two characters of the original data
+ arr = new Arr(b64.length * 3 / 4 - placeHolders)
+
+ // if there are placeholders, only get up to the last complete 4 chars
+ l = placeHolders > 0 ? b64.length - 4 : b64.length
+
+ var L = 0
+
+ function push (v) {
+ arr[L++] = v
+ }
+
+ for (i = 0, j = 0; i < l; i += 4, j += 3) {
+ tmp = (decode(b64.charAt(i)) << 18) | (decode(b64.charAt(i + 1)) << 12) | (decode(b64.charAt(i + 2)) << 6) | decode(b64.charAt(i + 3))
+ push((tmp & 0xFF0000) >> 16)
+ push((tmp & 0xFF00) >> 8)
+ push(tmp & 0xFF)
+ }
+
+ if (placeHolders === 2) {
+ tmp = (decode(b64.charAt(i)) << 2) | (decode(b64.charAt(i + 1)) >> 4)
+ push(tmp & 0xFF)
+ } else if (placeHolders === 1) {
+ tmp = (decode(b64.charAt(i)) << 10) | (decode(b64.charAt(i + 1)) << 4) | (decode(b64.charAt(i + 2)) >> 2)
+ push((tmp >> 8) & 0xFF)
+ push(tmp & 0xFF)
+ }
+
+ return arr
+ }
+
+ function uint8ToBase64 (uint8) {
+ var i,
+ extraBytes = uint8.length % 3, // if we have 1 byte left, pad 2 bytes
+ output = "",
+ temp, length
+
+ function encode (num) {
+ return lookup.charAt(num)
+ }
+
+ function tripletToBase64 (num) {
+ return encode(num >> 18 & 0x3F) + encode(num >> 12 & 0x3F) + encode(num >> 6 & 0x3F) + encode(num & 0x3F)
+ }
+
+ // go through the array every three bytes, we'll deal with trailing stuff later
+ for (i = 0, length = uint8.length - extraBytes; i < length; i += 3) {
+ temp = (uint8[i] << 16) + (uint8[i + 1] << 8) + (uint8[i + 2])
+ output += tripletToBase64(temp)
+ }
+
+ // pad the end with zeros, but make sure to not forget the extra bytes
+ switch (extraBytes) {
+ case 1:
+ temp = uint8[uint8.length - 1]
+ output += encode(temp >> 2)
+ output += encode((temp << 4) & 0x3F)
+ output += '=='
+ break
+ case 2:
+ temp = (uint8[uint8.length - 2] << 8) + (uint8[uint8.length - 1])
+ output += encode(temp >> 10)
+ output += encode((temp >> 4) & 0x3F)
+ output += encode((temp << 2) & 0x3F)
+ output += '='
+ break
+ }
+
+ return output
+ }
+
+ exports.toByteArray = b64ToByteArray
+ exports.fromByteArray = uint8ToBase64
+}(typeof exports === 'undefined' ? (this.base64js = {}) : exports))
+
+},{}],4:[function(require,module,exports){
+exports.read = function (buffer, offset, isLE, mLen, nBytes) {
+ var e, m
+ var eLen = nBytes * 8 - mLen - 1
+ var eMax = (1 << eLen) - 1
+ var eBias = eMax >> 1
+ var nBits = -7
+ var i = isLE ? (nBytes - 1) : 0
+ var d = isLE ? -1 : 1
+ var s = buffer[offset + i]
+
+ i += d
+
+ e = s & ((1 << (-nBits)) - 1)
+ s >>= (-nBits)
+ nBits += eLen
+ for (; nBits > 0; e = e * 256 + buffer[offset + i], i += d, nBits -= 8) {}
+
+ m = e & ((1 << (-nBits)) - 1)
+ e >>= (-nBits)
+ nBits += mLen
+ for (; nBits > 0; m = m * 256 + buffer[offset + i], i += d, nBits -= 8) {}
+
+ if (e === 0) {
+ e = 1 - eBias
+ } else if (e === eMax) {
+ return m ? NaN : ((s ? -1 : 1) * Infinity)
+ } else {
+ m = m + Math.pow(2, mLen)
+ e = e - eBias
+ }
+ return (s ? -1 : 1) * m * Math.pow(2, e - mLen)
+}
+
+exports.write = function (buffer, value, offset, isLE, mLen, nBytes) {
+ var e, m, c
+ var eLen = nBytes * 8 - mLen - 1
+ var eMax = (1 << eLen) - 1
+ var eBias = eMax >> 1
+ var rt = (mLen === 23 ? Math.pow(2, -24) - Math.pow(2, -77) : 0)
+ var i = isLE ? 0 : (nBytes - 1)
+ var d = isLE ? 1 : -1
+ var s = value < 0 || (value === 0 && 1 / value < 0) ? 1 : 0
+
+ value = Math.abs(value)
+
+ if (isNaN(value) || value === Infinity) {
+ m = isNaN(value) ? 1 : 0
+ e = eMax
+ } else {
+ e = Math.floor(Math.log(value) / Math.LN2)
+ if (value * (c = Math.pow(2, -e)) < 1) {
+ e--
+ c *= 2
+ }
+ if (e + eBias >= 1) {
+ value += rt / c
+ } else {
+ value += rt * Math.pow(2, 1 - eBias)
+ }
+ if (value * c >= 2) {
+ e++
+ c /= 2
+ }
+
+ if (e + eBias >= eMax) {
+ m = 0
+ e = eMax
+ } else if (e + eBias >= 1) {
+ m = (value * c - 1) * Math.pow(2, mLen)
+ e = e + eBias
+ } else {
+ m = value * Math.pow(2, eBias - 1) * Math.pow(2, mLen)
+ e = 0
+ }
+ }
+
+ for (; mLen >= 8; buffer[offset + i] = m & 0xff, i += d, m /= 256, mLen -= 8) {}
+
+ e = (e << mLen) | m
+ eLen += mLen
+ for (; eLen > 0; buffer[offset + i] = e & 0xff, i += d, e /= 256, eLen -= 8) {}
+
+ buffer[offset + i - d] |= s * 128
+}
+
+},{}],5:[function(require,module,exports){
+
+/**
+ * isArray
+ */
+
+var isArray = Array.isArray;
+
+/**
+ * toString
+ */
+
+var str = Object.prototype.toString;
+
+/**
+ * Whether or not the given `val`
+ * is an array.
+ *
+ * example:
+ *
+ * isArray([]);
+ * // > true
+ * isArray(arguments);
+ * // > false
+ * isArray('');
+ * // > false
+ *
+ * @param {mixed} val
+ * @return {bool}
+ */
+
+module.exports = isArray || function (val) {
+ return !! val && '[object Array]' == str.call(val);
+};
+
+},{}],6:[function(require,module,exports){
+// Copyright Joyent, Inc. and other Node contributors.
+//
+// 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.
+
+function EventEmitter() {
+ this._events = this._events || {};
+ this._maxListeners = this._maxListeners || undefined;
+}
+module.exports = EventEmitter;
+
+// Backwards-compat with node 0.10.x
+EventEmitter.EventEmitter = EventEmitter;
+
+EventEmitter.prototype._events = undefined;
+EventEmitter.prototype._maxListeners = undefined;
+
+// By default EventEmitters will print a warning if more than 10 listeners are
+// added to it. This is a useful default which helps finding memory leaks.
+EventEmitter.defaultMaxListeners = 10;
+
+// Obviously not all Emitters should be limited to 10. This function allows
+// that to be increased. Set to zero for unlimited.
+EventEmitter.prototype.setMaxListeners = function(n) {
+ if (!isNumber(n) || n < 0 || isNaN(n))
+ throw TypeError('n must be a positive number');
+ this._maxListeners = n;
+ return this;
+};
+
+EventEmitter.prototype.emit = function(type) {
+ var er, handler, len, args, i, listeners;
+
+ if (!this._events)
+ this._events = {};
+
+ // If there is no 'error' event listener then throw.
+ if (type === 'error') {
+ if (!this._events.error ||
+ (isObject(this._events.error) && !this._events.error.length)) {
+ er = arguments[1];
+ if (er instanceof Error) {
+ throw er; // Unhandled 'error' event
+ }
+ throw TypeError('Uncaught, unspecified "error" event.');
+ }
+ }
+
+ handler = this._events[type];
+
+ if (isUndefined(handler))
+ return false;
+
+ if (isFunction(handler)) {
+ switch (arguments.length) {
+ // fast cases
+ case 1:
+ handler.call(this);
+ break;
+ case 2:
+ handler.call(this, arguments[1]);
+ break;
+ case 3:
+ handler.call(this, arguments[1], arguments[2]);
+ break;
+ // slower
+ default:
+ len = arguments.length;
+ args = new Array(len - 1);
+ for (i = 1; i < len; i++)
+ args[i - 1] = arguments[i];
+ handler.apply(this, args);
+ }
+ } else if (isObject(handler)) {
+ len = arguments.length;
+ args = new Array(len - 1);
+ for (i = 1; i < len; i++)
+ args[i - 1] = arguments[i];
+
+ listeners = handler.slice();
+ len = listeners.length;
+ for (i = 0; i < len; i++)
+ listeners[i].apply(this, args);
+ }
+
+ return true;
+};
+
+EventEmitter.prototype.addListener = function(type, listener) {
+ var m;
+
+ if (!isFunction(listener))
+ throw TypeError('listener must be a function');
+
+ if (!this._events)
+ this._events = {};
+
+ // To avoid recursion in the case that type === "newListener"! Before
+ // adding it to the listeners, first emit "newListener".
+ if (this._events.newListener)
+ this.emit('newListener', type,
+ isFunction(listener.listener) ?
+ listener.listener : listener);
+
+ if (!this._events[type])
+ // Optimize the case of one listener. Don't need the extra array object.
+ this._events[type] = listener;
+ else if (isObject(this._events[type]))
+ // If we've already got an array, just append.
+ this._events[type].push(listener);
+ else
+ // Adding the second element, need to change to array.
+ this._events[type] = [this._events[type], listener];
+
+ // Check for listener leak
+ if (isObject(this._events[type]) && !this._events[type].warned) {
+ var m;
+ if (!isUndefined(this._maxListeners)) {
+ m = this._maxListeners;
+ } else {
+ m = EventEmitter.defaultMaxListeners;
+ }
+
+ if (m && m > 0 && this._events[type].length > m) {
+ this._events[type].warned = true;
+ console.error('(node) warning: possible EventEmitter memory ' +
+ 'leak detected. %d listeners added. ' +
+ 'Use emitter.setMaxListeners() to increase limit.',
+ this._events[type].length);
+ if (typeof console.trace === 'function') {
+ // not supported in IE 10
+ console.trace();
+ }
+ }
+ }
+
+ return this;
+};
+
+EventEmitter.prototype.on = EventEmitter.prototype.addListener;
+
+EventEmitter.prototype.once = function(type, listener) {
+ if (!isFunction(listener))
+ throw TypeError('listener must be a function');
+
+ var fired = false;
+
+ function g() {
+ this.removeListener(type, g);
+
+ if (!fired) {
+ fired = true;
+ listener.apply(this, arguments);
+ }
+ }
+
+ g.listener = listener;
+ this.on(type, g);
+
+ return this;
+};
+
+// emits a 'removeListener' event iff the listener was removed
+EventEmitter.prototype.removeListener = function(type, listener) {
+ var list, position, length, i;
+
+ if (!isFunction(listener))
+ throw TypeError('listener must be a function');
+
+ if (!this._events || !this._events[type])
+ return this;
+
+ list = this._events[type];
+ length = list.length;
+ position = -1;
+
+ if (list === listener ||
+ (isFunction(list.listener) && list.listener === listener)) {
+ delete this._events[type];
+ if (this._events.removeListener)
+ this.emit('removeListener', type, listener);
+
+ } else if (isObject(list)) {
+ for (i = length; i-- > 0;) {
+ if (list[i] === listener ||
+ (list[i].listener && list[i].listener === listener)) {
+ position = i;
+ break;
+ }
+ }
+
+ if (position < 0)
+ return this;
+
+ if (list.length === 1) {
+ list.length = 0;
+ delete this._events[type];
+ } else {
+ list.splice(position, 1);
+ }
+
+ if (this._events.removeListener)
+ this.emit('removeListener', type, listener);
+ }
+
+ return this;
+};
+
+EventEmitter.prototype.removeAllListeners = function(type) {
+ var key, listeners;
+
+ if (!this._events)
+ return this;
+
+ // not listening for removeListener, no need to emit
+ if (!this._events.removeListener) {
+ if (arguments.length === 0)
+ this._events = {};
+ else if (this._events[type])
+ delete this._events[type];
+ return this;
+ }
+
+ // emit removeListener for all listeners on all events
+ if (arguments.length === 0) {
+ for (key in this._events) {
+ if (key === 'removeListener') continue;
+ this.removeAllListeners(key);
+ }
+ this.removeAllListeners('removeListener');
+ this._events = {};
+ return this;
+ }
+
+ listeners = this._events[type];
+
+ if (isFunction(listeners)) {
+ this.removeListener(type, listeners);
+ } else {
+ // LIFO order
+ while (listeners.length)
+ this.removeListener(type, listeners[listeners.length - 1]);
+ }
+ delete this._events[type];
+
+ return this;
+};
+
+EventEmitter.prototype.listeners = function(type) {
+ var ret;
+ if (!this._events || !this._events[type])
+ ret = [];
+ else if (isFunction(this._events[type]))
+ ret = [this._events[type]];
+ else
+ ret = this._events[type].slice();
+ return ret;
+};
+
+EventEmitter.listenerCount = function(emitter, type) {
+ var ret;
+ if (!emitter._events || !emitter._events[type])
+ ret = 0;
+ else if (isFunction(emitter._events[type]))
+ ret = 1;
+ else
+ ret = emitter._events[type].length;
+ return ret;
+};
+
+function isFunction(arg) {
+ return typeof arg === 'function';
+}
+
+function isNumber(arg) {
+ return typeof arg === 'number';
+}
+
+function isObject(arg) {
+ return typeof arg === 'object' && arg !== null;
+}
+
+function isUndefined(arg) {
+ return arg === void 0;
+}
+
+},{}],7:[function(require,module,exports){
+if (typeof Object.create === 'function') {
+ // implementation from standard node.js 'util' module
+ module.exports = function inherits(ctor, superCtor) {
+ ctor.super_ = superCtor
+ ctor.prototype = Object.create(superCtor.prototype, {
+ constructor: {
+ value: ctor,
+ enumerable: false,
+ writable: true,
+ configurable: true
+ }
+ });
+ };
+} else {
+ // old school shim for old browsers
+ module.exports = function inherits(ctor, superCtor) {
+ ctor.super_ = superCtor
+ var TempCtor = function () {}
+ TempCtor.prototype = superCtor.prototype
+ ctor.prototype = new TempCtor()
+ ctor.prototype.constructor = ctor
+ }
+}
+
+},{}],8:[function(require,module,exports){
+module.exports = Array.isArray || function (arr) {
+ return Object.prototype.toString.call(arr) == '[object Array]';
+};
+
+},{}],9:[function(require,module,exports){
+// shim for using process in browser
+
+var process = module.exports = {};
+var queue = [];
+var draining = false;
+var currentQueue;
+var queueIndex = -1;
+
+function cleanUpNextTick() {
+ draining = false;
+ if (currentQueue.length) {
+ queue = currentQueue.concat(queue);
+ } else {
+ queueIndex = -1;
+ }
+ if (queue.length) {
+ drainQueue();
+ }
+}
+
+function drainQueue() {
+ if (draining) {
return;
}
- this.hadstuncandidate = false;
- this.hadturncandidate = false;
- this.lasticecandidate = false;
- this.peerconnection.onicecandidate = function (event) {
- self.sendIceCandidate(event.candidate);
- };
- this.peerconnection.onaddstream = function (event) {
- self.remoteStream = event.stream;
- self.remoteStreams.push(event.stream);
- $(document).trigger('remotestreamadded.jingle', [event, self.sid]);
- };
- this.peerconnection.onremovestream = function (event) {
- self.remoteStream = null;
- // FIXME: remove from this.remoteStreams
- $(document).trigger('remotestreamremoved.jingle', [event, self.sid]);
- };
- this.peerconnection.onsignalingstatechange = function (event) {
- if (!(self && self.peerconnection)) return;
- };
- this.peerconnection.oniceconnectionstatechange = function (event) {
- if (!(self && self.peerconnection)) return;
- switch (self.peerconnection.iceConnectionState) {
- case 'connected':
- this.startTime = new Date();
- break;
- case 'disconnected':
- this.stopTime = new Date();
- break;
+ var timeout = setTimeout(cleanUpNextTick);
+ draining = true;
+
+ var len = queue.length;
+ while(len) {
+ currentQueue = queue;
+ queue = [];
+ while (++queueIndex < len) {
+ currentQueue[queueIndex].run();
}
- $(document).trigger('iceconnectionstatechange.jingle', [self.sid, self]);
- };
- // add any local and relayed stream
- this.localStreams.forEach(function(stream) {
- self.peerconnection.addStream(stream);
+ queueIndex = -1;
+ len = queue.length;
+ }
+ currentQueue = null;
+ draining = false;
+ clearTimeout(timeout);
+}
+
+process.nextTick = function (fun) {
+ var args = new Array(arguments.length - 1);
+ if (arguments.length > 1) {
+ for (var i = 1; i < arguments.length; i++) {
+ args[i - 1] = arguments[i];
+ }
+ }
+ queue.push(new Item(fun, args));
+ if (queue.length === 1 && !draining) {
+ setTimeout(drainQueue, 0);
+ }
+};
+
+// v8 likes predictible objects
+function Item(fun, array) {
+ this.fun = fun;
+ this.array = array;
+}
+Item.prototype.run = function () {
+ this.fun.apply(null, this.array);
+};
+process.title = 'browser';
+process.browser = true;
+process.env = {};
+process.argv = [];
+process.version = ''; // empty string to avoid regexp issues
+process.versions = {};
+
+function noop() {}
+
+process.on = noop;
+process.addListener = noop;
+process.once = noop;
+process.off = noop;
+process.removeListener = noop;
+process.removeAllListeners = noop;
+process.emit = noop;
+
+process.binding = function (name) {
+ throw new Error('process.binding is not supported');
+};
+
+// TODO(shtylman)
+process.cwd = function () { return '/' };
+process.chdir = function (dir) {
+ throw new Error('process.chdir is not supported');
+};
+process.umask = function() { return 0; };
+
+},{}],10:[function(require,module,exports){
+module.exports = require("./lib/_stream_duplex.js")
+
+},{"./lib/_stream_duplex.js":11}],11:[function(require,module,exports){
+(function (process){
+// Copyright Joyent, Inc. and other Node contributors.
+//
+// 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.
+
+// a duplex stream is just a stream that is both readable and writable.
+// Since JS doesn't have multiple prototypal inheritance, this class
+// prototypally inherits from Readable, and then parasitically from
+// Writable.
+
+module.exports = Duplex;
+
+/*<replacement>*/
+var objectKeys = Object.keys || function (obj) {
+ var keys = [];
+ for (var key in obj) keys.push(key);
+ return keys;
+}
+/*</replacement>*/
+
+
+/*<replacement>*/
+var util = require('core-util-is');
+util.inherits = require('inherits');
+/*</replacement>*/
+
+var Readable = require('./_stream_readable');
+var Writable = require('./_stream_writable');
+
+util.inherits(Duplex, Readable);
+
+forEach(objectKeys(Writable.prototype), function(method) {
+ if (!Duplex.prototype[method])
+ Duplex.prototype[method] = Writable.prototype[method];
+});
+
+function Duplex(options) {
+ if (!(this instanceof Duplex))
+ return new Duplex(options);
+
+ Readable.call(this, options);
+ Writable.call(this, options);
+
+ if (options && options.readable === false)
+ this.readable = false;
+
+ if (options && options.writable === false)
+ this.writable = false;
+
+ this.allowHalfOpen = true;
+ if (options && options.allowHalfOpen === false)
+ this.allowHalfOpen = false;
+
+ this.once('end', onend);
+}
+
+// the no-half-open enforcer
+function onend() {
+ // if we allow half-open state, or if the writable side ended,
+ // then we're ok.
+ if (this.allowHalfOpen || this._writableState.ended)
+ return;
+
+ // no more data can be written.
+ // But allow more writes to happen in this tick.
+ process.nextTick(this.end.bind(this));
+}
+
+function forEach (xs, f) {
+ for (var i = 0, l = xs.length; i < l; i++) {
+ f(xs[i], i);
+ }
+}
+
+}).call(this,require('_process'))
+},{"./_stream_readable":13,"./_stream_writable":15,"_process":9,"core-util-is":16,"inherits":7}],12:[function(require,module,exports){
+// Copyright Joyent, Inc. and other Node contributors.
+//
+// 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.
+
+// a passthrough stream.
+// basically just the most minimal sort of Transform stream.
+// Every written chunk gets output as-is.
+
+module.exports = PassThrough;
+
+var Transform = require('./_stream_transform');
+
+/*<replacement>*/
+var util = require('core-util-is');
+util.inherits = require('inherits');
+/*</replacement>*/
+
+util.inherits(PassThrough, Transform);
+
+function PassThrough(options) {
+ if (!(this instanceof PassThrough))
+ return new PassThrough(options);
+
+ Transform.call(this, options);
+}
+
+PassThrough.prototype._transform = function(chunk, encoding, cb) {
+ cb(null, chunk);
+};
+
+},{"./_stream_transform":14,"core-util-is":16,"inherits":7}],13:[function(require,module,exports){
+(function (process){
+// Copyright Joyent, Inc. and other Node contributors.
+//
+// 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.
+
+module.exports = Readable;
+
+/*<replacement>*/
+var isArray = require('isarray');
+/*</replacement>*/
+
+
+/*<replacement>*/
+var Buffer = require('buffer').Buffer;
+/*</replacement>*/
+
+Readable.ReadableState = ReadableState;
+
+var EE = require('events').EventEmitter;
+
+/*<replacement>*/
+if (!EE.listenerCount) EE.listenerCount = function(emitter, type) {
+ return emitter.listeners(type).length;
+};
+/*</replacement>*/
+
+var Stream = require('stream');
+
+/*<replacement>*/
+var util = require('core-util-is');
+util.inherits = require('inherits');
+/*</replacement>*/
+
+var StringDecoder;
+
+
+/*<replacement>*/
+var debug = require('util');
+if (debug && debug.debuglog) {
+ debug = debug.debuglog('stream');
+} else {
+ debug = function () {};
+}
+/*</replacement>*/
+
+
+util.inherits(Readable, Stream);
+
+function ReadableState(options, stream) {
+ var Duplex = require('./_stream_duplex');
+
+ options = options || {};
+
+ // the point at which it stops calling _read() to fill the buffer
+ // Note: 0 is a valid value, means "don't call _read preemptively ever"
+ var hwm = options.highWaterMark;
+ var defaultHwm = options.objectMode ? 16 : 16 * 1024;
+ this.highWaterMark = (hwm || hwm === 0) ? hwm : defaultHwm;
+
+ // cast to ints.
+ this.highWaterMark = ~~this.highWaterMark;
+
+ this.buffer = [];
+ this.length = 0;
+ this.pipes = null;
+ this.pipesCount = 0;
+ this.flowing = null;
+ this.ended = false;
+ this.endEmitted = false;
+ this.reading = false;
+
+ // a flag to be able to tell if the onwrite cb is called immediately,
+ // or on a later tick. We set this to true at first, because any
+ // actions that shouldn't happen until "later" should generally also
+ // not happen before the first write call.
+ this.sync = true;
+
+ // whenever we return null, then we set a flag to say
+ // that we're awaiting a 'readable' event emission.
+ this.needReadable = false;
+ this.emittedReadable = false;
+ this.readableListening = false;
+
+
+ // object stream flag. Used to make read(n) ignore n and to
+ // make all the buffer merging and length checks go away
+ this.objectMode = !!options.objectMode;
+
+ if (stream instanceof Duplex)
+ this.objectMode = this.objectMode || !!options.readableObjectMode;
+
+ // Crypto is kind of old and crusty. Historically, its default string
+ // encoding is 'binary' so we have to make this configurable.
+ // Everything else in the universe uses 'utf8', though.
+ this.defaultEncoding = options.defaultEncoding || 'utf8';
+
+ // when piping, we only care about 'readable' events that happen
+ // after read()ing all the bytes and not getting any pushback.
+ this.ranOut = false;
+
+ // the number of writers that are awaiting a drain event in .pipe()s
+ this.awaitDrain = 0;
+
+ // if true, a maybeReadMore has been scheduled
+ this.readingMore = false;
+
+ this.decoder = null;
+ this.encoding = null;
+ if (options.encoding) {
+ if (!StringDecoder)
+ StringDecoder = require('string_decoder/').StringDecoder;
+ this.decoder = new StringDecoder(options.encoding);
+ this.encoding = options.encoding;
+ }
+}
+
+function Readable(options) {
+ var Duplex = require('./_stream_duplex');
+
+ if (!(this instanceof Readable))
+ return new Readable(options);
+
+ this._readableState = new ReadableState(options, this);
+
+ // legacy
+ this.readable = true;
+
+ Stream.call(this);
+}
+
+// Manually shove something into the read() buffer.
+// This returns true if the highWaterMark has not been hit yet,
+// similar to how Writable.write() returns true if you should
+// write() some more.
+Readable.prototype.push = function(chunk, encoding) {
+ var state = this._readableState;
+
+ if (util.isString(chunk) && !state.objectMode) {
+ encoding = encoding || state.defaultEncoding;
+ if (encoding !== state.encoding) {
+ chunk = new Buffer(chunk, encoding);
+ encoding = '';
+ }
+ }
+
+ return readableAddChunk(this, state, chunk, encoding, false);
+};
+
+// Unshift should *always* be something directly out of read()
+Readable.prototype.unshift = function(chunk) {
+ var state = this._readableState;
+ return readableAddChunk(this, state, chunk, '', true);
+};
+
+function readableAddChunk(stream, state, chunk, encoding, addToFront) {
+ var er = chunkInvalid(state, chunk);
+ if (er) {
+ stream.emit('error', er);
+ } else if (util.isNullOrUndefined(chunk)) {
+ state.reading = false;
+ if (!state.ended)
+ onEofChunk(stream, state);
+ } else if (state.objectMode || chunk && chunk.length > 0) {
+ if (state.ended && !addToFront) {
+ var e = new Error('stream.push() after EOF');
+ stream.emit('error', e);
+ } else if (state.endEmitted && addToFront) {
+ var e = new Error('stream.unshift() after end event');
+ stream.emit('error', e);
+ } else {
+ if (state.decoder && !addToFront && !encoding)
+ chunk = state.decoder.write(chunk);
+
+ if (!addToFront)
+ state.reading = false;
+
+ // if we want the data now, just emit it.
+ if (state.flowing && state.length === 0 && !state.sync) {
+ stream.emit('data', chunk);
+ stream.read(0);
+ } else {
+ // update the buffer info.
+ state.length += state.objectMode ? 1 : chunk.length;
+ if (addToFront)
+ state.buffer.unshift(chunk);
+ else
+ state.buffer.push(chunk);
+
+ if (state.needReadable)
+ emitReadable(stream);
+ }
+
+ maybeReadMore(stream, state);
+ }
+ } else if (!addToFront) {
+ state.reading = false;
+ }
+
+ return needMoreData(state);
+}
+
+
+
+// if it's past the high water mark, we can push in some more.
+// Also, if we have no data yet, we can stand some
+// more bytes. This is to work around cases where hwm=0,
+// such as the repl. Also, if the push() triggered a
+// readable event, and the user called read(largeNumber) such that
+// needReadable was set, then we ought to push more, so that another
+// 'readable' event will be triggered.
+function needMoreData(state) {
+ return !state.ended &&
+ (state.needReadable ||
+ state.length < state.highWaterMark ||
+ state.length === 0);
+}
+
+// backwards compatibility.
+Readable.prototype.setEncoding = function(enc) {
+ if (!StringDecoder)
+ StringDecoder = require('string_decoder/').StringDecoder;
+ this._readableState.decoder = new StringDecoder(enc);
+ this._readableState.encoding = enc;
+ return this;
+};
+
+// Don't raise the hwm > 128MB
+var MAX_HWM = 0x800000;
+function roundUpToNextPowerOf2(n) {
+ if (n >= MAX_HWM) {
+ n = MAX_HWM;
+ } else {
+ // Get the next highest power of 2
+ n--;
+ for (var p = 1; p < 32; p <<= 1) n |= n >> p;
+ n++;
+ }
+ return n;
+}
+
+function howMuchToRead(n, state) {
+ if (state.length === 0 && state.ended)
+ return 0;
+
+ if (state.objectMode)
+ return n === 0 ? 0 : 1;
+
+ if (isNaN(n) || util.isNull(n)) {
+ // only flow one buffer at a time
+ if (state.flowing && state.buffer.length)
+ return state.buffer[0].length;
+ else
+ return state.length;
+ }
+
+ if (n <= 0)
+ return 0;
+
+ // If we're asking for more than the target buffer level,
+ // then raise the water mark. Bump up to the next highest
+ // power of 2, to prevent increasing it excessively in tiny
+ // amounts.
+ if (n > state.highWaterMark)
+ state.highWaterMark = roundUpToNextPowerOf2(n);
+
+ // don't have that much. return null, unless we've ended.
+ if (n > state.length) {
+ if (!state.ended) {
+ state.needReadable = true;
+ return 0;
+ } else
+ return state.length;
+ }
+
+ return n;
+}
+
+// you can override either this method, or the async _read(n) below.
+Readable.prototype.read = function(n) {
+ debug('read', n);
+ var state = this._readableState;
+ var nOrig = n;
+
+ if (!util.isNumber(n) || n > 0)
+ state.emittedReadable = false;
+
+ // if we're doing read(0) to trigger a readable event, but we
+ // already have a bunch of data in the buffer, then just trigger
+ // the 'readable' event and move on.
+ if (n === 0 &&
+ state.needReadable &&
+ (state.length >= state.highWaterMark || state.ended)) {
+ debug('read: emitReadable', state.length, state.ended);
+ if (state.length === 0 && state.ended)
+ endReadable(this);
+ else
+ emitReadable(this);
+ return null;
+ }
+
+ n = howMuchToRead(n, state);
+
+ // if we've ended, and we're now clear, then finish it up.
+ if (n === 0 && state.ended) {
+ if (state.length === 0)
+ endReadable(this);
+ return null;
+ }
+
+ // All the actual chunk generation logic needs to be
+ // *below* the call to _read. The reason is that in certain
+ // synthetic stream cases, such as passthrough streams, _read
+ // may be a completely synchronous operation which may change
+ // the state of the read buffer, providing enough data when
+ // before there was *not* enough.
+ //
+ // So, the steps are:
+ // 1. Figure out what the state of things will be after we do
+ // a read from the buffer.
+ //
+ // 2. If that resulting state will trigger a _read, then call _read.
+ // Note that this may be asynchronous, or synchronous. Yes, it is
+ // deeply ugly to write APIs this way, but that still doesn't mean
+ // that the Readable class should behave improperly, as streams are
+ // designed to be sync/async agnostic.
+ // Take note if the _read call is sync or async (ie, if the read call
+ // has returned yet), so that we know whether or not it's safe to emit
+ // 'readable' etc.
+ //
+ // 3. Actually pull the requested chunks out of the buffer and return.
+
+ // if we need a readable event, then we need to do some reading.
+ var doRead = state.needReadable;
+ debug('need readable', doRead);
+
+ // if we currently have less than the highWaterMark, then also read some
+ if (state.length === 0 || state.length - n < state.highWaterMark) {
+ doRead = true;
+ debug('length less than watermark', doRead);
+ }
+
+ // however, if we've ended, then there's no point, and if we're already
+ // reading, then it's unnecessary.
+ if (state.ended || state.reading) {
+ doRead = false;
+ debug('reading or ended', doRead);
+ }
+
+ if (doRead) {
+ debug('do read');
+ state.reading = true;
+ state.sync = true;
+ // if the length is currently zero, then we *need* a readable event.
+ if (state.length === 0)
+ state.needReadable = true;
+ // call internal read method
+ this._read(state.highWaterMark);
+ state.sync = false;
+ }
+
+ // If _read pushed data synchronously, then `reading` will be false,
+ // and we need to re-evaluate how much data we can return to the user.
+ if (doRead && !state.reading)
+ n = howMuchToRead(nOrig, state);
+
+ var ret;
+ if (n > 0)
+ ret = fromList(n, state);
+ else
+ ret = null;
+
+ if (util.isNull(ret)) {
+ state.needReadable = true;
+ n = 0;
+ }
+
+ state.length -= n;
+
+ // If we have nothing in the buffer, then we want to know
+ // as soon as we *do* get something into the buffer.
+ if (state.length === 0 && !state.ended)
+ state.needReadable = true;
+
+ // If we tried to read() past the EOF, then emit end on the next tick.
+ if (nOrig !== n && state.ended && state.length === 0)
+ endReadable(this);
+
+ if (!util.isNull(ret))
+ this.emit('data', ret);
+
+ return ret;
+};
+
+function chunkInvalid(state, chunk) {
+ var er = null;
+ if (!util.isBuffer(chunk) &&
+ !util.isString(chunk) &&
+ !util.isNullOrUndefined(chunk) &&
+ !state.objectMode) {
+ er = new TypeError('Invalid non-string/buffer chunk');
+ }
+ return er;
+}
+
+
+function onEofChunk(stream, state) {
+ if (state.decoder && !state.ended) {
+ var chunk = state.decoder.end();
+ if (chunk && chunk.length) {
+ state.buffer.push(chunk);
+ state.length += state.objectMode ? 1 : chunk.length;
+ }
+ }
+ state.ended = true;
+
+ // emit 'readable' now to make sure it gets picked up.
+ emitReadable(stream);
+}
+
+// Don't emit readable right away in sync mode, because this can trigger
+// another read() call => stack overflow. This way, it might trigger
+// a nextTick recursion warning, but that's not so bad.
+function emitReadable(stream) {
+ var state = stream._readableState;
+ state.needReadable = false;
+ if (!state.emittedReadable) {
+ debug('emitReadable', state.flowing);
+ state.emittedReadable = true;
+ if (state.sync)
+ process.nextTick(function() {
+ emitReadable_(stream);
+ });
+ else
+ emitReadable_(stream);
+ }
+}
+
+function emitReadable_(stream) {
+ debug('emit readable');
+ stream.emit('readable');
+ flow(stream);
+}
+
+
+// at this point, the user has presumably seen the 'readable' event,
+// and called read() to consume some data. that may have triggered
+// in turn another _read(n) call, in which case reading = true if
+// it's in progress.
+// However, if we're not ended, or reading, and the length < hwm,
+// then go ahead and try to read some more preemptively.
+function maybeReadMore(stream, state) {
+ if (!state.readingMore) {
+ state.readingMore = true;
+ process.nextTick(function() {
+ maybeReadMore_(stream, state);
});
- this.relayedStreams.forEach(function(stream) {
- self.peerconnection.addStream(stream);
+ }
+}
+
+function maybeReadMore_(stream, state) {
+ var len = state.length;
+ while (!state.reading && !state.flowing && !state.ended &&
+ state.length < state.highWaterMark) {
+ debug('maybeReadMore read 0');
+ stream.read(0);
+ if (len === state.length)
+ // didn't get any data, stop spinning.
+ break;
+ else
+ len = state.length;
+ }
+ state.readingMore = false;
+}
+
+// abstract method. to be overridden in specific implementation classes.
+// call cb(er, data) where data is <= n in length.
+// for virtual (non-string, non-buffer) streams, "length" is somewhat
+// arbitrary, and perhaps not very meaningful.
+Readable.prototype._read = function(n) {
+ this.emit('error', new Error('not implemented'));
+};
+
+Readable.prototype.pipe = function(dest, pipeOpts) {
+ var src = this;
+ var state = this._readableState;
+
+ switch (state.pipesCount) {
+ case 0:
+ state.pipes = dest;
+ break;
+ case 1:
+ state.pipes = [state.pipes, dest];
+ break;
+ default:
+ state.pipes.push(dest);
+ break;
+ }
+ state.pipesCount += 1;
+ debug('pipe count=%d opts=%j', state.pipesCount, pipeOpts);
+
+ var doEnd = (!pipeOpts || pipeOpts.end !== false) &&
+ dest !== process.stdout &&
+ dest !== process.stderr;
+
+ var endFn = doEnd ? onend : cleanup;
+ if (state.endEmitted)
+ process.nextTick(endFn);
+ else
+ src.once('end', endFn);
+
+ dest.on('unpipe', onunpipe);
+ function onunpipe(readable) {
+ debug('onunpipe');
+ if (readable === src) {
+ cleanup();
+ }
+ }
+
+ function onend() {
+ debug('onend');
+ dest.end();
+ }
+
+ // when the dest drains, it reduces the awaitDrain counter
+ // on the source. This would be more elegant with a .once()
+ // handler in flow(), but adding and removing repeatedly is
+ // too slow.
+ var ondrain = pipeOnDrain(src);
+ dest.on('drain', ondrain);
+
+ function cleanup() {
+ debug('cleanup');
+ // cleanup event handlers once the pipe is broken
+ dest.removeListener('close', onclose);
+ dest.removeListener('finish', onfinish);
+ dest.removeListener('drain', ondrain);
+ dest.removeListener('error', onerror);
+ dest.removeListener('unpipe', onunpipe);
+ src.removeListener('end', onend);
+ src.removeListener('end', cleanup);
+ src.removeListener('data', ondata);
+
+ // if the reader is waiting for a drain event from this
+ // specific writer, then it would cause it to never start
+ // flowing again.
+ // So, if this is awaiting a drain, then we just call it now.
+ // If we don't know, then assume that we are waiting for one.
+ if (state.awaitDrain &&
+ (!dest._writableState || dest._writableState.needDrain))
+ ondrain();
+ }
+
+ src.on('data', ondata);
+ function ondata(chunk) {
+ debug('ondata');
+ var ret = dest.write(chunk);
+ if (false === ret) {
+ debug('false write response, pause',
+ src._readableState.awaitDrain);
+ src._readableState.awaitDrain++;
+ src.pause();
+ }
+ }
+
+ // if the dest has an error, then stop piping into it.
+ // however, don't suppress the throwing behavior for this.
+ function onerror(er) {
+ debug('onerror', er);
+ unpipe();
+ dest.removeListener('error', onerror);
+ if (EE.listenerCount(dest, 'error') === 0)
+ dest.emit('error', er);
+ }
+ // This is a brutally ugly hack to make sure that our error handler
+ // is attached before any userland ones. NEVER DO THIS.
+ if (!dest._events || !dest._events.error)
+ dest.on('error', onerror);
+ else if (isArray(dest._events.error))
+ dest._events.error.unshift(onerror);
+ else
+ dest._events.error = [onerror, dest._events.error];
+
+
+
+ // Both close and finish should trigger unpipe, but only once.
+ function onclose() {
+ dest.removeListener('finish', onfinish);
+ unpipe();
+ }
+ dest.once('close', onclose);
+ function onfinish() {
+ debug('onfinish');
+ dest.removeListener('close', onclose);
+ unpipe();
+ }
+ dest.once('finish', onfinish);
+
+ function unpipe() {
+ debug('unpipe');
+ src.unpipe(dest);
+ }
+
+ // tell the dest that it's being piped to
+ dest.emit('pipe', src);
+
+ // start the flow if it hasn't been started already.
+ if (!state.flowing) {
+ debug('pipe resume');
+ src.resume();
+ }
+
+ return dest;
+};
+
+function pipeOnDrain(src) {
+ return function() {
+ var state = src._readableState;
+ debug('pipeOnDrain', state.awaitDrain);
+ if (state.awaitDrain)
+ state.awaitDrain--;
+ if (state.awaitDrain === 0 && EE.listenerCount(src, 'data')) {
+ state.flowing = true;
+ flow(src);
+ }
+ };
+}
+
+
+Readable.prototype.unpipe = function(dest) {
+ var state = this._readableState;
+
+ // if we're not piping anywhere, then do nothing.
+ if (state.pipesCount === 0)
+ return this;
+
+ // just one destination. most common case.
+ if (state.pipesCount === 1) {
+ // passed in one, but it's not the right one.
+ if (dest && dest !== state.pipes)
+ return this;
+
+ if (!dest)
+ dest = state.pipes;
+
+ // got a match.
+ state.pipes = null;
+ state.pipesCount = 0;
+ state.flowing = false;
+ if (dest)
+ dest.emit('unpipe', this);
+ return this;
+ }
+
+ // slow case. multiple pipe destinations.
+
+ if (!dest) {
+ // remove all.
+ var dests = state.pipes;
+ var len = state.pipesCount;
+ state.pipes = null;
+ state.pipesCount = 0;
+ state.flowing = false;
+
+ for (var i = 0; i < len; i++)
+ dests[i].emit('unpipe', this);
+ return this;
+ }
+
+ // try to find the right one.
+ var i = indexOf(state.pipes, dest);
+ if (i === -1)
+ return this;
+
+ state.pipes.splice(i, 1);
+ state.pipesCount -= 1;
+ if (state.pipesCount === 1)
+ state.pipes = state.pipes[0];
+
+ dest.emit('unpipe', this);
+
+ return this;
+};
+
+// set up data events if they are asked for
+// Ensure readable listeners eventually get something
+Readable.prototype.on = function(ev, fn) {
+ var res = Stream.prototype.on.call(this, ev, fn);
+
+ // If listening to data, and it has not explicitly been paused,
+ // then call resume to start the flow of data on the next tick.
+ if (ev === 'data' && false !== this._readableState.flowing) {
+ this.resume();
+ }
+
+ if (ev === 'readable' && this.readable) {
+ var state = this._readableState;
+ if (!state.readableListening) {
+ state.readableListening = true;
+ state.emittedReadable = false;
+ state.needReadable = true;
+ if (!state.reading) {
+ var self = this;
+ process.nextTick(function() {
+ debug('readable nexttick read 0');
+ self.read(0);
+ });
+ } else if (state.length) {
+ emitReadable(this, state);
+ }
+ }
+ }
+
+ return res;
+};
+Readable.prototype.addListener = Readable.prototype.on;
+
+// pause() and resume() are remnants of the legacy readable stream API
+// If the user uses them, then switch into old mode.
+Readable.prototype.resume = function() {
+ var state = this._readableState;
+ if (!state.flowing) {
+ debug('resume');
+ state.flowing = true;
+ if (!state.reading) {
+ debug('resume read 0');
+ this.read(0);
+ }
+ resume(this, state);
+ }
+ return this;
+};
+
+function resume(stream, state) {
+ if (!state.resumeScheduled) {
+ state.resumeScheduled = true;
+ process.nextTick(function() {
+ resume_(stream, state);
});
+ }
+}
+
+function resume_(stream, state) {
+ state.resumeScheduled = false;
+ stream.emit('resume');
+ flow(stream);
+ if (state.flowing && !state.reading)
+ stream.read(0);
+}
+
+Readable.prototype.pause = function() {
+ debug('call pause flowing=%j', this._readableState.flowing);
+ if (false !== this._readableState.flowing) {
+ debug('pause');
+ this._readableState.flowing = false;
+ this.emit('pause');
+ }
+ return this;
};
-JingleSession.prototype.accept = function () {
- var self = this;
- this.state = 'active';
+function flow(stream) {
+ var state = stream._readableState;
+ debug('flow', state.flowing);
+ if (state.flowing) {
+ do {
+ var chunk = stream.read();
+ } while (null !== chunk && state.flowing);
+ }
+}
- var pranswer = this.peerconnection.localDescription;
- if (!pranswer || pranswer.type != 'pranswer') {
- return;
+// wrap an old-style stream as the async data source.
+// This is *not* part of the readable stream interface.
+// It is an ugly unfortunate mess of history.
+Readable.prototype.wrap = function(stream) {
+ var state = this._readableState;
+ var paused = false;
+
+ var self = this;
+ stream.on('end', function() {
+ debug('wrapped end');
+ if (state.decoder && !state.ended) {
+ var chunk = state.decoder.end();
+ if (chunk && chunk.length)
+ self.push(chunk);
}
- console.log('going from pranswer to answer');
- if (this.usetrickle) {
- // remove candidates already sent from session-accept
- var lines = SDPUtil.find_lines(pranswer.sdp, 'a=candidate:');
- for (var i = 0; i < lines.length; i++) {
- pranswer.sdp = pranswer.sdp.replace(lines[i] + '\r\n', '');
- }
- }
- while (SDPUtil.find_line(pranswer.sdp, 'a=inactive')) {
- // FIXME: change any inactive to sendrecv or whatever they were originally
- pranswer.sdp = pranswer.sdp.replace('a=inactive', 'a=sendrecv');
- }
- var prsdp = new SDP(pranswer.sdp);
- var accept = $iq({to: this.peerjid,
- type: 'set'})
- .c('jingle', {xmlns: 'urn:xmpp:jingle:1',
- action: 'session-accept',
- initiator: this.initiator,
- responder: this.responder,
- sid: this.sid });
- prsdp.toJingle(accept, this.initiator == this.me ? 'initiator' : 'responder');
- this.connection.sendIQ(accept,
- function () {
- var ack = {};
- ack.source = 'answer';
- $(document).trigger('ack.jingle', [self.sid, ack]);
- },
- function (stanza) {
- var error = ($(stanza).find('error').length) ? {
- code: $(stanza).find('error').attr('code'),
- reason: $(stanza).find('error :first')[0].tagName,
- }:{};
- error.source = 'answer';
- $(document).trigger('error.jingle', [self.sid, error]);
- },
- 10000);
- var sdp = this.peerconnection.localDescription.sdp;
- while (SDPUtil.find_line(sdp, 'a=inactive')) {
- // FIXME: change any inactive to sendrecv or whatever they were originally
- sdp = sdp.replace('a=inactive', 'a=sendrecv');
+ self.push(null);
+ });
+
+ stream.on('data', function(chunk) {
+ debug('wrapped data');
+ if (state.decoder)
+ chunk = state.decoder.write(chunk);
+ if (!chunk || !state.objectMode && !chunk.length)
+ return;
+
+ var ret = self.push(chunk);
+ if (!ret) {
+ paused = true;
+ stream.pause();
}
- this.peerconnection.setLocalDescription(new RTCSessionDescription({type: 'answer', sdp: sdp}),
- function () {
- //console.log('setLocalDescription success');
- $(document).trigger('setLocalDescription.jingle', [self.sid]);
- },
- function (e) {
- console.error('setLocalDescription failed', e);
- }
- );
+ });
+
+ // proxy all the other methods.
+ // important when wrapping filters and duplexes.
+ for (var i in stream) {
+ if (util.isFunction(stream[i]) && util.isUndefined(this[i])) {
+ this[i] = function(method) { return function() {
+ return stream[method].apply(stream, arguments);
+ }}(i);
+ }
+ }
+
+ // proxy certain important events.
+ var events = ['error', 'close', 'destroy', 'pause', 'resume'];
+ forEach(events, function(ev) {
+ stream.on(ev, self.emit.bind(self, ev));
+ });
+
+ // when we try to consume some more bytes, simply unpause the
+ // underlying stream.
+ self._read = function(n) {
+ debug('wrapped _read', n);
+ if (paused) {
+ paused = false;
+ stream.resume();
+ }
+ };
+
+ return self;
};
-JingleSession.prototype.terminate = function (reason) {
- this.state = 'ended';
- this.reason = reason;
- this.peerconnection.close();
- if (this.statsinterval !== null) {
- window.clearInterval(this.statsinterval);
- this.statsinterval = null;
+
+
+// exposed for testing purposes only.
+Readable._fromList = fromList;
+
+// Pluck off n bytes from an array of buffers.
+// Length is the combined lengths of all the buffers in the list.
+function fromList(n, state) {
+ var list = state.buffer;
+ var length = state.length;
+ var stringMode = !!state.decoder;
+ var objectMode = !!state.objectMode;
+ var ret;
+
+ // nothing in the list, definitely empty.
+ if (list.length === 0)
+ return null;
+
+ if (length === 0)
+ ret = null;
+ else if (objectMode)
+ ret = list.shift();
+ else if (!n || n >= length) {
+ // read it all, truncate the array.
+ if (stringMode)
+ ret = list.join('');
+ else
+ ret = Buffer.concat(list, length);
+ list.length = 0;
+ } else {
+ // read just some of it.
+ if (n < list[0].length) {
+ // just take a part of the first list item.
+ // slice is the same for buffers and strings.
+ var buf = list[0];
+ ret = buf.slice(0, n);
+ list[0] = buf.slice(n);
+ } else if (n === list[0].length) {
+ // first list is a perfect match
+ ret = list.shift();
+ } else {
+ // complex case.
+ // we have enough to cover it, but it spans past the first buffer.
+ if (stringMode)
+ ret = '';
+ else
+ ret = new Buffer(n);
+
+ var c = 0;
+ for (var i = 0, l = list.length; i < l && c < n; i++) {
+ var buf = list[0];
+ var cpy = Math.min(n - c, buf.length);
+
+ if (stringMode)
+ ret += buf.slice(0, cpy);
+ else
+ buf.copy(ret, c, 0, cpy);
+
+ if (cpy < buf.length)
+ list[0] = buf.slice(cpy);
+ else
+ list.shift();
+
+ c += cpy;
+ }
}
+ }
+
+ return ret;
+}
+
+function endReadable(stream) {
+ var state = stream._readableState;
+
+ // If we get here before consuming all the bytes, then that is a
+ // bug in node. Should never happen.
+ if (state.length > 0)
+ throw new Error('endReadable called on non-empty stream');
+
+ if (!state.endEmitted) {
+ state.ended = true;
+ process.nextTick(function() {
+ // Check that we didn't get one last unshift.
+ if (!state.endEmitted && state.length === 0) {
+ state.endEmitted = true;
+ stream.readable = false;
+ stream.emit('end');
+ }
+ });
+ }
+}
+
+function forEach (xs, f) {
+ for (var i = 0, l = xs.length; i < l; i++) {
+ f(xs[i], i);
+ }
+}
+
+function indexOf (xs, x) {
+ for (var i = 0, l = xs.length; i < l; i++) {
+ if (xs[i] === x) return i;
+ }
+ return -1;
+}
+
+}).call(this,require('_process'))
+},{"./_stream_duplex":11,"_process":9,"buffer":2,"core-util-is":16,"events":6,"inherits":7,"isarray":8,"stream":21,"string_decoder/":22,"util":1}],14:[function(require,module,exports){
+// Copyright Joyent, Inc. and other Node contributors.
+//
+// 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.
+
+
+// a transform stream is a readable/writable stream where you do
+// something with the data. Sometimes it's called a "filter",
+// but that's not a great name for it, since that implies a thing where
+// some bits pass through, and others are simply ignored. (That would
+// be a valid example of a transform, of course.)
+//
+// While the output is causally related to the input, it's not a
+// necessarily symmetric or synchronous transformation. For example,
+// a zlib stream might take multiple plain-text writes(), and then
+// emit a single compressed chunk some time in the future.
+//
+// Here's how this works:
+//
+// The Transform stream has all the aspects of the readable and writable
+// stream classes. When you write(chunk), that calls _write(chunk,cb)
+// internally, and returns false if there's a lot of pending writes
+// buffered up. When you call read(), that calls _read(n) until
+// there's enough pending readable data buffered up.
+//
+// In a transform stream, the written data is placed in a buffer. When
+// _read(n) is called, it transforms the queued up data, calling the
+// buffered _write cb's as it consumes chunks. If consuming a single
+// written chunk would result in multiple output chunks, then the first
+// outputted bit calls the readcb, and subsequent chunks just go into
+// the read buffer, and will cause it to emit 'readable' if necessary.
+//
+// This way, back-pressure is actually determined by the reading side,
+// since _read has to be called to start processing a new chunk. However,
+// a pathological inflate type of transform can cause excessive buffering
+// here. For example, imagine a stream where every byte of input is
+// interpreted as an integer from 0-255, and then results in that many
+// bytes of output. Writing the 4 bytes {ff,ff,ff,ff} would result in
+// 1kb of data being output. In this case, you could write a very small
+// amount of input, and end up with a very large amount of output. In
+// such a pathological inflating mechanism, there'd be no way to tell
+// the system to stop doing the transform. A single 4MB write could
+// cause the system to run out of memory.
+//
+// However, even in such a pathological case, only a single written chunk
+// would be consumed, and then the rest would wait (un-transformed) until
+// the results of the previous transformed chunk were consumed.
+
+module.exports = Transform;
+
+var Duplex = require('./_stream_duplex');
+
+/*<replacement>*/
+var util = require('core-util-is');
+util.inherits = require('inherits');
+/*</replacement>*/
+
+util.inherits(Transform, Duplex);
+
+
+function TransformState(options, stream) {
+ this.afterTransform = function(er, data) {
+ return afterTransform(stream, er, data);
+ };
+
+ this.needTransform = false;
+ this.transforming = false;
+ this.writecb = null;
+ this.writechunk = null;
+}
+
+function afterTransform(stream, er, data) {
+ var ts = stream._transformState;
+ ts.transforming = false;
+
+ var cb = ts.writecb;
+
+ if (!cb)
+ return stream.emit('error', new Error('no writecb in Transform class'));
+
+ ts.writechunk = null;
+ ts.writecb = null;
+
+ if (!util.isNullOrUndefined(data))
+ stream.push(data);
+
+ if (cb)
+ cb(er);
+
+ var rs = stream._readableState;
+ rs.reading = false;
+ if (rs.needReadable || rs.length < rs.highWaterMark) {
+ stream._read(rs.highWaterMark);
+ }
+}
+
+
+function Transform(options) {
+ if (!(this instanceof Transform))
+ return new Transform(options);
+
+ Duplex.call(this, options);
+
+ this._transformState = new TransformState(options, this);
+
+ // when the writable side finishes, then flush out anything remaining.
+ var stream = this;
+
+ // start out asking for a readable event once data is transformed.
+ this._readableState.needReadable = true;
+
+ // we have implemented the _read method, and done the other things
+ // that Readable wants before the first _read call, so unset the
+ // sync guard flag.
+ this._readableState.sync = false;
+
+ this.once('prefinish', function() {
+ if (util.isFunction(this._flush))
+ this._flush(function(er) {
+ done(stream, er);
+ });
+ else
+ done(stream);
+ });
+}
+
+Transform.prototype.push = function(chunk, encoding) {
+ this._transformState.needTransform = false;
+ return Duplex.prototype.push.call(this, chunk, encoding);
};
-JingleSession.prototype.active = function () {
- return this.state == 'active';
+// This is the part where you do stuff!
+// override this function in implementation classes.
+// 'chunk' is an input chunk.
+//
+// Call `push(newChunk)` to pass along transformed output
+// to the readable side. You may call 'push' zero or more times.
+//
+// Call `cb(err)` when you are done with this chunk. If you pass
+// an error, then that'll put the hurt on the whole operation. If you
+// never call cb(), then you'll never get another chunk.
+Transform.prototype._transform = function(chunk, encoding, cb) {
+ throw new Error('not implemented');
};
-JingleSession.prototype.sendIceCandidate = function (candidate) {
- var self = this;
- if (candidate && !this.lasticecandidate) {
- var ice = SDPUtil.iceparams(this.localSDP.media[candidate.sdpMLineIndex], this.localSDP.session);
- var jcand = SDPUtil.candidateToJingle(candidate.candidate);
- if (!(ice && jcand)) {
- console.error('failed to get ice && jcand');
- return;
- }
- ice.xmlns = 'urn:xmpp:jingle:transports:ice-udp:1';
+Transform.prototype._write = function(chunk, encoding, cb) {
+ var ts = this._transformState;
+ ts.writecb = cb;
+ ts.writechunk = chunk;
+ ts.writeencoding = encoding;
+ if (!ts.transforming) {
+ var rs = this._readableState;
+ if (ts.needTransform ||
+ rs.needReadable ||
+ rs.length < rs.highWaterMark)
+ this._read(rs.highWaterMark);
+ }
+};
- if (jcand.type === 'srflx') {
- this.hadstuncandidate = true;
- } else if (jcand.type === 'relay') {
- this.hadturncandidate = true;
- }
+// Doesn't matter what the args are here.
+// _transform does all the work.
+// That we got here means that the readable side wants more data.
+Transform.prototype._read = function(n) {
+ var ts = this._transformState;
- if(this.filter_candidates === null || jcand.type === this.filter_candidates) {
- if (this.usetrickle) {
- console.log('sendIceCandidate using trickle');
- if (this.usedrip) {
- if (this.drip_container.length === 0) {
- // start 20ms callout
- window.setTimeout(function () {
- console.log('sending drip container');
- if (self.drip_container.length === 0) return;
- self.sendIceCandidates(self.drip_container);
- self.drip_container = [];
- }, 20);
+ if (!util.isNull(ts.writechunk) && ts.writecb && !ts.transforming) {
+ ts.transforming = true;
+ this._transform(ts.writechunk, ts.writeencoding, ts.afterTransform);
+ } else {
+ // mark that we need a transform, so that any data that comes in
+ // will get processed, now that we've asked for it.
+ ts.needTransform = true;
+ }
+};
- }
- this.drip_container.push(candidate);
- return;
- } else {
- console.log('sending single candidate');
- self.sendIceCandidates([candidate]);
- }
- }
- }
+
+function done(stream, er) {
+ if (er)
+ return stream.emit('error', er);
+
+ // if there's nothing in the write buffer, then that means
+ // that nothing more will ever be provided
+ var ws = stream._writableState;
+ var ts = stream._transformState;
+
+ if (ws.length)
+ throw new Error('calling transform done when ws.length != 0');
+
+ if (ts.transforming)
+ throw new Error('calling transform done when still transforming');
+
+ return stream.push(null);
+}
+
+},{"./_stream_duplex":11,"core-util-is":16,"inherits":7}],15:[function(require,module,exports){
+(function (process){
+// Copyright Joyent, Inc. and other Node contributors.
+//
+// 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.
+
+// A bit simpler than readable streams.
+// Implement an async ._write(chunk, cb), and it'll handle all
+// the drain event emission and buffering.
+
+module.exports = Writable;
+
+/*<replacement>*/
+var Buffer = require('buffer').Buffer;
+/*</replacement>*/
+
+Writable.WritableState = WritableState;
+
+
+/*<replacement>*/
+var util = require('core-util-is');
+util.inherits = require('inherits');
+/*</replacement>*/
+
+var Stream = require('stream');
+
+util.inherits(Writable, Stream);
+
+function WriteReq(chunk, encoding, cb) {
+ this.chunk = chunk;
+ this.encoding = encoding;
+ this.callback = cb;
+}
+
+function WritableState(options, stream) {
+ var Duplex = require('./_stream_duplex');
+
+ options = options || {};
+
+ // the point at which write() starts returning false
+ // Note: 0 is a valid value, means that we always return false if
+ // the entire buffer is not flushed immediately on write()
+ var hwm = options.highWaterMark;
+ var defaultHwm = options.objectMode ? 16 : 16 * 1024;
+ this.highWaterMark = (hwm || hwm === 0) ? hwm : defaultHwm;
+
+ // object stream flag to indicate whether or not this stream
+ // contains buffers or objects.
+ this.objectMode = !!options.objectMode;
+
+ if (stream instanceof Duplex)
+ this.objectMode = this.objectMode || !!options.writableObjectMode;
+
+ // cast to ints.
+ this.highWaterMark = ~~this.highWaterMark;
+
+ this.needDrain = false;
+ // at the start of calling end()
+ this.ending = false;
+ // when end() has been called, and returned
+ this.ended = false;
+ // when 'finish' is emitted
+ this.finished = false;
+
+ // should we decode strings into buffers before passing to _write?
+ // this is here so that some node-core streams can optimize string
+ // handling at a lower level.
+ var noDecode = options.decodeStrings === false;
+ this.decodeStrings = !noDecode;
+
+ // Crypto is kind of old and crusty. Historically, its default string
+ // encoding is 'binary' so we have to make this configurable.
+ // Everything else in the universe uses 'utf8', though.
+ this.defaultEncoding = options.defaultEncoding || 'utf8';
+
+ // not an actual buffer we keep track of, but a measurement
+ // of how much we're waiting to get pushed to some underlying
+ // socket or file.
+ this.length = 0;
+
+ // a flag to see when we're in the middle of a write.
+ this.writing = false;
+
+ // when true all writes will be buffered until .uncork() call
+ this.corked = 0;
+
+ // a flag to be able to tell if the onwrite cb is called immediately,
+ // or on a later tick. We set this to true at first, because any
+ // actions that shouldn't happen until "later" should generally also
+ // not happen before the first write call.
+ this.sync = true;
+
+ // a flag to know if we're processing previously buffered items, which
+ // may call the _write() callback in the same tick, so that we don't
+ // end up in an overlapped onwrite situation.
+ this.bufferProcessing = false;
+
+ // the callback that's passed to _write(chunk,cb)
+ this.onwrite = function(er) {
+ onwrite(stream, er);
+ };
+
+ // the callback that the user supplies to write(chunk,encoding,cb)
+ this.writecb = null;
+
+ // the amount that is being written when _write is called.
+ this.writelen = 0;
+
+ this.buffer = [];
+
+ // number of pending user-supplied write callbacks
+ // this must be 0 before 'finish' can be emitted
+ this.pendingcb = 0;
+
+ // emit prefinish if the only thing we're waiting for is _write cbs
+ // This is relevant for synchronous Transform streams
+ this.prefinished = false;
+
+ // True if the error was already emitted and should not be thrown again
+ this.errorEmitted = false;
+}
+
+function Writable(options) {
+ var Duplex = require('./_stream_duplex');
+
+ // Writable ctor is applied to Duplexes, though they're not
+ // instanceof Writable, they're instanceof Readable.
+ if (!(this instanceof Writable) && !(this instanceof Duplex))
+ return new Writable(options);
+
+ this._writableState = new WritableState(options, this);
+
+ // legacy.
+ this.writable = true;
+
+ Stream.call(this);
+}
+
+// Otherwise people can pipe Writable streams, which is just wrong.
+Writable.prototype.pipe = function() {
+ this.emit('error', new Error('Cannot pipe. Not readable.'));
+};
+
+
+function writeAfterEnd(stream, state, cb) {
+ var er = new Error('write after end');
+ // TODO: defer error events consistently everywhere, not just the cb
+ stream.emit('error', er);
+ process.nextTick(function() {
+ cb(er);
+ });
+}
+
+// If we get something that is not a buffer, string, null, or undefined,
+// and we're not in objectMode, then that's an error.
+// Otherwise stream chunks are all considered to be of length=1, and the
+// watermarks determine how many objects to keep in the buffer, rather than
+// how many bytes or characters.
+function validChunk(stream, state, chunk, cb) {
+ var valid = true;
+ if (!util.isBuffer(chunk) &&
+ !util.isString(chunk) &&
+ !util.isNullOrUndefined(chunk) &&
+ !state.objectMode) {
+ var er = new TypeError('Invalid non-string/buffer chunk');
+ stream.emit('error', er);
+ process.nextTick(function() {
+ cb(er);
+ });
+ valid = false;
+ }
+ return valid;
+}
+
+Writable.prototype.write = function(chunk, encoding, cb) {
+ var state = this._writableState;
+ var ret = false;
+
+ if (util.isFunction(encoding)) {
+ cb = encoding;
+ encoding = null;
+ }
+
+ if (util.isBuffer(chunk))
+ encoding = 'buffer';
+ else if (!encoding)
+ encoding = state.defaultEncoding;
+
+ if (!util.isFunction(cb))
+ cb = function() {};
+
+ if (state.ended)
+ writeAfterEnd(this, state, cb);
+ else if (validChunk(this, state, chunk, cb)) {
+ state.pendingcb++;
+ ret = writeOrBuffer(this, state, chunk, encoding, cb);
+ }
+
+ return ret;
+};
+
+Writable.prototype.cork = function() {
+ var state = this._writableState;
+
+ state.corked++;
+};
+
+Writable.prototype.uncork = function() {
+ var state = this._writableState;
+
+ if (state.corked) {
+ state.corked--;
+
+ if (!state.writing &&
+ !state.corked &&
+ !state.finished &&
+ !state.bufferProcessing &&
+ state.buffer.length)
+ clearBuffer(this, state);
+ }
+};
+
+function decodeChunk(state, chunk, encoding) {
+ if (!state.objectMode &&
+ state.decodeStrings !== false &&
+ util.isString(chunk)) {
+ chunk = new Buffer(chunk, encoding);
+ }
+ return chunk;
+}
+
+// if we're already writing something, then just put this
+// in the queue, and wait our turn. Otherwise, call _write
+// If we return false, then we need a drain event, so set that flag.
+function writeOrBuffer(stream, state, chunk, encoding, cb) {
+ chunk = decodeChunk(state, chunk, encoding);
+ if (util.isBuffer(chunk))
+ encoding = 'buffer';
+ var len = state.objectMode ? 1 : chunk.length;
+
+ state.length += len;
+
+ var ret = state.length < state.highWaterMark;
+ // we must ensure that previous needDrain will not be reset to false.
+ if (!ret)
+ state.needDrain = true;
+
+ if (state.writing || state.corked)
+ state.buffer.push(new WriteReq(chunk, encoding, cb));
+ else
+ doWrite(stream, state, false, len, chunk, encoding, cb);
+
+ return ret;
+}
+
+function doWrite(stream, state, writev, len, chunk, encoding, cb) {
+ state.writelen = len;
+ state.writecb = cb;
+ state.writing = true;
+ state.sync = true;
+ if (writev)
+ stream._writev(chunk, state.onwrite);
+ else
+ stream._write(chunk, encoding, state.onwrite);
+ state.sync = false;
+}
+
+function onwriteError(stream, state, sync, er, cb) {
+ if (sync)
+ process.nextTick(function() {
+ state.pendingcb--;
+ cb(er);
+ });
+ else {
+ state.pendingcb--;
+ cb(er);
+ }
+
+ stream._writableState.errorEmitted = true;
+ stream.emit('error', er);
+}
+
+function onwriteStateUpdate(state) {
+ state.writing = false;
+ state.writecb = null;
+ state.length -= state.writelen;
+ state.writelen = 0;
+}
+
+function onwrite(stream, er) {
+ var state = stream._writableState;
+ var sync = state.sync;
+ var cb = state.writecb;
+
+ onwriteStateUpdate(state);
+
+ if (er)
+ onwriteError(stream, state, sync, er, cb);
+ else {
+ // Check if we're actually ready to finish, but don't emit yet
+ var finished = needFinish(stream, state);
+
+ if (!finished &&
+ !state.corked &&
+ !state.bufferProcessing &&
+ state.buffer.length) {
+ clearBuffer(stream, state);
+ }
+
+ if (sync) {
+ process.nextTick(function() {
+ afterWrite(stream, state, finished, cb);
+ });
} else {
- console.log('sendIceCandidate: last candidate...');
- if (!this.usetrickle) {
- console.log('should send full offer now...');
- var init = $iq({to: this.peerjid,
- type: 'set'})
- .c('jingle', {xmlns: 'urn:xmpp:jingle:1',
- action: this.peerconnection.localDescription.type == 'offer' ? 'session-initiate' : 'session-accept',
- initiator: this.initiator,
- sid: this.sid});
- if (this.nickname !== null) {
- init.c('nick', {xmlns:'http://jabber.org/protocol/nick'}).t(this.nickname).up();
- }
- if (this.startmuted) {
- init.c('muted', {xmlns:'http://jitsi.org/protocol/meet#startmuted'}).up();
- }
- this.localSDP = new SDP(this.peerconnection.localDescription.sdp);
- this.localSDP.toJingle(init, this.initiator == this.me ? 'initiator' : 'responder');
- console.log('try to send ack(offer)...');
- this.connection.sendIQ(init,
- function () {
- console.log('Sent session initiate (ACK, offer)...');
- var ack = {};
- ack.source = 'offer';
- $(document).trigger('ack.jingle', [self.sid, ack]);
- },
- function (stanza) {
- self.state = 'error';
- self.peerconnection.close();
- var error = ($(stanza).find('error').length) ? {
- code: $(stanza).find('error').attr('code'),
- reason: $(stanza).find('error :first')[0].tagName,
- }:{};
- error.source = 'offer';
- $(document).trigger('error.jingle', [self.sid, error]);
- },
- 10000);
- }
- this.lasticecandidate = true;
- console.log('Have we encountered any srflx candidates? ' + this.hadstuncandidate);
- console.log('Have we encountered any relay candidates? ' + this.hadturncandidate);
+ afterWrite(stream, state, finished, cb);
+ }
+ }
+}
- if (!(this.hadstuncandidate || this.hadturncandidate) && this.peerconnection.signalingState != 'closed') {
- console.log('no candidates found!');
- $(document).trigger('nostuncandidates.jingle', [this.sid]);
- }
+function afterWrite(stream, state, finished, cb) {
+ if (!finished)
+ onwriteDrain(stream, state);
+ state.pendingcb--;
+ cb();
+ finishMaybe(stream, state);
+}
+
+// Must force callback to be called on nextTick, so that we don't
+// emit 'drain' before the write() consumer gets the 'false' return
+// value, and has a chance to attach a 'drain' listener.
+function onwriteDrain(stream, state) {
+ if (state.length === 0 && state.needDrain) {
+ state.needDrain = false;
+ stream.emit('drain');
+ }
+}
+
+
+// if there's something in the buffer waiting, then process it
+function clearBuffer(stream, state) {
+ state.bufferProcessing = true;
+
+ if (stream._writev && state.buffer.length > 1) {
+ // Fast case, write everything using _writev()
+ var cbs = [];
+ for (var c = 0; c < state.buffer.length; c++)
+ cbs.push(state.buffer[c].callback);
+
+ // count the one we are adding, as well.
+ // TODO(isaacs) clean this up
+ state.pendingcb++;
+ doWrite(stream, state, true, state.length, state.buffer, '', function(err) {
+ for (var i = 0; i < cbs.length; i++) {
+ state.pendingcb--;
+ cbs[i](err);
+ }
+ });
+
+ // Clear buffer
+ state.buffer = [];
+ } else {
+ // Slow case, write chunks one-by-one
+ for (var c = 0; c < state.buffer.length; c++) {
+ var entry = state.buffer[c];
+ var chunk = entry.chunk;
+ var encoding = entry.encoding;
+ var cb = entry.callback;
+ var len = state.objectMode ? 1 : chunk.length;
+
+ doWrite(stream, state, false, len, chunk, encoding, cb);
+
+ // if we didn't call the onwrite immediately, then
+ // it means that we need to wait until it does.
+ // also, that means that the chunk and cb are currently
+ // being processed, so move the buffer counter past them.
+ if (state.writing) {
+ c++;
+ break;
+ }
}
+
+ if (c < state.buffer.length)
+ state.buffer = state.buffer.slice(c);
+ else
+ state.buffer.length = 0;
+ }
+
+ state.bufferProcessing = false;
+}
+
+Writable.prototype._write = function(chunk, encoding, cb) {
+ cb(new Error('not implemented'));
+
};
-JingleSession.prototype.sendIceCandidates = function (candidates) {
- console.log('sendIceCandidates', candidates);
- var cand = $iq({to: this.peerjid, type: 'set'})
- .c('jingle', {xmlns: 'urn:xmpp:jingle:1',
- action: 'transport-info',
- initiator: this.initiator,
- sid: this.sid});
- for (var mid = 0; mid < this.localSDP.media.length; mid++) {
- var cands = candidates.filter(function (el) { return el.sdpMLineIndex == mid; });
- var mline = SDPUtil.parse_mline(this.localSDP.media[mid].split('\r\n')[0]);
- if (cands.length > 0) {
- var ice = SDPUtil.iceparams(this.localSDP.media[mid], this.localSDP.session);
- ice.xmlns = 'urn:xmpp:jingle:transports:ice-udp:1';
- cand.c('content', {creator: this.initiator == this.me ? 'initiator' : 'responder',
- name: (cands[0].sdpMid? cands[0].sdpMid : mline.media)
- }).c('transport', ice);
- for (var i = 0; i < cands.length; i++) {
- cand.c('candidate', SDPUtil.candidateToJingle(cands[i].candidate)).up();
- }
- // add fingerprint
- if (SDPUtil.find_line(this.localSDP.media[mid], 'a=fingerprint:', this.localSDP.session)) {
- var tmp = SDPUtil.parse_fingerprint(SDPUtil.find_line(this.localSDP.media[mid], 'a=fingerprint:', this.localSDP.session));
- tmp.required = true;
- cand.c('fingerprint').t(tmp.fingerprint);
- delete tmp.fingerprint;
- cand.attrs(tmp);
- cand.up();
- }
- cand.up(); // transport
- cand.up(); // content
- }
+Writable.prototype._writev = null;
+
+Writable.prototype.end = function(chunk, encoding, cb) {
+ var state = this._writableState;
+
+ if (util.isFunction(chunk)) {
+ cb = chunk;
+ chunk = null;
+ encoding = null;
+ } else if (util.isFunction(encoding)) {
+ cb = encoding;
+ encoding = null;
+ }
+
+ if (!util.isNullOrUndefined(chunk))
+ this.write(chunk, encoding);
+
+ // .end() fully uncorks
+ if (state.corked) {
+ state.corked = 1;
+ this.uncork();
+ }
+
+ // ignore unnecessary end() calls.
+ if (!state.ending && !state.finished)
+ endWritable(this, state, cb);
+};
+
+
+function needFinish(stream, state) {
+ return (state.ending &&
+ state.length === 0 &&
+ !state.finished &&
+ !state.writing);
+}
+
+function prefinish(stream, state) {
+ if (!state.prefinished) {
+ state.prefinished = true;
+ stream.emit('prefinish');
+ }
+}
+
+function finishMaybe(stream, state) {
+ var need = needFinish(stream, state);
+ if (need) {
+ if (state.pendingcb === 0) {
+ prefinish(stream, state);
+ state.finished = true;
+ stream.emit('finish');
+ } else
+ prefinish(stream, state);
+ }
+ return need;
+}
+
+function endWritable(stream, state, cb) {
+ state.ending = true;
+ finishMaybe(stream, state);
+ if (cb) {
+ if (state.finished)
+ process.nextTick(cb);
+ else
+ stream.once('finish', cb);
+ }
+ state.ended = true;
+}
+
+}).call(this,require('_process'))
+},{"./_stream_duplex":11,"_process":9,"buffer":2,"core-util-is":16,"inherits":7,"stream":21}],16:[function(require,module,exports){
+(function (Buffer){
+// Copyright Joyent, Inc. and other Node contributors.
+//
+// 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.
+
+// NOTE: These type checking functions intentionally don't use `instanceof`
+// because it is fragile and can be easily faked with `Object.create()`.
+function isArray(ar) {
+ return Array.isArray(ar);
+}
+exports.isArray = isArray;
+
+function isBoolean(arg) {
+ return typeof arg === 'boolean';
+}
+exports.isBoolean = isBoolean;
+
+function isNull(arg) {
+ return arg === null;
+}
+exports.isNull = isNull;
+
+function isNullOrUndefined(arg) {
+ return arg == null;
+}
+exports.isNullOrUndefined = isNullOrUndefined;
+
+function isNumber(arg) {
+ return typeof arg === 'number';
+}
+exports.isNumber = isNumber;
+
+function isString(arg) {
+ return typeof arg === 'string';
+}
+exports.isString = isString;
+
+function isSymbol(arg) {
+ return typeof arg === 'symbol';
+}
+exports.isSymbol = isSymbol;
+
+function isUndefined(arg) {
+ return arg === void 0;
+}
+exports.isUndefined = isUndefined;
+
+function isRegExp(re) {
+ return isObject(re) && objectToString(re) === '[object RegExp]';
+}
+exports.isRegExp = isRegExp;
+
+function isObject(arg) {
+ return typeof arg === 'object' && arg !== null;
+}
+exports.isObject = isObject;
+
+function isDate(d) {
+ return isObject(d) && objectToString(d) === '[object Date]';
+}
+exports.isDate = isDate;
+
+function isError(e) {
+ return isObject(e) &&
+ (objectToString(e) === '[object Error]' || e instanceof Error);
+}
+exports.isError = isError;
+
+function isFunction(arg) {
+ return typeof arg === 'function';
+}
+exports.isFunction = isFunction;
+
+function isPrimitive(arg) {
+ return arg === null ||
+ typeof arg === 'boolean' ||
+ typeof arg === 'number' ||
+ typeof arg === 'string' ||
+ typeof arg === 'symbol' || // ES6 symbol
+ typeof arg === 'undefined';
+}
+exports.isPrimitive = isPrimitive;
+
+function isBuffer(arg) {
+ return Buffer.isBuffer(arg);
+}
+exports.isBuffer = isBuffer;
+
+function objectToString(o) {
+ return Object.prototype.toString.call(o);
+}
+}).call(this,require("buffer").Buffer)
+},{"buffer":2}],17:[function(require,module,exports){
+module.exports = require("./lib/_stream_passthrough.js")
+
+},{"./lib/_stream_passthrough.js":12}],18:[function(require,module,exports){
+exports = module.exports = require('./lib/_stream_readable.js');
+exports.Stream = require('stream');
+exports.Readable = exports;
+exports.Writable = require('./lib/_stream_writable.js');
+exports.Duplex = require('./lib/_stream_duplex.js');
+exports.Transform = require('./lib/_stream_transform.js');
+exports.PassThrough = require('./lib/_stream_passthrough.js');
+
+},{"./lib/_stream_duplex.js":11,"./lib/_stream_passthrough.js":12,"./lib/_stream_readable.js":13,"./lib/_stream_transform.js":14,"./lib/_stream_writable.js":15,"stream":21}],19:[function(require,module,exports){
+module.exports = require("./lib/_stream_transform.js")
+
+},{"./lib/_stream_transform.js":14}],20:[function(require,module,exports){
+module.exports = require("./lib/_stream_writable.js")
+
+},{"./lib/_stream_writable.js":15}],21:[function(require,module,exports){
+// Copyright Joyent, Inc. and other Node contributors.
+//
+// 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.
+
+module.exports = Stream;
+
+var EE = require('events').EventEmitter;
+var inherits = require('inherits');
+
+inherits(Stream, EE);
+Stream.Readable = require('readable-stream/readable.js');
+Stream.Writable = require('readable-stream/writable.js');
+Stream.Duplex = require('readable-stream/duplex.js');
+Stream.Transform = require('readable-stream/transform.js');
+Stream.PassThrough = require('readable-stream/passthrough.js');
+
+// Backwards-compat with node 0.4.x
+Stream.Stream = Stream;
+
+
+
+// old-style streams. Note that the pipe method (the only relevant
+// part of this class) is overridden in the Readable class.
+
+function Stream() {
+ EE.call(this);
+}
+
+Stream.prototype.pipe = function(dest, options) {
+ var source = this;
+
+ function ondata(chunk) {
+ if (dest.writable) {
+ if (false === dest.write(chunk) && source.pause) {
+ source.pause();
+ }
}
- // might merge last-candidate notification into this, but it is called alot later. See webrtc issue #2340
- //console.log('was this the last candidate', this.lasticecandidate);
- console.log('try to send ack(transportinfo)...');
- this.connection.sendIQ(cand,
- function () {
- var ack = {};
- ack.source = 'transportinfo';
- console.log('Sent session initiate (ACK, transportinfo)...');
- $(document).trigger('ack.jingle', [this.sid, ack]);
- },
- function (stanza) {
- var error = ($(stanza).find('error').length) ? {
- code: $(stanza).find('error').attr('code'),
- reason: $(stanza).find('error :first')[0].tagName,
- }:{};
- error.source = 'transportinfo';
- $(document).trigger('error.jingle', [this.sid, error]);
- },
- 10000);
+ }
+
+ source.on('data', ondata);
+
+ function ondrain() {
+ if (source.readable && source.resume) {
+ source.resume();
+ }
+ }
+
+ dest.on('drain', ondrain);
+
+ // If the 'end' option is not supplied, dest.end() will be called when
+ // source gets the 'end' or 'close' events. Only dest.end() once.
+ if (!dest._isStdio && (!options || options.end !== false)) {
+ source.on('end', onend);
+ source.on('close', onclose);
+ }
+
+ var didOnEnd = false;
+ function onend() {
+ if (didOnEnd) return;
+ didOnEnd = true;
+
+ dest.end();
+ }
+
+
+ function onclose() {
+ if (didOnEnd) return;
+ didOnEnd = true;
+
+ if (typeof dest.destroy === 'function') dest.destroy();
+ }
+
+ // don't leave dangling pipes when there are errors.
+ function onerror(er) {
+ cleanup();
+ if (EE.listenerCount(this, 'error') === 0) {
+ throw er; // Unhandled stream error in pipe.
+ }
+ }
+
+ source.on('error', onerror);
+ dest.on('error', onerror);
+
+ // remove all the event listeners that were added.
+ function cleanup() {
+ source.removeListener('data', ondata);
+ dest.removeListener('drain', ondrain);
+
+ source.removeListener('end', onend);
+ source.removeListener('close', onclose);
+
+ source.removeListener('error', onerror);
+ dest.removeListener('error', onerror);
+
+ source.removeListener('end', cleanup);
+ source.removeListener('close', cleanup);
+
+ dest.removeListener('close', cleanup);
+ }
+
+ source.on('end', cleanup);
+ source.on('close', cleanup);
+
+ dest.on('close', cleanup);
+
+ dest.emit('pipe', source);
+
+ // Allow for unix-like usage: A.pipe(B).pipe(C)
+ return dest;
};
+},{"events":6,"inherits":7,"readable-stream/duplex.js":10,"readable-stream/passthrough.js":17,"readable-stream/readable.js":18,"readable-stream/transform.js":19,"readable-stream/writable.js":20}],22:[function(require,module,exports){
+// Copyright Joyent, Inc. and other Node contributors.
+//
+// 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.
+
+var Buffer = require('buffer').Buffer;
+
+var isBufferEncoding = Buffer.isEncoding
+ || function(encoding) {
+ switch (encoding && encoding.toLowerCase()) {
+ case 'hex': case 'utf8': case 'utf-8': case 'ascii': case 'binary': case 'base64': case 'ucs2': case 'ucs-2': case 'utf16le': case 'utf-16le': case 'raw': return true;
+ default: return false;
+ }
+ }
-JingleSession.prototype.sendOffer = function () {
- //console.log('sendOffer...');
- var self = this;
- this.peerconnection.createOffer(function (sdp) {
- self.createdOffer(sdp);
- },
- function (e) {
- console.error('createOffer failed', e);
- },
- this.media_constraints
- );
+
+function assertEncoding(encoding) {
+ if (encoding && !isBufferEncoding(encoding)) {
+ throw new Error('Unknown encoding: ' + encoding);
+ }
+}
+
+// StringDecoder provides an interface for efficiently splitting a series of
+// buffers into a series of JS strings without breaking apart multi-byte
+// characters. CESU-8 is handled as part of the UTF-8 encoding.
+//
+// @TODO Handling all encodings inside a single object makes it very difficult
+// to reason about this code, so it should be split up in the future.
+// @TODO There should be a utf8-strict encoding that rejects invalid UTF-8 code
+// points as used by CESU-8.
+var StringDecoder = exports.StringDecoder = function(encoding) {
+ this.encoding = (encoding || 'utf8').toLowerCase().replace(/[-_]/, '');
+ assertEncoding(encoding);
+ switch (this.encoding) {
+ case 'utf8':
+ // CESU-8 represents each of Surrogate Pair by 3-bytes
+ this.surrogateSize = 3;
+ break;
+ case 'ucs2':
+ case 'utf16le':
+ // UTF-16 represents each of Surrogate Pair by 2-bytes
+ this.surrogateSize = 2;
+ this.detectIncompleteChar = utf16DetectIncompleteChar;
+ break;
+ case 'base64':
+ // Base-64 stores 3 bytes in 4 chars, and pads the remainder.
+ this.surrogateSize = 3;
+ this.detectIncompleteChar = base64DetectIncompleteChar;
+ break;
+ default:
+ this.write = passThroughWrite;
+ return;
+ }
+
+ // Enough space to store all bytes of a single character. UTF-8 needs 4
+ // bytes, but CESU-8 may require up to 6 (3 bytes per surrogate).
+ this.charBuffer = new Buffer(6);
+ // Number of bytes received for the current incomplete multi-byte character.
+ this.charReceived = 0;
+ // Number of bytes expected for the current incomplete multi-byte character.
+ this.charLength = 0;
};
-JingleSession.prototype.createdOffer = function (sdp) {
- //console.log('createdOffer', sdp);
- var self = this;
- this.localSDP = new SDP(sdp.sdp);
- //this.localSDP.mangle();
- if (this.usetrickle) {
- var init = $iq({to: this.peerjid,
- type: 'set'})
- .c('jingle', {xmlns: 'urn:xmpp:jingle:1',
- action: 'session-initiate',
- initiator: this.initiator,
- sid: this.sid});
- if (this.nickname !== null) {
- init.c('nick', {xmlns:'http://jabber.org/protocol/nick'}).t(this.nickname).up();
- }
- if (this.startmuted) {
- init.c('muted', {xmlns:'http://jitsi.org/protocol/meet#startmuted'}).up();
- }
- this.localSDP.toJingle(init, this.initiator == this.me ? 'initiator' : 'responder');
- this.connection.sendIQ(init,
- function () {
- var ack = {};
- ack.source = 'offer';
- $(document).trigger('ack.jingle', [self.sid, ack]);
- },
- function (stanza) {
- self.state = 'error';
- self.peerconnection.close();
- var error = ($(stanza).find('error').length) ? {
- code: $(stanza).find('error').attr('code'),
- reason: $(stanza).find('error :first')[0].tagName,
- }:{};
- error.source = 'offer';
- $(document).trigger('error.jingle', [self.sid, error]);
- },
- 10000);
+
+// write decodes the given buffer and returns it as JS string that is
+// guaranteed to not contain any partial multi-byte characters. Any partial
+// character found at the end of the buffer is buffered up, and will be
+// returned when calling write again with the remaining bytes.
+//
+// Note: Converting a Buffer containing an orphan surrogate to a String
+// currently works, but converting a String to a Buffer (via `new Buffer`, or
+// Buffer#write) will replace incomplete surrogates with the unicode
+// replacement character. See https://codereview.chromium.org/121173009/ .
+StringDecoder.prototype.write = function(buffer) {
+ var charStr = '';
+ // if our last write ended with an incomplete multibyte character
+ while (this.charLength) {
+ // determine how many remaining bytes this buffer has to offer for this char
+ var available = (buffer.length >= this.charLength - this.charReceived) ?
+ this.charLength - this.charReceived :
+ buffer.length;
+
+ // add the new bytes to the char buffer
+ buffer.copy(this.charBuffer, this.charReceived, 0, available);
+ this.charReceived += available;
+
+ if (this.charReceived < this.charLength) {
+ // still not enough chars in this buffer? wait for more ...
+ return '';
}
- sdp.sdp = this.localSDP.raw;
- this.peerconnection.setLocalDescription(sdp,
- function () {
- $(document).trigger('setLocalDescription.jingle', [self.sid]);
- //console.log('setLocalDescription success');
- },
- function (e) {
- console.error('setLocalDescription failed', e);
- }
- );
- var cands = SDPUtil.find_lines(this.localSDP.raw, 'a=candidate:');
- for (var i = 0; i < cands.length; i++) {
- var cand = SDPUtil.parse_icecandidate(cands[i]);
- if (cand.type == 'srflx') {
- this.hadstuncandidate = true;
- } else if (cand.type == 'relay') {
- this.hadturncandidate = true;
- }
+
+ // remove bytes belonging to the current character from the buffer
+ buffer = buffer.slice(available, buffer.length);
+
+ // get the character that was split
+ charStr = this.charBuffer.slice(0, this.charLength).toString(this.encoding);
+
+ // CESU-8: lead surrogate (D800-DBFF) is also the incomplete character
+ var charCode = charStr.charCodeAt(charStr.length - 1);
+ if (charCode >= 0xD800 && charCode <= 0xDBFF) {
+ this.charLength += this.surrogateSize;
+ charStr = '';
+ continue;
+ }
+ this.charReceived = this.charLength = 0;
+
+ // if there are no more bytes in this buffer, just emit our char
+ if (buffer.length === 0) {
+ return charStr;
}
+ break;
+ }
+
+ // determine and set charLength / charReceived
+ this.detectIncompleteChar(buffer);
+
+ var end = buffer.length;
+ if (this.charLength) {
+ // buffer the incomplete character bytes we got
+ buffer.copy(this.charBuffer, 0, buffer.length - this.charReceived, end);
+ end -= this.charReceived;
+ }
+
+ charStr += buffer.toString(this.encoding, 0, end);
+
+ var end = charStr.length - 1;
+ var charCode = charStr.charCodeAt(end);
+ // CESU-8: lead surrogate (D800-DBFF) is also the incomplete character
+ if (charCode >= 0xD800 && charCode <= 0xDBFF) {
+ var size = this.surrogateSize;
+ this.charLength += size;
+ this.charReceived += size;
+ this.charBuffer.copy(this.charBuffer, size, 0, size);
+ buffer.copy(this.charBuffer, 0, 0, size);
+ return charStr.substring(0, end);
+ }
+
+ // or just emit the charStr
+ return charStr;
};
-JingleSession.prototype.setRemoteDescription = function (elem, desctype) {
- //console.log('setting remote description... ', desctype);
- this.remoteSDP = new SDP('');
- this.remoteSDP.fromJingle(elem);
- if (this.peerconnection.remoteDescription !== null) {
- console.log('setRemoteDescription when remote description is not null, should be pranswer', this.peerconnection.remoteDescription);
- if (this.peerconnection.remoteDescription.type == 'pranswer') {
- var pranswer = new SDP(this.peerconnection.remoteDescription.sdp);
- for (var i = 0; i < pranswer.media.length; i++) {
- // make sure we have ice ufrag and pwd
- if (!SDPUtil.find_line(this.remoteSDP.media[i], 'a=ice-ufrag:', this.remoteSDP.session)) {
- if (SDPUtil.find_line(pranswer.media[i], 'a=ice-ufrag:', pranswer.session)) {
- this.remoteSDP.media[i] += SDPUtil.find_line(pranswer.media[i], 'a=ice-ufrag:', pranswer.session) + '\r\n';
- } else {
- console.warn('no ice ufrag?');
- }
- if (SDPUtil.find_line(pranswer.media[i], 'a=ice-pwd:', pranswer.session)) {
- this.remoteSDP.media[i] += SDPUtil.find_line(pranswer.media[i], 'a=ice-pwd:', pranswer.session) + '\r\n';
- } else {
- console.warn('no ice pwd?');
- }
- }
- // copy over candidates
- var lines = SDPUtil.find_lines(pranswer.media[i], 'a=candidate:');
- for (var j = 0; j < lines.length; j++) {
- this.remoteSDP.media[i] += lines[j] + '\r\n';
- }
- }
- this.remoteSDP.raw = this.remoteSDP.session + this.remoteSDP.media.join('');
- }
+// detectIncompleteChar determines if there is an incomplete UTF-8 character at
+// the end of the given buffer. If so, it sets this.charLength to the byte
+// length that character, and sets this.charReceived to the number of bytes
+// that are available for this character.
+StringDecoder.prototype.detectIncompleteChar = function(buffer) {
+ // determine how many bytes we have to check at the end of this buffer
+ var i = (buffer.length >= 3) ? 3 : buffer.length;
+
+ // Figure out if one of the last i bytes of our buffer announces an
+ // incomplete char.
+ for (; i > 0; i--) {
+ var c = buffer[buffer.length - i];
+
+ // See http://en.wikipedia.org/wiki/UTF-8#Description
+
+ // 110XXXXX
+ if (i == 1 && c >> 5 == 0x06) {
+ this.charLength = 2;
+ break;
}
- var remotedesc = new RTCSessionDescription({type: desctype, sdp: this.remoteSDP.raw});
-
- this.peerconnection.setRemoteDescription(remotedesc,
- function () {
- //console.log('setRemoteDescription success');
- },
- function (e) {
- console.error('setRemoteDescription error', e);
+
+ // 1110XXXX
+ if (i <= 2 && c >> 4 == 0x0E) {
+ this.charLength = 3;
+ break;
+ }
+
+ // 11110XXX
+ if (i <= 3 && c >> 3 == 0x1E) {
+ this.charLength = 4;
+ break;
+ }
+ }
+ this.charReceived = i;
+};
+
+StringDecoder.prototype.end = function(buffer) {
+ var res = '';
+ if (buffer && buffer.length)
+ res = this.write(buffer);
+
+ if (this.charReceived) {
+ var cr = this.charReceived;
+ var buf = this.charBuffer;
+ var enc = this.encoding;
+ res += buf.slice(0, cr).toString(enc);
+ }
+
+ return res;
+};
+
+function passThroughWrite(buffer) {
+ return buffer.toString(this.encoding);
+}
+
+function utf16DetectIncompleteChar(buffer) {
+ this.charReceived = buffer.length % 2;
+ this.charLength = this.charReceived ? 2 : 0;
+}
+
+function base64DetectIncompleteChar(buffer) {
+ this.charReceived = buffer.length % 3;
+ this.charLength = this.charReceived ? 3 : 0;
+}
+
+},{"buffer":2}],23:[function(require,module,exports){
+module.exports = function isBuffer(arg) {
+ return arg && typeof arg === 'object'
+ && typeof arg.copy === 'function'
+ && typeof arg.fill === 'function'
+ && typeof arg.readUInt8 === 'function';
+}
+},{}],24:[function(require,module,exports){
+(function (process,global){
+// Copyright Joyent, Inc. and other Node contributors.
+//
+// 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.
+
+var formatRegExp = /%[sdj%]/g;
+exports.format = function(f) {
+ if (!isString(f)) {
+ var objects = [];
+ for (var i = 0; i < arguments.length; i++) {
+ objects.push(inspect(arguments[i]));
+ }
+ return objects.join(' ');
+ }
+
+ var i = 1;
+ var args = arguments;
+ var len = args.length;
+ var str = String(f).replace(formatRegExp, function(x) {
+ if (x === '%%') return '%';
+ if (i >= len) return x;
+ switch (x) {
+ case '%s': return String(args[i++]);
+ case '%d': return Number(args[i++]);
+ case '%j':
+ try {
+ return JSON.stringify(args[i++]);
+ } catch (_) {
+ return '[Circular]';
}
- );
+ default:
+ return x;
+ }
+ });
+ for (var x = args[i]; i < len; x = args[++i]) {
+ if (isNull(x) || !isObject(x)) {
+ str += ' ' + x;
+ } else {
+ str += ' ' + inspect(x);
+ }
+ }
+ return str;
};
-JingleSession.prototype.addIceCandidate = function (elem) {
- var self = this;
- if (this.peerconnection.signalingState == 'closed') {
- return;
+
+// Mark that a method should not be used.
+// Returns a modified function which warns once by default.
+// If --no-deprecation is set, then it is a no-op.
+exports.deprecate = function(fn, msg) {
+ // Allow for deprecating things in the process of starting up.
+ if (isUndefined(global.process)) {
+ return function() {
+ return exports.deprecate(fn, msg).apply(this, arguments);
+ };
+ }
+
+ if (process.noDeprecation === true) {
+ return fn;
+ }
+
+ var warned = false;
+ function deprecated() {
+ if (!warned) {
+ if (process.throwDeprecation) {
+ throw new Error(msg);
+ } else if (process.traceDeprecation) {
+ console.trace(msg);
+ } else {
+ console.error(msg);
+ }
+ warned = true;
}
- if (!this.peerconnection.remoteDescription && this.peerconnection.signalingState == 'have-local-offer') {
- console.log('trickle ice candidate arriving before session accept...');
- // create a PRANSWER for setRemoteDescription
- if (!this.remoteSDP) {
- var cobbled = 'v=0\r\n' +
- 'o=- ' + '1923518516' + ' 2 IN IP4 0.0.0.0\r\n' +// FIXME
- 's=-\r\n' +
- 't=0 0\r\n';
- // first, take some things from the local description
- for (var i = 0; i < this.localSDP.media.length; i++) {
- cobbled += SDPUtil.find_line(this.localSDP.media[i], 'm=') + '\r\n';
- cobbled += SDPUtil.find_lines(this.localSDP.media[i], 'a=rtpmap:').join('\r\n') + '\r\n';
- if (SDPUtil.find_line(this.localSDP.media[i], 'a=mid:')) {
- cobbled += SDPUtil.find_line(this.localSDP.media[i], 'a=mid:') + '\r\n';
- }
- cobbled += 'a=inactive\r\n';
- }
- this.remoteSDP = new SDP(cobbled);
- }
- // then add things like ice and dtls from remote candidate
- elem.each(function () {
- for (var i = 0; i < self.remoteSDP.media.length; i++) {
- if (SDPUtil.find_line(self.remoteSDP.media[i], 'a=mid:' + $(this).attr('name')) ||
- self.remoteSDP.media[i].indexOf('m=' + $(this).attr('name')) === 0) {
- if (!SDPUtil.find_line(self.remoteSDP.media[i], 'a=ice-ufrag:')) {
- var tmp = $(this).find('transport');
- self.remoteSDP.media[i] += 'a=ice-ufrag:' + tmp.attr('ufrag') + '\r\n';
- self.remoteSDP.media[i] += 'a=ice-pwd:' + tmp.attr('pwd') + '\r\n';
- tmp = $(this).find('transport>fingerprint');
- if (tmp.length) {
- self.remoteSDP.media[i] += 'a=fingerprint:' + tmp.attr('hash') + ' ' + tmp.text() + '\r\n';
- } else {
- console.log('no dtls fingerprint (webrtc issue #1718?)');
- self.remoteSDP.media[i] += 'a=crypto:1 AES_CM_128_HMAC_SHA1_80 inline:BAADBAADBAADBAADBAADBAADBAADBAADBAADBAAD\r\n';
- }
- break;
- }
- }
- }
- });
- this.remoteSDP.raw = this.remoteSDP.session + this.remoteSDP.media.join('');
+ return fn.apply(this, arguments);
+ }
- // we need a complete SDP with ice-ufrag/ice-pwd in all parts
- // this makes the assumption that the PRANSWER is constructed such that the ice-ufrag is in all mediaparts
- // but it could be in the session part as well. since the code above constructs this sdp this can't happen however
- var iscomplete = this.remoteSDP.media.filter(function (mediapart) {
- return SDPUtil.find_line(mediapart, 'a=ice-ufrag:');
- }).length == this.remoteSDP.media.length;
+ return deprecated;
+};
- if (iscomplete) {
- console.log('setting pranswer');
- try {
- this.peerconnection.setRemoteDescription(new RTCSessionDescription({type: 'pranswer', sdp: this.remoteSDP.raw }),
- function() {
- },
- function(e) {
- console.log('setRemoteDescription pranswer failed', e.toString());
- });
- } catch (e) {
- console.error('setting pranswer failed', e);
- }
+
+var debugs = {};
+var debugEnviron;
+exports.debuglog = function(set) {
+ if (isUndefined(debugEnviron))
+ debugEnviron = process.env.NODE_DEBUG || '';
+ set = set.toUpperCase();
+ if (!debugs[set]) {
+ if (new RegExp('\\b' + set + '\\b', 'i').test(debugEnviron)) {
+ var pid = process.pid;
+ debugs[set] = function() {
+ var msg = exports.format.apply(exports, arguments);
+ console.error('%s %d: %s', set, pid, msg);
+ };
+ } else {
+ debugs[set] = function() {};
+ }
+ }
+ return debugs[set];
+};
+
+
+/**
+ * Echos the value of a value. Trys to print the value out
+ * in the best way possible given the different types.
+ *
+ * @param {Object} obj The object to print out.
+ * @param {Object} opts Optional options object that alters the output.
+ */
+/* legacy: obj, showHidden, depth, colors*/
+function inspect(obj, opts) {
+ // default options
+ var ctx = {
+ seen: [],
+ stylize: stylizeNoColor
+ };
+ // legacy...
+ if (arguments.length >= 3) ctx.depth = arguments[2];
+ if (arguments.length >= 4) ctx.colors = arguments[3];
+ if (isBoolean(opts)) {
+ // legacy...
+ ctx.showHidden = opts;
+ } else if (opts) {
+ // got an "options" object
+ exports._extend(ctx, opts);
+ }
+ // set default options
+ if (isUndefined(ctx.showHidden)) ctx.showHidden = false;
+ if (isUndefined(ctx.depth)) ctx.depth = 2;
+ if (isUndefined(ctx.colors)) ctx.colors = false;
+ if (isUndefined(ctx.customInspect)) ctx.customInspect = true;
+ if (ctx.colors) ctx.stylize = stylizeWithColor;
+ return formatValue(ctx, obj, ctx.depth);
+}
+exports.inspect = inspect;
+
+
+// http://en.wikipedia.org/wiki/ANSI_escape_code#graphics
+inspect.colors = {
+ 'bold' : [1, 22],
+ 'italic' : [3, 23],
+ 'underline' : [4, 24],
+ 'inverse' : [7, 27],
+ 'white' : [37, 39],
+ 'grey' : [90, 39],
+ 'black' : [30, 39],
+ 'blue' : [34, 39],
+ 'cyan' : [36, 39],
+ 'green' : [32, 39],
+ 'magenta' : [35, 39],
+ 'red' : [31, 39],
+ 'yellow' : [33, 39]
+};
+
+// Don't use 'blue' not visible on cmd.exe
+inspect.styles = {
+ 'special': 'cyan',
+ 'number': 'yellow',
+ 'boolean': 'yellow',
+ 'undefined': 'grey',
+ 'null': 'bold',
+ 'string': 'green',
+ 'date': 'magenta',
+ // "name": intentionally not styling
+ 'regexp': 'red'
+};
+
+
+function stylizeWithColor(str, styleType) {
+ var style = inspect.styles[styleType];
+
+ if (style) {
+ return '\u001b[' + inspect.colors[style][0] + 'm' + str +
+ '\u001b[' + inspect.colors[style][1] + 'm';
+ } else {
+ return str;
+ }
+}
+
+
+function stylizeNoColor(str, styleType) {
+ return str;
+}
+
+
+function arrayToHash(array) {
+ var hash = {};
+
+ array.forEach(function(val, idx) {
+ hash[val] = true;
+ });
+
+ return hash;
+}
+
+
+function formatValue(ctx, value, recurseTimes) {
+ // Provide a hook for user-specified inspect functions.
+ // Check that value is an object with an inspect function on it
+ if (ctx.customInspect &&
+ value &&
+ isFunction(value.inspect) &&
+ // Filter out the util module, it's inspect function is special
+ value.inspect !== exports.inspect &&
+ // Also filter out any prototype objects using the circular check.
+ !(value.constructor && value.constructor.prototype === value)) {
+ var ret = value.inspect(recurseTimes, ctx);
+ if (!isString(ret)) {
+ ret = formatValue(ctx, ret, recurseTimes);
+ }
+ return ret;
+ }
+
+ // Primitive types cannot have properties
+ var primitive = formatPrimitive(ctx, value);
+ if (primitive) {
+ return primitive;
+ }
+
+ // Look up the keys of the object.
+ var keys = Object.keys(value);
+ var visibleKeys = arrayToHash(keys);
+
+ if (ctx.showHidden) {
+ keys = Object.getOwnPropertyNames(value);
+ }
+
+ // IE doesn't make error fields non-enumerable
+ // http://msdn.microsoft.com/en-us/library/ie/dww52sbt(v=vs.94).aspx
+ if (isError(value)
+ && (keys.indexOf('message') >= 0 || keys.indexOf('description') >= 0)) {
+ return formatError(value);
+ }
+
+ // Some type of object without properties can be shortcutted.
+ if (keys.length === 0) {
+ if (isFunction(value)) {
+ var name = value.name ? ': ' + value.name : '';
+ return ctx.stylize('[Function' + name + ']', 'special');
+ }
+ if (isRegExp(value)) {
+ return ctx.stylize(RegExp.prototype.toString.call(value), 'regexp');
+ }
+ if (isDate(value)) {
+ return ctx.stylize(Date.prototype.toString.call(value), 'date');
+ }
+ if (isError(value)) {
+ return formatError(value);
+ }
+ }
+
+ var base = '', array = false, braces = ['{', '}'];
+
+ // Make Array say that they are Array
+ if (isArray(value)) {
+ array = true;
+ braces = ['[', ']'];
+ }
+
+ // Make functions say that they are functions
+ if (isFunction(value)) {
+ var n = value.name ? ': ' + value.name : '';
+ base = ' [Function' + n + ']';
+ }
+
+ // Make RegExps say that they are RegExps
+ if (isRegExp(value)) {
+ base = ' ' + RegExp.prototype.toString.call(value);
+ }
+
+ // Make dates with properties first say the date
+ if (isDate(value)) {
+ base = ' ' + Date.prototype.toUTCString.call(value);
+ }
+
+ // Make error with message first say the error
+ if (isError(value)) {
+ base = ' ' + formatError(value);
+ }
+
+ if (keys.length === 0 && (!array || value.length == 0)) {
+ return braces[0] + base + braces[1];
+ }
+
+ if (recurseTimes < 0) {
+ if (isRegExp(value)) {
+ return ctx.stylize(RegExp.prototype.toString.call(value), 'regexp');
+ } else {
+ return ctx.stylize('[Object]', 'special');
+ }
+ }
+
+ ctx.seen.push(value);
+
+ var output;
+ if (array) {
+ output = formatArray(ctx, value, recurseTimes, visibleKeys, keys);
+ } else {
+ output = keys.map(function(key) {
+ return formatProperty(ctx, value, recurseTimes, visibleKeys, key, array);
+ });
+ }
+
+ ctx.seen.pop();
+
+ return reduceToSingleString(output, base, braces);
+}
+
+
+function formatPrimitive(ctx, value) {
+ if (isUndefined(value))
+ return ctx.stylize('undefined', 'undefined');
+ if (isString(value)) {
+ var simple = '\'' + JSON.stringify(value).replace(/^"|"$/g, '')
+ .replace(/'/g, "\\'")
+ .replace(/\\"/g, '"') + '\'';
+ return ctx.stylize(simple, 'string');
+ }
+ if (isNumber(value))
+ return ctx.stylize('' + value, 'number');
+ if (isBoolean(value))
+ return ctx.stylize('' + value, 'boolean');
+ // For some reason typeof null is "object", so special case here.
+ if (isNull(value))
+ return ctx.stylize('null', 'null');
+}
+
+
+function formatError(value) {
+ return '[' + Error.prototype.toString.call(value) + ']';
+}
+
+
+function formatArray(ctx, value, recurseTimes, visibleKeys, keys) {
+ var output = [];
+ for (var i = 0, l = value.length; i < l; ++i) {
+ if (hasOwnProperty(value, String(i))) {
+ output.push(formatProperty(ctx, value, recurseTimes, visibleKeys,
+ String(i), true));
+ } else {
+ output.push('');
+ }
+ }
+ keys.forEach(function(key) {
+ if (!key.match(/^\d+$/)) {
+ output.push(formatProperty(ctx, value, recurseTimes, visibleKeys,
+ key, true));
+ }
+ });
+ return output;
+}
+
+
+function formatProperty(ctx, value, recurseTimes, visibleKeys, key, array) {
+ var name, str, desc;
+ desc = Object.getOwnPropertyDescriptor(value, key) || { value: value[key] };
+ if (desc.get) {
+ if (desc.set) {
+ str = ctx.stylize('[Getter/Setter]', 'special');
+ } else {
+ str = ctx.stylize('[Getter]', 'special');
+ }
+ } else {
+ if (desc.set) {
+ str = ctx.stylize('[Setter]', 'special');
+ }
+ }
+ if (!hasOwnProperty(visibleKeys, key)) {
+ name = '[' + key + ']';
+ }
+ if (!str) {
+ if (ctx.seen.indexOf(desc.value) < 0) {
+ if (isNull(recurseTimes)) {
+ str = formatValue(ctx, desc.value, null);
+ } else {
+ str = formatValue(ctx, desc.value, recurseTimes - 1);
+ }
+ if (str.indexOf('\n') > -1) {
+ if (array) {
+ str = str.split('\n').map(function(line) {
+ return ' ' + line;
+ }).join('\n').substr(2);
} else {
- //console.log('not yet setting pranswer');
+ str = '\n' + str.split('\n').map(function(line) {
+ return ' ' + line;
+ }).join('\n');
}
+ }
+ } else {
+ str = ctx.stylize('[Circular]', 'special');
}
- // operate on each content element
- elem.each(function () {
- // would love to deactivate this, but firefox still requires it
- var idx = -1;
- var i;
- for (i = 0; i < self.remoteSDP.media.length; i++) {
- if (SDPUtil.find_line(self.remoteSDP.media[i], 'a=mid:' + $(this).attr('name')) ||
- self.remoteSDP.media[i].indexOf('m=' + $(this).attr('name')) === 0) {
- idx = i;
- break;
- }
+ }
+ if (isUndefined(name)) {
+ if (array && key.match(/^\d+$/)) {
+ return str;
+ }
+ name = JSON.stringify('' + key);
+ if (name.match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)) {
+ name = name.substr(1, name.length - 2);
+ name = ctx.stylize(name, 'name');
+ } else {
+ name = name.replace(/'/g, "\\'")
+ .replace(/\\"/g, '"')
+ .replace(/(^"|"$)/g, "'");
+ name = ctx.stylize(name, 'string');
+ }
+ }
+
+ return name + ': ' + str;
+}
+
+
+function reduceToSingleString(output, base, braces) {
+ var numLinesEst = 0;
+ var length = output.reduce(function(prev, cur) {
+ numLinesEst++;
+ if (cur.indexOf('\n') >= 0) numLinesEst++;
+ return prev + cur.replace(/\u001b\[\d\d?m/g, '').length + 1;
+ }, 0);
+
+ if (length > 60) {
+ return braces[0] +
+ (base === '' ? '' : base + '\n ') +
+ ' ' +
+ output.join(',\n ') +
+ ' ' +
+ braces[1];
+ }
+
+ return braces[0] + base + ' ' + output.join(', ') + ' ' + braces[1];
+}
+
+
+// NOTE: These type checking functions intentionally don't use `instanceof`
+// because it is fragile and can be easily faked with `Object.create()`.
+function isArray(ar) {
+ return Array.isArray(ar);
+}
+exports.isArray = isArray;
+
+function isBoolean(arg) {
+ return typeof arg === 'boolean';
+}
+exports.isBoolean = isBoolean;
+
+function isNull(arg) {
+ return arg === null;
+}
+exports.isNull = isNull;
+
+function isNullOrUndefined(arg) {
+ return arg == null;
+}
+exports.isNullOrUndefined = isNullOrUndefined;
+
+function isNumber(arg) {
+ return typeof arg === 'number';
+}
+exports.isNumber = isNumber;
+
+function isString(arg) {
+ return typeof arg === 'string';
+}
+exports.isString = isString;
+
+function isSymbol(arg) {
+ return typeof arg === 'symbol';
+}
+exports.isSymbol = isSymbol;
+
+function isUndefined(arg) {
+ return arg === void 0;
+}
+exports.isUndefined = isUndefined;
+
+function isRegExp(re) {
+ return isObject(re) && objectToString(re) === '[object RegExp]';
+}
+exports.isRegExp = isRegExp;
+
+function isObject(arg) {
+ return typeof arg === 'object' && arg !== null;
+}
+exports.isObject = isObject;
+
+function isDate(d) {
+ return isObject(d) && objectToString(d) === '[object Date]';
+}
+exports.isDate = isDate;
+
+function isError(e) {
+ return isObject(e) &&
+ (objectToString(e) === '[object Error]' || e instanceof Error);
+}
+exports.isError = isError;
+
+function isFunction(arg) {
+ return typeof arg === 'function';
+}
+exports.isFunction = isFunction;
+
+function isPrimitive(arg) {
+ return arg === null ||
+ typeof arg === 'boolean' ||
+ typeof arg === 'number' ||
+ typeof arg === 'string' ||
+ typeof arg === 'symbol' || // ES6 symbol
+ typeof arg === 'undefined';
+}
+exports.isPrimitive = isPrimitive;
+
+exports.isBuffer = require('./support/isBuffer');
+
+function objectToString(o) {
+ return Object.prototype.toString.call(o);
+}
+
+
+function pad(n) {
+ return n < 10 ? '0' + n.toString(10) : n.toString(10);
+}
+
+
+var months = ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep',
+ 'Oct', 'Nov', 'Dec'];
+
+// 26 Feb 16:19:34
+function timestamp() {
+ var d = new Date();
+ var time = [pad(d.getHours()),
+ pad(d.getMinutes()),
+ pad(d.getSeconds())].join(':');
+ return [d.getDate(), months[d.getMonth()], time].join(' ');
+}
+
+
+// log is just a thin wrapper to console.log that prepends a timestamp
+exports.log = function() {
+ console.log('%s - %s', timestamp(), exports.format.apply(exports, arguments));
+};
+
+
+/**
+ * Inherit the prototype methods from one constructor into another.
+ *
+ * The Function.prototype.inherits from lang.js rewritten as a standalone
+ * function (not on Function.prototype). NOTE: If this file is to be loaded
+ * during bootstrapping this function needs to be rewritten using some native
+ * functions as prototype setup using normal JavaScript does not work as
+ * expected during bootstrapping (see mirror.js in r114903).
+ *
+ * @param {function} ctor Constructor function which needs to inherit the
+ * prototype.
+ * @param {function} superCtor Constructor function to inherit prototype from.
+ */
+exports.inherits = require('inherits');
+
+exports._extend = function(origin, add) {
+ // Don't do anything if add isn't an object
+ if (!add || !isObject(add)) return origin;
+
+ var keys = Object.keys(add);
+ var i = keys.length;
+ while (i--) {
+ origin[keys[i]] = add[keys[i]];
+ }
+ return origin;
+};
+
+function hasOwnProperty(obj, prop) {
+ return Object.prototype.hasOwnProperty.call(obj, prop);
+}
+
+}).call(this,require('_process'),typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {})
+},{"./support/isBuffer":23,"_process":9,"inherits":7}],25:[function(require,module,exports){
+var util = require('util');
+var intersect = require('intersect');
+var WildEmitter = require('wildemitter');
+var webrtc = require('webrtcsupport');
+
+var BaseSession = require('jingle-session');
+var MediaSession = require('jingle-media-session');
+var FileSession = require('jingle-filetransfer-session');
+
+
+function SessionManager(conf) {
+ WildEmitter.call(this);
+
+ conf = conf || {};
+
+ this.jid = conf.jid;
+ this.selfID = conf.selfID || (this.jid && this.jid.full) || this.jid || '';
+
+ this.sessions = {};
+ this.peers = {};
+
+ this.prepareSession = conf.prepareSession || function (opts) {
+ if (opts.descriptionTypes.indexOf('rtp') >= 0) {
+ return new MediaSession(opts);
}
- if (idx == -1) { // fall back to localdescription
- for (i = 0; i < self.localSDP.media.length; i++) {
- if (SDPUtil.find_line(self.localSDP.media[i], 'a=mid:' + $(this).attr('name')) ||
- self.localSDP.media[i].indexOf('m=' + $(this).attr('name')) === 0) {
- idx = i;
- break;
- }
- }
+ if (opts.descriptionTypes.indexOf('filetransfer') >= 0) {
+ return new FileSession(opts);
}
- var name = $(this).attr('name');
- // TODO: check ice-pwd and ice-ufrag?
- $(this).find('transport>candidate').each(function () {
- var line, candidate;
- line = SDPUtil.candidateFromJingle(this);
- candidate = new RTCIceCandidate({sdpMLineIndex: idx,
- sdpMid: name,
- candidate: line});
- try {
- self.peerconnection.addIceCandidate(candidate);
- } catch (e) {
- console.error('addIceCandidate failed', e.toString(), line);
+ };
+
+ this.performTieBreak = conf.performTieBreak || function (sess, req) {
+ var descriptionTypes = req.jingle.contents.map(function (content) {
+ if (content.description) {
+ return content.description.descType;
}
});
- });
-};
-JingleSession.prototype.sendAnswer = function (provisional) {
- //console.log('createAnswer', provisional);
- var self = this;
- this.peerconnection.createAnswer(
- function (sdp) {
- self.createdAnswer(sdp, provisional);
+ var matching = intersect(sess.pendingDescriptionTypes, descriptionTypes);
+
+ return matching.length > 0;
+ };
+
+ this.screenSharingSupport = webrtc.screenSharing;
+
+ this.capabilities = [
+ 'urn:xmpp:jingle:1'
+ ];
+ if (webrtc.support) {
+ this.capabilities = [
+ 'urn:xmpp:jingle:1',
+ 'urn:xmpp:jingle:apps:rtp:1',
+ 'urn:xmpp:jingle:apps:rtp:audio',
+ 'urn:xmpp:jingle:apps:rtp:video',
+ 'urn:xmpp:jingle:apps:rtp:rtcb-fb:0',
+ 'urn:xmpp:jingle:apps:rtp:rtp-hdrext:0',
+ 'urn:xmpp:jingle:apps:rtp:ssma:0',
+ 'urn:xmpp:jingle:apps:dtls:0',
+ 'urn:xmpp:jingle:apps:grouping:0',
+ 'urn:xmpp:jingle:apps:file-transfer:3',
+ 'urn:xmpp:jingle:transports:ice-udp:1',
+ 'urn:xmpp:jingle:transports.dtls-sctp:1',
+ 'urn:ietf:rfc:3264',
+ 'urn:ietf:rfc:5576',
+ 'urn:ietf:rfc:5888'
+ ];
+ }
+
+ this.config = {
+ debug: false,
+ peerConnectionConfig: {
+ iceServers: conf.iceServers || [{'url': 'stun:stun.l.google.com:19302'}]
},
- function (e) {
- console.error('createAnswer failed', e);
+ peerConnectionConstraints: {
+ optional: [
+ {DtlsSrtpKeyAgreement: true},
+ {RtpDataChannels: false}
+ ]
},
- this.media_constraints
- );
+ media: {
+ audio: true,
+ video: true
+ }
+ };
+
+ for (var item in conf) {
+ this.config[item] = conf[item];
+ }
+
+ this.iceServers = this.config.peerConnectionConfig.iceServers;
+}
+
+
+util.inherits(SessionManager, WildEmitter);
+
+
+SessionManager.prototype.addICEServer = function (server) {
+ // server == {
+ // url: '',
+ // [username: '',]
+ // [credential: '']
+ // }
+ if (typeof server === 'string') {
+ server = {url: server};
+ }
+ this.iceServers.push(server);
};
-JingleSession.prototype.createdAnswer = function (sdp, provisional) {
- //console.log('createAnswer callback');
+SessionManager.prototype.addSession = function (session) {
var self = this;
- this.localSDP = new SDP(sdp.sdp);
- //this.localSDP.mangle();
- this.usepranswer = provisional === true;
-
- if (this.startmuted) {
- console.log('we got a request to start muted...');
- this.connection.jingle.localStream.getAudioTracks().forEach(function (track) {
- track.enabled = false;
- });
- // doing this freezes local video, too (which probably means it should be replaced
- // by a symbol
- this.connection.jingle.localStream.getVideoTracks().forEach(function (track) {
- track.enabled = false;
- });
- // set video to recvonly
- this.localSDP.media[1] = this.localSDP.media[1].replace('a=sendrecv', 'a=recvonly');
- // and remove a=ssrc lines. Weird things happen otherwise
- SDPUtil.find_lines(this.localSDP.media[1], 'a=ssrc:').forEach(function (line) {
- self.localSDP.media[1] = self.localSDP.media[1].replace(line + '\r\n', '');
- });
- this.localSDP.raw = this.localSDP.session + this.localSDP.media.join('');
- }
-
- if (this.usetrickle) {
- if (!this.usepranswer) {
- var accept = $iq({to: this.peerjid,
- type: 'set'})
- .c('jingle', {xmlns: 'urn:xmpp:jingle:1',
- action: 'session-accept',
- initiator: this.initiator,
- responder: this.responder,
- sid: this.sid });
- this.localSDP.toJingle(accept, this.initiator == this.me ? 'initiator' : 'responder');
- this.connection.sendIQ(accept,
- function () {
- var ack = {};
- ack.source = 'answer';
- $(document).trigger('ack.jingle', [self.sid, ack]);
- },
- function (stanza) {
- var error = ($(stanza).find('error').length) ? {
- code: $(stanza).find('error').attr('code'),
- reason: $(stanza).find('error :first')[0].tagName,
- }:{};
- error.source = 'answer';
- $(document).trigger('error.jingle', [self.sid, error]);
- },
- 10000);
- } else {
- sdp.type = 'pranswer';
- for (var i = 0; i < this.localSDP.media.length; i++) {
- this.localSDP.media[i] = this.localSDP.media[i].replace('a=sendrecv\r\n', 'a=inactive\r\n');
+ var sid = session.sid;
+ var peer = session.peerID;
+
+ this.sessions[sid] = session;
+ if (!this.peers[peer]) {
+ this.peers[peer] = [];
+ }
+
+ this.peers[peer].push(session);
+
+ // Automatically clean up tracked sessions
+ session.on('terminated', function () {
+ var peers = self.peers[peer] || [];
+ if (peers.length) {
+ peers.splice(peers.indexOf(session), 1);
+ }
+ delete self.sessions[sid];
+ });
+
+ // Proxy session events
+ session.on('*', function (name, data, extraData, extraData2) {
+ // Listen for when we actually try to start a session to
+ // trigger the outgoing event.
+ if (name === 'send') {
+ var action = data.jingle && data.jingle.action;
+ if (session.isInitiator && action === 'session-initiate') {
+ self.emit('outgoing', session);
}
- this.localSDP.raw = this.localSDP.session + this.localSDP.media.join('');
}
- }
- sdp.sdp = this.localSDP.raw;
- this.peerconnection.setLocalDescription(sdp,
- function () {
- $(document).trigger('setLocalDescription.jingle', [self.sid]);
- //console.log('setLocalDescription success');
- },
- function (e) {
- console.error('setLocalDescription failed', e);
+
+ if (self.config.debug && (name === 'log:debug' || name === 'log:error')) {
+ console.log('Jingle:', data, extraData, extraData2);
}
- );
- var cands = SDPUtil.find_lines(this.localSDP.raw, 'a=candidate:');
- for (var j = 0; j < cands.length; j++) {
- var cand = SDPUtil.parse_icecandidate(cands[j]);
- if (cand.type == 'srflx') {
- this.hadstuncandidate = true;
- } else if (cand.type == 'relay') {
- this.hadturncandidate = true;
+
+ // Don't proxy change:* events, since those don't apply to
+ // the session manager itself.
+ if (name.indexOf('change') === 0) {
+ return;
}
- }
+
+ self.emit(name, data, extraData, extraData2);
+ });
+
+ this.emit('createdSession', session);
+
+ return session;
};
-JingleSession.prototype.sendTerminate = function (reason, text) {
- var self = this,
- term = $iq({to: this.peerjid,
- type: 'set'})
- .c('jingle', {xmlns: 'urn:xmpp:jingle:1',
- action: 'session-terminate',
- initiator: this.initiator,
- sid: this.sid})
- .c('reason')
- .c(reason || 'success');
-
- if (text) {
- term.up().c('text').t(text);
- }
-
- this.connection.sendIQ(term,
- function () {
- self.peerconnection.close();
- self.peerconnection = null;
- self.terminate();
- var ack = {};
- ack.source = 'terminate';
- $(document).trigger('ack.jingle', [self.sid, ack]);
- },
- function (stanza) {
- var error = ($(stanza).find('error').length) ? {
- code: $(stanza).find('error').attr('code'),
- reason: $(stanza).find('error :first')[0].tagName,
- }:{};
- $(document).trigger('ack.jingle', [self.sid, error]);
- },
- 10000);
- if (this.statsinterval !== null) {
- window.clearInterval(this.statsinterval);
- this.statsinterval = null;
- }
+SessionManager.prototype.createMediaSession = function (peer, sid, stream) {
+ var session = new MediaSession({
+ sid: sid,
+ peer: peer,
+ initiator: true,
+ stream: stream,
+ parent: this,
+ iceServers: this.iceServers,
+ constraints: this.config.peerConnectionConstraints
+ });
+
+ this.addSession(session);
+
+ return session;
};
+SessionManager.prototype.createFileTransferSession = function (peer, sid) {
+ var session = new FileSession({
+ sid: sid,
+ peer: peer,
+ initiator: true,
+ parent: this
+ });
-JingleSession.prototype.addSource = function (elem) {
- console.log('addssrc', new Date().getTime());
- console.log('ice', this.peerconnection.iceConnectionState);
- var sdp = new SDP(this.peerconnection.remoteDescription.sdp);
+ this.addSession(session);
+ return session;
+};
+
+SessionManager.prototype.endPeerSessions = function (peer, reason, silent) {
+ peer = peer.full || peer;
+
+ var sessions = this.peers[peer] || [];
+ delete this.peers[peer];
+
+ sessions.forEach(function (session) {
+ session.end(reason || 'gone', silent);
+ });
+};
+
+SessionManager.prototype.endAllSessions = function (reason, silent) {
var self = this;
- $(elem).each(function (idx, content) {
- var name = $(content).attr('name');
- var lines = '';
- tmp = $(content).find('>source[xmlns="urn:xmpp:jingle:apps:rtp:ssma:0"]');
- tmp.each(function () {
- var ssrc = $(this).attr('ssrc');
- $(this).find('>parameter').each(function () {
- lines += 'a=ssrc:' + ssrc + ' ' + $(this).attr('name');
- if ($(this).attr('value') && $(this).attr('value').length)
- lines += ':' + $(this).attr('value');
- lines += '\r\n';
- });
- });
- sdp.media.forEach(function(media, idx) {
- if (!SDPUtil.find_line(media, 'a=mid:' + name))
- return;
- sdp.media[idx] += lines;
- if (!self.addssrc[idx]) self.addssrc[idx] = '';
- self.addssrc[idx] += lines;
- });
- sdp.raw = sdp.session + sdp.media.join('');
+ Object.keys(this.peers).forEach(function (peer) {
+ self.endPeerSessions(peer, reason, silent);
});
- this.modifySources();
};
-JingleSession.prototype.removeSource = function (elem) {
- console.log('removessrc', new Date().getTime());
- console.log('ice', this.peerconnection.iceConnectionState);
- var sdp = new SDP(this.peerconnection.remoteDescription.sdp);
+SessionManager.prototype._createIncomingSession = function (meta, req) {
+ var session;
- var self = this;
- $(elem).each(function (idx, content) {
- var name = $(content).attr('name');
- var lines = '';
- tmp = $(content).find('>source[xmlns="urn:xmpp:jingle:apps:rtp:ssma:0"]');
- tmp.each(function () {
- var ssrc = $(this).attr('ssrc');
- $(this).find('>parameter').each(function () {
- lines += 'a=ssrc:' + ssrc + ' ' + $(this).attr('name');
- if ($(this).attr('value') && $(this).attr('value').length)
- lines += ':' + $(this).attr('value');
- lines += '\r\n';
- });
- });
- sdp.media.forEach(function(media, idx) {
- if (!SDPUtil.find_line(media, 'a=mid:' + name))
- return;
- sdp.media[idx] += lines;
- if (!self.addssrc[idx]) self.removessrc[idx] = '';
- self.removessrc[idx] += lines;
- });
- sdp.raw = sdp.session + sdp.media.join('');
+ if (this.prepareSession) {
+ session = this.prepareSession(meta, req);
+ }
+
+ // Fallback to a generic session type, which can
+ // only be used to end the session.
+
+ if (!session) {
+ session = new BaseSession(meta);
+ }
+
+ this.addSession(session);
+
+ return session;
+};
+
+SessionManager.prototype._sendError = function (to, id, data) {
+ if (!data.type) {
+ data.type = 'cancel';
+ }
+ this.emit('send', {
+ to: to,
+ id: id,
+ type: 'error',
+ error: data
});
- this.modifySources();
};
-JingleSession.prototype.modifySources = function() {
+SessionManager.prototype._log = function (level, message) {
+ this.emit('log:' + level, message);
+};
+
+SessionManager.prototype.process = function (req) {
var self = this;
- if (this.peerconnection.signalingState == 'closed') return;
- if (!(this.addssrc.length || this.removessrc.length || this.pendingop !== null)) return;
- if (!(this.peerconnection.signalingState == 'stable' && this.peerconnection.iceConnectionState == 'connected')) {
- console.warn('modifySources not yet', this.peerconnection.signalingState, this.peerconnection.iceConnectionState);
- this.wait = true;
- window.setTimeout(function() { self.modifySources(); }, 250);
- return;
+
+ // Extract the request metadata that we need to verify
+ var sid = !!req.jingle ? req.jingle.sid : null;
+ var session = this.sessions[sid] || null;
+ var rid = req.id;
+ var sender = req.from.full || req.from;
+
+
+ if (req.type === 'error') {
+ var isTieBreak = req.error && req.error.jingleCondition === 'tie-break';
+ if (session && session.pending && isTieBreak) {
+ return session.end('alternative-session', true);
+ } else {
+ if (session) {
+ session.pendingAction = false;
+ }
+ return this.emit('error', req);
+ }
}
- if (this.wait) {
- window.setTimeout(function() { self.modifySources(); }, 2500);
- this.wait = false;
+
+ if (req.type === 'result') {
+ if (session) {
+ session.pendingAction = false;
+ }
return;
}
- var sdp = new SDP(this.peerconnection.remoteDescription.sdp);
+ var action = req.jingle.action;
+ var contents = req.jingle.contents || [];
- // add sources
- this.addssrc.forEach(function(lines, idx) {
- sdp.media[idx] += lines;
+ var descriptionTypes = contents.map(function (content) {
+ if (content.description) {
+ return content.description.descType;
+ }
});
- this.addssrc = [];
-
- // remove sources
- this.removessrc.forEach(function(lines, idx) {
- lines = lines.split('\r\n');
- lines.pop(); // remove empty last element;
- lines.forEach(function(line) {
- sdp.media[idx] = sdp.media[idx].replace(line + '\r\n', '');
- });
+ var transportTypes = contents.map(function (content) {
+ if (content.transport) {
+ return content.transport.transType;
+ }
});
- this.removessrc = [];
-
- sdp.raw = sdp.session + sdp.media.join('');
- this.peerconnection.setRemoteDescription(new RTCSessionDescription({type: 'offer', sdp: sdp.raw}),
- function() {
- self.peerconnection.createAnswer(
- function(modifiedAnswer) {
- // change video direction, see https://github.com/jitsi/jitmeet/issues/41
- if (self.pendingop !== null) {
- var sdp = new SDP(modifiedAnswer.sdp);
- if (sdp.media.length > 1) {
- switch(self.pendingop) {
- case 'mute':
- sdp.media[1] = sdp.media[1].replace('a=sendrecv', 'a=recvonly');
- break;
- case 'unmute':
- sdp.media[1] = sdp.media[1].replace('a=recvonly', 'a=sendrecv');
- break;
- }
- sdp.raw = sdp.session + sdp.media.join('');
- modifiedAnswer.sdp = sdp.raw;
- }
- self.pendingop = null;
- }
- self.peerconnection.setLocalDescription(modifiedAnswer,
- function() {
- //console.log('modified setLocalDescription ok');
- $(document).trigger('setLocalDescription.jingle', [self.sid]);
- },
- function(error) {
- console.log('modified setLocalDescription failed');
- }
- );
- },
- function(error) {
- console.log('modified answer failed');
- }
- );
- },
- function(error) {
- console.log('modify failed');
+
+ // Now verify that we are allowed to actually process the
+ // requested action
+
+ if (action !== 'session-initiate') {
+ // Can't modify a session that we don't have.
+ if (!session) {
+ this._log('error', 'Unknown session', sid);
+ return this._sendError(sender, rid, {
+ condition: 'item-not-found',
+ jingleCondition: 'unknown-session'
+ });
}
- );
-};
-// SDP-based mute by going recvonly/sendrecv
-// FIXME: should probably black out the screen as well
-JingleSession.prototype.hardMuteVideo = function (muted) {
- this.pendingop = muted ? 'mute' : 'unmute';
- this.modifySources();
+ // Check if someone is trying to hijack a session.
+ if (session.peerID !== sender || session.ended) {
+ this._log('error', 'Session has ended, or action has wrong sender');
+ return this._sendError(sender, rid, {
+ condition: 'item-not-found',
+ jingleCondition: 'unknown-session'
+ });
+ }
- this.connection.jingle.localStream.getVideoTracks().forEach(function (track) {
- track.enabled = !muted;
- });
-};
+ // Can't accept a session twice
+ if (action === 'session-accept' && !session.pending) {
+ this._log('error', 'Tried to accept session twice', sid);
+ return this._sendError(sender, rid, {
+ condition: 'unexpected-request',
+ jingleCondition: 'out-of-order'
+ });
+ }
-JingleSession.prototype.sendMute = function (muted, content) {
- var info = $iq({to: this.peerjid,
- type: 'set'})
- .c('jingle', {xmlns: 'urn:xmpp:jingle:1',
- action: 'session-info',
- initiator: this.initiator,
- sid: this.sid });
- info.c(muted ? 'mute' : 'unmute', {xmlns: 'urn:xmpp:jingle:apps:rtp:info:1'});
- info.attrs({'creator': this.me == this.initiator ? 'creator' : 'responder'});
- if (content) {
- info.attrs({'name': content});
- }
- this.connection.send(info);
-};
+ // Can't process two requests at once, need to tie break
+ if (action !== 'session-terminate' && action === session.pendingAction) {
+ this._log('error', 'Tie break during pending request');
+ if (session.isInitiator) {
+ return this._sendError(sender, rid, {
+ condition: 'conflict',
+ jingleCondition: 'tie-break'
+ });
+ }
+ }
+ } else if (session) {
+ // Don't accept a new session if we already have one.
+ if (session.peerID !== sender) {
+ this._log('error', 'Duplicate sid from new sender');
+ return this._sendError(sender, rid, {
+ condition: 'service-unavailable'
+ });
+ }
-JingleSession.prototype.sendRinging = function () {
- var info = $iq({to: this.peerjid,
- type: 'set'})
- .c('jingle', {xmlns: 'urn:xmpp:jingle:1',
- action: 'session-info',
- initiator: this.initiator,
- sid: this.sid });
- info.c('ringing', {xmlns: 'urn:xmpp:jingle:apps:rtp:info:1'});
- this.connection.send(info);
-};
+ // Check if we need to have a tie breaker because both parties
+ // happened to pick the same random sid.
+ if (session.pending) {
+ if (this.selfID > session.peerID && this.performTieBreak(session, req)) {
+ this._log('error', 'Tie break new session because of duplicate sids');
+ return this._sendError(sender, rid, {
+ condition: 'conflict',
+ jingleCondition: 'tie-break'
+ });
+ }
+ } else {
+ // The other side is just doing it wrong.
+ this._log('error', 'Someone is doing this wrong');
+ return this._sendError(sender, rid, {
+ condition: 'unexpected-request',
+ jingleCondition: 'out-of-order'
+ });
+ }
+ } else if (this.peers[sender] && this.peers[sender].length) {
+ // Check if we need to have a tie breaker because we already have
+ // a different session with this peer that is using the requested
+ // content description types.
+ for (var i = 0, len = this.peers[sender].length; i < len; i++) {
+ var sess = this.peers[sender][i];
+ if (sess && sess.pending && sess.sid > sid && this.performTieBreak(sess, req)) {
+ this._log('info', 'Tie break session-initiate');
+ return this._sendError(sender, rid, {
+ condition: 'conflict',
+ jingleCondition: 'tie-break'
+ });
+ }
+ }
+ }
-JingleSession.prototype.getStats = function (interval) {
- var self = this;
- var recv = {audio: 0, video: 0};
- var lost = {audio: 0, video: 0};
- var lastrecv = {audio: 0, video: 0};
- var lastlost = {audio: 0, video: 0};
- var loss = {audio: 0, video: 0};
- var delta = {audio: 0, video: 0};
- this.statsinterval = window.setInterval(function () {
- if (self && self.peerconnection && self.peerconnection.getStats) {
- self.peerconnection.getStats(function (stats) {
- var results = stats.result();
- // TODO: there are so much statistics you can get from this..
- for (var i = 0; i < results.length; ++i) {
- if (results[i].type == 'ssrc') {
- var packetsrecv = results[i].stat('packetsReceived');
- var packetslost = results[i].stat('packetsLost');
- if (packetsrecv && packetslost) {
- packetsrecv = parseInt(packetsrecv, 10);
- packetslost = parseInt(packetslost, 10);
-
- if (results[i].stat('googFrameRateReceived')) {
- lastlost.video = lost.video;
- lastrecv.video = recv.video;
- recv.video = packetsrecv;
- lost.video = packetslost;
- } else {
- lastlost.audio = lost.audio;
- lastrecv.audio = recv.audio;
- recv.audio = packetsrecv;
- lost.audio = packetslost;
- }
- }
- }
- }
- delta.audio = recv.audio - lastrecv.audio;
- delta.video = recv.video - lastrecv.video;
- loss.audio = (delta.audio > 0) ? Math.ceil(100 * (lost.audio - lastlost.audio) / delta.audio) : 0;
- loss.video = (delta.video > 0) ? Math.ceil(100 * (lost.video - lastlost.video) / delta.video) : 0;
- $(document).trigger('packetloss.jingle', [self.sid, loss]);
+ // We've now weeded out invalid requests, so we can process the action now.
+
+ if (action === 'session-initiate') {
+ if (!contents.length) {
+ return self._sendError(sender, rid, {
+ condition: 'bad-request'
});
}
- }, interval || 3000);
- return this.statsinterval;
+
+ session = this._createIncomingSession({
+ sid: sid,
+ peer: req.from,
+ peerID: sender,
+ initiator: false,
+ parent: this,
+ descriptionTypes: descriptionTypes,
+ transportTypes: transportTypes,
+ iceServers: this.iceServers,
+ constraints: this.config.peerConnectionConstraints
+ }, req);
+ }
+
+ session.process(action, req.jingle, function (err) {
+ if (err) {
+ self._log('error', 'Could not process request', req, err);
+ self._sendError(sender, rid, err);
+ } else {
+ self.emit('send', {
+ to: sender,
+ id: rid,
+ type: 'result',
+ });
+
+ // Wait for the initial action to be processed before emitting
+ // the session for the user to accept/reject.
+ if (action === 'session-initiate') {
+ self.emit('incoming', session);
+ }
+ }
+ });
};
-}(jQuery));
+module.exports = SessionManager;
+},{"intersect":28,"jingle-filetransfer-session":29,"jingle-media-session":78,"jingle-session":109,"util":24,"webrtcsupport":112,"wildemitter":113}],26:[function(require,module,exports){
+(function (process){
/*!
- * Source: lib/strophe.jingle/strophe.jingle.sdp.js, license: MIT, url: https://github.com/ESTOS/strophe.jingle
+ * async
+ * https://github.com/caolan/async
+ *
+ * Copyright 2010-2014 Caolan McMahon
+ * Released under the MIT license
*/
-/* jshint -W117 */
-var SDP;
-
-(function($){
-// SDP STUFF
-SDP = function(sdp) {
- this.media = sdp.split('\r\nm=');
- for (var i = 1; i < this.media.length; i++) {
- this.media[i] = 'm=' + this.media[i];
- if (i != this.media.length - 1) {
- this.media[i] += '\r\n';
- }
- }
- this.session = this.media.shift() + '\r\n';
- this.raw = this.session + this.media.join('');
-}
-
-// remove iSAC and CN from SDP
-SDP.prototype.mangle = function () {
- var i, j, mline, lines, rtpmap, newdesc;
- for (i = 0; i < this.media.length; i++) {
- lines = this.media[i].split('\r\n');
- lines.pop(); // remove empty last element
- mline = SDPUtil.parse_mline(lines.shift());
- if (mline.media != 'audio')
- continue;
- newdesc = '';
- mline.fmt.length = 0;
- for (j = 0; j < lines.length; j++) {
- if (lines[j].substr(0, 9) == 'a=rtpmap:') {
- rtpmap = SDPUtil.parse_rtpmap(lines[j]);
- if (rtpmap.name == 'CN' || rtpmap.name == 'ISAC')
- continue;
- mline.fmt.push(rtpmap.id);
- newdesc += lines[j] + '\r\n';
- } else {
- newdesc += lines[j] + '\r\n';
- }
+/*jshint onevar: false, indent:4 */
+/*global setImmediate: false, setTimeout: false, console: false */
+(function () {
+
+ var async = {};
+
+ // global on the server, window in the browser
+ var root, previous_async;
+
+ root = this;
+ if (root != null) {
+ previous_async = root.async;
+ }
+
+ async.noConflict = function () {
+ root.async = previous_async;
+ return async;
+ };
+
+ function only_once(fn) {
+ var called = false;
+ return function() {
+ if (called) throw new Error("Callback was already called.");
+ called = true;
+ fn.apply(root, arguments);
}
- this.media[i] = SDPUtil.build_mline(mline) + '\r\n';
- this.media[i] += newdesc;
}
- this.raw = this.session + this.media.join('');
-};
-// remove lines matching prefix from session section
-SDP.prototype.removeSessionLines = function(prefix) {
- var self = this;
- var lines = SDPUtil.find_lines(this.session, prefix);
- lines.forEach(function(line) {
- self.session = self.session.replace(line + '\r\n', '');
- });
- this.raw = this.session + this.media.join('');
- return lines;
-};
+ //// cross-browser compatiblity functions ////
-// remove lines matching prefix from a media section specified by mediaindex
-// TODO: non-numeric mediaindex could match mid
-SDP.prototype.removeMediaLines = function(mediaindex, prefix) {
- var self = this;
- var lines = SDPUtil.find_lines(this.media[mediaindex], prefix);
- lines.forEach(function(line) {
- self.media[mediaindex] = self.media[mediaindex].replace(line + '\r\n', '');
- });
- this.raw = this.session + this.media.join('');
- return lines;
-};
+ var _toString = Object.prototype.toString;
-// add content's to a jingle element
-SDP.prototype.toJingle = function (elem, thecreator) {
- var i, j, k, mline, ssrc, rtpmap, tmp, line, lines;
- var self = this;
- // new bundle plan
- if (SDPUtil.find_line(this.session, 'a=group:')) {
- lines = SDPUtil.find_lines(this.session, 'a=group:');
- for (i = 0; i < lines.length; i++) {
- tmp = lines[i].split(' ');
- var semantics = tmp.shift().substr(8);
- elem.c('group', {xmlns: 'urn:xmpp:jingle:apps:grouping:0', semantics:semantics});
- for (j = 0; j < tmp.length; j++) {
- elem.c('content', {name: tmp[j]}).up();
+ var _isArray = Array.isArray || function (obj) {
+ return _toString.call(obj) === '[object Array]';
+ };
+
+ var _each = function (arr, iterator) {
+ for (var i = 0; i < arr.length; i += 1) {
+ iterator(arr[i], i, arr);
+ }
+ };
+
+ var _map = function (arr, iterator) {
+ if (arr.map) {
+ return arr.map(iterator);
+ }
+ var results = [];
+ _each(arr, function (x, i, a) {
+ results.push(iterator(x, i, a));
+ });
+ return results;
+ };
+
+ var _reduce = function (arr, iterator, memo) {
+ if (arr.reduce) {
+ return arr.reduce(iterator, memo);
+ }
+ _each(arr, function (x, i, a) {
+ memo = iterator(memo, x, i, a);
+ });
+ return memo;
+ };
+
+ var _keys = function (obj) {
+ if (Object.keys) {
+ return Object.keys(obj);
+ }
+ var keys = [];
+ for (var k in obj) {
+ if (obj.hasOwnProperty(k)) {
+ keys.push(k);
}
- elem.up();
+ }
+ return keys;
+ };
+
+ //// exported async module functions ////
+
+ //// nextTick implementation with browser-compatible fallback ////
+ if (typeof process === 'undefined' || !(process.nextTick)) {
+ if (typeof setImmediate === 'function') {
+ async.nextTick = function (fn) {
+ // not a direct alias for IE10 compatibility
+ setImmediate(fn);
+ };
+ async.setImmediate = async.nextTick;
+ }
+ else {
+ async.nextTick = function (fn) {
+ setTimeout(fn, 0);
+ };
+ async.setImmediate = async.nextTick;
}
}
- // old bundle plan, to be removed
- var bundle = [];
- if (SDPUtil.find_line(this.session, 'a=group:BUNDLE')) {
- bundle = SDPUtil.find_line(this.session, 'a=group:BUNDLE ').split(' ');
- bundle.shift();
+ else {
+ async.nextTick = process.nextTick;
+ if (typeof setImmediate !== 'undefined') {
+ async.setImmediate = function (fn) {
+ // not a direct alias for IE10 compatibility
+ setImmediate(fn);
+ };
+ }
+ else {
+ async.setImmediate = async.nextTick;
+ }
}
- for (i = 0; i < this.media.length; i++) {
- mline = SDPUtil.parse_mline(this.media[i].split('\r\n')[0]);
- if (!(mline.media == 'audio' || mline.media == 'video')) {
- continue;
+
+ async.each = function (arr, iterator, callback) {
+ callback = callback || function () {};
+ if (!arr.length) {
+ return callback();
}
- if (SDPUtil.find_line(this.media[i], 'a=ssrc:')) {
- ssrc = SDPUtil.find_line(this.media[i], 'a=ssrc:').substring(7).split(' ')[0]; // take the first
- } else {
- ssrc = false;
+ var completed = 0;
+ _each(arr, function (x) {
+ iterator(x, only_once(done) );
+ });
+ function done(err) {
+ if (err) {
+ callback(err);
+ callback = function () {};
+ }
+ else {
+ completed += 1;
+ if (completed >= arr.length) {
+ callback();
+ }
+ }
}
+ };
+ async.forEach = async.each;
- elem.c('content', {creator: thecreator, name: mline.media});
- if (SDPUtil.find_line(this.media[i], 'a=mid:')) {
- // prefer identifier from a=mid if present
- var mid = SDPUtil.parse_mid(SDPUtil.find_line(this.media[i], 'a=mid:'));
- elem.attrs({ name: mid });
+ async.eachSeries = function (arr, iterator, callback) {
+ callback = callback || function () {};
+ if (!arr.length) {
+ return callback();
}
- if (SDPUtil.find_line(this.media[i], 'a=rtpmap:').length) {
- elem.c('description',
- {xmlns: 'urn:xmpp:jingle:apps:rtp:1',
- media: mline.media });
- if (ssrc) {
- elem.attrs({ssrc: ssrc});
- }
- for (j = 0; j < mline.fmt.length; j++) {
- rtpmap = SDPUtil.find_line(this.media[i], 'a=rtpmap:' + mline.fmt[j]);
- elem.c('payload-type', SDPUtil.parse_rtpmap(rtpmap));
- // put any 'a=fmtp:' + mline.fmt[j] lines into <param name=foo value=bar/>
- if (SDPUtil.find_line(this.media[i], 'a=fmtp:' + mline.fmt[j])) {
- tmp = SDPUtil.parse_fmtp(SDPUtil.find_line(this.media[i], 'a=fmtp:' + mline.fmt[j]));
- for (k = 0; k < tmp.length; k++) {
- elem.c('parameter', tmp[k]).up();
+ var completed = 0;
+ var iterate = function () {
+ iterator(arr[completed], function (err) {
+ if (err) {
+ callback(err);
+ callback = function () {};
+ }
+ else {
+ completed += 1;
+ if (completed >= arr.length) {
+ callback();
+ }
+ else {
+ iterate();
}
}
- this.RtcpFbToJingle(i, elem, mline.fmt[j]); // XEP-0293 -- map a=rtcp-fb
+ });
+ };
+ iterate();
+ };
+ async.forEachSeries = async.eachSeries;
- elem.up();
+ async.eachLimit = function (arr, limit, iterator, callback) {
+ var fn = _eachLimit(limit);
+ fn.apply(null, [arr, iterator, callback]);
+ };
+ async.forEachLimit = async.eachLimit;
+
+ var _eachLimit = function (limit) {
+
+ return function (arr, iterator, callback) {
+ callback = callback || function () {};
+ if (!arr.length || limit <= 0) {
+ return callback();
}
- if (SDPUtil.find_line(this.media[i], 'a=crypto:', this.session)) {
- elem.c('encryption', {required: 1});
- var crypto = SDPUtil.find_lines(this.media[i], 'a=crypto:', this.session);
- crypto.forEach(function(line) {
- elem.c('crypto', SDPUtil.parse_crypto(line)).up();
+ var completed = 0;
+ var started = 0;
+ var running = 0;
+
+ (function replenish () {
+ if (completed >= arr.length) {
+ return callback();
+ }
+
+ while (running < limit && started < arr.length) {
+ started += 1;
+ running += 1;
+ iterator(arr[started - 1], function (err) {
+ if (err) {
+ callback(err);
+ callback = function () {};
+ }
+ else {
+ completed += 1;
+ running -= 1;
+ if (completed >= arr.length) {
+ callback();
+ }
+ else {
+ replenish();
+ }
+ }
+ });
+ }
+ })();
+ };
+ };
+
+
+ var doParallel = function (fn) {
+ return function () {
+ var args = Array.prototype.slice.call(arguments);
+ return fn.apply(null, [async.each].concat(args));
+ };
+ };
+ var doParallelLimit = function(limit, fn) {
+ return function () {
+ var args = Array.prototype.slice.call(arguments);
+ return fn.apply(null, [_eachLimit(limit)].concat(args));
+ };
+ };
+ var doSeries = function (fn) {
+ return function () {
+ var args = Array.prototype.slice.call(arguments);
+ return fn.apply(null, [async.eachSeries].concat(args));
+ };
+ };
+
+
+ var _asyncMap = function (eachfn, arr, iterator, callback) {
+ arr = _map(arr, function (x, i) {
+ return {index: i, value: x};
+ });
+ if (!callback) {
+ eachfn(arr, function (x, callback) {
+ iterator(x.value, function (err) {
+ callback(err);
+ });
+ });
+ } else {
+ var results = [];
+ eachfn(arr, function (x, callback) {
+ iterator(x.value, function (err, v) {
+ results[x.index] = v;
+ callback(err);
});
- elem.up(); // end of encryption
+ }, function (err) {
+ callback(err, results);
+ });
+ }
+ };
+ async.map = doParallel(_asyncMap);
+ async.mapSeries = doSeries(_asyncMap);
+ async.mapLimit = function (arr, limit, iterator, callback) {
+ return _mapLimit(limit)(arr, iterator, callback);
+ };
+
+ var _mapLimit = function(limit) {
+ return doParallelLimit(limit, _asyncMap);
+ };
+
+ // reduce only has a series version, as doing reduce in parallel won't
+ // work in many situations.
+ async.reduce = function (arr, memo, iterator, callback) {
+ async.eachSeries(arr, function (x, callback) {
+ iterator(memo, x, function (err, v) {
+ memo = v;
+ callback(err);
+ });
+ }, function (err) {
+ callback(err, memo);
+ });
+ };
+ // inject alias
+ async.inject = async.reduce;
+ // foldl alias
+ async.foldl = async.reduce;
+
+ async.reduceRight = function (arr, memo, iterator, callback) {
+ var reversed = _map(arr, function (x) {
+ return x;
+ }).reverse();
+ async.reduce(reversed, memo, iterator, callback);
+ };
+ // foldr alias
+ async.foldr = async.reduceRight;
+
+ var _filter = function (eachfn, arr, iterator, callback) {
+ var results = [];
+ arr = _map(arr, function (x, i) {
+ return {index: i, value: x};
+ });
+ eachfn(arr, function (x, callback) {
+ iterator(x.value, function (v) {
+ if (v) {
+ results.push(x);
+ }
+ callback();
+ });
+ }, function (err) {
+ callback(_map(results.sort(function (a, b) {
+ return a.index - b.index;
+ }), function (x) {
+ return x.value;
+ }));
+ });
+ };
+ async.filter = doParallel(_filter);
+ async.filterSeries = doSeries(_filter);
+ // select alias
+ async.select = async.filter;
+ async.selectSeries = async.filterSeries;
+
+ var _reject = function (eachfn, arr, iterator, callback) {
+ var results = [];
+ arr = _map(arr, function (x, i) {
+ return {index: i, value: x};
+ });
+ eachfn(arr, function (x, callback) {
+ iterator(x.value, function (v) {
+ if (!v) {
+ results.push(x);
+ }
+ callback();
+ });
+ }, function (err) {
+ callback(_map(results.sort(function (a, b) {
+ return a.index - b.index;
+ }), function (x) {
+ return x.value;
+ }));
+ });
+ };
+ async.reject = doParallel(_reject);
+ async.rejectSeries = doSeries(_reject);
+
+ var _detect = function (eachfn, arr, iterator, main_callback) {
+ eachfn(arr, function (x, callback) {
+ iterator(x, function (result) {
+ if (result) {
+ main_callback(x);
+ main_callback = function () {};
+ }
+ else {
+ callback();
+ }
+ });
+ }, function (err) {
+ main_callback();
+ });
+ };
+ async.detect = doParallel(_detect);
+ async.detectSeries = doSeries(_detect);
+
+ async.some = function (arr, iterator, main_callback) {
+ async.each(arr, function (x, callback) {
+ iterator(x, function (v) {
+ if (v) {
+ main_callback(true);
+ main_callback = function () {};
+ }
+ callback();
+ });
+ }, function (err) {
+ main_callback(false);
+ });
+ };
+ // any alias
+ async.any = async.some;
+
+ async.every = function (arr, iterator, main_callback) {
+ async.each(arr, function (x, callback) {
+ iterator(x, function (v) {
+ if (!v) {
+ main_callback(false);
+ main_callback = function () {};
+ }
+ callback();
+ });
+ }, function (err) {
+ main_callback(true);
+ });
+ };
+ // all alias
+ async.all = async.every;
+
+ async.sortBy = function (arr, iterator, callback) {
+ async.map(arr, function (x, callback) {
+ iterator(x, function (err, criteria) {
+ if (err) {
+ callback(err);
+ }
+ else {
+ callback(null, {value: x, criteria: criteria});
+ }
+ });
+ }, function (err, results) {
+ if (err) {
+ return callback(err);
+ }
+ else {
+ var fn = function (left, right) {
+ var a = left.criteria, b = right.criteria;
+ return a < b ? -1 : a > b ? 1 : 0;
+ };
+ callback(null, _map(results.sort(fn), function (x) {
+ return x.value;
+ }));
}
+ });
+ };
- if (ssrc) {
- // new style mapping
- elem.c('source', { ssrc: ssrc, xmlns: 'urn:xmpp:jingle:apps:rtp:ssma:0' });
- // FIXME: group by ssrc and support multiple different ssrcs
- var ssrclines = SDPUtil.find_lines(this.media[i], 'a=ssrc:');
- ssrclines.forEach(function(line) {
- idx = line.indexOf(' ');
- var linessrc = line.substr(0, idx).substr(7);
- if (linessrc != ssrc) {
- elem.up();
- ssrc = linessrc;
- elem.c('source', { ssrc: ssrc, xmlns: 'urn:xmpp:jingle:apps:rtp:ssma:0' });
- }
- var kv = line.substr(idx + 1);
- elem.c('parameter');
- if (kv.indexOf(':') == -1) {
- elem.attrs({ name: kv });
- } else {
- elem.attrs({ name: kv.split(':', 2)[0] });
- elem.attrs({ value: kv.split(':', 2)[1] });
+ async.auto = function (tasks, callback) {
+ callback = callback || function () {};
+ var keys = _keys(tasks);
+ var remainingTasks = keys.length
+ if (!remainingTasks) {
+ return callback();
+ }
+
+ var results = {};
+
+ var listeners = [];
+ var addListener = function (fn) {
+ listeners.unshift(fn);
+ };
+ var removeListener = function (fn) {
+ for (var i = 0; i < listeners.length; i += 1) {
+ if (listeners[i] === fn) {
+ listeners.splice(i, 1);
+ return;
+ }
+ }
+ };
+ var taskComplete = function () {
+ remainingTasks--
+ _each(listeners.slice(0), function (fn) {
+ fn();
+ });
+ };
+
+ addListener(function () {
+ if (!remainingTasks) {
+ var theCallback = callback;
+ // prevent final callback from calling itself if it errors
+ callback = function () {};
+
+ theCallback(null, results);
+ }
+ });
+
+ _each(keys, function (k) {
+ var task = _isArray(tasks[k]) ? tasks[k]: [tasks[k]];
+ var taskCallback = function (err) {
+ var args = Array.prototype.slice.call(arguments, 1);
+ if (args.length <= 1) {
+ args = args[0];
+ }
+ if (err) {
+ var safeResults = {};
+ _each(_keys(results), function(rkey) {
+ safeResults[rkey] = results[rkey];
+ });
+ safeResults[k] = args;
+ callback(err, safeResults);
+ // stop subsequent errors hitting callback multiple times
+ callback = function () {};
+ }
+ else {
+ results[k] = args;
+ async.setImmediate(taskComplete);
+ }
+ };
+ var requires = task.slice(0, Math.abs(task.length - 1)) || [];
+ var ready = function () {
+ return _reduce(requires, function (a, x) {
+ return (a && results.hasOwnProperty(x));
+ }, true) && !results.hasOwnProperty(k);
+ };
+ if (ready()) {
+ task[task.length - 1](taskCallback, results);
+ }
+ else {
+ var listener = function () {
+ if (ready()) {
+ removeListener(listener);
+ task[task.length - 1](taskCallback, results);
}
- elem.up();
- });
- elem.up();
+ };
+ addListener(listener);
}
+ });
+ };
- if (SDPUtil.find_line(this.media[i], 'a=rtcp-mux')) {
- elem.c('rtcp-mux').up();
+ async.retry = function(times, task, callback) {
+ var DEFAULT_TIMES = 5;
+ var attempts = [];
+ // Use defaults if times not passed
+ if (typeof times === 'function') {
+ callback = task;
+ task = times;
+ times = DEFAULT_TIMES;
+ }
+ // Make sure times is a number
+ times = parseInt(times, 10) || DEFAULT_TIMES;
+ var wrappedTask = function(wrappedCallback, wrappedResults) {
+ var retryAttempt = function(task, finalAttempt) {
+ return function(seriesCallback) {
+ task(function(err, result){
+ seriesCallback(!err || finalAttempt, {err: err, result: result});
+ }, wrappedResults);
+ };
+ };
+ while (times) {
+ attempts.push(retryAttempt(task, !(times-=1)));
}
+ async.series(attempts, function(done, data){
+ data = data[data.length - 1];
+ (wrappedCallback || callback)(data.err, data.result);
+ });
+ }
+ // If a callback is passed, run this as a controll flow
+ return callback ? wrappedTask() : wrappedTask
+ };
- // XEP-0293 -- map a=rtcp-fb:*
- this.RtcpFbToJingle(i, elem, '*');
-
- // XEP-0294
- if (SDPUtil.find_line(this.media[i], 'a=extmap:')) {
- lines = SDPUtil.find_lines(this.media[i], 'a=extmap:');
- for (j = 0; j < lines.length; j++) {
- tmp = SDPUtil.parse_extmap(lines[j]);
- elem.c('rtp-hdrext', { xmlns: 'urn:xmpp:jingle:apps:rtp:rtp-hdrext:0',
- uri: tmp.uri,
- id: tmp.value });
- if (tmp.hasOwnProperty('direction')) {
- switch (tmp.direction) {
- case 'sendonly':
- elem.attrs({senders: 'responder'});
- break;
- case 'recvonly':
- elem.attrs({senders: 'initiator'});
- break;
- case 'sendrecv':
- elem.attrs({senders: 'both'});
- break;
- case 'inactive':
- elem.attrs({senders: 'none'});
- break;
+ async.waterfall = function (tasks, callback) {
+ callback = callback || function () {};
+ if (!_isArray(tasks)) {
+ var err = new Error('First argument to waterfall must be an array of functions');
+ return callback(err);
+ }
+ if (!tasks.length) {
+ return callback();
+ }
+ var wrapIterator = function (iterator) {
+ return function (err) {
+ if (err) {
+ callback.apply(null, arguments);
+ callback = function () {};
+ }
+ else {
+ var args = Array.prototype.slice.call(arguments, 1);
+ var next = iterator.next();
+ if (next) {
+ args.push(wrapIterator(next));
+ }
+ else {
+ args.push(callback);
+ }
+ async.setImmediate(function () {
+ iterator.apply(null, args);
+ });
+ }
+ };
+ };
+ wrapIterator(async.iterator(tasks))();
+ };
+
+ var _parallel = function(eachfn, tasks, callback) {
+ callback = callback || function () {};
+ if (_isArray(tasks)) {
+ eachfn.map(tasks, function (fn, callback) {
+ if (fn) {
+ fn(function (err) {
+ var args = Array.prototype.slice.call(arguments, 1);
+ if (args.length <= 1) {
+ args = args[0];
}
+ callback.call(null, err, args);
+ });
+ }
+ }, callback);
+ }
+ else {
+ var results = {};
+ eachfn.each(_keys(tasks), function (k, callback) {
+ tasks[k](function (err) {
+ var args = Array.prototype.slice.call(arguments, 1);
+ if (args.length <= 1) {
+ args = args[0];
}
- // TODO: handle params
- elem.up();
+ results[k] = args;
+ callback(err);
+ });
+ }, function (err) {
+ callback(err, results);
+ });
+ }
+ };
+
+ async.parallel = function (tasks, callback) {
+ _parallel({ map: async.map, each: async.each }, tasks, callback);
+ };
+
+ async.parallelLimit = function(tasks, limit, callback) {
+ _parallel({ map: _mapLimit(limit), each: _eachLimit(limit) }, tasks, callback);
+ };
+
+ async.series = function (tasks, callback) {
+ callback = callback || function () {};
+ if (_isArray(tasks)) {
+ async.mapSeries(tasks, function (fn, callback) {
+ if (fn) {
+ fn(function (err) {
+ var args = Array.prototype.slice.call(arguments, 1);
+ if (args.length <= 1) {
+ args = args[0];
+ }
+ callback.call(null, err, args);
+ });
}
- }
- elem.up(); // end of description
+ }, callback);
+ }
+ else {
+ var results = {};
+ async.eachSeries(_keys(tasks), function (k, callback) {
+ tasks[k](function (err) {
+ var args = Array.prototype.slice.call(arguments, 1);
+ if (args.length <= 1) {
+ args = args[0];
+ }
+ results[k] = args;
+ callback(err);
+ });
+ }, function (err) {
+ callback(err, results);
+ });
}
+ };
- // map ice-ufrag/pwd, dtls fingerprint, candidates
- this.TransportToJingle(i, elem);
+ async.iterator = function (tasks) {
+ var makeCallback = function (index) {
+ var fn = function () {
+ if (tasks.length) {
+ tasks[index].apply(null, arguments);
+ }
+ return fn.next();
+ };
+ fn.next = function () {
+ return (index < tasks.length - 1) ? makeCallback(index + 1): null;
+ };
+ return fn;
+ };
+ return makeCallback(0);
+ };
+
+ async.apply = function (fn) {
+ var args = Array.prototype.slice.call(arguments, 1);
+ return function () {
+ return fn.apply(
+ null, args.concat(Array.prototype.slice.call(arguments))
+ );
+ };
+ };
- if (SDPUtil.find_line(this.media[i], 'a=sendrecv', this.session)) {
- elem.attrs({senders: 'both'});
- } else if (SDPUtil.find_line(this.media[i], 'a=sendonly', this.session)) {
- elem.attrs({senders: 'initiator'});
- } else if (SDPUtil.find_line(this.media[i], 'a=recvonly', this.session)) {
- elem.attrs({senders: 'responder'});
- } else if (SDPUtil.find_line(this.media[i], 'a=inactive', this.session)) {
- elem.attrs({senders: 'none'});
+ var _concat = function (eachfn, arr, fn, callback) {
+ var r = [];
+ eachfn(arr, function (x, cb) {
+ fn(x, function (err, y) {
+ r = r.concat(y || []);
+ cb(err);
+ });
+ }, function (err) {
+ callback(err, r);
+ });
+ };
+ async.concat = doParallel(_concat);
+ async.concatSeries = doSeries(_concat);
+
+ async.whilst = function (test, iterator, callback) {
+ if (test()) {
+ iterator(function (err) {
+ if (err) {
+ return callback(err);
+ }
+ async.whilst(test, iterator, callback);
+ });
}
- if (mline.port == '0') {
- // estos hack to reject an m-line
- elem.attrs({senders: 'rejected'});
+ else {
+ callback();
}
- elem.up(); // end of content
- }
- elem.up();
- return elem;
-};
+ };
-SDP.prototype.TransportToJingle = function (mediaindex, elem) {
- var i = mediaindex;
- var tmp;
- var self = this;
- elem.c('transport');
-
- // XEP-0320
- var fingerprints = SDPUtil.find_lines(this.media[mediaindex], 'a=fingerprint:', this.session);
- fingerprints.forEach(function(line) {
- tmp = SDPUtil.parse_fingerprint(line);
- tmp.xmlns = 'urn:xmpp:tmp:jingle:apps:dtls:0';
- // tmp.xmlns = 'urn:xmpp:jingle:apps:dtls:0'; -- FIXME: update receivers first
- elem.c('fingerprint').t(tmp.fingerprint);
- delete tmp.fingerprint;
- line = SDPUtil.find_line(self.media[mediaindex], 'a=setup:', self.session);
- if (line) {
- tmp.setup = line.substr(8);
- }
- elem.attrs(tmp);
- elem.up(); // end of fingerprint
- });
- tmp = SDPUtil.iceparams(this.media[mediaindex], this.session);
- if (tmp) {
- tmp.xmlns = 'urn:xmpp:jingle:transports:ice-udp:1';
- elem.attrs(tmp);
- // XEP-0176
- if (SDPUtil.find_line(this.media[mediaindex], 'a=candidate:', this.session)) { // add any a=candidate lines
- var lines = SDPUtil.find_lines(this.media[mediaindex], 'a=candidate:', this.session);
- lines.forEach(function (line) {
- elem.c('candidate', SDPUtil.candidateToJingle(line)).up();
+ async.doWhilst = function (iterator, test, callback) {
+ iterator(function (err) {
+ if (err) {
+ return callback(err);
+ }
+ var args = Array.prototype.slice.call(arguments, 1);
+ if (test.apply(null, args)) {
+ async.doWhilst(iterator, test, callback);
+ }
+ else {
+ callback();
+ }
+ });
+ };
+
+ async.until = function (test, iterator, callback) {
+ if (!test()) {
+ iterator(function (err) {
+ if (err) {
+ return callback(err);
+ }
+ async.until(test, iterator, callback);
});
}
- }
- elem.up(); // end of transport
-};
+ else {
+ callback();
+ }
+ };
-SDP.prototype.RtcpFbToJingle = function (mediaindex, elem, payloadtype) { // XEP-0293
- var lines = SDPUtil.find_lines(this.media[mediaindex], 'a=rtcp-fb:' + payloadtype);
- lines.forEach(function (line) {
- var tmp = SDPUtil.parse_rtcpfb(line);
- if (tmp.type == 'trr-int') {
- elem.c('rtcp-fb-trr-int', {xmlns: 'urn:xmpp:jingle:apps:rtp:rtcp-fb:0', value: tmp.params[0]});
- elem.up();
- } else {
- elem.c('rtcp-fb', {xmlns: 'urn:xmpp:jingle:apps:rtp:rtcp-fb:0', type: tmp.type});
- if (tmp.params.length > 0) {
- elem.attrs({'subtype': tmp.params[0]});
+ async.doUntil = function (iterator, test, callback) {
+ iterator(function (err) {
+ if (err) {
+ return callback(err);
+ }
+ var args = Array.prototype.slice.call(arguments, 1);
+ if (!test.apply(null, args)) {
+ async.doUntil(iterator, test, callback);
}
- elem.up();
+ else {
+ callback();
+ }
+ });
+ };
+
+ async.queue = function (worker, concurrency) {
+ if (concurrency === undefined) {
+ concurrency = 1;
}
- });
-};
+ function _insert(q, data, pos, callback) {
+ if (!q.started){
+ q.started = true;
+ }
+ if (!_isArray(data)) {
+ data = [data];
+ }
+ if(data.length == 0) {
+ // call drain immediately if there are no tasks
+ return async.setImmediate(function() {
+ if (q.drain) {
+ q.drain();
+ }
+ });
+ }
+ _each(data, function(task) {
+ var item = {
+ data: task,
+ callback: typeof callback === 'function' ? callback : null
+ };
+
+ if (pos) {
+ q.tasks.unshift(item);
+ } else {
+ q.tasks.push(item);
+ }
-SDP.prototype.RtcpFbFromJingle = function (elem, payloadtype) { // XEP-0293
- var media = '';
- var tmp = elem.find('>rtcp-fb-trr-int[xmlns="urn:xmpp:jingle:apps:rtp:rtcp-fb:0"]');
- if (tmp.length) {
- media += 'a=rtcp-fb:' + '*' + ' ' + 'trr-int' + ' ';
- if (tmp.attr('value')) {
- media += tmp.attr('value');
- } else {
- media += '0';
+ if (q.saturated && q.tasks.length === q.concurrency) {
+ q.saturated();
+ }
+ async.setImmediate(q.process);
+ });
}
- media += '\r\n';
- }
- tmp = elem.find('>rtcp-fb[xmlns="urn:xmpp:jingle:apps:rtp:rtcp-fb:0"]');
- tmp.each(function () {
- media += 'a=rtcp-fb:' + payloadtype + ' ' + $(this).attr('type');
- if ($(this).attr('subtype')) {
- media += ' ' + $(this).attr('subtype');
+
+ var workers = 0;
+ var q = {
+ tasks: [],
+ concurrency: concurrency,
+ saturated: null,
+ empty: null,
+ drain: null,
+ started: false,
+ paused: false,
+ push: function (data, callback) {
+ _insert(q, data, false, callback);
+ },
+ kill: function () {
+ q.drain = null;
+ q.tasks = [];
+ },
+ unshift: function (data, callback) {
+ _insert(q, data, true, callback);
+ },
+ process: function () {
+ if (!q.paused && workers < q.concurrency && q.tasks.length) {
+ var task = q.tasks.shift();
+ if (q.empty && q.tasks.length === 0) {
+ q.empty();
+ }
+ workers += 1;
+ var next = function () {
+ workers -= 1;
+ if (task.callback) {
+ task.callback.apply(task, arguments);
+ }
+ if (q.drain && q.tasks.length + workers === 0) {
+ q.drain();
+ }
+ q.process();
+ };
+ var cb = only_once(next);
+ worker(task.data, cb);
+ }
+ },
+ length: function () {
+ return q.tasks.length;
+ },
+ running: function () {
+ return workers;
+ },
+ idle: function() {
+ return q.tasks.length + workers === 0;
+ },
+ pause: function () {
+ if (q.paused === true) { return; }
+ q.paused = true;
+ },
+ resume: function () {
+ if (q.paused === false) { return; }
+ q.paused = false;
+ // Need to call q.process once per concurrent
+ // worker to preserve full concurrency after pause
+ for (var w = 1; w <= q.concurrency; w++) {
+ async.setImmediate(q.process);
+ }
+ }
+ };
+ return q;
+ };
+
+ async.priorityQueue = function (worker, concurrency) {
+
+ function _compareTasks(a, b){
+ return a.priority - b.priority;
+ };
+
+ function _binarySearch(sequence, item, compare) {
+ var beg = -1,
+ end = sequence.length - 1;
+ while (beg < end) {
+ var mid = beg + ((end - beg + 1) >>> 1);
+ if (compare(item, sequence[mid]) >= 0) {
+ beg = mid;
+ } else {
+ end = mid - 1;
+ }
+ }
+ return beg;
}
- media += '\r\n';
- });
- return media;
-};
-// construct an SDP from a jingle stanza
-SDP.prototype.fromJingle = function (jingle) {
- var self = this;
- this.raw = 'v=0\r\n' +
- 'o=- ' + '1923518516' + ' 2 IN IP4 0.0.0.0\r\n' +// FIXME
- 's=-\r\n' +
- 't=0 0\r\n';
- // http://tools.ietf.org/html/draft-ietf-mmusic-sdp-bundle-negotiation-04#section-8
- if ($(jingle).find('>group[xmlns="urn:xmpp:jingle:apps:grouping:0"]').length) {
- $(jingle).find('>group[xmlns="urn:xmpp:jingle:apps:grouping:0"]').each(function (idx, group) {
- var contents = $(group).find('>content').map(function (idx, content) {
- return content.getAttribute('name');
- }).get();
- if (contents.length > 0) {
- self.raw += 'a=group:' + (group.getAttribute('semantics') || group.getAttribute('type')) + ' ' + contents.join(' ') + '\r\n';
+ function _insert(q, data, priority, callback) {
+ if (!q.started){
+ q.started = true;
+ }
+ if (!_isArray(data)) {
+ data = [data];
+ }
+ if(data.length == 0) {
+ // call drain immediately if there are no tasks
+ return async.setImmediate(function() {
+ if (q.drain) {
+ q.drain();
+ }
+ });
+ }
+ _each(data, function(task) {
+ var item = {
+ data: task,
+ priority: priority,
+ callback: typeof callback === 'function' ? callback : null
+ };
+
+ q.tasks.splice(_binarySearch(q.tasks, item, _compareTasks) + 1, 0, item);
+
+ if (q.saturated && q.tasks.length === q.concurrency) {
+ q.saturated();
+ }
+ async.setImmediate(q.process);
+ });
+ }
+
+ // Start with a normal queue
+ var q = async.queue(worker, concurrency);
+
+ // Override push to accept second parameter representing priority
+ q.push = function (data, priority, callback) {
+ _insert(q, data, priority, callback);
+ };
+
+ // Remove unshift function
+ delete q.unshift;
+
+ return q;
+ };
+
+ async.cargo = function (worker, payload) {
+ var working = false,
+ tasks = [];
+
+ var cargo = {
+ tasks: tasks,
+ payload: payload,
+ saturated: null,
+ empty: null,
+ drain: null,
+ drained: true,
+ push: function (data, callback) {
+ if (!_isArray(data)) {
+ data = [data];
+ }
+ _each(data, function(task) {
+ tasks.push({
+ data: task,
+ callback: typeof callback === 'function' ? callback : null
+ });
+ cargo.drained = false;
+ if (cargo.saturated && tasks.length === payload) {
+ cargo.saturated();
+ }
+ });
+ async.setImmediate(cargo.process);
+ },
+ process: function process() {
+ if (working) return;
+ if (tasks.length === 0) {
+ if(cargo.drain && !cargo.drained) cargo.drain();
+ cargo.drained = true;
+ return;
+ }
+
+ var ts = typeof payload === 'number'
+ ? tasks.splice(0, payload)
+ : tasks.splice(0, tasks.length);
+
+ var ds = _map(ts, function (task) {
+ return task.data;
+ });
+
+ if(cargo.empty) cargo.empty();
+ working = true;
+ worker(ds, function () {
+ working = false;
+
+ var args = arguments;
+ _each(ts, function (data) {
+ if (data.callback) {
+ data.callback.apply(null, args);
+ }
+ });
+
+ process();
+ });
+ },
+ length: function () {
+ return tasks.length;
+ },
+ running: function () {
+ return working;
}
- });
- } else if ($(jingle).find('>group[xmlns="urn:ietf:rfc:5888"]').length) {
- // temporary namespace, not to be used. to be removed soon.
- $(jingle).find('>group[xmlns="urn:ietf:rfc:5888"]').each(function (idx, group) {
- var contents = $(group).find('>content').map(function (idx, content) {
- return content.getAttribute('name');
- }).get();
- if (group.getAttribute('type') !== null && contents.length > 0) {
- self.raw += 'a=group:' + group.getAttribute('type') + ' ' + contents.join(' ') + '\r\n';
+ };
+ return cargo;
+ };
+
+ var _console_fn = function (name) {
+ return function (fn) {
+ var args = Array.prototype.slice.call(arguments, 1);
+ fn.apply(null, args.concat([function (err) {
+ var args = Array.prototype.slice.call(arguments, 1);
+ if (typeof console !== 'undefined') {
+ if (err) {
+ if (console.error) {
+ console.error(err);
+ }
+ }
+ else if (console[name]) {
+ _each(args, function (x) {
+ console[name](x);
+ });
+ }
+ }
+ }]));
+ };
+ };
+ async.log = _console_fn('log');
+ async.dir = _console_fn('dir');
+ /*async.info = _console_fn('info');
+ async.warn = _console_fn('warn');
+ async.error = _console_fn('error');*/
+
+ async.memoize = function (fn, hasher) {
+ var memo = {};
+ var queues = {};
+ hasher = hasher || function (x) {
+ return x;
+ };
+ var memoized = function () {
+ var args = Array.prototype.slice.call(arguments);
+ var callback = args.pop();
+ var key = hasher.apply(null, args);
+ if (key in memo) {
+ async.nextTick(function () {
+ callback.apply(null, memo[key]);
+ });
}
- });
- } else {
- // for backward compability, to be removed soon
- // assume all contents are in the same bundle group, can be improved upon later
- var bundle = $(jingle).find('>content').filter(function (idx, content) {
- return $(content).find('>bundle').length > 0;
- }).map(function (idx, content) {
- return content.getAttribute('name');
- }).get();
- if (bundle.length) {
- this.raw += 'a=group:BUNDLE ' + bundle.join(' ') + '\r\n';
- }
- }
-
- this.session = this.raw;
- jingle.find('>content').each(function () {
- var m = self.jingle2media($(this));
- self.media.push(m);
- });
+ else if (key in queues) {
+ queues[key].push(callback);
+ }
+ else {
+ queues[key] = [callback];
+ fn.apply(null, args.concat([function () {
+ memo[key] = arguments;
+ var q = queues[key];
+ delete queues[key];
+ for (var i = 0, l = q.length; i < l; i++) {
+ q[i].apply(null, arguments);
+ }
+ }]));
+ }
+ };
+ memoized.memo = memo;
+ memoized.unmemoized = fn;
+ return memoized;
+ };
- // reconstruct msid-semantic -- apparently not necessary
- /*
- var msid = SDPUtil.parse_ssrc(this.raw);
- if (msid.hasOwnProperty('mslabel')) {
- this.session += "a=msid-semantic: WMS " + msid.mslabel + "\r\n";
- }
- */
+ async.unmemoize = function (fn) {
+ return function () {
+ return (fn.unmemoized || fn).apply(null, arguments);
+ };
+ };
- this.raw = this.session + this.media.join('');
-};
+ async.times = function (count, iterator, callback) {
+ var counter = [];
+ for (var i = 0; i < count; i++) {
+ counter.push(i);
+ }
+ return async.map(counter, iterator, callback);
+ };
-// translate a jingle content element into an an SDP media part
-SDP.prototype.jingle2media = function (content) {
- var media = '',
- desc = content.find('description'),
- ssrc = desc.attr('ssrc'),
- self = this,
- tmp;
-
- tmp = { media: desc.attr('media') };
- tmp.port = '1';
- if (content.attr('senders') == 'rejected') {
- // estos hack to reject an m-line.
- tmp.port = '0';
- }
- if (content.find('>transport>fingerprint').length || desc.find('encryption').length) {
- tmp.proto = 'RTP/SAVPF';
- } else {
- tmp.proto = 'RTP/AVPF';
- }
- tmp.fmt = desc.find('payload-type').map(function () { return this.getAttribute('id'); }).get();
- media += SDPUtil.build_mline(tmp) + '\r\n';
- media += 'c=IN IP4 0.0.0.0\r\n';
- media += 'a=rtcp:1 IN IP4 0.0.0.0\r\n';
- tmp = content.find('>transport[xmlns="urn:xmpp:jingle:transports:ice-udp:1"]');
- if (tmp.length) {
- if (tmp.attr('ufrag')) {
- media += SDPUtil.build_iceufrag(tmp.attr('ufrag')) + '\r\n';
- }
- if (tmp.attr('pwd')) {
- media += SDPUtil.build_icepwd(tmp.attr('pwd')) + '\r\n';
- }
- tmp.find('>fingerprint').each(function () {
- // FIXME: check namespace at some point
- media += 'a=fingerprint:' + this.getAttribute('hash');
- media += ' ' + $(this).text();
- media += '\r\n';
- if (this.getAttribute('setup')) {
- media += 'a=setup:' + this.getAttribute('setup') + '\r\n';
+ async.timesSeries = function (count, iterator, callback) {
+ var counter = [];
+ for (var i = 0; i < count; i++) {
+ counter.push(i);
+ }
+ return async.mapSeries(counter, iterator, callback);
+ };
+
+ async.seq = function (/* functions... */) {
+ var fns = arguments;
+ return function () {
+ var that = this;
+ var args = Array.prototype.slice.call(arguments);
+ var callback = args.pop();
+ async.reduce(fns, args, function (newargs, fn, cb) {
+ fn.apply(that, newargs.concat([function () {
+ var err = arguments[0];
+ var nextargs = Array.prototype.slice.call(arguments, 1);
+ cb(err, nextargs);
+ }]))
+ },
+ function (err, results) {
+ callback.apply(that, [err].concat(results));
+ });
+ };
+ };
+
+ async.compose = function (/* functions... */) {
+ return async.seq.apply(null, Array.prototype.reverse.call(arguments));
+ };
+
+ var _applyEach = function (eachfn, fns /*args...*/) {
+ var go = function () {
+ var that = this;
+ var args = Array.prototype.slice.call(arguments);
+ var callback = args.pop();
+ return eachfn(fns, function (fn, cb) {
+ fn.apply(that, args.concat([cb]));
+ },
+ callback);
+ };
+ if (arguments.length > 2) {
+ var args = Array.prototype.slice.call(arguments, 2);
+ return go.apply(this, args);
+ }
+ else {
+ return go;
+ }
+ };
+ async.applyEach = doParallel(_applyEach);
+ async.applyEachSeries = doSeries(_applyEach);
+
+ async.forever = function (fn, callback) {
+ function next(err) {
+ if (err) {
+ if (callback) {
+ return callback(err);
+ }
+ throw err;
}
+ fn(next);
+ }
+ next();
+ };
+
+ // Node.js
+ if (typeof module !== 'undefined' && module.exports) {
+ module.exports = async;
+ }
+ // AMD / RequireJS
+ else if (typeof define !== 'undefined' && define.amd) {
+ define([], function () {
+ return async;
});
}
- switch (content.attr('senders')) {
- case 'initiator':
- media += 'a=sendonly\r\n';
- break;
- case 'responder':
- media += 'a=recvonly\r\n';
- break;
- case 'none':
- media += 'a=inactive\r\n';
- break;
- case 'both':
- media += 'a=sendrecv\r\n';
- break;
+ // included directly via <script> tag
+ else {
+ root.async = async;
}
- media += 'a=mid:' + content.attr('name') + '\r\n';
- // <description><rtcp-mux/></description>
- // see http://code.google.com/p/libjingle/issues/detail?id=309 -- no spec though
- // and http://mail.jabber.org/pipermail/jingle/2011-December/001761.html
- if (desc.find('rtcp-mux').length) {
- media += 'a=rtcp-mux\r\n';
- }
+}());
+
+}).call(this,require('_process'))
+},{"_process":9}],27:[function(require,module,exports){
+var arr = [];
+var each = arr.forEach;
+var slice = arr.slice;
- if (desc.find('encryption').length) {
- desc.find('encryption>crypto').each(function () {
- media += 'a=crypto:' + this.getAttribute('tag');
- media += ' ' + this.getAttribute('crypto-suite');
- media += ' ' + this.getAttribute('key-params');
- if (this.getAttribute('session-params')) {
- media += ' ' + this.getAttribute('session-params');
+
+module.exports = function(obj) {
+ each.call(slice.call(arguments, 1), function(source) {
+ if (source) {
+ for (var prop in source) {
+ obj[prop] = source[prop];
}
- media += '\r\n';
- });
- }
- desc.find('payload-type').each(function () {
- media += SDPUtil.build_rtpmap(this) + '\r\n';
- if ($(this).find('>parameter').length) {
- media += 'a=fmtp:' + this.getAttribute('id') + ' ';
- media += $(this).find('parameter').map(function () { return (this.getAttribute('name') ? (this.getAttribute('name') + '=') : '') + this.getAttribute('value'); }).get().join(';');
- media += '\r\n';
}
- // xep-0293
- media += self.RtcpFbFromJingle($(this), this.getAttribute('id'));
});
+ return obj;
+};
- // xep-0293
- media += self.RtcpFbFromJingle(desc, '*');
+},{}],28:[function(require,module,exports){
+module.exports = intersect;
- // xep-0294
- tmp = desc.find('>rtp-hdrext[xmlns="urn:xmpp:jingle:apps:rtp:rtp-hdrext:0"]');
- tmp.each(function () {
- media += 'a=extmap:' + this.getAttribute('id') + ' ' + this.getAttribute('uri') + '\r\n';
- });
+function intersect (a, b) {
+ var res = [];
+ for (var i = 0; i < a.length; i++) {
+ if (indexOf(b, a[i]) > -1) res.push(a[i]);
+ }
+ return res;
+}
+
+intersect.big = function(a, b) {
+ var ret = [];
+ var temp = {};
+
+ for (var i = 0; i < b.length; i++) {
+ temp[b[i]] = true;
+ }
+ for (var i = 0; i < a.length; i++) {
+ if (temp[a[i]]) ret.push(a[i]);
+ }
+
+ return ret;
+}
+
+function indexOf(arr, el) {
+ for (var i = 0; i < arr.length; i++) {
+ if (arr[i] === el) return i;
+ }
+ return -1;
+}
+
+},{}],29:[function(require,module,exports){
+var util = require('util');
+var extend = require('extend-object');
+var BaseSession = require('jingle-session');
+var RTCPeerConnection = require('rtcpeerconnection');
+var FileTransfer = require('filetransfer');
+
+
+function FileTransferSession(opts) {
+ BaseSession.call(this, opts);
- content.find('>transport[xmlns="urn:xmpp:jingle:transports:ice-udp:1"]>candidate').each(function () {
- media += SDPUtil.candidateFromJingle(this);
+ var self = this;
+
+ this.pc = new RTCPeerConnection({
+ iceServers: opts.iceServers || [],
+ useJingle: true
+ }, opts.constraints || {});
+
+ this.pc.on('ice', this.onIceCandidate.bind(this));
+ this.pc.on('iceConnectionStateChange', this.onIceStateChange.bind(this));
+ this.pc.on('addChannel', this.onChannelAdded.bind(this));
+
+ this.sender = new FileTransfer.Sender();
+ this.sender.on('progress', function (sent, size) {
+ self._log('info', 'Send progress ' + sent + '/' + size);
});
+ this.sender.on('sentFile', function (meta) {
+ self._log('info', 'Sent file', meta.name);
+
+ var content = self.pc.localDescription.contents[0];
+ delete content.transport;
+
+ content.description = {
+ descType: 'filetransfer',
+ offer: {
+ hash: {
+ algo: meta.algo,
+ value: meta.hash
+ }
+ }
+ };
- tmp = content.find('description>source[xmlns="urn:xmpp:jingle:apps:rtp:ssma:0"]');
- tmp.each(function () {
- var ssrc = this.getAttribute('ssrc');
- $(this).find('>parameter').each(function () {
- media += 'a=ssrc:' + ssrc + ' ' + this.getAttribute('name');
- if (this.getAttribute('value') && this.getAttribute('value').length)
- media += ':' + this.getAttribute('value');
- media += '\r\n';
+ self.send('description-info', {
+ contents: [content]
});
+ self.emit('sentFile', self, meta);
});
- return media;
-};
-SDPUtil = {
- iceparams: function (mediadesc, sessiondesc) {
- var data = null;
- if (SDPUtil.find_line(mediadesc, 'a=ice-ufrag:', sessiondesc) &&
- SDPUtil.find_line(mediadesc, 'a=ice-pwd:', sessiondesc)) {
- data = {
- ufrag: SDPUtil.parse_iceufrag(SDPUtil.find_line(mediadesc, 'a=ice-ufrag:', sessiondesc)),
- pwd: SDPUtil.parse_icepwd(SDPUtil.find_line(mediadesc, 'a=ice-pwd:', sessiondesc))
+ this.receiver = new FileTransfer.Receiver();
+ this.receiver.on('progress', function (received, size) {
+ self._log('info', 'Receive progress ' + received + '/' + size);
+ });
+ this.receiver.on('receivedFile', function (file) {
+ self.receivedFile = file;
+ self.maybeReceivedFile();
+ });
+}
+
+
+util.inherits(FileTransferSession, BaseSession);
+
+
+FileTransferSession.prototype = extend(FileTransferSession.prototype, {
+
+ // ----------------------------------------------------------------
+ // Session control methods
+ // ----------------------------------------------------------------
+
+ start: function (file) {
+ var self = this;
+ this.state = 'pending';
+
+ this.pc.isInitiator = true;
+
+ var sendChannel = this.pc.createDataChannel('filetransfer');
+ sendChannel.onopen = function () {
+ self.sender.send(file, sendChannel);
+ };
+
+ var constraints = {
+ mandatory: {
+ OfferToReceiveAudio: false,
+ OfferToReceiveVideo: false
+ }
+ };
+
+ this.pc.offer(constraints, function (err, offer) {
+ if (err) {
+ self._log('error', 'Could not create WebRTC offer', err);
+ return self.end('failed-application', true);
+ }
+
+ offer.jingle.contents[0].description = {
+ descType: 'filetransfer',
+ offer: {
+ date: file.lastModifiedDate,
+ name: file.name,
+ size: file.size,
+ hash: {
+ algo: 'sha-1',
+ value: ''
+ }
+ }
};
- }
- return data;
- },
- parse_iceufrag: function (line) {
- return line.substring(12);
- },
- build_iceufrag: function (frag) {
- return 'a=ice-ufrag:' + frag;
- },
- parse_icepwd: function (line) {
- return line.substring(10);
- },
- build_icepwd: function (pwd) {
- return 'a=ice-pwd:' + pwd;
- },
- parse_mid: function (line) {
- return line.substring(6);
- },
- parse_mline: function (line) {
- var parts = line.substring(2).split(' '),
- data = {};
- data.media = parts.shift();
- data.port = parts.shift();
- data.proto = parts.shift();
- if (parts[parts.length - 1] === '') { // trailing whitespace
- parts.pop();
- }
- data.fmt = parts;
- return data;
+
+ self.send('session-initiate', offer.jingle);
+ });
},
- build_mline: function (mline) {
- return 'm=' + mline.media + ' ' + mline.port + ' ' + mline.proto + ' ' + mline.fmt.join(' ');
+
+ accept: function () {
+ var self = this;
+
+ this._log('info', 'Accepted incoming session');
+
+ this.state = 'active';
+
+ this.pc.answer(function (err, answer) {
+ if (err) {
+ self._log('error', 'Could not create WebRTC answer', err);
+ return self.end('failed-application');
+ }
+
+ answer.jingle.contents[0].name = 'data';
+
+ self.send('session-accept', answer.jingle);
+ });
},
- parse_rtpmap: function (line) {
- var parts = line.substring(9).split(' '),
- data = {};
- data.id = parts.shift();
- parts = parts[0].split('/');
- data.name = parts.shift();
- data.clockrate = parts.shift();
- data.channels = parts.length ? parts.shift() : '1';
- return data;
+
+ end: function (reason, silent) {
+ this.pc.close();
+ BaseSession.prototype.end.call(this, reason, silent);
},
- build_rtpmap: function (el) {
- var line = 'a=rtpmap:' + el.getAttribute('id') + ' ' + el.getAttribute('name') + '/' + el.getAttribute('clockrate');
- if (el.getAttribute('channels') && el.getAttribute('channels') != '1') {
- line += '/' + el.getAttribute('channels');
+
+ maybeReceivedFile: function () {
+ if (!this.receiver.metadata.hash.value) {
+ // unknown hash, file transfer not completed
+ } else if (this.receiver.metadata.hash.value === this.receiver.metadata.actualhash) {
+ this._log('info', 'File hash matches');
+ this.emit('receivedFile', this, this.receivedFile, this.receiver.metadata);
+ this.end('success');
+ } else {
+ this._log('error', 'File hash does not match');
+ this.end('media-error');
}
- return line;
- },
- parse_crypto: function (line) {
- var parts = line.substring(9).split(' '),
- data = {};
- data.tag = parts.shift();
- data['crypto-suite'] = parts.shift();
- data['key-params'] = parts.shift();
- if (parts.length) {
- data['session-params'] = parts.join(' ');
- }
- return data;
- },
- parse_fingerprint: function (line) { // RFC 4572
- var parts = line.substring(14).split(' '),
- data = {};
- data.hash = parts.shift();
- data.fingerprint = parts.shift();
- // TODO assert that fingerprint satisfies 2UHEX *(":" 2UHEX) ?
- return data;
},
- parse_fmtp: function (line) {
- var parts = line.split(' '),
- i, key, value,
- data = [];
- parts.shift();
- parts = parts.join(' ').split(';');
- for (i = 0; i < parts.length; i++) {
- key = parts[i].split('=')[0];
- while (key.length && key[0] == ' ') {
- key = key.substring(1);
- }
- value = parts[i].split('=')[1];
- if (key && value) {
- data.push({name: key, value: value});
- } else if (key) {
- // rfc 4733 (DTMF) style stuff
- data.push({name: '', value: key});
- }
- }
- return data;
+
+ // ----------------------------------------------------------------
+ // ICE action handers
+ // ----------------------------------------------------------------
+
+ onIceCandidate: function (candidate) {
+ this._log('info', 'Discovered new ICE candidate', candidate.jingle);
+ candidate.jingle.contents[0].name = 'data';
+ this.send('transport-info', candidate.jingle);
},
- parse_icecandidate: function (line) {
- var candidate = {},
- elems = line.split(' ');
- candidate.foundation = elems[0].substring(12);
- candidate.component = elems[1];
- candidate.protocol = elems[2].toLowerCase();
- candidate.priority = elems[3];
- candidate.ip = elems[4];
- candidate.port = elems[5];
- // elems[6] => "typ"
- candidate.type = elems[7];
- candidate.generation = 0; // default value, may be overwritten below
- for (var i = 8; i < elems.length; i += 2) {
- switch (elems[i]) {
- case 'raddr':
- candidate['rel-addr'] = elems[i + 1];
+
+ onIceStateChange: function () {
+ switch (this.pc.iceConnectionState) {
+ case 'checking':
+ this.connectionState = 'connecting';
+ break;
+ case 'completed':
+ case 'connected':
+ this.connectionState = 'connected';
break;
- case 'rport':
- candidate['rel-port'] = elems[i + 1];
+ case 'disconnected':
+ if (this.pc.signalingState === 'stable') {
+ this.connectionState = 'interrupted';
+ } else {
+ this.connectionState = 'disconnected';
+ }
break;
- case 'generation':
- candidate.generation = elems[i + 1];
+ case 'failed':
+ this.connectionState = 'failed';
+ this.end('failed-transport');
break;
- case 'tcptype':
- candidate.tcptype = elems[i + 1];
+ case 'closed':
+ this.connectionState = 'disconnected';
break;
- default: // TODO
- console.log('parse_icecandidate not translating "' + elems[i] + '" = "' + elems[i + 1] + '"');
- }
}
- candidate.network = '1';
- candidate.id = Math.random().toString(36).substr(2, 10); // not applicable to SDP -- FIXME: should be unique, not just random
- return candidate;
},
- build_icecandidate: function (cand) {
- var line = ['a=candidate:' + cand.foundation, cand.component, cand.protocol, cand.priority, cand.ip, cand.port, 'typ', cand.type].join(' ');
- line += ' ';
- switch (cand.type) {
- case 'srflx':
- case 'prflx':
- case 'relay':
- if (cand.hasOwnAttribute('rel-addr') && cand.hasOwnAttribute('rel-port')) {
- line += 'raddr';
- line += ' ';
- line += cand['rel-addr'];
- line += ' ';
- line += 'rport';
- line += ' ';
- line += cand['rel-port'];
- line += ' ';
- }
- break;
- }
- if (cand.hasOwnAttribute('tcptype')) {
- line += 'tcptype';
- line += ' ';
- line += cand.tcptype;
- line += ' ';
+
+ onChannelAdded: function (channel) {
+ this.receiver.receive(null, channel);
+ },
+
+ // ----------------------------------------------------------------
+ // Jingle action handers
+ // ----------------------------------------------------------------
+
+ onSessionInitiate: function (changes, cb) {
+ var self = this;
+
+ this._log('info', 'Initiating incoming session');
+
+ this.state = 'pending';
+
+ this.pc.isInitiator = false;
+
+ var desc = changes.contents[0].description;
+ this.receiver.metadata = desc.offer.toJSON();
+
+ if (this.receiver.metadata.hash) {
+ this.receiver.config.hash = this.receiver.metadata.hash.algo;
}
- line += 'generation';
- line += ' ';
- line += cand.hasOwnAttribute('generation') ? cand.generation : '0';
- return line;
+
+ changes.contents[0].description = {
+ descType: 'datachannel'
+ };
+
+ this.pc.handleOffer({
+ type: 'offer',
+ jingle: changes
+ }, function (err) {
+ if (err) {
+ self._log('error', 'Could not create WebRTC answer');
+ return cb({condition: 'general-error'});
+ }
+ cb();
+ });
},
- parse_ssrc: function (desc) {
- // proprietary mapping of a=ssrc lines
- // TODO: see "Jingle RTP Source Description" by Juberti and P. Thatcher on google docs
- // and parse according to that
- var lines = desc.split('\r\n'),
- data = {};
- for (var i = 0; i < lines.length; i++) {
- if (lines[i].substring(0, 7) == 'a=ssrc:') {
- var idx = lines[i].indexOf(' ');
- data[lines[i].substr(idx + 1).split(':', 2)[0]] = lines[i].substr(idx + 1).split(':', 2)[1];
+
+ onSessionAccept: function (changes, cb) {
+ var self = this;
+
+ this.state = 'active';
+
+ changes.contents[0].description = {
+ descType: 'datachannel'
+ };
+
+ this.pc.handleAnswer({
+ type: 'answer',
+ jingle: changes
+ }, function (err) {
+ if (err) {
+ self._log('error', 'Could not process WebRTC answer');
+ return cb({condition: 'general-error'});
}
- }
- return data;
+ self.emit('accepted', self);
+ cb();
+ });
},
- parse_rtcpfb: function (line) {
- var parts = line.substr(10).split(' ');
- var data = {};
- data.pt = parts.shift();
- data.type = parts.shift();
- data.params = parts;
- return data;
+
+ onSessionTerminate: function (changes, cb) {
+ this._log('info', 'Terminating session');
+ this.pc.close();
+ BaseSession.prototype.end.call(this, changes.reason, true);
+ cb();
},
- parse_extmap: function (line) {
- var parts = line.substr(9).split(' ');
- var data = {};
- data.value = parts.shift();
- if (data.value.indexOf('/') != -1) {
- data.direction = data.value.substr(data.value.indexOf('/') + 1);
- data.value = data.value.substr(0, data.value.indexOf('/'));
- } else {
- data.direction = 'both';
+
+ onDescriptionInfo: function (info, cb) {
+ var hash = info.contents[0].description.offer.hash;
+ this.receiver.metadata.hash = hash;
+ if (this.receiver.metadata.actualhash) {
+ this.maybeReceivedFile();
}
- data.uri = parts.shift();
- data.params = parts;
- return data;
+ cb();
},
- find_line: function (haystack, needle, sessionpart) {
- var lines = haystack.split('\r\n');
- for (var i = 0; i < lines.length; i++) {
- if (lines[i].substring(0, needle.length) == needle) {
- return lines[i];
- }
+
+ onTransportInfo: function (changes, cb) {
+ this.pc.processIce(changes, function () {
+ cb();
+ });
+ }
+});
+
+
+module.exports = FileTransferSession;
+
+},{"extend-object":27,"filetransfer":30,"jingle-session":109,"rtcpeerconnection":77,"util":24}],30:[function(require,module,exports){
+var async = require('async');
+//var webrtcsupport = require('webrtcsupport');
+var WildEmitter = require('wildemitter');
+var util = require('util');
+var hashes = require('iana-hashes');
+
+function Sender(opts) {
+ WildEmitter.call(this);
+ var self = this;
+ var options = opts || {};
+ this.config = {
+ chunksize: 16384,
+ pacing: 10,
+ hash: 'sha-1' // note: this uses iana hash names
+ };
+ // set our config from options
+ var item;
+ for (item in options) {
+ this.config[item] = options[item];
+ }
+
+ this.file = null;
+ this.channel = null;
+ this.hash = null;
+
+ // paced sender
+ // TODO: do we have to do this?
+ this.processingQueue = async.queue(function (task, next) {
+ if (task.type == 'chunk') {
+ var reader = new window.FileReader();
+ reader.onload = (function() {
+ return function(e) {
+ self.channel.send(e.target.result);
+
+ if (self.hash) {
+ self.hash.update(new Uint8Array(e.target.result));
+ }
+
+ self.emit('progress', task.start, task.file.size);
+
+ window.setTimeout(next, self.config.pacing); // pacing
+ };
+ })(task.file);
+ var slice = task.file.slice(task.start, task.start + task.size);
+ reader.readAsArrayBuffer(slice);
+ } else if (task.type == 'complete') {
+ self.emit('progress', self.file.size, self.file.size);
+ self.emit('sentFile', self.hash ? {hash: self.hash.digest('hex'), algo: self.config.hash } : null);
+ next();
}
- if (!sessionpart) {
- return false;
+ });
+}
+util.inherits(Sender, WildEmitter);
+
+Sender.prototype.send = function (file, channel) {
+ this.file = file;
+ if (this.config.hash) {
+ this.hash = hashes.createHash(this.config.hash);
+ }
+
+ this.channel = channel;
+ // FIXME: hook to channel.onopen?
+ for (var start = 0; start < this.file.size; start += this.config.chunksize) {
+ this.processingQueue.push({
+ type: 'chunk',
+ file: file,
+ start: start,
+ size: this.config.chunksize
+ });
+ }
+ this.processingQueue.push({
+ type: 'complete'
+ });
+};
+
+function Receiver(opts) {
+ WildEmitter.call(this);
+
+ var options = opts || {};
+ this.config = {
+ hash: 'sha-1'
+ };
+ // set our config from options
+ var item;
+ for (item in options) {
+ this.config[item] = options[item];
+ }
+ this.receiveBuffer = [];
+ this.received = 0;
+ this.metadata = {};
+ this.channel = null;
+ this.hash = null;
+}
+util.inherits(Receiver, WildEmitter);
+
+Receiver.prototype.receive = function (metadata, channel) {
+ var self = this;
+
+ if (metadata) {
+ this.metadata = metadata;
+ }
+ if (this.config.hash) {
+ this.hash = hashes.createHash(this.config.hash);
+ }
+
+ this.channel = channel;
+ // chrome only supports arraybuffers and those make it easier to calc the hash
+ channel.binaryType = 'arraybuffer';
+ this.channel.onmessage = function (event) {
+ var len = event.data.byteLength;
+ self.received += len;
+ self.receiveBuffer.push(event.data);
+
+ if (self.hash) {
+ self.hash.update(new Uint8Array(event.data));
}
- // search session part
- lines = sessionpart.split('\r\n');
- for (var j = 0; j < lines.length; j++) {
- if (lines[j].substring(0, needle.length) == needle) {
- return lines[j];
+
+ self.emit('progress', self.received, self.metadata.size);
+ if (self.received == self.metadata.size) {
+ if (self.hash) {
+ self.metadata.actualhash = self.hash.digest('hex');
}
+ self.emit('receivedFile', new window.Blob(self.receiveBuffer), self.metadata);
+ self.receiveBuffer = []; // discard receivebuffer
+ } else if (self.received > self.metadata.size) {
+ // FIXME
+ console.error('received more than expected, discarding...');
+ self.receiveBuffer = []; // just discard...
+
}
+ };
+};
+
+module.exports = {};
+module.exports.support = window && window.File && window.FileReader && window.Blob;
+module.exports.Sender = Sender;
+module.exports.Receiver = Receiver;
+
+},{"async":26,"iana-hashes":31,"util":24,"wildemitter":113}],31:[function(require,module,exports){
+var createHash = require('create-hash');
+var createHmac = require('create-hmac');
+var getHashes = require('./lib/get-hashes');
+
+var mapping = {
+ md2: 'md2',
+ md5: 'md5',
+ 'sha-1': 'sha1',
+ 'sha-224': 'sha224',
+ 'sha-256': 'sha256',
+ 'sha-384': 'sha384',
+ 'sha-512': 'sha512'
+};
+
+var names = Object.keys(mapping);
+
+
+exports.getHashes = function () {
+ var result = [];
+ var available = getHashes();
+ for (var i = 0, len = names.length; i < len; i++) {
+ if (available.indexOf(mapping[names[i]]) >= 0) {
+ result.push(names[i]);
+ }
+ }
+ return result;
+};
+
+exports.createHash = function (algorithm) {
+ algorithm = algorithm.toLowerCase();
+ if (mapping[algorithm]) {
+ algorithm = mapping[algorithm];
+ }
+ return createHash(algorithm);
+};
+
+exports.createHmac = function (algorithm, key) {
+ algorithm = algorithm.toLowerCase();
+ if (mapping[algorithm]) {
+ algorithm = mapping[algorithm];
+ }
+ return createHmac(algorithm, key);
+};
+
+},{"./lib/get-hashes":32,"create-hash":33,"create-hmac":46}],32:[function(require,module,exports){
+module.exports = function () {
+ return ['sha1', 'sha224', 'sha256', 'sha384', 'sha512', 'md5', 'rmd160'];
+};
+
+},{}],33:[function(require,module,exports){
+(function (Buffer){
+'use strict';
+var inherits = require('inherits')
+var md5 = require('./md5')
+var rmd160 = require('ripemd160')
+var sha = require('sha.js')
+
+var Transform = require('stream').Transform
+
+function HashNoConstructor(hash) {
+ Transform.call(this)
+
+ this._hash = hash
+ this.buffers = []
+}
+
+inherits(HashNoConstructor, Transform)
+
+HashNoConstructor.prototype._transform = function (data, _, next) {
+ this.buffers.push(data)
+
+ next()
+}
+
+HashNoConstructor.prototype._flush = function (next) {
+ this.push(this.digest())
+ next()
+}
+
+HashNoConstructor.prototype.update = function (data, enc) {
+ if (typeof data === 'string') {
+ data = new Buffer(data, enc)
+ }
+
+ this.buffers.push(data)
+ return this
+}
+
+HashNoConstructor.prototype.digest = function (enc) {
+ var buf = Buffer.concat(this.buffers)
+ var r = this._hash(buf)
+ this.buffers = null
+
+ return enc ? r.toString(enc) : r
+}
+
+function Hash(hash) {
+ Transform.call(this)
+
+ this._hash = hash
+}
+
+inherits(Hash, Transform)
+
+Hash.prototype._transform = function (data, enc, next) {
+ if (enc) data = new Buffer(data, enc)
+
+ this._hash.update(data)
+
+ next()
+}
+
+Hash.prototype._flush = function (next) {
+ this.push(this._hash.digest())
+ this._hash = null
+
+ next()
+}
+
+Hash.prototype.update = function (data, enc) {
+ if (typeof data === 'string') {
+ data = new Buffer(data, enc)
+ }
+
+ this._hash.update(data)
+ return this
+}
+
+Hash.prototype.digest = function (enc) {
+ var outData = this._hash.digest()
+
+ return enc ? outData.toString(enc) : outData
+}
+
+module.exports = function createHash (alg) {
+ if ('md5' === alg) return new HashNoConstructor(md5)
+ if ('rmd160' === alg) return new HashNoConstructor(rmd160)
+
+ return new Hash(sha(alg))
+}
+
+}).call(this,require("buffer").Buffer)
+},{"./md5":35,"buffer":2,"inherits":36,"ripemd160":37,"sha.js":39,"stream":21}],34:[function(require,module,exports){
+(function (Buffer){
+'use strict';
+var intSize = 4;
+var zeroBuffer = new Buffer(intSize); zeroBuffer.fill(0);
+var chrsz = 8;
+
+function toArray(buf, bigEndian) {
+ if ((buf.length % intSize) !== 0) {
+ var len = buf.length + (intSize - (buf.length % intSize));
+ buf = Buffer.concat([buf, zeroBuffer], len);
+ }
+
+ var arr = [];
+ var fn = bigEndian ? buf.readInt32BE : buf.readInt32LE;
+ for (var i = 0; i < buf.length; i += intSize) {
+ arr.push(fn.call(buf, i));
+ }
+ return arr;
+}
+
+function toBuffer(arr, size, bigEndian) {
+ var buf = new Buffer(size);
+ var fn = bigEndian ? buf.writeInt32BE : buf.writeInt32LE;
+ for (var i = 0; i < arr.length; i++) {
+ fn.call(buf, arr[i], i * 4, true);
+ }
+ return buf;
+}
+
+function hash(buf, fn, hashSize, bigEndian) {
+ if (!Buffer.isBuffer(buf)) buf = new Buffer(buf);
+ var arr = fn(toArray(buf, bigEndian), buf.length * chrsz);
+ return toBuffer(arr, hashSize, bigEndian);
+}
+exports.hash = hash;
+}).call(this,require("buffer").Buffer)
+},{"buffer":2}],35:[function(require,module,exports){
+'use strict';
+/*
+ * 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.
+ */
+
+var helpers = require('./helpers');
+
+/*
+ * Calculate the MD5 of an array of little-endian words, and a bit length
+ */
+function core_md5(x, len)
+{
+ /* append padding */
+ x[len >> 5] |= 0x80 << ((len) % 32);
+ x[(((len + 64) >>> 9) << 4) + 14] = len;
+
+ var a = 1732584193;
+ var b = -271733879;
+ var c = -1732584194;
+ var d = 271733878;
+
+ for(var i = 0; i < x.length; i += 16)
+ {
+ var olda = a;
+ var oldb = b;
+ var oldc = c;
+ var 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 Array(a, b, c, d);
+
+}
+
+/*
+ * These functions implement the four basic operations the algorithm uses.
+ */
+function md5_cmn(q, a, b, x, s, t)
+{
+ return safe_add(bit_rol(safe_add(safe_add(a, q), safe_add(x, t)), s),b);
+}
+function md5_ff(a, b, c, d, x, s, t)
+{
+ return md5_cmn((b & c) | ((~b) & d), a, b, x, s, t);
+}
+function md5_gg(a, b, c, d, x, s, t)
+{
+ return md5_cmn((b & d) | (c & (~d)), a, b, x, s, t);
+}
+function md5_hh(a, b, c, d, x, s, t)
+{
+ return md5_cmn(b ^ c ^ d, a, b, x, s, t);
+}
+function md5_ii(a, b, c, d, x, s, t)
+{
+ return md5_cmn(c ^ (b | (~d)), a, b, x, s, t);
+}
+
+/*
+ * 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 & 0xFFFF) + (y & 0xFFFF);
+ var msw = (x >> 16) + (y >> 16) + (lsw >> 16);
+ return (msw << 16) | (lsw & 0xFFFF);
+}
+
+/*
+ * Bitwise rotate a 32-bit number to the left.
+ */
+function bit_rol(num, cnt)
+{
+ return (num << cnt) | (num >>> (32 - cnt));
+}
+
+module.exports = function md5(buf) {
+ return helpers.hash(buf, core_md5, 16);
+};
+},{"./helpers":34}],36:[function(require,module,exports){
+arguments[4][7][0].apply(exports,arguments)
+},{"dup":7}],37:[function(require,module,exports){
+(function (Buffer){
+/*
+CryptoJS v3.1.2
+code.google.com/p/crypto-js
+(c) 2009-2013 by Jeff Mott. All rights reserved.
+code.google.com/p/crypto-js/wiki/License
+*/
+/** @preserve
+(c) 2012 by Cédric Mesnil. All rights reserved.
+
+Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
+
+ - Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
+ - Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+*/
+
+// constants table
+var zl = [
+ 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15,
+ 7, 4, 13, 1, 10, 6, 15, 3, 12, 0, 9, 5, 2, 14, 11, 8,
+ 3, 10, 14, 4, 9, 15, 8, 1, 2, 7, 0, 6, 13, 11, 5, 12,
+ 1, 9, 11, 10, 0, 8, 12, 4, 13, 3, 7, 15, 14, 5, 6, 2,
+ 4, 0, 5, 9, 7, 12, 2, 10, 14, 1, 3, 8, 11, 6, 15, 13
+]
+
+var zr = [
+ 5, 14, 7, 0, 9, 2, 11, 4, 13, 6, 15, 8, 1, 10, 3, 12,
+ 6, 11, 3, 7, 0, 13, 5, 10, 14, 15, 8, 12, 4, 9, 1, 2,
+ 15, 5, 1, 3, 7, 14, 6, 9, 11, 8, 12, 2, 10, 0, 4, 13,
+ 8, 6, 4, 1, 3, 11, 15, 0, 5, 12, 2, 13, 9, 7, 10, 14,
+ 12, 15, 10, 4, 1, 5, 8, 7, 6, 2, 13, 14, 0, 3, 9, 11
+]
+
+var sl = [
+ 11, 14, 15, 12, 5, 8, 7, 9, 11, 13, 14, 15, 6, 7, 9, 8,
+ 7, 6, 8, 13, 11, 9, 7, 15, 7, 12, 15, 9, 11, 7, 13, 12,
+ 11, 13, 6, 7, 14, 9, 13, 15, 14, 8, 13, 6, 5, 12, 7, 5,
+ 11, 12, 14, 15, 14, 15, 9, 8, 9, 14, 5, 6, 8, 6, 5, 12,
+ 9, 15, 5, 11, 6, 8, 13, 12, 5, 12, 13, 14, 11, 8, 5, 6
+]
+
+var sr = [
+ 8, 9, 9, 11, 13, 15, 15, 5, 7, 7, 8, 11, 14, 14, 12, 6,
+ 9, 13, 15, 7, 12, 8, 9, 11, 7, 7, 12, 7, 6, 15, 13, 11,
+ 9, 7, 15, 11, 8, 6, 6, 14, 12, 13, 5, 14, 13, 13, 7, 5,
+ 15, 5, 8, 11, 14, 14, 6, 14, 6, 9, 12, 9, 12, 5, 15, 8,
+ 8, 5, 12, 9, 12, 5, 14, 6, 8, 13, 6, 5, 15, 13, 11, 11
+]
+
+var hl = [0x00000000, 0x5A827999, 0x6ED9EBA1, 0x8F1BBCDC, 0xA953FD4E]
+var hr = [0x50A28BE6, 0x5C4DD124, 0x6D703EF3, 0x7A6D76E9, 0x00000000]
+
+function bytesToWords (bytes) {
+ var words = []
+ for (var i = 0, b = 0; i < bytes.length; i++, b += 8) {
+ words[b >>> 5] |= bytes[i] << (24 - b % 32)
+ }
+ return words
+}
+
+function wordsToBytes (words) {
+ var bytes = []
+ for (var b = 0; b < words.length * 32; b += 8) {
+ bytes.push((words[b >>> 5] >>> (24 - b % 32)) & 0xFF)
+ }
+ return bytes
+}
+
+function processBlock (H, M, offset) {
+ // swap endian
+ for (var i = 0; i < 16; i++) {
+ var offset_i = offset + i
+ var M_offset_i = M[offset_i]
+
+ // Swap
+ M[offset_i] = (
+ (((M_offset_i << 8) | (M_offset_i >>> 24)) & 0x00ff00ff) |
+ (((M_offset_i << 24) | (M_offset_i >>> 8)) & 0xff00ff00)
+ )
+ }
+
+ // Working variables
+ var al, bl, cl, dl, el
+ var ar, br, cr, dr, er
+
+ ar = al = H[0]
+ br = bl = H[1]
+ cr = cl = H[2]
+ dr = dl = H[3]
+ er = el = H[4]
+
+ // computation
+ var t
+ for (i = 0; i < 80; i += 1) {
+ t = (al + M[offset + zl[i]]) | 0
+ if (i < 16) {
+ t += f1(bl, cl, dl) + hl[0]
+ } else if (i < 32) {
+ t += f2(bl, cl, dl) + hl[1]
+ } else if (i < 48) {
+ t += f3(bl, cl, dl) + hl[2]
+ } else if (i < 64) {
+ t += f4(bl, cl, dl) + hl[3]
+ } else {// if (i<80) {
+ t += f5(bl, cl, dl) + hl[4]
+ }
+ t = t | 0
+ t = rotl(t, sl[i])
+ t = (t + el) | 0
+ al = el
+ el = dl
+ dl = rotl(cl, 10)
+ cl = bl
+ bl = t
+
+ t = (ar + M[offset + zr[i]]) | 0
+ if (i < 16) {
+ t += f5(br, cr, dr) + hr[0]
+ } else if (i < 32) {
+ t += f4(br, cr, dr) + hr[1]
+ } else if (i < 48) {
+ t += f3(br, cr, dr) + hr[2]
+ } else if (i < 64) {
+ t += f2(br, cr, dr) + hr[3]
+ } else {// if (i<80) {
+ t += f1(br, cr, dr) + hr[4]
+ }
+
+ t = t | 0
+ t = rotl(t, sr[i])
+ t = (t + er) | 0
+ ar = er
+ er = dr
+ dr = rotl(cr, 10)
+ cr = br
+ br = t
+ }
+
+ // intermediate hash value
+ t = (H[1] + cl + dr) | 0
+ H[1] = (H[2] + dl + er) | 0
+ H[2] = (H[3] + el + ar) | 0
+ H[3] = (H[4] + al + br) | 0
+ H[4] = (H[0] + bl + cr) | 0
+ H[0] = t
+}
+
+function f1 (x, y, z) {
+ return ((x) ^ (y) ^ (z))
+}
+
+function f2 (x, y, z) {
+ return (((x) & (y)) | ((~x) & (z)))
+}
+
+function f3 (x, y, z) {
+ return (((x) | (~(y))) ^ (z))
+}
+
+function f4 (x, y, z) {
+ return (((x) & (z)) | ((y) & (~(z))))
+}
+
+function f5 (x, y, z) {
+ return ((x) ^ ((y) | (~(z))))
+}
+
+function rotl (x, n) {
+ return (x << n) | (x >>> (32 - n))
+}
+
+function ripemd160 (message) {
+ var H = [0x67452301, 0xEFCDAB89, 0x98BADCFE, 0x10325476, 0xC3D2E1F0]
+
+ if (typeof message === 'string') {
+ message = new Buffer(message, 'utf8')
+ }
+
+ var m = bytesToWords(message)
+
+ var nBitsLeft = message.length * 8
+ var nBitsTotal = message.length * 8
+
+ // Add padding
+ m[nBitsLeft >>> 5] |= 0x80 << (24 - nBitsLeft % 32)
+ m[(((nBitsLeft + 64) >>> 9) << 4) + 14] = (
+ (((nBitsTotal << 8) | (nBitsTotal >>> 24)) & 0x00ff00ff) |
+ (((nBitsTotal << 24) | (nBitsTotal >>> 8)) & 0xff00ff00)
+ )
+
+ for (var i = 0; i < m.length; i += 16) {
+ processBlock(H, m, i)
+ }
+
+ // swap endian
+ for (i = 0; i < 5; i++) {
+ // shortcut
+ var H_i = H[i]
+
+ // Swap
+ H[i] = (((H_i << 8) | (H_i >>> 24)) & 0x00ff00ff) |
+ (((H_i << 24) | (H_i >>> 8)) & 0xff00ff00)
+ }
+
+ var digestbytes = wordsToBytes(H)
+ return new Buffer(digestbytes)
+}
+
+module.exports = ripemd160
+
+}).call(this,require("buffer").Buffer)
+},{"buffer":2}],38:[function(require,module,exports){
+(function (Buffer){
+// prototype class for hash functions
+function Hash (blockSize, finalSize) {
+ this._block = new Buffer(blockSize)
+ this._finalSize = finalSize
+ this._blockSize = blockSize
+ this._len = 0
+ this._s = 0
+}
+
+Hash.prototype.update = function (data, enc) {
+ if (typeof data === 'string') {
+ enc = enc || 'utf8'
+ data = new Buffer(data, enc)
+ }
+
+ var l = this._len += data.length
+ var s = this._s || 0
+ var f = 0
+ var buffer = this._block
+
+ while (s < l) {
+ var t = Math.min(data.length, f + this._blockSize - (s % this._blockSize))
+ var ch = (t - f)
+
+ for (var i = 0; i < ch; i++) {
+ buffer[(s % this._blockSize) + i] = data[i + f]
+ }
+
+ s += ch
+ f += ch
+
+ if ((s % this._blockSize) === 0) {
+ this._update(buffer)
+ }
+ }
+ this._s = s
+
+ return this
+}
+
+Hash.prototype.digest = function (enc) {
+ // Suppose the length of the message M, in bits, is l
+ var l = this._len * 8
+
+ // Append the bit 1 to the end of the message
+ this._block[this._len % this._blockSize] = 0x80
+
+ // and then k zero bits, where k is the smallest non-negative solution to the equation (l + 1 + k) === finalSize mod blockSize
+ this._block.fill(0, this._len % this._blockSize + 1)
+
+ if (l % (this._blockSize * 8) >= this._finalSize * 8) {
+ this._update(this._block)
+ this._block.fill(0)
+ }
+
+ // to this append the block which is equal to the number l written in binary
+ // TODO: handle case where l is > Math.pow(2, 29)
+ this._block.writeInt32BE(l, this._blockSize - 4)
+
+ var hash = this._update(this._block) || this._hash()
+
+ return enc ? hash.toString(enc) : hash
+}
+
+Hash.prototype._update = function () {
+ throw new Error('_update must be implemented by subclass')
+}
+
+module.exports = Hash
+
+}).call(this,require("buffer").Buffer)
+},{"buffer":2}],39:[function(require,module,exports){
+var exports = module.exports = function SHA (algorithm) {
+ algorithm = algorithm.toLowerCase()
+
+ var Algorithm = exports[algorithm]
+ if (!Algorithm) throw new Error(algorithm + ' is not supported (we accept pull requests)')
+
+ return new Algorithm()
+}
+
+exports.sha = require('./sha')
+exports.sha1 = require('./sha1')
+exports.sha224 = require('./sha224')
+exports.sha256 = require('./sha256')
+exports.sha384 = require('./sha384')
+exports.sha512 = require('./sha512')
+
+},{"./sha":40,"./sha1":41,"./sha224":42,"./sha256":43,"./sha384":44,"./sha512":45}],40:[function(require,module,exports){
+(function (Buffer){
+/*
+ * A JavaScript implementation of the Secure Hash Algorithm, SHA-0, as defined
+ * in FIPS PUB 180-1
+ * This source code is derived from sha1.js of the same repository.
+ * The difference between SHA-0 and SHA-1 is just a bitwise rotate left
+ * operation was added.
+ */
+
+var inherits = require('inherits')
+var Hash = require('./hash')
+
+var W = new Array(80)
+
+function Sha () {
+ this.init()
+ this._w = W
+
+ Hash.call(this, 64, 56)
+}
+
+inherits(Sha, Hash)
+
+Sha.prototype.init = function () {
+ this._a = 0x67452301 | 0
+ this._b = 0xefcdab89 | 0
+ this._c = 0x98badcfe | 0
+ this._d = 0x10325476 | 0
+ this._e = 0xc3d2e1f0 | 0
+
+ return this
+}
+
+/*
+ * Bitwise rotate a 32-bit number to the left.
+ */
+function rol (num, cnt) {
+ return (num << cnt) | (num >>> (32 - cnt))
+}
+
+Sha.prototype._update = function (M) {
+ var W = this._w
+
+ var a = this._a
+ var b = this._b
+ var c = this._c
+ var d = this._d
+ var e = this._e
+
+ var j = 0, k
+
+ /*
+ * SHA-1 has a bitwise rotate left operation. But, SHA is not
+ * function calcW() { return rol(W[j - 3] ^ W[j - 8] ^ W[j - 14] ^ W[j - 16], 1) }
+ */
+ function calcW () { return W[j - 3] ^ W[j - 8] ^ W[j - 14] ^ W[j - 16] }
+ function loop (w, f) {
+ W[j] = w
+
+ var t = rol(a, 5) + f + e + w + k
+
+ e = d
+ d = c
+ c = rol(b, 30)
+ b = a
+ a = t
+ j++
+ }
+
+ k = 1518500249
+ while (j < 16) loop(M.readInt32BE(j * 4), (b & c) | ((~b) & d))
+ while (j < 20) loop(calcW(), (b & c) | ((~b) & d))
+ k = 1859775393
+ while (j < 40) loop(calcW(), b ^ c ^ d)
+ k = -1894007588
+ while (j < 60) loop(calcW(), (b & c) | (b & d) | (c & d))
+ k = -899497514
+ while (j < 80) loop(calcW(), b ^ c ^ d)
+
+ this._a = (a + this._a) | 0
+ this._b = (b + this._b) | 0
+ this._c = (c + this._c) | 0
+ this._d = (d + this._d) | 0
+ this._e = (e + this._e) | 0
+}
+
+Sha.prototype._hash = function () {
+ var H = new Buffer(20)
+
+ H.writeInt32BE(this._a | 0, 0)
+ H.writeInt32BE(this._b | 0, 4)
+ H.writeInt32BE(this._c | 0, 8)
+ H.writeInt32BE(this._d | 0, 12)
+ H.writeInt32BE(this._e | 0, 16)
+
+ return H
+}
+
+module.exports = Sha
+
+
+}).call(this,require("buffer").Buffer)
+},{"./hash":38,"buffer":2,"inherits":36}],41:[function(require,module,exports){
+(function (Buffer){
+/*
+ * 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.
+ */
+
+var inherits = require('inherits')
+var Hash = require('./hash')
+
+var W = new Array(80)
+
+function Sha1 () {
+ this.init()
+ this._w = W
+
+ Hash.call(this, 64, 56)
+}
+
+inherits(Sha1, Hash)
+
+Sha1.prototype.init = function () {
+ this._a = 0x67452301 | 0
+ this._b = 0xefcdab89 | 0
+ this._c = 0x98badcfe | 0
+ this._d = 0x10325476 | 0
+ this._e = 0xc3d2e1f0 | 0
+
+ return this
+}
+
+/*
+ * Bitwise rotate a 32-bit number to the left.
+ */
+function rol (num, cnt) {
+ return (num << cnt) | (num >>> (32 - cnt))
+}
+
+Sha1.prototype._update = function (M) {
+ var W = this._w
+
+ var a = this._a
+ var b = this._b
+ var c = this._c
+ var d = this._d
+ var e = this._e
+
+ var j = 0, k
+
+ function calcW () { return rol(W[j - 3] ^ W[j - 8] ^ W[j - 14] ^ W[j - 16], 1) }
+ function loop (w, f) {
+ W[j] = w
+
+ var t = rol(a, 5) + f + e + w + k
+
+ e = d
+ d = c
+ c = rol(b, 30)
+ b = a
+ a = t
+ j++
+ }
+
+ k = 1518500249
+ while (j < 16) loop(M.readInt32BE(j * 4), (b & c) | ((~b) & d))
+ while (j < 20) loop(calcW(), (b & c) | ((~b) & d))
+ k = 1859775393
+ while (j < 40) loop(calcW(), b ^ c ^ d)
+ k = -1894007588
+ while (j < 60) loop(calcW(), (b & c) | (b & d) | (c & d))
+ k = -899497514
+ while (j < 80) loop(calcW(), b ^ c ^ d)
+
+ this._a = (a + this._a) | 0
+ this._b = (b + this._b) | 0
+ this._c = (c + this._c) | 0
+ this._d = (d + this._d) | 0
+ this._e = (e + this._e) | 0
+}
+
+Sha1.prototype._hash = function () {
+ var H = new Buffer(20)
+
+ H.writeInt32BE(this._a | 0, 0)
+ H.writeInt32BE(this._b | 0, 4)
+ H.writeInt32BE(this._c | 0, 8)
+ H.writeInt32BE(this._d | 0, 12)
+ H.writeInt32BE(this._e | 0, 16)
+
+ return H
+}
+
+module.exports = Sha1
+
+}).call(this,require("buffer").Buffer)
+},{"./hash":38,"buffer":2,"inherits":36}],42:[function(require,module,exports){
+(function (Buffer){
+/**
+ * A JavaScript implementation of the Secure Hash Algorithm, SHA-256, as defined
+ * in FIPS 180-2
+ * Version 2.2-beta Copyright Angel Marin, Paul Johnston 2000 - 2009.
+ * Other contributors: Greg Holt, Andrew Kepert, Ydnar, Lostinet
+ *
+ */
+
+var inherits = require('inherits')
+var Sha256 = require('./sha256')
+var Hash = require('./hash')
+
+var W = new Array(64)
+
+function Sha224 () {
+ this.init()
+
+ this._w = W // new Array(64)
+
+ Hash.call(this, 64, 56)
+}
+
+inherits(Sha224, Sha256)
+
+Sha224.prototype.init = function () {
+ this._a = 0xc1059ed8 | 0
+ this._b = 0x367cd507 | 0
+ this._c = 0x3070dd17 | 0
+ this._d = 0xf70e5939 | 0
+ this._e = 0xffc00b31 | 0
+ this._f = 0x68581511 | 0
+ this._g = 0x64f98fa7 | 0
+ this._h = 0xbefa4fa4 | 0
+
+ return this
+}
+
+Sha224.prototype._hash = function () {
+ var H = new Buffer(28)
+
+ H.writeInt32BE(this._a, 0)
+ H.writeInt32BE(this._b, 4)
+ H.writeInt32BE(this._c, 8)
+ H.writeInt32BE(this._d, 12)
+ H.writeInt32BE(this._e, 16)
+ H.writeInt32BE(this._f, 20)
+ H.writeInt32BE(this._g, 24)
+
+ return H
+}
+
+module.exports = Sha224
+
+}).call(this,require("buffer").Buffer)
+},{"./hash":38,"./sha256":43,"buffer":2,"inherits":36}],43:[function(require,module,exports){
+(function (Buffer){
+/**
+ * A JavaScript implementation of the Secure Hash Algorithm, SHA-256, as defined
+ * in FIPS 180-2
+ * Version 2.2-beta Copyright Angel Marin, Paul Johnston 2000 - 2009.
+ * Other contributors: Greg Holt, Andrew Kepert, Ydnar, Lostinet
+ *
+ */
+
+var inherits = require('inherits')
+var Hash = require('./hash')
+
+var K = [
+ 0x428A2F98, 0x71374491, 0xB5C0FBCF, 0xE9B5DBA5,
+ 0x3956C25B, 0x59F111F1, 0x923F82A4, 0xAB1C5ED5,
+ 0xD807AA98, 0x12835B01, 0x243185BE, 0x550C7DC3,
+ 0x72BE5D74, 0x80DEB1FE, 0x9BDC06A7, 0xC19BF174,
+ 0xE49B69C1, 0xEFBE4786, 0x0FC19DC6, 0x240CA1CC,
+ 0x2DE92C6F, 0x4A7484AA, 0x5CB0A9DC, 0x76F988DA,
+ 0x983E5152, 0xA831C66D, 0xB00327C8, 0xBF597FC7,
+ 0xC6E00BF3, 0xD5A79147, 0x06CA6351, 0x14292967,
+ 0x27B70A85, 0x2E1B2138, 0x4D2C6DFC, 0x53380D13,
+ 0x650A7354, 0x766A0ABB, 0x81C2C92E, 0x92722C85,
+ 0xA2BFE8A1, 0xA81A664B, 0xC24B8B70, 0xC76C51A3,
+ 0xD192E819, 0xD6990624, 0xF40E3585, 0x106AA070,
+ 0x19A4C116, 0x1E376C08, 0x2748774C, 0x34B0BCB5,
+ 0x391C0CB3, 0x4ED8AA4A, 0x5B9CCA4F, 0x682E6FF3,
+ 0x748F82EE, 0x78A5636F, 0x84C87814, 0x8CC70208,
+ 0x90BEFFFA, 0xA4506CEB, 0xBEF9A3F7, 0xC67178F2
+]
+
+var W = new Array(64)
+
+function Sha256 () {
+ this.init()
+
+ this._w = W // new Array(64)
+
+ Hash.call(this, 64, 56)
+}
+
+inherits(Sha256, Hash)
+
+Sha256.prototype.init = function () {
+ this._a = 0x6a09e667 | 0
+ this._b = 0xbb67ae85 | 0
+ this._c = 0x3c6ef372 | 0
+ this._d = 0xa54ff53a | 0
+ this._e = 0x510e527f | 0
+ this._f = 0x9b05688c | 0
+ this._g = 0x1f83d9ab | 0
+ this._h = 0x5be0cd19 | 0
+
+ return this
+}
+
+function S (X, n) {
+ return (X >>> n) | (X << (32 - n))
+}
+
+function R (X, n) {
+ return (X >>> n)
+}
+
+function Ch (x, y, z) {
+ return ((x & y) ^ ((~x) & z))
+}
+
+function Maj (x, y, z) {
+ return ((x & y) ^ (x & z) ^ (y & z))
+}
+
+function Sigma0256 (x) {
+ return (S(x, 2) ^ S(x, 13) ^ S(x, 22))
+}
+
+function Sigma1256 (x) {
+ return (S(x, 6) ^ S(x, 11) ^ S(x, 25))
+}
+
+function Gamma0256 (x) {
+ return (S(x, 7) ^ S(x, 18) ^ R(x, 3))
+}
+
+function Gamma1256 (x) {
+ return (S(x, 17) ^ S(x, 19) ^ R(x, 10))
+}
+
+Sha256.prototype._update = function (M) {
+ var W = this._w
+
+ var a = this._a | 0
+ var b = this._b | 0
+ var c = this._c | 0
+ var d = this._d | 0
+ var e = this._e | 0
+ var f = this._f | 0
+ var g = this._g | 0
+ var h = this._h | 0
+
+ var j = 0
+
+ function calcW () { return Gamma1256(W[j - 2]) + W[j - 7] + Gamma0256(W[j - 15]) + W[j - 16] }
+ function loop (w) {
+ W[j] = w
+
+ var T1 = h + Sigma1256(e) + Ch(e, f, g) + K[j] + w
+ var T2 = Sigma0256(a) + Maj(a, b, c)
+
+ h = g
+ g = f
+ f = e
+ e = d + T1
+ d = c
+ c = b
+ b = a
+ a = T1 + T2
+
+ j++
+ }
+
+ while (j < 16) loop(M.readInt32BE(j * 4))
+ while (j < 64) loop(calcW())
+
+ this._a = (a + this._a) | 0
+ this._b = (b + this._b) | 0
+ this._c = (c + this._c) | 0
+ this._d = (d + this._d) | 0
+ this._e = (e + this._e) | 0
+ this._f = (f + this._f) | 0
+ this._g = (g + this._g) | 0
+ this._h = (h + this._h) | 0
+}
+
+Sha256.prototype._hash = function () {
+ var H = new Buffer(32)
+
+ H.writeInt32BE(this._a, 0)
+ H.writeInt32BE(this._b, 4)
+ H.writeInt32BE(this._c, 8)
+ H.writeInt32BE(this._d, 12)
+ H.writeInt32BE(this._e, 16)
+ H.writeInt32BE(this._f, 20)
+ H.writeInt32BE(this._g, 24)
+ H.writeInt32BE(this._h, 28)
+
+ return H
+}
+
+module.exports = Sha256
+
+}).call(this,require("buffer").Buffer)
+},{"./hash":38,"buffer":2,"inherits":36}],44:[function(require,module,exports){
+(function (Buffer){
+var inherits = require('inherits')
+var SHA512 = require('./sha512')
+var Hash = require('./hash')
+
+var W = new Array(160)
+
+function Sha384 () {
+ this.init()
+ this._w = W
+
+ Hash.call(this, 128, 112)
+}
+
+inherits(Sha384, SHA512)
+
+Sha384.prototype.init = function () {
+ this._a = 0xcbbb9d5d | 0
+ this._b = 0x629a292a | 0
+ this._c = 0x9159015a | 0
+ this._d = 0x152fecd8 | 0
+ this._e = 0x67332667 | 0
+ this._f = 0x8eb44a87 | 0
+ this._g = 0xdb0c2e0d | 0
+ this._h = 0x47b5481d | 0
+
+ this._al = 0xc1059ed8 | 0
+ this._bl = 0x367cd507 | 0
+ this._cl = 0x3070dd17 | 0
+ this._dl = 0xf70e5939 | 0
+ this._el = 0xffc00b31 | 0
+ this._fl = 0x68581511 | 0
+ this._gl = 0x64f98fa7 | 0
+ this._hl = 0xbefa4fa4 | 0
+
+ return this
+}
+
+Sha384.prototype._hash = function () {
+ var H = new Buffer(48)
+
+ function writeInt64BE (h, l, offset) {
+ H.writeInt32BE(h, offset)
+ H.writeInt32BE(l, offset + 4)
+ }
+
+ writeInt64BE(this._a, this._al, 0)
+ writeInt64BE(this._b, this._bl, 8)
+ writeInt64BE(this._c, this._cl, 16)
+ writeInt64BE(this._d, this._dl, 24)
+ writeInt64BE(this._e, this._el, 32)
+ writeInt64BE(this._f, this._fl, 40)
+
+ return H
+}
+
+module.exports = Sha384
+
+}).call(this,require("buffer").Buffer)
+},{"./hash":38,"./sha512":45,"buffer":2,"inherits":36}],45:[function(require,module,exports){
+(function (Buffer){
+var inherits = require('inherits')
+var Hash = require('./hash')
+
+var K = [
+ 0x428a2f98, 0xd728ae22, 0x71374491, 0x23ef65cd,
+ 0xb5c0fbcf, 0xec4d3b2f, 0xe9b5dba5, 0x8189dbbc,
+ 0x3956c25b, 0xf348b538, 0x59f111f1, 0xb605d019,
+ 0x923f82a4, 0xaf194f9b, 0xab1c5ed5, 0xda6d8118,
+ 0xd807aa98, 0xa3030242, 0x12835b01, 0x45706fbe,
+ 0x243185be, 0x4ee4b28c, 0x550c7dc3, 0xd5ffb4e2,
+ 0x72be5d74, 0xf27b896f, 0x80deb1fe, 0x3b1696b1,
+ 0x9bdc06a7, 0x25c71235, 0xc19bf174, 0xcf692694,
+ 0xe49b69c1, 0x9ef14ad2, 0xefbe4786, 0x384f25e3,
+ 0x0fc19dc6, 0x8b8cd5b5, 0x240ca1cc, 0x77ac9c65,
+ 0x2de92c6f, 0x592b0275, 0x4a7484aa, 0x6ea6e483,
+ 0x5cb0a9dc, 0xbd41fbd4, 0x76f988da, 0x831153b5,
+ 0x983e5152, 0xee66dfab, 0xa831c66d, 0x2db43210,
+ 0xb00327c8, 0x98fb213f, 0xbf597fc7, 0xbeef0ee4,
+ 0xc6e00bf3, 0x3da88fc2, 0xd5a79147, 0x930aa725,
+ 0x06ca6351, 0xe003826f, 0x14292967, 0x0a0e6e70,
+ 0x27b70a85, 0x46d22ffc, 0x2e1b2138, 0x5c26c926,
+ 0x4d2c6dfc, 0x5ac42aed, 0x53380d13, 0x9d95b3df,
+ 0x650a7354, 0x8baf63de, 0x766a0abb, 0x3c77b2a8,
+ 0x81c2c92e, 0x47edaee6, 0x92722c85, 0x1482353b,
+ 0xa2bfe8a1, 0x4cf10364, 0xa81a664b, 0xbc423001,
+ 0xc24b8b70, 0xd0f89791, 0xc76c51a3, 0x0654be30,
+ 0xd192e819, 0xd6ef5218, 0xd6990624, 0x5565a910,
+ 0xf40e3585, 0x5771202a, 0x106aa070, 0x32bbd1b8,
+ 0x19a4c116, 0xb8d2d0c8, 0x1e376c08, 0x5141ab53,
+ 0x2748774c, 0xdf8eeb99, 0x34b0bcb5, 0xe19b48a8,
+ 0x391c0cb3, 0xc5c95a63, 0x4ed8aa4a, 0xe3418acb,
+ 0x5b9cca4f, 0x7763e373, 0x682e6ff3, 0xd6b2b8a3,
+ 0x748f82ee, 0x5defb2fc, 0x78a5636f, 0x43172f60,
+ 0x84c87814, 0xa1f0ab72, 0x8cc70208, 0x1a6439ec,
+ 0x90befffa, 0x23631e28, 0xa4506ceb, 0xde82bde9,
+ 0xbef9a3f7, 0xb2c67915, 0xc67178f2, 0xe372532b,
+ 0xca273ece, 0xea26619c, 0xd186b8c7, 0x21c0c207,
+ 0xeada7dd6, 0xcde0eb1e, 0xf57d4f7f, 0xee6ed178,
+ 0x06f067aa, 0x72176fba, 0x0a637dc5, 0xa2c898a6,
+ 0x113f9804, 0xbef90dae, 0x1b710b35, 0x131c471b,
+ 0x28db77f5, 0x23047d84, 0x32caab7b, 0x40c72493,
+ 0x3c9ebe0a, 0x15c9bebc, 0x431d67c4, 0x9c100d4c,
+ 0x4cc5d4be, 0xcb3e42b6, 0x597f299c, 0xfc657e2a,
+ 0x5fcb6fab, 0x3ad6faec, 0x6c44198c, 0x4a475817
+]
+
+var W = new Array(160)
+
+function Sha512 () {
+ this.init()
+ this._w = W
+
+ Hash.call(this, 128, 112)
+}
+
+inherits(Sha512, Hash)
+
+Sha512.prototype.init = function () {
+ this._a = 0x6a09e667 | 0
+ this._b = 0xbb67ae85 | 0
+ this._c = 0x3c6ef372 | 0
+ this._d = 0xa54ff53a | 0
+ this._e = 0x510e527f | 0
+ this._f = 0x9b05688c | 0
+ this._g = 0x1f83d9ab | 0
+ this._h = 0x5be0cd19 | 0
+
+ this._al = 0xf3bcc908 | 0
+ this._bl = 0x84caa73b | 0
+ this._cl = 0xfe94f82b | 0
+ this._dl = 0x5f1d36f1 | 0
+ this._el = 0xade682d1 | 0
+ this._fl = 0x2b3e6c1f | 0
+ this._gl = 0xfb41bd6b | 0
+ this._hl = 0x137e2179 | 0
+
+ return this
+}
+
+function S (X, Xl, n) {
+ return (X >>> n) | (Xl << (32 - n))
+}
+
+function Ch (x, y, z) {
+ return ((x & y) ^ ((~x) & z))
+}
+
+function Maj (x, y, z) {
+ return ((x & y) ^ (x & z) ^ (y & z))
+}
+
+Sha512.prototype._update = function (M) {
+ var W = this._w
+
+ var a = this._a | 0
+ var b = this._b | 0
+ var c = this._c | 0
+ var d = this._d | 0
+ var e = this._e | 0
+ var f = this._f | 0
+ var g = this._g | 0
+ var h = this._h | 0
+
+ var al = this._al | 0
+ var bl = this._bl | 0
+ var cl = this._cl | 0
+ var dl = this._dl | 0
+ var el = this._el | 0
+ var fl = this._fl | 0
+ var gl = this._gl | 0
+ var hl = this._hl | 0
+
+ var i = 0, j = 0
+ var Wi, Wil
+ function calcW () {
+ var x = W[j - 15 * 2]
+ var xl = W[j - 15 * 2 + 1]
+ var gamma0 = S(x, xl, 1) ^ S(x, xl, 8) ^ (x >>> 7)
+ var gamma0l = S(xl, x, 1) ^ S(xl, x, 8) ^ S(xl, x, 7)
+
+ x = W[j - 2 * 2]
+ xl = W[j - 2 * 2 + 1]
+ var gamma1 = S(x, xl, 19) ^ S(xl, x, 29) ^ (x >>> 6)
+ var gamma1l = S(xl, x, 19) ^ S(x, xl, 29) ^ S(xl, x, 6)
+
+ // W[i] = gamma0 + W[i - 7] + gamma1 + W[i - 16]
+ var Wi7 = W[j - 7 * 2]
+ var Wi7l = W[j - 7 * 2 + 1]
+
+ var Wi16 = W[j - 16 * 2]
+ var Wi16l = W[j - 16 * 2 + 1]
+
+ Wil = gamma0l + Wi7l
+ Wi = gamma0 + Wi7 + ((Wil >>> 0) < (gamma0l >>> 0) ? 1 : 0)
+ Wil = Wil + gamma1l
+ Wi = Wi + gamma1 + ((Wil >>> 0) < (gamma1l >>> 0) ? 1 : 0)
+ Wil = Wil + Wi16l
+ Wi = Wi + Wi16 + ((Wil >>> 0) < (Wi16l >>> 0) ? 1 : 0)
+ }
+
+ function loop () {
+ W[j] = Wi
+ W[j + 1] = Wil
+
+ var maj = Maj(a, b, c)
+ var majl = Maj(al, bl, cl)
+
+ var sigma0h = S(a, al, 28) ^ S(al, a, 2) ^ S(al, a, 7)
+ var sigma0l = S(al, a, 28) ^ S(a, al, 2) ^ S(a, al, 7)
+ var sigma1h = S(e, el, 14) ^ S(e, el, 18) ^ S(el, e, 9)
+ var sigma1l = S(el, e, 14) ^ S(el, e, 18) ^ S(e, el, 9)
+
+ // t1 = h + sigma1 + ch + K[i] + W[i]
+ var Ki = K[j]
+ var Kil = K[j + 1]
+
+ var ch = Ch(e, f, g)
+ var chl = Ch(el, fl, gl)
+
+ var t1l = hl + sigma1l
+ var t1 = h + sigma1h + ((t1l >>> 0) < (hl >>> 0) ? 1 : 0)
+ t1l = t1l + chl
+ t1 = t1 + ch + ((t1l >>> 0) < (chl >>> 0) ? 1 : 0)
+ t1l = t1l + Kil
+ t1 = t1 + Ki + ((t1l >>> 0) < (Kil >>> 0) ? 1 : 0)
+ t1l = t1l + Wil
+ t1 = t1 + Wi + ((t1l >>> 0) < (Wil >>> 0) ? 1 : 0)
+
+ // t2 = sigma0 + maj
+ var t2l = sigma0l + majl
+ var t2 = sigma0h + maj + ((t2l >>> 0) < (sigma0l >>> 0) ? 1 : 0)
+
+ h = g
+ hl = gl
+ g = f
+ gl = fl
+ f = e
+ fl = el
+ el = (dl + t1l) | 0
+ e = (d + t1 + ((el >>> 0) < (dl >>> 0) ? 1 : 0)) | 0
+ d = c
+ dl = cl
+ c = b
+ cl = bl
+ b = a
+ bl = al
+ al = (t1l + t2l) | 0
+ a = (t1 + t2 + ((al >>> 0) < (t1l >>> 0) ? 1 : 0)) | 0
+
+ i++
+ j += 2
+ }
+
+ while (i < 16) {
+ Wi = M.readInt32BE(j * 4)
+ Wil = M.readInt32BE(j * 4 + 4)
+
+ loop()
+ }
+
+ while (i < 80) {
+ calcW()
+ loop()
+ }
+
+ this._al = (this._al + al) | 0
+ this._bl = (this._bl + bl) | 0
+ this._cl = (this._cl + cl) | 0
+ this._dl = (this._dl + dl) | 0
+ this._el = (this._el + el) | 0
+ this._fl = (this._fl + fl) | 0
+ this._gl = (this._gl + gl) | 0
+ this._hl = (this._hl + hl) | 0
+
+ this._a = (this._a + a + ((this._al >>> 0) < (al >>> 0) ? 1 : 0)) | 0
+ this._b = (this._b + b + ((this._bl >>> 0) < (bl >>> 0) ? 1 : 0)) | 0
+ this._c = (this._c + c + ((this._cl >>> 0) < (cl >>> 0) ? 1 : 0)) | 0
+ this._d = (this._d + d + ((this._dl >>> 0) < (dl >>> 0) ? 1 : 0)) | 0
+ this._e = (this._e + e + ((this._el >>> 0) < (el >>> 0) ? 1 : 0)) | 0
+ this._f = (this._f + f + ((this._fl >>> 0) < (fl >>> 0) ? 1 : 0)) | 0
+ this._g = (this._g + g + ((this._gl >>> 0) < (gl >>> 0) ? 1 : 0)) | 0
+ this._h = (this._h + h + ((this._hl >>> 0) < (hl >>> 0) ? 1 : 0)) | 0
+}
+
+Sha512.prototype._hash = function () {
+ var H = new Buffer(64)
+
+ function writeInt64BE (h, l, offset) {
+ H.writeInt32BE(h, offset)
+ H.writeInt32BE(l, offset + 4)
+ }
+
+ writeInt64BE(this._a, this._al, 0)
+ writeInt64BE(this._b, this._bl, 8)
+ writeInt64BE(this._c, this._cl, 16)
+ writeInt64BE(this._d, this._dl, 24)
+ writeInt64BE(this._e, this._el, 32)
+ writeInt64BE(this._f, this._fl, 40)
+ writeInt64BE(this._g, this._gl, 48)
+ writeInt64BE(this._h, this._hl, 56)
+
+ return H
+}
+
+module.exports = Sha512
+
+}).call(this,require("buffer").Buffer)
+},{"./hash":38,"buffer":2,"inherits":36}],46:[function(require,module,exports){
+(function (Buffer){
+'use strict';
+var createHash = require('create-hash/browser');
+var inherits = require('inherits')
+
+var Transform = require('stream').Transform
+
+var ZEROS = new Buffer(128)
+ZEROS.fill(0)
+
+function Hmac(alg, key) {
+ Transform.call(this)
+
+ if (typeof key === 'string') {
+ key = new Buffer(key)
+ }
+
+ var blocksize = (alg === 'sha512' || alg === 'sha384') ? 128 : 64
+
+ this._alg = alg
+ this._key = key
+
+ if (key.length > blocksize) {
+ key = createHash(alg).update(key).digest()
+
+ } else if (key.length < blocksize) {
+ key = Buffer.concat([key, ZEROS], blocksize)
+ }
+
+ var ipad = this._ipad = new Buffer(blocksize)
+ var opad = this._opad = new Buffer(blocksize)
+
+ for (var i = 0; i < blocksize; i++) {
+ ipad[i] = key[i] ^ 0x36
+ opad[i] = key[i] ^ 0x5C
+ }
+
+ this._hash = createHash(alg).update(ipad)
+}
+
+inherits(Hmac, Transform)
+
+Hmac.prototype.update = function (data, enc) {
+ this._hash.update(data, enc)
+
+ return this
+}
+
+Hmac.prototype._transform = function (data, _, next) {
+ this._hash.update(data)
+
+ next()
+}
+
+Hmac.prototype._flush = function (next) {
+ this.push(this.digest())
+
+ next()
+}
+
+Hmac.prototype.digest = function (enc) {
+ var h = this._hash.digest()
+
+ return createHash(this._alg).update(this._opad).update(h).digest(enc)
+}
+
+module.exports = function createHmac(alg, key) {
+ return new Hmac(alg, key)
+}
+
+}).call(this,require("buffer").Buffer)
+},{"buffer":2,"create-hash/browser":33,"inherits":47,"stream":21}],47:[function(require,module,exports){
+arguments[4][7][0].apply(exports,arguments)
+},{"dup":7}],48:[function(require,module,exports){
+/**
+ * lodash 3.0.3 (Custom Build) <https://lodash.com/>
+ * Build: `lodash modern modularize exports="npm" -o ./`
+ * Copyright 2012-2015 The Dojo Foundation <http://dojofoundation.org/>
+ * Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>
+ * Copyright 2009-2015 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
+ * Available under MIT license <https://lodash.com/license>
+ */
+var arrayEach = require('lodash._arrayeach'),
+ baseEach = require('lodash._baseeach'),
+ bindCallback = require('lodash._bindcallback'),
+ isArray = require('lodash.isarray');
+
+/**
+ * Creates a function for `_.forEach` or `_.forEachRight`.
+ *
+ * @private
+ * @param {Function} arrayFunc The function to iterate over an array.
+ * @param {Function} eachFunc The function to iterate over a collection.
+ * @returns {Function} Returns the new each function.
+ */
+function createForEach(arrayFunc, eachFunc) {
+ return function(collection, iteratee, thisArg) {
+ return (typeof iteratee == 'function' && thisArg === undefined && isArray(collection))
+ ? arrayFunc(collection, iteratee)
+ : eachFunc(collection, bindCallback(iteratee, thisArg, 3));
+ };
+}
+
+/**
+ * Iterates over elements of `collection` invoking `iteratee` for each element.
+ * The `iteratee` is bound to `thisArg` and invoked with three arguments:
+ * (value, index|key, collection). Iteratee functions may exit iteration early
+ * by explicitly returning `false`.
+ *
+ * **Note:** As with other "Collections" methods, objects with a "length" property
+ * are iterated like arrays. To avoid this behavior `_.forIn` or `_.forOwn`
+ * may be used for object iteration.
+ *
+ * @static
+ * @memberOf _
+ * @alias each
+ * @category Collection
+ * @param {Array|Object|string} collection The collection to iterate over.
+ * @param {Function} [iteratee=_.identity] The function invoked per iteration.
+ * @param {*} [thisArg] The `this` binding of `iteratee`.
+ * @returns {Array|Object|string} Returns `collection`.
+ * @example
+ *
+ * _([1, 2]).forEach(function(n) {
+ * console.log(n);
+ * }).value();
+ * // => logs each value from left to right and returns the array
+ *
+ * _.forEach({ 'a': 1, 'b': 2 }, function(n, key) {
+ * console.log(n, key);
+ * });
+ * // => logs each value-key pair and returns the object (iteration order is not guaranteed)
+ */
+var forEach = createForEach(arrayEach, baseEach);
+
+module.exports = forEach;
+
+},{"lodash._arrayeach":49,"lodash._baseeach":50,"lodash._bindcallback":54,"lodash.isarray":55}],49:[function(require,module,exports){
+/**
+ * lodash 3.0.0 (Custom Build) <https://lodash.com/>
+ * Build: `lodash modern modularize exports="npm" -o ./`
+ * Copyright 2012-2015 The Dojo Foundation <http://dojofoundation.org/>
+ * Based on Underscore.js 1.7.0 <http://underscorejs.org/LICENSE>
+ * Copyright 2009-2015 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
+ * Available under MIT license <https://lodash.com/license>
+ */
+
+/**
+ * A specialized version of `_.forEach` for arrays without support for callback
+ * shorthands or `this` binding.
+ *
+ * @private
+ * @param {Array} array The array to iterate over.
+ * @param {Function} iteratee The function invoked per iteration.
+ * @returns {Array} Returns `array`.
+ */
+function arrayEach(array, iteratee) {
+ var index = -1,
+ length = array.length;
+
+ while (++index < length) {
+ if (iteratee(array[index], index, array) === false) {
+ break;
+ }
+ }
+ return array;
+}
+
+module.exports = arrayEach;
+
+},{}],50:[function(require,module,exports){
+/**
+ * lodash 3.0.4 (Custom Build) <https://lodash.com/>
+ * Build: `lodash modern modularize exports="npm" -o ./`
+ * Copyright 2012-2015 The Dojo Foundation <http://dojofoundation.org/>
+ * Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>
+ * Copyright 2009-2015 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
+ * Available under MIT license <https://lodash.com/license>
+ */
+var keys = require('lodash.keys');
+
+/**
+ * Used as the [maximum length](https://people.mozilla.org/~jorendorff/es6-draft.html#sec-number.max_safe_integer)
+ * of an array-like value.
+ */
+var MAX_SAFE_INTEGER = 9007199254740991;
+
+/**
+ * The base implementation of `_.forEach` without support for callback
+ * shorthands and `this` binding.
+ *
+ * @private
+ * @param {Array|Object|string} collection The collection to iterate over.
+ * @param {Function} iteratee The function invoked per iteration.
+ * @returns {Array|Object|string} Returns `collection`.
+ */
+var baseEach = createBaseEach(baseForOwn);
+
+/**
+ * The base implementation of `baseForIn` and `baseForOwn` which iterates
+ * over `object` properties returned by `keysFunc` invoking `iteratee` for
+ * each property. Iteratee functions may exit iteration early by explicitly
+ * returning `false`.
+ *
+ * @private
+ * @param {Object} object The object to iterate over.
+ * @param {Function} iteratee The function invoked per iteration.
+ * @param {Function} keysFunc The function to get the keys of `object`.
+ * @returns {Object} Returns `object`.
+ */
+var baseFor = createBaseFor();
+
+/**
+ * The base implementation of `_.forOwn` without support for callback
+ * shorthands and `this` binding.
+ *
+ * @private
+ * @param {Object} object The object to iterate over.
+ * @param {Function} iteratee The function invoked per iteration.
+ * @returns {Object} Returns `object`.
+ */
+function baseForOwn(object, iteratee) {
+ return baseFor(object, iteratee, keys);
+}
+
+/**
+ * The base implementation of `_.property` without support for deep paths.
+ *
+ * @private
+ * @param {string} key The key of the property to get.
+ * @returns {Function} Returns the new function.
+ */
+function baseProperty(key) {
+ return function(object) {
+ return object == null ? undefined : object[key];
+ };
+}
+
+/**
+ * Creates a `baseEach` or `baseEachRight` function.
+ *
+ * @private
+ * @param {Function} eachFunc The function to iterate over a collection.
+ * @param {boolean} [fromRight] Specify iterating from right to left.
+ * @returns {Function} Returns the new base function.
+ */
+function createBaseEach(eachFunc, fromRight) {
+ return function(collection, iteratee) {
+ var length = collection ? getLength(collection) : 0;
+ if (!isLength(length)) {
+ return eachFunc(collection, iteratee);
+ }
+ var index = fromRight ? length : -1,
+ iterable = toObject(collection);
+
+ while ((fromRight ? index-- : ++index < length)) {
+ if (iteratee(iterable[index], index, iterable) === false) {
+ break;
+ }
+ }
+ return collection;
+ };
+}
+
+/**
+ * Creates a base function for `_.forIn` or `_.forInRight`.
+ *
+ * @private
+ * @param {boolean} [fromRight] Specify iterating from right to left.
+ * @returns {Function} Returns the new base function.
+ */
+function createBaseFor(fromRight) {
+ return function(object, iteratee, keysFunc) {
+ var iterable = toObject(object),
+ props = keysFunc(object),
+ length = props.length,
+ index = fromRight ? length : -1;
+
+ while ((fromRight ? index-- : ++index < length)) {
+ var key = props[index];
+ if (iteratee(iterable[key], key, iterable) === false) {
+ break;
+ }
+ }
+ return object;
+ };
+}
+
+/**
+ * Gets the "length" property value of `object`.
+ *
+ * **Note:** This function is used to avoid a [JIT bug](https://bugs.webkit.org/show_bug.cgi?id=142792)
+ * that affects Safari on at least iOS 8.1-8.3 ARM64.
+ *
+ * @private
+ * @param {Object} object The object to query.
+ * @returns {*} Returns the "length" value.
+ */
+var getLength = baseProperty('length');
+
+/**
+ * Checks if `value` is a valid array-like length.
+ *
+ * **Note:** This function is based on [`ToLength`](https://people.mozilla.org/~jorendorff/es6-draft.html#sec-tolength).
+ *
+ * @private
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is a valid length, else `false`.
+ */
+function isLength(value) {
+ return typeof value == 'number' && value > -1 && value % 1 == 0 && value <= MAX_SAFE_INTEGER;
+}
+
+/**
+ * Converts `value` to an object if it's not one.
+ *
+ * @private
+ * @param {*} value The value to process.
+ * @returns {Object} Returns the object.
+ */
+function toObject(value) {
+ return isObject(value) ? value : Object(value);
+}
+
+/**
+ * Checks if `value` is the [language type](https://es5.github.io/#x8) of `Object`.
+ * (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`)
+ *
+ * @static
+ * @memberOf _
+ * @category Lang
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is an object, else `false`.
+ * @example
+ *
+ * _.isObject({});
+ * // => true
+ *
+ * _.isObject([1, 2, 3]);
+ * // => true
+ *
+ * _.isObject(1);
+ * // => false
+ */
+function isObject(value) {
+ // Avoid a V8 JIT bug in Chrome 19-20.
+ // See https://code.google.com/p/v8/issues/detail?id=2291 for more details.
+ var type = typeof value;
+ return !!value && (type == 'object' || type == 'function');
+}
+
+module.exports = baseEach;
+
+},{"lodash.keys":51}],51:[function(require,module,exports){
+/**
+ * lodash 3.1.1 (Custom Build) <https://lodash.com/>
+ * Build: `lodash modern modularize exports="npm" -o ./`
+ * Copyright 2012-2015 The Dojo Foundation <http://dojofoundation.org/>
+ * Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>
+ * Copyright 2009-2015 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
+ * Available under MIT license <https://lodash.com/license>
+ */
+var getNative = require('lodash._getnative'),
+ isArguments = require('lodash.isarguments'),
+ isArray = require('lodash.isarray');
+
+/** Used to detect unsigned integer values. */
+var reIsUint = /^\d+$/;
+
+/** Used for native method references. */
+var objectProto = Object.prototype;
+
+/** Used to check objects for own properties. */
+var hasOwnProperty = objectProto.hasOwnProperty;
+
+/* Native method references for those with the same name as other `lodash` methods. */
+var nativeKeys = getNative(Object, 'keys');
+
+/**
+ * Used as the [maximum length](https://people.mozilla.org/~jorendorff/es6-draft.html#sec-number.max_safe_integer)
+ * of an array-like value.
+ */
+var MAX_SAFE_INTEGER = 9007199254740991;
+
+/**
+ * The base implementation of `_.property` without support for deep paths.
+ *
+ * @private
+ * @param {string} key The key of the property to get.
+ * @returns {Function} Returns the new function.
+ */
+function baseProperty(key) {
+ return function(object) {
+ return object == null ? undefined : object[key];
+ };
+}
+
+/**
+ * Gets the "length" property value of `object`.
+ *
+ * **Note:** This function is used to avoid a [JIT bug](https://bugs.webkit.org/show_bug.cgi?id=142792)
+ * that affects Safari on at least iOS 8.1-8.3 ARM64.
+ *
+ * @private
+ * @param {Object} object The object to query.
+ * @returns {*} Returns the "length" value.
+ */
+var getLength = baseProperty('length');
+
+/**
+ * Checks if `value` is array-like.
+ *
+ * @private
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is array-like, else `false`.
+ */
+function isArrayLike(value) {
+ return value != null && isLength(getLength(value));
+}
+
+/**
+ * Checks if `value` is a valid array-like index.
+ *
+ * @private
+ * @param {*} value The value to check.
+ * @param {number} [length=MAX_SAFE_INTEGER] The upper bounds of a valid index.
+ * @returns {boolean} Returns `true` if `value` is a valid index, else `false`.
+ */
+function isIndex(value, length) {
+ value = (typeof value == 'number' || reIsUint.test(value)) ? +value : -1;
+ length = length == null ? MAX_SAFE_INTEGER : length;
+ return value > -1 && value % 1 == 0 && value < length;
+}
+
+/**
+ * Checks if `value` is a valid array-like length.
+ *
+ * **Note:** This function is based on [`ToLength`](https://people.mozilla.org/~jorendorff/es6-draft.html#sec-tolength).
+ *
+ * @private
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is a valid length, else `false`.
+ */
+function isLength(value) {
+ return typeof value == 'number' && value > -1 && value % 1 == 0 && value <= MAX_SAFE_INTEGER;
+}
+
+/**
+ * A fallback implementation of `Object.keys` which creates an array of the
+ * own enumerable property names of `object`.
+ *
+ * @private
+ * @param {Object} object The object to query.
+ * @returns {Array} Returns the array of property names.
+ */
+function shimKeys(object) {
+ var props = keysIn(object),
+ propsLength = props.length,
+ length = propsLength && object.length;
+
+ var allowIndexes = !!length && isLength(length) &&
+ (isArray(object) || isArguments(object));
+
+ var index = -1,
+ result = [];
+
+ while (++index < propsLength) {
+ var key = props[index];
+ if ((allowIndexes && isIndex(key, length)) || hasOwnProperty.call(object, key)) {
+ result.push(key);
+ }
+ }
+ return result;
+}
+
+/**
+ * Checks if `value` is the [language type](https://es5.github.io/#x8) of `Object`.
+ * (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`)
+ *
+ * @static
+ * @memberOf _
+ * @category Lang
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is an object, else `false`.
+ * @example
+ *
+ * _.isObject({});
+ * // => true
+ *
+ * _.isObject([1, 2, 3]);
+ * // => true
+ *
+ * _.isObject(1);
+ * // => false
+ */
+function isObject(value) {
+ // Avoid a V8 JIT bug in Chrome 19-20.
+ // See https://code.google.com/p/v8/issues/detail?id=2291 for more details.
+ var type = typeof value;
+ return !!value && (type == 'object' || type == 'function');
+}
+
+/**
+ * Creates an array of the own enumerable property names of `object`.
+ *
+ * **Note:** Non-object values are coerced to objects. See the
+ * [ES spec](https://people.mozilla.org/~jorendorff/es6-draft.html#sec-object.keys)
+ * for more details.
+ *
+ * @static
+ * @memberOf _
+ * @category Object
+ * @param {Object} object The object to query.
+ * @returns {Array} Returns the array of property names.
+ * @example
+ *
+ * function Foo() {
+ * this.a = 1;
+ * this.b = 2;
+ * }
+ *
+ * Foo.prototype.c = 3;
+ *
+ * _.keys(new Foo);
+ * // => ['a', 'b'] (iteration order is not guaranteed)
+ *
+ * _.keys('hi');
+ * // => ['0', '1']
+ */
+var keys = !nativeKeys ? shimKeys : function(object) {
+ var Ctor = object == null ? null : object.constructor;
+ if ((typeof Ctor == 'function' && Ctor.prototype === object) ||
+ (typeof object != 'function' && isArrayLike(object))) {
+ return shimKeys(object);
+ }
+ return isObject(object) ? nativeKeys(object) : [];
+};
+
+/**
+ * Creates an array of the own and inherited enumerable property names of `object`.
+ *
+ * **Note:** Non-object values are coerced to objects.
+ *
+ * @static
+ * @memberOf _
+ * @category Object
+ * @param {Object} object The object to query.
+ * @returns {Array} Returns the array of property names.
+ * @example
+ *
+ * function Foo() {
+ * this.a = 1;
+ * this.b = 2;
+ * }
+ *
+ * Foo.prototype.c = 3;
+ *
+ * _.keysIn(new Foo);
+ * // => ['a', 'b', 'c'] (iteration order is not guaranteed)
+ */
+function keysIn(object) {
+ if (object == null) {
+ return [];
+ }
+ if (!isObject(object)) {
+ object = Object(object);
+ }
+ var length = object.length;
+ length = (length && isLength(length) &&
+ (isArray(object) || isArguments(object)) && length) || 0;
+
+ var Ctor = object.constructor,
+ index = -1,
+ isProto = typeof Ctor == 'function' && Ctor.prototype === object,
+ result = Array(length),
+ skipIndexes = length > 0;
+
+ while (++index < length) {
+ result[index] = (index + '');
+ }
+ for (var key in object) {
+ if (!(skipIndexes && isIndex(key, length)) &&
+ !(key == 'constructor' && (isProto || !hasOwnProperty.call(object, key)))) {
+ result.push(key);
+ }
+ }
+ return result;
+}
+
+module.exports = keys;
+
+},{"lodash._getnative":52,"lodash.isarguments":53,"lodash.isarray":55}],52:[function(require,module,exports){
+/**
+ * lodash 3.9.0 (Custom Build) <https://lodash.com/>
+ * Build: `lodash modern modularize exports="npm" -o ./`
+ * Copyright 2012-2015 The Dojo Foundation <http://dojofoundation.org/>
+ * Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>
+ * Copyright 2009-2015 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
+ * Available under MIT license <https://lodash.com/license>
+ */
+
+/** `Object#toString` result references. */
+var funcTag = '[object Function]';
+
+/**
+ * Used to match `RegExp` [special characters](http://www.regular-expressions.info/characters.html#special).
+ * In addition to special characters the forward slash is escaped to allow for
+ * easier `eval` use and `Function` compilation.
+ */
+var reRegExpChars = /[.*+?^${}()|[\]\/\\]/g,
+ reHasRegExpChars = RegExp(reRegExpChars.source);
+
+/** Used to detect host constructors (Safari > 5). */
+var reIsHostCtor = /^\[object .+?Constructor\]$/;
+
+/**
+ * Converts `value` to a string if it's not one. An empty string is returned
+ * for `null` or `undefined` values.
+ *
+ * @private
+ * @param {*} value The value to process.
+ * @returns {string} Returns the string.
+ */
+function baseToString(value) {
+ if (typeof value == 'string') {
+ return value;
+ }
+ return value == null ? '' : (value + '');
+}
+
+/**
+ * Checks if `value` is object-like.
+ *
+ * @private
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is object-like, else `false`.
+ */
+function isObjectLike(value) {
+ return !!value && typeof value == 'object';
+}
+
+/** Used for native method references. */
+var objectProto = Object.prototype;
+
+/** Used to resolve the decompiled source of functions. */
+var fnToString = Function.prototype.toString;
+
+/** Used to check objects for own properties. */
+var hasOwnProperty = objectProto.hasOwnProperty;
+
+/**
+ * Used to resolve the [`toStringTag`](https://people.mozilla.org/~jorendorff/es6-draft.html#sec-object.prototype.tostring)
+ * of values.
+ */
+var objToString = objectProto.toString;
+
+/** Used to detect if a method is native. */
+var reIsNative = RegExp('^' +
+ escapeRegExp(fnToString.call(hasOwnProperty))
+ .replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, '$1.*?') + '$'
+);
+
+/**
+ * Gets the native function at `key` of `object`.
+ *
+ * @private
+ * @param {Object} object The object to query.
+ * @param {string} key The key of the method to get.
+ * @returns {*} Returns the function if it's native, else `undefined`.
+ */
+function getNative(object, key) {
+ var value = object == null ? undefined : object[key];
+ return isNative(value) ? value : undefined;
+}
+
+/**
+ * Checks if `value` is a native function.
+ *
+ * @static
+ * @memberOf _
+ * @category Lang
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is a native function, else `false`.
+ * @example
+ *
+ * _.isNative(Array.prototype.push);
+ * // => true
+ *
+ * _.isNative(_);
+ * // => false
+ */
+function isNative(value) {
+ if (value == null) {
+ return false;
+ }
+ if (objToString.call(value) == funcTag) {
+ return reIsNative.test(fnToString.call(value));
+ }
+ return isObjectLike(value) && reIsHostCtor.test(value);
+}
+
+/**
+ * Escapes the `RegExp` special characters "\", "/", "^", "$", ".", "|", "?",
+ * "*", "+", "(", ")", "[", "]", "{" and "}" in `string`.
+ *
+ * @static
+ * @memberOf _
+ * @category String
+ * @param {string} [string=''] The string to escape.
+ * @returns {string} Returns the escaped string.
+ * @example
+ *
+ * _.escapeRegExp('[lodash](https://lodash.com/)');
+ * // => '\[lodash\]\(https:\/\/lodash\.com\/\)'
+ */
+function escapeRegExp(string) {
+ string = baseToString(string);
+ return (string && reHasRegExpChars.test(string))
+ ? string.replace(reRegExpChars, '\\$&')
+ : string;
+}
+
+module.exports = getNative;
+
+},{}],53:[function(require,module,exports){
+/**
+ * lodash 3.0.3 (Custom Build) <https://lodash.com/>
+ * Build: `lodash modern modularize exports="npm" -o ./`
+ * Copyright 2012-2015 The Dojo Foundation <http://dojofoundation.org/>
+ * Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>
+ * Copyright 2009-2015 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
+ * Available under MIT license <https://lodash.com/license>
+ */
+
+/** `Object#toString` result references. */
+var argsTag = '[object Arguments]';
+
+/**
+ * Checks if `value` is object-like.
+ *
+ * @private
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is object-like, else `false`.
+ */
+function isObjectLike(value) {
+ return !!value && typeof value == 'object';
+}
+
+/** Used for native method references. */
+var objectProto = Object.prototype;
+
+/**
+ * Used to resolve the [`toStringTag`](https://people.mozilla.org/~jorendorff/es6-draft.html#sec-object.prototype.tostring)
+ * of values.
+ */
+var objToString = objectProto.toString;
+
+/**
+ * Used as the [maximum length](https://people.mozilla.org/~jorendorff/es6-draft.html#sec-number.max_safe_integer)
+ * of an array-like value.
+ */
+var MAX_SAFE_INTEGER = 9007199254740991;
+
+/**
+ * The base implementation of `_.property` without support for deep paths.
+ *
+ * @private
+ * @param {string} key The key of the property to get.
+ * @returns {Function} Returns the new function.
+ */
+function baseProperty(key) {
+ return function(object) {
+ return object == null ? undefined : object[key];
+ };
+}
+
+/**
+ * Gets the "length" property value of `object`.
+ *
+ * **Note:** This function is used to avoid a [JIT bug](https://bugs.webkit.org/show_bug.cgi?id=142792)
+ * that affects Safari on at least iOS 8.1-8.3 ARM64.
+ *
+ * @private
+ * @param {Object} object The object to query.
+ * @returns {*} Returns the "length" value.
+ */
+var getLength = baseProperty('length');
+
+/**
+ * Checks if `value` is array-like.
+ *
+ * @private
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is array-like, else `false`.
+ */
+function isArrayLike(value) {
+ return value != null && isLength(getLength(value));
+}
+
+/**
+ * Checks if `value` is a valid array-like length.
+ *
+ * **Note:** This function is based on [`ToLength`](https://people.mozilla.org/~jorendorff/es6-draft.html#sec-tolength).
+ *
+ * @private
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is a valid length, else `false`.
+ */
+function isLength(value) {
+ return typeof value == 'number' && value > -1 && value % 1 == 0 && value <= MAX_SAFE_INTEGER;
+}
+
+/**
+ * Checks if `value` is classified as an `arguments` object.
+ *
+ * @static
+ * @memberOf _
+ * @category Lang
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is correctly classified, else `false`.
+ * @example
+ *
+ * _.isArguments(function() { return arguments; }());
+ * // => true
+ *
+ * _.isArguments([1, 2, 3]);
+ * // => false
+ */
+function isArguments(value) {
+ return isObjectLike(value) && isArrayLike(value) && objToString.call(value) == argsTag;
+}
+
+module.exports = isArguments;
+
+},{}],54:[function(require,module,exports){
+/**
+ * lodash 3.0.1 (Custom Build) <https://lodash.com/>
+ * Build: `lodash modern modularize exports="npm" -o ./`
+ * Copyright 2012-2015 The Dojo Foundation <http://dojofoundation.org/>
+ * Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>
+ * Copyright 2009-2015 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
+ * Available under MIT license <https://lodash.com/license>
+ */
+
+/**
+ * A specialized version of `baseCallback` which only supports `this` binding
+ * and specifying the number of arguments to provide to `func`.
+ *
+ * @private
+ * @param {Function} func The function to bind.
+ * @param {*} thisArg The `this` binding of `func`.
+ * @param {number} [argCount] The number of arguments to provide to `func`.
+ * @returns {Function} Returns the callback.
+ */
+function bindCallback(func, thisArg, argCount) {
+ if (typeof func != 'function') {
+ return identity;
+ }
+ if (thisArg === undefined) {
+ return func;
+ }
+ switch (argCount) {
+ case 1: return function(value) {
+ return func.call(thisArg, value);
+ };
+ case 3: return function(value, index, collection) {
+ return func.call(thisArg, value, index, collection);
+ };
+ case 4: return function(accumulator, value, index, collection) {
+ return func.call(thisArg, accumulator, value, index, collection);
+ };
+ case 5: return function(value, other, key, object, source) {
+ return func.call(thisArg, value, other, key, object, source);
+ };
+ }
+ return function() {
+ return func.apply(thisArg, arguments);
+ };
+}
+
+/**
+ * This method returns the first argument provided to it.
+ *
+ * @static
+ * @memberOf _
+ * @category Utility
+ * @param {*} value Any value.
+ * @returns {*} Returns `value`.
+ * @example
+ *
+ * var object = { 'user': 'fred' };
+ *
+ * _.identity(object) === object;
+ * // => true
+ */
+function identity(value) {
+ return value;
+}
+
+module.exports = bindCallback;
+
+},{}],55:[function(require,module,exports){
+/**
+ * lodash 3.0.3 (Custom Build) <https://lodash.com/>
+ * Build: `lodash modern modularize exports="npm" -o ./`
+ * Copyright 2012-2015 The Dojo Foundation <http://dojofoundation.org/>
+ * Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>
+ * Copyright 2009-2015 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
+ * Available under MIT license <https://lodash.com/license>
+ */
+
+/** `Object#toString` result references. */
+var arrayTag = '[object Array]',
+ funcTag = '[object Function]';
+
+/**
+ * Used to match `RegExp` [special characters](http://www.regular-expressions.info/characters.html#special).
+ * In addition to special characters the forward slash is escaped to allow for
+ * easier `eval` use and `Function` compilation.
+ */
+var reRegExpChars = /[.*+?^${}()|[\]\/\\]/g,
+ reHasRegExpChars = RegExp(reRegExpChars.source);
+
+/** Used to detect host constructors (Safari > 5). */
+var reIsHostCtor = /^\[object .+?Constructor\]$/;
+
+/**
+ * Converts `value` to a string if it's not one. An empty string is returned
+ * for `null` or `undefined` values.
+ *
+ * @private
+ * @param {*} value The value to process.
+ * @returns {string} Returns the string.
+ */
+function baseToString(value) {
+ if (typeof value == 'string') {
+ return value;
+ }
+ return value == null ? '' : (value + '');
+}
+
+/**
+ * Checks if `value` is object-like.
+ *
+ * @private
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is object-like, else `false`.
+ */
+function isObjectLike(value) {
+ return !!value && typeof value == 'object';
+}
+
+/** Used for native method references. */
+var objectProto = Object.prototype;
+
+/** Used to resolve the decompiled source of functions. */
+var fnToString = Function.prototype.toString;
+
+/** Used to check objects for own properties. */
+var hasOwnProperty = objectProto.hasOwnProperty;
+
+/**
+ * Used to resolve the [`toStringTag`](https://people.mozilla.org/~jorendorff/es6-draft.html#sec-object.prototype.tostring)
+ * of values.
+ */
+var objToString = objectProto.toString;
+
+/** Used to detect if a method is native. */
+var reIsNative = RegExp('^' +
+ escapeRegExp(fnToString.call(hasOwnProperty))
+ .replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, '$1.*?') + '$'
+);
+
+/* Native method references for those with the same name as other `lodash` methods. */
+var nativeIsArray = getNative(Array, 'isArray');
+
+/**
+ * Used as the [maximum length](https://people.mozilla.org/~jorendorff/es6-draft.html#sec-number.max_safe_integer)
+ * of an array-like value.
+ */
+var MAX_SAFE_INTEGER = 9007199254740991;
+
+/**
+ * Gets the native function at `key` of `object`.
+ *
+ * @private
+ * @param {Object} object The object to query.
+ * @param {string} key The key of the method to get.
+ * @returns {*} Returns the function if it's native, else `undefined`.
+ */
+function getNative(object, key) {
+ var value = object == null ? undefined : object[key];
+ return isNative(value) ? value : undefined;
+}
+
+/**
+ * Checks if `value` is a valid array-like length.
+ *
+ * **Note:** This function is based on [`ToLength`](https://people.mozilla.org/~jorendorff/es6-draft.html#sec-tolength).
+ *
+ * @private
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is a valid length, else `false`.
+ */
+function isLength(value) {
+ return typeof value == 'number' && value > -1 && value % 1 == 0 && value <= MAX_SAFE_INTEGER;
+}
+
+/**
+ * Checks if `value` is classified as an `Array` object.
+ *
+ * @static
+ * @memberOf _
+ * @category Lang
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is correctly classified, else `false`.
+ * @example
+ *
+ * _.isArray([1, 2, 3]);
+ * // => true
+ *
+ * _.isArray(function() { return arguments; }());
+ * // => false
+ */
+var isArray = nativeIsArray || function(value) {
+ return isObjectLike(value) && isLength(value.length) && objToString.call(value) == arrayTag;
+};
+
+/**
+ * Checks if `value` is a native function.
+ *
+ * @static
+ * @memberOf _
+ * @category Lang
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is a native function, else `false`.
+ * @example
+ *
+ * _.isNative(Array.prototype.push);
+ * // => true
+ *
+ * _.isNative(_);
+ * // => false
+ */
+function isNative(value) {
+ if (value == null) {
+ return false;
+ }
+ if (objToString.call(value) == funcTag) {
+ return reIsNative.test(fnToString.call(value));
+ }
+ return isObjectLike(value) && reIsHostCtor.test(value);
+}
+
+/**
+ * Escapes the `RegExp` special characters "\", "/", "^", "$", ".", "|", "?",
+ * "*", "+", "(", ")", "[", "]", "{" and "}" in `string`.
+ *
+ * @static
+ * @memberOf _
+ * @category String
+ * @param {string} [string=''] The string to escape.
+ * @returns {string} Returns the escaped string.
+ * @example
+ *
+ * _.escapeRegExp('[lodash](https://lodash.com/)');
+ * // => '\[lodash\]\(https:\/\/lodash\.com\/\)'
+ */
+function escapeRegExp(string) {
+ string = baseToString(string);
+ return (string && reHasRegExpChars.test(string))
+ ? string.replace(reRegExpChars, '\\$&')
+ : string;
+}
+
+module.exports = isArray;
+
+},{}],56:[function(require,module,exports){
+/**
+ * lodash 3.1.2 (Custom Build) <https://lodash.com/>
+ * Build: `lodash modern modularize exports="npm" -o ./`
+ * Copyright 2012-2015 The Dojo Foundation <http://dojofoundation.org/>
+ * Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>
+ * Copyright 2009-2015 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
+ * Available under MIT license <https://lodash.com/license>
+ */
+var baseGet = require('lodash._baseget'),
+ toPath = require('lodash._topath'),
+ isArray = require('lodash.isarray'),
+ map = require('lodash.map');
+
+/** Used to match property names within property paths. */
+var reIsDeepProp = /\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\n\\]|\\.)*?\1)\]/,
+ reIsPlainProp = /^\w*$/;
+
+/**
+ * The base implementation of `_.property` without support for deep paths.
+ *
+ * @private
+ * @param {string} key The key of the property to get.
+ * @returns {Function} Returns the new function.
+ */
+function baseProperty(key) {
+ return function(object) {
+ return object == null ? undefined : object[key];
+ };
+}
+
+/**
+ * A specialized version of `baseProperty` which supports deep paths.
+ *
+ * @private
+ * @param {Array|string} path The path of the property to get.
+ * @returns {Function} Returns the new function.
+ */
+function basePropertyDeep(path) {
+ var pathKey = (path + '');
+ path = toPath(path);
+ return function(object) {
+ return baseGet(object, path, pathKey);
+ };
+}
+
+/**
+ * Checks if `value` is a property name and not a property path.
+ *
+ * @private
+ * @param {*} value The value to check.
+ * @param {Object} [object] The object to query keys on.
+ * @returns {boolean} Returns `true` if `value` is a property name, else `false`.
+ */
+function isKey(value, object) {
+ var type = typeof value;
+ if ((type == 'string' && reIsPlainProp.test(value)) || type == 'number') {
+ return true;
+ }
+ if (isArray(value)) {
+ return false;
+ }
+ var result = !reIsDeepProp.test(value);
+ return result || (object != null && value in toObject(object));
+}
+
+/**
+ * Converts `value` to an object if it's not one.
+ *
+ * @private
+ * @param {*} value The value to process.
+ * @returns {Object} Returns the object.
+ */
+function toObject(value) {
+ return isObject(value) ? value : Object(value);
+}
+
+/**
+ * Gets the property value of `path` from all elements in `collection`.
+ *
+ * @static
+ * @memberOf _
+ * @category Collection
+ * @param {Array|Object|string} collection The collection to iterate over.
+ * @param {Array|string} path The path of the property to pluck.
+ * @returns {Array} Returns the property values.
+ * @example
+ *
+ * var users = [
+ * { 'user': 'barney', 'age': 36 },
+ * { 'user': 'fred', 'age': 40 }
+ * ];
+ *
+ * _.pluck(users, 'user');
+ * // => ['barney', 'fred']
+ *
+ * var userIndex = _.indexBy(users, 'user');
+ * _.pluck(userIndex, 'age');
+ * // => [36, 40] (iteration order is not guaranteed)
+ */
+function pluck(collection, path) {
+ return map(collection, property(path));
+}
+
+/**
+ * Checks if `value` is the [language type](https://es5.github.io/#x8) of `Object`.
+ * (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`)
+ *
+ * @static
+ * @memberOf _
+ * @category Lang
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is an object, else `false`.
+ * @example
+ *
+ * _.isObject({});
+ * // => true
+ *
+ * _.isObject([1, 2, 3]);
+ * // => true
+ *
+ * _.isObject(1);
+ * // => false
+ */
+function isObject(value) {
+ // Avoid a V8 JIT bug in Chrome 19-20.
+ // See https://code.google.com/p/v8/issues/detail?id=2291 for more details.
+ var type = typeof value;
+ return !!value && (type == 'object' || type == 'function');
+}
+
+/**
+ * Creates a function which returns the property value at `path` on a
+ * given object.
+ *
+ * @static
+ * @memberOf _
+ * @category Utility
+ * @param {Array|string} path The path of the property to get.
+ * @returns {Function} Returns the new function.
+ * @example
+ *
+ * var objects = [
+ * { 'a': { 'b': { 'c': 2 } } },
+ * { 'a': { 'b': { 'c': 1 } } }
+ * ];
+ *
+ * _.map(objects, _.property('a.b.c'));
+ * // => [2, 1]
+ *
+ * _.pluck(_.sortBy(objects, _.property(['a', 'b', 'c'])), 'a.b.c');
+ * // => [1, 2]
+ */
+function property(path) {
+ return isKey(path) ? baseProperty(path) : basePropertyDeep(path);
+}
+
+module.exports = pluck;
+
+},{"lodash._baseget":57,"lodash._topath":58,"lodash.isarray":59,"lodash.map":60}],57:[function(require,module,exports){
+/**
+ * lodash 3.7.2 (Custom Build) <https://lodash.com/>
+ * Build: `lodash modern modularize exports="npm" -o ./`
+ * Copyright 2012-2015 The Dojo Foundation <http://dojofoundation.org/>
+ * Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>
+ * Copyright 2009-2015 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
+ * Available under MIT license <https://lodash.com/license>
+ */
+
+/**
+ * The base implementation of `get` without support for string paths
+ * and default values.
+ *
+ * @private
+ * @param {Object} object The object to query.
+ * @param {Array} path The path of the property to get.
+ * @param {string} [pathKey] The key representation of path.
+ * @returns {*} Returns the resolved value.
+ */
+function baseGet(object, path, pathKey) {
+ if (object == null) {
+ return;
+ }
+ if (pathKey !== undefined && pathKey in toObject(object)) {
+ path = [pathKey];
+ }
+ var index = 0,
+ length = path.length;
+
+ while (object != null && index < length) {
+ object = object[path[index++]];
+ }
+ return (index && index == length) ? object : undefined;
+}
+
+/**
+ * Converts `value` to an object if it's not one.
+ *
+ * @private
+ * @param {*} value The value to process.
+ * @returns {Object} Returns the object.
+ */
+function toObject(value) {
+ return isObject(value) ? value : Object(value);
+}
+
+/**
+ * Checks if `value` is the [language type](https://es5.github.io/#x8) of `Object`.
+ * (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`)
+ *
+ * @static
+ * @memberOf _
+ * @category Lang
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is an object, else `false`.
+ * @example
+ *
+ * _.isObject({});
+ * // => true
+ *
+ * _.isObject([1, 2, 3]);
+ * // => true
+ *
+ * _.isObject(1);
+ * // => false
+ */
+function isObject(value) {
+ // Avoid a V8 JIT bug in Chrome 19-20.
+ // See https://code.google.com/p/v8/issues/detail?id=2291 for more details.
+ var type = typeof value;
+ return !!value && (type == 'object' || type == 'function');
+}
+
+module.exports = baseGet;
+
+},{}],58:[function(require,module,exports){
+/**
+ * lodash 3.8.0 (Custom Build) <https://lodash.com/>
+ * Build: `lodash modern modularize exports="npm" -o ./`
+ * Copyright 2012-2015 The Dojo Foundation <http://dojofoundation.org/>
+ * Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>
+ * Copyright 2009-2015 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
+ * Available under MIT license <https://lodash.com/license>
+ */
+var isArray = require('lodash.isarray');
+
+/** Used to match property names within property paths. */
+var rePropName = /[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\n\\]|\\.)*?)\2)\]/g;
+
+/** Used to match backslashes in property paths. */
+var reEscapeChar = /\\(\\)?/g;
+
+/**
+ * Converts `value` to a string if it is not one. An empty string is returned
+ * for `null` or `undefined` values.
+ *
+ * @private
+ * @param {*} value The value to process.
+ * @returns {string} Returns the string.
+ */
+function baseToString(value) {
+ if (typeof value == 'string') {
+ return value;
+ }
+ return value == null ? '' : (value + '');
+}
+
+/**
+ * Converts `value` to property path array if it is not one.
+ *
+ * @private
+ * @param {*} value The value to process.
+ * @returns {Array} Returns the property path array.
+ */
+function toPath(value) {
+ if (isArray(value)) {
+ return value;
+ }
+ var result = [];
+ baseToString(value).replace(rePropName, function(match, number, quote, string) {
+ result.push(quote ? string.replace(reEscapeChar, '$1') : (number || match));
+ });
+ return result;
+}
+
+module.exports = toPath;
+
+},{"lodash.isarray":59}],59:[function(require,module,exports){
+arguments[4][55][0].apply(exports,arguments)
+},{"dup":55}],60:[function(require,module,exports){
+/**
+ * lodash 3.1.4 (Custom Build) <https://lodash.com/>
+ * Build: `lodash modern modularize exports="npm" -o ./`
+ * Copyright 2012-2015 The Dojo Foundation <http://dojofoundation.org/>
+ * Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>
+ * Copyright 2009-2015 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
+ * Available under MIT license <https://lodash.com/license>
+ */
+var arrayMap = require('lodash._arraymap'),
+ baseCallback = require('lodash._basecallback'),
+ baseEach = require('lodash._baseeach'),
+ isArray = require('lodash.isarray');
+
+/**
+ * Used as the [maximum length](https://people.mozilla.org/~jorendorff/es6-draft.html#sec-number.max_safe_integer)
+ * of an array-like value.
+ */
+var MAX_SAFE_INTEGER = 9007199254740991;
+
+/**
+ * The base implementation of `_.map` without support for callback shorthands
+ * and `this` binding.
+ *
+ * @private
+ * @param {Array|Object|string} collection The collection to iterate over.
+ * @param {Function} iteratee The function invoked per iteration.
+ * @returns {Array} Returns the new mapped array.
+ */
+function baseMap(collection, iteratee) {
+ var index = -1,
+ result = isArrayLike(collection) ? Array(collection.length) : [];
+
+ baseEach(collection, function(value, key, collection) {
+ result[++index] = iteratee(value, key, collection);
+ });
+ return result;
+}
+
+/**
+ * The base implementation of `_.property` without support for deep paths.
+ *
+ * @private
+ * @param {string} key The key of the property to get.
+ * @returns {Function} Returns the new function.
+ */
+function baseProperty(key) {
+ return function(object) {
+ return object == null ? undefined : object[key];
+ };
+}
+
+/**
+ * Gets the "length" property value of `object`.
+ *
+ * **Note:** This function is used to avoid a [JIT bug](https://bugs.webkit.org/show_bug.cgi?id=142792)
+ * that affects Safari on at least iOS 8.1-8.3 ARM64.
+ *
+ * @private
+ * @param {Object} object The object to query.
+ * @returns {*} Returns the "length" value.
+ */
+var getLength = baseProperty('length');
+
+/**
+ * Checks if `value` is array-like.
+ *
+ * @private
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is array-like, else `false`.
+ */
+function isArrayLike(value) {
+ return value != null && isLength(getLength(value));
+}
+
+/**
+ * Checks if `value` is a valid array-like length.
+ *
+ * **Note:** This function is based on [`ToLength`](https://people.mozilla.org/~jorendorff/es6-draft.html#sec-tolength).
+ *
+ * @private
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is a valid length, else `false`.
+ */
+function isLength(value) {
+ return typeof value == 'number' && value > -1 && value % 1 == 0 && value <= MAX_SAFE_INTEGER;
+}
+
+/**
+ * Creates an array of values by running each element in `collection` through
+ * `iteratee`. The `iteratee` is bound to `thisArg` and invoked with three
+ * arguments: (value, index|key, collection).
+ *
+ * If a property name is provided for `iteratee` the created `_.property`
+ * style callback returns the property value of the given element.
+ *
+ * If a value is also provided for `thisArg` the created `_.matchesProperty`
+ * style callback returns `true` for elements that have a matching property
+ * value, else `false`.
+ *
+ * If an object is provided for `iteratee` the created `_.matches` style
+ * callback returns `true` for elements that have the properties of the given
+ * object, else `false`.
+ *
+ * Many lodash methods are guarded to work as iteratees for methods like
+ * `_.every`, `_.filter`, `_.map`, `_.mapValues`, `_.reject`, and `_.some`.
+ *
+ * The guarded methods are:
+ * `ary`, `callback`, `chunk`, `clone`, `create`, `curry`, `curryRight`,
+ * `drop`, `dropRight`, `every`, `fill`, `flatten`, `invert`, `max`, `min`,
+ * `parseInt`, `slice`, `sortBy`, `take`, `takeRight`, `template`, `trim`,
+ * `trimLeft`, `trimRight`, `trunc`, `random`, `range`, `sample`, `some`,
+ * `sum`, `uniq`, and `words`
+ *
+ * @static
+ * @memberOf _
+ * @alias collect
+ * @category Collection
+ * @param {Array|Object|string} collection The collection to iterate over.
+ * @param {Function|Object|string} [iteratee=_.identity] The function invoked
+ * per iteration.
+ * @param {*} [thisArg] The `this` binding of `iteratee`.
+ * @returns {Array} Returns the new mapped array.
+ * @example
+ *
+ * function timesThree(n) {
+ * return n * 3;
+ * }
+ *
+ * _.map([1, 2], timesThree);
+ * // => [3, 6]
+ *
+ * _.map({ 'a': 1, 'b': 2 }, timesThree);
+ * // => [3, 6] (iteration order is not guaranteed)
+ *
+ * var users = [
+ * { 'user': 'barney' },
+ * { 'user': 'fred' }
+ * ];
+ *
+ * // using the `_.property` callback shorthand
+ * _.map(users, 'user');
+ * // => ['barney', 'fred']
+ */
+function map(collection, iteratee, thisArg) {
+ var func = isArray(collection) ? arrayMap : baseMap;
+ iteratee = baseCallback(iteratee, thisArg, 3);
+ return func(collection, iteratee);
+}
+
+module.exports = map;
+
+},{"lodash._arraymap":61,"lodash._basecallback":62,"lodash._baseeach":67,"lodash.isarray":59}],61:[function(require,module,exports){
+/**
+ * lodash 3.0.0 (Custom Build) <https://lodash.com/>
+ * Build: `lodash modern modularize exports="npm" -o ./`
+ * Copyright 2012-2015 The Dojo Foundation <http://dojofoundation.org/>
+ * Based on Underscore.js 1.7.0 <http://underscorejs.org/LICENSE>
+ * Copyright 2009-2015 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
+ * Available under MIT license <https://lodash.com/license>
+ */
+
+/**
+ * A specialized version of `_.map` for arrays without support for callback
+ * shorthands or `this` binding.
+ *
+ * @private
+ * @param {Array} array The array to iterate over.
+ * @param {Function} iteratee The function invoked per iteration.
+ * @returns {Array} Returns the new mapped array.
+ */
+function arrayMap(array, iteratee) {
+ var index = -1,
+ length = array.length,
+ result = Array(length);
+
+ while (++index < length) {
+ result[index] = iteratee(array[index], index, array);
+ }
+ return result;
+}
+
+module.exports = arrayMap;
+
+},{}],62:[function(require,module,exports){
+/**
+ * lodash 3.3.0 (Custom Build) <https://lodash.com/>
+ * Build: `lodash modern modularize exports="npm" -o ./`
+ * Copyright 2012-2015 The Dojo Foundation <http://dojofoundation.org/>
+ * Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>
+ * Copyright 2009-2015 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
+ * Available under MIT license <https://lodash.com/license>
+ */
+var baseIsEqual = require('lodash._baseisequal'),
+ bindCallback = require('lodash._bindcallback'),
+ isArray = require('lodash.isarray'),
+ pairs = require('lodash.pairs');
+
+/** Used to match property names within property paths. */
+var reIsDeepProp = /\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\n\\]|\\.)*?\1)\]/,
+ reIsPlainProp = /^\w*$/,
+ rePropName = /[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\n\\]|\\.)*?)\2)\]/g;
+
+/** Used to match backslashes in property paths. */
+var reEscapeChar = /\\(\\)?/g;
+
+/**
+ * Converts `value` to a string if it's not one. An empty string is returned
+ * for `null` or `undefined` values.
+ *
+ * @private
+ * @param {*} value The value to process.
+ * @returns {string} Returns the string.
+ */
+function baseToString(value) {
+ if (typeof value == 'string') {
+ return value;
+ }
+ return value == null ? '' : (value + '');
+}
+
+/**
+ * The base implementation of `_.callback` which supports specifying the
+ * number of arguments to provide to `func`.
+ *
+ * @private
+ * @param {*} [func=_.identity] The value to convert to a callback.
+ * @param {*} [thisArg] The `this` binding of `func`.
+ * @param {number} [argCount] The number of arguments to provide to `func`.
+ * @returns {Function} Returns the callback.
+ */
+function baseCallback(func, thisArg, argCount) {
+ var type = typeof func;
+ if (type == 'function') {
+ return thisArg === undefined
+ ? func
+ : bindCallback(func, thisArg, argCount);
+ }
+ if (func == null) {
+ return identity;
+ }
+ if (type == 'object') {
+ return baseMatches(func);
+ }
+ return thisArg === undefined
+ ? property(func)
+ : baseMatchesProperty(func, thisArg);
+}
+
+/**
+ * The base implementation of `get` without support for string paths
+ * and default values.
+ *
+ * @private
+ * @param {Object} object The object to query.
+ * @param {Array} path The path of the property to get.
+ * @param {string} [pathKey] The key representation of path.
+ * @returns {*} Returns the resolved value.
+ */
+function baseGet(object, path, pathKey) {
+ if (object == null) {
+ return;
+ }
+ if (pathKey !== undefined && pathKey in toObject(object)) {
+ path = [pathKey];
+ }
+ var index = 0,
+ length = path.length;
+
+ while (object != null && index < length) {
+ object = object[path[index++]];
+ }
+ return (index && index == length) ? object : undefined;
+}
+
+/**
+ * The base implementation of `_.isMatch` without support for callback
+ * shorthands and `this` binding.
+ *
+ * @private
+ * @param {Object} object The object to inspect.
+ * @param {Array} matchData The propery names, values, and compare flags to match.
+ * @param {Function} [customizer] The function to customize comparing objects.
+ * @returns {boolean} Returns `true` if `object` is a match, else `false`.
+ */
+function baseIsMatch(object, matchData, customizer) {
+ var index = matchData.length,
+ length = index,
+ noCustomizer = !customizer;
+
+ if (object == null) {
+ return !length;
+ }
+ object = toObject(object);
+ while (index--) {
+ var data = matchData[index];
+ if ((noCustomizer && data[2])
+ ? data[1] !== object[data[0]]
+ : !(data[0] in object)
+ ) {
+ return false;
+ }
+ }
+ while (++index < length) {
+ data = matchData[index];
+ var key = data[0],
+ objValue = object[key],
+ srcValue = data[1];
+
+ if (noCustomizer && data[2]) {
+ if (objValue === undefined && !(key in object)) {
+ return false;
+ }
+ } else {
+ var result = customizer ? customizer(objValue, srcValue, key) : undefined;
+ if (!(result === undefined ? baseIsEqual(srcValue, objValue, customizer, true) : result)) {
+ return false;
+ }
+ }
+ }
+ return true;
+}
+
+/**
+ * The base implementation of `_.matches` which does not clone `source`.
+ *
+ * @private
+ * @param {Object} source The object of property values to match.
+ * @returns {Function} Returns the new function.
+ */
+function baseMatches(source) {
+ var matchData = getMatchData(source);
+ if (matchData.length == 1 && matchData[0][2]) {
+ var key = matchData[0][0],
+ value = matchData[0][1];
+
+ return function(object) {
+ if (object == null) {
+ return false;
+ }
+ return object[key] === value && (value !== undefined || (key in toObject(object)));
+ };
+ }
+ return function(object) {
+ return baseIsMatch(object, matchData);
+ };
+}
+
+/**
+ * The base implementation of `_.matchesProperty` which does not which does
+ * not clone `value`.
+ *
+ * @private
+ * @param {string} path The path of the property to get.
+ * @param {*} srcValue The value to compare.
+ * @returns {Function} Returns the new function.
+ */
+function baseMatchesProperty(path, srcValue) {
+ var isArr = isArray(path),
+ isCommon = isKey(path) && isStrictComparable(srcValue),
+ pathKey = (path + '');
+
+ path = toPath(path);
+ return function(object) {
+ if (object == null) {
+ return false;
+ }
+ var key = pathKey;
+ object = toObject(object);
+ if ((isArr || !isCommon) && !(key in object)) {
+ object = path.length == 1 ? object : baseGet(object, baseSlice(path, 0, -1));
+ if (object == null) {
+ return false;
+ }
+ key = last(path);
+ object = toObject(object);
+ }
+ return object[key] === srcValue
+ ? (srcValue !== undefined || (key in object))
+ : baseIsEqual(srcValue, object[key], undefined, true);
+ };
+}
+
+/**
+ * The base implementation of `_.property` without support for deep paths.
+ *
+ * @private
+ * @param {string} key The key of the property to get.
+ * @returns {Function} Returns the new function.
+ */
+function baseProperty(key) {
+ return function(object) {
+ return object == null ? undefined : object[key];
+ };
+}
+
+/**
+ * A specialized version of `baseProperty` which supports deep paths.
+ *
+ * @private
+ * @param {Array|string} path The path of the property to get.
+ * @returns {Function} Returns the new function.
+ */
+function basePropertyDeep(path) {
+ var pathKey = (path + '');
+ path = toPath(path);
+ return function(object) {
+ return baseGet(object, path, pathKey);
+ };
+}
+
+/**
+ * The base implementation of `_.slice` without an iteratee call guard.
+ *
+ * @private
+ * @param {Array} array The array to slice.
+ * @param {number} [start=0] The start position.
+ * @param {number} [end=array.length] The end position.
+ * @returns {Array} Returns the slice of `array`.
+ */
+function baseSlice(array, start, end) {
+ var index = -1,
+ length = array.length;
+
+ start = start == null ? 0 : (+start || 0);
+ if (start < 0) {
+ start = -start > length ? 0 : (length + start);
+ }
+ end = (end === undefined || end > length) ? length : (+end || 0);
+ if (end < 0) {
+ end += length;
+ }
+ length = start > end ? 0 : ((end - start) >>> 0);
+ start >>>= 0;
+
+ var result = Array(length);
+ while (++index < length) {
+ result[index] = array[index + start];
+ }
+ return result;
+}
+
+/**
+ * Gets the propery names, values, and compare flags of `object`.
+ *
+ * @private
+ * @param {Object} object The object to query.
+ * @returns {Array} Returns the match data of `object`.
+ */
+function getMatchData(object) {
+ var result = pairs(object),
+ length = result.length;
+
+ while (length--) {
+ result[length][2] = isStrictComparable(result[length][1]);
+ }
+ return result;
+}
+
+/**
+ * Checks if `value` is a property name and not a property path.
+ *
+ * @private
+ * @param {*} value The value to check.
+ * @param {Object} [object] The object to query keys on.
+ * @returns {boolean} Returns `true` if `value` is a property name, else `false`.
+ */
+function isKey(value, object) {
+ var type = typeof value;
+ if ((type == 'string' && reIsPlainProp.test(value)) || type == 'number') {
+ return true;
+ }
+ if (isArray(value)) {
+ return false;
+ }
+ var result = !reIsDeepProp.test(value);
+ return result || (object != null && value in toObject(object));
+}
+
+/**
+ * Checks if `value` is suitable for strict equality comparisons, i.e. `===`.
+ *
+ * @private
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` if suitable for strict
+ * equality comparisons, else `false`.
+ */
+function isStrictComparable(value) {
+ return value === value && !isObject(value);
+}
+
+/**
+ * Converts `value` to an object if it's not one.
+ *
+ * @private
+ * @param {*} value The value to process.
+ * @returns {Object} Returns the object.
+ */
+function toObject(value) {
+ return isObject(value) ? value : Object(value);
+}
+
+/**
+ * Converts `value` to property path array if it's not one.
+ *
+ * @private
+ * @param {*} value The value to process.
+ * @returns {Array} Returns the property path array.
+ */
+function toPath(value) {
+ if (isArray(value)) {
+ return value;
+ }
+ var result = [];
+ baseToString(value).replace(rePropName, function(match, number, quote, string) {
+ result.push(quote ? string.replace(reEscapeChar, '$1') : (number || match));
+ });
+ return result;
+}
+
+/**
+ * Gets the last element of `array`.
+ *
+ * @static
+ * @memberOf _
+ * @category Array
+ * @param {Array} array The array to query.
+ * @returns {*} Returns the last element of `array`.
+ * @example
+ *
+ * _.last([1, 2, 3]);
+ * // => 3
+ */
+function last(array) {
+ var length = array ? array.length : 0;
+ return length ? array[length - 1] : undefined;
+}
+
+/**
+ * Checks if `value` is the [language type](https://es5.github.io/#x8) of `Object`.
+ * (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`)
+ *
+ * @static
+ * @memberOf _
+ * @category Lang
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is an object, else `false`.
+ * @example
+ *
+ * _.isObject({});
+ * // => true
+ *
+ * _.isObject([1, 2, 3]);
+ * // => true
+ *
+ * _.isObject(1);
+ * // => false
+ */
+function isObject(value) {
+ // Avoid a V8 JIT bug in Chrome 19-20.
+ // See https://code.google.com/p/v8/issues/detail?id=2291 for more details.
+ var type = typeof value;
+ return !!value && (type == 'object' || type == 'function');
+}
+
+/**
+ * This method returns the first argument provided to it.
+ *
+ * @static
+ * @memberOf _
+ * @category Utility
+ * @param {*} value Any value.
+ * @returns {*} Returns `value`.
+ * @example
+ *
+ * var object = { 'user': 'fred' };
+ *
+ * _.identity(object) === object;
+ * // => true
+ */
+function identity(value) {
+ return value;
+}
+
+/**
+ * Creates a function which returns the property value at `path` on a
+ * given object.
+ *
+ * @static
+ * @memberOf _
+ * @category Utility
+ * @param {Array|string} path The path of the property to get.
+ * @returns {Function} Returns the new function.
+ * @example
+ *
+ * var objects = [
+ * { 'a': { 'b': { 'c': 2 } } },
+ * { 'a': { 'b': { 'c': 1 } } }
+ * ];
+ *
+ * _.map(objects, _.property('a.b.c'));
+ * // => [2, 1]
+ *
+ * _.pluck(_.sortBy(objects, _.property(['a', 'b', 'c'])), 'a.b.c');
+ * // => [1, 2]
+ */
+function property(path) {
+ return isKey(path) ? baseProperty(path) : basePropertyDeep(path);
+}
+
+module.exports = baseCallback;
+
+},{"lodash._baseisequal":63,"lodash._bindcallback":65,"lodash.isarray":59,"lodash.pairs":66}],63:[function(require,module,exports){
+/**
+ * lodash 3.0.7 (Custom Build) <https://lodash.com/>
+ * Build: `lodash modern modularize exports="npm" -o ./`
+ * Copyright 2012-2015 The Dojo Foundation <http://dojofoundation.org/>
+ * Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>
+ * Copyright 2009-2015 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
+ * Available under MIT license <https://lodash.com/license>
+ */
+var isArray = require('lodash.isarray'),
+ isTypedArray = require('lodash.istypedarray'),
+ keys = require('lodash.keys');
+
+/** `Object#toString` result references. */
+var argsTag = '[object Arguments]',
+ arrayTag = '[object Array]',
+ boolTag = '[object Boolean]',
+ dateTag = '[object Date]',
+ errorTag = '[object Error]',
+ numberTag = '[object Number]',
+ objectTag = '[object Object]',
+ regexpTag = '[object RegExp]',
+ stringTag = '[object String]';
+
+/**
+ * Checks if `value` is object-like.
+ *
+ * @private
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is object-like, else `false`.
+ */
+function isObjectLike(value) {
+ return !!value && typeof value == 'object';
+}
+
+/** Used for native method references. */
+var objectProto = Object.prototype;
+
+/** Used to check objects for own properties. */
+var hasOwnProperty = objectProto.hasOwnProperty;
+
+/**
+ * Used to resolve the [`toStringTag`](https://people.mozilla.org/~jorendorff/es6-draft.html#sec-object.prototype.tostring)
+ * of values.
+ */
+var objToString = objectProto.toString;
+
+/**
+ * A specialized version of `_.some` for arrays without support for callback
+ * shorthands and `this` binding.
+ *
+ * @private
+ * @param {Array} array The array to iterate over.
+ * @param {Function} predicate The function invoked per iteration.
+ * @returns {boolean} Returns `true` if any element passes the predicate check,
+ * else `false`.
+ */
+function arraySome(array, predicate) {
+ var index = -1,
+ length = array.length;
+
+ while (++index < length) {
+ if (predicate(array[index], index, array)) {
+ return true;
+ }
+ }
+ return false;
+}
+
+/**
+ * The base implementation of `_.isEqual` without support for `this` binding
+ * `customizer` functions.
+ *
+ * @private
+ * @param {*} value The value to compare.
+ * @param {*} other The other value to compare.
+ * @param {Function} [customizer] The function to customize comparing values.
+ * @param {boolean} [isLoose] Specify performing partial comparisons.
+ * @param {Array} [stackA] Tracks traversed `value` objects.
+ * @param {Array} [stackB] Tracks traversed `other` objects.
+ * @returns {boolean} Returns `true` if the values are equivalent, else `false`.
+ */
+function baseIsEqual(value, other, customizer, isLoose, stackA, stackB) {
+ if (value === other) {
+ return true;
+ }
+ if (value == null || other == null || (!isObject(value) && !isObjectLike(other))) {
+ return value !== value && other !== other;
+ }
+ return baseIsEqualDeep(value, other, baseIsEqual, customizer, isLoose, stackA, stackB);
+}
+
+/**
+ * A specialized version of `baseIsEqual` for arrays and objects which performs
+ * deep comparisons and tracks traversed objects enabling objects with circular
+ * references to be compared.
+ *
+ * @private
+ * @param {Object} object The object to compare.
+ * @param {Object} other The other object to compare.
+ * @param {Function} equalFunc The function to determine equivalents of values.
+ * @param {Function} [customizer] The function to customize comparing objects.
+ * @param {boolean} [isLoose] Specify performing partial comparisons.
+ * @param {Array} [stackA=[]] Tracks traversed `value` objects.
+ * @param {Array} [stackB=[]] Tracks traversed `other` objects.
+ * @returns {boolean} Returns `true` if the objects are equivalent, else `false`.
+ */
+function baseIsEqualDeep(object, other, equalFunc, customizer, isLoose, stackA, stackB) {
+ var objIsArr = isArray(object),
+ othIsArr = isArray(other),
+ objTag = arrayTag,
+ othTag = arrayTag;
+
+ if (!objIsArr) {
+ objTag = objToString.call(object);
+ if (objTag == argsTag) {
+ objTag = objectTag;
+ } else if (objTag != objectTag) {
+ objIsArr = isTypedArray(object);
+ }
+ }
+ if (!othIsArr) {
+ othTag = objToString.call(other);
+ if (othTag == argsTag) {
+ othTag = objectTag;
+ } else if (othTag != objectTag) {
+ othIsArr = isTypedArray(other);
+ }
+ }
+ var objIsObj = objTag == objectTag,
+ othIsObj = othTag == objectTag,
+ isSameTag = objTag == othTag;
+
+ if (isSameTag && !(objIsArr || objIsObj)) {
+ return equalByTag(object, other, objTag);
+ }
+ if (!isLoose) {
+ var objIsWrapped = objIsObj && hasOwnProperty.call(object, '__wrapped__'),
+ othIsWrapped = othIsObj && hasOwnProperty.call(other, '__wrapped__');
+
+ if (objIsWrapped || othIsWrapped) {
+ return equalFunc(objIsWrapped ? object.value() : object, othIsWrapped ? other.value() : other, customizer, isLoose, stackA, stackB);
+ }
+ }
+ if (!isSameTag) {
+ return false;
+ }
+ // Assume cyclic values are equal.
+ // For more information on detecting circular references see https://es5.github.io/#JO.
+ stackA || (stackA = []);
+ stackB || (stackB = []);
+
+ var length = stackA.length;
+ while (length--) {
+ if (stackA[length] == object) {
+ return stackB[length] == other;
+ }
+ }
+ // Add `object` and `other` to the stack of traversed objects.
+ stackA.push(object);
+ stackB.push(other);
+
+ var result = (objIsArr ? equalArrays : equalObjects)(object, other, equalFunc, customizer, isLoose, stackA, stackB);
+
+ stackA.pop();
+ stackB.pop();
+
+ return result;
+}
+
+/**
+ * A specialized version of `baseIsEqualDeep` for arrays with support for
+ * partial deep comparisons.
+ *
+ * @private
+ * @param {Array} array The array to compare.
+ * @param {Array} other The other array to compare.
+ * @param {Function} equalFunc The function to determine equivalents of values.
+ * @param {Function} [customizer] The function to customize comparing arrays.
+ * @param {boolean} [isLoose] Specify performing partial comparisons.
+ * @param {Array} [stackA] Tracks traversed `value` objects.
+ * @param {Array} [stackB] Tracks traversed `other` objects.
+ * @returns {boolean} Returns `true` if the arrays are equivalent, else `false`.
+ */
+function equalArrays(array, other, equalFunc, customizer, isLoose, stackA, stackB) {
+ var index = -1,
+ arrLength = array.length,
+ othLength = other.length;
+
+ if (arrLength != othLength && !(isLoose && othLength > arrLength)) {
+ return false;
+ }
+ // Ignore non-index properties.
+ while (++index < arrLength) {
+ var arrValue = array[index],
+ othValue = other[index],
+ result = customizer ? customizer(isLoose ? othValue : arrValue, isLoose ? arrValue : othValue, index) : undefined;
+
+ if (result !== undefined) {
+ if (result) {
+ continue;
+ }
+ return false;
+ }
+ // Recursively compare arrays (susceptible to call stack limits).
+ if (isLoose) {
+ if (!arraySome(other, function(othValue) {
+ return arrValue === othValue || equalFunc(arrValue, othValue, customizer, isLoose, stackA, stackB);
+ })) {
+ return false;
+ }
+ } else if (!(arrValue === othValue || equalFunc(arrValue, othValue, customizer, isLoose, stackA, stackB))) {
+ return false;
+ }
+ }
+ return true;
+}
+
+/**
+ * A specialized version of `baseIsEqualDeep` for comparing objects of
+ * the same `toStringTag`.
+ *
+ * **Note:** This function only supports comparing values with tags of
+ * `Boolean`, `Date`, `Error`, `Number`, `RegExp`, or `String`.
+ *
+ * @private
+ * @param {Object} value The object to compare.
+ * @param {Object} other The other object to compare.
+ * @param {string} tag The `toStringTag` of the objects to compare.
+ * @returns {boolean} Returns `true` if the objects are equivalent, else `false`.
+ */
+function equalByTag(object, other, tag) {
+ switch (tag) {
+ case boolTag:
+ case dateTag:
+ // Coerce dates and booleans to numbers, dates to milliseconds and booleans
+ // to `1` or `0` treating invalid dates coerced to `NaN` as not equal.
+ return +object == +other;
+
+ case errorTag:
+ return object.name == other.name && object.message == other.message;
+
+ case numberTag:
+ // Treat `NaN` vs. `NaN` as equal.
+ return (object != +object)
+ ? other != +other
+ : object == +other;
+
+ case regexpTag:
+ case stringTag:
+ // Coerce regexes to strings and treat strings primitives and string
+ // objects as equal. See https://es5.github.io/#x15.10.6.4 for more details.
+ return object == (other + '');
+ }
+ return false;
+}
+
+/**
+ * A specialized version of `baseIsEqualDeep` for objects with support for
+ * partial deep comparisons.
+ *
+ * @private
+ * @param {Object} object The object to compare.
+ * @param {Object} other The other object to compare.
+ * @param {Function} equalFunc The function to determine equivalents of values.
+ * @param {Function} [customizer] The function to customize comparing values.
+ * @param {boolean} [isLoose] Specify performing partial comparisons.
+ * @param {Array} [stackA] Tracks traversed `value` objects.
+ * @param {Array} [stackB] Tracks traversed `other` objects.
+ * @returns {boolean} Returns `true` if the objects are equivalent, else `false`.
+ */
+function equalObjects(object, other, equalFunc, customizer, isLoose, stackA, stackB) {
+ var objProps = keys(object),
+ objLength = objProps.length,
+ othProps = keys(other),
+ othLength = othProps.length;
+
+ if (objLength != othLength && !isLoose) {
+ return false;
+ }
+ var index = objLength;
+ while (index--) {
+ var key = objProps[index];
+ if (!(isLoose ? key in other : hasOwnProperty.call(other, key))) {
+ return false;
+ }
+ }
+ var skipCtor = isLoose;
+ while (++index < objLength) {
+ key = objProps[index];
+ var objValue = object[key],
+ othValue = other[key],
+ result = customizer ? customizer(isLoose ? othValue : objValue, isLoose? objValue : othValue, key) : undefined;
+
+ // Recursively compare objects (susceptible to call stack limits).
+ if (!(result === undefined ? equalFunc(objValue, othValue, customizer, isLoose, stackA, stackB) : result)) {
+ return false;
+ }
+ skipCtor || (skipCtor = key == 'constructor');
+ }
+ if (!skipCtor) {
+ var objCtor = object.constructor,
+ othCtor = other.constructor;
+
+ // Non `Object` object instances with different constructors are not equal.
+ if (objCtor != othCtor &&
+ ('constructor' in object && 'constructor' in other) &&
+ !(typeof objCtor == 'function' && objCtor instanceof objCtor &&
+ typeof othCtor == 'function' && othCtor instanceof othCtor)) {
+ return false;
+ }
+ }
+ return true;
+}
+
+/**
+ * Checks if `value` is the [language type](https://es5.github.io/#x8) of `Object`.
+ * (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`)
+ *
+ * @static
+ * @memberOf _
+ * @category Lang
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is an object, else `false`.
+ * @example
+ *
+ * _.isObject({});
+ * // => true
+ *
+ * _.isObject([1, 2, 3]);
+ * // => true
+ *
+ * _.isObject(1);
+ * // => false
+ */
+function isObject(value) {
+ // Avoid a V8 JIT bug in Chrome 19-20.
+ // See https://code.google.com/p/v8/issues/detail?id=2291 for more details.
+ var type = typeof value;
+ return !!value && (type == 'object' || type == 'function');
+}
+
+module.exports = baseIsEqual;
+
+},{"lodash.isarray":59,"lodash.istypedarray":64,"lodash.keys":68}],64:[function(require,module,exports){
+/**
+ * lodash 3.0.2 (Custom Build) <https://lodash.com/>
+ * Build: `lodash modern modularize exports="npm" -o ./`
+ * Copyright 2012-2015 The Dojo Foundation <http://dojofoundation.org/>
+ * Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>
+ * Copyright 2009-2015 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
+ * Available under MIT license <https://lodash.com/license>
+ */
+
+/** `Object#toString` result references. */
+var argsTag = '[object Arguments]',
+ arrayTag = '[object Array]',
+ boolTag = '[object Boolean]',
+ dateTag = '[object Date]',
+ errorTag = '[object Error]',
+ funcTag = '[object Function]',
+ mapTag = '[object Map]',
+ numberTag = '[object Number]',
+ objectTag = '[object Object]',
+ regexpTag = '[object RegExp]',
+ setTag = '[object Set]',
+ stringTag = '[object String]',
+ weakMapTag = '[object WeakMap]';
+
+var arrayBufferTag = '[object ArrayBuffer]',
+ float32Tag = '[object Float32Array]',
+ float64Tag = '[object Float64Array]',
+ int8Tag = '[object Int8Array]',
+ int16Tag = '[object Int16Array]',
+ int32Tag = '[object Int32Array]',
+ uint8Tag = '[object Uint8Array]',
+ uint8ClampedTag = '[object Uint8ClampedArray]',
+ uint16Tag = '[object Uint16Array]',
+ uint32Tag = '[object Uint32Array]';
+
+/** Used to identify `toStringTag` values of typed arrays. */
+var typedArrayTags = {};
+typedArrayTags[float32Tag] = typedArrayTags[float64Tag] =
+typedArrayTags[int8Tag] = typedArrayTags[int16Tag] =
+typedArrayTags[int32Tag] = typedArrayTags[uint8Tag] =
+typedArrayTags[uint8ClampedTag] = typedArrayTags[uint16Tag] =
+typedArrayTags[uint32Tag] = true;
+typedArrayTags[argsTag] = typedArrayTags[arrayTag] =
+typedArrayTags[arrayBufferTag] = typedArrayTags[boolTag] =
+typedArrayTags[dateTag] = typedArrayTags[errorTag] =
+typedArrayTags[funcTag] = typedArrayTags[mapTag] =
+typedArrayTags[numberTag] = typedArrayTags[objectTag] =
+typedArrayTags[regexpTag] = typedArrayTags[setTag] =
+typedArrayTags[stringTag] = typedArrayTags[weakMapTag] = false;
+
+/**
+ * Checks if `value` is object-like.
+ *
+ * @private
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is object-like, else `false`.
+ */
+function isObjectLike(value) {
+ return !!value && typeof value == 'object';
+}
+
+/** Used for native method references. */
+var objectProto = Object.prototype;
+
+/**
+ * Used to resolve the [`toStringTag`](https://people.mozilla.org/~jorendorff/es6-draft.html#sec-object.prototype.tostring)
+ * of values.
+ */
+var objToString = objectProto.toString;
+
+/**
+ * Used as the [maximum length](https://people.mozilla.org/~jorendorff/es6-draft.html#sec-number.max_safe_integer)
+ * of an array-like value.
+ */
+var MAX_SAFE_INTEGER = 9007199254740991;
+
+/**
+ * Checks if `value` is a valid array-like length.
+ *
+ * **Note:** This function is based on [`ToLength`](https://people.mozilla.org/~jorendorff/es6-draft.html#sec-tolength).
+ *
+ * @private
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is a valid length, else `false`.
+ */
+function isLength(value) {
+ return typeof value == 'number' && value > -1 && value % 1 == 0 && value <= MAX_SAFE_INTEGER;
+}
+
+/**
+ * Checks if `value` is classified as a typed array.
+ *
+ * @static
+ * @memberOf _
+ * @category Lang
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is correctly classified, else `false`.
+ * @example
+ *
+ * _.isTypedArray(new Uint8Array);
+ * // => true
+ *
+ * _.isTypedArray([]);
+ * // => false
+ */
+function isTypedArray(value) {
+ return isObjectLike(value) && isLength(value.length) && !!typedArrayTags[objToString.call(value)];
+}
+
+module.exports = isTypedArray;
+
+},{}],65:[function(require,module,exports){
+arguments[4][54][0].apply(exports,arguments)
+},{"dup":54}],66:[function(require,module,exports){
+/**
+ * lodash 3.0.1 (Custom Build) <https://lodash.com/>
+ * Build: `lodash modern modularize exports="npm" -o ./`
+ * Copyright 2012-2015 The Dojo Foundation <http://dojofoundation.org/>
+ * Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>
+ * Copyright 2009-2015 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
+ * Available under MIT license <https://lodash.com/license>
+ */
+var keys = require('lodash.keys');
+
+/**
+ * Converts `value` to an object if it's not one.
+ *
+ * @private
+ * @param {*} value The value to process.
+ * @returns {Object} Returns the object.
+ */
+function toObject(value) {
+ return isObject(value) ? value : Object(value);
+}
+
+/**
+ * Checks if `value` is the [language type](https://es5.github.io/#x8) of `Object`.
+ * (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`)
+ *
+ * @static
+ * @memberOf _
+ * @category Lang
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is an object, else `false`.
+ * @example
+ *
+ * _.isObject({});
+ * // => true
+ *
+ * _.isObject([1, 2, 3]);
+ * // => true
+ *
+ * _.isObject(1);
+ * // => false
+ */
+function isObject(value) {
+ // Avoid a V8 JIT bug in Chrome 19-20.
+ // See https://code.google.com/p/v8/issues/detail?id=2291 for more details.
+ var type = typeof value;
+ return !!value && (type == 'object' || type == 'function');
+}
+
+/**
+ * Creates a two dimensional array of the key-value pairs for `object`,
+ * e.g. `[[key1, value1], [key2, value2]]`.
+ *
+ * @static
+ * @memberOf _
+ * @category Object
+ * @param {Object} object The object to query.
+ * @returns {Array} Returns the new array of key-value pairs.
+ * @example
+ *
+ * _.pairs({ 'barney': 36, 'fred': 40 });
+ * // => [['barney', 36], ['fred', 40]] (iteration order is not guaranteed)
+ */
+function pairs(object) {
+ object = toObject(object);
+
+ var index = -1,
+ props = keys(object),
+ length = props.length,
+ result = Array(length);
+
+ while (++index < length) {
+ var key = props[index];
+ result[index] = [key, object[key]];
+ }
+ return result;
+}
+
+module.exports = pairs;
+
+},{"lodash.keys":68}],67:[function(require,module,exports){
+arguments[4][50][0].apply(exports,arguments)
+},{"dup":50,"lodash.keys":68}],68:[function(require,module,exports){
+arguments[4][51][0].apply(exports,arguments)
+},{"dup":51,"lodash._getnative":69,"lodash.isarguments":70,"lodash.isarray":59}],69:[function(require,module,exports){
+arguments[4][52][0].apply(exports,arguments)
+},{"dup":52}],70:[function(require,module,exports){
+arguments[4][53][0].apply(exports,arguments)
+},{"dup":53}],71:[function(require,module,exports){
+var toSDP = require('./lib/tosdp');
+var toJSON = require('./lib/tojson');
+
+
+// Converstion from JSON to SDP
+
+exports.toIncomingSDPOffer = function (session) {
+ return toSDP.toSessionSDP(session, {
+ role: 'responder',
+ direction: 'incoming'
+ });
+};
+exports.toOutgoingSDPOffer = function (session) {
+ return toSDP.toSessionSDP(session, {
+ role: 'initiator',
+ direction: 'outgoing'
+ });
+};
+exports.toIncomingSDPAnswer = function (session) {
+ return toSDP.toSessionSDP(session, {
+ role: 'initiator',
+ direction: 'incoming'
+ });
+};
+exports.toOutgoingSDPAnswer = function (session) {
+ return toSDP.toSessionSDP(session, {
+ role: 'responder',
+ direction: 'outgoing'
+ });
+};
+exports.toIncomingMediaSDPOffer = function (media) {
+ return toSDP.toMediaSDP(media, {
+ role: 'responder',
+ direction: 'incoming'
+ });
+};
+exports.toOutgoingMediaSDPOffer = function (media) {
+ return toSDP.toMediaSDP(media, {
+ role: 'initiator',
+ direction: 'outgoing'
+ });
+};
+exports.toIncomingMediaSDPAnswer = function (media) {
+ return toSDP.toMediaSDP(media, {
+ role: 'initiator',
+ direction: 'incoming'
+ });
+};
+exports.toOutgoingMediaSDPAnswer = function (media) {
+ return toSDP.toMediaSDP(media, {
+ role: 'responder',
+ direction: 'outgoing'
+ });
+};
+exports.toCandidateSDP = toSDP.toCandidateSDP;
+exports.toMediaSDP = toSDP.toMediaSDP;
+exports.toSessionSDP = toSDP.toSessionSDP;
+
+
+// Conversion from SDP to JSON
+
+exports.toIncomingJSONOffer = function (sdp, creators) {
+ return toJSON.toSessionJSON(sdp, {
+ role: 'responder',
+ direction: 'incoming',
+ creators: creators
+ });
+};
+exports.toOutgoingJSONOffer = function (sdp, creators) {
+ return toJSON.toSessionJSON(sdp, {
+ role: 'initiator',
+ direction: 'outgoing',
+ creators: creators
+ });
+};
+exports.toIncomingJSONAnswer = function (sdp, creators) {
+ return toJSON.toSessionJSON(sdp, {
+ role: 'initiator',
+ direction: 'incoming',
+ creators: creators
+ });
+};
+exports.toOutgoingJSONAnswer = function (sdp, creators) {
+ return toJSON.toSessionJSON(sdp, {
+ role: 'responder',
+ direction: 'outgoing',
+ creators: creators
+ });
+};
+exports.toIncomingMediaJSONOffer = function (sdp, creator) {
+ return toJSON.toMediaJSON(sdp, {
+ role: 'responder',
+ direction: 'incoming',
+ creator: creator
+ });
+};
+exports.toOutgoingMediaJSONOffer = function (sdp, creator) {
+ return toJSON.toMediaJSON(sdp, {
+ role: 'initiator',
+ direction: 'outgoing',
+ creator: creator
+ });
+};
+exports.toIncomingMediaJSONAnswer = function (sdp, creator) {
+ return toJSON.toMediaJSON(sdp, {
+ role: 'initiator',
+ direction: 'incoming',
+ creator: creator
+ });
+};
+exports.toOutgoingMediaJSONAnswer = function (sdp, creator) {
+ return toJSON.toMediaJSON(sdp, {
+ role: 'responder',
+ direction: 'outgoing',
+ creator: creator
+ });
+};
+exports.toCandidateJSON = toJSON.toCandidateJSON;
+exports.toMediaJSON = toJSON.toMediaJSON;
+exports.toSessionJSON = toJSON.toSessionJSON;
+
+},{"./lib/tojson":74,"./lib/tosdp":75}],72:[function(require,module,exports){
+exports.lines = function (sdp) {
+ return sdp.split('\r\n').filter(function (line) {
+ return line.length > 0;
+ });
+};
+
+exports.findLine = function (prefix, mediaLines, sessionLines) {
+ var prefixLength = prefix.length;
+ for (var i = 0; i < mediaLines.length; i++) {
+ if (mediaLines[i].substr(0, prefixLength) === prefix) {
+ return mediaLines[i];
+ }
+ }
+ // Continue searching in parent session section
+ if (!sessionLines) {
return false;
+ }
+
+ for (var j = 0; j < sessionLines.length; j++) {
+ if (sessionLines[j].substr(0, prefixLength) === prefix) {
+ return sessionLines[j];
+ }
+ }
+
+ return false;
+};
+
+exports.findLines = function (prefix, mediaLines, sessionLines) {
+ var results = [];
+ var prefixLength = prefix.length;
+ for (var i = 0; i < mediaLines.length; i++) {
+ if (mediaLines[i].substr(0, prefixLength) === prefix) {
+ results.push(mediaLines[i]);
+ }
+ }
+ if (results.length || !sessionLines) {
+ return results;
+ }
+ for (var j = 0; j < sessionLines.length; j++) {
+ if (sessionLines[j].substr(0, prefixLength) === prefix) {
+ results.push(sessionLines[j]);
+ }
+ }
+ return results;
+};
+
+exports.mline = function (line) {
+ var parts = line.substr(2).split(' ');
+ var parsed = {
+ media: parts[0],
+ port: parts[1],
+ proto: parts[2],
+ formats: []
+ };
+ for (var i = 3; i < parts.length; i++) {
+ if (parts[i]) {
+ parsed.formats.push(parts[i]);
+ }
+ }
+ return parsed;
+};
+
+exports.rtpmap = function (line) {
+ var parts = line.substr(9).split(' ');
+ var parsed = {
+ id: parts.shift()
+ };
+
+ parts = parts[0].split('/');
+
+ parsed.name = parts[0];
+ parsed.clockrate = parts[1];
+ parsed.channels = parts.length == 3 ? parts[2] : '1';
+ return parsed;
+};
+
+exports.sctpmap = function (line) {
+ // based on -05 draft
+ var parts = line.substr(10).split(' ');
+ var parsed = {
+ number: parts.shift(),
+ protocol: parts.shift(),
+ streams: parts.shift()
+ };
+ return parsed;
+};
+
+
+exports.fmtp = function (line) {
+ var kv, key, value;
+ var parts = line.substr(line.indexOf(' ') + 1).split(';');
+ var parsed = [];
+ for (var i = 0; i < parts.length; i++) {
+ kv = parts[i].split('=');
+ key = kv[0].trim();
+ value = kv[1];
+ if (key && value) {
+ parsed.push({key: key, value: value});
+ } else if (key) {
+ parsed.push({key: '', value: key});
+ }
+ }
+ return parsed;
+};
+
+exports.crypto = function (line) {
+ var parts = line.substr(9).split(' ');
+ var parsed = {
+ tag: parts[0],
+ cipherSuite: parts[1],
+ keyParams: parts[2],
+ sessionParams: parts.slice(3).join(' ')
+ };
+ return parsed;
+};
+
+exports.fingerprint = function (line) {
+ var parts = line.substr(14).split(' ');
+ return {
+ hash: parts[0],
+ value: parts[1]
+ };
+};
+
+exports.extmap = function (line) {
+ var parts = line.substr(9).split(' ');
+ var parsed = {};
+
+ var idpart = parts.shift();
+ var sp = idpart.indexOf('/');
+ if (sp >= 0) {
+ parsed.id = idpart.substr(0, sp);
+ parsed.senders = idpart.substr(sp + 1);
+ } else {
+ parsed.id = idpart;
+ parsed.senders = 'sendrecv';
+ }
+
+ parsed.uri = parts.shift() || '';
+
+ return parsed;
+};
+
+exports.rtcpfb = function (line) {
+ var parts = line.substr(10).split(' ');
+ var parsed = {};
+ parsed.id = parts.shift();
+ parsed.type = parts.shift();
+ if (parsed.type === 'trr-int') {
+ parsed.value = parts.shift();
+ } else {
+ parsed.subtype = parts.shift() || '';
+ }
+ parsed.parameters = parts;
+ return parsed;
+};
+
+exports.candidate = function (line) {
+ var parts;
+ if (line.indexOf('a=candidate:') === 0) {
+ parts = line.substring(12).split(' ');
+ } else { // no a=candidate
+ parts = line.substring(10).split(' ');
+ }
+
+ var candidate = {
+ foundation: parts[0],
+ component: parts[1],
+ protocol: parts[2].toLowerCase(),
+ priority: parts[3],
+ ip: parts[4],
+ port: parts[5],
+ // skip parts[6] == 'typ'
+ type: parts[7],
+ generation: '0'
+ };
+
+ for (var i = 8; i < parts.length; i += 2) {
+ if (parts[i] === 'raddr') {
+ candidate.relAddr = parts[i + 1];
+ } else if (parts[i] === 'rport') {
+ candidate.relPort = parts[i + 1];
+ } else if (parts[i] === 'generation') {
+ candidate.generation = parts[i + 1];
+ } else if (parts[i] === 'tcptype') {
+ candidate.tcpType = parts[i + 1];
+ }
+ }
+
+ candidate.network = '1';
+
+ return candidate;
+};
+
+exports.sourceGroups = function (lines) {
+ var parsed = [];
+ for (var i = 0; i < lines.length; i++) {
+ var parts = lines[i].substr(13).split(' ');
+ parsed.push({
+ semantics: parts.shift(),
+ sources: parts
+ });
+ }
+ return parsed;
+};
+
+exports.sources = function (lines) {
+ // http://tools.ietf.org/html/rfc5576
+ var parsed = [];
+ var sources = {};
+ for (var i = 0; i < lines.length; i++) {
+ var parts = lines[i].substr(7).split(' ');
+ var ssrc = parts.shift();
+
+ if (!sources[ssrc]) {
+ var source = {
+ ssrc: ssrc,
+ parameters: []
+ };
+ parsed.push(source);
+
+ // Keep an index
+ sources[ssrc] = source;
+ }
+
+ parts = parts.join(' ').split(':');
+ var attribute = parts.shift();
+ var value = parts.join(':') || null;
+
+ sources[ssrc].parameters.push({
+ key: attribute,
+ value: value
+ });
+ }
+
+ return parsed;
+};
+
+exports.groups = function (lines) {
+ // http://tools.ietf.org/html/rfc5888
+ var parsed = [];
+ var parts;
+ for (var i = 0; i < lines.length; i++) {
+ parts = lines[i].substr(8).split(' ');
+ parsed.push({
+ semantics: parts.shift(),
+ contents: parts
+ });
+ }
+ return parsed;
+};
+
+exports.bandwidth = function (line) {
+ var parts = line.substr(2).split(':');
+ var parsed = {};
+ parsed.type = parts.shift();
+ parsed.bandwidth = parts.shift();
+ return parsed;
+};
+
+exports.msid = function (line) {
+ var data = line.substr(7);
+ var parts = data.split(' ');
+ return {
+ msid: data,
+ mslabel: parts[0],
+ label: parts[1]
+ };
+};
+
+},{}],73:[function(require,module,exports){
+module.exports = {
+ initiator: {
+ incoming: {
+ initiator: 'recvonly',
+ responder: 'sendonly',
+ both: 'sendrecv',
+ none: 'inactive',
+ recvonly: 'initiator',
+ sendonly: 'responder',
+ sendrecv: 'both',
+ inactive: 'none'
+ },
+ outgoing: {
+ initiator: 'sendonly',
+ responder: 'recvonly',
+ both: 'sendrecv',
+ none: 'inactive',
+ recvonly: 'responder',
+ sendonly: 'initiator',
+ sendrecv: 'both',
+ inactive: 'none'
+ }
},
- find_lines: function (haystack, needle, sessionpart) {
- var lines = haystack.split('\r\n'),
- needles = [];
- for (var i = 0; i < lines.length; i++) {
- if (lines[i].substring(0, needle.length) == needle)
- needles.push(lines[i]);
- }
- if (needles.length || !sessionpart) {
- return needles;
- }
- // search session part
- lines = sessionpart.split('\r\n');
- for (var j = 0; j < lines.length; j++) {
- if (lines[j].substring(0, needle.length) == needle) {
- needles.push(lines[j]);
+ responder: {
+ incoming: {
+ initiator: 'sendonly',
+ responder: 'recvonly',
+ both: 'sendrecv',
+ none: 'inactive',
+ recvonly: 'responder',
+ sendonly: 'initiator',
+ sendrecv: 'both',
+ inactive: 'none'
+ },
+ outgoing: {
+ initiator: 'recvonly',
+ responder: 'sendonly',
+ both: 'sendrecv',
+ none: 'inactive',
+ recvonly: 'initiator',
+ sendonly: 'responder',
+ sendrecv: 'both',
+ inactive: 'none'
+ }
+ }
+};
+
+},{}],74:[function(require,module,exports){
+var SENDERS = require('./senders');
+var parsers = require('./parsers');
+var idCounter = Math.random();
+
+
+exports._setIdCounter = function (counter) {
+ idCounter = counter;
+};
+
+exports.toSessionJSON = function (sdp, opts) {
+ var i;
+ var creators = opts.creators || [];
+ var role = opts.role || 'initiator';
+ var direction = opts.direction || 'outgoing';
+
+
+ // Divide the SDP into session and media sections.
+ var media = sdp.split('\r\nm=');
+ for (i = 1; i < media.length; i++) {
+ media[i] = 'm=' + media[i];
+ if (i !== media.length - 1) {
+ media[i] += '\r\n';
+ }
+ }
+ var session = media.shift() + '\r\n';
+ var sessionLines = parsers.lines(session);
+ var parsed = {};
+
+ var contents = [];
+ for (i = 0; i < media.length; i++) {
+ contents.push(exports.toMediaJSON(media[i], session, {
+ role: role,
+ direction: direction,
+ creator: creators[i] || 'initiator'
+ }));
+ }
+ parsed.contents = contents;
+
+ var groupLines = parsers.findLines('a=group:', sessionLines);
+ if (groupLines.length) {
+ parsed.groups = parsers.groups(groupLines);
+ }
+
+ return parsed;
+};
+
+exports.toMediaJSON = function (media, session, opts) {
+ var creator = opts.creator || 'initiator';
+ var role = opts.role || 'initiator';
+ var direction = opts.direction || 'outgoing';
+
+ var lines = parsers.lines(media);
+ var sessionLines = parsers.lines(session);
+ var mline = parsers.mline(lines[0]);
+
+ var content = {
+ creator: creator,
+ name: mline.media,
+ description: {
+ descType: 'rtp',
+ media: mline.media,
+ payloads: [],
+ encryption: [],
+ feedback: [],
+ headerExtensions: []
+ },
+ transport: {
+ transType: 'iceUdp',
+ candidates: [],
+ fingerprints: []
+ }
+ };
+ if (mline.media == 'application') {
+ // FIXME: the description is most likely to be independent
+ // of the SDP and should be processed by other parts of the library
+ content.description = {
+ descType: 'datachannel'
+ };
+ content.transport.sctp = [];
+ }
+ var desc = content.description;
+ var trans = content.transport;
+
+ // If we have a mid, use that for the content name instead.
+ var mid = parsers.findLine('a=mid:', lines);
+ if (mid) {
+ content.name = mid.substr(6);
+ }
+
+ if (parsers.findLine('a=sendrecv', lines, sessionLines)) {
+ content.senders = 'both';
+ } else if (parsers.findLine('a=sendonly', lines, sessionLines)) {
+ content.senders = SENDERS[role][direction].sendonly;
+ } else if (parsers.findLine('a=recvonly', lines, sessionLines)) {
+ content.senders = SENDERS[role][direction].recvonly;
+ } else if (parsers.findLine('a=inactive', lines, sessionLines)) {
+ content.senders = 'none';
+ }
+
+ if (desc.descType == 'rtp') {
+ var bandwidth = parsers.findLine('b=', lines);
+ if (bandwidth) {
+ desc.bandwidth = parsers.bandwidth(bandwidth);
+ }
+
+ var ssrc = parsers.findLine('a=ssrc:', lines);
+ if (ssrc) {
+ desc.ssrc = ssrc.substr(7).split(' ')[0];
+ }
+
+ var rtpmapLines = parsers.findLines('a=rtpmap:', lines);
+ rtpmapLines.forEach(function (line) {
+ var payload = parsers.rtpmap(line);
+ payload.parameters = [];
+ payload.feedback = [];
+
+ var fmtpLines = parsers.findLines('a=fmtp:' + payload.id, lines);
+ // There should only be one fmtp line per payload
+ fmtpLines.forEach(function (line) {
+ payload.parameters = parsers.fmtp(line);
+ });
+
+ var fbLines = parsers.findLines('a=rtcp-fb:' + payload.id, lines);
+ fbLines.forEach(function (line) {
+ payload.feedback.push(parsers.rtcpfb(line));
+ });
+
+ desc.payloads.push(payload);
+ });
+
+ var cryptoLines = parsers.findLines('a=crypto:', lines, sessionLines);
+ cryptoLines.forEach(function (line) {
+ desc.encryption.push(parsers.crypto(line));
+ });
+
+ if (parsers.findLine('a=rtcp-mux', lines)) {
+ desc.mux = true;
+ }
+
+ var fbLines = parsers.findLines('a=rtcp-fb:*', lines);
+ fbLines.forEach(function (line) {
+ desc.feedback.push(parsers.rtcpfb(line));
+ });
+
+ var extLines = parsers.findLines('a=extmap:', lines);
+ extLines.forEach(function (line) {
+ var ext = parsers.extmap(line);
+
+ ext.senders = SENDERS[role][direction][ext.senders];
+
+ desc.headerExtensions.push(ext);
+ });
+
+ var ssrcGroupLines = parsers.findLines('a=ssrc-group:', lines);
+ desc.sourceGroups = parsers.sourceGroups(ssrcGroupLines || []);
+
+ var ssrcLines = parsers.findLines('a=ssrc:', lines);
+ var sources = desc.sources = parsers.sources(ssrcLines || []);
+
+ var msidLine = parsers.findLine('a=msid:', lines);
+ if (msidLine) {
+ var msid = parsers.msid(msidLine);
+ ['msid', 'mslabel', 'label'].forEach(function (key) {
+ for (var i = 0; i < sources.length; i++) {
+ var found = false;
+ for (var j = 0; j < sources[i].parameters.length; j++) {
+ if (sources[i].parameters[j].key === key) {
+ found = true;
+ }
+ }
+ if (!found) {
+ sources[i].parameters.push({ key: key, value: msid[key] });
+ }
+ }
+ });
+ }
+
+ if (parsers.findLine('a=x-google-flag:conference', lines, sessionLines)) {
+ desc.googConferenceFlag = true;
+ }
+ }
+
+ // transport specific attributes
+ var fingerprintLines = parsers.findLines('a=fingerprint:', lines, sessionLines);
+ var setup = parsers.findLine('a=setup:', lines, sessionLines);
+ fingerprintLines.forEach(function (line) {
+ var fp = parsers.fingerprint(line);
+ if (setup) {
+ fp.setup = setup.substr(8);
+ }
+ trans.fingerprints.push(fp);
+ });
+
+ var ufragLine = parsers.findLine('a=ice-ufrag:', lines, sessionLines);
+ var pwdLine = parsers.findLine('a=ice-pwd:', lines, sessionLines);
+ if (ufragLine && pwdLine) {
+ trans.ufrag = ufragLine.substr(12);
+ trans.pwd = pwdLine.substr(10);
+ trans.candidates = [];
+
+ var candidateLines = parsers.findLines('a=candidate:', lines, sessionLines);
+ candidateLines.forEach(function (line) {
+ trans.candidates.push(exports.toCandidateJSON(line));
+ });
+ }
+
+ if (desc.descType == 'datachannel') {
+ var sctpmapLines = parsers.findLines('a=sctpmap:', lines);
+ sctpmapLines.forEach(function (line) {
+ var sctp = parsers.sctpmap(line);
+ trans.sctp.push(sctp);
+ });
+ }
+
+ return content;
+};
+
+exports.toCandidateJSON = function (line) {
+ var candidate = parsers.candidate(line.split('\r\n')[0]);
+ candidate.id = (idCounter++).toString(36).substr(0, 12);
+ return candidate;
+};
+
+},{"./parsers":72,"./senders":73}],75:[function(require,module,exports){
+var SENDERS = require('./senders');
+
+
+exports.toSessionSDP = function (session, opts) {
+ var role = opts.role || 'initiator';
+ var direction = opts.direction || 'outgoing';
+ var sid = opts.sid || session.sid || Date.now();
+ var time = opts.time || Date.now();
+
+ var sdp = [
+ 'v=0',
+ 'o=- ' + sid + ' ' + time + ' IN IP4 0.0.0.0',
+ 's=-',
+ 't=0 0'
+ ];
+
+ var groups = session.groups || [];
+ groups.forEach(function (group) {
+ sdp.push('a=group:' + group.semantics + ' ' + group.contents.join(' '));
+ });
+
+ var contents = session.contents || [];
+ contents.forEach(function (content) {
+ sdp.push(exports.toMediaSDP(content, opts));
+ });
+
+ return sdp.join('\r\n') + '\r\n';
+};
+
+exports.toMediaSDP = function (content, opts) {
+ var sdp = [];
+
+ var role = opts.role || 'initiator';
+ var direction = opts.direction || 'outgoing';
+
+ var desc = content.description;
+ var transport = content.transport;
+ var payloads = desc.payloads || [];
+ var fingerprints = (transport && transport.fingerprints) || [];
+
+ var mline = [];
+ if (desc.descType == 'datachannel') {
+ mline.push('application');
+ mline.push('1');
+ mline.push('DTLS/SCTP');
+ if (transport.sctp) {
+ transport.sctp.forEach(function (map) {
+ mline.push(map.number);
+ });
+ }
+ } else {
+ mline.push(desc.media);
+ mline.push('1');
+ if ((desc.encryption && desc.encryption.length > 0) || (fingerprints.length > 0)) {
+ mline.push('RTP/SAVPF');
+ } else {
+ mline.push('RTP/AVPF');
+ }
+ payloads.forEach(function (payload) {
+ mline.push(payload.id);
+ });
+ }
+
+
+ sdp.push('m=' + mline.join(' '));
+
+ sdp.push('c=IN IP4 0.0.0.0');
+ if (desc.bandwidth && desc.bandwidth.type && desc.bandwidth.bandwidth) {
+ sdp.push('b=' + desc.bandwidth.type + ':' + desc.bandwidth.bandwidth);
+ }
+ if (desc.descType == 'rtp') {
+ sdp.push('a=rtcp:1 IN IP4 0.0.0.0');
+ }
+
+ if (transport) {
+ if (transport.ufrag) {
+ sdp.push('a=ice-ufrag:' + transport.ufrag);
+ }
+ if (transport.pwd) {
+ sdp.push('a=ice-pwd:' + transport.pwd);
+ }
+
+ var pushedSetup = false;
+ fingerprints.forEach(function (fingerprint) {
+ sdp.push('a=fingerprint:' + fingerprint.hash + ' ' + fingerprint.value);
+ if (fingerprint.setup && !pushedSetup) {
+ sdp.push('a=setup:' + fingerprint.setup);
}
+ });
+
+ if (transport.sctp) {
+ transport.sctp.forEach(function (map) {
+ sdp.push('a=sctpmap:' + map.number + ' ' + map.protocol + ' ' + map.streams);
+ });
}
- return needles;
- },
- candidateToJingle: function (line) {
- if (line.indexOf('candidate:') === 0) {
- line = 'a=' + line;
- } else if (line.substring(0, 12) != 'a=candidate:') {
- console.log('parseCandidate called with a line that is not a candidate line');
- console.log(line);
- return null;
- }
- if (line.substring(line.length - 2) == '\r\n') // chomp it
- line = line.substring(0, line.length - 2);
- var candidate = {},
- elems = line.split(' '),
- i;
- if (elems[6] != 'typ') {
- console.log('did not find typ in the right place');
- console.log(line);
- return null;
- }
- candidate.foundation = elems[0].substring(12);
- candidate.component = elems[1];
- candidate.protocol = elems[2].toLowerCase();
- candidate.priority = elems[3];
- candidate.ip = elems[4];
- candidate.port = elems[5];
- // elems[6] => "typ"
- candidate.type = elems[7];
- candidate.generation = '0';
-
- for (i = 8; i < elems.length; i += 2) {
- switch (elems[i]) {
- case 'raddr':
- candidate['rel-addr'] = elems[i + 1];
- break;
- case 'rport':
- candidate['rel-port'] = elems[i + 1];
- break;
- case 'generation':
- candidate.generation = elems[i + 1];
- break;
- case 'tcptype':
- candidate.tcptype = elems[i + 1];
- break;
- default: // TODO
- console.log('not translating "' + elems[i] + '" = "' + elems[i + 1] + '"');
+ }
+
+ if (desc.descType == 'rtp') {
+ sdp.push('a=' + (SENDERS[role][direction][content.senders] || 'sendrecv'));
+ }
+ sdp.push('a=mid:' + content.name);
+
+ if (desc.sources && desc.sources.length) {
+ (desc.sources[0].parameters || []).forEach(function (param) {
+ if (param.key === 'msid') {
+ sdp.push('a=msid:' + param.value);
}
+ });
+ }
+
+ if (desc.mux) {
+ sdp.push('a=rtcp-mux');
+ }
+
+ var encryption = desc.encryption || [];
+ encryption.forEach(function (crypto) {
+ sdp.push('a=crypto:' + crypto.tag + ' ' + crypto.cipherSuite + ' ' + crypto.keyParams + (crypto.sessionParams ? ' ' + crypto.sessionParams : ''));
+ });
+ if (desc.googConferenceFlag) {
+ sdp.push('a=x-google-flag:conference');
+ }
+
+ payloads.forEach(function (payload) {
+ var rtpmap = 'a=rtpmap:' + payload.id + ' ' + payload.name + '/' + payload.clockrate;
+ if (payload.channels && payload.channels != '1') {
+ rtpmap += '/' + payload.channels;
}
- candidate.network = '1';
- candidate.id = Math.random().toString(36).substr(2, 10); // not applicable to SDP -- FIXME: should be unique, not just random
- return candidate;
- },
- candidateFromJingle: function (cand) {
- var parts = [
- 'a=candidate:' + cand.getAttribute('foundation'),
- cand.getAttribute('component'),
- cand.getAttribute('protocol'),
- cand.getAttribute('priority'),
- cand.getAttribute('ip'),
- cand.getAttribute('port'),
- 'typ',
- cand.getAttribute('type')
- ];
- switch (cand.getAttribute('type')) {
- case 'srflx':
- case 'prflx':
- case 'relay':
- if (cand.getAttribute('rel-addr') && cand.getAttribute('rel-port')) {
- parts.push('raddr');
- parts.push(cand.getAttribute('rel-addr'));
- parts.push('rport');
- parts.push(cand.getAttribute('rel-port'));
+ sdp.push(rtpmap);
+
+ if (payload.parameters && payload.parameters.length) {
+ var fmtp = ['a=fmtp:' + payload.id];
+ var parameters = [];
+ payload.parameters.forEach(function (param) {
+ parameters.push((param.key ? param.key + '=' : '') + param.value);
+ });
+ fmtp.push(parameters.join(';'));
+ sdp.push(fmtp.join(' '));
+ }
+
+ if (payload.feedback) {
+ payload.feedback.forEach(function (fb) {
+ if (fb.type === 'trr-int') {
+ sdp.push('a=rtcp-fb:' + payload.id + ' trr-int ' + (fb.value ? fb.value : '0'));
+ } else {
+ sdp.push('a=rtcp-fb:' + payload.id + ' ' + fb.type + (fb.subtype ? ' ' + fb.subtype : ''));
+ }
+ });
+ }
+ });
+
+ if (desc.feedback) {
+ desc.feedback.forEach(function (fb) {
+ if (fb.type === 'trr-int') {
+ sdp.push('a=rtcp-fb:* trr-int ' + (fb.value ? fb.value : '0'));
+ } else {
+ sdp.push('a=rtcp-fb:* ' + fb.type + (fb.subtype ? ' ' + fb.subtype : ''));
}
- break;
+ });
+ }
+
+ var hdrExts = desc.headerExtensions || [];
+ hdrExts.forEach(function (hdr) {
+ sdp.push('a=extmap:' + hdr.id + (hdr.senders ? '/' + SENDERS[role][direction][hdr.senders] : '') + ' ' + hdr.uri);
+ });
+
+ var ssrcGroups = desc.sourceGroups || [];
+ ssrcGroups.forEach(function (ssrcGroup) {
+ sdp.push('a=ssrc-group:' + ssrcGroup.semantics + ' ' + ssrcGroup.sources.join(' '));
+ });
+
+ var ssrcs = desc.sources || [];
+ ssrcs.forEach(function (ssrc) {
+ for (var i = 0; i < ssrc.parameters.length; i++) {
+ var param = ssrc.parameters[i];
+ sdp.push('a=ssrc:' + (ssrc.ssrc || desc.ssrc) + ' ' + param.key + (param.value ? (':' + param.value) : ''));
+ }
+ });
+
+ var candidates = transport.candidates || [];
+ candidates.forEach(function (candidate) {
+ sdp.push(exports.toCandidateSDP(candidate));
+ });
+
+ return sdp.join('\r\n');
+};
+
+exports.toCandidateSDP = function (candidate) {
+ var sdp = [];
+
+ sdp.push(candidate.foundation);
+ sdp.push(candidate.component);
+ sdp.push(candidate.protocol.toUpperCase());
+ sdp.push(candidate.priority);
+ sdp.push(candidate.ip);
+ sdp.push(candidate.port);
+
+ var type = candidate.type;
+ sdp.push('typ');
+ sdp.push(type);
+ if (type === 'srflx' || type === 'prflx' || type === 'relay') {
+ if (candidate.relAddr && candidate.relPort) {
+ sdp.push('raddr');
+ sdp.push(candidate.relAddr);
+ sdp.push('rport');
+ sdp.push(candidate.relPort);
}
- parts.push('generation');
- parts.push(cand.getAttribute('generation') || '0');
- return parts.join(' ') + '\r\n';
}
+ if (candidate.tcpType && candidate.protocol.toUpperCase() == 'TCP') {
+ sdp.push('tcptype');
+ sdp.push(candidate.tcpType);
+ }
+
+ sdp.push('generation');
+ sdp.push(candidate.generation || '0');
+
+ // FIXME: apparently this is wrong per spec
+ // but then, we need this when actually putting this into
+ // SDP so it's going to stay.
+ // decision needs to be revisited when browsers dont
+ // accept this any longer
+ return 'a=candidate:' + sdp.join(' ');
};
-}(jQuery));
+},{"./senders":73}],76:[function(require,module,exports){
+// based on https://github.com/ESTOS/strophe.jingle/
+// adds wildemitter support
+var util = require('util');
+var webrtc = require('webrtcsupport');
+var WildEmitter = require('wildemitter');
-/*!
- * Source: lib/strophe.jingle/strophe.jingle.adapter.js, license: MIT, url: https://github.com/ESTOS/strophe.jingle
- */
-/* jshint -W117 */
-var setupRTC, getUserMediaWithConstraints, TraceablePeerConnection;
+function dumpSDP(description) {
+ return {
+ type: description.type,
+ sdp: description.sdp
+ };
+}
+
+function dumpStream(stream) {
+ var info = {
+ label: stream.id,
+ };
+ if (stream.getAudioTracks().length) {
+ info.audio = stream.getAudioTracks().map(function (track) {
+ return track.id;
+ });
+ }
+ if (stream.getVideoTracks().length) {
+ info.video = stream.getVideoTracks().map(function (track) {
+ return track.id;
+ });
+ }
+ return info;
+}
-(function($){
-TraceablePeerConnection = function(ice_config, constraints) {
+function TraceablePeerConnection(config, constraints) {
var self = this;
- var RTCPeerconnection = navigator.mozGetUserMedia ? mozRTCPeerConnection : webkitRTCPeerConnection;
- this.peerconnection = new RTCPeerconnection(ice_config, constraints);
- this.updateLog = [];
- this.stats = {};
- this.statsinterval = null;
- this.maxstats = 300; // limit to 300 values, i.e. 5 minutes; set to 0 to disable
-
- // override as desired
- this.trace = function(what, info) {
- //console.warn('WTRACE', what, info);
- self.updateLog.push({
+ WildEmitter.call(this);
+
+ this.peerconnection = new webrtc.PeerConnection(config, constraints);
+
+ this.trace = function (what, info) {
+ self.emit('PeerConnectionTrace', {
time: new Date(),
type: what,
value: info || ""
});
};
+
this.onicecandidate = null;
this.peerconnection.onicecandidate = function (event) {
- self.trace('onicecandidate', JSON.stringify(event.candidate, null, ' '));
+ self.trace('onicecandidate', event.candidate);
if (self.onicecandidate !== null) {
self.onicecandidate(event);
}
};
this.onaddstream = null;
this.peerconnection.onaddstream = function (event) {
- self.trace('onaddstream', event.stream.id);
+ self.trace('onaddstream', dumpStream(event.stream));
if (self.onaddstream !== null) {
self.onaddstream(event);
}
};
this.onremovestream = null;
this.peerconnection.onremovestream = function (event) {
- self.trace('onremovestream', event.stream.id);
+ self.trace('onremovestream', dumpStream(event.stream));
if (self.onremovestream !== null) {
self.onremovestream(event);
}
@@ -8813,69 +19573,55 @@ TraceablePeerConnection = function(ice_config, constraints) {
self.ondatachannel(event);
}
};
- if (!navigator.mozGetUserMedia) {
- this.statsinterval = window.setInterval(function() {
- self.peerconnection.getStats(function(stats) {
- var results = stats.result();
- for (var i = 0; i < results.length; ++i) {
- //console.log(results[i].type, results[i].id, results[i].names())
- var now = new Date();
- results[i].names().forEach(function (name) {
- var id = results[i].id + '-' + name;
- if (!self.stats[id]) {
- self.stats[id] = {
- startTime: now,
- endTime: now,
- values: [],
- times: []
- };
- }
- self.stats[id].values.push(results[i].stat(name));
- self.stats[id].times.push(now.getTime());
- if (self.stats[id].values.length > self.maxstats) {
- self.stats[id].values.shift();
- self.stats[id].times.shift();
- }
- self.stats[id].endTime = now;
- });
- }
- });
+ this.getLocalStreams = this.peerconnection.getLocalStreams.bind(this.peerconnection);
+ this.getRemoteStreams = this.peerconnection.getRemoteStreams.bind(this.peerconnection);
+}
+
+util.inherits(TraceablePeerConnection, WildEmitter);
- }, 1000);
+Object.defineProperty(TraceablePeerConnection.prototype, 'signalingState', {
+ get: function () {
+ return this.peerconnection.signalingState;
}
-}
+});
-dumpSDP = function(description) {
- return 'type: ' + description.type + '\r\n' + description.sdp;
-};
+Object.defineProperty(TraceablePeerConnection.prototype, 'iceConnectionState', {
+ get: function () {
+ return this.peerconnection.iceConnectionState;
+ }
+});
-['signalingState', 'iceConnectionState', 'localDescription', 'remoteDescription'].forEach(function (prop) {
- Object.defineProperty(TraceablePeerConnection.prototype, prop, {
- get: function () {
- return this.peerconnection[prop]
- }
- });
+Object.defineProperty(TraceablePeerConnection.prototype, 'localDescription', {
+ get: function () {
+ return this.peerconnection.localDescription;
+ }
+});
+
+Object.defineProperty(TraceablePeerConnection.prototype, 'remoteDescription', {
+ get: function () {
+ return this.peerconnection.remoteDescription;
+ }
});
TraceablePeerConnection.prototype.addStream = function (stream) {
- this.trace('addStream', stream.id);
+ this.trace('addStream', dumpStream(stream));
this.peerconnection.addStream(stream);
};
TraceablePeerConnection.prototype.removeStream = function (stream) {
- this.trace('removeStream', stream.id);
+ this.trace('removeStream', dumpStream(stream));
this.peerconnection.removeStream(stream);
};
TraceablePeerConnection.prototype.createDataChannel = function (label, opts) {
this.trace('createDataChannel', label, opts);
- this.peerconnection.createDataChannel(label, opts);
+ return this.peerconnection.createDataChannel(label, opts);
};
TraceablePeerConnection.prototype.setLocalDescription = function (description, successCallback, failureCallback) {
var self = this;
this.trace('setLocalDescription', dumpSDP(description));
- this.peerconnection.setLocalDescription(description,
+ this.peerconnection.setLocalDescription(description,
function () {
self.trace('setLocalDescriptionOnSuccess');
successCallback();
@@ -8885,17 +19631,12 @@ TraceablePeerConnection.prototype.setLocalDescription = function (description, s
failureCallback(err);
}
);
- /*
- if (this.statsinterval === null && this.maxstats > 0) {
- // start gathering stats
- }
- */
};
TraceablePeerConnection.prototype.setRemoteDescription = function (description, successCallback, failureCallback) {
var self = this;
this.trace('setRemoteDescription', dumpSDP(description));
- this.peerconnection.setRemoteDescription(description,
+ this.peerconnection.setRemoteDescription(description,
function () {
self.trace('setRemoteDescriptionOnSuccess');
successCallback();
@@ -8905,11 +19646,6 @@ TraceablePeerConnection.prototype.setRemoteDescription = function (description,
failureCallback(err);
}
);
- /*
- if (this.statsinterval === null && this.maxstats > 0) {
- // start gathering stats
- }
- */
};
TraceablePeerConnection.prototype.close = function () {
@@ -8918,18 +19654,20 @@ TraceablePeerConnection.prototype.close = function () {
window.clearInterval(this.statsinterval);
this.statsinterval = null;
}
- this.peerconnection.close();
+ if (this.peerconnection.signalingState != 'closed') {
+ this.peerconnection.close();
+ }
};
TraceablePeerConnection.prototype.createOffer = function (successCallback, failureCallback, constraints) {
var self = this;
- this.trace('createOffer', JSON.stringify(constraints, null, ' '));
+ this.trace('createOffer', constraints);
this.peerconnection.createOffer(
function (offer) {
self.trace('createOfferOnSuccess', dumpSDP(offer));
successCallback(offer);
},
- function(err) {
+ function (err) {
self.trace('createOfferOnFailure', err);
failureCallback(err);
},
@@ -8939,13 +19677,13 @@ TraceablePeerConnection.prototype.createOffer = function (successCallback, failu
TraceablePeerConnection.prototype.createAnswer = function (successCallback, failureCallback, constraints) {
var self = this;
- this.trace('createAnswer', JSON.stringify(constraints, null, ' '));
+ this.trace('createAnswer', constraints);
this.peerconnection.createAnswer(
function (answer) {
self.trace('createAnswerOnSuccess', dumpSDP(answer));
successCallback(answer);
},
- function(err) {
+ function (err) {
self.trace('createAnswerOnFailure', err);
failureCallback(err);
},
@@ -8955,11 +19693,10 @@ TraceablePeerConnection.prototype.createAnswer = function (successCallback, fail
TraceablePeerConnection.prototype.addIceCandidate = function (candidate, successCallback, failureCallback) {
var self = this;
- this.trace('addIceCandidate', JSON.stringify(candidate, null, ' '));
- this.peerconnection.addIceCandidate(candidate);
- this.peerconnection.addIceCandidate(candidate,
- function () {
- self.trace('addIceCandidateOnSuccess');
+ this.trace('addIceCandidate', candidate);
+ this.peerconnection.addIceCandidate(candidate,
+ function () {
+ //self.trace('addIceCandidateOnSuccess');
if (successCallback) successCallback();
},
function (err) {
@@ -8969,148 +19706,5589 @@ TraceablePeerConnection.prototype.addIceCandidate = function (candidate, success
);
};
-TraceablePeerConnection.prototype.getStats = function(callback) {
+TraceablePeerConnection.prototype.getStats = function (callback, errback) {
if (navigator.mozGetUserMedia) {
- // ignore for now...
+ this.peerconnection.getStats(null, callback, errback);
} else {
this.peerconnection.getStats(callback);
}
};
-// mozilla chrome compat layer -- very similar to adapter.js
-setupRTC = function (){
- var RTC = null;
- if (navigator.mozGetUserMedia && mozRTCPeerConnection) {
- console.log('This appears to be Firefox');
- var version = navigator.userAgent.match(/Firefox/) ? parseInt(navigator.userAgent.match(/Firefox\/([0-9]+)\./)[1], 10) : 0;
- if (version >= 22) {
- RTC = {
- peerconnection: mozRTCPeerConnection,
- browser: 'firefox',
- getUserMedia: navigator.mozGetUserMedia.bind(navigator),
- attachMediaStream: function (element, stream) {
- element[0].mozSrcObject = stream;
- element[0].play();
+module.exports = TraceablePeerConnection;
+
+},{"util":24,"webrtcsupport":112,"wildemitter":113}],77:[function(require,module,exports){
+var util = require('util');
+var each = require('lodash.foreach');
+var pluck = require('lodash.pluck');
+var webrtc = require('webrtcsupport');
+var SJJ = require('sdp-jingle-json');
+var WildEmitter = require('wildemitter');
+var peerconn = require('traceablepeerconnection');
+
+
+function PeerConnection(config, constraints) {
+ var self = this;
+ var item;
+ WildEmitter.call(this);
+
+ config = config || {};
+ config.iceServers = config.iceServers || [];
+
+ // make sure this only gets enabled in Google Chrome
+ // EXPERIMENTAL FLAG, might get removed without notice
+ this.enableChromeNativeSimulcast = false;
+ if (constraints && constraints.optional &&
+ webrtc.prefix === 'webkit' &&
+ navigator.appVersion.match(/Chromium\//) === null) {
+ constraints.optional.forEach(function (constraint, idx) {
+ if (constraint.enableChromeNativeSimulcast) {
+ self.enableChromeNativeSimulcast = true;
+ }
+ });
+ }
+
+ // EXPERIMENTAL FLAG, might get removed without notice
+ this.enableMultiStreamHacks = false;
+ if (constraints && constraints.optional &&
+ webrtc.prefix === 'webkit') {
+ constraints.optional.forEach(function (constraint, idx) {
+ if (constraint.enableMultiStreamHacks) {
+ self.enableMultiStreamHacks = true;
+ }
+ });
+ }
+ // EXPERIMENTAL FLAG, might get removed without notice
+ this.restrictBandwidth = 0;
+ if (constraints && constraints.optional) {
+ constraints.optional.forEach(function (constraint, idx) {
+ if (constraint.andyetRestrictBandwidth) {
+ self.restrictBandwidth = constraint.andyetRestrictBandwidth;
+ }
+ });
+ }
+
+ // EXPERIMENTAL FLAG, might get removed without notice
+ // bundle up ice candidates, only works for jingle mode
+ // number > 0 is the delay to wait for additional candidates
+ // ~20ms seems good
+ this.batchIceCandidates = 0;
+ if (constraints && constraints.optional) {
+ constraints.optional.forEach(function (constraint, idx) {
+ if (constraint.andyetBatchIce) {
+ self.batchIceCandidates = constraint.andyetBatchIce;
+ }
+ });
+ }
+ this.batchedIceCandidates = [];
+
+ // EXPERIMENTAL FLAG, might get removed without notice
+ // this attemps to strip out candidates with an already known foundation
+ // and type -- i.e. those which are gathered via the same TURN server
+ // but different transports (TURN udp, tcp and tls respectively)
+ if (constraints && constraints.optional && webrtc.prefix === 'webkit') {
+ constraints.optional.forEach(function (constraint, idx) {
+ if (constraint.andyetFasterICE) {
+ self.eliminateDuplicateCandidates = constraint.andyetFasterICE;
+ }
+ });
+ }
+ // EXPERIMENTAL FLAG, might get removed without notice
+ // when using a server such as the jitsi videobridge we don't need to signal
+ // our candidates
+ if (constraints && constraints.optional) {
+ constraints.optional.forEach(function (constraint, idx) {
+ if (constraint.andyetDontSignalCandidates) {
+ self.dontSignalCandidates = constraint.andyetDontSignalCandidates;
+ }
+ });
+ }
+
+
+ // EXPERIMENTAL FLAG, might get removed without notice
+ this.assumeSetLocalSuccess = false;
+ if (constraints && constraints.optional) {
+ constraints.optional.forEach(function (constraint, idx) {
+ if (constraint.andyetAssumeSetLocalSuccess) {
+ self.assumeSetLocalSuccess = constraint.andyetAssumeSetLocalSuccess;
+ }
+ });
+ }
+
+ // EXPERIMENTAL FLAG, might get removed without notice
+ // working around https://bugzilla.mozilla.org/show_bug.cgi?id=1087551
+ // pass in a timeout for this
+ if (webrtc.prefix === 'moz') {
+ if (constraints && constraints.optional) {
+ this.wtFirefox = 0;
+ constraints.optional.forEach(function (constraint, idx) {
+ if (constraint.andyetFirefoxMakesMeSad) {
+ self.wtFirefox = constraint.andyetFirefoxMakesMeSad;
+ if (self.wtFirefox > 0) {
+ self.firefoxcandidatebuffer = [];
+ }
+ }
+ });
+ }
+ }
+
+
+ this.pc = new peerconn(config, constraints);
+
+ this.getLocalStreams = this.pc.getLocalStreams.bind(this.pc);
+ this.getRemoteStreams = this.pc.getRemoteStreams.bind(this.pc);
+ this.addStream = this.pc.addStream.bind(this.pc);
+ this.removeStream = this.pc.removeStream.bind(this.pc);
+
+ // proxy events
+ this.pc.on('*', function () {
+ self.emit.apply(self, arguments);
+ });
+
+ // proxy some events directly
+ this.pc.onremovestream = this.emit.bind(this, 'removeStream');
+ this.pc.onaddstream = this.emit.bind(this, 'addStream');
+ this.pc.onnegotiationneeded = this.emit.bind(this, 'negotiationNeeded');
+ this.pc.oniceconnectionstatechange = this.emit.bind(this, 'iceConnectionStateChange');
+ this.pc.onsignalingstatechange = this.emit.bind(this, 'signalingStateChange');
+
+ // handle ice candidate and data channel events
+ this.pc.onicecandidate = this._onIce.bind(this);
+ this.pc.ondatachannel = this._onDataChannel.bind(this);
+
+ this.localDescription = {
+ contents: []
+ };
+ this.remoteDescription = {
+ contents: []
+ };
+
+ this.config = {
+ debug: false,
+ ice: {},
+ sid: '',
+ isInitiator: true,
+ sdpSessionID: Date.now(),
+ useJingle: false
+ };
+
+ // apply our config
+ for (item in config) {
+ this.config[item] = config[item];
+ }
+
+ if (this.config.debug) {
+ this.on('*', function (eventName, event) {
+ var logger = config.logger || console;
+ logger.log('PeerConnection event:', arguments);
+ });
+ }
+ this.hadLocalStunCandidate = false;
+ this.hadRemoteStunCandidate = false;
+ this.hadLocalRelayCandidate = false;
+ this.hadRemoteRelayCandidate = false;
+
+ this.hadLocalIPv6Candidate = false;
+ this.hadRemoteIPv6Candidate = false;
+
+ // keeping references for all our data channels
+ // so they dont get garbage collected
+ // can be removed once the following bugs have been fixed
+ // https://crbug.com/405545
+ // https://bugzilla.mozilla.org/show_bug.cgi?id=964092
+ // to be filed for opera
+ this._remoteDataChannels = [];
+ this._localDataChannels = [];
+
+ this._candidateBuffer = [];
+}
+
+util.inherits(PeerConnection, WildEmitter);
+
+Object.defineProperty(PeerConnection.prototype, 'signalingState', {
+ get: function () {
+ return this.pc.signalingState;
+ }
+});
+Object.defineProperty(PeerConnection.prototype, 'iceConnectionState', {
+ get: function () {
+ return this.pc.iceConnectionState;
+ }
+});
+
+PeerConnection.prototype._role = function () {
+ return this.isInitiator ? 'initiator' : 'responder';
+};
+
+// Add a stream to the peer connection object
+PeerConnection.prototype.addStream = function (stream) {
+ this.localStream = stream;
+ this.pc.addStream(stream);
+};
+
+// helper function to check if a remote candidate is a stun/relay
+// candidate or an ipv6 candidate
+PeerConnection.prototype._checkLocalCandidate = function (candidate) {
+ var cand = SJJ.toCandidateJSON(candidate);
+ if (cand.type == 'srflx') {
+ this.hadLocalStunCandidate = true;
+ } else if (cand.type == 'relay') {
+ this.hadLocalRelayCandidate = true;
+ }
+ if (cand.ip.indexOf(':') != -1) {
+ this.hadLocalIPv6Candidate = true;
+ }
+};
+
+// helper function to check if a remote candidate is a stun/relay
+// candidate or an ipv6 candidate
+PeerConnection.prototype._checkRemoteCandidate = function (candidate) {
+ var cand = SJJ.toCandidateJSON(candidate);
+ if (cand.type == 'srflx') {
+ this.hadRemoteStunCandidate = true;
+ } else if (cand.type == 'relay') {
+ this.hadRemoteRelayCandidate = true;
+ }
+ if (cand.ip.indexOf(':') != -1) {
+ this.hadRemoteIPv6Candidate = true;
+ }
+};
+
+
+// Init and add ice candidate object with correct constructor
+PeerConnection.prototype.processIce = function (update, cb) {
+ cb = cb || function () {};
+ var self = this;
+
+ // ignore any added ice candidates to avoid errors. why does the
+ // spec not do this?
+ if (this.pc.signalingState === 'closed') return cb();
+
+ if (update.contents || (update.jingle && update.jingle.contents)) {
+ var contentNames = pluck(this.remoteDescription.contents, 'name');
+ var contents = update.contents || update.jingle.contents;
+
+ contents.forEach(function (content) {
+ var transport = content.transport || {};
+ var candidates = transport.candidates || [];
+ var mline = contentNames.indexOf(content.name);
+ var mid = content.name;
+
+ candidates.forEach(
+ function (candidate) {
+ var iceCandidate = SJJ.toCandidateSDP(candidate) + '\r\n';
+ self.pc.addIceCandidate(
+ new webrtc.IceCandidate({
+ candidate: iceCandidate,
+ sdpMLineIndex: mline,
+ sdpMid: mid
+ }), function () {
+ // well, this success callback is pretty meaningless
+ },
+ function (err) {
+ self.emit('error', err);
+ }
+ );
+ self._checkRemoteCandidate(iceCandidate);
+ });
+ });
+ } else {
+ // working around https://code.google.com/p/webrtc/issues/detail?id=3669
+ if (update.candidate && update.candidate.candidate.indexOf('a=') !== 0) {
+ update.candidate.candidate = 'a=' + update.candidate.candidate;
+ }
+
+ if (this.wtFirefox && this.firefoxcandidatebuffer !== null) {
+ // we cant add this yet due to https://bugzilla.mozilla.org/show_bug.cgi?id=1087551
+ if (this.pc.localDescription && this.pc.localDescription.type === 'offer') {
+ this.firefoxcandidatebuffer.push(update.candidate);
+ return cb();
+ }
+ }
+
+ self.pc.addIceCandidate(
+ new webrtc.IceCandidate(update.candidate),
+ function () { },
+ function (err) {
+ self.emit('error', err);
+ }
+ );
+ self._checkRemoteCandidate(update.candidate.candidate);
+ }
+ cb();
+};
+
+// Generate and emit an offer with the given constraints
+PeerConnection.prototype.offer = function (constraints, cb) {
+ var self = this;
+ var hasConstraints = arguments.length === 2;
+ var mediaConstraints = hasConstraints && constraints ? constraints : {
+ mandatory: {
+ OfferToReceiveAudio: true,
+ OfferToReceiveVideo: true
+ }
+ };
+ cb = hasConstraints ? cb : constraints;
+ cb = cb || function () {};
+
+ if (this.pc.signalingState === 'closed') return cb('Already closed');
+
+ // Actually generate the offer
+ this.pc.createOffer(
+ function (offer) {
+ // does not work for jingle, but jingle.js doesn't need
+ // this hack...
+ var expandedOffer = {
+ type: 'offer',
+ sdp: offer.sdp
+ };
+ if (self.assumeSetLocalSuccess) {
+ self.emit('offer', expandedOffer);
+ cb(null, expandedOffer);
+ }
+ self._candidateBuffer = [];
+ self.pc.setLocalDescription(offer,
+ function () {
+ var jingle;
+ if (self.config.useJingle) {
+ jingle = SJJ.toSessionJSON(offer.sdp, {
+ role: self._role(),
+ direction: 'outgoing'
+ });
+ jingle.sid = self.config.sid;
+ self.localDescription = jingle;
+
+ // Save ICE credentials
+ each(jingle.contents, function (content) {
+ var transport = content.transport || {};
+ if (transport.ufrag) {
+ self.config.ice[content.name] = {
+ ufrag: transport.ufrag,
+ pwd: transport.pwd
+ };
+ }
+ });
+
+ expandedOffer.jingle = jingle;
+ }
+ expandedOffer.sdp.split('\r\n').forEach(function (line) {
+ if (line.indexOf('a=candidate:') === 0) {
+ self._checkLocalCandidate(line);
+ }
+ });
+
+ if (!self.assumeSetLocalSuccess) {
+ self.emit('offer', expandedOffer);
+ cb(null, expandedOffer);
+ }
+ },
+ function (err) {
+ self.emit('error', err);
+ cb(err);
+ }
+ );
+ },
+ function (err) {
+ self.emit('error', err);
+ cb(err);
+ },
+ mediaConstraints
+ );
+};
+
+
+// Process an incoming offer so that ICE may proceed before deciding
+// to answer the request.
+PeerConnection.prototype.handleOffer = function (offer, cb) {
+ cb = cb || function () {};
+ var self = this;
+ offer.type = 'offer';
+ if (offer.jingle) {
+ if (this.enableChromeNativeSimulcast) {
+ offer.jingle.contents.forEach(function (content) {
+ if (content.name === 'video') {
+ content.description.googConferenceFlag = true;
+ }
+ });
+ }
+ if (this.enableMultiStreamHacks) {
+ // add a mixed video stream as first stream
+ offer.jingle.contents.forEach(function (content) {
+ if (content.name === 'video') {
+ var sources = content.description.sources || [];
+ if (sources.length === 0 || sources[0].ssrc !== "3735928559") {
+ sources.unshift({
+ ssrc: "3735928559", // 0xdeadbeef
+ parameters: [
+ {
+ key: "cname",
+ value: "deadbeef"
+ },
+ {
+ key: "msid",
+ value: "mixyourfecintothis please"
+ }
+ ]
+ });
+ content.description.sources = sources;
+ }
+ }
+ });
+ }
+ if (self.restrictBandwidth > 0) {
+ if (offer.jingle.contents.length >= 2 && offer.jingle.contents[1].name === 'video') {
+ var content = offer.jingle.contents[1];
+ var hasBw = content.description && content.description.bandwidth;
+ if (!hasBw) {
+ offer.jingle.contents[1].description.bandwidth = { type: 'AS', bandwidth: self.restrictBandwidth.toString() };
+ offer.sdp = SJJ.toSessionSDP(offer.jingle, {
+ sid: self.config.sdpSessionID,
+ role: self._role(),
+ direction: 'outgoing'
+ });
+ }
+ }
+ }
+ offer.sdp = SJJ.toSessionSDP(offer.jingle, {
+ sid: self.config.sdpSessionID,
+ role: self._role(),
+ direction: 'incoming'
+ });
+ self.remoteDescription = offer.jingle;
+ }
+ offer.sdp.split('\r\n').forEach(function (line) {
+ if (line.indexOf('a=candidate:') === 0) {
+ self._checkRemoteCandidate(line);
+ }
+ });
+ self.pc.setRemoteDescription(new webrtc.SessionDescription(offer),
+ function () {
+ cb();
+ },
+ cb
+ );
+};
+
+// Answer an offer with audio only
+PeerConnection.prototype.answerAudioOnly = function (cb) {
+ var mediaConstraints = {
+ mandatory: {
+ OfferToReceiveAudio: true,
+ OfferToReceiveVideo: false
+ }
+ };
+ this._answer(mediaConstraints, cb);
+};
+
+// Answer an offer without offering to recieve
+PeerConnection.prototype.answerBroadcastOnly = function (cb) {
+ var mediaConstraints = {
+ mandatory: {
+ OfferToReceiveAudio: false,
+ OfferToReceiveVideo: false
+ }
+ };
+ this._answer(mediaConstraints, cb);
+};
+
+// Answer an offer with given constraints default is audio/video
+PeerConnection.prototype.answer = function (constraints, cb) {
+ var self = this;
+ var hasConstraints = arguments.length === 2;
+ var callback = hasConstraints ? cb : constraints;
+ var mediaConstraints = hasConstraints && constraints ? constraints : {
+ mandatory: {
+ OfferToReceiveAudio: true,
+ OfferToReceiveVideo: true
+ }
+ };
+
+ this._answer(mediaConstraints, callback);
+};
+
+// Process an answer
+PeerConnection.prototype.handleAnswer = function (answer, cb) {
+ cb = cb || function () {};
+ var self = this;
+ if (answer.jingle) {
+ answer.sdp = SJJ.toSessionSDP(answer.jingle, {
+ sid: self.config.sdpSessionID,
+ role: self._role(),
+ direction: 'incoming'
+ });
+ self.remoteDescription = answer.jingle;
+ }
+ answer.sdp.split('\r\n').forEach(function (line) {
+ if (line.indexOf('a=candidate:') === 0) {
+ self._checkRemoteCandidate(line);
+ }
+ });
+ self.pc.setRemoteDescription(
+ new webrtc.SessionDescription(answer),
+ function () {
+ if (self.wtFirefox) {
+ window.setTimeout(function () {
+ self.firefoxcandidatebuffer.forEach(function (candidate) {
+ // add candidates later
+ self.pc.addIceCandidate(
+ new webrtc.IceCandidate(candidate),
+ function () { },
+ function (err) {
+ self.emit('error', err);
+ }
+ );
+ self._checkRemoteCandidate(candidate.candidate);
+ });
+ self.firefoxcandidatebuffer = null;
+ }, self.wtFirefox);
+ }
+ cb(null);
+ },
+ cb
+ );
+};
+
+// Close the peer connection
+PeerConnection.prototype.close = function () {
+ this.pc.close();
+
+ this._localDataChannels = [];
+ this._remoteDataChannels = [];
+
+ this.emit('close');
+};
+
+// Internal code sharing for various types of answer methods
+PeerConnection.prototype._answer = function (constraints, cb) {
+ cb = cb || function () {};
+ var self = this;
+ if (!this.pc.remoteDescription) {
+ // the old API is used, call handleOffer
+ throw new Error('remoteDescription not set');
+ }
+
+ if (this.pc.signalingState === 'closed') return cb('Already closed');
+
+ self.pc.createAnswer(
+ function (answer) {
+ var sim = [];
+ var rtx = [];
+ if (self.enableChromeNativeSimulcast) {
+ // native simulcast part 1: add another SSRC
+ answer.jingle = SJJ.toSessionJSON(answer.sdp, {
+ role: self._role(),
+ direction: 'outgoing'
+ });
+ if (answer.jingle.contents.length >= 2 && answer.jingle.contents[1].name === 'video') {
+ var hasSimgroup = false;
+ var groups = answer.jingle.contents[1].description.sourceGroups || [];
+ var hasSim = false;
+ groups.forEach(function (group) {
+ if (group.semantics == 'SIM') hasSim = true;
+ });
+ if (!hasSim &&
+ answer.jingle.contents[1].description.sources.length) {
+ var newssrc = JSON.parse(JSON.stringify(answer.jingle.contents[1].description.sources[0]));
+ newssrc.ssrc = '' + Math.floor(Math.random() * 0xffffffff); // FIXME: look for conflicts
+ answer.jingle.contents[1].description.sources.push(newssrc);
+
+ sim.push(answer.jingle.contents[1].description.sources[0].ssrc);
+ sim.push(newssrc.ssrc);
+ groups.push({
+ semantics: 'SIM',
+ sources: sim
+ });
+
+ // also create an RTX one for the SIM one
+ var rtxssrc = JSON.parse(JSON.stringify(newssrc));
+ rtxssrc.ssrc = '' + Math.floor(Math.random() * 0xffffffff); // FIXME: look for conflicts
+ answer.jingle.contents[1].description.sources.push(rtxssrc);
+ groups.push({
+ semantics: 'FID',
+ sources: [newssrc.ssrc, rtxssrc.ssrc]
+ });
+
+ answer.jingle.contents[1].description.sourceGroups = groups;
+ answer.sdp = SJJ.toSessionSDP(answer.jingle, {
+ sid: self.config.sdpSessionID,
+ role: self._role(),
+ direction: 'outgoing'
+ });
+ }
+ }
+ }
+ var expandedAnswer = {
+ type: 'answer',
+ sdp: answer.sdp
+ };
+ if (self.assumeSetLocalSuccess) {
+ // not safe to do when doing simulcast mangling
+ self.emit('answer', expandedAnswer);
+ cb(null, expandedAnswer);
+ }
+ self._candidateBuffer = [];
+ self.pc.setLocalDescription(answer,
+ function () {
+ if (self.config.useJingle) {
+ var jingle = SJJ.toSessionJSON(answer.sdp, {
+ role: self._role(),
+ direction: 'outgoing'
+ });
+ jingle.sid = self.config.sid;
+ self.localDescription = jingle;
+ expandedAnswer.jingle = jingle;
+ }
+ if (self.enableChromeNativeSimulcast) {
+ // native simulcast part 2:
+ // signal multiple tracks to the receiver
+ // for anything in the SIM group
+ if (!expandedAnswer.jingle) {
+ expandedAnswer.jingle = SJJ.toSessionJSON(answer.sdp, {
+ role: self._role(),
+ direction: 'outgoing'
+ });
+ }
+ var groups = expandedAnswer.jingle.contents[1].description.sourceGroups || [];
+ expandedAnswer.jingle.contents[1].description.sources.forEach(function (source, idx) {
+ // the floor idx/2 is a hack that relies on a particular order
+ // of groups, alternating between sim and rtx
+ source.parameters = source.parameters.map(function (parameter) {
+ if (parameter.key === 'msid') {
+ parameter.value += '-' + Math.floor(idx / 2);
+ }
+ return parameter;
+ });
+ });
+ expandedAnswer.sdp = SJJ.toSessionSDP(expandedAnswer.jingle, {
+ sid: self.sdpSessionID,
+ role: self._role(),
+ direction: 'outgoing'
+ });
+ }
+ expandedAnswer.sdp.split('\r\n').forEach(function (line) {
+ if (line.indexOf('a=candidate:') === 0) {
+ self._checkLocalCandidate(line);
+ }
+ });
+ if (!self.assumeSetLocalSuccess) {
+ self.emit('answer', expandedAnswer);
+ cb(null, expandedAnswer);
+ }
},
- pc_constraints: {}
+ function (err) {
+ self.emit('error', err);
+ cb(err);
+ }
+ );
+ },
+ function (err) {
+ self.emit('error', err);
+ cb(err);
+ },
+ constraints
+ );
+};
+
+// Internal method for emitting ice candidates on our peer object
+PeerConnection.prototype._onIce = function (event) {
+ var self = this;
+ if (event.candidate) {
+ if (this.dontSignalCandidates) return;
+ var ice = event.candidate;
+
+ var expandedCandidate = {
+ candidate: {
+ candidate: ice.candidate,
+ sdpMid: ice.sdpMid,
+ sdpMLineIndex: ice.sdpMLineIndex
+ }
+ };
+ this._checkLocalCandidate(ice.candidate);
+
+ var cand = SJJ.toCandidateJSON(ice.candidate);
+
+ var already;
+ var idx;
+ if (this.eliminateDuplicateCandidates && cand.type === 'relay') {
+ // drop candidates with same foundation, component
+ // take local type pref into account so we don't ignore udp
+ // ones when we know about a TCP one. unlikely but...
+ already = this._candidateBuffer.filter(
+ function (c) {
+ return c.type === 'relay';
+ }).map(function (c) {
+ return c.foundation + ':' + c.component;
+ }
+ );
+ idx = already.indexOf(cand.foundation + ':' + cand.component);
+ // remember: local type pref of udp is 0, tcp 1, tls 2
+ if (idx > -1 && ((cand.priority >> 24) >= (already[idx].priority >> 24))) {
+ // drop it, same foundation with higher (worse) type pref
+ return;
+ }
+ }
+ if (this.config.bundlePolicy === 'max-bundle') {
+ // drop candidates which are duplicate for audio/video/data
+ // duplicate means same host/port but different sdpMid
+ already = this._candidateBuffer.filter(
+ function (c) {
+ return cand.type === c.type;
+ }).map(function (cand) {
+ return cand.address + ':' + cand.port;
+ }
+ );
+ idx = already.indexOf(cand.address + ':' + cand.port);
+ if (idx > -1) return;
+ }
+ // also drop rtcp candidates since we know the peer supports RTCP-MUX
+ // this is a workaround until browsers implement this natively
+ if (this.config.rtcpMuxPolicy === 'require' && cand.component === '2') {
+ return;
+ }
+ this._candidateBuffer.push(cand);
+
+ if (self.config.useJingle) {
+ if (!ice.sdpMid) { // firefox doesn't set this
+ if (self.pc.remoteDescription && self.pc.remoteDescription.type === 'offer') {
+ // preserve name from remote
+ ice.sdpMid = self.remoteDescription.contents[ice.sdpMLineIndex].name;
+ } else {
+ ice.sdpMid = self.localDescription.contents[ice.sdpMLineIndex].name;
+ }
+ }
+ if (!self.config.ice[ice.sdpMid]) {
+ var jingle = SJJ.toSessionJSON(self.pc.localDescription.sdp, {
+ role: self._role(),
+ direction: 'outgoing'
+ });
+ each(jingle.contents, function (content) {
+ var transport = content.transport || {};
+ if (transport.ufrag) {
+ self.config.ice[content.name] = {
+ ufrag: transport.ufrag,
+ pwd: transport.pwd
+ };
+ }
+ });
+ }
+ expandedCandidate.jingle = {
+ contents: [{
+ name: ice.sdpMid,
+ creator: self._role(),
+ transport: {
+ transType: 'iceUdp',
+ ufrag: self.config.ice[ice.sdpMid].ufrag,
+ pwd: self.config.ice[ice.sdpMid].pwd,
+ candidates: [
+ cand
+ ]
+ }
+ }]
};
- RTCSessionDescription = mozRTCSessionDescription;
- RTCIceCandidate = mozRTCIceCandidate;
- }
- } else if (navigator.webkitGetUserMedia) {
- console.log('This appears to be Chrome');
- RTC = {
- peerconnection: webkitRTCPeerConnection,
- browser: 'chrome',
- getUserMedia: navigator.webkitGetUserMedia.bind(navigator),
- attachMediaStream: function (element, stream) {
- element.attr('src', webkitURL.createObjectURL(stream));
+ if (self.batchIceCandidates > 0) {
+ if (self.batchedIceCandidates.length === 0) {
+ window.setTimeout(function () {
+ var contents = {};
+ self.batchedIceCandidates.forEach(function (content) {
+ content = content.contents[0];
+ if (!contents[content.name]) contents[content.name] = content;
+ contents[content.name].transport.candidates.push(content.transport.candidates[0]);
+ });
+ var newCand = {
+ jingle: {
+ contents: []
+ }
+ };
+ Object.keys(contents).forEach(function (name) {
+ newCand.jingle.contents.push(contents[name]);
+ });
+ self.batchedIceCandidates = [];
+ self.emit('ice', newCand);
+ }, self.batchIceCandidates);
+ }
+ self.batchedIceCandidates.push(expandedCandidate.jingle);
+ return;
+ }
+
+ }
+ this.emit('ice', expandedCandidate);
+ } else {
+ this.emit('endOfCandidates');
+ }
+};
+
+// Internal method for processing a new data channel being added by the
+// other peer.
+PeerConnection.prototype._onDataChannel = function (event) {
+ // make sure we keep a reference so this doesn't get garbage collected
+ var channel = event.channel;
+ this._remoteDataChannels.push(channel);
+
+ this.emit('addChannel', channel);
+};
+
+// Create a data channel spec reference:
+// http://dev.w3.org/2011/webrtc/editor/webrtc.html#idl-def-RTCDataChannelInit
+PeerConnection.prototype.createDataChannel = function (name, opts) {
+ var channel = this.pc.createDataChannel(name, opts);
+
+ // make sure we keep a reference so this doesn't get garbage collected
+ this._localDataChannels.push(channel);
+
+ return channel;
+};
+
+// a wrapper around getStats which hides the differences (where possible)
+PeerConnection.prototype.getStats = function (cb) {
+ if (webrtc.prefix === 'moz') {
+ this.pc.getStats(
+ function (res) {
+ var items = [];
+ for (var result in res) {
+ if (typeof res[result] === 'object') {
+ items.push(res[result]);
+ }
+ }
+ cb(null, items);
},
- // DTLS should now be enabled by default but..
- pc_constraints: {'optional': [{'DtlsSrtpKeyAgreement': 'true'}]}
+ cb
+ );
+ } else {
+ this.pc.getStats(function (res) {
+ var items = [];
+ res.result().forEach(function (result) {
+ var item = {};
+ result.names().forEach(function (name) {
+ item[name] = result.stat(name);
+ });
+ item.id = result.id;
+ item.type = result.type;
+ item.timestamp = result.timestamp;
+ items.push(item);
+ });
+ cb(null, items);
+ });
+ }
+};
+
+module.exports = PeerConnection;
+
+},{"lodash.foreach":48,"lodash.pluck":56,"sdp-jingle-json":71,"traceablepeerconnection":76,"util":24,"webrtcsupport":112,"wildemitter":113}],78:[function(require,module,exports){
+var util = require('util');
+var extend = require('extend-object');
+var BaseSession = require('jingle-session');
+var RTCPeerConnection = require('rtcpeerconnection');
+
+
+function filterContentSources(content, stream) {
+ delete content.transport;
+ delete content.description.payloads;
+ if (content.description.sources) {
+ content.description.sources = content.description.sources.filter(function (source) {
+ return stream.id === source.parameters[1].value.split(' ')[0];
+ });
+ }
+}
+
+function filterUnusedLabels(content) {
+ // Remove mslabel and label ssrc-specific attributes
+ var sources = content.description.sources || [];
+ sources.forEach(function (source) {
+ source.parameters = source.parameters.filter(function (parameter) {
+ return !(parameter.key === 'mslabel' || parameter.key === 'label');
+ });
+ });
+}
+
+
+function MediaSession(opts) {
+ BaseSession.call(this, opts);
+
+ this.pc = new RTCPeerConnection({
+ iceServers: opts.iceServers || [],
+ useJingle: true
+ }, opts.constraints || {});
+
+ this.pc.on('ice', this.onIceCandidate.bind(this));
+ this.pc.on('iceConnectionStateChange', this.onIceStateChange.bind(this));
+ this.pc.on('addStream', this.onAddStream.bind(this));
+ this.pc.on('removeStream', this.onRemoveStream.bind(this));
+
+ if (opts.stream) {
+ this.addStream(opts.stream);
+ }
+
+ this._ringing = false;
+}
+
+
+util.inherits(MediaSession, BaseSession);
+
+
+Object.defineProperties(MediaSession.prototype, {
+ ringing: {
+ get: function () {
+ return this._ringing;
+ },
+ set: function (value) {
+ if (value !== this._ringing) {
+ this._ringing = value;
+ this.emit('change:ringing', value);
+ }
+ }
+ },
+ streams: {
+ get: function () {
+ if (this.pc.signalingState !== 'closed') {
+ return this.pc.getRemoteStreams();
+ }
+ return [];
+ }
+ }
+});
+
+
+MediaSession.prototype = extend(MediaSession.prototype, {
+
+ // ----------------------------------------------------------------
+ // Session control methods
+ // ----------------------------------------------------------------
+
+ start: function (constraints, next) {
+ var self = this;
+ this.state = 'pending';
+
+ next = next || function () {};
+
+ this.pc.isInitiator = true;
+ this.pc.offer(constraints, function (err, offer) {
+ if (err) {
+ self._log('error', 'Could not create WebRTC offer', err);
+ return self.end('failed-application', true);
+ }
+
+ // a workaround for missing a=sendonly
+ // https://code.google.com/p/webrtc/issues/detail?id=1553
+ if (constraints && constraints.mandatory) {
+ offer.jingle.contents.forEach(function (content) {
+ var mediaType = content.description.media;
+
+ if (!content.description || content.description.descType !== 'rtp') {
+ return;
+ }
+
+ if (!constraints.mandatory.OfferToReceiveAudio && mediaType === 'audio') {
+ content.senders = 'initiator';
+ }
+
+ if (!constraints.mandatory.OfferToReceiveVideo && mediaType === 'video') {
+ content.senders = 'initiator';
+ }
+ });
+ }
+
+ offer.jingle.contents.forEach(filterUnusedLabels);
+
+ self.send('session-initiate', offer.jingle);
+
+ next();
+ });
+ },
+
+ accept: function (next) {
+ var self = this;
+
+ next = next || function () {};
+
+ this._log('info', 'Accepted incoming session');
+
+ this.state = 'active';
+
+ this.pc.answer(function (err, answer) {
+ if (err) {
+ self._log('error', 'Could not create WebRTC answer', err);
+ return self.end('failed-application');
+ }
+
+ answer.jingle.contents.forEach(filterUnusedLabels);
+
+ self.send('session-accept', answer.jingle);
+
+ next();
+ });
+ },
+
+ end: function (reason, silent) {
+ var self = this;
+ this.streams.forEach(function (stream) {
+ self.onRemoveStream({stream: stream});
+ });
+ this.pc.close();
+ BaseSession.prototype.end.call(this, reason, silent);
+ },
+
+ ring: function () {
+ this._log('info', 'Ringing on incoming session');
+ this.ringing = true;
+ this.send('session-info', {ringing: true});
+ },
+
+ mute: function (creator, name) {
+ this._log('info', 'Muting', name);
+
+ this.send('session-info', {
+ mute: {
+ creator: creator,
+ name: name
+ }
+ });
+ },
+
+ unmute: function (creator, name) {
+ this._log('info', 'Unmuting', name);
+ this.send('session-info', {
+ unmute: {
+ creator: creator,
+ name: name
+ }
+ });
+ },
+
+ hold: function () {
+ this._log('info', 'Placing on hold');
+ this.send('session-info', {hold: true});
+ },
+
+ resume: function () {
+ this._log('info', 'Resuming from hold');
+ this.send('session-info', {active: true});
+ },
+
+ // ----------------------------------------------------------------
+ // Stream control methods
+ // ----------------------------------------------------------------
+
+ addStream: function (stream, renegotiate, cb) {
+ var self = this;
+
+ cb = cb || function () {};
+
+ this.pc.addStream(stream);
+
+ if (!renegotiate) {
+ return;
+ }
+
+ this.pc.handleOffer({
+ type: 'offer',
+ jingle: this.pc.remoteDescription
+ }, function (err) {
+ if (err) {
+ self._log('error', 'Could not create offer for adding new stream');
+ return cb(err);
+ }
+ self.pc.answer(function (err, answer) {
+ if (err) {
+ self._log('error', 'Could not create answer for adding new stream');
+ return cb(err);
+ }
+ answer.jingle.contents.forEach(function (content) {
+ filterContentSources(content, stream);
+ });
+
+ self.send('source-add', answer.jingle);
+ cb();
+ });
+ });
+ },
+
+ addStream2: function (stream, cb) {
+ this.addStream(stream, true, cb);
+ },
+
+ removeStream: function (stream, renegotiate, cb) {
+ var self = this;
+
+ cb = cb || function () {};
+
+ if (!renegotiate) {
+ this.pc.removeStream(stream);
+ return;
+ }
+
+ var desc = this.pc.localDescription;
+ desc.contents.forEach(function (content) {
+ filterContentSources(content, stream);
+ });
+
+ this.send('source-remove', desc);
+ this.pc.removeStream(stream);
+
+ this.pc.handleOffer({
+ type: 'offer',
+ jingle: this.pc.remoteDescription
+ }, function (err) {
+ if (err) {
+ self._log('error', 'Could not process offer for removing stream');
+ return cb(err);
+ }
+ self.pc.answer(function (err) {
+ if (err) {
+ self._log('error', 'Could not process answer for removing stream');
+ return cb(err);
+ }
+ cb();
+ });
+ });
+ },
+
+ removeStream2: function (stream, cb) {
+ this.removeStream(stream, true, cb);
+ },
+
+ switchStream: function (oldStream, newStream, cb) {
+ var self = this;
+
+ cb = cb || function () {};
+
+ var desc = this.pc.localDescription;
+ desc.contents.forEach(function (content) {
+ delete content.transport;
+ delete content.description.payloads;
+ });
+
+ this.pc.removeStream(oldStream);
+ this.send('source-remove', desc);
+
+ var audioTracks = oldStream.getAudioTracks();
+ if (audioTracks.length) {
+ newStream.addTrack(audioTracks[0]);
+ }
+
+ this.pc.addStream(newStream);
+ this.pc.handleOffer({
+ type: 'offer',
+ jingle: this.pc.remoteDescription
+ }, function (err) {
+ if (err) {
+ self._log('error', 'Could not process offer for switching streams');
+ return cb(err);
+ }
+ self.pc.answer(function (err, answer) {
+ if (err) {
+ self._log('error', 'Could not process answer for switching streams');
+ return cb(err);
+ }
+ answer.jingle.contents.forEach(function (content) {
+ delete content.transport;
+ delete content.description.payloads;
+ });
+ self.send('source-add', answer.jingle);
+ cb();
+ });
+ });
+ },
+
+ // ----------------------------------------------------------------
+ // ICE action handers
+ // ----------------------------------------------------------------
+
+ onIceCandidate: function (candidate) {
+ this._log('info', 'Discovered new ICE candidate', candidate.jingle);
+ this.send('transport-info', candidate.jingle);
+ },
+
+ onIceStateChange: function () {
+ switch (this.pc.iceConnectionState) {
+ case 'checking':
+ this.connectionState = 'connecting';
+ break;
+ case 'completed':
+ case 'connected':
+ this.connectionState = 'connected';
+ break;
+ case 'disconnected':
+ if (this.pc.signalingState === 'stable') {
+ this.connectionState = 'interrupted';
+ } else {
+ this.connectionState = 'disconnected';
+ }
+ break;
+ case 'failed':
+ this.connectionState = 'failed';
+ this.end('failed-transport');
+ break;
+ case 'closed':
+ this.connectionState = 'disconnected';
+ break;
+ }
+ },
+
+ // ----------------------------------------------------------------
+ // Stream event handlers
+ // ----------------------------------------------------------------
+
+ onAddStream: function (event) {
+ this._log('info', 'Stream added');
+ this.emit('peerStreamAdded', this, event.stream);
+ },
+
+ onRemoveStream: function (event) {
+ this._log('info', 'Stream removed');
+ this.emit('peerStreamRemoved', this, event.stream);
+ },
+
+ // ----------------------------------------------------------------
+ // Jingle action handers
+ // ----------------------------------------------------------------
+
+ onSessionInitiate: function (changes, cb) {
+ var self = this;
+
+ this._log('info', 'Initiating incoming session');
+
+ this.state = 'pending';
+
+ this.pc.isInitiator = false;
+ this.pc.handleOffer({
+ type: 'offer',
+ jingle: changes
+ }, function (err) {
+ if (err) {
+ self._log('error', 'Could not create WebRTC answer');
+ return cb({condition: 'general-error'});
+ }
+ cb();
+ });
+ },
+
+ onSessionAccept: function (changes, cb) {
+ var self = this;
+
+ this.state = 'active';
+ this.pc.handleAnswer({
+ type: 'answer',
+ jingle: changes
+ }, function (err) {
+ if (err) {
+ self._log('error', 'Could not process WebRTC answer');
+ return cb({condition: 'general-error'});
+ }
+ self.emit('accepted', self);
+ cb();
+ });
+ },
+
+ onSessionTerminate: function (changes, cb) {
+ var self = this;
+
+ this._log('info', 'Terminating session');
+ this.streams.forEach(function (stream) {
+ self.onRemoveStream({stream: stream});
+ });
+ this.pc.close();
+ BaseSession.prototype.end.call(this, changes.reason, true);
+
+ cb();
+ },
+
+ onSessionInfo: function (info, cb) {
+ if (info.ringing) {
+ this._log('info', 'Outgoing session is ringing');
+ this.ringing = true;
+ this.emit('ringing', this);
+ return cb();
+ }
+
+ if (info.hold) {
+ this._log('info', 'On hold');
+ this.emit('hold', this);
+ return cb();
+ }
+
+ if (info.active) {
+ this._log('info', 'Resuming from hold');
+ this.emit('resumed', this);
+ return cb();
+ }
+
+ if (info.mute) {
+ this._log('info', 'Muting', info.mute);
+ this.emit('mute', this, info.mute);
+ return cb();
+ }
+
+ if (info.unmute) {
+ this._log('info', 'Unmuting', info.unmute);
+ this.emit('unmute', this, info.unmute);
+ return cb();
+ }
+
+ cb();
+ },
+
+ onTransportInfo: function (changes, cb) {
+ this.pc.processIce(changes, function () {
+ cb();
+ });
+ },
+
+ onSourceAdd: function (changes, cb) {
+ var self = this;
+ this._log('info', 'Adding new stream source');
+
+ var newDesc = this.pc.remoteDescription;
+ this.pc.remoteDescription.contents.forEach(function (content, idx) {
+ var desc = content.description;
+ var ssrcs = desc.sources || [];
+ var groups = desc.sourceGroups || [];
+
+ changes.contents.forEach(function (newContent) {
+ if (content.name !== newContent.name) {
+ return;
+ }
+
+ var newContentDesc = newContent.description;
+ var newSSRCs = newContentDesc.sources || [];
+
+ ssrcs = ssrcs.concat(newSSRCs);
+ newDesc.contents[idx].description.sources = JSON.parse(JSON.stringify(ssrcs));
+
+ var newGroups = newContentDesc.sourceGroups || [];
+ groups = groups.concat(newGroups);
+ newDesc.contents[idx].description.sourceGroups = JSON.parse(JSON.stringify(groups));
+ });
+ });
+
+ this.pc.handleOffer({
+ type: 'offer',
+ jingle: newDesc
+ }, function (err) {
+ if (err) {
+ self._log('error', 'Error adding new stream source');
+ return cb({
+ condition: 'general-error'
+ });
+ }
+
+ self.pc.answer(function (err) {
+ if (err) {
+ self._log('error', 'Error adding new stream source');
+ return cb({
+ condition: 'general-error'
+ });
+ }
+ cb();
+ });
+ });
+ },
+
+ onSourceRemove: function (changes, cb) {
+ var self = this;
+ this._log('info', 'Removing stream source');
+
+ var newDesc = this.pc.remoteDescription;
+ this.pc.remoteDescription.contents.forEach(function (content, idx) {
+ var desc = content.description;
+ var ssrcs = desc.sources || [];
+ var groups = desc.sourceGroups || [];
+
+ changes.contents.forEach(function (newContent) {
+ if (content.name !== newContent.name) {
+ return;
+ }
+
+ var newContentDesc = newContent.description;
+ var newSSRCs = newContentDesc.sources || [];
+ var newGroups = newContentDesc.sourceGroups || [];
+
+ var found, i, j, k;
+
+
+ for (i = 0; i < newSSRCs.length; i++) {
+ found = -1;
+ for (j = 0; j < ssrcs.length; j++) {
+ if (newSSRCs[i].ssrc === ssrcs[j].ssrc) {
+ found = j;
+ break;
+ }
+ }
+ if (found > -1) {
+ ssrcs.splice(found, 1);
+ newDesc.contents[idx].description.sources = JSON.parse(JSON.stringify(ssrcs));
+ }
+ }
+
+ // Remove ssrc-groups that are no longer needed
+ for (i = 0; i < newGroups.length; i++) {
+ found = -1;
+ for (j = 0; i < groups.length; j++) {
+ if (newGroups[i].semantics === groups[j].semantics &&
+ newGroups[i].sources.length === groups[j].sources.length) {
+ var same = true;
+ for (k = 0; k < newGroups[i].sources.length; k++) {
+ if (newGroups[i].sources[k] !== groups[j].sources[k]) {
+ same = false;
+ break;
+ }
+ }
+ if (same) {
+ found = j;
+ break;
+ }
+ }
+ }
+ if (found > -1) {
+ groups.splice(found, 1);
+ newDesc.contents[idx].description.sourceGroups = JSON.parse(JSON.stringify(groups));
+ }
+ }
+ });
+ });
+
+ this.pc.handleOffer({
+ type: 'offer',
+ jingle: newDesc
+ }, function (err) {
+ if (err) {
+ self._log('error', 'Error removing stream source');
+ return cb({
+ condition: 'general-error'
+ });
+ }
+ self.pc.answer(function (err) {
+ if (err) {
+ self._log('error', 'Error removing stream source');
+ return cb({
+ condition: 'general-error'
+ });
+ }
+ cb();
+ });
+ });
+ }
+});
+
+
+module.exports = MediaSession;
+
+},{"extend-object":27,"jingle-session":109,"rtcpeerconnection":108,"util":24}],79:[function(require,module,exports){
+arguments[4][48][0].apply(exports,arguments)
+},{"dup":48,"lodash._arrayeach":80,"lodash._baseeach":81,"lodash._bindcallback":85,"lodash.isarray":86}],80:[function(require,module,exports){
+arguments[4][49][0].apply(exports,arguments)
+},{"dup":49}],81:[function(require,module,exports){
+arguments[4][50][0].apply(exports,arguments)
+},{"dup":50,"lodash.keys":82}],82:[function(require,module,exports){
+arguments[4][51][0].apply(exports,arguments)
+},{"dup":51,"lodash._getnative":83,"lodash.isarguments":84,"lodash.isarray":86}],83:[function(require,module,exports){
+arguments[4][52][0].apply(exports,arguments)
+},{"dup":52}],84:[function(require,module,exports){
+arguments[4][53][0].apply(exports,arguments)
+},{"dup":53}],85:[function(require,module,exports){
+arguments[4][54][0].apply(exports,arguments)
+},{"dup":54}],86:[function(require,module,exports){
+arguments[4][55][0].apply(exports,arguments)
+},{"dup":55}],87:[function(require,module,exports){
+arguments[4][56][0].apply(exports,arguments)
+},{"dup":56,"lodash._baseget":88,"lodash._topath":89,"lodash.isarray":90,"lodash.map":91}],88:[function(require,module,exports){
+arguments[4][57][0].apply(exports,arguments)
+},{"dup":57}],89:[function(require,module,exports){
+arguments[4][58][0].apply(exports,arguments)
+},{"dup":58,"lodash.isarray":90}],90:[function(require,module,exports){
+arguments[4][55][0].apply(exports,arguments)
+},{"dup":55}],91:[function(require,module,exports){
+arguments[4][60][0].apply(exports,arguments)
+},{"dup":60,"lodash._arraymap":92,"lodash._basecallback":93,"lodash._baseeach":98,"lodash.isarray":90}],92:[function(require,module,exports){
+arguments[4][61][0].apply(exports,arguments)
+},{"dup":61}],93:[function(require,module,exports){
+arguments[4][62][0].apply(exports,arguments)
+},{"dup":62,"lodash._baseisequal":94,"lodash._bindcallback":96,"lodash.isarray":90,"lodash.pairs":97}],94:[function(require,module,exports){
+arguments[4][63][0].apply(exports,arguments)
+},{"dup":63,"lodash.isarray":90,"lodash.istypedarray":95,"lodash.keys":99}],95:[function(require,module,exports){
+arguments[4][64][0].apply(exports,arguments)
+},{"dup":64}],96:[function(require,module,exports){
+arguments[4][54][0].apply(exports,arguments)
+},{"dup":54}],97:[function(require,module,exports){
+arguments[4][66][0].apply(exports,arguments)
+},{"dup":66,"lodash.keys":99}],98:[function(require,module,exports){
+arguments[4][50][0].apply(exports,arguments)
+},{"dup":50,"lodash.keys":99}],99:[function(require,module,exports){
+arguments[4][51][0].apply(exports,arguments)
+},{"dup":51,"lodash._getnative":100,"lodash.isarguments":101,"lodash.isarray":90}],100:[function(require,module,exports){
+arguments[4][52][0].apply(exports,arguments)
+},{"dup":52}],101:[function(require,module,exports){
+arguments[4][53][0].apply(exports,arguments)
+},{"dup":53}],102:[function(require,module,exports){
+arguments[4][71][0].apply(exports,arguments)
+},{"./lib/tojson":105,"./lib/tosdp":106,"dup":71}],103:[function(require,module,exports){
+arguments[4][72][0].apply(exports,arguments)
+},{"dup":72}],104:[function(require,module,exports){
+arguments[4][73][0].apply(exports,arguments)
+},{"dup":73}],105:[function(require,module,exports){
+arguments[4][74][0].apply(exports,arguments)
+},{"./parsers":103,"./senders":104,"dup":74}],106:[function(require,module,exports){
+arguments[4][75][0].apply(exports,arguments)
+},{"./senders":104,"dup":75}],107:[function(require,module,exports){
+arguments[4][76][0].apply(exports,arguments)
+},{"dup":76,"util":24,"webrtcsupport":112,"wildemitter":113}],108:[function(require,module,exports){
+arguments[4][77][0].apply(exports,arguments)
+},{"dup":77,"lodash.foreach":79,"lodash.pluck":87,"sdp-jingle-json":102,"traceablepeerconnection":107,"util":24,"webrtcsupport":112,"wildemitter":113}],109:[function(require,module,exports){
+var util = require('util');
+var uuid = require('uuid');
+var async = require('async');
+var extend = require('extend-object');
+var WildEmitter = require('wildemitter');
+
+
+var ACTIONS = {
+ 'content-accept': 'onContentAccept',
+ 'content-add': 'onContentAdd',
+ 'content-modify': 'onConentModify',
+ 'content-reject': 'onContentReject',
+ 'content-remove': 'onContentRemove',
+ 'description-info': 'onDescriptionInfo',
+ 'security-info': 'onSecurityInfo',
+ 'session-accept': 'onSessionAccept',
+ 'session-info': 'onSessionInfo',
+ 'session-initiate': 'onSessionInitiate',
+ 'session-terminate': 'onSessionTerminate',
+ 'transport-accept': 'onTransportAccept',
+ 'transport-info': 'onTransportInfo',
+ 'transport-reject': 'onTransportReject',
+ 'transport-replace': 'onTransportReplace',
+
+ // Unstandardized actions: might go away anytime without notice
+ 'source-add': 'onSourceAdd',
+ 'source-remove': 'onSourceRemove'
+};
+
+
+function JingleSession(opts) {
+ WildEmitter.call(this);
+
+ var self = this;
+
+ this.sid = opts.sid || uuid.v4();
+ this.peer = opts.peer;
+ this.peerID = opts.peerID || this.peer.full || this.peer;
+ this.isInitiator = opts.initiator || false;
+ this.parent = opts.parent;
+ this.state = 'starting';
+ this.connectionState = 'starting';
+
+ // We track the intial pending description types in case
+ // of the need for a tie-breaker.
+ this.pendingDescriptionTypes = opts.descriptionTypes || [];
+
+ this.pendingAction = false;
+
+ // Here is where we'll ensure that all actions are processed
+ // in order, even if a particular action requires async handling.
+ this.processingQueue = async.queue(function (task, next) {
+ if (self.ended) {
+ // Don't process anything once the session has been ended
+ return next();
+ }
+
+ var action = task.action;
+ var changes = task.changes;
+ var cb = task.cb;
+
+ self._log('debug', action);
+
+ if (!ACTIONS[action]) {
+ self._log('error', 'Invalid action: ' + action);
+ cb({condition: 'bad-request'});
+ return next();
+ }
+
+ self[ACTIONS[action]](changes, function (err, result) {
+ cb(err, result);
+ return next();
+ });
+ });
+}
+
+
+util.inherits(JingleSession, WildEmitter);
+
+// We don't know how to handle any particular content types,
+// so no actions are supported.
+Object.keys(ACTIONS).forEach(function (action) {
+ var method = ACTIONS[action];
+ JingleSession.prototype[method] = function (changes, cb) {
+ this._log('error', 'Unsupported action: ' + action);
+ cb();
+ };
+});
+
+// Provide some convenience properties for checking
+// the session's state.
+Object.defineProperties(JingleSession.prototype, {
+ state: {
+ get: function () {
+ return this._sessionState;
+ },
+ set: function (value) {
+ if (value !== this._sessionState) {
+ var prev = this._sessionState;
+ this._log('info', 'Changing session state to: ' + value);
+ this._sessionState = value;
+ this.emit('change:sessionState', this, value);
+ this.emit('change:' + value, this, true);
+ if (prev) {
+ this.emit('change:' + prev, this, false);
+ }
+ }
+ }
+ },
+ connectionState: {
+ get: function () {
+ return this._connectionState;
+ },
+ set: function (value) {
+ if (value !== this._connectionState) {
+ var prev = this._connectionState;
+ this._log('info', 'Changing connection state to: ' + value);
+ this._connectionState = value;
+ this.emit('change:connectionState', this, value);
+ this.emit('change:' + value, this, true);
+ if (prev) {
+ this.emit('change:' + prev, this, false);
+ }
+ }
+ }
+ },
+ starting: {
+ get: function () {
+ return this._sessionState === 'starting';
+ }
+ },
+ pending: {
+ get: function () {
+ return this._sessionState === 'pending';
+ }
+ },
+ active: {
+ get: function () {
+ return this._sessionState === 'active';
+ }
+ },
+ ended: {
+ get: function () {
+ return this._sessionState === 'ended';
+ }
+ },
+ connected: {
+ get: function () {
+ return this._connectionState === 'connected';
+ }
+ },
+ connecting: {
+ get: function () {
+ return this._connectionState === 'connecting';
+ }
+ },
+ disconnected: {
+ get: function () {
+ return this._connectionState === 'disconnected';
+ }
+ },
+ interrupted: {
+ get: function () {
+ return this._connectionState === 'interrupted';
+ }
+ }
+});
+
+JingleSession.prototype = extend(JingleSession.prototype, {
+ _log: function (level, message) {
+ message = this.sid + ': ' + message;
+ this.emit('log:' + level, message);
+ },
+
+ send: function (action, data) {
+ data = data || {};
+ data.sid = this.sid;
+ data.action = action;
+
+ var requirePending = {
+ 'session-inititate': true,
+ 'session-accept': true,
+ 'content-add': true,
+ 'content-remove': true,
+ 'content-reject': true,
+ 'content-accept': true,
+ 'content-modify': true,
+ 'transport-replace': true,
+ 'transport-reject': true,
+ 'transport-accept': true,
+ 'source-add': true,
+ 'source-remove': true
+ };
+
+ if (requirePending[action]) {
+ this.pendingAction = action;
+ } else {
+ this.pendingAction = false;
+ }
+
+ this.emit('send', {
+ to: this.peer,
+ type: 'set',
+ jingle: data
+ });
+ },
+
+ process: function (action, changes, cb) {
+ this.processingQueue.push({
+ action: action,
+ changes: changes,
+ cb: cb
+ });
+ },
+
+ start: function () {
+ this._log('error', 'Can not start base sessions');
+ this.end('unsupported-applications', true);
+ },
+
+ accept: function () {
+ this._log('error', 'Can not accept base sessions');
+ this.end('unsupported-applications');
+ },
+
+ cancel: function () {
+ this.end('cancel');
+ },
+
+ decline: function () {
+ this.end('decline');
+ },
+
+ end: function (reason, silent) {
+ this.state = 'ended';
+
+ this.processingQueue.kill();
+
+ if (!reason) {
+ reason = 'success';
+ }
+
+ if (typeof reason === 'string') {
+ reason = {
+ condition: reason
+ };
+ }
+
+ if (!silent) {
+ this.send('session-terminate', {
+ reason: reason
+ });
+ }
+
+ this.emit('terminated', this, reason);
+ },
+
+ onSessionTerminate: function (changes, cb) {
+ this.end(changes.reason, true);
+ cb();
+ },
+
+ // It is mandatory to reply to a session-info action with
+ // an unsupported-info error if the info isn't recognized.
+ //
+ // However, a session-info action with no associated payload
+ // is acceptable (works like a ping).
+ onSessionInfo: function (changes, cb) {
+ var okKeys = {
+ sid: true,
+ action: true,
+ initiator: true,
+ responder: true
};
+
+ var unknownPayload = false;
+ Object.keys(changes).forEach(function (key) {
+ if (!okKeys[key]) {
+ unknownPayload = true;
+ }
+ });
+
+ if (unknownPayload) {
+ cb({
+ type: 'modify',
+ condition: 'feature-not-implemented',
+ jingleCondition: 'unsupported-info'
+ });
+ } else {
+ cb();
+ }
+ },
+
+ // It is mandatory to reply to a description-info action with
+ // an unsupported-info error if the info isn't recognized.
+ onDescriptionInfo: function (changes, cb) {
+ cb({
+ type: 'modify',
+ condition: 'feature-not-implemented',
+ jingleCondition: 'unsupported-info'
+ });
+ },
+
+ // It is mandatory to reply to a transport-info action with
+ // an unsupported-info error if the info isn't recognized.
+ onTransportInfo: function (changes, cb) {
+ cb({
+ type: 'modify',
+ condition: 'feature-not-implemented',
+ jingleCondition: 'unsupported-info'
+ });
+ },
+
+ // It is mandatory to reply to a content-add action with either
+ // a content-accept or content-reject.
+ onContentAdd: function (changes, cb) {
+ // Allow ack for the content-add to be sent.
+ cb();
+
+ this.send('content-reject', {
+ reason: {
+ condition: 'failed-application',
+ text: 'content-add is not supported'
+ }
+ });
+ },
+
+ // It is mandatory to reply to a transport-add action with either
+ // a transport-accept or transport-reject.
+ onTransportReplace: function (changes, cb) {
+ // Allow ack for the transport-replace be sent.
+ cb();
+
+ this.send('transport-reject', {
+ reason: {
+ condition: 'failed-application',
+ text: 'transport-replace is not supported'
+ }
+ });
+ }
+});
+
+
+module.exports = JingleSession;
+
+},{"async":26,"extend-object":27,"util":24,"uuid":111,"wildemitter":113}],110:[function(require,module,exports){
+(function (global){
+
+var rng;
+
+if (global.crypto && crypto.getRandomValues) {
+ // WHATWG crypto-based RNG - http://wiki.whatwg.org/wiki/Crypto
+ // Moderately fast, high quality
+ var _rnds8 = new Uint8Array(16);
+ rng = function whatwgRNG() {
+ crypto.getRandomValues(_rnds8);
+ return _rnds8;
+ };
+}
+
+if (!rng) {
+ // Math.random()-based (RNG)
+ //
+ // If all else fails, use Math.random(). It's fast, but is of unspecified
+ // quality.
+ var _rnds = new Array(16);
+ rng = function() {
+ for (var i = 0, r; i < 16; i++) {
+ if ((i & 0x03) === 0) r = Math.random() * 0x100000000;
+ _rnds[i] = r >>> ((i & 0x03) << 3) & 0xff;
+ }
+
+ return _rnds;
+ };
+}
+
+module.exports = rng;
+
+
+}).call(this,typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {})
+},{}],111:[function(require,module,exports){
+// uuid.js
+//
+// Copyright (c) 2010-2012 Robert Kieffer
+// MIT License - http://opensource.org/licenses/mit-license.php
+
+// Unique ID creation requires a high quality random # generator. We feature
+// detect to determine the best RNG source, normalizing to a function that
+// returns 128-bits of randomness, since that's what's usually required
+var _rng = require('./rng');
+
+// Maps for number <-> hex string conversion
+var _byteToHex = [];
+var _hexToByte = {};
+for (var i = 0; i < 256; i++) {
+ _byteToHex[i] = (i + 0x100).toString(16).substr(1);
+ _hexToByte[_byteToHex[i]] = i;
+}
+
+// **`parse()` - Parse a UUID into it's component bytes**
+function parse(s, buf, offset) {
+ var i = (buf && offset) || 0, ii = 0;
+
+ buf = buf || [];
+ s.toLowerCase().replace(/[0-9a-f]{2}/g, function(oct) {
+ if (ii < 16) { // Don't overflow!
+ buf[i + ii++] = _hexToByte[oct];
+ }
+ });
+
+ // Zero out remaining bytes if string was short
+ while (ii < 16) {
+ buf[i + ii++] = 0;
+ }
+
+ return buf;
+}
+
+// **`unparse()` - Convert UUID byte array (ala parse()) into a string**
+function unparse(buf, offset) {
+ var i = offset || 0, bth = _byteToHex;
+ return bth[buf[i++]] + bth[buf[i++]] +
+ bth[buf[i++]] + bth[buf[i++]] + '-' +
+ bth[buf[i++]] + bth[buf[i++]] + '-' +
+ bth[buf[i++]] + bth[buf[i++]] + '-' +
+ bth[buf[i++]] + bth[buf[i++]] + '-' +
+ bth[buf[i++]] + bth[buf[i++]] +
+ bth[buf[i++]] + bth[buf[i++]] +
+ bth[buf[i++]] + bth[buf[i++]];
+}
+
+// **`v1()` - Generate time-based UUID**
+//
+// Inspired by https://github.com/LiosK/UUID.js
+// and http://docs.python.org/library/uuid.html
+
+// random #'s we need to init node and clockseq
+var _seedBytes = _rng();
+
+// Per 4.5, create and 48-bit node id, (47 random bits + multicast bit = 1)
+var _nodeId = [
+ _seedBytes[0] | 0x01,
+ _seedBytes[1], _seedBytes[2], _seedBytes[3], _seedBytes[4], _seedBytes[5]
+];
+
+// Per 4.2.2, randomize (14 bit) clockseq
+var _clockseq = (_seedBytes[6] << 8 | _seedBytes[7]) & 0x3fff;
+
+// Previous uuid creation time
+var _lastMSecs = 0, _lastNSecs = 0;
+
+// See https://github.com/broofa/node-uuid for API details
+function v1(options, buf, offset) {
+ var i = buf && offset || 0;
+ var b = buf || [];
+
+ options = options || {};
+
+ var clockseq = options.clockseq !== undefined ? options.clockseq : _clockseq;
+
+ // UUID timestamps are 100 nano-second units since the Gregorian epoch,
+ // (1582-10-15 00:00). JSNumbers aren't precise enough for this, so
+ // time is handled internally as 'msecs' (integer milliseconds) and 'nsecs'
+ // (100-nanoseconds offset from msecs) since unix epoch, 1970-01-01 00:00.
+ var msecs = options.msecs !== undefined ? options.msecs : new Date().getTime();
+
+ // Per 4.2.1.2, use count of uuid's generated during the current clock
+ // cycle to simulate higher resolution clock
+ var nsecs = options.nsecs !== undefined ? options.nsecs : _lastNSecs + 1;
+
+ // Time since last uuid creation (in msecs)
+ var dt = (msecs - _lastMSecs) + (nsecs - _lastNSecs)/10000;
+
+ // Per 4.2.1.2, Bump clockseq on clock regression
+ if (dt < 0 && options.clockseq === undefined) {
+ clockseq = clockseq + 1 & 0x3fff;
+ }
+
+ // Reset nsecs if clock regresses (new clockseq) or we've moved onto a new
+ // time interval
+ if ((dt < 0 || msecs > _lastMSecs) && options.nsecs === undefined) {
+ nsecs = 0;
+ }
+
+ // Per 4.2.1.2 Throw error if too many uuids are requested
+ if (nsecs >= 10000) {
+ throw new Error('uuid.v1(): Can\'t create more than 10M uuids/sec');
+ }
+
+ _lastMSecs = msecs;
+ _lastNSecs = nsecs;
+ _clockseq = clockseq;
+
+ // Per 4.1.4 - Convert from unix epoch to Gregorian epoch
+ msecs += 12219292800000;
+
+ // `time_low`
+ var tl = ((msecs & 0xfffffff) * 10000 + nsecs) % 0x100000000;
+ b[i++] = tl >>> 24 & 0xff;
+ b[i++] = tl >>> 16 & 0xff;
+ b[i++] = tl >>> 8 & 0xff;
+ b[i++] = tl & 0xff;
+
+ // `time_mid`
+ var tmh = (msecs / 0x100000000 * 10000) & 0xfffffff;
+ b[i++] = tmh >>> 8 & 0xff;
+ b[i++] = tmh & 0xff;
+
+ // `time_high_and_version`
+ b[i++] = tmh >>> 24 & 0xf | 0x10; // include version
+ b[i++] = tmh >>> 16 & 0xff;
+
+ // `clock_seq_hi_and_reserved` (Per 4.2.2 - include variant)
+ b[i++] = clockseq >>> 8 | 0x80;
+
+ // `clock_seq_low`
+ b[i++] = clockseq & 0xff;
+
+ // `node`
+ var node = options.node || _nodeId;
+ for (var n = 0; n < 6; n++) {
+ b[i + n] = node[n];
+ }
+
+ return buf ? buf : unparse(b);
+}
+
+// **`v4()` - Generate random UUID**
+
+// See https://github.com/broofa/node-uuid for API details
+function v4(options, buf, offset) {
+ // Deprecated - 'format' argument, as supported in v1.2
+ var i = buf && offset || 0;
+
+ if (typeof(options) == 'string') {
+ buf = options == 'binary' ? new Array(16) : null;
+ options = null;
+ }
+ options = options || {};
+
+ var rnds = options.random || (options.rng || _rng)();
+
+ // Per 4.4, set bits for version and `clock_seq_hi_and_reserved`
+ rnds[6] = (rnds[6] & 0x0f) | 0x40;
+ rnds[8] = (rnds[8] & 0x3f) | 0x80;
+
+ // Copy bytes to buffer, if provided
+ if (buf) {
+ for (var ii = 0; ii < 16; ii++) {
+ buf[i + ii] = rnds[ii];
+ }
+ }
+
+ return buf || unparse(rnds);
+}
+
+// Export public API
+var uuid = v4;
+uuid.v1 = v1;
+uuid.v4 = v4;
+uuid.parse = parse;
+uuid.unparse = unparse;
+
+module.exports = uuid;
+
+},{"./rng":110}],112:[function(require,module,exports){
+// created by @HenrikJoreteg
+var prefix;
+var version;
+
+if (window.mozRTCPeerConnection || navigator.mozGetUserMedia) {
+ prefix = 'moz';
+ version = parseInt(navigator.userAgent.match(/Firefox\/([0-9]+)\./)[1], 10);
+} else if (window.webkitRTCPeerConnection || navigator.webkitGetUserMedia) {
+ prefix = 'webkit';
+ version = navigator.userAgent.match(/Chrom(e|ium)/) && parseInt(navigator.userAgent.match(/Chrom(e|ium)\/([0-9]+)\./)[2], 10);
+}
+
+var PC = window.mozRTCPeerConnection || window.webkitRTCPeerConnection;
+var IceCandidate = window.mozRTCIceCandidate || window.RTCIceCandidate;
+var SessionDescription = window.mozRTCSessionDescription || window.RTCSessionDescription;
+var MediaStream = window.webkitMediaStream || window.MediaStream;
+var screenSharing = window.location.protocol === 'https:' &&
+ ((prefix === 'webkit' && version >= 26) ||
+ (prefix === 'moz' && version >= 33))
+var AudioContext = window.AudioContext || window.webkitAudioContext;
+var videoEl = document.createElement('video');
+var supportVp8 = videoEl && videoEl.canPlayType && videoEl.canPlayType('video/webm; codecs="vp8", vorbis') === "probably";
+var getUserMedia = navigator.getUserMedia || navigator.webkitGetUserMedia || navigator.msGetUserMedia || navigator.mozGetUserMedia;
+
+// export support flags and constructors.prototype && PC
+module.exports = {
+ prefix: prefix,
+ browserVersion: version,
+ support: !!PC && supportVp8 && !!getUserMedia,
+ // new support style
+ supportRTCPeerConnection: !!PC,
+ supportVp8: supportVp8,
+ supportGetUserMedia: !!getUserMedia,
+ supportDataChannel: !!(PC && PC.prototype && PC.prototype.createDataChannel),
+ supportWebAudio: !!(AudioContext && AudioContext.prototype.createMediaStreamSource),
+ supportMediaStream: !!(MediaStream && MediaStream.prototype.removeTrack),
+ supportScreenSharing: !!screenSharing,
+ // old deprecated style. Dont use this anymore
+ dataChannel: !!(PC && PC.prototype && PC.prototype.createDataChannel),
+ webAudio: !!(AudioContext && AudioContext.prototype.createMediaStreamSource),
+ mediaStream: !!(MediaStream && MediaStream.prototype.removeTrack),
+ screenSharing: !!screenSharing,
+ // constructors
+ AudioContext: AudioContext,
+ PeerConnection: PC,
+ SessionDescription: SessionDescription,
+ IceCandidate: IceCandidate,
+ MediaStream: MediaStream,
+ getUserMedia: getUserMedia
+};
+
+},{}],113:[function(require,module,exports){
+/*
+WildEmitter.js is a slim little event emitter by @henrikjoreteg largely based
+on @visionmedia's Emitter from UI Kit.
+
+Why? I wanted it standalone.
+
+I also wanted support for wildcard emitters like this:
+
+emitter.on('*', function (eventName, other, event, payloads) {
+
+});
+
+emitter.on('somenamespace*', function (eventName, payloads) {
+
+});
+
+Please note that callbacks triggered by wildcard registered events also get
+the event name as the first argument.
+*/
+module.exports = WildEmitter;
+
+function WildEmitter() {
+ this.isWildEmitter = true;
+ this.callbacks = {};
+}
+
+// Listen on the given `event` with `fn`. Store a group name if present.
+WildEmitter.prototype.on = function (event, groupName, fn) {
+ var hasGroup = (arguments.length === 3),
+ group = hasGroup ? arguments[1] : undefined,
+ func = hasGroup ? arguments[2] : arguments[1];
+ func._groupName = group;
+ (this.callbacks[event] = this.callbacks[event] || []).push(func);
+ return this;
+};
+
+// Adds an `event` listener that will be invoked a single
+// time then automatically removed.
+WildEmitter.prototype.once = function (event, groupName, fn) {
+ var self = this,
+ hasGroup = (arguments.length === 3),
+ group = hasGroup ? arguments[1] : undefined,
+ func = hasGroup ? arguments[2] : arguments[1];
+ function on() {
+ self.off(event, on);
+ func.apply(this, arguments);
+ }
+ this.on(event, group, on);
+ return this;
+};
+
+// Unbinds an entire group
+WildEmitter.prototype.releaseGroup = function (groupName) {
+ var item, i, len, handlers;
+ for (item in this.callbacks) {
+ handlers = this.callbacks[item];
+ for (i = 0, len = handlers.length; i < len; i++) {
+ if (handlers[i]._groupName === groupName) {
+ //console.log('removing');
+ // remove it and shorten the array we're looping through
+ handlers.splice(i, 1);
+ i--;
+ len--;
+ }
+ }
+ }
+ return this;
+};
+
+// Remove the given callback for `event` or all
+// registered callbacks.
+WildEmitter.prototype.off = function (event, fn) {
+ var callbacks = this.callbacks[event],
+ i;
+
+ if (!callbacks) return this;
+
+ // remove all handlers
+ if (arguments.length === 1) {
+ delete this.callbacks[event];
+ return this;
+ }
+
+ // remove specific handler
+ i = callbacks.indexOf(fn);
+ callbacks.splice(i, 1);
+ if (callbacks.length === 0) {
+ delete this.callbacks[event];
+ }
+ return this;
+};
+
+/// Emit `event` with the given args.
+// also calls any `*` handlers
+WildEmitter.prototype.emit = function (event) {
+ var args = [].slice.call(arguments, 1),
+ callbacks = this.callbacks[event],
+ specialCallbacks = this.getWildcardCallbacks(event),
+ i,
+ len,
+ item,
+ listeners;
+
+ if (callbacks) {
+ listeners = callbacks.slice();
+ for (i = 0, len = listeners.length; i < len; ++i) {
+ if (listeners[i]) {
+ listeners[i].apply(this, args);
+ } else {
+ break;
+ }
+ }
+ }
+
+ if (specialCallbacks) {
+ len = specialCallbacks.length;
+ listeners = specialCallbacks.slice();
+ for (i = 0, len = listeners.length; i < len; ++i) {
+ if (listeners[i]) {
+ listeners[i].apply(this, [event].concat(args));
+ } else {
+ break;
+ }
+ }
+ }
+
+ return this;
+};
+
+// Helper for for finding special wildcard event handlers that match the event
+WildEmitter.prototype.getWildcardCallbacks = function (eventName) {
+ var item,
+ split,
+ result = [];
+
+ for (item in this.callbacks) {
+ split = item.split('*');
+ if (item === '*' || (split.length === 2 && eventName.slice(0, split[0].length) === split[0])) {
+ result = result.concat(this.callbacks[item]);
+ }
+ }
+ return result;
+};
+
+},{}],114:[function(require,module,exports){
+'use strict';
+
+var extend = require('lodash.assign');
+var uuid = require('uuid');
+var ltx = require('ltx');
+
+var types = require('./lib/types');
+var helpers = require('./lib/helpers');
+var stanzaConstructor = require('./lib/stanza');
+
+
+function JXT() {
+ this._LOOKUP = {};
+ this._LOOKUP_EXT = {};
+ this._TAGS = {};
+ this._CB_DEFINITION = {};
+ this._CB_TAG = {};
+ this._ID = uuid.v4();
+ this.utils = extend({}, types, helpers);
+}
+
+JXT.prototype.use = function (init) {
+ if (!init['__JXT_LOADED_' + this._ID]) {
+ init(this);
+ }
+ init['__JXT_LOADED_' + this._ID] = true;
+ return this;
+};
+
+JXT.prototype.getDefinition = function (el, ns, required) {
+ var JXTClass = this._LOOKUP[ns + '|' + el];
+ if (required && !JXTClass) {
+ throw new Error('Could not find definition for <' + el + ' xmlns="' + ns + '" />');
+ }
+ return JXTClass;
+};
+
+JXT.prototype.getExtensions = function (el, ns) {
+ return this._LOOKUP_EXT[ns + '|' + el] || {};
+};
+
+JXT.prototype.withDefinition = function (el, ns, cb) {
+ var name = ns + '|' + el;
+ if (!this._CB_DEFINITION[name]) {
+ this._CB_DEFINITION[name] = [];
+ }
+ this._CB_DEFINITION[name].push(cb);
+
+ if (this._LOOKUP[name]) {
+ cb(this._LOOKUP[name]);
+ }
+};
+
+JXT.prototype.withTag = function (tag, cb) {
+ if (!this._CB_TAG[tag]) {
+ this._CB_TAG[tag] = [];
+ }
+ this._CB_TAG[tag].push(cb);
+
+ this.tagged(tag).forEach(function (stanza) {
+ cb(stanza);
+ });
+};
+
+JXT.prototype.tagged = function (tag) {
+ return this._TAGS[tag] || [];
+};
+
+JXT.prototype.build = function (xml) {
+ var JXTClass = this._LOOKUP[xml.namespaceURI + '|' + xml.localName];
+ if (JXTClass) {
+ return new JXTClass(null, xml);
+ }
+};
+
+JXT.prototype.parse = function (str) {
+ var xml= ltx.parse(str);
+ if (xml.nodeType !== 1) {
+ return;
+ }
+
+ var JXTClass = this.getDefinition(xml.localName, xml.namespaceURI);
+ if (JXTClass) {
+ return new JXTClass(null, xml);
+ }
+};
+
+JXT.prototype.extend = function (ParentJXT, ChildJXT, multiName) {
+ var parentName = ParentJXT.prototype._NS + '|' + ParentJXT.prototype._EL;
+ var name = ChildJXT.prototype._name;
+ var qName = ChildJXT.prototype._NS + '|' + ChildJXT.prototype._EL;
+
+ this._LOOKUP[qName] = ChildJXT;
+ if (!this._LOOKUP_EXT[qName]) {
+ this._LOOKUP_EXT[qName] = {};
+ }
+ if (!this._LOOKUP_EXT[parentName]) {
+ this._LOOKUP_EXT[parentName] = {};
+ }
+ this._LOOKUP_EXT[parentName][name] = ChildJXT;
+
+ this.add(ParentJXT, name, types.extension(ChildJXT));
+ if (multiName) {
+ this.add(ParentJXT, multiName, types.multiExtension(ChildJXT));
+ }
+};
+
+JXT.prototype.add = function (ParentJXT, fieldName, field) {
+ field.enumerable = true;
+ Object.defineProperty(ParentJXT.prototype, fieldName, field);
+};
+
+JXT.prototype.define = function (opts) {
+ var self = this;
+
+ var Stanza = stanzaConstructor(this, opts);
+
+ var ns = Stanza.prototype._NS;
+ var el = Stanza.prototype._EL;
+ var tags = Stanza.prototype._TAGS;
+
+ var name = ns + '|' + el;
+ this._LOOKUP[name] = Stanza;
+
+ tags.forEach(function (tag) {
+ if (!self._TAGS[tag]) {
+ self._TAGS[tag] = [];
+ }
+ self._TAGS[tag].push(Stanza);
+ });
+
+ var fieldNames = Object.keys(opts.fields || {});
+ fieldNames.forEach(function (fieldName) {
+ self.add(Stanza, fieldName, opts.fields[fieldName]);
+ });
+
+ if (this._CB_DEFINITION[name]) {
+ this._CB_DEFINITION[name].forEach(function (handler) {
+ handler(Stanza);
+ });
+ }
+
+ tags.forEach(function (tag) {
+ if (self._CB_TAG[tag]) {
+ self._CB_TAG[tag].forEach(function (handler) {
+ handler(Stanza);
+ });
+ }
+ });
+
+ return Stanza;
+};
+
+
+// Expose methods on the required module itself
+
+
+JXT.createRegistry = function () {
+ return new JXT();
+};
+
+extend(JXT, helpers);
+extend(JXT, types);
+
+// Compatibility shim for JXT 1.x
+
+var globalJXT = new JXT();
+
+JXT.define = globalJXT.define.bind(globalJXT);
+JXT.extend = globalJXT.extend.bind(globalJXT);
+JXT.add = globalJXT.add.bind(globalJXT);
+JXT.parse = globalJXT.parse.bind(globalJXT);
+JXT.build = globalJXT.build.bind(globalJXT);
+JXT.getExtensions = globalJXT.getExtensions.bind(globalJXT);
+JXT.getDefinition = globalJXT.getDefinition.bind(globalJXT);
+JXT.withDefinition = globalJXT.withDefinition.bind(globalJXT);
+JXT.withTag = globalJXT.withTag.bind(globalJXT);
+JXT.tagged = globalJXT.tagged.bind(globalJXT);
+
+JXT.getGlobalJXT = function () {
+ return globalJXT;
+};
+
+module.exports = JXT;
+
+},{"./lib/helpers":115,"./lib/stanza":116,"./lib/types":117,"lodash.assign":118,"ltx":131,"uuid":136}],115:[function(require,module,exports){
+'use strict';
+
+var ltx = require('ltx');
+
+var XML_NS = exports.XML_NS = 'http://www.w3.org/XML/1998/namespace';
+
+
+exports.createElement = function (NS, name, parentNS) {
+ var el = new ltx.Element(name);
+ if (!parentNS || parentNS !== NS) {
+ exports.setAttribute(el, 'xmlns', NS);
+ }
+ return el;
+};
+
+var find = exports.find = function (xml, NS, selector) {
+ var results = [];
+ var children = xml.getElementsByTagName(selector);
+ for (var i = 0, len = children.length; i < len; i++) {
+ var child = children[i];
+ if (child.namespaceURI === NS && child.parentNode === xml) {
+ results.push(child);
+ }
+ }
+ return results;
+};
+
+exports.findOrCreate = function (xml, NS, selector) {
+ var existing = exports.find(xml, NS, selector);
+ if (existing.length) {
+ return existing[0];
+ } else {
+ var created = exports.createElement(NS, selector, xml.namespaceURI);
+ xml.appendChild(created);
+ return created;
+ }
+};
+
+exports.getAttribute = function (xml, attr, defaultVal) {
+ return xml.getAttribute(attr) || defaultVal || '';
+};
+
+exports.getAttributeNS = function (xml, NS, attr, defaultVal) {
+ return xml.getAttributeNS(NS, attr) || defaultVal || '';
+};
+
+exports.setAttribute = function (xml, attr, value, force) {
+ if (value || force) {
+ xml.setAttribute(attr, value);
+ } else {
+ xml.removeAttribute(attr);
+ }
+};
+
+exports.setAttributeNS = function (xml, NS, attr, value, force) {
+ if (value || force) {
+ xml.setAttributeNS(NS, attr, value);
+ } else {
+ xml.removeAttributeNS(NS, attr);
+ }
+};
+
+exports.getBoolAttribute = function (xml, attr, defaultVal) {
+ var val = xml.getAttribute(attr) || defaultVal || '';
+ return val === 'true' || val === '1';
+};
+
+exports.setBoolAttribute = function (xml, attr, value) {
+ if (value) {
+ xml.setAttribute(attr, '1');
+ } else {
+ xml.removeAttribute(attr);
+ }
+};
+
+exports.getSubAttribute = function (xml, NS, sub, attr, defaultVal) {
+ var subs = find(xml, NS, sub);
+ if (!subs) {
+ return '';
+ }
+
+ for (var i = 0; i < subs.length; i++) {
+ return subs[i].getAttribute(attr) || defaultVal || '';
+ }
+
+ return '';
+};
+
+exports.setSubAttribute = function (xml, NS, sub, attr, value) {
+ var subs = find(xml, NS, sub);
+ if (!subs.length) {
+ if (value) {
+ sub = exports.createElement(NS, sub, xml.namespaceURI);
+ sub.setAttribute(attr, value);
+ xml.appendChild(sub);
+ }
+ } else {
+ for (var i = 0; i < subs.length; i++) {
+ if (value) {
+ subs[i].setAttribute(attr, value);
+ return;
+ } else {
+ subs[i].removeAttribute(attr);
+ }
+ }
}
- if (RTC === null) {
- try { console.log('Browser does not appear to be WebRTC-capable'); } catch (e) { }
+};
+
+exports.getBoolSubAttribute = function (xml, NS, sub, attr, defaultVal) {
+ var val = xml.getSubAttribute(NS, sub, attr) || defaultVal || '';
+ return val === 'true' || val === '1';
+};
+
+exports.setBoolSubAttribute = function (xml, NS, sub, attr, value) {
+ value = value ? '1' : '';
+ exports.setSubAttribute(xml, NS, sub, attr, value);
+};
+
+exports.getText = function (xml) {
+ return xml.textContent;
+};
+
+exports.setText = function (xml, value) {
+ xml.textContent = value;
+};
+
+exports.getSubText = exports.getTextSub = function (xml, NS, element, defaultVal) {
+ var subs = find(xml, NS, element);
+
+ defaultVal = defaultVal || '';
+
+ if (!subs.length) {
+ return defaultVal;
}
- return RTC;
+
+ return subs[0].textContent || defaultVal;
};
-getUserMediaWithConstraints = function(um, resolution, bandwidth, fps) {
- var constraints = {audio: false, video: false};
+exports.setSubText = exports.setTextSub = function (xml, NS, element, value) {
+ var subs = find(xml, NS, element);
+ if (subs.length) {
+ for (var i = 0; i < subs.length; i++) {
+ xml.removeChild(subs[i]);
+ }
+ }
- if (um.indexOf('video') >= 0) {
- constraints.video = {mandatory: {}};// same behaviour as true
+ if (value) {
+ var sub = exports.createElement(NS, element, xml.namespaceURI);
+ if (value !== true) {
+ sub.textContent = value;
+ }
+ xml.appendChild(sub);
}
- if (um.indexOf('audio') >= 0) {
- constraints.audio = {};// same behaviour as true
+};
+
+exports.getMultiSubText = function (xml, NS, element, extractor) {
+ var subs = find(xml, NS, element);
+ var results = [];
+
+ extractor = extractor || function (sub) {
+ return sub.textContent || '';
+ };
+
+ for (var i = 0; i < subs.length; i++) {
+ results.push(extractor(subs[i]));
}
- if (um.indexOf('screen') >= 0) {
- constraints.video = {
- "mandatory": {
- "chromeMediaSource": "screen"
+
+ return results;
+};
+
+exports.setMultiSubText = function (xml, NS, element, value, builder) {
+ var subs = find(xml, NS, element);
+ var values = [];
+ builder = builder || function (value) {
+ if (value) {
+ var sub = exports.createElement(NS, element, xml.namespaceURI);
+ sub.textContent = value;
+ xml.appendChild(sub);
+ }
+ };
+ if (typeof value === 'string') {
+ values = (value || '').split('\n');
+ } else {
+ values = value;
+ }
+
+ var i, len;
+ for(i = 0, len = subs.length; i < len; i++) {
+ xml.removeChild(subs[i]);
+ }
+
+ for(i = 0, len = values.length; i < len; i++) {
+ builder(values[i]);
+ }
+};
+
+exports.getMultiSubAttribute = function (xml, NS, element, attr) {
+ return exports.getMultiSubText(xml, NS, element, function (sub) {
+ return exports.getAttribute(sub, attr);
+ });
+};
+
+exports.setMultiSubAttribute = function (xml, NS, element, attr, value) {
+ exports.setMultiSubText(xml, NS, element, value, function (val) {
+ var sub = exports.createElement(NS, element, xml.namespaceURI);
+ exports.setAttribute(sub, attr, val);
+ xml.appendChild(sub);
+ });
+};
+
+exports.getSubLangText = function (xml, NS, element, defaultLang) {
+ var subs = find(xml, NS, element);
+ if (!subs.length) {
+ return {};
+ }
+
+ var lang, sub;
+ var results = {};
+ var langs = [];
+
+ for (var i = 0; i < subs.length; i++) {
+ sub = subs[i];
+ lang = sub.getAttributeNS(XML_NS, 'lang') || defaultLang;
+ langs.push(lang);
+ results[lang] = sub.textContent || '';
+ }
+
+ return results;
+};
+
+exports.setSubLangText = function (xml, NS, element, value, defaultLang) {
+ var sub, lang;
+ var subs = find(xml, NS, element);
+ if (subs.length) {
+ for (var i = 0; i < subs.length; i++) {
+ xml.removeChild(subs[i]);
+ }
+ }
+
+ if (typeof value === 'string') {
+ sub = exports.createElement(NS, element, xml.namespaceURI);
+ sub.textContent = value;
+ xml.appendChild(sub);
+ } else if (typeof value === 'object') {
+ for (lang in value) {
+ if (value.hasOwnProperty(lang)) {
+ sub = exports.createElement(NS, element, xml.namespaceURI);
+ if (lang !== defaultLang) {
+ sub.setAttributeNS(XML_NS, 'lang', lang);
+ }
+ sub.textContent = value[lang];
+ xml.appendChild(sub);
+ }
+ }
+ }
+};
+
+exports.getBoolSub = function (xml, NS, element) {
+ var subs = find(xml, NS, element);
+ return !!subs.length;
+};
+
+exports.setBoolSub = function (xml, NS, element, value) {
+ var subs = find(xml, NS, element);
+ if (!subs.length) {
+ if (value) {
+ var sub = exports.createElement(NS, element, xml.namespaceURI);
+ xml.appendChild(sub);
+ }
+ } else {
+ for (var i = 0; i < subs.length; i++) {
+ if (value) {
+ return;
+ } else {
+ xml.removeChild(subs[i]);
+ }
+ }
+ }
+};
+
+},{"ltx":131}],116:[function(require,module,exports){
+'use strict';
+
+var helpers = require('./helpers');
+var extend = require('lodash.assign');
+
+
+var EXCLUDE = {
+ constructor: true,
+ parent: true,
+ prototype: true,
+ toJSON: true,
+ toString: true,
+ xml: true
+};
+
+
+module.exports = function (JXT, opts) {
+ function Stanza(data, xml, parent) {
+ var self = this;
+
+ var parentNode = (xml || {}).parentNode || (parent || {}).xml;
+ var parentNS = (parentNode || {}).namespaceURI;
+
+ self.xml = xml || helpers.createElement(self._NS, self._EL, parentNS);
+
+ Object.keys(self._PREFIXES).forEach(function (prefix) {
+ var namespace = self._PREFIXES[prefix];
+ self.xml.setAttribute('xmlns:' + prefix, namespace);
+ });
+
+ self._extensions = {};
+
+ for (var i = 0, len = self.xml.childNodes.length; i < len; i++) {
+ var child = self.xml.childNodes[i];
+ var ChildJXT = JXT.getDefinition(child.localName, child.namespaceURI);
+ if (ChildJXT !== undefined) {
+ var name = ChildJXT.prototype._name;
+ self._extensions[name] = new ChildJXT(null, child);
+ self._extensions[name].parent = self;
+ }
+ }
+
+ extend(self, data);
+
+ if (opts.init) {
+ opts.init.apply(self, [data]);
+ }
+
+ return self;
+ }
+
+
+ Stanza.prototype._name = opts.name;
+ Stanza.prototype._eventname = opts.eventName;
+ Stanza.prototype._NS = opts.namespace;
+ Stanza.prototype._EL = opts.element || opts.name;
+ Stanza.prototype._PREFIXES = opts.prefixes || {};
+ Stanza.prototype._TAGS = opts.tags || [];
+
+ Stanza.prototype.toString = function () {
+ return this.xml.toString();
+ };
+
+ Stanza.prototype.toJSON = function () {
+ var prop;
+ var result = {};
+
+ for (prop in this._extensions) {
+ if (this._extensions[prop].toJSON && prop[0] !== '_') {
+ result[prop] = this._extensions[prop].toJSON();
+ }
+ }
+
+ for (prop in this) {
+ var allowedName = !EXCLUDE[prop] && prop[0] !== '_';
+ var isExtensionName = JXT.getExtensions(this._EL, this._NS)[prop];
+
+ if (allowedName && !isExtensionName) {
+ var val = this[prop];
+ if (typeof val === 'function') {
+ continue;
+ }
+ var type = Object.prototype.toString.call(val);
+ if (type.indexOf('Object') >= 0) {
+ if (Object.keys(val).length > 0) {
+ result[prop] = val;
+ }
+ } else if (type.indexOf('Array') >= 0) {
+ if (val.length > 0) {
+ var vals = [];
+ var len = val.length;
+ for (var n = 0; n < len; n++) {
+ var nval = val[n];
+ if (typeof nval !== 'undefined') {
+ if (nval.toJSON !== undefined) {
+ vals.push(nval.toJSON());
+ } else {
+ vals.push(nval);
+ }
+ }
+ }
+ result[prop] = vals;
+ }
+ } else if (val !== undefined && val !== false && val !== '') {
+ result[prop] = val;
+ }
+ }
+ }
+
+ return result;
+ };
+
+ return Stanza;
+};
+
+},{"./helpers":115,"lodash.assign":118}],117:[function(require,module,exports){
+(function (Buffer){
+'use strict';
+
+var helpers = require('./helpers');
+var extend = require('lodash.assign');
+
+var find = helpers.find;
+var createElement = helpers.createElement;
+
+
+var field = exports.field = function (getter, setter) {
+ return function () {
+ var args = Array.prototype.slice.call(arguments);
+ return {
+ get: function () {
+ return getter.apply(null, [this.xml].concat(args));
+ },
+ set: function (value) {
+ setter.apply(null, ([this.xml].concat(args)).concat([value]));
}
};
+ };
+};
+
+exports.boolAttribute = field(
+ helpers.getBoolAttribute,
+ helpers.setBoolAttribute);
+
+exports.subAttribute = field(
+ helpers.getSubAttribute,
+ helpers.setSubAttribute);
+
+exports.boolSubAttribute = field(
+ helpers.getSubBoolAttribute,
+ helpers.setSubBoolAttribute);
+
+exports.text = field(
+ helpers.getText,
+ helpers.setText);
+
+exports.textSub = exports.subText = field(
+ helpers.getSubText,
+ helpers.setSubText);
+
+exports.multiTextSub = exports.multiSubText = field(
+ helpers.getMultiSubText,
+ helpers.setMultiSubText);
+
+exports.multiSubAttribute = field(
+ helpers.getMultiSubAttribute,
+ helpers.setMultiSubAttribute);
+
+exports.langTextSub = exports.subLangText = field(
+ helpers.getSubLangText,
+ helpers.setSubLangText);
+
+exports.boolSub = field(
+ helpers.getBoolSub,
+ helpers.setBoolSub);
+
+exports.langAttribute = field(
+ function (xml) {
+ return xml.getAttributeNS(helpers.XML_NS, 'lang') || '';
+ },
+ function (xml, value) {
+ xml.setAttributeNS(helpers.XML_NS, 'lang', value);
}
+);
- if (resolution && !constraints.video) {
- constraints.video = {mandatory: {}};// same behaviour as true
+exports.b64Text = field(
+ function (xml) {
+ if (xml.textContent && xml.textContent !== '=') {
+ return new Buffer(xml.textContent, 'base64');
+ }
+ return '';
+ },
+ function (xml, value) {
+ if (typeof value === 'string') {
+ var b64 = (new Buffer(value)).toString('base64');
+ xml.textContent = b64 || '=';
+ } else {
+ xml.textContent = '';
+ }
}
- // see https://code.google.com/p/chromium/issues/detail?id=143631#c9 for list of supported resolutions
- switch (resolution) {
- // 16:9 first
- case '1080':
- case 'fullhd':
- constraints.video.mandatory.minWidth = 1920;
- constraints.video.mandatory.minHeight = 1080;
- break;
- case '720':
- case 'hd':
- constraints.video.mandatory.minWidth = 1280;
- constraints.video.mandatory.minHeight = 720;
- break;
- case '360':
- constraints.video.mandatory.minWidth = 640;
- constraints.video.mandatory.minHeight = 360;
- break;
- case '180':
- constraints.video.mandatory.minWidth = 320;
- constraints.video.mandatory.minHeight = 180;
- break;
- // 4:3
- case '960':
- constraints.video.mandatory.minWidth = 960;
- constraints.video.mandatory.minHeight = 720;
- break;
- case '640':
- case 'vga':
- constraints.video.mandatory.minWidth = 640;
- constraints.video.mandatory.minHeight = 480;
- break;
- case '320':
- constraints.video.mandatory.minWidth = 320;
- constraints.video.mandatory.minHeight = 240;
- break;
- default:
- if (navigator.userAgent.indexOf('Android') != -1) {
- constraints.video.mandatory.minWidth = 320;
- constraints.video.mandatory.minHeight = 240;
- constraints.video.mandatory.maxFrameRate = 15;
+);
+
+exports.dateAttribute = function (attr, now) {
+ return {
+ get: function () {
+ var data = helpers.getAttribute(this.xml, attr);
+ if (data) {
+ return new Date(data);
+ }
+ if (now) {
+ return new Date(Date.now());
+ }
+ },
+ set: function (value) {
+ if (!value) {
+ return;
+ }
+ if (typeof value !== 'string') {
+ value = value.toISOString();
+ }
+ helpers.setAttribute(this.xml, attr, value);
}
- break;
+ };
+};
+
+exports.dateSub = function (NS, sub, now) {
+ return {
+ get: function () {
+ var data = helpers.getSubText(this.xml, NS, sub);
+ if (data) {
+ return new Date(data);
+ }
+ if (now) {
+ return new Date(Date.now());
+ }
+ },
+ set: function (value) {
+ if (!value) {
+ return;
+ }
+ if (typeof value !== 'string') {
+ value = value.toISOString();
+ }
+ helpers.setSubText(this.xml, NS, sub, value);
+ }
+ };
+};
+
+exports.dateSubAttribute = function (NS, sub, attr, now) {
+ return {
+ get: function () {
+ var data = helpers.getSubAttribute(this.xml, NS, sub, attr);
+ if (data) {
+ return new Date(data);
+ }
+ if (now) {
+ return new Date(Date.now());
+ }
+ },
+ set: function (value) {
+ if (!value) {
+ return;
+ }
+ if (typeof value !== 'string') {
+ value = value.toISOString();
+ }
+ helpers.setSubAttribute(this.xml, NS, sub, attr, value);
+ }
+ };
+};
+
+exports.numberAttribute = function (attr, isFloat, defaultVal) {
+ return {
+ get: function () {
+ var parse = isFloat ? parseFloat : parseInt;
+ var data = helpers.getAttribute(this.xml, attr, '');
+ if (!data) {
+ return defaultVal;
+ }
+ var parsed = parse(data, 10);
+ if (isNaN(parsed)) {
+ return defaultVal;
+ }
+
+ return parsed;
+ },
+ set: function (value) {
+ helpers.setAttribute(this.xml, attr, value.toString());
+ }
+ };
+};
+
+exports.numberSub = function (NS, sub, isFloat, defaultVal) {
+ return {
+ get: function () {
+ var parse = isFloat ? parseFloat : parseInt;
+ var data = helpers.getSubText(this.xml, NS, sub, '');
+ if (!data) {
+ return defaultVal;
+ }
+
+ var parsed = parse(data, 10);
+ if (isNaN(parsed)) {
+ return defaultVal;
+ }
+
+ return parsed;
+ },
+ set: function (value) {
+ helpers.setSubText(this.xml, NS, sub, value.toString());
+ }
+ };
+};
+
+exports.attribute = function (name, defaultVal) {
+ return {
+ get: function () {
+ return helpers.getAttribute(this.xml, name, defaultVal);
+ },
+ set: function (value) {
+ helpers.setAttribute(this.xml, name, value);
+ }
+ };
+};
+
+exports.attributeNS = function (NS, name, defaultVal) {
+ return {
+ get: function () {
+ return helpers.getAttributeNS(this.xml, NS, name, defaultVal);
+ },
+ set: function (value) {
+ helpers.setAttributeNS(this.xml, NS, name, value);
+ }
+ };
+};
+
+exports.extension = function (ChildJXT) {
+ return {
+ get: function () {
+ var self = this;
+ var name = ChildJXT.prototype._name;
+ if (!this._extensions[name]) {
+ var existing = find(this.xml, ChildJXT.prototype._NS, ChildJXT.prototype._EL);
+ if (!existing.length) {
+ this._extensions[name] = new ChildJXT({}, null, self);
+ this.xml.appendChild(this._extensions[name].xml);
+ } else {
+ this._extensions[name] = new ChildJXT(null, existing[0], self);
+ }
+ this._extensions[name].parent = this;
+ }
+ return this._extensions[name];
+ },
+ set: function (value) {
+ if (value) {
+ var child = this[ChildJXT.prototype._name];
+ if (value === true) {
+ value = {};
+ }
+ extend(child, value);
+ }
+ }
+ };
+};
+
+exports.multiExtension = function (ChildJXT) {
+ return {
+ get: function () {
+ var self = this;
+ var data = find(this.xml, ChildJXT.prototype._NS, ChildJXT.prototype._EL);
+ var results = [];
+
+ for (var i = 0, len = data.length; i < len; i++) {
+ results.push(new ChildJXT({}, data[i], self));
+ }
+
+ return results;
+ },
+ set: function (value) {
+ value = value || [];
+
+ var self = this;
+ var existing = find(this.xml, ChildJXT.prototype._NS, ChildJXT.prototype._EL);
+
+ var i, len;
+ for (i = 0, len = existing.length; i < len; i++) {
+ self.xml.removeChild(existing[i]);
+ }
+
+ for (i = 0, len = value.length; i < len; i++) {
+ var content = new ChildJXT(value[i], null, self);
+ self.xml.appendChild(content.xml);
+ }
+ }
+ };
+};
+
+exports.enumSub = function (NS, enumValues) {
+ return {
+ get: function () {
+ var self = this;
+ var result = [];
+ enumValues.forEach(function (enumVal) {
+ var exists = find(self.xml, NS, enumVal);
+ if (exists.length) {
+ result.push(exists[0].nodeName);
+ }
+ });
+ return result[0] || '';
+ },
+ set: function (value) {
+ var self = this;
+ enumValues.forEach(function (enumVal) {
+ var exists = find(self.xml, NS, enumVal);
+ if (exists.length) {
+ self.xml.removeChild(exists[0]);
+ }
+ });
+
+ if (value) {
+ var condition = createElement(NS, value);
+ this.xml.appendChild(condition);
+ }
+ }
+ };
+};
+
+exports.subExtension = function (name, NS, sub, ChildJXT) {
+ return {
+ get: function () {
+ if (!this._extensions[name]) {
+ var wrapper = find(this.xml, NS, sub);
+ if (!wrapper.length) {
+ wrapper= createElement(NS, sub, this._NS);
+ this.xml.appendChild(wrapper);
+ } else {
+ wrapper = wrapper[0];
+ }
+
+ var existing = find(wrapper, ChildJXT.prototype._NS, ChildJXT.prototype._EL);
+ if (!existing.length) {
+ this._extensions[name] = new ChildJXT({}, null, {xml: wrapper});
+ wrapper.appendChild(this._extensions[name].xml);
+ } else {
+ this._extensions[name] = new ChildJXT(null, existing[0], {xml: wrapper});
+ }
+ this._extensions[name].parent = this;
+ }
+ return this._extensions[name];
+ },
+ set: function (value) {
+ var wrapper = find(this.xml, NS, sub);
+ if (wrapper.length && !value) {
+ this.xml.removeChild(wrapper[0]);
+ }
+
+ if (value) {
+ var child = this[name];
+ if (value === true) {
+ value = {};
+ }
+ extend(child, value);
+ }
+ }
+ };
+};
+
+exports.subMultiExtension = function (NS, sub, ChildJXT) {
+ return {
+ get: function () {
+ var self = this;
+ var results = [];
+ var existing = find(this.xml, NS, sub);
+ if (!existing.length) {
+ return results;
+ }
+ existing = existing[0];
+ var data = find(existing, ChildJXT.prototype._NS, ChildJXT.prototype._EL);
+
+ data.forEach(function (xml) {
+ results.push(new ChildJXT({}, xml, self));
+ });
+ return results;
+ },
+ set: function (values) {
+ var self = this;
+ var existing = find(this.xml, NS, sub);
+ if (existing.length) {
+ self.xml.removeChild(existing[0]);
+ }
+
+ if (!values.length) {
+ return;
+ }
+
+ existing = createElement(NS, sub, this._NS);
+
+ values.forEach(function (value) {
+ var content = new ChildJXT(value, null, self);
+ existing.appendChild(content.xml);
+ });
+
+ self.xml.appendChild(existing);
+ }
+ };
+};
+
+}).call(this,require("buffer").Buffer)
+},{"./helpers":115,"buffer":2,"lodash.assign":118}],118:[function(require,module,exports){
+/**
+ * lodash 3.2.0 (Custom Build) <https://lodash.com/>
+ * Build: `lodash modern modularize exports="npm" -o ./`
+ * Copyright 2012-2015 The Dojo Foundation <http://dojofoundation.org/>
+ * Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>
+ * Copyright 2009-2015 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
+ * Available under MIT license <https://lodash.com/license>
+ */
+var baseAssign = require('lodash._baseassign'),
+ createAssigner = require('lodash._createassigner'),
+ keys = require('lodash.keys');
+
+/**
+ * A specialized version of `_.assign` for customizing assigned values without
+ * support for argument juggling, multiple sources, and `this` binding `customizer`
+ * functions.
+ *
+ * @private
+ * @param {Object} object The destination object.
+ * @param {Object} source The source object.
+ * @param {Function} customizer The function to customize assigned values.
+ * @returns {Object} Returns `object`.
+ */
+function assignWith(object, source, customizer) {
+ var index = -1,
+ props = keys(source),
+ length = props.length;
+
+ while (++index < length) {
+ var key = props[index],
+ value = object[key],
+ result = customizer(value, source[key], key, object, source);
+
+ if ((result === result ? (result !== value) : (value === value)) ||
+ (value === undefined && !(key in object))) {
+ object[key] = result;
}
+ }
+ return object;
+}
+
+/**
+ * Assigns own enumerable properties of source object(s) to the destination
+ * object. Subsequent sources overwrite property assignments of previous sources.
+ * If `customizer` is provided it is invoked to produce the assigned values.
+ * The `customizer` is bound to `thisArg` and invoked with five arguments:
+ * (objectValue, sourceValue, key, object, source).
+ *
+ * **Note:** This method mutates `object` and is based on
+ * [`Object.assign`](https://people.mozilla.org/~jorendorff/es6-draft.html#sec-object.assign).
+ *
+ * @static
+ * @memberOf _
+ * @alias extend
+ * @category Object
+ * @param {Object} object The destination object.
+ * @param {...Object} [sources] The source objects.
+ * @param {Function} [customizer] The function to customize assigned values.
+ * @param {*} [thisArg] The `this` binding of `customizer`.
+ * @returns {Object} Returns `object`.
+ * @example
+ *
+ * _.assign({ 'user': 'barney' }, { 'age': 40 }, { 'user': 'fred' });
+ * // => { 'user': 'fred', 'age': 40 }
+ *
+ * // using a customizer callback
+ * var defaults = _.partialRight(_.assign, function(value, other) {
+ * return _.isUndefined(value) ? other : value;
+ * });
+ *
+ * defaults({ 'user': 'barney' }, { 'age': 36 }, { 'user': 'fred' });
+ * // => { 'user': 'barney', 'age': 36 }
+ */
+var assign = createAssigner(function(object, source, customizer) {
+ return customizer
+ ? assignWith(object, source, customizer)
+ : baseAssign(object, source);
+});
+
+module.exports = assign;
+
+},{"lodash._baseassign":119,"lodash._createassigner":121,"lodash.keys":125}],119:[function(require,module,exports){
+/**
+ * lodash 3.2.0 (Custom Build) <https://lodash.com/>
+ * Build: `lodash modern modularize exports="npm" -o ./`
+ * Copyright 2012-2015 The Dojo Foundation <http://dojofoundation.org/>
+ * Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>
+ * Copyright 2009-2015 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
+ * Available under MIT license <https://lodash.com/license>
+ */
+var baseCopy = require('lodash._basecopy'),
+ keys = require('lodash.keys');
+
+/**
+ * The base implementation of `_.assign` without support for argument juggling,
+ * multiple sources, and `customizer` functions.
+ *
+ * @private
+ * @param {Object} object The destination object.
+ * @param {Object} source The source object.
+ * @returns {Object} Returns `object`.
+ */
+function baseAssign(object, source) {
+ return source == null
+ ? object
+ : baseCopy(source, keys(source), object);
+}
+
+module.exports = baseAssign;
+
+},{"lodash._basecopy":120,"lodash.keys":125}],120:[function(require,module,exports){
+/**
+ * lodash 3.0.1 (Custom Build) <https://lodash.com/>
+ * Build: `lodash modern modularize exports="npm" -o ./`
+ * Copyright 2012-2015 The Dojo Foundation <http://dojofoundation.org/>
+ * Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>
+ * Copyright 2009-2015 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
+ * Available under MIT license <https://lodash.com/license>
+ */
+
+/**
+ * Copies properties of `source` to `object`.
+ *
+ * @private
+ * @param {Object} source The object to copy properties from.
+ * @param {Array} props The property names to copy.
+ * @param {Object} [object={}] The object to copy properties to.
+ * @returns {Object} Returns `object`.
+ */
+function baseCopy(source, props, object) {
+ object || (object = {});
- // take what is configured and try not to be more intelligent
- if (constraints.video.minWidth) constraints.video.maxWidth = constraints.video.minWidth;
- if (constraints.video.minHeight) constraints.video.maxHeight = constraints.video.minHeight;
+ var index = -1,
+ length = props.length;
- if (bandwidth) { // doesn't work currently, see webrtc issue 1846
- if (!constraints.video) constraints.video = {mandatory: {}};//same behaviour as true
- constraints.video.optional = [{bandwidth: bandwidth}];
+ while (++index < length) {
+ var key = props[index];
+ object[key] = source[key];
+ }
+ return object;
+}
+
+module.exports = baseCopy;
+
+},{}],121:[function(require,module,exports){
+/**
+ * lodash 3.1.1 (Custom Build) <https://lodash.com/>
+ * Build: `lodash modern modularize exports="npm" -o ./`
+ * Copyright 2012-2015 The Dojo Foundation <http://dojofoundation.org/>
+ * Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>
+ * Copyright 2009-2015 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
+ * Available under MIT license <https://lodash.com/license>
+ */
+var bindCallback = require('lodash._bindcallback'),
+ isIterateeCall = require('lodash._isiterateecall'),
+ restParam = require('lodash.restparam');
+
+/**
+ * Creates a function that assigns properties of source object(s) to a given
+ * destination object.
+ *
+ * **Note:** This function is used to create `_.assign`, `_.defaults`, and `_.merge`.
+ *
+ * @private
+ * @param {Function} assigner The function to assign values.
+ * @returns {Function} Returns the new assigner function.
+ */
+function createAssigner(assigner) {
+ return restParam(function(object, sources) {
+ var index = -1,
+ length = object == null ? 0 : sources.length,
+ customizer = length > 2 ? sources[length - 2] : undefined,
+ guard = length > 2 ? sources[2] : undefined,
+ thisArg = length > 1 ? sources[length - 1] : undefined;
+
+ if (typeof customizer == 'function') {
+ customizer = bindCallback(customizer, thisArg, 5);
+ length -= 2;
+ } else {
+ customizer = typeof thisArg == 'function' ? thisArg : undefined;
+ length -= (customizer ? 1 : 0);
}
- if (fps) { // for some cameras it might be necessary to request 30fps
- // so they choose 30fps mjpg over 10fps yuy2
- if (!constraints.video) constraints.video = {mandatory: {}};// same behaviour as tru;
- constraints.video.mandatory.minFrameRate = fps;
+ if (guard && isIterateeCall(sources[0], sources[1], guard)) {
+ customizer = length < 3 ? undefined : customizer;
+ length = 1;
}
-
+ while (++index < length) {
+ var source = sources[index];
+ if (source) {
+ assigner(object, source, customizer);
+ }
+ }
+ return object;
+ });
+}
+
+module.exports = createAssigner;
+
+},{"lodash._bindcallback":122,"lodash._isiterateecall":123,"lodash.restparam":124}],122:[function(require,module,exports){
+arguments[4][54][0].apply(exports,arguments)
+},{"dup":54}],123:[function(require,module,exports){
+/**
+ * lodash 3.0.9 (Custom Build) <https://lodash.com/>
+ * Build: `lodash modern modularize exports="npm" -o ./`
+ * Copyright 2012-2015 The Dojo Foundation <http://dojofoundation.org/>
+ * Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>
+ * Copyright 2009-2015 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
+ * Available under MIT license <https://lodash.com/license>
+ */
+
+/** Used to detect unsigned integer values. */
+var reIsUint = /^\d+$/;
+
+/**
+ * Used as the [maximum length](https://people.mozilla.org/~jorendorff/es6-draft.html#sec-number.max_safe_integer)
+ * of an array-like value.
+ */
+var MAX_SAFE_INTEGER = 9007199254740991;
+
+/**
+ * The base implementation of `_.property` without support for deep paths.
+ *
+ * @private
+ * @param {string} key The key of the property to get.
+ * @returns {Function} Returns the new function.
+ */
+function baseProperty(key) {
+ return function(object) {
+ return object == null ? undefined : object[key];
+ };
+}
+
+/**
+ * Gets the "length" property value of `object`.
+ *
+ * **Note:** This function is used to avoid a [JIT bug](https://bugs.webkit.org/show_bug.cgi?id=142792)
+ * that affects Safari on at least iOS 8.1-8.3 ARM64.
+ *
+ * @private
+ * @param {Object} object The object to query.
+ * @returns {*} Returns the "length" value.
+ */
+var getLength = baseProperty('length');
+
+/**
+ * Checks if `value` is array-like.
+ *
+ * @private
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is array-like, else `false`.
+ */
+function isArrayLike(value) {
+ return value != null && isLength(getLength(value));
+}
+
+/**
+ * Checks if `value` is a valid array-like index.
+ *
+ * @private
+ * @param {*} value The value to check.
+ * @param {number} [length=MAX_SAFE_INTEGER] The upper bounds of a valid index.
+ * @returns {boolean} Returns `true` if `value` is a valid index, else `false`.
+ */
+function isIndex(value, length) {
+ value = (typeof value == 'number' || reIsUint.test(value)) ? +value : -1;
+ length = length == null ? MAX_SAFE_INTEGER : length;
+ return value > -1 && value % 1 == 0 && value < length;
+}
+
+/**
+ * Checks if the provided arguments are from an iteratee call.
+ *
+ * @private
+ * @param {*} value The potential iteratee value argument.
+ * @param {*} index The potential iteratee index or key argument.
+ * @param {*} object The potential iteratee object argument.
+ * @returns {boolean} Returns `true` if the arguments are from an iteratee call, else `false`.
+ */
+function isIterateeCall(value, index, object) {
+ if (!isObject(object)) {
+ return false;
+ }
+ var type = typeof index;
+ if (type == 'number'
+ ? (isArrayLike(object) && isIndex(index, object.length))
+ : (type == 'string' && index in object)) {
+ var other = object[index];
+ return value === value ? (value === other) : (other !== other);
+ }
+ return false;
+}
+
+/**
+ * Checks if `value` is a valid array-like length.
+ *
+ * **Note:** This function is based on [`ToLength`](https://people.mozilla.org/~jorendorff/es6-draft.html#sec-tolength).
+ *
+ * @private
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is a valid length, else `false`.
+ */
+function isLength(value) {
+ return typeof value == 'number' && value > -1 && value % 1 == 0 && value <= MAX_SAFE_INTEGER;
+}
+
+/**
+ * Checks if `value` is the [language type](https://es5.github.io/#x8) of `Object`.
+ * (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`)
+ *
+ * @static
+ * @memberOf _
+ * @category Lang
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is an object, else `false`.
+ * @example
+ *
+ * _.isObject({});
+ * // => true
+ *
+ * _.isObject([1, 2, 3]);
+ * // => true
+ *
+ * _.isObject(1);
+ * // => false
+ */
+function isObject(value) {
+ // Avoid a V8 JIT bug in Chrome 19-20.
+ // See https://code.google.com/p/v8/issues/detail?id=2291 for more details.
+ var type = typeof value;
+ return !!value && (type == 'object' || type == 'function');
+}
+
+module.exports = isIterateeCall;
+
+},{}],124:[function(require,module,exports){
+/**
+ * lodash 3.6.1 (Custom Build) <https://lodash.com/>
+ * Build: `lodash modern modularize exports="npm" -o ./`
+ * Copyright 2012-2015 The Dojo Foundation <http://dojofoundation.org/>
+ * Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>
+ * Copyright 2009-2015 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
+ * Available under MIT license <https://lodash.com/license>
+ */
+
+/** Used as the `TypeError` message for "Functions" methods. */
+var FUNC_ERROR_TEXT = 'Expected a function';
+
+/* Native method references for those with the same name as other `lodash` methods. */
+var nativeMax = Math.max;
+
+/**
+ * Creates a function that invokes `func` with the `this` binding of the
+ * created function and arguments from `start` and beyond provided as an array.
+ *
+ * **Note:** This method is based on the [rest parameter](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Functions/rest_parameters).
+ *
+ * @static
+ * @memberOf _
+ * @category Function
+ * @param {Function} func The function to apply a rest parameter to.
+ * @param {number} [start=func.length-1] The start position of the rest parameter.
+ * @returns {Function} Returns the new function.
+ * @example
+ *
+ * var say = _.restParam(function(what, names) {
+ * return what + ' ' + _.initial(names).join(', ') +
+ * (_.size(names) > 1 ? ', & ' : '') + _.last(names);
+ * });
+ *
+ * say('hello', 'fred', 'barney', 'pebbles');
+ * // => 'hello fred, barney, & pebbles'
+ */
+function restParam(func, start) {
+ if (typeof func != 'function') {
+ throw new TypeError(FUNC_ERROR_TEXT);
+ }
+ start = nativeMax(start === undefined ? (func.length - 1) : (+start || 0), 0);
+ return function() {
+ var args = arguments,
+ index = -1,
+ length = nativeMax(args.length - start, 0),
+ rest = Array(length);
+
+ while (++index < length) {
+ rest[index] = args[start + index];
+ }
+ switch (start) {
+ case 0: return func.call(this, rest);
+ case 1: return func.call(this, args[0], rest);
+ case 2: return func.call(this, args[0], args[1], rest);
+ }
+ var otherArgs = Array(start + 1);
+ index = -1;
+ while (++index < start) {
+ otherArgs[index] = args[index];
+ }
+ otherArgs[start] = rest;
+ return func.apply(this, otherArgs);
+ };
+}
+
+module.exports = restParam;
+
+},{}],125:[function(require,module,exports){
+arguments[4][51][0].apply(exports,arguments)
+},{"dup":51,"lodash._getnative":126,"lodash.isarguments":127,"lodash.isarray":128}],126:[function(require,module,exports){
+arguments[4][52][0].apply(exports,arguments)
+},{"dup":52}],127:[function(require,module,exports){
+arguments[4][53][0].apply(exports,arguments)
+},{"dup":53}],128:[function(require,module,exports){
+arguments[4][55][0].apply(exports,arguments)
+},{"dup":55}],129:[function(require,module,exports){
+'use strict';
+
+var util = require('util')
+ , Element = require('./element').Element
+
+function DOMElement(name, attrs) {
+ Element.call(this, name, attrs)
+
+ this.nodeType = 1
+ this.nodeName = this.localName
+}
+
+util.inherits(DOMElement, Element)
+
+DOMElement.prototype._getElement = function(name, attrs) {
+ var element = new DOMElement(name, attrs)
+ return element
+}
+
+Object.defineProperty(DOMElement.prototype, 'localName', {
+ get: function () {
+ return this.getName()
+ }
+})
+
+Object.defineProperty(DOMElement.prototype, 'namespaceURI', {
+ get: function () {
+ return this.getNS()
+ }
+})
+
+Object.defineProperty(DOMElement.prototype, 'parentNode', {
+ get: function () {
+ return this.parent
+ }
+})
+
+Object.defineProperty(DOMElement.prototype, 'childNodes', {
+ get: function () {
+ return this.children
+ }
+})
+
+Object.defineProperty(DOMElement.prototype, 'textContent', {
+ get: function () {
+ return this.getText()
+ },
+ set: function (value) {
+ this.children.push(value)
+ }
+})
+
+DOMElement.prototype.getElementsByTagName = function (name) {
+ return this.getChildren(name)
+}
+
+DOMElement.prototype.getAttribute = function (name) {
+ return this.getAttr(name)
+}
+
+DOMElement.prototype.setAttribute = function (name, value) {
+ this.attr(name, value)
+}
+
+DOMElement.prototype.getAttributeNS = function (ns, name) {
+ if (ns === 'http://www.w3.org/XML/1998/namespace') {
+ return this.getAttr(['xml', name].join(':'))
+ }
+ return this.getAttr(name, ns)
+}
+
+DOMElement.prototype.setAttributeNS = function (ns, name, value) {
+ var prefix
+ if (ns === 'http://www.w3.org/XML/1998/namespace') {
+ prefix = 'xml'
+ } else {
+ var nss = this.getXmlns()
+ prefix = nss[ns] || ''
+ }
+ if (prefix) {
+ this.attr([prefix, name].join(':'), value)
+ }
+}
+
+DOMElement.prototype.removeAttribute = function (name) {
+ this.attr(name, null)
+}
+
+DOMElement.prototype.removeAttributeNS = function (ns, name) {
+ var prefix
+ if (ns === 'http://www.w3.org/XML/1998/namespace') {
+ prefix = 'xml'
+ } else {
+ var nss = this.getXmlns()
+ prefix = nss[ns] || ''
+ }
+ if (prefix) {
+ this.attr([prefix, name].join(':'), null)
+ }
+}
+
+DOMElement.prototype.appendChild = function (el) {
+ this.cnode(el)
+}
+
+DOMElement.prototype.removeChild = function (el) {
+ this.remove(el)
+}
+
+module.exports = DOMElement
+
+},{"./element":130,"util":24}],130:[function(require,module,exports){
+'use strict';
+
+/**
+ * This cheap replica of DOM/Builder puts me to shame :-)
+ *
+ * Attributes are in the element.attrs object. Children is a list of
+ * either other Elements or Strings for text content.
+ **/
+function Element(name, attrs) {
+ this.name = name
+ this.parent = null
+ this.children = []
+ this.setAttrs(attrs)
+}
+
+/*** Accessors ***/
+
+/**
+ * if (element.is('message', 'jabber:client')) ...
+ **/
+Element.prototype.is = function(name, xmlns) {
+ return (this.getName() === name) &&
+ (!xmlns || (this.getNS() === xmlns))
+}
+
+/* without prefix */
+Element.prototype.getName = function() {
+ if (this.name.indexOf(':') >= 0) {
+ return this.name.substr(this.name.indexOf(':') + 1)
+ } else {
+ return this.name
+ }
+}
+
+/**
+ * retrieves the namespace of the current element, upwards recursively
+ **/
+Element.prototype.getNS = function() {
+ if (this.name.indexOf(':') >= 0) {
+ var prefix = this.name.substr(0, this.name.indexOf(':'))
+ return this.findNS(prefix)
+ }
+ return this.findNS()
+}
+
+/**
+ * find the namespace to the given prefix, upwards recursively
+ **/
+Element.prototype.findNS = function(prefix) {
+ if (!prefix) {
+ /* default namespace */
+ if (this.attrs.xmlns) {
+ return this.attrs.xmlns
+ } else if (this.parent) {
+ return this.parent.findNS()
+ }
+ } else {
+ /* prefixed namespace */
+ var attr = 'xmlns:' + prefix
+ if (this.attrs[attr]) {
+ return this.attrs[attr]
+ } else if (this.parent) {
+ return this.parent.findNS(prefix)
+ }
+ }
+}
+
+/**
+ * Recursiverly gets all xmlns defined, in the form of {url:prefix}
+ **/
+Element.prototype.getXmlns = function() {
+ var namespaces = {}
+
+ if (this.parent) {
+ namespaces = this.parent.getXmlns()
+ }
+
+ for (var attr in this.attrs) {
+ var m = attr.match('xmlns:?(.*)')
+ if (this.attrs.hasOwnProperty(attr) && m) {
+ namespaces[this.attrs[attr]] = m[1]
+ }
+ }
+ return namespaces
+}
+
+Element.prototype.setAttrs = function(attrs) {
+ this.attrs = {}
+
+ if (typeof attrs === 'string')
+ this.attrs.xmlns = attrs
+ else if (attrs) {
+ Object.keys(attrs).forEach(function(key) {
+ this.attrs[key] = attrs[key]
+ }, this)
+ }
+}
+
+/**
+ * xmlns can be null, returns the matching attribute.
+ **/
+Element.prototype.getAttr = function(name, xmlns) {
+ if (!xmlns) {
+ return this.attrs[name]
+ }
+
+ var namespaces = this.getXmlns()
+
+ if (!namespaces[xmlns]) {
+ return null
+ }
+
+ return this.attrs[[namespaces[xmlns], name].join(':')]
+}
+
+/**
+ * xmlns can be null
+ **/
+Element.prototype.getChild = function(name, xmlns) {
+ return this.getChildren(name, xmlns)[0]
+}
+
+/**
+ * xmlns can be null
+ **/
+Element.prototype.getChildren = function(name, xmlns) {
+ var result = []
+ for (var i = 0; i < this.children.length; i++) {
+ var child = this.children[i]
+ if (child.getName &&
+ (child.getName() === name) &&
+ (!xmlns || (child.getNS() === xmlns)))
+ result.push(child)
+ }
+ return result
+}
+
+/**
+ * xmlns and recursive can be null
+ **/
+Element.prototype.getChildByAttr = function(attr, val, xmlns, recursive) {
+ return this.getChildrenByAttr(attr, val, xmlns, recursive)[0]
+}
+
+/**
+ * xmlns and recursive can be null
+ **/
+Element.prototype.getChildrenByAttr = function(attr, val, xmlns, recursive) {
+ var result = []
+ for (var i = 0; i < this.children.length; i++) {
+ var child = this.children[i]
+ if (child.attrs &&
+ (child.attrs[attr] === val) &&
+ (!xmlns || (child.getNS() === xmlns)))
+ result.push(child)
+ if (recursive && child.getChildrenByAttr) {
+ result.push(child.getChildrenByAttr(attr, val, xmlns, true))
+ }
+ }
+ if (recursive) {
+ result = [].concat.apply([], result)
+ }
+ return result
+}
+
+Element.prototype.getChildrenByFilter = function(filter, recursive) {
+ var result = []
+ for (var i = 0; i < this.children.length; i++) {
+ var child = this.children[i]
+ if (filter(child))
+ result.push(child)
+ if (recursive && child.getChildrenByFilter){
+ result.push(child.getChildrenByFilter(filter, true))
+ }
+ }
+ if (recursive) {
+ result = [].concat.apply([], result)
+ }
+ return result
+}
+
+Element.prototype.getText = function() {
+ var text = ''
+ for (var i = 0; i < this.children.length; i++) {
+ var child = this.children[i]
+ if ((typeof child === 'string') || (typeof child === 'number')) {
+ text += child
+ }
+ }
+ return text
+}
+
+Element.prototype.getChildText = function(name, xmlns) {
+ var child = this.getChild(name, xmlns)
+ return child ? child.getText() : null
+}
+
+/**
+ * Return all direct descendents that are Elements.
+ * This differs from `getChildren` in that it will exclude text nodes,
+ * processing instructions, etc.
+ */
+Element.prototype.getChildElements = function() {
+ return this.getChildrenByFilter(function(child) {
+ return child instanceof Element
+ })
+}
+
+/*** Builder ***/
+
+/** returns uppermost parent */
+Element.prototype.root = function() {
+ if (this.parent) {
+ return this.parent.root()
+ }
+ return this
+}
+Element.prototype.tree = Element.prototype.root
+
+/** just parent or itself */
+Element.prototype.up = function() {
+ if (this.parent) {
+ return this.parent
+ }
+ return this
+}
+
+Element.prototype._getElement = function(name, attrs) {
+ var element = new Element(name, attrs)
+ return element
+}
+
+/** create child node and return it */
+Element.prototype.c = function(name, attrs) {
+ return this.cnode(this._getElement(name, attrs))
+}
+
+Element.prototype.cnode = function(child) {
+ this.children.push(child)
+ if (typeof child === 'object') {
+ child.parent = this
+ }
+ return child
+}
+
+/** add text node and return element */
+Element.prototype.t = function(text) {
+ this.children.push(text)
+ return this
+}
+
+/*** Manipulation ***/
+
+/**
+ * Either:
+ * el.remove(childEl)
+ * el.remove('author', 'urn:...')
+ */
+Element.prototype.remove = function(el, xmlns) {
+ var filter
+ if (typeof el === 'string') {
+ /* 1st parameter is tag name */
+ filter = function(child) {
+ return !(child.is &&
+ child.is(el, xmlns))
+ }
+ } else {
+ /* 1st parameter is element */
+ filter = function(child) {
+ return child !== el
+ }
+ }
+
+ this.children = this.children.filter(filter)
+
+ return this
+}
+
+/**
+ * To use in case you want the same XML data for separate uses.
+ * Please refrain from this practise unless you know what you are
+ * doing. Building XML with ltx is easy!
+ */
+Element.prototype.clone = function() {
+ var clone = this._getElement(this.name, this.attrs)
+ for (var i = 0; i < this.children.length; i++) {
+ var child = this.children[i]
+ clone.cnode(child.clone ? child.clone() : child)
+ }
+ return clone
+}
+
+Element.prototype.text = function(val) {
+ if (val && this.children.length === 1) {
+ this.children[0] = val
+ return this
+ }
+ return this.getText()
+}
+
+Element.prototype.attr = function(attr, val) {
+ if (((typeof val !== 'undefined') || (val === null))) {
+ if (!this.attrs) {
+ this.attrs = {}
+ }
+ this.attrs[attr] = val
+ return this
+ }
+ return this.attrs[attr]
+}
+
+/*** Serialization ***/
+
+Element.prototype.toString = function() {
+ var s = ''
+ this.write(function(c) {
+ s += c
+ })
+ return s
+}
+
+Element.prototype.toJSON = function() {
+ return {
+ name: this.name,
+ attrs: this.attrs,
+ children: this.children.map(function(child) {
+ return child && child.toJSON ? child.toJSON() : child
+ })
+ }
+}
+
+Element.prototype._addChildren = function(writer) {
+ writer('>')
+ for (var i = 0; i < this.children.length; i++) {
+ var child = this.children[i]
+ /* Skip null/undefined */
+ if (child || (child === 0)) {
+ if (child.write) {
+ child.write(writer)
+ } else if (typeof child === 'string') {
+ writer(escapeXmlText(child))
+ } else if (child.toString) {
+ writer(escapeXmlText(child.toString(10)))
+ }
+ }
+ }
+ writer('</')
+ writer(this.name)
+ writer('>')
+}
+
+Element.prototype.write = function(writer) {
+ writer('<')
+ writer(this.name)
+ for (var k in this.attrs) {
+ var v = this.attrs[k]
+ if (v || (v === '') || (v === 0)) {
+ writer(' ')
+ writer(k)
+ writer('="')
+ if (typeof v !== 'string') {
+ v = v.toString(10)
+ }
+ writer(escapeXml(v))
+ writer('"')
+ }
+ }
+ if (this.children.length === 0) {
+ writer('/>')
+ } else {
+ this._addChildren(writer)
+ }
+}
+
+function escapeXml(s) {
+ return s.
+ replace(/\&/g, '&amp;').
+ replace(/</g, '&lt;').
+ replace(/>/g, '&gt;').
+ replace(/"/g, '&quot;').
+ replace(/"/g, '&apos;')
+}
+
+function escapeXmlText(s) {
+ return s.
+ replace(/\&/g, '&amp;').
+ replace(/</g, '&lt;').
+ replace(/>/g, '&gt;')
+}
+
+exports.Element = Element
+exports.escapeXml = escapeXml
+
+},{}],131:[function(require,module,exports){
+'use strict';
+
+/* Cause browserify to bundle SAX parsers: */
+var parse = require('./parse')
+
+parse.availableSaxParsers.push(parse.bestSaxParser = require('./sax/sax_ltx'))
+
+/* SHIM */
+module.exports = require('./index')
+},{"./index":132,"./parse":133,"./sax/sax_ltx":134}],132:[function(require,module,exports){
+'use strict';
+
+var parse = require('./parse')
+
+/**
+ * The only (relevant) data structure
+ */
+exports.Element = require('./dom-element')
+
+/**
+ * Helper
+ */
+exports.escapeXml = require('./element').escapeXml
+
+/**
+ * DOM parser interface
+ */
+exports.parse = parse.parse
+exports.Parser = parse.Parser
+
+/**
+ * SAX parser interface
+ */
+exports.availableSaxParsers = parse.availableSaxParsers
+exports.bestSaxParser = parse.bestSaxParser
+
+},{"./dom-element":129,"./element":130,"./parse":133}],133:[function(require,module,exports){
+'use strict';
+
+var events = require('events')
+ , util = require('util')
+ , DOMElement = require('./dom-element')
+
+
+exports.availableSaxParsers = []
+exports.bestSaxParser = null
+
+var saxParsers = [
+ './sax/sax_expat.js',
+ './sax/sax_ltx.js',
+ /*'./sax_easysax.js', './sax_node-xml.js',*/
+ './sax/sax_saxjs.js'
+]
+
+saxParsers.forEach(function(modName) {
+ var mod
try {
- RTC.getUserMedia(constraints,
- function (stream) {
- console.log('onUserMediaSuccess');
- $(document).trigger('mediaready.jingle', [stream]);
- },
- function (error) {
- console.warn('Failed to get access to local media. Error ', error);
- $(document).trigger('mediafailure.jingle', [error]);
- });
+ mod = require(modName)
} catch (e) {
- console.error('GUM failed: ', e);
- $(document).trigger('mediafailure.jingle');
+ /* Silently missing libraries drop for debug:
+ console.error(e.stack || e)
+ */
+ }
+ if (mod) {
+ exports.availableSaxParsers.push(mod)
+ if (!exports.bestSaxParser) {
+ exports.bestSaxParser = mod
+ }
+ }
+})
+
+exports.Parser = function(saxParser) {
+ events.EventEmitter.call(this)
+ var self = this
+
+ var ParserMod = saxParser || exports.bestSaxParser
+ if (!ParserMod) {
+ throw new Error('No SAX parser available')
+ }
+ this.parser = new ParserMod()
+
+ var el
+ this.parser.addListener('startElement', function(name, attrs) {
+ var child = new DOMElement(name, attrs)
+ if (!el) {
+ el = child
+ } else {
+ el = el.cnode(child)
+ }
+ })
+ this.parser.addListener('endElement', function(name) {
+ /* jshint -W035 */
+ if (!el) {
+ /* Err */
+ } else if (name === el.name) {
+ if (el.parent) {
+ el = el.parent
+ } else if (!self.tree) {
+ self.tree = el
+ el = undefined
+ }
+ }
+ /* jshint +W035 */
+ })
+ this.parser.addListener('text', function(str) {
+ if (el) {
+ el.t(str)
+ }
+ })
+ this.parser.addListener('error', function(e) {
+ self.error = e
+ self.emit('error', e)
+ })
+}
+
+util.inherits(exports.Parser, events.EventEmitter)
+
+exports.Parser.prototype.write = function(data) {
+ this.parser.write(data)
+}
+
+exports.Parser.prototype.end = function(data) {
+ this.parser.end(data)
+
+ if (!this.error) {
+ if (this.tree) {
+ this.emit('tree', this.tree)
+ } else {
+ this.emit('error', new Error('Incomplete document'))
+ }
+ }
+}
+
+exports.parse = function(data, saxParser) {
+ var p = new exports.Parser(saxParser)
+ var result = null
+ , error = null
+
+ p.on('tree', function(tree) {
+ result = tree
+ })
+ p.on('error', function(e) {
+ error = e
+ })
+
+ p.write(data)
+ p.end()
+
+ if (error) {
+ throw error
+ } else {
+ return result
}
}
+
+},{"./dom-element":129,"events":6,"util":24}],134:[function(require,module,exports){
+'use strict';
+
+var util = require('util')
+ , events = require('events')
+
+var STATE_TEXT = 0,
+ STATE_IGNORE_TAG = 1,
+ STATE_TAG_NAME = 2,
+ STATE_TAG = 3,
+ STATE_ATTR_NAME = 4,
+ STATE_ATTR_EQ = 5,
+ STATE_ATTR_QUOT = 6,
+ STATE_ATTR_VALUE = 7
+
+var SaxLtx = module.exports = function SaxLtx() {
+ events.EventEmitter.call(this)
+
+ var state = STATE_TEXT, remainder
+ var tagName, attrs, endTag, selfClosing, attrQuote
+ var recordStart = 0
+ var attrName
+
+ this._handleTagOpening = function(endTag, tagName, attrs) {
+ if (!endTag) {
+ this.emit('startElement', tagName, attrs)
+ if (selfClosing) {
+ this.emit('endElement', tagName)
+ }
+ } else {
+ this.emit('endElement', tagName)
+ }
+ }
+
+ this.write = function(data) {
+ /* jshint -W071 */
+ /* jshint -W074 */
+ if (typeof data !== 'string') {
+ data = data.toString()
+ }
+ var pos = 0
+
+ /* Anything from previous write()? */
+ if (remainder) {
+ data = remainder + data
+ pos += remainder.length
+ remainder = null
+ }
+
+ function endRecording() {
+ if (typeof recordStart === 'number') {
+ var recorded = data.slice(recordStart, pos)
+ recordStart = undefined
+ return recorded
+ }
+ }
+
+ for(; pos < data.length; pos++) {
+ var c = data.charCodeAt(pos)
+ //console.log("state", state, "c", c, data[pos])
+ switch(state) {
+ case STATE_TEXT:
+ if (c === 60 /* < */) {
+ var text = endRecording()
+ if (text) {
+ this.emit('text', unescapeXml(text))
+ }
+ state = STATE_TAG_NAME
+ recordStart = pos + 1
+ attrs = {}
+ }
+ break
+ case STATE_TAG_NAME:
+ if (c === 47 /* / */ && recordStart === pos) {
+ recordStart = pos + 1
+ endTag = true
+ } else if (c === 33 /* ! */ || c === 63 /* ? */) {
+ recordStart = undefined
+ state = STATE_IGNORE_TAG
+ } else if (c <= 32 || c === 47 /* / */ || c === 62 /* > */) {
+ tagName = endRecording()
+ pos--
+ state = STATE_TAG
+ }
+ break
+ case STATE_IGNORE_TAG:
+ if (c === 62 /* > */) {
+ state = STATE_TEXT
+ }
+ break
+ case STATE_TAG:
+ if (c === 62 /* > */) {
+ this._handleTagOpening(endTag, tagName, attrs)
+ tagName = undefined
+ attrs = undefined
+ endTag = undefined
+ selfClosing = undefined
+ state = STATE_TEXT
+ recordStart = pos + 1
+ } else if (c === 47 /* / */) {
+ selfClosing = true
+ } else if (c > 32) {
+ recordStart = pos
+ state = STATE_ATTR_NAME
+ }
+ break
+ case STATE_ATTR_NAME:
+ if (c <= 32 || c === 61 /* = */) {
+ attrName = endRecording()
+ pos--
+ state = STATE_ATTR_EQ
+ }
+ break
+ case STATE_ATTR_EQ:
+ if (c === 61 /* = */) {
+ state = STATE_ATTR_QUOT
+ }
+ break
+ case STATE_ATTR_QUOT:
+ if (c === 34 /* " */ || c === 39 /* ' */) {
+ attrQuote = c
+ state = STATE_ATTR_VALUE
+ recordStart = pos + 1
+ }
+ break
+ case STATE_ATTR_VALUE:
+ if (c === attrQuote) {
+ var value = unescapeXml(endRecording())
+ attrs[attrName] = value
+ attrName = undefined
+ state = STATE_TAG
+ }
+ break
+ }
+ }
+
+ if (typeof recordStart === 'number' &&
+ recordStart <= data.length) {
+
+ remainder = data.slice(recordStart)
+ recordStart = 0
+ }
+ }
+
+ /*var origEmit = this.emit
+ this.emit = function() {
+ console.log('ltx', arguments)
+ origEmit.apply(this, arguments)
+ }*/
+}
+util.inherits(SaxLtx, events.EventEmitter)
+
+
+SaxLtx.prototype.end = function(data) {
+ if (data) {
+ this.write(data)
+ }
+
+ /* Uh, yeah */
+ this.write = function() {}
+}
+
+function unescapeXml(s) {
+ return s.
+ replace(/\&(amp|#38);/g, '&').
+ replace(/\&(lt|#60);/g, '<').
+ replace(/\&(gt|#62);/g, '>').
+ replace(/\&(quot|#34);/g, '"').
+ replace(/\&(apos|#39);/g, '\'').
+ replace(/\&(nbsp|#160);/g, '\n')
+}
+
+},{"events":6,"util":24}],135:[function(require,module,exports){
+arguments[4][110][0].apply(exports,arguments)
+},{"dup":110}],136:[function(require,module,exports){
+arguments[4][111][0].apply(exports,arguments)
+},{"./rng":135,"dup":111}],137:[function(require,module,exports){
+/*
+ * Copyright (c) 2014 The WebRTC project authors. All Rights Reserved.
+ *
+ * Use of this source code is governed by a BSD-style license
+ * that can be found in the LICENSE file in the root of the source
+ * tree.
+ */
+
+/* More information about these options at jshint.com/docs/options */
+/* jshint browser: true, camelcase: true, curly: true, devel: true,
+ eqeqeq: true, forin: false, globalstrict: true, node: true,
+ quotmark: single, undef: true, unused: strict */
+/* global mozRTCIceCandidate, mozRTCPeerConnection, Promise,
+mozRTCSessionDescription, webkitRTCPeerConnection, MediaStreamTrack */
+/* exported trace,requestUserMedia */
+
+'use strict';
+
+var getUserMedia = null;
+var attachMediaStream = null;
+var reattachMediaStream = null;
+var webrtcDetectedBrowser = null;
+var webrtcDetectedVersion = null;
+var webrtcMinimumVersion = null;
+
+function trace(text) {
+ // This function is used for logging.
+ if (text[text.length - 1] === '\n') {
+ text = text.substring(0, text.length - 1);
+ }
+ if (window.performance) {
+ var now = (window.performance.now() / 1000).toFixed(3);
+ console.log(now + ': ' + text);
+ } else {
+ console.log(text);
+ }
+}
+
+if (navigator.mozGetUserMedia) {
+ console.log('This appears to be Firefox');
+
+ webrtcDetectedBrowser = 'firefox';
+
+ // the detected firefox version.
+ webrtcDetectedVersion =
+ parseInt(navigator.userAgent.match(/Firefox\/([0-9]+)\./)[1], 10);
+
+ // the minimum firefox version still supported by adapter.
+ webrtcMinimumVersion = 31;
+
+ // The RTCPeerConnection object.
+ window.RTCPeerConnection = function(pcConfig, pcConstraints) {
+ if (webrtcDetectedVersion < 38) {
+ // .urls is not supported in FF < 38.
+ // create RTCIceServers with a single url.
+ if (pcConfig && pcConfig.iceServers) {
+ var newIceServers = [];
+ for (var i = 0; i < pcConfig.iceServers.length; i++) {
+ var server = pcConfig.iceServers[i];
+ if (server.hasOwnProperty('urls')) {
+ for (var j = 0; j < server.urls.length; j++) {
+ var newServer = {
+ url: server.urls[j]
+ };
+ if (server.urls[j].indexOf('turn') === 0) {
+ newServer.username = server.username;
+ newServer.credential = server.credential;
+ }
+ newIceServers.push(newServer);
+ }
+ } else {
+ newIceServers.push(pcConfig.iceServers[i]);
+ }
+ }
+ pcConfig.iceServers = newIceServers;
+ }
+ }
+ return new mozRTCPeerConnection(pcConfig, pcConstraints);
+ };
+
+ // The RTCSessionDescription object.
+ window.RTCSessionDescription = mozRTCSessionDescription;
+
+ // The RTCIceCandidate object.
+ window.RTCIceCandidate = mozRTCIceCandidate;
+
+ // getUserMedia constraints shim.
+ getUserMedia = (webrtcDetectedVersion < 38) ?
+ function(c, onSuccess, onError) {
+ var constraintsToFF37 = function(c) {
+ if (typeof c !== 'object' || c.require) {
+ return c;
+ }
+ var require = [];
+ Object.keys(c).forEach(function(key) {
+ var r = c[key] = (typeof c[key] === 'object') ?
+ c[key] : {ideal: c[key]};
+ if (r.exact !== undefined) {
+ r.min = r.max = r.exact;
+ delete r.exact;
+ }
+ if (r.min !== undefined || r.max !== undefined) {
+ require.push(key);
+ }
+ if (r.ideal !== undefined) {
+ c.advanced = c.advanced || [];
+ var oc = {};
+ oc[key] = {min: r.ideal, max: r.ideal};
+ c.advanced.push(oc);
+ delete r.ideal;
+ if (!Object.keys(r).length) {
+ delete c[key];
+ }
+ }
+ });
+ if (require.length) {
+ c.require = require;
+ }
+ return c;
+ };
+ console.log('spec: ' + JSON.stringify(c));
+ c.audio = constraintsToFF37(c.audio);
+ c.video = constraintsToFF37(c.video);
+ console.log('ff37: ' + JSON.stringify(c));
+ return navigator.mozGetUserMedia(c, onSuccess, onError);
+ } : navigator.mozGetUserMedia.bind(navigator);
+
+ navigator.getUserMedia = getUserMedia;
+
+ // Shim for mediaDevices on older versions.
+ if (!navigator.mediaDevices) {
+ navigator.mediaDevices = {getUserMedia: requestUserMedia,
+ addEventListener: function() { },
+ removeEventListener: function() { }
+ };
+ }
+ navigator.mediaDevices.enumerateDevices =
+ navigator.mediaDevices.enumerateDevices || function() {
+ return new Promise(function(resolve) {
+ var infos = [
+ {kind: 'audioinput', deviceId: 'default', label:'', groupId:''},
+ {kind: 'videoinput', deviceId: 'default', label:'', groupId:''}
+ ];
+ resolve(infos);
+ });
+ };
+
+ if (webrtcDetectedVersion < 41) {
+ // Work around http://bugzil.la/1169665
+ var orgEnumerateDevices =
+ navigator.mediaDevices.enumerateDevices.bind(navigator.mediaDevices);
+ navigator.mediaDevices.enumerateDevices = function() {
+ return orgEnumerateDevices().catch(function(e) {
+ if (e.name === 'NotFoundError') {
+ return [];
+ }
+ throw e;
+ });
+ };
+ }
+ // Attach a media stream to an element.
+ attachMediaStream = function(element, stream) {
+ console.log('Attaching media stream');
+ element.mozSrcObject = stream;
+ };
+
+ reattachMediaStream = function(to, from) {
+ console.log('Reattaching media stream');
+ to.mozSrcObject = from.mozSrcObject;
+ };
+
+} else if (navigator.webkitGetUserMedia) {
+ console.log('This appears to be Chrome');
+
+ webrtcDetectedBrowser = 'chrome';
+
+ // the detected chrome version.
+ webrtcDetectedVersion =
+ parseInt(navigator.userAgent.match(/Chrom(e|ium)\/([0-9]+)\./)[2], 10);
+
+ // the minimum chrome version still supported by adapter.
+ webrtcMinimumVersion = 38;
+
+ // The RTCPeerConnection object.
+ window.RTCPeerConnection = function(pcConfig, pcConstraints) {
+ return new webkitRTCPeerConnection(pcConfig, pcConstraints);
+ };
+ // add promise support
+ ['createOffer', 'createAnswer'].forEach(function(method) {
+ var nativeMethod = webkitRTCPeerConnection.prototype[method];
+ webkitRTCPeerConnection.prototype[method] = function() {
+ var self = this;
+ if (arguments.length < 1 || (arguments.length === 1 &&
+ typeof(arguments[0]) === 'object')) {
+ var opts = arguments.length === 1 ? arguments[0] : undefined;
+ return new Promise(function(resolve, reject) {
+ nativeMethod.apply(self, [resolve, reject, opts]);
+ });
+ } else {
+ return nativeMethod.apply(this, arguments);
+ }
+ };
+ });
+
+ ['setLocalDescription', 'setRemoteDescription',
+ 'addIceCandidate'].forEach(function(method) {
+ var nativeMethod = webkitRTCPeerConnection.prototype[method];
+ webkitRTCPeerConnection.prototype[method] = function() {
+ var args = arguments;
+ var self = this;
+ return new Promise(function(resolve, reject) {
+ nativeMethod.apply(self, [args[0],
+ function() {
+ resolve();
+ if (args.length >= 2) {
+ args[1].apply(null, []);
+ }
+ },
+ function(err) {
+ reject(err);
+ if (args.length >= 3) {
+ args[2].apply(null, [err]);
+ }
+ }]
+ );
+ });
+ };
+ });
+
+ // getUserMedia constraints shim.
+ getUserMedia = function(c, onSuccess, onError) {
+ var constraintsToChrome = function(c) {
+ if (typeof c !== 'object' || c.mandatory || c.optional) {
+ return c;
+ }
+ var cc = {};
+ Object.keys(c).forEach(function(key) {
+ if (key === 'require' || key === 'advanced') {
+ return;
+ }
+ var r = (typeof c[key] === 'object') ? c[key] : {ideal: c[key]};
+ if (r.exact !== undefined && typeof r.exact === 'number') {
+ r.min = r.max = r.exact;
+ }
+ var oldname = function(prefix, name) {
+ if (prefix) {
+ return prefix + name.charAt(0).toUpperCase() + name.slice(1);
+ }
+ return (name === 'deviceId') ? 'sourceId' : name;
+ };
+ if (r.ideal !== undefined) {
+ cc.optional = cc.optional || [];
+ var oc = {};
+ if (typeof r.ideal === 'number') {
+ oc[oldname('min', key)] = r.ideal;
+ cc.optional.push(oc);
+ oc = {};
+ oc[oldname('max', key)] = r.ideal;
+ cc.optional.push(oc);
+ } else {
+ oc[oldname('', key)] = r.ideal;
+ cc.optional.push(oc);
+ }
+ }
+ if (r.exact !== undefined && typeof r.exact !== 'number') {
+ cc.mandatory = cc.mandatory || {};
+ cc.mandatory[oldname('', key)] = r.exact;
+ } else {
+ ['min', 'max'].forEach(function(mix) {
+ if (r[mix] !== undefined) {
+ cc.mandatory = cc.mandatory || {};
+ cc.mandatory[oldname(mix, key)] = r[mix];
+ }
+ });
+ }
+ });
+ if (c.advanced) {
+ cc.optional = (cc.optional || []).concat(c.advanced);
+ }
+ return cc;
+ };
+ console.log('spec: ' + JSON.stringify(c)); // whitespace for alignment
+ c.audio = constraintsToChrome(c.audio);
+ c.video = constraintsToChrome(c.video);
+ console.log('chrome: ' + JSON.stringify(c));
+ return navigator.webkitGetUserMedia(c, onSuccess, onError);
+ };
+ navigator.getUserMedia = getUserMedia;
+
+ // Attach a media stream to an element.
+ attachMediaStream = function(element, stream) {
+ if (typeof element.srcObject !== 'undefined') {
+ element.srcObject = stream;
+ } else if (typeof element.src !== 'undefined') {
+ element.src = URL.createObjectURL(stream);
+ } else {
+ console.log('Error attaching stream to element.');
+ }
+ };
+
+ reattachMediaStream = function(to, from) {
+ to.src = from.src;
+ };
+
+ if (!navigator.mediaDevices) {
+ navigator.mediaDevices = {getUserMedia: requestUserMedia,
+ enumerateDevices: function() {
+ return new Promise(function(resolve) {
+ var kinds = {audio: 'audioinput', video: 'videoinput'};
+ return MediaStreamTrack.getSources(function(devices) {
+ resolve(devices.map(function(device) {
+ return {label: device.label,
+ kind: kinds[device.kind],
+ deviceId: device.id,
+ groupId: ''};
+ }));
+ });
+ });
+ }};
+ // in case someone wants to listen for the devicechange event.
+ navigator.mediaDevices.addEventListener = function() { };
+ navigator.mediaDevices.removeEventListener = function() { };
+ }
+} else if (navigator.mediaDevices && navigator.userAgent.match(
+ /Edge\/(\d+).(\d+)$/)) {
+ console.log('This appears to be Edge');
+ webrtcDetectedBrowser = 'edge';
+
+ webrtcDetectedVersion =
+ parseInt(navigator.userAgent.match(/Edge\/(\d+).(\d+)$/)[2], 10);
+
+ // the minimum version still supported by adapter.
+ webrtcMinimumVersion = 12;
+
+ attachMediaStream = function(element, stream) {
+ element.srcObject = stream;
+ };
+ reattachMediaStream = function(to, from) {
+ to.srcObject = from.srcObject;
+ };
+} else {
+ console.log('Browser does not appear to be WebRTC-capable');
+}
+
+// Returns the result of getUserMedia as a Promise.
+function requestUserMedia(constraints) {
+ return new Promise(function(resolve, reject) {
+ getUserMedia(constraints, resolve, reject);
+ });
+}
+
+if (typeof module !== 'undefined') {
+ module.exports = {
+ RTCPeerConnection: RTCPeerConnection,
+ getUserMedia: getUserMedia,
+ attachMediaStream: attachMediaStream,
+ reattachMediaStream: reattachMediaStream,
+ webrtcDetectedBrowser: webrtcDetectedBrowser,
+ webrtcDetectedVersion: webrtcDetectedVersion,
+ webrtcMinimumVersion: webrtcMinimumVersion
+ //requestUserMedia: not exposed on purpose.
+ //trace: not exposed on purpose.
+ };
+}
+
+},{}],138:[function(require,module,exports){
+'use strict';
+
+var NS = 'urn:xmpp:jingle:transports:ice-udp:1';
+
+
+module.exports = function (stanza) {
+ var types = stanza.utils;
+
+ var ICE = stanza.define({
+ name: '_iceUdp',
+ namespace: NS,
+ element: 'transport',
+ tags: ['jingle-transport'],
+ fields: {
+ transType: {value: 'iceUdp'},
+ pwd: types.attribute('pwd'),
+ ufrag: types.attribute('ufrag')
+ }
+ });
+
+
+ var RemoteCandidate = stanza.define({
+ name: 'remoteCandidate',
+ namespace: NS,
+ element: 'remote-candidate',
+ fields: {
+ component: types.attribute('component'),
+ ip: types.attribute('ip'),
+ port: types.attribute('port')
+ }
+ });
+
+
+ var Candidate = stanza.define({
+ name: '_iceUdpCandidate',
+ namespace: NS,
+ element: 'candidate',
+ fields: {
+ component: types.attribute('component'),
+ foundation: types.attribute('foundation'),
+ generation: types.attribute('generation'),
+ id: types.attribute('id'),
+ ip: types.attribute('ip'),
+ network: types.attribute('network'),
+ port: types.attribute('port'),
+ priority: types.attribute('priority'),
+ protocol: types.attribute('protocol'),
+ relAddr: types.attribute('rel-addr'),
+ relPort: types.attribute('rel-port'),
+ tcpType: types.attribute('tcptype'),
+ type: types.attribute('type')
+ }
+ });
+
+
+ var Fingerprint = stanza.define({
+ name: '_iceFingerprint',
+ namespace: 'urn:xmpp:jingle:apps:dtls:0',
+ element: 'fingerprint',
+ fields: {
+ hash: types.attribute('hash'),
+ setup: types.attribute('setup'),
+ value: types.text(),
+ required: types.boolAttribute('required')
+ }
+ });
+
+ var SctpMap = stanza.define({
+ name: '_sctpMap',
+ namespace: 'urn:xmpp:jingle:transports:dtls-sctp:1',
+ element: 'sctpmap',
+ fields: {
+ number: types.attribute('number'),
+ protocol: types.attribute('protocol'),
+ streams: types.attribute('streams')
+ }
+ });
+
+
+ stanza.extend(ICE, Candidate, 'candidates');
+ stanza.extend(ICE, RemoteCandidate);
+ stanza.extend(ICE, Fingerprint, 'fingerprints');
+ stanza.extend(ICE, SctpMap, 'sctp');
+
+ stanza.withDefinition('content', 'urn:xmpp:jingle:1', function (Content) {
+ stanza.extend(Content, ICE);
+ });
+};
+
+},{}],139:[function(require,module,exports){
+'use strict';
+
+
+module.exports = function (stanza) {
+ var types = stanza.utils;
+
+ var Iq = stanza.define({
+ name: 'iq',
+ namespace: 'jabber:client',
+ element: 'iq',
+ topLevel: true,
+ fields: {
+ lang: types.langAttribute(),
+ id: types.attribute('id'),
+ to: types.attribute('to'),
+ from: types.attribute('from'),
+ type: types.attribute('type')
+ }
+ });
+
+ var toJSON = Iq.prototype.toJSON;
+
+ Iq.prototype.toJSON = function () {
+ var result = toJSON.call(this);
+ result.resultReply = this.resultReply;
+ result.errorReply = this.errorReply;
+ return result;
+ };
+
+ Iq.prototype.resultReply = function (data) {
+ data = data || {};
+ data.to = this.from;
+ data.id = this.id;
+ data.type = 'result';
+ return new Iq(data);
+ };
+
+ Iq.prototype.errorReply = function (data) {
+ data = data || {};
+ data.to = this.from;
+ data.id = this.id;
+ data.type = 'error';
+ return new Iq(data);
+ };
+};
+
+},{}],140:[function(require,module,exports){
+'use strict';
+
+var NS = 'urn:xmpp:jingle:1';
+var ERRNS = 'urn:xmpp:jingle:errors:1';
+var CONDITIONS = ['out-of-order', 'tie-break', 'unknown-session', 'unsupported-info'];
+var REASONS = [
+ 'alternative-session',
+ 'busy',
+ 'cancel',
+ 'connectivity-error',
+ 'decline',
+ 'expired',
+ 'failed-application',
+ 'failed-transport',
+ 'general-error',
+ 'gone',
+ 'incompatible-parameters',
+ 'media-error',
+ 'security-error',
+ 'success',
+ 'timeout',
+ 'unsupported-applications',
+ 'unsupported-transports'
+];
+
+
+module.exports = function (stanza) {
+ var types = stanza.utils;
+
+ var Jingle = stanza.define({
+ name: 'jingle',
+ namespace: NS,
+ element: 'jingle',
+ fields: {
+ action: types.attribute('action'),
+ initiator: types.attribute('initiator'),
+ responder: types.attribute('responder'),
+ sid: types.attribute('sid')
+ }
+ });
+
+
+ var Content = stanza.define({
+ name: '_jingleContent',
+ namespace: NS,
+ element: 'content',
+ fields: {
+ creator: types.attribute('creator'),
+ disposition: types.attribute('disposition', 'session'),
+ name: types.attribute('name'),
+ senders: types.attribute('senders', 'both'),
+ description: {
+ get: function () {
+ var opts = stanza.tagged('jingle-description').map(function (Description) {
+ return Description.prototype._name;
+ });
+ for (var i = 0, len = opts.length; i < len; i++) {
+ if (this._extensions[opts[i]]) {
+ return this._extensions[opts[i]];
+ }
+ }
+ },
+ set: function (value) {
+ var ext = '_' + value.descType;
+ this[ext] = value;
+ }
+ },
+ transport: {
+ get: function () {
+ var opts = stanza.tagged('jingle-transport').map(function (Transport) {
+ return Transport.prototype._name;
+ });
+ for (var i = 0, len = opts.length; i < len; i++) {
+ if (this._extensions[opts[i]]) {
+ return this._extensions[opts[i]];
+ }
+ }
+ },
+ set: function (value) {
+ var ext = '_' + value.transType;
+ this[ext] = value;
+ }
+ }
+ }
+ });
+
+ var Reason = stanza.define({
+ name: 'reason',
+ namespace: NS,
+ element: 'reason',
+ fields: {
+ condition: types.enumSub(NS, REASONS),
+ alternativeSession: {
+ get: function () {
+ return types.getSubText(this.xml, NS, 'alternative-session');
+ },
+ set: function (value) {
+ this.condition = 'alternative-session';
+ types.setSubText(this.xml, NS, 'alternative-session', value);
+ }
+ },
+ text: types.textSub(NS, 'text')
+ }
+ });
+
+
+ stanza.extend(Jingle, Content, 'contents');
+ stanza.extend(Jingle, Reason);
+
+ /*stanza.withStanzaError(function (ErrorStanza) {
+ stanza.add(ErrorStanza, 'jingleCondition', types.enumSub(ERRNS, CONDITIONS));
+ });
+
+ stanza.withIq(function (Iq) {
+ stanza.extend(Iq, Jingle);
+ });*/
+};
+
+},{}],141:[function(require,module,exports){
+'use strict';
+
+var NS = 'urn:xmpp:jingle:apps:rtp:1';
+var FBNS = 'urn:xmpp:jingle:apps:rtp:rtcp-fb:0';
+var HDRNS = 'urn:xmpp:jingle:apps:rtp:rtp-hdrext:0';
+var INFONS = 'urn:xmpp:jingle:apps:rtp:info:1';
+var SSMANS = 'urn:xmpp:jingle:apps:rtp:ssma:0';
+var GROUPNS = 'urn:xmpp:jingle:apps:grouping:0';
+
+
+module.exports = function (stanza) {
+ var types = stanza.utils;
+
+ var Feedback = {
+ get: function () {
+ var existing = types.find(this.xml, FBNS, 'rtcp-fb');
+ var result = [];
+ existing.forEach(function (xml) {
+ result.push({
+ type: types.getAttribute(xml, 'type'),
+ subtype: types.getAttribute(xml, 'subtype')
+ });
+ });
+ existing = types.find(this.xml, FBNS, 'rtcp-fb-trr-int');
+ existing.forEach(function (xml) {
+ result.push({
+ type: types.getAttribute(xml, 'type'),
+ value: types.getAttribute(xml, 'value')
+ });
+ });
+ return result;
+ },
+ set: function (values) {
+ var self = this;
+ var existing = types.find(this.xml, FBNS, 'rtcp-fb');
+ existing.forEach(function (item) {
+ self.xml.removeChild(item);
+ });
+ existing = types.find(this.xml, FBNS, 'rtcp-fb-trr-int');
+ existing.forEach(function (item) {
+ self.xml.removeChild(item);
+ });
+
+ values.forEach(function (value) {
+ var fb;
+ if (value.type === 'trr-int') {
+ fb = types.createElement(FBNS, 'rtcp-fb-trr-int', NS);
+ types.setAttribute(fb, 'type', value.type);
+ types.setAttribute(fb, 'value', value.value);
+ } else {
+ fb = types.createElement(FBNS, 'rtcp-fb', NS);
+ types.setAttribute(fb, 'type', value.type);
+ types.setAttribute(fb, 'subtype', value.subtype);
+ }
+ self.xml.appendChild(fb);
+ });
+ }
+ };
+
+ var Bandwidth = stanza.define({
+ name: 'bandwidth',
+ namespace: NS,
+ element: 'bandwidth',
+ fields: {
+ type: types.attribute('type'),
+ bandwidth: types.text()
+ }
+ });
+
+ var RTP = stanza.define({
+ name: '_rtp',
+ namespace: NS,
+ element: 'description',
+ tags: ['jingle-description'],
+ fields: {
+ descType: {value: 'rtp'},
+ media: types.attribute('media'),
+ ssrc: types.attribute('ssrc'),
+ mux: types.boolSub(NS, 'rtcp-mux'),
+ encryption: {
+ get: function () {
+ var enc = types.find(this.xml, NS, 'encryption');
+ if (!enc.length) {
+ return [];
+ }
+ enc = enc[0];
+
+ var self = this;
+ var data = types.find(enc, NS, 'crypto');
+ var results = [];
+
+ data.forEach(function (xml) {
+ results.push(new Crypto({}, xml, self).toJSON());
+ });
+ return results;
+ },
+ set: function (values) {
+ var enc = types.find(this.xml, NS, 'encryption');
+ if (enc.length) {
+ this.xml.removeChild(enc);
+ }
+
+ if (!values.length) {
+ return;
+ }
+
+ types.setBoolSubAttribute(this.xml, NS, 'encryption', 'required', true);
+ enc = types.find(this.xml, NS, 'encryption')[0];
+
+ var self = this;
+ values.forEach(function (value) {
+ var content = new Crypto(value, null, self);
+ enc.appendChild(content.xml);
+ });
+ }
+ },
+ feedback: Feedback,
+ headerExtensions: {
+ get: function () {
+ var existing = types.find(this.xml, HDRNS, 'rtp-hdrext');
+ var result = [];
+ existing.forEach(function (xml) {
+ result.push({
+ id: types.getAttribute(xml, 'id'),
+ uri: types.getAttribute(xml, 'uri'),
+ senders: types.getAttribute(xml, 'senders')
+ });
+ });
+ return result;
+ },
+ set: function (values) {
+ var self = this;
+ var existing = types.find(this.xml, HDRNS, 'rtp-hdrext');
+ existing.forEach(function (item) {
+ self.xml.removeChild(item);
+ });
+
+ values.forEach(function (value) {
+ var hdr = types.createElement(HDRNS, 'rtp-hdrext', NS);
+ types.setAttribute(hdr, 'id', value.id);
+ types.setAttribute(hdr, 'uri', value.uri);
+ types.setAttribute(hdr, 'senders', value.senders);
+ self.xml.appendChild(hdr);
+ });
+ }
+ }
+ }
+ });
+
+
+ var PayloadType = stanza.define({
+ name: '_payloadType',
+ namespace: NS,
+ element: 'payload-type',
+ fields: {
+ channels: types.attribute('channels'),
+ clockrate: types.attribute('clockrate'),
+ id: types.attribute('id'),
+ maxptime: types.attribute('maxptime'),
+ name: types.attribute('name'),
+ ptime: types.attribute('ptime'),
+ feedback: Feedback,
+ parameters: {
+ get: function () {
+ var result = [];
+ var params = types.find(this.xml, NS, 'parameter');
+ params.forEach(function (param) {
+ result.push({
+ key: types.getAttribute(param, 'name'),
+ value: types.getAttribute(param, 'value')
+ });
+ });
+ return result;
+ },
+ set: function (values) {
+ var self = this;
+ values.forEach(function (value) {
+ var param = types.createElement(NS, 'parameter');
+ types.setAttribute(param, 'name', value.key);
+ types.setAttribute(param, 'value', value.value);
+ self.xml.appendChild(param);
+ });
+ }
+ }
+ }
+ });
+
+
+ var Crypto = stanza.define({
+ name: 'crypto',
+ namespace: NS,
+ element: 'crypto',
+ fields: {
+ cipherSuite: types.attribute('crypto-suite'),
+ keyParams: types.attribute('key-params'),
+ sessionParams: types.attribute('session-params'),
+ tag: types.attribute('tag')
+ }
+ });
+
+
+ var ContentGroup = stanza.define({
+ name: '_group',
+ namespace: GROUPNS,
+ element: 'group',
+ fields: {
+ semantics: types.attribute('semantics'),
+ contents: types.multiSubAttribute(GROUPNS, 'content', 'name')
+ }
+ });
+
+ var SourceGroup = stanza.define({
+ name: '_sourceGroup',
+ namespace: SSMANS,
+ element: 'ssrc-group',
+ fields: {
+ semantics: types.attribute('semantics'),
+ sources: types.multiSubAttribute(SSMANS, 'source', 'ssrc')
+ }
+ });
+
+ var Source = stanza.define({
+ name: '_source',
+ namespace: SSMANS,
+ element: 'source',
+ fields: {
+ ssrc: types.attribute('ssrc'),
+ parameters: {
+ get: function () {
+ var result = [];
+ var params = types.find(this.xml, SSMANS, 'parameter');
+ params.forEach(function (param) {
+ result.push({
+ key: types.getAttribute(param, 'name'),
+ value: types.getAttribute(param, 'value')
+ });
+ });
+ return result;
+ },
+ set: function (values) {
+ var self = this;
+ values.forEach(function (value) {
+ var param = types.createElement(SSMANS, 'parameter');
+ types.setAttribute(param, 'name', value.key);
+ types.setAttribute(param, 'value', value.value);
+ self.xml.appendChild(param);
+ });
+ }
+ }
+ }
+ });
+
+
+ var Mute = stanza.define({
+ name: 'mute',
+ namespace: INFONS,
+ element: 'mute',
+ fields: {
+ creator: types.attribute('creator'),
+ name: types.attribute('name')
+ }
+ });
+
+
+ var Unmute = stanza.define({
+ name: 'unmute',
+ namespace: INFONS,
+ element: 'unmute',
+ fields: {
+ creator: types.attribute('creator'),
+ name: types.attribute('name')
+ }
+ });
+
+
+ stanza.extend(RTP, Bandwidth);
+ stanza.extend(RTP, PayloadType, 'payloads');
+ stanza.extend(RTP, Source, 'sources');
+ stanza.extend(RTP, SourceGroup, 'sourceGroups');
+
+ stanza.withDefinition('content', 'urn:xmpp:jingle:1', function (Content) {
+ stanza.extend(Content, RTP);
+ });
+
+ stanza.withDefinition('jingle', 'urn:xmpp:jingle:1', function (Jingle) {
+ stanza.extend(Jingle, Mute);
+ stanza.extend(Jingle, Unmute);
+ stanza.extend(Jingle, ContentGroup, 'groups');
+ stanza.add(Jingle, 'ringing', types.boolSub(INFONS, 'ringing'));
+ stanza.add(Jingle, 'hold', types.boolSub(INFONS, 'hold'));
+ stanza.add(Jingle, 'active', types.boolSub(INFONS, 'active'));
+ });
+};
+
+},{}],142:[function(require,module,exports){
+/* jshint -W117 */
+'use strict';
+
+var JSM = require('jingle');
+var RTC = require('webrtc-adapter-test');
+var jxt = require('jxt').createRegistry();
+
+jxt.use(require('./stanza/iq.js'));
+jxt.use(require('./stanza/jingle.js'));
+jxt.use(require('./stanza/rtp.js'));
+jxt.use(require('./stanza/iceUdp.js'));
+
+var IqStanza = jxt.getDefinition('iq', 'jabber:client');
+var JingleStanza = jxt.getDefinition('jingle', 'urn:xmpp:jingle:1');
+
+jxt.extend(IqStanza, JingleStanza);
+
+(function($) {
+ Strophe.addConnectionPlugin('jingle', {
+ connection: null,
+ peer_constraints: {},
+ AUTOACCEPT: false,
+ localStream: null,
+ manager: null,
+ RTC: null,
+
+ init: function(conn) {
+ var self = this;
+
+ self.RTC = RTC;
+
+ self.connection = conn;
+
+ if ((RTC.webrtcDetectedVersion < 33 && RTC.webrtcDetectedBrowser === 'firefox') || RTC.webrtcDetectedBrowser === 'chrome') {
+ self.peer_constraints = {
+ mandatory: {
+ 'OfferToReceiveAudio': true,
+ 'OfferToReceiveVideo': true
+ }
+ };
+
+ if (RTC.webrtcDetectedBrowser === 'firefox') {
+ self.peer_constraints.mandatory.MozDontOfferDataChannel = true;
+ }
+ } else {
+ self.peer_constraints = {
+ 'offerToReceiveAudio': true,
+ 'offerToReceiveVideo': true
+ };
+
+ if (RTC.webrtcDetectedBrowser === 'firefox') {
+ self.peer_constraints.mozDontOfferDataChannel = true;
+ }
+ }
+
+ self.manager = new JSM({
+ peerConnectionConstraints: self.peer_constraints,
+ jid: self.connection.jid,
+ selfID: self.connection.jid
+ });
+
+ var events = {
+ 'incoming': 'callincoming.jingle',
+ 'terminated': 'callterminated.jingle',
+ 'peerStreamAdded': 'remotestreamadded.jingle',
+ 'peerStreamRemoved': 'remotestreamremoved.jingle',
+ 'ringing': 'ringing.jingle',
+ 'log:error': 'error.jingle'
+ };
+
+ $.each(events, function(key, val) {
+ self.manager.on(key, function() {
+ $(document).trigger(val, arguments);
+ });
+ });
+
+ self.manager.on('incoming', function(session) {
+ session.on('change:connectionState', function(session, state) {
+ $(document).trigger('iceconnectionstatechange.jingle', [session.sid, session, state]);
+ });
+ });
+
+ if (this.connection.disco) {
+ var i;
+ for (i = 0; i < self.manager.capabilities.length; i++) {
+ self.connection.disco.addFeature(self.manager.capabilities[i]);
+ }
+ }
+ this.connection.addHandler(this.onJingle.bind(this), 'urn:xmpp:jingle:1', 'iq', 'set', null, null);
+
+ this.manager.on('send', function(data) {
+
+ var iq = new IqStanza(data);
+
+ self.connection.send($.parseXML(iq.toString()).getElementsByTagName('iq')[0]);
+ });
+
+ //@TODO add on client unavilable (this.manager.endPeerSessions(peer_jid_full, true))
+ },
+ onJingle: function(iq) {
+ var req = jxt.parse(iq.outerHTML);
+
+ this.manager.process(req);
+
+ return true;
+ },
+ initiate: function(peerjid, stream) { // initiate a new jinglesession to peerjid
+ var session = this.manager.createMediaSession(peerjid);
+
+ session.on('change:connectionState', function(session, state) {
+ $(document).trigger('iceconnectionstatechange.jingle', [session.sid, session, state]);
+ });
+
+ if (stream) {
+ this.localStream = stream;
+ }
+
+ // configure session
+ if (this.localStream) {
+ session.addStream(this.localStream);
+ session.start();
+
+ return session;
+ }
+
+ console.error('No local stream defined');
+ },
+ terminate: function(jid, reason, silent) { // terminate by sessionid (or all sessions)
+ if (typeof jid === 'undefined' || jid === null) {
+ this.manager.endAllSessions(reason, silent);
+ } else {
+ this.manager.endPeerSessions(jid, reason, silent);
+ }
+ },
+ terminateByJid: function(jid) {
+ this.manager.endPeerSessions(jid);
+ },
+ addICEServer: function(server) {
+ this.manager.addICEServer(server);
+ },
+ setICEServers: function(servers) {
+ this.manager.iceServers = servers;
+ },
+ setPeerConstraints: function(constraints) {
+ this.manager.config.peerConnectionConstraints = constraints;
+ }
+ });
}(jQuery));
+},{"./stanza/iceUdp.js":138,"./stanza/iq.js":139,"./stanza/jingle.js":140,"./stanza/rtp.js":141,"jingle":25,"jxt":114,"webrtc-adapter-test":137}]},{},[142]);
+
/*!
* Source: lib/otr/build/dep/salsa20.js, license: AGPL3, url: https://github.com/neoatlantis/node-salsa20
@@ -13986,7 +30164,7 @@ CryptoJS.mode.CTR = (function () {
*/
/*!
- otr.js v0.2.14 - 2015-01-16
+ otr.js v0.2.15 - 2015-05-04
(c) 2015 - Arlo Breault <arlolra@gmail.com>
Freely distributed under the MPL v2.0 license.
@@ -16106,8 +32284,12 @@ CryptoJS.mode.CTR = (function () {
OTR.prototype.io = function (msg, meta) {
// buffer
- msg = ([].concat(msg)).map(function(m){
- return { msg: m, meta: meta }
+ msg = ([].concat(msg)).map(function(m, i, arr) {
+ var obj = { msg: m }
+ if (!(meta instanceof OTRCB) ||
+ i === (arr.length - 1) // only cb after last fragment is sent
+ ) obj.meta = meta
+ return obj
})
this.outgoing = this.outgoing.concat(msg)
@@ -16596,7 +32778,9 @@ CryptoJS.mode.CTR = (function () {
if (this.smw) this.sm.worker.terminate() // destroy webworker
this.sm = null
}
- }
+ } else if (typeof cb === 'function')
+ setTimeout(cb, 0)
+
this.msgstate = CONST.MSGSTATE_PLAINTEXT
this.receivedPlaintext = false
this.trigger('status', [CONST.STATUS_END_OTR])
@@ -16631,6 +32815,861 @@ CryptoJS.mode.CTR = (function () {
!function(){function a(a,b){if(!b||"function"==typeof b)return a;for(var c in b)a[c]=b[c];return a}function b(a,c){for(var d in c)d in a?b(a[d],c[d]):a[d]=c[d];return a}function c(a,b,c){var d,e=0,f=a.length,g=void 0===f||"[object Array]"!==Object.prototype.toString.apply(a)||"function"==typeof a;if(c)if(g){for(d in a)if(b.apply(a[d],c)===!1)break}else for(;f>e&&b.apply(a[e++],c)!==!1;);else if(g){for(d in a)if(b.call(a[d],d,a[d])===!1)break}else for(;f>e&&b.call(a[e],e,a[e++])!==!1;);return a}function d(a){return"string"==typeof a?a.replace(/[&<>"'\/]/g,function(a){return Q[a]}):a}function e(a){var b=function(a){if(window.XMLHttpRequest)return a(null,new XMLHttpRequest);if(window.ActiveXObject)try{return a(null,new ActiveXObject("Msxml2.XMLHTTP"))}catch(b){return a(null,new ActiveXObject("Microsoft.XMLHTTP"))}return a(new Error)},c=function(a){if("string"==typeof a)return a;var b=[];for(var c in a)a.hasOwnProperty(c)&&b.push(encodeURIComponent(c)+"="+encodeURIComponent(a[c]));return b.join("&")},d=function(a){a=a.replace(/\r\n/g,"\n");for(var b="",c=0;c<a.length;c++){var d=a.charCodeAt(c);128>d?b+=String.fromCharCode(d):d>127&&2048>d?(b+=String.fromCharCode(192|d>>6),b+=String.fromCharCode(128|63&d)):(b+=String.fromCharCode(224|d>>12),b+=String.fromCharCode(128|63&d>>6),b+=String.fromCharCode(128|63&d))}return b},e=function(a){var b="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";a=d(a);var c,e,f,g,h,i,j,k="",l=0;do c=a.charCodeAt(l++),e=a.charCodeAt(l++),f=a.charCodeAt(l++),g=c>>2,h=(3&c)<<4|e>>4,i=(15&e)<<2|f>>6,j=63&f,isNaN(e)?i=j=64:isNaN(f)&&(j=64),k+=b.charAt(g)+b.charAt(h)+b.charAt(i)+b.charAt(j),c=e=f="",g=h=i=j="";while(l<a.length);return k},f=function(){for(var a=arguments[0],b=1;b<arguments.length;b++){var c=arguments[b];for(var d in c)c.hasOwnProperty(d)&&(a[d]=c[d])}return a},g=function(a,d,e,h){"function"==typeof e&&(h=e,e={}),e.cache=e.cache||!1,e.data=e.data||{},e.headers=e.headers||{},e.jsonp=e.jsonp||!1,e.async=void 0===e.async?!0:e.async;var i,j=f({accept:"*/*","content-type":"application/x-www-form-urlencoded;charset=UTF-8"},g.headers,e.headers);if(i="application/json"===j["content-type"]?JSON.stringify(e.data):c(e.data),"GET"===a){var k=[];if(i&&(k.push(i),i=null),e.cache||k.push("_="+(new Date).getTime()),e.jsonp&&(k.push("callback="+e.jsonp),k.push("jsonp="+e.jsonp)),k=k.join("&"),k.length>1&&(d+=d.indexOf("?")>-1?"&"+k:"?"+k),e.jsonp){var l=document.getElementsByTagName("head")[0],m=document.createElement("script");return m.type="text/javascript",m.src=d,l.appendChild(m),void 0}}b(function(b,c){if(b)return h(b);c.open(a,d,e.async);for(var f in j)j.hasOwnProperty(f)&&c.setRequestHeader(f,j[f]);c.onreadystatechange=function(){if(4===c.readyState){var a=c.responseText||"";if(!h)return;h(c.status,{text:function(){return a},json:function(){try{return JSON.parse(a)}catch(b){return T.error("Can not parse JSON. URL: "+d),{}}}})}},c.send(i)})},h={authBasic:function(a,b){g.headers.Authorization="Basic "+e(a+":"+b)},connect:function(a,b,c){return g("CONNECT",a,b,c)},del:function(a,b,c){return g("DELETE",a,b,c)},get:function(a,b,c){return g("GET",a,b,c)},head:function(a,b,c){return g("HEAD",a,b,c)},headers:function(a){g.headers=a||{}},isAllowed:function(a,b,c){this.options(a,function(a,d){c(-1!==d.text().indexOf(b))})},options:function(a,b,c){return g("OPTIONS",a,b,c)},patch:function(a,b,c){return g("PATCH",a,b,c)},post:function(a,b,c){return g("POST",a,b,c)},put:function(a,b,c){return g("PUT",a,b,c)},trace:function(a,b,c){return g("TRACE",a,b,c)}},i=a.type?a.type.toLowerCase():"get";h[i](a.url,a,function(b,c){200===b||0===b&&c.text()?a.success(c.json(),b,null):a.error(c.text(),b,null)})}function f(a,b){"function"==typeof a&&(b=a,a={}),a=a||{},T.extend(P,a),delete P.fixLng,P.functions&&(delete P.functions,T.extend(T,a.functions)),"string"==typeof P.ns&&(P.ns={namespaces:[P.ns],defaultNs:P.ns}),"string"==typeof P.fallbackNS&&(P.fallbackNS=[P.fallbackNS]),("string"==typeof P.fallbackLng||"boolean"==typeof P.fallbackLng)&&(P.fallbackLng=[P.fallbackLng]),P.interpolationPrefixEscaped=T.regexEscape(P.interpolationPrefix),P.interpolationSuffixEscaped=T.regexEscape(P.interpolationSuffix),P.lng||(P.lng=T.detectLanguage()),L=T.toLanguages(P.lng),F=L[0],T.log("currentLng set to: "+F),P.useCookie&&T.cookie.read(P.cookieName)!==F&&T.cookie.create(P.cookieName,F,P.cookieExpirationTime,P.cookieDomain),P.detectLngFromLocalStorage&&"undefined"!=typeof document&&window.localStorage&&T.localStorage.setItem("i18next_lng",F);var c=z;a.fixLng&&(c=function(a,b){return b=b||{},b.lng=b.lng||c.lng,z(a,b)},c.lng=F),W.setCurrentLng(F),H&&P.setJqueryExt&&s();var d;if(H&&H.Deferred&&(d=H.Deferred()),!P.resStore){var e=T.toLanguages(P.lng);"string"==typeof P.preload&&(P.preload=[P.preload]);for(var f=0,g=P.preload.length;g>f;f++)for(var h=T.toLanguages(P.preload[f]),i=0,j=h.length;j>i;i++)e.indexOf(h[i])<0&&e.push(h[i]);return I.sync.load(e,P,function(a,e){J=e,M=!0,b&&b(c),d&&d.resolve(c)}),d?d.promise():void 0}return J=P.resStore,M=!0,b&&b(c),d&&d.resolve(c),d?d.promise():void 0}function g(a,b){"string"==typeof a&&(a=[a]);for(var c=0,d=a.length;d>c;c++)P.preload.indexOf(a[c])<0&&P.preload.push(a[c]);return f(b)}function h(a,b,c,d){"string"!=typeof b?(c=b,b=P.ns.defaultNs):P.ns.namespaces.indexOf(b)<0&&P.ns.namespaces.push(b),J[a]=J[a]||{},J[a][b]=J[a][b]||{},d?T.deepExtend(J[a][b],c):T.extend(J[a][b],c)}function i(a,b){"string"!=typeof b&&(b=P.ns.defaultNs),J[a]=J[a]||{};var c=J[a][b]||{},d=!1;for(var e in c)c.hasOwnProperty(e)&&(d=!0);return d}function j(a,b){"string"!=typeof b&&(b=P.ns.defaultNs),J[a]=J[a]||{},J[a][b]={}}function k(a,b,c,d){"string"!=typeof b?(resource=b,b=P.ns.defaultNs):P.ns.namespaces.indexOf(b)<0&&P.ns.namespaces.push(b),J[a]=J[a]||{},J[a][b]=J[a][b]||{};for(var e=c.split(P.keyseparator),f=0,g=J[a][b];e[f];)f==e.length-1?g[e[f]]=d:(null==g[e[f]]&&(g[e[f]]={}),g=g[e[f]]),f++}function l(a,b,c){"string"!=typeof b?(resource=b,b=P.ns.defaultNs):P.ns.namespaces.indexOf(b)<0&&P.ns.namespaces.push(b);for(var d in c)"string"==typeof c[d]&&k(a,b,d,c[d])}function m(a){P.ns.defaultNs=a}function n(a,b){o([a],b)}function o(a,b){var c={dynamicLoad:P.dynamicLoad,resGetPath:P.resGetPath,getAsync:P.getAsync,customLoad:P.customLoad,ns:{namespaces:a,defaultNs:""}},d=T.toLanguages(P.lng);"string"==typeof P.preload&&(P.preload=[P.preload]);for(var e=0,f=P.preload.length;f>e;e++)for(var g=T.toLanguages(P.preload[e]),h=0,i=g.length;i>h;h++)d.indexOf(g[h])<0&&d.push(g[h]);for(var j=[],k=0,l=d.length;l>k;k++){var m=!1,n=J[d[k]];if(n)for(var o=0,p=a.length;p>o;o++)n[a[o]]||(m=!0);else m=!0;m&&j.push(d[k])}j.length?I.sync._fetch(j,c,function(c,d){var e=a.length*j.length;T.each(a,function(a,c){P.ns.namespaces.indexOf(c)<0&&P.ns.namespaces.push(c),T.each(j,function(a,f){J[f]=J[f]||{},J[f][c]=d[f][c],e--,0===e&&b&&(P.useLocalStorage&&I.sync._storeLocal(J),b())})})}):b&&b()}function p(a,b,c){return"function"==typeof b?(c=b,b={}):b||(b={}),b.lng=a,f(b,c)}function q(){return F}function r(a){J={},p(F,a)}function s(){function a(a,b,c){if(0!==b.length){var d="text";if(0===b.indexOf("[")){var e=b.split("]");b=e[1],d=e[0].substr(1,e[0].length-1)}b.indexOf(";")===b.length-1&&(b=b.substr(0,b.length-2));var f;if("html"===d)f=P.defaultValueFromContent?H.extend({defaultValue:a.html()},c):c,a.html(H.t(b,f));else if("text"===d)f=P.defaultValueFromContent?H.extend({defaultValue:a.text()},c):c,a.text(H.t(b,f));else if("prepend"===d)f=P.defaultValueFromContent?H.extend({defaultValue:a.html()},c):c,a.prepend(H.t(b,f));else if("append"===d)f=P.defaultValueFromContent?H.extend({defaultValue:a.html()},c):c,a.append(H.t(b,f));else if(0===d.indexOf("data-")){var g=d.substr("data-".length);f=P.defaultValueFromContent?H.extend({defaultValue:a.data(g)},c):c;var h=H.t(b,f);a.data(g,h),a.attr(d,h)}else f=P.defaultValueFromContent?H.extend({defaultValue:a.attr(d)},c):c,a.attr(d,H.t(b,f))}}function b(b,c){var d=b.attr(P.selectorAttr);if(d||"undefined"==typeof d||d===!1||(d=b.text()||b.val()),d){var e=b,f=b.data("i18n-target");if(f&&(e=b.find(f)||b),c||P.useDataAttrOptions!==!0||(c=b.data("i18n-options")),c=c||{},d.indexOf(";")>=0){var g=d.split(";");H.each(g,function(b,d){""!==d&&a(e,d,c)})}else a(e,d,c);P.useDataAttrOptions===!0&&b.data("i18n-options",c)}}H.t=H.t||z,H.fn.i18n=function(a){return this.each(function(){b(H(this),a);var c=H(this).find("["+P.selectorAttr+"]");c.each(function(){b(H(this),a)})})}}function t(a,b,c,d){if(!a)return a;if(d=d||b,a.indexOf(d.interpolationPrefix||P.interpolationPrefix)<0)return a;var e=d.interpolationPrefix?T.regexEscape(d.interpolationPrefix):P.interpolationPrefixEscaped,f=d.interpolationSuffix?T.regexEscape(d.interpolationSuffix):P.interpolationSuffixEscaped,g="HTML"+f,h=b.replace&&"object"==typeof b.replace?b.replace:b;return T.each(h,function(b,h){var i=c?c+P.keyseparator+b:b;"object"==typeof h&&null!==h?a=t(a,h,i,d):d.escapeInterpolation||P.escapeInterpolation?(a=a.replace(new RegExp([e,i,g].join(""),"g"),T.regexReplacementEscape(h)),a=a.replace(new RegExp([e,i,f].join(""),"g"),T.regexReplacementEscape(T.escape(h)))):a=a.replace(new RegExp([e,i,f].join(""),"g"),T.regexReplacementEscape(h))}),a}function u(a,b){var c=",",d="{",e="}",f=T.extend({},b);for(delete f.postProcess;-1!=a.indexOf(P.reusePrefix)&&(K++,!(K>P.maxRecursion));){var g=a.lastIndexOf(P.reusePrefix),h=a.indexOf(P.reuseSuffix,g)+P.reuseSuffix.length,i=a.substring(g,h),j=i.replace(P.reusePrefix,"").replace(P.reuseSuffix,"");if(g>=h)return T.error("there is an missing closing in following translation value",a),"";if(-1!=j.indexOf(c)){var k=j.indexOf(c);if(-1!=j.indexOf(d,k)&&-1!=j.indexOf(e,k)){var l=j.indexOf(d,k),m=j.indexOf(e,l)+e.length;try{f=T.extend(f,JSON.parse(j.substring(l,m))),j=j.substring(0,k)}catch(n){}}}var o=C(j,f);a=a.replace(i,T.regexReplacementEscape(o))}return a}function v(a){return a.context&&("string"==typeof a.context||"number"==typeof a.context)}function w(a){return void 0!==a.count&&"string"!=typeof a.count}function x(a){return void 0!==a.indefinite_article&&"string"!=typeof a.indefinite_article&&a.indefinite_article}function y(a,b){b=b||{};var c=A(a,b),d=D(a,b);return void 0!==d||d===c}function z(a,b){return b=b||{},M?(K=0,C.apply(null,arguments)):(T.log("i18next not finished initialization. you might have called t function before loading resources finished."),b.defaultValue||"")}function A(a,b){return void 0!==b.defaultValue?b.defaultValue:a}function B(){for(var a=[],b=1;b<arguments.length;b++)a.push(arguments[b]);return{postProcess:"sprintf",sprintf:a}}function C(a,b){if(b&&"object"!=typeof b?"sprintf"===P.shortcutFunction?b=B.apply(null,arguments):"defaultValue"===P.shortcutFunction&&(b={defaultValue:b}):b=b||{},"object"==typeof P.defaultVariables&&(b=T.extend({},P.defaultVariables,b)),void 0===a||null===a||""===a)return"";"string"==typeof a&&(a=[a]);var c=a[0];if(a.length>1)for(var d=0;d<a.length&&(c=a[d],!y(c,b));d++);var e,f=A(c,b),g=D(c,b),h=b.lng?T.toLanguages(b.lng,b.fallbackLng):L,i=b.ns||P.ns.defaultNs;c.indexOf(P.nsseparator)>-1&&(e=c.split(P.nsseparator),i=e[0],c=e[1]),void 0===g&&P.sendMissing&&"function"==typeof P.missingKeyHandler&&(b.lng?P.missingKeyHandler(h[0],i,c,f,h):P.missingKeyHandler(P.lng,i,c,f,h));var j=b.postProcess||P.postProcess;void 0!==g&&j&&X[j]&&(g=X[j](g,c,b));var k=f;if(f.indexOf(P.nsseparator)>-1&&(e=f.split(P.nsseparator),k=e[1]),k===c&&P.parseMissingKey&&(f=P.parseMissingKey(f)),void 0===g&&(f=t(f,b),f=u(f,b),j&&X[j])){var l=A(c,b);g=X[j](l,c,b)}return void 0!==g?g:f}function D(a,b){b=b||{};var c,d,e=A(a,b),f=L;if(!J)return e;if("cimode"===f[0].toLowerCase())return e;if(b.lngs&&(f=b.lngs),b.lng&&(f=T.toLanguages(b.lng,b.fallbackLng),!J[f[0]])){var g=P.getAsync;P.getAsync=!1,I.sync.load(f,P,function(a,b){T.extend(J,b),P.getAsync=g})}var h=b.ns||P.ns.defaultNs;if(a.indexOf(P.nsseparator)>-1){var i=a.split(P.nsseparator);h=i[0],a=i[1]}if(v(b)){c=T.extend({},b),delete c.context,c.defaultValue=P.contextNotFound;var j=h+P.nsseparator+a+"_"+b.context;if(d=z(j,c),d!=P.contextNotFound)return t(d,{context:b.context})}if(w(b,f[0])){c=T.extend({lngs:[f[0]]},b),delete c.count,delete c.lng,c.defaultValue=P.pluralNotFound;var k;if(W.needsPlural(f[0],b.count)){k=h+P.nsseparator+a+P.pluralSuffix;var l=W.get(f[0],b.count);l>=0?k=k+"_"+l:1===l&&(k=h+P.nsseparator+a)}else k=h+P.nsseparator+a;if(d=z(k,c),d!=P.pluralNotFound)return t(d,{count:b.count,interpolationPrefix:b.interpolationPrefix,interpolationSuffix:b.interpolationSuffix});if(!(f.length>1))return d;var m=f.slice();if(m.shift(),b=T.extend(b,{lngs:m}),delete b.lng,d=z(h+P.nsseparator+a,b),d!=P.pluralNotFound)return d}if(x(b)){var n=T.extend({},b);delete n.indefinite_article,n.defaultValue=P.indefiniteNotFound;var o=h+P.nsseparator+a+(b.count&&!w(b,f[0])||!b.count?P.indefiniteSuffix:"");if(d=z(o,n),d!=P.indefiniteNotFound)return d}for(var p,q=a.split(P.keyseparator),r=0,s=f.length;s>r&&void 0===p;r++){for(var y=f[r],B=0,E=J[y]&&J[y][h];q[B];)E=E&&E[q[B]],B++;if(void 0!==E){var F=Object.prototype.toString.apply(E);if("string"==typeof E)E=t(E,b),E=u(E,b);else if("[object Array]"!==F||P.returnObjectTrees||b.returnObjectTrees){if(null===E&&P.fallbackOnNull===!0)E=void 0;else if(null!==E)if(P.returnObjectTrees||b.returnObjectTrees){if("[object Number]"!==F&&"[object Function]"!==F&&"[object RegExp]"!==F){var G="[object Array]"===F?[]:{};T.each(E,function(c){G[c]=C(h+P.nsseparator+a+P.keyseparator+c,b)}),E=G}}else P.objectTreeKeyHandler&&"function"==typeof P.objectTreeKeyHandler?E=P.objectTreeKeyHandler(a,E,y,h,b):(E="key '"+h+":"+a+" ("+y+")' "+"returned an object instead of string.",T.log(E))}else E=E.join("\n"),E=t(E,b),E=u(E,b);"string"==typeof E&&""===E.trim()&&P.fallbackOnEmpty===!0&&(E=void 0),p=E}}if(void 0===p&&!b.isFallbackLookup&&(P.fallbackToDefaultNS===!0||P.fallbackNS&&P.fallbackNS.length>0)){if(b.isFallbackLookup=!0,P.fallbackNS.length){for(var H=0,K=P.fallbackNS.length;K>H;H++)if(p=D(P.fallbackNS[H]+P.nsseparator+a,b),p||""===p&&P.fallbackOnEmpty===!1){var M=p.indexOf(P.nsseparator)>-1?p.split(P.nsseparator)[1]:p,N=e.indexOf(P.nsseparator)>-1?e.split(P.nsseparator)[1]:e;if(M!==N)break}}else p=D(a,b);b.isFallbackLookup=!1}return p}function E(){var a,b=P.lngWhitelist||[],c=[];if("undefined"!=typeof window&&!function(){for(var a=window.location.search.substring(1),b=a.split("&"),d=0;d<b.length;d++){var e=b[d].indexOf("=");if(e>0){var f=b[d].substring(0,e);f==P.detectLngQS&&c.push(b[d].substring(e+1))}}}(),P.useCookie&&"undefined"!=typeof document){var d=T.cookie.read(P.cookieName);d&&c.push(d)}if(P.detectLngFromLocalStorage&&"undefined"!=typeof window&&window.localStorage&&c.push(window.localStorage.getItem("i18next_lng")),"undefined"!=typeof navigator){if(navigator.languages)for(var e=0;e<navigator.languages.length;e++)c.push(navigator.languages[e]);navigator.userLanguage&&c.push(navigator.userLanguage),navigator.language&&c.push(navigator.language)}return function(){for(var d=0;d<c.length;d++){var e=c[d];if(e.indexOf("-")>-1){var f=e.split("-");e=P.lowerCaseLng?f[0].toLowerCase()+"-"+f[1].toLowerCase():f[0].toLowerCase()+"-"+f[1].toUpperCase()}if(0===b.length||b.indexOf(e)>-1){a=e;break}}}(),a||(a=P.fallbackLng[0]),a}Array.prototype.indexOf||(Array.prototype.indexOf=function(a){"use strict";if(null==this)throw new TypeError;var b=Object(this),c=b.length>>>0;if(0===c)return-1;var d=0;if(arguments.length>0&&(d=Number(arguments[1]),d!=d?d=0:0!=d&&1/0!=d&&d!=-1/0&&(d=(d>0||-1)*Math.floor(Math.abs(d)))),d>=c)return-1;for(var e=d>=0?d:Math.max(c-Math.abs(d),0);c>e;e++)if(e in b&&b[e]===a)return e;return-1}),Array.prototype.lastIndexOf||(Array.prototype.lastIndexOf=function(a){"use strict";if(null==this)throw new TypeError;var b=Object(this),c=b.length>>>0;if(0===c)return-1;var d=c;arguments.length>1&&(d=Number(arguments[1]),d!=d?d=0:0!=d&&d!=1/0&&d!=-(1/0)&&(d=(d>0||-1)*Math.floor(Math.abs(d))));for(var e=d>=0?Math.min(d,c-1):c-Math.abs(d);e>=0;e--)if(e in b&&b[e]===a)return e;return-1}),"function"!=typeof String.prototype.trim&&(String.prototype.trim=function(){return this.replace(/^\s+|\s+$/g,"")});var F,G=this,H=G.jQuery||G.Zepto,I={},J={},K=0,L=[],M=!1,N={};if("undefined"!=typeof module&&module.exports){if(!H)try{H=require("jquery")}catch(O){}H&&(H.i18n=H.i18n||I),module.exports=I}else H&&(H.i18n=H.i18n||I),G.i18n=G.i18n||I;N={load:function(a,b,c){b.useLocalStorage?N._loadLocal(a,b,function(d,e){for(var f=[],g=0,h=a.length;h>g;g++)e[a[g]]||f.push(a[g]);f.length>0?N._fetch(f,b,function(a,b){T.extend(e,b),N._storeLocal(b),c(null,e)}):c(null,e)}):N._fetch(a,b,function(a,b){c(null,b)})},_loadLocal:function(a,b,c){var d={},e=(new Date).getTime();if(window.localStorage){var f=a.length;T.each(a,function(a,g){var h=window.localStorage.getItem("res_"+g);h&&(h=JSON.parse(h),h.i18nStamp&&h.i18nStamp+b.localStorageExpirationTime>e&&(d[g]=h)),f--,0===f&&c(null,d)})}},_storeLocal:function(a){if(window.localStorage)for(var b in a)a[b].i18nStamp=(new Date).getTime(),T.localStorage.setItem("res_"+b,JSON.stringify(a[b]))},_fetch:function(a,b,c){var d=b.ns,e={};if(b.dynamicLoad){var f=function(a,b){c(null,b)};if("function"==typeof b.customLoad)b.customLoad(a,d.namespaces,b,f);else{var g=t(b.resGetPath,{lng:a.join("+"),ns:d.namespaces.join("+")});T.ajax({url:g,success:function(a){T.log("loaded: "+g),f(null,a)},error:function(a,b,c){T.log("failed loading: "+g),f("failed loading resource.json error: "+c)},dataType:"json",async:b.getAsync})}}else{var h,i=d.namespaces.length*a.length;T.each(d.namespaces,function(d,f){T.each(a,function(a,d){var g=function(a,b){a&&(h=h||[],h.push(a)),e[d]=e[d]||{},e[d][f]=b,i--,0===i&&c(h,e)};"function"==typeof b.customLoad?b.customLoad(d,f,b,g):N._fetchOne(d,f,b,g)})})}},_fetchOne:function(a,b,c,d){var e=t(c.resGetPath,{lng:a,ns:b});T.ajax({url:e,success:function(a){T.log("loaded: "+e),d(null,a)},error:function(a,b,c){if(b&&200==b||a&&a.status&&200==a.status)T.error("There is a typo in: "+e);else if(b&&404==b||a&&a.status&&404==a.status)T.log("Does not exist: "+e);else{var f=b?b:a&&a.status?a.status:null;T.log(f+" when loading "+e)}d(c,{})},dataType:"json",async:c.getAsync})},postMissing:function(a,b,c,d,e){var f={};f[c]=d;var g=[];if("fallback"===P.sendMissingTo&&P.fallbackLng[0]!==!1)for(var h=0;h<P.fallbackLng.length;h++)g.push({lng:P.fallbackLng[h],url:t(P.resPostPath,{lng:P.fallbackLng[h],ns:b})});else if("current"===P.sendMissingTo||"fallback"===P.sendMissingTo&&P.fallbackLng[0]===!1)g.push({lng:a,url:t(P.resPostPath,{lng:a,ns:b})});else if("all"===P.sendMissingTo)for(var h=0,i=e.length;i>h;h++)g.push({lng:e[h],url:t(P.resPostPath,{lng:e[h],ns:b})});for(var j=0,k=g.length;k>j;j++){var l=g[j];T.ajax({url:l.url,type:P.sendType,data:f,success:function(){T.log("posted missing key '"+c+"' to: "+l.url);for(var a=c.split("."),e=0,f=J[l.lng][b];a[e];)f=f[a[e]]=e===a.length-1?d:f[a[e]]||{},e++},error:function(){T.log("failed posting missing key '"+c+"' to: "+l.url)},dataType:"json",async:P.postAsync})}},reload:r};var P={lng:void 0,load:"all",preload:[],lowerCaseLng:!1,returnObjectTrees:!1,fallbackLng:["dev"],fallbackNS:[],detectLngQS:"setLng",detectLngFromLocalStorage:!1,ns:"translation",fallbackOnNull:!0,fallbackOnEmpty:!1,fallbackToDefaultNS:!1,nsseparator:":",keyseparator:".",selectorAttr:"data-i18n",debug:!1,resGetPath:"locales/__lng__/__ns__.json",resPostPath:"locales/add/__lng__/__ns__",getAsync:!0,postAsync:!0,resStore:void 0,useLocalStorage:!1,localStorageExpirationTime:6048e5,dynamicLoad:!1,sendMissing:!1,sendMissingTo:"fallback",sendType:"POST",interpolationPrefix:"__",interpolationSuffix:"__",defaultVariables:!1,reusePrefix:"$t(",reuseSuffix:")",pluralSuffix:"_plural",pluralNotFound:["plural_not_found",Math.random()].join(""),contextNotFound:["context_not_found",Math.random()].join(""),escapeInterpolation:!1,indefiniteSuffix:"_indefinite",indefiniteNotFound:["indefinite_not_found",Math.random()].join(""),setJqueryExt:!0,defaultValueFromContent:!0,useDataAttrOptions:!1,cookieExpirationTime:void 0,useCookie:!0,cookieName:"i18next",cookieDomain:void 0,objectTreeKeyHandler:void 0,postProcess:void 0,parseMissingKey:void 0,missingKeyHandler:N.postMissing,shortcutFunction:"sprintf"},Q={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;","/":"&#x2F;"},R={create:function(a,b,c,d){var e;if(c){var f=new Date;f.setTime(f.getTime()+1e3*60*c),e="; expires="+f.toGMTString()}else e="";d=d?"domain="+d+";":"",document.cookie=a+"="+b+e+";"+d+"path=/"},read:function(a){for(var b=a+"=",c=document.cookie.split(";"),d=0;d<c.length;d++){for(var e=c[d];" "==e.charAt(0);)e=e.substring(1,e.length);if(0===e.indexOf(b))return e.substring(b.length,e.length)}return null},remove:function(a){this.create(a,"",-1)}},S={create:function(){},read:function(){return null},remove:function(){}},T={extend:H?H.extend:a,deepExtend:b,each:H?H.each:c,ajax:H?H.ajax:"undefined"!=typeof document?e:function(){},cookie:"undefined"!=typeof document?R:S,detectLanguage:E,escape:d,log:function(a){P.debug&&"undefined"!=typeof console&&console.log(a)},error:function(a){"undefined"!=typeof console&&console.error(a)},getCountyIndexOfLng:function(a){var b=0;return("nb-NO"===a||"nn-NO"===a||"nb-no"===a||"nn-no"===a)&&(b=1),b},toLanguages:function(a){function b(a){var b=a;if("string"==typeof a&&a.indexOf("-")>-1){var c=a.split("-");b=P.lowerCaseLng?c[0].toLowerCase()+"-"+c[1].toLowerCase():c[0].toLowerCase()+"-"+c[1].toUpperCase()}else b=P.lowerCaseLng?a.toLowerCase():a;return b}var c=this.log,d=[],e=P.lngWhitelist||!1,f=function(a){!e||e.indexOf(a)>-1?d.push(a):c("rejecting non-whitelisted language: "+a)};if("string"==typeof a&&a.indexOf("-")>-1){var g=a.split("-");"unspecific"!==P.load&&f(b(a)),"current"!==P.load&&f(b(g[this.getCountyIndexOfLng(a)]))}else f(b(a));for(var h=0;h<P.fallbackLng.length;h++)-1===d.indexOf(P.fallbackLng[h])&&P.fallbackLng[h]&&d.push(b(P.fallbackLng[h]));return d},regexEscape:function(a){return a.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&")},regexReplacementEscape:function(a){return"string"==typeof a?a.replace(/\$/g,"$$$$"):a},localStorage:{setItem:function(a,b){if(window.localStorage)try{window.localStorage.setItem(a,b)}catch(c){T.log('failed to set value for key "'+a+'" to localStorage.')}}}};T.applyReplacement=t;var U=[["ach","Acholi",[1,2],1],["af","Afrikaans",[1,2],2],["ak","Akan",[1,2],1],["am","Amharic",[1,2],1],["an","Aragonese",[1,2],2],["ar","Arabic",[0,1,2,3,11,100],5],["arn","Mapudungun",[1,2],1],["ast","Asturian",[1,2],2],["ay","Aymará",[1],3],["az","Azerbaijani",[1,2],2],["be","Belarusian",[1,2,5],4],["bg","Bulgarian",[1,2],2],["bn","Bengali",[1,2],2],["bo","Tibetan",[1],3],["br","Breton",[1,2],1],["bs","Bosnian",[1,2,5],4],["ca","Catalan",[1,2],2],["cgg","Chiga",[1],3],["cs","Czech",[1,2,5],6],["csb","Kashubian",[1,2,5],7],["cy","Welsh",[1,2,3,8],8],["da","Danish",[1,2],2],["de","German",[1,2],2],["dev","Development Fallback",[1,2],2],["dz","Dzongkha",[1],3],["el","Greek",[1,2],2],["en","English",[1,2],2],["eo","Esperanto",[1,2],2],["es","Spanish",[1,2],2],["es_ar","Argentinean Spanish",[1,2],2],["et","Estonian",[1,2],2],["eu","Basque",[1,2],2],["fa","Persian",[1],3],["fi","Finnish",[1,2],2],["fil","Filipino",[1,2],1],["fo","Faroese",[1,2],2],["fr","French",[1,2],9],["fur","Friulian",[1,2],2],["fy","Frisian",[1,2],2],["ga","Irish",[1,2,3,7,11],10],["gd","Scottish Gaelic",[1,2,3,20],11],["gl","Galician",[1,2],2],["gu","Gujarati",[1,2],2],["gun","Gun",[1,2],1],["ha","Hausa",[1,2],2],["he","Hebrew",[1,2],2],["hi","Hindi",[1,2],2],["hr","Croatian",[1,2,5],4],["hu","Hungarian",[1,2],2],["hy","Armenian",[1,2],2],["ia","Interlingua",[1,2],2],["id","Indonesian",[1],3],["is","Icelandic",[1,2],12],["it","Italian",[1,2],2],["ja","Japanese",[1],3],["jbo","Lojban",[1],3],["jv","Javanese",[0,1],13],["ka","Georgian",[1],3],["kk","Kazakh",[1],3],["km","Khmer",[1],3],["kn","Kannada",[1,2],2],["ko","Korean",[1],3],["ku","Kurdish",[1,2],2],["kw","Cornish",[1,2,3,4],14],["ky","Kyrgyz",[1],3],["lb","Letzeburgesch",[1,2],2],["ln","Lingala",[1,2],1],["lo","Lao",[1],3],["lt","Lithuanian",[1,2,10],15],["lv","Latvian",[1,2,0],16],["mai","Maithili",[1,2],2],["mfe","Mauritian Creole",[1,2],1],["mg","Malagasy",[1,2],1],["mi","Maori",[1,2],1],["mk","Macedonian",[1,2],17],["ml","Malayalam",[1,2],2],["mn","Mongolian",[1,2],2],["mnk","Mandinka",[0,1,2],18],["mr","Marathi",[1,2],2],["ms","Malay",[1],3],["mt","Maltese",[1,2,11,20],19],["nah","Nahuatl",[1,2],2],["nap","Neapolitan",[1,2],2],["nb","Norwegian Bokmal",[1,2],2],["ne","Nepali",[1,2],2],["nl","Dutch",[1,2],2],["nn","Norwegian Nynorsk",[1,2],2],["no","Norwegian",[1,2],2],["nso","Northern Sotho",[1,2],2],["oc","Occitan",[1,2],1],["or","Oriya",[2,1],2],["pa","Punjabi",[1,2],2],["pap","Papiamento",[1,2],2],["pl","Polish",[1,2,5],7],["pms","Piemontese",[1,2],2],["ps","Pashto",[1,2],2],["pt","Portuguese",[1,2],2],["pt_br","Brazilian Portuguese",[1,2],2],["rm","Romansh",[1,2],2],["ro","Romanian",[1,2,20],20],["ru","Russian",[1,2,5],4],["sah","Yakut",[1],3],["sco","Scots",[1,2],2],["se","Northern Sami",[1,2],2],["si","Sinhala",[1,2],2],["sk","Slovak",[1,2,5],6],["sl","Slovenian",[5,1,2,3],21],["so","Somali",[1,2],2],["son","Songhay",[1,2],2],["sq","Albanian",[1,2],2],["sr","Serbian",[1,2,5],4],["su","Sundanese",[1],3],["sv","Swedish",[1,2],2],["sw","Swahili",[1,2],2],["ta","Tamil",[1,2],2],["te","Telugu",[1,2],2],["tg","Tajik",[1,2],1],["th","Thai",[1],3],["ti","Tigrinya",[1,2],1],["tk","Turkmen",[1,2],2],["tr","Turkish",[1,2],1],["tt","Tatar",[1],3],["ug","Uyghur",[1],3],["uk","Ukrainian",[1,2,5],4],["ur","Urdu",[1,2],2],["uz","Uzbek",[1,2],1],["vi","Vietnamese",[1],3],["wa","Walloon",[1,2],1],["wo","Wolof",[1],3],["yo","Yoruba",[1,2],2],["zh","Chinese",[1],3]],V={1:function(a){return Number(a>1)},2:function(a){return Number(1!=a)},3:function(){return 0},4:function(a){return Number(1==a%10&&11!=a%100?0:a%10>=2&&4>=a%10&&(10>a%100||a%100>=20)?1:2)},5:function(a){return Number(0===a?0:1==a?1:2==a?2:a%100>=3&&10>=a%100?3:a%100>=11?4:5)},6:function(a){return Number(1==a?0:a>=2&&4>=a?1:2)},7:function(a){return Number(1==a?0:a%10>=2&&4>=a%10&&(10>a%100||a%100>=20)?1:2)},8:function(a){return Number(1==a?0:2==a?1:8!=a&&11!=a?2:3)},9:function(a){return Number(a>=2)},10:function(a){return Number(1==a?0:2==a?1:7>a?2:11>a?3:4)},11:function(a){return Number(1==a||11==a?0:2==a||12==a?1:a>2&&20>a?2:3)},12:function(a){return Number(1!=a%10||11==a%100)},13:function(a){return Number(0!==a)},14:function(a){return Number(1==a?0:2==a?1:3==a?2:3)},15:function(a){return Number(1==a%10&&11!=a%100?0:a%10>=2&&(10>a%100||a%100>=20)?1:2)},16:function(a){return Number(1==a%10&&11!=a%100?0:0!==a?1:2)},17:function(a){return Number(1==a||1==a%10?0:1)},18:function(a){return Number(1==a?1:2)},19:function(a){return Number(1==a?0:0===a||a%100>1&&11>a%100?1:a%100>10&&20>a%100?2:3)},20:function(a){return Number(1==a?0:0===a||a%100>0&&20>a%100?1:2)},21:function(a){return Number(1==a%100?1:2==a%100?2:3==a%100||4==a%100?3:0)}},W={rules:function(){var a,b={};for(a=U.length;a--;)b[U[a][0]]={name:U[a][1],numbers:U[a][2],plurals:V[U[a][3]]};return b}(),addRule:function(a,b){W.rules[a]=b},setCurrentLng:function(a){if(!W.currentRule||W.currentRule.lng!==a){var b=a.split("-");W.currentRule={lng:a,rule:W.rules[b[0]]}}},needsPlural:function(a,b){var c,d=a.split("-");return c=W.currentRule&&W.currentRule.lng===a?W.currentRule.rule:W.rules[d[T.getCountyIndexOfLng(a)]],c&&c.numbers.length<=1?!1:1!==this.get(a,b)},get:function(a,b){function c(b,c){var d;if(d=W.currentRule&&W.currentRule.lng===a?W.currentRule.rule:W.rules[b]){var e;e=d.noAbs?d.plurals(c):d.plurals(Math.abs(c));var f=d.numbers[e];return 2===d.numbers.length&&1===d.numbers[0]&&(2===f?f=-1:1===f&&(f=1)),f}return 1===c?"1":"-1"}var d=a.split("-");return c(d[T.getCountyIndexOfLng(a)],b)}},X={},Y=function(a,b){X[a]=b},Z=function(){function a(a){return Object.prototype.toString.call(a).slice(8,-1).toLowerCase()}function b(a,b){for(var c=[];b>0;c[--b]=a);return c.join("")}var c=function(){return c.cache.hasOwnProperty(arguments[0])||(c.cache[arguments[0]]=c.parse(arguments[0])),c.format.call(null,c.cache[arguments[0]],arguments)};return c.format=function(c,d){var e,f,g,h,i,j,k,l=1,m=c.length,n="",o=[];for(f=0;m>f;f++)if(n=a(c[f]),"string"===n)o.push(c[f]);else if("array"===n){if(h=c[f],h[2])for(e=d[l],g=0;g<h[2].length;g++){if(!e.hasOwnProperty(h[2][g]))throw Z('[sprintf] property "%s" does not exist',h[2][g]);e=e[h[2][g]]}else e=h[1]?d[h[1]]:d[l++];if(/[^s]/.test(h[8])&&"number"!=a(e))throw Z("[sprintf] expecting number but found %s",a(e));switch(h[8]){case"b":e=e.toString(2);break;case"c":e=String.fromCharCode(e);break;case"d":e=parseInt(e,10);break;case"e":e=h[7]?e.toExponential(h[7]):e.toExponential();break;case"f":e=h[7]?parseFloat(e).toFixed(h[7]):parseFloat(e);break;case"o":e=e.toString(8);break;case"s":e=(e=String(e))&&h[7]?e.substring(0,h[7]):e;break;case"u":e=Math.abs(e);break;case"x":e=e.toString(16);break;case"X":e=e.toString(16).toUpperCase()}e=/[def]/.test(h[8])&&h[3]&&e>=0?"+"+e:e,j=h[4]?"0"==h[4]?"0":h[4].charAt(1):" ",k=h[6]-String(e).length,i=h[6]?b(j,k):"",o.push(h[5]?e+i:i+e)}return o.join("")},c.cache={},c.parse=function(a){for(var b=a,c=[],d=[],e=0;b;){if(null!==(c=/^[^\x25]+/.exec(b)))d.push(c[0]);else if(null!==(c=/^\x25{2}/.exec(b)))d.push("%");else{if(null===(c=/^\x25(?:([1-9]\d*)\$|\(([^\)]+)\))?(\+)?(0|'[^$])?(-)?(\d+)?(?:\.(\d+))?([b-fosuxX])/.exec(b)))throw"[sprintf] huh?";if(c[2]){e|=1;var f=[],g=c[2],h=[];if(null===(h=/^([a-z_][a-z_\d]*)/i.exec(g)))throw"[sprintf] huh?";for(f.push(h[1]);""!==(g=g.substring(h[0].length));)if(null!==(h=/^\.([a-z_][a-z_\d]*)/i.exec(g)))f.push(h[1]);else{if(null===(h=/^\[(\d+)\]/.exec(g)))throw"[sprintf] huh?";f.push(h[1])}c[2]=f}else e|=2;if(3===e)throw"[sprintf] mixing positional and named placeholders is not (yet) supported";d.push(c)}b=b.substring(c[0].length)}return d},c}(),$=function(a,b){return b.unshift(a),Z.apply(null,b)};Y("sprintf",function(a,b,c){return c.sprintf?"[object Array]"===Object.prototype.toString.apply(c.sprintf)?$(a,c.sprintf):"object"==typeof c.sprintf?Z(a,c.sprintf):a:a}),I.init=f,I.setLng=p,I.preload=g,I.addResourceBundle=h,I.hasResourceBundle=i,I.addResource=k,I.addResources=l,I.removeResourceBundle=j,I.loadNamespace=n,I.loadNamespaces=o,I.setDefaultNamespace=m,I.t=z,I.translate=z,I.exists=y,I.detectLanguage=T.detectLanguage,I.pluralExtensions=W,I.sync=N,I.functions=T,I.lng=q,I.addPostProcessor=Y,I.options=P}();
/*!
+ * Source: lib/magnific-popup/dist/jquery.magnific-popup.min.js, license: MIT, url: http://dimsemenov.com/plugins/magnific-popup/
+ */
+/*! Magnific Popup - v1.0.0 - 2015-01-03
+* http://dimsemenov.com/plugins/magnific-popup/
+* Copyright (c) 2015 Dmitry Semenov; */
+!function(a){"function"==typeof define&&define.amd?define(["jquery"],a):a("object"==typeof exports?require("jquery"):window.jQuery||window.Zepto)}(function(a){var b,c,d,e,f,g,h="Close",i="BeforeClose",j="AfterClose",k="BeforeAppend",l="MarkupParse",m="Open",n="Change",o="mfp",p="."+o,q="mfp-ready",r="mfp-removing",s="mfp-prevent-close",t=function(){},u=!!window.jQuery,v=a(window),w=function(a,c){b.ev.on(o+a+p,c)},x=function(b,c,d,e){var f=document.createElement("div");return f.className="mfp-"+b,d&&(f.innerHTML=d),e?c&&c.appendChild(f):(f=a(f),c&&f.appendTo(c)),f},y=function(c,d){b.ev.triggerHandler(o+c,d),b.st.callbacks&&(c=c.charAt(0).toLowerCase()+c.slice(1),b.st.callbacks[c]&&b.st.callbacks[c].apply(b,a.isArray(d)?d:[d]))},z=function(c){return c===g&&b.currTemplate.closeBtn||(b.currTemplate.closeBtn=a(b.st.closeMarkup.replace("%title%",b.st.tClose)),g=c),b.currTemplate.closeBtn},A=function(){a.magnificPopup.instance||(b=new t,b.init(),a.magnificPopup.instance=b)},B=function(){var a=document.createElement("p").style,b=["ms","O","Moz","Webkit"];if(void 0!==a.transition)return!0;for(;b.length;)if(b.pop()+"Transition"in a)return!0;return!1};t.prototype={constructor:t,init:function(){var c=navigator.appVersion;b.isIE7=-1!==c.indexOf("MSIE 7."),b.isIE8=-1!==c.indexOf("MSIE 8."),b.isLowIE=b.isIE7||b.isIE8,b.isAndroid=/android/gi.test(c),b.isIOS=/iphone|ipad|ipod/gi.test(c),b.supportsTransition=B(),b.probablyMobile=b.isAndroid||b.isIOS||/(Opera Mini)|Kindle|webOS|BlackBerry|(Opera Mobi)|(Windows Phone)|IEMobile/i.test(navigator.userAgent),d=a(document),b.popupsCache={}},open:function(c){var e;if(c.isObj===!1){b.items=c.items.toArray(),b.index=0;var g,h=c.items;for(e=0;e<h.length;e++)if(g=h[e],g.parsed&&(g=g.el[0]),g===c.el[0]){b.index=e;break}}else b.items=a.isArray(c.items)?c.items:[c.items],b.index=c.index||0;if(b.isOpen)return void b.updateItemHTML();b.types=[],f="",b.ev=c.mainEl&&c.mainEl.length?c.mainEl.eq(0):d,c.key?(b.popupsCache[c.key]||(b.popupsCache[c.key]={}),b.currTemplate=b.popupsCache[c.key]):b.currTemplate={},b.st=a.extend(!0,{},a.magnificPopup.defaults,c),b.fixedContentPos="auto"===b.st.fixedContentPos?!b.probablyMobile:b.st.fixedContentPos,b.st.modal&&(b.st.closeOnContentClick=!1,b.st.closeOnBgClick=!1,b.st.showCloseBtn=!1,b.st.enableEscapeKey=!1),b.bgOverlay||(b.bgOverlay=x("bg").on("click"+p,function(){b.close()}),b.wrap=x("wrap").attr("tabindex",-1).on("click"+p,function(a){b._checkIfClose(a.target)&&b.close()}),b.container=x("container",b.wrap)),b.contentContainer=x("content"),b.st.preloader&&(b.preloader=x("preloader",b.container,b.st.tLoading));var i=a.magnificPopup.modules;for(e=0;e<i.length;e++){var j=i[e];j=j.charAt(0).toUpperCase()+j.slice(1),b["init"+j].call(b)}y("BeforeOpen"),b.st.showCloseBtn&&(b.st.closeBtnInside?(w(l,function(a,b,c,d){c.close_replaceWith=z(d.type)}),f+=" mfp-close-btn-in"):b.wrap.append(z())),b.st.alignTop&&(f+=" mfp-align-top"),b.wrap.css(b.fixedContentPos?{overflow:b.st.overflowY,overflowX:"hidden",overflowY:b.st.overflowY}:{top:v.scrollTop(),position:"absolute"}),(b.st.fixedBgPos===!1||"auto"===b.st.fixedBgPos&&!b.fixedContentPos)&&b.bgOverlay.css({height:d.height(),position:"absolute"}),b.st.enableEscapeKey&&d.on("keyup"+p,function(a){27===a.keyCode&&b.close()}),v.on("resize"+p,function(){b.updateSize()}),b.st.closeOnContentClick||(f+=" mfp-auto-cursor"),f&&b.wrap.addClass(f);var k=b.wH=v.height(),n={};if(b.fixedContentPos&&b._hasScrollBar(k)){var o=b._getScrollbarSize();o&&(n.marginRight=o)}b.fixedContentPos&&(b.isIE7?a("body, html").css("overflow","hidden"):n.overflow="hidden");var r=b.st.mainClass;return b.isIE7&&(r+=" mfp-ie7"),r&&b._addClassToMFP(r),b.updateItemHTML(),y("BuildControls"),a("html").css(n),b.bgOverlay.add(b.wrap).prependTo(b.st.prependTo||a(document.body)),b._lastFocusedEl=document.activeElement,setTimeout(function(){b.content?(b._addClassToMFP(q),b._setFocus()):b.bgOverlay.addClass(q),d.on("focusin"+p,b._onFocusIn)},16),b.isOpen=!0,b.updateSize(k),y(m),c},close:function(){b.isOpen&&(y(i),b.isOpen=!1,b.st.removalDelay&&!b.isLowIE&&b.supportsTransition?(b._addClassToMFP(r),setTimeout(function(){b._close()},b.st.removalDelay)):b._close())},_close:function(){y(h);var c=r+" "+q+" ";if(b.bgOverlay.detach(),b.wrap.detach(),b.container.empty(),b.st.mainClass&&(c+=b.st.mainClass+" "),b._removeClassFromMFP(c),b.fixedContentPos){var e={marginRight:""};b.isIE7?a("body, html").css("overflow",""):e.overflow="",a("html").css(e)}d.off("keyup"+p+" focusin"+p),b.ev.off(p),b.wrap.attr("class","mfp-wrap").removeAttr("style"),b.bgOverlay.attr("class","mfp-bg"),b.container.attr("class","mfp-container"),!b.st.showCloseBtn||b.st.closeBtnInside&&b.currTemplate[b.currItem.type]!==!0||b.currTemplate.closeBtn&&b.currTemplate.closeBtn.detach(),b._lastFocusedEl&&a(b._lastFocusedEl).focus(),b.currItem=null,b.content=null,b.currTemplate=null,b.prevHeight=0,y(j)},updateSize:function(a){if(b.isIOS){var c=document.documentElement.clientWidth/window.innerWidth,d=window.innerHeight*c;b.wrap.css("height",d),b.wH=d}else b.wH=a||v.height();b.fixedContentPos||b.wrap.css("height",b.wH),y("Resize")},updateItemHTML:function(){var c=b.items[b.index];b.contentContainer.detach(),b.content&&b.content.detach(),c.parsed||(c=b.parseEl(b.index));var d=c.type;if(y("BeforeChange",[b.currItem?b.currItem.type:"",d]),b.currItem=c,!b.currTemplate[d]){var f=b.st[d]?b.st[d].markup:!1;y("FirstMarkupParse",f),b.currTemplate[d]=f?a(f):!0}e&&e!==c.type&&b.container.removeClass("mfp-"+e+"-holder");var g=b["get"+d.charAt(0).toUpperCase()+d.slice(1)](c,b.currTemplate[d]);b.appendContent(g,d),c.preloaded=!0,y(n,c),e=c.type,b.container.prepend(b.contentContainer),y("AfterChange")},appendContent:function(a,c){b.content=a,a?b.st.showCloseBtn&&b.st.closeBtnInside&&b.currTemplate[c]===!0?b.content.find(".mfp-close").length||b.content.append(z()):b.content=a:b.content="",y(k),b.container.addClass("mfp-"+c+"-holder"),b.contentContainer.append(b.content)},parseEl:function(c){var d,e=b.items[c];if(e.tagName?e={el:a(e)}:(d=e.type,e={data:e,src:e.src}),e.el){for(var f=b.types,g=0;g<f.length;g++)if(e.el.hasClass("mfp-"+f[g])){d=f[g];break}e.src=e.el.attr("data-mfp-src"),e.src||(e.src=e.el.attr("href"))}return e.type=d||b.st.type||"inline",e.index=c,e.parsed=!0,b.items[c]=e,y("ElementParse",e),b.items[c]},addGroup:function(a,c){var d=function(d){d.mfpEl=this,b._openClick(d,a,c)};c||(c={});var e="click.magnificPopup";c.mainEl=a,c.items?(c.isObj=!0,a.off(e).on(e,d)):(c.isObj=!1,c.delegate?a.off(e).on(e,c.delegate,d):(c.items=a,a.off(e).on(e,d)))},_openClick:function(c,d,e){var f=void 0!==e.midClick?e.midClick:a.magnificPopup.defaults.midClick;if(f||2!==c.which&&!c.ctrlKey&&!c.metaKey){var g=void 0!==e.disableOn?e.disableOn:a.magnificPopup.defaults.disableOn;if(g)if(a.isFunction(g)){if(!g.call(b))return!0}else if(v.width()<g)return!0;c.type&&(c.preventDefault(),b.isOpen&&c.stopPropagation()),e.el=a(c.mfpEl),e.delegate&&(e.items=d.find(e.delegate)),b.open(e)}},updateStatus:function(a,d){if(b.preloader){c!==a&&b.container.removeClass("mfp-s-"+c),d||"loading"!==a||(d=b.st.tLoading);var e={status:a,text:d};y("UpdateStatus",e),a=e.status,d=e.text,b.preloader.html(d),b.preloader.find("a").on("click",function(a){a.stopImmediatePropagation()}),b.container.addClass("mfp-s-"+a),c=a}},_checkIfClose:function(c){if(!a(c).hasClass(s)){var d=b.st.closeOnContentClick,e=b.st.closeOnBgClick;if(d&&e)return!0;if(!b.content||a(c).hasClass("mfp-close")||b.preloader&&c===b.preloader[0])return!0;if(c===b.content[0]||a.contains(b.content[0],c)){if(d)return!0}else if(e&&a.contains(document,c))return!0;return!1}},_addClassToMFP:function(a){b.bgOverlay.addClass(a),b.wrap.addClass(a)},_removeClassFromMFP:function(a){this.bgOverlay.removeClass(a),b.wrap.removeClass(a)},_hasScrollBar:function(a){return(b.isIE7?d.height():document.body.scrollHeight)>(a||v.height())},_setFocus:function(){(b.st.focus?b.content.find(b.st.focus).eq(0):b.wrap).focus()},_onFocusIn:function(c){return c.target===b.wrap[0]||a.contains(b.wrap[0],c.target)?void 0:(b._setFocus(),!1)},_parseMarkup:function(b,c,d){var e;d.data&&(c=a.extend(d.data,c)),y(l,[b,c,d]),a.each(c,function(a,c){if(void 0===c||c===!1)return!0;if(e=a.split("_"),e.length>1){var d=b.find(p+"-"+e[0]);if(d.length>0){var f=e[1];"replaceWith"===f?d[0]!==c[0]&&d.replaceWith(c):"img"===f?d.is("img")?d.attr("src",c):d.replaceWith('<img src="'+c+'" class="'+d.attr("class")+'" />'):d.attr(e[1],c)}}else b.find(p+"-"+a).html(c)})},_getScrollbarSize:function(){if(void 0===b.scrollbarSize){var a=document.createElement("div");a.style.cssText="width: 99px; height: 99px; overflow: scroll; position: absolute; top: -9999px;",document.body.appendChild(a),b.scrollbarSize=a.offsetWidth-a.clientWidth,document.body.removeChild(a)}return b.scrollbarSize}},a.magnificPopup={instance:null,proto:t.prototype,modules:[],open:function(b,c){return A(),b=b?a.extend(!0,{},b):{},b.isObj=!0,b.index=c||0,this.instance.open(b)},close:function(){return a.magnificPopup.instance&&a.magnificPopup.instance.close()},registerModule:function(b,c){c.options&&(a.magnificPopup.defaults[b]=c.options),a.extend(this.proto,c.proto),this.modules.push(b)},defaults:{disableOn:0,key:null,midClick:!1,mainClass:"",preloader:!0,focus:"",closeOnContentClick:!1,closeOnBgClick:!0,closeBtnInside:!0,showCloseBtn:!0,enableEscapeKey:!0,modal:!1,alignTop:!1,removalDelay:0,prependTo:null,fixedContentPos:"auto",fixedBgPos:"auto",overflowY:"auto",closeMarkup:'<button title="%title%" type="button" class="mfp-close">&times;</button>',tClose:"Close (Esc)",tLoading:"Loading..."}},a.fn.magnificPopup=function(c){A();var d=a(this);if("string"==typeof c)if("open"===c){var e,f=u?d.data("magnificPopup"):d[0].magnificPopup,g=parseInt(arguments[1],10)||0;f.items?e=f.items[g]:(e=d,f.delegate&&(e=e.find(f.delegate)),e=e.eq(g)),b._openClick({mfpEl:e},d,f)}else b.isOpen&&b[c].apply(b,Array.prototype.slice.call(arguments,1));else c=a.extend(!0,{},c),u?d.data("magnificPopup",c):d[0].magnificPopup=c,b.addGroup(d,c);return d};var C,D,E,F="inline",G=function(){E&&(D.after(E.addClass(C)).detach(),E=null)};a.magnificPopup.registerModule(F,{options:{hiddenClass:"hide",markup:"",tNotFound:"Content not found"},proto:{initInline:function(){b.types.push(F),w(h+"."+F,function(){G()})},getInline:function(c,d){if(G(),c.src){var e=b.st.inline,f=a(c.src);if(f.length){var g=f[0].parentNode;g&&g.tagName&&(D||(C=e.hiddenClass,D=x(C),C="mfp-"+C),E=f.after(D).detach().removeClass(C)),b.updateStatus("ready")}else b.updateStatus("error",e.tNotFound),f=a("<div>");return c.inlineElement=f,f}return b.updateStatus("ready"),b._parseMarkup(d,{},c),d}}});var H,I="ajax",J=function(){H&&a(document.body).removeClass(H)},K=function(){J(),b.req&&b.req.abort()};a.magnificPopup.registerModule(I,{options:{settings:null,cursor:"mfp-ajax-cur",tError:'<a href="%url%">The content</a> could not be loaded.'},proto:{initAjax:function(){b.types.push(I),H=b.st.ajax.cursor,w(h+"."+I,K),w("BeforeChange."+I,K)},getAjax:function(c){H&&a(document.body).addClass(H),b.updateStatus("loading");var d=a.extend({url:c.src,success:function(d,e,f){var g={data:d,xhr:f};y("ParseAjax",g),b.appendContent(a(g.data),I),c.finished=!0,J(),b._setFocus(),setTimeout(function(){b.wrap.addClass(q)},16),b.updateStatus("ready"),y("AjaxContentAdded")},error:function(){J(),c.finished=c.loadError=!0,b.updateStatus("error",b.st.ajax.tError.replace("%url%",c.src))}},b.st.ajax.settings);return b.req=a.ajax(d),""}}});var L,M=function(c){if(c.data&&void 0!==c.data.title)return c.data.title;var d=b.st.image.titleSrc;if(d){if(a.isFunction(d))return d.call(b,c);if(c.el)return c.el.attr(d)||""}return""};a.magnificPopup.registerModule("image",{options:{markup:'<div class="mfp-figure"><div class="mfp-close"></div><figure><div class="mfp-img"></div><figcaption><div class="mfp-bottom-bar"><div class="mfp-title"></div><div class="mfp-counter"></div></div></figcaption></figure></div>',cursor:"mfp-zoom-out-cur",titleSrc:"title",verticalFit:!0,tError:'<a href="%url%">The image</a> could not be loaded.'},proto:{initImage:function(){var c=b.st.image,d=".image";b.types.push("image"),w(m+d,function(){"image"===b.currItem.type&&c.cursor&&a(document.body).addClass(c.cursor)}),w(h+d,function(){c.cursor&&a(document.body).removeClass(c.cursor),v.off("resize"+p)}),w("Resize"+d,b.resizeImage),b.isLowIE&&w("AfterChange",b.resizeImage)},resizeImage:function(){var a=b.currItem;if(a&&a.img&&b.st.image.verticalFit){var c=0;b.isLowIE&&(c=parseInt(a.img.css("padding-top"),10)+parseInt(a.img.css("padding-bottom"),10)),a.img.css("max-height",b.wH-c)}},_onImageHasSize:function(a){a.img&&(a.hasSize=!0,L&&clearInterval(L),a.isCheckingImgSize=!1,y("ImageHasSize",a),a.imgHidden&&(b.content&&b.content.removeClass("mfp-loading"),a.imgHidden=!1))},findImageSize:function(a){var c=0,d=a.img[0],e=function(f){L&&clearInterval(L),L=setInterval(function(){return d.naturalWidth>0?void b._onImageHasSize(a):(c>200&&clearInterval(L),c++,void(3===c?e(10):40===c?e(50):100===c&&e(500)))},f)};e(1)},getImage:function(c,d){var e=0,f=function(){c&&(c.img[0].complete?(c.img.off(".mfploader"),c===b.currItem&&(b._onImageHasSize(c),b.updateStatus("ready")),c.hasSize=!0,c.loaded=!0,y("ImageLoadComplete")):(e++,200>e?setTimeout(f,100):g()))},g=function(){c&&(c.img.off(".mfploader"),c===b.currItem&&(b._onImageHasSize(c),b.updateStatus("error",h.tError.replace("%url%",c.src))),c.hasSize=!0,c.loaded=!0,c.loadError=!0)},h=b.st.image,i=d.find(".mfp-img");if(i.length){var j=document.createElement("img");j.className="mfp-img",c.el&&c.el.find("img").length&&(j.alt=c.el.find("img").attr("alt")),c.img=a(j).on("load.mfploader",f).on("error.mfploader",g),j.src=c.src,i.is("img")&&(c.img=c.img.clone()),j=c.img[0],j.naturalWidth>0?c.hasSize=!0:j.width||(c.hasSize=!1)}return b._parseMarkup(d,{title:M(c),img_replaceWith:c.img},c),b.resizeImage(),c.hasSize?(L&&clearInterval(L),c.loadError?(d.addClass("mfp-loading"),b.updateStatus("error",h.tError.replace("%url%",c.src))):(d.removeClass("mfp-loading"),b.updateStatus("ready")),d):(b.updateStatus("loading"),c.loading=!0,c.hasSize||(c.imgHidden=!0,d.addClass("mfp-loading"),b.findImageSize(c)),d)}}});var N,O=function(){return void 0===N&&(N=void 0!==document.createElement("p").style.MozTransform),N};a.magnificPopup.registerModule("zoom",{options:{enabled:!1,easing:"ease-in-out",duration:300,opener:function(a){return a.is("img")?a:a.find("img")}},proto:{initZoom:function(){var a,c=b.st.zoom,d=".zoom";if(c.enabled&&b.supportsTransition){var e,f,g=c.duration,j=function(a){var b=a.clone().removeAttr("style").removeAttr("class").addClass("mfp-animated-image"),d="all "+c.duration/1e3+"s "+c.easing,e={position:"fixed",zIndex:9999,left:0,top:0,"-webkit-backface-visibility":"hidden"},f="transition";return e["-webkit-"+f]=e["-moz-"+f]=e["-o-"+f]=e[f]=d,b.css(e),b},k=function(){b.content.css("visibility","visible")};w("BuildControls"+d,function(){if(b._allowZoom()){if(clearTimeout(e),b.content.css("visibility","hidden"),a=b._getItemToZoom(),!a)return void k();f=j(a),f.css(b._getOffset()),b.wrap.append(f),e=setTimeout(function(){f.css(b._getOffset(!0)),e=setTimeout(function(){k(),setTimeout(function(){f.remove(),a=f=null,y("ZoomAnimationEnded")},16)},g)},16)}}),w(i+d,function(){if(b._allowZoom()){if(clearTimeout(e),b.st.removalDelay=g,!a){if(a=b._getItemToZoom(),!a)return;f=j(a)}f.css(b._getOffset(!0)),b.wrap.append(f),b.content.css("visibility","hidden"),setTimeout(function(){f.css(b._getOffset())},16)}}),w(h+d,function(){b._allowZoom()&&(k(),f&&f.remove(),a=null)})}},_allowZoom:function(){return"image"===b.currItem.type},_getItemToZoom:function(){return b.currItem.hasSize?b.currItem.img:!1},_getOffset:function(c){var d;d=c?b.currItem.img:b.st.zoom.opener(b.currItem.el||b.currItem);var e=d.offset(),f=parseInt(d.css("padding-top"),10),g=parseInt(d.css("padding-bottom"),10);e.top-=a(window).scrollTop()-f;var h={width:d.width(),height:(u?d.innerHeight():d[0].offsetHeight)-g-f};return O()?h["-moz-transform"]=h.transform="translate("+e.left+"px,"+e.top+"px)":(h.left=e.left,h.top=e.top),h}}});var P="iframe",Q="//about:blank",R=function(a){if(b.currTemplate[P]){var c=b.currTemplate[P].find("iframe");c.length&&(a||(c[0].src=Q),b.isIE8&&c.css("display",a?"block":"none"))}};a.magnificPopup.registerModule(P,{options:{markup:'<div class="mfp-iframe-scaler"><div class="mfp-close"></div><iframe class="mfp-iframe" src="//about:blank" frameborder="0" allowfullscreen></iframe></div>',srcAction:"iframe_src",patterns:{youtube:{index:"youtube.com",id:"v=",src:"//www.youtube.com/embed/%id%?autoplay=1"},vimeo:{index:"vimeo.com/",id:"/",src:"//player.vimeo.com/video/%id%?autoplay=1"},gmaps:{index:"//maps.google.",src:"%id%&output=embed"}}},proto:{initIframe:function(){b.types.push(P),w("BeforeChange",function(a,b,c){b!==c&&(b===P?R():c===P&&R(!0))}),w(h+"."+P,function(){R()})},getIframe:function(c,d){var e=c.src,f=b.st.iframe;a.each(f.patterns,function(){return e.indexOf(this.index)>-1?(this.id&&(e="string"==typeof this.id?e.substr(e.lastIndexOf(this.id)+this.id.length,e.length):this.id.call(this,e)),e=this.src.replace("%id%",e),!1):void 0});var g={};return f.srcAction&&(g[f.srcAction]=e),b._parseMarkup(d,g,c),b.updateStatus("ready"),d}}});var S=function(a){var c=b.items.length;return a>c-1?a-c:0>a?c+a:a},T=function(a,b,c){return a.replace(/%curr%/gi,b+1).replace(/%total%/gi,c)};a.magnificPopup.registerModule("gallery",{options:{enabled:!1,arrowMarkup:'<button title="%title%" type="button" class="mfp-arrow mfp-arrow-%dir%"></button>',preload:[0,2],navigateByImgClick:!0,arrows:!0,tPrev:"Previous (Left arrow key)",tNext:"Next (Right arrow key)",tCounter:"%curr% of %total%"},proto:{initGallery:function(){var c=b.st.gallery,e=".mfp-gallery",g=Boolean(a.fn.mfpFastClick);return b.direction=!0,c&&c.enabled?(f+=" mfp-gallery",w(m+e,function(){c.navigateByImgClick&&b.wrap.on("click"+e,".mfp-img",function(){return b.items.length>1?(b.next(),!1):void 0}),d.on("keydown"+e,function(a){37===a.keyCode?b.prev():39===a.keyCode&&b.next()})}),w("UpdateStatus"+e,function(a,c){c.text&&(c.text=T(c.text,b.currItem.index,b.items.length))}),w(l+e,function(a,d,e,f){var g=b.items.length;e.counter=g>1?T(c.tCounter,f.index,g):""}),w("BuildControls"+e,function(){if(b.items.length>1&&c.arrows&&!b.arrowLeft){var d=c.arrowMarkup,e=b.arrowLeft=a(d.replace(/%title%/gi,c.tPrev).replace(/%dir%/gi,"left")).addClass(s),f=b.arrowRight=a(d.replace(/%title%/gi,c.tNext).replace(/%dir%/gi,"right")).addClass(s),h=g?"mfpFastClick":"click";e[h](function(){b.prev()}),f[h](function(){b.next()}),b.isIE7&&(x("b",e[0],!1,!0),x("a",e[0],!1,!0),x("b",f[0],!1,!0),x("a",f[0],!1,!0)),b.container.append(e.add(f))}}),w(n+e,function(){b._preloadTimeout&&clearTimeout(b._preloadTimeout),b._preloadTimeout=setTimeout(function(){b.preloadNearbyImages(),b._preloadTimeout=null},16)}),void w(h+e,function(){d.off(e),b.wrap.off("click"+e),b.arrowLeft&&g&&b.arrowLeft.add(b.arrowRight).destroyMfpFastClick(),b.arrowRight=b.arrowLeft=null})):!1},next:function(){b.direction=!0,b.index=S(b.index+1),b.updateItemHTML()},prev:function(){b.direction=!1,b.index=S(b.index-1),b.updateItemHTML()},goTo:function(a){b.direction=a>=b.index,b.index=a,b.updateItemHTML()},preloadNearbyImages:function(){var a,c=b.st.gallery.preload,d=Math.min(c[0],b.items.length),e=Math.min(c[1],b.items.length);for(a=1;a<=(b.direction?e:d);a++)b._preloadItem(b.index+a);for(a=1;a<=(b.direction?d:e);a++)b._preloadItem(b.index-a)},_preloadItem:function(c){if(c=S(c),!b.items[c].preloaded){var d=b.items[c];d.parsed||(d=b.parseEl(c)),y("LazyLoad",d),"image"===d.type&&(d.img=a('<img class="mfp-img" />').on("load.mfploader",function(){d.hasSize=!0}).on("error.mfploader",function(){d.hasSize=!0,d.loadError=!0,y("LazyLoadError",d)}).attr("src",d.src)),d.preloaded=!0}}}});var U="retina";a.magnificPopup.registerModule(U,{options:{replaceSrc:function(a){return a.src.replace(/\.\w+$/,function(a){return"@2x"+a})},ratio:1},proto:{initRetina:function(){if(window.devicePixelRatio>1){var a=b.st.retina,c=a.ratio;c=isNaN(c)?c():c,c>1&&(w("ImageHasSize."+U,function(a,b){b.img.css({"max-width":b.img[0].naturalWidth/c,width:"100%"})}),w("ElementParse."+U,function(b,d){d.src=a.replaceSrc(d,c)}))}}}}),function(){var b=1e3,c="ontouchstart"in window,d=function(){v.off("touchmove"+f+" touchend"+f)},e="mfpFastClick",f="."+e;a.fn.mfpFastClick=function(e){return a(this).each(function(){var g,h=a(this);if(c){var i,j,k,l,m,n;h.on("touchstart"+f,function(a){l=!1,n=1,m=a.originalEvent?a.originalEvent.touches[0]:a.touches[0],j=m.clientX,k=m.clientY,v.on("touchmove"+f,function(a){m=a.originalEvent?a.originalEvent.touches:a.touches,n=m.length,m=m[0],(Math.abs(m.clientX-j)>10||Math.abs(m.clientY-k)>10)&&(l=!0,d())}).on("touchend"+f,function(a){d(),l||n>1||(g=!0,a.preventDefault(),clearTimeout(i),i=setTimeout(function(){g=!1},b),e())})})}h.on("click"+f,function(){g||e()})})},a.fn.destroyMfpFastClick=function(){a(this).off("touchstart"+f+" click"+f),c&&v.off("touchmove"+f+" touchend"+f)}}(),A()});
+
+/*!
* Source: lib/translation.js, license: MIT, url: https://webtranslateit.com/en/projects/10365-JSXC
*/
-var I18next = {"de":{"translation":{"Logging_in":"Login läuft…","your_connection_is_unencrypted":"Deine Verbindung ist unverschlüsselt.","your_connection_is_encrypted":"Deine Verbindung ist verschlüsselt.","your_buddy_closed_the_private_connection":"Dein Kontakt hat die private Verbindung getrennt.","start_private":"Privat starten","close_private":"Privat abbrechen","your_buddy_is_verificated":"Dein Kontakt ist verifiziert.","you_have_only_a_subscription_in_one_way":"Der Kontaktstatus ist einseitig.","authentication_query_sent":"Authentifizierungsanfrage gesendet.","your_message_wasnt_send_please_end_your_private_conversation":"Deine Nachricht wurde nicht gesendet. Bitte beende die private Konversation.","unencrypted_message_received":"Unverschlüsselte Nachricht erhalten.","your_message_wasnt_send_because_you_have_no_valid_subscription":"Deine Nachricht wurde nicht gesandt, da der Kontaktstatus einseitig ist.","not_available":"Nicht verfügbar.","no_connection":"Keine Verbindung.","relogin":"Neu anmelden.","trying_to_start_private_conversation":"Versuche private Konversation zu starten.","Verified":"Verifiziert","Unverified":"Unverifiziert","private_conversation_started":"Private Konversation gestartet.","private_conversation_aborted":"Private Konversation abgebrochen.","your_buddy_closed_the_private_conversation_you_should_do_the_same":"Dein Kontakt hat die private Konversation beendet. Das solltest du auch tun!","conversation_is_now_verified":"Konversation ist jetzt verifiziert","authentication_failed":"Authentifizierung fehlgeschlagen.","your_buddy_is_attempting_to_determine_":"Dein Kontakt versucht herauszufinden ob er wirklich mit dir redet.","to_authenticate_to_your_buddy":"Um dich gegenüber deinem Kontakt zu verifizieren ","enter_the_answer_and_click_answer":"gib die Antwort ein und klick auf Antworten.","enter_the_secret":"gib das Geheimnis ein.","Creating_your_private_key_":"Wir werden jetzt deinen privaten Schlüssel generieren. Das kann einige Zeit in Anspruch nehmen.","Authenticating_a_buddy_helps_":"Einen Kontakt zu authentifizieren hilft sicherzustellen, dass die Person mit der du sprichst auch die ist die sie sagt.","How_do_you_want_to_authenticate_your_buddy":"Wie willst du {{bid_name}} (<b>{{bid_jid}}</b>) authentifizieren?","Select_method":"Wähle...","Manual":"Manual","Question":"Frage","Secret":"Geheimnis","To_verify_the_fingerprint_":"Um den Fingerprint zu verifizieren kontaktiere dein Kontakt über einen anderen Kommunikationsweg. Zum Beispiel per Telefonanruf.","Your_fingerprint":"Dein Fingerprint","Buddy_fingerprint":"Sein/Ihr Fingerprint","Close":"Schließen","Compared":"Verglichen","To_authenticate_using_a_question_":"Um die Authentifizierung per Frage durchzuführen, wähle eine Frage bei welcher nur dein Kontakt die Antwort kennt.","Ask":"Frage","To_authenticate_pick_a_secret_":"Um deinen Kontakt zu authentifizieren, wähle ein Geheimnis welches nur deinem Kontakt und dir bekannt ist.","Compare":"Vergleiche","Fingerprints":"Fingerprints","Authentication":"Authentifizierung","Message":"Nachricht","Add_buddy":"Kontakt hinzufügen","rename_buddy":"Kontakt umbenennen","delete_buddy":"Kontakt löschen","Login":"Anmeldung","Username":"Benutzername","Password":"Passwort","Cancel":"Abbrechen","Connect":"Verbinden","Type_in_the_full_username_":"Gib bitte den vollen Benutzernamen und optional ein Alias an.","Alias":"Alias","Add":"Hinzufügen","Subscription_request":"Kontaktanfrage","You_have_a_request_from":"Du hast eine Anfrage von","Deny":"Ablehnen","Approve":"Bestätigen","Remove_buddy":"Kontakt entfernen","You_are_about_to_remove_":"Du bist gerade dabei {{bid_name}} (<b>{{bid_jid}}</b>) von deiner Kontaktliste zu entfernen. Alle Chats werden geschlossen.","Continue_without_chat":"Weiter ohne Chat","Please_wait":"Bitte warten","Login_failed":"Chat-Anmeldung fehlgeschlagen","Sorry_we_cant_authentikate_":"Der Chatserver hat die Anmeldung abgelehnt. Falsches Passwort?","Retry":"Zurück","clear_history":"Lösche Verlauf","New_message_from":"Neue Nachricht von","Should_we_notify_you_":"Sollen wir dich in Zukunft über eingehende Nachrichten informieren, auch wenn dieser Tab nicht im Vordergrund ist?","Please_accept_":"Bitte klick auf den \"Zulassen\" Button oben.","Hide_offline":"Offline ausblenden","Show_offline":"Offline einblenden","About":"Über","dnd":"Beschäftigt","Mute":"Ton aus","Unmute":"Ton an","Subscription":"Bezug","both":"beidseitig","Status":"Status","online":"online","chat":"chat","away":"abwesend","xa":"länger abwesend","offline":"offline","none":"keine","Unknown_instance_tag":"Unbekannter instance tag.","Not_one_of_our_latest_keys":"Nicht einer unserer letzten Schlüssel.","Received_an_unreadable_encrypted_message":"Eine unlesbare verschlüsselte Nachricht erhalten.","Online":"Online","Chatty":"Gesprächig","Away":"Abwesend","Extended_away":"Länger abwesend","Offline":"Offline","Friendship_request":"Kontaktanfrage","Confirm":"Bestätigen","Dismiss":"Ablehnen","Remove":"Löschen","Online_help":"Online Hilfe","FN":"Name","N":" ","FAMILY":"Familienname","GIVEN":"Vorname","NICKNAME":"Spitzname","URL":"URL","ADR":"Adresse","STREET":"Straße","EXTADD":"Zusätzliche Adresse","LOCALITY":"Ortschaft","REGION":"Region","PCODE":"Postleitzahl","CTRY":"Land","TEL":"Telefon","NUMBER":"Nummer","EMAIL":"E-Mail","USERID":" ","ORG":"Organisation","ORGNAME":"Name","ORGUNIT":"Abteilung","TITLE":"Titel","ROLE":"Rolle","BDAY":"Geburtstag","DESC":"Beschreibung","PHOTO":" ","send_message":"Sende Nachricht","get_info":"Benutzerinformationen","Settings":"Einstellungen","Priority":"Priorität","Save":"Speichern","User_settings":"Benutzereinstellungen","A_fingerprint_":"Ein Fingerabdruck wird dazu benutzt deinen Gesprächspartner zu identifizieren.","Your_roster_is_empty_add_a":"Deine Kontaktliste ist leer, füge einen neuen Kontakt ","new_buddy":"hinzu","is":"ist","Login_options":"Anmeldeoptionen","BOSH_url":"BOSH url","Domain":"Domain","Resource":"Ressource","On_login":"Beim Anmelden","Received_an_unencrypted_message":"Unverschlüsselte Nachricht empfangen","Sorry_your_buddy_doesnt_provide_any_information":"Dein Kontakt stellt leider keine Informationen bereit.","Info_about":"Info über","Authentication_aborted":"Authentifizierung abgebrochen.","Authentication_request_received":"Authentifizierungsanfrage empfangen.","Do_you_want_to_display_them":"Möchtest du sie sehen?","Log_in_without_chat":"Anmelden ohne Chat","has_come_online":"ist online gekommen","Unknown_sender":"Unbekannter Sender","You_received_a_message_from_an_unknown_sender":"Du hast eine Nachricht von einem unbekannten Sender erhalten","Please_allow_access_to_microphone_and_camera":"Bitte klick auf den \"Zulassen\" Button oben, um den Zugriff auf Kamera und Mikrofon zu erlauben.","Incoming_call":"Eingehender Anruf","from":"von","Do_you_want_to_accept_the_call_from":"Möchtest Du den Anruf annehmen von","Reject":"Ablehnen","Accept":"Annehmen","hang_up":"Auflegen","snapshot":"Schnappschuss","mute_my_audio":"Mein Ton aus","pause_my_video":"Mein Video pausieren","fullscreen":"Vollbild","Info":"Info","Local_IP":"Lokale IP","Remote_IP":"Remote IP","Local_Fingerprint":"Lokaler Fingerprint","Remote_Fingerprint":"Remote Fingerprint","Video_call_not_possible":"Videoanruf nicht verfügbar. Dein Gesprächspartner unterstützt keine Videotelefonie.","Start_video_call":"Starte Videoanruf","Join_chat":"Gruppe beitreten","Join":"Betreten","Room":"Gruppe","Nickname":"Nickname","left_the_building":"__nickname__ hat die Gruppe verlassen","entered_the_room":"__nickname__ ist der Gruppe beigetreten","is_now_known_as":"__oldNickname__ ist nun unter __newNickname__ bekannt","This_room_is":"Diese Gruppe ist","muc_hidden":{"keyword":"versteckt","description":"kann durch die Suche nicht gefunden werden"},"muc_membersonly":{"keyword":"nur für Mitglieder","description":"du musst auf der Mitgliederliste stehen"},"muc_moderated":{"keyword":"moderiert","description":"Nur Personen die \"Mitspracherecht\" haben dürfen Nachrichten senden"},"muc_nonanonymous":{"keyword":"nicht anonym","description":"deine Jabber ID wird für alle Mitglieder sichtbar sein"},"muc_open":{"keyword":"offen","description":"jeder darf dieser Gruppe beitreten"},"muc_passwordprotected":{"keyword":"passwortgeschützt","description":"du benötigst das korrekte Passwort"},"muc_persistent":{"keyword":"permanent","description":"wird nicht geschlossen, wenn das letzte Mitglied die Gruppe verlässt"},"muc_public":{"keyword":"öffentlich","description":"kann durch die Suche gefunden werden"},"muc_semianonymous":{"keyword":"teilweise anonym","description":"deine Jabber ID wird nur für die Gruppen Administratoren sichtbar sein"},"muc_temporary":{"keyword":"temporär","description":"wird geschlossen, wenn das letzte Mitglied die Gruppe verlässt"},"muc_unmoderated":{"keyword":"nicht moderiert","description":"jeder darf Nachrichten senden"},"muc_unsecured":{"keyword":"ungesichert","description":"es wird kein Passwort benötigt"},"Continue":"Weiter","Server":"Server","Rooms_are_loaded":"Gruppen werden geladen","Could_load_only":"Es konnten nur __count__ Gruppen für die Autovervollständigung geladen werden","muc_explanation":"Bitte trage den Gruppennamen und optional ein Nickname und Passwort ein um einer Gruppe beizutreten","You_already_joined_this_room":"Du bist dieser Gruppe bereits beigetreten","This_room_will_be_closed":"Diese Gruppe wird geschlossen","Room_not_found_":"Es wird eine neue Gruppe erstellt","Loading_room_information":"Informationen über Gruppe werden geladen","Destroy":"Auflösen","Leave":"Verlassen","changed_subject_to":"__nickname__ hat das Thema auf __subject__ geändert","muc_removed_kicked":"Du wurdest aus der Gruppe entfernt","muc_removed_info_kicked":"__nickname__ wurde aus der Gruppe entfernt","muc_removed_banned":"Du wurdest aus der Gruppe ausgeschlossen","muc_removed_info_banned":"__nickname__ wurde aus der Gruppe ausgeschlossen","muc_removed_affiliation":"Du wurdest aus der Gruppe entfernt wegen einer Änderung deines Mitgliedstatus","muc_removed_info_affiliation":"__nickname__ wurde aus der Gruppe entfernt wegen einer Änderung seines Mitgliedstatus","muc_removed_membersonly":"Diese Gruppe erlaubt jetzt nur noch eingetragene Mitglieder und da du nicht dazugehörst, wurdest du aus der Gruppen entfernt","muc_removed_info_membersonly":"Diese Gruppe erlaubt jetzt nur noch eingetragene Mitglieder und __nickname__ gehört nicht dazu, daher wurde er aus der Gruppe entfernt","muc_removed_shutdown":"Du wurdest aus der Gruppe entfernt, da der MUC Server heruntergefahren wird","Reason":"Grund","message_not_send":"Deine Nachricht wurde aufgrund eines Fehlers nicht versandt","message_not_send_item-not-found":"Deine Nachricht wurde nicht versandt, da der Raum nicht mehr existiert","message_not_send_forbidden":"Deine Nachricht wurde nicht versandt, da du kein \"Mitspracherecht\" hast","message_not_send_not-acceptable":"Deine Nachricht wurde nicht versandt, da du kein Mitglied dieser Gruppe bist","This_room_has_been_closed":"Diese Gruppe wurde geschlossen","Room_logging_is_enabled":"Gesprächsverlauf kann öffentlich einsehbar sein","A_password_is_required":"Es wird ein Passwort benötigt","You_are_not_on_the_member_list":"Du bist kein eingetragenes Mitglied","You_are_banned_from_this_room":"Du wurdest von dieser Gruppe ausgeschlossen","Your_desired_nickname_":"Dein gewünschter Nickname wird bereits verwendet. Bitte wähle einen anderen.","The_maximum_number_":"Die maximale Anzahl der Mitglieder wurde erreicht.","This_room_is_locked_":"Diese Gruppe ist gesperrt","You_are_not_allowed_to_create_":"Du darfst keine neue Gruppe erstellen","Carbon_copy":null,"Enable":"Aktivieren"}},"el":{"translation":{"Logging_in":null,"your_connection_is_unencrypted":null,"your_connection_is_encrypted":null,"your_buddy_closed_the_private_connection":null,"start_private":null,"close_private":null,"your_buddy_is_verificated":null,"you_have_only_a_subscription_in_one_way":null,"authentication_query_sent":null,"your_message_wasnt_send_please_end_your_private_conversation":null,"unencrypted_message_received":null,"your_message_wasnt_send_because_you_have_no_valid_subscription":null,"not_available":null,"no_connection":null,"relogin":null,"trying_to_start_private_conversation":null,"Verified":null,"Unverified":null,"private_conversation_started":null,"private_conversation_aborted":null,"your_buddy_closed_the_private_conversation_you_should_do_the_same":null,"conversation_is_now_verified":null,"authentication_failed":null,"your_buddy_is_attempting_to_determine_":null,"to_authenticate_to_your_buddy":null,"enter_the_answer_and_click_answer":null,"enter_the_secret":null,"Creating_your_private_key_":null,"Authenticating_a_buddy_helps_":null,"How_do_you_want_to_authenticate_your_buddy":null,"Select_method":null,"Manual":null,"Question":null,"Secret":null,"To_verify_the_fingerprint_":null,"Your_fingerprint":null,"Buddy_fingerprint":null,"Close":null,"Compared":null,"To_authenticate_using_a_question_":null,"Ask":null,"To_authenticate_pick_a_secret_":null,"Compare":null,"Fingerprints":null,"Authentication":null,"Message":null,"Add_buddy":null,"rename_buddy":null,"delete_buddy":null,"Login":null,"Username":null,"Password":null,"Cancel":null,"Connect":null,"Type_in_the_full_username_":null,"Alias":null,"Add":null,"Subscription_request":null,"You_have_a_request_from":null,"Deny":null,"Approve":null,"Remove_buddy":null,"You_are_about_to_remove_":null,"Continue_without_chat":null,"Please_wait":null,"Login_failed":null,"Sorry_we_cant_authentikate_":null,"Retry":null,"clear_history":null,"New_message_from":null,"Should_we_notify_you_":null,"Please_accept_":null,"Hide_offline":null,"Show_offline":null,"About":null,"dnd":null,"Mute":null,"Unmute":null,"Subscription":null,"both":null,"Status":null,"online":null,"chat":null,"away":null,"xa":null,"offline":null,"none":null,"Unknown_instance_tag":null,"Not_one_of_our_latest_keys":null,"Received_an_unreadable_encrypted_message":null,"Online":null,"Chatty":null,"Away":null,"Extended_away":null,"Offline":null,"Friendship_request":null,"Confirm":null,"Dismiss":null,"Remove":null,"Online_help":null,"FN":null,"N":null,"FAMILY":null,"GIVEN":null,"NICKNAME":null,"URL":null,"ADR":null,"STREET":null,"EXTADD":null,"LOCALITY":null,"REGION":null,"PCODE":null,"CTRY":null,"TEL":null,"NUMBER":null,"EMAIL":null,"USERID":null,"ORG":null,"ORGNAME":null,"ORGUNIT":null,"TITLE":null,"ROLE":null,"BDAY":null,"DESC":null,"PHOTO":null,"send_message":null,"get_info":null,"Settings":null,"Priority":null,"Save":null,"User_settings":null,"A_fingerprint_":null,"Your_roster_is_empty_add_a":null,"new_buddy":null,"is":null,"Login_options":null,"BOSH_url":null,"Domain":null,"Resource":null,"On_login":null,"Received_an_unencrypted_message":null,"Sorry_your_buddy_doesnt_provide_any_information":null,"Info_about":null,"Authentication_aborted":null,"Authentication_request_received":null,"Do_you_want_to_display_them":null,"Log_in_without_chat":null,"has_come_online":null,"Unknown_sender":null,"You_received_a_message_from_an_unknown_sender":null,"Please_allow_access_to_microphone_and_camera":null,"Incoming_call":null,"from":null,"Do_you_want_to_accept_the_call_from":null,"Reject":null,"Accept":null,"hang_up":null,"snapshot":null,"mute_my_audio":null,"pause_my_video":null,"fullscreen":null,"Info":null,"Local_IP":null,"Remote_IP":null,"Local_Fingerprint":null,"Remote_Fingerprint":null,"Video_call_not_possible":null,"Start_video_call":null,"Join_chat":null,"Join":null,"Room":null,"Nickname":null,"left_the_building":null,"entered_the_room":null,"is_now_known_as":null,"This_room_is":null,"muc_hidden":{"keyword":null,"description":null},"muc_membersonly":{"keyword":null,"description":null},"muc_moderated":{"keyword":null,"description":null},"muc_nonanonymous":{"keyword":null,"description":null},"muc_open":{"keyword":null,"description":null},"muc_passwordprotected":{"keyword":null,"description":null},"muc_persistent":{"keyword":null,"description":null},"muc_public":{"keyword":null,"description":null},"muc_semianonymous":{"keyword":null,"description":null},"muc_temporary":{"keyword":null,"description":null},"muc_unmoderated":{"keyword":null,"description":null},"muc_unsecured":{"keyword":null,"description":null},"Continue":null,"Server":null,"Rooms_are_loaded":null,"Could_load_only":null,"muc_explanation":null,"You_already_joined_this_room":null,"This_room_will_be_closed":null,"Room_not_found_":null,"Loading_room_information":null,"Destroy":null,"Leave":null,"changed_subject_to":null,"muc_removed_kicked":null,"muc_removed_info_kicked":null,"muc_removed_banned":null,"muc_removed_info_banned":null,"muc_removed_affiliation":null,"muc_removed_info_affiliation":null,"muc_removed_membersonly":null,"muc_removed_info_membersonly":null,"muc_removed_shutdown":null,"Reason":null,"message_not_send":null,"message_not_send_item-not-found":null,"message_not_send_forbidden":null,"message_not_send_not-acceptable":null,"This_room_has_been_closed":null,"Room_logging_is_enabled":null,"A_password_is_required":null,"You_are_not_on_the_member_list":null,"You_are_banned_from_this_room":null,"Your_desired_nickname_":null,"The_maximum_number_":null,"This_room_is_locked_":null,"You_are_not_allowed_to_create_":null,"Carbon_copy":null,"Enable":null}},"en":{"translation":{"Logging_in":"Logging in…","your_connection_is_unencrypted":"Your connection is unencrypted.","your_connection_is_encrypted":"Your connection is encrypted.","your_buddy_closed_the_private_connection":"Your contact closed the private connection.","start_private":"Start private","close_private":"Close private","your_buddy_is_verificated":"Your contact is verified.","you_have_only_a_subscription_in_one_way":"You only have a one-way subscription.","authentication_query_sent":"Authentication query sent.","your_message_wasnt_send_please_end_your_private_conversation":"Your message was not sent. Please end your private conversation.","unencrypted_message_received":"Unencrypted message received","your_message_wasnt_send_because_you_have_no_valid_subscription":"Your message was not sent because you have no valid subscription.","not_available":"Not available","no_connection":"No connection!","relogin":"relogin","trying_to_start_private_conversation":"Trying to start private conversation!","Verified":"Verified","Unverified":"Unverified","private_conversation_started":"Private conversation started.","private_conversation_aborted":"Private conversation aborted!","your_buddy_closed_the_private_conversation_you_should_do_the_same":"Your contact closed the private conversation! You should do the same.","conversation_is_now_verified":"Conversation is now verified.","authentication_failed":"Authentication failed.","your_buddy_is_attempting_to_determine_":"You contact is attempting to determine if they are really talking to you.","to_authenticate_to_your_buddy":"To authenticate to your contact, ","enter_the_answer_and_click_answer":"enter the answer and click Answer.","enter_the_secret":"enter the secret.","Creating_your_private_key_":"Creating your private key; this may take a while.","Authenticating_a_buddy_helps_":"Authenticating a contact helps ensure that the person you are talking to is really the one they claim to be.","How_do_you_want_to_authenticate_your_buddy":"How do you want to authenticate {{bid_name}} (<b>{{bid_jid}}</b>)?","Select_method":"Select method...","Manual":"Manual","Question":"Question","Secret":"Secret","To_verify_the_fingerprint_":"To verify the fingerprint, contact your contact via some other trustworthy channel, such as the telephone.","Your_fingerprint":"Your fingerprint","Buddy_fingerprint":"Contact fingerprint","Close":"Close","Compared":"Compared","To_authenticate_using_a_question_":"To authenticate using a question, pick a question whose answer is known only you and your contact.","Ask":"Ask","To_authenticate_pick_a_secret_":"To authenticate, pick a secret known only to you and your contact.","Compare":"Compare","Fingerprints":"Fingerprints","Authentication":"Authentication","Message":"Message","Add_buddy":"Add contact","rename_buddy":"rename contact","delete_buddy":"delete contact","Login":"Login","Username":"Username","Password":"Password","Cancel":"Cancel","Connect":"Connect","Type_in_the_full_username_":"Type in the full username and an optional alias.","Alias":"Alias","Add":"Add","Subscription_request":"Subscription request","You_have_a_request_from":"You have a request from","Deny":"Deny","Approve":"Approve","Remove_buddy":"Remove contact","You_are_about_to_remove_":"You are about to remove {{bid_name}} (<b>{{bid_jid}}</b>) from your contact list. All related chats will be closed.","Continue_without_chat":"Continue without chat","Please_wait":"Please wait","Login_failed":"Chat login failed","Sorry_we_cant_authentikate_":"Authentication failed with the chat server. Maybe the password is wrong?","Retry":"Back","clear_history":"Clear history","New_message_from":"New message from","Should_we_notify_you_":"Should we notify you about new messages in the future?","Please_accept_":"Please click the \"Allow\" button at the top.","Hide_offline":"Hide offline contacts","Show_offline":"Show offline contacts","About":"About","dnd":"Do Not Disturb","Mute":"Mute","Unmute":"Unmute","Subscription":"Subscription","both":"both","Status":"Status","online":"online","chat":"chat","away":"away","xa":"extended away","offline":"offline","none":"none","Unknown_instance_tag":"Unknown instance tag.","Not_one_of_our_latest_keys":"Not one of our latest keys.","Received_an_unreadable_encrypted_message":"Received an unreadable encrypted message.","Online":"Online","Chatty":"Chatty","Away":"Away","Extended_away":"Extended away","Offline":"Offline","Friendship_request":"Contact request","Confirm":"Confirm","Dismiss":"Dismiss","Remove":"Remove","Online_help":"Online help","FN":"Full name","N":" ","FAMILY":"Family name","GIVEN":"Given name","NICKNAME":"Nickname","URL":"URL","ADR":"Address","STREET":"Street Address","EXTADD":"Extended Address","LOCALITY":"Locality","REGION":"Region","PCODE":"Postal Code","CTRY":"Country","TEL":"Telephone","NUMBER":"Number","EMAIL":"Email","USERID":" ","ORG":"Organization","ORGNAME":"Name","ORGUNIT":"Unit","TITLE":"Job title","ROLE":"Role","BDAY":"Birthday","DESC":"Description","PHOTO":" ","send_message":"Send message","get_info":"Show information","Settings":"Settings","Priority":"Priority","Save":"Save","User_settings":"User settings","A_fingerprint_":"A fingerprint is used to make sure that the person you are talking to is who he or she is saying.","Your_roster_is_empty_add_a":"Your roster is empty, add a ","new_buddy":"new contact","is":"is","Login_options":"Login options","BOSH_url":"BOSH URL","Domain":"Domain","Resource":"Resource","On_login":"On login","Received_an_unencrypted_message":"Received an unencrypted message","Sorry_your_buddy_doesnt_provide_any_information":"Sorry, your contact does not provide any information.","Info_about":"Info about","Authentication_aborted":"Authentication aborted.","Authentication_request_received":"Authentication request received.","Do_you_want_to_display_them":"Do you want to display them?","Log_in_without_chat":"Log in without chat","has_come_online":"has come online","Unknown_sender":"Unknown sender","You_received_a_message_from_an_unknown_sender":"You received a message from an unknown sender","Please_allow_access_to_microphone_and_camera":"Please click the \"Allow\" button at the top, to allow access to microphone and camera.","Incoming_call":"Incoming call","from":"from","Do_you_want_to_accept_the_call_from":"Do you want to accept the call from","Reject":"Reject","Accept":"Accept","hang_up":"hang up","snapshot":"snapshot","mute_my_audio":"mute my audio","pause_my_video":"pause my video","fullscreen":"fullscreen","Info":"Info","Local_IP":"Local IP","Remote_IP":"Remote IP","Local_Fingerprint":"Local fingerprint","Remote_Fingerprint":"Remote fingerprint","Video_call_not_possible":"Video call not possible. Your contact does not support video calls.","Start_video_call":"Start video call","Join_chat":"Join chat","Join":"Join","Room":"Room","Nickname":"Nickname","left_the_building":"__nickname__ left the building","entered_the_room":"__nickname__ entered the room","is_now_known_as":"__oldNickname__ is now known as __newNickname__","This_room_is":"This room is","muc_hidden":{"keyword":"hidden","description":"can not be found through search"},"muc_membersonly":{"keyword":"members-only","description":"you need to be on the member list"},"muc_moderated":{"keyword":"moderated","description":"only persons with \"voice\" are allowed to send messages"},"muc_nonanonymous":{"keyword":"non-anonymous","description":"your jabber id is exposed to all other occupants"},"muc_open":{"keyword":"open","description":"everyone is allowed to join"},"muc_passwordprotected":{"keyword":"password-protected","description":"you need to provide the correct password"},"muc_persistent":{"keyword":"persistent","description":"will not be destroyed if the last occupant left"},"muc_public":{"keyword":"public","description":"can be found through search"},"muc_semianonymous":{"keyword":"semi-anonymous","description":"your jabber id is only exposed to room admins"},"muc_temporary":{"keyword":"temporary","description":"will be destroyed if the last occupant left"},"muc_unmoderated":{"keyword":"unmoderated","description":"everyone is allowed to send messages"},"muc_unsecured":{"keyword":"unsecured","description":"you need no password to enter"},"Continue":"Continue","Server":"Server","Rooms_are_loaded":"Rooms are loaded","Could_load_only":"Could load only __count__ rooms for autocomplete","muc_explanation":"Please enter room name and optional a nickname and password to join a chat","You_already_joined_this_room":"You already joined this room","This_room_will_be_closed":"This room will be closed","Room_not_found_":"A new room will be created","Loading_room_information":"Loading room information","Destroy":"Destroy","Leave":"Leave","changed_subject_to":"__nickname__ changed the room subject to \"__subject__\"","muc_removed_kicked":"You have been kicked from the room","muc_removed_info_kicked":"__nickname__ has been kicked from the room","muc_removed_banned":"You have been banned from the room","muc_removed_info_banned":"__nickname__ has been banned from the room","muc_removed_affiliation":"You have been removed from the room, because of an affiliation change","muc_removed_info_affiliation":"__nickname__ has been removed from the room, because of an affiliation change","muc_removed_membersonly":"You have been removed from the room, because the room has been changed to members-only and you are no member","muc_removed_info_membersonly":"__nickname__ has been removed from the room, because the room has been changed to members-only and you are no member","muc_removed_shutdown":"You have been removed from the room, because the MUC service is being shut down","Reason":"Reason","message_not_send":"Your message was not send because of an error","message_not_send_item-not-found":"Your message was not send because this room does not exist","message_not_send_forbidden":"Your message was not send because you have no voice in this room","message_not_send_not-acceptable":"Your message was not send because you are no occupant of this room","This_room_has_been_closed":"This room has been closed","Room_logging_is_enabled":"Room logging is enabled","A_password_is_required":"A password is required","You_are_not_on_the_member_list":"You are not on the member list","You_are_banned_from_this_room":"You are banned from this room","Your_desired_nickname_":"Your desired nickname is already in use. Please choose another","The_maximum_number_":"The maximum number of user is reached in this room","This_room_is_locked_":"This room is locked","You_are_not_allowed_to_create_":"You are not allowed to create a room","Carbon_copy":"Carbon copy","Enable":"Enable"}},"es":{"translation":{"Logging_in":"Por favor, espere...","your_connection_is_unencrypted":"Su conexión no está cifrada.","your_connection_is_encrypted":"Su conexión está cifrada.","your_buddy_closed_the_private_connection":"Su amigo ha cerrado la conexión privada.","start_private":"Iniciar privado","close_private":"Cerrar privado","your_buddy_is_verificated":"Tu amigo está verificado.","you_have_only_a_subscription_in_one_way":"Sólo tienes una suscripción de un modo.","authentication_query_sent":"Consulta de verificación enviada.","your_message_wasnt_send_please_end_your_private_conversation":"Su mensaje no fue enviado. Por favor, termine su conversación privada.","unencrypted_message_received":"Mensaje no cifrado recibido:","your_message_wasnt_send_because_you_have_no_valid_subscription":"Su mensaje no se ha enviado, porque usted no tiene suscripción válida.","not_available":"No disponible","no_connection":"Sin conexión!","relogin":"iniciar sesión nuevamente","trying_to_start_private_conversation":"Intentando iniciar una conversación privada!","Verified":"Verificado","Unverified":"No verificado","private_conversation_started":"se inició una conversación privada.","private_conversation_aborted":"Conversación privada abortada!","your_buddy_closed_the_private_conversation_you_should_do_the_same":"Su amigo cerró la conversación privada! Usted debería hacer lo mismo.","conversation_is_now_verified":"La conversación es ahora verificada.","authentication_failed":"Fallo la verificación.","your_buddy_is_attempting_to_determine_":"Tu amigo está tratando de determinar si él o ella está realmente hablando con usted.","to_authenticate_to_your_buddy":"Para autenticar a su amigo, ","enter_the_answer_and_click_answer":"introduce la respuesta y haga clic en Contestar.","enter_the_secret":"especifique el secreto.","Creating_your_private_key_":"Ahora vamos a crear su clave privada. Esto puede tomar algún tiempo.","Authenticating_a_buddy_helps_":"Autenticación de un amigo ayuda a garantizar que la persona que está hablando es quien él o ella está diciendo.","How_do_you_want_to_authenticate_your_buddy":"¿Cómo desea autenticar {{bid_name}} (<b>{{bid_jid}}</b>)?","Select_method":"Escoja un método...","Manual":"Manual","Question":"Pregunta","Secret":"Secreto","To_verify_the_fingerprint_":"Para verificar la firma digital, póngase en contacto con su amigo a través de algún otro canal autenticado, como el teléfono.","Your_fingerprint":"Tu firma digital","Buddy_fingerprint":"firma digital de tu amigo","Close":"Cerrar","Compared":"Comparado","To_authenticate_using_a_question_":"Para autenticar mediante una pregunta, elegir una pregunta cuya respuesta se conoce sólo usted y su amigo.","Ask":"Preguntar","To_authenticate_pick_a_secret_":"Para autenticar, elija un secreto conocido sólo por usted y su amigo.","Compare":"Comparar","Fingerprints":"Firmas digitales","Authentication":"Autenticación","Message":"Mensaje","Add_buddy":"Añadir amigo","rename_buddy":"renombrar amigo","delete_buddy":"eliminar amigo","Login":"Iniciar Sesión","Username":"Usuario","Password":"Contraseña","Cancel":"Cancelar","Connect":"Conectar","Type_in_the_full_username_":"Escriba el usuario completo y un alias opcional.","Alias":"Alias","Add":"Añadir","Subscription_request":"Solicitud de suscripción","You_have_a_request_from":"Tienes una petición de","Deny":"Rechazar","Approve":"Aprobar","Remove_buddy":"Eliminar amigo","You_are_about_to_remove_":"Vas a eliminar a {{bid_name}} (<b>{{bid_jid}}</b>) de tu lista de amigos. Todas las conversaciones relacionadas serán cerradas.","Continue_without_chat":"Continuar","Please_wait":"Espere por favor","Login_failed":"Fallo el inicio de sesión","Sorry_we_cant_authentikate_":"Lo sentimos, no podemos autentificarlo en nuestro servidor de chat. ¿Tal vez la contraseña es incorrecta?","Retry":"Reintentar","clear_history":"Borrar el historial","New_message_from":"Nuevo mensaje de","Should_we_notify_you_":"¿Debemos notificarle sobre nuevos mensajes en el futuro?","Please_accept_":"Por favor, haga clic en el botón \"Permitir\" en la parte superior.","Hide_offline":"Ocultar contactos desconectados","Show_offline":"Mostrar contactos desconectados","About":"Acerca de","dnd":"No Molestar","Mute":"Desactivar sonido","Unmute":"Activar sonido","Subscription":"Suscripción","both":"ambos","Status":"Estado","online":"en línea","chat":"chat","away":"ausente","xa":"mas ausente","offline":"desconectado","none":"nadie","Unknown_instance_tag":"Etiqueta de instancia desconocida.","Not_one_of_our_latest_keys":"No de nuestra ultima tecla.","Received_an_unreadable_encrypted_message":"Se recibió un mensaje cifrado ilegible.","Online":"En linea","Chatty":"Hablador","Away":"Ausente","Extended_away":"Mas ausente","Offline":"Desconectado","Friendship_request":"Solicitud de amistad","Confirm":"Confirmar","Dismiss":"Rechazar","Remove":"Eliminar","Online_help":"Ayuda en línea","FN":"Nombre completo ","N":" ","FAMILY":"Apellido","GIVEN":"Nombre","NICKNAME":"Apodar","URL":"URL","ADR":"Dirección","STREET":"Calle","EXTADD":"Extendido dirección","LOCALITY":"Población","REGION":"Región","PCODE":"Código postal","CTRY":"País","TEL":"Teléfono","NUMBER":"Número","EMAIL":"Emilio","USERID":" ","ORG":"Organización","ORGNAME":"Nombre","ORGUNIT":"Departamento","TITLE":"Título","ROLE":"Rol","BDAY":"Cumpleaños","DESC":"Descripción","PHOTO":" ","send_message":"mandar un texto","get_info":"obtener información","Settings":"Ajustes","Priority":"Prioridad","Save":"Guardar","User_settings":"Configuración de usuario","A_fingerprint_":"La huella digital se utiliza para que puedas estar seguro que la persona con la que estas hablando es quien realmente dice ser","Your_roster_is_empty_add_a":"Tu lista de amigos esta vacia","new_buddy":"Nuevo amigo","is":"es","Login_options":"Opciones de login","BOSH_url":"BOSH url","Domain":"Dominio","Resource":"Recurso","On_login":"Iniciar sesión","Received_an_unencrypted_message":"Recibe un mensaje no cifrado","Sorry_your_buddy_doesnt_provide_any_information":"Lo sentimos, su amigo no provee ninguna información.","Info_about":"Info acerca de","Authentication_aborted":"Autenticación abortada","Authentication_request_received":"Pedido de autenticación recibido.","Do_you_want_to_display_them":"¿Quiere mostrarlos?","Log_in_without_chat":"Ingresar sin chat","has_come_online":"se ha conectado","Unknown_sender":"Remitente desconocido","You_received_a_message_from_an_unknown_sender":"Ha recibido un mensaje de un remitente desconocido","Please_allow_access_to_microphone_and_camera":"Por favor, permitir el acceso al micrófono y la cámara.","Incoming_call":"Llamada entrante","from":"de","Do_you_want_to_accept_the_call_from":"Desea aceptar la llamada de","Reject":"Rechazar","Accept":"Aceptar","hang_up":"colgar","snapshot":"instantánea","mute_my_audio":"silenciar mi audio","pause_my_video":"pausar mi vídeo","fullscreen":"pantalla completa","Info":"Info","Local_IP":"IP local","Remote_IP":"IP remota","Local_Fingerprint":"Firma digital local","Remote_Fingerprint":"Firma digital remota","Video_call_not_possible":"Llamada de vídeo no es posible","Start_video_call":"Iniciar llamada de vídeo","Join_chat":null,"Join":null,"Room":null,"Nickname":null,"left_the_building":null,"entered_the_room":null,"is_now_known_as":null,"This_room_is":null,"muc_hidden":{"keyword":null,"description":null},"muc_membersonly":{"keyword":null,"description":null},"muc_moderated":{"keyword":null,"description":null},"muc_nonanonymous":{"keyword":null,"description":null},"muc_open":{"keyword":null,"description":null},"muc_passwordprotected":{"keyword":null,"description":null},"muc_persistent":{"keyword":null,"description":null},"muc_public":{"keyword":null,"description":null},"muc_semianonymous":{"keyword":null,"description":null},"muc_temporary":{"keyword":null,"description":null},"muc_unmoderated":{"keyword":null,"description":null},"muc_unsecured":{"keyword":null,"description":null},"Continue":null,"Server":null,"Rooms_are_loaded":null,"Could_load_only":null,"muc_explanation":null,"You_already_joined_this_room":null,"This_room_will_be_closed":null,"Room_not_found_":null,"Loading_room_information":null,"Destroy":null,"Leave":null,"changed_subject_to":null,"muc_removed_kicked":null,"muc_removed_info_kicked":null,"muc_removed_banned":null,"muc_removed_info_banned":null,"muc_removed_affiliation":null,"muc_removed_info_affiliation":null,"muc_removed_membersonly":null,"muc_removed_info_membersonly":null,"muc_removed_shutdown":null,"Reason":null,"message_not_send":null,"message_not_send_item-not-found":null,"message_not_send_forbidden":null,"message_not_send_not-acceptable":null,"This_room_has_been_closed":null,"Room_logging_is_enabled":null,"A_password_is_required":null,"You_are_not_on_the_member_list":null,"You_are_banned_from_this_room":null,"Your_desired_nickname_":null,"The_maximum_number_":null,"This_room_is_locked_":null,"You_are_not_allowed_to_create_":null,"Carbon_copy":null,"Enable":"Activar"}},"fr":{"translation":{"Logging_in":"Connexion...","your_connection_is_unencrypted":"Connexion non chiffrée.","your_connection_is_encrypted":"Connexion chiffrée.","your_buddy_closed_the_private_connection":"Votre ami a fermé la connexion privée.","start_private":"Démarrer une conversation privé","close_private":"Clôturer une conversation privée","your_buddy_is_verificated":"Votre contact est vérifié.","you_have_only_a_subscription_in_one_way":"Vous ne pouvez souscrire qu'une fois.","authentication_query_sent":"Requête d’authentification envoyée.","your_message_wasnt_send_please_end_your_private_conversation":"Votre message n'a pas été envoyé. Veuillez terminer votre conversation privée.","unencrypted_message_received":"Message non chiffré reçu","your_message_wasnt_send_because_you_have_no_valid_subscription":"Votre message n'a pas été envoyé car votre abonnement n'est pas valide.","not_available":"Pas disponible","no_connection":"Pas de connexion !","relogin":"Re-connexion","trying_to_start_private_conversation":"Essai de démarrage d'une conversation privée !","Verified":"Vérifié","Unverified":"Non vérifié","private_conversation_started":"Conversation privé démarrée.","private_conversation_aborted":"Conversation privée interrompue !","your_buddy_closed_the_private_conversation_you_should_do_the_same":"Votre ami a fermé la conversation privée ! Vous devriez faire de même.","conversation_is_now_verified":"La conversation est maintenant vérifiée.","authentication_failed":"L'authentification a échoué.","your_buddy_is_attempting_to_determine_":"Votre ami tente de déterminer si il ou elle parle vraiment à vous.","to_authenticate_to_your_buddy":"Vous authentifier à votre ami, ","enter_the_answer_and_click_answer":"Saisissez une réponse et cliquer sur Répondre.","enter_the_secret":"Entrez le mot secret","Creating_your_private_key_":"Création de votre clé privée; cela peut prendre un moment.","Authenticating_a_buddy_helps_":"L'authentification d'un ami permet de s'assurer que la personne à qui vous parlez est vraiment celui qu'il ou elle prétend être.","How_do_you_want_to_authenticate_your_buddy":"Comment voulez-vous vous authentifier {{bid_name}} (<b>{{bid_jid}}</b>)?","Select_method":"Sélection de la méthode...","Manual":"Manuel","Question":"Question","Secret":"Sécurité","To_verify_the_fingerprint_":"Pour vérifier l'empreinte, contactez votre ami via un autre canal digne de confiance, tel que le téléphone.","Your_fingerprint":"Votre empreinte","Buddy_fingerprint":"Empreinte de l'ami","Close":"Fermer","Compared":"Comparé","To_authenticate_using_a_question_":"Pour s'authentifier à l'aide d'une question, choisissez une question dont la réponse n'est connue que vous et de votre ami.","Ask":"Demander","To_authenticate_pick_a_secret_":"Pour vous authentifier, choisissez un secret connu seulement de vous et de votre ami.","Compare":"Comparer","Fingerprints":"Empreintes","Authentication":"Authentification","Message":"Message","Add_buddy":"Ajouter comme ami","rename_buddy":"Renommer l'ami","delete_buddy":"Supprimer l'ami","Login":"Connexion","Username":"Nom d'utilisateur","Password":"Mot de passe","Cancel":"Annuler","Connect":"Connecter","Type_in_the_full_username_":"Tapez un nom d'utilisateur complet et un alias(optionnel).","Alias":"Alias","Add":"Ajouter","Subscription_request":"Demande d'abonnement","You_have_a_request_from":"Vous avez une requête de ","Deny":"Refuser","Approve":"Approuver","Remove_buddy":"Supprimer l'ami","You_are_about_to_remove_":"Vous allez retirer {{bid_name}} (<b>{{bid_jid}}</b>) de votre liste d'amis. Toutes les fenêtres de chat en lien avec celui-ci seront fermées.","Continue_without_chat":"Continuer sans tchat","Please_wait":"Merci de patienter","Login_failed":"Authentification échouée","Sorry_we_cant_authentikate_":"La connexion avec le serveur de tchat a échoué. Vérifiez le mot de passe.","Retry":"Retour","clear_history":"Effacer l’historique","New_message_from":"Nouveau message de","Should_we_notify_you_":"Dans le futur, devrons-nous vous notifier les nouveaux messages ?","Please_accept_":"Merci de cliquer sur le bouton \"autoriser\" en haut de page","Hide_offline":"Masquer les contacts non connectés","Show_offline":"Afficher les contacts non connectés","About":"À propos","dnd":"Ne pas déranger","Mute":"Muet","Unmute":"Son actif","Subscription":"Abonnement","both":"Les deux","Status":"Status","online":"En ligne","chat":"tchat","away":"Absent","xa":"Options étendues","offline":"Hors ligne","none":"Aucun","Unknown_instance_tag":"Tag inconnu","Not_one_of_our_latest_keys":"Ce n'est pas l'une des dernières touches","Received_an_unreadable_encrypted_message":"Message chiffré non lisible","Online":"En ligne","Chatty":"tchatty","Away":"Absent","Extended_away":"Options étendues","Offline":"Hors ligne","Friendship_request":"Demande d'amitié","Confirm":"Valider","Dismiss":"Rejeter","Remove":"Supprimer","Online_help":"Aide en ligne","FN":"Nom","N":" N ","FAMILY":"Nom de famille","GIVEN":"prénom","NICKNAME":"Surnom","URL":"URL","ADR":"Adresse","STREET":"Rue","EXTADD":"Adresse (suite)","LOCALITY":"Localité","REGION":"Région","PCODE":"Code Postal","CTRY":"Pays","TEL":"Téléphone","NUMBER":"Numéro","EMAIL":"Courriel","USERID":" USERID ","ORG":"Organisation","ORGNAME":"Nom","ORGUNIT":"Unité","TITLE":"Qualité:","ROLE":"Rôle","BDAY":"Date de naissance","DESC":"Description","PHOTO":"Photo","send_message":"Envoyer le message","get_info":"Montrer les informations","Settings":"Réglages","Priority":"Priorité","Save":"Enregistrer","User_settings":"Paramètres utilisateur","A_fingerprint_":"Une empreinte est utilisée pour s'assurer de l'identité de la personne à qui vous parlez","Your_roster_is_empty_add_a":"Votre liste est vide, ajouter ","new_buddy":"Nouvel ami","is":"est","Login_options":"Options d'identification","BOSH_url":"URL BOSH","Domain":"Domaine","Resource":"Ressource","On_login":"Après authentification","Received_an_unencrypted_message":"Reçu un message non chiffré","Sorry_your_buddy_doesnt_provide_any_information":"Désolé, votre ami n'a pas fourni d'informations","Info_about":"A propos de","Authentication_aborted":"Authentification interrompue.","Authentication_request_received":"Requête d'authentification reçue.","Do_you_want_to_display_them":"Voulez-vous les afficher ?","Log_in_without_chat":"S'identifier sans tchat","has_come_online":"vient d'arriver","Unknown_sender":"Expéditeur inconnu","You_received_a_message_from_an_unknown_sender":"Vous avez reçu un message d'un expéditeur inconnu","Please_allow_access_to_microphone_and_camera":"Veuillez cliquez sur le bouton \"Autoriser\" en haut, pour permettre l'accès au micro et à la caméra.","Incoming_call":"Appel entrant","from":"de","Do_you_want_to_accept_the_call_from":"Voulez-vous accepter l'appel de","Reject":"Rejeté","Accept":"Accepté","hang_up":"Décrochez","snapshot":"Capture d’écran","mute_my_audio":"Couper l'audio","pause_my_video":"Mettre ma vidéo en pause","fullscreen":"Plein écran","Info":"Info","Local_IP":"IP locale","Remote_IP":"IP distante","Local_Fingerprint":"Empreinte locale","Remote_Fingerprint":"Empreinte distante","Video_call_not_possible":"L'appel vidéo n'est possible. Votre ami ne supporte pas les appels vidéo.","Start_video_call":"Démarrer l'appel vidéo","Join_chat":"Joindre la discution","Join":"Joindre","Room":"Salon","Nickname":"Surnom","left_the_building":"__nickname__ a quitté l'immeuble","entered_the_room":"__nickname__ entre dans le salon","is_now_known_as":null,"This_room_is":"Ce salon est","muc_hidden":{"keyword":"caché","description":null},"muc_membersonly":{"keyword":"pour les membres seulement","description":"Vous devez être sur la liste des membres"},"muc_moderated":{"keyword":"modéré","description":"Seulement les personnes avec la \"voix\" sont autorisés à envoyer des messages"},"muc_nonanonymous":{"keyword":"non anonyme","description":"Votre identifiant Jabber est visible de tous les autres occupants"},"muc_open":{"keyword":"ouvert","description":"Tout le monde est autorisé à se connecter"},"muc_passwordprotected":{"keyword":"protégé par un mot de passe","description":"Vous devez fournir un mot de passe correct"},"muc_persistent":{"keyword":"persistent","description":null},"muc_public":{"keyword":"public","description":null},"muc_semianonymous":{"keyword":"semi-anonyme","description":"Votre identifiant Jabber est seulement visible aux administrateurs de ce salon"},"muc_temporary":{"keyword":"temporaire","description":"sera détruit au départ de son dernier occupant"},"muc_unmoderated":{"keyword":"non modéré","description":"Tout le monde est autorisé à envoyer des messages"},"muc_unsecured":{"keyword":"non sécurisé","description":"un mot de passe n'est pas nécessaire pour entrer"},"Continue":"Continuer","Server":"Serveur","Rooms_are_loaded":"Les salons sont chargés","Could_load_only":null,"muc_explanation":"Veuillez saisir le nom du salon, un surnom (optionnel) et un mot de passe pour joindre la conversation","You_already_joined_this_room":"Vous avez déjà rejoins ce salon","This_room_will_be_closed":"Ce salon va être fermé","Room_not_found_":"Un nouveau salon va être créé","Loading_room_information":"Chargement des informations du salon","Destroy":"Détruire","Leave":"Quitter","changed_subject_to":"__nickname__ a changé le sujet du salon à \"__subject__\"","muc_removed_kicked":"Vous avez été éjecté de ce salon","muc_removed_info_kicked":"__nickname__ a été éjecté de ce salon","muc_removed_banned":"Vous avez été banni de ce salon","muc_removed_info_banned":"__nickname__ a été banni de ce salon","muc_removed_affiliation":null,"muc_removed_info_affiliation":null,"muc_removed_membersonly":null,"muc_removed_info_membersonly":null,"muc_removed_shutdown":null,"Reason":"Raison","message_not_send":null,"message_not_send_item-not-found":null,"message_not_send_forbidden":null,"message_not_send_not-acceptable":"Votre message n'a pas été envoyé car il n'y a personne dans ce salon","This_room_has_been_closed":"Ce salon a été fermé","Room_logging_is_enabled":null,"A_password_is_required":"Un mot de passe est requis","You_are_not_on_the_member_list":"Vous n'êtes pas sur la liste des membres","You_are_banned_from_this_room":"Vous avez été banni de ce salon","Your_desired_nickname_":"Votre Surnom souhaité est déjà utilisé.Veuillez en choisir un autre","The_maximum_number_":"Le nombre maximum d'utilisateur est atteint dans ce salon","This_room_is_locked_":"Ce salon est vérouillé","You_are_not_allowed_to_create_":"Vous n'êtes pas autorisé à créer un salon","Carbon_copy":null,"Enable":null}},"it":{"translation":{"Logging_in":"login…","your_connection_is_unencrypted":"La sua connessione è non cifrata.","your_connection_is_encrypted":"La sua connessione è cifrata.","your_buddy_closed_the_private_connection":"La sua connessione privata è stato chiuso dal suo compagno.","start_private":"Inizia privata","close_private":"Chiude privata","your_buddy_is_verificated":"Il tuo compagno è stato verificato","you_have_only_a_subscription_in_one_way":"Hai solo una one-way inscrizione.","authentication_query_sent":"Domanda d'autenticità inviata.","your_message_wasnt_send_please_end_your_private_conversation":"Il tuo messaggio non è stato inviato. Si prega di finire la sua conversazione privata.","unencrypted_message_received":"Messaggio non cifrato ricevuto","your_message_wasnt_send_because_you_have_no_valid_subscription":"Il tuo messaggio non è stato inviato perché non hai una sottoscrizione valida.","not_available":"non disponibile","no_connection":"nessun collegamento!","relogin":"nuovo login","trying_to_start_private_conversation":"Cercando di avviare una conversazione privata!","Verified":"verificato","Unverified":"non verificato","private_conversation_started":"Conversazione privata iniziato.","private_conversation_aborted":"Conversazione privata abortito!","your_buddy_closed_the_private_conversation_you_should_do_the_same":"Il tuo compagno ha chiuso la conversazione privata! Si dovrebbe fare lo stesso.","conversation_is_now_verified":"Conversazione è ora verificato.","authentication_failed":"autenticazione fallita.","your_buddy_is_attempting_to_determine_":"Il tuo compagno sta cercando di determinare se lui o lei sta davvero parlando con te.","to_authenticate_to_your_buddy":"Per autenticare a il tuo compagno. ","enter_the_answer_and_click_answer":"inserisci la risposta e fare click su risposta.","enter_the_secret":"inserire il segreto.","Creating_your_private_key_":"Creare la propria chiave privata; questo potrebbe richiedere un po'.","Authenticating_a_buddy_helps_":"Autenticazione un compagno aiuta a garantire che la persona si sta parlando è davvero quello che lui o lei sostiene di essere.","How_do_you_want_to_authenticate_your_buddy":"Come si desidera autenticare {{bid_name}} (<b>{{bid_jid}}</b>)?","Select_method":"Seleziona metodo ..","Manual":"manuale","Question":"domanda","Secret":"segreto","To_verify_the_fingerprint_":"Per verificare l'impronta digitale, contattare il proprio compagno attraverso qualche altro canale affidabile, come il telefono.","Your_fingerprint":"il tuo impronta digitale","Buddy_fingerprint":"impronta digitale da compagno","Close":"chiude","Compared":"comparato","To_authenticate_using_a_question_":"Per autenticare tramite una questione, scegli una questione la cui risposta è nota solo voi e il tuo compagno","Ask":"chiedi","To_authenticate_pick_a_secret_":"Per autenticare, scegli un segreto noto solo a te e il tuo compagno.","Compare":"Comparare","Fingerprints":"Impronta digitale","Authentication":"Autenticazione","Message":"Messagio","Add_buddy":"Aggiungi un compagno","rename_buddy":"rinomina compagno","delete_buddy":"elimina compagno","Login":"Login","Username":"Identificazione dell'utente","Password":"Password","Cancel":"Cancella","Connect":"Collega","Type_in_the_full_username_":"Digita l'identificazione utente completo e un alias opzionale.","Alias":"Alias","Add":"Aggiungi","Subscription_request":"Rrichiesta di sottoscrizione","You_have_a_request_from":"Hai una richiesta da","Deny":"Refiuta","Approve":"Approva","Remove_buddy":"Rimuova il compagno","You_are_about_to_remove_":"Stai rimovendo {{bid_name}} (<b>{{bid_jid}}</b>) del suo lista di compagni. Tutte le chat appartenente saranno chiuse.","Continue_without_chat":"Continua senza chat","Please_wait":"Si prega d'attendere","Login_failed":"Chat login è fallito","Sorry_we_cant_authentikate_":"Autenticazione non riuscita con il server di chat. Forse la password è sbagliata?","Retry":"Indietro","clear_history":"Cancella la cronologia","New_message_from":"Nuovo messaggio da","Should_we_notify_you_":"Vuoi ricevere una notifica di nuovi messaggi in futuro?","Please_accept_":"Si prega di fare clic sul bottone \"Autorizzazione\" sopra.","Hide_offline":"Nascondere i contatti non in linea","Show_offline":"Mostra i contatti non in linea","About":"Informazione legale","dnd":"Non disturbare","Mute":"Muto attivo","Unmute":"Muto inattivo","Subscription":"Sottoscrizione","both":"etrambi","Status":"Status","online":"In linea","chat":"chat","away":"via","xa":"via estensivo","offline":"non in linea","none":"nessuno","Unknown_instance_tag":"Instance tag sconosciuta.","Not_one_of_our_latest_keys":"Non è una delle nostre ultime chiavi.","Received_an_unreadable_encrypted_message":"Ricevuto un messaggio crittografato illeggibile.","Online":"In linea","Chatty":"Chiacchierino","Away":"Via","Extended_away":"Via estensivo","Offline":"Non in linea","Friendship_request":"Amicizia richiesto","Confirm":"Conferma","Dismiss":"Rifiuta","Remove":"Rimuovi","Online_help":"Guida in linea","FN":"Nome e cognome","N":null,"FAMILY":"Cognome","GIVEN":"Nome","NICKNAME":"Soprannome","URL":"URL","ADR":"Indirizzo","STREET":"Via","EXTADD":"Esteso Indirizzo","LOCALITY":"Località","REGION":"Regione","PCODE":"Codice Postale","CTRY":"Paese","TEL":"Telefono","NUMBER":"Numero","EMAIL":"E-mail","USERID":null,"ORG":"Organizzazione","ORGNAME":"Nome","ORGUNIT":"Unità","TITLE":"Titolo di lavoro","ROLE":"Funzione","BDAY":"Compleanno","DESC":"Descrizione","PHOTO":null,"send_message":"Messagio inviato","get_info":"Mostra informazioni","Settings":"Impostazione","Priority":"Priorità","Save":"Salva","User_settings":"Impostazione dell'utente","A_fingerprint_":"Una impronta digitale è usato per assicurarsi che la persona con cui stai parlando è lui o lei che sta dicendo.","Your_roster_is_empty_add_a":"Il suo elenco è vuoto, aggiungi un ","new_buddy":"compagno nuovo","is":"è","Login_options":"Opzioni di login","BOSH_url":"BOSH URL","Domain":"Domain","Resource":"Risorsa","On_login":"Login on","Received_an_unencrypted_message":"Ricevuto un messaggio non crittografato","Sorry_your_buddy_doesnt_provide_any_information":"Spiace, il tuo compagno non fornisce alcuna informazione.","Info_about":"Informazioni","Authentication_aborted":"Autenticazione interrotta","Authentication_request_received":"Richiesta di autenticazione ricevuto.","Do_you_want_to_display_them":"Vuoi che venga visualizzato?","Log_in_without_chat":"Log in senza chat","has_come_online":"È venuto in linea","Unknown_sender":"Mittente sconosciuto","You_received_a_message_from_an_unknown_sender":"Hai ricevuto un messaggio da un mittente sconosciuto","Please_allow_access_to_microphone_and_camera":"Si prega di fare clic sul bottone \"Autorizzazione\" sopra per autorizzazione del l'accesso al microfono e fotocamera.","Incoming_call":"Chiamata in arrivo","from":"di","Do_you_want_to_accept_the_call_from":"Vuoi accettare la chiamata di","Reject":"Rifiuta","Accept":"Accetta","hang_up":"Riattacca","snapshot":"istantanea","mute_my_audio":"disattiva il mio audio","pause_my_video":"pausa il mio audio","fullscreen":"schermo intero","Info":"Informazione","Local_IP":"IP locale","Remote_IP":"IP remoto","Local_Fingerprint":"Impronta digitale locale","Remote_Fingerprint":"Impronta digitale remoto","Video_call_not_possible":"Videochiamata non è possibile. Il tuo compagno non può effettuare videochiamate.","Start_video_call":"Inizia videochiamata","Join_chat":null,"Join":null,"Room":null,"Nickname":null,"left_the_building":null,"entered_the_room":null,"is_now_known_as":null,"This_room_is":null,"muc_hidden":{"keyword":null,"description":null},"muc_membersonly":{"keyword":null,"description":null},"muc_moderated":{"keyword":null,"description":null},"muc_nonanonymous":{"keyword":null,"description":null},"muc_open":{"keyword":null,"description":null},"muc_passwordprotected":{"keyword":null,"description":null},"muc_persistent":{"keyword":null,"description":null},"muc_public":{"keyword":null,"description":null},"muc_semianonymous":{"keyword":null,"description":null},"muc_temporary":{"keyword":null,"description":null},"muc_unmoderated":{"keyword":null,"description":null},"muc_unsecured":{"keyword":null,"description":null},"Continue":null,"Server":null,"Rooms_are_loaded":null,"Could_load_only":null,"muc_explanation":null,"You_already_joined_this_room":null,"This_room_will_be_closed":null,"Room_not_found_":null,"Loading_room_information":null,"Destroy":null,"Leave":null,"changed_subject_to":null,"muc_removed_kicked":null,"muc_removed_info_kicked":null,"muc_removed_banned":null,"muc_removed_info_banned":null,"muc_removed_affiliation":null,"muc_removed_info_affiliation":null,"muc_removed_membersonly":null,"muc_removed_info_membersonly":null,"muc_removed_shutdown":null,"Reason":null,"message_not_send":null,"message_not_send_item-not-found":null,"message_not_send_forbidden":null,"message_not_send_not-acceptable":null,"This_room_has_been_closed":null,"Room_logging_is_enabled":null,"A_password_is_required":null,"You_are_not_on_the_member_list":null,"You_are_banned_from_this_room":null,"Your_desired_nickname_":null,"The_maximum_number_":null,"This_room_is_locked_":null,"You_are_not_allowed_to_create_":null,"Carbon_copy":null,"Enable":null}},"nds":{"translation":{"Logging_in":null,"your_connection_is_unencrypted":null,"your_connection_is_encrypted":null,"your_buddy_closed_the_private_connection":null,"start_private":null,"close_private":null,"your_buddy_is_verificated":null,"you_have_only_a_subscription_in_one_way":null,"authentication_query_sent":null,"your_message_wasnt_send_please_end_your_private_conversation":null,"unencrypted_message_received":null,"your_message_wasnt_send_because_you_have_no_valid_subscription":null,"not_available":null,"no_connection":null,"relogin":null,"trying_to_start_private_conversation":null,"Verified":null,"Unverified":null,"private_conversation_started":null,"private_conversation_aborted":null,"your_buddy_closed_the_private_conversation_you_should_do_the_same":null,"conversation_is_now_verified":null,"authentication_failed":null,"your_buddy_is_attempting_to_determine_":null,"to_authenticate_to_your_buddy":null,"enter_the_answer_and_click_answer":null,"enter_the_secret":null,"Creating_your_private_key_":null,"Authenticating_a_buddy_helps_":null,"How_do_you_want_to_authenticate_your_buddy":null,"Select_method":null,"Manual":null,"Question":null,"Secret":null,"To_verify_the_fingerprint_":null,"Your_fingerprint":null,"Buddy_fingerprint":null,"Close":null,"Compared":null,"To_authenticate_using_a_question_":null,"Ask":null,"To_authenticate_pick_a_secret_":null,"Compare":null,"Fingerprints":null,"Authentication":null,"Message":null,"Add_buddy":null,"rename_buddy":null,"delete_buddy":null,"Login":null,"Username":null,"Password":null,"Cancel":null,"Connect":null,"Type_in_the_full_username_":null,"Alias":null,"Add":null,"Subscription_request":null,"You_have_a_request_from":null,"Deny":null,"Approve":null,"Remove_buddy":null,"You_are_about_to_remove_":null,"Continue_without_chat":null,"Please_wait":null,"Login_failed":null,"Sorry_we_cant_authentikate_":null,"Retry":null,"clear_history":null,"New_message_from":null,"Should_we_notify_you_":null,"Please_accept_":null,"Hide_offline":null,"Show_offline":null,"About":null,"dnd":null,"Mute":null,"Unmute":null,"Subscription":null,"both":null,"Status":null,"online":null,"chat":null,"away":null,"xa":null,"offline":null,"none":null,"Unknown_instance_tag":null,"Not_one_of_our_latest_keys":null,"Received_an_unreadable_encrypted_message":null,"Online":null,"Chatty":null,"Away":null,"Extended_away":null,"Offline":null,"Friendship_request":null,"Confirm":null,"Dismiss":null,"Remove":null,"Online_help":null,"FN":null,"N":null,"FAMILY":null,"GIVEN":null,"NICKNAME":null,"URL":null,"ADR":null,"STREET":null,"EXTADD":null,"LOCALITY":null,"REGION":null,"PCODE":null,"CTRY":null,"TEL":null,"NUMBER":null,"EMAIL":null,"USERID":null,"ORG":null,"ORGNAME":null,"ORGUNIT":null,"TITLE":null,"ROLE":null,"BDAY":null,"DESC":null,"PHOTO":null,"send_message":null,"get_info":null,"Settings":null,"Priority":null,"Save":null,"User_settings":null,"A_fingerprint_":null,"Your_roster_is_empty_add_a":null,"new_buddy":null,"is":null,"Login_options":null,"BOSH_url":null,"Domain":null,"Resource":null,"On_login":null,"Received_an_unencrypted_message":null,"Sorry_your_buddy_doesnt_provide_any_information":null,"Info_about":null,"Authentication_aborted":null,"Authentication_request_received":null,"Do_you_want_to_display_them":null,"Log_in_without_chat":null,"has_come_online":null,"Unknown_sender":null,"You_received_a_message_from_an_unknown_sender":null,"Please_allow_access_to_microphone_and_camera":null,"Incoming_call":null,"from":null,"Do_you_want_to_accept_the_call_from":null,"Reject":null,"Accept":null,"hang_up":null,"snapshot":null,"mute_my_audio":null,"pause_my_video":null,"fullscreen":null,"Info":null,"Local_IP":null,"Remote_IP":null,"Local_Fingerprint":null,"Remote_Fingerprint":null,"Video_call_not_possible":null,"Start_video_call":null,"Join_chat":null,"Join":null,"Room":null,"Nickname":null,"left_the_building":null,"entered_the_room":null,"is_now_known_as":null,"This_room_is":null,"muc_hidden":{"keyword":null,"description":null},"muc_membersonly":{"keyword":null,"description":null},"muc_moderated":{"keyword":null,"description":null},"muc_nonanonymous":{"keyword":null,"description":null},"muc_open":{"keyword":null,"description":null},"muc_passwordprotected":{"keyword":null,"description":null},"muc_persistent":{"keyword":null,"description":null},"muc_public":{"keyword":null,"description":null},"muc_semianonymous":{"keyword":null,"description":null},"muc_temporary":{"keyword":null,"description":null},"muc_unmoderated":{"keyword":null,"description":null},"muc_unsecured":{"keyword":null,"description":null},"Continue":null,"Server":null,"Rooms_are_loaded":null,"Could_load_only":null,"muc_explanation":null,"You_already_joined_this_room":null,"This_room_will_be_closed":null,"Room_not_found_":null,"Loading_room_information":null,"Destroy":null,"Leave":null,"changed_subject_to":null,"muc_removed_kicked":null,"muc_removed_info_kicked":null,"muc_removed_banned":null,"muc_removed_info_banned":null,"muc_removed_affiliation":null,"muc_removed_info_affiliation":null,"muc_removed_membersonly":null,"muc_removed_info_membersonly":null,"muc_removed_shutdown":null,"Reason":null,"message_not_send":null,"message_not_send_item-not-found":null,"message_not_send_forbidden":null,"message_not_send_not-acceptable":null,"This_room_has_been_closed":null,"Room_logging_is_enabled":null,"A_password_is_required":null,"You_are_not_on_the_member_list":null,"You_are_banned_from_this_room":null,"Your_desired_nickname_":null,"The_maximum_number_":null,"This_room_is_locked_":null,"You_are_not_allowed_to_create_":null,"Carbon_copy":null,"Enable":null}},"pl":{"translation":{"Logging_in":"Logowanie...","your_connection_is_unencrypted":"Twoje połączenie nie jest szyfrowane.","your_connection_is_encrypted":"Twoje połączenie jest szyfrowane.","your_buddy_closed_the_private_connection":"Twój rozmówca zamknął połączenie.","start_private":"Rozpocznij rozmowę.","close_private":"Zakończ rozmowę.","your_buddy_is_verificated":"Twój rozmówca został zweryfikowany.","you_have_only_a_subscription_in_one_way":"Masz jednostronną subskrypcję.","authentication_query_sent":"Wysłano proźbę o autentykację.","your_message_wasnt_send_please_end_your_private_conversation":"Twoja wiadomość nie została wysłana. Proszę, zamknij rozmowę.","unencrypted_message_received":"Zwrotna niezaszyfrowana wiadomość.","your_message_wasnt_send_because_you_have_no_valid_subscription":"Wiadomość nie została wysłana ponieważ nie posiadasz subskrybcji u rozmówcy.","not_available":"Niedostępny.","no_connection":"Brak połączenia!","relogin":"Połącz ponownie","trying_to_start_private_conversation":"Rozpocznij rozmowę!","Verified":"Zweryfikowano","Unverified":"Niezweryfikowano","private_conversation_started":"Rozmowa prywatna rozpoczęta.","private_conversation_aborted":"Anulowano rozmowę!","your_buddy_closed_the_private_conversation_you_should_do_the_same":"Rozmówca przerwał połączenie!","conversation_is_now_verified":"Zweryfikowano połączenie.","authentication_failed":"Weryfikacja się nie powiodła.","your_buddy_is_attempting_to_determine_":"Twój rozmówca próbuje się z Tobą połączyć.","to_authenticate_to_your_buddy":"Autoryzacja z rozmówcą, ","enter_the_answer_and_click_answer":"napisz odpowiedź.","enter_the_secret":"wpisz hasło.","Creating_your_private_key_":"Tworzenie klucza prywatnego; może to chwilę potrwać","Authenticating_a_buddy_helps_":"Autoryzacja pomoże w ustaleniu faktycznej tożsamości rozmówcy ;).","How_do_you_want_to_authenticate_your_buddy":"Jakiej autoryzacji chcesz użyć {{bid_name}} (<b>{{bid_jid}}</b>)?","Select_method":"Wybierz sposób...","Manual":"Ręcznie","Question":"Pytanie","Secret":"Hasło","To_verify_the_fingerprint_":"Aby zweryfikować kod najpierw skontaktuj się z rozmówcą np. za pomocą telefonu.","Your_fingerprint":"Twój kod:","Buddy_fingerprint":"Kod rozmówcy","Close":"Zamknij","Compared":"Porównano","To_authenticate_using_a_question_":"Aby autoryzować za pomocą pytania, wybierz pytanie na które tylko Twój rozmówca zna odpowiedź.","Ask":"Zadaj pytanie","To_authenticate_pick_a_secret_":"Aby autoryzować za pomocą hasła, wybierz hasło na które zna tylko Twój rozmówca.","Compare":"Dopasuj","Fingerprints":"Kody autoryzacyjne","Authentication":"Autoryzacja","Message":"Wiadomość","Add_buddy":"Dodaj kontakt","rename_buddy":"Zmień nazwę","delete_buddy":"Usuń kontakt","Login":"Login","Username":"Nazwa Użytkownika","Password":"Hasło","Cancel":"Anuluj","Connect":"Połączenie","Type_in_the_full_username_":"Wpisz pełną nazwę użytkownika (np. <B>imię.nazwisko@zajezdnia.local</B>) oraz jego nazwę wyświetlaną (Alias).","Alias":"Alias","Add":"Dodaj","Subscription_request":"Potwierdzenie subskrypcji","You_have_a_request_from":"Masz potwierdzenie od","Deny":"Odmów","Approve":"Zatwierdź","Remove_buddy":"Usuń rozmówcę","You_are_about_to_remove_":"Twój rozmówca {{bid_name}} (<b>{{bid_jid}}</b>) usunął Cię ze swojej listy kontaktów.","Continue_without_chat":"Kontynuuj bez komunikatora","Please_wait":"Proszę czekać","Login_failed":"Błędne logowanie","Sorry_we_cant_authentikate_":"Błędna autoryzacja z serwerem. Może hasło jest nieprawidłowe?","Retry":"Powrót","clear_history":"Wyczyść historię","New_message_from":"Nowa wiadomość od","Should_we_notify_you_":"Czy chcesz otrzymywać powiadomienia o nowych wiadomościach w przyszłości?","Please_accept_":"Kliknij \"Zezwól\" na górze.","Hide_offline":"Schowaj niedostępne kontakty","Show_offline":"Pokaż niedostępne kontakty","About":"Info","dnd":"Nie przeszkadzać","Mute":"Wycisz","Unmute":"Włącz dźwięk","Subscription":"Subskrybcja","both":"obustronna","Status":"Status","online":"Dostępny","chat":"czat","away":"z dala od kompa","xa":"hen hen...","offline":"niedostępny","none":"brak","Unknown_instance_tag":"Nieznany przypadek.","Not_one_of_our_latest_keys":"Not one of our latest keys.","Received_an_unreadable_encrypted_message":"Otrzymano nieczytelną, zaszyfrowaną wiadomość.","Online":"Połączony","Chatty":"Pogawędzimy?","Away":"Daleko","Extended_away":"Hen Hen...","Offline":"Niedostępny","Friendship_request":"Zapytanie od znajomego?","Confirm":"Potwierdzenie","Dismiss":"Odwołaj","Remove":"Usuń","Online_help":"Pomoc Online","FN":"Pełna nazwa","N":" ","FAMILY":"Nazwisko","GIVEN":"Imię","NICKNAME":"Pseudonim","URL":"Strona WWW","ADR":"Adres","STREET":"Ulica","EXTADD":"Pełny adres","LOCALITY":"Lokalizacja","REGION":"Region","PCODE":"Kod pocztowy","CTRY":"Kraj","TEL":"Telefon","NUMBER":"Numer","EMAIL":"Email","USERID":" ","ORG":"Organizacja","ORGNAME":"Nazwa","ORGUNIT":"Jednostka","TITLE":"Stanowisko","ROLE":"Rola","BDAY":"Data urodzin","DESC":"Opis","PHOTO":" ","send_message":"Wyślij wiadomość","get_info":"Pokaż informację","Settings":"Ustawienia","Priority":"Priorytet","Save":"Zapisz","User_settings":"Ustawienia Użytkownika","A_fingerprint_":"Kod służy do autoryzacji Twojego rozmówcy aby potwierdzić jego tożsamość.","Your_roster_is_empty_add_a":"Twoja lista jest pusta, dodaj kontakty ","new_buddy":"Nowy kontakt","is":"jest","Login_options":"opcje logowania","BOSH_url":"Adres BOSH","Domain":"Domena","Resource":"Źródło","On_login":"Na login","Received_an_unencrypted_message":"Zatwierdzono nieszyfrowaną wiadomość.","Sorry_your_buddy_doesnt_provide_any_information":"Twój rozmówca nie posiada żadnych informacji.","Info_about":"Informacja o...","Authentication_aborted":"Autoryzacja anulowana.","Authentication_request_received":"Prośba o autoryzację została przyjęta.","Do_you_want_to_display_them":"Chcesz to wyświetlić?","Log_in_without_chat":"Zaloguj bez komunikatora","has_come_online":"jest teraz dostępny","Unknown_sender":"Nieznany nadawca","You_received_a_message_from_an_unknown_sender":"Masz wiadomość od nieznanego nadawcy.","Please_allow_access_to_microphone_and_camera":"Kliknij \"Potwierdź\" na górze, aby móc korzystać z mikrofonu oraz kamery.","Incoming_call":"Przychodzące połączenie","from":"z","Do_you_want_to_accept_the_call_from":"Akceptujesz połączenie od","Reject":"Odrzuć","Accept":"Zaakceptuj","hang_up":"odbierz","snapshot":"zrób zdjęcie","mute_my_audio":"wycisz dźwięk","pause_my_video":"zatrzymaj moje wideo","fullscreen":"Pełny ekran","Info":"Informacja","Local_IP":"Adres IP","Remote_IP":"Zdalny adres IP","Local_Fingerprint":"Kod lokalny","Remote_Fingerprint":"Zdalny kod","Video_call_not_possible":"Rozmowa wideo jest niemożliwa. Twój rozmówca nie ma możliwości prowadzenia takich rozmów.","Start_video_call":"Rozpocznij rozmowę wideo","Join_chat":"Dołącz do czata","Join":"Dołącz","Room":"Pokój","Nickname":"Nazwa użytkownika","left_the_building":"__nickname__ wyszedł","entered_the_room":"__nickname__ wszedł do pokoju","is_now_known_as":"__oldNickname__ zmienił nazwę na __newNickname__","This_room_is":"Ten pokój jest","muc_hidden":{"keyword":"ukryty","description":"nie można odnaleźć elementów wyszukiwania"},"muc_membersonly":{"keyword":"tylko zalogowani","description":"musisz być członkiem listy"},"muc_moderated":{"keyword":"moderowano","description":"tylko osoby z opcją \"głos\" mogą wysyłać wiadomość"},"muc_nonanonymous":{"keyword":"nie-anonimowy","description":"Twój identyfikator jabber jest widoczny dla wszystkich innych osób"},"muc_open":{"keyword":"otwarty","description":"wszyscy mają pozwolenie aby dołączyć"},"muc_passwordprotected":{"keyword":"ograniczone hasłem","description":"musisz wpisać prawidłowe hasło"},"muc_persistent":{"keyword":"trwale","description":"nie zostaną zniszczone, jeśli ostatnia osoba wyszła"},"muc_public":{"keyword":"publiczny","description":"wyszukawno"},"muc_semianonymous":{"keyword":"pół-anonimowy","description":"Twój identyfikator jabber jest widoczny w pokoju adminów"},"muc_temporary":{"keyword":"tymczasowy","description":"zostanie usunięty jeżeli ostatnia osoba wyjdzie"},"muc_unmoderated":{"keyword":"niemoderowany","description":"wszyscy są uprawnieni do pisania wiadomości"},"muc_unsecured":{"keyword":"niezabezpieczone","description":"nie musisz wpisywać hasła"},"Continue":"Kontynuuj","Server":"Serwer","Rooms_are_loaded":"Pokoje zostały załadowane","Could_load_only":"Nie załadowano __count__ pokoi","muc_explanation":"Aby się zalogować, wpisz nazwę pokoju oraz opcjonalnie nazwę użytkownika i hasło","You_already_joined_this_room":"Już dołączyłeś do tego pokoju","This_room_will_be_closed":"Ten pokój będzie zamknięty","Room_not_found_":"Nowy pokój będzie stworzony","Loading_room_information":"Ładowani informacji o pokoju","Destroy":"Zniszczony","Leave":"Opuść","changed_subject_to":"__nickname__ zmienił temat pokoju na \"__subject__\"","muc_removed_kicked":"Zostałeś wyrzucony z pokoju","muc_removed_info_kicked":"__nickname__ został wyrzucony z pokoju","muc_removed_banned":"Zostałeś zbanowany","muc_removed_info_banned":"__nickname__ został zbanowany","muc_removed_affiliation":"Zostałeś usunięty z pokoju ze względu na zmianę przynależnosci","muc_removed_info_affiliation":"__nickname__ został usunięty z pokoju ze względu na zmianę przynależnosci","muc_removed_membersonly":"Zostałeś usunięty z pokoju ze względu na zmianę pokoju tylko dla członków, a Ty nie jesteś członkiem...","muc_removed_info_membersonly":"__nickname__ został usunięty z pokoju ze względu na zmianę pokoju na tylko dla członków","muc_removed_shutdown":"Zostałeś usunięty z pokoju ze względu na zamknięcie usługi","Reason":"Powód","message_not_send":"Wystąpił błąd i twoja wiadomość nie została wysłana.","message_not_send_item-not-found":"Twoja wiadomość nie została wysłana ponieważ ten pokój nie istnieje","message_not_send_forbidden":"Twoja wiadomość nie została wysłana ponieważ nie masz głosu w tym pokoju","message_not_send_not-acceptable":"Twoja wiadomość nie została wysłana ponieważ nie jesteś właścicielem tego pokoju","This_room_has_been_closed":"Ten pokój został zamknięty","Room_logging_is_enabled":"Logowanie do pokoju jest włączone","A_password_is_required":"Hasło jest wymagane","You_are_not_on_the_member_list":"Nie jesteś na liście członków","You_are_banned_from_this_room":"Zostałeś zbanowany w tym pokoju","Your_desired_nickname_":"Twoja nazwa użytkownika jest już użyta. Spróbuj wybrać inną","The_maximum_number_":"Została osiągnięta maksymalna liczba użytkowników w tym pokoju","This_room_is_locked_":"Ten pokój jest zablokowany","You_are_not_allowed_to_create_":"Nie masz uprawnień do tworzenia pokoju","Carbon_copy":"Do wiadomości","Enable":null}},"pt-BR":{"translation":{"Logging_in":"Entrando...","your_connection_is_unencrypted":"Sua conexão não é encriptada","your_connection_is_encrypted":"Sua conexão é encriptada","your_buddy_closed_the_private_connection":"Seu contato fechou a conexão privada","start_private":"Iniciar conversa privada","close_private":"Fechar conversa privada","your_buddy_is_verificated":"Seu contato está verificado","you_have_only_a_subscription_in_one_way":"Você só tem a inscrição one-way","authentication_query_sent":"Pergunta de autenticação enviada","your_message_wasnt_send_please_end_your_private_conversation":"Sua mensagem não foi enviada. Por favor finalize sua conversa privada","unencrypted_message_received":"Mensagem não encriptada recebida","your_message_wasnt_send_because_you_have_no_valid_subscription":"Sua mensagem não foi enviada porque sua inscrição não é válida","not_available":"Indisponível","no_connection":"Sem conexão!","relogin":"reentrar","trying_to_start_private_conversation":"Tentando iniciar conversa privada","Verified":"Verificado","Unverified":"Não verificado","private_conversation_started":"Conversa privada iniciada.","private_conversation_aborted":"Conversa privada abortada!","your_buddy_closed_the_private_conversation_you_should_do_the_same":"Seu contato encerrou a conversa privada! Você deveria fazer o mesmo.","conversation_is_now_verified":"Conversa verificada.","authentication_failed":"Autenticação falhou.","your_buddy_is_attempting_to_determine_":"Seu contato está tentando determinar se ele realmente está falando contigo.","to_authenticate_to_your_buddy":"Para autenticar seu contato, ","enter_the_answer_and_click_answer":"entre com a resposta e clique em Responder.","enter_the_secret":"escreva a senha.","Creating_your_private_key_":"Criando sua chave privada: isso pode demorar um pouco.","Authenticating_a_buddy_helps_":"Autenticar seu contato ajuda a garantir que a pessoa com a qual você está falando é realmente a pessoa que ela alega ser.","How_do_you_want_to_authenticate_your_buddy":"Como você gostaria de se autenticar {{bid_name}} (<b>{{bid_jid}}</b>)?","Select_method":"Selecione o método...","Manual":"Manual","Question":"Pergunta","Secret":"Senha","To_verify_the_fingerprint_":"Para verificar o fingerprint, entre em contato com seu contato usando outro meio, de preferência seguro, como o telefone.","Your_fingerprint":"Seu fingerprint","Buddy_fingerprint":"Fingerprint do contato","Close":"Fechar","Compared":"Comparado","To_authenticate_using_a_question_":"Para autenticar seu contato faça uma pergunta, mas escolha que só ele saiba a resposta.","Ask":"Pergunta","To_authenticate_pick_a_secret_":"Para autenticar, escolha um segredo que somente você e seu contato saibam.","Compare":"Compare","Fingerprints":"Fingerprints","Authentication":"Autenticação","Message":"Mensagem","Add_buddy":"Adicionar contato","rename_buddy":"renomear contato","delete_buddy":"remover contato","Login":"Entrar","Username":"Usuário","Password":"Senha","Cancel":"Cancelar","Connect":"Conectar","Type_in_the_full_username_":"Digite seu nome completo e um apelido opcional.","Alias":"Apelido","Add":"Adicionar","Subscription_request":"Pedido de inscrição","You_have_a_request_from":"Você tem um pedido de","Deny":"Negar","Approve":"Aprovar","Remove_buddy":"Remover contato","You_are_about_to_remove_":"Você está prestes a remover {{bid_name}} (<b>{{bid_jid}}</b>) de sua lista de contatos. Todas as conversas serão fechadas.","Continue_without_chat":"Continue sem converar","Please_wait":"Por favor aguarde","Login_failed":"Autenticação da conversa falhou","Sorry_we_cant_authentikate_":"A autenticação com o servidor falhou. Talvez seja a senha errada?","Retry":"Voltar","clear_history":"Limpar histórico","New_message_from":"Nova mensagem de","Should_we_notify_you_":"Devemos continuar notificando sobre novas mensagens no futuro?","Please_accept_":"Por favor clique no botão \"Permitir\" na parte superior.","Hide_offline":"Esconder contatos desconectados","Show_offline":"Mostrar contatos desconectados","About":"Sobre","dnd":"Não perturbe","Mute":"Mudo","Unmute":"Ligar","Subscription":"Inscrição","both":"ambos","Status":"Status","online":"online","chat":"conversa","away":"ausente","xa":"ausente por mais tempo","offline":"desativado","none":"nenhum","Unknown_instance_tag":"Marcação desconhecida da instância","Not_one_of_our_latest_keys":"Nenhuma de nossas ultimas chaves.","Received_an_unreadable_encrypted_message":"Mensagem encriptada ilegível foi recebida.","Online":"Online","Chatty":"Tagarela","Away":"Ausente","Extended_away":"Ausente por mais tempo","Offline":"Desativado","Friendship_request":"Pedido de amizade","Confirm":"Confirmar","Dismiss":"Ignorar","Remove":"Remover","Online_help":"Ajuda online","FN":"Nome completo","N":" ","FAMILY":"Sobrenome","GIVEN":"Nome","NICKNAME":"Apelido","URL":"URL","ADR":"Endereço","STREET":"Rua, Av, etc","EXTADD":"Complemento","LOCALITY":"Localidade","REGION":"Região","PCODE":"CEP","CTRY":"País","TEL":"Telefone","NUMBER":"Número","EMAIL":"Email","USERID":" ","ORG":"Empresa","ORGNAME":"Nome","ORGUNIT":"Unidade","TITLE":"Cargo","ROLE":"Rol","BDAY":"Data de nascimento","DESC":"Descrição","PHOTO":" ","send_message":"Enviar mensagem","get_info":"Exibir informações","Settings":"Configurações","Priority":"Prioridade","Save":"Salvar","User_settings":"Configurações do usuário","A_fingerprint_":"O fingerprint é usado para certificar que a pessoa com a qual se está falando é que ela diz ser.","Your_roster_is_empty_add_a":"Sua lista está vazia, adicione um ","new_buddy":"novo contato","is":"é","Login_options":"Opções de login","BOSH_url":"BOSH URL","Domain":"Domínio","Resource":"Recurso","On_login":"Ao autenticar","Received_an_unencrypted_message":"Mensagem não encriptada recebida","Sorry_your_buddy_doesnt_provide_any_information":"Desculpe, seu contato não forneceu nenhuma informação","Info_about":"Informações sobre","Authentication_aborted":"Autenticação encerrada.","Authentication_request_received":"Pedido de autenticação recebido","Do_you_want_to_display_them":"Você quer mostrá-los?","Log_in_without_chat":"Entrar sem conversar","has_come_online":"ficou online","Unknown_sender":"Emissor desconhecido","You_received_a_message_from_an_unknown_sender":"Você recebeu uma mensagem de um emissor desconhecido","Please_allow_access_to_microphone_and_camera":"Por favor clique no botão \"Permitir\" no topo, para conceder acesso ao seu microfone e câmera.","Incoming_call":"Recebendo chamada","from":"de","Do_you_want_to_accept_the_call_from":"Você aceita a chamada de","Reject":"Negar","Accept":"Aceitar","hang_up":"desligar","snapshot":"registrar imagem","mute_my_audio":"mudo","pause_my_video":"pausar vídeo","fullscreen":"tela cheia","Info":"Informações","Local_IP":"IP local","Remote_IP":"IP remoto","Local_Fingerprint":"Fingerprint local","Remote_Fingerprint":"Fingerprint remoto","Video_call_not_possible":"Chamada de vídeo impossível. Seu contato não suporta chamadas desse tipo.","Start_video_call":"Iniciar chamada de vídeo","Join_chat":null,"Join":null,"Room":null,"Nickname":null,"left_the_building":null,"entered_the_room":null,"is_now_known_as":null,"This_room_is":null,"muc_hidden":{"keyword":null,"description":null},"muc_membersonly":{"keyword":null,"description":null},"muc_moderated":{"keyword":null,"description":null},"muc_nonanonymous":{"keyword":null,"description":null},"muc_open":{"keyword":null,"description":null},"muc_passwordprotected":{"keyword":null,"description":null},"muc_persistent":{"keyword":null,"description":null},"muc_public":{"keyword":null,"description":null},"muc_semianonymous":{"keyword":null,"description":null},"muc_temporary":{"keyword":null,"description":null},"muc_unmoderated":{"keyword":null,"description":null},"muc_unsecured":{"keyword":null,"description":null},"Continue":null,"Server":null,"Rooms_are_loaded":null,"Could_load_only":null,"muc_explanation":null,"You_already_joined_this_room":null,"This_room_will_be_closed":null,"Room_not_found_":null,"Loading_room_information":null,"Destroy":null,"Leave":null,"changed_subject_to":null,"muc_removed_kicked":null,"muc_removed_info_kicked":null,"muc_removed_banned":null,"muc_removed_info_banned":null,"muc_removed_affiliation":null,"muc_removed_info_affiliation":null,"muc_removed_membersonly":null,"muc_removed_info_membersonly":null,"muc_removed_shutdown":null,"Reason":null,"message_not_send":null,"message_not_send_item-not-found":null,"message_not_send_forbidden":null,"message_not_send_not-acceptable":null,"This_room_has_been_closed":null,"Room_logging_is_enabled":null,"A_password_is_required":null,"You_are_not_on_the_member_list":null,"You_are_banned_from_this_room":null,"Your_desired_nickname_":null,"The_maximum_number_":null,"This_room_is_locked_":null,"You_are_not_allowed_to_create_":null,"Carbon_copy":null,"Enable":null}},"ro":{"translation":{"Logging_in":null,"your_connection_is_unencrypted":null,"your_connection_is_encrypted":null,"your_buddy_closed_the_private_connection":null,"start_private":null,"close_private":null,"your_buddy_is_verificated":null,"you_have_only_a_subscription_in_one_way":null,"authentication_query_sent":null,"your_message_wasnt_send_please_end_your_private_conversation":null,"unencrypted_message_received":null,"your_message_wasnt_send_because_you_have_no_valid_subscription":null,"not_available":null,"no_connection":null,"relogin":null,"trying_to_start_private_conversation":null,"Verified":null,"Unverified":null,"private_conversation_started":null,"private_conversation_aborted":null,"your_buddy_closed_the_private_conversation_you_should_do_the_same":null,"conversation_is_now_verified":null,"authentication_failed":null,"your_buddy_is_attempting_to_determine_":null,"to_authenticate_to_your_buddy":null,"enter_the_answer_and_click_answer":null,"enter_the_secret":null,"Creating_your_private_key_":null,"Authenticating_a_buddy_helps_":null,"How_do_you_want_to_authenticate_your_buddy":null,"Select_method":null,"Manual":null,"Question":null,"Secret":null,"To_verify_the_fingerprint_":null,"Your_fingerprint":null,"Buddy_fingerprint":null,"Close":null,"Compared":null,"To_authenticate_using_a_question_":null,"Ask":null,"To_authenticate_pick_a_secret_":null,"Compare":null,"Fingerprints":null,"Authentication":null,"Message":null,"Add_buddy":null,"rename_buddy":null,"delete_buddy":null,"Login":null,"Username":null,"Password":null,"Cancel":null,"Connect":null,"Type_in_the_full_username_":null,"Alias":null,"Add":null,"Subscription_request":null,"You_have_a_request_from":null,"Deny":null,"Approve":null,"Remove_buddy":null,"You_are_about_to_remove_":null,"Continue_without_chat":null,"Please_wait":null,"Login_failed":null,"Sorry_we_cant_authentikate_":null,"Retry":null,"clear_history":null,"New_message_from":null,"Should_we_notify_you_":null,"Please_accept_":null,"Hide_offline":null,"Show_offline":null,"About":null,"dnd":null,"Mute":null,"Unmute":null,"Subscription":null,"both":null,"Status":null,"online":null,"chat":null,"away":null,"xa":null,"offline":null,"none":null,"Unknown_instance_tag":null,"Not_one_of_our_latest_keys":null,"Received_an_unreadable_encrypted_message":null,"Online":null,"Chatty":null,"Away":null,"Extended_away":null,"Offline":null,"Friendship_request":null,"Confirm":null,"Dismiss":null,"Remove":null,"Online_help":null,"FN":null,"N":null,"FAMILY":null,"GIVEN":null,"NICKNAME":null,"URL":null,"ADR":null,"STREET":null,"EXTADD":null,"LOCALITY":null,"REGION":null,"PCODE":null,"CTRY":null,"TEL":null,"NUMBER":null,"EMAIL":null,"USERID":null,"ORG":null,"ORGNAME":null,"ORGUNIT":null,"TITLE":null,"ROLE":null,"BDAY":null,"DESC":null,"PHOTO":null,"send_message":null,"get_info":null,"Settings":null,"Priority":null,"Save":null,"User_settings":null,"A_fingerprint_":null,"Your_roster_is_empty_add_a":null,"new_buddy":null,"is":null,"Login_options":null,"BOSH_url":null,"Domain":null,"Resource":null,"On_login":null,"Received_an_unencrypted_message":null,"Sorry_your_buddy_doesnt_provide_any_information":null,"Info_about":null,"Authentication_aborted":null,"Authentication_request_received":null,"Do_you_want_to_display_them":null,"Log_in_without_chat":null,"has_come_online":null,"Unknown_sender":null,"You_received_a_message_from_an_unknown_sender":null,"Please_allow_access_to_microphone_and_camera":null,"Incoming_call":null,"from":null,"Do_you_want_to_accept_the_call_from":null,"Reject":null,"Accept":null,"hang_up":null,"snapshot":null,"mute_my_audio":null,"pause_my_video":null,"fullscreen":null,"Info":null,"Local_IP":null,"Remote_IP":null,"Local_Fingerprint":null,"Remote_Fingerprint":null,"Video_call_not_possible":null,"Start_video_call":null,"Join_chat":null,"Join":null,"Room":null,"Nickname":null,"left_the_building":null,"entered_the_room":null,"is_now_known_as":null,"This_room_is":null,"muc_hidden":{"keyword":null,"description":null},"muc_membersonly":{"keyword":null,"description":null},"muc_moderated":{"keyword":null,"description":null},"muc_nonanonymous":{"keyword":null,"description":null},"muc_open":{"keyword":null,"description":null},"muc_passwordprotected":{"keyword":null,"description":null},"muc_persistent":{"keyword":null,"description":null},"muc_public":{"keyword":null,"description":null},"muc_semianonymous":{"keyword":null,"description":null},"muc_temporary":{"keyword":null,"description":null},"muc_unmoderated":{"keyword":null,"description":null},"muc_unsecured":{"keyword":null,"description":null},"Continue":null,"Server":null,"Rooms_are_loaded":null,"Could_load_only":null,"muc_explanation":null,"You_already_joined_this_room":null,"This_room_will_be_closed":null,"Room_not_found_":null,"Loading_room_information":null,"Destroy":null,"Leave":null,"changed_subject_to":null,"muc_removed_kicked":null,"muc_removed_info_kicked":null,"muc_removed_banned":null,"muc_removed_info_banned":null,"muc_removed_affiliation":null,"muc_removed_info_affiliation":null,"muc_removed_membersonly":null,"muc_removed_info_membersonly":null,"muc_removed_shutdown":null,"Reason":null,"message_not_send":null,"message_not_send_item-not-found":null,"message_not_send_forbidden":null,"message_not_send_not-acceptable":null,"This_room_has_been_closed":null,"Room_logging_is_enabled":null,"A_password_is_required":null,"You_are_not_on_the_member_list":null,"You_are_banned_from_this_room":null,"Your_desired_nickname_":null,"The_maximum_number_":null,"This_room_is_locked_":null,"You_are_not_allowed_to_create_":null,"Carbon_copy":null,"Enable":null}}}; \ No newline at end of file
+var I18next = {"de":{"translation":{"Logging_in":"Login läuft…","your_connection_is_unencrypted":"Deine Verbindung ist unverschlüsselt.","your_connection_is_encrypted":"Deine Verbindung ist verschlüsselt.","your_buddy_closed_the_private_connection":"Dein Kontakt hat die private Verbindung getrennt.","start_private":"Privat starten","close_private":"Privat abbrechen","your_buddy_is_verificated":"Dein Kontakt ist verifiziert.","you_have_only_a_subscription_in_one_way":"Der Kontaktstatus ist einseitig.","authentication_query_sent":"Authentifizierungsanfrage gesendet.","your_message_wasnt_send_please_end_your_private_conversation":"Deine Nachricht wurde nicht gesendet. Bitte beende die private Konversation.","unencrypted_message_received":"Unverschlüsselte Nachricht erhalten.","not_available":"Nicht verfügbar.","no_connection":"Keine Verbindung.","relogin":"Neu anmelden.","trying_to_start_private_conversation":"Versuche private Konversation zu starten.","Verified":"Verifiziert","Unverified":"Unverifiziert","private_conversation_aborted":"Private Konversation abgebrochen.","your_buddy_closed_the_private_conversation_you_should_do_the_same":"Dein Kontakt hat die private Konversation beendet. Das solltest du auch tun!","conversation_is_now_verified":"Konversation ist jetzt verifiziert","authentication_failed":"Authentifizierung fehlgeschlagen.","Creating_your_private_key_":"Wir werden jetzt deinen privaten Schlüssel generieren. Das kann einige Zeit in Anspruch nehmen.","Authenticating_a_buddy_helps_":"Einen Kontakt zu authentifizieren hilft sicherzustellen, dass die Person mit der du sprichst auch die ist die sie sagt.","How_do_you_want_to_authenticate_your_buddy":"Wie willst du {{bid_name}} (<b>{{bid_jid}}</b>) authentifizieren?","Select_method":"Wähle...","Manual":"Manual","Question":"Frage","Secret":"Geheimnis","To_verify_the_fingerprint_":"Um den Fingerprint zu verifizieren kontaktiere dein Kontakt über einen anderen Kommunikationsweg. Zum Beispiel per Telefonanruf.","Your_fingerprint":"Dein Fingerprint","Buddy_fingerprint":"Sein/Ihr Fingerprint","Close":"Schließen","Compared":"Verglichen","To_authenticate_using_a_question_":"Um die Authentifizierung per Frage durchzuführen, wähle eine Frage bei welcher nur dein Kontakt die Antwort kennt.","Ask":"Frage","To_authenticate_pick_a_secret_":"Um deinen Kontakt zu authentifizieren, wähle ein Geheimnis welches nur deinem Kontakt und dir bekannt ist.","Compare":"Vergleiche","Fingerprints":"Fingerprints","Authentication":"Authentifizierung","Message":"Nachricht","Add_buddy":"Kontakt hinzufügen","rename_buddy":"Kontakt umbenennen","delete_buddy":"Kontakt löschen","Login":"Anmeldung","Username":"Benutzername","Password":"Passwort","Cancel":"Abbrechen","Connect":"Verbinden","Type_in_the_full_username_":"Gib bitte den vollen Benutzernamen und optional ein Alias an.","Alias":"Alias","Add":"Hinzufügen","Subscription_request":"Kontaktanfrage","You_have_a_request_from":"Du hast eine Anfrage von","Deny":"Ablehnen","Approve":"Bestätigen","Remove_buddy":"Kontakt entfernen","You_are_about_to_remove_":"Du bist gerade dabei {{bid_name}} (<b>{{bid_jid}}</b>) von deiner Kontaktliste zu entfernen. Alle Chats werden geschlossen.","Continue_without_chat":"Weiter ohne Chat","Please_wait":"Bitte warten","Login_failed":"Chat-Anmeldung fehlgeschlagen","Sorry_we_cant_authentikate_":"Der Chatserver hat die Anmeldung abgelehnt. Falsches Passwort?","Retry":"Zurück","clear_history":"Lösche Verlauf","New_message_from":"Neue Nachricht von __name__","Should_we_notify_you_":"Sollen wir dich in Zukunft über eingehende Nachrichten informieren, auch wenn dieser Tab nicht im Vordergrund ist?","Please_accept_":"Bitte klick auf den \"Zulassen\" Button oben.","Hide_offline":"Offline ausblenden","Show_offline":"Offline einblenden","About":"Über","dnd":"Beschäftigt","Mute":"Ton aus","Unmute":"Ton an","Subscription":"Bezug","both":"beidseitig","Status":"Status","online":"online","chat":"chat","away":"abwesend","xa":"länger abwesend","offline":"offline","none":"keine","Unknown_instance_tag":"Unbekannter instance tag.","Not_one_of_our_latest_keys":"Nicht einer unserer letzten Schlüssel.","Received_an_unreadable_encrypted_message":"Eine unlesbare verschlüsselte Nachricht erhalten.","Online":"Online","Chatty":"Gesprächig","Away":"Abwesend","Extended_away":"Länger abwesend","Offline":"Offline","Friendship_request":"Kontaktanfrage","Confirm":"Bestätigen","Dismiss":"Ablehnen","Remove":"Löschen","Online_help":"Online Hilfe","FN":"Name","N":" ","FAMILY":"Familienname","GIVEN":"Vorname","NICKNAME":"Spitzname","URL":"URL","ADR":"Adresse","STREET":"Straße","EXTADD":"Zusätzliche Adresse","LOCALITY":"Ortschaft","REGION":"Region","PCODE":"Postleitzahl","CTRY":"Land","TEL":"Telefon","NUMBER":"Nummer","EMAIL":"E-Mail","USERID":" ","ORG":"Organisation","ORGNAME":"Name","ORGUNIT":"Abteilung","TITLE":"Titel","ROLE":"Rolle","BDAY":"Geburtstag","DESC":"Beschreibung","PHOTO":" ","send_message":"Sende Nachricht","get_info":"Benutzerinformationen","Settings":"Einstellungen","Priority":"Priorität","Save":"Speichern","User_settings":"Benutzereinstellungen","A_fingerprint_":"Ein Fingerabdruck wird dazu benutzt deinen Gesprächspartner zu identifizieren.","is":"ist","Login_options":"Anmeldeoptionen","BOSH_url":"BOSH url","Domain":"Domain","Resource":"Ressource","On_login":"Beim Anmelden","Received_an_unencrypted_message":"Unverschlüsselte Nachricht empfangen","Sorry_your_buddy_doesnt_provide_any_information":"Dein Kontakt stellt leider keine Informationen bereit.","Info_about":"Info über","Authentication_aborted":"Authentifizierung abgebrochen.","Authentication_request_received":"Authentifizierungsanfrage empfangen.","Log_in_without_chat":"Anmelden ohne Chat","has_come_online":"ist online gekommen","Unknown_sender":"Unbekannter Sender","Please_allow_access_to_microphone_and_camera":"Bitte klick auf den \"Zulassen\" Button oben, um den Zugriff auf Kamera und Mikrofon zu erlauben.","Incoming_call":"Eingehender Anruf","from":"von","Do_you_want_to_accept_the_call_from":"Möchtest Du den Anruf annehmen von","Reject":"Ablehnen","Accept":"Annehmen","hang_up":"Auflegen","snapshot":"Schnappschuss","mute_my_audio":"Mein Ton aus","pause_my_video":"Mein Video pausieren","fullscreen":"Vollbild","Info":"Info","Local_IP":"Lokale IP","Remote_IP":"Remote IP","Local_Fingerprint":"Lokaler Fingerprint","Remote_Fingerprint":"Remote Fingerprint","Video_call_not_possible":"Videoanruf nicht verfügbar. Dein Gesprächspartner unterstützt keine Videotelefonie.","Start_video_call":"Starte Videoanruf","Join_chat":"Gruppe beitreten","Join":"Betreten","Room":"Gruppe","Nickname":"Nickname","left_the_building":"__nickname__ hat die Gruppe verlassen","entered_the_room":"__nickname__ ist der Gruppe beigetreten","is_now_known_as":"__oldNickname__ ist nun unter __newNickname__ bekannt","This_room_is":"Diese Gruppe ist","muc_hidden":{"keyword":"versteckt","description":"kann durch die Suche nicht gefunden werden"},"muc_membersonly":{"keyword":"nur für Mitglieder","description":"du musst auf der Mitgliederliste stehen"},"muc_moderated":{"keyword":"moderiert","description":"Nur Personen die \"Mitspracherecht\" haben dürfen Nachrichten senden"},"muc_nonanonymous":{"keyword":"nicht anonym","description":"deine Jabber ID wird für alle Mitglieder sichtbar sein"},"muc_open":{"keyword":"offen","description":"jeder darf dieser Gruppe beitreten"},"muc_passwordprotected":{"keyword":"passwortgeschützt","description":"du benötigst das korrekte Passwort"},"muc_persistent":{"keyword":"permanent","description":"wird nicht geschlossen, wenn das letzte Mitglied die Gruppe verlässt"},"muc_public":{"keyword":"öffentlich","description":"kann durch die Suche gefunden werden"},"muc_semianonymous":{"keyword":"teilweise anonym","description":"deine Jabber ID wird nur für die Gruppen Administratoren sichtbar sein"},"muc_temporary":{"keyword":"temporär","description":"wird geschlossen, wenn das letzte Mitglied die Gruppe verlässt"},"muc_unmoderated":{"keyword":"nicht moderiert","description":"jeder darf Nachrichten senden"},"muc_unsecured":{"keyword":"ungesichert","description":"es wird kein Passwort benötigt"},"Continue":"Weiter","Server":"Server","Rooms_are_loaded":"Gruppen werden geladen","Could_load_only":"Es konnten nur __count__ Gruppen für die Autovervollständigung geladen werden","muc_explanation":"Bitte trage den Gruppennamen und optional ein Nickname und Passwort ein um einer Gruppe beizutreten","You_already_joined_this_room":"Du bist dieser Gruppe bereits beigetreten","This_room_will_be_closed":"Diese Gruppe wird geschlossen","Room_not_found_":"Es wird eine neue Gruppe erstellt","Loading_room_information":"Informationen über Gruppe werden geladen","Destroy":"Auflösen","Leave":"Verlassen","changed_subject_to":"__nickname__ hat das Thema auf __subject__ geändert","muc_removed_kicked":"Du wurdest aus der Gruppe entfernt","muc_removed_info_kicked":"__nickname__ wurde aus der Gruppe entfernt","muc_removed_banned":"Du wurdest aus der Gruppe ausgeschlossen","muc_removed_info_banned":"__nickname__ wurde aus der Gruppe ausgeschlossen","muc_removed_affiliation":"Du wurdest aus der Gruppe entfernt wegen einer Änderung deines Mitgliedstatus","muc_removed_info_affiliation":"__nickname__ wurde aus der Gruppe entfernt wegen einer Änderung seines Mitgliedstatus","muc_removed_membersonly":"Diese Gruppe erlaubt jetzt nur noch eingetragene Mitglieder und da du nicht dazugehörst, wurdest du aus der Gruppen entfernt","muc_removed_info_membersonly":"Diese Gruppe erlaubt jetzt nur noch eingetragene Mitglieder und __nickname__ gehört nicht dazu, daher wurde er aus der Gruppe entfernt","muc_removed_shutdown":"Du wurdest aus der Gruppe entfernt, da der MUC Server heruntergefahren wird","Reason":"Grund","message_not_send":"Deine Nachricht wurde aufgrund eines Fehlers nicht versandt","message_not_send_item-not-found":"Deine Nachricht wurde nicht versandt, da der Raum nicht mehr existiert","message_not_send_forbidden":"Deine Nachricht wurde nicht versandt, da du kein \"Mitspracherecht\" hast","message_not_send_not-acceptable":"Deine Nachricht wurde nicht versandt, da du kein Mitglied dieser Gruppe bist","This_room_has_been_closed":"Diese Gruppe wurde geschlossen","Room_logging_is_enabled":"Gesprächsverlauf kann öffentlich einsehbar sein","A_password_is_required":"Es wird ein Passwort benötigt","You_are_not_on_the_member_list":"Du bist kein eingetragenes Mitglied","You_are_banned_from_this_room":"Du wurdest von dieser Gruppe ausgeschlossen","Your_desired_nickname_":"Dein gewünschter Nickname wird bereits verwendet. Bitte wähle einen anderen.","The_maximum_number_":"Die maximale Anzahl der Mitglieder wurde erreicht.","This_room_is_locked_":"Diese Gruppe ist gesperrt","You_are_not_allowed_to_create_":"Du darfst keine neue Gruppe erstellen","Alert":"Alarm","Call_started":"Anruf gestarted","Call_terminated":"Anruf beendet","Carbon_copy":null,"Enable":"Aktivieren","jingle_reason_busy":"beschäftigt","jingle_reason_decline":"abgelehnt","jingle_reason_success":"aufgelegt","Media_failure":"Gerätefehler","No_local_audio_device":"Kein eigenes Audio Gerät","No_local_video_device":"Keine eigene Webcam","Ok":"Ok","PermissionDeniedError":"Du oder dein Browser haben die Audio/Video Berechtigung verweigert","Use_local_audio_device":"Nutze eigenes Audio Gerät","Use_local_video_device":"Benutze eigene Webcam","is_":"ist __status__","You_received_a_message_from_an_unknown_sender_":"Du hast eine Nachricht von einem unbekannten Sender erhalten (__sender__) Möchtest du sie sehen?","Your_roster_is_empty_add_":"Deine Kontaktliste ist leer, füge einen neuen Kontakt <a>hinzu</a>","onsmp_explanation_question":"Dein Kontakt versucht herauszufinden ob er wirklich mit dir redet. Um dich gegenüber deinem Kontakt zu verifizieren gib die Antwort ein und klick auf Antworten.","onsmp_explanation_secret":"Dein Kontakt versucht herauszufinden ob er wirklich mit dir redet. Um dich gegenüber deinem Kontakt zu verifizieren gib das Geheimnis ein.","from_sender":"von __sender__","Verified_private_conversation_started":"Verifiziert Private Konversation gestartet.","Unverified_private_conversation_started":"Unverifiziert Private Konversation gestartet."}},"el":{"translation":{"Logging_in":null,"your_connection_is_unencrypted":null,"your_connection_is_encrypted":null,"your_buddy_closed_the_private_connection":null,"start_private":null,"close_private":null,"your_buddy_is_verificated":null,"you_have_only_a_subscription_in_one_way":null,"authentication_query_sent":null,"your_message_wasnt_send_please_end_your_private_conversation":null,"unencrypted_message_received":null,"not_available":null,"no_connection":null,"relogin":null,"trying_to_start_private_conversation":null,"Verified":null,"Unverified":null,"private_conversation_aborted":null,"your_buddy_closed_the_private_conversation_you_should_do_the_same":null,"conversation_is_now_verified":null,"authentication_failed":null,"Creating_your_private_key_":null,"Authenticating_a_buddy_helps_":null,"How_do_you_want_to_authenticate_your_buddy":null,"Select_method":null,"Manual":null,"Question":null,"Secret":null,"To_verify_the_fingerprint_":null,"Your_fingerprint":null,"Buddy_fingerprint":null,"Close":null,"Compared":null,"To_authenticate_using_a_question_":null,"Ask":null,"To_authenticate_pick_a_secret_":null,"Compare":null,"Fingerprints":null,"Authentication":null,"Message":null,"Add_buddy":null,"rename_buddy":null,"delete_buddy":null,"Login":null,"Username":null,"Password":null,"Cancel":null,"Connect":null,"Type_in_the_full_username_":null,"Alias":null,"Add":null,"Subscription_request":null,"You_have_a_request_from":null,"Deny":null,"Approve":null,"Remove_buddy":null,"You_are_about_to_remove_":null,"Continue_without_chat":null,"Please_wait":null,"Login_failed":null,"Sorry_we_cant_authentikate_":null,"Retry":null,"clear_history":null,"New_message_from":null,"Should_we_notify_you_":null,"Please_accept_":null,"Hide_offline":null,"Show_offline":null,"About":null,"dnd":null,"Mute":null,"Unmute":null,"Subscription":null,"both":null,"Status":null,"online":null,"chat":null,"away":null,"xa":null,"offline":null,"none":null,"Unknown_instance_tag":null,"Not_one_of_our_latest_keys":null,"Received_an_unreadable_encrypted_message":null,"Online":null,"Chatty":null,"Away":null,"Extended_away":null,"Offline":null,"Friendship_request":null,"Confirm":null,"Dismiss":null,"Remove":null,"Online_help":null,"FN":null,"N":null,"FAMILY":null,"GIVEN":null,"NICKNAME":null,"URL":null,"ADR":null,"STREET":null,"EXTADD":null,"LOCALITY":null,"REGION":null,"PCODE":null,"CTRY":null,"TEL":null,"NUMBER":null,"EMAIL":null,"USERID":null,"ORG":null,"ORGNAME":null,"ORGUNIT":null,"TITLE":null,"ROLE":null,"BDAY":null,"DESC":null,"PHOTO":null,"send_message":null,"get_info":null,"Settings":null,"Priority":null,"Save":null,"User_settings":null,"A_fingerprint_":null,"is":null,"Login_options":null,"BOSH_url":null,"Domain":null,"Resource":null,"On_login":null,"Received_an_unencrypted_message":null,"Sorry_your_buddy_doesnt_provide_any_information":null,"Info_about":null,"Authentication_aborted":null,"Authentication_request_received":null,"Log_in_without_chat":null,"has_come_online":null,"Unknown_sender":null,"Please_allow_access_to_microphone_and_camera":null,"Incoming_call":null,"from":null,"Do_you_want_to_accept_the_call_from":null,"Reject":null,"Accept":null,"hang_up":null,"snapshot":null,"mute_my_audio":null,"pause_my_video":null,"fullscreen":null,"Info":null,"Local_IP":null,"Remote_IP":null,"Local_Fingerprint":null,"Remote_Fingerprint":null,"Video_call_not_possible":null,"Start_video_call":null,"Join_chat":null,"Join":null,"Room":null,"Nickname":null,"left_the_building":null,"entered_the_room":null,"is_now_known_as":null,"This_room_is":null,"muc_hidden":{"keyword":null,"description":null},"muc_membersonly":{"keyword":null,"description":null},"muc_moderated":{"keyword":null,"description":null},"muc_nonanonymous":{"keyword":null,"description":null},"muc_open":{"keyword":null,"description":null},"muc_passwordprotected":{"keyword":null,"description":null},"muc_persistent":{"keyword":null,"description":null},"muc_public":{"keyword":null,"description":null},"muc_semianonymous":{"keyword":null,"description":null},"muc_temporary":{"keyword":null,"description":null},"muc_unmoderated":{"keyword":null,"description":null},"muc_unsecured":{"keyword":null,"description":null},"Continue":null,"Server":null,"Rooms_are_loaded":null,"Could_load_only":null,"muc_explanation":null,"You_already_joined_this_room":null,"This_room_will_be_closed":null,"Room_not_found_":null,"Loading_room_information":null,"Destroy":null,"Leave":null,"changed_subject_to":null,"muc_removed_kicked":null,"muc_removed_info_kicked":null,"muc_removed_banned":null,"muc_removed_info_banned":null,"muc_removed_affiliation":null,"muc_removed_info_affiliation":null,"muc_removed_membersonly":null,"muc_removed_info_membersonly":null,"muc_removed_shutdown":null,"Reason":null,"message_not_send":null,"message_not_send_item-not-found":null,"message_not_send_forbidden":null,"message_not_send_not-acceptable":null,"This_room_has_been_closed":null,"Room_logging_is_enabled":null,"A_password_is_required":null,"You_are_not_on_the_member_list":null,"You_are_banned_from_this_room":null,"Your_desired_nickname_":null,"The_maximum_number_":null,"This_room_is_locked_":null,"You_are_not_allowed_to_create_":null,"Alert":null,"Call_started":null,"Call_terminated":null,"Carbon_copy":null,"Enable":null,"jingle_reason_busy":null,"jingle_reason_decline":null,"jingle_reason_success":null,"Media_failure":null,"No_local_audio_device":null,"No_local_video_device":null,"Ok":null,"PermissionDeniedError":null,"Use_local_audio_device":null,"Use_local_video_device":null,"is_":null,"You_received_a_message_from_an_unknown_sender_":null,"Your_roster_is_empty_add_":null,"onsmp_explanation_question":null,"onsmp_explanation_secret":null,"from_sender":null,"Verified_private_conversation_started":null,"Unverified_private_conversation_started":null}},"en":{"translation":{"Logging_in":"Logging in…","your_connection_is_unencrypted":"Your connection is unencrypted.","your_connection_is_encrypted":"Your connection is encrypted.","your_buddy_closed_the_private_connection":"Your contact closed the private connection.","start_private":"Start private","close_private":"Close private","your_buddy_is_verificated":"Your contact is verified.","you_have_only_a_subscription_in_one_way":"You only have a one-way subscription.","authentication_query_sent":"Authentication query sent.","your_message_wasnt_send_please_end_your_private_conversation":"Your message was not sent. Please end your private conversation.","unencrypted_message_received":"Unencrypted message received","not_available":"Not available","no_connection":"No connection!","relogin":"relogin","trying_to_start_private_conversation":"Trying to start private conversation!","Verified":"Verified","Unverified":"Unverified","private_conversation_aborted":"Private conversation aborted!","your_buddy_closed_the_private_conversation_you_should_do_the_same":"Your contact closed the private conversation! You should do the same.","conversation_is_now_verified":"Conversation is now verified.","authentication_failed":"Authentication failed.","Creating_your_private_key_":"Creating your private key; this may take a while.","Authenticating_a_buddy_helps_":"Authenticating a contact helps ensure that the person you are talking to is really the one they claim to be.","How_do_you_want_to_authenticate_your_buddy":"How do you want to authenticate {{bid_name}} (<b>{{bid_jid}}</b>)?","Select_method":"Select method...","Manual":"Manual","Question":"Question","Secret":"Secret","To_verify_the_fingerprint_":"To verify the fingerprint, contact your contact via some other trustworthy channel, such as the telephone.","Your_fingerprint":"Your fingerprint","Buddy_fingerprint":"Contact fingerprint","Close":"Close","Compared":"Compared","To_authenticate_using_a_question_":"To authenticate using a question, pick a question whose answer is known only you and your contact.","Ask":"Ask","To_authenticate_pick_a_secret_":"To authenticate, pick a secret known only to you and your contact.","Compare":"Compare","Fingerprints":"Fingerprints","Authentication":"Authentication","Message":"Message","Add_buddy":"Add contact","rename_buddy":"rename contact","delete_buddy":"delete contact","Login":"Login","Username":"Username","Password":"Password","Cancel":"Cancel","Connect":"Connect","Type_in_the_full_username_":"Type in the full username and an optional alias.","Alias":"Alias","Add":"Add","Subscription_request":"Subscription request","You_have_a_request_from":"You have a request from","Deny":"Deny","Approve":"Approve","Remove_buddy":"Remove contact","You_are_about_to_remove_":"You are about to remove {{bid_name}} (<b>{{bid_jid}}</b>) from your contact list. All related chats will be closed.","Continue_without_chat":"Continue without chat","Please_wait":"Please wait","Login_failed":"Chat login failed","Sorry_we_cant_authentikate_":"Authentication failed with the chat server. Maybe the password is wrong?","Retry":"Back","clear_history":"Clear history","New_message_from":"New message from __name__","Should_we_notify_you_":"Should we notify you about new messages in the future?","Please_accept_":"Please click the \"Allow\" button at the top.","Hide_offline":"Hide offline contacts","Show_offline":"Show offline contacts","About":"About","dnd":"Do Not Disturb","Mute":"Mute","Unmute":"Unmute","Subscription":"Subscription","both":"both","Status":"Status","online":"online","chat":"chat","away":"away","xa":"extended away","offline":"offline","none":"none","Unknown_instance_tag":"Unknown instance tag.","Not_one_of_our_latest_keys":"Not one of our latest keys.","Received_an_unreadable_encrypted_message":"Received an unreadable encrypted message.","Online":"Online","Chatty":"Chatty","Away":"Away","Extended_away":"Extended away","Offline":"Offline","Friendship_request":"Contact request","Confirm":"Confirm","Dismiss":"Dismiss","Remove":"Remove","Online_help":"Online help","FN":"Full name","N":" ","FAMILY":"Family name","GIVEN":"Given name","NICKNAME":"Nickname","URL":"URL","ADR":"Address","STREET":"Street Address","EXTADD":"Extended Address","LOCALITY":"Locality","REGION":"Region","PCODE":"Postal Code","CTRY":"Country","TEL":"Telephone","NUMBER":"Number","EMAIL":"Email","USERID":" ","ORG":"Organization","ORGNAME":"Name","ORGUNIT":"Unit","TITLE":"Job title","ROLE":"Role","BDAY":"Birthday","DESC":"Description","PHOTO":" ","send_message":"Send message","get_info":"Show information","Settings":"Settings","Priority":"Priority","Save":"Save","User_settings":"User settings","A_fingerprint_":"A fingerprint is used to make sure that the person you are talking to is who he or she is saying.","is":"is","Login_options":"Login options","BOSH_url":"BOSH URL","Domain":"Domain","Resource":"Resource","On_login":"On login","Received_an_unencrypted_message":"Received an unencrypted message","Sorry_your_buddy_doesnt_provide_any_information":"Sorry, your contact does not provide any information.","Info_about":"Info about","Authentication_aborted":"Authentication aborted.","Authentication_request_received":"Authentication request received.","Log_in_without_chat":"Log in without chat","has_come_online":"has come online","Unknown_sender":"Unknown sender","Please_allow_access_to_microphone_and_camera":"Please click the \"Allow\" button at the top, to allow access to microphone and camera.","Incoming_call":"Incoming call","from":"from","Do_you_want_to_accept_the_call_from":"Do you want to accept the call from","Reject":"Reject","Accept":"Accept","hang_up":"hang up","snapshot":"snapshot","mute_my_audio":"mute my audio","pause_my_video":"pause my video","fullscreen":"fullscreen","Info":"Info","Local_IP":"Local IP","Remote_IP":"Remote IP","Local_Fingerprint":"Local fingerprint","Remote_Fingerprint":"Remote fingerprint","Video_call_not_possible":"Video call not possible. Your contact does not support video calls.","Start_video_call":"Start video call","Join_chat":"Join chat","Join":"Join","Room":"Room","Nickname":"Nickname","left_the_building":"__nickname__ left the building","entered_the_room":"__nickname__ entered the room","is_now_known_as":"__oldNickname__ is now known as __newNickname__","This_room_is":"This room is","muc_hidden":{"keyword":"hidden","description":"can not be found through search"},"muc_membersonly":{"keyword":"members-only","description":"you need to be on the member list"},"muc_moderated":{"keyword":"moderated","description":"only persons with \"voice\" are allowed to send messages"},"muc_nonanonymous":{"keyword":"non-anonymous","description":"your jabber id is exposed to all other occupants"},"muc_open":{"keyword":"open","description":"everyone is allowed to join"},"muc_passwordprotected":{"keyword":"password-protected","description":"you need to provide the correct password"},"muc_persistent":{"keyword":"persistent","description":"will not be destroyed if the last occupant left"},"muc_public":{"keyword":"public","description":"can be found through search"},"muc_semianonymous":{"keyword":"semi-anonymous","description":"your jabber id is only exposed to room admins"},"muc_temporary":{"keyword":"temporary","description":"will be destroyed if the last occupant left"},"muc_unmoderated":{"keyword":"unmoderated","description":"everyone is allowed to send messages"},"muc_unsecured":{"keyword":"unsecured","description":"you need no password to enter"},"Continue":"Continue","Server":"Server","Rooms_are_loaded":"Rooms are loaded","Could_load_only":"Could load only __count__ rooms for autocomplete","muc_explanation":"Please enter room name and optional a nickname and password to join a chat","You_already_joined_this_room":"You already joined this room","This_room_will_be_closed":"This room will be closed","Room_not_found_":"A new room will be created","Loading_room_information":"Loading room information","Destroy":"Destroy","Leave":"Leave","changed_subject_to":"__nickname__ changed the room subject to \"__subject__\"","muc_removed_kicked":"You have been kicked from the room","muc_removed_info_kicked":"__nickname__ has been kicked from the room","muc_removed_banned":"You have been banned from the room","muc_removed_info_banned":"__nickname__ has been banned from the room","muc_removed_affiliation":"You have been removed from the room, because of an affiliation change","muc_removed_info_affiliation":"__nickname__ has been removed from the room, because of an affiliation change","muc_removed_membersonly":"You have been removed from the room, because the room has been changed to members-only and you are no member","muc_removed_info_membersonly":"__nickname__ has been removed from the room, because the room has been changed to members-only and you are no member","muc_removed_shutdown":"You have been removed from the room, because the MUC service is being shut down","Reason":"Reason","message_not_send":"Your message was not send because of an error","message_not_send_item-not-found":"Your message was not send because this room does not exist","message_not_send_forbidden":"Your message was not send because you have no voice in this room","message_not_send_not-acceptable":"Your message was not send because you are no occupant of this room","This_room_has_been_closed":"This room has been closed","Room_logging_is_enabled":"Room logging is enabled","A_password_is_required":"A password is required","You_are_not_on_the_member_list":"You are not on the member list","You_are_banned_from_this_room":"You are banned from this room","Your_desired_nickname_":"Your desired nickname is already in use. Please choose another","The_maximum_number_":"The maximum number of user is reached in this room","This_room_is_locked_":"This room is locked","You_are_not_allowed_to_create_":"You are not allowed to create a room","Alert":"Alert","Call_started":"Call started","Call_terminated":"Call terminated","Carbon_copy":"Carbon copy","Enable":"Enable","jingle_reason_busy":"busy","jingle_reason_decline":"decline","jingle_reason_success":"hung up","Media_failure":"Media failure","No_local_audio_device":"No local audio device.","No_local_video_device":"No local video device.","Ok":"Ok","PermissionDeniedError":"You or your browser denied audio/video permission","Use_local_audio_device":"Use local audio device.","Use_local_video_device":"Use local video device.","is_":"is __status__","You_received_a_message_from_an_unknown_sender_":"You received a message from an unknown sender (__sender__) Do you want to display them?","Your_roster_is_empty_add_":"Your roster is empty, add a <a>new contact</a>","onsmp_explanation_question":"You contact is attempting to determine if they are really talking to you. To authenticate to your contact, enter the answer and click Answer.","onsmp_explanation_secret":"You contact is attempting to determine if they are really talking to you. To authenticate to your contact, enter the secret.","from_sender":"from __sender__","Verified_private_conversation_started":"Verified Private conversation started.","Unverified_private_conversation_started":"Unverified Private conversation started.","Bookmark":"Bookmark","Auto-join":"Auto-join","Edit_bookmark":"Edit bookmark","Room_logging_is_disabled":"Room logging is disabled","Room_is_now_non-anoymous":"Room is now non-anonymous","Room_is_now_semi-anonymous":"Room is now semi-anonymous","Do_you_want_to_change_the_default_room_configuration":"Do you want to change the default room configuration?","Default":"Default","Change":"Change"}},"es":{"translation":{"Logging_in":"Por favor, espere...","your_connection_is_unencrypted":"Su conexión no está cifrada.","your_connection_is_encrypted":"Su conexión está cifrada.","your_buddy_closed_the_private_connection":"Su amigo ha cerrado la conexión privada.","start_private":"Iniciar privado","close_private":"Cerrar privado","your_buddy_is_verificated":"Tu amigo está verificado.","you_have_only_a_subscription_in_one_way":"Sólo tienes una suscripción de un modo.","authentication_query_sent":"Consulta de verificación enviada.","your_message_wasnt_send_please_end_your_private_conversation":"Su mensaje no fue enviado. Por favor, termine su conversación privada.","unencrypted_message_received":"Mensaje no cifrado recibido:","not_available":"No disponible","no_connection":"Sin conexión!","relogin":"iniciar sesión nuevamente","trying_to_start_private_conversation":"Intentando iniciar una conversación privada!","Verified":"Verificado","Unverified":"No verificado","private_conversation_aborted":"Conversación privada abortada!","your_buddy_closed_the_private_conversation_you_should_do_the_same":"Su amigo cerró la conversación privada! Usted debería hacer lo mismo.","conversation_is_now_verified":"La conversación es ahora verificada.","authentication_failed":"Fallo la verificación.","Creating_your_private_key_":"Ahora vamos a crear su clave privada. Esto puede tomar algún tiempo.","Authenticating_a_buddy_helps_":"Autenticación de un amigo ayuda a garantizar que la persona que está hablando es quien él o ella está diciendo.","How_do_you_want_to_authenticate_your_buddy":"¿Cómo desea autenticar {{bid_name}} (<b>{{bid_jid}}</b>)?","Select_method":"Escoja un método...","Manual":"Manual","Question":"Pregunta","Secret":"Secreto","To_verify_the_fingerprint_":"Para verificar la firma digital, póngase en contacto con su amigo a través de algún otro canal autenticado, como el teléfono.","Your_fingerprint":"Tu firma digital","Buddy_fingerprint":"firma digital de tu amigo","Close":"Cerrar","Compared":"Comparado","To_authenticate_using_a_question_":"Para autenticar mediante una pregunta, elegir una pregunta cuya respuesta se conoce sólo usted y su amigo.","Ask":"Preguntar","To_authenticate_pick_a_secret_":"Para autenticar, elija un secreto conocido sólo por usted y su amigo.","Compare":"Comparar","Fingerprints":"Firmas digitales","Authentication":"Autenticación","Message":"Mensaje","Add_buddy":"Añadir amigo","rename_buddy":"renombrar amigo","delete_buddy":"eliminar amigo","Login":"Iniciar Sesión","Username":"Usuario","Password":"Contraseña","Cancel":"Cancelar","Connect":"Conectar","Type_in_the_full_username_":"Escriba el usuario completo y un alias opcional.","Alias":"Alias","Add":"Añadir","Subscription_request":"Solicitud de suscripción","You_have_a_request_from":"Tienes una petición de","Deny":"Rechazar","Approve":"Aprobar","Remove_buddy":"Eliminar amigo","You_are_about_to_remove_":"Vas a eliminar a {{bid_name}} (<b>{{bid_jid}}</b>) de tu lista de amigos. Todas las conversaciones relacionadas serán cerradas.","Continue_without_chat":"Continuar","Please_wait":"Espere por favor","Login_failed":"Fallo el inicio de sesión","Sorry_we_cant_authentikate_":"Lo sentimos, no podemos autentificarlo en nuestro servidor de chat. ¿Tal vez la contraseña es incorrecta?","Retry":"Reintentar","clear_history":"Borrar el historial","New_message_from":"Nuevo mensaje de __name__","Should_we_notify_you_":"¿Debemos notificarle sobre nuevos mensajes en el futuro?","Please_accept_":"Por favor, haga clic en el botón \"Permitir\" en la parte superior.","Hide_offline":"Ocultar contactos desconectados","Show_offline":"Mostrar contactos desconectados","About":"Acerca de","dnd":"No Molestar","Mute":"Desactivar sonido","Unmute":"Activar sonido","Subscription":"Suscripción","both":"ambos","Status":"Estado","online":"en línea","chat":"chat","away":"ausente","xa":"mas ausente","offline":"desconectado","none":"nadie","Unknown_instance_tag":"Etiqueta de instancia desconocida.","Not_one_of_our_latest_keys":"No de nuestra ultima tecla.","Received_an_unreadable_encrypted_message":"Se recibió un mensaje cifrado ilegible.","Online":"En linea","Chatty":"Hablador","Away":"Ausente","Extended_away":"Mas ausente","Offline":"Desconectado","Friendship_request":"Solicitud de amistad","Confirm":"Confirmar","Dismiss":"Rechazar","Remove":"Eliminar","Online_help":"Ayuda en línea","FN":"Nombre completo ","N":" ","FAMILY":"Apellido","GIVEN":"Nombre","NICKNAME":"Apodar","URL":"URL","ADR":"Dirección","STREET":"Calle","EXTADD":"Extendido dirección","LOCALITY":"Población","REGION":"Región","PCODE":"Código postal","CTRY":"País","TEL":"Teléfono","NUMBER":"Número","EMAIL":"Emilio","USERID":" ","ORG":"Organización","ORGNAME":"Nombre","ORGUNIT":"Departamento","TITLE":"Título","ROLE":"Rol","BDAY":"Cumpleaños","DESC":"Descripción","PHOTO":" ","send_message":"mandar un texto","get_info":"obtener información","Settings":"Ajustes","Priority":"Prioridad","Save":"Guardar","User_settings":"Configuración de usuario","A_fingerprint_":"La huella digital se utiliza para que puedas estar seguro que la persona con la que estas hablando es quien realmente dice ser","is":"es","Login_options":"Opciones de login","BOSH_url":"BOSH url","Domain":"Dominio","Resource":"Recurso","On_login":"Iniciar sesión","Received_an_unencrypted_message":"Recibe un mensaje no cifrado","Sorry_your_buddy_doesnt_provide_any_information":"Lo sentimos, su amigo no provee ninguna información.","Info_about":"Info acerca de","Authentication_aborted":"Autenticación abortada","Authentication_request_received":"Pedido de autenticación recibido.","Log_in_without_chat":"Ingresar sin chat","has_come_online":"se ha conectado","Unknown_sender":"Remitente desconocido","Please_allow_access_to_microphone_and_camera":"Por favor, permitir el acceso al micrófono y la cámara.","Incoming_call":"Llamada entrante","from":"de","Do_you_want_to_accept_the_call_from":"Desea aceptar la llamada de","Reject":"Rechazar","Accept":"Aceptar","hang_up":"colgar","snapshot":"instantánea","mute_my_audio":"silenciar mi audio","pause_my_video":"pausar mi vídeo","fullscreen":"pantalla completa","Info":"Info","Local_IP":"IP local","Remote_IP":"IP remota","Local_Fingerprint":"Firma digital local","Remote_Fingerprint":"Firma digital remota","Video_call_not_possible":"Llamada de vídeo no es posible","Start_video_call":"Iniciar llamada de vídeo","Join_chat":null,"Join":null,"Room":null,"Nickname":null,"left_the_building":null,"entered_the_room":null,"is_now_known_as":null,"This_room_is":null,"muc_hidden":{"keyword":null,"description":null},"muc_membersonly":{"keyword":null,"description":null},"muc_moderated":{"keyword":null,"description":null},"muc_nonanonymous":{"keyword":null,"description":null},"muc_open":{"keyword":null,"description":null},"muc_passwordprotected":{"keyword":null,"description":null},"muc_persistent":{"keyword":null,"description":null},"muc_public":{"keyword":null,"description":null},"muc_semianonymous":{"keyword":null,"description":null},"muc_temporary":{"keyword":null,"description":null},"muc_unmoderated":{"keyword":null,"description":null},"muc_unsecured":{"keyword":null,"description":null},"Continue":null,"Server":null,"Rooms_are_loaded":null,"Could_load_only":null,"muc_explanation":null,"You_already_joined_this_room":null,"This_room_will_be_closed":null,"Room_not_found_":null,"Loading_room_information":null,"Destroy":null,"Leave":null,"changed_subject_to":null,"muc_removed_kicked":null,"muc_removed_info_kicked":null,"muc_removed_banned":null,"muc_removed_info_banned":null,"muc_removed_affiliation":null,"muc_removed_info_affiliation":null,"muc_removed_membersonly":null,"muc_removed_info_membersonly":null,"muc_removed_shutdown":null,"Reason":null,"message_not_send":null,"message_not_send_item-not-found":null,"message_not_send_forbidden":null,"message_not_send_not-acceptable":null,"This_room_has_been_closed":null,"Room_logging_is_enabled":null,"A_password_is_required":null,"You_are_not_on_the_member_list":null,"You_are_banned_from_this_room":null,"Your_desired_nickname_":null,"The_maximum_number_":null,"This_room_is_locked_":null,"You_are_not_allowed_to_create_":null,"Alert":null,"Call_started":null,"Call_terminated":null,"Carbon_copy":null,"Enable":"Activar","jingle_reason_busy":null,"jingle_reason_decline":null,"jingle_reason_success":null,"Media_failure":null,"No_local_audio_device":null,"No_local_video_device":null,"Ok":null,"PermissionDeniedError":null,"Use_local_audio_device":null,"Use_local_video_device":null,"is_":"es __status__","You_received_a_message_from_an_unknown_sender_":"Ha recibido un mensaje de un remitente desconocido (__sender__) ¿Quiere mostrarlos?","Your_roster_is_empty_add_":"Tu lista de amigos esta vacia <a>Nuevo amigo</a>","onsmp_explanation_question":"Tu amigo está tratando de determinar si él o ella está realmente hablando con usted. Para autenticar a su amigo, introduce la respuesta y haga clic en Contestar.","onsmp_explanation_secret":"Tu amigo está tratando de determinar si él o ella está realmente hablando con usted. Para autenticar a su amigo, especifique el secreto.","from_sender":"de __sender__","Verified_private_conversation_started":"Verificado se inició una conversación privada.","Unverified_private_conversation_started":"No verificado se inició una conversación privada."}},"fr":{"translation":{"Logging_in":"Connexion...","your_connection_is_unencrypted":"Connexion non chiffrée.","your_connection_is_encrypted":"Connexion chiffrée.","your_buddy_closed_the_private_connection":"Votre ami a fermé la connexion privée.","start_private":"Démarrer une conversation privé","close_private":"Clôturer une conversation privée","your_buddy_is_verificated":"Votre contact est vérifié.","you_have_only_a_subscription_in_one_way":"Vous ne pouvez souscrire qu'une fois.","authentication_query_sent":"Requête d’authentification envoyée.","your_message_wasnt_send_please_end_your_private_conversation":"Votre message n'a pas été envoyé. Veuillez terminer votre conversation privée.","unencrypted_message_received":"Message non chiffré reçu","not_available":"Pas disponible","no_connection":"Pas de connexion !","relogin":"Re-connexion","trying_to_start_private_conversation":"Essai de démarrage d'une conversation privée !","Verified":"Vérifié","Unverified":"Non vérifié","private_conversation_aborted":"Conversation privée interrompue !","your_buddy_closed_the_private_conversation_you_should_do_the_same":"Votre ami a fermé la conversation privée ! Vous devriez faire de même.","conversation_is_now_verified":"La conversation est maintenant vérifiée.","authentication_failed":"L'authentification a échoué.","Creating_your_private_key_":"Création de votre clé privée; cela peut prendre un moment.","Authenticating_a_buddy_helps_":"L'authentification d'un ami permet de s'assurer que la personne à qui vous parlez est vraiment celui qu'il ou elle prétend être.","How_do_you_want_to_authenticate_your_buddy":"Comment voulez-vous vous authentifier {{bid_name}} (<b>{{bid_jid}}</b>)?","Select_method":"Sélection de la méthode...","Manual":"Manuel","Question":"Question","Secret":"Sécurité","To_verify_the_fingerprint_":"Pour vérifier l'empreinte, contactez votre ami via un autre canal digne de confiance, tel que le téléphone.","Your_fingerprint":"Votre empreinte","Buddy_fingerprint":"Empreinte de l'ami","Close":"Fermer","Compared":"Comparé","To_authenticate_using_a_question_":"Pour s'authentifier à l'aide d'une question, choisissez une question dont la réponse n'est connue que vous et de votre ami.","Ask":"Demander","To_authenticate_pick_a_secret_":"Pour vous authentifier, choisissez un secret connu seulement de vous et de votre ami.","Compare":"Comparer","Fingerprints":"Empreintes","Authentication":"Authentification","Message":"Message","Add_buddy":"Ajouter comme ami","rename_buddy":"Renommer l'ami","delete_buddy":"Supprimer l'ami","Login":"Connexion","Username":"Nom d'utilisateur","Password":"Mot de passe","Cancel":"Annuler","Connect":"Connecter","Type_in_the_full_username_":"Tapez un nom d'utilisateur complet et un alias(optionnel).","Alias":"Alias","Add":"Ajouter","Subscription_request":"Demande d'abonnement","You_have_a_request_from":"Vous avez une requête de ","Deny":"Refuser","Approve":"Approuver","Remove_buddy":"Supprimer l'ami","You_are_about_to_remove_":"Vous allez retirer {{bid_name}} (<b>{{bid_jid}}</b>) de votre liste d'amis. Toutes les fenêtres de chat en lien avec celui-ci seront fermées.","Continue_without_chat":"Continuer sans tchat","Please_wait":"Merci de patienter","Login_failed":"Authentification échouée","Sorry_we_cant_authentikate_":"La connexion avec le serveur de tchat a échoué. Vérifiez le mot de passe.","Retry":"Retour","clear_history":"Effacer l’historique","New_message_from":"Nouveau message de __name__","Should_we_notify_you_":"Dans le futur, devrons-nous vous notifier les nouveaux messages ?","Please_accept_":"Merci de cliquer sur le bouton \"autoriser\" en haut de page","Hide_offline":"Masquer les contacts non connectés","Show_offline":"Afficher les contacts non connectés","About":"À propos","dnd":"Ne pas déranger","Mute":"Muet","Unmute":"Son actif","Subscription":"Abonnement","both":"Les deux","Status":"Status","online":"En ligne","chat":"tchat","away":"Absent","xa":"Options étendues","offline":"Hors ligne","none":"Aucun","Unknown_instance_tag":"Tag inconnu","Not_one_of_our_latest_keys":"Ce n'est pas l'une des dernières touches","Received_an_unreadable_encrypted_message":"Message chiffré non lisible","Online":"En ligne","Chatty":"tchatty","Away":"Absent","Extended_away":"Options étendues","Offline":"Hors ligne","Friendship_request":"Demande d'amitié","Confirm":"Valider","Dismiss":"Rejeter","Remove":"Supprimer","Online_help":"Aide en ligne","FN":"Nom","N":" N ","FAMILY":"Nom de famille","GIVEN":"prénom","NICKNAME":"Surnom","URL":"URL","ADR":"Adresse","STREET":"Rue","EXTADD":"Adresse (suite)","LOCALITY":"Localité","REGION":"Région","PCODE":"Code Postal","CTRY":"Pays","TEL":"Téléphone","NUMBER":"Numéro","EMAIL":"Courriel","USERID":" USERID ","ORG":"Organisation","ORGNAME":"Nom","ORGUNIT":"Unité","TITLE":"Qualité:","ROLE":"Rôle","BDAY":"Date de naissance","DESC":"Description","PHOTO":"Photo","send_message":"Envoyer le message","get_info":"Montrer les informations","Settings":"Réglages","Priority":"Priorité","Save":"Enregistrer","User_settings":"Paramètres utilisateur","A_fingerprint_":"Une empreinte est utilisée pour s'assurer de l'identité de la personne à qui vous parlez","is":"est","Login_options":"Options d'identification","BOSH_url":"URL BOSH","Domain":"Domaine","Resource":"Ressource","On_login":"Après authentification","Received_an_unencrypted_message":"Reçu un message non chiffré","Sorry_your_buddy_doesnt_provide_any_information":"Désolé, votre ami n'a pas fourni d'informations","Info_about":"A propos de","Authentication_aborted":"Authentification interrompue.","Authentication_request_received":"Requête d'authentification reçue.","Log_in_without_chat":"S'identifier sans tchat","has_come_online":"vient d'arriver","Unknown_sender":"Expéditeur inconnu","Please_allow_access_to_microphone_and_camera":"Veuillez cliquez sur le bouton \"Autoriser\" en haut, pour permettre l'accès au micro et à la caméra.","Incoming_call":"Appel entrant","from":"de","Do_you_want_to_accept_the_call_from":"Voulez-vous accepter l'appel de","Reject":"Rejeté","Accept":"Accepté","hang_up":"Décrochez","snapshot":"Capture d’écran","mute_my_audio":"Couper l'audio","pause_my_video":"Mettre ma vidéo en pause","fullscreen":"Plein écran","Info":"Info","Local_IP":"IP locale","Remote_IP":"IP distante","Local_Fingerprint":"Empreinte locale","Remote_Fingerprint":"Empreinte distante","Video_call_not_possible":"L'appel vidéo n'est possible. Votre ami ne supporte pas les appels vidéo.","Start_video_call":"Démarrer l'appel vidéo","Join_chat":"Joindre la discution","Join":"Joindre","Room":"Salon","Nickname":"Surnom","left_the_building":"__nickname__ a quitté l'immeuble","entered_the_room":"__nickname__ entre dans le salon","is_now_known_as":null,"This_room_is":"Ce salon est","muc_hidden":{"keyword":"caché","description":null},"muc_membersonly":{"keyword":"pour les membres seulement","description":"Vous devez être sur la liste des membres"},"muc_moderated":{"keyword":"modéré","description":"Seulement les personnes avec la \"voix\" sont autorisés à envoyer des messages"},"muc_nonanonymous":{"keyword":"non anonyme","description":"Votre identifiant Jabber est visible de tous les autres occupants"},"muc_open":{"keyword":"ouvert","description":"Tout le monde est autorisé à se connecter"},"muc_passwordprotected":{"keyword":"protégé par un mot de passe","description":"Vous devez fournir un mot de passe correct"},"muc_persistent":{"keyword":"persistent","description":null},"muc_public":{"keyword":"public","description":null},"muc_semianonymous":{"keyword":"semi-anonyme","description":"Votre identifiant Jabber est seulement visible aux administrateurs de ce salon"},"muc_temporary":{"keyword":"temporaire","description":"sera détruit au départ de son dernier occupant"},"muc_unmoderated":{"keyword":"non modéré","description":"Tout le monde est autorisé à envoyer des messages"},"muc_unsecured":{"keyword":"non sécurisé","description":"un mot de passe n'est pas nécessaire pour entrer"},"Continue":"Continuer","Server":"Serveur","Rooms_are_loaded":"Les salons sont chargés","Could_load_only":null,"muc_explanation":"Veuillez saisir le nom du salon, un surnom (optionnel) et un mot de passe pour joindre la conversation","You_already_joined_this_room":"Vous avez déjà rejoins ce salon","This_room_will_be_closed":"Ce salon va être fermé","Room_not_found_":"Un nouveau salon va être créé","Loading_room_information":"Chargement des informations du salon","Destroy":"Détruire","Leave":"Quitter","changed_subject_to":"__nickname__ a changé le sujet du salon à \"__subject__\"","muc_removed_kicked":"Vous avez été éjecté de ce salon","muc_removed_info_kicked":"__nickname__ a été éjecté de ce salon","muc_removed_banned":"Vous avez été banni de ce salon","muc_removed_info_banned":"__nickname__ a été banni de ce salon","muc_removed_affiliation":null,"muc_removed_info_affiliation":null,"muc_removed_membersonly":null,"muc_removed_info_membersonly":null,"muc_removed_shutdown":null,"Reason":"Raison","message_not_send":null,"message_not_send_item-not-found":null,"message_not_send_forbidden":null,"message_not_send_not-acceptable":"Votre message n'a pas été envoyé car il n'y a personne dans ce salon","This_room_has_been_closed":"Ce salon a été fermé","Room_logging_is_enabled":null,"A_password_is_required":"Un mot de passe est requis","You_are_not_on_the_member_list":"Vous n'êtes pas sur la liste des membres","You_are_banned_from_this_room":"Vous avez été banni de ce salon","Your_desired_nickname_":"Votre Surnom souhaité est déjà utilisé.Veuillez en choisir un autre","The_maximum_number_":"Le nombre maximum d'utilisateur est atteint dans ce salon","This_room_is_locked_":"Ce salon est vérouillé","You_are_not_allowed_to_create_":"Vous n'êtes pas autorisé à créer un salon","Alert":null,"Call_started":null,"Call_terminated":null,"Carbon_copy":null,"Enable":null,"jingle_reason_busy":null,"jingle_reason_decline":null,"jingle_reason_success":null,"Media_failure":null,"No_local_audio_device":null,"No_local_video_device":null,"Ok":null,"PermissionDeniedError":null,"Use_local_audio_device":null,"Use_local_video_device":null,"is_":"est __status__","You_received_a_message_from_an_unknown_sender_":"Vous avez reçu un message d'un expéditeur inconnu (__sender__) Voulez-vous les afficher ?","Your_roster_is_empty_add_":"Votre liste est vide, ajouter <a>Nouvel ami</a>","onsmp_explanation_question":"Votre ami tente de déterminer si il ou elle parle vraiment à vous. Vous authentifier à votre ami, Saisissez une réponse et cliquer sur Répondre.","onsmp_explanation_secret":"Votre ami tente de déterminer si il ou elle parle vraiment à vous. Vous authentifier à votre ami, Entrez le mot secret","from_sender":"de __sender__","Verified_private_conversation_started":"Vérifié Conversation privé démarrée.","Unverified_private_conversation_started":"Non vérifié Conversation privé démarrée."}},"it":{"translation":{"Logging_in":"login…","your_connection_is_unencrypted":"La sua connessione è non cifrata.","your_connection_is_encrypted":"La sua connessione è cifrata.","your_buddy_closed_the_private_connection":"La sua connessione privata è stato chiuso dal suo compagno.","start_private":"Inizia privata","close_private":"Chiude privata","your_buddy_is_verificated":"Il tuo compagno è stato verificato","you_have_only_a_subscription_in_one_way":"Hai solo una one-way inscrizione.","authentication_query_sent":"Domanda d'autenticità inviata.","your_message_wasnt_send_please_end_your_private_conversation":"Il tuo messaggio non è stato inviato. Si prega di finire la sua conversazione privata.","unencrypted_message_received":"Messaggio non cifrato ricevuto","not_available":"non disponibile","no_connection":"nessun collegamento!","relogin":"nuovo login","trying_to_start_private_conversation":"Cercando di avviare una conversazione privata!","Verified":"verificato","Unverified":"non verificato","private_conversation_aborted":"Conversazione privata abortito!","your_buddy_closed_the_private_conversation_you_should_do_the_same":"Il tuo compagno ha chiuso la conversazione privata! Si dovrebbe fare lo stesso.","conversation_is_now_verified":"Conversazione è ora verificato.","authentication_failed":"autenticazione fallita.","Creating_your_private_key_":"Creare la propria chiave privata; questo potrebbe richiedere un po'.","Authenticating_a_buddy_helps_":"Autenticazione un compagno aiuta a garantire che la persona si sta parlando è davvero quello che lui o lei sostiene di essere.","How_do_you_want_to_authenticate_your_buddy":"Come si desidera autenticare {{bid_name}} (<b>{{bid_jid}}</b>)?","Select_method":"Seleziona metodo ..","Manual":"manuale","Question":"domanda","Secret":"segreto","To_verify_the_fingerprint_":"Per verificare l'impronta digitale, contattare il proprio compagno attraverso qualche altro canale affidabile, come il telefono.","Your_fingerprint":"il tuo impronta digitale","Buddy_fingerprint":"impronta digitale da compagno","Close":"chiude","Compared":"comparato","To_authenticate_using_a_question_":"Per autenticare tramite una questione, scegli una questione la cui risposta è nota solo voi e il tuo compagno","Ask":"chiedi","To_authenticate_pick_a_secret_":"Per autenticare, scegli un segreto noto solo a te e il tuo compagno.","Compare":"Comparare","Fingerprints":"Impronta digitale","Authentication":"Autenticazione","Message":"Messagio","Add_buddy":"Aggiungi un compagno","rename_buddy":"rinomina compagno","delete_buddy":"elimina compagno","Login":"Login","Username":"Identificazione dell'utente","Password":"Password","Cancel":"Cancella","Connect":"Collega","Type_in_the_full_username_":"Digita l'identificazione utente completo e un alias opzionale.","Alias":"Alias","Add":"Aggiungi","Subscription_request":"Rrichiesta di sottoscrizione","You_have_a_request_from":"Hai una richiesta da","Deny":"Refiuta","Approve":"Approva","Remove_buddy":"Rimuova il compagno","You_are_about_to_remove_":"Stai rimovendo {{bid_name}} (<b>{{bid_jid}}</b>) del suo lista di compagni. Tutte le chat appartenente saranno chiuse.","Continue_without_chat":"Continua senza chat","Please_wait":"Si prega d'attendere","Login_failed":"Chat login è fallito","Sorry_we_cant_authentikate_":"Autenticazione non riuscita con il server di chat. Forse la password è sbagliata?","Retry":"Indietro","clear_history":"Cancella la cronologia","New_message_from":"Nuovo messaggio da __name__","Should_we_notify_you_":"Vuoi ricevere una notifica di nuovi messaggi in futuro?","Please_accept_":"Si prega di fare clic sul bottone \"Autorizzazione\" sopra.","Hide_offline":"Nascondere i contatti non in linea","Show_offline":"Mostra i contatti non in linea","About":"Informazione legale","dnd":"Non disturbare","Mute":"Muto attivo","Unmute":"Muto inattivo","Subscription":"Sottoscrizione","both":"etrambi","Status":"Status","online":"In linea","chat":"chat","away":"via","xa":"via estensivo","offline":"non in linea","none":"nessuno","Unknown_instance_tag":"Instance tag sconosciuta.","Not_one_of_our_latest_keys":"Non è una delle nostre ultime chiavi.","Received_an_unreadable_encrypted_message":"Ricevuto un messaggio crittografato illeggibile.","Online":"In linea","Chatty":"Chiacchierino","Away":"Via","Extended_away":"Via estensivo","Offline":"Non in linea","Friendship_request":"Amicizia richiesto","Confirm":"Conferma","Dismiss":"Rifiuta","Remove":"Rimuovi","Online_help":"Guida in linea","FN":"Nome e cognome","N":null,"FAMILY":"Cognome","GIVEN":"Nome","NICKNAME":"Soprannome","URL":"URL","ADR":"Indirizzo","STREET":"Via","EXTADD":"Esteso Indirizzo","LOCALITY":"Località","REGION":"Regione","PCODE":"Codice Postale","CTRY":"Paese","TEL":"Telefono","NUMBER":"Numero","EMAIL":"E-mail","USERID":null,"ORG":"Organizzazione","ORGNAME":"Nome","ORGUNIT":"Unità","TITLE":"Titolo di lavoro","ROLE":"Funzione","BDAY":"Compleanno","DESC":"Descrizione","PHOTO":null,"send_message":"Messagio inviato","get_info":"Mostra informazioni","Settings":"Impostazione","Priority":"Priorità","Save":"Salva","User_settings":"Impostazione dell'utente","A_fingerprint_":"Una impronta digitale è usato per assicurarsi che la persona con cui stai parlando è lui o lei che sta dicendo.","is":"è","Login_options":"Opzioni di login","BOSH_url":"BOSH URL","Domain":"Domain","Resource":"Risorsa","On_login":"Login on","Received_an_unencrypted_message":"Ricevuto un messaggio non crittografato","Sorry_your_buddy_doesnt_provide_any_information":"Spiace, il tuo compagno non fornisce alcuna informazione.","Info_about":"Informazioni","Authentication_aborted":"Autenticazione interrotta","Authentication_request_received":"Richiesta di autenticazione ricevuto.","Log_in_without_chat":"Log in senza chat","has_come_online":"È venuto in linea","Unknown_sender":"Mittente sconosciuto","Please_allow_access_to_microphone_and_camera":"Si prega di fare clic sul bottone \"Autorizzazione\" sopra per autorizzazione del l'accesso al microfono e fotocamera.","Incoming_call":"Chiamata in arrivo","from":"di","Do_you_want_to_accept_the_call_from":"Vuoi accettare la chiamata di","Reject":"Rifiuta","Accept":"Accetta","hang_up":"Riattacca","snapshot":"istantanea","mute_my_audio":"disattiva il mio audio","pause_my_video":"pausa il mio audio","fullscreen":"schermo intero","Info":"Informazione","Local_IP":"IP locale","Remote_IP":"IP remoto","Local_Fingerprint":"Impronta digitale locale","Remote_Fingerprint":"Impronta digitale remoto","Video_call_not_possible":"Videochiamata non è possibile. Il tuo compagno non può effettuare videochiamate.","Start_video_call":"Inizia videochiamata","Join_chat":null,"Join":null,"Room":null,"Nickname":null,"left_the_building":null,"entered_the_room":null,"is_now_known_as":null,"This_room_is":null,"muc_hidden":{"keyword":null,"description":null},"muc_membersonly":{"keyword":null,"description":null},"muc_moderated":{"keyword":null,"description":null},"muc_nonanonymous":{"keyword":null,"description":null},"muc_open":{"keyword":null,"description":null},"muc_passwordprotected":{"keyword":null,"description":null},"muc_persistent":{"keyword":null,"description":null},"muc_public":{"keyword":null,"description":null},"muc_semianonymous":{"keyword":null,"description":null},"muc_temporary":{"keyword":null,"description":null},"muc_unmoderated":{"keyword":null,"description":null},"muc_unsecured":{"keyword":null,"description":null},"Continue":null,"Server":null,"Rooms_are_loaded":null,"Could_load_only":null,"muc_explanation":null,"You_already_joined_this_room":null,"This_room_will_be_closed":null,"Room_not_found_":null,"Loading_room_information":null,"Destroy":null,"Leave":null,"changed_subject_to":null,"muc_removed_kicked":null,"muc_removed_info_kicked":null,"muc_removed_banned":null,"muc_removed_info_banned":null,"muc_removed_affiliation":null,"muc_removed_info_affiliation":null,"muc_removed_membersonly":null,"muc_removed_info_membersonly":null,"muc_removed_shutdown":null,"Reason":null,"message_not_send":null,"message_not_send_item-not-found":null,"message_not_send_forbidden":null,"message_not_send_not-acceptable":null,"This_room_has_been_closed":null,"Room_logging_is_enabled":null,"A_password_is_required":null,"You_are_not_on_the_member_list":null,"You_are_banned_from_this_room":null,"Your_desired_nickname_":null,"The_maximum_number_":null,"This_room_is_locked_":null,"You_are_not_allowed_to_create_":null,"Alert":null,"Call_started":null,"Call_terminated":null,"Carbon_copy":null,"Enable":null,"jingle_reason_busy":null,"jingle_reason_decline":null,"jingle_reason_success":null,"Media_failure":null,"No_local_audio_device":null,"No_local_video_device":null,"Ok":null,"PermissionDeniedError":null,"Use_local_audio_device":null,"Use_local_video_device":null,"is_":"è __status__","You_received_a_message_from_an_unknown_sender_":"Hai ricevuto un messaggio da un mittente sconosciuto (__sender__) Vuoi che venga visualizzato?","Your_roster_is_empty_add_":"Il suo elenco è vuoto, aggiungi un <a>compagno nuovo</a>","onsmp_explanation_question":"Il tuo compagno sta cercando di determinare se lui o lei sta davvero parlando con te. Per autenticare a il tuo compagno. inserisci la risposta e fare click su risposta.","onsmp_explanation_secret":"Il tuo compagno sta cercando di determinare se lui o lei sta davvero parlando con te. Per autenticare a il tuo compagno. inserire il segreto.","from_sender":"di __sender__","Verified_private_conversation_started":"verificato Conversazione privata iniziato.","Unverified_private_conversation_started":"non verificato Conversazione privata iniziato."}},"nds":{"translation":{"Logging_in":null,"your_connection_is_unencrypted":null,"your_connection_is_encrypted":null,"your_buddy_closed_the_private_connection":null,"start_private":null,"close_private":null,"your_buddy_is_verificated":null,"you_have_only_a_subscription_in_one_way":null,"authentication_query_sent":null,"your_message_wasnt_send_please_end_your_private_conversation":null,"unencrypted_message_received":null,"not_available":null,"no_connection":null,"relogin":null,"trying_to_start_private_conversation":null,"Verified":null,"Unverified":null,"private_conversation_aborted":null,"your_buddy_closed_the_private_conversation_you_should_do_the_same":null,"conversation_is_now_verified":null,"authentication_failed":null,"Creating_your_private_key_":null,"Authenticating_a_buddy_helps_":null,"How_do_you_want_to_authenticate_your_buddy":null,"Select_method":null,"Manual":null,"Question":null,"Secret":null,"To_verify_the_fingerprint_":null,"Your_fingerprint":null,"Buddy_fingerprint":null,"Close":null,"Compared":null,"To_authenticate_using_a_question_":null,"Ask":null,"To_authenticate_pick_a_secret_":null,"Compare":null,"Fingerprints":null,"Authentication":null,"Message":null,"Add_buddy":null,"rename_buddy":null,"delete_buddy":null,"Login":null,"Username":null,"Password":null,"Cancel":null,"Connect":null,"Type_in_the_full_username_":null,"Alias":null,"Add":null,"Subscription_request":null,"You_have_a_request_from":null,"Deny":null,"Approve":null,"Remove_buddy":null,"You_are_about_to_remove_":null,"Continue_without_chat":null,"Please_wait":null,"Login_failed":null,"Sorry_we_cant_authentikate_":null,"Retry":null,"clear_history":null,"New_message_from":null,"Should_we_notify_you_":null,"Please_accept_":null,"Hide_offline":null,"Show_offline":null,"About":null,"dnd":null,"Mute":null,"Unmute":null,"Subscription":null,"both":null,"Status":null,"online":null,"chat":null,"away":null,"xa":null,"offline":null,"none":null,"Unknown_instance_tag":null,"Not_one_of_our_latest_keys":null,"Received_an_unreadable_encrypted_message":null,"Online":null,"Chatty":null,"Away":null,"Extended_away":null,"Offline":null,"Friendship_request":null,"Confirm":null,"Dismiss":null,"Remove":null,"Online_help":null,"FN":null,"N":null,"FAMILY":null,"GIVEN":null,"NICKNAME":null,"URL":null,"ADR":null,"STREET":null,"EXTADD":null,"LOCALITY":null,"REGION":null,"PCODE":null,"CTRY":null,"TEL":null,"NUMBER":null,"EMAIL":null,"USERID":null,"ORG":null,"ORGNAME":null,"ORGUNIT":null,"TITLE":null,"ROLE":null,"BDAY":null,"DESC":null,"PHOTO":null,"send_message":null,"get_info":null,"Settings":null,"Priority":null,"Save":null,"User_settings":null,"A_fingerprint_":null,"is":null,"Login_options":null,"BOSH_url":null,"Domain":null,"Resource":null,"On_login":null,"Received_an_unencrypted_message":null,"Sorry_your_buddy_doesnt_provide_any_information":null,"Info_about":null,"Authentication_aborted":null,"Authentication_request_received":null,"Log_in_without_chat":null,"has_come_online":null,"Unknown_sender":null,"Please_allow_access_to_microphone_and_camera":null,"Incoming_call":null,"from":null,"Do_you_want_to_accept_the_call_from":null,"Reject":null,"Accept":null,"hang_up":null,"snapshot":null,"mute_my_audio":null,"pause_my_video":null,"fullscreen":null,"Info":null,"Local_IP":null,"Remote_IP":null,"Local_Fingerprint":null,"Remote_Fingerprint":null,"Video_call_not_possible":null,"Start_video_call":null,"Join_chat":null,"Join":null,"Room":null,"Nickname":null,"left_the_building":null,"entered_the_room":null,"is_now_known_as":null,"This_room_is":null,"muc_hidden":{"keyword":null,"description":null},"muc_membersonly":{"keyword":null,"description":null},"muc_moderated":{"keyword":null,"description":null},"muc_nonanonymous":{"keyword":null,"description":null},"muc_open":{"keyword":null,"description":null},"muc_passwordprotected":{"keyword":null,"description":null},"muc_persistent":{"keyword":null,"description":null},"muc_public":{"keyword":null,"description":null},"muc_semianonymous":{"keyword":null,"description":null},"muc_temporary":{"keyword":null,"description":null},"muc_unmoderated":{"keyword":null,"description":null},"muc_unsecured":{"keyword":null,"description":null},"Continue":null,"Server":null,"Rooms_are_loaded":null,"Could_load_only":null,"muc_explanation":null,"You_already_joined_this_room":null,"This_room_will_be_closed":null,"Room_not_found_":null,"Loading_room_information":null,"Destroy":null,"Leave":null,"changed_subject_to":null,"muc_removed_kicked":null,"muc_removed_info_kicked":null,"muc_removed_banned":null,"muc_removed_info_banned":null,"muc_removed_affiliation":null,"muc_removed_info_affiliation":null,"muc_removed_membersonly":null,"muc_removed_info_membersonly":null,"muc_removed_shutdown":null,"Reason":null,"message_not_send":null,"message_not_send_item-not-found":null,"message_not_send_forbidden":null,"message_not_send_not-acceptable":null,"This_room_has_been_closed":null,"Room_logging_is_enabled":null,"A_password_is_required":null,"You_are_not_on_the_member_list":null,"You_are_banned_from_this_room":null,"Your_desired_nickname_":null,"The_maximum_number_":null,"This_room_is_locked_":null,"You_are_not_allowed_to_create_":null,"Alert":null,"Call_started":null,"Call_terminated":null,"Carbon_copy":null,"Enable":null,"jingle_reason_busy":null,"jingle_reason_decline":null,"jingle_reason_success":null,"Media_failure":null,"No_local_audio_device":null,"No_local_video_device":null,"Ok":null,"PermissionDeniedError":null,"Use_local_audio_device":null,"Use_local_video_device":null,"is_":null,"You_received_a_message_from_an_unknown_sender_":null,"Your_roster_is_empty_add_":null,"onsmp_explanation_question":null,"onsmp_explanation_secret":null,"from_sender":null,"Verified_private_conversation_started":null,"Unverified_private_conversation_started":null}},"pl":{"translation":{"Logging_in":"Logowanie...","your_connection_is_unencrypted":"Twoje połączenie nie jest szyfrowane.","your_connection_is_encrypted":"Twoje połączenie jest szyfrowane.","your_buddy_closed_the_private_connection":"Twój rozmówca zamknął połączenie.","start_private":"Rozpocznij rozmowę.","close_private":"Zakończ rozmowę.","your_buddy_is_verificated":"Twój rozmówca został zweryfikowany.","you_have_only_a_subscription_in_one_way":"Masz jednostronną subskrypcję.","authentication_query_sent":"Wysłano proźbę o autentykację.","your_message_wasnt_send_please_end_your_private_conversation":"Twoja wiadomość nie została wysłana. Proszę, zamknij rozmowę.","unencrypted_message_received":"Zwrotna niezaszyfrowana wiadomość.","not_available":"Niedostępny.","no_connection":"Brak połączenia!","relogin":"Połącz ponownie","trying_to_start_private_conversation":"Rozpocznij rozmowę!","Verified":"Zweryfikowano","Unverified":"Niezweryfikowano","private_conversation_aborted":"Anulowano rozmowę!","your_buddy_closed_the_private_conversation_you_should_do_the_same":"Rozmówca przerwał połączenie!","conversation_is_now_verified":"Zweryfikowano połączenie.","authentication_failed":"Weryfikacja się nie powiodła.","Creating_your_private_key_":"Tworzenie klucza prywatnego; może to chwilę potrwać","Authenticating_a_buddy_helps_":"Autoryzacja pomoże w ustaleniu faktycznej tożsamości rozmówcy ;).","How_do_you_want_to_authenticate_your_buddy":"Jakiej autoryzacji chcesz użyć {{bid_name}} (<b>{{bid_jid}}</b>)?","Select_method":"Wybierz sposób...","Manual":"Ręcznie","Question":"Pytanie","Secret":"Hasło","To_verify_the_fingerprint_":"Aby zweryfikować kod najpierw skontaktuj się z rozmówcą np. za pomocą telefonu.","Your_fingerprint":"Twój kod:","Buddy_fingerprint":"Kod rozmówcy","Close":"Zamknij","Compared":"Porównano","To_authenticate_using_a_question_":"Aby autoryzować za pomocą pytania, wybierz pytanie na które tylko Twój rozmówca zna odpowiedź.","Ask":"Zadaj pytanie","To_authenticate_pick_a_secret_":"Aby autoryzować za pomocą hasła, wybierz hasło na które zna tylko Twój rozmówca.","Compare":"Dopasuj","Fingerprints":"Kody autoryzacyjne","Authentication":"Autoryzacja","Message":"Wiadomość","Add_buddy":"Dodaj kontakt","rename_buddy":"Zmień nazwę","delete_buddy":"Usuń kontakt","Login":"Login","Username":"Nazwa Użytkownika","Password":"Hasło","Cancel":"Anuluj","Connect":"Połączenie","Type_in_the_full_username_":"Wpisz pełną nazwę użytkownika (np. <B>imię.nazwisko@zajezdnia.local</B>) oraz jego nazwę wyświetlaną (Alias).","Alias":"Alias","Add":"Dodaj","Subscription_request":"Potwierdzenie subskrypcji","You_have_a_request_from":"Masz potwierdzenie od","Deny":"Odmów","Approve":"Zatwierdź","Remove_buddy":"Usuń rozmówcę","You_are_about_to_remove_":"Twój rozmówca {{bid_name}} (<b>{{bid_jid}}</b>) usunął Cię ze swojej listy kontaktów.","Continue_without_chat":"Kontynuuj bez komunikatora","Please_wait":"Proszę czekać","Login_failed":"Błędne logowanie","Sorry_we_cant_authentikate_":"Błędna autoryzacja z serwerem. Może hasło jest nieprawidłowe?","Retry":"Powrót","clear_history":"Wyczyść historię","New_message_from":"Nowa wiadomość od __name__","Should_we_notify_you_":"Czy chcesz otrzymywać powiadomienia o nowych wiadomościach w przyszłości?","Please_accept_":"Kliknij \"Zezwól\" na górze.","Hide_offline":"Schowaj niedostępne kontakty","Show_offline":"Pokaż niedostępne kontakty","About":"Info","dnd":"Nie przeszkadzać","Mute":"Wycisz","Unmute":"Włącz dźwięk","Subscription":"Subskrybcja","both":"obustronna","Status":"Status","online":"Dostępny","chat":"czat","away":"z dala od kompa","xa":"hen hen...","offline":"niedostępny","none":"brak","Unknown_instance_tag":"Nieznany przypadek.","Not_one_of_our_latest_keys":"Not one of our latest keys.","Received_an_unreadable_encrypted_message":"Otrzymano nieczytelną, zaszyfrowaną wiadomość.","Online":"Połączony","Chatty":"Pogawędzimy?","Away":"Daleko","Extended_away":"Hen Hen...","Offline":"Niedostępny","Friendship_request":"Zapytanie od znajomego?","Confirm":"Potwierdzenie","Dismiss":"Odwołaj","Remove":"Usuń","Online_help":"Pomoc Online","FN":"Pełna nazwa","N":" ","FAMILY":"Nazwisko","GIVEN":"Imię","NICKNAME":"Pseudonim","URL":"Strona WWW","ADR":"Adres","STREET":"Ulica","EXTADD":"Pełny adres","LOCALITY":"Lokalizacja","REGION":"Region","PCODE":"Kod pocztowy","CTRY":"Kraj","TEL":"Telefon","NUMBER":"Numer","EMAIL":"Email","USERID":" ","ORG":"Organizacja","ORGNAME":"Nazwa","ORGUNIT":"Jednostka","TITLE":"Stanowisko","ROLE":"Rola","BDAY":"Data urodzin","DESC":"Opis","PHOTO":" ","send_message":"Wyślij wiadomość","get_info":"Pokaż informację","Settings":"Ustawienia","Priority":"Priorytet","Save":"Zapisz","User_settings":"Ustawienia Użytkownika","A_fingerprint_":"Kod służy do autoryzacji Twojego rozmówcy aby potwierdzić jego tożsamość.","is":"jest","Login_options":"opcje logowania","BOSH_url":"Adres BOSH","Domain":"Domena","Resource":"Źródło","On_login":"Na login","Received_an_unencrypted_message":"Zatwierdzono nieszyfrowaną wiadomość.","Sorry_your_buddy_doesnt_provide_any_information":"Twój rozmówca nie posiada żadnych informacji.","Info_about":"Informacja o...","Authentication_aborted":"Autoryzacja anulowana.","Authentication_request_received":"Prośba o autoryzację została przyjęta.","Log_in_without_chat":"Zaloguj bez komunikatora","has_come_online":"jest teraz dostępny","Unknown_sender":"Nieznany nadawca","Please_allow_access_to_microphone_and_camera":"Kliknij \"Potwierdź\" na górze, aby móc korzystać z mikrofonu oraz kamery.","Incoming_call":"Przychodzące połączenie","from":"z","Do_you_want_to_accept_the_call_from":"Akceptujesz połączenie od","Reject":"Odrzuć","Accept":"Zaakceptuj","hang_up":"odbierz","snapshot":"zrób zdjęcie","mute_my_audio":"wycisz dźwięk","pause_my_video":"zatrzymaj moje wideo","fullscreen":"Pełny ekran","Info":"Informacja","Local_IP":"Adres IP","Remote_IP":"Zdalny adres IP","Local_Fingerprint":"Kod lokalny","Remote_Fingerprint":"Zdalny kod","Video_call_not_possible":"Rozmowa wideo jest niemożliwa. Twój rozmówca nie ma możliwości prowadzenia takich rozmów.","Start_video_call":"Rozpocznij rozmowę wideo","Join_chat":"Dołącz do czata","Join":"Dołącz","Room":"Pokój","Nickname":"Nazwa użytkownika","left_the_building":"__nickname__ wyszedł","entered_the_room":"__nickname__ wszedł do pokoju","is_now_known_as":"__oldNickname__ zmienił nazwę na __newNickname__","This_room_is":"Ten pokój jest","muc_hidden":{"keyword":"ukryty","description":"nie można odnaleźć elementów wyszukiwania"},"muc_membersonly":{"keyword":"tylko zalogowani","description":"musisz być członkiem listy"},"muc_moderated":{"keyword":"moderowano","description":"tylko osoby z opcją \"głos\" mogą wysyłać wiadomość"},"muc_nonanonymous":{"keyword":"nie-anonimowy","description":"Twój identyfikator jabber jest widoczny dla wszystkich innych osób"},"muc_open":{"keyword":"otwarty","description":"wszyscy mają pozwolenie aby dołączyć"},"muc_passwordprotected":{"keyword":"ograniczone hasłem","description":"musisz wpisać prawidłowe hasło"},"muc_persistent":{"keyword":"trwale","description":"nie zostaną zniszczone, jeśli ostatnia osoba wyszła"},"muc_public":{"keyword":"publiczny","description":"wyszukawno"},"muc_semianonymous":{"keyword":"pół-anonimowy","description":"Twój identyfikator jabber jest widoczny w pokoju adminów"},"muc_temporary":{"keyword":"tymczasowy","description":"zostanie usunięty jeżeli ostatnia osoba wyjdzie"},"muc_unmoderated":{"keyword":"niemoderowany","description":"wszyscy są uprawnieni do pisania wiadomości"},"muc_unsecured":{"keyword":"niezabezpieczone","description":"nie musisz wpisywać hasła"},"Continue":"Kontynuuj","Server":"Serwer","Rooms_are_loaded":"Pokoje zostały załadowane","Could_load_only":"Nie załadowano __count__ pokoi","muc_explanation":"Aby się zalogować, wpisz nazwę pokoju oraz opcjonalnie nazwę użytkownika i hasło","You_already_joined_this_room":"Już dołączyłeś do tego pokoju","This_room_will_be_closed":"Ten pokój będzie zamknięty","Room_not_found_":"Nowy pokój będzie stworzony","Loading_room_information":"Ładowani informacji o pokoju","Destroy":"Zniszczony","Leave":"Opuść","changed_subject_to":"__nickname__ zmienił temat pokoju na \"__subject__\"","muc_removed_kicked":"Zostałeś wyrzucony z pokoju","muc_removed_info_kicked":"__nickname__ został wyrzucony z pokoju","muc_removed_banned":"Zostałeś zbanowany","muc_removed_info_banned":"__nickname__ został zbanowany","muc_removed_affiliation":"Zostałeś usunięty z pokoju ze względu na zmianę przynależnosci","muc_removed_info_affiliation":"__nickname__ został usunięty z pokoju ze względu na zmianę przynależnosci","muc_removed_membersonly":"Zostałeś usunięty z pokoju ze względu na zmianę pokoju tylko dla członków, a Ty nie jesteś członkiem...","muc_removed_info_membersonly":"__nickname__ został usunięty z pokoju ze względu na zmianę pokoju na tylko dla członków","muc_removed_shutdown":"Zostałeś usunięty z pokoju ze względu na zamknięcie usługi","Reason":"Powód","message_not_send":"Wystąpił błąd i twoja wiadomość nie została wysłana.","message_not_send_item-not-found":"Twoja wiadomość nie została wysłana ponieważ ten pokój nie istnieje","message_not_send_forbidden":"Twoja wiadomość nie została wysłana ponieważ nie masz głosu w tym pokoju","message_not_send_not-acceptable":"Twoja wiadomość nie została wysłana ponieważ nie jesteś właścicielem tego pokoju","This_room_has_been_closed":"Ten pokój został zamknięty","Room_logging_is_enabled":"Logowanie do pokoju jest włączone","A_password_is_required":"Hasło jest wymagane","You_are_not_on_the_member_list":"Nie jesteś na liście członków","You_are_banned_from_this_room":"Zostałeś zbanowany w tym pokoju","Your_desired_nickname_":"Twoja nazwa użytkownika jest już użyta. Spróbuj wybrać inną","The_maximum_number_":"Została osiągnięta maksymalna liczba użytkowników w tym pokoju","This_room_is_locked_":"Ten pokój jest zablokowany","You_are_not_allowed_to_create_":"Nie masz uprawnień do tworzenia pokoju","Alert":"Alarm","Call_started":null,"Call_terminated":null,"Carbon_copy":"Do wiadomości","Enable":"Włączone","jingle_reason_busy":null,"jingle_reason_decline":null,"jingle_reason_success":null,"Media_failure":null,"No_local_audio_device":null,"No_local_video_device":null,"Ok":"Ok","PermissionDeniedError":null,"Use_local_audio_device":null,"Use_local_video_device":null,"is_":"jest __status__","You_received_a_message_from_an_unknown_sender_":"Masz wiadomość od nieznanego nadawcy. (__sender__) Chcesz to wyświetlić?","Your_roster_is_empty_add_":"Twoja lista jest pusta, dodaj kontakty <a>Nowy kontakt</a>","onsmp_explanation_question":"Twój rozmówca próbuje się z Tobą połączyć. Autoryzacja z rozmówcą, napisz odpowiedź.","onsmp_explanation_secret":"Twój rozmówca próbuje się z Tobą połączyć. Autoryzacja z rozmówcą, wpisz hasło.","from_sender":"z __sender__","Verified_private_conversation_started":"Zweryfikowano Rozmowa prywatna rozpoczęta.","Unverified_private_conversation_started":"Niezweryfikowano Rozmowa prywatna rozpoczęta."}},"pt-BR":{"translation":{"Logging_in":"Entrando...","your_connection_is_unencrypted":"Sua conexão não é encriptada","your_connection_is_encrypted":"Sua conexão é encriptada","your_buddy_closed_the_private_connection":"Seu contato fechou a conexão privada","start_private":"Iniciar conversa privada","close_private":"Fechar conversa privada","your_buddy_is_verificated":"Seu contato está verificado","you_have_only_a_subscription_in_one_way":"Você só tem a inscrição one-way","authentication_query_sent":"Pergunta de autenticação enviada","your_message_wasnt_send_please_end_your_private_conversation":"Sua mensagem não foi enviada. Por favor finalize sua conversa privada","unencrypted_message_received":"Mensagem não encriptada recebida","not_available":"Indisponível","no_connection":"Sem conexão!","relogin":"reentrar","trying_to_start_private_conversation":"Tentando iniciar conversa privada","Verified":"Verificado","Unverified":"Não verificado","private_conversation_aborted":"Conversa privada abortada!","your_buddy_closed_the_private_conversation_you_should_do_the_same":"Seu contato encerrou a conversa privada! Você deveria fazer o mesmo.","conversation_is_now_verified":"Conversa verificada.","authentication_failed":"Autenticação falhou.","Creating_your_private_key_":"Criando sua chave privada: isso pode demorar um pouco.","Authenticating_a_buddy_helps_":"Autenticar seu contato ajuda a garantir que a pessoa com a qual você está falando é realmente a pessoa que ela alega ser.","How_do_you_want_to_authenticate_your_buddy":"Como você gostaria de se autenticar {{bid_name}} (<b>{{bid_jid}}</b>)?","Select_method":"Selecione o método...","Manual":"Manual","Question":"Pergunta","Secret":"Senha","To_verify_the_fingerprint_":"Para verificar o fingerprint, entre em contato com seu contato usando outro meio, de preferência seguro, como o telefone.","Your_fingerprint":"Seu fingerprint","Buddy_fingerprint":"Fingerprint do contato","Close":"Fechar","Compared":"Comparado","To_authenticate_using_a_question_":"Para autenticar seu contato faça uma pergunta, mas escolha que só ele saiba a resposta.","Ask":"Pergunta","To_authenticate_pick_a_secret_":"Para autenticar, escolha um segredo que somente você e seu contato saibam.","Compare":"Compare","Fingerprints":"Fingerprints","Authentication":"Autenticação","Message":"Mensagem","Add_buddy":"Adicionar contato","rename_buddy":"renomear contato","delete_buddy":"remover contato","Login":"Entrar","Username":"Usuário","Password":"Senha","Cancel":"Cancelar","Connect":"Conectar","Type_in_the_full_username_":"Digite seu nome completo e um apelido opcional.","Alias":"Apelido","Add":"Adicionar","Subscription_request":"Pedido de inscrição","You_have_a_request_from":"Você tem um pedido de","Deny":"Negar","Approve":"Aprovar","Remove_buddy":"Remover contato","You_are_about_to_remove_":"Você está prestes a remover {{bid_name}} (<b>{{bid_jid}}</b>) de sua lista de contatos. Todas as conversas serão fechadas.","Continue_without_chat":"Continue sem converar","Please_wait":"Por favor aguarde","Login_failed":"Autenticação da conversa falhou","Sorry_we_cant_authentikate_":"A autenticação com o servidor falhou. Talvez seja a senha errada?","Retry":"Voltar","clear_history":"Limpar histórico","New_message_from":"Nova mensagem de __name__","Should_we_notify_you_":"Devemos continuar notificando sobre novas mensagens no futuro?","Please_accept_":"Por favor clique no botão \"Permitir\" na parte superior.","Hide_offline":"Esconder contatos desconectados","Show_offline":"Mostrar contatos desconectados","About":"Sobre","dnd":"Não perturbe","Mute":"Mudo","Unmute":"Ligar","Subscription":"Inscrição","both":"ambos","Status":"Status","online":"online","chat":"conversa","away":"ausente","xa":"ausente por mais tempo","offline":"desativado","none":"nenhum","Unknown_instance_tag":"Marcação desconhecida da instância","Not_one_of_our_latest_keys":"Nenhuma de nossas ultimas chaves.","Received_an_unreadable_encrypted_message":"Mensagem encriptada ilegível foi recebida.","Online":"Online","Chatty":"Tagarela","Away":"Ausente","Extended_away":"Ausente por mais tempo","Offline":"Desativado","Friendship_request":"Pedido de amizade","Confirm":"Confirmar","Dismiss":"Ignorar","Remove":"Remover","Online_help":"Ajuda online","FN":"Nome completo","N":" ","FAMILY":"Sobrenome","GIVEN":"Nome","NICKNAME":"Apelido","URL":"URL","ADR":"Endereço","STREET":"Rua, Av, etc","EXTADD":"Complemento","LOCALITY":"Localidade","REGION":"Região","PCODE":"CEP","CTRY":"País","TEL":"Telefone","NUMBER":"Número","EMAIL":"Email","USERID":" ","ORG":"Empresa","ORGNAME":"Nome","ORGUNIT":"Unidade","TITLE":"Cargo","ROLE":"Rol","BDAY":"Data de nascimento","DESC":"Descrição","PHOTO":" ","send_message":"Enviar mensagem","get_info":"Exibir informações","Settings":"Configurações","Priority":"Prioridade","Save":"Salvar","User_settings":"Configurações do usuário","A_fingerprint_":"O fingerprint é usado para certificar que a pessoa com a qual se está falando é que ela diz ser.","is":"é","Login_options":"Opções de login","BOSH_url":"BOSH URL","Domain":"Domínio","Resource":"Recurso","On_login":"Ao autenticar","Received_an_unencrypted_message":"Mensagem não encriptada recebida","Sorry_your_buddy_doesnt_provide_any_information":"Desculpe, seu contato não forneceu nenhuma informação","Info_about":"Informações sobre","Authentication_aborted":"Autenticação encerrada.","Authentication_request_received":"Pedido de autenticação recebido","Log_in_without_chat":"Entrar sem conversar","has_come_online":"ficou online","Unknown_sender":"Emissor desconhecido","Please_allow_access_to_microphone_and_camera":"Por favor clique no botão \"Permitir\" no topo, para conceder acesso ao seu microfone e câmera.","Incoming_call":"Recebendo chamada","from":"de","Do_you_want_to_accept_the_call_from":"Você aceita a chamada de","Reject":"Negar","Accept":"Aceitar","hang_up":"desligar","snapshot":"registrar imagem","mute_my_audio":"mudo","pause_my_video":"pausar vídeo","fullscreen":"tela cheia","Info":"Informações","Local_IP":"IP local","Remote_IP":"IP remoto","Local_Fingerprint":"Fingerprint local","Remote_Fingerprint":"Fingerprint remoto","Video_call_not_possible":"Chamada de vídeo impossível. Seu contato não suporta chamadas desse tipo.","Start_video_call":"Iniciar chamada de vídeo","Join_chat":null,"Join":null,"Room":null,"Nickname":null,"left_the_building":null,"entered_the_room":null,"is_now_known_as":null,"This_room_is":null,"muc_hidden":{"keyword":null,"description":null},"muc_membersonly":{"keyword":null,"description":null},"muc_moderated":{"keyword":null,"description":null},"muc_nonanonymous":{"keyword":null,"description":null},"muc_open":{"keyword":null,"description":null},"muc_passwordprotected":{"keyword":null,"description":null},"muc_persistent":{"keyword":null,"description":null},"muc_public":{"keyword":null,"description":null},"muc_semianonymous":{"keyword":null,"description":null},"muc_temporary":{"keyword":null,"description":null},"muc_unmoderated":{"keyword":null,"description":null},"muc_unsecured":{"keyword":null,"description":null},"Continue":null,"Server":null,"Rooms_are_loaded":null,"Could_load_only":null,"muc_explanation":null,"You_already_joined_this_room":null,"This_room_will_be_closed":null,"Room_not_found_":null,"Loading_room_information":null,"Destroy":null,"Leave":null,"changed_subject_to":null,"muc_removed_kicked":null,"muc_removed_info_kicked":null,"muc_removed_banned":null,"muc_removed_info_banned":null,"muc_removed_affiliation":null,"muc_removed_info_affiliation":null,"muc_removed_membersonly":null,"muc_removed_info_membersonly":null,"muc_removed_shutdown":null,"Reason":null,"message_not_send":null,"message_not_send_item-not-found":null,"message_not_send_forbidden":null,"message_not_send_not-acceptable":null,"This_room_has_been_closed":null,"Room_logging_is_enabled":null,"A_password_is_required":null,"You_are_not_on_the_member_list":null,"You_are_banned_from_this_room":null,"Your_desired_nickname_":null,"The_maximum_number_":null,"This_room_is_locked_":null,"You_are_not_allowed_to_create_":null,"Alert":null,"Call_started":null,"Call_terminated":null,"Carbon_copy":null,"Enable":null,"jingle_reason_busy":null,"jingle_reason_decline":null,"jingle_reason_success":null,"Media_failure":null,"No_local_audio_device":null,"No_local_video_device":null,"Ok":null,"PermissionDeniedError":null,"Use_local_audio_device":null,"Use_local_video_device":null,"is_":"é __status__","You_received_a_message_from_an_unknown_sender_":"Você recebeu uma mensagem de um emissor desconhecido (__sender__) Você quer mostrá-los?","Your_roster_is_empty_add_":"Sua lista está vazia, adicione um <a>novo contato</a>","onsmp_explanation_question":"Seu contato está tentando determinar se ele realmente está falando contigo. Para autenticar seu contato, entre com a resposta e clique em Responder.","onsmp_explanation_secret":"Seu contato está tentando determinar se ele realmente está falando contigo. Para autenticar seu contato, escreva a senha.","from_sender":"de __sender__","Verified_private_conversation_started":"Verificado Conversa privada iniciada.","Unverified_private_conversation_started":"Não verificado Conversa privada iniciada."}},"ro":{"translation":{"Logging_in":null,"your_connection_is_unencrypted":null,"your_connection_is_encrypted":null,"your_buddy_closed_the_private_connection":null,"start_private":null,"close_private":null,"your_buddy_is_verificated":null,"you_have_only_a_subscription_in_one_way":null,"authentication_query_sent":null,"your_message_wasnt_send_please_end_your_private_conversation":null,"unencrypted_message_received":null,"not_available":null,"no_connection":null,"relogin":null,"trying_to_start_private_conversation":null,"Verified":null,"Unverified":null,"private_conversation_aborted":null,"your_buddy_closed_the_private_conversation_you_should_do_the_same":null,"conversation_is_now_verified":null,"authentication_failed":null,"Creating_your_private_key_":null,"Authenticating_a_buddy_helps_":null,"How_do_you_want_to_authenticate_your_buddy":null,"Select_method":null,"Manual":null,"Question":null,"Secret":null,"To_verify_the_fingerprint_":null,"Your_fingerprint":null,"Buddy_fingerprint":null,"Close":null,"Compared":null,"To_authenticate_using_a_question_":null,"Ask":null,"To_authenticate_pick_a_secret_":null,"Compare":null,"Fingerprints":null,"Authentication":null,"Message":null,"Add_buddy":null,"rename_buddy":null,"delete_buddy":null,"Login":null,"Username":null,"Password":null,"Cancel":null,"Connect":null,"Type_in_the_full_username_":null,"Alias":null,"Add":null,"Subscription_request":null,"You_have_a_request_from":null,"Deny":null,"Approve":null,"Remove_buddy":null,"You_are_about_to_remove_":null,"Continue_without_chat":null,"Please_wait":null,"Login_failed":null,"Sorry_we_cant_authentikate_":null,"Retry":null,"clear_history":null,"New_message_from":null,"Should_we_notify_you_":null,"Please_accept_":null,"Hide_offline":null,"Show_offline":null,"About":null,"dnd":null,"Mute":null,"Unmute":null,"Subscription":null,"both":null,"Status":null,"online":null,"chat":null,"away":null,"xa":null,"offline":null,"none":null,"Unknown_instance_tag":null,"Not_one_of_our_latest_keys":null,"Received_an_unreadable_encrypted_message":null,"Online":null,"Chatty":null,"Away":null,"Extended_away":null,"Offline":null,"Friendship_request":null,"Confirm":null,"Dismiss":null,"Remove":null,"Online_help":null,"FN":null,"N":null,"FAMILY":null,"GIVEN":null,"NICKNAME":null,"URL":null,"ADR":null,"STREET":null,"EXTADD":null,"LOCALITY":null,"REGION":null,"PCODE":null,"CTRY":null,"TEL":null,"NUMBER":null,"EMAIL":null,"USERID":null,"ORG":null,"ORGNAME":null,"ORGUNIT":null,"TITLE":null,"ROLE":null,"BDAY":null,"DESC":null,"PHOTO":null,"send_message":null,"get_info":null,"Settings":null,"Priority":null,"Save":null,"User_settings":null,"A_fingerprint_":null,"is":null,"Login_options":null,"BOSH_url":null,"Domain":null,"Resource":null,"On_login":null,"Received_an_unencrypted_message":null,"Sorry_your_buddy_doesnt_provide_any_information":null,"Info_about":null,"Authentication_aborted":null,"Authentication_request_received":null,"Log_in_without_chat":null,"has_come_online":null,"Unknown_sender":null,"Please_allow_access_to_microphone_and_camera":null,"Incoming_call":null,"from":null,"Do_you_want_to_accept_the_call_from":null,"Reject":null,"Accept":null,"hang_up":null,"snapshot":null,"mute_my_audio":null,"pause_my_video":null,"fullscreen":null,"Info":null,"Local_IP":null,"Remote_IP":null,"Local_Fingerprint":null,"Remote_Fingerprint":null,"Video_call_not_possible":null,"Start_video_call":null,"Join_chat":null,"Join":null,"Room":null,"Nickname":null,"left_the_building":null,"entered_the_room":null,"is_now_known_as":null,"This_room_is":null,"muc_hidden":{"keyword":null,"description":null},"muc_membersonly":{"keyword":null,"description":null},"muc_moderated":{"keyword":null,"description":null},"muc_nonanonymous":{"keyword":null,"description":null},"muc_open":{"keyword":null,"description":null},"muc_passwordprotected":{"keyword":null,"description":null},"muc_persistent":{"keyword":null,"description":null},"muc_public":{"keyword":null,"description":null},"muc_semianonymous":{"keyword":null,"description":null},"muc_temporary":{"keyword":null,"description":null},"muc_unmoderated":{"keyword":null,"description":null},"muc_unsecured":{"keyword":null,"description":null},"Continue":null,"Server":null,"Rooms_are_loaded":null,"Could_load_only":null,"muc_explanation":null,"You_already_joined_this_room":null,"This_room_will_be_closed":null,"Room_not_found_":null,"Loading_room_information":null,"Destroy":null,"Leave":null,"changed_subject_to":null,"muc_removed_kicked":null,"muc_removed_info_kicked":null,"muc_removed_banned":null,"muc_removed_info_banned":null,"muc_removed_affiliation":null,"muc_removed_info_affiliation":null,"muc_removed_membersonly":null,"muc_removed_info_membersonly":null,"muc_removed_shutdown":null,"Reason":null,"message_not_send":null,"message_not_send_item-not-found":null,"message_not_send_forbidden":null,"message_not_send_not-acceptable":null,"This_room_has_been_closed":null,"Room_logging_is_enabled":null,"A_password_is_required":null,"You_are_not_on_the_member_list":null,"You_are_banned_from_this_room":null,"Your_desired_nickname_":null,"The_maximum_number_":null,"This_room_is_locked_":null,"You_are_not_allowed_to_create_":null,"Alert":null,"Call_started":null,"Call_terminated":null,"Carbon_copy":null,"Enable":null,"jingle_reason_busy":null,"jingle_reason_decline":null,"jingle_reason_success":null,"Media_failure":null,"No_local_audio_device":null,"No_local_video_device":null,"Ok":null,"PermissionDeniedError":null,"Use_local_audio_device":null,"Use_local_video_device":null,"is_":null,"You_received_a_message_from_an_unknown_sender_":null,"Your_roster_is_empty_add_":null,"onsmp_explanation_question":null,"onsmp_explanation_secret":null,"from_sender":null,"Verified_private_conversation_started":null,"Unverified_private_conversation_started":null}},"ru":{"translation":{"Logging_in":"Вход в систему...","your_connection_is_unencrypted":"Ваше соединение не зашифровано.","your_connection_is_encrypted":"Ваше соединение зашифровано.","your_buddy_closed_the_private_connection":"Ваш собеседник закончил зашифрованное соединение.","start_private":"Начать зашифрованный чат","close_private":"Закончить зашифрованный чат","your_buddy_is_verificated":"Собеседник подтвержден.","you_have_only_a_subscription_in_one_way":"У вас только односторонняя подписка.","authentication_query_sent":null,"your_message_wasnt_send_please_end_your_private_conversation":"Сообщение не отправлено. Завершите зашифрованный чат, пожалуйста.","unencrypted_message_received":"Получено незашифрованное сообщение","not_available":"Не доступен","no_connection":"Нет соединения!","relogin":"переподключиться","trying_to_start_private_conversation":"Попытка начать зашифрованный чат!","Verified":"Подтверждено","Unverified":"Не подтверждено","private_conversation_aborted":"Зашифрованный чат отклонен!","your_buddy_closed_the_private_conversation_you_should_do_the_same":"Ваш собеседник завершил зашифрованный чат! Вы должны сделать тоже самое.","conversation_is_now_verified":"Чат теперь утвержден.","authentication_failed":"Ошибка авторизации.","Creating_your_private_key_":null,"Authenticating_a_buddy_helps_":null,"How_do_you_want_to_authenticate_your_buddy":null,"Select_method":"Выберите метод...","Manual":"Вручную","Question":"Вопрос","Secret":"Пароль","To_verify_the_fingerprint_":null,"Your_fingerprint":"Ваш отпечаток","Buddy_fingerprint":"Отпечаток собеседника","Close":"Закрыть","Compared":"Сравнение завершено","To_authenticate_using_a_question_":"Для авторизации с помощью вопроса выберите вопрос, ответ на который знаете только Вы и собеседник.","Ask":null,"To_authenticate_pick_a_secret_":"Для авторизации выберите пароль, который знаете только Вы и собеседник.","Compare":"Сравнить","Fingerprints":"Отпечатки","Authentication":"Авторизация","Message":"Сообщение","Add_buddy":"Добавить контакт","rename_buddy":"переименовать контакт","delete_buddy":"удалить контакт","Login":"Вход","Username":"Логин","Password":"Пароль","Cancel":"Отмена","Connect":"Подключить","Type_in_the_full_username_":null,"Alias":"Псевдоним","Add":"Добавить","Subscription_request":"Запрос подписки","You_have_a_request_from":"Получен запрос от","Deny":"Отказ","Approve":"Подтвердить","Remove_buddy":"Удалить контакт","You_are_about_to_remove_":null,"Continue_without_chat":"Продолжить без чата","Please_wait":"Подождите…","Login_failed":"Неудачный вход в чат","Sorry_we_cant_authentikate_":null,"Retry":null,"clear_history":"Очистить историю","New_message_from":"Новое сообщение от __name__","Should_we_notify_you_":"Уведомлять о новых сообщениях в будущем?","Please_accept_":null,"Hide_offline":"Спрятать отключенных","Show_offline":"Показать отключенных","About":"О проекте","dnd":"Не беспокоить","Mute":"Выкл. уведомления","Unmute":"Вкл. уведомления","Subscription":"Подписка","both":"оба","Status":"Статус","online":"в сети","chat":"готов общаться","away":"отошел","xa":"отсутствую","offline":"не в сети","none":"нет","Unknown_instance_tag":"Неизвестный тег.","Not_one_of_our_latest_keys":null,"Received_an_unreadable_encrypted_message":null,"Online":"В сети","Chatty":"Готов общаться","Away":"Отошел","Extended_away":"Отсутствую","Offline":"Не в сети","Friendship_request":null,"Confirm":"Подтвердить","Dismiss":"Отклонить","Remove":"Удалить","Online_help":"Онлайн помощь","FN":"Полное имя","N":null,"FAMILY":"Фамилия","GIVEN":null,"NICKNAME":"Ник","URL":null,"ADR":"Адрес","STREET":"Улица","EXTADD":"Дополнительный адрес","LOCALITY":null,"REGION":null,"PCODE":"Индекс","CTRY":"Страна","TEL":"Телефон","NUMBER":"Номер","EMAIL":"Почта","USERID":null,"ORG":"Организация","ORGNAME":"Название","ORGUNIT":"Отдел","TITLE":"Должность","ROLE":"Обязанности","BDAY":"День рождения","DESC":"Описание","PHOTO":null,"send_message":"Отправить сообщение","get_info":"Показать информацию","Settings":"Настройки","Priority":"Приоритет","Save":"Сохранить","User_settings":"Пользовательские настройки","A_fingerprint_":null,"is":null,"Login_options":"Параметры входа","BOSH_url":null,"Domain":"Домен","Resource":"Ресурс","On_login":"Автоматически подключаться","Received_an_unencrypted_message":null,"Sorry_your_buddy_doesnt_provide_any_information":null,"Info_about":"Информация о","Authentication_aborted":null,"Authentication_request_received":null,"Log_in_without_chat":"Вход без чата","has_come_online":"появился в сети","Unknown_sender":"Неизвестный отправитель","Please_allow_access_to_microphone_and_camera":null,"Incoming_call":"Входящий вызов","from":"от","Do_you_want_to_accept_the_call_from":null,"Reject":null,"Accept":null,"hang_up":null,"snapshot":null,"mute_my_audio":null,"pause_my_video":null,"fullscreen":null,"Info":null,"Local_IP":null,"Remote_IP":null,"Local_Fingerprint":null,"Remote_Fingerprint":null,"Video_call_not_possible":null,"Start_video_call":null,"Join_chat":null,"Join":null,"Room":null,"Nickname":null,"left_the_building":null,"entered_the_room":null,"is_now_known_as":null,"This_room_is":null,"muc_hidden":{"keyword":null,"description":null},"muc_membersonly":{"keyword":null,"description":null},"muc_moderated":{"keyword":null,"description":null},"muc_nonanonymous":{"keyword":null,"description":null},"muc_open":{"keyword":null,"description":null},"muc_passwordprotected":{"keyword":null,"description":null},"muc_persistent":{"keyword":null,"description":null},"muc_public":{"keyword":null,"description":null},"muc_semianonymous":{"keyword":null,"description":null},"muc_temporary":{"keyword":null,"description":null},"muc_unmoderated":{"keyword":null,"description":null},"muc_unsecured":{"keyword":null,"description":null},"Continue":null,"Server":null,"Rooms_are_loaded":null,"Could_load_only":null,"muc_explanation":null,"You_already_joined_this_room":null,"This_room_will_be_closed":null,"Room_not_found_":null,"Loading_room_information":null,"Destroy":null,"Leave":null,"changed_subject_to":null,"muc_removed_kicked":null,"muc_removed_info_kicked":null,"muc_removed_banned":null,"muc_removed_info_banned":null,"muc_removed_affiliation":null,"muc_removed_info_affiliation":null,"muc_removed_membersonly":null,"muc_removed_info_membersonly":null,"muc_removed_shutdown":null,"Reason":null,"message_not_send":null,"message_not_send_item-not-found":null,"message_not_send_forbidden":null,"message_not_send_not-acceptable":null,"This_room_has_been_closed":null,"Room_logging_is_enabled":null,"A_password_is_required":null,"You_are_not_on_the_member_list":null,"You_are_banned_from_this_room":null,"Your_desired_nickname_":null,"The_maximum_number_":null,"This_room_is_locked_":null,"You_are_not_allowed_to_create_":null,"Alert":null,"Call_started":null,"Call_terminated":null,"Carbon_copy":null,"Enable":"Включить","jingle_reason_busy":null,"jingle_reason_decline":null,"jingle_reason_success":null,"Media_failure":null,"No_local_audio_device":null,"No_local_video_device":null,"Ok":null,"PermissionDeniedError":null,"Use_local_audio_device":null,"Use_local_video_device":null,"is_":null,"You_received_a_message_from_an_unknown_sender_":"Вы получили сообщение от неизвестного отправителя (__sender__)","Your_roster_is_empty_add_":"Ваш список контактов пуст, добавить <a>новый контакт</a>","onsmp_explanation_question":"Собеседник пытается определить, что общается действительно с Вами.","onsmp_explanation_secret":"Собеседник пытается определить, что общается действительно с Вами. введите пароль.","from_sender":"от __sender__","Verified_private_conversation_started":"Подтверждено Зашифрованный чат начат.","Unverified_private_conversation_started":"Не подтверждено Зашифрованный чат начат."}}};
+
+/*!
+ * Source: lib/favico.js/favico.js, license: MIT, url: https://github.com/ejci/favico.js
+ */
+/**
+ * @license MIT
+ * @fileOverview Favico animations
+ * @author Miroslav Magda, http://blog.ejci.net
+ * @version 0.3.6
+ */
+
+/**
+ * Create new favico instance
+ * @param {Object} Options
+ * @return {Object} Favico object
+ * @example
+ * var favico = new Favico({
+ * bgColor : '#d00',
+ * textColor : '#fff',
+ * fontFamily : 'sans-serif',
+ * fontStyle : 'bold',
+ * position : 'down',
+ * type : 'circle',
+ * animation : 'slide',
+ * dataUrl: function(url){}
+ * });
+ */
+(function() {
+
+ var Favico = (function(opt) {
+ 'use strict';
+ opt = (opt) ? opt : {};
+ var _def = {
+ bgColor : '#d00',
+ textColor : '#fff',
+ fontFamily : 'sans-serif', //Arial,Verdana,Times New Roman,serif,sans-serif,...
+ fontStyle : 'bold', //normal,italic,oblique,bold,bolder,lighter,100,200,300,400,500,600,700,800,900
+ type : 'circle',
+ position : 'down', // down, up, left, leftup (upleft)
+ animation : 'slide',
+ elementId : false,
+ dataUrl : false
+ };
+ var _opt, _orig, _h, _w, _canvas, _context, _img, _ready, _lastBadge, _running, _readyCb, _stop, _browser, _animTimeout, _drawTimeout;
+
+ _browser = {};
+ _browser.ff = typeof InstallTrigger != 'undefined';
+ _browser.chrome = !!window.chrome;
+ _browser.opera = !!window.opera || navigator.userAgent.indexOf('Opera') >= 0;
+ _browser.ie = /*@cc_on!@*/false;
+ _browser.safari = Object.prototype.toString.call(window.HTMLElement).indexOf('Constructor') > 0;
+ _browser.supported = (_browser.chrome || _browser.ff || _browser.opera);
+
+ var _queue = [];
+ _readyCb = function() {
+ };
+ _ready = _stop = false;
+ /**
+ * Initialize favico
+ */
+ var init = function() {
+ //merge initial options
+ _opt = merge(_def, opt);
+ _opt.bgColor = hexToRgb(_opt.bgColor);
+ _opt.textColor = hexToRgb(_opt.textColor);
+ _opt.position = _opt.position.toLowerCase();
+ _opt.animation = (animation.types['' + _opt.animation]) ? _opt.animation : _def.animation;
+
+ var isUp = _opt.position.indexOf('up') > -1;
+ var isLeft = _opt.position.indexOf('left') > -1;
+
+ //transform animation
+ if (isUp || isLeft) {
+ for (var i = 0; i < animation.types['' + _opt.animation].length; i++) {
+ var step = animation.types['' + _opt.animation][i];
+
+ if (isUp) {
+ if (step.y < 0.6) {
+ step.y = step.y - 0.4;
+ } else {
+ step.y = step.y - 2 * step.y + (1 - step.w);
+ }
+ }
+
+ if (isLeft) {
+ if (step.x < 0.6) {
+ step.x = step.x - 0.4;
+ } else {
+ step.x = step.x - 2 * step.x + (1 - step.h);
+ }
+ }
+
+ animation.types['' + _opt.animation][i] = step;
+ }
+ }
+ _opt.type = (type['' + _opt.type]) ? _opt.type : _def.type;
+
+ _orig = link.getIcon();
+ //create temp canvas
+ _canvas = document.createElement('canvas');
+ //create temp image
+ _img = document.createElement('img');
+ if (_orig.hasAttribute('href')) {
+ _img.setAttribute('src', _orig.getAttribute('href'));
+ //get width/height
+ _img.onload = function() {
+ _h = (_img.height > 0) ? _img.height : 32;
+ _w = (_img.width > 0) ? _img.width : 32;
+ _canvas.height = _h;
+ _canvas.width = _w;
+ _context = _canvas.getContext('2d');
+ icon.ready();
+ };
+ } else {
+ _img.setAttribute('src', '');
+ _h = 32;
+ _w = 32;
+ _img.height = _h;
+ _img.width = _w;
+ _canvas.height = _h;
+ _canvas.width = _w;
+ _context = _canvas.getContext('2d');
+ icon.ready();
+ }
+
+ };
+ /**
+ * Icon namespace
+ */
+ var icon = {};
+ /**
+ * Icon is ready (reset icon) and start animation (if ther is any)
+ */
+ icon.ready = function() {
+ _ready = true;
+ icon.reset();
+ _readyCb();
+ };
+ /**
+ * Reset icon to default state
+ */
+ icon.reset = function() {
+ //reset
+ if (!_ready) {
+ return;
+ }
+ _queue = [];
+ _lastBadge = false;
+ _running = false;
+ _context.clearRect(0, 0, _w, _h);
+ _context.drawImage(_img, 0, 0, _w, _h);
+ //_stop=true;
+ link.setIcon(_canvas);
+ //webcam('stop');
+ //video('stop');
+ window.clearTimeout(_animTimeout);
+ window.clearTimeout(_drawTimeout);
+ };
+ /**
+ * Start animation
+ */
+ icon.start = function() {
+ if (!_ready || _running) {
+ return;
+ }
+ var finished = function() {
+ _lastBadge = _queue[0];
+ _running = false;
+ if (_queue.length > 0) {
+ _queue.shift();
+ icon.start();
+ } else {
+
+ }
+ };
+ if (_queue.length > 0) {
+ _running = true;
+ var run = function() {
+ // apply options for this animation
+ ['type', 'animation', 'bgColor', 'textColor', 'fontFamily', 'fontStyle'].forEach(function(a) {
+ if ( a in _queue[0].options) {
+ _opt[a] = _queue[0].options[a];
+ }
+ });
+ animation.run(_queue[0].options, function() {
+ finished();
+ }, false);
+ };
+ if (_lastBadge) {
+ animation.run(_lastBadge.options, function() {
+ run();
+ }, true);
+ } else {
+ run();
+ }
+ }
+ };
+
+ /**
+ * Badge types
+ */
+ var type = {};
+ var options = function(opt) {
+ opt.n = (( typeof opt.n) === 'number') ? Math.abs(opt.n | 0) : opt.n;
+ opt.x = _w * opt.x;
+ opt.y = _h * opt.y;
+ opt.w = _w * opt.w;
+ opt.h = _h * opt.h;
+ opt.len = ("" + opt.n).length;
+ return opt;
+ };
+ /**
+ * Generate circle
+ * @param {Object} opt Badge options
+ */
+ type.circle = function(opt) {
+ opt = options(opt);
+ var more = false;
+ if (opt.len === 2) {
+ opt.x = opt.x - opt.w * 0.4;
+ opt.w = opt.w * 1.4;
+ more = true;
+ } else if (opt.len >= 3) {
+ opt.x = opt.x - opt.w * 0.65;
+ opt.w = opt.w * 1.65;
+ more = true;
+ }
+ _context.clearRect(0, 0, _w, _h);
+ _context.drawImage(_img, 0, 0, _w, _h);
+ _context.beginPath();
+ _context.font = _opt.fontStyle + " " + Math.floor(opt.h * (opt.n > 99 ? 0.85 : 1)) + "px " + _opt.fontFamily;
+ _context.textAlign = 'center';
+ if (more) {
+ _context.moveTo(opt.x + opt.w / 2, opt.y);
+ _context.lineTo(opt.x + opt.w - opt.h / 2, opt.y);
+ _context.quadraticCurveTo(opt.x + opt.w, opt.y, opt.x + opt.w, opt.y + opt.h / 2);
+ _context.lineTo(opt.x + opt.w, opt.y + opt.h - opt.h / 2);
+ _context.quadraticCurveTo(opt.x + opt.w, opt.y + opt.h, opt.x + opt.w - opt.h / 2, opt.y + opt.h);
+ _context.lineTo(opt.x + opt.h / 2, opt.y + opt.h);
+ _context.quadraticCurveTo(opt.x, opt.y + opt.h, opt.x, opt.y + opt.h - opt.h / 2);
+ _context.lineTo(opt.x, opt.y + opt.h / 2);
+ _context.quadraticCurveTo(opt.x, opt.y, opt.x + opt.h / 2, opt.y);
+ } else {
+ _context.arc(opt.x + opt.w / 2, opt.y + opt.h / 2, opt.h / 2, 0, 2 * Math.PI);
+ }
+ _context.fillStyle = 'rgba(' + _opt.bgColor.r + ',' + _opt.bgColor.g + ',' + _opt.bgColor.b + ',' + opt.o + ')';
+ _context.fill();
+ _context.closePath();
+ _context.beginPath();
+ _context.stroke();
+ _context.fillStyle = 'rgba(' + _opt.textColor.r + ',' + _opt.textColor.g + ',' + _opt.textColor.b + ',' + opt.o + ')';
+ //_context.fillText((more) ? '9+' : opt.n, Math.floor(opt.x + opt.w / 2), Math.floor(opt.y + opt.h - opt.h * 0.15));
+ if (( typeof opt.n) === 'number' && opt.n > 999) {
+ _context.fillText(((opt.n > 9999) ? 9 : Math.floor(opt.n / 1000) ) + 'k+', Math.floor(opt.x + opt.w / 2), Math.floor(opt.y + opt.h - opt.h * 0.2));
+ } else {
+ _context.fillText(opt.n, Math.floor(opt.x + opt.w / 2), Math.floor(opt.y + opt.h - opt.h * 0.15));
+ }
+ _context.closePath();
+ };
+ /**
+ * Generate rectangle
+ * @param {Object} opt Badge options
+ */
+ type.rectangle = function(opt) {
+ opt = options(opt);
+ var more = false;
+ if (opt.len === 2) {
+ opt.x = opt.x - opt.w * 0.4;
+ opt.w = opt.w * 1.4;
+ more = true;
+ } else if (opt.len >= 3) {
+ opt.x = opt.x - opt.w * 0.65;
+ opt.w = opt.w * 1.65;
+ more = true;
+ }
+ _context.clearRect(0, 0, _w, _h);
+ _context.drawImage(_img, 0, 0, _w, _h);
+ _context.beginPath();
+ _context.font = _opt.fontStyle + " " + Math.floor(opt.h * (opt.n > 99 ? 0.9 : 1)) + "px " + _opt.fontFamily;
+ _context.textAlign = 'center';
+ _context.fillStyle = 'rgba(' + _opt.bgColor.r + ',' + _opt.bgColor.g + ',' + _opt.bgColor.b + ',' + opt.o + ')';
+ _context.fillRect(opt.x, opt.y, opt.w, opt.h);
+ _context.fillStyle = 'rgba(' + _opt.textColor.r + ',' + _opt.textColor.g + ',' + _opt.textColor.b + ',' + opt.o + ')';
+ //_context.fillText((more) ? '9+' : opt.n, Math.floor(opt.x + opt.w / 2), Math.floor(opt.y + opt.h - opt.h * 0.15));
+ if (( typeof opt.n) === 'number' && opt.n > 999) {
+ _context.fillText(((opt.n > 9999) ? 9 : Math.floor(opt.n / 1000) ) + 'k+', Math.floor(opt.x + opt.w / 2), Math.floor(opt.y + opt.h - opt.h * 0.2));
+ } else {
+ _context.fillText(opt.n, Math.floor(opt.x + opt.w / 2), Math.floor(opt.y + opt.h - opt.h * 0.15));
+ }
+ _context.closePath();
+ };
+
+ /**
+ * Set badge
+ */
+ var badge = function(number, opts) {
+ opts = (( typeof opts) === 'string' ? {
+ animation : opts
+ } : opts) || {};
+ _readyCb = function() {
+ try {
+ if ( typeof (number) === 'number' ? (number > 0) : (number !== '')) {
+ var q = {
+ type : 'badge',
+ options : {
+ n : number
+ }
+ };
+ if ('animation' in opts && animation.types['' + opts.animation]) {
+ q.options.animation = '' + opts.animation;
+ }
+ if ('type' in opts && type['' + opts.type]) {
+ q.options.type = '' + opts.type;
+ }
+ ['bgColor', 'textColor'].forEach(function(o) {
+ if ( o in opts) {
+ q.options[o] = hexToRgb(opts[o]);
+ }
+ });
+ ['fontStyle', 'fontFamily'].forEach(function(o) {
+ if ( o in opts) {
+ q.options[o] = opts[o];
+ }
+ });
+ _queue.push(q);
+ if (_queue.length > 100) {
+ throw 'Too many badges requests in queue.';
+ }
+ icon.start();
+ } else {
+ icon.reset();
+ }
+ } catch(e) {
+ throw 'Error setting badge. Message: ' + e.message;
+ }
+ };
+ if (_ready) {
+ _readyCb();
+ }
+ };
+
+ /**
+ * Set image as icon
+ */
+ var image = function(imageElement) {
+ _readyCb = function() {
+ try {
+ var w = imageElement.width;
+ var h = imageElement.height;
+ var newImg = document.createElement('img');
+ var ratio = (w / _w < h / _h) ? (w / _w) : (h / _h);
+ newImg.setAttribute('src', imageElement.getAttribute('src'));
+ newImg.height = (h / ratio);
+ newImg.width = (w / ratio);
+ _context.clearRect(0, 0, _w, _h);
+ _context.drawImage(newImg, 0, 0, _w, _h);
+ link.setIcon(_canvas);
+ } catch(e) {
+ throw 'Error setting image. Message: ' + e.message;
+ }
+ };
+ if (_ready) {
+ _readyCb();
+ }
+ };
+ /**
+ * Set video as icon
+ */
+ var video = function(videoElement) {
+ _readyCb = function() {
+ try {
+ if (videoElement === 'stop') {
+ _stop = true;
+ icon.reset();
+ _stop = false;
+ return;
+ }
+ //var w = videoElement.width;
+ //var h = videoElement.height;
+ //var ratio = (w / _w < h / _h) ? (w / _w) : (h / _h);
+ videoElement.addEventListener('play', function() {
+ drawVideo(this);
+ }, false);
+
+ } catch(e) {
+ throw 'Error setting video. Message: ' + e.message;
+ }
+ };
+ if (_ready) {
+ _readyCb();
+ }
+ };
+ /**
+ * Set video as icon
+ */
+ var webcam = function(action) {
+ //UR
+ if (!window.URL || !window.URL.createObjectURL) {
+ window.URL = window.URL || {};
+ window.URL.createObjectURL = function(obj) {
+ return obj;
+ };
+ }
+ if (_browser.supported) {
+ var newVideo = false;
+ navigator.getUserMedia = navigator.getUserMedia || navigator.oGetUserMedia || navigator.msGetUserMedia || navigator.mozGetUserMedia || navigator.webkitGetUserMedia;
+ _readyCb = function() {
+ try {
+ if (action === 'stop') {
+ _stop = true;
+ icon.reset();
+ _stop = false;
+ return;
+ }
+ newVideo = document.createElement('video');
+ newVideo.width = _w;
+ newVideo.height = _h;
+ navigator.getUserMedia({
+ video : true,
+ audio : false
+ }, function(stream) {
+ newVideo.src = URL.createObjectURL(stream);
+ newVideo.play();
+ drawVideo(newVideo);
+ }, function() {
+ });
+ } catch(e) {
+ throw 'Error setting webcam. Message: ' + e.message;
+ }
+ };
+ if (_ready) {
+ _readyCb();
+ }
+ }
+
+ };
+
+ /**
+ * Draw video to context and repeat :)
+ */
+ function drawVideo(video) {
+ if (video.paused || video.ended || _stop) {
+ return false;
+ }
+ //nasty hack for FF webcam (Thanks to Julian Ćwirko, kontakt@redsunmedia.pl)
+ try {
+ _context.clearRect(0, 0, _w, _h);
+ _context.drawImage(video, 0, 0, _w, _h);
+ } catch(e) {
+
+ }
+ _drawTimeout = setTimeout(drawVideo, animation.duration, video);
+ link.setIcon(_canvas);
+ }
+
+ var link = {};
+ /**
+ * Get icon from HEAD tag or create a new <link> element
+ */
+ link.getIcon = function() {
+ var elm = false;
+ //get link element
+ var getLink = function() {
+ var link = document.getElementsByTagName('head')[0].getElementsByTagName('link');
+ for (var l = link.length, i = (l - 1); i >= 0; i--) {
+ if ((/(^|\s)icon(\s|$)/i).test(link[i].getAttribute('rel'))) {
+ return link[i];
+ }
+ }
+ return false;
+ };
+ if (_opt.element) {
+ elm = _opt.element;
+ } else if (_opt.elementId) {
+ //if img element identified by elementId
+ elm = document.getElementById(_opt.elementId);
+ elm.setAttribute('href', elm.getAttribute('src'));
+ } else {
+ //if link element
+ elm = getLink();
+ if (elm === false) {
+ elm = document.createElement('link');
+ elm.setAttribute('rel', 'icon');
+ document.getElementsByTagName('head')[0].appendChild(elm);
+ }
+ }
+ elm.setAttribute('type', 'image/png');
+ return elm;
+ };
+ link.setIcon = function(canvas) {
+ var url = canvas.toDataURL('image/png');
+ if (_opt.dataUrl) {
+ //if using custom exporter
+ _opt.dataUrl(url);
+ }
+ if (_opt.element) {
+ _opt.element.setAttribute('src', url);
+ } else if (_opt.elementId) {
+ //if is attached to element (image)
+ document.getElementById(_opt.elementId).setAttribute('src', url);
+ } else {
+ //if is attached to fav icon
+ if (_browser.ff || _browser.opera) {
+ //for FF we need to "recreate" element, atach to dom and remove old <link>
+ //var originalType = _orig.getAttribute('rel');
+ var old = _orig;
+ _orig = document.createElement('link');
+ //_orig.setAttribute('rel', originalType);
+ if (_browser.opera) {
+ _orig.setAttribute('rel', 'icon');
+ }
+ _orig.setAttribute('rel', 'icon');
+ _orig.setAttribute('type', 'image/png');
+ document.getElementsByTagName('head')[0].appendChild(_orig);
+ _orig.setAttribute('href', url);
+ if (old.parentNode) {
+ old.parentNode.removeChild(old);
+ }
+ } else {
+ _orig.setAttribute('href', url);
+ }
+ }
+ };
+
+ //http://stackoverflow.com/questions/5623838/rgb-to-hex-and-hex-to-rgb#answer-5624139
+ //HEX to RGB convertor
+ function hexToRgb(hex) {
+ var shorthandRegex = /^#?([a-f\d])([a-f\d])([a-f\d])$/i;
+ hex = hex.replace(shorthandRegex, function(m, r, g, b) {
+ return r + r + g + g + b + b;
+ });
+ var result = /^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(hex);
+ return result ? {
+ r : parseInt(result[1], 16),
+ g : parseInt(result[2], 16),
+ b : parseInt(result[3], 16)
+ } : false;
+ }
+
+ /**
+ * Merge options
+ */
+ function merge(def, opt) {
+ var mergedOpt = {};
+ var attrname;
+ for (attrname in def) {
+ mergedOpt[attrname] = def[attrname];
+ }
+ for (attrname in opt) {
+ mergedOpt[attrname] = opt[attrname];
+ }
+ return mergedOpt;
+ }
+
+ /**
+ * Cross-browser page visibility shim
+ * http://stackoverflow.com/questions/12536562/detect-whether-a-window-is-visible
+ */
+ function isPageHidden() {
+ return document.hidden || document.msHidden || document.webkitHidden || document.mozHidden;
+ }
+
+ /**
+ * @namespace animation
+ */
+ var animation = {};
+ /**
+ * Animation "frame" duration
+ */
+ animation.duration = 40;
+ /**
+ * Animation types (none,fade,pop,slide)
+ */
+ animation.types = {};
+ animation.types.fade = [{
+ x : 0.4,
+ y : 0.4,
+ w : 0.6,
+ h : 0.6,
+ o : 0.0
+ }, {
+ x : 0.4,
+ y : 0.4,
+ w : 0.6,
+ h : 0.6,
+ o : 0.1
+ }, {
+ x : 0.4,
+ y : 0.4,
+ w : 0.6,
+ h : 0.6,
+ o : 0.2
+ }, {
+ x : 0.4,
+ y : 0.4,
+ w : 0.6,
+ h : 0.6,
+ o : 0.3
+ }, {
+ x : 0.4,
+ y : 0.4,
+ w : 0.6,
+ h : 0.6,
+ o : 0.4
+ }, {
+ x : 0.4,
+ y : 0.4,
+ w : 0.6,
+ h : 0.6,
+ o : 0.5
+ }, {
+ x : 0.4,
+ y : 0.4,
+ w : 0.6,
+ h : 0.6,
+ o : 0.6
+ }, {
+ x : 0.4,
+ y : 0.4,
+ w : 0.6,
+ h : 0.6,
+ o : 0.7
+ }, {
+ x : 0.4,
+ y : 0.4,
+ w : 0.6,
+ h : 0.6,
+ o : 0.8
+ }, {
+ x : 0.4,
+ y : 0.4,
+ w : 0.6,
+ h : 0.6,
+ o : 0.9
+ }, {
+ x : 0.4,
+ y : 0.4,
+ w : 0.6,
+ h : 0.6,
+ o : 1.0
+ }];
+ animation.types.none = [{
+ x : 0.4,
+ y : 0.4,
+ w : 0.6,
+ h : 0.6,
+ o : 1
+ }];
+ animation.types.pop = [{
+ x : 1,
+ y : 1,
+ w : 0,
+ h : 0,
+ o : 1
+ }, {
+ x : 0.9,
+ y : 0.9,
+ w : 0.1,
+ h : 0.1,
+ o : 1
+ }, {
+ x : 0.8,
+ y : 0.8,
+ w : 0.2,
+ h : 0.2,
+ o : 1
+ }, {
+ x : 0.7,
+ y : 0.7,
+ w : 0.3,
+ h : 0.3,
+ o : 1
+ }, {
+ x : 0.6,
+ y : 0.6,
+ w : 0.4,
+ h : 0.4,
+ o : 1
+ }, {
+ x : 0.5,
+ y : 0.5,
+ w : 0.5,
+ h : 0.5,
+ o : 1
+ }, {
+ x : 0.4,
+ y : 0.4,
+ w : 0.6,
+ h : 0.6,
+ o : 1
+ }];
+ animation.types.popFade = [{
+ x : 0.75,
+ y : 0.75,
+ w : 0,
+ h : 0,
+ o : 0
+ }, {
+ x : 0.65,
+ y : 0.65,
+ w : 0.1,
+ h : 0.1,
+ o : 0.2
+ }, {
+ x : 0.6,
+ y : 0.6,
+ w : 0.2,
+ h : 0.2,
+ o : 0.4
+ }, {
+ x : 0.55,
+ y : 0.55,
+ w : 0.3,
+ h : 0.3,
+ o : 0.6
+ }, {
+ x : 0.50,
+ y : 0.50,
+ w : 0.4,
+ h : 0.4,
+ o : 0.8
+ }, {
+ x : 0.45,
+ y : 0.45,
+ w : 0.5,
+ h : 0.5,
+ o : 0.9
+ }, {
+ x : 0.4,
+ y : 0.4,
+ w : 0.6,
+ h : 0.6,
+ o : 1
+ }];
+ animation.types.slide = [{
+ x : 0.4,
+ y : 1,
+ w : 0.6,
+ h : 0.6,
+ o : 1
+ }, {
+ x : 0.4,
+ y : 0.9,
+ w : 0.6,
+ h : 0.6,
+ o : 1
+ }, {
+ x : 0.4,
+ y : 0.9,
+ w : 0.6,
+ h : 0.6,
+ o : 1
+ }, {
+ x : 0.4,
+ y : 0.8,
+ w : 0.6,
+ h : 0.6,
+ o : 1
+ }, {
+ x : 0.4,
+ y : 0.7,
+ w : 0.6,
+ h : 0.6,
+ o : 1
+ }, {
+ x : 0.4,
+ y : 0.6,
+ w : 0.6,
+ h : 0.6,
+ o : 1
+ }, {
+ x : 0.4,
+ y : 0.5,
+ w : 0.6,
+ h : 0.6,
+ o : 1
+ }, {
+ x : 0.4,
+ y : 0.4,
+ w : 0.6,
+ h : 0.6,
+ o : 1
+ }];
+ /**
+ * Run animation
+ * @param {Object} opt Animation options
+ * @param {Object} cb Callabak after all steps are done
+ * @param {Object} revert Reverse order? true|false
+ * @param {Object} step Optional step number (frame bumber)
+ */
+ animation.run = function(opt, cb, revert, step) {
+ var animationType = animation.types[isPageHidden() ? 'none' : _opt.animation];
+ if (revert === true) {
+ step = ( typeof step !== 'undefined') ? step : animationType.length - 1;
+ } else {
+ step = ( typeof step !== 'undefined') ? step : 0;
+ }
+ cb = (cb) ? cb : function() {
+ };
+ if ((step < animationType.length) && (step >= 0)) {
+ type[_opt.type](merge(opt, animationType[step]));
+ _animTimeout = setTimeout(function() {
+ if (revert) {
+ step = step - 1;
+ } else {
+ step = step + 1;
+ }
+ animation.run(opt, cb, revert, step);
+ }, animation.duration);
+
+ link.setIcon(_canvas);
+ } else {
+ cb();
+ return;
+ }
+ };
+ //auto init
+ init();
+ return {
+ badge : badge,
+ video : video,
+ image : image,
+ webcam : webcam,
+ reset : icon.reset,
+ browser : {
+ supported : _browser.supported
+ }
+ };
+ });
+
+ // AMD / RequireJS
+ if ( typeof define !== 'undefined' && define.amd) {
+ define([], function() {
+ return Favico;
+ });
+ }
+ // CommonJS
+ else if ( typeof module !== 'undefined' && module.exports) {
+ module.exports = Favico;
+ }
+ // included directly via <script> tag
+ else {
+ this.Favico = Favico;
+ }
+
+})();
+
diff --git a/build/js/jsxc/lib/jsxc.dep.min.js b/build/js/jsxc/lib/jsxc.dep.min.js
index fca0008..ab4ad2b 100644
--- a/build/js/jsxc/lib/jsxc.dep.min.js
+++ b/build/js/jsxc/lib/jsxc.dep.min.js
@@ -1,5 +1,5 @@
/*!
- * jsxc v2.0.1 - 2015-05-23
+ * jsxc v2.1.0-beta1 - 2015-07-21
*
* This file concatenates all dependencies of jsxc.
*
@@ -29,7 +29,7 @@ Function.prototype.bind||(Function.prototype.bind=function(obj){var func=this,_s
}.bind(this),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]}),Strophe.Request=function(elem,func,rid,sends){this.id=++Strophe._requestId,this.xmlData=elem,this.data=Strophe.serialize(elem),this.origFunc=func,this.func=func,this.rid=rid,this.date=0/0,this.sends=sends||0,this.abort=!1,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={getResponse:function(){var node=null;if(this.xhr.responseXML&&this.xhr.responseXML.documentElement){if(node=this.xhr.responseXML.documentElement,"parsererror"==node.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 node},_newXHR:function(){var xhr=null;return window.XMLHttpRequest?(xhr=new XMLHttpRequest,xhr.overrideMimeType&&xhr.overrideMimeType("text/xml")):window.ActiveXObject&&(xhr=new ActiveXObject("Microsoft.XMLHTTP")),xhr.onreadystatechange=this.func.bind(null,this),xhr}},Strophe.Bosh=function(connection){this._conn=connection,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 bodyWrap=$build("body",{rid:this.rid++,xmlns:Strophe.NS.HTTPBIND});return null!==this.sid&&bodyWrap.attrs({sid:this.sid}),bodyWrap},_reset:function(){this.rid=Math.floor(4294967295*Math.random()),this.sid=null,jQuery(document).trigger("ridChange",{rid:this.rid})},_connect:function(wait,hold,route){this.wait=wait||this.wait,this.hold=hold||this.hold;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});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()},_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=!0,this._conn.connected=!0,this.wait=wait||this.wait,this.hold=hold||this.hold,this.window=wind||this.window,this._conn._changeConnectStatus(Strophe.Status.ATTACHED,null)},_connect_cb:function(bodyWrap){var cond,conflict,typ=bodyWrap.getAttribute("type");if(null!==typ&&"terminate"==typ)return Strophe.error("BOSH-Connection failed: "+cond),cond=bodyWrap.getAttribute("condition"),conflict=bodyWrap.getElementsByTagName("conflict"),null!==cond?("remote-stream-error"==cond&&conflict.length>0&&(cond="conflict"),this._conn._changeConnectStatus(Strophe.Status.CONNFAIL,cond)):this._conn._changeConnectStatus(Strophe.Status.CONNFAIL,"unknown"),this._conn._doDisconnect(),Strophe.Status.CONNFAIL;this.sid||(this.sid=bodyWrap.getAttribute("sid"));var wind=bodyWrap.getAttribute("requests");wind&&(this.window=parseInt(wind,10));var hold=bodyWrap.getAttribute("hold");hold&&(this.hold=parseInt(hold,10));var wait=bodyWrap.getAttribute("wait");wait&&(this.wait=parseInt(wait,10))},_disconnect:function(pres){this._sendTerminate(pres)},_doDisconnect:function(){this.sid=null,this.rid=Math.floor(4294967295*Math.random()),jQuery(document).trigger("ridChange",{rid:this.rid})},_emptyQueue:function(){return 0===this._requests.length},_hitError:function(reqStatus){this.errors++,Strophe.warn("request errored, status: "+reqStatus+", number of errors: "+this.errors),this.errors>4&&this._onDisconnectTimeout()},_no_auth_received:function(_callback){_callback=_callback?_callback.bind(this._conn):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()},_onDisconnectTimeout:function(){for(var req;this._requests.length>0;)req=this._requests.pop(),req.abort=!0,req.xhr.abort(),req.xhr.onreadystatechange=function(){}},_onIdle:function(){var data=this._conn._data;if(this._conn.authenticated&&0===this._requests.length&&0===data.length&&!this._conn.disconnecting&&(Strophe.info("no requests during idle cycle, sending blank request"),data.push(null)),this._requests.length<2&&data.length>0&&!this._conn.paused){for(var body=this._buildBody(),i=0;i<data.length;i++)null!==data[i]&&("restart"===data[i]?body.attrs({to:this._conn.domain,"xml:lang":"en","xmpp:restart":"true","xmlns:xmpp":Strophe.NS.BOSH}):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();null!==this._requests[0].dead&&this._requests[0].timeDead()>Math.floor(Strophe.SECONDARY_TIMEOUT*this.wait)&&this._throttledRequestHandler(),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())}},_onRequestStateChange:function(func,req){if(Strophe.debug("request id "+req.id+"."+req.sends+" state changed to "+req.xhr.readyState),req.abort)return void(req.abort=!1);2==req.xhr.readyState&&jQuery(document).trigger("ridChange",{rid:Number(req.rid)+1});var reqStatus;if(4==req.xhr.readyState){reqStatus=0;try{reqStatus=req.xhr.status}catch(e){}if("undefined"==typeof reqStatus&&(reqStatus=0),this.disconnecting&&reqStatus>=400)return void this._hitError(reqStatus);var reqIs0=this._requests[0]==req,reqIs1=this._requests[1]==req;(reqStatus>0&&500>reqStatus||req.sends>5)&&(this._removeRequest(req),Strophe.debug("request id "+req.id+" should now be removed")),200==reqStatus?((reqIs1||reqIs0&&this._requests.length>0&&this._requests[0].age()>Math.floor(Strophe.SECONDARY_TIMEOUT*this.wait))&&this._restartRequest(0),Strophe.debug("request id "+req.id+"."+req.sends+" got 200"),func(req),this.errors=0):(Strophe.error("request id "+req.id+"."+req.sends+" error "+reqStatus+" happened"),(0===reqStatus||reqStatus>=400&&600>reqStatus||reqStatus>=12e3)&&(this._hitError(reqStatus),reqStatus>=400&&500>reqStatus&&(this._conn._changeConnectStatus(Strophe.Status.DISCONNECTING,null),this._conn._doDisconnect()))),reqStatus>0&&500>reqStatus||req.sends>5||this._throttledRequestHandler()}},_processRequest:function(i){var self=this,req=this._requests[i],reqStatus=-1;try{4==req.xhr.readyState&&(reqStatus=req.xhr.status)}catch(e){Strophe.error("caught an error in _requests["+i+"], reqStatus: "+reqStatus)}if("undefined"==typeof reqStatus&&(reqStatus=-1),req.sends>this.maxRetries)return void this._onDisconnectTimeout();var time_elapsed=req.age(),primaryTimeout=!isNaN(time_elapsed)&&time_elapsed>Math.floor(Strophe.TIMEOUT*this.wait),secondaryTimeout=null!==req.dead&&req.timeDead()>Math.floor(Strophe.SECONDARY_TIMEOUT*this.wait),requestCompletedWithServerError=4==req.xhr.readyState&&(1>reqStatus||reqStatus>=500);if((primaryTimeout||secondaryTimeout||requestCompletedWithServerError)&&(secondaryTimeout&&Strophe.error("Request "+this._requests[i].id+" timed out (secondary), restarting"),req.abort=!0,req.xhr.abort(),req.xhr.onreadystatechange=function(){},this._requests[i]=new Strophe.Request(req.xmlData,req.origFunc,req.rid,req.sends),req=this._requests[i]),0===req.xhr.readyState){Strophe.debug("request id "+req.id+"."+req.sends+" posting");try{req.xhr.open("POST",this._conn.service,this._conn.options.sync?!1:!0)}catch(e2){return Strophe.error("XHR open failed."),this._conn.connected||this._conn._changeConnectStatus(Strophe.Status.CONNFAIL,"bad-service"),void this._conn.disconnect()}var sendFunc=function(){if(req.date=new Date,self._conn.options.customHeaders){var headers=self._conn.options.customHeaders;for(var header in headers)headers.hasOwnProperty(header)&&req.xhr.setRequestHeader(header,headers[header])}req.xhr.send(req.data)};if(req.sends>1){var backoff=1e3*Math.min(Math.floor(Strophe.TIMEOUT*this.wait),Math.pow(req.sends,3));setTimeout(sendFunc,backoff)}else sendFunc();req.sends++,this._conn.xmlOutput!==Strophe.Connection.prototype.xmlOutput&&this._conn.xmlOutput(req.xmlData.nodeName===this.strip&&req.xmlData.childNodes.length?req.xmlData.childNodes[0]:req.xmlData),this._conn.rawOutput!==Strophe.Connection.prototype.rawOutput&&this._conn.rawOutput(req.data)}else Strophe.debug("_processRequest: "+(0===i?"first":"second")+" request has readyState of "+req.xhr.readyState)},_removeRequest:function(req){Strophe.debug("removing request");var i;for(i=this._requests.length-1;i>=0;i--)req==this._requests[i]&&this._requests.splice(i,1);req.xhr.onreadystatechange=function(){},this._throttledRequestHandler()},_restartRequest:function(i){var req=this._requests[i];null===req.dead&&(req.dead=new Date),this._processRequest(i)},_reqToData:function(req){try{return req.getResponse()}catch(e){if("parsererror"!=e)throw e;this._conn.disconnect("strophe-parsererror")}},_sendTerminate:function(pres){Strophe.info("_sendTerminate was called");var body=this._buildBody().attrs({type:"terminate"});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()},_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(){Strophe.debug(this._requests?"_throttledRequestHandler called with "+this._requests.length+" requests":"_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)<this.window&&this._processRequest(1))}},Strophe.Websocket=function(connection){this._conn=connection,this.strip="stream:stream";var service=connection.service;if(0!==service.indexOf("ws:")&&0!==service.indexOf("wss:")){var new_service="";new_service+="ws"===connection.options.protocol&&"https:"!==window.location.protocol?"ws":"wss",new_service+="://"+window.location.host,new_service+=0!==service.indexOf("/")?window.location.pathname+service:service,connection.service=new_service}},Strophe.Websocket.prototype={_buildStream:function(){return $build("stream:stream",{to:this._conn.domain,xmlns:Strophe.NS.CLIENT,"xmlns:stream":Strophe.NS.STREAM,version:"1.0"})},_check_streamerror:function(bodyWrap,connectstatus){var errors=bodyWrap.getElementsByTagName("stream:error");if(0===errors.length)return!1;for(var error=errors[0],condition="",text="",ns="urn:ietf:params:xml:ns:xmpp-streams",i=0;i<error.childNodes.length;i++){var e=error.childNodes[i];if(e.getAttribute("xmlns")!==ns)break;"text"===e.nodeName?text=e.textContent:condition=e.nodeName}var errorString="WebSocket stream error: ";return errorString+=condition?condition:"unknown",text&&(errorString+=" - "+condition),Strophe.error(errorString),this._conn._changeConnectStatus(connectstatus,condition),this._conn._doDisconnect(),!0},_reset:function(){},_connect:function(){this._closeSocket(),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)},_connect_cb:function(bodyWrap){var error=this._check_streamerror(bodyWrap,Strophe.Status.CONNFAIL);return error?Strophe.Status.CONNFAIL:void 0},_handleStreamStart:function(message){var error=!1,ns=message.getAttribute("xmlns");"string"!=typeof ns?error="Missing xmlns in stream:stream":ns!==Strophe.NS.CLIENT&&(error="Wrong xmlns in stream:stream: "+ns);var ns_stream=message.namespaceURI;"string"!=typeof ns_stream?error="Missing xmlns:stream in stream:stream":ns_stream!==Strophe.NS.STREAM&&(error="Wrong xmlns:stream in stream:stream: "+ns_stream);var ver=message.getAttribute("version");return"string"!=typeof ver?error="Missing version in stream:stream":"1.0"!==ver&&(error="Wrong version in stream:stream: "+ver),error?(this._conn._changeConnectStatus(Strophe.Status.CONNFAIL,error),this._conn._doDisconnect(),!1):!0},_connect_cb_wrapper:function(message){if(0===message.data.indexOf("<stream:stream ")||0===message.data.indexOf("<?xml")){var data=message.data.replace(/^(<\?.*?\?>\s*)*/,"");if(""===data)return;data=message.data.replace(/<stream:stream (.*[^\/])>/,"<stream:stream $1/>");var streamStart=(new DOMParser).parseFromString(data,"text/xml").documentElement;this._conn.xmlInput(streamStart),this._conn.rawInput(message.data),this._handleStreamStart(streamStart)&&(this._connect_cb(streamStart),this.streamStart=message.data.replace(/^<stream:(.*)\/>$/,"<stream:$1>"))}else{if("</stream:stream>"===message.data)return this._conn.rawInput(message.data),this._conn.xmlInput(document.createElement("stream:stream")),this._conn._changeConnectStatus(Strophe.Status.CONNFAIL,"Received closing stream"),void this._conn._doDisconnect();var string=this._streamWrap(message.data),elem=(new DOMParser).parseFromString(string,"text/xml").documentElement;this.socket.onmessage=this._onMessage.bind(this),this._conn._connect_cb(elem,null,message.data)}},_disconnect:function(pres){if(this.socket.readyState!==WebSocket.CLOSED){pres&&this._conn.send(pres);var close="</stream:stream>";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()},_doDisconnect:function(){Strophe.info("WebSockets _doDisconnect was called"),this._closeSocket()},_streamWrap:function(stanza){return this.streamStart+stanza+"</stream:stream>"},_closeSocket:function(){if(this.socket)try{this.socket.close()}catch(e){}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(_callback){Strophe.error("Server did not send any auth methods"),this._conn._changeConnectStatus(Strophe.Status.CONNFAIL,"Server did not send any auth methods"),_callback&&(_callback=_callback.bind(this._conn))(),this._conn._doDisconnect()},_onDisconnectTimeout:function(){},_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()},_onIdle:function(){var data=this._conn._data;if(data.length>0&&!this._conn.paused){for(var i=0;i<data.length;i++)if(null!==data[i]){var stanza,rawStanza;"restart"===data[i]?(stanza=this._buildStream(),rawStanza=this._removeClosingTag(stanza),stanza=stanza.tree()):(stanza=data[i],rawStanza=Strophe.serialize(stanza)),this._conn.xmlOutput(stanza),this._conn.rawOutput(rawStanza),this.socket.send(rawStanza)}this._conn._data=[]}},_onMessage:function(message){var elem,data;if("</stream:stream>"===message.data){var close="</stream:stream>";return this._conn.rawInput(close),this._conn.xmlInput(document.createElement("stream:stream")),void(this._conn.disconnecting||this._conn._doDisconnect())}if(0===message.data.search("<stream:stream ")){if(data=message.data.replace(/<stream:stream (.*[^\/])>/,"<stream:stream $1/>"),elem=(new DOMParser).parseFromString(data,"text/xml").documentElement,!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 this._conn.disconnecting&&"presence"===elem.firstChild.nodeName&&"unavailable"===elem.firstChild.getAttribute("type")?(this._conn.xmlInput(elem),void this._conn.rawInput(Strophe.serialize(elem))):void this._conn._dataRecv(elem,message.data)},_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)},_removeClosingTag:function(elem){var string=Strophe.serialize(elem);return string=string.replace(/<(stream:stream .*[^\/])\/>$/,"<$1>")},_reqToData:function(stanza){return stanza},_send:function(){this._conn.flush()},_sendRestart:function(){clearTimeout(this._conn._idleTimeout),this._conn._onIdle.bind(this._conn)()}};/*!
* Source: lib/strophe.muc.js, license: MIT, url: https://github.com/strophe/strophejs-plugins
*/
-var Occupant,RoomConfig,XmppRoom,__bind=function(fn,me){return function(){return fn.apply(me,arguments)}};Strophe.addConnectionPlugin("muc",{_connection:null,rooms:{},roomNames:[],init:function(conn){return 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"),Strophe.addNamespace("MUC_ROOMCONF",Strophe.NS.MUC+"#roomconfig")},join:function(room,nick,msg_handler_cb,pres_handler_cb,roster_cb,password,history_attrs,extended_presence){var msg,room_nick,_ref,_this=this;return room_nick=this.test_append_nick(room,nick),msg=$pres({from:this._connection.jid,to:room_nick}).c("x",{xmlns:Strophe.NS.MUC}),null!=history_attrs&&(msg=msg.c("history",history_attrs).up()),null!=password&&msg.cnode(Strophe.xmlElement("password",[],password)),null!=extended_presence&&msg.up().cnode(extended_presence),null==(_ref=this._muc_handler)&&(this._muc_handler=this._connection.addHandler(function(stanza){var from,handler,handlers,id,roomname,x,xmlns,xquery,_i,_len;if(from=stanza.getAttribute("from"),!from)return!0;if(roomname=from.split("/")[0],!_this.rooms[roomname])return!0;if(room=_this.rooms[roomname],handlers={},"message"===stanza.nodeName)handlers=room._message_handlers;else if("presence"===stanza.nodeName&&(xquery=stanza.getElementsByTagName("x"),xquery.length>0))for(_i=0,_len=xquery.length;_len>_i;_i++)if(x=xquery[_i],xmlns=x.getAttribute("xmlns"),xmlns&&xmlns.match(Strophe.NS.MUC)){handlers=room._presence_handlers;break}for(id in handlers)handler=handlers[id],handler(stanza,room)||delete handlers[id];return!0})),this.rooms.hasOwnProperty(room)||(this.rooms[room]=new XmppRoom(this,room,nick,password),this.roomNames.push(room)),pres_handler_cb&&this.rooms[room].addHandler("presence",pres_handler_cb),msg_handler_cb&&this.rooms[room].addHandler("message",msg_handler_cb),roster_cb&&this.rooms[room].addHandler("roster",roster_cb),this._connection.send(msg)},leave:function(room,nick,handler_cb,exit_msg){var id,presence,presenceid,room_nick;return id=this.roomNames.indexOf(room),delete this.rooms[room],id>=0&&(this.roomNames.splice(id,1),0===this.roomNames.length&&(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}),null!=exit_msg&&presence.c("status",exit_msg),null!=handler_cb&&this._connection.addHandler(handler_cb,null,"presence",null,presenceid),this._connection.send(presence),presenceid},message:function(room,nick,message,html_message,type){var msg,msgid,parent,room_nick;return room_nick=this.test_append_nick(room,nick),type=type||(null!=nick?"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(),null!=html_message&&(msg.c("html",{xmlns:Strophe.NS.XHTML_IM}).c("body",{xmlns:Strophe.NS.XHTML}).t(html_message),0===msg.node.childNodes.length?(parent=msg.node.parentNode,msg.up().up(),msg.node.removeChild(parent)):msg.up().up()),msg.c("x",{xmlns:"jabber:x:event"}).c("composing"),this._connection.send(msg),msgid},groupchat:function(room,message,html_message){return this.message(room,null,message,html_message)},invite:function(room,receiver,reason){var invitation,msgid;return 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}),null!=reason&&invitation.c("reason",reason),this._connection.send(invitation),msgid},directInvite:function(room,receiver,reason,password){var attrs,invitation,msgid;return msgid=this._connection.getUniqueId(),attrs={xmlns:"jabber:x:conference",jid:room},null!=reason&&(attrs.reason=reason),null!=password&&(attrs.password=password),invitation=$msg({from:this._connection.jid,to:receiver,id:msgid}).c("x",attrs),this._connection.send(invitation),msgid},queryOccupants:function(room,success_cb,error_cb){var attrs,info;return attrs={xmlns:Strophe.NS.DISCO_ITEMS},info=$iq({from:this._connection.jid,to:room,type:"get"}).c("query",attrs),this._connection.sendIQ(info,success_cb,error_cb)},configure:function(room,handler_cb,error_cb){var config,stanza;return config=$iq({to:room,type:"get"}).c("query",{xmlns:Strophe.NS.MUC_OWNER}),stanza=config.tree(),this._connection.sendIQ(stanza,handler_cb,error_cb)},cancelConfigure:function(room){var config,stanza;return config=$iq({to:room,type:"set"}).c("query",{xmlns:Strophe.NS.MUC_OWNER}).c("x",{xmlns:"jabber:x:data",type:"cancel"}),stanza=config.tree(),this._connection.sendIQ(stanza)},saveConfiguration:function(room,config,success_cb,error_cb){var conf,iq,stanza,_i,_len;if(iq=$iq({to:room,type:"set"}).c("query",{xmlns:Strophe.NS.MUC_OWNER}),config instanceof Form)config.type="submit",iq.cnode(config.toXML());else for(iq.c("x",{xmlns:"jabber:x:data",type:"submit"}),_i=0,_len=config.length;_len>_i;_i++)conf=config[_i],iq.cnode(conf).up();return stanza=iq.tree(),this._connection.sendIQ(stanza,success_cb,error_cb)},createInstantRoom:function(room,success_cb,error_cb){var roomiq;return roomiq=$iq({to:room,type:"set"}).c("query",{xmlns:Strophe.NS.MUC_OWNER}).c("x",{xmlns:"jabber:x:data",type:"submit"}),this._connection.sendIQ(roomiq.tree(),success_cb,error_cb)},setTopic:function(room,topic){var msg;return msg=$msg({to:room,from:this._connection.jid,type:"groupchat"}).c("subject",{xmlns:"jabber:client"}).t(topic),this._connection.send(msg.tree())},_modifyPrivilege:function(room,item,reason,handler_cb,error_cb){var iq;return iq=$iq({to:room,type:"set"}).c("query",{xmlns:Strophe.NS.MUC_ADMIN}).cnode(item.node),null!=reason&&iq.c("reason",reason),this._connection.sendIQ(iq.tree(),handler_cb,error_cb)},modifyRole:function(room,nick,role,reason,handler_cb,error_cb){var item;return item=$build("item",{nick:nick,role:role}),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)},modifyAffiliation:function(room,jid,affiliation,reason,handler_cb,error_cb){var item;return item=$build("item",{jid:jid,affiliation:affiliation}),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)},changeNick:function(room,user){var presence,room_nick;return room_nick=this.test_append_nick(room,user),presence=$pres({from:this._connection.jid,to:room_nick,id:this._connection.getUniqueId()}),this._connection.send(presence.tree())},setStatus:function(room,user,show,status){var presence,room_nick;return room_nick=this.test_append_nick(room,user),presence=$pres({from:this._connection.jid,to:room_nick}),null!=show&&presence.c("show",show).up(),null!=status&&presence.c("status",status),this._connection.send(presence.tree())},listRooms:function(server,handle_cb,error_cb){var iq;return iq=$iq({to:server,from:this._connection.jid,type:"get"}).c("query",{xmlns:Strophe.NS.DISCO_ITEMS}),this._connection.sendIQ(iq,handle_cb,error_cb)},test_append_nick:function(room,nick){return room+(null!=nick?"/"+Strophe.escapeNode(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,client.muc&&(this.client=client.muc),this.name=Strophe.getBareJidFromJid(name),this.addHandler("presence",this._roomRosterHandler)}return 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){return this.client.leave(this.name,this.nick,handler_cb,message),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){return this.nick=nick,this.client.changeNick(this.name,nick)},XmppRoom.prototype.setStatus=function(show,status){return this.client.setStatus(this.name,this.nick,show,status)},XmppRoom.prototype.addHandler=function(handler_type,handler){var id;switch(id=this._handler_ids++,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:return this._handler_ids--,null}return id},XmppRoom.prototype.removeHandler=function(id){return delete this._presence_handlers[id],delete this._message_handlers[id],delete this._roster_handlers[id]},XmppRoom.prototype._addOccupant=function(data){var occ;return occ=new Occupant(data,this),this.roster[occ.nick]=occ,occ},XmppRoom.prototype._roomRosterHandler=function(pres){var data,handler,id,newnick,nick,_ref;switch(data=XmppRoom._parsePresence(pres),nick=data.nick,newnick=data.newnick||null,data.type){case"error":return;case"unavailable":newnick&&(data.nick=newnick,this.roster[nick]&&this.roster[newnick]&&(this.roster[nick].update(this.roster[newnick]),this.roster[newnick]=this.roster[nick]),this.roster[nick]&&!this.roster[newnick]&&(this.roster[newnick]=this.roster[nick].update(data))),delete this.roster[nick];break;default:this.roster[nick]?this.roster[nick].update(data):this._addOccupant(data)}_ref=this._roster_handlers;for(id in _ref)handler=_ref[id],handler(this.roster,this)||delete this._roster_handlers[id];return!0},XmppRoom._parsePresence=function(pres){var a,c,c2,data,_i,_j,_len,_len1,_ref,_ref1,_ref2,_ref3,_ref4,_ref5,_ref6,_ref7;for(data={},a=pres.attributes,data.nick=Strophe.getResourceFromJid(a.from.textContent),data.type=(null!=(_ref=a.type)?_ref.textContent:void 0)||null,data.states=[],_ref1=pres.childNodes,_i=0,_len=_ref1.length;_len>_i;_i++)switch(c=_ref1[_i],c.nodeName){case"status":data.status=c.textContent||null;break;case"show":data.show=c.textContent||null;break;case"x":if(a=c.attributes,(null!=(_ref2=a.xmlns)?_ref2.textContent:void 0)===Strophe.NS.MUC_USER)for(_ref3=c.childNodes,_j=0,_len1=_ref3.length;_len1>_j;_j++)switch(c2=_ref3[_j],c2.nodeName){case"item":a=c2.attributes,data.affiliation=(null!=(_ref4=a.affiliation)?_ref4.textContent:void 0)||null,data.role=(null!=(_ref5=a.role)?_ref5.textContent:void 0)||null,data.jid=(null!=(_ref6=a.jid)?_ref6.textContent:void 0)||null,data.newnick=(null!=(_ref7=a.nick)?_ref7.textContent:void 0)||null;break;case"status":c2.attributes.code&&data.states.push(c2.attributes.code.textContent)}}return data},XmppRoom}(),RoomConfig=function(){function RoomConfig(info){this.parse=__bind(this.parse,this),null!=info&&this.parse(info)}return RoomConfig.prototype.parse=function(result){var attr,attrs,child,field,identity,query,_i,_j,_k,_len,_len1,_len2,_ref;for(query=result.getElementsByTagName("query")[0].childNodes,this.identities=[],this.features=[],this.x=[],_i=0,_len=query.length;_len>_i;_i++)switch(child=query[_i],attrs=child.attributes,child.nodeName){case"identity":for(identity={},_j=0,_len1=attrs.length;_len1>_j;_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":if(attrs=child.childNodes[0].attributes,"FORM_TYPE"===!attrs["var"].textContent||"hidden"===!attrs.type.textContent)break;for(_ref=child.childNodes,_k=0,_len2=_ref.length;_len2>_k;_k++)field=_ref[_k],field.attributes.type||(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}},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)}return 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){return 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,this},Occupant}(),/*!
+var Occupant,RoomConfig,XmppRoom,__bind=function(fn,me){return function(){return fn.apply(me,arguments)}};Strophe.addConnectionPlugin("muc",{_connection:null,rooms:{},roomNames:[],init:function(conn){return 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"),Strophe.addNamespace("MUC_ROOMCONF",Strophe.NS.MUC+"#roomconfig")},join:function(room,nick,msg_handler_cb,pres_handler_cb,roster_cb,password,history_attrs,extended_presence){var msg,room_nick,_ref,_this=this;return room_nick=this.test_append_nick(room,nick),msg=$pres({from:this._connection.jid,to:room_nick}).c("x",{xmlns:Strophe.NS.MUC}),null!=history_attrs&&(msg=msg.c("history",history_attrs).up()),null!=password&&msg.cnode(Strophe.xmlElement("password",[],password)),null!=extended_presence&&msg.up().cnode(extended_presence),null==(_ref=this._muc_handler)&&(this._muc_handler=this._connection.addHandler(function(stanza){var from,handler,handlers,id,roomname,x,xmlns,xquery,_i,_len;if(from=stanza.getAttribute("from"),!from)return!0;if(roomname=from.split("/")[0],!_this.rooms[roomname])return!0;if(room=_this.rooms[roomname],handlers={},"message"===stanza.nodeName)handlers=room._message_handlers;else if("presence"===stanza.nodeName&&(xquery=stanza.getElementsByTagName("x"),xquery.length>0))for(_i=0,_len=xquery.length;_len>_i;_i++)if(x=xquery[_i],xmlns=x.getAttribute("xmlns"),xmlns&&xmlns.match(Strophe.NS.MUC)){handlers=room._presence_handlers;break}for(id in handlers)handler=handlers[id],handler(stanza,room)||delete handlers[id];return!0})),this.rooms.hasOwnProperty(room)||(this.rooms[room]=new XmppRoom(this,room,nick,password),this.roomNames.push(room)),pres_handler_cb&&this.rooms[room].addHandler("presence",pres_handler_cb),msg_handler_cb&&this.rooms[room].addHandler("message",msg_handler_cb),roster_cb&&this.rooms[room].addHandler("roster",roster_cb),this._connection.send(msg)},leave:function(room,nick,handler_cb,exit_msg){var id,presence,presenceid,room_nick;return id=this.roomNames.indexOf(room),delete this.rooms[room],id>=0&&(this.roomNames.splice(id,1),0===this.roomNames.length&&(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}),null!=exit_msg&&presence.c("status",exit_msg),null!=handler_cb&&this._connection.addHandler(handler_cb,null,"presence",null,presenceid),this._connection.send(presence),presenceid},message:function(room,nick,message,html_message,type){var msg,msgid,parent,room_nick;return room_nick=this.test_append_nick(room,nick),type=type||(null!=nick?"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(),null!=html_message&&(msg.c("html",{xmlns:Strophe.NS.XHTML_IM}).c("body",{xmlns:Strophe.NS.XHTML}).t(html_message),0===msg.node.childNodes.length?(parent=msg.node.parentNode,msg.up().up(),msg.node.removeChild(parent)):msg.up().up()),msg.c("x",{xmlns:"jabber:x:event"}).c("composing"),this._connection.send(msg),msgid},groupchat:function(room,message,html_message){return this.message(room,null,message,html_message)},invite:function(room,receiver,reason){var invitation,msgid;return 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}),null!=reason&&invitation.c("reason",reason),this._connection.send(invitation),msgid},directInvite:function(room,receiver,reason,password){var attrs,invitation,msgid;return msgid=this._connection.getUniqueId(),attrs={xmlns:"jabber:x:conference",jid:room},null!=reason&&(attrs.reason=reason),null!=password&&(attrs.password=password),invitation=$msg({from:this._connection.jid,to:receiver,id:msgid}).c("x",attrs),this._connection.send(invitation),msgid},queryOccupants:function(room,success_cb,error_cb){var attrs,info;return attrs={xmlns:Strophe.NS.DISCO_ITEMS},info=$iq({from:this._connection.jid,to:room,type:"get"}).c("query",attrs),this._connection.sendIQ(info,success_cb,error_cb)},configure:function(room,handler_cb,error_cb){var config,stanza;return config=$iq({to:room,type:"get"}).c("query",{xmlns:Strophe.NS.MUC_OWNER}),stanza=config.tree(),this._connection.sendIQ(stanza,handler_cb,error_cb)},cancelConfigure:function(room){var config,stanza;return config=$iq({to:room,type:"set"}).c("query",{xmlns:Strophe.NS.MUC_OWNER}).c("x",{xmlns:"jabber:x:data",type:"cancel"}),stanza=config.tree(),this._connection.sendIQ(stanza)},saveConfiguration:function(room,config,success_cb,error_cb){var conf,iq,stanza,_i,_len;if(iq=$iq({to:room,type:"set"}).c("query",{xmlns:Strophe.NS.MUC_OWNER}),Strophe.x&&config instanceof Strophe.x.Form)config.type="submit",iq.cnode(config.toXML());else for(iq.c("x",{xmlns:"jabber:x:data",type:"submit"}),_i=0,_len=config.length;_len>_i;_i++)conf=config[_i],iq.cnode(conf).up();return stanza=iq.tree(),this._connection.sendIQ(stanza,success_cb,error_cb)},createInstantRoom:function(room,success_cb,error_cb){var roomiq;return roomiq=$iq({to:room,type:"set"}).c("query",{xmlns:Strophe.NS.MUC_OWNER}).c("x",{xmlns:"jabber:x:data",type:"submit"}),this._connection.sendIQ(roomiq.tree(),success_cb,error_cb)},setTopic:function(room,topic){var msg;return msg=$msg({to:room,from:this._connection.jid,type:"groupchat"}).c("subject",{xmlns:"jabber:client"}).t(topic),this._connection.send(msg.tree())},_modifyPrivilege:function(room,item,reason,handler_cb,error_cb){var iq;return iq=$iq({to:room,type:"set"}).c("query",{xmlns:Strophe.NS.MUC_ADMIN}).cnode(item.node),null!=reason&&iq.c("reason",reason),this._connection.sendIQ(iq.tree(),handler_cb,error_cb)},modifyRole:function(room,nick,role,reason,handler_cb,error_cb){var item;return item=$build("item",{nick:nick,role:role}),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)},modifyAffiliation:function(room,jid,affiliation,reason,handler_cb,error_cb){var item;return item=$build("item",{jid:jid,affiliation:affiliation}),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)},changeNick:function(room,user){var presence,room_nick;return room_nick=this.test_append_nick(room,user),presence=$pres({from:this._connection.jid,to:room_nick,id:this._connection.getUniqueId()}),this._connection.send(presence.tree())},setStatus:function(room,user,show,status){var presence,room_nick;return room_nick=this.test_append_nick(room,user),presence=$pres({from:this._connection.jid,to:room_nick}),null!=show&&presence.c("show",show).up(),null!=status&&presence.c("status",status),this._connection.send(presence.tree())},listRooms:function(server,handle_cb,error_cb){var iq;return iq=$iq({to:server,from:this._connection.jid,type:"get"}).c("query",{xmlns:Strophe.NS.DISCO_ITEMS}),this._connection.sendIQ(iq,handle_cb,error_cb)},test_append_nick:function(room,nick){return room+(null!=nick?"/"+Strophe.escapeNode(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,client.muc&&(this.client=client.muc),this.name=Strophe.getBareJidFromJid(name),this.addHandler("presence",this._roomRosterHandler)}return 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){return this.client.leave(this.name,this.nick,handler_cb,message),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){return this.nick=nick,this.client.changeNick(this.name,nick)},XmppRoom.prototype.setStatus=function(show,status){return this.client.setStatus(this.name,this.nick,show,status)},XmppRoom.prototype.addHandler=function(handler_type,handler){var id;switch(id=this._handler_ids++,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:return this._handler_ids--,null}return id},XmppRoom.prototype.removeHandler=function(id){return delete this._presence_handlers[id],delete this._message_handlers[id],delete this._roster_handlers[id]},XmppRoom.prototype._addOccupant=function(data){var occ;return occ=new Occupant(data,this),this.roster[occ.nick]=occ,occ},XmppRoom.prototype._roomRosterHandler=function(pres){var data,handler,id,newnick,nick,_ref;switch(data=XmppRoom._parsePresence(pres),nick=data.nick,newnick=data.newnick||null,data.type){case"error":return;case"unavailable":newnick&&(data.nick=newnick,this.roster[nick]&&this.roster[newnick]&&(this.roster[nick].update(this.roster[newnick]),this.roster[newnick]=this.roster[nick]),this.roster[nick]&&!this.roster[newnick]&&(this.roster[newnick]=this.roster[nick].update(data))),delete this.roster[nick];break;default:this.roster[nick]?this.roster[nick].update(data):this._addOccupant(data)}_ref=this._roster_handlers;for(id in _ref)handler=_ref[id],handler(this.roster,this)||delete this._roster_handlers[id];return!0},XmppRoom._parsePresence=function(pres){var a,c,c2,data,_i,_j,_len,_len1,_ref,_ref1,_ref2,_ref3,_ref4,_ref5,_ref6,_ref7;for(data={},a=pres.attributes,data.nick=Strophe.getResourceFromJid(a.from.textContent),data.type=(null!=(_ref=a.type)?_ref.textContent:void 0)||null,data.states=[],_ref1=pres.childNodes,_i=0,_len=_ref1.length;_len>_i;_i++)switch(c=_ref1[_i],c.nodeName){case"status":data.status=c.textContent||null;break;case"show":data.show=c.textContent||null;break;case"x":if(a=c.attributes,(null!=(_ref2=a.xmlns)?_ref2.textContent:void 0)===Strophe.NS.MUC_USER)for(_ref3=c.childNodes,_j=0,_len1=_ref3.length;_len1>_j;_j++)switch(c2=_ref3[_j],c2.nodeName){case"item":a=c2.attributes,data.affiliation=(null!=(_ref4=a.affiliation)?_ref4.textContent:void 0)||null,data.role=(null!=(_ref5=a.role)?_ref5.textContent:void 0)||null,data.jid=(null!=(_ref6=a.jid)?_ref6.textContent:void 0)||null,data.newnick=(null!=(_ref7=a.nick)?_ref7.textContent:void 0)||null;break;case"status":c2.attributes.code&&data.states.push(c2.attributes.code.textContent)}}return data},XmppRoom}(),RoomConfig=function(){function RoomConfig(info){this.parse=__bind(this.parse,this),null!=info&&this.parse(info)}return RoomConfig.prototype.parse=function(result){var attr,attrs,child,field,identity,query,_i,_j,_k,_len,_len1,_len2,_ref;for(query=result.getElementsByTagName("query")[0].childNodes,this.identities=[],this.features=[],this.x=[],_i=0,_len=query.length;_len>_i;_i++)switch(child=query[_i],attrs=child.attributes,child.nodeName){case"identity":for(identity={},_j=0,_len1=attrs.length;_len1>_j;_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":if(attrs=child.childNodes[0].attributes,"FORM_TYPE"===!attrs["var"].textContent||"hidden"===!attrs.type.textContent)break;for(_ref=child.childNodes,_k=0,_len2=_ref.length;_len2>_k;_k++)field=_ref[_k],field.attributes.type||(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}},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)}return 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){return 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,this},Occupant}(),/*!
* Source: lib/strophe.disco.js, license: MIT, url: https://github.com/strophe/strophejs-plugins
*/
Strophe.addConnectionPlugin("disco",{_connection:null,_identities:[],_features:[],_items:[],init:function(conn){this._connection=conn,this._identities=[],this._features=[],this._items=[],conn.addHandler(this._onDiscoInfo.bind(this),Strophe.NS.DISCO_INFO,"iq","get",null,null),conn.addHandler(this._onDiscoItems.bind(this),Strophe.NS.DISCO_ITEMS,"iq","get",null,null)},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!1;return this._identities.push({category:category,type:type,name:name,lang:lang}),!0},addFeature:function(var_name){for(var i=0;i<this._features.length;i++)if(this._features[i]==var_name)return!1;return this._features.push(var_name),!0},removeFeature:function(var_name){for(var i=0;i<this._features.length;i++)if(this._features[i]===var_name)return this._features.splice(i,1),!0;return!1},addItem:function(jid,name,node,call_back){return node&&!call_back?!1:(this._items.push({jid:jid,name:name,node:node,call_back:call_back}),!0)},info:function(jid,node,success,error,timeout){var attrs={xmlns:Strophe.NS.DISCO_INFO};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)},items:function(jid,node,success,error,timeout){var attrs={xmlns:Strophe.NS.DISCO_ITEMS};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)},_buildIQResult:function(stanza,query_attrs){var id=stanza.getAttribute("id"),from=stanza.getAttribute("from"),iqresult=$iq({type:"result",id:id});return null!==from&&iqresult.attrs({to:from}),iqresult.c("query",query_attrs)},_onDiscoInfo:function(stanza){var node=stanza.getElementsByTagName("query")[0].getAttribute("node"),attrs={xmlns:Strophe.NS.DISCO_INFO};node&&(attrs.node=node);for(var iqresult=this._buildIQResult(stanza,attrs),i=0;i<this._identities.length;i++){var attrs={category:this._identities[i].category,type:this._identities[i].type};this._identities[i].name&&(attrs.name=this._identities[i].name),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();return this._connection.send(iqresult.tree()),!0},_onDiscoItems:function(stanza){var query_attrs={xmlns:Strophe.NS.DISCO_ITEMS},node=stanza.getElementsByTagName("query")[0].getAttribute("node");if(node){query_attrs.node=node;for(var items=[],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;for(var iqresult=this._buildIQResult(stanza,query_attrs),i=0;i<items.length;i++){var attrs={jid:items[i].jid};items[i].name&&(attrs.name=items[i].name),items[i].node&&(attrs.node=items[i].node),iqresult.c("item",attrs).up()}return this._connection.send(iqresult.tree()),!0}}),/*!
@@ -51,19 +51,47 @@ function($){Strophe.addConnectionPlugin("caps",{HASH:"sha-1",node:"http://stroph
* Source: lib/strophe.vcard.js, license: MIT, url: https://github.com/strophe/strophejs-plugins
*/
var buildIq;buildIq=function(type,jid,vCardEl){var iq;return iq=$iq(jid?{type:type,to:jid}:{type:type}),iq.c("vCard",{xmlns:Strophe.NS.VCARD}),vCardEl&&iq.cnode(vCardEl),iq},Strophe.addConnectionPlugin("vcard",{_connection:null,init:function(conn){return this._connection=conn,Strophe.addNamespace("VCARD","vcard-temp")},get:function(handler_cb,jid,error_cb){var iq;return iq=buildIq("get",jid),this._connection.sendIQ(iq,handler_cb,error_cb)},set:function(handler_cb,vCardEl,jid){var iq;return iq=buildIq("set",jid,vCardEl),this._connection.sendIQ(iq,handler_cb,error_rb)}}),/*!
- * Source: lib/strophe.jingle/strophe.jingle.js, license: MIT, url: https://github.com/ESTOS/strophe.jingle
- */
-function($){Strophe.addConnectionPlugin("jingle",{connection:null,sessions:{},jid2session:{},ice_config:{iceServers:[]},pc_constraints:{},media_constraints:{mandatory:{OfferToReceiveAudio:!0,OfferToReceiveVideo:!0}},localStream:null,init:function(conn){this.connection=conn,this.connection.disco&&(this.connection.disco.addFeature("urn:xmpp:jingle:1"),this.connection.disco.addFeature("urn:xmpp:jingle:apps:rtp:1"),this.connection.disco.addFeature("urn:xmpp:jingle:transports:ice-udp:1"),this.connection.disco.addFeature("urn:xmpp:jingle:apps:rtp:audio"),this.connection.disco.addFeature("urn:xmpp:jingle:apps:rtp:video"),this.connection.disco.addFeature("urn:ietf:rfc:5761")),this.connection.addHandler(this.onJingle.bind(this),"urn:xmpp:jingle:1","iq","set",null,null)},onJingle:function(iq){var sid=$(iq).find("jingle").attr("sid"),action=$(iq).find("jingle").attr("action"),ack=$iq({type:"result",to:iq.getAttribute("from"),id:iq.getAttribute("id")}),sess=this.sessions[sid];if("session-initiate"!=action){if(null===sess)return ack.type="error",ack.c("error",{type:"cancel"}).c("item-not-found",{xmlns:"urn:ietf:params:xml:ns:xmpp-stanzas"}).up().c("unknown-session",{xmlns:"urn:xmpp:jingle:errors:1"}),this.connection.send(ack),!0;if(Strophe.getBareJidFromJid(iq.getAttribute("from"))!=Strophe.getBareJidFromJid(sess.peerjid))return console.warn("jid mismatch for session id",sid,iq.getAttribute("from"),sess.peerjid),ack.type="error",ack.c("error",{type:"cancel"}).c("item-not-found",{xmlns:"urn:ietf:params:xml:ns:xmpp-stanzas"}).up().c("unknown-session",{xmlns:"urn:xmpp:jingle:errors:1"}),this.connection.send(ack),!0}else if(void 0!==sess)return ack.type="error",ack.c("error",{type:"cancel"}).c("service-unavailable",{xmlns:"urn:ietf:params:xml:ns:xmpp-stanzas"}).up(),console.warn("duplicate session id",sid),this.connection.send(ack),!0;switch(this.connection.send(ack),action){case"session-initiate":sess=new JingleSession($(iq).attr("to"),$(iq).find("jingle").attr("sid"),this.connection),this.localStream&&sess.localStreams.push(this.localStream),sess.media_constraints=this.media_constraints,sess.pc_constraints=this.pc_constraints,sess.ice_config=this.ice_config,sess.initiate($(iq).attr("from"),!1),sess.setRemoteDescription($(iq).find(">jingle"),"offer"),this.sessions[sess.sid]=sess,this.jid2session[sess.peerjid]=sess,$(document).trigger("callincoming.jingle",[sess.sid]);break;case"session-accept":sess.setRemoteDescription($(iq).find(">jingle"),"answer"),sess.accept(),$(document).trigger("callaccepted.jingle",[sess.sid]);break;case"session-terminate":sess.terminate(),this.terminate(sess.sid),$(iq).find(">jingle>reason").length?$(document).trigger("callterminated.jingle",[sess.sid,$(iq).find(">jingle>reason>:first")[0].tagName,$(iq).find(">jingle>reason>text").text()]):$(document).trigger("callterminated.jingle",[sess.sid]);break;case"transport-info":sess.addIceCandidate($(iq).find(">jingle>content"));break;case"session-info":var affected;$(iq).find('>jingle>ringing[xmlns="urn:xmpp:jingle:apps:rtp:info:1"]').length?$(document).trigger("ringing.jingle",[sess.sid]):$(iq).find('>jingle>mute[xmlns="urn:xmpp:jingle:apps:rtp:info:1"]').length?(affected=$(iq).find('>jingle>mute[xmlns="urn:xmpp:jingle:apps:rtp:info:1"]').attr("name"),$(document).trigger("mute.jingle",[sess.sid,affected])):$(iq).find('>jingle>unmute[xmlns="urn:xmpp:jingle:apps:rtp:info:1"]').length&&(affected=$(iq).find('>jingle>unmute[xmlns="urn:xmpp:jingle:apps:rtp:info:1"]').attr("name"),$(document).trigger("unmute.jingle",[sess.sid,affected]));break;case"addsource":sess.addSource($(iq).find(">jingle>content"));break;case"removesource":sess.removeSource($(iq).find(">jingle>content"));break;default:console.warn("jingle action not implemented",action)}return!0},initiate:function(peerjid,myjid){var sess=new JingleSession(myjid||this.connection.jid,Math.random().toString(36).substr(2,12),this.connection);return this.localStream&&sess.localStreams.push(this.localStream),sess.media_constraints=this.media_constraints,sess.pc_constraints=this.pc_constraints,sess.ice_config=this.ice_config,sess.initiate(peerjid,!0),this.sessions[sess.sid]=sess,this.jid2session[sess.peerjid]=sess,sess.sendOffer(),sess},terminate:function(sid,reason,text){if(null===sid||void 0===sid)for(sid in this.sessions)"ended"!=this.sessions[sid].state&&(this.sessions[sid].sendTerminate(reason||!this.sessions[sid].active()?"cancel":null,text),this.sessions[sid].terminate()),delete this.jid2session[this.sessions[sid].peerjid],delete this.sessions[sid];else this.sessions.hasOwnProperty(sid)&&("ended"!=this.sessions[sid].state&&(this.sessions[sid].sendTerminate(reason||!this.sessions[sid].active()?"cancel":null,text),this.sessions[sid].terminate()),delete this.jid2session[this.sessions[sid].peerjid],delete this.sessions[sid])},terminateByJid:function(jid){if(this.jid2session.hasOwnProperty(jid)){var sess=this.jid2session[jid];sess&&(sess.terminate(),delete this.sessions[sess.sid],delete this.jid2session[jid],$(document).trigger("callterminated.jingle",[sess.sid,"gone"]))}},getStunAndTurnCredentials:function(){var self=this;this.connection.sendIQ($iq({type:"get",to:this.connection.domain}).c("services",{xmlns:"urn:xmpp:extdisco:1"}).c("service",{host:"turn."+this.connection.domain}),function(res){var iceservers=[];$(res).find(">services>service").each(function(idx,el){el=$(el);var dict={};switch(el.attr("type")){case"stun":dict.url="stun:"+el.attr("host"),el.attr("port")&&(dict.url+=":"+el.attr("port")),iceservers.push(dict);break;case"turn":dict.url="turn:",el.attr("username")&&(dict.username=el.attr("username")),dict.url+=el.attr("host"),el.attr("port")&&"3478"!=el.attr("port")&&(dict.url+=":"+el.attr("port")),el.attr("transport")&&"udp"!=el.attr("transport")&&(dict.url+="?transport="+el.attr("transport")),el.attr("password")&&(dict.credential=el.attr("password")),iceservers.push(dict)}}),self.ice_config.iceServers=iceservers},function(err){console.warn("getting turn credentials failed",err),console.warn("is mod_turncredentials or similar installed?")})}})}(jQuery);/*!
- * Source: lib/strophe.jingle/strophe.jingle.session.js, license: MIT, url: https://github.com/ESTOS/strophe.jingle
- */
-var JingleSession;!function($){JingleSession=function(me,sid,connection){this.me=me,this.sid=sid,this.connection=connection,this.initiator=null,this.responder=null,this.isInitiator=null,this.peerjid=null,this.state=null,this.peerconnection=null,this.remoteStream=null,this.localSDP=null,this.remoteSDP=null,this.localStreams=[],this.relayedStreams=[],this.remoteStreams=[],this.startTime=null,this.stopTime=null,this.media_constraints=null,this.pc_constraints=null,this.ice_config={},this.drip_container=[],this.usetrickle=!0,this.usepranswer=!1,this.usedrip=!1,this.hadstuncandidate=!1,this.hadturncandidate=!1,this.lasticecandidate=!1,this.statsinterval=null,this.reason=null,this.addssrc=[],this.removessrc=[],this.pendingop=null,this.wait=!0,this.nickname=null,this.startmuted=!1,this.filter_candidates=null},JingleSession.prototype.initiate=function(peerjid,isInitiator){var self=this;if(null!==this.state)return void console.error("attempt to initiate on session "+this.sid+"in state "+this.state);this.isInitiator=isInitiator,this.state="pending",this.initiator=isInitiator?this.me:peerjid,this.responder=isInitiator?peerjid:this.me,this.peerjid=peerjid;try{this.peerconnection=new RTCPeerconnection(this.ice_config,this.pc_constraints)}catch(e){return console.error("Failed to create PeerConnection, exception: ",e.message),void console.error(e)}this.hadstuncandidate=!1,this.hadturncandidate=!1,this.lasticecandidate=!1,this.peerconnection.onicecandidate=function(event){self.sendIceCandidate(event.candidate)},this.peerconnection.onaddstream=function(event){self.remoteStream=event.stream,self.remoteStreams.push(event.stream),$(document).trigger("remotestreamadded.jingle",[event,self.sid])},this.peerconnection.onremovestream=function(event){self.remoteStream=null,$(document).trigger("remotestreamremoved.jingle",[event,self.sid])},this.peerconnection.onsignalingstatechange=function(){!self||!self.peerconnection},this.peerconnection.oniceconnectionstatechange=function(){if(self&&self.peerconnection){switch(self.peerconnection.iceConnectionState){case"connected":this.startTime=new Date;break;case"disconnected":this.stopTime=new Date}$(document).trigger("iceconnectionstatechange.jingle",[self.sid,self])}},this.localStreams.forEach(function(stream){self.peerconnection.addStream(stream)}),this.relayedStreams.forEach(function(stream){self.peerconnection.addStream(stream)})},JingleSession.prototype.accept=function(){var self=this;this.state="active";var pranswer=this.peerconnection.localDescription;if(pranswer&&"pranswer"==pranswer.type){if(console.log("going from pranswer to answer"),this.usetrickle)for(var lines=SDPUtil.find_lines(pranswer.sdp,"a=candidate:"),i=0;i<lines.length;i++)pranswer.sdp=pranswer.sdp.replace(lines[i]+"\r\n","");for(;SDPUtil.find_line(pranswer.sdp,"a=inactive");)pranswer.sdp=pranswer.sdp.replace("a=inactive","a=sendrecv");var prsdp=new SDP(pranswer.sdp),accept=$iq({to:this.peerjid,type:"set"}).c("jingle",{xmlns:"urn:xmpp:jingle:1",action:"session-accept",initiator:this.initiator,responder:this.responder,sid:this.sid});prsdp.toJingle(accept,this.initiator==this.me?"initiator":"responder"),this.connection.sendIQ(accept,function(){var ack={};ack.source="answer",$(document).trigger("ack.jingle",[self.sid,ack])},function(stanza){var error=$(stanza).find("error").length?{code:$(stanza).find("error").attr("code"),reason:$(stanza).find("error :first")[0].tagName}:{};error.source="answer",$(document).trigger("error.jingle",[self.sid,error])},1e4);for(var sdp=this.peerconnection.localDescription.sdp;SDPUtil.find_line(sdp,"a=inactive");)sdp=sdp.replace("a=inactive","a=sendrecv");this.peerconnection.setLocalDescription(new RTCSessionDescription({type:"answer",sdp:sdp}),function(){$(document).trigger("setLocalDescription.jingle",[self.sid])},function(e){console.error("setLocalDescription failed",e)})}},JingleSession.prototype.terminate=function(reason){this.state="ended",this.reason=reason,this.peerconnection.close(),null!==this.statsinterval&&(window.clearInterval(this.statsinterval),this.statsinterval=null)},JingleSession.prototype.active=function(){return"active"==this.state},JingleSession.prototype.sendIceCandidate=function(candidate){var self=this;if(candidate&&!this.lasticecandidate){var ice=SDPUtil.iceparams(this.localSDP.media[candidate.sdpMLineIndex],this.localSDP.session),jcand=SDPUtil.candidateToJingle(candidate.candidate);if(!ice||!jcand)return void console.error("failed to get ice && jcand");if(ice.xmlns="urn:xmpp:jingle:transports:ice-udp:1","srflx"===jcand.type?this.hadstuncandidate=!0:"relay"===jcand.type&&(this.hadturncandidate=!0),(null===this.filter_candidates||jcand.type===this.filter_candidates)&&this.usetrickle){if(console.log("sendIceCandidate using trickle"),this.usedrip)return 0===this.drip_container.length&&window.setTimeout(function(){console.log("sending drip container"),0!==self.drip_container.length&&(self.sendIceCandidates(self.drip_container),self.drip_container=[])},20),void this.drip_container.push(candidate);console.log("sending single candidate"),self.sendIceCandidates([candidate])}}else{if(console.log("sendIceCandidate: last candidate..."),!this.usetrickle){console.log("should send full offer now...");var init=$iq({to:this.peerjid,type:"set"}).c("jingle",{xmlns:"urn:xmpp:jingle:1",action:"offer"==this.peerconnection.localDescription.type?"session-initiate":"session-accept",initiator:this.initiator,sid:this.sid});null!==this.nickname&&init.c("nick",{xmlns:"http://jabber.org/protocol/nick"}).t(this.nickname).up(),this.startmuted&&init.c("muted",{xmlns:"http://jitsi.org/protocol/meet#startmuted"}).up(),this.localSDP=new SDP(this.peerconnection.localDescription.sdp),this.localSDP.toJingle(init,this.initiator==this.me?"initiator":"responder"),console.log("try to send ack(offer)..."),this.connection.sendIQ(init,function(){console.log("Sent session initiate (ACK, offer)...");var ack={};ack.source="offer",$(document).trigger("ack.jingle",[self.sid,ack])},function(stanza){self.state="error",self.peerconnection.close();var error=$(stanza).find("error").length?{code:$(stanza).find("error").attr("code"),reason:$(stanza).find("error :first")[0].tagName}:{};error.source="offer",$(document).trigger("error.jingle",[self.sid,error])},1e4)}this.lasticecandidate=!0,console.log("Have we encountered any srflx candidates? "+this.hadstuncandidate),console.log("Have we encountered any relay candidates? "+this.hadturncandidate),this.hadstuncandidate||this.hadturncandidate||"closed"==this.peerconnection.signalingState||(console.log("no candidates found!"),$(document).trigger("nostuncandidates.jingle",[this.sid]))}},JingleSession.prototype.sendIceCandidates=function(candidates){console.log("sendIceCandidates",candidates);for(var cand=$iq({to:this.peerjid,type:"set"}).c("jingle",{xmlns:"urn:xmpp:jingle:1",action:"transport-info",initiator:this.initiator,sid:this.sid}),mid=0;mid<this.localSDP.media.length;mid++){var cands=candidates.filter(function(el){return el.sdpMLineIndex==mid}),mline=SDPUtil.parse_mline(this.localSDP.media[mid].split("\r\n")[0]);if(cands.length>0){var ice=SDPUtil.iceparams(this.localSDP.media[mid],this.localSDP.session);ice.xmlns="urn:xmpp:jingle:transports:ice-udp:1",cand.c("content",{creator:this.initiator==this.me?"initiator":"responder",name:cands[0].sdpMid?cands[0].sdpMid:mline.media}).c("transport",ice);for(var i=0;i<cands.length;i++)cand.c("candidate",SDPUtil.candidateToJingle(cands[i].candidate)).up();if(SDPUtil.find_line(this.localSDP.media[mid],"a=fingerprint:",this.localSDP.session)){var tmp=SDPUtil.parse_fingerprint(SDPUtil.find_line(this.localSDP.media[mid],"a=fingerprint:",this.localSDP.session));tmp.required=!0,cand.c("fingerprint").t(tmp.fingerprint),delete tmp.fingerprint,cand.attrs(tmp),cand.up()}cand.up(),cand.up()}}console.log("try to send ack(transportinfo)..."),this.connection.sendIQ(cand,function(){var ack={};ack.source="transportinfo",console.log("Sent session initiate (ACK, transportinfo)..."),$(document).trigger("ack.jingle",[this.sid,ack])},function(stanza){var error=$(stanza).find("error").length?{code:$(stanza).find("error").attr("code"),reason:$(stanza).find("error :first")[0].tagName}:{};error.source="transportinfo",$(document).trigger("error.jingle",[this.sid,error])},1e4)},JingleSession.prototype.sendOffer=function(){var self=this;this.peerconnection.createOffer(function(sdp){self.createdOffer(sdp)},function(e){console.error("createOffer failed",e)},this.media_constraints)},JingleSession.prototype.createdOffer=function(sdp){var self=this;if(this.localSDP=new SDP(sdp.sdp),this.usetrickle){var init=$iq({to:this.peerjid,type:"set"}).c("jingle",{xmlns:"urn:xmpp:jingle:1",action:"session-initiate",initiator:this.initiator,sid:this.sid});null!==this.nickname&&init.c("nick",{xmlns:"http://jabber.org/protocol/nick"}).t(this.nickname).up(),this.startmuted&&init.c("muted",{xmlns:"http://jitsi.org/protocol/meet#startmuted"}).up(),this.localSDP.toJingle(init,this.initiator==this.me?"initiator":"responder"),this.connection.sendIQ(init,function(){var ack={};ack.source="offer",$(document).trigger("ack.jingle",[self.sid,ack])},function(stanza){self.state="error",self.peerconnection.close();var error=$(stanza).find("error").length?{code:$(stanza).find("error").attr("code"),reason:$(stanza).find("error :first")[0].tagName}:{};error.source="offer",$(document).trigger("error.jingle",[self.sid,error])},1e4)}sdp.sdp=this.localSDP.raw,this.peerconnection.setLocalDescription(sdp,function(){$(document).trigger("setLocalDescription.jingle",[self.sid])},function(e){console.error("setLocalDescription failed",e)});for(var cands=SDPUtil.find_lines(this.localSDP.raw,"a=candidate:"),i=0;i<cands.length;i++){var cand=SDPUtil.parse_icecandidate(cands[i]);"srflx"==cand.type?this.hadstuncandidate=!0:"relay"==cand.type&&(this.hadturncandidate=!0)}},JingleSession.prototype.setRemoteDescription=function(elem,desctype){if(this.remoteSDP=new SDP(""),this.remoteSDP.fromJingle(elem),null!==this.peerconnection.remoteDescription&&(console.log("setRemoteDescription when remote description is not null, should be pranswer",this.peerconnection.remoteDescription),"pranswer"==this.peerconnection.remoteDescription.type)){for(var pranswer=new SDP(this.peerconnection.remoteDescription.sdp),i=0;i<pranswer.media.length;i++){SDPUtil.find_line(this.remoteSDP.media[i],"a=ice-ufrag:",this.remoteSDP.session)||(SDPUtil.find_line(pranswer.media[i],"a=ice-ufrag:",pranswer.session)?this.remoteSDP.media[i]+=SDPUtil.find_line(pranswer.media[i],"a=ice-ufrag:",pranswer.session)+"\r\n":console.warn("no ice ufrag?"),SDPUtil.find_line(pranswer.media[i],"a=ice-pwd:",pranswer.session)?this.remoteSDP.media[i]+=SDPUtil.find_line(pranswer.media[i],"a=ice-pwd:",pranswer.session)+"\r\n":console.warn("no ice pwd?"));for(var lines=SDPUtil.find_lines(pranswer.media[i],"a=candidate:"),j=0;j<lines.length;j++)this.remoteSDP.media[i]+=lines[j]+"\r\n"}this.remoteSDP.raw=this.remoteSDP.session+this.remoteSDP.media.join("")}var remotedesc=new RTCSessionDescription({type:desctype,sdp:this.remoteSDP.raw});this.peerconnection.setRemoteDescription(remotedesc,function(){},function(e){console.error("setRemoteDescription error",e)})},JingleSession.prototype.addIceCandidate=function(elem){var self=this;if("closed"!=this.peerconnection.signalingState){if(!this.peerconnection.remoteDescription&&"have-local-offer"==this.peerconnection.signalingState){if(console.log("trickle ice candidate arriving before session accept..."),!this.remoteSDP){for(var cobbled="v=0\r\no=- 1923518516 2 IN IP4 0.0.0.0\r\ns=-\r\nt=0 0\r\n",i=0;i<this.localSDP.media.length;i++)cobbled+=SDPUtil.find_line(this.localSDP.media[i],"m=")+"\r\n",cobbled+=SDPUtil.find_lines(this.localSDP.media[i],"a=rtpmap:").join("\r\n")+"\r\n",SDPUtil.find_line(this.localSDP.media[i],"a=mid:")&&(cobbled+=SDPUtil.find_line(this.localSDP.media[i],"a=mid:")+"\r\n"),cobbled+="a=inactive\r\n";this.remoteSDP=new SDP(cobbled)}elem.each(function(){for(var i=0;i<self.remoteSDP.media.length;i++)if((SDPUtil.find_line(self.remoteSDP.media[i],"a=mid:"+$(this).attr("name"))||0===self.remoteSDP.media[i].indexOf("m="+$(this).attr("name")))&&!SDPUtil.find_line(self.remoteSDP.media[i],"a=ice-ufrag:")){var tmp=$(this).find("transport");self.remoteSDP.media[i]+="a=ice-ufrag:"+tmp.attr("ufrag")+"\r\n",self.remoteSDP.media[i]+="a=ice-pwd:"+tmp.attr("pwd")+"\r\n",tmp=$(this).find("transport>fingerprint"),tmp.length?self.remoteSDP.media[i]+="a=fingerprint:"+tmp.attr("hash")+" "+tmp.text()+"\r\n":(console.log("no dtls fingerprint (webrtc issue #1718?)"),self.remoteSDP.media[i]+="a=crypto:1 AES_CM_128_HMAC_SHA1_80 inline:BAADBAADBAADBAADBAADBAADBAADBAADBAADBAAD\r\n");break}}),this.remoteSDP.raw=this.remoteSDP.session+this.remoteSDP.media.join("");var iscomplete=this.remoteSDP.media.filter(function(mediapart){return SDPUtil.find_line(mediapart,"a=ice-ufrag:")}).length==this.remoteSDP.media.length;if(iscomplete){console.log("setting pranswer");try{this.peerconnection.setRemoteDescription(new RTCSessionDescription({type:"pranswer",sdp:this.remoteSDP.raw}),function(){},function(e){console.log("setRemoteDescription pranswer failed",e.toString())})}catch(e){console.error("setting pranswer failed",e)}}}elem.each(function(){var i,idx=-1;for(i=0;i<self.remoteSDP.media.length;i++)if(SDPUtil.find_line(self.remoteSDP.media[i],"a=mid:"+$(this).attr("name"))||0===self.remoteSDP.media[i].indexOf("m="+$(this).attr("name"))){idx=i;break}if(-1==idx)for(i=0;i<self.localSDP.media.length;i++)if(SDPUtil.find_line(self.localSDP.media[i],"a=mid:"+$(this).attr("name"))||0===self.localSDP.media[i].indexOf("m="+$(this).attr("name"))){idx=i;break}var name=$(this).attr("name");$(this).find("transport>candidate").each(function(){var line,candidate;line=SDPUtil.candidateFromJingle(this),candidate=new RTCIceCandidate({sdpMLineIndex:idx,sdpMid:name,candidate:line});try{self.peerconnection.addIceCandidate(candidate)}catch(e){console.error("addIceCandidate failed",e.toString(),line)}})})}},JingleSession.prototype.sendAnswer=function(provisional){var self=this;this.peerconnection.createAnswer(function(sdp){self.createdAnswer(sdp,provisional)},function(e){console.error("createAnswer failed",e)},this.media_constraints)},JingleSession.prototype.createdAnswer=function(sdp,provisional){var self=this;if(this.localSDP=new SDP(sdp.sdp),this.usepranswer=provisional===!0,this.startmuted&&(console.log("we got a request to start muted..."),this.connection.jingle.localStream.getAudioTracks().forEach(function(track){track.enabled=!1}),this.connection.jingle.localStream.getVideoTracks().forEach(function(track){track.enabled=!1}),this.localSDP.media[1]=this.localSDP.media[1].replace("a=sendrecv","a=recvonly"),SDPUtil.find_lines(this.localSDP.media[1],"a=ssrc:").forEach(function(line){self.localSDP.media[1]=self.localSDP.media[1].replace(line+"\r\n","")}),this.localSDP.raw=this.localSDP.session+this.localSDP.media.join("")),this.usetrickle)if(this.usepranswer){sdp.type="pranswer";for(var i=0;i<this.localSDP.media.length;i++)this.localSDP.media[i]=this.localSDP.media[i].replace("a=sendrecv\r\n","a=inactive\r\n");this.localSDP.raw=this.localSDP.session+this.localSDP.media.join("")}else{var accept=$iq({to:this.peerjid,type:"set"}).c("jingle",{xmlns:"urn:xmpp:jingle:1",action:"session-accept",initiator:this.initiator,responder:this.responder,sid:this.sid});this.localSDP.toJingle(accept,this.initiator==this.me?"initiator":"responder"),this.connection.sendIQ(accept,function(){var ack={};ack.source="answer",$(document).trigger("ack.jingle",[self.sid,ack])},function(stanza){var error=$(stanza).find("error").length?{code:$(stanza).find("error").attr("code"),reason:$(stanza).find("error :first")[0].tagName}:{};error.source="answer",$(document).trigger("error.jingle",[self.sid,error])},1e4)}sdp.sdp=this.localSDP.raw,this.peerconnection.setLocalDescription(sdp,function(){$(document).trigger("setLocalDescription.jingle",[self.sid])},function(e){console.error("setLocalDescription failed",e)});for(var cands=SDPUtil.find_lines(this.localSDP.raw,"a=candidate:"),j=0;j<cands.length;j++){var cand=SDPUtil.parse_icecandidate(cands[j]);"srflx"==cand.type?this.hadstuncandidate=!0:"relay"==cand.type&&(this.hadturncandidate=!0)}},JingleSession.prototype.sendTerminate=function(reason,text){var self=this,term=$iq({to:this.peerjid,type:"set"}).c("jingle",{xmlns:"urn:xmpp:jingle:1",action:"session-terminate",initiator:this.initiator,sid:this.sid}).c("reason").c(reason||"success");text&&term.up().c("text").t(text),this.connection.sendIQ(term,function(){self.peerconnection.close(),self.peerconnection=null,self.terminate();var ack={};ack.source="terminate",$(document).trigger("ack.jingle",[self.sid,ack])},function(stanza){var error=$(stanza).find("error").length?{code:$(stanza).find("error").attr("code"),reason:$(stanza).find("error :first")[0].tagName}:{};$(document).trigger("ack.jingle",[self.sid,error])},1e4),null!==this.statsinterval&&(window.clearInterval(this.statsinterval),this.statsinterval=null)},JingleSession.prototype.addSource=function(elem){console.log("addssrc",(new Date).getTime()),console.log("ice",this.peerconnection.iceConnectionState);var sdp=new SDP(this.peerconnection.remoteDescription.sdp),self=this;$(elem).each(function(idx,content){var name=$(content).attr("name"),lines="";tmp=$(content).find('>source[xmlns="urn:xmpp:jingle:apps:rtp:ssma:0"]'),tmp.each(function(){var ssrc=$(this).attr("ssrc");$(this).find(">parameter").each(function(){lines+="a=ssrc:"+ssrc+" "+$(this).attr("name"),$(this).attr("value")&&$(this).attr("value").length&&(lines+=":"+$(this).attr("value")),lines+="\r\n"})}),sdp.media.forEach(function(media,idx){SDPUtil.find_line(media,"a=mid:"+name)&&(sdp.media[idx]+=lines,self.addssrc[idx]||(self.addssrc[idx]=""),self.addssrc[idx]+=lines)}),sdp.raw=sdp.session+sdp.media.join("")}),this.modifySources()},JingleSession.prototype.removeSource=function(elem){console.log("removessrc",(new Date).getTime()),console.log("ice",this.peerconnection.iceConnectionState);var sdp=new SDP(this.peerconnection.remoteDescription.sdp),self=this;$(elem).each(function(idx,content){var name=$(content).attr("name"),lines="";tmp=$(content).find('>source[xmlns="urn:xmpp:jingle:apps:rtp:ssma:0"]'),tmp.each(function(){var ssrc=$(this).attr("ssrc");$(this).find(">parameter").each(function(){lines+="a=ssrc:"+ssrc+" "+$(this).attr("name"),$(this).attr("value")&&$(this).attr("value").length&&(lines+=":"+$(this).attr("value")),lines+="\r\n"})}),sdp.media.forEach(function(media,idx){SDPUtil.find_line(media,"a=mid:"+name)&&(sdp.media[idx]+=lines,self.addssrc[idx]||(self.removessrc[idx]=""),self.removessrc[idx]+=lines)}),sdp.raw=sdp.session+sdp.media.join("")}),this.modifySources()},JingleSession.prototype.modifySources=function(){var self=this;if("closed"!=this.peerconnection.signalingState&&(this.addssrc.length||this.removessrc.length||null!==this.pendingop)){if("stable"!=this.peerconnection.signalingState||"connected"!=this.peerconnection.iceConnectionState)return console.warn("modifySources not yet",this.peerconnection.signalingState,this.peerconnection.iceConnectionState),this.wait=!0,void window.setTimeout(function(){self.modifySources()},250);if(this.wait)return window.setTimeout(function(){self.modifySources()},2500),void(this.wait=!1);var sdp=new SDP(this.peerconnection.remoteDescription.sdp);this.addssrc.forEach(function(lines,idx){sdp.media[idx]+=lines}),this.addssrc=[],this.removessrc.forEach(function(lines,idx){lines=lines.split("\r\n"),lines.pop(),lines.forEach(function(line){sdp.media[idx]=sdp.media[idx].replace(line+"\r\n","")})}),this.removessrc=[],sdp.raw=sdp.session+sdp.media.join(""),this.peerconnection.setRemoteDescription(new RTCSessionDescription({type:"offer",sdp:sdp.raw}),function(){self.peerconnection.createAnswer(function(modifiedAnswer){if(null!==self.pendingop){var sdp=new SDP(modifiedAnswer.sdp);if(sdp.media.length>1){switch(self.pendingop){case"mute":sdp.media[1]=sdp.media[1].replace("a=sendrecv","a=recvonly");break;case"unmute":sdp.media[1]=sdp.media[1].replace("a=recvonly","a=sendrecv")}sdp.raw=sdp.session+sdp.media.join(""),modifiedAnswer.sdp=sdp.raw}self.pendingop=null}self.peerconnection.setLocalDescription(modifiedAnswer,function(){$(document).trigger("setLocalDescription.jingle",[self.sid])},function(){console.log("modified setLocalDescription failed")})},function(){console.log("modified answer failed")})},function(){console.log("modify failed")})}},JingleSession.prototype.hardMuteVideo=function(muted){this.pendingop=muted?"mute":"unmute",this.modifySources(),this.connection.jingle.localStream.getVideoTracks().forEach(function(track){track.enabled=!muted})},JingleSession.prototype.sendMute=function(muted,content){var info=$iq({to:this.peerjid,type:"set"}).c("jingle",{xmlns:"urn:xmpp:jingle:1",action:"session-info",initiator:this.initiator,sid:this.sid});info.c(muted?"mute":"unmute",{xmlns:"urn:xmpp:jingle:apps:rtp:info:1"}),info.attrs({creator:this.me==this.initiator?"creator":"responder"}),content&&info.attrs({name:content}),this.connection.send(info)},JingleSession.prototype.sendRinging=function(){var info=$iq({to:this.peerjid,type:"set"}).c("jingle",{xmlns:"urn:xmpp:jingle:1",action:"session-info",initiator:this.initiator,sid:this.sid});info.c("ringing",{xmlns:"urn:xmpp:jingle:apps:rtp:info:1"}),this.connection.send(info)},JingleSession.prototype.getStats=function(interval){var self=this,recv={audio:0,video:0},lost={audio:0,video:0},lastrecv={audio:0,video:0},lastlost={audio:0,video:0},loss={audio:0,video:0},delta={audio:0,video:0};return this.statsinterval=window.setInterval(function(){self&&self.peerconnection&&self.peerconnection.getStats&&self.peerconnection.getStats(function(stats){for(var results=stats.result(),i=0;i<results.length;++i)if("ssrc"==results[i].type){var packetsrecv=results[i].stat("packetsReceived"),packetslost=results[i].stat("packetsLost");packetsrecv&&packetslost&&(packetsrecv=parseInt(packetsrecv,10),packetslost=parseInt(packetslost,10),results[i].stat("googFrameRateReceived")?(lastlost.video=lost.video,lastrecv.video=recv.video,recv.video=packetsrecv,lost.video=packetslost):(lastlost.audio=lost.audio,lastrecv.audio=recv.audio,recv.audio=packetsrecv,lost.audio=packetslost))}delta.audio=recv.audio-lastrecv.audio,delta.video=recv.video-lastrecv.video,loss.audio=delta.audio>0?Math.ceil(100*(lost.audio-lastlost.audio)/delta.audio):0,loss.video=delta.video>0?Math.ceil(100*(lost.video-lastlost.video)/delta.video):0,$(document).trigger("packetloss.jingle",[self.sid,loss])})},interval||3e3),this.statsinterval}}(jQuery);/*!
- * Source: lib/strophe.jingle/strophe.jingle.sdp.js, license: MIT, url: https://github.com/ESTOS/strophe.jingle
- */
-var SDP;!function($){SDP=function(sdp){this.media=sdp.split("\r\nm=");for(var i=1;i<this.media.length;i++)this.media[i]="m="+this.media[i],i!=this.media.length-1&&(this.media[i]+="\r\n");this.session=this.media.shift()+"\r\n",this.raw=this.session+this.media.join("")},SDP.prototype.mangle=function(){var i,j,mline,lines,rtpmap,newdesc;for(i=0;i<this.media.length;i++)if(lines=this.media[i].split("\r\n"),lines.pop(),mline=SDPUtil.parse_mline(lines.shift()),"audio"==mline.media){for(newdesc="",mline.fmt.length=0,j=0;j<lines.length;j++)if("a=rtpmap:"==lines[j].substr(0,9)){if(rtpmap=SDPUtil.parse_rtpmap(lines[j]),"CN"==rtpmap.name||"ISAC"==rtpmap.name)continue;mline.fmt.push(rtpmap.id),newdesc+=lines[j]+"\r\n"}else newdesc+=lines[j]+"\r\n";this.media[i]=SDPUtil.build_mline(mline)+"\r\n",this.media[i]+=newdesc}this.raw=this.session+this.media.join("")},SDP.prototype.removeSessionLines=function(prefix){var self=this,lines=SDPUtil.find_lines(this.session,prefix);return lines.forEach(function(line){self.session=self.session.replace(line+"\r\n","")}),this.raw=this.session+this.media.join(""),lines},SDP.prototype.removeMediaLines=function(mediaindex,prefix){var self=this,lines=SDPUtil.find_lines(this.media[mediaindex],prefix);return lines.forEach(function(line){self.media[mediaindex]=self.media[mediaindex].replace(line+"\r\n","")}),this.raw=this.session+this.media.join(""),lines},SDP.prototype.toJingle=function(elem,thecreator){var i,j,k,mline,ssrc,rtpmap,tmp,lines;if(SDPUtil.find_line(this.session,"a=group:"))for(lines=SDPUtil.find_lines(this.session,"a=group:"),i=0;i<lines.length;i++){tmp=lines[i].split(" ");var semantics=tmp.shift().substr(8);for(elem.c("group",{xmlns:"urn:xmpp:jingle:apps:grouping:0",semantics:semantics}),j=0;j<tmp.length;j++)elem.c("content",{name:tmp[j]}).up();elem.up()}var bundle=[];for(SDPUtil.find_line(this.session,"a=group:BUNDLE")&&(bundle=SDPUtil.find_line(this.session,"a=group:BUNDLE ").split(" "),bundle.shift()),i=0;i<this.media.length;i++)if(mline=SDPUtil.parse_mline(this.media[i].split("\r\n")[0]),"audio"==mline.media||"video"==mline.media){if(ssrc=SDPUtil.find_line(this.media[i],"a=ssrc:")?SDPUtil.find_line(this.media[i],"a=ssrc:").substring(7).split(" ")[0]:!1,elem.c("content",{creator:thecreator,name:mline.media}),SDPUtil.find_line(this.media[i],"a=mid:")){var mid=SDPUtil.parse_mid(SDPUtil.find_line(this.media[i],"a=mid:"));elem.attrs({name:mid})}if(SDPUtil.find_line(this.media[i],"a=rtpmap:").length){for(elem.c("description",{xmlns:"urn:xmpp:jingle:apps:rtp:1",media:mline.media}),ssrc&&elem.attrs({ssrc:ssrc}),j=0;j<mline.fmt.length;j++){if(rtpmap=SDPUtil.find_line(this.media[i],"a=rtpmap:"+mline.fmt[j]),elem.c("payload-type",SDPUtil.parse_rtpmap(rtpmap)),SDPUtil.find_line(this.media[i],"a=fmtp:"+mline.fmt[j]))for(tmp=SDPUtil.parse_fmtp(SDPUtil.find_line(this.media[i],"a=fmtp:"+mline.fmt[j])),k=0;k<tmp.length;k++)elem.c("parameter",tmp[k]).up();this.RtcpFbToJingle(i,elem,mline.fmt[j]),elem.up()}if(SDPUtil.find_line(this.media[i],"a=crypto:",this.session)){elem.c("encryption",{required:1});var crypto=SDPUtil.find_lines(this.media[i],"a=crypto:",this.session);crypto.forEach(function(line){elem.c("crypto",SDPUtil.parse_crypto(line)).up()}),elem.up()}if(ssrc){elem.c("source",{ssrc:ssrc,xmlns:"urn:xmpp:jingle:apps:rtp:ssma:0"});var ssrclines=SDPUtil.find_lines(this.media[i],"a=ssrc:");ssrclines.forEach(function(line){idx=line.indexOf(" ");var linessrc=line.substr(0,idx).substr(7);linessrc!=ssrc&&(elem.up(),ssrc=linessrc,elem.c("source",{ssrc:ssrc,xmlns:"urn:xmpp:jingle:apps:rtp:ssma:0"}));var kv=line.substr(idx+1);elem.c("parameter"),-1==kv.indexOf(":")?elem.attrs({name:kv}):(elem.attrs({name:kv.split(":",2)[0]}),elem.attrs({value:kv.split(":",2)[1]})),elem.up()}),elem.up()}if(SDPUtil.find_line(this.media[i],"a=rtcp-mux")&&elem.c("rtcp-mux").up(),this.RtcpFbToJingle(i,elem,"*"),SDPUtil.find_line(this.media[i],"a=extmap:"))for(lines=SDPUtil.find_lines(this.media[i],"a=extmap:"),j=0;j<lines.length;j++){if(tmp=SDPUtil.parse_extmap(lines[j]),elem.c("rtp-hdrext",{xmlns:"urn:xmpp:jingle:apps:rtp:rtp-hdrext:0",uri:tmp.uri,id:tmp.value}),tmp.hasOwnProperty("direction"))switch(tmp.direction){case"sendonly":elem.attrs({senders:"responder"});break;case"recvonly":elem.attrs({senders:"initiator"});break;case"sendrecv":elem.attrs({senders:"both"});break;case"inactive":elem.attrs({senders:"none"})}elem.up()}elem.up()}this.TransportToJingle(i,elem),SDPUtil.find_line(this.media[i],"a=sendrecv",this.session)?elem.attrs({senders:"both"}):SDPUtil.find_line(this.media[i],"a=sendonly",this.session)?elem.attrs({senders:"initiator"}):SDPUtil.find_line(this.media[i],"a=recvonly",this.session)?elem.attrs({senders:"responder"}):SDPUtil.find_line(this.media[i],"a=inactive",this.session)&&elem.attrs({senders:"none"}),"0"==mline.port&&elem.attrs({senders:"rejected"}),elem.up()}return elem.up(),elem},SDP.prototype.TransportToJingle=function(mediaindex,elem){var tmp,self=this;elem.c("transport");var fingerprints=SDPUtil.find_lines(this.media[mediaindex],"a=fingerprint:",this.session);if(fingerprints.forEach(function(line){tmp=SDPUtil.parse_fingerprint(line),tmp.xmlns="urn:xmpp:tmp:jingle:apps:dtls:0",elem.c("fingerprint").t(tmp.fingerprint),delete tmp.fingerprint,line=SDPUtil.find_line(self.media[mediaindex],"a=setup:",self.session),line&&(tmp.setup=line.substr(8)),elem.attrs(tmp),elem.up()}),tmp=SDPUtil.iceparams(this.media[mediaindex],this.session),tmp&&(tmp.xmlns="urn:xmpp:jingle:transports:ice-udp:1",elem.attrs(tmp),SDPUtil.find_line(this.media[mediaindex],"a=candidate:",this.session))){var lines=SDPUtil.find_lines(this.media[mediaindex],"a=candidate:",this.session);lines.forEach(function(line){elem.c("candidate",SDPUtil.candidateToJingle(line)).up()})}elem.up()},SDP.prototype.RtcpFbToJingle=function(mediaindex,elem,payloadtype){var lines=SDPUtil.find_lines(this.media[mediaindex],"a=rtcp-fb:"+payloadtype);lines.forEach(function(line){var tmp=SDPUtil.parse_rtcpfb(line);"trr-int"==tmp.type?(elem.c("rtcp-fb-trr-int",{xmlns:"urn:xmpp:jingle:apps:rtp:rtcp-fb:0",value:tmp.params[0]}),elem.up()):(elem.c("rtcp-fb",{xmlns:"urn:xmpp:jingle:apps:rtp:rtcp-fb:0",type:tmp.type}),tmp.params.length>0&&elem.attrs({subtype:tmp.params[0]}),elem.up())})},SDP.prototype.RtcpFbFromJingle=function(elem,payloadtype){var media="",tmp=elem.find('>rtcp-fb-trr-int[xmlns="urn:xmpp:jingle:apps:rtp:rtcp-fb:0"]');return tmp.length&&(media+="a=rtcp-fb:* trr-int ",media+=tmp.attr("value")?tmp.attr("value"):"0",media+="\r\n"),tmp=elem.find('>rtcp-fb[xmlns="urn:xmpp:jingle:apps:rtp:rtcp-fb:0"]'),tmp.each(function(){media+="a=rtcp-fb:"+payloadtype+" "+$(this).attr("type"),$(this).attr("subtype")&&(media+=" "+$(this).attr("subtype")),media+="\r\n"}),media},SDP.prototype.fromJingle=function(jingle){var self=this;if(this.raw="v=0\r\no=- 1923518516 2 IN IP4 0.0.0.0\r\ns=-\r\nt=0 0\r\n",$(jingle).find('>group[xmlns="urn:xmpp:jingle:apps:grouping:0"]').length)$(jingle).find('>group[xmlns="urn:xmpp:jingle:apps:grouping:0"]').each(function(idx,group){var contents=$(group).find(">content").map(function(idx,content){return content.getAttribute("name")}).get();contents.length>0&&(self.raw+="a=group:"+(group.getAttribute("semantics")||group.getAttribute("type"))+" "+contents.join(" ")+"\r\n")});else if($(jingle).find('>group[xmlns="urn:ietf:rfc:5888"]').length)$(jingle).find('>group[xmlns="urn:ietf:rfc:5888"]').each(function(idx,group){var contents=$(group).find(">content").map(function(idx,content){return content.getAttribute("name")}).get();null!==group.getAttribute("type")&&contents.length>0&&(self.raw+="a=group:"+group.getAttribute("type")+" "+contents.join(" ")+"\r\n")});else{var bundle=$(jingle).find(">content").filter(function(idx,content){return $(content).find(">bundle").length>0}).map(function(idx,content){return content.getAttribute("name")}).get();bundle.length&&(this.raw+="a=group:BUNDLE "+bundle.join(" ")+"\r\n")}this.session=this.raw,jingle.find(">content").each(function(){var m=self.jingle2media($(this));self.media.push(m)}),this.raw=this.session+this.media.join("")},SDP.prototype.jingle2media=function(content){var tmp,media="",desc=content.find("description"),self=(desc.attr("ssrc"),this);switch(tmp={media:desc.attr("media")},tmp.port="1","rejected"==content.attr("senders")&&(tmp.port="0"),tmp.proto=content.find(">transport>fingerprint").length||desc.find("encryption").length?"RTP/SAVPF":"RTP/AVPF",tmp.fmt=desc.find("payload-type").map(function(){return this.getAttribute("id")}).get(),media+=SDPUtil.build_mline(tmp)+"\r\n",media+="c=IN IP4 0.0.0.0\r\n",media+="a=rtcp:1 IN IP4 0.0.0.0\r\n",tmp=content.find('>transport[xmlns="urn:xmpp:jingle:transports:ice-udp:1"]'),tmp.length&&(tmp.attr("ufrag")&&(media+=SDPUtil.build_iceufrag(tmp.attr("ufrag"))+"\r\n"),tmp.attr("pwd")&&(media+=SDPUtil.build_icepwd(tmp.attr("pwd"))+"\r\n"),tmp.find(">fingerprint").each(function(){media+="a=fingerprint:"+this.getAttribute("hash"),media+=" "+$(this).text(),media+="\r\n",this.getAttribute("setup")&&(media+="a=setup:"+this.getAttribute("setup")+"\r\n")})),content.attr("senders")){case"initiator":media+="a=sendonly\r\n";break;case"responder":media+="a=recvonly\r\n";break;case"none":media+="a=inactive\r\n";break;case"both":media+="a=sendrecv\r\n"}return media+="a=mid:"+content.attr("name")+"\r\n",desc.find("rtcp-mux").length&&(media+="a=rtcp-mux\r\n"),desc.find("encryption").length&&desc.find("encryption>crypto").each(function(){media+="a=crypto:"+this.getAttribute("tag"),media+=" "+this.getAttribute("crypto-suite"),media+=" "+this.getAttribute("key-params"),this.getAttribute("session-params")&&(media+=" "+this.getAttribute("session-params")),media+="\r\n"}),desc.find("payload-type").each(function(){media+=SDPUtil.build_rtpmap(this)+"\r\n",$(this).find(">parameter").length&&(media+="a=fmtp:"+this.getAttribute("id")+" ",media+=$(this).find("parameter").map(function(){return(this.getAttribute("name")?this.getAttribute("name")+"=":"")+this.getAttribute("value")}).get().join(";"),media+="\r\n"),media+=self.RtcpFbFromJingle($(this),this.getAttribute("id"))}),media+=self.RtcpFbFromJingle(desc,"*"),tmp=desc.find('>rtp-hdrext[xmlns="urn:xmpp:jingle:apps:rtp:rtp-hdrext:0"]'),tmp.each(function(){media+="a=extmap:"+this.getAttribute("id")+" "+this.getAttribute("uri")+"\r\n"}),content.find('>transport[xmlns="urn:xmpp:jingle:transports:ice-udp:1"]>candidate').each(function(){media+=SDPUtil.candidateFromJingle(this)}),tmp=content.find('description>source[xmlns="urn:xmpp:jingle:apps:rtp:ssma:0"]'),tmp.each(function(){var ssrc=this.getAttribute("ssrc");$(this).find(">parameter").each(function(){media+="a=ssrc:"+ssrc+" "+this.getAttribute("name"),this.getAttribute("value")&&this.getAttribute("value").length&&(media+=":"+this.getAttribute("value")),media+="\r\n"})}),media},SDPUtil={iceparams:function(mediadesc,sessiondesc){var data=null;return SDPUtil.find_line(mediadesc,"a=ice-ufrag:",sessiondesc)&&SDPUtil.find_line(mediadesc,"a=ice-pwd:",sessiondesc)&&(data={ufrag:SDPUtil.parse_iceufrag(SDPUtil.find_line(mediadesc,"a=ice-ufrag:",sessiondesc)),pwd:SDPUtil.parse_icepwd(SDPUtil.find_line(mediadesc,"a=ice-pwd:",sessiondesc))}),data},parse_iceufrag:function(line){return line.substring(12)},build_iceufrag:function(frag){return"a=ice-ufrag:"+frag},parse_icepwd:function(line){return line.substring(10)},build_icepwd:function(pwd){return"a=ice-pwd:"+pwd},parse_mid:function(line){return line.substring(6)},parse_mline:function(line){var parts=line.substring(2).split(" "),data={};return data.media=parts.shift(),data.port=parts.shift(),data.proto=parts.shift(),""===parts[parts.length-1]&&parts.pop(),data.fmt=parts,data},build_mline:function(mline){return"m="+mline.media+" "+mline.port+" "+mline.proto+" "+mline.fmt.join(" ")},parse_rtpmap:function(line){var parts=line.substring(9).split(" "),data={};return data.id=parts.shift(),parts=parts[0].split("/"),data.name=parts.shift(),data.clockrate=parts.shift(),data.channels=parts.length?parts.shift():"1",data},build_rtpmap:function(el){var line="a=rtpmap:"+el.getAttribute("id")+" "+el.getAttribute("name")+"/"+el.getAttribute("clockrate");return el.getAttribute("channels")&&"1"!=el.getAttribute("channels")&&(line+="/"+el.getAttribute("channels")),line},parse_crypto:function(line){var parts=line.substring(9).split(" "),data={};return data.tag=parts.shift(),data["crypto-suite"]=parts.shift(),data["key-params"]=parts.shift(),parts.length&&(data["session-params"]=parts.join(" ")),data},parse_fingerprint:function(line){var parts=line.substring(14).split(" "),data={};return data.hash=parts.shift(),data.fingerprint=parts.shift(),data},parse_fmtp:function(line){var i,key,value,parts=line.split(" "),data=[];for(parts.shift(),parts=parts.join(" ").split(";"),i=0;i<parts.length;i++){for(key=parts[i].split("=")[0];key.length&&" "==key[0];)key=key.substring(1);value=parts[i].split("=")[1],key&&value?data.push({name:key,value:value}):key&&data.push({name:"",value:key})}return data},parse_icecandidate:function(line){var candidate={},elems=line.split(" ");candidate.foundation=elems[0].substring(12),candidate.component=elems[1],candidate.protocol=elems[2].toLowerCase(),candidate.priority=elems[3],candidate.ip=elems[4],candidate.port=elems[5],candidate.type=elems[7],candidate.generation=0;for(var i=8;i<elems.length;i+=2)switch(elems[i]){case"raddr":candidate["rel-addr"]=elems[i+1];break;case"rport":candidate["rel-port"]=elems[i+1];break;case"generation":candidate.generation=elems[i+1];break;case"tcptype":candidate.tcptype=elems[i+1];break;default:console.log('parse_icecandidate not translating "'+elems[i]+'" = "'+elems[i+1]+'"')}return candidate.network="1",candidate.id=Math.random().toString(36).substr(2,10),candidate},build_icecandidate:function(cand){var line=["a=candidate:"+cand.foundation,cand.component,cand.protocol,cand.priority,cand.ip,cand.port,"typ",cand.type].join(" ");switch(line+=" ",cand.type){case"srflx":case"prflx":case"relay":cand.hasOwnAttribute("rel-addr")&&cand.hasOwnAttribute("rel-port")&&(line+="raddr",line+=" ",line+=cand["rel-addr"],line+=" ",line+="rport",line+=" ",line+=cand["rel-port"],line+=" ")}return cand.hasOwnAttribute("tcptype")&&(line+="tcptype",line+=" ",line+=cand.tcptype,line+=" "),line+="generation",line+=" ",line+=cand.hasOwnAttribute("generation")?cand.generation:"0"},parse_ssrc:function(desc){for(var lines=desc.split("\r\n"),data={},i=0;i<lines.length;i++)if("a=ssrc:"==lines[i].substring(0,7)){var idx=lines[i].indexOf(" ");data[lines[i].substr(idx+1).split(":",2)[0]]=lines[i].substr(idx+1).split(":",2)[1]}return data},parse_rtcpfb:function(line){var parts=line.substr(10).split(" "),data={};return data.pt=parts.shift(),data.type=parts.shift(),data.params=parts,data},parse_extmap:function(line){var parts=line.substr(9).split(" "),data={};return data.value=parts.shift(),-1!=data.value.indexOf("/")?(data.direction=data.value.substr(data.value.indexOf("/")+1),data.value=data.value.substr(0,data.value.indexOf("/"))):data.direction="both",data.uri=parts.shift(),data.params=parts,data},find_line:function(haystack,needle,sessionpart){for(var lines=haystack.split("\r\n"),i=0;i<lines.length;i++)if(lines[i].substring(0,needle.length)==needle)return lines[i];if(!sessionpart)return!1;lines=sessionpart.split("\r\n");for(var j=0;j<lines.length;j++)if(lines[j].substring(0,needle.length)==needle)return lines[j];return!1},find_lines:function(haystack,needle,sessionpart){for(var lines=haystack.split("\r\n"),needles=[],i=0;i<lines.length;i++)lines[i].substring(0,needle.length)==needle&&needles.push(lines[i]);if(needles.length||!sessionpart)return needles;lines=sessionpart.split("\r\n");for(var j=0;j<lines.length;j++)lines[j].substring(0,needle.length)==needle&&needles.push(lines[j]);return needles},candidateToJingle:function(line){if(0===line.indexOf("candidate:"))line="a="+line;else if("a=candidate:"!=line.substring(0,12))return console.log("parseCandidate called with a line that is not a candidate line"),console.log(line),null;"\r\n"==line.substring(line.length-2)&&(line=line.substring(0,line.length-2));var i,candidate={},elems=line.split(" ");if("typ"!=elems[6])return console.log("did not find typ in the right place"),console.log(line),null;for(candidate.foundation=elems[0].substring(12),candidate.component=elems[1],candidate.protocol=elems[2].toLowerCase(),candidate.priority=elems[3],candidate.ip=elems[4],candidate.port=elems[5],candidate.type=elems[7],candidate.generation="0",i=8;i<elems.length;i+=2)switch(elems[i]){case"raddr":candidate["rel-addr"]=elems[i+1];break;case"rport":candidate["rel-port"]=elems[i+1];break;case"generation":candidate.generation=elems[i+1];break;case"tcptype":candidate.tcptype=elems[i+1];break;default:console.log('not translating "'+elems[i]+'" = "'+elems[i+1]+'"')}return candidate.network="1",candidate.id=Math.random().toString(36).substr(2,10),candidate},candidateFromJingle:function(cand){var parts=["a=candidate:"+cand.getAttribute("foundation"),cand.getAttribute("component"),cand.getAttribute("protocol"),cand.getAttribute("priority"),cand.getAttribute("ip"),cand.getAttribute("port"),"typ",cand.getAttribute("type")];switch(cand.getAttribute("type")){case"srflx":case"prflx":case"relay":cand.getAttribute("rel-addr")&&cand.getAttribute("rel-port")&&(parts.push("raddr"),parts.push(cand.getAttribute("rel-addr")),parts.push("rport"),parts.push(cand.getAttribute("rel-port")))}return parts.push("generation"),parts.push(cand.getAttribute("generation")||"0"),parts.join(" ")+"\r\n"}}}(jQuery);/*!
- * Source: lib/strophe.jingle/strophe.jingle.adapter.js, license: MIT, url: https://github.com/ESTOS/strophe.jingle
- */
-var setupRTC,getUserMediaWithConstraints,TraceablePeerConnection;!function($){TraceablePeerConnection=function(ice_config,constraints){var self=this,RTCPeerconnection=navigator.mozGetUserMedia?mozRTCPeerConnection:webkitRTCPeerConnection;this.peerconnection=new RTCPeerconnection(ice_config,constraints),this.updateLog=[],this.stats={},this.statsinterval=null,this.maxstats=300,this.trace=function(what,info){self.updateLog.push({time:new Date,type:what,value:info||""})},this.onicecandidate=null,this.peerconnection.onicecandidate=function(event){self.trace("onicecandidate",JSON.stringify(event.candidate,null," ")),null!==self.onicecandidate&&self.onicecandidate(event)},this.onaddstream=null,this.peerconnection.onaddstream=function(event){self.trace("onaddstream",event.stream.id),null!==self.onaddstream&&self.onaddstream(event)},this.onremovestream=null,this.peerconnection.onremovestream=function(event){self.trace("onremovestream",event.stream.id),null!==self.onremovestream&&self.onremovestream(event)},this.onsignalingstatechange=null,this.peerconnection.onsignalingstatechange=function(event){self.trace("onsignalingstatechange",self.signalingState),null!==self.onsignalingstatechange&&self.onsignalingstatechange(event)},this.oniceconnectionstatechange=null,this.peerconnection.oniceconnectionstatechange=function(event){self.trace("oniceconnectionstatechange",self.iceConnectionState),null!==self.oniceconnectionstatechange&&self.oniceconnectionstatechange(event)},this.onnegotiationneeded=null,this.peerconnection.onnegotiationneeded=function(event){self.trace("onnegotiationneeded"),null!==self.onnegotiationneeded&&self.onnegotiationneeded(event)},self.ondatachannel=null,this.peerconnection.ondatachannel=function(event){self.trace("ondatachannel",event),null!==self.ondatachannel&&self.ondatachannel(event)},navigator.mozGetUserMedia||(this.statsinterval=window.setInterval(function(){self.peerconnection.getStats(function(stats){for(var results=stats.result(),i=0;i<results.length;++i){var now=new Date;results[i].names().forEach(function(name){var id=results[i].id+"-"+name;self.stats[id]||(self.stats[id]={startTime:now,endTime:now,values:[],times:[]}),self.stats[id].values.push(results[i].stat(name)),self.stats[id].times.push(now.getTime()),self.stats[id].values.length>self.maxstats&&(self.stats[id].values.shift(),self.stats[id].times.shift()),self.stats[id].endTime=now})}})},1e3))},dumpSDP=function(description){return"type: "+description.type+"\r\n"+description.sdp},["signalingState","iceConnectionState","localDescription","remoteDescription"].forEach(function(prop){Object.defineProperty(TraceablePeerConnection.prototype,prop,{get:function(){return this.peerconnection[prop]}})}),TraceablePeerConnection.prototype.addStream=function(stream){this.trace("addStream",stream.id),this.peerconnection.addStream(stream)},TraceablePeerConnection.prototype.removeStream=function(stream){this.trace("removeStream",stream.id),this.peerconnection.removeStream(stream)},TraceablePeerConnection.prototype.createDataChannel=function(label,opts){this.trace("createDataChannel",label,opts),this.peerconnection.createDataChannel(label,opts)},TraceablePeerConnection.prototype.setLocalDescription=function(description,successCallback,failureCallback){var self=this;this.trace("setLocalDescription",dumpSDP(description)),this.peerconnection.setLocalDescription(description,function(){self.trace("setLocalDescriptionOnSuccess"),successCallback()},function(err){self.trace("setLocalDescriptionOnFailure",err),failureCallback(err)})},TraceablePeerConnection.prototype.setRemoteDescription=function(description,successCallback,failureCallback){var self=this;this.trace("setRemoteDescription",dumpSDP(description)),this.peerconnection.setRemoteDescription(description,function(){self.trace("setRemoteDescriptionOnSuccess"),successCallback()},function(err){self.trace("setRemoteDescriptionOnFailure",err),failureCallback(err)})},TraceablePeerConnection.prototype.close=function(){this.trace("stop"),null!==this.statsinterval&&(window.clearInterval(this.statsinterval),this.statsinterval=null),this.peerconnection.close()},TraceablePeerConnection.prototype.createOffer=function(successCallback,failureCallback,constraints){var self=this;this.trace("createOffer",JSON.stringify(constraints,null," ")),this.peerconnection.createOffer(function(offer){self.trace("createOfferOnSuccess",dumpSDP(offer)),successCallback(offer)},function(err){self.trace("createOfferOnFailure",err),failureCallback(err)},constraints)},TraceablePeerConnection.prototype.createAnswer=function(successCallback,failureCallback,constraints){var self=this;this.trace("createAnswer",JSON.stringify(constraints,null," ")),this.peerconnection.createAnswer(function(answer){self.trace("createAnswerOnSuccess",dumpSDP(answer)),successCallback(answer)},function(err){self.trace("createAnswerOnFailure",err),failureCallback(err)},constraints)},TraceablePeerConnection.prototype.addIceCandidate=function(candidate,successCallback,failureCallback){var self=this;this.trace("addIceCandidate",JSON.stringify(candidate,null," ")),this.peerconnection.addIceCandidate(candidate),this.peerconnection.addIceCandidate(candidate,function(){self.trace("addIceCandidateOnSuccess"),successCallback&&successCallback()},function(err){self.trace("addIceCandidateOnFailure",err),failureCallback&&failureCallback(err)})},TraceablePeerConnection.prototype.getStats=function(callback){navigator.mozGetUserMedia||this.peerconnection.getStats(callback)},setupRTC=function(){var RTC=null;if(navigator.mozGetUserMedia&&mozRTCPeerConnection){console.log("This appears to be Firefox");var version=navigator.userAgent.match(/Firefox/)?parseInt(navigator.userAgent.match(/Firefox\/([0-9]+)\./)[1],10):0;version>=22&&(RTC={peerconnection:mozRTCPeerConnection,browser:"firefox",getUserMedia:navigator.mozGetUserMedia.bind(navigator),attachMediaStream:function(element,stream){element[0].mozSrcObject=stream,element[0].play()},pc_constraints:{}},RTCSessionDescription=mozRTCSessionDescription,RTCIceCandidate=mozRTCIceCandidate)}else navigator.webkitGetUserMedia&&(console.log("This appears to be Chrome"),RTC={peerconnection:webkitRTCPeerConnection,browser:"chrome",getUserMedia:navigator.webkitGetUserMedia.bind(navigator),attachMediaStream:function(element,stream){element.attr("src",webkitURL.createObjectURL(stream))},pc_constraints:{optional:[{DtlsSrtpKeyAgreement:"true"}]}});if(null===RTC)try{console.log("Browser does not appear to be WebRTC-capable")}catch(e){}return RTC},getUserMediaWithConstraints=function(um,resolution,bandwidth,fps){var constraints={audio:!1,video:!1};switch(um.indexOf("video")>=0&&(constraints.video={mandatory:{}}),um.indexOf("audio")>=0&&(constraints.audio={}),um.indexOf("screen")>=0&&(constraints.video={mandatory:{chromeMediaSource:"screen"}}),resolution&&!constraints.video&&(constraints.video={mandatory:{}}),resolution){case"1080":case"fullhd":constraints.video.mandatory.minWidth=1920,constraints.video.mandatory.minHeight=1080;break;case"720":case"hd":constraints.video.mandatory.minWidth=1280,constraints.video.mandatory.minHeight=720;break;case"360":constraints.video.mandatory.minWidth=640,constraints.video.mandatory.minHeight=360;break;case"180":constraints.video.mandatory.minWidth=320,constraints.video.mandatory.minHeight=180;break;case"960":constraints.video.mandatory.minWidth=960,constraints.video.mandatory.minHeight=720;break;case"640":case"vga":constraints.video.mandatory.minWidth=640,constraints.video.mandatory.minHeight=480;break;case"320":constraints.video.mandatory.minWidth=320,constraints.video.mandatory.minHeight=240;break;default:-1!=navigator.userAgent.indexOf("Android")&&(constraints.video.mandatory.minWidth=320,constraints.video.mandatory.minHeight=240,constraints.video.mandatory.maxFrameRate=15)}constraints.video.minWidth&&(constraints.video.maxWidth=constraints.video.minWidth),constraints.video.minHeight&&(constraints.video.maxHeight=constraints.video.minHeight),bandwidth&&(constraints.video||(constraints.video={mandatory:{}}),constraints.video.optional=[{bandwidth:bandwidth}]),fps&&(constraints.video||(constraints.video={mandatory:{}}),constraints.video.mandatory.minFrameRate=fps);try{RTC.getUserMedia(constraints,function(stream){console.log("onUserMediaSuccess"),$(document).trigger("mediaready.jingle",[stream])},function(error){console.warn("Failed to get access to local media. Error ",error),$(document).trigger("mediafailure.jingle",[error])})}catch(e){console.error("GUM failed: ",e),$(document).trigger("mediafailure.jingle")}}}(jQuery),function(root,factory){"function"==typeof define&&define.amd?define(factory):"undefined"!=typeof module&&module.exports?module.exports=factory():root.Salsa20=factory()}(this,function(){function Salsa20(key,nonce){this.rounds=20,this.sigmaWords=[1634760805,857760878,2036477234,1797285236],this.keyWords=[],this.nonceWords=[0,0],this.counterWords=[0,0],this.block=[],this.blockUsed=64,this.setKey(key),this.setNonce(nonce)}return Salsa20.prototype.setKey=function(key){for(var i=0,j=0;8>i;i++,j+=4)this.keyWords[i]=255&key[j]|(255&key[j+1])<<8|(255&key[j+2])<<16|(255&key[j+3])<<24;this._reset()},Salsa20.prototype.setNonce=function(nonce){this.nonceWords[0]=255&nonce[0]|(255&nonce[1])<<8|(255&nonce[2])<<16|(255&nonce[3])<<24,this.nonceWords[1]=255&nonce[4]|(255&nonce[5])<<8|(255&nonce[6])<<16|(255&nonce[7])<<24,this._reset()},Salsa20.prototype.getBytes=function(numberOfBytes){for(var out=new Array(numberOfBytes),i=0;numberOfBytes>i;i++)64==this.blockUsed&&(this._generateBlock(),this._incrementCounter(),this.blockUsed=0),out[i]=this.block[this.blockUsed],this.blockUsed++;return out},Salsa20.prototype.getHexString=function(numberOfBytes){for(var hex=["0","1","2","3","4","5","6","7","8","9","a","b","c","d","e","f"],out=[],bytes=this.getBytes(numberOfBytes),i=0;i<bytes.length;i++)out.push(hex[bytes[i]>>4&15]),out.push(hex[15&bytes[i]]);return out.join("")},Salsa20.prototype._reset=function(){this.counterWords[0]=0,this.counterWords[1]=0,this.blockUsed=64},Salsa20.prototype._incrementCounter=function(){this.counterWords[0]=this.counterWords[0]+1&4294967295,0==this.counterWords[0]&&(this.counterWords[1]=this.counterWords[1]+1&4294967295)},Salsa20.prototype._generateBlock=function(){for(var u,j0=this.sigmaWords[0],j1=this.keyWords[0],j2=this.keyWords[1],j3=this.keyWords[2],j4=this.keyWords[3],j5=this.sigmaWords[1],j6=this.nonceWords[0],j7=this.nonceWords[1],j8=this.counterWords[0],j9=this.counterWords[1],j10=this.sigmaWords[2],j11=this.keyWords[4],j12=this.keyWords[5],j13=this.keyWords[6],j14=this.keyWords[7],j15=this.sigmaWords[3],x0=j0,x1=j1,x2=j2,x3=j3,x4=j4,x5=j5,x6=j6,x7=j7,x8=j8,x9=j9,x10=j10,x11=j11,x12=j12,x13=j13,x14=j14,x15=j15,i=0;i<this.rounds;i+=2)u=x0+x12,x4^=u<<7|u>>>25,u=x4+x0,x8^=u<<9|u>>>23,u=x8+x4,x12^=u<<13|u>>>19,u=x12+x8,x0^=u<<18|u>>>14,u=x5+x1,x9^=u<<7|u>>>25,u=x9+x5,x13^=u<<9|u>>>23,u=x13+x9,x1^=u<<13|u>>>19,u=x1+x13,x5^=u<<18|u>>>14,u=x10+x6,x14^=u<<7|u>>>25,u=x14+x10,x2^=u<<9|u>>>23,u=x2+x14,x6^=u<<13|u>>>19,u=x6+x2,x10^=u<<18|u>>>14,u=x15+x11,x3^=u<<7|u>>>25,u=x3+x15,x7^=u<<9|u>>>23,u=x7+x3,x11^=u<<13|u>>>19,u=x11+x7,x15^=u<<18|u>>>14,u=x0+x3,x1^=u<<7|u>>>25,u=x1+x0,x2^=u<<9|u>>>23,u=x2+x1,x3^=u<<13|u>>>19,u=x3+x2,x0^=u<<18|u>>>14,u=x5+x4,x6^=u<<7|u>>>25,u=x6+x5,x7^=u<<9|u>>>23,u=x7+x6,x4^=u<<13|u>>>19,u=x4+x7,x5^=u<<18|u>>>14,u=x10+x9,x11^=u<<7|u>>>25,u=x11+x10,x8^=u<<9|u>>>23,u=x8+x11,x9^=u<<13|u>>>19,u=x9+x8,x10^=u<<18|u>>>14,u=x15+x14,x12^=u<<7|u>>>25,u=x12+x15,x13^=u<<9|u>>>23,u=x13+x12,x14^=u<<13|u>>>19,u=x14+x13,x15^=u<<18|u>>>14;x0+=j0,x1+=j1,x2+=j2,x3+=j3,x4+=j4,x5+=j5,x6+=j6,x7+=j7,x8+=j8,x9+=j9,x10+=j10,x11+=j11,x12+=j12,x13+=j13,x14+=j14,x15+=j15,this.block[0]=x0>>>0&255,this.block[1]=x0>>>8&255,this.block[2]=x0>>>16&255,this.block[3]=x0>>>24&255,this.block[4]=x1>>>0&255,this.block[5]=x1>>>8&255,this.block[6]=x1>>>16&255,this.block[7]=x1>>>24&255,this.block[8]=x2>>>0&255,this.block[9]=x2>>>8&255,this.block[10]=x2>>>16&255,this.block[11]=x2>>>24&255,this.block[12]=x3>>>0&255,this.block[13]=x3>>>8&255,this.block[14]=x3>>>16&255,this.block[15]=x3>>>24&255,this.block[16]=x4>>>0&255,this.block[17]=x4>>>8&255,this.block[18]=x4>>>16&255,this.block[19]=x4>>>24&255,this.block[20]=x5>>>0&255,this.block[21]=x5>>>8&255,this.block[22]=x5>>>16&255,this.block[23]=x5>>>24&255,this.block[24]=x6>>>0&255,this.block[25]=x6>>>8&255,this.block[26]=x6>>>16&255,this.block[27]=x6>>>24&255,this.block[28]=x7>>>0&255,this.block[29]=x7>>>8&255,this.block[30]=x7>>>16&255,this.block[31]=x7>>>24&255,this.block[32]=x8>>>0&255,this.block[33]=x8>>>8&255,this.block[34]=x8>>>16&255,this.block[35]=x8>>>24&255,this.block[36]=x9>>>0&255,this.block[37]=x9>>>8&255,this.block[38]=x9>>>16&255,this.block[39]=x9>>>24&255,this.block[40]=x10>>>0&255,this.block[41]=x10>>>8&255,this.block[42]=x10>>>16&255,this.block[43]=x10>>>24&255,this.block[44]=x11>>>0&255,this.block[45]=x11>>>8&255,this.block[46]=x11>>>16&255,this.block[47]=x11>>>24&255,this.block[48]=x12>>>0&255,this.block[49]=x12>>>8&255,this.block[50]=x12>>>16&255,this.block[51]=x12>>>24&255,this.block[52]=x13>>>0&255,this.block[53]=x13>>>8&255,this.block[54]=x13>>>16&255,this.block[55]=x13>>>24&255,this.block[56]=x14>>>0&255,this.block[57]=x14>>>8&255,this.block[58]=x14>>>16&255,this.block[59]=x14>>>24&255,this.block[60]=x15>>>0&255,this.block[61]=x15>>>8&255,this.block[62]=x15>>>16&255,this.block[63]=x15>>>24&255},Salsa20}),function(root,factory){if("function"==typeof define&&define.amd)define(factory.bind(root,root.crypto||root.msCrypto));else if("undefined"!=typeof module&&module.exports)module.exports=factory(require("crypto"));else try{root.BigInt=factory(root.crypto||root.msCrypto)}catch(e){console.warn(e.message)}}(this,function(crypto){function findPrimes(n){var i,s,p,ans;for(s=new Array(n),i=0;n>i;i++)s[i]=0;for(s[0]=2,p=0;s[p]<n;){for(i=s[p]*s[p];n>i;i+=s[p])s[i]=1;for(p++,s[p]=s[p-1]+1;s[p]<n&&s[s[p]];s[p]++);}for(ans=new Array(p),i=0;p>i;i++)ans[i]=s[i];return ans}function millerRabin(x,b){var i,j,k,s;if(mr_x1.length!=x.length&&(mr_x1=dup(x),mr_r=dup(x),mr_a=dup(x)),copy_(mr_a,b),copy_(mr_r,x),copy_(mr_x1,x),addInt_(mr_r,-1),addInt_(mr_x1,-1),isZero(mr_r))return 0;for(k=0;0==mr_r[k];k++);for(i=1,j=2;mr_r[k]%j==0;j*=2,i++);if(s=k*bpe+i-1,s&&rightShift_(mr_r,s),powMod_(mr_a,mr_r,x),!equalsInt(mr_a,1)&&!equals(mr_a,mr_x1)){for(j=1;s-1>=j&&!equals(mr_a,mr_x1);){if(squareMod_(mr_a,x),equalsInt(mr_a,1))return 0;j++}if(!equals(mr_a,mr_x1))return 0}return 1}function bitSize(x){var j,z,w;for(j=x.length-1;0==x[j]&&j>0;j--);for(z=0,w=x[j];w;w>>=1,z++);return z+=bpe*j}function expand(x,n){var ans=int2bigInt(0,(x.length>n?x.length:n)*bpe,0);return copy_(ans,x),ans}function mod(x,n){var ans=dup(x);return mod_(ans,n),trim(ans,1)}function mult(x,y){var ans=expand(x,x.length+y.length);return mult_(ans,y),trim(ans,1)}function powMod(x,y,n){var ans=expand(x,n.length);return powMod_(ans,trim(y,2),trim(n,2),0),trim(ans,1)}function sub(x,y){var ans=expand(x,x.length>y.length?x.length+1:y.length+1);return sub_(ans,y),trim(ans,1)}function add(x,y){var ans=expand(x,x.length>y.length?x.length+1:y.length+1);return add_(ans,y),trim(ans,1)}function inverseMod(x,n){var s,ans=expand(x,n.length);return s=inverseMod_(ans,n),s?trim(ans,1):null}function multMod(x,y,n){var ans=expand(x,n.length);return multMod_(ans,y,n),trim(ans,1)}function randBigInt(n,s){var a,b;return a=Math.floor((n-1)/bpe)+2,b=int2bigInt(0,0,a),randBigInt_(b,n,s),b}function randBigInt_(b,n,s){var i,a;for(i=0;i<b.length;i++)b[i]=0;for(a=Math.floor((n-1)/bpe)+1,i=0;a>i;i++)b[i]=randomBitInt(bpe);b[a-1]&=(2<<(n-1)%bpe)-1,1==s&&(b[a-1]|=1<<(n-1)%bpe)}function inverseMod_(x,n){var k=1+2*Math.max(x.length,n.length);if(!(1&x[0]||1&n[0]))return copyInt_(x,0),0;for(eg_u.length!=k&&(eg_u=new Array(k),eg_v=new Array(k),eg_A=new Array(k),eg_B=new Array(k),eg_C=new Array(k),eg_D=new Array(k)),copy_(eg_u,x),copy_(eg_v,n),copyInt_(eg_A,1),copyInt_(eg_B,0),copyInt_(eg_C,0),copyInt_(eg_D,1);;){for(;!(1&eg_u[0]);)halve_(eg_u),1&eg_A[0]||1&eg_B[0]?(add_(eg_A,n),halve_(eg_A),sub_(eg_B,x),halve_(eg_B)):(halve_(eg_A),halve_(eg_B));for(;!(1&eg_v[0]);)halve_(eg_v),1&eg_C[0]||1&eg_D[0]?(add_(eg_C,n),halve_(eg_C),sub_(eg_D,x),halve_(eg_D)):(halve_(eg_C),halve_(eg_D));if(greater(eg_v,eg_u)?(sub_(eg_v,eg_u),sub_(eg_C,eg_A),sub_(eg_D,eg_B)):(sub_(eg_u,eg_v),sub_(eg_A,eg_C),sub_(eg_B,eg_D)),equalsInt(eg_u,0)){for(;negative(eg_C);)add_(eg_C,n);return copy_(x,eg_C),equalsInt(eg_v,1)?1:(copyInt_(x,0),0)}}}function inverseModInt(x,n){for(var a=1,b=0;;){if(1==x)return a;if(0==x)return 0;if(b-=a*Math.floor(n/x),n%=x,1==n)return b;if(0==n)return 0;a-=b*Math.floor(x/n),x%=n}}function negative(x){return x[x.length-1]>>bpe-1&1}function greaterShift(x,y,shift){var i,kx=x.length,ky=y.length,k=ky>kx+shift?kx+shift:ky;for(i=ky-1-shift;kx>i&&i>=0;i++)if(x[i]>0)return 1;for(i=kx-1+shift;ky>i;i++)if(y[i]>0)return 0;for(i=k-1;i>=shift;i--){if(x[i-shift]>y[i])return 1;if(x[i-shift]<y[i])return 0}return 0}function greater(x,y){var i,k=x.length<y.length?x.length:y.length;for(i=x.length;i<y.length;i++)if(y[i])return 0;for(i=y.length;i<x.length;i++)if(x[i])return 1;for(i=k-1;i>=0;i--){if(x[i]>y[i])return 1;if(x[i]<y[i])return 0}return 0}function divide_(x,y,q,r){var kx,ky,i,y1,y2,c,a,b;for(copy_(r,x),ky=y.length;0==y[ky-1];ky--);for(b=y[ky-1],a=0;b;a++)b>>=1;for(a=bpe-a,leftShift_(y,a),leftShift_(r,a),kx=r.length;0==r[kx-1]&&kx>ky;kx--);for(copyInt_(q,0);!greaterShift(y,r,kx-ky);)subShift_(r,y,kx-ky),q[kx-ky]++;for(i=kx-1;i>=ky;i--){for(q[i-ky]=r[i]==y[ky-1]?mask:Math.floor((r[i]*radix+r[i-1])/y[ky-1]);y2=(ky>1?y[ky-2]:0)*q[i-ky],c=y2,y2&=mask,c=(c-y2)/radix,y1=c+q[i-ky]*y[ky-1],c=y1,y1&=mask,c=(c-y1)/radix,c==r[i]?y1==r[i-1]?y2>(i>1?r[i-2]:0):y1>r[i-1]:c>r[i];)q[i-ky]--;linCombShift_(r,y,-q[i-ky],i-ky),negative(r)&&(addShift_(r,y,i-ky),q[i-ky]--)}rightShift_(y,a),rightShift_(r,a)}function modInt(x,n){var i,c=0;for(i=x.length-1;i>=0;i--)c=(c*radix+x[i])%n;return c}function int2bigInt(t,bits,minSize){var k,buff;return k=Math.ceil(bits/bpe)+1,k=minSize>k?minSize:k,buff=new Array(k),copyInt_(buff,t),buff}function str2bigInt(s,base,minSize){var d,i,x,y,kk,k=s.length;if(-1==base){for(x=new Array(0);;){for(y=new Array(x.length+1),i=0;i<x.length;i++)y[i+1]=x[i];if(y[0]=parseInt(s,10),x=y,d=s.indexOf(",",0),1>d)break;if(s=s.substring(d+1),0==s.length)break}return x.length<minSize?(y=new Array(minSize),copy_(y,x),y):x}for(var bb=base,p=0,b=1==base?k:0;bb>1;)1&bb&&(p=1),b+=k,bb>>=1;for(b+=p*k,x=int2bigInt(0,b,0),i=0;k>i&&(d=digitsStr.indexOf(s.substring(i,i+1),0),36>=base&&d>=36&&(d-=26),!(d>=base||0>d));i++)multInt_(x,base),addInt_(x,d);for(k=x.length;k>0&&!x[k-1];k--);for(k=minSize>k+1?minSize:k+1,y=new Array(k),kk=k<x.length?k:x.length,i=0;kk>i;i++)y[i]=x[i];for(;k>i;i++)y[i]=0;return y}function equalsInt(x,y){var i;if(x[0]!=y)return 0;for(i=1;i<x.length;i++)if(x[i])return 0;return 1}function equals(x,y){var i,k=x.length<y.length?x.length:y.length;for(i=0;k>i;i++)if(x[i]!=y[i])return 0;if(x.length>y.length){for(;i<x.length;i++)if(x[i])return 0}else for(;i<y.length;i++)if(y[i])return 0;return 1}function isZero(x){var i;for(i=0;i<x.length;i++)if(x[i])return 0;return 1}function bigInt2str(x,base){var i,t,s="";if(s6.length!=x.length?s6=dup(x):copy_(s6,x),-1==base){for(i=x.length-1;i>0;i--)s+=x[i]+",";s+=x[0]}else for(;!isZero(s6);)t=divInt_(s6,base),s=digitsStr.substring(t,t+1)+s;return 0==s.length&&(s="0"),s}function dup(x){var buff;return buff=new Array(x.length),copy_(buff,x),buff}function copy_(x,y){var i,k=x.length<y.length?x.length:y.length;for(i=0;k>i;i++)x[i]=y[i];for(i=k;i<x.length;i++)x[i]=0}function copyInt_(x,n){var i,c;for(c=n,i=0;i<x.length;i++)x[i]=c&mask,c>>=bpe}function addInt_(x,n){var i,k,c,b;for(x[0]+=n,k=x.length,c=0,i=0;k>i;i++)if(c+=x[i],b=0,0>c&&(b=c&mask,b=-((c-b)/radix),c+=b*radix),x[i]=c&mask,c=(c-x[i])/radix-b,!c)return}function rightShift_(x,n){var i,k=Math.floor(n/bpe);if(k){for(i=0;i<x.length-k;i++)x[i]=x[i+k];for(;i<x.length;i++)x[i]=0;n%=bpe}for(i=0;i<x.length-1;i++)x[i]=mask&(x[i+1]<<bpe-n|x[i]>>n);x[i]>>=n}function halve_(x){var i;for(i=0;i<x.length-1;i++)x[i]=mask&(x[i+1]<<bpe-1|x[i]>>1);x[i]=x[i]>>1|x[i]&radix>>1}function leftShift_(x,n){var i,k=Math.floor(n/bpe);if(k){for(i=x.length;i>=k;i--)x[i]=x[i-k];for(;i>=0;i--)x[i]=0;n%=bpe}if(n){for(i=x.length-1;i>0;i--)x[i]=mask&(x[i]<<n|x[i-1]>>bpe-n);x[i]=mask&x[i]<<n}}function multInt_(x,n){var i,k,c,b;if(n)for(k=x.length,c=0,i=0;k>i;i++)c+=x[i]*n,b=0,0>c&&(b=c&mask,b=-((c-b)/radix),c+=b*radix),x[i]=c&mask,c=(c-x[i])/radix-b}function divInt_(x,n){var i,s,r=0;for(i=x.length-1;i>=0;i--)s=r*radix+x[i],x[i]=Math.floor(s/n),r=s%n;return r}function linCombShift_(x,y,b,ys){var i,c,k,kk;for(k=x.length<ys+y.length?x.length:ys+y.length,kk=x.length,c=0,i=ys;k>i;i++)c+=x[i]+b*y[i-ys],x[i]=c&mask,c=(c-x[i])/radix;for(i=k;c&&kk>i;i++)c+=x[i],x[i]=c&mask,c=(c-x[i])/radix}function addShift_(x,y,ys){var i,c,k,kk;for(k=x.length<ys+y.length?x.length:ys+y.length,kk=x.length,c=0,i=ys;k>i;i++)c+=x[i]+y[i-ys],x[i]=c&mask,c=(c-x[i])/radix;for(i=k;c&&kk>i;i++)c+=x[i],x[i]=c&mask,c=(c-x[i])/radix}function subShift_(x,y,ys){var i,c,k,kk;for(k=x.length<ys+y.length?x.length:ys+y.length,kk=x.length,c=0,i=ys;k>i;i++)c+=x[i]-y[i-ys],x[i]=c&mask,c=(c-x[i])/radix;for(i=k;c&&kk>i;i++)c+=x[i],x[i]=c&mask,c=(c-x[i])/radix}function sub_(x,y){var i,c,k;for(k=x.length<y.length?x.length:y.length,c=0,i=0;k>i;i++)c+=x[i]-y[i],x[i]=c&mask,c=(c-x[i])/radix;for(i=k;c&&i<x.length;i++)c+=x[i],x[i]=c&mask,c=(c-x[i])/radix}function add_(x,y){var i,c,k;for(k=x.length<y.length?x.length:y.length,c=0,i=0;k>i;i++)c+=x[i]+y[i],x[i]=c&mask,c=(c-x[i])/radix;for(i=k;c&&i<x.length;i++)c+=x[i],x[i]=c&mask,c=(c-x[i])/radix}function mult_(x,y){var i;for(ss.length!=2*x.length&&(ss=new Array(2*x.length)),copyInt_(ss,0),i=0;i<y.length;i++)y[i]&&linCombShift_(ss,x,y[i],i);copy_(x,ss)}function mod_(x,n){s4.length!=x.length?s4=dup(x):copy_(s4,x),s5.length!=x.length&&(s5=dup(x)),divide_(s4,n,s5,x)}function multMod_(x,y,n){var i;for(s0.length!=2*x.length&&(s0=new Array(2*x.length)),copyInt_(s0,0),i=0;i<y.length;i++)y[i]&&linCombShift_(s0,x,y[i],i);mod_(s0,n),copy_(x,s0)}function squareMod_(x,n){var i,j,c,kx,k;for(kx=x.length;kx>0&&!x[kx-1];kx--);for(k=kx>n.length?2*kx:2*n.length,s0.length!=k&&(s0=new Array(k)),copyInt_(s0,0),i=0;kx>i;i++){for(c=s0[2*i]+x[i]*x[i],s0[2*i]=c&mask,c=(c-s0[2*i])/radix,j=i+1;kx>j;j++)c=s0[i+j]+2*x[i]*x[j]+c,s0[i+j]=c&mask,c=(c-s0[i+j])/radix;s0[i+kx]=c}mod_(s0,n),copy_(x,s0)}function trim(x,k){var i,y;for(i=x.length;i>0&&!x[i-1];i--);return y=new Array(i+k),copy_(y,x),y}function powMod_(x,y,n){var k1,k2,kn,np;if(s7.length!=n.length&&(s7=dup(n)),0!=(1&n[0])){for(copyInt_(s7,0),kn=n.length;kn>0&&!n[kn-1];kn--);for(np=radix-inverseModInt(modInt(n,radix),radix),s7[kn]=1,multMod_(x,s7,n),s3.length!=x.length?s3=dup(x):copy_(s3,x),k1=y.length-1;k1>0&!y[k1];k1--);if(0==y[k1])return void copyInt_(x,1);for(k2=1<<bpe-1;k2&&!(y[k1]&k2);k2>>=1);for(;;){if(!(k2>>=1)){if(k1--,0>k1)return void mont_(x,one,n,np);k2=1<<bpe-1}mont_(x,x,n,np),k2&y[k1]&&mont_(x,s3,n,np)}}else for(copy_(s7,x),copyInt_(x,1);!equalsInt(y,0);)1&y[0]&&multMod_(x,s7,n),divInt_(y,2),squareMod_(s7,n)}function mont_(x,y,n,np){var i,j,c,ui,t,t2,ks,kn=n.length,ky=y.length;for(sa.length!=kn&&(sa=new Array(kn)),copyInt_(sa,0);kn>0&&0==n[kn-1];kn--);for(;ky>0&&0==y[ky-1];ky--);for(ks=sa.length-1,i=0;kn>i;i++){for(t=sa[0]+x[i]*y[0],ui=(t&mask)*np&mask,c=t+ui*n[0],c=(c-(c&mask))/radix,t=x[i],j=1;ky-4>j;)c+=sa[j]+ui*n[j]+t*y[j],t2=sa[j-1]=c&mask,c=(c-t2)/radix,j++,c+=sa[j]+ui*n[j]+t*y[j],t2=sa[j-1]=c&mask,c=(c-t2)/radix,j++,c+=sa[j]+ui*n[j]+t*y[j],t2=sa[j-1]=c&mask,c=(c-t2)/radix,j++,c+=sa[j]+ui*n[j]+t*y[j],t2=sa[j-1]=c&mask,c=(c-t2)/radix,j++,c+=sa[j]+ui*n[j]+t*y[j],t2=sa[j-1]=c&mask,c=(c-t2)/radix,j++;for(;ky>j;)c+=sa[j]+ui*n[j]+t*y[j],t2=sa[j-1]=c&mask,c=(c-t2)/radix,j++;for(;kn-4>j;)c+=sa[j]+ui*n[j],t2=sa[j-1]=c&mask,c=(c-t2)/radix,j++,c+=sa[j]+ui*n[j],t2=sa[j-1]=c&mask,c=(c-t2)/radix,j++,c+=sa[j]+ui*n[j],t2=sa[j-1]=c&mask,c=(c-t2)/radix,j++,c+=sa[j]+ui*n[j],t2=sa[j-1]=c&mask,c=(c-t2)/radix,j++,c+=sa[j]+ui*n[j],t2=sa[j-1]=c&mask,c=(c-t2)/radix,j++;for(;kn>j;)c+=sa[j]+ui*n[j],t2=sa[j-1]=c&mask,c=(c-t2)/radix,j++;for(;ks>j;)c+=sa[j],t2=sa[j-1]=c&mask,c=(c-t2)/radix,j++;sa[j-1]=c&mask}greater(n,sa)||sub_(sa,n),copy_(x,sa)}function divMod(num,den,n){return multMod(num,inverseMod(den,n),n)}function subMod(one,two,n){return one=mod(one,n),two=mod(two,n),greater(two,one)&&(one=add(one,n)),sub(one,two)}function twoToThe(m){for(var b=Math.floor(m/bpe)+2,t=new Array(b),i=0;b>i;i++)t[i]=0;return t[b-2]=1<<m%bpe,t}function bigInt2bits(bi,pad){pad||(pad=0),bi=dup(bi);for(var ba="";!isZero(bi);)ba=_num2bin[255&bi[0]]+ba,rightShift_(bi,8);for(;ba.length<pad;)ba="\x00"+ba;return ba}function ba2bigInt(data){var mpi=str2bigInt("0",10,data.length);return data.forEach(function(d,i){i&&leftShift_(mpi,8),mpi[0]|=d}),mpi}function getSeed(){return randomBytes(40)}function randomByte(){return randomBytes(1)[0]}function randomBitInt(k){if(k>31)throw new Error("Too many bits.");var i=0,r=0,b=Math.floor(k/8),mask=(1<<k%8)-1;for(mask&&(r=randomByte()&mask);b>i;i++)r=256*r+randomByte();return r}var bpe=26,radix=1<<bpe,mask=radix-1,digitsStr="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz_=!@#$%^&*()[]{}|;:,.<>/?`~ \\'\"+-",one=int2bigInt(1,1,1),t=new Array(0),ss=t,s0=t,s3=t,s4=t,s5=t,s6=t,s7=t,sa=t,mr_x1=t,mr_r=t,mr_a=t,eg_v=t,eg_u=t,eg_A=t,eg_B=t,eg_C=t,eg_D=t,primes=t,_num2bin=function(){for(var i=0,_num2bin={};256>i;++i)_num2bin[i]=String.fromCharCode(i);return _num2bin}(),randomBytes=function(){if("undefined"!=typeof crypto&&"function"==typeof crypto.randomBytes)return function(n){try{var buf=crypto.randomBytes(n)}catch(e){throw e}return Array.prototype.slice.call(buf,0)};if("undefined"!=typeof crypto&&"function"==typeof crypto.getRandomValues)return function(n){var buf=new Uint8Array(n);return crypto.getRandomValues(buf),Array.prototype.slice.call(buf,0)};throw new Error("Keys should not be generated without CSPRNG.")}();return{str2bigInt:str2bigInt,bigInt2str:bigInt2str,int2bigInt:int2bigInt,multMod:multMod,powMod:powMod,inverseMod:inverseMod,randBigInt:randBigInt,randBigInt_:randBigInt_,equals:equals,equalsInt:equalsInt,sub:sub,mod:mod,modInt:modInt,mult:mult,divInt_:divInt_,rightShift_:rightShift_,dup:dup,greater:greater,add:add,isZero:isZero,bitSize:bitSize,millerRabin:millerRabin,divide_:divide_,trim:trim,primes:primes,findPrimes:findPrimes,getSeed:getSeed,divMod:divMod,subMod:subMod,twoToThe:twoToThe,bigInt2bits:bigInt2bits,ba2bigInt:ba2bigInt}}),function(root,factory){"function"==typeof define&&define.amd?define(factory):"undefined"!=typeof module&&module.exports?module.exports=factory():root.CryptoJS=factory()}(this,function(){var CryptoJS=CryptoJS||function(Math,undefined){var C={},C_lib=C.lib={},Base=C_lib.Base=function(){function F(){}return{extend:function(overrides){F.prototype=this;var subtype=new F;return overrides&&subtype.mixIn(overrides),subtype.hasOwnProperty("init")||(subtype.init=function(){subtype.$super.init.apply(this,arguments)}),subtype.init.prototype=subtype,subtype.$super=this,subtype},create:function(){var instance=this.extend();return instance.init.apply(instance,arguments),instance},init:function(){},mixIn:function(properties){for(var propertyName in properties)properties.hasOwnProperty(propertyName)&&(this[propertyName]=properties[propertyName]);properties.hasOwnProperty("toString")&&(this.toString=properties.toString)},clone:function(){return this.init.prototype.extend(this)}}}(),WordArray=C_lib.WordArray=Base.extend({init:function(words,sigBytes){words=this.words=words||[],this.sigBytes=sigBytes!=undefined?sigBytes:4*words.length},toString:function(encoder){return(encoder||Hex).stringify(this)},concat:function(wordArray){var thisWords=this.words,thatWords=wordArray.words,thisSigBytes=this.sigBytes,thatSigBytes=wordArray.sigBytes;if(this.clamp(),thisSigBytes%4)for(var i=0;thatSigBytes>i;i++){var thatByte=thatWords[i>>>2]>>>24-i%4*8&255;thisWords[thisSigBytes+i>>>2]|=thatByte<<24-(thisSigBytes+i)%4*8}else if(thatWords.length>65535)for(var i=0;thatSigBytes>i;i+=4)thisWords[thisSigBytes+i>>>2]=thatWords[i>>>2];else thisWords.push.apply(thisWords,thatWords);return this.sigBytes+=thatSigBytes,this},clamp:function(){var words=this.words,sigBytes=this.sigBytes;words[sigBytes>>>2]&=4294967295<<32-sigBytes%4*8,words.length=Math.ceil(sigBytes/4)},clone:function(){var clone=Base.clone.call(this);return clone.words=this.words.slice(0),clone},random:function(nBytes){for(var words=[],i=0;nBytes>i;i+=4)words.push(4294967296*Math.random()|0);return new WordArray.init(words,nBytes)}}),C_enc=C.enc={},Hex=C_enc.Hex={stringify:function(wordArray){for(var words=wordArray.words,sigBytes=wordArray.sigBytes,hexChars=[],i=0;sigBytes>i;i++){var bite=words[i>>>2]>>>24-i%4*8&255;hexChars.push((bite>>>4).toString(16)),hexChars.push((15&bite).toString(16))}return hexChars.join("")},parse:function(hexStr){for(var hexStrLength=hexStr.length,words=[],i=0;hexStrLength>i;i+=2)words[i>>>3]|=parseInt(hexStr.substr(i,2),16)<<24-i%8*4;return new WordArray.init(words,hexStrLength/2)}},Latin1=C_enc.Latin1={stringify:function(wordArray){for(var words=wordArray.words,sigBytes=wordArray.sigBytes,latin1Chars=[],i=0;sigBytes>i;i++){var bite=words[i>>>2]>>>24-i%4*8&255;latin1Chars.push(String.fromCharCode(bite))}return latin1Chars.join("")},parse:function(latin1Str){for(var latin1StrLength=latin1Str.length,words=[],i=0;latin1StrLength>i;i++)words[i>>>2]|=(255&latin1Str.charCodeAt(i))<<24-i%4*8;return new WordArray.init(words,latin1StrLength)}},Utf8=C_enc.Utf8={stringify:function(wordArray){try{return decodeURIComponent(escape(Latin1.stringify(wordArray)))}catch(e){throw new Error("Malformed UTF-8 data")}},parse:function(utf8Str){return Latin1.parse(unescape(encodeURIComponent(utf8Str)))}},BufferedBlockAlgorithm=C_lib.BufferedBlockAlgorithm=Base.extend({reset:function(){this._data=new WordArray.init,this._nDataBytes=0},_append:function(data){"string"==typeof data&&(data=Utf8.parse(data)),this._data.concat(data),this._nDataBytes+=data.sigBytes},_process:function(doFlush){var data=this._data,dataWords=data.words,dataSigBytes=data.sigBytes,blockSize=this.blockSize,blockSizeBytes=4*blockSize,nBlocksReady=dataSigBytes/blockSizeBytes;nBlocksReady=doFlush?Math.ceil(nBlocksReady):Math.max((0|nBlocksReady)-this._minBufferSize,0);var nWordsReady=nBlocksReady*blockSize,nBytesReady=Math.min(4*nWordsReady,dataSigBytes);if(nWordsReady){for(var offset=0;nWordsReady>offset;offset+=blockSize)this._doProcessBlock(dataWords,offset);var processedWords=dataWords.splice(0,nWordsReady);data.sigBytes-=nBytesReady}return new WordArray.init(processedWords,nBytesReady)},clone:function(){var clone=Base.clone.call(this);return clone._data=this._data.clone(),clone},_minBufferSize:0}),C_algo=(C_lib.Hasher=BufferedBlockAlgorithm.extend({cfg:Base.extend(),init:function(cfg){this.cfg=this.cfg.extend(cfg),this.reset()},reset:function(){BufferedBlockAlgorithm.reset.call(this),this._doReset()},update:function(messageUpdate){return this._append(messageUpdate),this._process(),this},finalize:function(messageUpdate){messageUpdate&&this._append(messageUpdate);var hash=this._doFinalize();return hash},blockSize:16,_createHelper:function(hasher){return function(message,cfg){return new hasher.init(cfg).finalize(message)}},_createHmacHelper:function(hasher){return function(message,key){return new C_algo.HMAC.init(hasher,key).finalize(message)}}}),C.algo={});return C}(Math);return function(){{var C=CryptoJS,C_lib=C.lib,WordArray=C_lib.WordArray,C_enc=C.enc;C_enc.Base64={stringify:function(wordArray){var words=wordArray.words,sigBytes=wordArray.sigBytes,map=this._map;wordArray.clamp();for(var base64Chars=[],i=0;sigBytes>i;i+=3)for(var byte1=words[i>>>2]>>>24-i%4*8&255,byte2=words[i+1>>>2]>>>24-(i+1)%4*8&255,byte3=words[i+2>>>2]>>>24-(i+2)%4*8&255,triplet=byte1<<16|byte2<<8|byte3,j=0;4>j&&sigBytes>i+.75*j;j++)base64Chars.push(map.charAt(triplet>>>6*(3-j)&63));
-var paddingChar=map.charAt(64);if(paddingChar)for(;base64Chars.length%4;)base64Chars.push(paddingChar);return base64Chars.join("")},parse:function(base64Str){var base64StrLength=base64Str.length,map=this._map,paddingChar=map.charAt(64);if(paddingChar){var paddingIndex=base64Str.indexOf(paddingChar);-1!=paddingIndex&&(base64StrLength=paddingIndex)}for(var words=[],nBytes=0,i=0;base64StrLength>i;i++)if(i%4){var bits1=map.indexOf(base64Str.charAt(i-1))<<i%4*2,bits2=map.indexOf(base64Str.charAt(i))>>>6-i%4*2;words[nBytes>>>2]|=(bits1|bits2)<<24-nBytes%4*8,nBytes++}return WordArray.create(words,nBytes)},_map:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="}}}(),CryptoJS.lib.Cipher||function(undefined){var C=CryptoJS,C_lib=C.lib,Base=C_lib.Base,WordArray=C_lib.WordArray,BufferedBlockAlgorithm=C_lib.BufferedBlockAlgorithm,C_enc=C.enc,Base64=(C_enc.Utf8,C_enc.Base64),C_algo=C.algo,EvpKDF=C_algo.EvpKDF,Cipher=C_lib.Cipher=BufferedBlockAlgorithm.extend({cfg:Base.extend(),createEncryptor:function(key,cfg){return this.create(this._ENC_XFORM_MODE,key,cfg)},createDecryptor:function(key,cfg){return this.create(this._DEC_XFORM_MODE,key,cfg)},init:function(xformMode,key,cfg){this.cfg=this.cfg.extend(cfg),this._xformMode=xformMode,this._key=key,this.reset()},reset:function(){BufferedBlockAlgorithm.reset.call(this),this._doReset()},process:function(dataUpdate){return this._append(dataUpdate),this._process()},finalize:function(dataUpdate){dataUpdate&&this._append(dataUpdate);var finalProcessedData=this._doFinalize();return finalProcessedData},keySize:4,ivSize:4,_ENC_XFORM_MODE:1,_DEC_XFORM_MODE:2,_createHelper:function(){function selectCipherStrategy(key){return"string"==typeof key?PasswordBasedCipher:SerializableCipher}return function(cipher){return{encrypt:function(message,key,cfg){return selectCipherStrategy(key).encrypt(cipher,message,key,cfg)},decrypt:function(ciphertext,key,cfg){return selectCipherStrategy(key).decrypt(cipher,ciphertext,key,cfg)}}}}()}),C_mode=(C_lib.StreamCipher=Cipher.extend({_doFinalize:function(){var finalProcessedBlocks=this._process(!0);return finalProcessedBlocks},blockSize:1}),C.mode={}),BlockCipherMode=C_lib.BlockCipherMode=Base.extend({createEncryptor:function(cipher,iv){return this.Encryptor.create(cipher,iv)},createDecryptor:function(cipher,iv){return this.Decryptor.create(cipher,iv)},init:function(cipher,iv){this._cipher=cipher,this._iv=iv}}),CBC=C_mode.CBC=function(){function xorBlock(words,offset,blockSize){var iv=this._iv;if(iv){var block=iv;this._iv=undefined}else var block=this._prevBlock;for(var i=0;blockSize>i;i++)words[offset+i]^=block[i]}var CBC=BlockCipherMode.extend();return CBC.Encryptor=CBC.extend({processBlock:function(words,offset){var cipher=this._cipher,blockSize=cipher.blockSize;xorBlock.call(this,words,offset,blockSize),cipher.encryptBlock(words,offset),this._prevBlock=words.slice(offset,offset+blockSize)}}),CBC.Decryptor=CBC.extend({processBlock:function(words,offset){var cipher=this._cipher,blockSize=cipher.blockSize,thisBlock=words.slice(offset,offset+blockSize);cipher.decryptBlock(words,offset),xorBlock.call(this,words,offset,blockSize),this._prevBlock=thisBlock}}),CBC}(),C_pad=C.pad={},Pkcs7=C_pad.Pkcs7={pad:function(data,blockSize){for(var blockSizeBytes=4*blockSize,nPaddingBytes=blockSizeBytes-data.sigBytes%blockSizeBytes,paddingWord=nPaddingBytes<<24|nPaddingBytes<<16|nPaddingBytes<<8|nPaddingBytes,paddingWords=[],i=0;nPaddingBytes>i;i+=4)paddingWords.push(paddingWord);var padding=WordArray.create(paddingWords,nPaddingBytes);data.concat(padding)},unpad:function(data){var nPaddingBytes=255&data.words[data.sigBytes-1>>>2];data.sigBytes-=nPaddingBytes}},CipherParams=(C_lib.BlockCipher=Cipher.extend({cfg:Cipher.cfg.extend({mode:CBC,padding:Pkcs7}),reset:function(){Cipher.reset.call(this);var cfg=this.cfg,iv=cfg.iv,mode=cfg.mode;if(this._xformMode==this._ENC_XFORM_MODE)var modeCreator=mode.createEncryptor;else{var modeCreator=mode.createDecryptor;this._minBufferSize=1}this._mode=modeCreator.call(mode,this,iv&&iv.words)},_doProcessBlock:function(words,offset){this._mode.processBlock(words,offset)},_doFinalize:function(){var padding=this.cfg.padding;if(this._xformMode==this._ENC_XFORM_MODE){padding.pad(this._data,this.blockSize);var finalProcessedBlocks=this._process(!0)}else{var finalProcessedBlocks=this._process(!0);padding.unpad(finalProcessedBlocks)}return finalProcessedBlocks},blockSize:4}),C_lib.CipherParams=Base.extend({init:function(cipherParams){this.mixIn(cipherParams)},toString:function(formatter){return(formatter||this.formatter).stringify(this)}})),C_format=C.format={},OpenSSLFormatter=C_format.OpenSSL={stringify:function(cipherParams){var ciphertext=cipherParams.ciphertext,salt=cipherParams.salt;if(salt)var wordArray=WordArray.create([1398893684,1701076831]).concat(salt).concat(ciphertext);else var wordArray=ciphertext;return wordArray.toString(Base64)},parse:function(openSSLStr){var ciphertext=Base64.parse(openSSLStr),ciphertextWords=ciphertext.words;if(1398893684==ciphertextWords[0]&&1701076831==ciphertextWords[1]){var salt=WordArray.create(ciphertextWords.slice(2,4));ciphertextWords.splice(0,4),ciphertext.sigBytes-=16}return CipherParams.create({ciphertext:ciphertext,salt:salt})}},SerializableCipher=C_lib.SerializableCipher=Base.extend({cfg:Base.extend({format:OpenSSLFormatter}),encrypt:function(cipher,message,key,cfg){cfg=this.cfg.extend(cfg);var encryptor=cipher.createEncryptor(key,cfg),ciphertext=encryptor.finalize(message),cipherCfg=encryptor.cfg;return CipherParams.create({ciphertext:ciphertext,key:key,iv:cipherCfg.iv,algorithm:cipher,mode:cipherCfg.mode,padding:cipherCfg.padding,blockSize:cipher.blockSize,formatter:cfg.format})},decrypt:function(cipher,ciphertext,key,cfg){cfg=this.cfg.extend(cfg),ciphertext=this._parse(ciphertext,cfg.format);var plaintext=cipher.createDecryptor(key,cfg).finalize(ciphertext.ciphertext);return plaintext},_parse:function(ciphertext,format){return"string"==typeof ciphertext?format.parse(ciphertext,this):ciphertext}}),C_kdf=C.kdf={},OpenSSLKdf=C_kdf.OpenSSL={execute:function(password,keySize,ivSize,salt){salt||(salt=WordArray.random(8));var key=EvpKDF.create({keySize:keySize+ivSize}).compute(password,salt),iv=WordArray.create(key.words.slice(keySize),4*ivSize);return key.sigBytes=4*keySize,CipherParams.create({key:key,iv:iv,salt:salt})}},PasswordBasedCipher=C_lib.PasswordBasedCipher=SerializableCipher.extend({cfg:SerializableCipher.cfg.extend({kdf:OpenSSLKdf}),encrypt:function(cipher,message,password,cfg){cfg=this.cfg.extend(cfg);var derivedParams=cfg.kdf.execute(password,cipher.keySize,cipher.ivSize);cfg.iv=derivedParams.iv;var ciphertext=SerializableCipher.encrypt.call(this,cipher,message,derivedParams.key,cfg);return ciphertext.mixIn(derivedParams),ciphertext},decrypt:function(cipher,ciphertext,password,cfg){cfg=this.cfg.extend(cfg),ciphertext=this._parse(ciphertext,cfg.format);var derivedParams=cfg.kdf.execute(password,cipher.keySize,cipher.ivSize,ciphertext.salt);cfg.iv=derivedParams.iv;var plaintext=SerializableCipher.decrypt.call(this,cipher,ciphertext,derivedParams.key,cfg);return plaintext}})}(),function(){var C=CryptoJS,C_lib=C.lib,BlockCipher=C_lib.BlockCipher,C_algo=C.algo,SBOX=[],INV_SBOX=[],SUB_MIX_0=[],SUB_MIX_1=[],SUB_MIX_2=[],SUB_MIX_3=[],INV_SUB_MIX_0=[],INV_SUB_MIX_1=[],INV_SUB_MIX_2=[],INV_SUB_MIX_3=[];!function(){for(var d=[],i=0;256>i;i++)d[i]=128>i?i<<1:i<<1^283;for(var x=0,xi=0,i=0;256>i;i++){var sx=xi^xi<<1^xi<<2^xi<<3^xi<<4;sx=sx>>>8^255&sx^99,SBOX[x]=sx,INV_SBOX[sx]=x;var x2=d[x],x4=d[x2],x8=d[x4],t=257*d[sx]^16843008*sx;SUB_MIX_0[x]=t<<24|t>>>8,SUB_MIX_1[x]=t<<16|t>>>16,SUB_MIX_2[x]=t<<8|t>>>24,SUB_MIX_3[x]=t;var t=16843009*x8^65537*x4^257*x2^16843008*x;INV_SUB_MIX_0[sx]=t<<24|t>>>8,INV_SUB_MIX_1[sx]=t<<16|t>>>16,INV_SUB_MIX_2[sx]=t<<8|t>>>24,INV_SUB_MIX_3[sx]=t,x?(x=x2^d[d[d[x8^x2]]],xi^=d[d[xi]]):x=xi=1}}();var RCON=[0,1,2,4,8,16,32,64,128,27,54],AES=C_algo.AES=BlockCipher.extend({_doReset:function(){for(var key=this._key,keyWords=key.words,keySize=key.sigBytes/4,nRounds=this._nRounds=keySize+6,ksRows=4*(nRounds+1),keySchedule=this._keySchedule=[],ksRow=0;ksRows>ksRow;ksRow++)if(keySize>ksRow)keySchedule[ksRow]=keyWords[ksRow];else{var t=keySchedule[ksRow-1];ksRow%keySize?keySize>6&&ksRow%keySize==4&&(t=SBOX[t>>>24]<<24|SBOX[t>>>16&255]<<16|SBOX[t>>>8&255]<<8|SBOX[255&t]):(t=t<<8|t>>>24,t=SBOX[t>>>24]<<24|SBOX[t>>>16&255]<<16|SBOX[t>>>8&255]<<8|SBOX[255&t],t^=RCON[ksRow/keySize|0]<<24),keySchedule[ksRow]=keySchedule[ksRow-keySize]^t}for(var invKeySchedule=this._invKeySchedule=[],invKsRow=0;ksRows>invKsRow;invKsRow++){var ksRow=ksRows-invKsRow;if(invKsRow%4)var t=keySchedule[ksRow];else var t=keySchedule[ksRow-4];invKeySchedule[invKsRow]=4>invKsRow||4>=ksRow?t:INV_SUB_MIX_0[SBOX[t>>>24]]^INV_SUB_MIX_1[SBOX[t>>>16&255]]^INV_SUB_MIX_2[SBOX[t>>>8&255]]^INV_SUB_MIX_3[SBOX[255&t]]}},encryptBlock:function(M,offset){this._doCryptBlock(M,offset,this._keySchedule,SUB_MIX_0,SUB_MIX_1,SUB_MIX_2,SUB_MIX_3,SBOX)},decryptBlock:function(M,offset){var t=M[offset+1];M[offset+1]=M[offset+3],M[offset+3]=t,this._doCryptBlock(M,offset,this._invKeySchedule,INV_SUB_MIX_0,INV_SUB_MIX_1,INV_SUB_MIX_2,INV_SUB_MIX_3,INV_SBOX);var t=M[offset+1];M[offset+1]=M[offset+3],M[offset+3]=t},_doCryptBlock:function(M,offset,keySchedule,SUB_MIX_0,SUB_MIX_1,SUB_MIX_2,SUB_MIX_3,SBOX){for(var nRounds=this._nRounds,s0=M[offset]^keySchedule[0],s1=M[offset+1]^keySchedule[1],s2=M[offset+2]^keySchedule[2],s3=M[offset+3]^keySchedule[3],ksRow=4,round=1;nRounds>round;round++){var t0=SUB_MIX_0[s0>>>24]^SUB_MIX_1[s1>>>16&255]^SUB_MIX_2[s2>>>8&255]^SUB_MIX_3[255&s3]^keySchedule[ksRow++],t1=SUB_MIX_0[s1>>>24]^SUB_MIX_1[s2>>>16&255]^SUB_MIX_2[s3>>>8&255]^SUB_MIX_3[255&s0]^keySchedule[ksRow++],t2=SUB_MIX_0[s2>>>24]^SUB_MIX_1[s3>>>16&255]^SUB_MIX_2[s0>>>8&255]^SUB_MIX_3[255&s1]^keySchedule[ksRow++],t3=SUB_MIX_0[s3>>>24]^SUB_MIX_1[s0>>>16&255]^SUB_MIX_2[s1>>>8&255]^SUB_MIX_3[255&s2]^keySchedule[ksRow++];s0=t0,s1=t1,s2=t2,s3=t3}var t0=(SBOX[s0>>>24]<<24|SBOX[s1>>>16&255]<<16|SBOX[s2>>>8&255]<<8|SBOX[255&s3])^keySchedule[ksRow++],t1=(SBOX[s1>>>24]<<24|SBOX[s2>>>16&255]<<16|SBOX[s3>>>8&255]<<8|SBOX[255&s0])^keySchedule[ksRow++],t2=(SBOX[s2>>>24]<<24|SBOX[s3>>>16&255]<<16|SBOX[s0>>>8&255]<<8|SBOX[255&s1])^keySchedule[ksRow++],t3=(SBOX[s3>>>24]<<24|SBOX[s0>>>16&255]<<16|SBOX[s1>>>8&255]<<8|SBOX[255&s2])^keySchedule[ksRow++];M[offset]=t0,M[offset+1]=t1,M[offset+2]=t2,M[offset+3]=t3},keySize:8});C.AES=BlockCipher._createHelper(AES)}(),function(){var C=CryptoJS,C_lib=C.lib,WordArray=C_lib.WordArray,Hasher=C_lib.Hasher,C_algo=C.algo,W=[],SHA1=C_algo.SHA1=Hasher.extend({_doReset:function(){this._hash=new WordArray.init([1732584193,4023233417,2562383102,271733878,3285377520])},_doProcessBlock:function(M,offset){for(var H=this._hash.words,a=H[0],b=H[1],c=H[2],d=H[3],e=H[4],i=0;80>i;i++){if(16>i)W[i]=0|M[offset+i];else{var n=W[i-3]^W[i-8]^W[i-14]^W[i-16];W[i]=n<<1|n>>>31}var t=(a<<5|a>>>27)+e+W[i];t+=20>i?(b&c|~b&d)+1518500249:40>i?(b^c^d)+1859775393:60>i?(b&c|b&d|c&d)-1894007588:(b^c^d)-899497514,e=d,d=c,c=b<<30|b>>>2,b=a,a=t}H[0]=H[0]+a|0,H[1]=H[1]+b|0,H[2]=H[2]+c|0,H[3]=H[3]+d|0,H[4]=H[4]+e|0},_doFinalize:function(){var data=this._data,dataWords=data.words,nBitsTotal=8*this._nDataBytes,nBitsLeft=8*data.sigBytes;return dataWords[nBitsLeft>>>5]|=128<<24-nBitsLeft%32,dataWords[(nBitsLeft+64>>>9<<4)+14]=Math.floor(nBitsTotal/4294967296),dataWords[(nBitsLeft+64>>>9<<4)+15]=nBitsTotal,data.sigBytes=4*dataWords.length,this._process(),this._hash},clone:function(){var clone=Hasher.clone.call(this);return clone._hash=this._hash.clone(),clone}});C.SHA1=Hasher._createHelper(SHA1),C.HmacSHA1=Hasher._createHmacHelper(SHA1)}(),function(Math){var C=CryptoJS,C_lib=C.lib,WordArray=C_lib.WordArray,Hasher=C_lib.Hasher,C_algo=C.algo,H=[],K=[];!function(){function isPrime(n){for(var sqrtN=Math.sqrt(n),factor=2;sqrtN>=factor;factor++)if(!(n%factor))return!1;return!0}function getFractionalBits(n){return 4294967296*(n-(0|n))|0}for(var n=2,nPrime=0;64>nPrime;)isPrime(n)&&(8>nPrime&&(H[nPrime]=getFractionalBits(Math.pow(n,.5))),K[nPrime]=getFractionalBits(Math.pow(n,1/3)),nPrime++),n++}();var W=[],SHA256=C_algo.SHA256=Hasher.extend({_doReset:function(){this._hash=new WordArray.init(H.slice(0))},_doProcessBlock:function(M,offset){for(var H=this._hash.words,a=H[0],b=H[1],c=H[2],d=H[3],e=H[4],f=H[5],g=H[6],h=H[7],i=0;64>i;i++){if(16>i)W[i]=0|M[offset+i];else{var gamma0x=W[i-15],gamma0=(gamma0x<<25|gamma0x>>>7)^(gamma0x<<14|gamma0x>>>18)^gamma0x>>>3,gamma1x=W[i-2],gamma1=(gamma1x<<15|gamma1x>>>17)^(gamma1x<<13|gamma1x>>>19)^gamma1x>>>10;W[i]=gamma0+W[i-7]+gamma1+W[i-16]}var ch=e&f^~e&g,maj=a&b^a&c^b&c,sigma0=(a<<30|a>>>2)^(a<<19|a>>>13)^(a<<10|a>>>22),sigma1=(e<<26|e>>>6)^(e<<21|e>>>11)^(e<<7|e>>>25),t1=h+sigma1+ch+K[i]+W[i],t2=sigma0+maj;h=g,g=f,f=e,e=d+t1|0,d=c,c=b,b=a,a=t1+t2|0}H[0]=H[0]+a|0,H[1]=H[1]+b|0,H[2]=H[2]+c|0,H[3]=H[3]+d|0,H[4]=H[4]+e|0,H[5]=H[5]+f|0,H[6]=H[6]+g|0,H[7]=H[7]+h|0},_doFinalize:function(){var data=this._data,dataWords=data.words,nBitsTotal=8*this._nDataBytes,nBitsLeft=8*data.sigBytes;return dataWords[nBitsLeft>>>5]|=128<<24-nBitsLeft%32,dataWords[(nBitsLeft+64>>>9<<4)+14]=Math.floor(nBitsTotal/4294967296),dataWords[(nBitsLeft+64>>>9<<4)+15]=nBitsTotal,data.sigBytes=4*dataWords.length,this._process(),this._hash},clone:function(){var clone=Hasher.clone.call(this);return clone._hash=this._hash.clone(),clone}});C.SHA256=Hasher._createHelper(SHA256),C.HmacSHA256=Hasher._createHmacHelper(SHA256)}(Math),function(){{var C=CryptoJS,C_lib=C.lib,Base=C_lib.Base,C_enc=C.enc,Utf8=C_enc.Utf8,C_algo=C.algo;C_algo.HMAC=Base.extend({init:function(hasher,key){hasher=this._hasher=new hasher.init,"string"==typeof key&&(key=Utf8.parse(key));var hasherBlockSize=hasher.blockSize,hasherBlockSizeBytes=4*hasherBlockSize;key.sigBytes>hasherBlockSizeBytes&&(key=hasher.finalize(key)),key.clamp();for(var oKey=this._oKey=key.clone(),iKey=this._iKey=key.clone(),oKeyWords=oKey.words,iKeyWords=iKey.words,i=0;hasherBlockSize>i;i++)oKeyWords[i]^=1549556828,iKeyWords[i]^=909522486;oKey.sigBytes=iKey.sigBytes=hasherBlockSizeBytes,this.reset()},reset:function(){var hasher=this._hasher;hasher.reset(),hasher.update(this._iKey)},update:function(messageUpdate){return this._hasher.update(messageUpdate),this},finalize:function(messageUpdate){var hasher=this._hasher,innerHash=hasher.finalize(messageUpdate);hasher.reset();var hmac=hasher.finalize(this._oKey.clone().concat(innerHash));return hmac}})}}(),CryptoJS.pad.NoPadding={pad:function(){},unpad:function(){}},CryptoJS.mode.CTR=function(){var CTR=CryptoJS.lib.BlockCipherMode.extend(),Encryptor=CTR.Encryptor=CTR.extend({processBlock:function(words,offset){var cipher=this._cipher,blockSize=cipher.blockSize,iv=this._iv,counter=this._counter;iv&&(counter=this._counter=iv.slice(0),this._iv=void 0);var keystream=counter.slice(0);cipher.encryptBlock(keystream,0),counter[blockSize-1]=counter[blockSize-1]+1|0;for(var i=0;blockSize>i;i++)words[offset+i]^=keystream[i]}});return CTR.Decryptor=Encryptor,CTR}(),CryptoJS}),/*!
+ * Source: lib/strophe.bookmarks/index.js, license: MIT, url: https://github.com/strophe/strophejs-plugins/tree/master/bookmarks
+ */
+Strophe.addConnectionPlugin("bookmarks",{init:function(connection){this.connection=connection,Strophe.addNamespace("PRIVATE","jabber:iq:private"),Strophe.addNamespace("BOOKMARKS","storage:bookmarks"),Strophe.addNamespace("PRIVACY","jabber:iq:privacy"),Strophe.addNamespace("DELAY","jabber:x:delay"),Strophe.addNamespace("PUBSUB","http://jabber.org/protocol/pubsub")},createBookmarksNode:function(success,error){return this.connection.sendIQ($iq({type:"set"}).c("pubsub",{xmlns:Strophe.NS.PUBSUB}).c("create",{node:"storage:bookmarks"}).up().c("configure").c("x",{xmlns:"jabber:x:data",type:"submit"}).c("field",{"var":"FORM_TYPE",type:"hidden"}).c("value").t("http://jabber.org/protocol/pubsub#node_config").up().up().c("field",{"var":"pubsub#persist_items"}).c("value").t("1").up().up().c("field",{"var":"pubsub#access_model"}).c("value").t("whitelist"),success,error),!0},add:function(roomJid,alias,nick,autojoin,success,error){var conferenceAttr={jid:roomJid,autojoin:autojoin||!1};alias&&(conferenceAttr.name=alias);var stanza=$iq({type:"set"}).c("pubsub",{xmlns:Strophe.NS.PUBSUB}).c("publish",{node:Strophe.NS.BOOKMARKS}).c("item",{id:roomJid}).c("storage",{xmlns:Strophe.NS.BOOKMARKS}).c("conference",conferenceAttr);nick&&stanza.c("nick").t(nick),this.connection.sendIQ(stanza,success,error)},get:function(success,error){this.connection.sendIQ($iq({type:"get"}).c("pubsub",{xmlns:Strophe.NS.PUBSUB}).c("items",{node:Strophe.NS.BOOKMARKS}),success,error)},"delete":function(roomJid,success,error,notify){this.connection.sendIQ($iq({type:"set"}).c("pubsub",{xmlns:Strophe.NS.PUBSUB}).c("retract",{node:Strophe.NS.BOOKMARKS,notify:notify||!1}).c("item",{id:roomJid}),success,error)}}),/*!
+ * Source: lib/strophe.x/index.js, license: MIT, url: https://github.com/strophe/strophejs-plugins/tree/master/dataforms
+ */
+function(){var $field,$form,$item,$opt,Field,Form,Item,Option,helper,__slice=[].slice,__bind=function(fn,me){return function(){return fn.apply(me,arguments)}},__indexOf=[].indexOf||function(item){for(var i=0,l=this.length;l>i;i++)if(i in this&&this[i]===item)return i;return-1};helper={fill:function(src,target,klass){var f,_i,_len,_results;for(_results=[],_i=0,_len=src.length;_len>_i;_i++)f=src[_i],_results.push(target.push(f instanceof klass?f:new klass(f)));return _results},createHtmlFieldCouple:function(f){var div,id;return div=$("<div>"),id="Strophe.x.Field-"+f.type+"-"+f["var"],div.append("<label for='"+id+"'>"+(f.label||"")+"</label>").append($(f.toHTML()).attr("id",id)).append("<br />"),div.children()},getHtmlFields:function(html){return html=$(html),__slice.call(html.find("input")).concat(__slice.call(html.find("select")),__slice.call(html.find("textarea")))}},Form=function(){function Form(opt){this.toHTML=__bind(this.toHTML,this),this.toJSON=__bind(this.toJSON,this),this.toXML=__bind(this.toXML,this);var f,i,_i,_j,_len,_len1,_ref,_ref1,_ref2,_ref3;if(this.fields=[],this.items=[],this.reported=[],opt)if(_ref=opt.type,__indexOf.call(Form._types,_ref)>=0&&(this.type=opt.type),this.title=opt.title,this.instructions=opt.instructions,helper.fill=function(src,target,klass){var f,_i,_len,_results;for(_results=[],_i=0,_len=src.length;_len>_i;_i++)f=src[_i],_results.push(target.push(f instanceof klass?f:new klass(f)));return _results},opt.fields)opt.fields&&helper.fill(opt.fields,this.fields,Field);else if(opt.items)for(opt.items&&helper.fill(opt.items,this.items,Item),_ref1=this.items,_i=0,_len=_ref1.length;_len>_i;_i++)for(i=_ref1[_i],_ref2=i.fields,_j=0,_len1=_ref2.length;_len1>_j;_j++)f=_ref2[_j],_ref3=f["var"],__indexOf.call(this.reported,_ref3)>=0||this.reported.push(f["var"])}return Form._types=["form","submit","cancel","result"],Form.prototype.type="form",Form.prototype.title=null,Form.prototype.instructions=null,Form.prototype.toXML=function(){var f,i,r,xml,_i,_j,_k,_len,_len1,_len2,_ref,_ref1,_ref2;if(xml=$build("x",{xmlns:"jabber:x:data",type:this.type}),this.title&&xml.c("title").t(this.title.toString()).up(),this.instructions&&xml.c("instructions").t(this.instructions.toString()).up(),this.fields.length>0)for(_ref=this.fields,_i=0,_len=_ref.length;_len>_i;_i++)f=_ref[_i],xml.cnode(f.toXML()).up();else if(this.items.length>0){for(xml.c("reported"),_ref1=this.reported,_j=0,_len1=_ref1.length;_len1>_j;_j++)r=_ref1[_j],xml.c("field",{"var":r}).up();for(xml.up(),_ref2=this.items,_k=0,_len2=_ref2.length;_len2>_k;_k++)i=_ref2[_k],xml.cnode(i.toXML()).up()}return xml.tree()},Form.prototype.toJSON=function(){var f,i,json,_i,_j,_len,_len1,_ref,_ref1;if(json={type:this.type},this.title&&(json.title=this.title),this.instructions&&(json.instructions=this.instructions),this.fields.length>0)for(json.fields=[],_ref=this.fields,_i=0,_len=_ref.length;_len>_i;_i++)f=_ref[_i],json.fields.push(f.toJSON());else if(this.items.length>0)for(json.items=[],json.reported=this.reported,_ref1=this.items,_j=0,_len1=_ref1.length;_len1>_j;_j++)i=_ref1[_j],json.items.push(i.toJSON());return json},Form.prototype.toHTML=function(){var f,form,i,_i,_j,_len,_len1,_ref,_ref1;if(form=$("<form data-type='"+this.type+"'>"),this.title&&form.append("<h1>"+this.title+"</h1>"),this.instructions&&form.append("<p>"+this.instructions+"</p>"),this.fields.length>0)for(_ref=this.fields,_i=0,_len=_ref.length;_len>_i;_i++)f=_ref[_i],helper.createHtmlFieldCouple(f).appendTo(form);else if(this.items.length>0)for(_ref1=this.items,_j=0,_len1=_ref1.length;_len1>_j;_j++)i=_ref1[_j],$(i.toHTML()).appendTo(form);return form[0]},Form.fromXML=function(xml){var f,fields,i,instr,items,j,r,reported,title;return xml=$(xml),f=new Form({type:xml.attr("type")}),title=xml.find("title"),1===title.length&&(f.title=title.text()),instr=xml.find("instructions"),1===instr.length&&(f.instructions=instr.text()),fields=xml.find("field"),items=xml.find("item"),items.length>0?f.items=function(){var _i,_len,_results;for(_results=[],_i=0,_len=items.length;_len>_i;_i++)i=items[_i],_results.push(Item.fromXML(i));return _results}():fields.length>0&&(f.fields=function(){var _i,_len,_results;for(_results=[],_i=0,_len=fields.length;_len>_i;_i++)j=fields[_i],_results.push(Field.fromXML(j));return _results}()),reported=xml.find("reported"),1===reported.length&&(fields=reported.find("field"),f.reported=function(){var _i,_len,_results;for(_results=[],_i=0,_len=fields.length;_len>_i;_i++)r=fields[_i],_results.push($(r).attr("var"));return _results}()),f},Form.fromHTML=function(html){var f,field,fields,i,instructions,item,items,j,title,_i,_j,_len,_len1,_ref,_ref1,_ref2;if(html=$(html),f=new Form({type:html.attr("data-type")}),title=html.find("h1").text(),title&&(f.title=title),instructions=html.find("p").text(),instructions&&(f.instructions=instructions),items=html.find("fieldset"),fields=helper.getHtmlFields(html),items.length>0)for(f.items=function(){var _i,_len,_results;for(_results=[],_i=0,_len=items.length;_len>_i;_i++)i=items[_i],_results.push(Item.fromHTML(i));return _results}(),_ref=f.items,_i=0,_len=_ref.length;_len>_i;_i++)for(item=_ref[_i],_ref1=item.fields,_j=0,_len1=_ref1.length;_len1>_j;_j++)field=_ref1[_j],_ref2=field["var"],__indexOf.call(f.reported,_ref2)>=0||f.reported.push(field["var"]);else fields.length>0&&(f.fields=function(){var _k,_len2,_results;for(_results=[],_k=0,_len2=fields.length;_len2>_k;_k++)j=fields[_k],_results.push(Field.fromHTML(j));return _results}());return f},Form}(),Field=function(){function Field(opt){this.toHTML=__bind(this.toHTML,this),this.toXML=__bind(this.toXML,this),this.toJSON=__bind(this.toJSON,this),this.addOptions=__bind(this.addOptions,this),this.addOption=__bind(this.addOption,this),this.addValues=__bind(this.addValues,this),this.addValue=__bind(this.addValue,this);var _ref,_ref1;this.options=[],this.values=[],opt&&(_ref=opt.type,__indexOf.call(Field._types,_ref)>=0&&(this.type=opt.type.toString()),opt.desc&&(this.desc=opt.desc.toString()),opt.label&&(this.label=opt.label.toString()),this["var"]=(null!=(_ref1=opt["var"])?_ref1.toString():void 0)||"_no_var_was_defined_",this.required=opt.required===!0||"true"===opt.required,opt.options&&this.addOptions(opt.options),opt.value&&(opt.values=[opt.value]),opt.values&&this.addValues(opt.values))}return Field._types=["boolean","fixed","hidden","jid-multi","jid-single","list-multi","list-single","text-multi","text-private","text-single"],Field._multiTypes=["list-multi","jid-multi","text-multi","hidden"],Field.prototype.type="text-single",Field.prototype.desc=null,Field.prototype.label=null,Field.prototype["var"]="_no_var_was_defined_",Field.prototype.required=!1,Field.prototype.addValue=function(val){return this.addValues([val])},Field.prototype.addValues=function(vals){var multi,v,_ref;return _ref=this.type,multi=__indexOf.call(Field._multiTypes,_ref)>=0,(multi||!multi&&1===vals.length)&&(this.values=__slice.call(this.values).concat(__slice.call(function(){var _i,_len,_results;for(_results=[],_i=0,_len=vals.length;_len>_i;_i++)v=vals[_i],_results.push(v.toString());return _results}()))),this},Field.prototype.addOption=function(opt){return this.addOptions([opt])},Field.prototype.addOptions=function(opts){var o;return("list-single"===this.type||"list-multi"===this.type)&&("object"!=typeof opts[0]&&(opts=function(){var _i,_len,_results;for(_results=[],_i=0,_len=opts.length;_len>_i;_i++)o=opts[_i],_results.push(new Option({value:o.toString()}));return _results}()),helper.fill(opts,this.options,Option)),this},Field.prototype.toJSON=function(){var json,o,_i,_len,_ref;if(json={type:this.type,"var":this["var"],required:this.required},this.desc&&(json.desc=this.desc),this.label&&(json.label=this.label),this.values&&(json.values=this.values),this.options)for(json.options=[],_ref=this.options,_i=0,_len=_ref.length;_len>_i;_i++)o=_ref[_i],json.options.push(o.toJSON());return json},Field.prototype.toXML=function(){var attrs,o,v,xml,_i,_j,_len,_len1,_ref,_ref1;if(attrs={type:this.type,"var":this["var"]},this.label&&(attrs.label=this.label),xml=$build("field",attrs),this.desc&&xml.c("desc").t(this.desc).up(),this.required&&xml.c("required").up(),this.values)for(_ref=this.values,_i=0,_len=_ref.length;_len>_i;_i++)v=_ref[_i],xml.c("value").t(v.toString()).up();if(this.options)for(_ref1=this.options,_j=0,_len1=_ref1.length;_len1>_j;_j++)o=_ref1[_j],xml.cnode(o.toXML()).up();return xml.tree()},Field.prototype.toHTML=function(){var el,k,line,o,opt,txt,val,_i,_j,_len,_len1,_ref,_ref1,_ref2;switch(this.type.toLowerCase()){case"list-single":case"list-multi":if(el=$("<select>"),"list-multi"===this.type&&el.attr("multiple","multiple"),this.options.length>0)for(_ref=this.options,_i=0,_len=_ref.length;_len>_i;_i++)if(opt=_ref[_i]){for(o=$(opt.toHTML()),_ref1=this.values,_j=0,_len1=_ref1.length;_len1>_j;_j++)k=_ref1[_j],k.toString()===opt.value.toString()&&o.attr("selected","selected");o.appendTo(el)}break;case"text-multi":case"jid-multi":el=$("<textarea>"),txt=function(){var _k,_len2,_ref2,_results;for(_ref2=this.values,_results=[],_k=0,_len2=_ref2.length;_len2>_k;_k++)line=_ref2[_k],_results.push(line);return _results}.call(this).join("\n"),txt&&el.text(txt);break;case"text-single":case"boolean":case"text-private":case"hidden":case"fixed":case"jid-single":switch(el=$("<input>"),this.values&&el.val(this.values[0]),this.type.toLowerCase()){case"text-single":el.attr("type","text"),el.attr("placeholder",this.desc);break;case"boolean":el.attr("type","checkbox"),val=null!=(_ref2=this.values[0])&&"function"==typeof _ref2.toString?_ref2.toString():void 0,!val||"true"!==val&&"1"!==val||el.attr("checked","checked");break;case"text-private":el.attr("type","password");break;case"hidden":el.attr("type","hidden");break;case"fixed":el.attr("type","text").attr("readonly","readonly");break;case"jid-single":el.attr("type","email")}break;default:el=$("<input type='text'>")}return el.attr("name",this["var"]),this.required&&el.attr("required",this.required),el[0]},Field.fromXML=function(xml){var o,v;return xml=$(xml),new Field({type:xml.attr("type"),"var":xml.attr("var"),label:xml.attr("label"),desc:xml.find("desc").text(),required:1===xml.find("required").length,values:function(){var _i,_len,_ref,_results;for(_ref=xml.find(">value"),_results=[],_i=0,_len=_ref.length;_len>_i;_i++)v=_ref[_i],_results.push($(v).text());return _results}(),options:function(){var _i,_len,_ref,_results;for(_ref=xml.find("option"),_results=[],_i=0,_len=_ref.length;_len>_i;_i++)o=_ref[_i],_results.push(Option.fromXML(o));return _results}()})},Field._htmlElementToFieldType=function(el){var r,type;switch(el=$(el),el[0].nodeName.toLowerCase()){case"textarea":type="text-multi";break;case"select":type="multiple"===el.attr("multiple")?"list-multi":"list-single";break;case"input":switch(el.attr("type")){case"checkbox":type="boolean";break;case"email":type="jid-single";break;case"hidden":type="hidden";break;case"password":type="text-private";break;case"text":r="readonly"===el.attr("readonly"),type=r?"fixed":"text-single"}}return type},Field.fromHTML=function(html){var el,f,txt,type;switch(html=$(html),type=Field._htmlElementToFieldType(html),f=new Field({type:type,"var":html.attr("name"),required:"required"===html.attr("required")}),type){case"list-multi":case"list-single":f.values=function(){var _i,_len,_ref,_results;for(_ref=html.find("option:selected"),_results=[],_i=0,_len=_ref.length;_len>_i;_i++)el=_ref[_i],_results.push($(el).val());return _results}(),f.options=function(){var _i,_len,_ref,_results;for(_ref=html.find("option"),_results=[],_i=0,_len=_ref.length;_len>_i;_i++)el=_ref[_i],_results.push(Option.fromHTML(el));return _results}();break;case"text-multi":case"jid-multi":txt=html.text(),""!==txt.trim()&&(f.values=txt.split("\n"));break;case"text-single":case"boolean":case"text-private":case"hidden":case"fixed":case"jid-single":""!==html.val().trim()&&(f.values=[html.val()])}return f},Field}(),Option=function(){function Option(opt){this.toHTML=__bind(this.toHTML,this),this.toJSON=__bind(this.toJSON,this),this.toXML=__bind(this.toXML,this),opt&&(opt.label&&(this.label=opt.label.toString()),opt.value&&(this.value=opt.value.toString()))}return Option.prototype.label="",Option.prototype.value="",Option.prototype.toXML=function(){return $build("option",{label:this.label}).c("value").t(this.value.toString()).tree()},Option.prototype.toJSON=function(){return{label:this.label,value:this.value}},Option.prototype.toHTML=function(){return $("<option>").attr("value",this.value).text(this.label||this.value)[0]},Option.fromXML=function(xml){return new Option({label:$(xml).attr("label"),value:$(xml).text()})},Option.fromHTML=function(html){return new Option({value:$(html).attr("value"),label:$(html).text()})},Option}(),Item=function(){function Item(opts){this.toHTML=__bind(this.toHTML,this),this.toJSON=__bind(this.toJSON,this),this.toXML=__bind(this.toXML,this),this.fields=[],(null!=opts?opts.fields:void 0)&&helper.fill(opts.fields,this.fields,Field)}return Item.prototype.toXML=function(){var f,xml,_i,_len,_ref;for(xml=$build("item"),_ref=this.fields,_i=0,_len=_ref.length;_len>_i;_i++)f=_ref[_i],xml.cnode(f.toXML()).up();return xml.tree()},Item.prototype.toJSON=function(){var f,json,_i,_len,_ref;if(json={},this.fields)for(json.fields=[],_ref=this.fields,_i=0,_len=_ref.length;_len>_i;_i++)f=_ref[_i],json.fields.push(f.toJSON());return json},Item.prototype.toHTML=function(){var f,fieldset,_i,_len,_ref;for(fieldset=$("<fieldset>"),_ref=this.fields,_i=0,_len=_ref.length;_len>_i;_i++)f=_ref[_i],helper.createHtmlFieldCouple(f).appendTo(fieldset);return fieldset[0]},Item.fromXML=function(xml){var f,fields;return xml=$(xml),fields=xml.find("field"),new Item({fields:function(){var _i,_len,_results;for(_results=[],_i=0,_len=fields.length;_len>_i;_i++)f=fields[_i],_results.push(Field.fromXML(f));return _results}()})},Item.fromHTML=function(html){var f;return new Item({fields:function(){var _i,_len,_ref,_results;for(_ref=helper.getHtmlFields(html),_results=[],_i=0,_len=_ref.length;_len>_i;_i++)f=_ref[_i],_results.push(Field.fromHTML(f));return _results}()})},Item}(),Strophe.x={Form:Form,Field:Field,Option:Option,Item:Item},$form=function(opt){return new Strophe.x.Form(opt)},$field=function(opt){return new Strophe.x.Field(opt)},$opt=function(opt){return new Strophe.x.Option(opt)},$item=function(opts){return new Strophe.x.Item(opts)},Strophe.addConnectionPlugin("x",{init:function(conn){var _ref,_ref1;return Strophe.addNamespace("DATA","jabber:x:data"),null!=(null!=(_ref=conn.disco)?_ref.addFeature:void 0)&&conn.disco.addFeature(Strophe.NS.DATA),null!=(null!=(_ref1=conn.disco)?_ref1.addNode:void 0)?conn.disco.addNode(Strophe.NS.DATA,{items:[]}):void 0},parseFromResult:function(result){var _ref;return Form.fromXML("x"===result.nodeName.toLowerCase()?result:null!=(_ref=$(result).find("x"))?_ref[0]:void 0)}})}.call(this),/*!
+ * Source: lib/strophe.jinglejs/strophe.jinglejs-bundle.js, license: MIT, url: https://github.com/sualko/strophe.jinglejs
+ */
+function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a="function"==typeof require&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}for(var i="function"==typeof require&&require,o=0;o<r.length;o++)s(r[o]);return s}({1:[function(){},{}],2:[function(require,module,exports){function Buffer(arg){return this instanceof Buffer?(this.length=0,this.parent=void 0,"number"==typeof arg?fromNumber(this,arg):"string"==typeof arg?fromString(this,arg,arguments.length>1?arguments[1]:"utf8"):fromObject(this,arg)):arguments.length>1?new Buffer(arg,arguments[1]):new Buffer(arg)}function fromNumber(that,length){if(that=allocate(that,0>length?0:0|checked(length)),!Buffer.TYPED_ARRAY_SUPPORT)for(var i=0;length>i;i++)that[i]=0;return that}function fromString(that,string,encoding){("string"!=typeof encoding||""===encoding)&&(encoding="utf8");var length=0|byteLength(string,encoding);return that=allocate(that,length),that.write(string,encoding),that}function fromObject(that,object){if(Buffer.isBuffer(object))return fromBuffer(that,object);if(isArray(object))return fromArray(that,object);if(null==object)throw new TypeError("must start with number, buffer, array or string");return"undefined"!=typeof ArrayBuffer&&object.buffer instanceof ArrayBuffer?fromTypedArray(that,object):object.length?fromArrayLike(that,object):fromJsonObject(that,object)}function fromBuffer(that,buffer){var length=0|checked(buffer.length);return that=allocate(that,length),buffer.copy(that,0,0,length),that}function fromArray(that,array){var length=0|checked(array.length);that=allocate(that,length);for(var i=0;length>i;i+=1)that[i]=255&array[i];return that}function fromTypedArray(that,array){var length=0|checked(array.length);that=allocate(that,length);for(var i=0;length>i;i+=1)that[i]=255&array[i];return that}function fromArrayLike(that,array){var length=0|checked(array.length);that=allocate(that,length);for(var i=0;length>i;i+=1)that[i]=255&array[i];return that}function fromJsonObject(that,object){var array,length=0;"Buffer"===object.type&&isArray(object.data)&&(array=object.data,length=0|checked(array.length)),that=allocate(that,length);for(var i=0;length>i;i+=1)that[i]=255&array[i];return that}function allocate(that,length){Buffer.TYPED_ARRAY_SUPPORT?that=Buffer._augment(new Uint8Array(length)):(that.length=length,that._isBuffer=!0);var fromPool=0!==length&&length<=Buffer.poolSize>>>1;return fromPool&&(that.parent=rootParent),that}function checked(length){if(length>=kMaxLength)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+kMaxLength.toString(16)+" bytes");return 0|length}function SlowBuffer(subject,encoding){if(!(this instanceof SlowBuffer))return new SlowBuffer(subject,encoding);var buf=new Buffer(subject,encoding);return delete buf.parent,buf}function byteLength(string,encoding){if("string"!=typeof string&&(string=String(string)),0===string.length)return 0;switch(encoding||"utf8"){case"ascii":case"binary":case"raw":return string.length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*string.length;case"hex":return string.length>>>1;case"utf8":case"utf-8":return utf8ToBytes(string).length;case"base64":return base64ToBytes(string).length;default:return string.length}}function hexWrite(buf,string,offset,length){offset=Number(offset)||0;var remaining=buf.length-offset;length?(length=Number(length),length>remaining&&(length=remaining)):length=remaining;var strLen=string.length;if(strLen%2!==0)throw new Error("Invalid hex string");length>strLen/2&&(length=strLen/2);for(var i=0;length>i;i++){var parsed=parseInt(string.substr(2*i,2),16);if(isNaN(parsed))throw new Error("Invalid hex string");buf[offset+i]=parsed}return i}function utf8Write(buf,string,offset,length){return blitBuffer(utf8ToBytes(string,buf.length-offset),buf,offset,length)}function asciiWrite(buf,string,offset,length){return blitBuffer(asciiToBytes(string),buf,offset,length)}function binaryWrite(buf,string,offset,length){return asciiWrite(buf,string,offset,length)}function base64Write(buf,string,offset,length){return blitBuffer(base64ToBytes(string),buf,offset,length)}function ucs2Write(buf,string,offset,length){return blitBuffer(utf16leToBytes(string,buf.length-offset),buf,offset,length)}function base64Slice(buf,start,end){return base64.fromByteArray(0===start&&end===buf.length?buf:buf.slice(start,end))}function utf8Slice(buf,start,end){var res="",tmp="";end=Math.min(buf.length,end);for(var i=start;end>i;i++)buf[i]<=127?(res+=decodeUtf8Char(tmp)+String.fromCharCode(buf[i]),tmp=""):tmp+="%"+buf[i].toString(16);return res+decodeUtf8Char(tmp)}function asciiSlice(buf,start,end){var ret="";end=Math.min(buf.length,end);for(var i=start;end>i;i++)ret+=String.fromCharCode(127&buf[i]);return ret}function binarySlice(buf,start,end){var ret="";end=Math.min(buf.length,end);for(var i=start;end>i;i++)ret+=String.fromCharCode(buf[i]);return ret}function hexSlice(buf,start,end){var len=buf.length;(!start||0>start)&&(start=0),(!end||0>end||end>len)&&(end=len);for(var out="",i=start;end>i;i++)out+=toHex(buf[i]);return out}function utf16leSlice(buf,start,end){for(var bytes=buf.slice(start,end),res="",i=0;i<bytes.length;i+=2)res+=String.fromCharCode(bytes[i]+256*bytes[i+1]);return res}function checkOffset(offset,ext,length){if(offset%1!==0||0>offset)throw new RangeError("offset is not uint");if(offset+ext>length)throw new RangeError("Trying to access beyond buffer length")}function checkInt(buf,value,offset,ext,max,min){if(!Buffer.isBuffer(buf))throw new TypeError("buffer must be a Buffer instance");if(value>max||min>value)throw new RangeError("value is out of bounds");if(offset+ext>buf.length)throw new RangeError("index out of range")}function objectWriteUInt16(buf,value,offset,littleEndian){0>value&&(value=65535+value+1);for(var i=0,j=Math.min(buf.length-offset,2);j>i;i++)buf[offset+i]=(value&255<<8*(littleEndian?i:1-i))>>>8*(littleEndian?i:1-i)}function objectWriteUInt32(buf,value,offset,littleEndian){0>value&&(value=4294967295+value+1);for(var i=0,j=Math.min(buf.length-offset,4);j>i;i++)buf[offset+i]=value>>>8*(littleEndian?i:3-i)&255}function checkIEEE754(buf,value,offset,ext,max,min){if(value>max||min>value)throw new RangeError("value is out of bounds");if(offset+ext>buf.length)throw new RangeError("index out of range");if(0>offset)throw new RangeError("index out of range")}function writeFloat(buf,value,offset,littleEndian,noAssert){return noAssert||checkIEEE754(buf,value,offset,4,3.4028234663852886e38,-3.4028234663852886e38),ieee754.write(buf,value,offset,littleEndian,23,4),offset+4}function writeDouble(buf,value,offset,littleEndian,noAssert){return noAssert||checkIEEE754(buf,value,offset,8,1.7976931348623157e308,-1.7976931348623157e308),ieee754.write(buf,value,offset,littleEndian,52,8),offset+8}function base64clean(str){if(str=stringtrim(str).replace(INVALID_BASE64_RE,""),str.length<2)return"";for(;str.length%4!==0;)str+="=";return str}function stringtrim(str){return str.trim?str.trim():str.replace(/^\s+|\s+$/g,"")}function toHex(n){return 16>n?"0"+n.toString(16):n.toString(16)}function utf8ToBytes(string,units){units=units||1/0;for(var codePoint,length=string.length,leadSurrogate=null,bytes=[],i=0;length>i;i++){if(codePoint=string.charCodeAt(i),codePoint>55295&&57344>codePoint){if(!leadSurrogate){if(codePoint>56319){(units-=3)>-1&&bytes.push(239,191,189);continue}if(i+1===length){(units-=3)>-1&&bytes.push(239,191,189);continue}leadSurrogate=codePoint;continue}if(56320>codePoint){(units-=3)>-1&&bytes.push(239,191,189),leadSurrogate=codePoint;continue}codePoint=leadSurrogate-55296<<10|codePoint-56320|65536,leadSurrogate=null}else leadSurrogate&&((units-=3)>-1&&bytes.push(239,191,189),leadSurrogate=null);if(128>codePoint){if((units-=1)<0)break;bytes.push(codePoint)}else if(2048>codePoint){if((units-=2)<0)break;bytes.push(codePoint>>6|192,63&codePoint|128)}else if(65536>codePoint){if((units-=3)<0)break;bytes.push(codePoint>>12|224,codePoint>>6&63|128,63&codePoint|128)}else{if(!(2097152>codePoint))throw new Error("Invalid code point");if((units-=4)<0)break;bytes.push(codePoint>>18|240,codePoint>>12&63|128,codePoint>>6&63|128,63&codePoint|128)}}return bytes}function asciiToBytes(str){for(var byteArray=[],i=0;i<str.length;i++)byteArray.push(255&str.charCodeAt(i));return byteArray}function utf16leToBytes(str,units){for(var c,hi,lo,byteArray=[],i=0;i<str.length&&!((units-=2)<0);i++)c=str.charCodeAt(i),hi=c>>8,lo=c%256,byteArray.push(lo),byteArray.push(hi);return byteArray}function base64ToBytes(str){return base64.toByteArray(base64clean(str))}function blitBuffer(src,dst,offset,length){for(var i=0;length>i&&!(i+offset>=dst.length||i>=src.length);i++)dst[i+offset]=src[i];return i}function decodeUtf8Char(str){try{return decodeURIComponent(str)}catch(err){return String.fromCharCode(65533)}}/*!
+ * The buffer module from node.js, for the browser.
+ *
+ * @author Feross Aboukhadijeh <feross@feross.org> <http://feross.org>
+ * @license MIT
+ */
+var base64=require("base64-js"),ieee754=require("ieee754"),isArray=require("is-array");exports.Buffer=Buffer,exports.SlowBuffer=SlowBuffer,exports.INSPECT_MAX_BYTES=50,Buffer.poolSize=8192;var kMaxLength=1073741823,rootParent={};Buffer.TYPED_ARRAY_SUPPORT=function(){try{var buf=new ArrayBuffer(0),arr=new Uint8Array(buf);return arr.foo=function(){return 42},42===arr.foo()&&"function"==typeof arr.subarray&&0===new Uint8Array(1).subarray(1,1).byteLength}catch(e){return!1}}(),Buffer.isBuffer=function(b){return!(null==b||!b._isBuffer)},Buffer.compare=function(a,b){if(!Buffer.isBuffer(a)||!Buffer.isBuffer(b))throw new TypeError("Arguments must be Buffers");if(a===b)return 0;for(var x=a.length,y=b.length,i=0,len=Math.min(x,y);len>i&&a[i]===b[i];)++i;return i!==len&&(x=a[i],y=b[i]),y>x?-1:x>y?1:0},Buffer.isEncoding=function(encoding){switch(String(encoding).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"raw":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},Buffer.concat=function(list,length){if(!isArray(list))throw new TypeError("list argument must be an Array of Buffers.");if(0===list.length)return new Buffer(0);if(1===list.length)return list[0];var i;if(void 0===length)for(length=0,i=0;i<list.length;i++)length+=list[i].length;var buf=new Buffer(length),pos=0;for(i=0;i<list.length;i++){var item=list[i];item.copy(buf,pos),pos+=item.length}return buf},Buffer.byteLength=byteLength,Buffer.prototype.length=void 0,Buffer.prototype.parent=void 0,Buffer.prototype.toString=function(encoding,start,end){var loweredCase=!1;if(start=0|start,end=void 0===end||1/0===end?this.length:0|end,encoding||(encoding="utf8"),0>start&&(start=0),end>this.length&&(end=this.length),start>=end)return"";for(;;)switch(encoding){case"hex":return hexSlice(this,start,end);case"utf8":case"utf-8":return utf8Slice(this,start,end);case"ascii":return asciiSlice(this,start,end);case"binary":return binarySlice(this,start,end);case"base64":return base64Slice(this,start,end);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return utf16leSlice(this,start,end);default:if(loweredCase)throw new TypeError("Unknown encoding: "+encoding);encoding=(encoding+"").toLowerCase(),loweredCase=!0}},Buffer.prototype.equals=function(b){if(!Buffer.isBuffer(b))throw new TypeError("Argument must be a Buffer");return this===b?!0:0===Buffer.compare(this,b)},Buffer.prototype.inspect=function(){var str="",max=exports.INSPECT_MAX_BYTES;return this.length>0&&(str=this.toString("hex",0,max).match(/.{2}/g).join(" "),this.length>max&&(str+=" ... ")),"<Buffer "+str+">"},Buffer.prototype.compare=function(b){if(!Buffer.isBuffer(b))throw new TypeError("Argument must be a Buffer");return this===b?0:Buffer.compare(this,b)},Buffer.prototype.indexOf=function(val,byteOffset){function arrayIndexOf(arr,val,byteOffset){for(var foundIndex=-1,i=0;byteOffset+i<arr.length;i++)if(arr[byteOffset+i]===val[-1===foundIndex?0:i-foundIndex]){if(-1===foundIndex&&(foundIndex=i),i-foundIndex+1===val.length)return byteOffset+foundIndex}else foundIndex=-1;return-1}if(byteOffset>2147483647?byteOffset=2147483647:-2147483648>byteOffset&&(byteOffset=-2147483648),byteOffset>>=0,0===this.length)return-1;if(byteOffset>=this.length)return-1;if(0>byteOffset&&(byteOffset=Math.max(this.length+byteOffset,0)),"string"==typeof val)return 0===val.length?-1:String.prototype.indexOf.call(this,val,byteOffset);if(Buffer.isBuffer(val))return arrayIndexOf(this,val,byteOffset);if("number"==typeof val)return Buffer.TYPED_ARRAY_SUPPORT&&"function"===Uint8Array.prototype.indexOf?Uint8Array.prototype.indexOf.call(this,val,byteOffset):arrayIndexOf(this,[val],byteOffset);throw new TypeError("val must be string, number or Buffer")},Buffer.prototype.get=function(offset){return console.log(".get() is deprecated. Access using array indexes instead."),this.readUInt8(offset)},Buffer.prototype.set=function(v,offset){return console.log(".set() is deprecated. Access using array indexes instead."),this.writeUInt8(v,offset)},Buffer.prototype.write=function(string,offset,length,encoding){if(void 0===offset)encoding="utf8",length=this.length,offset=0;else if(void 0===length&&"string"==typeof offset)encoding=offset,length=this.length,offset=0;else if(isFinite(offset))offset=0|offset,isFinite(length)?(length=0|length,void 0===encoding&&(encoding="utf8")):(encoding=length,length=void 0);else{var swap=encoding;encoding=offset,offset=0|length,length=swap}var remaining=this.length-offset;if((void 0===length||length>remaining)&&(length=remaining),string.length>0&&(0>length||0>offset)||offset>this.length)throw new RangeError("attempt to write outside buffer bounds");encoding||(encoding="utf8");for(var loweredCase=!1;;)switch(encoding){case"hex":return hexWrite(this,string,offset,length);case"utf8":case"utf-8":return utf8Write(this,string,offset,length);case"ascii":return asciiWrite(this,string,offset,length);case"binary":return binaryWrite(this,string,offset,length);case"base64":return base64Write(this,string,offset,length);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return ucs2Write(this,string,offset,length);default:if(loweredCase)throw new TypeError("Unknown encoding: "+encoding);encoding=(""+encoding).toLowerCase(),loweredCase=!0}},Buffer.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}},Buffer.prototype.slice=function(start,end){var len=this.length;start=~~start,end=void 0===end?len:~~end,0>start?(start+=len,0>start&&(start=0)):start>len&&(start=len),0>end?(end+=len,0>end&&(end=0)):end>len&&(end=len),start>end&&(end=start);var newBuf;if(Buffer.TYPED_ARRAY_SUPPORT)newBuf=Buffer._augment(this.subarray(start,end));else{var sliceLen=end-start;newBuf=new Buffer(sliceLen,void 0);for(var i=0;sliceLen>i;i++)newBuf[i]=this[i+start]}return newBuf.length&&(newBuf.parent=this.parent||this),newBuf},Buffer.prototype.readUIntLE=function(offset,byteLength,noAssert){offset=0|offset,byteLength=0|byteLength,noAssert||checkOffset(offset,byteLength,this.length);for(var val=this[offset],mul=1,i=0;++i<byteLength&&(mul*=256);)val+=this[offset+i]*mul;return val},Buffer.prototype.readUIntBE=function(offset,byteLength,noAssert){offset=0|offset,byteLength=0|byteLength,noAssert||checkOffset(offset,byteLength,this.length);for(var val=this[offset+--byteLength],mul=1;byteLength>0&&(mul*=256);)val+=this[offset+--byteLength]*mul;return val},Buffer.prototype.readUInt8=function(offset,noAssert){return noAssert||checkOffset(offset,1,this.length),this[offset]},Buffer.prototype.readUInt16LE=function(offset,noAssert){return noAssert||checkOffset(offset,2,this.length),this[offset]|this[offset+1]<<8},Buffer.prototype.readUInt16BE=function(offset,noAssert){return noAssert||checkOffset(offset,2,this.length),this[offset]<<8|this[offset+1]},Buffer.prototype.readUInt32LE=function(offset,noAssert){return noAssert||checkOffset(offset,4,this.length),(this[offset]|this[offset+1]<<8|this[offset+2]<<16)+16777216*this[offset+3]},Buffer.prototype.readUInt32BE=function(offset,noAssert){return noAssert||checkOffset(offset,4,this.length),16777216*this[offset]+(this[offset+1]<<16|this[offset+2]<<8|this[offset+3])},Buffer.prototype.readIntLE=function(offset,byteLength,noAssert){offset=0|offset,byteLength=0|byteLength,noAssert||checkOffset(offset,byteLength,this.length);for(var val=this[offset],mul=1,i=0;++i<byteLength&&(mul*=256);)val+=this[offset+i]*mul;return mul*=128,val>=mul&&(val-=Math.pow(2,8*byteLength)),val},Buffer.prototype.readIntBE=function(offset,byteLength,noAssert){offset=0|offset,byteLength=0|byteLength,noAssert||checkOffset(offset,byteLength,this.length);for(var i=byteLength,mul=1,val=this[offset+--i];i>0&&(mul*=256);)val+=this[offset+--i]*mul;return mul*=128,val>=mul&&(val-=Math.pow(2,8*byteLength)),val},Buffer.prototype.readInt8=function(offset,noAssert){return noAssert||checkOffset(offset,1,this.length),128&this[offset]?-1*(255-this[offset]+1):this[offset]},Buffer.prototype.readInt16LE=function(offset,noAssert){noAssert||checkOffset(offset,2,this.length);var val=this[offset]|this[offset+1]<<8;return 32768&val?4294901760|val:val},Buffer.prototype.readInt16BE=function(offset,noAssert){noAssert||checkOffset(offset,2,this.length);var val=this[offset+1]|this[offset]<<8;return 32768&val?4294901760|val:val},Buffer.prototype.readInt32LE=function(offset,noAssert){return noAssert||checkOffset(offset,4,this.length),this[offset]|this[offset+1]<<8|this[offset+2]<<16|this[offset+3]<<24},Buffer.prototype.readInt32BE=function(offset,noAssert){return noAssert||checkOffset(offset,4,this.length),this[offset]<<24|this[offset+1]<<16|this[offset+2]<<8|this[offset+3]},Buffer.prototype.readFloatLE=function(offset,noAssert){return noAssert||checkOffset(offset,4,this.length),ieee754.read(this,offset,!0,23,4)},Buffer.prototype.readFloatBE=function(offset,noAssert){return noAssert||checkOffset(offset,4,this.length),ieee754.read(this,offset,!1,23,4)},Buffer.prototype.readDoubleLE=function(offset,noAssert){return noAssert||checkOffset(offset,8,this.length),ieee754.read(this,offset,!0,52,8)},Buffer.prototype.readDoubleBE=function(offset,noAssert){return noAssert||checkOffset(offset,8,this.length),ieee754.read(this,offset,!1,52,8)},Buffer.prototype.writeUIntLE=function(value,offset,byteLength,noAssert){value=+value,offset=0|offset,byteLength=0|byteLength,noAssert||checkInt(this,value,offset,byteLength,Math.pow(2,8*byteLength),0);var mul=1,i=0;for(this[offset]=255&value;++i<byteLength&&(mul*=256);)this[offset+i]=value/mul&255;return offset+byteLength},Buffer.prototype.writeUIntBE=function(value,offset,byteLength,noAssert){value=+value,offset=0|offset,byteLength=0|byteLength,noAssert||checkInt(this,value,offset,byteLength,Math.pow(2,8*byteLength),0);var i=byteLength-1,mul=1;for(this[offset+i]=255&value;--i>=0&&(mul*=256);)this[offset+i]=value/mul&255;return offset+byteLength},Buffer.prototype.writeUInt8=function(value,offset,noAssert){return value=+value,offset=0|offset,noAssert||checkInt(this,value,offset,1,255,0),Buffer.TYPED_ARRAY_SUPPORT||(value=Math.floor(value)),this[offset]=value,offset+1},Buffer.prototype.writeUInt16LE=function(value,offset,noAssert){return value=+value,offset=0|offset,noAssert||checkInt(this,value,offset,2,65535,0),Buffer.TYPED_ARRAY_SUPPORT?(this[offset]=value,this[offset+1]=value>>>8):objectWriteUInt16(this,value,offset,!0),offset+2},Buffer.prototype.writeUInt16BE=function(value,offset,noAssert){return value=+value,offset=0|offset,noAssert||checkInt(this,value,offset,2,65535,0),Buffer.TYPED_ARRAY_SUPPORT?(this[offset]=value>>>8,this[offset+1]=value):objectWriteUInt16(this,value,offset,!1),offset+2},Buffer.prototype.writeUInt32LE=function(value,offset,noAssert){return value=+value,offset=0|offset,noAssert||checkInt(this,value,offset,4,4294967295,0),Buffer.TYPED_ARRAY_SUPPORT?(this[offset+3]=value>>>24,this[offset+2]=value>>>16,this[offset+1]=value>>>8,this[offset]=value):objectWriteUInt32(this,value,offset,!0),offset+4},Buffer.prototype.writeUInt32BE=function(value,offset,noAssert){return value=+value,offset=0|offset,noAssert||checkInt(this,value,offset,4,4294967295,0),Buffer.TYPED_ARRAY_SUPPORT?(this[offset]=value>>>24,this[offset+1]=value>>>16,this[offset+2]=value>>>8,this[offset+3]=value):objectWriteUInt32(this,value,offset,!1),offset+4},Buffer.prototype.writeIntLE=function(value,offset,byteLength,noAssert){if(value=+value,offset=0|offset,!noAssert){var limit=Math.pow(2,8*byteLength-1);checkInt(this,value,offset,byteLength,limit-1,-limit)}var i=0,mul=1,sub=0>value?1:0;for(this[offset]=255&value;++i<byteLength&&(mul*=256);)this[offset+i]=(value/mul>>0)-sub&255;return offset+byteLength},Buffer.prototype.writeIntBE=function(value,offset,byteLength,noAssert){if(value=+value,offset=0|offset,!noAssert){var limit=Math.pow(2,8*byteLength-1);checkInt(this,value,offset,byteLength,limit-1,-limit)}var i=byteLength-1,mul=1,sub=0>value?1:0;for(this[offset+i]=255&value;--i>=0&&(mul*=256);)this[offset+i]=(value/mul>>0)-sub&255;return offset+byteLength},Buffer.prototype.writeInt8=function(value,offset,noAssert){return value=+value,offset=0|offset,noAssert||checkInt(this,value,offset,1,127,-128),Buffer.TYPED_ARRAY_SUPPORT||(value=Math.floor(value)),0>value&&(value=255+value+1),this[offset]=value,offset+1},Buffer.prototype.writeInt16LE=function(value,offset,noAssert){return value=+value,offset=0|offset,noAssert||checkInt(this,value,offset,2,32767,-32768),Buffer.TYPED_ARRAY_SUPPORT?(this[offset]=value,this[offset+1]=value>>>8):objectWriteUInt16(this,value,offset,!0),offset+2},Buffer.prototype.writeInt16BE=function(value,offset,noAssert){return value=+value,offset=0|offset,noAssert||checkInt(this,value,offset,2,32767,-32768),Buffer.TYPED_ARRAY_SUPPORT?(this[offset]=value>>>8,this[offset+1]=value):objectWriteUInt16(this,value,offset,!1),offset+2},Buffer.prototype.writeInt32LE=function(value,offset,noAssert){return value=+value,offset=0|offset,noAssert||checkInt(this,value,offset,4,2147483647,-2147483648),Buffer.TYPED_ARRAY_SUPPORT?(this[offset]=value,this[offset+1]=value>>>8,this[offset+2]=value>>>16,this[offset+3]=value>>>24):objectWriteUInt32(this,value,offset,!0),offset+4},Buffer.prototype.writeInt32BE=function(value,offset,noAssert){return value=+value,offset=0|offset,noAssert||checkInt(this,value,offset,4,2147483647,-2147483648),0>value&&(value=4294967295+value+1),Buffer.TYPED_ARRAY_SUPPORT?(this[offset]=value>>>24,this[offset+1]=value>>>16,this[offset+2]=value>>>8,this[offset+3]=value):objectWriteUInt32(this,value,offset,!1),offset+4},Buffer.prototype.writeFloatLE=function(value,offset,noAssert){return writeFloat(this,value,offset,!0,noAssert)},Buffer.prototype.writeFloatBE=function(value,offset,noAssert){return writeFloat(this,value,offset,!1,noAssert)},Buffer.prototype.writeDoubleLE=function(value,offset,noAssert){return writeDouble(this,value,offset,!0,noAssert)},Buffer.prototype.writeDoubleBE=function(value,offset,noAssert){return writeDouble(this,value,offset,!1,noAssert)},Buffer.prototype.copy=function(target,targetStart,start,end){if(start||(start=0),end||0===end||(end=this.length),targetStart>=target.length&&(targetStart=target.length),targetStart||(targetStart=0),end>0&&start>end&&(end=start),end===start)return 0;if(0===target.length||0===this.length)return 0;if(0>targetStart)throw new RangeError("targetStart out of bounds");if(0>start||start>=this.length)throw new RangeError("sourceStart out of bounds");if(0>end)throw new RangeError("sourceEnd out of bounds");end>this.length&&(end=this.length),target.length-targetStart<end-start&&(end=target.length-targetStart+start);var len=end-start;if(1e3>len||!Buffer.TYPED_ARRAY_SUPPORT)for(var i=0;len>i;i++)target[i+targetStart]=this[i+start];else target._set(this.subarray(start,start+len),targetStart);return len},Buffer.prototype.fill=function(value,start,end){if(value||(value=0),start||(start=0),end||(end=this.length),start>end)throw new RangeError("end < start");if(end!==start&&0!==this.length){if(0>start||start>=this.length)throw new RangeError("start out of bounds");if(0>end||end>this.length)throw new RangeError("end out of bounds");var i;if("number"==typeof value)for(i=start;end>i;i++)this[i]=value;else{var bytes=utf8ToBytes(value.toString()),len=bytes.length;for(i=start;end>i;i++)this[i]=bytes[i%len]}return this}},Buffer.prototype.toArrayBuffer=function(){if("undefined"!=typeof Uint8Array){if(Buffer.TYPED_ARRAY_SUPPORT)return new Buffer(this).buffer;for(var buf=new Uint8Array(this.length),i=0,len=buf.length;len>i;i+=1)buf[i]=this[i];return buf.buffer}throw new TypeError("Buffer.toArrayBuffer not supported in this browser")};var BP=Buffer.prototype;Buffer._augment=function(arr){return arr.constructor=Buffer,arr._isBuffer=!0,arr._set=arr.set,arr.get=BP.get,arr.set=BP.set,arr.write=BP.write,arr.toString=BP.toString,arr.toLocaleString=BP.toString,arr.toJSON=BP.toJSON,arr.equals=BP.equals,arr.compare=BP.compare,arr.indexOf=BP.indexOf,arr.copy=BP.copy,arr.slice=BP.slice,arr.readUIntLE=BP.readUIntLE,arr.readUIntBE=BP.readUIntBE,arr.readUInt8=BP.readUInt8,arr.readUInt16LE=BP.readUInt16LE,arr.readUInt16BE=BP.readUInt16BE,arr.readUInt32LE=BP.readUInt32LE,arr.readUInt32BE=BP.readUInt32BE,arr.readIntLE=BP.readIntLE,arr.readIntBE=BP.readIntBE,arr.readInt8=BP.readInt8,arr.readInt16LE=BP.readInt16LE,arr.readInt16BE=BP.readInt16BE,arr.readInt32LE=BP.readInt32LE,arr.readInt32BE=BP.readInt32BE,arr.readFloatLE=BP.readFloatLE,arr.readFloatBE=BP.readFloatBE,arr.readDoubleLE=BP.readDoubleLE,arr.readDoubleBE=BP.readDoubleBE,arr.writeUInt8=BP.writeUInt8,arr.writeUIntLE=BP.writeUIntLE,arr.writeUIntBE=BP.writeUIntBE,arr.writeUInt16LE=BP.writeUInt16LE,arr.writeUInt16BE=BP.writeUInt16BE,arr.writeUInt32LE=BP.writeUInt32LE,arr.writeUInt32BE=BP.writeUInt32BE,arr.writeIntLE=BP.writeIntLE,arr.writeIntBE=BP.writeIntBE,arr.writeInt8=BP.writeInt8,arr.writeInt16LE=BP.writeInt16LE,arr.writeInt16BE=BP.writeInt16BE,arr.writeInt32LE=BP.writeInt32LE,arr.writeInt32BE=BP.writeInt32BE,arr.writeFloatLE=BP.writeFloatLE,arr.writeFloatBE=BP.writeFloatBE,arr.writeDoubleLE=BP.writeDoubleLE,arr.writeDoubleBE=BP.writeDoubleBE,arr.fill=BP.fill,arr.inspect=BP.inspect,arr.toArrayBuffer=BP.toArrayBuffer,arr};var INVALID_BASE64_RE=/[^+\/0-9A-z\-]/g},{"base64-js":3,ieee754:4,"is-array":5}],3:[function(require,module,exports){var lookup="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";!function(exports){"use strict";function decode(elt){var code=elt.charCodeAt(0);return code===PLUS||code===PLUS_URL_SAFE?62:code===SLASH||code===SLASH_URL_SAFE?63:NUMBER>code?-1:NUMBER+10>code?code-NUMBER+26+26:UPPER+26>code?code-UPPER:LOWER+26>code?code-LOWER+26:void 0}function b64ToByteArray(b64){function push(v){arr[L++]=v}var i,j,l,tmp,placeHolders,arr;if(b64.length%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var len=b64.length;placeHolders="="===b64.charAt(len-2)?2:"="===b64.charAt(len-1)?1:0,arr=new Arr(3*b64.length/4-placeHolders),l=placeHolders>0?b64.length-4:b64.length;var L=0;for(i=0,j=0;l>i;i+=4,j+=3)tmp=decode(b64.charAt(i))<<18|decode(b64.charAt(i+1))<<12|decode(b64.charAt(i+2))<<6|decode(b64.charAt(i+3)),push((16711680&tmp)>>16),push((65280&tmp)>>8),push(255&tmp);return 2===placeHolders?(tmp=decode(b64.charAt(i))<<2|decode(b64.charAt(i+1))>>4,push(255&tmp)):1===placeHolders&&(tmp=decode(b64.charAt(i))<<10|decode(b64.charAt(i+1))<<4|decode(b64.charAt(i+2))>>2,push(tmp>>8&255),push(255&tmp)),arr}function uint8ToBase64(uint8){function encode(num){return lookup.charAt(num)}function tripletToBase64(num){return encode(num>>18&63)+encode(num>>12&63)+encode(num>>6&63)+encode(63&num)}var i,temp,length,extraBytes=uint8.length%3,output="";for(i=0,length=uint8.length-extraBytes;length>i;i+=3)temp=(uint8[i]<<16)+(uint8[i+1]<<8)+uint8[i+2],output+=tripletToBase64(temp);switch(extraBytes){case 1:temp=uint8[uint8.length-1],output+=encode(temp>>2),output+=encode(temp<<4&63),output+="==";break;case 2:temp=(uint8[uint8.length-2]<<8)+uint8[uint8.length-1],output+=encode(temp>>10),output+=encode(temp>>4&63),output+=encode(temp<<2&63),output+="="}return output}var Arr="undefined"!=typeof Uint8Array?Uint8Array:Array,PLUS="+".charCodeAt(0),SLASH="/".charCodeAt(0),NUMBER="0".charCodeAt(0),LOWER="a".charCodeAt(0),UPPER="A".charCodeAt(0),PLUS_URL_SAFE="-".charCodeAt(0),SLASH_URL_SAFE="_".charCodeAt(0);exports.toByteArray=b64ToByteArray,exports.fromByteArray=uint8ToBase64}("undefined"==typeof exports?this.base64js={}:exports)},{}],4:[function(require,module,exports){exports.read=function(buffer,offset,isLE,mLen,nBytes){var e,m,eLen=8*nBytes-mLen-1,eMax=(1<<eLen)-1,eBias=eMax>>1,nBits=-7,i=isLE?nBytes-1:0,d=isLE?-1:1,s=buffer[offset+i];for(i+=d,e=s&(1<<-nBits)-1,s>>=-nBits,nBits+=eLen;nBits>0;e=256*e+buffer[offset+i],i+=d,nBits-=8);for(m=e&(1<<-nBits)-1,e>>=-nBits,nBits+=mLen;nBits>0;m=256*m+buffer[offset+i],i+=d,nBits-=8);if(0===e)e=1-eBias;else{if(e===eMax)return m?0/0:1/0*(s?-1:1);m+=Math.pow(2,mLen),e-=eBias}return(s?-1:1)*m*Math.pow(2,e-mLen)},exports.write=function(buffer,value,offset,isLE,mLen,nBytes){var e,m,c,eLen=8*nBytes-mLen-1,eMax=(1<<eLen)-1,eBias=eMax>>1,rt=23===mLen?Math.pow(2,-24)-Math.pow(2,-77):0,i=isLE?0:nBytes-1,d=isLE?1:-1,s=0>value||0===value&&0>1/value?1:0;for(value=Math.abs(value),isNaN(value)||1/0===value?(m=isNaN(value)?1:0,e=eMax):(e=Math.floor(Math.log(value)/Math.LN2),value*(c=Math.pow(2,-e))<1&&(e--,c*=2),value+=e+eBias>=1?rt/c:rt*Math.pow(2,1-eBias),value*c>=2&&(e++,c/=2),e+eBias>=eMax?(m=0,e=eMax):e+eBias>=1?(m=(value*c-1)*Math.pow(2,mLen),e+=eBias):(m=value*Math.pow(2,eBias-1)*Math.pow(2,mLen),e=0));mLen>=8;buffer[offset+i]=255&m,i+=d,m/=256,mLen-=8);for(e=e<<mLen|m,eLen+=mLen;eLen>0;buffer[offset+i]=255&e,i+=d,e/=256,eLen-=8);buffer[offset+i-d]|=128*s}},{}],5:[function(require,module){var isArray=Array.isArray,str=Object.prototype.toString;module.exports=isArray||function(val){return!!val&&"[object Array]"==str.call(val)}},{}],6:[function(require,module){function EventEmitter(){this._events=this._events||{},this._maxListeners=this._maxListeners||void 0}function isFunction(arg){return"function"==typeof arg}function isNumber(arg){return"number"==typeof arg}function isObject(arg){return"object"==typeof arg&&null!==arg}function isUndefined(arg){return void 0===arg}module.exports=EventEmitter,EventEmitter.EventEmitter=EventEmitter,EventEmitter.prototype._events=void 0,EventEmitter.prototype._maxListeners=void 0,EventEmitter.defaultMaxListeners=10,EventEmitter.prototype.setMaxListeners=function(n){if(!isNumber(n)||0>n||isNaN(n))throw TypeError("n must be a positive number");return this._maxListeners=n,this},EventEmitter.prototype.emit=function(type){var er,handler,len,args,i,listeners;if(this._events||(this._events={}),"error"===type&&(!this._events.error||isObject(this._events.error)&&!this._events.error.length)){if(er=arguments[1],er instanceof Error)throw er;throw TypeError('Uncaught, unspecified "error" event.')}if(handler=this._events[type],isUndefined(handler))return!1;if(isFunction(handler))switch(arguments.length){case 1:handler.call(this);break;case 2:handler.call(this,arguments[1]);break;case 3:handler.call(this,arguments[1],arguments[2]);break;default:for(len=arguments.length,args=new Array(len-1),i=1;len>i;i++)args[i-1]=arguments[i];handler.apply(this,args)}else if(isObject(handler)){for(len=arguments.length,args=new Array(len-1),i=1;len>i;i++)args[i-1]=arguments[i];for(listeners=handler.slice(),len=listeners.length,i=0;len>i;i++)listeners[i].apply(this,args)}return!0},EventEmitter.prototype.addListener=function(type,listener){var m;if(!isFunction(listener))throw TypeError("listener must be a function");if(this._events||(this._events={}),this._events.newListener&&this.emit("newListener",type,isFunction(listener.listener)?listener.listener:listener),this._events[type]?isObject(this._events[type])?this._events[type].push(listener):this._events[type]=[this._events[type],listener]:this._events[type]=listener,isObject(this._events[type])&&!this._events[type].warned){var m;m=isUndefined(this._maxListeners)?EventEmitter.defaultMaxListeners:this._maxListeners,m&&m>0&&this._events[type].length>m&&(this._events[type].warned=!0,console.error("(node) warning: possible EventEmitter memory leak detected. %d listeners added. Use emitter.setMaxListeners() to increase limit.",this._events[type].length),"function"==typeof console.trace&&console.trace())}return this},EventEmitter.prototype.on=EventEmitter.prototype.addListener,EventEmitter.prototype.once=function(type,listener){function g(){this.removeListener(type,g),fired||(fired=!0,listener.apply(this,arguments))}if(!isFunction(listener))throw TypeError("listener must be a function");var fired=!1;return g.listener=listener,this.on(type,g),this},EventEmitter.prototype.removeListener=function(type,listener){var list,position,length,i;if(!isFunction(listener))throw TypeError("listener must be a function");if(!this._events||!this._events[type])return this;if(list=this._events[type],length=list.length,position=-1,list===listener||isFunction(list.listener)&&list.listener===listener)delete this._events[type],this._events.removeListener&&this.emit("removeListener",type,listener);else if(isObject(list)){for(i=length;i-->0;)if(list[i]===listener||list[i].listener&&list[i].listener===listener){position=i;break}if(0>position)return this;1===list.length?(list.length=0,delete this._events[type]):list.splice(position,1),this._events.removeListener&&this.emit("removeListener",type,listener)}return this},EventEmitter.prototype.removeAllListeners=function(type){var key,listeners;if(!this._events)return this;if(!this._events.removeListener)return 0===arguments.length?this._events={}:this._events[type]&&delete this._events[type],this;if(0===arguments.length){for(key in this._events)"removeListener"!==key&&this.removeAllListeners(key);return this.removeAllListeners("removeListener"),this._events={},this}if(listeners=this._events[type],isFunction(listeners))this.removeListener(type,listeners);else for(;listeners.length;)this.removeListener(type,listeners[listeners.length-1]);return delete this._events[type],this},EventEmitter.prototype.listeners=function(type){var ret;return ret=this._events&&this._events[type]?isFunction(this._events[type])?[this._events[type]]:this._events[type].slice():[]},EventEmitter.listenerCount=function(emitter,type){var ret;return ret=emitter._events&&emitter._events[type]?isFunction(emitter._events[type])?1:emitter._events[type].length:0}},{}],7:[function(require,module){module.exports="function"==typeof Object.create?function(ctor,superCtor){ctor.super_=superCtor,ctor.prototype=Object.create(superCtor.prototype,{constructor:{value:ctor,enumerable:!1,writable:!0,configurable:!0}})}:function(ctor,superCtor){ctor.super_=superCtor;var TempCtor=function(){};TempCtor.prototype=superCtor.prototype,ctor.prototype=new TempCtor,ctor.prototype.constructor=ctor}},{}],8:[function(require,module){module.exports=Array.isArray||function(arr){return"[object Array]"==Object.prototype.toString.call(arr)}},{}],9:[function(require,module){function cleanUpNextTick(){draining=!1,currentQueue.length?queue=currentQueue.concat(queue):queueIndex=-1,queue.length&&drainQueue()}function drainQueue(){if(!draining){var timeout=setTimeout(cleanUpNextTick);draining=!0;for(var len=queue.length;len;){for(currentQueue=queue,queue=[];++queueIndex<len;)currentQueue[queueIndex].run();queueIndex=-1,len=queue.length}currentQueue=null,draining=!1,clearTimeout(timeout)}}function Item(fun,array){this.fun=fun,this.array=array}function noop(){}var currentQueue,process=module.exports={},queue=[],draining=!1,queueIndex=-1;process.nextTick=function(fun){var args=new Array(arguments.length-1);if(arguments.length>1)for(var i=1;i<arguments.length;i++)args[i-1]=arguments[i];queue.push(new Item(fun,args)),1!==queue.length||draining||setTimeout(drainQueue,0)},Item.prototype.run=function(){this.fun.apply(null,this.array)},process.title="browser",process.browser=!0,process.env={},process.argv=[],process.version="",process.versions={},process.on=noop,process.addListener=noop,process.once=noop,process.off=noop,process.removeListener=noop,process.removeAllListeners=noop,process.emit=noop,process.binding=function(){throw new Error("process.binding is not supported")},process.cwd=function(){return"/"},process.chdir=function(){throw new Error("process.chdir is not supported")},process.umask=function(){return 0}},{}],10:[function(require,module){module.exports=require("./lib/_stream_duplex.js")},{"./lib/_stream_duplex.js":11}],11:[function(require,module){(function(process){function Duplex(options){return this instanceof Duplex?(Readable.call(this,options),Writable.call(this,options),options&&options.readable===!1&&(this.readable=!1),options&&options.writable===!1&&(this.writable=!1),this.allowHalfOpen=!0,options&&options.allowHalfOpen===!1&&(this.allowHalfOpen=!1),void this.once("end",onend)):new Duplex(options)}function onend(){this.allowHalfOpen||this._writableState.ended||process.nextTick(this.end.bind(this))}function forEach(xs,f){for(var i=0,l=xs.length;l>i;i++)f(xs[i],i)}module.exports=Duplex;var objectKeys=Object.keys||function(obj){var keys=[];for(var key in obj)keys.push(key);return keys},util=require("core-util-is");util.inherits=require("inherits");var Readable=require("./_stream_readable"),Writable=require("./_stream_writable");util.inherits(Duplex,Readable),forEach(objectKeys(Writable.prototype),function(method){Duplex.prototype[method]||(Duplex.prototype[method]=Writable.prototype[method])})}).call(this,require("_process"))},{"./_stream_readable":13,"./_stream_writable":15,_process:9,"core-util-is":16,inherits:7}],12:[function(require,module){function PassThrough(options){return this instanceof PassThrough?void Transform.call(this,options):new PassThrough(options)}module.exports=PassThrough;var Transform=require("./_stream_transform"),util=require("core-util-is");util.inherits=require("inherits"),util.inherits(PassThrough,Transform),PassThrough.prototype._transform=function(chunk,encoding,cb){cb(null,chunk)}},{"./_stream_transform":14,"core-util-is":16,inherits:7}],13:[function(require,module){(function(process){function ReadableState(options,stream){var Duplex=require("./_stream_duplex");options=options||{};var hwm=options.highWaterMark,defaultHwm=options.objectMode?16:16384;this.highWaterMark=hwm||0===hwm?hwm:defaultHwm,this.highWaterMark=~~this.highWaterMark,this.buffer=[],this.length=0,this.pipes=null,this.pipesCount=0,this.flowing=null,this.ended=!1,this.endEmitted=!1,this.reading=!1,this.sync=!0,this.needReadable=!1,this.emittedReadable=!1,this.readableListening=!1,this.objectMode=!!options.objectMode,stream instanceof Duplex&&(this.objectMode=this.objectMode||!!options.readableObjectMode),this.defaultEncoding=options.defaultEncoding||"utf8",this.ranOut=!1,this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,options.encoding&&(StringDecoder||(StringDecoder=require("string_decoder/").StringDecoder),this.decoder=new StringDecoder(options.encoding),this.encoding=options.encoding)}function Readable(options){require("./_stream_duplex");return this instanceof Readable?(this._readableState=new ReadableState(options,this),this.readable=!0,void Stream.call(this)):new Readable(options)}function readableAddChunk(stream,state,chunk,encoding,addToFront){var er=chunkInvalid(state,chunk);if(er)stream.emit("error",er);else if(util.isNullOrUndefined(chunk))state.reading=!1,state.ended||onEofChunk(stream,state);else if(state.objectMode||chunk&&chunk.length>0)if(state.ended&&!addToFront){var e=new Error("stream.push() after EOF");stream.emit("error",e)}else if(state.endEmitted&&addToFront){var e=new Error("stream.unshift() after end event");stream.emit("error",e)}else!state.decoder||addToFront||encoding||(chunk=state.decoder.write(chunk)),addToFront||(state.reading=!1),state.flowing&&0===state.length&&!state.sync?(stream.emit("data",chunk),stream.read(0)):(state.length+=state.objectMode?1:chunk.length,addToFront?state.buffer.unshift(chunk):state.buffer.push(chunk),state.needReadable&&emitReadable(stream)),maybeReadMore(stream,state);else addToFront||(state.reading=!1);return needMoreData(state)}function needMoreData(state){return!state.ended&&(state.needReadable||state.length<state.highWaterMark||0===state.length)}function roundUpToNextPowerOf2(n){if(n>=MAX_HWM)n=MAX_HWM;else{n--;for(var p=1;32>p;p<<=1)n|=n>>p;n++}return n}function howMuchToRead(n,state){return 0===state.length&&state.ended?0:state.objectMode?0===n?0:1:isNaN(n)||util.isNull(n)?state.flowing&&state.buffer.length?state.buffer[0].length:state.length:0>=n?0:(n>state.highWaterMark&&(state.highWaterMark=roundUpToNextPowerOf2(n)),n>state.length?state.ended?state.length:(state.needReadable=!0,0):n)}function chunkInvalid(state,chunk){var er=null;return util.isBuffer(chunk)||util.isString(chunk)||util.isNullOrUndefined(chunk)||state.objectMode||(er=new TypeError("Invalid non-string/buffer chunk")),er}function onEofChunk(stream,state){if(state.decoder&&!state.ended){var chunk=state.decoder.end();
+chunk&&chunk.length&&(state.buffer.push(chunk),state.length+=state.objectMode?1:chunk.length)}state.ended=!0,emitReadable(stream)}function emitReadable(stream){var state=stream._readableState;state.needReadable=!1,state.emittedReadable||(debug("emitReadable",state.flowing),state.emittedReadable=!0,state.sync?process.nextTick(function(){emitReadable_(stream)}):emitReadable_(stream))}function emitReadable_(stream){debug("emit readable"),stream.emit("readable"),flow(stream)}function maybeReadMore(stream,state){state.readingMore||(state.readingMore=!0,process.nextTick(function(){maybeReadMore_(stream,state)}))}function maybeReadMore_(stream,state){for(var len=state.length;!state.reading&&!state.flowing&&!state.ended&&state.length<state.highWaterMark&&(debug("maybeReadMore read 0"),stream.read(0),len!==state.length);)len=state.length;state.readingMore=!1}function pipeOnDrain(src){return function(){var state=src._readableState;debug("pipeOnDrain",state.awaitDrain),state.awaitDrain&&state.awaitDrain--,0===state.awaitDrain&&EE.listenerCount(src,"data")&&(state.flowing=!0,flow(src))}}function resume(stream,state){state.resumeScheduled||(state.resumeScheduled=!0,process.nextTick(function(){resume_(stream,state)}))}function resume_(stream,state){state.resumeScheduled=!1,stream.emit("resume"),flow(stream),state.flowing&&!state.reading&&stream.read(0)}function flow(stream){var state=stream._readableState;if(debug("flow",state.flowing),state.flowing)do var chunk=stream.read();while(null!==chunk&&state.flowing)}function fromList(n,state){var ret,list=state.buffer,length=state.length,stringMode=!!state.decoder,objectMode=!!state.objectMode;if(0===list.length)return null;if(0===length)ret=null;else if(objectMode)ret=list.shift();else if(!n||n>=length)ret=stringMode?list.join(""):Buffer.concat(list,length),list.length=0;else if(n<list[0].length){var buf=list[0];ret=buf.slice(0,n),list[0]=buf.slice(n)}else if(n===list[0].length)ret=list.shift();else{ret=stringMode?"":new Buffer(n);for(var c=0,i=0,l=list.length;l>i&&n>c;i++){var buf=list[0],cpy=Math.min(n-c,buf.length);stringMode?ret+=buf.slice(0,cpy):buf.copy(ret,c,0,cpy),cpy<buf.length?list[0]=buf.slice(cpy):list.shift(),c+=cpy}}return ret}function endReadable(stream){var state=stream._readableState;if(state.length>0)throw new Error("endReadable called on non-empty stream");state.endEmitted||(state.ended=!0,process.nextTick(function(){state.endEmitted||0!==state.length||(state.endEmitted=!0,stream.readable=!1,stream.emit("end"))}))}function forEach(xs,f){for(var i=0,l=xs.length;l>i;i++)f(xs[i],i)}function indexOf(xs,x){for(var i=0,l=xs.length;l>i;i++)if(xs[i]===x)return i;return-1}module.exports=Readable;var isArray=require("isarray"),Buffer=require("buffer").Buffer;Readable.ReadableState=ReadableState;var EE=require("events").EventEmitter;EE.listenerCount||(EE.listenerCount=function(emitter,type){return emitter.listeners(type).length});var Stream=require("stream"),util=require("core-util-is");util.inherits=require("inherits");var StringDecoder,debug=require("util");debug=debug&&debug.debuglog?debug.debuglog("stream"):function(){},util.inherits(Readable,Stream),Readable.prototype.push=function(chunk,encoding){var state=this._readableState;return util.isString(chunk)&&!state.objectMode&&(encoding=encoding||state.defaultEncoding,encoding!==state.encoding&&(chunk=new Buffer(chunk,encoding),encoding="")),readableAddChunk(this,state,chunk,encoding,!1)},Readable.prototype.unshift=function(chunk){var state=this._readableState;return readableAddChunk(this,state,chunk,"",!0)},Readable.prototype.setEncoding=function(enc){return StringDecoder||(StringDecoder=require("string_decoder/").StringDecoder),this._readableState.decoder=new StringDecoder(enc),this._readableState.encoding=enc,this};var MAX_HWM=8388608;Readable.prototype.read=function(n){debug("read",n);var state=this._readableState,nOrig=n;if((!util.isNumber(n)||n>0)&&(state.emittedReadable=!1),0===n&&state.needReadable&&(state.length>=state.highWaterMark||state.ended))return debug("read: emitReadable",state.length,state.ended),0===state.length&&state.ended?endReadable(this):emitReadable(this),null;if(n=howMuchToRead(n,state),0===n&&state.ended)return 0===state.length&&endReadable(this),null;var doRead=state.needReadable;debug("need readable",doRead),(0===state.length||state.length-n<state.highWaterMark)&&(doRead=!0,debug("length less than watermark",doRead)),(state.ended||state.reading)&&(doRead=!1,debug("reading or ended",doRead)),doRead&&(debug("do read"),state.reading=!0,state.sync=!0,0===state.length&&(state.needReadable=!0),this._read(state.highWaterMark),state.sync=!1),doRead&&!state.reading&&(n=howMuchToRead(nOrig,state));var ret;return ret=n>0?fromList(n,state):null,util.isNull(ret)&&(state.needReadable=!0,n=0),state.length-=n,0!==state.length||state.ended||(state.needReadable=!0),nOrig!==n&&state.ended&&0===state.length&&endReadable(this),util.isNull(ret)||this.emit("data",ret),ret},Readable.prototype._read=function(){this.emit("error",new Error("not implemented"))},Readable.prototype.pipe=function(dest,pipeOpts){function onunpipe(readable){debug("onunpipe"),readable===src&&cleanup()}function onend(){debug("onend"),dest.end()}function cleanup(){debug("cleanup"),dest.removeListener("close",onclose),dest.removeListener("finish",onfinish),dest.removeListener("drain",ondrain),dest.removeListener("error",onerror),dest.removeListener("unpipe",onunpipe),src.removeListener("end",onend),src.removeListener("end",cleanup),src.removeListener("data",ondata),!state.awaitDrain||dest._writableState&&!dest._writableState.needDrain||ondrain()}function ondata(chunk){debug("ondata");var ret=dest.write(chunk);!1===ret&&(debug("false write response, pause",src._readableState.awaitDrain),src._readableState.awaitDrain++,src.pause())}function onerror(er){debug("onerror",er),unpipe(),dest.removeListener("error",onerror),0===EE.listenerCount(dest,"error")&&dest.emit("error",er)}function onclose(){dest.removeListener("finish",onfinish),unpipe()}function onfinish(){debug("onfinish"),dest.removeListener("close",onclose),unpipe()}function unpipe(){debug("unpipe"),src.unpipe(dest)}var src=this,state=this._readableState;switch(state.pipesCount){case 0:state.pipes=dest;break;case 1:state.pipes=[state.pipes,dest];break;default:state.pipes.push(dest)}state.pipesCount+=1,debug("pipe count=%d opts=%j",state.pipesCount,pipeOpts);var doEnd=(!pipeOpts||pipeOpts.end!==!1)&&dest!==process.stdout&&dest!==process.stderr,endFn=doEnd?onend:cleanup;state.endEmitted?process.nextTick(endFn):src.once("end",endFn),dest.on("unpipe",onunpipe);var ondrain=pipeOnDrain(src);return dest.on("drain",ondrain),src.on("data",ondata),dest._events&&dest._events.error?isArray(dest._events.error)?dest._events.error.unshift(onerror):dest._events.error=[onerror,dest._events.error]:dest.on("error",onerror),dest.once("close",onclose),dest.once("finish",onfinish),dest.emit("pipe",src),state.flowing||(debug("pipe resume"),src.resume()),dest},Readable.prototype.unpipe=function(dest){var state=this._readableState;if(0===state.pipesCount)return this;if(1===state.pipesCount)return dest&&dest!==state.pipes?this:(dest||(dest=state.pipes),state.pipes=null,state.pipesCount=0,state.flowing=!1,dest&&dest.emit("unpipe",this),this);if(!dest){var dests=state.pipes,len=state.pipesCount;state.pipes=null,state.pipesCount=0,state.flowing=!1;for(var i=0;len>i;i++)dests[i].emit("unpipe",this);return this}var i=indexOf(state.pipes,dest);return-1===i?this:(state.pipes.splice(i,1),state.pipesCount-=1,1===state.pipesCount&&(state.pipes=state.pipes[0]),dest.emit("unpipe",this),this)},Readable.prototype.on=function(ev,fn){var res=Stream.prototype.on.call(this,ev,fn);if("data"===ev&&!1!==this._readableState.flowing&&this.resume(),"readable"===ev&&this.readable){var state=this._readableState;if(!state.readableListening)if(state.readableListening=!0,state.emittedReadable=!1,state.needReadable=!0,state.reading)state.length&&emitReadable(this,state);else{var self=this;process.nextTick(function(){debug("readable nexttick read 0"),self.read(0)})}}return res},Readable.prototype.addListener=Readable.prototype.on,Readable.prototype.resume=function(){var state=this._readableState;return state.flowing||(debug("resume"),state.flowing=!0,state.reading||(debug("resume read 0"),this.read(0)),resume(this,state)),this},Readable.prototype.pause=function(){return debug("call pause flowing=%j",this._readableState.flowing),!1!==this._readableState.flowing&&(debug("pause"),this._readableState.flowing=!1,this.emit("pause")),this},Readable.prototype.wrap=function(stream){var state=this._readableState,paused=!1,self=this;stream.on("end",function(){if(debug("wrapped end"),state.decoder&&!state.ended){var chunk=state.decoder.end();chunk&&chunk.length&&self.push(chunk)}self.push(null)}),stream.on("data",function(chunk){if(debug("wrapped data"),state.decoder&&(chunk=state.decoder.write(chunk)),chunk&&(state.objectMode||chunk.length)){var ret=self.push(chunk);ret||(paused=!0,stream.pause())}});for(var i in stream)util.isFunction(stream[i])&&util.isUndefined(this[i])&&(this[i]=function(method){return function(){return stream[method].apply(stream,arguments)}}(i));var events=["error","close","destroy","pause","resume"];return forEach(events,function(ev){stream.on(ev,self.emit.bind(self,ev))}),self._read=function(n){debug("wrapped _read",n),paused&&(paused=!1,stream.resume())},self},Readable._fromList=fromList}).call(this,require("_process"))},{"./_stream_duplex":11,_process:9,buffer:2,"core-util-is":16,events:6,inherits:7,isarray:8,stream:21,"string_decoder/":22,util:1}],14:[function(require,module){function TransformState(options,stream){this.afterTransform=function(er,data){return afterTransform(stream,er,data)},this.needTransform=!1,this.transforming=!1,this.writecb=null,this.writechunk=null}function afterTransform(stream,er,data){var ts=stream._transformState;ts.transforming=!1;var cb=ts.writecb;if(!cb)return stream.emit("error",new Error("no writecb in Transform class"));ts.writechunk=null,ts.writecb=null,util.isNullOrUndefined(data)||stream.push(data),cb&&cb(er);var rs=stream._readableState;rs.reading=!1,(rs.needReadable||rs.length<rs.highWaterMark)&&stream._read(rs.highWaterMark)}function Transform(options){if(!(this instanceof Transform))return new Transform(options);Duplex.call(this,options),this._transformState=new TransformState(options,this);var stream=this;this._readableState.needReadable=!0,this._readableState.sync=!1,this.once("prefinish",function(){util.isFunction(this._flush)?this._flush(function(er){done(stream,er)}):done(stream)})}function done(stream,er){if(er)return stream.emit("error",er);var ws=stream._writableState,ts=stream._transformState;if(ws.length)throw new Error("calling transform done when ws.length != 0");if(ts.transforming)throw new Error("calling transform done when still transforming");return stream.push(null)}module.exports=Transform;var Duplex=require("./_stream_duplex"),util=require("core-util-is");util.inherits=require("inherits"),util.inherits(Transform,Duplex),Transform.prototype.push=function(chunk,encoding){return this._transformState.needTransform=!1,Duplex.prototype.push.call(this,chunk,encoding)},Transform.prototype._transform=function(){throw new Error("not implemented")},Transform.prototype._write=function(chunk,encoding,cb){var ts=this._transformState;if(ts.writecb=cb,ts.writechunk=chunk,ts.writeencoding=encoding,!ts.transforming){var rs=this._readableState;(ts.needTransform||rs.needReadable||rs.length<rs.highWaterMark)&&this._read(rs.highWaterMark)}},Transform.prototype._read=function(){var ts=this._transformState;util.isNull(ts.writechunk)||!ts.writecb||ts.transforming?ts.needTransform=!0:(ts.transforming=!0,this._transform(ts.writechunk,ts.writeencoding,ts.afterTransform))}},{"./_stream_duplex":11,"core-util-is":16,inherits:7}],15:[function(require,module){(function(process){function WriteReq(chunk,encoding,cb){this.chunk=chunk,this.encoding=encoding,this.callback=cb}function WritableState(options,stream){var Duplex=require("./_stream_duplex");options=options||{};var hwm=options.highWaterMark,defaultHwm=options.objectMode?16:16384;this.highWaterMark=hwm||0===hwm?hwm:defaultHwm,this.objectMode=!!options.objectMode,stream instanceof Duplex&&(this.objectMode=this.objectMode||!!options.writableObjectMode),this.highWaterMark=~~this.highWaterMark,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1;var noDecode=options.decodeStrings===!1;this.decodeStrings=!noDecode,this.defaultEncoding=options.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(er){onwrite(stream,er)},this.writecb=null,this.writelen=0,this.buffer=[],this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1}function Writable(options){var Duplex=require("./_stream_duplex");return this instanceof Writable||this instanceof Duplex?(this._writableState=new WritableState(options,this),this.writable=!0,void Stream.call(this)):new Writable(options)}function writeAfterEnd(stream,state,cb){var er=new Error("write after end");stream.emit("error",er),process.nextTick(function(){cb(er)})}function validChunk(stream,state,chunk,cb){var valid=!0;if(!(util.isBuffer(chunk)||util.isString(chunk)||util.isNullOrUndefined(chunk)||state.objectMode)){var er=new TypeError("Invalid non-string/buffer chunk");stream.emit("error",er),process.nextTick(function(){cb(er)}),valid=!1}return valid}function decodeChunk(state,chunk,encoding){return!state.objectMode&&state.decodeStrings!==!1&&util.isString(chunk)&&(chunk=new Buffer(chunk,encoding)),chunk}function writeOrBuffer(stream,state,chunk,encoding,cb){chunk=decodeChunk(state,chunk,encoding),util.isBuffer(chunk)&&(encoding="buffer");var len=state.objectMode?1:chunk.length;state.length+=len;var ret=state.length<state.highWaterMark;return ret||(state.needDrain=!0),state.writing||state.corked?state.buffer.push(new WriteReq(chunk,encoding,cb)):doWrite(stream,state,!1,len,chunk,encoding,cb),ret}function doWrite(stream,state,writev,len,chunk,encoding,cb){state.writelen=len,state.writecb=cb,state.writing=!0,state.sync=!0,writev?stream._writev(chunk,state.onwrite):stream._write(chunk,encoding,state.onwrite),state.sync=!1}function onwriteError(stream,state,sync,er,cb){sync?process.nextTick(function(){state.pendingcb--,cb(er)}):(state.pendingcb--,cb(er)),stream._writableState.errorEmitted=!0,stream.emit("error",er)}function onwriteStateUpdate(state){state.writing=!1,state.writecb=null,state.length-=state.writelen,state.writelen=0}function onwrite(stream,er){var state=stream._writableState,sync=state.sync,cb=state.writecb;if(onwriteStateUpdate(state),er)onwriteError(stream,state,sync,er,cb);else{var finished=needFinish(stream,state);finished||state.corked||state.bufferProcessing||!state.buffer.length||clearBuffer(stream,state),sync?process.nextTick(function(){afterWrite(stream,state,finished,cb)}):afterWrite(stream,state,finished,cb)}}function afterWrite(stream,state,finished,cb){finished||onwriteDrain(stream,state),state.pendingcb--,cb(),finishMaybe(stream,state)}function onwriteDrain(stream,state){0===state.length&&state.needDrain&&(state.needDrain=!1,stream.emit("drain"))}function clearBuffer(stream,state){if(state.bufferProcessing=!0,stream._writev&&state.buffer.length>1){for(var cbs=[],c=0;c<state.buffer.length;c++)cbs.push(state.buffer[c].callback);state.pendingcb++,doWrite(stream,state,!0,state.length,state.buffer,"",function(err){for(var i=0;i<cbs.length;i++)state.pendingcb--,cbs[i](err)}),state.buffer=[]}else{for(var c=0;c<state.buffer.length;c++){var entry=state.buffer[c],chunk=entry.chunk,encoding=entry.encoding,cb=entry.callback,len=state.objectMode?1:chunk.length;if(doWrite(stream,state,!1,len,chunk,encoding,cb),state.writing){c++;break}}c<state.buffer.length?state.buffer=state.buffer.slice(c):state.buffer.length=0}state.bufferProcessing=!1}function needFinish(stream,state){return state.ending&&0===state.length&&!state.finished&&!state.writing}function prefinish(stream,state){state.prefinished||(state.prefinished=!0,stream.emit("prefinish"))}function finishMaybe(stream,state){var need=needFinish(stream,state);return need&&(0===state.pendingcb?(prefinish(stream,state),state.finished=!0,stream.emit("finish")):prefinish(stream,state)),need}function endWritable(stream,state,cb){state.ending=!0,finishMaybe(stream,state),cb&&(state.finished?process.nextTick(cb):stream.once("finish",cb)),state.ended=!0}module.exports=Writable;var Buffer=require("buffer").Buffer;Writable.WritableState=WritableState;var util=require("core-util-is");util.inherits=require("inherits");var Stream=require("stream");util.inherits(Writable,Stream),Writable.prototype.pipe=function(){this.emit("error",new Error("Cannot pipe. Not readable."))},Writable.prototype.write=function(chunk,encoding,cb){var state=this._writableState,ret=!1;return util.isFunction(encoding)&&(cb=encoding,encoding=null),util.isBuffer(chunk)?encoding="buffer":encoding||(encoding=state.defaultEncoding),util.isFunction(cb)||(cb=function(){}),state.ended?writeAfterEnd(this,state,cb):validChunk(this,state,chunk,cb)&&(state.pendingcb++,ret=writeOrBuffer(this,state,chunk,encoding,cb)),ret},Writable.prototype.cork=function(){var state=this._writableState;state.corked++},Writable.prototype.uncork=function(){var state=this._writableState;state.corked&&(state.corked--,state.writing||state.corked||state.finished||state.bufferProcessing||!state.buffer.length||clearBuffer(this,state))},Writable.prototype._write=function(chunk,encoding,cb){cb(new Error("not implemented"))},Writable.prototype._writev=null,Writable.prototype.end=function(chunk,encoding,cb){var state=this._writableState;util.isFunction(chunk)?(cb=chunk,chunk=null,encoding=null):util.isFunction(encoding)&&(cb=encoding,encoding=null),util.isNullOrUndefined(chunk)||this.write(chunk,encoding),state.corked&&(state.corked=1,this.uncork()),state.ending||state.finished||endWritable(this,state,cb)}}).call(this,require("_process"))},{"./_stream_duplex":11,_process:9,buffer:2,"core-util-is":16,inherits:7,stream:21}],16:[function(require,module,exports){(function(Buffer){function isArray(ar){return Array.isArray(ar)}function isBoolean(arg){return"boolean"==typeof arg}function isNull(arg){return null===arg}function isNullOrUndefined(arg){return null==arg}function isNumber(arg){return"number"==typeof arg}function isString(arg){return"string"==typeof arg}function isSymbol(arg){return"symbol"==typeof arg}function isUndefined(arg){return void 0===arg}function isRegExp(re){return isObject(re)&&"[object RegExp]"===objectToString(re)}function isObject(arg){return"object"==typeof arg&&null!==arg}function isDate(d){return isObject(d)&&"[object Date]"===objectToString(d)}function isError(e){return isObject(e)&&("[object Error]"===objectToString(e)||e instanceof Error)}function isFunction(arg){return"function"==typeof arg}function isPrimitive(arg){return null===arg||"boolean"==typeof arg||"number"==typeof arg||"string"==typeof arg||"symbol"==typeof arg||"undefined"==typeof arg}function isBuffer(arg){return Buffer.isBuffer(arg)}function objectToString(o){return Object.prototype.toString.call(o)}exports.isArray=isArray,exports.isBoolean=isBoolean,exports.isNull=isNull,exports.isNullOrUndefined=isNullOrUndefined,exports.isNumber=isNumber,exports.isString=isString,exports.isSymbol=isSymbol,exports.isUndefined=isUndefined,exports.isRegExp=isRegExp,exports.isObject=isObject,exports.isDate=isDate,exports.isError=isError,exports.isFunction=isFunction,exports.isPrimitive=isPrimitive,exports.isBuffer=isBuffer}).call(this,require("buffer").Buffer)},{buffer:2}],17:[function(require,module){module.exports=require("./lib/_stream_passthrough.js")},{"./lib/_stream_passthrough.js":12}],18:[function(require,module,exports){exports=module.exports=require("./lib/_stream_readable.js"),exports.Stream=require("stream"),exports.Readable=exports,exports.Writable=require("./lib/_stream_writable.js"),exports.Duplex=require("./lib/_stream_duplex.js"),exports.Transform=require("./lib/_stream_transform.js"),exports.PassThrough=require("./lib/_stream_passthrough.js")},{"./lib/_stream_duplex.js":11,"./lib/_stream_passthrough.js":12,"./lib/_stream_readable.js":13,"./lib/_stream_transform.js":14,"./lib/_stream_writable.js":15,stream:21}],19:[function(require,module){module.exports=require("./lib/_stream_transform.js")},{"./lib/_stream_transform.js":14}],20:[function(require,module){module.exports=require("./lib/_stream_writable.js")},{"./lib/_stream_writable.js":15}],21:[function(require,module){function Stream(){EE.call(this)}module.exports=Stream;var EE=require("events").EventEmitter,inherits=require("inherits");inherits(Stream,EE),Stream.Readable=require("readable-stream/readable.js"),Stream.Writable=require("readable-stream/writable.js"),Stream.Duplex=require("readable-stream/duplex.js"),Stream.Transform=require("readable-stream/transform.js"),Stream.PassThrough=require("readable-stream/passthrough.js"),Stream.Stream=Stream,Stream.prototype.pipe=function(dest,options){function ondata(chunk){dest.writable&&!1===dest.write(chunk)&&source.pause&&source.pause()}function ondrain(){source.readable&&source.resume&&source.resume()}function onend(){didOnEnd||(didOnEnd=!0,dest.end())}function onclose(){didOnEnd||(didOnEnd=!0,"function"==typeof dest.destroy&&dest.destroy())}function onerror(er){if(cleanup(),0===EE.listenerCount(this,"error"))throw er}function cleanup(){source.removeListener("data",ondata),dest.removeListener("drain",ondrain),source.removeListener("end",onend),source.removeListener("close",onclose),source.removeListener("error",onerror),dest.removeListener("error",onerror),source.removeListener("end",cleanup),source.removeListener("close",cleanup),dest.removeListener("close",cleanup)}var source=this;source.on("data",ondata),dest.on("drain",ondrain),dest._isStdio||options&&options.end===!1||(source.on("end",onend),source.on("close",onclose));var didOnEnd=!1;return source.on("error",onerror),dest.on("error",onerror),source.on("end",cleanup),source.on("close",cleanup),dest.on("close",cleanup),dest.emit("pipe",source),dest}},{events:6,inherits:7,"readable-stream/duplex.js":10,"readable-stream/passthrough.js":17,"readable-stream/readable.js":18,"readable-stream/transform.js":19,"readable-stream/writable.js":20}],22:[function(require,module,exports){function assertEncoding(encoding){if(encoding&&!isBufferEncoding(encoding))throw new Error("Unknown encoding: "+encoding)}function passThroughWrite(buffer){return buffer.toString(this.encoding)}function utf16DetectIncompleteChar(buffer){this.charReceived=buffer.length%2,this.charLength=this.charReceived?2:0}function base64DetectIncompleteChar(buffer){this.charReceived=buffer.length%3,this.charLength=this.charReceived?3:0}var Buffer=require("buffer").Buffer,isBufferEncoding=Buffer.isEncoding||function(encoding){switch(encoding&&encoding.toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":case"raw":return!0;default:return!1}},StringDecoder=exports.StringDecoder=function(encoding){switch(this.encoding=(encoding||"utf8").toLowerCase().replace(/[-_]/,""),assertEncoding(encoding),this.encoding){case"utf8":this.surrogateSize=3;break;case"ucs2":case"utf16le":this.surrogateSize=2,this.detectIncompleteChar=utf16DetectIncompleteChar;break;case"base64":this.surrogateSize=3,this.detectIncompleteChar=base64DetectIncompleteChar;break;default:return void(this.write=passThroughWrite)}this.charBuffer=new Buffer(6),this.charReceived=0,this.charLength=0};StringDecoder.prototype.write=function(buffer){for(var charStr="";this.charLength;){var available=buffer.length>=this.charLength-this.charReceived?this.charLength-this.charReceived:buffer.length;if(buffer.copy(this.charBuffer,this.charReceived,0,available),this.charReceived+=available,this.charReceived<this.charLength)return"";buffer=buffer.slice(available,buffer.length),charStr=this.charBuffer.slice(0,this.charLength).toString(this.encoding);var charCode=charStr.charCodeAt(charStr.length-1);if(!(charCode>=55296&&56319>=charCode)){if(this.charReceived=this.charLength=0,0===buffer.length)return charStr;break}this.charLength+=this.surrogateSize,charStr=""}this.detectIncompleteChar(buffer);var end=buffer.length;this.charLength&&(buffer.copy(this.charBuffer,0,buffer.length-this.charReceived,end),end-=this.charReceived),charStr+=buffer.toString(this.encoding,0,end);var end=charStr.length-1,charCode=charStr.charCodeAt(end);if(charCode>=55296&&56319>=charCode){var size=this.surrogateSize;return this.charLength+=size,this.charReceived+=size,this.charBuffer.copy(this.charBuffer,size,0,size),buffer.copy(this.charBuffer,0,0,size),charStr.substring(0,end)}return charStr},StringDecoder.prototype.detectIncompleteChar=function(buffer){for(var i=buffer.length>=3?3:buffer.length;i>0;i--){var c=buffer[buffer.length-i];if(1==i&&c>>5==6){this.charLength=2;break}if(2>=i&&c>>4==14){this.charLength=3;break}if(3>=i&&c>>3==30){this.charLength=4;break}}this.charReceived=i},StringDecoder.prototype.end=function(buffer){var res="";if(buffer&&buffer.length&&(res=this.write(buffer)),this.charReceived){var cr=this.charReceived,buf=this.charBuffer,enc=this.encoding;res+=buf.slice(0,cr).toString(enc)}return res}},{buffer:2}],23:[function(require,module){module.exports=function(arg){return arg&&"object"==typeof arg&&"function"==typeof arg.copy&&"function"==typeof arg.fill&&"function"==typeof arg.readUInt8}},{}],24:[function(require,module,exports){(function(process,global){function inspect(obj,opts){var ctx={seen:[],stylize:stylizeNoColor};return arguments.length>=3&&(ctx.depth=arguments[2]),arguments.length>=4&&(ctx.colors=arguments[3]),isBoolean(opts)?ctx.showHidden=opts:opts&&exports._extend(ctx,opts),isUndefined(ctx.showHidden)&&(ctx.showHidden=!1),isUndefined(ctx.depth)&&(ctx.depth=2),isUndefined(ctx.colors)&&(ctx.colors=!1),isUndefined(ctx.customInspect)&&(ctx.customInspect=!0),ctx.colors&&(ctx.stylize=stylizeWithColor),formatValue(ctx,obj,ctx.depth)}function stylizeWithColor(str,styleType){var style=inspect.styles[styleType];return style?"["+inspect.colors[style][0]+"m"+str+"["+inspect.colors[style][1]+"m":str}function stylizeNoColor(str){return str}function arrayToHash(array){var hash={};return array.forEach(function(val){hash[val]=!0}),hash}function formatValue(ctx,value,recurseTimes){if(ctx.customInspect&&value&&isFunction(value.inspect)&&value.inspect!==exports.inspect&&(!value.constructor||value.constructor.prototype!==value)){var ret=value.inspect(recurseTimes,ctx);return isString(ret)||(ret=formatValue(ctx,ret,recurseTimes)),ret}var primitive=formatPrimitive(ctx,value);if(primitive)return primitive;var keys=Object.keys(value),visibleKeys=arrayToHash(keys);if(ctx.showHidden&&(keys=Object.getOwnPropertyNames(value)),isError(value)&&(keys.indexOf("message")>=0||keys.indexOf("description")>=0))return formatError(value);if(0===keys.length){if(isFunction(value)){var name=value.name?": "+value.name:"";return ctx.stylize("[Function"+name+"]","special")}if(isRegExp(value))return ctx.stylize(RegExp.prototype.toString.call(value),"regexp");if(isDate(value))return ctx.stylize(Date.prototype.toString.call(value),"date");if(isError(value))return formatError(value)}var base="",array=!1,braces=["{","}"];if(isArray(value)&&(array=!0,braces=["[","]"]),isFunction(value)){var n=value.name?": "+value.name:"";base=" [Function"+n+"]"}if(isRegExp(value)&&(base=" "+RegExp.prototype.toString.call(value)),isDate(value)&&(base=" "+Date.prototype.toUTCString.call(value)),isError(value)&&(base=" "+formatError(value)),0===keys.length&&(!array||0==value.length))return braces[0]+base+braces[1];if(0>recurseTimes)return isRegExp(value)?ctx.stylize(RegExp.prototype.toString.call(value),"regexp"):ctx.stylize("[Object]","special");ctx.seen.push(value);var output;return output=array?formatArray(ctx,value,recurseTimes,visibleKeys,keys):keys.map(function(key){return formatProperty(ctx,value,recurseTimes,visibleKeys,key,array)}),ctx.seen.pop(),reduceToSingleString(output,base,braces)}function formatPrimitive(ctx,value){if(isUndefined(value))return ctx.stylize("undefined","undefined");if(isString(value)){var simple="'"+JSON.stringify(value).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return ctx.stylize(simple,"string")}return isNumber(value)?ctx.stylize(""+value,"number"):isBoolean(value)?ctx.stylize(""+value,"boolean"):isNull(value)?ctx.stylize("null","null"):void 0}function formatError(value){return"["+Error.prototype.toString.call(value)+"]"}function formatArray(ctx,value,recurseTimes,visibleKeys,keys){for(var output=[],i=0,l=value.length;l>i;++i)output.push(hasOwnProperty(value,String(i))?formatProperty(ctx,value,recurseTimes,visibleKeys,String(i),!0):"");return keys.forEach(function(key){key.match(/^\d+$/)||output.push(formatProperty(ctx,value,recurseTimes,visibleKeys,key,!0))}),output}function formatProperty(ctx,value,recurseTimes,visibleKeys,key,array){var name,str,desc;if(desc=Object.getOwnPropertyDescriptor(value,key)||{value:value[key]},desc.get?str=desc.set?ctx.stylize("[Getter/Setter]","special"):ctx.stylize("[Getter]","special"):desc.set&&(str=ctx.stylize("[Setter]","special")),hasOwnProperty(visibleKeys,key)||(name="["+key+"]"),str||(ctx.seen.indexOf(desc.value)<0?(str=isNull(recurseTimes)?formatValue(ctx,desc.value,null):formatValue(ctx,desc.value,recurseTimes-1),str.indexOf("\n")>-1&&(str=array?str.split("\n").map(function(line){return" "+line}).join("\n").substr(2):"\n"+str.split("\n").map(function(line){return" "+line}).join("\n"))):str=ctx.stylize("[Circular]","special")),isUndefined(name)){if(array&&key.match(/^\d+$/))return str;name=JSON.stringify(""+key),name.match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(name=name.substr(1,name.length-2),name=ctx.stylize(name,"name")):(name=name.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),name=ctx.stylize(name,"string"))}return name+": "+str}function reduceToSingleString(output,base,braces){var numLinesEst=0,length=output.reduce(function(prev,cur){return numLinesEst++,cur.indexOf("\n")>=0&&numLinesEst++,prev+cur.replace(/\u001b\[\d\d?m/g,"").length+1},0);return length>60?braces[0]+(""===base?"":base+"\n ")+" "+output.join(",\n ")+" "+braces[1]:braces[0]+base+" "+output.join(", ")+" "+braces[1]}function isArray(ar){return Array.isArray(ar)}function isBoolean(arg){return"boolean"==typeof arg}function isNull(arg){return null===arg}function isNullOrUndefined(arg){return null==arg}function isNumber(arg){return"number"==typeof arg}function isString(arg){return"string"==typeof arg}function isSymbol(arg){return"symbol"==typeof arg}function isUndefined(arg){return void 0===arg}function isRegExp(re){return isObject(re)&&"[object RegExp]"===objectToString(re)}function isObject(arg){return"object"==typeof arg&&null!==arg}function isDate(d){return isObject(d)&&"[object Date]"===objectToString(d)}function isError(e){return isObject(e)&&("[object Error]"===objectToString(e)||e instanceof Error)}function isFunction(arg){return"function"==typeof arg}function isPrimitive(arg){return null===arg||"boolean"==typeof arg||"number"==typeof arg||"string"==typeof arg||"symbol"==typeof arg||"undefined"==typeof arg}function objectToString(o){return Object.prototype.toString.call(o)}function pad(n){return 10>n?"0"+n.toString(10):n.toString(10)}function timestamp(){var d=new Date,time=[pad(d.getHours()),pad(d.getMinutes()),pad(d.getSeconds())].join(":");return[d.getDate(),months[d.getMonth()],time].join(" ")}function hasOwnProperty(obj,prop){return Object.prototype.hasOwnProperty.call(obj,prop)}var formatRegExp=/%[sdj%]/g;exports.format=function(f){if(!isString(f)){for(var objects=[],i=0;i<arguments.length;i++)objects.push(inspect(arguments[i]));return objects.join(" ")}for(var i=1,args=arguments,len=args.length,str=String(f).replace(formatRegExp,function(x){if("%%"===x)return"%";if(i>=len)return x;switch(x){case"%s":return String(args[i++]);
+case"%d":return Number(args[i++]);case"%j":try{return JSON.stringify(args[i++])}catch(_){return"[Circular]"}default:return x}}),x=args[i];len>i;x=args[++i])str+=isNull(x)||!isObject(x)?" "+x:" "+inspect(x);return str},exports.deprecate=function(fn,msg){function deprecated(){if(!warned){if(process.throwDeprecation)throw new Error(msg);process.traceDeprecation?console.trace(msg):console.error(msg),warned=!0}return fn.apply(this,arguments)}if(isUndefined(global.process))return function(){return exports.deprecate(fn,msg).apply(this,arguments)};if(process.noDeprecation===!0)return fn;var warned=!1;return deprecated};var debugEnviron,debugs={};exports.debuglog=function(set){if(isUndefined(debugEnviron)&&(debugEnviron=process.env.NODE_DEBUG||""),set=set.toUpperCase(),!debugs[set])if(new RegExp("\\b"+set+"\\b","i").test(debugEnviron)){var pid=process.pid;debugs[set]=function(){var msg=exports.format.apply(exports,arguments);console.error("%s %d: %s",set,pid,msg)}}else debugs[set]=function(){};return debugs[set]},exports.inspect=inspect,inspect.colors={bold:[1,22],italic:[3,23],underline:[4,24],inverse:[7,27],white:[37,39],grey:[90,39],black:[30,39],blue:[34,39],cyan:[36,39],green:[32,39],magenta:[35,39],red:[31,39],yellow:[33,39]},inspect.styles={special:"cyan",number:"yellow","boolean":"yellow",undefined:"grey","null":"bold",string:"green",date:"magenta",regexp:"red"},exports.isArray=isArray,exports.isBoolean=isBoolean,exports.isNull=isNull,exports.isNullOrUndefined=isNullOrUndefined,exports.isNumber=isNumber,exports.isString=isString,exports.isSymbol=isSymbol,exports.isUndefined=isUndefined,exports.isRegExp=isRegExp,exports.isObject=isObject,exports.isDate=isDate,exports.isError=isError,exports.isFunction=isFunction,exports.isPrimitive=isPrimitive,exports.isBuffer=require("./support/isBuffer");var months=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];exports.log=function(){console.log("%s - %s",timestamp(),exports.format.apply(exports,arguments))},exports.inherits=require("inherits"),exports._extend=function(origin,add){if(!add||!isObject(add))return origin;for(var keys=Object.keys(add),i=keys.length;i--;)origin[keys[i]]=add[keys[i]];return origin}}).call(this,require("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"./support/isBuffer":23,_process:9,inherits:7}],25:[function(require,module){function SessionManager(conf){WildEmitter.call(this),conf=conf||{},this.jid=conf.jid,this.selfID=conf.selfID||this.jid&&this.jid.full||this.jid||"",this.sessions={},this.peers={},this.prepareSession=conf.prepareSession||function(opts){return opts.descriptionTypes.indexOf("rtp")>=0?new MediaSession(opts):opts.descriptionTypes.indexOf("filetransfer")>=0?new FileSession(opts):void 0},this.performTieBreak=conf.performTieBreak||function(sess,req){var descriptionTypes=req.jingle.contents.map(function(content){return content.description?content.description.descType:void 0}),matching=intersect(sess.pendingDescriptionTypes,descriptionTypes);return matching.length>0},this.screenSharingSupport=webrtc.screenSharing,this.capabilities=["urn:xmpp:jingle:1"],webrtc.support&&(this.capabilities=["urn:xmpp:jingle:1","urn:xmpp:jingle:apps:rtp:1","urn:xmpp:jingle:apps:rtp:audio","urn:xmpp:jingle:apps:rtp:video","urn:xmpp:jingle:apps:rtp:rtcb-fb:0","urn:xmpp:jingle:apps:rtp:rtp-hdrext:0","urn:xmpp:jingle:apps:rtp:ssma:0","urn:xmpp:jingle:apps:dtls:0","urn:xmpp:jingle:apps:grouping:0","urn:xmpp:jingle:apps:file-transfer:3","urn:xmpp:jingle:transports:ice-udp:1","urn:xmpp:jingle:transports.dtls-sctp:1","urn:ietf:rfc:3264","urn:ietf:rfc:5576","urn:ietf:rfc:5888"]),this.config={debug:!1,peerConnectionConfig:{iceServers:conf.iceServers||[{url:"stun:stun.l.google.com:19302"}]},peerConnectionConstraints:{optional:[{DtlsSrtpKeyAgreement:!0},{RtpDataChannels:!1}]},media:{audio:!0,video:!0}};for(var item in conf)this.config[item]=conf[item];this.iceServers=this.config.peerConnectionConfig.iceServers}var util=require("util"),intersect=require("intersect"),WildEmitter=require("wildemitter"),webrtc=require("webrtcsupport"),BaseSession=require("jingle-session"),MediaSession=require("jingle-media-session"),FileSession=require("jingle-filetransfer-session");util.inherits(SessionManager,WildEmitter),SessionManager.prototype.addICEServer=function(server){"string"==typeof server&&(server={url:server}),this.iceServers.push(server)},SessionManager.prototype.addSession=function(session){var self=this,sid=session.sid,peer=session.peerID;return this.sessions[sid]=session,this.peers[peer]||(this.peers[peer]=[]),this.peers[peer].push(session),session.on("terminated",function(){var peers=self.peers[peer]||[];peers.length&&peers.splice(peers.indexOf(session),1),delete self.sessions[sid]}),session.on("*",function(name,data,extraData,extraData2){if("send"===name){var action=data.jingle&&data.jingle.action;session.isInitiator&&"session-initiate"===action&&self.emit("outgoing",session)}!self.config.debug||"log:debug"!==name&&"log:error"!==name||console.log("Jingle:",data,extraData,extraData2),0!==name.indexOf("change")&&self.emit(name,data,extraData,extraData2)}),this.emit("createdSession",session),session},SessionManager.prototype.createMediaSession=function(peer,sid,stream){var session=new MediaSession({sid:sid,peer:peer,initiator:!0,stream:stream,parent:this,iceServers:this.iceServers,constraints:this.config.peerConnectionConstraints});return this.addSession(session),session},SessionManager.prototype.createFileTransferSession=function(peer,sid){var session=new FileSession({sid:sid,peer:peer,initiator:!0,parent:this});return this.addSession(session),session},SessionManager.prototype.endPeerSessions=function(peer,reason,silent){peer=peer.full||peer;var sessions=this.peers[peer]||[];delete this.peers[peer],sessions.forEach(function(session){session.end(reason||"gone",silent)})},SessionManager.prototype.endAllSessions=function(reason,silent){var self=this;Object.keys(this.peers).forEach(function(peer){self.endPeerSessions(peer,reason,silent)})},SessionManager.prototype._createIncomingSession=function(meta,req){var session;return this.prepareSession&&(session=this.prepareSession(meta,req)),session||(session=new BaseSession(meta)),this.addSession(session),session},SessionManager.prototype._sendError=function(to,id,data){data.type||(data.type="cancel"),this.emit("send",{to:to,id:id,type:"error",error:data})},SessionManager.prototype._log=function(level,message){this.emit("log:"+level,message)},SessionManager.prototype.process=function(req){var self=this,sid=req.jingle?req.jingle.sid:null,session=this.sessions[sid]||null,rid=req.id,sender=req.from.full||req.from;if("error"===req.type){var isTieBreak=req.error&&"tie-break"===req.error.jingleCondition;return session&&session.pending&&isTieBreak?session.end("alternative-session",!0):(session&&(session.pendingAction=!1),this.emit("error",req))}if("result"===req.type)return void(session&&(session.pendingAction=!1));var action=req.jingle.action,contents=req.jingle.contents||[],descriptionTypes=contents.map(function(content){return content.description?content.description.descType:void 0}),transportTypes=contents.map(function(content){return content.transport?content.transport.transType:void 0});if("session-initiate"!==action){if(!session)return this._log("error","Unknown session",sid),this._sendError(sender,rid,{condition:"item-not-found",jingleCondition:"unknown-session"});if(session.peerID!==sender||session.ended)return this._log("error","Session has ended, or action has wrong sender"),this._sendError(sender,rid,{condition:"item-not-found",jingleCondition:"unknown-session"});if("session-accept"===action&&!session.pending)return this._log("error","Tried to accept session twice",sid),this._sendError(sender,rid,{condition:"unexpected-request",jingleCondition:"out-of-order"});if("session-terminate"!==action&&action===session.pendingAction&&(this._log("error","Tie break during pending request"),session.isInitiator))return this._sendError(sender,rid,{condition:"conflict",jingleCondition:"tie-break"})}else if(session){if(session.peerID!==sender)return this._log("error","Duplicate sid from new sender"),this._sendError(sender,rid,{condition:"service-unavailable"});if(!session.pending)return this._log("error","Someone is doing this wrong"),this._sendError(sender,rid,{condition:"unexpected-request",jingleCondition:"out-of-order"});if(this.selfID>session.peerID&&this.performTieBreak(session,req))return this._log("error","Tie break new session because of duplicate sids"),this._sendError(sender,rid,{condition:"conflict",jingleCondition:"tie-break"})}else if(this.peers[sender]&&this.peers[sender].length)for(var i=0,len=this.peers[sender].length;len>i;i++){var sess=this.peers[sender][i];if(sess&&sess.pending&&sess.sid>sid&&this.performTieBreak(sess,req))return this._log("info","Tie break session-initiate"),this._sendError(sender,rid,{condition:"conflict",jingleCondition:"tie-break"})}if("session-initiate"===action){if(!contents.length)return self._sendError(sender,rid,{condition:"bad-request"});session=this._createIncomingSession({sid:sid,peer:req.from,peerID:sender,initiator:!1,parent:this,descriptionTypes:descriptionTypes,transportTypes:transportTypes,iceServers:this.iceServers,constraints:this.config.peerConnectionConstraints},req)}session.process(action,req.jingle,function(err){err?(self._log("error","Could not process request",req,err),self._sendError(sender,rid,err)):(self.emit("send",{to:sender,id:rid,type:"result"}),"session-initiate"===action&&self.emit("incoming",session))})},module.exports=SessionManager},{intersect:28,"jingle-filetransfer-session":29,"jingle-media-session":78,"jingle-session":109,util:24,webrtcsupport:112,wildemitter:113}],26:[function(require,module){(function(process){/*!
+ * async
+ * https://github.com/caolan/async
+ *
+ * Copyright 2010-2014 Caolan McMahon
+ * Released under the MIT license
+ */
+!function(){function only_once(fn){var called=!1;return function(){if(called)throw new Error("Callback was already called.");called=!0,fn.apply(root,arguments)}}var root,previous_async,async={};root=this,null!=root&&(previous_async=root.async),async.noConflict=function(){return root.async=previous_async,async};var _toString=Object.prototype.toString,_isArray=Array.isArray||function(obj){return"[object Array]"===_toString.call(obj)},_each=function(arr,iterator){for(var i=0;i<arr.length;i+=1)iterator(arr[i],i,arr)},_map=function(arr,iterator){if(arr.map)return arr.map(iterator);var results=[];return _each(arr,function(x,i,a){results.push(iterator(x,i,a))}),results},_reduce=function(arr,iterator,memo){return arr.reduce?arr.reduce(iterator,memo):(_each(arr,function(x,i,a){memo=iterator(memo,x,i,a)}),memo)},_keys=function(obj){if(Object.keys)return Object.keys(obj);var keys=[];for(var k in obj)obj.hasOwnProperty(k)&&keys.push(k);return keys};"undefined"!=typeof process&&process.nextTick?(async.nextTick=process.nextTick,async.setImmediate="undefined"!=typeof setImmediate?function(fn){setImmediate(fn)}:async.nextTick):"function"==typeof setImmediate?(async.nextTick=function(fn){setImmediate(fn)},async.setImmediate=async.nextTick):(async.nextTick=function(fn){setTimeout(fn,0)},async.setImmediate=async.nextTick),async.each=function(arr,iterator,callback){function done(err){err?(callback(err),callback=function(){}):(completed+=1,completed>=arr.length&&callback())}if(callback=callback||function(){},!arr.length)return callback();var completed=0;_each(arr,function(x){iterator(x,only_once(done))})},async.forEach=async.each,async.eachSeries=function(arr,iterator,callback){if(callback=callback||function(){},!arr.length)return callback();var completed=0,iterate=function(){iterator(arr[completed],function(err){err?(callback(err),callback=function(){}):(completed+=1,completed>=arr.length?callback():iterate())})};iterate()},async.forEachSeries=async.eachSeries,async.eachLimit=function(arr,limit,iterator,callback){var fn=_eachLimit(limit);fn.apply(null,[arr,iterator,callback])},async.forEachLimit=async.eachLimit;var _eachLimit=function(limit){return function(arr,iterator,callback){if(callback=callback||function(){},!arr.length||0>=limit)return callback();var completed=0,started=0,running=0;!function replenish(){if(completed>=arr.length)return callback();for(;limit>running&&started<arr.length;)started+=1,running+=1,iterator(arr[started-1],function(err){err?(callback(err),callback=function(){}):(completed+=1,running-=1,completed>=arr.length?callback():replenish())})}()}},doParallel=function(fn){return function(){var args=Array.prototype.slice.call(arguments);return fn.apply(null,[async.each].concat(args))}},doParallelLimit=function(limit,fn){return function(){var args=Array.prototype.slice.call(arguments);return fn.apply(null,[_eachLimit(limit)].concat(args))}},doSeries=function(fn){return function(){var args=Array.prototype.slice.call(arguments);return fn.apply(null,[async.eachSeries].concat(args))}},_asyncMap=function(eachfn,arr,iterator,callback){if(arr=_map(arr,function(x,i){return{index:i,value:x}}),callback){var results=[];eachfn(arr,function(x,callback){iterator(x.value,function(err,v){results[x.index]=v,callback(err)})},function(err){callback(err,results)})}else eachfn(arr,function(x,callback){iterator(x.value,function(err){callback(err)})})};async.map=doParallel(_asyncMap),async.mapSeries=doSeries(_asyncMap),async.mapLimit=function(arr,limit,iterator,callback){return _mapLimit(limit)(arr,iterator,callback)};var _mapLimit=function(limit){return doParallelLimit(limit,_asyncMap)};async.reduce=function(arr,memo,iterator,callback){async.eachSeries(arr,function(x,callback){iterator(memo,x,function(err,v){memo=v,callback(err)})},function(err){callback(err,memo)})},async.inject=async.reduce,async.foldl=async.reduce,async.reduceRight=function(arr,memo,iterator,callback){var reversed=_map(arr,function(x){return x}).reverse();async.reduce(reversed,memo,iterator,callback)},async.foldr=async.reduceRight;var _filter=function(eachfn,arr,iterator,callback){var results=[];arr=_map(arr,function(x,i){return{index:i,value:x}}),eachfn(arr,function(x,callback){iterator(x.value,function(v){v&&results.push(x),callback()})},function(){callback(_map(results.sort(function(a,b){return a.index-b.index}),function(x){return x.value}))})};async.filter=doParallel(_filter),async.filterSeries=doSeries(_filter),async.select=async.filter,async.selectSeries=async.filterSeries;var _reject=function(eachfn,arr,iterator,callback){var results=[];arr=_map(arr,function(x,i){return{index:i,value:x}}),eachfn(arr,function(x,callback){iterator(x.value,function(v){v||results.push(x),callback()})},function(){callback(_map(results.sort(function(a,b){return a.index-b.index}),function(x){return x.value}))})};async.reject=doParallel(_reject),async.rejectSeries=doSeries(_reject);var _detect=function(eachfn,arr,iterator,main_callback){eachfn(arr,function(x,callback){iterator(x,function(result){result?(main_callback(x),main_callback=function(){}):callback()})},function(){main_callback()})};async.detect=doParallel(_detect),async.detectSeries=doSeries(_detect),async.some=function(arr,iterator,main_callback){async.each(arr,function(x,callback){iterator(x,function(v){v&&(main_callback(!0),main_callback=function(){}),callback()})},function(){main_callback(!1)})},async.any=async.some,async.every=function(arr,iterator,main_callback){async.each(arr,function(x,callback){iterator(x,function(v){v||(main_callback(!1),main_callback=function(){}),callback()})},function(){main_callback(!0)})},async.all=async.every,async.sortBy=function(arr,iterator,callback){async.map(arr,function(x,callback){iterator(x,function(err,criteria){err?callback(err):callback(null,{value:x,criteria:criteria})})},function(err,results){if(err)return callback(err);var fn=function(left,right){var a=left.criteria,b=right.criteria;return b>a?-1:a>b?1:0};callback(null,_map(results.sort(fn),function(x){return x.value}))})},async.auto=function(tasks,callback){callback=callback||function(){};var keys=_keys(tasks),remainingTasks=keys.length;if(!remainingTasks)return callback();var results={},listeners=[],addListener=function(fn){listeners.unshift(fn)},removeListener=function(fn){for(var i=0;i<listeners.length;i+=1)if(listeners[i]===fn)return void listeners.splice(i,1)},taskComplete=function(){remainingTasks--,_each(listeners.slice(0),function(fn){fn()})};addListener(function(){if(!remainingTasks){var theCallback=callback;callback=function(){},theCallback(null,results)}}),_each(keys,function(k){var task=_isArray(tasks[k])?tasks[k]:[tasks[k]],taskCallback=function(err){var args=Array.prototype.slice.call(arguments,1);if(args.length<=1&&(args=args[0]),err){var safeResults={};_each(_keys(results),function(rkey){safeResults[rkey]=results[rkey]}),safeResults[k]=args,callback(err,safeResults),callback=function(){}}else results[k]=args,async.setImmediate(taskComplete)},requires=task.slice(0,Math.abs(task.length-1))||[],ready=function(){return _reduce(requires,function(a,x){return a&&results.hasOwnProperty(x)},!0)&&!results.hasOwnProperty(k)};if(ready())task[task.length-1](taskCallback,results);else{var listener=function(){ready()&&(removeListener(listener),task[task.length-1](taskCallback,results))};addListener(listener)}})},async.retry=function(times,task,callback){var DEFAULT_TIMES=5,attempts=[];"function"==typeof times&&(callback=task,task=times,times=DEFAULT_TIMES),times=parseInt(times,10)||DEFAULT_TIMES;var wrappedTask=function(wrappedCallback,wrappedResults){for(var retryAttempt=function(task,finalAttempt){return function(seriesCallback){task(function(err,result){seriesCallback(!err||finalAttempt,{err:err,result:result})},wrappedResults)}};times;)attempts.push(retryAttempt(task,!(times-=1)));async.series(attempts,function(done,data){data=data[data.length-1],(wrappedCallback||callback)(data.err,data.result)})};return callback?wrappedTask():wrappedTask},async.waterfall=function(tasks,callback){if(callback=callback||function(){},!_isArray(tasks)){var err=new Error("First argument to waterfall must be an array of functions");return callback(err)}if(!tasks.length)return callback();var wrapIterator=function(iterator){return function(err){if(err)callback.apply(null,arguments),callback=function(){};else{var args=Array.prototype.slice.call(arguments,1),next=iterator.next();args.push(next?wrapIterator(next):callback),async.setImmediate(function(){iterator.apply(null,args)})}}};wrapIterator(async.iterator(tasks))()};var _parallel=function(eachfn,tasks,callback){if(callback=callback||function(){},_isArray(tasks))eachfn.map(tasks,function(fn,callback){fn&&fn(function(err){var args=Array.prototype.slice.call(arguments,1);args.length<=1&&(args=args[0]),callback.call(null,err,args)})},callback);else{var results={};eachfn.each(_keys(tasks),function(k,callback){tasks[k](function(err){var args=Array.prototype.slice.call(arguments,1);args.length<=1&&(args=args[0]),results[k]=args,callback(err)})},function(err){callback(err,results)})}};async.parallel=function(tasks,callback){_parallel({map:async.map,each:async.each},tasks,callback)},async.parallelLimit=function(tasks,limit,callback){_parallel({map:_mapLimit(limit),each:_eachLimit(limit)},tasks,callback)},async.series=function(tasks,callback){if(callback=callback||function(){},_isArray(tasks))async.mapSeries(tasks,function(fn,callback){fn&&fn(function(err){var args=Array.prototype.slice.call(arguments,1);args.length<=1&&(args=args[0]),callback.call(null,err,args)})},callback);else{var results={};async.eachSeries(_keys(tasks),function(k,callback){tasks[k](function(err){var args=Array.prototype.slice.call(arguments,1);args.length<=1&&(args=args[0]),results[k]=args,callback(err)})},function(err){callback(err,results)})}},async.iterator=function(tasks){var makeCallback=function(index){var fn=function(){return tasks.length&&tasks[index].apply(null,arguments),fn.next()};return fn.next=function(){return index<tasks.length-1?makeCallback(index+1):null},fn};return makeCallback(0)},async.apply=function(fn){var args=Array.prototype.slice.call(arguments,1);return function(){return fn.apply(null,args.concat(Array.prototype.slice.call(arguments)))}};var _concat=function(eachfn,arr,fn,callback){var r=[];eachfn(arr,function(x,cb){fn(x,function(err,y){r=r.concat(y||[]),cb(err)})},function(err){callback(err,r)})};async.concat=doParallel(_concat),async.concatSeries=doSeries(_concat),async.whilst=function(test,iterator,callback){test()?iterator(function(err){return err?callback(err):void async.whilst(test,iterator,callback)}):callback()},async.doWhilst=function(iterator,test,callback){iterator(function(err){if(err)return callback(err);var args=Array.prototype.slice.call(arguments,1);test.apply(null,args)?async.doWhilst(iterator,test,callback):callback()})},async.until=function(test,iterator,callback){test()?callback():iterator(function(err){return err?callback(err):void async.until(test,iterator,callback)})},async.doUntil=function(iterator,test,callback){iterator(function(err){if(err)return callback(err);var args=Array.prototype.slice.call(arguments,1);test.apply(null,args)?callback():async.doUntil(iterator,test,callback)})},async.queue=function(worker,concurrency){function _insert(q,data,pos,callback){return q.started||(q.started=!0),_isArray(data)||(data=[data]),0==data.length?async.setImmediate(function(){q.drain&&q.drain()}):void _each(data,function(task){var item={data:task,callback:"function"==typeof callback?callback:null};pos?q.tasks.unshift(item):q.tasks.push(item),q.saturated&&q.tasks.length===q.concurrency&&q.saturated(),async.setImmediate(q.process)})}void 0===concurrency&&(concurrency=1);var workers=0,q={tasks:[],concurrency:concurrency,saturated:null,empty:null,drain:null,started:!1,paused:!1,push:function(data,callback){_insert(q,data,!1,callback)},kill:function(){q.drain=null,q.tasks=[]},unshift:function(data,callback){_insert(q,data,!0,callback)},process:function(){if(!q.paused&&workers<q.concurrency&&q.tasks.length){var task=q.tasks.shift();q.empty&&0===q.tasks.length&&q.empty(),workers+=1;var next=function(){workers-=1,task.callback&&task.callback.apply(task,arguments),q.drain&&q.tasks.length+workers===0&&q.drain(),q.process()},cb=only_once(next);worker(task.data,cb)}},length:function(){return q.tasks.length},running:function(){return workers},idle:function(){return q.tasks.length+workers===0},pause:function(){q.paused!==!0&&(q.paused=!0)},resume:function(){if(q.paused!==!1){q.paused=!1;for(var w=1;w<=q.concurrency;w++)async.setImmediate(q.process)}}};return q},async.priorityQueue=function(worker,concurrency){function _compareTasks(a,b){return a.priority-b.priority}function _binarySearch(sequence,item,compare){for(var beg=-1,end=sequence.length-1;end>beg;){var mid=beg+(end-beg+1>>>1);compare(item,sequence[mid])>=0?beg=mid:end=mid-1}return beg}function _insert(q,data,priority,callback){return q.started||(q.started=!0),_isArray(data)||(data=[data]),0==data.length?async.setImmediate(function(){q.drain&&q.drain()}):void _each(data,function(task){var item={data:task,priority:priority,callback:"function"==typeof callback?callback:null};q.tasks.splice(_binarySearch(q.tasks,item,_compareTasks)+1,0,item),q.saturated&&q.tasks.length===q.concurrency&&q.saturated(),async.setImmediate(q.process)})}var q=async.queue(worker,concurrency);return q.push=function(data,priority,callback){_insert(q,data,priority,callback)},delete q.unshift,q},async.cargo=function(worker,payload){var working=!1,tasks=[],cargo={tasks:tasks,payload:payload,saturated:null,empty:null,drain:null,drained:!0,push:function(data,callback){_isArray(data)||(data=[data]),_each(data,function(task){tasks.push({data:task,callback:"function"==typeof callback?callback:null}),cargo.drained=!1,cargo.saturated&&tasks.length===payload&&cargo.saturated()}),async.setImmediate(cargo.process)},process:function process(){if(!working){if(0===tasks.length)return cargo.drain&&!cargo.drained&&cargo.drain(),void(cargo.drained=!0);var ts="number"==typeof payload?tasks.splice(0,payload):tasks.splice(0,tasks.length),ds=_map(ts,function(task){return task.data});cargo.empty&&cargo.empty(),working=!0,worker(ds,function(){working=!1;var args=arguments;_each(ts,function(data){data.callback&&data.callback.apply(null,args)}),process()})}},length:function(){return tasks.length},running:function(){return working}};return cargo};var _console_fn=function(name){return function(fn){var args=Array.prototype.slice.call(arguments,1);fn.apply(null,args.concat([function(err){var args=Array.prototype.slice.call(arguments,1);"undefined"!=typeof console&&(err?console.error&&console.error(err):console[name]&&_each(args,function(x){console[name](x)}))}]))}};async.log=_console_fn("log"),async.dir=_console_fn("dir"),async.memoize=function(fn,hasher){var memo={},queues={};hasher=hasher||function(x){return x};var memoized=function(){var args=Array.prototype.slice.call(arguments),callback=args.pop(),key=hasher.apply(null,args);key in memo?async.nextTick(function(){callback.apply(null,memo[key])}):key in queues?queues[key].push(callback):(queues[key]=[callback],fn.apply(null,args.concat([function(){memo[key]=arguments;var q=queues[key];delete queues[key];for(var i=0,l=q.length;l>i;i++)q[i].apply(null,arguments)}])))};return memoized.memo=memo,memoized.unmemoized=fn,memoized},async.unmemoize=function(fn){return function(){return(fn.unmemoized||fn).apply(null,arguments)}},async.times=function(count,iterator,callback){for(var counter=[],i=0;count>i;i++)counter.push(i);return async.map(counter,iterator,callback)},async.timesSeries=function(count,iterator,callback){for(var counter=[],i=0;count>i;i++)counter.push(i);return async.mapSeries(counter,iterator,callback)},async.seq=function(){var fns=arguments;return function(){var that=this,args=Array.prototype.slice.call(arguments),callback=args.pop();async.reduce(fns,args,function(newargs,fn,cb){fn.apply(that,newargs.concat([function(){var err=arguments[0],nextargs=Array.prototype.slice.call(arguments,1);cb(err,nextargs)}]))},function(err,results){callback.apply(that,[err].concat(results))})}},async.compose=function(){return async.seq.apply(null,Array.prototype.reverse.call(arguments))};var _applyEach=function(eachfn,fns){var go=function(){var that=this,args=Array.prototype.slice.call(arguments),callback=args.pop();return eachfn(fns,function(fn,cb){fn.apply(that,args.concat([cb]))},callback)};if(arguments.length>2){var args=Array.prototype.slice.call(arguments,2);return go.apply(this,args)}return go};async.applyEach=doParallel(_applyEach),async.applyEachSeries=doSeries(_applyEach),async.forever=function(fn,callback){function next(err){if(err){if(callback)return callback(err);throw err}fn(next)}next()},"undefined"!=typeof module&&module.exports?module.exports=async:"undefined"!=typeof define&&define.amd?define([],function(){return async}):root.async=async}()}).call(this,require("_process"))},{_process:9}],27:[function(require,module){var arr=[],each=arr.forEach,slice=arr.slice;module.exports=function(obj){return each.call(slice.call(arguments,1),function(source){if(source)for(var prop in source)obj[prop]=source[prop]}),obj}},{}],28:[function(require,module){function intersect(a,b){for(var res=[],i=0;i<a.length;i++)indexOf(b,a[i])>-1&&res.push(a[i]);return res}function indexOf(arr,el){for(var i=0;i<arr.length;i++)if(arr[i]===el)return i;return-1}module.exports=intersect,intersect.big=function(a,b){for(var ret=[],temp={},i=0;i<b.length;i++)temp[b[i]]=!0;for(var i=0;i<a.length;i++)temp[a[i]]&&ret.push(a[i]);return ret}},{}],29:[function(require,module){function FileTransferSession(opts){BaseSession.call(this,opts);var self=this;this.pc=new RTCPeerConnection({iceServers:opts.iceServers||[],useJingle:!0},opts.constraints||{}),this.pc.on("ice",this.onIceCandidate.bind(this)),this.pc.on("iceConnectionStateChange",this.onIceStateChange.bind(this)),this.pc.on("addChannel",this.onChannelAdded.bind(this)),this.sender=new FileTransfer.Sender,this.sender.on("progress",function(sent,size){self._log("info","Send progress "+sent+"/"+size)}),this.sender.on("sentFile",function(meta){self._log("info","Sent file",meta.name);var content=self.pc.localDescription.contents[0];delete content.transport,content.description={descType:"filetransfer",offer:{hash:{algo:meta.algo,value:meta.hash}}},self.send("description-info",{contents:[content]}),self.emit("sentFile",self,meta)}),this.receiver=new FileTransfer.Receiver,this.receiver.on("progress",function(received,size){self._log("info","Receive progress "+received+"/"+size)}),this.receiver.on("receivedFile",function(file){self.receivedFile=file,self.maybeReceivedFile()})}var util=require("util"),extend=require("extend-object"),BaseSession=require("jingle-session"),RTCPeerConnection=require("rtcpeerconnection"),FileTransfer=require("filetransfer");util.inherits(FileTransferSession,BaseSession),FileTransferSession.prototype=extend(FileTransferSession.prototype,{start:function(file){var self=this;this.state="pending",this.pc.isInitiator=!0;var sendChannel=this.pc.createDataChannel("filetransfer");sendChannel.onopen=function(){self.sender.send(file,sendChannel)};var constraints={mandatory:{OfferToReceiveAudio:!1,OfferToReceiveVideo:!1}};this.pc.offer(constraints,function(err,offer){return err?(self._log("error","Could not create WebRTC offer",err),self.end("failed-application",!0)):(offer.jingle.contents[0].description={descType:"filetransfer",offer:{date:file.lastModifiedDate,name:file.name,size:file.size,hash:{algo:"sha-1",value:""}}},void self.send("session-initiate",offer.jingle))})},accept:function(){var self=this;this._log("info","Accepted incoming session"),this.state="active",this.pc.answer(function(err,answer){return err?(self._log("error","Could not create WebRTC answer",err),self.end("failed-application")):(answer.jingle.contents[0].name="data",void self.send("session-accept",answer.jingle))})},end:function(reason,silent){this.pc.close(),BaseSession.prototype.end.call(this,reason,silent)},maybeReceivedFile:function(){this.receiver.metadata.hash.value&&(this.receiver.metadata.hash.value===this.receiver.metadata.actualhash?(this._log("info","File hash matches"),this.emit("receivedFile",this,this.receivedFile,this.receiver.metadata),this.end("success")):(this._log("error","File hash does not match"),this.end("media-error")))},onIceCandidate:function(candidate){this._log("info","Discovered new ICE candidate",candidate.jingle),candidate.jingle.contents[0].name="data",this.send("transport-info",candidate.jingle)},onIceStateChange:function(){switch(this.pc.iceConnectionState){case"checking":this.connectionState="connecting";break;case"completed":case"connected":this.connectionState="connected";break;case"disconnected":this.connectionState="stable"===this.pc.signalingState?"interrupted":"disconnected";break;case"failed":this.connectionState="failed",this.end("failed-transport");break;case"closed":this.connectionState="disconnected"}},onChannelAdded:function(channel){this.receiver.receive(null,channel)},onSessionInitiate:function(changes,cb){var self=this;this._log("info","Initiating incoming session"),this.state="pending",this.pc.isInitiator=!1;var desc=changes.contents[0].description;this.receiver.metadata=desc.offer.toJSON(),this.receiver.metadata.hash&&(this.receiver.config.hash=this.receiver.metadata.hash.algo),changes.contents[0].description={descType:"datachannel"},this.pc.handleOffer({type:"offer",jingle:changes},function(err){return err?(self._log("error","Could not create WebRTC answer"),cb({condition:"general-error"})):void cb()})},onSessionAccept:function(changes,cb){var self=this;this.state="active",changes.contents[0].description={descType:"datachannel"},this.pc.handleAnswer({type:"answer",jingle:changes},function(err){return err?(self._log("error","Could not process WebRTC answer"),cb({condition:"general-error"})):(self.emit("accepted",self),void cb())})},onSessionTerminate:function(changes,cb){this._log("info","Terminating session"),this.pc.close(),BaseSession.prototype.end.call(this,changes.reason,!0),cb()},onDescriptionInfo:function(info,cb){var hash=info.contents[0].description.offer.hash;this.receiver.metadata.hash=hash,this.receiver.metadata.actualhash&&this.maybeReceivedFile(),cb()},onTransportInfo:function(changes,cb){this.pc.processIce(changes,function(){cb()})}}),module.exports=FileTransferSession},{"extend-object":27,filetransfer:30,"jingle-session":109,rtcpeerconnection:77,util:24}],30:[function(require,module){function Sender(opts){WildEmitter.call(this);var self=this,options=opts||{};this.config={chunksize:16384,pacing:10,hash:"sha-1"};var item;for(item in options)this.config[item]=options[item];this.file=null,this.channel=null,this.hash=null,this.processingQueue=async.queue(function(task,next){if("chunk"==task.type){var reader=new window.FileReader;reader.onload=function(){return function(e){self.channel.send(e.target.result),self.hash&&self.hash.update(new Uint8Array(e.target.result)),self.emit("progress",task.start,task.file.size),window.setTimeout(next,self.config.pacing)}}(task.file);var slice=task.file.slice(task.start,task.start+task.size);reader.readAsArrayBuffer(slice)}else"complete"==task.type&&(self.emit("progress",self.file.size,self.file.size),self.emit("sentFile",self.hash?{hash:self.hash.digest("hex"),algo:self.config.hash}:null),next())})}function Receiver(opts){WildEmitter.call(this);var options=opts||{};this.config={hash:"sha-1"};var item;for(item in options)this.config[item]=options[item];this.receiveBuffer=[],this.received=0,this.metadata={},this.channel=null,this.hash=null}var async=require("async"),WildEmitter=require("wildemitter"),util=require("util"),hashes=require("iana-hashes");util.inherits(Sender,WildEmitter),Sender.prototype.send=function(file,channel){this.file=file,this.config.hash&&(this.hash=hashes.createHash(this.config.hash)),this.channel=channel;for(var start=0;start<this.file.size;start+=this.config.chunksize)this.processingQueue.push({type:"chunk",file:file,start:start,size:this.config.chunksize});this.processingQueue.push({type:"complete"})},util.inherits(Receiver,WildEmitter),Receiver.prototype.receive=function(metadata,channel){var self=this;metadata&&(this.metadata=metadata),this.config.hash&&(this.hash=hashes.createHash(this.config.hash)),this.channel=channel,channel.binaryType="arraybuffer",this.channel.onmessage=function(event){var len=event.data.byteLength;self.received+=len,self.receiveBuffer.push(event.data),self.hash&&self.hash.update(new Uint8Array(event.data)),self.emit("progress",self.received,self.metadata.size),self.received==self.metadata.size?(self.hash&&(self.metadata.actualhash=self.hash.digest("hex")),self.emit("receivedFile",new window.Blob(self.receiveBuffer),self.metadata),self.receiveBuffer=[]):self.received>self.metadata.size&&(console.error("received more than expected, discarding..."),self.receiveBuffer=[])}},module.exports={},module.exports.support=window&&window.File&&window.FileReader&&window.Blob,module.exports.Sender=Sender,module.exports.Receiver=Receiver},{async:26,"iana-hashes":31,util:24,wildemitter:113}],31:[function(require,module,exports){var createHash=require("create-hash"),createHmac=require("create-hmac"),getHashes=require("./lib/get-hashes"),mapping={md2:"md2",md5:"md5","sha-1":"sha1","sha-224":"sha224","sha-256":"sha256","sha-384":"sha384","sha-512":"sha512"},names=Object.keys(mapping);exports.getHashes=function(){for(var result=[],available=getHashes(),i=0,len=names.length;len>i;i++)available.indexOf(mapping[names[i]])>=0&&result.push(names[i]);return result},exports.createHash=function(algorithm){return algorithm=algorithm.toLowerCase(),mapping[algorithm]&&(algorithm=mapping[algorithm]),createHash(algorithm)},exports.createHmac=function(algorithm,key){return algorithm=algorithm.toLowerCase(),mapping[algorithm]&&(algorithm=mapping[algorithm]),createHmac(algorithm,key)}},{"./lib/get-hashes":32,"create-hash":33,"create-hmac":46}],32:[function(require,module){module.exports=function(){return["sha1","sha224","sha256","sha384","sha512","md5","rmd160"]}},{}],33:[function(require,module){(function(Buffer){"use strict";function HashNoConstructor(hash){Transform.call(this),this._hash=hash,this.buffers=[]}function Hash(hash){Transform.call(this),this._hash=hash}var inherits=require("inherits"),md5=require("./md5"),rmd160=require("ripemd160"),sha=require("sha.js"),Transform=require("stream").Transform;inherits(HashNoConstructor,Transform),HashNoConstructor.prototype._transform=function(data,_,next){this.buffers.push(data),next()},HashNoConstructor.prototype._flush=function(next){this.push(this.digest()),next()},HashNoConstructor.prototype.update=function(data,enc){return"string"==typeof data&&(data=new Buffer(data,enc)),this.buffers.push(data),this},HashNoConstructor.prototype.digest=function(enc){var buf=Buffer.concat(this.buffers),r=this._hash(buf);return this.buffers=null,enc?r.toString(enc):r},inherits(Hash,Transform),Hash.prototype._transform=function(data,enc,next){enc&&(data=new Buffer(data,enc)),this._hash.update(data),next()},Hash.prototype._flush=function(next){this.push(this._hash.digest()),this._hash=null,next()},Hash.prototype.update=function(data,enc){return"string"==typeof data&&(data=new Buffer(data,enc)),this._hash.update(data),this},Hash.prototype.digest=function(enc){var outData=this._hash.digest();return enc?outData.toString(enc):outData},module.exports=function(alg){return"md5"===alg?new HashNoConstructor(md5):"rmd160"===alg?new HashNoConstructor(rmd160):new Hash(sha(alg))}}).call(this,require("buffer").Buffer)},{"./md5":35,buffer:2,inherits:36,ripemd160:37,"sha.js":39,stream:21}],34:[function(require,module,exports){(function(Buffer){"use strict";function toArray(buf,bigEndian){if(buf.length%intSize!==0){var len=buf.length+(intSize-buf.length%intSize);buf=Buffer.concat([buf,zeroBuffer],len)}for(var arr=[],fn=bigEndian?buf.readInt32BE:buf.readInt32LE,i=0;i<buf.length;i+=intSize)arr.push(fn.call(buf,i));return arr}function toBuffer(arr,size,bigEndian){for(var buf=new Buffer(size),fn=bigEndian?buf.writeInt32BE:buf.writeInt32LE,i=0;i<arr.length;i++)fn.call(buf,arr[i],4*i,!0);return buf}function hash(buf,fn,hashSize,bigEndian){Buffer.isBuffer(buf)||(buf=new Buffer(buf));var arr=fn(toArray(buf,bigEndian),buf.length*chrsz);return toBuffer(arr,hashSize,bigEndian)}var intSize=4,zeroBuffer=new Buffer(intSize);zeroBuffer.fill(0);var chrsz=8;exports.hash=hash}).call(this,require("buffer").Buffer)},{buffer:2}],35:[function(require,module){"use strict";function core_md5(x,len){x[len>>5]|=128<<len%32,x[(len+64>>>9<<4)+14]=len;for(var a=1732584193,b=-271733879,c=-1732584194,d=271733878,i=0;i<x.length;i+=16){var 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 Array(a,b,c,d)}function md5_cmn(q,a,b,x,s,t){return safe_add(bit_rol(safe_add(safe_add(a,q),safe_add(x,t)),s),b)}function md5_ff(a,b,c,d,x,s,t){return md5_cmn(b&c|~b&d,a,b,x,s,t)}function md5_gg(a,b,c,d,x,s,t){return md5_cmn(b&d|c&~d,a,b,x,s,t)}function md5_hh(a,b,c,d,x,s,t){return md5_cmn(b^c^d,a,b,x,s,t)}function md5_ii(a,b,c,d,x,s,t){return md5_cmn(c^(b|~d),a,b,x,s,t)}function safe_add(x,y){var lsw=(65535&x)+(65535&y),msw=(x>>16)+(y>>16)+(lsw>>16);return msw<<16|65535&lsw}function bit_rol(num,cnt){return num<<cnt|num>>>32-cnt}var helpers=require("./helpers");module.exports=function(buf){return helpers.hash(buf,core_md5,16)}},{"./helpers":34}],36:[function(require,module,exports){arguments[4][7][0].apply(exports,arguments)
+},{dup:7}],37:[function(require,module){(function(Buffer){function bytesToWords(bytes){for(var words=[],i=0,b=0;i<bytes.length;i++,b+=8)words[b>>>5]|=bytes[i]<<24-b%32;return words}function wordsToBytes(words){for(var bytes=[],b=0;b<32*words.length;b+=8)bytes.push(words[b>>>5]>>>24-b%32&255);return bytes}function processBlock(H,M,offset){for(var i=0;16>i;i++){var offset_i=offset+i,M_offset_i=M[offset_i];M[offset_i]=16711935&(M_offset_i<<8|M_offset_i>>>24)|4278255360&(M_offset_i<<24|M_offset_i>>>8)}var al,bl,cl,dl,el,ar,br,cr,dr,er;ar=al=H[0],br=bl=H[1],cr=cl=H[2],dr=dl=H[3],er=el=H[4];var t;for(i=0;80>i;i+=1)t=al+M[offset+zl[i]]|0,t+=16>i?f1(bl,cl,dl)+hl[0]:32>i?f2(bl,cl,dl)+hl[1]:48>i?f3(bl,cl,dl)+hl[2]:64>i?f4(bl,cl,dl)+hl[3]:f5(bl,cl,dl)+hl[4],t=0|t,t=rotl(t,sl[i]),t=t+el|0,al=el,el=dl,dl=rotl(cl,10),cl=bl,bl=t,t=ar+M[offset+zr[i]]|0,t+=16>i?f5(br,cr,dr)+hr[0]:32>i?f4(br,cr,dr)+hr[1]:48>i?f3(br,cr,dr)+hr[2]:64>i?f2(br,cr,dr)+hr[3]:f1(br,cr,dr)+hr[4],t=0|t,t=rotl(t,sr[i]),t=t+er|0,ar=er,er=dr,dr=rotl(cr,10),cr=br,br=t;t=H[1]+cl+dr|0,H[1]=H[2]+dl+er|0,H[2]=H[3]+el+ar|0,H[3]=H[4]+al+br|0,H[4]=H[0]+bl+cr|0,H[0]=t}function f1(x,y,z){return x^y^z}function f2(x,y,z){return x&y|~x&z}function f3(x,y,z){return(x|~y)^z}function f4(x,y,z){return x&z|y&~z}function f5(x,y,z){return x^(y|~z)}function rotl(x,n){return x<<n|x>>>32-n}function ripemd160(message){var H=[1732584193,4023233417,2562383102,271733878,3285377520];"string"==typeof message&&(message=new Buffer(message,"utf8"));var m=bytesToWords(message),nBitsLeft=8*message.length,nBitsTotal=8*message.length;m[nBitsLeft>>>5]|=128<<24-nBitsLeft%32,m[(nBitsLeft+64>>>9<<4)+14]=16711935&(nBitsTotal<<8|nBitsTotal>>>24)|4278255360&(nBitsTotal<<24|nBitsTotal>>>8);for(var i=0;i<m.length;i+=16)processBlock(H,m,i);for(i=0;5>i;i++){var H_i=H[i];H[i]=16711935&(H_i<<8|H_i>>>24)|4278255360&(H_i<<24|H_i>>>8)}var digestbytes=wordsToBytes(H);return new Buffer(digestbytes)}/** @preserve
+(c) 2012 by Cédric Mesnil. All rights reserved.
+
+Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
+
+ - Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
+ - Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+*/
+var zl=[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,7,4,13,1,10,6,15,3,12,0,9,5,2,14,11,8,3,10,14,4,9,15,8,1,2,7,0,6,13,11,5,12,1,9,11,10,0,8,12,4,13,3,7,15,14,5,6,2,4,0,5,9,7,12,2,10,14,1,3,8,11,6,15,13],zr=[5,14,7,0,9,2,11,4,13,6,15,8,1,10,3,12,6,11,3,7,0,13,5,10,14,15,8,12,4,9,1,2,15,5,1,3,7,14,6,9,11,8,12,2,10,0,4,13,8,6,4,1,3,11,15,0,5,12,2,13,9,7,10,14,12,15,10,4,1,5,8,7,6,2,13,14,0,3,9,11],sl=[11,14,15,12,5,8,7,9,11,13,14,15,6,7,9,8,7,6,8,13,11,9,7,15,7,12,15,9,11,7,13,12,11,13,6,7,14,9,13,15,14,8,13,6,5,12,7,5,11,12,14,15,14,15,9,8,9,14,5,6,8,6,5,12,9,15,5,11,6,8,13,12,5,12,13,14,11,8,5,6],sr=[8,9,9,11,13,15,15,5,7,7,8,11,14,14,12,6,9,13,15,7,12,8,9,11,7,7,12,7,6,15,13,11,9,7,15,11,8,6,6,14,12,13,5,14,13,13,7,5,15,5,8,11,14,14,6,14,6,9,12,9,12,5,15,8,8,5,12,9,12,5,14,6,8,13,6,5,15,13,11,11],hl=[0,1518500249,1859775393,2400959708,2840853838],hr=[1352829926,1548603684,1836072691,2053994217,0];module.exports=ripemd160}).call(this,require("buffer").Buffer)},{buffer:2}],38:[function(require,module){(function(Buffer){function Hash(blockSize,finalSize){this._block=new Buffer(blockSize),this._finalSize=finalSize,this._blockSize=blockSize,this._len=0,this._s=0}Hash.prototype.update=function(data,enc){"string"==typeof data&&(enc=enc||"utf8",data=new Buffer(data,enc));for(var l=this._len+=data.length,s=this._s||0,f=0,buffer=this._block;l>s;){for(var t=Math.min(data.length,f+this._blockSize-s%this._blockSize),ch=t-f,i=0;ch>i;i++)buffer[s%this._blockSize+i]=data[i+f];s+=ch,f+=ch,s%this._blockSize===0&&this._update(buffer)}return this._s=s,this},Hash.prototype.digest=function(enc){var l=8*this._len;this._block[this._len%this._blockSize]=128,this._block.fill(0,this._len%this._blockSize+1),l%(8*this._blockSize)>=8*this._finalSize&&(this._update(this._block),this._block.fill(0)),this._block.writeInt32BE(l,this._blockSize-4);var hash=this._update(this._block)||this._hash();return enc?hash.toString(enc):hash},Hash.prototype._update=function(){throw new Error("_update must be implemented by subclass")},module.exports=Hash}).call(this,require("buffer").Buffer)},{buffer:2}],39:[function(require,module,exports){var exports=module.exports=function(algorithm){algorithm=algorithm.toLowerCase();var Algorithm=exports[algorithm];if(!Algorithm)throw new Error(algorithm+" is not supported (we accept pull requests)");return new Algorithm};exports.sha=require("./sha"),exports.sha1=require("./sha1"),exports.sha224=require("./sha224"),exports.sha256=require("./sha256"),exports.sha384=require("./sha384"),exports.sha512=require("./sha512")},{"./sha":40,"./sha1":41,"./sha224":42,"./sha256":43,"./sha384":44,"./sha512":45}],40:[function(require,module){(function(Buffer){function Sha(){this.init(),this._w=W,Hash.call(this,64,56)}function rol(num,cnt){return num<<cnt|num>>>32-cnt}var inherits=require("inherits"),Hash=require("./hash"),W=new Array(80);inherits(Sha,Hash),Sha.prototype.init=function(){return this._a=1732584193,this._b=-271733879,this._c=-1732584194,this._d=271733878,this._e=-1009589776,this},Sha.prototype._update=function(M){function calcW(){return W[j-3]^W[j-8]^W[j-14]^W[j-16]}function loop(w,f){W[j]=w;var t=rol(a,5)+f+e+w+k;e=d,d=c,c=rol(b,30),b=a,a=t,j++}var k,W=this._w,a=this._a,b=this._b,c=this._c,d=this._d,e=this._e,j=0;for(k=1518500249;16>j;)loop(M.readInt32BE(4*j),b&c|~b&d);for(;20>j;)loop(calcW(),b&c|~b&d);for(k=1859775393;40>j;)loop(calcW(),b^c^d);for(k=-1894007588;60>j;)loop(calcW(),b&c|b&d|c&d);for(k=-899497514;80>j;)loop(calcW(),b^c^d);this._a=a+this._a|0,this._b=b+this._b|0,this._c=c+this._c|0,this._d=d+this._d|0,this._e=e+this._e|0},Sha.prototype._hash=function(){var H=new Buffer(20);return H.writeInt32BE(0|this._a,0),H.writeInt32BE(0|this._b,4),H.writeInt32BE(0|this._c,8),H.writeInt32BE(0|this._d,12),H.writeInt32BE(0|this._e,16),H},module.exports=Sha}).call(this,require("buffer").Buffer)},{"./hash":38,buffer:2,inherits:36}],41:[function(require,module){(function(Buffer){function Sha1(){this.init(),this._w=W,Hash.call(this,64,56)}function rol(num,cnt){return num<<cnt|num>>>32-cnt}var inherits=require("inherits"),Hash=require("./hash"),W=new Array(80);inherits(Sha1,Hash),Sha1.prototype.init=function(){return this._a=1732584193,this._b=-271733879,this._c=-1732584194,this._d=271733878,this._e=-1009589776,this},Sha1.prototype._update=function(M){function calcW(){return rol(W[j-3]^W[j-8]^W[j-14]^W[j-16],1)}function loop(w,f){W[j]=w;var t=rol(a,5)+f+e+w+k;e=d,d=c,c=rol(b,30),b=a,a=t,j++}var k,W=this._w,a=this._a,b=this._b,c=this._c,d=this._d,e=this._e,j=0;for(k=1518500249;16>j;)loop(M.readInt32BE(4*j),b&c|~b&d);for(;20>j;)loop(calcW(),b&c|~b&d);for(k=1859775393;40>j;)loop(calcW(),b^c^d);for(k=-1894007588;60>j;)loop(calcW(),b&c|b&d|c&d);for(k=-899497514;80>j;)loop(calcW(),b^c^d);this._a=a+this._a|0,this._b=b+this._b|0,this._c=c+this._c|0,this._d=d+this._d|0,this._e=e+this._e|0},Sha1.prototype._hash=function(){var H=new Buffer(20);return H.writeInt32BE(0|this._a,0),H.writeInt32BE(0|this._b,4),H.writeInt32BE(0|this._c,8),H.writeInt32BE(0|this._d,12),H.writeInt32BE(0|this._e,16),H},module.exports=Sha1}).call(this,require("buffer").Buffer)},{"./hash":38,buffer:2,inherits:36}],42:[function(require,module){(function(Buffer){function Sha224(){this.init(),this._w=W,Hash.call(this,64,56)}var inherits=require("inherits"),Sha256=require("./sha256"),Hash=require("./hash"),W=new Array(64);inherits(Sha224,Sha256),Sha224.prototype.init=function(){return this._a=-1056596264,this._b=914150663,this._c=812702999,this._d=-150054599,this._e=-4191439,this._f=1750603025,this._g=1694076839,this._h=-1090891868,this},Sha224.prototype._hash=function(){var H=new Buffer(28);return H.writeInt32BE(this._a,0),H.writeInt32BE(this._b,4),H.writeInt32BE(this._c,8),H.writeInt32BE(this._d,12),H.writeInt32BE(this._e,16),H.writeInt32BE(this._f,20),H.writeInt32BE(this._g,24),H},module.exports=Sha224}).call(this,require("buffer").Buffer)},{"./hash":38,"./sha256":43,buffer:2,inherits:36}],43:[function(require,module){(function(Buffer){function Sha256(){this.init(),this._w=W,Hash.call(this,64,56)}function S(X,n){return X>>>n|X<<32-n}function R(X,n){return X>>>n}function Ch(x,y,z){return x&y^~x&z}function Maj(x,y,z){return x&y^x&z^y&z}function Sigma0256(x){return S(x,2)^S(x,13)^S(x,22)}function Sigma1256(x){return S(x,6)^S(x,11)^S(x,25)}function Gamma0256(x){return S(x,7)^S(x,18)^R(x,3)}function Gamma1256(x){return S(x,17)^S(x,19)^R(x,10)}var inherits=require("inherits"),Hash=require("./hash"),K=[1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298],W=new Array(64);inherits(Sha256,Hash),Sha256.prototype.init=function(){return this._a=1779033703,this._b=-1150833019,this._c=1013904242,this._d=-1521486534,this._e=1359893119,this._f=-1694144372,this._g=528734635,this._h=1541459225,this},Sha256.prototype._update=function(M){function calcW(){return Gamma1256(W[j-2])+W[j-7]+Gamma0256(W[j-15])+W[j-16]}function loop(w){W[j]=w;var T1=h+Sigma1256(e)+Ch(e,f,g)+K[j]+w,T2=Sigma0256(a)+Maj(a,b,c);h=g,g=f,f=e,e=d+T1,d=c,c=b,b=a,a=T1+T2,j++}for(var W=this._w,a=0|this._a,b=0|this._b,c=0|this._c,d=0|this._d,e=0|this._e,f=0|this._f,g=0|this._g,h=0|this._h,j=0;16>j;)loop(M.readInt32BE(4*j));for(;64>j;)loop(calcW());this._a=a+this._a|0,this._b=b+this._b|0,this._c=c+this._c|0,this._d=d+this._d|0,this._e=e+this._e|0,this._f=f+this._f|0,this._g=g+this._g|0,this._h=h+this._h|0},Sha256.prototype._hash=function(){var H=new Buffer(32);return H.writeInt32BE(this._a,0),H.writeInt32BE(this._b,4),H.writeInt32BE(this._c,8),H.writeInt32BE(this._d,12),H.writeInt32BE(this._e,16),H.writeInt32BE(this._f,20),H.writeInt32BE(this._g,24),H.writeInt32BE(this._h,28),H},module.exports=Sha256}).call(this,require("buffer").Buffer)},{"./hash":38,buffer:2,inherits:36}],44:[function(require,module){(function(Buffer){function Sha384(){this.init(),this._w=W,Hash.call(this,128,112)}var inherits=require("inherits"),SHA512=require("./sha512"),Hash=require("./hash"),W=new Array(160);inherits(Sha384,SHA512),Sha384.prototype.init=function(){return this._a=-876896931,this._b=1654270250,this._c=-1856437926,this._d=355462360,this._e=1731405415,this._f=-1900787065,this._g=-619958771,this._h=1203062813,this._al=-1056596264,this._bl=914150663,this._cl=812702999,this._dl=-150054599,this._el=-4191439,this._fl=1750603025,this._gl=1694076839,this._hl=-1090891868,this},Sha384.prototype._hash=function(){function writeInt64BE(h,l,offset){H.writeInt32BE(h,offset),H.writeInt32BE(l,offset+4)}var H=new Buffer(48);return writeInt64BE(this._a,this._al,0),writeInt64BE(this._b,this._bl,8),writeInt64BE(this._c,this._cl,16),writeInt64BE(this._d,this._dl,24),writeInt64BE(this._e,this._el,32),writeInt64BE(this._f,this._fl,40),H},module.exports=Sha384}).call(this,require("buffer").Buffer)},{"./hash":38,"./sha512":45,buffer:2,inherits:36}],45:[function(require,module){(function(Buffer){function Sha512(){this.init(),this._w=W,Hash.call(this,128,112)}function S(X,Xl,n){return X>>>n|Xl<<32-n}function Ch(x,y,z){return x&y^~x&z}function Maj(x,y,z){return x&y^x&z^y&z}var inherits=require("inherits"),Hash=require("./hash"),K=[1116352408,3609767458,1899447441,602891725,3049323471,3964484399,3921009573,2173295548,961987163,4081628472,1508970993,3053834265,2453635748,2937671579,2870763221,3664609560,3624381080,2734883394,310598401,1164996542,607225278,1323610764,1426881987,3590304994,1925078388,4068182383,2162078206,991336113,2614888103,633803317,3248222580,3479774868,3835390401,2666613458,4022224774,944711139,264347078,2341262773,604807628,2007800933,770255983,1495990901,1249150122,1856431235,1555081692,3175218132,1996064986,2198950837,2554220882,3999719339,2821834349,766784016,2952996808,2566594879,3210313671,3203337956,3336571891,1034457026,3584528711,2466948901,113926993,3758326383,338241895,168717936,666307205,1188179964,773529912,1546045734,1294757372,1522805485,1396182291,2643833823,1695183700,2343527390,1986661051,1014477480,2177026350,1206759142,2456956037,344077627,2730485921,1290863460,2820302411,3158454273,3259730800,3505952657,3345764771,106217008,3516065817,3606008344,3600352804,1432725776,4094571909,1467031594,275423344,851169720,430227734,3100823752,506948616,1363258195,659060556,3750685593,883997877,3785050280,958139571,3318307427,1322822218,3812723403,1537002063,2003034995,1747873779,3602036899,1955562222,1575990012,2024104815,1125592928,2227730452,2716904306,2361852424,442776044,2428436474,593698344,2756734187,3733110249,3204031479,2999351573,3329325298,3815920427,3391569614,3928383900,3515267271,566280711,3940187606,3454069534,4118630271,4000239992,116418474,1914138554,174292421,2731055270,289380356,3203993006,460393269,320620315,685471733,587496836,852142971,1086792851,1017036298,365543100,1126000580,2618297676,1288033470,3409855158,1501505948,4234509866,1607167915,987167468,1816402316,1246189591],W=new Array(160);inherits(Sha512,Hash),Sha512.prototype.init=function(){return this._a=1779033703,this._b=-1150833019,this._c=1013904242,this._d=-1521486534,this._e=1359893119,this._f=-1694144372,this._g=528734635,this._h=1541459225,this._al=-205731576,this._bl=-2067093701,this._cl=-23791573,this._dl=1595750129,this._el=-1377402159,this._fl=725511199,this._gl=-79577749,this._hl=327033209,this},Sha512.prototype._update=function(M){function calcW(){var x=W[j-30],xl=W[j-30+1],gamma0=S(x,xl,1)^S(x,xl,8)^x>>>7,gamma0l=S(xl,x,1)^S(xl,x,8)^S(xl,x,7);x=W[j-4],xl=W[j-4+1];var gamma1=S(x,xl,19)^S(xl,x,29)^x>>>6,gamma1l=S(xl,x,19)^S(x,xl,29)^S(xl,x,6),Wi7=W[j-14],Wi7l=W[j-14+1],Wi16=W[j-32],Wi16l=W[j-32+1];Wil=gamma0l+Wi7l,Wi=gamma0+Wi7+(gamma0l>>>0>Wil>>>0?1:0),Wil+=gamma1l,Wi=Wi+gamma1+(gamma1l>>>0>Wil>>>0?1:0),Wil+=Wi16l,Wi=Wi+Wi16+(Wi16l>>>0>Wil>>>0?1:0)}function loop(){W[j]=Wi,W[j+1]=Wil;var maj=Maj(a,b,c),majl=Maj(al,bl,cl),sigma0h=S(a,al,28)^S(al,a,2)^S(al,a,7),sigma0l=S(al,a,28)^S(a,al,2)^S(a,al,7),sigma1h=S(e,el,14)^S(e,el,18)^S(el,e,9),sigma1l=S(el,e,14)^S(el,e,18)^S(e,el,9),Ki=K[j],Kil=K[j+1],ch=Ch(e,f,g),chl=Ch(el,fl,gl),t1l=hl+sigma1l,t1=h+sigma1h+(hl>>>0>t1l>>>0?1:0);t1l+=chl,t1=t1+ch+(chl>>>0>t1l>>>0?1:0),t1l+=Kil,t1=t1+Ki+(Kil>>>0>t1l>>>0?1:0),t1l+=Wil,t1=t1+Wi+(Wil>>>0>t1l>>>0?1:0);var t2l=sigma0l+majl,t2=sigma0h+maj+(sigma0l>>>0>t2l>>>0?1:0);h=g,hl=gl,g=f,gl=fl,f=e,fl=el,el=dl+t1l|0,e=d+t1+(dl>>>0>el>>>0?1:0)|0,d=c,dl=cl,c=b,cl=bl,b=a,bl=al,al=t1l+t2l|0,a=t1+t2+(t1l>>>0>al>>>0?1:0)|0,i++,j+=2}for(var Wi,Wil,W=this._w,a=0|this._a,b=0|this._b,c=0|this._c,d=0|this._d,e=0|this._e,f=0|this._f,g=0|this._g,h=0|this._h,al=0|this._al,bl=0|this._bl,cl=0|this._cl,dl=0|this._dl,el=0|this._el,fl=0|this._fl,gl=0|this._gl,hl=0|this._hl,i=0,j=0;16>i;)Wi=M.readInt32BE(4*j),Wil=M.readInt32BE(4*j+4),loop();for(;80>i;)calcW(),loop();this._al=this._al+al|0,this._bl=this._bl+bl|0,this._cl=this._cl+cl|0,this._dl=this._dl+dl|0,this._el=this._el+el|0,this._fl=this._fl+fl|0,this._gl=this._gl+gl|0,this._hl=this._hl+hl|0,this._a=this._a+a+(this._al>>>0<al>>>0?1:0)|0,this._b=this._b+b+(this._bl>>>0<bl>>>0?1:0)|0,this._c=this._c+c+(this._cl>>>0<cl>>>0?1:0)|0,this._d=this._d+d+(this._dl>>>0<dl>>>0?1:0)|0,this._e=this._e+e+(this._el>>>0<el>>>0?1:0)|0,this._f=this._f+f+(this._fl>>>0<fl>>>0?1:0)|0,this._g=this._g+g+(this._gl>>>0<gl>>>0?1:0)|0,this._h=this._h+h+(this._hl>>>0<hl>>>0?1:0)|0},Sha512.prototype._hash=function(){function writeInt64BE(h,l,offset){H.writeInt32BE(h,offset),H.writeInt32BE(l,offset+4)}var H=new Buffer(64);return writeInt64BE(this._a,this._al,0),writeInt64BE(this._b,this._bl,8),writeInt64BE(this._c,this._cl,16),writeInt64BE(this._d,this._dl,24),writeInt64BE(this._e,this._el,32),writeInt64BE(this._f,this._fl,40),writeInt64BE(this._g,this._gl,48),writeInt64BE(this._h,this._hl,56),H},module.exports=Sha512}).call(this,require("buffer").Buffer)},{"./hash":38,buffer:2,inherits:36}],46:[function(require,module){(function(Buffer){"use strict";function Hmac(alg,key){Transform.call(this),"string"==typeof key&&(key=new Buffer(key));var blocksize="sha512"===alg||"sha384"===alg?128:64;this._alg=alg,this._key=key,key.length>blocksize?key=createHash(alg).update(key).digest():key.length<blocksize&&(key=Buffer.concat([key,ZEROS],blocksize));for(var ipad=this._ipad=new Buffer(blocksize),opad=this._opad=new Buffer(blocksize),i=0;blocksize>i;i++)ipad[i]=54^key[i],opad[i]=92^key[i];this._hash=createHash(alg).update(ipad)}var createHash=require("create-hash/browser"),inherits=require("inherits"),Transform=require("stream").Transform,ZEROS=new Buffer(128);ZEROS.fill(0),inherits(Hmac,Transform),Hmac.prototype.update=function(data,enc){return this._hash.update(data,enc),this},Hmac.prototype._transform=function(data,_,next){this._hash.update(data),next()},Hmac.prototype._flush=function(next){this.push(this.digest()),next()},Hmac.prototype.digest=function(enc){var h=this._hash.digest();return createHash(this._alg).update(this._opad).update(h).digest(enc)},module.exports=function(alg,key){return new Hmac(alg,key)}}).call(this,require("buffer").Buffer)},{buffer:2,"create-hash/browser":33,inherits:47,stream:21}],47:[function(require,module,exports){arguments[4][7][0].apply(exports,arguments)},{dup:7}],48:[function(require,module){function createForEach(arrayFunc,eachFunc){return function(collection,iteratee,thisArg){return"function"==typeof iteratee&&void 0===thisArg&&isArray(collection)?arrayFunc(collection,iteratee):eachFunc(collection,bindCallback(iteratee,thisArg,3))}}var arrayEach=require("lodash._arrayeach"),baseEach=require("lodash._baseeach"),bindCallback=require("lodash._bindcallback"),isArray=require("lodash.isarray"),forEach=createForEach(arrayEach,baseEach);module.exports=forEach},{"lodash._arrayeach":49,"lodash._baseeach":50,"lodash._bindcallback":54,"lodash.isarray":55}],49:[function(require,module){function arrayEach(array,iteratee){for(var index=-1,length=array.length;++index<length&&iteratee(array[index],index,array)!==!1;);return array}module.exports=arrayEach},{}],50:[function(require,module){function baseForOwn(object,iteratee){return baseFor(object,iteratee,keys)}function baseProperty(key){return function(object){return null==object?void 0:object[key]}}function createBaseEach(eachFunc,fromRight){return function(collection,iteratee){var length=collection?getLength(collection):0;if(!isLength(length))return eachFunc(collection,iteratee);for(var index=fromRight?length:-1,iterable=toObject(collection);(fromRight?index--:++index<length)&&iteratee(iterable[index],index,iterable)!==!1;);return collection}}function createBaseFor(fromRight){return function(object,iteratee,keysFunc){for(var iterable=toObject(object),props=keysFunc(object),length=props.length,index=fromRight?length:-1;fromRight?index--:++index<length;){var key=props[index];if(iteratee(iterable[key],key,iterable)===!1)break}return object}}function isLength(value){return"number"==typeof value&&value>-1&&value%1==0&&MAX_SAFE_INTEGER>=value}function toObject(value){return isObject(value)?value:Object(value)}function isObject(value){var type=typeof value;return!!value&&("object"==type||"function"==type)}var keys=require("lodash.keys"),MAX_SAFE_INTEGER=9007199254740991,baseEach=createBaseEach(baseForOwn),baseFor=createBaseFor(),getLength=baseProperty("length");module.exports=baseEach},{"lodash.keys":51}],51:[function(require,module){function baseProperty(key){return function(object){return null==object?void 0:object[key]}}function isArrayLike(value){return null!=value&&isLength(getLength(value))}function isIndex(value,length){return value="number"==typeof value||reIsUint.test(value)?+value:-1,length=null==length?MAX_SAFE_INTEGER:length,value>-1&&value%1==0&&length>value}function isLength(value){return"number"==typeof value&&value>-1&&value%1==0&&MAX_SAFE_INTEGER>=value}function shimKeys(object){for(var props=keysIn(object),propsLength=props.length,length=propsLength&&object.length,allowIndexes=!!length&&isLength(length)&&(isArray(object)||isArguments(object)),index=-1,result=[];++index<propsLength;){var key=props[index];(allowIndexes&&isIndex(key,length)||hasOwnProperty.call(object,key))&&result.push(key)}return result}function isObject(value){var type=typeof value;return!!value&&("object"==type||"function"==type)}function keysIn(object){if(null==object)return[];isObject(object)||(object=Object(object));var length=object.length;length=length&&isLength(length)&&(isArray(object)||isArguments(object))&&length||0;for(var Ctor=object.constructor,index=-1,isProto="function"==typeof Ctor&&Ctor.prototype===object,result=Array(length),skipIndexes=length>0;++index<length;)result[index]=index+"";for(var key in object)skipIndexes&&isIndex(key,length)||"constructor"==key&&(isProto||!hasOwnProperty.call(object,key))||result.push(key);return result}var getNative=require("lodash._getnative"),isArguments=require("lodash.isarguments"),isArray=require("lodash.isarray"),reIsUint=/^\d+$/,objectProto=Object.prototype,hasOwnProperty=objectProto.hasOwnProperty,nativeKeys=getNative(Object,"keys"),MAX_SAFE_INTEGER=9007199254740991,getLength=baseProperty("length"),keys=nativeKeys?function(object){var Ctor=null==object?null:object.constructor;return"function"==typeof Ctor&&Ctor.prototype===object||"function"!=typeof object&&isArrayLike(object)?shimKeys(object):isObject(object)?nativeKeys(object):[]}:shimKeys;module.exports=keys},{"lodash._getnative":52,"lodash.isarguments":53,"lodash.isarray":55}],52:[function(require,module){function baseToString(value){return"string"==typeof value?value:null==value?"":value+""}function isObjectLike(value){return!!value&&"object"==typeof value}function getNative(object,key){var value=null==object?void 0:object[key];return isNative(value)?value:void 0}function isNative(value){return null==value?!1:objToString.call(value)==funcTag?reIsNative.test(fnToString.call(value)):isObjectLike(value)&&reIsHostCtor.test(value)}function escapeRegExp(string){return string=baseToString(string),string&&reHasRegExpChars.test(string)?string.replace(reRegExpChars,"\\$&"):string}var funcTag="[object Function]",reRegExpChars=/[.*+?^${}()|[\]\/\\]/g,reHasRegExpChars=RegExp(reRegExpChars.source),reIsHostCtor=/^\[object .+?Constructor\]$/,objectProto=Object.prototype,fnToString=Function.prototype.toString,hasOwnProperty=objectProto.hasOwnProperty,objToString=objectProto.toString,reIsNative=RegExp("^"+escapeRegExp(fnToString.call(hasOwnProperty)).replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");module.exports=getNative},{}],53:[function(require,module){function isObjectLike(value){return!!value&&"object"==typeof value}function baseProperty(key){return function(object){return null==object?void 0:object[key]}}function isArrayLike(value){return null!=value&&isLength(getLength(value))}function isLength(value){return"number"==typeof value&&value>-1&&value%1==0&&MAX_SAFE_INTEGER>=value}function isArguments(value){return isObjectLike(value)&&isArrayLike(value)&&objToString.call(value)==argsTag}var argsTag="[object Arguments]",objectProto=Object.prototype,objToString=objectProto.toString,MAX_SAFE_INTEGER=9007199254740991,getLength=baseProperty("length");module.exports=isArguments},{}],54:[function(require,module){function bindCallback(func,thisArg,argCount){if("function"!=typeof func)return identity;if(void 0===thisArg)return func;switch(argCount){case 1:return function(value){return func.call(thisArg,value)};case 3:return function(value,index,collection){return func.call(thisArg,value,index,collection)};case 4:return function(accumulator,value,index,collection){return func.call(thisArg,accumulator,value,index,collection)};case 5:return function(value,other,key,object,source){return func.call(thisArg,value,other,key,object,source)}}return function(){return func.apply(thisArg,arguments)}}function identity(value){return value}module.exports=bindCallback},{}],55:[function(require,module){function baseToString(value){return"string"==typeof value?value:null==value?"":value+""}function isObjectLike(value){return!!value&&"object"==typeof value}function getNative(object,key){var value=null==object?void 0:object[key];return isNative(value)?value:void 0}function isLength(value){return"number"==typeof value&&value>-1&&value%1==0&&MAX_SAFE_INTEGER>=value}function isNative(value){return null==value?!1:objToString.call(value)==funcTag?reIsNative.test(fnToString.call(value)):isObjectLike(value)&&reIsHostCtor.test(value)}function escapeRegExp(string){return string=baseToString(string),string&&reHasRegExpChars.test(string)?string.replace(reRegExpChars,"\\$&"):string}var arrayTag="[object Array]",funcTag="[object Function]",reRegExpChars=/[.*+?^${}()|[\]\/\\]/g,reHasRegExpChars=RegExp(reRegExpChars.source),reIsHostCtor=/^\[object .+?Constructor\]$/,objectProto=Object.prototype,fnToString=Function.prototype.toString,hasOwnProperty=objectProto.hasOwnProperty,objToString=objectProto.toString,reIsNative=RegExp("^"+escapeRegExp(fnToString.call(hasOwnProperty)).replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),nativeIsArray=getNative(Array,"isArray"),MAX_SAFE_INTEGER=9007199254740991,isArray=nativeIsArray||function(value){return isObjectLike(value)&&isLength(value.length)&&objToString.call(value)==arrayTag};module.exports=isArray},{}],56:[function(require,module){function baseProperty(key){return function(object){return null==object?void 0:object[key]}}function basePropertyDeep(path){var pathKey=path+"";return path=toPath(path),function(object){return baseGet(object,path,pathKey)}}function isKey(value,object){var type=typeof value;if("string"==type&&reIsPlainProp.test(value)||"number"==type)return!0;if(isArray(value))return!1;var result=!reIsDeepProp.test(value);return result||null!=object&&value in toObject(object)}function toObject(value){return isObject(value)?value:Object(value)}function pluck(collection,path){return map(collection,property(path))}function isObject(value){var type=typeof value;return!!value&&("object"==type||"function"==type)}function property(path){return isKey(path)?baseProperty(path):basePropertyDeep(path)}var baseGet=require("lodash._baseget"),toPath=require("lodash._topath"),isArray=require("lodash.isarray"),map=require("lodash.map"),reIsDeepProp=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\n\\]|\\.)*?\1)\]/,reIsPlainProp=/^\w*$/;module.exports=pluck},{"lodash._baseget":57,"lodash._topath":58,"lodash.isarray":59,"lodash.map":60}],57:[function(require,module){function baseGet(object,path,pathKey){if(null!=object){void 0!==pathKey&&pathKey in toObject(object)&&(path=[pathKey]);for(var index=0,length=path.length;null!=object&&length>index;)object=object[path[index++]];return index&&index==length?object:void 0}}function toObject(value){return isObject(value)?value:Object(value)}function isObject(value){var type=typeof value;return!!value&&("object"==type||"function"==type)}module.exports=baseGet},{}],58:[function(require,module){function baseToString(value){return"string"==typeof value?value:null==value?"":value+""}function toPath(value){if(isArray(value))return value;var result=[];return baseToString(value).replace(rePropName,function(match,number,quote,string){result.push(quote?string.replace(reEscapeChar,"$1"):number||match)}),result}var isArray=require("lodash.isarray"),rePropName=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\n\\]|\\.)*?)\2)\]/g,reEscapeChar=/\\(\\)?/g;module.exports=toPath},{"lodash.isarray":59}],59:[function(require,module,exports){arguments[4][55][0].apply(exports,arguments)},{dup:55}],60:[function(require,module){function baseMap(collection,iteratee){var index=-1,result=isArrayLike(collection)?Array(collection.length):[];return baseEach(collection,function(value,key,collection){result[++index]=iteratee(value,key,collection)}),result}function baseProperty(key){return function(object){return null==object?void 0:object[key]}}function isArrayLike(value){return null!=value&&isLength(getLength(value))}function isLength(value){return"number"==typeof value&&value>-1&&value%1==0&&MAX_SAFE_INTEGER>=value}function map(collection,iteratee,thisArg){var func=isArray(collection)?arrayMap:baseMap;return iteratee=baseCallback(iteratee,thisArg,3),func(collection,iteratee)}var arrayMap=require("lodash._arraymap"),baseCallback=require("lodash._basecallback"),baseEach=require("lodash._baseeach"),isArray=require("lodash.isarray"),MAX_SAFE_INTEGER=9007199254740991,getLength=baseProperty("length");module.exports=map},{"lodash._arraymap":61,"lodash._basecallback":62,"lodash._baseeach":67,"lodash.isarray":59}],61:[function(require,module){function arrayMap(array,iteratee){for(var index=-1,length=array.length,result=Array(length);++index<length;)result[index]=iteratee(array[index],index,array);return result}module.exports=arrayMap},{}],62:[function(require,module){function baseToString(value){return"string"==typeof value?value:null==value?"":value+""}function baseCallback(func,thisArg,argCount){var type=typeof func;return"function"==type?void 0===thisArg?func:bindCallback(func,thisArg,argCount):null==func?identity:"object"==type?baseMatches(func):void 0===thisArg?property(func):baseMatchesProperty(func,thisArg)}function baseGet(object,path,pathKey){if(null!=object){void 0!==pathKey&&pathKey in toObject(object)&&(path=[pathKey]);for(var index=0,length=path.length;null!=object&&length>index;)object=object[path[index++]];return index&&index==length?object:void 0}}function baseIsMatch(object,matchData,customizer){var index=matchData.length,length=index,noCustomizer=!customizer;if(null==object)return!length;for(object=toObject(object);index--;){var data=matchData[index];if(noCustomizer&&data[2]?data[1]!==object[data[0]]:!(data[0]in object))return!1}for(;++index<length;){data=matchData[index];var key=data[0],objValue=object[key],srcValue=data[1];if(noCustomizer&&data[2]){if(void 0===objValue&&!(key in object))return!1}else{var result=customizer?customizer(objValue,srcValue,key):void 0;if(!(void 0===result?baseIsEqual(srcValue,objValue,customizer,!0):result))return!1}}return!0}function baseMatches(source){var matchData=getMatchData(source);if(1==matchData.length&&matchData[0][2]){var key=matchData[0][0],value=matchData[0][1];return function(object){return null==object?!1:object[key]===value&&(void 0!==value||key in toObject(object))}}return function(object){return baseIsMatch(object,matchData)}}function baseMatchesProperty(path,srcValue){var isArr=isArray(path),isCommon=isKey(path)&&isStrictComparable(srcValue),pathKey=path+"";return path=toPath(path),function(object){if(null==object)return!1;var key=pathKey;if(object=toObject(object),!(!isArr&&isCommon||key in object)){if(object=1==path.length?object:baseGet(object,baseSlice(path,0,-1)),null==object)return!1;key=last(path),object=toObject(object)}return object[key]===srcValue?void 0!==srcValue||key in object:baseIsEqual(srcValue,object[key],void 0,!0)}}function baseProperty(key){return function(object){return null==object?void 0:object[key]}}function basePropertyDeep(path){var pathKey=path+"";return path=toPath(path),function(object){return baseGet(object,path,pathKey)}}function baseSlice(array,start,end){var index=-1,length=array.length;start=null==start?0:+start||0,0>start&&(start=-start>length?0:length+start),end=void 0===end||end>length?length:+end||0,0>end&&(end+=length),length=start>end?0:end-start>>>0,start>>>=0;for(var result=Array(length);++index<length;)result[index]=array[index+start];return result}function getMatchData(object){for(var result=pairs(object),length=result.length;length--;)result[length][2]=isStrictComparable(result[length][1]);return result}function isKey(value,object){var type=typeof value;if("string"==type&&reIsPlainProp.test(value)||"number"==type)return!0;if(isArray(value))return!1;var result=!reIsDeepProp.test(value);return result||null!=object&&value in toObject(object)}function isStrictComparable(value){return value===value&&!isObject(value)}function toObject(value){return isObject(value)?value:Object(value)}function toPath(value){if(isArray(value))return value;var result=[];return baseToString(value).replace(rePropName,function(match,number,quote,string){result.push(quote?string.replace(reEscapeChar,"$1"):number||match)}),result}function last(array){var length=array?array.length:0;return length?array[length-1]:void 0}function isObject(value){var type=typeof value;return!!value&&("object"==type||"function"==type)}function identity(value){return value}function property(path){return isKey(path)?baseProperty(path):basePropertyDeep(path)}var baseIsEqual=require("lodash._baseisequal"),bindCallback=require("lodash._bindcallback"),isArray=require("lodash.isarray"),pairs=require("lodash.pairs"),reIsDeepProp=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\n\\]|\\.)*?\1)\]/,reIsPlainProp=/^\w*$/,rePropName=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\n\\]|\\.)*?)\2)\]/g,reEscapeChar=/\\(\\)?/g;module.exports=baseCallback},{"lodash._baseisequal":63,"lodash._bindcallback":65,"lodash.isarray":59,"lodash.pairs":66}],63:[function(require,module){function isObjectLike(value){return!!value&&"object"==typeof value}function arraySome(array,predicate){for(var index=-1,length=array.length;++index<length;)if(predicate(array[index],index,array))return!0;return!1}function baseIsEqual(value,other,customizer,isLoose,stackA,stackB){return value===other?!0:null==value||null==other||!isObject(value)&&!isObjectLike(other)?value!==value&&other!==other:baseIsEqualDeep(value,other,baseIsEqual,customizer,isLoose,stackA,stackB)}function baseIsEqualDeep(object,other,equalFunc,customizer,isLoose,stackA,stackB){var objIsArr=isArray(object),othIsArr=isArray(other),objTag=arrayTag,othTag=arrayTag;
+objIsArr||(objTag=objToString.call(object),objTag==argsTag?objTag=objectTag:objTag!=objectTag&&(objIsArr=isTypedArray(object))),othIsArr||(othTag=objToString.call(other),othTag==argsTag?othTag=objectTag:othTag!=objectTag&&(othIsArr=isTypedArray(other)));var objIsObj=objTag==objectTag,othIsObj=othTag==objectTag,isSameTag=objTag==othTag;if(isSameTag&&!objIsArr&&!objIsObj)return equalByTag(object,other,objTag);if(!isLoose){var objIsWrapped=objIsObj&&hasOwnProperty.call(object,"__wrapped__"),othIsWrapped=othIsObj&&hasOwnProperty.call(other,"__wrapped__");if(objIsWrapped||othIsWrapped)return equalFunc(objIsWrapped?object.value():object,othIsWrapped?other.value():other,customizer,isLoose,stackA,stackB)}if(!isSameTag)return!1;stackA||(stackA=[]),stackB||(stackB=[]);for(var length=stackA.length;length--;)if(stackA[length]==object)return stackB[length]==other;stackA.push(object),stackB.push(other);var result=(objIsArr?equalArrays:equalObjects)(object,other,equalFunc,customizer,isLoose,stackA,stackB);return stackA.pop(),stackB.pop(),result}function equalArrays(array,other,equalFunc,customizer,isLoose,stackA,stackB){var index=-1,arrLength=array.length,othLength=other.length;if(arrLength!=othLength&&!(isLoose&&othLength>arrLength))return!1;for(;++index<arrLength;){var arrValue=array[index],othValue=other[index],result=customizer?customizer(isLoose?othValue:arrValue,isLoose?arrValue:othValue,index):void 0;if(void 0!==result){if(result)continue;return!1}if(isLoose){if(!arraySome(other,function(othValue){return arrValue===othValue||equalFunc(arrValue,othValue,customizer,isLoose,stackA,stackB)}))return!1}else if(arrValue!==othValue&&!equalFunc(arrValue,othValue,customizer,isLoose,stackA,stackB))return!1}return!0}function equalByTag(object,other,tag){switch(tag){case boolTag:case dateTag:return+object==+other;case errorTag:return object.name==other.name&&object.message==other.message;case numberTag:return object!=+object?other!=+other:object==+other;case regexpTag:case stringTag:return object==other+""}return!1}function equalObjects(object,other,equalFunc,customizer,isLoose,stackA,stackB){var objProps=keys(object),objLength=objProps.length,othProps=keys(other),othLength=othProps.length;if(objLength!=othLength&&!isLoose)return!1;for(var index=objLength;index--;){var key=objProps[index];if(!(isLoose?key in other:hasOwnProperty.call(other,key)))return!1}for(var skipCtor=isLoose;++index<objLength;){key=objProps[index];var objValue=object[key],othValue=other[key],result=customizer?customizer(isLoose?othValue:objValue,isLoose?objValue:othValue,key):void 0;if(!(void 0===result?equalFunc(objValue,othValue,customizer,isLoose,stackA,stackB):result))return!1;skipCtor||(skipCtor="constructor"==key)}if(!skipCtor){var objCtor=object.constructor,othCtor=other.constructor;if(objCtor!=othCtor&&"constructor"in object&&"constructor"in other&&!("function"==typeof objCtor&&objCtor instanceof objCtor&&"function"==typeof othCtor&&othCtor instanceof othCtor))return!1}return!0}function isObject(value){var type=typeof value;return!!value&&("object"==type||"function"==type)}var isArray=require("lodash.isarray"),isTypedArray=require("lodash.istypedarray"),keys=require("lodash.keys"),argsTag="[object Arguments]",arrayTag="[object Array]",boolTag="[object Boolean]",dateTag="[object Date]",errorTag="[object Error]",numberTag="[object Number]",objectTag="[object Object]",regexpTag="[object RegExp]",stringTag="[object String]",objectProto=Object.prototype,hasOwnProperty=objectProto.hasOwnProperty,objToString=objectProto.toString;module.exports=baseIsEqual},{"lodash.isarray":59,"lodash.istypedarray":64,"lodash.keys":68}],64:[function(require,module){function isObjectLike(value){return!!value&&"object"==typeof value}function isLength(value){return"number"==typeof value&&value>-1&&value%1==0&&MAX_SAFE_INTEGER>=value}function isTypedArray(value){return isObjectLike(value)&&isLength(value.length)&&!!typedArrayTags[objToString.call(value)]}var argsTag="[object Arguments]",arrayTag="[object Array]",boolTag="[object Boolean]",dateTag="[object Date]",errorTag="[object Error]",funcTag="[object Function]",mapTag="[object Map]",numberTag="[object Number]",objectTag="[object Object]",regexpTag="[object RegExp]",setTag="[object Set]",stringTag="[object String]",weakMapTag="[object WeakMap]",arrayBufferTag="[object ArrayBuffer]",float32Tag="[object Float32Array]",float64Tag="[object Float64Array]",int8Tag="[object Int8Array]",int16Tag="[object Int16Array]",int32Tag="[object Int32Array]",uint8Tag="[object Uint8Array]",uint8ClampedTag="[object Uint8ClampedArray]",uint16Tag="[object Uint16Array]",uint32Tag="[object Uint32Array]",typedArrayTags={};typedArrayTags[float32Tag]=typedArrayTags[float64Tag]=typedArrayTags[int8Tag]=typedArrayTags[int16Tag]=typedArrayTags[int32Tag]=typedArrayTags[uint8Tag]=typedArrayTags[uint8ClampedTag]=typedArrayTags[uint16Tag]=typedArrayTags[uint32Tag]=!0,typedArrayTags[argsTag]=typedArrayTags[arrayTag]=typedArrayTags[arrayBufferTag]=typedArrayTags[boolTag]=typedArrayTags[dateTag]=typedArrayTags[errorTag]=typedArrayTags[funcTag]=typedArrayTags[mapTag]=typedArrayTags[numberTag]=typedArrayTags[objectTag]=typedArrayTags[regexpTag]=typedArrayTags[setTag]=typedArrayTags[stringTag]=typedArrayTags[weakMapTag]=!1;var objectProto=Object.prototype,objToString=objectProto.toString,MAX_SAFE_INTEGER=9007199254740991;module.exports=isTypedArray},{}],65:[function(require,module,exports){arguments[4][54][0].apply(exports,arguments)},{dup:54}],66:[function(require,module){function toObject(value){return isObject(value)?value:Object(value)}function isObject(value){var type=typeof value;return!!value&&("object"==type||"function"==type)}function pairs(object){object=toObject(object);for(var index=-1,props=keys(object),length=props.length,result=Array(length);++index<length;){var key=props[index];result[index]=[key,object[key]]}return result}var keys=require("lodash.keys");module.exports=pairs},{"lodash.keys":68}],67:[function(require,module,exports){arguments[4][50][0].apply(exports,arguments)},{dup:50,"lodash.keys":68}],68:[function(require,module,exports){arguments[4][51][0].apply(exports,arguments)},{dup:51,"lodash._getnative":69,"lodash.isarguments":70,"lodash.isarray":59}],69:[function(require,module,exports){arguments[4][52][0].apply(exports,arguments)},{dup:52}],70:[function(require,module,exports){arguments[4][53][0].apply(exports,arguments)},{dup:53}],71:[function(require,module,exports){var toSDP=require("./lib/tosdp"),toJSON=require("./lib/tojson");exports.toIncomingSDPOffer=function(session){return toSDP.toSessionSDP(session,{role:"responder",direction:"incoming"})},exports.toOutgoingSDPOffer=function(session){return toSDP.toSessionSDP(session,{role:"initiator",direction:"outgoing"})},exports.toIncomingSDPAnswer=function(session){return toSDP.toSessionSDP(session,{role:"initiator",direction:"incoming"})},exports.toOutgoingSDPAnswer=function(session){return toSDP.toSessionSDP(session,{role:"responder",direction:"outgoing"})},exports.toIncomingMediaSDPOffer=function(media){return toSDP.toMediaSDP(media,{role:"responder",direction:"incoming"})},exports.toOutgoingMediaSDPOffer=function(media){return toSDP.toMediaSDP(media,{role:"initiator",direction:"outgoing"})},exports.toIncomingMediaSDPAnswer=function(media){return toSDP.toMediaSDP(media,{role:"initiator",direction:"incoming"})},exports.toOutgoingMediaSDPAnswer=function(media){return toSDP.toMediaSDP(media,{role:"responder",direction:"outgoing"})},exports.toCandidateSDP=toSDP.toCandidateSDP,exports.toMediaSDP=toSDP.toMediaSDP,exports.toSessionSDP=toSDP.toSessionSDP,exports.toIncomingJSONOffer=function(sdp,creators){return toJSON.toSessionJSON(sdp,{role:"responder",direction:"incoming",creators:creators})},exports.toOutgoingJSONOffer=function(sdp,creators){return toJSON.toSessionJSON(sdp,{role:"initiator",direction:"outgoing",creators:creators})},exports.toIncomingJSONAnswer=function(sdp,creators){return toJSON.toSessionJSON(sdp,{role:"initiator",direction:"incoming",creators:creators})},exports.toOutgoingJSONAnswer=function(sdp,creators){return toJSON.toSessionJSON(sdp,{role:"responder",direction:"outgoing",creators:creators})},exports.toIncomingMediaJSONOffer=function(sdp,creator){return toJSON.toMediaJSON(sdp,{role:"responder",direction:"incoming",creator:creator})},exports.toOutgoingMediaJSONOffer=function(sdp,creator){return toJSON.toMediaJSON(sdp,{role:"initiator",direction:"outgoing",creator:creator})},exports.toIncomingMediaJSONAnswer=function(sdp,creator){return toJSON.toMediaJSON(sdp,{role:"initiator",direction:"incoming",creator:creator})},exports.toOutgoingMediaJSONAnswer=function(sdp,creator){return toJSON.toMediaJSON(sdp,{role:"responder",direction:"outgoing",creator:creator})},exports.toCandidateJSON=toJSON.toCandidateJSON,exports.toMediaJSON=toJSON.toMediaJSON,exports.toSessionJSON=toJSON.toSessionJSON},{"./lib/tojson":74,"./lib/tosdp":75}],72:[function(require,module,exports){exports.lines=function(sdp){return sdp.split("\r\n").filter(function(line){return line.length>0})},exports.findLine=function(prefix,mediaLines,sessionLines){for(var prefixLength=prefix.length,i=0;i<mediaLines.length;i++)if(mediaLines[i].substr(0,prefixLength)===prefix)return mediaLines[i];if(!sessionLines)return!1;for(var j=0;j<sessionLines.length;j++)if(sessionLines[j].substr(0,prefixLength)===prefix)return sessionLines[j];return!1},exports.findLines=function(prefix,mediaLines,sessionLines){for(var results=[],prefixLength=prefix.length,i=0;i<mediaLines.length;i++)mediaLines[i].substr(0,prefixLength)===prefix&&results.push(mediaLines[i]);if(results.length||!sessionLines)return results;for(var j=0;j<sessionLines.length;j++)sessionLines[j].substr(0,prefixLength)===prefix&&results.push(sessionLines[j]);return results},exports.mline=function(line){for(var parts=line.substr(2).split(" "),parsed={media:parts[0],port:parts[1],proto:parts[2],formats:[]},i=3;i<parts.length;i++)parts[i]&&parsed.formats.push(parts[i]);return parsed},exports.rtpmap=function(line){var parts=line.substr(9).split(" "),parsed={id:parts.shift()};return parts=parts[0].split("/"),parsed.name=parts[0],parsed.clockrate=parts[1],parsed.channels=3==parts.length?parts[2]:"1",parsed},exports.sctpmap=function(line){var parts=line.substr(10).split(" "),parsed={number:parts.shift(),protocol:parts.shift(),streams:parts.shift()};return parsed},exports.fmtp=function(line){for(var kv,key,value,parts=line.substr(line.indexOf(" ")+1).split(";"),parsed=[],i=0;i<parts.length;i++)kv=parts[i].split("="),key=kv[0].trim(),value=kv[1],key&&value?parsed.push({key:key,value:value}):key&&parsed.push({key:"",value:key});return parsed},exports.crypto=function(line){var parts=line.substr(9).split(" "),parsed={tag:parts[0],cipherSuite:parts[1],keyParams:parts[2],sessionParams:parts.slice(3).join(" ")};return parsed},exports.fingerprint=function(line){var parts=line.substr(14).split(" ");return{hash:parts[0],value:parts[1]}},exports.extmap=function(line){var parts=line.substr(9).split(" "),parsed={},idpart=parts.shift(),sp=idpart.indexOf("/");return sp>=0?(parsed.id=idpart.substr(0,sp),parsed.senders=idpart.substr(sp+1)):(parsed.id=idpart,parsed.senders="sendrecv"),parsed.uri=parts.shift()||"",parsed},exports.rtcpfb=function(line){var parts=line.substr(10).split(" "),parsed={};return parsed.id=parts.shift(),parsed.type=parts.shift(),"trr-int"===parsed.type?parsed.value=parts.shift():parsed.subtype=parts.shift()||"",parsed.parameters=parts,parsed},exports.candidate=function(line){var parts;parts=0===line.indexOf("a=candidate:")?line.substring(12).split(" "):line.substring(10).split(" ");for(var candidate={foundation:parts[0],component:parts[1],protocol:parts[2].toLowerCase(),priority:parts[3],ip:parts[4],port:parts[5],type:parts[7],generation:"0"},i=8;i<parts.length;i+=2)"raddr"===parts[i]?candidate.relAddr=parts[i+1]:"rport"===parts[i]?candidate.relPort=parts[i+1]:"generation"===parts[i]?candidate.generation=parts[i+1]:"tcptype"===parts[i]&&(candidate.tcpType=parts[i+1]);return candidate.network="1",candidate},exports.sourceGroups=function(lines){for(var parsed=[],i=0;i<lines.length;i++){var parts=lines[i].substr(13).split(" ");parsed.push({semantics:parts.shift(),sources:parts})}return parsed},exports.sources=function(lines){for(var parsed=[],sources={},i=0;i<lines.length;i++){var parts=lines[i].substr(7).split(" "),ssrc=parts.shift();if(!sources[ssrc]){var source={ssrc:ssrc,parameters:[]};parsed.push(source),sources[ssrc]=source}parts=parts.join(" ").split(":");var attribute=parts.shift(),value=parts.join(":")||null;sources[ssrc].parameters.push({key:attribute,value:value})}return parsed},exports.groups=function(lines){for(var parts,parsed=[],i=0;i<lines.length;i++)parts=lines[i].substr(8).split(" "),parsed.push({semantics:parts.shift(),contents:parts});return parsed},exports.bandwidth=function(line){var parts=line.substr(2).split(":"),parsed={};return parsed.type=parts.shift(),parsed.bandwidth=parts.shift(),parsed},exports.msid=function(line){var data=line.substr(7),parts=data.split(" ");return{msid:data,mslabel:parts[0],label:parts[1]}}},{}],73:[function(require,module){module.exports={initiator:{incoming:{initiator:"recvonly",responder:"sendonly",both:"sendrecv",none:"inactive",recvonly:"initiator",sendonly:"responder",sendrecv:"both",inactive:"none"},outgoing:{initiator:"sendonly",responder:"recvonly",both:"sendrecv",none:"inactive",recvonly:"responder",sendonly:"initiator",sendrecv:"both",inactive:"none"}},responder:{incoming:{initiator:"sendonly",responder:"recvonly",both:"sendrecv",none:"inactive",recvonly:"responder",sendonly:"initiator",sendrecv:"both",inactive:"none"},outgoing:{initiator:"recvonly",responder:"sendonly",both:"sendrecv",none:"inactive",recvonly:"initiator",sendonly:"responder",sendrecv:"both",inactive:"none"}}}},{}],74:[function(require,module,exports){var SENDERS=require("./senders"),parsers=require("./parsers"),idCounter=Math.random();exports._setIdCounter=function(counter){idCounter=counter},exports.toSessionJSON=function(sdp,opts){var i,creators=opts.creators||[],role=opts.role||"initiator",direction=opts.direction||"outgoing",media=sdp.split("\r\nm=");for(i=1;i<media.length;i++)media[i]="m="+media[i],i!==media.length-1&&(media[i]+="\r\n");var session=media.shift()+"\r\n",sessionLines=parsers.lines(session),parsed={},contents=[];for(i=0;i<media.length;i++)contents.push(exports.toMediaJSON(media[i],session,{role:role,direction:direction,creator:creators[i]||"initiator"}));parsed.contents=contents;var groupLines=parsers.findLines("a=group:",sessionLines);return groupLines.length&&(parsed.groups=parsers.groups(groupLines)),parsed},exports.toMediaJSON=function(media,session,opts){var creator=opts.creator||"initiator",role=opts.role||"initiator",direction=opts.direction||"outgoing",lines=parsers.lines(media),sessionLines=parsers.lines(session),mline=parsers.mline(lines[0]),content={creator:creator,name:mline.media,description:{descType:"rtp",media:mline.media,payloads:[],encryption:[],feedback:[],headerExtensions:[]},transport:{transType:"iceUdp",candidates:[],fingerprints:[]}};"application"==mline.media&&(content.description={descType:"datachannel"},content.transport.sctp=[]);var desc=content.description,trans=content.transport,mid=parsers.findLine("a=mid:",lines);if(mid&&(content.name=mid.substr(6)),parsers.findLine("a=sendrecv",lines,sessionLines)?content.senders="both":parsers.findLine("a=sendonly",lines,sessionLines)?content.senders=SENDERS[role][direction].sendonly:parsers.findLine("a=recvonly",lines,sessionLines)?content.senders=SENDERS[role][direction].recvonly:parsers.findLine("a=inactive",lines,sessionLines)&&(content.senders="none"),"rtp"==desc.descType){var bandwidth=parsers.findLine("b=",lines);bandwidth&&(desc.bandwidth=parsers.bandwidth(bandwidth));var ssrc=parsers.findLine("a=ssrc:",lines);ssrc&&(desc.ssrc=ssrc.substr(7).split(" ")[0]);var rtpmapLines=parsers.findLines("a=rtpmap:",lines);rtpmapLines.forEach(function(line){var payload=parsers.rtpmap(line);payload.parameters=[],payload.feedback=[];var fmtpLines=parsers.findLines("a=fmtp:"+payload.id,lines);fmtpLines.forEach(function(line){payload.parameters=parsers.fmtp(line)});var fbLines=parsers.findLines("a=rtcp-fb:"+payload.id,lines);fbLines.forEach(function(line){payload.feedback.push(parsers.rtcpfb(line))}),desc.payloads.push(payload)});var cryptoLines=parsers.findLines("a=crypto:",lines,sessionLines);cryptoLines.forEach(function(line){desc.encryption.push(parsers.crypto(line))}),parsers.findLine("a=rtcp-mux",lines)&&(desc.mux=!0);var fbLines=parsers.findLines("a=rtcp-fb:*",lines);fbLines.forEach(function(line){desc.feedback.push(parsers.rtcpfb(line))});var extLines=parsers.findLines("a=extmap:",lines);extLines.forEach(function(line){var ext=parsers.extmap(line);ext.senders=SENDERS[role][direction][ext.senders],desc.headerExtensions.push(ext)});var ssrcGroupLines=parsers.findLines("a=ssrc-group:",lines);desc.sourceGroups=parsers.sourceGroups(ssrcGroupLines||[]);var ssrcLines=parsers.findLines("a=ssrc:",lines),sources=desc.sources=parsers.sources(ssrcLines||[]),msidLine=parsers.findLine("a=msid:",lines);if(msidLine){var msid=parsers.msid(msidLine);["msid","mslabel","label"].forEach(function(key){for(var i=0;i<sources.length;i++){for(var found=!1,j=0;j<sources[i].parameters.length;j++)sources[i].parameters[j].key===key&&(found=!0);found||sources[i].parameters.push({key:key,value:msid[key]})}})}parsers.findLine("a=x-google-flag:conference",lines,sessionLines)&&(desc.googConferenceFlag=!0)}var fingerprintLines=parsers.findLines("a=fingerprint:",lines,sessionLines),setup=parsers.findLine("a=setup:",lines,sessionLines);fingerprintLines.forEach(function(line){var fp=parsers.fingerprint(line);setup&&(fp.setup=setup.substr(8)),trans.fingerprints.push(fp)});var ufragLine=parsers.findLine("a=ice-ufrag:",lines,sessionLines),pwdLine=parsers.findLine("a=ice-pwd:",lines,sessionLines);if(ufragLine&&pwdLine){trans.ufrag=ufragLine.substr(12),trans.pwd=pwdLine.substr(10),trans.candidates=[];var candidateLines=parsers.findLines("a=candidate:",lines,sessionLines);candidateLines.forEach(function(line){trans.candidates.push(exports.toCandidateJSON(line))})}if("datachannel"==desc.descType){var sctpmapLines=parsers.findLines("a=sctpmap:",lines);sctpmapLines.forEach(function(line){var sctp=parsers.sctpmap(line);trans.sctp.push(sctp)})}return content},exports.toCandidateJSON=function(line){var candidate=parsers.candidate(line.split("\r\n")[0]);return candidate.id=(idCounter++).toString(36).substr(0,12),candidate}},{"./parsers":72,"./senders":73}],75:[function(require,module,exports){var SENDERS=require("./senders");exports.toSessionSDP=function(session,opts){var sid=(opts.role||"initiator",opts.direction||"outgoing",opts.sid||session.sid||Date.now()),time=opts.time||Date.now(),sdp=["v=0","o=- "+sid+" "+time+" IN IP4 0.0.0.0","s=-","t=0 0"],groups=session.groups||[];groups.forEach(function(group){sdp.push("a=group:"+group.semantics+" "+group.contents.join(" "))});var contents=session.contents||[];return contents.forEach(function(content){sdp.push(exports.toMediaSDP(content,opts))}),sdp.join("\r\n")+"\r\n"},exports.toMediaSDP=function(content,opts){var sdp=[],role=opts.role||"initiator",direction=opts.direction||"outgoing",desc=content.description,transport=content.transport,payloads=desc.payloads||[],fingerprints=transport&&transport.fingerprints||[],mline=[];if("datachannel"==desc.descType?(mline.push("application"),mline.push("1"),mline.push("DTLS/SCTP"),transport.sctp&&transport.sctp.forEach(function(map){mline.push(map.number)})):(mline.push(desc.media),mline.push("1"),mline.push(desc.encryption&&desc.encryption.length>0||fingerprints.length>0?"RTP/SAVPF":"RTP/AVPF"),payloads.forEach(function(payload){mline.push(payload.id)})),sdp.push("m="+mline.join(" ")),sdp.push("c=IN IP4 0.0.0.0"),desc.bandwidth&&desc.bandwidth.type&&desc.bandwidth.bandwidth&&sdp.push("b="+desc.bandwidth.type+":"+desc.bandwidth.bandwidth),"rtp"==desc.descType&&sdp.push("a=rtcp:1 IN IP4 0.0.0.0"),transport){transport.ufrag&&sdp.push("a=ice-ufrag:"+transport.ufrag),transport.pwd&&sdp.push("a=ice-pwd:"+transport.pwd);var pushedSetup=!1;fingerprints.forEach(function(fingerprint){sdp.push("a=fingerprint:"+fingerprint.hash+" "+fingerprint.value),fingerprint.setup&&!pushedSetup&&sdp.push("a=setup:"+fingerprint.setup)}),transport.sctp&&transport.sctp.forEach(function(map){sdp.push("a=sctpmap:"+map.number+" "+map.protocol+" "+map.streams)})}"rtp"==desc.descType&&sdp.push("a="+(SENDERS[role][direction][content.senders]||"sendrecv")),sdp.push("a=mid:"+content.name),desc.sources&&desc.sources.length&&(desc.sources[0].parameters||[]).forEach(function(param){"msid"===param.key&&sdp.push("a=msid:"+param.value)}),desc.mux&&sdp.push("a=rtcp-mux");var encryption=desc.encryption||[];encryption.forEach(function(crypto){sdp.push("a=crypto:"+crypto.tag+" "+crypto.cipherSuite+" "+crypto.keyParams+(crypto.sessionParams?" "+crypto.sessionParams:""))}),desc.googConferenceFlag&&sdp.push("a=x-google-flag:conference"),payloads.forEach(function(payload){var rtpmap="a=rtpmap:"+payload.id+" "+payload.name+"/"+payload.clockrate;if(payload.channels&&"1"!=payload.channels&&(rtpmap+="/"+payload.channels),sdp.push(rtpmap),payload.parameters&&payload.parameters.length){var fmtp=["a=fmtp:"+payload.id],parameters=[];payload.parameters.forEach(function(param){parameters.push((param.key?param.key+"=":"")+param.value)}),fmtp.push(parameters.join(";")),sdp.push(fmtp.join(" "))}payload.feedback&&payload.feedback.forEach(function(fb){sdp.push("trr-int"===fb.type?"a=rtcp-fb:"+payload.id+" trr-int "+(fb.value?fb.value:"0"):"a=rtcp-fb:"+payload.id+" "+fb.type+(fb.subtype?" "+fb.subtype:""))})}),desc.feedback&&desc.feedback.forEach(function(fb){sdp.push("trr-int"===fb.type?"a=rtcp-fb:* trr-int "+(fb.value?fb.value:"0"):"a=rtcp-fb:* "+fb.type+(fb.subtype?" "+fb.subtype:""))});var hdrExts=desc.headerExtensions||[];hdrExts.forEach(function(hdr){sdp.push("a=extmap:"+hdr.id+(hdr.senders?"/"+SENDERS[role][direction][hdr.senders]:"")+" "+hdr.uri)});var ssrcGroups=desc.sourceGroups||[];ssrcGroups.forEach(function(ssrcGroup){sdp.push("a=ssrc-group:"+ssrcGroup.semantics+" "+ssrcGroup.sources.join(" "))});var ssrcs=desc.sources||[];ssrcs.forEach(function(ssrc){for(var i=0;i<ssrc.parameters.length;i++){var param=ssrc.parameters[i];sdp.push("a=ssrc:"+(ssrc.ssrc||desc.ssrc)+" "+param.key+(param.value?":"+param.value:""))}});var candidates=transport.candidates||[];return candidates.forEach(function(candidate){sdp.push(exports.toCandidateSDP(candidate))}),sdp.join("\r\n")},exports.toCandidateSDP=function(candidate){var sdp=[];sdp.push(candidate.foundation),sdp.push(candidate.component),sdp.push(candidate.protocol.toUpperCase()),sdp.push(candidate.priority),sdp.push(candidate.ip),sdp.push(candidate.port);var type=candidate.type;return sdp.push("typ"),sdp.push(type),("srflx"===type||"prflx"===type||"relay"===type)&&candidate.relAddr&&candidate.relPort&&(sdp.push("raddr"),sdp.push(candidate.relAddr),sdp.push("rport"),sdp.push(candidate.relPort)),candidate.tcpType&&"TCP"==candidate.protocol.toUpperCase()&&(sdp.push("tcptype"),sdp.push(candidate.tcpType)),sdp.push("generation"),sdp.push(candidate.generation||"0"),"a=candidate:"+sdp.join(" ")}},{"./senders":73}],76:[function(require,module){function dumpSDP(description){return{type:description.type,sdp:description.sdp}}function dumpStream(stream){var info={label:stream.id};return stream.getAudioTracks().length&&(info.audio=stream.getAudioTracks().map(function(track){return track.id})),stream.getVideoTracks().length&&(info.video=stream.getVideoTracks().map(function(track){return track.id})),info}function TraceablePeerConnection(config,constraints){var self=this;WildEmitter.call(this),this.peerconnection=new webrtc.PeerConnection(config,constraints),this.trace=function(what,info){self.emit("PeerConnectionTrace",{time:new Date,type:what,value:info||""})},this.onicecandidate=null,this.peerconnection.onicecandidate=function(event){self.trace("onicecandidate",event.candidate),null!==self.onicecandidate&&self.onicecandidate(event)},this.onaddstream=null,this.peerconnection.onaddstream=function(event){self.trace("onaddstream",dumpStream(event.stream)),null!==self.onaddstream&&self.onaddstream(event)},this.onremovestream=null,this.peerconnection.onremovestream=function(event){self.trace("onremovestream",dumpStream(event.stream)),null!==self.onremovestream&&self.onremovestream(event)},this.onsignalingstatechange=null,this.peerconnection.onsignalingstatechange=function(event){self.trace("onsignalingstatechange",self.signalingState),null!==self.onsignalingstatechange&&self.onsignalingstatechange(event)},this.oniceconnectionstatechange=null,this.peerconnection.oniceconnectionstatechange=function(event){self.trace("oniceconnectionstatechange",self.iceConnectionState),null!==self.oniceconnectionstatechange&&self.oniceconnectionstatechange(event)},this.onnegotiationneeded=null,this.peerconnection.onnegotiationneeded=function(event){self.trace("onnegotiationneeded"),null!==self.onnegotiationneeded&&self.onnegotiationneeded(event)},self.ondatachannel=null,this.peerconnection.ondatachannel=function(event){self.trace("ondatachannel",event),null!==self.ondatachannel&&self.ondatachannel(event)},this.getLocalStreams=this.peerconnection.getLocalStreams.bind(this.peerconnection),this.getRemoteStreams=this.peerconnection.getRemoteStreams.bind(this.peerconnection)}var util=require("util"),webrtc=require("webrtcsupport"),WildEmitter=require("wildemitter");util.inherits(TraceablePeerConnection,WildEmitter),Object.defineProperty(TraceablePeerConnection.prototype,"signalingState",{get:function(){return this.peerconnection.signalingState}}),Object.defineProperty(TraceablePeerConnection.prototype,"iceConnectionState",{get:function(){return this.peerconnection.iceConnectionState}}),Object.defineProperty(TraceablePeerConnection.prototype,"localDescription",{get:function(){return this.peerconnection.localDescription}}),Object.defineProperty(TraceablePeerConnection.prototype,"remoteDescription",{get:function(){return this.peerconnection.remoteDescription}}),TraceablePeerConnection.prototype.addStream=function(stream){this.trace("addStream",dumpStream(stream)),this.peerconnection.addStream(stream)},TraceablePeerConnection.prototype.removeStream=function(stream){this.trace("removeStream",dumpStream(stream)),this.peerconnection.removeStream(stream)},TraceablePeerConnection.prototype.createDataChannel=function(label,opts){return this.trace("createDataChannel",label,opts),this.peerconnection.createDataChannel(label,opts)},TraceablePeerConnection.prototype.setLocalDescription=function(description,successCallback,failureCallback){var self=this;this.trace("setLocalDescription",dumpSDP(description)),this.peerconnection.setLocalDescription(description,function(){self.trace("setLocalDescriptionOnSuccess"),successCallback()},function(err){self.trace("setLocalDescriptionOnFailure",err),failureCallback(err)})},TraceablePeerConnection.prototype.setRemoteDescription=function(description,successCallback,failureCallback){var self=this;this.trace("setRemoteDescription",dumpSDP(description)),this.peerconnection.setRemoteDescription(description,function(){self.trace("setRemoteDescriptionOnSuccess"),successCallback()},function(err){self.trace("setRemoteDescriptionOnFailure",err),failureCallback(err)})},TraceablePeerConnection.prototype.close=function(){this.trace("stop"),null!==this.statsinterval&&(window.clearInterval(this.statsinterval),this.statsinterval=null),"closed"!=this.peerconnection.signalingState&&this.peerconnection.close()},TraceablePeerConnection.prototype.createOffer=function(successCallback,failureCallback,constraints){var self=this;this.trace("createOffer",constraints),this.peerconnection.createOffer(function(offer){self.trace("createOfferOnSuccess",dumpSDP(offer)),successCallback(offer)},function(err){self.trace("createOfferOnFailure",err),failureCallback(err)},constraints)},TraceablePeerConnection.prototype.createAnswer=function(successCallback,failureCallback,constraints){var self=this;this.trace("createAnswer",constraints),this.peerconnection.createAnswer(function(answer){self.trace("createAnswerOnSuccess",dumpSDP(answer)),successCallback(answer)},function(err){self.trace("createAnswerOnFailure",err),failureCallback(err)},constraints)},TraceablePeerConnection.prototype.addIceCandidate=function(candidate,successCallback,failureCallback){var self=this;this.trace("addIceCandidate",candidate),this.peerconnection.addIceCandidate(candidate,function(){successCallback&&successCallback()},function(err){self.trace("addIceCandidateOnFailure",err),failureCallback&&failureCallback(err)})},TraceablePeerConnection.prototype.getStats=function(callback,errback){navigator.mozGetUserMedia?this.peerconnection.getStats(null,callback,errback):this.peerconnection.getStats(callback)},module.exports=TraceablePeerConnection},{util:24,webrtcsupport:112,wildemitter:113}],77:[function(require,module){function PeerConnection(config,constraints){var item,self=this;WildEmitter.call(this),config=config||{},config.iceServers=config.iceServers||[],this.enableChromeNativeSimulcast=!1,constraints&&constraints.optional&&"webkit"===webrtc.prefix&&null===navigator.appVersion.match(/Chromium\//)&&constraints.optional.forEach(function(constraint){constraint.enableChromeNativeSimulcast&&(self.enableChromeNativeSimulcast=!0)}),this.enableMultiStreamHacks=!1,constraints&&constraints.optional&&"webkit"===webrtc.prefix&&constraints.optional.forEach(function(constraint){constraint.enableMultiStreamHacks&&(self.enableMultiStreamHacks=!0)}),this.restrictBandwidth=0,constraints&&constraints.optional&&constraints.optional.forEach(function(constraint){constraint.andyetRestrictBandwidth&&(self.restrictBandwidth=constraint.andyetRestrictBandwidth)}),this.batchIceCandidates=0,constraints&&constraints.optional&&constraints.optional.forEach(function(constraint){constraint.andyetBatchIce&&(self.batchIceCandidates=constraint.andyetBatchIce)}),this.batchedIceCandidates=[],constraints&&constraints.optional&&"webkit"===webrtc.prefix&&constraints.optional.forEach(function(constraint){constraint.andyetFasterICE&&(self.eliminateDuplicateCandidates=constraint.andyetFasterICE)}),constraints&&constraints.optional&&constraints.optional.forEach(function(constraint){constraint.andyetDontSignalCandidates&&(self.dontSignalCandidates=constraint.andyetDontSignalCandidates)}),this.assumeSetLocalSuccess=!1,constraints&&constraints.optional&&constraints.optional.forEach(function(constraint){constraint.andyetAssumeSetLocalSuccess&&(self.assumeSetLocalSuccess=constraint.andyetAssumeSetLocalSuccess)}),"moz"===webrtc.prefix&&constraints&&constraints.optional&&(this.wtFirefox=0,constraints.optional.forEach(function(constraint){constraint.andyetFirefoxMakesMeSad&&(self.wtFirefox=constraint.andyetFirefoxMakesMeSad,self.wtFirefox>0&&(self.firefoxcandidatebuffer=[]))})),this.pc=new peerconn(config,constraints),this.getLocalStreams=this.pc.getLocalStreams.bind(this.pc),this.getRemoteStreams=this.pc.getRemoteStreams.bind(this.pc),this.addStream=this.pc.addStream.bind(this.pc),this.removeStream=this.pc.removeStream.bind(this.pc),this.pc.on("*",function(){self.emit.apply(self,arguments)}),this.pc.onremovestream=this.emit.bind(this,"removeStream"),this.pc.onaddstream=this.emit.bind(this,"addStream"),this.pc.onnegotiationneeded=this.emit.bind(this,"negotiationNeeded"),this.pc.oniceconnectionstatechange=this.emit.bind(this,"iceConnectionStateChange"),this.pc.onsignalingstatechange=this.emit.bind(this,"signalingStateChange"),this.pc.onicecandidate=this._onIce.bind(this),this.pc.ondatachannel=this._onDataChannel.bind(this),this.localDescription={contents:[]},this.remoteDescription={contents:[]},this.config={debug:!1,ice:{},sid:"",isInitiator:!0,sdpSessionID:Date.now(),useJingle:!1};for(item in config)this.config[item]=config[item];this.config.debug&&this.on("*",function(){var logger=config.logger||console;
+logger.log("PeerConnection event:",arguments)}),this.hadLocalStunCandidate=!1,this.hadRemoteStunCandidate=!1,this.hadLocalRelayCandidate=!1,this.hadRemoteRelayCandidate=!1,this.hadLocalIPv6Candidate=!1,this.hadRemoteIPv6Candidate=!1,this._remoteDataChannels=[],this._localDataChannels=[],this._candidateBuffer=[]}var util=require("util"),each=require("lodash.foreach"),pluck=require("lodash.pluck"),webrtc=require("webrtcsupport"),SJJ=require("sdp-jingle-json"),WildEmitter=require("wildemitter"),peerconn=require("traceablepeerconnection");util.inherits(PeerConnection,WildEmitter),Object.defineProperty(PeerConnection.prototype,"signalingState",{get:function(){return this.pc.signalingState}}),Object.defineProperty(PeerConnection.prototype,"iceConnectionState",{get:function(){return this.pc.iceConnectionState}}),PeerConnection.prototype._role=function(){return this.isInitiator?"initiator":"responder"},PeerConnection.prototype.addStream=function(stream){this.localStream=stream,this.pc.addStream(stream)},PeerConnection.prototype._checkLocalCandidate=function(candidate){var cand=SJJ.toCandidateJSON(candidate);"srflx"==cand.type?this.hadLocalStunCandidate=!0:"relay"==cand.type&&(this.hadLocalRelayCandidate=!0),-1!=cand.ip.indexOf(":")&&(this.hadLocalIPv6Candidate=!0)},PeerConnection.prototype._checkRemoteCandidate=function(candidate){var cand=SJJ.toCandidateJSON(candidate);"srflx"==cand.type?this.hadRemoteStunCandidate=!0:"relay"==cand.type&&(this.hadRemoteRelayCandidate=!0),-1!=cand.ip.indexOf(":")&&(this.hadRemoteIPv6Candidate=!0)},PeerConnection.prototype.processIce=function(update,cb){cb=cb||function(){};var self=this;if("closed"===this.pc.signalingState)return cb();if(update.contents||update.jingle&&update.jingle.contents){var contentNames=pluck(this.remoteDescription.contents,"name"),contents=update.contents||update.jingle.contents;contents.forEach(function(content){var transport=content.transport||{},candidates=transport.candidates||[],mline=contentNames.indexOf(content.name),mid=content.name;candidates.forEach(function(candidate){var iceCandidate=SJJ.toCandidateSDP(candidate)+"\r\n";self.pc.addIceCandidate(new webrtc.IceCandidate({candidate:iceCandidate,sdpMLineIndex:mline,sdpMid:mid}),function(){},function(err){self.emit("error",err)}),self._checkRemoteCandidate(iceCandidate)})})}else{if(update.candidate&&0!==update.candidate.candidate.indexOf("a=")&&(update.candidate.candidate="a="+update.candidate.candidate),this.wtFirefox&&null!==this.firefoxcandidatebuffer&&this.pc.localDescription&&"offer"===this.pc.localDescription.type)return this.firefoxcandidatebuffer.push(update.candidate),cb();self.pc.addIceCandidate(new webrtc.IceCandidate(update.candidate),function(){},function(err){self.emit("error",err)}),self._checkRemoteCandidate(update.candidate.candidate)}cb()},PeerConnection.prototype.offer=function(constraints,cb){var self=this,hasConstraints=2===arguments.length,mediaConstraints=hasConstraints&&constraints?constraints:{mandatory:{OfferToReceiveAudio:!0,OfferToReceiveVideo:!0}};return cb=hasConstraints?cb:constraints,cb=cb||function(){},"closed"===this.pc.signalingState?cb("Already closed"):void this.pc.createOffer(function(offer){var expandedOffer={type:"offer",sdp:offer.sdp};self.assumeSetLocalSuccess&&(self.emit("offer",expandedOffer),cb(null,expandedOffer)),self._candidateBuffer=[],self.pc.setLocalDescription(offer,function(){var jingle;self.config.useJingle&&(jingle=SJJ.toSessionJSON(offer.sdp,{role:self._role(),direction:"outgoing"}),jingle.sid=self.config.sid,self.localDescription=jingle,each(jingle.contents,function(content){var transport=content.transport||{};transport.ufrag&&(self.config.ice[content.name]={ufrag:transport.ufrag,pwd:transport.pwd})}),expandedOffer.jingle=jingle),expandedOffer.sdp.split("\r\n").forEach(function(line){0===line.indexOf("a=candidate:")&&self._checkLocalCandidate(line)}),self.assumeSetLocalSuccess||(self.emit("offer",expandedOffer),cb(null,expandedOffer))},function(err){self.emit("error",err),cb(err)})},function(err){self.emit("error",err),cb(err)},mediaConstraints)},PeerConnection.prototype.handleOffer=function(offer,cb){cb=cb||function(){};var self=this;if(offer.type="offer",offer.jingle){if(this.enableChromeNativeSimulcast&&offer.jingle.contents.forEach(function(content){"video"===content.name&&(content.description.googConferenceFlag=!0)}),this.enableMultiStreamHacks&&offer.jingle.contents.forEach(function(content){if("video"===content.name){var sources=content.description.sources||[];(0===sources.length||"3735928559"!==sources[0].ssrc)&&(sources.unshift({ssrc:"3735928559",parameters:[{key:"cname",value:"deadbeef"},{key:"msid",value:"mixyourfecintothis please"}]}),content.description.sources=sources)}}),self.restrictBandwidth>0&&offer.jingle.contents.length>=2&&"video"===offer.jingle.contents[1].name){var content=offer.jingle.contents[1],hasBw=content.description&&content.description.bandwidth;hasBw||(offer.jingle.contents[1].description.bandwidth={type:"AS",bandwidth:self.restrictBandwidth.toString()},offer.sdp=SJJ.toSessionSDP(offer.jingle,{sid:self.config.sdpSessionID,role:self._role(),direction:"outgoing"}))}offer.sdp=SJJ.toSessionSDP(offer.jingle,{sid:self.config.sdpSessionID,role:self._role(),direction:"incoming"}),self.remoteDescription=offer.jingle}offer.sdp.split("\r\n").forEach(function(line){0===line.indexOf("a=candidate:")&&self._checkRemoteCandidate(line)}),self.pc.setRemoteDescription(new webrtc.SessionDescription(offer),function(){cb()},cb)},PeerConnection.prototype.answerAudioOnly=function(cb){var mediaConstraints={mandatory:{OfferToReceiveAudio:!0,OfferToReceiveVideo:!1}};this._answer(mediaConstraints,cb)},PeerConnection.prototype.answerBroadcastOnly=function(cb){var mediaConstraints={mandatory:{OfferToReceiveAudio:!1,OfferToReceiveVideo:!1}};this._answer(mediaConstraints,cb)},PeerConnection.prototype.answer=function(constraints,cb){var hasConstraints=2===arguments.length,callback=hasConstraints?cb:constraints,mediaConstraints=hasConstraints&&constraints?constraints:{mandatory:{OfferToReceiveAudio:!0,OfferToReceiveVideo:!0}};this._answer(mediaConstraints,callback)},PeerConnection.prototype.handleAnswer=function(answer,cb){cb=cb||function(){};var self=this;answer.jingle&&(answer.sdp=SJJ.toSessionSDP(answer.jingle,{sid:self.config.sdpSessionID,role:self._role(),direction:"incoming"}),self.remoteDescription=answer.jingle),answer.sdp.split("\r\n").forEach(function(line){0===line.indexOf("a=candidate:")&&self._checkRemoteCandidate(line)}),self.pc.setRemoteDescription(new webrtc.SessionDescription(answer),function(){self.wtFirefox&&window.setTimeout(function(){self.firefoxcandidatebuffer.forEach(function(candidate){self.pc.addIceCandidate(new webrtc.IceCandidate(candidate),function(){},function(err){self.emit("error",err)}),self._checkRemoteCandidate(candidate.candidate)}),self.firefoxcandidatebuffer=null},self.wtFirefox),cb(null)},cb)},PeerConnection.prototype.close=function(){this.pc.close(),this._localDataChannels=[],this._remoteDataChannels=[],this.emit("close")},PeerConnection.prototype._answer=function(constraints,cb){cb=cb||function(){};var self=this;if(!this.pc.remoteDescription)throw new Error("remoteDescription not set");return"closed"===this.pc.signalingState?cb("Already closed"):void self.pc.createAnswer(function(answer){var sim=[];if(self.enableChromeNativeSimulcast&&(answer.jingle=SJJ.toSessionJSON(answer.sdp,{role:self._role(),direction:"outgoing"}),answer.jingle.contents.length>=2&&"video"===answer.jingle.contents[1].name)){var groups=answer.jingle.contents[1].description.sourceGroups||[],hasSim=!1;if(groups.forEach(function(group){"SIM"==group.semantics&&(hasSim=!0)}),!hasSim&&answer.jingle.contents[1].description.sources.length){var newssrc=JSON.parse(JSON.stringify(answer.jingle.contents[1].description.sources[0]));newssrc.ssrc=""+Math.floor(4294967295*Math.random()),answer.jingle.contents[1].description.sources.push(newssrc),sim.push(answer.jingle.contents[1].description.sources[0].ssrc),sim.push(newssrc.ssrc),groups.push({semantics:"SIM",sources:sim});var rtxssrc=JSON.parse(JSON.stringify(newssrc));rtxssrc.ssrc=""+Math.floor(4294967295*Math.random()),answer.jingle.contents[1].description.sources.push(rtxssrc),groups.push({semantics:"FID",sources:[newssrc.ssrc,rtxssrc.ssrc]}),answer.jingle.contents[1].description.sourceGroups=groups,answer.sdp=SJJ.toSessionSDP(answer.jingle,{sid:self.config.sdpSessionID,role:self._role(),direction:"outgoing"})}}var expandedAnswer={type:"answer",sdp:answer.sdp};self.assumeSetLocalSuccess&&(self.emit("answer",expandedAnswer),cb(null,expandedAnswer)),self._candidateBuffer=[],self.pc.setLocalDescription(answer,function(){if(self.config.useJingle){var jingle=SJJ.toSessionJSON(answer.sdp,{role:self._role(),direction:"outgoing"});jingle.sid=self.config.sid,self.localDescription=jingle,expandedAnswer.jingle=jingle}if(self.enableChromeNativeSimulcast){expandedAnswer.jingle||(expandedAnswer.jingle=SJJ.toSessionJSON(answer.sdp,{role:self._role(),direction:"outgoing"}));{expandedAnswer.jingle.contents[1].description.sourceGroups||[]}expandedAnswer.jingle.contents[1].description.sources.forEach(function(source,idx){source.parameters=source.parameters.map(function(parameter){return"msid"===parameter.key&&(parameter.value+="-"+Math.floor(idx/2)),parameter})}),expandedAnswer.sdp=SJJ.toSessionSDP(expandedAnswer.jingle,{sid:self.sdpSessionID,role:self._role(),direction:"outgoing"})}expandedAnswer.sdp.split("\r\n").forEach(function(line){0===line.indexOf("a=candidate:")&&self._checkLocalCandidate(line)}),self.assumeSetLocalSuccess||(self.emit("answer",expandedAnswer),cb(null,expandedAnswer))},function(err){self.emit("error",err),cb(err)})},function(err){self.emit("error",err),cb(err)},constraints)},PeerConnection.prototype._onIce=function(event){var self=this;if(event.candidate){if(this.dontSignalCandidates)return;var ice=event.candidate,expandedCandidate={candidate:{candidate:ice.candidate,sdpMid:ice.sdpMid,sdpMLineIndex:ice.sdpMLineIndex}};this._checkLocalCandidate(ice.candidate);var already,idx,cand=SJJ.toCandidateJSON(ice.candidate);if(this.eliminateDuplicateCandidates&&"relay"===cand.type&&(already=this._candidateBuffer.filter(function(c){return"relay"===c.type}).map(function(c){return c.foundation+":"+c.component}),idx=already.indexOf(cand.foundation+":"+cand.component),idx>-1&&cand.priority>>24>=already[idx].priority>>24))return;if("max-bundle"===this.config.bundlePolicy&&(already=this._candidateBuffer.filter(function(c){return cand.type===c.type}).map(function(cand){return cand.address+":"+cand.port}),idx=already.indexOf(cand.address+":"+cand.port),idx>-1))return;if("require"===this.config.rtcpMuxPolicy&&"2"===cand.component)return;if(this._candidateBuffer.push(cand),self.config.useJingle){if(ice.sdpMid||(ice.sdpMid=self.pc.remoteDescription&&"offer"===self.pc.remoteDescription.type?self.remoteDescription.contents[ice.sdpMLineIndex].name:self.localDescription.contents[ice.sdpMLineIndex].name),!self.config.ice[ice.sdpMid]){var jingle=SJJ.toSessionJSON(self.pc.localDescription.sdp,{role:self._role(),direction:"outgoing"});each(jingle.contents,function(content){var transport=content.transport||{};transport.ufrag&&(self.config.ice[content.name]={ufrag:transport.ufrag,pwd:transport.pwd})})}if(expandedCandidate.jingle={contents:[{name:ice.sdpMid,creator:self._role(),transport:{transType:"iceUdp",ufrag:self.config.ice[ice.sdpMid].ufrag,pwd:self.config.ice[ice.sdpMid].pwd,candidates:[cand]}}]},self.batchIceCandidates>0)return 0===self.batchedIceCandidates.length&&window.setTimeout(function(){var contents={};self.batchedIceCandidates.forEach(function(content){content=content.contents[0],contents[content.name]||(contents[content.name]=content),contents[content.name].transport.candidates.push(content.transport.candidates[0])});var newCand={jingle:{contents:[]}};Object.keys(contents).forEach(function(name){newCand.jingle.contents.push(contents[name])}),self.batchedIceCandidates=[],self.emit("ice",newCand)},self.batchIceCandidates),void self.batchedIceCandidates.push(expandedCandidate.jingle)}this.emit("ice",expandedCandidate)}else this.emit("endOfCandidates")},PeerConnection.prototype._onDataChannel=function(event){var channel=event.channel;this._remoteDataChannels.push(channel),this.emit("addChannel",channel)},PeerConnection.prototype.createDataChannel=function(name,opts){var channel=this.pc.createDataChannel(name,opts);return this._localDataChannels.push(channel),channel},PeerConnection.prototype.getStats=function(cb){"moz"===webrtc.prefix?this.pc.getStats(function(res){var items=[];for(var result in res)"object"==typeof res[result]&&items.push(res[result]);cb(null,items)},cb):this.pc.getStats(function(res){var items=[];res.result().forEach(function(result){var item={};result.names().forEach(function(name){item[name]=result.stat(name)}),item.id=result.id,item.type=result.type,item.timestamp=result.timestamp,items.push(item)}),cb(null,items)})},module.exports=PeerConnection},{"lodash.foreach":48,"lodash.pluck":56,"sdp-jingle-json":71,traceablepeerconnection:76,util:24,webrtcsupport:112,wildemitter:113}],78:[function(require,module){function filterContentSources(content,stream){delete content.transport,delete content.description.payloads,content.description.sources&&(content.description.sources=content.description.sources.filter(function(source){return stream.id===source.parameters[1].value.split(" ")[0]}))}function filterUnusedLabels(content){var sources=content.description.sources||[];sources.forEach(function(source){source.parameters=source.parameters.filter(function(parameter){return!("mslabel"===parameter.key||"label"===parameter.key)})})}function MediaSession(opts){BaseSession.call(this,opts),this.pc=new RTCPeerConnection({iceServers:opts.iceServers||[],useJingle:!0},opts.constraints||{}),this.pc.on("ice",this.onIceCandidate.bind(this)),this.pc.on("iceConnectionStateChange",this.onIceStateChange.bind(this)),this.pc.on("addStream",this.onAddStream.bind(this)),this.pc.on("removeStream",this.onRemoveStream.bind(this)),opts.stream&&this.addStream(opts.stream),this._ringing=!1}var util=require("util"),extend=require("extend-object"),BaseSession=require("jingle-session"),RTCPeerConnection=require("rtcpeerconnection");util.inherits(MediaSession,BaseSession),Object.defineProperties(MediaSession.prototype,{ringing:{get:function(){return this._ringing},set:function(value){value!==this._ringing&&(this._ringing=value,this.emit("change:ringing",value))}},streams:{get:function(){return"closed"!==this.pc.signalingState?this.pc.getRemoteStreams():[]}}}),MediaSession.prototype=extend(MediaSession.prototype,{start:function(constraints,next){var self=this;this.state="pending",next=next||function(){},this.pc.isInitiator=!0,this.pc.offer(constraints,function(err,offer){return err?(self._log("error","Could not create WebRTC offer",err),self.end("failed-application",!0)):(constraints&&constraints.mandatory&&offer.jingle.contents.forEach(function(content){var mediaType=content.description.media;content.description&&"rtp"===content.description.descType&&(constraints.mandatory.OfferToReceiveAudio||"audio"!==mediaType||(content.senders="initiator"),constraints.mandatory.OfferToReceiveVideo||"video"!==mediaType||(content.senders="initiator"))}),offer.jingle.contents.forEach(filterUnusedLabels),self.send("session-initiate",offer.jingle),void next())})},accept:function(next){var self=this;next=next||function(){},this._log("info","Accepted incoming session"),this.state="active",this.pc.answer(function(err,answer){return err?(self._log("error","Could not create WebRTC answer",err),self.end("failed-application")):(answer.jingle.contents.forEach(filterUnusedLabels),self.send("session-accept",answer.jingle),void next())})},end:function(reason,silent){var self=this;this.streams.forEach(function(stream){self.onRemoveStream({stream:stream})}),this.pc.close(),BaseSession.prototype.end.call(this,reason,silent)},ring:function(){this._log("info","Ringing on incoming session"),this.ringing=!0,this.send("session-info",{ringing:!0})},mute:function(creator,name){this._log("info","Muting",name),this.send("session-info",{mute:{creator:creator,name:name}})},unmute:function(creator,name){this._log("info","Unmuting",name),this.send("session-info",{unmute:{creator:creator,name:name}})},hold:function(){this._log("info","Placing on hold"),this.send("session-info",{hold:!0})},resume:function(){this._log("info","Resuming from hold"),this.send("session-info",{active:!0})},addStream:function(stream,renegotiate,cb){var self=this;cb=cb||function(){},this.pc.addStream(stream),renegotiate&&this.pc.handleOffer({type:"offer",jingle:this.pc.remoteDescription},function(err){return err?(self._log("error","Could not create offer for adding new stream"),cb(err)):void self.pc.answer(function(err,answer){return err?(self._log("error","Could not create answer for adding new stream"),cb(err)):(answer.jingle.contents.forEach(function(content){filterContentSources(content,stream)}),self.send("source-add",answer.jingle),void cb())})})},addStream2:function(stream,cb){this.addStream(stream,!0,cb)},removeStream:function(stream,renegotiate,cb){var self=this;if(cb=cb||function(){},!renegotiate)return void this.pc.removeStream(stream);var desc=this.pc.localDescription;desc.contents.forEach(function(content){filterContentSources(content,stream)}),this.send("source-remove",desc),this.pc.removeStream(stream),this.pc.handleOffer({type:"offer",jingle:this.pc.remoteDescription},function(err){return err?(self._log("error","Could not process offer for removing stream"),cb(err)):void self.pc.answer(function(err){return err?(self._log("error","Could not process answer for removing stream"),cb(err)):void cb()})})},removeStream2:function(stream,cb){this.removeStream(stream,!0,cb)},switchStream:function(oldStream,newStream,cb){var self=this;cb=cb||function(){};var desc=this.pc.localDescription;desc.contents.forEach(function(content){delete content.transport,delete content.description.payloads}),this.pc.removeStream(oldStream),this.send("source-remove",desc);var audioTracks=oldStream.getAudioTracks();audioTracks.length&&newStream.addTrack(audioTracks[0]),this.pc.addStream(newStream),this.pc.handleOffer({type:"offer",jingle:this.pc.remoteDescription},function(err){return err?(self._log("error","Could not process offer for switching streams"),cb(err)):void self.pc.answer(function(err,answer){return err?(self._log("error","Could not process answer for switching streams"),cb(err)):(answer.jingle.contents.forEach(function(content){delete content.transport,delete content.description.payloads}),self.send("source-add",answer.jingle),void cb())})})},onIceCandidate:function(candidate){this._log("info","Discovered new ICE candidate",candidate.jingle),this.send("transport-info",candidate.jingle)},onIceStateChange:function(){switch(this.pc.iceConnectionState){case"checking":this.connectionState="connecting";break;case"completed":case"connected":this.connectionState="connected";break;case"disconnected":this.connectionState="stable"===this.pc.signalingState?"interrupted":"disconnected";break;case"failed":this.connectionState="failed",this.end("failed-transport");break;case"closed":this.connectionState="disconnected"}},onAddStream:function(event){this._log("info","Stream added"),this.emit("peerStreamAdded",this,event.stream)},onRemoveStream:function(event){this._log("info","Stream removed"),this.emit("peerStreamRemoved",this,event.stream)},onSessionInitiate:function(changes,cb){var self=this;this._log("info","Initiating incoming session"),this.state="pending",this.pc.isInitiator=!1,this.pc.handleOffer({type:"offer",jingle:changes},function(err){return err?(self._log("error","Could not create WebRTC answer"),cb({condition:"general-error"})):void cb()})},onSessionAccept:function(changes,cb){var self=this;this.state="active",this.pc.handleAnswer({type:"answer",jingle:changes},function(err){return err?(self._log("error","Could not process WebRTC answer"),cb({condition:"general-error"})):(self.emit("accepted",self),void cb())})},onSessionTerminate:function(changes,cb){var self=this;this._log("info","Terminating session"),this.streams.forEach(function(stream){self.onRemoveStream({stream:stream})}),this.pc.close(),BaseSession.prototype.end.call(this,changes.reason,!0),cb()},onSessionInfo:function(info,cb){return info.ringing?(this._log("info","Outgoing session is ringing"),this.ringing=!0,this.emit("ringing",this),cb()):info.hold?(this._log("info","On hold"),this.emit("hold",this),cb()):info.active?(this._log("info","Resuming from hold"),this.emit("resumed",this),cb()):info.mute?(this._log("info","Muting",info.mute),this.emit("mute",this,info.mute),cb()):info.unmute?(this._log("info","Unmuting",info.unmute),this.emit("unmute",this,info.unmute),cb()):void cb()},onTransportInfo:function(changes,cb){this.pc.processIce(changes,function(){cb()})},onSourceAdd:function(changes,cb){var self=this;this._log("info","Adding new stream source");var newDesc=this.pc.remoteDescription;this.pc.remoteDescription.contents.forEach(function(content,idx){var desc=content.description,ssrcs=desc.sources||[],groups=desc.sourceGroups||[];changes.contents.forEach(function(newContent){if(content.name===newContent.name){var newContentDesc=newContent.description,newSSRCs=newContentDesc.sources||[];ssrcs=ssrcs.concat(newSSRCs),newDesc.contents[idx].description.sources=JSON.parse(JSON.stringify(ssrcs));var newGroups=newContentDesc.sourceGroups||[];groups=groups.concat(newGroups),newDesc.contents[idx].description.sourceGroups=JSON.parse(JSON.stringify(groups))}})}),this.pc.handleOffer({type:"offer",jingle:newDesc},function(err){return err?(self._log("error","Error adding new stream source"),cb({condition:"general-error"})):void self.pc.answer(function(err){return err?(self._log("error","Error adding new stream source"),cb({condition:"general-error"})):void cb()})})},onSourceRemove:function(changes,cb){var self=this;this._log("info","Removing stream source");var newDesc=this.pc.remoteDescription;this.pc.remoteDescription.contents.forEach(function(content,idx){var desc=content.description,ssrcs=desc.sources||[],groups=desc.sourceGroups||[];changes.contents.forEach(function(newContent){if(content.name===newContent.name){var found,i,j,k,newContentDesc=newContent.description,newSSRCs=newContentDesc.sources||[],newGroups=newContentDesc.sourceGroups||[];for(i=0;i<newSSRCs.length;i++){for(found=-1,j=0;j<ssrcs.length;j++)if(newSSRCs[i].ssrc===ssrcs[j].ssrc){found=j;break}found>-1&&(ssrcs.splice(found,1),newDesc.contents[idx].description.sources=JSON.parse(JSON.stringify(ssrcs)))}for(i=0;i<newGroups.length;i++){for(found=-1,j=0;i<groups.length;j++)if(newGroups[i].semantics===groups[j].semantics&&newGroups[i].sources.length===groups[j].sources.length){var same=!0;for(k=0;k<newGroups[i].sources.length;k++)if(newGroups[i].sources[k]!==groups[j].sources[k]){same=!1;break}if(same){found=j;break}}found>-1&&(groups.splice(found,1),newDesc.contents[idx].description.sourceGroups=JSON.parse(JSON.stringify(groups)))}}})}),this.pc.handleOffer({type:"offer",jingle:newDesc},function(err){return err?(self._log("error","Error removing stream source"),cb({condition:"general-error"})):void self.pc.answer(function(err){return err?(self._log("error","Error removing stream source"),cb({condition:"general-error"})):void cb()})})}}),module.exports=MediaSession},{"extend-object":27,"jingle-session":109,rtcpeerconnection:108,util:24}],79:[function(require,module,exports){arguments[4][48][0].apply(exports,arguments)},{dup:48,"lodash._arrayeach":80,"lodash._baseeach":81,"lodash._bindcallback":85,"lodash.isarray":86}],80:[function(require,module,exports){arguments[4][49][0].apply(exports,arguments)},{dup:49}],81:[function(require,module,exports){arguments[4][50][0].apply(exports,arguments)},{dup:50,"lodash.keys":82}],82:[function(require,module,exports){arguments[4][51][0].apply(exports,arguments)},{dup:51,"lodash._getnative":83,"lodash.isarguments":84,"lodash.isarray":86}],83:[function(require,module,exports){arguments[4][52][0].apply(exports,arguments)},{dup:52}],84:[function(require,module,exports){arguments[4][53][0].apply(exports,arguments)},{dup:53}],85:[function(require,module,exports){arguments[4][54][0].apply(exports,arguments)},{dup:54}],86:[function(require,module,exports){arguments[4][55][0].apply(exports,arguments)},{dup:55}],87:[function(require,module,exports){arguments[4][56][0].apply(exports,arguments)},{dup:56,"lodash._baseget":88,"lodash._topath":89,"lodash.isarray":90,"lodash.map":91}],88:[function(require,module,exports){arguments[4][57][0].apply(exports,arguments)},{dup:57}],89:[function(require,module,exports){arguments[4][58][0].apply(exports,arguments)},{dup:58,"lodash.isarray":90}],90:[function(require,module,exports){arguments[4][55][0].apply(exports,arguments)},{dup:55}],91:[function(require,module,exports){arguments[4][60][0].apply(exports,arguments)},{dup:60,"lodash._arraymap":92,"lodash._basecallback":93,"lodash._baseeach":98,"lodash.isarray":90}],92:[function(require,module,exports){arguments[4][61][0].apply(exports,arguments)},{dup:61}],93:[function(require,module,exports){arguments[4][62][0].apply(exports,arguments)},{dup:62,"lodash._baseisequal":94,"lodash._bindcallback":96,"lodash.isarray":90,"lodash.pairs":97}],94:[function(require,module,exports){arguments[4][63][0].apply(exports,arguments)},{dup:63,"lodash.isarray":90,"lodash.istypedarray":95,"lodash.keys":99}],95:[function(require,module,exports){arguments[4][64][0].apply(exports,arguments)},{dup:64}],96:[function(require,module,exports){arguments[4][54][0].apply(exports,arguments)},{dup:54}],97:[function(require,module,exports){arguments[4][66][0].apply(exports,arguments)},{dup:66,"lodash.keys":99}],98:[function(require,module,exports){arguments[4][50][0].apply(exports,arguments)},{dup:50,"lodash.keys":99}],99:[function(require,module,exports){arguments[4][51][0].apply(exports,arguments)},{dup:51,"lodash._getnative":100,"lodash.isarguments":101,"lodash.isarray":90}],100:[function(require,module,exports){arguments[4][52][0].apply(exports,arguments)},{dup:52}],101:[function(require,module,exports){arguments[4][53][0].apply(exports,arguments)},{dup:53}],102:[function(require,module,exports){arguments[4][71][0].apply(exports,arguments)},{"./lib/tojson":105,"./lib/tosdp":106,dup:71}],103:[function(require,module,exports){arguments[4][72][0].apply(exports,arguments)},{dup:72}],104:[function(require,module,exports){arguments[4][73][0].apply(exports,arguments)},{dup:73}],105:[function(require,module,exports){arguments[4][74][0].apply(exports,arguments)},{"./parsers":103,"./senders":104,dup:74}],106:[function(require,module,exports){arguments[4][75][0].apply(exports,arguments)},{"./senders":104,dup:75}],107:[function(require,module,exports){arguments[4][76][0].apply(exports,arguments)},{dup:76,util:24,webrtcsupport:112,wildemitter:113}],108:[function(require,module,exports){arguments[4][77][0].apply(exports,arguments)},{dup:77,"lodash.foreach":79,"lodash.pluck":87,"sdp-jingle-json":102,traceablepeerconnection:107,util:24,webrtcsupport:112,wildemitter:113}],109:[function(require,module){function JingleSession(opts){WildEmitter.call(this);var self=this;this.sid=opts.sid||uuid.v4(),this.peer=opts.peer,this.peerID=opts.peerID||this.peer.full||this.peer,this.isInitiator=opts.initiator||!1,this.parent=opts.parent,this.state="starting",this.connectionState="starting",this.pendingDescriptionTypes=opts.descriptionTypes||[],this.pendingAction=!1,this.processingQueue=async.queue(function(task,next){if(self.ended)return next();var action=task.action,changes=task.changes,cb=task.cb;return self._log("debug",action),ACTIONS[action]?void self[ACTIONS[action]](changes,function(err,result){return cb(err,result),next()}):(self._log("error","Invalid action: "+action),cb({condition:"bad-request"}),next())})}var util=require("util"),uuid=require("uuid"),async=require("async"),extend=require("extend-object"),WildEmitter=require("wildemitter"),ACTIONS={"content-accept":"onContentAccept","content-add":"onContentAdd","content-modify":"onConentModify","content-reject":"onContentReject","content-remove":"onContentRemove","description-info":"onDescriptionInfo","security-info":"onSecurityInfo","session-accept":"onSessionAccept","session-info":"onSessionInfo","session-initiate":"onSessionInitiate","session-terminate":"onSessionTerminate","transport-accept":"onTransportAccept","transport-info":"onTransportInfo","transport-reject":"onTransportReject","transport-replace":"onTransportReplace","source-add":"onSourceAdd","source-remove":"onSourceRemove"};util.inherits(JingleSession,WildEmitter),Object.keys(ACTIONS).forEach(function(action){var method=ACTIONS[action];JingleSession.prototype[method]=function(changes,cb){this._log("error","Unsupported action: "+action),cb()}}),Object.defineProperties(JingleSession.prototype,{state:{get:function(){return this._sessionState},set:function(value){if(value!==this._sessionState){var prev=this._sessionState;this._log("info","Changing session state to: "+value),this._sessionState=value,this.emit("change:sessionState",this,value),this.emit("change:"+value,this,!0),prev&&this.emit("change:"+prev,this,!1)}}},connectionState:{get:function(){return this._connectionState},set:function(value){if(value!==this._connectionState){var prev=this._connectionState;this._log("info","Changing connection state to: "+value),this._connectionState=value,this.emit("change:connectionState",this,value),this.emit("change:"+value,this,!0),prev&&this.emit("change:"+prev,this,!1)}}},starting:{get:function(){return"starting"===this._sessionState}},pending:{get:function(){return"pending"===this._sessionState}},active:{get:function(){return"active"===this._sessionState}},ended:{get:function(){return"ended"===this._sessionState}},connected:{get:function(){return"connected"===this._connectionState}},connecting:{get:function(){return"connecting"===this._connectionState}},disconnected:{get:function(){return"disconnected"===this._connectionState}},interrupted:{get:function(){return"interrupted"===this._connectionState}}}),JingleSession.prototype=extend(JingleSession.prototype,{_log:function(level,message){message=this.sid+": "+message,this.emit("log:"+level,message)},send:function(action,data){data=data||{},data.sid=this.sid,data.action=action;var requirePending={"session-inititate":!0,"session-accept":!0,"content-add":!0,"content-remove":!0,"content-reject":!0,"content-accept":!0,"content-modify":!0,"transport-replace":!0,"transport-reject":!0,"transport-accept":!0,"source-add":!0,"source-remove":!0};this.pendingAction=requirePending[action]?action:!1,this.emit("send",{to:this.peer,type:"set",jingle:data})},process:function(action,changes,cb){this.processingQueue.push({action:action,changes:changes,cb:cb})},start:function(){this._log("error","Can not start base sessions"),this.end("unsupported-applications",!0)},accept:function(){this._log("error","Can not accept base sessions"),this.end("unsupported-applications")},cancel:function(){this.end("cancel")},decline:function(){this.end("decline")},end:function(reason,silent){this.state="ended",this.processingQueue.kill(),reason||(reason="success"),"string"==typeof reason&&(reason={condition:reason}),silent||this.send("session-terminate",{reason:reason}),this.emit("terminated",this,reason)},onSessionTerminate:function(changes,cb){this.end(changes.reason,!0),cb()},onSessionInfo:function(changes,cb){var okKeys={sid:!0,action:!0,initiator:!0,responder:!0},unknownPayload=!1;Object.keys(changes).forEach(function(key){okKeys[key]||(unknownPayload=!0)}),unknownPayload?cb({type:"modify",condition:"feature-not-implemented",jingleCondition:"unsupported-info"}):cb()},onDescriptionInfo:function(changes,cb){cb({type:"modify",condition:"feature-not-implemented",jingleCondition:"unsupported-info"})},onTransportInfo:function(changes,cb){cb({type:"modify",condition:"feature-not-implemented",jingleCondition:"unsupported-info"})
+},onContentAdd:function(changes,cb){cb(),this.send("content-reject",{reason:{condition:"failed-application",text:"content-add is not supported"}})},onTransportReplace:function(changes,cb){cb(),this.send("transport-reject",{reason:{condition:"failed-application",text:"transport-replace is not supported"}})}}),module.exports=JingleSession},{async:26,"extend-object":27,util:24,uuid:111,wildemitter:113}],110:[function(require,module){(function(global){var rng;if(global.crypto&&crypto.getRandomValues){var _rnds8=new Uint8Array(16);rng=function(){return crypto.getRandomValues(_rnds8),_rnds8}}if(!rng){var _rnds=new Array(16);rng=function(){for(var r,i=0;16>i;i++)0===(3&i)&&(r=4294967296*Math.random()),_rnds[i]=r>>>((3&i)<<3)&255;return _rnds}}module.exports=rng}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}],111:[function(require,module){function parse(s,buf,offset){var i=buf&&offset||0,ii=0;for(buf=buf||[],s.toLowerCase().replace(/[0-9a-f]{2}/g,function(oct){16>ii&&(buf[i+ii++]=_hexToByte[oct])});16>ii;)buf[i+ii++]=0;return buf}function unparse(buf,offset){var i=offset||0,bth=_byteToHex;return bth[buf[i++]]+bth[buf[i++]]+bth[buf[i++]]+bth[buf[i++]]+"-"+bth[buf[i++]]+bth[buf[i++]]+"-"+bth[buf[i++]]+bth[buf[i++]]+"-"+bth[buf[i++]]+bth[buf[i++]]+"-"+bth[buf[i++]]+bth[buf[i++]]+bth[buf[i++]]+bth[buf[i++]]+bth[buf[i++]]+bth[buf[i++]]}function v1(options,buf,offset){var i=buf&&offset||0,b=buf||[];options=options||{};var clockseq=void 0!==options.clockseq?options.clockseq:_clockseq,msecs=void 0!==options.msecs?options.msecs:(new Date).getTime(),nsecs=void 0!==options.nsecs?options.nsecs:_lastNSecs+1,dt=msecs-_lastMSecs+(nsecs-_lastNSecs)/1e4;if(0>dt&&void 0===options.clockseq&&(clockseq=clockseq+1&16383),(0>dt||msecs>_lastMSecs)&&void 0===options.nsecs&&(nsecs=0),nsecs>=1e4)throw new Error("uuid.v1(): Can't create more than 10M uuids/sec");_lastMSecs=msecs,_lastNSecs=nsecs,_clockseq=clockseq,msecs+=122192928e5;var tl=(1e4*(268435455&msecs)+nsecs)%4294967296;b[i++]=tl>>>24&255,b[i++]=tl>>>16&255,b[i++]=tl>>>8&255,b[i++]=255&tl;var tmh=msecs/4294967296*1e4&268435455;b[i++]=tmh>>>8&255,b[i++]=255&tmh,b[i++]=tmh>>>24&15|16,b[i++]=tmh>>>16&255,b[i++]=clockseq>>>8|128,b[i++]=255&clockseq;for(var node=options.node||_nodeId,n=0;6>n;n++)b[i+n]=node[n];return buf?buf:unparse(b)}function v4(options,buf,offset){var i=buf&&offset||0;"string"==typeof options&&(buf="binary"==options?new Array(16):null,options=null),options=options||{};var rnds=options.random||(options.rng||_rng)();if(rnds[6]=15&rnds[6]|64,rnds[8]=63&rnds[8]|128,buf)for(var ii=0;16>ii;ii++)buf[i+ii]=rnds[ii];return buf||unparse(rnds)}for(var _rng=require("./rng"),_byteToHex=[],_hexToByte={},i=0;256>i;i++)_byteToHex[i]=(i+256).toString(16).substr(1),_hexToByte[_byteToHex[i]]=i;var _seedBytes=_rng(),_nodeId=[1|_seedBytes[0],_seedBytes[1],_seedBytes[2],_seedBytes[3],_seedBytes[4],_seedBytes[5]],_clockseq=16383&(_seedBytes[6]<<8|_seedBytes[7]),_lastMSecs=0,_lastNSecs=0,uuid=v4;uuid.v1=v1,uuid.v4=v4,uuid.parse=parse,uuid.unparse=unparse,module.exports=uuid},{"./rng":110}],112:[function(require,module){var prefix,version;window.mozRTCPeerConnection||navigator.mozGetUserMedia?(prefix="moz",version=parseInt(navigator.userAgent.match(/Firefox\/([0-9]+)\./)[1],10)):(window.webkitRTCPeerConnection||navigator.webkitGetUserMedia)&&(prefix="webkit",version=navigator.userAgent.match(/Chrom(e|ium)/)&&parseInt(navigator.userAgent.match(/Chrom(e|ium)\/([0-9]+)\./)[2],10));var PC=window.mozRTCPeerConnection||window.webkitRTCPeerConnection,IceCandidate=window.mozRTCIceCandidate||window.RTCIceCandidate,SessionDescription=window.mozRTCSessionDescription||window.RTCSessionDescription,MediaStream=window.webkitMediaStream||window.MediaStream,screenSharing="https:"===window.location.protocol&&("webkit"===prefix&&version>=26||"moz"===prefix&&version>=33),AudioContext=window.AudioContext||window.webkitAudioContext,videoEl=document.createElement("video"),supportVp8=videoEl&&videoEl.canPlayType&&"probably"===videoEl.canPlayType('video/webm; codecs="vp8", vorbis'),getUserMedia=navigator.getUserMedia||navigator.webkitGetUserMedia||navigator.msGetUserMedia||navigator.mozGetUserMedia;module.exports={prefix:prefix,browserVersion:version,support:!!PC&&supportVp8&&!!getUserMedia,supportRTCPeerConnection:!!PC,supportVp8:supportVp8,supportGetUserMedia:!!getUserMedia,supportDataChannel:!!(PC&&PC.prototype&&PC.prototype.createDataChannel),supportWebAudio:!(!AudioContext||!AudioContext.prototype.createMediaStreamSource),supportMediaStream:!(!MediaStream||!MediaStream.prototype.removeTrack),supportScreenSharing:!!screenSharing,dataChannel:!!(PC&&PC.prototype&&PC.prototype.createDataChannel),webAudio:!(!AudioContext||!AudioContext.prototype.createMediaStreamSource),mediaStream:!(!MediaStream||!MediaStream.prototype.removeTrack),screenSharing:!!screenSharing,AudioContext:AudioContext,PeerConnection:PC,SessionDescription:SessionDescription,IceCandidate:IceCandidate,MediaStream:MediaStream,getUserMedia:getUserMedia}},{}],113:[function(require,module){function WildEmitter(){this.isWildEmitter=!0,this.callbacks={}}module.exports=WildEmitter,WildEmitter.prototype.on=function(event){var hasGroup=3===arguments.length,group=hasGroup?arguments[1]:void 0,func=hasGroup?arguments[2]:arguments[1];return func._groupName=group,(this.callbacks[event]=this.callbacks[event]||[]).push(func),this},WildEmitter.prototype.once=function(event){function on(){self.off(event,on),func.apply(this,arguments)}var self=this,hasGroup=3===arguments.length,group=hasGroup?arguments[1]:void 0,func=hasGroup?arguments[2]:arguments[1];return this.on(event,group,on),this},WildEmitter.prototype.releaseGroup=function(groupName){var item,i,len,handlers;for(item in this.callbacks)for(handlers=this.callbacks[item],i=0,len=handlers.length;len>i;i++)handlers[i]._groupName===groupName&&(handlers.splice(i,1),i--,len--);return this},WildEmitter.prototype.off=function(event,fn){var i,callbacks=this.callbacks[event];return callbacks?1===arguments.length?(delete this.callbacks[event],this):(i=callbacks.indexOf(fn),callbacks.splice(i,1),0===callbacks.length&&delete this.callbacks[event],this):this},WildEmitter.prototype.emit=function(event){var i,len,listeners,args=[].slice.call(arguments,1),callbacks=this.callbacks[event],specialCallbacks=this.getWildcardCallbacks(event);if(callbacks)for(listeners=callbacks.slice(),i=0,len=listeners.length;len>i&&listeners[i];++i)listeners[i].apply(this,args);if(specialCallbacks)for(len=specialCallbacks.length,listeners=specialCallbacks.slice(),i=0,len=listeners.length;len>i&&listeners[i];++i)listeners[i].apply(this,[event].concat(args));return this},WildEmitter.prototype.getWildcardCallbacks=function(eventName){var item,split,result=[];for(item in this.callbacks)split=item.split("*"),("*"===item||2===split.length&&eventName.slice(0,split[0].length)===split[0])&&(result=result.concat(this.callbacks[item]));return result}},{}],114:[function(require,module){"use strict";function JXT(){this._LOOKUP={},this._LOOKUP_EXT={},this._TAGS={},this._CB_DEFINITION={},this._CB_TAG={},this._ID=uuid.v4(),this.utils=extend({},types,helpers)}var extend=require("lodash.assign"),uuid=require("uuid"),ltx=require("ltx"),types=require("./lib/types"),helpers=require("./lib/helpers"),stanzaConstructor=require("./lib/stanza");JXT.prototype.use=function(init){return init["__JXT_LOADED_"+this._ID]||init(this),init["__JXT_LOADED_"+this._ID]=!0,this},JXT.prototype.getDefinition=function(el,ns,required){var JXTClass=this._LOOKUP[ns+"|"+el];if(required&&!JXTClass)throw new Error("Could not find definition for <"+el+' xmlns="'+ns+'" />');return JXTClass},JXT.prototype.getExtensions=function(el,ns){return this._LOOKUP_EXT[ns+"|"+el]||{}},JXT.prototype.withDefinition=function(el,ns,cb){var name=ns+"|"+el;this._CB_DEFINITION[name]||(this._CB_DEFINITION[name]=[]),this._CB_DEFINITION[name].push(cb),this._LOOKUP[name]&&cb(this._LOOKUP[name])},JXT.prototype.withTag=function(tag,cb){this._CB_TAG[tag]||(this._CB_TAG[tag]=[]),this._CB_TAG[tag].push(cb),this.tagged(tag).forEach(function(stanza){cb(stanza)})},JXT.prototype.tagged=function(tag){return this._TAGS[tag]||[]},JXT.prototype.build=function(xml){var JXTClass=this._LOOKUP[xml.namespaceURI+"|"+xml.localName];return JXTClass?new JXTClass(null,xml):void 0},JXT.prototype.parse=function(str){var xml=ltx.parse(str);if(1===xml.nodeType){var JXTClass=this.getDefinition(xml.localName,xml.namespaceURI);return JXTClass?new JXTClass(null,xml):void 0}},JXT.prototype.extend=function(ParentJXT,ChildJXT,multiName){var parentName=ParentJXT.prototype._NS+"|"+ParentJXT.prototype._EL,name=ChildJXT.prototype._name,qName=ChildJXT.prototype._NS+"|"+ChildJXT.prototype._EL;this._LOOKUP[qName]=ChildJXT,this._LOOKUP_EXT[qName]||(this._LOOKUP_EXT[qName]={}),this._LOOKUP_EXT[parentName]||(this._LOOKUP_EXT[parentName]={}),this._LOOKUP_EXT[parentName][name]=ChildJXT,this.add(ParentJXT,name,types.extension(ChildJXT)),multiName&&this.add(ParentJXT,multiName,types.multiExtension(ChildJXT))},JXT.prototype.add=function(ParentJXT,fieldName,field){field.enumerable=!0,Object.defineProperty(ParentJXT.prototype,fieldName,field)},JXT.prototype.define=function(opts){var self=this,Stanza=stanzaConstructor(this,opts),ns=Stanza.prototype._NS,el=Stanza.prototype._EL,tags=Stanza.prototype._TAGS,name=ns+"|"+el;this._LOOKUP[name]=Stanza,tags.forEach(function(tag){self._TAGS[tag]||(self._TAGS[tag]=[]),self._TAGS[tag].push(Stanza)});var fieldNames=Object.keys(opts.fields||{});return fieldNames.forEach(function(fieldName){self.add(Stanza,fieldName,opts.fields[fieldName])}),this._CB_DEFINITION[name]&&this._CB_DEFINITION[name].forEach(function(handler){handler(Stanza)}),tags.forEach(function(tag){self._CB_TAG[tag]&&self._CB_TAG[tag].forEach(function(handler){handler(Stanza)})}),Stanza},JXT.createRegistry=function(){return new JXT},extend(JXT,helpers),extend(JXT,types);var globalJXT=new JXT;JXT.define=globalJXT.define.bind(globalJXT),JXT.extend=globalJXT.extend.bind(globalJXT),JXT.add=globalJXT.add.bind(globalJXT),JXT.parse=globalJXT.parse.bind(globalJXT),JXT.build=globalJXT.build.bind(globalJXT),JXT.getExtensions=globalJXT.getExtensions.bind(globalJXT),JXT.getDefinition=globalJXT.getDefinition.bind(globalJXT),JXT.withDefinition=globalJXT.withDefinition.bind(globalJXT),JXT.withTag=globalJXT.withTag.bind(globalJXT),JXT.tagged=globalJXT.tagged.bind(globalJXT),JXT.getGlobalJXT=function(){return globalJXT},module.exports=JXT},{"./lib/helpers":115,"./lib/stanza":116,"./lib/types":117,"lodash.assign":118,ltx:131,uuid:136}],115:[function(require,module,exports){"use strict";var ltx=require("ltx"),XML_NS=exports.XML_NS="http://www.w3.org/XML/1998/namespace";exports.createElement=function(NS,name,parentNS){var el=new ltx.Element(name);return parentNS&&parentNS===NS||exports.setAttribute(el,"xmlns",NS),el};var find=exports.find=function(xml,NS,selector){for(var results=[],children=xml.getElementsByTagName(selector),i=0,len=children.length;len>i;i++){var child=children[i];child.namespaceURI===NS&&child.parentNode===xml&&results.push(child)}return results};exports.findOrCreate=function(xml,NS,selector){var existing=exports.find(xml,NS,selector);if(existing.length)return existing[0];var created=exports.createElement(NS,selector,xml.namespaceURI);return xml.appendChild(created),created},exports.getAttribute=function(xml,attr,defaultVal){return xml.getAttribute(attr)||defaultVal||""},exports.getAttributeNS=function(xml,NS,attr,defaultVal){return xml.getAttributeNS(NS,attr)||defaultVal||""},exports.setAttribute=function(xml,attr,value,force){value||force?xml.setAttribute(attr,value):xml.removeAttribute(attr)},exports.setAttributeNS=function(xml,NS,attr,value,force){value||force?xml.setAttributeNS(NS,attr,value):xml.removeAttributeNS(NS,attr)},exports.getBoolAttribute=function(xml,attr,defaultVal){var val=xml.getAttribute(attr)||defaultVal||"";return"true"===val||"1"===val},exports.setBoolAttribute=function(xml,attr,value){value?xml.setAttribute(attr,"1"):xml.removeAttribute(attr)},exports.getSubAttribute=function(xml,NS,sub,attr,defaultVal){var subs=find(xml,NS,sub);if(!subs)return"";for(var i=0;i<subs.length;i++)return subs[i].getAttribute(attr)||defaultVal||"";return""},exports.setSubAttribute=function(xml,NS,sub,attr,value){var subs=find(xml,NS,sub);if(subs.length)for(var i=0;i<subs.length;i++){if(value)return void subs[i].setAttribute(attr,value);subs[i].removeAttribute(attr)}else value&&(sub=exports.createElement(NS,sub,xml.namespaceURI),sub.setAttribute(attr,value),xml.appendChild(sub))},exports.getBoolSubAttribute=function(xml,NS,sub,attr,defaultVal){var val=xml.getSubAttribute(NS,sub,attr)||defaultVal||"";return"true"===val||"1"===val},exports.setBoolSubAttribute=function(xml,NS,sub,attr,value){value=value?"1":"",exports.setSubAttribute(xml,NS,sub,attr,value)},exports.getText=function(xml){return xml.textContent},exports.setText=function(xml,value){xml.textContent=value},exports.getSubText=exports.getTextSub=function(xml,NS,element,defaultVal){var subs=find(xml,NS,element);return defaultVal=defaultVal||"",subs.length?subs[0].textContent||defaultVal:defaultVal},exports.setSubText=exports.setTextSub=function(xml,NS,element,value){var subs=find(xml,NS,element);if(subs.length)for(var i=0;i<subs.length;i++)xml.removeChild(subs[i]);if(value){var sub=exports.createElement(NS,element,xml.namespaceURI);value!==!0&&(sub.textContent=value),xml.appendChild(sub)}},exports.getMultiSubText=function(xml,NS,element,extractor){var subs=find(xml,NS,element),results=[];extractor=extractor||function(sub){return sub.textContent||""};for(var i=0;i<subs.length;i++)results.push(extractor(subs[i]));return results},exports.setMultiSubText=function(xml,NS,element,value,builder){var subs=find(xml,NS,element),values=[];builder=builder||function(value){if(value){var sub=exports.createElement(NS,element,xml.namespaceURI);sub.textContent=value,xml.appendChild(sub)}},values="string"==typeof value?(value||"").split("\n"):value;var i,len;for(i=0,len=subs.length;len>i;i++)xml.removeChild(subs[i]);for(i=0,len=values.length;len>i;i++)builder(values[i])},exports.getMultiSubAttribute=function(xml,NS,element,attr){return exports.getMultiSubText(xml,NS,element,function(sub){return exports.getAttribute(sub,attr)})},exports.setMultiSubAttribute=function(xml,NS,element,attr,value){exports.setMultiSubText(xml,NS,element,value,function(val){var sub=exports.createElement(NS,element,xml.namespaceURI);exports.setAttribute(sub,attr,val),xml.appendChild(sub)})},exports.getSubLangText=function(xml,NS,element,defaultLang){var subs=find(xml,NS,element);if(!subs.length)return{};for(var lang,sub,results={},langs=[],i=0;i<subs.length;i++)sub=subs[i],lang=sub.getAttributeNS(XML_NS,"lang")||defaultLang,langs.push(lang),results[lang]=sub.textContent||"";return results},exports.setSubLangText=function(xml,NS,element,value,defaultLang){var sub,lang,subs=find(xml,NS,element);if(subs.length)for(var i=0;i<subs.length;i++)xml.removeChild(subs[i]);if("string"==typeof value)sub=exports.createElement(NS,element,xml.namespaceURI),sub.textContent=value,xml.appendChild(sub);else if("object"==typeof value)for(lang in value)value.hasOwnProperty(lang)&&(sub=exports.createElement(NS,element,xml.namespaceURI),lang!==defaultLang&&sub.setAttributeNS(XML_NS,"lang",lang),sub.textContent=value[lang],xml.appendChild(sub))},exports.getBoolSub=function(xml,NS,element){var subs=find(xml,NS,element);return!!subs.length},exports.setBoolSub=function(xml,NS,element,value){var subs=find(xml,NS,element);if(subs.length)for(var i=0;i<subs.length;i++){if(value)return;xml.removeChild(subs[i])}else if(value){var sub=exports.createElement(NS,element,xml.namespaceURI);xml.appendChild(sub)}}},{ltx:131}],116:[function(require,module){"use strict";var helpers=require("./helpers"),extend=require("lodash.assign"),EXCLUDE={constructor:!0,parent:!0,prototype:!0,toJSON:!0,toString:!0,xml:!0};module.exports=function(JXT,opts){function Stanza(data,xml,parent){var self=this,parentNode=(xml||{}).parentNode||(parent||{}).xml,parentNS=(parentNode||{}).namespaceURI;self.xml=xml||helpers.createElement(self._NS,self._EL,parentNS),Object.keys(self._PREFIXES).forEach(function(prefix){var namespace=self._PREFIXES[prefix];self.xml.setAttribute("xmlns:"+prefix,namespace)}),self._extensions={};for(var i=0,len=self.xml.childNodes.length;len>i;i++){var child=self.xml.childNodes[i],ChildJXT=JXT.getDefinition(child.localName,child.namespaceURI);if(void 0!==ChildJXT){var name=ChildJXT.prototype._name;self._extensions[name]=new ChildJXT(null,child),self._extensions[name].parent=self}}return extend(self,data),opts.init&&opts.init.apply(self,[data]),self}return Stanza.prototype._name=opts.name,Stanza.prototype._eventname=opts.eventName,Stanza.prototype._NS=opts.namespace,Stanza.prototype._EL=opts.element||opts.name,Stanza.prototype._PREFIXES=opts.prefixes||{},Stanza.prototype._TAGS=opts.tags||[],Stanza.prototype.toString=function(){return this.xml.toString()},Stanza.prototype.toJSON=function(){var prop,result={};for(prop in this._extensions)this._extensions[prop].toJSON&&"_"!==prop[0]&&(result[prop]=this._extensions[prop].toJSON());for(prop in this){var allowedName=!EXCLUDE[prop]&&"_"!==prop[0],isExtensionName=JXT.getExtensions(this._EL,this._NS)[prop];if(allowedName&&!isExtensionName){var val=this[prop];if("function"==typeof val)continue;var type=Object.prototype.toString.call(val);if(type.indexOf("Object")>=0)Object.keys(val).length>0&&(result[prop]=val);else if(type.indexOf("Array")>=0){if(val.length>0){for(var vals=[],len=val.length,n=0;len>n;n++){var nval=val[n];"undefined"!=typeof nval&&vals.push(void 0!==nval.toJSON?nval.toJSON():nval)}result[prop]=vals}}else void 0!==val&&val!==!1&&""!==val&&(result[prop]=val)}}return result},Stanza}},{"./helpers":115,"lodash.assign":118}],117:[function(require,module,exports){(function(Buffer){"use strict";var helpers=require("./helpers"),extend=require("lodash.assign"),find=helpers.find,createElement=helpers.createElement,field=exports.field=function(getter,setter){return function(){var args=Array.prototype.slice.call(arguments);return{get:function(){return getter.apply(null,[this.xml].concat(args))},set:function(value){setter.apply(null,[this.xml].concat(args).concat([value]))}}}};exports.boolAttribute=field(helpers.getBoolAttribute,helpers.setBoolAttribute),exports.subAttribute=field(helpers.getSubAttribute,helpers.setSubAttribute),exports.boolSubAttribute=field(helpers.getSubBoolAttribute,helpers.setSubBoolAttribute),exports.text=field(helpers.getText,helpers.setText),exports.textSub=exports.subText=field(helpers.getSubText,helpers.setSubText),exports.multiTextSub=exports.multiSubText=field(helpers.getMultiSubText,helpers.setMultiSubText),exports.multiSubAttribute=field(helpers.getMultiSubAttribute,helpers.setMultiSubAttribute),exports.langTextSub=exports.subLangText=field(helpers.getSubLangText,helpers.setSubLangText),exports.boolSub=field(helpers.getBoolSub,helpers.setBoolSub),exports.langAttribute=field(function(xml){return xml.getAttributeNS(helpers.XML_NS,"lang")||""},function(xml,value){xml.setAttributeNS(helpers.XML_NS,"lang",value)}),exports.b64Text=field(function(xml){return xml.textContent&&"="!==xml.textContent?new Buffer(xml.textContent,"base64"):""},function(xml,value){if("string"==typeof value){var b64=new Buffer(value).toString("base64");xml.textContent=b64||"="}else xml.textContent=""}),exports.dateAttribute=function(attr,now){return{get:function(){var data=helpers.getAttribute(this.xml,attr);return data?new Date(data):now?new Date(Date.now()):void 0},set:function(value){value&&("string"!=typeof value&&(value=value.toISOString()),helpers.setAttribute(this.xml,attr,value))}}},exports.dateSub=function(NS,sub,now){return{get:function(){var data=helpers.getSubText(this.xml,NS,sub);return data?new Date(data):now?new Date(Date.now()):void 0},set:function(value){value&&("string"!=typeof value&&(value=value.toISOString()),helpers.setSubText(this.xml,NS,sub,value))}}},exports.dateSubAttribute=function(NS,sub,attr,now){return{get:function(){var data=helpers.getSubAttribute(this.xml,NS,sub,attr);return data?new Date(data):now?new Date(Date.now()):void 0},set:function(value){value&&("string"!=typeof value&&(value=value.toISOString()),helpers.setSubAttribute(this.xml,NS,sub,attr,value))}}},exports.numberAttribute=function(attr,isFloat,defaultVal){return{get:function(){var parse=isFloat?parseFloat:parseInt,data=helpers.getAttribute(this.xml,attr,"");if(!data)return defaultVal;var parsed=parse(data,10);return isNaN(parsed)?defaultVal:parsed},set:function(value){helpers.setAttribute(this.xml,attr,value.toString())}}},exports.numberSub=function(NS,sub,isFloat,defaultVal){return{get:function(){var parse=isFloat?parseFloat:parseInt,data=helpers.getSubText(this.xml,NS,sub,"");if(!data)return defaultVal;var parsed=parse(data,10);return isNaN(parsed)?defaultVal:parsed},set:function(value){helpers.setSubText(this.xml,NS,sub,value.toString())}}},exports.attribute=function(name,defaultVal){return{get:function(){return helpers.getAttribute(this.xml,name,defaultVal)},set:function(value){helpers.setAttribute(this.xml,name,value)}}},exports.attributeNS=function(NS,name,defaultVal){return{get:function(){return helpers.getAttributeNS(this.xml,NS,name,defaultVal)},set:function(value){helpers.setAttributeNS(this.xml,NS,name,value)}}},exports.extension=function(ChildJXT){return{get:function(){var self=this,name=ChildJXT.prototype._name;if(!this._extensions[name]){var existing=find(this.xml,ChildJXT.prototype._NS,ChildJXT.prototype._EL);existing.length?this._extensions[name]=new ChildJXT(null,existing[0],self):(this._extensions[name]=new ChildJXT({},null,self),this.xml.appendChild(this._extensions[name].xml)),this._extensions[name].parent=this}return this._extensions[name]},set:function(value){if(value){var child=this[ChildJXT.prototype._name];value===!0&&(value={}),extend(child,value)}}}},exports.multiExtension=function(ChildJXT){return{get:function(){for(var self=this,data=find(this.xml,ChildJXT.prototype._NS,ChildJXT.prototype._EL),results=[],i=0,len=data.length;len>i;i++)results.push(new ChildJXT({},data[i],self));return results},set:function(value){value=value||[];var i,len,self=this,existing=find(this.xml,ChildJXT.prototype._NS,ChildJXT.prototype._EL);for(i=0,len=existing.length;len>i;i++)self.xml.removeChild(existing[i]);for(i=0,len=value.length;len>i;i++){var content=new ChildJXT(value[i],null,self);self.xml.appendChild(content.xml)}}}},exports.enumSub=function(NS,enumValues){return{get:function(){var self=this,result=[];return enumValues.forEach(function(enumVal){var exists=find(self.xml,NS,enumVal);exists.length&&result.push(exists[0].nodeName)}),result[0]||""},set:function(value){var self=this;if(enumValues.forEach(function(enumVal){var exists=find(self.xml,NS,enumVal);exists.length&&self.xml.removeChild(exists[0])}),value){var condition=createElement(NS,value);this.xml.appendChild(condition)}}}},exports.subExtension=function(name,NS,sub,ChildJXT){return{get:function(){if(!this._extensions[name]){var wrapper=find(this.xml,NS,sub);wrapper.length?wrapper=wrapper[0]:(wrapper=createElement(NS,sub,this._NS),this.xml.appendChild(wrapper));var existing=find(wrapper,ChildJXT.prototype._NS,ChildJXT.prototype._EL);existing.length?this._extensions[name]=new ChildJXT(null,existing[0],{xml:wrapper}):(this._extensions[name]=new ChildJXT({},null,{xml:wrapper}),wrapper.appendChild(this._extensions[name].xml)),this._extensions[name].parent=this}return this._extensions[name]},set:function(value){var wrapper=find(this.xml,NS,sub);if(wrapper.length&&!value&&this.xml.removeChild(wrapper[0]),value){var child=this[name];value===!0&&(value={}),extend(child,value)}}}},exports.subMultiExtension=function(NS,sub,ChildJXT){return{get:function(){var self=this,results=[],existing=find(this.xml,NS,sub);if(!existing.length)return results;existing=existing[0];var data=find(existing,ChildJXT.prototype._NS,ChildJXT.prototype._EL);return data.forEach(function(xml){results.push(new ChildJXT({},xml,self))}),results},set:function(values){var self=this,existing=find(this.xml,NS,sub);existing.length&&self.xml.removeChild(existing[0]),values.length&&(existing=createElement(NS,sub,this._NS),values.forEach(function(value){var content=new ChildJXT(value,null,self);existing.appendChild(content.xml)}),self.xml.appendChild(existing))}}}}).call(this,require("buffer").Buffer)},{"./helpers":115,buffer:2,"lodash.assign":118}],118:[function(require,module){function assignWith(object,source,customizer){for(var index=-1,props=keys(source),length=props.length;++index<length;){var key=props[index],value=object[key],result=customizer(value,source[key],key,object,source);(result===result?result===value:value!==value)&&(void 0!==value||key in object)||(object[key]=result)}return object}var baseAssign=require("lodash._baseassign"),createAssigner=require("lodash._createassigner"),keys=require("lodash.keys"),assign=createAssigner(function(object,source,customizer){return customizer?assignWith(object,source,customizer):baseAssign(object,source)});module.exports=assign},{"lodash._baseassign":119,"lodash._createassigner":121,"lodash.keys":125}],119:[function(require,module){function baseAssign(object,source){return null==source?object:baseCopy(source,keys(source),object)}var baseCopy=require("lodash._basecopy"),keys=require("lodash.keys");module.exports=baseAssign},{"lodash._basecopy":120,"lodash.keys":125}],120:[function(require,module){function baseCopy(source,props,object){object||(object={});for(var index=-1,length=props.length;++index<length;){var key=props[index];object[key]=source[key]}return object}module.exports=baseCopy},{}],121:[function(require,module){function createAssigner(assigner){return restParam(function(object,sources){var index=-1,length=null==object?0:sources.length,customizer=length>2?sources[length-2]:void 0,guard=length>2?sources[2]:void 0,thisArg=length>1?sources[length-1]:void 0;for("function"==typeof customizer?(customizer=bindCallback(customizer,thisArg,5),length-=2):(customizer="function"==typeof thisArg?thisArg:void 0,length-=customizer?1:0),guard&&isIterateeCall(sources[0],sources[1],guard)&&(customizer=3>length?void 0:customizer,length=1);++index<length;){var source=sources[index];source&&assigner(object,source,customizer)}return object})}var bindCallback=require("lodash._bindcallback"),isIterateeCall=require("lodash._isiterateecall"),restParam=require("lodash.restparam");module.exports=createAssigner},{"lodash._bindcallback":122,"lodash._isiterateecall":123,"lodash.restparam":124}],122:[function(require,module,exports){arguments[4][54][0].apply(exports,arguments)},{dup:54}],123:[function(require,module){function baseProperty(key){return function(object){return null==object?void 0:object[key]}}function isArrayLike(value){return null!=value&&isLength(getLength(value))}function isIndex(value,length){return value="number"==typeof value||reIsUint.test(value)?+value:-1,length=null==length?MAX_SAFE_INTEGER:length,value>-1&&value%1==0&&length>value}function isIterateeCall(value,index,object){if(!isObject(object))return!1;var type=typeof index;if("number"==type?isArrayLike(object)&&isIndex(index,object.length):"string"==type&&index in object){var other=object[index];return value===value?value===other:other!==other}return!1}function isLength(value){return"number"==typeof value&&value>-1&&value%1==0&&MAX_SAFE_INTEGER>=value}function isObject(value){var type=typeof value;return!!value&&("object"==type||"function"==type)}var reIsUint=/^\d+$/,MAX_SAFE_INTEGER=9007199254740991,getLength=baseProperty("length");module.exports=isIterateeCall},{}],124:[function(require,module){function restParam(func,start){if("function"!=typeof func)throw new TypeError(FUNC_ERROR_TEXT);return start=nativeMax(void 0===start?func.length-1:+start||0,0),function(){for(var args=arguments,index=-1,length=nativeMax(args.length-start,0),rest=Array(length);++index<length;)rest[index]=args[start+index];switch(start){case 0:return func.call(this,rest);case 1:return func.call(this,args[0],rest);case 2:return func.call(this,args[0],args[1],rest)}var otherArgs=Array(start+1);for(index=-1;++index<start;)otherArgs[index]=args[index];return otherArgs[start]=rest,func.apply(this,otherArgs)}}var FUNC_ERROR_TEXT="Expected a function",nativeMax=Math.max;module.exports=restParam},{}],125:[function(require,module,exports){arguments[4][51][0].apply(exports,arguments)},{dup:51,"lodash._getnative":126,"lodash.isarguments":127,"lodash.isarray":128}],126:[function(require,module,exports){arguments[4][52][0].apply(exports,arguments)},{dup:52}],127:[function(require,module,exports){arguments[4][53][0].apply(exports,arguments)},{dup:53}],128:[function(require,module,exports){arguments[4][55][0].apply(exports,arguments)},{dup:55}],129:[function(require,module){"use strict";function DOMElement(name,attrs){Element.call(this,name,attrs),this.nodeType=1,this.nodeName=this.localName}var util=require("util"),Element=require("./element").Element;util.inherits(DOMElement,Element),DOMElement.prototype._getElement=function(name,attrs){var element=new DOMElement(name,attrs);return element},Object.defineProperty(DOMElement.prototype,"localName",{get:function(){return this.getName()}}),Object.defineProperty(DOMElement.prototype,"namespaceURI",{get:function(){return this.getNS()}}),Object.defineProperty(DOMElement.prototype,"parentNode",{get:function(){return this.parent}}),Object.defineProperty(DOMElement.prototype,"childNodes",{get:function(){return this.children}}),Object.defineProperty(DOMElement.prototype,"textContent",{get:function(){return this.getText()},set:function(value){this.children.push(value)}}),DOMElement.prototype.getElementsByTagName=function(name){return this.getChildren(name)},DOMElement.prototype.getAttribute=function(name){return this.getAttr(name)},DOMElement.prototype.setAttribute=function(name,value){this.attr(name,value)},DOMElement.prototype.getAttributeNS=function(ns,name){return"http://www.w3.org/XML/1998/namespace"===ns?this.getAttr(["xml",name].join(":")):this.getAttr(name,ns)},DOMElement.prototype.setAttributeNS=function(ns,name,value){var prefix;if("http://www.w3.org/XML/1998/namespace"===ns)prefix="xml";else{var nss=this.getXmlns();prefix=nss[ns]||""}prefix&&this.attr([prefix,name].join(":"),value)},DOMElement.prototype.removeAttribute=function(name){this.attr(name,null)},DOMElement.prototype.removeAttributeNS=function(ns,name){var prefix;if("http://www.w3.org/XML/1998/namespace"===ns)prefix="xml";else{var nss=this.getXmlns();prefix=nss[ns]||""}prefix&&this.attr([prefix,name].join(":"),null)},DOMElement.prototype.appendChild=function(el){this.cnode(el)},DOMElement.prototype.removeChild=function(el){this.remove(el)},module.exports=DOMElement},{"./element":130,util:24}],130:[function(require,module,exports){"use strict";function Element(name,attrs){this.name=name,this.parent=null,this.children=[],this.setAttrs(attrs)}function escapeXml(s){return s.replace(/\&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/"/g,"&apos;")}function escapeXmlText(s){return s.replace(/\&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;")}Element.prototype.is=function(name,xmlns){return this.getName()===name&&(!xmlns||this.getNS()===xmlns)},Element.prototype.getName=function(){return this.name.indexOf(":")>=0?this.name.substr(this.name.indexOf(":")+1):this.name},Element.prototype.getNS=function(){if(this.name.indexOf(":")>=0){var prefix=this.name.substr(0,this.name.indexOf(":"));return this.findNS(prefix)}return this.findNS()},Element.prototype.findNS=function(prefix){if(prefix){var attr="xmlns:"+prefix;if(this.attrs[attr])return this.attrs[attr];if(this.parent)return this.parent.findNS(prefix)}else{if(this.attrs.xmlns)return this.attrs.xmlns;if(this.parent)return this.parent.findNS()}},Element.prototype.getXmlns=function(){var namespaces={};
+this.parent&&(namespaces=this.parent.getXmlns());for(var attr in this.attrs){var m=attr.match("xmlns:?(.*)");this.attrs.hasOwnProperty(attr)&&m&&(namespaces[this.attrs[attr]]=m[1])}return namespaces},Element.prototype.setAttrs=function(attrs){this.attrs={},"string"==typeof attrs?this.attrs.xmlns=attrs:attrs&&Object.keys(attrs).forEach(function(key){this.attrs[key]=attrs[key]},this)},Element.prototype.getAttr=function(name,xmlns){if(!xmlns)return this.attrs[name];var namespaces=this.getXmlns();return namespaces[xmlns]?this.attrs[[namespaces[xmlns],name].join(":")]:null},Element.prototype.getChild=function(name,xmlns){return this.getChildren(name,xmlns)[0]},Element.prototype.getChildren=function(name,xmlns){for(var result=[],i=0;i<this.children.length;i++){var child=this.children[i];!child.getName||child.getName()!==name||xmlns&&child.getNS()!==xmlns||result.push(child)}return result},Element.prototype.getChildByAttr=function(attr,val,xmlns,recursive){return this.getChildrenByAttr(attr,val,xmlns,recursive)[0]},Element.prototype.getChildrenByAttr=function(attr,val,xmlns,recursive){for(var result=[],i=0;i<this.children.length;i++){var child=this.children[i];!child.attrs||child.attrs[attr]!==val||xmlns&&child.getNS()!==xmlns||result.push(child),recursive&&child.getChildrenByAttr&&result.push(child.getChildrenByAttr(attr,val,xmlns,!0))}return recursive&&(result=[].concat.apply([],result)),result},Element.prototype.getChildrenByFilter=function(filter,recursive){for(var result=[],i=0;i<this.children.length;i++){var child=this.children[i];filter(child)&&result.push(child),recursive&&child.getChildrenByFilter&&result.push(child.getChildrenByFilter(filter,!0))}return recursive&&(result=[].concat.apply([],result)),result},Element.prototype.getText=function(){for(var text="",i=0;i<this.children.length;i++){var child=this.children[i];("string"==typeof child||"number"==typeof child)&&(text+=child)}return text},Element.prototype.getChildText=function(name,xmlns){var child=this.getChild(name,xmlns);return child?child.getText():null},Element.prototype.getChildElements=function(){return this.getChildrenByFilter(function(child){return child instanceof Element})},Element.prototype.root=function(){return this.parent?this.parent.root():this},Element.prototype.tree=Element.prototype.root,Element.prototype.up=function(){return this.parent?this.parent:this},Element.prototype._getElement=function(name,attrs){var element=new Element(name,attrs);return element},Element.prototype.c=function(name,attrs){return this.cnode(this._getElement(name,attrs))},Element.prototype.cnode=function(child){return this.children.push(child),"object"==typeof child&&(child.parent=this),child},Element.prototype.t=function(text){return this.children.push(text),this},Element.prototype.remove=function(el,xmlns){var filter;return filter="string"==typeof el?function(child){return!(child.is&&child.is(el,xmlns))}:function(child){return child!==el},this.children=this.children.filter(filter),this},Element.prototype.clone=function(){for(var clone=this._getElement(this.name,this.attrs),i=0;i<this.children.length;i++){var child=this.children[i];clone.cnode(child.clone?child.clone():child)}return clone},Element.prototype.text=function(val){return val&&1===this.children.length?(this.children[0]=val,this):this.getText()},Element.prototype.attr=function(attr,val){return"undefined"!=typeof val||null===val?(this.attrs||(this.attrs={}),this.attrs[attr]=val,this):this.attrs[attr]},Element.prototype.toString=function(){var s="";return this.write(function(c){s+=c}),s},Element.prototype.toJSON=function(){return{name:this.name,attrs:this.attrs,children:this.children.map(function(child){return child&&child.toJSON?child.toJSON():child})}},Element.prototype._addChildren=function(writer){writer(">");for(var i=0;i<this.children.length;i++){var child=this.children[i];(child||0===child)&&(child.write?child.write(writer):"string"==typeof child?writer(escapeXmlText(child)):child.toString&&writer(escapeXmlText(child.toString(10))))}writer("</"),writer(this.name),writer(">")},Element.prototype.write=function(writer){writer("<"),writer(this.name);for(var k in this.attrs){var v=this.attrs[k];(v||""===v||0===v)&&(writer(" "),writer(k),writer('="'),"string"!=typeof v&&(v=v.toString(10)),writer(escapeXml(v)),writer('"'))}0===this.children.length?writer("/>"):this._addChildren(writer)},exports.Element=Element,exports.escapeXml=escapeXml},{}],131:[function(require,module){"use strict";var parse=require("./parse");parse.availableSaxParsers.push(parse.bestSaxParser=require("./sax/sax_ltx")),module.exports=require("./index")},{"./index":132,"./parse":133,"./sax/sax_ltx":134}],132:[function(require,module,exports){"use strict";var parse=require("./parse");exports.Element=require("./dom-element"),exports.escapeXml=require("./element").escapeXml,exports.parse=parse.parse,exports.Parser=parse.Parser,exports.availableSaxParsers=parse.availableSaxParsers,exports.bestSaxParser=parse.bestSaxParser},{"./dom-element":129,"./element":130,"./parse":133}],133:[function(require,module,exports){"use strict";var events=require("events"),util=require("util"),DOMElement=require("./dom-element");exports.availableSaxParsers=[],exports.bestSaxParser=null;var saxParsers=["./sax/sax_expat.js","./sax/sax_ltx.js","./sax/sax_saxjs.js"];saxParsers.forEach(function(modName){var mod;try{mod=require(modName)}catch(e){}mod&&(exports.availableSaxParsers.push(mod),exports.bestSaxParser||(exports.bestSaxParser=mod))}),exports.Parser=function(saxParser){events.EventEmitter.call(this);var self=this,ParserMod=saxParser||exports.bestSaxParser;if(!ParserMod)throw new Error("No SAX parser available");this.parser=new ParserMod;var el;this.parser.addListener("startElement",function(name,attrs){var child=new DOMElement(name,attrs);el=el?el.cnode(child):child}),this.parser.addListener("endElement",function(name){el&&name===el.name&&(el.parent?el=el.parent:self.tree||(self.tree=el,el=void 0))}),this.parser.addListener("text",function(str){el&&el.t(str)}),this.parser.addListener("error",function(e){self.error=e,self.emit("error",e)})},util.inherits(exports.Parser,events.EventEmitter),exports.Parser.prototype.write=function(data){this.parser.write(data)},exports.Parser.prototype.end=function(data){this.parser.end(data),this.error||(this.tree?this.emit("tree",this.tree):this.emit("error",new Error("Incomplete document")))},exports.parse=function(data,saxParser){var p=new exports.Parser(saxParser),result=null,error=null;if(p.on("tree",function(tree){result=tree}),p.on("error",function(e){error=e}),p.write(data),p.end(),error)throw error;return result}},{"./dom-element":129,events:6,util:24}],134:[function(require,module){"use strict";function unescapeXml(s){return s.replace(/\&(amp|#38);/g,"&").replace(/\&(lt|#60);/g,"<").replace(/\&(gt|#62);/g,">").replace(/\&(quot|#34);/g,'"').replace(/\&(apos|#39);/g,"'").replace(/\&(nbsp|#160);/g,"\n")}var util=require("util"),events=require("events"),STATE_TEXT=0,STATE_IGNORE_TAG=1,STATE_TAG_NAME=2,STATE_TAG=3,STATE_ATTR_NAME=4,STATE_ATTR_EQ=5,STATE_ATTR_QUOT=6,STATE_ATTR_VALUE=7,SaxLtx=module.exports=function(){events.EventEmitter.call(this);var remainder,tagName,attrs,endTag,selfClosing,attrQuote,attrName,state=STATE_TEXT,recordStart=0;this._handleTagOpening=function(endTag,tagName,attrs){endTag?this.emit("endElement",tagName):(this.emit("startElement",tagName,attrs),selfClosing&&this.emit("endElement",tagName))},this.write=function(data){function endRecording(){if("number"==typeof recordStart){var recorded=data.slice(recordStart,pos);return recordStart=void 0,recorded}}"string"!=typeof data&&(data=data.toString());var pos=0;for(remainder&&(data=remainder+data,pos+=remainder.length,remainder=null);pos<data.length;pos++){var c=data.charCodeAt(pos);switch(state){case STATE_TEXT:if(60===c){var text=endRecording();text&&this.emit("text",unescapeXml(text)),state=STATE_TAG_NAME,recordStart=pos+1,attrs={}}break;case STATE_TAG_NAME:47===c&&recordStart===pos?(recordStart=pos+1,endTag=!0):33===c||63===c?(recordStart=void 0,state=STATE_IGNORE_TAG):(32>=c||47===c||62===c)&&(tagName=endRecording(),pos--,state=STATE_TAG);break;case STATE_IGNORE_TAG:62===c&&(state=STATE_TEXT);break;case STATE_TAG:62===c?(this._handleTagOpening(endTag,tagName,attrs),tagName=void 0,attrs=void 0,endTag=void 0,selfClosing=void 0,state=STATE_TEXT,recordStart=pos+1):47===c?selfClosing=!0:c>32&&(recordStart=pos,state=STATE_ATTR_NAME);break;case STATE_ATTR_NAME:(32>=c||61===c)&&(attrName=endRecording(),pos--,state=STATE_ATTR_EQ);break;case STATE_ATTR_EQ:61===c&&(state=STATE_ATTR_QUOT);break;case STATE_ATTR_QUOT:(34===c||39===c)&&(attrQuote=c,state=STATE_ATTR_VALUE,recordStart=pos+1);break;case STATE_ATTR_VALUE:if(c===attrQuote){var value=unescapeXml(endRecording());attrs[attrName]=value,attrName=void 0,state=STATE_TAG}}}"number"==typeof recordStart&&recordStart<=data.length&&(remainder=data.slice(recordStart),recordStart=0)}};util.inherits(SaxLtx,events.EventEmitter),SaxLtx.prototype.end=function(data){data&&this.write(data),this.write=function(){}}},{events:6,util:24}],135:[function(require,module,exports){arguments[4][110][0].apply(exports,arguments)},{dup:110}],136:[function(require,module,exports){arguments[4][111][0].apply(exports,arguments)},{"./rng":135,dup:111}],137:[function(require,module){"use strict";function requestUserMedia(constraints){return new Promise(function(resolve,reject){getUserMedia(constraints,resolve,reject)})}var getUserMedia=null,attachMediaStream=null,reattachMediaStream=null,webrtcDetectedBrowser=null,webrtcDetectedVersion=null,webrtcMinimumVersion=null;if(navigator.mozGetUserMedia){if(console.log("This appears to be Firefox"),webrtcDetectedBrowser="firefox",webrtcDetectedVersion=parseInt(navigator.userAgent.match(/Firefox\/([0-9]+)\./)[1],10),webrtcMinimumVersion=31,window.RTCPeerConnection=function(pcConfig,pcConstraints){if(38>webrtcDetectedVersion&&pcConfig&&pcConfig.iceServers){for(var newIceServers=[],i=0;i<pcConfig.iceServers.length;i++){var server=pcConfig.iceServers[i];if(server.hasOwnProperty("urls"))for(var j=0;j<server.urls.length;j++){var newServer={url:server.urls[j]};0===server.urls[j].indexOf("turn")&&(newServer.username=server.username,newServer.credential=server.credential),newIceServers.push(newServer)}else newIceServers.push(pcConfig.iceServers[i])}pcConfig.iceServers=newIceServers}return new mozRTCPeerConnection(pcConfig,pcConstraints)},window.RTCSessionDescription=mozRTCSessionDescription,window.RTCIceCandidate=mozRTCIceCandidate,getUserMedia=38>webrtcDetectedVersion?function(c,onSuccess,onError){var constraintsToFF37=function(c){if("object"!=typeof c||c.require)return c;var require=[];return Object.keys(c).forEach(function(key){var r=c[key]="object"==typeof c[key]?c[key]:{ideal:c[key]};if(void 0!==r.exact&&(r.min=r.max=r.exact,delete r.exact),(void 0!==r.min||void 0!==r.max)&&require.push(key),void 0!==r.ideal){c.advanced=c.advanced||[];var oc={};oc[key]={min:r.ideal,max:r.ideal},c.advanced.push(oc),delete r.ideal,Object.keys(r).length||delete c[key]}}),require.length&&(c.require=require),c};return console.log("spec: "+JSON.stringify(c)),c.audio=constraintsToFF37(c.audio),c.video=constraintsToFF37(c.video),console.log("ff37: "+JSON.stringify(c)),navigator.mozGetUserMedia(c,onSuccess,onError)}:navigator.mozGetUserMedia.bind(navigator),navigator.getUserMedia=getUserMedia,navigator.mediaDevices||(navigator.mediaDevices={getUserMedia:requestUserMedia,addEventListener:function(){},removeEventListener:function(){}}),navigator.mediaDevices.enumerateDevices=navigator.mediaDevices.enumerateDevices||function(){return new Promise(function(resolve){var infos=[{kind:"audioinput",deviceId:"default",label:"",groupId:""},{kind:"videoinput",deviceId:"default",label:"",groupId:""}];resolve(infos)})},41>webrtcDetectedVersion){var orgEnumerateDevices=navigator.mediaDevices.enumerateDevices.bind(navigator.mediaDevices);navigator.mediaDevices.enumerateDevices=function(){return orgEnumerateDevices()["catch"](function(e){if("NotFoundError"===e.name)return[];throw e})}}attachMediaStream=function(element,stream){console.log("Attaching media stream"),element.mozSrcObject=stream},reattachMediaStream=function(to,from){console.log("Reattaching media stream"),to.mozSrcObject=from.mozSrcObject}}else navigator.webkitGetUserMedia?(console.log("This appears to be Chrome"),webrtcDetectedBrowser="chrome",webrtcDetectedVersion=parseInt(navigator.userAgent.match(/Chrom(e|ium)\/([0-9]+)\./)[2],10),webrtcMinimumVersion=38,window.RTCPeerConnection=function(pcConfig,pcConstraints){return new webkitRTCPeerConnection(pcConfig,pcConstraints)},["createOffer","createAnswer"].forEach(function(method){var nativeMethod=webkitRTCPeerConnection.prototype[method];webkitRTCPeerConnection.prototype[method]=function(){var self=this;if(arguments.length<1||1===arguments.length&&"object"==typeof arguments[0]){var opts=1===arguments.length?arguments[0]:void 0;return new Promise(function(resolve,reject){nativeMethod.apply(self,[resolve,reject,opts])})}return nativeMethod.apply(this,arguments)}}),["setLocalDescription","setRemoteDescription","addIceCandidate"].forEach(function(method){var nativeMethod=webkitRTCPeerConnection.prototype[method];webkitRTCPeerConnection.prototype[method]=function(){var args=arguments,self=this;return new Promise(function(resolve,reject){nativeMethod.apply(self,[args[0],function(){resolve(),args.length>=2&&args[1].apply(null,[])},function(err){reject(err),args.length>=3&&args[2].apply(null,[err])}])})}}),getUserMedia=function(c,onSuccess,onError){var constraintsToChrome=function(c){if("object"!=typeof c||c.mandatory||c.optional)return c;var cc={};return Object.keys(c).forEach(function(key){if("require"!==key&&"advanced"!==key){var r="object"==typeof c[key]?c[key]:{ideal:c[key]};void 0!==r.exact&&"number"==typeof r.exact&&(r.min=r.max=r.exact);var oldname=function(prefix,name){return prefix?prefix+name.charAt(0).toUpperCase()+name.slice(1):"deviceId"===name?"sourceId":name};if(void 0!==r.ideal){cc.optional=cc.optional||[];var oc={};"number"==typeof r.ideal?(oc[oldname("min",key)]=r.ideal,cc.optional.push(oc),oc={},oc[oldname("max",key)]=r.ideal,cc.optional.push(oc)):(oc[oldname("",key)]=r.ideal,cc.optional.push(oc))}void 0!==r.exact&&"number"!=typeof r.exact?(cc.mandatory=cc.mandatory||{},cc.mandatory[oldname("",key)]=r.exact):["min","max"].forEach(function(mix){void 0!==r[mix]&&(cc.mandatory=cc.mandatory||{},cc.mandatory[oldname(mix,key)]=r[mix])})}}),c.advanced&&(cc.optional=(cc.optional||[]).concat(c.advanced)),cc};return console.log("spec: "+JSON.stringify(c)),c.audio=constraintsToChrome(c.audio),c.video=constraintsToChrome(c.video),console.log("chrome: "+JSON.stringify(c)),navigator.webkitGetUserMedia(c,onSuccess,onError)},navigator.getUserMedia=getUserMedia,attachMediaStream=function(element,stream){"undefined"!=typeof element.srcObject?element.srcObject=stream:"undefined"!=typeof element.src?element.src=URL.createObjectURL(stream):console.log("Error attaching stream to element.")},reattachMediaStream=function(to,from){to.src=from.src},navigator.mediaDevices||(navigator.mediaDevices={getUserMedia:requestUserMedia,enumerateDevices:function(){return new Promise(function(resolve){var kinds={audio:"audioinput",video:"videoinput"};return MediaStreamTrack.getSources(function(devices){resolve(devices.map(function(device){return{label:device.label,kind:kinds[device.kind],deviceId:device.id,groupId:""}}))})})}},navigator.mediaDevices.addEventListener=function(){},navigator.mediaDevices.removeEventListener=function(){})):navigator.mediaDevices&&navigator.userAgent.match(/Edge\/(\d+).(\d+)$/)?(console.log("This appears to be Edge"),webrtcDetectedBrowser="edge",webrtcDetectedVersion=parseInt(navigator.userAgent.match(/Edge\/(\d+).(\d+)$/)[2],10),webrtcMinimumVersion=12,attachMediaStream=function(element,stream){element.srcObject=stream},reattachMediaStream=function(to,from){to.srcObject=from.srcObject}):console.log("Browser does not appear to be WebRTC-capable");"undefined"!=typeof module&&(module.exports={RTCPeerConnection:RTCPeerConnection,getUserMedia:getUserMedia,attachMediaStream:attachMediaStream,reattachMediaStream:reattachMediaStream,webrtcDetectedBrowser:webrtcDetectedBrowser,webrtcDetectedVersion:webrtcDetectedVersion,webrtcMinimumVersion:webrtcMinimumVersion})},{}],138:[function(require,module){"use strict";var NS="urn:xmpp:jingle:transports:ice-udp:1";module.exports=function(stanza){var types=stanza.utils,ICE=stanza.define({name:"_iceUdp",namespace:NS,element:"transport",tags:["jingle-transport"],fields:{transType:{value:"iceUdp"},pwd:types.attribute("pwd"),ufrag:types.attribute("ufrag")}}),RemoteCandidate=stanza.define({name:"remoteCandidate",namespace:NS,element:"remote-candidate",fields:{component:types.attribute("component"),ip:types.attribute("ip"),port:types.attribute("port")}}),Candidate=stanza.define({name:"_iceUdpCandidate",namespace:NS,element:"candidate",fields:{component:types.attribute("component"),foundation:types.attribute("foundation"),generation:types.attribute("generation"),id:types.attribute("id"),ip:types.attribute("ip"),network:types.attribute("network"),port:types.attribute("port"),priority:types.attribute("priority"),protocol:types.attribute("protocol"),relAddr:types.attribute("rel-addr"),relPort:types.attribute("rel-port"),tcpType:types.attribute("tcptype"),type:types.attribute("type")}}),Fingerprint=stanza.define({name:"_iceFingerprint",namespace:"urn:xmpp:jingle:apps:dtls:0",element:"fingerprint",fields:{hash:types.attribute("hash"),setup:types.attribute("setup"),value:types.text(),required:types.boolAttribute("required")}}),SctpMap=stanza.define({name:"_sctpMap",namespace:"urn:xmpp:jingle:transports:dtls-sctp:1",element:"sctpmap",fields:{number:types.attribute("number"),protocol:types.attribute("protocol"),streams:types.attribute("streams")}});stanza.extend(ICE,Candidate,"candidates"),stanza.extend(ICE,RemoteCandidate),stanza.extend(ICE,Fingerprint,"fingerprints"),stanza.extend(ICE,SctpMap,"sctp"),stanza.withDefinition("content","urn:xmpp:jingle:1",function(Content){stanza.extend(Content,ICE)})}},{}],139:[function(require,module){"use strict";module.exports=function(stanza){var types=stanza.utils,Iq=stanza.define({name:"iq",namespace:"jabber:client",element:"iq",topLevel:!0,fields:{lang:types.langAttribute(),id:types.attribute("id"),to:types.attribute("to"),from:types.attribute("from"),type:types.attribute("type")}}),toJSON=Iq.prototype.toJSON;Iq.prototype.toJSON=function(){var result=toJSON.call(this);return result.resultReply=this.resultReply,result.errorReply=this.errorReply,result},Iq.prototype.resultReply=function(data){return data=data||{},data.to=this.from,data.id=this.id,data.type="result",new Iq(data)},Iq.prototype.errorReply=function(data){return data=data||{},data.to=this.from,data.id=this.id,data.type="error",new Iq(data)}}},{}],140:[function(require,module){"use strict";var NS="urn:xmpp:jingle:1",REASONS=["alternative-session","busy","cancel","connectivity-error","decline","expired","failed-application","failed-transport","general-error","gone","incompatible-parameters","media-error","security-error","success","timeout","unsupported-applications","unsupported-transports"];module.exports=function(stanza){var types=stanza.utils,Jingle=stanza.define({name:"jingle",namespace:NS,element:"jingle",fields:{action:types.attribute("action"),initiator:types.attribute("initiator"),responder:types.attribute("responder"),sid:types.attribute("sid")}}),Content=stanza.define({name:"_jingleContent",namespace:NS,element:"content",fields:{creator:types.attribute("creator"),disposition:types.attribute("disposition","session"),name:types.attribute("name"),senders:types.attribute("senders","both"),description:{get:function(){for(var opts=stanza.tagged("jingle-description").map(function(Description){return Description.prototype._name}),i=0,len=opts.length;len>i;i++)if(this._extensions[opts[i]])return this._extensions[opts[i]]},set:function(value){var ext="_"+value.descType;this[ext]=value}},transport:{get:function(){for(var opts=stanza.tagged("jingle-transport").map(function(Transport){return Transport.prototype._name}),i=0,len=opts.length;len>i;i++)if(this._extensions[opts[i]])return this._extensions[opts[i]]},set:function(value){var ext="_"+value.transType;this[ext]=value}}}}),Reason=stanza.define({name:"reason",namespace:NS,element:"reason",fields:{condition:types.enumSub(NS,REASONS),alternativeSession:{get:function(){return types.getSubText(this.xml,NS,"alternative-session")},set:function(value){this.condition="alternative-session",types.setSubText(this.xml,NS,"alternative-session",value)}},text:types.textSub(NS,"text")}});stanza.extend(Jingle,Content,"contents"),stanza.extend(Jingle,Reason)}},{}],141:[function(require,module){"use strict";var NS="urn:xmpp:jingle:apps:rtp:1",FBNS="urn:xmpp:jingle:apps:rtp:rtcp-fb:0",HDRNS="urn:xmpp:jingle:apps:rtp:rtp-hdrext:0",INFONS="urn:xmpp:jingle:apps:rtp:info:1",SSMANS="urn:xmpp:jingle:apps:rtp:ssma:0",GROUPNS="urn:xmpp:jingle:apps:grouping:0";module.exports=function(stanza){var types=stanza.utils,Feedback={get:function(){var existing=types.find(this.xml,FBNS,"rtcp-fb"),result=[];return existing.forEach(function(xml){result.push({type:types.getAttribute(xml,"type"),subtype:types.getAttribute(xml,"subtype")})}),existing=types.find(this.xml,FBNS,"rtcp-fb-trr-int"),existing.forEach(function(xml){result.push({type:types.getAttribute(xml,"type"),value:types.getAttribute(xml,"value")})}),result},set:function(values){var self=this,existing=types.find(this.xml,FBNS,"rtcp-fb");existing.forEach(function(item){self.xml.removeChild(item)}),existing=types.find(this.xml,FBNS,"rtcp-fb-trr-int"),existing.forEach(function(item){self.xml.removeChild(item)}),values.forEach(function(value){var fb;"trr-int"===value.type?(fb=types.createElement(FBNS,"rtcp-fb-trr-int",NS),types.setAttribute(fb,"type",value.type),types.setAttribute(fb,"value",value.value)):(fb=types.createElement(FBNS,"rtcp-fb",NS),types.setAttribute(fb,"type",value.type),types.setAttribute(fb,"subtype",value.subtype)),self.xml.appendChild(fb)})}},Bandwidth=stanza.define({name:"bandwidth",namespace:NS,element:"bandwidth",fields:{type:types.attribute("type"),bandwidth:types.text()}}),RTP=stanza.define({name:"_rtp",namespace:NS,element:"description",tags:["jingle-description"],fields:{descType:{value:"rtp"},media:types.attribute("media"),ssrc:types.attribute("ssrc"),mux:types.boolSub(NS,"rtcp-mux"),encryption:{get:function(){var enc=types.find(this.xml,NS,"encryption");if(!enc.length)return[];enc=enc[0];var self=this,data=types.find(enc,NS,"crypto"),results=[];return data.forEach(function(xml){results.push(new Crypto({},xml,self).toJSON())}),results},set:function(values){var enc=types.find(this.xml,NS,"encryption");if(enc.length&&this.xml.removeChild(enc),values.length){types.setBoolSubAttribute(this.xml,NS,"encryption","required",!0),enc=types.find(this.xml,NS,"encryption")[0];var self=this;values.forEach(function(value){var content=new Crypto(value,null,self);enc.appendChild(content.xml)})}}},feedback:Feedback,headerExtensions:{get:function(){var existing=types.find(this.xml,HDRNS,"rtp-hdrext"),result=[];return existing.forEach(function(xml){result.push({id:types.getAttribute(xml,"id"),uri:types.getAttribute(xml,"uri"),senders:types.getAttribute(xml,"senders")})}),result},set:function(values){var self=this,existing=types.find(this.xml,HDRNS,"rtp-hdrext");existing.forEach(function(item){self.xml.removeChild(item)}),values.forEach(function(value){var hdr=types.createElement(HDRNS,"rtp-hdrext",NS);types.setAttribute(hdr,"id",value.id),types.setAttribute(hdr,"uri",value.uri),types.setAttribute(hdr,"senders",value.senders),self.xml.appendChild(hdr)})}}}}),PayloadType=stanza.define({name:"_payloadType",namespace:NS,element:"payload-type",fields:{channels:types.attribute("channels"),clockrate:types.attribute("clockrate"),id:types.attribute("id"),maxptime:types.attribute("maxptime"),name:types.attribute("name"),ptime:types.attribute("ptime"),feedback:Feedback,parameters:{get:function(){var result=[],params=types.find(this.xml,NS,"parameter");return params.forEach(function(param){result.push({key:types.getAttribute(param,"name"),value:types.getAttribute(param,"value")})}),result},set:function(values){var self=this;values.forEach(function(value){var param=types.createElement(NS,"parameter");types.setAttribute(param,"name",value.key),types.setAttribute(param,"value",value.value),self.xml.appendChild(param)})}}}}),Crypto=stanza.define({name:"crypto",namespace:NS,element:"crypto",fields:{cipherSuite:types.attribute("crypto-suite"),keyParams:types.attribute("key-params"),sessionParams:types.attribute("session-params"),tag:types.attribute("tag")}}),ContentGroup=stanza.define({name:"_group",namespace:GROUPNS,element:"group",fields:{semantics:types.attribute("semantics"),contents:types.multiSubAttribute(GROUPNS,"content","name")}}),SourceGroup=stanza.define({name:"_sourceGroup",namespace:SSMANS,element:"ssrc-group",fields:{semantics:types.attribute("semantics"),sources:types.multiSubAttribute(SSMANS,"source","ssrc")}}),Source=stanza.define({name:"_source",namespace:SSMANS,element:"source",fields:{ssrc:types.attribute("ssrc"),parameters:{get:function(){var result=[],params=types.find(this.xml,SSMANS,"parameter");return params.forEach(function(param){result.push({key:types.getAttribute(param,"name"),value:types.getAttribute(param,"value")})}),result},set:function(values){var self=this;values.forEach(function(value){var param=types.createElement(SSMANS,"parameter");types.setAttribute(param,"name",value.key),types.setAttribute(param,"value",value.value),self.xml.appendChild(param)})}}}}),Mute=stanza.define({name:"mute",namespace:INFONS,element:"mute",fields:{creator:types.attribute("creator"),name:types.attribute("name")}}),Unmute=stanza.define({name:"unmute",namespace:INFONS,element:"unmute",fields:{creator:types.attribute("creator"),name:types.attribute("name")}});stanza.extend(RTP,Bandwidth),stanza.extend(RTP,PayloadType,"payloads"),stanza.extend(RTP,Source,"sources"),stanza.extend(RTP,SourceGroup,"sourceGroups"),stanza.withDefinition("content","urn:xmpp:jingle:1",function(Content){stanza.extend(Content,RTP)}),stanza.withDefinition("jingle","urn:xmpp:jingle:1",function(Jingle){stanza.extend(Jingle,Mute),stanza.extend(Jingle,Unmute),stanza.extend(Jingle,ContentGroup,"groups"),stanza.add(Jingle,"ringing",types.boolSub(INFONS,"ringing")),stanza.add(Jingle,"hold",types.boolSub(INFONS,"hold")),stanza.add(Jingle,"active",types.boolSub(INFONS,"active"))})}},{}],142:[function(require){"use strict";var JSM=require("jingle"),RTC=require("webrtc-adapter-test"),jxt=require("jxt").createRegistry();jxt.use(require("./stanza/iq.js")),jxt.use(require("./stanza/jingle.js")),jxt.use(require("./stanza/rtp.js")),jxt.use(require("./stanza/iceUdp.js"));var IqStanza=jxt.getDefinition("iq","jabber:client"),JingleStanza=jxt.getDefinition("jingle","urn:xmpp:jingle:1");jxt.extend(IqStanza,JingleStanza),function($){Strophe.addConnectionPlugin("jingle",{connection:null,peer_constraints:{},AUTOACCEPT:!1,localStream:null,manager:null,RTC:null,init:function(conn){var self=this;self.RTC=RTC,self.connection=conn,RTC.webrtcDetectedVersion<33&&"firefox"===RTC.webrtcDetectedBrowser||"chrome"===RTC.webrtcDetectedBrowser?(self.peer_constraints={mandatory:{OfferToReceiveAudio:!0,OfferToReceiveVideo:!0}},"firefox"===RTC.webrtcDetectedBrowser&&(self.peer_constraints.mandatory.MozDontOfferDataChannel=!0)):(self.peer_constraints={offerToReceiveAudio:!0,offerToReceiveVideo:!0},"firefox"===RTC.webrtcDetectedBrowser&&(self.peer_constraints.mozDontOfferDataChannel=!0)),self.manager=new JSM({peerConnectionConstraints:self.peer_constraints,jid:self.connection.jid,selfID:self.connection.jid});var events={incoming:"callincoming.jingle",terminated:"callterminated.jingle",peerStreamAdded:"remotestreamadded.jingle",peerStreamRemoved:"remotestreamremoved.jingle",ringing:"ringing.jingle","log:error":"error.jingle"};if($.each(events,function(key,val){self.manager.on(key,function(){$(document).trigger(val,arguments)})}),self.manager.on("incoming",function(session){session.on("change:connectionState",function(session,state){$(document).trigger("iceconnectionstatechange.jingle",[session.sid,session,state])})}),this.connection.disco){var i;for(i=0;i<self.manager.capabilities.length;i++)self.connection.disco.addFeature(self.manager.capabilities[i])}this.connection.addHandler(this.onJingle.bind(this),"urn:xmpp:jingle:1","iq","set",null,null),this.manager.on("send",function(data){var iq=new IqStanza(data);self.connection.send($.parseXML(iq.toString()).getElementsByTagName("iq")[0])})},onJingle:function(iq){var req=jxt.parse(iq.outerHTML);return this.manager.process(req),!0},initiate:function(peerjid,stream){var session=this.manager.createMediaSession(peerjid);return session.on("change:connectionState",function(session,state){$(document).trigger("iceconnectionstatechange.jingle",[session.sid,session,state])}),stream&&(this.localStream=stream),this.localStream?(session.addStream(this.localStream),session.start(),session):void console.error("No local stream defined")},terminate:function(jid,reason,silent){"undefined"==typeof jid||null===jid?this.manager.endAllSessions(reason,silent):this.manager.endPeerSessions(jid,reason,silent)},terminateByJid:function(jid){this.manager.endPeerSessions(jid)},addICEServer:function(server){this.manager.addICEServer(server)},setICEServers:function(servers){this.manager.iceServers=servers},setPeerConstraints:function(constraints){this.manager.config.peerConnectionConstraints=constraints}})}(jQuery)},{"./stanza/iceUdp.js":138,"./stanza/iq.js":139,"./stanza/jingle.js":140,"./stanza/rtp.js":141,jingle:25,jxt:114,"webrtc-adapter-test":137}]},{},[142]),function(root,factory){"function"==typeof define&&define.amd?define(factory):"undefined"!=typeof module&&module.exports?module.exports=factory():root.Salsa20=factory()}(this,function(){function Salsa20(key,nonce){this.rounds=20,this.sigmaWords=[1634760805,857760878,2036477234,1797285236],this.keyWords=[],this.nonceWords=[0,0],this.counterWords=[0,0],this.block=[],this.blockUsed=64,this.setKey(key),this.setNonce(nonce)}return Salsa20.prototype.setKey=function(key){for(var i=0,j=0;8>i;i++,j+=4)this.keyWords[i]=255&key[j]|(255&key[j+1])<<8|(255&key[j+2])<<16|(255&key[j+3])<<24;this._reset()},Salsa20.prototype.setNonce=function(nonce){this.nonceWords[0]=255&nonce[0]|(255&nonce[1])<<8|(255&nonce[2])<<16|(255&nonce[3])<<24,this.nonceWords[1]=255&nonce[4]|(255&nonce[5])<<8|(255&nonce[6])<<16|(255&nonce[7])<<24,this._reset()},Salsa20.prototype.getBytes=function(numberOfBytes){for(var out=new Array(numberOfBytes),i=0;numberOfBytes>i;i++)64==this.blockUsed&&(this._generateBlock(),this._incrementCounter(),this.blockUsed=0),out[i]=this.block[this.blockUsed],this.blockUsed++;return out},Salsa20.prototype.getHexString=function(numberOfBytes){for(var hex=["0","1","2","3","4","5","6","7","8","9","a","b","c","d","e","f"],out=[],bytes=this.getBytes(numberOfBytes),i=0;i<bytes.length;i++)out.push(hex[bytes[i]>>4&15]),out.push(hex[15&bytes[i]]);return out.join("")},Salsa20.prototype._reset=function(){this.counterWords[0]=0,this.counterWords[1]=0,this.blockUsed=64},Salsa20.prototype._incrementCounter=function(){this.counterWords[0]=this.counterWords[0]+1&4294967295,0==this.counterWords[0]&&(this.counterWords[1]=this.counterWords[1]+1&4294967295)},Salsa20.prototype._generateBlock=function(){for(var u,j0=this.sigmaWords[0],j1=this.keyWords[0],j2=this.keyWords[1],j3=this.keyWords[2],j4=this.keyWords[3],j5=this.sigmaWords[1],j6=this.nonceWords[0],j7=this.nonceWords[1],j8=this.counterWords[0],j9=this.counterWords[1],j10=this.sigmaWords[2],j11=this.keyWords[4],j12=this.keyWords[5],j13=this.keyWords[6],j14=this.keyWords[7],j15=this.sigmaWords[3],x0=j0,x1=j1,x2=j2,x3=j3,x4=j4,x5=j5,x6=j6,x7=j7,x8=j8,x9=j9,x10=j10,x11=j11,x12=j12,x13=j13,x14=j14,x15=j15,i=0;i<this.rounds;i+=2)u=x0+x12,x4^=u<<7|u>>>25,u=x4+x0,x8^=u<<9|u>>>23,u=x8+x4,x12^=u<<13|u>>>19,u=x12+x8,x0^=u<<18|u>>>14,u=x5+x1,x9^=u<<7|u>>>25,u=x9+x5,x13^=u<<9|u>>>23,u=x13+x9,x1^=u<<13|u>>>19,u=x1+x13,x5^=u<<18|u>>>14,u=x10+x6,x14^=u<<7|u>>>25,u=x14+x10,x2^=u<<9|u>>>23,u=x2+x14,x6^=u<<13|u>>>19,u=x6+x2,x10^=u<<18|u>>>14,u=x15+x11,x3^=u<<7|u>>>25,u=x3+x15,x7^=u<<9|u>>>23,u=x7+x3,x11^=u<<13|u>>>19,u=x11+x7,x15^=u<<18|u>>>14,u=x0+x3,x1^=u<<7|u>>>25,u=x1+x0,x2^=u<<9|u>>>23,u=x2+x1,x3^=u<<13|u>>>19,u=x3+x2,x0^=u<<18|u>>>14,u=x5+x4,x6^=u<<7|u>>>25,u=x6+x5,x7^=u<<9|u>>>23,u=x7+x6,x4^=u<<13|u>>>19,u=x4+x7,x5^=u<<18|u>>>14,u=x10+x9,x11^=u<<7|u>>>25,u=x11+x10,x8^=u<<9|u>>>23,u=x8+x11,x9^=u<<13|u>>>19,u=x9+x8,x10^=u<<18|u>>>14,u=x15+x14,x12^=u<<7|u>>>25,u=x12+x15,x13^=u<<9|u>>>23,u=x13+x12,x14^=u<<13|u>>>19,u=x14+x13,x15^=u<<18|u>>>14;
+x0+=j0,x1+=j1,x2+=j2,x3+=j3,x4+=j4,x5+=j5,x6+=j6,x7+=j7,x8+=j8,x9+=j9,x10+=j10,x11+=j11,x12+=j12,x13+=j13,x14+=j14,x15+=j15,this.block[0]=x0>>>0&255,this.block[1]=x0>>>8&255,this.block[2]=x0>>>16&255,this.block[3]=x0>>>24&255,this.block[4]=x1>>>0&255,this.block[5]=x1>>>8&255,this.block[6]=x1>>>16&255,this.block[7]=x1>>>24&255,this.block[8]=x2>>>0&255,this.block[9]=x2>>>8&255,this.block[10]=x2>>>16&255,this.block[11]=x2>>>24&255,this.block[12]=x3>>>0&255,this.block[13]=x3>>>8&255,this.block[14]=x3>>>16&255,this.block[15]=x3>>>24&255,this.block[16]=x4>>>0&255,this.block[17]=x4>>>8&255,this.block[18]=x4>>>16&255,this.block[19]=x4>>>24&255,this.block[20]=x5>>>0&255,this.block[21]=x5>>>8&255,this.block[22]=x5>>>16&255,this.block[23]=x5>>>24&255,this.block[24]=x6>>>0&255,this.block[25]=x6>>>8&255,this.block[26]=x6>>>16&255,this.block[27]=x6>>>24&255,this.block[28]=x7>>>0&255,this.block[29]=x7>>>8&255,this.block[30]=x7>>>16&255,this.block[31]=x7>>>24&255,this.block[32]=x8>>>0&255,this.block[33]=x8>>>8&255,this.block[34]=x8>>>16&255,this.block[35]=x8>>>24&255,this.block[36]=x9>>>0&255,this.block[37]=x9>>>8&255,this.block[38]=x9>>>16&255,this.block[39]=x9>>>24&255,this.block[40]=x10>>>0&255,this.block[41]=x10>>>8&255,this.block[42]=x10>>>16&255,this.block[43]=x10>>>24&255,this.block[44]=x11>>>0&255,this.block[45]=x11>>>8&255,this.block[46]=x11>>>16&255,this.block[47]=x11>>>24&255,this.block[48]=x12>>>0&255,this.block[49]=x12>>>8&255,this.block[50]=x12>>>16&255,this.block[51]=x12>>>24&255,this.block[52]=x13>>>0&255,this.block[53]=x13>>>8&255,this.block[54]=x13>>>16&255,this.block[55]=x13>>>24&255,this.block[56]=x14>>>0&255,this.block[57]=x14>>>8&255,this.block[58]=x14>>>16&255,this.block[59]=x14>>>24&255,this.block[60]=x15>>>0&255,this.block[61]=x15>>>8&255,this.block[62]=x15>>>16&255,this.block[63]=x15>>>24&255},Salsa20}),function(root,factory){if("function"==typeof define&&define.amd)define(factory.bind(root,root.crypto||root.msCrypto));else if("undefined"!=typeof module&&module.exports)module.exports=factory(require("crypto"));else try{root.BigInt=factory(root.crypto||root.msCrypto)}catch(e){console.warn(e.message)}}(this,function(crypto){function findPrimes(n){var i,s,p,ans;for(s=new Array(n),i=0;n>i;i++)s[i]=0;for(s[0]=2,p=0;s[p]<n;){for(i=s[p]*s[p];n>i;i+=s[p])s[i]=1;for(p++,s[p]=s[p-1]+1;s[p]<n&&s[s[p]];s[p]++);}for(ans=new Array(p),i=0;p>i;i++)ans[i]=s[i];return ans}function millerRabin(x,b){var i,j,k,s;if(mr_x1.length!=x.length&&(mr_x1=dup(x),mr_r=dup(x),mr_a=dup(x)),copy_(mr_a,b),copy_(mr_r,x),copy_(mr_x1,x),addInt_(mr_r,-1),addInt_(mr_x1,-1),isZero(mr_r))return 0;for(k=0;0==mr_r[k];k++);for(i=1,j=2;mr_r[k]%j==0;j*=2,i++);if(s=k*bpe+i-1,s&&rightShift_(mr_r,s),powMod_(mr_a,mr_r,x),!equalsInt(mr_a,1)&&!equals(mr_a,mr_x1)){for(j=1;s-1>=j&&!equals(mr_a,mr_x1);){if(squareMod_(mr_a,x),equalsInt(mr_a,1))return 0;j++}if(!equals(mr_a,mr_x1))return 0}return 1}function bitSize(x){var j,z,w;for(j=x.length-1;0==x[j]&&j>0;j--);for(z=0,w=x[j];w;w>>=1,z++);return z+=bpe*j}function expand(x,n){var ans=int2bigInt(0,(x.length>n?x.length:n)*bpe,0);return copy_(ans,x),ans}function mod(x,n){var ans=dup(x);return mod_(ans,n),trim(ans,1)}function mult(x,y){var ans=expand(x,x.length+y.length);return mult_(ans,y),trim(ans,1)}function powMod(x,y,n){var ans=expand(x,n.length);return powMod_(ans,trim(y,2),trim(n,2),0),trim(ans,1)}function sub(x,y){var ans=expand(x,x.length>y.length?x.length+1:y.length+1);return sub_(ans,y),trim(ans,1)}function add(x,y){var ans=expand(x,x.length>y.length?x.length+1:y.length+1);return add_(ans,y),trim(ans,1)}function inverseMod(x,n){var s,ans=expand(x,n.length);return s=inverseMod_(ans,n),s?trim(ans,1):null}function multMod(x,y,n){var ans=expand(x,n.length);return multMod_(ans,y,n),trim(ans,1)}function randBigInt(n,s){var a,b;return a=Math.floor((n-1)/bpe)+2,b=int2bigInt(0,0,a),randBigInt_(b,n,s),b}function randBigInt_(b,n,s){var i,a;for(i=0;i<b.length;i++)b[i]=0;for(a=Math.floor((n-1)/bpe)+1,i=0;a>i;i++)b[i]=randomBitInt(bpe);b[a-1]&=(2<<(n-1)%bpe)-1,1==s&&(b[a-1]|=1<<(n-1)%bpe)}function inverseMod_(x,n){var k=1+2*Math.max(x.length,n.length);if(!(1&x[0]||1&n[0]))return copyInt_(x,0),0;for(eg_u.length!=k&&(eg_u=new Array(k),eg_v=new Array(k),eg_A=new Array(k),eg_B=new Array(k),eg_C=new Array(k),eg_D=new Array(k)),copy_(eg_u,x),copy_(eg_v,n),copyInt_(eg_A,1),copyInt_(eg_B,0),copyInt_(eg_C,0),copyInt_(eg_D,1);;){for(;!(1&eg_u[0]);)halve_(eg_u),1&eg_A[0]||1&eg_B[0]?(add_(eg_A,n),halve_(eg_A),sub_(eg_B,x),halve_(eg_B)):(halve_(eg_A),halve_(eg_B));for(;!(1&eg_v[0]);)halve_(eg_v),1&eg_C[0]||1&eg_D[0]?(add_(eg_C,n),halve_(eg_C),sub_(eg_D,x),halve_(eg_D)):(halve_(eg_C),halve_(eg_D));if(greater(eg_v,eg_u)?(sub_(eg_v,eg_u),sub_(eg_C,eg_A),sub_(eg_D,eg_B)):(sub_(eg_u,eg_v),sub_(eg_A,eg_C),sub_(eg_B,eg_D)),equalsInt(eg_u,0)){for(;negative(eg_C);)add_(eg_C,n);return copy_(x,eg_C),equalsInt(eg_v,1)?1:(copyInt_(x,0),0)}}}function inverseModInt(x,n){for(var a=1,b=0;;){if(1==x)return a;if(0==x)return 0;if(b-=a*Math.floor(n/x),n%=x,1==n)return b;if(0==n)return 0;a-=b*Math.floor(x/n),x%=n}}function negative(x){return x[x.length-1]>>bpe-1&1}function greaterShift(x,y,shift){var i,kx=x.length,ky=y.length,k=ky>kx+shift?kx+shift:ky;for(i=ky-1-shift;kx>i&&i>=0;i++)if(x[i]>0)return 1;for(i=kx-1+shift;ky>i;i++)if(y[i]>0)return 0;for(i=k-1;i>=shift;i--){if(x[i-shift]>y[i])return 1;if(x[i-shift]<y[i])return 0}return 0}function greater(x,y){var i,k=x.length<y.length?x.length:y.length;for(i=x.length;i<y.length;i++)if(y[i])return 0;for(i=y.length;i<x.length;i++)if(x[i])return 1;for(i=k-1;i>=0;i--){if(x[i]>y[i])return 1;if(x[i]<y[i])return 0}return 0}function divide_(x,y,q,r){var kx,ky,i,y1,y2,c,a,b;for(copy_(r,x),ky=y.length;0==y[ky-1];ky--);for(b=y[ky-1],a=0;b;a++)b>>=1;for(a=bpe-a,leftShift_(y,a),leftShift_(r,a),kx=r.length;0==r[kx-1]&&kx>ky;kx--);for(copyInt_(q,0);!greaterShift(y,r,kx-ky);)subShift_(r,y,kx-ky),q[kx-ky]++;for(i=kx-1;i>=ky;i--){for(q[i-ky]=r[i]==y[ky-1]?mask:Math.floor((r[i]*radix+r[i-1])/y[ky-1]);y2=(ky>1?y[ky-2]:0)*q[i-ky],c=y2,y2&=mask,c=(c-y2)/radix,y1=c+q[i-ky]*y[ky-1],c=y1,y1&=mask,c=(c-y1)/radix,c==r[i]?y1==r[i-1]?y2>(i>1?r[i-2]:0):y1>r[i-1]:c>r[i];)q[i-ky]--;linCombShift_(r,y,-q[i-ky],i-ky),negative(r)&&(addShift_(r,y,i-ky),q[i-ky]--)}rightShift_(y,a),rightShift_(r,a)}function modInt(x,n){var i,c=0;for(i=x.length-1;i>=0;i--)c=(c*radix+x[i])%n;return c}function int2bigInt(t,bits,minSize){var k,buff;return k=Math.ceil(bits/bpe)+1,k=minSize>k?minSize:k,buff=new Array(k),copyInt_(buff,t),buff}function str2bigInt(s,base,minSize){var d,i,x,y,kk,k=s.length;if(-1==base){for(x=new Array(0);;){for(y=new Array(x.length+1),i=0;i<x.length;i++)y[i+1]=x[i];if(y[0]=parseInt(s,10),x=y,d=s.indexOf(",",0),1>d)break;if(s=s.substring(d+1),0==s.length)break}return x.length<minSize?(y=new Array(minSize),copy_(y,x),y):x}for(var bb=base,p=0,b=1==base?k:0;bb>1;)1&bb&&(p=1),b+=k,bb>>=1;for(b+=p*k,x=int2bigInt(0,b,0),i=0;k>i&&(d=digitsStr.indexOf(s.substring(i,i+1),0),36>=base&&d>=36&&(d-=26),!(d>=base||0>d));i++)multInt_(x,base),addInt_(x,d);for(k=x.length;k>0&&!x[k-1];k--);for(k=minSize>k+1?minSize:k+1,y=new Array(k),kk=k<x.length?k:x.length,i=0;kk>i;i++)y[i]=x[i];for(;k>i;i++)y[i]=0;return y}function equalsInt(x,y){var i;if(x[0]!=y)return 0;for(i=1;i<x.length;i++)if(x[i])return 0;return 1}function equals(x,y){var i,k=x.length<y.length?x.length:y.length;for(i=0;k>i;i++)if(x[i]!=y[i])return 0;if(x.length>y.length){for(;i<x.length;i++)if(x[i])return 0}else for(;i<y.length;i++)if(y[i])return 0;return 1}function isZero(x){var i;for(i=0;i<x.length;i++)if(x[i])return 0;return 1}function bigInt2str(x,base){var i,t,s="";if(s6.length!=x.length?s6=dup(x):copy_(s6,x),-1==base){for(i=x.length-1;i>0;i--)s+=x[i]+",";s+=x[0]}else for(;!isZero(s6);)t=divInt_(s6,base),s=digitsStr.substring(t,t+1)+s;return 0==s.length&&(s="0"),s}function dup(x){var buff;return buff=new Array(x.length),copy_(buff,x),buff}function copy_(x,y){var i,k=x.length<y.length?x.length:y.length;for(i=0;k>i;i++)x[i]=y[i];for(i=k;i<x.length;i++)x[i]=0}function copyInt_(x,n){var i,c;for(c=n,i=0;i<x.length;i++)x[i]=c&mask,c>>=bpe}function addInt_(x,n){var i,k,c,b;for(x[0]+=n,k=x.length,c=0,i=0;k>i;i++)if(c+=x[i],b=0,0>c&&(b=c&mask,b=-((c-b)/radix),c+=b*radix),x[i]=c&mask,c=(c-x[i])/radix-b,!c)return}function rightShift_(x,n){var i,k=Math.floor(n/bpe);if(k){for(i=0;i<x.length-k;i++)x[i]=x[i+k];for(;i<x.length;i++)x[i]=0;n%=bpe}for(i=0;i<x.length-1;i++)x[i]=mask&(x[i+1]<<bpe-n|x[i]>>n);x[i]>>=n}function halve_(x){var i;for(i=0;i<x.length-1;i++)x[i]=mask&(x[i+1]<<bpe-1|x[i]>>1);x[i]=x[i]>>1|x[i]&radix>>1}function leftShift_(x,n){var i,k=Math.floor(n/bpe);if(k){for(i=x.length;i>=k;i--)x[i]=x[i-k];for(;i>=0;i--)x[i]=0;n%=bpe}if(n){for(i=x.length-1;i>0;i--)x[i]=mask&(x[i]<<n|x[i-1]>>bpe-n);x[i]=mask&x[i]<<n}}function multInt_(x,n){var i,k,c,b;if(n)for(k=x.length,c=0,i=0;k>i;i++)c+=x[i]*n,b=0,0>c&&(b=c&mask,b=-((c-b)/radix),c+=b*radix),x[i]=c&mask,c=(c-x[i])/radix-b}function divInt_(x,n){var i,s,r=0;for(i=x.length-1;i>=0;i--)s=r*radix+x[i],x[i]=Math.floor(s/n),r=s%n;return r}function linCombShift_(x,y,b,ys){var i,c,k,kk;for(k=x.length<ys+y.length?x.length:ys+y.length,kk=x.length,c=0,i=ys;k>i;i++)c+=x[i]+b*y[i-ys],x[i]=c&mask,c=(c-x[i])/radix;for(i=k;c&&kk>i;i++)c+=x[i],x[i]=c&mask,c=(c-x[i])/radix}function addShift_(x,y,ys){var i,c,k,kk;for(k=x.length<ys+y.length?x.length:ys+y.length,kk=x.length,c=0,i=ys;k>i;i++)c+=x[i]+y[i-ys],x[i]=c&mask,c=(c-x[i])/radix;for(i=k;c&&kk>i;i++)c+=x[i],x[i]=c&mask,c=(c-x[i])/radix}function subShift_(x,y,ys){var i,c,k,kk;for(k=x.length<ys+y.length?x.length:ys+y.length,kk=x.length,c=0,i=ys;k>i;i++)c+=x[i]-y[i-ys],x[i]=c&mask,c=(c-x[i])/radix;for(i=k;c&&kk>i;i++)c+=x[i],x[i]=c&mask,c=(c-x[i])/radix}function sub_(x,y){var i,c,k;for(k=x.length<y.length?x.length:y.length,c=0,i=0;k>i;i++)c+=x[i]-y[i],x[i]=c&mask,c=(c-x[i])/radix;for(i=k;c&&i<x.length;i++)c+=x[i],x[i]=c&mask,c=(c-x[i])/radix}function add_(x,y){var i,c,k;for(k=x.length<y.length?x.length:y.length,c=0,i=0;k>i;i++)c+=x[i]+y[i],x[i]=c&mask,c=(c-x[i])/radix;for(i=k;c&&i<x.length;i++)c+=x[i],x[i]=c&mask,c=(c-x[i])/radix}function mult_(x,y){var i;for(ss.length!=2*x.length&&(ss=new Array(2*x.length)),copyInt_(ss,0),i=0;i<y.length;i++)y[i]&&linCombShift_(ss,x,y[i],i);copy_(x,ss)}function mod_(x,n){s4.length!=x.length?s4=dup(x):copy_(s4,x),s5.length!=x.length&&(s5=dup(x)),divide_(s4,n,s5,x)}function multMod_(x,y,n){var i;for(s0.length!=2*x.length&&(s0=new Array(2*x.length)),copyInt_(s0,0),i=0;i<y.length;i++)y[i]&&linCombShift_(s0,x,y[i],i);mod_(s0,n),copy_(x,s0)}function squareMod_(x,n){var i,j,c,kx,k;for(kx=x.length;kx>0&&!x[kx-1];kx--);for(k=kx>n.length?2*kx:2*n.length,s0.length!=k&&(s0=new Array(k)),copyInt_(s0,0),i=0;kx>i;i++){for(c=s0[2*i]+x[i]*x[i],s0[2*i]=c&mask,c=(c-s0[2*i])/radix,j=i+1;kx>j;j++)c=s0[i+j]+2*x[i]*x[j]+c,s0[i+j]=c&mask,c=(c-s0[i+j])/radix;s0[i+kx]=c}mod_(s0,n),copy_(x,s0)}function trim(x,k){var i,y;for(i=x.length;i>0&&!x[i-1];i--);return y=new Array(i+k),copy_(y,x),y}function powMod_(x,y,n){var k1,k2,kn,np;if(s7.length!=n.length&&(s7=dup(n)),0!=(1&n[0])){for(copyInt_(s7,0),kn=n.length;kn>0&&!n[kn-1];kn--);for(np=radix-inverseModInt(modInt(n,radix),radix),s7[kn]=1,multMod_(x,s7,n),s3.length!=x.length?s3=dup(x):copy_(s3,x),k1=y.length-1;k1>0&!y[k1];k1--);if(0==y[k1])return void copyInt_(x,1);for(k2=1<<bpe-1;k2&&!(y[k1]&k2);k2>>=1);for(;;){if(!(k2>>=1)){if(k1--,0>k1)return void mont_(x,one,n,np);k2=1<<bpe-1}mont_(x,x,n,np),k2&y[k1]&&mont_(x,s3,n,np)}}else for(copy_(s7,x),copyInt_(x,1);!equalsInt(y,0);)1&y[0]&&multMod_(x,s7,n),divInt_(y,2),squareMod_(s7,n)}function mont_(x,y,n,np){var i,j,c,ui,t,t2,ks,kn=n.length,ky=y.length;for(sa.length!=kn&&(sa=new Array(kn)),copyInt_(sa,0);kn>0&&0==n[kn-1];kn--);for(;ky>0&&0==y[ky-1];ky--);for(ks=sa.length-1,i=0;kn>i;i++){for(t=sa[0]+x[i]*y[0],ui=(t&mask)*np&mask,c=t+ui*n[0],c=(c-(c&mask))/radix,t=x[i],j=1;ky-4>j;)c+=sa[j]+ui*n[j]+t*y[j],t2=sa[j-1]=c&mask,c=(c-t2)/radix,j++,c+=sa[j]+ui*n[j]+t*y[j],t2=sa[j-1]=c&mask,c=(c-t2)/radix,j++,c+=sa[j]+ui*n[j]+t*y[j],t2=sa[j-1]=c&mask,c=(c-t2)/radix,j++,c+=sa[j]+ui*n[j]+t*y[j],t2=sa[j-1]=c&mask,c=(c-t2)/radix,j++,c+=sa[j]+ui*n[j]+t*y[j],t2=sa[j-1]=c&mask,c=(c-t2)/radix,j++;for(;ky>j;)c+=sa[j]+ui*n[j]+t*y[j],t2=sa[j-1]=c&mask,c=(c-t2)/radix,j++;for(;kn-4>j;)c+=sa[j]+ui*n[j],t2=sa[j-1]=c&mask,c=(c-t2)/radix,j++,c+=sa[j]+ui*n[j],t2=sa[j-1]=c&mask,c=(c-t2)/radix,j++,c+=sa[j]+ui*n[j],t2=sa[j-1]=c&mask,c=(c-t2)/radix,j++,c+=sa[j]+ui*n[j],t2=sa[j-1]=c&mask,c=(c-t2)/radix,j++,c+=sa[j]+ui*n[j],t2=sa[j-1]=c&mask,c=(c-t2)/radix,j++;for(;kn>j;)c+=sa[j]+ui*n[j],t2=sa[j-1]=c&mask,c=(c-t2)/radix,j++;for(;ks>j;)c+=sa[j],t2=sa[j-1]=c&mask,c=(c-t2)/radix,j++;sa[j-1]=c&mask}greater(n,sa)||sub_(sa,n),copy_(x,sa)}function divMod(num,den,n){return multMod(num,inverseMod(den,n),n)}function subMod(one,two,n){return one=mod(one,n),two=mod(two,n),greater(two,one)&&(one=add(one,n)),sub(one,two)}function twoToThe(m){for(var b=Math.floor(m/bpe)+2,t=new Array(b),i=0;b>i;i++)t[i]=0;return t[b-2]=1<<m%bpe,t}function bigInt2bits(bi,pad){pad||(pad=0),bi=dup(bi);for(var ba="";!isZero(bi);)ba=_num2bin[255&bi[0]]+ba,rightShift_(bi,8);for(;ba.length<pad;)ba="\x00"+ba;return ba}function ba2bigInt(data){var mpi=str2bigInt("0",10,data.length);return data.forEach(function(d,i){i&&leftShift_(mpi,8),mpi[0]|=d}),mpi}function getSeed(){return randomBytes(40)}function randomByte(){return randomBytes(1)[0]}function randomBitInt(k){if(k>31)throw new Error("Too many bits.");var i=0,r=0,b=Math.floor(k/8),mask=(1<<k%8)-1;for(mask&&(r=randomByte()&mask);b>i;i++)r=256*r+randomByte();return r}var bpe=26,radix=1<<bpe,mask=radix-1,digitsStr="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz_=!@#$%^&*()[]{}|;:,.<>/?`~ \\'\"+-",one=int2bigInt(1,1,1),t=new Array(0),ss=t,s0=t,s3=t,s4=t,s5=t,s6=t,s7=t,sa=t,mr_x1=t,mr_r=t,mr_a=t,eg_v=t,eg_u=t,eg_A=t,eg_B=t,eg_C=t,eg_D=t,primes=t,_num2bin=function(){for(var i=0,_num2bin={};256>i;++i)_num2bin[i]=String.fromCharCode(i);return _num2bin}(),randomBytes=function(){if("undefined"!=typeof crypto&&"function"==typeof crypto.randomBytes)return function(n){try{var buf=crypto.randomBytes(n)}catch(e){throw e}return Array.prototype.slice.call(buf,0)};if("undefined"!=typeof crypto&&"function"==typeof crypto.getRandomValues)return function(n){var buf=new Uint8Array(n);return crypto.getRandomValues(buf),Array.prototype.slice.call(buf,0)};throw new Error("Keys should not be generated without CSPRNG.")}();return{str2bigInt:str2bigInt,bigInt2str:bigInt2str,int2bigInt:int2bigInt,multMod:multMod,powMod:powMod,inverseMod:inverseMod,randBigInt:randBigInt,randBigInt_:randBigInt_,equals:equals,equalsInt:equalsInt,sub:sub,mod:mod,modInt:modInt,mult:mult,divInt_:divInt_,rightShift_:rightShift_,dup:dup,greater:greater,add:add,isZero:isZero,bitSize:bitSize,millerRabin:millerRabin,divide_:divide_,trim:trim,primes:primes,findPrimes:findPrimes,getSeed:getSeed,divMod:divMod,subMod:subMod,twoToThe:twoToThe,bigInt2bits:bigInt2bits,ba2bigInt:ba2bigInt}}),function(root,factory){"function"==typeof define&&define.amd?define(factory):"undefined"!=typeof module&&module.exports?module.exports=factory():root.CryptoJS=factory()}(this,function(){var CryptoJS=CryptoJS||function(Math,undefined){var C={},C_lib=C.lib={},Base=C_lib.Base=function(){function F(){}return{extend:function(overrides){F.prototype=this;var subtype=new F;return overrides&&subtype.mixIn(overrides),subtype.hasOwnProperty("init")||(subtype.init=function(){subtype.$super.init.apply(this,arguments)}),subtype.init.prototype=subtype,subtype.$super=this,subtype},create:function(){var instance=this.extend();return instance.init.apply(instance,arguments),instance},init:function(){},mixIn:function(properties){for(var propertyName in properties)properties.hasOwnProperty(propertyName)&&(this[propertyName]=properties[propertyName]);properties.hasOwnProperty("toString")&&(this.toString=properties.toString)},clone:function(){return this.init.prototype.extend(this)}}}(),WordArray=C_lib.WordArray=Base.extend({init:function(words,sigBytes){words=this.words=words||[],this.sigBytes=sigBytes!=undefined?sigBytes:4*words.length},toString:function(encoder){return(encoder||Hex).stringify(this)},concat:function(wordArray){var thisWords=this.words,thatWords=wordArray.words,thisSigBytes=this.sigBytes,thatSigBytes=wordArray.sigBytes;if(this.clamp(),thisSigBytes%4)for(var i=0;thatSigBytes>i;i++){var thatByte=thatWords[i>>>2]>>>24-i%4*8&255;thisWords[thisSigBytes+i>>>2]|=thatByte<<24-(thisSigBytes+i)%4*8}else if(thatWords.length>65535)for(var i=0;thatSigBytes>i;i+=4)thisWords[thisSigBytes+i>>>2]=thatWords[i>>>2];else thisWords.push.apply(thisWords,thatWords);return this.sigBytes+=thatSigBytes,this},clamp:function(){var words=this.words,sigBytes=this.sigBytes;words[sigBytes>>>2]&=4294967295<<32-sigBytes%4*8,words.length=Math.ceil(sigBytes/4)},clone:function(){var clone=Base.clone.call(this);return clone.words=this.words.slice(0),clone},random:function(nBytes){for(var words=[],i=0;nBytes>i;i+=4)words.push(4294967296*Math.random()|0);return new WordArray.init(words,nBytes)}}),C_enc=C.enc={},Hex=C_enc.Hex={stringify:function(wordArray){for(var words=wordArray.words,sigBytes=wordArray.sigBytes,hexChars=[],i=0;sigBytes>i;i++){var bite=words[i>>>2]>>>24-i%4*8&255;hexChars.push((bite>>>4).toString(16)),hexChars.push((15&bite).toString(16))}return hexChars.join("")},parse:function(hexStr){for(var hexStrLength=hexStr.length,words=[],i=0;hexStrLength>i;i+=2)words[i>>>3]|=parseInt(hexStr.substr(i,2),16)<<24-i%8*4;return new WordArray.init(words,hexStrLength/2)}},Latin1=C_enc.Latin1={stringify:function(wordArray){for(var words=wordArray.words,sigBytes=wordArray.sigBytes,latin1Chars=[],i=0;sigBytes>i;i++){var bite=words[i>>>2]>>>24-i%4*8&255;latin1Chars.push(String.fromCharCode(bite))}return latin1Chars.join("")},parse:function(latin1Str){for(var latin1StrLength=latin1Str.length,words=[],i=0;latin1StrLength>i;i++)words[i>>>2]|=(255&latin1Str.charCodeAt(i))<<24-i%4*8;return new WordArray.init(words,latin1StrLength)}},Utf8=C_enc.Utf8={stringify:function(wordArray){try{return decodeURIComponent(escape(Latin1.stringify(wordArray)))}catch(e){throw new Error("Malformed UTF-8 data")}},parse:function(utf8Str){return Latin1.parse(unescape(encodeURIComponent(utf8Str)))}},BufferedBlockAlgorithm=C_lib.BufferedBlockAlgorithm=Base.extend({reset:function(){this._data=new WordArray.init,this._nDataBytes=0},_append:function(data){"string"==typeof data&&(data=Utf8.parse(data)),this._data.concat(data),this._nDataBytes+=data.sigBytes},_process:function(doFlush){var data=this._data,dataWords=data.words,dataSigBytes=data.sigBytes,blockSize=this.blockSize,blockSizeBytes=4*blockSize,nBlocksReady=dataSigBytes/blockSizeBytes;nBlocksReady=doFlush?Math.ceil(nBlocksReady):Math.max((0|nBlocksReady)-this._minBufferSize,0);var nWordsReady=nBlocksReady*blockSize,nBytesReady=Math.min(4*nWordsReady,dataSigBytes);if(nWordsReady){for(var offset=0;nWordsReady>offset;offset+=blockSize)this._doProcessBlock(dataWords,offset);var processedWords=dataWords.splice(0,nWordsReady);data.sigBytes-=nBytesReady}return new WordArray.init(processedWords,nBytesReady)},clone:function(){var clone=Base.clone.call(this);return clone._data=this._data.clone(),clone},_minBufferSize:0}),C_algo=(C_lib.Hasher=BufferedBlockAlgorithm.extend({cfg:Base.extend(),init:function(cfg){this.cfg=this.cfg.extend(cfg),this.reset()},reset:function(){BufferedBlockAlgorithm.reset.call(this),this._doReset()},update:function(messageUpdate){return this._append(messageUpdate),this._process(),this},finalize:function(messageUpdate){messageUpdate&&this._append(messageUpdate);var hash=this._doFinalize();return hash},blockSize:16,_createHelper:function(hasher){return function(message,cfg){return new hasher.init(cfg).finalize(message)}},_createHmacHelper:function(hasher){return function(message,key){return new C_algo.HMAC.init(hasher,key).finalize(message)}}}),C.algo={});return C}(Math);return function(){{var C=CryptoJS,C_lib=C.lib,WordArray=C_lib.WordArray,C_enc=C.enc;C_enc.Base64={stringify:function(wordArray){var words=wordArray.words,sigBytes=wordArray.sigBytes,map=this._map;wordArray.clamp();for(var base64Chars=[],i=0;sigBytes>i;i+=3)for(var byte1=words[i>>>2]>>>24-i%4*8&255,byte2=words[i+1>>>2]>>>24-(i+1)%4*8&255,byte3=words[i+2>>>2]>>>24-(i+2)%4*8&255,triplet=byte1<<16|byte2<<8|byte3,j=0;4>j&&sigBytes>i+.75*j;j++)base64Chars.push(map.charAt(triplet>>>6*(3-j)&63));var paddingChar=map.charAt(64);if(paddingChar)for(;base64Chars.length%4;)base64Chars.push(paddingChar);return base64Chars.join("")},parse:function(base64Str){var base64StrLength=base64Str.length,map=this._map,paddingChar=map.charAt(64);if(paddingChar){var paddingIndex=base64Str.indexOf(paddingChar);-1!=paddingIndex&&(base64StrLength=paddingIndex)}for(var words=[],nBytes=0,i=0;base64StrLength>i;i++)if(i%4){var bits1=map.indexOf(base64Str.charAt(i-1))<<i%4*2,bits2=map.indexOf(base64Str.charAt(i))>>>6-i%4*2;words[nBytes>>>2]|=(bits1|bits2)<<24-nBytes%4*8,nBytes++}return WordArray.create(words,nBytes)},_map:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="}}}(),CryptoJS.lib.Cipher||function(undefined){var C=CryptoJS,C_lib=C.lib,Base=C_lib.Base,WordArray=C_lib.WordArray,BufferedBlockAlgorithm=C_lib.BufferedBlockAlgorithm,C_enc=C.enc,Base64=(C_enc.Utf8,C_enc.Base64),C_algo=C.algo,EvpKDF=C_algo.EvpKDF,Cipher=C_lib.Cipher=BufferedBlockAlgorithm.extend({cfg:Base.extend(),createEncryptor:function(key,cfg){return this.create(this._ENC_XFORM_MODE,key,cfg)},createDecryptor:function(key,cfg){return this.create(this._DEC_XFORM_MODE,key,cfg)},init:function(xformMode,key,cfg){this.cfg=this.cfg.extend(cfg),this._xformMode=xformMode,this._key=key,this.reset()},reset:function(){BufferedBlockAlgorithm.reset.call(this),this._doReset()},process:function(dataUpdate){return this._append(dataUpdate),this._process()},finalize:function(dataUpdate){dataUpdate&&this._append(dataUpdate);var finalProcessedData=this._doFinalize();return finalProcessedData},keySize:4,ivSize:4,_ENC_XFORM_MODE:1,_DEC_XFORM_MODE:2,_createHelper:function(){function selectCipherStrategy(key){return"string"==typeof key?PasswordBasedCipher:SerializableCipher}return function(cipher){return{encrypt:function(message,key,cfg){return selectCipherStrategy(key).encrypt(cipher,message,key,cfg)},decrypt:function(ciphertext,key,cfg){return selectCipherStrategy(key).decrypt(cipher,ciphertext,key,cfg)}}}}()}),C_mode=(C_lib.StreamCipher=Cipher.extend({_doFinalize:function(){var finalProcessedBlocks=this._process(!0);return finalProcessedBlocks},blockSize:1}),C.mode={}),BlockCipherMode=C_lib.BlockCipherMode=Base.extend({createEncryptor:function(cipher,iv){return this.Encryptor.create(cipher,iv)},createDecryptor:function(cipher,iv){return this.Decryptor.create(cipher,iv)},init:function(cipher,iv){this._cipher=cipher,this._iv=iv}}),CBC=C_mode.CBC=function(){function xorBlock(words,offset,blockSize){var iv=this._iv;if(iv){var block=iv;this._iv=undefined}else var block=this._prevBlock;for(var i=0;blockSize>i;i++)words[offset+i]^=block[i]}var CBC=BlockCipherMode.extend();return CBC.Encryptor=CBC.extend({processBlock:function(words,offset){var cipher=this._cipher,blockSize=cipher.blockSize;xorBlock.call(this,words,offset,blockSize),cipher.encryptBlock(words,offset),this._prevBlock=words.slice(offset,offset+blockSize)}}),CBC.Decryptor=CBC.extend({processBlock:function(words,offset){var cipher=this._cipher,blockSize=cipher.blockSize,thisBlock=words.slice(offset,offset+blockSize);cipher.decryptBlock(words,offset),xorBlock.call(this,words,offset,blockSize),this._prevBlock=thisBlock}}),CBC}(),C_pad=C.pad={},Pkcs7=C_pad.Pkcs7={pad:function(data,blockSize){for(var blockSizeBytes=4*blockSize,nPaddingBytes=blockSizeBytes-data.sigBytes%blockSizeBytes,paddingWord=nPaddingBytes<<24|nPaddingBytes<<16|nPaddingBytes<<8|nPaddingBytes,paddingWords=[],i=0;nPaddingBytes>i;i+=4)paddingWords.push(paddingWord);var padding=WordArray.create(paddingWords,nPaddingBytes);data.concat(padding)},unpad:function(data){var nPaddingBytes=255&data.words[data.sigBytes-1>>>2];data.sigBytes-=nPaddingBytes}},CipherParams=(C_lib.BlockCipher=Cipher.extend({cfg:Cipher.cfg.extend({mode:CBC,padding:Pkcs7}),reset:function(){Cipher.reset.call(this);var cfg=this.cfg,iv=cfg.iv,mode=cfg.mode;if(this._xformMode==this._ENC_XFORM_MODE)var modeCreator=mode.createEncryptor;else{var modeCreator=mode.createDecryptor;this._minBufferSize=1}this._mode=modeCreator.call(mode,this,iv&&iv.words)},_doProcessBlock:function(words,offset){this._mode.processBlock(words,offset)},_doFinalize:function(){var padding=this.cfg.padding;if(this._xformMode==this._ENC_XFORM_MODE){padding.pad(this._data,this.blockSize);var finalProcessedBlocks=this._process(!0)}else{var finalProcessedBlocks=this._process(!0);padding.unpad(finalProcessedBlocks)}return finalProcessedBlocks},blockSize:4}),C_lib.CipherParams=Base.extend({init:function(cipherParams){this.mixIn(cipherParams)},toString:function(formatter){return(formatter||this.formatter).stringify(this)}})),C_format=C.format={},OpenSSLFormatter=C_format.OpenSSL={stringify:function(cipherParams){var ciphertext=cipherParams.ciphertext,salt=cipherParams.salt;if(salt)var wordArray=WordArray.create([1398893684,1701076831]).concat(salt).concat(ciphertext);else var wordArray=ciphertext;return wordArray.toString(Base64)},parse:function(openSSLStr){var ciphertext=Base64.parse(openSSLStr),ciphertextWords=ciphertext.words;if(1398893684==ciphertextWords[0]&&1701076831==ciphertextWords[1]){var salt=WordArray.create(ciphertextWords.slice(2,4));ciphertextWords.splice(0,4),ciphertext.sigBytes-=16}return CipherParams.create({ciphertext:ciphertext,salt:salt})}},SerializableCipher=C_lib.SerializableCipher=Base.extend({cfg:Base.extend({format:OpenSSLFormatter}),encrypt:function(cipher,message,key,cfg){cfg=this.cfg.extend(cfg);var encryptor=cipher.createEncryptor(key,cfg),ciphertext=encryptor.finalize(message),cipherCfg=encryptor.cfg;return CipherParams.create({ciphertext:ciphertext,key:key,iv:cipherCfg.iv,algorithm:cipher,mode:cipherCfg.mode,padding:cipherCfg.padding,blockSize:cipher.blockSize,formatter:cfg.format})},decrypt:function(cipher,ciphertext,key,cfg){cfg=this.cfg.extend(cfg),ciphertext=this._parse(ciphertext,cfg.format);var plaintext=cipher.createDecryptor(key,cfg).finalize(ciphertext.ciphertext);return plaintext},_parse:function(ciphertext,format){return"string"==typeof ciphertext?format.parse(ciphertext,this):ciphertext}}),C_kdf=C.kdf={},OpenSSLKdf=C_kdf.OpenSSL={execute:function(password,keySize,ivSize,salt){salt||(salt=WordArray.random(8));var key=EvpKDF.create({keySize:keySize+ivSize}).compute(password,salt),iv=WordArray.create(key.words.slice(keySize),4*ivSize);return key.sigBytes=4*keySize,CipherParams.create({key:key,iv:iv,salt:salt})}},PasswordBasedCipher=C_lib.PasswordBasedCipher=SerializableCipher.extend({cfg:SerializableCipher.cfg.extend({kdf:OpenSSLKdf}),encrypt:function(cipher,message,password,cfg){cfg=this.cfg.extend(cfg);var derivedParams=cfg.kdf.execute(password,cipher.keySize,cipher.ivSize);cfg.iv=derivedParams.iv;var ciphertext=SerializableCipher.encrypt.call(this,cipher,message,derivedParams.key,cfg);return ciphertext.mixIn(derivedParams),ciphertext},decrypt:function(cipher,ciphertext,password,cfg){cfg=this.cfg.extend(cfg),ciphertext=this._parse(ciphertext,cfg.format);var derivedParams=cfg.kdf.execute(password,cipher.keySize,cipher.ivSize,ciphertext.salt);cfg.iv=derivedParams.iv;var plaintext=SerializableCipher.decrypt.call(this,cipher,ciphertext,derivedParams.key,cfg);return plaintext}})}(),function(){var C=CryptoJS,C_lib=C.lib,BlockCipher=C_lib.BlockCipher,C_algo=C.algo,SBOX=[],INV_SBOX=[],SUB_MIX_0=[],SUB_MIX_1=[],SUB_MIX_2=[],SUB_MIX_3=[],INV_SUB_MIX_0=[],INV_SUB_MIX_1=[],INV_SUB_MIX_2=[],INV_SUB_MIX_3=[];!function(){for(var d=[],i=0;256>i;i++)d[i]=128>i?i<<1:i<<1^283;for(var x=0,xi=0,i=0;256>i;i++){var sx=xi^xi<<1^xi<<2^xi<<3^xi<<4;sx=sx>>>8^255&sx^99,SBOX[x]=sx,INV_SBOX[sx]=x;var x2=d[x],x4=d[x2],x8=d[x4],t=257*d[sx]^16843008*sx;SUB_MIX_0[x]=t<<24|t>>>8,SUB_MIX_1[x]=t<<16|t>>>16,SUB_MIX_2[x]=t<<8|t>>>24,SUB_MIX_3[x]=t;var t=16843009*x8^65537*x4^257*x2^16843008*x;INV_SUB_MIX_0[sx]=t<<24|t>>>8,INV_SUB_MIX_1[sx]=t<<16|t>>>16,INV_SUB_MIX_2[sx]=t<<8|t>>>24,INV_SUB_MIX_3[sx]=t,x?(x=x2^d[d[d[x8^x2]]],xi^=d[d[xi]]):x=xi=1}}();var RCON=[0,1,2,4,8,16,32,64,128,27,54],AES=C_algo.AES=BlockCipher.extend({_doReset:function(){for(var key=this._key,keyWords=key.words,keySize=key.sigBytes/4,nRounds=this._nRounds=keySize+6,ksRows=4*(nRounds+1),keySchedule=this._keySchedule=[],ksRow=0;ksRows>ksRow;ksRow++)if(keySize>ksRow)keySchedule[ksRow]=keyWords[ksRow];else{var t=keySchedule[ksRow-1];ksRow%keySize?keySize>6&&ksRow%keySize==4&&(t=SBOX[t>>>24]<<24|SBOX[t>>>16&255]<<16|SBOX[t>>>8&255]<<8|SBOX[255&t]):(t=t<<8|t>>>24,t=SBOX[t>>>24]<<24|SBOX[t>>>16&255]<<16|SBOX[t>>>8&255]<<8|SBOX[255&t],t^=RCON[ksRow/keySize|0]<<24),keySchedule[ksRow]=keySchedule[ksRow-keySize]^t}for(var invKeySchedule=this._invKeySchedule=[],invKsRow=0;ksRows>invKsRow;invKsRow++){var ksRow=ksRows-invKsRow;if(invKsRow%4)var t=keySchedule[ksRow];else var t=keySchedule[ksRow-4];invKeySchedule[invKsRow]=4>invKsRow||4>=ksRow?t:INV_SUB_MIX_0[SBOX[t>>>24]]^INV_SUB_MIX_1[SBOX[t>>>16&255]]^INV_SUB_MIX_2[SBOX[t>>>8&255]]^INV_SUB_MIX_3[SBOX[255&t]]}},encryptBlock:function(M,offset){this._doCryptBlock(M,offset,this._keySchedule,SUB_MIX_0,SUB_MIX_1,SUB_MIX_2,SUB_MIX_3,SBOX)},decryptBlock:function(M,offset){var t=M[offset+1];M[offset+1]=M[offset+3],M[offset+3]=t,this._doCryptBlock(M,offset,this._invKeySchedule,INV_SUB_MIX_0,INV_SUB_MIX_1,INV_SUB_MIX_2,INV_SUB_MIX_3,INV_SBOX);var t=M[offset+1];M[offset+1]=M[offset+3],M[offset+3]=t},_doCryptBlock:function(M,offset,keySchedule,SUB_MIX_0,SUB_MIX_1,SUB_MIX_2,SUB_MIX_3,SBOX){for(var nRounds=this._nRounds,s0=M[offset]^keySchedule[0],s1=M[offset+1]^keySchedule[1],s2=M[offset+2]^keySchedule[2],s3=M[offset+3]^keySchedule[3],ksRow=4,round=1;nRounds>round;round++){var t0=SUB_MIX_0[s0>>>24]^SUB_MIX_1[s1>>>16&255]^SUB_MIX_2[s2>>>8&255]^SUB_MIX_3[255&s3]^keySchedule[ksRow++],t1=SUB_MIX_0[s1>>>24]^SUB_MIX_1[s2>>>16&255]^SUB_MIX_2[s3>>>8&255]^SUB_MIX_3[255&s0]^keySchedule[ksRow++],t2=SUB_MIX_0[s2>>>24]^SUB_MIX_1[s3>>>16&255]^SUB_MIX_2[s0>>>8&255]^SUB_MIX_3[255&s1]^keySchedule[ksRow++],t3=SUB_MIX_0[s3>>>24]^SUB_MIX_1[s0>>>16&255]^SUB_MIX_2[s1>>>8&255]^SUB_MIX_3[255&s2]^keySchedule[ksRow++];s0=t0,s1=t1,s2=t2,s3=t3}var t0=(SBOX[s0>>>24]<<24|SBOX[s1>>>16&255]<<16|SBOX[s2>>>8&255]<<8|SBOX[255&s3])^keySchedule[ksRow++],t1=(SBOX[s1>>>24]<<24|SBOX[s2>>>16&255]<<16|SBOX[s3>>>8&255]<<8|SBOX[255&s0])^keySchedule[ksRow++],t2=(SBOX[s2>>>24]<<24|SBOX[s3>>>16&255]<<16|SBOX[s0>>>8&255]<<8|SBOX[255&s1])^keySchedule[ksRow++],t3=(SBOX[s3>>>24]<<24|SBOX[s0>>>16&255]<<16|SBOX[s1>>>8&255]<<8|SBOX[255&s2])^keySchedule[ksRow++];M[offset]=t0,M[offset+1]=t1,M[offset+2]=t2,M[offset+3]=t3},keySize:8});C.AES=BlockCipher._createHelper(AES)}(),function(){var C=CryptoJS,C_lib=C.lib,WordArray=C_lib.WordArray,Hasher=C_lib.Hasher,C_algo=C.algo,W=[],SHA1=C_algo.SHA1=Hasher.extend({_doReset:function(){this._hash=new WordArray.init([1732584193,4023233417,2562383102,271733878,3285377520])},_doProcessBlock:function(M,offset){for(var H=this._hash.words,a=H[0],b=H[1],c=H[2],d=H[3],e=H[4],i=0;80>i;i++){if(16>i)W[i]=0|M[offset+i];else{var n=W[i-3]^W[i-8]^W[i-14]^W[i-16];W[i]=n<<1|n>>>31}var t=(a<<5|a>>>27)+e+W[i];t+=20>i?(b&c|~b&d)+1518500249:40>i?(b^c^d)+1859775393:60>i?(b&c|b&d|c&d)-1894007588:(b^c^d)-899497514,e=d,d=c,c=b<<30|b>>>2,b=a,a=t}H[0]=H[0]+a|0,H[1]=H[1]+b|0,H[2]=H[2]+c|0,H[3]=H[3]+d|0,H[4]=H[4]+e|0},_doFinalize:function(){var data=this._data,dataWords=data.words,nBitsTotal=8*this._nDataBytes,nBitsLeft=8*data.sigBytes;return dataWords[nBitsLeft>>>5]|=128<<24-nBitsLeft%32,dataWords[(nBitsLeft+64>>>9<<4)+14]=Math.floor(nBitsTotal/4294967296),dataWords[(nBitsLeft+64>>>9<<4)+15]=nBitsTotal,data.sigBytes=4*dataWords.length,this._process(),this._hash},clone:function(){var clone=Hasher.clone.call(this);
+return clone._hash=this._hash.clone(),clone}});C.SHA1=Hasher._createHelper(SHA1),C.HmacSHA1=Hasher._createHmacHelper(SHA1)}(),function(Math){var C=CryptoJS,C_lib=C.lib,WordArray=C_lib.WordArray,Hasher=C_lib.Hasher,C_algo=C.algo,H=[],K=[];!function(){function isPrime(n){for(var sqrtN=Math.sqrt(n),factor=2;sqrtN>=factor;factor++)if(!(n%factor))return!1;return!0}function getFractionalBits(n){return 4294967296*(n-(0|n))|0}for(var n=2,nPrime=0;64>nPrime;)isPrime(n)&&(8>nPrime&&(H[nPrime]=getFractionalBits(Math.pow(n,.5))),K[nPrime]=getFractionalBits(Math.pow(n,1/3)),nPrime++),n++}();var W=[],SHA256=C_algo.SHA256=Hasher.extend({_doReset:function(){this._hash=new WordArray.init(H.slice(0))},_doProcessBlock:function(M,offset){for(var H=this._hash.words,a=H[0],b=H[1],c=H[2],d=H[3],e=H[4],f=H[5],g=H[6],h=H[7],i=0;64>i;i++){if(16>i)W[i]=0|M[offset+i];else{var gamma0x=W[i-15],gamma0=(gamma0x<<25|gamma0x>>>7)^(gamma0x<<14|gamma0x>>>18)^gamma0x>>>3,gamma1x=W[i-2],gamma1=(gamma1x<<15|gamma1x>>>17)^(gamma1x<<13|gamma1x>>>19)^gamma1x>>>10;W[i]=gamma0+W[i-7]+gamma1+W[i-16]}var ch=e&f^~e&g,maj=a&b^a&c^b&c,sigma0=(a<<30|a>>>2)^(a<<19|a>>>13)^(a<<10|a>>>22),sigma1=(e<<26|e>>>6)^(e<<21|e>>>11)^(e<<7|e>>>25),t1=h+sigma1+ch+K[i]+W[i],t2=sigma0+maj;h=g,g=f,f=e,e=d+t1|0,d=c,c=b,b=a,a=t1+t2|0}H[0]=H[0]+a|0,H[1]=H[1]+b|0,H[2]=H[2]+c|0,H[3]=H[3]+d|0,H[4]=H[4]+e|0,H[5]=H[5]+f|0,H[6]=H[6]+g|0,H[7]=H[7]+h|0},_doFinalize:function(){var data=this._data,dataWords=data.words,nBitsTotal=8*this._nDataBytes,nBitsLeft=8*data.sigBytes;return dataWords[nBitsLeft>>>5]|=128<<24-nBitsLeft%32,dataWords[(nBitsLeft+64>>>9<<4)+14]=Math.floor(nBitsTotal/4294967296),dataWords[(nBitsLeft+64>>>9<<4)+15]=nBitsTotal,data.sigBytes=4*dataWords.length,this._process(),this._hash},clone:function(){var clone=Hasher.clone.call(this);return clone._hash=this._hash.clone(),clone}});C.SHA256=Hasher._createHelper(SHA256),C.HmacSHA256=Hasher._createHmacHelper(SHA256)}(Math),function(){{var C=CryptoJS,C_lib=C.lib,Base=C_lib.Base,C_enc=C.enc,Utf8=C_enc.Utf8,C_algo=C.algo;C_algo.HMAC=Base.extend({init:function(hasher,key){hasher=this._hasher=new hasher.init,"string"==typeof key&&(key=Utf8.parse(key));var hasherBlockSize=hasher.blockSize,hasherBlockSizeBytes=4*hasherBlockSize;key.sigBytes>hasherBlockSizeBytes&&(key=hasher.finalize(key)),key.clamp();for(var oKey=this._oKey=key.clone(),iKey=this._iKey=key.clone(),oKeyWords=oKey.words,iKeyWords=iKey.words,i=0;hasherBlockSize>i;i++)oKeyWords[i]^=1549556828,iKeyWords[i]^=909522486;oKey.sigBytes=iKey.sigBytes=hasherBlockSizeBytes,this.reset()},reset:function(){var hasher=this._hasher;hasher.reset(),hasher.update(this._iKey)},update:function(messageUpdate){return this._hasher.update(messageUpdate),this},finalize:function(messageUpdate){var hasher=this._hasher,innerHash=hasher.finalize(messageUpdate);hasher.reset();var hmac=hasher.finalize(this._oKey.clone().concat(innerHash));return hmac}})}}(),CryptoJS.pad.NoPadding={pad:function(){},unpad:function(){}},CryptoJS.mode.CTR=function(){var CTR=CryptoJS.lib.BlockCipherMode.extend(),Encryptor=CTR.Encryptor=CTR.extend({processBlock:function(words,offset){var cipher=this._cipher,blockSize=cipher.blockSize,iv=this._iv,counter=this._counter;iv&&(counter=this._counter=iv.slice(0),this._iv=void 0);var keystream=counter.slice(0);cipher.encryptBlock(keystream,0),counter[blockSize-1]=counter[blockSize-1]+1|0;for(var i=0;blockSize>i;i++)words[offset+i]^=keystream[i]}});return CTR.Decryptor=Encryptor,CTR}(),CryptoJS}),/*!
* Source: lib/otr/build/dep/eventemitter.js, license: MIT, url: http://git.io/ee
*/
/*!
@@ -73,12 +101,27 @@ var paddingChar=map.charAt(64);if(paddingChar)for(;base64Chars.length%4;)base64C
* @preserve
*/
function(){"use strict";function EventEmitter(){}function indexOfListener(listeners,listener){for(var i=listeners.length;i--;)if(listeners[i].listener===listener)return i;return-1}function alias(name){return function(){return this[name].apply(this,arguments)}}var proto=EventEmitter.prototype;proto.getListeners=function(evt){var response,key,events=this._getEvents();if("object"==typeof evt){response={};for(key in events)events.hasOwnProperty(key)&&evt.test(key)&&(response[key]=events[key])}else response=events[evt]||(events[evt]=[]);return response},proto.flattenListeners=function(listeners){var i,flatListeners=[];for(i=0;i<listeners.length;i+=1)flatListeners.push(listeners[i].listener);return flatListeners},proto.getListenersAsObject=function(evt){var response,listeners=this.getListeners(evt);return listeners instanceof Array&&(response={},response[evt]=listeners),response||listeners},proto.addListener=function(evt,listener){var key,listeners=this.getListenersAsObject(evt),listenerIsWrapped="object"==typeof listener;for(key in listeners)listeners.hasOwnProperty(key)&&-1===indexOfListener(listeners[key],listener)&&listeners[key].push(listenerIsWrapped?listener:{listener:listener,once:!1});return this},proto.on=alias("addListener"),proto.addOnceListener=function(evt,listener){return this.addListener(evt,{listener:listener,once:!0})},proto.once=alias("addOnceListener"),proto.defineEvent=function(evt){return this.getListeners(evt),this},proto.defineEvents=function(evts){for(var i=0;i<evts.length;i+=1)this.defineEvent(evts[i]);return this},proto.removeListener=function(evt,listener){var index,key,listeners=this.getListenersAsObject(evt);for(key in listeners)listeners.hasOwnProperty(key)&&(index=indexOfListener(listeners[key],listener),-1!==index&&listeners[key].splice(index,1));return this},proto.off=alias("removeListener"),proto.addListeners=function(evt,listeners){return this.manipulateListeners(!1,evt,listeners)},proto.removeListeners=function(evt,listeners){return this.manipulateListeners(!0,evt,listeners)},proto.manipulateListeners=function(remove,evt,listeners){var i,value,single=remove?this.removeListener:this.addListener,multiple=remove?this.removeListeners:this.addListeners;if("object"!=typeof evt||evt instanceof RegExp)for(i=listeners.length;i--;)single.call(this,evt,listeners[i]);else for(i in evt)evt.hasOwnProperty(i)&&(value=evt[i])&&("function"==typeof value?single.call(this,i,value):multiple.call(this,i,value));return this},proto.removeEvent=function(evt){var key,type=typeof evt,events=this._getEvents();if("string"===type)delete events[evt];else if("object"===type)for(key in events)events.hasOwnProperty(key)&&evt.test(key)&&delete events[key];else delete this._events;return this},proto.emitEvent=function(evt,args){var listener,i,key,response,listeners=this.getListenersAsObject(evt);for(key in listeners)if(listeners.hasOwnProperty(key))for(i=listeners[key].length;i--;)listener=listeners[key][i],listener.once===!0&&this.removeListener(evt,listener.listener),response=listener.listener.apply(this,args||[]),response===this._getOnceReturnValue()&&this.removeListener(evt,listener.listener);return this},proto.trigger=alias("emitEvent"),proto.emit=function(evt){var args=Array.prototype.slice.call(arguments,1);return this.emitEvent(evt,args)},proto.setOnceReturnValue=function(value){return this._onceReturnValue=value,this},proto._getOnceReturnValue=function(){return this.hasOwnProperty("_onceReturnValue")?this._onceReturnValue:!0},proto._getEvents=function(){return this._events||(this._events={})},"function"==typeof define&&define.amd?define(function(){return EventEmitter}):"object"==typeof module&&module.exports?module.exports=EventEmitter:this.EventEmitter=EventEmitter}.call(this),function(root,factory){"function"==typeof define&&define.amd?define(["bigint","crypto","eventemitter"],function(BigInt,CryptoJS,EventEmitter){var root={BigInt:BigInt,CryptoJS:CryptoJS,EventEmitter:EventEmitter,OTR:{},DSA:{}};return factory.call(root)}):(root.OTR={},root.DSA={},"undefined"!=typeof root.BigInt&&factory.call(root))}(this,function(){return function(){"use strict";var root=this,CONST={N:"FFFFFFFFFFFFFFFFC90FDAA22168C234C4C6628B80DC1CD129024E088A67CC74020BBEA63B139B22514A08798E3404DDEF9519B3CD3A431B302B0A6DF25F14374FE1356D6D51C245E485B576625E7EC6F44C42E9A637ED6B0BFF5CB6F406B7EDEE386BFB5A899FA5AE9F24117C4B1FE649286651ECE45B3DC2007CB8A163BF0598DA48361C55D39A69163FA8FD24CF5F83655D23DCA3AD961C62F356208552BB9ED529077096966D670C354E4ABC9804F1746C08CA237327FFFFFFFFFFFFFFFF",G:"2",MSGSTATE_PLAINTEXT:0,MSGSTATE_ENCRYPTED:1,MSGSTATE_FINISHED:2,AUTHSTATE_NONE:0,AUTHSTATE_AWAITING_DHKEY:1,AUTHSTATE_AWAITING_REVEALSIG:2,AUTHSTATE_AWAITING_SIG:3,WHITESPACE_TAG:" ",WHITESPACE_TAG_V2:" ",WHITESPACE_TAG_V3:" ",OTR_TAG:"?OTR",OTR_VERSION_1:"\x00",OTR_VERSION_2:"\x00",OTR_VERSION_3:"\x00",SMPSTATE_EXPECT0:0,SMPSTATE_EXPECT1:1,SMPSTATE_EXPECT2:2,SMPSTATE_EXPECT3:3,SMPSTATE_EXPECT4:4,STATUS_SEND_QUERY:0,STATUS_AKE_INIT:1,STATUS_AKE_SUCCESS:2,STATUS_END_OTR:3};"undefined"!=typeof module&&module.exports?module.exports=CONST:root.OTR.CONST=CONST}.call(this),function(){"use strict";function intCompare(x,y){var z=~(x^y);return z&=z>>16,z&=z>>8,z&=z>>4,z&=z>>2,z&=z>>1,1&z}var CryptoJS,BigInt,root=this,HLP={};"undefined"!=typeof module&&module.exports?(module.exports=HLP={},CryptoJS=require("../vendor/crypto.js"),BigInt=require("../vendor/bigint.js")):(root.OTR&&(root.OTR.HLP=HLP),root.DSA&&(root.DSA.HLP=HLP),CryptoJS=root.CryptoJS,BigInt=root.BigInt);var DTS={BYTE:1,SHORT:2,INT:4,CTR:8,MAC:20,SIG:40},WRAPPER_BEGIN="?OTR",WRAPPER_END=".",TWO=BigInt.str2bigInt("2",10);HLP.debug=function(msg){this.debug&&"function"!=typeof this.debug&&"undefined"!=typeof console&&console.log(msg)},HLP.extend=function(child,parent){function Ctor(){this.constructor=child}for(var key in parent)Object.hasOwnProperty.call(parent,key)&&(child[key]=parent[key]);Ctor.prototype=parent.prototype,child.prototype=new Ctor,child.__super__=parent.prototype},HLP.compare=function(str1,str2){if(str1.length!==str2.length)return!1;for(var i=0,result=0;i<str1.length;i++)result|=str1[i].charCodeAt(0)^str2[i].charCodeAt(0);return intCompare(result,0)},HLP.randomExponent=function(){return BigInt.randBigInt(1536)},HLP.smpHash=function(version,fmpi,smpi){var sha256=CryptoJS.algo.SHA256.create();sha256.update(CryptoJS.enc.Latin1.parse(HLP.packBytes(version,DTS.BYTE))),sha256.update(CryptoJS.enc.Latin1.parse(HLP.packMPI(fmpi))),smpi&&sha256.update(CryptoJS.enc.Latin1.parse(HLP.packMPI(smpi)));var hash=sha256.finalize();return HLP.bits2bigInt(hash.toString(CryptoJS.enc.Latin1))},HLP.makeMac=function(aesctr,m){var pass=CryptoJS.enc.Latin1.parse(m),mac=CryptoJS.HmacSHA256(CryptoJS.enc.Latin1.parse(aesctr),pass);return HLP.mask(mac.toString(CryptoJS.enc.Latin1),0,160)},HLP.make1Mac=function(aesctr,m){var pass=CryptoJS.enc.Latin1.parse(m),mac=CryptoJS.HmacSHA1(CryptoJS.enc.Latin1.parse(aesctr),pass);return mac.toString(CryptoJS.enc.Latin1)},HLP.encryptAes=function(msg,c,iv){var opts={mode:CryptoJS.mode.CTR,iv:CryptoJS.enc.Latin1.parse(iv),padding:CryptoJS.pad.NoPadding},aesctr=CryptoJS.AES.encrypt(msg,CryptoJS.enc.Latin1.parse(c),opts),aesctr_decoded=CryptoJS.enc.Base64.parse(aesctr.toString());return CryptoJS.enc.Latin1.stringify(aesctr_decoded)},HLP.decryptAes=function(msg,c,iv){msg=CryptoJS.enc.Latin1.parse(msg);var opts={mode:CryptoJS.mode.CTR,iv:CryptoJS.enc.Latin1.parse(iv),padding:CryptoJS.pad.NoPadding};return CryptoJS.AES.decrypt(CryptoJS.enc.Base64.stringify(msg),CryptoJS.enc.Latin1.parse(c),opts)},HLP.multPowMod=function(a,b,c,d,e){return BigInt.multMod(BigInt.powMod(a,b,e),BigInt.powMod(c,d,e),e)},HLP.ZKP=function(v,c,d,e){return BigInt.equals(c,HLP.smpHash(v,d,e))},HLP.GTOE=function(a,b){return BigInt.equals(a,b)||BigInt.greater(a,b)},HLP.between=function(x,a,b){return BigInt.greater(x,a)&&BigInt.greater(b,x)},HLP.checkGroup=function(g,N_MINUS_2){return HLP.GTOE(g,TWO)&&HLP.GTOE(N_MINUS_2,g)},HLP.h1=function(b,secbytes){var sha1=CryptoJS.algo.SHA1.create();return sha1.update(CryptoJS.enc.Latin1.parse(b)),sha1.update(CryptoJS.enc.Latin1.parse(secbytes)),sha1.finalize().toString(CryptoJS.enc.Latin1)},HLP.h2=function(b,secbytes){var sha256=CryptoJS.algo.SHA256.create();return sha256.update(CryptoJS.enc.Latin1.parse(b)),sha256.update(CryptoJS.enc.Latin1.parse(secbytes)),sha256.finalize().toString(CryptoJS.enc.Latin1)},HLP.mask=function(bytes,start,n){return bytes.substr(start/8,n/8)};var _toString=String.fromCharCode;HLP.packBytes=function(val,bytes){val=val.toString(16);for(var nex,res="";bytes>0;bytes--)nex=val.length?val.substr(-2,2):"0",val=val.substr(0,val.length-2),res=_toString(parseInt(nex,16))+res;return res},HLP.packINT=function(d){return HLP.packBytes(d,DTS.INT)},HLP.packCtr=function(d){return HLP.padCtr(HLP.packBytes(d,DTS.CTR))},HLP.padCtr=function(ctr){return ctr+"\x00\x00\x00\x00\x00\x00\x00\x00"},HLP.unpackCtr=function(d){return d=HLP.toByteArray(d.substring(0,8)),HLP.unpack(d)},HLP.unpack=function(arr){for(var val=0,i=0,len=arr.length;len>i;i++)val=256*val+arr[i];return val},HLP.packData=function(d){return HLP.packINT(d.length)+d},HLP.bits2bigInt=function(bits){return bits=HLP.toByteArray(bits),BigInt.ba2bigInt(bits)},HLP.packMPI=function(mpi){return HLP.packData(BigInt.bigInt2bits(BigInt.trim(mpi,0)))},HLP.packSHORT=function(short){return HLP.packBytes(short,DTS.SHORT)},HLP.unpackSHORT=function(short){return short=HLP.toByteArray(short),HLP.unpack(short)},HLP.packTLV=function(type,value){return HLP.packSHORT(type)+HLP.packSHORT(value.length)+value},HLP.readLen=function(msg){return msg=HLP.toByteArray(msg.substring(0,4)),HLP.unpack(msg)},HLP.readData=function(data){var n=HLP.unpack(data.splice(0,4));return[n,data]},HLP.readMPI=function(data){return data=HLP.toByteArray(data),data=HLP.readData(data),BigInt.ba2bigInt(data[1])},HLP.packMPIs=function(arr){return arr.reduce(function(prv,cur){return prv+HLP.packMPI(cur)},"")},HLP.unpackMPIs=function(num,mpis){for(var i=0,arr=[];num>i;i++)arr.push("MPI");return HLP.splitype(arr,mpis).map(function(m){return HLP.readMPI(m)})},HLP.wrapMsg=function(msg,fs,v3,our_it,their_it){msg=CryptoJS.enc.Base64.stringify(CryptoJS.enc.Latin1.parse(msg)),msg=WRAPPER_BEGIN+":"+msg+WRAPPER_END;var its;if(v3&&(its="|",its+=HLP.readLen(our_it).toString(16),its+="|",its+=HLP.readLen(their_it).toString(16)),!fs)return[null,msg];var n=Math.ceil(msg.length/fs);if(n>65535)return["Too many fragments"];if(1==n)return[null,msg];var k,bi,ei,frag,mf,mfs=[];for(k=1;n>=k;k++)bi=(k-1)*fs,ei=k*fs,frag=msg.slice(bi,ei),mf=WRAPPER_BEGIN,v3&&(mf+=its),mf+=","+k+",",mf+=n+",",mf+=frag+",",mfs.push(mf);return[null,mfs]},HLP.splitype=function splitype(arr,msg){var data=[];return arr.forEach(function(a){var str;switch(a){case"PUBKEY":str=splitype(["SHORT","MPI","MPI","MPI","MPI"],msg).join("");break;case"DATA":case"MPI":str=msg.substring(0,HLP.readLen(msg)+4);break;default:str=msg.substring(0,DTS[a])}data.push(str),msg=msg.substring(str.length)}),data};var _bin2num=function(){for(var i=0,_bin2num={};256>i;++i)_bin2num[String.fromCharCode(i)]=i;for(i=128;256>i;++i)_bin2num[String.fromCharCode(63232+i)]=i;return _bin2num}();HLP.toByteArray=function(data){for(var rv=[],ary=data.split(""),i=-1,iz=ary.length,remain=iz%8;remain--;)++i,rv[i]=_bin2num[ary[i]];for(remain=iz>>3;remain--;)rv.push(_bin2num[ary[++i]],_bin2num[ary[++i]],_bin2num[ary[++i]],_bin2num[ary[++i]],_bin2num[ary[++i]],_bin2num[ary[++i]],_bin2num[ary[++i]],_bin2num[ary[++i]]);return rv}}.call(this),function(){"use strict";function timer(){var start=(new Date).getTime();return function(s){if(DEBUG&&"undefined"!=typeof console){var t=(new Date).getTime();console.log(s+": "+(t-start)),start=t}}}function makeRandom(min,max){var c=BigInt.randBigInt(BigInt.bitSize(max));return HLP.between(c,min,max)?c:makeRandom(min,max)}function isProbPrime(k,n){var i,B=3e4,l=BigInt.bitSize(k),primes=BigInt.primes;for(0===primes.length&&(primes=BigInt.findPrimes(B)),rpprb.length!=k.length&&(rpprb=BigInt.dup(k)),i=0;i<primes.length&&primes[i]<=B;i++)if(0===BigInt.modInt(k,primes[i])&&!BigInt.equalsInt(k,primes[i]))return 0;for(i=0;n>i;i++){for(BigInt.randBigInt_(rpprb,l,0);!BigInt.greater(k,rpprb);)BigInt.randBigInt_(rpprb,l,0);if(!BigInt.millerRabin(k,rpprb))return 0}return 1}function generatePrimes(bit_length){for(var q,p,rem,counter,t=timer(),repeat=bit_lengths[bit_length].repeat,N=bit_lengths[bit_length].N,LM1=BigInt.twoToThe(bit_length-1),bl4=4*bit_length,brk=!1;;)if(q=BigInt.randBigInt(N,1),q[0]|=1,isProbPrime(q,repeat)){for(t("q"),counter=0;bl4>counter;counter++)if(p=BigInt.randBigInt(bit_length,1),p[0]|=1,rem=BigInt.mod(p,q),rem=BigInt.sub(rem,ONE),p=BigInt.sub(p,rem),!BigInt.greater(LM1,p)&&isProbPrime(p,repeat)){t("p"),primes[bit_length]={p:p,q:q},brk=!0;break}if(brk)break}for(var g,h=BigInt.dup(TWO),pm1=BigInt.sub(p,ONE),e=BigInt.multMod(pm1,BigInt.inverseMod(q,p),p);;){g=BigInt.powMod(h,e,p);{if(!BigInt.equals(g,ONE))return primes[bit_length].g=g,void t("g");h=BigInt.add(h,ONE)}}throw new Error("Unreachable!")}function DSA(obj,opts){if(!(this instanceof DSA))return new DSA(obj,opts);if(opts=opts||{},obj){var self=this;return["p","q","g","y","x"].forEach(function(prop){self[prop]=obj[prop]}),void(this.type=obj.type||KEY_TYPE)}var bit_length=parseInt(opts.bit_length?opts.bit_length:1024,10);if(!bit_lengths[bit_length])throw new Error("Unsupported bit length.");primes[bit_length]||generatePrimes(bit_length),this.p=primes[bit_length].p,this.q=primes[bit_length].q,this.g=primes[bit_length].g,this.type=KEY_TYPE,this.x=makeRandom(ZERO,this.q),this.y=BigInt.powMod(this.g,this.x,this.p),opts.nocache&&(primes[bit_length]=null)}function tokenizeStr(str){var start,end;if(start=str.indexOf("("),end=str.lastIndexOf(")"),0>start||0>end)throw new Error("Malformed S-Expression");str=str.substring(start+1,end);var splt=str.search(/\s/),obj={type:str.substring(0,splt),val:[]};if(str=str.substring(splt+1,end),start=str.indexOf("("),0>start)obj.val.push(str);else for(var i,len,ss,es;start>-1;){for(i=start+1,len=str.length,ss=1,es=0;len>i&&ss>es;i++)"("===str[i]&&ss++,")"===str[i]&&es++;obj.val.push(tokenizeStr(str.substring(start,++i))),str=str.substring(++i),start=str.indexOf("(")}return obj}function parseLibotr(obj){if(!obj.type)throw new Error("Parse error.");var o,val;return"privkeys"===obj.type?(o=[],obj.val.forEach(function(i){o.push(parseLibotr(i))}),o):(o={},obj.val.forEach(function(i){val=i.val[0],"string"==typeof val?0===val.indexOf("#")&&(val=val.substring(1,val.lastIndexOf("#")),val=BigInt.str2bigInt(val,16)):val=parseLibotr(i),o[i.type]=val}),o)}var CryptoJS,BigInt,Worker,WWPath,HLP,root=this;"undefined"!=typeof module&&module.exports?(module.exports=DSA,CryptoJS=require("../vendor/crypto.js"),BigInt=require("../vendor/bigint.js"),WWPath=require("path").join(__dirname,"/dsa-webworker.js"),HLP=require("./helpers.js")):(Object.keys(root.DSA).forEach(function(k){DSA[k]=root.DSA[k]}),root.DSA=DSA,CryptoJS=root.CryptoJS,BigInt=root.BigInt,Worker=root.Worker,WWPath="dsa-webworker.js",HLP=DSA.HLP);var ZERO=BigInt.str2bigInt("0",10),ONE=BigInt.str2bigInt("1",10),TWO=BigInt.str2bigInt("2",10),KEY_TYPE="\x00\x00",DEBUG=!1,rpprb=[],bit_lengths={1024:{N:160,repeat:40},2048:{N:224,repeat:56}},primes={};DSA.prototype={constructor:DSA,packPublic:function(){var str=this.type;return str+=HLP.packMPI(this.p),str+=HLP.packMPI(this.q),str+=HLP.packMPI(this.g),str+=HLP.packMPI(this.y)},packPrivate:function(){var str=this.packPublic()+HLP.packMPI(this.x);return str=CryptoJS.enc.Latin1.parse(str),str.toString(CryptoJS.enc.Base64)},generateNonce:function(m){var priv=BigInt.bigInt2bits(BigInt.trim(this.x,0)),rand=BigInt.bigInt2bits(BigInt.randBigInt(256)),sha256=CryptoJS.algo.SHA256.create();sha256.update(CryptoJS.enc.Latin1.parse(priv)),sha256.update(m),sha256.update(CryptoJS.enc.Latin1.parse(rand));var hash=sha256.finalize();return hash=HLP.bits2bigInt(hash.toString(CryptoJS.enc.Latin1)),BigInt.rightShift_(hash,256-BigInt.bitSize(this.q)),HLP.between(hash,ZERO,this.q)?hash:this.generateNonce(m)},sign:function(m){m=CryptoJS.enc.Latin1.parse(m);for(var k,b=BigInt.str2bigInt(m.toString(CryptoJS.enc.Hex),16),r=ZERO,s=ZERO;BigInt.isZero(s)||BigInt.isZero(r);)k=this.generateNonce(m),r=BigInt.mod(BigInt.powMod(this.g,k,this.p),this.q),BigInt.isZero(r)||(s=BigInt.inverseMod(k,this.q),s=BigInt.mult(s,BigInt.add(b,BigInt.mult(this.x,r))),s=BigInt.mod(s,this.q));return[r,s]},fingerprint:function(){var pk=this.packPublic();return this.type===KEY_TYPE&&(pk=pk.substring(2)),pk=CryptoJS.enc.Latin1.parse(pk),CryptoJS.SHA1(pk).toString(CryptoJS.enc.Hex)}},DSA.parsePublic=function(str,priv){var fields=["SHORT","MPI","MPI","MPI","MPI"];priv&&fields.push("MPI"),str=HLP.splitype(fields,str);var obj={type:str[0],p:HLP.readMPI(str[1]),q:HLP.readMPI(str[2]),g:HLP.readMPI(str[3]),y:HLP.readMPI(str[4])};return priv&&(obj.x=HLP.readMPI(str[5])),new DSA(obj)},DSA.parsePrivate=function(str,libotr){return libotr?parseLibotr(tokenizeStr(str))[0]["private-key"].dsa:(str=CryptoJS.enc.Base64.parse(str),str=str.toString(CryptoJS.enc.Latin1),DSA.parsePublic(str,!0))},DSA.verify=function(key,m,r,s){if(!HLP.between(r,ZERO,key.q)||!HLP.between(s,ZERO,key.q))return!1;var hm=CryptoJS.enc.Latin1.parse(m);hm=BigInt.str2bigInt(hm.toString(CryptoJS.enc.Hex),16);var w=BigInt.inverseMod(s,key.q),u1=BigInt.multMod(hm,w,key.q),u2=BigInt.multMod(r,w,key.q);u1=BigInt.powMod(key.g,u1,key.p),u2=BigInt.powMod(key.y,u2,key.p);var v=BigInt.mod(BigInt.multMod(u1,u2,key.p),key.q);return BigInt.equals(v,r)},DSA.createInWebWorker=function(options,cb){var opts={path:WWPath,seed:BigInt.getSeed};options&&"object"==typeof options&&Object.keys(options).forEach(function(k){opts[k]=options[k]}),"undefined"!=typeof module&&module.exports&&(Worker=require("webworker-threads").Worker);var worker=new Worker(opts.path);worker.onmessage=function(e){var data=e.data;switch(data.type){case"debug":if(!DEBUG||"undefined"==typeof console)return;console.log(data.val);break;case"data":worker.terminate(),cb(DSA.parsePrivate(data.val));break;default:throw new Error("Unrecognized type.")}},worker.postMessage({seed:opts.seed(),imports:opts.imports,debug:DEBUG})}}.call(this),function(){"use strict";var CryptoJS,CONST,HLP,root=this,Parse={};"undefined"!=typeof module&&module.exports?(module.exports=Parse,CryptoJS=require("../vendor/crypto.js"),CONST=require("./const.js"),HLP=require("./helpers.js")):(root.OTR.Parse=Parse,CryptoJS=root.CryptoJS,CONST=root.OTR.CONST,HLP=root.OTR.HLP);var tags={};tags[CONST.WHITESPACE_TAG_V2]=CONST.OTR_VERSION_2,tags[CONST.WHITESPACE_TAG_V3]=CONST.OTR_VERSION_3,Parse.parseMsg=function(otr,msg){var ver=[],start=msg.indexOf(CONST.OTR_TAG);if(!~start){if(this.initFragment(otr),ind=msg.indexOf(CONST.WHITESPACE_TAG),~ind){msg=msg.split(""),msg.splice(ind,16);for(var tag,len=msg.length;len>ind;)tag=msg.slice(ind,ind+8).join(""),Object.hasOwnProperty.call(tags,tag)?(msg.splice(ind,8),ver.push(tags[tag])):ind+=8;msg=msg.join("")}return{msg:msg,ver:ver}}var ind=start+CONST.OTR_TAG.length,com=msg[ind];if(","===com||"|"===com)return this.msgFragment(otr,msg.substring(ind+1),"|"===com);if(this.initFragment(otr),~["?","v"].indexOf(com)){"?"===msg[ind]&&(ver.push(CONST.OTR_VERSION_1),ind+=1);var vers={2:CONST.OTR_VERSION_2,3:CONST.OTR_VERSION_3},qs=msg.substring(ind+1),qi=qs.indexOf("?");return qi>=1&&(qs=qs.substring(0,qi).split(""),"v"===msg[ind]&&qs.forEach(function(q){Object.hasOwnProperty.call(vers,q)&&ver.push(vers[q])})),{cls:"query",ver:ver}}if(":"===com){ind+=1;var info=msg.substring(ind,ind+4);if(info.length<4)return{msg:msg};info=CryptoJS.enc.Base64.parse(info).toString(CryptoJS.enc.Latin1);var version=info.substring(0,2),type=info.substring(2);if(!otr["ALLOW_V"+HLP.unpackSHORT(version)])return{msg:msg};ind+=4;var end=msg.substring(ind).indexOf(".");if(!~end)return{msg:msg};msg=CryptoJS.enc.Base64.parse(msg.substring(ind,ind+end)),msg=CryptoJS.enc.Latin1.stringify(msg);var instance_tags;version===CONST.OTR_VERSION_3&&(instance_tags=msg.substring(0,8),msg=msg.substring(8));var cls;return~["","\n","",""].indexOf(type)?cls="ake":""===type&&(cls="data"),{version:version,type:type,msg:msg,cls:cls,instance_tags:instance_tags}}return" Error:"===msg.substring(ind,ind+7)?(otr.ERROR_START_AKE&&otr.sendQueryMsg(),{msg:msg.substring(ind+7),cls:"error"}):{msg:msg}},Parse.initFragment=function(otr){otr.fragment={s:"",j:0,k:0}},Parse.msgFragment=function(otr,msg,v3){if(msg=msg.split(","),v3){var its=msg.shift().split("|"),their_it=HLP.packINT(parseInt(its[0],16)),our_it=HLP.packINT(parseInt(its[1],16));if(otr.checkInstanceTags(their_it+our_it))return}if(!(msg.length<4||isNaN(parseInt(msg[0],10))||isNaN(parseInt(msg[1],10)))){var k=parseInt(msg[0],10),n=parseInt(msg[1],10);return msg=msg[2],k>n||0===n||0===k?void this.initFragment(otr):(1===k?(this.initFragment(otr),otr.fragment={k:1,n:n,s:msg}):n===otr.fragment.n&&k===otr.fragment.k+1?(otr.fragment.s+=msg,otr.fragment.k+=1):this.initFragment(otr),n===k?(msg=otr.fragment.s,this.initFragment(otr),this.parseMsg(otr,msg)):void 0)}}}.call(this),function(){"use strict";function hMac(gx,gy,pk,kid,m){var pass=CryptoJS.enc.Latin1.parse(m),hmac=CryptoJS.algo.HMAC.create(CryptoJS.algo.SHA256,pass);return hmac.update(CryptoJS.enc.Latin1.parse(HLP.packMPI(gx))),hmac.update(CryptoJS.enc.Latin1.parse(HLP.packMPI(gy))),hmac.update(CryptoJS.enc.Latin1.parse(pk)),hmac.update(CryptoJS.enc.Latin1.parse(kid)),hmac.finalize().toString(CryptoJS.enc.Latin1)}function AKE(otr){if(!(this instanceof AKE))return new AKE(otr);this.otr=otr,this.our_dh=otr.our_old_dh,this.our_keyid=otr.our_keyid-1,this.their_y=null,this.their_keyid=null,this.their_priv_pk=null,this.ssid=null,this.transmittedRS=!1,this.r=null;var self=this;["sendMsg"].forEach(function(meth){self[meth]=self[meth].bind(self)})}var CryptoJS,BigInt,CONST,HLP,DSA,root=this;"undefined"!=typeof module&&module.exports?(module.exports=AKE,CryptoJS=require("../vendor/crypto.js"),BigInt=require("../vendor/bigint.js"),CONST=require("./const.js"),HLP=require("./helpers.js"),DSA=require("./dsa.js")):(root.OTR.AKE=AKE,CryptoJS=root.CryptoJS,BigInt=root.BigInt,CONST=root.OTR.CONST,HLP=root.OTR.HLP,DSA=root.DSA);var N=BigInt.str2bigInt(CONST.N,16),N_MINUS_2=BigInt.sub(N,BigInt.str2bigInt("2",10));AKE.prototype={constructor:AKE,createKeys:function(g){var s=BigInt.powMod(g,this.our_dh.privateKey,N),secbytes=HLP.packMPI(s);this.ssid=HLP.mask(HLP.h2("\x00",secbytes),0,64);var tmp=HLP.h2("",secbytes);this.c=HLP.mask(tmp,0,128),this.c_prime=HLP.mask(tmp,128,128),this.m1=HLP.h2("",secbytes),this.m2=HLP.h2("",secbytes),this.m1_prime=HLP.h2("",secbytes),this.m2_prime=HLP.h2("",secbytes)},verifySignMac:function(mac,aesctr,m2,c,their_y,our_dh_pk,m1,ctr){var vmac=HLP.makeMac(aesctr,m2);if(!HLP.compare(mac,vmac))return["MACs do not match."];var x=HLP.decryptAes(aesctr.substring(4),c,ctr);x=HLP.splitype(["PUBKEY","INT","SIG"],x.toString(CryptoJS.enc.Latin1));var m=hMac(their_y,our_dh_pk,x[0],x[1],m1),pub=DSA.parsePublic(x[0]),r=HLP.bits2bigInt(x[2].substring(0,20)),s=HLP.bits2bigInt(x[2].substring(20));return DSA.verify(pub,m,r,s)?[null,HLP.readLen(x[1]),pub]:["Cannot verify signature of m."]},makeM:function(their_y,m1,c,m2){var pk=this.otr.priv.packPublic(),kid=HLP.packINT(this.our_keyid),m=hMac(this.our_dh.publicKey,their_y,pk,kid,m1);m=this.otr.priv.sign(m);var msg=pk+kid;msg+=BigInt.bigInt2bits(m[0],20),msg+=BigInt.bigInt2bits(m[1],20),msg=CryptoJS.enc.Latin1.parse(msg);var aesctr=HLP.packData(HLP.encryptAes(msg,c,HLP.packCtr(0))),mac=HLP.makeMac(aesctr,m2);return aesctr+mac},akeSuccess:function(version){return HLP.debug.call(this.otr,"success"),BigInt.equals(this.their_y,this.our_dh.publicKey)?this.otr.error("equal keys - we have a problem."):(this.otr.our_old_dh=this.our_dh,this.otr.their_priv_pk=this.their_priv_pk,this.their_keyid===this.otr.their_keyid&&BigInt.equals(this.their_y,this.otr.their_y)||this.their_keyid===this.otr.their_keyid-1&&BigInt.equals(this.their_y,this.otr.their_old_y)||(this.otr.their_y=this.their_y,this.otr.their_old_y=null,this.otr.their_keyid=this.their_keyid,this.otr.sessKeys[0]=[new this.otr.DHSession(this.otr.our_dh,this.otr.their_y),null],this.otr.sessKeys[1]=[new this.otr.DHSession(this.otr.our_old_dh,this.otr.their_y),null]),this.otr.ssid=this.ssid,this.otr.transmittedRS=this.transmittedRS,this.otr_version=version,this.otr.authstate=CONST.AUTHSTATE_NONE,this.otr.msgstate=CONST.MSGSTATE_ENCRYPTED,this.r=null,this.myhashed=null,this.dhcommit=null,this.encrypted=null,this.hashed=null,this.otr.trigger("status",[CONST.STATUS_AKE_SUCCESS]),void this.otr.sendStored())},handleAKE:function(msg){var send,vsm,type,version=msg.version;switch(msg.type){case"":if(HLP.debug.call(this.otr,"d-h key message"),msg=HLP.splitype(["DATA","DATA"],msg.msg),this.otr.authstate===CONST.AUTHSTATE_AWAITING_DHKEY){var ourHash=HLP.readMPI(this.myhashed),theirHash=HLP.readMPI(msg[1]);if(BigInt.greater(ourHash,theirHash)){type="",send=this.dhcommit;break}this.our_dh=this.otr.dh(),this.otr.authstate=CONST.AUTHSTATE_NONE,this.r=null,this.myhashed=null}else this.otr.authstate===CONST.AUTHSTATE_AWAITING_SIG&&(this.our_dh=this.otr.dh());this.otr.authstate=CONST.AUTHSTATE_AWAITING_REVEALSIG,this.encrypted=msg[0].substring(4),this.hashed=msg[1].substring(4),type="\n",send=HLP.packMPI(this.our_dh.publicKey);break;case"\n":if(HLP.debug.call(this.otr,"reveal signature message"),msg=HLP.splitype(["MPI"],msg.msg),this.otr.authstate!==CONST.AUTHSTATE_AWAITING_DHKEY){if(this.otr.authstate!==CONST.AUTHSTATE_AWAITING_SIG)return;if(!BigInt.equals(this.their_y,HLP.readMPI(msg[0])))return}if(this.otr.authstate=CONST.AUTHSTATE_AWAITING_SIG,this.their_y=HLP.readMPI(msg[0]),!HLP.checkGroup(this.their_y,N_MINUS_2))return this.otr.error("Illegal g^y.");this.createKeys(this.their_y),type="",send=HLP.packMPI(this.r),send+=this.makeM(this.their_y,this.m1,this.c,this.m2),this.m1=null,this.m2=null,this.c=null;break;case"":if(HLP.debug.call(this.otr,"signature message"),this.otr.authstate!==CONST.AUTHSTATE_AWAITING_REVEALSIG)return;msg=HLP.splitype(["DATA","DATA","MAC"],msg.msg),this.r=HLP.readMPI(msg[0]);var key=CryptoJS.enc.Hex.parse(BigInt.bigInt2str(this.r,16));key=CryptoJS.enc.Latin1.stringify(key);var gxmpi=HLP.decryptAes(this.encrypted,key,HLP.packCtr(0));gxmpi=gxmpi.toString(CryptoJS.enc.Latin1),this.their_y=HLP.readMPI(gxmpi);var hash=CryptoJS.SHA256(CryptoJS.enc.Latin1.parse(gxmpi));return HLP.compare(this.hashed,hash.toString(CryptoJS.enc.Latin1))?HLP.checkGroup(this.their_y,N_MINUS_2)?(this.createKeys(this.their_y),vsm=this.verifySignMac(msg[2],msg[1],this.m2,this.c,this.their_y,this.our_dh.publicKey,this.m1,HLP.packCtr(0)),vsm[0]?this.otr.error(vsm[0]):(this.their_keyid=vsm[1],this.their_priv_pk=vsm[2],send=this.makeM(this.their_y,this.m1_prime,this.c_prime,this.m2_prime),this.m1=null,this.m2=null,this.m1_prime=null,this.m2_prime=null,this.c=null,this.c_prime=null,this.sendMsg(version,"",send),void this.akeSuccess(version))):this.otr.error("Illegal g^x."):this.otr.error("Hashed g^x does not match.");case"":if(HLP.debug.call(this.otr,"data message"),this.otr.authstate!==CONST.AUTHSTATE_AWAITING_SIG)return;return msg=HLP.splitype(["DATA","MAC"],msg.msg),vsm=this.verifySignMac(msg[1],msg[0],this.m2_prime,this.c_prime,this.their_y,this.our_dh.publicKey,this.m1_prime,HLP.packCtr(0)),vsm[0]?this.otr.error(vsm[0]):(this.their_keyid=vsm[1],this.their_priv_pk=vsm[2],this.m1_prime=null,this.m2_prime=null,this.c_prime=null,this.transmittedRS=!0,void this.akeSuccess(version));default:return}this.sendMsg(version,type,send)},sendMsg:function(version,type,msg){var send=version+type,v3=version===CONST.OTR_VERSION_3;return v3&&(HLP.debug.call(this.otr,"instance tags"),send+=this.otr.our_instance_tag,send+=this.otr.their_instance_tag),send+=msg,send=HLP.wrapMsg(send,this.otr.fragment_size,v3,this.otr.our_instance_tag,this.otr.their_instance_tag),send[0]?this.otr.error(send[0]):void this.otr.io(send[1])},initiateAKE:function(version){HLP.debug.call(this.otr,"d-h commit message"),this.otr.trigger("status",[CONST.STATUS_AKE_INIT]),this.otr.authstate=CONST.AUTHSTATE_AWAITING_DHKEY;var gxmpi=HLP.packMPI(this.our_dh.publicKey);gxmpi=CryptoJS.enc.Latin1.parse(gxmpi),this.r=BigInt.randBigInt(128);var key=CryptoJS.enc.Hex.parse(BigInt.bigInt2str(this.r,16));key=CryptoJS.enc.Latin1.stringify(key),this.myhashed=CryptoJS.SHA256(gxmpi),this.myhashed=HLP.packData(this.myhashed.toString(CryptoJS.enc.Latin1)),this.dhcommit=HLP.packData(HLP.encryptAes(gxmpi,key,HLP.packCtr(0))),this.dhcommit+=this.myhashed,this.sendMsg(version,"",this.dhcommit)}}}.call(this),function(){"use strict";function SM(reqs){return this instanceof SM?(this.version=1,this.our_fp=reqs.our_fp,this.their_fp=reqs.their_fp,this.ssid=reqs.ssid,this.debug=!!reqs.debug,void this.init()):new SM(reqs)}var CryptoJS,BigInt,EventEmitter,CONST,HLP,root=this;"undefined"!=typeof module&&module.exports?(module.exports=SM,CryptoJS=require("../vendor/crypto.js"),BigInt=require("../vendor/bigint.js"),EventEmitter=require("../vendor/eventemitter.js"),CONST=require("./const.js"),HLP=require("./helpers.js")):(root.OTR.SM=SM,CryptoJS=root.CryptoJS,BigInt=root.BigInt,EventEmitter=root.EventEmitter,CONST=root.OTR.CONST,HLP=root.OTR.HLP);var G=BigInt.str2bigInt(CONST.G,10),N=BigInt.str2bigInt(CONST.N,16),N_MINUS_2=BigInt.sub(N,BigInt.str2bigInt("2",10)),Q=BigInt.sub(N,BigInt.str2bigInt("1",10));BigInt.divInt_(Q,2),HLP.extend(SM,EventEmitter),SM.prototype.init=function(){this.smpstate=CONST.SMPSTATE_EXPECT1,this.secret=null},SM.prototype.makeSecret=function(our,secret){var sha256=CryptoJS.algo.SHA256.create();sha256.update(CryptoJS.enc.Latin1.parse(HLP.packBytes(this.version,1))),sha256.update(CryptoJS.enc.Hex.parse(our?this.our_fp:this.their_fp)),sha256.update(CryptoJS.enc.Hex.parse(our?this.their_fp:this.our_fp)),sha256.update(CryptoJS.enc.Latin1.parse(this.ssid)),sha256.update(CryptoJS.enc.Latin1.parse(secret));var hash=sha256.finalize();this.secret=HLP.bits2bigInt(hash.toString(CryptoJS.enc.Latin1))},SM.prototype.makeG2s=function(){this.a2=HLP.randomExponent(),this.a3=HLP.randomExponent(),this.g2a=BigInt.powMod(G,this.a2,N),this.g3a=BigInt.powMod(G,this.a3,N),HLP.checkGroup(this.g2a,N_MINUS_2)&&HLP.checkGroup(this.g3a,N_MINUS_2)||this.makeG2s()},SM.prototype.computeGs=function(g2a,g3a){this.g2=BigInt.powMod(g2a,this.a2,N),this.g3=BigInt.powMod(g3a,this.a3,N)},SM.prototype.computePQ=function(r){this.p=BigInt.powMod(this.g3,r,N),this.q=HLP.multPowMod(G,r,this.g2,this.secret,N)},SM.prototype.computeR=function(){this.r=BigInt.powMod(this.QoQ,this.a3,N)},SM.prototype.computeRab=function(r){return BigInt.powMod(r,this.a3,N)},SM.prototype.computeC=function(v,r){return HLP.smpHash(v,BigInt.powMod(G,r,N))},SM.prototype.computeD=function(r,a,c){return BigInt.subMod(r,BigInt.multMod(a,c,Q),Q)},SM.prototype.handleSM=function(msg){var send,r2,r3,r7,t1,t2,t3,t4,rab,tmp2,cR,d7,ms,trust,expectStates={2:CONST.SMPSTATE_EXPECT1,3:CONST.SMPSTATE_EXPECT2,4:CONST.SMPSTATE_EXPECT3,5:CONST.SMPSTATE_EXPECT4,7:CONST.SMPSTATE_EXPECT1};if(6===msg.type)return this.init(),void this.trigger("abort");if(this.smpstate!==expectStates[msg.type])return this.abort();switch(this.smpstate){case CONST.SMPSTATE_EXPECT1:HLP.debug.call(this,"smp tlv 2");var ind,question;return 7===msg.type&&(ind=msg.msg.indexOf("\x00"),question=msg.msg.substring(0,ind),msg.msg=msg.msg.substring(ind+1)),ms=HLP.readLen(msg.msg.substr(0,4)),6!==ms?this.abort():(msg=HLP.unpackMPIs(6,msg.msg.substring(4)),HLP.checkGroup(msg[0],N_MINUS_2)&&HLP.checkGroup(msg[3],N_MINUS_2)&&HLP.ZKP(1,msg[1],HLP.multPowMod(G,msg[2],msg[0],msg[1],N))&&HLP.ZKP(2,msg[4],HLP.multPowMod(G,msg[5],msg[3],msg[4],N))?(this.g3ao=msg[3],this.makeG2s(),r2=HLP.randomExponent(),r3=HLP.randomExponent(),this.c2=this.computeC(3,r2),this.c3=this.computeC(4,r3),this.d2=this.computeD(r2,this.a2,this.c2),this.d3=this.computeD(r3,this.a3,this.c3),this.computeGs(msg[0],msg[3]),this.smpstate=CONST.SMPSTATE_EXPECT0,question&&(question=CryptoJS.enc.Latin1.parse(question).toString(CryptoJS.enc.Utf8)),void this.trigger("question",[question])):this.abort());
-case CONST.SMPSTATE_EXPECT2:if(HLP.debug.call(this,"smp tlv 3"),ms=HLP.readLen(msg.msg.substr(0,4)),11!==ms)return this.abort();if(msg=HLP.unpackMPIs(11,msg.msg.substring(4)),!(HLP.checkGroup(msg[0],N_MINUS_2)&&HLP.checkGroup(msg[3],N_MINUS_2)&&HLP.checkGroup(msg[6],N_MINUS_2)&&HLP.checkGroup(msg[7],N_MINUS_2)))return this.abort();if(!HLP.ZKP(3,msg[1],HLP.multPowMod(G,msg[2],msg[0],msg[1],N)))return this.abort();if(!HLP.ZKP(4,msg[4],HLP.multPowMod(G,msg[5],msg[3],msg[4],N)))return this.abort();if(this.g3ao=msg[3],this.computeGs(msg[0],msg[3]),t1=HLP.multPowMod(this.g3,msg[9],msg[6],msg[8],N),t2=HLP.multPowMod(G,msg[9],this.g2,msg[10],N),t2=BigInt.multMod(t2,BigInt.powMod(msg[7],msg[8],N),N),!HLP.ZKP(5,msg[8],t1,t2))return this.abort();var r4=HLP.randomExponent();this.computePQ(r4);var r5=HLP.randomExponent(),r6=HLP.randomExponent(),tmp=HLP.multPowMod(G,r5,this.g2,r6,N),cP=HLP.smpHash(6,BigInt.powMod(this.g3,r5,N),tmp),d5=this.computeD(r5,r4,cP),d6=this.computeD(r6,this.secret,cP);this.QoQ=BigInt.divMod(this.q,msg[7],N),this.PoP=BigInt.divMod(this.p,msg[6],N),this.computeR(),r7=HLP.randomExponent(),tmp2=BigInt.powMod(this.QoQ,r7,N),cR=HLP.smpHash(7,BigInt.powMod(G,r7,N),tmp2),d7=this.computeD(r7,this.a3,cR),this.smpstate=CONST.SMPSTATE_EXPECT4,send=HLP.packINT(8)+HLP.packMPIs([this.p,this.q,cP,d5,d6,this.r,cR,d7]),send=HLP.packTLV(4,send);break;case CONST.SMPSTATE_EXPECT3:if(HLP.debug.call(this,"smp tlv 4"),ms=HLP.readLen(msg.msg.substr(0,4)),8!==ms)return this.abort();if(msg=HLP.unpackMPIs(8,msg.msg.substring(4)),!HLP.checkGroup(msg[0],N_MINUS_2)||!HLP.checkGroup(msg[1],N_MINUS_2)||!HLP.checkGroup(msg[5],N_MINUS_2))return this.abort();if(t1=HLP.multPowMod(this.g3,msg[3],msg[0],msg[2],N),t2=HLP.multPowMod(G,msg[3],this.g2,msg[4],N),t2=BigInt.multMod(t2,BigInt.powMod(msg[1],msg[2],N),N),!HLP.ZKP(6,msg[2],t1,t2))return this.abort();if(t3=HLP.multPowMod(G,msg[7],this.g3ao,msg[6],N),this.QoQ=BigInt.divMod(msg[1],this.q,N),t4=HLP.multPowMod(this.QoQ,msg[7],msg[5],msg[6],N),!HLP.ZKP(7,msg[6],t3,t4))return this.abort();this.computeR(),r7=HLP.randomExponent(),tmp2=BigInt.powMod(this.QoQ,r7,N),cR=HLP.smpHash(8,BigInt.powMod(G,r7,N),tmp2),d7=this.computeD(r7,this.a3,cR),send=HLP.packINT(3)+HLP.packMPIs([this.r,cR,d7]),send=HLP.packTLV(5,send),rab=this.computeRab(msg[5]),trust=!!BigInt.equals(rab,BigInt.divMod(msg[0],this.p,N)),this.trigger("trust",[trust,"answered"]),this.init();break;case CONST.SMPSTATE_EXPECT4:return HLP.debug.call(this,"smp tlv 5"),ms=HLP.readLen(msg.msg.substr(0,4)),3!==ms?this.abort():(msg=HLP.unpackMPIs(3,msg.msg.substring(4)),HLP.checkGroup(msg[0],N_MINUS_2)?(t3=HLP.multPowMod(G,msg[2],this.g3ao,msg[1],N),t4=HLP.multPowMod(this.QoQ,msg[2],msg[0],msg[1],N),HLP.ZKP(8,msg[1],t3,t4)?(rab=this.computeRab(msg[0]),trust=!!BigInt.equals(rab,this.PoP),this.trigger("trust",[trust,"asked"]),void this.init()):this.abort()):this.abort())}this.sendMsg(send)},SM.prototype.sendMsg=function(send){this.trigger("send",[this.ssid,"\x00"+send])},SM.prototype.rcvSecret=function(secret,question){HLP.debug.call(this,"receive secret");var fn,our=!1;this.smpstate===CONST.SMPSTATE_EXPECT0?fn=this.answer:(fn=this.initiate,our=!0),this.makeSecret(our,secret),fn.call(this,question)},SM.prototype.answer=function(){HLP.debug.call(this,"smp answer");var r4=HLP.randomExponent();this.computePQ(r4);var r5=HLP.randomExponent(),r6=HLP.randomExponent(),tmp=HLP.multPowMod(G,r5,this.g2,r6,N),cP=HLP.smpHash(5,BigInt.powMod(this.g3,r5,N),tmp),d5=this.computeD(r5,r4,cP),d6=this.computeD(r6,this.secret,cP);this.smpstate=CONST.SMPSTATE_EXPECT3;var send=HLP.packINT(11)+HLP.packMPIs([this.g2a,this.c2,this.d2,this.g3a,this.c3,this.d3,this.p,this.q,cP,d5,d6]);this.sendMsg(HLP.packTLV(3,send))},SM.prototype.initiate=function(question){HLP.debug.call(this,"smp initiate"),this.smpstate!==CONST.SMPSTATE_EXPECT1&&this.abort(),this.makeG2s();var r2=HLP.randomExponent(),r3=HLP.randomExponent();this.c2=this.computeC(1,r2),this.c3=this.computeC(2,r3),this.d2=this.computeD(r2,this.a2,this.c2),this.d3=this.computeD(r3,this.a3,this.c3),this.smpstate=CONST.SMPSTATE_EXPECT2;var send="",type=2;question&&(send+=question,send+="\x00",type=7),send+=HLP.packINT(6)+HLP.packMPIs([this.g2a,this.c2,this.d2,this.g3a,this.c3,this.d3]),this.sendMsg(HLP.packTLV(type,send))},SM.prototype.abort=function(){this.init(),this.sendMsg(HLP.packTLV(6,"")),this.trigger("abort")}}.call(this),function(){"use strict";function OTRCB(cb){this.cb=cb}function OTR(options){if(!(this instanceof OTR))return new OTR(options);if(options=options||{},options.priv&&!(options.priv instanceof DSA))throw new Error("Requires long-lived DSA key.");if(this.priv=options.priv?options.priv:new DSA,this.fragment_size=options.fragment_size||0,this.fragment_size<0)throw new Error("Fragment size must be a positive integer.");if(this.send_interval=options.send_interval||0,this.send_interval<0)throw new Error("Send interval must be a positive integer.");this.outgoing=[],this.our_instance_tag=options.instance_tag||OTR.makeInstanceTag(),this.debug=!!options.debug,this.smw=options.smw,this.init();var self=this;["sendMsg","receiveMsg"].forEach(function(meth){self[meth]=self[meth].bind(self)}),EventEmitter.call(this)}var CryptoJS,BigInt,EventEmitter,Worker,SMWPath,CONST,HLP,Parse,AKE,SM,DSA,root=this;"undefined"!=typeof module&&module.exports?(module.exports=OTR,CryptoJS=require("../vendor/crypto.js"),BigInt=require("../vendor/bigint.js"),EventEmitter=require("../vendor/eventemitter.js"),SMWPath=require("path").join(__dirname,"/sm-webworker.js"),CONST=require("./const.js"),HLP=require("./helpers.js"),Parse=require("./parse.js"),AKE=require("./ake.js"),SM=require("./sm.js"),DSA=require("./dsa.js"),OTR.CONST=CONST):(Object.keys(root.OTR).forEach(function(k){OTR[k]=root.OTR[k]}),root.OTR=OTR,CryptoJS=root.CryptoJS,BigInt=root.BigInt,EventEmitter=root.EventEmitter,Worker=root.Worker,SMWPath="sm-webworker.js",CONST=OTR.CONST,HLP=OTR.HLP,Parse=OTR.Parse,AKE=OTR.AKE,SM=OTR.SM,DSA=root.DSA);var G=BigInt.str2bigInt(CONST.G,10),N=BigInt.str2bigInt(CONST.N,16),MAX_INT=Math.pow(2,53)-1,MAX_UINT=Math.pow(2,31)-1;HLP.extend(OTR,EventEmitter),OTR.prototype.init=function(){this.msgstate=CONST.MSGSTATE_PLAINTEXT,this.authstate=CONST.AUTHSTATE_NONE,this.ALLOW_V2=!0,this.ALLOW_V3=!0,this.REQUIRE_ENCRYPTION=!1,this.SEND_WHITESPACE_TAG=!1,this.WHITESPACE_START_AKE=!1,this.ERROR_START_AKE=!1,Parse.initFragment(this),this.their_y=null,this.their_old_y=null,this.their_keyid=0,this.their_priv_pk=null,this.their_instance_tag="\x00\x00\x00\x00",this.our_dh=this.dh(),this.our_old_dh=this.dh(),this.our_keyid=2,this.sessKeys=[new Array(2),new Array(2)],this.storedMgs=[],this.oldMacKeys=[],this.sm=null,this._akeInit(),this.receivedPlaintext=!1},OTR.prototype._akeInit=function(){this.ake=new AKE(this),this.transmittedRS=!1,this.ssid=null},OTR.prototype._SMW=function(otr,reqs){this.otr=otr;var opts={path:SMWPath,seed:BigInt.getSeed};"object"==typeof otr.smw&&Object.keys(otr.smw).forEach(function(k){opts[k]=otr.smw[k]}),"undefined"!=typeof module&&module.exports&&(Worker=require("webworker-threads").Worker),this.worker=new Worker(opts.path);var self=this;this.worker.onmessage=function(e){var d=e.data;d&&self.trigger(d.method,d.args)},this.worker.postMessage({type:"seed",seed:opts.seed(),imports:opts.imports}),this.worker.postMessage({type:"init",reqs:reqs})},HLP.extend(OTR.prototype._SMW,EventEmitter),["handleSM","rcvSecret","abort"].forEach(function(m){OTR.prototype._SMW.prototype[m]=function(){this.worker.postMessage({type:"method",method:m,args:Array.prototype.slice.call(arguments,0)})}}),OTR.prototype._smInit=function(){var reqs={ssid:this.ssid,our_fp:this.priv.fingerprint(),their_fp:this.their_priv_pk.fingerprint(),debug:this.debug};this.smw?(this.sm&&this.sm.worker.terminate(),this.sm=new this._SMW(this,reqs)):this.sm=new SM(reqs);var self=this;["trust","abort","question"].forEach(function(e){self.sm.on(e,function(){self.trigger("smp",[e].concat(Array.prototype.slice.call(arguments)))})}),this.sm.on("send",function(ssid,send){self.ssid===ssid&&(send=self.prepareMsg(send),self.io(send))})},OTR.prototype.io=function(msg,meta){msg=[].concat(msg).map(function(m){return{msg:m,meta:meta}}),this.outgoing=this.outgoing.concat(msg);var self=this;!function send(first){if(!first){if(!self.outgoing.length)return;var elem=self.outgoing.shift(),cb=null;elem.meta instanceof OTRCB&&(cb=elem.meta.cb,elem.meta=null),self.trigger("io",[elem.msg,elem.meta]),cb&&cb()}setTimeout(send,first?0:self.send_interval)}(!0)},OTR.prototype.dh=function(){var keys={privateKey:BigInt.randBigInt(320)};return keys.publicKey=BigInt.powMod(G,keys.privateKey,N),keys},OTR.prototype.DHSession=function DHSession(our_dh,their_y){if(!(this instanceof DHSession))return new DHSession(our_dh,their_y);var s=BigInt.powMod(their_y,our_dh.privateKey,N),secbytes=HLP.packMPI(s);this.id=HLP.mask(HLP.h2("\x00",secbytes),0,64);var sq=BigInt.greater(our_dh.publicKey,their_y),sendbyte=sq?"":"",rcvbyte=sq?"":"";this.sendenc=HLP.mask(HLP.h1(sendbyte,secbytes),0,128),this.sendmac=CryptoJS.SHA1(CryptoJS.enc.Latin1.parse(this.sendenc)),this.sendmac=this.sendmac.toString(CryptoJS.enc.Latin1),this.rcvenc=HLP.mask(HLP.h1(rcvbyte,secbytes),0,128),this.rcvmac=CryptoJS.SHA1(CryptoJS.enc.Latin1.parse(this.rcvenc)),this.rcvmac=this.rcvmac.toString(CryptoJS.enc.Latin1),this.rcvmacused=!1,this.extra_symkey=HLP.h2("ÿ",secbytes),this.send_counter=0,this.rcv_counter=0},OTR.prototype.rotateOurKeys=function(){var self=this;this.sessKeys[1].forEach(function(sk){sk&&sk.rcvmacused&&self.oldMacKeys.push(sk.rcvmac)}),this.our_old_dh=this.our_dh,this.our_dh=this.dh(),this.our_keyid+=1,this.sessKeys[1][0]=this.sessKeys[0][0],this.sessKeys[1][1]=this.sessKeys[0][1],this.sessKeys[0]=[this.their_y?new this.DHSession(this.our_dh,this.their_y):null,this.their_old_y?new this.DHSession(this.our_dh,this.their_old_y):null]},OTR.prototype.rotateTheirKeys=function(their_y){this.their_keyid+=1;var self=this;this.sessKeys.forEach(function(sk){sk[1]&&sk[1].rcvmacused&&self.oldMacKeys.push(sk[1].rcvmac)}),this.their_old_y=this.their_y,this.sessKeys[0][1]=this.sessKeys[0][0],this.sessKeys[1][1]=this.sessKeys[1][0],this.their_y=their_y,this.sessKeys[0][0]=new this.DHSession(this.our_dh,this.their_y),this.sessKeys[1][0]=new this.DHSession(this.our_old_dh,this.their_y)},OTR.prototype.prepareMsg=function(msg,esk){if(this.msgstate!==CONST.MSGSTATE_ENCRYPTED||0===this.their_keyid)return this.notify("Not ready to encrypt.");var sessKeys=this.sessKeys[1][0];if(sessKeys.send_counter>=MAX_INT)return this.notify("Should have rekeyed by now.");sessKeys.send_counter+=1;var ctr=HLP.packCtr(sessKeys.send_counter),send=this.ake.otr_version+"",v3=this.ake.otr_version===CONST.OTR_VERSION_3;if(v3&&(send+=this.our_instance_tag,send+=this.their_instance_tag),send+="\x00",send+=HLP.packINT(this.our_keyid-1),send+=HLP.packINT(this.their_keyid),send+=HLP.packMPI(this.our_dh.publicKey),send+=ctr.substring(0,8),Math.ceil(msg.length/8)>=MAX_UINT)return this.notify("Message is too long.");var aes=HLP.encryptAes(CryptoJS.enc.Latin1.parse(msg),sessKeys.sendenc,ctr);return send+=HLP.packData(aes),send+=HLP.make1Mac(send,sessKeys.sendmac),send+=HLP.packData(this.oldMacKeys.splice(0).join("")),send=HLP.wrapMsg(send,this.fragment_size,v3,this.our_instance_tag,this.their_instance_tag),send[0]?this.notify(send[0]):(esk&&this.trigger("file",["send",sessKeys.extra_symkey,esk]),send[1])},OTR.prototype.handleDataMsg=function(msg){var vt=msg.version+msg.type;this.ake.otr_version===CONST.OTR_VERSION_3&&(vt+=msg.instance_tags);var types=["BYTE","INT","INT","MPI","CTR","DATA","MAC","DATA"];msg=HLP.splitype(types,msg.msg);var ign=""===msg[0];if(this.msgstate!==CONST.MSGSTATE_ENCRYPTED||8!==msg.length)return void(ign||this.error("Received an unreadable encrypted message."));var our_keyid=this.our_keyid-HLP.readLen(msg[2]),their_keyid=this.their_keyid-HLP.readLen(msg[1]);if(0>our_keyid||our_keyid>1)return void(ign||this.error("Not of our latest keys."));if(0>their_keyid||their_keyid>1)return void(ign||this.error("Not of your latest keys."));var their_y=their_keyid?this.their_old_y:this.their_y;if(1===their_keyid&&!their_y)return void(ign||this.error("Do not have that key."));var sessKeys=this.sessKeys[our_keyid][their_keyid],ctr=HLP.unpackCtr(msg[4]);if(ctr<=sessKeys.rcv_counter)return void(ign||this.error("Counter in message is not larger."));sessKeys.rcv_counter=ctr,vt+=msg.slice(0,6).join("");var vmac=HLP.make1Mac(vt,sessKeys.rcvmac);if(!HLP.compare(msg[6],vmac))return void(ign||this.error("MACs do not match."));sessKeys.rcvmacused=!0;var out=HLP.decryptAes(msg[5].substring(4),sessKeys.rcvenc,HLP.padCtr(msg[4]));out=out.toString(CryptoJS.enc.Latin1),our_keyid||this.rotateOurKeys(),their_keyid||this.rotateTheirKeys(HLP.readMPI(msg[3]));var ind=out.indexOf("\x00");return~ind&&(this.handleTLVs(out.substring(ind+1),sessKeys),out=out.substring(0,ind)),out=CryptoJS.enc.Latin1.parse(out),out.toString(CryptoJS.enc.Utf8)},OTR.prototype.handleTLVs=function(tlvs,sessKeys){for(var type,len,msg;tlvs.length&&(type=HLP.unpackSHORT(tlvs.substr(0,2)),len=HLP.unpackSHORT(tlvs.substr(2,2)),msg=tlvs.substr(4,len),!(msg.length<len));){switch(type){case 1:this.msgstate=CONST.MSGSTATE_FINISHED,this.trigger("status",[CONST.STATUS_END_OTR]);break;case 2:case 3:case 4:case 5:case 6:case 7:if(this.msgstate!==CONST.MSGSTATE_ENCRYPTED)return void(this.sm&&this.sm.abort());this.sm||this._smInit(),this.sm.handleSM({msg:msg,type:type});break;case 8:msg=msg.substring(4),msg=CryptoJS.enc.Latin1.parse(msg),msg=msg.toString(CryptoJS.enc.Utf8),this.trigger("file",["receive",sessKeys.extra_symkey,msg])}tlvs=tlvs.substring(4+len)}},OTR.prototype.smpSecret=function(secret,question){return this.msgstate!==CONST.MSGSTATE_ENCRYPTED?this.notify("Must be encrypted for SMP."):"string"!=typeof secret||secret.length<1?this.notify("Secret is required."):(this.sm||this._smInit(),secret=CryptoJS.enc.Utf8.parse(secret).toString(CryptoJS.enc.Latin1),question&&(question=CryptoJS.enc.Utf8.parse(question).toString(CryptoJS.enc.Latin1)),void this.sm.rcvSecret(secret,question))},OTR.prototype.sendQueryMsg=function(){var versions={},msg=CONST.OTR_TAG;this.ALLOW_V2&&(versions[2]=!0),this.ALLOW_V3&&(versions[3]=!0);var vs=Object.keys(versions);vs.length&&(msg+="v",vs.forEach(function(v){"1"!==v&&(msg+=v)}),msg+="?"),this.io(msg),this.trigger("status",[CONST.STATUS_SEND_QUERY])},OTR.prototype.sendMsg=function(msg,meta){switch((this.REQUIRE_ENCRYPTION||this.msgstate!==CONST.MSGSTATE_PLAINTEXT)&&(msg=CryptoJS.enc.Utf8.parse(msg),msg=msg.toString(CryptoJS.enc.Latin1)),this.msgstate){case CONST.MSGSTATE_PLAINTEXT:if(this.REQUIRE_ENCRYPTION)return this.storedMgs.push({msg:msg,meta:meta}),void this.sendQueryMsg();this.SEND_WHITESPACE_TAG&&!this.receivedPlaintext&&(msg+=CONST.WHITESPACE_TAG,this.ALLOW_V3&&(msg+=CONST.WHITESPACE_TAG_V3),this.ALLOW_V2&&(msg+=CONST.WHITESPACE_TAG_V2));break;case CONST.MSGSTATE_FINISHED:return this.storedMgs.push({msg:msg,meta:meta}),void this.notify("Message cannot be sent at this time.","warn");case CONST.MSGSTATE_ENCRYPTED:msg=this.prepareMsg(msg);break;default:throw new Error("Unknown message state.")}msg&&this.io(msg,meta)},OTR.prototype.receiveMsg=function(msg,meta){if(msg=Parse.parseMsg(this,msg)){switch(msg.cls){case"error":return void this.notify(msg.msg);case"ake":return msg.version===CONST.OTR_VERSION_3&&this.checkInstanceTags(msg.instance_tags)?void this.notify("Received a message intended for a different session.","warn"):void this.ake.handleAKE(msg);case"data":if(msg.version===CONST.OTR_VERSION_3&&this.checkInstanceTags(msg.instance_tags))return void this.notify("Received a message intended for a different session.","warn");msg.msg=this.handleDataMsg(msg),msg.encrypted=!0;break;case"query":this.msgstate===CONST.MSGSTATE_ENCRYPTED&&this._akeInit(),this.doAKE(msg);break;default:(this.REQUIRE_ENCRYPTION||this.msgstate!==CONST.MSGSTATE_PLAINTEXT)&&this.notify("Received an unencrypted message.","warn"),this.receivedPlaintext=!0,this.WHITESPACE_START_AKE&&msg.ver.length>0&&this.doAKE(msg)}msg.msg&&this.trigger("ui",[msg.msg,!!msg.encrypted,meta])}},OTR.prototype.checkInstanceTags=function(it){var their_it=HLP.readLen(it.substr(0,4)),our_it=HLP.readLen(it.substr(4,4));if(our_it&&our_it!==HLP.readLen(this.our_instance_tag))return!0;if(HLP.readLen(this.their_instance_tag)){if(HLP.readLen(this.their_instance_tag)!==their_it)return!0}else{if(100>their_it)return!0;this.their_instance_tag=HLP.packINT(their_it)}},OTR.prototype.doAKE=function(msg){this.ALLOW_V3&&~msg.ver.indexOf(CONST.OTR_VERSION_3)?this.ake.initiateAKE(CONST.OTR_VERSION_3):this.ALLOW_V2&&~msg.ver.indexOf(CONST.OTR_VERSION_2)?this.ake.initiateAKE(CONST.OTR_VERSION_2):this.notify("OTR conversation requested, but no compatible protocol version found.","warn")},OTR.prototype.error=function(err){this.debug||(err="An OTR error has occurred."),this.io("?OTR Error:"+err),this.notify(err)},OTR.prototype.notify=function(err,severity){this.trigger("error",[err,severity||"error"])},OTR.prototype.sendStored=function(){var self=this;this.storedMgs.splice(0).forEach(function(elem){var msg=self.prepareMsg(elem.msg);self.io(msg,elem.meta)})},OTR.prototype.sendFile=function(filename){if(this.msgstate!==CONST.MSGSTATE_ENCRYPTED)return this.notify("Not ready to encrypt.");if(this.ake.otr_version!==CONST.OTR_VERSION_3)return this.notify("Protocol v3 required.");if(!filename)return this.notify("Please specify a filename.");var l1name=CryptoJS.enc.Utf8.parse(filename);if(l1name=l1name.toString(CryptoJS.enc.Latin1),l1name.length>=65532)return this.notify("Filename is too long.");var msg="\x00";msg+="\x00\b",msg+=HLP.packSHORT(4+l1name.length),msg+="\x00\x00\x00",msg+=l1name,msg=this.prepareMsg(msg,filename),this.io(msg)},OTR.prototype.endOtr=function(cb){this.msgstate===CONST.MSGSTATE_ENCRYPTED&&("function"==typeof cb&&(cb=new OTRCB(cb)),this.sendMsg("\x00\x00\x00\x00",cb),this.sm&&(this.smw&&this.sm.worker.terminate(),this.sm=null)),this.msgstate=CONST.MSGSTATE_PLAINTEXT,this.receivedPlaintext=!1,this.trigger("status",[CONST.STATUS_END_OTR])},OTR.makeInstanceTag=function(){var num=BigInt.randBigInt(32);return BigInt.greater(BigInt.str2bigInt("100",16),num)?OTR.makeInstanceTag():HLP.packINT(parseInt(BigInt.bigInt2str(num,10),10))}}.call(this),{OTR:this.OTR,DSA:this.DSA}}),/*!
+case CONST.SMPSTATE_EXPECT2:if(HLP.debug.call(this,"smp tlv 3"),ms=HLP.readLen(msg.msg.substr(0,4)),11!==ms)return this.abort();if(msg=HLP.unpackMPIs(11,msg.msg.substring(4)),!(HLP.checkGroup(msg[0],N_MINUS_2)&&HLP.checkGroup(msg[3],N_MINUS_2)&&HLP.checkGroup(msg[6],N_MINUS_2)&&HLP.checkGroup(msg[7],N_MINUS_2)))return this.abort();if(!HLP.ZKP(3,msg[1],HLP.multPowMod(G,msg[2],msg[0],msg[1],N)))return this.abort();if(!HLP.ZKP(4,msg[4],HLP.multPowMod(G,msg[5],msg[3],msg[4],N)))return this.abort();if(this.g3ao=msg[3],this.computeGs(msg[0],msg[3]),t1=HLP.multPowMod(this.g3,msg[9],msg[6],msg[8],N),t2=HLP.multPowMod(G,msg[9],this.g2,msg[10],N),t2=BigInt.multMod(t2,BigInt.powMod(msg[7],msg[8],N),N),!HLP.ZKP(5,msg[8],t1,t2))return this.abort();var r4=HLP.randomExponent();this.computePQ(r4);var r5=HLP.randomExponent(),r6=HLP.randomExponent(),tmp=HLP.multPowMod(G,r5,this.g2,r6,N),cP=HLP.smpHash(6,BigInt.powMod(this.g3,r5,N),tmp),d5=this.computeD(r5,r4,cP),d6=this.computeD(r6,this.secret,cP);this.QoQ=BigInt.divMod(this.q,msg[7],N),this.PoP=BigInt.divMod(this.p,msg[6],N),this.computeR(),r7=HLP.randomExponent(),tmp2=BigInt.powMod(this.QoQ,r7,N),cR=HLP.smpHash(7,BigInt.powMod(G,r7,N),tmp2),d7=this.computeD(r7,this.a3,cR),this.smpstate=CONST.SMPSTATE_EXPECT4,send=HLP.packINT(8)+HLP.packMPIs([this.p,this.q,cP,d5,d6,this.r,cR,d7]),send=HLP.packTLV(4,send);break;case CONST.SMPSTATE_EXPECT3:if(HLP.debug.call(this,"smp tlv 4"),ms=HLP.readLen(msg.msg.substr(0,4)),8!==ms)return this.abort();if(msg=HLP.unpackMPIs(8,msg.msg.substring(4)),!HLP.checkGroup(msg[0],N_MINUS_2)||!HLP.checkGroup(msg[1],N_MINUS_2)||!HLP.checkGroup(msg[5],N_MINUS_2))return this.abort();if(t1=HLP.multPowMod(this.g3,msg[3],msg[0],msg[2],N),t2=HLP.multPowMod(G,msg[3],this.g2,msg[4],N),t2=BigInt.multMod(t2,BigInt.powMod(msg[1],msg[2],N),N),!HLP.ZKP(6,msg[2],t1,t2))return this.abort();if(t3=HLP.multPowMod(G,msg[7],this.g3ao,msg[6],N),this.QoQ=BigInt.divMod(msg[1],this.q,N),t4=HLP.multPowMod(this.QoQ,msg[7],msg[5],msg[6],N),!HLP.ZKP(7,msg[6],t3,t4))return this.abort();this.computeR(),r7=HLP.randomExponent(),tmp2=BigInt.powMod(this.QoQ,r7,N),cR=HLP.smpHash(8,BigInt.powMod(G,r7,N),tmp2),d7=this.computeD(r7,this.a3,cR),send=HLP.packINT(3)+HLP.packMPIs([this.r,cR,d7]),send=HLP.packTLV(5,send),rab=this.computeRab(msg[5]),trust=!!BigInt.equals(rab,BigInt.divMod(msg[0],this.p,N)),this.trigger("trust",[trust,"answered"]),this.init();break;case CONST.SMPSTATE_EXPECT4:return HLP.debug.call(this,"smp tlv 5"),ms=HLP.readLen(msg.msg.substr(0,4)),3!==ms?this.abort():(msg=HLP.unpackMPIs(3,msg.msg.substring(4)),HLP.checkGroup(msg[0],N_MINUS_2)?(t3=HLP.multPowMod(G,msg[2],this.g3ao,msg[1],N),t4=HLP.multPowMod(this.QoQ,msg[2],msg[0],msg[1],N),HLP.ZKP(8,msg[1],t3,t4)?(rab=this.computeRab(msg[0]),trust=!!BigInt.equals(rab,this.PoP),this.trigger("trust",[trust,"asked"]),void this.init()):this.abort()):this.abort())}this.sendMsg(send)},SM.prototype.sendMsg=function(send){this.trigger("send",[this.ssid,"\x00"+send])},SM.prototype.rcvSecret=function(secret,question){HLP.debug.call(this,"receive secret");var fn,our=!1;this.smpstate===CONST.SMPSTATE_EXPECT0?fn=this.answer:(fn=this.initiate,our=!0),this.makeSecret(our,secret),fn.call(this,question)},SM.prototype.answer=function(){HLP.debug.call(this,"smp answer");var r4=HLP.randomExponent();this.computePQ(r4);var r5=HLP.randomExponent(),r6=HLP.randomExponent(),tmp=HLP.multPowMod(G,r5,this.g2,r6,N),cP=HLP.smpHash(5,BigInt.powMod(this.g3,r5,N),tmp),d5=this.computeD(r5,r4,cP),d6=this.computeD(r6,this.secret,cP);this.smpstate=CONST.SMPSTATE_EXPECT3;var send=HLP.packINT(11)+HLP.packMPIs([this.g2a,this.c2,this.d2,this.g3a,this.c3,this.d3,this.p,this.q,cP,d5,d6]);this.sendMsg(HLP.packTLV(3,send))},SM.prototype.initiate=function(question){HLP.debug.call(this,"smp initiate"),this.smpstate!==CONST.SMPSTATE_EXPECT1&&this.abort(),this.makeG2s();var r2=HLP.randomExponent(),r3=HLP.randomExponent();this.c2=this.computeC(1,r2),this.c3=this.computeC(2,r3),this.d2=this.computeD(r2,this.a2,this.c2),this.d3=this.computeD(r3,this.a3,this.c3),this.smpstate=CONST.SMPSTATE_EXPECT2;var send="",type=2;question&&(send+=question,send+="\x00",type=7),send+=HLP.packINT(6)+HLP.packMPIs([this.g2a,this.c2,this.d2,this.g3a,this.c3,this.d3]),this.sendMsg(HLP.packTLV(type,send))},SM.prototype.abort=function(){this.init(),this.sendMsg(HLP.packTLV(6,"")),this.trigger("abort")}}.call(this),function(){"use strict";function OTRCB(cb){this.cb=cb}function OTR(options){if(!(this instanceof OTR))return new OTR(options);if(options=options||{},options.priv&&!(options.priv instanceof DSA))throw new Error("Requires long-lived DSA key.");if(this.priv=options.priv?options.priv:new DSA,this.fragment_size=options.fragment_size||0,this.fragment_size<0)throw new Error("Fragment size must be a positive integer.");if(this.send_interval=options.send_interval||0,this.send_interval<0)throw new Error("Send interval must be a positive integer.");this.outgoing=[],this.our_instance_tag=options.instance_tag||OTR.makeInstanceTag(),this.debug=!!options.debug,this.smw=options.smw,this.init();var self=this;["sendMsg","receiveMsg"].forEach(function(meth){self[meth]=self[meth].bind(self)}),EventEmitter.call(this)}var CryptoJS,BigInt,EventEmitter,Worker,SMWPath,CONST,HLP,Parse,AKE,SM,DSA,root=this;"undefined"!=typeof module&&module.exports?(module.exports=OTR,CryptoJS=require("../vendor/crypto.js"),BigInt=require("../vendor/bigint.js"),EventEmitter=require("../vendor/eventemitter.js"),SMWPath=require("path").join(__dirname,"/sm-webworker.js"),CONST=require("./const.js"),HLP=require("./helpers.js"),Parse=require("./parse.js"),AKE=require("./ake.js"),SM=require("./sm.js"),DSA=require("./dsa.js"),OTR.CONST=CONST):(Object.keys(root.OTR).forEach(function(k){OTR[k]=root.OTR[k]}),root.OTR=OTR,CryptoJS=root.CryptoJS,BigInt=root.BigInt,EventEmitter=root.EventEmitter,Worker=root.Worker,SMWPath="sm-webworker.js",CONST=OTR.CONST,HLP=OTR.HLP,Parse=OTR.Parse,AKE=OTR.AKE,SM=OTR.SM,DSA=root.DSA);var G=BigInt.str2bigInt(CONST.G,10),N=BigInt.str2bigInt(CONST.N,16),MAX_INT=Math.pow(2,53)-1,MAX_UINT=Math.pow(2,31)-1;HLP.extend(OTR,EventEmitter),OTR.prototype.init=function(){this.msgstate=CONST.MSGSTATE_PLAINTEXT,this.authstate=CONST.AUTHSTATE_NONE,this.ALLOW_V2=!0,this.ALLOW_V3=!0,this.REQUIRE_ENCRYPTION=!1,this.SEND_WHITESPACE_TAG=!1,this.WHITESPACE_START_AKE=!1,this.ERROR_START_AKE=!1,Parse.initFragment(this),this.their_y=null,this.their_old_y=null,this.their_keyid=0,this.their_priv_pk=null,this.their_instance_tag="\x00\x00\x00\x00",this.our_dh=this.dh(),this.our_old_dh=this.dh(),this.our_keyid=2,this.sessKeys=[new Array(2),new Array(2)],this.storedMgs=[],this.oldMacKeys=[],this.sm=null,this._akeInit(),this.receivedPlaintext=!1},OTR.prototype._akeInit=function(){this.ake=new AKE(this),this.transmittedRS=!1,this.ssid=null},OTR.prototype._SMW=function(otr,reqs){this.otr=otr;var opts={path:SMWPath,seed:BigInt.getSeed};"object"==typeof otr.smw&&Object.keys(otr.smw).forEach(function(k){opts[k]=otr.smw[k]}),"undefined"!=typeof module&&module.exports&&(Worker=require("webworker-threads").Worker),this.worker=new Worker(opts.path);var self=this;this.worker.onmessage=function(e){var d=e.data;d&&self.trigger(d.method,d.args)},this.worker.postMessage({type:"seed",seed:opts.seed(),imports:opts.imports}),this.worker.postMessage({type:"init",reqs:reqs})},HLP.extend(OTR.prototype._SMW,EventEmitter),["handleSM","rcvSecret","abort"].forEach(function(m){OTR.prototype._SMW.prototype[m]=function(){this.worker.postMessage({type:"method",method:m,args:Array.prototype.slice.call(arguments,0)})}}),OTR.prototype._smInit=function(){var reqs={ssid:this.ssid,our_fp:this.priv.fingerprint(),their_fp:this.their_priv_pk.fingerprint(),debug:this.debug};this.smw?(this.sm&&this.sm.worker.terminate(),this.sm=new this._SMW(this,reqs)):this.sm=new SM(reqs);var self=this;["trust","abort","question"].forEach(function(e){self.sm.on(e,function(){self.trigger("smp",[e].concat(Array.prototype.slice.call(arguments)))})}),this.sm.on("send",function(ssid,send){self.ssid===ssid&&(send=self.prepareMsg(send),self.io(send))})},OTR.prototype.io=function(msg,meta){msg=[].concat(msg).map(function(m,i,arr){var obj={msg:m};return meta instanceof OTRCB&&i!==arr.length-1||(obj.meta=meta),obj}),this.outgoing=this.outgoing.concat(msg);var self=this;!function send(first){if(!first){if(!self.outgoing.length)return;var elem=self.outgoing.shift(),cb=null;elem.meta instanceof OTRCB&&(cb=elem.meta.cb,elem.meta=null),self.trigger("io",[elem.msg,elem.meta]),cb&&cb()}setTimeout(send,first?0:self.send_interval)}(!0)},OTR.prototype.dh=function(){var keys={privateKey:BigInt.randBigInt(320)};return keys.publicKey=BigInt.powMod(G,keys.privateKey,N),keys},OTR.prototype.DHSession=function DHSession(our_dh,their_y){if(!(this instanceof DHSession))return new DHSession(our_dh,their_y);var s=BigInt.powMod(their_y,our_dh.privateKey,N),secbytes=HLP.packMPI(s);this.id=HLP.mask(HLP.h2("\x00",secbytes),0,64);var sq=BigInt.greater(our_dh.publicKey,their_y),sendbyte=sq?"":"",rcvbyte=sq?"":"";this.sendenc=HLP.mask(HLP.h1(sendbyte,secbytes),0,128),this.sendmac=CryptoJS.SHA1(CryptoJS.enc.Latin1.parse(this.sendenc)),this.sendmac=this.sendmac.toString(CryptoJS.enc.Latin1),this.rcvenc=HLP.mask(HLP.h1(rcvbyte,secbytes),0,128),this.rcvmac=CryptoJS.SHA1(CryptoJS.enc.Latin1.parse(this.rcvenc)),this.rcvmac=this.rcvmac.toString(CryptoJS.enc.Latin1),this.rcvmacused=!1,this.extra_symkey=HLP.h2("ÿ",secbytes),this.send_counter=0,this.rcv_counter=0},OTR.prototype.rotateOurKeys=function(){var self=this;this.sessKeys[1].forEach(function(sk){sk&&sk.rcvmacused&&self.oldMacKeys.push(sk.rcvmac)}),this.our_old_dh=this.our_dh,this.our_dh=this.dh(),this.our_keyid+=1,this.sessKeys[1][0]=this.sessKeys[0][0],this.sessKeys[1][1]=this.sessKeys[0][1],this.sessKeys[0]=[this.their_y?new this.DHSession(this.our_dh,this.their_y):null,this.their_old_y?new this.DHSession(this.our_dh,this.their_old_y):null]},OTR.prototype.rotateTheirKeys=function(their_y){this.their_keyid+=1;var self=this;this.sessKeys.forEach(function(sk){sk[1]&&sk[1].rcvmacused&&self.oldMacKeys.push(sk[1].rcvmac)}),this.their_old_y=this.their_y,this.sessKeys[0][1]=this.sessKeys[0][0],this.sessKeys[1][1]=this.sessKeys[1][0],this.their_y=their_y,this.sessKeys[0][0]=new this.DHSession(this.our_dh,this.their_y),this.sessKeys[1][0]=new this.DHSession(this.our_old_dh,this.their_y)},OTR.prototype.prepareMsg=function(msg,esk){if(this.msgstate!==CONST.MSGSTATE_ENCRYPTED||0===this.their_keyid)return this.notify("Not ready to encrypt.");var sessKeys=this.sessKeys[1][0];if(sessKeys.send_counter>=MAX_INT)return this.notify("Should have rekeyed by now.");sessKeys.send_counter+=1;var ctr=HLP.packCtr(sessKeys.send_counter),send=this.ake.otr_version+"",v3=this.ake.otr_version===CONST.OTR_VERSION_3;if(v3&&(send+=this.our_instance_tag,send+=this.their_instance_tag),send+="\x00",send+=HLP.packINT(this.our_keyid-1),send+=HLP.packINT(this.their_keyid),send+=HLP.packMPI(this.our_dh.publicKey),send+=ctr.substring(0,8),Math.ceil(msg.length/8)>=MAX_UINT)return this.notify("Message is too long.");var aes=HLP.encryptAes(CryptoJS.enc.Latin1.parse(msg),sessKeys.sendenc,ctr);return send+=HLP.packData(aes),send+=HLP.make1Mac(send,sessKeys.sendmac),send+=HLP.packData(this.oldMacKeys.splice(0).join("")),send=HLP.wrapMsg(send,this.fragment_size,v3,this.our_instance_tag,this.their_instance_tag),send[0]?this.notify(send[0]):(esk&&this.trigger("file",["send",sessKeys.extra_symkey,esk]),send[1])},OTR.prototype.handleDataMsg=function(msg){var vt=msg.version+msg.type;this.ake.otr_version===CONST.OTR_VERSION_3&&(vt+=msg.instance_tags);var types=["BYTE","INT","INT","MPI","CTR","DATA","MAC","DATA"];msg=HLP.splitype(types,msg.msg);var ign=""===msg[0];if(this.msgstate!==CONST.MSGSTATE_ENCRYPTED||8!==msg.length)return void(ign||this.error("Received an unreadable encrypted message."));var our_keyid=this.our_keyid-HLP.readLen(msg[2]),their_keyid=this.their_keyid-HLP.readLen(msg[1]);if(0>our_keyid||our_keyid>1)return void(ign||this.error("Not of our latest keys."));if(0>their_keyid||their_keyid>1)return void(ign||this.error("Not of your latest keys."));var their_y=their_keyid?this.their_old_y:this.their_y;if(1===their_keyid&&!their_y)return void(ign||this.error("Do not have that key."));var sessKeys=this.sessKeys[our_keyid][their_keyid],ctr=HLP.unpackCtr(msg[4]);if(ctr<=sessKeys.rcv_counter)return void(ign||this.error("Counter in message is not larger."));sessKeys.rcv_counter=ctr,vt+=msg.slice(0,6).join("");var vmac=HLP.make1Mac(vt,sessKeys.rcvmac);if(!HLP.compare(msg[6],vmac))return void(ign||this.error("MACs do not match."));sessKeys.rcvmacused=!0;var out=HLP.decryptAes(msg[5].substring(4),sessKeys.rcvenc,HLP.padCtr(msg[4]));out=out.toString(CryptoJS.enc.Latin1),our_keyid||this.rotateOurKeys(),their_keyid||this.rotateTheirKeys(HLP.readMPI(msg[3]));var ind=out.indexOf("\x00");return~ind&&(this.handleTLVs(out.substring(ind+1),sessKeys),out=out.substring(0,ind)),out=CryptoJS.enc.Latin1.parse(out),out.toString(CryptoJS.enc.Utf8)},OTR.prototype.handleTLVs=function(tlvs,sessKeys){for(var type,len,msg;tlvs.length&&(type=HLP.unpackSHORT(tlvs.substr(0,2)),len=HLP.unpackSHORT(tlvs.substr(2,2)),msg=tlvs.substr(4,len),!(msg.length<len));){switch(type){case 1:this.msgstate=CONST.MSGSTATE_FINISHED,this.trigger("status",[CONST.STATUS_END_OTR]);break;case 2:case 3:case 4:case 5:case 6:case 7:if(this.msgstate!==CONST.MSGSTATE_ENCRYPTED)return void(this.sm&&this.sm.abort());this.sm||this._smInit(),this.sm.handleSM({msg:msg,type:type});break;case 8:msg=msg.substring(4),msg=CryptoJS.enc.Latin1.parse(msg),msg=msg.toString(CryptoJS.enc.Utf8),this.trigger("file",["receive",sessKeys.extra_symkey,msg])}tlvs=tlvs.substring(4+len)}},OTR.prototype.smpSecret=function(secret,question){return this.msgstate!==CONST.MSGSTATE_ENCRYPTED?this.notify("Must be encrypted for SMP."):"string"!=typeof secret||secret.length<1?this.notify("Secret is required."):(this.sm||this._smInit(),secret=CryptoJS.enc.Utf8.parse(secret).toString(CryptoJS.enc.Latin1),question&&(question=CryptoJS.enc.Utf8.parse(question).toString(CryptoJS.enc.Latin1)),void this.sm.rcvSecret(secret,question))},OTR.prototype.sendQueryMsg=function(){var versions={},msg=CONST.OTR_TAG;this.ALLOW_V2&&(versions[2]=!0),this.ALLOW_V3&&(versions[3]=!0);var vs=Object.keys(versions);vs.length&&(msg+="v",vs.forEach(function(v){"1"!==v&&(msg+=v)}),msg+="?"),this.io(msg),this.trigger("status",[CONST.STATUS_SEND_QUERY])},OTR.prototype.sendMsg=function(msg,meta){switch((this.REQUIRE_ENCRYPTION||this.msgstate!==CONST.MSGSTATE_PLAINTEXT)&&(msg=CryptoJS.enc.Utf8.parse(msg),msg=msg.toString(CryptoJS.enc.Latin1)),this.msgstate){case CONST.MSGSTATE_PLAINTEXT:if(this.REQUIRE_ENCRYPTION)return this.storedMgs.push({msg:msg,meta:meta}),void this.sendQueryMsg();this.SEND_WHITESPACE_TAG&&!this.receivedPlaintext&&(msg+=CONST.WHITESPACE_TAG,this.ALLOW_V3&&(msg+=CONST.WHITESPACE_TAG_V3),this.ALLOW_V2&&(msg+=CONST.WHITESPACE_TAG_V2));break;case CONST.MSGSTATE_FINISHED:return this.storedMgs.push({msg:msg,meta:meta}),void this.notify("Message cannot be sent at this time.","warn");case CONST.MSGSTATE_ENCRYPTED:msg=this.prepareMsg(msg);break;default:throw new Error("Unknown message state.")}msg&&this.io(msg,meta)},OTR.prototype.receiveMsg=function(msg,meta){if(msg=Parse.parseMsg(this,msg)){switch(msg.cls){case"error":return void this.notify(msg.msg);case"ake":return msg.version===CONST.OTR_VERSION_3&&this.checkInstanceTags(msg.instance_tags)?void this.notify("Received a message intended for a different session.","warn"):void this.ake.handleAKE(msg);case"data":if(msg.version===CONST.OTR_VERSION_3&&this.checkInstanceTags(msg.instance_tags))return void this.notify("Received a message intended for a different session.","warn");msg.msg=this.handleDataMsg(msg),msg.encrypted=!0;break;case"query":this.msgstate===CONST.MSGSTATE_ENCRYPTED&&this._akeInit(),this.doAKE(msg);break;default:(this.REQUIRE_ENCRYPTION||this.msgstate!==CONST.MSGSTATE_PLAINTEXT)&&this.notify("Received an unencrypted message.","warn"),this.receivedPlaintext=!0,this.WHITESPACE_START_AKE&&msg.ver.length>0&&this.doAKE(msg)}msg.msg&&this.trigger("ui",[msg.msg,!!msg.encrypted,meta])}},OTR.prototype.checkInstanceTags=function(it){var their_it=HLP.readLen(it.substr(0,4)),our_it=HLP.readLen(it.substr(4,4));if(our_it&&our_it!==HLP.readLen(this.our_instance_tag))return!0;if(HLP.readLen(this.their_instance_tag)){if(HLP.readLen(this.their_instance_tag)!==their_it)return!0}else{if(100>their_it)return!0;this.their_instance_tag=HLP.packINT(their_it)}},OTR.prototype.doAKE=function(msg){this.ALLOW_V3&&~msg.ver.indexOf(CONST.OTR_VERSION_3)?this.ake.initiateAKE(CONST.OTR_VERSION_3):this.ALLOW_V2&&~msg.ver.indexOf(CONST.OTR_VERSION_2)?this.ake.initiateAKE(CONST.OTR_VERSION_2):this.notify("OTR conversation requested, but no compatible protocol version found.","warn")},OTR.prototype.error=function(err){this.debug||(err="An OTR error has occurred."),this.io("?OTR Error:"+err),this.notify(err)},OTR.prototype.notify=function(err,severity){this.trigger("error",[err,severity||"error"])},OTR.prototype.sendStored=function(){var self=this;this.storedMgs.splice(0).forEach(function(elem){var msg=self.prepareMsg(elem.msg);self.io(msg,elem.meta)})},OTR.prototype.sendFile=function(filename){if(this.msgstate!==CONST.MSGSTATE_ENCRYPTED)return this.notify("Not ready to encrypt.");if(this.ake.otr_version!==CONST.OTR_VERSION_3)return this.notify("Protocol v3 required.");if(!filename)return this.notify("Please specify a filename.");var l1name=CryptoJS.enc.Utf8.parse(filename);if(l1name=l1name.toString(CryptoJS.enc.Latin1),l1name.length>=65532)return this.notify("Filename is too long.");var msg="\x00";msg+="\x00\b",msg+=HLP.packSHORT(4+l1name.length),msg+="\x00\x00\x00",msg+=l1name,msg=this.prepareMsg(msg,filename),this.io(msg)},OTR.prototype.endOtr=function(cb){this.msgstate===CONST.MSGSTATE_ENCRYPTED?("function"==typeof cb&&(cb=new OTRCB(cb)),this.sendMsg("\x00\x00\x00\x00",cb),this.sm&&(this.smw&&this.sm.worker.terminate(),this.sm=null)):"function"==typeof cb&&setTimeout(cb,0),this.msgstate=CONST.MSGSTATE_PLAINTEXT,this.receivedPlaintext=!1,this.trigger("status",[CONST.STATUS_END_OTR])},OTR.makeInstanceTag=function(){var num=BigInt.randBigInt(32);return BigInt.greater(BigInt.str2bigInt("100",16),num)?OTR.makeInstanceTag():HLP.packINT(parseInt(BigInt.bigInt2str(num,10),10))}}.call(this),{OTR:this.OTR,DSA:this.DSA}}),/*!
* Source: lib/i18next/release/i18next-latest.min.js, license: MIT, url: http://i18next.com/
*/
-!function(){function a(a,b){if(!b||"function"==typeof b)return a;for(var c in b)a[c]=b[c];return a}function b(a,c){for(var d in c)d in a?b(a[d],c[d]):a[d]=c[d];return a}function c(a,b,c){var d,e=0,f=a.length,g=void 0===f||"[object Array]"!==Object.prototype.toString.apply(a)||"function"==typeof a;if(c)if(g){for(d in a)if(b.apply(a[d],c)===!1)break}else for(;f>e&&b.apply(a[e++],c)!==!1;);else if(g){for(d in a)if(b.call(a[d],d,a[d])===!1)break}else for(;f>e&&b.call(a[e],e,a[e++])!==!1;);return a}function d(a){return"string"==typeof a?a.replace(/[&<>"'\/]/g,function(a){return Q[a]}):a}function e(a){var b=function(a){if(window.XMLHttpRequest)return a(null,new XMLHttpRequest);if(window.ActiveXObject)try{return a(null,new ActiveXObject("Msxml2.XMLHTTP"))}catch(b){return a(null,new ActiveXObject("Microsoft.XMLHTTP"))}return a(new Error)},c=function(a){if("string"==typeof a)return a;var b=[];for(var c in a)a.hasOwnProperty(c)&&b.push(encodeURIComponent(c)+"="+encodeURIComponent(a[c]));return b.join("&")},d=function(a){a=a.replace(/\r\n/g,"\n");for(var b="",c=0;c<a.length;c++){var d=a.charCodeAt(c);128>d?b+=String.fromCharCode(d):d>127&&2048>d?(b+=String.fromCharCode(192|d>>6),b+=String.fromCharCode(128|63&d)):(b+=String.fromCharCode(224|d>>12),b+=String.fromCharCode(128|63&d>>6),b+=String.fromCharCode(128|63&d))}return b},e=function(a){var b="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";a=d(a);var c,e,f,g,h,i,j,k="",l=0;do c=a.charCodeAt(l++),e=a.charCodeAt(l++),f=a.charCodeAt(l++),g=c>>2,h=(3&c)<<4|e>>4,i=(15&e)<<2|f>>6,j=63&f,isNaN(e)?i=j=64:isNaN(f)&&(j=64),k+=b.charAt(g)+b.charAt(h)+b.charAt(i)+b.charAt(j),c=e=f="",g=h=i=j="";while(l<a.length);return k},f=function(){for(var a=arguments[0],b=1;b<arguments.length;b++){var c=arguments[b];for(var d in c)c.hasOwnProperty(d)&&(a[d]=c[d])}return a},g=function(a,d,e,h){"function"==typeof e&&(h=e,e={}),e.cache=e.cache||!1,e.data=e.data||{},e.headers=e.headers||{},e.jsonp=e.jsonp||!1,e.async=void 0===e.async?!0:e.async;var i,j=f({accept:"*/*","content-type":"application/x-www-form-urlencoded;charset=UTF-8"},g.headers,e.headers);if(i="application/json"===j["content-type"]?JSON.stringify(e.data):c(e.data),"GET"===a){var k=[];if(i&&(k.push(i),i=null),e.cache||k.push("_="+(new Date).getTime()),e.jsonp&&(k.push("callback="+e.jsonp),k.push("jsonp="+e.jsonp)),k=k.join("&"),k.length>1&&(d+=d.indexOf("?")>-1?"&"+k:"?"+k),e.jsonp){var l=document.getElementsByTagName("head")[0],m=document.createElement("script");return m.type="text/javascript",m.src=d,void l.appendChild(m)}}b(function(b,c){if(b)return h(b);c.open(a,d,e.async);for(var f in j)j.hasOwnProperty(f)&&c.setRequestHeader(f,j[f]);c.onreadystatechange=function(){if(4===c.readyState){var a=c.responseText||"";if(!h)return;h(c.status,{text:function(){return a},json:function(){try{return JSON.parse(a)}catch(b){return T.error("Can not parse JSON. URL: "+d),{}}}})}},c.send(i)})},h={authBasic:function(a,b){g.headers.Authorization="Basic "+e(a+":"+b)},connect:function(a,b,c){return g("CONNECT",a,b,c)},del:function(a,b,c){return g("DELETE",a,b,c)},get:function(a,b,c){return g("GET",a,b,c)},head:function(a,b,c){return g("HEAD",a,b,c)},headers:function(a){g.headers=a||{}},isAllowed:function(a,b,c){this.options(a,function(a,d){c(-1!==d.text().indexOf(b))})},options:function(a,b,c){return g("OPTIONS",a,b,c)},patch:function(a,b,c){return g("PATCH",a,b,c)},post:function(a,b,c){return g("POST",a,b,c)},put:function(a,b,c){return g("PUT",a,b,c)},trace:function(a,b,c){return g("TRACE",a,b,c)}},i=a.type?a.type.toLowerCase():"get";h[i](a.url,a,function(b,c){200===b||0===b&&c.text()?a.success(c.json(),b,null):a.error(c.text(),b,null)})}function f(a,b){"function"==typeof a&&(b=a,a={}),a=a||{},T.extend(P,a),delete P.fixLng,P.functions&&(delete P.functions,T.extend(T,a.functions)),"string"==typeof P.ns&&(P.ns={namespaces:[P.ns],defaultNs:P.ns}),"string"==typeof P.fallbackNS&&(P.fallbackNS=[P.fallbackNS]),("string"==typeof P.fallbackLng||"boolean"==typeof P.fallbackLng)&&(P.fallbackLng=[P.fallbackLng]),P.interpolationPrefixEscaped=T.regexEscape(P.interpolationPrefix),P.interpolationSuffixEscaped=T.regexEscape(P.interpolationSuffix),P.lng||(P.lng=T.detectLanguage()),L=T.toLanguages(P.lng),F=L[0],T.log("currentLng set to: "+F),P.useCookie&&T.cookie.read(P.cookieName)!==F&&T.cookie.create(P.cookieName,F,P.cookieExpirationTime,P.cookieDomain),P.detectLngFromLocalStorage&&"undefined"!=typeof document&&window.localStorage&&T.localStorage.setItem("i18next_lng",F);var c=z;a.fixLng&&(c=function(a,b){return b=b||{},b.lng=b.lng||c.lng,z(a,b)},c.lng=F),W.setCurrentLng(F),H&&P.setJqueryExt&&s();var d;if(H&&H.Deferred&&(d=H.Deferred()),!P.resStore){var e=T.toLanguages(P.lng);"string"==typeof P.preload&&(P.preload=[P.preload]);for(var f=0,g=P.preload.length;g>f;f++)for(var h=T.toLanguages(P.preload[f]),i=0,j=h.length;j>i;i++)e.indexOf(h[i])<0&&e.push(h[i]);return I.sync.load(e,P,function(a,e){J=e,M=!0,b&&b(c),d&&d.resolve(c)}),d?d.promise():void 0}return J=P.resStore,M=!0,b&&b(c),d&&d.resolve(c),d?d.promise():void 0}function g(a,b){"string"==typeof a&&(a=[a]);for(var c=0,d=a.length;d>c;c++)P.preload.indexOf(a[c])<0&&P.preload.push(a[c]);return f(b)}function h(a,b,c,d){"string"!=typeof b?(c=b,b=P.ns.defaultNs):P.ns.namespaces.indexOf(b)<0&&P.ns.namespaces.push(b),J[a]=J[a]||{},J[a][b]=J[a][b]||{},d?T.deepExtend(J[a][b],c):T.extend(J[a][b],c)}function i(a,b){"string"!=typeof b&&(b=P.ns.defaultNs),J[a]=J[a]||{};var c=J[a][b]||{},d=!1;for(var e in c)c.hasOwnProperty(e)&&(d=!0);return d}function j(a,b){"string"!=typeof b&&(b=P.ns.defaultNs),J[a]=J[a]||{},J[a][b]={}}function k(a,b,c,d){"string"!=typeof b?(resource=b,b=P.ns.defaultNs):P.ns.namespaces.indexOf(b)<0&&P.ns.namespaces.push(b),J[a]=J[a]||{},J[a][b]=J[a][b]||{};for(var e=c.split(P.keyseparator),f=0,g=J[a][b];e[f];)f==e.length-1?g[e[f]]=d:(null==g[e[f]]&&(g[e[f]]={}),g=g[e[f]]),f++}function l(a,b,c){"string"!=typeof b?(resource=b,b=P.ns.defaultNs):P.ns.namespaces.indexOf(b)<0&&P.ns.namespaces.push(b);for(var d in c)"string"==typeof c[d]&&k(a,b,d,c[d])}function m(a){P.ns.defaultNs=a}function n(a,b){o([a],b)}function o(a,b){var c={dynamicLoad:P.dynamicLoad,resGetPath:P.resGetPath,getAsync:P.getAsync,customLoad:P.customLoad,ns:{namespaces:a,defaultNs:""}},d=T.toLanguages(P.lng);"string"==typeof P.preload&&(P.preload=[P.preload]);for(var e=0,f=P.preload.length;f>e;e++)for(var g=T.toLanguages(P.preload[e]),h=0,i=g.length;i>h;h++)d.indexOf(g[h])<0&&d.push(g[h]);for(var j=[],k=0,l=d.length;l>k;k++){var m=!1,n=J[d[k]];if(n)for(var o=0,p=a.length;p>o;o++)n[a[o]]||(m=!0);else m=!0;m&&j.push(d[k])}j.length?I.sync._fetch(j,c,function(c,d){var e=a.length*j.length;T.each(a,function(a,c){P.ns.namespaces.indexOf(c)<0&&P.ns.namespaces.push(c),T.each(j,function(a,f){J[f]=J[f]||{},J[f][c]=d[f][c],e--,0===e&&b&&(P.useLocalStorage&&I.sync._storeLocal(J),b())})})}):b&&b()}function p(a,b,c){return"function"==typeof b?(c=b,b={}):b||(b={}),b.lng=a,f(b,c)}function q(){return F}function r(a){J={},p(F,a)}function s(){function a(a,b,c){if(0!==b.length){var d="text";if(0===b.indexOf("[")){var e=b.split("]");b=e[1],d=e[0].substr(1,e[0].length-1)}b.indexOf(";")===b.length-1&&(b=b.substr(0,b.length-2));var f;if("html"===d)f=P.defaultValueFromContent?H.extend({defaultValue:a.html()},c):c,a.html(H.t(b,f));else if("text"===d)f=P.defaultValueFromContent?H.extend({defaultValue:a.text()},c):c,a.text(H.t(b,f));else if("prepend"===d)f=P.defaultValueFromContent?H.extend({defaultValue:a.html()},c):c,a.prepend(H.t(b,f));else if("append"===d)f=P.defaultValueFromContent?H.extend({defaultValue:a.html()},c):c,a.append(H.t(b,f));else if(0===d.indexOf("data-")){var g=d.substr("data-".length);f=P.defaultValueFromContent?H.extend({defaultValue:a.data(g)},c):c;var h=H.t(b,f);a.data(g,h),a.attr(d,h)}else f=P.defaultValueFromContent?H.extend({defaultValue:a.attr(d)},c):c,a.attr(d,H.t(b,f))}}function b(b,c){var d=b.attr(P.selectorAttr);if(d||"undefined"==typeof d||d===!1||(d=b.text()||b.val()),d){var e=b,f=b.data("i18n-target");if(f&&(e=b.find(f)||b),c||P.useDataAttrOptions!==!0||(c=b.data("i18n-options")),c=c||{},d.indexOf(";")>=0){var g=d.split(";");H.each(g,function(b,d){""!==d&&a(e,d,c)})}else a(e,d,c);P.useDataAttrOptions===!0&&b.data("i18n-options",c)}}H.t=H.t||z,H.fn.i18n=function(a){return this.each(function(){b(H(this),a);var c=H(this).find("["+P.selectorAttr+"]");c.each(function(){b(H(this),a)})})}}function t(a,b,c,d){if(!a)return a;if(d=d||b,a.indexOf(d.interpolationPrefix||P.interpolationPrefix)<0)return a;var e=d.interpolationPrefix?T.regexEscape(d.interpolationPrefix):P.interpolationPrefixEscaped,f=d.interpolationSuffix?T.regexEscape(d.interpolationSuffix):P.interpolationSuffixEscaped,g="HTML"+f,h=b.replace&&"object"==typeof b.replace?b.replace:b;return T.each(h,function(b,h){var i=c?c+P.keyseparator+b:b;"object"==typeof h&&null!==h?a=t(a,h,i,d):d.escapeInterpolation||P.escapeInterpolation?(a=a.replace(new RegExp([e,i,g].join(""),"g"),T.regexReplacementEscape(h)),a=a.replace(new RegExp([e,i,f].join(""),"g"),T.regexReplacementEscape(T.escape(h)))):a=a.replace(new RegExp([e,i,f].join(""),"g"),T.regexReplacementEscape(h))}),a}function u(a,b){var c=",",d="{",e="}",f=T.extend({},b);for(delete f.postProcess;-1!=a.indexOf(P.reusePrefix)&&(K++,!(K>P.maxRecursion));){var g=a.lastIndexOf(P.reusePrefix),h=a.indexOf(P.reuseSuffix,g)+P.reuseSuffix.length,i=a.substring(g,h),j=i.replace(P.reusePrefix,"").replace(P.reuseSuffix,"");if(g>=h)return T.error("there is an missing closing in following translation value",a),"";if(-1!=j.indexOf(c)){var k=j.indexOf(c);if(-1!=j.indexOf(d,k)&&-1!=j.indexOf(e,k)){var l=j.indexOf(d,k),m=j.indexOf(e,l)+e.length;try{f=T.extend(f,JSON.parse(j.substring(l,m))),j=j.substring(0,k)}catch(n){}}}var o=C(j,f);a=a.replace(i,T.regexReplacementEscape(o))}return a}function v(a){return a.context&&("string"==typeof a.context||"number"==typeof a.context)}function w(a){return void 0!==a.count&&"string"!=typeof a.count}function x(a){return void 0!==a.indefinite_article&&"string"!=typeof a.indefinite_article&&a.indefinite_article}function y(a,b){b=b||{};var c=A(a,b),d=D(a,b);return void 0!==d||d===c}function z(a,b){return b=b||{},M?(K=0,C.apply(null,arguments)):(T.log("i18next not finished initialization. you might have called t function before loading resources finished."),b.defaultValue||"")}function A(a,b){return void 0!==b.defaultValue?b.defaultValue:a}function B(){for(var a=[],b=1;b<arguments.length;b++)a.push(arguments[b]);return{postProcess:"sprintf",sprintf:a}}function C(a,b){if(b&&"object"!=typeof b?"sprintf"===P.shortcutFunction?b=B.apply(null,arguments):"defaultValue"===P.shortcutFunction&&(b={defaultValue:b}):b=b||{},"object"==typeof P.defaultVariables&&(b=T.extend({},P.defaultVariables,b)),void 0===a||null===a||""===a)return"";"string"==typeof a&&(a=[a]);var c=a[0];if(a.length>1)for(var d=0;d<a.length&&(c=a[d],!y(c,b));d++);var e,f=A(c,b),g=D(c,b),h=b.lng?T.toLanguages(b.lng,b.fallbackLng):L,i=b.ns||P.ns.defaultNs;c.indexOf(P.nsseparator)>-1&&(e=c.split(P.nsseparator),i=e[0],c=e[1]),void 0===g&&P.sendMissing&&"function"==typeof P.missingKeyHandler&&(b.lng?P.missingKeyHandler(h[0],i,c,f,h):P.missingKeyHandler(P.lng,i,c,f,h));var j=b.postProcess||P.postProcess;void 0!==g&&j&&X[j]&&(g=X[j](g,c,b));var k=f;if(f.indexOf(P.nsseparator)>-1&&(e=f.split(P.nsseparator),k=e[1]),k===c&&P.parseMissingKey&&(f=P.parseMissingKey(f)),void 0===g&&(f=t(f,b),f=u(f,b),j&&X[j])){var l=A(c,b);g=X[j](l,c,b)}return void 0!==g?g:f}function D(a,b){b=b||{};var c,d,e=A(a,b),f=L;if(!J)return e;if("cimode"===f[0].toLowerCase())return e;if(b.lngs&&(f=b.lngs),b.lng&&(f=T.toLanguages(b.lng,b.fallbackLng),!J[f[0]])){var g=P.getAsync;P.getAsync=!1,I.sync.load(f,P,function(a,b){T.extend(J,b),P.getAsync=g})}var h=b.ns||P.ns.defaultNs;if(a.indexOf(P.nsseparator)>-1){var i=a.split(P.nsseparator);h=i[0],a=i[1]}if(v(b)){c=T.extend({},b),delete c.context,c.defaultValue=P.contextNotFound;var j=h+P.nsseparator+a+"_"+b.context;if(d=z(j,c),d!=P.contextNotFound)return t(d,{context:b.context})}if(w(b,f[0])){c=T.extend({lngs:[f[0]]},b),delete c.count,delete c.lng,c.defaultValue=P.pluralNotFound;var k;if(W.needsPlural(f[0],b.count)){k=h+P.nsseparator+a+P.pluralSuffix;var l=W.get(f[0],b.count);l>=0?k=k+"_"+l:1===l&&(k=h+P.nsseparator+a)}else k=h+P.nsseparator+a;if(d=z(k,c),d!=P.pluralNotFound)return t(d,{count:b.count,interpolationPrefix:b.interpolationPrefix,interpolationSuffix:b.interpolationSuffix});if(!(f.length>1))return d;var m=f.slice();if(m.shift(),b=T.extend(b,{lngs:m}),delete b.lng,d=z(h+P.nsseparator+a,b),d!=P.pluralNotFound)return d}if(x(b)){var n=T.extend({},b);delete n.indefinite_article,n.defaultValue=P.indefiniteNotFound;var o=h+P.nsseparator+a+(b.count&&!w(b,f[0])||!b.count?P.indefiniteSuffix:"");if(d=z(o,n),d!=P.indefiniteNotFound)return d}for(var p,q=a.split(P.keyseparator),r=0,s=f.length;s>r&&void 0===p;r++){for(var y=f[r],B=0,E=J[y]&&J[y][h];q[B];)E=E&&E[q[B]],B++;if(void 0!==E){var F=Object.prototype.toString.apply(E);if("string"==typeof E)E=t(E,b),E=u(E,b);else if("[object Array]"!==F||P.returnObjectTrees||b.returnObjectTrees){if(null===E&&P.fallbackOnNull===!0)E=void 0;else if(null!==E)if(P.returnObjectTrees||b.returnObjectTrees){if("[object Number]"!==F&&"[object Function]"!==F&&"[object RegExp]"!==F){var G="[object Array]"===F?[]:{};T.each(E,function(c){G[c]=C(h+P.nsseparator+a+P.keyseparator+c,b)}),E=G}}else P.objectTreeKeyHandler&&"function"==typeof P.objectTreeKeyHandler?E=P.objectTreeKeyHandler(a,E,y,h,b):(E="key '"+h+":"+a+" ("+y+")' returned an object instead of string.",T.log(E))}else E=E.join("\n"),E=t(E,b),E=u(E,b);"string"==typeof E&&""===E.trim()&&P.fallbackOnEmpty===!0&&(E=void 0),p=E}}if(void 0===p&&!b.isFallbackLookup&&(P.fallbackToDefaultNS===!0||P.fallbackNS&&P.fallbackNS.length>0)){if(b.isFallbackLookup=!0,P.fallbackNS.length){for(var H=0,K=P.fallbackNS.length;K>H;H++)if(p=D(P.fallbackNS[H]+P.nsseparator+a,b),p||""===p&&P.fallbackOnEmpty===!1){var M=p.indexOf(P.nsseparator)>-1?p.split(P.nsseparator)[1]:p,N=e.indexOf(P.nsseparator)>-1?e.split(P.nsseparator)[1]:e;if(M!==N)break}}else p=D(a,b);b.isFallbackLookup=!1}return p}function E(){var a,b=P.lngWhitelist||[],c=[];if("undefined"!=typeof window&&!function(){for(var a=window.location.search.substring(1),b=a.split("&"),d=0;d<b.length;d++){var e=b[d].indexOf("=");if(e>0){var f=b[d].substring(0,e);f==P.detectLngQS&&c.push(b[d].substring(e+1))}}}(),P.useCookie&&"undefined"!=typeof document){var d=T.cookie.read(P.cookieName);d&&c.push(d)}if(P.detectLngFromLocalStorage&&"undefined"!=typeof window&&window.localStorage&&c.push(window.localStorage.getItem("i18next_lng")),"undefined"!=typeof navigator){if(navigator.languages)for(var e=0;e<navigator.languages.length;e++)c.push(navigator.languages[e]);navigator.userLanguage&&c.push(navigator.userLanguage),navigator.language&&c.push(navigator.language)}return function(){for(var d=0;d<c.length;d++){var e=c[d];if(e.indexOf("-")>-1){var f=e.split("-");e=P.lowerCaseLng?f[0].toLowerCase()+"-"+f[1].toLowerCase():f[0].toLowerCase()+"-"+f[1].toUpperCase()}if(0===b.length||b.indexOf(e)>-1){a=e;break}}}(),a||(a=P.fallbackLng[0]),a}Array.prototype.indexOf||(Array.prototype.indexOf=function(a){"use strict";if(null==this)throw new TypeError;var b=Object(this),c=b.length>>>0;if(0===c)return-1;var d=0;if(arguments.length>0&&(d=Number(arguments[1]),d!=d?d=0:0!=d&&1/0!=d&&d!=-1/0&&(d=(d>0||-1)*Math.floor(Math.abs(d)))),d>=c)return-1;for(var e=d>=0?d:Math.max(c-Math.abs(d),0);c>e;e++)if(e in b&&b[e]===a)return e;return-1}),Array.prototype.lastIndexOf||(Array.prototype.lastIndexOf=function(a){"use strict";if(null==this)throw new TypeError;var b=Object(this),c=b.length>>>0;if(0===c)return-1;var d=c;arguments.length>1&&(d=Number(arguments[1]),d!=d?d=0:0!=d&&d!=1/0&&d!=-(1/0)&&(d=(d>0||-1)*Math.floor(Math.abs(d))));for(var e=d>=0?Math.min(d,c-1):c-Math.abs(d);e>=0;e--)if(e in b&&b[e]===a)return e;return-1}),"function"!=typeof String.prototype.trim&&(String.prototype.trim=function(){return this.replace(/^\s+|\s+$/g,"")});var F,G=this,H=G.jQuery||G.Zepto,I={},J={},K=0,L=[],M=!1,N={};if("undefined"!=typeof module&&module.exports){if(!H)try{H=require("jquery")}catch(O){}H&&(H.i18n=H.i18n||I),module.exports=I}else H&&(H.i18n=H.i18n||I),G.i18n=G.i18n||I;N={load:function(a,b,c){b.useLocalStorage?N._loadLocal(a,b,function(d,e){for(var f=[],g=0,h=a.length;h>g;g++)e[a[g]]||f.push(a[g]);f.length>0?N._fetch(f,b,function(a,b){T.extend(e,b),N._storeLocal(b),c(null,e)}):c(null,e)}):N._fetch(a,b,function(a,b){c(null,b)})},_loadLocal:function(a,b,c){var d={},e=(new Date).getTime();if(window.localStorage){var f=a.length;T.each(a,function(a,g){var h=window.localStorage.getItem("res_"+g);h&&(h=JSON.parse(h),h.i18nStamp&&h.i18nStamp+b.localStorageExpirationTime>e&&(d[g]=h)),f--,0===f&&c(null,d)})}},_storeLocal:function(a){if(window.localStorage)for(var b in a)a[b].i18nStamp=(new Date).getTime(),T.localStorage.setItem("res_"+b,JSON.stringify(a[b]))},_fetch:function(a,b,c){var d=b.ns,e={};if(b.dynamicLoad){var f=function(a,b){c(null,b)};if("function"==typeof b.customLoad)b.customLoad(a,d.namespaces,b,f);else{var g=t(b.resGetPath,{lng:a.join("+"),ns:d.namespaces.join("+")});T.ajax({url:g,success:function(a){T.log("loaded: "+g),f(null,a)},error:function(a,b,c){T.log("failed loading: "+g),f("failed loading resource.json error: "+c)},dataType:"json",async:b.getAsync})}}else{var h,i=d.namespaces.length*a.length;T.each(d.namespaces,function(d,f){T.each(a,function(a,d){var g=function(a,b){a&&(h=h||[],h.push(a)),e[d]=e[d]||{},e[d][f]=b,i--,0===i&&c(h,e)};"function"==typeof b.customLoad?b.customLoad(d,f,b,g):N._fetchOne(d,f,b,g)})})}},_fetchOne:function(a,b,c,d){var e=t(c.resGetPath,{lng:a,ns:b});T.ajax({url:e,success:function(a){T.log("loaded: "+e),d(null,a)},error:function(a,b,c){if(b&&200==b||a&&a.status&&200==a.status)T.error("There is a typo in: "+e);else if(b&&404==b||a&&a.status&&404==a.status)T.log("Does not exist: "+e);else{var f=b?b:a&&a.status?a.status:null;T.log(f+" when loading "+e)}d(c,{})},dataType:"json",async:c.getAsync})},postMissing:function(a,b,c,d,e){var f={};f[c]=d;var g=[];if("fallback"===P.sendMissingTo&&P.fallbackLng[0]!==!1)for(var h=0;h<P.fallbackLng.length;h++)g.push({lng:P.fallbackLng[h],url:t(P.resPostPath,{lng:P.fallbackLng[h],ns:b})});else if("current"===P.sendMissingTo||"fallback"===P.sendMissingTo&&P.fallbackLng[0]===!1)g.push({lng:a,url:t(P.resPostPath,{lng:a,ns:b})});else if("all"===P.sendMissingTo)for(var h=0,i=e.length;i>h;h++)g.push({lng:e[h],url:t(P.resPostPath,{lng:e[h],ns:b})});for(var j=0,k=g.length;k>j;j++){var l=g[j];T.ajax({url:l.url,type:P.sendType,data:f,success:function(){T.log("posted missing key '"+c+"' to: "+l.url);for(var a=c.split("."),e=0,f=J[l.lng][b];a[e];)f=f[a[e]]=e===a.length-1?d:f[a[e]]||{},e++},error:function(){T.log("failed posting missing key '"+c+"' to: "+l.url)},dataType:"json",async:P.postAsync})}},reload:r};var P={lng:void 0,load:"all",preload:[],lowerCaseLng:!1,returnObjectTrees:!1,fallbackLng:["dev"],fallbackNS:[],detectLngQS:"setLng",detectLngFromLocalStorage:!1,ns:"translation",fallbackOnNull:!0,fallbackOnEmpty:!1,fallbackToDefaultNS:!1,nsseparator:":",keyseparator:".",selectorAttr:"data-i18n",debug:!1,resGetPath:"locales/__lng__/__ns__.json",resPostPath:"locales/add/__lng__/__ns__",getAsync:!0,postAsync:!0,resStore:void 0,useLocalStorage:!1,localStorageExpirationTime:6048e5,dynamicLoad:!1,sendMissing:!1,sendMissingTo:"fallback",sendType:"POST",interpolationPrefix:"__",interpolationSuffix:"__",defaultVariables:!1,reusePrefix:"$t(",reuseSuffix:")",pluralSuffix:"_plural",pluralNotFound:["plural_not_found",Math.random()].join(""),contextNotFound:["context_not_found",Math.random()].join(""),escapeInterpolation:!1,indefiniteSuffix:"_indefinite",indefiniteNotFound:["indefinite_not_found",Math.random()].join(""),setJqueryExt:!0,defaultValueFromContent:!0,useDataAttrOptions:!1,cookieExpirationTime:void 0,useCookie:!0,cookieName:"i18next",cookieDomain:void 0,objectTreeKeyHandler:void 0,postProcess:void 0,parseMissingKey:void 0,missingKeyHandler:N.postMissing,shortcutFunction:"sprintf"},Q={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;","/":"&#x2F;"},R={create:function(a,b,c,d){var e;if(c){var f=new Date;f.setTime(f.getTime()+6e4*c),e="; expires="+f.toGMTString()}else e="";d=d?"domain="+d+";":"",document.cookie=a+"="+b+e+";"+d+"path=/"},read:function(a){for(var b=a+"=",c=document.cookie.split(";"),d=0;d<c.length;d++){for(var e=c[d];" "==e.charAt(0);)e=e.substring(1,e.length);if(0===e.indexOf(b))return e.substring(b.length,e.length)}return null},remove:function(a){this.create(a,"",-1)}},S={create:function(){},read:function(){return null},remove:function(){}},T={extend:H?H.extend:a,deepExtend:b,each:H?H.each:c,ajax:H?H.ajax:"undefined"!=typeof document?e:function(){},cookie:"undefined"!=typeof document?R:S,detectLanguage:E,escape:d,log:function(a){P.debug&&"undefined"!=typeof console&&console.log(a)},error:function(a){"undefined"!=typeof console&&console.error(a)},getCountyIndexOfLng:function(a){var b=0;return("nb-NO"===a||"nn-NO"===a||"nb-no"===a||"nn-no"===a)&&(b=1),b},toLanguages:function(a){function b(a){var b=a;if("string"==typeof a&&a.indexOf("-")>-1){var c=a.split("-");b=P.lowerCaseLng?c[0].toLowerCase()+"-"+c[1].toLowerCase():c[0].toLowerCase()+"-"+c[1].toUpperCase()}else b=P.lowerCaseLng?a.toLowerCase():a;return b}var c=this.log,d=[],e=P.lngWhitelist||!1,f=function(a){!e||e.indexOf(a)>-1?d.push(a):c("rejecting non-whitelisted language: "+a)};if("string"==typeof a&&a.indexOf("-")>-1){var g=a.split("-");"unspecific"!==P.load&&f(b(a)),"current"!==P.load&&f(b(g[this.getCountyIndexOfLng(a)]))}else f(b(a));for(var h=0;h<P.fallbackLng.length;h++)-1===d.indexOf(P.fallbackLng[h])&&P.fallbackLng[h]&&d.push(b(P.fallbackLng[h]));return d},regexEscape:function(a){return a.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&")},regexReplacementEscape:function(a){return"string"==typeof a?a.replace(/\$/g,"$$$$"):a},localStorage:{setItem:function(a,b){if(window.localStorage)try{window.localStorage.setItem(a,b)}catch(c){T.log('failed to set value for key "'+a+'" to localStorage.')}}}};T.applyReplacement=t;var U=[["ach","Acholi",[1,2],1],["af","Afrikaans",[1,2],2],["ak","Akan",[1,2],1],["am","Amharic",[1,2],1],["an","Aragonese",[1,2],2],["ar","Arabic",[0,1,2,3,11,100],5],["arn","Mapudungun",[1,2],1],["ast","Asturian",[1,2],2],["ay","Aymará",[1],3],["az","Azerbaijani",[1,2],2],["be","Belarusian",[1,2,5],4],["bg","Bulgarian",[1,2],2],["bn","Bengali",[1,2],2],["bo","Tibetan",[1],3],["br","Breton",[1,2],1],["bs","Bosnian",[1,2,5],4],["ca","Catalan",[1,2],2],["cgg","Chiga",[1],3],["cs","Czech",[1,2,5],6],["csb","Kashubian",[1,2,5],7],["cy","Welsh",[1,2,3,8],8],["da","Danish",[1,2],2],["de","German",[1,2],2],["dev","Development Fallback",[1,2],2],["dz","Dzongkha",[1],3],["el","Greek",[1,2],2],["en","English",[1,2],2],["eo","Esperanto",[1,2],2],["es","Spanish",[1,2],2],["es_ar","Argentinean Spanish",[1,2],2],["et","Estonian",[1,2],2],["eu","Basque",[1,2],2],["fa","Persian",[1],3],["fi","Finnish",[1,2],2],["fil","Filipino",[1,2],1],["fo","Faroese",[1,2],2],["fr","French",[1,2],9],["fur","Friulian",[1,2],2],["fy","Frisian",[1,2],2],["ga","Irish",[1,2,3,7,11],10],["gd","Scottish Gaelic",[1,2,3,20],11],["gl","Galician",[1,2],2],["gu","Gujarati",[1,2],2],["gun","Gun",[1,2],1],["ha","Hausa",[1,2],2],["he","Hebrew",[1,2],2],["hi","Hindi",[1,2],2],["hr","Croatian",[1,2,5],4],["hu","Hungarian",[1,2],2],["hy","Armenian",[1,2],2],["ia","Interlingua",[1,2],2],["id","Indonesian",[1],3],["is","Icelandic",[1,2],12],["it","Italian",[1,2],2],["ja","Japanese",[1],3],["jbo","Lojban",[1],3],["jv","Javanese",[0,1],13],["ka","Georgian",[1],3],["kk","Kazakh",[1],3],["km","Khmer",[1],3],["kn","Kannada",[1,2],2],["ko","Korean",[1],3],["ku","Kurdish",[1,2],2],["kw","Cornish",[1,2,3,4],14],["ky","Kyrgyz",[1],3],["lb","Letzeburgesch",[1,2],2],["ln","Lingala",[1,2],1],["lo","Lao",[1],3],["lt","Lithuanian",[1,2,10],15],["lv","Latvian",[1,2,0],16],["mai","Maithili",[1,2],2],["mfe","Mauritian Creole",[1,2],1],["mg","Malagasy",[1,2],1],["mi","Maori",[1,2],1],["mk","Macedonian",[1,2],17],["ml","Malayalam",[1,2],2],["mn","Mongolian",[1,2],2],["mnk","Mandinka",[0,1,2],18],["mr","Marathi",[1,2],2],["ms","Malay",[1],3],["mt","Maltese",[1,2,11,20],19],["nah","Nahuatl",[1,2],2],["nap","Neapolitan",[1,2],2],["nb","Norwegian Bokmal",[1,2],2],["ne","Nepali",[1,2],2],["nl","Dutch",[1,2],2],["nn","Norwegian Nynorsk",[1,2],2],["no","Norwegian",[1,2],2],["nso","Northern Sotho",[1,2],2],["oc","Occitan",[1,2],1],["or","Oriya",[2,1],2],["pa","Punjabi",[1,2],2],["pap","Papiamento",[1,2],2],["pl","Polish",[1,2,5],7],["pms","Piemontese",[1,2],2],["ps","Pashto",[1,2],2],["pt","Portuguese",[1,2],2],["pt_br","Brazilian Portuguese",[1,2],2],["rm","Romansh",[1,2],2],["ro","Romanian",[1,2,20],20],["ru","Russian",[1,2,5],4],["sah","Yakut",[1],3],["sco","Scots",[1,2],2],["se","Northern Sami",[1,2],2],["si","Sinhala",[1,2],2],["sk","Slovak",[1,2,5],6],["sl","Slovenian",[5,1,2,3],21],["so","Somali",[1,2],2],["son","Songhay",[1,2],2],["sq","Albanian",[1,2],2],["sr","Serbian",[1,2,5],4],["su","Sundanese",[1],3],["sv","Swedish",[1,2],2],["sw","Swahili",[1,2],2],["ta","Tamil",[1,2],2],["te","Telugu",[1,2],2],["tg","Tajik",[1,2],1],["th","Thai",[1],3],["ti","Tigrinya",[1,2],1],["tk","Turkmen",[1,2],2],["tr","Turkish",[1,2],1],["tt","Tatar",[1],3],["ug","Uyghur",[1],3],["uk","Ukrainian",[1,2,5],4],["ur","Urdu",[1,2],2],["uz","Uzbek",[1,2],1],["vi","Vietnamese",[1],3],["wa","Walloon",[1,2],1],["wo","Wolof",[1],3],["yo","Yoruba",[1,2],2],["zh","Chinese",[1],3]],V={1:function(a){return Number(a>1)},2:function(a){return Number(1!=a)},3:function(){return 0},4:function(a){return Number(1==a%10&&11!=a%100?0:a%10>=2&&4>=a%10&&(10>a%100||a%100>=20)?1:2)},5:function(a){return Number(0===a?0:1==a?1:2==a?2:a%100>=3&&10>=a%100?3:a%100>=11?4:5)},6:function(a){return Number(1==a?0:a>=2&&4>=a?1:2)},7:function(a){return Number(1==a?0:a%10>=2&&4>=a%10&&(10>a%100||a%100>=20)?1:2)},8:function(a){return Number(1==a?0:2==a?1:8!=a&&11!=a?2:3)},9:function(a){return Number(a>=2)},10:function(a){return Number(1==a?0:2==a?1:7>a?2:11>a?3:4)},11:function(a){return Number(1==a||11==a?0:2==a||12==a?1:a>2&&20>a?2:3)},12:function(a){return Number(1!=a%10||11==a%100)},13:function(a){return Number(0!==a)},14:function(a){return Number(1==a?0:2==a?1:3==a?2:3)},15:function(a){return Number(1==a%10&&11!=a%100?0:a%10>=2&&(10>a%100||a%100>=20)?1:2)},16:function(a){return Number(1==a%10&&11!=a%100?0:0!==a?1:2)},17:function(a){return Number(1==a||1==a%10?0:1)},18:function(a){return Number(1==a?1:2)},19:function(a){return Number(1==a?0:0===a||a%100>1&&11>a%100?1:a%100>10&&20>a%100?2:3)},20:function(a){return Number(1==a?0:0===a||a%100>0&&20>a%100?1:2)},21:function(a){return Number(1==a%100?1:2==a%100?2:3==a%100||4==a%100?3:0)}},W={rules:function(){var a,b={};for(a=U.length;a--;)b[U[a][0]]={name:U[a][1],numbers:U[a][2],plurals:V[U[a][3]]};return b}(),addRule:function(a,b){W.rules[a]=b},setCurrentLng:function(a){if(!W.currentRule||W.currentRule.lng!==a){var b=a.split("-");W.currentRule={lng:a,rule:W.rules[b[0]]}}},needsPlural:function(a,b){var c,d=a.split("-");return c=W.currentRule&&W.currentRule.lng===a?W.currentRule.rule:W.rules[d[T.getCountyIndexOfLng(a)]],c&&c.numbers.length<=1?!1:1!==this.get(a,b)},get:function(a,b){function c(b,c){var d;if(d=W.currentRule&&W.currentRule.lng===a?W.currentRule.rule:W.rules[b]){var e;e=d.plurals(d.noAbs?c:Math.abs(c));var f=d.numbers[e];return 2===d.numbers.length&&1===d.numbers[0]&&(2===f?f=-1:1===f&&(f=1)),f}return 1===c?"1":"-1"}var d=a.split("-");return c(d[T.getCountyIndexOfLng(a)],b)}},X={},Y=function(a,b){X[a]=b},Z=function(){function a(a){return Object.prototype.toString.call(a).slice(8,-1).toLowerCase()}function b(a,b){for(var c=[];b>0;c[--b]=a);return c.join("")}var c=function(){return c.cache.hasOwnProperty(arguments[0])||(c.cache[arguments[0]]=c.parse(arguments[0])),c.format.call(null,c.cache[arguments[0]],arguments)};return c.format=function(c,d){var e,f,g,h,i,j,k,l=1,m=c.length,n="",o=[];for(f=0;m>f;f++)if(n=a(c[f]),"string"===n)o.push(c[f]);else if("array"===n){if(h=c[f],h[2])for(e=d[l],g=0;g<h[2].length;g++){if(!e.hasOwnProperty(h[2][g]))throw Z('[sprintf] property "%s" does not exist',h[2][g]);e=e[h[2][g]]}else e=h[1]?d[h[1]]:d[l++];if(/[^s]/.test(h[8])&&"number"!=a(e))throw Z("[sprintf] expecting number but found %s",a(e));switch(h[8]){case"b":e=e.toString(2);break;case"c":e=String.fromCharCode(e);break;case"d":e=parseInt(e,10);break;case"e":e=h[7]?e.toExponential(h[7]):e.toExponential();break;case"f":e=h[7]?parseFloat(e).toFixed(h[7]):parseFloat(e);break;case"o":e=e.toString(8);break;case"s":e=(e=String(e))&&h[7]?e.substring(0,h[7]):e;break;case"u":e=Math.abs(e);break;case"x":e=e.toString(16);break;case"X":e=e.toString(16).toUpperCase()}e=/[def]/.test(h[8])&&h[3]&&e>=0?"+"+e:e,j=h[4]?"0"==h[4]?"0":h[4].charAt(1):" ",k=h[6]-String(e).length,i=h[6]?b(j,k):"",o.push(h[5]?e+i:i+e)}return o.join("")},c.cache={},c.parse=function(a){for(var b=a,c=[],d=[],e=0;b;){if(null!==(c=/^[^\x25]+/.exec(b)))d.push(c[0]);else if(null!==(c=/^\x25{2}/.exec(b)))d.push("%");else{if(null===(c=/^\x25(?:([1-9]\d*)\$|\(([^\)]+)\))?(\+)?(0|'[^$])?(-)?(\d+)?(?:\.(\d+))?([b-fosuxX])/.exec(b)))throw"[sprintf] huh?";if(c[2]){e|=1;var f=[],g=c[2],h=[];if(null===(h=/^([a-z_][a-z_\d]*)/i.exec(g)))throw"[sprintf] huh?";for(f.push(h[1]);""!==(g=g.substring(h[0].length));)if(null!==(h=/^\.([a-z_][a-z_\d]*)/i.exec(g)))f.push(h[1]);else{if(null===(h=/^\[(\d+)\]/.exec(g)))throw"[sprintf] huh?";f.push(h[1])}c[2]=f}else e|=2;if(3===e)throw"[sprintf] mixing positional and named placeholders is not (yet) supported";d.push(c)}b=b.substring(c[0].length)}return d},c}(),$=function(a,b){return b.unshift(a),Z.apply(null,b)};Y("sprintf",function(a,b,c){return c.sprintf?"[object Array]"===Object.prototype.toString.apply(c.sprintf)?$(a,c.sprintf):"object"==typeof c.sprintf?Z(a,c.sprintf):a:a}),I.init=f,I.setLng=p,I.preload=g,I.addResourceBundle=h,I.hasResourceBundle=i,I.addResource=k,I.addResources=l,I.removeResourceBundle=j,I.loadNamespace=n,I.loadNamespaces=o,I.setDefaultNamespace=m,I.t=z,I.translate=z,I.exists=y,I.detectLanguage=T.detectLanguage,I.pluralExtensions=W,I.sync=N,I.functions=T,I.lng=q,I.addPostProcessor=Y,I.options=P}();/*!
+!function(){function a(a,b){if(!b||"function"==typeof b)return a;for(var c in b)a[c]=b[c];return a}function b(a,c){for(var d in c)d in a?b(a[d],c[d]):a[d]=c[d];return a}function c(a,b,c){var d,e=0,f=a.length,g=void 0===f||"[object Array]"!==Object.prototype.toString.apply(a)||"function"==typeof a;if(c)if(g){for(d in a)if(b.apply(a[d],c)===!1)break}else for(;f>e&&b.apply(a[e++],c)!==!1;);else if(g){for(d in a)if(b.call(a[d],d,a[d])===!1)break}else for(;f>e&&b.call(a[e],e,a[e++])!==!1;);return a}function d(a){return"string"==typeof a?a.replace(/[&<>"'\/]/g,function(a){return Q[a]}):a}function e(a){var b=function(a){if(window.XMLHttpRequest)return a(null,new XMLHttpRequest);if(window.ActiveXObject)try{return a(null,new ActiveXObject("Msxml2.XMLHTTP"))}catch(b){return a(null,new ActiveXObject("Microsoft.XMLHTTP"))}return a(new Error)},c=function(a){if("string"==typeof a)return a;var b=[];for(var c in a)a.hasOwnProperty(c)&&b.push(encodeURIComponent(c)+"="+encodeURIComponent(a[c]));return b.join("&")},d=function(a){a=a.replace(/\r\n/g,"\n");for(var b="",c=0;c<a.length;c++){var d=a.charCodeAt(c);128>d?b+=String.fromCharCode(d):d>127&&2048>d?(b+=String.fromCharCode(192|d>>6),b+=String.fromCharCode(128|63&d)):(b+=String.fromCharCode(224|d>>12),b+=String.fromCharCode(128|63&d>>6),b+=String.fromCharCode(128|63&d))}return b},e=function(a){var b="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";a=d(a);var c,e,f,g,h,i,j,k="",l=0;do c=a.charCodeAt(l++),e=a.charCodeAt(l++),f=a.charCodeAt(l++),g=c>>2,h=(3&c)<<4|e>>4,i=(15&e)<<2|f>>6,j=63&f,isNaN(e)?i=j=64:isNaN(f)&&(j=64),k+=b.charAt(g)+b.charAt(h)+b.charAt(i)+b.charAt(j),c=e=f="",g=h=i=j="";while(l<a.length);return k},f=function(){for(var a=arguments[0],b=1;b<arguments.length;b++){var c=arguments[b];for(var d in c)c.hasOwnProperty(d)&&(a[d]=c[d])}return a},g=function(a,d,e,h){"function"==typeof e&&(h=e,e={}),e.cache=e.cache||!1,e.data=e.data||{},e.headers=e.headers||{},e.jsonp=e.jsonp||!1,e.async=void 0===e.async?!0:e.async;var i,j=f({accept:"*/*","content-type":"application/x-www-form-urlencoded;charset=UTF-8"},g.headers,e.headers);if(i="application/json"===j["content-type"]?JSON.stringify(e.data):c(e.data),"GET"===a){var k=[];if(i&&(k.push(i),i=null),e.cache||k.push("_="+(new Date).getTime()),e.jsonp&&(k.push("callback="+e.jsonp),k.push("jsonp="+e.jsonp)),k=k.join("&"),k.length>1&&(d+=d.indexOf("?")>-1?"&"+k:"?"+k),e.jsonp){var l=document.getElementsByTagName("head")[0],m=document.createElement("script");return m.type="text/javascript",m.src=d,void l.appendChild(m)}}b(function(b,c){if(b)return h(b);c.open(a,d,e.async);for(var f in j)j.hasOwnProperty(f)&&c.setRequestHeader(f,j[f]);c.onreadystatechange=function(){if(4===c.readyState){var a=c.responseText||"";if(!h)return;h(c.status,{text:function(){return a},json:function(){try{return JSON.parse(a)}catch(b){return T.error("Can not parse JSON. URL: "+d),{}}}})}},c.send(i)})},h={authBasic:function(a,b){g.headers.Authorization="Basic "+e(a+":"+b)},connect:function(a,b,c){return g("CONNECT",a,b,c)},del:function(a,b,c){return g("DELETE",a,b,c)},get:function(a,b,c){return g("GET",a,b,c)},head:function(a,b,c){return g("HEAD",a,b,c)},headers:function(a){g.headers=a||{}},isAllowed:function(a,b,c){this.options(a,function(a,d){c(-1!==d.text().indexOf(b))})},options:function(a,b,c){return g("OPTIONS",a,b,c)},patch:function(a,b,c){return g("PATCH",a,b,c)},post:function(a,b,c){return g("POST",a,b,c)},put:function(a,b,c){return g("PUT",a,b,c)},trace:function(a,b,c){return g("TRACE",a,b,c)}},i=a.type?a.type.toLowerCase():"get";h[i](a.url,a,function(b,c){200===b||0===b&&c.text()?a.success(c.json(),b,null):a.error(c.text(),b,null)})}function f(a,b){"function"==typeof a&&(b=a,a={}),a=a||{},T.extend(P,a),delete P.fixLng,P.functions&&(delete P.functions,T.extend(T,a.functions)),"string"==typeof P.ns&&(P.ns={namespaces:[P.ns],defaultNs:P.ns}),"string"==typeof P.fallbackNS&&(P.fallbackNS=[P.fallbackNS]),("string"==typeof P.fallbackLng||"boolean"==typeof P.fallbackLng)&&(P.fallbackLng=[P.fallbackLng]),P.interpolationPrefixEscaped=T.regexEscape(P.interpolationPrefix),P.interpolationSuffixEscaped=T.regexEscape(P.interpolationSuffix),P.lng||(P.lng=T.detectLanguage()),L=T.toLanguages(P.lng),F=L[0],T.log("currentLng set to: "+F),P.useCookie&&T.cookie.read(P.cookieName)!==F&&T.cookie.create(P.cookieName,F,P.cookieExpirationTime,P.cookieDomain),P.detectLngFromLocalStorage&&"undefined"!=typeof document&&window.localStorage&&T.localStorage.setItem("i18next_lng",F);var c=z;a.fixLng&&(c=function(a,b){return b=b||{},b.lng=b.lng||c.lng,z(a,b)},c.lng=F),W.setCurrentLng(F),H&&P.setJqueryExt&&s();var d;if(H&&H.Deferred&&(d=H.Deferred()),!P.resStore){var e=T.toLanguages(P.lng);"string"==typeof P.preload&&(P.preload=[P.preload]);for(var f=0,g=P.preload.length;g>f;f++)for(var h=T.toLanguages(P.preload[f]),i=0,j=h.length;j>i;i++)e.indexOf(h[i])<0&&e.push(h[i]);return I.sync.load(e,P,function(a,e){J=e,M=!0,b&&b(c),d&&d.resolve(c)}),d?d.promise():void 0}return J=P.resStore,M=!0,b&&b(c),d&&d.resolve(c),d?d.promise():void 0}function g(a,b){"string"==typeof a&&(a=[a]);for(var c=0,d=a.length;d>c;c++)P.preload.indexOf(a[c])<0&&P.preload.push(a[c]);return f(b)}function h(a,b,c,d){"string"!=typeof b?(c=b,b=P.ns.defaultNs):P.ns.namespaces.indexOf(b)<0&&P.ns.namespaces.push(b),J[a]=J[a]||{},J[a][b]=J[a][b]||{},d?T.deepExtend(J[a][b],c):T.extend(J[a][b],c)}function i(a,b){"string"!=typeof b&&(b=P.ns.defaultNs),J[a]=J[a]||{};var c=J[a][b]||{},d=!1;for(var e in c)c.hasOwnProperty(e)&&(d=!0);return d}function j(a,b){"string"!=typeof b&&(b=P.ns.defaultNs),J[a]=J[a]||{},J[a][b]={}}function k(a,b,c,d){"string"!=typeof b?(resource=b,b=P.ns.defaultNs):P.ns.namespaces.indexOf(b)<0&&P.ns.namespaces.push(b),J[a]=J[a]||{},J[a][b]=J[a][b]||{};for(var e=c.split(P.keyseparator),f=0,g=J[a][b];e[f];)f==e.length-1?g[e[f]]=d:(null==g[e[f]]&&(g[e[f]]={}),g=g[e[f]]),f++}function l(a,b,c){"string"!=typeof b?(resource=b,b=P.ns.defaultNs):P.ns.namespaces.indexOf(b)<0&&P.ns.namespaces.push(b);for(var d in c)"string"==typeof c[d]&&k(a,b,d,c[d])}function m(a){P.ns.defaultNs=a}function n(a,b){o([a],b)}function o(a,b){var c={dynamicLoad:P.dynamicLoad,resGetPath:P.resGetPath,getAsync:P.getAsync,customLoad:P.customLoad,ns:{namespaces:a,defaultNs:""}},d=T.toLanguages(P.lng);"string"==typeof P.preload&&(P.preload=[P.preload]);for(var e=0,f=P.preload.length;f>e;e++)for(var g=T.toLanguages(P.preload[e]),h=0,i=g.length;i>h;h++)d.indexOf(g[h])<0&&d.push(g[h]);for(var j=[],k=0,l=d.length;l>k;k++){var m=!1,n=J[d[k]];if(n)for(var o=0,p=a.length;p>o;o++)n[a[o]]||(m=!0);else m=!0;m&&j.push(d[k])}j.length?I.sync._fetch(j,c,function(c,d){var e=a.length*j.length;T.each(a,function(a,c){P.ns.namespaces.indexOf(c)<0&&P.ns.namespaces.push(c),T.each(j,function(a,f){J[f]=J[f]||{},J[f][c]=d[f][c],e--,0===e&&b&&(P.useLocalStorage&&I.sync._storeLocal(J),b())})})}):b&&b()}function p(a,b,c){return"function"==typeof b?(c=b,b={}):b||(b={}),b.lng=a,f(b,c)}function q(){return F}function r(a){J={},p(F,a)}function s(){function a(a,b,c){if(0!==b.length){var d="text";if(0===b.indexOf("[")){var e=b.split("]");b=e[1],d=e[0].substr(1,e[0].length-1)}b.indexOf(";")===b.length-1&&(b=b.substr(0,b.length-2));var f;if("html"===d)f=P.defaultValueFromContent?H.extend({defaultValue:a.html()},c):c,a.html(H.t(b,f));else if("text"===d)f=P.defaultValueFromContent?H.extend({defaultValue:a.text()},c):c,a.text(H.t(b,f));else if("prepend"===d)f=P.defaultValueFromContent?H.extend({defaultValue:a.html()},c):c,a.prepend(H.t(b,f));else if("append"===d)f=P.defaultValueFromContent?H.extend({defaultValue:a.html()},c):c,a.append(H.t(b,f));else if(0===d.indexOf("data-")){var g=d.substr("data-".length);f=P.defaultValueFromContent?H.extend({defaultValue:a.data(g)},c):c;var h=H.t(b,f);a.data(g,h),a.attr(d,h)}else f=P.defaultValueFromContent?H.extend({defaultValue:a.attr(d)},c):c,a.attr(d,H.t(b,f))}}function b(b,c){var d=b.attr(P.selectorAttr);if(d||"undefined"==typeof d||d===!1||(d=b.text()||b.val()),d){var e=b,f=b.data("i18n-target");if(f&&(e=b.find(f)||b),c||P.useDataAttrOptions!==!0||(c=b.data("i18n-options")),c=c||{},d.indexOf(";")>=0){var g=d.split(";");H.each(g,function(b,d){""!==d&&a(e,d,c)})}else a(e,d,c);P.useDataAttrOptions===!0&&b.data("i18n-options",c)}}H.t=H.t||z,H.fn.i18n=function(a){return this.each(function(){b(H(this),a);var c=H(this).find("["+P.selectorAttr+"]");c.each(function(){b(H(this),a)})})}}function t(a,b,c,d){if(!a)return a;if(d=d||b,a.indexOf(d.interpolationPrefix||P.interpolationPrefix)<0)return a;var e=d.interpolationPrefix?T.regexEscape(d.interpolationPrefix):P.interpolationPrefixEscaped,f=d.interpolationSuffix?T.regexEscape(d.interpolationSuffix):P.interpolationSuffixEscaped,g="HTML"+f,h=b.replace&&"object"==typeof b.replace?b.replace:b;return T.each(h,function(b,h){var i=c?c+P.keyseparator+b:b;"object"==typeof h&&null!==h?a=t(a,h,i,d):d.escapeInterpolation||P.escapeInterpolation?(a=a.replace(new RegExp([e,i,g].join(""),"g"),T.regexReplacementEscape(h)),a=a.replace(new RegExp([e,i,f].join(""),"g"),T.regexReplacementEscape(T.escape(h)))):a=a.replace(new RegExp([e,i,f].join(""),"g"),T.regexReplacementEscape(h))}),a}function u(a,b){var c=",",d="{",e="}",f=T.extend({},b);for(delete f.postProcess;-1!=a.indexOf(P.reusePrefix)&&(K++,!(K>P.maxRecursion));){var g=a.lastIndexOf(P.reusePrefix),h=a.indexOf(P.reuseSuffix,g)+P.reuseSuffix.length,i=a.substring(g,h),j=i.replace(P.reusePrefix,"").replace(P.reuseSuffix,"");if(g>=h)return T.error("there is an missing closing in following translation value",a),"";if(-1!=j.indexOf(c)){var k=j.indexOf(c);if(-1!=j.indexOf(d,k)&&-1!=j.indexOf(e,k)){var l=j.indexOf(d,k),m=j.indexOf(e,l)+e.length;try{f=T.extend(f,JSON.parse(j.substring(l,m))),j=j.substring(0,k)}catch(n){}}}var o=C(j,f);a=a.replace(i,T.regexReplacementEscape(o))}return a}function v(a){return a.context&&("string"==typeof a.context||"number"==typeof a.context)}function w(a){return void 0!==a.count&&"string"!=typeof a.count}function x(a){return void 0!==a.indefinite_article&&"string"!=typeof a.indefinite_article&&a.indefinite_article}function y(a,b){b=b||{};var c=A(a,b),d=D(a,b);return void 0!==d||d===c}function z(a,b){return b=b||{},M?(K=0,C.apply(null,arguments)):(T.log("i18next not finished initialization. you might have called t function before loading resources finished."),b.defaultValue||"")}function A(a,b){return void 0!==b.defaultValue?b.defaultValue:a}function B(){for(var a=[],b=1;b<arguments.length;b++)a.push(arguments[b]);return{postProcess:"sprintf",sprintf:a}}function C(a,b){if(b&&"object"!=typeof b?"sprintf"===P.shortcutFunction?b=B.apply(null,arguments):"defaultValue"===P.shortcutFunction&&(b={defaultValue:b}):b=b||{},"object"==typeof P.defaultVariables&&(b=T.extend({},P.defaultVariables,b)),void 0===a||null===a||""===a)return"";"string"==typeof a&&(a=[a]);var c=a[0];if(a.length>1)for(var d=0;d<a.length&&(c=a[d],!y(c,b));d++);var e,f=A(c,b),g=D(c,b),h=b.lng?T.toLanguages(b.lng,b.fallbackLng):L,i=b.ns||P.ns.defaultNs;c.indexOf(P.nsseparator)>-1&&(e=c.split(P.nsseparator),i=e[0],c=e[1]),void 0===g&&P.sendMissing&&"function"==typeof P.missingKeyHandler&&(b.lng?P.missingKeyHandler(h[0],i,c,f,h):P.missingKeyHandler(P.lng,i,c,f,h));var j=b.postProcess||P.postProcess;void 0!==g&&j&&X[j]&&(g=X[j](g,c,b));var k=f;if(f.indexOf(P.nsseparator)>-1&&(e=f.split(P.nsseparator),k=e[1]),k===c&&P.parseMissingKey&&(f=P.parseMissingKey(f)),void 0===g&&(f=t(f,b),f=u(f,b),j&&X[j])){var l=A(c,b);g=X[j](l,c,b)}return void 0!==g?g:f}function D(a,b){b=b||{};var c,d,e=A(a,b),f=L;if(!J)return e;if("cimode"===f[0].toLowerCase())return e;if(b.lngs&&(f=b.lngs),b.lng&&(f=T.toLanguages(b.lng,b.fallbackLng),!J[f[0]])){var g=P.getAsync;P.getAsync=!1,I.sync.load(f,P,function(a,b){T.extend(J,b),P.getAsync=g})}var h=b.ns||P.ns.defaultNs;if(a.indexOf(P.nsseparator)>-1){var i=a.split(P.nsseparator);h=i[0],a=i[1]}if(v(b)){c=T.extend({},b),delete c.context,c.defaultValue=P.contextNotFound;var j=h+P.nsseparator+a+"_"+b.context;if(d=z(j,c),d!=P.contextNotFound)return t(d,{context:b.context})}if(w(b,f[0])){c=T.extend({lngs:[f[0]]},b),delete c.count,delete c.lng,c.defaultValue=P.pluralNotFound;var k;if(W.needsPlural(f[0],b.count)){k=h+P.nsseparator+a+P.pluralSuffix;var l=W.get(f[0],b.count);l>=0?k=k+"_"+l:1===l&&(k=h+P.nsseparator+a)}else k=h+P.nsseparator+a;if(d=z(k,c),d!=P.pluralNotFound)return t(d,{count:b.count,interpolationPrefix:b.interpolationPrefix,interpolationSuffix:b.interpolationSuffix});if(!(f.length>1))return d;var m=f.slice();if(m.shift(),b=T.extend(b,{lngs:m}),delete b.lng,d=z(h+P.nsseparator+a,b),d!=P.pluralNotFound)return d}if(x(b)){var n=T.extend({},b);delete n.indefinite_article,n.defaultValue=P.indefiniteNotFound;var o=h+P.nsseparator+a+(b.count&&!w(b,f[0])||!b.count?P.indefiniteSuffix:"");if(d=z(o,n),d!=P.indefiniteNotFound)return d}for(var p,q=a.split(P.keyseparator),r=0,s=f.length;s>r&&void 0===p;r++){for(var y=f[r],B=0,E=J[y]&&J[y][h];q[B];)E=E&&E[q[B]],B++;if(void 0!==E){var F=Object.prototype.toString.apply(E);if("string"==typeof E)E=t(E,b),E=u(E,b);else if("[object Array]"!==F||P.returnObjectTrees||b.returnObjectTrees){if(null===E&&P.fallbackOnNull===!0)E=void 0;else if(null!==E)if(P.returnObjectTrees||b.returnObjectTrees){if("[object Number]"!==F&&"[object Function]"!==F&&"[object RegExp]"!==F){var G="[object Array]"===F?[]:{};T.each(E,function(c){G[c]=C(h+P.nsseparator+a+P.keyseparator+c,b)}),E=G}}else P.objectTreeKeyHandler&&"function"==typeof P.objectTreeKeyHandler?E=P.objectTreeKeyHandler(a,E,y,h,b):(E="key '"+h+":"+a+" ("+y+")' returned an object instead of string.",T.log(E))}else E=E.join("\n"),E=t(E,b),E=u(E,b);"string"==typeof E&&""===E.trim()&&P.fallbackOnEmpty===!0&&(E=void 0),p=E}}if(void 0===p&&!b.isFallbackLookup&&(P.fallbackToDefaultNS===!0||P.fallbackNS&&P.fallbackNS.length>0)){if(b.isFallbackLookup=!0,P.fallbackNS.length){for(var H=0,K=P.fallbackNS.length;K>H;H++)if(p=D(P.fallbackNS[H]+P.nsseparator+a,b),p||""===p&&P.fallbackOnEmpty===!1){var M=p.indexOf(P.nsseparator)>-1?p.split(P.nsseparator)[1]:p,N=e.indexOf(P.nsseparator)>-1?e.split(P.nsseparator)[1]:e;if(M!==N)break}}else p=D(a,b);b.isFallbackLookup=!1}return p}function E(){var a,b=P.lngWhitelist||[],c=[];if("undefined"!=typeof window&&!function(){for(var a=window.location.search.substring(1),b=a.split("&"),d=0;d<b.length;d++){var e=b[d].indexOf("=");if(e>0){var f=b[d].substring(0,e);f==P.detectLngQS&&c.push(b[d].substring(e+1))}}}(),P.useCookie&&"undefined"!=typeof document){var d=T.cookie.read(P.cookieName);d&&c.push(d)}if(P.detectLngFromLocalStorage&&"undefined"!=typeof window&&window.localStorage&&c.push(window.localStorage.getItem("i18next_lng")),"undefined"!=typeof navigator){if(navigator.languages)for(var e=0;e<navigator.languages.length;e++)c.push(navigator.languages[e]);navigator.userLanguage&&c.push(navigator.userLanguage),navigator.language&&c.push(navigator.language)}return function(){for(var d=0;d<c.length;d++){var e=c[d];if(e.indexOf("-")>-1){var f=e.split("-");e=P.lowerCaseLng?f[0].toLowerCase()+"-"+f[1].toLowerCase():f[0].toLowerCase()+"-"+f[1].toUpperCase()}if(0===b.length||b.indexOf(e)>-1){a=e;break}}}(),a||(a=P.fallbackLng[0]),a}Array.prototype.indexOf||(Array.prototype.indexOf=function(a){"use strict";if(null==this)throw new TypeError;var b=Object(this),c=b.length>>>0;if(0===c)return-1;var d=0;if(arguments.length>0&&(d=Number(arguments[1]),d!=d?d=0:0!=d&&1/0!=d&&d!=-1/0&&(d=(d>0||-1)*Math.floor(Math.abs(d)))),d>=c)return-1;for(var e=d>=0?d:Math.max(c-Math.abs(d),0);c>e;e++)if(e in b&&b[e]===a)return e;return-1}),Array.prototype.lastIndexOf||(Array.prototype.lastIndexOf=function(a){"use strict";if(null==this)throw new TypeError;var b=Object(this),c=b.length>>>0;if(0===c)return-1;var d=c;arguments.length>1&&(d=Number(arguments[1]),d!=d?d=0:0!=d&&d!=1/0&&d!=-(1/0)&&(d=(d>0||-1)*Math.floor(Math.abs(d))));for(var e=d>=0?Math.min(d,c-1):c-Math.abs(d);e>=0;e--)if(e in b&&b[e]===a)return e;return-1}),"function"!=typeof String.prototype.trim&&(String.prototype.trim=function(){return this.replace(/^\s+|\s+$/g,"")});var F,G=this,H=G.jQuery||G.Zepto,I={},J={},K=0,L=[],M=!1,N={};if("undefined"!=typeof module&&module.exports){if(!H)try{H=require("jquery")}catch(O){}H&&(H.i18n=H.i18n||I),module.exports=I}else H&&(H.i18n=H.i18n||I),G.i18n=G.i18n||I;N={load:function(a,b,c){b.useLocalStorage?N._loadLocal(a,b,function(d,e){for(var f=[],g=0,h=a.length;h>g;g++)e[a[g]]||f.push(a[g]);f.length>0?N._fetch(f,b,function(a,b){T.extend(e,b),N._storeLocal(b),c(null,e)}):c(null,e)}):N._fetch(a,b,function(a,b){c(null,b)})},_loadLocal:function(a,b,c){var d={},e=(new Date).getTime();if(window.localStorage){var f=a.length;T.each(a,function(a,g){var h=window.localStorage.getItem("res_"+g);h&&(h=JSON.parse(h),h.i18nStamp&&h.i18nStamp+b.localStorageExpirationTime>e&&(d[g]=h)),f--,0===f&&c(null,d)})}},_storeLocal:function(a){if(window.localStorage)for(var b in a)a[b].i18nStamp=(new Date).getTime(),T.localStorage.setItem("res_"+b,JSON.stringify(a[b]))},_fetch:function(a,b,c){var d=b.ns,e={};if(b.dynamicLoad){var f=function(a,b){c(null,b)};if("function"==typeof b.customLoad)b.customLoad(a,d.namespaces,b,f);else{var g=t(b.resGetPath,{lng:a.join("+"),ns:d.namespaces.join("+")});T.ajax({url:g,success:function(a){T.log("loaded: "+g),f(null,a)},error:function(a,b,c){T.log("failed loading: "+g),f("failed loading resource.json error: "+c)},dataType:"json",async:b.getAsync})}}else{var h,i=d.namespaces.length*a.length;T.each(d.namespaces,function(d,f){T.each(a,function(a,d){var g=function(a,b){a&&(h=h||[],h.push(a)),e[d]=e[d]||{},e[d][f]=b,i--,0===i&&c(h,e)};"function"==typeof b.customLoad?b.customLoad(d,f,b,g):N._fetchOne(d,f,b,g)})})}},_fetchOne:function(a,b,c,d){var e=t(c.resGetPath,{lng:a,ns:b});T.ajax({url:e,success:function(a){T.log("loaded: "+e),d(null,a)},error:function(a,b,c){if(b&&200==b||a&&a.status&&200==a.status)T.error("There is a typo in: "+e);else if(b&&404==b||a&&a.status&&404==a.status)T.log("Does not exist: "+e);else{var f=b?b:a&&a.status?a.status:null;T.log(f+" when loading "+e)}d(c,{})},dataType:"json",async:c.getAsync})},postMissing:function(a,b,c,d,e){var f={};f[c]=d;var g=[];if("fallback"===P.sendMissingTo&&P.fallbackLng[0]!==!1)for(var h=0;h<P.fallbackLng.length;h++)g.push({lng:P.fallbackLng[h],url:t(P.resPostPath,{lng:P.fallbackLng[h],ns:b})});else if("current"===P.sendMissingTo||"fallback"===P.sendMissingTo&&P.fallbackLng[0]===!1)g.push({lng:a,url:t(P.resPostPath,{lng:a,ns:b})});else if("all"===P.sendMissingTo)for(var h=0,i=e.length;i>h;h++)g.push({lng:e[h],url:t(P.resPostPath,{lng:e[h],ns:b})});for(var j=0,k=g.length;k>j;j++){var l=g[j];T.ajax({url:l.url,type:P.sendType,data:f,success:function(){T.log("posted missing key '"+c+"' to: "+l.url);for(var a=c.split("."),e=0,f=J[l.lng][b];a[e];)f=f[a[e]]=e===a.length-1?d:f[a[e]]||{},e++},error:function(){T.log("failed posting missing key '"+c+"' to: "+l.url)},dataType:"json",async:P.postAsync})}},reload:r};var P={lng:void 0,load:"all",preload:[],lowerCaseLng:!1,returnObjectTrees:!1,fallbackLng:["dev"],fallbackNS:[],detectLngQS:"setLng",detectLngFromLocalStorage:!1,ns:"translation",fallbackOnNull:!0,fallbackOnEmpty:!1,fallbackToDefaultNS:!1,nsseparator:":",keyseparator:".",selectorAttr:"data-i18n",debug:!1,resGetPath:"locales/__lng__/__ns__.json",resPostPath:"locales/add/__lng__/__ns__",getAsync:!0,postAsync:!0,resStore:void 0,useLocalStorage:!1,localStorageExpirationTime:6048e5,dynamicLoad:!1,sendMissing:!1,sendMissingTo:"fallback",sendType:"POST",interpolationPrefix:"__",interpolationSuffix:"__",defaultVariables:!1,reusePrefix:"$t(",reuseSuffix:")",pluralSuffix:"_plural",pluralNotFound:["plural_not_found",Math.random()].join(""),contextNotFound:["context_not_found",Math.random()].join(""),escapeInterpolation:!1,indefiniteSuffix:"_indefinite",indefiniteNotFound:["indefinite_not_found",Math.random()].join(""),setJqueryExt:!0,defaultValueFromContent:!0,useDataAttrOptions:!1,cookieExpirationTime:void 0,useCookie:!0,cookieName:"i18next",cookieDomain:void 0,objectTreeKeyHandler:void 0,postProcess:void 0,parseMissingKey:void 0,missingKeyHandler:N.postMissing,shortcutFunction:"sprintf"},Q={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;","/":"&#x2F;"},R={create:function(a,b,c,d){var e;if(c){var f=new Date;f.setTime(f.getTime()+6e4*c),e="; expires="+f.toGMTString()}else e="";d=d?"domain="+d+";":"",document.cookie=a+"="+b+e+";"+d+"path=/"},read:function(a){for(var b=a+"=",c=document.cookie.split(";"),d=0;d<c.length;d++){for(var e=c[d];" "==e.charAt(0);)e=e.substring(1,e.length);if(0===e.indexOf(b))return e.substring(b.length,e.length)}return null},remove:function(a){this.create(a,"",-1)}},S={create:function(){},read:function(){return null},remove:function(){}},T={extend:H?H.extend:a,deepExtend:b,each:H?H.each:c,ajax:H?H.ajax:"undefined"!=typeof document?e:function(){},cookie:"undefined"!=typeof document?R:S,detectLanguage:E,escape:d,log:function(a){P.debug&&"undefined"!=typeof console&&console.log(a)},error:function(a){"undefined"!=typeof console&&console.error(a)},getCountyIndexOfLng:function(a){var b=0;return("nb-NO"===a||"nn-NO"===a||"nb-no"===a||"nn-no"===a)&&(b=1),b},toLanguages:function(a){function b(a){var b=a;if("string"==typeof a&&a.indexOf("-")>-1){var c=a.split("-");b=P.lowerCaseLng?c[0].toLowerCase()+"-"+c[1].toLowerCase():c[0].toLowerCase()+"-"+c[1].toUpperCase()}else b=P.lowerCaseLng?a.toLowerCase():a;return b}var c=this.log,d=[],e=P.lngWhitelist||!1,f=function(a){!e||e.indexOf(a)>-1?d.push(a):c("rejecting non-whitelisted language: "+a)};if("string"==typeof a&&a.indexOf("-")>-1){var g=a.split("-");"unspecific"!==P.load&&f(b(a)),"current"!==P.load&&f(b(g[this.getCountyIndexOfLng(a)]))}else f(b(a));for(var h=0;h<P.fallbackLng.length;h++)-1===d.indexOf(P.fallbackLng[h])&&P.fallbackLng[h]&&d.push(b(P.fallbackLng[h]));return d},regexEscape:function(a){return a.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&")},regexReplacementEscape:function(a){return"string"==typeof a?a.replace(/\$/g,"$$$$"):a},localStorage:{setItem:function(a,b){if(window.localStorage)try{window.localStorage.setItem(a,b)}catch(c){T.log('failed to set value for key "'+a+'" to localStorage.')}}}};T.applyReplacement=t;var U=[["ach","Acholi",[1,2],1],["af","Afrikaans",[1,2],2],["ak","Akan",[1,2],1],["am","Amharic",[1,2],1],["an","Aragonese",[1,2],2],["ar","Arabic",[0,1,2,3,11,100],5],["arn","Mapudungun",[1,2],1],["ast","Asturian",[1,2],2],["ay","Aymará",[1],3],["az","Azerbaijani",[1,2],2],["be","Belarusian",[1,2,5],4],["bg","Bulgarian",[1,2],2],["bn","Bengali",[1,2],2],["bo","Tibetan",[1],3],["br","Breton",[1,2],1],["bs","Bosnian",[1,2,5],4],["ca","Catalan",[1,2],2],["cgg","Chiga",[1],3],["cs","Czech",[1,2,5],6],["csb","Kashubian",[1,2,5],7],["cy","Welsh",[1,2,3,8],8],["da","Danish",[1,2],2],["de","German",[1,2],2],["dev","Development Fallback",[1,2],2],["dz","Dzongkha",[1],3],["el","Greek",[1,2],2],["en","English",[1,2],2],["eo","Esperanto",[1,2],2],["es","Spanish",[1,2],2],["es_ar","Argentinean Spanish",[1,2],2],["et","Estonian",[1,2],2],["eu","Basque",[1,2],2],["fa","Persian",[1],3],["fi","Finnish",[1,2],2],["fil","Filipino",[1,2],1],["fo","Faroese",[1,2],2],["fr","French",[1,2],9],["fur","Friulian",[1,2],2],["fy","Frisian",[1,2],2],["ga","Irish",[1,2,3,7,11],10],["gd","Scottish Gaelic",[1,2,3,20],11],["gl","Galician",[1,2],2],["gu","Gujarati",[1,2],2],["gun","Gun",[1,2],1],["ha","Hausa",[1,2],2],["he","Hebrew",[1,2],2],["hi","Hindi",[1,2],2],["hr","Croatian",[1,2,5],4],["hu","Hungarian",[1,2],2],["hy","Armenian",[1,2],2],["ia","Interlingua",[1,2],2],["id","Indonesian",[1],3],["is","Icelandic",[1,2],12],["it","Italian",[1,2],2],["ja","Japanese",[1],3],["jbo","Lojban",[1],3],["jv","Javanese",[0,1],13],["ka","Georgian",[1],3],["kk","Kazakh",[1],3],["km","Khmer",[1],3],["kn","Kannada",[1,2],2],["ko","Korean",[1],3],["ku","Kurdish",[1,2],2],["kw","Cornish",[1,2,3,4],14],["ky","Kyrgyz",[1],3],["lb","Letzeburgesch",[1,2],2],["ln","Lingala",[1,2],1],["lo","Lao",[1],3],["lt","Lithuanian",[1,2,10],15],["lv","Latvian",[1,2,0],16],["mai","Maithili",[1,2],2],["mfe","Mauritian Creole",[1,2],1],["mg","Malagasy",[1,2],1],["mi","Maori",[1,2],1],["mk","Macedonian",[1,2],17],["ml","Malayalam",[1,2],2],["mn","Mongolian",[1,2],2],["mnk","Mandinka",[0,1,2],18],["mr","Marathi",[1,2],2],["ms","Malay",[1],3],["mt","Maltese",[1,2,11,20],19],["nah","Nahuatl",[1,2],2],["nap","Neapolitan",[1,2],2],["nb","Norwegian Bokmal",[1,2],2],["ne","Nepali",[1,2],2],["nl","Dutch",[1,2],2],["nn","Norwegian Nynorsk",[1,2],2],["no","Norwegian",[1,2],2],["nso","Northern Sotho",[1,2],2],["oc","Occitan",[1,2],1],["or","Oriya",[2,1],2],["pa","Punjabi",[1,2],2],["pap","Papiamento",[1,2],2],["pl","Polish",[1,2,5],7],["pms","Piemontese",[1,2],2],["ps","Pashto",[1,2],2],["pt","Portuguese",[1,2],2],["pt_br","Brazilian Portuguese",[1,2],2],["rm","Romansh",[1,2],2],["ro","Romanian",[1,2,20],20],["ru","Russian",[1,2,5],4],["sah","Yakut",[1],3],["sco","Scots",[1,2],2],["se","Northern Sami",[1,2],2],["si","Sinhala",[1,2],2],["sk","Slovak",[1,2,5],6],["sl","Slovenian",[5,1,2,3],21],["so","Somali",[1,2],2],["son","Songhay",[1,2],2],["sq","Albanian",[1,2],2],["sr","Serbian",[1,2,5],4],["su","Sundanese",[1],3],["sv","Swedish",[1,2],2],["sw","Swahili",[1,2],2],["ta","Tamil",[1,2],2],["te","Telugu",[1,2],2],["tg","Tajik",[1,2],1],["th","Thai",[1],3],["ti","Tigrinya",[1,2],1],["tk","Turkmen",[1,2],2],["tr","Turkish",[1,2],1],["tt","Tatar",[1],3],["ug","Uyghur",[1],3],["uk","Ukrainian",[1,2,5],4],["ur","Urdu",[1,2],2],["uz","Uzbek",[1,2],1],["vi","Vietnamese",[1],3],["wa","Walloon",[1,2],1],["wo","Wolof",[1],3],["yo","Yoruba",[1,2],2],["zh","Chinese",[1],3]],V={1:function(a){return Number(a>1)},2:function(a){return Number(1!=a)},3:function(){return 0},4:function(a){return Number(1==a%10&&11!=a%100?0:a%10>=2&&4>=a%10&&(10>a%100||a%100>=20)?1:2)},5:function(a){return Number(0===a?0:1==a?1:2==a?2:a%100>=3&&10>=a%100?3:a%100>=11?4:5)},6:function(a){return Number(1==a?0:a>=2&&4>=a?1:2)},7:function(a){return Number(1==a?0:a%10>=2&&4>=a%10&&(10>a%100||a%100>=20)?1:2)},8:function(a){return Number(1==a?0:2==a?1:8!=a&&11!=a?2:3)},9:function(a){return Number(a>=2)},10:function(a){return Number(1==a?0:2==a?1:7>a?2:11>a?3:4)},11:function(a){return Number(1==a||11==a?0:2==a||12==a?1:a>2&&20>a?2:3)},12:function(a){return Number(1!=a%10||11==a%100)},13:function(a){return Number(0!==a)},14:function(a){return Number(1==a?0:2==a?1:3==a?2:3)},15:function(a){return Number(1==a%10&&11!=a%100?0:a%10>=2&&(10>a%100||a%100>=20)?1:2)},16:function(a){return Number(1==a%10&&11!=a%100?0:0!==a?1:2)},17:function(a){return Number(1==a||1==a%10?0:1)},18:function(a){return Number(1==a?1:2)},19:function(a){return Number(1==a?0:0===a||a%100>1&&11>a%100?1:a%100>10&&20>a%100?2:3)},20:function(a){return Number(1==a?0:0===a||a%100>0&&20>a%100?1:2)},21:function(a){return Number(1==a%100?1:2==a%100?2:3==a%100||4==a%100?3:0)}},W={rules:function(){var a,b={};for(a=U.length;a--;)b[U[a][0]]={name:U[a][1],numbers:U[a][2],plurals:V[U[a][3]]};return b}(),addRule:function(a,b){W.rules[a]=b},setCurrentLng:function(a){if(!W.currentRule||W.currentRule.lng!==a){var b=a.split("-");W.currentRule={lng:a,rule:W.rules[b[0]]}}},needsPlural:function(a,b){var c,d=a.split("-");return c=W.currentRule&&W.currentRule.lng===a?W.currentRule.rule:W.rules[d[T.getCountyIndexOfLng(a)]],c&&c.numbers.length<=1?!1:1!==this.get(a,b)},get:function(a,b){function c(b,c){var d;if(d=W.currentRule&&W.currentRule.lng===a?W.currentRule.rule:W.rules[b]){var e;e=d.plurals(d.noAbs?c:Math.abs(c));var f=d.numbers[e];return 2===d.numbers.length&&1===d.numbers[0]&&(2===f?f=-1:1===f&&(f=1)),f}return 1===c?"1":"-1"}var d=a.split("-");return c(d[T.getCountyIndexOfLng(a)],b)}},X={},Y=function(a,b){X[a]=b},Z=function(){function a(a){return Object.prototype.toString.call(a).slice(8,-1).toLowerCase()}function b(a,b){for(var c=[];b>0;c[--b]=a);return c.join("")}var c=function(){return c.cache.hasOwnProperty(arguments[0])||(c.cache[arguments[0]]=c.parse(arguments[0])),c.format.call(null,c.cache[arguments[0]],arguments)};return c.format=function(c,d){var e,f,g,h,i,j,k,l=1,m=c.length,n="",o=[];for(f=0;m>f;f++)if(n=a(c[f]),"string"===n)o.push(c[f]);else if("array"===n){if(h=c[f],h[2])for(e=d[l],g=0;g<h[2].length;g++){if(!e.hasOwnProperty(h[2][g]))throw Z('[sprintf] property "%s" does not exist',h[2][g]);e=e[h[2][g]]}else e=h[1]?d[h[1]]:d[l++];if(/[^s]/.test(h[8])&&"number"!=a(e))throw Z("[sprintf] expecting number but found %s",a(e));switch(h[8]){case"b":e=e.toString(2);break;case"c":e=String.fromCharCode(e);break;case"d":e=parseInt(e,10);break;case"e":e=h[7]?e.toExponential(h[7]):e.toExponential();break;case"f":e=h[7]?parseFloat(e).toFixed(h[7]):parseFloat(e);break;case"o":e=e.toString(8);break;case"s":e=(e=String(e))&&h[7]?e.substring(0,h[7]):e;break;case"u":e=Math.abs(e);break;case"x":e=e.toString(16);break;case"X":e=e.toString(16).toUpperCase()}e=/[def]/.test(h[8])&&h[3]&&e>=0?"+"+e:e,j=h[4]?"0"==h[4]?"0":h[4].charAt(1):" ",k=h[6]-String(e).length,i=h[6]?b(j,k):"",o.push(h[5]?e+i:i+e)}return o.join("")},c.cache={},c.parse=function(a){for(var b=a,c=[],d=[],e=0;b;){if(null!==(c=/^[^\x25]+/.exec(b)))d.push(c[0]);else if(null!==(c=/^\x25{2}/.exec(b)))d.push("%");else{if(null===(c=/^\x25(?:([1-9]\d*)\$|\(([^\)]+)\))?(\+)?(0|'[^$])?(-)?(\d+)?(?:\.(\d+))?([b-fosuxX])/.exec(b)))throw"[sprintf] huh?";if(c[2]){e|=1;var f=[],g=c[2],h=[];if(null===(h=/^([a-z_][a-z_\d]*)/i.exec(g)))throw"[sprintf] huh?";for(f.push(h[1]);""!==(g=g.substring(h[0].length));)if(null!==(h=/^\.([a-z_][a-z_\d]*)/i.exec(g)))f.push(h[1]);else{if(null===(h=/^\[(\d+)\]/.exec(g)))throw"[sprintf] huh?";f.push(h[1])}c[2]=f}else e|=2;if(3===e)throw"[sprintf] mixing positional and named placeholders is not (yet) supported";d.push(c)}b=b.substring(c[0].length)}return d},c}(),$=function(a,b){return b.unshift(a),Z.apply(null,b)};Y("sprintf",function(a,b,c){return c.sprintf?"[object Array]"===Object.prototype.toString.apply(c.sprintf)?$(a,c.sprintf):"object"==typeof c.sprintf?Z(a,c.sprintf):a:a}),I.init=f,I.setLng=p,I.preload=g,I.addResourceBundle=h,I.hasResourceBundle=i,I.addResource=k,I.addResources=l,I.removeResourceBundle=j,I.loadNamespace=n,I.loadNamespaces=o,I.setDefaultNamespace=m,I.t=z,I.translate=z,I.exists=y,I.detectLanguage=T.detectLanguage,I.pluralExtensions=W,I.sync=N,I.functions=T,I.lng=q,I.addPostProcessor=Y,I.options=P}(),/*!
+ * Source: lib/magnific-popup/dist/jquery.magnific-popup.min.js, license: MIT, url: http://dimsemenov.com/plugins/magnific-popup/
+ */
+/*! Magnific Popup - v1.0.0 - 2015-01-03
+* http://dimsemenov.com/plugins/magnific-popup/
+* Copyright (c) 2015 Dmitry Semenov; */
+!function(a){"function"==typeof define&&define.amd?define(["jquery"],a):a("object"==typeof exports?require("jquery"):window.jQuery||window.Zepto)}(function(a){var b,c,d,e,f,g,h="Close",i="BeforeClose",j="AfterClose",k="BeforeAppend",l="MarkupParse",m="Open",n="Change",o="mfp",p="."+o,q="mfp-ready",r="mfp-removing",s="mfp-prevent-close",t=function(){},u=!!window.jQuery,v=a(window),w=function(a,c){b.ev.on(o+a+p,c)},x=function(b,c,d,e){var f=document.createElement("div");return f.className="mfp-"+b,d&&(f.innerHTML=d),e?c&&c.appendChild(f):(f=a(f),c&&f.appendTo(c)),f},y=function(c,d){b.ev.triggerHandler(o+c,d),b.st.callbacks&&(c=c.charAt(0).toLowerCase()+c.slice(1),b.st.callbacks[c]&&b.st.callbacks[c].apply(b,a.isArray(d)?d:[d]))},z=function(c){return c===g&&b.currTemplate.closeBtn||(b.currTemplate.closeBtn=a(b.st.closeMarkup.replace("%title%",b.st.tClose)),g=c),b.currTemplate.closeBtn},A=function(){a.magnificPopup.instance||(b=new t,b.init(),a.magnificPopup.instance=b)},B=function(){var a=document.createElement("p").style,b=["ms","O","Moz","Webkit"];if(void 0!==a.transition)return!0;for(;b.length;)if(b.pop()+"Transition"in a)return!0;return!1};t.prototype={constructor:t,init:function(){var c=navigator.appVersion;b.isIE7=-1!==c.indexOf("MSIE 7."),b.isIE8=-1!==c.indexOf("MSIE 8."),b.isLowIE=b.isIE7||b.isIE8,b.isAndroid=/android/gi.test(c),b.isIOS=/iphone|ipad|ipod/gi.test(c),b.supportsTransition=B(),b.probablyMobile=b.isAndroid||b.isIOS||/(Opera Mini)|Kindle|webOS|BlackBerry|(Opera Mobi)|(Windows Phone)|IEMobile/i.test(navigator.userAgent),d=a(document),b.popupsCache={}},open:function(c){var e;if(c.isObj===!1){b.items=c.items.toArray(),b.index=0;var g,h=c.items;for(e=0;e<h.length;e++)if(g=h[e],g.parsed&&(g=g.el[0]),g===c.el[0]){b.index=e;break}}else b.items=a.isArray(c.items)?c.items:[c.items],b.index=c.index||0;if(b.isOpen)return void b.updateItemHTML();b.types=[],f="",b.ev=c.mainEl&&c.mainEl.length?c.mainEl.eq(0):d,c.key?(b.popupsCache[c.key]||(b.popupsCache[c.key]={}),b.currTemplate=b.popupsCache[c.key]):b.currTemplate={},b.st=a.extend(!0,{},a.magnificPopup.defaults,c),b.fixedContentPos="auto"===b.st.fixedContentPos?!b.probablyMobile:b.st.fixedContentPos,b.st.modal&&(b.st.closeOnContentClick=!1,b.st.closeOnBgClick=!1,b.st.showCloseBtn=!1,b.st.enableEscapeKey=!1),b.bgOverlay||(b.bgOverlay=x("bg").on("click"+p,function(){b.close()}),b.wrap=x("wrap").attr("tabindex",-1).on("click"+p,function(a){b._checkIfClose(a.target)&&b.close()}),b.container=x("container",b.wrap)),b.contentContainer=x("content"),b.st.preloader&&(b.preloader=x("preloader",b.container,b.st.tLoading));var i=a.magnificPopup.modules;for(e=0;e<i.length;e++){var j=i[e];j=j.charAt(0).toUpperCase()+j.slice(1),b["init"+j].call(b)}y("BeforeOpen"),b.st.showCloseBtn&&(b.st.closeBtnInside?(w(l,function(a,b,c,d){c.close_replaceWith=z(d.type)}),f+=" mfp-close-btn-in"):b.wrap.append(z())),b.st.alignTop&&(f+=" mfp-align-top"),b.wrap.css(b.fixedContentPos?{overflow:b.st.overflowY,overflowX:"hidden",overflowY:b.st.overflowY}:{top:v.scrollTop(),position:"absolute"}),(b.st.fixedBgPos===!1||"auto"===b.st.fixedBgPos&&!b.fixedContentPos)&&b.bgOverlay.css({height:d.height(),position:"absolute"}),b.st.enableEscapeKey&&d.on("keyup"+p,function(a){27===a.keyCode&&b.close()}),v.on("resize"+p,function(){b.updateSize()}),b.st.closeOnContentClick||(f+=" mfp-auto-cursor"),f&&b.wrap.addClass(f);var k=b.wH=v.height(),n={};if(b.fixedContentPos&&b._hasScrollBar(k)){var o=b._getScrollbarSize();o&&(n.marginRight=o)}b.fixedContentPos&&(b.isIE7?a("body, html").css("overflow","hidden"):n.overflow="hidden");var r=b.st.mainClass;return b.isIE7&&(r+=" mfp-ie7"),r&&b._addClassToMFP(r),b.updateItemHTML(),y("BuildControls"),a("html").css(n),b.bgOverlay.add(b.wrap).prependTo(b.st.prependTo||a(document.body)),b._lastFocusedEl=document.activeElement,setTimeout(function(){b.content?(b._addClassToMFP(q),b._setFocus()):b.bgOverlay.addClass(q),d.on("focusin"+p,b._onFocusIn)},16),b.isOpen=!0,b.updateSize(k),y(m),c},close:function(){b.isOpen&&(y(i),b.isOpen=!1,b.st.removalDelay&&!b.isLowIE&&b.supportsTransition?(b._addClassToMFP(r),setTimeout(function(){b._close()},b.st.removalDelay)):b._close())},_close:function(){y(h);var c=r+" "+q+" ";if(b.bgOverlay.detach(),b.wrap.detach(),b.container.empty(),b.st.mainClass&&(c+=b.st.mainClass+" "),b._removeClassFromMFP(c),b.fixedContentPos){var e={marginRight:""};b.isIE7?a("body, html").css("overflow",""):e.overflow="",a("html").css(e)}d.off("keyup"+p+" focusin"+p),b.ev.off(p),b.wrap.attr("class","mfp-wrap").removeAttr("style"),b.bgOverlay.attr("class","mfp-bg"),b.container.attr("class","mfp-container"),!b.st.showCloseBtn||b.st.closeBtnInside&&b.currTemplate[b.currItem.type]!==!0||b.currTemplate.closeBtn&&b.currTemplate.closeBtn.detach(),b._lastFocusedEl&&a(b._lastFocusedEl).focus(),b.currItem=null,b.content=null,b.currTemplate=null,b.prevHeight=0,y(j)},updateSize:function(a){if(b.isIOS){var c=document.documentElement.clientWidth/window.innerWidth,d=window.innerHeight*c;b.wrap.css("height",d),b.wH=d}else b.wH=a||v.height();b.fixedContentPos||b.wrap.css("height",b.wH),y("Resize")},updateItemHTML:function(){var c=b.items[b.index];b.contentContainer.detach(),b.content&&b.content.detach(),c.parsed||(c=b.parseEl(b.index));var d=c.type;if(y("BeforeChange",[b.currItem?b.currItem.type:"",d]),b.currItem=c,!b.currTemplate[d]){var f=b.st[d]?b.st[d].markup:!1;y("FirstMarkupParse",f),b.currTemplate[d]=f?a(f):!0}e&&e!==c.type&&b.container.removeClass("mfp-"+e+"-holder");var g=b["get"+d.charAt(0).toUpperCase()+d.slice(1)](c,b.currTemplate[d]);b.appendContent(g,d),c.preloaded=!0,y(n,c),e=c.type,b.container.prepend(b.contentContainer),y("AfterChange")},appendContent:function(a,c){b.content=a,a?b.st.showCloseBtn&&b.st.closeBtnInside&&b.currTemplate[c]===!0?b.content.find(".mfp-close").length||b.content.append(z()):b.content=a:b.content="",y(k),b.container.addClass("mfp-"+c+"-holder"),b.contentContainer.append(b.content)},parseEl:function(c){var d,e=b.items[c];if(e.tagName?e={el:a(e)}:(d=e.type,e={data:e,src:e.src}),e.el){for(var f=b.types,g=0;g<f.length;g++)if(e.el.hasClass("mfp-"+f[g])){d=f[g];break}e.src=e.el.attr("data-mfp-src"),e.src||(e.src=e.el.attr("href"))}return e.type=d||b.st.type||"inline",e.index=c,e.parsed=!0,b.items[c]=e,y("ElementParse",e),b.items[c]},addGroup:function(a,c){var d=function(d){d.mfpEl=this,b._openClick(d,a,c)};c||(c={});var e="click.magnificPopup";c.mainEl=a,c.items?(c.isObj=!0,a.off(e).on(e,d)):(c.isObj=!1,c.delegate?a.off(e).on(e,c.delegate,d):(c.items=a,a.off(e).on(e,d)))},_openClick:function(c,d,e){var f=void 0!==e.midClick?e.midClick:a.magnificPopup.defaults.midClick;if(f||2!==c.which&&!c.ctrlKey&&!c.metaKey){var g=void 0!==e.disableOn?e.disableOn:a.magnificPopup.defaults.disableOn;if(g)if(a.isFunction(g)){if(!g.call(b))return!0}else if(v.width()<g)return!0;c.type&&(c.preventDefault(),b.isOpen&&c.stopPropagation()),e.el=a(c.mfpEl),e.delegate&&(e.items=d.find(e.delegate)),b.open(e)}},updateStatus:function(a,d){if(b.preloader){c!==a&&b.container.removeClass("mfp-s-"+c),d||"loading"!==a||(d=b.st.tLoading);var e={status:a,text:d};y("UpdateStatus",e),a=e.status,d=e.text,b.preloader.html(d),b.preloader.find("a").on("click",function(a){a.stopImmediatePropagation()}),b.container.addClass("mfp-s-"+a),c=a}},_checkIfClose:function(c){if(!a(c).hasClass(s)){var d=b.st.closeOnContentClick,e=b.st.closeOnBgClick;if(d&&e)return!0;if(!b.content||a(c).hasClass("mfp-close")||b.preloader&&c===b.preloader[0])return!0;if(c===b.content[0]||a.contains(b.content[0],c)){if(d)return!0}else if(e&&a.contains(document,c))return!0;return!1}},_addClassToMFP:function(a){b.bgOverlay.addClass(a),b.wrap.addClass(a)},_removeClassFromMFP:function(a){this.bgOverlay.removeClass(a),b.wrap.removeClass(a)},_hasScrollBar:function(a){return(b.isIE7?d.height():document.body.scrollHeight)>(a||v.height())},_setFocus:function(){(b.st.focus?b.content.find(b.st.focus).eq(0):b.wrap).focus()},_onFocusIn:function(c){return c.target===b.wrap[0]||a.contains(b.wrap[0],c.target)?void 0:(b._setFocus(),!1)},_parseMarkup:function(b,c,d){var e;d.data&&(c=a.extend(d.data,c)),y(l,[b,c,d]),a.each(c,function(a,c){if(void 0===c||c===!1)return!0;if(e=a.split("_"),e.length>1){var d=b.find(p+"-"+e[0]);if(d.length>0){var f=e[1];"replaceWith"===f?d[0]!==c[0]&&d.replaceWith(c):"img"===f?d.is("img")?d.attr("src",c):d.replaceWith('<img src="'+c+'" class="'+d.attr("class")+'" />'):d.attr(e[1],c)}}else b.find(p+"-"+a).html(c)})},_getScrollbarSize:function(){if(void 0===b.scrollbarSize){var a=document.createElement("div");a.style.cssText="width: 99px; height: 99px; overflow: scroll; position: absolute; top: -9999px;",document.body.appendChild(a),b.scrollbarSize=a.offsetWidth-a.clientWidth,document.body.removeChild(a)}return b.scrollbarSize}},a.magnificPopup={instance:null,proto:t.prototype,modules:[],open:function(b,c){return A(),b=b?a.extend(!0,{},b):{},b.isObj=!0,b.index=c||0,this.instance.open(b)},close:function(){return a.magnificPopup.instance&&a.magnificPopup.instance.close()},registerModule:function(b,c){c.options&&(a.magnificPopup.defaults[b]=c.options),a.extend(this.proto,c.proto),this.modules.push(b)},defaults:{disableOn:0,key:null,midClick:!1,mainClass:"",preloader:!0,focus:"",closeOnContentClick:!1,closeOnBgClick:!0,closeBtnInside:!0,showCloseBtn:!0,enableEscapeKey:!0,modal:!1,alignTop:!1,removalDelay:0,prependTo:null,fixedContentPos:"auto",fixedBgPos:"auto",overflowY:"auto",closeMarkup:'<button title="%title%" type="button" class="mfp-close">&times;</button>',tClose:"Close (Esc)",tLoading:"Loading..."}},a.fn.magnificPopup=function(c){A();var d=a(this);if("string"==typeof c)if("open"===c){var e,f=u?d.data("magnificPopup"):d[0].magnificPopup,g=parseInt(arguments[1],10)||0;f.items?e=f.items[g]:(e=d,f.delegate&&(e=e.find(f.delegate)),e=e.eq(g)),b._openClick({mfpEl:e},d,f)}else b.isOpen&&b[c].apply(b,Array.prototype.slice.call(arguments,1));else c=a.extend(!0,{},c),u?d.data("magnificPopup",c):d[0].magnificPopup=c,b.addGroup(d,c);return d};var C,D,E,F="inline",G=function(){E&&(D.after(E.addClass(C)).detach(),E=null)};a.magnificPopup.registerModule(F,{options:{hiddenClass:"hide",markup:"",tNotFound:"Content not found"},proto:{initInline:function(){b.types.push(F),w(h+"."+F,function(){G()})},getInline:function(c,d){if(G(),c.src){var e=b.st.inline,f=a(c.src);if(f.length){var g=f[0].parentNode;g&&g.tagName&&(D||(C=e.hiddenClass,D=x(C),C="mfp-"+C),E=f.after(D).detach().removeClass(C)),b.updateStatus("ready")}else b.updateStatus("error",e.tNotFound),f=a("<div>");return c.inlineElement=f,f}return b.updateStatus("ready"),b._parseMarkup(d,{},c),d}}});var H,I="ajax",J=function(){H&&a(document.body).removeClass(H)},K=function(){J(),b.req&&b.req.abort()};a.magnificPopup.registerModule(I,{options:{settings:null,cursor:"mfp-ajax-cur",tError:'<a href="%url%">The content</a> could not be loaded.'},proto:{initAjax:function(){b.types.push(I),H=b.st.ajax.cursor,w(h+"."+I,K),w("BeforeChange."+I,K)},getAjax:function(c){H&&a(document.body).addClass(H),b.updateStatus("loading");var d=a.extend({url:c.src,success:function(d,e,f){var g={data:d,xhr:f};y("ParseAjax",g),b.appendContent(a(g.data),I),c.finished=!0,J(),b._setFocus(),setTimeout(function(){b.wrap.addClass(q)},16),b.updateStatus("ready"),y("AjaxContentAdded")},error:function(){J(),c.finished=c.loadError=!0,b.updateStatus("error",b.st.ajax.tError.replace("%url%",c.src))}},b.st.ajax.settings);return b.req=a.ajax(d),""}}});var L,M=function(c){if(c.data&&void 0!==c.data.title)return c.data.title;var d=b.st.image.titleSrc;if(d){if(a.isFunction(d))return d.call(b,c);if(c.el)return c.el.attr(d)||""}return""};a.magnificPopup.registerModule("image",{options:{markup:'<div class="mfp-figure"><div class="mfp-close"></div><figure><div class="mfp-img"></div><figcaption><div class="mfp-bottom-bar"><div class="mfp-title"></div><div class="mfp-counter"></div></div></figcaption></figure></div>',cursor:"mfp-zoom-out-cur",titleSrc:"title",verticalFit:!0,tError:'<a href="%url%">The image</a> could not be loaded.'},proto:{initImage:function(){var c=b.st.image,d=".image";b.types.push("image"),w(m+d,function(){"image"===b.currItem.type&&c.cursor&&a(document.body).addClass(c.cursor)}),w(h+d,function(){c.cursor&&a(document.body).removeClass(c.cursor),v.off("resize"+p)}),w("Resize"+d,b.resizeImage),b.isLowIE&&w("AfterChange",b.resizeImage)},resizeImage:function(){var a=b.currItem;if(a&&a.img&&b.st.image.verticalFit){var c=0;b.isLowIE&&(c=parseInt(a.img.css("padding-top"),10)+parseInt(a.img.css("padding-bottom"),10)),a.img.css("max-height",b.wH-c)}},_onImageHasSize:function(a){a.img&&(a.hasSize=!0,L&&clearInterval(L),a.isCheckingImgSize=!1,y("ImageHasSize",a),a.imgHidden&&(b.content&&b.content.removeClass("mfp-loading"),a.imgHidden=!1))},findImageSize:function(a){var c=0,d=a.img[0],e=function(f){L&&clearInterval(L),L=setInterval(function(){return d.naturalWidth>0?void b._onImageHasSize(a):(c>200&&clearInterval(L),c++,void(3===c?e(10):40===c?e(50):100===c&&e(500)))},f)};e(1)},getImage:function(c,d){var e=0,f=function(){c&&(c.img[0].complete?(c.img.off(".mfploader"),c===b.currItem&&(b._onImageHasSize(c),b.updateStatus("ready")),c.hasSize=!0,c.loaded=!0,y("ImageLoadComplete")):(e++,200>e?setTimeout(f,100):g()))},g=function(){c&&(c.img.off(".mfploader"),c===b.currItem&&(b._onImageHasSize(c),b.updateStatus("error",h.tError.replace("%url%",c.src))),c.hasSize=!0,c.loaded=!0,c.loadError=!0)},h=b.st.image,i=d.find(".mfp-img");if(i.length){var j=document.createElement("img");j.className="mfp-img",c.el&&c.el.find("img").length&&(j.alt=c.el.find("img").attr("alt")),c.img=a(j).on("load.mfploader",f).on("error.mfploader",g),j.src=c.src,i.is("img")&&(c.img=c.img.clone()),j=c.img[0],j.naturalWidth>0?c.hasSize=!0:j.width||(c.hasSize=!1)}return b._parseMarkup(d,{title:M(c),img_replaceWith:c.img},c),b.resizeImage(),c.hasSize?(L&&clearInterval(L),c.loadError?(d.addClass("mfp-loading"),b.updateStatus("error",h.tError.replace("%url%",c.src))):(d.removeClass("mfp-loading"),b.updateStatus("ready")),d):(b.updateStatus("loading"),c.loading=!0,c.hasSize||(c.imgHidden=!0,d.addClass("mfp-loading"),b.findImageSize(c)),d)}}});var N,O=function(){return void 0===N&&(N=void 0!==document.createElement("p").style.MozTransform),N};a.magnificPopup.registerModule("zoom",{options:{enabled:!1,easing:"ease-in-out",duration:300,opener:function(a){return a.is("img")?a:a.find("img")}},proto:{initZoom:function(){var a,c=b.st.zoom,d=".zoom";if(c.enabled&&b.supportsTransition){var e,f,g=c.duration,j=function(a){var b=a.clone().removeAttr("style").removeAttr("class").addClass("mfp-animated-image"),d="all "+c.duration/1e3+"s "+c.easing,e={position:"fixed",zIndex:9999,left:0,top:0,"-webkit-backface-visibility":"hidden"},f="transition";return e["-webkit-"+f]=e["-moz-"+f]=e["-o-"+f]=e[f]=d,b.css(e),b},k=function(){b.content.css("visibility","visible")};w("BuildControls"+d,function(){if(b._allowZoom()){if(clearTimeout(e),b.content.css("visibility","hidden"),a=b._getItemToZoom(),!a)return void k();f=j(a),f.css(b._getOffset()),b.wrap.append(f),e=setTimeout(function(){f.css(b._getOffset(!0)),e=setTimeout(function(){k(),setTimeout(function(){f.remove(),a=f=null,y("ZoomAnimationEnded")},16)},g)},16)}}),w(i+d,function(){if(b._allowZoom()){if(clearTimeout(e),b.st.removalDelay=g,!a){if(a=b._getItemToZoom(),!a)return;f=j(a)}f.css(b._getOffset(!0)),b.wrap.append(f),b.content.css("visibility","hidden"),setTimeout(function(){f.css(b._getOffset())},16)}}),w(h+d,function(){b._allowZoom()&&(k(),f&&f.remove(),a=null)})}},_allowZoom:function(){return"image"===b.currItem.type},_getItemToZoom:function(){return b.currItem.hasSize?b.currItem.img:!1},_getOffset:function(c){var d;d=c?b.currItem.img:b.st.zoom.opener(b.currItem.el||b.currItem);var e=d.offset(),f=parseInt(d.css("padding-top"),10),g=parseInt(d.css("padding-bottom"),10);e.top-=a(window).scrollTop()-f;var h={width:d.width(),height:(u?d.innerHeight():d[0].offsetHeight)-g-f};return O()?h["-moz-transform"]=h.transform="translate("+e.left+"px,"+e.top+"px)":(h.left=e.left,h.top=e.top),h}}});var P="iframe",Q="//about:blank",R=function(a){if(b.currTemplate[P]){var c=b.currTemplate[P].find("iframe");c.length&&(a||(c[0].src=Q),b.isIE8&&c.css("display",a?"block":"none"))}};a.magnificPopup.registerModule(P,{options:{markup:'<div class="mfp-iframe-scaler"><div class="mfp-close"></div><iframe class="mfp-iframe" src="//about:blank" frameborder="0" allowfullscreen></iframe></div>',srcAction:"iframe_src",patterns:{youtube:{index:"youtube.com",id:"v=",src:"//www.youtube.com/embed/%id%?autoplay=1"},vimeo:{index:"vimeo.com/",id:"/",src:"//player.vimeo.com/video/%id%?autoplay=1"},gmaps:{index:"//maps.google.",src:"%id%&output=embed"}}},proto:{initIframe:function(){b.types.push(P),w("BeforeChange",function(a,b,c){b!==c&&(b===P?R():c===P&&R(!0))}),w(h+"."+P,function(){R()})},getIframe:function(c,d){var e=c.src,f=b.st.iframe;a.each(f.patterns,function(){return e.indexOf(this.index)>-1?(this.id&&(e="string"==typeof this.id?e.substr(e.lastIndexOf(this.id)+this.id.length,e.length):this.id.call(this,e)),e=this.src.replace("%id%",e),!1):void 0});var g={};return f.srcAction&&(g[f.srcAction]=e),b._parseMarkup(d,g,c),b.updateStatus("ready"),d}}});var S=function(a){var c=b.items.length;return a>c-1?a-c:0>a?c+a:a},T=function(a,b,c){return a.replace(/%curr%/gi,b+1).replace(/%total%/gi,c)};a.magnificPopup.registerModule("gallery",{options:{enabled:!1,arrowMarkup:'<button title="%title%" type="button" class="mfp-arrow mfp-arrow-%dir%"></button>',preload:[0,2],navigateByImgClick:!0,arrows:!0,tPrev:"Previous (Left arrow key)",tNext:"Next (Right arrow key)",tCounter:"%curr% of %total%"},proto:{initGallery:function(){var c=b.st.gallery,e=".mfp-gallery",g=Boolean(a.fn.mfpFastClick);return b.direction=!0,c&&c.enabled?(f+=" mfp-gallery",w(m+e,function(){c.navigateByImgClick&&b.wrap.on("click"+e,".mfp-img",function(){return b.items.length>1?(b.next(),!1):void 0}),d.on("keydown"+e,function(a){37===a.keyCode?b.prev():39===a.keyCode&&b.next()})}),w("UpdateStatus"+e,function(a,c){c.text&&(c.text=T(c.text,b.currItem.index,b.items.length))}),w(l+e,function(a,d,e,f){var g=b.items.length;e.counter=g>1?T(c.tCounter,f.index,g):""}),w("BuildControls"+e,function(){if(b.items.length>1&&c.arrows&&!b.arrowLeft){var d=c.arrowMarkup,e=b.arrowLeft=a(d.replace(/%title%/gi,c.tPrev).replace(/%dir%/gi,"left")).addClass(s),f=b.arrowRight=a(d.replace(/%title%/gi,c.tNext).replace(/%dir%/gi,"right")).addClass(s),h=g?"mfpFastClick":"click";e[h](function(){b.prev()}),f[h](function(){b.next()}),b.isIE7&&(x("b",e[0],!1,!0),x("a",e[0],!1,!0),x("b",f[0],!1,!0),x("a",f[0],!1,!0)),b.container.append(e.add(f))}}),w(n+e,function(){b._preloadTimeout&&clearTimeout(b._preloadTimeout),b._preloadTimeout=setTimeout(function(){b.preloadNearbyImages(),b._preloadTimeout=null},16)}),void w(h+e,function(){d.off(e),b.wrap.off("click"+e),b.arrowLeft&&g&&b.arrowLeft.add(b.arrowRight).destroyMfpFastClick(),b.arrowRight=b.arrowLeft=null})):!1},next:function(){b.direction=!0,b.index=S(b.index+1),b.updateItemHTML()},prev:function(){b.direction=!1,b.index=S(b.index-1),b.updateItemHTML()},goTo:function(a){b.direction=a>=b.index,b.index=a,b.updateItemHTML()},preloadNearbyImages:function(){var a,c=b.st.gallery.preload,d=Math.min(c[0],b.items.length),e=Math.min(c[1],b.items.length);for(a=1;a<=(b.direction?e:d);a++)b._preloadItem(b.index+a);for(a=1;a<=(b.direction?d:e);a++)b._preloadItem(b.index-a)},_preloadItem:function(c){if(c=S(c),!b.items[c].preloaded){var d=b.items[c];d.parsed||(d=b.parseEl(c)),y("LazyLoad",d),"image"===d.type&&(d.img=a('<img class="mfp-img" />').on("load.mfploader",function(){d.hasSize=!0}).on("error.mfploader",function(){d.hasSize=!0,d.loadError=!0,y("LazyLoadError",d)}).attr("src",d.src)),d.preloaded=!0}}}});var U="retina";a.magnificPopup.registerModule(U,{options:{replaceSrc:function(a){return a.src.replace(/\.\w+$/,function(a){return"@2x"+a})},ratio:1},proto:{initRetina:function(){if(window.devicePixelRatio>1){var a=b.st.retina,c=a.ratio;c=isNaN(c)?c():c,c>1&&(w("ImageHasSize."+U,function(a,b){b.img.css({"max-width":b.img[0].naturalWidth/c,width:"100%"})}),w("ElementParse."+U,function(b,d){d.src=a.replaceSrc(d,c)}))}}}}),function(){var b=1e3,c="ontouchstart"in window,d=function(){v.off("touchmove"+f+" touchend"+f)},e="mfpFastClick",f="."+e;a.fn.mfpFastClick=function(e){return a(this).each(function(){var g,h=a(this);if(c){var i,j,k,l,m,n;h.on("touchstart"+f,function(a){l=!1,n=1,m=a.originalEvent?a.originalEvent.touches[0]:a.touches[0],j=m.clientX,k=m.clientY,v.on("touchmove"+f,function(a){m=a.originalEvent?a.originalEvent.touches:a.touches,n=m.length,m=m[0],(Math.abs(m.clientX-j)>10||Math.abs(m.clientY-k)>10)&&(l=!0,d())}).on("touchend"+f,function(a){d(),l||n>1||(g=!0,a.preventDefault(),clearTimeout(i),i=setTimeout(function(){g=!1},b),e())})})}h.on("click"+f,function(){g||e()})})},a.fn.destroyMfpFastClick=function(){a(this).off("touchstart"+f+" click"+f),c&&v.off("touchmove"+f+" touchend"+f)}}(),A()});/*!
* Source: lib/translation.js, license: MIT, url: https://webtranslateit.com/en/projects/10365-JSXC
*/
-var I18next={de:{translation:{Logging_in:"Login läuft…",your_connection_is_unencrypted:"Deine Verbindung ist unverschlüsselt.",your_connection_is_encrypted:"Deine Verbindung ist verschlüsselt.",your_buddy_closed_the_private_connection:"Dein Kontakt hat die private Verbindung getrennt.",start_private:"Privat starten",close_private:"Privat abbrechen",your_buddy_is_verificated:"Dein Kontakt ist verifiziert.",you_have_only_a_subscription_in_one_way:"Der Kontaktstatus ist einseitig.",authentication_query_sent:"Authentifizierungsanfrage gesendet.",your_message_wasnt_send_please_end_your_private_conversation:"Deine Nachricht wurde nicht gesendet. Bitte beende die private Konversation.",unencrypted_message_received:"Unverschlüsselte Nachricht erhalten.",your_message_wasnt_send_because_you_have_no_valid_subscription:"Deine Nachricht wurde nicht gesandt, da der Kontaktstatus einseitig ist.",not_available:"Nicht verfügbar.",no_connection:"Keine Verbindung.",relogin:"Neu anmelden.",trying_to_start_private_conversation:"Versuche private Konversation zu starten.",Verified:"Verifiziert",Unverified:"Unverifiziert",private_conversation_started:"Private Konversation gestartet.",private_conversation_aborted:"Private Konversation abgebrochen.",your_buddy_closed_the_private_conversation_you_should_do_the_same:"Dein Kontakt hat die private Konversation beendet. Das solltest du auch tun!",conversation_is_now_verified:"Konversation ist jetzt verifiziert",authentication_failed:"Authentifizierung fehlgeschlagen.",your_buddy_is_attempting_to_determine_:"Dein Kontakt versucht herauszufinden ob er wirklich mit dir redet.",to_authenticate_to_your_buddy:"Um dich gegenüber deinem Kontakt zu verifizieren ",enter_the_answer_and_click_answer:"gib die Antwort ein und klick auf Antworten.",enter_the_secret:"gib das Geheimnis ein.",Creating_your_private_key_:"Wir werden jetzt deinen privaten Schlüssel generieren. Das kann einige Zeit in Anspruch nehmen.",Authenticating_a_buddy_helps_:"Einen Kontakt zu authentifizieren hilft sicherzustellen, dass die Person mit der du sprichst auch die ist die sie sagt.",How_do_you_want_to_authenticate_your_buddy:"Wie willst du {{bid_name}} (<b>{{bid_jid}}</b>) authentifizieren?",Select_method:"Wähle...",Manual:"Manual",Question:"Frage",Secret:"Geheimnis",To_verify_the_fingerprint_:"Um den Fingerprint zu verifizieren kontaktiere dein Kontakt über einen anderen Kommunikationsweg. Zum Beispiel per Telefonanruf.",Your_fingerprint:"Dein Fingerprint",Buddy_fingerprint:"Sein/Ihr Fingerprint",Close:"Schließen",Compared:"Verglichen",To_authenticate_using_a_question_:"Um die Authentifizierung per Frage durchzuführen, wähle eine Frage bei welcher nur dein Kontakt die Antwort kennt.",Ask:"Frage",To_authenticate_pick_a_secret_:"Um deinen Kontakt zu authentifizieren, wähle ein Geheimnis welches nur deinem Kontakt und dir bekannt ist.",Compare:"Vergleiche",Fingerprints:"Fingerprints",Authentication:"Authentifizierung",Message:"Nachricht",Add_buddy:"Kontakt hinzufügen",rename_buddy:"Kontakt umbenennen",delete_buddy:"Kontakt löschen",Login:"Anmeldung",Username:"Benutzername",Password:"Passwort",Cancel:"Abbrechen",Connect:"Verbinden",Type_in_the_full_username_:"Gib bitte den vollen Benutzernamen und optional ein Alias an.",Alias:"Alias",Add:"Hinzufügen",Subscription_request:"Kontaktanfrage",You_have_a_request_from:"Du hast eine Anfrage von",Deny:"Ablehnen",Approve:"Bestätigen",Remove_buddy:"Kontakt entfernen",You_are_about_to_remove_:"Du bist gerade dabei {{bid_name}} (<b>{{bid_jid}}</b>) von deiner Kontaktliste zu entfernen. Alle Chats werden geschlossen.",Continue_without_chat:"Weiter ohne Chat",Please_wait:"Bitte warten",Login_failed:"Chat-Anmeldung fehlgeschlagen",Sorry_we_cant_authentikate_:"Der Chatserver hat die Anmeldung abgelehnt. Falsches Passwort?",Retry:"Zurück",clear_history:"Lösche Verlauf",New_message_from:"Neue Nachricht von",Should_we_notify_you_:"Sollen wir dich in Zukunft über eingehende Nachrichten informieren, auch wenn dieser Tab nicht im Vordergrund ist?",Please_accept_:'Bitte klick auf den "Zulassen" Button oben.',Hide_offline:"Offline ausblenden",Show_offline:"Offline einblenden",About:"Über",dnd:"Beschäftigt",Mute:"Ton aus",Unmute:"Ton an",Subscription:"Bezug",both:"beidseitig",Status:"Status",online:"online",chat:"chat",away:"abwesend",xa:"länger abwesend",offline:"offline",none:"keine",Unknown_instance_tag:"Unbekannter instance tag.",Not_one_of_our_latest_keys:"Nicht einer unserer letzten Schlüssel.",Received_an_unreadable_encrypted_message:"Eine unlesbare verschlüsselte Nachricht erhalten.",Online:"Online",Chatty:"Gesprächig",Away:"Abwesend",Extended_away:"Länger abwesend",Offline:"Offline",Friendship_request:"Kontaktanfrage",Confirm:"Bestätigen",Dismiss:"Ablehnen",Remove:"Löschen",Online_help:"Online Hilfe",FN:"Name",N:" ",FAMILY:"Familienname",GIVEN:"Vorname",NICKNAME:"Spitzname",URL:"URL",ADR:"Adresse",STREET:"Straße",EXTADD:"Zusätzliche Adresse",LOCALITY:"Ortschaft",REGION:"Region",PCODE:"Postleitzahl",CTRY:"Land",TEL:"Telefon",NUMBER:"Nummer",EMAIL:"E-Mail",USERID:" ",ORG:"Organisation",ORGNAME:"Name",ORGUNIT:"Abteilung",TITLE:"Titel",ROLE:"Rolle",BDAY:"Geburtstag",DESC:"Beschreibung",PHOTO:" ",send_message:"Sende Nachricht",get_info:"Benutzerinformationen",Settings:"Einstellungen",Priority:"Priorität",Save:"Speichern",User_settings:"Benutzereinstellungen",A_fingerprint_:"Ein Fingerabdruck wird dazu benutzt deinen Gesprächspartner zu identifizieren.",Your_roster_is_empty_add_a:"Deine Kontaktliste ist leer, füge einen neuen Kontakt ",new_buddy:"hinzu",is:"ist",Login_options:"Anmeldeoptionen",BOSH_url:"BOSH url",Domain:"Domain",Resource:"Ressource",On_login:"Beim Anmelden",Received_an_unencrypted_message:"Unverschlüsselte Nachricht empfangen",Sorry_your_buddy_doesnt_provide_any_information:"Dein Kontakt stellt leider keine Informationen bereit.",Info_about:"Info über",Authentication_aborted:"Authentifizierung abgebrochen.",Authentication_request_received:"Authentifizierungsanfrage empfangen.",Do_you_want_to_display_them:"Möchtest du sie sehen?",Log_in_without_chat:"Anmelden ohne Chat",has_come_online:"ist online gekommen",Unknown_sender:"Unbekannter Sender",You_received_a_message_from_an_unknown_sender:"Du hast eine Nachricht von einem unbekannten Sender erhalten",Please_allow_access_to_microphone_and_camera:'Bitte klick auf den "Zulassen" Button oben, um den Zugriff auf Kamera und Mikrofon zu erlauben.',Incoming_call:"Eingehender Anruf",from:"von",Do_you_want_to_accept_the_call_from:"Möchtest Du den Anruf annehmen von",Reject:"Ablehnen",Accept:"Annehmen",hang_up:"Auflegen",snapshot:"Schnappschuss",mute_my_audio:"Mein Ton aus",pause_my_video:"Mein Video pausieren",fullscreen:"Vollbild",Info:"Info",Local_IP:"Lokale IP",Remote_IP:"Remote IP",Local_Fingerprint:"Lokaler Fingerprint",Remote_Fingerprint:"Remote Fingerprint",Video_call_not_possible:"Videoanruf nicht verfügbar. Dein Gesprächspartner unterstützt keine Videotelefonie.",Start_video_call:"Starte Videoanruf",Join_chat:"Gruppe beitreten",Join:"Betreten",Room:"Gruppe",Nickname:"Nickname",left_the_building:"__nickname__ hat die Gruppe verlassen",entered_the_room:"__nickname__ ist der Gruppe beigetreten",is_now_known_as:"__oldNickname__ ist nun unter __newNickname__ bekannt",This_room_is:"Diese Gruppe ist",muc_hidden:{keyword:"versteckt",description:"kann durch die Suche nicht gefunden werden"},muc_membersonly:{keyword:"nur für Mitglieder",description:"du musst auf der Mitgliederliste stehen"},muc_moderated:{keyword:"moderiert",description:'Nur Personen die "Mitspracherecht" haben dürfen Nachrichten senden'},muc_nonanonymous:{keyword:"nicht anonym",description:"deine Jabber ID wird für alle Mitglieder sichtbar sein"},muc_open:{keyword:"offen",description:"jeder darf dieser Gruppe beitreten"},muc_passwordprotected:{keyword:"passwortgeschützt",description:"du benötigst das korrekte Passwort"},muc_persistent:{keyword:"permanent",description:"wird nicht geschlossen, wenn das letzte Mitglied die Gruppe verlässt"},muc_public:{keyword:"öffentlich",description:"kann durch die Suche gefunden werden"},muc_semianonymous:{keyword:"teilweise anonym",description:"deine Jabber ID wird nur für die Gruppen Administratoren sichtbar sein"},muc_temporary:{keyword:"temporär",description:"wird geschlossen, wenn das letzte Mitglied die Gruppe verlässt"},muc_unmoderated:{keyword:"nicht moderiert",description:"jeder darf Nachrichten senden"},muc_unsecured:{keyword:"ungesichert",description:"es wird kein Passwort benötigt"},Continue:"Weiter",Server:"Server",Rooms_are_loaded:"Gruppen werden geladen",Could_load_only:"Es konnten nur __count__ Gruppen für die Autovervollständigung geladen werden",muc_explanation:"Bitte trage den Gruppennamen und optional ein Nickname und Passwort ein um einer Gruppe beizutreten",You_already_joined_this_room:"Du bist dieser Gruppe bereits beigetreten",This_room_will_be_closed:"Diese Gruppe wird geschlossen",Room_not_found_:"Es wird eine neue Gruppe erstellt",Loading_room_information:"Informationen über Gruppe werden geladen",Destroy:"Auflösen",Leave:"Verlassen",changed_subject_to:"__nickname__ hat das Thema auf __subject__ geändert",muc_removed_kicked:"Du wurdest aus der Gruppe entfernt",muc_removed_info_kicked:"__nickname__ wurde aus der Gruppe entfernt",muc_removed_banned:"Du wurdest aus der Gruppe ausgeschlossen",muc_removed_info_banned:"__nickname__ wurde aus der Gruppe ausgeschlossen",muc_removed_affiliation:"Du wurdest aus der Gruppe entfernt wegen einer Änderung deines Mitgliedstatus",muc_removed_info_affiliation:"__nickname__ wurde aus der Gruppe entfernt wegen einer Änderung seines Mitgliedstatus",muc_removed_membersonly:"Diese Gruppe erlaubt jetzt nur noch eingetragene Mitglieder und da du nicht dazugehörst, wurdest du aus der Gruppen entfernt",muc_removed_info_membersonly:"Diese Gruppe erlaubt jetzt nur noch eingetragene Mitglieder und __nickname__ gehört nicht dazu, daher wurde er aus der Gruppe entfernt",muc_removed_shutdown:"Du wurdest aus der Gruppe entfernt, da der MUC Server heruntergefahren wird",Reason:"Grund",message_not_send:"Deine Nachricht wurde aufgrund eines Fehlers nicht versandt","message_not_send_item-not-found":"Deine Nachricht wurde nicht versandt, da der Raum nicht mehr existiert",message_not_send_forbidden:'Deine Nachricht wurde nicht versandt, da du kein "Mitspracherecht" hast',"message_not_send_not-acceptable":"Deine Nachricht wurde nicht versandt, da du kein Mitglied dieser Gruppe bist",This_room_has_been_closed:"Diese Gruppe wurde geschlossen",Room_logging_is_enabled:"Gesprächsverlauf kann öffentlich einsehbar sein",A_password_is_required:"Es wird ein Passwort benötigt",You_are_not_on_the_member_list:"Du bist kein eingetragenes Mitglied",You_are_banned_from_this_room:"Du wurdest von dieser Gruppe ausgeschlossen",Your_desired_nickname_:"Dein gewünschter Nickname wird bereits verwendet. Bitte wähle einen anderen.",The_maximum_number_:"Die maximale Anzahl der Mitglieder wurde erreicht.",This_room_is_locked_:"Diese Gruppe ist gesperrt",You_are_not_allowed_to_create_:"Du darfst keine neue Gruppe erstellen",Carbon_copy:null,Enable:"Aktivieren"}},el:{translation:{Logging_in:null,your_connection_is_unencrypted:null,your_connection_is_encrypted:null,your_buddy_closed_the_private_connection:null,start_private:null,close_private:null,your_buddy_is_verificated:null,you_have_only_a_subscription_in_one_way:null,authentication_query_sent:null,your_message_wasnt_send_please_end_your_private_conversation:null,unencrypted_message_received:null,your_message_wasnt_send_because_you_have_no_valid_subscription:null,not_available:null,no_connection:null,relogin:null,trying_to_start_private_conversation:null,Verified:null,Unverified:null,private_conversation_started:null,private_conversation_aborted:null,your_buddy_closed_the_private_conversation_you_should_do_the_same:null,conversation_is_now_verified:null,authentication_failed:null,your_buddy_is_attempting_to_determine_:null,to_authenticate_to_your_buddy:null,enter_the_answer_and_click_answer:null,enter_the_secret:null,Creating_your_private_key_:null,Authenticating_a_buddy_helps_:null,How_do_you_want_to_authenticate_your_buddy:null,Select_method:null,Manual:null,Question:null,Secret:null,To_verify_the_fingerprint_:null,Your_fingerprint:null,Buddy_fingerprint:null,Close:null,Compared:null,To_authenticate_using_a_question_:null,Ask:null,To_authenticate_pick_a_secret_:null,Compare:null,Fingerprints:null,Authentication:null,Message:null,Add_buddy:null,rename_buddy:null,delete_buddy:null,Login:null,Username:null,Password:null,Cancel:null,Connect:null,Type_in_the_full_username_:null,Alias:null,Add:null,Subscription_request:null,You_have_a_request_from:null,Deny:null,Approve:null,Remove_buddy:null,You_are_about_to_remove_:null,Continue_without_chat:null,Please_wait:null,Login_failed:null,Sorry_we_cant_authentikate_:null,Retry:null,clear_history:null,New_message_from:null,Should_we_notify_you_:null,Please_accept_:null,Hide_offline:null,Show_offline:null,About:null,dnd:null,Mute:null,Unmute:null,Subscription:null,both:null,Status:null,online:null,chat:null,away:null,xa:null,offline:null,none:null,Unknown_instance_tag:null,Not_one_of_our_latest_keys:null,Received_an_unreadable_encrypted_message:null,Online:null,Chatty:null,Away:null,Extended_away:null,Offline:null,Friendship_request:null,Confirm:null,Dismiss:null,Remove:null,Online_help:null,FN:null,N:null,FAMILY:null,GIVEN:null,NICKNAME:null,URL:null,ADR:null,STREET:null,EXTADD:null,LOCALITY:null,REGION:null,PCODE:null,CTRY:null,TEL:null,NUMBER:null,EMAIL:null,USERID:null,ORG:null,ORGNAME:null,ORGUNIT:null,TITLE:null,ROLE:null,BDAY:null,DESC:null,PHOTO:null,send_message:null,get_info:null,Settings:null,Priority:null,Save:null,User_settings:null,A_fingerprint_:null,Your_roster_is_empty_add_a:null,new_buddy:null,is:null,Login_options:null,BOSH_url:null,Domain:null,Resource:null,On_login:null,Received_an_unencrypted_message:null,Sorry_your_buddy_doesnt_provide_any_information:null,Info_about:null,Authentication_aborted:null,Authentication_request_received:null,Do_you_want_to_display_them:null,Log_in_without_chat:null,has_come_online:null,Unknown_sender:null,You_received_a_message_from_an_unknown_sender:null,Please_allow_access_to_microphone_and_camera:null,Incoming_call:null,from:null,Do_you_want_to_accept_the_call_from:null,Reject:null,Accept:null,hang_up:null,snapshot:null,mute_my_audio:null,pause_my_video:null,fullscreen:null,Info:null,Local_IP:null,Remote_IP:null,Local_Fingerprint:null,Remote_Fingerprint:null,Video_call_not_possible:null,Start_video_call:null,Join_chat:null,Join:null,Room:null,Nickname:null,left_the_building:null,entered_the_room:null,is_now_known_as:null,This_room_is:null,muc_hidden:{keyword:null,description:null},muc_membersonly:{keyword:null,description:null},muc_moderated:{keyword:null,description:null},muc_nonanonymous:{keyword:null,description:null},muc_open:{keyword:null,description:null},muc_passwordprotected:{keyword:null,description:null},muc_persistent:{keyword:null,description:null},muc_public:{keyword:null,description:null},muc_semianonymous:{keyword:null,description:null},muc_temporary:{keyword:null,description:null},muc_unmoderated:{keyword:null,description:null},muc_unsecured:{keyword:null,description:null},Continue:null,Server:null,Rooms_are_loaded:null,Could_load_only:null,muc_explanation:null,You_already_joined_this_room:null,This_room_will_be_closed:null,Room_not_found_:null,Loading_room_information:null,Destroy:null,Leave:null,changed_subject_to:null,muc_removed_kicked:null,muc_removed_info_kicked:null,muc_removed_banned:null,muc_removed_info_banned:null,muc_removed_affiliation:null,muc_removed_info_affiliation:null,muc_removed_membersonly:null,muc_removed_info_membersonly:null,muc_removed_shutdown:null,Reason:null,message_not_send:null,"message_not_send_item-not-found":null,message_not_send_forbidden:null,"message_not_send_not-acceptable":null,This_room_has_been_closed:null,Room_logging_is_enabled:null,A_password_is_required:null,You_are_not_on_the_member_list:null,You_are_banned_from_this_room:null,Your_desired_nickname_:null,The_maximum_number_:null,This_room_is_locked_:null,You_are_not_allowed_to_create_:null,Carbon_copy:null,Enable:null}},en:{translation:{Logging_in:"Logging in…",your_connection_is_unencrypted:"Your connection is unencrypted.",your_connection_is_encrypted:"Your connection is encrypted.",your_buddy_closed_the_private_connection:"Your contact closed the private connection.",start_private:"Start private",close_private:"Close private",your_buddy_is_verificated:"Your contact is verified.",you_have_only_a_subscription_in_one_way:"You only have a one-way subscription.",authentication_query_sent:"Authentication query sent.",your_message_wasnt_send_please_end_your_private_conversation:"Your message was not sent. Please end your private conversation.",unencrypted_message_received:"Unencrypted message received",your_message_wasnt_send_because_you_have_no_valid_subscription:"Your message was not sent because you have no valid subscription.",not_available:"Not available",no_connection:"No connection!",relogin:"relogin",trying_to_start_private_conversation:"Trying to start private conversation!",Verified:"Verified",Unverified:"Unverified",private_conversation_started:"Private conversation started.",private_conversation_aborted:"Private conversation aborted!",your_buddy_closed_the_private_conversation_you_should_do_the_same:"Your contact closed the private conversation! You should do the same.",conversation_is_now_verified:"Conversation is now verified.",authentication_failed:"Authentication failed.",your_buddy_is_attempting_to_determine_:"You contact is attempting to determine if they are really talking to you.",to_authenticate_to_your_buddy:"To authenticate to your contact, ",enter_the_answer_and_click_answer:"enter the answer and click Answer.",enter_the_secret:"enter the secret.",Creating_your_private_key_:"Creating your private key; this may take a while.",Authenticating_a_buddy_helps_:"Authenticating a contact helps ensure that the person you are talking to is really the one they claim to be.",How_do_you_want_to_authenticate_your_buddy:"How do you want to authenticate {{bid_name}} (<b>{{bid_jid}}</b>)?",Select_method:"Select method...",Manual:"Manual",Question:"Question",Secret:"Secret",To_verify_the_fingerprint_:"To verify the fingerprint, contact your contact via some other trustworthy channel, such as the telephone.",Your_fingerprint:"Your fingerprint",Buddy_fingerprint:"Contact fingerprint",Close:"Close",Compared:"Compared",To_authenticate_using_a_question_:"To authenticate using a question, pick a question whose answer is known only you and your contact.",Ask:"Ask",To_authenticate_pick_a_secret_:"To authenticate, pick a secret known only to you and your contact.",Compare:"Compare",Fingerprints:"Fingerprints",Authentication:"Authentication",Message:"Message",Add_buddy:"Add contact",rename_buddy:"rename contact",delete_buddy:"delete contact",Login:"Login",Username:"Username",Password:"Password",Cancel:"Cancel",Connect:"Connect",Type_in_the_full_username_:"Type in the full username and an optional alias.",Alias:"Alias",Add:"Add",Subscription_request:"Subscription request",You_have_a_request_from:"You have a request from",Deny:"Deny",Approve:"Approve",Remove_buddy:"Remove contact",You_are_about_to_remove_:"You are about to remove {{bid_name}} (<b>{{bid_jid}}</b>) from your contact list. All related chats will be closed.",Continue_without_chat:"Continue without chat",Please_wait:"Please wait",Login_failed:"Chat login failed",Sorry_we_cant_authentikate_:"Authentication failed with the chat server. Maybe the password is wrong?",Retry:"Back",clear_history:"Clear history",New_message_from:"New message from",Should_we_notify_you_:"Should we notify you about new messages in the future?",Please_accept_:'Please click the "Allow" button at the top.',Hide_offline:"Hide offline contacts",Show_offline:"Show offline contacts",About:"About",dnd:"Do Not Disturb",Mute:"Mute",Unmute:"Unmute",Subscription:"Subscription",both:"both",Status:"Status",online:"online",chat:"chat",away:"away",xa:"extended away",offline:"offline",none:"none",Unknown_instance_tag:"Unknown instance tag.",Not_one_of_our_latest_keys:"Not one of our latest keys.",Received_an_unreadable_encrypted_message:"Received an unreadable encrypted message.",Online:"Online",Chatty:"Chatty",Away:"Away",Extended_away:"Extended away",Offline:"Offline",Friendship_request:"Contact request",Confirm:"Confirm",Dismiss:"Dismiss",Remove:"Remove",Online_help:"Online help",FN:"Full name",N:" ",FAMILY:"Family name",GIVEN:"Given name",NICKNAME:"Nickname",URL:"URL",ADR:"Address",STREET:"Street Address",EXTADD:"Extended Address",LOCALITY:"Locality",REGION:"Region",PCODE:"Postal Code",CTRY:"Country",TEL:"Telephone",NUMBER:"Number",EMAIL:"Email",USERID:" ",ORG:"Organization",ORGNAME:"Name",ORGUNIT:"Unit",TITLE:"Job title",ROLE:"Role",BDAY:"Birthday",DESC:"Description",PHOTO:" ",send_message:"Send message",get_info:"Show information",Settings:"Settings",Priority:"Priority",Save:"Save",User_settings:"User settings",A_fingerprint_:"A fingerprint is used to make sure that the person you are talking to is who he or she is saying.",Your_roster_is_empty_add_a:"Your roster is empty, add a ",new_buddy:"new contact",is:"is",Login_options:"Login options",BOSH_url:"BOSH URL",Domain:"Domain",Resource:"Resource",On_login:"On login",Received_an_unencrypted_message:"Received an unencrypted message",Sorry_your_buddy_doesnt_provide_any_information:"Sorry, your contact does not provide any information.",Info_about:"Info about",Authentication_aborted:"Authentication aborted.",Authentication_request_received:"Authentication request received.",Do_you_want_to_display_them:"Do you want to display them?",Log_in_without_chat:"Log in without chat",has_come_online:"has come online",Unknown_sender:"Unknown sender",You_received_a_message_from_an_unknown_sender:"You received a message from an unknown sender",Please_allow_access_to_microphone_and_camera:'Please click the "Allow" button at the top, to allow access to microphone and camera.',Incoming_call:"Incoming call",from:"from",Do_you_want_to_accept_the_call_from:"Do you want to accept the call from",Reject:"Reject",Accept:"Accept",hang_up:"hang up",snapshot:"snapshot",mute_my_audio:"mute my audio",pause_my_video:"pause my video",fullscreen:"fullscreen",Info:"Info",Local_IP:"Local IP",Remote_IP:"Remote IP",Local_Fingerprint:"Local fingerprint",Remote_Fingerprint:"Remote fingerprint",Video_call_not_possible:"Video call not possible. Your contact does not support video calls.",Start_video_call:"Start video call",Join_chat:"Join chat",Join:"Join",Room:"Room",Nickname:"Nickname",left_the_building:"__nickname__ left the building",entered_the_room:"__nickname__ entered the room",is_now_known_as:"__oldNickname__ is now known as __newNickname__",This_room_is:"This room is",muc_hidden:{keyword:"hidden",description:"can not be found through search"},muc_membersonly:{keyword:"members-only",description:"you need to be on the member list"},muc_moderated:{keyword:"moderated",description:'only persons with "voice" are allowed to send messages'},muc_nonanonymous:{keyword:"non-anonymous",description:"your jabber id is exposed to all other occupants"},muc_open:{keyword:"open",description:"everyone is allowed to join"},muc_passwordprotected:{keyword:"password-protected",description:"you need to provide the correct password"},muc_persistent:{keyword:"persistent",description:"will not be destroyed if the last occupant left"},muc_public:{keyword:"public",description:"can be found through search"},muc_semianonymous:{keyword:"semi-anonymous",description:"your jabber id is only exposed to room admins"},muc_temporary:{keyword:"temporary",description:"will be destroyed if the last occupant left"},muc_unmoderated:{keyword:"unmoderated",description:"everyone is allowed to send messages"},muc_unsecured:{keyword:"unsecured",description:"you need no password to enter"},Continue:"Continue",Server:"Server",Rooms_are_loaded:"Rooms are loaded",Could_load_only:"Could load only __count__ rooms for autocomplete",muc_explanation:"Please enter room name and optional a nickname and password to join a chat",You_already_joined_this_room:"You already joined this room",This_room_will_be_closed:"This room will be closed",Room_not_found_:"A new room will be created",Loading_room_information:"Loading room information",Destroy:"Destroy",Leave:"Leave",changed_subject_to:'__nickname__ changed the room subject to "__subject__"',muc_removed_kicked:"You have been kicked from the room",muc_removed_info_kicked:"__nickname__ has been kicked from the room",muc_removed_banned:"You have been banned from the room",muc_removed_info_banned:"__nickname__ has been banned from the room",muc_removed_affiliation:"You have been removed from the room, because of an affiliation change",muc_removed_info_affiliation:"__nickname__ has been removed from the room, because of an affiliation change",muc_removed_membersonly:"You have been removed from the room, because the room has been changed to members-only and you are no member",muc_removed_info_membersonly:"__nickname__ has been removed from the room, because the room has been changed to members-only and you are no member",muc_removed_shutdown:"You have been removed from the room, because the MUC service is being shut down",Reason:"Reason",message_not_send:"Your message was not send because of an error","message_not_send_item-not-found":"Your message was not send because this room does not exist",message_not_send_forbidden:"Your message was not send because you have no voice in this room","message_not_send_not-acceptable":"Your message was not send because you are no occupant of this room",This_room_has_been_closed:"This room has been closed",Room_logging_is_enabled:"Room logging is enabled",A_password_is_required:"A password is required",You_are_not_on_the_member_list:"You are not on the member list",You_are_banned_from_this_room:"You are banned from this room",Your_desired_nickname_:"Your desired nickname is already in use. Please choose another",The_maximum_number_:"The maximum number of user is reached in this room",This_room_is_locked_:"This room is locked",You_are_not_allowed_to_create_:"You are not allowed to create a room",Carbon_copy:"Carbon copy",Enable:"Enable"}},es:{translation:{Logging_in:"Por favor, espere...",your_connection_is_unencrypted:"Su conexión no está cifrada.",your_connection_is_encrypted:"Su conexión está cifrada.",your_buddy_closed_the_private_connection:"Su amigo ha cerrado la conexión privada.",start_private:"Iniciar privado",close_private:"Cerrar privado",your_buddy_is_verificated:"Tu amigo está verificado.",you_have_only_a_subscription_in_one_way:"Sólo tienes una suscripción de un modo.",authentication_query_sent:"Consulta de verificación enviada.",your_message_wasnt_send_please_end_your_private_conversation:"Su mensaje no fue enviado. Por favor, termine su conversación privada.",unencrypted_message_received:"Mensaje no cifrado recibido:",your_message_wasnt_send_because_you_have_no_valid_subscription:"Su mensaje no se ha enviado, porque usted no tiene suscripción válida.",not_available:"No disponible",no_connection:"Sin conexión!",relogin:"iniciar sesión nuevamente",trying_to_start_private_conversation:"Intentando iniciar una conversación privada!",Verified:"Verificado",Unverified:"No verificado",private_conversation_started:"se inició una conversación privada.",private_conversation_aborted:"Conversación privada abortada!",your_buddy_closed_the_private_conversation_you_should_do_the_same:"Su amigo cerró la conversación privada! Usted debería hacer lo mismo.",conversation_is_now_verified:"La conversación es ahora verificada.",authentication_failed:"Fallo la verificación.",your_buddy_is_attempting_to_determine_:"Tu amigo está tratando de determinar si él o ella está realmente hablando con usted.",to_authenticate_to_your_buddy:"Para autenticar a su amigo, ",enter_the_answer_and_click_answer:"introduce la respuesta y haga clic en Contestar.",enter_the_secret:"especifique el secreto.",Creating_your_private_key_:"Ahora vamos a crear su clave privada. Esto puede tomar algún tiempo.",Authenticating_a_buddy_helps_:"Autenticación de un amigo ayuda a garantizar que la persona que está hablando es quien él o ella está diciendo.",How_do_you_want_to_authenticate_your_buddy:"¿Cómo desea autenticar {{bid_name}} (<b>{{bid_jid}}</b>)?",Select_method:"Escoja un método...",Manual:"Manual",Question:"Pregunta",Secret:"Secreto",To_verify_the_fingerprint_:"Para verificar la firma digital, póngase en contacto con su amigo a través de algún otro canal autenticado, como el teléfono.",Your_fingerprint:"Tu firma digital",Buddy_fingerprint:"firma digital de tu amigo",Close:"Cerrar",Compared:"Comparado",To_authenticate_using_a_question_:"Para autenticar mediante una pregunta, elegir una pregunta cuya respuesta se conoce sólo usted y su amigo.",Ask:"Preguntar",To_authenticate_pick_a_secret_:"Para autenticar, elija un secreto conocido sólo por usted y su amigo.",Compare:"Comparar",Fingerprints:"Firmas digitales",Authentication:"Autenticación",Message:"Mensaje",Add_buddy:"Añadir amigo",rename_buddy:"renombrar amigo",delete_buddy:"eliminar amigo",Login:"Iniciar Sesión",Username:"Usuario",Password:"Contraseña",Cancel:"Cancelar",Connect:"Conectar",Type_in_the_full_username_:"Escriba el usuario completo y un alias opcional.",Alias:"Alias",Add:"Añadir",Subscription_request:"Solicitud de suscripción",You_have_a_request_from:"Tienes una petición de",Deny:"Rechazar",Approve:"Aprobar",Remove_buddy:"Eliminar amigo",You_are_about_to_remove_:"Vas a eliminar a {{bid_name}} (<b>{{bid_jid}}</b>) de tu lista de amigos. Todas las conversaciones relacionadas serán cerradas.",Continue_without_chat:"Continuar",Please_wait:"Espere por favor",Login_failed:"Fallo el inicio de sesión",Sorry_we_cant_authentikate_:"Lo sentimos, no podemos autentificarlo en nuestro servidor de chat. ¿Tal vez la contraseña es incorrecta?",Retry:"Reintentar",clear_history:"Borrar el historial",New_message_from:"Nuevo mensaje de",Should_we_notify_you_:"¿Debemos notificarle sobre nuevos mensajes en el futuro?",Please_accept_:'Por favor, haga clic en el botón "Permitir" en la parte superior.',Hide_offline:"Ocultar contactos desconectados",Show_offline:"Mostrar contactos desconectados",About:"Acerca de",dnd:"No Molestar",Mute:"Desactivar sonido",Unmute:"Activar sonido",Subscription:"Suscripción",both:"ambos",Status:"Estado",online:"en línea",chat:"chat",away:"ausente",xa:"mas ausente",offline:"desconectado",none:"nadie",Unknown_instance_tag:"Etiqueta de instancia desconocida.",Not_one_of_our_latest_keys:"No de nuestra ultima tecla.",Received_an_unreadable_encrypted_message:"Se recibió un mensaje cifrado ilegible.",Online:"En linea",Chatty:"Hablador",Away:"Ausente",Extended_away:"Mas ausente",Offline:"Desconectado",Friendship_request:"Solicitud de amistad",Confirm:"Confirmar",Dismiss:"Rechazar",Remove:"Eliminar",Online_help:"Ayuda en línea",FN:"Nombre completo ",N:" ",FAMILY:"Apellido",GIVEN:"Nombre",NICKNAME:"Apodar",URL:"URL",ADR:"Dirección",STREET:"Calle",EXTADD:"Extendido dirección",LOCALITY:"Población",REGION:"Región",PCODE:"Código postal",CTRY:"País",TEL:"Teléfono",NUMBER:"Número",EMAIL:"Emilio",USERID:" ",ORG:"Organización",ORGNAME:"Nombre",ORGUNIT:"Departamento",TITLE:"Título",ROLE:"Rol",BDAY:"Cumpleaños",DESC:"Descripción",PHOTO:" ",send_message:"mandar un texto",get_info:"obtener información",Settings:"Ajustes",Priority:"Prioridad",Save:"Guardar",User_settings:"Configuración de usuario",A_fingerprint_:"La huella digital se utiliza para que puedas estar seguro que la persona con la que estas hablando es quien realmente dice ser",Your_roster_is_empty_add_a:"Tu lista de amigos esta vacia",new_buddy:"Nuevo amigo",is:"es",Login_options:"Opciones de login",BOSH_url:"BOSH url",Domain:"Dominio",Resource:"Recurso",On_login:"Iniciar sesión",Received_an_unencrypted_message:"Recibe un mensaje no cifrado",Sorry_your_buddy_doesnt_provide_any_information:"Lo sentimos, su amigo no provee ninguna información.",Info_about:"Info acerca de",Authentication_aborted:"Autenticación abortada",Authentication_request_received:"Pedido de autenticación recibido.",Do_you_want_to_display_them:"¿Quiere mostrarlos?",Log_in_without_chat:"Ingresar sin chat",has_come_online:"se ha conectado",Unknown_sender:"Remitente desconocido",You_received_a_message_from_an_unknown_sender:"Ha recibido un mensaje de un remitente desconocido",Please_allow_access_to_microphone_and_camera:"Por favor, permitir el acceso al micrófono y la cámara.",Incoming_call:"Llamada entrante",from:"de",Do_you_want_to_accept_the_call_from:"Desea aceptar la llamada de",Reject:"Rechazar",Accept:"Aceptar",hang_up:"colgar",snapshot:"instantánea",mute_my_audio:"silenciar mi audio",pause_my_video:"pausar mi vídeo",fullscreen:"pantalla completa",Info:"Info",Local_IP:"IP local",Remote_IP:"IP remota",Local_Fingerprint:"Firma digital local",Remote_Fingerprint:"Firma digital remota",Video_call_not_possible:"Llamada de vídeo no es posible",Start_video_call:"Iniciar llamada de vídeo",Join_chat:null,Join:null,Room:null,Nickname:null,left_the_building:null,entered_the_room:null,is_now_known_as:null,This_room_is:null,muc_hidden:{keyword:null,description:null},muc_membersonly:{keyword:null,description:null},muc_moderated:{keyword:null,description:null},muc_nonanonymous:{keyword:null,description:null},muc_open:{keyword:null,description:null},muc_passwordprotected:{keyword:null,description:null},muc_persistent:{keyword:null,description:null},muc_public:{keyword:null,description:null},muc_semianonymous:{keyword:null,description:null},muc_temporary:{keyword:null,description:null},muc_unmoderated:{keyword:null,description:null},muc_unsecured:{keyword:null,description:null},Continue:null,Server:null,Rooms_are_loaded:null,Could_load_only:null,muc_explanation:null,You_already_joined_this_room:null,This_room_will_be_closed:null,Room_not_found_:null,Loading_room_information:null,Destroy:null,Leave:null,changed_subject_to:null,muc_removed_kicked:null,muc_removed_info_kicked:null,muc_removed_banned:null,muc_removed_info_banned:null,muc_removed_affiliation:null,muc_removed_info_affiliation:null,muc_removed_membersonly:null,muc_removed_info_membersonly:null,muc_removed_shutdown:null,Reason:null,message_not_send:null,"message_not_send_item-not-found":null,message_not_send_forbidden:null,"message_not_send_not-acceptable":null,This_room_has_been_closed:null,Room_logging_is_enabled:null,A_password_is_required:null,You_are_not_on_the_member_list:null,You_are_banned_from_this_room:null,Your_desired_nickname_:null,The_maximum_number_:null,This_room_is_locked_:null,You_are_not_allowed_to_create_:null,Carbon_copy:null,Enable:"Activar"}},fr:{translation:{Logging_in:"Connexion...",your_connection_is_unencrypted:"Connexion non chiffrée.",your_connection_is_encrypted:"Connexion chiffrée.",your_buddy_closed_the_private_connection:"Votre ami a fermé la connexion privée.",start_private:"Démarrer une conversation privé",close_private:"Clôturer une conversation privée",your_buddy_is_verificated:"Votre contact est vérifié.",you_have_only_a_subscription_in_one_way:"Vous ne pouvez souscrire qu'une fois.",authentication_query_sent:"Requête d’authentification envoyée.",your_message_wasnt_send_please_end_your_private_conversation:"Votre message n'a pas été envoyé. Veuillez terminer votre conversation privée.",unencrypted_message_received:"Message non chiffré reçu",your_message_wasnt_send_because_you_have_no_valid_subscription:"Votre message n'a pas été envoyé car votre abonnement n'est pas valide.",not_available:"Pas disponible",no_connection:"Pas de connexion !",relogin:"Re-connexion",trying_to_start_private_conversation:"Essai de démarrage d'une conversation privée !",Verified:"Vérifié",Unverified:"Non vérifié",private_conversation_started:"Conversation privé démarrée.",private_conversation_aborted:"Conversation privée interrompue !",your_buddy_closed_the_private_conversation_you_should_do_the_same:"Votre ami a fermé la conversation privée ! Vous devriez faire de même.",conversation_is_now_verified:"La conversation est maintenant vérifiée.",authentication_failed:"L'authentification a échoué.",your_buddy_is_attempting_to_determine_:"Votre ami tente de déterminer si il ou elle parle vraiment à vous.",to_authenticate_to_your_buddy:"Vous authentifier à votre ami, ",enter_the_answer_and_click_answer:"Saisissez une réponse et cliquer sur Répondre.",enter_the_secret:"Entrez le mot secret",Creating_your_private_key_:"Création de votre clé privée; cela peut prendre un moment.",Authenticating_a_buddy_helps_:"L'authentification d'un ami permet de s'assurer que la personne à qui vous parlez est vraiment celui qu'il ou elle prétend être.",How_do_you_want_to_authenticate_your_buddy:"Comment voulez-vous vous authentifier {{bid_name}} (<b>{{bid_jid}}</b>)?",Select_method:"Sélection de la méthode...",Manual:"Manuel",Question:"Question",Secret:"Sécurité",To_verify_the_fingerprint_:"Pour vérifier l'empreinte, contactez votre ami via un autre canal digne de confiance, tel que le téléphone.",Your_fingerprint:"Votre empreinte",Buddy_fingerprint:"Empreinte de l'ami",Close:"Fermer",Compared:"Comparé",To_authenticate_using_a_question_:"Pour s'authentifier à l'aide d'une question, choisissez une question dont la réponse n'est connue que vous et de votre ami.",Ask:"Demander",To_authenticate_pick_a_secret_:"Pour vous authentifier, choisissez un secret connu seulement de vous et de votre ami.",Compare:"Comparer",Fingerprints:"Empreintes",Authentication:"Authentification",Message:"Message",Add_buddy:"Ajouter comme ami",rename_buddy:"Renommer l'ami",delete_buddy:"Supprimer l'ami",Login:"Connexion",Username:"Nom d'utilisateur",Password:"Mot de passe",Cancel:"Annuler",Connect:"Connecter",Type_in_the_full_username_:"Tapez un nom d'utilisateur complet et un alias(optionnel).",Alias:"Alias",Add:"Ajouter",Subscription_request:"Demande d'abonnement",You_have_a_request_from:"Vous avez une requête de ",Deny:"Refuser",Approve:"Approuver",Remove_buddy:"Supprimer l'ami",You_are_about_to_remove_:"Vous allez retirer {{bid_name}} (<b>{{bid_jid}}</b>) de votre liste d'amis. Toutes les fenêtres de chat en lien avec celui-ci seront fermées.",Continue_without_chat:"Continuer sans tchat",Please_wait:"Merci de patienter",Login_failed:"Authentification échouée",Sorry_we_cant_authentikate_:"La connexion avec le serveur de tchat a échoué. Vérifiez le mot de passe.",Retry:"Retour",clear_history:"Effacer l’historique",New_message_from:"Nouveau message de",Should_we_notify_you_:"Dans le futur, devrons-nous vous notifier les nouveaux messages ?",Please_accept_:'Merci de cliquer sur le bouton "autoriser" en haut de page',Hide_offline:"Masquer les contacts non connectés",Show_offline:"Afficher les contacts non connectés",About:"À propos",dnd:"Ne pas déranger",Mute:"Muet",Unmute:"Son actif",Subscription:"Abonnement",both:"Les deux",Status:"Status",online:"En ligne",chat:"tchat",away:"Absent",xa:"Options étendues",offline:"Hors ligne",none:"Aucun",Unknown_instance_tag:"Tag inconnu",Not_one_of_our_latest_keys:"Ce n'est pas l'une des dernières touches",Received_an_unreadable_encrypted_message:"Message chiffré non lisible",Online:"En ligne",Chatty:"tchatty",Away:"Absent",Extended_away:"Options étendues",Offline:"Hors ligne",Friendship_request:"Demande d'amitié",Confirm:"Valider",Dismiss:"Rejeter",Remove:"Supprimer",Online_help:"Aide en ligne",FN:"Nom",N:" N ",FAMILY:"Nom de famille",GIVEN:"prénom",NICKNAME:"Surnom",URL:"URL",ADR:"Adresse",STREET:"Rue",EXTADD:"Adresse (suite)",LOCALITY:"Localité",REGION:"Région",PCODE:"Code Postal",CTRY:"Pays",TEL:"Téléphone",NUMBER:"Numéro",EMAIL:"Courriel",USERID:" USERID ",ORG:"Organisation",ORGNAME:"Nom",ORGUNIT:"Unité",TITLE:"Qualité:",ROLE:"Rôle",BDAY:"Date de naissance",DESC:"Description",PHOTO:"Photo",send_message:"Envoyer le message",get_info:"Montrer les informations",Settings:"Réglages",Priority:"Priorité",Save:"Enregistrer",User_settings:"Paramètres utilisateur",A_fingerprint_:"Une empreinte est utilisée pour s'assurer de l'identité de la personne à qui vous parlez",Your_roster_is_empty_add_a:"Votre liste est vide, ajouter ",new_buddy:"Nouvel ami",is:"est",Login_options:"Options d'identification",BOSH_url:"URL BOSH",Domain:"Domaine",Resource:"Ressource",On_login:"Après authentification",Received_an_unencrypted_message:"Reçu un message non chiffré",Sorry_your_buddy_doesnt_provide_any_information:"Désolé, votre ami n'a pas fourni d'informations",Info_about:"A propos de",Authentication_aborted:"Authentification interrompue.",Authentication_request_received:"Requête d'authentification reçue.",Do_you_want_to_display_them:"Voulez-vous les afficher ?",Log_in_without_chat:"S'identifier sans tchat",has_come_online:"vient d'arriver",Unknown_sender:"Expéditeur inconnu",You_received_a_message_from_an_unknown_sender:"Vous avez reçu un message d'un expéditeur inconnu",Please_allow_access_to_microphone_and_camera:'Veuillez cliquez sur le bouton "Autoriser" en haut, pour permettre l\'accès au micro et à la caméra.',Incoming_call:"Appel entrant",from:"de",Do_you_want_to_accept_the_call_from:"Voulez-vous accepter l'appel de",Reject:"Rejeté",Accept:"Accepté",hang_up:"Décrochez",snapshot:"Capture d’écran",mute_my_audio:"Couper l'audio",pause_my_video:"Mettre ma vidéo en pause",fullscreen:"Plein écran",Info:"Info",Local_IP:"IP locale",Remote_IP:"IP distante",Local_Fingerprint:"Empreinte locale",Remote_Fingerprint:"Empreinte distante",Video_call_not_possible:"L'appel vidéo n'est possible. Votre ami ne supporte pas les appels vidéo.",Start_video_call:"Démarrer l'appel vidéo",Join_chat:"Joindre la discution",Join:"Joindre",Room:"Salon",Nickname:"Surnom",left_the_building:"__nickname__ a quitté l'immeuble",entered_the_room:"__nickname__ entre dans le salon",is_now_known_as:null,This_room_is:"Ce salon est",muc_hidden:{keyword:"caché",description:null},muc_membersonly:{keyword:"pour les membres seulement",description:"Vous devez être sur la liste des membres"},muc_moderated:{keyword:"modéré",description:'Seulement les personnes avec la "voix" sont autorisés à envoyer des messages'},muc_nonanonymous:{keyword:"non anonyme",description:"Votre identifiant Jabber est visible de tous les autres occupants"},muc_open:{keyword:"ouvert",description:"Tout le monde est autorisé à se connecter"},muc_passwordprotected:{keyword:"protégé par un mot de passe",description:"Vous devez fournir un mot de passe correct"},muc_persistent:{keyword:"persistent",description:null},muc_public:{keyword:"public",description:null},muc_semianonymous:{keyword:"semi-anonyme",description:"Votre identifiant Jabber est seulement visible aux administrateurs de ce salon"},muc_temporary:{keyword:"temporaire",description:"sera détruit au départ de son dernier occupant"},muc_unmoderated:{keyword:"non modéré",description:"Tout le monde est autorisé à envoyer des messages"},muc_unsecured:{keyword:"non sécurisé",description:"un mot de passe n'est pas nécessaire pour entrer"},Continue:"Continuer",Server:"Serveur",Rooms_are_loaded:"Les salons sont chargés",Could_load_only:null,muc_explanation:"Veuillez saisir le nom du salon, un surnom (optionnel) et un mot de passe pour joindre la conversation",You_already_joined_this_room:"Vous avez déjà rejoins ce salon",This_room_will_be_closed:"Ce salon va être fermé",Room_not_found_:"Un nouveau salon va être créé",Loading_room_information:"Chargement des informations du salon",Destroy:"Détruire",Leave:"Quitter",changed_subject_to:'__nickname__ a changé le sujet du salon à "__subject__"',muc_removed_kicked:"Vous avez été éjecté de ce salon",muc_removed_info_kicked:"__nickname__ a été éjecté de ce salon",muc_removed_banned:"Vous avez été banni de ce salon",muc_removed_info_banned:"__nickname__ a été banni de ce salon",muc_removed_affiliation:null,muc_removed_info_affiliation:null,muc_removed_membersonly:null,muc_removed_info_membersonly:null,muc_removed_shutdown:null,Reason:"Raison",message_not_send:null,"message_not_send_item-not-found":null,message_not_send_forbidden:null,"message_not_send_not-acceptable":"Votre message n'a pas été envoyé car il n'y a personne dans ce salon",This_room_has_been_closed:"Ce salon a été fermé",Room_logging_is_enabled:null,A_password_is_required:"Un mot de passe est requis",You_are_not_on_the_member_list:"Vous n'êtes pas sur la liste des membres",You_are_banned_from_this_room:"Vous avez été banni de ce salon",Your_desired_nickname_:"Votre Surnom souhaité est déjà utilisé.Veuillez en choisir un autre",The_maximum_number_:"Le nombre maximum d'utilisateur est atteint dans ce salon",This_room_is_locked_:"Ce salon est vérouillé",You_are_not_allowed_to_create_:"Vous n'êtes pas autorisé à créer un salon",Carbon_copy:null,Enable:null}},it:{translation:{Logging_in:"login…",your_connection_is_unencrypted:"La sua connessione è non cifrata.",your_connection_is_encrypted:"La sua connessione è cifrata.",your_buddy_closed_the_private_connection:"La sua connessione privata è stato chiuso dal suo compagno.",start_private:"Inizia privata",close_private:"Chiude privata",your_buddy_is_verificated:"Il tuo compagno è stato verificato",you_have_only_a_subscription_in_one_way:"Hai solo una one-way inscrizione.",authentication_query_sent:"Domanda d'autenticità inviata.",your_message_wasnt_send_please_end_your_private_conversation:"Il tuo messaggio non è stato inviato. Si prega di finire la sua conversazione privata.",unencrypted_message_received:"Messaggio non cifrato ricevuto",your_message_wasnt_send_because_you_have_no_valid_subscription:"Il tuo messaggio non è stato inviato perché non hai una sottoscrizione valida.",not_available:"non disponibile",no_connection:"nessun collegamento!",relogin:"nuovo login",trying_to_start_private_conversation:"Cercando di avviare una conversazione privata!",Verified:"verificato",Unverified:"non verificato",private_conversation_started:"Conversazione privata iniziato.",private_conversation_aborted:"Conversazione privata abortito!",your_buddy_closed_the_private_conversation_you_should_do_the_same:"Il tuo compagno ha chiuso la conversazione privata! Si dovrebbe fare lo stesso.",conversation_is_now_verified:"Conversazione è ora verificato.",authentication_failed:"autenticazione fallita.",your_buddy_is_attempting_to_determine_:"Il tuo compagno sta cercando di determinare se lui o lei sta davvero parlando con te.",to_authenticate_to_your_buddy:"Per autenticare a il tuo compagno. ",enter_the_answer_and_click_answer:"inserisci la risposta e fare click su risposta.",enter_the_secret:"inserire il segreto.",Creating_your_private_key_:"Creare la propria chiave privata; questo potrebbe richiedere un po'.",Authenticating_a_buddy_helps_:"Autenticazione un compagno aiuta a garantire che la persona si sta parlando è davvero quello che lui o lei sostiene di essere.",How_do_you_want_to_authenticate_your_buddy:"Come si desidera autenticare {{bid_name}} (<b>{{bid_jid}}</b>)?",Select_method:"Seleziona metodo ..",Manual:"manuale",Question:"domanda",Secret:"segreto",To_verify_the_fingerprint_:"Per verificare l'impronta digitale, contattare il proprio compagno attraverso qualche altro canale affidabile, come il telefono.",Your_fingerprint:"il tuo impronta digitale",Buddy_fingerprint:"impronta digitale da compagno",Close:"chiude",Compared:"comparato",To_authenticate_using_a_question_:"Per autenticare tramite una questione, scegli una questione la cui risposta è nota solo voi e il tuo compagno",Ask:"chiedi",To_authenticate_pick_a_secret_:"Per autenticare, scegli un segreto noto solo a te e il tuo compagno.",Compare:"Comparare",Fingerprints:"Impronta digitale",Authentication:"Autenticazione",Message:"Messagio",Add_buddy:"Aggiungi un compagno",rename_buddy:"rinomina compagno",delete_buddy:"elimina compagno",Login:"Login",Username:"Identificazione dell'utente",Password:"Password",Cancel:"Cancella",Connect:"Collega",Type_in_the_full_username_:"Digita l'identificazione utente completo e un alias opzionale.",Alias:"Alias",Add:"Aggiungi",Subscription_request:"Rrichiesta di sottoscrizione",You_have_a_request_from:"Hai una richiesta da",Deny:"Refiuta",Approve:"Approva",Remove_buddy:"Rimuova il compagno",You_are_about_to_remove_:"Stai rimovendo {{bid_name}} (<b>{{bid_jid}}</b>) del suo lista di compagni. Tutte le chat appartenente saranno chiuse.",Continue_without_chat:"Continua senza chat",Please_wait:"Si prega d'attendere",Login_failed:"Chat login è fallito",Sorry_we_cant_authentikate_:"Autenticazione non riuscita con il server di chat. Forse la password è sbagliata?",Retry:"Indietro",clear_history:"Cancella la cronologia",New_message_from:"Nuovo messaggio da",Should_we_notify_you_:"Vuoi ricevere una notifica di nuovi messaggi in futuro?",Please_accept_:'Si prega di fare clic sul bottone "Autorizzazione" sopra.',Hide_offline:"Nascondere i contatti non in linea",Show_offline:"Mostra i contatti non in linea",About:"Informazione legale",dnd:"Non disturbare",Mute:"Muto attivo",Unmute:"Muto inattivo",Subscription:"Sottoscrizione",both:"etrambi",Status:"Status",online:"In linea",chat:"chat",away:"via",xa:"via estensivo",offline:"non in linea",none:"nessuno",Unknown_instance_tag:"Instance tag sconosciuta.",Not_one_of_our_latest_keys:"Non è una delle nostre ultime chiavi.",Received_an_unreadable_encrypted_message:"Ricevuto un messaggio crittografato illeggibile.",Online:"In linea",Chatty:"Chiacchierino",Away:"Via",Extended_away:"Via estensivo",Offline:"Non in linea",Friendship_request:"Amicizia richiesto",Confirm:"Conferma",Dismiss:"Rifiuta",Remove:"Rimuovi",Online_help:"Guida in linea",FN:"Nome e cognome",N:null,FAMILY:"Cognome",GIVEN:"Nome",NICKNAME:"Soprannome",URL:"URL",ADR:"Indirizzo",STREET:"Via",EXTADD:"Esteso Indirizzo",LOCALITY:"Località",REGION:"Regione",PCODE:"Codice Postale",CTRY:"Paese",TEL:"Telefono",NUMBER:"Numero",EMAIL:"E-mail",USERID:null,ORG:"Organizzazione",ORGNAME:"Nome",ORGUNIT:"Unità",TITLE:"Titolo di lavoro",ROLE:"Funzione",BDAY:"Compleanno",DESC:"Descrizione",PHOTO:null,send_message:"Messagio inviato",get_info:"Mostra informazioni",Settings:"Impostazione",Priority:"Priorità",Save:"Salva",User_settings:"Impostazione dell'utente",A_fingerprint_:"Una impronta digitale è usato per assicurarsi che la persona con cui stai parlando è lui o lei che sta dicendo.",Your_roster_is_empty_add_a:"Il suo elenco è vuoto, aggiungi un ",new_buddy:"compagno nuovo",is:"è",Login_options:"Opzioni di login",BOSH_url:"BOSH URL",Domain:"Domain",Resource:"Risorsa",On_login:"Login on",Received_an_unencrypted_message:"Ricevuto un messaggio non crittografato",Sorry_your_buddy_doesnt_provide_any_information:"Spiace, il tuo compagno non fornisce alcuna informazione.",Info_about:"Informazioni",Authentication_aborted:"Autenticazione interrotta",Authentication_request_received:"Richiesta di autenticazione ricevuto.",Do_you_want_to_display_them:"Vuoi che venga visualizzato?",Log_in_without_chat:"Log in senza chat",has_come_online:"È venuto in linea",Unknown_sender:"Mittente sconosciuto",You_received_a_message_from_an_unknown_sender:"Hai ricevuto un messaggio da un mittente sconosciuto",Please_allow_access_to_microphone_and_camera:'Si prega di fare clic sul bottone "Autorizzazione" sopra per autorizzazione del l\'accesso al microfono e fotocamera.',Incoming_call:"Chiamata in arrivo",from:"di",Do_you_want_to_accept_the_call_from:"Vuoi accettare la chiamata di",Reject:"Rifiuta",Accept:"Accetta",hang_up:"Riattacca",snapshot:"istantanea",mute_my_audio:"disattiva il mio audio",pause_my_video:"pausa il mio audio",fullscreen:"schermo intero",Info:"Informazione",Local_IP:"IP locale",Remote_IP:"IP remoto",Local_Fingerprint:"Impronta digitale locale",Remote_Fingerprint:"Impronta digitale remoto",Video_call_not_possible:"Videochiamata non è possibile. Il tuo compagno non può effettuare videochiamate.",Start_video_call:"Inizia videochiamata",Join_chat:null,Join:null,Room:null,Nickname:null,left_the_building:null,entered_the_room:null,is_now_known_as:null,This_room_is:null,muc_hidden:{keyword:null,description:null},muc_membersonly:{keyword:null,description:null},muc_moderated:{keyword:null,description:null},muc_nonanonymous:{keyword:null,description:null},muc_open:{keyword:null,description:null},muc_passwordprotected:{keyword:null,description:null},muc_persistent:{keyword:null,description:null},muc_public:{keyword:null,description:null},muc_semianonymous:{keyword:null,description:null},muc_temporary:{keyword:null,description:null},muc_unmoderated:{keyword:null,description:null},muc_unsecured:{keyword:null,description:null},Continue:null,Server:null,Rooms_are_loaded:null,Could_load_only:null,muc_explanation:null,You_already_joined_this_room:null,This_room_will_be_closed:null,Room_not_found_:null,Loading_room_information:null,Destroy:null,Leave:null,changed_subject_to:null,muc_removed_kicked:null,muc_removed_info_kicked:null,muc_removed_banned:null,muc_removed_info_banned:null,muc_removed_affiliation:null,muc_removed_info_affiliation:null,muc_removed_membersonly:null,muc_removed_info_membersonly:null,muc_removed_shutdown:null,Reason:null,message_not_send:null,"message_not_send_item-not-found":null,message_not_send_forbidden:null,"message_not_send_not-acceptable":null,This_room_has_been_closed:null,Room_logging_is_enabled:null,A_password_is_required:null,You_are_not_on_the_member_list:null,You_are_banned_from_this_room:null,Your_desired_nickname_:null,The_maximum_number_:null,This_room_is_locked_:null,You_are_not_allowed_to_create_:null,Carbon_copy:null,Enable:null}},nds:{translation:{Logging_in:null,your_connection_is_unencrypted:null,your_connection_is_encrypted:null,your_buddy_closed_the_private_connection:null,start_private:null,close_private:null,your_buddy_is_verificated:null,you_have_only_a_subscription_in_one_way:null,authentication_query_sent:null,your_message_wasnt_send_please_end_your_private_conversation:null,unencrypted_message_received:null,your_message_wasnt_send_because_you_have_no_valid_subscription:null,not_available:null,no_connection:null,relogin:null,trying_to_start_private_conversation:null,Verified:null,Unverified:null,private_conversation_started:null,private_conversation_aborted:null,your_buddy_closed_the_private_conversation_you_should_do_the_same:null,conversation_is_now_verified:null,authentication_failed:null,your_buddy_is_attempting_to_determine_:null,to_authenticate_to_your_buddy:null,enter_the_answer_and_click_answer:null,enter_the_secret:null,Creating_your_private_key_:null,Authenticating_a_buddy_helps_:null,How_do_you_want_to_authenticate_your_buddy:null,Select_method:null,Manual:null,Question:null,Secret:null,To_verify_the_fingerprint_:null,Your_fingerprint:null,Buddy_fingerprint:null,Close:null,Compared:null,To_authenticate_using_a_question_:null,Ask:null,To_authenticate_pick_a_secret_:null,Compare:null,Fingerprints:null,Authentication:null,Message:null,Add_buddy:null,rename_buddy:null,delete_buddy:null,Login:null,Username:null,Password:null,Cancel:null,Connect:null,Type_in_the_full_username_:null,Alias:null,Add:null,Subscription_request:null,You_have_a_request_from:null,Deny:null,Approve:null,Remove_buddy:null,You_are_about_to_remove_:null,Continue_without_chat:null,Please_wait:null,Login_failed:null,Sorry_we_cant_authentikate_:null,Retry:null,clear_history:null,New_message_from:null,Should_we_notify_you_:null,Please_accept_:null,Hide_offline:null,Show_offline:null,About:null,dnd:null,Mute:null,Unmute:null,Subscription:null,both:null,Status:null,online:null,chat:null,away:null,xa:null,offline:null,none:null,Unknown_instance_tag:null,Not_one_of_our_latest_keys:null,Received_an_unreadable_encrypted_message:null,Online:null,Chatty:null,Away:null,Extended_away:null,Offline:null,Friendship_request:null,Confirm:null,Dismiss:null,Remove:null,Online_help:null,FN:null,N:null,FAMILY:null,GIVEN:null,NICKNAME:null,URL:null,ADR:null,STREET:null,EXTADD:null,LOCALITY:null,REGION:null,PCODE:null,CTRY:null,TEL:null,NUMBER:null,EMAIL:null,USERID:null,ORG:null,ORGNAME:null,ORGUNIT:null,TITLE:null,ROLE:null,BDAY:null,DESC:null,PHOTO:null,send_message:null,get_info:null,Settings:null,Priority:null,Save:null,User_settings:null,A_fingerprint_:null,Your_roster_is_empty_add_a:null,new_buddy:null,is:null,Login_options:null,BOSH_url:null,Domain:null,Resource:null,On_login:null,Received_an_unencrypted_message:null,Sorry_your_buddy_doesnt_provide_any_information:null,Info_about:null,Authentication_aborted:null,Authentication_request_received:null,Do_you_want_to_display_them:null,Log_in_without_chat:null,has_come_online:null,Unknown_sender:null,You_received_a_message_from_an_unknown_sender:null,Please_allow_access_to_microphone_and_camera:null,Incoming_call:null,from:null,Do_you_want_to_accept_the_call_from:null,Reject:null,Accept:null,hang_up:null,snapshot:null,mute_my_audio:null,pause_my_video:null,fullscreen:null,Info:null,Local_IP:null,Remote_IP:null,Local_Fingerprint:null,Remote_Fingerprint:null,Video_call_not_possible:null,Start_video_call:null,Join_chat:null,Join:null,Room:null,Nickname:null,left_the_building:null,entered_the_room:null,is_now_known_as:null,This_room_is:null,muc_hidden:{keyword:null,description:null},muc_membersonly:{keyword:null,description:null},muc_moderated:{keyword:null,description:null},muc_nonanonymous:{keyword:null,description:null},muc_open:{keyword:null,description:null},muc_passwordprotected:{keyword:null,description:null},muc_persistent:{keyword:null,description:null},muc_public:{keyword:null,description:null},muc_semianonymous:{keyword:null,description:null},muc_temporary:{keyword:null,description:null},muc_unmoderated:{keyword:null,description:null},muc_unsecured:{keyword:null,description:null},Continue:null,Server:null,Rooms_are_loaded:null,Could_load_only:null,muc_explanation:null,You_already_joined_this_room:null,This_room_will_be_closed:null,Room_not_found_:null,Loading_room_information:null,Destroy:null,Leave:null,changed_subject_to:null,muc_removed_kicked:null,muc_removed_info_kicked:null,muc_removed_banned:null,muc_removed_info_banned:null,muc_removed_affiliation:null,muc_removed_info_affiliation:null,muc_removed_membersonly:null,muc_removed_info_membersonly:null,muc_removed_shutdown:null,Reason:null,message_not_send:null,"message_not_send_item-not-found":null,message_not_send_forbidden:null,"message_not_send_not-acceptable":null,This_room_has_been_closed:null,Room_logging_is_enabled:null,A_password_is_required:null,You_are_not_on_the_member_list:null,You_are_banned_from_this_room:null,Your_desired_nickname_:null,The_maximum_number_:null,This_room_is_locked_:null,You_are_not_allowed_to_create_:null,Carbon_copy:null,Enable:null}},pl:{translation:{Logging_in:"Logowanie...",your_connection_is_unencrypted:"Twoje połączenie nie jest szyfrowane.",your_connection_is_encrypted:"Twoje połączenie jest szyfrowane.",your_buddy_closed_the_private_connection:"Twój rozmówca zamknął połączenie.",start_private:"Rozpocznij rozmowę.",close_private:"Zakończ rozmowę.",your_buddy_is_verificated:"Twój rozmówca został zweryfikowany.",you_have_only_a_subscription_in_one_way:"Masz jednostronną subskrypcję.",authentication_query_sent:"Wysłano proźbę o autentykację.",your_message_wasnt_send_please_end_your_private_conversation:"Twoja wiadomość nie została wysłana. Proszę, zamknij rozmowę.",unencrypted_message_received:"Zwrotna niezaszyfrowana wiadomość.",your_message_wasnt_send_because_you_have_no_valid_subscription:"Wiadomość nie została wysłana ponieważ nie posiadasz subskrybcji u rozmówcy.",not_available:"Niedostępny.",no_connection:"Brak połączenia!",relogin:"Połącz ponownie",trying_to_start_private_conversation:"Rozpocznij rozmowę!",Verified:"Zweryfikowano",Unverified:"Niezweryfikowano",private_conversation_started:"Rozmowa prywatna rozpoczęta.",private_conversation_aborted:"Anulowano rozmowę!",your_buddy_closed_the_private_conversation_you_should_do_the_same:"Rozmówca przerwał połączenie!",conversation_is_now_verified:"Zweryfikowano połączenie.",authentication_failed:"Weryfikacja się nie powiodła.",your_buddy_is_attempting_to_determine_:"Twój rozmówca próbuje się z Tobą połączyć.",to_authenticate_to_your_buddy:"Autoryzacja z rozmówcą, ",enter_the_answer_and_click_answer:"napisz odpowiedź.",enter_the_secret:"wpisz hasło.",Creating_your_private_key_:"Tworzenie klucza prywatnego; może to chwilę potrwać",Authenticating_a_buddy_helps_:"Autoryzacja pomoże w ustaleniu faktycznej tożsamości rozmówcy ;).",How_do_you_want_to_authenticate_your_buddy:"Jakiej autoryzacji chcesz użyć {{bid_name}} (<b>{{bid_jid}}</b>)?",Select_method:"Wybierz sposób...",Manual:"Ręcznie",Question:"Pytanie",Secret:"Hasło",To_verify_the_fingerprint_:"Aby zweryfikować kod najpierw skontaktuj się z rozmówcą np. za pomocą telefonu.",Your_fingerprint:"Twój kod:",Buddy_fingerprint:"Kod rozmówcy",Close:"Zamknij",Compared:"Porównano",To_authenticate_using_a_question_:"Aby autoryzować za pomocą pytania, wybierz pytanie na które tylko Twój rozmówca zna odpowiedź.",Ask:"Zadaj pytanie",To_authenticate_pick_a_secret_:"Aby autoryzować za pomocą hasła, wybierz hasło na które zna tylko Twój rozmówca.",Compare:"Dopasuj",Fingerprints:"Kody autoryzacyjne",Authentication:"Autoryzacja",Message:"Wiadomość",Add_buddy:"Dodaj kontakt",rename_buddy:"Zmień nazwę",delete_buddy:"Usuń kontakt",Login:"Login",Username:"Nazwa Użytkownika",Password:"Hasło",Cancel:"Anuluj",Connect:"Połączenie",Type_in_the_full_username_:"Wpisz pełną nazwę użytkownika (np. <B>imię.nazwisko@zajezdnia.local</B>) oraz jego nazwę wyświetlaną (Alias).",Alias:"Alias",Add:"Dodaj",Subscription_request:"Potwierdzenie subskrypcji",You_have_a_request_from:"Masz potwierdzenie od",Deny:"Odmów",Approve:"Zatwierdź",Remove_buddy:"Usuń rozmówcę",You_are_about_to_remove_:"Twój rozmówca {{bid_name}} (<b>{{bid_jid}}</b>) usunął Cię ze swojej listy kontaktów.",Continue_without_chat:"Kontynuuj bez komunikatora",Please_wait:"Proszę czekać",Login_failed:"Błędne logowanie",Sorry_we_cant_authentikate_:"Błędna autoryzacja z serwerem. Może hasło jest nieprawidłowe?",Retry:"Powrót",clear_history:"Wyczyść historię",New_message_from:"Nowa wiadomość od",Should_we_notify_you_:"Czy chcesz otrzymywać powiadomienia o nowych wiadomościach w przyszłości?",Please_accept_:'Kliknij "Zezwól" na górze.',Hide_offline:"Schowaj niedostępne kontakty",Show_offline:"Pokaż niedostępne kontakty",About:"Info",dnd:"Nie przeszkadzać",Mute:"Wycisz",Unmute:"Włącz dźwięk",Subscription:"Subskrybcja",both:"obustronna",Status:"Status",online:"Dostępny",chat:"czat",away:"z dala od kompa",xa:"hen hen...",offline:"niedostępny",none:"brak",Unknown_instance_tag:"Nieznany przypadek.",Not_one_of_our_latest_keys:"Not one of our latest keys.",Received_an_unreadable_encrypted_message:"Otrzymano nieczytelną, zaszyfrowaną wiadomość.",Online:"Połączony",Chatty:"Pogawędzimy?",Away:"Daleko",Extended_away:"Hen Hen...",Offline:"Niedostępny",Friendship_request:"Zapytanie od znajomego?",Confirm:"Potwierdzenie",Dismiss:"Odwołaj",Remove:"Usuń",Online_help:"Pomoc Online",FN:"Pełna nazwa",N:" ",FAMILY:"Nazwisko",GIVEN:"Imię",NICKNAME:"Pseudonim",URL:"Strona WWW",ADR:"Adres",STREET:"Ulica",EXTADD:"Pełny adres",LOCALITY:"Lokalizacja",REGION:"Region",PCODE:"Kod pocztowy",CTRY:"Kraj",TEL:"Telefon",NUMBER:"Numer",EMAIL:"Email",USERID:" ",ORG:"Organizacja",ORGNAME:"Nazwa",ORGUNIT:"Jednostka",TITLE:"Stanowisko",ROLE:"Rola",BDAY:"Data urodzin",DESC:"Opis",PHOTO:" ",send_message:"Wyślij wiadomość",get_info:"Pokaż informację",Settings:"Ustawienia",Priority:"Priorytet",Save:"Zapisz",User_settings:"Ustawienia Użytkownika",A_fingerprint_:"Kod służy do autoryzacji Twojego rozmówcy aby potwierdzić jego tożsamość.",Your_roster_is_empty_add_a:"Twoja lista jest pusta, dodaj kontakty ",new_buddy:"Nowy kontakt",is:"jest",Login_options:"opcje logowania",BOSH_url:"Adres BOSH",Domain:"Domena",Resource:"Źródło",On_login:"Na login",Received_an_unencrypted_message:"Zatwierdzono nieszyfrowaną wiadomość.",Sorry_your_buddy_doesnt_provide_any_information:"Twój rozmówca nie posiada żadnych informacji.",Info_about:"Informacja o...",Authentication_aborted:"Autoryzacja anulowana.",Authentication_request_received:"Prośba o autoryzację została przyjęta.",Do_you_want_to_display_them:"Chcesz to wyświetlić?",Log_in_without_chat:"Zaloguj bez komunikatora",has_come_online:"jest teraz dostępny",Unknown_sender:"Nieznany nadawca",You_received_a_message_from_an_unknown_sender:"Masz wiadomość od nieznanego nadawcy.",Please_allow_access_to_microphone_and_camera:'Kliknij "Potwierdź" na górze, aby móc korzystać z mikrofonu oraz kamery.',Incoming_call:"Przychodzące połączenie",from:"z",Do_you_want_to_accept_the_call_from:"Akceptujesz połączenie od",Reject:"Odrzuć",Accept:"Zaakceptuj",hang_up:"odbierz",snapshot:"zrób zdjęcie",mute_my_audio:"wycisz dźwięk",pause_my_video:"zatrzymaj moje wideo",fullscreen:"Pełny ekran",Info:"Informacja",Local_IP:"Adres IP",Remote_IP:"Zdalny adres IP",Local_Fingerprint:"Kod lokalny",Remote_Fingerprint:"Zdalny kod",Video_call_not_possible:"Rozmowa wideo jest niemożliwa. Twój rozmówca nie ma możliwości prowadzenia takich rozmów.",Start_video_call:"Rozpocznij rozmowę wideo",Join_chat:"Dołącz do czata",Join:"Dołącz",Room:"Pokój",Nickname:"Nazwa użytkownika",left_the_building:"__nickname__ wyszedł",entered_the_room:"__nickname__ wszedł do pokoju",is_now_known_as:"__oldNickname__ zmienił nazwę na __newNickname__",This_room_is:"Ten pokój jest",muc_hidden:{keyword:"ukryty",description:"nie można odnaleźć elementów wyszukiwania"},muc_membersonly:{keyword:"tylko zalogowani",description:"musisz być członkiem listy"},muc_moderated:{keyword:"moderowano",description:'tylko osoby z opcją "głos" mogą wysyłać wiadomość'},muc_nonanonymous:{keyword:"nie-anonimowy",description:"Twój identyfikator jabber jest widoczny dla wszystkich innych osób"},muc_open:{keyword:"otwarty",description:"wszyscy mają pozwolenie aby dołączyć"},muc_passwordprotected:{keyword:"ograniczone hasłem",description:"musisz wpisać prawidłowe hasło"},muc_persistent:{keyword:"trwale",description:"nie zostaną zniszczone, jeśli ostatnia osoba wyszła"},muc_public:{keyword:"publiczny",description:"wyszukawno"},muc_semianonymous:{keyword:"pół-anonimowy",description:"Twój identyfikator jabber jest widoczny w pokoju adminów"},muc_temporary:{keyword:"tymczasowy",description:"zostanie usunięty jeżeli ostatnia osoba wyjdzie"},muc_unmoderated:{keyword:"niemoderowany",description:"wszyscy są uprawnieni do pisania wiadomości"},muc_unsecured:{keyword:"niezabezpieczone",description:"nie musisz wpisywać hasła"},Continue:"Kontynuuj",Server:"Serwer",Rooms_are_loaded:"Pokoje zostały załadowane",Could_load_only:"Nie załadowano __count__ pokoi",muc_explanation:"Aby się zalogować, wpisz nazwę pokoju oraz opcjonalnie nazwę użytkownika i hasło",You_already_joined_this_room:"Już dołączyłeś do tego pokoju",This_room_will_be_closed:"Ten pokój będzie zamknięty",Room_not_found_:"Nowy pokój będzie stworzony",Loading_room_information:"Ładowani informacji o pokoju",Destroy:"Zniszczony",Leave:"Opuść",changed_subject_to:'__nickname__ zmienił temat pokoju na "__subject__"',muc_removed_kicked:"Zostałeś wyrzucony z pokoju",muc_removed_info_kicked:"__nickname__ został wyrzucony z pokoju",muc_removed_banned:"Zostałeś zbanowany",muc_removed_info_banned:"__nickname__ został zbanowany",muc_removed_affiliation:"Zostałeś usunięty z pokoju ze względu na zmianę przynależnosci",muc_removed_info_affiliation:"__nickname__ został usunięty z pokoju ze względu na zmianę przynależnosci",muc_removed_membersonly:"Zostałeś usunięty z pokoju ze względu na zmianę pokoju tylko dla członków, a Ty nie jesteś członkiem...",muc_removed_info_membersonly:"__nickname__ został usunięty z pokoju ze względu na zmianę pokoju na tylko dla członków",muc_removed_shutdown:"Zostałeś usunięty z pokoju ze względu na zamknięcie usługi",Reason:"Powód",message_not_send:"Wystąpił błąd i twoja wiadomość nie została wysłana.","message_not_send_item-not-found":"Twoja wiadomość nie została wysłana ponieważ ten pokój nie istnieje",message_not_send_forbidden:"Twoja wiadomość nie została wysłana ponieważ nie masz głosu w tym pokoju","message_not_send_not-acceptable":"Twoja wiadomość nie została wysłana ponieważ nie jesteś właścicielem tego pokoju",This_room_has_been_closed:"Ten pokój został zamknięty",Room_logging_is_enabled:"Logowanie do pokoju jest włączone",A_password_is_required:"Hasło jest wymagane",You_are_not_on_the_member_list:"Nie jesteś na liście członków",You_are_banned_from_this_room:"Zostałeś zbanowany w tym pokoju",Your_desired_nickname_:"Twoja nazwa użytkownika jest już użyta. Spróbuj wybrać inną",The_maximum_number_:"Została osiągnięta maksymalna liczba użytkowników w tym pokoju",This_room_is_locked_:"Ten pokój jest zablokowany",You_are_not_allowed_to_create_:"Nie masz uprawnień do tworzenia pokoju",Carbon_copy:"Do wiadomości",Enable:null}},"pt-BR":{translation:{Logging_in:"Entrando...",your_connection_is_unencrypted:"Sua conexão não é encriptada",your_connection_is_encrypted:"Sua conexão é encriptada",your_buddy_closed_the_private_connection:"Seu contato fechou a conexão privada",start_private:"Iniciar conversa privada",close_private:"Fechar conversa privada",your_buddy_is_verificated:"Seu contato está verificado",you_have_only_a_subscription_in_one_way:"Você só tem a inscrição one-way",authentication_query_sent:"Pergunta de autenticação enviada",your_message_wasnt_send_please_end_your_private_conversation:"Sua mensagem não foi enviada. Por favor finalize sua conversa privada",unencrypted_message_received:"Mensagem não encriptada recebida",your_message_wasnt_send_because_you_have_no_valid_subscription:"Sua mensagem não foi enviada porque sua inscrição não é válida",not_available:"Indisponível",no_connection:"Sem conexão!",relogin:"reentrar",trying_to_start_private_conversation:"Tentando iniciar conversa privada",Verified:"Verificado",Unverified:"Não verificado",private_conversation_started:"Conversa privada iniciada.",private_conversation_aborted:"Conversa privada abortada!",your_buddy_closed_the_private_conversation_you_should_do_the_same:"Seu contato encerrou a conversa privada! Você deveria fazer o mesmo.",conversation_is_now_verified:"Conversa verificada.",authentication_failed:"Autenticação falhou.",your_buddy_is_attempting_to_determine_:"Seu contato está tentando determinar se ele realmente está falando contigo.",to_authenticate_to_your_buddy:"Para autenticar seu contato, ",enter_the_answer_and_click_answer:"entre com a resposta e clique em Responder.",enter_the_secret:"escreva a senha.",Creating_your_private_key_:"Criando sua chave privada: isso pode demorar um pouco.",Authenticating_a_buddy_helps_:"Autenticar seu contato ajuda a garantir que a pessoa com a qual você está falando é realmente a pessoa que ela alega ser.",How_do_you_want_to_authenticate_your_buddy:"Como você gostaria de se autenticar {{bid_name}} (<b>{{bid_jid}}</b>)?",Select_method:"Selecione o método...",Manual:"Manual",Question:"Pergunta",Secret:"Senha",To_verify_the_fingerprint_:"Para verificar o fingerprint, entre em contato com seu contato usando outro meio, de preferência seguro, como o telefone.",Your_fingerprint:"Seu fingerprint",Buddy_fingerprint:"Fingerprint do contato",Close:"Fechar",Compared:"Comparado",To_authenticate_using_a_question_:"Para autenticar seu contato faça uma pergunta, mas escolha que só ele saiba a resposta.",Ask:"Pergunta",To_authenticate_pick_a_secret_:"Para autenticar, escolha um segredo que somente você e seu contato saibam.",Compare:"Compare",Fingerprints:"Fingerprints",Authentication:"Autenticação",Message:"Mensagem",Add_buddy:"Adicionar contato",rename_buddy:"renomear contato",delete_buddy:"remover contato",Login:"Entrar",Username:"Usuário",Password:"Senha",Cancel:"Cancelar",Connect:"Conectar",Type_in_the_full_username_:"Digite seu nome completo e um apelido opcional.",Alias:"Apelido",Add:"Adicionar",Subscription_request:"Pedido de inscrição",You_have_a_request_from:"Você tem um pedido de",Deny:"Negar",Approve:"Aprovar",Remove_buddy:"Remover contato",You_are_about_to_remove_:"Você está prestes a remover {{bid_name}} (<b>{{bid_jid}}</b>) de sua lista de contatos. Todas as conversas serão fechadas.",Continue_without_chat:"Continue sem converar",Please_wait:"Por favor aguarde",Login_failed:"Autenticação da conversa falhou",Sorry_we_cant_authentikate_:"A autenticação com o servidor falhou. Talvez seja a senha errada?",Retry:"Voltar",clear_history:"Limpar histórico",New_message_from:"Nova mensagem de",Should_we_notify_you_:"Devemos continuar notificando sobre novas mensagens no futuro?",Please_accept_:'Por favor clique no botão "Permitir" na parte superior.',Hide_offline:"Esconder contatos desconectados",Show_offline:"Mostrar contatos desconectados",About:"Sobre",dnd:"Não perturbe",Mute:"Mudo",Unmute:"Ligar",Subscription:"Inscrição",both:"ambos",Status:"Status",online:"online",chat:"conversa",away:"ausente",xa:"ausente por mais tempo",offline:"desativado",none:"nenhum",Unknown_instance_tag:"Marcação desconhecida da instância",Not_one_of_our_latest_keys:"Nenhuma de nossas ultimas chaves.",Received_an_unreadable_encrypted_message:"Mensagem encriptada ilegível foi recebida.",Online:"Online",Chatty:"Tagarela",Away:"Ausente",Extended_away:"Ausente por mais tempo",Offline:"Desativado",Friendship_request:"Pedido de amizade",Confirm:"Confirmar",Dismiss:"Ignorar",Remove:"Remover",Online_help:"Ajuda online",FN:"Nome completo",N:" ",FAMILY:"Sobrenome",GIVEN:"Nome",NICKNAME:"Apelido",URL:"URL",ADR:"Endereço",STREET:"Rua, Av, etc",EXTADD:"Complemento",LOCALITY:"Localidade",REGION:"Região",PCODE:"CEP",CTRY:"País",TEL:"Telefone",NUMBER:"Número",EMAIL:"Email",USERID:" ",ORG:"Empresa",ORGNAME:"Nome",ORGUNIT:"Unidade",TITLE:"Cargo",ROLE:"Rol",BDAY:"Data de nascimento",DESC:"Descrição",PHOTO:" ",send_message:"Enviar mensagem",get_info:"Exibir informações",Settings:"Configurações",Priority:"Prioridade",Save:"Salvar",User_settings:"Configurações do usuário",A_fingerprint_:"O fingerprint é usado para certificar que a pessoa com a qual se está falando é que ela diz ser.",Your_roster_is_empty_add_a:"Sua lista está vazia, adicione um ",new_buddy:"novo contato",is:"é",Login_options:"Opções de login",BOSH_url:"BOSH URL",Domain:"Domínio",Resource:"Recurso",On_login:"Ao autenticar",Received_an_unencrypted_message:"Mensagem não encriptada recebida",Sorry_your_buddy_doesnt_provide_any_information:"Desculpe, seu contato não forneceu nenhuma informação",Info_about:"Informações sobre",Authentication_aborted:"Autenticação encerrada.",Authentication_request_received:"Pedido de autenticação recebido",Do_you_want_to_display_them:"Você quer mostrá-los?",Log_in_without_chat:"Entrar sem conversar",has_come_online:"ficou online",Unknown_sender:"Emissor desconhecido",You_received_a_message_from_an_unknown_sender:"Você recebeu uma mensagem de um emissor desconhecido",Please_allow_access_to_microphone_and_camera:'Por favor clique no botão "Permitir" no topo, para conceder acesso ao seu microfone e câmera.',Incoming_call:"Recebendo chamada",from:"de",Do_you_want_to_accept_the_call_from:"Você aceita a chamada de",Reject:"Negar",Accept:"Aceitar",hang_up:"desligar",snapshot:"registrar imagem",mute_my_audio:"mudo",pause_my_video:"pausar vídeo",fullscreen:"tela cheia",Info:"Informações",Local_IP:"IP local",Remote_IP:"IP remoto",Local_Fingerprint:"Fingerprint local",Remote_Fingerprint:"Fingerprint remoto",Video_call_not_possible:"Chamada de vídeo impossível. Seu contato não suporta chamadas desse tipo.",Start_video_call:"Iniciar chamada de vídeo",Join_chat:null,Join:null,Room:null,Nickname:null,left_the_building:null,entered_the_room:null,is_now_known_as:null,This_room_is:null,muc_hidden:{keyword:null,description:null},muc_membersonly:{keyword:null,description:null},muc_moderated:{keyword:null,description:null},muc_nonanonymous:{keyword:null,description:null},muc_open:{keyword:null,description:null},muc_passwordprotected:{keyword:null,description:null},muc_persistent:{keyword:null,description:null},muc_public:{keyword:null,description:null},muc_semianonymous:{keyword:null,description:null},muc_temporary:{keyword:null,description:null},muc_unmoderated:{keyword:null,description:null},muc_unsecured:{keyword:null,description:null},Continue:null,Server:null,Rooms_are_loaded:null,Could_load_only:null,muc_explanation:null,You_already_joined_this_room:null,This_room_will_be_closed:null,Room_not_found_:null,Loading_room_information:null,Destroy:null,Leave:null,changed_subject_to:null,muc_removed_kicked:null,muc_removed_info_kicked:null,muc_removed_banned:null,muc_removed_info_banned:null,muc_removed_affiliation:null,muc_removed_info_affiliation:null,muc_removed_membersonly:null,muc_removed_info_membersonly:null,muc_removed_shutdown:null,Reason:null,message_not_send:null,"message_not_send_item-not-found":null,message_not_send_forbidden:null,"message_not_send_not-acceptable":null,This_room_has_been_closed:null,Room_logging_is_enabled:null,A_password_is_required:null,You_are_not_on_the_member_list:null,You_are_banned_from_this_room:null,Your_desired_nickname_:null,The_maximum_number_:null,This_room_is_locked_:null,You_are_not_allowed_to_create_:null,Carbon_copy:null,Enable:null}},ro:{translation:{Logging_in:null,your_connection_is_unencrypted:null,your_connection_is_encrypted:null,your_buddy_closed_the_private_connection:null,start_private:null,close_private:null,your_buddy_is_verificated:null,you_have_only_a_subscription_in_one_way:null,authentication_query_sent:null,your_message_wasnt_send_please_end_your_private_conversation:null,unencrypted_message_received:null,your_message_wasnt_send_because_you_have_no_valid_subscription:null,not_available:null,no_connection:null,relogin:null,trying_to_start_private_conversation:null,Verified:null,Unverified:null,private_conversation_started:null,private_conversation_aborted:null,your_buddy_closed_the_private_conversation_you_should_do_the_same:null,conversation_is_now_verified:null,authentication_failed:null,your_buddy_is_attempting_to_determine_:null,to_authenticate_to_your_buddy:null,enter_the_answer_and_click_answer:null,enter_the_secret:null,Creating_your_private_key_:null,Authenticating_a_buddy_helps_:null,How_do_you_want_to_authenticate_your_buddy:null,Select_method:null,Manual:null,Question:null,Secret:null,To_verify_the_fingerprint_:null,Your_fingerprint:null,Buddy_fingerprint:null,Close:null,Compared:null,To_authenticate_using_a_question_:null,Ask:null,To_authenticate_pick_a_secret_:null,Compare:null,Fingerprints:null,Authentication:null,Message:null,Add_buddy:null,rename_buddy:null,delete_buddy:null,Login:null,Username:null,Password:null,Cancel:null,Connect:null,Type_in_the_full_username_:null,Alias:null,Add:null,Subscription_request:null,You_have_a_request_from:null,Deny:null,Approve:null,Remove_buddy:null,You_are_about_to_remove_:null,Continue_without_chat:null,Please_wait:null,Login_failed:null,Sorry_we_cant_authentikate_:null,Retry:null,clear_history:null,New_message_from:null,Should_we_notify_you_:null,Please_accept_:null,Hide_offline:null,Show_offline:null,About:null,dnd:null,Mute:null,Unmute:null,Subscription:null,both:null,Status:null,online:null,chat:null,away:null,xa:null,offline:null,none:null,Unknown_instance_tag:null,Not_one_of_our_latest_keys:null,Received_an_unreadable_encrypted_message:null,Online:null,Chatty:null,Away:null,Extended_away:null,Offline:null,Friendship_request:null,Confirm:null,Dismiss:null,Remove:null,Online_help:null,FN:null,N:null,FAMILY:null,GIVEN:null,NICKNAME:null,URL:null,ADR:null,STREET:null,EXTADD:null,LOCALITY:null,REGION:null,PCODE:null,CTRY:null,TEL:null,NUMBER:null,EMAIL:null,USERID:null,ORG:null,ORGNAME:null,ORGUNIT:null,TITLE:null,ROLE:null,BDAY:null,DESC:null,PHOTO:null,send_message:null,get_info:null,Settings:null,Priority:null,Save:null,User_settings:null,A_fingerprint_:null,Your_roster_is_empty_add_a:null,new_buddy:null,is:null,Login_options:null,BOSH_url:null,Domain:null,Resource:null,On_login:null,Received_an_unencrypted_message:null,Sorry_your_buddy_doesnt_provide_any_information:null,Info_about:null,Authentication_aborted:null,Authentication_request_received:null,Do_you_want_to_display_them:null,Log_in_without_chat:null,has_come_online:null,Unknown_sender:null,You_received_a_message_from_an_unknown_sender:null,Please_allow_access_to_microphone_and_camera:null,Incoming_call:null,from:null,Do_you_want_to_accept_the_call_from:null,Reject:null,Accept:null,hang_up:null,snapshot:null,mute_my_audio:null,pause_my_video:null,fullscreen:null,Info:null,Local_IP:null,Remote_IP:null,Local_Fingerprint:null,Remote_Fingerprint:null,Video_call_not_possible:null,Start_video_call:null,Join_chat:null,Join:null,Room:null,Nickname:null,left_the_building:null,entered_the_room:null,is_now_known_as:null,This_room_is:null,muc_hidden:{keyword:null,description:null},muc_membersonly:{keyword:null,description:null},muc_moderated:{keyword:null,description:null},muc_nonanonymous:{keyword:null,description:null},muc_open:{keyword:null,description:null},muc_passwordprotected:{keyword:null,description:null},muc_persistent:{keyword:null,description:null},muc_public:{keyword:null,description:null},muc_semianonymous:{keyword:null,description:null},muc_temporary:{keyword:null,description:null},muc_unmoderated:{keyword:null,description:null},muc_unsecured:{keyword:null,description:null},Continue:null,Server:null,Rooms_are_loaded:null,Could_load_only:null,muc_explanation:null,You_already_joined_this_room:null,This_room_will_be_closed:null,Room_not_found_:null,Loading_room_information:null,Destroy:null,Leave:null,changed_subject_to:null,muc_removed_kicked:null,muc_removed_info_kicked:null,muc_removed_banned:null,muc_removed_info_banned:null,muc_removed_affiliation:null,muc_removed_info_affiliation:null,muc_removed_membersonly:null,muc_removed_info_membersonly:null,muc_removed_shutdown:null,Reason:null,message_not_send:null,"message_not_send_item-not-found":null,message_not_send_forbidden:null,"message_not_send_not-acceptable":null,This_room_has_been_closed:null,Room_logging_is_enabled:null,A_password_is_required:null,You_are_not_on_the_member_list:null,You_are_banned_from_this_room:null,Your_desired_nickname_:null,The_maximum_number_:null,This_room_is_locked_:null,You_are_not_allowed_to_create_:null,Carbon_copy:null,Enable:null}}};
-
+var I18next={de:{translation:{Logging_in:"Login läuft…",your_connection_is_unencrypted:"Deine Verbindung ist unverschlüsselt.",your_connection_is_encrypted:"Deine Verbindung ist verschlüsselt.",your_buddy_closed_the_private_connection:"Dein Kontakt hat die private Verbindung getrennt.",start_private:"Privat starten",close_private:"Privat abbrechen",your_buddy_is_verificated:"Dein Kontakt ist verifiziert.",you_have_only_a_subscription_in_one_way:"Der Kontaktstatus ist einseitig.",authentication_query_sent:"Authentifizierungsanfrage gesendet.",your_message_wasnt_send_please_end_your_private_conversation:"Deine Nachricht wurde nicht gesendet. Bitte beende die private Konversation.",unencrypted_message_received:"Unverschlüsselte Nachricht erhalten.",not_available:"Nicht verfügbar.",no_connection:"Keine Verbindung.",relogin:"Neu anmelden.",trying_to_start_private_conversation:"Versuche private Konversation zu starten.",Verified:"Verifiziert",Unverified:"Unverifiziert",private_conversation_aborted:"Private Konversation abgebrochen.",your_buddy_closed_the_private_conversation_you_should_do_the_same:"Dein Kontakt hat die private Konversation beendet. Das solltest du auch tun!",conversation_is_now_verified:"Konversation ist jetzt verifiziert",authentication_failed:"Authentifizierung fehlgeschlagen.",Creating_your_private_key_:"Wir werden jetzt deinen privaten Schlüssel generieren. Das kann einige Zeit in Anspruch nehmen.",Authenticating_a_buddy_helps_:"Einen Kontakt zu authentifizieren hilft sicherzustellen, dass die Person mit der du sprichst auch die ist die sie sagt.",How_do_you_want_to_authenticate_your_buddy:"Wie willst du {{bid_name}} (<b>{{bid_jid}}</b>) authentifizieren?",Select_method:"Wähle...",Manual:"Manual",Question:"Frage",Secret:"Geheimnis",To_verify_the_fingerprint_:"Um den Fingerprint zu verifizieren kontaktiere dein Kontakt über einen anderen Kommunikationsweg. Zum Beispiel per Telefonanruf.",Your_fingerprint:"Dein Fingerprint",Buddy_fingerprint:"Sein/Ihr Fingerprint",Close:"Schließen",Compared:"Verglichen",To_authenticate_using_a_question_:"Um die Authentifizierung per Frage durchzuführen, wähle eine Frage bei welcher nur dein Kontakt die Antwort kennt.",Ask:"Frage",To_authenticate_pick_a_secret_:"Um deinen Kontakt zu authentifizieren, wähle ein Geheimnis welches nur deinem Kontakt und dir bekannt ist.",Compare:"Vergleiche",Fingerprints:"Fingerprints",Authentication:"Authentifizierung",Message:"Nachricht",Add_buddy:"Kontakt hinzufügen",rename_buddy:"Kontakt umbenennen",delete_buddy:"Kontakt löschen",Login:"Anmeldung",Username:"Benutzername",Password:"Passwort",Cancel:"Abbrechen",Connect:"Verbinden",Type_in_the_full_username_:"Gib bitte den vollen Benutzernamen und optional ein Alias an.",Alias:"Alias",Add:"Hinzufügen",Subscription_request:"Kontaktanfrage",You_have_a_request_from:"Du hast eine Anfrage von",Deny:"Ablehnen",Approve:"Bestätigen",Remove_buddy:"Kontakt entfernen",You_are_about_to_remove_:"Du bist gerade dabei {{bid_name}} (<b>{{bid_jid}}</b>) von deiner Kontaktliste zu entfernen. Alle Chats werden geschlossen.",Continue_without_chat:"Weiter ohne Chat",Please_wait:"Bitte warten",Login_failed:"Chat-Anmeldung fehlgeschlagen",Sorry_we_cant_authentikate_:"Der Chatserver hat die Anmeldung abgelehnt. Falsches Passwort?",Retry:"Zurück",clear_history:"Lösche Verlauf",New_message_from:"Neue Nachricht von __name__",Should_we_notify_you_:"Sollen wir dich in Zukunft über eingehende Nachrichten informieren, auch wenn dieser Tab nicht im Vordergrund ist?",Please_accept_:'Bitte klick auf den "Zulassen" Button oben.',Hide_offline:"Offline ausblenden",Show_offline:"Offline einblenden",About:"Über",dnd:"Beschäftigt",Mute:"Ton aus",Unmute:"Ton an",Subscription:"Bezug",both:"beidseitig",Status:"Status",online:"online",chat:"chat",away:"abwesend",xa:"länger abwesend",offline:"offline",none:"keine",Unknown_instance_tag:"Unbekannter instance tag.",Not_one_of_our_latest_keys:"Nicht einer unserer letzten Schlüssel.",Received_an_unreadable_encrypted_message:"Eine unlesbare verschlüsselte Nachricht erhalten.",Online:"Online",Chatty:"Gesprächig",Away:"Abwesend",Extended_away:"Länger abwesend",Offline:"Offline",Friendship_request:"Kontaktanfrage",Confirm:"Bestätigen",Dismiss:"Ablehnen",Remove:"Löschen",Online_help:"Online Hilfe",FN:"Name",N:" ",FAMILY:"Familienname",GIVEN:"Vorname",NICKNAME:"Spitzname",URL:"URL",ADR:"Adresse",STREET:"Straße",EXTADD:"Zusätzliche Adresse",LOCALITY:"Ortschaft",REGION:"Region",PCODE:"Postleitzahl",CTRY:"Land",TEL:"Telefon",NUMBER:"Nummer",EMAIL:"E-Mail",USERID:" ",ORG:"Organisation",ORGNAME:"Name",ORGUNIT:"Abteilung",TITLE:"Titel",ROLE:"Rolle",BDAY:"Geburtstag",DESC:"Beschreibung",PHOTO:" ",send_message:"Sende Nachricht",get_info:"Benutzerinformationen",Settings:"Einstellungen",Priority:"Priorität",Save:"Speichern",User_settings:"Benutzereinstellungen",A_fingerprint_:"Ein Fingerabdruck wird dazu benutzt deinen Gesprächspartner zu identifizieren.",is:"ist",Login_options:"Anmeldeoptionen",BOSH_url:"BOSH url",Domain:"Domain",Resource:"Ressource",On_login:"Beim Anmelden",Received_an_unencrypted_message:"Unverschlüsselte Nachricht empfangen",Sorry_your_buddy_doesnt_provide_any_information:"Dein Kontakt stellt leider keine Informationen bereit.",Info_about:"Info über",Authentication_aborted:"Authentifizierung abgebrochen.",Authentication_request_received:"Authentifizierungsanfrage empfangen.",Log_in_without_chat:"Anmelden ohne Chat",has_come_online:"ist online gekommen",Unknown_sender:"Unbekannter Sender",Please_allow_access_to_microphone_and_camera:'Bitte klick auf den "Zulassen" Button oben, um den Zugriff auf Kamera und Mikrofon zu erlauben.',Incoming_call:"Eingehender Anruf",from:"von",Do_you_want_to_accept_the_call_from:"Möchtest Du den Anruf annehmen von",Reject:"Ablehnen",Accept:"Annehmen",hang_up:"Auflegen",snapshot:"Schnappschuss",mute_my_audio:"Mein Ton aus",pause_my_video:"Mein Video pausieren",fullscreen:"Vollbild",Info:"Info",Local_IP:"Lokale IP",Remote_IP:"Remote IP",Local_Fingerprint:"Lokaler Fingerprint",Remote_Fingerprint:"Remote Fingerprint",Video_call_not_possible:"Videoanruf nicht verfügbar. Dein Gesprächspartner unterstützt keine Videotelefonie.",Start_video_call:"Starte Videoanruf",Join_chat:"Gruppe beitreten",Join:"Betreten",Room:"Gruppe",Nickname:"Nickname",left_the_building:"__nickname__ hat die Gruppe verlassen",entered_the_room:"__nickname__ ist der Gruppe beigetreten",is_now_known_as:"__oldNickname__ ist nun unter __newNickname__ bekannt",This_room_is:"Diese Gruppe ist",muc_hidden:{keyword:"versteckt",description:"kann durch die Suche nicht gefunden werden"},muc_membersonly:{keyword:"nur für Mitglieder",description:"du musst auf der Mitgliederliste stehen"},muc_moderated:{keyword:"moderiert",description:'Nur Personen die "Mitspracherecht" haben dürfen Nachrichten senden'},muc_nonanonymous:{keyword:"nicht anonym",description:"deine Jabber ID wird für alle Mitglieder sichtbar sein"},muc_open:{keyword:"offen",description:"jeder darf dieser Gruppe beitreten"},muc_passwordprotected:{keyword:"passwortgeschützt",description:"du benötigst das korrekte Passwort"},muc_persistent:{keyword:"permanent",description:"wird nicht geschlossen, wenn das letzte Mitglied die Gruppe verlässt"},muc_public:{keyword:"öffentlich",description:"kann durch die Suche gefunden werden"},muc_semianonymous:{keyword:"teilweise anonym",description:"deine Jabber ID wird nur für die Gruppen Administratoren sichtbar sein"},muc_temporary:{keyword:"temporär",description:"wird geschlossen, wenn das letzte Mitglied die Gruppe verlässt"},muc_unmoderated:{keyword:"nicht moderiert",description:"jeder darf Nachrichten senden"},muc_unsecured:{keyword:"ungesichert",description:"es wird kein Passwort benötigt"},Continue:"Weiter",Server:"Server",Rooms_are_loaded:"Gruppen werden geladen",Could_load_only:"Es konnten nur __count__ Gruppen für die Autovervollständigung geladen werden",muc_explanation:"Bitte trage den Gruppennamen und optional ein Nickname und Passwort ein um einer Gruppe beizutreten",You_already_joined_this_room:"Du bist dieser Gruppe bereits beigetreten",This_room_will_be_closed:"Diese Gruppe wird geschlossen",Room_not_found_:"Es wird eine neue Gruppe erstellt",Loading_room_information:"Informationen über Gruppe werden geladen",Destroy:"Auflösen",Leave:"Verlassen",changed_subject_to:"__nickname__ hat das Thema auf __subject__ geändert",muc_removed_kicked:"Du wurdest aus der Gruppe entfernt",muc_removed_info_kicked:"__nickname__ wurde aus der Gruppe entfernt",muc_removed_banned:"Du wurdest aus der Gruppe ausgeschlossen",muc_removed_info_banned:"__nickname__ wurde aus der Gruppe ausgeschlossen",muc_removed_affiliation:"Du wurdest aus der Gruppe entfernt wegen einer Änderung deines Mitgliedstatus",muc_removed_info_affiliation:"__nickname__ wurde aus der Gruppe entfernt wegen einer Änderung seines Mitgliedstatus",muc_removed_membersonly:"Diese Gruppe erlaubt jetzt nur noch eingetragene Mitglieder und da du nicht dazugehörst, wurdest du aus der Gruppen entfernt",muc_removed_info_membersonly:"Diese Gruppe erlaubt jetzt nur noch eingetragene Mitglieder und __nickname__ gehört nicht dazu, daher wurde er aus der Gruppe entfernt",muc_removed_shutdown:"Du wurdest aus der Gruppe entfernt, da der MUC Server heruntergefahren wird",Reason:"Grund",message_not_send:"Deine Nachricht wurde aufgrund eines Fehlers nicht versandt","message_not_send_item-not-found":"Deine Nachricht wurde nicht versandt, da der Raum nicht mehr existiert",message_not_send_forbidden:'Deine Nachricht wurde nicht versandt, da du kein "Mitspracherecht" hast',"message_not_send_not-acceptable":"Deine Nachricht wurde nicht versandt, da du kein Mitglied dieser Gruppe bist",This_room_has_been_closed:"Diese Gruppe wurde geschlossen",Room_logging_is_enabled:"Gesprächsverlauf kann öffentlich einsehbar sein",A_password_is_required:"Es wird ein Passwort benötigt",You_are_not_on_the_member_list:"Du bist kein eingetragenes Mitglied",You_are_banned_from_this_room:"Du wurdest von dieser Gruppe ausgeschlossen",Your_desired_nickname_:"Dein gewünschter Nickname wird bereits verwendet. Bitte wähle einen anderen.",The_maximum_number_:"Die maximale Anzahl der Mitglieder wurde erreicht.",This_room_is_locked_:"Diese Gruppe ist gesperrt",You_are_not_allowed_to_create_:"Du darfst keine neue Gruppe erstellen",Alert:"Alarm",Call_started:"Anruf gestarted",Call_terminated:"Anruf beendet",Carbon_copy:null,Enable:"Aktivieren",jingle_reason_busy:"beschäftigt",jingle_reason_decline:"abgelehnt",jingle_reason_success:"aufgelegt",Media_failure:"Gerätefehler",No_local_audio_device:"Kein eigenes Audio Gerät",No_local_video_device:"Keine eigene Webcam",Ok:"Ok",PermissionDeniedError:"Du oder dein Browser haben die Audio/Video Berechtigung verweigert",Use_local_audio_device:"Nutze eigenes Audio Gerät",Use_local_video_device:"Benutze eigene Webcam",is_:"ist __status__",You_received_a_message_from_an_unknown_sender_:"Du hast eine Nachricht von einem unbekannten Sender erhalten (__sender__) Möchtest du sie sehen?",Your_roster_is_empty_add_:"Deine Kontaktliste ist leer, füge einen neuen Kontakt <a>hinzu</a>",onsmp_explanation_question:"Dein Kontakt versucht herauszufinden ob er wirklich mit dir redet. Um dich gegenüber deinem Kontakt zu verifizieren gib die Antwort ein und klick auf Antworten.",onsmp_explanation_secret:"Dein Kontakt versucht herauszufinden ob er wirklich mit dir redet. Um dich gegenüber deinem Kontakt zu verifizieren gib das Geheimnis ein.",from_sender:"von __sender__",Verified_private_conversation_started:"Verifiziert Private Konversation gestartet.",Unverified_private_conversation_started:"Unverifiziert Private Konversation gestartet."}},el:{translation:{Logging_in:null,your_connection_is_unencrypted:null,your_connection_is_encrypted:null,your_buddy_closed_the_private_connection:null,start_private:null,close_private:null,your_buddy_is_verificated:null,you_have_only_a_subscription_in_one_way:null,authentication_query_sent:null,your_message_wasnt_send_please_end_your_private_conversation:null,unencrypted_message_received:null,not_available:null,no_connection:null,relogin:null,trying_to_start_private_conversation:null,Verified:null,Unverified:null,private_conversation_aborted:null,your_buddy_closed_the_private_conversation_you_should_do_the_same:null,conversation_is_now_verified:null,authentication_failed:null,Creating_your_private_key_:null,Authenticating_a_buddy_helps_:null,How_do_you_want_to_authenticate_your_buddy:null,Select_method:null,Manual:null,Question:null,Secret:null,To_verify_the_fingerprint_:null,Your_fingerprint:null,Buddy_fingerprint:null,Close:null,Compared:null,To_authenticate_using_a_question_:null,Ask:null,To_authenticate_pick_a_secret_:null,Compare:null,Fingerprints:null,Authentication:null,Message:null,Add_buddy:null,rename_buddy:null,delete_buddy:null,Login:null,Username:null,Password:null,Cancel:null,Connect:null,Type_in_the_full_username_:null,Alias:null,Add:null,Subscription_request:null,You_have_a_request_from:null,Deny:null,Approve:null,Remove_buddy:null,You_are_about_to_remove_:null,Continue_without_chat:null,Please_wait:null,Login_failed:null,Sorry_we_cant_authentikate_:null,Retry:null,clear_history:null,New_message_from:null,Should_we_notify_you_:null,Please_accept_:null,Hide_offline:null,Show_offline:null,About:null,dnd:null,Mute:null,Unmute:null,Subscription:null,both:null,Status:null,online:null,chat:null,away:null,xa:null,offline:null,none:null,Unknown_instance_tag:null,Not_one_of_our_latest_keys:null,Received_an_unreadable_encrypted_message:null,Online:null,Chatty:null,Away:null,Extended_away:null,Offline:null,Friendship_request:null,Confirm:null,Dismiss:null,Remove:null,Online_help:null,FN:null,N:null,FAMILY:null,GIVEN:null,NICKNAME:null,URL:null,ADR:null,STREET:null,EXTADD:null,LOCALITY:null,REGION:null,PCODE:null,CTRY:null,TEL:null,NUMBER:null,EMAIL:null,USERID:null,ORG:null,ORGNAME:null,ORGUNIT:null,TITLE:null,ROLE:null,BDAY:null,DESC:null,PHOTO:null,send_message:null,get_info:null,Settings:null,Priority:null,Save:null,User_settings:null,A_fingerprint_:null,is:null,Login_options:null,BOSH_url:null,Domain:null,Resource:null,On_login:null,Received_an_unencrypted_message:null,Sorry_your_buddy_doesnt_provide_any_information:null,Info_about:null,Authentication_aborted:null,Authentication_request_received:null,Log_in_without_chat:null,has_come_online:null,Unknown_sender:null,Please_allow_access_to_microphone_and_camera:null,Incoming_call:null,from:null,Do_you_want_to_accept_the_call_from:null,Reject:null,Accept:null,hang_up:null,snapshot:null,mute_my_audio:null,pause_my_video:null,fullscreen:null,Info:null,Local_IP:null,Remote_IP:null,Local_Fingerprint:null,Remote_Fingerprint:null,Video_call_not_possible:null,Start_video_call:null,Join_chat:null,Join:null,Room:null,Nickname:null,left_the_building:null,entered_the_room:null,is_now_known_as:null,This_room_is:null,muc_hidden:{keyword:null,description:null},muc_membersonly:{keyword:null,description:null},muc_moderated:{keyword:null,description:null},muc_nonanonymous:{keyword:null,description:null},muc_open:{keyword:null,description:null},muc_passwordprotected:{keyword:null,description:null},muc_persistent:{keyword:null,description:null},muc_public:{keyword:null,description:null},muc_semianonymous:{keyword:null,description:null},muc_temporary:{keyword:null,description:null},muc_unmoderated:{keyword:null,description:null},muc_unsecured:{keyword:null,description:null},Continue:null,Server:null,Rooms_are_loaded:null,Could_load_only:null,muc_explanation:null,You_already_joined_this_room:null,This_room_will_be_closed:null,Room_not_found_:null,Loading_room_information:null,Destroy:null,Leave:null,changed_subject_to:null,muc_removed_kicked:null,muc_removed_info_kicked:null,muc_removed_banned:null,muc_removed_info_banned:null,muc_removed_affiliation:null,muc_removed_info_affiliation:null,muc_removed_membersonly:null,muc_removed_info_membersonly:null,muc_removed_shutdown:null,Reason:null,message_not_send:null,"message_not_send_item-not-found":null,message_not_send_forbidden:null,"message_not_send_not-acceptable":null,This_room_has_been_closed:null,Room_logging_is_enabled:null,A_password_is_required:null,You_are_not_on_the_member_list:null,You_are_banned_from_this_room:null,Your_desired_nickname_:null,The_maximum_number_:null,This_room_is_locked_:null,You_are_not_allowed_to_create_:null,Alert:null,Call_started:null,Call_terminated:null,Carbon_copy:null,Enable:null,jingle_reason_busy:null,jingle_reason_decline:null,jingle_reason_success:null,Media_failure:null,No_local_audio_device:null,No_local_video_device:null,Ok:null,PermissionDeniedError:null,Use_local_audio_device:null,Use_local_video_device:null,is_:null,You_received_a_message_from_an_unknown_sender_:null,Your_roster_is_empty_add_:null,onsmp_explanation_question:null,onsmp_explanation_secret:null,from_sender:null,Verified_private_conversation_started:null,Unverified_private_conversation_started:null}},en:{translation:{Logging_in:"Logging in…",your_connection_is_unencrypted:"Your connection is unencrypted.",your_connection_is_encrypted:"Your connection is encrypted.",your_buddy_closed_the_private_connection:"Your contact closed the private connection.",start_private:"Start private",close_private:"Close private",your_buddy_is_verificated:"Your contact is verified.",you_have_only_a_subscription_in_one_way:"You only have a one-way subscription.",authentication_query_sent:"Authentication query sent.",your_message_wasnt_send_please_end_your_private_conversation:"Your message was not sent. Please end your private conversation.",unencrypted_message_received:"Unencrypted message received",not_available:"Not available",no_connection:"No connection!",relogin:"relogin",trying_to_start_private_conversation:"Trying to start private conversation!",Verified:"Verified",Unverified:"Unverified",private_conversation_aborted:"Private conversation aborted!",your_buddy_closed_the_private_conversation_you_should_do_the_same:"Your contact closed the private conversation! You should do the same.",conversation_is_now_verified:"Conversation is now verified.",authentication_failed:"Authentication failed.",Creating_your_private_key_:"Creating your private key; this may take a while.",Authenticating_a_buddy_helps_:"Authenticating a contact helps ensure that the person you are talking to is really the one they claim to be.",How_do_you_want_to_authenticate_your_buddy:"How do you want to authenticate {{bid_name}} (<b>{{bid_jid}}</b>)?",Select_method:"Select method...",Manual:"Manual",Question:"Question",Secret:"Secret",To_verify_the_fingerprint_:"To verify the fingerprint, contact your contact via some other trustworthy channel, such as the telephone.",Your_fingerprint:"Your fingerprint",Buddy_fingerprint:"Contact fingerprint",Close:"Close",Compared:"Compared",To_authenticate_using_a_question_:"To authenticate using a question, pick a question whose answer is known only you and your contact.",Ask:"Ask",To_authenticate_pick_a_secret_:"To authenticate, pick a secret known only to you and your contact.",Compare:"Compare",Fingerprints:"Fingerprints",Authentication:"Authentication",Message:"Message",Add_buddy:"Add contact",rename_buddy:"rename contact",delete_buddy:"delete contact",Login:"Login",Username:"Username",Password:"Password",Cancel:"Cancel",Connect:"Connect",Type_in_the_full_username_:"Type in the full username and an optional alias.",Alias:"Alias",Add:"Add",Subscription_request:"Subscription request",You_have_a_request_from:"You have a request from",Deny:"Deny",Approve:"Approve",Remove_buddy:"Remove contact",You_are_about_to_remove_:"You are about to remove {{bid_name}} (<b>{{bid_jid}}</b>) from your contact list. All related chats will be closed.",Continue_without_chat:"Continue without chat",Please_wait:"Please wait",Login_failed:"Chat login failed",Sorry_we_cant_authentikate_:"Authentication failed with the chat server. Maybe the password is wrong?",Retry:"Back",clear_history:"Clear history",New_message_from:"New message from __name__",Should_we_notify_you_:"Should we notify you about new messages in the future?",Please_accept_:'Please click the "Allow" button at the top.',Hide_offline:"Hide offline contacts",Show_offline:"Show offline contacts",About:"About",dnd:"Do Not Disturb",Mute:"Mute",Unmute:"Unmute",Subscription:"Subscription",both:"both",Status:"Status",online:"online",chat:"chat",away:"away",xa:"extended away",offline:"offline",none:"none",Unknown_instance_tag:"Unknown instance tag.",Not_one_of_our_latest_keys:"Not one of our latest keys.",Received_an_unreadable_encrypted_message:"Received an unreadable encrypted message.",Online:"Online",Chatty:"Chatty",Away:"Away",Extended_away:"Extended away",Offline:"Offline",Friendship_request:"Contact request",Confirm:"Confirm",Dismiss:"Dismiss",Remove:"Remove",Online_help:"Online help",FN:"Full name",N:" ",FAMILY:"Family name",GIVEN:"Given name",NICKNAME:"Nickname",URL:"URL",ADR:"Address",STREET:"Street Address",EXTADD:"Extended Address",LOCALITY:"Locality",REGION:"Region",PCODE:"Postal Code",CTRY:"Country",TEL:"Telephone",NUMBER:"Number",EMAIL:"Email",USERID:" ",ORG:"Organization",ORGNAME:"Name",ORGUNIT:"Unit",TITLE:"Job title",ROLE:"Role",BDAY:"Birthday",DESC:"Description",PHOTO:" ",send_message:"Send message",get_info:"Show information",Settings:"Settings",Priority:"Priority",Save:"Save",User_settings:"User settings",A_fingerprint_:"A fingerprint is used to make sure that the person you are talking to is who he or she is saying.",is:"is",Login_options:"Login options",BOSH_url:"BOSH URL",Domain:"Domain",Resource:"Resource",On_login:"On login",Received_an_unencrypted_message:"Received an unencrypted message",Sorry_your_buddy_doesnt_provide_any_information:"Sorry, your contact does not provide any information.",Info_about:"Info about",Authentication_aborted:"Authentication aborted.",Authentication_request_received:"Authentication request received.",Log_in_without_chat:"Log in without chat",has_come_online:"has come online",Unknown_sender:"Unknown sender",Please_allow_access_to_microphone_and_camera:'Please click the "Allow" button at the top, to allow access to microphone and camera.',Incoming_call:"Incoming call",from:"from",Do_you_want_to_accept_the_call_from:"Do you want to accept the call from",Reject:"Reject",Accept:"Accept",hang_up:"hang up",snapshot:"snapshot",mute_my_audio:"mute my audio",pause_my_video:"pause my video",fullscreen:"fullscreen",Info:"Info",Local_IP:"Local IP",Remote_IP:"Remote IP",Local_Fingerprint:"Local fingerprint",Remote_Fingerprint:"Remote fingerprint",Video_call_not_possible:"Video call not possible. Your contact does not support video calls.",Start_video_call:"Start video call",Join_chat:"Join chat",Join:"Join",Room:"Room",Nickname:"Nickname",left_the_building:"__nickname__ left the building",entered_the_room:"__nickname__ entered the room",is_now_known_as:"__oldNickname__ is now known as __newNickname__",This_room_is:"This room is",muc_hidden:{keyword:"hidden",description:"can not be found through search"},muc_membersonly:{keyword:"members-only",description:"you need to be on the member list"},muc_moderated:{keyword:"moderated",description:'only persons with "voice" are allowed to send messages'},muc_nonanonymous:{keyword:"non-anonymous",description:"your jabber id is exposed to all other occupants"},muc_open:{keyword:"open",description:"everyone is allowed to join"},muc_passwordprotected:{keyword:"password-protected",description:"you need to provide the correct password"},muc_persistent:{keyword:"persistent",description:"will not be destroyed if the last occupant left"},muc_public:{keyword:"public",description:"can be found through search"},muc_semianonymous:{keyword:"semi-anonymous",description:"your jabber id is only exposed to room admins"},muc_temporary:{keyword:"temporary",description:"will be destroyed if the last occupant left"},muc_unmoderated:{keyword:"unmoderated",description:"everyone is allowed to send messages"},muc_unsecured:{keyword:"unsecured",description:"you need no password to enter"},Continue:"Continue",Server:"Server",Rooms_are_loaded:"Rooms are loaded",Could_load_only:"Could load only __count__ rooms for autocomplete",muc_explanation:"Please enter room name and optional a nickname and password to join a chat",You_already_joined_this_room:"You already joined this room",This_room_will_be_closed:"This room will be closed",Room_not_found_:"A new room will be created",Loading_room_information:"Loading room information",Destroy:"Destroy",Leave:"Leave",changed_subject_to:'__nickname__ changed the room subject to "__subject__"',muc_removed_kicked:"You have been kicked from the room",muc_removed_info_kicked:"__nickname__ has been kicked from the room",muc_removed_banned:"You have been banned from the room",muc_removed_info_banned:"__nickname__ has been banned from the room",muc_removed_affiliation:"You have been removed from the room, because of an affiliation change",muc_removed_info_affiliation:"__nickname__ has been removed from the room, because of an affiliation change",muc_removed_membersonly:"You have been removed from the room, because the room has been changed to members-only and you are no member",muc_removed_info_membersonly:"__nickname__ has been removed from the room, because the room has been changed to members-only and you are no member",muc_removed_shutdown:"You have been removed from the room, because the MUC service is being shut down",Reason:"Reason",message_not_send:"Your message was not send because of an error","message_not_send_item-not-found":"Your message was not send because this room does not exist",message_not_send_forbidden:"Your message was not send because you have no voice in this room","message_not_send_not-acceptable":"Your message was not send because you are no occupant of this room",This_room_has_been_closed:"This room has been closed",Room_logging_is_enabled:"Room logging is enabled",A_password_is_required:"A password is required",You_are_not_on_the_member_list:"You are not on the member list",You_are_banned_from_this_room:"You are banned from this room",Your_desired_nickname_:"Your desired nickname is already in use. Please choose another",The_maximum_number_:"The maximum number of user is reached in this room",This_room_is_locked_:"This room is locked",You_are_not_allowed_to_create_:"You are not allowed to create a room",Alert:"Alert",Call_started:"Call started",Call_terminated:"Call terminated",Carbon_copy:"Carbon copy",Enable:"Enable",jingle_reason_busy:"busy",jingle_reason_decline:"decline",jingle_reason_success:"hung up",Media_failure:"Media failure",No_local_audio_device:"No local audio device.",No_local_video_device:"No local video device.",Ok:"Ok",PermissionDeniedError:"You or your browser denied audio/video permission",Use_local_audio_device:"Use local audio device.",Use_local_video_device:"Use local video device.",is_:"is __status__",You_received_a_message_from_an_unknown_sender_:"You received a message from an unknown sender (__sender__) Do you want to display them?",Your_roster_is_empty_add_:"Your roster is empty, add a <a>new contact</a>",onsmp_explanation_question:"You contact is attempting to determine if they are really talking to you. To authenticate to your contact, enter the answer and click Answer.",onsmp_explanation_secret:"You contact is attempting to determine if they are really talking to you. To authenticate to your contact, enter the secret.",from_sender:"from __sender__",Verified_private_conversation_started:"Verified Private conversation started.",Unverified_private_conversation_started:"Unverified Private conversation started.",Bookmark:"Bookmark","Auto-join":"Auto-join",Edit_bookmark:"Edit bookmark",Room_logging_is_disabled:"Room logging is disabled","Room_is_now_non-anoymous":"Room is now non-anonymous","Room_is_now_semi-anonymous":"Room is now semi-anonymous",Do_you_want_to_change_the_default_room_configuration:"Do you want to change the default room configuration?",Default:"Default",Change:"Change"}},es:{translation:{Logging_in:"Por favor, espere...",your_connection_is_unencrypted:"Su conexión no está cifrada.",your_connection_is_encrypted:"Su conexión está cifrada.",your_buddy_closed_the_private_connection:"Su amigo ha cerrado la conexión privada.",start_private:"Iniciar privado",close_private:"Cerrar privado",your_buddy_is_verificated:"Tu amigo está verificado.",you_have_only_a_subscription_in_one_way:"Sólo tienes una suscripción de un modo.",authentication_query_sent:"Consulta de verificación enviada.",your_message_wasnt_send_please_end_your_private_conversation:"Su mensaje no fue enviado. Por favor, termine su conversación privada.",unencrypted_message_received:"Mensaje no cifrado recibido:",not_available:"No disponible",no_connection:"Sin conexión!",relogin:"iniciar sesión nuevamente",trying_to_start_private_conversation:"Intentando iniciar una conversación privada!",Verified:"Verificado",Unverified:"No verificado",private_conversation_aborted:"Conversación privada abortada!",your_buddy_closed_the_private_conversation_you_should_do_the_same:"Su amigo cerró la conversación privada! Usted debería hacer lo mismo.",conversation_is_now_verified:"La conversación es ahora verificada.",authentication_failed:"Fallo la verificación.",Creating_your_private_key_:"Ahora vamos a crear su clave privada. Esto puede tomar algún tiempo.",Authenticating_a_buddy_helps_:"Autenticación de un amigo ayuda a garantizar que la persona que está hablando es quien él o ella está diciendo.",How_do_you_want_to_authenticate_your_buddy:"¿Cómo desea autenticar {{bid_name}} (<b>{{bid_jid}}</b>)?",Select_method:"Escoja un método...",Manual:"Manual",Question:"Pregunta",Secret:"Secreto",To_verify_the_fingerprint_:"Para verificar la firma digital, póngase en contacto con su amigo a través de algún otro canal autenticado, como el teléfono.",Your_fingerprint:"Tu firma digital",Buddy_fingerprint:"firma digital de tu amigo",Close:"Cerrar",Compared:"Comparado",To_authenticate_using_a_question_:"Para autenticar mediante una pregunta, elegir una pregunta cuya respuesta se conoce sólo usted y su amigo.",Ask:"Preguntar",To_authenticate_pick_a_secret_:"Para autenticar, elija un secreto conocido sólo por usted y su amigo.",Compare:"Comparar",Fingerprints:"Firmas digitales",Authentication:"Autenticación",Message:"Mensaje",Add_buddy:"Añadir amigo",rename_buddy:"renombrar amigo",delete_buddy:"eliminar amigo",Login:"Iniciar Sesión",Username:"Usuario",Password:"Contraseña",Cancel:"Cancelar",Connect:"Conectar",Type_in_the_full_username_:"Escriba el usuario completo y un alias opcional.",Alias:"Alias",Add:"Añadir",Subscription_request:"Solicitud de suscripción",You_have_a_request_from:"Tienes una petición de",Deny:"Rechazar",Approve:"Aprobar",Remove_buddy:"Eliminar amigo",You_are_about_to_remove_:"Vas a eliminar a {{bid_name}} (<b>{{bid_jid}}</b>) de tu lista de amigos. Todas las conversaciones relacionadas serán cerradas.",Continue_without_chat:"Continuar",Please_wait:"Espere por favor",Login_failed:"Fallo el inicio de sesión",Sorry_we_cant_authentikate_:"Lo sentimos, no podemos autentificarlo en nuestro servidor de chat. ¿Tal vez la contraseña es incorrecta?",Retry:"Reintentar",clear_history:"Borrar el historial",New_message_from:"Nuevo mensaje de __name__",Should_we_notify_you_:"¿Debemos notificarle sobre nuevos mensajes en el futuro?",Please_accept_:'Por favor, haga clic en el botón "Permitir" en la parte superior.',Hide_offline:"Ocultar contactos desconectados",Show_offline:"Mostrar contactos desconectados",About:"Acerca de",dnd:"No Molestar",Mute:"Desactivar sonido",Unmute:"Activar sonido",Subscription:"Suscripción",both:"ambos",Status:"Estado",online:"en línea",chat:"chat",away:"ausente",xa:"mas ausente",offline:"desconectado",none:"nadie",Unknown_instance_tag:"Etiqueta de instancia desconocida.",Not_one_of_our_latest_keys:"No de nuestra ultima tecla.",Received_an_unreadable_encrypted_message:"Se recibió un mensaje cifrado ilegible.",Online:"En linea",Chatty:"Hablador",Away:"Ausente",Extended_away:"Mas ausente",Offline:"Desconectado",Friendship_request:"Solicitud de amistad",Confirm:"Confirmar",Dismiss:"Rechazar",Remove:"Eliminar",Online_help:"Ayuda en línea",FN:"Nombre completo ",N:" ",FAMILY:"Apellido",GIVEN:"Nombre",NICKNAME:"Apodar",URL:"URL",ADR:"Dirección",STREET:"Calle",EXTADD:"Extendido dirección",LOCALITY:"Población",REGION:"Región",PCODE:"Código postal",CTRY:"País",TEL:"Teléfono",NUMBER:"Número",EMAIL:"Emilio",USERID:" ",ORG:"Organización",ORGNAME:"Nombre",ORGUNIT:"Departamento",TITLE:"Título",ROLE:"Rol",BDAY:"Cumpleaños",DESC:"Descripción",PHOTO:" ",send_message:"mandar un texto",get_info:"obtener información",Settings:"Ajustes",Priority:"Prioridad",Save:"Guardar",User_settings:"Configuración de usuario",A_fingerprint_:"La huella digital se utiliza para que puedas estar seguro que la persona con la que estas hablando es quien realmente dice ser",is:"es",Login_options:"Opciones de login",BOSH_url:"BOSH url",Domain:"Dominio",Resource:"Recurso",On_login:"Iniciar sesión",Received_an_unencrypted_message:"Recibe un mensaje no cifrado",Sorry_your_buddy_doesnt_provide_any_information:"Lo sentimos, su amigo no provee ninguna información.",Info_about:"Info acerca de",Authentication_aborted:"Autenticación abortada",Authentication_request_received:"Pedido de autenticación recibido.",Log_in_without_chat:"Ingresar sin chat",has_come_online:"se ha conectado",Unknown_sender:"Remitente desconocido",Please_allow_access_to_microphone_and_camera:"Por favor, permitir el acceso al micrófono y la cámara.",Incoming_call:"Llamada entrante",from:"de",Do_you_want_to_accept_the_call_from:"Desea aceptar la llamada de",Reject:"Rechazar",Accept:"Aceptar",hang_up:"colgar",snapshot:"instantánea",mute_my_audio:"silenciar mi audio",pause_my_video:"pausar mi vídeo",fullscreen:"pantalla completa",Info:"Info",Local_IP:"IP local",Remote_IP:"IP remota",Local_Fingerprint:"Firma digital local",Remote_Fingerprint:"Firma digital remota",Video_call_not_possible:"Llamada de vídeo no es posible",Start_video_call:"Iniciar llamada de vídeo",Join_chat:null,Join:null,Room:null,Nickname:null,left_the_building:null,entered_the_room:null,is_now_known_as:null,This_room_is:null,muc_hidden:{keyword:null,description:null},muc_membersonly:{keyword:null,description:null},muc_moderated:{keyword:null,description:null},muc_nonanonymous:{keyword:null,description:null},muc_open:{keyword:null,description:null},muc_passwordprotected:{keyword:null,description:null},muc_persistent:{keyword:null,description:null},muc_public:{keyword:null,description:null},muc_semianonymous:{keyword:null,description:null},muc_temporary:{keyword:null,description:null},muc_unmoderated:{keyword:null,description:null},muc_unsecured:{keyword:null,description:null},Continue:null,Server:null,Rooms_are_loaded:null,Could_load_only:null,muc_explanation:null,You_already_joined_this_room:null,This_room_will_be_closed:null,Room_not_found_:null,Loading_room_information:null,Destroy:null,Leave:null,changed_subject_to:null,muc_removed_kicked:null,muc_removed_info_kicked:null,muc_removed_banned:null,muc_removed_info_banned:null,muc_removed_affiliation:null,muc_removed_info_affiliation:null,muc_removed_membersonly:null,muc_removed_info_membersonly:null,muc_removed_shutdown:null,Reason:null,message_not_send:null,"message_not_send_item-not-found":null,message_not_send_forbidden:null,"message_not_send_not-acceptable":null,This_room_has_been_closed:null,Room_logging_is_enabled:null,A_password_is_required:null,You_are_not_on_the_member_list:null,You_are_banned_from_this_room:null,Your_desired_nickname_:null,The_maximum_number_:null,This_room_is_locked_:null,You_are_not_allowed_to_create_:null,Alert:null,Call_started:null,Call_terminated:null,Carbon_copy:null,Enable:"Activar",jingle_reason_busy:null,jingle_reason_decline:null,jingle_reason_success:null,Media_failure:null,No_local_audio_device:null,No_local_video_device:null,Ok:null,PermissionDeniedError:null,Use_local_audio_device:null,Use_local_video_device:null,is_:"es __status__",You_received_a_message_from_an_unknown_sender_:"Ha recibido un mensaje de un remitente desconocido (__sender__) ¿Quiere mostrarlos?",Your_roster_is_empty_add_:"Tu lista de amigos esta vacia <a>Nuevo amigo</a>",onsmp_explanation_question:"Tu amigo está tratando de determinar si él o ella está realmente hablando con usted. Para autenticar a su amigo, introduce la respuesta y haga clic en Contestar.",onsmp_explanation_secret:"Tu amigo está tratando de determinar si él o ella está realmente hablando con usted. Para autenticar a su amigo, especifique el secreto.",from_sender:"de __sender__",Verified_private_conversation_started:"Verificado se inició una conversación privada.",Unverified_private_conversation_started:"No verificado se inició una conversación privada."}},fr:{translation:{Logging_in:"Connexion...",your_connection_is_unencrypted:"Connexion non chiffrée.",your_connection_is_encrypted:"Connexion chiffrée.",your_buddy_closed_the_private_connection:"Votre ami a fermé la connexion privée.",start_private:"Démarrer une conversation privé",close_private:"Clôturer une conversation privée",your_buddy_is_verificated:"Votre contact est vérifié.",you_have_only_a_subscription_in_one_way:"Vous ne pouvez souscrire qu'une fois.",authentication_query_sent:"Requête d’authentification envoyée.",your_message_wasnt_send_please_end_your_private_conversation:"Votre message n'a pas été envoyé. Veuillez terminer votre conversation privée.",unencrypted_message_received:"Message non chiffré reçu",not_available:"Pas disponible",no_connection:"Pas de connexion !",relogin:"Re-connexion",trying_to_start_private_conversation:"Essai de démarrage d'une conversation privée !",Verified:"Vérifié",Unverified:"Non vérifié",private_conversation_aborted:"Conversation privée interrompue !",your_buddy_closed_the_private_conversation_you_should_do_the_same:"Votre ami a fermé la conversation privée ! Vous devriez faire de même.",conversation_is_now_verified:"La conversation est maintenant vérifiée.",authentication_failed:"L'authentification a échoué.",Creating_your_private_key_:"Création de votre clé privée; cela peut prendre un moment.",Authenticating_a_buddy_helps_:"L'authentification d'un ami permet de s'assurer que la personne à qui vous parlez est vraiment celui qu'il ou elle prétend être.",How_do_you_want_to_authenticate_your_buddy:"Comment voulez-vous vous authentifier {{bid_name}} (<b>{{bid_jid}}</b>)?",Select_method:"Sélection de la méthode...",Manual:"Manuel",Question:"Question",Secret:"Sécurité",To_verify_the_fingerprint_:"Pour vérifier l'empreinte, contactez votre ami via un autre canal digne de confiance, tel que le téléphone.",Your_fingerprint:"Votre empreinte",Buddy_fingerprint:"Empreinte de l'ami",Close:"Fermer",Compared:"Comparé",To_authenticate_using_a_question_:"Pour s'authentifier à l'aide d'une question, choisissez une question dont la réponse n'est connue que vous et de votre ami.",Ask:"Demander",To_authenticate_pick_a_secret_:"Pour vous authentifier, choisissez un secret connu seulement de vous et de votre ami.",Compare:"Comparer",Fingerprints:"Empreintes",Authentication:"Authentification",Message:"Message",Add_buddy:"Ajouter comme ami",rename_buddy:"Renommer l'ami",delete_buddy:"Supprimer l'ami",Login:"Connexion",Username:"Nom d'utilisateur",Password:"Mot de passe",Cancel:"Annuler",Connect:"Connecter",Type_in_the_full_username_:"Tapez un nom d'utilisateur complet et un alias(optionnel).",Alias:"Alias",Add:"Ajouter",Subscription_request:"Demande d'abonnement",You_have_a_request_from:"Vous avez une requête de ",Deny:"Refuser",Approve:"Approuver",Remove_buddy:"Supprimer l'ami",You_are_about_to_remove_:"Vous allez retirer {{bid_name}} (<b>{{bid_jid}}</b>) de votre liste d'amis. Toutes les fenêtres de chat en lien avec celui-ci seront fermées.",Continue_without_chat:"Continuer sans tchat",Please_wait:"Merci de patienter",Login_failed:"Authentification échouée",Sorry_we_cant_authentikate_:"La connexion avec le serveur de tchat a échoué. Vérifiez le mot de passe.",Retry:"Retour",clear_history:"Effacer l’historique",New_message_from:"Nouveau message de __name__",Should_we_notify_you_:"Dans le futur, devrons-nous vous notifier les nouveaux messages ?",Please_accept_:'Merci de cliquer sur le bouton "autoriser" en haut de page',Hide_offline:"Masquer les contacts non connectés",Show_offline:"Afficher les contacts non connectés",About:"À propos",dnd:"Ne pas déranger",Mute:"Muet",Unmute:"Son actif",Subscription:"Abonnement",both:"Les deux",Status:"Status",online:"En ligne",chat:"tchat",away:"Absent",xa:"Options étendues",offline:"Hors ligne",none:"Aucun",Unknown_instance_tag:"Tag inconnu",Not_one_of_our_latest_keys:"Ce n'est pas l'une des dernières touches",Received_an_unreadable_encrypted_message:"Message chiffré non lisible",Online:"En ligne",Chatty:"tchatty",Away:"Absent",Extended_away:"Options étendues",Offline:"Hors ligne",Friendship_request:"Demande d'amitié",Confirm:"Valider",Dismiss:"Rejeter",Remove:"Supprimer",Online_help:"Aide en ligne",FN:"Nom",N:" N ",FAMILY:"Nom de famille",GIVEN:"prénom",NICKNAME:"Surnom",URL:"URL",ADR:"Adresse",STREET:"Rue",EXTADD:"Adresse (suite)",LOCALITY:"Localité",REGION:"Région",PCODE:"Code Postal",CTRY:"Pays",TEL:"Téléphone",NUMBER:"Numéro",EMAIL:"Courriel",USERID:" USERID ",ORG:"Organisation",ORGNAME:"Nom",ORGUNIT:"Unité",TITLE:"Qualité:",ROLE:"Rôle",BDAY:"Date de naissance",DESC:"Description",PHOTO:"Photo",send_message:"Envoyer le message",get_info:"Montrer les informations",Settings:"Réglages",Priority:"Priorité",Save:"Enregistrer",User_settings:"Paramètres utilisateur",A_fingerprint_:"Une empreinte est utilisée pour s'assurer de l'identité de la personne à qui vous parlez",is:"est",Login_options:"Options d'identification",BOSH_url:"URL BOSH",Domain:"Domaine",Resource:"Ressource",On_login:"Après authentification",Received_an_unencrypted_message:"Reçu un message non chiffré",Sorry_your_buddy_doesnt_provide_any_information:"Désolé, votre ami n'a pas fourni d'informations",Info_about:"A propos de",Authentication_aborted:"Authentification interrompue.",Authentication_request_received:"Requête d'authentification reçue.",Log_in_without_chat:"S'identifier sans tchat",has_come_online:"vient d'arriver",Unknown_sender:"Expéditeur inconnu",Please_allow_access_to_microphone_and_camera:'Veuillez cliquez sur le bouton "Autoriser" en haut, pour permettre l\'accès au micro et à la caméra.',Incoming_call:"Appel entrant",from:"de",Do_you_want_to_accept_the_call_from:"Voulez-vous accepter l'appel de",Reject:"Rejeté",Accept:"Accepté",hang_up:"Décrochez",snapshot:"Capture d’écran",mute_my_audio:"Couper l'audio",pause_my_video:"Mettre ma vidéo en pause",fullscreen:"Plein écran",Info:"Info",Local_IP:"IP locale",Remote_IP:"IP distante",Local_Fingerprint:"Empreinte locale",Remote_Fingerprint:"Empreinte distante",Video_call_not_possible:"L'appel vidéo n'est possible. Votre ami ne supporte pas les appels vidéo.",Start_video_call:"Démarrer l'appel vidéo",Join_chat:"Joindre la discution",Join:"Joindre",Room:"Salon",Nickname:"Surnom",left_the_building:"__nickname__ a quitté l'immeuble",entered_the_room:"__nickname__ entre dans le salon",is_now_known_as:null,This_room_is:"Ce salon est",muc_hidden:{keyword:"caché",description:null},muc_membersonly:{keyword:"pour les membres seulement",description:"Vous devez être sur la liste des membres"},muc_moderated:{keyword:"modéré",description:'Seulement les personnes avec la "voix" sont autorisés à envoyer des messages'},muc_nonanonymous:{keyword:"non anonyme",description:"Votre identifiant Jabber est visible de tous les autres occupants"},muc_open:{keyword:"ouvert",description:"Tout le monde est autorisé à se connecter"},muc_passwordprotected:{keyword:"protégé par un mot de passe",description:"Vous devez fournir un mot de passe correct"},muc_persistent:{keyword:"persistent",description:null},muc_public:{keyword:"public",description:null},muc_semianonymous:{keyword:"semi-anonyme",description:"Votre identifiant Jabber est seulement visible aux administrateurs de ce salon"},muc_temporary:{keyword:"temporaire",description:"sera détruit au départ de son dernier occupant"},muc_unmoderated:{keyword:"non modéré",description:"Tout le monde est autorisé à envoyer des messages"},muc_unsecured:{keyword:"non sécurisé",description:"un mot de passe n'est pas nécessaire pour entrer"},Continue:"Continuer",Server:"Serveur",Rooms_are_loaded:"Les salons sont chargés",Could_load_only:null,muc_explanation:"Veuillez saisir le nom du salon, un surnom (optionnel) et un mot de passe pour joindre la conversation",You_already_joined_this_room:"Vous avez déjà rejoins ce salon",This_room_will_be_closed:"Ce salon va être fermé",Room_not_found_:"Un nouveau salon va être créé",Loading_room_information:"Chargement des informations du salon",Destroy:"Détruire",Leave:"Quitter",changed_subject_to:'__nickname__ a changé le sujet du salon à "__subject__"',muc_removed_kicked:"Vous avez été éjecté de ce salon",muc_removed_info_kicked:"__nickname__ a été éjecté de ce salon",muc_removed_banned:"Vous avez été banni de ce salon",muc_removed_info_banned:"__nickname__ a été banni de ce salon",muc_removed_affiliation:null,muc_removed_info_affiliation:null,muc_removed_membersonly:null,muc_removed_info_membersonly:null,muc_removed_shutdown:null,Reason:"Raison",message_not_send:null,"message_not_send_item-not-found":null,message_not_send_forbidden:null,"message_not_send_not-acceptable":"Votre message n'a pas été envoyé car il n'y a personne dans ce salon",This_room_has_been_closed:"Ce salon a été fermé",Room_logging_is_enabled:null,A_password_is_required:"Un mot de passe est requis",You_are_not_on_the_member_list:"Vous n'êtes pas sur la liste des membres",You_are_banned_from_this_room:"Vous avez été banni de ce salon",Your_desired_nickname_:"Votre Surnom souhaité est déjà utilisé.Veuillez en choisir un autre",The_maximum_number_:"Le nombre maximum d'utilisateur est atteint dans ce salon",This_room_is_locked_:"Ce salon est vérouillé",You_are_not_allowed_to_create_:"Vous n'êtes pas autorisé à créer un salon",Alert:null,Call_started:null,Call_terminated:null,Carbon_copy:null,Enable:null,jingle_reason_busy:null,jingle_reason_decline:null,jingle_reason_success:null,Media_failure:null,No_local_audio_device:null,No_local_video_device:null,Ok:null,PermissionDeniedError:null,Use_local_audio_device:null,Use_local_video_device:null,is_:"est __status__",You_received_a_message_from_an_unknown_sender_:"Vous avez reçu un message d'un expéditeur inconnu (__sender__) Voulez-vous les afficher ?",Your_roster_is_empty_add_:"Votre liste est vide, ajouter <a>Nouvel ami</a>",onsmp_explanation_question:"Votre ami tente de déterminer si il ou elle parle vraiment à vous. Vous authentifier à votre ami, Saisissez une réponse et cliquer sur Répondre.",onsmp_explanation_secret:"Votre ami tente de déterminer si il ou elle parle vraiment à vous. Vous authentifier à votre ami, Entrez le mot secret",from_sender:"de __sender__",Verified_private_conversation_started:"Vérifié Conversation privé démarrée.",Unverified_private_conversation_started:"Non vérifié Conversation privé démarrée."}},it:{translation:{Logging_in:"login…",your_connection_is_unencrypted:"La sua connessione è non cifrata.",your_connection_is_encrypted:"La sua connessione è cifrata.",your_buddy_closed_the_private_connection:"La sua connessione privata è stato chiuso dal suo compagno.",start_private:"Inizia privata",close_private:"Chiude privata",your_buddy_is_verificated:"Il tuo compagno è stato verificato",you_have_only_a_subscription_in_one_way:"Hai solo una one-way inscrizione.",authentication_query_sent:"Domanda d'autenticità inviata.",your_message_wasnt_send_please_end_your_private_conversation:"Il tuo messaggio non è stato inviato. Si prega di finire la sua conversazione privata.",unencrypted_message_received:"Messaggio non cifrato ricevuto",not_available:"non disponibile",no_connection:"nessun collegamento!",relogin:"nuovo login",trying_to_start_private_conversation:"Cercando di avviare una conversazione privata!",Verified:"verificato",Unverified:"non verificato",private_conversation_aborted:"Conversazione privata abortito!",your_buddy_closed_the_private_conversation_you_should_do_the_same:"Il tuo compagno ha chiuso la conversazione privata! Si dovrebbe fare lo stesso.",conversation_is_now_verified:"Conversazione è ora verificato.",authentication_failed:"autenticazione fallita.",Creating_your_private_key_:"Creare la propria chiave privata; questo potrebbe richiedere un po'.",Authenticating_a_buddy_helps_:"Autenticazione un compagno aiuta a garantire che la persona si sta parlando è davvero quello che lui o lei sostiene di essere.",How_do_you_want_to_authenticate_your_buddy:"Come si desidera autenticare {{bid_name}} (<b>{{bid_jid}}</b>)?",Select_method:"Seleziona metodo ..",Manual:"manuale",Question:"domanda",Secret:"segreto",To_verify_the_fingerprint_:"Per verificare l'impronta digitale, contattare il proprio compagno attraverso qualche altro canale affidabile, come il telefono.",Your_fingerprint:"il tuo impronta digitale",Buddy_fingerprint:"impronta digitale da compagno",Close:"chiude",Compared:"comparato",To_authenticate_using_a_question_:"Per autenticare tramite una questione, scegli una questione la cui risposta è nota solo voi e il tuo compagno",Ask:"chiedi",To_authenticate_pick_a_secret_:"Per autenticare, scegli un segreto noto solo a te e il tuo compagno.",Compare:"Comparare",Fingerprints:"Impronta digitale",Authentication:"Autenticazione",Message:"Messagio",Add_buddy:"Aggiungi un compagno",rename_buddy:"rinomina compagno",delete_buddy:"elimina compagno",Login:"Login",Username:"Identificazione dell'utente",Password:"Password",Cancel:"Cancella",Connect:"Collega",Type_in_the_full_username_:"Digita l'identificazione utente completo e un alias opzionale.",Alias:"Alias",Add:"Aggiungi",Subscription_request:"Rrichiesta di sottoscrizione",You_have_a_request_from:"Hai una richiesta da",Deny:"Refiuta",Approve:"Approva",Remove_buddy:"Rimuova il compagno",You_are_about_to_remove_:"Stai rimovendo {{bid_name}} (<b>{{bid_jid}}</b>) del suo lista di compagni. Tutte le chat appartenente saranno chiuse.",Continue_without_chat:"Continua senza chat",Please_wait:"Si prega d'attendere",Login_failed:"Chat login è fallito",Sorry_we_cant_authentikate_:"Autenticazione non riuscita con il server di chat. Forse la password è sbagliata?",Retry:"Indietro",clear_history:"Cancella la cronologia",New_message_from:"Nuovo messaggio da __name__",Should_we_notify_you_:"Vuoi ricevere una notifica di nuovi messaggi in futuro?",Please_accept_:'Si prega di fare clic sul bottone "Autorizzazione" sopra.',Hide_offline:"Nascondere i contatti non in linea",Show_offline:"Mostra i contatti non in linea",About:"Informazione legale",dnd:"Non disturbare",Mute:"Muto attivo",Unmute:"Muto inattivo",Subscription:"Sottoscrizione",both:"etrambi",Status:"Status",online:"In linea",chat:"chat",away:"via",xa:"via estensivo",offline:"non in linea",none:"nessuno",Unknown_instance_tag:"Instance tag sconosciuta.",Not_one_of_our_latest_keys:"Non è una delle nostre ultime chiavi.",Received_an_unreadable_encrypted_message:"Ricevuto un messaggio crittografato illeggibile.",Online:"In linea",Chatty:"Chiacchierino",Away:"Via",Extended_away:"Via estensivo",Offline:"Non in linea",Friendship_request:"Amicizia richiesto",Confirm:"Conferma",Dismiss:"Rifiuta",Remove:"Rimuovi",Online_help:"Guida in linea",FN:"Nome e cognome",N:null,FAMILY:"Cognome",GIVEN:"Nome",NICKNAME:"Soprannome",URL:"URL",ADR:"Indirizzo",STREET:"Via",EXTADD:"Esteso Indirizzo",LOCALITY:"Località",REGION:"Regione",PCODE:"Codice Postale",CTRY:"Paese",TEL:"Telefono",NUMBER:"Numero",EMAIL:"E-mail",USERID:null,ORG:"Organizzazione",ORGNAME:"Nome",ORGUNIT:"Unità",TITLE:"Titolo di lavoro",ROLE:"Funzione",BDAY:"Compleanno",DESC:"Descrizione",PHOTO:null,send_message:"Messagio inviato",get_info:"Mostra informazioni",Settings:"Impostazione",Priority:"Priorità",Save:"Salva",User_settings:"Impostazione dell'utente",A_fingerprint_:"Una impronta digitale è usato per assicurarsi che la persona con cui stai parlando è lui o lei che sta dicendo.",is:"è",Login_options:"Opzioni di login",BOSH_url:"BOSH URL",Domain:"Domain",Resource:"Risorsa",On_login:"Login on",Received_an_unencrypted_message:"Ricevuto un messaggio non crittografato",Sorry_your_buddy_doesnt_provide_any_information:"Spiace, il tuo compagno non fornisce alcuna informazione.",Info_about:"Informazioni",Authentication_aborted:"Autenticazione interrotta",Authentication_request_received:"Richiesta di autenticazione ricevuto.",Log_in_without_chat:"Log in senza chat",has_come_online:"È venuto in linea",Unknown_sender:"Mittente sconosciuto",Please_allow_access_to_microphone_and_camera:'Si prega di fare clic sul bottone "Autorizzazione" sopra per autorizzazione del l\'accesso al microfono e fotocamera.',Incoming_call:"Chiamata in arrivo",from:"di",Do_you_want_to_accept_the_call_from:"Vuoi accettare la chiamata di",Reject:"Rifiuta",Accept:"Accetta",hang_up:"Riattacca",snapshot:"istantanea",mute_my_audio:"disattiva il mio audio",pause_my_video:"pausa il mio audio",fullscreen:"schermo intero",Info:"Informazione",Local_IP:"IP locale",Remote_IP:"IP remoto",Local_Fingerprint:"Impronta digitale locale",Remote_Fingerprint:"Impronta digitale remoto",Video_call_not_possible:"Videochiamata non è possibile. Il tuo compagno non può effettuare videochiamate.",Start_video_call:"Inizia videochiamata",Join_chat:null,Join:null,Room:null,Nickname:null,left_the_building:null,entered_the_room:null,is_now_known_as:null,This_room_is:null,muc_hidden:{keyword:null,description:null},muc_membersonly:{keyword:null,description:null},muc_moderated:{keyword:null,description:null},muc_nonanonymous:{keyword:null,description:null},muc_open:{keyword:null,description:null},muc_passwordprotected:{keyword:null,description:null},muc_persistent:{keyword:null,description:null},muc_public:{keyword:null,description:null},muc_semianonymous:{keyword:null,description:null},muc_temporary:{keyword:null,description:null},muc_unmoderated:{keyword:null,description:null},muc_unsecured:{keyword:null,description:null},Continue:null,Server:null,Rooms_are_loaded:null,Could_load_only:null,muc_explanation:null,You_already_joined_this_room:null,This_room_will_be_closed:null,Room_not_found_:null,Loading_room_information:null,Destroy:null,Leave:null,changed_subject_to:null,muc_removed_kicked:null,muc_removed_info_kicked:null,muc_removed_banned:null,muc_removed_info_banned:null,muc_removed_affiliation:null,muc_removed_info_affiliation:null,muc_removed_membersonly:null,muc_removed_info_membersonly:null,muc_removed_shutdown:null,Reason:null,message_not_send:null,"message_not_send_item-not-found":null,message_not_send_forbidden:null,"message_not_send_not-acceptable":null,This_room_has_been_closed:null,Room_logging_is_enabled:null,A_password_is_required:null,You_are_not_on_the_member_list:null,You_are_banned_from_this_room:null,Your_desired_nickname_:null,The_maximum_number_:null,This_room_is_locked_:null,You_are_not_allowed_to_create_:null,Alert:null,Call_started:null,Call_terminated:null,Carbon_copy:null,Enable:null,jingle_reason_busy:null,jingle_reason_decline:null,jingle_reason_success:null,Media_failure:null,No_local_audio_device:null,No_local_video_device:null,Ok:null,PermissionDeniedError:null,Use_local_audio_device:null,Use_local_video_device:null,is_:"è __status__",You_received_a_message_from_an_unknown_sender_:"Hai ricevuto un messaggio da un mittente sconosciuto (__sender__) Vuoi che venga visualizzato?",Your_roster_is_empty_add_:"Il suo elenco è vuoto, aggiungi un <a>compagno nuovo</a>",onsmp_explanation_question:"Il tuo compagno sta cercando di determinare se lui o lei sta davvero parlando con te. Per autenticare a il tuo compagno. inserisci la risposta e fare click su risposta.",onsmp_explanation_secret:"Il tuo compagno sta cercando di determinare se lui o lei sta davvero parlando con te. Per autenticare a il tuo compagno. inserire il segreto.",from_sender:"di __sender__",Verified_private_conversation_started:"verificato Conversazione privata iniziato.",Unverified_private_conversation_started:"non verificato Conversazione privata iniziato."}},nds:{translation:{Logging_in:null,your_connection_is_unencrypted:null,your_connection_is_encrypted:null,your_buddy_closed_the_private_connection:null,start_private:null,close_private:null,your_buddy_is_verificated:null,you_have_only_a_subscription_in_one_way:null,authentication_query_sent:null,your_message_wasnt_send_please_end_your_private_conversation:null,unencrypted_message_received:null,not_available:null,no_connection:null,relogin:null,trying_to_start_private_conversation:null,Verified:null,Unverified:null,private_conversation_aborted:null,your_buddy_closed_the_private_conversation_you_should_do_the_same:null,conversation_is_now_verified:null,authentication_failed:null,Creating_your_private_key_:null,Authenticating_a_buddy_helps_:null,How_do_you_want_to_authenticate_your_buddy:null,Select_method:null,Manual:null,Question:null,Secret:null,To_verify_the_fingerprint_:null,Your_fingerprint:null,Buddy_fingerprint:null,Close:null,Compared:null,To_authenticate_using_a_question_:null,Ask:null,To_authenticate_pick_a_secret_:null,Compare:null,Fingerprints:null,Authentication:null,Message:null,Add_buddy:null,rename_buddy:null,delete_buddy:null,Login:null,Username:null,Password:null,Cancel:null,Connect:null,Type_in_the_full_username_:null,Alias:null,Add:null,Subscription_request:null,You_have_a_request_from:null,Deny:null,Approve:null,Remove_buddy:null,You_are_about_to_remove_:null,Continue_without_chat:null,Please_wait:null,Login_failed:null,Sorry_we_cant_authentikate_:null,Retry:null,clear_history:null,New_message_from:null,Should_we_notify_you_:null,Please_accept_:null,Hide_offline:null,Show_offline:null,About:null,dnd:null,Mute:null,Unmute:null,Subscription:null,both:null,Status:null,online:null,chat:null,away:null,xa:null,offline:null,none:null,Unknown_instance_tag:null,Not_one_of_our_latest_keys:null,Received_an_unreadable_encrypted_message:null,Online:null,Chatty:null,Away:null,Extended_away:null,Offline:null,Friendship_request:null,Confirm:null,Dismiss:null,Remove:null,Online_help:null,FN:null,N:null,FAMILY:null,GIVEN:null,NICKNAME:null,URL:null,ADR:null,STREET:null,EXTADD:null,LOCALITY:null,REGION:null,PCODE:null,CTRY:null,TEL:null,NUMBER:null,EMAIL:null,USERID:null,ORG:null,ORGNAME:null,ORGUNIT:null,TITLE:null,ROLE:null,BDAY:null,DESC:null,PHOTO:null,send_message:null,get_info:null,Settings:null,Priority:null,Save:null,User_settings:null,A_fingerprint_:null,is:null,Login_options:null,BOSH_url:null,Domain:null,Resource:null,On_login:null,Received_an_unencrypted_message:null,Sorry_your_buddy_doesnt_provide_any_information:null,Info_about:null,Authentication_aborted:null,Authentication_request_received:null,Log_in_without_chat:null,has_come_online:null,Unknown_sender:null,Please_allow_access_to_microphone_and_camera:null,Incoming_call:null,from:null,Do_you_want_to_accept_the_call_from:null,Reject:null,Accept:null,hang_up:null,snapshot:null,mute_my_audio:null,pause_my_video:null,fullscreen:null,Info:null,Local_IP:null,Remote_IP:null,Local_Fingerprint:null,Remote_Fingerprint:null,Video_call_not_possible:null,Start_video_call:null,Join_chat:null,Join:null,Room:null,Nickname:null,left_the_building:null,entered_the_room:null,is_now_known_as:null,This_room_is:null,muc_hidden:{keyword:null,description:null},muc_membersonly:{keyword:null,description:null},muc_moderated:{keyword:null,description:null},muc_nonanonymous:{keyword:null,description:null},muc_open:{keyword:null,description:null},muc_passwordprotected:{keyword:null,description:null},muc_persistent:{keyword:null,description:null},muc_public:{keyword:null,description:null},muc_semianonymous:{keyword:null,description:null},muc_temporary:{keyword:null,description:null},muc_unmoderated:{keyword:null,description:null},muc_unsecured:{keyword:null,description:null},Continue:null,Server:null,Rooms_are_loaded:null,Could_load_only:null,muc_explanation:null,You_already_joined_this_room:null,This_room_will_be_closed:null,Room_not_found_:null,Loading_room_information:null,Destroy:null,Leave:null,changed_subject_to:null,muc_removed_kicked:null,muc_removed_info_kicked:null,muc_removed_banned:null,muc_removed_info_banned:null,muc_removed_affiliation:null,muc_removed_info_affiliation:null,muc_removed_membersonly:null,muc_removed_info_membersonly:null,muc_removed_shutdown:null,Reason:null,message_not_send:null,"message_not_send_item-not-found":null,message_not_send_forbidden:null,"message_not_send_not-acceptable":null,This_room_has_been_closed:null,Room_logging_is_enabled:null,A_password_is_required:null,You_are_not_on_the_member_list:null,You_are_banned_from_this_room:null,Your_desired_nickname_:null,The_maximum_number_:null,This_room_is_locked_:null,You_are_not_allowed_to_create_:null,Alert:null,Call_started:null,Call_terminated:null,Carbon_copy:null,Enable:null,jingle_reason_busy:null,jingle_reason_decline:null,jingle_reason_success:null,Media_failure:null,No_local_audio_device:null,No_local_video_device:null,Ok:null,PermissionDeniedError:null,Use_local_audio_device:null,Use_local_video_device:null,is_:null,You_received_a_message_from_an_unknown_sender_:null,Your_roster_is_empty_add_:null,onsmp_explanation_question:null,onsmp_explanation_secret:null,from_sender:null,Verified_private_conversation_started:null,Unverified_private_conversation_started:null}},pl:{translation:{Logging_in:"Logowanie...",your_connection_is_unencrypted:"Twoje połączenie nie jest szyfrowane.",your_connection_is_encrypted:"Twoje połączenie jest szyfrowane.",your_buddy_closed_the_private_connection:"Twój rozmówca zamknął połączenie.",start_private:"Rozpocznij rozmowę.",close_private:"Zakończ rozmowę.",your_buddy_is_verificated:"Twój rozmówca został zweryfikowany.",you_have_only_a_subscription_in_one_way:"Masz jednostronną subskrypcję.",authentication_query_sent:"Wysłano proźbę o autentykację.",your_message_wasnt_send_please_end_your_private_conversation:"Twoja wiadomość nie została wysłana. Proszę, zamknij rozmowę.",unencrypted_message_received:"Zwrotna niezaszyfrowana wiadomość.",not_available:"Niedostępny.",no_connection:"Brak połączenia!",relogin:"Połącz ponownie",trying_to_start_private_conversation:"Rozpocznij rozmowę!",Verified:"Zweryfikowano",Unverified:"Niezweryfikowano",private_conversation_aborted:"Anulowano rozmowę!",your_buddy_closed_the_private_conversation_you_should_do_the_same:"Rozmówca przerwał połączenie!",conversation_is_now_verified:"Zweryfikowano połączenie.",authentication_failed:"Weryfikacja się nie powiodła.",Creating_your_private_key_:"Tworzenie klucza prywatnego; może to chwilę potrwać",Authenticating_a_buddy_helps_:"Autoryzacja pomoże w ustaleniu faktycznej tożsamości rozmówcy ;).",How_do_you_want_to_authenticate_your_buddy:"Jakiej autoryzacji chcesz użyć {{bid_name}} (<b>{{bid_jid}}</b>)?",Select_method:"Wybierz sposób...",Manual:"Ręcznie",Question:"Pytanie",Secret:"Hasło",To_verify_the_fingerprint_:"Aby zweryfikować kod najpierw skontaktuj się z rozmówcą np. za pomocą telefonu.",Your_fingerprint:"Twój kod:",Buddy_fingerprint:"Kod rozmówcy",Close:"Zamknij",Compared:"Porównano",To_authenticate_using_a_question_:"Aby autoryzować za pomocą pytania, wybierz pytanie na które tylko Twój rozmówca zna odpowiedź.",Ask:"Zadaj pytanie",To_authenticate_pick_a_secret_:"Aby autoryzować za pomocą hasła, wybierz hasło na które zna tylko Twój rozmówca.",Compare:"Dopasuj",Fingerprints:"Kody autoryzacyjne",Authentication:"Autoryzacja",Message:"Wiadomość",Add_buddy:"Dodaj kontakt",rename_buddy:"Zmień nazwę",delete_buddy:"Usuń kontakt",Login:"Login",Username:"Nazwa Użytkownika",Password:"Hasło",Cancel:"Anuluj",Connect:"Połączenie",Type_in_the_full_username_:"Wpisz pełną nazwę użytkownika (np. <B>imię.nazwisko@zajezdnia.local</B>) oraz jego nazwę wyświetlaną (Alias).",Alias:"Alias",Add:"Dodaj",Subscription_request:"Potwierdzenie subskrypcji",You_have_a_request_from:"Masz potwierdzenie od",Deny:"Odmów",Approve:"Zatwierdź",Remove_buddy:"Usuń rozmówcę",You_are_about_to_remove_:"Twój rozmówca {{bid_name}} (<b>{{bid_jid}}</b>) usunął Cię ze swojej listy kontaktów.",Continue_without_chat:"Kontynuuj bez komunikatora",Please_wait:"Proszę czekać",Login_failed:"Błędne logowanie",Sorry_we_cant_authentikate_:"Błędna autoryzacja z serwerem. Może hasło jest nieprawidłowe?",Retry:"Powrót",clear_history:"Wyczyść historię",New_message_from:"Nowa wiadomość od __name__",Should_we_notify_you_:"Czy chcesz otrzymywać powiadomienia o nowych wiadomościach w przyszłości?",Please_accept_:'Kliknij "Zezwól" na górze.',Hide_offline:"Schowaj niedostępne kontakty",Show_offline:"Pokaż niedostępne kontakty",About:"Info",dnd:"Nie przeszkadzać",Mute:"Wycisz",Unmute:"Włącz dźwięk",Subscription:"Subskrybcja",both:"obustronna",Status:"Status",online:"Dostępny",chat:"czat",away:"z dala od kompa",xa:"hen hen...",offline:"niedostępny",none:"brak",Unknown_instance_tag:"Nieznany przypadek.",Not_one_of_our_latest_keys:"Not one of our latest keys.",Received_an_unreadable_encrypted_message:"Otrzymano nieczytelną, zaszyfrowaną wiadomość.",Online:"Połączony",Chatty:"Pogawędzimy?",Away:"Daleko",Extended_away:"Hen Hen...",Offline:"Niedostępny",Friendship_request:"Zapytanie od znajomego?",Confirm:"Potwierdzenie",Dismiss:"Odwołaj",Remove:"Usuń",Online_help:"Pomoc Online",FN:"Pełna nazwa",N:" ",FAMILY:"Nazwisko",GIVEN:"Imię",NICKNAME:"Pseudonim",URL:"Strona WWW",ADR:"Adres",STREET:"Ulica",EXTADD:"Pełny adres",LOCALITY:"Lokalizacja",REGION:"Region",PCODE:"Kod pocztowy",CTRY:"Kraj",TEL:"Telefon",NUMBER:"Numer",EMAIL:"Email",USERID:" ",ORG:"Organizacja",ORGNAME:"Nazwa",ORGUNIT:"Jednostka",TITLE:"Stanowisko",ROLE:"Rola",BDAY:"Data urodzin",DESC:"Opis",PHOTO:" ",send_message:"Wyślij wiadomość",get_info:"Pokaż informację",Settings:"Ustawienia",Priority:"Priorytet",Save:"Zapisz",User_settings:"Ustawienia Użytkownika",A_fingerprint_:"Kod służy do autoryzacji Twojego rozmówcy aby potwierdzić jego tożsamość.",is:"jest",Login_options:"opcje logowania",BOSH_url:"Adres BOSH",Domain:"Domena",Resource:"Źródło",On_login:"Na login",Received_an_unencrypted_message:"Zatwierdzono nieszyfrowaną wiadomość.",Sorry_your_buddy_doesnt_provide_any_information:"Twój rozmówca nie posiada żadnych informacji.",Info_about:"Informacja o...",Authentication_aborted:"Autoryzacja anulowana.",Authentication_request_received:"Prośba o autoryzację została przyjęta.",Log_in_without_chat:"Zaloguj bez komunikatora",has_come_online:"jest teraz dostępny",Unknown_sender:"Nieznany nadawca",Please_allow_access_to_microphone_and_camera:'Kliknij "Potwierdź" na górze, aby móc korzystać z mikrofonu oraz kamery.',Incoming_call:"Przychodzące połączenie",from:"z",Do_you_want_to_accept_the_call_from:"Akceptujesz połączenie od",Reject:"Odrzuć",Accept:"Zaakceptuj",hang_up:"odbierz",snapshot:"zrób zdjęcie",mute_my_audio:"wycisz dźwięk",pause_my_video:"zatrzymaj moje wideo",fullscreen:"Pełny ekran",Info:"Informacja",Local_IP:"Adres IP",Remote_IP:"Zdalny adres IP",Local_Fingerprint:"Kod lokalny",Remote_Fingerprint:"Zdalny kod",Video_call_not_possible:"Rozmowa wideo jest niemożliwa. Twój rozmówca nie ma możliwości prowadzenia takich rozmów.",Start_video_call:"Rozpocznij rozmowę wideo",Join_chat:"Dołącz do czata",Join:"Dołącz",Room:"Pokój",Nickname:"Nazwa użytkownika",left_the_building:"__nickname__ wyszedł",entered_the_room:"__nickname__ wszedł do pokoju",is_now_known_as:"__oldNickname__ zmienił nazwę na __newNickname__",This_room_is:"Ten pokój jest",muc_hidden:{keyword:"ukryty",description:"nie można odnaleźć elementów wyszukiwania"},muc_membersonly:{keyword:"tylko zalogowani",description:"musisz być członkiem listy"},muc_moderated:{keyword:"moderowano",description:'tylko osoby z opcją "głos" mogą wysyłać wiadomość'},muc_nonanonymous:{keyword:"nie-anonimowy",description:"Twój identyfikator jabber jest widoczny dla wszystkich innych osób"},muc_open:{keyword:"otwarty",description:"wszyscy mają pozwolenie aby dołączyć"},muc_passwordprotected:{keyword:"ograniczone hasłem",description:"musisz wpisać prawidłowe hasło"},muc_persistent:{keyword:"trwale",description:"nie zostaną zniszczone, jeśli ostatnia osoba wyszła"},muc_public:{keyword:"publiczny",description:"wyszukawno"},muc_semianonymous:{keyword:"pół-anonimowy",description:"Twój identyfikator jabber jest widoczny w pokoju adminów"},muc_temporary:{keyword:"tymczasowy",description:"zostanie usunięty jeżeli ostatnia osoba wyjdzie"},muc_unmoderated:{keyword:"niemoderowany",description:"wszyscy są uprawnieni do pisania wiadomości"},muc_unsecured:{keyword:"niezabezpieczone",description:"nie musisz wpisywać hasła"},Continue:"Kontynuuj",Server:"Serwer",Rooms_are_loaded:"Pokoje zostały załadowane",Could_load_only:"Nie załadowano __count__ pokoi",muc_explanation:"Aby się zalogować, wpisz nazwę pokoju oraz opcjonalnie nazwę użytkownika i hasło",You_already_joined_this_room:"Już dołączyłeś do tego pokoju",This_room_will_be_closed:"Ten pokój będzie zamknięty",Room_not_found_:"Nowy pokój będzie stworzony",Loading_room_information:"Ładowani informacji o pokoju",Destroy:"Zniszczony",Leave:"Opuść",changed_subject_to:'__nickname__ zmienił temat pokoju na "__subject__"',muc_removed_kicked:"Zostałeś wyrzucony z pokoju",muc_removed_info_kicked:"__nickname__ został wyrzucony z pokoju",muc_removed_banned:"Zostałeś zbanowany",muc_removed_info_banned:"__nickname__ został zbanowany",muc_removed_affiliation:"Zostałeś usunięty z pokoju ze względu na zmianę przynależnosci",muc_removed_info_affiliation:"__nickname__ został usunięty z pokoju ze względu na zmianę przynależnosci",muc_removed_membersonly:"Zostałeś usunięty z pokoju ze względu na zmianę pokoju tylko dla członków, a Ty nie jesteś członkiem...",muc_removed_info_membersonly:"__nickname__ został usunięty z pokoju ze względu na zmianę pokoju na tylko dla członków",muc_removed_shutdown:"Zostałeś usunięty z pokoju ze względu na zamknięcie usługi",Reason:"Powód",message_not_send:"Wystąpił błąd i twoja wiadomość nie została wysłana.","message_not_send_item-not-found":"Twoja wiadomość nie została wysłana ponieważ ten pokój nie istnieje",message_not_send_forbidden:"Twoja wiadomość nie została wysłana ponieważ nie masz głosu w tym pokoju","message_not_send_not-acceptable":"Twoja wiadomość nie została wysłana ponieważ nie jesteś właścicielem tego pokoju",This_room_has_been_closed:"Ten pokój został zamknięty",Room_logging_is_enabled:"Logowanie do pokoju jest włączone",A_password_is_required:"Hasło jest wymagane",You_are_not_on_the_member_list:"Nie jesteś na liście członków",You_are_banned_from_this_room:"Zostałeś zbanowany w tym pokoju",Your_desired_nickname_:"Twoja nazwa użytkownika jest już użyta. Spróbuj wybrać inną",The_maximum_number_:"Została osiągnięta maksymalna liczba użytkowników w tym pokoju",This_room_is_locked_:"Ten pokój jest zablokowany",You_are_not_allowed_to_create_:"Nie masz uprawnień do tworzenia pokoju",Alert:"Alarm",Call_started:null,Call_terminated:null,Carbon_copy:"Do wiadomości",Enable:"Włączone",jingle_reason_busy:null,jingle_reason_decline:null,jingle_reason_success:null,Media_failure:null,No_local_audio_device:null,No_local_video_device:null,Ok:"Ok",PermissionDeniedError:null,Use_local_audio_device:null,Use_local_video_device:null,is_:"jest __status__",You_received_a_message_from_an_unknown_sender_:"Masz wiadomość od nieznanego nadawcy. (__sender__) Chcesz to wyświetlić?",Your_roster_is_empty_add_:"Twoja lista jest pusta, dodaj kontakty <a>Nowy kontakt</a>",onsmp_explanation_question:"Twój rozmówca próbuje się z Tobą połączyć. Autoryzacja z rozmówcą, napisz odpowiedź.",onsmp_explanation_secret:"Twój rozmówca próbuje się z Tobą połączyć. Autoryzacja z rozmówcą, wpisz hasło.",from_sender:"z __sender__",Verified_private_conversation_started:"Zweryfikowano Rozmowa prywatna rozpoczęta.",Unverified_private_conversation_started:"Niezweryfikowano Rozmowa prywatna rozpoczęta."}},"pt-BR":{translation:{Logging_in:"Entrando...",your_connection_is_unencrypted:"Sua conexão não é encriptada",your_connection_is_encrypted:"Sua conexão é encriptada",your_buddy_closed_the_private_connection:"Seu contato fechou a conexão privada",start_private:"Iniciar conversa privada",close_private:"Fechar conversa privada",your_buddy_is_verificated:"Seu contato está verificado",you_have_only_a_subscription_in_one_way:"Você só tem a inscrição one-way",authentication_query_sent:"Pergunta de autenticação enviada",your_message_wasnt_send_please_end_your_private_conversation:"Sua mensagem não foi enviada. Por favor finalize sua conversa privada",unencrypted_message_received:"Mensagem não encriptada recebida",not_available:"Indisponível",no_connection:"Sem conexão!",relogin:"reentrar",trying_to_start_private_conversation:"Tentando iniciar conversa privada",Verified:"Verificado",Unverified:"Não verificado",private_conversation_aborted:"Conversa privada abortada!",your_buddy_closed_the_private_conversation_you_should_do_the_same:"Seu contato encerrou a conversa privada! Você deveria fazer o mesmo.",conversation_is_now_verified:"Conversa verificada.",authentication_failed:"Autenticação falhou.",Creating_your_private_key_:"Criando sua chave privada: isso pode demorar um pouco.",Authenticating_a_buddy_helps_:"Autenticar seu contato ajuda a garantir que a pessoa com a qual você está falando é realmente a pessoa que ela alega ser.",How_do_you_want_to_authenticate_your_buddy:"Como você gostaria de se autenticar {{bid_name}} (<b>{{bid_jid}}</b>)?",Select_method:"Selecione o método...",Manual:"Manual",Question:"Pergunta",Secret:"Senha",To_verify_the_fingerprint_:"Para verificar o fingerprint, entre em contato com seu contato usando outro meio, de preferência seguro, como o telefone.",Your_fingerprint:"Seu fingerprint",Buddy_fingerprint:"Fingerprint do contato",Close:"Fechar",Compared:"Comparado",To_authenticate_using_a_question_:"Para autenticar seu contato faça uma pergunta, mas escolha que só ele saiba a resposta.",Ask:"Pergunta",To_authenticate_pick_a_secret_:"Para autenticar, escolha um segredo que somente você e seu contato saibam.",Compare:"Compare",Fingerprints:"Fingerprints",Authentication:"Autenticação",Message:"Mensagem",Add_buddy:"Adicionar contato",rename_buddy:"renomear contato",delete_buddy:"remover contato",Login:"Entrar",Username:"Usuário",Password:"Senha",Cancel:"Cancelar",Connect:"Conectar",Type_in_the_full_username_:"Digite seu nome completo e um apelido opcional.",Alias:"Apelido",Add:"Adicionar",Subscription_request:"Pedido de inscrição",You_have_a_request_from:"Você tem um pedido de",Deny:"Negar",Approve:"Aprovar",Remove_buddy:"Remover contato",You_are_about_to_remove_:"Você está prestes a remover {{bid_name}} (<b>{{bid_jid}}</b>) de sua lista de contatos. Todas as conversas serão fechadas.",Continue_without_chat:"Continue sem converar",Please_wait:"Por favor aguarde",Login_failed:"Autenticação da conversa falhou",Sorry_we_cant_authentikate_:"A autenticação com o servidor falhou. Talvez seja a senha errada?",Retry:"Voltar",clear_history:"Limpar histórico",New_message_from:"Nova mensagem de __name__",Should_we_notify_you_:"Devemos continuar notificando sobre novas mensagens no futuro?",Please_accept_:'Por favor clique no botão "Permitir" na parte superior.',Hide_offline:"Esconder contatos desconectados",Show_offline:"Mostrar contatos desconectados",About:"Sobre",dnd:"Não perturbe",Mute:"Mudo",Unmute:"Ligar",Subscription:"Inscrição",both:"ambos",Status:"Status",online:"online",chat:"conversa",away:"ausente",xa:"ausente por mais tempo",offline:"desativado",none:"nenhum",Unknown_instance_tag:"Marcação desconhecida da instância",Not_one_of_our_latest_keys:"Nenhuma de nossas ultimas chaves.",Received_an_unreadable_encrypted_message:"Mensagem encriptada ilegível foi recebida.",Online:"Online",Chatty:"Tagarela",Away:"Ausente",Extended_away:"Ausente por mais tempo",Offline:"Desativado",Friendship_request:"Pedido de amizade",Confirm:"Confirmar",Dismiss:"Ignorar",Remove:"Remover",Online_help:"Ajuda online",FN:"Nome completo",N:" ",FAMILY:"Sobrenome",GIVEN:"Nome",NICKNAME:"Apelido",URL:"URL",ADR:"Endereço",STREET:"Rua, Av, etc",EXTADD:"Complemento",LOCALITY:"Localidade",REGION:"Região",PCODE:"CEP",CTRY:"País",TEL:"Telefone",NUMBER:"Número",EMAIL:"Email",USERID:" ",ORG:"Empresa",ORGNAME:"Nome",ORGUNIT:"Unidade",TITLE:"Cargo",ROLE:"Rol",BDAY:"Data de nascimento",DESC:"Descrição",PHOTO:" ",send_message:"Enviar mensagem",get_info:"Exibir informações",Settings:"Configurações",Priority:"Prioridade",Save:"Salvar",User_settings:"Configurações do usuário",A_fingerprint_:"O fingerprint é usado para certificar que a pessoa com a qual se está falando é que ela diz ser.",is:"é",Login_options:"Opções de login",BOSH_url:"BOSH URL",Domain:"Domínio",Resource:"Recurso",On_login:"Ao autenticar",Received_an_unencrypted_message:"Mensagem não encriptada recebida",Sorry_your_buddy_doesnt_provide_any_information:"Desculpe, seu contato não forneceu nenhuma informação",Info_about:"Informações sobre",Authentication_aborted:"Autenticação encerrada.",Authentication_request_received:"Pedido de autenticação recebido",Log_in_without_chat:"Entrar sem conversar",has_come_online:"ficou online",Unknown_sender:"Emissor desconhecido",Please_allow_access_to_microphone_and_camera:'Por favor clique no botão "Permitir" no topo, para conceder acesso ao seu microfone e câmera.',Incoming_call:"Recebendo chamada",from:"de",Do_you_want_to_accept_the_call_from:"Você aceita a chamada de",Reject:"Negar",Accept:"Aceitar",hang_up:"desligar",snapshot:"registrar imagem",mute_my_audio:"mudo",pause_my_video:"pausar vídeo",fullscreen:"tela cheia",Info:"Informações",Local_IP:"IP local",Remote_IP:"IP remoto",Local_Fingerprint:"Fingerprint local",Remote_Fingerprint:"Fingerprint remoto",Video_call_not_possible:"Chamada de vídeo impossível. Seu contato não suporta chamadas desse tipo.",Start_video_call:"Iniciar chamada de vídeo",Join_chat:null,Join:null,Room:null,Nickname:null,left_the_building:null,entered_the_room:null,is_now_known_as:null,This_room_is:null,muc_hidden:{keyword:null,description:null},muc_membersonly:{keyword:null,description:null},muc_moderated:{keyword:null,description:null},muc_nonanonymous:{keyword:null,description:null},muc_open:{keyword:null,description:null},muc_passwordprotected:{keyword:null,description:null},muc_persistent:{keyword:null,description:null},muc_public:{keyword:null,description:null},muc_semianonymous:{keyword:null,description:null},muc_temporary:{keyword:null,description:null},muc_unmoderated:{keyword:null,description:null},muc_unsecured:{keyword:null,description:null},Continue:null,Server:null,Rooms_are_loaded:null,Could_load_only:null,muc_explanation:null,You_already_joined_this_room:null,This_room_will_be_closed:null,Room_not_found_:null,Loading_room_information:null,Destroy:null,Leave:null,changed_subject_to:null,muc_removed_kicked:null,muc_removed_info_kicked:null,muc_removed_banned:null,muc_removed_info_banned:null,muc_removed_affiliation:null,muc_removed_info_affiliation:null,muc_removed_membersonly:null,muc_removed_info_membersonly:null,muc_removed_shutdown:null,Reason:null,message_not_send:null,"message_not_send_item-not-found":null,message_not_send_forbidden:null,"message_not_send_not-acceptable":null,This_room_has_been_closed:null,Room_logging_is_enabled:null,A_password_is_required:null,You_are_not_on_the_member_list:null,You_are_banned_from_this_room:null,Your_desired_nickname_:null,The_maximum_number_:null,This_room_is_locked_:null,You_are_not_allowed_to_create_:null,Alert:null,Call_started:null,Call_terminated:null,Carbon_copy:null,Enable:null,jingle_reason_busy:null,jingle_reason_decline:null,jingle_reason_success:null,Media_failure:null,No_local_audio_device:null,No_local_video_device:null,Ok:null,PermissionDeniedError:null,Use_local_audio_device:null,Use_local_video_device:null,is_:"é __status__",You_received_a_message_from_an_unknown_sender_:"Você recebeu uma mensagem de um emissor desconhecido (__sender__) Você quer mostrá-los?",Your_roster_is_empty_add_:"Sua lista está vazia, adicione um <a>novo contato</a>",onsmp_explanation_question:"Seu contato está tentando determinar se ele realmente está falando contigo. Para autenticar seu contato, entre com a resposta e clique em Responder.",onsmp_explanation_secret:"Seu contato está tentando determinar se ele realmente está falando contigo. Para autenticar seu contato, escreva a senha.",from_sender:"de __sender__",Verified_private_conversation_started:"Verificado Conversa privada iniciada.",Unverified_private_conversation_started:"Não verificado Conversa privada iniciada."}},ro:{translation:{Logging_in:null,your_connection_is_unencrypted:null,your_connection_is_encrypted:null,your_buddy_closed_the_private_connection:null,start_private:null,close_private:null,your_buddy_is_verificated:null,you_have_only_a_subscription_in_one_way:null,authentication_query_sent:null,your_message_wasnt_send_please_end_your_private_conversation:null,unencrypted_message_received:null,not_available:null,no_connection:null,relogin:null,trying_to_start_private_conversation:null,Verified:null,Unverified:null,private_conversation_aborted:null,your_buddy_closed_the_private_conversation_you_should_do_the_same:null,conversation_is_now_verified:null,authentication_failed:null,Creating_your_private_key_:null,Authenticating_a_buddy_helps_:null,How_do_you_want_to_authenticate_your_buddy:null,Select_method:null,Manual:null,Question:null,Secret:null,To_verify_the_fingerprint_:null,Your_fingerprint:null,Buddy_fingerprint:null,Close:null,Compared:null,To_authenticate_using_a_question_:null,Ask:null,To_authenticate_pick_a_secret_:null,Compare:null,Fingerprints:null,Authentication:null,Message:null,Add_buddy:null,rename_buddy:null,delete_buddy:null,Login:null,Username:null,Password:null,Cancel:null,Connect:null,Type_in_the_full_username_:null,Alias:null,Add:null,Subscription_request:null,You_have_a_request_from:null,Deny:null,Approve:null,Remove_buddy:null,You_are_about_to_remove_:null,Continue_without_chat:null,Please_wait:null,Login_failed:null,Sorry_we_cant_authentikate_:null,Retry:null,clear_history:null,New_message_from:null,Should_we_notify_you_:null,Please_accept_:null,Hide_offline:null,Show_offline:null,About:null,dnd:null,Mute:null,Unmute:null,Subscription:null,both:null,Status:null,online:null,chat:null,away:null,xa:null,offline:null,none:null,Unknown_instance_tag:null,Not_one_of_our_latest_keys:null,Received_an_unreadable_encrypted_message:null,Online:null,Chatty:null,Away:null,Extended_away:null,Offline:null,Friendship_request:null,Confirm:null,Dismiss:null,Remove:null,Online_help:null,FN:null,N:null,FAMILY:null,GIVEN:null,NICKNAME:null,URL:null,ADR:null,STREET:null,EXTADD:null,LOCALITY:null,REGION:null,PCODE:null,CTRY:null,TEL:null,NUMBER:null,EMAIL:null,USERID:null,ORG:null,ORGNAME:null,ORGUNIT:null,TITLE:null,ROLE:null,BDAY:null,DESC:null,PHOTO:null,send_message:null,get_info:null,Settings:null,Priority:null,Save:null,User_settings:null,A_fingerprint_:null,is:null,Login_options:null,BOSH_url:null,Domain:null,Resource:null,On_login:null,Received_an_unencrypted_message:null,Sorry_your_buddy_doesnt_provide_any_information:null,Info_about:null,Authentication_aborted:null,Authentication_request_received:null,Log_in_without_chat:null,has_come_online:null,Unknown_sender:null,Please_allow_access_to_microphone_and_camera:null,Incoming_call:null,from:null,Do_you_want_to_accept_the_call_from:null,Reject:null,Accept:null,hang_up:null,snapshot:null,mute_my_audio:null,pause_my_video:null,fullscreen:null,Info:null,Local_IP:null,Remote_IP:null,Local_Fingerprint:null,Remote_Fingerprint:null,Video_call_not_possible:null,Start_video_call:null,Join_chat:null,Join:null,Room:null,Nickname:null,left_the_building:null,entered_the_room:null,is_now_known_as:null,This_room_is:null,muc_hidden:{keyword:null,description:null},muc_membersonly:{keyword:null,description:null},muc_moderated:{keyword:null,description:null},muc_nonanonymous:{keyword:null,description:null},muc_open:{keyword:null,description:null},muc_passwordprotected:{keyword:null,description:null},muc_persistent:{keyword:null,description:null},muc_public:{keyword:null,description:null},muc_semianonymous:{keyword:null,description:null},muc_temporary:{keyword:null,description:null},muc_unmoderated:{keyword:null,description:null},muc_unsecured:{keyword:null,description:null},Continue:null,Server:null,Rooms_are_loaded:null,Could_load_only:null,muc_explanation:null,You_already_joined_this_room:null,This_room_will_be_closed:null,Room_not_found_:null,Loading_room_information:null,Destroy:null,Leave:null,changed_subject_to:null,muc_removed_kicked:null,muc_removed_info_kicked:null,muc_removed_banned:null,muc_removed_info_banned:null,muc_removed_affiliation:null,muc_removed_info_affiliation:null,muc_removed_membersonly:null,muc_removed_info_membersonly:null,muc_removed_shutdown:null,Reason:null,message_not_send:null,"message_not_send_item-not-found":null,message_not_send_forbidden:null,"message_not_send_not-acceptable":null,This_room_has_been_closed:null,Room_logging_is_enabled:null,A_password_is_required:null,You_are_not_on_the_member_list:null,You_are_banned_from_this_room:null,Your_desired_nickname_:null,The_maximum_number_:null,This_room_is_locked_:null,You_are_not_allowed_to_create_:null,Alert:null,Call_started:null,Call_terminated:null,Carbon_copy:null,Enable:null,jingle_reason_busy:null,jingle_reason_decline:null,jingle_reason_success:null,Media_failure:null,No_local_audio_device:null,No_local_video_device:null,Ok:null,PermissionDeniedError:null,Use_local_audio_device:null,Use_local_video_device:null,is_:null,You_received_a_message_from_an_unknown_sender_:null,Your_roster_is_empty_add_:null,onsmp_explanation_question:null,onsmp_explanation_secret:null,from_sender:null,Verified_private_conversation_started:null,Unverified_private_conversation_started:null}},ru:{translation:{Logging_in:"Вход в систему...",your_connection_is_unencrypted:"Ваше соединение не зашифровано.",your_connection_is_encrypted:"Ваше соединение зашифровано.",your_buddy_closed_the_private_connection:"Ваш собеседник закончил зашифрованное соединение.",start_private:"Начать зашифрованный чат",close_private:"Закончить зашифрованный чат",your_buddy_is_verificated:"Собеседник подтвержден.",you_have_only_a_subscription_in_one_way:"У вас только односторонняя подписка.",authentication_query_sent:null,your_message_wasnt_send_please_end_your_private_conversation:"Сообщение не отправлено. Завершите зашифрованный чат, пожалуйста.",unencrypted_message_received:"Получено незашифрованное сообщение",not_available:"Не доступен",no_connection:"Нет соединения!",relogin:"переподключиться",trying_to_start_private_conversation:"Попытка начать зашифрованный чат!",Verified:"Подтверждено",Unverified:"Не подтверждено",private_conversation_aborted:"Зашифрованный чат отклонен!",your_buddy_closed_the_private_conversation_you_should_do_the_same:"Ваш собеседник завершил зашифрованный чат! Вы должны сделать тоже самое.",conversation_is_now_verified:"Чат теперь утвержден.",authentication_failed:"Ошибка авторизации.",Creating_your_private_key_:null,Authenticating_a_buddy_helps_:null,How_do_you_want_to_authenticate_your_buddy:null,Select_method:"Выберите метод...",Manual:"Вручную",Question:"Вопрос",Secret:"Пароль",To_verify_the_fingerprint_:null,Your_fingerprint:"Ваш отпечаток",Buddy_fingerprint:"Отпечаток собеседника",Close:"Закрыть",Compared:"Сравнение завершено",To_authenticate_using_a_question_:"Для авторизации с помощью вопроса выберите вопрос, ответ на который знаете только Вы и собеседник.",Ask:null,To_authenticate_pick_a_secret_:"Для авторизации выберите пароль, который знаете только Вы и собеседник.",Compare:"Сравнить",Fingerprints:"Отпечатки",Authentication:"Авторизация",Message:"Сообщение",Add_buddy:"Добавить контакт",rename_buddy:"переименовать контакт",delete_buddy:"удалить контакт",Login:"Вход",Username:"Логин",Password:"Пароль",Cancel:"Отмена",Connect:"Подключить",Type_in_the_full_username_:null,Alias:"Псевдоним",Add:"Добавить",Subscription_request:"Запрос подписки",You_have_a_request_from:"Получен запрос от",Deny:"Отказ",Approve:"Подтвердить",Remove_buddy:"Удалить контакт",You_are_about_to_remove_:null,Continue_without_chat:"Продолжить без чата",Please_wait:"Подождите…",Login_failed:"Неудачный вход в чат",Sorry_we_cant_authentikate_:null,Retry:null,clear_history:"Очистить историю",New_message_from:"Новое сообщение от __name__",Should_we_notify_you_:"Уведомлять о новых сообщениях в будущем?",Please_accept_:null,Hide_offline:"Спрятать отключенных",Show_offline:"Показать отключенных",About:"О проекте",dnd:"Не беспокоить",Mute:"Выкл. уведомления",Unmute:"Вкл. уведомления",Subscription:"Подписка",both:"оба",Status:"Статус",online:"в сети",chat:"готов общаться",away:"отошел",xa:"отсутствую",offline:"не в сети",none:"нет",Unknown_instance_tag:"Неизвестный тег.",Not_one_of_our_latest_keys:null,Received_an_unreadable_encrypted_message:null,Online:"В сети",Chatty:"Готов общаться",Away:"Отошел",Extended_away:"Отсутствую",Offline:"Не в сети",Friendship_request:null,Confirm:"Подтвердить",Dismiss:"Отклонить",Remove:"Удалить",Online_help:"Онлайн помощь",FN:"Полное имя",N:null,FAMILY:"Фамилия",GIVEN:null,NICKNAME:"Ник",URL:null,ADR:"Адрес",STREET:"Улица",EXTADD:"Дополнительный адрес",LOCALITY:null,REGION:null,PCODE:"Индекс",CTRY:"Страна",TEL:"Телефон",NUMBER:"Номер",EMAIL:"Почта",USERID:null,ORG:"Организация",ORGNAME:"Название",ORGUNIT:"Отдел",TITLE:"Должность",ROLE:"Обязанности",BDAY:"День рождения",DESC:"Описание",PHOTO:null,send_message:"Отправить сообщение",get_info:"Показать информацию",Settings:"Настройки",Priority:"Приоритет",Save:"Сохранить",User_settings:"Пользовательские настройки",A_fingerprint_:null,is:null,Login_options:"Параметры входа",BOSH_url:null,Domain:"Домен",Resource:"Ресурс",On_login:"Автоматически подключаться",Received_an_unencrypted_message:null,Sorry_your_buddy_doesnt_provide_any_information:null,Info_about:"Информация о",Authentication_aborted:null,Authentication_request_received:null,Log_in_without_chat:"Вход без чата",has_come_online:"появился в сети",Unknown_sender:"Неизвестный отправитель",Please_allow_access_to_microphone_and_camera:null,Incoming_call:"Входящий вызов",from:"от",Do_you_want_to_accept_the_call_from:null,Reject:null,Accept:null,hang_up:null,snapshot:null,mute_my_audio:null,pause_my_video:null,fullscreen:null,Info:null,Local_IP:null,Remote_IP:null,Local_Fingerprint:null,Remote_Fingerprint:null,Video_call_not_possible:null,Start_video_call:null,Join_chat:null,Join:null,Room:null,Nickname:null,left_the_building:null,entered_the_room:null,is_now_known_as:null,This_room_is:null,muc_hidden:{keyword:null,description:null},muc_membersonly:{keyword:null,description:null},muc_moderated:{keyword:null,description:null},muc_nonanonymous:{keyword:null,description:null},muc_open:{keyword:null,description:null},muc_passwordprotected:{keyword:null,description:null},muc_persistent:{keyword:null,description:null},muc_public:{keyword:null,description:null},muc_semianonymous:{keyword:null,description:null},muc_temporary:{keyword:null,description:null},muc_unmoderated:{keyword:null,description:null},muc_unsecured:{keyword:null,description:null},Continue:null,Server:null,Rooms_are_loaded:null,Could_load_only:null,muc_explanation:null,You_already_joined_this_room:null,This_room_will_be_closed:null,Room_not_found_:null,Loading_room_information:null,Destroy:null,Leave:null,changed_subject_to:null,muc_removed_kicked:null,muc_removed_info_kicked:null,muc_removed_banned:null,muc_removed_info_banned:null,muc_removed_affiliation:null,muc_removed_info_affiliation:null,muc_removed_membersonly:null,muc_removed_info_membersonly:null,muc_removed_shutdown:null,Reason:null,message_not_send:null,"message_not_send_item-not-found":null,message_not_send_forbidden:null,"message_not_send_not-acceptable":null,This_room_has_been_closed:null,Room_logging_is_enabled:null,A_password_is_required:null,You_are_not_on_the_member_list:null,You_are_banned_from_this_room:null,Your_desired_nickname_:null,The_maximum_number_:null,This_room_is_locked_:null,You_are_not_allowed_to_create_:null,Alert:null,Call_started:null,Call_terminated:null,Carbon_copy:null,Enable:"Включить",jingle_reason_busy:null,jingle_reason_decline:null,jingle_reason_success:null,Media_failure:null,No_local_audio_device:null,No_local_video_device:null,Ok:null,PermissionDeniedError:null,Use_local_audio_device:null,Use_local_video_device:null,is_:null,You_received_a_message_from_an_unknown_sender_:"Вы получили сообщение от неизвестного отправителя (__sender__)",Your_roster_is_empty_add_:"Ваш список контактов пуст, добавить <a>новый контакт</a>",onsmp_explanation_question:"Собеседник пытается определить, что общается действительно с Вами.",onsmp_explanation_secret:"Собеседник пытается определить, что общается действительно с Вами. введите пароль.",from_sender:"от __sender__",Verified_private_conversation_started:"Подтверждено Зашифрованный чат начат.",Unverified_private_conversation_started:"Не подтверждено Зашифрованный чат начат."}}};
+/*!
+ * Source: lib/favico.js/favico.js, license: MIT, url: https://github.com/ejci/favico.js
+ */
+/**
+ * @license MIT
+ * @fileOverview Favico animations
+ * @author Miroslav Magda, http://blog.ejci.net
+ * @version 0.3.6
+ */
+!function(){var Favico=function(opt){"use strict";function drawVideo(video){if(video.paused||video.ended||_stop)return!1;try{_context.clearRect(0,0,_w,_h),_context.drawImage(video,0,0,_w,_h)}catch(e){}_drawTimeout=setTimeout(drawVideo,animation.duration,video),link.setIcon(_canvas)}function hexToRgb(hex){var shorthandRegex=/^#?([a-f\d])([a-f\d])([a-f\d])$/i;hex=hex.replace(shorthandRegex,function(m,r,g,b){return r+r+g+g+b+b});var result=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(hex);return result?{r:parseInt(result[1],16),g:parseInt(result[2],16),b:parseInt(result[3],16)}:!1}function merge(def,opt){var attrname,mergedOpt={};for(attrname in def)mergedOpt[attrname]=def[attrname];for(attrname in opt)mergedOpt[attrname]=opt[attrname];return mergedOpt}function isPageHidden(){return document.hidden||document.msHidden||document.webkitHidden||document.mozHidden}opt=opt?opt:{};var _opt,_orig,_h,_w,_canvas,_context,_img,_ready,_lastBadge,_running,_readyCb,_stop,_browser,_animTimeout,_drawTimeout,_def={bgColor:"#d00",textColor:"#fff",fontFamily:"sans-serif",fontStyle:"bold",type:"circle",position:"down",animation:"slide",elementId:!1,dataUrl:!1};_browser={},_browser.ff="undefined"!=typeof InstallTrigger,_browser.chrome=!!window.chrome,_browser.opera=!!window.opera||navigator.userAgent.indexOf("Opera")>=0,_browser.ie=/*@cc_on!@*/!1,_browser.safari=Object.prototype.toString.call(window.HTMLElement).indexOf("Constructor")>0,_browser.supported=_browser.chrome||_browser.ff||_browser.opera;var _queue=[];_readyCb=function(){},_ready=_stop=!1;var init=function(){_opt=merge(_def,opt),_opt.bgColor=hexToRgb(_opt.bgColor),_opt.textColor=hexToRgb(_opt.textColor),_opt.position=_opt.position.toLowerCase(),_opt.animation=animation.types[""+_opt.animation]?_opt.animation:_def.animation;var isUp=_opt.position.indexOf("up")>-1,isLeft=_opt.position.indexOf("left")>-1;if(isUp||isLeft)for(var i=0;i<animation.types[""+_opt.animation].length;i++){var step=animation.types[""+_opt.animation][i];isUp&&(step.y=step.y<.6?step.y-.4:step.y-2*step.y+(1-step.w)),isLeft&&(step.x=step.x<.6?step.x-.4:step.x-2*step.x+(1-step.h)),animation.types[""+_opt.animation][i]=step}_opt.type=type[""+_opt.type]?_opt.type:_def.type,_orig=link.getIcon(),_canvas=document.createElement("canvas"),_img=document.createElement("img"),_orig.hasAttribute("href")?(_img.setAttribute("src",_orig.getAttribute("href")),_img.onload=function(){_h=_img.height>0?_img.height:32,_w=_img.width>0?_img.width:32,_canvas.height=_h,_canvas.width=_w,_context=_canvas.getContext("2d"),icon.ready()}):(_img.setAttribute("src",""),_h=32,_w=32,_img.height=_h,_img.width=_w,_canvas.height=_h,_canvas.width=_w,_context=_canvas.getContext("2d"),icon.ready())},icon={};icon.ready=function(){_ready=!0,icon.reset(),_readyCb()},icon.reset=function(){_ready&&(_queue=[],_lastBadge=!1,_running=!1,_context.clearRect(0,0,_w,_h),_context.drawImage(_img,0,0,_w,_h),link.setIcon(_canvas),window.clearTimeout(_animTimeout),window.clearTimeout(_drawTimeout))},icon.start=function(){if(_ready&&!_running){var finished=function(){_lastBadge=_queue[0],_running=!1,_queue.length>0&&(_queue.shift(),icon.start())};if(_queue.length>0){_running=!0;var run=function(){["type","animation","bgColor","textColor","fontFamily","fontStyle"].forEach(function(a){a in _queue[0].options&&(_opt[a]=_queue[0].options[a])}),animation.run(_queue[0].options,function(){finished()},!1)};_lastBadge?animation.run(_lastBadge.options,function(){run()},!0):run()}}};var type={},options=function(opt){return opt.n="number"==typeof opt.n?Math.abs(0|opt.n):opt.n,opt.x=_w*opt.x,opt.y=_h*opt.y,opt.w=_w*opt.w,opt.h=_h*opt.h,opt.len=(""+opt.n).length,opt};type.circle=function(opt){opt=options(opt);var more=!1;2===opt.len?(opt.x=opt.x-.4*opt.w,opt.w=1.4*opt.w,more=!0):opt.len>=3&&(opt.x=opt.x-.65*opt.w,opt.w=1.65*opt.w,more=!0),_context.clearRect(0,0,_w,_h),_context.drawImage(_img,0,0,_w,_h),_context.beginPath(),_context.font=_opt.fontStyle+" "+Math.floor(opt.h*(opt.n>99?.85:1))+"px "+_opt.fontFamily,_context.textAlign="center",more?(_context.moveTo(opt.x+opt.w/2,opt.y),_context.lineTo(opt.x+opt.w-opt.h/2,opt.y),_context.quadraticCurveTo(opt.x+opt.w,opt.y,opt.x+opt.w,opt.y+opt.h/2),_context.lineTo(opt.x+opt.w,opt.y+opt.h-opt.h/2),_context.quadraticCurveTo(opt.x+opt.w,opt.y+opt.h,opt.x+opt.w-opt.h/2,opt.y+opt.h),_context.lineTo(opt.x+opt.h/2,opt.y+opt.h),_context.quadraticCurveTo(opt.x,opt.y+opt.h,opt.x,opt.y+opt.h-opt.h/2),_context.lineTo(opt.x,opt.y+opt.h/2),_context.quadraticCurveTo(opt.x,opt.y,opt.x+opt.h/2,opt.y)):_context.arc(opt.x+opt.w/2,opt.y+opt.h/2,opt.h/2,0,2*Math.PI),_context.fillStyle="rgba("+_opt.bgColor.r+","+_opt.bgColor.g+","+_opt.bgColor.b+","+opt.o+")",_context.fill(),_context.closePath(),_context.beginPath(),_context.stroke(),_context.fillStyle="rgba("+_opt.textColor.r+","+_opt.textColor.g+","+_opt.textColor.b+","+opt.o+")","number"==typeof opt.n&&opt.n>999?_context.fillText((opt.n>9999?9:Math.floor(opt.n/1e3))+"k+",Math.floor(opt.x+opt.w/2),Math.floor(opt.y+opt.h-.2*opt.h)):_context.fillText(opt.n,Math.floor(opt.x+opt.w/2),Math.floor(opt.y+opt.h-.15*opt.h)),_context.closePath()},type.rectangle=function(opt){opt=options(opt);var more=!1;2===opt.len?(opt.x=opt.x-.4*opt.w,opt.w=1.4*opt.w,more=!0):opt.len>=3&&(opt.x=opt.x-.65*opt.w,opt.w=1.65*opt.w,more=!0),_context.clearRect(0,0,_w,_h),_context.drawImage(_img,0,0,_w,_h),_context.beginPath(),_context.font=_opt.fontStyle+" "+Math.floor(opt.h*(opt.n>99?.9:1))+"px "+_opt.fontFamily,_context.textAlign="center",_context.fillStyle="rgba("+_opt.bgColor.r+","+_opt.bgColor.g+","+_opt.bgColor.b+","+opt.o+")",_context.fillRect(opt.x,opt.y,opt.w,opt.h),_context.fillStyle="rgba("+_opt.textColor.r+","+_opt.textColor.g+","+_opt.textColor.b+","+opt.o+")","number"==typeof opt.n&&opt.n>999?_context.fillText((opt.n>9999?9:Math.floor(opt.n/1e3))+"k+",Math.floor(opt.x+opt.w/2),Math.floor(opt.y+opt.h-.2*opt.h)):_context.fillText(opt.n,Math.floor(opt.x+opt.w/2),Math.floor(opt.y+opt.h-.15*opt.h)),_context.closePath()};var badge=function(number,opts){opts=("string"==typeof opts?{animation:opts}:opts)||{},_readyCb=function(){try{if("number"==typeof number?number>0:""!==number){var q={type:"badge",options:{n:number}};if("animation"in opts&&animation.types[""+opts.animation]&&(q.options.animation=""+opts.animation),"type"in opts&&type[""+opts.type]&&(q.options.type=""+opts.type),["bgColor","textColor"].forEach(function(o){o in opts&&(q.options[o]=hexToRgb(opts[o]))}),["fontStyle","fontFamily"].forEach(function(o){o in opts&&(q.options[o]=opts[o])}),_queue.push(q),_queue.length>100)throw"Too many badges requests in queue.";icon.start()}else icon.reset()}catch(e){throw"Error setting badge. Message: "+e.message}},_ready&&_readyCb()},image=function(imageElement){_readyCb=function(){try{var w=imageElement.width,h=imageElement.height,newImg=document.createElement("img"),ratio=h/_h>w/_w?w/_w:h/_h;newImg.setAttribute("src",imageElement.getAttribute("src")),newImg.height=h/ratio,newImg.width=w/ratio,_context.clearRect(0,0,_w,_h),_context.drawImage(newImg,0,0,_w,_h),link.setIcon(_canvas)}catch(e){throw"Error setting image. Message: "+e.message}},_ready&&_readyCb()},video=function(videoElement){_readyCb=function(){try{if("stop"===videoElement)return _stop=!0,icon.reset(),void(_stop=!1);videoElement.addEventListener("play",function(){drawVideo(this)},!1)}catch(e){throw"Error setting video. Message: "+e.message}},_ready&&_readyCb()},webcam=function(action){if(window.URL&&window.URL.createObjectURL||(window.URL=window.URL||{},window.URL.createObjectURL=function(obj){return obj}),_browser.supported){var newVideo=!1;navigator.getUserMedia=navigator.getUserMedia||navigator.oGetUserMedia||navigator.msGetUserMedia||navigator.mozGetUserMedia||navigator.webkitGetUserMedia,_readyCb=function(){try{if("stop"===action)return _stop=!0,icon.reset(),void(_stop=!1);newVideo=document.createElement("video"),newVideo.width=_w,newVideo.height=_h,navigator.getUserMedia({video:!0,audio:!1},function(stream){newVideo.src=URL.createObjectURL(stream),newVideo.play(),drawVideo(newVideo)},function(){})}catch(e){throw"Error setting webcam. Message: "+e.message}},_ready&&_readyCb()}},link={};link.getIcon=function(){var elm=!1,getLink=function(){for(var link=document.getElementsByTagName("head")[0].getElementsByTagName("link"),l=link.length,i=l-1;i>=0;i--)if(/(^|\s)icon(\s|$)/i.test(link[i].getAttribute("rel")))return link[i];return!1};return _opt.element?elm=_opt.element:_opt.elementId?(elm=document.getElementById(_opt.elementId),elm.setAttribute("href",elm.getAttribute("src"))):(elm=getLink(),elm===!1&&(elm=document.createElement("link"),elm.setAttribute("rel","icon"),document.getElementsByTagName("head")[0].appendChild(elm))),elm.setAttribute("type","image/png"),elm},link.setIcon=function(canvas){var url=canvas.toDataURL("image/png");if(_opt.dataUrl&&_opt.dataUrl(url),_opt.element)_opt.element.setAttribute("src",url);else if(_opt.elementId)document.getElementById(_opt.elementId).setAttribute("src",url);else if(_browser.ff||_browser.opera){var old=_orig;_orig=document.createElement("link"),_browser.opera&&_orig.setAttribute("rel","icon"),_orig.setAttribute("rel","icon"),_orig.setAttribute("type","image/png"),document.getElementsByTagName("head")[0].appendChild(_orig),_orig.setAttribute("href",url),old.parentNode&&old.parentNode.removeChild(old)}else _orig.setAttribute("href",url)};var animation={};return animation.duration=40,animation.types={},animation.types.fade=[{x:.4,y:.4,w:.6,h:.6,o:0},{x:.4,y:.4,w:.6,h:.6,o:.1},{x:.4,y:.4,w:.6,h:.6,o:.2},{x:.4,y:.4,w:.6,h:.6,o:.3},{x:.4,y:.4,w:.6,h:.6,o:.4},{x:.4,y:.4,w:.6,h:.6,o:.5},{x:.4,y:.4,w:.6,h:.6,o:.6},{x:.4,y:.4,w:.6,h:.6,o:.7},{x:.4,y:.4,w:.6,h:.6,o:.8},{x:.4,y:.4,w:.6,h:.6,o:.9},{x:.4,y:.4,w:.6,h:.6,o:1}],animation.types.none=[{x:.4,y:.4,w:.6,h:.6,o:1}],animation.types.pop=[{x:1,y:1,w:0,h:0,o:1},{x:.9,y:.9,w:.1,h:.1,o:1},{x:.8,y:.8,w:.2,h:.2,o:1},{x:.7,y:.7,w:.3,h:.3,o:1},{x:.6,y:.6,w:.4,h:.4,o:1},{x:.5,y:.5,w:.5,h:.5,o:1},{x:.4,y:.4,w:.6,h:.6,o:1}],animation.types.popFade=[{x:.75,y:.75,w:0,h:0,o:0},{x:.65,y:.65,w:.1,h:.1,o:.2},{x:.6,y:.6,w:.2,h:.2,o:.4},{x:.55,y:.55,w:.3,h:.3,o:.6},{x:.5,y:.5,w:.4,h:.4,o:.8},{x:.45,y:.45,w:.5,h:.5,o:.9},{x:.4,y:.4,w:.6,h:.6,o:1}],animation.types.slide=[{x:.4,y:1,w:.6,h:.6,o:1},{x:.4,y:.9,w:.6,h:.6,o:1},{x:.4,y:.9,w:.6,h:.6,o:1},{x:.4,y:.8,w:.6,h:.6,o:1},{x:.4,y:.7,w:.6,h:.6,o:1},{x:.4,y:.6,w:.6,h:.6,o:1},{x:.4,y:.5,w:.6,h:.6,o:1},{x:.4,y:.4,w:.6,h:.6,o:1}],animation.run=function(opt,cb,revert,step){var animationType=animation.types[isPageHidden()?"none":_opt.animation];return step=revert===!0?"undefined"!=typeof step?step:animationType.length-1:"undefined"!=typeof step?step:0,cb=cb?cb:function(){},step<animationType.length&&step>=0?(type[_opt.type](merge(opt,animationType[step])),_animTimeout=setTimeout(function(){revert?step-=1:step+=1,animation.run(opt,cb,revert,step)},animation.duration),link.setIcon(_canvas),void 0):void cb()},init(),{badge:badge,video:video,image:image,webcam:webcam,reset:icon.reset,browser:{supported:_browser.supported}}};"undefined"!=typeof define&&define.amd?define([],function(){return Favico}):"undefined"!=typeof module&&module.exports?module.exports=Favico:this.Favico=Favico}();
//# sourceMappingURL=jsxc.dep.min.js.map \ No newline at end of file
diff --git a/build/js/jsxc/lib/jsxc.dep.min.js.map b/build/js/jsxc/lib/jsxc.dep.min.js.map
index 8d3c123..136a0b0 100644
--- a/build/js/jsxc/lib/jsxc.dep.min.js.map
+++ b/build/js/jsxc/lib/jsxc.dep.min.js.map
@@ -1 +1 @@
-{"version":3,"file":"jsxc.dep.min.js","sources":["jsxc.dep.js"],"names":["b64_sha1","s","binb2b64","core_sha1","str2binb","length","str_sha1","binb2str","b64_hmac_sha1","key","data","core_hmac_sha1","str_hmac_sha1","x","len","i","j","t","olda","oldb","oldc","oldd","olde","w","Array","a","b","c","d","e","rol","safe_add","sha1_ft","sha1_kt","bkey","ipad","opad","hash","concat","y","lsw","msw","num","cnt","str","bin","mask","charCodeAt","String","fromCharCode","binarray","triplet","tab","charAt","Base64","keyStr","obj","encode","input","chr1","chr2","chr3","enc1","enc2","enc3","enc4","output","isNaN","decode","replace","indexOf","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","$build","name","attrs","Strophe","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","undefined","document","implementation","createDocument","documentMode","_getIEXmlDom","appendChild","createElement","xmlGenerator","docStrings","ActiveXObject","xmlElement","k","node","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","debug","msg","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","cond","conflict","typ","getElementsByTagName","newList","mechanisms","_connect_cb","_callback","bodyWrap","conncheck","sasl_scram_sha1","sasl_plain","sasl_digest_md5","sasl_anonymous","legacy_auth","hasFeatures","mech","matched","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","jQuery","trigger","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","extended_presence","room_nick","_ref","_this","test_append_nick","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","_parsePresence","update","c2","_j","_len1","_ref1","_ref2","_ref3","_ref4","_ref5","_ref6","_ref7","states","code","parse","field","identity","query","_k","_len2","identities","var","label","_identities","_features","_items","_onDiscoInfo","_onDiscoItems","addIdentity","category","lang","addFeature","var_name","removeFeature","addItem","call_back","items","_buildIQResult","query_attrs","iqresult","$","HASH","_ver","_knownCapabilities","JSON","localStorage","getItem","_jidVerIndex","disco","CAPS","_delegateCapabilities","generateCapsAttrs","generateVer","sort","_sortIdentities","identitiesLen","featuresLen","curIdent","getCapabilitiesByJid","hasFeatureByJid","feature","isArray","makeArray","querySelector","setItem","stringify","_requestCapabilities","_handleDiscoInfoReply","childNodesLen","_attributesToJsObject","buildIq","vCardEl","VCARD","get","set","error_rb","sessions","jid2session","ice_config","iceServers","pc_constraints","media_constraints","mandatory","OfferToReceiveAudio","OfferToReceiveVideo","localStream","onJingle","find","action","ack","sess","peerjid","JingleSession","localStreams","initiate","setRemoteDescription","accept","terminate","addIceCandidate","affected","addSource","removeSource","myjid","sendOffer","state","sendTerminate","active","terminateByJid","getStunAndTurnCredentials","res","iceservers","each","idx","dict","url","username","credential","initiator","responder","isInitiator","peerconnection","remoteStream","localSDP","remoteSDP","relayedStreams","remoteStreams","startTime","stopTime","drip_container","usetrickle","usepranswer","usedrip","hadstuncandidate","hadturncandidate","lasticecandidate","statsinterval","addssrc","removessrc","pendingop","nickname","startmuted","filter_candidates","RTCPeerconnection","onicecandidate","event","sendIceCandidate","candidate","onaddstream","stream","onremovestream","onsignalingstatechange","oniceconnectionstatechange","iceConnectionState","forEach","addStream","pranswer","localDescription","lines","SDPUtil","find_lines","sdp","find_line","prsdp","SDP","toJingle","source","setLocalDescription","RTCSessionDescription","clearInterval","ice","iceparams","media","sdpMLineIndex","session","jcand","candidateToJingle","sendIceCandidates","signalingState","candidates","cand","mid","cands","filter","mline","parse_mline","creator","sdpMid","tmp","parse_fingerprint","required","fingerprint","createOffer","createdOffer","parse_icecandidate","desctype","fromJingle","remoteDescription","remotedesc","cobbled","iscomplete","mediapart","candidateFromJingle","RTCIceCandidate","sendAnswer","provisional","createAnswer","createdAnswer","jingle","getAudioTracks","track","enabled","getVideoTracks","term","ssrc","modifySources","modifiedAnswer","hardMuteVideo","muted","sendMute","sendRinging","getStats","interval","recv","audio","video","lost","lastrecv","lastlost","loss","delta","setInterval","stats","results","packetsrecv","stat","packetslost","shift","mangle","rtpmap","newdesc","fmt","parse_rtpmap","build_mline","removeSessionLines","prefix","removeMediaLines","mediaindex","thecreator","semantics","bundle","substring","parse_mid","parse_fmtp","RtcpFbToJingle","crypto","parse_crypto","ssrclines","linessrc","kv","parse_extmap","uri","direction","senders","TransportToJingle","port","fingerprints","setup","payloadtype","parse_rtcpfb","params","subtype","RtcpFbFromJingle","group","contents","map","m","jingle2media","desc","build_iceufrag","build_icepwd","build_rtpmap","mediadesc","sessiondesc","ufrag","parse_iceufrag","pwd","parse_icepwd","frag","clockrate","channels","elems","foundation","component","ip","generation","tcptype","network","build_icecandidate","hasOwnAttribute","parse_ssrc","pt","haystack","needle","sessionpart","needles","setupRTC","getUserMediaWithConstraints","TraceablePeerConnection","constraints","navigator","mozGetUserMedia","mozRTCPeerConnection","webkitRTCPeerConnection","updateLog","maxstats","what","time","onnegotiationneeded","ondatachannel","names","endTime","values","times","dumpSDP","description","prop","Object","defineProperty","removeStream","createDataChannel","opts","successCallback","failureCallback","offer","answer","RTC","userAgent","browser","getUserMedia","attachMediaStream","mozSrcObject","play","mozRTCSessionDescription","mozRTCIceCandidate","webkitGetUserMedia","webkitURL","createObjectURL","optional","DtlsSrtpKeyAgreement","um","resolution","bandwidth","fps","chromeMediaSource","minWidth","minHeight","maxFrameRate","maxWidth","maxHeight","minFrameRate","root","factory","define","amd","module","exports","Salsa20","rounds","sigmaWords","keyWords","nonceWords","counterWords","block","blockUsed","setKey","setNonce","getBytes","numberOfBytes","out","_generateBlock","_incrementCounter","getHexString","hex","bytes","u","j0","j1","j2","j3","j4","j5","j6","j7","j8","j9","j10","j11","j12","j13","j14","j15","x0","x1","x2","x3","x4","x5","x6","x7","x8","x9","x10","x11","x12","x13","x14","x15","msCrypto","require","BigInt","findPrimes","n","ans","millerRabin","mr_x1","dup","mr_r","mr_a","copy_","addInt_","isZero","bpe","rightShift_","powMod_","equalsInt","equals","squareMod_","bitSize","z","expand","int2bigInt","mod","mod_","trim","mult","mult_","powMod","sub","sub_","add","add_","inverseMod","inverseMod_","multMod","multMod_","randBigInt","randBigInt_","randomBitInt","max","copyInt_","eg_u","eg_v","eg_A","eg_B","eg_C","eg_D","halve_","greater","negative","inverseModInt","greaterShift","kx","ky","divide_","r","y1","y2","leftShift_","subShift_","radix","linCombShift_","addShift_","modInt","bits","minSize","buff","str2bigInt","base","kk","bb","digitsStr","multInt_","bigInt2str","s6","divInt_","ys","ss","s4","s5","s0","k1","k2","kn","np","s7","s3","mont_","one","ui","t2","ks","sa","divMod","den","subMod","two","twoToThe","bigInt2bits","bi","pad","ba","_num2bin","ba2bigInt","mpi","getSeed","randomBytes","randomByte","primes","buf","getRandomValues","Uint8Array","CryptoJS","C","C_lib","lib","Base","extend","overrides","mixIn","$super","create","instance","properties","propertyName","clone","WordArray","words","sigBytes","encoder","Hex","wordArray","thisWords","thatWords","thisSigBytes","thatSigBytes","clamp","thatByte","nBytes","C_enc","enc","hexChars","bite","hexStr","hexStrLength","Latin1","latin1Chars","latin1Str","latin1StrLength","Utf8","decodeURIComponent","escape","utf8Str","unescape","encodeURIComponent","BufferedBlockAlgorithm","_nDataBytes","_append","_process","doFlush","dataWords","dataSigBytes","blockSize","blockSizeBytes","nBlocksReady","_minBufferSize","nWordsReady","nBytesReady","offset","_doProcessBlock","processedWords","C_algo","Hasher","cfg","_doReset","messageUpdate","finalize","_doFinalize","_createHelper","hasher","_createHmacHelper","HMAC","algo","_map","base64Chars","byte1","byte2","byte3","paddingChar","base64Str","base64StrLength","paddingIndex","bits1","bits2","Cipher","EvpKDF","createEncryptor","_ENC_XFORM_MODE","createDecryptor","_DEC_XFORM_MODE","xformMode","_xformMode","_key","process","dataUpdate","finalProcessedData","keySize","ivSize","selectCipherStrategy","PasswordBasedCipher","SerializableCipher","cipher","encrypt","decrypt","ciphertext","C_mode","StreamCipher","finalProcessedBlocks","mode","BlockCipherMode","iv","Encryptor","Decryptor","_cipher","_iv","CBC","xorBlock","_prevBlock","processBlock","encryptBlock","thisBlock","decryptBlock","C_pad","Pkcs7","nPaddingBytes","paddingWord","paddingWords","padding","unpad","CipherParams","BlockCipher","modeCreator","_mode","cipherParams","formatter","C_format","format","OpenSSLFormatter","OpenSSL","openSSLStr","ciphertextWords","encryptor","cipherCfg","algorithm","_parse","plaintext","C_kdf","kdf","OpenSSLKdf","execute","compute","derivedParams","SBOX","INV_SBOX","SUB_MIX_0","SUB_MIX_1","SUB_MIX_2","SUB_MIX_3","INV_SUB_MIX_0","INV_SUB_MIX_1","INV_SUB_MIX_2","INV_SUB_MIX_3","xi","sx","RCON","AES","nRounds","_nRounds","ksRows","keySchedule","_keySchedule","ksRow","invKeySchedule","_invKeySchedule","invKsRow","M","_doCryptBlock","s1","s2","round","t0","t1","t3","W","SHA1","_hash","H","nBitsTotal","nBitsLeft","HmacSHA1","K","isPrime","sqrtN","sqrt","factor","getFractionalBits","nPrime","SHA256","f","g","gamma0x","gamma0","gamma1x","gamma1","ch","maj","sigma0","sigma1","HmacSHA256","_hasher","hasherBlockSize","hasherBlockSizeBytes","oKey","_oKey","iKey","_iKey","oKeyWords","iKeyWords","innerHash","hmac","NoPadding","CTR","counter","_counter","keystream","EventEmitter","indexOfListener","listeners","listener","alias","getListeners","evt","events","_getEvents","flattenListeners","flatListeners","getListenersAsObject","addListener","listenerIsWrapped","once","on","addOnceListener","defineEvent","defineEvents","evts","removeListener","index","off","addListeners","manipulateListeners","removeListeners","remove","single","multiple","RegExp","removeEvent","_events","emitEvent","args","_getOnceReturnValue","emit","setOnceReturnValue","_onceReturnValue","OTR","DSA","CONST","N","G","MSGSTATE_PLAINTEXT","MSGSTATE_ENCRYPTED","MSGSTATE_FINISHED","AUTHSTATE_NONE","AUTHSTATE_AWAITING_DHKEY","AUTHSTATE_AWAITING_REVEALSIG","AUTHSTATE_AWAITING_SIG","WHITESPACE_TAG","WHITESPACE_TAG_V2","WHITESPACE_TAG_V3","OTR_TAG","OTR_VERSION_1","OTR_VERSION_2","OTR_VERSION_3","SMPSTATE_EXPECT0","SMPSTATE_EXPECT1","SMPSTATE_EXPECT2","SMPSTATE_EXPECT3","SMPSTATE_EXPECT4","STATUS_SEND_QUERY","STATUS_AKE_INIT","STATUS_AKE_SUCCESS","STATUS_END_OTR","intCompare","HLP","DTS","BYTE","SHORT","INT","MAC","SIG","WRAPPER_BEGIN","WRAPPER_END","TWO","Ctor","constructor","__super__","compare","str1","str2","randomExponent","smpHash","fmpi","smpi","sha256","packBytes","packMPI","bits2bigInt","makeMac","aesctr","mac","make1Mac","encryptAes","aesctr_decoded","decryptAes","multPowMod","ZKP","v","GTOE","between","checkGroup","N_MINUS_2","h1","secbytes","sha1","h2","_toString","val","nex","packINT","packCtr","padCtr","ctr","unpackCtr","toByteArray","unpack","arr","packData","packSHORT","short","unpackSHORT","packTLV","readLen","readData","readMPI","packMPIs","reduce","prv","cur","unpackMPIs","mpis","splitype","wrapMsg","fs","v3","our_it","their_it","its","ei","mf","mfs","_bin2num","rv","ary","iz","remain","timer","makeRandom","isProbPrime","B","l","rpprb","generatePrimes","bit_length","rem","repeat","bit_lengths","LM1","bl4","brk","ONE","pm1","KEY_TYPE","ZERO","nocache","tokenizeStr","end","lastIndexOf","splt","es","parseLibotr","o","Worker","WWPath","__dirname","keys","1024","2048","packPublic","packPrivate","generateNonce","priv","rand","sign","pk","parsePublic","fields","parsePrivate","libotr","dsa","verify","hm","u1","u2","createInWebWorker","cb","path","seed","worker","postMessage","imports","Parse","parseMsg","otr","initFragment","ind","com","msgFragment","vers","2","3","qs","qi","cls","instance_tags","ERROR_START_AKE","sendQueryMsg","checkInstanceTags","hMac","gx","gy","kid","AKE","our_dh","our_old_dh","our_keyid","their_y","their_keyid","their_priv_pk","ssid","transmittedRS","meth","createKeys","privateKey","c_prime","m1","m2","m1_prime","m2_prime","verifySignMac","our_dh_pk","vmac","pub","makeM","publicKey","akeSuccess","their_old_y","sessKeys","DHSession","otr_version","authstate","msgstate","myhashed","dhcommit","encrypted","hashed","sendStored","handleAKE","vsm","ourHash","theirHash","dh","gxmpi","sendMsg","our_instance_tag","their_instance_tag","fragment_size","io","initiateAKE","SM","reqs","our_fp","their_fp","Q","smpstate","secret","makeSecret","our","makeG2s","a2","a3","g2a","g3a","computeGs","g2","g3","computePQ","computeR","QoQ","computeRab","computeC","computeD","handleSM","r2","r3","r7","t4","rab","tmp2","cR","d7","ms","trust","expectStates",4,5,7,"question","g3ao","c3","d2","d3","r4","r5","r6","cP","d5","d6","PoP","rcvSecret","OTRCB","send_interval","outgoing","instance_tag","makeInstanceTag","smw","SMWPath","MAX_INT","MAX_UINT","ALLOW_V2","ALLOW_V3","REQUIRE_ENCRYPTION","SEND_WHITESPACE_TAG","WHITESPACE_START_AKE","storedMgs","oldMacKeys","sm","_akeInit","receivedPlaintext","ake","_SMW","method","_smInit","prepareMsg","meta","first","sq","sendbyte","rcvbyte","sendenc","sendmac","rcvenc","rcvmac","rcvmacused","extra_symkey","send_counter","rcv_counter","rotateOurKeys","sk","rotateTheirKeys","esk","notify","aes","handleDataMsg","vt","types","ign","handleTLVs","tlvs","smpSecret","versions","vs","receiveMsg","doAKE","it","severity","sendFile","filename","l1name","endOtr","cache","jsonp","content-type","src","json","T","authBasic","Authorization","del","head","isAllowed","patch","post","put","P","fixLng","functions","namespaces","defaultNs","fallbackNS","fallbackLng","interpolationPrefixEscaped","regexEscape","interpolationPrefix","interpolationSuffixEscaped","interpolationSuffix","lng","detectLanguage","L","toLanguages","useCookie","cookie","read","cookieName","cookieExpirationTime","cookieDomain","detectLngFromLocalStorage","setCurrentLng","setJqueryExt","Deferred","resStore","preload","I","load","J","resolve","promise","deepExtend","keyseparator","dynamicLoad","resGetPath","getAsync","customLoad","_fetch","useLocalStorage","_storeLocal","defaultValueFromContent","defaultValue","prepend","append","selectorAttr","useDataAttrOptions","i18n","escapeInterpolation","regexReplacementEscape","postProcess","reusePrefix","maxRecursion","reuseSuffix","context","count","indefinite_article","A","D","sprintf","shortcutFunction","defaultVariables","nsseparator","sendMissing","missingKeyHandler","X","parseMissingKey","lngs","contextNotFound","pluralNotFound","needsPlural","pluralSuffix","indefiniteNotFound","indefiniteSuffix","E","returnObjectTrees","fallbackOnNull","objectTreeKeyHandler","fallbackOnEmpty","isFallbackLookup","fallbackToDefaultNS","lngWhitelist","detectLngQS","languages","userLanguage","language","lowerCaseLng","toUpperCase","TypeError","Zepto","O","_loadLocal","i18nStamp","localStorageExpirationTime","ajax","dataType","_fetchOne","postMissing","sendMissingTo","resPostPath","sendType","postAsync","reload","&","<",">","\"","'","/","R","setTime","toGMTString","S","getCountyIndexOfLng","applyReplacement","V",1,6,8,9,10,11,12,13,14,15,16,17,18,19,20,21,"rules","numbers","plurals","addRule","currentRule","rule","noAbs","Y","Z","toExponential","parseFloat","toFixed","exec","unshift","setLng","addResourceBundle","hasResourceBundle","addResource","addResources","removeResourceBundle","loadNamespace","loadNamespaces","setDefaultNamespace","translate","exists","pluralExtensions","addPostProcessor","I18next","de","translation","Logging_in","your_connection_is_unencrypted","your_connection_is_encrypted","your_buddy_closed_the_private_connection","start_private","close_private","your_buddy_is_verificated","you_have_only_a_subscription_in_one_way","authentication_query_sent","your_message_wasnt_send_please_end_your_private_conversation","unencrypted_message_received","your_message_wasnt_send_because_you_have_no_valid_subscription","not_available","no_connection","relogin","trying_to_start_private_conversation","Verified","Unverified","private_conversation_started","private_conversation_aborted","your_buddy_closed_the_private_conversation_you_should_do_the_same","conversation_is_now_verified","authentication_failed","your_buddy_is_attempting_to_determine_","to_authenticate_to_your_buddy","enter_the_answer_and_click_answer","enter_the_secret","Creating_your_private_key_","Authenticating_a_buddy_helps_","How_do_you_want_to_authenticate_your_buddy","Select_method","Manual","Question","Secret","To_verify_the_fingerprint_","Your_fingerprint","Buddy_fingerprint","Close","Compared","To_authenticate_using_a_question_","Ask","To_authenticate_pick_a_secret_","Compare","Fingerprints","Authentication","Message","Add_buddy","rename_buddy","delete_buddy","Login","Username","Password","Cancel","Connect","Type_in_the_full_username_","Alias","Add","Subscription_request","You_have_a_request_from","Deny","Approve","Remove_buddy","You_are_about_to_remove_","Continue_without_chat","Please_wait","Login_failed","Sorry_we_cant_authentikate_","Retry","clear_history","New_message_from","Should_we_notify_you_","Please_accept_","Hide_offline","Show_offline","About","dnd","Mute","Unmute","Subscription","both","online","chat","away","xa","offline","none","Unknown_instance_tag","Not_one_of_our_latest_keys","Received_an_unreadable_encrypted_message","Online","Chatty","Away","Extended_away","Offline","Friendship_request","Confirm","Dismiss","Remove","Online_help","FN","FAMILY","GIVEN","NICKNAME","URL","ADR","STREET","EXTADD","LOCALITY","REGION","PCODE","CTRY","TEL","NUMBER","EMAIL","USERID","ORG","ORGNAME","ORGUNIT","TITLE","ROLE","BDAY","DESC","PHOTO","send_message","get_info","Settings","Priority","Save","User_settings","A_fingerprint_","Your_roster_is_empty_add_a","new_buddy","is","Login_options","BOSH_url","Domain","Resource","On_login","Received_an_unencrypted_message","Sorry_your_buddy_doesnt_provide_any_information","Info_about","Authentication_aborted","Authentication_request_received","Do_you_want_to_display_them","Log_in_without_chat","has_come_online","Unknown_sender","You_received_a_message_from_an_unknown_sender","Please_allow_access_to_microphone_and_camera","Incoming_call","Do_you_want_to_accept_the_call_from","Reject","Accept","hang_up","snapshot","mute_my_audio","pause_my_video","fullscreen","Info","Local_IP","Remote_IP","Local_Fingerprint","Remote_Fingerprint","Video_call_not_possible","Start_video_call","Join_chat","Join","Room","Nickname","left_the_building","entered_the_room","is_now_known_as","This_room_is","muc_hidden","keyword","muc_membersonly","muc_moderated","muc_nonanonymous","muc_open","muc_passwordprotected","muc_persistent","muc_public","muc_semianonymous","muc_temporary","muc_unmoderated","muc_unsecured","Continue","Server","Rooms_are_loaded","Could_load_only","muc_explanation","You_already_joined_this_room","This_room_will_be_closed","Room_not_found_","Loading_room_information","Destroy","Leave","changed_subject_to","muc_removed_kicked","muc_removed_info_kicked","muc_removed_banned","muc_removed_info_banned","muc_removed_affiliation","muc_removed_info_affiliation","muc_removed_membersonly","muc_removed_info_membersonly","muc_removed_shutdown","Reason","message_not_send","message_not_send_item-not-found","message_not_send_forbidden","message_not_send_not-acceptable","This_room_has_been_closed","Room_logging_is_enabled","A_password_is_required","You_are_not_on_the_member_list","You_are_banned_from_this_room","Your_desired_nickname_","The_maximum_number_","This_room_is_locked_","You_are_not_allowed_to_create_","Carbon_copy","Enable","en","fr","nds","pl","pt-BR","ro"],"mappings":";;;;;;;;;;;;;;;;;;;;;AAiHA,QAASA,UAASC,GAAG,MAAOC,UAASC,UAAUC,SAASH,GAAc,EAAXA,EAAEI,SAC7D,QAASC,UAASL,GAAG,MAAOM,UAASJ,UAAUC,SAASH,GAAc,EAAXA,EAAEI,SAC7D,QAASG,eAAcC,IAAKC,MAAO,MAAOR,UAASS,eAAeF,IAAKC,OACvE,QAASE,eAAcH,IAAKC,MAAO,MAAOH,UAASI,eAAeF,IAAKC,OAKvE,QAASP,WAAUU,EAAGC,KAGpBD,EAAEC,KAAO,IAAM,KAAS,GAAKA,IAAM,GACnCD,GAAIC,IAAM,IAAM,GAAM,GAAK,IAAMA,GAEjC,IAOIC,GAAGC,EAAGC,EAAGC,KAAMC,KAAMC,KAAMC,KAAMC,KAPjCC,EAAI,GAAIC,OAAM,IACdC,EAAK,WACLC,EAAI,WACJC,EAAI,YACJC,EAAK,UACLC,EAAI,WAGR,KAAKd,EAAI,EAAGA,EAAIF,EAAER,OAAQU,GAAK,GAC/B,CAOE,IANAG,KAAOO,EACPN,KAAOO,EACPN,KAAOO,EACPN,KAAOO,EACPN,KAAOO,EAEFb,EAAI,EAAO,GAAJA,EAAQA,IAEJO,EAAEP,GAAR,GAAJA,EAAiBH,EAAEE,EAAIC,GACbc,IAAIP,EAAEP,EAAE,GAAKO,EAAEP,EAAE,GAAKO,EAAEP,EAAE,IAAMO,EAAEP,EAAE,IAAK,GACvDC,EAAIc,SAASA,SAASD,IAAIL,EAAG,GAAIO,QAAQhB,EAAGU,EAAGC,EAAGC,IACjCG,SAASA,SAASF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KC,OAAS,KAAKC,iBAAmB,KAAKC,kCAAkC,KAAKC,2BAA6B,KAAKC,kCAAkC,KAAKC,0BAA4B,KAAKC,wBAA0B,KAAKC,uBAAyB,KAAKC,+BAAiC,KAAKC,8BAAgC,KAAKC,uBAAyB,KAAKC,oBAAsB,KAAKC,qBAAuB,KAAKC,+BAAiC,KAAKC,YAAc,KAAKC,OAAS"} \ No newline at end of file
+{"version":3,"file":"jsxc.dep.min.js","sources":["jsxc.dep.js"],"names":["b64_sha1","s","binb2b64","core_sha1","str2binb","length","str_sha1","binb2str","b64_hmac_sha1","key","data","core_hmac_sha1","str_hmac_sha1","x","len","i","j","t","olda","oldb","oldc","oldd","olde","w","Array","a","b","c","d","e","rol","safe_add","sha1_ft","sha1_kt","bkey","ipad","opad","hash","concat","y","lsw","msw","num","cnt","str","bin","mask","charCodeAt","String","fromCharCode","binarray","triplet","tab","charAt","Base64","keyStr","obj","encode","input","chr1","chr2","chr3","enc1","enc2","enc3","enc4","output","isNaN","decode","replace","indexOf","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","$build","name","attrs","Strophe","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","undefined","document","implementation","createDocument","documentMode","_getIEXmlDom","appendChild","createElement","xmlGenerator","docStrings","ActiveXObject","xmlElement","k","node","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","debug","msg","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","cond","conflict","typ","getElementsByTagName","newList","mechanisms","_connect_cb","_callback","bodyWrap","conncheck","sasl_scram_sha1","sasl_plain","sasl_digest_md5","sasl_anonymous","legacy_auth","hasFeatures","mech","matched","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","jQuery","trigger","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","extended_presence","room_nick","_ref","_this","test_append_nick","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","_parsePresence","update","c2","_j","_len1","_ref1","_ref2","_ref3","_ref4","_ref5","_ref6","_ref7","states","code","parse","field","identity","query","_k","_len2","identities","var","label","_identities","_features","_items","_onDiscoInfo","_onDiscoItems","addIdentity","category","lang","addFeature","var_name","removeFeature","addItem","call_back","items","_buildIQResult","query_attrs","iqresult","$","HASH","_ver","_knownCapabilities","JSON","localStorage","getItem","_jidVerIndex","disco","CAPS","_delegateCapabilities","generateCapsAttrs","generateVer","sort","_sortIdentities","identitiesLen","featuresLen","curIdent","getCapabilitiesByJid","hasFeatureByJid","feature","isArray","makeArray","querySelector","setItem","stringify","_requestCapabilities","_handleDiscoInfoReply","childNodesLen","_attributesToJsObject","buildIq","vCardEl","VCARD","get","set","error_rb","createBookmarksNode","PUBSUB","add","roomJid","alias","autojoin","conferenceAttr","BOOKMARKS","delete","notify","$field","$form","$item","$opt","Field","Item","Option","helper","__slice","__indexOf","l","fill","src","target","klass","f","_results","createHtmlFieldCouple","div","append","toHTML","children","getHtmlFields","find","opt","toJSON","fields","reported","_types","title","instructions","r","xml","json","form","appendTo","fromXML","instr","fromHTML","addOptions","addOption","addValues","addValue","values","desc","required","_multiTypes","val","vals","multi","v","opts","o","txt","_htmlElementToFieldType","trim","fieldset","DATA","addNode","parseFromResult","n","u","require","exports",1,2,"module","Buffer","arg","fromNumber","fromString","fromObject","allocate","checked","TYPED_ARRAY_SUPPORT","encoding","byteLength","write","object","isBuffer","fromBuffer","fromArray","TypeError","ArrayBuffer","buffer","fromTypedArray","fromArrayLike","fromJsonObject","copy","array","_augment","Uint8Array","_isBuffer","fromPool","poolSize","rootParent","kMaxLength","RangeError","SlowBuffer","subject","buf","utf8ToBytes","base64ToBytes","hexWrite","offset","remaining","strLen","parsed","utf8Write","blitBuffer","asciiWrite","asciiToBytes","binaryWrite","base64Write","ucs2Write","utf16leToBytes","base64Slice","end","base64","fromByteArray","utf8Slice","res","tmp","decodeUtf8Char","asciiSlice","ret","binarySlice","hexSlice","out","toHex","utf16leSlice","bytes","checkOffset","ext","checkInt","max","objectWriteUInt16","littleEndian","objectWriteUInt32","checkIEEE754","writeFloat","noAssert","ieee754","writeDouble","base64clean","stringtrim","INVALID_BASE64_RE","units","Infinity","codePoint","leadSurrogate","byteArray","hi","lo","toByteArray","dst","decodeURIComponent","INSPECT_MAX_BYTES","arr","foo","subarray","compare","isEncoding","list","pos","loweredCase","equals","inspect","byteOffset","arrayIndexOf","foundIndex","readUInt8","writeUInt8","isFinite","_arr","newBuf","sliceLen","readUIntLE","mul","readUIntBE","readUInt16LE","readUInt16BE","readUInt32LE","readUInt32BE","readIntLE","readIntBE","readInt8","readInt16LE","readInt16BE","readInt32LE","readInt32BE","readFloatLE","read","readFloatBE","readDoubleLE","readDoubleBE","writeUIntLE","writeUIntBE","writeUInt16LE","writeUInt16BE","writeUInt32LE","writeUInt32BE","writeIntLE","limit","sub","writeIntBE","writeInt8","writeInt16LE","writeInt16BE","writeInt32LE","writeInt32BE","writeFloatLE","writeFloatBE","writeDoubleLE","writeDoubleBE","targetStart","_set","toArrayBuffer","BP","constructor","toLocaleString","base64-js","is-array",3,"lookup","PLUS","PLUS_URL_SAFE","SLASH","SLASH_URL_SAFE","NUMBER","UPPER","LOWER","b64ToByteArray","b64","L","placeHolders","Arr","uint8ToBase64","uint8","tripletToBase64","temp","extraBytes","base64js",4,"isLE","mLen","nBytes","m","eLen","eMax","eBias","nBits","rt","LN2",5,"Object",6,"EventEmitter","_events","_maxListeners","isFunction","isNumber","isObject","isUndefined","defaultMaxListeners","setMaxListeners","emit","er","args","listeners","addListener","listener","newListener","warned","on","once","g","removeListener","fired","position","removeAllListeners","listenerCount","emitter",7,"create","ctor","superCtor","super_","enumerable","writable","configurable","TempCtor",8,9,"cleanUpNextTick","draining","currentQueue","queue","queueIndex","drainQueue","fun","noop","process","nextTick","browser","env","argv","versions","off","binding","cwd","chdir","umask",10,"./lib/_stream_duplex.js",11,"Duplex","Readable","Writable","readable","allowHalfOpen","onend","_writableState","ended","forEach","xs","objectKeys","keys","util","inherits","method","./_stream_readable","./_stream_writable","_process","core-util-is",12,"PassThrough","Transform","_transform","chunk","cb","./_stream_transform",13,"ReadableState","stream","hwm","highWaterMark","defaultHwm","objectMode","pipes","pipesCount","flowing","endEmitted","reading","needReadable","emittedReadable","readableListening","readableObjectMode","defaultEncoding","ranOut","awaitDrain","readingMore","decoder","StringDecoder","_readableState","Stream","readableAddChunk","state","addToFront","chunkInvalid","isNullOrUndefined","onEofChunk","unshift","emitReadable","maybeReadMore","needMoreData","roundUpToNextPowerOf2","MAX_HWM","howMuchToRead","isNull","isString","emitReadable_","flow","maybeReadMore_","pipeOnDrain","EE","resumeScheduled","resume_","fromList","stringMode","shift","cpy","endReadable","debuglog","setEncoding","enc","nOrig","doRead","_read","pipe","dest","pipeOpts","onunpipe","cleanup","onfinish","ondrain","ondata","needDrain","unpipe","doEnd","stdout","stderr","endFn","dests","ev","wrap","events","_fromList","./_stream_duplex","isarray","string_decoder/",14,"TransformState","afterTransform","needTransform","transforming","writecb","writechunk","ts","_transformState","rs","_flush","done","ws","_write","writeencoding",15,"WriteReq","WritableState","writableObjectMode","ending","finished","noDecode","decodeStrings","writing","corked","bufferProcessing","onwrite","writelen","pendingcb","prefinished","errorEmitted","writeAfterEnd","validChunk","valid","decodeChunk","writeOrBuffer","doWrite","writev","_writev","onwriteError","onwriteStateUpdate","needFinish","clearBuffer","afterWrite","onwriteDrain","finishMaybe","cbs","entry","prefinish","need","endWritable","cork","uncork",16,"ar","isBoolean","isSymbol","isRegExp","re","objectToString","isDate","isError","isPrimitive",17,"./lib/_stream_passthrough.js",18,"./lib/_stream_readable.js","./lib/_stream_transform.js","./lib/_stream_writable.js",19,20,21,"source","didOnEnd","destroy","_isStdio","readable-stream/duplex.js","readable-stream/passthrough.js","readable-stream/readable.js","readable-stream/transform.js","readable-stream/writable.js",22,"assertEncoding","isBufferEncoding","passThroughWrite","utf16DetectIncompleteChar","charReceived","charLength","base64DetectIncompleteChar","surrogateSize","detectIncompleteChar","charBuffer","charStr","available","charCode","size","substring","cr",23,24,"global","ctx","seen","stylize","stylizeNoColor","depth","colors","showHidden","_extend","customInspect","stylizeWithColor","formatValue","styleType","styles","arrayToHash","recurseTimes","primitive","formatPrimitive","visibleKeys","getOwnPropertyNames","formatError","RegExp","base","braces","toUTCString","formatArray","map","formatProperty","reduceToSingleString","simple","getOwnPropertyDescriptor","numLinesEst","reduce","prev","cur","pad","timestamp","time","getHours","getMinutes","getSeconds","getDate","months","getMonth","prop","formatRegExp","format","objects","_","deprecate","deprecated","throwDeprecation","traceDeprecation","noDeprecation","debugEnviron","debugs","NODE_DEBUG","toUpperCase","pid","bold","italic","underline","inverse","white","grey","black","blue","cyan","green","magenta","red","yellow","special","number","boolean","null","regexp","origin","./support/isBuffer",25,"SessionManager","WildEmitter","selfID","full","sessions","peers","prepareSession","descriptionTypes","MediaSession","FileSession","performTieBreak","sess","jingle","contents","description","descType","matching","intersect","pendingDescriptionTypes","screenSharingSupport","webrtc","screenSharing","capabilities","support","peerConnectionConfig","iceServers","url","peerConnectionConstraints","optional","DtlsSrtpKeyAgreement","RtpDataChannels","media","audio","video","BaseSession","addICEServer","addSession","session","peer","peerID","extraData","extraData2","action","isInitiator","createMediaSession","initiator","constraints","createFileTransferSession","endPeerSessions","silent","endAllSessions","_createIncomingSession","meta","_sendError","_log","level","sender","isTieBreak","jingleCondition","pending","pendingAction","transportTypes","transport","transType","jingle-filetransfer-session","jingle-media-session","jingle-session","webrtcsupport","wildemitter",26,"only_once","called","root","previous_async","noConflict","_toString","_isArray","_each","iterator","_map","results","_reduce","memo","_keys","setImmediate","each","completed","eachSeries","iterate","forEachSeries","eachLimit","_eachLimit","forEachLimit","started","running","replenish","doParallel","doParallelLimit","doSeries","_asyncMap","eachfn","index","mapSeries","mapLimit","_mapLimit","inject","foldl","reduceRight","reversed","reverse","foldr","_filter","filter","filterSeries","select","selectSeries","_reject","reject","rejectSeries","_detect","main_callback","detect","detectSeries","some","any","every","all","sortBy","criteria","left","right","auto","tasks","remainingTasks","taskComplete","theCallback","task","taskCallback","safeResults","rkey","requires","ready","retry","times","DEFAULT_TIMES","attempts","wrappedTask","wrappedCallback","wrappedResults","retryAttempt","finalAttempt","seriesCallback","series","waterfall","wrapIterator","next","_parallel","parallel","parallelLimit","makeCallback","concatSeries","whilst","doWhilst","until","doUntil","worker","concurrency","_insert","drain","saturated","workers","empty","kill","idle","priorityQueue","_compareTasks","_binarySearch","sequence","beg","mid","cargo","payload","working","drained","ds","_console_fn","dir","memoize","hasher","queues","memoized","unmemoized","unmemoize","count","counter","timesSeries","seq","fns","newargs","nextargs","compose","_applyEach","go","applyEach","applyEachSeries","forever","define","amd",27,28,"big",29,"FileTransferSession","pc","RTCPeerConnection","useJingle","onIceCandidate","onIceStateChange","onChannelAdded","FileTransfer","Sender","sent","localDescription","offer","algo","Receiver","received","file","receivedFile","maybeReceivedFile","extend","sendChannel","createDataChannel","mandatory","OfferToReceiveAudio","OfferToReceiveVideo","lastModifiedDate","accept","answer","metadata","actualhash","candidate","iceConnectionState","connectionState","signalingState","channel","receive","onSessionInitiate","changes","handleOffer","onSessionAccept","handleAnswer","onSessionTerminate","onDescriptionInfo","onTransportInfo","processIce","extend-object","filetransfer","rtcpeerconnection",30,"chunksize","pacing","processingQueue","reader","FileReader","onload","readAsArrayBuffer","digest","receiveBuffer","hashes","createHash","binaryType","event","Blob","File","iana-hashes",31,"createHmac","getHashes","mapping","md2","md5","sha-1","sha-224","sha-256","sha-384","sha-512","names","algorithm","./lib/get-hashes","create-hash","create-hmac",32,33,"HashNoConstructor","_hash","buffers","Hash","rmd160","sha","outData","alg","./md5","ripemd160","sha.js",34,"toArray","bigEndian","intSize","zeroBuffer","toBuffer","hashSize","chrsz",35,"helpers","./helpers",36,"dup",37,"bytesToWords","words","wordsToBytes","processBlock","H","M","offset_i","M_offset_i","al","bl","cl","dl","dr","zl","f1","hl","f2","f3","f4","f5","rotl","sl","zr","hr","sr","z","nBitsLeft","nBitsTotal","H_i","digestbytes",38,"blockSize","finalSize","_block","_finalSize","_blockSize","_s","ch","_update",39,"Algorithm","sha1","sha224","sha256","sha384","sha512","./sha","./sha1","./sha224","./sha256","./sha384","./sha512",40,"Sha","_w","W","_a","_b","_c","_d","_e","calcW","loop","./hash",41,"Sha1",42,"Sha224","Sha256","_f","_g","_h",43,"S","X","R","Ch","Maj","Sigma0256","Sigma1256","Gamma0256","Gamma1256","K","T1","T2",44,"Sha384","SHA512","_al","_bl","_cl","_dl","_el","_fl","_gl","_hl","writeInt64BE",45,"Sha512","Xl","xl","gamma0","gamma0l","gamma1","gamma1l","Wi7","Wi7l","Wi16","Wi16l","Wil","Wi","maj","majl","sigma0h","sigma0l","sigma1h","sigma1l","Ki","Kil","chl","fl","gl","t1l","t1","t2l","t2",46,"Hmac","blocksize","_alg","_key","ZEROS","_ipad","_opad","create-hash/browser",47,48,"createForEach","arrayFunc","eachFunc","collection","iteratee","thisArg","bindCallback","arrayEach","baseEach","lodash._arrayeach","lodash._baseeach","lodash._bindcallback","lodash.isarray",49,50,"baseForOwn","baseFor","baseProperty","createBaseEach","fromRight","getLength","isLength","iterable","toObject","createBaseFor","keysFunc","props","MAX_SAFE_INTEGER","lodash.keys",51,"isArrayLike","isIndex","reIsUint","shimKeys","keysIn","propsLength","allowIndexes","isArguments","Ctor","isProto","skipIndexes","getNative","objectProto","nativeKeys","lodash._getnative","lodash.isarguments",52,"baseToString","isObjectLike","isNative","objToString","funcTag","reIsNative","fnToString","reIsHostCtor","escapeRegExp","reHasRegExpChars","reRegExpChars",53,"argsTag",54,"argCount","accumulator","other",55,"arrayTag","nativeIsArray",56,"basePropertyDeep","path","pathKey","toPath","baseGet","isKey","reIsPlainProp","reIsDeepProp","pluck","property","lodash._baseget","lodash._topath","lodash.map",57,58,"rePropName","quote","reEscapeChar",59,60,"baseMap","arrayMap","baseCallback","lodash._arraymap","lodash._basecallback",61,62,"baseMatches","baseMatchesProperty","baseIsMatch","matchData","customizer","noCustomizer","objValue","srcValue","baseIsEqual","getMatchData","isArr","isCommon","isStrictComparable","baseSlice","last","pairs","lodash._baseisequal","lodash.pairs",63,"arraySome","predicate","isLoose","stackA","stackB","baseIsEqualDeep","equalFunc","objIsArr","othIsArr","objTag","othTag","objectTag","isTypedArray","objIsObj","othIsObj","isSameTag","equalByTag","objIsWrapped","othIsWrapped","equalArrays","equalObjects","arrLength","othLength","arrValue","othValue","boolTag","dateTag","errorTag","numberTag","regexpTag","stringTag","objProps","objLength","othProps","skipCtor","objCtor","othCtor","lodash.istypedarray",64,"typedArrayTags","mapTag","setTag","weakMapTag","arrayBufferTag","float32Tag","float64Tag","int8Tag","int16Tag","int32Tag","uint8Tag","uint8ClampedTag","uint16Tag","uint32Tag",65,66,67,68,69,70,71,"toSDP","toIncomingSDPOffer","toSessionSDP","direction","toOutgoingSDPOffer","toIncomingSDPAnswer","toOutgoingSDPAnswer","toIncomingMediaSDPOffer","toMediaSDP","toOutgoingMediaSDPOffer","toIncomingMediaSDPAnswer","toOutgoingMediaSDPAnswer","toCandidateSDP","toIncomingJSONOffer","sdp","creators","toSessionJSON","toOutgoingJSONOffer","toIncomingJSONAnswer","toOutgoingJSONAnswer","toIncomingMediaJSONOffer","creator","toMediaJSON","toOutgoingMediaJSONOffer","toIncomingMediaJSONAnswer","toOutgoingMediaJSONAnswer","toCandidateJSON","./lib/tojson","./lib/tosdp",72,"lines","findLine","prefix","mediaLines","sessionLines","prefixLength","findLines","mline","port","formats","rtpmap","clockrate","channels","sctpmap","streams","fmtp","kv","crypto","cipherSuite","keyParams","sessionParams","fingerprint","extmap","idpart","sp","senders","uri","rtcpfb","subtype","parameters","foundation","component","ip","generation","relAddr","relPort","tcpType","network","sourceGroups","semantics","sources","ssrc","groups","bandwidth","msid","mslabel",73,"incoming","responder","both","none","recvonly","sendonly","sendrecv","inactive","outgoing",74,"SENDERS","parsers","idCounter","_setIdCounter","groupLines","payloads","encryption","feedback","headerExtensions","candidates","fingerprints","sctp","trans","rtpmapLines","fmtpLines","fbLines","cryptoLines","mux","extLines","ssrcGroupLines","ssrcLines","msidLine","found","googConferenceFlag","fingerprintLines","setup","fp","ufragLine","pwdLine","ufrag","pwd","candidateLines","sctpmapLines","./parsers","./senders",75,"group","pushedSetup","param","fb","hdrExts","hdr","ssrcGroups","ssrcGroup","ssrcs",76,"dumpSDP","dumpStream","getAudioTracks","track","getVideoTracks","TraceablePeerConnection","peerconnection","PeerConnection","what","onicecandidate","onaddstream","onremovestream","onsignalingstatechange","oniceconnectionstatechange","onnegotiationneeded","ondatachannel","getLocalStreams","getRemoteStreams","defineProperty","remoteDescription","addStream","removeStream","setLocalDescription","successCallback","failureCallback","setRemoteDescription","statsinterval","clearInterval","createOffer","createAnswer","addIceCandidate","getStats","navigator","mozGetUserMedia",77,"enableChromeNativeSimulcast","appVersion","constraint","enableMultiStreamHacks","restrictBandwidth","andyetRestrictBandwidth","batchIceCandidates","andyetBatchIce","batchedIceCandidates","andyetFasterICE","eliminateDuplicateCandidates","andyetDontSignalCandidates","dontSignalCandidates","assumeSetLocalSuccess","andyetAssumeSetLocalSuccess","wtFirefox","andyetFirefoxMakesMeSad","firefoxcandidatebuffer","peerconn","_onIce","_onDataChannel","ice","sdpSessionID","logger","hadLocalStunCandidate","hadRemoteStunCandidate","hadLocalRelayCandidate","hadRemoteRelayCandidate","hadLocalIPv6Candidate","hadRemoteIPv6Candidate","_remoteDataChannels","_localDataChannels","_candidateBuffer","SJJ","_role","localStream","_checkLocalCandidate","cand","_checkRemoteCandidate","contentNames","iceCandidate","IceCandidate","sdpMLineIndex","sdpMid","hasConstraints","mediaConstraints","expandedOffer","hasBw","SessionDescription","answerAudioOnly","_answer","answerBroadcastOnly","sim","hasSim","newssrc","rtxssrc","expandedAnswer","idx","parameter","expandedCandidate","already","bundlePolicy","address","rtcpMuxPolicy","newCand","stat","lodash.foreach","lodash.pluck","sdp-jingle-json","traceablepeerconnection",78,"filterContentSources","filterUnusedLabels","onAddStream","onRemoveStream","_ringing","defineProperties","ringing","mediaType","ring","unmute","active","renegotiate","addStream2","removeStream2","switchStream","oldStream","newStream","audioTracks","addTrack","onSessionInfo","onSourceAdd","newDesc","newContent","newContentDesc","newSSRCs","newGroups","onSourceRemove","same",79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106,107,108,109,"JingleSession","uuid","v4","ACTIONS","content-accept","content-add","content-modify","content-reject","content-remove","description-info","security-info","session-accept","session-info","session-initiate","session-terminate","transport-accept","transport-info","transport-reject","transport-replace","source-add","source-remove","_sessionState","_connectionState","starting","connecting","disconnected","interrupted","requirePending","session-inititate","cancel","decline","okKeys","unknownPayload","onContentAdd","onTransportReplace",110,"rng","getRandomValues","_rnds8","_rnds",111,"ii","oct","_hexToByte","unparse","bth","_byteToHex","v1","clockseq","_clockseq","msecs","nsecs","_lastNSecs","dt","_lastMSecs","tl","tmh","_nodeId","rnds","_rng","_seedBytes","./rng",112,"mozRTCPeerConnection","userAgent","webkitRTCPeerConnection","webkitGetUserMedia","PC","mozRTCIceCandidate","RTCIceCandidate","mozRTCSessionDescription","RTCSessionDescription","MediaStream","webkitMediaStream","AudioContext","webkitAudioContext","videoEl","supportVp8","canPlayType","getUserMedia","msGetUserMedia","browserVersion","supportRTCPeerConnection","supportGetUserMedia","supportDataChannel","supportWebAudio","createMediaStreamSource","supportMediaStream","removeTrack","supportScreenSharing","dataChannel","webAudio","mediaStream",113,"isWildEmitter","callbacks","hasGroup","_groupName","releaseGroup","groupName","specialCallbacks","getWildcardCallbacks","eventName",114,"JXT","_LOOKUP","_LOOKUP_EXT","_TAGS","_CB_DEFINITION","_CB_TAG","_ID","utils","types","ltx","stanzaConstructor","use","getDefinition","JXTClass","getExtensions","withDefinition","withTag","tagged","build","localName","ParentJXT","ChildJXT","multiName","parentName","_NS","_EL","_name","qName","extension","multiExtension","fieldName","Stanza","fieldNames","createRegistry","globalJXT","getGlobalJXT","./lib/helpers","./lib/stanza","./lib/types","lodash.assign",115,"XML_NS","parentNS","Element","selector","findOrCreate","existing","created","defaultVal","getAttributeNS","force","removeAttribute","setAttributeNS","removeAttributeNS","getBoolAttribute","setBoolAttribute","getSubAttribute","subs","setSubAttribute","getBoolSubAttribute","setBoolSubAttribute","setText","getSubText","getTextSub","setSubText","setTextSub","getMultiSubText","extractor","setMultiSubText","builder","getMultiSubAttribute","setMultiSubAttribute","getSubLangText","defaultLang","langs","setSubLangText","getBoolSub","setBoolSub",116,"EXCLUDE","_PREFIXES","namespace","_extensions","_eventname","prefixes","allowedName","isExtensionName","nval",117,"getter","setter","boolAttribute","subAttribute","boolSubAttribute","getSubBoolAttribute","setSubBoolAttribute","textSub","subText","multiTextSub","multiSubText","multiSubAttribute","langTextSub","subLangText","boolSub","langAttribute","b64Text","dateAttribute","toISOString","dateSub","dateSubAttribute","numberAttribute","isFloat","parseFloat","numberSub","attributeNS","enumSub","enumValues","enumVal","exists","subExtension","wrapper","subMultiExtension",118,"assignWith","baseAssign","createAssigner","assign","lodash._baseassign","lodash._createassigner",119,"baseCopy","lodash._basecopy",120,121,"assigner","restParam","guard","isIterateeCall","lodash._isiterateecall","lodash.restparam",122,123,124,"FUNC_ERROR_TEXT","nativeMax","rest","otherArgs",125,126,127,128,129,"DOMElement","_getElement","getName","getNS","getChildren","getAttr","nss","getXmlns","remove","./element",130,"setAttrs","escapeXml","escapeXmlText","is","findNS","namespaces","getChild","getChildByAttr","recursive","getChildrenByAttr","getChildrenByFilter","getChildText","getChildElements","clone","_addChildren","writer",131,"availableSaxParsers","bestSaxParser","./index","./parse","./sax/sax_ltx",132,"Parser","./dom-element",133,"saxParsers","modName","mod","saxParser","ParserMod",134,"unescapeXml","STATE_TEXT","STATE_IGNORE_TAG","STATE_TAG_NAME","STATE_TAG","STATE_ATTR_NAME","STATE_ATTR_EQ","STATE_ATTR_QUOT","STATE_ATTR_VALUE","SaxLtx","remainder","endTag","selfClosing","attrQuote","attrName","recordStart","_handleTagOpening","endRecording","recorded",135,136,137,"requestUserMedia","Promise","resolve","attachMediaStream","reattachMediaStream","webrtcDetectedBrowser","webrtcDetectedVersion","webrtcMinimumVersion","pcConfig","pcConstraints","newIceServers","urls","newServer","username","credential","onError","constraintsToFF37","ideal","exact","advanced","oc","mediaDevices","addEventListener","removeEventListener","enumerateDevices","infos","kind","deviceId","groupId","orgEnumerateDevices","mozSrcObject","nativeMethod","constraintsToChrome","cc","oldname","mix","srcObject","URL","createObjectURL","kinds","MediaStreamTrack","getSources","devices","device",138,"ICE","RemoteCandidate","Candidate","Fingerprint","SctpMap","Content",139,"Iq","topLevel","resultReply","errorReply",140,"REASONS","Jingle","disposition","Description","Transport","Reason","alternativeSession",141,"FBNS","HDRNS","INFONS","SSMANS","GROUPNS","Feedback","Bandwidth","RTP","Crypto","PayloadType","maxptime","ptime","params","ContentGroup","SourceGroup","Source","Mute","Unmute",142,"JSM","RTC","jxt","IqStanza","JingleStanza","peer_constraints","AUTOACCEPT","manager","MozDontOfferDataChannel","offerToReceiveAudio","offerToReceiveVideo","mozDontOfferDataChannel","terminated","peerStreamAdded","peerStreamRemoved","log:error","onJingle","parseXML","outerHTML","initiate","peerjid","terminate","terminateByJid","setICEServers","servers","setPeerConstraints","./stanza/iceUdp.js","./stanza/iq.js","./stanza/jingle.js","./stanza/rtp.js","webrtc-adapter-test","factory","Salsa20","rounds","sigmaWords","keyWords","nonceWords","counterWords","block","blockUsed","setKey","setNonce","getBytes","numberOfBytes","_generateBlock","_incrementCounter","getHexString","hex","j0","j1","j2","j3","j4","j5","j6","j7","j8","j9","j10","j11","j12","j13","j14","j15","x0","x1","x2","x3","x4","x5","x6","x7","x8","x9","x10","x11","x12","x13","x14","x15","msCrypto","BigInt","findPrimes","ans","millerRabin","mr_x1","mr_r","mr_a","copy_","addInt_","isZero","bpe","rightShift_","powMod_","equalsInt","squareMod_","bitSize","expand","int2bigInt","mod_","mult","mult_","powMod","sub_","add_","inverseMod","inverseMod_","multMod","multMod_","randBigInt","randBigInt_","randomBitInt","copyInt_","eg_u","eg_v","eg_A","eg_B","eg_C","eg_D","halve_","greater","negative","inverseModInt","greaterShift","kx","ky","divide_","y1","y2","leftShift_","subShift_","radix","linCombShift_","addShift_","modInt","bits","minSize","buff","str2bigInt","kk","bb","digitsStr","multInt_","bigInt2str","s6","divInt_","ys","ss","s4","s5","s0","k1","k2","kn","np","s7","s3","mont_","one","ui","ks","sa","divMod","den","subMod","two","twoToThe","bigInt2bits","bi","ba","_num2bin","ba2bigInt","mpi","getSeed","randomBytes","randomByte","primes","CryptoJS","C","C_lib","lib","Base","overrides","mixIn","$super","instance","properties","propertyName","WordArray","sigBytes","encoder","Hex","wordArray","thisWords","thatWords","thisSigBytes","thatSigBytes","clamp","thatByte","C_enc","hexChars","bite","hexStr","hexStrLength","Latin1","latin1Chars","latin1Str","latin1StrLength","Utf8","escape","utf8Str","unescape","encodeURIComponent","BufferedBlockAlgorithm","_nDataBytes","_append","doFlush","dataWords","dataSigBytes","blockSizeBytes","nBlocksReady","_minBufferSize","nWordsReady","nBytesReady","_doProcessBlock","processedWords","C_algo","Hasher","cfg","_doReset","messageUpdate","finalize","_doFinalize","_createHelper","_createHmacHelper","HMAC","base64Chars","byte1","byte2","byte3","paddingChar","base64Str","base64StrLength","paddingIndex","bits1","bits2","Cipher","EvpKDF","createEncryptor","_ENC_XFORM_MODE","createDecryptor","_DEC_XFORM_MODE","xformMode","_xformMode","dataUpdate","finalProcessedData","keySize","ivSize","selectCipherStrategy","PasswordBasedCipher","SerializableCipher","cipher","encrypt","decrypt","ciphertext","C_mode","StreamCipher","finalProcessedBlocks","mode","BlockCipherMode","iv","Encryptor","Decryptor","_cipher","_iv","CBC","xorBlock","_prevBlock","encryptBlock","thisBlock","decryptBlock","C_pad","Pkcs7","nPaddingBytes","paddingWord","paddingWords","padding","unpad","CipherParams","BlockCipher","modeCreator","_mode","cipherParams","formatter","C_format","OpenSSLFormatter","OpenSSL","openSSLStr","ciphertextWords","encryptor","cipherCfg","_parse","plaintext","C_kdf","kdf","OpenSSLKdf","execute","compute","derivedParams","SBOX","INV_SBOX","SUB_MIX_0","SUB_MIX_1","SUB_MIX_2","SUB_MIX_3","INV_SUB_MIX_0","INV_SUB_MIX_1","INV_SUB_MIX_2","INV_SUB_MIX_3","xi","sx","RCON","AES","nRounds","_nRounds","ksRows","keySchedule","_keySchedule","ksRow","invKeySchedule","_invKeySchedule","invKsRow","_doCryptBlock","s1","s2","round","t0","t3","SHA1","HmacSHA1","isPrime","sqrtN","sqrt","factor","getFractionalBits","nPrime","SHA256","gamma0x","gamma1x","sigma0","sigma1","HmacSHA256","_hasher","hasherBlockSize","hasherBlockSizeBytes","oKey","_oKey","iKey","_iKey","oKeyWords","iKeyWords","innerHash","hmac","NoPadding","CTR","_counter","keystream","indexOfListener","getListeners","evt","_getEvents","flattenListeners","flatListeners","getListenersAsObject","listenerIsWrapped","addOnceListener","defineEvent","defineEvents","evts","addListeners","manipulateListeners","removeListeners","single","multiple","removeEvent","emitEvent","_getOnceReturnValue","setOnceReturnValue","_onceReturnValue","OTR","DSA","CONST","N","G","MSGSTATE_PLAINTEXT","MSGSTATE_ENCRYPTED","MSGSTATE_FINISHED","AUTHSTATE_NONE","AUTHSTATE_AWAITING_DHKEY","AUTHSTATE_AWAITING_REVEALSIG","AUTHSTATE_AWAITING_SIG","WHITESPACE_TAG","WHITESPACE_TAG_V2","WHITESPACE_TAG_V3","OTR_TAG","OTR_VERSION_1","OTR_VERSION_2","OTR_VERSION_3","SMPSTATE_EXPECT0","SMPSTATE_EXPECT1","SMPSTATE_EXPECT2","SMPSTATE_EXPECT3","SMPSTATE_EXPECT4","STATUS_SEND_QUERY","STATUS_AKE_INIT","STATUS_AKE_SUCCESS","STATUS_END_OTR","intCompare","HLP","DTS","BYTE","SHORT","INT","MAC","SIG","WRAPPER_BEGIN","WRAPPER_END","TWO","__super__","str1","str2","randomExponent","smpHash","fmpi","smpi","packBytes","packMPI","bits2bigInt","makeMac","aesctr","mac","make1Mac","encryptAes","aesctr_decoded","decryptAes","multPowMod","ZKP","GTOE","between","checkGroup","N_MINUS_2","h1","secbytes","h2","nex","packINT","packCtr","padCtr","ctr","unpackCtr","unpack","packData","packSHORT","short","unpackSHORT","packTLV","readLen","readData","readMPI","packMPIs","prv","unpackMPIs","mpis","splitype","wrapMsg","fs","v3","our_it","their_it","its","ei","frag","mf","mfs","_bin2num","rv","ary","iz","remain","timer","makeRandom","isProbPrime","B","rpprb","generatePrimes","bit_length","rem","repeat","bit_lengths","LM1","bl4","brk","ONE","pm1","KEY_TYPE","ZERO","nocache","tokenizeStr","lastIndexOf","splt","es","parseLibotr","Worker","WWPath","__dirname","1024","2048","packPublic","packPrivate","generateNonce","priv","rand","sign","pk","parsePublic","parsePrivate","libotr","dsa","verify","hm","u1","u2","createInWebWorker","seed","postMessage","imports","Parse","parseMsg","otr","initFragment","ind","com","msgFragment","vers","qs","qi","cls","instance_tags","ERROR_START_AKE","sendQueryMsg","checkInstanceTags","hMac","gx","gy","kid","AKE","our_dh","our_old_dh","our_keyid","their_y","their_keyid","their_priv_pk","ssid","transmittedRS","meth","createKeys","privateKey","c_prime","m1","m2","m1_prime","m2_prime","verifySignMac","our_dh_pk","vmac","pub","makeM","publicKey","akeSuccess","their_old_y","sessKeys","DHSession","otr_version","authstate","msgstate","myhashed","dhcommit","encrypted","hashed","sendStored","handleAKE","vsm","ourHash","theirHash","dh","gxmpi","sendMsg","our_instance_tag","their_instance_tag","fragment_size","io","initiateAKE","SM","reqs","our_fp","their_fp","Q","smpstate","secret","makeSecret","our","makeG2s","a2","a3","g2a","g3a","computeGs","g2","g3","computePQ","computeR","QoQ","computeRab","computeC","computeD","handleSM","r2","r3","r7","t4","rab","tmp2","cR","d7","ms","trust","expectStates","question","g3ao","c3","d2","d3","r4","r5","r6","cP","d5","d6","PoP","rcvSecret","OTRCB","send_interval","instance_tag","makeInstanceTag","smw","SMWPath","MAX_INT","MAX_UINT","ALLOW_V2","ALLOW_V3","REQUIRE_ENCRYPTION","SEND_WHITESPACE_TAG","WHITESPACE_START_AKE","storedMgs","oldMacKeys","sm","_akeInit","receivedPlaintext","ake","_SMW","_smInit","prepareMsg","first","sq","sendbyte","rcvbyte","sendenc","sendmac","rcvenc","rcvmac","rcvmacused","extra_symkey","send_counter","rcv_counter","rotateOurKeys","sk","rotateTheirKeys","esk","aes","handleDataMsg","vt","ign","handleTLVs","tlvs","smpSecret","vs","receiveMsg","doAKE","it","severity","sendFile","filename","l1name","endOtr","cache","jsonp","content-type","T","authBasic","Authorization","del","head","isAllowed","patch","post","put","P","fixLng","functions","defaultNs","fallbackNS","fallbackLng","interpolationPrefixEscaped","regexEscape","interpolationPrefix","interpolationSuffixEscaped","interpolationSuffix","lng","detectLanguage","toLanguages","useCookie","cookie","cookieName","cookieExpirationTime","cookieDomain","detectLngFromLocalStorage","setCurrentLng","setJqueryExt","Deferred","resStore","preload","I","load","J","promise","deepExtend","keyseparator","dynamicLoad","resGetPath","getAsync","customLoad","_fetch","useLocalStorage","_storeLocal","defaultValueFromContent","defaultValue","prepend","selectorAttr","useDataAttrOptions","i18n","escapeInterpolation","regexReplacementEscape","postProcess","reusePrefix","maxRecursion","reuseSuffix","context","indefinite_article","A","D","sprintf","shortcutFunction","defaultVariables","nsseparator","sendMissing","missingKeyHandler","parseMissingKey","lngs","contextNotFound","pluralNotFound","needsPlural","pluralSuffix","indefiniteNotFound","indefiniteSuffix","E","returnObjectTrees","fallbackOnNull","objectTreeKeyHandler","fallbackOnEmpty","isFallbackLookup","fallbackToDefaultNS","lngWhitelist","detectLngQS","languages","userLanguage","language","lowerCaseLng","Zepto","O","_loadLocal","i18nStamp","localStorageExpirationTime","ajax","dataType","_fetchOne","postMissing","sendMissingTo","resPostPath","sendType","postAsync","reload","&","<",">","\"","'","/","setTime","toGMTString","getCountyIndexOfLng","applyReplacement","V","rules","numbers","plurals","addRule","currentRule","rule","noAbs","Y","Z","toExponential","toFixed","exec","setLng","addResourceBundle","hasResourceBundle","addResource","addResources","removeResourceBundle","loadNamespace","loadNamespaces","setDefaultNamespace","translate","pluralExtensions","addPostProcessor","className","triggerHandler","st","currTemplate","closeBtn","closeMarkup","tClose","magnificPopup","transition","isIE7","isIE8","isLowIE","isAndroid","isIOS","supportsTransition","probablyMobile","popupsCache","isObj","isOpen","updateItemHTML","mainEl","eq","defaults","fixedContentPos","modal","closeOnContentClick","closeOnBgClick","showCloseBtn","enableEscapeKey","bgOverlay","_checkIfClose","container","contentContainer","preloader","tLoading","modules","closeBtnInside","close_replaceWith","alignTop","overflow","overflowY","overflowX","top","scrollTop","fixedBgPos","height","keyCode","updateSize","addClass","wH","_hasScrollBar","_getScrollbarSize","marginRight","mainClass","_addClassToMFP","prependTo","_lastFocusedEl","activeElement","_setFocus","_onFocusIn","removalDelay","_close","detach","_removeClassFromMFP","removeAttr","currItem","focus","prevHeight","clientWidth","innerWidth","innerHeight","parseEl","markup","removeClass","appendContent","preloaded","hasClass","addGroup","mfpEl","_openClick","delegate","midClick","which","ctrlKey","metaKey","disableOn","width","preventDefault","stopPropagation","updateStatus","stopImmediatePropagation","contains","scrollHeight","_parseMarkup","replaceWith","scrollbarSize","offsetWidth","registerModule","after","hiddenClass","tNotFound","initInline","getInline","inline","inlineElement","settings","cursor","tError","initAjax","getAjax","loadError","image","titleSrc","verticalFit","initImage","resizeImage","_onImageHasSize","hasSize","isCheckingImgSize","imgHidden","findImageSize","setInterval","naturalWidth","getImage","complete","loaded","alt","img_replaceWith","loading","MozTransform","enabled","easing","duration","opener","initZoom","zoom","zIndex","-webkit-backface-visibility","_allowZoom","_getItemToZoom","_getOffset","offsetHeight","transform","srcAction","patterns","youtube","vimeo","gmaps","initIframe","getIframe","iframe","arrowMarkup","navigateByImgClick","arrows","tPrev","tNext","tCounter","initGallery","gallery","Boolean","mfpFastClick","arrowLeft","arrowRight","_preloadTimeout","preloadNearbyImages","destroyMfpFastClick","goTo","_preloadItem","replaceSrc","ratio","initRetina","devicePixelRatio","retina","max-width","originalEvent","touches","clientX","clientY","I18next","de","translation","Logging_in","your_connection_is_unencrypted","your_connection_is_encrypted","your_buddy_closed_the_private_connection","start_private","close_private","your_buddy_is_verificated","you_have_only_a_subscription_in_one_way","authentication_query_sent","your_message_wasnt_send_please_end_your_private_conversation","unencrypted_message_received","not_available","no_connection","relogin","trying_to_start_private_conversation","Verified","Unverified","private_conversation_aborted","your_buddy_closed_the_private_conversation_you_should_do_the_same","conversation_is_now_verified","authentication_failed","Creating_your_private_key_","Authenticating_a_buddy_helps_","How_do_you_want_to_authenticate_your_buddy","Select_method","Manual","Question","Secret","To_verify_the_fingerprint_","Your_fingerprint","Buddy_fingerprint","Close","Compared","To_authenticate_using_a_question_","Ask","To_authenticate_pick_a_secret_","Compare","Fingerprints","Authentication","Message","Add_buddy","rename_buddy","delete_buddy","Login","Username","Password","Cancel","Connect","Type_in_the_full_username_","Alias","Add","Subscription_request","You_have_a_request_from","Deny","Approve","Remove_buddy","You_are_about_to_remove_","Continue_without_chat","Please_wait","Login_failed","Sorry_we_cant_authentikate_","Retry","clear_history","New_message_from","Should_we_notify_you_","Please_accept_","Hide_offline","Show_offline","About","dnd","Subscription","online","chat","away","xa","offline","Unknown_instance_tag","Not_one_of_our_latest_keys","Received_an_unreadable_encrypted_message","Online","Chatty","Away","Extended_away","Offline","Friendship_request","Confirm","Dismiss","Remove","Online_help","FN","FAMILY","GIVEN","NICKNAME","ADR","STREET","EXTADD","LOCALITY","REGION","PCODE","CTRY","TEL","EMAIL","USERID","ORG","ORGNAME","ORGUNIT","TITLE","ROLE","BDAY","DESC","PHOTO","send_message","get_info","Settings","Priority","Save","User_settings","A_fingerprint_","Login_options","BOSH_url","Domain","Resource","On_login","Received_an_unencrypted_message","Sorry_your_buddy_doesnt_provide_any_information","Info_about","Authentication_aborted","Authentication_request_received","Log_in_without_chat","has_come_online","Unknown_sender","Please_allow_access_to_microphone_and_camera","Incoming_call","Do_you_want_to_accept_the_call_from","Reject","Accept","hang_up","snapshot","mute_my_audio","pause_my_video","fullscreen","Info","Local_IP","Remote_IP","Local_Fingerprint","Remote_Fingerprint","Video_call_not_possible","Start_video_call","Join_chat","Join","Room","Nickname","left_the_building","entered_the_room","is_now_known_as","This_room_is","muc_hidden","keyword","muc_membersonly","muc_moderated","muc_nonanonymous","muc_open","muc_passwordprotected","muc_persistent","muc_public","muc_semianonymous","muc_temporary","muc_unmoderated","muc_unsecured","Continue","Server","Rooms_are_loaded","Could_load_only","muc_explanation","You_already_joined_this_room","This_room_will_be_closed","Room_not_found_","Loading_room_information","Destroy","Leave","changed_subject_to","muc_removed_kicked","muc_removed_info_kicked","muc_removed_banned","muc_removed_info_banned","muc_removed_affiliation","muc_removed_info_affiliation","muc_removed_membersonly","muc_removed_info_membersonly","muc_removed_shutdown","message_not_send","message_not_send_item-not-found","message_not_send_forbidden","message_not_send_not-acceptable","This_room_has_been_closed","Room_logging_is_enabled","A_password_is_required","You_are_not_on_the_member_list","You_are_banned_from_this_room","Your_desired_nickname_","The_maximum_number_","This_room_is_locked_","You_are_not_allowed_to_create_","Alert","Call_started","Call_terminated","Carbon_copy","Enable","jingle_reason_busy","jingle_reason_decline","jingle_reason_success","Media_failure","No_local_audio_device","No_local_video_device","Ok","PermissionDeniedError","Use_local_audio_device","Use_local_video_device","is_","You_received_a_message_from_an_unknown_sender_","Your_roster_is_empty_add_","onsmp_explanation_question","onsmp_explanation_secret","from_sender","Verified_private_conversation_started","Unverified_private_conversation_started","en","Bookmark","Auto-join","Edit_bookmark","Room_logging_is_disabled","Room_is_now_non-anoymous","Room_is_now_semi-anonymous","Do_you_want_to_change_the_default_room_configuration","Default","Change","fr","nds","pl","pt-BR","ro","ru","Favico","drawVideo","_stop","_context","clearRect","drawImage","_drawTimeout","animation","link","setIcon","_canvas","hexToRgb","shorthandRegex","merge","def","attrname","mergedOpt","isPageHidden","hidden","msHidden","webkitHidden","mozHidden","_opt","_orig","_img","_ready","_lastBadge","_running","_readyCb","_browser","_animTimeout","_def","bgColor","textColor","fontFamily","fontStyle","elementId","dataUrl","ff","InstallTrigger","chrome","opera","ie","safari","HTMLElement","supported","_queue","isUp","isLeft","step","getIcon","hasAttribute","getContext","icon","circle","more","beginPath","font","textAlign","moveTo","lineTo","quadraticCurveTo","arc","PI","fillStyle","closePath","stroke","fillText","rectangle","fillRect","badge","imageElement","newImg","videoElement","webcam","newVideo","oGetUserMedia","play","elm","getLink","getElementById","canvas","toDataURL","old","fade","popFade","slide","revert","animationType"],"mappings":";;;;;;;;;;;;;;;;;;;;;AAiHA,QAASA,UAASC,GAAG,MAAOC,UAASC,UAAUC,SAASH,GAAc,EAAXA,EAAEI,SAC7D,QAASC,UAASL,GAAG,MAAOM,UAASJ,UAAUC,SAASH,GAAc,EAAXA,EAAEI,SAC7D,QAASG,eAAcC,IAAKC,MAAO,MAAOR,UAASS,eAAeF,IAAKC,OACvE,QAASE,eAAcH,IAAKC,MAAO,MAAOH,UAASI,eAAeF,IAAKC,OAKvE,QAASP,WAAUU,EAAGC,KAGpBD,EAAEC,KAAO,IAAM,KAAS,GAAKA,IAAM,GACnCD,GAAIC,IAAM,IAAM,GAAM,GAAK,IAAMA,GAEjC,IAOIC,GAAGC,EAAGC,EAAGC,KAAMC,KAAMC,KAAMC,KAAMC,KAPjCC,EAAI,GAAIC,OAAM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popup/dist/jquery.magnific-popup.js b/build/js/jsxc/lib/magnific-popup/dist/jquery.magnific-popup.js
new file mode 100644
index 0000000..01f6f38
--- /dev/null
+++ b/build/js/jsxc/lib/magnific-popup/dist/jquery.magnific-popup.js
@@ -0,0 +1,2060 @@
+/*! Magnific Popup - v1.0.0 - 2015-01-03
+* http://dimsemenov.com/plugins/magnific-popup/
+* Copyright (c) 2015 Dmitry Semenov; */
+;(function (factory) {
+if (typeof define === 'function' && define.amd) {
+ // AMD. Register as an anonymous module.
+ define(['jquery'], factory);
+ } else if (typeof exports === 'object') {
+ // Node/CommonJS
+ factory(require('jquery'));
+ } else {
+ // Browser globals
+ factory(window.jQuery || window.Zepto);
+ }
+ }(function($) {
+
+/*>>core*/
+/**
+ *
+ * Magnific Popup Core JS file
+ *
+ */
+
+
+/**
+ * Private static constants
+ */
+var CLOSE_EVENT = 'Close',
+ BEFORE_CLOSE_EVENT = 'BeforeClose',
+ AFTER_CLOSE_EVENT = 'AfterClose',
+ BEFORE_APPEND_EVENT = 'BeforeAppend',
+ MARKUP_PARSE_EVENT = 'MarkupParse',
+ OPEN_EVENT = 'Open',
+ CHANGE_EVENT = 'Change',
+ NS = 'mfp',
+ EVENT_NS = '.' + NS,
+ READY_CLASS = 'mfp-ready',
+ REMOVING_CLASS = 'mfp-removing',
+ PREVENT_CLOSE_CLASS = 'mfp-prevent-close';
+
+
+/**
+ * Private vars
+ */
+/*jshint -W079 */
+var mfp, // As we have only one instance of MagnificPopup object, we define it locally to not to use 'this'
+ MagnificPopup = function(){},
+ _isJQ = !!(window.jQuery),
+ _prevStatus,
+ _window = $(window),
+ _document,
+ _prevContentType,
+ _wrapClasses,
+ _currPopupType;
+
+
+/**
+ * Private functions
+ */
+var _mfpOn = function(name, f) {
+ mfp.ev.on(NS + name + EVENT_NS, f);
+ },
+ _getEl = function(className, appendTo, html, raw) {
+ var el = document.createElement('div');
+ el.className = 'mfp-'+className;
+ if(html) {
+ el.innerHTML = html;
+ }
+ if(!raw) {
+ el = $(el);
+ if(appendTo) {
+ el.appendTo(appendTo);
+ }
+ } else if(appendTo) {
+ appendTo.appendChild(el);
+ }
+ return el;
+ },
+ _mfpTrigger = function(e, data) {
+ mfp.ev.triggerHandler(NS + e, data);
+
+ if(mfp.st.callbacks) {
+ // converts "mfpEventName" to "eventName" callback and triggers it if it's present
+ e = e.charAt(0).toLowerCase() + e.slice(1);
+ if(mfp.st.callbacks[e]) {
+ mfp.st.callbacks[e].apply(mfp, $.isArray(data) ? data : [data]);
+ }
+ }
+ },
+ _getCloseBtn = function(type) {
+ if(type !== _currPopupType || !mfp.currTemplate.closeBtn) {
+ mfp.currTemplate.closeBtn = $( mfp.st.closeMarkup.replace('%title%', mfp.st.tClose ) );
+ _currPopupType = type;
+ }
+ return mfp.currTemplate.closeBtn;
+ },
+ // Initialize Magnific Popup only when called at least once
+ _checkInstance = function() {
+ if(!$.magnificPopup.instance) {
+ /*jshint -W020 */
+ mfp = new MagnificPopup();
+ mfp.init();
+ $.magnificPopup.instance = mfp;
+ }
+ },
+ // CSS transition detection, http://stackoverflow.com/questions/7264899/detect-css-transitions-using-javascript-and-without-modernizr
+ supportsTransitions = function() {
+ var s = document.createElement('p').style, // 's' for style. better to create an element if body yet to exist
+ v = ['ms','O','Moz','Webkit']; // 'v' for vendor
+
+ if( s['transition'] !== undefined ) {
+ return true;
+ }
+
+ while( v.length ) {
+ if( v.pop() + 'Transition' in s ) {
+ return true;
+ }
+ }
+
+ return false;
+ };
+
+
+
+/**
+ * Public functions
+ */
+MagnificPopup.prototype = {
+
+ constructor: MagnificPopup,
+
+ /**
+ * Initializes Magnific Popup plugin.
+ * This function is triggered only once when $.fn.magnificPopup or $.magnificPopup is executed
+ */
+ init: function() {
+ var appVersion = navigator.appVersion;
+ mfp.isIE7 = appVersion.indexOf("MSIE 7.") !== -1;
+ mfp.isIE8 = appVersion.indexOf("MSIE 8.") !== -1;
+ mfp.isLowIE = mfp.isIE7 || mfp.isIE8;
+ mfp.isAndroid = (/android/gi).test(appVersion);
+ mfp.isIOS = (/iphone|ipad|ipod/gi).test(appVersion);
+ mfp.supportsTransition = supportsTransitions();
+
+ // We disable fixed positioned lightbox on devices that don't handle it nicely.
+ // If you know a better way of detecting this - let me know.
+ mfp.probablyMobile = (mfp.isAndroid || mfp.isIOS || /(Opera Mini)|Kindle|webOS|BlackBerry|(Opera Mobi)|(Windows Phone)|IEMobile/i.test(navigator.userAgent) );
+ _document = $(document);
+
+ mfp.popupsCache = {};
+ },
+
+ /**
+ * Opens popup
+ * @param data [description]
+ */
+ open: function(data) {
+
+ var i;
+
+ if(data.isObj === false) {
+ // convert jQuery collection to array to avoid conflicts later
+ mfp.items = data.items.toArray();
+
+ mfp.index = 0;
+ var items = data.items,
+ item;
+ for(i = 0; i < items.length; i++) {
+ item = items[i];
+ if(item.parsed) {
+ item = item.el[0];
+ }
+ if(item === data.el[0]) {
+ mfp.index = i;
+ break;
+ }
+ }
+ } else {
+ mfp.items = $.isArray(data.items) ? data.items : [data.items];
+ mfp.index = data.index || 0;
+ }
+
+ // if popup is already opened - we just update the content
+ if(mfp.isOpen) {
+ mfp.updateItemHTML();
+ return;
+ }
+
+ mfp.types = [];
+ _wrapClasses = '';
+ if(data.mainEl && data.mainEl.length) {
+ mfp.ev = data.mainEl.eq(0);
+ } else {
+ mfp.ev = _document;
+ }
+
+ if(data.key) {
+ if(!mfp.popupsCache[data.key]) {
+ mfp.popupsCache[data.key] = {};
+ }
+ mfp.currTemplate = mfp.popupsCache[data.key];
+ } else {
+ mfp.currTemplate = {};
+ }
+
+
+
+ mfp.st = $.extend(true, {}, $.magnificPopup.defaults, data );
+ mfp.fixedContentPos = mfp.st.fixedContentPos === 'auto' ? !mfp.probablyMobile : mfp.st.fixedContentPos;
+
+ if(mfp.st.modal) {
+ mfp.st.closeOnContentClick = false;
+ mfp.st.closeOnBgClick = false;
+ mfp.st.showCloseBtn = false;
+ mfp.st.enableEscapeKey = false;
+ }
+
+
+ // Building markup
+ // main containers are created only once
+ if(!mfp.bgOverlay) {
+
+ // Dark overlay
+ mfp.bgOverlay = _getEl('bg').on('click'+EVENT_NS, function() {
+ mfp.close();
+ });
+
+ mfp.wrap = _getEl('wrap').attr('tabindex', -1).on('click'+EVENT_NS, function(e) {
+ if(mfp._checkIfClose(e.target)) {
+ mfp.close();
+ }
+ });
+
+ mfp.container = _getEl('container', mfp.wrap);
+ }
+
+ mfp.contentContainer = _getEl('content');
+ if(mfp.st.preloader) {
+ mfp.preloader = _getEl('preloader', mfp.container, mfp.st.tLoading);
+ }
+
+
+ // Initializing modules
+ var modules = $.magnificPopup.modules;
+ for(i = 0; i < modules.length; i++) {
+ var n = modules[i];
+ n = n.charAt(0).toUpperCase() + n.slice(1);
+ mfp['init'+n].call(mfp);
+ }
+ _mfpTrigger('BeforeOpen');
+
+
+ if(mfp.st.showCloseBtn) {
+ // Close button
+ if(!mfp.st.closeBtnInside) {
+ mfp.wrap.append( _getCloseBtn() );
+ } else {
+ _mfpOn(MARKUP_PARSE_EVENT, function(e, template, values, item) {
+ values.close_replaceWith = _getCloseBtn(item.type);
+ });
+ _wrapClasses += ' mfp-close-btn-in';
+ }
+ }
+
+ if(mfp.st.alignTop) {
+ _wrapClasses += ' mfp-align-top';
+ }
+
+
+
+ if(mfp.fixedContentPos) {
+ mfp.wrap.css({
+ overflow: mfp.st.overflowY,
+ overflowX: 'hidden',
+ overflowY: mfp.st.overflowY
+ });
+ } else {
+ mfp.wrap.css({
+ top: _window.scrollTop(),
+ position: 'absolute'
+ });
+ }
+ if( mfp.st.fixedBgPos === false || (mfp.st.fixedBgPos === 'auto' && !mfp.fixedContentPos) ) {
+ mfp.bgOverlay.css({
+ height: _document.height(),
+ position: 'absolute'
+ });
+ }
+
+
+
+ if(mfp.st.enableEscapeKey) {
+ // Close on ESC key
+ _document.on('keyup' + EVENT_NS, function(e) {
+ if(e.keyCode === 27) {
+ mfp.close();
+ }
+ });
+ }
+
+ _window.on('resize' + EVENT_NS, function() {
+ mfp.updateSize();
+ });
+
+
+ if(!mfp.st.closeOnContentClick) {
+ _wrapClasses += ' mfp-auto-cursor';
+ }
+
+ if(_wrapClasses)
+ mfp.wrap.addClass(_wrapClasses);
+
+
+ // this triggers recalculation of layout, so we get it once to not to trigger twice
+ var windowHeight = mfp.wH = _window.height();
+
+
+ var windowStyles = {};
+
+ if( mfp.fixedContentPos ) {
+ if(mfp._hasScrollBar(windowHeight)){
+ var s = mfp._getScrollbarSize();
+ if(s) {
+ windowStyles.marginRight = s;
+ }
+ }
+ }
+
+ if(mfp.fixedContentPos) {
+ if(!mfp.isIE7) {
+ windowStyles.overflow = 'hidden';
+ } else {
+ // ie7 double-scroll bug
+ $('body, html').css('overflow', 'hidden');
+ }
+ }
+
+
+
+ var classesToadd = mfp.st.mainClass;
+ if(mfp.isIE7) {
+ classesToadd += ' mfp-ie7';
+ }
+ if(classesToadd) {
+ mfp._addClassToMFP( classesToadd );
+ }
+
+ // add content
+ mfp.updateItemHTML();
+
+ _mfpTrigger('BuildControls');
+
+ // remove scrollbar, add margin e.t.c
+ $('html').css(windowStyles);
+
+ // add everything to DOM
+ mfp.bgOverlay.add(mfp.wrap).prependTo( mfp.st.prependTo || $(document.body) );
+
+ // Save last focused element
+ mfp._lastFocusedEl = document.activeElement;
+
+ // Wait for next cycle to allow CSS transition
+ setTimeout(function() {
+
+ if(mfp.content) {
+ mfp._addClassToMFP(READY_CLASS);
+ mfp._setFocus();
+ } else {
+ // if content is not defined (not loaded e.t.c) we add class only for BG
+ mfp.bgOverlay.addClass(READY_CLASS);
+ }
+
+ // Trap the focus in popup
+ _document.on('focusin' + EVENT_NS, mfp._onFocusIn);
+
+ }, 16);
+
+ mfp.isOpen = true;
+ mfp.updateSize(windowHeight);
+ _mfpTrigger(OPEN_EVENT);
+
+ return data;
+ },
+
+ /**
+ * Closes the popup
+ */
+ close: function() {
+ if(!mfp.isOpen) return;
+ _mfpTrigger(BEFORE_CLOSE_EVENT);
+
+ mfp.isOpen = false;
+ // for CSS3 animation
+ if(mfp.st.removalDelay && !mfp.isLowIE && mfp.supportsTransition ) {
+ mfp._addClassToMFP(REMOVING_CLASS);
+ setTimeout(function() {
+ mfp._close();
+ }, mfp.st.removalDelay);
+ } else {
+ mfp._close();
+ }
+ },
+
+ /**
+ * Helper for close() function
+ */
+ _close: function() {
+ _mfpTrigger(CLOSE_EVENT);
+
+ var classesToRemove = REMOVING_CLASS + ' ' + READY_CLASS + ' ';
+
+ mfp.bgOverlay.detach();
+ mfp.wrap.detach();
+ mfp.container.empty();
+
+ if(mfp.st.mainClass) {
+ classesToRemove += mfp.st.mainClass + ' ';
+ }
+
+ mfp._removeClassFromMFP(classesToRemove);
+
+ if(mfp.fixedContentPos) {
+ var windowStyles = {marginRight: ''};
+ if(mfp.isIE7) {
+ $('body, html').css('overflow', '');
+ } else {
+ windowStyles.overflow = '';
+ }
+ $('html').css(windowStyles);
+ }
+
+ _document.off('keyup' + EVENT_NS + ' focusin' + EVENT_NS);
+ mfp.ev.off(EVENT_NS);
+
+ // clean up DOM elements that aren't removed
+ mfp.wrap.attr('class', 'mfp-wrap').removeAttr('style');
+ mfp.bgOverlay.attr('class', 'mfp-bg');
+ mfp.container.attr('class', 'mfp-container');
+
+ // remove close button from target element
+ if(mfp.st.showCloseBtn &&
+ (!mfp.st.closeBtnInside || mfp.currTemplate[mfp.currItem.type] === true)) {
+ if(mfp.currTemplate.closeBtn)
+ mfp.currTemplate.closeBtn.detach();
+ }
+
+
+ if(mfp._lastFocusedEl) {
+ $(mfp._lastFocusedEl).focus(); // put tab focus back
+ }
+ mfp.currItem = null;
+ mfp.content = null;
+ mfp.currTemplate = null;
+ mfp.prevHeight = 0;
+
+ _mfpTrigger(AFTER_CLOSE_EVENT);
+ },
+
+ updateSize: function(winHeight) {
+
+ if(mfp.isIOS) {
+ // fixes iOS nav bars https://github.com/dimsemenov/Magnific-Popup/issues/2
+ var zoomLevel = document.documentElement.clientWidth / window.innerWidth;
+ var height = window.innerHeight * zoomLevel;
+ mfp.wrap.css('height', height);
+ mfp.wH = height;
+ } else {
+ mfp.wH = winHeight || _window.height();
+ }
+ // Fixes #84: popup incorrectly positioned with position:relative on body
+ if(!mfp.fixedContentPos) {
+ mfp.wrap.css('height', mfp.wH);
+ }
+
+ _mfpTrigger('Resize');
+
+ },
+
+ /**
+ * Set content of popup based on current index
+ */
+ updateItemHTML: function() {
+ var item = mfp.items[mfp.index];
+
+ // Detach and perform modifications
+ mfp.contentContainer.detach();
+
+ if(mfp.content)
+ mfp.content.detach();
+
+ if(!item.parsed) {
+ item = mfp.parseEl( mfp.index );
+ }
+
+ var type = item.type;
+
+ _mfpTrigger('BeforeChange', [mfp.currItem ? mfp.currItem.type : '', type]);
+ // BeforeChange event works like so:
+ // _mfpOn('BeforeChange', function(e, prevType, newType) { });
+
+ mfp.currItem = item;
+
+
+
+
+
+ if(!mfp.currTemplate[type]) {
+ var markup = mfp.st[type] ? mfp.st[type].markup : false;
+
+ // allows to modify markup
+ _mfpTrigger('FirstMarkupParse', markup);
+
+ if(markup) {
+ mfp.currTemplate[type] = $(markup);
+ } else {
+ // if there is no markup found we just define that template is parsed
+ mfp.currTemplate[type] = true;
+ }
+ }
+
+ if(_prevContentType && _prevContentType !== item.type) {
+ mfp.container.removeClass('mfp-'+_prevContentType+'-holder');
+ }
+
+ var newContent = mfp['get' + type.charAt(0).toUpperCase() + type.slice(1)](item, mfp.currTemplate[type]);
+ mfp.appendContent(newContent, type);
+
+ item.preloaded = true;
+
+ _mfpTrigger(CHANGE_EVENT, item);
+ _prevContentType = item.type;
+
+ // Append container back after its content changed
+ mfp.container.prepend(mfp.contentContainer);
+
+ _mfpTrigger('AfterChange');
+ },
+
+
+ /**
+ * Set HTML content of popup
+ */
+ appendContent: function(newContent, type) {
+ mfp.content = newContent;
+
+ if(newContent) {
+ if(mfp.st.showCloseBtn && mfp.st.closeBtnInside &&
+ mfp.currTemplate[type] === true) {
+ // if there is no markup, we just append close button element inside
+ if(!mfp.content.find('.mfp-close').length) {
+ mfp.content.append(_getCloseBtn());
+ }
+ } else {
+ mfp.content = newContent;
+ }
+ } else {
+ mfp.content = '';
+ }
+
+ _mfpTrigger(BEFORE_APPEND_EVENT);
+ mfp.container.addClass('mfp-'+type+'-holder');
+
+ mfp.contentContainer.append(mfp.content);
+ },
+
+
+
+
+ /**
+ * Creates Magnific Popup data object based on given data
+ * @param {int} index Index of item to parse
+ */
+ parseEl: function(index) {
+ var item = mfp.items[index],
+ type;
+
+ if(item.tagName) {
+ item = { el: $(item) };
+ } else {
+ type = item.type;
+ item = { data: item, src: item.src };
+ }
+
+ if(item.el) {
+ var types = mfp.types;
+
+ // check for 'mfp-TYPE' class
+ for(var i = 0; i < types.length; i++) {
+ if( item.el.hasClass('mfp-'+types[i]) ) {
+ type = types[i];
+ break;
+ }
+ }
+
+ item.src = item.el.attr('data-mfp-src');
+ if(!item.src) {
+ item.src = item.el.attr('href');
+ }
+ }
+
+ item.type = type || mfp.st.type || 'inline';
+ item.index = index;
+ item.parsed = true;
+ mfp.items[index] = item;
+ _mfpTrigger('ElementParse', item);
+
+ return mfp.items[index];
+ },
+
+
+ /**
+ * Initializes single popup or a group of popups
+ */
+ addGroup: function(el, options) {
+ var eHandler = function(e) {
+ e.mfpEl = this;
+ mfp._openClick(e, el, options);
+ };
+
+ if(!options) {
+ options = {};
+ }
+
+ var eName = 'click.magnificPopup';
+ options.mainEl = el;
+
+ if(options.items) {
+ options.isObj = true;
+ el.off(eName).on(eName, eHandler);
+ } else {
+ options.isObj = false;
+ if(options.delegate) {
+ el.off(eName).on(eName, options.delegate , eHandler);
+ } else {
+ options.items = el;
+ el.off(eName).on(eName, eHandler);
+ }
+ }
+ },
+ _openClick: function(e, el, options) {
+ var midClick = options.midClick !== undefined ? options.midClick : $.magnificPopup.defaults.midClick;
+
+
+ if(!midClick && ( e.which === 2 || e.ctrlKey || e.metaKey ) ) {
+ return;
+ }
+
+ var disableOn = options.disableOn !== undefined ? options.disableOn : $.magnificPopup.defaults.disableOn;
+
+ if(disableOn) {
+ if($.isFunction(disableOn)) {
+ if( !disableOn.call(mfp) ) {
+ return true;
+ }
+ } else { // else it's number
+ if( _window.width() < disableOn ) {
+ return true;
+ }
+ }
+ }
+
+ if(e.type) {
+ e.preventDefault();
+
+ // This will prevent popup from closing if element is inside and popup is already opened
+ if(mfp.isOpen) {
+ e.stopPropagation();
+ }
+ }
+
+
+ options.el = $(e.mfpEl);
+ if(options.delegate) {
+ options.items = el.find(options.delegate);
+ }
+ mfp.open(options);
+ },
+
+
+ /**
+ * Updates text on preloader
+ */
+ updateStatus: function(status, text) {
+
+ if(mfp.preloader) {
+ if(_prevStatus !== status) {
+ mfp.container.removeClass('mfp-s-'+_prevStatus);
+ }
+
+ if(!text && status === 'loading') {
+ text = mfp.st.tLoading;
+ }
+
+ var data = {
+ status: status,
+ text: text
+ };
+ // allows to modify status
+ _mfpTrigger('UpdateStatus', data);
+
+ status = data.status;
+ text = data.text;
+
+ mfp.preloader.html(text);
+
+ mfp.preloader.find('a').on('click', function(e) {
+ e.stopImmediatePropagation();
+ });
+
+ mfp.container.addClass('mfp-s-'+status);
+ _prevStatus = status;
+ }
+ },
+
+
+ /*
+ "Private" helpers that aren't private at all
+ */
+ // Check to close popup or not
+ // "target" is an element that was clicked
+ _checkIfClose: function(target) {
+
+ if($(target).hasClass(PREVENT_CLOSE_CLASS)) {
+ return;
+ }
+
+ var closeOnContent = mfp.st.closeOnContentClick;
+ var closeOnBg = mfp.st.closeOnBgClick;
+
+ if(closeOnContent && closeOnBg) {
+ return true;
+ } else {
+
+ // We close the popup if click is on close button or on preloader. Or if there is no content.
+ if(!mfp.content || $(target).hasClass('mfp-close') || (mfp.preloader && target === mfp.preloader[0]) ) {
+ return true;
+ }
+
+ // if click is outside the content
+ if( (target !== mfp.content[0] && !$.contains(mfp.content[0], target)) ) {
+ if(closeOnBg) {
+ // last check, if the clicked element is in DOM, (in case it's removed onclick)
+ if( $.contains(document, target) ) {
+ return true;
+ }
+ }
+ } else if(closeOnContent) {
+ return true;
+ }
+
+ }
+ return false;
+ },
+ _addClassToMFP: function(cName) {
+ mfp.bgOverlay.addClass(cName);
+ mfp.wrap.addClass(cName);
+ },
+ _removeClassFromMFP: function(cName) {
+ this.bgOverlay.removeClass(cName);
+ mfp.wrap.removeClass(cName);
+ },
+ _hasScrollBar: function(winHeight) {
+ return ( (mfp.isIE7 ? _document.height() : document.body.scrollHeight) > (winHeight || _window.height()) );
+ },
+ _setFocus: function() {
+ (mfp.st.focus ? mfp.content.find(mfp.st.focus).eq(0) : mfp.wrap).focus();
+ },
+ _onFocusIn: function(e) {
+ if( e.target !== mfp.wrap[0] && !$.contains(mfp.wrap[0], e.target) ) {
+ mfp._setFocus();
+ return false;
+ }
+ },
+ _parseMarkup: function(template, values, item) {
+ var arr;
+ if(item.data) {
+ values = $.extend(item.data, values);
+ }
+ _mfpTrigger(MARKUP_PARSE_EVENT, [template, values, item] );
+
+ $.each(values, function(key, value) {
+ if(value === undefined || value === false) {
+ return true;
+ }
+ arr = key.split('_');
+ if(arr.length > 1) {
+ var el = template.find(EVENT_NS + '-'+arr[0]);
+
+ if(el.length > 0) {
+ var attr = arr[1];
+ if(attr === 'replaceWith') {
+ if(el[0] !== value[0]) {
+ el.replaceWith(value);
+ }
+ } else if(attr === 'img') {
+ if(el.is('img')) {
+ el.attr('src', value);
+ } else {
+ el.replaceWith( '<img src="'+value+'" class="' + el.attr('class') + '" />' );
+ }
+ } else {
+ el.attr(arr[1], value);
+ }
+ }
+
+ } else {
+ template.find(EVENT_NS + '-'+key).html(value);
+ }
+ });
+ },
+
+ _getScrollbarSize: function() {
+ // thx David
+ if(mfp.scrollbarSize === undefined) {
+ var scrollDiv = document.createElement("div");
+ scrollDiv.style.cssText = 'width: 99px; height: 99px; overflow: scroll; position: absolute; top: -9999px;';
+ document.body.appendChild(scrollDiv);
+ mfp.scrollbarSize = scrollDiv.offsetWidth - scrollDiv.clientWidth;
+ document.body.removeChild(scrollDiv);
+ }
+ return mfp.scrollbarSize;
+ }
+
+}; /* MagnificPopup core prototype end */
+
+
+
+
+/**
+ * Public static functions
+ */
+$.magnificPopup = {
+ instance: null,
+ proto: MagnificPopup.prototype,
+ modules: [],
+
+ open: function(options, index) {
+ _checkInstance();
+
+ if(!options) {
+ options = {};
+ } else {
+ options = $.extend(true, {}, options);
+ }
+
+
+ options.isObj = true;
+ options.index = index || 0;
+ return this.instance.open(options);
+ },
+
+ close: function() {
+ return $.magnificPopup.instance && $.magnificPopup.instance.close();
+ },
+
+ registerModule: function(name, module) {
+ if(module.options) {
+ $.magnificPopup.defaults[name] = module.options;
+ }
+ $.extend(this.proto, module.proto);
+ this.modules.push(name);
+ },
+
+ defaults: {
+
+ // Info about options is in docs:
+ // http://dimsemenov.com/plugins/magnific-popup/documentation.html#options
+
+ disableOn: 0,
+
+ key: null,
+
+ midClick: false,
+
+ mainClass: '',
+
+ preloader: true,
+
+ focus: '', // CSS selector of input to focus after popup is opened
+
+ closeOnContentClick: false,
+
+ closeOnBgClick: true,
+
+ closeBtnInside: true,
+
+ showCloseBtn: true,
+
+ enableEscapeKey: true,
+
+ modal: false,
+
+ alignTop: false,
+
+ removalDelay: 0,
+
+ prependTo: null,
+
+ fixedContentPos: 'auto',
+
+ fixedBgPos: 'auto',
+
+ overflowY: 'auto',
+
+ closeMarkup: '<button title="%title%" type="button" class="mfp-close">&times;</button>',
+
+ tClose: 'Close (Esc)',
+
+ tLoading: 'Loading...'
+
+ }
+};
+
+
+
+$.fn.magnificPopup = function(options) {
+ _checkInstance();
+
+ var jqEl = $(this);
+
+ // We call some API method of first param is a string
+ if (typeof options === "string" ) {
+
+ if(options === 'open') {
+ var items,
+ itemOpts = _isJQ ? jqEl.data('magnificPopup') : jqEl[0].magnificPopup,
+ index = parseInt(arguments[1], 10) || 0;
+
+ if(itemOpts.items) {
+ items = itemOpts.items[index];
+ } else {
+ items = jqEl;
+ if(itemOpts.delegate) {
+ items = items.find(itemOpts.delegate);
+ }
+ items = items.eq( index );
+ }
+ mfp._openClick({mfpEl:items}, jqEl, itemOpts);
+ } else {
+ if(mfp.isOpen)
+ mfp[options].apply(mfp, Array.prototype.slice.call(arguments, 1));
+ }
+
+ } else {
+ // clone options obj
+ options = $.extend(true, {}, options);
+
+ /*
+ * As Zepto doesn't support .data() method for objects
+ * and it works only in normal browsers
+ * we assign "options" object directly to the DOM element. FTW!
+ */
+ if(_isJQ) {
+ jqEl.data('magnificPopup', options);
+ } else {
+ jqEl[0].magnificPopup = options;
+ }
+
+ mfp.addGroup(jqEl, options);
+
+ }
+ return jqEl;
+};
+
+
+//Quick benchmark
+/*
+var start = performance.now(),
+ i,
+ rounds = 1000;
+
+for(i = 0; i < rounds; i++) {
+
+}
+console.log('Test #1:', performance.now() - start);
+
+start = performance.now();
+for(i = 0; i < rounds; i++) {
+
+}
+console.log('Test #2:', performance.now() - start);
+*/
+
+
+/*>>core*/
+
+/*>>inline*/
+
+var INLINE_NS = 'inline',
+ _hiddenClass,
+ _inlinePlaceholder,
+ _lastInlineElement,
+ _putInlineElementsBack = function() {
+ if(_lastInlineElement) {
+ _inlinePlaceholder.after( _lastInlineElement.addClass(_hiddenClass) ).detach();
+ _lastInlineElement = null;
+ }
+ };
+
+$.magnificPopup.registerModule(INLINE_NS, {
+ options: {
+ hiddenClass: 'hide', // will be appended with `mfp-` prefix
+ markup: '',
+ tNotFound: 'Content not found'
+ },
+ proto: {
+
+ initInline: function() {
+ mfp.types.push(INLINE_NS);
+
+ _mfpOn(CLOSE_EVENT+'.'+INLINE_NS, function() {
+ _putInlineElementsBack();
+ });
+ },
+
+ getInline: function(item, template) {
+
+ _putInlineElementsBack();
+
+ if(item.src) {
+ var inlineSt = mfp.st.inline,
+ el = $(item.src);
+
+ if(el.length) {
+
+ // If target element has parent - we replace it with placeholder and put it back after popup is closed
+ var parent = el[0].parentNode;
+ if(parent && parent.tagName) {
+ if(!_inlinePlaceholder) {
+ _hiddenClass = inlineSt.hiddenClass;
+ _inlinePlaceholder = _getEl(_hiddenClass);
+ _hiddenClass = 'mfp-'+_hiddenClass;
+ }
+ // replace target inline element with placeholder
+ _lastInlineElement = el.after(_inlinePlaceholder).detach().removeClass(_hiddenClass);
+ }
+
+ mfp.updateStatus('ready');
+ } else {
+ mfp.updateStatus('error', inlineSt.tNotFound);
+ el = $('<div>');
+ }
+
+ item.inlineElement = el;
+ return el;
+ }
+
+ mfp.updateStatus('ready');
+ mfp._parseMarkup(template, {}, item);
+ return template;
+ }
+ }
+});
+
+/*>>inline*/
+
+/*>>ajax*/
+var AJAX_NS = 'ajax',
+ _ajaxCur,
+ _removeAjaxCursor = function() {
+ if(_ajaxCur) {
+ $(document.body).removeClass(_ajaxCur);
+ }
+ },
+ _destroyAjaxRequest = function() {
+ _removeAjaxCursor();
+ if(mfp.req) {
+ mfp.req.abort();
+ }
+ };
+
+$.magnificPopup.registerModule(AJAX_NS, {
+
+ options: {
+ settings: null,
+ cursor: 'mfp-ajax-cur',
+ tError: '<a href="%url%">The content</a> could not be loaded.'
+ },
+
+ proto: {
+ initAjax: function() {
+ mfp.types.push(AJAX_NS);
+ _ajaxCur = mfp.st.ajax.cursor;
+
+ _mfpOn(CLOSE_EVENT+'.'+AJAX_NS, _destroyAjaxRequest);
+ _mfpOn('BeforeChange.' + AJAX_NS, _destroyAjaxRequest);
+ },
+ getAjax: function(item) {
+
+ if(_ajaxCur) {
+ $(document.body).addClass(_ajaxCur);
+ }
+
+ mfp.updateStatus('loading');
+
+ var opts = $.extend({
+ url: item.src,
+ success: function(data, textStatus, jqXHR) {
+ var temp = {
+ data:data,
+ xhr:jqXHR
+ };
+
+ _mfpTrigger('ParseAjax', temp);
+
+ mfp.appendContent( $(temp.data), AJAX_NS );
+
+ item.finished = true;
+
+ _removeAjaxCursor();
+
+ mfp._setFocus();
+
+ setTimeout(function() {
+ mfp.wrap.addClass(READY_CLASS);
+ }, 16);
+
+ mfp.updateStatus('ready');
+
+ _mfpTrigger('AjaxContentAdded');
+ },
+ error: function() {
+ _removeAjaxCursor();
+ item.finished = item.loadError = true;
+ mfp.updateStatus('error', mfp.st.ajax.tError.replace('%url%', item.src));
+ }
+ }, mfp.st.ajax.settings);
+
+ mfp.req = $.ajax(opts);
+
+ return '';
+ }
+ }
+});
+
+
+
+
+
+
+
+/*>>ajax*/
+
+/*>>image*/
+var _imgInterval,
+ _getTitle = function(item) {
+ if(item.data && item.data.title !== undefined)
+ return item.data.title;
+
+ var src = mfp.st.image.titleSrc;
+
+ if(src) {
+ if($.isFunction(src)) {
+ return src.call(mfp, item);
+ } else if(item.el) {
+ return item.el.attr(src) || '';
+ }
+ }
+ return '';
+ };
+
+$.magnificPopup.registerModule('image', {
+
+ options: {
+ markup: '<div class="mfp-figure">'+
+ '<div class="mfp-close"></div>'+
+ '<figure>'+
+ '<div class="mfp-img"></div>'+
+ '<figcaption>'+
+ '<div class="mfp-bottom-bar">'+
+ '<div class="mfp-title"></div>'+
+ '<div class="mfp-counter"></div>'+
+ '</div>'+
+ '</figcaption>'+
+ '</figure>'+
+ '</div>',
+ cursor: 'mfp-zoom-out-cur',
+ titleSrc: 'title',
+ verticalFit: true,
+ tError: '<a href="%url%">The image</a> could not be loaded.'
+ },
+
+ proto: {
+ initImage: function() {
+ var imgSt = mfp.st.image,
+ ns = '.image';
+
+ mfp.types.push('image');
+
+ _mfpOn(OPEN_EVENT+ns, function() {
+ if(mfp.currItem.type === 'image' && imgSt.cursor) {
+ $(document.body).addClass(imgSt.cursor);
+ }
+ });
+
+ _mfpOn(CLOSE_EVENT+ns, function() {
+ if(imgSt.cursor) {
+ $(document.body).removeClass(imgSt.cursor);
+ }
+ _window.off('resize' + EVENT_NS);
+ });
+
+ _mfpOn('Resize'+ns, mfp.resizeImage);
+ if(mfp.isLowIE) {
+ _mfpOn('AfterChange', mfp.resizeImage);
+ }
+ },
+ resizeImage: function() {
+ var item = mfp.currItem;
+ if(!item || !item.img) return;
+
+ if(mfp.st.image.verticalFit) {
+ var decr = 0;
+ // fix box-sizing in ie7/8
+ if(mfp.isLowIE) {
+ decr = parseInt(item.img.css('padding-top'), 10) + parseInt(item.img.css('padding-bottom'),10);
+ }
+ item.img.css('max-height', mfp.wH-decr);
+ }
+ },
+ _onImageHasSize: function(item) {
+ if(item.img) {
+
+ item.hasSize = true;
+
+ if(_imgInterval) {
+ clearInterval(_imgInterval);
+ }
+
+ item.isCheckingImgSize = false;
+
+ _mfpTrigger('ImageHasSize', item);
+
+ if(item.imgHidden) {
+ if(mfp.content)
+ mfp.content.removeClass('mfp-loading');
+
+ item.imgHidden = false;
+ }
+
+ }
+ },
+
+ /**
+ * Function that loops until the image has size to display elements that rely on it asap
+ */
+ findImageSize: function(item) {
+
+ var counter = 0,
+ img = item.img[0],
+ mfpSetInterval = function(delay) {
+
+ if(_imgInterval) {
+ clearInterval(_imgInterval);
+ }
+ // decelerating interval that checks for size of an image
+ _imgInterval = setInterval(function() {
+ if(img.naturalWidth > 0) {
+ mfp._onImageHasSize(item);
+ return;
+ }
+
+ if(counter > 200) {
+ clearInterval(_imgInterval);
+ }
+
+ counter++;
+ if(counter === 3) {
+ mfpSetInterval(10);
+ } else if(counter === 40) {
+ mfpSetInterval(50);
+ } else if(counter === 100) {
+ mfpSetInterval(500);
+ }
+ }, delay);
+ };
+
+ mfpSetInterval(1);
+ },
+
+ getImage: function(item, template) {
+
+ var guard = 0,
+
+ // image load complete handler
+ onLoadComplete = function() {
+ if(item) {
+ if (item.img[0].complete) {
+ item.img.off('.mfploader');
+
+ if(item === mfp.currItem){
+ mfp._onImageHasSize(item);
+
+ mfp.updateStatus('ready');
+ }
+
+ item.hasSize = true;
+ item.loaded = true;
+
+ _mfpTrigger('ImageLoadComplete');
+
+ }
+ else {
+ // if image complete check fails 200 times (20 sec), we assume that there was an error.
+ guard++;
+ if(guard < 200) {
+ setTimeout(onLoadComplete,100);
+ } else {
+ onLoadError();
+ }
+ }
+ }
+ },
+
+ // image error handler
+ onLoadError = function() {
+ if(item) {
+ item.img.off('.mfploader');
+ if(item === mfp.currItem){
+ mfp._onImageHasSize(item);
+ mfp.updateStatus('error', imgSt.tError.replace('%url%', item.src) );
+ }
+
+ item.hasSize = true;
+ item.loaded = true;
+ item.loadError = true;
+ }
+ },
+ imgSt = mfp.st.image;
+
+
+ var el = template.find('.mfp-img');
+ if(el.length) {
+ var img = document.createElement('img');
+ img.className = 'mfp-img';
+ if(item.el && item.el.find('img').length) {
+ img.alt = item.el.find('img').attr('alt');
+ }
+ item.img = $(img).on('load.mfploader', onLoadComplete).on('error.mfploader', onLoadError);
+ img.src = item.src;
+
+ // without clone() "error" event is not firing when IMG is replaced by new IMG
+ // TODO: find a way to avoid such cloning
+ if(el.is('img')) {
+ item.img = item.img.clone();
+ }
+
+ img = item.img[0];
+ if(img.naturalWidth > 0) {
+ item.hasSize = true;
+ } else if(!img.width) {
+ item.hasSize = false;
+ }
+ }
+
+ mfp._parseMarkup(template, {
+ title: _getTitle(item),
+ img_replaceWith: item.img
+ }, item);
+
+ mfp.resizeImage();
+
+ if(item.hasSize) {
+ if(_imgInterval) clearInterval(_imgInterval);
+
+ if(item.loadError) {
+ template.addClass('mfp-loading');
+ mfp.updateStatus('error', imgSt.tError.replace('%url%', item.src) );
+ } else {
+ template.removeClass('mfp-loading');
+ mfp.updateStatus('ready');
+ }
+ return template;
+ }
+
+ mfp.updateStatus('loading');
+ item.loading = true;
+
+ if(!item.hasSize) {
+ item.imgHidden = true;
+ template.addClass('mfp-loading');
+ mfp.findImageSize(item);
+ }
+
+ return template;
+ }
+ }
+});
+
+
+
+/*>>image*/
+
+/*>>zoom*/
+var hasMozTransform,
+ getHasMozTransform = function() {
+ if(hasMozTransform === undefined) {
+ hasMozTransform = document.createElement('p').style.MozTransform !== undefined;
+ }
+ return hasMozTransform;
+ };
+
+$.magnificPopup.registerModule('zoom', {
+
+ options: {
+ enabled: false,
+ easing: 'ease-in-out',
+ duration: 300,
+ opener: function(element) {
+ return element.is('img') ? element : element.find('img');
+ }
+ },
+
+ proto: {
+
+ initZoom: function() {
+ var zoomSt = mfp.st.zoom,
+ ns = '.zoom',
+ image;
+
+ if(!zoomSt.enabled || !mfp.supportsTransition) {
+ return;
+ }
+
+ var duration = zoomSt.duration,
+ getElToAnimate = function(image) {
+ var newImg = image.clone().removeAttr('style').removeAttr('class').addClass('mfp-animated-image'),
+ transition = 'all '+(zoomSt.duration/1000)+'s ' + zoomSt.easing,
+ cssObj = {
+ position: 'fixed',
+ zIndex: 9999,
+ left: 0,
+ top: 0,
+ '-webkit-backface-visibility': 'hidden'
+ },
+ t = 'transition';
+
+ cssObj['-webkit-'+t] = cssObj['-moz-'+t] = cssObj['-o-'+t] = cssObj[t] = transition;
+
+ newImg.css(cssObj);
+ return newImg;
+ },
+ showMainContent = function() {
+ mfp.content.css('visibility', 'visible');
+ },
+ openTimeout,
+ animatedImg;
+
+ _mfpOn('BuildControls'+ns, function() {
+ if(mfp._allowZoom()) {
+
+ clearTimeout(openTimeout);
+ mfp.content.css('visibility', 'hidden');
+
+ // Basically, all code below does is clones existing image, puts in on top of the current one and animated it
+
+ image = mfp._getItemToZoom();
+
+ if(!image) {
+ showMainContent();
+ return;
+ }
+
+ animatedImg = getElToAnimate(image);
+
+ animatedImg.css( mfp._getOffset() );
+
+ mfp.wrap.append(animatedImg);
+
+ openTimeout = setTimeout(function() {
+ animatedImg.css( mfp._getOffset( true ) );
+ openTimeout = setTimeout(function() {
+
+ showMainContent();
+
+ setTimeout(function() {
+ animatedImg.remove();
+ image = animatedImg = null;
+ _mfpTrigger('ZoomAnimationEnded');
+ }, 16); // avoid blink when switching images
+
+ }, duration); // this timeout equals animation duration
+
+ }, 16); // by adding this timeout we avoid short glitch at the beginning of animation
+
+
+ // Lots of timeouts...
+ }
+ });
+ _mfpOn(BEFORE_CLOSE_EVENT+ns, function() {
+ if(mfp._allowZoom()) {
+
+ clearTimeout(openTimeout);
+
+ mfp.st.removalDelay = duration;
+
+ if(!image) {
+ image = mfp._getItemToZoom();
+ if(!image) {
+ return;
+ }
+ animatedImg = getElToAnimate(image);
+ }
+
+
+ animatedImg.css( mfp._getOffset(true) );
+ mfp.wrap.append(animatedImg);
+ mfp.content.css('visibility', 'hidden');
+
+ setTimeout(function() {
+ animatedImg.css( mfp._getOffset() );
+ }, 16);
+ }
+
+ });
+
+ _mfpOn(CLOSE_EVENT+ns, function() {
+ if(mfp._allowZoom()) {
+ showMainContent();
+ if(animatedImg) {
+ animatedImg.remove();
+ }
+ image = null;
+ }
+ });
+ },
+
+ _allowZoom: function() {
+ return mfp.currItem.type === 'image';
+ },
+
+ _getItemToZoom: function() {
+ if(mfp.currItem.hasSize) {
+ return mfp.currItem.img;
+ } else {
+ return false;
+ }
+ },
+
+ // Get element postion relative to viewport
+ _getOffset: function(isLarge) {
+ var el;
+ if(isLarge) {
+ el = mfp.currItem.img;
+ } else {
+ el = mfp.st.zoom.opener(mfp.currItem.el || mfp.currItem);
+ }
+
+ var offset = el.offset();
+ var paddingTop = parseInt(el.css('padding-top'),10);
+ var paddingBottom = parseInt(el.css('padding-bottom'),10);
+ offset.top -= ( $(window).scrollTop() - paddingTop );
+
+
+ /*
+
+ Animating left + top + width/height looks glitchy in Firefox, but perfect in Chrome. And vice-versa.
+
+ */
+ var obj = {
+ width: el.width(),
+ // fix Zepto height+padding issue
+ height: (_isJQ ? el.innerHeight() : el[0].offsetHeight) - paddingBottom - paddingTop
+ };
+
+ // I hate to do this, but there is no another option
+ if( getHasMozTransform() ) {
+ obj['-moz-transform'] = obj['transform'] = 'translate(' + offset.left + 'px,' + offset.top + 'px)';
+ } else {
+ obj.left = offset.left;
+ obj.top = offset.top;
+ }
+ return obj;
+ }
+
+ }
+});
+
+
+
+/*>>zoom*/
+
+/*>>iframe*/
+
+var IFRAME_NS = 'iframe',
+ _emptyPage = '//about:blank',
+
+ _fixIframeBugs = function(isShowing) {
+ if(mfp.currTemplate[IFRAME_NS]) {
+ var el = mfp.currTemplate[IFRAME_NS].find('iframe');
+ if(el.length) {
+ // reset src after the popup is closed to avoid "video keeps playing after popup is closed" bug
+ if(!isShowing) {
+ el[0].src = _emptyPage;
+ }
+
+ // IE8 black screen bug fix
+ if(mfp.isIE8) {
+ el.css('display', isShowing ? 'block' : 'none');
+ }
+ }
+ }
+ };
+
+$.magnificPopup.registerModule(IFRAME_NS, {
+
+ options: {
+ markup: '<div class="mfp-iframe-scaler">'+
+ '<div class="mfp-close"></div>'+
+ '<iframe class="mfp-iframe" src="//about:blank" frameborder="0" allowfullscreen></iframe>'+
+ '</div>',
+
+ srcAction: 'iframe_src',
+
+ // we don't care and support only one default type of URL by default
+ patterns: {
+ youtube: {
+ index: 'youtube.com',
+ id: 'v=',
+ src: '//www.youtube.com/embed/%id%?autoplay=1'
+ },
+ vimeo: {
+ index: 'vimeo.com/',
+ id: '/',
+ src: '//player.vimeo.com/video/%id%?autoplay=1'
+ },
+ gmaps: {
+ index: '//maps.google.',
+ src: '%id%&output=embed'
+ }
+ }
+ },
+
+ proto: {
+ initIframe: function() {
+ mfp.types.push(IFRAME_NS);
+
+ _mfpOn('BeforeChange', function(e, prevType, newType) {
+ if(prevType !== newType) {
+ if(prevType === IFRAME_NS) {
+ _fixIframeBugs(); // iframe if removed
+ } else if(newType === IFRAME_NS) {
+ _fixIframeBugs(true); // iframe is showing
+ }
+ }// else {
+ // iframe source is switched, don't do anything
+ //}
+ });
+
+ _mfpOn(CLOSE_EVENT + '.' + IFRAME_NS, function() {
+ _fixIframeBugs();
+ });
+ },
+
+ getIframe: function(item, template) {
+ var embedSrc = item.src;
+ var iframeSt = mfp.st.iframe;
+
+ $.each(iframeSt.patterns, function() {
+ if(embedSrc.indexOf( this.index ) > -1) {
+ if(this.id) {
+ if(typeof this.id === 'string') {
+ embedSrc = embedSrc.substr(embedSrc.lastIndexOf(this.id)+this.id.length, embedSrc.length);
+ } else {
+ embedSrc = this.id.call( this, embedSrc );
+ }
+ }
+ embedSrc = this.src.replace('%id%', embedSrc );
+ return false; // break;
+ }
+ });
+
+ var dataObj = {};
+ if(iframeSt.srcAction) {
+ dataObj[iframeSt.srcAction] = embedSrc;
+ }
+ mfp._parseMarkup(template, dataObj, item);
+
+ mfp.updateStatus('ready');
+
+ return template;
+ }
+ }
+});
+
+
+
+/*>>iframe*/
+
+/*>>gallery*/
+/**
+ * Get looped index depending on number of slides
+ */
+var _getLoopedId = function(index) {
+ var numSlides = mfp.items.length;
+ if(index > numSlides - 1) {
+ return index - numSlides;
+ } else if(index < 0) {
+ return numSlides + index;
+ }
+ return index;
+ },
+ _replaceCurrTotal = function(text, curr, total) {
+ return text.replace(/%curr%/gi, curr + 1).replace(/%total%/gi, total);
+ };
+
+$.magnificPopup.registerModule('gallery', {
+
+ options: {
+ enabled: false,
+ arrowMarkup: '<button title="%title%" type="button" class="mfp-arrow mfp-arrow-%dir%"></button>',
+ preload: [0,2],
+ navigateByImgClick: true,
+ arrows: true,
+
+ tPrev: 'Previous (Left arrow key)',
+ tNext: 'Next (Right arrow key)',
+ tCounter: '%curr% of %total%'
+ },
+
+ proto: {
+ initGallery: function() {
+
+ var gSt = mfp.st.gallery,
+ ns = '.mfp-gallery',
+ supportsFastClick = Boolean($.fn.mfpFastClick);
+
+ mfp.direction = true; // true - next, false - prev
+
+ if(!gSt || !gSt.enabled ) return false;
+
+ _wrapClasses += ' mfp-gallery';
+
+ _mfpOn(OPEN_EVENT+ns, function() {
+
+ if(gSt.navigateByImgClick) {
+ mfp.wrap.on('click'+ns, '.mfp-img', function() {
+ if(mfp.items.length > 1) {
+ mfp.next();
+ return false;
+ }
+ });
+ }
+
+ _document.on('keydown'+ns, function(e) {
+ if (e.keyCode === 37) {
+ mfp.prev();
+ } else if (e.keyCode === 39) {
+ mfp.next();
+ }
+ });
+ });
+
+ _mfpOn('UpdateStatus'+ns, function(e, data) {
+ if(data.text) {
+ data.text = _replaceCurrTotal(data.text, mfp.currItem.index, mfp.items.length);
+ }
+ });
+
+ _mfpOn(MARKUP_PARSE_EVENT+ns, function(e, element, values, item) {
+ var l = mfp.items.length;
+ values.counter = l > 1 ? _replaceCurrTotal(gSt.tCounter, item.index, l) : '';
+ });
+
+ _mfpOn('BuildControls' + ns, function() {
+ if(mfp.items.length > 1 && gSt.arrows && !mfp.arrowLeft) {
+ var markup = gSt.arrowMarkup,
+ arrowLeft = mfp.arrowLeft = $( markup.replace(/%title%/gi, gSt.tPrev).replace(/%dir%/gi, 'left') ).addClass(PREVENT_CLOSE_CLASS),
+ arrowRight = mfp.arrowRight = $( markup.replace(/%title%/gi, gSt.tNext).replace(/%dir%/gi, 'right') ).addClass(PREVENT_CLOSE_CLASS);
+
+ var eName = supportsFastClick ? 'mfpFastClick' : 'click';
+ arrowLeft[eName](function() {
+ mfp.prev();
+ });
+ arrowRight[eName](function() {
+ mfp.next();
+ });
+
+ // Polyfill for :before and :after (adds elements with classes mfp-a and mfp-b)
+ if(mfp.isIE7) {
+ _getEl('b', arrowLeft[0], false, true);
+ _getEl('a', arrowLeft[0], false, true);
+ _getEl('b', arrowRight[0], false, true);
+ _getEl('a', arrowRight[0], false, true);
+ }
+
+ mfp.container.append(arrowLeft.add(arrowRight));
+ }
+ });
+
+ _mfpOn(CHANGE_EVENT+ns, function() {
+ if(mfp._preloadTimeout) clearTimeout(mfp._preloadTimeout);
+
+ mfp._preloadTimeout = setTimeout(function() {
+ mfp.preloadNearbyImages();
+ mfp._preloadTimeout = null;
+ }, 16);
+ });
+
+
+ _mfpOn(CLOSE_EVENT+ns, function() {
+ _document.off(ns);
+ mfp.wrap.off('click'+ns);
+
+ if(mfp.arrowLeft && supportsFastClick) {
+ mfp.arrowLeft.add(mfp.arrowRight).destroyMfpFastClick();
+ }
+ mfp.arrowRight = mfp.arrowLeft = null;
+ });
+
+ },
+ next: function() {
+ mfp.direction = true;
+ mfp.index = _getLoopedId(mfp.index + 1);
+ mfp.updateItemHTML();
+ },
+ prev: function() {
+ mfp.direction = false;
+ mfp.index = _getLoopedId(mfp.index - 1);
+ mfp.updateItemHTML();
+ },
+ goTo: function(newIndex) {
+ mfp.direction = (newIndex >= mfp.index);
+ mfp.index = newIndex;
+ mfp.updateItemHTML();
+ },
+ preloadNearbyImages: function() {
+ var p = mfp.st.gallery.preload,
+ preloadBefore = Math.min(p[0], mfp.items.length),
+ preloadAfter = Math.min(p[1], mfp.items.length),
+ i;
+
+ for(i = 1; i <= (mfp.direction ? preloadAfter : preloadBefore); i++) {
+ mfp._preloadItem(mfp.index+i);
+ }
+ for(i = 1; i <= (mfp.direction ? preloadBefore : preloadAfter); i++) {
+ mfp._preloadItem(mfp.index-i);
+ }
+ },
+ _preloadItem: function(index) {
+ index = _getLoopedId(index);
+
+ if(mfp.items[index].preloaded) {
+ return;
+ }
+
+ var item = mfp.items[index];
+ if(!item.parsed) {
+ item = mfp.parseEl( index );
+ }
+
+ _mfpTrigger('LazyLoad', item);
+
+ if(item.type === 'image') {
+ item.img = $('<img class="mfp-img" />').on('load.mfploader', function() {
+ item.hasSize = true;
+ }).on('error.mfploader', function() {
+ item.hasSize = true;
+ item.loadError = true;
+ _mfpTrigger('LazyLoadError', item);
+ }).attr('src', item.src);
+ }
+
+
+ item.preloaded = true;
+ }
+ }
+});
+
+/*
+Touch Support that might be implemented some day
+
+addSwipeGesture: function() {
+ var startX,
+ moved,
+ multipleTouches;
+
+ return;
+
+ var namespace = '.mfp',
+ addEventNames = function(pref, down, move, up, cancel) {
+ mfp._tStart = pref + down + namespace;
+ mfp._tMove = pref + move + namespace;
+ mfp._tEnd = pref + up + namespace;
+ mfp._tCancel = pref + cancel + namespace;
+ };
+
+ if(window.navigator.msPointerEnabled) {
+ addEventNames('MSPointer', 'Down', 'Move', 'Up', 'Cancel');
+ } else if('ontouchstart' in window) {
+ addEventNames('touch', 'start', 'move', 'end', 'cancel');
+ } else {
+ return;
+ }
+ _window.on(mfp._tStart, function(e) {
+ var oE = e.originalEvent;
+ multipleTouches = moved = false;
+ startX = oE.pageX || oE.changedTouches[0].pageX;
+ }).on(mfp._tMove, function(e) {
+ if(e.originalEvent.touches.length > 1) {
+ multipleTouches = e.originalEvent.touches.length;
+ } else {
+ //e.preventDefault();
+ moved = true;
+ }
+ }).on(mfp._tEnd + ' ' + mfp._tCancel, function(e) {
+ if(moved && !multipleTouches) {
+ var oE = e.originalEvent,
+ diff = startX - (oE.pageX || oE.changedTouches[0].pageX);
+
+ if(diff > 20) {
+ mfp.next();
+ } else if(diff < -20) {
+ mfp.prev();
+ }
+ }
+ });
+},
+*/
+
+
+/*>>gallery*/
+
+/*>>retina*/
+
+var RETINA_NS = 'retina';
+
+$.magnificPopup.registerModule(RETINA_NS, {
+ options: {
+ replaceSrc: function(item) {
+ return item.src.replace(/\.\w+$/, function(m) { return '@2x' + m; });
+ },
+ ratio: 1 // Function or number. Set to 1 to disable.
+ },
+ proto: {
+ initRetina: function() {
+ if(window.devicePixelRatio > 1) {
+
+ var st = mfp.st.retina,
+ ratio = st.ratio;
+
+ ratio = !isNaN(ratio) ? ratio : ratio();
+
+ if(ratio > 1) {
+ _mfpOn('ImageHasSize' + '.' + RETINA_NS, function(e, item) {
+ item.img.css({
+ 'max-width': item.img[0].naturalWidth / ratio,
+ 'width': '100%'
+ });
+ });
+ _mfpOn('ElementParse' + '.' + RETINA_NS, function(e, item) {
+ item.src = st.replaceSrc(item, ratio);
+ });
+ }
+ }
+
+ }
+ }
+});
+
+/*>>retina*/
+
+/*>>fastclick*/
+/**
+ * FastClick event implementation. (removes 300ms delay on touch devices)
+ * Based on https://developers.google.com/mobile/articles/fast_buttons
+ *
+ * You may use it outside the Magnific Popup by calling just:
+ *
+ * $('.your-el').mfpFastClick(function() {
+ * console.log('Clicked!');
+ * });
+ *
+ * To unbind:
+ * $('.your-el').destroyMfpFastClick();
+ *
+ *
+ * Note that it's a very basic and simple implementation, it blocks ghost click on the same element where it was bound.
+ * If you need something more advanced, use plugin by FT Labs https://github.com/ftlabs/fastclick
+ *
+ */
+
+(function() {
+ var ghostClickDelay = 1000,
+ supportsTouch = 'ontouchstart' in window,
+ unbindTouchMove = function() {
+ _window.off('touchmove'+ns+' touchend'+ns);
+ },
+ eName = 'mfpFastClick',
+ ns = '.'+eName;
+
+
+ // As Zepto.js doesn't have an easy way to add custom events (like jQuery), so we implement it in this way
+ $.fn.mfpFastClick = function(callback) {
+
+ return $(this).each(function() {
+
+ var elem = $(this),
+ lock;
+
+ if( supportsTouch ) {
+
+ var timeout,
+ startX,
+ startY,
+ pointerMoved,
+ point,
+ numPointers;
+
+ elem.on('touchstart' + ns, function(e) {
+ pointerMoved = false;
+ numPointers = 1;
+
+ point = e.originalEvent ? e.originalEvent.touches[0] : e.touches[0];
+ startX = point.clientX;
+ startY = point.clientY;
+
+ _window.on('touchmove'+ns, function(e) {
+ point = e.originalEvent ? e.originalEvent.touches : e.touches;
+ numPointers = point.length;
+ point = point[0];
+ if (Math.abs(point.clientX - startX) > 10 ||
+ Math.abs(point.clientY - startY) > 10) {
+ pointerMoved = true;
+ unbindTouchMove();
+ }
+ }).on('touchend'+ns, function(e) {
+ unbindTouchMove();
+ if(pointerMoved || numPointers > 1) {
+ return;
+ }
+ lock = true;
+ e.preventDefault();
+ clearTimeout(timeout);
+ timeout = setTimeout(function() {
+ lock = false;
+ }, ghostClickDelay);
+ callback();
+ });
+ });
+
+ }
+
+ elem.on('click' + ns, function() {
+ if(!lock) {
+ callback();
+ }
+ });
+ });
+ };
+
+ $.fn.destroyMfpFastClick = function() {
+ $(this).off('touchstart' + ns + ' click' + ns);
+ if(supportsTouch) _window.off('touchmove'+ns+' touchend'+ns);
+ };
+})();
+
+/*>>fastclick*/
+ _checkInstance(); })); \ No newline at end of file
diff --git a/build/js/jsxc/lib/magnific-popup/dist/jquery.magnific-popup.min.js b/build/js/jsxc/lib/magnific-popup/dist/jquery.magnific-popup.min.js
new file mode 100644
index 0000000..ad353b9
--- /dev/null
+++ b/build/js/jsxc/lib/magnific-popup/dist/jquery.magnific-popup.min.js
@@ -0,0 +1,4 @@
+/*! Magnific Popup - v1.0.0 - 2015-01-03
+* http://dimsemenov.com/plugins/magnific-popup/
+* Copyright (c) 2015 Dmitry Semenov; */
+!function(a){"function"==typeof define&&define.amd?define(["jquery"],a):a("object"==typeof exports?require("jquery"):window.jQuery||window.Zepto)}(function(a){var b,c,d,e,f,g,h="Close",i="BeforeClose",j="AfterClose",k="BeforeAppend",l="MarkupParse",m="Open",n="Change",o="mfp",p="."+o,q="mfp-ready",r="mfp-removing",s="mfp-prevent-close",t=function(){},u=!!window.jQuery,v=a(window),w=function(a,c){b.ev.on(o+a+p,c)},x=function(b,c,d,e){var f=document.createElement("div");return f.className="mfp-"+b,d&&(f.innerHTML=d),e?c&&c.appendChild(f):(f=a(f),c&&f.appendTo(c)),f},y=function(c,d){b.ev.triggerHandler(o+c,d),b.st.callbacks&&(c=c.charAt(0).toLowerCase()+c.slice(1),b.st.callbacks[c]&&b.st.callbacks[c].apply(b,a.isArray(d)?d:[d]))},z=function(c){return c===g&&b.currTemplate.closeBtn||(b.currTemplate.closeBtn=a(b.st.closeMarkup.replace("%title%",b.st.tClose)),g=c),b.currTemplate.closeBtn},A=function(){a.magnificPopup.instance||(b=new t,b.init(),a.magnificPopup.instance=b)},B=function(){var a=document.createElement("p").style,b=["ms","O","Moz","Webkit"];if(void 0!==a.transition)return!0;for(;b.length;)if(b.pop()+"Transition"in a)return!0;return!1};t.prototype={constructor:t,init:function(){var c=navigator.appVersion;b.isIE7=-1!==c.indexOf("MSIE 7."),b.isIE8=-1!==c.indexOf("MSIE 8."),b.isLowIE=b.isIE7||b.isIE8,b.isAndroid=/android/gi.test(c),b.isIOS=/iphone|ipad|ipod/gi.test(c),b.supportsTransition=B(),b.probablyMobile=b.isAndroid||b.isIOS||/(Opera Mini)|Kindle|webOS|BlackBerry|(Opera Mobi)|(Windows Phone)|IEMobile/i.test(navigator.userAgent),d=a(document),b.popupsCache={}},open:function(c){var e;if(c.isObj===!1){b.items=c.items.toArray(),b.index=0;var g,h=c.items;for(e=0;e<h.length;e++)if(g=h[e],g.parsed&&(g=g.el[0]),g===c.el[0]){b.index=e;break}}else b.items=a.isArray(c.items)?c.items:[c.items],b.index=c.index||0;if(b.isOpen)return void b.updateItemHTML();b.types=[],f="",b.ev=c.mainEl&&c.mainEl.length?c.mainEl.eq(0):d,c.key?(b.popupsCache[c.key]||(b.popupsCache[c.key]={}),b.currTemplate=b.popupsCache[c.key]):b.currTemplate={},b.st=a.extend(!0,{},a.magnificPopup.defaults,c),b.fixedContentPos="auto"===b.st.fixedContentPos?!b.probablyMobile:b.st.fixedContentPos,b.st.modal&&(b.st.closeOnContentClick=!1,b.st.closeOnBgClick=!1,b.st.showCloseBtn=!1,b.st.enableEscapeKey=!1),b.bgOverlay||(b.bgOverlay=x("bg").on("click"+p,function(){b.close()}),b.wrap=x("wrap").attr("tabindex",-1).on("click"+p,function(a){b._checkIfClose(a.target)&&b.close()}),b.container=x("container",b.wrap)),b.contentContainer=x("content"),b.st.preloader&&(b.preloader=x("preloader",b.container,b.st.tLoading));var i=a.magnificPopup.modules;for(e=0;e<i.length;e++){var j=i[e];j=j.charAt(0).toUpperCase()+j.slice(1),b["init"+j].call(b)}y("BeforeOpen"),b.st.showCloseBtn&&(b.st.closeBtnInside?(w(l,function(a,b,c,d){c.close_replaceWith=z(d.type)}),f+=" mfp-close-btn-in"):b.wrap.append(z())),b.st.alignTop&&(f+=" mfp-align-top"),b.wrap.css(b.fixedContentPos?{overflow:b.st.overflowY,overflowX:"hidden",overflowY:b.st.overflowY}:{top:v.scrollTop(),position:"absolute"}),(b.st.fixedBgPos===!1||"auto"===b.st.fixedBgPos&&!b.fixedContentPos)&&b.bgOverlay.css({height:d.height(),position:"absolute"}),b.st.enableEscapeKey&&d.on("keyup"+p,function(a){27===a.keyCode&&b.close()}),v.on("resize"+p,function(){b.updateSize()}),b.st.closeOnContentClick||(f+=" mfp-auto-cursor"),f&&b.wrap.addClass(f);var k=b.wH=v.height(),n={};if(b.fixedContentPos&&b._hasScrollBar(k)){var o=b._getScrollbarSize();o&&(n.marginRight=o)}b.fixedContentPos&&(b.isIE7?a("body, html").css("overflow","hidden"):n.overflow="hidden");var r=b.st.mainClass;return b.isIE7&&(r+=" mfp-ie7"),r&&b._addClassToMFP(r),b.updateItemHTML(),y("BuildControls"),a("html").css(n),b.bgOverlay.add(b.wrap).prependTo(b.st.prependTo||a(document.body)),b._lastFocusedEl=document.activeElement,setTimeout(function(){b.content?(b._addClassToMFP(q),b._setFocus()):b.bgOverlay.addClass(q),d.on("focusin"+p,b._onFocusIn)},16),b.isOpen=!0,b.updateSize(k),y(m),c},close:function(){b.isOpen&&(y(i),b.isOpen=!1,b.st.removalDelay&&!b.isLowIE&&b.supportsTransition?(b._addClassToMFP(r),setTimeout(function(){b._close()},b.st.removalDelay)):b._close())},_close:function(){y(h);var c=r+" "+q+" ";if(b.bgOverlay.detach(),b.wrap.detach(),b.container.empty(),b.st.mainClass&&(c+=b.st.mainClass+" "),b._removeClassFromMFP(c),b.fixedContentPos){var e={marginRight:""};b.isIE7?a("body, html").css("overflow",""):e.overflow="",a("html").css(e)}d.off("keyup"+p+" focusin"+p),b.ev.off(p),b.wrap.attr("class","mfp-wrap").removeAttr("style"),b.bgOverlay.attr("class","mfp-bg"),b.container.attr("class","mfp-container"),!b.st.showCloseBtn||b.st.closeBtnInside&&b.currTemplate[b.currItem.type]!==!0||b.currTemplate.closeBtn&&b.currTemplate.closeBtn.detach(),b._lastFocusedEl&&a(b._lastFocusedEl).focus(),b.currItem=null,b.content=null,b.currTemplate=null,b.prevHeight=0,y(j)},updateSize:function(a){if(b.isIOS){var c=document.documentElement.clientWidth/window.innerWidth,d=window.innerHeight*c;b.wrap.css("height",d),b.wH=d}else b.wH=a||v.height();b.fixedContentPos||b.wrap.css("height",b.wH),y("Resize")},updateItemHTML:function(){var c=b.items[b.index];b.contentContainer.detach(),b.content&&b.content.detach(),c.parsed||(c=b.parseEl(b.index));var d=c.type;if(y("BeforeChange",[b.currItem?b.currItem.type:"",d]),b.currItem=c,!b.currTemplate[d]){var f=b.st[d]?b.st[d].markup:!1;y("FirstMarkupParse",f),b.currTemplate[d]=f?a(f):!0}e&&e!==c.type&&b.container.removeClass("mfp-"+e+"-holder");var g=b["get"+d.charAt(0).toUpperCase()+d.slice(1)](c,b.currTemplate[d]);b.appendContent(g,d),c.preloaded=!0,y(n,c),e=c.type,b.container.prepend(b.contentContainer),y("AfterChange")},appendContent:function(a,c){b.content=a,a?b.st.showCloseBtn&&b.st.closeBtnInside&&b.currTemplate[c]===!0?b.content.find(".mfp-close").length||b.content.append(z()):b.content=a:b.content="",y(k),b.container.addClass("mfp-"+c+"-holder"),b.contentContainer.append(b.content)},parseEl:function(c){var d,e=b.items[c];if(e.tagName?e={el:a(e)}:(d=e.type,e={data:e,src:e.src}),e.el){for(var f=b.types,g=0;g<f.length;g++)if(e.el.hasClass("mfp-"+f[g])){d=f[g];break}e.src=e.el.attr("data-mfp-src"),e.src||(e.src=e.el.attr("href"))}return e.type=d||b.st.type||"inline",e.index=c,e.parsed=!0,b.items[c]=e,y("ElementParse",e),b.items[c]},addGroup:function(a,c){var d=function(d){d.mfpEl=this,b._openClick(d,a,c)};c||(c={});var e="click.magnificPopup";c.mainEl=a,c.items?(c.isObj=!0,a.off(e).on(e,d)):(c.isObj=!1,c.delegate?a.off(e).on(e,c.delegate,d):(c.items=a,a.off(e).on(e,d)))},_openClick:function(c,d,e){var f=void 0!==e.midClick?e.midClick:a.magnificPopup.defaults.midClick;if(f||2!==c.which&&!c.ctrlKey&&!c.metaKey){var g=void 0!==e.disableOn?e.disableOn:a.magnificPopup.defaults.disableOn;if(g)if(a.isFunction(g)){if(!g.call(b))return!0}else if(v.width()<g)return!0;c.type&&(c.preventDefault(),b.isOpen&&c.stopPropagation()),e.el=a(c.mfpEl),e.delegate&&(e.items=d.find(e.delegate)),b.open(e)}},updateStatus:function(a,d){if(b.preloader){c!==a&&b.container.removeClass("mfp-s-"+c),d||"loading"!==a||(d=b.st.tLoading);var e={status:a,text:d};y("UpdateStatus",e),a=e.status,d=e.text,b.preloader.html(d),b.preloader.find("a").on("click",function(a){a.stopImmediatePropagation()}),b.container.addClass("mfp-s-"+a),c=a}},_checkIfClose:function(c){if(!a(c).hasClass(s)){var d=b.st.closeOnContentClick,e=b.st.closeOnBgClick;if(d&&e)return!0;if(!b.content||a(c).hasClass("mfp-close")||b.preloader&&c===b.preloader[0])return!0;if(c===b.content[0]||a.contains(b.content[0],c)){if(d)return!0}else if(e&&a.contains(document,c))return!0;return!1}},_addClassToMFP:function(a){b.bgOverlay.addClass(a),b.wrap.addClass(a)},_removeClassFromMFP:function(a){this.bgOverlay.removeClass(a),b.wrap.removeClass(a)},_hasScrollBar:function(a){return(b.isIE7?d.height():document.body.scrollHeight)>(a||v.height())},_setFocus:function(){(b.st.focus?b.content.find(b.st.focus).eq(0):b.wrap).focus()},_onFocusIn:function(c){return c.target===b.wrap[0]||a.contains(b.wrap[0],c.target)?void 0:(b._setFocus(),!1)},_parseMarkup:function(b,c,d){var e;d.data&&(c=a.extend(d.data,c)),y(l,[b,c,d]),a.each(c,function(a,c){if(void 0===c||c===!1)return!0;if(e=a.split("_"),e.length>1){var d=b.find(p+"-"+e[0]);if(d.length>0){var f=e[1];"replaceWith"===f?d[0]!==c[0]&&d.replaceWith(c):"img"===f?d.is("img")?d.attr("src",c):d.replaceWith('<img src="'+c+'" class="'+d.attr("class")+'" />'):d.attr(e[1],c)}}else b.find(p+"-"+a).html(c)})},_getScrollbarSize:function(){if(void 0===b.scrollbarSize){var a=document.createElement("div");a.style.cssText="width: 99px; height: 99px; overflow: scroll; position: absolute; top: -9999px;",document.body.appendChild(a),b.scrollbarSize=a.offsetWidth-a.clientWidth,document.body.removeChild(a)}return b.scrollbarSize}},a.magnificPopup={instance:null,proto:t.prototype,modules:[],open:function(b,c){return A(),b=b?a.extend(!0,{},b):{},b.isObj=!0,b.index=c||0,this.instance.open(b)},close:function(){return a.magnificPopup.instance&&a.magnificPopup.instance.close()},registerModule:function(b,c){c.options&&(a.magnificPopup.defaults[b]=c.options),a.extend(this.proto,c.proto),this.modules.push(b)},defaults:{disableOn:0,key:null,midClick:!1,mainClass:"",preloader:!0,focus:"",closeOnContentClick:!1,closeOnBgClick:!0,closeBtnInside:!0,showCloseBtn:!0,enableEscapeKey:!0,modal:!1,alignTop:!1,removalDelay:0,prependTo:null,fixedContentPos:"auto",fixedBgPos:"auto",overflowY:"auto",closeMarkup:'<button title="%title%" type="button" class="mfp-close">&times;</button>',tClose:"Close (Esc)",tLoading:"Loading..."}},a.fn.magnificPopup=function(c){A();var d=a(this);if("string"==typeof c)if("open"===c){var e,f=u?d.data("magnificPopup"):d[0].magnificPopup,g=parseInt(arguments[1],10)||0;f.items?e=f.items[g]:(e=d,f.delegate&&(e=e.find(f.delegate)),e=e.eq(g)),b._openClick({mfpEl:e},d,f)}else b.isOpen&&b[c].apply(b,Array.prototype.slice.call(arguments,1));else c=a.extend(!0,{},c),u?d.data("magnificPopup",c):d[0].magnificPopup=c,b.addGroup(d,c);return d};var C,D,E,F="inline",G=function(){E&&(D.after(E.addClass(C)).detach(),E=null)};a.magnificPopup.registerModule(F,{options:{hiddenClass:"hide",markup:"",tNotFound:"Content not found"},proto:{initInline:function(){b.types.push(F),w(h+"."+F,function(){G()})},getInline:function(c,d){if(G(),c.src){var e=b.st.inline,f=a(c.src);if(f.length){var g=f[0].parentNode;g&&g.tagName&&(D||(C=e.hiddenClass,D=x(C),C="mfp-"+C),E=f.after(D).detach().removeClass(C)),b.updateStatus("ready")}else b.updateStatus("error",e.tNotFound),f=a("<div>");return c.inlineElement=f,f}return b.updateStatus("ready"),b._parseMarkup(d,{},c),d}}});var H,I="ajax",J=function(){H&&a(document.body).removeClass(H)},K=function(){J(),b.req&&b.req.abort()};a.magnificPopup.registerModule(I,{options:{settings:null,cursor:"mfp-ajax-cur",tError:'<a href="%url%">The content</a> could not be loaded.'},proto:{initAjax:function(){b.types.push(I),H=b.st.ajax.cursor,w(h+"."+I,K),w("BeforeChange."+I,K)},getAjax:function(c){H&&a(document.body).addClass(H),b.updateStatus("loading");var d=a.extend({url:c.src,success:function(d,e,f){var g={data:d,xhr:f};y("ParseAjax",g),b.appendContent(a(g.data),I),c.finished=!0,J(),b._setFocus(),setTimeout(function(){b.wrap.addClass(q)},16),b.updateStatus("ready"),y("AjaxContentAdded")},error:function(){J(),c.finished=c.loadError=!0,b.updateStatus("error",b.st.ajax.tError.replace("%url%",c.src))}},b.st.ajax.settings);return b.req=a.ajax(d),""}}});var L,M=function(c){if(c.data&&void 0!==c.data.title)return c.data.title;var d=b.st.image.titleSrc;if(d){if(a.isFunction(d))return d.call(b,c);if(c.el)return c.el.attr(d)||""}return""};a.magnificPopup.registerModule("image",{options:{markup:'<div class="mfp-figure"><div class="mfp-close"></div><figure><div class="mfp-img"></div><figcaption><div class="mfp-bottom-bar"><div class="mfp-title"></div><div class="mfp-counter"></div></div></figcaption></figure></div>',cursor:"mfp-zoom-out-cur",titleSrc:"title",verticalFit:!0,tError:'<a href="%url%">The image</a> could not be loaded.'},proto:{initImage:function(){var c=b.st.image,d=".image";b.types.push("image"),w(m+d,function(){"image"===b.currItem.type&&c.cursor&&a(document.body).addClass(c.cursor)}),w(h+d,function(){c.cursor&&a(document.body).removeClass(c.cursor),v.off("resize"+p)}),w("Resize"+d,b.resizeImage),b.isLowIE&&w("AfterChange",b.resizeImage)},resizeImage:function(){var a=b.currItem;if(a&&a.img&&b.st.image.verticalFit){var c=0;b.isLowIE&&(c=parseInt(a.img.css("padding-top"),10)+parseInt(a.img.css("padding-bottom"),10)),a.img.css("max-height",b.wH-c)}},_onImageHasSize:function(a){a.img&&(a.hasSize=!0,L&&clearInterval(L),a.isCheckingImgSize=!1,y("ImageHasSize",a),a.imgHidden&&(b.content&&b.content.removeClass("mfp-loading"),a.imgHidden=!1))},findImageSize:function(a){var c=0,d=a.img[0],e=function(f){L&&clearInterval(L),L=setInterval(function(){return d.naturalWidth>0?void b._onImageHasSize(a):(c>200&&clearInterval(L),c++,void(3===c?e(10):40===c?e(50):100===c&&e(500)))},f)};e(1)},getImage:function(c,d){var e=0,f=function(){c&&(c.img[0].complete?(c.img.off(".mfploader"),c===b.currItem&&(b._onImageHasSize(c),b.updateStatus("ready")),c.hasSize=!0,c.loaded=!0,y("ImageLoadComplete")):(e++,200>e?setTimeout(f,100):g()))},g=function(){c&&(c.img.off(".mfploader"),c===b.currItem&&(b._onImageHasSize(c),b.updateStatus("error",h.tError.replace("%url%",c.src))),c.hasSize=!0,c.loaded=!0,c.loadError=!0)},h=b.st.image,i=d.find(".mfp-img");if(i.length){var j=document.createElement("img");j.className="mfp-img",c.el&&c.el.find("img").length&&(j.alt=c.el.find("img").attr("alt")),c.img=a(j).on("load.mfploader",f).on("error.mfploader",g),j.src=c.src,i.is("img")&&(c.img=c.img.clone()),j=c.img[0],j.naturalWidth>0?c.hasSize=!0:j.width||(c.hasSize=!1)}return b._parseMarkup(d,{title:M(c),img_replaceWith:c.img},c),b.resizeImage(),c.hasSize?(L&&clearInterval(L),c.loadError?(d.addClass("mfp-loading"),b.updateStatus("error",h.tError.replace("%url%",c.src))):(d.removeClass("mfp-loading"),b.updateStatus("ready")),d):(b.updateStatus("loading"),c.loading=!0,c.hasSize||(c.imgHidden=!0,d.addClass("mfp-loading"),b.findImageSize(c)),d)}}});var N,O=function(){return void 0===N&&(N=void 0!==document.createElement("p").style.MozTransform),N};a.magnificPopup.registerModule("zoom",{options:{enabled:!1,easing:"ease-in-out",duration:300,opener:function(a){return a.is("img")?a:a.find("img")}},proto:{initZoom:function(){var a,c=b.st.zoom,d=".zoom";if(c.enabled&&b.supportsTransition){var e,f,g=c.duration,j=function(a){var b=a.clone().removeAttr("style").removeAttr("class").addClass("mfp-animated-image"),d="all "+c.duration/1e3+"s "+c.easing,e={position:"fixed",zIndex:9999,left:0,top:0,"-webkit-backface-visibility":"hidden"},f="transition";return e["-webkit-"+f]=e["-moz-"+f]=e["-o-"+f]=e[f]=d,b.css(e),b},k=function(){b.content.css("visibility","visible")};w("BuildControls"+d,function(){if(b._allowZoom()){if(clearTimeout(e),b.content.css("visibility","hidden"),a=b._getItemToZoom(),!a)return void k();f=j(a),f.css(b._getOffset()),b.wrap.append(f),e=setTimeout(function(){f.css(b._getOffset(!0)),e=setTimeout(function(){k(),setTimeout(function(){f.remove(),a=f=null,y("ZoomAnimationEnded")},16)},g)},16)}}),w(i+d,function(){if(b._allowZoom()){if(clearTimeout(e),b.st.removalDelay=g,!a){if(a=b._getItemToZoom(),!a)return;f=j(a)}f.css(b._getOffset(!0)),b.wrap.append(f),b.content.css("visibility","hidden"),setTimeout(function(){f.css(b._getOffset())},16)}}),w(h+d,function(){b._allowZoom()&&(k(),f&&f.remove(),a=null)})}},_allowZoom:function(){return"image"===b.currItem.type},_getItemToZoom:function(){return b.currItem.hasSize?b.currItem.img:!1},_getOffset:function(c){var d;d=c?b.currItem.img:b.st.zoom.opener(b.currItem.el||b.currItem);var e=d.offset(),f=parseInt(d.css("padding-top"),10),g=parseInt(d.css("padding-bottom"),10);e.top-=a(window).scrollTop()-f;var h={width:d.width(),height:(u?d.innerHeight():d[0].offsetHeight)-g-f};return O()?h["-moz-transform"]=h.transform="translate("+e.left+"px,"+e.top+"px)":(h.left=e.left,h.top=e.top),h}}});var P="iframe",Q="//about:blank",R=function(a){if(b.currTemplate[P]){var c=b.currTemplate[P].find("iframe");c.length&&(a||(c[0].src=Q),b.isIE8&&c.css("display",a?"block":"none"))}};a.magnificPopup.registerModule(P,{options:{markup:'<div class="mfp-iframe-scaler"><div class="mfp-close"></div><iframe class="mfp-iframe" src="//about:blank" frameborder="0" allowfullscreen></iframe></div>',srcAction:"iframe_src",patterns:{youtube:{index:"youtube.com",id:"v=",src:"//www.youtube.com/embed/%id%?autoplay=1"},vimeo:{index:"vimeo.com/",id:"/",src:"//player.vimeo.com/video/%id%?autoplay=1"},gmaps:{index:"//maps.google.",src:"%id%&output=embed"}}},proto:{initIframe:function(){b.types.push(P),w("BeforeChange",function(a,b,c){b!==c&&(b===P?R():c===P&&R(!0))}),w(h+"."+P,function(){R()})},getIframe:function(c,d){var e=c.src,f=b.st.iframe;a.each(f.patterns,function(){return e.indexOf(this.index)>-1?(this.id&&(e="string"==typeof this.id?e.substr(e.lastIndexOf(this.id)+this.id.length,e.length):this.id.call(this,e)),e=this.src.replace("%id%",e),!1):void 0});var g={};return f.srcAction&&(g[f.srcAction]=e),b._parseMarkup(d,g,c),b.updateStatus("ready"),d}}});var S=function(a){var c=b.items.length;return a>c-1?a-c:0>a?c+a:a},T=function(a,b,c){return a.replace(/%curr%/gi,b+1).replace(/%total%/gi,c)};a.magnificPopup.registerModule("gallery",{options:{enabled:!1,arrowMarkup:'<button title="%title%" type="button" class="mfp-arrow mfp-arrow-%dir%"></button>',preload:[0,2],navigateByImgClick:!0,arrows:!0,tPrev:"Previous (Left arrow key)",tNext:"Next (Right arrow key)",tCounter:"%curr% of %total%"},proto:{initGallery:function(){var c=b.st.gallery,e=".mfp-gallery",g=Boolean(a.fn.mfpFastClick);return b.direction=!0,c&&c.enabled?(f+=" mfp-gallery",w(m+e,function(){c.navigateByImgClick&&b.wrap.on("click"+e,".mfp-img",function(){return b.items.length>1?(b.next(),!1):void 0}),d.on("keydown"+e,function(a){37===a.keyCode?b.prev():39===a.keyCode&&b.next()})}),w("UpdateStatus"+e,function(a,c){c.text&&(c.text=T(c.text,b.currItem.index,b.items.length))}),w(l+e,function(a,d,e,f){var g=b.items.length;e.counter=g>1?T(c.tCounter,f.index,g):""}),w("BuildControls"+e,function(){if(b.items.length>1&&c.arrows&&!b.arrowLeft){var d=c.arrowMarkup,e=b.arrowLeft=a(d.replace(/%title%/gi,c.tPrev).replace(/%dir%/gi,"left")).addClass(s),f=b.arrowRight=a(d.replace(/%title%/gi,c.tNext).replace(/%dir%/gi,"right")).addClass(s),h=g?"mfpFastClick":"click";e[h](function(){b.prev()}),f[h](function(){b.next()}),b.isIE7&&(x("b",e[0],!1,!0),x("a",e[0],!1,!0),x("b",f[0],!1,!0),x("a",f[0],!1,!0)),b.container.append(e.add(f))}}),w(n+e,function(){b._preloadTimeout&&clearTimeout(b._preloadTimeout),b._preloadTimeout=setTimeout(function(){b.preloadNearbyImages(),b._preloadTimeout=null},16)}),void w(h+e,function(){d.off(e),b.wrap.off("click"+e),b.arrowLeft&&g&&b.arrowLeft.add(b.arrowRight).destroyMfpFastClick(),b.arrowRight=b.arrowLeft=null})):!1},next:function(){b.direction=!0,b.index=S(b.index+1),b.updateItemHTML()},prev:function(){b.direction=!1,b.index=S(b.index-1),b.updateItemHTML()},goTo:function(a){b.direction=a>=b.index,b.index=a,b.updateItemHTML()},preloadNearbyImages:function(){var a,c=b.st.gallery.preload,d=Math.min(c[0],b.items.length),e=Math.min(c[1],b.items.length);for(a=1;a<=(b.direction?e:d);a++)b._preloadItem(b.index+a);for(a=1;a<=(b.direction?d:e);a++)b._preloadItem(b.index-a)},_preloadItem:function(c){if(c=S(c),!b.items[c].preloaded){var d=b.items[c];d.parsed||(d=b.parseEl(c)),y("LazyLoad",d),"image"===d.type&&(d.img=a('<img class="mfp-img" />').on("load.mfploader",function(){d.hasSize=!0}).on("error.mfploader",function(){d.hasSize=!0,d.loadError=!0,y("LazyLoadError",d)}).attr("src",d.src)),d.preloaded=!0}}}});var U="retina";a.magnificPopup.registerModule(U,{options:{replaceSrc:function(a){return a.src.replace(/\.\w+$/,function(a){return"@2x"+a})},ratio:1},proto:{initRetina:function(){if(window.devicePixelRatio>1){var a=b.st.retina,c=a.ratio;c=isNaN(c)?c():c,c>1&&(w("ImageHasSize."+U,function(a,b){b.img.css({"max-width":b.img[0].naturalWidth/c,width:"100%"})}),w("ElementParse."+U,function(b,d){d.src=a.replaceSrc(d,c)}))}}}}),function(){var b=1e3,c="ontouchstart"in window,d=function(){v.off("touchmove"+f+" touchend"+f)},e="mfpFastClick",f="."+e;a.fn.mfpFastClick=function(e){return a(this).each(function(){var g,h=a(this);if(c){var i,j,k,l,m,n;h.on("touchstart"+f,function(a){l=!1,n=1,m=a.originalEvent?a.originalEvent.touches[0]:a.touches[0],j=m.clientX,k=m.clientY,v.on("touchmove"+f,function(a){m=a.originalEvent?a.originalEvent.touches:a.touches,n=m.length,m=m[0],(Math.abs(m.clientX-j)>10||Math.abs(m.clientY-k)>10)&&(l=!0,d())}).on("touchend"+f,function(a){d(),l||n>1||(g=!0,a.preventDefault(),clearTimeout(i),i=setTimeout(function(){g=!1},b),e())})})}h.on("click"+f,function(){g||e()})})},a.fn.destroyMfpFastClick=function(){a(this).off("touchstart"+f+" click"+f),c&&v.off("touchmove"+f+" touchend"+f)}}(),A()}); \ No newline at end of file
diff --git a/build/js/jsxc/lib/otr/build/otr.js b/build/js/jsxc/lib/otr/build/otr.js
index c4adabe..1d7fb68 100644
--- a/build/js/jsxc/lib/otr/build/otr.js
+++ b/build/js/jsxc/lib/otr/build/otr.js
@@ -1,6 +1,6 @@
/*!
- otr.js v0.2.14 - 2015-01-16
+ otr.js v0.2.15 - 2015-05-04
(c) 2015 - Arlo Breault <arlolra@gmail.com>
Freely distributed under the MPL v2.0 license.
@@ -2120,8 +2120,12 @@
OTR.prototype.io = function (msg, meta) {
// buffer
- msg = ([].concat(msg)).map(function(m){
- return { msg: m, meta: meta }
+ msg = ([].concat(msg)).map(function(m, i, arr) {
+ var obj = { msg: m }
+ if (!(meta instanceof OTRCB) ||
+ i === (arr.length - 1) // only cb after last fragment is sent
+ ) obj.meta = meta
+ return obj
})
this.outgoing = this.outgoing.concat(msg)
@@ -2610,7 +2614,9 @@
if (this.smw) this.sm.worker.terminate() // destroy webworker
this.sm = null
}
- }
+ } else if (typeof cb === 'function')
+ setTimeout(cb, 0)
+
this.msgstate = CONST.MSGSTATE_PLAINTEXT
this.receivedPlaintext = false
this.trigger('status', [CONST.STATUS_END_OTR])
diff --git a/build/js/jsxc/lib/otr/build/otr.min.js b/build/js/jsxc/lib/otr/build/otr.min.js
index 7d48baf..266eea5 100644
--- a/build/js/jsxc/lib/otr/build/otr.min.js
+++ b/build/js/jsxc/lib/otr/build/otr.min.js
@@ -1,6 +1,6 @@
/*!
- otr.js v0.2.14 - 2015-01-16
+ otr.js v0.2.15 - 2015-05-04
(c) 2015 - Arlo Breault <arlolra@gmail.com>
Freely distributed under the MPL v2.0 license.
@@ -10,4 +10,4 @@
*/
!function(root,factory){"function"==typeof define&&define.amd?define(["bigint","crypto","eventemitter"],function(BigInt,CryptoJS,EventEmitter){var root={BigInt:BigInt,CryptoJS:CryptoJS,EventEmitter:EventEmitter,OTR:{},DSA:{}};return factory.call(root)}):(root.OTR={},root.DSA={},factory.call(root))}(this,function(){return function(){"use strict";var root=this,CONST={N:"FFFFFFFFFFFFFFFFC90FDAA22168C234C4C6628B80DC1CD129024E088A67CC74020BBEA63B139B22514A08798E3404DDEF9519B3CD3A431B302B0A6DF25F14374FE1356D6D51C245E485B576625E7EC6F44C42E9A637ED6B0BFF5CB6F406B7EDEE386BFB5A899FA5AE9F24117C4B1FE649286651ECE45B3DC2007CB8A163BF0598DA48361C55D39A69163FA8FD24CF5F83655D23DCA3AD961C62F356208552BB9ED529077096966D670C354E4ABC9804F1746C08CA237327FFFFFFFFFFFFFFFF",G:"2",MSGSTATE_PLAINTEXT:0,MSGSTATE_ENCRYPTED:1,MSGSTATE_FINISHED:2,AUTHSTATE_NONE:0,AUTHSTATE_AWAITING_DHKEY:1,AUTHSTATE_AWAITING_REVEALSIG:2,AUTHSTATE_AWAITING_SIG:3,WHITESPACE_TAG:" ",WHITESPACE_TAG_V2:" ",WHITESPACE_TAG_V3:" ",OTR_TAG:"?OTR",OTR_VERSION_1:"\x00",OTR_VERSION_2:"\x00",OTR_VERSION_3:"\x00",SMPSTATE_EXPECT0:0,SMPSTATE_EXPECT1:1,SMPSTATE_EXPECT2:2,SMPSTATE_EXPECT3:3,SMPSTATE_EXPECT4:4,STATUS_SEND_QUERY:0,STATUS_AKE_INIT:1,STATUS_AKE_SUCCESS:2,STATUS_END_OTR:3};"undefined"!=typeof module&&module.exports?module.exports=CONST:root.OTR.CONST=CONST}.call(this),function(){"use strict";function intCompare(x,y){var z=~(x^y);return z&=z>>16,z&=z>>8,z&=z>>4,z&=z>>2,z&=z>>1,1&z}var CryptoJS,BigInt,root=this,HLP={};"undefined"!=typeof module&&module.exports?(module.exports=HLP={},CryptoJS=require("../vendor/crypto.js"),BigInt=require("../vendor/bigint.js")):(root.OTR&&(root.OTR.HLP=HLP),root.DSA&&(root.DSA.HLP=HLP),CryptoJS=root.CryptoJS,BigInt=root.BigInt);var DTS={BYTE:1,SHORT:2,INT:4,CTR:8,MAC:20,SIG:40},WRAPPER_BEGIN="?OTR",WRAPPER_END=".",TWO=BigInt.str2bigInt("2",10);HLP.debug=function(msg){this.debug&&"function"!=typeof this.debug&&"undefined"!=typeof console&&console.log(msg)},HLP.extend=function(child,parent){function Ctor(){this.constructor=child}for(var key in parent)Object.hasOwnProperty.call(parent,key)&&(child[key]=parent[key]);Ctor.prototype=parent.prototype,child.prototype=new Ctor,child.__super__=parent.prototype},HLP.compare=function(str1,str2){if(str1.length!==str2.length)return!1;for(var i=0,result=0;i<str1.length;i++)result|=str1[i].charCodeAt(0)^str2[i].charCodeAt(0);return intCompare(result,0)},HLP.randomExponent=function(){return BigInt.randBigInt(1536)},HLP.smpHash=function(version,fmpi,smpi){var sha256=CryptoJS.algo.SHA256.create();sha256.update(CryptoJS.enc.Latin1.parse(HLP.packBytes(version,DTS.BYTE))),sha256.update(CryptoJS.enc.Latin1.parse(HLP.packMPI(fmpi))),smpi&&sha256.update(CryptoJS.enc.Latin1.parse(HLP.packMPI(smpi)));var hash=sha256.finalize();return HLP.bits2bigInt(hash.toString(CryptoJS.enc.Latin1))},HLP.makeMac=function(aesctr,m){var pass=CryptoJS.enc.Latin1.parse(m),mac=CryptoJS.HmacSHA256(CryptoJS.enc.Latin1.parse(aesctr),pass);return HLP.mask(mac.toString(CryptoJS.enc.Latin1),0,160)},HLP.make1Mac=function(aesctr,m){var pass=CryptoJS.enc.Latin1.parse(m),mac=CryptoJS.HmacSHA1(CryptoJS.enc.Latin1.parse(aesctr),pass);return mac.toString(CryptoJS.enc.Latin1)},HLP.encryptAes=function(msg,c,iv){var opts={mode:CryptoJS.mode.CTR,iv:CryptoJS.enc.Latin1.parse(iv),padding:CryptoJS.pad.NoPadding},aesctr=CryptoJS.AES.encrypt(msg,CryptoJS.enc.Latin1.parse(c),opts),aesctr_decoded=CryptoJS.enc.Base64.parse(aesctr.toString());return CryptoJS.enc.Latin1.stringify(aesctr_decoded)},HLP.decryptAes=function(msg,c,iv){msg=CryptoJS.enc.Latin1.parse(msg);var opts={mode:CryptoJS.mode.CTR,iv:CryptoJS.enc.Latin1.parse(iv),padding:CryptoJS.pad.NoPadding};return CryptoJS.AES.decrypt(CryptoJS.enc.Base64.stringify(msg),CryptoJS.enc.Latin1.parse(c),opts)},HLP.multPowMod=function(a,b,c,d,e){return BigInt.multMod(BigInt.powMod(a,b,e),BigInt.powMod(c,d,e),e)},HLP.ZKP=function(v,c,d,e){return BigInt.equals(c,HLP.smpHash(v,d,e))},HLP.GTOE=function(a,b){return BigInt.equals(a,b)||BigInt.greater(a,b)},HLP.between=function(x,a,b){return BigInt.greater(x,a)&&BigInt.greater(b,x)},HLP.checkGroup=function(g,N_MINUS_2){return HLP.GTOE(g,TWO)&&HLP.GTOE(N_MINUS_2,g)},HLP.h1=function(b,secbytes){var sha1=CryptoJS.algo.SHA1.create();return sha1.update(CryptoJS.enc.Latin1.parse(b)),sha1.update(CryptoJS.enc.Latin1.parse(secbytes)),sha1.finalize().toString(CryptoJS.enc.Latin1)},HLP.h2=function(b,secbytes){var sha256=CryptoJS.algo.SHA256.create();return sha256.update(CryptoJS.enc.Latin1.parse(b)),sha256.update(CryptoJS.enc.Latin1.parse(secbytes)),sha256.finalize().toString(CryptoJS.enc.Latin1)},HLP.mask=function(bytes,start,n){return bytes.substr(start/8,n/8)};var _toString=String.fromCharCode;HLP.packBytes=function(val,bytes){val=val.toString(16);for(var nex,res="";bytes>0;bytes--)nex=val.length?val.substr(-2,2):"0",val=val.substr(0,val.length-2),res=_toString(parseInt(nex,16))+res;return res},HLP.packINT=function(d){return HLP.packBytes(d,DTS.INT)},HLP.packCtr=function(d){return HLP.padCtr(HLP.packBytes(d,DTS.CTR))},HLP.padCtr=function(ctr){return ctr+"\x00\x00\x00\x00\x00\x00\x00\x00"},HLP.unpackCtr=function(d){return d=HLP.toByteArray(d.substring(0,8)),HLP.unpack(d)},HLP.unpack=function(arr){for(var val=0,i=0,len=arr.length;len>i;i++)val=256*val+arr[i];return val},HLP.packData=function(d){return HLP.packINT(d.length)+d},HLP.bits2bigInt=function(bits){return bits=HLP.toByteArray(bits),BigInt.ba2bigInt(bits)},HLP.packMPI=function(mpi){return HLP.packData(BigInt.bigInt2bits(BigInt.trim(mpi,0)))},HLP.packSHORT=function(short){return HLP.packBytes(short,DTS.SHORT)},HLP.unpackSHORT=function(short){return short=HLP.toByteArray(short),HLP.unpack(short)},HLP.packTLV=function(type,value){return HLP.packSHORT(type)+HLP.packSHORT(value.length)+value},HLP.readLen=function(msg){return msg=HLP.toByteArray(msg.substring(0,4)),HLP.unpack(msg)},HLP.readData=function(data){var n=HLP.unpack(data.splice(0,4));return[n,data]},HLP.readMPI=function(data){return data=HLP.toByteArray(data),data=HLP.readData(data),BigInt.ba2bigInt(data[1])},HLP.packMPIs=function(arr){return arr.reduce(function(prv,cur){return prv+HLP.packMPI(cur)},"")},HLP.unpackMPIs=function(num,mpis){for(var i=0,arr=[];num>i;i++)arr.push("MPI");return HLP.splitype(arr,mpis).map(function(m){return HLP.readMPI(m)})},HLP.wrapMsg=function(msg,fs,v3,our_it,their_it){msg=CryptoJS.enc.Base64.stringify(CryptoJS.enc.Latin1.parse(msg)),msg=WRAPPER_BEGIN+":"+msg+WRAPPER_END;var its;if(v3&&(its="|",its+=HLP.readLen(our_it).toString(16),its+="|",its+=HLP.readLen(their_it).toString(16)),!fs)return[null,msg];var n=Math.ceil(msg.length/fs);if(n>65535)return["Too many fragments"];if(1==n)return[null,msg];var k,bi,ei,frag,mf,mfs=[];for(k=1;n>=k;k++)bi=(k-1)*fs,ei=k*fs,frag=msg.slice(bi,ei),mf=WRAPPER_BEGIN,v3&&(mf+=its),mf+=","+k+",",mf+=n+",",mf+=frag+",",mfs.push(mf);return[null,mfs]},HLP.splitype=function splitype(arr,msg){var data=[];return arr.forEach(function(a){var str;switch(a){case"PUBKEY":str=splitype(["SHORT","MPI","MPI","MPI","MPI"],msg).join("");break;case"DATA":case"MPI":str=msg.substring(0,HLP.readLen(msg)+4);break;default:str=msg.substring(0,DTS[a])}data.push(str),msg=msg.substring(str.length)}),data};var _bin2num=function(){for(var i=0,_bin2num={};256>i;++i)_bin2num[String.fromCharCode(i)]=i;for(i=128;256>i;++i)_bin2num[String.fromCharCode(63232+i)]=i;return _bin2num}();HLP.toByteArray=function(data){for(var rv=[],ary=data.split(""),i=-1,iz=ary.length,remain=iz%8;remain--;)++i,rv[i]=_bin2num[ary[i]];for(remain=iz>>3;remain--;)rv.push(_bin2num[ary[++i]],_bin2num[ary[++i]],_bin2num[ary[++i]],_bin2num[ary[++i]],_bin2num[ary[++i]],_bin2num[ary[++i]],_bin2num[ary[++i]],_bin2num[ary[++i]]);return rv}}.call(this),function(){"use strict";function timer(){var start=(new Date).getTime();return function(s){if(DEBUG&&"undefined"!=typeof console){var t=(new Date).getTime();console.log(s+": "+(t-start)),start=t}}}function makeRandom(min,max){var c=BigInt.randBigInt(BigInt.bitSize(max));return HLP.between(c,min,max)?c:makeRandom(min,max)}function isProbPrime(k,n){var i,B=3e4,l=BigInt.bitSize(k),primes=BigInt.primes;for(0===primes.length&&(primes=BigInt.findPrimes(B)),rpprb.length!=k.length&&(rpprb=BigInt.dup(k)),i=0;i<primes.length&&primes[i]<=B;i++)if(0===BigInt.modInt(k,primes[i])&&!BigInt.equalsInt(k,primes[i]))return 0;for(i=0;n>i;i++){for(BigInt.randBigInt_(rpprb,l,0);!BigInt.greater(k,rpprb);)BigInt.randBigInt_(rpprb,l,0);if(!BigInt.millerRabin(k,rpprb))return 0}return 1}function generatePrimes(bit_length){for(var q,p,rem,counter,t=timer(),repeat=bit_lengths[bit_length].repeat,N=bit_lengths[bit_length].N,LM1=BigInt.twoToThe(bit_length-1),bl4=4*bit_length,brk=!1;;)if(q=BigInt.randBigInt(N,1),q[0]|=1,isProbPrime(q,repeat)){for(t("q"),counter=0;bl4>counter;counter++)if(p=BigInt.randBigInt(bit_length,1),p[0]|=1,rem=BigInt.mod(p,q),rem=BigInt.sub(rem,ONE),p=BigInt.sub(p,rem),!BigInt.greater(LM1,p)&&isProbPrime(p,repeat)){t("p"),primes[bit_length]={p:p,q:q},brk=!0;break}if(brk)break}for(var g,h=BigInt.dup(TWO),pm1=BigInt.sub(p,ONE),e=BigInt.multMod(pm1,BigInt.inverseMod(q,p),p);;){g=BigInt.powMod(h,e,p);{if(!BigInt.equals(g,ONE))return primes[bit_length].g=g,void t("g");h=BigInt.add(h,ONE)}}throw new Error("Unreachable!")}function DSA(obj,opts){if(!(this instanceof DSA))return new DSA(obj,opts);if(opts=opts||{},obj){var self=this;return["p","q","g","y","x"].forEach(function(prop){self[prop]=obj[prop]}),void(this.type=obj.type||KEY_TYPE)}var bit_length=parseInt(opts.bit_length?opts.bit_length:1024,10);if(!bit_lengths[bit_length])throw new Error("Unsupported bit length.");primes[bit_length]||generatePrimes(bit_length),this.p=primes[bit_length].p,this.q=primes[bit_length].q,this.g=primes[bit_length].g,this.type=KEY_TYPE,this.x=makeRandom(ZERO,this.q),this.y=BigInt.powMod(this.g,this.x,this.p),opts.nocache&&(primes[bit_length]=null)}function tokenizeStr(str){var start,end;if(start=str.indexOf("("),end=str.lastIndexOf(")"),0>start||0>end)throw new Error("Malformed S-Expression");str=str.substring(start+1,end);var splt=str.search(/\s/),obj={type:str.substring(0,splt),val:[]};if(str=str.substring(splt+1,end),start=str.indexOf("("),0>start)obj.val.push(str);else for(var i,len,ss,es;start>-1;){for(i=start+1,len=str.length,ss=1,es=0;len>i&&ss>es;i++)"("===str[i]&&ss++,")"===str[i]&&es++;obj.val.push(tokenizeStr(str.substring(start,++i))),str=str.substring(++i),start=str.indexOf("(")}return obj}function parseLibotr(obj){if(!obj.type)throw new Error("Parse error.");var o,val;return"privkeys"===obj.type?(o=[],obj.val.forEach(function(i){o.push(parseLibotr(i))}),o):(o={},obj.val.forEach(function(i){val=i.val[0],"string"==typeof val?0===val.indexOf("#")&&(val=val.substring(1,val.lastIndexOf("#")),val=BigInt.str2bigInt(val,16)):val=parseLibotr(i),o[i.type]=val}),o)}var CryptoJS,BigInt,Worker,WWPath,HLP,root=this;"undefined"!=typeof module&&module.exports?(module.exports=DSA,CryptoJS=require("../vendor/crypto.js"),BigInt=require("../vendor/bigint.js"),WWPath=require("path").join(__dirname,"/dsa-webworker.js"),HLP=require("./helpers.js")):(Object.keys(root.DSA).forEach(function(k){DSA[k]=root.DSA[k]}),root.DSA=DSA,CryptoJS=root.CryptoJS,BigInt=root.BigInt,Worker=root.Worker,WWPath="dsa-webworker.js",HLP=DSA.HLP);var ZERO=BigInt.str2bigInt("0",10),ONE=BigInt.str2bigInt("1",10),TWO=BigInt.str2bigInt("2",10),KEY_TYPE="\x00\x00",DEBUG=!1,rpprb=[],bit_lengths={1024:{N:160,repeat:40},2048:{N:224,repeat:56}},primes={};DSA.prototype={constructor:DSA,packPublic:function(){var str=this.type;return str+=HLP.packMPI(this.p),str+=HLP.packMPI(this.q),str+=HLP.packMPI(this.g),str+=HLP.packMPI(this.y)},packPrivate:function(){var str=this.packPublic()+HLP.packMPI(this.x);return str=CryptoJS.enc.Latin1.parse(str),str.toString(CryptoJS.enc.Base64)},generateNonce:function(m){var priv=BigInt.bigInt2bits(BigInt.trim(this.x,0)),rand=BigInt.bigInt2bits(BigInt.randBigInt(256)),sha256=CryptoJS.algo.SHA256.create();sha256.update(CryptoJS.enc.Latin1.parse(priv)),sha256.update(m),sha256.update(CryptoJS.enc.Latin1.parse(rand));var hash=sha256.finalize();return hash=HLP.bits2bigInt(hash.toString(CryptoJS.enc.Latin1)),BigInt.rightShift_(hash,256-BigInt.bitSize(this.q)),HLP.between(hash,ZERO,this.q)?hash:this.generateNonce(m)},sign:function(m){m=CryptoJS.enc.Latin1.parse(m);for(var k,b=BigInt.str2bigInt(m.toString(CryptoJS.enc.Hex),16),r=ZERO,s=ZERO;BigInt.isZero(s)||BigInt.isZero(r);)k=this.generateNonce(m),r=BigInt.mod(BigInt.powMod(this.g,k,this.p),this.q),BigInt.isZero(r)||(s=BigInt.inverseMod(k,this.q),s=BigInt.mult(s,BigInt.add(b,BigInt.mult(this.x,r))),s=BigInt.mod(s,this.q));return[r,s]},fingerprint:function(){var pk=this.packPublic();return this.type===KEY_TYPE&&(pk=pk.substring(2)),pk=CryptoJS.enc.Latin1.parse(pk),CryptoJS.SHA1(pk).toString(CryptoJS.enc.Hex)}},DSA.parsePublic=function(str,priv){var fields=["SHORT","MPI","MPI","MPI","MPI"];priv&&fields.push("MPI"),str=HLP.splitype(fields,str);var obj={type:str[0],p:HLP.readMPI(str[1]),q:HLP.readMPI(str[2]),g:HLP.readMPI(str[3]),y:HLP.readMPI(str[4])};return priv&&(obj.x=HLP.readMPI(str[5])),new DSA(obj)},DSA.parsePrivate=function(str,libotr){return libotr?parseLibotr(tokenizeStr(str))[0]["private-key"].dsa:(str=CryptoJS.enc.Base64.parse(str),str=str.toString(CryptoJS.enc.Latin1),DSA.parsePublic(str,!0))},DSA.verify=function(key,m,r,s){if(!HLP.between(r,ZERO,key.q)||!HLP.between(s,ZERO,key.q))return!1;var hm=CryptoJS.enc.Latin1.parse(m);hm=BigInt.str2bigInt(hm.toString(CryptoJS.enc.Hex),16);var w=BigInt.inverseMod(s,key.q),u1=BigInt.multMod(hm,w,key.q),u2=BigInt.multMod(r,w,key.q);u1=BigInt.powMod(key.g,u1,key.p),u2=BigInt.powMod(key.y,u2,key.p);var v=BigInt.mod(BigInt.multMod(u1,u2,key.p),key.q);return BigInt.equals(v,r)},DSA.createInWebWorker=function(options,cb){var opts={path:WWPath,seed:BigInt.getSeed};options&&"object"==typeof options&&Object.keys(options).forEach(function(k){opts[k]=options[k]}),"undefined"!=typeof module&&module.exports&&(Worker=require("webworker-threads").Worker);var worker=new Worker(opts.path);worker.onmessage=function(e){var data=e.data;switch(data.type){case"debug":if(!DEBUG||"undefined"==typeof console)return;console.log(data.val);break;case"data":worker.terminate(),cb(DSA.parsePrivate(data.val));break;default:throw new Error("Unrecognized type.")}},worker.postMessage({seed:opts.seed(),imports:opts.imports,debug:DEBUG})}}.call(this),function(){"use strict";var CryptoJS,CONST,HLP,root=this,Parse={};"undefined"!=typeof module&&module.exports?(module.exports=Parse,CryptoJS=require("../vendor/crypto.js"),CONST=require("./const.js"),HLP=require("./helpers.js")):(root.OTR.Parse=Parse,CryptoJS=root.CryptoJS,CONST=root.OTR.CONST,HLP=root.OTR.HLP);var tags={};tags[CONST.WHITESPACE_TAG_V2]=CONST.OTR_VERSION_2,tags[CONST.WHITESPACE_TAG_V3]=CONST.OTR_VERSION_3,Parse.parseMsg=function(otr,msg){var ver=[],start=msg.indexOf(CONST.OTR_TAG);if(!~start){if(this.initFragment(otr),ind=msg.indexOf(CONST.WHITESPACE_TAG),~ind){msg=msg.split(""),msg.splice(ind,16);for(var tag,len=msg.length;len>ind;)tag=msg.slice(ind,ind+8).join(""),Object.hasOwnProperty.call(tags,tag)?(msg.splice(ind,8),ver.push(tags[tag])):ind+=8;msg=msg.join("")}return{msg:msg,ver:ver}}var ind=start+CONST.OTR_TAG.length,com=msg[ind];if(","===com||"|"===com)return this.msgFragment(otr,msg.substring(ind+1),"|"===com);if(this.initFragment(otr),~["?","v"].indexOf(com)){"?"===msg[ind]&&(ver.push(CONST.OTR_VERSION_1),ind+=1);var vers={2:CONST.OTR_VERSION_2,3:CONST.OTR_VERSION_3},qs=msg.substring(ind+1),qi=qs.indexOf("?");return qi>=1&&(qs=qs.substring(0,qi).split(""),"v"===msg[ind]&&qs.forEach(function(q){Object.hasOwnProperty.call(vers,q)&&ver.push(vers[q])})),{cls:"query",ver:ver}}if(":"===com){ind+=1;var info=msg.substring(ind,ind+4);if(info.length<4)return{msg:msg};info=CryptoJS.enc.Base64.parse(info).toString(CryptoJS.enc.Latin1);var version=info.substring(0,2),type=info.substring(2);if(!otr["ALLOW_V"+HLP.unpackSHORT(version)])return{msg:msg};ind+=4;var end=msg.substring(ind).indexOf(".");if(!~end)return{msg:msg};msg=CryptoJS.enc.Base64.parse(msg.substring(ind,ind+end)),msg=CryptoJS.enc.Latin1.stringify(msg);var instance_tags;version===CONST.OTR_VERSION_3&&(instance_tags=msg.substring(0,8),msg=msg.substring(8));var cls;return~["","\n","",""].indexOf(type)?cls="ake":""===type&&(cls="data"),{version:version,type:type,msg:msg,cls:cls,instance_tags:instance_tags}}return" Error:"===msg.substring(ind,ind+7)?(otr.ERROR_START_AKE&&otr.sendQueryMsg(),{msg:msg.substring(ind+7),cls:"error"}):{msg:msg}},Parse.initFragment=function(otr){otr.fragment={s:"",j:0,k:0}},Parse.msgFragment=function(otr,msg,v3){if(msg=msg.split(","),v3){var its=msg.shift().split("|"),their_it=HLP.packINT(parseInt(its[0],16)),our_it=HLP.packINT(parseInt(its[1],16));if(otr.checkInstanceTags(their_it+our_it))return}if(!(msg.length<4||isNaN(parseInt(msg[0],10))||isNaN(parseInt(msg[1],10)))){var k=parseInt(msg[0],10),n=parseInt(msg[1],10);return msg=msg[2],k>n||0===n||0===k?void this.initFragment(otr):(1===k?(this.initFragment(otr),otr.fragment={k:1,n:n,s:msg}):n===otr.fragment.n&&k===otr.fragment.k+1?(otr.fragment.s+=msg,otr.fragment.k+=1):this.initFragment(otr),n===k?(msg=otr.fragment.s,this.initFragment(otr),this.parseMsg(otr,msg)):void 0)}}}.call(this),function(){"use strict";function hMac(gx,gy,pk,kid,m){var pass=CryptoJS.enc.Latin1.parse(m),hmac=CryptoJS.algo.HMAC.create(CryptoJS.algo.SHA256,pass);return hmac.update(CryptoJS.enc.Latin1.parse(HLP.packMPI(gx))),hmac.update(CryptoJS.enc.Latin1.parse(HLP.packMPI(gy))),hmac.update(CryptoJS.enc.Latin1.parse(pk)),hmac.update(CryptoJS.enc.Latin1.parse(kid)),hmac.finalize().toString(CryptoJS.enc.Latin1)}function AKE(otr){if(!(this instanceof AKE))return new AKE(otr);this.otr=otr,this.our_dh=otr.our_old_dh,this.our_keyid=otr.our_keyid-1,this.their_y=null,this.their_keyid=null,this.their_priv_pk=null,this.ssid=null,this.transmittedRS=!1,this.r=null;var self=this;["sendMsg"].forEach(function(meth){self[meth]=self[meth].bind(self)})}var CryptoJS,BigInt,CONST,HLP,DSA,root=this;"undefined"!=typeof module&&module.exports?(module.exports=AKE,CryptoJS=require("../vendor/crypto.js"),BigInt=require("../vendor/bigint.js"),CONST=require("./const.js"),HLP=require("./helpers.js"),DSA=require("./dsa.js")):(root.OTR.AKE=AKE,CryptoJS=root.CryptoJS,BigInt=root.BigInt,CONST=root.OTR.CONST,HLP=root.OTR.HLP,DSA=root.DSA);var N=BigInt.str2bigInt(CONST.N,16),N_MINUS_2=BigInt.sub(N,BigInt.str2bigInt("2",10));AKE.prototype={constructor:AKE,createKeys:function(g){var s=BigInt.powMod(g,this.our_dh.privateKey,N),secbytes=HLP.packMPI(s);this.ssid=HLP.mask(HLP.h2("\x00",secbytes),0,64);var tmp=HLP.h2("",secbytes);this.c=HLP.mask(tmp,0,128),this.c_prime=HLP.mask(tmp,128,128),this.m1=HLP.h2("",secbytes),this.m2=HLP.h2("",secbytes),this.m1_prime=HLP.h2("",secbytes),this.m2_prime=HLP.h2("",secbytes)},verifySignMac:function(mac,aesctr,m2,c,their_y,our_dh_pk,m1,ctr){var vmac=HLP.makeMac(aesctr,m2);if(!HLP.compare(mac,vmac))return["MACs do not match."];var x=HLP.decryptAes(aesctr.substring(4),c,ctr);x=HLP.splitype(["PUBKEY","INT","SIG"],x.toString(CryptoJS.enc.Latin1));var m=hMac(their_y,our_dh_pk,x[0],x[1],m1),pub=DSA.parsePublic(x[0]),r=HLP.bits2bigInt(x[2].substring(0,20)),s=HLP.bits2bigInt(x[2].substring(20));return DSA.verify(pub,m,r,s)?[null,HLP.readLen(x[1]),pub]:["Cannot verify signature of m."]},makeM:function(their_y,m1,c,m2){var pk=this.otr.priv.packPublic(),kid=HLP.packINT(this.our_keyid),m=hMac(this.our_dh.publicKey,their_y,pk,kid,m1);m=this.otr.priv.sign(m);var msg=pk+kid;msg+=BigInt.bigInt2bits(m[0],20),msg+=BigInt.bigInt2bits(m[1],20),msg=CryptoJS.enc.Latin1.parse(msg);var aesctr=HLP.packData(HLP.encryptAes(msg,c,HLP.packCtr(0))),mac=HLP.makeMac(aesctr,m2);return aesctr+mac},akeSuccess:function(version){return HLP.debug.call(this.otr,"success"),BigInt.equals(this.their_y,this.our_dh.publicKey)?this.otr.error("equal keys - we have a problem."):(this.otr.our_old_dh=this.our_dh,this.otr.their_priv_pk=this.their_priv_pk,this.their_keyid===this.otr.their_keyid&&BigInt.equals(this.their_y,this.otr.their_y)||this.their_keyid===this.otr.their_keyid-1&&BigInt.equals(this.their_y,this.otr.their_old_y)||(this.otr.their_y=this.their_y,this.otr.their_old_y=null,this.otr.their_keyid=this.their_keyid,this.otr.sessKeys[0]=[new this.otr.DHSession(this.otr.our_dh,this.otr.their_y),null],this.otr.sessKeys[1]=[new this.otr.DHSession(this.otr.our_old_dh,this.otr.their_y),null]),this.otr.ssid=this.ssid,this.otr.transmittedRS=this.transmittedRS,this.otr_version=version,this.otr.authstate=CONST.AUTHSTATE_NONE,this.otr.msgstate=CONST.MSGSTATE_ENCRYPTED,this.r=null,this.myhashed=null,this.dhcommit=null,this.encrypted=null,this.hashed=null,this.otr.trigger("status",[CONST.STATUS_AKE_SUCCESS]),void this.otr.sendStored())},handleAKE:function(msg){var send,vsm,type,version=msg.version;switch(msg.type){case"":if(HLP.debug.call(this.otr,"d-h key message"),msg=HLP.splitype(["DATA","DATA"],msg.msg),this.otr.authstate===CONST.AUTHSTATE_AWAITING_DHKEY){var ourHash=HLP.readMPI(this.myhashed),theirHash=HLP.readMPI(msg[1]);if(BigInt.greater(ourHash,theirHash)){type="",send=this.dhcommit;break}this.our_dh=this.otr.dh(),this.otr.authstate=CONST.AUTHSTATE_NONE,this.r=null,this.myhashed=null}else this.otr.authstate===CONST.AUTHSTATE_AWAITING_SIG&&(this.our_dh=this.otr.dh());this.otr.authstate=CONST.AUTHSTATE_AWAITING_REVEALSIG,this.encrypted=msg[0].substring(4),this.hashed=msg[1].substring(4),type="\n",send=HLP.packMPI(this.our_dh.publicKey);break;case"\n":if(HLP.debug.call(this.otr,"reveal signature message"),msg=HLP.splitype(["MPI"],msg.msg),this.otr.authstate!==CONST.AUTHSTATE_AWAITING_DHKEY){if(this.otr.authstate!==CONST.AUTHSTATE_AWAITING_SIG)return;if(!BigInt.equals(this.their_y,HLP.readMPI(msg[0])))return}if(this.otr.authstate=CONST.AUTHSTATE_AWAITING_SIG,this.their_y=HLP.readMPI(msg[0]),!HLP.checkGroup(this.their_y,N_MINUS_2))return this.otr.error("Illegal g^y.");this.createKeys(this.their_y),type="",send=HLP.packMPI(this.r),send+=this.makeM(this.their_y,this.m1,this.c,this.m2),this.m1=null,this.m2=null,this.c=null;break;case"":if(HLP.debug.call(this.otr,"signature message"),this.otr.authstate!==CONST.AUTHSTATE_AWAITING_REVEALSIG)return;msg=HLP.splitype(["DATA","DATA","MAC"],msg.msg),this.r=HLP.readMPI(msg[0]);var key=CryptoJS.enc.Hex.parse(BigInt.bigInt2str(this.r,16));key=CryptoJS.enc.Latin1.stringify(key);var gxmpi=HLP.decryptAes(this.encrypted,key,HLP.packCtr(0));gxmpi=gxmpi.toString(CryptoJS.enc.Latin1),this.their_y=HLP.readMPI(gxmpi);var hash=CryptoJS.SHA256(CryptoJS.enc.Latin1.parse(gxmpi));return HLP.compare(this.hashed,hash.toString(CryptoJS.enc.Latin1))?HLP.checkGroup(this.their_y,N_MINUS_2)?(this.createKeys(this.their_y),vsm=this.verifySignMac(msg[2],msg[1],this.m2,this.c,this.their_y,this.our_dh.publicKey,this.m1,HLP.packCtr(0)),vsm[0]?this.otr.error(vsm[0]):(this.their_keyid=vsm[1],this.their_priv_pk=vsm[2],send=this.makeM(this.their_y,this.m1_prime,this.c_prime,this.m2_prime),this.m1=null,this.m2=null,this.m1_prime=null,this.m2_prime=null,this.c=null,this.c_prime=null,this.sendMsg(version,"",send),void this.akeSuccess(version))):this.otr.error("Illegal g^x."):this.otr.error("Hashed g^x does not match.");case"":if(HLP.debug.call(this.otr,"data message"),this.otr.authstate!==CONST.AUTHSTATE_AWAITING_SIG)return;return msg=HLP.splitype(["DATA","MAC"],msg.msg),vsm=this.verifySignMac(msg[1],msg[0],this.m2_prime,this.c_prime,this.their_y,this.our_dh.publicKey,this.m1_prime,HLP.packCtr(0)),vsm[0]?this.otr.error(vsm[0]):(this.their_keyid=vsm[1],this.their_priv_pk=vsm[2],this.m1_prime=null,this.m2_prime=null,this.c_prime=null,this.transmittedRS=!0,void this.akeSuccess(version));default:return}this.sendMsg(version,type,send)},sendMsg:function(version,type,msg){var send=version+type,v3=version===CONST.OTR_VERSION_3;return v3&&(HLP.debug.call(this.otr,"instance tags"),send+=this.otr.our_instance_tag,send+=this.otr.their_instance_tag),send+=msg,send=HLP.wrapMsg(send,this.otr.fragment_size,v3,this.otr.our_instance_tag,this.otr.their_instance_tag),send[0]?this.otr.error(send[0]):void this.otr.io(send[1])},initiateAKE:function(version){HLP.debug.call(this.otr,"d-h commit message"),this.otr.trigger("status",[CONST.STATUS_AKE_INIT]),this.otr.authstate=CONST.AUTHSTATE_AWAITING_DHKEY;var gxmpi=HLP.packMPI(this.our_dh.publicKey);gxmpi=CryptoJS.enc.Latin1.parse(gxmpi),this.r=BigInt.randBigInt(128);var key=CryptoJS.enc.Hex.parse(BigInt.bigInt2str(this.r,16));key=CryptoJS.enc.Latin1.stringify(key),this.myhashed=CryptoJS.SHA256(gxmpi),this.myhashed=HLP.packData(this.myhashed.toString(CryptoJS.enc.Latin1)),this.dhcommit=HLP.packData(HLP.encryptAes(gxmpi,key,HLP.packCtr(0))),this.dhcommit+=this.myhashed,this.sendMsg(version,"",this.dhcommit)}}}.call(this),function(){"use strict";function SM(reqs){return this instanceof SM?(this.version=1,this.our_fp=reqs.our_fp,this.their_fp=reqs.their_fp,this.ssid=reqs.ssid,this.debug=!!reqs.debug,void this.init()):new SM(reqs)}var CryptoJS,BigInt,EventEmitter,CONST,HLP,root=this;"undefined"!=typeof module&&module.exports?(module.exports=SM,CryptoJS=require("../vendor/crypto.js"),BigInt=require("../vendor/bigint.js"),EventEmitter=require("../vendor/eventemitter.js"),CONST=require("./const.js"),HLP=require("./helpers.js")):(root.OTR.SM=SM,CryptoJS=root.CryptoJS,BigInt=root.BigInt,EventEmitter=root.EventEmitter,CONST=root.OTR.CONST,HLP=root.OTR.HLP);var G=BigInt.str2bigInt(CONST.G,10),N=BigInt.str2bigInt(CONST.N,16),N_MINUS_2=BigInt.sub(N,BigInt.str2bigInt("2",10)),Q=BigInt.sub(N,BigInt.str2bigInt("1",10));BigInt.divInt_(Q,2),HLP.extend(SM,EventEmitter),SM.prototype.init=function(){this.smpstate=CONST.SMPSTATE_EXPECT1,this.secret=null},SM.prototype.makeSecret=function(our,secret){var sha256=CryptoJS.algo.SHA256.create();sha256.update(CryptoJS.enc.Latin1.parse(HLP.packBytes(this.version,1))),sha256.update(CryptoJS.enc.Hex.parse(our?this.our_fp:this.their_fp)),sha256.update(CryptoJS.enc.Hex.parse(our?this.their_fp:this.our_fp)),sha256.update(CryptoJS.enc.Latin1.parse(this.ssid)),sha256.update(CryptoJS.enc.Latin1.parse(secret));var hash=sha256.finalize();this.secret=HLP.bits2bigInt(hash.toString(CryptoJS.enc.Latin1))},SM.prototype.makeG2s=function(){this.a2=HLP.randomExponent(),this.a3=HLP.randomExponent(),this.g2a=BigInt.powMod(G,this.a2,N),this.g3a=BigInt.powMod(G,this.a3,N),HLP.checkGroup(this.g2a,N_MINUS_2)&&HLP.checkGroup(this.g3a,N_MINUS_2)||this.makeG2s()},SM.prototype.computeGs=function(g2a,g3a){this.g2=BigInt.powMod(g2a,this.a2,N),this.g3=BigInt.powMod(g3a,this.a3,N)},SM.prototype.computePQ=function(r){this.p=BigInt.powMod(this.g3,r,N),this.q=HLP.multPowMod(G,r,this.g2,this.secret,N)},SM.prototype.computeR=function(){this.r=BigInt.powMod(this.QoQ,this.a3,N)},SM.prototype.computeRab=function(r){return BigInt.powMod(r,this.a3,N)},SM.prototype.computeC=function(v,r){return HLP.smpHash(v,BigInt.powMod(G,r,N))},SM.prototype.computeD=function(r,a,c){return BigInt.subMod(r,BigInt.multMod(a,c,Q),Q)},SM.prototype.handleSM=function(msg){var send,r2,r3,r7,t1,t2,t3,t4,rab,tmp2,cR,d7,ms,trust,expectStates={2:CONST.SMPSTATE_EXPECT1,3:CONST.SMPSTATE_EXPECT2,4:CONST.SMPSTATE_EXPECT3,5:CONST.SMPSTATE_EXPECT4,7:CONST.SMPSTATE_EXPECT1};if(6===msg.type)return this.init(),void this.trigger("abort");if(this.smpstate!==expectStates[msg.type])return this.abort();switch(this.smpstate){case CONST.SMPSTATE_EXPECT1:HLP.debug.call(this,"smp tlv 2");var ind,question;return 7===msg.type&&(ind=msg.msg.indexOf("\x00"),question=msg.msg.substring(0,ind),msg.msg=msg.msg.substring(ind+1)),ms=HLP.readLen(msg.msg.substr(0,4)),6!==ms?this.abort():(msg=HLP.unpackMPIs(6,msg.msg.substring(4)),HLP.checkGroup(msg[0],N_MINUS_2)&&HLP.checkGroup(msg[3],N_MINUS_2)&&HLP.ZKP(1,msg[1],HLP.multPowMod(G,msg[2],msg[0],msg[1],N))&&HLP.ZKP(2,msg[4],HLP.multPowMod(G,msg[5],msg[3],msg[4],N))?(this.g3ao=msg[3],this.makeG2s(),r2=HLP.randomExponent(),r3=HLP.randomExponent(),this.c2=this.computeC(3,r2),this.c3=this.computeC(4,r3),this.d2=this.computeD(r2,this.a2,this.c2),this.d3=this.computeD(r3,this.a3,this.c3),this.computeGs(msg[0],msg[3]),this.smpstate=CONST.SMPSTATE_EXPECT0,question&&(question=CryptoJS.enc.Latin1.parse(question).toString(CryptoJS.enc.Utf8)),void this.trigger("question",[question])):this.abort());case CONST.SMPSTATE_EXPECT2:if(HLP.debug.call(this,"smp tlv 3"),ms=HLP.readLen(msg.msg.substr(0,4)),11!==ms)return this.abort();if(msg=HLP.unpackMPIs(11,msg.msg.substring(4)),!(HLP.checkGroup(msg[0],N_MINUS_2)&&HLP.checkGroup(msg[3],N_MINUS_2)&&HLP.checkGroup(msg[6],N_MINUS_2)&&HLP.checkGroup(msg[7],N_MINUS_2)))return this.abort();if(!HLP.ZKP(3,msg[1],HLP.multPowMod(G,msg[2],msg[0],msg[1],N)))return this.abort();if(!HLP.ZKP(4,msg[4],HLP.multPowMod(G,msg[5],msg[3],msg[4],N)))return this.abort();if(this.g3ao=msg[3],this.computeGs(msg[0],msg[3]),t1=HLP.multPowMod(this.g3,msg[9],msg[6],msg[8],N),t2=HLP.multPowMod(G,msg[9],this.g2,msg[10],N),t2=BigInt.multMod(t2,BigInt.powMod(msg[7],msg[8],N),N),!HLP.ZKP(5,msg[8],t1,t2))return this.abort();var r4=HLP.randomExponent();this.computePQ(r4);var r5=HLP.randomExponent(),r6=HLP.randomExponent(),tmp=HLP.multPowMod(G,r5,this.g2,r6,N),cP=HLP.smpHash(6,BigInt.powMod(this.g3,r5,N),tmp),d5=this.computeD(r5,r4,cP),d6=this.computeD(r6,this.secret,cP);this.QoQ=BigInt.divMod(this.q,msg[7],N),this.PoP=BigInt.divMod(this.p,msg[6],N),this.computeR(),r7=HLP.randomExponent(),tmp2=BigInt.powMod(this.QoQ,r7,N),cR=HLP.smpHash(7,BigInt.powMod(G,r7,N),tmp2),d7=this.computeD(r7,this.a3,cR),this.smpstate=CONST.SMPSTATE_EXPECT4,send=HLP.packINT(8)+HLP.packMPIs([this.p,this.q,cP,d5,d6,this.r,cR,d7]),send=HLP.packTLV(4,send);break;case CONST.SMPSTATE_EXPECT3:if(HLP.debug.call(this,"smp tlv 4"),ms=HLP.readLen(msg.msg.substr(0,4)),8!==ms)return this.abort();if(msg=HLP.unpackMPIs(8,msg.msg.substring(4)),!HLP.checkGroup(msg[0],N_MINUS_2)||!HLP.checkGroup(msg[1],N_MINUS_2)||!HLP.checkGroup(msg[5],N_MINUS_2))return this.abort();if(t1=HLP.multPowMod(this.g3,msg[3],msg[0],msg[2],N),t2=HLP.multPowMod(G,msg[3],this.g2,msg[4],N),t2=BigInt.multMod(t2,BigInt.powMod(msg[1],msg[2],N),N),!HLP.ZKP(6,msg[2],t1,t2))return this.abort();if(t3=HLP.multPowMod(G,msg[7],this.g3ao,msg[6],N),this.QoQ=BigInt.divMod(msg[1],this.q,N),t4=HLP.multPowMod(this.QoQ,msg[7],msg[5],msg[6],N),!HLP.ZKP(7,msg[6],t3,t4))return this.abort();this.computeR(),r7=HLP.randomExponent(),tmp2=BigInt.powMod(this.QoQ,r7,N),cR=HLP.smpHash(8,BigInt.powMod(G,r7,N),tmp2),d7=this.computeD(r7,this.a3,cR),send=HLP.packINT(3)+HLP.packMPIs([this.r,cR,d7]),send=HLP.packTLV(5,send),rab=this.computeRab(msg[5]),trust=!!BigInt.equals(rab,BigInt.divMod(msg[0],this.p,N)),this.trigger("trust",[trust,"answered"]),this.init();break;case CONST.SMPSTATE_EXPECT4:return HLP.debug.call(this,"smp tlv 5"),ms=HLP.readLen(msg.msg.substr(0,4)),3!==ms?this.abort():(msg=HLP.unpackMPIs(3,msg.msg.substring(4)),HLP.checkGroup(msg[0],N_MINUS_2)?(t3=HLP.multPowMod(G,msg[2],this.g3ao,msg[1],N),t4=HLP.multPowMod(this.QoQ,msg[2],msg[0],msg[1],N),HLP.ZKP(8,msg[1],t3,t4)?(rab=this.computeRab(msg[0]),trust=!!BigInt.equals(rab,this.PoP),this.trigger("trust",[trust,"asked"]),void this.init()):this.abort()):this.abort())}this.sendMsg(send)},SM.prototype.sendMsg=function(send){this.trigger("send",[this.ssid,"\x00"+send])},SM.prototype.rcvSecret=function(secret,question){HLP.debug.call(this,"receive secret");var fn,our=!1;this.smpstate===CONST.SMPSTATE_EXPECT0?fn=this.answer:(fn=this.initiate,our=!0),this.makeSecret(our,secret),fn.call(this,question)},SM.prototype.answer=function(){HLP.debug.call(this,"smp answer");var r4=HLP.randomExponent();this.computePQ(r4);var r5=HLP.randomExponent(),r6=HLP.randomExponent(),tmp=HLP.multPowMod(G,r5,this.g2,r6,N),cP=HLP.smpHash(5,BigInt.powMod(this.g3,r5,N),tmp),d5=this.computeD(r5,r4,cP),d6=this.computeD(r6,this.secret,cP);this.smpstate=CONST.SMPSTATE_EXPECT3;var send=HLP.packINT(11)+HLP.packMPIs([this.g2a,this.c2,this.d2,this.g3a,this.c3,this.d3,this.p,this.q,cP,d5,d6]);
-this.sendMsg(HLP.packTLV(3,send))},SM.prototype.initiate=function(question){HLP.debug.call(this,"smp initiate"),this.smpstate!==CONST.SMPSTATE_EXPECT1&&this.abort(),this.makeG2s();var r2=HLP.randomExponent(),r3=HLP.randomExponent();this.c2=this.computeC(1,r2),this.c3=this.computeC(2,r3),this.d2=this.computeD(r2,this.a2,this.c2),this.d3=this.computeD(r3,this.a3,this.c3),this.smpstate=CONST.SMPSTATE_EXPECT2;var send="",type=2;question&&(send+=question,send+="\x00",type=7),send+=HLP.packINT(6)+HLP.packMPIs([this.g2a,this.c2,this.d2,this.g3a,this.c3,this.d3]),this.sendMsg(HLP.packTLV(type,send))},SM.prototype.abort=function(){this.init(),this.sendMsg(HLP.packTLV(6,"")),this.trigger("abort")}}.call(this),function(){"use strict";function OTRCB(cb){this.cb=cb}function OTR(options){if(!(this instanceof OTR))return new OTR(options);if(options=options||{},options.priv&&!(options.priv instanceof DSA))throw new Error("Requires long-lived DSA key.");if(this.priv=options.priv?options.priv:new DSA,this.fragment_size=options.fragment_size||0,this.fragment_size<0)throw new Error("Fragment size must be a positive integer.");if(this.send_interval=options.send_interval||0,this.send_interval<0)throw new Error("Send interval must be a positive integer.");this.outgoing=[],this.our_instance_tag=options.instance_tag||OTR.makeInstanceTag(),this.debug=!!options.debug,this.smw=options.smw,this.init();var self=this;["sendMsg","receiveMsg"].forEach(function(meth){self[meth]=self[meth].bind(self)}),EventEmitter.call(this)}var CryptoJS,BigInt,EventEmitter,Worker,SMWPath,CONST,HLP,Parse,AKE,SM,DSA,root=this;"undefined"!=typeof module&&module.exports?(module.exports=OTR,CryptoJS=require("../vendor/crypto.js"),BigInt=require("../vendor/bigint.js"),EventEmitter=require("../vendor/eventemitter.js"),SMWPath=require("path").join(__dirname,"/sm-webworker.js"),CONST=require("./const.js"),HLP=require("./helpers.js"),Parse=require("./parse.js"),AKE=require("./ake.js"),SM=require("./sm.js"),DSA=require("./dsa.js"),OTR.CONST=CONST):(Object.keys(root.OTR).forEach(function(k){OTR[k]=root.OTR[k]}),root.OTR=OTR,CryptoJS=root.CryptoJS,BigInt=root.BigInt,EventEmitter=root.EventEmitter,Worker=root.Worker,SMWPath="sm-webworker.js",CONST=OTR.CONST,HLP=OTR.HLP,Parse=OTR.Parse,AKE=OTR.AKE,SM=OTR.SM,DSA=root.DSA);var G=BigInt.str2bigInt(CONST.G,10),N=BigInt.str2bigInt(CONST.N,16),MAX_INT=Math.pow(2,53)-1,MAX_UINT=Math.pow(2,31)-1;HLP.extend(OTR,EventEmitter),OTR.prototype.init=function(){this.msgstate=CONST.MSGSTATE_PLAINTEXT,this.authstate=CONST.AUTHSTATE_NONE,this.ALLOW_V2=!0,this.ALLOW_V3=!0,this.REQUIRE_ENCRYPTION=!1,this.SEND_WHITESPACE_TAG=!1,this.WHITESPACE_START_AKE=!1,this.ERROR_START_AKE=!1,Parse.initFragment(this),this.their_y=null,this.their_old_y=null,this.their_keyid=0,this.their_priv_pk=null,this.their_instance_tag="\x00\x00\x00\x00",this.our_dh=this.dh(),this.our_old_dh=this.dh(),this.our_keyid=2,this.sessKeys=[new Array(2),new Array(2)],this.storedMgs=[],this.oldMacKeys=[],this.sm=null,this._akeInit(),this.receivedPlaintext=!1},OTR.prototype._akeInit=function(){this.ake=new AKE(this),this.transmittedRS=!1,this.ssid=null},OTR.prototype._SMW=function(otr,reqs){this.otr=otr;var opts={path:SMWPath,seed:BigInt.getSeed};"object"==typeof otr.smw&&Object.keys(otr.smw).forEach(function(k){opts[k]=otr.smw[k]}),"undefined"!=typeof module&&module.exports&&(Worker=require("webworker-threads").Worker),this.worker=new Worker(opts.path);var self=this;this.worker.onmessage=function(e){var d=e.data;d&&self.trigger(d.method,d.args)},this.worker.postMessage({type:"seed",seed:opts.seed(),imports:opts.imports}),this.worker.postMessage({type:"init",reqs:reqs})},HLP.extend(OTR.prototype._SMW,EventEmitter),["handleSM","rcvSecret","abort"].forEach(function(m){OTR.prototype._SMW.prototype[m]=function(){this.worker.postMessage({type:"method",method:m,args:Array.prototype.slice.call(arguments,0)})}}),OTR.prototype._smInit=function(){var reqs={ssid:this.ssid,our_fp:this.priv.fingerprint(),their_fp:this.their_priv_pk.fingerprint(),debug:this.debug};this.smw?(this.sm&&this.sm.worker.terminate(),this.sm=new this._SMW(this,reqs)):this.sm=new SM(reqs);var self=this;["trust","abort","question"].forEach(function(e){self.sm.on(e,function(){self.trigger("smp",[e].concat(Array.prototype.slice.call(arguments)))})}),this.sm.on("send",function(ssid,send){self.ssid===ssid&&(send=self.prepareMsg(send),self.io(send))})},OTR.prototype.io=function(msg,meta){msg=[].concat(msg).map(function(m){return{msg:m,meta:meta}}),this.outgoing=this.outgoing.concat(msg);var self=this;!function send(first){if(!first){if(!self.outgoing.length)return;var elem=self.outgoing.shift(),cb=null;elem.meta instanceof OTRCB&&(cb=elem.meta.cb,elem.meta=null),self.trigger("io",[elem.msg,elem.meta]),cb&&cb()}setTimeout(send,first?0:self.send_interval)}(!0)},OTR.prototype.dh=function(){var keys={privateKey:BigInt.randBigInt(320)};return keys.publicKey=BigInt.powMod(G,keys.privateKey,N),keys},OTR.prototype.DHSession=function DHSession(our_dh,their_y){if(!(this instanceof DHSession))return new DHSession(our_dh,their_y);var s=BigInt.powMod(their_y,our_dh.privateKey,N),secbytes=HLP.packMPI(s);this.id=HLP.mask(HLP.h2("\x00",secbytes),0,64);var sq=BigInt.greater(our_dh.publicKey,their_y),sendbyte=sq?"":"",rcvbyte=sq?"":"";this.sendenc=HLP.mask(HLP.h1(sendbyte,secbytes),0,128),this.sendmac=CryptoJS.SHA1(CryptoJS.enc.Latin1.parse(this.sendenc)),this.sendmac=this.sendmac.toString(CryptoJS.enc.Latin1),this.rcvenc=HLP.mask(HLP.h1(rcvbyte,secbytes),0,128),this.rcvmac=CryptoJS.SHA1(CryptoJS.enc.Latin1.parse(this.rcvenc)),this.rcvmac=this.rcvmac.toString(CryptoJS.enc.Latin1),this.rcvmacused=!1,this.extra_symkey=HLP.h2("ÿ",secbytes),this.send_counter=0,this.rcv_counter=0},OTR.prototype.rotateOurKeys=function(){var self=this;this.sessKeys[1].forEach(function(sk){sk&&sk.rcvmacused&&self.oldMacKeys.push(sk.rcvmac)}),this.our_old_dh=this.our_dh,this.our_dh=this.dh(),this.our_keyid+=1,this.sessKeys[1][0]=this.sessKeys[0][0],this.sessKeys[1][1]=this.sessKeys[0][1],this.sessKeys[0]=[this.their_y?new this.DHSession(this.our_dh,this.their_y):null,this.their_old_y?new this.DHSession(this.our_dh,this.their_old_y):null]},OTR.prototype.rotateTheirKeys=function(their_y){this.their_keyid+=1;var self=this;this.sessKeys.forEach(function(sk){sk[1]&&sk[1].rcvmacused&&self.oldMacKeys.push(sk[1].rcvmac)}),this.their_old_y=this.their_y,this.sessKeys[0][1]=this.sessKeys[0][0],this.sessKeys[1][1]=this.sessKeys[1][0],this.their_y=their_y,this.sessKeys[0][0]=new this.DHSession(this.our_dh,this.their_y),this.sessKeys[1][0]=new this.DHSession(this.our_old_dh,this.their_y)},OTR.prototype.prepareMsg=function(msg,esk){if(this.msgstate!==CONST.MSGSTATE_ENCRYPTED||0===this.their_keyid)return this.notify("Not ready to encrypt.");var sessKeys=this.sessKeys[1][0];if(sessKeys.send_counter>=MAX_INT)return this.notify("Should have rekeyed by now.");sessKeys.send_counter+=1;var ctr=HLP.packCtr(sessKeys.send_counter),send=this.ake.otr_version+"",v3=this.ake.otr_version===CONST.OTR_VERSION_3;if(v3&&(send+=this.our_instance_tag,send+=this.their_instance_tag),send+="\x00",send+=HLP.packINT(this.our_keyid-1),send+=HLP.packINT(this.their_keyid),send+=HLP.packMPI(this.our_dh.publicKey),send+=ctr.substring(0,8),Math.ceil(msg.length/8)>=MAX_UINT)return this.notify("Message is too long.");var aes=HLP.encryptAes(CryptoJS.enc.Latin1.parse(msg),sessKeys.sendenc,ctr);return send+=HLP.packData(aes),send+=HLP.make1Mac(send,sessKeys.sendmac),send+=HLP.packData(this.oldMacKeys.splice(0).join("")),send=HLP.wrapMsg(send,this.fragment_size,v3,this.our_instance_tag,this.their_instance_tag),send[0]?this.notify(send[0]):(esk&&this.trigger("file",["send",sessKeys.extra_symkey,esk]),send[1])},OTR.prototype.handleDataMsg=function(msg){var vt=msg.version+msg.type;this.ake.otr_version===CONST.OTR_VERSION_3&&(vt+=msg.instance_tags);var types=["BYTE","INT","INT","MPI","CTR","DATA","MAC","DATA"];msg=HLP.splitype(types,msg.msg);var ign=""===msg[0];if(this.msgstate!==CONST.MSGSTATE_ENCRYPTED||8!==msg.length)return void(ign||this.error("Received an unreadable encrypted message."));var our_keyid=this.our_keyid-HLP.readLen(msg[2]),their_keyid=this.their_keyid-HLP.readLen(msg[1]);if(0>our_keyid||our_keyid>1)return void(ign||this.error("Not of our latest keys."));if(0>their_keyid||their_keyid>1)return void(ign||this.error("Not of your latest keys."));var their_y=their_keyid?this.their_old_y:this.their_y;if(1===their_keyid&&!their_y)return void(ign||this.error("Do not have that key."));var sessKeys=this.sessKeys[our_keyid][their_keyid],ctr=HLP.unpackCtr(msg[4]);if(ctr<=sessKeys.rcv_counter)return void(ign||this.error("Counter in message is not larger."));sessKeys.rcv_counter=ctr,vt+=msg.slice(0,6).join("");var vmac=HLP.make1Mac(vt,sessKeys.rcvmac);if(!HLP.compare(msg[6],vmac))return void(ign||this.error("MACs do not match."));sessKeys.rcvmacused=!0;var out=HLP.decryptAes(msg[5].substring(4),sessKeys.rcvenc,HLP.padCtr(msg[4]));out=out.toString(CryptoJS.enc.Latin1),our_keyid||this.rotateOurKeys(),their_keyid||this.rotateTheirKeys(HLP.readMPI(msg[3]));var ind=out.indexOf("\x00");return~ind&&(this.handleTLVs(out.substring(ind+1),sessKeys),out=out.substring(0,ind)),out=CryptoJS.enc.Latin1.parse(out),out.toString(CryptoJS.enc.Utf8)},OTR.prototype.handleTLVs=function(tlvs,sessKeys){for(var type,len,msg;tlvs.length&&(type=HLP.unpackSHORT(tlvs.substr(0,2)),len=HLP.unpackSHORT(tlvs.substr(2,2)),msg=tlvs.substr(4,len),!(msg.length<len));){switch(type){case 1:this.msgstate=CONST.MSGSTATE_FINISHED,this.trigger("status",[CONST.STATUS_END_OTR]);break;case 2:case 3:case 4:case 5:case 6:case 7:if(this.msgstate!==CONST.MSGSTATE_ENCRYPTED)return void(this.sm&&this.sm.abort());this.sm||this._smInit(),this.sm.handleSM({msg:msg,type:type});break;case 8:msg=msg.substring(4),msg=CryptoJS.enc.Latin1.parse(msg),msg=msg.toString(CryptoJS.enc.Utf8),this.trigger("file",["receive",sessKeys.extra_symkey,msg])}tlvs=tlvs.substring(4+len)}},OTR.prototype.smpSecret=function(secret,question){return this.msgstate!==CONST.MSGSTATE_ENCRYPTED?this.notify("Must be encrypted for SMP."):"string"!=typeof secret||secret.length<1?this.notify("Secret is required."):(this.sm||this._smInit(),secret=CryptoJS.enc.Utf8.parse(secret).toString(CryptoJS.enc.Latin1),question&&(question=CryptoJS.enc.Utf8.parse(question).toString(CryptoJS.enc.Latin1)),void this.sm.rcvSecret(secret,question))},OTR.prototype.sendQueryMsg=function(){var versions={},msg=CONST.OTR_TAG;this.ALLOW_V2&&(versions[2]=!0),this.ALLOW_V3&&(versions[3]=!0);var vs=Object.keys(versions);vs.length&&(msg+="v",vs.forEach(function(v){"1"!==v&&(msg+=v)}),msg+="?"),this.io(msg),this.trigger("status",[CONST.STATUS_SEND_QUERY])},OTR.prototype.sendMsg=function(msg,meta){switch((this.REQUIRE_ENCRYPTION||this.msgstate!==CONST.MSGSTATE_PLAINTEXT)&&(msg=CryptoJS.enc.Utf8.parse(msg),msg=msg.toString(CryptoJS.enc.Latin1)),this.msgstate){case CONST.MSGSTATE_PLAINTEXT:if(this.REQUIRE_ENCRYPTION)return this.storedMgs.push({msg:msg,meta:meta}),void this.sendQueryMsg();this.SEND_WHITESPACE_TAG&&!this.receivedPlaintext&&(msg+=CONST.WHITESPACE_TAG,this.ALLOW_V3&&(msg+=CONST.WHITESPACE_TAG_V3),this.ALLOW_V2&&(msg+=CONST.WHITESPACE_TAG_V2));break;case CONST.MSGSTATE_FINISHED:return this.storedMgs.push({msg:msg,meta:meta}),void this.notify("Message cannot be sent at this time.","warn");case CONST.MSGSTATE_ENCRYPTED:msg=this.prepareMsg(msg);break;default:throw new Error("Unknown message state.")}msg&&this.io(msg,meta)},OTR.prototype.receiveMsg=function(msg,meta){if(msg=Parse.parseMsg(this,msg)){switch(msg.cls){case"error":return void this.notify(msg.msg);case"ake":return msg.version===CONST.OTR_VERSION_3&&this.checkInstanceTags(msg.instance_tags)?void this.notify("Received a message intended for a different session.","warn"):void this.ake.handleAKE(msg);case"data":if(msg.version===CONST.OTR_VERSION_3&&this.checkInstanceTags(msg.instance_tags))return void this.notify("Received a message intended for a different session.","warn");msg.msg=this.handleDataMsg(msg),msg.encrypted=!0;break;case"query":this.msgstate===CONST.MSGSTATE_ENCRYPTED&&this._akeInit(),this.doAKE(msg);break;default:(this.REQUIRE_ENCRYPTION||this.msgstate!==CONST.MSGSTATE_PLAINTEXT)&&this.notify("Received an unencrypted message.","warn"),this.receivedPlaintext=!0,this.WHITESPACE_START_AKE&&msg.ver.length>0&&this.doAKE(msg)}msg.msg&&this.trigger("ui",[msg.msg,!!msg.encrypted,meta])}},OTR.prototype.checkInstanceTags=function(it){var their_it=HLP.readLen(it.substr(0,4)),our_it=HLP.readLen(it.substr(4,4));if(our_it&&our_it!==HLP.readLen(this.our_instance_tag))return!0;if(HLP.readLen(this.their_instance_tag)){if(HLP.readLen(this.their_instance_tag)!==their_it)return!0}else{if(100>their_it)return!0;this.their_instance_tag=HLP.packINT(their_it)}},OTR.prototype.doAKE=function(msg){this.ALLOW_V3&&~msg.ver.indexOf(CONST.OTR_VERSION_3)?this.ake.initiateAKE(CONST.OTR_VERSION_3):this.ALLOW_V2&&~msg.ver.indexOf(CONST.OTR_VERSION_2)?this.ake.initiateAKE(CONST.OTR_VERSION_2):this.notify("OTR conversation requested, but no compatible protocol version found.","warn")},OTR.prototype.error=function(err){this.debug||(err="An OTR error has occurred."),this.io("?OTR Error:"+err),this.notify(err)},OTR.prototype.notify=function(err,severity){this.trigger("error",[err,severity||"error"])},OTR.prototype.sendStored=function(){var self=this;this.storedMgs.splice(0).forEach(function(elem){var msg=self.prepareMsg(elem.msg);self.io(msg,elem.meta)})},OTR.prototype.sendFile=function(filename){if(this.msgstate!==CONST.MSGSTATE_ENCRYPTED)return this.notify("Not ready to encrypt.");if(this.ake.otr_version!==CONST.OTR_VERSION_3)return this.notify("Protocol v3 required.");if(!filename)return this.notify("Please specify a filename.");var l1name=CryptoJS.enc.Utf8.parse(filename);if(l1name=l1name.toString(CryptoJS.enc.Latin1),l1name.length>=65532)return this.notify("Filename is too long.");var msg="\x00";msg+="\x00\b",msg+=HLP.packSHORT(4+l1name.length),msg+="\x00\x00\x00",msg+=l1name,msg=this.prepareMsg(msg,filename),this.io(msg)},OTR.prototype.endOtr=function(cb){this.msgstate===CONST.MSGSTATE_ENCRYPTED&&("function"==typeof cb&&(cb=new OTRCB(cb)),this.sendMsg("\x00\x00\x00\x00",cb),this.sm&&(this.smw&&this.sm.worker.terminate(),this.sm=null)),this.msgstate=CONST.MSGSTATE_PLAINTEXT,this.receivedPlaintext=!1,this.trigger("status",[CONST.STATUS_END_OTR])},OTR.makeInstanceTag=function(){var num=BigInt.randBigInt(32);return BigInt.greater(BigInt.str2bigInt("100",16),num)?OTR.makeInstanceTag():HLP.packINT(parseInt(BigInt.bigInt2str(num,10),10))}}.call(this),{OTR:this.OTR,DSA:this.DSA}}); \ No newline at end of file
+this.sendMsg(HLP.packTLV(3,send))},SM.prototype.initiate=function(question){HLP.debug.call(this,"smp initiate"),this.smpstate!==CONST.SMPSTATE_EXPECT1&&this.abort(),this.makeG2s();var r2=HLP.randomExponent(),r3=HLP.randomExponent();this.c2=this.computeC(1,r2),this.c3=this.computeC(2,r3),this.d2=this.computeD(r2,this.a2,this.c2),this.d3=this.computeD(r3,this.a3,this.c3),this.smpstate=CONST.SMPSTATE_EXPECT2;var send="",type=2;question&&(send+=question,send+="\x00",type=7),send+=HLP.packINT(6)+HLP.packMPIs([this.g2a,this.c2,this.d2,this.g3a,this.c3,this.d3]),this.sendMsg(HLP.packTLV(type,send))},SM.prototype.abort=function(){this.init(),this.sendMsg(HLP.packTLV(6,"")),this.trigger("abort")}}.call(this),function(){"use strict";function OTRCB(cb){this.cb=cb}function OTR(options){if(!(this instanceof OTR))return new OTR(options);if(options=options||{},options.priv&&!(options.priv instanceof DSA))throw new Error("Requires long-lived DSA key.");if(this.priv=options.priv?options.priv:new DSA,this.fragment_size=options.fragment_size||0,this.fragment_size<0)throw new Error("Fragment size must be a positive integer.");if(this.send_interval=options.send_interval||0,this.send_interval<0)throw new Error("Send interval must be a positive integer.");this.outgoing=[],this.our_instance_tag=options.instance_tag||OTR.makeInstanceTag(),this.debug=!!options.debug,this.smw=options.smw,this.init();var self=this;["sendMsg","receiveMsg"].forEach(function(meth){self[meth]=self[meth].bind(self)}),EventEmitter.call(this)}var CryptoJS,BigInt,EventEmitter,Worker,SMWPath,CONST,HLP,Parse,AKE,SM,DSA,root=this;"undefined"!=typeof module&&module.exports?(module.exports=OTR,CryptoJS=require("../vendor/crypto.js"),BigInt=require("../vendor/bigint.js"),EventEmitter=require("../vendor/eventemitter.js"),SMWPath=require("path").join(__dirname,"/sm-webworker.js"),CONST=require("./const.js"),HLP=require("./helpers.js"),Parse=require("./parse.js"),AKE=require("./ake.js"),SM=require("./sm.js"),DSA=require("./dsa.js"),OTR.CONST=CONST):(Object.keys(root.OTR).forEach(function(k){OTR[k]=root.OTR[k]}),root.OTR=OTR,CryptoJS=root.CryptoJS,BigInt=root.BigInt,EventEmitter=root.EventEmitter,Worker=root.Worker,SMWPath="sm-webworker.js",CONST=OTR.CONST,HLP=OTR.HLP,Parse=OTR.Parse,AKE=OTR.AKE,SM=OTR.SM,DSA=root.DSA);var G=BigInt.str2bigInt(CONST.G,10),N=BigInt.str2bigInt(CONST.N,16),MAX_INT=Math.pow(2,53)-1,MAX_UINT=Math.pow(2,31)-1;HLP.extend(OTR,EventEmitter),OTR.prototype.init=function(){this.msgstate=CONST.MSGSTATE_PLAINTEXT,this.authstate=CONST.AUTHSTATE_NONE,this.ALLOW_V2=!0,this.ALLOW_V3=!0,this.REQUIRE_ENCRYPTION=!1,this.SEND_WHITESPACE_TAG=!1,this.WHITESPACE_START_AKE=!1,this.ERROR_START_AKE=!1,Parse.initFragment(this),this.their_y=null,this.their_old_y=null,this.their_keyid=0,this.their_priv_pk=null,this.their_instance_tag="\x00\x00\x00\x00",this.our_dh=this.dh(),this.our_old_dh=this.dh(),this.our_keyid=2,this.sessKeys=[new Array(2),new Array(2)],this.storedMgs=[],this.oldMacKeys=[],this.sm=null,this._akeInit(),this.receivedPlaintext=!1},OTR.prototype._akeInit=function(){this.ake=new AKE(this),this.transmittedRS=!1,this.ssid=null},OTR.prototype._SMW=function(otr,reqs){this.otr=otr;var opts={path:SMWPath,seed:BigInt.getSeed};"object"==typeof otr.smw&&Object.keys(otr.smw).forEach(function(k){opts[k]=otr.smw[k]}),"undefined"!=typeof module&&module.exports&&(Worker=require("webworker-threads").Worker),this.worker=new Worker(opts.path);var self=this;this.worker.onmessage=function(e){var d=e.data;d&&self.trigger(d.method,d.args)},this.worker.postMessage({type:"seed",seed:opts.seed(),imports:opts.imports}),this.worker.postMessage({type:"init",reqs:reqs})},HLP.extend(OTR.prototype._SMW,EventEmitter),["handleSM","rcvSecret","abort"].forEach(function(m){OTR.prototype._SMW.prototype[m]=function(){this.worker.postMessage({type:"method",method:m,args:Array.prototype.slice.call(arguments,0)})}}),OTR.prototype._smInit=function(){var reqs={ssid:this.ssid,our_fp:this.priv.fingerprint(),their_fp:this.their_priv_pk.fingerprint(),debug:this.debug};this.smw?(this.sm&&this.sm.worker.terminate(),this.sm=new this._SMW(this,reqs)):this.sm=new SM(reqs);var self=this;["trust","abort","question"].forEach(function(e){self.sm.on(e,function(){self.trigger("smp",[e].concat(Array.prototype.slice.call(arguments)))})}),this.sm.on("send",function(ssid,send){self.ssid===ssid&&(send=self.prepareMsg(send),self.io(send))})},OTR.prototype.io=function(msg,meta){msg=[].concat(msg).map(function(m,i,arr){var obj={msg:m};return meta instanceof OTRCB&&i!==arr.length-1||(obj.meta=meta),obj}),this.outgoing=this.outgoing.concat(msg);var self=this;!function send(first){if(!first){if(!self.outgoing.length)return;var elem=self.outgoing.shift(),cb=null;elem.meta instanceof OTRCB&&(cb=elem.meta.cb,elem.meta=null),self.trigger("io",[elem.msg,elem.meta]),cb&&cb()}setTimeout(send,first?0:self.send_interval)}(!0)},OTR.prototype.dh=function(){var keys={privateKey:BigInt.randBigInt(320)};return keys.publicKey=BigInt.powMod(G,keys.privateKey,N),keys},OTR.prototype.DHSession=function DHSession(our_dh,their_y){if(!(this instanceof DHSession))return new DHSession(our_dh,their_y);var s=BigInt.powMod(their_y,our_dh.privateKey,N),secbytes=HLP.packMPI(s);this.id=HLP.mask(HLP.h2("\x00",secbytes),0,64);var sq=BigInt.greater(our_dh.publicKey,their_y),sendbyte=sq?"":"",rcvbyte=sq?"":"";this.sendenc=HLP.mask(HLP.h1(sendbyte,secbytes),0,128),this.sendmac=CryptoJS.SHA1(CryptoJS.enc.Latin1.parse(this.sendenc)),this.sendmac=this.sendmac.toString(CryptoJS.enc.Latin1),this.rcvenc=HLP.mask(HLP.h1(rcvbyte,secbytes),0,128),this.rcvmac=CryptoJS.SHA1(CryptoJS.enc.Latin1.parse(this.rcvenc)),this.rcvmac=this.rcvmac.toString(CryptoJS.enc.Latin1),this.rcvmacused=!1,this.extra_symkey=HLP.h2("ÿ",secbytes),this.send_counter=0,this.rcv_counter=0},OTR.prototype.rotateOurKeys=function(){var self=this;this.sessKeys[1].forEach(function(sk){sk&&sk.rcvmacused&&self.oldMacKeys.push(sk.rcvmac)}),this.our_old_dh=this.our_dh,this.our_dh=this.dh(),this.our_keyid+=1,this.sessKeys[1][0]=this.sessKeys[0][0],this.sessKeys[1][1]=this.sessKeys[0][1],this.sessKeys[0]=[this.their_y?new this.DHSession(this.our_dh,this.their_y):null,this.their_old_y?new this.DHSession(this.our_dh,this.their_old_y):null]},OTR.prototype.rotateTheirKeys=function(their_y){this.their_keyid+=1;var self=this;this.sessKeys.forEach(function(sk){sk[1]&&sk[1].rcvmacused&&self.oldMacKeys.push(sk[1].rcvmac)}),this.their_old_y=this.their_y,this.sessKeys[0][1]=this.sessKeys[0][0],this.sessKeys[1][1]=this.sessKeys[1][0],this.their_y=their_y,this.sessKeys[0][0]=new this.DHSession(this.our_dh,this.their_y),this.sessKeys[1][0]=new this.DHSession(this.our_old_dh,this.their_y)},OTR.prototype.prepareMsg=function(msg,esk){if(this.msgstate!==CONST.MSGSTATE_ENCRYPTED||0===this.their_keyid)return this.notify("Not ready to encrypt.");var sessKeys=this.sessKeys[1][0];if(sessKeys.send_counter>=MAX_INT)return this.notify("Should have rekeyed by now.");sessKeys.send_counter+=1;var ctr=HLP.packCtr(sessKeys.send_counter),send=this.ake.otr_version+"",v3=this.ake.otr_version===CONST.OTR_VERSION_3;if(v3&&(send+=this.our_instance_tag,send+=this.their_instance_tag),send+="\x00",send+=HLP.packINT(this.our_keyid-1),send+=HLP.packINT(this.their_keyid),send+=HLP.packMPI(this.our_dh.publicKey),send+=ctr.substring(0,8),Math.ceil(msg.length/8)>=MAX_UINT)return this.notify("Message is too long.");var aes=HLP.encryptAes(CryptoJS.enc.Latin1.parse(msg),sessKeys.sendenc,ctr);return send+=HLP.packData(aes),send+=HLP.make1Mac(send,sessKeys.sendmac),send+=HLP.packData(this.oldMacKeys.splice(0).join("")),send=HLP.wrapMsg(send,this.fragment_size,v3,this.our_instance_tag,this.their_instance_tag),send[0]?this.notify(send[0]):(esk&&this.trigger("file",["send",sessKeys.extra_symkey,esk]),send[1])},OTR.prototype.handleDataMsg=function(msg){var vt=msg.version+msg.type;this.ake.otr_version===CONST.OTR_VERSION_3&&(vt+=msg.instance_tags);var types=["BYTE","INT","INT","MPI","CTR","DATA","MAC","DATA"];msg=HLP.splitype(types,msg.msg);var ign=""===msg[0];if(this.msgstate!==CONST.MSGSTATE_ENCRYPTED||8!==msg.length)return void(ign||this.error("Received an unreadable encrypted message."));var our_keyid=this.our_keyid-HLP.readLen(msg[2]),their_keyid=this.their_keyid-HLP.readLen(msg[1]);if(0>our_keyid||our_keyid>1)return void(ign||this.error("Not of our latest keys."));if(0>their_keyid||their_keyid>1)return void(ign||this.error("Not of your latest keys."));var their_y=their_keyid?this.their_old_y:this.their_y;if(1===their_keyid&&!their_y)return void(ign||this.error("Do not have that key."));var sessKeys=this.sessKeys[our_keyid][their_keyid],ctr=HLP.unpackCtr(msg[4]);if(ctr<=sessKeys.rcv_counter)return void(ign||this.error("Counter in message is not larger."));sessKeys.rcv_counter=ctr,vt+=msg.slice(0,6).join("");var vmac=HLP.make1Mac(vt,sessKeys.rcvmac);if(!HLP.compare(msg[6],vmac))return void(ign||this.error("MACs do not match."));sessKeys.rcvmacused=!0;var out=HLP.decryptAes(msg[5].substring(4),sessKeys.rcvenc,HLP.padCtr(msg[4]));out=out.toString(CryptoJS.enc.Latin1),our_keyid||this.rotateOurKeys(),their_keyid||this.rotateTheirKeys(HLP.readMPI(msg[3]));var ind=out.indexOf("\x00");return~ind&&(this.handleTLVs(out.substring(ind+1),sessKeys),out=out.substring(0,ind)),out=CryptoJS.enc.Latin1.parse(out),out.toString(CryptoJS.enc.Utf8)},OTR.prototype.handleTLVs=function(tlvs,sessKeys){for(var type,len,msg;tlvs.length&&(type=HLP.unpackSHORT(tlvs.substr(0,2)),len=HLP.unpackSHORT(tlvs.substr(2,2)),msg=tlvs.substr(4,len),!(msg.length<len));){switch(type){case 1:this.msgstate=CONST.MSGSTATE_FINISHED,this.trigger("status",[CONST.STATUS_END_OTR]);break;case 2:case 3:case 4:case 5:case 6:case 7:if(this.msgstate!==CONST.MSGSTATE_ENCRYPTED)return void(this.sm&&this.sm.abort());this.sm||this._smInit(),this.sm.handleSM({msg:msg,type:type});break;case 8:msg=msg.substring(4),msg=CryptoJS.enc.Latin1.parse(msg),msg=msg.toString(CryptoJS.enc.Utf8),this.trigger("file",["receive",sessKeys.extra_symkey,msg])}tlvs=tlvs.substring(4+len)}},OTR.prototype.smpSecret=function(secret,question){return this.msgstate!==CONST.MSGSTATE_ENCRYPTED?this.notify("Must be encrypted for SMP."):"string"!=typeof secret||secret.length<1?this.notify("Secret is required."):(this.sm||this._smInit(),secret=CryptoJS.enc.Utf8.parse(secret).toString(CryptoJS.enc.Latin1),question&&(question=CryptoJS.enc.Utf8.parse(question).toString(CryptoJS.enc.Latin1)),void this.sm.rcvSecret(secret,question))},OTR.prototype.sendQueryMsg=function(){var versions={},msg=CONST.OTR_TAG;this.ALLOW_V2&&(versions[2]=!0),this.ALLOW_V3&&(versions[3]=!0);var vs=Object.keys(versions);vs.length&&(msg+="v",vs.forEach(function(v){"1"!==v&&(msg+=v)}),msg+="?"),this.io(msg),this.trigger("status",[CONST.STATUS_SEND_QUERY])},OTR.prototype.sendMsg=function(msg,meta){switch((this.REQUIRE_ENCRYPTION||this.msgstate!==CONST.MSGSTATE_PLAINTEXT)&&(msg=CryptoJS.enc.Utf8.parse(msg),msg=msg.toString(CryptoJS.enc.Latin1)),this.msgstate){case CONST.MSGSTATE_PLAINTEXT:if(this.REQUIRE_ENCRYPTION)return this.storedMgs.push({msg:msg,meta:meta}),void this.sendQueryMsg();this.SEND_WHITESPACE_TAG&&!this.receivedPlaintext&&(msg+=CONST.WHITESPACE_TAG,this.ALLOW_V3&&(msg+=CONST.WHITESPACE_TAG_V3),this.ALLOW_V2&&(msg+=CONST.WHITESPACE_TAG_V2));break;case CONST.MSGSTATE_FINISHED:return this.storedMgs.push({msg:msg,meta:meta}),void this.notify("Message cannot be sent at this time.","warn");case CONST.MSGSTATE_ENCRYPTED:msg=this.prepareMsg(msg);break;default:throw new Error("Unknown message state.")}msg&&this.io(msg,meta)},OTR.prototype.receiveMsg=function(msg,meta){if(msg=Parse.parseMsg(this,msg)){switch(msg.cls){case"error":return void this.notify(msg.msg);case"ake":return msg.version===CONST.OTR_VERSION_3&&this.checkInstanceTags(msg.instance_tags)?void this.notify("Received a message intended for a different session.","warn"):void this.ake.handleAKE(msg);case"data":if(msg.version===CONST.OTR_VERSION_3&&this.checkInstanceTags(msg.instance_tags))return void this.notify("Received a message intended for a different session.","warn");msg.msg=this.handleDataMsg(msg),msg.encrypted=!0;break;case"query":this.msgstate===CONST.MSGSTATE_ENCRYPTED&&this._akeInit(),this.doAKE(msg);break;default:(this.REQUIRE_ENCRYPTION||this.msgstate!==CONST.MSGSTATE_PLAINTEXT)&&this.notify("Received an unencrypted message.","warn"),this.receivedPlaintext=!0,this.WHITESPACE_START_AKE&&msg.ver.length>0&&this.doAKE(msg)}msg.msg&&this.trigger("ui",[msg.msg,!!msg.encrypted,meta])}},OTR.prototype.checkInstanceTags=function(it){var their_it=HLP.readLen(it.substr(0,4)),our_it=HLP.readLen(it.substr(4,4));if(our_it&&our_it!==HLP.readLen(this.our_instance_tag))return!0;if(HLP.readLen(this.their_instance_tag)){if(HLP.readLen(this.their_instance_tag)!==their_it)return!0}else{if(100>their_it)return!0;this.their_instance_tag=HLP.packINT(their_it)}},OTR.prototype.doAKE=function(msg){this.ALLOW_V3&&~msg.ver.indexOf(CONST.OTR_VERSION_3)?this.ake.initiateAKE(CONST.OTR_VERSION_3):this.ALLOW_V2&&~msg.ver.indexOf(CONST.OTR_VERSION_2)?this.ake.initiateAKE(CONST.OTR_VERSION_2):this.notify("OTR conversation requested, but no compatible protocol version found.","warn")},OTR.prototype.error=function(err){this.debug||(err="An OTR error has occurred."),this.io("?OTR Error:"+err),this.notify(err)},OTR.prototype.notify=function(err,severity){this.trigger("error",[err,severity||"error"])},OTR.prototype.sendStored=function(){var self=this;this.storedMgs.splice(0).forEach(function(elem){var msg=self.prepareMsg(elem.msg);self.io(msg,elem.meta)})},OTR.prototype.sendFile=function(filename){if(this.msgstate!==CONST.MSGSTATE_ENCRYPTED)return this.notify("Not ready to encrypt.");if(this.ake.otr_version!==CONST.OTR_VERSION_3)return this.notify("Protocol v3 required.");if(!filename)return this.notify("Please specify a filename.");var l1name=CryptoJS.enc.Utf8.parse(filename);if(l1name=l1name.toString(CryptoJS.enc.Latin1),l1name.length>=65532)return this.notify("Filename is too long.");var msg="\x00";msg+="\x00\b",msg+=HLP.packSHORT(4+l1name.length),msg+="\x00\x00\x00",msg+=l1name,msg=this.prepareMsg(msg,filename),this.io(msg)},OTR.prototype.endOtr=function(cb){this.msgstate===CONST.MSGSTATE_ENCRYPTED?("function"==typeof cb&&(cb=new OTRCB(cb)),this.sendMsg("\x00\x00\x00\x00",cb),this.sm&&(this.smw&&this.sm.worker.terminate(),this.sm=null)):"function"==typeof cb&&setTimeout(cb,0),this.msgstate=CONST.MSGSTATE_PLAINTEXT,this.receivedPlaintext=!1,this.trigger("status",[CONST.STATUS_END_OTR])},OTR.makeInstanceTag=function(){var num=BigInt.randBigInt(32);return BigInt.greater(BigInt.str2bigInt("100",16),num)?OTR.makeInstanceTag():HLP.packINT(parseInt(BigInt.bigInt2str(num,10),10))}}.call(this),{OTR:this.OTR,DSA:this.DSA}}); \ No newline at end of file
diff --git a/build/js/jsxc/lib/otr/lib/dsa-webworker.js b/build/js/jsxc/lib/otr/lib/dsa-webworker.js
index d84ad17..7aaa22a 100644
--- a/build/js/jsxc/lib/otr/lib/dsa-webworker.js
+++ b/build/js/jsxc/lib/otr/lib/dsa-webworker.js
@@ -3,11 +3,16 @@
root.OTR = {}
root.DSA = {}
- root.crypto = {
- randomBytes: function () {
- throw new Error("Haven't seeded yet.")
+
+ var hasCrypto = false
+ if (root.crypto)
+ hasCrypto = true
+ else
+ root.crypto = {
+ randomBytes: function () {
+ throw new Error("Haven't seeded yet.")
+ }
}
- }
// default imports
var imports = [
@@ -30,10 +35,12 @@
if (data.imports) imports = data.imports
importScripts.apply(root, imports);
- // use salsa20 since there's no prng in webworkers
- var state = new root.Salsa20(data.seed.slice(0, 32), data.seed.slice(32))
- root.crypto.randomBytes = function (n) {
- return state.getBytes(n)
+ if (!hasCrypto) {
+ // use salsa20 when there's no prng in webworkers
+ var state = new root.Salsa20(data.seed.slice(0, 32), data.seed.slice(32))
+ root.crypto.randomBytes = function (n) {
+ return state.getBytes(n)
+ }
}
if (data.debug) sendMsg('debug', 'DSA key creation started')
diff --git a/build/js/jsxc/lib/otr/lib/sm-webworker.js b/build/js/jsxc/lib/otr/lib/sm-webworker.js
index 301843d..f0f9b04 100644
--- a/build/js/jsxc/lib/otr/lib/sm-webworker.js
+++ b/build/js/jsxc/lib/otr/lib/sm-webworker.js
@@ -2,11 +2,16 @@
"use strict";
root.OTR = {}
- root.crypto = {
- randomBytes: function () {
- throw new Error("Haven't seeded yet.")
+
+ var hasCrypto = false
+ if (root.crypto)
+ hasCrypto = true
+ else
+ root.crypto = {
+ randomBytes: function () {
+ throw new Error("Haven't seeded yet.")
+ }
}
- }
// default imports
var imports = [
@@ -36,7 +41,10 @@
if (data.imports) imports = data.imports
importScripts.apply(root, imports)
- // use salsa20 since there's no prng in webworkers
+ if (hasCrypto)
+ break
+
+ // use salsa20 when there's no prng in webworkers
var state = new root.Salsa20(
data.seed.slice(0, 32),
data.seed.slice(32)
diff --git a/build/js/jsxc/lib/strophe.bookmarks/index.js b/build/js/jsxc/lib/strophe.bookmarks/index.js
new file mode 100644
index 0000000..f8f6b24
--- /dev/null
+++ b/build/js/jsxc/lib/strophe.bookmarks/index.js
@@ -0,0 +1,116 @@
+Strophe.addConnectionPlugin('bookmarks', {
+ init : function(connection) {
+ this.connection = connection;
+ Strophe.addNamespace('PRIVATE', 'jabber:iq:private');
+ Strophe.addNamespace('BOOKMARKS', 'storage:bookmarks');
+ Strophe.addNamespace('PRIVACY', 'jabber:iq:privacy');
+ Strophe.addNamespace('DELAY', 'jabber:x:delay');
+ Strophe.addNamespace('PUBSUB', 'http://jabber.org/protocol/pubsub');
+
+ },
+ /**
+ * Create private bookmark node.
+ *
+ * @param {function} [success] - Callback after success
+ * @param {function} [error] - Callback after error
+ */
+ createBookmarksNode : function(success, error) {
+ // We do this instead of using publish-options because this is not
+ // mandatory to implement according to XEP-0060
+ this.connection.sendIQ($iq({
+ type : 'set'
+ }).c('pubsub', {
+ xmlns : Strophe.NS.PUBSUB
+ }).c('create', {
+ node : 'storage:bookmarks'
+ }).up().c('configure').c('x', {
+ xmlns : 'jabber:x:data',
+ type : 'submit'
+ }).c('field', {
+ 'var' : 'FORM_TYPE',
+ type : 'hidden'
+ }).c('value').t('http://jabber.org/protocol/pubsub#node_config').up()
+ .up().c('field', {
+ 'var' : 'pubsub#persist_items'
+ }).c('value').t('1').up().up().c('field', {
+ 'var' : 'pubsub#access_model'
+ }).c('value').t('whitelist'), success, error);
+
+ return true;
+ },
+ /**
+ * Add bookmark to storage.
+ *
+ * @param {string} roomJid - The JabberID of the chat roomJid
+ * @param {string} [alias] - A friendly name for the bookmark
+ * @param {string} [nick] - The users's preferred roomnick for the chatroom
+ * @param {boolean} [autojoin=false] - Whether the client should automatically join
+ * the conference room on login.
+ * @param {function} [success] - Callback after success
+ * @param {function} [error] - Callback after error
+ */
+ add : function(roomJid, alias, nick, autojoin, success, error) {
+ var conferenceAttr = {
+ jid: roomJid,
+ autojoin: autojoin || false
+ };
+
+ if (alias) {
+ conferenceAttr.name = alias;
+ }
+
+ var stanza = $iq({
+ type : 'set'
+ }).c('pubsub', {
+ xmlns : Strophe.NS.PUBSUB
+ }).c('publish', {
+ node : Strophe.NS.BOOKMARKS
+ }).c('item', {
+ id : roomJid
+ }).c('storage', {
+ xmlns : Strophe.NS.BOOKMARKS
+ }).c('conference', conferenceAttr);
+
+ if (nick) {
+ stanza.c('nick').t(nick);
+ }
+
+ this.connection.sendIQ(stanza, success, error);
+ },
+ /**
+ * Retrieve all stored bookmarks.
+ *
+ * @param {function} [success] - Callback after success
+ * @param {function} [error] - Callback after error
+ */
+ get: function(success, error) {
+ this.connection.sendIQ($iq({
+ type : 'get'
+ }).c('pubsub', {
+ xmlns : Strophe.NS.PUBSUB
+ }).c('items', {
+ node : Strophe.NS.BOOKMARKS
+ }), success, error);
+ },
+ /**
+ * Delete the given entry for roomJid.
+ *
+ * @param {string} roomJid - The JabberID of the chat roomJid you want to remove
+ * @param {function} [success] - Callback after success
+ * @param {function} [error] - Callback after error
+ * @param {boolean} [notify=false] - True: notify all subscribers
+ */
+ delete: function(roomJid, success, error, notify) {
+ this.connection.sendIQ($iq({
+ type : 'set'
+ }).c('pubsub', {
+ xmlns : Strophe.NS.PUBSUB
+ }).c('retract', {
+ node : Strophe.NS.BOOKMARKS,
+ notify: notify || false
+ }).c('item', {
+ id: roomJid
+ }), success, error);
+ }
+
+});
diff --git a/build/js/jsxc/lib/strophe.jingle/strophe.jingle.adapter.js b/build/js/jsxc/lib/strophe.jingle/strophe.jingle.adapter.js
deleted file mode 100644
index 4c1c9e4..0000000
--- a/build/js/jsxc/lib/strophe.jingle/strophe.jingle.adapter.js
+++ /dev/null
@@ -1,368 +0,0 @@
-/* jshint -W117 */
-var setupRTC, getUserMediaWithConstraints, TraceablePeerConnection;
-
-(function($){
-TraceablePeerConnection = function(ice_config, constraints) {
- var self = this;
- var RTCPeerconnection = navigator.mozGetUserMedia ? mozRTCPeerConnection : webkitRTCPeerConnection;
- this.peerconnection = new RTCPeerconnection(ice_config, constraints);
- this.updateLog = [];
- this.stats = {};
- this.statsinterval = null;
- this.maxstats = 300; // limit to 300 values, i.e. 5 minutes; set to 0 to disable
-
- // override as desired
- this.trace = function(what, info) {
- //console.warn('WTRACE', what, info);
- self.updateLog.push({
- time: new Date(),
- type: what,
- value: info || ""
- });
- };
- this.onicecandidate = null;
- this.peerconnection.onicecandidate = function (event) {
- self.trace('onicecandidate', JSON.stringify(event.candidate, null, ' '));
- if (self.onicecandidate !== null) {
- self.onicecandidate(event);
- }
- };
- this.onaddstream = null;
- this.peerconnection.onaddstream = function (event) {
- self.trace('onaddstream', event.stream.id);
- if (self.onaddstream !== null) {
- self.onaddstream(event);
- }
- };
- this.onremovestream = null;
- this.peerconnection.onremovestream = function (event) {
- self.trace('onremovestream', event.stream.id);
- if (self.onremovestream !== null) {
- self.onremovestream(event);
- }
- };
- this.onsignalingstatechange = null;
- this.peerconnection.onsignalingstatechange = function (event) {
- self.trace('onsignalingstatechange', self.signalingState);
- if (self.onsignalingstatechange !== null) {
- self.onsignalingstatechange(event);
- }
- };
- this.oniceconnectionstatechange = null;
- this.peerconnection.oniceconnectionstatechange = function (event) {
- self.trace('oniceconnectionstatechange', self.iceConnectionState);
- if (self.oniceconnectionstatechange !== null) {
- self.oniceconnectionstatechange(event);
- }
- };
- this.onnegotiationneeded = null;
- this.peerconnection.onnegotiationneeded = function (event) {
- self.trace('onnegotiationneeded');
- if (self.onnegotiationneeded !== null) {
- self.onnegotiationneeded(event);
- }
- };
- self.ondatachannel = null;
- this.peerconnection.ondatachannel = function (event) {
- self.trace('ondatachannel', event);
- if (self.ondatachannel !== null) {
- self.ondatachannel(event);
- }
- };
- if (!navigator.mozGetUserMedia) {
- this.statsinterval = window.setInterval(function() {
- self.peerconnection.getStats(function(stats) {
- var results = stats.result();
- for (var i = 0; i < results.length; ++i) {
- //console.log(results[i].type, results[i].id, results[i].names())
- var now = new Date();
- results[i].names().forEach(function (name) {
- var id = results[i].id + '-' + name;
- if (!self.stats[id]) {
- self.stats[id] = {
- startTime: now,
- endTime: now,
- values: [],
- times: []
- };
- }
- self.stats[id].values.push(results[i].stat(name));
- self.stats[id].times.push(now.getTime());
- if (self.stats[id].values.length > self.maxstats) {
- self.stats[id].values.shift();
- self.stats[id].times.shift();
- }
- self.stats[id].endTime = now;
- });
- }
- });
-
- }, 1000);
- }
-}
-
-dumpSDP = function(description) {
- return 'type: ' + description.type + '\r\n' + description.sdp;
-};
-
-['signalingState', 'iceConnectionState', 'localDescription', 'remoteDescription'].forEach(function (prop) {
- Object.defineProperty(TraceablePeerConnection.prototype, prop, {
- get: function () {
- return this.peerconnection[prop]
- }
- });
-});
-
-TraceablePeerConnection.prototype.addStream = function (stream) {
- this.trace('addStream', stream.id);
- this.peerconnection.addStream(stream);
-};
-
-TraceablePeerConnection.prototype.removeStream = function (stream) {
- this.trace('removeStream', stream.id);
- this.peerconnection.removeStream(stream);
-};
-
-TraceablePeerConnection.prototype.createDataChannel = function (label, opts) {
- this.trace('createDataChannel', label, opts);
- this.peerconnection.createDataChannel(label, opts);
-};
-
-TraceablePeerConnection.prototype.setLocalDescription = function (description, successCallback, failureCallback) {
- var self = this;
- this.trace('setLocalDescription', dumpSDP(description));
- this.peerconnection.setLocalDescription(description,
- function () {
- self.trace('setLocalDescriptionOnSuccess');
- successCallback();
- },
- function (err) {
- self.trace('setLocalDescriptionOnFailure', err);
- failureCallback(err);
- }
- );
- /*
- if (this.statsinterval === null && this.maxstats > 0) {
- // start gathering stats
- }
- */
-};
-
-TraceablePeerConnection.prototype.setRemoteDescription = function (description, successCallback, failureCallback) {
- var self = this;
- this.trace('setRemoteDescription', dumpSDP(description));
- this.peerconnection.setRemoteDescription(description,
- function () {
- self.trace('setRemoteDescriptionOnSuccess');
- successCallback();
- },
- function (err) {
- self.trace('setRemoteDescriptionOnFailure', err);
- failureCallback(err);
- }
- );
- /*
- if (this.statsinterval === null && this.maxstats > 0) {
- // start gathering stats
- }
- */
-};
-
-TraceablePeerConnection.prototype.close = function () {
- this.trace('stop');
- if (this.statsinterval !== null) {
- window.clearInterval(this.statsinterval);
- this.statsinterval = null;
- }
- this.peerconnection.close();
-};
-
-TraceablePeerConnection.prototype.createOffer = function (successCallback, failureCallback, constraints) {
- var self = this;
- this.trace('createOffer', JSON.stringify(constraints, null, ' '));
- this.peerconnection.createOffer(
- function (offer) {
- self.trace('createOfferOnSuccess', dumpSDP(offer));
- successCallback(offer);
- },
- function(err) {
- self.trace('createOfferOnFailure', err);
- failureCallback(err);
- },
- constraints
- );
-};
-
-TraceablePeerConnection.prototype.createAnswer = function (successCallback, failureCallback, constraints) {
- var self = this;
- this.trace('createAnswer', JSON.stringify(constraints, null, ' '));
- this.peerconnection.createAnswer(
- function (answer) {
- self.trace('createAnswerOnSuccess', dumpSDP(answer));
- successCallback(answer);
- },
- function(err) {
- self.trace('createAnswerOnFailure', err);
- failureCallback(err);
- },
- constraints
- );
-};
-
-TraceablePeerConnection.prototype.addIceCandidate = function (candidate, successCallback, failureCallback) {
- var self = this;
- this.trace('addIceCandidate', JSON.stringify(candidate, null, ' '));
- this.peerconnection.addIceCandidate(candidate);
- this.peerconnection.addIceCandidate(candidate,
- function () {
- self.trace('addIceCandidateOnSuccess');
- if (successCallback) successCallback();
- },
- function (err) {
- self.trace('addIceCandidateOnFailure', err);
- if (failureCallback) failureCallback(err);
- }
- );
-};
-
-TraceablePeerConnection.prototype.getStats = function(callback) {
- if (navigator.mozGetUserMedia) {
- // ignore for now...
- } else {
- this.peerconnection.getStats(callback);
- }
-};
-
-// mozilla chrome compat layer -- very similar to adapter.js
-setupRTC = function (){
- var RTC = null;
- if (navigator.mozGetUserMedia && mozRTCPeerConnection) {
- console.log('This appears to be Firefox');
- var version = navigator.userAgent.match(/Firefox/) ? parseInt(navigator.userAgent.match(/Firefox\/([0-9]+)\./)[1], 10) : 0;
- if (version >= 22) {
- RTC = {
- peerconnection: mozRTCPeerConnection,
- browser: 'firefox',
- getUserMedia: navigator.mozGetUserMedia.bind(navigator),
- attachMediaStream: function (element, stream) {
- element[0].mozSrcObject = stream;
- element[0].play();
- },
- pc_constraints: {}
- };
- RTCSessionDescription = mozRTCSessionDescription;
- RTCIceCandidate = mozRTCIceCandidate;
- }
- } else if (navigator.webkitGetUserMedia) {
- console.log('This appears to be Chrome');
- RTC = {
- peerconnection: webkitRTCPeerConnection,
- browser: 'chrome',
- getUserMedia: navigator.webkitGetUserMedia.bind(navigator),
- attachMediaStream: function (element, stream) {
- element.attr('src', webkitURL.createObjectURL(stream));
- },
- // DTLS should now be enabled by default but..
- pc_constraints: {'optional': [{'DtlsSrtpKeyAgreement': 'true'}]}
- };
- }
- if (RTC === null) {
- try { console.log('Browser does not appear to be WebRTC-capable'); } catch (e) { }
- }
- return RTC;
-};
-
-getUserMediaWithConstraints = function(um, resolution, bandwidth, fps) {
- var constraints = {audio: false, video: false};
-
- if (um.indexOf('video') >= 0) {
- constraints.video = {mandatory: {}};// same behaviour as true
- }
- if (um.indexOf('audio') >= 0) {
- constraints.audio = {};// same behaviour as true
- }
- if (um.indexOf('screen') >= 0) {
- constraints.video = {
- "mandatory": {
- "chromeMediaSource": "screen"
- }
- };
- }
-
- if (resolution && !constraints.video) {
- constraints.video = {mandatory: {}};// same behaviour as true
- }
- // see https://code.google.com/p/chromium/issues/detail?id=143631#c9 for list of supported resolutions
- switch (resolution) {
- // 16:9 first
- case '1080':
- case 'fullhd':
- constraints.video.mandatory.minWidth = 1920;
- constraints.video.mandatory.minHeight = 1080;
- break;
- case '720':
- case 'hd':
- constraints.video.mandatory.minWidth = 1280;
- constraints.video.mandatory.minHeight = 720;
- break;
- case '360':
- constraints.video.mandatory.minWidth = 640;
- constraints.video.mandatory.minHeight = 360;
- break;
- case '180':
- constraints.video.mandatory.minWidth = 320;
- constraints.video.mandatory.minHeight = 180;
- break;
- // 4:3
- case '960':
- constraints.video.mandatory.minWidth = 960;
- constraints.video.mandatory.minHeight = 720;
- break;
- case '640':
- case 'vga':
- constraints.video.mandatory.minWidth = 640;
- constraints.video.mandatory.minHeight = 480;
- break;
- case '320':
- constraints.video.mandatory.minWidth = 320;
- constraints.video.mandatory.minHeight = 240;
- break;
- default:
- if (navigator.userAgent.indexOf('Android') != -1) {
- constraints.video.mandatory.minWidth = 320;
- constraints.video.mandatory.minHeight = 240;
- constraints.video.mandatory.maxFrameRate = 15;
- }
- break;
- }
-
- // take what is configured and try not to be more intelligent
- if (constraints.video.minWidth) constraints.video.maxWidth = constraints.video.minWidth;
- if (constraints.video.minHeight) constraints.video.maxHeight = constraints.video.minHeight;
-
- if (bandwidth) { // doesn't work currently, see webrtc issue 1846
- if (!constraints.video) constraints.video = {mandatory: {}};//same behaviour as true
- constraints.video.optional = [{bandwidth: bandwidth}];
- }
- if (fps) { // for some cameras it might be necessary to request 30fps
- // so they choose 30fps mjpg over 10fps yuy2
- if (!constraints.video) constraints.video = {mandatory: {}};// same behaviour as tru;
- constraints.video.mandatory.minFrameRate = fps;
- }
-
- try {
- RTC.getUserMedia(constraints,
- function (stream) {
- console.log('onUserMediaSuccess');
- $(document).trigger('mediaready.jingle', [stream]);
- },
- function (error) {
- console.warn('Failed to get access to local media. Error ', error);
- $(document).trigger('mediafailure.jingle', [error]);
- });
- } catch (e) {
- console.error('GUM failed: ', e);
- $(document).trigger('mediafailure.jingle');
- }
-}
-}(jQuery));
diff --git a/build/js/jsxc/lib/strophe.jingle/strophe.jingle.js b/build/js/jsxc/lib/strophe.jingle/strophe.jingle.js
deleted file mode 100644
index 0a0cdd7..0000000
--- a/build/js/jsxc/lib/strophe.jingle/strophe.jingle.js
+++ /dev/null
@@ -1,254 +0,0 @@
-/* jshint -W117 */
-(function($){
-Strophe.addConnectionPlugin('jingle', {
- connection: null,
- sessions: {},
- jid2session: {},
- ice_config: {iceServers: []},
- pc_constraints: {},
- media_constraints: {
- mandatory: {
- 'OfferToReceiveAudio': true,
- 'OfferToReceiveVideo': true
- }
- // MozDontOfferDataChannel: true when this is firefox
- },
- localStream: null,
-
- init: function (conn) {
- this.connection = conn;
- if (this.connection.disco) {
- // http://xmpp.org/extensions/xep-0167.html#support
- // http://xmpp.org/extensions/xep-0176.html#support
- this.connection.disco.addFeature('urn:xmpp:jingle:1');
- this.connection.disco.addFeature('urn:xmpp:jingle:apps:rtp:1');
- this.connection.disco.addFeature('urn:xmpp:jingle:transports:ice-udp:1');
- this.connection.disco.addFeature('urn:xmpp:jingle:apps:rtp:audio');
- this.connection.disco.addFeature('urn:xmpp:jingle:apps:rtp:video');
-
-
- // this is dealt with by SDP O/A so we don't need to annouce this
- //this.connection.disco.addFeature('urn:xmpp:jingle:apps:rtp:rtcp-fb:0'); // XEP-0293
- //this.connection.disco.addFeature('urn:xmpp:jingle:apps:rtp:rtp-hdrext:0'); // XEP-0294
- this.connection.disco.addFeature('urn:ietf:rfc:5761'); // rtcp-mux
- //this.connection.disco.addFeature('urn:ietf:rfc:5888'); // a=group, e.g. bundle
- //this.connection.disco.addFeature('urn:ietf:rfc:5576'); // a=ssrc
- }
- this.connection.addHandler(this.onJingle.bind(this), 'urn:xmpp:jingle:1', 'iq', 'set', null, null);
- },
- onJingle: function (iq) {
- var sid = $(iq).find('jingle').attr('sid');
- var action = $(iq).find('jingle').attr('action');
- // send ack first
- var ack = $iq({type: 'result',
- to: iq.getAttribute('from'),
- id: iq.getAttribute('id')
- });
- var sess = this.sessions[sid];
- if ('session-initiate' != action) {
- if (sess === null) {
- ack.type = 'error';
- ack.c('error', {type: 'cancel'})
- .c('item-not-found', {xmlns: 'urn:ietf:params:xml:ns:xmpp-stanzas'}).up()
- .c('unknown-session', {xmlns: 'urn:xmpp:jingle:errors:1'});
- this.connection.send(ack);
- return true;
- }
- // compare from to sess.peerjid (bare jid comparison for later compat with message-mode)
- // local jid is not checked
- if (Strophe.getBareJidFromJid(iq.getAttribute('from')) != Strophe.getBareJidFromJid(sess.peerjid)) {
- console.warn('jid mismatch for session id', sid, iq.getAttribute('from'), sess.peerjid);
- ack.type = 'error';
- ack.c('error', {type: 'cancel'})
- .c('item-not-found', {xmlns: 'urn:ietf:params:xml:ns:xmpp-stanzas'}).up()
- .c('unknown-session', {xmlns: 'urn:xmpp:jingle:errors:1'});
- this.connection.send(ack);
- return true;
- }
- } else if (sess !== undefined) {
- // existing session with same session id
- // this might be out-of-order if the sess.peerjid is the same as from
- ack.type = 'error';
- ack.c('error', {type: 'cancel'})
- .c('service-unavailable', {xmlns: 'urn:ietf:params:xml:ns:xmpp-stanzas'}).up();
- console.warn('duplicate session id', sid);
- this.connection.send(ack);
- return true;
- }
- // FIXME: check for a defined action
- this.connection.send(ack);
- // see http://xmpp.org/extensions/xep-0166.html#concepts-session
- switch (action) {
- case 'session-initiate':
- sess = new JingleSession($(iq).attr('to'), $(iq).find('jingle').attr('sid'), this.connection);
- // configure session
- if (this.localStream) {
- sess.localStreams.push(this.localStream);
- }
- sess.media_constraints = this.media_constraints;
- sess.pc_constraints = this.pc_constraints;
- sess.ice_config = this.ice_config;
-
- sess.initiate($(iq).attr('from'), false);
- sess.setRemoteDescription($(iq).find('>jingle'), 'offer');
-
- this.sessions[sess.sid] = sess;
- this.jid2session[sess.peerjid] = sess;
-
- // the callback should either
- // .sendAnswer and .accept
- // or .sendTerminate -- not necessarily synchronus
- $(document).trigger('callincoming.jingle', [sess.sid]);
- break;
- case 'session-accept':
- sess.setRemoteDescription($(iq).find('>jingle'), 'answer');
- sess.accept();
- $(document).trigger('callaccepted.jingle', [sess.sid]);
- break;
- case 'session-terminate':
- sess.terminate();
- this.terminate(sess.sid);
- if ($(iq).find('>jingle>reason').length) {
- $(document).trigger('callterminated.jingle', [
- sess.sid,
- $(iq).find('>jingle>reason>:first')[0].tagName,
- $(iq).find('>jingle>reason>text').text()
- ]);
- } else {
- $(document).trigger('callterminated.jingle', [sess.sid]);
- }
- break;
- case 'transport-info':
- sess.addIceCandidate($(iq).find('>jingle>content'));
- break;
- case 'session-info':
- var affected;
- if ($(iq).find('>jingle>ringing[xmlns="urn:xmpp:jingle:apps:rtp:info:1"]').length) {
- $(document).trigger('ringing.jingle', [sess.sid]);
- } else if ($(iq).find('>jingle>mute[xmlns="urn:xmpp:jingle:apps:rtp:info:1"]').length) {
- affected = $(iq).find('>jingle>mute[xmlns="urn:xmpp:jingle:apps:rtp:info:1"]').attr('name');
- $(document).trigger('mute.jingle', [sess.sid, affected]);
- } else if ($(iq).find('>jingle>unmute[xmlns="urn:xmpp:jingle:apps:rtp:info:1"]').length) {
- affected = $(iq).find('>jingle>unmute[xmlns="urn:xmpp:jingle:apps:rtp:info:1"]').attr('name');
- $(document).trigger('unmute.jingle', [sess.sid, affected]);
- }
- break;
- case 'addsource': // FIXME: proprietary
- sess.addSource($(iq).find('>jingle>content'));
- break;
- case 'removesource': // FIXME: proprietary
- sess.removeSource($(iq).find('>jingle>content'));
- break;
- default:
- console.warn('jingle action not implemented', action);
- break;
- }
- return true;
- },
- initiate: function (peerjid, myjid) { // initiate a new jinglesession to peerjid
- var sess = new JingleSession(myjid || this.connection.jid,
- Math.random().toString(36).substr(2, 12), // random string
- this.connection);
- // configure session
- if (this.localStream) {
- sess.localStreams.push(this.localStream);
- }
- sess.media_constraints = this.media_constraints;
- sess.pc_constraints = this.pc_constraints;
- sess.ice_config = this.ice_config;
-
- sess.initiate(peerjid, true);
- this.sessions[sess.sid] = sess;
- this.jid2session[sess.peerjid] = sess;
- sess.sendOffer();
- return sess;
- },
- terminate: function (sid, reason, text) { // terminate by sessionid (or all sessions)
- if (sid === null || sid === undefined) {
- for (sid in this.sessions) {
- if (this.sessions[sid].state != 'ended') {
- this.sessions[sid].sendTerminate(reason || (!this.sessions[sid].active()) ? 'cancel' : null, text);
- this.sessions[sid].terminate();
- }
- delete this.jid2session[this.sessions[sid].peerjid];
- delete this.sessions[sid];
- }
- } else if (this.sessions.hasOwnProperty(sid)) {
- if (this.sessions[sid].state != 'ended') {
- this.sessions[sid].sendTerminate(reason || (!this.sessions[sid].active()) ? 'cancel' : null, text);
- this.sessions[sid].terminate();
- }
- delete this.jid2session[this.sessions[sid].peerjid];
- delete this.sessions[sid];
- }
- },
- terminateByJid: function (jid) {
- if (this.jid2session.hasOwnProperty(jid)) {
- var sess = this.jid2session[jid];
- if (sess) {
- sess.terminate();
- delete this.sessions[sess.sid];
- delete this.jid2session[jid];
- $(document).trigger('callterminated.jingle', [sess.sid, 'gone']);
- }
- }
- },
- getStunAndTurnCredentials: function () {
- // get stun and turn configuration from server via xep-0215
- // uses time-limited credentials as described in
- // http://tools.ietf.org/html/draft-uberti-behave-turn-rest-00
- //
- // see https://code.google.com/p/prosody-modules/source/browse/mod_turncredentials/mod_turncredentials.lua
- // for a prosody module which implements this
- //
- // currently, this doesn't work with updateIce and therefore credentials with a long
- // validity have to be fetched before creating the peerconnection
- // TODO: implement refresh via updateIce as described in
- // https://code.google.com/p/webrtc/issues/detail?id=1650
- var self = this;
- this.connection.sendIQ(
- $iq({type: 'get', to: this.connection.domain})
- .c('services', {xmlns: 'urn:xmpp:extdisco:1'}).c('service', {host: 'turn.' + this.connection.domain}),
- function (res) {
- var iceservers = [];
- $(res).find('>services>service').each(function (idx, el) {
- el = $(el);
- var dict = {};
- switch (el.attr('type')) {
- case 'stun':
- dict.url = 'stun:' + el.attr('host');
- if (el.attr('port')) {
- dict.url += ':' + el.attr('port');
- }
- iceservers.push(dict);
- break;
- case 'turn':
- dict.url = 'turn:';
- if (el.attr('username')) {
- dict.username = el.attr('username');
- }
- dict.url += el.attr('host');
- if (el.attr('port') && el.attr('port') != '3478') {
- dict.url += ':' + el.attr('port');
- }
- if (el.attr('transport') && el.attr('transport') != 'udp') {
- dict.url += '?transport=' + el.attr('transport');
- }
- if (el.attr('password')) {
- dict.credential = el.attr('password');
- }
- iceservers.push(dict);
- break;
- }
- });
- self.ice_config.iceServers = iceservers;
- },
- function (err) {
- console.warn('getting turn credentials failed', err);
- console.warn('is mod_turncredentials or similar installed?');
- }
- );
- // implement push?
- }
-});
-}(jQuery));
diff --git a/build/js/jsxc/lib/strophe.jingle/strophe.jingle.sdp.js b/build/js/jsxc/lib/strophe.jingle/strophe.jingle.sdp.js
deleted file mode 100644
index e5fcb94..0000000
--- a/build/js/jsxc/lib/strophe.jingle/strophe.jingle.sdp.js
+++ /dev/null
@@ -1,785 +0,0 @@
-/* jshint -W117 */
-var SDP;
-
-(function($){
-// SDP STUFF
-SDP = function(sdp) {
- this.media = sdp.split('\r\nm=');
- for (var i = 1; i < this.media.length; i++) {
- this.media[i] = 'm=' + this.media[i];
- if (i != this.media.length - 1) {
- this.media[i] += '\r\n';
- }
- }
- this.session = this.media.shift() + '\r\n';
- this.raw = this.session + this.media.join('');
-}
-
-// remove iSAC and CN from SDP
-SDP.prototype.mangle = function () {
- var i, j, mline, lines, rtpmap, newdesc;
- for (i = 0; i < this.media.length; i++) {
- lines = this.media[i].split('\r\n');
- lines.pop(); // remove empty last element
- mline = SDPUtil.parse_mline(lines.shift());
- if (mline.media != 'audio')
- continue;
- newdesc = '';
- mline.fmt.length = 0;
- for (j = 0; j < lines.length; j++) {
- if (lines[j].substr(0, 9) == 'a=rtpmap:') {
- rtpmap = SDPUtil.parse_rtpmap(lines[j]);
- if (rtpmap.name == 'CN' || rtpmap.name == 'ISAC')
- continue;
- mline.fmt.push(rtpmap.id);
- newdesc += lines[j] + '\r\n';
- } else {
- newdesc += lines[j] + '\r\n';
- }
- }
- this.media[i] = SDPUtil.build_mline(mline) + '\r\n';
- this.media[i] += newdesc;
- }
- this.raw = this.session + this.media.join('');
-};
-
-// remove lines matching prefix from session section
-SDP.prototype.removeSessionLines = function(prefix) {
- var self = this;
- var lines = SDPUtil.find_lines(this.session, prefix);
- lines.forEach(function(line) {
- self.session = self.session.replace(line + '\r\n', '');
- });
- this.raw = this.session + this.media.join('');
- return lines;
-};
-
-// remove lines matching prefix from a media section specified by mediaindex
-// TODO: non-numeric mediaindex could match mid
-SDP.prototype.removeMediaLines = function(mediaindex, prefix) {
- var self = this;
- var lines = SDPUtil.find_lines(this.media[mediaindex], prefix);
- lines.forEach(function(line) {
- self.media[mediaindex] = self.media[mediaindex].replace(line + '\r\n', '');
- });
- this.raw = this.session + this.media.join('');
- return lines;
-};
-
-// add content's to a jingle element
-SDP.prototype.toJingle = function (elem, thecreator) {
- var i, j, k, mline, ssrc, rtpmap, tmp, line, lines;
- var self = this;
- // new bundle plan
- if (SDPUtil.find_line(this.session, 'a=group:')) {
- lines = SDPUtil.find_lines(this.session, 'a=group:');
- for (i = 0; i < lines.length; i++) {
- tmp = lines[i].split(' ');
- var semantics = tmp.shift().substr(8);
- elem.c('group', {xmlns: 'urn:xmpp:jingle:apps:grouping:0', semantics:semantics});
- for (j = 0; j < tmp.length; j++) {
- elem.c('content', {name: tmp[j]}).up();
- }
- elem.up();
- }
- }
- // old bundle plan, to be removed
- var bundle = [];
- if (SDPUtil.find_line(this.session, 'a=group:BUNDLE')) {
- bundle = SDPUtil.find_line(this.session, 'a=group:BUNDLE ').split(' ');
- bundle.shift();
- }
- for (i = 0; i < this.media.length; i++) {
- mline = SDPUtil.parse_mline(this.media[i].split('\r\n')[0]);
- if (!(mline.media == 'audio' || mline.media == 'video')) {
- continue;
- }
- if (SDPUtil.find_line(this.media[i], 'a=ssrc:')) {
- ssrc = SDPUtil.find_line(this.media[i], 'a=ssrc:').substring(7).split(' ')[0]; // take the first
- } else {
- ssrc = false;
- }
-
- elem.c('content', {creator: thecreator, name: mline.media});
- if (SDPUtil.find_line(this.media[i], 'a=mid:')) {
- // prefer identifier from a=mid if present
- var mid = SDPUtil.parse_mid(SDPUtil.find_line(this.media[i], 'a=mid:'));
- elem.attrs({ name: mid });
- }
- if (SDPUtil.find_line(this.media[i], 'a=rtpmap:').length) {
- elem.c('description',
- {xmlns: 'urn:xmpp:jingle:apps:rtp:1',
- media: mline.media });
- if (ssrc) {
- elem.attrs({ssrc: ssrc});
- }
- for (j = 0; j < mline.fmt.length; j++) {
- rtpmap = SDPUtil.find_line(this.media[i], 'a=rtpmap:' + mline.fmt[j]);
- elem.c('payload-type', SDPUtil.parse_rtpmap(rtpmap));
- // put any 'a=fmtp:' + mline.fmt[j] lines into <param name=foo value=bar/>
- if (SDPUtil.find_line(this.media[i], 'a=fmtp:' + mline.fmt[j])) {
- tmp = SDPUtil.parse_fmtp(SDPUtil.find_line(this.media[i], 'a=fmtp:' + mline.fmt[j]));
- for (k = 0; k < tmp.length; k++) {
- elem.c('parameter', tmp[k]).up();
- }
- }
- this.RtcpFbToJingle(i, elem, mline.fmt[j]); // XEP-0293 -- map a=rtcp-fb
-
- elem.up();
- }
- if (SDPUtil.find_line(this.media[i], 'a=crypto:', this.session)) {
- elem.c('encryption', {required: 1});
- var crypto = SDPUtil.find_lines(this.media[i], 'a=crypto:', this.session);
- crypto.forEach(function(line) {
- elem.c('crypto', SDPUtil.parse_crypto(line)).up();
- });
- elem.up(); // end of encryption
- }
-
- if (ssrc) {
- // new style mapping
- elem.c('source', { ssrc: ssrc, xmlns: 'urn:xmpp:jingle:apps:rtp:ssma:0' });
- // FIXME: group by ssrc and support multiple different ssrcs
- var ssrclines = SDPUtil.find_lines(this.media[i], 'a=ssrc:');
- ssrclines.forEach(function(line) {
- idx = line.indexOf(' ');
- var linessrc = line.substr(0, idx).substr(7);
- if (linessrc != ssrc) {
- elem.up();
- ssrc = linessrc;
- elem.c('source', { ssrc: ssrc, xmlns: 'urn:xmpp:jingle:apps:rtp:ssma:0' });
- }
- var kv = line.substr(idx + 1);
- elem.c('parameter');
- if (kv.indexOf(':') == -1) {
- elem.attrs({ name: kv });
- } else {
- elem.attrs({ name: kv.split(':', 2)[0] });
- elem.attrs({ value: kv.split(':', 2)[1] });
- }
- elem.up();
- });
- elem.up();
- }
-
- if (SDPUtil.find_line(this.media[i], 'a=rtcp-mux')) {
- elem.c('rtcp-mux').up();
- }
-
- // XEP-0293 -- map a=rtcp-fb:*
- this.RtcpFbToJingle(i, elem, '*');
-
- // XEP-0294
- if (SDPUtil.find_line(this.media[i], 'a=extmap:')) {
- lines = SDPUtil.find_lines(this.media[i], 'a=extmap:');
- for (j = 0; j < lines.length; j++) {
- tmp = SDPUtil.parse_extmap(lines[j]);
- elem.c('rtp-hdrext', { xmlns: 'urn:xmpp:jingle:apps:rtp:rtp-hdrext:0',
- uri: tmp.uri,
- id: tmp.value });
- if (tmp.hasOwnProperty('direction')) {
- switch (tmp.direction) {
- case 'sendonly':
- elem.attrs({senders: 'responder'});
- break;
- case 'recvonly':
- elem.attrs({senders: 'initiator'});
- break;
- case 'sendrecv':
- elem.attrs({senders: 'both'});
- break;
- case 'inactive':
- elem.attrs({senders: 'none'});
- break;
- }
- }
- // TODO: handle params
- elem.up();
- }
- }
- elem.up(); // end of description
- }
-
- // map ice-ufrag/pwd, dtls fingerprint, candidates
- this.TransportToJingle(i, elem);
-
- if (SDPUtil.find_line(this.media[i], 'a=sendrecv', this.session)) {
- elem.attrs({senders: 'both'});
- } else if (SDPUtil.find_line(this.media[i], 'a=sendonly', this.session)) {
- elem.attrs({senders: 'initiator'});
- } else if (SDPUtil.find_line(this.media[i], 'a=recvonly', this.session)) {
- elem.attrs({senders: 'responder'});
- } else if (SDPUtil.find_line(this.media[i], 'a=inactive', this.session)) {
- elem.attrs({senders: 'none'});
- }
- if (mline.port == '0') {
- // estos hack to reject an m-line
- elem.attrs({senders: 'rejected'});
- }
- elem.up(); // end of content
- }
- elem.up();
- return elem;
-};
-
-SDP.prototype.TransportToJingle = function (mediaindex, elem) {
- var i = mediaindex;
- var tmp;
- var self = this;
- elem.c('transport');
-
- // XEP-0320
- var fingerprints = SDPUtil.find_lines(this.media[mediaindex], 'a=fingerprint:', this.session);
- fingerprints.forEach(function(line) {
- tmp = SDPUtil.parse_fingerprint(line);
- tmp.xmlns = 'urn:xmpp:tmp:jingle:apps:dtls:0';
- // tmp.xmlns = 'urn:xmpp:jingle:apps:dtls:0'; -- FIXME: update receivers first
- elem.c('fingerprint').t(tmp.fingerprint);
- delete tmp.fingerprint;
- line = SDPUtil.find_line(self.media[mediaindex], 'a=setup:', self.session);
- if (line) {
- tmp.setup = line.substr(8);
- }
- elem.attrs(tmp);
- elem.up(); // end of fingerprint
- });
- tmp = SDPUtil.iceparams(this.media[mediaindex], this.session);
- if (tmp) {
- tmp.xmlns = 'urn:xmpp:jingle:transports:ice-udp:1';
- elem.attrs(tmp);
- // XEP-0176
- if (SDPUtil.find_line(this.media[mediaindex], 'a=candidate:', this.session)) { // add any a=candidate lines
- var lines = SDPUtil.find_lines(this.media[mediaindex], 'a=candidate:', this.session);
- lines.forEach(function (line) {
- elem.c('candidate', SDPUtil.candidateToJingle(line)).up();
- });
- }
- }
- elem.up(); // end of transport
-};
-
-SDP.prototype.RtcpFbToJingle = function (mediaindex, elem, payloadtype) { // XEP-0293
- var lines = SDPUtil.find_lines(this.media[mediaindex], 'a=rtcp-fb:' + payloadtype);
- lines.forEach(function (line) {
- var tmp = SDPUtil.parse_rtcpfb(line);
- if (tmp.type == 'trr-int') {
- elem.c('rtcp-fb-trr-int', {xmlns: 'urn:xmpp:jingle:apps:rtp:rtcp-fb:0', value: tmp.params[0]});
- elem.up();
- } else {
- elem.c('rtcp-fb', {xmlns: 'urn:xmpp:jingle:apps:rtp:rtcp-fb:0', type: tmp.type});
- if (tmp.params.length > 0) {
- elem.attrs({'subtype': tmp.params[0]});
- }
- elem.up();
- }
- });
-};
-
-SDP.prototype.RtcpFbFromJingle = function (elem, payloadtype) { // XEP-0293
- var media = '';
- var tmp = elem.find('>rtcp-fb-trr-int[xmlns="urn:xmpp:jingle:apps:rtp:rtcp-fb:0"]');
- if (tmp.length) {
- media += 'a=rtcp-fb:' + '*' + ' ' + 'trr-int' + ' ';
- if (tmp.attr('value')) {
- media += tmp.attr('value');
- } else {
- media += '0';
- }
- media += '\r\n';
- }
- tmp = elem.find('>rtcp-fb[xmlns="urn:xmpp:jingle:apps:rtp:rtcp-fb:0"]');
- tmp.each(function () {
- media += 'a=rtcp-fb:' + payloadtype + ' ' + $(this).attr('type');
- if ($(this).attr('subtype')) {
- media += ' ' + $(this).attr('subtype');
- }
- media += '\r\n';
- });
- return media;
-};
-
-// construct an SDP from a jingle stanza
-SDP.prototype.fromJingle = function (jingle) {
- var self = this;
- this.raw = 'v=0\r\n' +
- 'o=- ' + '1923518516' + ' 2 IN IP4 0.0.0.0\r\n' +// FIXME
- 's=-\r\n' +
- 't=0 0\r\n';
- // http://tools.ietf.org/html/draft-ietf-mmusic-sdp-bundle-negotiation-04#section-8
- if ($(jingle).find('>group[xmlns="urn:xmpp:jingle:apps:grouping:0"]').length) {
- $(jingle).find('>group[xmlns="urn:xmpp:jingle:apps:grouping:0"]').each(function (idx, group) {
- var contents = $(group).find('>content').map(function (idx, content) {
- return content.getAttribute('name');
- }).get();
- if (contents.length > 0) {
- self.raw += 'a=group:' + (group.getAttribute('semantics') || group.getAttribute('type')) + ' ' + contents.join(' ') + '\r\n';
- }
- });
- } else if ($(jingle).find('>group[xmlns="urn:ietf:rfc:5888"]').length) {
- // temporary namespace, not to be used. to be removed soon.
- $(jingle).find('>group[xmlns="urn:ietf:rfc:5888"]').each(function (idx, group) {
- var contents = $(group).find('>content').map(function (idx, content) {
- return content.getAttribute('name');
- }).get();
- if (group.getAttribute('type') !== null && contents.length > 0) {
- self.raw += 'a=group:' + group.getAttribute('type') + ' ' + contents.join(' ') + '\r\n';
- }
- });
- } else {
- // for backward compability, to be removed soon
- // assume all contents are in the same bundle group, can be improved upon later
- var bundle = $(jingle).find('>content').filter(function (idx, content) {
- return $(content).find('>bundle').length > 0;
- }).map(function (idx, content) {
- return content.getAttribute('name');
- }).get();
- if (bundle.length) {
- this.raw += 'a=group:BUNDLE ' + bundle.join(' ') + '\r\n';
- }
- }
-
- this.session = this.raw;
- jingle.find('>content').each(function () {
- var m = self.jingle2media($(this));
- self.media.push(m);
- });
-
- // reconstruct msid-semantic -- apparently not necessary
- /*
- var msid = SDPUtil.parse_ssrc(this.raw);
- if (msid.hasOwnProperty('mslabel')) {
- this.session += "a=msid-semantic: WMS " + msid.mslabel + "\r\n";
- }
- */
-
- this.raw = this.session + this.media.join('');
-};
-
-// translate a jingle content element into an an SDP media part
-SDP.prototype.jingle2media = function (content) {
- var media = '',
- desc = content.find('description'),
- ssrc = desc.attr('ssrc'),
- self = this,
- tmp;
-
- tmp = { media: desc.attr('media') };
- tmp.port = '1';
- if (content.attr('senders') == 'rejected') {
- // estos hack to reject an m-line.
- tmp.port = '0';
- }
- if (content.find('>transport>fingerprint').length || desc.find('encryption').length) {
- tmp.proto = 'RTP/SAVPF';
- } else {
- tmp.proto = 'RTP/AVPF';
- }
- tmp.fmt = desc.find('payload-type').map(function () { return this.getAttribute('id'); }).get();
- media += SDPUtil.build_mline(tmp) + '\r\n';
- media += 'c=IN IP4 0.0.0.0\r\n';
- media += 'a=rtcp:1 IN IP4 0.0.0.0\r\n';
- tmp = content.find('>transport[xmlns="urn:xmpp:jingle:transports:ice-udp:1"]');
- if (tmp.length) {
- if (tmp.attr('ufrag')) {
- media += SDPUtil.build_iceufrag(tmp.attr('ufrag')) + '\r\n';
- }
- if (tmp.attr('pwd')) {
- media += SDPUtil.build_icepwd(tmp.attr('pwd')) + '\r\n';
- }
- tmp.find('>fingerprint').each(function () {
- // FIXME: check namespace at some point
- media += 'a=fingerprint:' + this.getAttribute('hash');
- media += ' ' + $(this).text();
- media += '\r\n';
- if (this.getAttribute('setup')) {
- media += 'a=setup:' + this.getAttribute('setup') + '\r\n';
- }
- });
- }
- switch (content.attr('senders')) {
- case 'initiator':
- media += 'a=sendonly\r\n';
- break;
- case 'responder':
- media += 'a=recvonly\r\n';
- break;
- case 'none':
- media += 'a=inactive\r\n';
- break;
- case 'both':
- media += 'a=sendrecv\r\n';
- break;
- }
- media += 'a=mid:' + content.attr('name') + '\r\n';
-
- // <description><rtcp-mux/></description>
- // see http://code.google.com/p/libjingle/issues/detail?id=309 -- no spec though
- // and http://mail.jabber.org/pipermail/jingle/2011-December/001761.html
- if (desc.find('rtcp-mux').length) {
- media += 'a=rtcp-mux\r\n';
- }
-
- if (desc.find('encryption').length) {
- desc.find('encryption>crypto').each(function () {
- media += 'a=crypto:' + this.getAttribute('tag');
- media += ' ' + this.getAttribute('crypto-suite');
- media += ' ' + this.getAttribute('key-params');
- if (this.getAttribute('session-params')) {
- media += ' ' + this.getAttribute('session-params');
- }
- media += '\r\n';
- });
- }
- desc.find('payload-type').each(function () {
- media += SDPUtil.build_rtpmap(this) + '\r\n';
- if ($(this).find('>parameter').length) {
- media += 'a=fmtp:' + this.getAttribute('id') + ' ';
- media += $(this).find('parameter').map(function () { return (this.getAttribute('name') ? (this.getAttribute('name') + '=') : '') + this.getAttribute('value'); }).get().join(';');
- media += '\r\n';
- }
- // xep-0293
- media += self.RtcpFbFromJingle($(this), this.getAttribute('id'));
- });
-
- // xep-0293
- media += self.RtcpFbFromJingle(desc, '*');
-
- // xep-0294
- tmp = desc.find('>rtp-hdrext[xmlns="urn:xmpp:jingle:apps:rtp:rtp-hdrext:0"]');
- tmp.each(function () {
- media += 'a=extmap:' + this.getAttribute('id') + ' ' + this.getAttribute('uri') + '\r\n';
- });
-
- content.find('>transport[xmlns="urn:xmpp:jingle:transports:ice-udp:1"]>candidate').each(function () {
- media += SDPUtil.candidateFromJingle(this);
- });
-
- tmp = content.find('description>source[xmlns="urn:xmpp:jingle:apps:rtp:ssma:0"]');
- tmp.each(function () {
- var ssrc = this.getAttribute('ssrc');
- $(this).find('>parameter').each(function () {
- media += 'a=ssrc:' + ssrc + ' ' + this.getAttribute('name');
- if (this.getAttribute('value') && this.getAttribute('value').length)
- media += ':' + this.getAttribute('value');
- media += '\r\n';
- });
- });
- return media;
-};
-
-SDPUtil = {
- iceparams: function (mediadesc, sessiondesc) {
- var data = null;
- if (SDPUtil.find_line(mediadesc, 'a=ice-ufrag:', sessiondesc) &&
- SDPUtil.find_line(mediadesc, 'a=ice-pwd:', sessiondesc)) {
- data = {
- ufrag: SDPUtil.parse_iceufrag(SDPUtil.find_line(mediadesc, 'a=ice-ufrag:', sessiondesc)),
- pwd: SDPUtil.parse_icepwd(SDPUtil.find_line(mediadesc, 'a=ice-pwd:', sessiondesc))
- };
- }
- return data;
- },
- parse_iceufrag: function (line) {
- return line.substring(12);
- },
- build_iceufrag: function (frag) {
- return 'a=ice-ufrag:' + frag;
- },
- parse_icepwd: function (line) {
- return line.substring(10);
- },
- build_icepwd: function (pwd) {
- return 'a=ice-pwd:' + pwd;
- },
- parse_mid: function (line) {
- return line.substring(6);
- },
- parse_mline: function (line) {
- var parts = line.substring(2).split(' '),
- data = {};
- data.media = parts.shift();
- data.port = parts.shift();
- data.proto = parts.shift();
- if (parts[parts.length - 1] === '') { // trailing whitespace
- parts.pop();
- }
- data.fmt = parts;
- return data;
- },
- build_mline: function (mline) {
- return 'm=' + mline.media + ' ' + mline.port + ' ' + mline.proto + ' ' + mline.fmt.join(' ');
- },
- parse_rtpmap: function (line) {
- var parts = line.substring(9).split(' '),
- data = {};
- data.id = parts.shift();
- parts = parts[0].split('/');
- data.name = parts.shift();
- data.clockrate = parts.shift();
- data.channels = parts.length ? parts.shift() : '1';
- return data;
- },
- build_rtpmap: function (el) {
- var line = 'a=rtpmap:' + el.getAttribute('id') + ' ' + el.getAttribute('name') + '/' + el.getAttribute('clockrate');
- if (el.getAttribute('channels') && el.getAttribute('channels') != '1') {
- line += '/' + el.getAttribute('channels');
- }
- return line;
- },
- parse_crypto: function (line) {
- var parts = line.substring(9).split(' '),
- data = {};
- data.tag = parts.shift();
- data['crypto-suite'] = parts.shift();
- data['key-params'] = parts.shift();
- if (parts.length) {
- data['session-params'] = parts.join(' ');
- }
- return data;
- },
- parse_fingerprint: function (line) { // RFC 4572
- var parts = line.substring(14).split(' '),
- data = {};
- data.hash = parts.shift();
- data.fingerprint = parts.shift();
- // TODO assert that fingerprint satisfies 2UHEX *(":" 2UHEX) ?
- return data;
- },
- parse_fmtp: function (line) {
- var parts = line.split(' '),
- i, key, value,
- data = [];
- parts.shift();
- parts = parts.join(' ').split(';');
- for (i = 0; i < parts.length; i++) {
- key = parts[i].split('=')[0];
- while (key.length && key[0] == ' ') {
- key = key.substring(1);
- }
- value = parts[i].split('=')[1];
- if (key && value) {
- data.push({name: key, value: value});
- } else if (key) {
- // rfc 4733 (DTMF) style stuff
- data.push({name: '', value: key});
- }
- }
- return data;
- },
- parse_icecandidate: function (line) {
- var candidate = {},
- elems = line.split(' ');
- candidate.foundation = elems[0].substring(12);
- candidate.component = elems[1];
- candidate.protocol = elems[2].toLowerCase();
- candidate.priority = elems[3];
- candidate.ip = elems[4];
- candidate.port = elems[5];
- // elems[6] => "typ"
- candidate.type = elems[7];
- candidate.generation = 0; // default value, may be overwritten below
- for (var i = 8; i < elems.length; i += 2) {
- switch (elems[i]) {
- case 'raddr':
- candidate['rel-addr'] = elems[i + 1];
- break;
- case 'rport':
- candidate['rel-port'] = elems[i + 1];
- break;
- case 'generation':
- candidate.generation = elems[i + 1];
- break;
- case 'tcptype':
- candidate.tcptype = elems[i + 1];
- break;
- default: // TODO
- console.log('parse_icecandidate not translating "' + elems[i] + '" = "' + elems[i + 1] + '"');
- }
- }
- candidate.network = '1';
- candidate.id = Math.random().toString(36).substr(2, 10); // not applicable to SDP -- FIXME: should be unique, not just random
- return candidate;
- },
- build_icecandidate: function (cand) {
- var line = ['a=candidate:' + cand.foundation, cand.component, cand.protocol, cand.priority, cand.ip, cand.port, 'typ', cand.type].join(' ');
- line += ' ';
- switch (cand.type) {
- case 'srflx':
- case 'prflx':
- case 'relay':
- if (cand.hasOwnAttribute('rel-addr') && cand.hasOwnAttribute('rel-port')) {
- line += 'raddr';
- line += ' ';
- line += cand['rel-addr'];
- line += ' ';
- line += 'rport';
- line += ' ';
- line += cand['rel-port'];
- line += ' ';
- }
- break;
- }
- if (cand.hasOwnAttribute('tcptype')) {
- line += 'tcptype';
- line += ' ';
- line += cand.tcptype;
- line += ' ';
- }
- line += 'generation';
- line += ' ';
- line += cand.hasOwnAttribute('generation') ? cand.generation : '0';
- return line;
- },
- parse_ssrc: function (desc) {
- // proprietary mapping of a=ssrc lines
- // TODO: see "Jingle RTP Source Description" by Juberti and P. Thatcher on google docs
- // and parse according to that
- var lines = desc.split('\r\n'),
- data = {};
- for (var i = 0; i < lines.length; i++) {
- if (lines[i].substring(0, 7) == 'a=ssrc:') {
- var idx = lines[i].indexOf(' ');
- data[lines[i].substr(idx + 1).split(':', 2)[0]] = lines[i].substr(idx + 1).split(':', 2)[1];
- }
- }
- return data;
- },
- parse_rtcpfb: function (line) {
- var parts = line.substr(10).split(' ');
- var data = {};
- data.pt = parts.shift();
- data.type = parts.shift();
- data.params = parts;
- return data;
- },
- parse_extmap: function (line) {
- var parts = line.substr(9).split(' ');
- var data = {};
- data.value = parts.shift();
- if (data.value.indexOf('/') != -1) {
- data.direction = data.value.substr(data.value.indexOf('/') + 1);
- data.value = data.value.substr(0, data.value.indexOf('/'));
- } else {
- data.direction = 'both';
- }
- data.uri = parts.shift();
- data.params = parts;
- return data;
- },
- find_line: function (haystack, needle, sessionpart) {
- var lines = haystack.split('\r\n');
- for (var i = 0; i < lines.length; i++) {
- if (lines[i].substring(0, needle.length) == needle) {
- return lines[i];
- }
- }
- if (!sessionpart) {
- return false;
- }
- // search session part
- lines = sessionpart.split('\r\n');
- for (var j = 0; j < lines.length; j++) {
- if (lines[j].substring(0, needle.length) == needle) {
- return lines[j];
- }
- }
- return false;
- },
- find_lines: function (haystack, needle, sessionpart) {
- var lines = haystack.split('\r\n'),
- needles = [];
- for (var i = 0; i < lines.length; i++) {
- if (lines[i].substring(0, needle.length) == needle)
- needles.push(lines[i]);
- }
- if (needles.length || !sessionpart) {
- return needles;
- }
- // search session part
- lines = sessionpart.split('\r\n');
- for (var j = 0; j < lines.length; j++) {
- if (lines[j].substring(0, needle.length) == needle) {
- needles.push(lines[j]);
- }
- }
- return needles;
- },
- candidateToJingle: function (line) {
- if (line.indexOf('candidate:') === 0) {
- line = 'a=' + line;
- } else if (line.substring(0, 12) != 'a=candidate:') {
- console.log('parseCandidate called with a line that is not a candidate line');
- console.log(line);
- return null;
- }
- if (line.substring(line.length - 2) == '\r\n') // chomp it
- line = line.substring(0, line.length - 2);
- var candidate = {},
- elems = line.split(' '),
- i;
- if (elems[6] != 'typ') {
- console.log('did not find typ in the right place');
- console.log(line);
- return null;
- }
- candidate.foundation = elems[0].substring(12);
- candidate.component = elems[1];
- candidate.protocol = elems[2].toLowerCase();
- candidate.priority = elems[3];
- candidate.ip = elems[4];
- candidate.port = elems[5];
- // elems[6] => "typ"
- candidate.type = elems[7];
- candidate.generation = '0';
-
- for (i = 8; i < elems.length; i += 2) {
- switch (elems[i]) {
- case 'raddr':
- candidate['rel-addr'] = elems[i + 1];
- break;
- case 'rport':
- candidate['rel-port'] = elems[i + 1];
- break;
- case 'generation':
- candidate.generation = elems[i + 1];
- break;
- case 'tcptype':
- candidate.tcptype = elems[i + 1];
- break;
- default: // TODO
- console.log('not translating "' + elems[i] + '" = "' + elems[i + 1] + '"');
- }
- }
- candidate.network = '1';
- candidate.id = Math.random().toString(36).substr(2, 10); // not applicable to SDP -- FIXME: should be unique, not just random
- return candidate;
- },
- candidateFromJingle: function (cand) {
- var parts = [
- 'a=candidate:' + cand.getAttribute('foundation'),
- cand.getAttribute('component'),
- cand.getAttribute('protocol'),
- cand.getAttribute('priority'),
- cand.getAttribute('ip'),
- cand.getAttribute('port'),
- 'typ',
- cand.getAttribute('type')
- ];
- switch (cand.getAttribute('type')) {
- case 'srflx':
- case 'prflx':
- case 'relay':
- if (cand.getAttribute('rel-addr') && cand.getAttribute('rel-port')) {
- parts.push('raddr');
- parts.push(cand.getAttribute('rel-addr'));
- parts.push('rport');
- parts.push(cand.getAttribute('rel-port'));
- }
- break;
- }
- parts.push('generation');
- parts.push(cand.getAttribute('generation') || '0');
- return parts.join(' ') + '\r\n';
- }
-};
-}(jQuery));
diff --git a/build/js/jsxc/lib/strophe.jingle/strophe.jingle.session.js b/build/js/jsxc/lib/strophe.jingle/strophe.jingle.session.js
deleted file mode 100644
index b53f071..0000000
--- a/build/js/jsxc/lib/strophe.jingle/strophe.jingle.session.js
+++ /dev/null
@@ -1,915 +0,0 @@
-/* jshint -W117 */
-// Jingle stuff
-var JingleSession;
-
-(function($){
-JingleSession = function(me, sid, connection) {
- this.me = me;
- this.sid = sid;
- this.connection = connection;
- this.initiator = null;
- this.responder = null;
- this.isInitiator = null;
- this.peerjid = null;
- this.state = null;
- this.peerconnection = null;
- this.remoteStream = null;
- this.localSDP = null;
- this.remoteSDP = null;
- this.localStreams = [];
- this.relayedStreams = [];
- this.remoteStreams = [];
- this.startTime = null;
- this.stopTime = null;
- this.media_constraints = null;
- this.pc_constraints = null;
- this.ice_config = {};
- this.drip_container = [];
-
- this.usetrickle = true;
- this.usepranswer = false; // early transport warmup -- mind you, this might fail. depends on webrtc issue 1718
- this.usedrip = false; // dripping is sending trickle candidates not one-by-one
-
- this.hadstuncandidate = false;
- this.hadturncandidate = false;
- this.lasticecandidate = false;
-
- this.statsinterval = null;
-
- this.reason = null;
-
- this.addssrc = [];
- this.removessrc = [];
- this.pendingop = null;
-
- this.wait = true;
-
- // XEP-0172 support, non-standard
- this.nickname = null;
-
- // non-standard "please start muted" support for colibri/meet
- this.startmuted = false;
-
- // Filter for testcases with ICE Candidates
- this.filter_candidates = null;
-}
-
-JingleSession.prototype.initiate = function (peerjid, isInitiator) {
- var self = this;
- if (this.state !== null) {
- console.error('attempt to initiate on session ' + this.sid +
- 'in state ' + this.state);
- return;
- }
- this.isInitiator = isInitiator;
- this.state = 'pending';
- this.initiator = isInitiator ? this.me : peerjid;
- this.responder = !isInitiator ? this.me : peerjid;
- this.peerjid = peerjid;
- //console.log('create PeerConnection ' + JSON.stringify(this.ice_config));
- try {
- this.peerconnection = new RTCPeerconnection(this.ice_config,
- this.pc_constraints);
- } catch (e) {
- console.error('Failed to create PeerConnection, exception: ',
- e.message);
- console.error(e);
- return;
- }
- this.hadstuncandidate = false;
- this.hadturncandidate = false;
- this.lasticecandidate = false;
- this.peerconnection.onicecandidate = function (event) {
- self.sendIceCandidate(event.candidate);
- };
- this.peerconnection.onaddstream = function (event) {
- self.remoteStream = event.stream;
- self.remoteStreams.push(event.stream);
- $(document).trigger('remotestreamadded.jingle', [event, self.sid]);
- };
- this.peerconnection.onremovestream = function (event) {
- self.remoteStream = null;
- // FIXME: remove from this.remoteStreams
- $(document).trigger('remotestreamremoved.jingle', [event, self.sid]);
- };
- this.peerconnection.onsignalingstatechange = function (event) {
- if (!(self && self.peerconnection)) return;
- };
- this.peerconnection.oniceconnectionstatechange = function (event) {
- if (!(self && self.peerconnection)) return;
- switch (self.peerconnection.iceConnectionState) {
- case 'connected':
- this.startTime = new Date();
- break;
- case 'disconnected':
- this.stopTime = new Date();
- break;
- }
- $(document).trigger('iceconnectionstatechange.jingle', [self.sid, self]);
- };
- // add any local and relayed stream
- this.localStreams.forEach(function(stream) {
- self.peerconnection.addStream(stream);
- });
- this.relayedStreams.forEach(function(stream) {
- self.peerconnection.addStream(stream);
- });
-};
-
-JingleSession.prototype.accept = function () {
- var self = this;
- this.state = 'active';
-
- var pranswer = this.peerconnection.localDescription;
- if (!pranswer || pranswer.type != 'pranswer') {
- return;
- }
- console.log('going from pranswer to answer');
- if (this.usetrickle) {
- // remove candidates already sent from session-accept
- var lines = SDPUtil.find_lines(pranswer.sdp, 'a=candidate:');
- for (var i = 0; i < lines.length; i++) {
- pranswer.sdp = pranswer.sdp.replace(lines[i] + '\r\n', '');
- }
- }
- while (SDPUtil.find_line(pranswer.sdp, 'a=inactive')) {
- // FIXME: change any inactive to sendrecv or whatever they were originally
- pranswer.sdp = pranswer.sdp.replace('a=inactive', 'a=sendrecv');
- }
- var prsdp = new SDP(pranswer.sdp);
- var accept = $iq({to: this.peerjid,
- type: 'set'})
- .c('jingle', {xmlns: 'urn:xmpp:jingle:1',
- action: 'session-accept',
- initiator: this.initiator,
- responder: this.responder,
- sid: this.sid });
- prsdp.toJingle(accept, this.initiator == this.me ? 'initiator' : 'responder');
- this.connection.sendIQ(accept,
- function () {
- var ack = {};
- ack.source = 'answer';
- $(document).trigger('ack.jingle', [self.sid, ack]);
- },
- function (stanza) {
- var error = ($(stanza).find('error').length) ? {
- code: $(stanza).find('error').attr('code'),
- reason: $(stanza).find('error :first')[0].tagName,
- }:{};
- error.source = 'answer';
- $(document).trigger('error.jingle', [self.sid, error]);
- },
- 10000);
-
- var sdp = this.peerconnection.localDescription.sdp;
- while (SDPUtil.find_line(sdp, 'a=inactive')) {
- // FIXME: change any inactive to sendrecv or whatever they were originally
- sdp = sdp.replace('a=inactive', 'a=sendrecv');
- }
- this.peerconnection.setLocalDescription(new RTCSessionDescription({type: 'answer', sdp: sdp}),
- function () {
- //console.log('setLocalDescription success');
- $(document).trigger('setLocalDescription.jingle', [self.sid]);
- },
- function (e) {
- console.error('setLocalDescription failed', e);
- }
- );
-};
-
-JingleSession.prototype.terminate = function (reason) {
- this.state = 'ended';
- this.reason = reason;
- this.peerconnection.close();
- if (this.statsinterval !== null) {
- window.clearInterval(this.statsinterval);
- this.statsinterval = null;
- }
-};
-
-JingleSession.prototype.active = function () {
- return this.state == 'active';
-};
-
-JingleSession.prototype.sendIceCandidate = function (candidate) {
- var self = this;
- if (candidate && !this.lasticecandidate) {
- var ice = SDPUtil.iceparams(this.localSDP.media[candidate.sdpMLineIndex], this.localSDP.session);
- var jcand = SDPUtil.candidateToJingle(candidate.candidate);
- if (!(ice && jcand)) {
- console.error('failed to get ice && jcand');
- return;
- }
- ice.xmlns = 'urn:xmpp:jingle:transports:ice-udp:1';
-
- if (jcand.type === 'srflx') {
- this.hadstuncandidate = true;
- } else if (jcand.type === 'relay') {
- this.hadturncandidate = true;
- }
-
- if(this.filter_candidates === null || jcand.type === this.filter_candidates) {
- if (this.usetrickle) {
- console.log('sendIceCandidate using trickle');
- if (this.usedrip) {
- if (this.drip_container.length === 0) {
- // start 20ms callout
- window.setTimeout(function () {
- console.log('sending drip container');
- if (self.drip_container.length === 0) return;
- self.sendIceCandidates(self.drip_container);
- self.drip_container = [];
- }, 20);
-
- }
- this.drip_container.push(candidate);
- return;
- } else {
- console.log('sending single candidate');
- self.sendIceCandidates([candidate]);
- }
- }
- }
- } else {
- console.log('sendIceCandidate: last candidate...');
- if (!this.usetrickle) {
- console.log('should send full offer now...');
- var init = $iq({to: this.peerjid,
- type: 'set'})
- .c('jingle', {xmlns: 'urn:xmpp:jingle:1',
- action: this.peerconnection.localDescription.type == 'offer' ? 'session-initiate' : 'session-accept',
- initiator: this.initiator,
- sid: this.sid});
- if (this.nickname !== null) {
- init.c('nick', {xmlns:'http://jabber.org/protocol/nick'}).t(this.nickname).up();
- }
- if (this.startmuted) {
- init.c('muted', {xmlns:'http://jitsi.org/protocol/meet#startmuted'}).up();
- }
- this.localSDP = new SDP(this.peerconnection.localDescription.sdp);
- this.localSDP.toJingle(init, this.initiator == this.me ? 'initiator' : 'responder');
- console.log('try to send ack(offer)...');
- this.connection.sendIQ(init,
- function () {
- console.log('Sent session initiate (ACK, offer)...');
- var ack = {};
- ack.source = 'offer';
- $(document).trigger('ack.jingle', [self.sid, ack]);
- },
- function (stanza) {
- self.state = 'error';
- self.peerconnection.close();
- var error = ($(stanza).find('error').length) ? {
- code: $(stanza).find('error').attr('code'),
- reason: $(stanza).find('error :first')[0].tagName,
- }:{};
- error.source = 'offer';
- $(document).trigger('error.jingle', [self.sid, error]);
- },
- 10000);
- }
- this.lasticecandidate = true;
- console.log('Have we encountered any srflx candidates? ' + this.hadstuncandidate);
- console.log('Have we encountered any relay candidates? ' + this.hadturncandidate);
-
- if (!(this.hadstuncandidate || this.hadturncandidate) && this.peerconnection.signalingState != 'closed') {
- console.log('no candidates found!');
- $(document).trigger('nostuncandidates.jingle', [this.sid]);
- }
- }
-};
-
-JingleSession.prototype.sendIceCandidates = function (candidates) {
- console.log('sendIceCandidates', candidates);
- var cand = $iq({to: this.peerjid, type: 'set'})
- .c('jingle', {xmlns: 'urn:xmpp:jingle:1',
- action: 'transport-info',
- initiator: this.initiator,
- sid: this.sid});
- for (var mid = 0; mid < this.localSDP.media.length; mid++) {
- var cands = candidates.filter(function (el) { return el.sdpMLineIndex == mid; });
- var mline = SDPUtil.parse_mline(this.localSDP.media[mid].split('\r\n')[0]);
- if (cands.length > 0) {
- var ice = SDPUtil.iceparams(this.localSDP.media[mid], this.localSDP.session);
- ice.xmlns = 'urn:xmpp:jingle:transports:ice-udp:1';
- cand.c('content', {creator: this.initiator == this.me ? 'initiator' : 'responder',
- name: (cands[0].sdpMid? cands[0].sdpMid : mline.media)
- }).c('transport', ice);
- for (var i = 0; i < cands.length; i++) {
- cand.c('candidate', SDPUtil.candidateToJingle(cands[i].candidate)).up();
- }
- // add fingerprint
- if (SDPUtil.find_line(this.localSDP.media[mid], 'a=fingerprint:', this.localSDP.session)) {
- var tmp = SDPUtil.parse_fingerprint(SDPUtil.find_line(this.localSDP.media[mid], 'a=fingerprint:', this.localSDP.session));
- tmp.required = true;
- cand.c('fingerprint').t(tmp.fingerprint);
- delete tmp.fingerprint;
- cand.attrs(tmp);
- cand.up();
- }
- cand.up(); // transport
- cand.up(); // content
- }
- }
- // might merge last-candidate notification into this, but it is called alot later. See webrtc issue #2340
- //console.log('was this the last candidate', this.lasticecandidate);
- console.log('try to send ack(transportinfo)...');
- this.connection.sendIQ(cand,
- function () {
- var ack = {};
- ack.source = 'transportinfo';
- console.log('Sent session initiate (ACK, transportinfo)...');
- $(document).trigger('ack.jingle', [this.sid, ack]);
- },
- function (stanza) {
- var error = ($(stanza).find('error').length) ? {
- code: $(stanza).find('error').attr('code'),
- reason: $(stanza).find('error :first')[0].tagName,
- }:{};
- error.source = 'transportinfo';
- $(document).trigger('error.jingle', [this.sid, error]);
- },
- 10000);
-};
-
-
-JingleSession.prototype.sendOffer = function () {
- //console.log('sendOffer...');
- var self = this;
- this.peerconnection.createOffer(function (sdp) {
- self.createdOffer(sdp);
- },
- function (e) {
- console.error('createOffer failed', e);
- },
- this.media_constraints
- );
-};
-
-JingleSession.prototype.createdOffer = function (sdp) {
- //console.log('createdOffer', sdp);
- var self = this;
- this.localSDP = new SDP(sdp.sdp);
- //this.localSDP.mangle();
- if (this.usetrickle) {
- var init = $iq({to: this.peerjid,
- type: 'set'})
- .c('jingle', {xmlns: 'urn:xmpp:jingle:1',
- action: 'session-initiate',
- initiator: this.initiator,
- sid: this.sid});
- if (this.nickname !== null) {
- init.c('nick', {xmlns:'http://jabber.org/protocol/nick'}).t(this.nickname).up();
- }
- if (this.startmuted) {
- init.c('muted', {xmlns:'http://jitsi.org/protocol/meet#startmuted'}).up();
- }
- this.localSDP.toJingle(init, this.initiator == this.me ? 'initiator' : 'responder');
- this.connection.sendIQ(init,
- function () {
- var ack = {};
- ack.source = 'offer';
- $(document).trigger('ack.jingle', [self.sid, ack]);
- },
- function (stanza) {
- self.state = 'error';
- self.peerconnection.close();
- var error = ($(stanza).find('error').length) ? {
- code: $(stanza).find('error').attr('code'),
- reason: $(stanza).find('error :first')[0].tagName,
- }:{};
- error.source = 'offer';
- $(document).trigger('error.jingle', [self.sid, error]);
- },
- 10000);
- }
- sdp.sdp = this.localSDP.raw;
- this.peerconnection.setLocalDescription(sdp,
- function () {
- $(document).trigger('setLocalDescription.jingle', [self.sid]);
- //console.log('setLocalDescription success');
- },
- function (e) {
- console.error('setLocalDescription failed', e);
- }
- );
- var cands = SDPUtil.find_lines(this.localSDP.raw, 'a=candidate:');
- for (var i = 0; i < cands.length; i++) {
- var cand = SDPUtil.parse_icecandidate(cands[i]);
- if (cand.type == 'srflx') {
- this.hadstuncandidate = true;
- } else if (cand.type == 'relay') {
- this.hadturncandidate = true;
- }
- }
-};
-
-JingleSession.prototype.setRemoteDescription = function (elem, desctype) {
- //console.log('setting remote description... ', desctype);
- this.remoteSDP = new SDP('');
- this.remoteSDP.fromJingle(elem);
- if (this.peerconnection.remoteDescription !== null) {
- console.log('setRemoteDescription when remote description is not null, should be pranswer', this.peerconnection.remoteDescription);
- if (this.peerconnection.remoteDescription.type == 'pranswer') {
- var pranswer = new SDP(this.peerconnection.remoteDescription.sdp);
- for (var i = 0; i < pranswer.media.length; i++) {
- // make sure we have ice ufrag and pwd
- if (!SDPUtil.find_line(this.remoteSDP.media[i], 'a=ice-ufrag:', this.remoteSDP.session)) {
- if (SDPUtil.find_line(pranswer.media[i], 'a=ice-ufrag:', pranswer.session)) {
- this.remoteSDP.media[i] += SDPUtil.find_line(pranswer.media[i], 'a=ice-ufrag:', pranswer.session) + '\r\n';
- } else {
- console.warn('no ice ufrag?');
- }
- if (SDPUtil.find_line(pranswer.media[i], 'a=ice-pwd:', pranswer.session)) {
- this.remoteSDP.media[i] += SDPUtil.find_line(pranswer.media[i], 'a=ice-pwd:', pranswer.session) + '\r\n';
- } else {
- console.warn('no ice pwd?');
- }
- }
- // copy over candidates
- var lines = SDPUtil.find_lines(pranswer.media[i], 'a=candidate:');
- for (var j = 0; j < lines.length; j++) {
- this.remoteSDP.media[i] += lines[j] + '\r\n';
- }
- }
- this.remoteSDP.raw = this.remoteSDP.session + this.remoteSDP.media.join('');
- }
- }
- var remotedesc = new RTCSessionDescription({type: desctype, sdp: this.remoteSDP.raw});
-
- this.peerconnection.setRemoteDescription(remotedesc,
- function () {
- //console.log('setRemoteDescription success');
- },
- function (e) {
- console.error('setRemoteDescription error', e);
- }
- );
-};
-
-JingleSession.prototype.addIceCandidate = function (elem) {
- var self = this;
- if (this.peerconnection.signalingState == 'closed') {
- return;
- }
- if (!this.peerconnection.remoteDescription && this.peerconnection.signalingState == 'have-local-offer') {
- console.log('trickle ice candidate arriving before session accept...');
- // create a PRANSWER for setRemoteDescription
- if (!this.remoteSDP) {
- var cobbled = 'v=0\r\n' +
- 'o=- ' + '1923518516' + ' 2 IN IP4 0.0.0.0\r\n' +// FIXME
- 's=-\r\n' +
- 't=0 0\r\n';
- // first, take some things from the local description
- for (var i = 0; i < this.localSDP.media.length; i++) {
- cobbled += SDPUtil.find_line(this.localSDP.media[i], 'm=') + '\r\n';
- cobbled += SDPUtil.find_lines(this.localSDP.media[i], 'a=rtpmap:').join('\r\n') + '\r\n';
- if (SDPUtil.find_line(this.localSDP.media[i], 'a=mid:')) {
- cobbled += SDPUtil.find_line(this.localSDP.media[i], 'a=mid:') + '\r\n';
- }
- cobbled += 'a=inactive\r\n';
- }
- this.remoteSDP = new SDP(cobbled);
- }
- // then add things like ice and dtls from remote candidate
- elem.each(function () {
- for (var i = 0; i < self.remoteSDP.media.length; i++) {
- if (SDPUtil.find_line(self.remoteSDP.media[i], 'a=mid:' + $(this).attr('name')) ||
- self.remoteSDP.media[i].indexOf('m=' + $(this).attr('name')) === 0) {
- if (!SDPUtil.find_line(self.remoteSDP.media[i], 'a=ice-ufrag:')) {
- var tmp = $(this).find('transport');
- self.remoteSDP.media[i] += 'a=ice-ufrag:' + tmp.attr('ufrag') + '\r\n';
- self.remoteSDP.media[i] += 'a=ice-pwd:' + tmp.attr('pwd') + '\r\n';
- tmp = $(this).find('transport>fingerprint');
- if (tmp.length) {
- self.remoteSDP.media[i] += 'a=fingerprint:' + tmp.attr('hash') + ' ' + tmp.text() + '\r\n';
- } else {
- console.log('no dtls fingerprint (webrtc issue #1718?)');
- self.remoteSDP.media[i] += 'a=crypto:1 AES_CM_128_HMAC_SHA1_80 inline:BAADBAADBAADBAADBAADBAADBAADBAADBAADBAAD\r\n';
- }
- break;
- }
- }
- }
- });
- this.remoteSDP.raw = this.remoteSDP.session + this.remoteSDP.media.join('');
-
- // we need a complete SDP with ice-ufrag/ice-pwd in all parts
- // this makes the assumption that the PRANSWER is constructed such that the ice-ufrag is in all mediaparts
- // but it could be in the session part as well. since the code above constructs this sdp this can't happen however
- var iscomplete = this.remoteSDP.media.filter(function (mediapart) {
- return SDPUtil.find_line(mediapart, 'a=ice-ufrag:');
- }).length == this.remoteSDP.media.length;
-
- if (iscomplete) {
- console.log('setting pranswer');
- try {
- this.peerconnection.setRemoteDescription(new RTCSessionDescription({type: 'pranswer', sdp: this.remoteSDP.raw }),
- function() {
- },
- function(e) {
- console.log('setRemoteDescription pranswer failed', e.toString());
- });
- } catch (e) {
- console.error('setting pranswer failed', e);
- }
- } else {
- //console.log('not yet setting pranswer');
- }
- }
- // operate on each content element
- elem.each(function () {
- // would love to deactivate this, but firefox still requires it
- var idx = -1;
- var i;
- for (i = 0; i < self.remoteSDP.media.length; i++) {
- if (SDPUtil.find_line(self.remoteSDP.media[i], 'a=mid:' + $(this).attr('name')) ||
- self.remoteSDP.media[i].indexOf('m=' + $(this).attr('name')) === 0) {
- idx = i;
- break;
- }
- }
- if (idx == -1) { // fall back to localdescription
- for (i = 0; i < self.localSDP.media.length; i++) {
- if (SDPUtil.find_line(self.localSDP.media[i], 'a=mid:' + $(this).attr('name')) ||
- self.localSDP.media[i].indexOf('m=' + $(this).attr('name')) === 0) {
- idx = i;
- break;
- }
- }
- }
- var name = $(this).attr('name');
- // TODO: check ice-pwd and ice-ufrag?
- $(this).find('transport>candidate').each(function () {
- var line, candidate;
- line = SDPUtil.candidateFromJingle(this);
- candidate = new RTCIceCandidate({sdpMLineIndex: idx,
- sdpMid: name,
- candidate: line});
- try {
- self.peerconnection.addIceCandidate(candidate);
- } catch (e) {
- console.error('addIceCandidate failed', e.toString(), line);
- }
- });
- });
-};
-
-JingleSession.prototype.sendAnswer = function (provisional) {
- //console.log('createAnswer', provisional);
- var self = this;
- this.peerconnection.createAnswer(
- function (sdp) {
- self.createdAnswer(sdp, provisional);
- },
- function (e) {
- console.error('createAnswer failed', e);
- },
- this.media_constraints
- );
-};
-
-JingleSession.prototype.createdAnswer = function (sdp, provisional) {
- //console.log('createAnswer callback');
- var self = this;
- this.localSDP = new SDP(sdp.sdp);
- //this.localSDP.mangle();
- this.usepranswer = provisional === true;
-
- if (this.startmuted) {
- console.log('we got a request to start muted...');
- this.connection.jingle.localStream.getAudioTracks().forEach(function (track) {
- track.enabled = false;
- });
- // doing this freezes local video, too (which probably means it should be replaced
- // by a symbol
- this.connection.jingle.localStream.getVideoTracks().forEach(function (track) {
- track.enabled = false;
- });
-
- // set video to recvonly
- this.localSDP.media[1] = this.localSDP.media[1].replace('a=sendrecv', 'a=recvonly');
- // and remove a=ssrc lines. Weird things happen otherwise
- SDPUtil.find_lines(this.localSDP.media[1], 'a=ssrc:').forEach(function (line) {
- self.localSDP.media[1] = self.localSDP.media[1].replace(line + '\r\n', '');
- });
- this.localSDP.raw = this.localSDP.session + this.localSDP.media.join('');
- }
-
- if (this.usetrickle) {
- if (!this.usepranswer) {
- var accept = $iq({to: this.peerjid,
- type: 'set'})
- .c('jingle', {xmlns: 'urn:xmpp:jingle:1',
- action: 'session-accept',
- initiator: this.initiator,
- responder: this.responder,
- sid: this.sid });
- this.localSDP.toJingle(accept, this.initiator == this.me ? 'initiator' : 'responder');
- this.connection.sendIQ(accept,
- function () {
- var ack = {};
- ack.source = 'answer';
- $(document).trigger('ack.jingle', [self.sid, ack]);
- },
- function (stanza) {
- var error = ($(stanza).find('error').length) ? {
- code: $(stanza).find('error').attr('code'),
- reason: $(stanza).find('error :first')[0].tagName,
- }:{};
- error.source = 'answer';
- $(document).trigger('error.jingle', [self.sid, error]);
- },
- 10000);
- } else {
- sdp.type = 'pranswer';
- for (var i = 0; i < this.localSDP.media.length; i++) {
- this.localSDP.media[i] = this.localSDP.media[i].replace('a=sendrecv\r\n', 'a=inactive\r\n');
- }
- this.localSDP.raw = this.localSDP.session + this.localSDP.media.join('');
- }
- }
- sdp.sdp = this.localSDP.raw;
- this.peerconnection.setLocalDescription(sdp,
- function () {
- $(document).trigger('setLocalDescription.jingle', [self.sid]);
- //console.log('setLocalDescription success');
- },
- function (e) {
- console.error('setLocalDescription failed', e);
- }
- );
- var cands = SDPUtil.find_lines(this.localSDP.raw, 'a=candidate:');
- for (var j = 0; j < cands.length; j++) {
- var cand = SDPUtil.parse_icecandidate(cands[j]);
- if (cand.type == 'srflx') {
- this.hadstuncandidate = true;
- } else if (cand.type == 'relay') {
- this.hadturncandidate = true;
- }
- }
-};
-
-JingleSession.prototype.sendTerminate = function (reason, text) {
- var self = this,
- term = $iq({to: this.peerjid,
- type: 'set'})
- .c('jingle', {xmlns: 'urn:xmpp:jingle:1',
- action: 'session-terminate',
- initiator: this.initiator,
- sid: this.sid})
- .c('reason')
- .c(reason || 'success');
-
- if (text) {
- term.up().c('text').t(text);
- }
-
- this.connection.sendIQ(term,
- function () {
- self.peerconnection.close();
- self.peerconnection = null;
- self.terminate();
- var ack = {};
- ack.source = 'terminate';
- $(document).trigger('ack.jingle', [self.sid, ack]);
- },
- function (stanza) {
- var error = ($(stanza).find('error').length) ? {
- code: $(stanza).find('error').attr('code'),
- reason: $(stanza).find('error :first')[0].tagName,
- }:{};
- $(document).trigger('ack.jingle', [self.sid, error]);
- },
- 10000);
- if (this.statsinterval !== null) {
- window.clearInterval(this.statsinterval);
- this.statsinterval = null;
- }
-};
-
-
-JingleSession.prototype.addSource = function (elem) {
- console.log('addssrc', new Date().getTime());
- console.log('ice', this.peerconnection.iceConnectionState);
- var sdp = new SDP(this.peerconnection.remoteDescription.sdp);
-
- var self = this;
- $(elem).each(function (idx, content) {
- var name = $(content).attr('name');
- var lines = '';
- tmp = $(content).find('>source[xmlns="urn:xmpp:jingle:apps:rtp:ssma:0"]');
- tmp.each(function () {
- var ssrc = $(this).attr('ssrc');
- $(this).find('>parameter').each(function () {
- lines += 'a=ssrc:' + ssrc + ' ' + $(this).attr('name');
- if ($(this).attr('value') && $(this).attr('value').length)
- lines += ':' + $(this).attr('value');
- lines += '\r\n';
- });
- });
- sdp.media.forEach(function(media, idx) {
- if (!SDPUtil.find_line(media, 'a=mid:' + name))
- return;
- sdp.media[idx] += lines;
- if (!self.addssrc[idx]) self.addssrc[idx] = '';
- self.addssrc[idx] += lines;
- });
- sdp.raw = sdp.session + sdp.media.join('');
- });
- this.modifySources();
-};
-
-JingleSession.prototype.removeSource = function (elem) {
- console.log('removessrc', new Date().getTime());
- console.log('ice', this.peerconnection.iceConnectionState);
- var sdp = new SDP(this.peerconnection.remoteDescription.sdp);
-
- var self = this;
- $(elem).each(function (idx, content) {
- var name = $(content).attr('name');
- var lines = '';
- tmp = $(content).find('>source[xmlns="urn:xmpp:jingle:apps:rtp:ssma:0"]');
- tmp.each(function () {
- var ssrc = $(this).attr('ssrc');
- $(this).find('>parameter').each(function () {
- lines += 'a=ssrc:' + ssrc + ' ' + $(this).attr('name');
- if ($(this).attr('value') && $(this).attr('value').length)
- lines += ':' + $(this).attr('value');
- lines += '\r\n';
- });
- });
- sdp.media.forEach(function(media, idx) {
- if (!SDPUtil.find_line(media, 'a=mid:' + name))
- return;
- sdp.media[idx] += lines;
- if (!self.addssrc[idx]) self.removessrc[idx] = '';
- self.removessrc[idx] += lines;
- });
- sdp.raw = sdp.session + sdp.media.join('');
- });
- this.modifySources();
-};
-
-JingleSession.prototype.modifySources = function() {
- var self = this;
- if (this.peerconnection.signalingState == 'closed') return;
- if (!(this.addssrc.length || this.removessrc.length || this.pendingop !== null)) return;
- if (!(this.peerconnection.signalingState == 'stable' && this.peerconnection.iceConnectionState == 'connected')) {
- console.warn('modifySources not yet', this.peerconnection.signalingState, this.peerconnection.iceConnectionState);
- this.wait = true;
- window.setTimeout(function() { self.modifySources(); }, 250);
- return;
- }
- if (this.wait) {
- window.setTimeout(function() { self.modifySources(); }, 2500);
- this.wait = false;
- return;
- }
-
- var sdp = new SDP(this.peerconnection.remoteDescription.sdp);
-
- // add sources
- this.addssrc.forEach(function(lines, idx) {
- sdp.media[idx] += lines;
- });
- this.addssrc = [];
-
- // remove sources
- this.removessrc.forEach(function(lines, idx) {
- lines = lines.split('\r\n');
- lines.pop(); // remove empty last element;
- lines.forEach(function(line) {
- sdp.media[idx] = sdp.media[idx].replace(line + '\r\n', '');
- });
- });
- this.removessrc = [];
-
- sdp.raw = sdp.session + sdp.media.join('');
- this.peerconnection.setRemoteDescription(new RTCSessionDescription({type: 'offer', sdp: sdp.raw}),
- function() {
- self.peerconnection.createAnswer(
- function(modifiedAnswer) {
- // change video direction, see https://github.com/jitsi/jitmeet/issues/41
- if (self.pendingop !== null) {
- var sdp = new SDP(modifiedAnswer.sdp);
- if (sdp.media.length > 1) {
- switch(self.pendingop) {
- case 'mute':
- sdp.media[1] = sdp.media[1].replace('a=sendrecv', 'a=recvonly');
- break;
- case 'unmute':
- sdp.media[1] = sdp.media[1].replace('a=recvonly', 'a=sendrecv');
- break;
- }
- sdp.raw = sdp.session + sdp.media.join('');
- modifiedAnswer.sdp = sdp.raw;
- }
- self.pendingop = null;
- }
-
- self.peerconnection.setLocalDescription(modifiedAnswer,
- function() {
- //console.log('modified setLocalDescription ok');
- $(document).trigger('setLocalDescription.jingle', [self.sid]);
- },
- function(error) {
- console.log('modified setLocalDescription failed');
- }
- );
- },
- function(error) {
- console.log('modified answer failed');
- }
- );
- },
- function(error) {
- console.log('modify failed');
- }
- );
-};
-
-// SDP-based mute by going recvonly/sendrecv
-// FIXME: should probably black out the screen as well
-JingleSession.prototype.hardMuteVideo = function (muted) {
- this.pendingop = muted ? 'mute' : 'unmute';
- this.modifySources();
-
- this.connection.jingle.localStream.getVideoTracks().forEach(function (track) {
- track.enabled = !muted;
- });
-};
-
-JingleSession.prototype.sendMute = function (muted, content) {
- var info = $iq({to: this.peerjid,
- type: 'set'})
- .c('jingle', {xmlns: 'urn:xmpp:jingle:1',
- action: 'session-info',
- initiator: this.initiator,
- sid: this.sid });
- info.c(muted ? 'mute' : 'unmute', {xmlns: 'urn:xmpp:jingle:apps:rtp:info:1'});
- info.attrs({'creator': this.me == this.initiator ? 'creator' : 'responder'});
- if (content) {
- info.attrs({'name': content});
- }
- this.connection.send(info);
-};
-
-JingleSession.prototype.sendRinging = function () {
- var info = $iq({to: this.peerjid,
- type: 'set'})
- .c('jingle', {xmlns: 'urn:xmpp:jingle:1',
- action: 'session-info',
- initiator: this.initiator,
- sid: this.sid });
- info.c('ringing', {xmlns: 'urn:xmpp:jingle:apps:rtp:info:1'});
- this.connection.send(info);
-};
-
-JingleSession.prototype.getStats = function (interval) {
- var self = this;
- var recv = {audio: 0, video: 0};
- var lost = {audio: 0, video: 0};
- var lastrecv = {audio: 0, video: 0};
- var lastlost = {audio: 0, video: 0};
- var loss = {audio: 0, video: 0};
- var delta = {audio: 0, video: 0};
- this.statsinterval = window.setInterval(function () {
- if (self && self.peerconnection && self.peerconnection.getStats) {
- self.peerconnection.getStats(function (stats) {
- var results = stats.result();
- // TODO: there are so much statistics you can get from this..
- for (var i = 0; i < results.length; ++i) {
- if (results[i].type == 'ssrc') {
- var packetsrecv = results[i].stat('packetsReceived');
- var packetslost = results[i].stat('packetsLost');
- if (packetsrecv && packetslost) {
- packetsrecv = parseInt(packetsrecv, 10);
- packetslost = parseInt(packetslost, 10);
-
- if (results[i].stat('googFrameRateReceived')) {
- lastlost.video = lost.video;
- lastrecv.video = recv.video;
- recv.video = packetsrecv;
- lost.video = packetslost;
- } else {
- lastlost.audio = lost.audio;
- lastrecv.audio = recv.audio;
- recv.audio = packetsrecv;
- lost.audio = packetslost;
- }
- }
- }
- }
- delta.audio = recv.audio - lastrecv.audio;
- delta.video = recv.video - lastrecv.video;
- loss.audio = (delta.audio > 0) ? Math.ceil(100 * (lost.audio - lastlost.audio) / delta.audio) : 0;
- loss.video = (delta.video > 0) ? Math.ceil(100 * (lost.video - lastlost.video) / delta.video) : 0;
- $(document).trigger('packetloss.jingle', [self.sid, loss]);
- });
- }
- }, interval || 3000);
- return this.statsinterval;
-};
-
-}(jQuery));
diff --git a/build/js/jsxc/lib/strophe.jinglejs/strophe.jinglejs-bundle.js b/build/js/jsxc/lib/strophe.jinglejs/strophe.jinglejs-bundle.js
new file mode 100644
index 0000000..b94fd4e
--- /dev/null
+++ b/build/js/jsxc/lib/strophe.jinglejs/strophe.jinglejs-bundle.js
@@ -0,0 +1,17543 @@
+(function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o<r.length;o++)s(r[o]);return s})({1:[function(require,module,exports){
+
+},{}],2:[function(require,module,exports){
+/*!
+ * The buffer module from node.js, for the browser.
+ *
+ * @author Feross Aboukhadijeh <feross@feross.org> <http://feross.org>
+ * @license MIT
+ */
+
+var base64 = require('base64-js')
+var ieee754 = require('ieee754')
+var isArray = require('is-array')
+
+exports.Buffer = Buffer
+exports.SlowBuffer = SlowBuffer
+exports.INSPECT_MAX_BYTES = 50
+Buffer.poolSize = 8192 // not used by this implementation
+
+var kMaxLength = 0x3fffffff
+var rootParent = {}
+
+/**
+ * If `Buffer.TYPED_ARRAY_SUPPORT`:
+ * === true Use Uint8Array implementation (fastest)
+ * === false Use Object implementation (most compatible, even IE6)
+ *
+ * Browsers that support typed arrays are IE 10+, Firefox 4+, Chrome 7+, Safari 5.1+,
+ * Opera 11.6+, iOS 4.2+.
+ *
+ * Note:
+ *
+ * - Implementation must support adding new properties to `Uint8Array` instances.
+ * Firefox 4-29 lacked support, fixed in Firefox 30+.
+ * See: https://bugzilla.mozilla.org/show_bug.cgi?id=695438.
+ *
+ * - Chrome 9-10 is missing the `TypedArray.prototype.subarray` function.
+ *
+ * - IE10 has a broken `TypedArray.prototype.subarray` function which returns arrays of
+ * incorrect length in some situations.
+ *
+ * We detect these buggy browsers and set `Buffer.TYPED_ARRAY_SUPPORT` to `false` so they will
+ * get the Object implementation, which is slower but will work correctly.
+ */
+Buffer.TYPED_ARRAY_SUPPORT = (function () {
+ try {
+ var buf = new ArrayBuffer(0)
+ var arr = new Uint8Array(buf)
+ arr.foo = function () { return 42 }
+ return arr.foo() === 42 && // typed array instances can be augmented
+ typeof arr.subarray === 'function' && // chrome 9-10 lack `subarray`
+ new Uint8Array(1).subarray(1, 1).byteLength === 0 // ie10 has broken `subarray`
+ } catch (e) {
+ return false
+ }
+})()
+
+/**
+ * Class: Buffer
+ * =============
+ *
+ * The Buffer constructor returns instances of `Uint8Array` that are augmented
+ * with function properties for all the node `Buffer` API functions. We use
+ * `Uint8Array` so that square bracket notation works as expected -- it returns
+ * a single octet.
+ *
+ * By augmenting the instances, we can avoid modifying the `Uint8Array`
+ * prototype.
+ */
+function Buffer (arg) {
+ if (!(this instanceof Buffer)) {
+ // Avoid going through an ArgumentsAdaptorTrampoline in the common case.
+ if (arguments.length > 1) return new Buffer(arg, arguments[1])
+ return new Buffer(arg)
+ }
+
+ this.length = 0
+ this.parent = undefined
+
+ // Common case.
+ if (typeof arg === 'number') {
+ return fromNumber(this, arg)
+ }
+
+ // Slightly less common case.
+ if (typeof arg === 'string') {
+ return fromString(this, arg, arguments.length > 1 ? arguments[1] : 'utf8')
+ }
+
+ // Unusual.
+ return fromObject(this, arg)
+}
+
+function fromNumber (that, length) {
+ that = allocate(that, length < 0 ? 0 : checked(length) | 0)
+ if (!Buffer.TYPED_ARRAY_SUPPORT) {
+ for (var i = 0; i < length; i++) {
+ that[i] = 0
+ }
+ }
+ return that
+}
+
+function fromString (that, string, encoding) {
+ if (typeof encoding !== 'string' || encoding === '') encoding = 'utf8'
+
+ // Assumption: byteLength() return value is always < kMaxLength.
+ var length = byteLength(string, encoding) | 0
+ that = allocate(that, length)
+
+ that.write(string, encoding)
+ return that
+}
+
+function fromObject (that, object) {
+ if (Buffer.isBuffer(object)) return fromBuffer(that, object)
+
+ if (isArray(object)) return fromArray(that, object)
+
+ if (object == null) {
+ throw new TypeError('must start with number, buffer, array or string')
+ }
+
+ if (typeof ArrayBuffer !== 'undefined' && object.buffer instanceof ArrayBuffer) {
+ return fromTypedArray(that, object)
+ }
+
+ if (object.length) return fromArrayLike(that, object)
+
+ return fromJsonObject(that, object)
+}
+
+function fromBuffer (that, buffer) {
+ var length = checked(buffer.length) | 0
+ that = allocate(that, length)
+ buffer.copy(that, 0, 0, length)
+ return that
+}
+
+function fromArray (that, array) {
+ var length = checked(array.length) | 0
+ that = allocate(that, length)
+ for (var i = 0; i < length; i += 1) {
+ that[i] = array[i] & 255
+ }
+ return that
+}
+
+// Duplicate of fromArray() to keep fromArray() monomorphic.
+function fromTypedArray (that, array) {
+ var length = checked(array.length) | 0
+ that = allocate(that, length)
+ // Truncating the elements is probably not what people expect from typed
+ // arrays with BYTES_PER_ELEMENT > 1 but it's compatible with the behavior
+ // of the old Buffer constructor.
+ for (var i = 0; i < length; i += 1) {
+ that[i] = array[i] & 255
+ }
+ return that
+}
+
+function fromArrayLike (that, array) {
+ var length = checked(array.length) | 0
+ that = allocate(that, length)
+ for (var i = 0; i < length; i += 1) {
+ that[i] = array[i] & 255
+ }
+ return that
+}
+
+// Deserialize { type: 'Buffer', data: [1,2,3,...] } into a Buffer object.
+// Returns a zero-length buffer for inputs that don't conform to the spec.
+function fromJsonObject (that, object) {
+ var array
+ var length = 0
+
+ if (object.type === 'Buffer' && isArray(object.data)) {
+ array = object.data
+ length = checked(array.length) | 0
+ }
+ that = allocate(that, length)
+
+ for (var i = 0; i < length; i += 1) {
+ that[i] = array[i] & 255
+ }
+ return that
+}
+
+function allocate (that, length) {
+ if (Buffer.TYPED_ARRAY_SUPPORT) {
+ // Return an augmented `Uint8Array` instance, for best performance
+ that = Buffer._augment(new Uint8Array(length))
+ } else {
+ // Fallback: Return an object instance of the Buffer class
+ that.length = length
+ that._isBuffer = true
+ }
+
+ var fromPool = length !== 0 && length <= Buffer.poolSize >>> 1
+ if (fromPool) that.parent = rootParent
+
+ return that
+}
+
+function checked (length) {
+ // Note: cannot use `length < kMaxLength` here because that fails when
+ // length is NaN (which is otherwise coerced to zero.)
+ if (length >= kMaxLength) {
+ throw new RangeError('Attempt to allocate Buffer larger than maximum ' +
+ 'size: 0x' + kMaxLength.toString(16) + ' bytes')
+ }
+ return length | 0
+}
+
+function SlowBuffer (subject, encoding) {
+ if (!(this instanceof SlowBuffer)) return new SlowBuffer(subject, encoding)
+
+ var buf = new Buffer(subject, encoding)
+ delete buf.parent
+ return buf
+}
+
+Buffer.isBuffer = function isBuffer (b) {
+ return !!(b != null && b._isBuffer)
+}
+
+Buffer.compare = function compare (a, b) {
+ if (!Buffer.isBuffer(a) || !Buffer.isBuffer(b)) {
+ throw new TypeError('Arguments must be Buffers')
+ }
+
+ if (a === b) return 0
+
+ var x = a.length
+ var y = b.length
+
+ var i = 0
+ var len = Math.min(x, y)
+ while (i < len) {
+ if (a[i] !== b[i]) break
+
+ ++i
+ }
+
+ if (i !== len) {
+ x = a[i]
+ y = b[i]
+ }
+
+ if (x < y) return -1
+ if (y < x) return 1
+ return 0
+}
+
+Buffer.isEncoding = function isEncoding (encoding) {
+ switch (String(encoding).toLowerCase()) {
+ case 'hex':
+ case 'utf8':
+ case 'utf-8':
+ case 'ascii':
+ case 'binary':
+ case 'base64':
+ case 'raw':
+ case 'ucs2':
+ case 'ucs-2':
+ case 'utf16le':
+ case 'utf-16le':
+ return true
+ default:
+ return false
+ }
+}
+
+Buffer.concat = function concat (list, length) {
+ if (!isArray(list)) throw new TypeError('list argument must be an Array of Buffers.')
+
+ if (list.length === 0) {
+ return new Buffer(0)
+ } else if (list.length === 1) {
+ return list[0]
+ }
+
+ var i
+ if (length === undefined) {
+ length = 0
+ for (i = 0; i < list.length; i++) {
+ length += list[i].length
+ }
+ }
+
+ var buf = new Buffer(length)
+ var pos = 0
+ for (i = 0; i < list.length; i++) {
+ var item = list[i]
+ item.copy(buf, pos)
+ pos += item.length
+ }
+ return buf
+}
+
+function byteLength (string, encoding) {
+ if (typeof string !== 'string') string = String(string)
+
+ if (string.length === 0) return 0
+
+ switch (encoding || 'utf8') {
+ case 'ascii':
+ case 'binary':
+ case 'raw':
+ return string.length
+ case 'ucs2':
+ case 'ucs-2':
+ case 'utf16le':
+ case 'utf-16le':
+ return string.length * 2
+ case 'hex':
+ return string.length >>> 1
+ case 'utf8':
+ case 'utf-8':
+ return utf8ToBytes(string).length
+ case 'base64':
+ return base64ToBytes(string).length
+ default:
+ return string.length
+ }
+}
+Buffer.byteLength = byteLength
+
+// pre-set for values that may exist in the future
+Buffer.prototype.length = undefined
+Buffer.prototype.parent = undefined
+
+// toString(encoding, start=0, end=buffer.length)
+Buffer.prototype.toString = function toString (encoding, start, end) {
+ var loweredCase = false
+
+ start = start | 0
+ end = end === undefined || end === Infinity ? this.length : end | 0
+
+ if (!encoding) encoding = 'utf8'
+ if (start < 0) start = 0
+ if (end > this.length) end = this.length
+ if (end <= start) return ''
+
+ while (true) {
+ switch (encoding) {
+ case 'hex':
+ return hexSlice(this, start, end)
+
+ case 'utf8':
+ case 'utf-8':
+ return utf8Slice(this, start, end)
+
+ case 'ascii':
+ return asciiSlice(this, start, end)
+
+ case 'binary':
+ return binarySlice(this, start, end)
+
+ case 'base64':
+ return base64Slice(this, start, end)
+
+ case 'ucs2':
+ case 'ucs-2':
+ case 'utf16le':
+ case 'utf-16le':
+ return utf16leSlice(this, start, end)
+
+ default:
+ if (loweredCase) throw new TypeError('Unknown encoding: ' + encoding)
+ encoding = (encoding + '').toLowerCase()
+ loweredCase = true
+ }
+ }
+}
+
+Buffer.prototype.equals = function equals (b) {
+ if (!Buffer.isBuffer(b)) throw new TypeError('Argument must be a Buffer')
+ if (this === b) return true
+ return Buffer.compare(this, b) === 0
+}
+
+Buffer.prototype.inspect = function inspect () {
+ var str = ''
+ var max = exports.INSPECT_MAX_BYTES
+ if (this.length > 0) {
+ str = this.toString('hex', 0, max).match(/.{2}/g).join(' ')
+ if (this.length > max) str += ' ... '
+ }
+ return '<Buffer ' + str + '>'
+}
+
+Buffer.prototype.compare = function compare (b) {
+ if (!Buffer.isBuffer(b)) throw new TypeError('Argument must be a Buffer')
+ if (this === b) return 0
+ return Buffer.compare(this, b)
+}
+
+Buffer.prototype.indexOf = function indexOf (val, byteOffset) {
+ if (byteOffset > 0x7fffffff) byteOffset = 0x7fffffff
+ else if (byteOffset < -0x80000000) byteOffset = -0x80000000
+ byteOffset >>= 0
+
+ if (this.length === 0) return -1
+ if (byteOffset >= this.length) return -1
+
+ // Negative offsets start from the end of the buffer
+ if (byteOffset < 0) byteOffset = Math.max(this.length + byteOffset, 0)
+
+ if (typeof val === 'string') {
+ if (val.length === 0) return -1 // special case: looking for empty string always fails
+ return String.prototype.indexOf.call(this, val, byteOffset)
+ }
+ if (Buffer.isBuffer(val)) {
+ return arrayIndexOf(this, val, byteOffset)
+ }
+ if (typeof val === 'number') {
+ if (Buffer.TYPED_ARRAY_SUPPORT && Uint8Array.prototype.indexOf === 'function') {
+ return Uint8Array.prototype.indexOf.call(this, val, byteOffset)
+ }
+ return arrayIndexOf(this, [ val ], byteOffset)
+ }
+
+ function arrayIndexOf (arr, val, byteOffset) {
+ var foundIndex = -1
+ for (var i = 0; byteOffset + i < arr.length; i++) {
+ if (arr[byteOffset + i] === val[foundIndex === -1 ? 0 : i - foundIndex]) {
+ if (foundIndex === -1) foundIndex = i
+ if (i - foundIndex + 1 === val.length) return byteOffset + foundIndex
+ } else {
+ foundIndex = -1
+ }
+ }
+ return -1
+ }
+
+ throw new TypeError('val must be string, number or Buffer')
+}
+
+// `get` will be removed in Node 0.13+
+Buffer.prototype.get = function get (offset) {
+ console.log('.get() is deprecated. Access using array indexes instead.')
+ return this.readUInt8(offset)
+}
+
+// `set` will be removed in Node 0.13+
+Buffer.prototype.set = function set (v, offset) {
+ console.log('.set() is deprecated. Access using array indexes instead.')
+ return this.writeUInt8(v, offset)
+}
+
+function hexWrite (buf, string, offset, length) {
+ offset = Number(offset) || 0
+ var remaining = buf.length - offset
+ if (!length) {
+ length = remaining
+ } else {
+ length = Number(length)
+ if (length > remaining) {
+ length = remaining
+ }
+ }
+
+ // must be an even number of digits
+ var strLen = string.length
+ if (strLen % 2 !== 0) throw new Error('Invalid hex string')
+
+ if (length > strLen / 2) {
+ length = strLen / 2
+ }
+ for (var i = 0; i < length; i++) {
+ var parsed = parseInt(string.substr(i * 2, 2), 16)
+ if (isNaN(parsed)) throw new Error('Invalid hex string')
+ buf[offset + i] = parsed
+ }
+ return i
+}
+
+function utf8Write (buf, string, offset, length) {
+ return blitBuffer(utf8ToBytes(string, buf.length - offset), buf, offset, length)
+}
+
+function asciiWrite (buf, string, offset, length) {
+ return blitBuffer(asciiToBytes(string), buf, offset, length)
+}
+
+function binaryWrite (buf, string, offset, length) {
+ return asciiWrite(buf, string, offset, length)
+}
+
+function base64Write (buf, string, offset, length) {
+ return blitBuffer(base64ToBytes(string), buf, offset, length)
+}
+
+function ucs2Write (buf, string, offset, length) {
+ return blitBuffer(utf16leToBytes(string, buf.length - offset), buf, offset, length)
+}
+
+Buffer.prototype.write = function write (string, offset, length, encoding) {
+ // Buffer#write(string)
+ if (offset === undefined) {
+ encoding = 'utf8'
+ length = this.length
+ offset = 0
+ // Buffer#write(string, encoding)
+ } else if (length === undefined && typeof offset === 'string') {
+ encoding = offset
+ length = this.length
+ offset = 0
+ // Buffer#write(string, offset[, length][, encoding])
+ } else if (isFinite(offset)) {
+ offset = offset | 0
+ if (isFinite(length)) {
+ length = length | 0
+ if (encoding === undefined) encoding = 'utf8'
+ } else {
+ encoding = length
+ length = undefined
+ }
+ // legacy write(string, encoding, offset, length) - remove in v0.13
+ } else {
+ var swap = encoding
+ encoding = offset
+ offset = length | 0
+ length = swap
+ }
+
+ var remaining = this.length - offset
+ if (length === undefined || length > remaining) length = remaining
+
+ if ((string.length > 0 && (length < 0 || offset < 0)) || offset > this.length) {
+ throw new RangeError('attempt to write outside buffer bounds')
+ }
+
+ if (!encoding) encoding = 'utf8'
+
+ var loweredCase = false
+ for (;;) {
+ switch (encoding) {
+ case 'hex':
+ return hexWrite(this, string, offset, length)
+
+ case 'utf8':
+ case 'utf-8':
+ return utf8Write(this, string, offset, length)
+
+ case 'ascii':
+ return asciiWrite(this, string, offset, length)
+
+ case 'binary':
+ return binaryWrite(this, string, offset, length)
+
+ case 'base64':
+ // Warning: maxLength not taken into account in base64Write
+ return base64Write(this, string, offset, length)
+
+ case 'ucs2':
+ case 'ucs-2':
+ case 'utf16le':
+ case 'utf-16le':
+ return ucs2Write(this, string, offset, length)
+
+ default:
+ if (loweredCase) throw new TypeError('Unknown encoding: ' + encoding)
+ encoding = ('' + encoding).toLowerCase()
+ loweredCase = true
+ }
+ }
+}
+
+Buffer.prototype.toJSON = function toJSON () {
+ return {
+ type: 'Buffer',
+ data: Array.prototype.slice.call(this._arr || this, 0)
+ }
+}
+
+function base64Slice (buf, start, end) {
+ if (start === 0 && end === buf.length) {
+ return base64.fromByteArray(buf)
+ } else {
+ return base64.fromByteArray(buf.slice(start, end))
+ }
+}
+
+function utf8Slice (buf, start, end) {
+ var res = ''
+ var tmp = ''
+ end = Math.min(buf.length, end)
+
+ for (var i = start; i < end; i++) {
+ if (buf[i] <= 0x7F) {
+ res += decodeUtf8Char(tmp) + String.fromCharCode(buf[i])
+ tmp = ''
+ } else {
+ tmp += '%' + buf[i].toString(16)
+ }
+ }
+
+ return res + decodeUtf8Char(tmp)
+}
+
+function asciiSlice (buf, start, end) {
+ var ret = ''
+ end = Math.min(buf.length, end)
+
+ for (var i = start; i < end; i++) {
+ ret += String.fromCharCode(buf[i] & 0x7F)
+ }
+ return ret
+}
+
+function binarySlice (buf, start, end) {
+ var ret = ''
+ end = Math.min(buf.length, end)
+
+ for (var i = start; i < end; i++) {
+ ret += String.fromCharCode(buf[i])
+ }
+ return ret
+}
+
+function hexSlice (buf, start, end) {
+ var len = buf.length
+
+ if (!start || start < 0) start = 0
+ if (!end || end < 0 || end > len) end = len
+
+ var out = ''
+ for (var i = start; i < end; i++) {
+ out += toHex(buf[i])
+ }
+ return out
+}
+
+function utf16leSlice (buf, start, end) {
+ var bytes = buf.slice(start, end)
+ var res = ''
+ for (var i = 0; i < bytes.length; i += 2) {
+ res += String.fromCharCode(bytes[i] + bytes[i + 1] * 256)
+ }
+ return res
+}
+
+Buffer.prototype.slice = function slice (start, end) {
+ var len = this.length
+ start = ~~start
+ end = end === undefined ? len : ~~end
+
+ if (start < 0) {
+ start += len
+ if (start < 0) start = 0
+ } else if (start > len) {
+ start = len
+ }
+
+ if (end < 0) {
+ end += len
+ if (end < 0) end = 0
+ } else if (end > len) {
+ end = len
+ }
+
+ if (end < start) end = start
+
+ var newBuf
+ if (Buffer.TYPED_ARRAY_SUPPORT) {
+ newBuf = Buffer._augment(this.subarray(start, end))
+ } else {
+ var sliceLen = end - start
+ newBuf = new Buffer(sliceLen, undefined)
+ for (var i = 0; i < sliceLen; i++) {
+ newBuf[i] = this[i + start]
+ }
+ }
+
+ if (newBuf.length) newBuf.parent = this.parent || this
+
+ return newBuf
+}
+
+/*
+ * Need to make sure that buffer isn't trying to write out of bounds.
+ */
+function checkOffset (offset, ext, length) {
+ if ((offset % 1) !== 0 || offset < 0) throw new RangeError('offset is not uint')
+ if (offset + ext > length) throw new RangeError('Trying to access beyond buffer length')
+}
+
+Buffer.prototype.readUIntLE = function readUIntLE (offset, byteLength, noAssert) {
+ offset = offset | 0
+ byteLength = byteLength | 0
+ if (!noAssert) checkOffset(offset, byteLength, this.length)
+
+ var val = this[offset]
+ var mul = 1
+ var i = 0
+ while (++i < byteLength && (mul *= 0x100)) {
+ val += this[offset + i] * mul
+ }
+
+ return val
+}
+
+Buffer.prototype.readUIntBE = function readUIntBE (offset, byteLength, noAssert) {
+ offset = offset | 0
+ byteLength = byteLength | 0
+ if (!noAssert) {
+ checkOffset(offset, byteLength, this.length)
+ }
+
+ var val = this[offset + --byteLength]
+ var mul = 1
+ while (byteLength > 0 && (mul *= 0x100)) {
+ val += this[offset + --byteLength] * mul
+ }
+
+ return val
+}
+
+Buffer.prototype.readUInt8 = function readUInt8 (offset, noAssert) {
+ if (!noAssert) checkOffset(offset, 1, this.length)
+ return this[offset]
+}
+
+Buffer.prototype.readUInt16LE = function readUInt16LE (offset, noAssert) {
+ if (!noAssert) checkOffset(offset, 2, this.length)
+ return this[offset] | (this[offset + 1] << 8)
+}
+
+Buffer.prototype.readUInt16BE = function readUInt16BE (offset, noAssert) {
+ if (!noAssert) checkOffset(offset, 2, this.length)
+ return (this[offset] << 8) | this[offset + 1]
+}
+
+Buffer.prototype.readUInt32LE = function readUInt32LE (offset, noAssert) {
+ if (!noAssert) checkOffset(offset, 4, this.length)
+
+ return ((this[offset]) |
+ (this[offset + 1] << 8) |
+ (this[offset + 2] << 16)) +
+ (this[offset + 3] * 0x1000000)
+}
+
+Buffer.prototype.readUInt32BE = function readUInt32BE (offset, noAssert) {
+ if (!noAssert) checkOffset(offset, 4, this.length)
+
+ return (this[offset] * 0x1000000) +
+ ((this[offset + 1] << 16) |
+ (this[offset + 2] << 8) |
+ this[offset + 3])
+}
+
+Buffer.prototype.readIntLE = function readIntLE (offset, byteLength, noAssert) {
+ offset = offset | 0
+ byteLength = byteLength | 0
+ if (!noAssert) checkOffset(offset, byteLength, this.length)
+
+ var val = this[offset]
+ var mul = 1
+ var i = 0
+ while (++i < byteLength && (mul *= 0x100)) {
+ val += this[offset + i] * mul
+ }
+ mul *= 0x80
+
+ if (val >= mul) val -= Math.pow(2, 8 * byteLength)
+
+ return val
+}
+
+Buffer.prototype.readIntBE = function readIntBE (offset, byteLength, noAssert) {
+ offset = offset | 0
+ byteLength = byteLength | 0
+ if (!noAssert) checkOffset(offset, byteLength, this.length)
+
+ var i = byteLength
+ var mul = 1
+ var val = this[offset + --i]
+ while (i > 0 && (mul *= 0x100)) {
+ val += this[offset + --i] * mul
+ }
+ mul *= 0x80
+
+ if (val >= mul) val -= Math.pow(2, 8 * byteLength)
+
+ return val
+}
+
+Buffer.prototype.readInt8 = function readInt8 (offset, noAssert) {
+ if (!noAssert) checkOffset(offset, 1, this.length)
+ if (!(this[offset] & 0x80)) return (this[offset])
+ return ((0xff - this[offset] + 1) * -1)
+}
+
+Buffer.prototype.readInt16LE = function readInt16LE (offset, noAssert) {
+ if (!noAssert) checkOffset(offset, 2, this.length)
+ var val = this[offset] | (this[offset + 1] << 8)
+ return (val & 0x8000) ? val | 0xFFFF0000 : val
+}
+
+Buffer.prototype.readInt16BE = function readInt16BE (offset, noAssert) {
+ if (!noAssert) checkOffset(offset, 2, this.length)
+ var val = this[offset + 1] | (this[offset] << 8)
+ return (val & 0x8000) ? val | 0xFFFF0000 : val
+}
+
+Buffer.prototype.readInt32LE = function readInt32LE (offset, noAssert) {
+ if (!noAssert) checkOffset(offset, 4, this.length)
+
+ return (this[offset]) |
+ (this[offset + 1] << 8) |
+ (this[offset + 2] << 16) |
+ (this[offset + 3] << 24)
+}
+
+Buffer.prototype.readInt32BE = function readInt32BE (offset, noAssert) {
+ if (!noAssert) checkOffset(offset, 4, this.length)
+
+ return (this[offset] << 24) |
+ (this[offset + 1] << 16) |
+ (this[offset + 2] << 8) |
+ (this[offset + 3])
+}
+
+Buffer.prototype.readFloatLE = function readFloatLE (offset, noAssert) {
+ if (!noAssert) checkOffset(offset, 4, this.length)
+ return ieee754.read(this, offset, true, 23, 4)
+}
+
+Buffer.prototype.readFloatBE = function readFloatBE (offset, noAssert) {
+ if (!noAssert) checkOffset(offset, 4, this.length)
+ return ieee754.read(this, offset, false, 23, 4)
+}
+
+Buffer.prototype.readDoubleLE = function readDoubleLE (offset, noAssert) {
+ if (!noAssert) checkOffset(offset, 8, this.length)
+ return ieee754.read(this, offset, true, 52, 8)
+}
+
+Buffer.prototype.readDoubleBE = function readDoubleBE (offset, noAssert) {
+ if (!noAssert) checkOffset(offset, 8, this.length)
+ return ieee754.read(this, offset, false, 52, 8)
+}
+
+function checkInt (buf, value, offset, ext, max, min) {
+ if (!Buffer.isBuffer(buf)) throw new TypeError('buffer must be a Buffer instance')
+ if (value > max || value < min) throw new RangeError('value is out of bounds')
+ if (offset + ext > buf.length) throw new RangeError('index out of range')
+}
+
+Buffer.prototype.writeUIntLE = function writeUIntLE (value, offset, byteLength, noAssert) {
+ value = +value
+ offset = offset | 0
+ byteLength = byteLength | 0
+ if (!noAssert) checkInt(this, value, offset, byteLength, Math.pow(2, 8 * byteLength), 0)
+
+ var mul = 1
+ var i = 0
+ this[offset] = value & 0xFF
+ while (++i < byteLength && (mul *= 0x100)) {
+ this[offset + i] = (value / mul) & 0xFF
+ }
+
+ return offset + byteLength
+}
+
+Buffer.prototype.writeUIntBE = function writeUIntBE (value, offset, byteLength, noAssert) {
+ value = +value
+ offset = offset | 0
+ byteLength = byteLength | 0
+ if (!noAssert) checkInt(this, value, offset, byteLength, Math.pow(2, 8 * byteLength), 0)
+
+ var i = byteLength - 1
+ var mul = 1
+ this[offset + i] = value & 0xFF
+ while (--i >= 0 && (mul *= 0x100)) {
+ this[offset + i] = (value / mul) & 0xFF
+ }
+
+ return offset + byteLength
+}
+
+Buffer.prototype.writeUInt8 = function writeUInt8 (value, offset, noAssert) {
+ value = +value
+ offset = offset | 0
+ if (!noAssert) checkInt(this, value, offset, 1, 0xff, 0)
+ if (!Buffer.TYPED_ARRAY_SUPPORT) value = Math.floor(value)
+ this[offset] = value
+ return offset + 1
+}
+
+function objectWriteUInt16 (buf, value, offset, littleEndian) {
+ if (value < 0) value = 0xffff + value + 1
+ for (var i = 0, j = Math.min(buf.length - offset, 2); i < j; i++) {
+ buf[offset + i] = (value & (0xff << (8 * (littleEndian ? i : 1 - i)))) >>>
+ (littleEndian ? i : 1 - i) * 8
+ }
+}
+
+Buffer.prototype.writeUInt16LE = function writeUInt16LE (value, offset, noAssert) {
+ value = +value
+ offset = offset | 0
+ if (!noAssert) checkInt(this, value, offset, 2, 0xffff, 0)
+ if (Buffer.TYPED_ARRAY_SUPPORT) {
+ this[offset] = value
+ this[offset + 1] = (value >>> 8)
+ } else {
+ objectWriteUInt16(this, value, offset, true)
+ }
+ return offset + 2
+}
+
+Buffer.prototype.writeUInt16BE = function writeUInt16BE (value, offset, noAssert) {
+ value = +value
+ offset = offset | 0
+ if (!noAssert) checkInt(this, value, offset, 2, 0xffff, 0)
+ if (Buffer.TYPED_ARRAY_SUPPORT) {
+ this[offset] = (value >>> 8)
+ this[offset + 1] = value
+ } else {
+ objectWriteUInt16(this, value, offset, false)
+ }
+ return offset + 2
+}
+
+function objectWriteUInt32 (buf, value, offset, littleEndian) {
+ if (value < 0) value = 0xffffffff + value + 1
+ for (var i = 0, j = Math.min(buf.length - offset, 4); i < j; i++) {
+ buf[offset + i] = (value >>> (littleEndian ? i : 3 - i) * 8) & 0xff
+ }
+}
+
+Buffer.prototype.writeUInt32LE = function writeUInt32LE (value, offset, noAssert) {
+ value = +value
+ offset = offset | 0
+ if (!noAssert) checkInt(this, value, offset, 4, 0xffffffff, 0)
+ if (Buffer.TYPED_ARRAY_SUPPORT) {
+ this[offset + 3] = (value >>> 24)
+ this[offset + 2] = (value >>> 16)
+ this[offset + 1] = (value >>> 8)
+ this[offset] = value
+ } else {
+ objectWriteUInt32(this, value, offset, true)
+ }
+ return offset + 4
+}
+
+Buffer.prototype.writeUInt32BE = function writeUInt32BE (value, offset, noAssert) {
+ value = +value
+ offset = offset | 0
+ if (!noAssert) checkInt(this, value, offset, 4, 0xffffffff, 0)
+ if (Buffer.TYPED_ARRAY_SUPPORT) {
+ this[offset] = (value >>> 24)
+ this[offset + 1] = (value >>> 16)
+ this[offset + 2] = (value >>> 8)
+ this[offset + 3] = value
+ } else {
+ objectWriteUInt32(this, value, offset, false)
+ }
+ return offset + 4
+}
+
+Buffer.prototype.writeIntLE = function writeIntLE (value, offset, byteLength, noAssert) {
+ value = +value
+ offset = offset | 0
+ if (!noAssert) {
+ var limit = Math.pow(2, 8 * byteLength - 1)
+
+ checkInt(this, value, offset, byteLength, limit - 1, -limit)
+ }
+
+ var i = 0
+ var mul = 1
+ var sub = value < 0 ? 1 : 0
+ this[offset] = value & 0xFF
+ while (++i < byteLength && (mul *= 0x100)) {
+ this[offset + i] = ((value / mul) >> 0) - sub & 0xFF
+ }
+
+ return offset + byteLength
+}
+
+Buffer.prototype.writeIntBE = function writeIntBE (value, offset, byteLength, noAssert) {
+ value = +value
+ offset = offset | 0
+ if (!noAssert) {
+ var limit = Math.pow(2, 8 * byteLength - 1)
+
+ checkInt(this, value, offset, byteLength, limit - 1, -limit)
+ }
+
+ var i = byteLength - 1
+ var mul = 1
+ var sub = value < 0 ? 1 : 0
+ this[offset + i] = value & 0xFF
+ while (--i >= 0 && (mul *= 0x100)) {
+ this[offset + i] = ((value / mul) >> 0) - sub & 0xFF
+ }
+
+ return offset + byteLength
+}
+
+Buffer.prototype.writeInt8 = function writeInt8 (value, offset, noAssert) {
+ value = +value
+ offset = offset | 0
+ if (!noAssert) checkInt(this, value, offset, 1, 0x7f, -0x80)
+ if (!Buffer.TYPED_ARRAY_SUPPORT) value = Math.floor(value)
+ if (value < 0) value = 0xff + value + 1
+ this[offset] = value
+ return offset + 1
+}
+
+Buffer.prototype.writeInt16LE = function writeInt16LE (value, offset, noAssert) {
+ value = +value
+ offset = offset | 0
+ if (!noAssert) checkInt(this, value, offset, 2, 0x7fff, -0x8000)
+ if (Buffer.TYPED_ARRAY_SUPPORT) {
+ this[offset] = value
+ this[offset + 1] = (value >>> 8)
+ } else {
+ objectWriteUInt16(this, value, offset, true)
+ }
+ return offset + 2
+}
+
+Buffer.prototype.writeInt16BE = function writeInt16BE (value, offset, noAssert) {
+ value = +value
+ offset = offset | 0
+ if (!noAssert) checkInt(this, value, offset, 2, 0x7fff, -0x8000)
+ if (Buffer.TYPED_ARRAY_SUPPORT) {
+ this[offset] = (value >>> 8)
+ this[offset + 1] = value
+ } else {
+ objectWriteUInt16(this, value, offset, false)
+ }
+ return offset + 2
+}
+
+Buffer.prototype.writeInt32LE = function writeInt32LE (value, offset, noAssert) {
+ value = +value
+ offset = offset | 0
+ if (!noAssert) checkInt(this, value, offset, 4, 0x7fffffff, -0x80000000)
+ if (Buffer.TYPED_ARRAY_SUPPORT) {
+ this[offset] = value
+ this[offset + 1] = (value >>> 8)
+ this[offset + 2] = (value >>> 16)
+ this[offset + 3] = (value >>> 24)
+ } else {
+ objectWriteUInt32(this, value, offset, true)
+ }
+ return offset + 4
+}
+
+Buffer.prototype.writeInt32BE = function writeInt32BE (value, offset, noAssert) {
+ value = +value
+ offset = offset | 0
+ if (!noAssert) checkInt(this, value, offset, 4, 0x7fffffff, -0x80000000)
+ if (value < 0) value = 0xffffffff + value + 1
+ if (Buffer.TYPED_ARRAY_SUPPORT) {
+ this[offset] = (value >>> 24)
+ this[offset + 1] = (value >>> 16)
+ this[offset + 2] = (value >>> 8)
+ this[offset + 3] = value
+ } else {
+ objectWriteUInt32(this, value, offset, false)
+ }
+ return offset + 4
+}
+
+function checkIEEE754 (buf, value, offset, ext, max, min) {
+ if (value > max || value < min) throw new RangeError('value is out of bounds')
+ if (offset + ext > buf.length) throw new RangeError('index out of range')
+ if (offset < 0) throw new RangeError('index out of range')
+}
+
+function writeFloat (buf, value, offset, littleEndian, noAssert) {
+ if (!noAssert) {
+ checkIEEE754(buf, value, offset, 4, 3.4028234663852886e+38, -3.4028234663852886e+38)
+ }
+ ieee754.write(buf, value, offset, littleEndian, 23, 4)
+ return offset + 4
+}
+
+Buffer.prototype.writeFloatLE = function writeFloatLE (value, offset, noAssert) {
+ return writeFloat(this, value, offset, true, noAssert)
+}
+
+Buffer.prototype.writeFloatBE = function writeFloatBE (value, offset, noAssert) {
+ return writeFloat(this, value, offset, false, noAssert)
+}
+
+function writeDouble (buf, value, offset, littleEndian, noAssert) {
+ if (!noAssert) {
+ checkIEEE754(buf, value, offset, 8, 1.7976931348623157E+308, -1.7976931348623157E+308)
+ }
+ ieee754.write(buf, value, offset, littleEndian, 52, 8)
+ return offset + 8
+}
+
+Buffer.prototype.writeDoubleLE = function writeDoubleLE (value, offset, noAssert) {
+ return writeDouble(this, value, offset, true, noAssert)
+}
+
+Buffer.prototype.writeDoubleBE = function writeDoubleBE (value, offset, noAssert) {
+ return writeDouble(this, value, offset, false, noAssert)
+}
+
+// copy(targetBuffer, targetStart=0, sourceStart=0, sourceEnd=buffer.length)
+Buffer.prototype.copy = function copy (target, targetStart, start, end) {
+ if (!start) start = 0
+ if (!end && end !== 0) end = this.length
+ if (targetStart >= target.length) targetStart = target.length
+ if (!targetStart) targetStart = 0
+ if (end > 0 && end < start) end = start
+
+ // Copy 0 bytes; we're done
+ if (end === start) return 0
+ if (target.length === 0 || this.length === 0) return 0
+
+ // Fatal error conditions
+ if (targetStart < 0) {
+ throw new RangeError('targetStart out of bounds')
+ }
+ if (start < 0 || start >= this.length) throw new RangeError('sourceStart out of bounds')
+ if (end < 0) throw new RangeError('sourceEnd out of bounds')
+
+ // Are we oob?
+ if (end > this.length) end = this.length
+ if (target.length - targetStart < end - start) {
+ end = target.length - targetStart + start
+ }
+
+ var len = end - start
+
+ if (len < 1000 || !Buffer.TYPED_ARRAY_SUPPORT) {
+ for (var i = 0; i < len; i++) {
+ target[i + targetStart] = this[i + start]
+ }
+ } else {
+ target._set(this.subarray(start, start + len), targetStart)
+ }
+
+ return len
+}
+
+// fill(value, start=0, end=buffer.length)
+Buffer.prototype.fill = function fill (value, start, end) {
+ if (!value) value = 0
+ if (!start) start = 0
+ if (!end) end = this.length
+
+ if (end < start) throw new RangeError('end < start')
+
+ // Fill 0 bytes; we're done
+ if (end === start) return
+ if (this.length === 0) return
+
+ if (start < 0 || start >= this.length) throw new RangeError('start out of bounds')
+ if (end < 0 || end > this.length) throw new RangeError('end out of bounds')
+
+ var i
+ if (typeof value === 'number') {
+ for (i = start; i < end; i++) {
+ this[i] = value
+ }
+ } else {
+ var bytes = utf8ToBytes(value.toString())
+ var len = bytes.length
+ for (i = start; i < end; i++) {
+ this[i] = bytes[i % len]
+ }
+ }
+
+ return this
+}
+
+/**
+ * Creates a new `ArrayBuffer` with the *copied* memory of the buffer instance.
+ * Added in Node 0.12. Only available in browsers that support ArrayBuffer.
+ */
+Buffer.prototype.toArrayBuffer = function toArrayBuffer () {
+ if (typeof Uint8Array !== 'undefined') {
+ if (Buffer.TYPED_ARRAY_SUPPORT) {
+ return (new Buffer(this)).buffer
+ } else {
+ var buf = new Uint8Array(this.length)
+ for (var i = 0, len = buf.length; i < len; i += 1) {
+ buf[i] = this[i]
+ }
+ return buf.buffer
+ }
+ } else {
+ throw new TypeError('Buffer.toArrayBuffer not supported in this browser')
+ }
+}
+
+// HELPER FUNCTIONS
+// ================
+
+var BP = Buffer.prototype
+
+/**
+ * Augment a Uint8Array *instance* (not the Uint8Array class!) with Buffer methods
+ */
+Buffer._augment = function _augment (arr) {
+ arr.constructor = Buffer
+ arr._isBuffer = true
+
+ // save reference to original Uint8Array set method before overwriting
+ arr._set = arr.set
+
+ // deprecated, will be removed in node 0.13+
+ arr.get = BP.get
+ arr.set = BP.set
+
+ arr.write = BP.write
+ arr.toString = BP.toString
+ arr.toLocaleString = BP.toString
+ arr.toJSON = BP.toJSON
+ arr.equals = BP.equals
+ arr.compare = BP.compare
+ arr.indexOf = BP.indexOf
+ arr.copy = BP.copy
+ arr.slice = BP.slice
+ arr.readUIntLE = BP.readUIntLE
+ arr.readUIntBE = BP.readUIntBE
+ arr.readUInt8 = BP.readUInt8
+ arr.readUInt16LE = BP.readUInt16LE
+ arr.readUInt16BE = BP.readUInt16BE
+ arr.readUInt32LE = BP.readUInt32LE
+ arr.readUInt32BE = BP.readUInt32BE
+ arr.readIntLE = BP.readIntLE
+ arr.readIntBE = BP.readIntBE
+ arr.readInt8 = BP.readInt8
+ arr.readInt16LE = BP.readInt16LE
+ arr.readInt16BE = BP.readInt16BE
+ arr.readInt32LE = BP.readInt32LE
+ arr.readInt32BE = BP.readInt32BE
+ arr.readFloatLE = BP.readFloatLE
+ arr.readFloatBE = BP.readFloatBE
+ arr.readDoubleLE = BP.readDoubleLE
+ arr.readDoubleBE = BP.readDoubleBE
+ arr.writeUInt8 = BP.writeUInt8
+ arr.writeUIntLE = BP.writeUIntLE
+ arr.writeUIntBE = BP.writeUIntBE
+ arr.writeUInt16LE = BP.writeUInt16LE
+ arr.writeUInt16BE = BP.writeUInt16BE
+ arr.writeUInt32LE = BP.writeUInt32LE
+ arr.writeUInt32BE = BP.writeUInt32BE
+ arr.writeIntLE = BP.writeIntLE
+ arr.writeIntBE = BP.writeIntBE
+ arr.writeInt8 = BP.writeInt8
+ arr.writeInt16LE = BP.writeInt16LE
+ arr.writeInt16BE = BP.writeInt16BE
+ arr.writeInt32LE = BP.writeInt32LE
+ arr.writeInt32BE = BP.writeInt32BE
+ arr.writeFloatLE = BP.writeFloatLE
+ arr.writeFloatBE = BP.writeFloatBE
+ arr.writeDoubleLE = BP.writeDoubleLE
+ arr.writeDoubleBE = BP.writeDoubleBE
+ arr.fill = BP.fill
+ arr.inspect = BP.inspect
+ arr.toArrayBuffer = BP.toArrayBuffer
+
+ return arr
+}
+
+var INVALID_BASE64_RE = /[^+\/0-9A-z\-]/g
+
+function base64clean (str) {
+ // Node strips out invalid characters like \n and \t from the string, base64-js does not
+ str = stringtrim(str).replace(INVALID_BASE64_RE, '')
+ // Node converts strings with length < 2 to ''
+ if (str.length < 2) return ''
+ // Node allows for non-padded base64 strings (missing trailing ===), base64-js does not
+ while (str.length % 4 !== 0) {
+ str = str + '='
+ }
+ return str
+}
+
+function stringtrim (str) {
+ if (str.trim) return str.trim()
+ return str.replace(/^\s+|\s+$/g, '')
+}
+
+function toHex (n) {
+ if (n < 16) return '0' + n.toString(16)
+ return n.toString(16)
+}
+
+function utf8ToBytes (string, units) {
+ units = units || Infinity
+ var codePoint
+ var length = string.length
+ var leadSurrogate = null
+ var bytes = []
+ var i = 0
+
+ for (; i < length; i++) {
+ codePoint = string.charCodeAt(i)
+
+ // is surrogate component
+ if (codePoint > 0xD7FF && codePoint < 0xE000) {
+ // last char was a lead
+ if (leadSurrogate) {
+ // 2 leads in a row
+ if (codePoint < 0xDC00) {
+ if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD)
+ leadSurrogate = codePoint
+ continue
+ } else {
+ // valid surrogate pair
+ codePoint = leadSurrogate - 0xD800 << 10 | codePoint - 0xDC00 | 0x10000
+ leadSurrogate = null
+ }
+ } else {
+ // no lead yet
+
+ if (codePoint > 0xDBFF) {
+ // unexpected trail
+ if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD)
+ continue
+ } else if (i + 1 === length) {
+ // unpaired lead
+ if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD)
+ continue
+ } else {
+ // valid lead
+ leadSurrogate = codePoint
+ continue
+ }
+ }
+ } else if (leadSurrogate) {
+ // valid bmp char, but last char was a lead
+ if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD)
+ leadSurrogate = null
+ }
+
+ // encode utf8
+ if (codePoint < 0x80) {
+ if ((units -= 1) < 0) break
+ bytes.push(codePoint)
+ } else if (codePoint < 0x800) {
+ if ((units -= 2) < 0) break
+ bytes.push(
+ codePoint >> 0x6 | 0xC0,
+ codePoint & 0x3F | 0x80
+ )
+ } else if (codePoint < 0x10000) {
+ if ((units -= 3) < 0) break
+ bytes.push(
+ codePoint >> 0xC | 0xE0,
+ codePoint >> 0x6 & 0x3F | 0x80,
+ codePoint & 0x3F | 0x80
+ )
+ } else if (codePoint < 0x200000) {
+ if ((units -= 4) < 0) break
+ bytes.push(
+ codePoint >> 0x12 | 0xF0,
+ codePoint >> 0xC & 0x3F | 0x80,
+ codePoint >> 0x6 & 0x3F | 0x80,
+ codePoint & 0x3F | 0x80
+ )
+ } else {
+ throw new Error('Invalid code point')
+ }
+ }
+
+ return bytes
+}
+
+function asciiToBytes (str) {
+ var byteArray = []
+ for (var i = 0; i < str.length; i++) {
+ // Node's code seems to be doing this and not & 0x7F..
+ byteArray.push(str.charCodeAt(i) & 0xFF)
+ }
+ return byteArray
+}
+
+function utf16leToBytes (str, units) {
+ var c, hi, lo
+ var byteArray = []
+ for (var i = 0; i < str.length; i++) {
+ if ((units -= 2) < 0) break
+
+ c = str.charCodeAt(i)
+ hi = c >> 8
+ lo = c % 256
+ byteArray.push(lo)
+ byteArray.push(hi)
+ }
+
+ return byteArray
+}
+
+function base64ToBytes (str) {
+ return base64.toByteArray(base64clean(str))
+}
+
+function blitBuffer (src, dst, offset, length) {
+ for (var i = 0; i < length; i++) {
+ if ((i + offset >= dst.length) || (i >= src.length)) break
+ dst[i + offset] = src[i]
+ }
+ return i
+}
+
+function decodeUtf8Char (str) {
+ try {
+ return decodeURIComponent(str)
+ } catch (err) {
+ return String.fromCharCode(0xFFFD) // UTF 8 invalid char
+ }
+}
+
+},{"base64-js":3,"ieee754":4,"is-array":5}],3:[function(require,module,exports){
+var lookup = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/';
+
+;(function (exports) {
+ 'use strict';
+
+ var Arr = (typeof Uint8Array !== 'undefined')
+ ? Uint8Array
+ : Array
+
+ var PLUS = '+'.charCodeAt(0)
+ var SLASH = '/'.charCodeAt(0)
+ var NUMBER = '0'.charCodeAt(0)
+ var LOWER = 'a'.charCodeAt(0)
+ var UPPER = 'A'.charCodeAt(0)
+ var PLUS_URL_SAFE = '-'.charCodeAt(0)
+ var SLASH_URL_SAFE = '_'.charCodeAt(0)
+
+ function decode (elt) {
+ var code = elt.charCodeAt(0)
+ if (code === PLUS ||
+ code === PLUS_URL_SAFE)
+ return 62 // '+'
+ if (code === SLASH ||
+ code === SLASH_URL_SAFE)
+ return 63 // '/'
+ if (code < NUMBER)
+ return -1 //no match
+ if (code < NUMBER + 10)
+ return code - NUMBER + 26 + 26
+ if (code < UPPER + 26)
+ return code - UPPER
+ if (code < LOWER + 26)
+ return code - LOWER + 26
+ }
+
+ function b64ToByteArray (b64) {
+ var i, j, l, tmp, placeHolders, arr
+
+ if (b64.length % 4 > 0) {
+ throw new Error('Invalid string. Length must be a multiple of 4')
+ }
+
+ // the number of equal signs (place holders)
+ // if there are two placeholders, than the two characters before it
+ // represent one byte
+ // if there is only one, then the three characters before it represent 2 bytes
+ // this is just a cheap hack to not do indexOf twice
+ var len = b64.length
+ placeHolders = '=' === b64.charAt(len - 2) ? 2 : '=' === b64.charAt(len - 1) ? 1 : 0
+
+ // base64 is 4/3 + up to two characters of the original data
+ arr = new Arr(b64.length * 3 / 4 - placeHolders)
+
+ // if there are placeholders, only get up to the last complete 4 chars
+ l = placeHolders > 0 ? b64.length - 4 : b64.length
+
+ var L = 0
+
+ function push (v) {
+ arr[L++] = v
+ }
+
+ for (i = 0, j = 0; i < l; i += 4, j += 3) {
+ tmp = (decode(b64.charAt(i)) << 18) | (decode(b64.charAt(i + 1)) << 12) | (decode(b64.charAt(i + 2)) << 6) | decode(b64.charAt(i + 3))
+ push((tmp & 0xFF0000) >> 16)
+ push((tmp & 0xFF00) >> 8)
+ push(tmp & 0xFF)
+ }
+
+ if (placeHolders === 2) {
+ tmp = (decode(b64.charAt(i)) << 2) | (decode(b64.charAt(i + 1)) >> 4)
+ push(tmp & 0xFF)
+ } else if (placeHolders === 1) {
+ tmp = (decode(b64.charAt(i)) << 10) | (decode(b64.charAt(i + 1)) << 4) | (decode(b64.charAt(i + 2)) >> 2)
+ push((tmp >> 8) & 0xFF)
+ push(tmp & 0xFF)
+ }
+
+ return arr
+ }
+
+ function uint8ToBase64 (uint8) {
+ var i,
+ extraBytes = uint8.length % 3, // if we have 1 byte left, pad 2 bytes
+ output = "",
+ temp, length
+
+ function encode (num) {
+ return lookup.charAt(num)
+ }
+
+ function tripletToBase64 (num) {
+ return encode(num >> 18 & 0x3F) + encode(num >> 12 & 0x3F) + encode(num >> 6 & 0x3F) + encode(num & 0x3F)
+ }
+
+ // go through the array every three bytes, we'll deal with trailing stuff later
+ for (i = 0, length = uint8.length - extraBytes; i < length; i += 3) {
+ temp = (uint8[i] << 16) + (uint8[i + 1] << 8) + (uint8[i + 2])
+ output += tripletToBase64(temp)
+ }
+
+ // pad the end with zeros, but make sure to not forget the extra bytes
+ switch (extraBytes) {
+ case 1:
+ temp = uint8[uint8.length - 1]
+ output += encode(temp >> 2)
+ output += encode((temp << 4) & 0x3F)
+ output += '=='
+ break
+ case 2:
+ temp = (uint8[uint8.length - 2] << 8) + (uint8[uint8.length - 1])
+ output += encode(temp >> 10)
+ output += encode((temp >> 4) & 0x3F)
+ output += encode((temp << 2) & 0x3F)
+ output += '='
+ break
+ }
+
+ return output
+ }
+
+ exports.toByteArray = b64ToByteArray
+ exports.fromByteArray = uint8ToBase64
+}(typeof exports === 'undefined' ? (this.base64js = {}) : exports))
+
+},{}],4:[function(require,module,exports){
+exports.read = function (buffer, offset, isLE, mLen, nBytes) {
+ var e, m
+ var eLen = nBytes * 8 - mLen - 1
+ var eMax = (1 << eLen) - 1
+ var eBias = eMax >> 1
+ var nBits = -7
+ var i = isLE ? (nBytes - 1) : 0
+ var d = isLE ? -1 : 1
+ var s = buffer[offset + i]
+
+ i += d
+
+ e = s & ((1 << (-nBits)) - 1)
+ s >>= (-nBits)
+ nBits += eLen
+ for (; nBits > 0; e = e * 256 + buffer[offset + i], i += d, nBits -= 8) {}
+
+ m = e & ((1 << (-nBits)) - 1)
+ e >>= (-nBits)
+ nBits += mLen
+ for (; nBits > 0; m = m * 256 + buffer[offset + i], i += d, nBits -= 8) {}
+
+ if (e === 0) {
+ e = 1 - eBias
+ } else if (e === eMax) {
+ return m ? NaN : ((s ? -1 : 1) * Infinity)
+ } else {
+ m = m + Math.pow(2, mLen)
+ e = e - eBias
+ }
+ return (s ? -1 : 1) * m * Math.pow(2, e - mLen)
+}
+
+exports.write = function (buffer, value, offset, isLE, mLen, nBytes) {
+ var e, m, c
+ var eLen = nBytes * 8 - mLen - 1
+ var eMax = (1 << eLen) - 1
+ var eBias = eMax >> 1
+ var rt = (mLen === 23 ? Math.pow(2, -24) - Math.pow(2, -77) : 0)
+ var i = isLE ? 0 : (nBytes - 1)
+ var d = isLE ? 1 : -1
+ var s = value < 0 || (value === 0 && 1 / value < 0) ? 1 : 0
+
+ value = Math.abs(value)
+
+ if (isNaN(value) || value === Infinity) {
+ m = isNaN(value) ? 1 : 0
+ e = eMax
+ } else {
+ e = Math.floor(Math.log(value) / Math.LN2)
+ if (value * (c = Math.pow(2, -e)) < 1) {
+ e--
+ c *= 2
+ }
+ if (e + eBias >= 1) {
+ value += rt / c
+ } else {
+ value += rt * Math.pow(2, 1 - eBias)
+ }
+ if (value * c >= 2) {
+ e++
+ c /= 2
+ }
+
+ if (e + eBias >= eMax) {
+ m = 0
+ e = eMax
+ } else if (e + eBias >= 1) {
+ m = (value * c - 1) * Math.pow(2, mLen)
+ e = e + eBias
+ } else {
+ m = value * Math.pow(2, eBias - 1) * Math.pow(2, mLen)
+ e = 0
+ }
+ }
+
+ for (; mLen >= 8; buffer[offset + i] = m & 0xff, i += d, m /= 256, mLen -= 8) {}
+
+ e = (e << mLen) | m
+ eLen += mLen
+ for (; eLen > 0; buffer[offset + i] = e & 0xff, i += d, e /= 256, eLen -= 8) {}
+
+ buffer[offset + i - d] |= s * 128
+}
+
+},{}],5:[function(require,module,exports){
+
+/**
+ * isArray
+ */
+
+var isArray = Array.isArray;
+
+/**
+ * toString
+ */
+
+var str = Object.prototype.toString;
+
+/**
+ * Whether or not the given `val`
+ * is an array.
+ *
+ * example:
+ *
+ * isArray([]);
+ * // > true
+ * isArray(arguments);
+ * // > false
+ * isArray('');
+ * // > false
+ *
+ * @param {mixed} val
+ * @return {bool}
+ */
+
+module.exports = isArray || function (val) {
+ return !! val && '[object Array]' == str.call(val);
+};
+
+},{}],6:[function(require,module,exports){
+// Copyright Joyent, Inc. and other Node contributors.
+//
+// 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.
+
+function EventEmitter() {
+ this._events = this._events || {};
+ this._maxListeners = this._maxListeners || undefined;
+}
+module.exports = EventEmitter;
+
+// Backwards-compat with node 0.10.x
+EventEmitter.EventEmitter = EventEmitter;
+
+EventEmitter.prototype._events = undefined;
+EventEmitter.prototype._maxListeners = undefined;
+
+// By default EventEmitters will print a warning if more than 10 listeners are
+// added to it. This is a useful default which helps finding memory leaks.
+EventEmitter.defaultMaxListeners = 10;
+
+// Obviously not all Emitters should be limited to 10. This function allows
+// that to be increased. Set to zero for unlimited.
+EventEmitter.prototype.setMaxListeners = function(n) {
+ if (!isNumber(n) || n < 0 || isNaN(n))
+ throw TypeError('n must be a positive number');
+ this._maxListeners = n;
+ return this;
+};
+
+EventEmitter.prototype.emit = function(type) {
+ var er, handler, len, args, i, listeners;
+
+ if (!this._events)
+ this._events = {};
+
+ // If there is no 'error' event listener then throw.
+ if (type === 'error') {
+ if (!this._events.error ||
+ (isObject(this._events.error) && !this._events.error.length)) {
+ er = arguments[1];
+ if (er instanceof Error) {
+ throw er; // Unhandled 'error' event
+ }
+ throw TypeError('Uncaught, unspecified "error" event.');
+ }
+ }
+
+ handler = this._events[type];
+
+ if (isUndefined(handler))
+ return false;
+
+ if (isFunction(handler)) {
+ switch (arguments.length) {
+ // fast cases
+ case 1:
+ handler.call(this);
+ break;
+ case 2:
+ handler.call(this, arguments[1]);
+ break;
+ case 3:
+ handler.call(this, arguments[1], arguments[2]);
+ break;
+ // slower
+ default:
+ len = arguments.length;
+ args = new Array(len - 1);
+ for (i = 1; i < len; i++)
+ args[i - 1] = arguments[i];
+ handler.apply(this, args);
+ }
+ } else if (isObject(handler)) {
+ len = arguments.length;
+ args = new Array(len - 1);
+ for (i = 1; i < len; i++)
+ args[i - 1] = arguments[i];
+
+ listeners = handler.slice();
+ len = listeners.length;
+ for (i = 0; i < len; i++)
+ listeners[i].apply(this, args);
+ }
+
+ return true;
+};
+
+EventEmitter.prototype.addListener = function(type, listener) {
+ var m;
+
+ if (!isFunction(listener))
+ throw TypeError('listener must be a function');
+
+ if (!this._events)
+ this._events = {};
+
+ // To avoid recursion in the case that type === "newListener"! Before
+ // adding it to the listeners, first emit "newListener".
+ if (this._events.newListener)
+ this.emit('newListener', type,
+ isFunction(listener.listener) ?
+ listener.listener : listener);
+
+ if (!this._events[type])
+ // Optimize the case of one listener. Don't need the extra array object.
+ this._events[type] = listener;
+ else if (isObject(this._events[type]))
+ // If we've already got an array, just append.
+ this._events[type].push(listener);
+ else
+ // Adding the second element, need to change to array.
+ this._events[type] = [this._events[type], listener];
+
+ // Check for listener leak
+ if (isObject(this._events[type]) && !this._events[type].warned) {
+ var m;
+ if (!isUndefined(this._maxListeners)) {
+ m = this._maxListeners;
+ } else {
+ m = EventEmitter.defaultMaxListeners;
+ }
+
+ if (m && m > 0 && this._events[type].length > m) {
+ this._events[type].warned = true;
+ console.error('(node) warning: possible EventEmitter memory ' +
+ 'leak detected. %d listeners added. ' +
+ 'Use emitter.setMaxListeners() to increase limit.',
+ this._events[type].length);
+ if (typeof console.trace === 'function') {
+ // not supported in IE 10
+ console.trace();
+ }
+ }
+ }
+
+ return this;
+};
+
+EventEmitter.prototype.on = EventEmitter.prototype.addListener;
+
+EventEmitter.prototype.once = function(type, listener) {
+ if (!isFunction(listener))
+ throw TypeError('listener must be a function');
+
+ var fired = false;
+
+ function g() {
+ this.removeListener(type, g);
+
+ if (!fired) {
+ fired = true;
+ listener.apply(this, arguments);
+ }
+ }
+
+ g.listener = listener;
+ this.on(type, g);
+
+ return this;
+};
+
+// emits a 'removeListener' event iff the listener was removed
+EventEmitter.prototype.removeListener = function(type, listener) {
+ var list, position, length, i;
+
+ if (!isFunction(listener))
+ throw TypeError('listener must be a function');
+
+ if (!this._events || !this._events[type])
+ return this;
+
+ list = this._events[type];
+ length = list.length;
+ position = -1;
+
+ if (list === listener ||
+ (isFunction(list.listener) && list.listener === listener)) {
+ delete this._events[type];
+ if (this._events.removeListener)
+ this.emit('removeListener', type, listener);
+
+ } else if (isObject(list)) {
+ for (i = length; i-- > 0;) {
+ if (list[i] === listener ||
+ (list[i].listener && list[i].listener === listener)) {
+ position = i;
+ break;
+ }
+ }
+
+ if (position < 0)
+ return this;
+
+ if (list.length === 1) {
+ list.length = 0;
+ delete this._events[type];
+ } else {
+ list.splice(position, 1);
+ }
+
+ if (this._events.removeListener)
+ this.emit('removeListener', type, listener);
+ }
+
+ return this;
+};
+
+EventEmitter.prototype.removeAllListeners = function(type) {
+ var key, listeners;
+
+ if (!this._events)
+ return this;
+
+ // not listening for removeListener, no need to emit
+ if (!this._events.removeListener) {
+ if (arguments.length === 0)
+ this._events = {};
+ else if (this._events[type])
+ delete this._events[type];
+ return this;
+ }
+
+ // emit removeListener for all listeners on all events
+ if (arguments.length === 0) {
+ for (key in this._events) {
+ if (key === 'removeListener') continue;
+ this.removeAllListeners(key);
+ }
+ this.removeAllListeners('removeListener');
+ this._events = {};
+ return this;
+ }
+
+ listeners = this._events[type];
+
+ if (isFunction(listeners)) {
+ this.removeListener(type, listeners);
+ } else {
+ // LIFO order
+ while (listeners.length)
+ this.removeListener(type, listeners[listeners.length - 1]);
+ }
+ delete this._events[type];
+
+ return this;
+};
+
+EventEmitter.prototype.listeners = function(type) {
+ var ret;
+ if (!this._events || !this._events[type])
+ ret = [];
+ else if (isFunction(this._events[type]))
+ ret = [this._events[type]];
+ else
+ ret = this._events[type].slice();
+ return ret;
+};
+
+EventEmitter.listenerCount = function(emitter, type) {
+ var ret;
+ if (!emitter._events || !emitter._events[type])
+ ret = 0;
+ else if (isFunction(emitter._events[type]))
+ ret = 1;
+ else
+ ret = emitter._events[type].length;
+ return ret;
+};
+
+function isFunction(arg) {
+ return typeof arg === 'function';
+}
+
+function isNumber(arg) {
+ return typeof arg === 'number';
+}
+
+function isObject(arg) {
+ return typeof arg === 'object' && arg !== null;
+}
+
+function isUndefined(arg) {
+ return arg === void 0;
+}
+
+},{}],7:[function(require,module,exports){
+if (typeof Object.create === 'function') {
+ // implementation from standard node.js 'util' module
+ module.exports = function inherits(ctor, superCtor) {
+ ctor.super_ = superCtor
+ ctor.prototype = Object.create(superCtor.prototype, {
+ constructor: {
+ value: ctor,
+ enumerable: false,
+ writable: true,
+ configurable: true
+ }
+ });
+ };
+} else {
+ // old school shim for old browsers
+ module.exports = function inherits(ctor, superCtor) {
+ ctor.super_ = superCtor
+ var TempCtor = function () {}
+ TempCtor.prototype = superCtor.prototype
+ ctor.prototype = new TempCtor()
+ ctor.prototype.constructor = ctor
+ }
+}
+
+},{}],8:[function(require,module,exports){
+module.exports = Array.isArray || function (arr) {
+ return Object.prototype.toString.call(arr) == '[object Array]';
+};
+
+},{}],9:[function(require,module,exports){
+// shim for using process in browser
+
+var process = module.exports = {};
+var queue = [];
+var draining = false;
+var currentQueue;
+var queueIndex = -1;
+
+function cleanUpNextTick() {
+ draining = false;
+ if (currentQueue.length) {
+ queue = currentQueue.concat(queue);
+ } else {
+ queueIndex = -1;
+ }
+ if (queue.length) {
+ drainQueue();
+ }
+}
+
+function drainQueue() {
+ if (draining) {
+ return;
+ }
+ var timeout = setTimeout(cleanUpNextTick);
+ draining = true;
+
+ var len = queue.length;
+ while(len) {
+ currentQueue = queue;
+ queue = [];
+ while (++queueIndex < len) {
+ currentQueue[queueIndex].run();
+ }
+ queueIndex = -1;
+ len = queue.length;
+ }
+ currentQueue = null;
+ draining = false;
+ clearTimeout(timeout);
+}
+
+process.nextTick = function (fun) {
+ var args = new Array(arguments.length - 1);
+ if (arguments.length > 1) {
+ for (var i = 1; i < arguments.length; i++) {
+ args[i - 1] = arguments[i];
+ }
+ }
+ queue.push(new Item(fun, args));
+ if (queue.length === 1 && !draining) {
+ setTimeout(drainQueue, 0);
+ }
+};
+
+// v8 likes predictible objects
+function Item(fun, array) {
+ this.fun = fun;
+ this.array = array;
+}
+Item.prototype.run = function () {
+ this.fun.apply(null, this.array);
+};
+process.title = 'browser';
+process.browser = true;
+process.env = {};
+process.argv = [];
+process.version = ''; // empty string to avoid regexp issues
+process.versions = {};
+
+function noop() {}
+
+process.on = noop;
+process.addListener = noop;
+process.once = noop;
+process.off = noop;
+process.removeListener = noop;
+process.removeAllListeners = noop;
+process.emit = noop;
+
+process.binding = function (name) {
+ throw new Error('process.binding is not supported');
+};
+
+// TODO(shtylman)
+process.cwd = function () { return '/' };
+process.chdir = function (dir) {
+ throw new Error('process.chdir is not supported');
+};
+process.umask = function() { return 0; };
+
+},{}],10:[function(require,module,exports){
+module.exports = require("./lib/_stream_duplex.js")
+
+},{"./lib/_stream_duplex.js":11}],11:[function(require,module,exports){
+(function (process){
+// Copyright Joyent, Inc. and other Node contributors.
+//
+// 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.
+
+// a duplex stream is just a stream that is both readable and writable.
+// Since JS doesn't have multiple prototypal inheritance, this class
+// prototypally inherits from Readable, and then parasitically from
+// Writable.
+
+module.exports = Duplex;
+
+/*<replacement>*/
+var objectKeys = Object.keys || function (obj) {
+ var keys = [];
+ for (var key in obj) keys.push(key);
+ return keys;
+}
+/*</replacement>*/
+
+
+/*<replacement>*/
+var util = require('core-util-is');
+util.inherits = require('inherits');
+/*</replacement>*/
+
+var Readable = require('./_stream_readable');
+var Writable = require('./_stream_writable');
+
+util.inherits(Duplex, Readable);
+
+forEach(objectKeys(Writable.prototype), function(method) {
+ if (!Duplex.prototype[method])
+ Duplex.prototype[method] = Writable.prototype[method];
+});
+
+function Duplex(options) {
+ if (!(this instanceof Duplex))
+ return new Duplex(options);
+
+ Readable.call(this, options);
+ Writable.call(this, options);
+
+ if (options && options.readable === false)
+ this.readable = false;
+
+ if (options && options.writable === false)
+ this.writable = false;
+
+ this.allowHalfOpen = true;
+ if (options && options.allowHalfOpen === false)
+ this.allowHalfOpen = false;
+
+ this.once('end', onend);
+}
+
+// the no-half-open enforcer
+function onend() {
+ // if we allow half-open state, or if the writable side ended,
+ // then we're ok.
+ if (this.allowHalfOpen || this._writableState.ended)
+ return;
+
+ // no more data can be written.
+ // But allow more writes to happen in this tick.
+ process.nextTick(this.end.bind(this));
+}
+
+function forEach (xs, f) {
+ for (var i = 0, l = xs.length; i < l; i++) {
+ f(xs[i], i);
+ }
+}
+
+}).call(this,require('_process'))
+},{"./_stream_readable":13,"./_stream_writable":15,"_process":9,"core-util-is":16,"inherits":7}],12:[function(require,module,exports){
+// Copyright Joyent, Inc. and other Node contributors.
+//
+// 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.
+
+// a passthrough stream.
+// basically just the most minimal sort of Transform stream.
+// Every written chunk gets output as-is.
+
+module.exports = PassThrough;
+
+var Transform = require('./_stream_transform');
+
+/*<replacement>*/
+var util = require('core-util-is');
+util.inherits = require('inherits');
+/*</replacement>*/
+
+util.inherits(PassThrough, Transform);
+
+function PassThrough(options) {
+ if (!(this instanceof PassThrough))
+ return new PassThrough(options);
+
+ Transform.call(this, options);
+}
+
+PassThrough.prototype._transform = function(chunk, encoding, cb) {
+ cb(null, chunk);
+};
+
+},{"./_stream_transform":14,"core-util-is":16,"inherits":7}],13:[function(require,module,exports){
+(function (process){
+// Copyright Joyent, Inc. and other Node contributors.
+//
+// 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.
+
+module.exports = Readable;
+
+/*<replacement>*/
+var isArray = require('isarray');
+/*</replacement>*/
+
+
+/*<replacement>*/
+var Buffer = require('buffer').Buffer;
+/*</replacement>*/
+
+Readable.ReadableState = ReadableState;
+
+var EE = require('events').EventEmitter;
+
+/*<replacement>*/
+if (!EE.listenerCount) EE.listenerCount = function(emitter, type) {
+ return emitter.listeners(type).length;
+};
+/*</replacement>*/
+
+var Stream = require('stream');
+
+/*<replacement>*/
+var util = require('core-util-is');
+util.inherits = require('inherits');
+/*</replacement>*/
+
+var StringDecoder;
+
+
+/*<replacement>*/
+var debug = require('util');
+if (debug && debug.debuglog) {
+ debug = debug.debuglog('stream');
+} else {
+ debug = function () {};
+}
+/*</replacement>*/
+
+
+util.inherits(Readable, Stream);
+
+function ReadableState(options, stream) {
+ var Duplex = require('./_stream_duplex');
+
+ options = options || {};
+
+ // the point at which it stops calling _read() to fill the buffer
+ // Note: 0 is a valid value, means "don't call _read preemptively ever"
+ var hwm = options.highWaterMark;
+ var defaultHwm = options.objectMode ? 16 : 16 * 1024;
+ this.highWaterMark = (hwm || hwm === 0) ? hwm : defaultHwm;
+
+ // cast to ints.
+ this.highWaterMark = ~~this.highWaterMark;
+
+ this.buffer = [];
+ this.length = 0;
+ this.pipes = null;
+ this.pipesCount = 0;
+ this.flowing = null;
+ this.ended = false;
+ this.endEmitted = false;
+ this.reading = false;
+
+ // a flag to be able to tell if the onwrite cb is called immediately,
+ // or on a later tick. We set this to true at first, because any
+ // actions that shouldn't happen until "later" should generally also
+ // not happen before the first write call.
+ this.sync = true;
+
+ // whenever we return null, then we set a flag to say
+ // that we're awaiting a 'readable' event emission.
+ this.needReadable = false;
+ this.emittedReadable = false;
+ this.readableListening = false;
+
+
+ // object stream flag. Used to make read(n) ignore n and to
+ // make all the buffer merging and length checks go away
+ this.objectMode = !!options.objectMode;
+
+ if (stream instanceof Duplex)
+ this.objectMode = this.objectMode || !!options.readableObjectMode;
+
+ // Crypto is kind of old and crusty. Historically, its default string
+ // encoding is 'binary' so we have to make this configurable.
+ // Everything else in the universe uses 'utf8', though.
+ this.defaultEncoding = options.defaultEncoding || 'utf8';
+
+ // when piping, we only care about 'readable' events that happen
+ // after read()ing all the bytes and not getting any pushback.
+ this.ranOut = false;
+
+ // the number of writers that are awaiting a drain event in .pipe()s
+ this.awaitDrain = 0;
+
+ // if true, a maybeReadMore has been scheduled
+ this.readingMore = false;
+
+ this.decoder = null;
+ this.encoding = null;
+ if (options.encoding) {
+ if (!StringDecoder)
+ StringDecoder = require('string_decoder/').StringDecoder;
+ this.decoder = new StringDecoder(options.encoding);
+ this.encoding = options.encoding;
+ }
+}
+
+function Readable(options) {
+ var Duplex = require('./_stream_duplex');
+
+ if (!(this instanceof Readable))
+ return new Readable(options);
+
+ this._readableState = new ReadableState(options, this);
+
+ // legacy
+ this.readable = true;
+
+ Stream.call(this);
+}
+
+// Manually shove something into the read() buffer.
+// This returns true if the highWaterMark has not been hit yet,
+// similar to how Writable.write() returns true if you should
+// write() some more.
+Readable.prototype.push = function(chunk, encoding) {
+ var state = this._readableState;
+
+ if (util.isString(chunk) && !state.objectMode) {
+ encoding = encoding || state.defaultEncoding;
+ if (encoding !== state.encoding) {
+ chunk = new Buffer(chunk, encoding);
+ encoding = '';
+ }
+ }
+
+ return readableAddChunk(this, state, chunk, encoding, false);
+};
+
+// Unshift should *always* be something directly out of read()
+Readable.prototype.unshift = function(chunk) {
+ var state = this._readableState;
+ return readableAddChunk(this, state, chunk, '', true);
+};
+
+function readableAddChunk(stream, state, chunk, encoding, addToFront) {
+ var er = chunkInvalid(state, chunk);
+ if (er) {
+ stream.emit('error', er);
+ } else if (util.isNullOrUndefined(chunk)) {
+ state.reading = false;
+ if (!state.ended)
+ onEofChunk(stream, state);
+ } else if (state.objectMode || chunk && chunk.length > 0) {
+ if (state.ended && !addToFront) {
+ var e = new Error('stream.push() after EOF');
+ stream.emit('error', e);
+ } else if (state.endEmitted && addToFront) {
+ var e = new Error('stream.unshift() after end event');
+ stream.emit('error', e);
+ } else {
+ if (state.decoder && !addToFront && !encoding)
+ chunk = state.decoder.write(chunk);
+
+ if (!addToFront)
+ state.reading = false;
+
+ // if we want the data now, just emit it.
+ if (state.flowing && state.length === 0 && !state.sync) {
+ stream.emit('data', chunk);
+ stream.read(0);
+ } else {
+ // update the buffer info.
+ state.length += state.objectMode ? 1 : chunk.length;
+ if (addToFront)
+ state.buffer.unshift(chunk);
+ else
+ state.buffer.push(chunk);
+
+ if (state.needReadable)
+ emitReadable(stream);
+ }
+
+ maybeReadMore(stream, state);
+ }
+ } else if (!addToFront) {
+ state.reading = false;
+ }
+
+ return needMoreData(state);
+}
+
+
+
+// if it's past the high water mark, we can push in some more.
+// Also, if we have no data yet, we can stand some
+// more bytes. This is to work around cases where hwm=0,
+// such as the repl. Also, if the push() triggered a
+// readable event, and the user called read(largeNumber) such that
+// needReadable was set, then we ought to push more, so that another
+// 'readable' event will be triggered.
+function needMoreData(state) {
+ return !state.ended &&
+ (state.needReadable ||
+ state.length < state.highWaterMark ||
+ state.length === 0);
+}
+
+// backwards compatibility.
+Readable.prototype.setEncoding = function(enc) {
+ if (!StringDecoder)
+ StringDecoder = require('string_decoder/').StringDecoder;
+ this._readableState.decoder = new StringDecoder(enc);
+ this._readableState.encoding = enc;
+ return this;
+};
+
+// Don't raise the hwm > 128MB
+var MAX_HWM = 0x800000;
+function roundUpToNextPowerOf2(n) {
+ if (n >= MAX_HWM) {
+ n = MAX_HWM;
+ } else {
+ // Get the next highest power of 2
+ n--;
+ for (var p = 1; p < 32; p <<= 1) n |= n >> p;
+ n++;
+ }
+ return n;
+}
+
+function howMuchToRead(n, state) {
+ if (state.length === 0 && state.ended)
+ return 0;
+
+ if (state.objectMode)
+ return n === 0 ? 0 : 1;
+
+ if (isNaN(n) || util.isNull(n)) {
+ // only flow one buffer at a time
+ if (state.flowing && state.buffer.length)
+ return state.buffer[0].length;
+ else
+ return state.length;
+ }
+
+ if (n <= 0)
+ return 0;
+
+ // If we're asking for more than the target buffer level,
+ // then raise the water mark. Bump up to the next highest
+ // power of 2, to prevent increasing it excessively in tiny
+ // amounts.
+ if (n > state.highWaterMark)
+ state.highWaterMark = roundUpToNextPowerOf2(n);
+
+ // don't have that much. return null, unless we've ended.
+ if (n > state.length) {
+ if (!state.ended) {
+ state.needReadable = true;
+ return 0;
+ } else
+ return state.length;
+ }
+
+ return n;
+}
+
+// you can override either this method, or the async _read(n) below.
+Readable.prototype.read = function(n) {
+ debug('read', n);
+ var state = this._readableState;
+ var nOrig = n;
+
+ if (!util.isNumber(n) || n > 0)
+ state.emittedReadable = false;
+
+ // if we're doing read(0) to trigger a readable event, but we
+ // already have a bunch of data in the buffer, then just trigger
+ // the 'readable' event and move on.
+ if (n === 0 &&
+ state.needReadable &&
+ (state.length >= state.highWaterMark || state.ended)) {
+ debug('read: emitReadable', state.length, state.ended);
+ if (state.length === 0 && state.ended)
+ endReadable(this);
+ else
+ emitReadable(this);
+ return null;
+ }
+
+ n = howMuchToRead(n, state);
+
+ // if we've ended, and we're now clear, then finish it up.
+ if (n === 0 && state.ended) {
+ if (state.length === 0)
+ endReadable(this);
+ return null;
+ }
+
+ // All the actual chunk generation logic needs to be
+ // *below* the call to _read. The reason is that in certain
+ // synthetic stream cases, such as passthrough streams, _read
+ // may be a completely synchronous operation which may change
+ // the state of the read buffer, providing enough data when
+ // before there was *not* enough.
+ //
+ // So, the steps are:
+ // 1. Figure out what the state of things will be after we do
+ // a read from the buffer.
+ //
+ // 2. If that resulting state will trigger a _read, then call _read.
+ // Note that this may be asynchronous, or synchronous. Yes, it is
+ // deeply ugly to write APIs this way, but that still doesn't mean
+ // that the Readable class should behave improperly, as streams are
+ // designed to be sync/async agnostic.
+ // Take note if the _read call is sync or async (ie, if the read call
+ // has returned yet), so that we know whether or not it's safe to emit
+ // 'readable' etc.
+ //
+ // 3. Actually pull the requested chunks out of the buffer and return.
+
+ // if we need a readable event, then we need to do some reading.
+ var doRead = state.needReadable;
+ debug('need readable', doRead);
+
+ // if we currently have less than the highWaterMark, then also read some
+ if (state.length === 0 || state.length - n < state.highWaterMark) {
+ doRead = true;
+ debug('length less than watermark', doRead);
+ }
+
+ // however, if we've ended, then there's no point, and if we're already
+ // reading, then it's unnecessary.
+ if (state.ended || state.reading) {
+ doRead = false;
+ debug('reading or ended', doRead);
+ }
+
+ if (doRead) {
+ debug('do read');
+ state.reading = true;
+ state.sync = true;
+ // if the length is currently zero, then we *need* a readable event.
+ if (state.length === 0)
+ state.needReadable = true;
+ // call internal read method
+ this._read(state.highWaterMark);
+ state.sync = false;
+ }
+
+ // If _read pushed data synchronously, then `reading` will be false,
+ // and we need to re-evaluate how much data we can return to the user.
+ if (doRead && !state.reading)
+ n = howMuchToRead(nOrig, state);
+
+ var ret;
+ if (n > 0)
+ ret = fromList(n, state);
+ else
+ ret = null;
+
+ if (util.isNull(ret)) {
+ state.needReadable = true;
+ n = 0;
+ }
+
+ state.length -= n;
+
+ // If we have nothing in the buffer, then we want to know
+ // as soon as we *do* get something into the buffer.
+ if (state.length === 0 && !state.ended)
+ state.needReadable = true;
+
+ // If we tried to read() past the EOF, then emit end on the next tick.
+ if (nOrig !== n && state.ended && state.length === 0)
+ endReadable(this);
+
+ if (!util.isNull(ret))
+ this.emit('data', ret);
+
+ return ret;
+};
+
+function chunkInvalid(state, chunk) {
+ var er = null;
+ if (!util.isBuffer(chunk) &&
+ !util.isString(chunk) &&
+ !util.isNullOrUndefined(chunk) &&
+ !state.objectMode) {
+ er = new TypeError('Invalid non-string/buffer chunk');
+ }
+ return er;
+}
+
+
+function onEofChunk(stream, state) {
+ if (state.decoder && !state.ended) {
+ var chunk = state.decoder.end();
+ if (chunk && chunk.length) {
+ state.buffer.push(chunk);
+ state.length += state.objectMode ? 1 : chunk.length;
+ }
+ }
+ state.ended = true;
+
+ // emit 'readable' now to make sure it gets picked up.
+ emitReadable(stream);
+}
+
+// Don't emit readable right away in sync mode, because this can trigger
+// another read() call => stack overflow. This way, it might trigger
+// a nextTick recursion warning, but that's not so bad.
+function emitReadable(stream) {
+ var state = stream._readableState;
+ state.needReadable = false;
+ if (!state.emittedReadable) {
+ debug('emitReadable', state.flowing);
+ state.emittedReadable = true;
+ if (state.sync)
+ process.nextTick(function() {
+ emitReadable_(stream);
+ });
+ else
+ emitReadable_(stream);
+ }
+}
+
+function emitReadable_(stream) {
+ debug('emit readable');
+ stream.emit('readable');
+ flow(stream);
+}
+
+
+// at this point, the user has presumably seen the 'readable' event,
+// and called read() to consume some data. that may have triggered
+// in turn another _read(n) call, in which case reading = true if
+// it's in progress.
+// However, if we're not ended, or reading, and the length < hwm,
+// then go ahead and try to read some more preemptively.
+function maybeReadMore(stream, state) {
+ if (!state.readingMore) {
+ state.readingMore = true;
+ process.nextTick(function() {
+ maybeReadMore_(stream, state);
+ });
+ }
+}
+
+function maybeReadMore_(stream, state) {
+ var len = state.length;
+ while (!state.reading && !state.flowing && !state.ended &&
+ state.length < state.highWaterMark) {
+ debug('maybeReadMore read 0');
+ stream.read(0);
+ if (len === state.length)
+ // didn't get any data, stop spinning.
+ break;
+ else
+ len = state.length;
+ }
+ state.readingMore = false;
+}
+
+// abstract method. to be overridden in specific implementation classes.
+// call cb(er, data) where data is <= n in length.
+// for virtual (non-string, non-buffer) streams, "length" is somewhat
+// arbitrary, and perhaps not very meaningful.
+Readable.prototype._read = function(n) {
+ this.emit('error', new Error('not implemented'));
+};
+
+Readable.prototype.pipe = function(dest, pipeOpts) {
+ var src = this;
+ var state = this._readableState;
+
+ switch (state.pipesCount) {
+ case 0:
+ state.pipes = dest;
+ break;
+ case 1:
+ state.pipes = [state.pipes, dest];
+ break;
+ default:
+ state.pipes.push(dest);
+ break;
+ }
+ state.pipesCount += 1;
+ debug('pipe count=%d opts=%j', state.pipesCount, pipeOpts);
+
+ var doEnd = (!pipeOpts || pipeOpts.end !== false) &&
+ dest !== process.stdout &&
+ dest !== process.stderr;
+
+ var endFn = doEnd ? onend : cleanup;
+ if (state.endEmitted)
+ process.nextTick(endFn);
+ else
+ src.once('end', endFn);
+
+ dest.on('unpipe', onunpipe);
+ function onunpipe(readable) {
+ debug('onunpipe');
+ if (readable === src) {
+ cleanup();
+ }
+ }
+
+ function onend() {
+ debug('onend');
+ dest.end();
+ }
+
+ // when the dest drains, it reduces the awaitDrain counter
+ // on the source. This would be more elegant with a .once()
+ // handler in flow(), but adding and removing repeatedly is
+ // too slow.
+ var ondrain = pipeOnDrain(src);
+ dest.on('drain', ondrain);
+
+ function cleanup() {
+ debug('cleanup');
+ // cleanup event handlers once the pipe is broken
+ dest.removeListener('close', onclose);
+ dest.removeListener('finish', onfinish);
+ dest.removeListener('drain', ondrain);
+ dest.removeListener('error', onerror);
+ dest.removeListener('unpipe', onunpipe);
+ src.removeListener('end', onend);
+ src.removeListener('end', cleanup);
+ src.removeListener('data', ondata);
+
+ // if the reader is waiting for a drain event from this
+ // specific writer, then it would cause it to never start
+ // flowing again.
+ // So, if this is awaiting a drain, then we just call it now.
+ // If we don't know, then assume that we are waiting for one.
+ if (state.awaitDrain &&
+ (!dest._writableState || dest._writableState.needDrain))
+ ondrain();
+ }
+
+ src.on('data', ondata);
+ function ondata(chunk) {
+ debug('ondata');
+ var ret = dest.write(chunk);
+ if (false === ret) {
+ debug('false write response, pause',
+ src._readableState.awaitDrain);
+ src._readableState.awaitDrain++;
+ src.pause();
+ }
+ }
+
+ // if the dest has an error, then stop piping into it.
+ // however, don't suppress the throwing behavior for this.
+ function onerror(er) {
+ debug('onerror', er);
+ unpipe();
+ dest.removeListener('error', onerror);
+ if (EE.listenerCount(dest, 'error') === 0)
+ dest.emit('error', er);
+ }
+ // This is a brutally ugly hack to make sure that our error handler
+ // is attached before any userland ones. NEVER DO THIS.
+ if (!dest._events || !dest._events.error)
+ dest.on('error', onerror);
+ else if (isArray(dest._events.error))
+ dest._events.error.unshift(onerror);
+ else
+ dest._events.error = [onerror, dest._events.error];
+
+
+
+ // Both close and finish should trigger unpipe, but only once.
+ function onclose() {
+ dest.removeListener('finish', onfinish);
+ unpipe();
+ }
+ dest.once('close', onclose);
+ function onfinish() {
+ debug('onfinish');
+ dest.removeListener('close', onclose);
+ unpipe();
+ }
+ dest.once('finish', onfinish);
+
+ function unpipe() {
+ debug('unpipe');
+ src.unpipe(dest);
+ }
+
+ // tell the dest that it's being piped to
+ dest.emit('pipe', src);
+
+ // start the flow if it hasn't been started already.
+ if (!state.flowing) {
+ debug('pipe resume');
+ src.resume();
+ }
+
+ return dest;
+};
+
+function pipeOnDrain(src) {
+ return function() {
+ var state = src._readableState;
+ debug('pipeOnDrain', state.awaitDrain);
+ if (state.awaitDrain)
+ state.awaitDrain--;
+ if (state.awaitDrain === 0 && EE.listenerCount(src, 'data')) {
+ state.flowing = true;
+ flow(src);
+ }
+ };
+}
+
+
+Readable.prototype.unpipe = function(dest) {
+ var state = this._readableState;
+
+ // if we're not piping anywhere, then do nothing.
+ if (state.pipesCount === 0)
+ return this;
+
+ // just one destination. most common case.
+ if (state.pipesCount === 1) {
+ // passed in one, but it's not the right one.
+ if (dest && dest !== state.pipes)
+ return this;
+
+ if (!dest)
+ dest = state.pipes;
+
+ // got a match.
+ state.pipes = null;
+ state.pipesCount = 0;
+ state.flowing = false;
+ if (dest)
+ dest.emit('unpipe', this);
+ return this;
+ }
+
+ // slow case. multiple pipe destinations.
+
+ if (!dest) {
+ // remove all.
+ var dests = state.pipes;
+ var len = state.pipesCount;
+ state.pipes = null;
+ state.pipesCount = 0;
+ state.flowing = false;
+
+ for (var i = 0; i < len; i++)
+ dests[i].emit('unpipe', this);
+ return this;
+ }
+
+ // try to find the right one.
+ var i = indexOf(state.pipes, dest);
+ if (i === -1)
+ return this;
+
+ state.pipes.splice(i, 1);
+ state.pipesCount -= 1;
+ if (state.pipesCount === 1)
+ state.pipes = state.pipes[0];
+
+ dest.emit('unpipe', this);
+
+ return this;
+};
+
+// set up data events if they are asked for
+// Ensure readable listeners eventually get something
+Readable.prototype.on = function(ev, fn) {
+ var res = Stream.prototype.on.call(this, ev, fn);
+
+ // If listening to data, and it has not explicitly been paused,
+ // then call resume to start the flow of data on the next tick.
+ if (ev === 'data' && false !== this._readableState.flowing) {
+ this.resume();
+ }
+
+ if (ev === 'readable' && this.readable) {
+ var state = this._readableState;
+ if (!state.readableListening) {
+ state.readableListening = true;
+ state.emittedReadable = false;
+ state.needReadable = true;
+ if (!state.reading) {
+ var self = this;
+ process.nextTick(function() {
+ debug('readable nexttick read 0');
+ self.read(0);
+ });
+ } else if (state.length) {
+ emitReadable(this, state);
+ }
+ }
+ }
+
+ return res;
+};
+Readable.prototype.addListener = Readable.prototype.on;
+
+// pause() and resume() are remnants of the legacy readable stream API
+// If the user uses them, then switch into old mode.
+Readable.prototype.resume = function() {
+ var state = this._readableState;
+ if (!state.flowing) {
+ debug('resume');
+ state.flowing = true;
+ if (!state.reading) {
+ debug('resume read 0');
+ this.read(0);
+ }
+ resume(this, state);
+ }
+ return this;
+};
+
+function resume(stream, state) {
+ if (!state.resumeScheduled) {
+ state.resumeScheduled = true;
+ process.nextTick(function() {
+ resume_(stream, state);
+ });
+ }
+}
+
+function resume_(stream, state) {
+ state.resumeScheduled = false;
+ stream.emit('resume');
+ flow(stream);
+ if (state.flowing && !state.reading)
+ stream.read(0);
+}
+
+Readable.prototype.pause = function() {
+ debug('call pause flowing=%j', this._readableState.flowing);
+ if (false !== this._readableState.flowing) {
+ debug('pause');
+ this._readableState.flowing = false;
+ this.emit('pause');
+ }
+ return this;
+};
+
+function flow(stream) {
+ var state = stream._readableState;
+ debug('flow', state.flowing);
+ if (state.flowing) {
+ do {
+ var chunk = stream.read();
+ } while (null !== chunk && state.flowing);
+ }
+}
+
+// wrap an old-style stream as the async data source.
+// This is *not* part of the readable stream interface.
+// It is an ugly unfortunate mess of history.
+Readable.prototype.wrap = function(stream) {
+ var state = this._readableState;
+ var paused = false;
+
+ var self = this;
+ stream.on('end', function() {
+ debug('wrapped end');
+ if (state.decoder && !state.ended) {
+ var chunk = state.decoder.end();
+ if (chunk && chunk.length)
+ self.push(chunk);
+ }
+
+ self.push(null);
+ });
+
+ stream.on('data', function(chunk) {
+ debug('wrapped data');
+ if (state.decoder)
+ chunk = state.decoder.write(chunk);
+ if (!chunk || !state.objectMode && !chunk.length)
+ return;
+
+ var ret = self.push(chunk);
+ if (!ret) {
+ paused = true;
+ stream.pause();
+ }
+ });
+
+ // proxy all the other methods.
+ // important when wrapping filters and duplexes.
+ for (var i in stream) {
+ if (util.isFunction(stream[i]) && util.isUndefined(this[i])) {
+ this[i] = function(method) { return function() {
+ return stream[method].apply(stream, arguments);
+ }}(i);
+ }
+ }
+
+ // proxy certain important events.
+ var events = ['error', 'close', 'destroy', 'pause', 'resume'];
+ forEach(events, function(ev) {
+ stream.on(ev, self.emit.bind(self, ev));
+ });
+
+ // when we try to consume some more bytes, simply unpause the
+ // underlying stream.
+ self._read = function(n) {
+ debug('wrapped _read', n);
+ if (paused) {
+ paused = false;
+ stream.resume();
+ }
+ };
+
+ return self;
+};
+
+
+
+// exposed for testing purposes only.
+Readable._fromList = fromList;
+
+// Pluck off n bytes from an array of buffers.
+// Length is the combined lengths of all the buffers in the list.
+function fromList(n, state) {
+ var list = state.buffer;
+ var length = state.length;
+ var stringMode = !!state.decoder;
+ var objectMode = !!state.objectMode;
+ var ret;
+
+ // nothing in the list, definitely empty.
+ if (list.length === 0)
+ return null;
+
+ if (length === 0)
+ ret = null;
+ else if (objectMode)
+ ret = list.shift();
+ else if (!n || n >= length) {
+ // read it all, truncate the array.
+ if (stringMode)
+ ret = list.join('');
+ else
+ ret = Buffer.concat(list, length);
+ list.length = 0;
+ } else {
+ // read just some of it.
+ if (n < list[0].length) {
+ // just take a part of the first list item.
+ // slice is the same for buffers and strings.
+ var buf = list[0];
+ ret = buf.slice(0, n);
+ list[0] = buf.slice(n);
+ } else if (n === list[0].length) {
+ // first list is a perfect match
+ ret = list.shift();
+ } else {
+ // complex case.
+ // we have enough to cover it, but it spans past the first buffer.
+ if (stringMode)
+ ret = '';
+ else
+ ret = new Buffer(n);
+
+ var c = 0;
+ for (var i = 0, l = list.length; i < l && c < n; i++) {
+ var buf = list[0];
+ var cpy = Math.min(n - c, buf.length);
+
+ if (stringMode)
+ ret += buf.slice(0, cpy);
+ else
+ buf.copy(ret, c, 0, cpy);
+
+ if (cpy < buf.length)
+ list[0] = buf.slice(cpy);
+ else
+ list.shift();
+
+ c += cpy;
+ }
+ }
+ }
+
+ return ret;
+}
+
+function endReadable(stream) {
+ var state = stream._readableState;
+
+ // If we get here before consuming all the bytes, then that is a
+ // bug in node. Should never happen.
+ if (state.length > 0)
+ throw new Error('endReadable called on non-empty stream');
+
+ if (!state.endEmitted) {
+ state.ended = true;
+ process.nextTick(function() {
+ // Check that we didn't get one last unshift.
+ if (!state.endEmitted && state.length === 0) {
+ state.endEmitted = true;
+ stream.readable = false;
+ stream.emit('end');
+ }
+ });
+ }
+}
+
+function forEach (xs, f) {
+ for (var i = 0, l = xs.length; i < l; i++) {
+ f(xs[i], i);
+ }
+}
+
+function indexOf (xs, x) {
+ for (var i = 0, l = xs.length; i < l; i++) {
+ if (xs[i] === x) return i;
+ }
+ return -1;
+}
+
+}).call(this,require('_process'))
+},{"./_stream_duplex":11,"_process":9,"buffer":2,"core-util-is":16,"events":6,"inherits":7,"isarray":8,"stream":21,"string_decoder/":22,"util":1}],14:[function(require,module,exports){
+// Copyright Joyent, Inc. and other Node contributors.
+//
+// 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.
+
+
+// a transform stream is a readable/writable stream where you do
+// something with the data. Sometimes it's called a "filter",
+// but that's not a great name for it, since that implies a thing where
+// some bits pass through, and others are simply ignored. (That would
+// be a valid example of a transform, of course.)
+//
+// While the output is causally related to the input, it's not a
+// necessarily symmetric or synchronous transformation. For example,
+// a zlib stream might take multiple plain-text writes(), and then
+// emit a single compressed chunk some time in the future.
+//
+// Here's how this works:
+//
+// The Transform stream has all the aspects of the readable and writable
+// stream classes. When you write(chunk), that calls _write(chunk,cb)
+// internally, and returns false if there's a lot of pending writes
+// buffered up. When you call read(), that calls _read(n) until
+// there's enough pending readable data buffered up.
+//
+// In a transform stream, the written data is placed in a buffer. When
+// _read(n) is called, it transforms the queued up data, calling the
+// buffered _write cb's as it consumes chunks. If consuming a single
+// written chunk would result in multiple output chunks, then the first
+// outputted bit calls the readcb, and subsequent chunks just go into
+// the read buffer, and will cause it to emit 'readable' if necessary.
+//
+// This way, back-pressure is actually determined by the reading side,
+// since _read has to be called to start processing a new chunk. However,
+// a pathological inflate type of transform can cause excessive buffering
+// here. For example, imagine a stream where every byte of input is
+// interpreted as an integer from 0-255, and then results in that many
+// bytes of output. Writing the 4 bytes {ff,ff,ff,ff} would result in
+// 1kb of data being output. In this case, you could write a very small
+// amount of input, and end up with a very large amount of output. In
+// such a pathological inflating mechanism, there'd be no way to tell
+// the system to stop doing the transform. A single 4MB write could
+// cause the system to run out of memory.
+//
+// However, even in such a pathological case, only a single written chunk
+// would be consumed, and then the rest would wait (un-transformed) until
+// the results of the previous transformed chunk were consumed.
+
+module.exports = Transform;
+
+var Duplex = require('./_stream_duplex');
+
+/*<replacement>*/
+var util = require('core-util-is');
+util.inherits = require('inherits');
+/*</replacement>*/
+
+util.inherits(Transform, Duplex);
+
+
+function TransformState(options, stream) {
+ this.afterTransform = function(er, data) {
+ return afterTransform(stream, er, data);
+ };
+
+ this.needTransform = false;
+ this.transforming = false;
+ this.writecb = null;
+ this.writechunk = null;
+}
+
+function afterTransform(stream, er, data) {
+ var ts = stream._transformState;
+ ts.transforming = false;
+
+ var cb = ts.writecb;
+
+ if (!cb)
+ return stream.emit('error', new Error('no writecb in Transform class'));
+
+ ts.writechunk = null;
+ ts.writecb = null;
+
+ if (!util.isNullOrUndefined(data))
+ stream.push(data);
+
+ if (cb)
+ cb(er);
+
+ var rs = stream._readableState;
+ rs.reading = false;
+ if (rs.needReadable || rs.length < rs.highWaterMark) {
+ stream._read(rs.highWaterMark);
+ }
+}
+
+
+function Transform(options) {
+ if (!(this instanceof Transform))
+ return new Transform(options);
+
+ Duplex.call(this, options);
+
+ this._transformState = new TransformState(options, this);
+
+ // when the writable side finishes, then flush out anything remaining.
+ var stream = this;
+
+ // start out asking for a readable event once data is transformed.
+ this._readableState.needReadable = true;
+
+ // we have implemented the _read method, and done the other things
+ // that Readable wants before the first _read call, so unset the
+ // sync guard flag.
+ this._readableState.sync = false;
+
+ this.once('prefinish', function() {
+ if (util.isFunction(this._flush))
+ this._flush(function(er) {
+ done(stream, er);
+ });
+ else
+ done(stream);
+ });
+}
+
+Transform.prototype.push = function(chunk, encoding) {
+ this._transformState.needTransform = false;
+ return Duplex.prototype.push.call(this, chunk, encoding);
+};
+
+// This is the part where you do stuff!
+// override this function in implementation classes.
+// 'chunk' is an input chunk.
+//
+// Call `push(newChunk)` to pass along transformed output
+// to the readable side. You may call 'push' zero or more times.
+//
+// Call `cb(err)` when you are done with this chunk. If you pass
+// an error, then that'll put the hurt on the whole operation. If you
+// never call cb(), then you'll never get another chunk.
+Transform.prototype._transform = function(chunk, encoding, cb) {
+ throw new Error('not implemented');
+};
+
+Transform.prototype._write = function(chunk, encoding, cb) {
+ var ts = this._transformState;
+ ts.writecb = cb;
+ ts.writechunk = chunk;
+ ts.writeencoding = encoding;
+ if (!ts.transforming) {
+ var rs = this._readableState;
+ if (ts.needTransform ||
+ rs.needReadable ||
+ rs.length < rs.highWaterMark)
+ this._read(rs.highWaterMark);
+ }
+};
+
+// Doesn't matter what the args are here.
+// _transform does all the work.
+// That we got here means that the readable side wants more data.
+Transform.prototype._read = function(n) {
+ var ts = this._transformState;
+
+ if (!util.isNull(ts.writechunk) && ts.writecb && !ts.transforming) {
+ ts.transforming = true;
+ this._transform(ts.writechunk, ts.writeencoding, ts.afterTransform);
+ } else {
+ // mark that we need a transform, so that any data that comes in
+ // will get processed, now that we've asked for it.
+ ts.needTransform = true;
+ }
+};
+
+
+function done(stream, er) {
+ if (er)
+ return stream.emit('error', er);
+
+ // if there's nothing in the write buffer, then that means
+ // that nothing more will ever be provided
+ var ws = stream._writableState;
+ var ts = stream._transformState;
+
+ if (ws.length)
+ throw new Error('calling transform done when ws.length != 0');
+
+ if (ts.transforming)
+ throw new Error('calling transform done when still transforming');
+
+ return stream.push(null);
+}
+
+},{"./_stream_duplex":11,"core-util-is":16,"inherits":7}],15:[function(require,module,exports){
+(function (process){
+// Copyright Joyent, Inc. and other Node contributors.
+//
+// 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.
+
+// A bit simpler than readable streams.
+// Implement an async ._write(chunk, cb), and it'll handle all
+// the drain event emission and buffering.
+
+module.exports = Writable;
+
+/*<replacement>*/
+var Buffer = require('buffer').Buffer;
+/*</replacement>*/
+
+Writable.WritableState = WritableState;
+
+
+/*<replacement>*/
+var util = require('core-util-is');
+util.inherits = require('inherits');
+/*</replacement>*/
+
+var Stream = require('stream');
+
+util.inherits(Writable, Stream);
+
+function WriteReq(chunk, encoding, cb) {
+ this.chunk = chunk;
+ this.encoding = encoding;
+ this.callback = cb;
+}
+
+function WritableState(options, stream) {
+ var Duplex = require('./_stream_duplex');
+
+ options = options || {};
+
+ // the point at which write() starts returning false
+ // Note: 0 is a valid value, means that we always return false if
+ // the entire buffer is not flushed immediately on write()
+ var hwm = options.highWaterMark;
+ var defaultHwm = options.objectMode ? 16 : 16 * 1024;
+ this.highWaterMark = (hwm || hwm === 0) ? hwm : defaultHwm;
+
+ // object stream flag to indicate whether or not this stream
+ // contains buffers or objects.
+ this.objectMode = !!options.objectMode;
+
+ if (stream instanceof Duplex)
+ this.objectMode = this.objectMode || !!options.writableObjectMode;
+
+ // cast to ints.
+ this.highWaterMark = ~~this.highWaterMark;
+
+ this.needDrain = false;
+ // at the start of calling end()
+ this.ending = false;
+ // when end() has been called, and returned
+ this.ended = false;
+ // when 'finish' is emitted
+ this.finished = false;
+
+ // should we decode strings into buffers before passing to _write?
+ // this is here so that some node-core streams can optimize string
+ // handling at a lower level.
+ var noDecode = options.decodeStrings === false;
+ this.decodeStrings = !noDecode;
+
+ // Crypto is kind of old and crusty. Historically, its default string
+ // encoding is 'binary' so we have to make this configurable.
+ // Everything else in the universe uses 'utf8', though.
+ this.defaultEncoding = options.defaultEncoding || 'utf8';
+
+ // not an actual buffer we keep track of, but a measurement
+ // of how much we're waiting to get pushed to some underlying
+ // socket or file.
+ this.length = 0;
+
+ // a flag to see when we're in the middle of a write.
+ this.writing = false;
+
+ // when true all writes will be buffered until .uncork() call
+ this.corked = 0;
+
+ // a flag to be able to tell if the onwrite cb is called immediately,
+ // or on a later tick. We set this to true at first, because any
+ // actions that shouldn't happen until "later" should generally also
+ // not happen before the first write call.
+ this.sync = true;
+
+ // a flag to know if we're processing previously buffered items, which
+ // may call the _write() callback in the same tick, so that we don't
+ // end up in an overlapped onwrite situation.
+ this.bufferProcessing = false;
+
+ // the callback that's passed to _write(chunk,cb)
+ this.onwrite = function(er) {
+ onwrite(stream, er);
+ };
+
+ // the callback that the user supplies to write(chunk,encoding,cb)
+ this.writecb = null;
+
+ // the amount that is being written when _write is called.
+ this.writelen = 0;
+
+ this.buffer = [];
+
+ // number of pending user-supplied write callbacks
+ // this must be 0 before 'finish' can be emitted
+ this.pendingcb = 0;
+
+ // emit prefinish if the only thing we're waiting for is _write cbs
+ // This is relevant for synchronous Transform streams
+ this.prefinished = false;
+
+ // True if the error was already emitted and should not be thrown again
+ this.errorEmitted = false;
+}
+
+function Writable(options) {
+ var Duplex = require('./_stream_duplex');
+
+ // Writable ctor is applied to Duplexes, though they're not
+ // instanceof Writable, they're instanceof Readable.
+ if (!(this instanceof Writable) && !(this instanceof Duplex))
+ return new Writable(options);
+
+ this._writableState = new WritableState(options, this);
+
+ // legacy.
+ this.writable = true;
+
+ Stream.call(this);
+}
+
+// Otherwise people can pipe Writable streams, which is just wrong.
+Writable.prototype.pipe = function() {
+ this.emit('error', new Error('Cannot pipe. Not readable.'));
+};
+
+
+function writeAfterEnd(stream, state, cb) {
+ var er = new Error('write after end');
+ // TODO: defer error events consistently everywhere, not just the cb
+ stream.emit('error', er);
+ process.nextTick(function() {
+ cb(er);
+ });
+}
+
+// If we get something that is not a buffer, string, null, or undefined,
+// and we're not in objectMode, then that's an error.
+// Otherwise stream chunks are all considered to be of length=1, and the
+// watermarks determine how many objects to keep in the buffer, rather than
+// how many bytes or characters.
+function validChunk(stream, state, chunk, cb) {
+ var valid = true;
+ if (!util.isBuffer(chunk) &&
+ !util.isString(chunk) &&
+ !util.isNullOrUndefined(chunk) &&
+ !state.objectMode) {
+ var er = new TypeError('Invalid non-string/buffer chunk');
+ stream.emit('error', er);
+ process.nextTick(function() {
+ cb(er);
+ });
+ valid = false;
+ }
+ return valid;
+}
+
+Writable.prototype.write = function(chunk, encoding, cb) {
+ var state = this._writableState;
+ var ret = false;
+
+ if (util.isFunction(encoding)) {
+ cb = encoding;
+ encoding = null;
+ }
+
+ if (util.isBuffer(chunk))
+ encoding = 'buffer';
+ else if (!encoding)
+ encoding = state.defaultEncoding;
+
+ if (!util.isFunction(cb))
+ cb = function() {};
+
+ if (state.ended)
+ writeAfterEnd(this, state, cb);
+ else if (validChunk(this, state, chunk, cb)) {
+ state.pendingcb++;
+ ret = writeOrBuffer(this, state, chunk, encoding, cb);
+ }
+
+ return ret;
+};
+
+Writable.prototype.cork = function() {
+ var state = this._writableState;
+
+ state.corked++;
+};
+
+Writable.prototype.uncork = function() {
+ var state = this._writableState;
+
+ if (state.corked) {
+ state.corked--;
+
+ if (!state.writing &&
+ !state.corked &&
+ !state.finished &&
+ !state.bufferProcessing &&
+ state.buffer.length)
+ clearBuffer(this, state);
+ }
+};
+
+function decodeChunk(state, chunk, encoding) {
+ if (!state.objectMode &&
+ state.decodeStrings !== false &&
+ util.isString(chunk)) {
+ chunk = new Buffer(chunk, encoding);
+ }
+ return chunk;
+}
+
+// if we're already writing something, then just put this
+// in the queue, and wait our turn. Otherwise, call _write
+// If we return false, then we need a drain event, so set that flag.
+function writeOrBuffer(stream, state, chunk, encoding, cb) {
+ chunk = decodeChunk(state, chunk, encoding);
+ if (util.isBuffer(chunk))
+ encoding = 'buffer';
+ var len = state.objectMode ? 1 : chunk.length;
+
+ state.length += len;
+
+ var ret = state.length < state.highWaterMark;
+ // we must ensure that previous needDrain will not be reset to false.
+ if (!ret)
+ state.needDrain = true;
+
+ if (state.writing || state.corked)
+ state.buffer.push(new WriteReq(chunk, encoding, cb));
+ else
+ doWrite(stream, state, false, len, chunk, encoding, cb);
+
+ return ret;
+}
+
+function doWrite(stream, state, writev, len, chunk, encoding, cb) {
+ state.writelen = len;
+ state.writecb = cb;
+ state.writing = true;
+ state.sync = true;
+ if (writev)
+ stream._writev(chunk, state.onwrite);
+ else
+ stream._write(chunk, encoding, state.onwrite);
+ state.sync = false;
+}
+
+function onwriteError(stream, state, sync, er, cb) {
+ if (sync)
+ process.nextTick(function() {
+ state.pendingcb--;
+ cb(er);
+ });
+ else {
+ state.pendingcb--;
+ cb(er);
+ }
+
+ stream._writableState.errorEmitted = true;
+ stream.emit('error', er);
+}
+
+function onwriteStateUpdate(state) {
+ state.writing = false;
+ state.writecb = null;
+ state.length -= state.writelen;
+ state.writelen = 0;
+}
+
+function onwrite(stream, er) {
+ var state = stream._writableState;
+ var sync = state.sync;
+ var cb = state.writecb;
+
+ onwriteStateUpdate(state);
+
+ if (er)
+ onwriteError(stream, state, sync, er, cb);
+ else {
+ // Check if we're actually ready to finish, but don't emit yet
+ var finished = needFinish(stream, state);
+
+ if (!finished &&
+ !state.corked &&
+ !state.bufferProcessing &&
+ state.buffer.length) {
+ clearBuffer(stream, state);
+ }
+
+ if (sync) {
+ process.nextTick(function() {
+ afterWrite(stream, state, finished, cb);
+ });
+ } else {
+ afterWrite(stream, state, finished, cb);
+ }
+ }
+}
+
+function afterWrite(stream, state, finished, cb) {
+ if (!finished)
+ onwriteDrain(stream, state);
+ state.pendingcb--;
+ cb();
+ finishMaybe(stream, state);
+}
+
+// Must force callback to be called on nextTick, so that we don't
+// emit 'drain' before the write() consumer gets the 'false' return
+// value, and has a chance to attach a 'drain' listener.
+function onwriteDrain(stream, state) {
+ if (state.length === 0 && state.needDrain) {
+ state.needDrain = false;
+ stream.emit('drain');
+ }
+}
+
+
+// if there's something in the buffer waiting, then process it
+function clearBuffer(stream, state) {
+ state.bufferProcessing = true;
+
+ if (stream._writev && state.buffer.length > 1) {
+ // Fast case, write everything using _writev()
+ var cbs = [];
+ for (var c = 0; c < state.buffer.length; c++)
+ cbs.push(state.buffer[c].callback);
+
+ // count the one we are adding, as well.
+ // TODO(isaacs) clean this up
+ state.pendingcb++;
+ doWrite(stream, state, true, state.length, state.buffer, '', function(err) {
+ for (var i = 0; i < cbs.length; i++) {
+ state.pendingcb--;
+ cbs[i](err);
+ }
+ });
+
+ // Clear buffer
+ state.buffer = [];
+ } else {
+ // Slow case, write chunks one-by-one
+ for (var c = 0; c < state.buffer.length; c++) {
+ var entry = state.buffer[c];
+ var chunk = entry.chunk;
+ var encoding = entry.encoding;
+ var cb = entry.callback;
+ var len = state.objectMode ? 1 : chunk.length;
+
+ doWrite(stream, state, false, len, chunk, encoding, cb);
+
+ // if we didn't call the onwrite immediately, then
+ // it means that we need to wait until it does.
+ // also, that means that the chunk and cb are currently
+ // being processed, so move the buffer counter past them.
+ if (state.writing) {
+ c++;
+ break;
+ }
+ }
+
+ if (c < state.buffer.length)
+ state.buffer = state.buffer.slice(c);
+ else
+ state.buffer.length = 0;
+ }
+
+ state.bufferProcessing = false;
+}
+
+Writable.prototype._write = function(chunk, encoding, cb) {
+ cb(new Error('not implemented'));
+
+};
+
+Writable.prototype._writev = null;
+
+Writable.prototype.end = function(chunk, encoding, cb) {
+ var state = this._writableState;
+
+ if (util.isFunction(chunk)) {
+ cb = chunk;
+ chunk = null;
+ encoding = null;
+ } else if (util.isFunction(encoding)) {
+ cb = encoding;
+ encoding = null;
+ }
+
+ if (!util.isNullOrUndefined(chunk))
+ this.write(chunk, encoding);
+
+ // .end() fully uncorks
+ if (state.corked) {
+ state.corked = 1;
+ this.uncork();
+ }
+
+ // ignore unnecessary end() calls.
+ if (!state.ending && !state.finished)
+ endWritable(this, state, cb);
+};
+
+
+function needFinish(stream, state) {
+ return (state.ending &&
+ state.length === 0 &&
+ !state.finished &&
+ !state.writing);
+}
+
+function prefinish(stream, state) {
+ if (!state.prefinished) {
+ state.prefinished = true;
+ stream.emit('prefinish');
+ }
+}
+
+function finishMaybe(stream, state) {
+ var need = needFinish(stream, state);
+ if (need) {
+ if (state.pendingcb === 0) {
+ prefinish(stream, state);
+ state.finished = true;
+ stream.emit('finish');
+ } else
+ prefinish(stream, state);
+ }
+ return need;
+}
+
+function endWritable(stream, state, cb) {
+ state.ending = true;
+ finishMaybe(stream, state);
+ if (cb) {
+ if (state.finished)
+ process.nextTick(cb);
+ else
+ stream.once('finish', cb);
+ }
+ state.ended = true;
+}
+
+}).call(this,require('_process'))
+},{"./_stream_duplex":11,"_process":9,"buffer":2,"core-util-is":16,"inherits":7,"stream":21}],16:[function(require,module,exports){
+(function (Buffer){
+// Copyright Joyent, Inc. and other Node contributors.
+//
+// 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.
+
+// NOTE: These type checking functions intentionally don't use `instanceof`
+// because it is fragile and can be easily faked with `Object.create()`.
+function isArray(ar) {
+ return Array.isArray(ar);
+}
+exports.isArray = isArray;
+
+function isBoolean(arg) {
+ return typeof arg === 'boolean';
+}
+exports.isBoolean = isBoolean;
+
+function isNull(arg) {
+ return arg === null;
+}
+exports.isNull = isNull;
+
+function isNullOrUndefined(arg) {
+ return arg == null;
+}
+exports.isNullOrUndefined = isNullOrUndefined;
+
+function isNumber(arg) {
+ return typeof arg === 'number';
+}
+exports.isNumber = isNumber;
+
+function isString(arg) {
+ return typeof arg === 'string';
+}
+exports.isString = isString;
+
+function isSymbol(arg) {
+ return typeof arg === 'symbol';
+}
+exports.isSymbol = isSymbol;
+
+function isUndefined(arg) {
+ return arg === void 0;
+}
+exports.isUndefined = isUndefined;
+
+function isRegExp(re) {
+ return isObject(re) && objectToString(re) === '[object RegExp]';
+}
+exports.isRegExp = isRegExp;
+
+function isObject(arg) {
+ return typeof arg === 'object' && arg !== null;
+}
+exports.isObject = isObject;
+
+function isDate(d) {
+ return isObject(d) && objectToString(d) === '[object Date]';
+}
+exports.isDate = isDate;
+
+function isError(e) {
+ return isObject(e) &&
+ (objectToString(e) === '[object Error]' || e instanceof Error);
+}
+exports.isError = isError;
+
+function isFunction(arg) {
+ return typeof arg === 'function';
+}
+exports.isFunction = isFunction;
+
+function isPrimitive(arg) {
+ return arg === null ||
+ typeof arg === 'boolean' ||
+ typeof arg === 'number' ||
+ typeof arg === 'string' ||
+ typeof arg === 'symbol' || // ES6 symbol
+ typeof arg === 'undefined';
+}
+exports.isPrimitive = isPrimitive;
+
+function isBuffer(arg) {
+ return Buffer.isBuffer(arg);
+}
+exports.isBuffer = isBuffer;
+
+function objectToString(o) {
+ return Object.prototype.toString.call(o);
+}
+}).call(this,require("buffer").Buffer)
+},{"buffer":2}],17:[function(require,module,exports){
+module.exports = require("./lib/_stream_passthrough.js")
+
+},{"./lib/_stream_passthrough.js":12}],18:[function(require,module,exports){
+exports = module.exports = require('./lib/_stream_readable.js');
+exports.Stream = require('stream');
+exports.Readable = exports;
+exports.Writable = require('./lib/_stream_writable.js');
+exports.Duplex = require('./lib/_stream_duplex.js');
+exports.Transform = require('./lib/_stream_transform.js');
+exports.PassThrough = require('./lib/_stream_passthrough.js');
+
+},{"./lib/_stream_duplex.js":11,"./lib/_stream_passthrough.js":12,"./lib/_stream_readable.js":13,"./lib/_stream_transform.js":14,"./lib/_stream_writable.js":15,"stream":21}],19:[function(require,module,exports){
+module.exports = require("./lib/_stream_transform.js")
+
+},{"./lib/_stream_transform.js":14}],20:[function(require,module,exports){
+module.exports = require("./lib/_stream_writable.js")
+
+},{"./lib/_stream_writable.js":15}],21:[function(require,module,exports){
+// Copyright Joyent, Inc. and other Node contributors.
+//
+// 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.
+
+module.exports = Stream;
+
+var EE = require('events').EventEmitter;
+var inherits = require('inherits');
+
+inherits(Stream, EE);
+Stream.Readable = require('readable-stream/readable.js');
+Stream.Writable = require('readable-stream/writable.js');
+Stream.Duplex = require('readable-stream/duplex.js');
+Stream.Transform = require('readable-stream/transform.js');
+Stream.PassThrough = require('readable-stream/passthrough.js');
+
+// Backwards-compat with node 0.4.x
+Stream.Stream = Stream;
+
+
+
+// old-style streams. Note that the pipe method (the only relevant
+// part of this class) is overridden in the Readable class.
+
+function Stream() {
+ EE.call(this);
+}
+
+Stream.prototype.pipe = function(dest, options) {
+ var source = this;
+
+ function ondata(chunk) {
+ if (dest.writable) {
+ if (false === dest.write(chunk) && source.pause) {
+ source.pause();
+ }
+ }
+ }
+
+ source.on('data', ondata);
+
+ function ondrain() {
+ if (source.readable && source.resume) {
+ source.resume();
+ }
+ }
+
+ dest.on('drain', ondrain);
+
+ // If the 'end' option is not supplied, dest.end() will be called when
+ // source gets the 'end' or 'close' events. Only dest.end() once.
+ if (!dest._isStdio && (!options || options.end !== false)) {
+ source.on('end', onend);
+ source.on('close', onclose);
+ }
+
+ var didOnEnd = false;
+ function onend() {
+ if (didOnEnd) return;
+ didOnEnd = true;
+
+ dest.end();
+ }
+
+
+ function onclose() {
+ if (didOnEnd) return;
+ didOnEnd = true;
+
+ if (typeof dest.destroy === 'function') dest.destroy();
+ }
+
+ // don't leave dangling pipes when there are errors.
+ function onerror(er) {
+ cleanup();
+ if (EE.listenerCount(this, 'error') === 0) {
+ throw er; // Unhandled stream error in pipe.
+ }
+ }
+
+ source.on('error', onerror);
+ dest.on('error', onerror);
+
+ // remove all the event listeners that were added.
+ function cleanup() {
+ source.removeListener('data', ondata);
+ dest.removeListener('drain', ondrain);
+
+ source.removeListener('end', onend);
+ source.removeListener('close', onclose);
+
+ source.removeListener('error', onerror);
+ dest.removeListener('error', onerror);
+
+ source.removeListener('end', cleanup);
+ source.removeListener('close', cleanup);
+
+ dest.removeListener('close', cleanup);
+ }
+
+ source.on('end', cleanup);
+ source.on('close', cleanup);
+
+ dest.on('close', cleanup);
+
+ dest.emit('pipe', source);
+
+ // Allow for unix-like usage: A.pipe(B).pipe(C)
+ return dest;
+};
+
+},{"events":6,"inherits":7,"readable-stream/duplex.js":10,"readable-stream/passthrough.js":17,"readable-stream/readable.js":18,"readable-stream/transform.js":19,"readable-stream/writable.js":20}],22:[function(require,module,exports){
+// Copyright Joyent, Inc. and other Node contributors.
+//
+// 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.
+
+var Buffer = require('buffer').Buffer;
+
+var isBufferEncoding = Buffer.isEncoding
+ || function(encoding) {
+ switch (encoding && encoding.toLowerCase()) {
+ case 'hex': case 'utf8': case 'utf-8': case 'ascii': case 'binary': case 'base64': case 'ucs2': case 'ucs-2': case 'utf16le': case 'utf-16le': case 'raw': return true;
+ default: return false;
+ }
+ }
+
+
+function assertEncoding(encoding) {
+ if (encoding && !isBufferEncoding(encoding)) {
+ throw new Error('Unknown encoding: ' + encoding);
+ }
+}
+
+// StringDecoder provides an interface for efficiently splitting a series of
+// buffers into a series of JS strings without breaking apart multi-byte
+// characters. CESU-8 is handled as part of the UTF-8 encoding.
+//
+// @TODO Handling all encodings inside a single object makes it very difficult
+// to reason about this code, so it should be split up in the future.
+// @TODO There should be a utf8-strict encoding that rejects invalid UTF-8 code
+// points as used by CESU-8.
+var StringDecoder = exports.StringDecoder = function(encoding) {
+ this.encoding = (encoding || 'utf8').toLowerCase().replace(/[-_]/, '');
+ assertEncoding(encoding);
+ switch (this.encoding) {
+ case 'utf8':
+ // CESU-8 represents each of Surrogate Pair by 3-bytes
+ this.surrogateSize = 3;
+ break;
+ case 'ucs2':
+ case 'utf16le':
+ // UTF-16 represents each of Surrogate Pair by 2-bytes
+ this.surrogateSize = 2;
+ this.detectIncompleteChar = utf16DetectIncompleteChar;
+ break;
+ case 'base64':
+ // Base-64 stores 3 bytes in 4 chars, and pads the remainder.
+ this.surrogateSize = 3;
+ this.detectIncompleteChar = base64DetectIncompleteChar;
+ break;
+ default:
+ this.write = passThroughWrite;
+ return;
+ }
+
+ // Enough space to store all bytes of a single character. UTF-8 needs 4
+ // bytes, but CESU-8 may require up to 6 (3 bytes per surrogate).
+ this.charBuffer = new Buffer(6);
+ // Number of bytes received for the current incomplete multi-byte character.
+ this.charReceived = 0;
+ // Number of bytes expected for the current incomplete multi-byte character.
+ this.charLength = 0;
+};
+
+
+// write decodes the given buffer and returns it as JS string that is
+// guaranteed to not contain any partial multi-byte characters. Any partial
+// character found at the end of the buffer is buffered up, and will be
+// returned when calling write again with the remaining bytes.
+//
+// Note: Converting a Buffer containing an orphan surrogate to a String
+// currently works, but converting a String to a Buffer (via `new Buffer`, or
+// Buffer#write) will replace incomplete surrogates with the unicode
+// replacement character. See https://codereview.chromium.org/121173009/ .
+StringDecoder.prototype.write = function(buffer) {
+ var charStr = '';
+ // if our last write ended with an incomplete multibyte character
+ while (this.charLength) {
+ // determine how many remaining bytes this buffer has to offer for this char
+ var available = (buffer.length >= this.charLength - this.charReceived) ?
+ this.charLength - this.charReceived :
+ buffer.length;
+
+ // add the new bytes to the char buffer
+ buffer.copy(this.charBuffer, this.charReceived, 0, available);
+ this.charReceived += available;
+
+ if (this.charReceived < this.charLength) {
+ // still not enough chars in this buffer? wait for more ...
+ return '';
+ }
+
+ // remove bytes belonging to the current character from the buffer
+ buffer = buffer.slice(available, buffer.length);
+
+ // get the character that was split
+ charStr = this.charBuffer.slice(0, this.charLength).toString(this.encoding);
+
+ // CESU-8: lead surrogate (D800-DBFF) is also the incomplete character
+ var charCode = charStr.charCodeAt(charStr.length - 1);
+ if (charCode >= 0xD800 && charCode <= 0xDBFF) {
+ this.charLength += this.surrogateSize;
+ charStr = '';
+ continue;
+ }
+ this.charReceived = this.charLength = 0;
+
+ // if there are no more bytes in this buffer, just emit our char
+ if (buffer.length === 0) {
+ return charStr;
+ }
+ break;
+ }
+
+ // determine and set charLength / charReceived
+ this.detectIncompleteChar(buffer);
+
+ var end = buffer.length;
+ if (this.charLength) {
+ // buffer the incomplete character bytes we got
+ buffer.copy(this.charBuffer, 0, buffer.length - this.charReceived, end);
+ end -= this.charReceived;
+ }
+
+ charStr += buffer.toString(this.encoding, 0, end);
+
+ var end = charStr.length - 1;
+ var charCode = charStr.charCodeAt(end);
+ // CESU-8: lead surrogate (D800-DBFF) is also the incomplete character
+ if (charCode >= 0xD800 && charCode <= 0xDBFF) {
+ var size = this.surrogateSize;
+ this.charLength += size;
+ this.charReceived += size;
+ this.charBuffer.copy(this.charBuffer, size, 0, size);
+ buffer.copy(this.charBuffer, 0, 0, size);
+ return charStr.substring(0, end);
+ }
+
+ // or just emit the charStr
+ return charStr;
+};
+
+// detectIncompleteChar determines if there is an incomplete UTF-8 character at
+// the end of the given buffer. If so, it sets this.charLength to the byte
+// length that character, and sets this.charReceived to the number of bytes
+// that are available for this character.
+StringDecoder.prototype.detectIncompleteChar = function(buffer) {
+ // determine how many bytes we have to check at the end of this buffer
+ var i = (buffer.length >= 3) ? 3 : buffer.length;
+
+ // Figure out if one of the last i bytes of our buffer announces an
+ // incomplete char.
+ for (; i > 0; i--) {
+ var c = buffer[buffer.length - i];
+
+ // See http://en.wikipedia.org/wiki/UTF-8#Description
+
+ // 110XXXXX
+ if (i == 1 && c >> 5 == 0x06) {
+ this.charLength = 2;
+ break;
+ }
+
+ // 1110XXXX
+ if (i <= 2 && c >> 4 == 0x0E) {
+ this.charLength = 3;
+ break;
+ }
+
+ // 11110XXX
+ if (i <= 3 && c >> 3 == 0x1E) {
+ this.charLength = 4;
+ break;
+ }
+ }
+ this.charReceived = i;
+};
+
+StringDecoder.prototype.end = function(buffer) {
+ var res = '';
+ if (buffer && buffer.length)
+ res = this.write(buffer);
+
+ if (this.charReceived) {
+ var cr = this.charReceived;
+ var buf = this.charBuffer;
+ var enc = this.encoding;
+ res += buf.slice(0, cr).toString(enc);
+ }
+
+ return res;
+};
+
+function passThroughWrite(buffer) {
+ return buffer.toString(this.encoding);
+}
+
+function utf16DetectIncompleteChar(buffer) {
+ this.charReceived = buffer.length % 2;
+ this.charLength = this.charReceived ? 2 : 0;
+}
+
+function base64DetectIncompleteChar(buffer) {
+ this.charReceived = buffer.length % 3;
+ this.charLength = this.charReceived ? 3 : 0;
+}
+
+},{"buffer":2}],23:[function(require,module,exports){
+module.exports = function isBuffer(arg) {
+ return arg && typeof arg === 'object'
+ && typeof arg.copy === 'function'
+ && typeof arg.fill === 'function'
+ && typeof arg.readUInt8 === 'function';
+}
+},{}],24:[function(require,module,exports){
+(function (process,global){
+// Copyright Joyent, Inc. and other Node contributors.
+//
+// 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.
+
+var formatRegExp = /%[sdj%]/g;
+exports.format = function(f) {
+ if (!isString(f)) {
+ var objects = [];
+ for (var i = 0; i < arguments.length; i++) {
+ objects.push(inspect(arguments[i]));
+ }
+ return objects.join(' ');
+ }
+
+ var i = 1;
+ var args = arguments;
+ var len = args.length;
+ var str = String(f).replace(formatRegExp, function(x) {
+ if (x === '%%') return '%';
+ if (i >= len) return x;
+ switch (x) {
+ case '%s': return String(args[i++]);
+ case '%d': return Number(args[i++]);
+ case '%j':
+ try {
+ return JSON.stringify(args[i++]);
+ } catch (_) {
+ return '[Circular]';
+ }
+ default:
+ return x;
+ }
+ });
+ for (var x = args[i]; i < len; x = args[++i]) {
+ if (isNull(x) || !isObject(x)) {
+ str += ' ' + x;
+ } else {
+ str += ' ' + inspect(x);
+ }
+ }
+ return str;
+};
+
+
+// Mark that a method should not be used.
+// Returns a modified function which warns once by default.
+// If --no-deprecation is set, then it is a no-op.
+exports.deprecate = function(fn, msg) {
+ // Allow for deprecating things in the process of starting up.
+ if (isUndefined(global.process)) {
+ return function() {
+ return exports.deprecate(fn, msg).apply(this, arguments);
+ };
+ }
+
+ if (process.noDeprecation === true) {
+ return fn;
+ }
+
+ var warned = false;
+ function deprecated() {
+ if (!warned) {
+ if (process.throwDeprecation) {
+ throw new Error(msg);
+ } else if (process.traceDeprecation) {
+ console.trace(msg);
+ } else {
+ console.error(msg);
+ }
+ warned = true;
+ }
+ return fn.apply(this, arguments);
+ }
+
+ return deprecated;
+};
+
+
+var debugs = {};
+var debugEnviron;
+exports.debuglog = function(set) {
+ if (isUndefined(debugEnviron))
+ debugEnviron = process.env.NODE_DEBUG || '';
+ set = set.toUpperCase();
+ if (!debugs[set]) {
+ if (new RegExp('\\b' + set + '\\b', 'i').test(debugEnviron)) {
+ var pid = process.pid;
+ debugs[set] = function() {
+ var msg = exports.format.apply(exports, arguments);
+ console.error('%s %d: %s', set, pid, msg);
+ };
+ } else {
+ debugs[set] = function() {};
+ }
+ }
+ return debugs[set];
+};
+
+
+/**
+ * Echos the value of a value. Trys to print the value out
+ * in the best way possible given the different types.
+ *
+ * @param {Object} obj The object to print out.
+ * @param {Object} opts Optional options object that alters the output.
+ */
+/* legacy: obj, showHidden, depth, colors*/
+function inspect(obj, opts) {
+ // default options
+ var ctx = {
+ seen: [],
+ stylize: stylizeNoColor
+ };
+ // legacy...
+ if (arguments.length >= 3) ctx.depth = arguments[2];
+ if (arguments.length >= 4) ctx.colors = arguments[3];
+ if (isBoolean(opts)) {
+ // legacy...
+ ctx.showHidden = opts;
+ } else if (opts) {
+ // got an "options" object
+ exports._extend(ctx, opts);
+ }
+ // set default options
+ if (isUndefined(ctx.showHidden)) ctx.showHidden = false;
+ if (isUndefined(ctx.depth)) ctx.depth = 2;
+ if (isUndefined(ctx.colors)) ctx.colors = false;
+ if (isUndefined(ctx.customInspect)) ctx.customInspect = true;
+ if (ctx.colors) ctx.stylize = stylizeWithColor;
+ return formatValue(ctx, obj, ctx.depth);
+}
+exports.inspect = inspect;
+
+
+// http://en.wikipedia.org/wiki/ANSI_escape_code#graphics
+inspect.colors = {
+ 'bold' : [1, 22],
+ 'italic' : [3, 23],
+ 'underline' : [4, 24],
+ 'inverse' : [7, 27],
+ 'white' : [37, 39],
+ 'grey' : [90, 39],
+ 'black' : [30, 39],
+ 'blue' : [34, 39],
+ 'cyan' : [36, 39],
+ 'green' : [32, 39],
+ 'magenta' : [35, 39],
+ 'red' : [31, 39],
+ 'yellow' : [33, 39]
+};
+
+// Don't use 'blue' not visible on cmd.exe
+inspect.styles = {
+ 'special': 'cyan',
+ 'number': 'yellow',
+ 'boolean': 'yellow',
+ 'undefined': 'grey',
+ 'null': 'bold',
+ 'string': 'green',
+ 'date': 'magenta',
+ // "name": intentionally not styling
+ 'regexp': 'red'
+};
+
+
+function stylizeWithColor(str, styleType) {
+ var style = inspect.styles[styleType];
+
+ if (style) {
+ return '\u001b[' + inspect.colors[style][0] + 'm' + str +
+ '\u001b[' + inspect.colors[style][1] + 'm';
+ } else {
+ return str;
+ }
+}
+
+
+function stylizeNoColor(str, styleType) {
+ return str;
+}
+
+
+function arrayToHash(array) {
+ var hash = {};
+
+ array.forEach(function(val, idx) {
+ hash[val] = true;
+ });
+
+ return hash;
+}
+
+
+function formatValue(ctx, value, recurseTimes) {
+ // Provide a hook for user-specified inspect functions.
+ // Check that value is an object with an inspect function on it
+ if (ctx.customInspect &&
+ value &&
+ isFunction(value.inspect) &&
+ // Filter out the util module, it's inspect function is special
+ value.inspect !== exports.inspect &&
+ // Also filter out any prototype objects using the circular check.
+ !(value.constructor && value.constructor.prototype === value)) {
+ var ret = value.inspect(recurseTimes, ctx);
+ if (!isString(ret)) {
+ ret = formatValue(ctx, ret, recurseTimes);
+ }
+ return ret;
+ }
+
+ // Primitive types cannot have properties
+ var primitive = formatPrimitive(ctx, value);
+ if (primitive) {
+ return primitive;
+ }
+
+ // Look up the keys of the object.
+ var keys = Object.keys(value);
+ var visibleKeys = arrayToHash(keys);
+
+ if (ctx.showHidden) {
+ keys = Object.getOwnPropertyNames(value);
+ }
+
+ // IE doesn't make error fields non-enumerable
+ // http://msdn.microsoft.com/en-us/library/ie/dww52sbt(v=vs.94).aspx
+ if (isError(value)
+ && (keys.indexOf('message') >= 0 || keys.indexOf('description') >= 0)) {
+ return formatError(value);
+ }
+
+ // Some type of object without properties can be shortcutted.
+ if (keys.length === 0) {
+ if (isFunction(value)) {
+ var name = value.name ? ': ' + value.name : '';
+ return ctx.stylize('[Function' + name + ']', 'special');
+ }
+ if (isRegExp(value)) {
+ return ctx.stylize(RegExp.prototype.toString.call(value), 'regexp');
+ }
+ if (isDate(value)) {
+ return ctx.stylize(Date.prototype.toString.call(value), 'date');
+ }
+ if (isError(value)) {
+ return formatError(value);
+ }
+ }
+
+ var base = '', array = false, braces = ['{', '}'];
+
+ // Make Array say that they are Array
+ if (isArray(value)) {
+ array = true;
+ braces = ['[', ']'];
+ }
+
+ // Make functions say that they are functions
+ if (isFunction(value)) {
+ var n = value.name ? ': ' + value.name : '';
+ base = ' [Function' + n + ']';
+ }
+
+ // Make RegExps say that they are RegExps
+ if (isRegExp(value)) {
+ base = ' ' + RegExp.prototype.toString.call(value);
+ }
+
+ // Make dates with properties first say the date
+ if (isDate(value)) {
+ base = ' ' + Date.prototype.toUTCString.call(value);
+ }
+
+ // Make error with message first say the error
+ if (isError(value)) {
+ base = ' ' + formatError(value);
+ }
+
+ if (keys.length === 0 && (!array || value.length == 0)) {
+ return braces[0] + base + braces[1];
+ }
+
+ if (recurseTimes < 0) {
+ if (isRegExp(value)) {
+ return ctx.stylize(RegExp.prototype.toString.call(value), 'regexp');
+ } else {
+ return ctx.stylize('[Object]', 'special');
+ }
+ }
+
+ ctx.seen.push(value);
+
+ var output;
+ if (array) {
+ output = formatArray(ctx, value, recurseTimes, visibleKeys, keys);
+ } else {
+ output = keys.map(function(key) {
+ return formatProperty(ctx, value, recurseTimes, visibleKeys, key, array);
+ });
+ }
+
+ ctx.seen.pop();
+
+ return reduceToSingleString(output, base, braces);
+}
+
+
+function formatPrimitive(ctx, value) {
+ if (isUndefined(value))
+ return ctx.stylize('undefined', 'undefined');
+ if (isString(value)) {
+ var simple = '\'' + JSON.stringify(value).replace(/^"|"$/g, '')
+ .replace(/'/g, "\\'")
+ .replace(/\\"/g, '"') + '\'';
+ return ctx.stylize(simple, 'string');
+ }
+ if (isNumber(value))
+ return ctx.stylize('' + value, 'number');
+ if (isBoolean(value))
+ return ctx.stylize('' + value, 'boolean');
+ // For some reason typeof null is "object", so special case here.
+ if (isNull(value))
+ return ctx.stylize('null', 'null');
+}
+
+
+function formatError(value) {
+ return '[' + Error.prototype.toString.call(value) + ']';
+}
+
+
+function formatArray(ctx, value, recurseTimes, visibleKeys, keys) {
+ var output = [];
+ for (var i = 0, l = value.length; i < l; ++i) {
+ if (hasOwnProperty(value, String(i))) {
+ output.push(formatProperty(ctx, value, recurseTimes, visibleKeys,
+ String(i), true));
+ } else {
+ output.push('');
+ }
+ }
+ keys.forEach(function(key) {
+ if (!key.match(/^\d+$/)) {
+ output.push(formatProperty(ctx, value, recurseTimes, visibleKeys,
+ key, true));
+ }
+ });
+ return output;
+}
+
+
+function formatProperty(ctx, value, recurseTimes, visibleKeys, key, array) {
+ var name, str, desc;
+ desc = Object.getOwnPropertyDescriptor(value, key) || { value: value[key] };
+ if (desc.get) {
+ if (desc.set) {
+ str = ctx.stylize('[Getter/Setter]', 'special');
+ } else {
+ str = ctx.stylize('[Getter]', 'special');
+ }
+ } else {
+ if (desc.set) {
+ str = ctx.stylize('[Setter]', 'special');
+ }
+ }
+ if (!hasOwnProperty(visibleKeys, key)) {
+ name = '[' + key + ']';
+ }
+ if (!str) {
+ if (ctx.seen.indexOf(desc.value) < 0) {
+ if (isNull(recurseTimes)) {
+ str = formatValue(ctx, desc.value, null);
+ } else {
+ str = formatValue(ctx, desc.value, recurseTimes - 1);
+ }
+ if (str.indexOf('\n') > -1) {
+ if (array) {
+ str = str.split('\n').map(function(line) {
+ return ' ' + line;
+ }).join('\n').substr(2);
+ } else {
+ str = '\n' + str.split('\n').map(function(line) {
+ return ' ' + line;
+ }).join('\n');
+ }
+ }
+ } else {
+ str = ctx.stylize('[Circular]', 'special');
+ }
+ }
+ if (isUndefined(name)) {
+ if (array && key.match(/^\d+$/)) {
+ return str;
+ }
+ name = JSON.stringify('' + key);
+ if (name.match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)) {
+ name = name.substr(1, name.length - 2);
+ name = ctx.stylize(name, 'name');
+ } else {
+ name = name.replace(/'/g, "\\'")
+ .replace(/\\"/g, '"')
+ .replace(/(^"|"$)/g, "'");
+ name = ctx.stylize(name, 'string');
+ }
+ }
+
+ return name + ': ' + str;
+}
+
+
+function reduceToSingleString(output, base, braces) {
+ var numLinesEst = 0;
+ var length = output.reduce(function(prev, cur) {
+ numLinesEst++;
+ if (cur.indexOf('\n') >= 0) numLinesEst++;
+ return prev + cur.replace(/\u001b\[\d\d?m/g, '').length + 1;
+ }, 0);
+
+ if (length > 60) {
+ return braces[0] +
+ (base === '' ? '' : base + '\n ') +
+ ' ' +
+ output.join(',\n ') +
+ ' ' +
+ braces[1];
+ }
+
+ return braces[0] + base + ' ' + output.join(', ') + ' ' + braces[1];
+}
+
+
+// NOTE: These type checking functions intentionally don't use `instanceof`
+// because it is fragile and can be easily faked with `Object.create()`.
+function isArray(ar) {
+ return Array.isArray(ar);
+}
+exports.isArray = isArray;
+
+function isBoolean(arg) {
+ return typeof arg === 'boolean';
+}
+exports.isBoolean = isBoolean;
+
+function isNull(arg) {
+ return arg === null;
+}
+exports.isNull = isNull;
+
+function isNullOrUndefined(arg) {
+ return arg == null;
+}
+exports.isNullOrUndefined = isNullOrUndefined;
+
+function isNumber(arg) {
+ return typeof arg === 'number';
+}
+exports.isNumber = isNumber;
+
+function isString(arg) {
+ return typeof arg === 'string';
+}
+exports.isString = isString;
+
+function isSymbol(arg) {
+ return typeof arg === 'symbol';
+}
+exports.isSymbol = isSymbol;
+
+function isUndefined(arg) {
+ return arg === void 0;
+}
+exports.isUndefined = isUndefined;
+
+function isRegExp(re) {
+ return isObject(re) && objectToString(re) === '[object RegExp]';
+}
+exports.isRegExp = isRegExp;
+
+function isObject(arg) {
+ return typeof arg === 'object' && arg !== null;
+}
+exports.isObject = isObject;
+
+function isDate(d) {
+ return isObject(d) && objectToString(d) === '[object Date]';
+}
+exports.isDate = isDate;
+
+function isError(e) {
+ return isObject(e) &&
+ (objectToString(e) === '[object Error]' || e instanceof Error);
+}
+exports.isError = isError;
+
+function isFunction(arg) {
+ return typeof arg === 'function';
+}
+exports.isFunction = isFunction;
+
+function isPrimitive(arg) {
+ return arg === null ||
+ typeof arg === 'boolean' ||
+ typeof arg === 'number' ||
+ typeof arg === 'string' ||
+ typeof arg === 'symbol' || // ES6 symbol
+ typeof arg === 'undefined';
+}
+exports.isPrimitive = isPrimitive;
+
+exports.isBuffer = require('./support/isBuffer');
+
+function objectToString(o) {
+ return Object.prototype.toString.call(o);
+}
+
+
+function pad(n) {
+ return n < 10 ? '0' + n.toString(10) : n.toString(10);
+}
+
+
+var months = ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep',
+ 'Oct', 'Nov', 'Dec'];
+
+// 26 Feb 16:19:34
+function timestamp() {
+ var d = new Date();
+ var time = [pad(d.getHours()),
+ pad(d.getMinutes()),
+ pad(d.getSeconds())].join(':');
+ return [d.getDate(), months[d.getMonth()], time].join(' ');
+}
+
+
+// log is just a thin wrapper to console.log that prepends a timestamp
+exports.log = function() {
+ console.log('%s - %s', timestamp(), exports.format.apply(exports, arguments));
+};
+
+
+/**
+ * Inherit the prototype methods from one constructor into another.
+ *
+ * The Function.prototype.inherits from lang.js rewritten as a standalone
+ * function (not on Function.prototype). NOTE: If this file is to be loaded
+ * during bootstrapping this function needs to be rewritten using some native
+ * functions as prototype setup using normal JavaScript does not work as
+ * expected during bootstrapping (see mirror.js in r114903).
+ *
+ * @param {function} ctor Constructor function which needs to inherit the
+ * prototype.
+ * @param {function} superCtor Constructor function to inherit prototype from.
+ */
+exports.inherits = require('inherits');
+
+exports._extend = function(origin, add) {
+ // Don't do anything if add isn't an object
+ if (!add || !isObject(add)) return origin;
+
+ var keys = Object.keys(add);
+ var i = keys.length;
+ while (i--) {
+ origin[keys[i]] = add[keys[i]];
+ }
+ return origin;
+};
+
+function hasOwnProperty(obj, prop) {
+ return Object.prototype.hasOwnProperty.call(obj, prop);
+}
+
+}).call(this,require('_process'),typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {})
+},{"./support/isBuffer":23,"_process":9,"inherits":7}],25:[function(require,module,exports){
+var util = require('util');
+var intersect = require('intersect');
+var WildEmitter = require('wildemitter');
+var webrtc = require('webrtcsupport');
+
+var BaseSession = require('jingle-session');
+var MediaSession = require('jingle-media-session');
+var FileSession = require('jingle-filetransfer-session');
+
+
+function SessionManager(conf) {
+ WildEmitter.call(this);
+
+ conf = conf || {};
+
+ this.jid = conf.jid;
+ this.selfID = conf.selfID || (this.jid && this.jid.full) || this.jid || '';
+
+ this.sessions = {};
+ this.peers = {};
+
+ this.prepareSession = conf.prepareSession || function (opts) {
+ if (opts.descriptionTypes.indexOf('rtp') >= 0) {
+ return new MediaSession(opts);
+ }
+ if (opts.descriptionTypes.indexOf('filetransfer') >= 0) {
+ return new FileSession(opts);
+ }
+ };
+
+ this.performTieBreak = conf.performTieBreak || function (sess, req) {
+ var descriptionTypes = req.jingle.contents.map(function (content) {
+ if (content.description) {
+ return content.description.descType;
+ }
+ });
+
+ var matching = intersect(sess.pendingDescriptionTypes, descriptionTypes);
+
+ return matching.length > 0;
+ };
+
+ this.screenSharingSupport = webrtc.screenSharing;
+
+ this.capabilities = [
+ 'urn:xmpp:jingle:1'
+ ];
+ if (webrtc.support) {
+ this.capabilities = [
+ 'urn:xmpp:jingle:1',
+ 'urn:xmpp:jingle:apps:rtp:1',
+ 'urn:xmpp:jingle:apps:rtp:audio',
+ 'urn:xmpp:jingle:apps:rtp:video',
+ 'urn:xmpp:jingle:apps:rtp:rtcb-fb:0',
+ 'urn:xmpp:jingle:apps:rtp:rtp-hdrext:0',
+ 'urn:xmpp:jingle:apps:rtp:ssma:0',
+ 'urn:xmpp:jingle:apps:dtls:0',
+ 'urn:xmpp:jingle:apps:grouping:0',
+ 'urn:xmpp:jingle:apps:file-transfer:3',
+ 'urn:xmpp:jingle:transports:ice-udp:1',
+ 'urn:xmpp:jingle:transports.dtls-sctp:1',
+ 'urn:ietf:rfc:3264',
+ 'urn:ietf:rfc:5576',
+ 'urn:ietf:rfc:5888'
+ ];
+ }
+
+ this.config = {
+ debug: false,
+ peerConnectionConfig: {
+ iceServers: conf.iceServers || [{'url': 'stun:stun.l.google.com:19302'}]
+ },
+ peerConnectionConstraints: {
+ optional: [
+ {DtlsSrtpKeyAgreement: true},
+ {RtpDataChannels: false}
+ ]
+ },
+ media: {
+ audio: true,
+ video: true
+ }
+ };
+
+ for (var item in conf) {
+ this.config[item] = conf[item];
+ }
+
+ this.iceServers = this.config.peerConnectionConfig.iceServers;
+}
+
+
+util.inherits(SessionManager, WildEmitter);
+
+
+SessionManager.prototype.addICEServer = function (server) {
+ // server == {
+ // url: '',
+ // [username: '',]
+ // [credential: '']
+ // }
+ if (typeof server === 'string') {
+ server = {url: server};
+ }
+ this.iceServers.push(server);
+};
+
+SessionManager.prototype.addSession = function (session) {
+ var self = this;
+
+ var sid = session.sid;
+ var peer = session.peerID;
+
+ this.sessions[sid] = session;
+ if (!this.peers[peer]) {
+ this.peers[peer] = [];
+ }
+
+ this.peers[peer].push(session);
+
+ // Automatically clean up tracked sessions
+ session.on('terminated', function () {
+ var peers = self.peers[peer] || [];
+ if (peers.length) {
+ peers.splice(peers.indexOf(session), 1);
+ }
+ delete self.sessions[sid];
+ });
+
+ // Proxy session events
+ session.on('*', function (name, data, extraData, extraData2) {
+ // Listen for when we actually try to start a session to
+ // trigger the outgoing event.
+ if (name === 'send') {
+ var action = data.jingle && data.jingle.action;
+ if (session.isInitiator && action === 'session-initiate') {
+ self.emit('outgoing', session);
+ }
+ }
+
+ if (self.config.debug && (name === 'log:debug' || name === 'log:error')) {
+ console.log('Jingle:', data, extraData, extraData2);
+ }
+
+ // Don't proxy change:* events, since those don't apply to
+ // the session manager itself.
+ if (name.indexOf('change') === 0) {
+ return;
+ }
+
+ self.emit(name, data, extraData, extraData2);
+ });
+
+ this.emit('createdSession', session);
+
+ return session;
+};
+
+SessionManager.prototype.createMediaSession = function (peer, sid, stream) {
+ var session = new MediaSession({
+ sid: sid,
+ peer: peer,
+ initiator: true,
+ stream: stream,
+ parent: this,
+ iceServers: this.iceServers,
+ constraints: this.config.peerConnectionConstraints
+ });
+
+ this.addSession(session);
+
+ return session;
+};
+
+SessionManager.prototype.createFileTransferSession = function (peer, sid) {
+ var session = new FileSession({
+ sid: sid,
+ peer: peer,
+ initiator: true,
+ parent: this
+ });
+
+ this.addSession(session);
+
+ return session;
+};
+
+SessionManager.prototype.endPeerSessions = function (peer, reason, silent) {
+ peer = peer.full || peer;
+
+ var sessions = this.peers[peer] || [];
+ delete this.peers[peer];
+
+ sessions.forEach(function (session) {
+ session.end(reason || 'gone', silent);
+ });
+};
+
+SessionManager.prototype.endAllSessions = function (reason, silent) {
+ var self = this;
+ Object.keys(this.peers).forEach(function (peer) {
+ self.endPeerSessions(peer, reason, silent);
+ });
+};
+
+SessionManager.prototype._createIncomingSession = function (meta, req) {
+ var session;
+
+ if (this.prepareSession) {
+ session = this.prepareSession(meta, req);
+ }
+
+ // Fallback to a generic session type, which can
+ // only be used to end the session.
+
+ if (!session) {
+ session = new BaseSession(meta);
+ }
+
+ this.addSession(session);
+
+ return session;
+};
+
+SessionManager.prototype._sendError = function (to, id, data) {
+ if (!data.type) {
+ data.type = 'cancel';
+ }
+ this.emit('send', {
+ to: to,
+ id: id,
+ type: 'error',
+ error: data
+ });
+};
+
+SessionManager.prototype._log = function (level, message) {
+ this.emit('log:' + level, message);
+};
+
+SessionManager.prototype.process = function (req) {
+ var self = this;
+
+ // Extract the request metadata that we need to verify
+ var sid = !!req.jingle ? req.jingle.sid : null;
+ var session = this.sessions[sid] || null;
+ var rid = req.id;
+ var sender = req.from.full || req.from;
+
+
+ if (req.type === 'error') {
+ var isTieBreak = req.error && req.error.jingleCondition === 'tie-break';
+ if (session && session.pending && isTieBreak) {
+ return session.end('alternative-session', true);
+ } else {
+ if (session) {
+ session.pendingAction = false;
+ }
+ return this.emit('error', req);
+ }
+ }
+
+ if (req.type === 'result') {
+ if (session) {
+ session.pendingAction = false;
+ }
+ return;
+ }
+
+ var action = req.jingle.action;
+ var contents = req.jingle.contents || [];
+
+ var descriptionTypes = contents.map(function (content) {
+ if (content.description) {
+ return content.description.descType;
+ }
+ });
+ var transportTypes = contents.map(function (content) {
+ if (content.transport) {
+ return content.transport.transType;
+ }
+ });
+
+
+ // Now verify that we are allowed to actually process the
+ // requested action
+
+ if (action !== 'session-initiate') {
+ // Can't modify a session that we don't have.
+ if (!session) {
+ this._log('error', 'Unknown session', sid);
+ return this._sendError(sender, rid, {
+ condition: 'item-not-found',
+ jingleCondition: 'unknown-session'
+ });
+ }
+
+ // Check if someone is trying to hijack a session.
+ if (session.peerID !== sender || session.ended) {
+ this._log('error', 'Session has ended, or action has wrong sender');
+ return this._sendError(sender, rid, {
+ condition: 'item-not-found',
+ jingleCondition: 'unknown-session'
+ });
+ }
+
+ // Can't accept a session twice
+ if (action === 'session-accept' && !session.pending) {
+ this._log('error', 'Tried to accept session twice', sid);
+ return this._sendError(sender, rid, {
+ condition: 'unexpected-request',
+ jingleCondition: 'out-of-order'
+ });
+ }
+
+ // Can't process two requests at once, need to tie break
+ if (action !== 'session-terminate' && action === session.pendingAction) {
+ this._log('error', 'Tie break during pending request');
+ if (session.isInitiator) {
+ return this._sendError(sender, rid, {
+ condition: 'conflict',
+ jingleCondition: 'tie-break'
+ });
+ }
+ }
+ } else if (session) {
+ // Don't accept a new session if we already have one.
+ if (session.peerID !== sender) {
+ this._log('error', 'Duplicate sid from new sender');
+ return this._sendError(sender, rid, {
+ condition: 'service-unavailable'
+ });
+ }
+
+ // Check if we need to have a tie breaker because both parties
+ // happened to pick the same random sid.
+ if (session.pending) {
+ if (this.selfID > session.peerID && this.performTieBreak(session, req)) {
+ this._log('error', 'Tie break new session because of duplicate sids');
+ return this._sendError(sender, rid, {
+ condition: 'conflict',
+ jingleCondition: 'tie-break'
+ });
+ }
+ } else {
+ // The other side is just doing it wrong.
+ this._log('error', 'Someone is doing this wrong');
+ return this._sendError(sender, rid, {
+ condition: 'unexpected-request',
+ jingleCondition: 'out-of-order'
+ });
+ }
+ } else if (this.peers[sender] && this.peers[sender].length) {
+ // Check if we need to have a tie breaker because we already have
+ // a different session with this peer that is using the requested
+ // content description types.
+ for (var i = 0, len = this.peers[sender].length; i < len; i++) {
+ var sess = this.peers[sender][i];
+ if (sess && sess.pending && sess.sid > sid && this.performTieBreak(sess, req)) {
+ this._log('info', 'Tie break session-initiate');
+ return this._sendError(sender, rid, {
+ condition: 'conflict',
+ jingleCondition: 'tie-break'
+ });
+ }
+ }
+ }
+
+ // We've now weeded out invalid requests, so we can process the action now.
+
+ if (action === 'session-initiate') {
+ if (!contents.length) {
+ return self._sendError(sender, rid, {
+ condition: 'bad-request'
+ });
+ }
+
+ session = this._createIncomingSession({
+ sid: sid,
+ peer: req.from,
+ peerID: sender,
+ initiator: false,
+ parent: this,
+ descriptionTypes: descriptionTypes,
+ transportTypes: transportTypes,
+ iceServers: this.iceServers,
+ constraints: this.config.peerConnectionConstraints
+ }, req);
+ }
+
+ session.process(action, req.jingle, function (err) {
+ if (err) {
+ self._log('error', 'Could not process request', req, err);
+ self._sendError(sender, rid, err);
+ } else {
+ self.emit('send', {
+ to: sender,
+ id: rid,
+ type: 'result',
+ });
+
+ // Wait for the initial action to be processed before emitting
+ // the session for the user to accept/reject.
+ if (action === 'session-initiate') {
+ self.emit('incoming', session);
+ }
+ }
+ });
+};
+
+
+module.exports = SessionManager;
+
+},{"intersect":28,"jingle-filetransfer-session":29,"jingle-media-session":78,"jingle-session":109,"util":24,"webrtcsupport":112,"wildemitter":113}],26:[function(require,module,exports){
+(function (process){
+/*!
+ * async
+ * https://github.com/caolan/async
+ *
+ * Copyright 2010-2014 Caolan McMahon
+ * Released under the MIT license
+ */
+/*jshint onevar: false, indent:4 */
+/*global setImmediate: false, setTimeout: false, console: false */
+(function () {
+
+ var async = {};
+
+ // global on the server, window in the browser
+ var root, previous_async;
+
+ root = this;
+ if (root != null) {
+ previous_async = root.async;
+ }
+
+ async.noConflict = function () {
+ root.async = previous_async;
+ return async;
+ };
+
+ function only_once(fn) {
+ var called = false;
+ return function() {
+ if (called) throw new Error("Callback was already called.");
+ called = true;
+ fn.apply(root, arguments);
+ }
+ }
+
+ //// cross-browser compatiblity functions ////
+
+ var _toString = Object.prototype.toString;
+
+ var _isArray = Array.isArray || function (obj) {
+ return _toString.call(obj) === '[object Array]';
+ };
+
+ var _each = function (arr, iterator) {
+ for (var i = 0; i < arr.length; i += 1) {
+ iterator(arr[i], i, arr);
+ }
+ };
+
+ var _map = function (arr, iterator) {
+ if (arr.map) {
+ return arr.map(iterator);
+ }
+ var results = [];
+ _each(arr, function (x, i, a) {
+ results.push(iterator(x, i, a));
+ });
+ return results;
+ };
+
+ var _reduce = function (arr, iterator, memo) {
+ if (arr.reduce) {
+ return arr.reduce(iterator, memo);
+ }
+ _each(arr, function (x, i, a) {
+ memo = iterator(memo, x, i, a);
+ });
+ return memo;
+ };
+
+ var _keys = function (obj) {
+ if (Object.keys) {
+ return Object.keys(obj);
+ }
+ var keys = [];
+ for (var k in obj) {
+ if (obj.hasOwnProperty(k)) {
+ keys.push(k);
+ }
+ }
+ return keys;
+ };
+
+ //// exported async module functions ////
+
+ //// nextTick implementation with browser-compatible fallback ////
+ if (typeof process === 'undefined' || !(process.nextTick)) {
+ if (typeof setImmediate === 'function') {
+ async.nextTick = function (fn) {
+ // not a direct alias for IE10 compatibility
+ setImmediate(fn);
+ };
+ async.setImmediate = async.nextTick;
+ }
+ else {
+ async.nextTick = function (fn) {
+ setTimeout(fn, 0);
+ };
+ async.setImmediate = async.nextTick;
+ }
+ }
+ else {
+ async.nextTick = process.nextTick;
+ if (typeof setImmediate !== 'undefined') {
+ async.setImmediate = function (fn) {
+ // not a direct alias for IE10 compatibility
+ setImmediate(fn);
+ };
+ }
+ else {
+ async.setImmediate = async.nextTick;
+ }
+ }
+
+ async.each = function (arr, iterator, callback) {
+ callback = callback || function () {};
+ if (!arr.length) {
+ return callback();
+ }
+ var completed = 0;
+ _each(arr, function (x) {
+ iterator(x, only_once(done) );
+ });
+ function done(err) {
+ if (err) {
+ callback(err);
+ callback = function () {};
+ }
+ else {
+ completed += 1;
+ if (completed >= arr.length) {
+ callback();
+ }
+ }
+ }
+ };
+ async.forEach = async.each;
+
+ async.eachSeries = function (arr, iterator, callback) {
+ callback = callback || function () {};
+ if (!arr.length) {
+ return callback();
+ }
+ var completed = 0;
+ var iterate = function () {
+ iterator(arr[completed], function (err) {
+ if (err) {
+ callback(err);
+ callback = function () {};
+ }
+ else {
+ completed += 1;
+ if (completed >= arr.length) {
+ callback();
+ }
+ else {
+ iterate();
+ }
+ }
+ });
+ };
+ iterate();
+ };
+ async.forEachSeries = async.eachSeries;
+
+ async.eachLimit = function (arr, limit, iterator, callback) {
+ var fn = _eachLimit(limit);
+ fn.apply(null, [arr, iterator, callback]);
+ };
+ async.forEachLimit = async.eachLimit;
+
+ var _eachLimit = function (limit) {
+
+ return function (arr, iterator, callback) {
+ callback = callback || function () {};
+ if (!arr.length || limit <= 0) {
+ return callback();
+ }
+ var completed = 0;
+ var started = 0;
+ var running = 0;
+
+ (function replenish () {
+ if (completed >= arr.length) {
+ return callback();
+ }
+
+ while (running < limit && started < arr.length) {
+ started += 1;
+ running += 1;
+ iterator(arr[started - 1], function (err) {
+ if (err) {
+ callback(err);
+ callback = function () {};
+ }
+ else {
+ completed += 1;
+ running -= 1;
+ if (completed >= arr.length) {
+ callback();
+ }
+ else {
+ replenish();
+ }
+ }
+ });
+ }
+ })();
+ };
+ };
+
+
+ var doParallel = function (fn) {
+ return function () {
+ var args = Array.prototype.slice.call(arguments);
+ return fn.apply(null, [async.each].concat(args));
+ };
+ };
+ var doParallelLimit = function(limit, fn) {
+ return function () {
+ var args = Array.prototype.slice.call(arguments);
+ return fn.apply(null, [_eachLimit(limit)].concat(args));
+ };
+ };
+ var doSeries = function (fn) {
+ return function () {
+ var args = Array.prototype.slice.call(arguments);
+ return fn.apply(null, [async.eachSeries].concat(args));
+ };
+ };
+
+
+ var _asyncMap = function (eachfn, arr, iterator, callback) {
+ arr = _map(arr, function (x, i) {
+ return {index: i, value: x};
+ });
+ if (!callback) {
+ eachfn(arr, function (x, callback) {
+ iterator(x.value, function (err) {
+ callback(err);
+ });
+ });
+ } else {
+ var results = [];
+ eachfn(arr, function (x, callback) {
+ iterator(x.value, function (err, v) {
+ results[x.index] = v;
+ callback(err);
+ });
+ }, function (err) {
+ callback(err, results);
+ });
+ }
+ };
+ async.map = doParallel(_asyncMap);
+ async.mapSeries = doSeries(_asyncMap);
+ async.mapLimit = function (arr, limit, iterator, callback) {
+ return _mapLimit(limit)(arr, iterator, callback);
+ };
+
+ var _mapLimit = function(limit) {
+ return doParallelLimit(limit, _asyncMap);
+ };
+
+ // reduce only has a series version, as doing reduce in parallel won't
+ // work in many situations.
+ async.reduce = function (arr, memo, iterator, callback) {
+ async.eachSeries(arr, function (x, callback) {
+ iterator(memo, x, function (err, v) {
+ memo = v;
+ callback(err);
+ });
+ }, function (err) {
+ callback(err, memo);
+ });
+ };
+ // inject alias
+ async.inject = async.reduce;
+ // foldl alias
+ async.foldl = async.reduce;
+
+ async.reduceRight = function (arr, memo, iterator, callback) {
+ var reversed = _map(arr, function (x) {
+ return x;
+ }).reverse();
+ async.reduce(reversed, memo, iterator, callback);
+ };
+ // foldr alias
+ async.foldr = async.reduceRight;
+
+ var _filter = function (eachfn, arr, iterator, callback) {
+ var results = [];
+ arr = _map(arr, function (x, i) {
+ return {index: i, value: x};
+ });
+ eachfn(arr, function (x, callback) {
+ iterator(x.value, function (v) {
+ if (v) {
+ results.push(x);
+ }
+ callback();
+ });
+ }, function (err) {
+ callback(_map(results.sort(function (a, b) {
+ return a.index - b.index;
+ }), function (x) {
+ return x.value;
+ }));
+ });
+ };
+ async.filter = doParallel(_filter);
+ async.filterSeries = doSeries(_filter);
+ // select alias
+ async.select = async.filter;
+ async.selectSeries = async.filterSeries;
+
+ var _reject = function (eachfn, arr, iterator, callback) {
+ var results = [];
+ arr = _map(arr, function (x, i) {
+ return {index: i, value: x};
+ });
+ eachfn(arr, function (x, callback) {
+ iterator(x.value, function (v) {
+ if (!v) {
+ results.push(x);
+ }
+ callback();
+ });
+ }, function (err) {
+ callback(_map(results.sort(function (a, b) {
+ return a.index - b.index;
+ }), function (x) {
+ return x.value;
+ }));
+ });
+ };
+ async.reject = doParallel(_reject);
+ async.rejectSeries = doSeries(_reject);
+
+ var _detect = function (eachfn, arr, iterator, main_callback) {
+ eachfn(arr, function (x, callback) {
+ iterator(x, function (result) {
+ if (result) {
+ main_callback(x);
+ main_callback = function () {};
+ }
+ else {
+ callback();
+ }
+ });
+ }, function (err) {
+ main_callback();
+ });
+ };
+ async.detect = doParallel(_detect);
+ async.detectSeries = doSeries(_detect);
+
+ async.some = function (arr, iterator, main_callback) {
+ async.each(arr, function (x, callback) {
+ iterator(x, function (v) {
+ if (v) {
+ main_callback(true);
+ main_callback = function () {};
+ }
+ callback();
+ });
+ }, function (err) {
+ main_callback(false);
+ });
+ };
+ // any alias
+ async.any = async.some;
+
+ async.every = function (arr, iterator, main_callback) {
+ async.each(arr, function (x, callback) {
+ iterator(x, function (v) {
+ if (!v) {
+ main_callback(false);
+ main_callback = function () {};
+ }
+ callback();
+ });
+ }, function (err) {
+ main_callback(true);
+ });
+ };
+ // all alias
+ async.all = async.every;
+
+ async.sortBy = function (arr, iterator, callback) {
+ async.map(arr, function (x, callback) {
+ iterator(x, function (err, criteria) {
+ if (err) {
+ callback(err);
+ }
+ else {
+ callback(null, {value: x, criteria: criteria});
+ }
+ });
+ }, function (err, results) {
+ if (err) {
+ return callback(err);
+ }
+ else {
+ var fn = function (left, right) {
+ var a = left.criteria, b = right.criteria;
+ return a < b ? -1 : a > b ? 1 : 0;
+ };
+ callback(null, _map(results.sort(fn), function (x) {
+ return x.value;
+ }));
+ }
+ });
+ };
+
+ async.auto = function (tasks, callback) {
+ callback = callback || function () {};
+ var keys = _keys(tasks);
+ var remainingTasks = keys.length
+ if (!remainingTasks) {
+ return callback();
+ }
+
+ var results = {};
+
+ var listeners = [];
+ var addListener = function (fn) {
+ listeners.unshift(fn);
+ };
+ var removeListener = function (fn) {
+ for (var i = 0; i < listeners.length; i += 1) {
+ if (listeners[i] === fn) {
+ listeners.splice(i, 1);
+ return;
+ }
+ }
+ };
+ var taskComplete = function () {
+ remainingTasks--
+ _each(listeners.slice(0), function (fn) {
+ fn();
+ });
+ };
+
+ addListener(function () {
+ if (!remainingTasks) {
+ var theCallback = callback;
+ // prevent final callback from calling itself if it errors
+ callback = function () {};
+
+ theCallback(null, results);
+ }
+ });
+
+ _each(keys, function (k) {
+ var task = _isArray(tasks[k]) ? tasks[k]: [tasks[k]];
+ var taskCallback = function (err) {
+ var args = Array.prototype.slice.call(arguments, 1);
+ if (args.length <= 1) {
+ args = args[0];
+ }
+ if (err) {
+ var safeResults = {};
+ _each(_keys(results), function(rkey) {
+ safeResults[rkey] = results[rkey];
+ });
+ safeResults[k] = args;
+ callback(err, safeResults);
+ // stop subsequent errors hitting callback multiple times
+ callback = function () {};
+ }
+ else {
+ results[k] = args;
+ async.setImmediate(taskComplete);
+ }
+ };
+ var requires = task.slice(0, Math.abs(task.length - 1)) || [];
+ var ready = function () {
+ return _reduce(requires, function (a, x) {
+ return (a && results.hasOwnProperty(x));
+ }, true) && !results.hasOwnProperty(k);
+ };
+ if (ready()) {
+ task[task.length - 1](taskCallback, results);
+ }
+ else {
+ var listener = function () {
+ if (ready()) {
+ removeListener(listener);
+ task[task.length - 1](taskCallback, results);
+ }
+ };
+ addListener(listener);
+ }
+ });
+ };
+
+ async.retry = function(times, task, callback) {
+ var DEFAULT_TIMES = 5;
+ var attempts = [];
+ // Use defaults if times not passed
+ if (typeof times === 'function') {
+ callback = task;
+ task = times;
+ times = DEFAULT_TIMES;
+ }
+ // Make sure times is a number
+ times = parseInt(times, 10) || DEFAULT_TIMES;
+ var wrappedTask = function(wrappedCallback, wrappedResults) {
+ var retryAttempt = function(task, finalAttempt) {
+ return function(seriesCallback) {
+ task(function(err, result){
+ seriesCallback(!err || finalAttempt, {err: err, result: result});
+ }, wrappedResults);
+ };
+ };
+ while (times) {
+ attempts.push(retryAttempt(task, !(times-=1)));
+ }
+ async.series(attempts, function(done, data){
+ data = data[data.length - 1];
+ (wrappedCallback || callback)(data.err, data.result);
+ });
+ }
+ // If a callback is passed, run this as a controll flow
+ return callback ? wrappedTask() : wrappedTask
+ };
+
+ async.waterfall = function (tasks, callback) {
+ callback = callback || function () {};
+ if (!_isArray(tasks)) {
+ var err = new Error('First argument to waterfall must be an array of functions');
+ return callback(err);
+ }
+ if (!tasks.length) {
+ return callback();
+ }
+ var wrapIterator = function (iterator) {
+ return function (err) {
+ if (err) {
+ callback.apply(null, arguments);
+ callback = function () {};
+ }
+ else {
+ var args = Array.prototype.slice.call(arguments, 1);
+ var next = iterator.next();
+ if (next) {
+ args.push(wrapIterator(next));
+ }
+ else {
+ args.push(callback);
+ }
+ async.setImmediate(function () {
+ iterator.apply(null, args);
+ });
+ }
+ };
+ };
+ wrapIterator(async.iterator(tasks))();
+ };
+
+ var _parallel = function(eachfn, tasks, callback) {
+ callback = callback || function () {};
+ if (_isArray(tasks)) {
+ eachfn.map(tasks, function (fn, callback) {
+ if (fn) {
+ fn(function (err) {
+ var args = Array.prototype.slice.call(arguments, 1);
+ if (args.length <= 1) {
+ args = args[0];
+ }
+ callback.call(null, err, args);
+ });
+ }
+ }, callback);
+ }
+ else {
+ var results = {};
+ eachfn.each(_keys(tasks), function (k, callback) {
+ tasks[k](function (err) {
+ var args = Array.prototype.slice.call(arguments, 1);
+ if (args.length <= 1) {
+ args = args[0];
+ }
+ results[k] = args;
+ callback(err);
+ });
+ }, function (err) {
+ callback(err, results);
+ });
+ }
+ };
+
+ async.parallel = function (tasks, callback) {
+ _parallel({ map: async.map, each: async.each }, tasks, callback);
+ };
+
+ async.parallelLimit = function(tasks, limit, callback) {
+ _parallel({ map: _mapLimit(limit), each: _eachLimit(limit) }, tasks, callback);
+ };
+
+ async.series = function (tasks, callback) {
+ callback = callback || function () {};
+ if (_isArray(tasks)) {
+ async.mapSeries(tasks, function (fn, callback) {
+ if (fn) {
+ fn(function (err) {
+ var args = Array.prototype.slice.call(arguments, 1);
+ if (args.length <= 1) {
+ args = args[0];
+ }
+ callback.call(null, err, args);
+ });
+ }
+ }, callback);
+ }
+ else {
+ var results = {};
+ async.eachSeries(_keys(tasks), function (k, callback) {
+ tasks[k](function (err) {
+ var args = Array.prototype.slice.call(arguments, 1);
+ if (args.length <= 1) {
+ args = args[0];
+ }
+ results[k] = args;
+ callback(err);
+ });
+ }, function (err) {
+ callback(err, results);
+ });
+ }
+ };
+
+ async.iterator = function (tasks) {
+ var makeCallback = function (index) {
+ var fn = function () {
+ if (tasks.length) {
+ tasks[index].apply(null, arguments);
+ }
+ return fn.next();
+ };
+ fn.next = function () {
+ return (index < tasks.length - 1) ? makeCallback(index + 1): null;
+ };
+ return fn;
+ };
+ return makeCallback(0);
+ };
+
+ async.apply = function (fn) {
+ var args = Array.prototype.slice.call(arguments, 1);
+ return function () {
+ return fn.apply(
+ null, args.concat(Array.prototype.slice.call(arguments))
+ );
+ };
+ };
+
+ var _concat = function (eachfn, arr, fn, callback) {
+ var r = [];
+ eachfn(arr, function (x, cb) {
+ fn(x, function (err, y) {
+ r = r.concat(y || []);
+ cb(err);
+ });
+ }, function (err) {
+ callback(err, r);
+ });
+ };
+ async.concat = doParallel(_concat);
+ async.concatSeries = doSeries(_concat);
+
+ async.whilst = function (test, iterator, callback) {
+ if (test()) {
+ iterator(function (err) {
+ if (err) {
+ return callback(err);
+ }
+ async.whilst(test, iterator, callback);
+ });
+ }
+ else {
+ callback();
+ }
+ };
+
+ async.doWhilst = function (iterator, test, callback) {
+ iterator(function (err) {
+ if (err) {
+ return callback(err);
+ }
+ var args = Array.prototype.slice.call(arguments, 1);
+ if (test.apply(null, args)) {
+ async.doWhilst(iterator, test, callback);
+ }
+ else {
+ callback();
+ }
+ });
+ };
+
+ async.until = function (test, iterator, callback) {
+ if (!test()) {
+ iterator(function (err) {
+ if (err) {
+ return callback(err);
+ }
+ async.until(test, iterator, callback);
+ });
+ }
+ else {
+ callback();
+ }
+ };
+
+ async.doUntil = function (iterator, test, callback) {
+ iterator(function (err) {
+ if (err) {
+ return callback(err);
+ }
+ var args = Array.prototype.slice.call(arguments, 1);
+ if (!test.apply(null, args)) {
+ async.doUntil(iterator, test, callback);
+ }
+ else {
+ callback();
+ }
+ });
+ };
+
+ async.queue = function (worker, concurrency) {
+ if (concurrency === undefined) {
+ concurrency = 1;
+ }
+ function _insert(q, data, pos, callback) {
+ if (!q.started){
+ q.started = true;
+ }
+ if (!_isArray(data)) {
+ data = [data];
+ }
+ if(data.length == 0) {
+ // call drain immediately if there are no tasks
+ return async.setImmediate(function() {
+ if (q.drain) {
+ q.drain();
+ }
+ });
+ }
+ _each(data, function(task) {
+ var item = {
+ data: task,
+ callback: typeof callback === 'function' ? callback : null
+ };
+
+ if (pos) {
+ q.tasks.unshift(item);
+ } else {
+ q.tasks.push(item);
+ }
+
+ if (q.saturated && q.tasks.length === q.concurrency) {
+ q.saturated();
+ }
+ async.setImmediate(q.process);
+ });
+ }
+
+ var workers = 0;
+ var q = {
+ tasks: [],
+ concurrency: concurrency,
+ saturated: null,
+ empty: null,
+ drain: null,
+ started: false,
+ paused: false,
+ push: function (data, callback) {
+ _insert(q, data, false, callback);
+ },
+ kill: function () {
+ q.drain = null;
+ q.tasks = [];
+ },
+ unshift: function (data, callback) {
+ _insert(q, data, true, callback);
+ },
+ process: function () {
+ if (!q.paused && workers < q.concurrency && q.tasks.length) {
+ var task = q.tasks.shift();
+ if (q.empty && q.tasks.length === 0) {
+ q.empty();
+ }
+ workers += 1;
+ var next = function () {
+ workers -= 1;
+ if (task.callback) {
+ task.callback.apply(task, arguments);
+ }
+ if (q.drain && q.tasks.length + workers === 0) {
+ q.drain();
+ }
+ q.process();
+ };
+ var cb = only_once(next);
+ worker(task.data, cb);
+ }
+ },
+ length: function () {
+ return q.tasks.length;
+ },
+ running: function () {
+ return workers;
+ },
+ idle: function() {
+ return q.tasks.length + workers === 0;
+ },
+ pause: function () {
+ if (q.paused === true) { return; }
+ q.paused = true;
+ },
+ resume: function () {
+ if (q.paused === false) { return; }
+ q.paused = false;
+ // Need to call q.process once per concurrent
+ // worker to preserve full concurrency after pause
+ for (var w = 1; w <= q.concurrency; w++) {
+ async.setImmediate(q.process);
+ }
+ }
+ };
+ return q;
+ };
+
+ async.priorityQueue = function (worker, concurrency) {
+
+ function _compareTasks(a, b){
+ return a.priority - b.priority;
+ };
+
+ function _binarySearch(sequence, item, compare) {
+ var beg = -1,
+ end = sequence.length - 1;
+ while (beg < end) {
+ var mid = beg + ((end - beg + 1) >>> 1);
+ if (compare(item, sequence[mid]) >= 0) {
+ beg = mid;
+ } else {
+ end = mid - 1;
+ }
+ }
+ return beg;
+ }
+
+ function _insert(q, data, priority, callback) {
+ if (!q.started){
+ q.started = true;
+ }
+ if (!_isArray(data)) {
+ data = [data];
+ }
+ if(data.length == 0) {
+ // call drain immediately if there are no tasks
+ return async.setImmediate(function() {
+ if (q.drain) {
+ q.drain();
+ }
+ });
+ }
+ _each(data, function(task) {
+ var item = {
+ data: task,
+ priority: priority,
+ callback: typeof callback === 'function' ? callback : null
+ };
+
+ q.tasks.splice(_binarySearch(q.tasks, item, _compareTasks) + 1, 0, item);
+
+ if (q.saturated && q.tasks.length === q.concurrency) {
+ q.saturated();
+ }
+ async.setImmediate(q.process);
+ });
+ }
+
+ // Start with a normal queue
+ var q = async.queue(worker, concurrency);
+
+ // Override push to accept second parameter representing priority
+ q.push = function (data, priority, callback) {
+ _insert(q, data, priority, callback);
+ };
+
+ // Remove unshift function
+ delete q.unshift;
+
+ return q;
+ };
+
+ async.cargo = function (worker, payload) {
+ var working = false,
+ tasks = [];
+
+ var cargo = {
+ tasks: tasks,
+ payload: payload,
+ saturated: null,
+ empty: null,
+ drain: null,
+ drained: true,
+ push: function (data, callback) {
+ if (!_isArray(data)) {
+ data = [data];
+ }
+ _each(data, function(task) {
+ tasks.push({
+ data: task,
+ callback: typeof callback === 'function' ? callback : null
+ });
+ cargo.drained = false;
+ if (cargo.saturated && tasks.length === payload) {
+ cargo.saturated();
+ }
+ });
+ async.setImmediate(cargo.process);
+ },
+ process: function process() {
+ if (working) return;
+ if (tasks.length === 0) {
+ if(cargo.drain && !cargo.drained) cargo.drain();
+ cargo.drained = true;
+ return;
+ }
+
+ var ts = typeof payload === 'number'
+ ? tasks.splice(0, payload)
+ : tasks.splice(0, tasks.length);
+
+ var ds = _map(ts, function (task) {
+ return task.data;
+ });
+
+ if(cargo.empty) cargo.empty();
+ working = true;
+ worker(ds, function () {
+ working = false;
+
+ var args = arguments;
+ _each(ts, function (data) {
+ if (data.callback) {
+ data.callback.apply(null, args);
+ }
+ });
+
+ process();
+ });
+ },
+ length: function () {
+ return tasks.length;
+ },
+ running: function () {
+ return working;
+ }
+ };
+ return cargo;
+ };
+
+ var _console_fn = function (name) {
+ return function (fn) {
+ var args = Array.prototype.slice.call(arguments, 1);
+ fn.apply(null, args.concat([function (err) {
+ var args = Array.prototype.slice.call(arguments, 1);
+ if (typeof console !== 'undefined') {
+ if (err) {
+ if (console.error) {
+ console.error(err);
+ }
+ }
+ else if (console[name]) {
+ _each(args, function (x) {
+ console[name](x);
+ });
+ }
+ }
+ }]));
+ };
+ };
+ async.log = _console_fn('log');
+ async.dir = _console_fn('dir');
+ /*async.info = _console_fn('info');
+ async.warn = _console_fn('warn');
+ async.error = _console_fn('error');*/
+
+ async.memoize = function (fn, hasher) {
+ var memo = {};
+ var queues = {};
+ hasher = hasher || function (x) {
+ return x;
+ };
+ var memoized = function () {
+ var args = Array.prototype.slice.call(arguments);
+ var callback = args.pop();
+ var key = hasher.apply(null, args);
+ if (key in memo) {
+ async.nextTick(function () {
+ callback.apply(null, memo[key]);
+ });
+ }
+ else if (key in queues) {
+ queues[key].push(callback);
+ }
+ else {
+ queues[key] = [callback];
+ fn.apply(null, args.concat([function () {
+ memo[key] = arguments;
+ var q = queues[key];
+ delete queues[key];
+ for (var i = 0, l = q.length; i < l; i++) {
+ q[i].apply(null, arguments);
+ }
+ }]));
+ }
+ };
+ memoized.memo = memo;
+ memoized.unmemoized = fn;
+ return memoized;
+ };
+
+ async.unmemoize = function (fn) {
+ return function () {
+ return (fn.unmemoized || fn).apply(null, arguments);
+ };
+ };
+
+ async.times = function (count, iterator, callback) {
+ var counter = [];
+ for (var i = 0; i < count; i++) {
+ counter.push(i);
+ }
+ return async.map(counter, iterator, callback);
+ };
+
+ async.timesSeries = function (count, iterator, callback) {
+ var counter = [];
+ for (var i = 0; i < count; i++) {
+ counter.push(i);
+ }
+ return async.mapSeries(counter, iterator, callback);
+ };
+
+ async.seq = function (/* functions... */) {
+ var fns = arguments;
+ return function () {
+ var that = this;
+ var args = Array.prototype.slice.call(arguments);
+ var callback = args.pop();
+ async.reduce(fns, args, function (newargs, fn, cb) {
+ fn.apply(that, newargs.concat([function () {
+ var err = arguments[0];
+ var nextargs = Array.prototype.slice.call(arguments, 1);
+ cb(err, nextargs);
+ }]))
+ },
+ function (err, results) {
+ callback.apply(that, [err].concat(results));
+ });
+ };
+ };
+
+ async.compose = function (/* functions... */) {
+ return async.seq.apply(null, Array.prototype.reverse.call(arguments));
+ };
+
+ var _applyEach = function (eachfn, fns /*args...*/) {
+ var go = function () {
+ var that = this;
+ var args = Array.prototype.slice.call(arguments);
+ var callback = args.pop();
+ return eachfn(fns, function (fn, cb) {
+ fn.apply(that, args.concat([cb]));
+ },
+ callback);
+ };
+ if (arguments.length > 2) {
+ var args = Array.prototype.slice.call(arguments, 2);
+ return go.apply(this, args);
+ }
+ else {
+ return go;
+ }
+ };
+ async.applyEach = doParallel(_applyEach);
+ async.applyEachSeries = doSeries(_applyEach);
+
+ async.forever = function (fn, callback) {
+ function next(err) {
+ if (err) {
+ if (callback) {
+ return callback(err);
+ }
+ throw err;
+ }
+ fn(next);
+ }
+ next();
+ };
+
+ // Node.js
+ if (typeof module !== 'undefined' && module.exports) {
+ module.exports = async;
+ }
+ // AMD / RequireJS
+ else if (typeof define !== 'undefined' && define.amd) {
+ define([], function () {
+ return async;
+ });
+ }
+ // included directly via <script> tag
+ else {
+ root.async = async;
+ }
+
+}());
+
+}).call(this,require('_process'))
+},{"_process":9}],27:[function(require,module,exports){
+var arr = [];
+var each = arr.forEach;
+var slice = arr.slice;
+
+
+module.exports = function(obj) {
+ each.call(slice.call(arguments, 1), function(source) {
+ if (source) {
+ for (var prop in source) {
+ obj[prop] = source[prop];
+ }
+ }
+ });
+ return obj;
+};
+
+},{}],28:[function(require,module,exports){
+module.exports = intersect;
+
+function intersect (a, b) {
+ var res = [];
+ for (var i = 0; i < a.length; i++) {
+ if (indexOf(b, a[i]) > -1) res.push(a[i]);
+ }
+ return res;
+}
+
+intersect.big = function(a, b) {
+ var ret = [];
+ var temp = {};
+
+ for (var i = 0; i < b.length; i++) {
+ temp[b[i]] = true;
+ }
+ for (var i = 0; i < a.length; i++) {
+ if (temp[a[i]]) ret.push(a[i]);
+ }
+
+ return ret;
+}
+
+function indexOf(arr, el) {
+ for (var i = 0; i < arr.length; i++) {
+ if (arr[i] === el) return i;
+ }
+ return -1;
+}
+
+},{}],29:[function(require,module,exports){
+var util = require('util');
+var extend = require('extend-object');
+var BaseSession = require('jingle-session');
+var RTCPeerConnection = require('rtcpeerconnection');
+var FileTransfer = require('filetransfer');
+
+
+function FileTransferSession(opts) {
+ BaseSession.call(this, opts);
+
+ var self = this;
+
+ this.pc = new RTCPeerConnection({
+ iceServers: opts.iceServers || [],
+ useJingle: true
+ }, opts.constraints || {});
+
+ this.pc.on('ice', this.onIceCandidate.bind(this));
+ this.pc.on('iceConnectionStateChange', this.onIceStateChange.bind(this));
+ this.pc.on('addChannel', this.onChannelAdded.bind(this));
+
+ this.sender = new FileTransfer.Sender();
+ this.sender.on('progress', function (sent, size) {
+ self._log('info', 'Send progress ' + sent + '/' + size);
+ });
+ this.sender.on('sentFile', function (meta) {
+ self._log('info', 'Sent file', meta.name);
+
+ var content = self.pc.localDescription.contents[0];
+ delete content.transport;
+
+ content.description = {
+ descType: 'filetransfer',
+ offer: {
+ hash: {
+ algo: meta.algo,
+ value: meta.hash
+ }
+ }
+ };
+
+ self.send('description-info', {
+ contents: [content]
+ });
+ self.emit('sentFile', self, meta);
+ });
+
+ this.receiver = new FileTransfer.Receiver();
+ this.receiver.on('progress', function (received, size) {
+ self._log('info', 'Receive progress ' + received + '/' + size);
+ });
+ this.receiver.on('receivedFile', function (file) {
+ self.receivedFile = file;
+ self.maybeReceivedFile();
+ });
+}
+
+
+util.inherits(FileTransferSession, BaseSession);
+
+
+FileTransferSession.prototype = extend(FileTransferSession.prototype, {
+
+ // ----------------------------------------------------------------
+ // Session control methods
+ // ----------------------------------------------------------------
+
+ start: function (file) {
+ var self = this;
+ this.state = 'pending';
+
+ this.pc.isInitiator = true;
+
+ var sendChannel = this.pc.createDataChannel('filetransfer');
+ sendChannel.onopen = function () {
+ self.sender.send(file, sendChannel);
+ };
+
+ var constraints = {
+ mandatory: {
+ OfferToReceiveAudio: false,
+ OfferToReceiveVideo: false
+ }
+ };
+
+ this.pc.offer(constraints, function (err, offer) {
+ if (err) {
+ self._log('error', 'Could not create WebRTC offer', err);
+ return self.end('failed-application', true);
+ }
+
+ offer.jingle.contents[0].description = {
+ descType: 'filetransfer',
+ offer: {
+ date: file.lastModifiedDate,
+ name: file.name,
+ size: file.size,
+ hash: {
+ algo: 'sha-1',
+ value: ''
+ }
+ }
+ };
+
+ self.send('session-initiate', offer.jingle);
+ });
+ },
+
+ accept: function () {
+ var self = this;
+
+ this._log('info', 'Accepted incoming session');
+
+ this.state = 'active';
+
+ this.pc.answer(function (err, answer) {
+ if (err) {
+ self._log('error', 'Could not create WebRTC answer', err);
+ return self.end('failed-application');
+ }
+
+ answer.jingle.contents[0].name = 'data';
+
+ self.send('session-accept', answer.jingle);
+ });
+ },
+
+ end: function (reason, silent) {
+ this.pc.close();
+ BaseSession.prototype.end.call(this, reason, silent);
+ },
+
+ maybeReceivedFile: function () {
+ if (!this.receiver.metadata.hash.value) {
+ // unknown hash, file transfer not completed
+ } else if (this.receiver.metadata.hash.value === this.receiver.metadata.actualhash) {
+ this._log('info', 'File hash matches');
+ this.emit('receivedFile', this, this.receivedFile, this.receiver.metadata);
+ this.end('success');
+ } else {
+ this._log('error', 'File hash does not match');
+ this.end('media-error');
+ }
+ },
+
+ // ----------------------------------------------------------------
+ // ICE action handers
+ // ----------------------------------------------------------------
+
+ onIceCandidate: function (candidate) {
+ this._log('info', 'Discovered new ICE candidate', candidate.jingle);
+ candidate.jingle.contents[0].name = 'data';
+ this.send('transport-info', candidate.jingle);
+ },
+
+ onIceStateChange: function () {
+ switch (this.pc.iceConnectionState) {
+ case 'checking':
+ this.connectionState = 'connecting';
+ break;
+ case 'completed':
+ case 'connected':
+ this.connectionState = 'connected';
+ break;
+ case 'disconnected':
+ if (this.pc.signalingState === 'stable') {
+ this.connectionState = 'interrupted';
+ } else {
+ this.connectionState = 'disconnected';
+ }
+ break;
+ case 'failed':
+ this.connectionState = 'failed';
+ this.end('failed-transport');
+ break;
+ case 'closed':
+ this.connectionState = 'disconnected';
+ break;
+ }
+ },
+
+ onChannelAdded: function (channel) {
+ this.receiver.receive(null, channel);
+ },
+
+ // ----------------------------------------------------------------
+ // Jingle action handers
+ // ----------------------------------------------------------------
+
+ onSessionInitiate: function (changes, cb) {
+ var self = this;
+
+ this._log('info', 'Initiating incoming session');
+
+ this.state = 'pending';
+
+ this.pc.isInitiator = false;
+
+ var desc = changes.contents[0].description;
+ this.receiver.metadata = desc.offer.toJSON();
+
+ if (this.receiver.metadata.hash) {
+ this.receiver.config.hash = this.receiver.metadata.hash.algo;
+ }
+
+ changes.contents[0].description = {
+ descType: 'datachannel'
+ };
+
+ this.pc.handleOffer({
+ type: 'offer',
+ jingle: changes
+ }, function (err) {
+ if (err) {
+ self._log('error', 'Could not create WebRTC answer');
+ return cb({condition: 'general-error'});
+ }
+ cb();
+ });
+ },
+
+ onSessionAccept: function (changes, cb) {
+ var self = this;
+
+ this.state = 'active';
+
+ changes.contents[0].description = {
+ descType: 'datachannel'
+ };
+
+ this.pc.handleAnswer({
+ type: 'answer',
+ jingle: changes
+ }, function (err) {
+ if (err) {
+ self._log('error', 'Could not process WebRTC answer');
+ return cb({condition: 'general-error'});
+ }
+ self.emit('accepted', self);
+ cb();
+ });
+ },
+
+ onSessionTerminate: function (changes, cb) {
+ this._log('info', 'Terminating session');
+ this.pc.close();
+ BaseSession.prototype.end.call(this, changes.reason, true);
+ cb();
+ },
+
+ onDescriptionInfo: function (info, cb) {
+ var hash = info.contents[0].description.offer.hash;
+ this.receiver.metadata.hash = hash;
+ if (this.receiver.metadata.actualhash) {
+ this.maybeReceivedFile();
+ }
+ cb();
+ },
+
+ onTransportInfo: function (changes, cb) {
+ this.pc.processIce(changes, function () {
+ cb();
+ });
+ }
+});
+
+
+module.exports = FileTransferSession;
+
+},{"extend-object":27,"filetransfer":30,"jingle-session":109,"rtcpeerconnection":77,"util":24}],30:[function(require,module,exports){
+var async = require('async');
+//var webrtcsupport = require('webrtcsupport');
+var WildEmitter = require('wildemitter');
+var util = require('util');
+var hashes = require('iana-hashes');
+
+function Sender(opts) {
+ WildEmitter.call(this);
+ var self = this;
+ var options = opts || {};
+ this.config = {
+ chunksize: 16384,
+ pacing: 10,
+ hash: 'sha-1' // note: this uses iana hash names
+ };
+ // set our config from options
+ var item;
+ for (item in options) {
+ this.config[item] = options[item];
+ }
+
+ this.file = null;
+ this.channel = null;
+ this.hash = null;
+
+ // paced sender
+ // TODO: do we have to do this?
+ this.processingQueue = async.queue(function (task, next) {
+ if (task.type == 'chunk') {
+ var reader = new window.FileReader();
+ reader.onload = (function() {
+ return function(e) {
+ self.channel.send(e.target.result);
+
+ if (self.hash) {
+ self.hash.update(new Uint8Array(e.target.result));
+ }
+
+ self.emit('progress', task.start, task.file.size);
+
+ window.setTimeout(next, self.config.pacing); // pacing
+ };
+ })(task.file);
+ var slice = task.file.slice(task.start, task.start + task.size);
+ reader.readAsArrayBuffer(slice);
+ } else if (task.type == 'complete') {
+ self.emit('progress', self.file.size, self.file.size);
+ self.emit('sentFile', self.hash ? {hash: self.hash.digest('hex'), algo: self.config.hash } : null);
+ next();
+ }
+ });
+}
+util.inherits(Sender, WildEmitter);
+
+Sender.prototype.send = function (file, channel) {
+ this.file = file;
+ if (this.config.hash) {
+ this.hash = hashes.createHash(this.config.hash);
+ }
+
+ this.channel = channel;
+ // FIXME: hook to channel.onopen?
+ for (var start = 0; start < this.file.size; start += this.config.chunksize) {
+ this.processingQueue.push({
+ type: 'chunk',
+ file: file,
+ start: start,
+ size: this.config.chunksize
+ });
+ }
+ this.processingQueue.push({
+ type: 'complete'
+ });
+};
+
+function Receiver(opts) {
+ WildEmitter.call(this);
+
+ var options = opts || {};
+ this.config = {
+ hash: 'sha-1'
+ };
+ // set our config from options
+ var item;
+ for (item in options) {
+ this.config[item] = options[item];
+ }
+ this.receiveBuffer = [];
+ this.received = 0;
+ this.metadata = {};
+ this.channel = null;
+ this.hash = null;
+}
+util.inherits(Receiver, WildEmitter);
+
+Receiver.prototype.receive = function (metadata, channel) {
+ var self = this;
+
+ if (metadata) {
+ this.metadata = metadata;
+ }
+ if (this.config.hash) {
+ this.hash = hashes.createHash(this.config.hash);
+ }
+
+ this.channel = channel;
+ // chrome only supports arraybuffers and those make it easier to calc the hash
+ channel.binaryType = 'arraybuffer';
+ this.channel.onmessage = function (event) {
+ var len = event.data.byteLength;
+ self.received += len;
+ self.receiveBuffer.push(event.data);
+
+ if (self.hash) {
+ self.hash.update(new Uint8Array(event.data));
+ }
+
+ self.emit('progress', self.received, self.metadata.size);
+ if (self.received == self.metadata.size) {
+ if (self.hash) {
+ self.metadata.actualhash = self.hash.digest('hex');
+ }
+ self.emit('receivedFile', new window.Blob(self.receiveBuffer), self.metadata);
+ self.receiveBuffer = []; // discard receivebuffer
+ } else if (self.received > self.metadata.size) {
+ // FIXME
+ console.error('received more than expected, discarding...');
+ self.receiveBuffer = []; // just discard...
+
+ }
+ };
+};
+
+module.exports = {};
+module.exports.support = window && window.File && window.FileReader && window.Blob;
+module.exports.Sender = Sender;
+module.exports.Receiver = Receiver;
+
+},{"async":26,"iana-hashes":31,"util":24,"wildemitter":113}],31:[function(require,module,exports){
+var createHash = require('create-hash');
+var createHmac = require('create-hmac');
+var getHashes = require('./lib/get-hashes');
+
+var mapping = {
+ md2: 'md2',
+ md5: 'md5',
+ 'sha-1': 'sha1',
+ 'sha-224': 'sha224',
+ 'sha-256': 'sha256',
+ 'sha-384': 'sha384',
+ 'sha-512': 'sha512'
+};
+
+var names = Object.keys(mapping);
+
+
+exports.getHashes = function () {
+ var result = [];
+ var available = getHashes();
+ for (var i = 0, len = names.length; i < len; i++) {
+ if (available.indexOf(mapping[names[i]]) >= 0) {
+ result.push(names[i]);
+ }
+ }
+ return result;
+};
+
+exports.createHash = function (algorithm) {
+ algorithm = algorithm.toLowerCase();
+ if (mapping[algorithm]) {
+ algorithm = mapping[algorithm];
+ }
+ return createHash(algorithm);
+};
+
+exports.createHmac = function (algorithm, key) {
+ algorithm = algorithm.toLowerCase();
+ if (mapping[algorithm]) {
+ algorithm = mapping[algorithm];
+ }
+ return createHmac(algorithm, key);
+};
+
+},{"./lib/get-hashes":32,"create-hash":33,"create-hmac":46}],32:[function(require,module,exports){
+module.exports = function () {
+ return ['sha1', 'sha224', 'sha256', 'sha384', 'sha512', 'md5', 'rmd160'];
+};
+
+},{}],33:[function(require,module,exports){
+(function (Buffer){
+'use strict';
+var inherits = require('inherits')
+var md5 = require('./md5')
+var rmd160 = require('ripemd160')
+var sha = require('sha.js')
+
+var Transform = require('stream').Transform
+
+function HashNoConstructor(hash) {
+ Transform.call(this)
+
+ this._hash = hash
+ this.buffers = []
+}
+
+inherits(HashNoConstructor, Transform)
+
+HashNoConstructor.prototype._transform = function (data, _, next) {
+ this.buffers.push(data)
+
+ next()
+}
+
+HashNoConstructor.prototype._flush = function (next) {
+ this.push(this.digest())
+ next()
+}
+
+HashNoConstructor.prototype.update = function (data, enc) {
+ if (typeof data === 'string') {
+ data = new Buffer(data, enc)
+ }
+
+ this.buffers.push(data)
+ return this
+}
+
+HashNoConstructor.prototype.digest = function (enc) {
+ var buf = Buffer.concat(this.buffers)
+ var r = this._hash(buf)
+ this.buffers = null
+
+ return enc ? r.toString(enc) : r
+}
+
+function Hash(hash) {
+ Transform.call(this)
+
+ this._hash = hash
+}
+
+inherits(Hash, Transform)
+
+Hash.prototype._transform = function (data, enc, next) {
+ if (enc) data = new Buffer(data, enc)
+
+ this._hash.update(data)
+
+ next()
+}
+
+Hash.prototype._flush = function (next) {
+ this.push(this._hash.digest())
+ this._hash = null
+
+ next()
+}
+
+Hash.prototype.update = function (data, enc) {
+ if (typeof data === 'string') {
+ data = new Buffer(data, enc)
+ }
+
+ this._hash.update(data)
+ return this
+}
+
+Hash.prototype.digest = function (enc) {
+ var outData = this._hash.digest()
+
+ return enc ? outData.toString(enc) : outData
+}
+
+module.exports = function createHash (alg) {
+ if ('md5' === alg) return new HashNoConstructor(md5)
+ if ('rmd160' === alg) return new HashNoConstructor(rmd160)
+
+ return new Hash(sha(alg))
+}
+
+}).call(this,require("buffer").Buffer)
+},{"./md5":35,"buffer":2,"inherits":36,"ripemd160":37,"sha.js":39,"stream":21}],34:[function(require,module,exports){
+(function (Buffer){
+'use strict';
+var intSize = 4;
+var zeroBuffer = new Buffer(intSize); zeroBuffer.fill(0);
+var chrsz = 8;
+
+function toArray(buf, bigEndian) {
+ if ((buf.length % intSize) !== 0) {
+ var len = buf.length + (intSize - (buf.length % intSize));
+ buf = Buffer.concat([buf, zeroBuffer], len);
+ }
+
+ var arr = [];
+ var fn = bigEndian ? buf.readInt32BE : buf.readInt32LE;
+ for (var i = 0; i < buf.length; i += intSize) {
+ arr.push(fn.call(buf, i));
+ }
+ return arr;
+}
+
+function toBuffer(arr, size, bigEndian) {
+ var buf = new Buffer(size);
+ var fn = bigEndian ? buf.writeInt32BE : buf.writeInt32LE;
+ for (var i = 0; i < arr.length; i++) {
+ fn.call(buf, arr[i], i * 4, true);
+ }
+ return buf;
+}
+
+function hash(buf, fn, hashSize, bigEndian) {
+ if (!Buffer.isBuffer(buf)) buf = new Buffer(buf);
+ var arr = fn(toArray(buf, bigEndian), buf.length * chrsz);
+ return toBuffer(arr, hashSize, bigEndian);
+}
+exports.hash = hash;
+}).call(this,require("buffer").Buffer)
+},{"buffer":2}],35:[function(require,module,exports){
+'use strict';
+/*
+ * 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.
+ */
+
+var helpers = require('./helpers');
+
+/*
+ * Calculate the MD5 of an array of little-endian words, and a bit length
+ */
+function core_md5(x, len)
+{
+ /* append padding */
+ x[len >> 5] |= 0x80 << ((len) % 32);
+ x[(((len + 64) >>> 9) << 4) + 14] = len;
+
+ var a = 1732584193;
+ var b = -271733879;
+ var c = -1732584194;
+ var d = 271733878;
+
+ for(var i = 0; i < x.length; i += 16)
+ {
+ var olda = a;
+ var oldb = b;
+ var oldc = c;
+ var 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 Array(a, b, c, d);
+
+}
+
+/*
+ * These functions implement the four basic operations the algorithm uses.
+ */
+function md5_cmn(q, a, b, x, s, t)
+{
+ return safe_add(bit_rol(safe_add(safe_add(a, q), safe_add(x, t)), s),b);
+}
+function md5_ff(a, b, c, d, x, s, t)
+{
+ return md5_cmn((b & c) | ((~b) & d), a, b, x, s, t);
+}
+function md5_gg(a, b, c, d, x, s, t)
+{
+ return md5_cmn((b & d) | (c & (~d)), a, b, x, s, t);
+}
+function md5_hh(a, b, c, d, x, s, t)
+{
+ return md5_cmn(b ^ c ^ d, a, b, x, s, t);
+}
+function md5_ii(a, b, c, d, x, s, t)
+{
+ return md5_cmn(c ^ (b | (~d)), a, b, x, s, t);
+}
+
+/*
+ * 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 & 0xFFFF) + (y & 0xFFFF);
+ var msw = (x >> 16) + (y >> 16) + (lsw >> 16);
+ return (msw << 16) | (lsw & 0xFFFF);
+}
+
+/*
+ * Bitwise rotate a 32-bit number to the left.
+ */
+function bit_rol(num, cnt)
+{
+ return (num << cnt) | (num >>> (32 - cnt));
+}
+
+module.exports = function md5(buf) {
+ return helpers.hash(buf, core_md5, 16);
+};
+},{"./helpers":34}],36:[function(require,module,exports){
+arguments[4][7][0].apply(exports,arguments)
+},{"dup":7}],37:[function(require,module,exports){
+(function (Buffer){
+/*
+CryptoJS v3.1.2
+code.google.com/p/crypto-js
+(c) 2009-2013 by Jeff Mott. All rights reserved.
+code.google.com/p/crypto-js/wiki/License
+*/
+/** @preserve
+(c) 2012 by Cédric Mesnil. All rights reserved.
+
+Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
+
+ - Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
+ - Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+*/
+
+// constants table
+var zl = [
+ 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15,
+ 7, 4, 13, 1, 10, 6, 15, 3, 12, 0, 9, 5, 2, 14, 11, 8,
+ 3, 10, 14, 4, 9, 15, 8, 1, 2, 7, 0, 6, 13, 11, 5, 12,
+ 1, 9, 11, 10, 0, 8, 12, 4, 13, 3, 7, 15, 14, 5, 6, 2,
+ 4, 0, 5, 9, 7, 12, 2, 10, 14, 1, 3, 8, 11, 6, 15, 13
+]
+
+var zr = [
+ 5, 14, 7, 0, 9, 2, 11, 4, 13, 6, 15, 8, 1, 10, 3, 12,
+ 6, 11, 3, 7, 0, 13, 5, 10, 14, 15, 8, 12, 4, 9, 1, 2,
+ 15, 5, 1, 3, 7, 14, 6, 9, 11, 8, 12, 2, 10, 0, 4, 13,
+ 8, 6, 4, 1, 3, 11, 15, 0, 5, 12, 2, 13, 9, 7, 10, 14,
+ 12, 15, 10, 4, 1, 5, 8, 7, 6, 2, 13, 14, 0, 3, 9, 11
+]
+
+var sl = [
+ 11, 14, 15, 12, 5, 8, 7, 9, 11, 13, 14, 15, 6, 7, 9, 8,
+ 7, 6, 8, 13, 11, 9, 7, 15, 7, 12, 15, 9, 11, 7, 13, 12,
+ 11, 13, 6, 7, 14, 9, 13, 15, 14, 8, 13, 6, 5, 12, 7, 5,
+ 11, 12, 14, 15, 14, 15, 9, 8, 9, 14, 5, 6, 8, 6, 5, 12,
+ 9, 15, 5, 11, 6, 8, 13, 12, 5, 12, 13, 14, 11, 8, 5, 6
+]
+
+var sr = [
+ 8, 9, 9, 11, 13, 15, 15, 5, 7, 7, 8, 11, 14, 14, 12, 6,
+ 9, 13, 15, 7, 12, 8, 9, 11, 7, 7, 12, 7, 6, 15, 13, 11,
+ 9, 7, 15, 11, 8, 6, 6, 14, 12, 13, 5, 14, 13, 13, 7, 5,
+ 15, 5, 8, 11, 14, 14, 6, 14, 6, 9, 12, 9, 12, 5, 15, 8,
+ 8, 5, 12, 9, 12, 5, 14, 6, 8, 13, 6, 5, 15, 13, 11, 11
+]
+
+var hl = [0x00000000, 0x5A827999, 0x6ED9EBA1, 0x8F1BBCDC, 0xA953FD4E]
+var hr = [0x50A28BE6, 0x5C4DD124, 0x6D703EF3, 0x7A6D76E9, 0x00000000]
+
+function bytesToWords (bytes) {
+ var words = []
+ for (var i = 0, b = 0; i < bytes.length; i++, b += 8) {
+ words[b >>> 5] |= bytes[i] << (24 - b % 32)
+ }
+ return words
+}
+
+function wordsToBytes (words) {
+ var bytes = []
+ for (var b = 0; b < words.length * 32; b += 8) {
+ bytes.push((words[b >>> 5] >>> (24 - b % 32)) & 0xFF)
+ }
+ return bytes
+}
+
+function processBlock (H, M, offset) {
+ // swap endian
+ for (var i = 0; i < 16; i++) {
+ var offset_i = offset + i
+ var M_offset_i = M[offset_i]
+
+ // Swap
+ M[offset_i] = (
+ (((M_offset_i << 8) | (M_offset_i >>> 24)) & 0x00ff00ff) |
+ (((M_offset_i << 24) | (M_offset_i >>> 8)) & 0xff00ff00)
+ )
+ }
+
+ // Working variables
+ var al, bl, cl, dl, el
+ var ar, br, cr, dr, er
+
+ ar = al = H[0]
+ br = bl = H[1]
+ cr = cl = H[2]
+ dr = dl = H[3]
+ er = el = H[4]
+
+ // computation
+ var t
+ for (i = 0; i < 80; i += 1) {
+ t = (al + M[offset + zl[i]]) | 0
+ if (i < 16) {
+ t += f1(bl, cl, dl) + hl[0]
+ } else if (i < 32) {
+ t += f2(bl, cl, dl) + hl[1]
+ } else if (i < 48) {
+ t += f3(bl, cl, dl) + hl[2]
+ } else if (i < 64) {
+ t += f4(bl, cl, dl) + hl[3]
+ } else {// if (i<80) {
+ t += f5(bl, cl, dl) + hl[4]
+ }
+ t = t | 0
+ t = rotl(t, sl[i])
+ t = (t + el) | 0
+ al = el
+ el = dl
+ dl = rotl(cl, 10)
+ cl = bl
+ bl = t
+
+ t = (ar + M[offset + zr[i]]) | 0
+ if (i < 16) {
+ t += f5(br, cr, dr) + hr[0]
+ } else if (i < 32) {
+ t += f4(br, cr, dr) + hr[1]
+ } else if (i < 48) {
+ t += f3(br, cr, dr) + hr[2]
+ } else if (i < 64) {
+ t += f2(br, cr, dr) + hr[3]
+ } else {// if (i<80) {
+ t += f1(br, cr, dr) + hr[4]
+ }
+
+ t = t | 0
+ t = rotl(t, sr[i])
+ t = (t + er) | 0
+ ar = er
+ er = dr
+ dr = rotl(cr, 10)
+ cr = br
+ br = t
+ }
+
+ // intermediate hash value
+ t = (H[1] + cl + dr) | 0
+ H[1] = (H[2] + dl + er) | 0
+ H[2] = (H[3] + el + ar) | 0
+ H[3] = (H[4] + al + br) | 0
+ H[4] = (H[0] + bl + cr) | 0
+ H[0] = t
+}
+
+function f1 (x, y, z) {
+ return ((x) ^ (y) ^ (z))
+}
+
+function f2 (x, y, z) {
+ return (((x) & (y)) | ((~x) & (z)))
+}
+
+function f3 (x, y, z) {
+ return (((x) | (~(y))) ^ (z))
+}
+
+function f4 (x, y, z) {
+ return (((x) & (z)) | ((y) & (~(z))))
+}
+
+function f5 (x, y, z) {
+ return ((x) ^ ((y) | (~(z))))
+}
+
+function rotl (x, n) {
+ return (x << n) | (x >>> (32 - n))
+}
+
+function ripemd160 (message) {
+ var H = [0x67452301, 0xEFCDAB89, 0x98BADCFE, 0x10325476, 0xC3D2E1F0]
+
+ if (typeof message === 'string') {
+ message = new Buffer(message, 'utf8')
+ }
+
+ var m = bytesToWords(message)
+
+ var nBitsLeft = message.length * 8
+ var nBitsTotal = message.length * 8
+
+ // Add padding
+ m[nBitsLeft >>> 5] |= 0x80 << (24 - nBitsLeft % 32)
+ m[(((nBitsLeft + 64) >>> 9) << 4) + 14] = (
+ (((nBitsTotal << 8) | (nBitsTotal >>> 24)) & 0x00ff00ff) |
+ (((nBitsTotal << 24) | (nBitsTotal >>> 8)) & 0xff00ff00)
+ )
+
+ for (var i = 0; i < m.length; i += 16) {
+ processBlock(H, m, i)
+ }
+
+ // swap endian
+ for (i = 0; i < 5; i++) {
+ // shortcut
+ var H_i = H[i]
+
+ // Swap
+ H[i] = (((H_i << 8) | (H_i >>> 24)) & 0x00ff00ff) |
+ (((H_i << 24) | (H_i >>> 8)) & 0xff00ff00)
+ }
+
+ var digestbytes = wordsToBytes(H)
+ return new Buffer(digestbytes)
+}
+
+module.exports = ripemd160
+
+}).call(this,require("buffer").Buffer)
+},{"buffer":2}],38:[function(require,module,exports){
+(function (Buffer){
+// prototype class for hash functions
+function Hash (blockSize, finalSize) {
+ this._block = new Buffer(blockSize)
+ this._finalSize = finalSize
+ this._blockSize = blockSize
+ this._len = 0
+ this._s = 0
+}
+
+Hash.prototype.update = function (data, enc) {
+ if (typeof data === 'string') {
+ enc = enc || 'utf8'
+ data = new Buffer(data, enc)
+ }
+
+ var l = this._len += data.length
+ var s = this._s || 0
+ var f = 0
+ var buffer = this._block
+
+ while (s < l) {
+ var t = Math.min(data.length, f + this._blockSize - (s % this._blockSize))
+ var ch = (t - f)
+
+ for (var i = 0; i < ch; i++) {
+ buffer[(s % this._blockSize) + i] = data[i + f]
+ }
+
+ s += ch
+ f += ch
+
+ if ((s % this._blockSize) === 0) {
+ this._update(buffer)
+ }
+ }
+ this._s = s
+
+ return this
+}
+
+Hash.prototype.digest = function (enc) {
+ // Suppose the length of the message M, in bits, is l
+ var l = this._len * 8
+
+ // Append the bit 1 to the end of the message
+ this._block[this._len % this._blockSize] = 0x80
+
+ // and then k zero bits, where k is the smallest non-negative solution to the equation (l + 1 + k) === finalSize mod blockSize
+ this._block.fill(0, this._len % this._blockSize + 1)
+
+ if (l % (this._blockSize * 8) >= this._finalSize * 8) {
+ this._update(this._block)
+ this._block.fill(0)
+ }
+
+ // to this append the block which is equal to the number l written in binary
+ // TODO: handle case where l is > Math.pow(2, 29)
+ this._block.writeInt32BE(l, this._blockSize - 4)
+
+ var hash = this._update(this._block) || this._hash()
+
+ return enc ? hash.toString(enc) : hash
+}
+
+Hash.prototype._update = function () {
+ throw new Error('_update must be implemented by subclass')
+}
+
+module.exports = Hash
+
+}).call(this,require("buffer").Buffer)
+},{"buffer":2}],39:[function(require,module,exports){
+var exports = module.exports = function SHA (algorithm) {
+ algorithm = algorithm.toLowerCase()
+
+ var Algorithm = exports[algorithm]
+ if (!Algorithm) throw new Error(algorithm + ' is not supported (we accept pull requests)')
+
+ return new Algorithm()
+}
+
+exports.sha = require('./sha')
+exports.sha1 = require('./sha1')
+exports.sha224 = require('./sha224')
+exports.sha256 = require('./sha256')
+exports.sha384 = require('./sha384')
+exports.sha512 = require('./sha512')
+
+},{"./sha":40,"./sha1":41,"./sha224":42,"./sha256":43,"./sha384":44,"./sha512":45}],40:[function(require,module,exports){
+(function (Buffer){
+/*
+ * A JavaScript implementation of the Secure Hash Algorithm, SHA-0, as defined
+ * in FIPS PUB 180-1
+ * This source code is derived from sha1.js of the same repository.
+ * The difference between SHA-0 and SHA-1 is just a bitwise rotate left
+ * operation was added.
+ */
+
+var inherits = require('inherits')
+var Hash = require('./hash')
+
+var W = new Array(80)
+
+function Sha () {
+ this.init()
+ this._w = W
+
+ Hash.call(this, 64, 56)
+}
+
+inherits(Sha, Hash)
+
+Sha.prototype.init = function () {
+ this._a = 0x67452301 | 0
+ this._b = 0xefcdab89 | 0
+ this._c = 0x98badcfe | 0
+ this._d = 0x10325476 | 0
+ this._e = 0xc3d2e1f0 | 0
+
+ return this
+}
+
+/*
+ * Bitwise rotate a 32-bit number to the left.
+ */
+function rol (num, cnt) {
+ return (num << cnt) | (num >>> (32 - cnt))
+}
+
+Sha.prototype._update = function (M) {
+ var W = this._w
+
+ var a = this._a
+ var b = this._b
+ var c = this._c
+ var d = this._d
+ var e = this._e
+
+ var j = 0, k
+
+ /*
+ * SHA-1 has a bitwise rotate left operation. But, SHA is not
+ * function calcW() { return rol(W[j - 3] ^ W[j - 8] ^ W[j - 14] ^ W[j - 16], 1) }
+ */
+ function calcW () { return W[j - 3] ^ W[j - 8] ^ W[j - 14] ^ W[j - 16] }
+ function loop (w, f) {
+ W[j] = w
+
+ var t = rol(a, 5) + f + e + w + k
+
+ e = d
+ d = c
+ c = rol(b, 30)
+ b = a
+ a = t
+ j++
+ }
+
+ k = 1518500249
+ while (j < 16) loop(M.readInt32BE(j * 4), (b & c) | ((~b) & d))
+ while (j < 20) loop(calcW(), (b & c) | ((~b) & d))
+ k = 1859775393
+ while (j < 40) loop(calcW(), b ^ c ^ d)
+ k = -1894007588
+ while (j < 60) loop(calcW(), (b & c) | (b & d) | (c & d))
+ k = -899497514
+ while (j < 80) loop(calcW(), b ^ c ^ d)
+
+ this._a = (a + this._a) | 0
+ this._b = (b + this._b) | 0
+ this._c = (c + this._c) | 0
+ this._d = (d + this._d) | 0
+ this._e = (e + this._e) | 0
+}
+
+Sha.prototype._hash = function () {
+ var H = new Buffer(20)
+
+ H.writeInt32BE(this._a | 0, 0)
+ H.writeInt32BE(this._b | 0, 4)
+ H.writeInt32BE(this._c | 0, 8)
+ H.writeInt32BE(this._d | 0, 12)
+ H.writeInt32BE(this._e | 0, 16)
+
+ return H
+}
+
+module.exports = Sha
+
+
+}).call(this,require("buffer").Buffer)
+},{"./hash":38,"buffer":2,"inherits":36}],41:[function(require,module,exports){
+(function (Buffer){
+/*
+ * 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.
+ */
+
+var inherits = require('inherits')
+var Hash = require('./hash')
+
+var W = new Array(80)
+
+function Sha1 () {
+ this.init()
+ this._w = W
+
+ Hash.call(this, 64, 56)
+}
+
+inherits(Sha1, Hash)
+
+Sha1.prototype.init = function () {
+ this._a = 0x67452301 | 0
+ this._b = 0xefcdab89 | 0
+ this._c = 0x98badcfe | 0
+ this._d = 0x10325476 | 0
+ this._e = 0xc3d2e1f0 | 0
+
+ return this
+}
+
+/*
+ * Bitwise rotate a 32-bit number to the left.
+ */
+function rol (num, cnt) {
+ return (num << cnt) | (num >>> (32 - cnt))
+}
+
+Sha1.prototype._update = function (M) {
+ var W = this._w
+
+ var a = this._a
+ var b = this._b
+ var c = this._c
+ var d = this._d
+ var e = this._e
+
+ var j = 0, k
+
+ function calcW () { return rol(W[j - 3] ^ W[j - 8] ^ W[j - 14] ^ W[j - 16], 1) }
+ function loop (w, f) {
+ W[j] = w
+
+ var t = rol(a, 5) + f + e + w + k
+
+ e = d
+ d = c
+ c = rol(b, 30)
+ b = a
+ a = t
+ j++
+ }
+
+ k = 1518500249
+ while (j < 16) loop(M.readInt32BE(j * 4), (b & c) | ((~b) & d))
+ while (j < 20) loop(calcW(), (b & c) | ((~b) & d))
+ k = 1859775393
+ while (j < 40) loop(calcW(), b ^ c ^ d)
+ k = -1894007588
+ while (j < 60) loop(calcW(), (b & c) | (b & d) | (c & d))
+ k = -899497514
+ while (j < 80) loop(calcW(), b ^ c ^ d)
+
+ this._a = (a + this._a) | 0
+ this._b = (b + this._b) | 0
+ this._c = (c + this._c) | 0
+ this._d = (d + this._d) | 0
+ this._e = (e + this._e) | 0
+}
+
+Sha1.prototype._hash = function () {
+ var H = new Buffer(20)
+
+ H.writeInt32BE(this._a | 0, 0)
+ H.writeInt32BE(this._b | 0, 4)
+ H.writeInt32BE(this._c | 0, 8)
+ H.writeInt32BE(this._d | 0, 12)
+ H.writeInt32BE(this._e | 0, 16)
+
+ return H
+}
+
+module.exports = Sha1
+
+}).call(this,require("buffer").Buffer)
+},{"./hash":38,"buffer":2,"inherits":36}],42:[function(require,module,exports){
+(function (Buffer){
+/**
+ * A JavaScript implementation of the Secure Hash Algorithm, SHA-256, as defined
+ * in FIPS 180-2
+ * Version 2.2-beta Copyright Angel Marin, Paul Johnston 2000 - 2009.
+ * Other contributors: Greg Holt, Andrew Kepert, Ydnar, Lostinet
+ *
+ */
+
+var inherits = require('inherits')
+var Sha256 = require('./sha256')
+var Hash = require('./hash')
+
+var W = new Array(64)
+
+function Sha224 () {
+ this.init()
+
+ this._w = W // new Array(64)
+
+ Hash.call(this, 64, 56)
+}
+
+inherits(Sha224, Sha256)
+
+Sha224.prototype.init = function () {
+ this._a = 0xc1059ed8 | 0
+ this._b = 0x367cd507 | 0
+ this._c = 0x3070dd17 | 0
+ this._d = 0xf70e5939 | 0
+ this._e = 0xffc00b31 | 0
+ this._f = 0x68581511 | 0
+ this._g = 0x64f98fa7 | 0
+ this._h = 0xbefa4fa4 | 0
+
+ return this
+}
+
+Sha224.prototype._hash = function () {
+ var H = new Buffer(28)
+
+ H.writeInt32BE(this._a, 0)
+ H.writeInt32BE(this._b, 4)
+ H.writeInt32BE(this._c, 8)
+ H.writeInt32BE(this._d, 12)
+ H.writeInt32BE(this._e, 16)
+ H.writeInt32BE(this._f, 20)
+ H.writeInt32BE(this._g, 24)
+
+ return H
+}
+
+module.exports = Sha224
+
+}).call(this,require("buffer").Buffer)
+},{"./hash":38,"./sha256":43,"buffer":2,"inherits":36}],43:[function(require,module,exports){
+(function (Buffer){
+/**
+ * A JavaScript implementation of the Secure Hash Algorithm, SHA-256, as defined
+ * in FIPS 180-2
+ * Version 2.2-beta Copyright Angel Marin, Paul Johnston 2000 - 2009.
+ * Other contributors: Greg Holt, Andrew Kepert, Ydnar, Lostinet
+ *
+ */
+
+var inherits = require('inherits')
+var Hash = require('./hash')
+
+var K = [
+ 0x428A2F98, 0x71374491, 0xB5C0FBCF, 0xE9B5DBA5,
+ 0x3956C25B, 0x59F111F1, 0x923F82A4, 0xAB1C5ED5,
+ 0xD807AA98, 0x12835B01, 0x243185BE, 0x550C7DC3,
+ 0x72BE5D74, 0x80DEB1FE, 0x9BDC06A7, 0xC19BF174,
+ 0xE49B69C1, 0xEFBE4786, 0x0FC19DC6, 0x240CA1CC,
+ 0x2DE92C6F, 0x4A7484AA, 0x5CB0A9DC, 0x76F988DA,
+ 0x983E5152, 0xA831C66D, 0xB00327C8, 0xBF597FC7,
+ 0xC6E00BF3, 0xD5A79147, 0x06CA6351, 0x14292967,
+ 0x27B70A85, 0x2E1B2138, 0x4D2C6DFC, 0x53380D13,
+ 0x650A7354, 0x766A0ABB, 0x81C2C92E, 0x92722C85,
+ 0xA2BFE8A1, 0xA81A664B, 0xC24B8B70, 0xC76C51A3,
+ 0xD192E819, 0xD6990624, 0xF40E3585, 0x106AA070,
+ 0x19A4C116, 0x1E376C08, 0x2748774C, 0x34B0BCB5,
+ 0x391C0CB3, 0x4ED8AA4A, 0x5B9CCA4F, 0x682E6FF3,
+ 0x748F82EE, 0x78A5636F, 0x84C87814, 0x8CC70208,
+ 0x90BEFFFA, 0xA4506CEB, 0xBEF9A3F7, 0xC67178F2
+]
+
+var W = new Array(64)
+
+function Sha256 () {
+ this.init()
+
+ this._w = W // new Array(64)
+
+ Hash.call(this, 64, 56)
+}
+
+inherits(Sha256, Hash)
+
+Sha256.prototype.init = function () {
+ this._a = 0x6a09e667 | 0
+ this._b = 0xbb67ae85 | 0
+ this._c = 0x3c6ef372 | 0
+ this._d = 0xa54ff53a | 0
+ this._e = 0x510e527f | 0
+ this._f = 0x9b05688c | 0
+ this._g = 0x1f83d9ab | 0
+ this._h = 0x5be0cd19 | 0
+
+ return this
+}
+
+function S (X, n) {
+ return (X >>> n) | (X << (32 - n))
+}
+
+function R (X, n) {
+ return (X >>> n)
+}
+
+function Ch (x, y, z) {
+ return ((x & y) ^ ((~x) & z))
+}
+
+function Maj (x, y, z) {
+ return ((x & y) ^ (x & z) ^ (y & z))
+}
+
+function Sigma0256 (x) {
+ return (S(x, 2) ^ S(x, 13) ^ S(x, 22))
+}
+
+function Sigma1256 (x) {
+ return (S(x, 6) ^ S(x, 11) ^ S(x, 25))
+}
+
+function Gamma0256 (x) {
+ return (S(x, 7) ^ S(x, 18) ^ R(x, 3))
+}
+
+function Gamma1256 (x) {
+ return (S(x, 17) ^ S(x, 19) ^ R(x, 10))
+}
+
+Sha256.prototype._update = function (M) {
+ var W = this._w
+
+ var a = this._a | 0
+ var b = this._b | 0
+ var c = this._c | 0
+ var d = this._d | 0
+ var e = this._e | 0
+ var f = this._f | 0
+ var g = this._g | 0
+ var h = this._h | 0
+
+ var j = 0
+
+ function calcW () { return Gamma1256(W[j - 2]) + W[j - 7] + Gamma0256(W[j - 15]) + W[j - 16] }
+ function loop (w) {
+ W[j] = w
+
+ var T1 = h + Sigma1256(e) + Ch(e, f, g) + K[j] + w
+ var T2 = Sigma0256(a) + Maj(a, b, c)
+
+ h = g
+ g = f
+ f = e
+ e = d + T1
+ d = c
+ c = b
+ b = a
+ a = T1 + T2
+
+ j++
+ }
+
+ while (j < 16) loop(M.readInt32BE(j * 4))
+ while (j < 64) loop(calcW())
+
+ this._a = (a + this._a) | 0
+ this._b = (b + this._b) | 0
+ this._c = (c + this._c) | 0
+ this._d = (d + this._d) | 0
+ this._e = (e + this._e) | 0
+ this._f = (f + this._f) | 0
+ this._g = (g + this._g) | 0
+ this._h = (h + this._h) | 0
+}
+
+Sha256.prototype._hash = function () {
+ var H = new Buffer(32)
+
+ H.writeInt32BE(this._a, 0)
+ H.writeInt32BE(this._b, 4)
+ H.writeInt32BE(this._c, 8)
+ H.writeInt32BE(this._d, 12)
+ H.writeInt32BE(this._e, 16)
+ H.writeInt32BE(this._f, 20)
+ H.writeInt32BE(this._g, 24)
+ H.writeInt32BE(this._h, 28)
+
+ return H
+}
+
+module.exports = Sha256
+
+}).call(this,require("buffer").Buffer)
+},{"./hash":38,"buffer":2,"inherits":36}],44:[function(require,module,exports){
+(function (Buffer){
+var inherits = require('inherits')
+var SHA512 = require('./sha512')
+var Hash = require('./hash')
+
+var W = new Array(160)
+
+function Sha384 () {
+ this.init()
+ this._w = W
+
+ Hash.call(this, 128, 112)
+}
+
+inherits(Sha384, SHA512)
+
+Sha384.prototype.init = function () {
+ this._a = 0xcbbb9d5d | 0
+ this._b = 0x629a292a | 0
+ this._c = 0x9159015a | 0
+ this._d = 0x152fecd8 | 0
+ this._e = 0x67332667 | 0
+ this._f = 0x8eb44a87 | 0
+ this._g = 0xdb0c2e0d | 0
+ this._h = 0x47b5481d | 0
+
+ this._al = 0xc1059ed8 | 0
+ this._bl = 0x367cd507 | 0
+ this._cl = 0x3070dd17 | 0
+ this._dl = 0xf70e5939 | 0
+ this._el = 0xffc00b31 | 0
+ this._fl = 0x68581511 | 0
+ this._gl = 0x64f98fa7 | 0
+ this._hl = 0xbefa4fa4 | 0
+
+ return this
+}
+
+Sha384.prototype._hash = function () {
+ var H = new Buffer(48)
+
+ function writeInt64BE (h, l, offset) {
+ H.writeInt32BE(h, offset)
+ H.writeInt32BE(l, offset + 4)
+ }
+
+ writeInt64BE(this._a, this._al, 0)
+ writeInt64BE(this._b, this._bl, 8)
+ writeInt64BE(this._c, this._cl, 16)
+ writeInt64BE(this._d, this._dl, 24)
+ writeInt64BE(this._e, this._el, 32)
+ writeInt64BE(this._f, this._fl, 40)
+
+ return H
+}
+
+module.exports = Sha384
+
+}).call(this,require("buffer").Buffer)
+},{"./hash":38,"./sha512":45,"buffer":2,"inherits":36}],45:[function(require,module,exports){
+(function (Buffer){
+var inherits = require('inherits')
+var Hash = require('./hash')
+
+var K = [
+ 0x428a2f98, 0xd728ae22, 0x71374491, 0x23ef65cd,
+ 0xb5c0fbcf, 0xec4d3b2f, 0xe9b5dba5, 0x8189dbbc,
+ 0x3956c25b, 0xf348b538, 0x59f111f1, 0xb605d019,
+ 0x923f82a4, 0xaf194f9b, 0xab1c5ed5, 0xda6d8118,
+ 0xd807aa98, 0xa3030242, 0x12835b01, 0x45706fbe,
+ 0x243185be, 0x4ee4b28c, 0x550c7dc3, 0xd5ffb4e2,
+ 0x72be5d74, 0xf27b896f, 0x80deb1fe, 0x3b1696b1,
+ 0x9bdc06a7, 0x25c71235, 0xc19bf174, 0xcf692694,
+ 0xe49b69c1, 0x9ef14ad2, 0xefbe4786, 0x384f25e3,
+ 0x0fc19dc6, 0x8b8cd5b5, 0x240ca1cc, 0x77ac9c65,
+ 0x2de92c6f, 0x592b0275, 0x4a7484aa, 0x6ea6e483,
+ 0x5cb0a9dc, 0xbd41fbd4, 0x76f988da, 0x831153b5,
+ 0x983e5152, 0xee66dfab, 0xa831c66d, 0x2db43210,
+ 0xb00327c8, 0x98fb213f, 0xbf597fc7, 0xbeef0ee4,
+ 0xc6e00bf3, 0x3da88fc2, 0xd5a79147, 0x930aa725,
+ 0x06ca6351, 0xe003826f, 0x14292967, 0x0a0e6e70,
+ 0x27b70a85, 0x46d22ffc, 0x2e1b2138, 0x5c26c926,
+ 0x4d2c6dfc, 0x5ac42aed, 0x53380d13, 0x9d95b3df,
+ 0x650a7354, 0x8baf63de, 0x766a0abb, 0x3c77b2a8,
+ 0x81c2c92e, 0x47edaee6, 0x92722c85, 0x1482353b,
+ 0xa2bfe8a1, 0x4cf10364, 0xa81a664b, 0xbc423001,
+ 0xc24b8b70, 0xd0f89791, 0xc76c51a3, 0x0654be30,
+ 0xd192e819, 0xd6ef5218, 0xd6990624, 0x5565a910,
+ 0xf40e3585, 0x5771202a, 0x106aa070, 0x32bbd1b8,
+ 0x19a4c116, 0xb8d2d0c8, 0x1e376c08, 0x5141ab53,
+ 0x2748774c, 0xdf8eeb99, 0x34b0bcb5, 0xe19b48a8,
+ 0x391c0cb3, 0xc5c95a63, 0x4ed8aa4a, 0xe3418acb,
+ 0x5b9cca4f, 0x7763e373, 0x682e6ff3, 0xd6b2b8a3,
+ 0x748f82ee, 0x5defb2fc, 0x78a5636f, 0x43172f60,
+ 0x84c87814, 0xa1f0ab72, 0x8cc70208, 0x1a6439ec,
+ 0x90befffa, 0x23631e28, 0xa4506ceb, 0xde82bde9,
+ 0xbef9a3f7, 0xb2c67915, 0xc67178f2, 0xe372532b,
+ 0xca273ece, 0xea26619c, 0xd186b8c7, 0x21c0c207,
+ 0xeada7dd6, 0xcde0eb1e, 0xf57d4f7f, 0xee6ed178,
+ 0x06f067aa, 0x72176fba, 0x0a637dc5, 0xa2c898a6,
+ 0x113f9804, 0xbef90dae, 0x1b710b35, 0x131c471b,
+ 0x28db77f5, 0x23047d84, 0x32caab7b, 0x40c72493,
+ 0x3c9ebe0a, 0x15c9bebc, 0x431d67c4, 0x9c100d4c,
+ 0x4cc5d4be, 0xcb3e42b6, 0x597f299c, 0xfc657e2a,
+ 0x5fcb6fab, 0x3ad6faec, 0x6c44198c, 0x4a475817
+]
+
+var W = new Array(160)
+
+function Sha512 () {
+ this.init()
+ this._w = W
+
+ Hash.call(this, 128, 112)
+}
+
+inherits(Sha512, Hash)
+
+Sha512.prototype.init = function () {
+ this._a = 0x6a09e667 | 0
+ this._b = 0xbb67ae85 | 0
+ this._c = 0x3c6ef372 | 0
+ this._d = 0xa54ff53a | 0
+ this._e = 0x510e527f | 0
+ this._f = 0x9b05688c | 0
+ this._g = 0x1f83d9ab | 0
+ this._h = 0x5be0cd19 | 0
+
+ this._al = 0xf3bcc908 | 0
+ this._bl = 0x84caa73b | 0
+ this._cl = 0xfe94f82b | 0
+ this._dl = 0x5f1d36f1 | 0
+ this._el = 0xade682d1 | 0
+ this._fl = 0x2b3e6c1f | 0
+ this._gl = 0xfb41bd6b | 0
+ this._hl = 0x137e2179 | 0
+
+ return this
+}
+
+function S (X, Xl, n) {
+ return (X >>> n) | (Xl << (32 - n))
+}
+
+function Ch (x, y, z) {
+ return ((x & y) ^ ((~x) & z))
+}
+
+function Maj (x, y, z) {
+ return ((x & y) ^ (x & z) ^ (y & z))
+}
+
+Sha512.prototype._update = function (M) {
+ var W = this._w
+
+ var a = this._a | 0
+ var b = this._b | 0
+ var c = this._c | 0
+ var d = this._d | 0
+ var e = this._e | 0
+ var f = this._f | 0
+ var g = this._g | 0
+ var h = this._h | 0
+
+ var al = this._al | 0
+ var bl = this._bl | 0
+ var cl = this._cl | 0
+ var dl = this._dl | 0
+ var el = this._el | 0
+ var fl = this._fl | 0
+ var gl = this._gl | 0
+ var hl = this._hl | 0
+
+ var i = 0, j = 0
+ var Wi, Wil
+ function calcW () {
+ var x = W[j - 15 * 2]
+ var xl = W[j - 15 * 2 + 1]
+ var gamma0 = S(x, xl, 1) ^ S(x, xl, 8) ^ (x >>> 7)
+ var gamma0l = S(xl, x, 1) ^ S(xl, x, 8) ^ S(xl, x, 7)
+
+ x = W[j - 2 * 2]
+ xl = W[j - 2 * 2 + 1]
+ var gamma1 = S(x, xl, 19) ^ S(xl, x, 29) ^ (x >>> 6)
+ var gamma1l = S(xl, x, 19) ^ S(x, xl, 29) ^ S(xl, x, 6)
+
+ // W[i] = gamma0 + W[i - 7] + gamma1 + W[i - 16]
+ var Wi7 = W[j - 7 * 2]
+ var Wi7l = W[j - 7 * 2 + 1]
+
+ var Wi16 = W[j - 16 * 2]
+ var Wi16l = W[j - 16 * 2 + 1]
+
+ Wil = gamma0l + Wi7l
+ Wi = gamma0 + Wi7 + ((Wil >>> 0) < (gamma0l >>> 0) ? 1 : 0)
+ Wil = Wil + gamma1l
+ Wi = Wi + gamma1 + ((Wil >>> 0) < (gamma1l >>> 0) ? 1 : 0)
+ Wil = Wil + Wi16l
+ Wi = Wi + Wi16 + ((Wil >>> 0) < (Wi16l >>> 0) ? 1 : 0)
+ }
+
+ function loop () {
+ W[j] = Wi
+ W[j + 1] = Wil
+
+ var maj = Maj(a, b, c)
+ var majl = Maj(al, bl, cl)
+
+ var sigma0h = S(a, al, 28) ^ S(al, a, 2) ^ S(al, a, 7)
+ var sigma0l = S(al, a, 28) ^ S(a, al, 2) ^ S(a, al, 7)
+ var sigma1h = S(e, el, 14) ^ S(e, el, 18) ^ S(el, e, 9)
+ var sigma1l = S(el, e, 14) ^ S(el, e, 18) ^ S(e, el, 9)
+
+ // t1 = h + sigma1 + ch + K[i] + W[i]
+ var Ki = K[j]
+ var Kil = K[j + 1]
+
+ var ch = Ch(e, f, g)
+ var chl = Ch(el, fl, gl)
+
+ var t1l = hl + sigma1l
+ var t1 = h + sigma1h + ((t1l >>> 0) < (hl >>> 0) ? 1 : 0)
+ t1l = t1l + chl
+ t1 = t1 + ch + ((t1l >>> 0) < (chl >>> 0) ? 1 : 0)
+ t1l = t1l + Kil
+ t1 = t1 + Ki + ((t1l >>> 0) < (Kil >>> 0) ? 1 : 0)
+ t1l = t1l + Wil
+ t1 = t1 + Wi + ((t1l >>> 0) < (Wil >>> 0) ? 1 : 0)
+
+ // t2 = sigma0 + maj
+ var t2l = sigma0l + majl
+ var t2 = sigma0h + maj + ((t2l >>> 0) < (sigma0l >>> 0) ? 1 : 0)
+
+ h = g
+ hl = gl
+ g = f
+ gl = fl
+ f = e
+ fl = el
+ el = (dl + t1l) | 0
+ e = (d + t1 + ((el >>> 0) < (dl >>> 0) ? 1 : 0)) | 0
+ d = c
+ dl = cl
+ c = b
+ cl = bl
+ b = a
+ bl = al
+ al = (t1l + t2l) | 0
+ a = (t1 + t2 + ((al >>> 0) < (t1l >>> 0) ? 1 : 0)) | 0
+
+ i++
+ j += 2
+ }
+
+ while (i < 16) {
+ Wi = M.readInt32BE(j * 4)
+ Wil = M.readInt32BE(j * 4 + 4)
+
+ loop()
+ }
+
+ while (i < 80) {
+ calcW()
+ loop()
+ }
+
+ this._al = (this._al + al) | 0
+ this._bl = (this._bl + bl) | 0
+ this._cl = (this._cl + cl) | 0
+ this._dl = (this._dl + dl) | 0
+ this._el = (this._el + el) | 0
+ this._fl = (this._fl + fl) | 0
+ this._gl = (this._gl + gl) | 0
+ this._hl = (this._hl + hl) | 0
+
+ this._a = (this._a + a + ((this._al >>> 0) < (al >>> 0) ? 1 : 0)) | 0
+ this._b = (this._b + b + ((this._bl >>> 0) < (bl >>> 0) ? 1 : 0)) | 0
+ this._c = (this._c + c + ((this._cl >>> 0) < (cl >>> 0) ? 1 : 0)) | 0
+ this._d = (this._d + d + ((this._dl >>> 0) < (dl >>> 0) ? 1 : 0)) | 0
+ this._e = (this._e + e + ((this._el >>> 0) < (el >>> 0) ? 1 : 0)) | 0
+ this._f = (this._f + f + ((this._fl >>> 0) < (fl >>> 0) ? 1 : 0)) | 0
+ this._g = (this._g + g + ((this._gl >>> 0) < (gl >>> 0) ? 1 : 0)) | 0
+ this._h = (this._h + h + ((this._hl >>> 0) < (hl >>> 0) ? 1 : 0)) | 0
+}
+
+Sha512.prototype._hash = function () {
+ var H = new Buffer(64)
+
+ function writeInt64BE (h, l, offset) {
+ H.writeInt32BE(h, offset)
+ H.writeInt32BE(l, offset + 4)
+ }
+
+ writeInt64BE(this._a, this._al, 0)
+ writeInt64BE(this._b, this._bl, 8)
+ writeInt64BE(this._c, this._cl, 16)
+ writeInt64BE(this._d, this._dl, 24)
+ writeInt64BE(this._e, this._el, 32)
+ writeInt64BE(this._f, this._fl, 40)
+ writeInt64BE(this._g, this._gl, 48)
+ writeInt64BE(this._h, this._hl, 56)
+
+ return H
+}
+
+module.exports = Sha512
+
+}).call(this,require("buffer").Buffer)
+},{"./hash":38,"buffer":2,"inherits":36}],46:[function(require,module,exports){
+(function (Buffer){
+'use strict';
+var createHash = require('create-hash/browser');
+var inherits = require('inherits')
+
+var Transform = require('stream').Transform
+
+var ZEROS = new Buffer(128)
+ZEROS.fill(0)
+
+function Hmac(alg, key) {
+ Transform.call(this)
+
+ if (typeof key === 'string') {
+ key = new Buffer(key)
+ }
+
+ var blocksize = (alg === 'sha512' || alg === 'sha384') ? 128 : 64
+
+ this._alg = alg
+ this._key = key
+
+ if (key.length > blocksize) {
+ key = createHash(alg).update(key).digest()
+
+ } else if (key.length < blocksize) {
+ key = Buffer.concat([key, ZEROS], blocksize)
+ }
+
+ var ipad = this._ipad = new Buffer(blocksize)
+ var opad = this._opad = new Buffer(blocksize)
+
+ for (var i = 0; i < blocksize; i++) {
+ ipad[i] = key[i] ^ 0x36
+ opad[i] = key[i] ^ 0x5C
+ }
+
+ this._hash = createHash(alg).update(ipad)
+}
+
+inherits(Hmac, Transform)
+
+Hmac.prototype.update = function (data, enc) {
+ this._hash.update(data, enc)
+
+ return this
+}
+
+Hmac.prototype._transform = function (data, _, next) {
+ this._hash.update(data)
+
+ next()
+}
+
+Hmac.prototype._flush = function (next) {
+ this.push(this.digest())
+
+ next()
+}
+
+Hmac.prototype.digest = function (enc) {
+ var h = this._hash.digest()
+
+ return createHash(this._alg).update(this._opad).update(h).digest(enc)
+}
+
+module.exports = function createHmac(alg, key) {
+ return new Hmac(alg, key)
+}
+
+}).call(this,require("buffer").Buffer)
+},{"buffer":2,"create-hash/browser":33,"inherits":47,"stream":21}],47:[function(require,module,exports){
+arguments[4][7][0].apply(exports,arguments)
+},{"dup":7}],48:[function(require,module,exports){
+/**
+ * lodash 3.0.3 (Custom Build) <https://lodash.com/>
+ * Build: `lodash modern modularize exports="npm" -o ./`
+ * Copyright 2012-2015 The Dojo Foundation <http://dojofoundation.org/>
+ * Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>
+ * Copyright 2009-2015 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
+ * Available under MIT license <https://lodash.com/license>
+ */
+var arrayEach = require('lodash._arrayeach'),
+ baseEach = require('lodash._baseeach'),
+ bindCallback = require('lodash._bindcallback'),
+ isArray = require('lodash.isarray');
+
+/**
+ * Creates a function for `_.forEach` or `_.forEachRight`.
+ *
+ * @private
+ * @param {Function} arrayFunc The function to iterate over an array.
+ * @param {Function} eachFunc The function to iterate over a collection.
+ * @returns {Function} Returns the new each function.
+ */
+function createForEach(arrayFunc, eachFunc) {
+ return function(collection, iteratee, thisArg) {
+ return (typeof iteratee == 'function' && thisArg === undefined && isArray(collection))
+ ? arrayFunc(collection, iteratee)
+ : eachFunc(collection, bindCallback(iteratee, thisArg, 3));
+ };
+}
+
+/**
+ * Iterates over elements of `collection` invoking `iteratee` for each element.
+ * The `iteratee` is bound to `thisArg` and invoked with three arguments:
+ * (value, index|key, collection). Iteratee functions may exit iteration early
+ * by explicitly returning `false`.
+ *
+ * **Note:** As with other "Collections" methods, objects with a "length" property
+ * are iterated like arrays. To avoid this behavior `_.forIn` or `_.forOwn`
+ * may be used for object iteration.
+ *
+ * @static
+ * @memberOf _
+ * @alias each
+ * @category Collection
+ * @param {Array|Object|string} collection The collection to iterate over.
+ * @param {Function} [iteratee=_.identity] The function invoked per iteration.
+ * @param {*} [thisArg] The `this` binding of `iteratee`.
+ * @returns {Array|Object|string} Returns `collection`.
+ * @example
+ *
+ * _([1, 2]).forEach(function(n) {
+ * console.log(n);
+ * }).value();
+ * // => logs each value from left to right and returns the array
+ *
+ * _.forEach({ 'a': 1, 'b': 2 }, function(n, key) {
+ * console.log(n, key);
+ * });
+ * // => logs each value-key pair and returns the object (iteration order is not guaranteed)
+ */
+var forEach = createForEach(arrayEach, baseEach);
+
+module.exports = forEach;
+
+},{"lodash._arrayeach":49,"lodash._baseeach":50,"lodash._bindcallback":54,"lodash.isarray":55}],49:[function(require,module,exports){
+/**
+ * lodash 3.0.0 (Custom Build) <https://lodash.com/>
+ * Build: `lodash modern modularize exports="npm" -o ./`
+ * Copyright 2012-2015 The Dojo Foundation <http://dojofoundation.org/>
+ * Based on Underscore.js 1.7.0 <http://underscorejs.org/LICENSE>
+ * Copyright 2009-2015 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
+ * Available under MIT license <https://lodash.com/license>
+ */
+
+/**
+ * A specialized version of `_.forEach` for arrays without support for callback
+ * shorthands or `this` binding.
+ *
+ * @private
+ * @param {Array} array The array to iterate over.
+ * @param {Function} iteratee The function invoked per iteration.
+ * @returns {Array} Returns `array`.
+ */
+function arrayEach(array, iteratee) {
+ var index = -1,
+ length = array.length;
+
+ while (++index < length) {
+ if (iteratee(array[index], index, array) === false) {
+ break;
+ }
+ }
+ return array;
+}
+
+module.exports = arrayEach;
+
+},{}],50:[function(require,module,exports){
+/**
+ * lodash 3.0.4 (Custom Build) <https://lodash.com/>
+ * Build: `lodash modern modularize exports="npm" -o ./`
+ * Copyright 2012-2015 The Dojo Foundation <http://dojofoundation.org/>
+ * Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>
+ * Copyright 2009-2015 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
+ * Available under MIT license <https://lodash.com/license>
+ */
+var keys = require('lodash.keys');
+
+/**
+ * Used as the [maximum length](https://people.mozilla.org/~jorendorff/es6-draft.html#sec-number.max_safe_integer)
+ * of an array-like value.
+ */
+var MAX_SAFE_INTEGER = 9007199254740991;
+
+/**
+ * The base implementation of `_.forEach` without support for callback
+ * shorthands and `this` binding.
+ *
+ * @private
+ * @param {Array|Object|string} collection The collection to iterate over.
+ * @param {Function} iteratee The function invoked per iteration.
+ * @returns {Array|Object|string} Returns `collection`.
+ */
+var baseEach = createBaseEach(baseForOwn);
+
+/**
+ * The base implementation of `baseForIn` and `baseForOwn` which iterates
+ * over `object` properties returned by `keysFunc` invoking `iteratee` for
+ * each property. Iteratee functions may exit iteration early by explicitly
+ * returning `false`.
+ *
+ * @private
+ * @param {Object} object The object to iterate over.
+ * @param {Function} iteratee The function invoked per iteration.
+ * @param {Function} keysFunc The function to get the keys of `object`.
+ * @returns {Object} Returns `object`.
+ */
+var baseFor = createBaseFor();
+
+/**
+ * The base implementation of `_.forOwn` without support for callback
+ * shorthands and `this` binding.
+ *
+ * @private
+ * @param {Object} object The object to iterate over.
+ * @param {Function} iteratee The function invoked per iteration.
+ * @returns {Object} Returns `object`.
+ */
+function baseForOwn(object, iteratee) {
+ return baseFor(object, iteratee, keys);
+}
+
+/**
+ * The base implementation of `_.property` without support for deep paths.
+ *
+ * @private
+ * @param {string} key The key of the property to get.
+ * @returns {Function} Returns the new function.
+ */
+function baseProperty(key) {
+ return function(object) {
+ return object == null ? undefined : object[key];
+ };
+}
+
+/**
+ * Creates a `baseEach` or `baseEachRight` function.
+ *
+ * @private
+ * @param {Function} eachFunc The function to iterate over a collection.
+ * @param {boolean} [fromRight] Specify iterating from right to left.
+ * @returns {Function} Returns the new base function.
+ */
+function createBaseEach(eachFunc, fromRight) {
+ return function(collection, iteratee) {
+ var length = collection ? getLength(collection) : 0;
+ if (!isLength(length)) {
+ return eachFunc(collection, iteratee);
+ }
+ var index = fromRight ? length : -1,
+ iterable = toObject(collection);
+
+ while ((fromRight ? index-- : ++index < length)) {
+ if (iteratee(iterable[index], index, iterable) === false) {
+ break;
+ }
+ }
+ return collection;
+ };
+}
+
+/**
+ * Creates a base function for `_.forIn` or `_.forInRight`.
+ *
+ * @private
+ * @param {boolean} [fromRight] Specify iterating from right to left.
+ * @returns {Function} Returns the new base function.
+ */
+function createBaseFor(fromRight) {
+ return function(object, iteratee, keysFunc) {
+ var iterable = toObject(object),
+ props = keysFunc(object),
+ length = props.length,
+ index = fromRight ? length : -1;
+
+ while ((fromRight ? index-- : ++index < length)) {
+ var key = props[index];
+ if (iteratee(iterable[key], key, iterable) === false) {
+ break;
+ }
+ }
+ return object;
+ };
+}
+
+/**
+ * Gets the "length" property value of `object`.
+ *
+ * **Note:** This function is used to avoid a [JIT bug](https://bugs.webkit.org/show_bug.cgi?id=142792)
+ * that affects Safari on at least iOS 8.1-8.3 ARM64.
+ *
+ * @private
+ * @param {Object} object The object to query.
+ * @returns {*} Returns the "length" value.
+ */
+var getLength = baseProperty('length');
+
+/**
+ * Checks if `value` is a valid array-like length.
+ *
+ * **Note:** This function is based on [`ToLength`](https://people.mozilla.org/~jorendorff/es6-draft.html#sec-tolength).
+ *
+ * @private
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is a valid length, else `false`.
+ */
+function isLength(value) {
+ return typeof value == 'number' && value > -1 && value % 1 == 0 && value <= MAX_SAFE_INTEGER;
+}
+
+/**
+ * Converts `value` to an object if it's not one.
+ *
+ * @private
+ * @param {*} value The value to process.
+ * @returns {Object} Returns the object.
+ */
+function toObject(value) {
+ return isObject(value) ? value : Object(value);
+}
+
+/**
+ * Checks if `value` is the [language type](https://es5.github.io/#x8) of `Object`.
+ * (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`)
+ *
+ * @static
+ * @memberOf _
+ * @category Lang
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is an object, else `false`.
+ * @example
+ *
+ * _.isObject({});
+ * // => true
+ *
+ * _.isObject([1, 2, 3]);
+ * // => true
+ *
+ * _.isObject(1);
+ * // => false
+ */
+function isObject(value) {
+ // Avoid a V8 JIT bug in Chrome 19-20.
+ // See https://code.google.com/p/v8/issues/detail?id=2291 for more details.
+ var type = typeof value;
+ return !!value && (type == 'object' || type == 'function');
+}
+
+module.exports = baseEach;
+
+},{"lodash.keys":51}],51:[function(require,module,exports){
+/**
+ * lodash 3.1.1 (Custom Build) <https://lodash.com/>
+ * Build: `lodash modern modularize exports="npm" -o ./`
+ * Copyright 2012-2015 The Dojo Foundation <http://dojofoundation.org/>
+ * Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>
+ * Copyright 2009-2015 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
+ * Available under MIT license <https://lodash.com/license>
+ */
+var getNative = require('lodash._getnative'),
+ isArguments = require('lodash.isarguments'),
+ isArray = require('lodash.isarray');
+
+/** Used to detect unsigned integer values. */
+var reIsUint = /^\d+$/;
+
+/** Used for native method references. */
+var objectProto = Object.prototype;
+
+/** Used to check objects for own properties. */
+var hasOwnProperty = objectProto.hasOwnProperty;
+
+/* Native method references for those with the same name as other `lodash` methods. */
+var nativeKeys = getNative(Object, 'keys');
+
+/**
+ * Used as the [maximum length](https://people.mozilla.org/~jorendorff/es6-draft.html#sec-number.max_safe_integer)
+ * of an array-like value.
+ */
+var MAX_SAFE_INTEGER = 9007199254740991;
+
+/**
+ * The base implementation of `_.property` without support for deep paths.
+ *
+ * @private
+ * @param {string} key The key of the property to get.
+ * @returns {Function} Returns the new function.
+ */
+function baseProperty(key) {
+ return function(object) {
+ return object == null ? undefined : object[key];
+ };
+}
+
+/**
+ * Gets the "length" property value of `object`.
+ *
+ * **Note:** This function is used to avoid a [JIT bug](https://bugs.webkit.org/show_bug.cgi?id=142792)
+ * that affects Safari on at least iOS 8.1-8.3 ARM64.
+ *
+ * @private
+ * @param {Object} object The object to query.
+ * @returns {*} Returns the "length" value.
+ */
+var getLength = baseProperty('length');
+
+/**
+ * Checks if `value` is array-like.
+ *
+ * @private
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is array-like, else `false`.
+ */
+function isArrayLike(value) {
+ return value != null && isLength(getLength(value));
+}
+
+/**
+ * Checks if `value` is a valid array-like index.
+ *
+ * @private
+ * @param {*} value The value to check.
+ * @param {number} [length=MAX_SAFE_INTEGER] The upper bounds of a valid index.
+ * @returns {boolean} Returns `true` if `value` is a valid index, else `false`.
+ */
+function isIndex(value, length) {
+ value = (typeof value == 'number' || reIsUint.test(value)) ? +value : -1;
+ length = length == null ? MAX_SAFE_INTEGER : length;
+ return value > -1 && value % 1 == 0 && value < length;
+}
+
+/**
+ * Checks if `value` is a valid array-like length.
+ *
+ * **Note:** This function is based on [`ToLength`](https://people.mozilla.org/~jorendorff/es6-draft.html#sec-tolength).
+ *
+ * @private
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is a valid length, else `false`.
+ */
+function isLength(value) {
+ return typeof value == 'number' && value > -1 && value % 1 == 0 && value <= MAX_SAFE_INTEGER;
+}
+
+/**
+ * A fallback implementation of `Object.keys` which creates an array of the
+ * own enumerable property names of `object`.
+ *
+ * @private
+ * @param {Object} object The object to query.
+ * @returns {Array} Returns the array of property names.
+ */
+function shimKeys(object) {
+ var props = keysIn(object),
+ propsLength = props.length,
+ length = propsLength && object.length;
+
+ var allowIndexes = !!length && isLength(length) &&
+ (isArray(object) || isArguments(object));
+
+ var index = -1,
+ result = [];
+
+ while (++index < propsLength) {
+ var key = props[index];
+ if ((allowIndexes && isIndex(key, length)) || hasOwnProperty.call(object, key)) {
+ result.push(key);
+ }
+ }
+ return result;
+}
+
+/**
+ * Checks if `value` is the [language type](https://es5.github.io/#x8) of `Object`.
+ * (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`)
+ *
+ * @static
+ * @memberOf _
+ * @category Lang
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is an object, else `false`.
+ * @example
+ *
+ * _.isObject({});
+ * // => true
+ *
+ * _.isObject([1, 2, 3]);
+ * // => true
+ *
+ * _.isObject(1);
+ * // => false
+ */
+function isObject(value) {
+ // Avoid a V8 JIT bug in Chrome 19-20.
+ // See https://code.google.com/p/v8/issues/detail?id=2291 for more details.
+ var type = typeof value;
+ return !!value && (type == 'object' || type == 'function');
+}
+
+/**
+ * Creates an array of the own enumerable property names of `object`.
+ *
+ * **Note:** Non-object values are coerced to objects. See the
+ * [ES spec](https://people.mozilla.org/~jorendorff/es6-draft.html#sec-object.keys)
+ * for more details.
+ *
+ * @static
+ * @memberOf _
+ * @category Object
+ * @param {Object} object The object to query.
+ * @returns {Array} Returns the array of property names.
+ * @example
+ *
+ * function Foo() {
+ * this.a = 1;
+ * this.b = 2;
+ * }
+ *
+ * Foo.prototype.c = 3;
+ *
+ * _.keys(new Foo);
+ * // => ['a', 'b'] (iteration order is not guaranteed)
+ *
+ * _.keys('hi');
+ * // => ['0', '1']
+ */
+var keys = !nativeKeys ? shimKeys : function(object) {
+ var Ctor = object == null ? null : object.constructor;
+ if ((typeof Ctor == 'function' && Ctor.prototype === object) ||
+ (typeof object != 'function' && isArrayLike(object))) {
+ return shimKeys(object);
+ }
+ return isObject(object) ? nativeKeys(object) : [];
+};
+
+/**
+ * Creates an array of the own and inherited enumerable property names of `object`.
+ *
+ * **Note:** Non-object values are coerced to objects.
+ *
+ * @static
+ * @memberOf _
+ * @category Object
+ * @param {Object} object The object to query.
+ * @returns {Array} Returns the array of property names.
+ * @example
+ *
+ * function Foo() {
+ * this.a = 1;
+ * this.b = 2;
+ * }
+ *
+ * Foo.prototype.c = 3;
+ *
+ * _.keysIn(new Foo);
+ * // => ['a', 'b', 'c'] (iteration order is not guaranteed)
+ */
+function keysIn(object) {
+ if (object == null) {
+ return [];
+ }
+ if (!isObject(object)) {
+ object = Object(object);
+ }
+ var length = object.length;
+ length = (length && isLength(length) &&
+ (isArray(object) || isArguments(object)) && length) || 0;
+
+ var Ctor = object.constructor,
+ index = -1,
+ isProto = typeof Ctor == 'function' && Ctor.prototype === object,
+ result = Array(length),
+ skipIndexes = length > 0;
+
+ while (++index < length) {
+ result[index] = (index + '');
+ }
+ for (var key in object) {
+ if (!(skipIndexes && isIndex(key, length)) &&
+ !(key == 'constructor' && (isProto || !hasOwnProperty.call(object, key)))) {
+ result.push(key);
+ }
+ }
+ return result;
+}
+
+module.exports = keys;
+
+},{"lodash._getnative":52,"lodash.isarguments":53,"lodash.isarray":55}],52:[function(require,module,exports){
+/**
+ * lodash 3.9.0 (Custom Build) <https://lodash.com/>
+ * Build: `lodash modern modularize exports="npm" -o ./`
+ * Copyright 2012-2015 The Dojo Foundation <http://dojofoundation.org/>
+ * Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>
+ * Copyright 2009-2015 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
+ * Available under MIT license <https://lodash.com/license>
+ */
+
+/** `Object#toString` result references. */
+var funcTag = '[object Function]';
+
+/**
+ * Used to match `RegExp` [special characters](http://www.regular-expressions.info/characters.html#special).
+ * In addition to special characters the forward slash is escaped to allow for
+ * easier `eval` use and `Function` compilation.
+ */
+var reRegExpChars = /[.*+?^${}()|[\]\/\\]/g,
+ reHasRegExpChars = RegExp(reRegExpChars.source);
+
+/** Used to detect host constructors (Safari > 5). */
+var reIsHostCtor = /^\[object .+?Constructor\]$/;
+
+/**
+ * Converts `value` to a string if it's not one. An empty string is returned
+ * for `null` or `undefined` values.
+ *
+ * @private
+ * @param {*} value The value to process.
+ * @returns {string} Returns the string.
+ */
+function baseToString(value) {
+ if (typeof value == 'string') {
+ return value;
+ }
+ return value == null ? '' : (value + '');
+}
+
+/**
+ * Checks if `value` is object-like.
+ *
+ * @private
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is object-like, else `false`.
+ */
+function isObjectLike(value) {
+ return !!value && typeof value == 'object';
+}
+
+/** Used for native method references. */
+var objectProto = Object.prototype;
+
+/** Used to resolve the decompiled source of functions. */
+var fnToString = Function.prototype.toString;
+
+/** Used to check objects for own properties. */
+var hasOwnProperty = objectProto.hasOwnProperty;
+
+/**
+ * Used to resolve the [`toStringTag`](https://people.mozilla.org/~jorendorff/es6-draft.html#sec-object.prototype.tostring)
+ * of values.
+ */
+var objToString = objectProto.toString;
+
+/** Used to detect if a method is native. */
+var reIsNative = RegExp('^' +
+ escapeRegExp(fnToString.call(hasOwnProperty))
+ .replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, '$1.*?') + '$'
+);
+
+/**
+ * Gets the native function at `key` of `object`.
+ *
+ * @private
+ * @param {Object} object The object to query.
+ * @param {string} key The key of the method to get.
+ * @returns {*} Returns the function if it's native, else `undefined`.
+ */
+function getNative(object, key) {
+ var value = object == null ? undefined : object[key];
+ return isNative(value) ? value : undefined;
+}
+
+/**
+ * Checks if `value` is a native function.
+ *
+ * @static
+ * @memberOf _
+ * @category Lang
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is a native function, else `false`.
+ * @example
+ *
+ * _.isNative(Array.prototype.push);
+ * // => true
+ *
+ * _.isNative(_);
+ * // => false
+ */
+function isNative(value) {
+ if (value == null) {
+ return false;
+ }
+ if (objToString.call(value) == funcTag) {
+ return reIsNative.test(fnToString.call(value));
+ }
+ return isObjectLike(value) && reIsHostCtor.test(value);
+}
+
+/**
+ * Escapes the `RegExp` special characters "\", "/", "^", "$", ".", "|", "?",
+ * "*", "+", "(", ")", "[", "]", "{" and "}" in `string`.
+ *
+ * @static
+ * @memberOf _
+ * @category String
+ * @param {string} [string=''] The string to escape.
+ * @returns {string} Returns the escaped string.
+ * @example
+ *
+ * _.escapeRegExp('[lodash](https://lodash.com/)');
+ * // => '\[lodash\]\(https:\/\/lodash\.com\/\)'
+ */
+function escapeRegExp(string) {
+ string = baseToString(string);
+ return (string && reHasRegExpChars.test(string))
+ ? string.replace(reRegExpChars, '\\$&')
+ : string;
+}
+
+module.exports = getNative;
+
+},{}],53:[function(require,module,exports){
+/**
+ * lodash 3.0.3 (Custom Build) <https://lodash.com/>
+ * Build: `lodash modern modularize exports="npm" -o ./`
+ * Copyright 2012-2015 The Dojo Foundation <http://dojofoundation.org/>
+ * Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>
+ * Copyright 2009-2015 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
+ * Available under MIT license <https://lodash.com/license>
+ */
+
+/** `Object#toString` result references. */
+var argsTag = '[object Arguments]';
+
+/**
+ * Checks if `value` is object-like.
+ *
+ * @private
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is object-like, else `false`.
+ */
+function isObjectLike(value) {
+ return !!value && typeof value == 'object';
+}
+
+/** Used for native method references. */
+var objectProto = Object.prototype;
+
+/**
+ * Used to resolve the [`toStringTag`](https://people.mozilla.org/~jorendorff/es6-draft.html#sec-object.prototype.tostring)
+ * of values.
+ */
+var objToString = objectProto.toString;
+
+/**
+ * Used as the [maximum length](https://people.mozilla.org/~jorendorff/es6-draft.html#sec-number.max_safe_integer)
+ * of an array-like value.
+ */
+var MAX_SAFE_INTEGER = 9007199254740991;
+
+/**
+ * The base implementation of `_.property` without support for deep paths.
+ *
+ * @private
+ * @param {string} key The key of the property to get.
+ * @returns {Function} Returns the new function.
+ */
+function baseProperty(key) {
+ return function(object) {
+ return object == null ? undefined : object[key];
+ };
+}
+
+/**
+ * Gets the "length" property value of `object`.
+ *
+ * **Note:** This function is used to avoid a [JIT bug](https://bugs.webkit.org/show_bug.cgi?id=142792)
+ * that affects Safari on at least iOS 8.1-8.3 ARM64.
+ *
+ * @private
+ * @param {Object} object The object to query.
+ * @returns {*} Returns the "length" value.
+ */
+var getLength = baseProperty('length');
+
+/**
+ * Checks if `value` is array-like.
+ *
+ * @private
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is array-like, else `false`.
+ */
+function isArrayLike(value) {
+ return value != null && isLength(getLength(value));
+}
+
+/**
+ * Checks if `value` is a valid array-like length.
+ *
+ * **Note:** This function is based on [`ToLength`](https://people.mozilla.org/~jorendorff/es6-draft.html#sec-tolength).
+ *
+ * @private
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is a valid length, else `false`.
+ */
+function isLength(value) {
+ return typeof value == 'number' && value > -1 && value % 1 == 0 && value <= MAX_SAFE_INTEGER;
+}
+
+/**
+ * Checks if `value` is classified as an `arguments` object.
+ *
+ * @static
+ * @memberOf _
+ * @category Lang
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is correctly classified, else `false`.
+ * @example
+ *
+ * _.isArguments(function() { return arguments; }());
+ * // => true
+ *
+ * _.isArguments([1, 2, 3]);
+ * // => false
+ */
+function isArguments(value) {
+ return isObjectLike(value) && isArrayLike(value) && objToString.call(value) == argsTag;
+}
+
+module.exports = isArguments;
+
+},{}],54:[function(require,module,exports){
+/**
+ * lodash 3.0.1 (Custom Build) <https://lodash.com/>
+ * Build: `lodash modern modularize exports="npm" -o ./`
+ * Copyright 2012-2015 The Dojo Foundation <http://dojofoundation.org/>
+ * Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>
+ * Copyright 2009-2015 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
+ * Available under MIT license <https://lodash.com/license>
+ */
+
+/**
+ * A specialized version of `baseCallback` which only supports `this` binding
+ * and specifying the number of arguments to provide to `func`.
+ *
+ * @private
+ * @param {Function} func The function to bind.
+ * @param {*} thisArg The `this` binding of `func`.
+ * @param {number} [argCount] The number of arguments to provide to `func`.
+ * @returns {Function} Returns the callback.
+ */
+function bindCallback(func, thisArg, argCount) {
+ if (typeof func != 'function') {
+ return identity;
+ }
+ if (thisArg === undefined) {
+ return func;
+ }
+ switch (argCount) {
+ case 1: return function(value) {
+ return func.call(thisArg, value);
+ };
+ case 3: return function(value, index, collection) {
+ return func.call(thisArg, value, index, collection);
+ };
+ case 4: return function(accumulator, value, index, collection) {
+ return func.call(thisArg, accumulator, value, index, collection);
+ };
+ case 5: return function(value, other, key, object, source) {
+ return func.call(thisArg, value, other, key, object, source);
+ };
+ }
+ return function() {
+ return func.apply(thisArg, arguments);
+ };
+}
+
+/**
+ * This method returns the first argument provided to it.
+ *
+ * @static
+ * @memberOf _
+ * @category Utility
+ * @param {*} value Any value.
+ * @returns {*} Returns `value`.
+ * @example
+ *
+ * var object = { 'user': 'fred' };
+ *
+ * _.identity(object) === object;
+ * // => true
+ */
+function identity(value) {
+ return value;
+}
+
+module.exports = bindCallback;
+
+},{}],55:[function(require,module,exports){
+/**
+ * lodash 3.0.3 (Custom Build) <https://lodash.com/>
+ * Build: `lodash modern modularize exports="npm" -o ./`
+ * Copyright 2012-2015 The Dojo Foundation <http://dojofoundation.org/>
+ * Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>
+ * Copyright 2009-2015 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
+ * Available under MIT license <https://lodash.com/license>
+ */
+
+/** `Object#toString` result references. */
+var arrayTag = '[object Array]',
+ funcTag = '[object Function]';
+
+/**
+ * Used to match `RegExp` [special characters](http://www.regular-expressions.info/characters.html#special).
+ * In addition to special characters the forward slash is escaped to allow for
+ * easier `eval` use and `Function` compilation.
+ */
+var reRegExpChars = /[.*+?^${}()|[\]\/\\]/g,
+ reHasRegExpChars = RegExp(reRegExpChars.source);
+
+/** Used to detect host constructors (Safari > 5). */
+var reIsHostCtor = /^\[object .+?Constructor\]$/;
+
+/**
+ * Converts `value` to a string if it's not one. An empty string is returned
+ * for `null` or `undefined` values.
+ *
+ * @private
+ * @param {*} value The value to process.
+ * @returns {string} Returns the string.
+ */
+function baseToString(value) {
+ if (typeof value == 'string') {
+ return value;
+ }
+ return value == null ? '' : (value + '');
+}
+
+/**
+ * Checks if `value` is object-like.
+ *
+ * @private
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is object-like, else `false`.
+ */
+function isObjectLike(value) {
+ return !!value && typeof value == 'object';
+}
+
+/** Used for native method references. */
+var objectProto = Object.prototype;
+
+/** Used to resolve the decompiled source of functions. */
+var fnToString = Function.prototype.toString;
+
+/** Used to check objects for own properties. */
+var hasOwnProperty = objectProto.hasOwnProperty;
+
+/**
+ * Used to resolve the [`toStringTag`](https://people.mozilla.org/~jorendorff/es6-draft.html#sec-object.prototype.tostring)
+ * of values.
+ */
+var objToString = objectProto.toString;
+
+/** Used to detect if a method is native. */
+var reIsNative = RegExp('^' +
+ escapeRegExp(fnToString.call(hasOwnProperty))
+ .replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, '$1.*?') + '$'
+);
+
+/* Native method references for those with the same name as other `lodash` methods. */
+var nativeIsArray = getNative(Array, 'isArray');
+
+/**
+ * Used as the [maximum length](https://people.mozilla.org/~jorendorff/es6-draft.html#sec-number.max_safe_integer)
+ * of an array-like value.
+ */
+var MAX_SAFE_INTEGER = 9007199254740991;
+
+/**
+ * Gets the native function at `key` of `object`.
+ *
+ * @private
+ * @param {Object} object The object to query.
+ * @param {string} key The key of the method to get.
+ * @returns {*} Returns the function if it's native, else `undefined`.
+ */
+function getNative(object, key) {
+ var value = object == null ? undefined : object[key];
+ return isNative(value) ? value : undefined;
+}
+
+/**
+ * Checks if `value` is a valid array-like length.
+ *
+ * **Note:** This function is based on [`ToLength`](https://people.mozilla.org/~jorendorff/es6-draft.html#sec-tolength).
+ *
+ * @private
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is a valid length, else `false`.
+ */
+function isLength(value) {
+ return typeof value == 'number' && value > -1 && value % 1 == 0 && value <= MAX_SAFE_INTEGER;
+}
+
+/**
+ * Checks if `value` is classified as an `Array` object.
+ *
+ * @static
+ * @memberOf _
+ * @category Lang
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is correctly classified, else `false`.
+ * @example
+ *
+ * _.isArray([1, 2, 3]);
+ * // => true
+ *
+ * _.isArray(function() { return arguments; }());
+ * // => false
+ */
+var isArray = nativeIsArray || function(value) {
+ return isObjectLike(value) && isLength(value.length) && objToString.call(value) == arrayTag;
+};
+
+/**
+ * Checks if `value` is a native function.
+ *
+ * @static
+ * @memberOf _
+ * @category Lang
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is a native function, else `false`.
+ * @example
+ *
+ * _.isNative(Array.prototype.push);
+ * // => true
+ *
+ * _.isNative(_);
+ * // => false
+ */
+function isNative(value) {
+ if (value == null) {
+ return false;
+ }
+ if (objToString.call(value) == funcTag) {
+ return reIsNative.test(fnToString.call(value));
+ }
+ return isObjectLike(value) && reIsHostCtor.test(value);
+}
+
+/**
+ * Escapes the `RegExp` special characters "\", "/", "^", "$", ".", "|", "?",
+ * "*", "+", "(", ")", "[", "]", "{" and "}" in `string`.
+ *
+ * @static
+ * @memberOf _
+ * @category String
+ * @param {string} [string=''] The string to escape.
+ * @returns {string} Returns the escaped string.
+ * @example
+ *
+ * _.escapeRegExp('[lodash](https://lodash.com/)');
+ * // => '\[lodash\]\(https:\/\/lodash\.com\/\)'
+ */
+function escapeRegExp(string) {
+ string = baseToString(string);
+ return (string && reHasRegExpChars.test(string))
+ ? string.replace(reRegExpChars, '\\$&')
+ : string;
+}
+
+module.exports = isArray;
+
+},{}],56:[function(require,module,exports){
+/**
+ * lodash 3.1.2 (Custom Build) <https://lodash.com/>
+ * Build: `lodash modern modularize exports="npm" -o ./`
+ * Copyright 2012-2015 The Dojo Foundation <http://dojofoundation.org/>
+ * Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>
+ * Copyright 2009-2015 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
+ * Available under MIT license <https://lodash.com/license>
+ */
+var baseGet = require('lodash._baseget'),
+ toPath = require('lodash._topath'),
+ isArray = require('lodash.isarray'),
+ map = require('lodash.map');
+
+/** Used to match property names within property paths. */
+var reIsDeepProp = /\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\n\\]|\\.)*?\1)\]/,
+ reIsPlainProp = /^\w*$/;
+
+/**
+ * The base implementation of `_.property` without support for deep paths.
+ *
+ * @private
+ * @param {string} key The key of the property to get.
+ * @returns {Function} Returns the new function.
+ */
+function baseProperty(key) {
+ return function(object) {
+ return object == null ? undefined : object[key];
+ };
+}
+
+/**
+ * A specialized version of `baseProperty` which supports deep paths.
+ *
+ * @private
+ * @param {Array|string} path The path of the property to get.
+ * @returns {Function} Returns the new function.
+ */
+function basePropertyDeep(path) {
+ var pathKey = (path + '');
+ path = toPath(path);
+ return function(object) {
+ return baseGet(object, path, pathKey);
+ };
+}
+
+/**
+ * Checks if `value` is a property name and not a property path.
+ *
+ * @private
+ * @param {*} value The value to check.
+ * @param {Object} [object] The object to query keys on.
+ * @returns {boolean} Returns `true` if `value` is a property name, else `false`.
+ */
+function isKey(value, object) {
+ var type = typeof value;
+ if ((type == 'string' && reIsPlainProp.test(value)) || type == 'number') {
+ return true;
+ }
+ if (isArray(value)) {
+ return false;
+ }
+ var result = !reIsDeepProp.test(value);
+ return result || (object != null && value in toObject(object));
+}
+
+/**
+ * Converts `value` to an object if it's not one.
+ *
+ * @private
+ * @param {*} value The value to process.
+ * @returns {Object} Returns the object.
+ */
+function toObject(value) {
+ return isObject(value) ? value : Object(value);
+}
+
+/**
+ * Gets the property value of `path` from all elements in `collection`.
+ *
+ * @static
+ * @memberOf _
+ * @category Collection
+ * @param {Array|Object|string} collection The collection to iterate over.
+ * @param {Array|string} path The path of the property to pluck.
+ * @returns {Array} Returns the property values.
+ * @example
+ *
+ * var users = [
+ * { 'user': 'barney', 'age': 36 },
+ * { 'user': 'fred', 'age': 40 }
+ * ];
+ *
+ * _.pluck(users, 'user');
+ * // => ['barney', 'fred']
+ *
+ * var userIndex = _.indexBy(users, 'user');
+ * _.pluck(userIndex, 'age');
+ * // => [36, 40] (iteration order is not guaranteed)
+ */
+function pluck(collection, path) {
+ return map(collection, property(path));
+}
+
+/**
+ * Checks if `value` is the [language type](https://es5.github.io/#x8) of `Object`.
+ * (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`)
+ *
+ * @static
+ * @memberOf _
+ * @category Lang
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is an object, else `false`.
+ * @example
+ *
+ * _.isObject({});
+ * // => true
+ *
+ * _.isObject([1, 2, 3]);
+ * // => true
+ *
+ * _.isObject(1);
+ * // => false
+ */
+function isObject(value) {
+ // Avoid a V8 JIT bug in Chrome 19-20.
+ // See https://code.google.com/p/v8/issues/detail?id=2291 for more details.
+ var type = typeof value;
+ return !!value && (type == 'object' || type == 'function');
+}
+
+/**
+ * Creates a function which returns the property value at `path` on a
+ * given object.
+ *
+ * @static
+ * @memberOf _
+ * @category Utility
+ * @param {Array|string} path The path of the property to get.
+ * @returns {Function} Returns the new function.
+ * @example
+ *
+ * var objects = [
+ * { 'a': { 'b': { 'c': 2 } } },
+ * { 'a': { 'b': { 'c': 1 } } }
+ * ];
+ *
+ * _.map(objects, _.property('a.b.c'));
+ * // => [2, 1]
+ *
+ * _.pluck(_.sortBy(objects, _.property(['a', 'b', 'c'])), 'a.b.c');
+ * // => [1, 2]
+ */
+function property(path) {
+ return isKey(path) ? baseProperty(path) : basePropertyDeep(path);
+}
+
+module.exports = pluck;
+
+},{"lodash._baseget":57,"lodash._topath":58,"lodash.isarray":59,"lodash.map":60}],57:[function(require,module,exports){
+/**
+ * lodash 3.7.2 (Custom Build) <https://lodash.com/>
+ * Build: `lodash modern modularize exports="npm" -o ./`
+ * Copyright 2012-2015 The Dojo Foundation <http://dojofoundation.org/>
+ * Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>
+ * Copyright 2009-2015 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
+ * Available under MIT license <https://lodash.com/license>
+ */
+
+/**
+ * The base implementation of `get` without support for string paths
+ * and default values.
+ *
+ * @private
+ * @param {Object} object The object to query.
+ * @param {Array} path The path of the property to get.
+ * @param {string} [pathKey] The key representation of path.
+ * @returns {*} Returns the resolved value.
+ */
+function baseGet(object, path, pathKey) {
+ if (object == null) {
+ return;
+ }
+ if (pathKey !== undefined && pathKey in toObject(object)) {
+ path = [pathKey];
+ }
+ var index = 0,
+ length = path.length;
+
+ while (object != null && index < length) {
+ object = object[path[index++]];
+ }
+ return (index && index == length) ? object : undefined;
+}
+
+/**
+ * Converts `value` to an object if it's not one.
+ *
+ * @private
+ * @param {*} value The value to process.
+ * @returns {Object} Returns the object.
+ */
+function toObject(value) {
+ return isObject(value) ? value : Object(value);
+}
+
+/**
+ * Checks if `value` is the [language type](https://es5.github.io/#x8) of `Object`.
+ * (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`)
+ *
+ * @static
+ * @memberOf _
+ * @category Lang
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is an object, else `false`.
+ * @example
+ *
+ * _.isObject({});
+ * // => true
+ *
+ * _.isObject([1, 2, 3]);
+ * // => true
+ *
+ * _.isObject(1);
+ * // => false
+ */
+function isObject(value) {
+ // Avoid a V8 JIT bug in Chrome 19-20.
+ // See https://code.google.com/p/v8/issues/detail?id=2291 for more details.
+ var type = typeof value;
+ return !!value && (type == 'object' || type == 'function');
+}
+
+module.exports = baseGet;
+
+},{}],58:[function(require,module,exports){
+/**
+ * lodash 3.8.0 (Custom Build) <https://lodash.com/>
+ * Build: `lodash modern modularize exports="npm" -o ./`
+ * Copyright 2012-2015 The Dojo Foundation <http://dojofoundation.org/>
+ * Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>
+ * Copyright 2009-2015 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
+ * Available under MIT license <https://lodash.com/license>
+ */
+var isArray = require('lodash.isarray');
+
+/** Used to match property names within property paths. */
+var rePropName = /[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\n\\]|\\.)*?)\2)\]/g;
+
+/** Used to match backslashes in property paths. */
+var reEscapeChar = /\\(\\)?/g;
+
+/**
+ * Converts `value` to a string if it is not one. An empty string is returned
+ * for `null` or `undefined` values.
+ *
+ * @private
+ * @param {*} value The value to process.
+ * @returns {string} Returns the string.
+ */
+function baseToString(value) {
+ if (typeof value == 'string') {
+ return value;
+ }
+ return value == null ? '' : (value + '');
+}
+
+/**
+ * Converts `value` to property path array if it is not one.
+ *
+ * @private
+ * @param {*} value The value to process.
+ * @returns {Array} Returns the property path array.
+ */
+function toPath(value) {
+ if (isArray(value)) {
+ return value;
+ }
+ var result = [];
+ baseToString(value).replace(rePropName, function(match, number, quote, string) {
+ result.push(quote ? string.replace(reEscapeChar, '$1') : (number || match));
+ });
+ return result;
+}
+
+module.exports = toPath;
+
+},{"lodash.isarray":59}],59:[function(require,module,exports){
+arguments[4][55][0].apply(exports,arguments)
+},{"dup":55}],60:[function(require,module,exports){
+/**
+ * lodash 3.1.4 (Custom Build) <https://lodash.com/>
+ * Build: `lodash modern modularize exports="npm" -o ./`
+ * Copyright 2012-2015 The Dojo Foundation <http://dojofoundation.org/>
+ * Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>
+ * Copyright 2009-2015 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
+ * Available under MIT license <https://lodash.com/license>
+ */
+var arrayMap = require('lodash._arraymap'),
+ baseCallback = require('lodash._basecallback'),
+ baseEach = require('lodash._baseeach'),
+ isArray = require('lodash.isarray');
+
+/**
+ * Used as the [maximum length](https://people.mozilla.org/~jorendorff/es6-draft.html#sec-number.max_safe_integer)
+ * of an array-like value.
+ */
+var MAX_SAFE_INTEGER = 9007199254740991;
+
+/**
+ * The base implementation of `_.map` without support for callback shorthands
+ * and `this` binding.
+ *
+ * @private
+ * @param {Array|Object|string} collection The collection to iterate over.
+ * @param {Function} iteratee The function invoked per iteration.
+ * @returns {Array} Returns the new mapped array.
+ */
+function baseMap(collection, iteratee) {
+ var index = -1,
+ result = isArrayLike(collection) ? Array(collection.length) : [];
+
+ baseEach(collection, function(value, key, collection) {
+ result[++index] = iteratee(value, key, collection);
+ });
+ return result;
+}
+
+/**
+ * The base implementation of `_.property` without support for deep paths.
+ *
+ * @private
+ * @param {string} key The key of the property to get.
+ * @returns {Function} Returns the new function.
+ */
+function baseProperty(key) {
+ return function(object) {
+ return object == null ? undefined : object[key];
+ };
+}
+
+/**
+ * Gets the "length" property value of `object`.
+ *
+ * **Note:** This function is used to avoid a [JIT bug](https://bugs.webkit.org/show_bug.cgi?id=142792)
+ * that affects Safari on at least iOS 8.1-8.3 ARM64.
+ *
+ * @private
+ * @param {Object} object The object to query.
+ * @returns {*} Returns the "length" value.
+ */
+var getLength = baseProperty('length');
+
+/**
+ * Checks if `value` is array-like.
+ *
+ * @private
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is array-like, else `false`.
+ */
+function isArrayLike(value) {
+ return value != null && isLength(getLength(value));
+}
+
+/**
+ * Checks if `value` is a valid array-like length.
+ *
+ * **Note:** This function is based on [`ToLength`](https://people.mozilla.org/~jorendorff/es6-draft.html#sec-tolength).
+ *
+ * @private
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is a valid length, else `false`.
+ */
+function isLength(value) {
+ return typeof value == 'number' && value > -1 && value % 1 == 0 && value <= MAX_SAFE_INTEGER;
+}
+
+/**
+ * Creates an array of values by running each element in `collection` through
+ * `iteratee`. The `iteratee` is bound to `thisArg` and invoked with three
+ * arguments: (value, index|key, collection).
+ *
+ * If a property name is provided for `iteratee` the created `_.property`
+ * style callback returns the property value of the given element.
+ *
+ * If a value is also provided for `thisArg` the created `_.matchesProperty`
+ * style callback returns `true` for elements that have a matching property
+ * value, else `false`.
+ *
+ * If an object is provided for `iteratee` the created `_.matches` style
+ * callback returns `true` for elements that have the properties of the given
+ * object, else `false`.
+ *
+ * Many lodash methods are guarded to work as iteratees for methods like
+ * `_.every`, `_.filter`, `_.map`, `_.mapValues`, `_.reject`, and `_.some`.
+ *
+ * The guarded methods are:
+ * `ary`, `callback`, `chunk`, `clone`, `create`, `curry`, `curryRight`,
+ * `drop`, `dropRight`, `every`, `fill`, `flatten`, `invert`, `max`, `min`,
+ * `parseInt`, `slice`, `sortBy`, `take`, `takeRight`, `template`, `trim`,
+ * `trimLeft`, `trimRight`, `trunc`, `random`, `range`, `sample`, `some`,
+ * `sum`, `uniq`, and `words`
+ *
+ * @static
+ * @memberOf _
+ * @alias collect
+ * @category Collection
+ * @param {Array|Object|string} collection The collection to iterate over.
+ * @param {Function|Object|string} [iteratee=_.identity] The function invoked
+ * per iteration.
+ * @param {*} [thisArg] The `this` binding of `iteratee`.
+ * @returns {Array} Returns the new mapped array.
+ * @example
+ *
+ * function timesThree(n) {
+ * return n * 3;
+ * }
+ *
+ * _.map([1, 2], timesThree);
+ * // => [3, 6]
+ *
+ * _.map({ 'a': 1, 'b': 2 }, timesThree);
+ * // => [3, 6] (iteration order is not guaranteed)
+ *
+ * var users = [
+ * { 'user': 'barney' },
+ * { 'user': 'fred' }
+ * ];
+ *
+ * // using the `_.property` callback shorthand
+ * _.map(users, 'user');
+ * // => ['barney', 'fred']
+ */
+function map(collection, iteratee, thisArg) {
+ var func = isArray(collection) ? arrayMap : baseMap;
+ iteratee = baseCallback(iteratee, thisArg, 3);
+ return func(collection, iteratee);
+}
+
+module.exports = map;
+
+},{"lodash._arraymap":61,"lodash._basecallback":62,"lodash._baseeach":67,"lodash.isarray":59}],61:[function(require,module,exports){
+/**
+ * lodash 3.0.0 (Custom Build) <https://lodash.com/>
+ * Build: `lodash modern modularize exports="npm" -o ./`
+ * Copyright 2012-2015 The Dojo Foundation <http://dojofoundation.org/>
+ * Based on Underscore.js 1.7.0 <http://underscorejs.org/LICENSE>
+ * Copyright 2009-2015 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
+ * Available under MIT license <https://lodash.com/license>
+ */
+
+/**
+ * A specialized version of `_.map` for arrays without support for callback
+ * shorthands or `this` binding.
+ *
+ * @private
+ * @param {Array} array The array to iterate over.
+ * @param {Function} iteratee The function invoked per iteration.
+ * @returns {Array} Returns the new mapped array.
+ */
+function arrayMap(array, iteratee) {
+ var index = -1,
+ length = array.length,
+ result = Array(length);
+
+ while (++index < length) {
+ result[index] = iteratee(array[index], index, array);
+ }
+ return result;
+}
+
+module.exports = arrayMap;
+
+},{}],62:[function(require,module,exports){
+/**
+ * lodash 3.3.0 (Custom Build) <https://lodash.com/>
+ * Build: `lodash modern modularize exports="npm" -o ./`
+ * Copyright 2012-2015 The Dojo Foundation <http://dojofoundation.org/>
+ * Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>
+ * Copyright 2009-2015 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
+ * Available under MIT license <https://lodash.com/license>
+ */
+var baseIsEqual = require('lodash._baseisequal'),
+ bindCallback = require('lodash._bindcallback'),
+ isArray = require('lodash.isarray'),
+ pairs = require('lodash.pairs');
+
+/** Used to match property names within property paths. */
+var reIsDeepProp = /\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\n\\]|\\.)*?\1)\]/,
+ reIsPlainProp = /^\w*$/,
+ rePropName = /[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\n\\]|\\.)*?)\2)\]/g;
+
+/** Used to match backslashes in property paths. */
+var reEscapeChar = /\\(\\)?/g;
+
+/**
+ * Converts `value` to a string if it's not one. An empty string is returned
+ * for `null` or `undefined` values.
+ *
+ * @private
+ * @param {*} value The value to process.
+ * @returns {string} Returns the string.
+ */
+function baseToString(value) {
+ if (typeof value == 'string') {
+ return value;
+ }
+ return value == null ? '' : (value + '');
+}
+
+/**
+ * The base implementation of `_.callback` which supports specifying the
+ * number of arguments to provide to `func`.
+ *
+ * @private
+ * @param {*} [func=_.identity] The value to convert to a callback.
+ * @param {*} [thisArg] The `this` binding of `func`.
+ * @param {number} [argCount] The number of arguments to provide to `func`.
+ * @returns {Function} Returns the callback.
+ */
+function baseCallback(func, thisArg, argCount) {
+ var type = typeof func;
+ if (type == 'function') {
+ return thisArg === undefined
+ ? func
+ : bindCallback(func, thisArg, argCount);
+ }
+ if (func == null) {
+ return identity;
+ }
+ if (type == 'object') {
+ return baseMatches(func);
+ }
+ return thisArg === undefined
+ ? property(func)
+ : baseMatchesProperty(func, thisArg);
+}
+
+/**
+ * The base implementation of `get` without support for string paths
+ * and default values.
+ *
+ * @private
+ * @param {Object} object The object to query.
+ * @param {Array} path The path of the property to get.
+ * @param {string} [pathKey] The key representation of path.
+ * @returns {*} Returns the resolved value.
+ */
+function baseGet(object, path, pathKey) {
+ if (object == null) {
+ return;
+ }
+ if (pathKey !== undefined && pathKey in toObject(object)) {
+ path = [pathKey];
+ }
+ var index = 0,
+ length = path.length;
+
+ while (object != null && index < length) {
+ object = object[path[index++]];
+ }
+ return (index && index == length) ? object : undefined;
+}
+
+/**
+ * The base implementation of `_.isMatch` without support for callback
+ * shorthands and `this` binding.
+ *
+ * @private
+ * @param {Object} object The object to inspect.
+ * @param {Array} matchData The propery names, values, and compare flags to match.
+ * @param {Function} [customizer] The function to customize comparing objects.
+ * @returns {boolean} Returns `true` if `object` is a match, else `false`.
+ */
+function baseIsMatch(object, matchData, customizer) {
+ var index = matchData.length,
+ length = index,
+ noCustomizer = !customizer;
+
+ if (object == null) {
+ return !length;
+ }
+ object = toObject(object);
+ while (index--) {
+ var data = matchData[index];
+ if ((noCustomizer && data[2])
+ ? data[1] !== object[data[0]]
+ : !(data[0] in object)
+ ) {
+ return false;
+ }
+ }
+ while (++index < length) {
+ data = matchData[index];
+ var key = data[0],
+ objValue = object[key],
+ srcValue = data[1];
+
+ if (noCustomizer && data[2]) {
+ if (objValue === undefined && !(key in object)) {
+ return false;
+ }
+ } else {
+ var result = customizer ? customizer(objValue, srcValue, key) : undefined;
+ if (!(result === undefined ? baseIsEqual(srcValue, objValue, customizer, true) : result)) {
+ return false;
+ }
+ }
+ }
+ return true;
+}
+
+/**
+ * The base implementation of `_.matches` which does not clone `source`.
+ *
+ * @private
+ * @param {Object} source The object of property values to match.
+ * @returns {Function} Returns the new function.
+ */
+function baseMatches(source) {
+ var matchData = getMatchData(source);
+ if (matchData.length == 1 && matchData[0][2]) {
+ var key = matchData[0][0],
+ value = matchData[0][1];
+
+ return function(object) {
+ if (object == null) {
+ return false;
+ }
+ return object[key] === value && (value !== undefined || (key in toObject(object)));
+ };
+ }
+ return function(object) {
+ return baseIsMatch(object, matchData);
+ };
+}
+
+/**
+ * The base implementation of `_.matchesProperty` which does not which does
+ * not clone `value`.
+ *
+ * @private
+ * @param {string} path The path of the property to get.
+ * @param {*} srcValue The value to compare.
+ * @returns {Function} Returns the new function.
+ */
+function baseMatchesProperty(path, srcValue) {
+ var isArr = isArray(path),
+ isCommon = isKey(path) && isStrictComparable(srcValue),
+ pathKey = (path + '');
+
+ path = toPath(path);
+ return function(object) {
+ if (object == null) {
+ return false;
+ }
+ var key = pathKey;
+ object = toObject(object);
+ if ((isArr || !isCommon) && !(key in object)) {
+ object = path.length == 1 ? object : baseGet(object, baseSlice(path, 0, -1));
+ if (object == null) {
+ return false;
+ }
+ key = last(path);
+ object = toObject(object);
+ }
+ return object[key] === srcValue
+ ? (srcValue !== undefined || (key in object))
+ : baseIsEqual(srcValue, object[key], undefined, true);
+ };
+}
+
+/**
+ * The base implementation of `_.property` without support for deep paths.
+ *
+ * @private
+ * @param {string} key The key of the property to get.
+ * @returns {Function} Returns the new function.
+ */
+function baseProperty(key) {
+ return function(object) {
+ return object == null ? undefined : object[key];
+ };
+}
+
+/**
+ * A specialized version of `baseProperty` which supports deep paths.
+ *
+ * @private
+ * @param {Array|string} path The path of the property to get.
+ * @returns {Function} Returns the new function.
+ */
+function basePropertyDeep(path) {
+ var pathKey = (path + '');
+ path = toPath(path);
+ return function(object) {
+ return baseGet(object, path, pathKey);
+ };
+}
+
+/**
+ * The base implementation of `_.slice` without an iteratee call guard.
+ *
+ * @private
+ * @param {Array} array The array to slice.
+ * @param {number} [start=0] The start position.
+ * @param {number} [end=array.length] The end position.
+ * @returns {Array} Returns the slice of `array`.
+ */
+function baseSlice(array, start, end) {
+ var index = -1,
+ length = array.length;
+
+ start = start == null ? 0 : (+start || 0);
+ if (start < 0) {
+ start = -start > length ? 0 : (length + start);
+ }
+ end = (end === undefined || end > length) ? length : (+end || 0);
+ if (end < 0) {
+ end += length;
+ }
+ length = start > end ? 0 : ((end - start) >>> 0);
+ start >>>= 0;
+
+ var result = Array(length);
+ while (++index < length) {
+ result[index] = array[index + start];
+ }
+ return result;
+}
+
+/**
+ * Gets the propery names, values, and compare flags of `object`.
+ *
+ * @private
+ * @param {Object} object The object to query.
+ * @returns {Array} Returns the match data of `object`.
+ */
+function getMatchData(object) {
+ var result = pairs(object),
+ length = result.length;
+
+ while (length--) {
+ result[length][2] = isStrictComparable(result[length][1]);
+ }
+ return result;
+}
+
+/**
+ * Checks if `value` is a property name and not a property path.
+ *
+ * @private
+ * @param {*} value The value to check.
+ * @param {Object} [object] The object to query keys on.
+ * @returns {boolean} Returns `true` if `value` is a property name, else `false`.
+ */
+function isKey(value, object) {
+ var type = typeof value;
+ if ((type == 'string' && reIsPlainProp.test(value)) || type == 'number') {
+ return true;
+ }
+ if (isArray(value)) {
+ return false;
+ }
+ var result = !reIsDeepProp.test(value);
+ return result || (object != null && value in toObject(object));
+}
+
+/**
+ * Checks if `value` is suitable for strict equality comparisons, i.e. `===`.
+ *
+ * @private
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` if suitable for strict
+ * equality comparisons, else `false`.
+ */
+function isStrictComparable(value) {
+ return value === value && !isObject(value);
+}
+
+/**
+ * Converts `value` to an object if it's not one.
+ *
+ * @private
+ * @param {*} value The value to process.
+ * @returns {Object} Returns the object.
+ */
+function toObject(value) {
+ return isObject(value) ? value : Object(value);
+}
+
+/**
+ * Converts `value` to property path array if it's not one.
+ *
+ * @private
+ * @param {*} value The value to process.
+ * @returns {Array} Returns the property path array.
+ */
+function toPath(value) {
+ if (isArray(value)) {
+ return value;
+ }
+ var result = [];
+ baseToString(value).replace(rePropName, function(match, number, quote, string) {
+ result.push(quote ? string.replace(reEscapeChar, '$1') : (number || match));
+ });
+ return result;
+}
+
+/**
+ * Gets the last element of `array`.
+ *
+ * @static
+ * @memberOf _
+ * @category Array
+ * @param {Array} array The array to query.
+ * @returns {*} Returns the last element of `array`.
+ * @example
+ *
+ * _.last([1, 2, 3]);
+ * // => 3
+ */
+function last(array) {
+ var length = array ? array.length : 0;
+ return length ? array[length - 1] : undefined;
+}
+
+/**
+ * Checks if `value` is the [language type](https://es5.github.io/#x8) of `Object`.
+ * (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`)
+ *
+ * @static
+ * @memberOf _
+ * @category Lang
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is an object, else `false`.
+ * @example
+ *
+ * _.isObject({});
+ * // => true
+ *
+ * _.isObject([1, 2, 3]);
+ * // => true
+ *
+ * _.isObject(1);
+ * // => false
+ */
+function isObject(value) {
+ // Avoid a V8 JIT bug in Chrome 19-20.
+ // See https://code.google.com/p/v8/issues/detail?id=2291 for more details.
+ var type = typeof value;
+ return !!value && (type == 'object' || type == 'function');
+}
+
+/**
+ * This method returns the first argument provided to it.
+ *
+ * @static
+ * @memberOf _
+ * @category Utility
+ * @param {*} value Any value.
+ * @returns {*} Returns `value`.
+ * @example
+ *
+ * var object = { 'user': 'fred' };
+ *
+ * _.identity(object) === object;
+ * // => true
+ */
+function identity(value) {
+ return value;
+}
+
+/**
+ * Creates a function which returns the property value at `path` on a
+ * given object.
+ *
+ * @static
+ * @memberOf _
+ * @category Utility
+ * @param {Array|string} path The path of the property to get.
+ * @returns {Function} Returns the new function.
+ * @example
+ *
+ * var objects = [
+ * { 'a': { 'b': { 'c': 2 } } },
+ * { 'a': { 'b': { 'c': 1 } } }
+ * ];
+ *
+ * _.map(objects, _.property('a.b.c'));
+ * // => [2, 1]
+ *
+ * _.pluck(_.sortBy(objects, _.property(['a', 'b', 'c'])), 'a.b.c');
+ * // => [1, 2]
+ */
+function property(path) {
+ return isKey(path) ? baseProperty(path) : basePropertyDeep(path);
+}
+
+module.exports = baseCallback;
+
+},{"lodash._baseisequal":63,"lodash._bindcallback":65,"lodash.isarray":59,"lodash.pairs":66}],63:[function(require,module,exports){
+/**
+ * lodash 3.0.7 (Custom Build) <https://lodash.com/>
+ * Build: `lodash modern modularize exports="npm" -o ./`
+ * Copyright 2012-2015 The Dojo Foundation <http://dojofoundation.org/>
+ * Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>
+ * Copyright 2009-2015 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
+ * Available under MIT license <https://lodash.com/license>
+ */
+var isArray = require('lodash.isarray'),
+ isTypedArray = require('lodash.istypedarray'),
+ keys = require('lodash.keys');
+
+/** `Object#toString` result references. */
+var argsTag = '[object Arguments]',
+ arrayTag = '[object Array]',
+ boolTag = '[object Boolean]',
+ dateTag = '[object Date]',
+ errorTag = '[object Error]',
+ numberTag = '[object Number]',
+ objectTag = '[object Object]',
+ regexpTag = '[object RegExp]',
+ stringTag = '[object String]';
+
+/**
+ * Checks if `value` is object-like.
+ *
+ * @private
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is object-like, else `false`.
+ */
+function isObjectLike(value) {
+ return !!value && typeof value == 'object';
+}
+
+/** Used for native method references. */
+var objectProto = Object.prototype;
+
+/** Used to check objects for own properties. */
+var hasOwnProperty = objectProto.hasOwnProperty;
+
+/**
+ * Used to resolve the [`toStringTag`](https://people.mozilla.org/~jorendorff/es6-draft.html#sec-object.prototype.tostring)
+ * of values.
+ */
+var objToString = objectProto.toString;
+
+/**
+ * A specialized version of `_.some` for arrays without support for callback
+ * shorthands and `this` binding.
+ *
+ * @private
+ * @param {Array} array The array to iterate over.
+ * @param {Function} predicate The function invoked per iteration.
+ * @returns {boolean} Returns `true` if any element passes the predicate check,
+ * else `false`.
+ */
+function arraySome(array, predicate) {
+ var index = -1,
+ length = array.length;
+
+ while (++index < length) {
+ if (predicate(array[index], index, array)) {
+ return true;
+ }
+ }
+ return false;
+}
+
+/**
+ * The base implementation of `_.isEqual` without support for `this` binding
+ * `customizer` functions.
+ *
+ * @private
+ * @param {*} value The value to compare.
+ * @param {*} other The other value to compare.
+ * @param {Function} [customizer] The function to customize comparing values.
+ * @param {boolean} [isLoose] Specify performing partial comparisons.
+ * @param {Array} [stackA] Tracks traversed `value` objects.
+ * @param {Array} [stackB] Tracks traversed `other` objects.
+ * @returns {boolean} Returns `true` if the values are equivalent, else `false`.
+ */
+function baseIsEqual(value, other, customizer, isLoose, stackA, stackB) {
+ if (value === other) {
+ return true;
+ }
+ if (value == null || other == null || (!isObject(value) && !isObjectLike(other))) {
+ return value !== value && other !== other;
+ }
+ return baseIsEqualDeep(value, other, baseIsEqual, customizer, isLoose, stackA, stackB);
+}
+
+/**
+ * A specialized version of `baseIsEqual` for arrays and objects which performs
+ * deep comparisons and tracks traversed objects enabling objects with circular
+ * references to be compared.
+ *
+ * @private
+ * @param {Object} object The object to compare.
+ * @param {Object} other The other object to compare.
+ * @param {Function} equalFunc The function to determine equivalents of values.
+ * @param {Function} [customizer] The function to customize comparing objects.
+ * @param {boolean} [isLoose] Specify performing partial comparisons.
+ * @param {Array} [stackA=[]] Tracks traversed `value` objects.
+ * @param {Array} [stackB=[]] Tracks traversed `other` objects.
+ * @returns {boolean} Returns `true` if the objects are equivalent, else `false`.
+ */
+function baseIsEqualDeep(object, other, equalFunc, customizer, isLoose, stackA, stackB) {
+ var objIsArr = isArray(object),
+ othIsArr = isArray(other),
+ objTag = arrayTag,
+ othTag = arrayTag;
+
+ if (!objIsArr) {
+ objTag = objToString.call(object);
+ if (objTag == argsTag) {
+ objTag = objectTag;
+ } else if (objTag != objectTag) {
+ objIsArr = isTypedArray(object);
+ }
+ }
+ if (!othIsArr) {
+ othTag = objToString.call(other);
+ if (othTag == argsTag) {
+ othTag = objectTag;
+ } else if (othTag != objectTag) {
+ othIsArr = isTypedArray(other);
+ }
+ }
+ var objIsObj = objTag == objectTag,
+ othIsObj = othTag == objectTag,
+ isSameTag = objTag == othTag;
+
+ if (isSameTag && !(objIsArr || objIsObj)) {
+ return equalByTag(object, other, objTag);
+ }
+ if (!isLoose) {
+ var objIsWrapped = objIsObj && hasOwnProperty.call(object, '__wrapped__'),
+ othIsWrapped = othIsObj && hasOwnProperty.call(other, '__wrapped__');
+
+ if (objIsWrapped || othIsWrapped) {
+ return equalFunc(objIsWrapped ? object.value() : object, othIsWrapped ? other.value() : other, customizer, isLoose, stackA, stackB);
+ }
+ }
+ if (!isSameTag) {
+ return false;
+ }
+ // Assume cyclic values are equal.
+ // For more information on detecting circular references see https://es5.github.io/#JO.
+ stackA || (stackA = []);
+ stackB || (stackB = []);
+
+ var length = stackA.length;
+ while (length--) {
+ if (stackA[length] == object) {
+ return stackB[length] == other;
+ }
+ }
+ // Add `object` and `other` to the stack of traversed objects.
+ stackA.push(object);
+ stackB.push(other);
+
+ var result = (objIsArr ? equalArrays : equalObjects)(object, other, equalFunc, customizer, isLoose, stackA, stackB);
+
+ stackA.pop();
+ stackB.pop();
+
+ return result;
+}
+
+/**
+ * A specialized version of `baseIsEqualDeep` for arrays with support for
+ * partial deep comparisons.
+ *
+ * @private
+ * @param {Array} array The array to compare.
+ * @param {Array} other The other array to compare.
+ * @param {Function} equalFunc The function to determine equivalents of values.
+ * @param {Function} [customizer] The function to customize comparing arrays.
+ * @param {boolean} [isLoose] Specify performing partial comparisons.
+ * @param {Array} [stackA] Tracks traversed `value` objects.
+ * @param {Array} [stackB] Tracks traversed `other` objects.
+ * @returns {boolean} Returns `true` if the arrays are equivalent, else `false`.
+ */
+function equalArrays(array, other, equalFunc, customizer, isLoose, stackA, stackB) {
+ var index = -1,
+ arrLength = array.length,
+ othLength = other.length;
+
+ if (arrLength != othLength && !(isLoose && othLength > arrLength)) {
+ return false;
+ }
+ // Ignore non-index properties.
+ while (++index < arrLength) {
+ var arrValue = array[index],
+ othValue = other[index],
+ result = customizer ? customizer(isLoose ? othValue : arrValue, isLoose ? arrValue : othValue, index) : undefined;
+
+ if (result !== undefined) {
+ if (result) {
+ continue;
+ }
+ return false;
+ }
+ // Recursively compare arrays (susceptible to call stack limits).
+ if (isLoose) {
+ if (!arraySome(other, function(othValue) {
+ return arrValue === othValue || equalFunc(arrValue, othValue, customizer, isLoose, stackA, stackB);
+ })) {
+ return false;
+ }
+ } else if (!(arrValue === othValue || equalFunc(arrValue, othValue, customizer, isLoose, stackA, stackB))) {
+ return false;
+ }
+ }
+ return true;
+}
+
+/**
+ * A specialized version of `baseIsEqualDeep` for comparing objects of
+ * the same `toStringTag`.
+ *
+ * **Note:** This function only supports comparing values with tags of
+ * `Boolean`, `Date`, `Error`, `Number`, `RegExp`, or `String`.
+ *
+ * @private
+ * @param {Object} value The object to compare.
+ * @param {Object} other The other object to compare.
+ * @param {string} tag The `toStringTag` of the objects to compare.
+ * @returns {boolean} Returns `true` if the objects are equivalent, else `false`.
+ */
+function equalByTag(object, other, tag) {
+ switch (tag) {
+ case boolTag:
+ case dateTag:
+ // Coerce dates and booleans to numbers, dates to milliseconds and booleans
+ // to `1` or `0` treating invalid dates coerced to `NaN` as not equal.
+ return +object == +other;
+
+ case errorTag:
+ return object.name == other.name && object.message == other.message;
+
+ case numberTag:
+ // Treat `NaN` vs. `NaN` as equal.
+ return (object != +object)
+ ? other != +other
+ : object == +other;
+
+ case regexpTag:
+ case stringTag:
+ // Coerce regexes to strings and treat strings primitives and string
+ // objects as equal. See https://es5.github.io/#x15.10.6.4 for more details.
+ return object == (other + '');
+ }
+ return false;
+}
+
+/**
+ * A specialized version of `baseIsEqualDeep` for objects with support for
+ * partial deep comparisons.
+ *
+ * @private
+ * @param {Object} object The object to compare.
+ * @param {Object} other The other object to compare.
+ * @param {Function} equalFunc The function to determine equivalents of values.
+ * @param {Function} [customizer] The function to customize comparing values.
+ * @param {boolean} [isLoose] Specify performing partial comparisons.
+ * @param {Array} [stackA] Tracks traversed `value` objects.
+ * @param {Array} [stackB] Tracks traversed `other` objects.
+ * @returns {boolean} Returns `true` if the objects are equivalent, else `false`.
+ */
+function equalObjects(object, other, equalFunc, customizer, isLoose, stackA, stackB) {
+ var objProps = keys(object),
+ objLength = objProps.length,
+ othProps = keys(other),
+ othLength = othProps.length;
+
+ if (objLength != othLength && !isLoose) {
+ return false;
+ }
+ var index = objLength;
+ while (index--) {
+ var key = objProps[index];
+ if (!(isLoose ? key in other : hasOwnProperty.call(other, key))) {
+ return false;
+ }
+ }
+ var skipCtor = isLoose;
+ while (++index < objLength) {
+ key = objProps[index];
+ var objValue = object[key],
+ othValue = other[key],
+ result = customizer ? customizer(isLoose ? othValue : objValue, isLoose? objValue : othValue, key) : undefined;
+
+ // Recursively compare objects (susceptible to call stack limits).
+ if (!(result === undefined ? equalFunc(objValue, othValue, customizer, isLoose, stackA, stackB) : result)) {
+ return false;
+ }
+ skipCtor || (skipCtor = key == 'constructor');
+ }
+ if (!skipCtor) {
+ var objCtor = object.constructor,
+ othCtor = other.constructor;
+
+ // Non `Object` object instances with different constructors are not equal.
+ if (objCtor != othCtor &&
+ ('constructor' in object && 'constructor' in other) &&
+ !(typeof objCtor == 'function' && objCtor instanceof objCtor &&
+ typeof othCtor == 'function' && othCtor instanceof othCtor)) {
+ return false;
+ }
+ }
+ return true;
+}
+
+/**
+ * Checks if `value` is the [language type](https://es5.github.io/#x8) of `Object`.
+ * (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`)
+ *
+ * @static
+ * @memberOf _
+ * @category Lang
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is an object, else `false`.
+ * @example
+ *
+ * _.isObject({});
+ * // => true
+ *
+ * _.isObject([1, 2, 3]);
+ * // => true
+ *
+ * _.isObject(1);
+ * // => false
+ */
+function isObject(value) {
+ // Avoid a V8 JIT bug in Chrome 19-20.
+ // See https://code.google.com/p/v8/issues/detail?id=2291 for more details.
+ var type = typeof value;
+ return !!value && (type == 'object' || type == 'function');
+}
+
+module.exports = baseIsEqual;
+
+},{"lodash.isarray":59,"lodash.istypedarray":64,"lodash.keys":68}],64:[function(require,module,exports){
+/**
+ * lodash 3.0.2 (Custom Build) <https://lodash.com/>
+ * Build: `lodash modern modularize exports="npm" -o ./`
+ * Copyright 2012-2015 The Dojo Foundation <http://dojofoundation.org/>
+ * Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>
+ * Copyright 2009-2015 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
+ * Available under MIT license <https://lodash.com/license>
+ */
+
+/** `Object#toString` result references. */
+var argsTag = '[object Arguments]',
+ arrayTag = '[object Array]',
+ boolTag = '[object Boolean]',
+ dateTag = '[object Date]',
+ errorTag = '[object Error]',
+ funcTag = '[object Function]',
+ mapTag = '[object Map]',
+ numberTag = '[object Number]',
+ objectTag = '[object Object]',
+ regexpTag = '[object RegExp]',
+ setTag = '[object Set]',
+ stringTag = '[object String]',
+ weakMapTag = '[object WeakMap]';
+
+var arrayBufferTag = '[object ArrayBuffer]',
+ float32Tag = '[object Float32Array]',
+ float64Tag = '[object Float64Array]',
+ int8Tag = '[object Int8Array]',
+ int16Tag = '[object Int16Array]',
+ int32Tag = '[object Int32Array]',
+ uint8Tag = '[object Uint8Array]',
+ uint8ClampedTag = '[object Uint8ClampedArray]',
+ uint16Tag = '[object Uint16Array]',
+ uint32Tag = '[object Uint32Array]';
+
+/** Used to identify `toStringTag` values of typed arrays. */
+var typedArrayTags = {};
+typedArrayTags[float32Tag] = typedArrayTags[float64Tag] =
+typedArrayTags[int8Tag] = typedArrayTags[int16Tag] =
+typedArrayTags[int32Tag] = typedArrayTags[uint8Tag] =
+typedArrayTags[uint8ClampedTag] = typedArrayTags[uint16Tag] =
+typedArrayTags[uint32Tag] = true;
+typedArrayTags[argsTag] = typedArrayTags[arrayTag] =
+typedArrayTags[arrayBufferTag] = typedArrayTags[boolTag] =
+typedArrayTags[dateTag] = typedArrayTags[errorTag] =
+typedArrayTags[funcTag] = typedArrayTags[mapTag] =
+typedArrayTags[numberTag] = typedArrayTags[objectTag] =
+typedArrayTags[regexpTag] = typedArrayTags[setTag] =
+typedArrayTags[stringTag] = typedArrayTags[weakMapTag] = false;
+
+/**
+ * Checks if `value` is object-like.
+ *
+ * @private
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is object-like, else `false`.
+ */
+function isObjectLike(value) {
+ return !!value && typeof value == 'object';
+}
+
+/** Used for native method references. */
+var objectProto = Object.prototype;
+
+/**
+ * Used to resolve the [`toStringTag`](https://people.mozilla.org/~jorendorff/es6-draft.html#sec-object.prototype.tostring)
+ * of values.
+ */
+var objToString = objectProto.toString;
+
+/**
+ * Used as the [maximum length](https://people.mozilla.org/~jorendorff/es6-draft.html#sec-number.max_safe_integer)
+ * of an array-like value.
+ */
+var MAX_SAFE_INTEGER = 9007199254740991;
+
+/**
+ * Checks if `value` is a valid array-like length.
+ *
+ * **Note:** This function is based on [`ToLength`](https://people.mozilla.org/~jorendorff/es6-draft.html#sec-tolength).
+ *
+ * @private
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is a valid length, else `false`.
+ */
+function isLength(value) {
+ return typeof value == 'number' && value > -1 && value % 1 == 0 && value <= MAX_SAFE_INTEGER;
+}
+
+/**
+ * Checks if `value` is classified as a typed array.
+ *
+ * @static
+ * @memberOf _
+ * @category Lang
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is correctly classified, else `false`.
+ * @example
+ *
+ * _.isTypedArray(new Uint8Array);
+ * // => true
+ *
+ * _.isTypedArray([]);
+ * // => false
+ */
+function isTypedArray(value) {
+ return isObjectLike(value) && isLength(value.length) && !!typedArrayTags[objToString.call(value)];
+}
+
+module.exports = isTypedArray;
+
+},{}],65:[function(require,module,exports){
+arguments[4][54][0].apply(exports,arguments)
+},{"dup":54}],66:[function(require,module,exports){
+/**
+ * lodash 3.0.1 (Custom Build) <https://lodash.com/>
+ * Build: `lodash modern modularize exports="npm" -o ./`
+ * Copyright 2012-2015 The Dojo Foundation <http://dojofoundation.org/>
+ * Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>
+ * Copyright 2009-2015 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
+ * Available under MIT license <https://lodash.com/license>
+ */
+var keys = require('lodash.keys');
+
+/**
+ * Converts `value` to an object if it's not one.
+ *
+ * @private
+ * @param {*} value The value to process.
+ * @returns {Object} Returns the object.
+ */
+function toObject(value) {
+ return isObject(value) ? value : Object(value);
+}
+
+/**
+ * Checks if `value` is the [language type](https://es5.github.io/#x8) of `Object`.
+ * (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`)
+ *
+ * @static
+ * @memberOf _
+ * @category Lang
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is an object, else `false`.
+ * @example
+ *
+ * _.isObject({});
+ * // => true
+ *
+ * _.isObject([1, 2, 3]);
+ * // => true
+ *
+ * _.isObject(1);
+ * // => false
+ */
+function isObject(value) {
+ // Avoid a V8 JIT bug in Chrome 19-20.
+ // See https://code.google.com/p/v8/issues/detail?id=2291 for more details.
+ var type = typeof value;
+ return !!value && (type == 'object' || type == 'function');
+}
+
+/**
+ * Creates a two dimensional array of the key-value pairs for `object`,
+ * e.g. `[[key1, value1], [key2, value2]]`.
+ *
+ * @static
+ * @memberOf _
+ * @category Object
+ * @param {Object} object The object to query.
+ * @returns {Array} Returns the new array of key-value pairs.
+ * @example
+ *
+ * _.pairs({ 'barney': 36, 'fred': 40 });
+ * // => [['barney', 36], ['fred', 40]] (iteration order is not guaranteed)
+ */
+function pairs(object) {
+ object = toObject(object);
+
+ var index = -1,
+ props = keys(object),
+ length = props.length,
+ result = Array(length);
+
+ while (++index < length) {
+ var key = props[index];
+ result[index] = [key, object[key]];
+ }
+ return result;
+}
+
+module.exports = pairs;
+
+},{"lodash.keys":68}],67:[function(require,module,exports){
+arguments[4][50][0].apply(exports,arguments)
+},{"dup":50,"lodash.keys":68}],68:[function(require,module,exports){
+arguments[4][51][0].apply(exports,arguments)
+},{"dup":51,"lodash._getnative":69,"lodash.isarguments":70,"lodash.isarray":59}],69:[function(require,module,exports){
+arguments[4][52][0].apply(exports,arguments)
+},{"dup":52}],70:[function(require,module,exports){
+arguments[4][53][0].apply(exports,arguments)
+},{"dup":53}],71:[function(require,module,exports){
+var toSDP = require('./lib/tosdp');
+var toJSON = require('./lib/tojson');
+
+
+// Converstion from JSON to SDP
+
+exports.toIncomingSDPOffer = function (session) {
+ return toSDP.toSessionSDP(session, {
+ role: 'responder',
+ direction: 'incoming'
+ });
+};
+exports.toOutgoingSDPOffer = function (session) {
+ return toSDP.toSessionSDP(session, {
+ role: 'initiator',
+ direction: 'outgoing'
+ });
+};
+exports.toIncomingSDPAnswer = function (session) {
+ return toSDP.toSessionSDP(session, {
+ role: 'initiator',
+ direction: 'incoming'
+ });
+};
+exports.toOutgoingSDPAnswer = function (session) {
+ return toSDP.toSessionSDP(session, {
+ role: 'responder',
+ direction: 'outgoing'
+ });
+};
+exports.toIncomingMediaSDPOffer = function (media) {
+ return toSDP.toMediaSDP(media, {
+ role: 'responder',
+ direction: 'incoming'
+ });
+};
+exports.toOutgoingMediaSDPOffer = function (media) {
+ return toSDP.toMediaSDP(media, {
+ role: 'initiator',
+ direction: 'outgoing'
+ });
+};
+exports.toIncomingMediaSDPAnswer = function (media) {
+ return toSDP.toMediaSDP(media, {
+ role: 'initiator',
+ direction: 'incoming'
+ });
+};
+exports.toOutgoingMediaSDPAnswer = function (media) {
+ return toSDP.toMediaSDP(media, {
+ role: 'responder',
+ direction: 'outgoing'
+ });
+};
+exports.toCandidateSDP = toSDP.toCandidateSDP;
+exports.toMediaSDP = toSDP.toMediaSDP;
+exports.toSessionSDP = toSDP.toSessionSDP;
+
+
+// Conversion from SDP to JSON
+
+exports.toIncomingJSONOffer = function (sdp, creators) {
+ return toJSON.toSessionJSON(sdp, {
+ role: 'responder',
+ direction: 'incoming',
+ creators: creators
+ });
+};
+exports.toOutgoingJSONOffer = function (sdp, creators) {
+ return toJSON.toSessionJSON(sdp, {
+ role: 'initiator',
+ direction: 'outgoing',
+ creators: creators
+ });
+};
+exports.toIncomingJSONAnswer = function (sdp, creators) {
+ return toJSON.toSessionJSON(sdp, {
+ role: 'initiator',
+ direction: 'incoming',
+ creators: creators
+ });
+};
+exports.toOutgoingJSONAnswer = function (sdp, creators) {
+ return toJSON.toSessionJSON(sdp, {
+ role: 'responder',
+ direction: 'outgoing',
+ creators: creators
+ });
+};
+exports.toIncomingMediaJSONOffer = function (sdp, creator) {
+ return toJSON.toMediaJSON(sdp, {
+ role: 'responder',
+ direction: 'incoming',
+ creator: creator
+ });
+};
+exports.toOutgoingMediaJSONOffer = function (sdp, creator) {
+ return toJSON.toMediaJSON(sdp, {
+ role: 'initiator',
+ direction: 'outgoing',
+ creator: creator
+ });
+};
+exports.toIncomingMediaJSONAnswer = function (sdp, creator) {
+ return toJSON.toMediaJSON(sdp, {
+ role: 'initiator',
+ direction: 'incoming',
+ creator: creator
+ });
+};
+exports.toOutgoingMediaJSONAnswer = function (sdp, creator) {
+ return toJSON.toMediaJSON(sdp, {
+ role: 'responder',
+ direction: 'outgoing',
+ creator: creator
+ });
+};
+exports.toCandidateJSON = toJSON.toCandidateJSON;
+exports.toMediaJSON = toJSON.toMediaJSON;
+exports.toSessionJSON = toJSON.toSessionJSON;
+
+},{"./lib/tojson":74,"./lib/tosdp":75}],72:[function(require,module,exports){
+exports.lines = function (sdp) {
+ return sdp.split('\r\n').filter(function (line) {
+ return line.length > 0;
+ });
+};
+
+exports.findLine = function (prefix, mediaLines, sessionLines) {
+ var prefixLength = prefix.length;
+ for (var i = 0; i < mediaLines.length; i++) {
+ if (mediaLines[i].substr(0, prefixLength) === prefix) {
+ return mediaLines[i];
+ }
+ }
+ // Continue searching in parent session section
+ if (!sessionLines) {
+ return false;
+ }
+
+ for (var j = 0; j < sessionLines.length; j++) {
+ if (sessionLines[j].substr(0, prefixLength) === prefix) {
+ return sessionLines[j];
+ }
+ }
+
+ return false;
+};
+
+exports.findLines = function (prefix, mediaLines, sessionLines) {
+ var results = [];
+ var prefixLength = prefix.length;
+ for (var i = 0; i < mediaLines.length; i++) {
+ if (mediaLines[i].substr(0, prefixLength) === prefix) {
+ results.push(mediaLines[i]);
+ }
+ }
+ if (results.length || !sessionLines) {
+ return results;
+ }
+ for (var j = 0; j < sessionLines.length; j++) {
+ if (sessionLines[j].substr(0, prefixLength) === prefix) {
+ results.push(sessionLines[j]);
+ }
+ }
+ return results;
+};
+
+exports.mline = function (line) {
+ var parts = line.substr(2).split(' ');
+ var parsed = {
+ media: parts[0],
+ port: parts[1],
+ proto: parts[2],
+ formats: []
+ };
+ for (var i = 3; i < parts.length; i++) {
+ if (parts[i]) {
+ parsed.formats.push(parts[i]);
+ }
+ }
+ return parsed;
+};
+
+exports.rtpmap = function (line) {
+ var parts = line.substr(9).split(' ');
+ var parsed = {
+ id: parts.shift()
+ };
+
+ parts = parts[0].split('/');
+
+ parsed.name = parts[0];
+ parsed.clockrate = parts[1];
+ parsed.channels = parts.length == 3 ? parts[2] : '1';
+ return parsed;
+};
+
+exports.sctpmap = function (line) {
+ // based on -05 draft
+ var parts = line.substr(10).split(' ');
+ var parsed = {
+ number: parts.shift(),
+ protocol: parts.shift(),
+ streams: parts.shift()
+ };
+ return parsed;
+};
+
+
+exports.fmtp = function (line) {
+ var kv, key, value;
+ var parts = line.substr(line.indexOf(' ') + 1).split(';');
+ var parsed = [];
+ for (var i = 0; i < parts.length; i++) {
+ kv = parts[i].split('=');
+ key = kv[0].trim();
+ value = kv[1];
+ if (key && value) {
+ parsed.push({key: key, value: value});
+ } else if (key) {
+ parsed.push({key: '', value: key});
+ }
+ }
+ return parsed;
+};
+
+exports.crypto = function (line) {
+ var parts = line.substr(9).split(' ');
+ var parsed = {
+ tag: parts[0],
+ cipherSuite: parts[1],
+ keyParams: parts[2],
+ sessionParams: parts.slice(3).join(' ')
+ };
+ return parsed;
+};
+
+exports.fingerprint = function (line) {
+ var parts = line.substr(14).split(' ');
+ return {
+ hash: parts[0],
+ value: parts[1]
+ };
+};
+
+exports.extmap = function (line) {
+ var parts = line.substr(9).split(' ');
+ var parsed = {};
+
+ var idpart = parts.shift();
+ var sp = idpart.indexOf('/');
+ if (sp >= 0) {
+ parsed.id = idpart.substr(0, sp);
+ parsed.senders = idpart.substr(sp + 1);
+ } else {
+ parsed.id = idpart;
+ parsed.senders = 'sendrecv';
+ }
+
+ parsed.uri = parts.shift() || '';
+
+ return parsed;
+};
+
+exports.rtcpfb = function (line) {
+ var parts = line.substr(10).split(' ');
+ var parsed = {};
+ parsed.id = parts.shift();
+ parsed.type = parts.shift();
+ if (parsed.type === 'trr-int') {
+ parsed.value = parts.shift();
+ } else {
+ parsed.subtype = parts.shift() || '';
+ }
+ parsed.parameters = parts;
+ return parsed;
+};
+
+exports.candidate = function (line) {
+ var parts;
+ if (line.indexOf('a=candidate:') === 0) {
+ parts = line.substring(12).split(' ');
+ } else { // no a=candidate
+ parts = line.substring(10).split(' ');
+ }
+
+ var candidate = {
+ foundation: parts[0],
+ component: parts[1],
+ protocol: parts[2].toLowerCase(),
+ priority: parts[3],
+ ip: parts[4],
+ port: parts[5],
+ // skip parts[6] == 'typ'
+ type: parts[7],
+ generation: '0'
+ };
+
+ for (var i = 8; i < parts.length; i += 2) {
+ if (parts[i] === 'raddr') {
+ candidate.relAddr = parts[i + 1];
+ } else if (parts[i] === 'rport') {
+ candidate.relPort = parts[i + 1];
+ } else if (parts[i] === 'generation') {
+ candidate.generation = parts[i + 1];
+ } else if (parts[i] === 'tcptype') {
+ candidate.tcpType = parts[i + 1];
+ }
+ }
+
+ candidate.network = '1';
+
+ return candidate;
+};
+
+exports.sourceGroups = function (lines) {
+ var parsed = [];
+ for (var i = 0; i < lines.length; i++) {
+ var parts = lines[i].substr(13).split(' ');
+ parsed.push({
+ semantics: parts.shift(),
+ sources: parts
+ });
+ }
+ return parsed;
+};
+
+exports.sources = function (lines) {
+ // http://tools.ietf.org/html/rfc5576
+ var parsed = [];
+ var sources = {};
+ for (var i = 0; i < lines.length; i++) {
+ var parts = lines[i].substr(7).split(' ');
+ var ssrc = parts.shift();
+
+ if (!sources[ssrc]) {
+ var source = {
+ ssrc: ssrc,
+ parameters: []
+ };
+ parsed.push(source);
+
+ // Keep an index
+ sources[ssrc] = source;
+ }
+
+ parts = parts.join(' ').split(':');
+ var attribute = parts.shift();
+ var value = parts.join(':') || null;
+
+ sources[ssrc].parameters.push({
+ key: attribute,
+ value: value
+ });
+ }
+
+ return parsed;
+};
+
+exports.groups = function (lines) {
+ // http://tools.ietf.org/html/rfc5888
+ var parsed = [];
+ var parts;
+ for (var i = 0; i < lines.length; i++) {
+ parts = lines[i].substr(8).split(' ');
+ parsed.push({
+ semantics: parts.shift(),
+ contents: parts
+ });
+ }
+ return parsed;
+};
+
+exports.bandwidth = function (line) {
+ var parts = line.substr(2).split(':');
+ var parsed = {};
+ parsed.type = parts.shift();
+ parsed.bandwidth = parts.shift();
+ return parsed;
+};
+
+exports.msid = function (line) {
+ var data = line.substr(7);
+ var parts = data.split(' ');
+ return {
+ msid: data,
+ mslabel: parts[0],
+ label: parts[1]
+ };
+};
+
+},{}],73:[function(require,module,exports){
+module.exports = {
+ initiator: {
+ incoming: {
+ initiator: 'recvonly',
+ responder: 'sendonly',
+ both: 'sendrecv',
+ none: 'inactive',
+ recvonly: 'initiator',
+ sendonly: 'responder',
+ sendrecv: 'both',
+ inactive: 'none'
+ },
+ outgoing: {
+ initiator: 'sendonly',
+ responder: 'recvonly',
+ both: 'sendrecv',
+ none: 'inactive',
+ recvonly: 'responder',
+ sendonly: 'initiator',
+ sendrecv: 'both',
+ inactive: 'none'
+ }
+ },
+ responder: {
+ incoming: {
+ initiator: 'sendonly',
+ responder: 'recvonly',
+ both: 'sendrecv',
+ none: 'inactive',
+ recvonly: 'responder',
+ sendonly: 'initiator',
+ sendrecv: 'both',
+ inactive: 'none'
+ },
+ outgoing: {
+ initiator: 'recvonly',
+ responder: 'sendonly',
+ both: 'sendrecv',
+ none: 'inactive',
+ recvonly: 'initiator',
+ sendonly: 'responder',
+ sendrecv: 'both',
+ inactive: 'none'
+ }
+ }
+};
+
+},{}],74:[function(require,module,exports){
+var SENDERS = require('./senders');
+var parsers = require('./parsers');
+var idCounter = Math.random();
+
+
+exports._setIdCounter = function (counter) {
+ idCounter = counter;
+};
+
+exports.toSessionJSON = function (sdp, opts) {
+ var i;
+ var creators = opts.creators || [];
+ var role = opts.role || 'initiator';
+ var direction = opts.direction || 'outgoing';
+
+
+ // Divide the SDP into session and media sections.
+ var media = sdp.split('\r\nm=');
+ for (i = 1; i < media.length; i++) {
+ media[i] = 'm=' + media[i];
+ if (i !== media.length - 1) {
+ media[i] += '\r\n';
+ }
+ }
+ var session = media.shift() + '\r\n';
+ var sessionLines = parsers.lines(session);
+ var parsed = {};
+
+ var contents = [];
+ for (i = 0; i < media.length; i++) {
+ contents.push(exports.toMediaJSON(media[i], session, {
+ role: role,
+ direction: direction,
+ creator: creators[i] || 'initiator'
+ }));
+ }
+ parsed.contents = contents;
+
+ var groupLines = parsers.findLines('a=group:', sessionLines);
+ if (groupLines.length) {
+ parsed.groups = parsers.groups(groupLines);
+ }
+
+ return parsed;
+};
+
+exports.toMediaJSON = function (media, session, opts) {
+ var creator = opts.creator || 'initiator';
+ var role = opts.role || 'initiator';
+ var direction = opts.direction || 'outgoing';
+
+ var lines = parsers.lines(media);
+ var sessionLines = parsers.lines(session);
+ var mline = parsers.mline(lines[0]);
+
+ var content = {
+ creator: creator,
+ name: mline.media,
+ description: {
+ descType: 'rtp',
+ media: mline.media,
+ payloads: [],
+ encryption: [],
+ feedback: [],
+ headerExtensions: []
+ },
+ transport: {
+ transType: 'iceUdp',
+ candidates: [],
+ fingerprints: []
+ }
+ };
+ if (mline.media == 'application') {
+ // FIXME: the description is most likely to be independent
+ // of the SDP and should be processed by other parts of the library
+ content.description = {
+ descType: 'datachannel'
+ };
+ content.transport.sctp = [];
+ }
+ var desc = content.description;
+ var trans = content.transport;
+
+ // If we have a mid, use that for the content name instead.
+ var mid = parsers.findLine('a=mid:', lines);
+ if (mid) {
+ content.name = mid.substr(6);
+ }
+
+ if (parsers.findLine('a=sendrecv', lines, sessionLines)) {
+ content.senders = 'both';
+ } else if (parsers.findLine('a=sendonly', lines, sessionLines)) {
+ content.senders = SENDERS[role][direction].sendonly;
+ } else if (parsers.findLine('a=recvonly', lines, sessionLines)) {
+ content.senders = SENDERS[role][direction].recvonly;
+ } else if (parsers.findLine('a=inactive', lines, sessionLines)) {
+ content.senders = 'none';
+ }
+
+ if (desc.descType == 'rtp') {
+ var bandwidth = parsers.findLine('b=', lines);
+ if (bandwidth) {
+ desc.bandwidth = parsers.bandwidth(bandwidth);
+ }
+
+ var ssrc = parsers.findLine('a=ssrc:', lines);
+ if (ssrc) {
+ desc.ssrc = ssrc.substr(7).split(' ')[0];
+ }
+
+ var rtpmapLines = parsers.findLines('a=rtpmap:', lines);
+ rtpmapLines.forEach(function (line) {
+ var payload = parsers.rtpmap(line);
+ payload.parameters = [];
+ payload.feedback = [];
+
+ var fmtpLines = parsers.findLines('a=fmtp:' + payload.id, lines);
+ // There should only be one fmtp line per payload
+ fmtpLines.forEach(function (line) {
+ payload.parameters = parsers.fmtp(line);
+ });
+
+ var fbLines = parsers.findLines('a=rtcp-fb:' + payload.id, lines);
+ fbLines.forEach(function (line) {
+ payload.feedback.push(parsers.rtcpfb(line));
+ });
+
+ desc.payloads.push(payload);
+ });
+
+ var cryptoLines = parsers.findLines('a=crypto:', lines, sessionLines);
+ cryptoLines.forEach(function (line) {
+ desc.encryption.push(parsers.crypto(line));
+ });
+
+ if (parsers.findLine('a=rtcp-mux', lines)) {
+ desc.mux = true;
+ }
+
+ var fbLines = parsers.findLines('a=rtcp-fb:*', lines);
+ fbLines.forEach(function (line) {
+ desc.feedback.push(parsers.rtcpfb(line));
+ });
+
+ var extLines = parsers.findLines('a=extmap:', lines);
+ extLines.forEach(function (line) {
+ var ext = parsers.extmap(line);
+
+ ext.senders = SENDERS[role][direction][ext.senders];
+
+ desc.headerExtensions.push(ext);
+ });
+
+ var ssrcGroupLines = parsers.findLines('a=ssrc-group:', lines);
+ desc.sourceGroups = parsers.sourceGroups(ssrcGroupLines || []);
+
+ var ssrcLines = parsers.findLines('a=ssrc:', lines);
+ var sources = desc.sources = parsers.sources(ssrcLines || []);
+
+ var msidLine = parsers.findLine('a=msid:', lines);
+ if (msidLine) {
+ var msid = parsers.msid(msidLine);
+ ['msid', 'mslabel', 'label'].forEach(function (key) {
+ for (var i = 0; i < sources.length; i++) {
+ var found = false;
+ for (var j = 0; j < sources[i].parameters.length; j++) {
+ if (sources[i].parameters[j].key === key) {
+ found = true;
+ }
+ }
+ if (!found) {
+ sources[i].parameters.push({ key: key, value: msid[key] });
+ }
+ }
+ });
+ }
+
+ if (parsers.findLine('a=x-google-flag:conference', lines, sessionLines)) {
+ desc.googConferenceFlag = true;
+ }
+ }
+
+ // transport specific attributes
+ var fingerprintLines = parsers.findLines('a=fingerprint:', lines, sessionLines);
+ var setup = parsers.findLine('a=setup:', lines, sessionLines);
+ fingerprintLines.forEach(function (line) {
+ var fp = parsers.fingerprint(line);
+ if (setup) {
+ fp.setup = setup.substr(8);
+ }
+ trans.fingerprints.push(fp);
+ });
+
+ var ufragLine = parsers.findLine('a=ice-ufrag:', lines, sessionLines);
+ var pwdLine = parsers.findLine('a=ice-pwd:', lines, sessionLines);
+ if (ufragLine && pwdLine) {
+ trans.ufrag = ufragLine.substr(12);
+ trans.pwd = pwdLine.substr(10);
+ trans.candidates = [];
+
+ var candidateLines = parsers.findLines('a=candidate:', lines, sessionLines);
+ candidateLines.forEach(function (line) {
+ trans.candidates.push(exports.toCandidateJSON(line));
+ });
+ }
+
+ if (desc.descType == 'datachannel') {
+ var sctpmapLines = parsers.findLines('a=sctpmap:', lines);
+ sctpmapLines.forEach(function (line) {
+ var sctp = parsers.sctpmap(line);
+ trans.sctp.push(sctp);
+ });
+ }
+
+ return content;
+};
+
+exports.toCandidateJSON = function (line) {
+ var candidate = parsers.candidate(line.split('\r\n')[0]);
+ candidate.id = (idCounter++).toString(36).substr(0, 12);
+ return candidate;
+};
+
+},{"./parsers":72,"./senders":73}],75:[function(require,module,exports){
+var SENDERS = require('./senders');
+
+
+exports.toSessionSDP = function (session, opts) {
+ var role = opts.role || 'initiator';
+ var direction = opts.direction || 'outgoing';
+ var sid = opts.sid || session.sid || Date.now();
+ var time = opts.time || Date.now();
+
+ var sdp = [
+ 'v=0',
+ 'o=- ' + sid + ' ' + time + ' IN IP4 0.0.0.0',
+ 's=-',
+ 't=0 0'
+ ];
+
+ var groups = session.groups || [];
+ groups.forEach(function (group) {
+ sdp.push('a=group:' + group.semantics + ' ' + group.contents.join(' '));
+ });
+
+ var contents = session.contents || [];
+ contents.forEach(function (content) {
+ sdp.push(exports.toMediaSDP(content, opts));
+ });
+
+ return sdp.join('\r\n') + '\r\n';
+};
+
+exports.toMediaSDP = function (content, opts) {
+ var sdp = [];
+
+ var role = opts.role || 'initiator';
+ var direction = opts.direction || 'outgoing';
+
+ var desc = content.description;
+ var transport = content.transport;
+ var payloads = desc.payloads || [];
+ var fingerprints = (transport && transport.fingerprints) || [];
+
+ var mline = [];
+ if (desc.descType == 'datachannel') {
+ mline.push('application');
+ mline.push('1');
+ mline.push('DTLS/SCTP');
+ if (transport.sctp) {
+ transport.sctp.forEach(function (map) {
+ mline.push(map.number);
+ });
+ }
+ } else {
+ mline.push(desc.media);
+ mline.push('1');
+ if ((desc.encryption && desc.encryption.length > 0) || (fingerprints.length > 0)) {
+ mline.push('RTP/SAVPF');
+ } else {
+ mline.push('RTP/AVPF');
+ }
+ payloads.forEach(function (payload) {
+ mline.push(payload.id);
+ });
+ }
+
+
+ sdp.push('m=' + mline.join(' '));
+
+ sdp.push('c=IN IP4 0.0.0.0');
+ if (desc.bandwidth && desc.bandwidth.type && desc.bandwidth.bandwidth) {
+ sdp.push('b=' + desc.bandwidth.type + ':' + desc.bandwidth.bandwidth);
+ }
+ if (desc.descType == 'rtp') {
+ sdp.push('a=rtcp:1 IN IP4 0.0.0.0');
+ }
+
+ if (transport) {
+ if (transport.ufrag) {
+ sdp.push('a=ice-ufrag:' + transport.ufrag);
+ }
+ if (transport.pwd) {
+ sdp.push('a=ice-pwd:' + transport.pwd);
+ }
+
+ var pushedSetup = false;
+ fingerprints.forEach(function (fingerprint) {
+ sdp.push('a=fingerprint:' + fingerprint.hash + ' ' + fingerprint.value);
+ if (fingerprint.setup && !pushedSetup) {
+ sdp.push('a=setup:' + fingerprint.setup);
+ }
+ });
+
+ if (transport.sctp) {
+ transport.sctp.forEach(function (map) {
+ sdp.push('a=sctpmap:' + map.number + ' ' + map.protocol + ' ' + map.streams);
+ });
+ }
+ }
+
+ if (desc.descType == 'rtp') {
+ sdp.push('a=' + (SENDERS[role][direction][content.senders] || 'sendrecv'));
+ }
+ sdp.push('a=mid:' + content.name);
+
+ if (desc.sources && desc.sources.length) {
+ (desc.sources[0].parameters || []).forEach(function (param) {
+ if (param.key === 'msid') {
+ sdp.push('a=msid:' + param.value);
+ }
+ });
+ }
+
+ if (desc.mux) {
+ sdp.push('a=rtcp-mux');
+ }
+
+ var encryption = desc.encryption || [];
+ encryption.forEach(function (crypto) {
+ sdp.push('a=crypto:' + crypto.tag + ' ' + crypto.cipherSuite + ' ' + crypto.keyParams + (crypto.sessionParams ? ' ' + crypto.sessionParams : ''));
+ });
+ if (desc.googConferenceFlag) {
+ sdp.push('a=x-google-flag:conference');
+ }
+
+ payloads.forEach(function (payload) {
+ var rtpmap = 'a=rtpmap:' + payload.id + ' ' + payload.name + '/' + payload.clockrate;
+ if (payload.channels && payload.channels != '1') {
+ rtpmap += '/' + payload.channels;
+ }
+ sdp.push(rtpmap);
+
+ if (payload.parameters && payload.parameters.length) {
+ var fmtp = ['a=fmtp:' + payload.id];
+ var parameters = [];
+ payload.parameters.forEach(function (param) {
+ parameters.push((param.key ? param.key + '=' : '') + param.value);
+ });
+ fmtp.push(parameters.join(';'));
+ sdp.push(fmtp.join(' '));
+ }
+
+ if (payload.feedback) {
+ payload.feedback.forEach(function (fb) {
+ if (fb.type === 'trr-int') {
+ sdp.push('a=rtcp-fb:' + payload.id + ' trr-int ' + (fb.value ? fb.value : '0'));
+ } else {
+ sdp.push('a=rtcp-fb:' + payload.id + ' ' + fb.type + (fb.subtype ? ' ' + fb.subtype : ''));
+ }
+ });
+ }
+ });
+
+ if (desc.feedback) {
+ desc.feedback.forEach(function (fb) {
+ if (fb.type === 'trr-int') {
+ sdp.push('a=rtcp-fb:* trr-int ' + (fb.value ? fb.value : '0'));
+ } else {
+ sdp.push('a=rtcp-fb:* ' + fb.type + (fb.subtype ? ' ' + fb.subtype : ''));
+ }
+ });
+ }
+
+ var hdrExts = desc.headerExtensions || [];
+ hdrExts.forEach(function (hdr) {
+ sdp.push('a=extmap:' + hdr.id + (hdr.senders ? '/' + SENDERS[role][direction][hdr.senders] : '') + ' ' + hdr.uri);
+ });
+
+ var ssrcGroups = desc.sourceGroups || [];
+ ssrcGroups.forEach(function (ssrcGroup) {
+ sdp.push('a=ssrc-group:' + ssrcGroup.semantics + ' ' + ssrcGroup.sources.join(' '));
+ });
+
+ var ssrcs = desc.sources || [];
+ ssrcs.forEach(function (ssrc) {
+ for (var i = 0; i < ssrc.parameters.length; i++) {
+ var param = ssrc.parameters[i];
+ sdp.push('a=ssrc:' + (ssrc.ssrc || desc.ssrc) + ' ' + param.key + (param.value ? (':' + param.value) : ''));
+ }
+ });
+
+ var candidates = transport.candidates || [];
+ candidates.forEach(function (candidate) {
+ sdp.push(exports.toCandidateSDP(candidate));
+ });
+
+ return sdp.join('\r\n');
+};
+
+exports.toCandidateSDP = function (candidate) {
+ var sdp = [];
+
+ sdp.push(candidate.foundation);
+ sdp.push(candidate.component);
+ sdp.push(candidate.protocol.toUpperCase());
+ sdp.push(candidate.priority);
+ sdp.push(candidate.ip);
+ sdp.push(candidate.port);
+
+ var type = candidate.type;
+ sdp.push('typ');
+ sdp.push(type);
+ if (type === 'srflx' || type === 'prflx' || type === 'relay') {
+ if (candidate.relAddr && candidate.relPort) {
+ sdp.push('raddr');
+ sdp.push(candidate.relAddr);
+ sdp.push('rport');
+ sdp.push(candidate.relPort);
+ }
+ }
+ if (candidate.tcpType && candidate.protocol.toUpperCase() == 'TCP') {
+ sdp.push('tcptype');
+ sdp.push(candidate.tcpType);
+ }
+
+ sdp.push('generation');
+ sdp.push(candidate.generation || '0');
+
+ // FIXME: apparently this is wrong per spec
+ // but then, we need this when actually putting this into
+ // SDP so it's going to stay.
+ // decision needs to be revisited when browsers dont
+ // accept this any longer
+ return 'a=candidate:' + sdp.join(' ');
+};
+
+},{"./senders":73}],76:[function(require,module,exports){
+// based on https://github.com/ESTOS/strophe.jingle/
+// adds wildemitter support
+var util = require('util');
+var webrtc = require('webrtcsupport');
+var WildEmitter = require('wildemitter');
+
+function dumpSDP(description) {
+ return {
+ type: description.type,
+ sdp: description.sdp
+ };
+}
+
+function dumpStream(stream) {
+ var info = {
+ label: stream.id,
+ };
+ if (stream.getAudioTracks().length) {
+ info.audio = stream.getAudioTracks().map(function (track) {
+ return track.id;
+ });
+ }
+ if (stream.getVideoTracks().length) {
+ info.video = stream.getVideoTracks().map(function (track) {
+ return track.id;
+ });
+ }
+ return info;
+}
+
+function TraceablePeerConnection(config, constraints) {
+ var self = this;
+ WildEmitter.call(this);
+
+ this.peerconnection = new webrtc.PeerConnection(config, constraints);
+
+ this.trace = function (what, info) {
+ self.emit('PeerConnectionTrace', {
+ time: new Date(),
+ type: what,
+ value: info || ""
+ });
+ };
+
+ this.onicecandidate = null;
+ this.peerconnection.onicecandidate = function (event) {
+ self.trace('onicecandidate', event.candidate);
+ if (self.onicecandidate !== null) {
+ self.onicecandidate(event);
+ }
+ };
+ this.onaddstream = null;
+ this.peerconnection.onaddstream = function (event) {
+ self.trace('onaddstream', dumpStream(event.stream));
+ if (self.onaddstream !== null) {
+ self.onaddstream(event);
+ }
+ };
+ this.onremovestream = null;
+ this.peerconnection.onremovestream = function (event) {
+ self.trace('onremovestream', dumpStream(event.stream));
+ if (self.onremovestream !== null) {
+ self.onremovestream(event);
+ }
+ };
+ this.onsignalingstatechange = null;
+ this.peerconnection.onsignalingstatechange = function (event) {
+ self.trace('onsignalingstatechange', self.signalingState);
+ if (self.onsignalingstatechange !== null) {
+ self.onsignalingstatechange(event);
+ }
+ };
+ this.oniceconnectionstatechange = null;
+ this.peerconnection.oniceconnectionstatechange = function (event) {
+ self.trace('oniceconnectionstatechange', self.iceConnectionState);
+ if (self.oniceconnectionstatechange !== null) {
+ self.oniceconnectionstatechange(event);
+ }
+ };
+ this.onnegotiationneeded = null;
+ this.peerconnection.onnegotiationneeded = function (event) {
+ self.trace('onnegotiationneeded');
+ if (self.onnegotiationneeded !== null) {
+ self.onnegotiationneeded(event);
+ }
+ };
+ self.ondatachannel = null;
+ this.peerconnection.ondatachannel = function (event) {
+ self.trace('ondatachannel', event);
+ if (self.ondatachannel !== null) {
+ self.ondatachannel(event);
+ }
+ };
+ this.getLocalStreams = this.peerconnection.getLocalStreams.bind(this.peerconnection);
+ this.getRemoteStreams = this.peerconnection.getRemoteStreams.bind(this.peerconnection);
+}
+
+util.inherits(TraceablePeerConnection, WildEmitter);
+
+Object.defineProperty(TraceablePeerConnection.prototype, 'signalingState', {
+ get: function () {
+ return this.peerconnection.signalingState;
+ }
+});
+
+Object.defineProperty(TraceablePeerConnection.prototype, 'iceConnectionState', {
+ get: function () {
+ return this.peerconnection.iceConnectionState;
+ }
+});
+
+Object.defineProperty(TraceablePeerConnection.prototype, 'localDescription', {
+ get: function () {
+ return this.peerconnection.localDescription;
+ }
+});
+
+Object.defineProperty(TraceablePeerConnection.prototype, 'remoteDescription', {
+ get: function () {
+ return this.peerconnection.remoteDescription;
+ }
+});
+
+TraceablePeerConnection.prototype.addStream = function (stream) {
+ this.trace('addStream', dumpStream(stream));
+ this.peerconnection.addStream(stream);
+};
+
+TraceablePeerConnection.prototype.removeStream = function (stream) {
+ this.trace('removeStream', dumpStream(stream));
+ this.peerconnection.removeStream(stream);
+};
+
+TraceablePeerConnection.prototype.createDataChannel = function (label, opts) {
+ this.trace('createDataChannel', label, opts);
+ return this.peerconnection.createDataChannel(label, opts);
+};
+
+TraceablePeerConnection.prototype.setLocalDescription = function (description, successCallback, failureCallback) {
+ var self = this;
+ this.trace('setLocalDescription', dumpSDP(description));
+ this.peerconnection.setLocalDescription(description,
+ function () {
+ self.trace('setLocalDescriptionOnSuccess');
+ successCallback();
+ },
+ function (err) {
+ self.trace('setLocalDescriptionOnFailure', err);
+ failureCallback(err);
+ }
+ );
+};
+
+TraceablePeerConnection.prototype.setRemoteDescription = function (description, successCallback, failureCallback) {
+ var self = this;
+ this.trace('setRemoteDescription', dumpSDP(description));
+ this.peerconnection.setRemoteDescription(description,
+ function () {
+ self.trace('setRemoteDescriptionOnSuccess');
+ successCallback();
+ },
+ function (err) {
+ self.trace('setRemoteDescriptionOnFailure', err);
+ failureCallback(err);
+ }
+ );
+};
+
+TraceablePeerConnection.prototype.close = function () {
+ this.trace('stop');
+ if (this.statsinterval !== null) {
+ window.clearInterval(this.statsinterval);
+ this.statsinterval = null;
+ }
+ if (this.peerconnection.signalingState != 'closed') {
+ this.peerconnection.close();
+ }
+};
+
+TraceablePeerConnection.prototype.createOffer = function (successCallback, failureCallback, constraints) {
+ var self = this;
+ this.trace('createOffer', constraints);
+ this.peerconnection.createOffer(
+ function (offer) {
+ self.trace('createOfferOnSuccess', dumpSDP(offer));
+ successCallback(offer);
+ },
+ function (err) {
+ self.trace('createOfferOnFailure', err);
+ failureCallback(err);
+ },
+ constraints
+ );
+};
+
+TraceablePeerConnection.prototype.createAnswer = function (successCallback, failureCallback, constraints) {
+ var self = this;
+ this.trace('createAnswer', constraints);
+ this.peerconnection.createAnswer(
+ function (answer) {
+ self.trace('createAnswerOnSuccess', dumpSDP(answer));
+ successCallback(answer);
+ },
+ function (err) {
+ self.trace('createAnswerOnFailure', err);
+ failureCallback(err);
+ },
+ constraints
+ );
+};
+
+TraceablePeerConnection.prototype.addIceCandidate = function (candidate, successCallback, failureCallback) {
+ var self = this;
+ this.trace('addIceCandidate', candidate);
+ this.peerconnection.addIceCandidate(candidate,
+ function () {
+ //self.trace('addIceCandidateOnSuccess');
+ if (successCallback) successCallback();
+ },
+ function (err) {
+ self.trace('addIceCandidateOnFailure', err);
+ if (failureCallback) failureCallback(err);
+ }
+ );
+};
+
+TraceablePeerConnection.prototype.getStats = function (callback, errback) {
+ if (navigator.mozGetUserMedia) {
+ this.peerconnection.getStats(null, callback, errback);
+ } else {
+ this.peerconnection.getStats(callback);
+ }
+};
+
+module.exports = TraceablePeerConnection;
+
+},{"util":24,"webrtcsupport":112,"wildemitter":113}],77:[function(require,module,exports){
+var util = require('util');
+var each = require('lodash.foreach');
+var pluck = require('lodash.pluck');
+var webrtc = require('webrtcsupport');
+var SJJ = require('sdp-jingle-json');
+var WildEmitter = require('wildemitter');
+var peerconn = require('traceablepeerconnection');
+
+
+function PeerConnection(config, constraints) {
+ var self = this;
+ var item;
+ WildEmitter.call(this);
+
+ config = config || {};
+ config.iceServers = config.iceServers || [];
+
+ // make sure this only gets enabled in Google Chrome
+ // EXPERIMENTAL FLAG, might get removed without notice
+ this.enableChromeNativeSimulcast = false;
+ if (constraints && constraints.optional &&
+ webrtc.prefix === 'webkit' &&
+ navigator.appVersion.match(/Chromium\//) === null) {
+ constraints.optional.forEach(function (constraint, idx) {
+ if (constraint.enableChromeNativeSimulcast) {
+ self.enableChromeNativeSimulcast = true;
+ }
+ });
+ }
+
+ // EXPERIMENTAL FLAG, might get removed without notice
+ this.enableMultiStreamHacks = false;
+ if (constraints && constraints.optional &&
+ webrtc.prefix === 'webkit') {
+ constraints.optional.forEach(function (constraint, idx) {
+ if (constraint.enableMultiStreamHacks) {
+ self.enableMultiStreamHacks = true;
+ }
+ });
+ }
+ // EXPERIMENTAL FLAG, might get removed without notice
+ this.restrictBandwidth = 0;
+ if (constraints && constraints.optional) {
+ constraints.optional.forEach(function (constraint, idx) {
+ if (constraint.andyetRestrictBandwidth) {
+ self.restrictBandwidth = constraint.andyetRestrictBandwidth;
+ }
+ });
+ }
+
+ // EXPERIMENTAL FLAG, might get removed without notice
+ // bundle up ice candidates, only works for jingle mode
+ // number > 0 is the delay to wait for additional candidates
+ // ~20ms seems good
+ this.batchIceCandidates = 0;
+ if (constraints && constraints.optional) {
+ constraints.optional.forEach(function (constraint, idx) {
+ if (constraint.andyetBatchIce) {
+ self.batchIceCandidates = constraint.andyetBatchIce;
+ }
+ });
+ }
+ this.batchedIceCandidates = [];
+
+ // EXPERIMENTAL FLAG, might get removed without notice
+ // this attemps to strip out candidates with an already known foundation
+ // and type -- i.e. those which are gathered via the same TURN server
+ // but different transports (TURN udp, tcp and tls respectively)
+ if (constraints && constraints.optional && webrtc.prefix === 'webkit') {
+ constraints.optional.forEach(function (constraint, idx) {
+ if (constraint.andyetFasterICE) {
+ self.eliminateDuplicateCandidates = constraint.andyetFasterICE;
+ }
+ });
+ }
+ // EXPERIMENTAL FLAG, might get removed without notice
+ // when using a server such as the jitsi videobridge we don't need to signal
+ // our candidates
+ if (constraints && constraints.optional) {
+ constraints.optional.forEach(function (constraint, idx) {
+ if (constraint.andyetDontSignalCandidates) {
+ self.dontSignalCandidates = constraint.andyetDontSignalCandidates;
+ }
+ });
+ }
+
+
+ // EXPERIMENTAL FLAG, might get removed without notice
+ this.assumeSetLocalSuccess = false;
+ if (constraints && constraints.optional) {
+ constraints.optional.forEach(function (constraint, idx) {
+ if (constraint.andyetAssumeSetLocalSuccess) {
+ self.assumeSetLocalSuccess = constraint.andyetAssumeSetLocalSuccess;
+ }
+ });
+ }
+
+ // EXPERIMENTAL FLAG, might get removed without notice
+ // working around https://bugzilla.mozilla.org/show_bug.cgi?id=1087551
+ // pass in a timeout for this
+ if (webrtc.prefix === 'moz') {
+ if (constraints && constraints.optional) {
+ this.wtFirefox = 0;
+ constraints.optional.forEach(function (constraint, idx) {
+ if (constraint.andyetFirefoxMakesMeSad) {
+ self.wtFirefox = constraint.andyetFirefoxMakesMeSad;
+ if (self.wtFirefox > 0) {
+ self.firefoxcandidatebuffer = [];
+ }
+ }
+ });
+ }
+ }
+
+
+ this.pc = new peerconn(config, constraints);
+
+ this.getLocalStreams = this.pc.getLocalStreams.bind(this.pc);
+ this.getRemoteStreams = this.pc.getRemoteStreams.bind(this.pc);
+ this.addStream = this.pc.addStream.bind(this.pc);
+ this.removeStream = this.pc.removeStream.bind(this.pc);
+
+ // proxy events
+ this.pc.on('*', function () {
+ self.emit.apply(self, arguments);
+ });
+
+ // proxy some events directly
+ this.pc.onremovestream = this.emit.bind(this, 'removeStream');
+ this.pc.onaddstream = this.emit.bind(this, 'addStream');
+ this.pc.onnegotiationneeded = this.emit.bind(this, 'negotiationNeeded');
+ this.pc.oniceconnectionstatechange = this.emit.bind(this, 'iceConnectionStateChange');
+ this.pc.onsignalingstatechange = this.emit.bind(this, 'signalingStateChange');
+
+ // handle ice candidate and data channel events
+ this.pc.onicecandidate = this._onIce.bind(this);
+ this.pc.ondatachannel = this._onDataChannel.bind(this);
+
+ this.localDescription = {
+ contents: []
+ };
+ this.remoteDescription = {
+ contents: []
+ };
+
+ this.config = {
+ debug: false,
+ ice: {},
+ sid: '',
+ isInitiator: true,
+ sdpSessionID: Date.now(),
+ useJingle: false
+ };
+
+ // apply our config
+ for (item in config) {
+ this.config[item] = config[item];
+ }
+
+ if (this.config.debug) {
+ this.on('*', function (eventName, event) {
+ var logger = config.logger || console;
+ logger.log('PeerConnection event:', arguments);
+ });
+ }
+ this.hadLocalStunCandidate = false;
+ this.hadRemoteStunCandidate = false;
+ this.hadLocalRelayCandidate = false;
+ this.hadRemoteRelayCandidate = false;
+
+ this.hadLocalIPv6Candidate = false;
+ this.hadRemoteIPv6Candidate = false;
+
+ // keeping references for all our data channels
+ // so they dont get garbage collected
+ // can be removed once the following bugs have been fixed
+ // https://crbug.com/405545
+ // https://bugzilla.mozilla.org/show_bug.cgi?id=964092
+ // to be filed for opera
+ this._remoteDataChannels = [];
+ this._localDataChannels = [];
+
+ this._candidateBuffer = [];
+}
+
+util.inherits(PeerConnection, WildEmitter);
+
+Object.defineProperty(PeerConnection.prototype, 'signalingState', {
+ get: function () {
+ return this.pc.signalingState;
+ }
+});
+Object.defineProperty(PeerConnection.prototype, 'iceConnectionState', {
+ get: function () {
+ return this.pc.iceConnectionState;
+ }
+});
+
+PeerConnection.prototype._role = function () {
+ return this.isInitiator ? 'initiator' : 'responder';
+};
+
+// Add a stream to the peer connection object
+PeerConnection.prototype.addStream = function (stream) {
+ this.localStream = stream;
+ this.pc.addStream(stream);
+};
+
+// helper function to check if a remote candidate is a stun/relay
+// candidate or an ipv6 candidate
+PeerConnection.prototype._checkLocalCandidate = function (candidate) {
+ var cand = SJJ.toCandidateJSON(candidate);
+ if (cand.type == 'srflx') {
+ this.hadLocalStunCandidate = true;
+ } else if (cand.type == 'relay') {
+ this.hadLocalRelayCandidate = true;
+ }
+ if (cand.ip.indexOf(':') != -1) {
+ this.hadLocalIPv6Candidate = true;
+ }
+};
+
+// helper function to check if a remote candidate is a stun/relay
+// candidate or an ipv6 candidate
+PeerConnection.prototype._checkRemoteCandidate = function (candidate) {
+ var cand = SJJ.toCandidateJSON(candidate);
+ if (cand.type == 'srflx') {
+ this.hadRemoteStunCandidate = true;
+ } else if (cand.type == 'relay') {
+ this.hadRemoteRelayCandidate = true;
+ }
+ if (cand.ip.indexOf(':') != -1) {
+ this.hadRemoteIPv6Candidate = true;
+ }
+};
+
+
+// Init and add ice candidate object with correct constructor
+PeerConnection.prototype.processIce = function (update, cb) {
+ cb = cb || function () {};
+ var self = this;
+
+ // ignore any added ice candidates to avoid errors. why does the
+ // spec not do this?
+ if (this.pc.signalingState === 'closed') return cb();
+
+ if (update.contents || (update.jingle && update.jingle.contents)) {
+ var contentNames = pluck(this.remoteDescription.contents, 'name');
+ var contents = update.contents || update.jingle.contents;
+
+ contents.forEach(function (content) {
+ var transport = content.transport || {};
+ var candidates = transport.candidates || [];
+ var mline = contentNames.indexOf(content.name);
+ var mid = content.name;
+
+ candidates.forEach(
+ function (candidate) {
+ var iceCandidate = SJJ.toCandidateSDP(candidate) + '\r\n';
+ self.pc.addIceCandidate(
+ new webrtc.IceCandidate({
+ candidate: iceCandidate,
+ sdpMLineIndex: mline,
+ sdpMid: mid
+ }), function () {
+ // well, this success callback is pretty meaningless
+ },
+ function (err) {
+ self.emit('error', err);
+ }
+ );
+ self._checkRemoteCandidate(iceCandidate);
+ });
+ });
+ } else {
+ // working around https://code.google.com/p/webrtc/issues/detail?id=3669
+ if (update.candidate && update.candidate.candidate.indexOf('a=') !== 0) {
+ update.candidate.candidate = 'a=' + update.candidate.candidate;
+ }
+
+ if (this.wtFirefox && this.firefoxcandidatebuffer !== null) {
+ // we cant add this yet due to https://bugzilla.mozilla.org/show_bug.cgi?id=1087551
+ if (this.pc.localDescription && this.pc.localDescription.type === 'offer') {
+ this.firefoxcandidatebuffer.push(update.candidate);
+ return cb();
+ }
+ }
+
+ self.pc.addIceCandidate(
+ new webrtc.IceCandidate(update.candidate),
+ function () { },
+ function (err) {
+ self.emit('error', err);
+ }
+ );
+ self._checkRemoteCandidate(update.candidate.candidate);
+ }
+ cb();
+};
+
+// Generate and emit an offer with the given constraints
+PeerConnection.prototype.offer = function (constraints, cb) {
+ var self = this;
+ var hasConstraints = arguments.length === 2;
+ var mediaConstraints = hasConstraints && constraints ? constraints : {
+ mandatory: {
+ OfferToReceiveAudio: true,
+ OfferToReceiveVideo: true
+ }
+ };
+ cb = hasConstraints ? cb : constraints;
+ cb = cb || function () {};
+
+ if (this.pc.signalingState === 'closed') return cb('Already closed');
+
+ // Actually generate the offer
+ this.pc.createOffer(
+ function (offer) {
+ // does not work for jingle, but jingle.js doesn't need
+ // this hack...
+ var expandedOffer = {
+ type: 'offer',
+ sdp: offer.sdp
+ };
+ if (self.assumeSetLocalSuccess) {
+ self.emit('offer', expandedOffer);
+ cb(null, expandedOffer);
+ }
+ self._candidateBuffer = [];
+ self.pc.setLocalDescription(offer,
+ function () {
+ var jingle;
+ if (self.config.useJingle) {
+ jingle = SJJ.toSessionJSON(offer.sdp, {
+ role: self._role(),
+ direction: 'outgoing'
+ });
+ jingle.sid = self.config.sid;
+ self.localDescription = jingle;
+
+ // Save ICE credentials
+ each(jingle.contents, function (content) {
+ var transport = content.transport || {};
+ if (transport.ufrag) {
+ self.config.ice[content.name] = {
+ ufrag: transport.ufrag,
+ pwd: transport.pwd
+ };
+ }
+ });
+
+ expandedOffer.jingle = jingle;
+ }
+ expandedOffer.sdp.split('\r\n').forEach(function (line) {
+ if (line.indexOf('a=candidate:') === 0) {
+ self._checkLocalCandidate(line);
+ }
+ });
+
+ if (!self.assumeSetLocalSuccess) {
+ self.emit('offer', expandedOffer);
+ cb(null, expandedOffer);
+ }
+ },
+ function (err) {
+ self.emit('error', err);
+ cb(err);
+ }
+ );
+ },
+ function (err) {
+ self.emit('error', err);
+ cb(err);
+ },
+ mediaConstraints
+ );
+};
+
+
+// Process an incoming offer so that ICE may proceed before deciding
+// to answer the request.
+PeerConnection.prototype.handleOffer = function (offer, cb) {
+ cb = cb || function () {};
+ var self = this;
+ offer.type = 'offer';
+ if (offer.jingle) {
+ if (this.enableChromeNativeSimulcast) {
+ offer.jingle.contents.forEach(function (content) {
+ if (content.name === 'video') {
+ content.description.googConferenceFlag = true;
+ }
+ });
+ }
+ if (this.enableMultiStreamHacks) {
+ // add a mixed video stream as first stream
+ offer.jingle.contents.forEach(function (content) {
+ if (content.name === 'video') {
+ var sources = content.description.sources || [];
+ if (sources.length === 0 || sources[0].ssrc !== "3735928559") {
+ sources.unshift({
+ ssrc: "3735928559", // 0xdeadbeef
+ parameters: [
+ {
+ key: "cname",
+ value: "deadbeef"
+ },
+ {
+ key: "msid",
+ value: "mixyourfecintothis please"
+ }
+ ]
+ });
+ content.description.sources = sources;
+ }
+ }
+ });
+ }
+ if (self.restrictBandwidth > 0) {
+ if (offer.jingle.contents.length >= 2 && offer.jingle.contents[1].name === 'video') {
+ var content = offer.jingle.contents[1];
+ var hasBw = content.description && content.description.bandwidth;
+ if (!hasBw) {
+ offer.jingle.contents[1].description.bandwidth = { type: 'AS', bandwidth: self.restrictBandwidth.toString() };
+ offer.sdp = SJJ.toSessionSDP(offer.jingle, {
+ sid: self.config.sdpSessionID,
+ role: self._role(),
+ direction: 'outgoing'
+ });
+ }
+ }
+ }
+ offer.sdp = SJJ.toSessionSDP(offer.jingle, {
+ sid: self.config.sdpSessionID,
+ role: self._role(),
+ direction: 'incoming'
+ });
+ self.remoteDescription = offer.jingle;
+ }
+ offer.sdp.split('\r\n').forEach(function (line) {
+ if (line.indexOf('a=candidate:') === 0) {
+ self._checkRemoteCandidate(line);
+ }
+ });
+ self.pc.setRemoteDescription(new webrtc.SessionDescription(offer),
+ function () {
+ cb();
+ },
+ cb
+ );
+};
+
+// Answer an offer with audio only
+PeerConnection.prototype.answerAudioOnly = function (cb) {
+ var mediaConstraints = {
+ mandatory: {
+ OfferToReceiveAudio: true,
+ OfferToReceiveVideo: false
+ }
+ };
+ this._answer(mediaConstraints, cb);
+};
+
+// Answer an offer without offering to recieve
+PeerConnection.prototype.answerBroadcastOnly = function (cb) {
+ var mediaConstraints = {
+ mandatory: {
+ OfferToReceiveAudio: false,
+ OfferToReceiveVideo: false
+ }
+ };
+ this._answer(mediaConstraints, cb);
+};
+
+// Answer an offer with given constraints default is audio/video
+PeerConnection.prototype.answer = function (constraints, cb) {
+ var self = this;
+ var hasConstraints = arguments.length === 2;
+ var callback = hasConstraints ? cb : constraints;
+ var mediaConstraints = hasConstraints && constraints ? constraints : {
+ mandatory: {
+ OfferToReceiveAudio: true,
+ OfferToReceiveVideo: true
+ }
+ };
+
+ this._answer(mediaConstraints, callback);
+};
+
+// Process an answer
+PeerConnection.prototype.handleAnswer = function (answer, cb) {
+ cb = cb || function () {};
+ var self = this;
+ if (answer.jingle) {
+ answer.sdp = SJJ.toSessionSDP(answer.jingle, {
+ sid: self.config.sdpSessionID,
+ role: self._role(),
+ direction: 'incoming'
+ });
+ self.remoteDescription = answer.jingle;
+ }
+ answer.sdp.split('\r\n').forEach(function (line) {
+ if (line.indexOf('a=candidate:') === 0) {
+ self._checkRemoteCandidate(line);
+ }
+ });
+ self.pc.setRemoteDescription(
+ new webrtc.SessionDescription(answer),
+ function () {
+ if (self.wtFirefox) {
+ window.setTimeout(function () {
+ self.firefoxcandidatebuffer.forEach(function (candidate) {
+ // add candidates later
+ self.pc.addIceCandidate(
+ new webrtc.IceCandidate(candidate),
+ function () { },
+ function (err) {
+ self.emit('error', err);
+ }
+ );
+ self._checkRemoteCandidate(candidate.candidate);
+ });
+ self.firefoxcandidatebuffer = null;
+ }, self.wtFirefox);
+ }
+ cb(null);
+ },
+ cb
+ );
+};
+
+// Close the peer connection
+PeerConnection.prototype.close = function () {
+ this.pc.close();
+
+ this._localDataChannels = [];
+ this._remoteDataChannels = [];
+
+ this.emit('close');
+};
+
+// Internal code sharing for various types of answer methods
+PeerConnection.prototype._answer = function (constraints, cb) {
+ cb = cb || function () {};
+ var self = this;
+ if (!this.pc.remoteDescription) {
+ // the old API is used, call handleOffer
+ throw new Error('remoteDescription not set');
+ }
+
+ if (this.pc.signalingState === 'closed') return cb('Already closed');
+
+ self.pc.createAnswer(
+ function (answer) {
+ var sim = [];
+ var rtx = [];
+ if (self.enableChromeNativeSimulcast) {
+ // native simulcast part 1: add another SSRC
+ answer.jingle = SJJ.toSessionJSON(answer.sdp, {
+ role: self._role(),
+ direction: 'outgoing'
+ });
+ if (answer.jingle.contents.length >= 2 && answer.jingle.contents[1].name === 'video') {
+ var hasSimgroup = false;
+ var groups = answer.jingle.contents[1].description.sourceGroups || [];
+ var hasSim = false;
+ groups.forEach(function (group) {
+ if (group.semantics == 'SIM') hasSim = true;
+ });
+ if (!hasSim &&
+ answer.jingle.contents[1].description.sources.length) {
+ var newssrc = JSON.parse(JSON.stringify(answer.jingle.contents[1].description.sources[0]));
+ newssrc.ssrc = '' + Math.floor(Math.random() * 0xffffffff); // FIXME: look for conflicts
+ answer.jingle.contents[1].description.sources.push(newssrc);
+
+ sim.push(answer.jingle.contents[1].description.sources[0].ssrc);
+ sim.push(newssrc.ssrc);
+ groups.push({
+ semantics: 'SIM',
+ sources: sim
+ });
+
+ // also create an RTX one for the SIM one
+ var rtxssrc = JSON.parse(JSON.stringify(newssrc));
+ rtxssrc.ssrc = '' + Math.floor(Math.random() * 0xffffffff); // FIXME: look for conflicts
+ answer.jingle.contents[1].description.sources.push(rtxssrc);
+ groups.push({
+ semantics: 'FID',
+ sources: [newssrc.ssrc, rtxssrc.ssrc]
+ });
+
+ answer.jingle.contents[1].description.sourceGroups = groups;
+ answer.sdp = SJJ.toSessionSDP(answer.jingle, {
+ sid: self.config.sdpSessionID,
+ role: self._role(),
+ direction: 'outgoing'
+ });
+ }
+ }
+ }
+ var expandedAnswer = {
+ type: 'answer',
+ sdp: answer.sdp
+ };
+ if (self.assumeSetLocalSuccess) {
+ // not safe to do when doing simulcast mangling
+ self.emit('answer', expandedAnswer);
+ cb(null, expandedAnswer);
+ }
+ self._candidateBuffer = [];
+ self.pc.setLocalDescription(answer,
+ function () {
+ if (self.config.useJingle) {
+ var jingle = SJJ.toSessionJSON(answer.sdp, {
+ role: self._role(),
+ direction: 'outgoing'
+ });
+ jingle.sid = self.config.sid;
+ self.localDescription = jingle;
+ expandedAnswer.jingle = jingle;
+ }
+ if (self.enableChromeNativeSimulcast) {
+ // native simulcast part 2:
+ // signal multiple tracks to the receiver
+ // for anything in the SIM group
+ if (!expandedAnswer.jingle) {
+ expandedAnswer.jingle = SJJ.toSessionJSON(answer.sdp, {
+ role: self._role(),
+ direction: 'outgoing'
+ });
+ }
+ var groups = expandedAnswer.jingle.contents[1].description.sourceGroups || [];
+ expandedAnswer.jingle.contents[1].description.sources.forEach(function (source, idx) {
+ // the floor idx/2 is a hack that relies on a particular order
+ // of groups, alternating between sim and rtx
+ source.parameters = source.parameters.map(function (parameter) {
+ if (parameter.key === 'msid') {
+ parameter.value += '-' + Math.floor(idx / 2);
+ }
+ return parameter;
+ });
+ });
+ expandedAnswer.sdp = SJJ.toSessionSDP(expandedAnswer.jingle, {
+ sid: self.sdpSessionID,
+ role: self._role(),
+ direction: 'outgoing'
+ });
+ }
+ expandedAnswer.sdp.split('\r\n').forEach(function (line) {
+ if (line.indexOf('a=candidate:') === 0) {
+ self._checkLocalCandidate(line);
+ }
+ });
+ if (!self.assumeSetLocalSuccess) {
+ self.emit('answer', expandedAnswer);
+ cb(null, expandedAnswer);
+ }
+ },
+ function (err) {
+ self.emit('error', err);
+ cb(err);
+ }
+ );
+ },
+ function (err) {
+ self.emit('error', err);
+ cb(err);
+ },
+ constraints
+ );
+};
+
+// Internal method for emitting ice candidates on our peer object
+PeerConnection.prototype._onIce = function (event) {
+ var self = this;
+ if (event.candidate) {
+ if (this.dontSignalCandidates) return;
+ var ice = event.candidate;
+
+ var expandedCandidate = {
+ candidate: {
+ candidate: ice.candidate,
+ sdpMid: ice.sdpMid,
+ sdpMLineIndex: ice.sdpMLineIndex
+ }
+ };
+ this._checkLocalCandidate(ice.candidate);
+
+ var cand = SJJ.toCandidateJSON(ice.candidate);
+
+ var already;
+ var idx;
+ if (this.eliminateDuplicateCandidates && cand.type === 'relay') {
+ // drop candidates with same foundation, component
+ // take local type pref into account so we don't ignore udp
+ // ones when we know about a TCP one. unlikely but...
+ already = this._candidateBuffer.filter(
+ function (c) {
+ return c.type === 'relay';
+ }).map(function (c) {
+ return c.foundation + ':' + c.component;
+ }
+ );
+ idx = already.indexOf(cand.foundation + ':' + cand.component);
+ // remember: local type pref of udp is 0, tcp 1, tls 2
+ if (idx > -1 && ((cand.priority >> 24) >= (already[idx].priority >> 24))) {
+ // drop it, same foundation with higher (worse) type pref
+ return;
+ }
+ }
+ if (this.config.bundlePolicy === 'max-bundle') {
+ // drop candidates which are duplicate for audio/video/data
+ // duplicate means same host/port but different sdpMid
+ already = this._candidateBuffer.filter(
+ function (c) {
+ return cand.type === c.type;
+ }).map(function (cand) {
+ return cand.address + ':' + cand.port;
+ }
+ );
+ idx = already.indexOf(cand.address + ':' + cand.port);
+ if (idx > -1) return;
+ }
+ // also drop rtcp candidates since we know the peer supports RTCP-MUX
+ // this is a workaround until browsers implement this natively
+ if (this.config.rtcpMuxPolicy === 'require' && cand.component === '2') {
+ return;
+ }
+ this._candidateBuffer.push(cand);
+
+ if (self.config.useJingle) {
+ if (!ice.sdpMid) { // firefox doesn't set this
+ if (self.pc.remoteDescription && self.pc.remoteDescription.type === 'offer') {
+ // preserve name from remote
+ ice.sdpMid = self.remoteDescription.contents[ice.sdpMLineIndex].name;
+ } else {
+ ice.sdpMid = self.localDescription.contents[ice.sdpMLineIndex].name;
+ }
+ }
+ if (!self.config.ice[ice.sdpMid]) {
+ var jingle = SJJ.toSessionJSON(self.pc.localDescription.sdp, {
+ role: self._role(),
+ direction: 'outgoing'
+ });
+ each(jingle.contents, function (content) {
+ var transport = content.transport || {};
+ if (transport.ufrag) {
+ self.config.ice[content.name] = {
+ ufrag: transport.ufrag,
+ pwd: transport.pwd
+ };
+ }
+ });
+ }
+ expandedCandidate.jingle = {
+ contents: [{
+ name: ice.sdpMid,
+ creator: self._role(),
+ transport: {
+ transType: 'iceUdp',
+ ufrag: self.config.ice[ice.sdpMid].ufrag,
+ pwd: self.config.ice[ice.sdpMid].pwd,
+ candidates: [
+ cand
+ ]
+ }
+ }]
+ };
+ if (self.batchIceCandidates > 0) {
+ if (self.batchedIceCandidates.length === 0) {
+ window.setTimeout(function () {
+ var contents = {};
+ self.batchedIceCandidates.forEach(function (content) {
+ content = content.contents[0];
+ if (!contents[content.name]) contents[content.name] = content;
+ contents[content.name].transport.candidates.push(content.transport.candidates[0]);
+ });
+ var newCand = {
+ jingle: {
+ contents: []
+ }
+ };
+ Object.keys(contents).forEach(function (name) {
+ newCand.jingle.contents.push(contents[name]);
+ });
+ self.batchedIceCandidates = [];
+ self.emit('ice', newCand);
+ }, self.batchIceCandidates);
+ }
+ self.batchedIceCandidates.push(expandedCandidate.jingle);
+ return;
+ }
+
+ }
+ this.emit('ice', expandedCandidate);
+ } else {
+ this.emit('endOfCandidates');
+ }
+};
+
+// Internal method for processing a new data channel being added by the
+// other peer.
+PeerConnection.prototype._onDataChannel = function (event) {
+ // make sure we keep a reference so this doesn't get garbage collected
+ var channel = event.channel;
+ this._remoteDataChannels.push(channel);
+
+ this.emit('addChannel', channel);
+};
+
+// Create a data channel spec reference:
+// http://dev.w3.org/2011/webrtc/editor/webrtc.html#idl-def-RTCDataChannelInit
+PeerConnection.prototype.createDataChannel = function (name, opts) {
+ var channel = this.pc.createDataChannel(name, opts);
+
+ // make sure we keep a reference so this doesn't get garbage collected
+ this._localDataChannels.push(channel);
+
+ return channel;
+};
+
+// a wrapper around getStats which hides the differences (where possible)
+PeerConnection.prototype.getStats = function (cb) {
+ if (webrtc.prefix === 'moz') {
+ this.pc.getStats(
+ function (res) {
+ var items = [];
+ for (var result in res) {
+ if (typeof res[result] === 'object') {
+ items.push(res[result]);
+ }
+ }
+ cb(null, items);
+ },
+ cb
+ );
+ } else {
+ this.pc.getStats(function (res) {
+ var items = [];
+ res.result().forEach(function (result) {
+ var item = {};
+ result.names().forEach(function (name) {
+ item[name] = result.stat(name);
+ });
+ item.id = result.id;
+ item.type = result.type;
+ item.timestamp = result.timestamp;
+ items.push(item);
+ });
+ cb(null, items);
+ });
+ }
+};
+
+module.exports = PeerConnection;
+
+},{"lodash.foreach":48,"lodash.pluck":56,"sdp-jingle-json":71,"traceablepeerconnection":76,"util":24,"webrtcsupport":112,"wildemitter":113}],78:[function(require,module,exports){
+var util = require('util');
+var extend = require('extend-object');
+var BaseSession = require('jingle-session');
+var RTCPeerConnection = require('rtcpeerconnection');
+
+
+function filterContentSources(content, stream) {
+ delete content.transport;
+ delete content.description.payloads;
+ if (content.description.sources) {
+ content.description.sources = content.description.sources.filter(function (source) {
+ return stream.id === source.parameters[1].value.split(' ')[0];
+ });
+ }
+}
+
+function filterUnusedLabels(content) {
+ // Remove mslabel and label ssrc-specific attributes
+ var sources = content.description.sources || [];
+ sources.forEach(function (source) {
+ source.parameters = source.parameters.filter(function (parameter) {
+ return !(parameter.key === 'mslabel' || parameter.key === 'label');
+ });
+ });
+}
+
+
+function MediaSession(opts) {
+ BaseSession.call(this, opts);
+
+ this.pc = new RTCPeerConnection({
+ iceServers: opts.iceServers || [],
+ useJingle: true
+ }, opts.constraints || {});
+
+ this.pc.on('ice', this.onIceCandidate.bind(this));
+ this.pc.on('iceConnectionStateChange', this.onIceStateChange.bind(this));
+ this.pc.on('addStream', this.onAddStream.bind(this));
+ this.pc.on('removeStream', this.onRemoveStream.bind(this));
+
+ if (opts.stream) {
+ this.addStream(opts.stream);
+ }
+
+ this._ringing = false;
+}
+
+
+util.inherits(MediaSession, BaseSession);
+
+
+Object.defineProperties(MediaSession.prototype, {
+ ringing: {
+ get: function () {
+ return this._ringing;
+ },
+ set: function (value) {
+ if (value !== this._ringing) {
+ this._ringing = value;
+ this.emit('change:ringing', value);
+ }
+ }
+ },
+ streams: {
+ get: function () {
+ if (this.pc.signalingState !== 'closed') {
+ return this.pc.getRemoteStreams();
+ }
+ return [];
+ }
+ }
+});
+
+
+MediaSession.prototype = extend(MediaSession.prototype, {
+
+ // ----------------------------------------------------------------
+ // Session control methods
+ // ----------------------------------------------------------------
+
+ start: function (constraints, next) {
+ var self = this;
+ this.state = 'pending';
+
+ next = next || function () {};
+
+ this.pc.isInitiator = true;
+ this.pc.offer(constraints, function (err, offer) {
+ if (err) {
+ self._log('error', 'Could not create WebRTC offer', err);
+ return self.end('failed-application', true);
+ }
+
+ // a workaround for missing a=sendonly
+ // https://code.google.com/p/webrtc/issues/detail?id=1553
+ if (constraints && constraints.mandatory) {
+ offer.jingle.contents.forEach(function (content) {
+ var mediaType = content.description.media;
+
+ if (!content.description || content.description.descType !== 'rtp') {
+ return;
+ }
+
+ if (!constraints.mandatory.OfferToReceiveAudio && mediaType === 'audio') {
+ content.senders = 'initiator';
+ }
+
+ if (!constraints.mandatory.OfferToReceiveVideo && mediaType === 'video') {
+ content.senders = 'initiator';
+ }
+ });
+ }
+
+ offer.jingle.contents.forEach(filterUnusedLabels);
+
+ self.send('session-initiate', offer.jingle);
+
+ next();
+ });
+ },
+
+ accept: function (next) {
+ var self = this;
+
+ next = next || function () {};
+
+ this._log('info', 'Accepted incoming session');
+
+ this.state = 'active';
+
+ this.pc.answer(function (err, answer) {
+ if (err) {
+ self._log('error', 'Could not create WebRTC answer', err);
+ return self.end('failed-application');
+ }
+
+ answer.jingle.contents.forEach(filterUnusedLabels);
+
+ self.send('session-accept', answer.jingle);
+
+ next();
+ });
+ },
+
+ end: function (reason, silent) {
+ var self = this;
+ this.streams.forEach(function (stream) {
+ self.onRemoveStream({stream: stream});
+ });
+ this.pc.close();
+ BaseSession.prototype.end.call(this, reason, silent);
+ },
+
+ ring: function () {
+ this._log('info', 'Ringing on incoming session');
+ this.ringing = true;
+ this.send('session-info', {ringing: true});
+ },
+
+ mute: function (creator, name) {
+ this._log('info', 'Muting', name);
+
+ this.send('session-info', {
+ mute: {
+ creator: creator,
+ name: name
+ }
+ });
+ },
+
+ unmute: function (creator, name) {
+ this._log('info', 'Unmuting', name);
+ this.send('session-info', {
+ unmute: {
+ creator: creator,
+ name: name
+ }
+ });
+ },
+
+ hold: function () {
+ this._log('info', 'Placing on hold');
+ this.send('session-info', {hold: true});
+ },
+
+ resume: function () {
+ this._log('info', 'Resuming from hold');
+ this.send('session-info', {active: true});
+ },
+
+ // ----------------------------------------------------------------
+ // Stream control methods
+ // ----------------------------------------------------------------
+
+ addStream: function (stream, renegotiate, cb) {
+ var self = this;
+
+ cb = cb || function () {};
+
+ this.pc.addStream(stream);
+
+ if (!renegotiate) {
+ return;
+ }
+
+ this.pc.handleOffer({
+ type: 'offer',
+ jingle: this.pc.remoteDescription
+ }, function (err) {
+ if (err) {
+ self._log('error', 'Could not create offer for adding new stream');
+ return cb(err);
+ }
+ self.pc.answer(function (err, answer) {
+ if (err) {
+ self._log('error', 'Could not create answer for adding new stream');
+ return cb(err);
+ }
+ answer.jingle.contents.forEach(function (content) {
+ filterContentSources(content, stream);
+ });
+
+ self.send('source-add', answer.jingle);
+ cb();
+ });
+ });
+ },
+
+ addStream2: function (stream, cb) {
+ this.addStream(stream, true, cb);
+ },
+
+ removeStream: function (stream, renegotiate, cb) {
+ var self = this;
+
+ cb = cb || function () {};
+
+ if (!renegotiate) {
+ this.pc.removeStream(stream);
+ return;
+ }
+
+ var desc = this.pc.localDescription;
+ desc.contents.forEach(function (content) {
+ filterContentSources(content, stream);
+ });
+
+ this.send('source-remove', desc);
+ this.pc.removeStream(stream);
+
+ this.pc.handleOffer({
+ type: 'offer',
+ jingle: this.pc.remoteDescription
+ }, function (err) {
+ if (err) {
+ self._log('error', 'Could not process offer for removing stream');
+ return cb(err);
+ }
+ self.pc.answer(function (err) {
+ if (err) {
+ self._log('error', 'Could not process answer for removing stream');
+ return cb(err);
+ }
+ cb();
+ });
+ });
+ },
+
+ removeStream2: function (stream, cb) {
+ this.removeStream(stream, true, cb);
+ },
+
+ switchStream: function (oldStream, newStream, cb) {
+ var self = this;
+
+ cb = cb || function () {};
+
+ var desc = this.pc.localDescription;
+ desc.contents.forEach(function (content) {
+ delete content.transport;
+ delete content.description.payloads;
+ });
+
+ this.pc.removeStream(oldStream);
+ this.send('source-remove', desc);
+
+ var audioTracks = oldStream.getAudioTracks();
+ if (audioTracks.length) {
+ newStream.addTrack(audioTracks[0]);
+ }
+
+ this.pc.addStream(newStream);
+ this.pc.handleOffer({
+ type: 'offer',
+ jingle: this.pc.remoteDescription
+ }, function (err) {
+ if (err) {
+ self._log('error', 'Could not process offer for switching streams');
+ return cb(err);
+ }
+ self.pc.answer(function (err, answer) {
+ if (err) {
+ self._log('error', 'Could not process answer for switching streams');
+ return cb(err);
+ }
+ answer.jingle.contents.forEach(function (content) {
+ delete content.transport;
+ delete content.description.payloads;
+ });
+ self.send('source-add', answer.jingle);
+ cb();
+ });
+ });
+ },
+
+ // ----------------------------------------------------------------
+ // ICE action handers
+ // ----------------------------------------------------------------
+
+ onIceCandidate: function (candidate) {
+ this._log('info', 'Discovered new ICE candidate', candidate.jingle);
+ this.send('transport-info', candidate.jingle);
+ },
+
+ onIceStateChange: function () {
+ switch (this.pc.iceConnectionState) {
+ case 'checking':
+ this.connectionState = 'connecting';
+ break;
+ case 'completed':
+ case 'connected':
+ this.connectionState = 'connected';
+ break;
+ case 'disconnected':
+ if (this.pc.signalingState === 'stable') {
+ this.connectionState = 'interrupted';
+ } else {
+ this.connectionState = 'disconnected';
+ }
+ break;
+ case 'failed':
+ this.connectionState = 'failed';
+ this.end('failed-transport');
+ break;
+ case 'closed':
+ this.connectionState = 'disconnected';
+ break;
+ }
+ },
+
+ // ----------------------------------------------------------------
+ // Stream event handlers
+ // ----------------------------------------------------------------
+
+ onAddStream: function (event) {
+ this._log('info', 'Stream added');
+ this.emit('peerStreamAdded', this, event.stream);
+ },
+
+ onRemoveStream: function (event) {
+ this._log('info', 'Stream removed');
+ this.emit('peerStreamRemoved', this, event.stream);
+ },
+
+ // ----------------------------------------------------------------
+ // Jingle action handers
+ // ----------------------------------------------------------------
+
+ onSessionInitiate: function (changes, cb) {
+ var self = this;
+
+ this._log('info', 'Initiating incoming session');
+
+ this.state = 'pending';
+
+ this.pc.isInitiator = false;
+ this.pc.handleOffer({
+ type: 'offer',
+ jingle: changes
+ }, function (err) {
+ if (err) {
+ self._log('error', 'Could not create WebRTC answer');
+ return cb({condition: 'general-error'});
+ }
+ cb();
+ });
+ },
+
+ onSessionAccept: function (changes, cb) {
+ var self = this;
+
+ this.state = 'active';
+ this.pc.handleAnswer({
+ type: 'answer',
+ jingle: changes
+ }, function (err) {
+ if (err) {
+ self._log('error', 'Could not process WebRTC answer');
+ return cb({condition: 'general-error'});
+ }
+ self.emit('accepted', self);
+ cb();
+ });
+ },
+
+ onSessionTerminate: function (changes, cb) {
+ var self = this;
+
+ this._log('info', 'Terminating session');
+ this.streams.forEach(function (stream) {
+ self.onRemoveStream({stream: stream});
+ });
+ this.pc.close();
+ BaseSession.prototype.end.call(this, changes.reason, true);
+
+ cb();
+ },
+
+ onSessionInfo: function (info, cb) {
+ if (info.ringing) {
+ this._log('info', 'Outgoing session is ringing');
+ this.ringing = true;
+ this.emit('ringing', this);
+ return cb();
+ }
+
+ if (info.hold) {
+ this._log('info', 'On hold');
+ this.emit('hold', this);
+ return cb();
+ }
+
+ if (info.active) {
+ this._log('info', 'Resuming from hold');
+ this.emit('resumed', this);
+ return cb();
+ }
+
+ if (info.mute) {
+ this._log('info', 'Muting', info.mute);
+ this.emit('mute', this, info.mute);
+ return cb();
+ }
+
+ if (info.unmute) {
+ this._log('info', 'Unmuting', info.unmute);
+ this.emit('unmute', this, info.unmute);
+ return cb();
+ }
+
+ cb();
+ },
+
+ onTransportInfo: function (changes, cb) {
+ this.pc.processIce(changes, function () {
+ cb();
+ });
+ },
+
+ onSourceAdd: function (changes, cb) {
+ var self = this;
+ this._log('info', 'Adding new stream source');
+
+ var newDesc = this.pc.remoteDescription;
+ this.pc.remoteDescription.contents.forEach(function (content, idx) {
+ var desc = content.description;
+ var ssrcs = desc.sources || [];
+ var groups = desc.sourceGroups || [];
+
+ changes.contents.forEach(function (newContent) {
+ if (content.name !== newContent.name) {
+ return;
+ }
+
+ var newContentDesc = newContent.description;
+ var newSSRCs = newContentDesc.sources || [];
+
+ ssrcs = ssrcs.concat(newSSRCs);
+ newDesc.contents[idx].description.sources = JSON.parse(JSON.stringify(ssrcs));
+
+ var newGroups = newContentDesc.sourceGroups || [];
+ groups = groups.concat(newGroups);
+ newDesc.contents[idx].description.sourceGroups = JSON.parse(JSON.stringify(groups));
+ });
+ });
+
+ this.pc.handleOffer({
+ type: 'offer',
+ jingle: newDesc
+ }, function (err) {
+ if (err) {
+ self._log('error', 'Error adding new stream source');
+ return cb({
+ condition: 'general-error'
+ });
+ }
+
+ self.pc.answer(function (err) {
+ if (err) {
+ self._log('error', 'Error adding new stream source');
+ return cb({
+ condition: 'general-error'
+ });
+ }
+ cb();
+ });
+ });
+ },
+
+ onSourceRemove: function (changes, cb) {
+ var self = this;
+ this._log('info', 'Removing stream source');
+
+ var newDesc = this.pc.remoteDescription;
+ this.pc.remoteDescription.contents.forEach(function (content, idx) {
+ var desc = content.description;
+ var ssrcs = desc.sources || [];
+ var groups = desc.sourceGroups || [];
+
+ changes.contents.forEach(function (newContent) {
+ if (content.name !== newContent.name) {
+ return;
+ }
+
+ var newContentDesc = newContent.description;
+ var newSSRCs = newContentDesc.sources || [];
+ var newGroups = newContentDesc.sourceGroups || [];
+
+ var found, i, j, k;
+
+
+ for (i = 0; i < newSSRCs.length; i++) {
+ found = -1;
+ for (j = 0; j < ssrcs.length; j++) {
+ if (newSSRCs[i].ssrc === ssrcs[j].ssrc) {
+ found = j;
+ break;
+ }
+ }
+ if (found > -1) {
+ ssrcs.splice(found, 1);
+ newDesc.contents[idx].description.sources = JSON.parse(JSON.stringify(ssrcs));
+ }
+ }
+
+ // Remove ssrc-groups that are no longer needed
+ for (i = 0; i < newGroups.length; i++) {
+ found = -1;
+ for (j = 0; i < groups.length; j++) {
+ if (newGroups[i].semantics === groups[j].semantics &&
+ newGroups[i].sources.length === groups[j].sources.length) {
+ var same = true;
+ for (k = 0; k < newGroups[i].sources.length; k++) {
+ if (newGroups[i].sources[k] !== groups[j].sources[k]) {
+ same = false;
+ break;
+ }
+ }
+ if (same) {
+ found = j;
+ break;
+ }
+ }
+ }
+ if (found > -1) {
+ groups.splice(found, 1);
+ newDesc.contents[idx].description.sourceGroups = JSON.parse(JSON.stringify(groups));
+ }
+ }
+ });
+ });
+
+ this.pc.handleOffer({
+ type: 'offer',
+ jingle: newDesc
+ }, function (err) {
+ if (err) {
+ self._log('error', 'Error removing stream source');
+ return cb({
+ condition: 'general-error'
+ });
+ }
+ self.pc.answer(function (err) {
+ if (err) {
+ self._log('error', 'Error removing stream source');
+ return cb({
+ condition: 'general-error'
+ });
+ }
+ cb();
+ });
+ });
+ }
+});
+
+
+module.exports = MediaSession;
+
+},{"extend-object":27,"jingle-session":109,"rtcpeerconnection":108,"util":24}],79:[function(require,module,exports){
+arguments[4][48][0].apply(exports,arguments)
+},{"dup":48,"lodash._arrayeach":80,"lodash._baseeach":81,"lodash._bindcallback":85,"lodash.isarray":86}],80:[function(require,module,exports){
+arguments[4][49][0].apply(exports,arguments)
+},{"dup":49}],81:[function(require,module,exports){
+arguments[4][50][0].apply(exports,arguments)
+},{"dup":50,"lodash.keys":82}],82:[function(require,module,exports){
+arguments[4][51][0].apply(exports,arguments)
+},{"dup":51,"lodash._getnative":83,"lodash.isarguments":84,"lodash.isarray":86}],83:[function(require,module,exports){
+arguments[4][52][0].apply(exports,arguments)
+},{"dup":52}],84:[function(require,module,exports){
+arguments[4][53][0].apply(exports,arguments)
+},{"dup":53}],85:[function(require,module,exports){
+arguments[4][54][0].apply(exports,arguments)
+},{"dup":54}],86:[function(require,module,exports){
+arguments[4][55][0].apply(exports,arguments)
+},{"dup":55}],87:[function(require,module,exports){
+arguments[4][56][0].apply(exports,arguments)
+},{"dup":56,"lodash._baseget":88,"lodash._topath":89,"lodash.isarray":90,"lodash.map":91}],88:[function(require,module,exports){
+arguments[4][57][0].apply(exports,arguments)
+},{"dup":57}],89:[function(require,module,exports){
+arguments[4][58][0].apply(exports,arguments)
+},{"dup":58,"lodash.isarray":90}],90:[function(require,module,exports){
+arguments[4][55][0].apply(exports,arguments)
+},{"dup":55}],91:[function(require,module,exports){
+arguments[4][60][0].apply(exports,arguments)
+},{"dup":60,"lodash._arraymap":92,"lodash._basecallback":93,"lodash._baseeach":98,"lodash.isarray":90}],92:[function(require,module,exports){
+arguments[4][61][0].apply(exports,arguments)
+},{"dup":61}],93:[function(require,module,exports){
+arguments[4][62][0].apply(exports,arguments)
+},{"dup":62,"lodash._baseisequal":94,"lodash._bindcallback":96,"lodash.isarray":90,"lodash.pairs":97}],94:[function(require,module,exports){
+arguments[4][63][0].apply(exports,arguments)
+},{"dup":63,"lodash.isarray":90,"lodash.istypedarray":95,"lodash.keys":99}],95:[function(require,module,exports){
+arguments[4][64][0].apply(exports,arguments)
+},{"dup":64}],96:[function(require,module,exports){
+arguments[4][54][0].apply(exports,arguments)
+},{"dup":54}],97:[function(require,module,exports){
+arguments[4][66][0].apply(exports,arguments)
+},{"dup":66,"lodash.keys":99}],98:[function(require,module,exports){
+arguments[4][50][0].apply(exports,arguments)
+},{"dup":50,"lodash.keys":99}],99:[function(require,module,exports){
+arguments[4][51][0].apply(exports,arguments)
+},{"dup":51,"lodash._getnative":100,"lodash.isarguments":101,"lodash.isarray":90}],100:[function(require,module,exports){
+arguments[4][52][0].apply(exports,arguments)
+},{"dup":52}],101:[function(require,module,exports){
+arguments[4][53][0].apply(exports,arguments)
+},{"dup":53}],102:[function(require,module,exports){
+arguments[4][71][0].apply(exports,arguments)
+},{"./lib/tojson":105,"./lib/tosdp":106,"dup":71}],103:[function(require,module,exports){
+arguments[4][72][0].apply(exports,arguments)
+},{"dup":72}],104:[function(require,module,exports){
+arguments[4][73][0].apply(exports,arguments)
+},{"dup":73}],105:[function(require,module,exports){
+arguments[4][74][0].apply(exports,arguments)
+},{"./parsers":103,"./senders":104,"dup":74}],106:[function(require,module,exports){
+arguments[4][75][0].apply(exports,arguments)
+},{"./senders":104,"dup":75}],107:[function(require,module,exports){
+arguments[4][76][0].apply(exports,arguments)
+},{"dup":76,"util":24,"webrtcsupport":112,"wildemitter":113}],108:[function(require,module,exports){
+arguments[4][77][0].apply(exports,arguments)
+},{"dup":77,"lodash.foreach":79,"lodash.pluck":87,"sdp-jingle-json":102,"traceablepeerconnection":107,"util":24,"webrtcsupport":112,"wildemitter":113}],109:[function(require,module,exports){
+var util = require('util');
+var uuid = require('uuid');
+var async = require('async');
+var extend = require('extend-object');
+var WildEmitter = require('wildemitter');
+
+
+var ACTIONS = {
+ 'content-accept': 'onContentAccept',
+ 'content-add': 'onContentAdd',
+ 'content-modify': 'onConentModify',
+ 'content-reject': 'onContentReject',
+ 'content-remove': 'onContentRemove',
+ 'description-info': 'onDescriptionInfo',
+ 'security-info': 'onSecurityInfo',
+ 'session-accept': 'onSessionAccept',
+ 'session-info': 'onSessionInfo',
+ 'session-initiate': 'onSessionInitiate',
+ 'session-terminate': 'onSessionTerminate',
+ 'transport-accept': 'onTransportAccept',
+ 'transport-info': 'onTransportInfo',
+ 'transport-reject': 'onTransportReject',
+ 'transport-replace': 'onTransportReplace',
+
+ // Unstandardized actions: might go away anytime without notice
+ 'source-add': 'onSourceAdd',
+ 'source-remove': 'onSourceRemove'
+};
+
+
+function JingleSession(opts) {
+ WildEmitter.call(this);
+
+ var self = this;
+
+ this.sid = opts.sid || uuid.v4();
+ this.peer = opts.peer;
+ this.peerID = opts.peerID || this.peer.full || this.peer;
+ this.isInitiator = opts.initiator || false;
+ this.parent = opts.parent;
+ this.state = 'starting';
+ this.connectionState = 'starting';
+
+ // We track the intial pending description types in case
+ // of the need for a tie-breaker.
+ this.pendingDescriptionTypes = opts.descriptionTypes || [];
+
+ this.pendingAction = false;
+
+ // Here is where we'll ensure that all actions are processed
+ // in order, even if a particular action requires async handling.
+ this.processingQueue = async.queue(function (task, next) {
+ if (self.ended) {
+ // Don't process anything once the session has been ended
+ return next();
+ }
+
+ var action = task.action;
+ var changes = task.changes;
+ var cb = task.cb;
+
+ self._log('debug', action);
+
+ if (!ACTIONS[action]) {
+ self._log('error', 'Invalid action: ' + action);
+ cb({condition: 'bad-request'});
+ return next();
+ }
+
+ self[ACTIONS[action]](changes, function (err, result) {
+ cb(err, result);
+ return next();
+ });
+ });
+}
+
+
+util.inherits(JingleSession, WildEmitter);
+
+// We don't know how to handle any particular content types,
+// so no actions are supported.
+Object.keys(ACTIONS).forEach(function (action) {
+ var method = ACTIONS[action];
+ JingleSession.prototype[method] = function (changes, cb) {
+ this._log('error', 'Unsupported action: ' + action);
+ cb();
+ };
+});
+
+// Provide some convenience properties for checking
+// the session's state.
+Object.defineProperties(JingleSession.prototype, {
+ state: {
+ get: function () {
+ return this._sessionState;
+ },
+ set: function (value) {
+ if (value !== this._sessionState) {
+ var prev = this._sessionState;
+ this._log('info', 'Changing session state to: ' + value);
+ this._sessionState = value;
+ this.emit('change:sessionState', this, value);
+ this.emit('change:' + value, this, true);
+ if (prev) {
+ this.emit('change:' + prev, this, false);
+ }
+ }
+ }
+ },
+ connectionState: {
+ get: function () {
+ return this._connectionState;
+ },
+ set: function (value) {
+ if (value !== this._connectionState) {
+ var prev = this._connectionState;
+ this._log('info', 'Changing connection state to: ' + value);
+ this._connectionState = value;
+ this.emit('change:connectionState', this, value);
+ this.emit('change:' + value, this, true);
+ if (prev) {
+ this.emit('change:' + prev, this, false);
+ }
+ }
+ }
+ },
+ starting: {
+ get: function () {
+ return this._sessionState === 'starting';
+ }
+ },
+ pending: {
+ get: function () {
+ return this._sessionState === 'pending';
+ }
+ },
+ active: {
+ get: function () {
+ return this._sessionState === 'active';
+ }
+ },
+ ended: {
+ get: function () {
+ return this._sessionState === 'ended';
+ }
+ },
+ connected: {
+ get: function () {
+ return this._connectionState === 'connected';
+ }
+ },
+ connecting: {
+ get: function () {
+ return this._connectionState === 'connecting';
+ }
+ },
+ disconnected: {
+ get: function () {
+ return this._connectionState === 'disconnected';
+ }
+ },
+ interrupted: {
+ get: function () {
+ return this._connectionState === 'interrupted';
+ }
+ }
+});
+
+JingleSession.prototype = extend(JingleSession.prototype, {
+ _log: function (level, message) {
+ message = this.sid + ': ' + message;
+ this.emit('log:' + level, message);
+ },
+
+ send: function (action, data) {
+ data = data || {};
+ data.sid = this.sid;
+ data.action = action;
+
+ var requirePending = {
+ 'session-inititate': true,
+ 'session-accept': true,
+ 'content-add': true,
+ 'content-remove': true,
+ 'content-reject': true,
+ 'content-accept': true,
+ 'content-modify': true,
+ 'transport-replace': true,
+ 'transport-reject': true,
+ 'transport-accept': true,
+ 'source-add': true,
+ 'source-remove': true
+ };
+
+ if (requirePending[action]) {
+ this.pendingAction = action;
+ } else {
+ this.pendingAction = false;
+ }
+
+ this.emit('send', {
+ to: this.peer,
+ type: 'set',
+ jingle: data
+ });
+ },
+
+ process: function (action, changes, cb) {
+ this.processingQueue.push({
+ action: action,
+ changes: changes,
+ cb: cb
+ });
+ },
+
+ start: function () {
+ this._log('error', 'Can not start base sessions');
+ this.end('unsupported-applications', true);
+ },
+
+ accept: function () {
+ this._log('error', 'Can not accept base sessions');
+ this.end('unsupported-applications');
+ },
+
+ cancel: function () {
+ this.end('cancel');
+ },
+
+ decline: function () {
+ this.end('decline');
+ },
+
+ end: function (reason, silent) {
+ this.state = 'ended';
+
+ this.processingQueue.kill();
+
+ if (!reason) {
+ reason = 'success';
+ }
+
+ if (typeof reason === 'string') {
+ reason = {
+ condition: reason
+ };
+ }
+
+ if (!silent) {
+ this.send('session-terminate', {
+ reason: reason
+ });
+ }
+
+ this.emit('terminated', this, reason);
+ },
+
+ onSessionTerminate: function (changes, cb) {
+ this.end(changes.reason, true);
+ cb();
+ },
+
+ // It is mandatory to reply to a session-info action with
+ // an unsupported-info error if the info isn't recognized.
+ //
+ // However, a session-info action with no associated payload
+ // is acceptable (works like a ping).
+ onSessionInfo: function (changes, cb) {
+ var okKeys = {
+ sid: true,
+ action: true,
+ initiator: true,
+ responder: true
+ };
+
+ var unknownPayload = false;
+ Object.keys(changes).forEach(function (key) {
+ if (!okKeys[key]) {
+ unknownPayload = true;
+ }
+ });
+
+ if (unknownPayload) {
+ cb({
+ type: 'modify',
+ condition: 'feature-not-implemented',
+ jingleCondition: 'unsupported-info'
+ });
+ } else {
+ cb();
+ }
+ },
+
+ // It is mandatory to reply to a description-info action with
+ // an unsupported-info error if the info isn't recognized.
+ onDescriptionInfo: function (changes, cb) {
+ cb({
+ type: 'modify',
+ condition: 'feature-not-implemented',
+ jingleCondition: 'unsupported-info'
+ });
+ },
+
+ // It is mandatory to reply to a transport-info action with
+ // an unsupported-info error if the info isn't recognized.
+ onTransportInfo: function (changes, cb) {
+ cb({
+ type: 'modify',
+ condition: 'feature-not-implemented',
+ jingleCondition: 'unsupported-info'
+ });
+ },
+
+ // It is mandatory to reply to a content-add action with either
+ // a content-accept or content-reject.
+ onContentAdd: function (changes, cb) {
+ // Allow ack for the content-add to be sent.
+ cb();
+
+ this.send('content-reject', {
+ reason: {
+ condition: 'failed-application',
+ text: 'content-add is not supported'
+ }
+ });
+ },
+
+ // It is mandatory to reply to a transport-add action with either
+ // a transport-accept or transport-reject.
+ onTransportReplace: function (changes, cb) {
+ // Allow ack for the transport-replace be sent.
+ cb();
+
+ this.send('transport-reject', {
+ reason: {
+ condition: 'failed-application',
+ text: 'transport-replace is not supported'
+ }
+ });
+ }
+});
+
+
+module.exports = JingleSession;
+
+},{"async":26,"extend-object":27,"util":24,"uuid":111,"wildemitter":113}],110:[function(require,module,exports){
+(function (global){
+
+var rng;
+
+if (global.crypto && crypto.getRandomValues) {
+ // WHATWG crypto-based RNG - http://wiki.whatwg.org/wiki/Crypto
+ // Moderately fast, high quality
+ var _rnds8 = new Uint8Array(16);
+ rng = function whatwgRNG() {
+ crypto.getRandomValues(_rnds8);
+ return _rnds8;
+ };
+}
+
+if (!rng) {
+ // Math.random()-based (RNG)
+ //
+ // If all else fails, use Math.random(). It's fast, but is of unspecified
+ // quality.
+ var _rnds = new Array(16);
+ rng = function() {
+ for (var i = 0, r; i < 16; i++) {
+ if ((i & 0x03) === 0) r = Math.random() * 0x100000000;
+ _rnds[i] = r >>> ((i & 0x03) << 3) & 0xff;
+ }
+
+ return _rnds;
+ };
+}
+
+module.exports = rng;
+
+
+}).call(this,typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {})
+},{}],111:[function(require,module,exports){
+// uuid.js
+//
+// Copyright (c) 2010-2012 Robert Kieffer
+// MIT License - http://opensource.org/licenses/mit-license.php
+
+// Unique ID creation requires a high quality random # generator. We feature
+// detect to determine the best RNG source, normalizing to a function that
+// returns 128-bits of randomness, since that's what's usually required
+var _rng = require('./rng');
+
+// Maps for number <-> hex string conversion
+var _byteToHex = [];
+var _hexToByte = {};
+for (var i = 0; i < 256; i++) {
+ _byteToHex[i] = (i + 0x100).toString(16).substr(1);
+ _hexToByte[_byteToHex[i]] = i;
+}
+
+// **`parse()` - Parse a UUID into it's component bytes**
+function parse(s, buf, offset) {
+ var i = (buf && offset) || 0, ii = 0;
+
+ buf = buf || [];
+ s.toLowerCase().replace(/[0-9a-f]{2}/g, function(oct) {
+ if (ii < 16) { // Don't overflow!
+ buf[i + ii++] = _hexToByte[oct];
+ }
+ });
+
+ // Zero out remaining bytes if string was short
+ while (ii < 16) {
+ buf[i + ii++] = 0;
+ }
+
+ return buf;
+}
+
+// **`unparse()` - Convert UUID byte array (ala parse()) into a string**
+function unparse(buf, offset) {
+ var i = offset || 0, bth = _byteToHex;
+ return bth[buf[i++]] + bth[buf[i++]] +
+ bth[buf[i++]] + bth[buf[i++]] + '-' +
+ bth[buf[i++]] + bth[buf[i++]] + '-' +
+ bth[buf[i++]] + bth[buf[i++]] + '-' +
+ bth[buf[i++]] + bth[buf[i++]] + '-' +
+ bth[buf[i++]] + bth[buf[i++]] +
+ bth[buf[i++]] + bth[buf[i++]] +
+ bth[buf[i++]] + bth[buf[i++]];
+}
+
+// **`v1()` - Generate time-based UUID**
+//
+// Inspired by https://github.com/LiosK/UUID.js
+// and http://docs.python.org/library/uuid.html
+
+// random #'s we need to init node and clockseq
+var _seedBytes = _rng();
+
+// Per 4.5, create and 48-bit node id, (47 random bits + multicast bit = 1)
+var _nodeId = [
+ _seedBytes[0] | 0x01,
+ _seedBytes[1], _seedBytes[2], _seedBytes[3], _seedBytes[4], _seedBytes[5]
+];
+
+// Per 4.2.2, randomize (14 bit) clockseq
+var _clockseq = (_seedBytes[6] << 8 | _seedBytes[7]) & 0x3fff;
+
+// Previous uuid creation time
+var _lastMSecs = 0, _lastNSecs = 0;
+
+// See https://github.com/broofa/node-uuid for API details
+function v1(options, buf, offset) {
+ var i = buf && offset || 0;
+ var b = buf || [];
+
+ options = options || {};
+
+ var clockseq = options.clockseq !== undefined ? options.clockseq : _clockseq;
+
+ // UUID timestamps are 100 nano-second units since the Gregorian epoch,
+ // (1582-10-15 00:00). JSNumbers aren't precise enough for this, so
+ // time is handled internally as 'msecs' (integer milliseconds) and 'nsecs'
+ // (100-nanoseconds offset from msecs) since unix epoch, 1970-01-01 00:00.
+ var msecs = options.msecs !== undefined ? options.msecs : new Date().getTime();
+
+ // Per 4.2.1.2, use count of uuid's generated during the current clock
+ // cycle to simulate higher resolution clock
+ var nsecs = options.nsecs !== undefined ? options.nsecs : _lastNSecs + 1;
+
+ // Time since last uuid creation (in msecs)
+ var dt = (msecs - _lastMSecs) + (nsecs - _lastNSecs)/10000;
+
+ // Per 4.2.1.2, Bump clockseq on clock regression
+ if (dt < 0 && options.clockseq === undefined) {
+ clockseq = clockseq + 1 & 0x3fff;
+ }
+
+ // Reset nsecs if clock regresses (new clockseq) or we've moved onto a new
+ // time interval
+ if ((dt < 0 || msecs > _lastMSecs) && options.nsecs === undefined) {
+ nsecs = 0;
+ }
+
+ // Per 4.2.1.2 Throw error if too many uuids are requested
+ if (nsecs >= 10000) {
+ throw new Error('uuid.v1(): Can\'t create more than 10M uuids/sec');
+ }
+
+ _lastMSecs = msecs;
+ _lastNSecs = nsecs;
+ _clockseq = clockseq;
+
+ // Per 4.1.4 - Convert from unix epoch to Gregorian epoch
+ msecs += 12219292800000;
+
+ // `time_low`
+ var tl = ((msecs & 0xfffffff) * 10000 + nsecs) % 0x100000000;
+ b[i++] = tl >>> 24 & 0xff;
+ b[i++] = tl >>> 16 & 0xff;
+ b[i++] = tl >>> 8 & 0xff;
+ b[i++] = tl & 0xff;
+
+ // `time_mid`
+ var tmh = (msecs / 0x100000000 * 10000) & 0xfffffff;
+ b[i++] = tmh >>> 8 & 0xff;
+ b[i++] = tmh & 0xff;
+
+ // `time_high_and_version`
+ b[i++] = tmh >>> 24 & 0xf | 0x10; // include version
+ b[i++] = tmh >>> 16 & 0xff;
+
+ // `clock_seq_hi_and_reserved` (Per 4.2.2 - include variant)
+ b[i++] = clockseq >>> 8 | 0x80;
+
+ // `clock_seq_low`
+ b[i++] = clockseq & 0xff;
+
+ // `node`
+ var node = options.node || _nodeId;
+ for (var n = 0; n < 6; n++) {
+ b[i + n] = node[n];
+ }
+
+ return buf ? buf : unparse(b);
+}
+
+// **`v4()` - Generate random UUID**
+
+// See https://github.com/broofa/node-uuid for API details
+function v4(options, buf, offset) {
+ // Deprecated - 'format' argument, as supported in v1.2
+ var i = buf && offset || 0;
+
+ if (typeof(options) == 'string') {
+ buf = options == 'binary' ? new Array(16) : null;
+ options = null;
+ }
+ options = options || {};
+
+ var rnds = options.random || (options.rng || _rng)();
+
+ // Per 4.4, set bits for version and `clock_seq_hi_and_reserved`
+ rnds[6] = (rnds[6] & 0x0f) | 0x40;
+ rnds[8] = (rnds[8] & 0x3f) | 0x80;
+
+ // Copy bytes to buffer, if provided
+ if (buf) {
+ for (var ii = 0; ii < 16; ii++) {
+ buf[i + ii] = rnds[ii];
+ }
+ }
+
+ return buf || unparse(rnds);
+}
+
+// Export public API
+var uuid = v4;
+uuid.v1 = v1;
+uuid.v4 = v4;
+uuid.parse = parse;
+uuid.unparse = unparse;
+
+module.exports = uuid;
+
+},{"./rng":110}],112:[function(require,module,exports){
+// created by @HenrikJoreteg
+var prefix;
+var version;
+
+if (window.mozRTCPeerConnection || navigator.mozGetUserMedia) {
+ prefix = 'moz';
+ version = parseInt(navigator.userAgent.match(/Firefox\/([0-9]+)\./)[1], 10);
+} else if (window.webkitRTCPeerConnection || navigator.webkitGetUserMedia) {
+ prefix = 'webkit';
+ version = navigator.userAgent.match(/Chrom(e|ium)/) && parseInt(navigator.userAgent.match(/Chrom(e|ium)\/([0-9]+)\./)[2], 10);
+}
+
+var PC = window.mozRTCPeerConnection || window.webkitRTCPeerConnection;
+var IceCandidate = window.mozRTCIceCandidate || window.RTCIceCandidate;
+var SessionDescription = window.mozRTCSessionDescription || window.RTCSessionDescription;
+var MediaStream = window.webkitMediaStream || window.MediaStream;
+var screenSharing = window.location.protocol === 'https:' &&
+ ((prefix === 'webkit' && version >= 26) ||
+ (prefix === 'moz' && version >= 33))
+var AudioContext = window.AudioContext || window.webkitAudioContext;
+var videoEl = document.createElement('video');
+var supportVp8 = videoEl && videoEl.canPlayType && videoEl.canPlayType('video/webm; codecs="vp8", vorbis') === "probably";
+var getUserMedia = navigator.getUserMedia || navigator.webkitGetUserMedia || navigator.msGetUserMedia || navigator.mozGetUserMedia;
+
+// export support flags and constructors.prototype && PC
+module.exports = {
+ prefix: prefix,
+ browserVersion: version,
+ support: !!PC && supportVp8 && !!getUserMedia,
+ // new support style
+ supportRTCPeerConnection: !!PC,
+ supportVp8: supportVp8,
+ supportGetUserMedia: !!getUserMedia,
+ supportDataChannel: !!(PC && PC.prototype && PC.prototype.createDataChannel),
+ supportWebAudio: !!(AudioContext && AudioContext.prototype.createMediaStreamSource),
+ supportMediaStream: !!(MediaStream && MediaStream.prototype.removeTrack),
+ supportScreenSharing: !!screenSharing,
+ // old deprecated style. Dont use this anymore
+ dataChannel: !!(PC && PC.prototype && PC.prototype.createDataChannel),
+ webAudio: !!(AudioContext && AudioContext.prototype.createMediaStreamSource),
+ mediaStream: !!(MediaStream && MediaStream.prototype.removeTrack),
+ screenSharing: !!screenSharing,
+ // constructors
+ AudioContext: AudioContext,
+ PeerConnection: PC,
+ SessionDescription: SessionDescription,
+ IceCandidate: IceCandidate,
+ MediaStream: MediaStream,
+ getUserMedia: getUserMedia
+};
+
+},{}],113:[function(require,module,exports){
+/*
+WildEmitter.js is a slim little event emitter by @henrikjoreteg largely based
+on @visionmedia's Emitter from UI Kit.
+
+Why? I wanted it standalone.
+
+I also wanted support for wildcard emitters like this:
+
+emitter.on('*', function (eventName, other, event, payloads) {
+
+});
+
+emitter.on('somenamespace*', function (eventName, payloads) {
+
+});
+
+Please note that callbacks triggered by wildcard registered events also get
+the event name as the first argument.
+*/
+module.exports = WildEmitter;
+
+function WildEmitter() {
+ this.isWildEmitter = true;
+ this.callbacks = {};
+}
+
+// Listen on the given `event` with `fn`. Store a group name if present.
+WildEmitter.prototype.on = function (event, groupName, fn) {
+ var hasGroup = (arguments.length === 3),
+ group = hasGroup ? arguments[1] : undefined,
+ func = hasGroup ? arguments[2] : arguments[1];
+ func._groupName = group;
+ (this.callbacks[event] = this.callbacks[event] || []).push(func);
+ return this;
+};
+
+// Adds an `event` listener that will be invoked a single
+// time then automatically removed.
+WildEmitter.prototype.once = function (event, groupName, fn) {
+ var self = this,
+ hasGroup = (arguments.length === 3),
+ group = hasGroup ? arguments[1] : undefined,
+ func = hasGroup ? arguments[2] : arguments[1];
+ function on() {
+ self.off(event, on);
+ func.apply(this, arguments);
+ }
+ this.on(event, group, on);
+ return this;
+};
+
+// Unbinds an entire group
+WildEmitter.prototype.releaseGroup = function (groupName) {
+ var item, i, len, handlers;
+ for (item in this.callbacks) {
+ handlers = this.callbacks[item];
+ for (i = 0, len = handlers.length; i < len; i++) {
+ if (handlers[i]._groupName === groupName) {
+ //console.log('removing');
+ // remove it and shorten the array we're looping through
+ handlers.splice(i, 1);
+ i--;
+ len--;
+ }
+ }
+ }
+ return this;
+};
+
+// Remove the given callback for `event` or all
+// registered callbacks.
+WildEmitter.prototype.off = function (event, fn) {
+ var callbacks = this.callbacks[event],
+ i;
+
+ if (!callbacks) return this;
+
+ // remove all handlers
+ if (arguments.length === 1) {
+ delete this.callbacks[event];
+ return this;
+ }
+
+ // remove specific handler
+ i = callbacks.indexOf(fn);
+ callbacks.splice(i, 1);
+ if (callbacks.length === 0) {
+ delete this.callbacks[event];
+ }
+ return this;
+};
+
+/// Emit `event` with the given args.
+// also calls any `*` handlers
+WildEmitter.prototype.emit = function (event) {
+ var args = [].slice.call(arguments, 1),
+ callbacks = this.callbacks[event],
+ specialCallbacks = this.getWildcardCallbacks(event),
+ i,
+ len,
+ item,
+ listeners;
+
+ if (callbacks) {
+ listeners = callbacks.slice();
+ for (i = 0, len = listeners.length; i < len; ++i) {
+ if (listeners[i]) {
+ listeners[i].apply(this, args);
+ } else {
+ break;
+ }
+ }
+ }
+
+ if (specialCallbacks) {
+ len = specialCallbacks.length;
+ listeners = specialCallbacks.slice();
+ for (i = 0, len = listeners.length; i < len; ++i) {
+ if (listeners[i]) {
+ listeners[i].apply(this, [event].concat(args));
+ } else {
+ break;
+ }
+ }
+ }
+
+ return this;
+};
+
+// Helper for for finding special wildcard event handlers that match the event
+WildEmitter.prototype.getWildcardCallbacks = function (eventName) {
+ var item,
+ split,
+ result = [];
+
+ for (item in this.callbacks) {
+ split = item.split('*');
+ if (item === '*' || (split.length === 2 && eventName.slice(0, split[0].length) === split[0])) {
+ result = result.concat(this.callbacks[item]);
+ }
+ }
+ return result;
+};
+
+},{}],114:[function(require,module,exports){
+'use strict';
+
+var extend = require('lodash.assign');
+var uuid = require('uuid');
+var ltx = require('ltx');
+
+var types = require('./lib/types');
+var helpers = require('./lib/helpers');
+var stanzaConstructor = require('./lib/stanza');
+
+
+function JXT() {
+ this._LOOKUP = {};
+ this._LOOKUP_EXT = {};
+ this._TAGS = {};
+ this._CB_DEFINITION = {};
+ this._CB_TAG = {};
+ this._ID = uuid.v4();
+ this.utils = extend({}, types, helpers);
+}
+
+JXT.prototype.use = function (init) {
+ if (!init['__JXT_LOADED_' + this._ID]) {
+ init(this);
+ }
+ init['__JXT_LOADED_' + this._ID] = true;
+ return this;
+};
+
+JXT.prototype.getDefinition = function (el, ns, required) {
+ var JXTClass = this._LOOKUP[ns + '|' + el];
+ if (required && !JXTClass) {
+ throw new Error('Could not find definition for <' + el + ' xmlns="' + ns + '" />');
+ }
+ return JXTClass;
+};
+
+JXT.prototype.getExtensions = function (el, ns) {
+ return this._LOOKUP_EXT[ns + '|' + el] || {};
+};
+
+JXT.prototype.withDefinition = function (el, ns, cb) {
+ var name = ns + '|' + el;
+ if (!this._CB_DEFINITION[name]) {
+ this._CB_DEFINITION[name] = [];
+ }
+ this._CB_DEFINITION[name].push(cb);
+
+ if (this._LOOKUP[name]) {
+ cb(this._LOOKUP[name]);
+ }
+};
+
+JXT.prototype.withTag = function (tag, cb) {
+ if (!this._CB_TAG[tag]) {
+ this._CB_TAG[tag] = [];
+ }
+ this._CB_TAG[tag].push(cb);
+
+ this.tagged(tag).forEach(function (stanza) {
+ cb(stanza);
+ });
+};
+
+JXT.prototype.tagged = function (tag) {
+ return this._TAGS[tag] || [];
+};
+
+JXT.prototype.build = function (xml) {
+ var JXTClass = this._LOOKUP[xml.namespaceURI + '|' + xml.localName];
+ if (JXTClass) {
+ return new JXTClass(null, xml);
+ }
+};
+
+JXT.prototype.parse = function (str) {
+ var xml= ltx.parse(str);
+ if (xml.nodeType !== 1) {
+ return;
+ }
+
+ var JXTClass = this.getDefinition(xml.localName, xml.namespaceURI);
+ if (JXTClass) {
+ return new JXTClass(null, xml);
+ }
+};
+
+JXT.prototype.extend = function (ParentJXT, ChildJXT, multiName) {
+ var parentName = ParentJXT.prototype._NS + '|' + ParentJXT.prototype._EL;
+ var name = ChildJXT.prototype._name;
+ var qName = ChildJXT.prototype._NS + '|' + ChildJXT.prototype._EL;
+
+ this._LOOKUP[qName] = ChildJXT;
+ if (!this._LOOKUP_EXT[qName]) {
+ this._LOOKUP_EXT[qName] = {};
+ }
+ if (!this._LOOKUP_EXT[parentName]) {
+ this._LOOKUP_EXT[parentName] = {};
+ }
+ this._LOOKUP_EXT[parentName][name] = ChildJXT;
+
+ this.add(ParentJXT, name, types.extension(ChildJXT));
+ if (multiName) {
+ this.add(ParentJXT, multiName, types.multiExtension(ChildJXT));
+ }
+};
+
+JXT.prototype.add = function (ParentJXT, fieldName, field) {
+ field.enumerable = true;
+ Object.defineProperty(ParentJXT.prototype, fieldName, field);
+};
+
+JXT.prototype.define = function (opts) {
+ var self = this;
+
+ var Stanza = stanzaConstructor(this, opts);
+
+ var ns = Stanza.prototype._NS;
+ var el = Stanza.prototype._EL;
+ var tags = Stanza.prototype._TAGS;
+
+ var name = ns + '|' + el;
+ this._LOOKUP[name] = Stanza;
+
+ tags.forEach(function (tag) {
+ if (!self._TAGS[tag]) {
+ self._TAGS[tag] = [];
+ }
+ self._TAGS[tag].push(Stanza);
+ });
+
+ var fieldNames = Object.keys(opts.fields || {});
+ fieldNames.forEach(function (fieldName) {
+ self.add(Stanza, fieldName, opts.fields[fieldName]);
+ });
+
+ if (this._CB_DEFINITION[name]) {
+ this._CB_DEFINITION[name].forEach(function (handler) {
+ handler(Stanza);
+ });
+ }
+
+ tags.forEach(function (tag) {
+ if (self._CB_TAG[tag]) {
+ self._CB_TAG[tag].forEach(function (handler) {
+ handler(Stanza);
+ });
+ }
+ });
+
+ return Stanza;
+};
+
+
+// Expose methods on the required module itself
+
+
+JXT.createRegistry = function () {
+ return new JXT();
+};
+
+extend(JXT, helpers);
+extend(JXT, types);
+
+// Compatibility shim for JXT 1.x
+
+var globalJXT = new JXT();
+
+JXT.define = globalJXT.define.bind(globalJXT);
+JXT.extend = globalJXT.extend.bind(globalJXT);
+JXT.add = globalJXT.add.bind(globalJXT);
+JXT.parse = globalJXT.parse.bind(globalJXT);
+JXT.build = globalJXT.build.bind(globalJXT);
+JXT.getExtensions = globalJXT.getExtensions.bind(globalJXT);
+JXT.getDefinition = globalJXT.getDefinition.bind(globalJXT);
+JXT.withDefinition = globalJXT.withDefinition.bind(globalJXT);
+JXT.withTag = globalJXT.withTag.bind(globalJXT);
+JXT.tagged = globalJXT.tagged.bind(globalJXT);
+
+JXT.getGlobalJXT = function () {
+ return globalJXT;
+};
+
+module.exports = JXT;
+
+},{"./lib/helpers":115,"./lib/stanza":116,"./lib/types":117,"lodash.assign":118,"ltx":131,"uuid":136}],115:[function(require,module,exports){
+'use strict';
+
+var ltx = require('ltx');
+
+var XML_NS = exports.XML_NS = 'http://www.w3.org/XML/1998/namespace';
+
+
+exports.createElement = function (NS, name, parentNS) {
+ var el = new ltx.Element(name);
+ if (!parentNS || parentNS !== NS) {
+ exports.setAttribute(el, 'xmlns', NS);
+ }
+ return el;
+};
+
+var find = exports.find = function (xml, NS, selector) {
+ var results = [];
+ var children = xml.getElementsByTagName(selector);
+ for (var i = 0, len = children.length; i < len; i++) {
+ var child = children[i];
+ if (child.namespaceURI === NS && child.parentNode === xml) {
+ results.push(child);
+ }
+ }
+ return results;
+};
+
+exports.findOrCreate = function (xml, NS, selector) {
+ var existing = exports.find(xml, NS, selector);
+ if (existing.length) {
+ return existing[0];
+ } else {
+ var created = exports.createElement(NS, selector, xml.namespaceURI);
+ xml.appendChild(created);
+ return created;
+ }
+};
+
+exports.getAttribute = function (xml, attr, defaultVal) {
+ return xml.getAttribute(attr) || defaultVal || '';
+};
+
+exports.getAttributeNS = function (xml, NS, attr, defaultVal) {
+ return xml.getAttributeNS(NS, attr) || defaultVal || '';
+};
+
+exports.setAttribute = function (xml, attr, value, force) {
+ if (value || force) {
+ xml.setAttribute(attr, value);
+ } else {
+ xml.removeAttribute(attr);
+ }
+};
+
+exports.setAttributeNS = function (xml, NS, attr, value, force) {
+ if (value || force) {
+ xml.setAttributeNS(NS, attr, value);
+ } else {
+ xml.removeAttributeNS(NS, attr);
+ }
+};
+
+exports.getBoolAttribute = function (xml, attr, defaultVal) {
+ var val = xml.getAttribute(attr) || defaultVal || '';
+ return val === 'true' || val === '1';
+};
+
+exports.setBoolAttribute = function (xml, attr, value) {
+ if (value) {
+ xml.setAttribute(attr, '1');
+ } else {
+ xml.removeAttribute(attr);
+ }
+};
+
+exports.getSubAttribute = function (xml, NS, sub, attr, defaultVal) {
+ var subs = find(xml, NS, sub);
+ if (!subs) {
+ return '';
+ }
+
+ for (var i = 0; i < subs.length; i++) {
+ return subs[i].getAttribute(attr) || defaultVal || '';
+ }
+
+ return '';
+};
+
+exports.setSubAttribute = function (xml, NS, sub, attr, value) {
+ var subs = find(xml, NS, sub);
+ if (!subs.length) {
+ if (value) {
+ sub = exports.createElement(NS, sub, xml.namespaceURI);
+ sub.setAttribute(attr, value);
+ xml.appendChild(sub);
+ }
+ } else {
+ for (var i = 0; i < subs.length; i++) {
+ if (value) {
+ subs[i].setAttribute(attr, value);
+ return;
+ } else {
+ subs[i].removeAttribute(attr);
+ }
+ }
+ }
+};
+
+exports.getBoolSubAttribute = function (xml, NS, sub, attr, defaultVal) {
+ var val = xml.getSubAttribute(NS, sub, attr) || defaultVal || '';
+ return val === 'true' || val === '1';
+};
+
+exports.setBoolSubAttribute = function (xml, NS, sub, attr, value) {
+ value = value ? '1' : '';
+ exports.setSubAttribute(xml, NS, sub, attr, value);
+};
+
+exports.getText = function (xml) {
+ return xml.textContent;
+};
+
+exports.setText = function (xml, value) {
+ xml.textContent = value;
+};
+
+exports.getSubText = exports.getTextSub = function (xml, NS, element, defaultVal) {
+ var subs = find(xml, NS, element);
+
+ defaultVal = defaultVal || '';
+
+ if (!subs.length) {
+ return defaultVal;
+ }
+
+ return subs[0].textContent || defaultVal;
+};
+
+exports.setSubText = exports.setTextSub = function (xml, NS, element, value) {
+ var subs = find(xml, NS, element);
+ if (subs.length) {
+ for (var i = 0; i < subs.length; i++) {
+ xml.removeChild(subs[i]);
+ }
+ }
+
+ if (value) {
+ var sub = exports.createElement(NS, element, xml.namespaceURI);
+ if (value !== true) {
+ sub.textContent = value;
+ }
+ xml.appendChild(sub);
+ }
+};
+
+exports.getMultiSubText = function (xml, NS, element, extractor) {
+ var subs = find(xml, NS, element);
+ var results = [];
+
+ extractor = extractor || function (sub) {
+ return sub.textContent || '';
+ };
+
+ for (var i = 0; i < subs.length; i++) {
+ results.push(extractor(subs[i]));
+ }
+
+ return results;
+};
+
+exports.setMultiSubText = function (xml, NS, element, value, builder) {
+ var subs = find(xml, NS, element);
+ var values = [];
+ builder = builder || function (value) {
+ if (value) {
+ var sub = exports.createElement(NS, element, xml.namespaceURI);
+ sub.textContent = value;
+ xml.appendChild(sub);
+ }
+ };
+ if (typeof value === 'string') {
+ values = (value || '').split('\n');
+ } else {
+ values = value;
+ }
+
+ var i, len;
+ for(i = 0, len = subs.length; i < len; i++) {
+ xml.removeChild(subs[i]);
+ }
+
+ for(i = 0, len = values.length; i < len; i++) {
+ builder(values[i]);
+ }
+};
+
+exports.getMultiSubAttribute = function (xml, NS, element, attr) {
+ return exports.getMultiSubText(xml, NS, element, function (sub) {
+ return exports.getAttribute(sub, attr);
+ });
+};
+
+exports.setMultiSubAttribute = function (xml, NS, element, attr, value) {
+ exports.setMultiSubText(xml, NS, element, value, function (val) {
+ var sub = exports.createElement(NS, element, xml.namespaceURI);
+ exports.setAttribute(sub, attr, val);
+ xml.appendChild(sub);
+ });
+};
+
+exports.getSubLangText = function (xml, NS, element, defaultLang) {
+ var subs = find(xml, NS, element);
+ if (!subs.length) {
+ return {};
+ }
+
+ var lang, sub;
+ var results = {};
+ var langs = [];
+
+ for (var i = 0; i < subs.length; i++) {
+ sub = subs[i];
+ lang = sub.getAttributeNS(XML_NS, 'lang') || defaultLang;
+ langs.push(lang);
+ results[lang] = sub.textContent || '';
+ }
+
+ return results;
+};
+
+exports.setSubLangText = function (xml, NS, element, value, defaultLang) {
+ var sub, lang;
+ var subs = find(xml, NS, element);
+ if (subs.length) {
+ for (var i = 0; i < subs.length; i++) {
+ xml.removeChild(subs[i]);
+ }
+ }
+
+ if (typeof value === 'string') {
+ sub = exports.createElement(NS, element, xml.namespaceURI);
+ sub.textContent = value;
+ xml.appendChild(sub);
+ } else if (typeof value === 'object') {
+ for (lang in value) {
+ if (value.hasOwnProperty(lang)) {
+ sub = exports.createElement(NS, element, xml.namespaceURI);
+ if (lang !== defaultLang) {
+ sub.setAttributeNS(XML_NS, 'lang', lang);
+ }
+ sub.textContent = value[lang];
+ xml.appendChild(sub);
+ }
+ }
+ }
+};
+
+exports.getBoolSub = function (xml, NS, element) {
+ var subs = find(xml, NS, element);
+ return !!subs.length;
+};
+
+exports.setBoolSub = function (xml, NS, element, value) {
+ var subs = find(xml, NS, element);
+ if (!subs.length) {
+ if (value) {
+ var sub = exports.createElement(NS, element, xml.namespaceURI);
+ xml.appendChild(sub);
+ }
+ } else {
+ for (var i = 0; i < subs.length; i++) {
+ if (value) {
+ return;
+ } else {
+ xml.removeChild(subs[i]);
+ }
+ }
+ }
+};
+
+},{"ltx":131}],116:[function(require,module,exports){
+'use strict';
+
+var helpers = require('./helpers');
+var extend = require('lodash.assign');
+
+
+var EXCLUDE = {
+ constructor: true,
+ parent: true,
+ prototype: true,
+ toJSON: true,
+ toString: true,
+ xml: true
+};
+
+
+module.exports = function (JXT, opts) {
+ function Stanza(data, xml, parent) {
+ var self = this;
+
+ var parentNode = (xml || {}).parentNode || (parent || {}).xml;
+ var parentNS = (parentNode || {}).namespaceURI;
+
+ self.xml = xml || helpers.createElement(self._NS, self._EL, parentNS);
+
+ Object.keys(self._PREFIXES).forEach(function (prefix) {
+ var namespace = self._PREFIXES[prefix];
+ self.xml.setAttribute('xmlns:' + prefix, namespace);
+ });
+
+ self._extensions = {};
+
+ for (var i = 0, len = self.xml.childNodes.length; i < len; i++) {
+ var child = self.xml.childNodes[i];
+ var ChildJXT = JXT.getDefinition(child.localName, child.namespaceURI);
+ if (ChildJXT !== undefined) {
+ var name = ChildJXT.prototype._name;
+ self._extensions[name] = new ChildJXT(null, child);
+ self._extensions[name].parent = self;
+ }
+ }
+
+ extend(self, data);
+
+ if (opts.init) {
+ opts.init.apply(self, [data]);
+ }
+
+ return self;
+ }
+
+
+ Stanza.prototype._name = opts.name;
+ Stanza.prototype._eventname = opts.eventName;
+ Stanza.prototype._NS = opts.namespace;
+ Stanza.prototype._EL = opts.element || opts.name;
+ Stanza.prototype._PREFIXES = opts.prefixes || {};
+ Stanza.prototype._TAGS = opts.tags || [];
+
+ Stanza.prototype.toString = function () {
+ return this.xml.toString();
+ };
+
+ Stanza.prototype.toJSON = function () {
+ var prop;
+ var result = {};
+
+ for (prop in this._extensions) {
+ if (this._extensions[prop].toJSON && prop[0] !== '_') {
+ result[prop] = this._extensions[prop].toJSON();
+ }
+ }
+
+ for (prop in this) {
+ var allowedName = !EXCLUDE[prop] && prop[0] !== '_';
+ var isExtensionName = JXT.getExtensions(this._EL, this._NS)[prop];
+
+ if (allowedName && !isExtensionName) {
+ var val = this[prop];
+ if (typeof val === 'function') {
+ continue;
+ }
+ var type = Object.prototype.toString.call(val);
+ if (type.indexOf('Object') >= 0) {
+ if (Object.keys(val).length > 0) {
+ result[prop] = val;
+ }
+ } else if (type.indexOf('Array') >= 0) {
+ if (val.length > 0) {
+ var vals = [];
+ var len = val.length;
+ for (var n = 0; n < len; n++) {
+ var nval = val[n];
+ if (typeof nval !== 'undefined') {
+ if (nval.toJSON !== undefined) {
+ vals.push(nval.toJSON());
+ } else {
+ vals.push(nval);
+ }
+ }
+ }
+ result[prop] = vals;
+ }
+ } else if (val !== undefined && val !== false && val !== '') {
+ result[prop] = val;
+ }
+ }
+ }
+
+ return result;
+ };
+
+ return Stanza;
+};
+
+},{"./helpers":115,"lodash.assign":118}],117:[function(require,module,exports){
+(function (Buffer){
+'use strict';
+
+var helpers = require('./helpers');
+var extend = require('lodash.assign');
+
+var find = helpers.find;
+var createElement = helpers.createElement;
+
+
+var field = exports.field = function (getter, setter) {
+ return function () {
+ var args = Array.prototype.slice.call(arguments);
+ return {
+ get: function () {
+ return getter.apply(null, [this.xml].concat(args));
+ },
+ set: function (value) {
+ setter.apply(null, ([this.xml].concat(args)).concat([value]));
+ }
+ };
+ };
+};
+
+exports.boolAttribute = field(
+ helpers.getBoolAttribute,
+ helpers.setBoolAttribute);
+
+exports.subAttribute = field(
+ helpers.getSubAttribute,
+ helpers.setSubAttribute);
+
+exports.boolSubAttribute = field(
+ helpers.getSubBoolAttribute,
+ helpers.setSubBoolAttribute);
+
+exports.text = field(
+ helpers.getText,
+ helpers.setText);
+
+exports.textSub = exports.subText = field(
+ helpers.getSubText,
+ helpers.setSubText);
+
+exports.multiTextSub = exports.multiSubText = field(
+ helpers.getMultiSubText,
+ helpers.setMultiSubText);
+
+exports.multiSubAttribute = field(
+ helpers.getMultiSubAttribute,
+ helpers.setMultiSubAttribute);
+
+exports.langTextSub = exports.subLangText = field(
+ helpers.getSubLangText,
+ helpers.setSubLangText);
+
+exports.boolSub = field(
+ helpers.getBoolSub,
+ helpers.setBoolSub);
+
+exports.langAttribute = field(
+ function (xml) {
+ return xml.getAttributeNS(helpers.XML_NS, 'lang') || '';
+ },
+ function (xml, value) {
+ xml.setAttributeNS(helpers.XML_NS, 'lang', value);
+ }
+);
+
+exports.b64Text = field(
+ function (xml) {
+ if (xml.textContent && xml.textContent !== '=') {
+ return new Buffer(xml.textContent, 'base64');
+ }
+ return '';
+ },
+ function (xml, value) {
+ if (typeof value === 'string') {
+ var b64 = (new Buffer(value)).toString('base64');
+ xml.textContent = b64 || '=';
+ } else {
+ xml.textContent = '';
+ }
+ }
+);
+
+exports.dateAttribute = function (attr, now) {
+ return {
+ get: function () {
+ var data = helpers.getAttribute(this.xml, attr);
+ if (data) {
+ return new Date(data);
+ }
+ if (now) {
+ return new Date(Date.now());
+ }
+ },
+ set: function (value) {
+ if (!value) {
+ return;
+ }
+ if (typeof value !== 'string') {
+ value = value.toISOString();
+ }
+ helpers.setAttribute(this.xml, attr, value);
+ }
+ };
+};
+
+exports.dateSub = function (NS, sub, now) {
+ return {
+ get: function () {
+ var data = helpers.getSubText(this.xml, NS, sub);
+ if (data) {
+ return new Date(data);
+ }
+ if (now) {
+ return new Date(Date.now());
+ }
+ },
+ set: function (value) {
+ if (!value) {
+ return;
+ }
+ if (typeof value !== 'string') {
+ value = value.toISOString();
+ }
+ helpers.setSubText(this.xml, NS, sub, value);
+ }
+ };
+};
+
+exports.dateSubAttribute = function (NS, sub, attr, now) {
+ return {
+ get: function () {
+ var data = helpers.getSubAttribute(this.xml, NS, sub, attr);
+ if (data) {
+ return new Date(data);
+ }
+ if (now) {
+ return new Date(Date.now());
+ }
+ },
+ set: function (value) {
+ if (!value) {
+ return;
+ }
+ if (typeof value !== 'string') {
+ value = value.toISOString();
+ }
+ helpers.setSubAttribute(this.xml, NS, sub, attr, value);
+ }
+ };
+};
+
+exports.numberAttribute = function (attr, isFloat, defaultVal) {
+ return {
+ get: function () {
+ var parse = isFloat ? parseFloat : parseInt;
+ var data = helpers.getAttribute(this.xml, attr, '');
+ if (!data) {
+ return defaultVal;
+ }
+ var parsed = parse(data, 10);
+ if (isNaN(parsed)) {
+ return defaultVal;
+ }
+
+ return parsed;
+ },
+ set: function (value) {
+ helpers.setAttribute(this.xml, attr, value.toString());
+ }
+ };
+};
+
+exports.numberSub = function (NS, sub, isFloat, defaultVal) {
+ return {
+ get: function () {
+ var parse = isFloat ? parseFloat : parseInt;
+ var data = helpers.getSubText(this.xml, NS, sub, '');
+ if (!data) {
+ return defaultVal;
+ }
+
+ var parsed = parse(data, 10);
+ if (isNaN(parsed)) {
+ return defaultVal;
+ }
+
+ return parsed;
+ },
+ set: function (value) {
+ helpers.setSubText(this.xml, NS, sub, value.toString());
+ }
+ };
+};
+
+exports.attribute = function (name, defaultVal) {
+ return {
+ get: function () {
+ return helpers.getAttribute(this.xml, name, defaultVal);
+ },
+ set: function (value) {
+ helpers.setAttribute(this.xml, name, value);
+ }
+ };
+};
+
+exports.attributeNS = function (NS, name, defaultVal) {
+ return {
+ get: function () {
+ return helpers.getAttributeNS(this.xml, NS, name, defaultVal);
+ },
+ set: function (value) {
+ helpers.setAttributeNS(this.xml, NS, name, value);
+ }
+ };
+};
+
+exports.extension = function (ChildJXT) {
+ return {
+ get: function () {
+ var self = this;
+ var name = ChildJXT.prototype._name;
+ if (!this._extensions[name]) {
+ var existing = find(this.xml, ChildJXT.prototype._NS, ChildJXT.prototype._EL);
+ if (!existing.length) {
+ this._extensions[name] = new ChildJXT({}, null, self);
+ this.xml.appendChild(this._extensions[name].xml);
+ } else {
+ this._extensions[name] = new ChildJXT(null, existing[0], self);
+ }
+ this._extensions[name].parent = this;
+ }
+ return this._extensions[name];
+ },
+ set: function (value) {
+ if (value) {
+ var child = this[ChildJXT.prototype._name];
+ if (value === true) {
+ value = {};
+ }
+ extend(child, value);
+ }
+ }
+ };
+};
+
+exports.multiExtension = function (ChildJXT) {
+ return {
+ get: function () {
+ var self = this;
+ var data = find(this.xml, ChildJXT.prototype._NS, ChildJXT.prototype._EL);
+ var results = [];
+
+ for (var i = 0, len = data.length; i < len; i++) {
+ results.push(new ChildJXT({}, data[i], self));
+ }
+
+ return results;
+ },
+ set: function (value) {
+ value = value || [];
+
+ var self = this;
+ var existing = find(this.xml, ChildJXT.prototype._NS, ChildJXT.prototype._EL);
+
+ var i, len;
+ for (i = 0, len = existing.length; i < len; i++) {
+ self.xml.removeChild(existing[i]);
+ }
+
+ for (i = 0, len = value.length; i < len; i++) {
+ var content = new ChildJXT(value[i], null, self);
+ self.xml.appendChild(content.xml);
+ }
+ }
+ };
+};
+
+exports.enumSub = function (NS, enumValues) {
+ return {
+ get: function () {
+ var self = this;
+ var result = [];
+ enumValues.forEach(function (enumVal) {
+ var exists = find(self.xml, NS, enumVal);
+ if (exists.length) {
+ result.push(exists[0].nodeName);
+ }
+ });
+ return result[0] || '';
+ },
+ set: function (value) {
+ var self = this;
+ enumValues.forEach(function (enumVal) {
+ var exists = find(self.xml, NS, enumVal);
+ if (exists.length) {
+ self.xml.removeChild(exists[0]);
+ }
+ });
+
+ if (value) {
+ var condition = createElement(NS, value);
+ this.xml.appendChild(condition);
+ }
+ }
+ };
+};
+
+exports.subExtension = function (name, NS, sub, ChildJXT) {
+ return {
+ get: function () {
+ if (!this._extensions[name]) {
+ var wrapper = find(this.xml, NS, sub);
+ if (!wrapper.length) {
+ wrapper= createElement(NS, sub, this._NS);
+ this.xml.appendChild(wrapper);
+ } else {
+ wrapper = wrapper[0];
+ }
+
+ var existing = find(wrapper, ChildJXT.prototype._NS, ChildJXT.prototype._EL);
+ if (!existing.length) {
+ this._extensions[name] = new ChildJXT({}, null, {xml: wrapper});
+ wrapper.appendChild(this._extensions[name].xml);
+ } else {
+ this._extensions[name] = new ChildJXT(null, existing[0], {xml: wrapper});
+ }
+ this._extensions[name].parent = this;
+ }
+ return this._extensions[name];
+ },
+ set: function (value) {
+ var wrapper = find(this.xml, NS, sub);
+ if (wrapper.length && !value) {
+ this.xml.removeChild(wrapper[0]);
+ }
+
+ if (value) {
+ var child = this[name];
+ if (value === true) {
+ value = {};
+ }
+ extend(child, value);
+ }
+ }
+ };
+};
+
+exports.subMultiExtension = function (NS, sub, ChildJXT) {
+ return {
+ get: function () {
+ var self = this;
+ var results = [];
+ var existing = find(this.xml, NS, sub);
+ if (!existing.length) {
+ return results;
+ }
+ existing = existing[0];
+ var data = find(existing, ChildJXT.prototype._NS, ChildJXT.prototype._EL);
+
+ data.forEach(function (xml) {
+ results.push(new ChildJXT({}, xml, self));
+ });
+ return results;
+ },
+ set: function (values) {
+ var self = this;
+ var existing = find(this.xml, NS, sub);
+ if (existing.length) {
+ self.xml.removeChild(existing[0]);
+ }
+
+ if (!values.length) {
+ return;
+ }
+
+ existing = createElement(NS, sub, this._NS);
+
+ values.forEach(function (value) {
+ var content = new ChildJXT(value, null, self);
+ existing.appendChild(content.xml);
+ });
+
+ self.xml.appendChild(existing);
+ }
+ };
+};
+
+}).call(this,require("buffer").Buffer)
+},{"./helpers":115,"buffer":2,"lodash.assign":118}],118:[function(require,module,exports){
+/**
+ * lodash 3.2.0 (Custom Build) <https://lodash.com/>
+ * Build: `lodash modern modularize exports="npm" -o ./`
+ * Copyright 2012-2015 The Dojo Foundation <http://dojofoundation.org/>
+ * Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>
+ * Copyright 2009-2015 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
+ * Available under MIT license <https://lodash.com/license>
+ */
+var baseAssign = require('lodash._baseassign'),
+ createAssigner = require('lodash._createassigner'),
+ keys = require('lodash.keys');
+
+/**
+ * A specialized version of `_.assign` for customizing assigned values without
+ * support for argument juggling, multiple sources, and `this` binding `customizer`
+ * functions.
+ *
+ * @private
+ * @param {Object} object The destination object.
+ * @param {Object} source The source object.
+ * @param {Function} customizer The function to customize assigned values.
+ * @returns {Object} Returns `object`.
+ */
+function assignWith(object, source, customizer) {
+ var index = -1,
+ props = keys(source),
+ length = props.length;
+
+ while (++index < length) {
+ var key = props[index],
+ value = object[key],
+ result = customizer(value, source[key], key, object, source);
+
+ if ((result === result ? (result !== value) : (value === value)) ||
+ (value === undefined && !(key in object))) {
+ object[key] = result;
+ }
+ }
+ return object;
+}
+
+/**
+ * Assigns own enumerable properties of source object(s) to the destination
+ * object. Subsequent sources overwrite property assignments of previous sources.
+ * If `customizer` is provided it is invoked to produce the assigned values.
+ * The `customizer` is bound to `thisArg` and invoked with five arguments:
+ * (objectValue, sourceValue, key, object, source).
+ *
+ * **Note:** This method mutates `object` and is based on
+ * [`Object.assign`](https://people.mozilla.org/~jorendorff/es6-draft.html#sec-object.assign).
+ *
+ * @static
+ * @memberOf _
+ * @alias extend
+ * @category Object
+ * @param {Object} object The destination object.
+ * @param {...Object} [sources] The source objects.
+ * @param {Function} [customizer] The function to customize assigned values.
+ * @param {*} [thisArg] The `this` binding of `customizer`.
+ * @returns {Object} Returns `object`.
+ * @example
+ *
+ * _.assign({ 'user': 'barney' }, { 'age': 40 }, { 'user': 'fred' });
+ * // => { 'user': 'fred', 'age': 40 }
+ *
+ * // using a customizer callback
+ * var defaults = _.partialRight(_.assign, function(value, other) {
+ * return _.isUndefined(value) ? other : value;
+ * });
+ *
+ * defaults({ 'user': 'barney' }, { 'age': 36 }, { 'user': 'fred' });
+ * // => { 'user': 'barney', 'age': 36 }
+ */
+var assign = createAssigner(function(object, source, customizer) {
+ return customizer
+ ? assignWith(object, source, customizer)
+ : baseAssign(object, source);
+});
+
+module.exports = assign;
+
+},{"lodash._baseassign":119,"lodash._createassigner":121,"lodash.keys":125}],119:[function(require,module,exports){
+/**
+ * lodash 3.2.0 (Custom Build) <https://lodash.com/>
+ * Build: `lodash modern modularize exports="npm" -o ./`
+ * Copyright 2012-2015 The Dojo Foundation <http://dojofoundation.org/>
+ * Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>
+ * Copyright 2009-2015 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
+ * Available under MIT license <https://lodash.com/license>
+ */
+var baseCopy = require('lodash._basecopy'),
+ keys = require('lodash.keys');
+
+/**
+ * The base implementation of `_.assign` without support for argument juggling,
+ * multiple sources, and `customizer` functions.
+ *
+ * @private
+ * @param {Object} object The destination object.
+ * @param {Object} source The source object.
+ * @returns {Object} Returns `object`.
+ */
+function baseAssign(object, source) {
+ return source == null
+ ? object
+ : baseCopy(source, keys(source), object);
+}
+
+module.exports = baseAssign;
+
+},{"lodash._basecopy":120,"lodash.keys":125}],120:[function(require,module,exports){
+/**
+ * lodash 3.0.1 (Custom Build) <https://lodash.com/>
+ * Build: `lodash modern modularize exports="npm" -o ./`
+ * Copyright 2012-2015 The Dojo Foundation <http://dojofoundation.org/>
+ * Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>
+ * Copyright 2009-2015 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
+ * Available under MIT license <https://lodash.com/license>
+ */
+
+/**
+ * Copies properties of `source` to `object`.
+ *
+ * @private
+ * @param {Object} source The object to copy properties from.
+ * @param {Array} props The property names to copy.
+ * @param {Object} [object={}] The object to copy properties to.
+ * @returns {Object} Returns `object`.
+ */
+function baseCopy(source, props, object) {
+ object || (object = {});
+
+ var index = -1,
+ length = props.length;
+
+ while (++index < length) {
+ var key = props[index];
+ object[key] = source[key];
+ }
+ return object;
+}
+
+module.exports = baseCopy;
+
+},{}],121:[function(require,module,exports){
+/**
+ * lodash 3.1.1 (Custom Build) <https://lodash.com/>
+ * Build: `lodash modern modularize exports="npm" -o ./`
+ * Copyright 2012-2015 The Dojo Foundation <http://dojofoundation.org/>
+ * Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>
+ * Copyright 2009-2015 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
+ * Available under MIT license <https://lodash.com/license>
+ */
+var bindCallback = require('lodash._bindcallback'),
+ isIterateeCall = require('lodash._isiterateecall'),
+ restParam = require('lodash.restparam');
+
+/**
+ * Creates a function that assigns properties of source object(s) to a given
+ * destination object.
+ *
+ * **Note:** This function is used to create `_.assign`, `_.defaults`, and `_.merge`.
+ *
+ * @private
+ * @param {Function} assigner The function to assign values.
+ * @returns {Function} Returns the new assigner function.
+ */
+function createAssigner(assigner) {
+ return restParam(function(object, sources) {
+ var index = -1,
+ length = object == null ? 0 : sources.length,
+ customizer = length > 2 ? sources[length - 2] : undefined,
+ guard = length > 2 ? sources[2] : undefined,
+ thisArg = length > 1 ? sources[length - 1] : undefined;
+
+ if (typeof customizer == 'function') {
+ customizer = bindCallback(customizer, thisArg, 5);
+ length -= 2;
+ } else {
+ customizer = typeof thisArg == 'function' ? thisArg : undefined;
+ length -= (customizer ? 1 : 0);
+ }
+ if (guard && isIterateeCall(sources[0], sources[1], guard)) {
+ customizer = length < 3 ? undefined : customizer;
+ length = 1;
+ }
+ while (++index < length) {
+ var source = sources[index];
+ if (source) {
+ assigner(object, source, customizer);
+ }
+ }
+ return object;
+ });
+}
+
+module.exports = createAssigner;
+
+},{"lodash._bindcallback":122,"lodash._isiterateecall":123,"lodash.restparam":124}],122:[function(require,module,exports){
+arguments[4][54][0].apply(exports,arguments)
+},{"dup":54}],123:[function(require,module,exports){
+/**
+ * lodash 3.0.9 (Custom Build) <https://lodash.com/>
+ * Build: `lodash modern modularize exports="npm" -o ./`
+ * Copyright 2012-2015 The Dojo Foundation <http://dojofoundation.org/>
+ * Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>
+ * Copyright 2009-2015 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
+ * Available under MIT license <https://lodash.com/license>
+ */
+
+/** Used to detect unsigned integer values. */
+var reIsUint = /^\d+$/;
+
+/**
+ * Used as the [maximum length](https://people.mozilla.org/~jorendorff/es6-draft.html#sec-number.max_safe_integer)
+ * of an array-like value.
+ */
+var MAX_SAFE_INTEGER = 9007199254740991;
+
+/**
+ * The base implementation of `_.property` without support for deep paths.
+ *
+ * @private
+ * @param {string} key The key of the property to get.
+ * @returns {Function} Returns the new function.
+ */
+function baseProperty(key) {
+ return function(object) {
+ return object == null ? undefined : object[key];
+ };
+}
+
+/**
+ * Gets the "length" property value of `object`.
+ *
+ * **Note:** This function is used to avoid a [JIT bug](https://bugs.webkit.org/show_bug.cgi?id=142792)
+ * that affects Safari on at least iOS 8.1-8.3 ARM64.
+ *
+ * @private
+ * @param {Object} object The object to query.
+ * @returns {*} Returns the "length" value.
+ */
+var getLength = baseProperty('length');
+
+/**
+ * Checks if `value` is array-like.
+ *
+ * @private
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is array-like, else `false`.
+ */
+function isArrayLike(value) {
+ return value != null && isLength(getLength(value));
+}
+
+/**
+ * Checks if `value` is a valid array-like index.
+ *
+ * @private
+ * @param {*} value The value to check.
+ * @param {number} [length=MAX_SAFE_INTEGER] The upper bounds of a valid index.
+ * @returns {boolean} Returns `true` if `value` is a valid index, else `false`.
+ */
+function isIndex(value, length) {
+ value = (typeof value == 'number' || reIsUint.test(value)) ? +value : -1;
+ length = length == null ? MAX_SAFE_INTEGER : length;
+ return value > -1 && value % 1 == 0 && value < length;
+}
+
+/**
+ * Checks if the provided arguments are from an iteratee call.
+ *
+ * @private
+ * @param {*} value The potential iteratee value argument.
+ * @param {*} index The potential iteratee index or key argument.
+ * @param {*} object The potential iteratee object argument.
+ * @returns {boolean} Returns `true` if the arguments are from an iteratee call, else `false`.
+ */
+function isIterateeCall(value, index, object) {
+ if (!isObject(object)) {
+ return false;
+ }
+ var type = typeof index;
+ if (type == 'number'
+ ? (isArrayLike(object) && isIndex(index, object.length))
+ : (type == 'string' && index in object)) {
+ var other = object[index];
+ return value === value ? (value === other) : (other !== other);
+ }
+ return false;
+}
+
+/**
+ * Checks if `value` is a valid array-like length.
+ *
+ * **Note:** This function is based on [`ToLength`](https://people.mozilla.org/~jorendorff/es6-draft.html#sec-tolength).
+ *
+ * @private
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is a valid length, else `false`.
+ */
+function isLength(value) {
+ return typeof value == 'number' && value > -1 && value % 1 == 0 && value <= MAX_SAFE_INTEGER;
+}
+
+/**
+ * Checks if `value` is the [language type](https://es5.github.io/#x8) of `Object`.
+ * (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`)
+ *
+ * @static
+ * @memberOf _
+ * @category Lang
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is an object, else `false`.
+ * @example
+ *
+ * _.isObject({});
+ * // => true
+ *
+ * _.isObject([1, 2, 3]);
+ * // => true
+ *
+ * _.isObject(1);
+ * // => false
+ */
+function isObject(value) {
+ // Avoid a V8 JIT bug in Chrome 19-20.
+ // See https://code.google.com/p/v8/issues/detail?id=2291 for more details.
+ var type = typeof value;
+ return !!value && (type == 'object' || type == 'function');
+}
+
+module.exports = isIterateeCall;
+
+},{}],124:[function(require,module,exports){
+/**
+ * lodash 3.6.1 (Custom Build) <https://lodash.com/>
+ * Build: `lodash modern modularize exports="npm" -o ./`
+ * Copyright 2012-2015 The Dojo Foundation <http://dojofoundation.org/>
+ * Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>
+ * Copyright 2009-2015 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
+ * Available under MIT license <https://lodash.com/license>
+ */
+
+/** Used as the `TypeError` message for "Functions" methods. */
+var FUNC_ERROR_TEXT = 'Expected a function';
+
+/* Native method references for those with the same name as other `lodash` methods. */
+var nativeMax = Math.max;
+
+/**
+ * Creates a function that invokes `func` with the `this` binding of the
+ * created function and arguments from `start` and beyond provided as an array.
+ *
+ * **Note:** This method is based on the [rest parameter](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Functions/rest_parameters).
+ *
+ * @static
+ * @memberOf _
+ * @category Function
+ * @param {Function} func The function to apply a rest parameter to.
+ * @param {number} [start=func.length-1] The start position of the rest parameter.
+ * @returns {Function} Returns the new function.
+ * @example
+ *
+ * var say = _.restParam(function(what, names) {
+ * return what + ' ' + _.initial(names).join(', ') +
+ * (_.size(names) > 1 ? ', & ' : '') + _.last(names);
+ * });
+ *
+ * say('hello', 'fred', 'barney', 'pebbles');
+ * // => 'hello fred, barney, & pebbles'
+ */
+function restParam(func, start) {
+ if (typeof func != 'function') {
+ throw new TypeError(FUNC_ERROR_TEXT);
+ }
+ start = nativeMax(start === undefined ? (func.length - 1) : (+start || 0), 0);
+ return function() {
+ var args = arguments,
+ index = -1,
+ length = nativeMax(args.length - start, 0),
+ rest = Array(length);
+
+ while (++index < length) {
+ rest[index] = args[start + index];
+ }
+ switch (start) {
+ case 0: return func.call(this, rest);
+ case 1: return func.call(this, args[0], rest);
+ case 2: return func.call(this, args[0], args[1], rest);
+ }
+ var otherArgs = Array(start + 1);
+ index = -1;
+ while (++index < start) {
+ otherArgs[index] = args[index];
+ }
+ otherArgs[start] = rest;
+ return func.apply(this, otherArgs);
+ };
+}
+
+module.exports = restParam;
+
+},{}],125:[function(require,module,exports){
+arguments[4][51][0].apply(exports,arguments)
+},{"dup":51,"lodash._getnative":126,"lodash.isarguments":127,"lodash.isarray":128}],126:[function(require,module,exports){
+arguments[4][52][0].apply(exports,arguments)
+},{"dup":52}],127:[function(require,module,exports){
+arguments[4][53][0].apply(exports,arguments)
+},{"dup":53}],128:[function(require,module,exports){
+arguments[4][55][0].apply(exports,arguments)
+},{"dup":55}],129:[function(require,module,exports){
+'use strict';
+
+var util = require('util')
+ , Element = require('./element').Element
+
+function DOMElement(name, attrs) {
+ Element.call(this, name, attrs)
+
+ this.nodeType = 1
+ this.nodeName = this.localName
+}
+
+util.inherits(DOMElement, Element)
+
+DOMElement.prototype._getElement = function(name, attrs) {
+ var element = new DOMElement(name, attrs)
+ return element
+}
+
+Object.defineProperty(DOMElement.prototype, 'localName', {
+ get: function () {
+ return this.getName()
+ }
+})
+
+Object.defineProperty(DOMElement.prototype, 'namespaceURI', {
+ get: function () {
+ return this.getNS()
+ }
+})
+
+Object.defineProperty(DOMElement.prototype, 'parentNode', {
+ get: function () {
+ return this.parent
+ }
+})
+
+Object.defineProperty(DOMElement.prototype, 'childNodes', {
+ get: function () {
+ return this.children
+ }
+})
+
+Object.defineProperty(DOMElement.prototype, 'textContent', {
+ get: function () {
+ return this.getText()
+ },
+ set: function (value) {
+ this.children.push(value)
+ }
+})
+
+DOMElement.prototype.getElementsByTagName = function (name) {
+ return this.getChildren(name)
+}
+
+DOMElement.prototype.getAttribute = function (name) {
+ return this.getAttr(name)
+}
+
+DOMElement.prototype.setAttribute = function (name, value) {
+ this.attr(name, value)
+}
+
+DOMElement.prototype.getAttributeNS = function (ns, name) {
+ if (ns === 'http://www.w3.org/XML/1998/namespace') {
+ return this.getAttr(['xml', name].join(':'))
+ }
+ return this.getAttr(name, ns)
+}
+
+DOMElement.prototype.setAttributeNS = function (ns, name, value) {
+ var prefix
+ if (ns === 'http://www.w3.org/XML/1998/namespace') {
+ prefix = 'xml'
+ } else {
+ var nss = this.getXmlns()
+ prefix = nss[ns] || ''
+ }
+ if (prefix) {
+ this.attr([prefix, name].join(':'), value)
+ }
+}
+
+DOMElement.prototype.removeAttribute = function (name) {
+ this.attr(name, null)
+}
+
+DOMElement.prototype.removeAttributeNS = function (ns, name) {
+ var prefix
+ if (ns === 'http://www.w3.org/XML/1998/namespace') {
+ prefix = 'xml'
+ } else {
+ var nss = this.getXmlns()
+ prefix = nss[ns] || ''
+ }
+ if (prefix) {
+ this.attr([prefix, name].join(':'), null)
+ }
+}
+
+DOMElement.prototype.appendChild = function (el) {
+ this.cnode(el)
+}
+
+DOMElement.prototype.removeChild = function (el) {
+ this.remove(el)
+}
+
+module.exports = DOMElement
+
+},{"./element":130,"util":24}],130:[function(require,module,exports){
+'use strict';
+
+/**
+ * This cheap replica of DOM/Builder puts me to shame :-)
+ *
+ * Attributes are in the element.attrs object. Children is a list of
+ * either other Elements or Strings for text content.
+ **/
+function Element(name, attrs) {
+ this.name = name
+ this.parent = null
+ this.children = []
+ this.setAttrs(attrs)
+}
+
+/*** Accessors ***/
+
+/**
+ * if (element.is('message', 'jabber:client')) ...
+ **/
+Element.prototype.is = function(name, xmlns) {
+ return (this.getName() === name) &&
+ (!xmlns || (this.getNS() === xmlns))
+}
+
+/* without prefix */
+Element.prototype.getName = function() {
+ if (this.name.indexOf(':') >= 0) {
+ return this.name.substr(this.name.indexOf(':') + 1)
+ } else {
+ return this.name
+ }
+}
+
+/**
+ * retrieves the namespace of the current element, upwards recursively
+ **/
+Element.prototype.getNS = function() {
+ if (this.name.indexOf(':') >= 0) {
+ var prefix = this.name.substr(0, this.name.indexOf(':'))
+ return this.findNS(prefix)
+ }
+ return this.findNS()
+}
+
+/**
+ * find the namespace to the given prefix, upwards recursively
+ **/
+Element.prototype.findNS = function(prefix) {
+ if (!prefix) {
+ /* default namespace */
+ if (this.attrs.xmlns) {
+ return this.attrs.xmlns
+ } else if (this.parent) {
+ return this.parent.findNS()
+ }
+ } else {
+ /* prefixed namespace */
+ var attr = 'xmlns:' + prefix
+ if (this.attrs[attr]) {
+ return this.attrs[attr]
+ } else if (this.parent) {
+ return this.parent.findNS(prefix)
+ }
+ }
+}
+
+/**
+ * Recursiverly gets all xmlns defined, in the form of {url:prefix}
+ **/
+Element.prototype.getXmlns = function() {
+ var namespaces = {}
+
+ if (this.parent) {
+ namespaces = this.parent.getXmlns()
+ }
+
+ for (var attr in this.attrs) {
+ var m = attr.match('xmlns:?(.*)')
+ if (this.attrs.hasOwnProperty(attr) && m) {
+ namespaces[this.attrs[attr]] = m[1]
+ }
+ }
+ return namespaces
+}
+
+Element.prototype.setAttrs = function(attrs) {
+ this.attrs = {}
+
+ if (typeof attrs === 'string')
+ this.attrs.xmlns = attrs
+ else if (attrs) {
+ Object.keys(attrs).forEach(function(key) {
+ this.attrs[key] = attrs[key]
+ }, this)
+ }
+}
+
+/**
+ * xmlns can be null, returns the matching attribute.
+ **/
+Element.prototype.getAttr = function(name, xmlns) {
+ if (!xmlns) {
+ return this.attrs[name]
+ }
+
+ var namespaces = this.getXmlns()
+
+ if (!namespaces[xmlns]) {
+ return null
+ }
+
+ return this.attrs[[namespaces[xmlns], name].join(':')]
+}
+
+/**
+ * xmlns can be null
+ **/
+Element.prototype.getChild = function(name, xmlns) {
+ return this.getChildren(name, xmlns)[0]
+}
+
+/**
+ * xmlns can be null
+ **/
+Element.prototype.getChildren = function(name, xmlns) {
+ var result = []
+ for (var i = 0; i < this.children.length; i++) {
+ var child = this.children[i]
+ if (child.getName &&
+ (child.getName() === name) &&
+ (!xmlns || (child.getNS() === xmlns)))
+ result.push(child)
+ }
+ return result
+}
+
+/**
+ * xmlns and recursive can be null
+ **/
+Element.prototype.getChildByAttr = function(attr, val, xmlns, recursive) {
+ return this.getChildrenByAttr(attr, val, xmlns, recursive)[0]
+}
+
+/**
+ * xmlns and recursive can be null
+ **/
+Element.prototype.getChildrenByAttr = function(attr, val, xmlns, recursive) {
+ var result = []
+ for (var i = 0; i < this.children.length; i++) {
+ var child = this.children[i]
+ if (child.attrs &&
+ (child.attrs[attr] === val) &&
+ (!xmlns || (child.getNS() === xmlns)))
+ result.push(child)
+ if (recursive && child.getChildrenByAttr) {
+ result.push(child.getChildrenByAttr(attr, val, xmlns, true))
+ }
+ }
+ if (recursive) {
+ result = [].concat.apply([], result)
+ }
+ return result
+}
+
+Element.prototype.getChildrenByFilter = function(filter, recursive) {
+ var result = []
+ for (var i = 0; i < this.children.length; i++) {
+ var child = this.children[i]
+ if (filter(child))
+ result.push(child)
+ if (recursive && child.getChildrenByFilter){
+ result.push(child.getChildrenByFilter(filter, true))
+ }
+ }
+ if (recursive) {
+ result = [].concat.apply([], result)
+ }
+ return result
+}
+
+Element.prototype.getText = function() {
+ var text = ''
+ for (var i = 0; i < this.children.length; i++) {
+ var child = this.children[i]
+ if ((typeof child === 'string') || (typeof child === 'number')) {
+ text += child
+ }
+ }
+ return text
+}
+
+Element.prototype.getChildText = function(name, xmlns) {
+ var child = this.getChild(name, xmlns)
+ return child ? child.getText() : null
+}
+
+/**
+ * Return all direct descendents that are Elements.
+ * This differs from `getChildren` in that it will exclude text nodes,
+ * processing instructions, etc.
+ */
+Element.prototype.getChildElements = function() {
+ return this.getChildrenByFilter(function(child) {
+ return child instanceof Element
+ })
+}
+
+/*** Builder ***/
+
+/** returns uppermost parent */
+Element.prototype.root = function() {
+ if (this.parent) {
+ return this.parent.root()
+ }
+ return this
+}
+Element.prototype.tree = Element.prototype.root
+
+/** just parent or itself */
+Element.prototype.up = function() {
+ if (this.parent) {
+ return this.parent
+ }
+ return this
+}
+
+Element.prototype._getElement = function(name, attrs) {
+ var element = new Element(name, attrs)
+ return element
+}
+
+/** create child node and return it */
+Element.prototype.c = function(name, attrs) {
+ return this.cnode(this._getElement(name, attrs))
+}
+
+Element.prototype.cnode = function(child) {
+ this.children.push(child)
+ if (typeof child === 'object') {
+ child.parent = this
+ }
+ return child
+}
+
+/** add text node and return element */
+Element.prototype.t = function(text) {
+ this.children.push(text)
+ return this
+}
+
+/*** Manipulation ***/
+
+/**
+ * Either:
+ * el.remove(childEl)
+ * el.remove('author', 'urn:...')
+ */
+Element.prototype.remove = function(el, xmlns) {
+ var filter
+ if (typeof el === 'string') {
+ /* 1st parameter is tag name */
+ filter = function(child) {
+ return !(child.is &&
+ child.is(el, xmlns))
+ }
+ } else {
+ /* 1st parameter is element */
+ filter = function(child) {
+ return child !== el
+ }
+ }
+
+ this.children = this.children.filter(filter)
+
+ return this
+}
+
+/**
+ * To use in case you want the same XML data for separate uses.
+ * Please refrain from this practise unless you know what you are
+ * doing. Building XML with ltx is easy!
+ */
+Element.prototype.clone = function() {
+ var clone = this._getElement(this.name, this.attrs)
+ for (var i = 0; i < this.children.length; i++) {
+ var child = this.children[i]
+ clone.cnode(child.clone ? child.clone() : child)
+ }
+ return clone
+}
+
+Element.prototype.text = function(val) {
+ if (val && this.children.length === 1) {
+ this.children[0] = val
+ return this
+ }
+ return this.getText()
+}
+
+Element.prototype.attr = function(attr, val) {
+ if (((typeof val !== 'undefined') || (val === null))) {
+ if (!this.attrs) {
+ this.attrs = {}
+ }
+ this.attrs[attr] = val
+ return this
+ }
+ return this.attrs[attr]
+}
+
+/*** Serialization ***/
+
+Element.prototype.toString = function() {
+ var s = ''
+ this.write(function(c) {
+ s += c
+ })
+ return s
+}
+
+Element.prototype.toJSON = function() {
+ return {
+ name: this.name,
+ attrs: this.attrs,
+ children: this.children.map(function(child) {
+ return child && child.toJSON ? child.toJSON() : child
+ })
+ }
+}
+
+Element.prototype._addChildren = function(writer) {
+ writer('>')
+ for (var i = 0; i < this.children.length; i++) {
+ var child = this.children[i]
+ /* Skip null/undefined */
+ if (child || (child === 0)) {
+ if (child.write) {
+ child.write(writer)
+ } else if (typeof child === 'string') {
+ writer(escapeXmlText(child))
+ } else if (child.toString) {
+ writer(escapeXmlText(child.toString(10)))
+ }
+ }
+ }
+ writer('</')
+ writer(this.name)
+ writer('>')
+}
+
+Element.prototype.write = function(writer) {
+ writer('<')
+ writer(this.name)
+ for (var k in this.attrs) {
+ var v = this.attrs[k]
+ if (v || (v === '') || (v === 0)) {
+ writer(' ')
+ writer(k)
+ writer('="')
+ if (typeof v !== 'string') {
+ v = v.toString(10)
+ }
+ writer(escapeXml(v))
+ writer('"')
+ }
+ }
+ if (this.children.length === 0) {
+ writer('/>')
+ } else {
+ this._addChildren(writer)
+ }
+}
+
+function escapeXml(s) {
+ return s.
+ replace(/\&/g, '&amp;').
+ replace(/</g, '&lt;').
+ replace(/>/g, '&gt;').
+ replace(/"/g, '&quot;').
+ replace(/"/g, '&apos;')
+}
+
+function escapeXmlText(s) {
+ return s.
+ replace(/\&/g, '&amp;').
+ replace(/</g, '&lt;').
+ replace(/>/g, '&gt;')
+}
+
+exports.Element = Element
+exports.escapeXml = escapeXml
+
+},{}],131:[function(require,module,exports){
+'use strict';
+
+/* Cause browserify to bundle SAX parsers: */
+var parse = require('./parse')
+
+parse.availableSaxParsers.push(parse.bestSaxParser = require('./sax/sax_ltx'))
+
+/* SHIM */
+module.exports = require('./index')
+},{"./index":132,"./parse":133,"./sax/sax_ltx":134}],132:[function(require,module,exports){
+'use strict';
+
+var parse = require('./parse')
+
+/**
+ * The only (relevant) data structure
+ */
+exports.Element = require('./dom-element')
+
+/**
+ * Helper
+ */
+exports.escapeXml = require('./element').escapeXml
+
+/**
+ * DOM parser interface
+ */
+exports.parse = parse.parse
+exports.Parser = parse.Parser
+
+/**
+ * SAX parser interface
+ */
+exports.availableSaxParsers = parse.availableSaxParsers
+exports.bestSaxParser = parse.bestSaxParser
+
+},{"./dom-element":129,"./element":130,"./parse":133}],133:[function(require,module,exports){
+'use strict';
+
+var events = require('events')
+ , util = require('util')
+ , DOMElement = require('./dom-element')
+
+
+exports.availableSaxParsers = []
+exports.bestSaxParser = null
+
+var saxParsers = [
+ './sax/sax_expat.js',
+ './sax/sax_ltx.js',
+ /*'./sax_easysax.js', './sax_node-xml.js',*/
+ './sax/sax_saxjs.js'
+]
+
+saxParsers.forEach(function(modName) {
+ var mod
+ try {
+ mod = require(modName)
+ } catch (e) {
+ /* Silently missing libraries drop for debug:
+ console.error(e.stack || e)
+ */
+ }
+ if (mod) {
+ exports.availableSaxParsers.push(mod)
+ if (!exports.bestSaxParser) {
+ exports.bestSaxParser = mod
+ }
+ }
+})
+
+exports.Parser = function(saxParser) {
+ events.EventEmitter.call(this)
+ var self = this
+
+ var ParserMod = saxParser || exports.bestSaxParser
+ if (!ParserMod) {
+ throw new Error('No SAX parser available')
+ }
+ this.parser = new ParserMod()
+
+ var el
+ this.parser.addListener('startElement', function(name, attrs) {
+ var child = new DOMElement(name, attrs)
+ if (!el) {
+ el = child
+ } else {
+ el = el.cnode(child)
+ }
+ })
+ this.parser.addListener('endElement', function(name) {
+ /* jshint -W035 */
+ if (!el) {
+ /* Err */
+ } else if (name === el.name) {
+ if (el.parent) {
+ el = el.parent
+ } else if (!self.tree) {
+ self.tree = el
+ el = undefined
+ }
+ }
+ /* jshint +W035 */
+ })
+ this.parser.addListener('text', function(str) {
+ if (el) {
+ el.t(str)
+ }
+ })
+ this.parser.addListener('error', function(e) {
+ self.error = e
+ self.emit('error', e)
+ })
+}
+
+util.inherits(exports.Parser, events.EventEmitter)
+
+exports.Parser.prototype.write = function(data) {
+ this.parser.write(data)
+}
+
+exports.Parser.prototype.end = function(data) {
+ this.parser.end(data)
+
+ if (!this.error) {
+ if (this.tree) {
+ this.emit('tree', this.tree)
+ } else {
+ this.emit('error', new Error('Incomplete document'))
+ }
+ }
+}
+
+exports.parse = function(data, saxParser) {
+ var p = new exports.Parser(saxParser)
+ var result = null
+ , error = null
+
+ p.on('tree', function(tree) {
+ result = tree
+ })
+ p.on('error', function(e) {
+ error = e
+ })
+
+ p.write(data)
+ p.end()
+
+ if (error) {
+ throw error
+ } else {
+ return result
+ }
+}
+
+},{"./dom-element":129,"events":6,"util":24}],134:[function(require,module,exports){
+'use strict';
+
+var util = require('util')
+ , events = require('events')
+
+var STATE_TEXT = 0,
+ STATE_IGNORE_TAG = 1,
+ STATE_TAG_NAME = 2,
+ STATE_TAG = 3,
+ STATE_ATTR_NAME = 4,
+ STATE_ATTR_EQ = 5,
+ STATE_ATTR_QUOT = 6,
+ STATE_ATTR_VALUE = 7
+
+var SaxLtx = module.exports = function SaxLtx() {
+ events.EventEmitter.call(this)
+
+ var state = STATE_TEXT, remainder
+ var tagName, attrs, endTag, selfClosing, attrQuote
+ var recordStart = 0
+ var attrName
+
+ this._handleTagOpening = function(endTag, tagName, attrs) {
+ if (!endTag) {
+ this.emit('startElement', tagName, attrs)
+ if (selfClosing) {
+ this.emit('endElement', tagName)
+ }
+ } else {
+ this.emit('endElement', tagName)
+ }
+ }
+
+ this.write = function(data) {
+ /* jshint -W071 */
+ /* jshint -W074 */
+ if (typeof data !== 'string') {
+ data = data.toString()
+ }
+ var pos = 0
+
+ /* Anything from previous write()? */
+ if (remainder) {
+ data = remainder + data
+ pos += remainder.length
+ remainder = null
+ }
+
+ function endRecording() {
+ if (typeof recordStart === 'number') {
+ var recorded = data.slice(recordStart, pos)
+ recordStart = undefined
+ return recorded
+ }
+ }
+
+ for(; pos < data.length; pos++) {
+ var c = data.charCodeAt(pos)
+ //console.log("state", state, "c", c, data[pos])
+ switch(state) {
+ case STATE_TEXT:
+ if (c === 60 /* < */) {
+ var text = endRecording()
+ if (text) {
+ this.emit('text', unescapeXml(text))
+ }
+ state = STATE_TAG_NAME
+ recordStart = pos + 1
+ attrs = {}
+ }
+ break
+ case STATE_TAG_NAME:
+ if (c === 47 /* / */ && recordStart === pos) {
+ recordStart = pos + 1
+ endTag = true
+ } else if (c === 33 /* ! */ || c === 63 /* ? */) {
+ recordStart = undefined
+ state = STATE_IGNORE_TAG
+ } else if (c <= 32 || c === 47 /* / */ || c === 62 /* > */) {
+ tagName = endRecording()
+ pos--
+ state = STATE_TAG
+ }
+ break
+ case STATE_IGNORE_TAG:
+ if (c === 62 /* > */) {
+ state = STATE_TEXT
+ }
+ break
+ case STATE_TAG:
+ if (c === 62 /* > */) {
+ this._handleTagOpening(endTag, tagName, attrs)
+ tagName = undefined
+ attrs = undefined
+ endTag = undefined
+ selfClosing = undefined
+ state = STATE_TEXT
+ recordStart = pos + 1
+ } else if (c === 47 /* / */) {
+ selfClosing = true
+ } else if (c > 32) {
+ recordStart = pos
+ state = STATE_ATTR_NAME
+ }
+ break
+ case STATE_ATTR_NAME:
+ if (c <= 32 || c === 61 /* = */) {
+ attrName = endRecording()
+ pos--
+ state = STATE_ATTR_EQ
+ }
+ break
+ case STATE_ATTR_EQ:
+ if (c === 61 /* = */) {
+ state = STATE_ATTR_QUOT
+ }
+ break
+ case STATE_ATTR_QUOT:
+ if (c === 34 /* " */ || c === 39 /* ' */) {
+ attrQuote = c
+ state = STATE_ATTR_VALUE
+ recordStart = pos + 1
+ }
+ break
+ case STATE_ATTR_VALUE:
+ if (c === attrQuote) {
+ var value = unescapeXml(endRecording())
+ attrs[attrName] = value
+ attrName = undefined
+ state = STATE_TAG
+ }
+ break
+ }
+ }
+
+ if (typeof recordStart === 'number' &&
+ recordStart <= data.length) {
+
+ remainder = data.slice(recordStart)
+ recordStart = 0
+ }
+ }
+
+ /*var origEmit = this.emit
+ this.emit = function() {
+ console.log('ltx', arguments)
+ origEmit.apply(this, arguments)
+ }*/
+}
+util.inherits(SaxLtx, events.EventEmitter)
+
+
+SaxLtx.prototype.end = function(data) {
+ if (data) {
+ this.write(data)
+ }
+
+ /* Uh, yeah */
+ this.write = function() {}
+}
+
+function unescapeXml(s) {
+ return s.
+ replace(/\&(amp|#38);/g, '&').
+ replace(/\&(lt|#60);/g, '<').
+ replace(/\&(gt|#62);/g, '>').
+ replace(/\&(quot|#34);/g, '"').
+ replace(/\&(apos|#39);/g, '\'').
+ replace(/\&(nbsp|#160);/g, '\n')
+}
+
+},{"events":6,"util":24}],135:[function(require,module,exports){
+arguments[4][110][0].apply(exports,arguments)
+},{"dup":110}],136:[function(require,module,exports){
+arguments[4][111][0].apply(exports,arguments)
+},{"./rng":135,"dup":111}],137:[function(require,module,exports){
+/*
+ * Copyright (c) 2014 The WebRTC project authors. All Rights Reserved.
+ *
+ * Use of this source code is governed by a BSD-style license
+ * that can be found in the LICENSE file in the root of the source
+ * tree.
+ */
+
+/* More information about these options at jshint.com/docs/options */
+/* jshint browser: true, camelcase: true, curly: true, devel: true,
+ eqeqeq: true, forin: false, globalstrict: true, node: true,
+ quotmark: single, undef: true, unused: strict */
+/* global mozRTCIceCandidate, mozRTCPeerConnection, Promise,
+mozRTCSessionDescription, webkitRTCPeerConnection, MediaStreamTrack */
+/* exported trace,requestUserMedia */
+
+'use strict';
+
+var getUserMedia = null;
+var attachMediaStream = null;
+var reattachMediaStream = null;
+var webrtcDetectedBrowser = null;
+var webrtcDetectedVersion = null;
+var webrtcMinimumVersion = null;
+
+function trace(text) {
+ // This function is used for logging.
+ if (text[text.length - 1] === '\n') {
+ text = text.substring(0, text.length - 1);
+ }
+ if (window.performance) {
+ var now = (window.performance.now() / 1000).toFixed(3);
+ console.log(now + ': ' + text);
+ } else {
+ console.log(text);
+ }
+}
+
+if (navigator.mozGetUserMedia) {
+ console.log('This appears to be Firefox');
+
+ webrtcDetectedBrowser = 'firefox';
+
+ // the detected firefox version.
+ webrtcDetectedVersion =
+ parseInt(navigator.userAgent.match(/Firefox\/([0-9]+)\./)[1], 10);
+
+ // the minimum firefox version still supported by adapter.
+ webrtcMinimumVersion = 31;
+
+ // The RTCPeerConnection object.
+ window.RTCPeerConnection = function(pcConfig, pcConstraints) {
+ if (webrtcDetectedVersion < 38) {
+ // .urls is not supported in FF < 38.
+ // create RTCIceServers with a single url.
+ if (pcConfig && pcConfig.iceServers) {
+ var newIceServers = [];
+ for (var i = 0; i < pcConfig.iceServers.length; i++) {
+ var server = pcConfig.iceServers[i];
+ if (server.hasOwnProperty('urls')) {
+ for (var j = 0; j < server.urls.length; j++) {
+ var newServer = {
+ url: server.urls[j]
+ };
+ if (server.urls[j].indexOf('turn') === 0) {
+ newServer.username = server.username;
+ newServer.credential = server.credential;
+ }
+ newIceServers.push(newServer);
+ }
+ } else {
+ newIceServers.push(pcConfig.iceServers[i]);
+ }
+ }
+ pcConfig.iceServers = newIceServers;
+ }
+ }
+ return new mozRTCPeerConnection(pcConfig, pcConstraints);
+ };
+
+ // The RTCSessionDescription object.
+ window.RTCSessionDescription = mozRTCSessionDescription;
+
+ // The RTCIceCandidate object.
+ window.RTCIceCandidate = mozRTCIceCandidate;
+
+ // getUserMedia constraints shim.
+ getUserMedia = (webrtcDetectedVersion < 38) ?
+ function(c, onSuccess, onError) {
+ var constraintsToFF37 = function(c) {
+ if (typeof c !== 'object' || c.require) {
+ return c;
+ }
+ var require = [];
+ Object.keys(c).forEach(function(key) {
+ var r = c[key] = (typeof c[key] === 'object') ?
+ c[key] : {ideal: c[key]};
+ if (r.exact !== undefined) {
+ r.min = r.max = r.exact;
+ delete r.exact;
+ }
+ if (r.min !== undefined || r.max !== undefined) {
+ require.push(key);
+ }
+ if (r.ideal !== undefined) {
+ c.advanced = c.advanced || [];
+ var oc = {};
+ oc[key] = {min: r.ideal, max: r.ideal};
+ c.advanced.push(oc);
+ delete r.ideal;
+ if (!Object.keys(r).length) {
+ delete c[key];
+ }
+ }
+ });
+ if (require.length) {
+ c.require = require;
+ }
+ return c;
+ };
+ console.log('spec: ' + JSON.stringify(c));
+ c.audio = constraintsToFF37(c.audio);
+ c.video = constraintsToFF37(c.video);
+ console.log('ff37: ' + JSON.stringify(c));
+ return navigator.mozGetUserMedia(c, onSuccess, onError);
+ } : navigator.mozGetUserMedia.bind(navigator);
+
+ navigator.getUserMedia = getUserMedia;
+
+ // Shim for mediaDevices on older versions.
+ if (!navigator.mediaDevices) {
+ navigator.mediaDevices = {getUserMedia: requestUserMedia,
+ addEventListener: function() { },
+ removeEventListener: function() { }
+ };
+ }
+ navigator.mediaDevices.enumerateDevices =
+ navigator.mediaDevices.enumerateDevices || function() {
+ return new Promise(function(resolve) {
+ var infos = [
+ {kind: 'audioinput', deviceId: 'default', label:'', groupId:''},
+ {kind: 'videoinput', deviceId: 'default', label:'', groupId:''}
+ ];
+ resolve(infos);
+ });
+ };
+
+ if (webrtcDetectedVersion < 41) {
+ // Work around http://bugzil.la/1169665
+ var orgEnumerateDevices =
+ navigator.mediaDevices.enumerateDevices.bind(navigator.mediaDevices);
+ navigator.mediaDevices.enumerateDevices = function() {
+ return orgEnumerateDevices().catch(function(e) {
+ if (e.name === 'NotFoundError') {
+ return [];
+ }
+ throw e;
+ });
+ };
+ }
+ // Attach a media stream to an element.
+ attachMediaStream = function(element, stream) {
+ console.log('Attaching media stream');
+ element.mozSrcObject = stream;
+ };
+
+ reattachMediaStream = function(to, from) {
+ console.log('Reattaching media stream');
+ to.mozSrcObject = from.mozSrcObject;
+ };
+
+} else if (navigator.webkitGetUserMedia) {
+ console.log('This appears to be Chrome');
+
+ webrtcDetectedBrowser = 'chrome';
+
+ // the detected chrome version.
+ webrtcDetectedVersion =
+ parseInt(navigator.userAgent.match(/Chrom(e|ium)\/([0-9]+)\./)[2], 10);
+
+ // the minimum chrome version still supported by adapter.
+ webrtcMinimumVersion = 38;
+
+ // The RTCPeerConnection object.
+ window.RTCPeerConnection = function(pcConfig, pcConstraints) {
+ return new webkitRTCPeerConnection(pcConfig, pcConstraints);
+ };
+ // add promise support
+ ['createOffer', 'createAnswer'].forEach(function(method) {
+ var nativeMethod = webkitRTCPeerConnection.prototype[method];
+ webkitRTCPeerConnection.prototype[method] = function() {
+ var self = this;
+ if (arguments.length < 1 || (arguments.length === 1 &&
+ typeof(arguments[0]) === 'object')) {
+ var opts = arguments.length === 1 ? arguments[0] : undefined;
+ return new Promise(function(resolve, reject) {
+ nativeMethod.apply(self, [resolve, reject, opts]);
+ });
+ } else {
+ return nativeMethod.apply(this, arguments);
+ }
+ };
+ });
+
+ ['setLocalDescription', 'setRemoteDescription',
+ 'addIceCandidate'].forEach(function(method) {
+ var nativeMethod = webkitRTCPeerConnection.prototype[method];
+ webkitRTCPeerConnection.prototype[method] = function() {
+ var args = arguments;
+ var self = this;
+ return new Promise(function(resolve, reject) {
+ nativeMethod.apply(self, [args[0],
+ function() {
+ resolve();
+ if (args.length >= 2) {
+ args[1].apply(null, []);
+ }
+ },
+ function(err) {
+ reject(err);
+ if (args.length >= 3) {
+ args[2].apply(null, [err]);
+ }
+ }]
+ );
+ });
+ };
+ });
+
+ // getUserMedia constraints shim.
+ getUserMedia = function(c, onSuccess, onError) {
+ var constraintsToChrome = function(c) {
+ if (typeof c !== 'object' || c.mandatory || c.optional) {
+ return c;
+ }
+ var cc = {};
+ Object.keys(c).forEach(function(key) {
+ if (key === 'require' || key === 'advanced') {
+ return;
+ }
+ var r = (typeof c[key] === 'object') ? c[key] : {ideal: c[key]};
+ if (r.exact !== undefined && typeof r.exact === 'number') {
+ r.min = r.max = r.exact;
+ }
+ var oldname = function(prefix, name) {
+ if (prefix) {
+ return prefix + name.charAt(0).toUpperCase() + name.slice(1);
+ }
+ return (name === 'deviceId') ? 'sourceId' : name;
+ };
+ if (r.ideal !== undefined) {
+ cc.optional = cc.optional || [];
+ var oc = {};
+ if (typeof r.ideal === 'number') {
+ oc[oldname('min', key)] = r.ideal;
+ cc.optional.push(oc);
+ oc = {};
+ oc[oldname('max', key)] = r.ideal;
+ cc.optional.push(oc);
+ } else {
+ oc[oldname('', key)] = r.ideal;
+ cc.optional.push(oc);
+ }
+ }
+ if (r.exact !== undefined && typeof r.exact !== 'number') {
+ cc.mandatory = cc.mandatory || {};
+ cc.mandatory[oldname('', key)] = r.exact;
+ } else {
+ ['min', 'max'].forEach(function(mix) {
+ if (r[mix] !== undefined) {
+ cc.mandatory = cc.mandatory || {};
+ cc.mandatory[oldname(mix, key)] = r[mix];
+ }
+ });
+ }
+ });
+ if (c.advanced) {
+ cc.optional = (cc.optional || []).concat(c.advanced);
+ }
+ return cc;
+ };
+ console.log('spec: ' + JSON.stringify(c)); // whitespace for alignment
+ c.audio = constraintsToChrome(c.audio);
+ c.video = constraintsToChrome(c.video);
+ console.log('chrome: ' + JSON.stringify(c));
+ return navigator.webkitGetUserMedia(c, onSuccess, onError);
+ };
+ navigator.getUserMedia = getUserMedia;
+
+ // Attach a media stream to an element.
+ attachMediaStream = function(element, stream) {
+ if (typeof element.srcObject !== 'undefined') {
+ element.srcObject = stream;
+ } else if (typeof element.src !== 'undefined') {
+ element.src = URL.createObjectURL(stream);
+ } else {
+ console.log('Error attaching stream to element.');
+ }
+ };
+
+ reattachMediaStream = function(to, from) {
+ to.src = from.src;
+ };
+
+ if (!navigator.mediaDevices) {
+ navigator.mediaDevices = {getUserMedia: requestUserMedia,
+ enumerateDevices: function() {
+ return new Promise(function(resolve) {
+ var kinds = {audio: 'audioinput', video: 'videoinput'};
+ return MediaStreamTrack.getSources(function(devices) {
+ resolve(devices.map(function(device) {
+ return {label: device.label,
+ kind: kinds[device.kind],
+ deviceId: device.id,
+ groupId: ''};
+ }));
+ });
+ });
+ }};
+ // in case someone wants to listen for the devicechange event.
+ navigator.mediaDevices.addEventListener = function() { };
+ navigator.mediaDevices.removeEventListener = function() { };
+ }
+} else if (navigator.mediaDevices && navigator.userAgent.match(
+ /Edge\/(\d+).(\d+)$/)) {
+ console.log('This appears to be Edge');
+ webrtcDetectedBrowser = 'edge';
+
+ webrtcDetectedVersion =
+ parseInt(navigator.userAgent.match(/Edge\/(\d+).(\d+)$/)[2], 10);
+
+ // the minimum version still supported by adapter.
+ webrtcMinimumVersion = 12;
+
+ attachMediaStream = function(element, stream) {
+ element.srcObject = stream;
+ };
+ reattachMediaStream = function(to, from) {
+ to.srcObject = from.srcObject;
+ };
+} else {
+ console.log('Browser does not appear to be WebRTC-capable');
+}
+
+// Returns the result of getUserMedia as a Promise.
+function requestUserMedia(constraints) {
+ return new Promise(function(resolve, reject) {
+ getUserMedia(constraints, resolve, reject);
+ });
+}
+
+if (typeof module !== 'undefined') {
+ module.exports = {
+ RTCPeerConnection: RTCPeerConnection,
+ getUserMedia: getUserMedia,
+ attachMediaStream: attachMediaStream,
+ reattachMediaStream: reattachMediaStream,
+ webrtcDetectedBrowser: webrtcDetectedBrowser,
+ webrtcDetectedVersion: webrtcDetectedVersion,
+ webrtcMinimumVersion: webrtcMinimumVersion
+ //requestUserMedia: not exposed on purpose.
+ //trace: not exposed on purpose.
+ };
+}
+
+},{}],138:[function(require,module,exports){
+'use strict';
+
+var NS = 'urn:xmpp:jingle:transports:ice-udp:1';
+
+
+module.exports = function (stanza) {
+ var types = stanza.utils;
+
+ var ICE = stanza.define({
+ name: '_iceUdp',
+ namespace: NS,
+ element: 'transport',
+ tags: ['jingle-transport'],
+ fields: {
+ transType: {value: 'iceUdp'},
+ pwd: types.attribute('pwd'),
+ ufrag: types.attribute('ufrag')
+ }
+ });
+
+
+ var RemoteCandidate = stanza.define({
+ name: 'remoteCandidate',
+ namespace: NS,
+ element: 'remote-candidate',
+ fields: {
+ component: types.attribute('component'),
+ ip: types.attribute('ip'),
+ port: types.attribute('port')
+ }
+ });
+
+
+ var Candidate = stanza.define({
+ name: '_iceUdpCandidate',
+ namespace: NS,
+ element: 'candidate',
+ fields: {
+ component: types.attribute('component'),
+ foundation: types.attribute('foundation'),
+ generation: types.attribute('generation'),
+ id: types.attribute('id'),
+ ip: types.attribute('ip'),
+ network: types.attribute('network'),
+ port: types.attribute('port'),
+ priority: types.attribute('priority'),
+ protocol: types.attribute('protocol'),
+ relAddr: types.attribute('rel-addr'),
+ relPort: types.attribute('rel-port'),
+ tcpType: types.attribute('tcptype'),
+ type: types.attribute('type')
+ }
+ });
+
+
+ var Fingerprint = stanza.define({
+ name: '_iceFingerprint',
+ namespace: 'urn:xmpp:jingle:apps:dtls:0',
+ element: 'fingerprint',
+ fields: {
+ hash: types.attribute('hash'),
+ setup: types.attribute('setup'),
+ value: types.text(),
+ required: types.boolAttribute('required')
+ }
+ });
+
+ var SctpMap = stanza.define({
+ name: '_sctpMap',
+ namespace: 'urn:xmpp:jingle:transports:dtls-sctp:1',
+ element: 'sctpmap',
+ fields: {
+ number: types.attribute('number'),
+ protocol: types.attribute('protocol'),
+ streams: types.attribute('streams')
+ }
+ });
+
+
+ stanza.extend(ICE, Candidate, 'candidates');
+ stanza.extend(ICE, RemoteCandidate);
+ stanza.extend(ICE, Fingerprint, 'fingerprints');
+ stanza.extend(ICE, SctpMap, 'sctp');
+
+ stanza.withDefinition('content', 'urn:xmpp:jingle:1', function (Content) {
+ stanza.extend(Content, ICE);
+ });
+};
+
+},{}],139:[function(require,module,exports){
+'use strict';
+
+
+module.exports = function (stanza) {
+ var types = stanza.utils;
+
+ var Iq = stanza.define({
+ name: 'iq',
+ namespace: 'jabber:client',
+ element: 'iq',
+ topLevel: true,
+ fields: {
+ lang: types.langAttribute(),
+ id: types.attribute('id'),
+ to: types.attribute('to'),
+ from: types.attribute('from'),
+ type: types.attribute('type')
+ }
+ });
+
+ var toJSON = Iq.prototype.toJSON;
+
+ Iq.prototype.toJSON = function () {
+ var result = toJSON.call(this);
+ result.resultReply = this.resultReply;
+ result.errorReply = this.errorReply;
+ return result;
+ };
+
+ Iq.prototype.resultReply = function (data) {
+ data = data || {};
+ data.to = this.from;
+ data.id = this.id;
+ data.type = 'result';
+ return new Iq(data);
+ };
+
+ Iq.prototype.errorReply = function (data) {
+ data = data || {};
+ data.to = this.from;
+ data.id = this.id;
+ data.type = 'error';
+ return new Iq(data);
+ };
+};
+
+},{}],140:[function(require,module,exports){
+'use strict';
+
+var NS = 'urn:xmpp:jingle:1';
+var ERRNS = 'urn:xmpp:jingle:errors:1';
+var CONDITIONS = ['out-of-order', 'tie-break', 'unknown-session', 'unsupported-info'];
+var REASONS = [
+ 'alternative-session',
+ 'busy',
+ 'cancel',
+ 'connectivity-error',
+ 'decline',
+ 'expired',
+ 'failed-application',
+ 'failed-transport',
+ 'general-error',
+ 'gone',
+ 'incompatible-parameters',
+ 'media-error',
+ 'security-error',
+ 'success',
+ 'timeout',
+ 'unsupported-applications',
+ 'unsupported-transports'
+];
+
+
+module.exports = function (stanza) {
+ var types = stanza.utils;
+
+ var Jingle = stanza.define({
+ name: 'jingle',
+ namespace: NS,
+ element: 'jingle',
+ fields: {
+ action: types.attribute('action'),
+ initiator: types.attribute('initiator'),
+ responder: types.attribute('responder'),
+ sid: types.attribute('sid')
+ }
+ });
+
+
+ var Content = stanza.define({
+ name: '_jingleContent',
+ namespace: NS,
+ element: 'content',
+ fields: {
+ creator: types.attribute('creator'),
+ disposition: types.attribute('disposition', 'session'),
+ name: types.attribute('name'),
+ senders: types.attribute('senders', 'both'),
+ description: {
+ get: function () {
+ var opts = stanza.tagged('jingle-description').map(function (Description) {
+ return Description.prototype._name;
+ });
+ for (var i = 0, len = opts.length; i < len; i++) {
+ if (this._extensions[opts[i]]) {
+ return this._extensions[opts[i]];
+ }
+ }
+ },
+ set: function (value) {
+ var ext = '_' + value.descType;
+ this[ext] = value;
+ }
+ },
+ transport: {
+ get: function () {
+ var opts = stanza.tagged('jingle-transport').map(function (Transport) {
+ return Transport.prototype._name;
+ });
+ for (var i = 0, len = opts.length; i < len; i++) {
+ if (this._extensions[opts[i]]) {
+ return this._extensions[opts[i]];
+ }
+ }
+ },
+ set: function (value) {
+ var ext = '_' + value.transType;
+ this[ext] = value;
+ }
+ }
+ }
+ });
+
+ var Reason = stanza.define({
+ name: 'reason',
+ namespace: NS,
+ element: 'reason',
+ fields: {
+ condition: types.enumSub(NS, REASONS),
+ alternativeSession: {
+ get: function () {
+ return types.getSubText(this.xml, NS, 'alternative-session');
+ },
+ set: function (value) {
+ this.condition = 'alternative-session';
+ types.setSubText(this.xml, NS, 'alternative-session', value);
+ }
+ },
+ text: types.textSub(NS, 'text')
+ }
+ });
+
+
+ stanza.extend(Jingle, Content, 'contents');
+ stanza.extend(Jingle, Reason);
+
+ /*stanza.withStanzaError(function (ErrorStanza) {
+ stanza.add(ErrorStanza, 'jingleCondition', types.enumSub(ERRNS, CONDITIONS));
+ });
+
+ stanza.withIq(function (Iq) {
+ stanza.extend(Iq, Jingle);
+ });*/
+};
+
+},{}],141:[function(require,module,exports){
+'use strict';
+
+var NS = 'urn:xmpp:jingle:apps:rtp:1';
+var FBNS = 'urn:xmpp:jingle:apps:rtp:rtcp-fb:0';
+var HDRNS = 'urn:xmpp:jingle:apps:rtp:rtp-hdrext:0';
+var INFONS = 'urn:xmpp:jingle:apps:rtp:info:1';
+var SSMANS = 'urn:xmpp:jingle:apps:rtp:ssma:0';
+var GROUPNS = 'urn:xmpp:jingle:apps:grouping:0';
+
+
+module.exports = function (stanza) {
+ var types = stanza.utils;
+
+ var Feedback = {
+ get: function () {
+ var existing = types.find(this.xml, FBNS, 'rtcp-fb');
+ var result = [];
+ existing.forEach(function (xml) {
+ result.push({
+ type: types.getAttribute(xml, 'type'),
+ subtype: types.getAttribute(xml, 'subtype')
+ });
+ });
+ existing = types.find(this.xml, FBNS, 'rtcp-fb-trr-int');
+ existing.forEach(function (xml) {
+ result.push({
+ type: types.getAttribute(xml, 'type'),
+ value: types.getAttribute(xml, 'value')
+ });
+ });
+ return result;
+ },
+ set: function (values) {
+ var self = this;
+ var existing = types.find(this.xml, FBNS, 'rtcp-fb');
+ existing.forEach(function (item) {
+ self.xml.removeChild(item);
+ });
+ existing = types.find(this.xml, FBNS, 'rtcp-fb-trr-int');
+ existing.forEach(function (item) {
+ self.xml.removeChild(item);
+ });
+
+ values.forEach(function (value) {
+ var fb;
+ if (value.type === 'trr-int') {
+ fb = types.createElement(FBNS, 'rtcp-fb-trr-int', NS);
+ types.setAttribute(fb, 'type', value.type);
+ types.setAttribute(fb, 'value', value.value);
+ } else {
+ fb = types.createElement(FBNS, 'rtcp-fb', NS);
+ types.setAttribute(fb, 'type', value.type);
+ types.setAttribute(fb, 'subtype', value.subtype);
+ }
+ self.xml.appendChild(fb);
+ });
+ }
+ };
+
+ var Bandwidth = stanza.define({
+ name: 'bandwidth',
+ namespace: NS,
+ element: 'bandwidth',
+ fields: {
+ type: types.attribute('type'),
+ bandwidth: types.text()
+ }
+ });
+
+ var RTP = stanza.define({
+ name: '_rtp',
+ namespace: NS,
+ element: 'description',
+ tags: ['jingle-description'],
+ fields: {
+ descType: {value: 'rtp'},
+ media: types.attribute('media'),
+ ssrc: types.attribute('ssrc'),
+ mux: types.boolSub(NS, 'rtcp-mux'),
+ encryption: {
+ get: function () {
+ var enc = types.find(this.xml, NS, 'encryption');
+ if (!enc.length) {
+ return [];
+ }
+ enc = enc[0];
+
+ var self = this;
+ var data = types.find(enc, NS, 'crypto');
+ var results = [];
+
+ data.forEach(function (xml) {
+ results.push(new Crypto({}, xml, self).toJSON());
+ });
+ return results;
+ },
+ set: function (values) {
+ var enc = types.find(this.xml, NS, 'encryption');
+ if (enc.length) {
+ this.xml.removeChild(enc);
+ }
+
+ if (!values.length) {
+ return;
+ }
+
+ types.setBoolSubAttribute(this.xml, NS, 'encryption', 'required', true);
+ enc = types.find(this.xml, NS, 'encryption')[0];
+
+ var self = this;
+ values.forEach(function (value) {
+ var content = new Crypto(value, null, self);
+ enc.appendChild(content.xml);
+ });
+ }
+ },
+ feedback: Feedback,
+ headerExtensions: {
+ get: function () {
+ var existing = types.find(this.xml, HDRNS, 'rtp-hdrext');
+ var result = [];
+ existing.forEach(function (xml) {
+ result.push({
+ id: types.getAttribute(xml, 'id'),
+ uri: types.getAttribute(xml, 'uri'),
+ senders: types.getAttribute(xml, 'senders')
+ });
+ });
+ return result;
+ },
+ set: function (values) {
+ var self = this;
+ var existing = types.find(this.xml, HDRNS, 'rtp-hdrext');
+ existing.forEach(function (item) {
+ self.xml.removeChild(item);
+ });
+
+ values.forEach(function (value) {
+ var hdr = types.createElement(HDRNS, 'rtp-hdrext', NS);
+ types.setAttribute(hdr, 'id', value.id);
+ types.setAttribute(hdr, 'uri', value.uri);
+ types.setAttribute(hdr, 'senders', value.senders);
+ self.xml.appendChild(hdr);
+ });
+ }
+ }
+ }
+ });
+
+
+ var PayloadType = stanza.define({
+ name: '_payloadType',
+ namespace: NS,
+ element: 'payload-type',
+ fields: {
+ channels: types.attribute('channels'),
+ clockrate: types.attribute('clockrate'),
+ id: types.attribute('id'),
+ maxptime: types.attribute('maxptime'),
+ name: types.attribute('name'),
+ ptime: types.attribute('ptime'),
+ feedback: Feedback,
+ parameters: {
+ get: function () {
+ var result = [];
+ var params = types.find(this.xml, NS, 'parameter');
+ params.forEach(function (param) {
+ result.push({
+ key: types.getAttribute(param, 'name'),
+ value: types.getAttribute(param, 'value')
+ });
+ });
+ return result;
+ },
+ set: function (values) {
+ var self = this;
+ values.forEach(function (value) {
+ var param = types.createElement(NS, 'parameter');
+ types.setAttribute(param, 'name', value.key);
+ types.setAttribute(param, 'value', value.value);
+ self.xml.appendChild(param);
+ });
+ }
+ }
+ }
+ });
+
+
+ var Crypto = stanza.define({
+ name: 'crypto',
+ namespace: NS,
+ element: 'crypto',
+ fields: {
+ cipherSuite: types.attribute('crypto-suite'),
+ keyParams: types.attribute('key-params'),
+ sessionParams: types.attribute('session-params'),
+ tag: types.attribute('tag')
+ }
+ });
+
+
+ var ContentGroup = stanza.define({
+ name: '_group',
+ namespace: GROUPNS,
+ element: 'group',
+ fields: {
+ semantics: types.attribute('semantics'),
+ contents: types.multiSubAttribute(GROUPNS, 'content', 'name')
+ }
+ });
+
+ var SourceGroup = stanza.define({
+ name: '_sourceGroup',
+ namespace: SSMANS,
+ element: 'ssrc-group',
+ fields: {
+ semantics: types.attribute('semantics'),
+ sources: types.multiSubAttribute(SSMANS, 'source', 'ssrc')
+ }
+ });
+
+ var Source = stanza.define({
+ name: '_source',
+ namespace: SSMANS,
+ element: 'source',
+ fields: {
+ ssrc: types.attribute('ssrc'),
+ parameters: {
+ get: function () {
+ var result = [];
+ var params = types.find(this.xml, SSMANS, 'parameter');
+ params.forEach(function (param) {
+ result.push({
+ key: types.getAttribute(param, 'name'),
+ value: types.getAttribute(param, 'value')
+ });
+ });
+ return result;
+ },
+ set: function (values) {
+ var self = this;
+ values.forEach(function (value) {
+ var param = types.createElement(SSMANS, 'parameter');
+ types.setAttribute(param, 'name', value.key);
+ types.setAttribute(param, 'value', value.value);
+ self.xml.appendChild(param);
+ });
+ }
+ }
+ }
+ });
+
+
+ var Mute = stanza.define({
+ name: 'mute',
+ namespace: INFONS,
+ element: 'mute',
+ fields: {
+ creator: types.attribute('creator'),
+ name: types.attribute('name')
+ }
+ });
+
+
+ var Unmute = stanza.define({
+ name: 'unmute',
+ namespace: INFONS,
+ element: 'unmute',
+ fields: {
+ creator: types.attribute('creator'),
+ name: types.attribute('name')
+ }
+ });
+
+
+ stanza.extend(RTP, Bandwidth);
+ stanza.extend(RTP, PayloadType, 'payloads');
+ stanza.extend(RTP, Source, 'sources');
+ stanza.extend(RTP, SourceGroup, 'sourceGroups');
+
+ stanza.withDefinition('content', 'urn:xmpp:jingle:1', function (Content) {
+ stanza.extend(Content, RTP);
+ });
+
+ stanza.withDefinition('jingle', 'urn:xmpp:jingle:1', function (Jingle) {
+ stanza.extend(Jingle, Mute);
+ stanza.extend(Jingle, Unmute);
+ stanza.extend(Jingle, ContentGroup, 'groups');
+ stanza.add(Jingle, 'ringing', types.boolSub(INFONS, 'ringing'));
+ stanza.add(Jingle, 'hold', types.boolSub(INFONS, 'hold'));
+ stanza.add(Jingle, 'active', types.boolSub(INFONS, 'active'));
+ });
+};
+
+},{}],142:[function(require,module,exports){
+/* jshint -W117 */
+'use strict';
+
+var JSM = require('jingle');
+var RTC = require('webrtc-adapter-test');
+var jxt = require('jxt').createRegistry();
+
+jxt.use(require('./stanza/iq.js'));
+jxt.use(require('./stanza/jingle.js'));
+jxt.use(require('./stanza/rtp.js'));
+jxt.use(require('./stanza/iceUdp.js'));
+
+var IqStanza = jxt.getDefinition('iq', 'jabber:client');
+var JingleStanza = jxt.getDefinition('jingle', 'urn:xmpp:jingle:1');
+
+jxt.extend(IqStanza, JingleStanza);
+
+(function($) {
+ Strophe.addConnectionPlugin('jingle', {
+ connection: null,
+ peer_constraints: {},
+ AUTOACCEPT: false,
+ localStream: null,
+ manager: null,
+ RTC: null,
+
+ init: function(conn) {
+ var self = this;
+
+ self.RTC = RTC;
+
+ self.connection = conn;
+
+ if ((RTC.webrtcDetectedVersion < 33 && RTC.webrtcDetectedBrowser === 'firefox') || RTC.webrtcDetectedBrowser === 'chrome') {
+ self.peer_constraints = {
+ mandatory: {
+ 'OfferToReceiveAudio': true,
+ 'OfferToReceiveVideo': true
+ }
+ };
+
+ if (RTC.webrtcDetectedBrowser === 'firefox') {
+ self.peer_constraints.mandatory.MozDontOfferDataChannel = true;
+ }
+ } else {
+ self.peer_constraints = {
+ 'offerToReceiveAudio': true,
+ 'offerToReceiveVideo': true
+ };
+
+ if (RTC.webrtcDetectedBrowser === 'firefox') {
+ self.peer_constraints.mozDontOfferDataChannel = true;
+ }
+ }
+
+ self.manager = new JSM({
+ peerConnectionConstraints: self.peer_constraints,
+ jid: self.connection.jid,
+ selfID: self.connection.jid
+ });
+
+ var events = {
+ 'incoming': 'callincoming.jingle',
+ 'terminated': 'callterminated.jingle',
+ 'peerStreamAdded': 'remotestreamadded.jingle',
+ 'peerStreamRemoved': 'remotestreamremoved.jingle',
+ 'ringing': 'ringing.jingle',
+ 'log:error': 'error.jingle'
+ };
+
+ $.each(events, function(key, val) {
+ self.manager.on(key, function() {
+ $(document).trigger(val, arguments);
+ });
+ });
+
+ self.manager.on('incoming', function(session) {
+ session.on('change:connectionState', function(session, state) {
+ $(document).trigger('iceconnectionstatechange.jingle', [session.sid, session, state]);
+ });
+ });
+
+ if (this.connection.disco) {
+ var i;
+ for (i = 0; i < self.manager.capabilities.length; i++) {
+ self.connection.disco.addFeature(self.manager.capabilities[i]);
+ }
+ }
+ this.connection.addHandler(this.onJingle.bind(this), 'urn:xmpp:jingle:1', 'iq', 'set', null, null);
+
+ this.manager.on('send', function(data) {
+
+ var iq = new IqStanza(data);
+
+ self.connection.send($.parseXML(iq.toString()).getElementsByTagName('iq')[0]);
+ });
+
+ //@TODO add on client unavilable (this.manager.endPeerSessions(peer_jid_full, true))
+ },
+ onJingle: function(iq) {
+ var req = jxt.parse(iq.outerHTML);
+
+ this.manager.process(req);
+
+ return true;
+ },
+ initiate: function(peerjid, stream) { // initiate a new jinglesession to peerjid
+ var session = this.manager.createMediaSession(peerjid);
+
+ session.on('change:connectionState', function(session, state) {
+ $(document).trigger('iceconnectionstatechange.jingle', [session.sid, session, state]);
+ });
+
+ if (stream) {
+ this.localStream = stream;
+ }
+
+ // configure session
+ if (this.localStream) {
+ session.addStream(this.localStream);
+ session.start();
+
+ return session;
+ }
+
+ console.error('No local stream defined');
+ },
+ terminate: function(jid, reason, silent) { // terminate by sessionid (or all sessions)
+ if (typeof jid === 'undefined' || jid === null) {
+ this.manager.endAllSessions(reason, silent);
+ } else {
+ this.manager.endPeerSessions(jid, reason, silent);
+ }
+ },
+ terminateByJid: function(jid) {
+ this.manager.endPeerSessions(jid);
+ },
+ addICEServer: function(server) {
+ this.manager.addICEServer(server);
+ },
+ setICEServers: function(servers) {
+ this.manager.iceServers = servers;
+ },
+ setPeerConstraints: function(constraints) {
+ this.manager.config.peerConnectionConstraints = constraints;
+ }
+ });
+}(jQuery));
+
+},{"./stanza/iceUdp.js":138,"./stanza/iq.js":139,"./stanza/jingle.js":140,"./stanza/rtp.js":141,"jingle":25,"jxt":114,"webrtc-adapter-test":137}]},{},[142]);
diff --git a/build/js/jsxc/lib/strophe.muc.js b/build/js/jsxc/lib/strophe.muc.js
index fe7100e..6262ec3 100644
--- a/build/js/jsxc/lib/strophe.muc.js
+++ b/build/js/jsxc/lib/strophe.muc.js
@@ -353,7 +353,7 @@ Strophe.addConnectionPlugin('muc', {
}).c("query", {
xmlns: Strophe.NS.MUC_OWNER
});
- if (config instanceof Form) {
+ if (Strophe.x && config instanceof Strophe.x.Form) {
config.type = "submit";
iq.cnode(config.toXML());
} else {
@@ -1017,4 +1017,4 @@ Occupant = (function() {
return Occupant;
-})(); \ No newline at end of file
+})();
diff --git a/build/js/jsxc/lib/strophe.x/index.js b/build/js/jsxc/lib/strophe.x/index.js
new file mode 100644
index 0000000..0635096
--- /dev/null
+++ b/build/js/jsxc/lib/strophe.x/index.js
@@ -0,0 +1,845 @@
+// Generated by CoffeeScript 1.8.0
+(function() {
+ var $field, $form, $item, $opt, Field, Form, Item, Option, helper,
+ __slice = [].slice,
+ __bind = function(fn, me){ return function(){ return fn.apply(me, arguments); }; },
+ __indexOf = [].indexOf || function(item) { for (var i = 0, l = this.length; i < l; i++) { if (i in this && this[i] === item) return i; } return -1; };
+
+ helper = {
+ fill: function(src, target, klass) {
+ var f, _i, _len, _results;
+ _results = [];
+ for (_i = 0, _len = src.length; _i < _len; _i++) {
+ f = src[_i];
+ _results.push(target.push(f instanceof klass ? f : new klass(f)));
+ }
+ return _results;
+ },
+ createHtmlFieldCouple: function(f) {
+ var div, id;
+ div = $("<div>");
+ id = "Strophe.x.Field-" + f.type + "-" + f["var"];
+ div.append("<label for='" + id + "'>" + (f.label || '') + "</label>").append($(f.toHTML()).attr("id", id)).append("<br />");
+ return div.children();
+ },
+ getHtmlFields: function(html) {
+ html = $(html);
+ return __slice.call(html.find("input")).concat(__slice.call(html.find("select")), __slice.call(html.find("textarea")));
+ }
+ };
+
+ Form = (function() {
+ Form._types = ["form", "submit", "cancel", "result"];
+
+ function Form(opt) {
+ this.toHTML = __bind(this.toHTML, this);
+ this.toJSON = __bind(this.toJSON, this);
+ this.toXML = __bind(this.toXML, this);
+ var f, i, _i, _j, _len, _len1, _ref, _ref1, _ref2, _ref3;
+ this.fields = [];
+ this.items = [];
+ this.reported = [];
+ if (opt) {
+ if (_ref = opt.type, __indexOf.call(Form._types, _ref) >= 0) {
+ this.type = opt.type;
+ }
+ this.title = opt.title;
+ this.instructions = opt.instructions;
+ helper.fill = function(src, target, klass) {
+ var f, _i, _len, _results;
+ _results = [];
+ for (_i = 0, _len = src.length; _i < _len; _i++) {
+ f = src[_i];
+ _results.push(target.push(f instanceof klass ? f : new klass(f)));
+ }
+ return _results;
+ };
+ if (opt.fields) {
+ if (opt.fields) {
+ helper.fill(opt.fields, this.fields, Field);
+ }
+ } else if (opt.items) {
+ if (opt.items) {
+ helper.fill(opt.items, this.items, Item);
+ }
+ _ref1 = this.items;
+ for (_i = 0, _len = _ref1.length; _i < _len; _i++) {
+ i = _ref1[_i];
+ _ref2 = i.fields;
+ for (_j = 0, _len1 = _ref2.length; _j < _len1; _j++) {
+ f = _ref2[_j];
+ if (!(_ref3 = f["var"], __indexOf.call(this.reported, _ref3) >= 0)) {
+ this.reported.push(f["var"]);
+ }
+ }
+ }
+ }
+ }
+ }
+
+ Form.prototype.type = "form";
+
+ Form.prototype.title = null;
+
+ Form.prototype.instructions = null;
+
+ Form.prototype.toXML = function() {
+ var f, i, r, xml, _i, _j, _k, _len, _len1, _len2, _ref, _ref1, _ref2;
+ xml = $build("x", {
+ xmlns: "jabber:x:data",
+ type: this.type
+ });
+ if (this.title) {
+ xml.c("title").t(this.title.toString()).up();
+ }
+ if (this.instructions) {
+ xml.c("instructions").t(this.instructions.toString()).up();
+ }
+ if (this.fields.length > 0) {
+ _ref = this.fields;
+ for (_i = 0, _len = _ref.length; _i < _len; _i++) {
+ f = _ref[_i];
+ xml.cnode(f.toXML()).up();
+ }
+ } else if (this.items.length > 0) {
+ xml.c("reported");
+ _ref1 = this.reported;
+ for (_j = 0, _len1 = _ref1.length; _j < _len1; _j++) {
+ r = _ref1[_j];
+ xml.c("field", {
+ "var": r
+ }).up();
+ }
+ xml.up();
+ _ref2 = this.items;
+ for (_k = 0, _len2 = _ref2.length; _k < _len2; _k++) {
+ i = _ref2[_k];
+ xml.cnode(i.toXML()).up();
+ }
+ }
+ return xml.tree();
+ };
+
+ Form.prototype.toJSON = function() {
+ var f, i, json, _i, _j, _len, _len1, _ref, _ref1;
+ json = {
+ type: this.type
+ };
+ if (this.title) {
+ json.title = this.title;
+ }
+ if (this.instructions) {
+ json.instructions = this.instructions;
+ }
+ if (this.fields.length > 0) {
+ json.fields = [];
+ _ref = this.fields;
+ for (_i = 0, _len = _ref.length; _i < _len; _i++) {
+ f = _ref[_i];
+ json.fields.push(f.toJSON());
+ }
+ } else if (this.items.length > 0) {
+ json.items = [];
+ json.reported = this.reported;
+ _ref1 = this.items;
+ for (_j = 0, _len1 = _ref1.length; _j < _len1; _j++) {
+ i = _ref1[_j];
+ json.items.push(i.toJSON());
+ }
+ }
+ return json;
+ };
+
+ Form.prototype.toHTML = function() {
+ var f, form, i, _i, _j, _len, _len1, _ref, _ref1;
+ form = $("<form data-type='" + this.type + "'>");
+ if (this.title) {
+ form.append("<h1>" + this.title + "</h1>");
+ }
+ if (this.instructions) {
+ form.append("<p>" + this.instructions + "</p>");
+ }
+ if (this.fields.length > 0) {
+ _ref = this.fields;
+ for (_i = 0, _len = _ref.length; _i < _len; _i++) {
+ f = _ref[_i];
+ (helper.createHtmlFieldCouple(f)).appendTo(form);
+ }
+ } else if (this.items.length > 0) {
+ _ref1 = this.items;
+ for (_j = 0, _len1 = _ref1.length; _j < _len1; _j++) {
+ i = _ref1[_j];
+ ($(i.toHTML())).appendTo(form);
+ }
+ }
+ return form[0];
+ };
+
+ Form.fromXML = function(xml) {
+ var f, fields, i, instr, items, j, r, reported, title;
+ xml = $(xml);
+ f = new Form({
+ type: xml.attr("type")
+ });
+ title = xml.find("title");
+ if (title.length === 1) {
+ f.title = title.text();
+ }
+ instr = xml.find("instructions");
+ if (instr.length === 1) {
+ f.instructions = instr.text();
+ }
+ fields = xml.find("field");
+ items = xml.find("item");
+ if (items.length > 0) {
+ f.items = (function() {
+ var _i, _len, _results;
+ _results = [];
+ for (_i = 0, _len = items.length; _i < _len; _i++) {
+ i = items[_i];
+ _results.push(Item.fromXML(i));
+ }
+ return _results;
+ })();
+ } else if (fields.length > 0) {
+ f.fields = (function() {
+ var _i, _len, _results;
+ _results = [];
+ for (_i = 0, _len = fields.length; _i < _len; _i++) {
+ j = fields[_i];
+ _results.push(Field.fromXML(j));
+ }
+ return _results;
+ })();
+ }
+ reported = xml.find("reported");
+ if (reported.length === 1) {
+ fields = reported.find("field");
+ f.reported = (function() {
+ var _i, _len, _results;
+ _results = [];
+ for (_i = 0, _len = fields.length; _i < _len; _i++) {
+ r = fields[_i];
+ _results.push(($(r)).attr("var"));
+ }
+ return _results;
+ })();
+ }
+ return f;
+ };
+
+ Form.fromHTML = function(html) {
+ var f, field, fields, i, instructions, item, items, j, title, _i, _j, _len, _len1, _ref, _ref1, _ref2;
+ html = $(html);
+ f = new Form({
+ type: html.attr("data-type")
+ });
+ title = html.find("h1").text();
+ if (title) {
+ f.title = title;
+ }
+ instructions = html.find("p").text();
+ if (instructions) {
+ f.instructions = instructions;
+ }
+ items = html.find("fieldset");
+ fields = helper.getHtmlFields(html);
+ if (items.length > 0) {
+ f.items = (function() {
+ var _i, _len, _results;
+ _results = [];
+ for (_i = 0, _len = items.length; _i < _len; _i++) {
+ i = items[_i];
+ _results.push(Item.fromHTML(i));
+ }
+ return _results;
+ })();
+ _ref = f.items;
+ for (_i = 0, _len = _ref.length; _i < _len; _i++) {
+ item = _ref[_i];
+ _ref1 = item.fields;
+ for (_j = 0, _len1 = _ref1.length; _j < _len1; _j++) {
+ field = _ref1[_j];
+ if (!(_ref2 = field["var"], __indexOf.call(f.reported, _ref2) >= 0)) {
+ f.reported.push(field["var"]);
+ }
+ }
+ }
+ } else if (fields.length > 0) {
+ f.fields = (function() {
+ var _k, _len2, _results;
+ _results = [];
+ for (_k = 0, _len2 = fields.length; _k < _len2; _k++) {
+ j = fields[_k];
+ _results.push(Field.fromHTML(j));
+ }
+ return _results;
+ })();
+ }
+ return f;
+ };
+
+ return Form;
+
+ })();
+
+ Field = (function() {
+ Field._types = ["boolean", "fixed", "hidden", "jid-multi", "jid-single", "list-multi", "list-single", "text-multi", "text-private", "text-single"];
+
+ Field._multiTypes = ["list-multi", "jid-multi", "text-multi", "hidden"];
+
+ function Field(opt) {
+ this.toHTML = __bind(this.toHTML, this);
+ this.toXML = __bind(this.toXML, this);
+ this.toJSON = __bind(this.toJSON, this);
+ this.addOptions = __bind(this.addOptions, this);
+ this.addOption = __bind(this.addOption, this);
+ this.addValues = __bind(this.addValues, this);
+ this.addValue = __bind(this.addValue, this);
+ var _ref, _ref1;
+ this.options = [];
+ this.values = [];
+ if (opt) {
+ if (_ref = opt.type, __indexOf.call(Field._types, _ref) >= 0) {
+ this.type = opt.type.toString();
+ }
+ if (opt.desc) {
+ this.desc = opt.desc.toString();
+ }
+ if (opt.label) {
+ this.label = opt.label.toString();
+ }
+ this["var"] = ((_ref1 = opt["var"]) != null ? _ref1.toString() : void 0) || "_no_var_was_defined_";
+ this.required = opt.required === true || opt.required === "true";
+ if (opt.options) {
+ this.addOptions(opt.options);
+ }
+ if (opt.value) {
+ opt.values = [opt.value];
+ }
+ if (opt.values) {
+ this.addValues(opt.values);
+ }
+ }
+ }
+
+ Field.prototype.type = "text-single";
+
+ Field.prototype.desc = null;
+
+ Field.prototype.label = null;
+
+ Field.prototype["var"] = "_no_var_was_defined_";
+
+ Field.prototype.required = false;
+
+ Field.prototype.addValue = function(val) {
+ return this.addValues([val]);
+ };
+
+ Field.prototype.addValues = function(vals) {
+ var multi, v, _ref;
+ multi = (_ref = this.type, __indexOf.call(Field._multiTypes, _ref) >= 0);
+ if (multi || (!multi && vals.length === 1)) {
+ this.values = __slice.call(this.values).concat(__slice.call((function() {
+ var _i, _len, _results;
+ _results = [];
+ for (_i = 0, _len = vals.length; _i < _len; _i++) {
+ v = vals[_i];
+ _results.push(v.toString());
+ }
+ return _results;
+ })()));
+ }
+ return this;
+ };
+
+ Field.prototype.addOption = function(opt) {
+ return this.addOptions([opt]);
+ };
+
+ Field.prototype.addOptions = function(opts) {
+ var o;
+ if (this.type === "list-single" || this.type === "list-multi") {
+ if (typeof opts[0] !== "object") {
+ opts = (function() {
+ var _i, _len, _results;
+ _results = [];
+ for (_i = 0, _len = opts.length; _i < _len; _i++) {
+ o = opts[_i];
+ _results.push(new Option({
+ value: o.toString()
+ }));
+ }
+ return _results;
+ })();
+ }
+ helper.fill(opts, this.options, Option);
+ }
+ return this;
+ };
+
+ Field.prototype.toJSON = function() {
+ var json, o, _i, _len, _ref;
+ json = {
+ type: this.type,
+ "var": this["var"],
+ required: this.required
+ };
+ if (this.desc) {
+ json.desc = this.desc;
+ }
+ if (this.label) {
+ json.label = this.label;
+ }
+ if (this.values) {
+ json.values = this.values;
+ }
+ if (this.options) {
+ json.options = [];
+ _ref = this.options;
+ for (_i = 0, _len = _ref.length; _i < _len; _i++) {
+ o = _ref[_i];
+ json.options.push(o.toJSON());
+ }
+ }
+ return json;
+ };
+
+ Field.prototype.toXML = function() {
+ var attrs, o, v, xml, _i, _j, _len, _len1, _ref, _ref1;
+ attrs = {
+ type: this.type,
+ "var": this["var"]
+ };
+ if (this.label) {
+ attrs.label = this.label;
+ }
+ xml = $build("field", attrs);
+ if (this.desc) {
+ xml.c("desc").t(this.desc).up();
+ }
+ if (this.required) {
+ xml.c("required").up();
+ }
+ if (this.values) {
+ _ref = this.values;
+ for (_i = 0, _len = _ref.length; _i < _len; _i++) {
+ v = _ref[_i];
+ xml.c("value").t(v.toString()).up();
+ }
+ }
+ if (this.options) {
+ _ref1 = this.options;
+ for (_j = 0, _len1 = _ref1.length; _j < _len1; _j++) {
+ o = _ref1[_j];
+ xml.cnode(o.toXML()).up();
+ }
+ }
+ return xml.tree();
+ };
+
+ Field.prototype.toHTML = function() {
+ var el, k, line, o, opt, txt, val, _i, _j, _len, _len1, _ref, _ref1, _ref2;
+ switch (this.type.toLowerCase()) {
+ case 'list-single':
+ case 'list-multi':
+ el = $("<select>");
+ if (this.type === 'list-multi') {
+ el.attr('multiple', 'multiple');
+ }
+ if (this.options.length > 0) {
+ _ref = this.options;
+ for (_i = 0, _len = _ref.length; _i < _len; _i++) {
+ opt = _ref[_i];
+ if (!(opt)) {
+ continue;
+ }
+ o = $(opt.toHTML());
+ _ref1 = this.values;
+ for (_j = 0, _len1 = _ref1.length; _j < _len1; _j++) {
+ k = _ref1[_j];
+ if (k.toString() === opt.value.toString()) {
+ o.attr('selected', 'selected');
+ }
+ }
+ o.appendTo(el);
+ }
+ }
+ break;
+ case 'text-multi':
+ case 'jid-multi':
+ el = $("<textarea>");
+ txt = ((function() {
+ var _k, _len2, _ref2, _results;
+ _ref2 = this.values;
+ _results = [];
+ for (_k = 0, _len2 = _ref2.length; _k < _len2; _k++) {
+ line = _ref2[_k];
+ _results.push(line);
+ }
+ return _results;
+ }).call(this)).join('\n');
+ if (txt) {
+ el.text(txt);
+ }
+ break;
+ case 'text-single':
+ case 'boolean':
+ case 'text-private':
+ case 'hidden':
+ case 'fixed':
+ case 'jid-single':
+ el = $("<input>");
+ if (this.values) {
+ el.val(this.values[0]);
+ }
+ switch (this.type.toLowerCase()) {
+ case 'text-single':
+ el.attr('type', 'text');
+ el.attr('placeholder', this.desc);
+ break;
+ case 'boolean':
+ el.attr('type', 'checkbox');
+ val = (_ref2 = this.values[0]) != null ? typeof _ref2.toString === "function" ? _ref2.toString() : void 0 : void 0;
+ if (val && (val === "true" || val === "1")) {
+ el.attr('checked', 'checked');
+ }
+ break;
+ case 'text-private':
+ el.attr('type', 'password');
+ break;
+ case 'hidden':
+ el.attr('type', 'hidden');
+ break;
+ case 'fixed':
+ el.attr('type', 'text').attr('readonly', 'readonly');
+ break;
+ case 'jid-single':
+ el.attr('type', 'email');
+ }
+ break;
+ default:
+ el = $("<input type='text'>");
+ }
+ el.attr('name', this["var"]);
+ if (this.required) {
+ el.attr('required', this.required);
+ }
+ return el[0];
+ };
+
+ Field.fromXML = function(xml) {
+ var o, v;
+ xml = $(xml);
+ return new Field({
+ type: xml.attr("type"),
+ "var": xml.attr("var"),
+ label: xml.attr("label"),
+ desc: xml.find("desc").text(),
+ required: xml.find("required").length === 1,
+ values: (function() {
+ var _i, _len, _ref, _results;
+ _ref = xml.find(">value");
+ _results = [];
+ for (_i = 0, _len = _ref.length; _i < _len; _i++) {
+ v = _ref[_i];
+ _results.push(($(v)).text());
+ }
+ return _results;
+ })(),
+ options: (function() {
+ var _i, _len, _ref, _results;
+ _ref = xml.find("option");
+ _results = [];
+ for (_i = 0, _len = _ref.length; _i < _len; _i++) {
+ o = _ref[_i];
+ _results.push(Option.fromXML(o));
+ }
+ return _results;
+ })()
+ });
+ };
+
+ Field._htmlElementToFieldType = function(el) {
+ var r, type;
+ el = $(el);
+ switch (el[0].nodeName.toLowerCase()) {
+ case "textarea":
+ type = "text-multi";
+ break;
+ case "select":
+ if (el.attr("multiple") === "multiple") {
+ type = "list-multi";
+ } else {
+ type = "list-single";
+ }
+ break;
+ case "input":
+ switch (el.attr("type")) {
+ case "checkbox":
+ type = "boolean";
+ break;
+ case "email":
+ type = "jid-single";
+ break;
+ case "hidden":
+ type = "hidden";
+ break;
+ case "password":
+ type = "text-private";
+ break;
+ case "text":
+ r = el.attr("readonly") === "readonly";
+ if (r) {
+ type = "fixed";
+ } else {
+ type = "text-single";
+ }
+ }
+ }
+ return type;
+ };
+
+ Field.fromHTML = function(html) {
+ var el, f, txt, type;
+ html = $(html);
+ type = Field._htmlElementToFieldType(html);
+ f = new Field({
+ type: type,
+ "var": html.attr("name"),
+ required: html.attr("required") === "required"
+ });
+ switch (type) {
+ case "list-multi":
+ case "list-single":
+ f.values = (function() {
+ var _i, _len, _ref, _results;
+ _ref = html.find("option:selected");
+ _results = [];
+ for (_i = 0, _len = _ref.length; _i < _len; _i++) {
+ el = _ref[_i];
+ _results.push(($(el)).val());
+ }
+ return _results;
+ })();
+ f.options = (function() {
+ var _i, _len, _ref, _results;
+ _ref = html.find("option");
+ _results = [];
+ for (_i = 0, _len = _ref.length; _i < _len; _i++) {
+ el = _ref[_i];
+ _results.push(Option.fromHTML(el));
+ }
+ return _results;
+ })();
+ break;
+ case "text-multi":
+ case "jid-multi":
+ txt = html.text();
+ if (txt.trim() !== "") {
+ f.values = txt.split('\n');
+ }
+ break;
+ case 'text-single':
+ case 'boolean':
+ case 'text-private':
+ case 'hidden':
+ case 'fixed':
+ case 'jid-single':
+ if (html.val().trim() !== "") {
+ f.values = [html.val()];
+ }
+ }
+ return f;
+ };
+
+ return Field;
+
+ })();
+
+ Option = (function() {
+ function Option(opt) {
+ this.toHTML = __bind(this.toHTML, this);
+ this.toJSON = __bind(this.toJSON, this);
+ this.toXML = __bind(this.toXML, this);
+ if (opt) {
+ if (opt.label) {
+ this.label = opt.label.toString();
+ }
+ if (opt.value) {
+ this.value = opt.value.toString();
+ }
+ }
+ }
+
+ Option.prototype.label = "";
+
+ Option.prototype.value = "";
+
+ Option.prototype.toXML = function() {
+ return $build("option", {
+ label: this.label
+ }).c("value").t(this.value.toString()).tree();
+ };
+
+ Option.prototype.toJSON = function() {
+ return {
+ label: this.label,
+ value: this.value
+ };
+ };
+
+ Option.prototype.toHTML = function() {
+ return ($("<option>")).attr('value', this.value).text(this.label || this.value)[0];
+ };
+
+ Option.fromXML = function(xml) {
+ return new Option({
+ label: ($(xml)).attr("label"),
+ value: ($(xml)).text()
+ });
+ };
+
+ Option.fromHTML = function(html) {
+ return new Option({
+ value: ($(html)).attr("value"),
+ label: ($(html)).text()
+ });
+ };
+
+ return Option;
+
+ })();
+
+ Item = (function() {
+ function Item(opts) {
+ this.toHTML = __bind(this.toHTML, this);
+ this.toJSON = __bind(this.toJSON, this);
+ this.toXML = __bind(this.toXML, this);
+ this.fields = [];
+ if (opts != null ? opts.fields : void 0) {
+ helper.fill(opts.fields, this.fields, Field);
+ }
+ }
+
+ Item.prototype.toXML = function() {
+ var f, xml, _i, _len, _ref;
+ xml = $build("item");
+ _ref = this.fields;
+ for (_i = 0, _len = _ref.length; _i < _len; _i++) {
+ f = _ref[_i];
+ xml.cnode(f.toXML()).up();
+ }
+ return xml.tree();
+ };
+
+ Item.prototype.toJSON = function() {
+ var f, json, _i, _len, _ref;
+ json = {};
+ if (this.fields) {
+ json.fields = [];
+ _ref = this.fields;
+ for (_i = 0, _len = _ref.length; _i < _len; _i++) {
+ f = _ref[_i];
+ json.fields.push(f.toJSON());
+ }
+ }
+ return json;
+ };
+
+ Item.prototype.toHTML = function() {
+ var f, fieldset, _i, _len, _ref;
+ fieldset = $("<fieldset>");
+ _ref = this.fields;
+ for (_i = 0, _len = _ref.length; _i < _len; _i++) {
+ f = _ref[_i];
+ (helper.createHtmlFieldCouple(f)).appendTo(fieldset);
+ }
+ return fieldset[0];
+ };
+
+ Item.fromXML = function(xml) {
+ var f, fields;
+ xml = $(xml);
+ fields = xml.find("field");
+ return new Item({
+ fields: (function() {
+ var _i, _len, _results;
+ _results = [];
+ for (_i = 0, _len = fields.length; _i < _len; _i++) {
+ f = fields[_i];
+ _results.push(Field.fromXML(f));
+ }
+ return _results;
+ })()
+ });
+ };
+
+ Item.fromHTML = function(html) {
+ var f;
+ return new Item({
+ fields: (function() {
+ var _i, _len, _ref, _results;
+ _ref = helper.getHtmlFields(html);
+ _results = [];
+ for (_i = 0, _len = _ref.length; _i < _len; _i++) {
+ f = _ref[_i];
+ _results.push(Field.fromHTML(f));
+ }
+ return _results;
+ })()
+ });
+ };
+
+ return Item;
+
+ })();
+
+ Strophe.x = {
+ Form: Form,
+ Field: Field,
+ Option: Option,
+ Item: Item
+ };
+
+ $form = function(opt) {
+ return new Strophe.x.Form(opt);
+ };
+
+ $field = function(opt) {
+ return new Strophe.x.Field(opt);
+ };
+
+ $opt = function(opt) {
+ return new Strophe.x.Option(opt);
+ };
+
+ $item = function(opts) {
+ return new Strophe.x.Item(opts);
+ };
+
+ Strophe.addConnectionPlugin('x', {
+ init: function(conn) {
+ var _ref, _ref1;
+ Strophe.addNamespace('DATA', 'jabber:x:data');
+ if (((_ref = conn.disco) != null ? _ref.addFeature : void 0) != null) {
+ conn.disco.addFeature(Strophe.NS.DATA);
+ }
+ if (((_ref1 = conn.disco) != null ? _ref1.addNode : void 0) != null) {
+ return conn.disco.addNode(Strophe.NS.DATA, {
+ items: []
+ });
+ }
+ },
+ parseFromResult: function(result) {
+ var _ref;
+ if (result.nodeName.toLowerCase() === "x") {
+ return Form.fromXML(result);
+ } else {
+ return Form.fromXML((_ref = ($(result)).find("x")) != null ? _ref[0] : void 0);
+ }
+ }
+ });
+
+}).call(this);
diff --git a/build/js/jsxc/lib/translation.js b/build/js/jsxc/lib/translation.js
index e53b7a9..4f1a625 100644
--- a/build/js/jsxc/lib/translation.js
+++ b/build/js/jsxc/lib/translation.js
@@ -1 +1 @@
-var I18next = {"de":{"translation":{"Logging_in":"Login läuft…","your_connection_is_unencrypted":"Deine Verbindung ist unverschlüsselt.","your_connection_is_encrypted":"Deine Verbindung ist verschlüsselt.","your_buddy_closed_the_private_connection":"Dein Kontakt hat die private Verbindung getrennt.","start_private":"Privat starten","close_private":"Privat abbrechen","your_buddy_is_verificated":"Dein Kontakt ist verifiziert.","you_have_only_a_subscription_in_one_way":"Der Kontaktstatus ist einseitig.","authentication_query_sent":"Authentifizierungsanfrage gesendet.","your_message_wasnt_send_please_end_your_private_conversation":"Deine Nachricht wurde nicht gesendet. Bitte beende die private Konversation.","unencrypted_message_received":"Unverschlüsselte Nachricht erhalten.","your_message_wasnt_send_because_you_have_no_valid_subscription":"Deine Nachricht wurde nicht gesandt, da der Kontaktstatus einseitig ist.","not_available":"Nicht verfügbar.","no_connection":"Keine Verbindung.","relogin":"Neu anmelden.","trying_to_start_private_conversation":"Versuche private Konversation zu starten.","Verified":"Verifiziert","Unverified":"Unverifiziert","private_conversation_started":"Private Konversation gestartet.","private_conversation_aborted":"Private Konversation abgebrochen.","your_buddy_closed_the_private_conversation_you_should_do_the_same":"Dein Kontakt hat die private Konversation beendet. Das solltest du auch tun!","conversation_is_now_verified":"Konversation ist jetzt verifiziert","authentication_failed":"Authentifizierung fehlgeschlagen.","your_buddy_is_attempting_to_determine_":"Dein Kontakt versucht herauszufinden ob er wirklich mit dir redet.","to_authenticate_to_your_buddy":"Um dich gegenüber deinem Kontakt zu verifizieren ","enter_the_answer_and_click_answer":"gib die Antwort ein und klick auf Antworten.","enter_the_secret":"gib das Geheimnis ein.","Creating_your_private_key_":"Wir werden jetzt deinen privaten Schlüssel generieren. Das kann einige Zeit in Anspruch nehmen.","Authenticating_a_buddy_helps_":"Einen Kontakt zu authentifizieren hilft sicherzustellen, dass die Person mit der du sprichst auch die ist die sie sagt.","How_do_you_want_to_authenticate_your_buddy":"Wie willst du {{bid_name}} (<b>{{bid_jid}}</b>) authentifizieren?","Select_method":"Wähle...","Manual":"Manual","Question":"Frage","Secret":"Geheimnis","To_verify_the_fingerprint_":"Um den Fingerprint zu verifizieren kontaktiere dein Kontakt über einen anderen Kommunikationsweg. Zum Beispiel per Telefonanruf.","Your_fingerprint":"Dein Fingerprint","Buddy_fingerprint":"Sein/Ihr Fingerprint","Close":"Schließen","Compared":"Verglichen","To_authenticate_using_a_question_":"Um die Authentifizierung per Frage durchzuführen, wähle eine Frage bei welcher nur dein Kontakt die Antwort kennt.","Ask":"Frage","To_authenticate_pick_a_secret_":"Um deinen Kontakt zu authentifizieren, wähle ein Geheimnis welches nur deinem Kontakt und dir bekannt ist.","Compare":"Vergleiche","Fingerprints":"Fingerprints","Authentication":"Authentifizierung","Message":"Nachricht","Add_buddy":"Kontakt hinzufügen","rename_buddy":"Kontakt umbenennen","delete_buddy":"Kontakt löschen","Login":"Anmeldung","Username":"Benutzername","Password":"Passwort","Cancel":"Abbrechen","Connect":"Verbinden","Type_in_the_full_username_":"Gib bitte den vollen Benutzernamen und optional ein Alias an.","Alias":"Alias","Add":"Hinzufügen","Subscription_request":"Kontaktanfrage","You_have_a_request_from":"Du hast eine Anfrage von","Deny":"Ablehnen","Approve":"Bestätigen","Remove_buddy":"Kontakt entfernen","You_are_about_to_remove_":"Du bist gerade dabei {{bid_name}} (<b>{{bid_jid}}</b>) von deiner Kontaktliste zu entfernen. Alle Chats werden geschlossen.","Continue_without_chat":"Weiter ohne Chat","Please_wait":"Bitte warten","Login_failed":"Chat-Anmeldung fehlgeschlagen","Sorry_we_cant_authentikate_":"Der Chatserver hat die Anmeldung abgelehnt. Falsches Passwort?","Retry":"Zurück","clear_history":"Lösche Verlauf","New_message_from":"Neue Nachricht von","Should_we_notify_you_":"Sollen wir dich in Zukunft über eingehende Nachrichten informieren, auch wenn dieser Tab nicht im Vordergrund ist?","Please_accept_":"Bitte klick auf den \"Zulassen\" Button oben.","Hide_offline":"Offline ausblenden","Show_offline":"Offline einblenden","About":"Über","dnd":"Beschäftigt","Mute":"Ton aus","Unmute":"Ton an","Subscription":"Bezug","both":"beidseitig","Status":"Status","online":"online","chat":"chat","away":"abwesend","xa":"länger abwesend","offline":"offline","none":"keine","Unknown_instance_tag":"Unbekannter instance tag.","Not_one_of_our_latest_keys":"Nicht einer unserer letzten Schlüssel.","Received_an_unreadable_encrypted_message":"Eine unlesbare verschlüsselte Nachricht erhalten.","Online":"Online","Chatty":"Gesprächig","Away":"Abwesend","Extended_away":"Länger abwesend","Offline":"Offline","Friendship_request":"Kontaktanfrage","Confirm":"Bestätigen","Dismiss":"Ablehnen","Remove":"Löschen","Online_help":"Online Hilfe","FN":"Name","N":" ","FAMILY":"Familienname","GIVEN":"Vorname","NICKNAME":"Spitzname","URL":"URL","ADR":"Adresse","STREET":"Straße","EXTADD":"Zusätzliche Adresse","LOCALITY":"Ortschaft","REGION":"Region","PCODE":"Postleitzahl","CTRY":"Land","TEL":"Telefon","NUMBER":"Nummer","EMAIL":"E-Mail","USERID":" ","ORG":"Organisation","ORGNAME":"Name","ORGUNIT":"Abteilung","TITLE":"Titel","ROLE":"Rolle","BDAY":"Geburtstag","DESC":"Beschreibung","PHOTO":" ","send_message":"Sende Nachricht","get_info":"Benutzerinformationen","Settings":"Einstellungen","Priority":"Priorität","Save":"Speichern","User_settings":"Benutzereinstellungen","A_fingerprint_":"Ein Fingerabdruck wird dazu benutzt deinen Gesprächspartner zu identifizieren.","Your_roster_is_empty_add_a":"Deine Kontaktliste ist leer, füge einen neuen Kontakt ","new_buddy":"hinzu","is":"ist","Login_options":"Anmeldeoptionen","BOSH_url":"BOSH url","Domain":"Domain","Resource":"Ressource","On_login":"Beim Anmelden","Received_an_unencrypted_message":"Unverschlüsselte Nachricht empfangen","Sorry_your_buddy_doesnt_provide_any_information":"Dein Kontakt stellt leider keine Informationen bereit.","Info_about":"Info über","Authentication_aborted":"Authentifizierung abgebrochen.","Authentication_request_received":"Authentifizierungsanfrage empfangen.","Do_you_want_to_display_them":"Möchtest du sie sehen?","Log_in_without_chat":"Anmelden ohne Chat","has_come_online":"ist online gekommen","Unknown_sender":"Unbekannter Sender","You_received_a_message_from_an_unknown_sender":"Du hast eine Nachricht von einem unbekannten Sender erhalten","Please_allow_access_to_microphone_and_camera":"Bitte klick auf den \"Zulassen\" Button oben, um den Zugriff auf Kamera und Mikrofon zu erlauben.","Incoming_call":"Eingehender Anruf","from":"von","Do_you_want_to_accept_the_call_from":"Möchtest Du den Anruf annehmen von","Reject":"Ablehnen","Accept":"Annehmen","hang_up":"Auflegen","snapshot":"Schnappschuss","mute_my_audio":"Mein Ton aus","pause_my_video":"Mein Video pausieren","fullscreen":"Vollbild","Info":"Info","Local_IP":"Lokale IP","Remote_IP":"Remote IP","Local_Fingerprint":"Lokaler Fingerprint","Remote_Fingerprint":"Remote Fingerprint","Video_call_not_possible":"Videoanruf nicht verfügbar. Dein Gesprächspartner unterstützt keine Videotelefonie.","Start_video_call":"Starte Videoanruf","Join_chat":"Gruppe beitreten","Join":"Betreten","Room":"Gruppe","Nickname":"Nickname","left_the_building":"__nickname__ hat die Gruppe verlassen","entered_the_room":"__nickname__ ist der Gruppe beigetreten","is_now_known_as":"__oldNickname__ ist nun unter __newNickname__ bekannt","This_room_is":"Diese Gruppe ist","muc_hidden":{"keyword":"versteckt","description":"kann durch die Suche nicht gefunden werden"},"muc_membersonly":{"keyword":"nur für Mitglieder","description":"du musst auf der Mitgliederliste stehen"},"muc_moderated":{"keyword":"moderiert","description":"Nur Personen die \"Mitspracherecht\" haben dürfen Nachrichten senden"},"muc_nonanonymous":{"keyword":"nicht anonym","description":"deine Jabber ID wird für alle Mitglieder sichtbar sein"},"muc_open":{"keyword":"offen","description":"jeder darf dieser Gruppe beitreten"},"muc_passwordprotected":{"keyword":"passwortgeschützt","description":"du benötigst das korrekte Passwort"},"muc_persistent":{"keyword":"permanent","description":"wird nicht geschlossen, wenn das letzte Mitglied die Gruppe verlässt"},"muc_public":{"keyword":"öffentlich","description":"kann durch die Suche gefunden werden"},"muc_semianonymous":{"keyword":"teilweise anonym","description":"deine Jabber ID wird nur für die Gruppen Administratoren sichtbar sein"},"muc_temporary":{"keyword":"temporär","description":"wird geschlossen, wenn das letzte Mitglied die Gruppe verlässt"},"muc_unmoderated":{"keyword":"nicht moderiert","description":"jeder darf Nachrichten senden"},"muc_unsecured":{"keyword":"ungesichert","description":"es wird kein Passwort benötigt"},"Continue":"Weiter","Server":"Server","Rooms_are_loaded":"Gruppen werden geladen","Could_load_only":"Es konnten nur __count__ Gruppen für die Autovervollständigung geladen werden","muc_explanation":"Bitte trage den Gruppennamen und optional ein Nickname und Passwort ein um einer Gruppe beizutreten","You_already_joined_this_room":"Du bist dieser Gruppe bereits beigetreten","This_room_will_be_closed":"Diese Gruppe wird geschlossen","Room_not_found_":"Es wird eine neue Gruppe erstellt","Loading_room_information":"Informationen über Gruppe werden geladen","Destroy":"Auflösen","Leave":"Verlassen","changed_subject_to":"__nickname__ hat das Thema auf __subject__ geändert","muc_removed_kicked":"Du wurdest aus der Gruppe entfernt","muc_removed_info_kicked":"__nickname__ wurde aus der Gruppe entfernt","muc_removed_banned":"Du wurdest aus der Gruppe ausgeschlossen","muc_removed_info_banned":"__nickname__ wurde aus der Gruppe ausgeschlossen","muc_removed_affiliation":"Du wurdest aus der Gruppe entfernt wegen einer Änderung deines Mitgliedstatus","muc_removed_info_affiliation":"__nickname__ wurde aus der Gruppe entfernt wegen einer Änderung seines Mitgliedstatus","muc_removed_membersonly":"Diese Gruppe erlaubt jetzt nur noch eingetragene Mitglieder und da du nicht dazugehörst, wurdest du aus der Gruppen entfernt","muc_removed_info_membersonly":"Diese Gruppe erlaubt jetzt nur noch eingetragene Mitglieder und __nickname__ gehört nicht dazu, daher wurde er aus der Gruppe entfernt","muc_removed_shutdown":"Du wurdest aus der Gruppe entfernt, da der MUC Server heruntergefahren wird","Reason":"Grund","message_not_send":"Deine Nachricht wurde aufgrund eines Fehlers nicht versandt","message_not_send_item-not-found":"Deine Nachricht wurde nicht versandt, da der Raum nicht mehr existiert","message_not_send_forbidden":"Deine Nachricht wurde nicht versandt, da du kein \"Mitspracherecht\" hast","message_not_send_not-acceptable":"Deine Nachricht wurde nicht versandt, da du kein Mitglied dieser Gruppe bist","This_room_has_been_closed":"Diese Gruppe wurde geschlossen","Room_logging_is_enabled":"Gesprächsverlauf kann öffentlich einsehbar sein","A_password_is_required":"Es wird ein Passwort benötigt","You_are_not_on_the_member_list":"Du bist kein eingetragenes Mitglied","You_are_banned_from_this_room":"Du wurdest von dieser Gruppe ausgeschlossen","Your_desired_nickname_":"Dein gewünschter Nickname wird bereits verwendet. Bitte wähle einen anderen.","The_maximum_number_":"Die maximale Anzahl der Mitglieder wurde erreicht.","This_room_is_locked_":"Diese Gruppe ist gesperrt","You_are_not_allowed_to_create_":"Du darfst keine neue Gruppe erstellen","Carbon_copy":null,"Enable":"Aktivieren"}},"el":{"translation":{"Logging_in":null,"your_connection_is_unencrypted":null,"your_connection_is_encrypted":null,"your_buddy_closed_the_private_connection":null,"start_private":null,"close_private":null,"your_buddy_is_verificated":null,"you_have_only_a_subscription_in_one_way":null,"authentication_query_sent":null,"your_message_wasnt_send_please_end_your_private_conversation":null,"unencrypted_message_received":null,"your_message_wasnt_send_because_you_have_no_valid_subscription":null,"not_available":null,"no_connection":null,"relogin":null,"trying_to_start_private_conversation":null,"Verified":null,"Unverified":null,"private_conversation_started":null,"private_conversation_aborted":null,"your_buddy_closed_the_private_conversation_you_should_do_the_same":null,"conversation_is_now_verified":null,"authentication_failed":null,"your_buddy_is_attempting_to_determine_":null,"to_authenticate_to_your_buddy":null,"enter_the_answer_and_click_answer":null,"enter_the_secret":null,"Creating_your_private_key_":null,"Authenticating_a_buddy_helps_":null,"How_do_you_want_to_authenticate_your_buddy":null,"Select_method":null,"Manual":null,"Question":null,"Secret":null,"To_verify_the_fingerprint_":null,"Your_fingerprint":null,"Buddy_fingerprint":null,"Close":null,"Compared":null,"To_authenticate_using_a_question_":null,"Ask":null,"To_authenticate_pick_a_secret_":null,"Compare":null,"Fingerprints":null,"Authentication":null,"Message":null,"Add_buddy":null,"rename_buddy":null,"delete_buddy":null,"Login":null,"Username":null,"Password":null,"Cancel":null,"Connect":null,"Type_in_the_full_username_":null,"Alias":null,"Add":null,"Subscription_request":null,"You_have_a_request_from":null,"Deny":null,"Approve":null,"Remove_buddy":null,"You_are_about_to_remove_":null,"Continue_without_chat":null,"Please_wait":null,"Login_failed":null,"Sorry_we_cant_authentikate_":null,"Retry":null,"clear_history":null,"New_message_from":null,"Should_we_notify_you_":null,"Please_accept_":null,"Hide_offline":null,"Show_offline":null,"About":null,"dnd":null,"Mute":null,"Unmute":null,"Subscription":null,"both":null,"Status":null,"online":null,"chat":null,"away":null,"xa":null,"offline":null,"none":null,"Unknown_instance_tag":null,"Not_one_of_our_latest_keys":null,"Received_an_unreadable_encrypted_message":null,"Online":null,"Chatty":null,"Away":null,"Extended_away":null,"Offline":null,"Friendship_request":null,"Confirm":null,"Dismiss":null,"Remove":null,"Online_help":null,"FN":null,"N":null,"FAMILY":null,"GIVEN":null,"NICKNAME":null,"URL":null,"ADR":null,"STREET":null,"EXTADD":null,"LOCALITY":null,"REGION":null,"PCODE":null,"CTRY":null,"TEL":null,"NUMBER":null,"EMAIL":null,"USERID":null,"ORG":null,"ORGNAME":null,"ORGUNIT":null,"TITLE":null,"ROLE":null,"BDAY":null,"DESC":null,"PHOTO":null,"send_message":null,"get_info":null,"Settings":null,"Priority":null,"Save":null,"User_settings":null,"A_fingerprint_":null,"Your_roster_is_empty_add_a":null,"new_buddy":null,"is":null,"Login_options":null,"BOSH_url":null,"Domain":null,"Resource":null,"On_login":null,"Received_an_unencrypted_message":null,"Sorry_your_buddy_doesnt_provide_any_information":null,"Info_about":null,"Authentication_aborted":null,"Authentication_request_received":null,"Do_you_want_to_display_them":null,"Log_in_without_chat":null,"has_come_online":null,"Unknown_sender":null,"You_received_a_message_from_an_unknown_sender":null,"Please_allow_access_to_microphone_and_camera":null,"Incoming_call":null,"from":null,"Do_you_want_to_accept_the_call_from":null,"Reject":null,"Accept":null,"hang_up":null,"snapshot":null,"mute_my_audio":null,"pause_my_video":null,"fullscreen":null,"Info":null,"Local_IP":null,"Remote_IP":null,"Local_Fingerprint":null,"Remote_Fingerprint":null,"Video_call_not_possible":null,"Start_video_call":null,"Join_chat":null,"Join":null,"Room":null,"Nickname":null,"left_the_building":null,"entered_the_room":null,"is_now_known_as":null,"This_room_is":null,"muc_hidden":{"keyword":null,"description":null},"muc_membersonly":{"keyword":null,"description":null},"muc_moderated":{"keyword":null,"description":null},"muc_nonanonymous":{"keyword":null,"description":null},"muc_open":{"keyword":null,"description":null},"muc_passwordprotected":{"keyword":null,"description":null},"muc_persistent":{"keyword":null,"description":null},"muc_public":{"keyword":null,"description":null},"muc_semianonymous":{"keyword":null,"description":null},"muc_temporary":{"keyword":null,"description":null},"muc_unmoderated":{"keyword":null,"description":null},"muc_unsecured":{"keyword":null,"description":null},"Continue":null,"Server":null,"Rooms_are_loaded":null,"Could_load_only":null,"muc_explanation":null,"You_already_joined_this_room":null,"This_room_will_be_closed":null,"Room_not_found_":null,"Loading_room_information":null,"Destroy":null,"Leave":null,"changed_subject_to":null,"muc_removed_kicked":null,"muc_removed_info_kicked":null,"muc_removed_banned":null,"muc_removed_info_banned":null,"muc_removed_affiliation":null,"muc_removed_info_affiliation":null,"muc_removed_membersonly":null,"muc_removed_info_membersonly":null,"muc_removed_shutdown":null,"Reason":null,"message_not_send":null,"message_not_send_item-not-found":null,"message_not_send_forbidden":null,"message_not_send_not-acceptable":null,"This_room_has_been_closed":null,"Room_logging_is_enabled":null,"A_password_is_required":null,"You_are_not_on_the_member_list":null,"You_are_banned_from_this_room":null,"Your_desired_nickname_":null,"The_maximum_number_":null,"This_room_is_locked_":null,"You_are_not_allowed_to_create_":null,"Carbon_copy":null,"Enable":null}},"en":{"translation":{"Logging_in":"Logging in…","your_connection_is_unencrypted":"Your connection is unencrypted.","your_connection_is_encrypted":"Your connection is encrypted.","your_buddy_closed_the_private_connection":"Your contact closed the private connection.","start_private":"Start private","close_private":"Close private","your_buddy_is_verificated":"Your contact is verified.","you_have_only_a_subscription_in_one_way":"You only have a one-way subscription.","authentication_query_sent":"Authentication query sent.","your_message_wasnt_send_please_end_your_private_conversation":"Your message was not sent. Please end your private conversation.","unencrypted_message_received":"Unencrypted message received","your_message_wasnt_send_because_you_have_no_valid_subscription":"Your message was not sent because you have no valid subscription.","not_available":"Not available","no_connection":"No connection!","relogin":"relogin","trying_to_start_private_conversation":"Trying to start private conversation!","Verified":"Verified","Unverified":"Unverified","private_conversation_started":"Private conversation started.","private_conversation_aborted":"Private conversation aborted!","your_buddy_closed_the_private_conversation_you_should_do_the_same":"Your contact closed the private conversation! You should do the same.","conversation_is_now_verified":"Conversation is now verified.","authentication_failed":"Authentication failed.","your_buddy_is_attempting_to_determine_":"You contact is attempting to determine if they are really talking to you.","to_authenticate_to_your_buddy":"To authenticate to your contact, ","enter_the_answer_and_click_answer":"enter the answer and click Answer.","enter_the_secret":"enter the secret.","Creating_your_private_key_":"Creating your private key; this may take a while.","Authenticating_a_buddy_helps_":"Authenticating a contact helps ensure that the person you are talking to is really the one they claim to be.","How_do_you_want_to_authenticate_your_buddy":"How do you want to authenticate {{bid_name}} (<b>{{bid_jid}}</b>)?","Select_method":"Select method...","Manual":"Manual","Question":"Question","Secret":"Secret","To_verify_the_fingerprint_":"To verify the fingerprint, contact your contact via some other trustworthy channel, such as the telephone.","Your_fingerprint":"Your fingerprint","Buddy_fingerprint":"Contact fingerprint","Close":"Close","Compared":"Compared","To_authenticate_using_a_question_":"To authenticate using a question, pick a question whose answer is known only you and your contact.","Ask":"Ask","To_authenticate_pick_a_secret_":"To authenticate, pick a secret known only to you and your contact.","Compare":"Compare","Fingerprints":"Fingerprints","Authentication":"Authentication","Message":"Message","Add_buddy":"Add contact","rename_buddy":"rename contact","delete_buddy":"delete contact","Login":"Login","Username":"Username","Password":"Password","Cancel":"Cancel","Connect":"Connect","Type_in_the_full_username_":"Type in the full username and an optional alias.","Alias":"Alias","Add":"Add","Subscription_request":"Subscription request","You_have_a_request_from":"You have a request from","Deny":"Deny","Approve":"Approve","Remove_buddy":"Remove contact","You_are_about_to_remove_":"You are about to remove {{bid_name}} (<b>{{bid_jid}}</b>) from your contact list. All related chats will be closed.","Continue_without_chat":"Continue without chat","Please_wait":"Please wait","Login_failed":"Chat login failed","Sorry_we_cant_authentikate_":"Authentication failed with the chat server. Maybe the password is wrong?","Retry":"Back","clear_history":"Clear history","New_message_from":"New message from","Should_we_notify_you_":"Should we notify you about new messages in the future?","Please_accept_":"Please click the \"Allow\" button at the top.","Hide_offline":"Hide offline contacts","Show_offline":"Show offline contacts","About":"About","dnd":"Do Not Disturb","Mute":"Mute","Unmute":"Unmute","Subscription":"Subscription","both":"both","Status":"Status","online":"online","chat":"chat","away":"away","xa":"extended away","offline":"offline","none":"none","Unknown_instance_tag":"Unknown instance tag.","Not_one_of_our_latest_keys":"Not one of our latest keys.","Received_an_unreadable_encrypted_message":"Received an unreadable encrypted message.","Online":"Online","Chatty":"Chatty","Away":"Away","Extended_away":"Extended away","Offline":"Offline","Friendship_request":"Contact request","Confirm":"Confirm","Dismiss":"Dismiss","Remove":"Remove","Online_help":"Online help","FN":"Full name","N":" ","FAMILY":"Family name","GIVEN":"Given name","NICKNAME":"Nickname","URL":"URL","ADR":"Address","STREET":"Street Address","EXTADD":"Extended Address","LOCALITY":"Locality","REGION":"Region","PCODE":"Postal Code","CTRY":"Country","TEL":"Telephone","NUMBER":"Number","EMAIL":"Email","USERID":" ","ORG":"Organization","ORGNAME":"Name","ORGUNIT":"Unit","TITLE":"Job title","ROLE":"Role","BDAY":"Birthday","DESC":"Description","PHOTO":" ","send_message":"Send message","get_info":"Show information","Settings":"Settings","Priority":"Priority","Save":"Save","User_settings":"User settings","A_fingerprint_":"A fingerprint is used to make sure that the person you are talking to is who he or she is saying.","Your_roster_is_empty_add_a":"Your roster is empty, add a ","new_buddy":"new contact","is":"is","Login_options":"Login options","BOSH_url":"BOSH URL","Domain":"Domain","Resource":"Resource","On_login":"On login","Received_an_unencrypted_message":"Received an unencrypted message","Sorry_your_buddy_doesnt_provide_any_information":"Sorry, your contact does not provide any information.","Info_about":"Info about","Authentication_aborted":"Authentication aborted.","Authentication_request_received":"Authentication request received.","Do_you_want_to_display_them":"Do you want to display them?","Log_in_without_chat":"Log in without chat","has_come_online":"has come online","Unknown_sender":"Unknown sender","You_received_a_message_from_an_unknown_sender":"You received a message from an unknown sender","Please_allow_access_to_microphone_and_camera":"Please click the \"Allow\" button at the top, to allow access to microphone and camera.","Incoming_call":"Incoming call","from":"from","Do_you_want_to_accept_the_call_from":"Do you want to accept the call from","Reject":"Reject","Accept":"Accept","hang_up":"hang up","snapshot":"snapshot","mute_my_audio":"mute my audio","pause_my_video":"pause my video","fullscreen":"fullscreen","Info":"Info","Local_IP":"Local IP","Remote_IP":"Remote IP","Local_Fingerprint":"Local fingerprint","Remote_Fingerprint":"Remote fingerprint","Video_call_not_possible":"Video call not possible. Your contact does not support video calls.","Start_video_call":"Start video call","Join_chat":"Join chat","Join":"Join","Room":"Room","Nickname":"Nickname","left_the_building":"__nickname__ left the building","entered_the_room":"__nickname__ entered the room","is_now_known_as":"__oldNickname__ is now known as __newNickname__","This_room_is":"This room is","muc_hidden":{"keyword":"hidden","description":"can not be found through search"},"muc_membersonly":{"keyword":"members-only","description":"you need to be on the member list"},"muc_moderated":{"keyword":"moderated","description":"only persons with \"voice\" are allowed to send messages"},"muc_nonanonymous":{"keyword":"non-anonymous","description":"your jabber id is exposed to all other occupants"},"muc_open":{"keyword":"open","description":"everyone is allowed to join"},"muc_passwordprotected":{"keyword":"password-protected","description":"you need to provide the correct password"},"muc_persistent":{"keyword":"persistent","description":"will not be destroyed if the last occupant left"},"muc_public":{"keyword":"public","description":"can be found through search"},"muc_semianonymous":{"keyword":"semi-anonymous","description":"your jabber id is only exposed to room admins"},"muc_temporary":{"keyword":"temporary","description":"will be destroyed if the last occupant left"},"muc_unmoderated":{"keyword":"unmoderated","description":"everyone is allowed to send messages"},"muc_unsecured":{"keyword":"unsecured","description":"you need no password to enter"},"Continue":"Continue","Server":"Server","Rooms_are_loaded":"Rooms are loaded","Could_load_only":"Could load only __count__ rooms for autocomplete","muc_explanation":"Please enter room name and optional a nickname and password to join a chat","You_already_joined_this_room":"You already joined this room","This_room_will_be_closed":"This room will be closed","Room_not_found_":"A new room will be created","Loading_room_information":"Loading room information","Destroy":"Destroy","Leave":"Leave","changed_subject_to":"__nickname__ changed the room subject to \"__subject__\"","muc_removed_kicked":"You have been kicked from the room","muc_removed_info_kicked":"__nickname__ has been kicked from the room","muc_removed_banned":"You have been banned from the room","muc_removed_info_banned":"__nickname__ has been banned from the room","muc_removed_affiliation":"You have been removed from the room, because of an affiliation change","muc_removed_info_affiliation":"__nickname__ has been removed from the room, because of an affiliation change","muc_removed_membersonly":"You have been removed from the room, because the room has been changed to members-only and you are no member","muc_removed_info_membersonly":"__nickname__ has been removed from the room, because the room has been changed to members-only and you are no member","muc_removed_shutdown":"You have been removed from the room, because the MUC service is being shut down","Reason":"Reason","message_not_send":"Your message was not send because of an error","message_not_send_item-not-found":"Your message was not send because this room does not exist","message_not_send_forbidden":"Your message was not send because you have no voice in this room","message_not_send_not-acceptable":"Your message was not send because you are no occupant of this room","This_room_has_been_closed":"This room has been closed","Room_logging_is_enabled":"Room logging is enabled","A_password_is_required":"A password is required","You_are_not_on_the_member_list":"You are not on the member list","You_are_banned_from_this_room":"You are banned from this room","Your_desired_nickname_":"Your desired nickname is already in use. Please choose another","The_maximum_number_":"The maximum number of user is reached in this room","This_room_is_locked_":"This room is locked","You_are_not_allowed_to_create_":"You are not allowed to create a room","Carbon_copy":"Carbon copy","Enable":"Enable"}},"es":{"translation":{"Logging_in":"Por favor, espere...","your_connection_is_unencrypted":"Su conexión no está cifrada.","your_connection_is_encrypted":"Su conexión está cifrada.","your_buddy_closed_the_private_connection":"Su amigo ha cerrado la conexión privada.","start_private":"Iniciar privado","close_private":"Cerrar privado","your_buddy_is_verificated":"Tu amigo está verificado.","you_have_only_a_subscription_in_one_way":"Sólo tienes una suscripción de un modo.","authentication_query_sent":"Consulta de verificación enviada.","your_message_wasnt_send_please_end_your_private_conversation":"Su mensaje no fue enviado. Por favor, termine su conversación privada.","unencrypted_message_received":"Mensaje no cifrado recibido:","your_message_wasnt_send_because_you_have_no_valid_subscription":"Su mensaje no se ha enviado, porque usted no tiene suscripción válida.","not_available":"No disponible","no_connection":"Sin conexión!","relogin":"iniciar sesión nuevamente","trying_to_start_private_conversation":"Intentando iniciar una conversación privada!","Verified":"Verificado","Unverified":"No verificado","private_conversation_started":"se inició una conversación privada.","private_conversation_aborted":"Conversación privada abortada!","your_buddy_closed_the_private_conversation_you_should_do_the_same":"Su amigo cerró la conversación privada! Usted debería hacer lo mismo.","conversation_is_now_verified":"La conversación es ahora verificada.","authentication_failed":"Fallo la verificación.","your_buddy_is_attempting_to_determine_":"Tu amigo está tratando de determinar si él o ella está realmente hablando con usted.","to_authenticate_to_your_buddy":"Para autenticar a su amigo, ","enter_the_answer_and_click_answer":"introduce la respuesta y haga clic en Contestar.","enter_the_secret":"especifique el secreto.","Creating_your_private_key_":"Ahora vamos a crear su clave privada. Esto puede tomar algún tiempo.","Authenticating_a_buddy_helps_":"Autenticación de un amigo ayuda a garantizar que la persona que está hablando es quien él o ella está diciendo.","How_do_you_want_to_authenticate_your_buddy":"¿Cómo desea autenticar {{bid_name}} (<b>{{bid_jid}}</b>)?","Select_method":"Escoja un método...","Manual":"Manual","Question":"Pregunta","Secret":"Secreto","To_verify_the_fingerprint_":"Para verificar la firma digital, póngase en contacto con su amigo a través de algún otro canal autenticado, como el teléfono.","Your_fingerprint":"Tu firma digital","Buddy_fingerprint":"firma digital de tu amigo","Close":"Cerrar","Compared":"Comparado","To_authenticate_using_a_question_":"Para autenticar mediante una pregunta, elegir una pregunta cuya respuesta se conoce sólo usted y su amigo.","Ask":"Preguntar","To_authenticate_pick_a_secret_":"Para autenticar, elija un secreto conocido sólo por usted y su amigo.","Compare":"Comparar","Fingerprints":"Firmas digitales","Authentication":"Autenticación","Message":"Mensaje","Add_buddy":"Añadir amigo","rename_buddy":"renombrar amigo","delete_buddy":"eliminar amigo","Login":"Iniciar Sesión","Username":"Usuario","Password":"Contraseña","Cancel":"Cancelar","Connect":"Conectar","Type_in_the_full_username_":"Escriba el usuario completo y un alias opcional.","Alias":"Alias","Add":"Añadir","Subscription_request":"Solicitud de suscripción","You_have_a_request_from":"Tienes una petición de","Deny":"Rechazar","Approve":"Aprobar","Remove_buddy":"Eliminar amigo","You_are_about_to_remove_":"Vas a eliminar a {{bid_name}} (<b>{{bid_jid}}</b>) de tu lista de amigos. Todas las conversaciones relacionadas serán cerradas.","Continue_without_chat":"Continuar","Please_wait":"Espere por favor","Login_failed":"Fallo el inicio de sesión","Sorry_we_cant_authentikate_":"Lo sentimos, no podemos autentificarlo en nuestro servidor de chat. ¿Tal vez la contraseña es incorrecta?","Retry":"Reintentar","clear_history":"Borrar el historial","New_message_from":"Nuevo mensaje de","Should_we_notify_you_":"¿Debemos notificarle sobre nuevos mensajes en el futuro?","Please_accept_":"Por favor, haga clic en el botón \"Permitir\" en la parte superior.","Hide_offline":"Ocultar contactos desconectados","Show_offline":"Mostrar contactos desconectados","About":"Acerca de","dnd":"No Molestar","Mute":"Desactivar sonido","Unmute":"Activar sonido","Subscription":"Suscripción","both":"ambos","Status":"Estado","online":"en línea","chat":"chat","away":"ausente","xa":"mas ausente","offline":"desconectado","none":"nadie","Unknown_instance_tag":"Etiqueta de instancia desconocida.","Not_one_of_our_latest_keys":"No de nuestra ultima tecla.","Received_an_unreadable_encrypted_message":"Se recibió un mensaje cifrado ilegible.","Online":"En linea","Chatty":"Hablador","Away":"Ausente","Extended_away":"Mas ausente","Offline":"Desconectado","Friendship_request":"Solicitud de amistad","Confirm":"Confirmar","Dismiss":"Rechazar","Remove":"Eliminar","Online_help":"Ayuda en línea","FN":"Nombre completo ","N":" ","FAMILY":"Apellido","GIVEN":"Nombre","NICKNAME":"Apodar","URL":"URL","ADR":"Dirección","STREET":"Calle","EXTADD":"Extendido dirección","LOCALITY":"Población","REGION":"Región","PCODE":"Código postal","CTRY":"País","TEL":"Teléfono","NUMBER":"Número","EMAIL":"Emilio","USERID":" ","ORG":"Organización","ORGNAME":"Nombre","ORGUNIT":"Departamento","TITLE":"Título","ROLE":"Rol","BDAY":"Cumpleaños","DESC":"Descripción","PHOTO":" ","send_message":"mandar un texto","get_info":"obtener información","Settings":"Ajustes","Priority":"Prioridad","Save":"Guardar","User_settings":"Configuración de usuario","A_fingerprint_":"La huella digital se utiliza para que puedas estar seguro que la persona con la que estas hablando es quien realmente dice ser","Your_roster_is_empty_add_a":"Tu lista de amigos esta vacia","new_buddy":"Nuevo amigo","is":"es","Login_options":"Opciones de login","BOSH_url":"BOSH url","Domain":"Dominio","Resource":"Recurso","On_login":"Iniciar sesión","Received_an_unencrypted_message":"Recibe un mensaje no cifrado","Sorry_your_buddy_doesnt_provide_any_information":"Lo sentimos, su amigo no provee ninguna información.","Info_about":"Info acerca de","Authentication_aborted":"Autenticación abortada","Authentication_request_received":"Pedido de autenticación recibido.","Do_you_want_to_display_them":"¿Quiere mostrarlos?","Log_in_without_chat":"Ingresar sin chat","has_come_online":"se ha conectado","Unknown_sender":"Remitente desconocido","You_received_a_message_from_an_unknown_sender":"Ha recibido un mensaje de un remitente desconocido","Please_allow_access_to_microphone_and_camera":"Por favor, permitir el acceso al micrófono y la cámara.","Incoming_call":"Llamada entrante","from":"de","Do_you_want_to_accept_the_call_from":"Desea aceptar la llamada de","Reject":"Rechazar","Accept":"Aceptar","hang_up":"colgar","snapshot":"instantánea","mute_my_audio":"silenciar mi audio","pause_my_video":"pausar mi vídeo","fullscreen":"pantalla completa","Info":"Info","Local_IP":"IP local","Remote_IP":"IP remota","Local_Fingerprint":"Firma digital local","Remote_Fingerprint":"Firma digital remota","Video_call_not_possible":"Llamada de vídeo no es posible","Start_video_call":"Iniciar llamada de vídeo","Join_chat":null,"Join":null,"Room":null,"Nickname":null,"left_the_building":null,"entered_the_room":null,"is_now_known_as":null,"This_room_is":null,"muc_hidden":{"keyword":null,"description":null},"muc_membersonly":{"keyword":null,"description":null},"muc_moderated":{"keyword":null,"description":null},"muc_nonanonymous":{"keyword":null,"description":null},"muc_open":{"keyword":null,"description":null},"muc_passwordprotected":{"keyword":null,"description":null},"muc_persistent":{"keyword":null,"description":null},"muc_public":{"keyword":null,"description":null},"muc_semianonymous":{"keyword":null,"description":null},"muc_temporary":{"keyword":null,"description":null},"muc_unmoderated":{"keyword":null,"description":null},"muc_unsecured":{"keyword":null,"description":null},"Continue":null,"Server":null,"Rooms_are_loaded":null,"Could_load_only":null,"muc_explanation":null,"You_already_joined_this_room":null,"This_room_will_be_closed":null,"Room_not_found_":null,"Loading_room_information":null,"Destroy":null,"Leave":null,"changed_subject_to":null,"muc_removed_kicked":null,"muc_removed_info_kicked":null,"muc_removed_banned":null,"muc_removed_info_banned":null,"muc_removed_affiliation":null,"muc_removed_info_affiliation":null,"muc_removed_membersonly":null,"muc_removed_info_membersonly":null,"muc_removed_shutdown":null,"Reason":null,"message_not_send":null,"message_not_send_item-not-found":null,"message_not_send_forbidden":null,"message_not_send_not-acceptable":null,"This_room_has_been_closed":null,"Room_logging_is_enabled":null,"A_password_is_required":null,"You_are_not_on_the_member_list":null,"You_are_banned_from_this_room":null,"Your_desired_nickname_":null,"The_maximum_number_":null,"This_room_is_locked_":null,"You_are_not_allowed_to_create_":null,"Carbon_copy":null,"Enable":"Activar"}},"fr":{"translation":{"Logging_in":"Connexion...","your_connection_is_unencrypted":"Connexion non chiffrée.","your_connection_is_encrypted":"Connexion chiffrée.","your_buddy_closed_the_private_connection":"Votre ami a fermé la connexion privée.","start_private":"Démarrer une conversation privé","close_private":"Clôturer une conversation privée","your_buddy_is_verificated":"Votre contact est vérifié.","you_have_only_a_subscription_in_one_way":"Vous ne pouvez souscrire qu'une fois.","authentication_query_sent":"Requête d’authentification envoyée.","your_message_wasnt_send_please_end_your_private_conversation":"Votre message n'a pas été envoyé. Veuillez terminer votre conversation privée.","unencrypted_message_received":"Message non chiffré reçu","your_message_wasnt_send_because_you_have_no_valid_subscription":"Votre message n'a pas été envoyé car votre abonnement n'est pas valide.","not_available":"Pas disponible","no_connection":"Pas de connexion !","relogin":"Re-connexion","trying_to_start_private_conversation":"Essai de démarrage d'une conversation privée !","Verified":"Vérifié","Unverified":"Non vérifié","private_conversation_started":"Conversation privé démarrée.","private_conversation_aborted":"Conversation privée interrompue !","your_buddy_closed_the_private_conversation_you_should_do_the_same":"Votre ami a fermé la conversation privée ! Vous devriez faire de même.","conversation_is_now_verified":"La conversation est maintenant vérifiée.","authentication_failed":"L'authentification a échoué.","your_buddy_is_attempting_to_determine_":"Votre ami tente de déterminer si il ou elle parle vraiment à vous.","to_authenticate_to_your_buddy":"Vous authentifier à votre ami, ","enter_the_answer_and_click_answer":"Saisissez une réponse et cliquer sur Répondre.","enter_the_secret":"Entrez le mot secret","Creating_your_private_key_":"Création de votre clé privée; cela peut prendre un moment.","Authenticating_a_buddy_helps_":"L'authentification d'un ami permet de s'assurer que la personne à qui vous parlez est vraiment celui qu'il ou elle prétend être.","How_do_you_want_to_authenticate_your_buddy":"Comment voulez-vous vous authentifier {{bid_name}} (<b>{{bid_jid}}</b>)?","Select_method":"Sélection de la méthode...","Manual":"Manuel","Question":"Question","Secret":"Sécurité","To_verify_the_fingerprint_":"Pour vérifier l'empreinte, contactez votre ami via un autre canal digne de confiance, tel que le téléphone.","Your_fingerprint":"Votre empreinte","Buddy_fingerprint":"Empreinte de l'ami","Close":"Fermer","Compared":"Comparé","To_authenticate_using_a_question_":"Pour s'authentifier à l'aide d'une question, choisissez une question dont la réponse n'est connue que vous et de votre ami.","Ask":"Demander","To_authenticate_pick_a_secret_":"Pour vous authentifier, choisissez un secret connu seulement de vous et de votre ami.","Compare":"Comparer","Fingerprints":"Empreintes","Authentication":"Authentification","Message":"Message","Add_buddy":"Ajouter comme ami","rename_buddy":"Renommer l'ami","delete_buddy":"Supprimer l'ami","Login":"Connexion","Username":"Nom d'utilisateur","Password":"Mot de passe","Cancel":"Annuler","Connect":"Connecter","Type_in_the_full_username_":"Tapez un nom d'utilisateur complet et un alias(optionnel).","Alias":"Alias","Add":"Ajouter","Subscription_request":"Demande d'abonnement","You_have_a_request_from":"Vous avez une requête de ","Deny":"Refuser","Approve":"Approuver","Remove_buddy":"Supprimer l'ami","You_are_about_to_remove_":"Vous allez retirer {{bid_name}} (<b>{{bid_jid}}</b>) de votre liste d'amis. Toutes les fenêtres de chat en lien avec celui-ci seront fermées.","Continue_without_chat":"Continuer sans tchat","Please_wait":"Merci de patienter","Login_failed":"Authentification échouée","Sorry_we_cant_authentikate_":"La connexion avec le serveur de tchat a échoué. Vérifiez le mot de passe.","Retry":"Retour","clear_history":"Effacer l’historique","New_message_from":"Nouveau message de","Should_we_notify_you_":"Dans le futur, devrons-nous vous notifier les nouveaux messages ?","Please_accept_":"Merci de cliquer sur le bouton \"autoriser\" en haut de page","Hide_offline":"Masquer les contacts non connectés","Show_offline":"Afficher les contacts non connectés","About":"À propos","dnd":"Ne pas déranger","Mute":"Muet","Unmute":"Son actif","Subscription":"Abonnement","both":"Les deux","Status":"Status","online":"En ligne","chat":"tchat","away":"Absent","xa":"Options étendues","offline":"Hors ligne","none":"Aucun","Unknown_instance_tag":"Tag inconnu","Not_one_of_our_latest_keys":"Ce n'est pas l'une des dernières touches","Received_an_unreadable_encrypted_message":"Message chiffré non lisible","Online":"En ligne","Chatty":"tchatty","Away":"Absent","Extended_away":"Options étendues","Offline":"Hors ligne","Friendship_request":"Demande d'amitié","Confirm":"Valider","Dismiss":"Rejeter","Remove":"Supprimer","Online_help":"Aide en ligne","FN":"Nom","N":" N ","FAMILY":"Nom de famille","GIVEN":"prénom","NICKNAME":"Surnom","URL":"URL","ADR":"Adresse","STREET":"Rue","EXTADD":"Adresse (suite)","LOCALITY":"Localité","REGION":"Région","PCODE":"Code Postal","CTRY":"Pays","TEL":"Téléphone","NUMBER":"Numéro","EMAIL":"Courriel","USERID":" USERID ","ORG":"Organisation","ORGNAME":"Nom","ORGUNIT":"Unité","TITLE":"Qualité:","ROLE":"Rôle","BDAY":"Date de naissance","DESC":"Description","PHOTO":"Photo","send_message":"Envoyer le message","get_info":"Montrer les informations","Settings":"Réglages","Priority":"Priorité","Save":"Enregistrer","User_settings":"Paramètres utilisateur","A_fingerprint_":"Une empreinte est utilisée pour s'assurer de l'identité de la personne à qui vous parlez","Your_roster_is_empty_add_a":"Votre liste est vide, ajouter ","new_buddy":"Nouvel ami","is":"est","Login_options":"Options d'identification","BOSH_url":"URL BOSH","Domain":"Domaine","Resource":"Ressource","On_login":"Après authentification","Received_an_unencrypted_message":"Reçu un message non chiffré","Sorry_your_buddy_doesnt_provide_any_information":"Désolé, votre ami n'a pas fourni d'informations","Info_about":"A propos de","Authentication_aborted":"Authentification interrompue.","Authentication_request_received":"Requête d'authentification reçue.","Do_you_want_to_display_them":"Voulez-vous les afficher ?","Log_in_without_chat":"S'identifier sans tchat","has_come_online":"vient d'arriver","Unknown_sender":"Expéditeur inconnu","You_received_a_message_from_an_unknown_sender":"Vous avez reçu un message d'un expéditeur inconnu","Please_allow_access_to_microphone_and_camera":"Veuillez cliquez sur le bouton \"Autoriser\" en haut, pour permettre l'accès au micro et à la caméra.","Incoming_call":"Appel entrant","from":"de","Do_you_want_to_accept_the_call_from":"Voulez-vous accepter l'appel de","Reject":"Rejeté","Accept":"Accepté","hang_up":"Décrochez","snapshot":"Capture d’écran","mute_my_audio":"Couper l'audio","pause_my_video":"Mettre ma vidéo en pause","fullscreen":"Plein écran","Info":"Info","Local_IP":"IP locale","Remote_IP":"IP distante","Local_Fingerprint":"Empreinte locale","Remote_Fingerprint":"Empreinte distante","Video_call_not_possible":"L'appel vidéo n'est possible. Votre ami ne supporte pas les appels vidéo.","Start_video_call":"Démarrer l'appel vidéo","Join_chat":"Joindre la discution","Join":"Joindre","Room":"Salon","Nickname":"Surnom","left_the_building":"__nickname__ a quitté l'immeuble","entered_the_room":"__nickname__ entre dans le salon","is_now_known_as":null,"This_room_is":"Ce salon est","muc_hidden":{"keyword":"caché","description":null},"muc_membersonly":{"keyword":"pour les membres seulement","description":"Vous devez être sur la liste des membres"},"muc_moderated":{"keyword":"modéré","description":"Seulement les personnes avec la \"voix\" sont autorisés à envoyer des messages"},"muc_nonanonymous":{"keyword":"non anonyme","description":"Votre identifiant Jabber est visible de tous les autres occupants"},"muc_open":{"keyword":"ouvert","description":"Tout le monde est autorisé à se connecter"},"muc_passwordprotected":{"keyword":"protégé par un mot de passe","description":"Vous devez fournir un mot de passe correct"},"muc_persistent":{"keyword":"persistent","description":null},"muc_public":{"keyword":"public","description":null},"muc_semianonymous":{"keyword":"semi-anonyme","description":"Votre identifiant Jabber est seulement visible aux administrateurs de ce salon"},"muc_temporary":{"keyword":"temporaire","description":"sera détruit au départ de son dernier occupant"},"muc_unmoderated":{"keyword":"non modéré","description":"Tout le monde est autorisé à envoyer des messages"},"muc_unsecured":{"keyword":"non sécurisé","description":"un mot de passe n'est pas nécessaire pour entrer"},"Continue":"Continuer","Server":"Serveur","Rooms_are_loaded":"Les salons sont chargés","Could_load_only":null,"muc_explanation":"Veuillez saisir le nom du salon, un surnom (optionnel) et un mot de passe pour joindre la conversation","You_already_joined_this_room":"Vous avez déjà rejoins ce salon","This_room_will_be_closed":"Ce salon va être fermé","Room_not_found_":"Un nouveau salon va être créé","Loading_room_information":"Chargement des informations du salon","Destroy":"Détruire","Leave":"Quitter","changed_subject_to":"__nickname__ a changé le sujet du salon à \"__subject__\"","muc_removed_kicked":"Vous avez été éjecté de ce salon","muc_removed_info_kicked":"__nickname__ a été éjecté de ce salon","muc_removed_banned":"Vous avez été banni de ce salon","muc_removed_info_banned":"__nickname__ a été banni de ce salon","muc_removed_affiliation":null,"muc_removed_info_affiliation":null,"muc_removed_membersonly":null,"muc_removed_info_membersonly":null,"muc_removed_shutdown":null,"Reason":"Raison","message_not_send":null,"message_not_send_item-not-found":null,"message_not_send_forbidden":null,"message_not_send_not-acceptable":"Votre message n'a pas été envoyé car il n'y a personne dans ce salon","This_room_has_been_closed":"Ce salon a été fermé","Room_logging_is_enabled":null,"A_password_is_required":"Un mot de passe est requis","You_are_not_on_the_member_list":"Vous n'êtes pas sur la liste des membres","You_are_banned_from_this_room":"Vous avez été banni de ce salon","Your_desired_nickname_":"Votre Surnom souhaité est déjà utilisé.Veuillez en choisir un autre","The_maximum_number_":"Le nombre maximum d'utilisateur est atteint dans ce salon","This_room_is_locked_":"Ce salon est vérouillé","You_are_not_allowed_to_create_":"Vous n'êtes pas autorisé à créer un salon","Carbon_copy":null,"Enable":null}},"it":{"translation":{"Logging_in":"login…","your_connection_is_unencrypted":"La sua connessione è non cifrata.","your_connection_is_encrypted":"La sua connessione è cifrata.","your_buddy_closed_the_private_connection":"La sua connessione privata è stato chiuso dal suo compagno.","start_private":"Inizia privata","close_private":"Chiude privata","your_buddy_is_verificated":"Il tuo compagno è stato verificato","you_have_only_a_subscription_in_one_way":"Hai solo una one-way inscrizione.","authentication_query_sent":"Domanda d'autenticità inviata.","your_message_wasnt_send_please_end_your_private_conversation":"Il tuo messaggio non è stato inviato. Si prega di finire la sua conversazione privata.","unencrypted_message_received":"Messaggio non cifrato ricevuto","your_message_wasnt_send_because_you_have_no_valid_subscription":"Il tuo messaggio non è stato inviato perché non hai una sottoscrizione valida.","not_available":"non disponibile","no_connection":"nessun collegamento!","relogin":"nuovo login","trying_to_start_private_conversation":"Cercando di avviare una conversazione privata!","Verified":"verificato","Unverified":"non verificato","private_conversation_started":"Conversazione privata iniziato.","private_conversation_aborted":"Conversazione privata abortito!","your_buddy_closed_the_private_conversation_you_should_do_the_same":"Il tuo compagno ha chiuso la conversazione privata! Si dovrebbe fare lo stesso.","conversation_is_now_verified":"Conversazione è ora verificato.","authentication_failed":"autenticazione fallita.","your_buddy_is_attempting_to_determine_":"Il tuo compagno sta cercando di determinare se lui o lei sta davvero parlando con te.","to_authenticate_to_your_buddy":"Per autenticare a il tuo compagno. ","enter_the_answer_and_click_answer":"inserisci la risposta e fare click su risposta.","enter_the_secret":"inserire il segreto.","Creating_your_private_key_":"Creare la propria chiave privata; questo potrebbe richiedere un po'.","Authenticating_a_buddy_helps_":"Autenticazione un compagno aiuta a garantire che la persona si sta parlando è davvero quello che lui o lei sostiene di essere.","How_do_you_want_to_authenticate_your_buddy":"Come si desidera autenticare {{bid_name}} (<b>{{bid_jid}}</b>)?","Select_method":"Seleziona metodo ..","Manual":"manuale","Question":"domanda","Secret":"segreto","To_verify_the_fingerprint_":"Per verificare l'impronta digitale, contattare il proprio compagno attraverso qualche altro canale affidabile, come il telefono.","Your_fingerprint":"il tuo impronta digitale","Buddy_fingerprint":"impronta digitale da compagno","Close":"chiude","Compared":"comparato","To_authenticate_using_a_question_":"Per autenticare tramite una questione, scegli una questione la cui risposta è nota solo voi e il tuo compagno","Ask":"chiedi","To_authenticate_pick_a_secret_":"Per autenticare, scegli un segreto noto solo a te e il tuo compagno.","Compare":"Comparare","Fingerprints":"Impronta digitale","Authentication":"Autenticazione","Message":"Messagio","Add_buddy":"Aggiungi un compagno","rename_buddy":"rinomina compagno","delete_buddy":"elimina compagno","Login":"Login","Username":"Identificazione dell'utente","Password":"Password","Cancel":"Cancella","Connect":"Collega","Type_in_the_full_username_":"Digita l'identificazione utente completo e un alias opzionale.","Alias":"Alias","Add":"Aggiungi","Subscription_request":"Rrichiesta di sottoscrizione","You_have_a_request_from":"Hai una richiesta da","Deny":"Refiuta","Approve":"Approva","Remove_buddy":"Rimuova il compagno","You_are_about_to_remove_":"Stai rimovendo {{bid_name}} (<b>{{bid_jid}}</b>) del suo lista di compagni. Tutte le chat appartenente saranno chiuse.","Continue_without_chat":"Continua senza chat","Please_wait":"Si prega d'attendere","Login_failed":"Chat login è fallito","Sorry_we_cant_authentikate_":"Autenticazione non riuscita con il server di chat. Forse la password è sbagliata?","Retry":"Indietro","clear_history":"Cancella la cronologia","New_message_from":"Nuovo messaggio da","Should_we_notify_you_":"Vuoi ricevere una notifica di nuovi messaggi in futuro?","Please_accept_":"Si prega di fare clic sul bottone \"Autorizzazione\" sopra.","Hide_offline":"Nascondere i contatti non in linea","Show_offline":"Mostra i contatti non in linea","About":"Informazione legale","dnd":"Non disturbare","Mute":"Muto attivo","Unmute":"Muto inattivo","Subscription":"Sottoscrizione","both":"etrambi","Status":"Status","online":"In linea","chat":"chat","away":"via","xa":"via estensivo","offline":"non in linea","none":"nessuno","Unknown_instance_tag":"Instance tag sconosciuta.","Not_one_of_our_latest_keys":"Non è una delle nostre ultime chiavi.","Received_an_unreadable_encrypted_message":"Ricevuto un messaggio crittografato illeggibile.","Online":"In linea","Chatty":"Chiacchierino","Away":"Via","Extended_away":"Via estensivo","Offline":"Non in linea","Friendship_request":"Amicizia richiesto","Confirm":"Conferma","Dismiss":"Rifiuta","Remove":"Rimuovi","Online_help":"Guida in linea","FN":"Nome e cognome","N":null,"FAMILY":"Cognome","GIVEN":"Nome","NICKNAME":"Soprannome","URL":"URL","ADR":"Indirizzo","STREET":"Via","EXTADD":"Esteso Indirizzo","LOCALITY":"Località","REGION":"Regione","PCODE":"Codice Postale","CTRY":"Paese","TEL":"Telefono","NUMBER":"Numero","EMAIL":"E-mail","USERID":null,"ORG":"Organizzazione","ORGNAME":"Nome","ORGUNIT":"Unità","TITLE":"Titolo di lavoro","ROLE":"Funzione","BDAY":"Compleanno","DESC":"Descrizione","PHOTO":null,"send_message":"Messagio inviato","get_info":"Mostra informazioni","Settings":"Impostazione","Priority":"Priorità","Save":"Salva","User_settings":"Impostazione dell'utente","A_fingerprint_":"Una impronta digitale è usato per assicurarsi che la persona con cui stai parlando è lui o lei che sta dicendo.","Your_roster_is_empty_add_a":"Il suo elenco è vuoto, aggiungi un ","new_buddy":"compagno nuovo","is":"è","Login_options":"Opzioni di login","BOSH_url":"BOSH URL","Domain":"Domain","Resource":"Risorsa","On_login":"Login on","Received_an_unencrypted_message":"Ricevuto un messaggio non crittografato","Sorry_your_buddy_doesnt_provide_any_information":"Spiace, il tuo compagno non fornisce alcuna informazione.","Info_about":"Informazioni","Authentication_aborted":"Autenticazione interrotta","Authentication_request_received":"Richiesta di autenticazione ricevuto.","Do_you_want_to_display_them":"Vuoi che venga visualizzato?","Log_in_without_chat":"Log in senza chat","has_come_online":"È venuto in linea","Unknown_sender":"Mittente sconosciuto","You_received_a_message_from_an_unknown_sender":"Hai ricevuto un messaggio da un mittente sconosciuto","Please_allow_access_to_microphone_and_camera":"Si prega di fare clic sul bottone \"Autorizzazione\" sopra per autorizzazione del l'accesso al microfono e fotocamera.","Incoming_call":"Chiamata in arrivo","from":"di","Do_you_want_to_accept_the_call_from":"Vuoi accettare la chiamata di","Reject":"Rifiuta","Accept":"Accetta","hang_up":"Riattacca","snapshot":"istantanea","mute_my_audio":"disattiva il mio audio","pause_my_video":"pausa il mio audio","fullscreen":"schermo intero","Info":"Informazione","Local_IP":"IP locale","Remote_IP":"IP remoto","Local_Fingerprint":"Impronta digitale locale","Remote_Fingerprint":"Impronta digitale remoto","Video_call_not_possible":"Videochiamata non è possibile. Il tuo compagno non può effettuare videochiamate.","Start_video_call":"Inizia videochiamata","Join_chat":null,"Join":null,"Room":null,"Nickname":null,"left_the_building":null,"entered_the_room":null,"is_now_known_as":null,"This_room_is":null,"muc_hidden":{"keyword":null,"description":null},"muc_membersonly":{"keyword":null,"description":null},"muc_moderated":{"keyword":null,"description":null},"muc_nonanonymous":{"keyword":null,"description":null},"muc_open":{"keyword":null,"description":null},"muc_passwordprotected":{"keyword":null,"description":null},"muc_persistent":{"keyword":null,"description":null},"muc_public":{"keyword":null,"description":null},"muc_semianonymous":{"keyword":null,"description":null},"muc_temporary":{"keyword":null,"description":null},"muc_unmoderated":{"keyword":null,"description":null},"muc_unsecured":{"keyword":null,"description":null},"Continue":null,"Server":null,"Rooms_are_loaded":null,"Could_load_only":null,"muc_explanation":null,"You_already_joined_this_room":null,"This_room_will_be_closed":null,"Room_not_found_":null,"Loading_room_information":null,"Destroy":null,"Leave":null,"changed_subject_to":null,"muc_removed_kicked":null,"muc_removed_info_kicked":null,"muc_removed_banned":null,"muc_removed_info_banned":null,"muc_removed_affiliation":null,"muc_removed_info_affiliation":null,"muc_removed_membersonly":null,"muc_removed_info_membersonly":null,"muc_removed_shutdown":null,"Reason":null,"message_not_send":null,"message_not_send_item-not-found":null,"message_not_send_forbidden":null,"message_not_send_not-acceptable":null,"This_room_has_been_closed":null,"Room_logging_is_enabled":null,"A_password_is_required":null,"You_are_not_on_the_member_list":null,"You_are_banned_from_this_room":null,"Your_desired_nickname_":null,"The_maximum_number_":null,"This_room_is_locked_":null,"You_are_not_allowed_to_create_":null,"Carbon_copy":null,"Enable":null}},"nds":{"translation":{"Logging_in":null,"your_connection_is_unencrypted":null,"your_connection_is_encrypted":null,"your_buddy_closed_the_private_connection":null,"start_private":null,"close_private":null,"your_buddy_is_verificated":null,"you_have_only_a_subscription_in_one_way":null,"authentication_query_sent":null,"your_message_wasnt_send_please_end_your_private_conversation":null,"unencrypted_message_received":null,"your_message_wasnt_send_because_you_have_no_valid_subscription":null,"not_available":null,"no_connection":null,"relogin":null,"trying_to_start_private_conversation":null,"Verified":null,"Unverified":null,"private_conversation_started":null,"private_conversation_aborted":null,"your_buddy_closed_the_private_conversation_you_should_do_the_same":null,"conversation_is_now_verified":null,"authentication_failed":null,"your_buddy_is_attempting_to_determine_":null,"to_authenticate_to_your_buddy":null,"enter_the_answer_and_click_answer":null,"enter_the_secret":null,"Creating_your_private_key_":null,"Authenticating_a_buddy_helps_":null,"How_do_you_want_to_authenticate_your_buddy":null,"Select_method":null,"Manual":null,"Question":null,"Secret":null,"To_verify_the_fingerprint_":null,"Your_fingerprint":null,"Buddy_fingerprint":null,"Close":null,"Compared":null,"To_authenticate_using_a_question_":null,"Ask":null,"To_authenticate_pick_a_secret_":null,"Compare":null,"Fingerprints":null,"Authentication":null,"Message":null,"Add_buddy":null,"rename_buddy":null,"delete_buddy":null,"Login":null,"Username":null,"Password":null,"Cancel":null,"Connect":null,"Type_in_the_full_username_":null,"Alias":null,"Add":null,"Subscription_request":null,"You_have_a_request_from":null,"Deny":null,"Approve":null,"Remove_buddy":null,"You_are_about_to_remove_":null,"Continue_without_chat":null,"Please_wait":null,"Login_failed":null,"Sorry_we_cant_authentikate_":null,"Retry":null,"clear_history":null,"New_message_from":null,"Should_we_notify_you_":null,"Please_accept_":null,"Hide_offline":null,"Show_offline":null,"About":null,"dnd":null,"Mute":null,"Unmute":null,"Subscription":null,"both":null,"Status":null,"online":null,"chat":null,"away":null,"xa":null,"offline":null,"none":null,"Unknown_instance_tag":null,"Not_one_of_our_latest_keys":null,"Received_an_unreadable_encrypted_message":null,"Online":null,"Chatty":null,"Away":null,"Extended_away":null,"Offline":null,"Friendship_request":null,"Confirm":null,"Dismiss":null,"Remove":null,"Online_help":null,"FN":null,"N":null,"FAMILY":null,"GIVEN":null,"NICKNAME":null,"URL":null,"ADR":null,"STREET":null,"EXTADD":null,"LOCALITY":null,"REGION":null,"PCODE":null,"CTRY":null,"TEL":null,"NUMBER":null,"EMAIL":null,"USERID":null,"ORG":null,"ORGNAME":null,"ORGUNIT":null,"TITLE":null,"ROLE":null,"BDAY":null,"DESC":null,"PHOTO":null,"send_message":null,"get_info":null,"Settings":null,"Priority":null,"Save":null,"User_settings":null,"A_fingerprint_":null,"Your_roster_is_empty_add_a":null,"new_buddy":null,"is":null,"Login_options":null,"BOSH_url":null,"Domain":null,"Resource":null,"On_login":null,"Received_an_unencrypted_message":null,"Sorry_your_buddy_doesnt_provide_any_information":null,"Info_about":null,"Authentication_aborted":null,"Authentication_request_received":null,"Do_you_want_to_display_them":null,"Log_in_without_chat":null,"has_come_online":null,"Unknown_sender":null,"You_received_a_message_from_an_unknown_sender":null,"Please_allow_access_to_microphone_and_camera":null,"Incoming_call":null,"from":null,"Do_you_want_to_accept_the_call_from":null,"Reject":null,"Accept":null,"hang_up":null,"snapshot":null,"mute_my_audio":null,"pause_my_video":null,"fullscreen":null,"Info":null,"Local_IP":null,"Remote_IP":null,"Local_Fingerprint":null,"Remote_Fingerprint":null,"Video_call_not_possible":null,"Start_video_call":null,"Join_chat":null,"Join":null,"Room":null,"Nickname":null,"left_the_building":null,"entered_the_room":null,"is_now_known_as":null,"This_room_is":null,"muc_hidden":{"keyword":null,"description":null},"muc_membersonly":{"keyword":null,"description":null},"muc_moderated":{"keyword":null,"description":null},"muc_nonanonymous":{"keyword":null,"description":null},"muc_open":{"keyword":null,"description":null},"muc_passwordprotected":{"keyword":null,"description":null},"muc_persistent":{"keyword":null,"description":null},"muc_public":{"keyword":null,"description":null},"muc_semianonymous":{"keyword":null,"description":null},"muc_temporary":{"keyword":null,"description":null},"muc_unmoderated":{"keyword":null,"description":null},"muc_unsecured":{"keyword":null,"description":null},"Continue":null,"Server":null,"Rooms_are_loaded":null,"Could_load_only":null,"muc_explanation":null,"You_already_joined_this_room":null,"This_room_will_be_closed":null,"Room_not_found_":null,"Loading_room_information":null,"Destroy":null,"Leave":null,"changed_subject_to":null,"muc_removed_kicked":null,"muc_removed_info_kicked":null,"muc_removed_banned":null,"muc_removed_info_banned":null,"muc_removed_affiliation":null,"muc_removed_info_affiliation":null,"muc_removed_membersonly":null,"muc_removed_info_membersonly":null,"muc_removed_shutdown":null,"Reason":null,"message_not_send":null,"message_not_send_item-not-found":null,"message_not_send_forbidden":null,"message_not_send_not-acceptable":null,"This_room_has_been_closed":null,"Room_logging_is_enabled":null,"A_password_is_required":null,"You_are_not_on_the_member_list":null,"You_are_banned_from_this_room":null,"Your_desired_nickname_":null,"The_maximum_number_":null,"This_room_is_locked_":null,"You_are_not_allowed_to_create_":null,"Carbon_copy":null,"Enable":null}},"pl":{"translation":{"Logging_in":"Logowanie...","your_connection_is_unencrypted":"Twoje połączenie nie jest szyfrowane.","your_connection_is_encrypted":"Twoje połączenie jest szyfrowane.","your_buddy_closed_the_private_connection":"Twój rozmówca zamknął połączenie.","start_private":"Rozpocznij rozmowę.","close_private":"Zakończ rozmowę.","your_buddy_is_verificated":"Twój rozmówca został zweryfikowany.","you_have_only_a_subscription_in_one_way":"Masz jednostronną subskrypcję.","authentication_query_sent":"Wysłano proźbę o autentykację.","your_message_wasnt_send_please_end_your_private_conversation":"Twoja wiadomość nie została wysłana. Proszę, zamknij rozmowę.","unencrypted_message_received":"Zwrotna niezaszyfrowana wiadomość.","your_message_wasnt_send_because_you_have_no_valid_subscription":"Wiadomość nie została wysłana ponieważ nie posiadasz subskrybcji u rozmówcy.","not_available":"Niedostępny.","no_connection":"Brak połączenia!","relogin":"Połącz ponownie","trying_to_start_private_conversation":"Rozpocznij rozmowę!","Verified":"Zweryfikowano","Unverified":"Niezweryfikowano","private_conversation_started":"Rozmowa prywatna rozpoczęta.","private_conversation_aborted":"Anulowano rozmowę!","your_buddy_closed_the_private_conversation_you_should_do_the_same":"Rozmówca przerwał połączenie!","conversation_is_now_verified":"Zweryfikowano połączenie.","authentication_failed":"Weryfikacja się nie powiodła.","your_buddy_is_attempting_to_determine_":"Twój rozmówca próbuje się z Tobą połączyć.","to_authenticate_to_your_buddy":"Autoryzacja z rozmówcą, ","enter_the_answer_and_click_answer":"napisz odpowiedź.","enter_the_secret":"wpisz hasło.","Creating_your_private_key_":"Tworzenie klucza prywatnego; może to chwilę potrwać","Authenticating_a_buddy_helps_":"Autoryzacja pomoże w ustaleniu faktycznej tożsamości rozmówcy ;).","How_do_you_want_to_authenticate_your_buddy":"Jakiej autoryzacji chcesz użyć {{bid_name}} (<b>{{bid_jid}}</b>)?","Select_method":"Wybierz sposób...","Manual":"Ręcznie","Question":"Pytanie","Secret":"Hasło","To_verify_the_fingerprint_":"Aby zweryfikować kod najpierw skontaktuj się z rozmówcą np. za pomocą telefonu.","Your_fingerprint":"Twój kod:","Buddy_fingerprint":"Kod rozmówcy","Close":"Zamknij","Compared":"Porównano","To_authenticate_using_a_question_":"Aby autoryzować za pomocą pytania, wybierz pytanie na które tylko Twój rozmówca zna odpowiedź.","Ask":"Zadaj pytanie","To_authenticate_pick_a_secret_":"Aby autoryzować za pomocą hasła, wybierz hasło na które zna tylko Twój rozmówca.","Compare":"Dopasuj","Fingerprints":"Kody autoryzacyjne","Authentication":"Autoryzacja","Message":"Wiadomość","Add_buddy":"Dodaj kontakt","rename_buddy":"Zmień nazwę","delete_buddy":"Usuń kontakt","Login":"Login","Username":"Nazwa Użytkownika","Password":"Hasło","Cancel":"Anuluj","Connect":"Połączenie","Type_in_the_full_username_":"Wpisz pełną nazwę użytkownika (np. <B>imię.nazwisko@zajezdnia.local</B>) oraz jego nazwę wyświetlaną (Alias).","Alias":"Alias","Add":"Dodaj","Subscription_request":"Potwierdzenie subskrypcji","You_have_a_request_from":"Masz potwierdzenie od","Deny":"Odmów","Approve":"Zatwierdź","Remove_buddy":"Usuń rozmówcę","You_are_about_to_remove_":"Twój rozmówca {{bid_name}} (<b>{{bid_jid}}</b>) usunął Cię ze swojej listy kontaktów.","Continue_without_chat":"Kontynuuj bez komunikatora","Please_wait":"Proszę czekać","Login_failed":"Błędne logowanie","Sorry_we_cant_authentikate_":"Błędna autoryzacja z serwerem. Może hasło jest nieprawidłowe?","Retry":"Powrót","clear_history":"Wyczyść historię","New_message_from":"Nowa wiadomość od","Should_we_notify_you_":"Czy chcesz otrzymywać powiadomienia o nowych wiadomościach w przyszłości?","Please_accept_":"Kliknij \"Zezwól\" na górze.","Hide_offline":"Schowaj niedostępne kontakty","Show_offline":"Pokaż niedostępne kontakty","About":"Info","dnd":"Nie przeszkadzać","Mute":"Wycisz","Unmute":"Włącz dźwięk","Subscription":"Subskrybcja","both":"obustronna","Status":"Status","online":"Dostępny","chat":"czat","away":"z dala od kompa","xa":"hen hen...","offline":"niedostępny","none":"brak","Unknown_instance_tag":"Nieznany przypadek.","Not_one_of_our_latest_keys":"Not one of our latest keys.","Received_an_unreadable_encrypted_message":"Otrzymano nieczytelną, zaszyfrowaną wiadomość.","Online":"Połączony","Chatty":"Pogawędzimy?","Away":"Daleko","Extended_away":"Hen Hen...","Offline":"Niedostępny","Friendship_request":"Zapytanie od znajomego?","Confirm":"Potwierdzenie","Dismiss":"Odwołaj","Remove":"Usuń","Online_help":"Pomoc Online","FN":"Pełna nazwa","N":" ","FAMILY":"Nazwisko","GIVEN":"Imię","NICKNAME":"Pseudonim","URL":"Strona WWW","ADR":"Adres","STREET":"Ulica","EXTADD":"Pełny adres","LOCALITY":"Lokalizacja","REGION":"Region","PCODE":"Kod pocztowy","CTRY":"Kraj","TEL":"Telefon","NUMBER":"Numer","EMAIL":"Email","USERID":" ","ORG":"Organizacja","ORGNAME":"Nazwa","ORGUNIT":"Jednostka","TITLE":"Stanowisko","ROLE":"Rola","BDAY":"Data urodzin","DESC":"Opis","PHOTO":" ","send_message":"Wyślij wiadomość","get_info":"Pokaż informację","Settings":"Ustawienia","Priority":"Priorytet","Save":"Zapisz","User_settings":"Ustawienia Użytkownika","A_fingerprint_":"Kod służy do autoryzacji Twojego rozmówcy aby potwierdzić jego tożsamość.","Your_roster_is_empty_add_a":"Twoja lista jest pusta, dodaj kontakty ","new_buddy":"Nowy kontakt","is":"jest","Login_options":"opcje logowania","BOSH_url":"Adres BOSH","Domain":"Domena","Resource":"Źródło","On_login":"Na login","Received_an_unencrypted_message":"Zatwierdzono nieszyfrowaną wiadomość.","Sorry_your_buddy_doesnt_provide_any_information":"Twój rozmówca nie posiada żadnych informacji.","Info_about":"Informacja o...","Authentication_aborted":"Autoryzacja anulowana.","Authentication_request_received":"Prośba o autoryzację została przyjęta.","Do_you_want_to_display_them":"Chcesz to wyświetlić?","Log_in_without_chat":"Zaloguj bez komunikatora","has_come_online":"jest teraz dostępny","Unknown_sender":"Nieznany nadawca","You_received_a_message_from_an_unknown_sender":"Masz wiadomość od nieznanego nadawcy.","Please_allow_access_to_microphone_and_camera":"Kliknij \"Potwierdź\" na górze, aby móc korzystać z mikrofonu oraz kamery.","Incoming_call":"Przychodzące połączenie","from":"z","Do_you_want_to_accept_the_call_from":"Akceptujesz połączenie od","Reject":"Odrzuć","Accept":"Zaakceptuj","hang_up":"odbierz","snapshot":"zrób zdjęcie","mute_my_audio":"wycisz dźwięk","pause_my_video":"zatrzymaj moje wideo","fullscreen":"Pełny ekran","Info":"Informacja","Local_IP":"Adres IP","Remote_IP":"Zdalny adres IP","Local_Fingerprint":"Kod lokalny","Remote_Fingerprint":"Zdalny kod","Video_call_not_possible":"Rozmowa wideo jest niemożliwa. Twój rozmówca nie ma możliwości prowadzenia takich rozmów.","Start_video_call":"Rozpocznij rozmowę wideo","Join_chat":"Dołącz do czata","Join":"Dołącz","Room":"Pokój","Nickname":"Nazwa użytkownika","left_the_building":"__nickname__ wyszedł","entered_the_room":"__nickname__ wszedł do pokoju","is_now_known_as":"__oldNickname__ zmienił nazwę na __newNickname__","This_room_is":"Ten pokój jest","muc_hidden":{"keyword":"ukryty","description":"nie można odnaleźć elementów wyszukiwania"},"muc_membersonly":{"keyword":"tylko zalogowani","description":"musisz być członkiem listy"},"muc_moderated":{"keyword":"moderowano","description":"tylko osoby z opcją \"głos\" mogą wysyłać wiadomość"},"muc_nonanonymous":{"keyword":"nie-anonimowy","description":"Twój identyfikator jabber jest widoczny dla wszystkich innych osób"},"muc_open":{"keyword":"otwarty","description":"wszyscy mają pozwolenie aby dołączyć"},"muc_passwordprotected":{"keyword":"ograniczone hasłem","description":"musisz wpisać prawidłowe hasło"},"muc_persistent":{"keyword":"trwale","description":"nie zostaną zniszczone, jeśli ostatnia osoba wyszła"},"muc_public":{"keyword":"publiczny","description":"wyszukawno"},"muc_semianonymous":{"keyword":"pół-anonimowy","description":"Twój identyfikator jabber jest widoczny w pokoju adminów"},"muc_temporary":{"keyword":"tymczasowy","description":"zostanie usunięty jeżeli ostatnia osoba wyjdzie"},"muc_unmoderated":{"keyword":"niemoderowany","description":"wszyscy są uprawnieni do pisania wiadomości"},"muc_unsecured":{"keyword":"niezabezpieczone","description":"nie musisz wpisywać hasła"},"Continue":"Kontynuuj","Server":"Serwer","Rooms_are_loaded":"Pokoje zostały załadowane","Could_load_only":"Nie załadowano __count__ pokoi","muc_explanation":"Aby się zalogować, wpisz nazwę pokoju oraz opcjonalnie nazwę użytkownika i hasło","You_already_joined_this_room":"Już dołączyłeś do tego pokoju","This_room_will_be_closed":"Ten pokój będzie zamknięty","Room_not_found_":"Nowy pokój będzie stworzony","Loading_room_information":"Ładowani informacji o pokoju","Destroy":"Zniszczony","Leave":"Opuść","changed_subject_to":"__nickname__ zmienił temat pokoju na \"__subject__\"","muc_removed_kicked":"Zostałeś wyrzucony z pokoju","muc_removed_info_kicked":"__nickname__ został wyrzucony z pokoju","muc_removed_banned":"Zostałeś zbanowany","muc_removed_info_banned":"__nickname__ został zbanowany","muc_removed_affiliation":"Zostałeś usunięty z pokoju ze względu na zmianę przynależnosci","muc_removed_info_affiliation":"__nickname__ został usunięty z pokoju ze względu na zmianę przynależnosci","muc_removed_membersonly":"Zostałeś usunięty z pokoju ze względu na zmianę pokoju tylko dla członków, a Ty nie jesteś członkiem...","muc_removed_info_membersonly":"__nickname__ został usunięty z pokoju ze względu na zmianę pokoju na tylko dla członków","muc_removed_shutdown":"Zostałeś usunięty z pokoju ze względu na zamknięcie usługi","Reason":"Powód","message_not_send":"Wystąpił błąd i twoja wiadomość nie została wysłana.","message_not_send_item-not-found":"Twoja wiadomość nie została wysłana ponieważ ten pokój nie istnieje","message_not_send_forbidden":"Twoja wiadomość nie została wysłana ponieważ nie masz głosu w tym pokoju","message_not_send_not-acceptable":"Twoja wiadomość nie została wysłana ponieważ nie jesteś właścicielem tego pokoju","This_room_has_been_closed":"Ten pokój został zamknięty","Room_logging_is_enabled":"Logowanie do pokoju jest włączone","A_password_is_required":"Hasło jest wymagane","You_are_not_on_the_member_list":"Nie jesteś na liście członków","You_are_banned_from_this_room":"Zostałeś zbanowany w tym pokoju","Your_desired_nickname_":"Twoja nazwa użytkownika jest już użyta. Spróbuj wybrać inną","The_maximum_number_":"Została osiągnięta maksymalna liczba użytkowników w tym pokoju","This_room_is_locked_":"Ten pokój jest zablokowany","You_are_not_allowed_to_create_":"Nie masz uprawnień do tworzenia pokoju","Carbon_copy":"Do wiadomości","Enable":null}},"pt-BR":{"translation":{"Logging_in":"Entrando...","your_connection_is_unencrypted":"Sua conexão não é encriptada","your_connection_is_encrypted":"Sua conexão é encriptada","your_buddy_closed_the_private_connection":"Seu contato fechou a conexão privada","start_private":"Iniciar conversa privada","close_private":"Fechar conversa privada","your_buddy_is_verificated":"Seu contato está verificado","you_have_only_a_subscription_in_one_way":"Você só tem a inscrição one-way","authentication_query_sent":"Pergunta de autenticação enviada","your_message_wasnt_send_please_end_your_private_conversation":"Sua mensagem não foi enviada. Por favor finalize sua conversa privada","unencrypted_message_received":"Mensagem não encriptada recebida","your_message_wasnt_send_because_you_have_no_valid_subscription":"Sua mensagem não foi enviada porque sua inscrição não é válida","not_available":"Indisponível","no_connection":"Sem conexão!","relogin":"reentrar","trying_to_start_private_conversation":"Tentando iniciar conversa privada","Verified":"Verificado","Unverified":"Não verificado","private_conversation_started":"Conversa privada iniciada.","private_conversation_aborted":"Conversa privada abortada!","your_buddy_closed_the_private_conversation_you_should_do_the_same":"Seu contato encerrou a conversa privada! Você deveria fazer o mesmo.","conversation_is_now_verified":"Conversa verificada.","authentication_failed":"Autenticação falhou.","your_buddy_is_attempting_to_determine_":"Seu contato está tentando determinar se ele realmente está falando contigo.","to_authenticate_to_your_buddy":"Para autenticar seu contato, ","enter_the_answer_and_click_answer":"entre com a resposta e clique em Responder.","enter_the_secret":"escreva a senha.","Creating_your_private_key_":"Criando sua chave privada: isso pode demorar um pouco.","Authenticating_a_buddy_helps_":"Autenticar seu contato ajuda a garantir que a pessoa com a qual você está falando é realmente a pessoa que ela alega ser.","How_do_you_want_to_authenticate_your_buddy":"Como você gostaria de se autenticar {{bid_name}} (<b>{{bid_jid}}</b>)?","Select_method":"Selecione o método...","Manual":"Manual","Question":"Pergunta","Secret":"Senha","To_verify_the_fingerprint_":"Para verificar o fingerprint, entre em contato com seu contato usando outro meio, de preferência seguro, como o telefone.","Your_fingerprint":"Seu fingerprint","Buddy_fingerprint":"Fingerprint do contato","Close":"Fechar","Compared":"Comparado","To_authenticate_using_a_question_":"Para autenticar seu contato faça uma pergunta, mas escolha que só ele saiba a resposta.","Ask":"Pergunta","To_authenticate_pick_a_secret_":"Para autenticar, escolha um segredo que somente você e seu contato saibam.","Compare":"Compare","Fingerprints":"Fingerprints","Authentication":"Autenticação","Message":"Mensagem","Add_buddy":"Adicionar contato","rename_buddy":"renomear contato","delete_buddy":"remover contato","Login":"Entrar","Username":"Usuário","Password":"Senha","Cancel":"Cancelar","Connect":"Conectar","Type_in_the_full_username_":"Digite seu nome completo e um apelido opcional.","Alias":"Apelido","Add":"Adicionar","Subscription_request":"Pedido de inscrição","You_have_a_request_from":"Você tem um pedido de","Deny":"Negar","Approve":"Aprovar","Remove_buddy":"Remover contato","You_are_about_to_remove_":"Você está prestes a remover {{bid_name}} (<b>{{bid_jid}}</b>) de sua lista de contatos. Todas as conversas serão fechadas.","Continue_without_chat":"Continue sem converar","Please_wait":"Por favor aguarde","Login_failed":"Autenticação da conversa falhou","Sorry_we_cant_authentikate_":"A autenticação com o servidor falhou. Talvez seja a senha errada?","Retry":"Voltar","clear_history":"Limpar histórico","New_message_from":"Nova mensagem de","Should_we_notify_you_":"Devemos continuar notificando sobre novas mensagens no futuro?","Please_accept_":"Por favor clique no botão \"Permitir\" na parte superior.","Hide_offline":"Esconder contatos desconectados","Show_offline":"Mostrar contatos desconectados","About":"Sobre","dnd":"Não perturbe","Mute":"Mudo","Unmute":"Ligar","Subscription":"Inscrição","both":"ambos","Status":"Status","online":"online","chat":"conversa","away":"ausente","xa":"ausente por mais tempo","offline":"desativado","none":"nenhum","Unknown_instance_tag":"Marcação desconhecida da instância","Not_one_of_our_latest_keys":"Nenhuma de nossas ultimas chaves.","Received_an_unreadable_encrypted_message":"Mensagem encriptada ilegível foi recebida.","Online":"Online","Chatty":"Tagarela","Away":"Ausente","Extended_away":"Ausente por mais tempo","Offline":"Desativado","Friendship_request":"Pedido de amizade","Confirm":"Confirmar","Dismiss":"Ignorar","Remove":"Remover","Online_help":"Ajuda online","FN":"Nome completo","N":" ","FAMILY":"Sobrenome","GIVEN":"Nome","NICKNAME":"Apelido","URL":"URL","ADR":"Endereço","STREET":"Rua, Av, etc","EXTADD":"Complemento","LOCALITY":"Localidade","REGION":"Região","PCODE":"CEP","CTRY":"País","TEL":"Telefone","NUMBER":"Número","EMAIL":"Email","USERID":" ","ORG":"Empresa","ORGNAME":"Nome","ORGUNIT":"Unidade","TITLE":"Cargo","ROLE":"Rol","BDAY":"Data de nascimento","DESC":"Descrição","PHOTO":" ","send_message":"Enviar mensagem","get_info":"Exibir informações","Settings":"Configurações","Priority":"Prioridade","Save":"Salvar","User_settings":"Configurações do usuário","A_fingerprint_":"O fingerprint é usado para certificar que a pessoa com a qual se está falando é que ela diz ser.","Your_roster_is_empty_add_a":"Sua lista está vazia, adicione um ","new_buddy":"novo contato","is":"é","Login_options":"Opções de login","BOSH_url":"BOSH URL","Domain":"Domínio","Resource":"Recurso","On_login":"Ao autenticar","Received_an_unencrypted_message":"Mensagem não encriptada recebida","Sorry_your_buddy_doesnt_provide_any_information":"Desculpe, seu contato não forneceu nenhuma informação","Info_about":"Informações sobre","Authentication_aborted":"Autenticação encerrada.","Authentication_request_received":"Pedido de autenticação recebido","Do_you_want_to_display_them":"Você quer mostrá-los?","Log_in_without_chat":"Entrar sem conversar","has_come_online":"ficou online","Unknown_sender":"Emissor desconhecido","You_received_a_message_from_an_unknown_sender":"Você recebeu uma mensagem de um emissor desconhecido","Please_allow_access_to_microphone_and_camera":"Por favor clique no botão \"Permitir\" no topo, para conceder acesso ao seu microfone e câmera.","Incoming_call":"Recebendo chamada","from":"de","Do_you_want_to_accept_the_call_from":"Você aceita a chamada de","Reject":"Negar","Accept":"Aceitar","hang_up":"desligar","snapshot":"registrar imagem","mute_my_audio":"mudo","pause_my_video":"pausar vídeo","fullscreen":"tela cheia","Info":"Informações","Local_IP":"IP local","Remote_IP":"IP remoto","Local_Fingerprint":"Fingerprint local","Remote_Fingerprint":"Fingerprint remoto","Video_call_not_possible":"Chamada de vídeo impossível. Seu contato não suporta chamadas desse tipo.","Start_video_call":"Iniciar chamada de vídeo","Join_chat":null,"Join":null,"Room":null,"Nickname":null,"left_the_building":null,"entered_the_room":null,"is_now_known_as":null,"This_room_is":null,"muc_hidden":{"keyword":null,"description":null},"muc_membersonly":{"keyword":null,"description":null},"muc_moderated":{"keyword":null,"description":null},"muc_nonanonymous":{"keyword":null,"description":null},"muc_open":{"keyword":null,"description":null},"muc_passwordprotected":{"keyword":null,"description":null},"muc_persistent":{"keyword":null,"description":null},"muc_public":{"keyword":null,"description":null},"muc_semianonymous":{"keyword":null,"description":null},"muc_temporary":{"keyword":null,"description":null},"muc_unmoderated":{"keyword":null,"description":null},"muc_unsecured":{"keyword":null,"description":null},"Continue":null,"Server":null,"Rooms_are_loaded":null,"Could_load_only":null,"muc_explanation":null,"You_already_joined_this_room":null,"This_room_will_be_closed":null,"Room_not_found_":null,"Loading_room_information":null,"Destroy":null,"Leave":null,"changed_subject_to":null,"muc_removed_kicked":null,"muc_removed_info_kicked":null,"muc_removed_banned":null,"muc_removed_info_banned":null,"muc_removed_affiliation":null,"muc_removed_info_affiliation":null,"muc_removed_membersonly":null,"muc_removed_info_membersonly":null,"muc_removed_shutdown":null,"Reason":null,"message_not_send":null,"message_not_send_item-not-found":null,"message_not_send_forbidden":null,"message_not_send_not-acceptable":null,"This_room_has_been_closed":null,"Room_logging_is_enabled":null,"A_password_is_required":null,"You_are_not_on_the_member_list":null,"You_are_banned_from_this_room":null,"Your_desired_nickname_":null,"The_maximum_number_":null,"This_room_is_locked_":null,"You_are_not_allowed_to_create_":null,"Carbon_copy":null,"Enable":null}},"ro":{"translation":{"Logging_in":null,"your_connection_is_unencrypted":null,"your_connection_is_encrypted":null,"your_buddy_closed_the_private_connection":null,"start_private":null,"close_private":null,"your_buddy_is_verificated":null,"you_have_only_a_subscription_in_one_way":null,"authentication_query_sent":null,"your_message_wasnt_send_please_end_your_private_conversation":null,"unencrypted_message_received":null,"your_message_wasnt_send_because_you_have_no_valid_subscription":null,"not_available":null,"no_connection":null,"relogin":null,"trying_to_start_private_conversation":null,"Verified":null,"Unverified":null,"private_conversation_started":null,"private_conversation_aborted":null,"your_buddy_closed_the_private_conversation_you_should_do_the_same":null,"conversation_is_now_verified":null,"authentication_failed":null,"your_buddy_is_attempting_to_determine_":null,"to_authenticate_to_your_buddy":null,"enter_the_answer_and_click_answer":null,"enter_the_secret":null,"Creating_your_private_key_":null,"Authenticating_a_buddy_helps_":null,"How_do_you_want_to_authenticate_your_buddy":null,"Select_method":null,"Manual":null,"Question":null,"Secret":null,"To_verify_the_fingerprint_":null,"Your_fingerprint":null,"Buddy_fingerprint":null,"Close":null,"Compared":null,"To_authenticate_using_a_question_":null,"Ask":null,"To_authenticate_pick_a_secret_":null,"Compare":null,"Fingerprints":null,"Authentication":null,"Message":null,"Add_buddy":null,"rename_buddy":null,"delete_buddy":null,"Login":null,"Username":null,"Password":null,"Cancel":null,"Connect":null,"Type_in_the_full_username_":null,"Alias":null,"Add":null,"Subscription_request":null,"You_have_a_request_from":null,"Deny":null,"Approve":null,"Remove_buddy":null,"You_are_about_to_remove_":null,"Continue_without_chat":null,"Please_wait":null,"Login_failed":null,"Sorry_we_cant_authentikate_":null,"Retry":null,"clear_history":null,"New_message_from":null,"Should_we_notify_you_":null,"Please_accept_":null,"Hide_offline":null,"Show_offline":null,"About":null,"dnd":null,"Mute":null,"Unmute":null,"Subscription":null,"both":null,"Status":null,"online":null,"chat":null,"away":null,"xa":null,"offline":null,"none":null,"Unknown_instance_tag":null,"Not_one_of_our_latest_keys":null,"Received_an_unreadable_encrypted_message":null,"Online":null,"Chatty":null,"Away":null,"Extended_away":null,"Offline":null,"Friendship_request":null,"Confirm":null,"Dismiss":null,"Remove":null,"Online_help":null,"FN":null,"N":null,"FAMILY":null,"GIVEN":null,"NICKNAME":null,"URL":null,"ADR":null,"STREET":null,"EXTADD":null,"LOCALITY":null,"REGION":null,"PCODE":null,"CTRY":null,"TEL":null,"NUMBER":null,"EMAIL":null,"USERID":null,"ORG":null,"ORGNAME":null,"ORGUNIT":null,"TITLE":null,"ROLE":null,"BDAY":null,"DESC":null,"PHOTO":null,"send_message":null,"get_info":null,"Settings":null,"Priority":null,"Save":null,"User_settings":null,"A_fingerprint_":null,"Your_roster_is_empty_add_a":null,"new_buddy":null,"is":null,"Login_options":null,"BOSH_url":null,"Domain":null,"Resource":null,"On_login":null,"Received_an_unencrypted_message":null,"Sorry_your_buddy_doesnt_provide_any_information":null,"Info_about":null,"Authentication_aborted":null,"Authentication_request_received":null,"Do_you_want_to_display_them":null,"Log_in_without_chat":null,"has_come_online":null,"Unknown_sender":null,"You_received_a_message_from_an_unknown_sender":null,"Please_allow_access_to_microphone_and_camera":null,"Incoming_call":null,"from":null,"Do_you_want_to_accept_the_call_from":null,"Reject":null,"Accept":null,"hang_up":null,"snapshot":null,"mute_my_audio":null,"pause_my_video":null,"fullscreen":null,"Info":null,"Local_IP":null,"Remote_IP":null,"Local_Fingerprint":null,"Remote_Fingerprint":null,"Video_call_not_possible":null,"Start_video_call":null,"Join_chat":null,"Join":null,"Room":null,"Nickname":null,"left_the_building":null,"entered_the_room":null,"is_now_known_as":null,"This_room_is":null,"muc_hidden":{"keyword":null,"description":null},"muc_membersonly":{"keyword":null,"description":null},"muc_moderated":{"keyword":null,"description":null},"muc_nonanonymous":{"keyword":null,"description":null},"muc_open":{"keyword":null,"description":null},"muc_passwordprotected":{"keyword":null,"description":null},"muc_persistent":{"keyword":null,"description":null},"muc_public":{"keyword":null,"description":null},"muc_semianonymous":{"keyword":null,"description":null},"muc_temporary":{"keyword":null,"description":null},"muc_unmoderated":{"keyword":null,"description":null},"muc_unsecured":{"keyword":null,"description":null},"Continue":null,"Server":null,"Rooms_are_loaded":null,"Could_load_only":null,"muc_explanation":null,"You_already_joined_this_room":null,"This_room_will_be_closed":null,"Room_not_found_":null,"Loading_room_information":null,"Destroy":null,"Leave":null,"changed_subject_to":null,"muc_removed_kicked":null,"muc_removed_info_kicked":null,"muc_removed_banned":null,"muc_removed_info_banned":null,"muc_removed_affiliation":null,"muc_removed_info_affiliation":null,"muc_removed_membersonly":null,"muc_removed_info_membersonly":null,"muc_removed_shutdown":null,"Reason":null,"message_not_send":null,"message_not_send_item-not-found":null,"message_not_send_forbidden":null,"message_not_send_not-acceptable":null,"This_room_has_been_closed":null,"Room_logging_is_enabled":null,"A_password_is_required":null,"You_are_not_on_the_member_list":null,"You_are_banned_from_this_room":null,"Your_desired_nickname_":null,"The_maximum_number_":null,"This_room_is_locked_":null,"You_are_not_allowed_to_create_":null,"Carbon_copy":null,"Enable":null}}}; \ No newline at end of file
+var I18next = {"de":{"translation":{"Logging_in":"Login läuft…","your_connection_is_unencrypted":"Deine Verbindung ist unverschlüsselt.","your_connection_is_encrypted":"Deine Verbindung ist verschlüsselt.","your_buddy_closed_the_private_connection":"Dein Kontakt hat die private Verbindung getrennt.","start_private":"Privat starten","close_private":"Privat abbrechen","your_buddy_is_verificated":"Dein Kontakt ist verifiziert.","you_have_only_a_subscription_in_one_way":"Der Kontaktstatus ist einseitig.","authentication_query_sent":"Authentifizierungsanfrage gesendet.","your_message_wasnt_send_please_end_your_private_conversation":"Deine Nachricht wurde nicht gesendet. Bitte beende die private Konversation.","unencrypted_message_received":"Unverschlüsselte Nachricht erhalten.","not_available":"Nicht verfügbar.","no_connection":"Keine Verbindung.","relogin":"Neu anmelden.","trying_to_start_private_conversation":"Versuche private Konversation zu starten.","Verified":"Verifiziert","Unverified":"Unverifiziert","private_conversation_aborted":"Private Konversation abgebrochen.","your_buddy_closed_the_private_conversation_you_should_do_the_same":"Dein Kontakt hat die private Konversation beendet. Das solltest du auch tun!","conversation_is_now_verified":"Konversation ist jetzt verifiziert","authentication_failed":"Authentifizierung fehlgeschlagen.","Creating_your_private_key_":"Wir werden jetzt deinen privaten Schlüssel generieren. Das kann einige Zeit in Anspruch nehmen.","Authenticating_a_buddy_helps_":"Einen Kontakt zu authentifizieren hilft sicherzustellen, dass die Person mit der du sprichst auch die ist die sie sagt.","How_do_you_want_to_authenticate_your_buddy":"Wie willst du {{bid_name}} (<b>{{bid_jid}}</b>) authentifizieren?","Select_method":"Wähle...","Manual":"Manual","Question":"Frage","Secret":"Geheimnis","To_verify_the_fingerprint_":"Um den Fingerprint zu verifizieren kontaktiere dein Kontakt über einen anderen Kommunikationsweg. Zum Beispiel per Telefonanruf.","Your_fingerprint":"Dein Fingerprint","Buddy_fingerprint":"Sein/Ihr Fingerprint","Close":"Schließen","Compared":"Verglichen","To_authenticate_using_a_question_":"Um die Authentifizierung per Frage durchzuführen, wähle eine Frage bei welcher nur dein Kontakt die Antwort kennt.","Ask":"Frage","To_authenticate_pick_a_secret_":"Um deinen Kontakt zu authentifizieren, wähle ein Geheimnis welches nur deinem Kontakt und dir bekannt ist.","Compare":"Vergleiche","Fingerprints":"Fingerprints","Authentication":"Authentifizierung","Message":"Nachricht","Add_buddy":"Kontakt hinzufügen","rename_buddy":"Kontakt umbenennen","delete_buddy":"Kontakt löschen","Login":"Anmeldung","Username":"Benutzername","Password":"Passwort","Cancel":"Abbrechen","Connect":"Verbinden","Type_in_the_full_username_":"Gib bitte den vollen Benutzernamen und optional ein Alias an.","Alias":"Alias","Add":"Hinzufügen","Subscription_request":"Kontaktanfrage","You_have_a_request_from":"Du hast eine Anfrage von","Deny":"Ablehnen","Approve":"Bestätigen","Remove_buddy":"Kontakt entfernen","You_are_about_to_remove_":"Du bist gerade dabei {{bid_name}} (<b>{{bid_jid}}</b>) von deiner Kontaktliste zu entfernen. Alle Chats werden geschlossen.","Continue_without_chat":"Weiter ohne Chat","Please_wait":"Bitte warten","Login_failed":"Chat-Anmeldung fehlgeschlagen","Sorry_we_cant_authentikate_":"Der Chatserver hat die Anmeldung abgelehnt. Falsches Passwort?","Retry":"Zurück","clear_history":"Lösche Verlauf","New_message_from":"Neue Nachricht von __name__","Should_we_notify_you_":"Sollen wir dich in Zukunft über eingehende Nachrichten informieren, auch wenn dieser Tab nicht im Vordergrund ist?","Please_accept_":"Bitte klick auf den \"Zulassen\" Button oben.","Hide_offline":"Offline ausblenden","Show_offline":"Offline einblenden","About":"Über","dnd":"Beschäftigt","Mute":"Ton aus","Unmute":"Ton an","Subscription":"Bezug","both":"beidseitig","Status":"Status","online":"online","chat":"chat","away":"abwesend","xa":"länger abwesend","offline":"offline","none":"keine","Unknown_instance_tag":"Unbekannter instance tag.","Not_one_of_our_latest_keys":"Nicht einer unserer letzten Schlüssel.","Received_an_unreadable_encrypted_message":"Eine unlesbare verschlüsselte Nachricht erhalten.","Online":"Online","Chatty":"Gesprächig","Away":"Abwesend","Extended_away":"Länger abwesend","Offline":"Offline","Friendship_request":"Kontaktanfrage","Confirm":"Bestätigen","Dismiss":"Ablehnen","Remove":"Löschen","Online_help":"Online Hilfe","FN":"Name","N":" ","FAMILY":"Familienname","GIVEN":"Vorname","NICKNAME":"Spitzname","URL":"URL","ADR":"Adresse","STREET":"Straße","EXTADD":"Zusätzliche Adresse","LOCALITY":"Ortschaft","REGION":"Region","PCODE":"Postleitzahl","CTRY":"Land","TEL":"Telefon","NUMBER":"Nummer","EMAIL":"E-Mail","USERID":" ","ORG":"Organisation","ORGNAME":"Name","ORGUNIT":"Abteilung","TITLE":"Titel","ROLE":"Rolle","BDAY":"Geburtstag","DESC":"Beschreibung","PHOTO":" ","send_message":"Sende Nachricht","get_info":"Benutzerinformationen","Settings":"Einstellungen","Priority":"Priorität","Save":"Speichern","User_settings":"Benutzereinstellungen","A_fingerprint_":"Ein Fingerabdruck wird dazu benutzt deinen Gesprächspartner zu identifizieren.","is":"ist","Login_options":"Anmeldeoptionen","BOSH_url":"BOSH url","Domain":"Domain","Resource":"Ressource","On_login":"Beim Anmelden","Received_an_unencrypted_message":"Unverschlüsselte Nachricht empfangen","Sorry_your_buddy_doesnt_provide_any_information":"Dein Kontakt stellt leider keine Informationen bereit.","Info_about":"Info über","Authentication_aborted":"Authentifizierung abgebrochen.","Authentication_request_received":"Authentifizierungsanfrage empfangen.","Log_in_without_chat":"Anmelden ohne Chat","has_come_online":"ist online gekommen","Unknown_sender":"Unbekannter Sender","Please_allow_access_to_microphone_and_camera":"Bitte klick auf den \"Zulassen\" Button oben, um den Zugriff auf Kamera und Mikrofon zu erlauben.","Incoming_call":"Eingehender Anruf","from":"von","Do_you_want_to_accept_the_call_from":"Möchtest Du den Anruf annehmen von","Reject":"Ablehnen","Accept":"Annehmen","hang_up":"Auflegen","snapshot":"Schnappschuss","mute_my_audio":"Mein Ton aus","pause_my_video":"Mein Video pausieren","fullscreen":"Vollbild","Info":"Info","Local_IP":"Lokale IP","Remote_IP":"Remote IP","Local_Fingerprint":"Lokaler Fingerprint","Remote_Fingerprint":"Remote Fingerprint","Video_call_not_possible":"Videoanruf nicht verfügbar. Dein Gesprächspartner unterstützt keine Videotelefonie.","Start_video_call":"Starte Videoanruf","Join_chat":"Gruppe beitreten","Join":"Betreten","Room":"Gruppe","Nickname":"Nickname","left_the_building":"__nickname__ hat die Gruppe verlassen","entered_the_room":"__nickname__ ist der Gruppe beigetreten","is_now_known_as":"__oldNickname__ ist nun unter __newNickname__ bekannt","This_room_is":"Diese Gruppe ist","muc_hidden":{"keyword":"versteckt","description":"kann durch die Suche nicht gefunden werden"},"muc_membersonly":{"keyword":"nur für Mitglieder","description":"du musst auf der Mitgliederliste stehen"},"muc_moderated":{"keyword":"moderiert","description":"Nur Personen die \"Mitspracherecht\" haben dürfen Nachrichten senden"},"muc_nonanonymous":{"keyword":"nicht anonym","description":"deine Jabber ID wird für alle Mitglieder sichtbar sein"},"muc_open":{"keyword":"offen","description":"jeder darf dieser Gruppe beitreten"},"muc_passwordprotected":{"keyword":"passwortgeschützt","description":"du benötigst das korrekte Passwort"},"muc_persistent":{"keyword":"permanent","description":"wird nicht geschlossen, wenn das letzte Mitglied die Gruppe verlässt"},"muc_public":{"keyword":"öffentlich","description":"kann durch die Suche gefunden werden"},"muc_semianonymous":{"keyword":"teilweise anonym","description":"deine Jabber ID wird nur für die Gruppen Administratoren sichtbar sein"},"muc_temporary":{"keyword":"temporär","description":"wird geschlossen, wenn das letzte Mitglied die Gruppe verlässt"},"muc_unmoderated":{"keyword":"nicht moderiert","description":"jeder darf Nachrichten senden"},"muc_unsecured":{"keyword":"ungesichert","description":"es wird kein Passwort benötigt"},"Continue":"Weiter","Server":"Server","Rooms_are_loaded":"Gruppen werden geladen","Could_load_only":"Es konnten nur __count__ Gruppen für die Autovervollständigung geladen werden","muc_explanation":"Bitte trage den Gruppennamen und optional ein Nickname und Passwort ein um einer Gruppe beizutreten","You_already_joined_this_room":"Du bist dieser Gruppe bereits beigetreten","This_room_will_be_closed":"Diese Gruppe wird geschlossen","Room_not_found_":"Es wird eine neue Gruppe erstellt","Loading_room_information":"Informationen über Gruppe werden geladen","Destroy":"Auflösen","Leave":"Verlassen","changed_subject_to":"__nickname__ hat das Thema auf __subject__ geändert","muc_removed_kicked":"Du wurdest aus der Gruppe entfernt","muc_removed_info_kicked":"__nickname__ wurde aus der Gruppe entfernt","muc_removed_banned":"Du wurdest aus der Gruppe ausgeschlossen","muc_removed_info_banned":"__nickname__ wurde aus der Gruppe ausgeschlossen","muc_removed_affiliation":"Du wurdest aus der Gruppe entfernt wegen einer Änderung deines Mitgliedstatus","muc_removed_info_affiliation":"__nickname__ wurde aus der Gruppe entfernt wegen einer Änderung seines Mitgliedstatus","muc_removed_membersonly":"Diese Gruppe erlaubt jetzt nur noch eingetragene Mitglieder und da du nicht dazugehörst, wurdest du aus der Gruppen entfernt","muc_removed_info_membersonly":"Diese Gruppe erlaubt jetzt nur noch eingetragene Mitglieder und __nickname__ gehört nicht dazu, daher wurde er aus der Gruppe entfernt","muc_removed_shutdown":"Du wurdest aus der Gruppe entfernt, da der MUC Server heruntergefahren wird","Reason":"Grund","message_not_send":"Deine Nachricht wurde aufgrund eines Fehlers nicht versandt","message_not_send_item-not-found":"Deine Nachricht wurde nicht versandt, da der Raum nicht mehr existiert","message_not_send_forbidden":"Deine Nachricht wurde nicht versandt, da du kein \"Mitspracherecht\" hast","message_not_send_not-acceptable":"Deine Nachricht wurde nicht versandt, da du kein Mitglied dieser Gruppe bist","This_room_has_been_closed":"Diese Gruppe wurde geschlossen","Room_logging_is_enabled":"Gesprächsverlauf kann öffentlich einsehbar sein","A_password_is_required":"Es wird ein Passwort benötigt","You_are_not_on_the_member_list":"Du bist kein eingetragenes Mitglied","You_are_banned_from_this_room":"Du wurdest von dieser Gruppe ausgeschlossen","Your_desired_nickname_":"Dein gewünschter Nickname wird bereits verwendet. Bitte wähle einen anderen.","The_maximum_number_":"Die maximale Anzahl der Mitglieder wurde erreicht.","This_room_is_locked_":"Diese Gruppe ist gesperrt","You_are_not_allowed_to_create_":"Du darfst keine neue Gruppe erstellen","Alert":"Alarm","Call_started":"Anruf gestarted","Call_terminated":"Anruf beendet","Carbon_copy":null,"Enable":"Aktivieren","jingle_reason_busy":"beschäftigt","jingle_reason_decline":"abgelehnt","jingle_reason_success":"aufgelegt","Media_failure":"Gerätefehler","No_local_audio_device":"Kein eigenes Audio Gerät","No_local_video_device":"Keine eigene Webcam","Ok":"Ok","PermissionDeniedError":"Du oder dein Browser haben die Audio/Video Berechtigung verweigert","Use_local_audio_device":"Nutze eigenes Audio Gerät","Use_local_video_device":"Benutze eigene Webcam","is_":"ist __status__","You_received_a_message_from_an_unknown_sender_":"Du hast eine Nachricht von einem unbekannten Sender erhalten (__sender__) Möchtest du sie sehen?","Your_roster_is_empty_add_":"Deine Kontaktliste ist leer, füge einen neuen Kontakt <a>hinzu</a>","onsmp_explanation_question":"Dein Kontakt versucht herauszufinden ob er wirklich mit dir redet. Um dich gegenüber deinem Kontakt zu verifizieren gib die Antwort ein und klick auf Antworten.","onsmp_explanation_secret":"Dein Kontakt versucht herauszufinden ob er wirklich mit dir redet. Um dich gegenüber deinem Kontakt zu verifizieren gib das Geheimnis ein.","from_sender":"von __sender__","Verified_private_conversation_started":"Verifiziert Private Konversation gestartet.","Unverified_private_conversation_started":"Unverifiziert Private Konversation gestartet."}},"el":{"translation":{"Logging_in":null,"your_connection_is_unencrypted":null,"your_connection_is_encrypted":null,"your_buddy_closed_the_private_connection":null,"start_private":null,"close_private":null,"your_buddy_is_verificated":null,"you_have_only_a_subscription_in_one_way":null,"authentication_query_sent":null,"your_message_wasnt_send_please_end_your_private_conversation":null,"unencrypted_message_received":null,"not_available":null,"no_connection":null,"relogin":null,"trying_to_start_private_conversation":null,"Verified":null,"Unverified":null,"private_conversation_aborted":null,"your_buddy_closed_the_private_conversation_you_should_do_the_same":null,"conversation_is_now_verified":null,"authentication_failed":null,"Creating_your_private_key_":null,"Authenticating_a_buddy_helps_":null,"How_do_you_want_to_authenticate_your_buddy":null,"Select_method":null,"Manual":null,"Question":null,"Secret":null,"To_verify_the_fingerprint_":null,"Your_fingerprint":null,"Buddy_fingerprint":null,"Close":null,"Compared":null,"To_authenticate_using_a_question_":null,"Ask":null,"To_authenticate_pick_a_secret_":null,"Compare":null,"Fingerprints":null,"Authentication":null,"Message":null,"Add_buddy":null,"rename_buddy":null,"delete_buddy":null,"Login":null,"Username":null,"Password":null,"Cancel":null,"Connect":null,"Type_in_the_full_username_":null,"Alias":null,"Add":null,"Subscription_request":null,"You_have_a_request_from":null,"Deny":null,"Approve":null,"Remove_buddy":null,"You_are_about_to_remove_":null,"Continue_without_chat":null,"Please_wait":null,"Login_failed":null,"Sorry_we_cant_authentikate_":null,"Retry":null,"clear_history":null,"New_message_from":null,"Should_we_notify_you_":null,"Please_accept_":null,"Hide_offline":null,"Show_offline":null,"About":null,"dnd":null,"Mute":null,"Unmute":null,"Subscription":null,"both":null,"Status":null,"online":null,"chat":null,"away":null,"xa":null,"offline":null,"none":null,"Unknown_instance_tag":null,"Not_one_of_our_latest_keys":null,"Received_an_unreadable_encrypted_message":null,"Online":null,"Chatty":null,"Away":null,"Extended_away":null,"Offline":null,"Friendship_request":null,"Confirm":null,"Dismiss":null,"Remove":null,"Online_help":null,"FN":null,"N":null,"FAMILY":null,"GIVEN":null,"NICKNAME":null,"URL":null,"ADR":null,"STREET":null,"EXTADD":null,"LOCALITY":null,"REGION":null,"PCODE":null,"CTRY":null,"TEL":null,"NUMBER":null,"EMAIL":null,"USERID":null,"ORG":null,"ORGNAME":null,"ORGUNIT":null,"TITLE":null,"ROLE":null,"BDAY":null,"DESC":null,"PHOTO":null,"send_message":null,"get_info":null,"Settings":null,"Priority":null,"Save":null,"User_settings":null,"A_fingerprint_":null,"is":null,"Login_options":null,"BOSH_url":null,"Domain":null,"Resource":null,"On_login":null,"Received_an_unencrypted_message":null,"Sorry_your_buddy_doesnt_provide_any_information":null,"Info_about":null,"Authentication_aborted":null,"Authentication_request_received":null,"Log_in_without_chat":null,"has_come_online":null,"Unknown_sender":null,"Please_allow_access_to_microphone_and_camera":null,"Incoming_call":null,"from":null,"Do_you_want_to_accept_the_call_from":null,"Reject":null,"Accept":null,"hang_up":null,"snapshot":null,"mute_my_audio":null,"pause_my_video":null,"fullscreen":null,"Info":null,"Local_IP":null,"Remote_IP":null,"Local_Fingerprint":null,"Remote_Fingerprint":null,"Video_call_not_possible":null,"Start_video_call":null,"Join_chat":null,"Join":null,"Room":null,"Nickname":null,"left_the_building":null,"entered_the_room":null,"is_now_known_as":null,"This_room_is":null,"muc_hidden":{"keyword":null,"description":null},"muc_membersonly":{"keyword":null,"description":null},"muc_moderated":{"keyword":null,"description":null},"muc_nonanonymous":{"keyword":null,"description":null},"muc_open":{"keyword":null,"description":null},"muc_passwordprotected":{"keyword":null,"description":null},"muc_persistent":{"keyword":null,"description":null},"muc_public":{"keyword":null,"description":null},"muc_semianonymous":{"keyword":null,"description":null},"muc_temporary":{"keyword":null,"description":null},"muc_unmoderated":{"keyword":null,"description":null},"muc_unsecured":{"keyword":null,"description":null},"Continue":null,"Server":null,"Rooms_are_loaded":null,"Could_load_only":null,"muc_explanation":null,"You_already_joined_this_room":null,"This_room_will_be_closed":null,"Room_not_found_":null,"Loading_room_information":null,"Destroy":null,"Leave":null,"changed_subject_to":null,"muc_removed_kicked":null,"muc_removed_info_kicked":null,"muc_removed_banned":null,"muc_removed_info_banned":null,"muc_removed_affiliation":null,"muc_removed_info_affiliation":null,"muc_removed_membersonly":null,"muc_removed_info_membersonly":null,"muc_removed_shutdown":null,"Reason":null,"message_not_send":null,"message_not_send_item-not-found":null,"message_not_send_forbidden":null,"message_not_send_not-acceptable":null,"This_room_has_been_closed":null,"Room_logging_is_enabled":null,"A_password_is_required":null,"You_are_not_on_the_member_list":null,"You_are_banned_from_this_room":null,"Your_desired_nickname_":null,"The_maximum_number_":null,"This_room_is_locked_":null,"You_are_not_allowed_to_create_":null,"Alert":null,"Call_started":null,"Call_terminated":null,"Carbon_copy":null,"Enable":null,"jingle_reason_busy":null,"jingle_reason_decline":null,"jingle_reason_success":null,"Media_failure":null,"No_local_audio_device":null,"No_local_video_device":null,"Ok":null,"PermissionDeniedError":null,"Use_local_audio_device":null,"Use_local_video_device":null,"is_":null,"You_received_a_message_from_an_unknown_sender_":null,"Your_roster_is_empty_add_":null,"onsmp_explanation_question":null,"onsmp_explanation_secret":null,"from_sender":null,"Verified_private_conversation_started":null,"Unverified_private_conversation_started":null}},"en":{"translation":{"Logging_in":"Logging in…","your_connection_is_unencrypted":"Your connection is unencrypted.","your_connection_is_encrypted":"Your connection is encrypted.","your_buddy_closed_the_private_connection":"Your contact closed the private connection.","start_private":"Start private","close_private":"Close private","your_buddy_is_verificated":"Your contact is verified.","you_have_only_a_subscription_in_one_way":"You only have a one-way subscription.","authentication_query_sent":"Authentication query sent.","your_message_wasnt_send_please_end_your_private_conversation":"Your message was not sent. Please end your private conversation.","unencrypted_message_received":"Unencrypted message received","not_available":"Not available","no_connection":"No connection!","relogin":"relogin","trying_to_start_private_conversation":"Trying to start private conversation!","Verified":"Verified","Unverified":"Unverified","private_conversation_aborted":"Private conversation aborted!","your_buddy_closed_the_private_conversation_you_should_do_the_same":"Your contact closed the private conversation! You should do the same.","conversation_is_now_verified":"Conversation is now verified.","authentication_failed":"Authentication failed.","Creating_your_private_key_":"Creating your private key; this may take a while.","Authenticating_a_buddy_helps_":"Authenticating a contact helps ensure that the person you are talking to is really the one they claim to be.","How_do_you_want_to_authenticate_your_buddy":"How do you want to authenticate {{bid_name}} (<b>{{bid_jid}}</b>)?","Select_method":"Select method...","Manual":"Manual","Question":"Question","Secret":"Secret","To_verify_the_fingerprint_":"To verify the fingerprint, contact your contact via some other trustworthy channel, such as the telephone.","Your_fingerprint":"Your fingerprint","Buddy_fingerprint":"Contact fingerprint","Close":"Close","Compared":"Compared","To_authenticate_using_a_question_":"To authenticate using a question, pick a question whose answer is known only you and your contact.","Ask":"Ask","To_authenticate_pick_a_secret_":"To authenticate, pick a secret known only to you and your contact.","Compare":"Compare","Fingerprints":"Fingerprints","Authentication":"Authentication","Message":"Message","Add_buddy":"Add contact","rename_buddy":"rename contact","delete_buddy":"delete contact","Login":"Login","Username":"Username","Password":"Password","Cancel":"Cancel","Connect":"Connect","Type_in_the_full_username_":"Type in the full username and an optional alias.","Alias":"Alias","Add":"Add","Subscription_request":"Subscription request","You_have_a_request_from":"You have a request from","Deny":"Deny","Approve":"Approve","Remove_buddy":"Remove contact","You_are_about_to_remove_":"You are about to remove {{bid_name}} (<b>{{bid_jid}}</b>) from your contact list. All related chats will be closed.","Continue_without_chat":"Continue without chat","Please_wait":"Please wait","Login_failed":"Chat login failed","Sorry_we_cant_authentikate_":"Authentication failed with the chat server. Maybe the password is wrong?","Retry":"Back","clear_history":"Clear history","New_message_from":"New message from __name__","Should_we_notify_you_":"Should we notify you about new messages in the future?","Please_accept_":"Please click the \"Allow\" button at the top.","Hide_offline":"Hide offline contacts","Show_offline":"Show offline contacts","About":"About","dnd":"Do Not Disturb","Mute":"Mute","Unmute":"Unmute","Subscription":"Subscription","both":"both","Status":"Status","online":"online","chat":"chat","away":"away","xa":"extended away","offline":"offline","none":"none","Unknown_instance_tag":"Unknown instance tag.","Not_one_of_our_latest_keys":"Not one of our latest keys.","Received_an_unreadable_encrypted_message":"Received an unreadable encrypted message.","Online":"Online","Chatty":"Chatty","Away":"Away","Extended_away":"Extended away","Offline":"Offline","Friendship_request":"Contact request","Confirm":"Confirm","Dismiss":"Dismiss","Remove":"Remove","Online_help":"Online help","FN":"Full name","N":" ","FAMILY":"Family name","GIVEN":"Given name","NICKNAME":"Nickname","URL":"URL","ADR":"Address","STREET":"Street Address","EXTADD":"Extended Address","LOCALITY":"Locality","REGION":"Region","PCODE":"Postal Code","CTRY":"Country","TEL":"Telephone","NUMBER":"Number","EMAIL":"Email","USERID":" ","ORG":"Organization","ORGNAME":"Name","ORGUNIT":"Unit","TITLE":"Job title","ROLE":"Role","BDAY":"Birthday","DESC":"Description","PHOTO":" ","send_message":"Send message","get_info":"Show information","Settings":"Settings","Priority":"Priority","Save":"Save","User_settings":"User settings","A_fingerprint_":"A fingerprint is used to make sure that the person you are talking to is who he or she is saying.","is":"is","Login_options":"Login options","BOSH_url":"BOSH URL","Domain":"Domain","Resource":"Resource","On_login":"On login","Received_an_unencrypted_message":"Received an unencrypted message","Sorry_your_buddy_doesnt_provide_any_information":"Sorry, your contact does not provide any information.","Info_about":"Info about","Authentication_aborted":"Authentication aborted.","Authentication_request_received":"Authentication request received.","Log_in_without_chat":"Log in without chat","has_come_online":"has come online","Unknown_sender":"Unknown sender","Please_allow_access_to_microphone_and_camera":"Please click the \"Allow\" button at the top, to allow access to microphone and camera.","Incoming_call":"Incoming call","from":"from","Do_you_want_to_accept_the_call_from":"Do you want to accept the call from","Reject":"Reject","Accept":"Accept","hang_up":"hang up","snapshot":"snapshot","mute_my_audio":"mute my audio","pause_my_video":"pause my video","fullscreen":"fullscreen","Info":"Info","Local_IP":"Local IP","Remote_IP":"Remote IP","Local_Fingerprint":"Local fingerprint","Remote_Fingerprint":"Remote fingerprint","Video_call_not_possible":"Video call not possible. Your contact does not support video calls.","Start_video_call":"Start video call","Join_chat":"Join chat","Join":"Join","Room":"Room","Nickname":"Nickname","left_the_building":"__nickname__ left the building","entered_the_room":"__nickname__ entered the room","is_now_known_as":"__oldNickname__ is now known as __newNickname__","This_room_is":"This room is","muc_hidden":{"keyword":"hidden","description":"can not be found through search"},"muc_membersonly":{"keyword":"members-only","description":"you need to be on the member list"},"muc_moderated":{"keyword":"moderated","description":"only persons with \"voice\" are allowed to send messages"},"muc_nonanonymous":{"keyword":"non-anonymous","description":"your jabber id is exposed to all other occupants"},"muc_open":{"keyword":"open","description":"everyone is allowed to join"},"muc_passwordprotected":{"keyword":"password-protected","description":"you need to provide the correct password"},"muc_persistent":{"keyword":"persistent","description":"will not be destroyed if the last occupant left"},"muc_public":{"keyword":"public","description":"can be found through search"},"muc_semianonymous":{"keyword":"semi-anonymous","description":"your jabber id is only exposed to room admins"},"muc_temporary":{"keyword":"temporary","description":"will be destroyed if the last occupant left"},"muc_unmoderated":{"keyword":"unmoderated","description":"everyone is allowed to send messages"},"muc_unsecured":{"keyword":"unsecured","description":"you need no password to enter"},"Continue":"Continue","Server":"Server","Rooms_are_loaded":"Rooms are loaded","Could_load_only":"Could load only __count__ rooms for autocomplete","muc_explanation":"Please enter room name and optional a nickname and password to join a chat","You_already_joined_this_room":"You already joined this room","This_room_will_be_closed":"This room will be closed","Room_not_found_":"A new room will be created","Loading_room_information":"Loading room information","Destroy":"Destroy","Leave":"Leave","changed_subject_to":"__nickname__ changed the room subject to \"__subject__\"","muc_removed_kicked":"You have been kicked from the room","muc_removed_info_kicked":"__nickname__ has been kicked from the room","muc_removed_banned":"You have been banned from the room","muc_removed_info_banned":"__nickname__ has been banned from the room","muc_removed_affiliation":"You have been removed from the room, because of an affiliation change","muc_removed_info_affiliation":"__nickname__ has been removed from the room, because of an affiliation change","muc_removed_membersonly":"You have been removed from the room, because the room has been changed to members-only and you are no member","muc_removed_info_membersonly":"__nickname__ has been removed from the room, because the room has been changed to members-only and you are no member","muc_removed_shutdown":"You have been removed from the room, because the MUC service is being shut down","Reason":"Reason","message_not_send":"Your message was not send because of an error","message_not_send_item-not-found":"Your message was not send because this room does not exist","message_not_send_forbidden":"Your message was not send because you have no voice in this room","message_not_send_not-acceptable":"Your message was not send because you are no occupant of this room","This_room_has_been_closed":"This room has been closed","Room_logging_is_enabled":"Room logging is enabled","A_password_is_required":"A password is required","You_are_not_on_the_member_list":"You are not on the member list","You_are_banned_from_this_room":"You are banned from this room","Your_desired_nickname_":"Your desired nickname is already in use. Please choose another","The_maximum_number_":"The maximum number of user is reached in this room","This_room_is_locked_":"This room is locked","You_are_not_allowed_to_create_":"You are not allowed to create a room","Alert":"Alert","Call_started":"Call started","Call_terminated":"Call terminated","Carbon_copy":"Carbon copy","Enable":"Enable","jingle_reason_busy":"busy","jingle_reason_decline":"decline","jingle_reason_success":"hung up","Media_failure":"Media failure","No_local_audio_device":"No local audio device.","No_local_video_device":"No local video device.","Ok":"Ok","PermissionDeniedError":"You or your browser denied audio/video permission","Use_local_audio_device":"Use local audio device.","Use_local_video_device":"Use local video device.","is_":"is __status__","You_received_a_message_from_an_unknown_sender_":"You received a message from an unknown sender (__sender__) Do you want to display them?","Your_roster_is_empty_add_":"Your roster is empty, add a <a>new contact</a>","onsmp_explanation_question":"You contact is attempting to determine if they are really talking to you. To authenticate to your contact, enter the answer and click Answer.","onsmp_explanation_secret":"You contact is attempting to determine if they are really talking to you. To authenticate to your contact, enter the secret.","from_sender":"from __sender__","Verified_private_conversation_started":"Verified Private conversation started.","Unverified_private_conversation_started":"Unverified Private conversation started.","Bookmark":"Bookmark","Auto-join":"Auto-join","Edit_bookmark":"Edit bookmark","Room_logging_is_disabled":"Room logging is disabled","Room_is_now_non-anoymous":"Room is now non-anonymous","Room_is_now_semi-anonymous":"Room is now semi-anonymous","Do_you_want_to_change_the_default_room_configuration":"Do you want to change the default room configuration?","Default":"Default","Change":"Change"}},"es":{"translation":{"Logging_in":"Por favor, espere...","your_connection_is_unencrypted":"Su conexión no está cifrada.","your_connection_is_encrypted":"Su conexión está cifrada.","your_buddy_closed_the_private_connection":"Su amigo ha cerrado la conexión privada.","start_private":"Iniciar privado","close_private":"Cerrar privado","your_buddy_is_verificated":"Tu amigo está verificado.","you_have_only_a_subscription_in_one_way":"Sólo tienes una suscripción de un modo.","authentication_query_sent":"Consulta de verificación enviada.","your_message_wasnt_send_please_end_your_private_conversation":"Su mensaje no fue enviado. Por favor, termine su conversación privada.","unencrypted_message_received":"Mensaje no cifrado recibido:","not_available":"No disponible","no_connection":"Sin conexión!","relogin":"iniciar sesión nuevamente","trying_to_start_private_conversation":"Intentando iniciar una conversación privada!","Verified":"Verificado","Unverified":"No verificado","private_conversation_aborted":"Conversación privada abortada!","your_buddy_closed_the_private_conversation_you_should_do_the_same":"Su amigo cerró la conversación privada! Usted debería hacer lo mismo.","conversation_is_now_verified":"La conversación es ahora verificada.","authentication_failed":"Fallo la verificación.","Creating_your_private_key_":"Ahora vamos a crear su clave privada. Esto puede tomar algún tiempo.","Authenticating_a_buddy_helps_":"Autenticación de un amigo ayuda a garantizar que la persona que está hablando es quien él o ella está diciendo.","How_do_you_want_to_authenticate_your_buddy":"¿Cómo desea autenticar {{bid_name}} (<b>{{bid_jid}}</b>)?","Select_method":"Escoja un método...","Manual":"Manual","Question":"Pregunta","Secret":"Secreto","To_verify_the_fingerprint_":"Para verificar la firma digital, póngase en contacto con su amigo a través de algún otro canal autenticado, como el teléfono.","Your_fingerprint":"Tu firma digital","Buddy_fingerprint":"firma digital de tu amigo","Close":"Cerrar","Compared":"Comparado","To_authenticate_using_a_question_":"Para autenticar mediante una pregunta, elegir una pregunta cuya respuesta se conoce sólo usted y su amigo.","Ask":"Preguntar","To_authenticate_pick_a_secret_":"Para autenticar, elija un secreto conocido sólo por usted y su amigo.","Compare":"Comparar","Fingerprints":"Firmas digitales","Authentication":"Autenticación","Message":"Mensaje","Add_buddy":"Añadir amigo","rename_buddy":"renombrar amigo","delete_buddy":"eliminar amigo","Login":"Iniciar Sesión","Username":"Usuario","Password":"Contraseña","Cancel":"Cancelar","Connect":"Conectar","Type_in_the_full_username_":"Escriba el usuario completo y un alias opcional.","Alias":"Alias","Add":"Añadir","Subscription_request":"Solicitud de suscripción","You_have_a_request_from":"Tienes una petición de","Deny":"Rechazar","Approve":"Aprobar","Remove_buddy":"Eliminar amigo","You_are_about_to_remove_":"Vas a eliminar a {{bid_name}} (<b>{{bid_jid}}</b>) de tu lista de amigos. Todas las conversaciones relacionadas serán cerradas.","Continue_without_chat":"Continuar","Please_wait":"Espere por favor","Login_failed":"Fallo el inicio de sesión","Sorry_we_cant_authentikate_":"Lo sentimos, no podemos autentificarlo en nuestro servidor de chat. ¿Tal vez la contraseña es incorrecta?","Retry":"Reintentar","clear_history":"Borrar el historial","New_message_from":"Nuevo mensaje de __name__","Should_we_notify_you_":"¿Debemos notificarle sobre nuevos mensajes en el futuro?","Please_accept_":"Por favor, haga clic en el botón \"Permitir\" en la parte superior.","Hide_offline":"Ocultar contactos desconectados","Show_offline":"Mostrar contactos desconectados","About":"Acerca de","dnd":"No Molestar","Mute":"Desactivar sonido","Unmute":"Activar sonido","Subscription":"Suscripción","both":"ambos","Status":"Estado","online":"en línea","chat":"chat","away":"ausente","xa":"mas ausente","offline":"desconectado","none":"nadie","Unknown_instance_tag":"Etiqueta de instancia desconocida.","Not_one_of_our_latest_keys":"No de nuestra ultima tecla.","Received_an_unreadable_encrypted_message":"Se recibió un mensaje cifrado ilegible.","Online":"En linea","Chatty":"Hablador","Away":"Ausente","Extended_away":"Mas ausente","Offline":"Desconectado","Friendship_request":"Solicitud de amistad","Confirm":"Confirmar","Dismiss":"Rechazar","Remove":"Eliminar","Online_help":"Ayuda en línea","FN":"Nombre completo ","N":" ","FAMILY":"Apellido","GIVEN":"Nombre","NICKNAME":"Apodar","URL":"URL","ADR":"Dirección","STREET":"Calle","EXTADD":"Extendido dirección","LOCALITY":"Población","REGION":"Región","PCODE":"Código postal","CTRY":"País","TEL":"Teléfono","NUMBER":"Número","EMAIL":"Emilio","USERID":" ","ORG":"Organización","ORGNAME":"Nombre","ORGUNIT":"Departamento","TITLE":"Título","ROLE":"Rol","BDAY":"Cumpleaños","DESC":"Descripción","PHOTO":" ","send_message":"mandar un texto","get_info":"obtener información","Settings":"Ajustes","Priority":"Prioridad","Save":"Guardar","User_settings":"Configuración de usuario","A_fingerprint_":"La huella digital se utiliza para que puedas estar seguro que la persona con la que estas hablando es quien realmente dice ser","is":"es","Login_options":"Opciones de login","BOSH_url":"BOSH url","Domain":"Dominio","Resource":"Recurso","On_login":"Iniciar sesión","Received_an_unencrypted_message":"Recibe un mensaje no cifrado","Sorry_your_buddy_doesnt_provide_any_information":"Lo sentimos, su amigo no provee ninguna información.","Info_about":"Info acerca de","Authentication_aborted":"Autenticación abortada","Authentication_request_received":"Pedido de autenticación recibido.","Log_in_without_chat":"Ingresar sin chat","has_come_online":"se ha conectado","Unknown_sender":"Remitente desconocido","Please_allow_access_to_microphone_and_camera":"Por favor, permitir el acceso al micrófono y la cámara.","Incoming_call":"Llamada entrante","from":"de","Do_you_want_to_accept_the_call_from":"Desea aceptar la llamada de","Reject":"Rechazar","Accept":"Aceptar","hang_up":"colgar","snapshot":"instantánea","mute_my_audio":"silenciar mi audio","pause_my_video":"pausar mi vídeo","fullscreen":"pantalla completa","Info":"Info","Local_IP":"IP local","Remote_IP":"IP remota","Local_Fingerprint":"Firma digital local","Remote_Fingerprint":"Firma digital remota","Video_call_not_possible":"Llamada de vídeo no es posible","Start_video_call":"Iniciar llamada de vídeo","Join_chat":null,"Join":null,"Room":null,"Nickname":null,"left_the_building":null,"entered_the_room":null,"is_now_known_as":null,"This_room_is":null,"muc_hidden":{"keyword":null,"description":null},"muc_membersonly":{"keyword":null,"description":null},"muc_moderated":{"keyword":null,"description":null},"muc_nonanonymous":{"keyword":null,"description":null},"muc_open":{"keyword":null,"description":null},"muc_passwordprotected":{"keyword":null,"description":null},"muc_persistent":{"keyword":null,"description":null},"muc_public":{"keyword":null,"description":null},"muc_semianonymous":{"keyword":null,"description":null},"muc_temporary":{"keyword":null,"description":null},"muc_unmoderated":{"keyword":null,"description":null},"muc_unsecured":{"keyword":null,"description":null},"Continue":null,"Server":null,"Rooms_are_loaded":null,"Could_load_only":null,"muc_explanation":null,"You_already_joined_this_room":null,"This_room_will_be_closed":null,"Room_not_found_":null,"Loading_room_information":null,"Destroy":null,"Leave":null,"changed_subject_to":null,"muc_removed_kicked":null,"muc_removed_info_kicked":null,"muc_removed_banned":null,"muc_removed_info_banned":null,"muc_removed_affiliation":null,"muc_removed_info_affiliation":null,"muc_removed_membersonly":null,"muc_removed_info_membersonly":null,"muc_removed_shutdown":null,"Reason":null,"message_not_send":null,"message_not_send_item-not-found":null,"message_not_send_forbidden":null,"message_not_send_not-acceptable":null,"This_room_has_been_closed":null,"Room_logging_is_enabled":null,"A_password_is_required":null,"You_are_not_on_the_member_list":null,"You_are_banned_from_this_room":null,"Your_desired_nickname_":null,"The_maximum_number_":null,"This_room_is_locked_":null,"You_are_not_allowed_to_create_":null,"Alert":null,"Call_started":null,"Call_terminated":null,"Carbon_copy":null,"Enable":"Activar","jingle_reason_busy":null,"jingle_reason_decline":null,"jingle_reason_success":null,"Media_failure":null,"No_local_audio_device":null,"No_local_video_device":null,"Ok":null,"PermissionDeniedError":null,"Use_local_audio_device":null,"Use_local_video_device":null,"is_":"es __status__","You_received_a_message_from_an_unknown_sender_":"Ha recibido un mensaje de un remitente desconocido (__sender__) ¿Quiere mostrarlos?","Your_roster_is_empty_add_":"Tu lista de amigos esta vacia <a>Nuevo amigo</a>","onsmp_explanation_question":"Tu amigo está tratando de determinar si él o ella está realmente hablando con usted. Para autenticar a su amigo, introduce la respuesta y haga clic en Contestar.","onsmp_explanation_secret":"Tu amigo está tratando de determinar si él o ella está realmente hablando con usted. Para autenticar a su amigo, especifique el secreto.","from_sender":"de __sender__","Verified_private_conversation_started":"Verificado se inició una conversación privada.","Unverified_private_conversation_started":"No verificado se inició una conversación privada."}},"fr":{"translation":{"Logging_in":"Connexion...","your_connection_is_unencrypted":"Connexion non chiffrée.","your_connection_is_encrypted":"Connexion chiffrée.","your_buddy_closed_the_private_connection":"Votre ami a fermé la connexion privée.","start_private":"Démarrer une conversation privé","close_private":"Clôturer une conversation privée","your_buddy_is_verificated":"Votre contact est vérifié.","you_have_only_a_subscription_in_one_way":"Vous ne pouvez souscrire qu'une fois.","authentication_query_sent":"Requête d’authentification envoyée.","your_message_wasnt_send_please_end_your_private_conversation":"Votre message n'a pas été envoyé. Veuillez terminer votre conversation privée.","unencrypted_message_received":"Message non chiffré reçu","not_available":"Pas disponible","no_connection":"Pas de connexion !","relogin":"Re-connexion","trying_to_start_private_conversation":"Essai de démarrage d'une conversation privée !","Verified":"Vérifié","Unverified":"Non vérifié","private_conversation_aborted":"Conversation privée interrompue !","your_buddy_closed_the_private_conversation_you_should_do_the_same":"Votre ami a fermé la conversation privée ! Vous devriez faire de même.","conversation_is_now_verified":"La conversation est maintenant vérifiée.","authentication_failed":"L'authentification a échoué.","Creating_your_private_key_":"Création de votre clé privée; cela peut prendre un moment.","Authenticating_a_buddy_helps_":"L'authentification d'un ami permet de s'assurer que la personne à qui vous parlez est vraiment celui qu'il ou elle prétend être.","How_do_you_want_to_authenticate_your_buddy":"Comment voulez-vous vous authentifier {{bid_name}} (<b>{{bid_jid}}</b>)?","Select_method":"Sélection de la méthode...","Manual":"Manuel","Question":"Question","Secret":"Sécurité","To_verify_the_fingerprint_":"Pour vérifier l'empreinte, contactez votre ami via un autre canal digne de confiance, tel que le téléphone.","Your_fingerprint":"Votre empreinte","Buddy_fingerprint":"Empreinte de l'ami","Close":"Fermer","Compared":"Comparé","To_authenticate_using_a_question_":"Pour s'authentifier à l'aide d'une question, choisissez une question dont la réponse n'est connue que vous et de votre ami.","Ask":"Demander","To_authenticate_pick_a_secret_":"Pour vous authentifier, choisissez un secret connu seulement de vous et de votre ami.","Compare":"Comparer","Fingerprints":"Empreintes","Authentication":"Authentification","Message":"Message","Add_buddy":"Ajouter comme ami","rename_buddy":"Renommer l'ami","delete_buddy":"Supprimer l'ami","Login":"Connexion","Username":"Nom d'utilisateur","Password":"Mot de passe","Cancel":"Annuler","Connect":"Connecter","Type_in_the_full_username_":"Tapez un nom d'utilisateur complet et un alias(optionnel).","Alias":"Alias","Add":"Ajouter","Subscription_request":"Demande d'abonnement","You_have_a_request_from":"Vous avez une requête de ","Deny":"Refuser","Approve":"Approuver","Remove_buddy":"Supprimer l'ami","You_are_about_to_remove_":"Vous allez retirer {{bid_name}} (<b>{{bid_jid}}</b>) de votre liste d'amis. Toutes les fenêtres de chat en lien avec celui-ci seront fermées.","Continue_without_chat":"Continuer sans tchat","Please_wait":"Merci de patienter","Login_failed":"Authentification échouée","Sorry_we_cant_authentikate_":"La connexion avec le serveur de tchat a échoué. Vérifiez le mot de passe.","Retry":"Retour","clear_history":"Effacer l’historique","New_message_from":"Nouveau message de __name__","Should_we_notify_you_":"Dans le futur, devrons-nous vous notifier les nouveaux messages ?","Please_accept_":"Merci de cliquer sur le bouton \"autoriser\" en haut de page","Hide_offline":"Masquer les contacts non connectés","Show_offline":"Afficher les contacts non connectés","About":"À propos","dnd":"Ne pas déranger","Mute":"Muet","Unmute":"Son actif","Subscription":"Abonnement","both":"Les deux","Status":"Status","online":"En ligne","chat":"tchat","away":"Absent","xa":"Options étendues","offline":"Hors ligne","none":"Aucun","Unknown_instance_tag":"Tag inconnu","Not_one_of_our_latest_keys":"Ce n'est pas l'une des dernières touches","Received_an_unreadable_encrypted_message":"Message chiffré non lisible","Online":"En ligne","Chatty":"tchatty","Away":"Absent","Extended_away":"Options étendues","Offline":"Hors ligne","Friendship_request":"Demande d'amitié","Confirm":"Valider","Dismiss":"Rejeter","Remove":"Supprimer","Online_help":"Aide en ligne","FN":"Nom","N":" N ","FAMILY":"Nom de famille","GIVEN":"prénom","NICKNAME":"Surnom","URL":"URL","ADR":"Adresse","STREET":"Rue","EXTADD":"Adresse (suite)","LOCALITY":"Localité","REGION":"Région","PCODE":"Code Postal","CTRY":"Pays","TEL":"Téléphone","NUMBER":"Numéro","EMAIL":"Courriel","USERID":" USERID ","ORG":"Organisation","ORGNAME":"Nom","ORGUNIT":"Unité","TITLE":"Qualité:","ROLE":"Rôle","BDAY":"Date de naissance","DESC":"Description","PHOTO":"Photo","send_message":"Envoyer le message","get_info":"Montrer les informations","Settings":"Réglages","Priority":"Priorité","Save":"Enregistrer","User_settings":"Paramètres utilisateur","A_fingerprint_":"Une empreinte est utilisée pour s'assurer de l'identité de la personne à qui vous parlez","is":"est","Login_options":"Options d'identification","BOSH_url":"URL BOSH","Domain":"Domaine","Resource":"Ressource","On_login":"Après authentification","Received_an_unencrypted_message":"Reçu un message non chiffré","Sorry_your_buddy_doesnt_provide_any_information":"Désolé, votre ami n'a pas fourni d'informations","Info_about":"A propos de","Authentication_aborted":"Authentification interrompue.","Authentication_request_received":"Requête d'authentification reçue.","Log_in_without_chat":"S'identifier sans tchat","has_come_online":"vient d'arriver","Unknown_sender":"Expéditeur inconnu","Please_allow_access_to_microphone_and_camera":"Veuillez cliquez sur le bouton \"Autoriser\" en haut, pour permettre l'accès au micro et à la caméra.","Incoming_call":"Appel entrant","from":"de","Do_you_want_to_accept_the_call_from":"Voulez-vous accepter l'appel de","Reject":"Rejeté","Accept":"Accepté","hang_up":"Décrochez","snapshot":"Capture d’écran","mute_my_audio":"Couper l'audio","pause_my_video":"Mettre ma vidéo en pause","fullscreen":"Plein écran","Info":"Info","Local_IP":"IP locale","Remote_IP":"IP distante","Local_Fingerprint":"Empreinte locale","Remote_Fingerprint":"Empreinte distante","Video_call_not_possible":"L'appel vidéo n'est possible. Votre ami ne supporte pas les appels vidéo.","Start_video_call":"Démarrer l'appel vidéo","Join_chat":"Joindre la discution","Join":"Joindre","Room":"Salon","Nickname":"Surnom","left_the_building":"__nickname__ a quitté l'immeuble","entered_the_room":"__nickname__ entre dans le salon","is_now_known_as":null,"This_room_is":"Ce salon est","muc_hidden":{"keyword":"caché","description":null},"muc_membersonly":{"keyword":"pour les membres seulement","description":"Vous devez être sur la liste des membres"},"muc_moderated":{"keyword":"modéré","description":"Seulement les personnes avec la \"voix\" sont autorisés à envoyer des messages"},"muc_nonanonymous":{"keyword":"non anonyme","description":"Votre identifiant Jabber est visible de tous les autres occupants"},"muc_open":{"keyword":"ouvert","description":"Tout le monde est autorisé à se connecter"},"muc_passwordprotected":{"keyword":"protégé par un mot de passe","description":"Vous devez fournir un mot de passe correct"},"muc_persistent":{"keyword":"persistent","description":null},"muc_public":{"keyword":"public","description":null},"muc_semianonymous":{"keyword":"semi-anonyme","description":"Votre identifiant Jabber est seulement visible aux administrateurs de ce salon"},"muc_temporary":{"keyword":"temporaire","description":"sera détruit au départ de son dernier occupant"},"muc_unmoderated":{"keyword":"non modéré","description":"Tout le monde est autorisé à envoyer des messages"},"muc_unsecured":{"keyword":"non sécurisé","description":"un mot de passe n'est pas nécessaire pour entrer"},"Continue":"Continuer","Server":"Serveur","Rooms_are_loaded":"Les salons sont chargés","Could_load_only":null,"muc_explanation":"Veuillez saisir le nom du salon, un surnom (optionnel) et un mot de passe pour joindre la conversation","You_already_joined_this_room":"Vous avez déjà rejoins ce salon","This_room_will_be_closed":"Ce salon va être fermé","Room_not_found_":"Un nouveau salon va être créé","Loading_room_information":"Chargement des informations du salon","Destroy":"Détruire","Leave":"Quitter","changed_subject_to":"__nickname__ a changé le sujet du salon à \"__subject__\"","muc_removed_kicked":"Vous avez été éjecté de ce salon","muc_removed_info_kicked":"__nickname__ a été éjecté de ce salon","muc_removed_banned":"Vous avez été banni de ce salon","muc_removed_info_banned":"__nickname__ a été banni de ce salon","muc_removed_affiliation":null,"muc_removed_info_affiliation":null,"muc_removed_membersonly":null,"muc_removed_info_membersonly":null,"muc_removed_shutdown":null,"Reason":"Raison","message_not_send":null,"message_not_send_item-not-found":null,"message_not_send_forbidden":null,"message_not_send_not-acceptable":"Votre message n'a pas été envoyé car il n'y a personne dans ce salon","This_room_has_been_closed":"Ce salon a été fermé","Room_logging_is_enabled":null,"A_password_is_required":"Un mot de passe est requis","You_are_not_on_the_member_list":"Vous n'êtes pas sur la liste des membres","You_are_banned_from_this_room":"Vous avez été banni de ce salon","Your_desired_nickname_":"Votre Surnom souhaité est déjà utilisé.Veuillez en choisir un autre","The_maximum_number_":"Le nombre maximum d'utilisateur est atteint dans ce salon","This_room_is_locked_":"Ce salon est vérouillé","You_are_not_allowed_to_create_":"Vous n'êtes pas autorisé à créer un salon","Alert":null,"Call_started":null,"Call_terminated":null,"Carbon_copy":null,"Enable":null,"jingle_reason_busy":null,"jingle_reason_decline":null,"jingle_reason_success":null,"Media_failure":null,"No_local_audio_device":null,"No_local_video_device":null,"Ok":null,"PermissionDeniedError":null,"Use_local_audio_device":null,"Use_local_video_device":null,"is_":"est __status__","You_received_a_message_from_an_unknown_sender_":"Vous avez reçu un message d'un expéditeur inconnu (__sender__) Voulez-vous les afficher ?","Your_roster_is_empty_add_":"Votre liste est vide, ajouter <a>Nouvel ami</a>","onsmp_explanation_question":"Votre ami tente de déterminer si il ou elle parle vraiment à vous. Vous authentifier à votre ami, Saisissez une réponse et cliquer sur Répondre.","onsmp_explanation_secret":"Votre ami tente de déterminer si il ou elle parle vraiment à vous. Vous authentifier à votre ami, Entrez le mot secret","from_sender":"de __sender__","Verified_private_conversation_started":"Vérifié Conversation privé démarrée.","Unverified_private_conversation_started":"Non vérifié Conversation privé démarrée."}},"it":{"translation":{"Logging_in":"login…","your_connection_is_unencrypted":"La sua connessione è non cifrata.","your_connection_is_encrypted":"La sua connessione è cifrata.","your_buddy_closed_the_private_connection":"La sua connessione privata è stato chiuso dal suo compagno.","start_private":"Inizia privata","close_private":"Chiude privata","your_buddy_is_verificated":"Il tuo compagno è stato verificato","you_have_only_a_subscription_in_one_way":"Hai solo una one-way inscrizione.","authentication_query_sent":"Domanda d'autenticità inviata.","your_message_wasnt_send_please_end_your_private_conversation":"Il tuo messaggio non è stato inviato. Si prega di finire la sua conversazione privata.","unencrypted_message_received":"Messaggio non cifrato ricevuto","not_available":"non disponibile","no_connection":"nessun collegamento!","relogin":"nuovo login","trying_to_start_private_conversation":"Cercando di avviare una conversazione privata!","Verified":"verificato","Unverified":"non verificato","private_conversation_aborted":"Conversazione privata abortito!","your_buddy_closed_the_private_conversation_you_should_do_the_same":"Il tuo compagno ha chiuso la conversazione privata! Si dovrebbe fare lo stesso.","conversation_is_now_verified":"Conversazione è ora verificato.","authentication_failed":"autenticazione fallita.","Creating_your_private_key_":"Creare la propria chiave privata; questo potrebbe richiedere un po'.","Authenticating_a_buddy_helps_":"Autenticazione un compagno aiuta a garantire che la persona si sta parlando è davvero quello che lui o lei sostiene di essere.","How_do_you_want_to_authenticate_your_buddy":"Come si desidera autenticare {{bid_name}} (<b>{{bid_jid}}</b>)?","Select_method":"Seleziona metodo ..","Manual":"manuale","Question":"domanda","Secret":"segreto","To_verify_the_fingerprint_":"Per verificare l'impronta digitale, contattare il proprio compagno attraverso qualche altro canale affidabile, come il telefono.","Your_fingerprint":"il tuo impronta digitale","Buddy_fingerprint":"impronta digitale da compagno","Close":"chiude","Compared":"comparato","To_authenticate_using_a_question_":"Per autenticare tramite una questione, scegli una questione la cui risposta è nota solo voi e il tuo compagno","Ask":"chiedi","To_authenticate_pick_a_secret_":"Per autenticare, scegli un segreto noto solo a te e il tuo compagno.","Compare":"Comparare","Fingerprints":"Impronta digitale","Authentication":"Autenticazione","Message":"Messagio","Add_buddy":"Aggiungi un compagno","rename_buddy":"rinomina compagno","delete_buddy":"elimina compagno","Login":"Login","Username":"Identificazione dell'utente","Password":"Password","Cancel":"Cancella","Connect":"Collega","Type_in_the_full_username_":"Digita l'identificazione utente completo e un alias opzionale.","Alias":"Alias","Add":"Aggiungi","Subscription_request":"Rrichiesta di sottoscrizione","You_have_a_request_from":"Hai una richiesta da","Deny":"Refiuta","Approve":"Approva","Remove_buddy":"Rimuova il compagno","You_are_about_to_remove_":"Stai rimovendo {{bid_name}} (<b>{{bid_jid}}</b>) del suo lista di compagni. Tutte le chat appartenente saranno chiuse.","Continue_without_chat":"Continua senza chat","Please_wait":"Si prega d'attendere","Login_failed":"Chat login è fallito","Sorry_we_cant_authentikate_":"Autenticazione non riuscita con il server di chat. Forse la password è sbagliata?","Retry":"Indietro","clear_history":"Cancella la cronologia","New_message_from":"Nuovo messaggio da __name__","Should_we_notify_you_":"Vuoi ricevere una notifica di nuovi messaggi in futuro?","Please_accept_":"Si prega di fare clic sul bottone \"Autorizzazione\" sopra.","Hide_offline":"Nascondere i contatti non in linea","Show_offline":"Mostra i contatti non in linea","About":"Informazione legale","dnd":"Non disturbare","Mute":"Muto attivo","Unmute":"Muto inattivo","Subscription":"Sottoscrizione","both":"etrambi","Status":"Status","online":"In linea","chat":"chat","away":"via","xa":"via estensivo","offline":"non in linea","none":"nessuno","Unknown_instance_tag":"Instance tag sconosciuta.","Not_one_of_our_latest_keys":"Non è una delle nostre ultime chiavi.","Received_an_unreadable_encrypted_message":"Ricevuto un messaggio crittografato illeggibile.","Online":"In linea","Chatty":"Chiacchierino","Away":"Via","Extended_away":"Via estensivo","Offline":"Non in linea","Friendship_request":"Amicizia richiesto","Confirm":"Conferma","Dismiss":"Rifiuta","Remove":"Rimuovi","Online_help":"Guida in linea","FN":"Nome e cognome","N":null,"FAMILY":"Cognome","GIVEN":"Nome","NICKNAME":"Soprannome","URL":"URL","ADR":"Indirizzo","STREET":"Via","EXTADD":"Esteso Indirizzo","LOCALITY":"Località","REGION":"Regione","PCODE":"Codice Postale","CTRY":"Paese","TEL":"Telefono","NUMBER":"Numero","EMAIL":"E-mail","USERID":null,"ORG":"Organizzazione","ORGNAME":"Nome","ORGUNIT":"Unità","TITLE":"Titolo di lavoro","ROLE":"Funzione","BDAY":"Compleanno","DESC":"Descrizione","PHOTO":null,"send_message":"Messagio inviato","get_info":"Mostra informazioni","Settings":"Impostazione","Priority":"Priorità","Save":"Salva","User_settings":"Impostazione dell'utente","A_fingerprint_":"Una impronta digitale è usato per assicurarsi che la persona con cui stai parlando è lui o lei che sta dicendo.","is":"è","Login_options":"Opzioni di login","BOSH_url":"BOSH URL","Domain":"Domain","Resource":"Risorsa","On_login":"Login on","Received_an_unencrypted_message":"Ricevuto un messaggio non crittografato","Sorry_your_buddy_doesnt_provide_any_information":"Spiace, il tuo compagno non fornisce alcuna informazione.","Info_about":"Informazioni","Authentication_aborted":"Autenticazione interrotta","Authentication_request_received":"Richiesta di autenticazione ricevuto.","Log_in_without_chat":"Log in senza chat","has_come_online":"È venuto in linea","Unknown_sender":"Mittente sconosciuto","Please_allow_access_to_microphone_and_camera":"Si prega di fare clic sul bottone \"Autorizzazione\" sopra per autorizzazione del l'accesso al microfono e fotocamera.","Incoming_call":"Chiamata in arrivo","from":"di","Do_you_want_to_accept_the_call_from":"Vuoi accettare la chiamata di","Reject":"Rifiuta","Accept":"Accetta","hang_up":"Riattacca","snapshot":"istantanea","mute_my_audio":"disattiva il mio audio","pause_my_video":"pausa il mio audio","fullscreen":"schermo intero","Info":"Informazione","Local_IP":"IP locale","Remote_IP":"IP remoto","Local_Fingerprint":"Impronta digitale locale","Remote_Fingerprint":"Impronta digitale remoto","Video_call_not_possible":"Videochiamata non è possibile. Il tuo compagno non può effettuare videochiamate.","Start_video_call":"Inizia videochiamata","Join_chat":null,"Join":null,"Room":null,"Nickname":null,"left_the_building":null,"entered_the_room":null,"is_now_known_as":null,"This_room_is":null,"muc_hidden":{"keyword":null,"description":null},"muc_membersonly":{"keyword":null,"description":null},"muc_moderated":{"keyword":null,"description":null},"muc_nonanonymous":{"keyword":null,"description":null},"muc_open":{"keyword":null,"description":null},"muc_passwordprotected":{"keyword":null,"description":null},"muc_persistent":{"keyword":null,"description":null},"muc_public":{"keyword":null,"description":null},"muc_semianonymous":{"keyword":null,"description":null},"muc_temporary":{"keyword":null,"description":null},"muc_unmoderated":{"keyword":null,"description":null},"muc_unsecured":{"keyword":null,"description":null},"Continue":null,"Server":null,"Rooms_are_loaded":null,"Could_load_only":null,"muc_explanation":null,"You_already_joined_this_room":null,"This_room_will_be_closed":null,"Room_not_found_":null,"Loading_room_information":null,"Destroy":null,"Leave":null,"changed_subject_to":null,"muc_removed_kicked":null,"muc_removed_info_kicked":null,"muc_removed_banned":null,"muc_removed_info_banned":null,"muc_removed_affiliation":null,"muc_removed_info_affiliation":null,"muc_removed_membersonly":null,"muc_removed_info_membersonly":null,"muc_removed_shutdown":null,"Reason":null,"message_not_send":null,"message_not_send_item-not-found":null,"message_not_send_forbidden":null,"message_not_send_not-acceptable":null,"This_room_has_been_closed":null,"Room_logging_is_enabled":null,"A_password_is_required":null,"You_are_not_on_the_member_list":null,"You_are_banned_from_this_room":null,"Your_desired_nickname_":null,"The_maximum_number_":null,"This_room_is_locked_":null,"You_are_not_allowed_to_create_":null,"Alert":null,"Call_started":null,"Call_terminated":null,"Carbon_copy":null,"Enable":null,"jingle_reason_busy":null,"jingle_reason_decline":null,"jingle_reason_success":null,"Media_failure":null,"No_local_audio_device":null,"No_local_video_device":null,"Ok":null,"PermissionDeniedError":null,"Use_local_audio_device":null,"Use_local_video_device":null,"is_":"è __status__","You_received_a_message_from_an_unknown_sender_":"Hai ricevuto un messaggio da un mittente sconosciuto (__sender__) Vuoi che venga visualizzato?","Your_roster_is_empty_add_":"Il suo elenco è vuoto, aggiungi un <a>compagno nuovo</a>","onsmp_explanation_question":"Il tuo compagno sta cercando di determinare se lui o lei sta davvero parlando con te. Per autenticare a il tuo compagno. inserisci la risposta e fare click su risposta.","onsmp_explanation_secret":"Il tuo compagno sta cercando di determinare se lui o lei sta davvero parlando con te. Per autenticare a il tuo compagno. inserire il segreto.","from_sender":"di __sender__","Verified_private_conversation_started":"verificato Conversazione privata iniziato.","Unverified_private_conversation_started":"non verificato Conversazione privata iniziato."}},"nds":{"translation":{"Logging_in":null,"your_connection_is_unencrypted":null,"your_connection_is_encrypted":null,"your_buddy_closed_the_private_connection":null,"start_private":null,"close_private":null,"your_buddy_is_verificated":null,"you_have_only_a_subscription_in_one_way":null,"authentication_query_sent":null,"your_message_wasnt_send_please_end_your_private_conversation":null,"unencrypted_message_received":null,"not_available":null,"no_connection":null,"relogin":null,"trying_to_start_private_conversation":null,"Verified":null,"Unverified":null,"private_conversation_aborted":null,"your_buddy_closed_the_private_conversation_you_should_do_the_same":null,"conversation_is_now_verified":null,"authentication_failed":null,"Creating_your_private_key_":null,"Authenticating_a_buddy_helps_":null,"How_do_you_want_to_authenticate_your_buddy":null,"Select_method":null,"Manual":null,"Question":null,"Secret":null,"To_verify_the_fingerprint_":null,"Your_fingerprint":null,"Buddy_fingerprint":null,"Close":null,"Compared":null,"To_authenticate_using_a_question_":null,"Ask":null,"To_authenticate_pick_a_secret_":null,"Compare":null,"Fingerprints":null,"Authentication":null,"Message":null,"Add_buddy":null,"rename_buddy":null,"delete_buddy":null,"Login":null,"Username":null,"Password":null,"Cancel":null,"Connect":null,"Type_in_the_full_username_":null,"Alias":null,"Add":null,"Subscription_request":null,"You_have_a_request_from":null,"Deny":null,"Approve":null,"Remove_buddy":null,"You_are_about_to_remove_":null,"Continue_without_chat":null,"Please_wait":null,"Login_failed":null,"Sorry_we_cant_authentikate_":null,"Retry":null,"clear_history":null,"New_message_from":null,"Should_we_notify_you_":null,"Please_accept_":null,"Hide_offline":null,"Show_offline":null,"About":null,"dnd":null,"Mute":null,"Unmute":null,"Subscription":null,"both":null,"Status":null,"online":null,"chat":null,"away":null,"xa":null,"offline":null,"none":null,"Unknown_instance_tag":null,"Not_one_of_our_latest_keys":null,"Received_an_unreadable_encrypted_message":null,"Online":null,"Chatty":null,"Away":null,"Extended_away":null,"Offline":null,"Friendship_request":null,"Confirm":null,"Dismiss":null,"Remove":null,"Online_help":null,"FN":null,"N":null,"FAMILY":null,"GIVEN":null,"NICKNAME":null,"URL":null,"ADR":null,"STREET":null,"EXTADD":null,"LOCALITY":null,"REGION":null,"PCODE":null,"CTRY":null,"TEL":null,"NUMBER":null,"EMAIL":null,"USERID":null,"ORG":null,"ORGNAME":null,"ORGUNIT":null,"TITLE":null,"ROLE":null,"BDAY":null,"DESC":null,"PHOTO":null,"send_message":null,"get_info":null,"Settings":null,"Priority":null,"Save":null,"User_settings":null,"A_fingerprint_":null,"is":null,"Login_options":null,"BOSH_url":null,"Domain":null,"Resource":null,"On_login":null,"Received_an_unencrypted_message":null,"Sorry_your_buddy_doesnt_provide_any_information":null,"Info_about":null,"Authentication_aborted":null,"Authentication_request_received":null,"Log_in_without_chat":null,"has_come_online":null,"Unknown_sender":null,"Please_allow_access_to_microphone_and_camera":null,"Incoming_call":null,"from":null,"Do_you_want_to_accept_the_call_from":null,"Reject":null,"Accept":null,"hang_up":null,"snapshot":null,"mute_my_audio":null,"pause_my_video":null,"fullscreen":null,"Info":null,"Local_IP":null,"Remote_IP":null,"Local_Fingerprint":null,"Remote_Fingerprint":null,"Video_call_not_possible":null,"Start_video_call":null,"Join_chat":null,"Join":null,"Room":null,"Nickname":null,"left_the_building":null,"entered_the_room":null,"is_now_known_as":null,"This_room_is":null,"muc_hidden":{"keyword":null,"description":null},"muc_membersonly":{"keyword":null,"description":null},"muc_moderated":{"keyword":null,"description":null},"muc_nonanonymous":{"keyword":null,"description":null},"muc_open":{"keyword":null,"description":null},"muc_passwordprotected":{"keyword":null,"description":null},"muc_persistent":{"keyword":null,"description":null},"muc_public":{"keyword":null,"description":null},"muc_semianonymous":{"keyword":null,"description":null},"muc_temporary":{"keyword":null,"description":null},"muc_unmoderated":{"keyword":null,"description":null},"muc_unsecured":{"keyword":null,"description":null},"Continue":null,"Server":null,"Rooms_are_loaded":null,"Could_load_only":null,"muc_explanation":null,"You_already_joined_this_room":null,"This_room_will_be_closed":null,"Room_not_found_":null,"Loading_room_information":null,"Destroy":null,"Leave":null,"changed_subject_to":null,"muc_removed_kicked":null,"muc_removed_info_kicked":null,"muc_removed_banned":null,"muc_removed_info_banned":null,"muc_removed_affiliation":null,"muc_removed_info_affiliation":null,"muc_removed_membersonly":null,"muc_removed_info_membersonly":null,"muc_removed_shutdown":null,"Reason":null,"message_not_send":null,"message_not_send_item-not-found":null,"message_not_send_forbidden":null,"message_not_send_not-acceptable":null,"This_room_has_been_closed":null,"Room_logging_is_enabled":null,"A_password_is_required":null,"You_are_not_on_the_member_list":null,"You_are_banned_from_this_room":null,"Your_desired_nickname_":null,"The_maximum_number_":null,"This_room_is_locked_":null,"You_are_not_allowed_to_create_":null,"Alert":null,"Call_started":null,"Call_terminated":null,"Carbon_copy":null,"Enable":null,"jingle_reason_busy":null,"jingle_reason_decline":null,"jingle_reason_success":null,"Media_failure":null,"No_local_audio_device":null,"No_local_video_device":null,"Ok":null,"PermissionDeniedError":null,"Use_local_audio_device":null,"Use_local_video_device":null,"is_":null,"You_received_a_message_from_an_unknown_sender_":null,"Your_roster_is_empty_add_":null,"onsmp_explanation_question":null,"onsmp_explanation_secret":null,"from_sender":null,"Verified_private_conversation_started":null,"Unverified_private_conversation_started":null}},"pl":{"translation":{"Logging_in":"Logowanie...","your_connection_is_unencrypted":"Twoje połączenie nie jest szyfrowane.","your_connection_is_encrypted":"Twoje połączenie jest szyfrowane.","your_buddy_closed_the_private_connection":"Twój rozmówca zamknął połączenie.","start_private":"Rozpocznij rozmowę.","close_private":"Zakończ rozmowę.","your_buddy_is_verificated":"Twój rozmówca został zweryfikowany.","you_have_only_a_subscription_in_one_way":"Masz jednostronną subskrypcję.","authentication_query_sent":"Wysłano proźbę o autentykację.","your_message_wasnt_send_please_end_your_private_conversation":"Twoja wiadomość nie została wysłana. Proszę, zamknij rozmowę.","unencrypted_message_received":"Zwrotna niezaszyfrowana wiadomość.","not_available":"Niedostępny.","no_connection":"Brak połączenia!","relogin":"Połącz ponownie","trying_to_start_private_conversation":"Rozpocznij rozmowę!","Verified":"Zweryfikowano","Unverified":"Niezweryfikowano","private_conversation_aborted":"Anulowano rozmowę!","your_buddy_closed_the_private_conversation_you_should_do_the_same":"Rozmówca przerwał połączenie!","conversation_is_now_verified":"Zweryfikowano połączenie.","authentication_failed":"Weryfikacja się nie powiodła.","Creating_your_private_key_":"Tworzenie klucza prywatnego; może to chwilę potrwać","Authenticating_a_buddy_helps_":"Autoryzacja pomoże w ustaleniu faktycznej tożsamości rozmówcy ;).","How_do_you_want_to_authenticate_your_buddy":"Jakiej autoryzacji chcesz użyć {{bid_name}} (<b>{{bid_jid}}</b>)?","Select_method":"Wybierz sposób...","Manual":"Ręcznie","Question":"Pytanie","Secret":"Hasło","To_verify_the_fingerprint_":"Aby zweryfikować kod najpierw skontaktuj się z rozmówcą np. za pomocą telefonu.","Your_fingerprint":"Twój kod:","Buddy_fingerprint":"Kod rozmówcy","Close":"Zamknij","Compared":"Porównano","To_authenticate_using_a_question_":"Aby autoryzować za pomocą pytania, wybierz pytanie na które tylko Twój rozmówca zna odpowiedź.","Ask":"Zadaj pytanie","To_authenticate_pick_a_secret_":"Aby autoryzować za pomocą hasła, wybierz hasło na które zna tylko Twój rozmówca.","Compare":"Dopasuj","Fingerprints":"Kody autoryzacyjne","Authentication":"Autoryzacja","Message":"Wiadomość","Add_buddy":"Dodaj kontakt","rename_buddy":"Zmień nazwę","delete_buddy":"Usuń kontakt","Login":"Login","Username":"Nazwa Użytkownika","Password":"Hasło","Cancel":"Anuluj","Connect":"Połączenie","Type_in_the_full_username_":"Wpisz pełną nazwę użytkownika (np. <B>imię.nazwisko@zajezdnia.local</B>) oraz jego nazwę wyświetlaną (Alias).","Alias":"Alias","Add":"Dodaj","Subscription_request":"Potwierdzenie subskrypcji","You_have_a_request_from":"Masz potwierdzenie od","Deny":"Odmów","Approve":"Zatwierdź","Remove_buddy":"Usuń rozmówcę","You_are_about_to_remove_":"Twój rozmówca {{bid_name}} (<b>{{bid_jid}}</b>) usunął Cię ze swojej listy kontaktów.","Continue_without_chat":"Kontynuuj bez komunikatora","Please_wait":"Proszę czekać","Login_failed":"Błędne logowanie","Sorry_we_cant_authentikate_":"Błędna autoryzacja z serwerem. Może hasło jest nieprawidłowe?","Retry":"Powrót","clear_history":"Wyczyść historię","New_message_from":"Nowa wiadomość od __name__","Should_we_notify_you_":"Czy chcesz otrzymywać powiadomienia o nowych wiadomościach w przyszłości?","Please_accept_":"Kliknij \"Zezwól\" na górze.","Hide_offline":"Schowaj niedostępne kontakty","Show_offline":"Pokaż niedostępne kontakty","About":"Info","dnd":"Nie przeszkadzać","Mute":"Wycisz","Unmute":"Włącz dźwięk","Subscription":"Subskrybcja","both":"obustronna","Status":"Status","online":"Dostępny","chat":"czat","away":"z dala od kompa","xa":"hen hen...","offline":"niedostępny","none":"brak","Unknown_instance_tag":"Nieznany przypadek.","Not_one_of_our_latest_keys":"Not one of our latest keys.","Received_an_unreadable_encrypted_message":"Otrzymano nieczytelną, zaszyfrowaną wiadomość.","Online":"Połączony","Chatty":"Pogawędzimy?","Away":"Daleko","Extended_away":"Hen Hen...","Offline":"Niedostępny","Friendship_request":"Zapytanie od znajomego?","Confirm":"Potwierdzenie","Dismiss":"Odwołaj","Remove":"Usuń","Online_help":"Pomoc Online","FN":"Pełna nazwa","N":" ","FAMILY":"Nazwisko","GIVEN":"Imię","NICKNAME":"Pseudonim","URL":"Strona WWW","ADR":"Adres","STREET":"Ulica","EXTADD":"Pełny adres","LOCALITY":"Lokalizacja","REGION":"Region","PCODE":"Kod pocztowy","CTRY":"Kraj","TEL":"Telefon","NUMBER":"Numer","EMAIL":"Email","USERID":" ","ORG":"Organizacja","ORGNAME":"Nazwa","ORGUNIT":"Jednostka","TITLE":"Stanowisko","ROLE":"Rola","BDAY":"Data urodzin","DESC":"Opis","PHOTO":" ","send_message":"Wyślij wiadomość","get_info":"Pokaż informację","Settings":"Ustawienia","Priority":"Priorytet","Save":"Zapisz","User_settings":"Ustawienia Użytkownika","A_fingerprint_":"Kod służy do autoryzacji Twojego rozmówcy aby potwierdzić jego tożsamość.","is":"jest","Login_options":"opcje logowania","BOSH_url":"Adres BOSH","Domain":"Domena","Resource":"Źródło","On_login":"Na login","Received_an_unencrypted_message":"Zatwierdzono nieszyfrowaną wiadomość.","Sorry_your_buddy_doesnt_provide_any_information":"Twój rozmówca nie posiada żadnych informacji.","Info_about":"Informacja o...","Authentication_aborted":"Autoryzacja anulowana.","Authentication_request_received":"Prośba o autoryzację została przyjęta.","Log_in_without_chat":"Zaloguj bez komunikatora","has_come_online":"jest teraz dostępny","Unknown_sender":"Nieznany nadawca","Please_allow_access_to_microphone_and_camera":"Kliknij \"Potwierdź\" na górze, aby móc korzystać z mikrofonu oraz kamery.","Incoming_call":"Przychodzące połączenie","from":"z","Do_you_want_to_accept_the_call_from":"Akceptujesz połączenie od","Reject":"Odrzuć","Accept":"Zaakceptuj","hang_up":"odbierz","snapshot":"zrób zdjęcie","mute_my_audio":"wycisz dźwięk","pause_my_video":"zatrzymaj moje wideo","fullscreen":"Pełny ekran","Info":"Informacja","Local_IP":"Adres IP","Remote_IP":"Zdalny adres IP","Local_Fingerprint":"Kod lokalny","Remote_Fingerprint":"Zdalny kod","Video_call_not_possible":"Rozmowa wideo jest niemożliwa. Twój rozmówca nie ma możliwości prowadzenia takich rozmów.","Start_video_call":"Rozpocznij rozmowę wideo","Join_chat":"Dołącz do czata","Join":"Dołącz","Room":"Pokój","Nickname":"Nazwa użytkownika","left_the_building":"__nickname__ wyszedł","entered_the_room":"__nickname__ wszedł do pokoju","is_now_known_as":"__oldNickname__ zmienił nazwę na __newNickname__","This_room_is":"Ten pokój jest","muc_hidden":{"keyword":"ukryty","description":"nie można odnaleźć elementów wyszukiwania"},"muc_membersonly":{"keyword":"tylko zalogowani","description":"musisz być członkiem listy"},"muc_moderated":{"keyword":"moderowano","description":"tylko osoby z opcją \"głos\" mogą wysyłać wiadomość"},"muc_nonanonymous":{"keyword":"nie-anonimowy","description":"Twój identyfikator jabber jest widoczny dla wszystkich innych osób"},"muc_open":{"keyword":"otwarty","description":"wszyscy mają pozwolenie aby dołączyć"},"muc_passwordprotected":{"keyword":"ograniczone hasłem","description":"musisz wpisać prawidłowe hasło"},"muc_persistent":{"keyword":"trwale","description":"nie zostaną zniszczone, jeśli ostatnia osoba wyszła"},"muc_public":{"keyword":"publiczny","description":"wyszukawno"},"muc_semianonymous":{"keyword":"pół-anonimowy","description":"Twój identyfikator jabber jest widoczny w pokoju adminów"},"muc_temporary":{"keyword":"tymczasowy","description":"zostanie usunięty jeżeli ostatnia osoba wyjdzie"},"muc_unmoderated":{"keyword":"niemoderowany","description":"wszyscy są uprawnieni do pisania wiadomości"},"muc_unsecured":{"keyword":"niezabezpieczone","description":"nie musisz wpisywać hasła"},"Continue":"Kontynuuj","Server":"Serwer","Rooms_are_loaded":"Pokoje zostały załadowane","Could_load_only":"Nie załadowano __count__ pokoi","muc_explanation":"Aby się zalogować, wpisz nazwę pokoju oraz opcjonalnie nazwę użytkownika i hasło","You_already_joined_this_room":"Już dołączyłeś do tego pokoju","This_room_will_be_closed":"Ten pokój będzie zamknięty","Room_not_found_":"Nowy pokój będzie stworzony","Loading_room_information":"Ładowani informacji o pokoju","Destroy":"Zniszczony","Leave":"Opuść","changed_subject_to":"__nickname__ zmienił temat pokoju na \"__subject__\"","muc_removed_kicked":"Zostałeś wyrzucony z pokoju","muc_removed_info_kicked":"__nickname__ został wyrzucony z pokoju","muc_removed_banned":"Zostałeś zbanowany","muc_removed_info_banned":"__nickname__ został zbanowany","muc_removed_affiliation":"Zostałeś usunięty z pokoju ze względu na zmianę przynależnosci","muc_removed_info_affiliation":"__nickname__ został usunięty z pokoju ze względu na zmianę przynależnosci","muc_removed_membersonly":"Zostałeś usunięty z pokoju ze względu na zmianę pokoju tylko dla członków, a Ty nie jesteś członkiem...","muc_removed_info_membersonly":"__nickname__ został usunięty z pokoju ze względu na zmianę pokoju na tylko dla członków","muc_removed_shutdown":"Zostałeś usunięty z pokoju ze względu na zamknięcie usługi","Reason":"Powód","message_not_send":"Wystąpił błąd i twoja wiadomość nie została wysłana.","message_not_send_item-not-found":"Twoja wiadomość nie została wysłana ponieważ ten pokój nie istnieje","message_not_send_forbidden":"Twoja wiadomość nie została wysłana ponieważ nie masz głosu w tym pokoju","message_not_send_not-acceptable":"Twoja wiadomość nie została wysłana ponieważ nie jesteś właścicielem tego pokoju","This_room_has_been_closed":"Ten pokój został zamknięty","Room_logging_is_enabled":"Logowanie do pokoju jest włączone","A_password_is_required":"Hasło jest wymagane","You_are_not_on_the_member_list":"Nie jesteś na liście członków","You_are_banned_from_this_room":"Zostałeś zbanowany w tym pokoju","Your_desired_nickname_":"Twoja nazwa użytkownika jest już użyta. Spróbuj wybrać inną","The_maximum_number_":"Została osiągnięta maksymalna liczba użytkowników w tym pokoju","This_room_is_locked_":"Ten pokój jest zablokowany","You_are_not_allowed_to_create_":"Nie masz uprawnień do tworzenia pokoju","Alert":"Alarm","Call_started":null,"Call_terminated":null,"Carbon_copy":"Do wiadomości","Enable":"Włączone","jingle_reason_busy":null,"jingle_reason_decline":null,"jingle_reason_success":null,"Media_failure":null,"No_local_audio_device":null,"No_local_video_device":null,"Ok":"Ok","PermissionDeniedError":null,"Use_local_audio_device":null,"Use_local_video_device":null,"is_":"jest __status__","You_received_a_message_from_an_unknown_sender_":"Masz wiadomość od nieznanego nadawcy. (__sender__) Chcesz to wyświetlić?","Your_roster_is_empty_add_":"Twoja lista jest pusta, dodaj kontakty <a>Nowy kontakt</a>","onsmp_explanation_question":"Twój rozmówca próbuje się z Tobą połączyć. Autoryzacja z rozmówcą, napisz odpowiedź.","onsmp_explanation_secret":"Twój rozmówca próbuje się z Tobą połączyć. Autoryzacja z rozmówcą, wpisz hasło.","from_sender":"z __sender__","Verified_private_conversation_started":"Zweryfikowano Rozmowa prywatna rozpoczęta.","Unverified_private_conversation_started":"Niezweryfikowano Rozmowa prywatna rozpoczęta."}},"pt-BR":{"translation":{"Logging_in":"Entrando...","your_connection_is_unencrypted":"Sua conexão não é encriptada","your_connection_is_encrypted":"Sua conexão é encriptada","your_buddy_closed_the_private_connection":"Seu contato fechou a conexão privada","start_private":"Iniciar conversa privada","close_private":"Fechar conversa privada","your_buddy_is_verificated":"Seu contato está verificado","you_have_only_a_subscription_in_one_way":"Você só tem a inscrição one-way","authentication_query_sent":"Pergunta de autenticação enviada","your_message_wasnt_send_please_end_your_private_conversation":"Sua mensagem não foi enviada. Por favor finalize sua conversa privada","unencrypted_message_received":"Mensagem não encriptada recebida","not_available":"Indisponível","no_connection":"Sem conexão!","relogin":"reentrar","trying_to_start_private_conversation":"Tentando iniciar conversa privada","Verified":"Verificado","Unverified":"Não verificado","private_conversation_aborted":"Conversa privada abortada!","your_buddy_closed_the_private_conversation_you_should_do_the_same":"Seu contato encerrou a conversa privada! Você deveria fazer o mesmo.","conversation_is_now_verified":"Conversa verificada.","authentication_failed":"Autenticação falhou.","Creating_your_private_key_":"Criando sua chave privada: isso pode demorar um pouco.","Authenticating_a_buddy_helps_":"Autenticar seu contato ajuda a garantir que a pessoa com a qual você está falando é realmente a pessoa que ela alega ser.","How_do_you_want_to_authenticate_your_buddy":"Como você gostaria de se autenticar {{bid_name}} (<b>{{bid_jid}}</b>)?","Select_method":"Selecione o método...","Manual":"Manual","Question":"Pergunta","Secret":"Senha","To_verify_the_fingerprint_":"Para verificar o fingerprint, entre em contato com seu contato usando outro meio, de preferência seguro, como o telefone.","Your_fingerprint":"Seu fingerprint","Buddy_fingerprint":"Fingerprint do contato","Close":"Fechar","Compared":"Comparado","To_authenticate_using_a_question_":"Para autenticar seu contato faça uma pergunta, mas escolha que só ele saiba a resposta.","Ask":"Pergunta","To_authenticate_pick_a_secret_":"Para autenticar, escolha um segredo que somente você e seu contato saibam.","Compare":"Compare","Fingerprints":"Fingerprints","Authentication":"Autenticação","Message":"Mensagem","Add_buddy":"Adicionar contato","rename_buddy":"renomear contato","delete_buddy":"remover contato","Login":"Entrar","Username":"Usuário","Password":"Senha","Cancel":"Cancelar","Connect":"Conectar","Type_in_the_full_username_":"Digite seu nome completo e um apelido opcional.","Alias":"Apelido","Add":"Adicionar","Subscription_request":"Pedido de inscrição","You_have_a_request_from":"Você tem um pedido de","Deny":"Negar","Approve":"Aprovar","Remove_buddy":"Remover contato","You_are_about_to_remove_":"Você está prestes a remover {{bid_name}} (<b>{{bid_jid}}</b>) de sua lista de contatos. Todas as conversas serão fechadas.","Continue_without_chat":"Continue sem converar","Please_wait":"Por favor aguarde","Login_failed":"Autenticação da conversa falhou","Sorry_we_cant_authentikate_":"A autenticação com o servidor falhou. Talvez seja a senha errada?","Retry":"Voltar","clear_history":"Limpar histórico","New_message_from":"Nova mensagem de __name__","Should_we_notify_you_":"Devemos continuar notificando sobre novas mensagens no futuro?","Please_accept_":"Por favor clique no botão \"Permitir\" na parte superior.","Hide_offline":"Esconder contatos desconectados","Show_offline":"Mostrar contatos desconectados","About":"Sobre","dnd":"Não perturbe","Mute":"Mudo","Unmute":"Ligar","Subscription":"Inscrição","both":"ambos","Status":"Status","online":"online","chat":"conversa","away":"ausente","xa":"ausente por mais tempo","offline":"desativado","none":"nenhum","Unknown_instance_tag":"Marcação desconhecida da instância","Not_one_of_our_latest_keys":"Nenhuma de nossas ultimas chaves.","Received_an_unreadable_encrypted_message":"Mensagem encriptada ilegível foi recebida.","Online":"Online","Chatty":"Tagarela","Away":"Ausente","Extended_away":"Ausente por mais tempo","Offline":"Desativado","Friendship_request":"Pedido de amizade","Confirm":"Confirmar","Dismiss":"Ignorar","Remove":"Remover","Online_help":"Ajuda online","FN":"Nome completo","N":" ","FAMILY":"Sobrenome","GIVEN":"Nome","NICKNAME":"Apelido","URL":"URL","ADR":"Endereço","STREET":"Rua, Av, etc","EXTADD":"Complemento","LOCALITY":"Localidade","REGION":"Região","PCODE":"CEP","CTRY":"País","TEL":"Telefone","NUMBER":"Número","EMAIL":"Email","USERID":" ","ORG":"Empresa","ORGNAME":"Nome","ORGUNIT":"Unidade","TITLE":"Cargo","ROLE":"Rol","BDAY":"Data de nascimento","DESC":"Descrição","PHOTO":" ","send_message":"Enviar mensagem","get_info":"Exibir informações","Settings":"Configurações","Priority":"Prioridade","Save":"Salvar","User_settings":"Configurações do usuário","A_fingerprint_":"O fingerprint é usado para certificar que a pessoa com a qual se está falando é que ela diz ser.","is":"é","Login_options":"Opções de login","BOSH_url":"BOSH URL","Domain":"Domínio","Resource":"Recurso","On_login":"Ao autenticar","Received_an_unencrypted_message":"Mensagem não encriptada recebida","Sorry_your_buddy_doesnt_provide_any_information":"Desculpe, seu contato não forneceu nenhuma informação","Info_about":"Informações sobre","Authentication_aborted":"Autenticação encerrada.","Authentication_request_received":"Pedido de autenticação recebido","Log_in_without_chat":"Entrar sem conversar","has_come_online":"ficou online","Unknown_sender":"Emissor desconhecido","Please_allow_access_to_microphone_and_camera":"Por favor clique no botão \"Permitir\" no topo, para conceder acesso ao seu microfone e câmera.","Incoming_call":"Recebendo chamada","from":"de","Do_you_want_to_accept_the_call_from":"Você aceita a chamada de","Reject":"Negar","Accept":"Aceitar","hang_up":"desligar","snapshot":"registrar imagem","mute_my_audio":"mudo","pause_my_video":"pausar vídeo","fullscreen":"tela cheia","Info":"Informações","Local_IP":"IP local","Remote_IP":"IP remoto","Local_Fingerprint":"Fingerprint local","Remote_Fingerprint":"Fingerprint remoto","Video_call_not_possible":"Chamada de vídeo impossível. Seu contato não suporta chamadas desse tipo.","Start_video_call":"Iniciar chamada de vídeo","Join_chat":null,"Join":null,"Room":null,"Nickname":null,"left_the_building":null,"entered_the_room":null,"is_now_known_as":null,"This_room_is":null,"muc_hidden":{"keyword":null,"description":null},"muc_membersonly":{"keyword":null,"description":null},"muc_moderated":{"keyword":null,"description":null},"muc_nonanonymous":{"keyword":null,"description":null},"muc_open":{"keyword":null,"description":null},"muc_passwordprotected":{"keyword":null,"description":null},"muc_persistent":{"keyword":null,"description":null},"muc_public":{"keyword":null,"description":null},"muc_semianonymous":{"keyword":null,"description":null},"muc_temporary":{"keyword":null,"description":null},"muc_unmoderated":{"keyword":null,"description":null},"muc_unsecured":{"keyword":null,"description":null},"Continue":null,"Server":null,"Rooms_are_loaded":null,"Could_load_only":null,"muc_explanation":null,"You_already_joined_this_room":null,"This_room_will_be_closed":null,"Room_not_found_":null,"Loading_room_information":null,"Destroy":null,"Leave":null,"changed_subject_to":null,"muc_removed_kicked":null,"muc_removed_info_kicked":null,"muc_removed_banned":null,"muc_removed_info_banned":null,"muc_removed_affiliation":null,"muc_removed_info_affiliation":null,"muc_removed_membersonly":null,"muc_removed_info_membersonly":null,"muc_removed_shutdown":null,"Reason":null,"message_not_send":null,"message_not_send_item-not-found":null,"message_not_send_forbidden":null,"message_not_send_not-acceptable":null,"This_room_has_been_closed":null,"Room_logging_is_enabled":null,"A_password_is_required":null,"You_are_not_on_the_member_list":null,"You_are_banned_from_this_room":null,"Your_desired_nickname_":null,"The_maximum_number_":null,"This_room_is_locked_":null,"You_are_not_allowed_to_create_":null,"Alert":null,"Call_started":null,"Call_terminated":null,"Carbon_copy":null,"Enable":null,"jingle_reason_busy":null,"jingle_reason_decline":null,"jingle_reason_success":null,"Media_failure":null,"No_local_audio_device":null,"No_local_video_device":null,"Ok":null,"PermissionDeniedError":null,"Use_local_audio_device":null,"Use_local_video_device":null,"is_":"é __status__","You_received_a_message_from_an_unknown_sender_":"Você recebeu uma mensagem de um emissor desconhecido (__sender__) Você quer mostrá-los?","Your_roster_is_empty_add_":"Sua lista está vazia, adicione um <a>novo contato</a>","onsmp_explanation_question":"Seu contato está tentando determinar se ele realmente está falando contigo. Para autenticar seu contato, entre com a resposta e clique em Responder.","onsmp_explanation_secret":"Seu contato está tentando determinar se ele realmente está falando contigo. Para autenticar seu contato, escreva a senha.","from_sender":"de __sender__","Verified_private_conversation_started":"Verificado Conversa privada iniciada.","Unverified_private_conversation_started":"Não verificado Conversa privada iniciada."}},"ro":{"translation":{"Logging_in":null,"your_connection_is_unencrypted":null,"your_connection_is_encrypted":null,"your_buddy_closed_the_private_connection":null,"start_private":null,"close_private":null,"your_buddy_is_verificated":null,"you_have_only_a_subscription_in_one_way":null,"authentication_query_sent":null,"your_message_wasnt_send_please_end_your_private_conversation":null,"unencrypted_message_received":null,"not_available":null,"no_connection":null,"relogin":null,"trying_to_start_private_conversation":null,"Verified":null,"Unverified":null,"private_conversation_aborted":null,"your_buddy_closed_the_private_conversation_you_should_do_the_same":null,"conversation_is_now_verified":null,"authentication_failed":null,"Creating_your_private_key_":null,"Authenticating_a_buddy_helps_":null,"How_do_you_want_to_authenticate_your_buddy":null,"Select_method":null,"Manual":null,"Question":null,"Secret":null,"To_verify_the_fingerprint_":null,"Your_fingerprint":null,"Buddy_fingerprint":null,"Close":null,"Compared":null,"To_authenticate_using_a_question_":null,"Ask":null,"To_authenticate_pick_a_secret_":null,"Compare":null,"Fingerprints":null,"Authentication":null,"Message":null,"Add_buddy":null,"rename_buddy":null,"delete_buddy":null,"Login":null,"Username":null,"Password":null,"Cancel":null,"Connect":null,"Type_in_the_full_username_":null,"Alias":null,"Add":null,"Subscription_request":null,"You_have_a_request_from":null,"Deny":null,"Approve":null,"Remove_buddy":null,"You_are_about_to_remove_":null,"Continue_without_chat":null,"Please_wait":null,"Login_failed":null,"Sorry_we_cant_authentikate_":null,"Retry":null,"clear_history":null,"New_message_from":null,"Should_we_notify_you_":null,"Please_accept_":null,"Hide_offline":null,"Show_offline":null,"About":null,"dnd":null,"Mute":null,"Unmute":null,"Subscription":null,"both":null,"Status":null,"online":null,"chat":null,"away":null,"xa":null,"offline":null,"none":null,"Unknown_instance_tag":null,"Not_one_of_our_latest_keys":null,"Received_an_unreadable_encrypted_message":null,"Online":null,"Chatty":null,"Away":null,"Extended_away":null,"Offline":null,"Friendship_request":null,"Confirm":null,"Dismiss":null,"Remove":null,"Online_help":null,"FN":null,"N":null,"FAMILY":null,"GIVEN":null,"NICKNAME":null,"URL":null,"ADR":null,"STREET":null,"EXTADD":null,"LOCALITY":null,"REGION":null,"PCODE":null,"CTRY":null,"TEL":null,"NUMBER":null,"EMAIL":null,"USERID":null,"ORG":null,"ORGNAME":null,"ORGUNIT":null,"TITLE":null,"ROLE":null,"BDAY":null,"DESC":null,"PHOTO":null,"send_message":null,"get_info":null,"Settings":null,"Priority":null,"Save":null,"User_settings":null,"A_fingerprint_":null,"is":null,"Login_options":null,"BOSH_url":null,"Domain":null,"Resource":null,"On_login":null,"Received_an_unencrypted_message":null,"Sorry_your_buddy_doesnt_provide_any_information":null,"Info_about":null,"Authentication_aborted":null,"Authentication_request_received":null,"Log_in_without_chat":null,"has_come_online":null,"Unknown_sender":null,"Please_allow_access_to_microphone_and_camera":null,"Incoming_call":null,"from":null,"Do_you_want_to_accept_the_call_from":null,"Reject":null,"Accept":null,"hang_up":null,"snapshot":null,"mute_my_audio":null,"pause_my_video":null,"fullscreen":null,"Info":null,"Local_IP":null,"Remote_IP":null,"Local_Fingerprint":null,"Remote_Fingerprint":null,"Video_call_not_possible":null,"Start_video_call":null,"Join_chat":null,"Join":null,"Room":null,"Nickname":null,"left_the_building":null,"entered_the_room":null,"is_now_known_as":null,"This_room_is":null,"muc_hidden":{"keyword":null,"description":null},"muc_membersonly":{"keyword":null,"description":null},"muc_moderated":{"keyword":null,"description":null},"muc_nonanonymous":{"keyword":null,"description":null},"muc_open":{"keyword":null,"description":null},"muc_passwordprotected":{"keyword":null,"description":null},"muc_persistent":{"keyword":null,"description":null},"muc_public":{"keyword":null,"description":null},"muc_semianonymous":{"keyword":null,"description":null},"muc_temporary":{"keyword":null,"description":null},"muc_unmoderated":{"keyword":null,"description":null},"muc_unsecured":{"keyword":null,"description":null},"Continue":null,"Server":null,"Rooms_are_loaded":null,"Could_load_only":null,"muc_explanation":null,"You_already_joined_this_room":null,"This_room_will_be_closed":null,"Room_not_found_":null,"Loading_room_information":null,"Destroy":null,"Leave":null,"changed_subject_to":null,"muc_removed_kicked":null,"muc_removed_info_kicked":null,"muc_removed_banned":null,"muc_removed_info_banned":null,"muc_removed_affiliation":null,"muc_removed_info_affiliation":null,"muc_removed_membersonly":null,"muc_removed_info_membersonly":null,"muc_removed_shutdown":null,"Reason":null,"message_not_send":null,"message_not_send_item-not-found":null,"message_not_send_forbidden":null,"message_not_send_not-acceptable":null,"This_room_has_been_closed":null,"Room_logging_is_enabled":null,"A_password_is_required":null,"You_are_not_on_the_member_list":null,"You_are_banned_from_this_room":null,"Your_desired_nickname_":null,"The_maximum_number_":null,"This_room_is_locked_":null,"You_are_not_allowed_to_create_":null,"Alert":null,"Call_started":null,"Call_terminated":null,"Carbon_copy":null,"Enable":null,"jingle_reason_busy":null,"jingle_reason_decline":null,"jingle_reason_success":null,"Media_failure":null,"No_local_audio_device":null,"No_local_video_device":null,"Ok":null,"PermissionDeniedError":null,"Use_local_audio_device":null,"Use_local_video_device":null,"is_":null,"You_received_a_message_from_an_unknown_sender_":null,"Your_roster_is_empty_add_":null,"onsmp_explanation_question":null,"onsmp_explanation_secret":null,"from_sender":null,"Verified_private_conversation_started":null,"Unverified_private_conversation_started":null}},"ru":{"translation":{"Logging_in":"Вход в систему...","your_connection_is_unencrypted":"Ваше соединение не зашифровано.","your_connection_is_encrypted":"Ваше соединение зашифровано.","your_buddy_closed_the_private_connection":"Ваш собеседник закончил зашифрованное соединение.","start_private":"Начать зашифрованный чат","close_private":"Закончить зашифрованный чат","your_buddy_is_verificated":"Собеседник подтвержден.","you_have_only_a_subscription_in_one_way":"У вас только односторонняя подписка.","authentication_query_sent":null,"your_message_wasnt_send_please_end_your_private_conversation":"Сообщение не отправлено. Завершите зашифрованный чат, пожалуйста.","unencrypted_message_received":"Получено незашифрованное сообщение","not_available":"Не доступен","no_connection":"Нет соединения!","relogin":"переподключиться","trying_to_start_private_conversation":"Попытка начать зашифрованный чат!","Verified":"Подтверждено","Unverified":"Не подтверждено","private_conversation_aborted":"Зашифрованный чат отклонен!","your_buddy_closed_the_private_conversation_you_should_do_the_same":"Ваш собеседник завершил зашифрованный чат! Вы должны сделать тоже самое.","conversation_is_now_verified":"Чат теперь утвержден.","authentication_failed":"Ошибка авторизации.","Creating_your_private_key_":null,"Authenticating_a_buddy_helps_":null,"How_do_you_want_to_authenticate_your_buddy":null,"Select_method":"Выберите метод...","Manual":"Вручную","Question":"Вопрос","Secret":"Пароль","To_verify_the_fingerprint_":null,"Your_fingerprint":"Ваш отпечаток","Buddy_fingerprint":"Отпечаток собеседника","Close":"Закрыть","Compared":"Сравнение завершено","To_authenticate_using_a_question_":"Для авторизации с помощью вопроса выберите вопрос, ответ на который знаете только Вы и собеседник.","Ask":null,"To_authenticate_pick_a_secret_":"Для авторизации выберите пароль, который знаете только Вы и собеседник.","Compare":"Сравнить","Fingerprints":"Отпечатки","Authentication":"Авторизация","Message":"Сообщение","Add_buddy":"Добавить контакт","rename_buddy":"переименовать контакт","delete_buddy":"удалить контакт","Login":"Вход","Username":"Логин","Password":"Пароль","Cancel":"Отмена","Connect":"Подключить","Type_in_the_full_username_":null,"Alias":"Псевдоним","Add":"Добавить","Subscription_request":"Запрос подписки","You_have_a_request_from":"Получен запрос от","Deny":"Отказ","Approve":"Подтвердить","Remove_buddy":"Удалить контакт","You_are_about_to_remove_":null,"Continue_without_chat":"Продолжить без чата","Please_wait":"Подождите…","Login_failed":"Неудачный вход в чат","Sorry_we_cant_authentikate_":null,"Retry":null,"clear_history":"Очистить историю","New_message_from":"Новое сообщение от __name__","Should_we_notify_you_":"Уведомлять о новых сообщениях в будущем?","Please_accept_":null,"Hide_offline":"Спрятать отключенных","Show_offline":"Показать отключенных","About":"О проекте","dnd":"Не беспокоить","Mute":"Выкл. уведомления","Unmute":"Вкл. уведомления","Subscription":"Подписка","both":"оба","Status":"Статус","online":"в сети","chat":"готов общаться","away":"отошел","xa":"отсутствую","offline":"не в сети","none":"нет","Unknown_instance_tag":"Неизвестный тег.","Not_one_of_our_latest_keys":null,"Received_an_unreadable_encrypted_message":null,"Online":"В сети","Chatty":"Готов общаться","Away":"Отошел","Extended_away":"Отсутствую","Offline":"Не в сети","Friendship_request":null,"Confirm":"Подтвердить","Dismiss":"Отклонить","Remove":"Удалить","Online_help":"Онлайн помощь","FN":"Полное имя","N":null,"FAMILY":"Фамилия","GIVEN":null,"NICKNAME":"Ник","URL":null,"ADR":"Адрес","STREET":"Улица","EXTADD":"Дополнительный адрес","LOCALITY":null,"REGION":null,"PCODE":"Индекс","CTRY":"Страна","TEL":"Телефон","NUMBER":"Номер","EMAIL":"Почта","USERID":null,"ORG":"Организация","ORGNAME":"Название","ORGUNIT":"Отдел","TITLE":"Должность","ROLE":"Обязанности","BDAY":"День рождения","DESC":"Описание","PHOTO":null,"send_message":"Отправить сообщение","get_info":"Показать информацию","Settings":"Настройки","Priority":"Приоритет","Save":"Сохранить","User_settings":"Пользовательские настройки","A_fingerprint_":null,"is":null,"Login_options":"Параметры входа","BOSH_url":null,"Domain":"Домен","Resource":"Ресурс","On_login":"Автоматически подключаться","Received_an_unencrypted_message":null,"Sorry_your_buddy_doesnt_provide_any_information":null,"Info_about":"Информация о","Authentication_aborted":null,"Authentication_request_received":null,"Log_in_without_chat":"Вход без чата","has_come_online":"появился в сети","Unknown_sender":"Неизвестный отправитель","Please_allow_access_to_microphone_and_camera":null,"Incoming_call":"Входящий вызов","from":"от","Do_you_want_to_accept_the_call_from":null,"Reject":null,"Accept":null,"hang_up":null,"snapshot":null,"mute_my_audio":null,"pause_my_video":null,"fullscreen":null,"Info":null,"Local_IP":null,"Remote_IP":null,"Local_Fingerprint":null,"Remote_Fingerprint":null,"Video_call_not_possible":null,"Start_video_call":null,"Join_chat":null,"Join":null,"Room":null,"Nickname":null,"left_the_building":null,"entered_the_room":null,"is_now_known_as":null,"This_room_is":null,"muc_hidden":{"keyword":null,"description":null},"muc_membersonly":{"keyword":null,"description":null},"muc_moderated":{"keyword":null,"description":null},"muc_nonanonymous":{"keyword":null,"description":null},"muc_open":{"keyword":null,"description":null},"muc_passwordprotected":{"keyword":null,"description":null},"muc_persistent":{"keyword":null,"description":null},"muc_public":{"keyword":null,"description":null},"muc_semianonymous":{"keyword":null,"description":null},"muc_temporary":{"keyword":null,"description":null},"muc_unmoderated":{"keyword":null,"description":null},"muc_unsecured":{"keyword":null,"description":null},"Continue":null,"Server":null,"Rooms_are_loaded":null,"Could_load_only":null,"muc_explanation":null,"You_already_joined_this_room":null,"This_room_will_be_closed":null,"Room_not_found_":null,"Loading_room_information":null,"Destroy":null,"Leave":null,"changed_subject_to":null,"muc_removed_kicked":null,"muc_removed_info_kicked":null,"muc_removed_banned":null,"muc_removed_info_banned":null,"muc_removed_affiliation":null,"muc_removed_info_affiliation":null,"muc_removed_membersonly":null,"muc_removed_info_membersonly":null,"muc_removed_shutdown":null,"Reason":null,"message_not_send":null,"message_not_send_item-not-found":null,"message_not_send_forbidden":null,"message_not_send_not-acceptable":null,"This_room_has_been_closed":null,"Room_logging_is_enabled":null,"A_password_is_required":null,"You_are_not_on_the_member_list":null,"You_are_banned_from_this_room":null,"Your_desired_nickname_":null,"The_maximum_number_":null,"This_room_is_locked_":null,"You_are_not_allowed_to_create_":null,"Alert":null,"Call_started":null,"Call_terminated":null,"Carbon_copy":null,"Enable":"Включить","jingle_reason_busy":null,"jingle_reason_decline":null,"jingle_reason_success":null,"Media_failure":null,"No_local_audio_device":null,"No_local_video_device":null,"Ok":null,"PermissionDeniedError":null,"Use_local_audio_device":null,"Use_local_video_device":null,"is_":null,"You_received_a_message_from_an_unknown_sender_":"Вы получили сообщение от неизвестного отправителя (__sender__)","Your_roster_is_empty_add_":"Ваш список контактов пуст, добавить <a>новый контакт</a>","onsmp_explanation_question":"Собеседник пытается определить, что общается действительно с Вами.","onsmp_explanation_secret":"Собеседник пытается определить, что общается действительно с Вами. введите пароль.","from_sender":"от __sender__","Verified_private_conversation_started":"Подтверждено Зашифрованный чат начат.","Unverified_private_conversation_started":"Не подтверждено Зашифрованный чат начат."}}}; \ No newline at end of file
diff --git a/build/js/ojsxc.js b/build/js/ojsxc.js
index 12c8f80..0065e00 100644
--- a/build/js/ojsxc.js
+++ b/build/js/ojsxc.js
@@ -1,5 +1,5 @@
/*!
- * ojsxc v2.0.1 - 2015-05-23
+ * ojsxc v2.1.0-beta1 - 2015-07-21
*
* Copyright (c) 2015 Klaus Herberth <klaus@jsxc.org> <br>
* Released under the MIT license
@@ -7,7 +7,7 @@
* Please see http://www.jsxc.org/
*
* @author Klaus Herberth <klaus@jsxc.org>
- * @version 2.0.1
+ * @version 2.1.0-beta1
* @license MIT
*/
@@ -119,20 +119,20 @@ $(function() {
}
});
- jsxc.log = "";
- jsxc.tmp = null;
jsxc.init({
app_name: 'Owncloud',
loginForm: {
form: '#body-login form',
jid: '#user',
- pass: '#password'
+ pass: '#password',
+ attachIfFound: false
},
logoutElement: $('#logout'),
rosterAppend: 'body',
root: oc_appswebroots.ojsxc + '/js/jsxc',
- // @TODO: don't include get turn credentials routine into jsxc
- turnCredentialsPath: OC.filePath('ojsxc', 'ajax', 'getturncredentials.php'),
+ RTCPeerConfig: {
+ url: OC.filePath('ojsxc', 'ajax', 'getturncredentials.php')
+ },
displayRosterMinimized: function() {
return OC.currentUser != null;
},
@@ -195,11 +195,8 @@ $(function() {
}
});
},
- loadSettings: function(username, password) {
- var data = null;
-
+ loadSettings: function(username, password, cb) {
$.ajax({
- async: false,
type: 'POST',
url: OC.filePath('ojsxc', 'ajax', 'getsettings.php'),
data: {
@@ -207,14 +204,18 @@ $(function() {
password: password
},
success: function(d) {
- data = d.data;
+ if (d.result === 'success') {
+ cb(d.data);
+ } else {
+ cb(false);
+ }
},
error: function() {
jsxc.error('XHR error on getsettings.php');
+
+ cb(false);
}
});
-
- return data;
},
saveSettinsPermanent: function(data) {
var ret = 1;
diff --git a/build/settings.php b/build/settings.php
index e9d6754..d94296e 100644
--- a/build/settings.php
+++ b/build/settings.php
@@ -9,6 +9,7 @@ $tmpl->assign ( 'boshUrl', OCP\Config::getAppValue ( 'ojsxc', 'boshUrl' ) );
$tmpl->assign ( 'xmppDomain', OCP\Config::getAppValue ( 'ojsxc', 'xmppDomain' ) );
$tmpl->assign ( 'xmppResource', OCP\Config::getAppValue ( 'ojsxc', 'xmppResource' ) );
$tmpl->assign ( 'xmppOverwrite', OCP\Config::getAppValue ( 'ojsxc', 'xmppOverwrite' ) );
+$tmpl->assign ( 'xmppStartMinimized', OCP\Config::getAppValue ( 'ojsxc', 'xmppStartMinimized' ) );
$tmpl->assign ( 'iceUrl', OCP\Config::getAppValue ( 'ojsxc', 'iceUrl' ) );
$tmpl->assign ( 'iceUsername', OCP\Config::getAppValue ( 'ojsxc', 'iceUsername' ) );
$tmpl->assign ( 'iceCredential', OCP\Config::getAppValue ( 'ojsxc', 'iceCredential' ) );
diff --git a/build/templates/settings.php b/build/templates/settings.php
index 7e346bb..49fcbd4 100644
--- a/build/templates/settings.php
+++ b/build/templates/settings.php
@@ -19,7 +19,12 @@
</tr>
<tr>
<td><label for="xmppOverwrite">Allow user to overwrite XMPP settings</label></td>
- <td><input type="checkbox" name="xmppOverwrite" id="xmppOverwrite" value="true" <?php if($_['xmppOverwrite'] == 'true') echo "checked"; ?> /></td>
+ <td><input type="checkbox" name="xmppOverwrite" id="xmppOverwrite" value="true" <?php if($_['xmppOverwrite'] === 'true' || $_['xmppOverwrite'] === true) echo "checked"; ?> /></td>
+ <td></td>
+ </tr>
+ <tr>
+ <td><label for="xmppStartMinimized">Hide roster after first login</label></td>
+ <td><input type="checkbox" name="xmppStartMinimized" id="xmppStartMinimized" value="true" <?php if($_['xmppStartMinimized'] === 'true' || $_['xmppStartMinimized'] === true) echo "checked"; ?> /></td>
<td></td>
</tr>
<tr>
@@ -54,4 +59,4 @@
<input type="submit" value="Save settings" />
</form>
-</div> \ No newline at end of file
+</div>