xmpp.chapril.org-conversejs/builds/converse.nojquery.min.js
2014-11-15 16:40:34 +01:00

204 lines
520 KiB
JavaScript
Raw Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

/**
* @license almond 0.2.9 Copyright (c) 2011-2014, The Dojo Foundation All Rights Reserved.
* Available via the MIT or new BSD license.
* see: http://github.com/jrburke/almond for details
*/
/*!
* jQuery Browser Plugin v0.0.6
* https://github.com/gabceb/jquery-browser-plugin
*
* Original jquery-browser code Copyright 2005, 2013 jQuery Foundation, Inc. and other contributors
* http://jquery.org/license
*
* Modifications Copyright 2013 Gabriel Cebrian
* https://github.com/gabceb
*
* Released under the MIT license
*
* Date: 2013-07-29T17:23:27-07:00
*/
/*
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
*/
/*!
* EventEmitter v4.2.3 - git.io/ee
* Oliver Caldwell
* MIT license
* @preserve
*/
/*!
otr.js v0.2.12 - 2014-04-15
(c) 2014 - Arlo Breault <arlolra@gmail.com>
Freely distributed under the MPL v2.0 license.
This file is concatenated for the browser.
Please see: https://github.com/arlolra/otr
*/
//! moment.js
//! version : 2.6.0
//! authors : Tim Wood, Iskren Chernev, Moment.js contributors
//! license : MIT
//! momentjs.com
/*
jed.js
v0.5.0beta
https://github.com/SlexAxton/Jed
-----------
A gettext compatible i18n library for modern JavaScript Applications
by Alex Sexton - AlexSexton [at] gmail - @SlexAxton
WTFPL license for use
Dojo CLA for contributions
Jed offers the entire applicable GNU gettext spec'd set of
functions, but also offers some nicer wrappers around them.
The api for gettext was written for a language with no function
overloading, so Jed allows a little more of that.
Many thanks to Joshua I. Miller - unrtst@cpan.org - who wrote
gettext.js back in 2008. I was able to vet a lot of my ideas
against his. I also made sure Jed passed against his tests
in order to offer easy upgrades -- jsgettext.berlios.de
*/
// Underscore 1.3.0 was used to port and is licensed
/**
sprintf() for JavaScript 0.7-beta1
http://www.diveintojavascript.com/projects/javascript-sprintf
Copyright (c) Alexandru Marasteanu <alexaholic [at) gmail (dot] com>
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.
* Neither the name of sprintf() for JavaScript nor the
names of its contributors may be used to endorse or promote products
derived from this software without specific prior written permission.
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 Alexandru Marasteanu 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.
*/
// Underscore.js 1.6.0
// http://underscorejs.org
// (c) 2009-2014 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
// Underscore may be freely distributed under the MIT license.
// (c) 2010-2014 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
// Backbone may be freely distributed under the MIT license.
// For all details and documentation:
// http://backbonejs.org
/*!
* Backbone.Overview
*
* Copyright (c) 2014, JC Brand <jc@opkode.com>
* Licensed under the Mozilla Public License (MPL)
*/
/*!
* typeahead.js 0.10.5
* https://github.com/twitter/typeahead.js
* Copyright 2013-2014 Twitter, Inc. and other contributors; Licensed MIT
*/
/*
* 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.
*/
/*
* 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.
*/
/*
This program is distributed under the terms of the MIT license.
Please see the LICENSE file for details.
Copyright 2006-2008, OGG, LLC
*/
/*
Copyright 2010, François de Metz <francois@2metz.fr>
*/
/**
* @license RequireJS text 2.0.12 Copyright (c) 2010-2014, The Dojo Foundation All Rights Reserved.
* Available via the MIT or new BSD license.
* see: http://github.com/requirejs/text for details
*/
// RequireJS UnderscoreJS template plugin
// http://github.com/jfparadis/requirejs-tpl
//
// An alternative to http://github.com/ZeeAgency/requirejs-tpl
//
// Using UnderscoreJS micro-templates at http://underscorejs.org/#template
// Using and RequireJS text.js at http://requirejs.org/docs/api.html#text
// @author JF Paradis
// @version 0.0.2
//
// Released under the MIT license
//
// Usage:
// require(['backbone', 'tpl!mytemplate'], function (Backbone, mytemplate) {
// return Backbone.View.extend({
// initialize: function(){
// this.render();
// },
// render: function(){
// this.$el.html(mytemplate({message: 'hello'}));
// });
// });
//
// Configuration: (optional)
// require.config({
// tpl: {
// extension: '.tpl' // default = '.html'
// }
// });
/*!
* Converse.js (Web-based XMPP instant messaging client)
* http://conversejs.org
*
* Copyright (c) 2012, Jan-Carel Brand <jc@opkode.com>
* Licensed under the Mozilla Public License (MPL)
*/
function b64_sha1(e){return binb2b64(core_sha1(str2binb(e),e.length*8))}function str_sha1(e){return binb2str(core_sha1(str2binb(e),e.length*8))}function b64_hmac_sha1(e,t){return binb2b64(core_hmac_sha1(e,t))}function str_hmac_sha1(e,t){return binb2str(core_hmac_sha1(e,t))}function core_sha1(e,t){e[t>>5]|=128<<24-t%32,e[(t+64>>9<<4)+15]=t;var n=new Array(80),r=1732584193,i=-271733879,s=-1732584194,o=271733878,u=-1009589776,a,f,l,c,h,p,d,v;for(a=0;a<e.length;a+=16){c=r,h=i,p=s,d=o,v=u;for(f=0;f<80;f++)f<16?n[f]=e[a+f]:n[f]=rol(n[f-3]^n[f-8]^n[f-14]^n[f-16],1),l=safe_add(safe_add(rol(r,5),sha1_ft(f,i,s,o)),safe_add(safe_add(u,n[f]),sha1_kt(f))),u=o,o=s,s=rol(i,30),i=r,r=l;r=safe_add(r,c),i=safe_add(i,h),s=safe_add(s,p),o=safe_add(o,d),u=safe_add(u,v)}return[r,i,s,o,u]}function sha1_ft(e,t,n,r){return e<20?t&n|~t&r:e<40?t^n^r:e<60?t&n|t&r|n&r:t^n^r}function sha1_kt(e){return e<20?1518500249:e<40?1859775393:e<60?-1894007588:-899497514}function core_hmac_sha1(e,t){var n=str2binb(e);n.length>16&&(n=core_sha1(n,e.length*8));var r=new Array(16),i=new Array(16);for(var s=0;s<16;s++)r[s]=n[s]^909522486,i[s]=n[s]^1549556828;var o=core_sha1(r.concat(str2binb(t)),512+t.length*8);return core_sha1(i.concat(o),672)}function safe_add(e,t){var n=(e&65535)+(t&65535),r=(e>>16)+(t>>16)+(n>>16);return r<<16|n&65535}function rol(e,t){return e<<t|e>>>32-t}function str2binb(e){var t=[],n=255;for(var r=0;r<e.length*8;r+=8)t[r>>5]|=(e.charCodeAt(r/8)&n)<<24-r%32;return t}function binb2str(e){var t="",n=255;for(var r=0;r<e.length*32;r+=8)t+=String.fromCharCode(e[r>>5]>>>24-r%32&n);return t}function binb2b64(e){var t="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",n="",r,i;for(var s=0;s<e.length*4;s+=3){r=(e[s>>2]>>8*(3-s%4)&255)<<16|(e[s+1>>2]>>8*(3-(s+1)%4)&255)<<8|e[s+2>>2]>>8*(3-(s+2)%4)&255;for(i=0;i<4;i++)s*8+i*6>e.length*32?n+="=":n+=t.charAt(r>>6*(3-i)&63)}return n}var requirejs,require,define;(function(e){function h(e,t){return f.call(e,t)}function p(e,t){var n,r,i,s,o,a,f,l,h,p,d,v=t&&t.split("/"),m=u.map,g=m&&m["*"]||{};if(e&&e.charAt(0)===".")if(t){v=v.slice(0,v.length-1),e=e.split("/"),o=e.length-1,u.nodeIdCompat&&c.test(e[o])&&(e[o]=e[o].replace(c,"")),e=v.concat(e);for(h=0;h<e.length;h+=1){d=e[h];if(d===".")e.splice(h,1),h-=1;else if(d===".."){if(h===1&&(e[2]===".."||e[0]===".."))break;h>0&&(e.splice(h-1,2),h-=2)}}e=e.join("/")}else e.indexOf("./")===0&&(e=e.substring(2));if((v||g)&&m){n=e.split("/");for(h=n.length;h>0;h-=1){r=n.slice(0,h).join("/");if(v)for(p=v.length;p>0;p-=1){i=m[v.slice(0,p).join("/")];if(i){i=i[r];if(i){s=i,a=h;break}}}if(s)break;!f&&g&&g[r]&&(f=g[r],l=h)}!s&&f&&(s=f,a=l),s&&(n.splice(0,a,s),e=n.join("/"))}return e}function d(t,r){return function(){return n.apply(e,l.call(arguments,0).concat([t,r]))}}function v(e){return function(t){return p(t,e)}}function m(e){return function(t){s[e]=t}}function g(n){if(h(o,n)){var r=o[n];delete o[n],a[n]=!0,t.apply(e,r)}if(!h(s,n)&&!h(a,n))throw new Error("No "+n);return s[n]}function y(e){var t,n=e?e.indexOf("!"):-1;return n>-1&&(t=e.substring(0,n),e=e.substring(n+1,e.length)),[t,e]}function b(e){return function(){return u&&u.config&&u.config[e]||{}}}var t,n,r,i,s={},o={},u={},a={},f=Object.prototype.hasOwnProperty,l=[].slice,c=/\.js$/;r=function(e,t){var n,r=y(e),i=r[0];return e=r[1],i&&(i=p(i,t),n=g(i)),i?n&&n.normalize?e=n.normalize(e,v(t)):e=p(e,t):(e=p(e,t),r=y(e),i=r[0],e=r[1],i&&(n=g(i))),{f:i?i+"!"+e:e,n:e,pr:i,p:n}},i={require:function(e){return d(e)},exports:function(e){var t=s[e];return typeof t!="undefined"?t:s[e]={}},module:function(e){return{id:e,uri:"",exports:s[e],config:b(e)}}},t=function(t,n,u,f){var l,c,p,v,y,b=[],w=typeof u,E;f=f||t;if(w==="undefined"||w==="function"){n=!n.length&&u.length?["require","exports","module"]:n;for(y=0;y<n.length;y+=1){v=r(n[y],f),c=v.f;if(c==="require")b[y]=i.require(t);else if(c==="exports")b[y]=i.exports(t),E=!0;else if(c==="module")l=b[y]=i.module(t);else if(h(s,c)||h(o,c)||h(a,c))b[y]=g(c);else{if(!v.p)throw new Error(t+" missing "+c);v.p.load(v.n,d(f,!0),m(c),{}),b[y]=s[c]}}p=u?u.apply(s[t],b):undefined;if(t)if(l&&l.exports!==e&&l.exports!==s[t])s[t]=l.exports;else if(p!==e||!E)s[t]=p}else t&&(s[t]=u)},requirejs=require=n=function(s,o,a,f,l){if(typeof s=="string")return i[s]?i[s](o):g(r(s,o).f);if(!s.splice){u=s,u.deps&&n(u.deps,u.callback);if(!o)return;o.splice?(s=o,o=a,a=null):s=e}return o=o||function(){},typeof a=="function"&&(a=f,f=l),f?t(e,s,o,a):setTimeout(function(){t(e,s,o,a)},4),n},n.config=function(e){return n(e)},requirejs._defined=s,define=function(e,t,n){t.splice||(n=t,t=[]),!h(s,e)&&!h(o,e)&&(o[e]=[e,t,n])},define.amd={jQuery:!0}})(),define("components/almond/almond.js",function(){}),define("jquery",[],function(){return jQuery}),define("jquery-private",["jquery"],function(e){return e}),define("utils",["jquery"],function(e){e.fn.hasScrollBar=function(){return e.contains(document,this.get(0))?this.parent().height()<this.get(0).scrollHeight?!0:!1:!1},e.fn.addHyperlinks=function(){return this.length>0&&this.each(function(t,n){var r=e(n).html(),i=r.match(/\b(https?:\/\/|www\.|https?:\/\/www\.)[^\s<]{2,200}\b/g);if(i)for(t=0;t<i.length;t++){var s=i[t].indexOf("http://")===0||i[t].indexOf("https://")===0?"":"http://",o=encodeURI(decodeURI(i[t])).replace(/[!'()]/g,escape).replace(/\*/g,"%2A");r=r.replace(i[t],"<a target='_blank' href='"+s+o+"'>"+i[t]+"</a>")}e(n).html(r)}),this};var t={__:function(e){this.i18n===undefined&&(this.i18n=locales.en);var t=this.i18n.translate(e);return arguments.length>1?t.fetch.apply(t,[].slice.call(arguments,1)):t.fetch()},___:function(e){return e}};return t}),function(e,t){typeof define=="function"&&define.amd?define("jquery.browser",["jquery"],function(n){t(n,e)}):t(jQuery,e)}(this,function(e,t){var n,r;e.uaMatch=function(e){e=e.toLowerCase();var t=/(opr)[\/]([\w.]+)/.exec(e)||/(chrome)[ \/]([\w.]+)/.exec(e)||/(version)[ \/]([\w.]+).*(safari)[ \/]([\w.]+)/.exec(e)||/(webkit)[ \/]([\w.]+)/.exec(e)||/(opera)(?:.*version|)[ \/]([\w.]+)/.exec(e)||/(msie) ([\w.]+)/.exec(e)||e.indexOf("trident")>=0&&/(rv)(?::| )([\w.]+)/.exec(e)||e.indexOf("compatible")<0&&/(mozilla)(?:.*? rv:([\w.]+)|)/.exec(e)||[],n=/(ipad)/.exec(e)||/(iphone)/.exec(e)||/(android)/.exec(e)||/(windows phone)/.exec(e)||/(win)/.exec(e)||/(mac)/.exec(e)||/(linux)/.exec(e)||/(cros)/i.exec(e)||[];return{browser:t[3]||t[1]||"",version:t[2]||"0",platform:n[0]||""}},n=e.uaMatch(t.navigator.userAgent),r={},n.browser&&(r[n.browser]=!0,r.version=n.version,r.versionNumber=parseInt(n.version)),n.platform&&(r[n.platform]=!0);if(r.android||r.ipad||r.iphone||r["windows phone"])r.mobile=!0;if(r.cros||r.mac||r.linux||r.win)r.desktop=!0;if(r.chrome||r.opr||r.safari)r.webkit=!0;if(r.rv){var i="msie";n.browser=i,r[i]=!0}if(r.opr){var s="opera";n.browser=s,r[s]=!0}if(r.safari&&r.android){var o="android";n.browser=o,r[o]=!0}return r.name=n.browser,r.platform=n.platform,e.browser=r,r});var CryptoJS=CryptoJS||function(e,t){var n={},r=n.lib={},i=r.Base=function(){function e(){}return{extend:function(t){e.prototype=this;var n=new e;return t&&n.mixIn(t),n.hasOwnProperty("init")||(n.init=function(){n.$super.init.apply(this,arguments)}),n.init.prototype=n,n.$super=this,n},create:function(){var e=this.extend();return e.init.apply(e,arguments),e},init:function(){},mixIn:function(e){for(var t in e)e.hasOwnProperty(t)&&(this[t]=e[t]);e.hasOwnProperty("toString")&&(this.toString=e.toString)},clone:function(){return this.init.prototype.extend(this)}}}(),s=r.WordArray=i.extend({init:function(e,n){e=this.words=e||[],n!=t?this.sigBytes=n:this.sigBytes=e.length*4},toString:function(e){return(e||u).stringify(this)},concat:function(e){var t=this.words,n=e.words,r=this.sigBytes,i=e.sigBytes;this.clamp();if(r%4)for(var s=0;s<i;s++){var o=n[s>>>2]>>>24-s%4*8&255;t[r+s>>>2]|=o<<24-(r+s)%4*8}else if(n.length>65535)for(var s=0;s<i;s+=4)t[r+s>>>2]=n[s>>>2];else t.push.apply(t,n);return this.sigBytes+=i,this},clamp:function(){var t=this.words,n=this.sigBytes;t[n>>>2]&=4294967295<<32-n%4*8,t.length=e.ceil(n/4)},clone:function(){var e=i.clone.call(this);return e.words=this.words.slice(0),e},random:function(t){var n=[];for(var r=0;r<t;r+=4)n.push(e.random()*4294967296|0);return new s.init(n,t)}}),o=n.enc={},u=o.Hex={stringify:function(e){var t=e.words,n=e.sigBytes,r=[];for(var i=0;i<n;i++){var s=t[i>>>2]>>>24-i%4*8&255;r.push((s>>>4).toString(16)),r.push((s&15).toString(16))}return r.join("")},parse:function(e){var t=e.length,n=[];for(var r=0;r<t;r+=2)n[r>>>3]|=parseInt(e.substr(r,2),16)<<24-r%8*4;return new s.init(n,t/2)}},a=o.Latin1={stringify:function(e){var t=e.words,n=e.sigBytes,r=[];for(var i=0;i<n;i++){var s=t[i>>>2]>>>24-i%4*8&255;r.push(String.fromCharCode(s))}return r.join("")},parse:function(e){var t=e.length,n=[];for(var r=0;r<t;r++)n[r>>>2]|=(e.charCodeAt(r)&255)<<24-r%4*8;return new s.init(n,t)}},f=o.Utf8={stringify:function(e){try{return decodeURIComponent(escape(a.stringify(e)))}catch(t){throw new Error("Malformed UTF-8 data")}},parse:function(e){return a.parse(unescape(encodeURIComponent(e)))}},l=r.BufferedBlockAlgorithm=i.extend({reset:function(){this._data=new s.init,this._nDataBytes=0},_append:function(e){typeof e=="string"&&(e=f.parse(e)),this._data.concat(e),this._nDataBytes+=e.sigBytes},_process:function(t){var n=this._data,r=n.words,i=n.sigBytes,o=this.blockSize,u=o*4,a=i/u;t?a=e.ceil(a):a=e.max((a|0)-this._minBufferSize,0);var f=a*o,l=e.min(f*4,i);if(f){for(var c=0;c<f;c+=o)this._doProcessBlock(r,c);var h=r.splice(0,f);n.sigBytes-=l}return new s.init(h,l)},clone:function(){var e=i.clone.call(this);return e._data=this._data.clone(),e},_minBufferSize:0}),c=r.Hasher=l.extend({cfg:i.extend(),init:function(e){this.cfg=this.cfg.extend(e),this.reset()},reset:function(){l.reset.call(this),this._doReset()},update:function(e){return this._append(e),this._process(),this},finalize:function(e){e&&this._append(e);var t=this._doFinalize();return t},blockSize:16,_createHelper:function(e){return function(t,n){return(new e.init(n)).finalize(t)}},_createHmacHelper:function(e){return function(t,n){return(new h.HMAC.init(e,n)).finalize(t)}}}),h=n.algo={};return n}(Math);define("crypto.core",function(){}),function(){var e=CryptoJS,t=e.lib,n=t.WordArray,r=e.enc,i=r.Base64={stringify:function(e){var t=e.words,n=e.sigBytes,r=this._map;e.clamp();var i=[];for(var s=0;s<n;s+=3){var o=t[s>>>2]>>>24-s%4*8&255,u=t[s+1>>>2]>>>24-(s+1)%4*8&255,a=t[s+2>>>2]>>>24-(s+2)%4*8&255,f=o<<16|u<<8|a;for(var l=0;l<4&&s+l*.75<n;l++)i.push(r.charAt(f>>>6*(3-l)&63))}var c=r.charAt(64);if(c)while(i.length%4)i.push(c);return i.join("")},parse:function(e){var t=e.length,r=this._map,i=r.charAt(64);if(i){var s=e.indexOf(i);s!=-1&&(t=s)}var o=[],u=0;for(var a=0;a<t;a++)if(a%4){var f=r.indexOf(e.charAt(a-1))<<a%4*2,l=r.indexOf(e.charAt(a))>>>6-a%4*2;o[u>>>2]|=(f|l)<<24-u%4*8,u++}return n.create(o,u)},_map:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="}}(),define("crypto.enc-base64",["crypto.core"],function(){}),function(e){function a(e,t,n,r,i,s,o){var u=e+(t&n|~t&r)+i+o;return(u<<s|u>>>32-s)+t}function f(e,t,n,r,i,s,o){var u=e+(t&r|n&~r)+i+o;return(u<<s|u>>>32-s)+t}function l(e,t,n,r,i,s,o){var u=e+(t^n^r)+i+o;return(u<<s|u>>>32-s)+t}function c(e,t,n,r,i,s,o){var u=e+(n^(t|~r))+i+o;return(u<<s|u>>>32-s)+t}var t=CryptoJS,n=t.lib,r=n.WordArray,i=n.Hasher,s=t.algo,o=[];(function(){for(var t=0;t<64;t++)o[t]=e.abs(e.sin(t+1))*4294967296|0})();var u=s.MD5=i.extend({_doReset:function(){this._hash=new r.init([1732584193,4023233417,2562383102,271733878])},_doProcessBlock:function(e,t){for(var n=0;n<16;n++){var r=t+n,i=e[r];e[r]=(i<<8|i>>>24)&16711935|(i<<24|i>>>8)&4278255360}var s=this._hash.words,u=e[t+0],h=e[t+1],p=e[t+2],d=e[t+3],v=e[t+4],m=e[t+5],g=e[t+6],y=e[t+7],b=e[t+8],w=e[t+9],E=e[t+10],S=e[t+11],x=e[t+12],N=e[t+13],C=e[t+14],k=e[t+15],L=s[0],A=s[1],O=s[2],M=s[3];L=a(L,A,O,M,u,7,o[0]),M=a(M,L,A,O,h,12,o[1]),O=a(O,M,L,A,p,17,o[2]),A=a(A,O,M,L,d,22,o[3]),L=a(L,A,O,M,v,7,o[4]),M=a(M,L,A,O,m,12,o[5]),O=a(O,M,L,A,g,17,o[6]),A=a(A,O,M,L,y,22,o[7]),L=a(L,A,O,M,b,7,o[8]),M=a(M,L,A,O,w,12,o[9]),O=a(O,M,L,A,E,17,o[10]),A=a(A,O,M,L,S,22,o[11]),L=a(L,A,O,M,x,7,o[12]),M=a(M,L,A,O,N,12,o[13]),O=a(O,M,L,A,C,17,o[14]),A=a(A,O,M,L,k,22,o[15]),L=f(L,A,O,M,h,5,o[16]),M=f(M,L,A,O,g,9,o[17]),O=f(O,M,L,A,S,14,o[18]),A=f(A,O,M,L,u,20,o[19]),L=f(L,A,O,M,m,5,o[20]),M=f(M,L,A,O,E,9,o[21]),O=f(O,M,L,A,k,14,o[22]),A=f(A,O,M,L,v,20,o[23]),L=f(L,A,O,M,w,5,o[24]),M=f(M,L,A,O,C,9,o[25]),O=f(O,M,L,A,d,14,o[26]),A=f(A,O,M,L,b,20,o[27]),L=f(L,A,O,M,N,5,o[28]),M=f(M,L,A,O,p,9,o[29]),O=f(O,M,L,A,y,14,o[30]),A=f(A,O,M,L,x,20,o[31]),L=l(L,A,O,M,m,4,o[32]),M=l(M,L,A,O,b,11,o[33]),O=l(O,M,L,A,S,16,o[34]),A=l(A,O,M,L,C,23,o[35]),L=l(L,A,O,M,h,4,o[36]),M=l(M,L,A,O,v,11,o[37]),O=l(O,M,L,A,y,16,o[38]),A=l(A,O,M,L,E,23,o[39]),L=l(L,A,O,M,N,4,o[40]),M=l(M,L,A,O,u,11,o[41]),O=l(O,M,L,A,d,16,o[42]),A=l(A,O,M,L,g,23,o[43]),L=l(L,A,O,M,w,4,o[44]),M=l(M,L,A,O,x,11,o[45]),O=l(O,M,L,A,k,16,o[46]),A=l(A,O,M,L,p,23,o[47]),L=c(L,A,O,M,u,6,o[48]),M=c(M,L,A,O,y,10,o[49]),O=c(O,M,L,A,C,15,o[50]),A=c(A,O,M,L,m,21,o[51]),L=c(L,A,O,M,x,6,o[52]),M=c(M,L,A,O,d,10,o[53]),O=c(O,M,L,A,E,15,o[54]),A=c(A,O,M,L,h,21,o[55]),L=c(L,A,O,M,b,6,o[56]),M=c(M,L,A,O,k,10,o[57]),O=c(O,M,L,A,g,15,o[58]),A=c(A,O,M,L,N,21,o[59]),L=c(L,A,O,M,v,6,o[60]),M=c(M,L,A,O,S,10,o[61]),O=c(O,M,L,A,p,15,o[62]),A=c(A,O,M,L,w,21,o[63]),s[0]=s[0]+L|0,s[1]=s[1]+A|0,s[2]=s[2]+O|0,s[3]=s[3]+M|0},_doFinalize:function(){var t=this._data,n=t.words,r=this._nDataBytes*8,i=t.sigBytes*8;n[i>>>5]|=128<<24-i%32;var s=e.floor(r/4294967296),o=r;n[(i+64>>>9<<4)+15]=(s<<8|s>>>24)&16711935|(s<<24|s>>>8)&4278255360,n[(i+64>>>9<<4)+14]=(o<<8|o>>>24)&16711935|(o<<24|o>>>8)&4278255360,t.sigBytes=(n.length+1)*4,this._process();var u=this._hash,a=u.words;for(var f=0;f<4;f++){var l=a[f];a[f]=(l<<8|l>>>24)&16711935|(l<<24|l>>>8)&4278255360}return u},clone:function(){var e=i.clone.call(this);return e._hash=this._hash.clone(),e}});t.MD5=i._createHelper(u),t.HmacMD5=i._createHmacHelper(u)}(Math),define("crypto.md5",["crypto.core"],function(){}),function(){var e=CryptoJS,t=e.lib,n=t.Base,r=t.WordArray,i=e.algo,s=i.MD5,o=i.EvpKDF=n.extend({cfg:n.extend({keySize:4,hasher:s,iterations:1}),init:function(e){this.cfg=this.cfg.extend(e)},compute:function(e,t){var n=this.cfg,i=n.hasher.create(),s=r.create(),o=s.words,u=n.keySize,a=n.iterations;while(o.length<u){f&&i.update(f);var f=i.update(e).finalize(t);i.reset();for(var l=1;l<a;l++)f=i.finalize(f),i.reset();s.concat(f)}return s.sigBytes=u*4,s}});e.EvpKDF=function(e,t,n){return o.create(n).compute(e,t)}}(),define("crypto.evpkdf",["crypto.md5"],function(){}),CryptoJS.lib.Cipher||function(e){var t=CryptoJS,n=t.lib,r=n.Base,i=n.WordArray,s=n.BufferedBlockAlgorithm,o=t.enc,u=o.Utf8,a=o.Base64,f=t.algo,l=f.EvpKDF,c=n.Cipher=s.extend({cfg:r.extend(),createEncryptor:function(e,t){return this.create(this._ENC_XFORM_MODE,e,t)},createDecryptor:function(e,t){return this.create(this._DEC_XFORM_MODE,e,t)},init:function(e,t,n){this.cfg=this.cfg.extend(n),this._xformMode=e,this._key=t,this.reset()},reset:function(){s.reset.call(this),this._doReset()},process:function(e){return this._append(e),this._process()},finalize:function(e){e&&this._append(e);var t=this._doFinalize();return t},keySize:4,ivSize:4,_ENC_XFORM_MODE:1,_DEC_XFORM_MODE:2,_createHelper:function(){function e(e){return typeof e=="string"?N:S}return function(t){return{encrypt:function(n,r,i){return e(r).encrypt(t,n,r,i)},decrypt:function(n,r,i){return e(r).decrypt(t,n,r,i)}}}}()}),h=n.StreamCipher=c.extend({_doFinalize:function(){var e=this._process(!0);return e},blockSize:1}),p=t.mode={},d=n.BlockCipherMode=r.extend({createEncryptor:function(e,t){return this.Encryptor.create(e,t)},createDecryptor:function(e,t){return this.Decryptor.create(e,t)},init:function(e,t){this._cipher=e,this._iv=t}}),v=p.CBC=function(){function n(t,n,r){var i=this._iv;if(i){var s=i;this._iv=e}else var s=this._prevBlock;for(var o=0;o<r;o++)t[n+o]^=s[o]}var t=d.extend();return t.Encryptor=t.extend({processBlock:function(e,t){var r=this._cipher,i=r.blockSize;n.call(this,e,t,i),r.encryptBlock(e,t),this._prevBlock=e.slice(t,t+i)}}),t.Decryptor=t.extend({processBlock:function(e,t){var r=this._cipher,i=r.blockSize,s=e.slice(t,t+i);r.decryptBlock(e,t),n.call(this,e,t,i),this._prevBlock=s}}),t}(),m=t.pad={},g=m.Pkcs7={pad:function(e,t){var n=t*4,r=n-e.sigBytes%n,s=r<<24|r<<16|r<<8|r,o=[];for(var u=0;u<r;u+=4)o.push(s);var a=i.create(o,r);e.concat(a)},unpad:function(e){var t=e.words[e.sigBytes-1>>>2]&255;e.sigBytes-=t}},y=n.BlockCipher=c.extend({cfg:c.cfg.extend({mode:v,padding:g}),reset:function(){c.reset.call(this);var e=this.cfg,t=e.iv,n=e.mode;if(this._xformMode==this._ENC_XFORM_MODE)var r=n.createEncryptor;else{var r=n.createDecryptor;this._minBufferSize=1}this._mode=r.call(n,this,t&&t.words)},_doProcessBlock:function(e,t){this._mode.processBlock(e,t)},_doFinalize:function(){var e=this.cfg.padding;if(this._xformMode==this._ENC_XFORM_MODE){e.pad(this._data,this.blockSize);var t=this._process(!0)}else{var t=this._process(!0);e.unpad(t)}return t},blockSize:4}),b=n.CipherParams=r.extend({init:function(e){this.mixIn(e)},toString:function(e){return(e||this.formatter).stringify(this)}}),w=t.format={},E=w.OpenSSL={stringify:function(e){var t=e.ciphertext,n=e.salt;if(n)var r=i.create([1398893684,1701076831]).concat(n).concat(t);else var r=t;return r.toString(a)},parse:function(e){var t=a.parse(e),n=t.words;if(n[0]==1398893684&&n[1]==1701076831){var r=i.create(n.slice(2,4));n.splice(0,4),t.sigBytes-=16}return b.create({ciphertext:t,salt:r})}},S=n.SerializableCipher=r.extend({cfg:r.extend({format:E}),encrypt:function(e,t,n,r){r=this.cfg.extend(r);var i=e.createEncryptor(n,r),s=i.finalize(t),o=i.cfg;return b.create({ciphertext:s,key:n,iv:o.iv,algorithm:e,mode:o.mode,padding:o.padding,blockSize:e.blockSize,formatter:r.format})},decrypt:function(e,t,n,r){r=this.cfg.extend(r),t=this._parse(t,r.format);var i=e.createDecryptor(n,r).finalize(t.ciphertext);return i},_parse:function(e,t){return typeof e=="string"?t.parse(e,this):e}}),x=t.kdf={},T=x.OpenSSL={execute:function(e,t,n,r){r||(r=i.random(8));var s=l.create({keySize:t+n}).compute(e,r),o=i.create(s.words.slice(t),n*4);return s.sigBytes=t*4,b.create({key:s,iv:o,salt:r})}},N=n.PasswordBasedCipher=S.extend({cfg:S.cfg.extend({kdf:T}),encrypt:function(e,t,n,r){r=this.cfg.extend(r);var i=r.kdf.execute(n,e.keySize,e.ivSize);r.iv=i.iv;var s=S.encrypt.call(this,e,t,i.key,r);return s.mixIn(i),s},decrypt:function(e,t,n,r){r=this.cfg.extend(r),t=this._parse(t,r.format);var i=r.kdf.execute(n,e.keySize,e.ivSize,t.salt);r.iv=i.iv;var s=S.decrypt.call(this,e,t,i.key,r);return s}})}(),define("crypto.cipher-core",["crypto.enc-base64","crypto.evpkdf"],function(){}),function(){var e=CryptoJS,t=e.lib,n=t.BlockCipher,r=e.algo,i=[],s=[],o=[],u=[],a=[],f=[],l=[],c=[],h=[],p=[];(function(){var e=[];for(var t=0;t<256;t++)t<128?e[t]=t<<1:e[t]=t<<1^283;var n=0,r=0;for(var t=0;t<256;t++){var d=r^r<<1^r<<2^r<<3^r<<4;d=d>>>8^d&255^99,i[n]=d,s[d]=n;var v=e[n],m=e[v],g=e[m],y=e[d]*257^d*16843008;o[n]=y<<24|y>>>8,u[n]=y<<16|y>>>16,a[n]=y<<8|y>>>24,f[n]=y;var y=g*16843009^m*65537^v*257^n*16843008;l[d]=y<<24|y>>>8,c[d]=y<<16|y>>>16,h[d]=y<<8|y>>>24,p[d]=y,n?(n=v^e[e[e[g^v]]],r^=e[e[r]]):n=r=1}})();var d=[0,1,2,4,8,16,32,64,128,27,54],v=r.AES=n.extend({_doReset:function(){var e=this._key,t=e.words,n=e.sigBytes/4,r=this._nRounds=n+6,s=(r+1)*4,o=this._keySchedule=[];for(var u=0;u<s;u++)if(u<n)o[u]=t[u];else{var a=o[u-1];u%n?n>6&&u%n==4&&(a=i[a>>>24]<<24|i[a>>>16&255]<<16|i[a>>>8&255]<<8|i[a&255]):(a=a<<8|a>>>24,a=i[a>>>24]<<24|i[a>>>16&255]<<16|i[a>>>8&255]<<8|i[a&255],a^=d[u/n|0]<<24),o[u]=o[u-n]^a}var f=this._invKeySchedule=[];for(var v=0;v<s;v++){var u=s-v;if(v%4)var a=o[u];else var a=o[u-4];v<4||u<=4?f[v]=a:f[v]=l[i[a>>>24]]^c[i[a>>>16&255]]^h[i[a>>>8&255]]^p[i[a&255]]}},encryptBlock:function(e,t){this._doCryptBlock(e,t,this._keySchedule,o,u,a,f,i)},decryptBlock:function(e,t){var n=e[t+1];e[t+1]=e[t+3],e[t+3]=n,this._doCryptBlock(e,t,this._invKeySchedule,l,c,h,p,s);var n=e[t+1];e[t+1]=e[t+3],e[t+3]=n},_doCryptBlock:function(e,t,n,r,i,s,o,u){var a=this._nRounds,f=e[t]^n[0],l=e[t+1]^n[1],c=e[t+2]^n[2],h=e[t+3]^n[3],p=4;for(var d=1;d<a;d++){var v=r[f>>>24]^i[l>>>16&255]^s[c>>>8&255]^o[h&255]^n[p++],m=r[l>>>24]^i[c>>>16&255]^s[h>>>8&255]^o[f&255]^n[p++],g=r[c>>>24]^i[h>>>16&255]^s[f>>>8&255]^o[l&255]^n[p++],y=r[h>>>24]^i[f>>>16&255]^s[l>>>8&255]^o[c&255]^n[p++];f=v,l=m,c=g,h=y}var v=(u[f>>>24]<<24|u[l>>>16&255]<<16|u[c>>>8&255]<<8|u[h&255])^n[p++],m=(u[l>>>24]<<24|u[c>>>16&255]<<16|u[h>>>8&255]<<8|u[f&255])^n[p++],g=(u[c>>>24]<<24|u[h>>>16&255]<<16|u[f>>>8&255]<<8|u[l&255])^n[p++],y=(u[h>>>24]<<24|u[f>>>16&255]<<16|u[l>>>8&255]<<8|u[c&255])^n[p++];e[t]=v,e[t+1]=m,e[t+2]=g,e[t+3]=y},keySize:8});e.AES=n._createHelper(v)}(),define("crypto.aes",["crypto.cipher-core"],function(){}),function(){var e=CryptoJS,t=e.lib,n=t.WordArray,r=t.Hasher,i=e.algo,s=[],o=i.SHA1=r.extend({_doReset:function(){this._hash=new n.init([1732584193,4023233417,2562383102,271733878,3285377520])},_doProcessBlock:function(e,t){var n=this._hash.words,r=n[0],i=n[1],o=n[2],u=n[3],a=n[4];for(var f=0;f<80;f++){if(f<16)s[f]=e[t+f]|0;else{var l=s[f-3]^s[f-8]^s[f-14]^s[f-16];s[f]=l<<1|l>>>31}var c=(r<<5|r>>>27)+a+s[f];f<20?c+=(i&o|~i&u)+1518500249:f<40?c+=(i^o^u)+1859775393:f<60?c+=(i&o|i&u|o&u)-1894007588:c+=(i^o^u)-899497514,a=u,u=o,o=i<<30|i>>>2,i=r,r=c}n[0]=n[0]+r|0,n[1]=n[1]+i|0,n[2]=n[2]+o|0,n[3]=n[3]+u|0,n[4]=n[4]+a|0},_doFinalize:function(){var e=this._data,t=e.words,n=this._nDataBytes*8,r=e.sigBytes*8;return t[r>>>5]|=128<<24-r%32,t[(r+64>>>9<<4)+14]=Math.floor(n/4294967296),t[(r+64>>>9<<4)+15]=n,e.sigBytes=t.length*4,this._process(),this._hash},clone:function(){var e=r.clone.call(this);return e._hash=this._hash.clone(),e}});e.SHA1=r._createHelper(o),e.HmacSHA1=r._createHmacHelper(o)}(),define("crypto.sha1",["crypto.core"],function(){}),function(e){var t=CryptoJS,n=t.lib,r=n.WordArray,i=n.Hasher,s=t.algo,o=[],u=[];(function(){function t(t){var n=e.sqrt(t);for(var r=2;r<=n;r++)if(!(t%r))return!1;return!0}function n(e){return(e-(e|0))*4294967296|0}var r=2,i=0;while(i<64)t(r)&&(i<8&&(o[i]=n(e.pow(r,.5))),u[i]=n(e.pow(r,1/3)),i++),r++})();var a=[],f=s.SHA256=i.extend({_doReset:function(){this._hash=new r.init(o.slice(0))},_doProcessBlock:function(e,t){var n=this._hash.words,r=n[0],i=n[1],s=n[2],o=n[3],f=n[4],l=n[5],c=n[6],h=n[7];for(var p=0;p<64;p++){if(p<16)a[p]=e[t+p]|0;else{var d=a[p-15],v=(d<<25|d>>>7)^(d<<14|d>>>18)^d>>>3,m=a[p-2],g=(m<<15|m>>>17)^(m<<13|m>>>19)^m>>>10;a[p]=v+a[p-7]+g+a[p-16]}var y=f&l^~f&c,b=r&i^r&s^i&s,w=(r<<30|r>>>2)^(r<<19|r>>>13)^(r<<10|r>>>22),E=(f<<26|f>>>6)^(f<<21|f>>>11)^(f<<7|f>>>25),S=h+E+y+u[p]+a[p],x=w+b;h=c,c=l,l=f,f=o+S|0,o=s,s=i,i=r,r=S+x|0}n[0]=n[0]+r|0,n[1]=n[1]+i|0,n[2]=n[2]+s|0,n[3]=n[3]+o|0,n[4]=n[4]+f|0,n[5]=n[5]+l|0,n[6]=n[6]+c|0,n[7]=n[7]+h|0},_doFinalize:function(){var t=this._data,n=t.words,r=this._nDataBytes*8,i=t.sigBytes*8;return n[i>>>5]|=128<<24-i%32,n[(i+64>>>9<<4)+14]=e.floor(r/4294967296),n[(i+64>>>9<<4)+15]=r,t.sigBytes=n.length*4,this._process(),this._hash},clone:function(){var e=i.clone.call(this);return e._hash=this._hash.clone(),e}});t.SHA256=i._createHelper(f),t.HmacSHA256=i._createHmacHelper(f)}(Math),define("crypto.sha256",["crypto.core"],function(){}),function(){var e=CryptoJS,t=e.lib,n=t.Base,r=e.enc,i=r.Utf8,s=e.algo,o=s.HMAC=n.extend({init:function(e,t){e=this._hasher=new e.init,typeof t=="string"&&(t=i.parse(t));var n=e.blockSize,r=n*4;t.sigBytes>r&&(t=e.finalize(t)),t.clamp();var s=this._oKey=t.clone(),o=this._iKey=t.clone(),u=s.words,a=o.words;for(var f=0;f<n;f++)u[f]^=1549556828,a[f]^=909522486;s.sigBytes=o.sigBytes=r,this.reset()},reset:function(){var e=this._hasher;e.reset(),e.update(this._iKey)},update:function(e){return this._hasher.update(e),this},finalize:function(e){var t=this._hasher,n=t.finalize(e);t.reset();var r=t.finalize(this._oKey.clone().concat(n));return r}})}(),define("crypto.hmac",["crypto.core"],function(){}),CryptoJS.pad.NoPadding={pad:function(){},unpad:function(){}},define("crypto.pad-nopadding",["crypto.cipher-core"],function(){}),CryptoJS.mode.CTR=function(){var e=CryptoJS.lib.BlockCipherMode.extend(),t=e.Encryptor=e.extend({processBlock:function(e,t){var n=this._cipher,r=n.blockSize,i=this._iv,s=this._counter;i&&(s=this._counter=i.slice(0),this._iv=undefined);var o=s.slice(0);n.encryptBlock(o,0),s[r-1]=s[r-1]+1|0;for(var u=0;u<r;u++)e[t+u]^=o[u]}});return e.Decryptor=t,e}(),define("crypto.mode-ctr",["crypto.cipher-core"],function(){}),function(e,t){typeof define=="function"&&define.amd?define("crypto",["crypto.core","crypto.enc-base64","crypto.md5","crypto.evpkdf","crypto.cipher-core","crypto.aes","crypto.sha1","crypto.sha256","crypto.hmac","crypto.pad-nopadding","crypto.mode-ctr"],function(){return CryptoJS}):e.CryptoJS=t()}(this),function(e,t){typeof define=="function"&&define.amd?define("bigint",[],t.bind(e,e.crypto||e.msCrypto)):typeof module!="undefined"&&module.exports?module.exports=t(require("crypto")):e.BigInt=t(e.crypto||e.msCrypto)}(this,function(e){function G(e){var t,n,r,i;n=new Array(e);for(t=0;t<e;t++)n[t]=0;n[0]=2,r=0;for(;n[r]<e;){for(t=n[r]*n[r];t<e;t+=n[r])n[t]=1;r++,n[r]=n[r-1]+1;for(;n[r]<e&&n[n[r]];n[r]++);}i=new Array(r);for(t=0;t<r;t++)i[t]=n[t];return i}function Y(e,t){return y.length!=e.length&&(y=Pt(e),b=Pt(e),w=Pt(e)),Bt(w,t),Z(e,w)}function Z(e,n){var r,i,s,o;y.length!=e.length&&(y=Pt(e),b=Pt(e),w=Pt(e)),Ht(w,n),Ht(b,e),Ht(y,e),jt(b,-1),jt(y,-1);if(_t(b))return 0;for(s=0;b[s]==0;s++);for(r=1,i=2;b[s]%i==0;i*=2,r++);o=s*t+r-1,o&&Ft(b,o),en(w,b,e);if(!Ot(w,1)&&!Mt(w,y)){i=1;while(i<=o-1&&!Mt(w,y)){Yt(w,e);if(Ot(w,1))return 0;i++}if(!Mt(w,y))return 0}return 1}function et(e){var n,r,i;for(n=e.length-1;e[n]==0&&n>0;n--);for(r=0,i=e[n];i;i>>=1,r++);return r+=t*n,r}function tt(e,n){var r=Lt(0,(e.length>n?e.length:n)*t,0);return Ht(r,e),r}function nt(e){var t=Lt(0,e,0);return pt(t,e),Zt(t,1)}function rt(e){return e>=600?it(e,2):e>=550?it(e,4):e>=500?it(e,5):e>=400?it(e,6):e>=350?it(e,7):e>=300?it(e,9):e>=250?it(e,12):e>=200?it(e,15):e>=150?it(e,18):e>=100?it(e,27):it(e,40)}function it(e,t){var n,r,i,s;s=3e4,n=Lt(0,e,0),P.length==0&&(P=G(3e4)),Q.length!=n.length&&(Q=Pt(n));for(;;){vt(n,e,0),n[0]|=1,i=0;for(r=0;r<P.length&&P[r]<=s;r++)if(kt(n,P[r])==0&&!Ot(n,P[r])){i=1;break}for(r=0;r<t&&!i;r++){vt(Q,e,0);while(!Tt(n,Q))vt(Q,e,0);Z(n,Q)||(i=1)}if(!i)return n}}function st(e,t){var n=Pt(e);return Qt(n,t),Zt(n,1)}function ot(e,t){var n=tt(e,e.length+1);return jt(n,t),Zt(n,1)}function ut(e,t){var n=tt(e,e.length+t.length);return Kt(n,t),Zt(n,1)}function at(e,t,n){var r=tt(e,n.length);return en(r,Zt(t,2),Zt(n,2),0),Zt(r,1)}function ft(e,t){var n=tt(e,e.length>t.length?e.length+1:t.length+1);return $t(n,t),Zt(n,1)}function lt(e,t){var n=tt(e,e.length>t.length?e.length+1:t.length+1);return Jt(n,t),Zt(n,1)}function ct(e,t){var n=tt(e,t.length),r;return r=yt(n,t),r?Zt(n,1):null}function ht(e,t,n){var r=tt(e,n.length);return Gt(r,t,n),Zt(r,1)}function pt(e,n){var r,i,s,o,u,a,f,l,c,h,p,d,v;P.length==0&&(P=G(3e4));if(H.length==0){H=new Array(512);for(a=0;a<512;a++)H[a]=Math.pow(2,a/511-1)}r=.1,s=20,v=20,j.length!=e.length&&(j=Pt(e),F=Pt(e),R=Pt(e),z=Pt(e),V=Pt(e),$=Pt(e),J=Pt(e),X=Pt(e),W=Pt(e),B=Pt(e),I=Pt(e),q=Pt(e),U=Pt(e),K=Pt(e));if(n<=v){o=(1<<(n+2>>1))-1,Bt(e,0);for(u=1;u;){u=0,e[0]=1|1<<n-1|hn(n);for(a=1;a<P.length&&(P[a]&o)==P[a];a++)if(0==e[0]%P[a]){u=1;break}}Ct(e);return}l=r*n*n;if(n>2*s)for(f=1;n-n*f<=s;)f=H[hn(9)];else f=.5;d=Math.floor(f*n)+1,pt(q,d),Bt(j,0),j[Math.floor((n-2)/t)]|=1<<(n-2)%t,Nt(j,q,B,I),h=et(B);for(;;){for(;;){vt(F,h,0);if(Tt(B,F))break}jt(F,1),Jt(F,B),Ht(W,q),Kt(W,F),Rt(W,2),jt(W,1),Ht(z,F),Rt(z,2);for(c=0,a=0;a<P.length&&P[a]<l;a++)if(kt(W,P[a])==0&&!Ot(W,P[a])){c=1;break}c||Y(W,2)||(c=1);if(!c){jt(W,-3);for(a=W.length-1;W[a]==0&&a>0;a--);for(p=0,i=W[a];i;i>>=1,p++);p+=t*a;for(;;){vt(U,p,0);if(Tt(W,U))break}jt(W,3),jt(U,2),Ht(X,U),Ht(R,W),jt(R,-1),en(X,R,W),jt(X,-1);if(_t(X)){Ht(X,U),en(X,z,W),jt(X,-1),Ht(K,W),Ht(V,X),gt(V,W);if(Ot(V,1)){Ht(e,K);return}}}}}function dt(e,n){var r,i;return r=Math.floor((e-1)/t)+2,i=Lt(0,0,r),vt(i,e,n),i}function vt(e,n,r){var i,s;for(i=0;i<e.length;i++)e[i]=0;s=Math.floor((n-1)/t)+1;for(i=0;i<s;i++)e[i]=hn(t);e[s-1]&=(2<<(n-1)%t)-1,r==1&&(e[s-1]|=1<<(n-1)%t)}function mt(e,t){var n,r;return n=Pt(e),r=Pt(t),gt(n,r),n}function gt(e,t){var n,r,i,s,u,a,f,l,c,h;m.length!=e.length&&(m=Pt(e)),c=1;while(c){c=0;for(n=1;n<t.length;n++)if(t[n]){c=1;break}if(!c)break;for(n=e.length;!e[n]&&n>=0;n--);r=e[n],i=t[n],s=1,u=0,a=0,f=1;while(i+a&&i+f){l=Math.floor((r+s)/(i+a)),h=Math.floor((r+u)/(i+f));if(l!=h)break;o=s-l*a,s=a,a=o,o=u-l*f,u=f,f=o,o=r-l*i,r=i,i=o}u?(Ht(m,e),zt(e,t,s,u),zt(t,m,f,a)):(Qt(e,t),Ht(m,e),Ht(e,t),Ht(t,m))}if(t[0]==0)return;o=kt(e,t[0]),Bt(e,t[0]),t[0]=o;while(t[0])e[0]%=t[0],o=e[0],e[0]=t[0],t[0]=o}function yt(e,t){var n=1+2*Math.max(e.length,t.length);if(!(e[0]&1)&&!(t[0]&1))return Bt(e,0),0;S.length!=n&&(S=new Array(n),E=new Array(n),x=new Array(n),T=new Array(n),N=new Array(n),C=new Array(n)),Ht(S,e),Ht(E,t),Bt(x,1),Bt(T,0),Bt(N,0),Bt(C,1);for(;;){while(!(S[0]&1))It(S),!(x[0]&1)&&!(T[0]&1)?(It(x),It(T)):(Jt(x,t),It(x),$t(T,e),It(T));while(!(E[0]&1))It(E),!(N[0]&1)&&!(C[0]&1)?(It(N),It(C)):(Jt(N,t),It(N),$t(C,e),It(C));Tt(E,S)?($t(E,S),$t(N,x),$t(C,T)):($t(S,E),$t(x,N),$t(T,C));if(Ot(S,0)){while(St(N))Jt(N,t);return Ht(e,N),Ot(E,1)?1:(Bt(e,0),0)}}}function bt(e,t){var n=1,r=0,i;for(;;){if(e==1)return n;if(e==0)return 0;r-=n*Math.floor(t/e),t%=e;if(t==1)return r;if(t==0)return 0;n-=r*Math.floor(e/t),e%=t}}function wt(e,t){return bt(e,t)}function Et(e,t,n,r,i){var s=0,o=Math.max(e.length,t.length);S.length!=o&&(S=new Array(o),x=new Array(o),T=new Array(o),N=new Array(o),C=new Array(o));while(!(e[0]&1)&&!(t[0]&1))It(e),It(t),s++;Ht(S,e),Ht(n,t),Bt(x,1),Bt(T,0),Bt(N,0),Bt(C,1);for(;;){while(!(S[0]&1))It(S),!(x[0]&1)&&!(T[0]&1)?(It(x),It(T)):(Jt(x,t),It(x),$t(T,e),It(T));while(!(n[0]&1))It(n),!(N[0]&1)&&!(C[0]&1)?(It(N),It(C)):(Jt(N,t),It(N),$t(C,e),It(C));Tt(n,S)?($t(n,S),$t(N,x),$t(C,T)):($t(S,n),$t(x,N),$t(T,C));if(Ot(S,0)){while(St(N))Jt(N,t),$t(C,e);Rt(C,-1),Ht(r,N),Ht(i,C),qt(n,s);return}}}function St(e){return e[e.length-1]>>t-1&1}function xt(e,t,n){var r,i=e.length,s=t.length,o=i+n<s?i+n:s;for(r=s-1-n;r<i&&r>=0;r++)if(e[r]>0)return 1;for(r=i-1+n;r<s;r++)if(t[r]>0)return 0;for(r=o-1;r>=n;r--){if(e[r-n]>t[r])return 1;if(e[r-n]<t[r])return 0}return 0}function Tt(e,t){var n,r=e.length<t.length?e.length:t.length;for(n=e.length;n<t.length;n++)if(t[n])return 0;for(n=t.length;n<e.length;n++)if(e[n])return 1;for(n=r-1;n>=0;n--){if(e[n]>t[n])return 1;if(e[n]<t[n])return 0}return 0}function Nt(e,i,s,o){var u,a,f,l,c,h,p,d,v;Ht(o,e);for(a=i.length;i[a-1]==0;a--);v=i[a-1];for(d=0;v;d++)v>>=1;d=t-d,qt(i,d),qt(o,d);for(u=o.length;o[u-1]==0&&u>a;u--);Bt(s,0);while(!xt(i,o,u-a))Vt(o,i,u-a),s[u-a]++;for(f=u-1;f>=a;f--){o[f]==i[a-1]?s[f-a]=r:s[f-a]=Math.floor((o[f]*n+o[f-1])/i[a-1]);for(;;){h=(a>1?i[a-2]:0)*s[f-a],p=h,h&=r,p=(p-h)/n,c=p+s[f-a]*i[a-1],p=c,c&=r,p=(p-c)/n;if(!(p==o[f]?c==o[f-1]?h>(f>1?o[f-2]:0):c>o[f-1]:p>o[f]))break;s[f-a]--}Wt(o,i,-s[f-a],f-a),St(o)&&(Xt(o,i,f-a),s[f-a]--)}Ft(i,d),Ft(o,d)}function Ct(e){var t,i,s,o;i=e.length,s=0;for(t=0;t<i;t++)s+=e[t],o=0,s<0&&(o=s&r,o=-((s-o)/n),s+=o*n),e[t]=s&r,s=(s-e[t])/n-o}function kt(e,t){var r,i=0;for(r=e.length-1;r>=0;r--)i=(i*n+e[r])%t;return i}function Lt(e,n,r){var i,s,o;return s=Math.ceil(n/t)+1,s=r>s?r:s,o=new Array(s),Bt(o,e),o}function At(e,t,n){var r,s,o,u,a,f,l=e.length;if(t==-1){u=new Array(0);for(;;){a=new Array(u.length+1);for(s=0;s<u.length;s++)a[s+1]=u[s];a[0]=parseInt(e,10),u=a,r=e.indexOf(",",0);if(r<1)break;e=e.substring(r+1);if(e.length==0)break}return u.length<n?(a=new Array(n),Ht(a,u),a):u}var c=t,h=0,p=t==1?l:0;while(c>1)c&1&&(h=1),p+=l,c>>=1;p+=h*l,u=Lt(0,p,0);for(s=0;s<l;s++){r=i.indexOf(e.substring(s,s+1),0),t<=36&&r>=36&&(r-=26);if(r>=t||r<0)break;Rt(u,t),jt(u,r)}for(l=u.length;l>0&&!u[l-1];l--);l=n>l+1?n:l+1,a=new Array(l),f=l<u.length?l:u.length;for(s=0;s<f;s++)a[s]=u[s];for(;s<l;s++)a[s]=0;return a}function Ot(e,t){var n;if(e[0]!=t)return 0;for(n=1;n<e.length;n++)if(e[n])return 0;return 1}function Mt(e,t){var n,r=e.length<t.length?e.length:t.length;for(n=0;n<r;n++)if(e[n]!=t[n])return 0;if(e.length>t.length){for(;n<e.length;n++)if(e[n])return 0}else for(;n<t.length;n++)if(t[n])return 0;return 1}function _t(e){var t;for(t=0;t<e.length;t++)if(e[t])return 0;return 1}function Dt(e,t){var n,r,s="";d.length!=e.length?d=Pt(e):Ht(d,e);if(t==-1){for(n=e.length-1;n>0;n--)s+=e[n]+",";s+=e[0]}else while(!_t(d))r=Ut(d,t),s=i.substring(r,r+1)+s;return s.length==0&&(s="0"),s}function Pt(e){var t,n;return n=new Array(e.length),Ht(n,e),n}function Ht(e,t){var n,r=e.length<t.length?e.length:t.length;for(n=0;n<r;n++)e[n]=t[n];for(n=r;n<e.length;n++)e[n]=0}function Bt(e,n){var i,s;for(s=n,i=0;i<e.length;i++)e[i]=s&r,s>>=t}function jt(e,t){var i,s,o,u;e[0]+=t,s=e.length,o=0;for(i=0;i<s;i++){o+=e[i],u=0,o<0&&(u=o&r,u=-((o-u)/n),o+=u*n),e[i]=o&r,o=(o-e[i])/n-u;if(!o)return}}function Ft(e,n){var i,s=Math.floor(n/t);if(s){for(i=0;i<e.length-s;i++)e[i]=e[i+s];for(;i<e.length;i++)e[i]=0;n%=t}for(i=0;i<e.length-1;i++)e[i]=r&(e[i+1]<<t-n|e[i]>>n);e[i]>>=n}function It(e){var i;for(i=0;i<e.length-1;i++)e[i]=r&(e[i+1]<<t-1|e[i]>>1);e[i]=e[i]>>1|e[i]&n>>1}function qt(e,n){var i,s=Math.floor(n/t);if(s){for(i=e.length;i>=s;i--)e[i]=e[i-s];for(;i>=0;i--)e[i]=0;n%=t}if(!n)return;for(i=e.length-1;i>0;i--)e[i]=r&(e[i]<<n|e[i-1]>>t-n);e[i]=r&e[i]<<n}function Rt(e,t){var i,s,o,u;if(!t)return;s=e.length,o=0;for(i=0;i<s;i++)o+=e[i]*t,u=0,o<0&&(u=o&r,u=-((o-u)/n),o+=u*n),e[i]=o&r,o=(o-e[i])/n-u}function Ut(e,t){var r,i=0,s;for(r=e.length-1;r>=0;r--)s=i*n+e[r],e[r]=Math.floor(s/t),i=s%t;return i}function zt(e,t,i,s){var o,u,a,f;a=e.length<t.length?e.length:t.length,f=e.length;for(u=0,o=0;o<a;o++)u+=i*e[o]+s*t[o],e[o]=u&r,u=(u-e[o])/n;for(o=a;o<f;o++)u+=i*e[o],e[o]=u&r,u=(u-e[o])/n}function Wt(e,t,i,s){var o,u,a,f;a=e.length<s+t.length?e.length:s+t.length,f=e.length;for(u=0,o=s;o<a;o++)u+=e[o]+i*t[o-s],e[o]=u&r,u=(u-e[o])/n;for(o=a;u&&o<f;o++)u+=e[o],e[o]=u&r,u=(u-e[o])/n}function Xt(e,t,i){var s,o,u,a;u=e.length<i+t.length?e.length:i+t.length,a=e.length;for(o=0,s=i;s<u;s++)o+=e[s]+t[s-i],e[s]=o&r,o=(o-e[s])/n;for(s=u;o&&s<a;s++)o+=e[s],e[s]=o&r,o=(o-e[s])/n}function Vt(e,t,i){var s,o,u,a;u=e.length<i+t.length?e.length:i+t.length,a=e.length;for(o=0,s=i;s<u;s++)o+=e[s]-t[s-i],e[s]=o&r,o=(o-e[s])/n;for(s=u;o&&s<a;s++)o+=e[s],e[s]=o&r,o=(o-e[s])/n}function $t(e,t){var i,s,o,u;o=e.length<t.length?e.length:t.length;for(s=0,i=0;i<o;i++)s+=e[i]-t[i],e[i]=s&r,s=(s-e[i])/n;for(i=o;s&&i<e.length;i++)s+=e[i],e[i]=s&r,s=(s-e[i])/n}function Jt(e,t){var i,s,o,u;o=e.length<t.length?e.length:t.length;for(s=0,i=0;i<o;i++)s+=e[i]+t[i],e[i]=s&r,s=(s-e[i])/n;for(i=o;s&&i<e.length;i++)s+=e[i],e[i]=s&r,s=(s-e[i])/n}function Kt(e,t){var n;u.length!=2*e.length&&(u=new Array(2*e.length)),Bt(u,0);for(n=0;n<t.length;n++)t[n]&&Wt(u,e,t[n],n);Ht(e,u)}function Qt(e,t){h.length!=e.length?h=Pt(e):Ht(h,e),p.length!=e.length&&(p=Pt(e)),Nt(h,t,p,e)}function Gt(e,t,n){var r;a.length!=2*e.length&&(a=new Array(2*e.length)),Bt(a,0);for(r=0;r<t.length;r++)t[r]&&Wt(a,e,t[r],r);Qt(a,n),Ht(e,a)}function Yt(e,t){var i,s,o,u,f,l,c;for(f=e.length;f>0&&!e[f-1];f--);c=f>t.length?2*f:2*t.length,a.length!=c&&(a=new Array(c)),Bt(a,0);for(i=0;i<f;i++){u=a[2*i]+e[i]*e[i],a[2*i]=u&r,u=(u-a[2*i])/n;for(s=i+1;s<f;s++)u=a[i+s]+2*e[i]*e[s]+u,a[i+s]=u&r,u=(u-a[i+s])/n;a[i+f]=u}Qt(a,t),Ht(e,a)}function Zt(e,t){var n,r;for(n=e.length;n>0&&!e[n-1];n--);return r=new Array(n+t),Ht(r,e),r}function en(e,r,i){var o,u,a,f;v.length!=i.length&&(v=Pt(i));if((i[0]&1)==0){Ht(v,e),Bt(e,1);while(!Ot(r,0))r[0]&1&&Gt(e,v,i),Ut(r,2),Yt(v,i);return}Bt(v,0);for(a=i.length;a>0&&!i[a-1];a--);f=n-bt(kt(i,n),n),v[a]=1,Gt(e,v,i),c.length!=e.length?c=Pt(e):Ht(c,e);for(o=r.length-1;o>0&!r[o];o--);if(r[o]==0){Bt(e,1);return}for(u=1<<t-1;u&&!(r[o]&u);u>>=1);for(;;){if(!(u>>=1)){o--;if(o<0){tn(e,s,i,f);return}u=1<<t-1}tn(e,e,i,f),u&r[o]&&tn(e,c,i,f)}}function tn(e,t,i,s){var o,u,a,f,l,c,h,p=i.length,d=t.length;g.length!=p&&(g=new Array(p)),Bt(g,0);for(;p>0&&i[p-1]==0;p--);for(;d>0&&t[d-1]==0;d--);h=g.length-1;for(o=0;o<p;o++){l=g[0]+e[o]*t[0],f=(l&r)*s&r,a=l+f*i[0],a=(a-(a&r))/n,l=e[o],u=1;for(;u<d-4;)a+=g[u]+f*i[u]+l*t[u],c=g[u-1]=a&r,a=(a-c)/n,u++,a+=g[u]+f*i[u]+l*t[u],c=g[u-1]=a&r,a=(a-c)/n,u++,a+=g[u]+f*i[u]+l*t[u],c=g[u-1]=a&r,a=(a-c)/n,u++,a+=g[u]+f*i[u]+l*t[u],c=g[u-1]=a&r,a=(a-c)/n,u++,a+=g[u]+f*i[u]+l*t[u],c=g[u-1]=a&r,a=(a-c)/n,u++;for(;u<d;)a+=g[u]+f*i[u]+l*t[u],c=g[u-1]=a&r,a=(a-c)/n,u++;for(;u<p-4;)a+=g[u]+f*i[u],c=g[u-1]=a&r,a=(a-c)/n,u++,a+=g[u]+f*i[u],c=g[u-1]=a&r,a=(a-c)/n,u++,a+=g[u]+f*i[u],c=g[u-1]=a&r,a=(a-c)/n,u++,a+=g[u]+f*i[u],c=g[u-1]=a&r,a=(a-c)/n,u++,a+=g[u]+f*i[u],c=g[u-1]=a&r,a=(a-c)/n,u++;for(;u<p;)a+=g[u]+f*i[u],c=g[u-1]=a&r,a=(a-c)/n,u++;for(;u<h;)a+=g[u],c=g[u-1]=a&r,a=(a-c)/n,u++;g[u-1]=a&r}Tt(i,g)||$t(g,i),Ht(e,g)}function nn(e,t,n){return ht(e,ct(t,n),n)}function rn(e,t,n){return e=st(e,n),t=st(t,n),Tt(t,e)&&(e=lt(e,n)),ft(e,t)}function sn(e){var n=Math.floor(e/t)+2,r=new Array(n);for(var i=0;i<n;i++)r[i]=0;return r[n-2]=1<<e%t,r}function un(e,t){t||(t=0),e=Pt(e);var n="";while(!_t(e))n=on[e[0]&255]+n,Ft(e,8);while(n.length<t)n="\0"+n;return n}function an(e){var t=At("0",10,e.length);return e.forEach(function(e,n){n&&qt(t,8),t[0]|=e}),t}function ln(){return fn(40)}function cn(){return fn(1)[0]}function hn(e){if(e>31)throw new Error("Too many bits.");var t=0,n=0,r=Math.floor(e/8),i=(1<<e%8)-1;i&&(n=cn()&i);for(;t<r;t++)n=256*n+cn();return n}var t=26,n=1<<t,r=n-1,i="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz_=!@#$%^&*()[]{}|;:,.<>/?`~ \\'\"+-",s=Lt(1,1,1),o=new Array(0),u=o,a=o,f=o,l=o,c=o,h=o,p=o,d=o,v=o,m=o,g=o,y=o,b=o,w=o,E=o,S=o,x=o,T=o,N=o,C=o,k=o,L=o,A=o,O=o,M=o,_=o,D=o,P=o,H=o,B=o,j=o,F=o,I=o,q=o,R=o,U=o,z=o,W=o,X=o,V=o,$=o,J=o,K=o,Q=o,on=function(){var e=0,t={};for(;e<256;++e)t[e]=String.fromCharCode(e);return t}(),fn=function(){if(typeof e!="undefined"&&typeof e.randomBytes=="function")return function(t){try{var n=e.randomBytes(t)}catch(r){throw r}return Array.prototype.slice.call(n,0)};if(typeof e!="undefined"&&typeof e.getRandomValues=="function")return function(t){var n=new Uint8Array(t);return e.getRandomValues(n),Array.prototype.slice.call(n,0)};console.log("Keys should not be generated without CSPRNG.");return}();return{str2bigInt:At,bigInt2str:Dt,int2bigInt:Lt,multMod:ht,powMod:at,inverseMod:ct,randBigInt:dt,randBigInt_:vt,equals:Mt,equalsInt:Ot,sub:ft,mod:st,modInt:kt,mult:ut,divInt_:Ut,rightShift_:Ft,dup:Pt,greater:Tt,add:lt,isZero:_t,bitSize:et,millerRabin:Z,divide_:Nt,trim:Zt,primes:P,findPrimes:G,getSeed:ln,divMod:nn,subMod:rn,twoToThe:sn,bigInt2bits:un,ba2bigInt:an}}),function(){function e(){}function n(e,t){var n=e.length;while(n--)if(e[n].listener===t)return n;return-1}function r(e){return function(){return this[e].apply(this,arguments)}}var t=e.prototype;t.getListeners=function(t){var n=this._getEvents(),r,i;if(typeof t=="object"){r={};for(i in n)n.hasOwnProperty(i)&&t.test(i)&&(r[i]=n[i])}else r=n[t]||(n[t]=[]);return r},t.flattenListeners=function(t){var n=[],r;for(r=0;r<t.length;r+=1)n.push(t[r].listener);return n},t.getListenersAsObject=function(t){var n=this.getListeners(t),r;return n instanceof Array&&(r={},r[t]=n),r||n},t.addListener=function(t,r){var i=this.getListenersAsObject(t),s=typeof r=="object",o;for(o in i)i.hasOwnProperty(o)&&n(i[o],r)===-1&&i[o].push(s?r:{listener:r,once:!1});return this},t.on=r("addListener"),t.addOnceListener=function(t,n){return this.addListener(t,{listener:n,once:!0})},t.once=r("addOnceListener"),t.defineEvent=function(t){return this.getListeners(t),this},t.defineEvents=function(t){for(var n=0;n<t.length;n+=1)this.defineEvent(t[n]);return this},t.removeListener=function(t,r){var i=this.getListenersAsObject(t),s,o;for(o in i)i.hasOwnProperty(o)&&(s=n(i[o],r),s!==-1&&i[o].splice(s,1));return this},t.off=r("removeListener"),t.addListeners=function(t,n){return this.manipulateListeners(!1,t,n)},t.removeListeners=function(t,n){return this.manipulateListeners(!0,t,n)},t.manipulateListeners=function(t,n,r){var i,s,o=t?this.removeListener:this.addListener,u=t?this.removeListeners:this.addListeners;if(typeof n!="object"||n instanceof RegExp){i=r.length;while(i--)o.call(this,n,r[i])}else for(i in n)n.hasOwnProperty(i)&&(s=n[i])&&(typeof s=="function"?o.call(this,i,s):u.call(this,i,s));return this},t.removeEvent=function(t){var n=typeof t,r=this._getEvents(),i;if(n==="string")delete r[t];else if(n==="object")for(i in r)r.hasOwnProperty(i)&&t.test(i)&&delete r[i];else delete this._events;return this},t.emitEvent=function(t,n){var r=this.getListenersAsObject(t),i,s,o,u;for(o in r)if(r.hasOwnProperty(o)){s=r[o].length;while(s--)i=r[o][s],i.once===!0&&this.removeListener(t,i.listener),u=i.listener.apply(this,n||[]),u===this._getOnceReturnValue()&&this.removeListener(t,i.listener)}return this},t.trigger=r("emitEvent"),t.emit=function(t){var n=Array.prototype.slice.call(arguments,1);return this.emitEvent(t,n)},t.setOnceReturnValue=function(t){return this._onceReturnValue=t,this},t._getOnceReturnValue=function(){return this.hasOwnProperty("_onceReturnValue")?this._onceReturnValue:!0},t._getEvents=function(){return this._events||(this._events={})},typeof define=="function"&&define.amd?define("eventemitter",[],function(){return e}):typeof module=="object"&&module.exports?module.exports=e:this.EventEmitter=e}.call(this),function(e,t){typeof define=="function"&&define.amd?define("otr",["jquery","jquery.browser","bigint","crypto","eventemitter"],function(e,n,r,i,s){if(e.browser.msie)return undefined;var o={BigInt:r,CryptoJS:i,EventEmitter:s,OTR:{},DSA:{}};return t.call(o)}):(e.OTR={},e.DSA={},t.call(e))}(this,function(){return function(){var e=this,t={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:"\0",OTR_VERSION_2:"\0",OTR_VERSION_3:"\0",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};typeof module!="undefined"&&module.exports?module.exports=t:e.OTR.CONST=t}.call(this),function(){var e=this,t={},n,r;typeof module!="undefined"&&module.exports?(module.exports=t={},n=require("../vendor/crypto.js"),r=require("../vendor/bigint.js")):(e.OTR&&(e.OTR.HLP=t),e.DSA&&(e.DSA.HLP=t),n=e.CryptoJS,r=e.BigInt);var i={BYTE:1,SHORT:2,INT:4,CTR:8,MAC:20,SIG:40},s="?OTR",o=".",u=r.str2bigInt("2",10);t.debug=function(e){this.debug&&typeof this.debug!="function"&&typeof console!="undefined"&&console.log(e)},t.extend=function(e,t){function r(){this.constructor=e}for(var n in t)Object.hasOwnProperty.call(t,n)&&(e[n]=t[n]);r.prototype=t.prototype,e.prototype=new r,e.__super__=t.prototype},t.compare=function(e,t){if(e.length!==t.length)return!1;var n=0,r=0;for(;n<e.length;n++)r|=e[n].charCodeAt(0)^t[n].charCodeAt(0);return r===0},t.randomExponent=function(){return r.randBigInt(1536)},t.smpHash=function(e,r,s){var o=n.algo.SHA256.create();o.update(n.enc.Latin1.parse(t.packBytes(e,i.BYTE))),o.update(n.enc.Latin1.parse(t.packMPI(r))),s&&o.update(n.enc.Latin1.parse(t.packMPI(s)));var u=o.finalize();return t.bits2bigInt(u.toString(n.enc.Latin1))},t.makeMac=function(e,r){var i=n.enc.Latin1.parse(r),s=n.HmacSHA256(n.enc.Latin1.parse(e),i);return t.mask(s.toString(n.enc.Latin1),0,160)},t.make1Mac=function(e,t){var r=n.enc.Latin1.parse(t),i=n.HmacSHA1(n.enc.Latin1.parse(e),r);return i.toString(n.enc.Latin1)},t.encryptAes=function(e,t,r){var i={mode:n.mode.CTR,iv:n.enc.Latin1.parse(r),padding:n.pad.NoPadding},s=n.AES.encrypt(e,n.enc.Latin1.parse(t),i),o=n.enc.Base64.parse(s.toString());return n.enc.Latin1.stringify(o)},t.decryptAes=function(e,t,r){e=n.enc.Latin1.parse(e);var i={mode:n.mode.CTR,iv:n.enc.Latin1.parse(r),padding:n.pad.NoPadding};return n.AES.decrypt(n.enc.Base64.stringify(e),n.enc.Latin1.parse(t),i)},t.multPowMod=function(e,t,n,i,s){return r.multMod(r.powMod(e,t,s),r.powMod(n,i,s),s)},t.ZKP=function(e,n,i,s){return r.equals(n,t.smpHash(e,i,s))},t.GTOE=function(e,t){return r.equals(e,t)||r.greater(e,t)},t.between=function(e,t,n){return r.greater(e,t)&&r.greater(n,e)},t.checkGroup=function(e,n){return t.GTOE(e,u)&&t.GTOE(n,e)},t.h1=function(e,t){var r=n.algo.SHA1.create();return r.update(n.enc.Latin1.parse(e)),r.update(n.enc.Latin1.parse(t)),r.finalize().toString(n.enc.Latin1)},t.h2=function(e,t){var r=n.algo.SHA256.create();return r.update(n.enc.Latin1.parse(e)),r.update(n.enc.Latin1.parse(t)),r.finalize().toString(n.enc.Latin1)},t.mask=function(e,t,n){return e.substr(t/8,n/8)};var a=String.fromCharCode;t.packBytes=function(e,t){e=e.toString(16);var n,r="";for(;t>0;t--)n=e.length?e.substr(-2,2):"0",e=e.substr(0,e.length-2),r=a(parseInt(n,16))+r;return r},t.packINT=function(e){return t.packBytes(e,i.INT)},t.packCtr=function(e){return t.padCtr(t.packBytes(e,i.CTR))},t.padCtr=function(e){return e+"\0\0\0\0\0\0\0\0"},t.unpackCtr=function(e){return e=t.toByteArray(e.substring(0,8)),t.unpack(e)},t.unpack=function(e){var t=0,n=0,r=e.length;for(;n<r;n++)t=t*256+e[n];return t},t.packData=function(e){return t.packINT(e.length)+e},t.bits2bigInt=function(e){return e=t.toByteArray(e),r.ba2bigInt(e)},t.packMPI=function(e){return t.packData(r.bigInt2bits(r.trim(e,0)))},t.packSHORT=function(e){return t.packBytes(e,i.SHORT)},t.unpackSHORT=function(e){return e=t.toByteArray(e),t.unpack(e)},t.packTLV=function(e,n){return t.packSHORT(e)+t.packSHORT(n.length)+n},t.readLen=function(e){return e=t.toByteArray(e.substring(0,4)),t.unpack(e)},t.readData=function(e){var n=t.unpack(e.splice(0,4));return[n,e]},t.readMPI=function(e){return e=t.toByteArray(e),e=t.readData(e),r.ba2bigInt(e[1])},t.packMPIs=function(e){return e.reduce(function(e,n){return e+t.packMPI(n)},"")},t.unpackMPIs=function(e,n){var r=0,i=[];for(;r<e;r++)i.push("MPI");return t.splitype(i,n).map(function(e){return t.readMPI(e)})},t.wrapMsg=function(e,r,i,u,a){e=n.enc.Base64.stringify(n.enc.Latin1.parse(e)),e=s+":"+e+o;var f;i&&(f="|",f+=t.readLen(u).toString(16),f+="|",f+=t.readLen(a).toString(16));if(!r)return[null,e];var l=Math.ceil(e.length/r);if(l>65535)return["Too many fragments"];if(l==1)return[null,e];var c,h,p,d,v,m=[];for(c=1;c<=l;c++)h=(c-1)*r,p=c*r,d=e.slice(h,p),v=s,i&&(v+=f),v+=","+c+",",v+=l+",",v+=d+",",m.push(v);return[null,m]},t.splitype=function l(e,n){var r=[];return e.forEach(function(e){var s;switch(e){case"PUBKEY":s=l(["SHORT","MPI","MPI","MPI","MPI"],n).join("");break;case"DATA":case"MPI":s=n.substring(0,t.readLen(n)+4);break;default:s=n.substring(0,i[e])}r.push(s),n=n.substring(s.length)}),r};var f=function(){var e=0,t={};for(;e<256;++e)t[String.fromCharCode(e)]=e;for(e=128;e<256;++e)t[String.fromCharCode(63232+e)]=e;return t}();t.toByteArray=function(e){var t=[],n=e.split(""),r=-1,i=n.length,s=i%8;while(s--)++r,t[r]=f[n[r]];s=i>>3;while(s--)t.push(f[n[++r]],f[n[++r]],f[n[++r]],f[n[++r]],f[n[++r]],f[n[++r]],f[n[++r]],f[n[++r]]);return t}}.call(this),function(){function c(){var e=(new Date).getTime();return function(t){if(!l||typeof console=="undefined")return;var n=(new Date).getTime();console.log(t+": "+(n-e)),e=n}}function h(e,t){var r=n.randBigInt(n.bitSize(t));return s.between(r,e,t)?r:h(e,t)}function d(e,t){var r,i=3e4,s=n.bitSize(e),o=n.primes;o.length===0&&(o=n.findPrimes(i)),p.length!=e.length&&(p=n.dup(e));for(r=0;r<o.length&&o[r]<=i;r++)if(n.modInt(e,o[r])===0&&!n.equalsInt(e,o[r]))return 0;for(r=0;r<t;r++){n.randBigInt_(p,s,0);while(!n.greater(e,p))n.randBigInt_(p,s,0);if(!n.millerRabin(e,p))return 0}return 1}function g(e){var t=c(),r=v[e].repeat,i=v[e].N,s=n.twoToThe(e-1),o=4*e,f=!1,l,h,p,g;for(;;){l=n.randBigInt(i,1),l[0]|=1;if(!d(l,r))continue;t("q");for(g=0;g<o;g++){h=n.randBigInt(e,1),h[0]|=1,p=n.mod(h,l),p=n.sub(p,u),h=n.sub(h,p);if(n.greater(s,h))continue;if(!d(h,r))continue;t("p"),m[e]={p:h,q:l},f=!0;break}if(f)break}var y=n.dup(a),b=n.sub(h,u),w=n.multMod(b,n.inverseMod(l,h),h),E;for(;;){E=n.powMod(y,w,h);if(n.equals(E,u)){y=n.add(y,u);continue}m[e].g=E,t("g");return}throw new Error("Unreachable!")}function y(e,t){if(!(this instanceof y))return new y(e,t);t=t||{};if(e){var r=this;["p","q","g","y","x"].forEach(function(t){r[t]=e[t]}),this.type=e.type||f;return}var i=parseInt(t.bit_length?t.bit_length:1024,10);if(!v[i])throw new Error("Unsupported bit length.");m[i]||g(i),this.p=m[i].p,this.q=m[i].q,this.g=m[i].g,this.type=f,this.x=h(o,this.q),this.y=n.powMod(this.g,this.x,this.p),t.nocache&&(m[i]=null)}function b(e){var t,n;t=e.indexOf("("),n=e.lastIndexOf(")");if(t<0||n<0)throw new Error("Malformed S-Expression");e=e.substring(t+1,n);var r=e.search(/\s/),i={type:e.substring(0,r),val:[]};e=e.substring(r+1,n),t=e.indexOf("(");if(t<0)i.val.push(e);else{var s,o,u,a;while(t>-1){s=t+1,o=e.length;for(u=1,a=0;s<o&&a<u;s++)e[s]==="("&&u++,e[s]===")"&&a++;i.val.push(b(e.substring(t,++s))),e=e.substring(++s),t=e.indexOf("(")}}return i}function w(e){if(!e.type)throw new Error("Parse error.");var t,r;return e.type==="privkeys"?(t=[],e.val.forEach(function(e){t.push(w(e))}),t):(t={},e.val.forEach(function(e){r=e.val[0],typeof r=="string"?r.indexOf("#")===0&&(r=r.substring(1,r.lastIndexOf("#")),r=n.str2bigInt(r,16)):r=w(e),t[e.type]=r}),t)}var e=this,t,n,r,i,s;typeof module!="undefined"&&module.exports?(module.exports=y,t=require("../vendor/crypto.js"),n=require("../vendor/bigint.js"),i=require("path").join(__dirname,"/dsa-webworker.js"),s=require("./helpers.js")):(Object.keys(e.DSA).forEach(function(t){y[t]=e.DSA[t]}),e.DSA=y,t=e.CryptoJS,n=e.BigInt,r=e.Worker,i="dsa-webworker.js",s=y.HLP);var o=n.str2bigInt("0",10),u=n.str2bigInt("1",10),a=n.str2bigInt("2",10),f="\0\0",l=!1,p=[],v={1024:{N:160,repeat:40},2048:{N:224,repeat:56}},m={};y.prototype={constructor:y,packPublic:function(){var e=this.type;return e+=s.packMPI(this.p),e+=s.packMPI(this.q),e+=s.packMPI(this.g),e+=s.packMPI(this.y),e},packPrivate:function(){var e=this.packPublic()+s.packMPI(this.x);return e=t.enc.Latin1.parse(e),e.toString(t.enc.Base64)},generateNonce:function(e){var r=n.bigInt2bits(n.trim(this.x,0)),i=n.bigInt2bits(n.randBigInt(256)),u=t.algo.SHA256.create();u.update(t.enc.Latin1.parse(r)),u.update(e),u.update(t.enc.Latin1.parse(i));var a=u.finalize();return a=s.bits2bigInt(a.toString(t.enc.Latin1)),n.rightShift_(a,256-n.bitSize(this.q)),s.between(a,o,this.q)?a:this.generateNonce(e)},sign:function(e){e=t.enc.Latin1.parse(e);var r=n.str2bigInt(e.toString(t.enc.Hex),16),i,s=o,u=o;while(n.isZero(u)||n.isZero(s)){i=this.generateNonce(e),s=n.mod(n.powMod(this.g,i,this.p),this.q);if(n.isZero(s))continue;u=n.inverseMod(i,this.q),u=n.mult(u,n.add(r,n.mult(this.x,s))),u=n.mod(u,this.q)}return[s,u]},fingerprint:function(){var e=this.packPublic();return this.type===f&&(e=e.substring(2)),e=t.enc.Latin1.parse(e),t.SHA1(e).toString(t.enc.Hex)}},y.parsePublic=function(e,t){var n=["SHORT","MPI","MPI","MPI","MPI"];t&&n.push("MPI"),e=s.splitype(n,e);var r={type:e[0],p:s.readMPI(e[1]),q:s.readMPI(e[2]),g:s.readMPI(e[3]),y:s.readMPI(e[4])};return t&&(r.x=s.readMPI(e[5])),new y(r)},y.parsePrivate=function(e,n){return n?w(b(e))[0]["private-key"].dsa:(e=t.enc.Base64.parse(e),e=e.toString(t.enc.Latin1),y.parsePublic(e,!0))},y.verify=function(e,r,i,u){if(!s.between(i,o,e.q)||!s.between(u,o,e.q))return!1;var a=t.enc.Latin1.parse(r);a=n.str2bigInt(a.toString(t.enc.Hex),16);var f=n.inverseMod(u,e.q),l=n.multMod(a,f,e.q),c=n.multMod(i,f,e.q);l=n.powMod(e.g,l,e.p),c=n.powMod(e.y,c,e.p);var h=n.mod(n.multMod(l,c,e.p),e.q);return n.equals(h,i)},y.createInWebWorker=function(e,t){var s={path:i,seed:n.getSeed};e&&typeof e=="object"&&Object.keys(e).forEach(function(t){s[t]=e[t]}),typeof module!="undefined"&&module.exports&&(r=require("webworker-threads").Worker);var o=new r(s.path);o.onmessage=function(e){var n=e.data;switch(n.type){case"debug":if(!l||typeof console=="undefined")return;console.log(n.val);break;case"data":o.terminate(),t(y.parsePrivate(n.val));break;default:throw new Error("Unrecognized type.")}},o.postMessage({seed:s.seed(),imports:s.imports,debug:l})}}.call(this),function(){var e=this,t={},n,r,i;typeof module!="undefined"&&module.exports?(module.exports=t,n=require("../vendor/crypto.js"),r=require("./const.js"),i=require("./helpers.js")):(e.OTR.Parse=t,n=e.CryptoJS,r=e.OTR.CONST,i=e.OTR.HLP);var s={};s[r.WHITESPACE_TAG_V2]=r.OTR_VERSION_2,s[r.WHITESPACE_TAG_V3]=r.OTR_VERSION_3,t.parseMsg=function(e,t){var o=[],u=t.indexOf(r.OTR_TAG);if(!~u){this.initFragment(e),l=t.indexOf(r.WHITESPACE_TAG);if(~l){t=t.split(""),t.splice(l,16);var a,f=t.length;for(;l<f;){a=t.slice(l,l+8).join("");if(Object.hasOwnProperty.call(s,a)){t.splice(l,8),o.push(s[a]);continue}l+=8}t=t.join("")}return{msg:t,ver:o}}var l=u+r.OTR_TAG.length,c=t[l];if(c===","||c==="|")return this.msgFragment(e,t.substring(l+1),c==="|");this.initFragment(e);if(~["?","v"].indexOf(c)){t[l]==="?"&&(o.push(r.OTR_VERSION_1),l+=1);var h={2:r.OTR_VERSION_2,3:r.OTR_VERSION_3},p=t.substring(l+1),d=p.indexOf("?");return d>=1&&(p=p.substring(0,d).split(""),t[l]==="v"&&p.forEach(function(e){Object.hasOwnProperty.call(h,e)&&o.push(h[e])})),{cls:"query",ver:o}}if(c===":"){l+=1;var v=t.substring(l,l+4);if(v.length<4)return{msg:t};v=n.enc.Base64.parse(v).toString(n.enc.Latin1);var m=v.substring(0,2),g=v.substring(2);if(!e["ALLOW_V"+i.unpackSHORT(m)])return{msg:t};l+=4;var y=t.substring(l).indexOf(".");if(!~y)return{msg:t};t=n.enc.Base64.parse(t.substring(l,l+y)),t=n.enc.Latin1.stringify(t);var b;m===r.OTR_VERSION_3&&(b=t.substring(0,8),t=t.substring(8));var w;return~["","\n","",""].indexOf(g)?w="ake":g===""&&(w="data"),{version:m,type:g,msg:t,cls:w,instance_tags:b}}return t.substring(l,l+7)===" Error:"?(e.ERROR_START_AKE&&e.sendQueryMsg(),{msg:t.substring(l+7),cls:"error"}):{msg:t}},t.initFragment=function(e){e.fragment={s:"",j:0,k:0}},t.msgFragment=function(e,t,n){t=t.split(",");if(n){var r=t.shift().split("|"),s=i.packINT(parseInt(r[0],16)),o=i.packINT(parseInt(r[1],16));if(e.checkInstanceTags(s+o))return}if(t.length<4||isNaN(parseInt(t[0],10))||isNaN(parseInt(t[1],10)))return;var u=parseInt(t[0],10),a=parseInt(t[1],10);t=t[2];if(a<u||a===0||u===0){this.initFragment(e);return}u===1?(this.initFragment(e),e.fragment={k:1,n:a,s:t}):a===e.fragment.n&&u===e.fragment.k+1?(e.fragment.s+=t,e.fragment.k+=1):this.initFragment(e);if(a===u)return t=e.fragment.s,this.initFragment(e),this.parseMsg(e,t);return}}.call(this),function(){function a(e,n,r,s,o){var u=t.enc.Latin1.parse(o),a=t.algo.HMAC.create(t.algo.SHA256,u);return a.update(t.enc.Latin1.parse(i.packMPI(e))),a.update(t.enc.Latin1.parse(i.packMPI(n))),a.update(t.enc.Latin1.parse(r)),a.update(t.enc.Latin1.parse(s)),a.finalize().toString(t.enc.Latin1)}function f(e){if(!(this instanceof f))return new f(e);this.otr=e,this.our_dh=e.our_old_dh,this.our_keyid=e.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 t=this;["sendMsg"].forEach(function(e){t[e]=t[e].bind(t)})}var e=this,t,n,r,i,s;typeof module!="undefined"&&module.exports?(module.exports=f,t=require("../vendor/crypto.js"),n=require("../vendor/bigint.js"),r=require("./const.js"),i=require("./helpers.js"),s=require("./dsa.js")):(e.OTR.AKE=f,t=e.CryptoJS,n=e.BigInt,r=e.OTR.CONST,i=e.OTR.HLP,s=e.DSA);var o=n.str2bigInt(r.N,16),u=n.sub(o,n.str2bigInt("2",10));f.prototype={constructor:f,createKeys:function(e){var t=n.powMod(e,this.our_dh.privateKey,o),r=i.packMPI(t);this.ssid=i.mask(i.h2("\0",r),0,64);var s=i.h2("",r);this.c=i.mask(s,0,128),this.c_prime=i.mask(s,128,128),this.m1=i.h2("",r),this.m2=i.h2("",r),this.m1_prime=i.h2("",r),this.m2_prime=i.h2("",r)},verifySignMac:function(e,n,r,o,u,f,l,c){var h=i.makeMac(n,r);if(!i.compare(e,h))return["MACs do not match."];var p=i.decryptAes(n.substring(4),o,c);p=i.splitype(["PUBKEY","INT","SIG"],p.toString(t.enc.Latin1));var d=a(u,f,p[0],p[1],l),v=s.parsePublic(p[0]),m=i.bits2bigInt(p[2].substring(0,20)),g=i.bits2bigInt(p[2].substring(20));return s.verify(v,d,m,g)?[null,i.readLen(p[1]),v]:["Cannot verify signature of m."]},makeM:function(e,r,s,o){var u=this.otr.priv.packPublic(),f=i.packINT(this.our_keyid),l=a(this.our_dh.publicKey,e,u,f,r);l=this.otr.priv.sign(l);var c=u+f;c+=n.bigInt2bits(l[0],20),c+=n.bigInt2bits(l[1],20),c=t.enc.Latin1.parse(c);var h=i.packData(i.encryptAes(c,s,i.packCtr(0))),p=i.makeMac(h,o);return h+p},akeSuccess:function(e){i.debug.call(this.otr,"success");if(n.equals(this.their_y,this.our_dh.publicKey))return this.otr.error("equal keys - we have a problem.",!0);this.otr.our_old_dh=this.our_dh,this.otr.their_priv_pk=this.their_priv_pk,this.their_keyid===this.otr.their_keyid&&n.equals(this.their_y,this.otr.their_y)||this.their_keyid===this.otr.their_keyid-1&&n.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=e,this.otr.authstate=r.AUTHSTATE_NONE,this.otr.msgstate=r.MSGSTATE_ENCRYPTED,this.r=null,this.myhashed=null,this.dhcommit=null,this.encrypted=null,this.hashed=null,this.otr.trigger("status",[r.STATUS_AKE_SUCCESS]),this.otr.sendStored()},handleAKE:function(e){var s,o,a,f=e.version;switch(e.type){case"":i.debug.call(this.otr,"d-h key message"),e=i.splitype(["DATA","DATA"],e.msg);if(this.otr.authstate===r.AUTHSTATE_AWAITING_DHKEY){var l=i.readMPI(this.myhashed),c=i.readMPI(e[1]);if(n.greater(l,c)){a="",s=this.dhcommit;break}this.our_dh=this.otr.dh(),this.otr.authstate=r.AUTHSTATE_NONE,this.r=null,this.myhashed=null}else this.otr.authstate===r.AUTHSTATE_AWAITING_SIG&&(this.our_dh=this.otr.dh());this.otr.authstate=r.AUTHSTATE_AWAITING_REVEALSIG,this.encrypted=e[0].substring(4),this.hashed=e[1].substring(4),a="\n",s=i.packMPI(this.our_dh.publicKey);break;case"\n":i.debug.call(this.otr,"reveal signature message"),e=i.splitype(["MPI"],e.msg);if(this.otr.authstate!==r.AUTHSTATE_AWAITING_DHKEY){if(this.otr.authstate!==r.AUTHSTATE_AWAITING_SIG)return;if(!n.equals(this.their_y,i.readMPI(e[0])))return}this.otr.authstate=r.AUTHSTATE_AWAITING_SIG,this.their_y=i.readMPI(e[0]);if(!i.checkGroup(this.their_y,u))return this.otr.error("Illegal g^y.",!0);this.createKeys(this.their_y),a="",s=i.packMPI(this.r),s+=this.makeM(this.their_y,this.m1,this.c,this.m2),this.m1=null,this.m2=null,this.c=null;break;case"":i.debug.call(this.otr,"signature message");if(this.otr.authstate!==r.AUTHSTATE_AWAITING_REVEALSIG)return;e=i.splitype(["DATA","DATA","MAC"],e.msg),this.r=i.readMPI(e[0]);var h=t.enc.Hex.parse(n.bigInt2str(this.r,16));h=t.enc.Latin1.stringify(h);var p=i.decryptAes(this.encrypted,h,i.packCtr(0));p=p.toString(t.enc.Latin1),this.their_y=i.readMPI(p);var d=t.SHA256(t.enc.Latin1.parse(p));if(!i.compare(this.hashed,d.toString(t.enc.Latin1)))return this.otr.error("Hashed g^x does not match.",!0);if(!i.checkGroup(this.their_y,u))return this.otr.error("Illegal g^x.",!0);this.createKeys(this.their_y),o=this.verifySignMac(e[2],e[1],this.m2,this.c,this.their_y,this.our_dh.publicKey,this.m1,i.packCtr(0));if(o[0])return this.otr.error(o[0],!0);this.their_keyid=o[1],this.their_priv_pk=o[2],s=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(f,"",s),this.akeSuccess(f);return;case"":i.debug.call(this.otr,"data message");if(this.otr.authstate!==r.AUTHSTATE_AWAITING_SIG)return;e=i.splitype(["DATA","MAC"],e.msg),o=this.verifySignMac(e[1],e[0],this.m2_prime,this.c_prime,this.their_y,this.our_dh.publicKey,this.m1_prime,i.packCtr(0));if(o[0])return this.otr.error(o[0],!0);this.their_keyid=o[1],this.their_priv_pk=o[2],this.m1_prime=null,this.m2_prime=null,this.c_prime=null,this.transmittedRS=!0,this.akeSuccess(f);return;default:return}this.sendMsg(f,a,s)},sendMsg:function(e,t,n){var s=e+t,o=e===r.OTR_VERSION_3;o&&(i.debug.call(this.otr,"instance tags"),s+=this.otr.our_instance_tag,s+=this.otr.their_instance_tag),s+=n,s=i.wrapMsg(s,this.otr.fragment_size,o,this.otr.our_instance_tag,this.otr.their_instance_tag);if(s[0])return this.otr.error(s[0]);this.otr.io(s[1])},initiateAKE:function(e){i.debug.call(this.otr,"d-h commit message"),this.otr.trigger("status",[r.STATUS_AKE_INIT]),this.otr.authstate=r.AUTHSTATE_AWAITING_DHKEY;var s=i.packMPI(this.our_dh.publicKey);s=t.enc.Latin1.parse(s),this.r=n.randBigInt(128);var o=t.enc.Hex.parse(n.bigInt2str(this.r,16));o=t.enc.Latin1.stringify(o),this.myhashed=t.SHA256(s),this.myhashed=i.packData(this.myhashed.toString(t.enc.Latin1)),this.dhcommit=i.packData(i.encryptAes(s,o,i.packCtr(0))),this.dhcommit+=this.myhashed,this.sendMsg(e,"",this.dhcommit)}}}.call(this),function(){function l(e){if(!(this instanceof l))return new l(e);this.version=1,this.our_fp=e.our_fp,this.their_fp=e.their_fp,this.ssid=e.ssid,this.debug=!!e.debug,this.init()}var e=this,t,n,r,i,s;typeof module!="undefined"&&module.exports?(module.exports=l,t=require("../vendor/crypto.js"),n=require("../vendor/bigint.js"),r=require("../vendor/eventemitter.js"),i=require("./const.js"),s=require("./helpers.js")):(e.OTR.SM=l,t=e.CryptoJS,n=e.BigInt,r=e.EventEmitter,i=e.OTR.CONST,s=e.OTR.HLP);var o=n.str2bigInt(i.G,10),u=n.str2bigInt(i.N,16),a=n.sub(u,n.str2bigInt("2",10)),f=n.sub(u,n.str2bigInt("1",10));n.divInt_(f,2),s.extend(l,r),l.prototype.init=function(){this.smpstate=i.SMPSTATE_EXPECT1,this.secret=null},l.prototype.makeSecret=function(e,n){var r=t.algo.SHA256.create();r.update(t.enc.Latin1.parse(s.packBytes(this.version,1))),r.update(t.enc.Hex.parse(e?this.our_fp:this.their_fp)),r.update(t.enc.Hex.parse(e?this.their_fp:this.our_fp)),r.update(t.enc.Latin1.parse(this.ssid)),r.update(t.enc.Latin1.parse(n));var i=r.finalize();this.secret=s.bits2bigInt(i.toString(t.enc.Latin1))},l.prototype.makeG2s=function(){this.a2=s.randomExponent(),this.a3=s.randomExponent(),this.g2a=n.powMod(o,this.a2,u),this.g3a=n.powMod(o,this.a3,u),(!s.checkGroup(this.g2a,a)||!s.checkGroup(this.g3a,a))&&this.makeG2s()},l.prototype.computeGs=function(e,t){this.g2=n.powMod(e,this.a2,u),this.g3=n.powMod(t,this.a3,u)},l.prototype.computePQ=function(e){this.p=n.powMod(this.g3,e,u),this.q=s.multPowMod(o,e,this.g2,this.secret,u)},l.prototype.computeR=function(){this.r=n.powMod(this.QoQ,this.a3,u)},l.prototype.computeRab=function(e){return n.powMod(e,this.a3,u)},l.prototype.computeC=function(e,t){return s.smpHash(e,n.powMod(o,t,u))},l.prototype.computeD=function(e,t,r){return n.subMod(e,n.multMod(t,r,f),f)},l.prototype.handleSM=function(e){var r,f,l,c,h,p,d,v,m,g,y,b,w,E,S={2:i.SMPSTATE_EXPECT1,3:i.SMPSTATE_EXPECT2,4:i.SMPSTATE_EXPECT3,5:i.SMPSTATE_EXPECT4,7:i.SMPSTATE_EXPECT1};if(e.type===6){this.init(),this.trigger("abort");return}if(this.smpstate!==S[e.type])return this.abort();switch(this.smpstate){case i.SMPSTATE_EXPECT1:s.debug.call(this,"smp tlv 2");var x,T;e.type===7&&(x=e.msg.indexOf("\0"),T=e.msg.substring(0,x),e.msg=e.msg.substring(x+1)),w=s.readLen(e.msg.substr(0,4));if(w!==6)return this.abort();e=s.unpackMPIs(6,e.msg.substring(4));if(!s.checkGroup(e[0],a)||!s.checkGroup(e[3],a))return this.abort();if(!s.ZKP(1,e[1],s.multPowMod(o,e[2],e[0],e[1],u)))return this.abort();if(!s.ZKP(2,e[4],s.multPowMod(o,e[5],e[3],e[4],u)))return this.abort();this.g3ao=e[3],this.makeG2s(),f=s.randomExponent(),l=s.randomExponent(),this.c2=this.computeC(3,f),this.c3=this.computeC(4,l),this.d2=this.computeD(f,this.a2,this.c2),this.d3=this.computeD(l,this.a3,this.c3),this.computeGs(e[0],e[3]),this.smpstate=i.SMPSTATE_EXPECT0,T=t.enc.Latin1.parse(T).toString(t.enc.Utf8),this.trigger("question",[T]);return;case i.SMPSTATE_EXPECT2:s.debug.call(this,"smp tlv 3"),w=s.readLen(e.msg.substr(0,4));if(w!==11)return this.abort();e=s.unpackMPIs(11,e.msg.substring(4));if(!s.checkGroup(e[0],a)||!s.checkGroup(e[3],a)||!s.checkGroup(e[6],a)||!s.checkGroup(e[7],a))return this.abort();if(!s.ZKP(3,e[1],s.multPowMod(o,e[2],e[0],e[1],u)))return this.abort();if(!s.ZKP(4,e[4],s.multPowMod(o,e[5],e[3],e[4],u)))return this.abort();this.g3ao=e[3],this.computeGs(e[0],e[3]),h=s.multPowMod(this.g3,e[9],e[6],e[8],u),p=s.multPowMod(o,e[9],this.g2,e[10],u),p=n.multMod(p,n.powMod(e[7],e[8],u),u);if(!s.ZKP(5,e[8],h,p))return this.abort();var C=s.randomExponent();this.computePQ(C);var k=s.randomExponent(),L=s.randomExponent(),A=s.multPowMod(o,k,this.g2,L,u),O=s.smpHash(6,n.powMod(this.g3,k,u),A),M=this.computeD(k,C,O),_=this.computeD(L,this.secret,O);this.QoQ=n.divMod(this.q,e[7],u),this.PoP=n.divMod(this.p,e[6],u),this.computeR(),c=s.randomExponent(),g=n.powMod(this.QoQ,c,u),y=s.smpHash(7,n.powMod(o,c,u),g),b=this.computeD(c,this.a3,y),this.smpstate=i.SMPSTATE_EXPECT4,r=s.packINT(8)+s.packMPIs([this.p,this.q,O,M,_,this.r,y,b]),r=s.packTLV(4,r);break;case i.SMPSTATE_EXPECT3:s.debug.call(this,"smp tlv 4"),w=s.readLen(e.msg.substr(0,4));if(w!==8)return this.abort();e=s.unpackMPIs(8,e.msg.substring(4));if(!s.checkGroup(e[0],a)||!s.checkGroup(e[1],a)||!s.checkGroup(e[5],a))return this.abort();h=s.multPowMod(this.g3,e[3],e[0],e[2],u),p=s.multPowMod(o,e[3],this.g2,e[4],u),p=n.multMod(p,n.powMod(e[1],e[2],u),u);if(!s.ZKP(6,e[2],h,p))return this.abort();d=s.multPowMod(o,e[7],this.g3ao,e[6],u),this.QoQ=n.divMod(e[1],this.q,u),v=s.multPowMod(this.QoQ,e[7],e[5],e[6],u);if(!s.ZKP(7,e[6],d,v))return this.abort();this.computeR(),c=s.randomExponent(),g=n.powMod(this.QoQ,c,u),y=s.smpHash(8,n.powMod(o,c,u),g),b=this.computeD(c,this.a3,y),r=s.packINT(3)+s.packMPIs([this.r,y,b]),r=s.packTLV(5,r),m=this.computeRab(e[5]),E=!!n.equals(m,n.divMod(e[0],this.p,u)),this.trigger("trust",[E,"answered"]),this.init();break;case i.SMPSTATE_EXPECT4:s.debug.call(this,"smp tlv 5"),w=s.readLen(e.msg.substr(0,4));if(w!==3)return this.abort();e=s.unpackMPIs(3,e.msg.substring(4));if(!s.checkGroup(e[0],a))return this.abort();d=s.multPowMod(o,e[2],this.g3ao,e[1],u),v=s.multPowMod(this.QoQ,e[2],e[0],e[1],u);if(!s.ZKP(8,e[1],d,v))return this.abort();m=this.computeRab(e[0]),E=!!n.equals(m,this.PoP),this.trigger("trust",[E,"asked"]),this.init();return}this.sendMsg(r)},l.prototype.sendMsg=function(e){this.trigger("send",[this.ssid,"\0"+e])},l.prototype.rcvSecret=function(e,t){s.debug.call(this,"receive secret");var n,r=!1;this.smpstate===i.SMPSTATE_EXPECT0?n=this.answer:(n=this.initiate,r=!0),this.makeSecret(r,e),n.call(this,t)},l.prototype.answer=function(){s.debug.call(this,"smp answer");var e=s.randomExponent();this.computePQ(e);var t=s.randomExponent(),r=s.randomExponent(),a=s.multPowMod(o,t,this.g2,r,u),f=s.smpHash(5,n.powMod(this.g3,t,u),a),l=this.computeD(t,e,f),c=this.computeD(r,this.secret,f);this.smpstate=i.SMPSTATE_EXPECT3;var h=s.packINT(11)+s.packMPIs([this.g2a,this.c2,this.d2,this.g3a,this.c3,this.d3,this.p,this.q,f,l,c]);this.sendMsg(s.packTLV(3,h))},l.prototype.initiate=function(e){s.debug.call(this,"smp initiate"),this.smpstate!==i.SMPSTATE_EXPECT1&&this.abort(),this.makeG2s();var t=s.randomExponent(),n=s.randomExponent();this.c2=this.computeC(1,t),this.c3=this.computeC(2,n),this.d2=this.computeD(t,this.a2,this.c2),this.d3=this.computeD(n,this.a3,this.c3),this.smpstate=i.SMPSTATE_EXPECT2;var r="",o=2;e&&(r+=e,r+="\0",o=7),r+=s.packINT(6)+s.packMPIs([this.g2a,this.c2,this.d2,this.g3a,this.c3,this.d3]),this.sendMsg(s.packTLV(o,r))},l.prototype.abort=function(){this.init(),this.sendMsg(s.packTLV(6,"")),this.trigger("abort")}}.call(this),function(){function m(e){if(!(this instanceof m))return new m(e);e=e||{};if(!(!e.priv||e.priv instanceof c))throw new Error("Requires long-lived DSA key.");this.priv=e.priv?e.priv:new c,this.fragment_size=e.fragment_size||0;if(this.fragment_size<0)throw new Error("Fragment size must be a positive integer.");this.send_interval=e.send_interval||0;if(this.send_interval<0)throw new Error("Send interval must be a positive integer.");this.outgoing=[],this.our_instance_tag=e.instance_tag||m.makeInstanceTag(),this.debug=!!e.debug,this.smw=e.smw,this.init();var t=this;["sendMsg","receiveMsg"].forEach(function(e){t[e]=t[e].bind(t)}),r.call(this)}var e=this,t,n,r,i,s,o,u,a,f,l,c;typeof module!="undefined"&&module.exports?(module.exports=m,t=require("../vendor/crypto.js"),n=require("../vendor/bigint.js"),r=require("../vendor/eventemitter.js"),s=require("path").join(__dirname,"/sm-webworker.js"),o=require("./const.js"),u=require("./helpers.js"),a=require("./parse.js"),f=require("./ake.js"),l=require("./sm.js"),c=require("./dsa.js"),m.CONST=o):(Object.keys(e.OTR).forEach(function(t){m[t]=e.OTR[t]}),e.OTR=m,t=e.CryptoJS,n=e.BigInt,r=e.EventEmitter,i=e.Worker,s="sm-webworker.js",o=m.CONST,u=m.HLP,a=m.Parse,f=m.AKE,l=m.SM,c=e.DSA);var h=n.str2bigInt(o.G,10),p=n.str2bigInt(o.N,16),d=Math.pow(2,53)-1,v=Math.pow(2,31)-1;u.extend(m,r),m.prototype.init=function(){this.msgstate=o.MSGSTATE_PLAINTEXT,this.authstate=o.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,a.initFragment(this),this.their_y=null,this.their_old_y=null,this.their_keyid=0,this.their_priv_pk=null,this.their_instance_tag="\0\0\0\0",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},m.prototype._akeInit=function(){this.ake=new f(this),this.transmittedRS=!1,this.ssid=null},m.prototype._SMW=function(e,t){this.otr=e;var r={path:s,seed:n.getSeed};typeof e.smw=="object"&&Object.keys(e.smw).forEach(function(t){r[t]=e.smw[t]}),typeof module!="undefined"&&module.exports&&(i=require("webworker-threads").Worker),this.worker=new i(r.path);var o=this;this.worker.onmessage=function(e){var t=e.data;if(!t)return;o.trigger(t.method,t.args)},this.worker.postMessage({type:"seed",seed:r.seed(),imports:r.imports}),this.worker.postMessage({type:"init",reqs:t})},u.extend(m.prototype._SMW,r),["handleSM","rcvSecret","abort"].forEach(function(e){m.prototype._SMW.prototype[e]=function(){this.worker.postMessage({type:"method",method:e,args:Array.prototype.slice.call(arguments,0)})}}),m.prototype._smInit=function(){var e={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,e)):this.sm=new l(e);var t=this;["trust","abort","question"].forEach(function(e){t.sm.on(e,function(){t.trigger("smp",[e].concat(Array.prototype.slice.call(arguments)))})}),this.sm.on("send",function(e,n){t.ssid===e&&(n=t.prepareMsg(n),t.io(n))})},m.prototype.io=function(e,t){e=[].concat(e).map(function(e){return{msg:e,meta:t}}),this.outgoing=this.outgoing.concat(e);var n=this;(function r(e){if(!e){if(!n.outgoing.length)return;var t=n.outgoing.shift();n.trigger("io",[t.msg,t.meta])}setTimeout(r,e?0:n.send_interval)})(!0)},m.prototype.dh=function(){var t={privateKey:n.randBigInt(320)};return t.publicKey=n.powMod(h,t.privateKey,p),t},m.prototype.DHSession=function g(e,r){if(!(this instanceof g))return new g(e,r);var i=n.powMod(r,e.privateKey,p),s=u.packMPI(i);this.id=u.mask(u.h2("\0",s),0,64);var o=n.greater(e.publicKey,r),a=o?"":"",f=o?"":"";this.sendenc=u.mask(u.h1(a,s),0,128),this.sendmac=t.SHA1(t.enc.Latin1.parse(this.sendenc)),this.sendmac=this.sendmac.toString(t.enc.Latin1),this.rcvenc=u.mask(u.h1(f,s),0,128),this.rcvmac=t.SHA1(t.enc.Latin1.parse(this.rcvenc)),this.rcvmac=this.rcvmac.toString(t.enc.Latin1),this.rcvmacused=!1,this.extra_symkey=u.h2("ÿ",s),this.send_counter=0,this.rcv_counter=0},m.prototype.rotateOurKeys=function(){var e=this;this.sessKeys[1].forEach(function(t){t&&t.rcvmacused&&e.oldMacKeys.push(t.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]},m.prototype.rotateTheirKeys=function(e){this.their_keyid+=1;var t=this;this.sessKeys.forEach(function(e){e[1]&&e[1].rcvmacused&&t.oldMacKeys.push(e[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=e,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)},m.prototype.prepareMsg=function(e,n){if(this.msgstate!==o.MSGSTATE_ENCRYPTED||this.their_keyid===0)return this.error("Not ready to encrypt.");var r=this.sessKeys[1][0];if(r.send_counter>=d)return this.error("Should have rekeyed by now.");r.send_counter+=1;var i=u.packCtr(r.send_counter),s=this.ake.otr_version+"",a=this.ake.otr_version===o.OTR_VERSION_3;a&&(s+=this.our_instance_tag,s+=this.their_instance_tag),s+="\0",s+=u.packINT(this.our_keyid-1),s+=u.packINT(this.their_keyid),s+=u.packMPI(this.our_dh.publicKey),s+=i.substring(0,8);if(Math.ceil(e.length/8)>=v)return this.error("Message is too long.");var f=u.encryptAes(t.enc.Latin1.parse(e),r.sendenc,i);return s+=u.packData(f),s+=u.make1Mac(s,r.sendmac),s+=u.packData(this.oldMacKeys.splice(0).join("")),s=u.wrapMsg(s,this.fragment_size,a,this.our_instance_tag,this.their_instance_tag),s[0]?this.error(s[0]):(n&&this.trigger("file",["send",r.extra_symkey,n]),s[1])},m.prototype.handleDataMsg=function(e){var n=e.version+e.type;this.ake.otr_version===o.OTR_VERSION_3&&(n+=e.instance_tags);var r=["BYTE","INT","INT","MPI","CTR","DATA","MAC","DATA"];e=u.splitype(r,e.msg);var i=e[0]==="";if(this.msgstate!==o.MSGSTATE_ENCRYPTED||e.length!==8){i||this.error("Received an unreadable encrypted message.",!0);return}var s=this.our_keyid-u.readLen(e[2]),a=this.their_keyid-u.readLen(e[1]);if(s<0||s>1){i||this.error("Not of our latest keys.",!0);return}if(a<0||a>1){i||this.error("Not of your latest keys.",!0);return}var f=a?this.their_old_y:this.their_y;if(a===1&&!f){i||this.error("Do not have that key.");return}var l=this.sessKeys[s][a],c=u.unpackCtr(e[4]);if(c<=l.rcv_counter){i||this.error("Counter in message is not larger.");return}l.rcv_counter=c,n+=e.slice(0,6).join("");var h=u.make1Mac(n,l.rcvmac);if(!u.compare(e[6],h)){i||this.error("MACs do not match.");return}l.rcvmacused=!0;var p=u.decryptAes(e[5].substring(4),l.rcvenc,u.padCtr(e[4]));p=p.toString(t.enc.Latin1),s||this.rotateOurKeys(),a||this.rotateTheirKeys(u.readMPI(e[3]));var d=p.indexOf("\0");return~d&&(this.handleTLVs(p.substring(d+1),l),p=p.substring(0,d)),p=t.enc.Latin1.parse(p),p.toString(t.enc.Utf8)},m.prototype.handleTLVs=function(e,n){var r,i,s;for(;e.length;){r=u.unpackSHORT(e.substr(0,2)),i=u.unpackSHORT(e.substr(2,2)),s=e.substr(4,i);if(s.length<i)break;switch(r){case 1:this.msgstate=o.MSGSTATE_FINISHED,this.trigger("status",[o.STATUS_END_OTR]);break;case 2:case 3:case 4:case 5:case 6:case 7:if(this.msgstate!==o.MSGSTATE_ENCRYPTED){this.sm&&this.sm.abort();return}this.sm||this._smInit(),this.sm.handleSM({msg:s,type:r});break;case 8:s=s.substring(4),s=t.enc.Latin1.parse(s),s=s.toString(t.enc.Utf8),this.trigger("file",["receive",n.extra_symkey,s])}e=e.substring(4+i)}},m.prototype.smpSecret=function(e,n){if(this.msgstate!==o.MSGSTATE_ENCRYPTED)return this.error("Must be encrypted for SMP.");if(typeof e!="string"||e.length<1)return this.error("Secret is required.");this.sm||this._smInit(),e=t.enc.Utf8.parse(e).toString(t.enc.Latin1),n=t.enc.Utf8.parse(n).toString(t.enc.Latin1),this.sm.rcvSecret(e,n)},m.prototype.sendQueryMsg=function(){var e={},t=o.OTR_TAG;this.ALLOW_V2&&(e[2]=!0),this.ALLOW_V3&&(e[3]=!0);var n=Object.keys(e);n.length&&(t+="v",n.forEach(function(e){e!=="1"&&(t+=e)}),t+="?"),this.io(t),this.trigger("status",[o.STATUS_SEND_QUERY])},m.prototype.sendMsg=function(e,n){if(this.REQUIRE_ENCRYPTION||this.msgstate!==o.MSGSTATE_PLAINTEXT)e=t.enc.Utf8.parse(e),e=e.toString(t.enc.Latin1);switch(this.msgstate){case o.MSGSTATE_PLAINTEXT:if(this.REQUIRE_ENCRYPTION){this.storedMgs.push({msg:e,meta:n}),this.sendQueryMsg();return}this.SEND_WHITESPACE_TAG&&!this.receivedPlaintext&&(e+=o.WHITESPACE_TAG,this.ALLOW_V3&&(e+=o.WHITESPACE_TAG_V3),this.ALLOW_V2&&(e+=o.WHITESPACE_TAG_V2));break;case o.MSGSTATE_FINISHED:this.storedMgs.push({msg:e,meta:n}),this.error("Message cannot be sent at this time.");return;case o.MSGSTATE_ENCRYPTED:e=this.prepareMsg(e);break;default:throw new Error("Unknown message state.")}e&&this.io(e,n)},m.prototype.receiveMsg=function(e){e=a.parseMsg(this,e);if(!e)return;switch(e.cls){case"error":this.error(e.msg);return;case"ake":if(e.version===o.OTR_VERSION_3&&this.checkInstanceTags(e.instance_tags))return;this.ake.handleAKE(e);return;case"data":if(e.version===o.OTR_VERSION_3&&this.checkInstanceTags(e.instance_tags))return;e.msg=this.handleDataMsg(e),e.encrypted=!0;break;case"query":this.msgstate===o.MSGSTATE_ENCRYPTED&&this._akeInit(),this.doAKE(e);break;default:(this.REQUIRE_ENCRYPTION||this.msgstate!==o.MSGSTATE_PLAINTEXT)&&this.error("Received an unencrypted message."),this.receivedPlaintext=!0,this.WHITESPACE_START_AKE&&e.ver.length>0&&this.doAKE(e)}e.msg&&this.trigger("ui",[e.msg,!!e.encrypted])},m.prototype.checkInstanceTags=function(e){var t=u.readLen(e.substr(0,4)),n=u.readLen(e.substr(4,4));if(n&&n!==u.readLen(this.our_instance_tag))return!0;if(u.readLen(this.their_instance_tag)){if(u.readLen(this.their_instance_tag)!==t)return!0}else{if(t<100)return!0;this.their_instance_tag=u.packINT(t)}},m.prototype.doAKE=function(e){this.ALLOW_V3&&~e.ver.indexOf(o.OTR_VERSION_3)?this.ake.initiateAKE(o.OTR_VERSION_3):this.ALLOW_V2&&~e.ver.indexOf(o.OTR_VERSION_2)?this.ake.initiateAKE(o.OTR_VERSION_2):this.error("OTR conversation requested, but no compatible protocol version found.")},m.prototype.error=function(e,t){if(t){this.debug||(e="An OTR error has occurred."),e="?OTR Error:"+e,this.io(e);return}this.trigger("error",[e])},m.prototype.sendStored=function(){var e=this;this.storedMgs.splice(0).forEach(function(t){var n=e.prepareMsg(t.msg);e.io(n,t.meta)})},m.prototype.sendFile=function(e){if(this.msgstate!==o.MSGSTATE_ENCRYPTED)return this.error("Not ready to encrypt.");if(this.ake.otr_version!==o.OTR_VERSION_3)return this.error("Protocol v3 required.");if(!e)return this.error("Please specify a filename.");var n=t.enc.Utf8.parse(e);n=n.toString(t.enc.Latin1);if(n.length>=65532)return this.error("filename is too long.");var r="\0";r+="\0\b",r+=u.packSHORT(4+n.length),r+="\0\0\0",r+=n,r=this.prepareMsg(r,e),this.io(r)},m.prototype.endOtr=function(){this.msgstate===o.MSGSTATE_ENCRYPTED&&(this.sendMsg("\0\0\0\0"),this.sm&&(this.smw&&this.sm.worker.terminate(),this.sm=null)),this.msgstate=o.MSGSTATE_PLAINTEXT,this.receivedPlaintext=!1,this.trigger("status",[o.STATUS_END_OTR])},m.makeInstanceTag=function(){var e=n.randBigInt(32);return n.greater(n.str2bigInt("100",16),e)?m.makeInstanceTag():u.packINT(parseInt(n.bigInt2str(e,10),10))}}.call(this),{OTR:this.OTR,DSA:this.DSA}}),function(e){function Y(){return{empty:!1,unusedTokens:[],unusedInput:[],overflow:-2,charsLeftOver:0,nullInput:!1,invalidMonth:null,invalidFormat:!1,userInvalidated:!1,iso:!1}}function Z(e,n){function i(){t.suppressDeprecationWarnings===!1&&typeof console!="undefined"&&console.warn&&console.warn("Deprecation warning: "+e)}var r=!0;return st(function(){return r&&(i(),r=!1),n.apply(this,arguments)},n)}function et(e,t){return function(n){return at(e.call(this,n),t)}}function tt(e,t){return function(n){return this.lang().ordinal(e.call(this,n),t)}}function nt(){}function rt(e){Et(e),st(this,e)}function it(e){var t=dt(e),n=t.year||0,r=t.quarter||0,i=t.month||0,s=t.week||0,o=t.day||0,u=t.hour||0,a=t.minute||0,f=t.second||0,l=t.millisecond||0;this._milliseconds=+l+f*1e3+a*6e4+u*36e5,this._days=+o+s*7,this._months=+i+r*3+n*12,this._data={},this._bubble()}function st(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n]);return t.hasOwnProperty("toString")&&(e.toString=t.toString),t.hasOwnProperty("valueOf")&&(e.valueOf=t.valueOf),e}function ot(e){var t={},n;for(n in e)e.hasOwnProperty(n)&&v.hasOwnProperty(n)&&(t[n]=e[n]);return t}function ut(e){return e<0?Math.ceil(e):Math.floor(e)}function at(e,t,n){var r=""+Math.abs(e),i=e>=0;while(r.length<t)r="0"+r;return(i?n?"+":"":"-")+r}function ft(e,n,r,i){var s=n._milliseconds,o=n._days,u=n._months;i=i==null?!0:i,s&&e._d.setTime(+e._d+s*r),o&&en(e,"Date",Zt(e,"Date")+o*r),u&&Yt(e,Zt(e,"Month")+u*r),i&&t.updateOffset(e,o||u)}function lt(e){return Object.prototype.toString.call(e)==="[object Array]"}function ct(e){return Object.prototype.toString.call(e)==="[object Date]"||e instanceof Date}function ht(e,t,n){var r=Math.min(e.length,t.length),i=Math.abs(e.length-t.length),s=0,o;for(o=0;o<r;o++)(n&&e[o]!==t[o]||!n&&mt(e[o])!==mt(t[o]))&&s++;return s+i}function pt(e){if(e){var t=e.toLowerCase().replace(/(.)s$/,"$1");e=X[e]||V[t]||t}return e}function dt(e){var t={},n,r;for(r in e)e.hasOwnProperty(r)&&(n=pt(r),n&&(t[n]=e[r]));return t}function vt(n){var r,i;if(n.indexOf("week")===0)r=7,i="day";else{if(n.indexOf("month")!==0)return;r=12,i="month"}t[n]=function(s,o){var u,a,f=t.fn._lang[n],l=[];typeof s=="number"&&(o=s,s=e),a=function(e){var n=t().utc().set(i,e);return f.call(t.fn._lang,n,s||"")};if(o!=null)return a(o);for(u=0;u<r;u++)l.push(a(u));return l}}function mt(e){var t=+e,n=0;return t!==0&&isFinite(t)&&(t>=0?n=Math.floor(t):n=Math.ceil(t)),n}function gt(e,t){return(new Date(Date.UTC(e,t+1,0))).getUTCDate()}function yt(e,n,r){return Kt(t([e,11,31+n-r]),n,r).week}function bt(e){return wt(e)?366:365}function wt(e){return e%4===0&&e%100!==0||e%400===0}function Et(e){var t;e._a&&e._pf.overflow===-2&&(t=e._a[a]<0||e._a[a]>11?a:e._a[f]<1||e._a[f]>gt(e._a[u],e._a[a])?f:e._a[l]<0||e._a[l]>23?l:e._a[c]<0||e._a[c]>59?c:e._a[h]<0||e._a[h]>59?h:e._a[p]<0||e._a[p]>999?p:-1,e._pf._overflowDayOfYear&&(t<u||t>f)&&(t=f),e._pf.overflow=t)}function St(e){return e._isValid==null&&(e._isValid=!isNaN(e._d.getTime())&&e._pf.overflow<0&&!e._pf.empty&&!e._pf.invalidMonth&&!e._pf.nullInput&&!e._pf.invalidFormat&&!e._pf.userInvalidated,e._strict&&(e._isValid=e._isValid&&e._pf.charsLeftOver===0&&e._pf.unusedTokens.length===0)),e._isValid}function xt(e){return e?e.toLowerCase().replace("_","-"):e}function Tt(e,n){return n._isUTC?t(e).zone(n._offset||0):t(e).local()}function Nt(e,t){return t.abbr=e,d[e]||(d[e]=new nt),d[e].set(t),d[e]}function Ct(e){delete d[e]}function kt(e){var n=0,r,i,s,o,u=function(e){if(!d[e]&&m)try{require("./lang/"+e)}catch(t){}return d[e]};if(!e)return t.fn._lang;if(!lt(e)){i=u(e);if(i)return i;e=[e]}while(n<e.length){o=xt(e[n]).split("-"),r=o.length,s=xt(e[n+1]),s=s?s.split("-"):null;while(r>0){i=u(o.slice(0,r).join("-"));if(i)return i;if(s&&s.length>=r&&ht(o,s,!0)>=r-1)break;r--}n++}return t.fn._lang}function Lt(e){return e.match(/\[[\s\S]/)?e.replace(/^\[|\]$/g,""):e.replace(/\\/g,"")}function At(e){var t=e.match(w),n,r;for(n=0,r=t.length;n<r;n++)Q[t[n]]?t[n]=Q[t[n]]:t[n]=Lt(t[n]);return function(i){var s="";for(n=0;n<r;n++)s+=t[n]instanceof Function?t[n].call(i,e):t[n];return s}}function Ot(e,t){return e.isValid()?(t=Mt(t,e.lang()),$[t]||($[t]=At(t)),$[t](e)):e.lang().invalidDate()}function Mt(e,t){function r(e){return t.longDateFormat(e)||e}var n=5;E.lastIndex=0;while(n>=0&&E.test(e))e=e.replace(E,r),E.lastIndex=0,n-=1;return e}function _t(e,t){var n,r=t._strict;switch(e){case"Q":return _;case"DDDD":return P;case"YYYY":case"GGGG":case"gggg":return r?H:T;case"Y":case"G":case"g":return j;case"YYYYYY":case"YYYYY":case"GGGGG":case"ggggg":return r?B:N;case"S":if(r)return _;case"SS":if(r)return D;case"SSS":if(r)return P;case"DDD":return x;case"MMM":case"MMMM":case"dd":case"ddd":case"dddd":return k;case"a":case"A":return kt(t._l)._meridiemParse;case"X":return O;case"Z":case"ZZ":return L;case"T":return A;case"SSSS":return C;case"MM":case"DD":case"YY":case"GG":case"gg":case"HH":case"hh":case"mm":case"ss":case"ww":case"WW":return r?D:S;case"M":case"D":case"d":case"H":case"h":case"m":case"s":case"w":case"W":case"e":case"E":return S;case"Do":return M;default:return n=new RegExp(qt(It(e.replace("\\","")),"i")),n}}function Dt(e){e=e||"";var t=e.match(L)||[],n=t[t.length-1]||[],r=(n+"").match(U)||["-",0,0],i=+(r[1]*60)+mt(r[2]);return r[0]==="+"?-i:i}function Pt(e,n,r){var i,s=r._a;switch(e){case"Q":n!=null&&(s[a]=(mt(n)-1)*3);break;case"M":case"MM":n!=null&&(s[a]=mt(n)-1);break;case"MMM":case"MMMM":i=kt(r._l).monthsParse(n),i!=null?s[a]=i:r._pf.invalidMonth=n;break;case"D":case"DD":n!=null&&(s[f]=mt(n));break;case"Do":n!=null&&(s[f]=mt(parseInt(n,10)));break;case"DDD":case"DDDD":n!=null&&(r._dayOfYear=mt(n));break;case"YY":s[u]=t.parseTwoDigitYear(n);break;case"YYYY":case"YYYYY":case"YYYYYY":s[u]=mt(n);break;case"a":case"A":r._isPm=kt(r._l).isPM(n);break;case"H":case"HH":case"h":case"hh":s[l]=mt(n);break;case"m":case"mm":s[c]=mt(n);break;case"s":case"ss":s[h]=mt(n);break;case"S":case"SS":case"SSS":case"SSSS":s[p]=mt(("0."+n)*1e3);break;case"X":r._d=new Date(parseFloat(n)*1e3);break;case"Z":case"ZZ":r._useUTC=!0,r._tzm=Dt(n);break;case"w":case"ww":case"W":case"WW":case"d":case"dd":case"ddd":case"dddd":case"e":case"E":e=e.substr(0,1);case"gg":case"gggg":case"GG":case"GGGG":case"GGGGG":e=e.substr(0,2),n&&(r._w=r._w||{},r._w[e]=n)}}function Ht(e){var n,r,i=[],s,o,h,p,d,v,m,g;if(e._d)return;s=jt(e),e._w&&e._a[f]==null&&e._a[a]==null&&(h=function(n){var r=parseInt(n,10);return n?n.length<3?r>68?1900+r:2e3+r:r:e._a[u]==null?t().weekYear():e._a[u]},p=e._w,p.GG!=null||p.W!=null||p.E!=null?d=Qt(h(p.GG),p.W||1,p.E,4,1):(v=kt(e._l),m=p.d!=null?Vt(p.d,v):p.e!=null?parseInt(p.e,10)+v._week.dow:0,g=parseInt(p.w,10)||1,p.d!=null&&m<v._week.dow&&g++,d=Qt(h(p.gg),g,m,v._week.doy,v._week.dow)),e._a[u]=d.year,e._dayOfYear=d.dayOfYear),e._dayOfYear&&(o=e._a[u]==null?s[u]:e._a[u],e._dayOfYear>bt(o)&&(e._pf._overflowDayOfYear=!0),r=Xt(o,0,e._dayOfYear),e._a[a]=r.getUTCMonth(),e._a[f]=r.getUTCDate());for(n=0;n<3&&e._a[n]==null;++n)e._a[n]=i[n]=s[n];for(;n<7;n++)e._a[n]=i[n]=e._a[n]==null?n===2?1:0:e._a[n];i[l]+=mt((e._tzm||0)/60),i[c]+=mt((e._tzm||0)%60),e._d=(e._useUTC?Xt:Wt).apply(null,i)}function Bt(e){var t;if(e._d)return;t=dt(e._i),e._a=[t.year,t.month,t.day,t.hour,t.minute,t.second,t.millisecond],Ht(e)}function jt(e){var t=new Date;return e._useUTC?[t.getUTCFullYear(),t.getUTCMonth(),t.getUTCDate()]:[t.getFullYear(),t.getMonth(),t.getDate()]}function Ft(e){e._a=[],e._pf.empty=!0;var t=kt(e._l),n=""+e._i,r,i,s,o,u,a=n.length,f=0;s=Mt(e._f,t).match(w)||[];for(r=0;r<s.length;r++)o=s[r],i=(n.match(_t(o,e))||[])[0],i&&(u=n.substr(0,n.indexOf(i)),u.length>0&&e._pf.unusedInput.push(u),n=n.slice(n.indexOf(i)+i.length),f+=i.length),Q[o]?(i?e._pf.empty=!1:e._pf.unusedTokens.push(o),Pt(o,i,e)):e._strict&&!i&&e._pf.unusedTokens.push(o);e._pf.charsLeftOver=a-f,n.length>0&&e._pf.unusedInput.push(n),e._isPm&&e._a[l]<12&&(e._a[l]+=12),e._isPm===!1&&e._a[l]===12&&(e._a[l]=0),Ht(e),Et(e)}function It(e){return e.replace(/\\(\[)|\\(\])|\[([^\]\[]*)\]|\\(.)/g,function(e,t,n,r,i){return t||n||r||i})}function qt(e){return e.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&")}function Rt(e){var t,n,r,i,s;if(e._f.length===0){e._pf.invalidFormat=!0,e._d=new Date(NaN);return}for(i=0;i<e._f.length;i++){s=0,t=st({},e),t._pf=Y(),t._f=e._f[i],Ft(t);if(!St(t))continue;s+=t._pf.charsLeftOver,s+=t._pf.unusedTokens.length*10,t._pf.score=s;if(r==null||s<r)r=s,n=t}st(e,n||t)}function Ut(e){var n,r,i=e._i,s=F.exec(i);if(s){e._pf.iso=!0;for(n=0,r=q.length;n<r;n++)if(q[n][1].exec(i)){e._f=q[n][0]+(s[6]||" ");break}for(n=0,r=R.length;n<r;n++)if(R[n][1].exec(i)){e._f+=R[n][0];break}i.match(L)&&(e._f+="Z"),Ft(e)}else t.createFromInputFallback(e)}function zt(n){var r=n._i,i=g.exec(r);r===e?n._d=new Date:i?n._d=new Date(+i[1]):typeof r=="string"?Ut(n):lt(r)?(n._a=r.slice(0),Ht(n)):ct(r)?n._d=new Date(+r):typeof r=="object"?Bt(n):typeof r=="number"?n._d=new Date(r):t.createFromInputFallback(n)}function Wt(e,t,n,r,i,s,o){var u=new Date(e,t,n,r,i,s,o);return e<1970&&u.setFullYear(e),u}function Xt(e){var t=new Date(Date.UTC.apply(null,arguments));return e<1970&&t.setUTCFullYear(e),t}function Vt(e,t){if(typeof e=="string")if(!isNaN(e))e=parseInt(e,10);else{e=t.weekdaysParse(e);if(typeof e!="number")return null}return e}function $t(e,t,n,r,i){return i.relativeTime(t||1,!!n,e,r)}function Jt(e,t,n){var r=s(Math.abs(e)/1e3),i=s(r/60),o=s(i/60),u=s(o/24),a=s(u/365),f=r<45&&["s",r]||i===1&&["m"]||i<45&&["mm",i]||o===1&&["h"]||o<22&&["hh",o]||u===1&&["d"]||u<=25&&["dd",u]||u<=45&&["M"]||u<345&&["MM",s(u/30)]||a===1&&["y"]||["yy",a];return f[2]=t,f[3]=e>0,f[4]=n,$t.apply({},f)}function Kt(e,n,r){var i=r-n,s=r-e.day(),o;return s>i&&(s-=7),s<i-7&&(s+=7),o=t(e).add("d",s),{week:Math.ceil(o.dayOfYear()/7),year:o.year()}}function Qt(e,t,n,r,i){var s=Xt(e,0,1).getUTCDay(),o,u;return n=n!=null?n:i,o=i-s+(s>r?7:0)-(s<i?7:0),u=7*(t-1)+(n-i)+o+1,{year:u>0?e:e-1,dayOfYear:u>0?u:bt(e-1)+u}}function Gt(n){var r=n._i,i=n._f;return r===null||i===e&&r===""?t.invalid({nullInput:!0}):(typeof r=="string"&&(n._i=r=kt().preparse(r)),t.isMoment(r)?(n=ot(r),n._d=new Date(+r._d)):i?lt(i)?Rt(n):Ft(n):zt(n),new rt(n))}function Yt(e,t){var n;if(typeof t=="string"){t=e.lang().monthsParse(t);if(typeof t!="number")return e}return n=Math.min(e.date(),gt(e.year(),t)),e._d["set"+(e._isUTC?"UTC":"")+"Month"](t,n),e}function Zt(e,t){return e._d["get"+(e._isUTC?"UTC":"")+t]()}function en(e,t,n){return t==="Month"?Yt(e,n):e._d["set"+(e._isUTC?"UTC":"")+t](n)}function tn(e,n){return function(r){return r!=null?(en(this,e,r),t.updateOffset(this,n),this):Zt(this,e)}}function nn(e){t.duration.fn[e]=function(){return this._data[e]}}function rn(e,n){t.duration.fn["as"+e]=function(){return+this/n}}function sn(e){if(typeof ender!="undefined")return;i=r.moment,e?r.moment=Z("Accessing Moment through the global scope is deprecated, and will be removed in an upcoming release.",t):r.moment=t}var t,n="2.6.0",r=typeof global!="undefined"?global:this,i,s=Math.round,o,u=0,a=1,f=2,l=3,c=4,h=5,p=6,d={},v={_isAMomentObject:null,_i:null,_f:null,_l:null,_strict:null,_isUTC:null,_offset:null,_pf:null,_lang:null},m=typeof module!="undefined"&&module.exports,g=/^\/?Date\((\-?\d+)/i,y=/(\-)?(?:(\d*)\.)?(\d+)\:(\d+)(?:\:(\d+)\.?(\d{3})?)?/,b=/^(-)?P(?:(?:([0-9,.]*)Y)?(?:([0-9,.]*)M)?(?:([0-9,.]*)D)?(?:T(?:([0-9,.]*)H)?(?:([0-9,.]*)M)?(?:([0-9,.]*)S)?)?|([0-9,.]*)W)$/,w=/(\[[^\[]*\])|(\\)?(Mo|MM?M?M?|Do|DDDo|DD?D?D?|ddd?d?|do?|w[o|w]?|W[o|W]?|Q|YYYYYY|YYYYY|YYYY|YY|gg(ggg?)?|GG(GGG?)?|e|E|a|A|hh?|HH?|mm?|ss?|S{1,4}|X|zz?|ZZ?|.)/g,E=/(\[[^\[]*\])|(\\)?(LT|LL?L?L?|l{1,4})/g,S=/\d\d?/,x=/\d{1,3}/,T=/\d{1,4}/,N=/[+\-]?\d{1,6}/,C=/\d+/,k=/[0-9]*['a-z\u00A0-\u05FF\u0700-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]+|[\u0600-\u06FF\/]+(\s*?[\u0600-\u06FF]+){1,2}/i,L=/Z|[\+\-]\d\d:?\d\d/gi,A=/T/i,O=/[\+\-]?\d+(\.\d{1,3})?/,M=/\d{1,2}/,_=/\d/,D=/\d\d/,P=/\d{3}/,H=/\d{4}/,B=/[+-]?\d{6}/,j=/[+-]?\d+/,F=/^\s*(?:[+-]\d{6}|\d{4})-(?:(\d\d-\d\d)|(W\d\d$)|(W\d\d-\d)|(\d\d\d))((T| )(\d\d(:\d\d(:\d\d(\.\d+)?)?)?)?([\+\-]\d\d(?::?\d\d)?|\s*Z)?)?$/,I="YYYY-MM-DDTHH:mm:ssZ",q=[["YYYYYY-MM-DD",/[+-]\d{6}-\d{2}-\d{2}/],["YYYY-MM-DD",/\d{4}-\d{2}-\d{2}/],["GGGG-[W]WW-E",/\d{4}-W\d{2}-\d/],["GGGG-[W]WW",/\d{4}-W\d{2}/],["YYYY-DDD",/\d{4}-\d{3}/]],R=[["HH:mm:ss.SSSS",/(T| )\d\d:\d\d:\d\d\.\d+/],["HH:mm:ss",/(T| )\d\d:\d\d:\d\d/],["HH:mm",/(T| )\d\d:\d\d/],["HH",/(T| )\d\d/]],U=/([\+\-]|\d\d)/gi,z="Date|Hours|Minutes|Seconds|Milliseconds".split("|"),W={Milliseconds:1,Seconds:1e3,Minutes:6e4,Hours:36e5,Days:864e5,Months:2592e6,Years:31536e6},X={ms:"millisecond",s:"second",m:"minute",h:"hour",d:"day",D:"date",w:"week",W:"isoWeek",M:"month",Q:"quarter",y:"year",DDD:"dayOfYear",e:"weekday",E:"isoWeekday",gg:"weekYear",GG:"isoWeekYear"},V={dayofyear:"dayOfYear",isoweekday:"isoWeekday",isoweek:"isoWeek",weekyear:"weekYear",isoweekyear:"isoWeekYear"},$={},J="DDD w W M D d".split(" "),K="M D H h m s w W".split(" "),Q={M:function(){return this.month()+1},MMM:function(e){return this.lang().monthsShort(this,e)},MMMM:function(e){return this.lang().months(this,e)},D:function(){return this.date()},DDD:function(){return this.dayOfYear()},d:function(){return this.day()},dd:function(e){return this.lang().weekdaysMin(this,e)},ddd:function(e){return this.lang().weekdaysShort(this,e)},dddd:function(e){return this.lang().weekdays(this,e)},w:function(){return this.week()},W:function(){return this.isoWeek()},YY:function(){return at(this.year()%100,2)},YYYY:function(){return at(this.year(),4)},YYYYY:function(){return at(this.year(),5)},YYYYYY:function(){var e=this.year(),t=e>=0?"+":"-";return t+at(Math.abs(e),6)},gg:function(){return at(this.weekYear()%100,2)},gggg:function(){return at(this.weekYear(),4)},ggggg:function(){return at(this.weekYear(),5)},GG:function(){return at(this.isoWeekYear()%100,2)},GGGG:function(){return at(this.isoWeekYear(),4)},GGGGG:function(){return at(this.isoWeekYear(),5)},e:function(){return this.weekday()},E:function(){return this.isoWeekday()},a:function(){return this.lang().meridiem(this.hours(),this.minutes(),!0)},A:function(){return this.lang().meridiem(this.hours(),this.minutes(),!1)},H:function(){return this.hours()},h:function(){return this.hours()%12||12},m:function(){return this.minutes()},s:function(){return this.seconds()},S:function(){return mt(this.milliseconds()/100)},SS:function(){return at(mt(this.milliseconds()/10),2)},SSS:function(){return at(this.milliseconds(),3)},SSSS:function(){return at(this.milliseconds(),3)},Z:function(){var e=-this.zone(),t="+";return e<0&&(e=-e,t="-"),t+at(mt(e/60),2)+":"+at(mt(e)%60,2)},ZZ:function(){var e=-this.zone(),t="+";return e<0&&(e=-e,t="-"),t+at(mt(e/60),2)+at(mt(e)%60,2)},z:function(){return this.zoneAbbr()},zz:function(){return this.zoneName()},X:function(){return this.unix()},Q:function(){return this.quarter()}},G=["months","monthsShort","weekdays","weekdaysShort","weekdaysMin"];while(J.length)o=J.pop(),Q[o+"o"]=tt(Q[o],o);while(K.length)o=K.pop(),Q[o+o]=et(Q[o],2);Q.DDDD=et(Q.DDD,3),st(nt.prototype,{set:function(e){var t,n;for(n in e)t=e[n],typeof t=="function"?this[n]=t:this["_"+n]=t},_months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),months:function(e){return this._months[e.month()]},_monthsShort:"Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_"),monthsShort:function(e){return this._monthsShort[e.month()]},monthsParse:function(e){var n,r,i;this._monthsParse||(this._monthsParse=[]);for(n=0;n<12;n++){this._monthsParse[n]||(r=t.utc([2e3,n]),i="^"+this.months(r,"")+"|^"+this.monthsShort(r,""),this._monthsParse[n]=new RegExp(i.replace(".",""),"i"));if(this._monthsParse[n].test(e))return n}},_weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),weekdays:function(e){return this._weekdays[e.day()]},_weekdaysShort:"Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),weekdaysShort:function(e){return this._weekdaysShort[e.day()]},_weekdaysMin:"Su_Mo_Tu_We_Th_Fr_Sa".split("_"),weekdaysMin:function(e){return this._weekdaysMin[e.day()]},weekdaysParse:function(e){var n,r,i;this._weekdaysParse||(this._weekdaysParse=[]);for(n=0;n<7;n++){this._weekdaysParse[n]||(r=t([2e3,1]).day(n),i="^"+this.weekdays(r,"")+"|^"+this.weekdaysShort(r,"")+"|^"+this.weekdaysMin(r,""),this._weekdaysParse[n]=new RegExp(i.replace(".",""),"i"));if(this._weekdaysParse[n].test(e))return n}},_longDateFormat:{LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D YYYY",LLL:"MMMM D YYYY LT",LLLL:"dddd, MMMM D YYYY LT"},longDateFormat:function(e){var t=this._longDateFormat[e];return!t&&this._longDateFormat[e.toUpperCase()]&&(t=this._longDateFormat[e.toUpperCase()].replace(/MMMM|MM|DD|dddd/g,function(e){return e.slice(1)}),this._longDateFormat[e]=t),t},isPM:function(e){return(e+"").toLowerCase().charAt(0)==="p"},_meridiemParse:/[ap]\.?m?\.?/i,meridiem:function(e,t,n){return e>11?n?"pm":"PM":n?"am":"AM"},_calendar:{sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[Last] dddd [at] LT",sameElse:"L"},calendar:function(e,t){var n=this._calendar[e];return typeof n=="function"?n.apply(t):n},_relativeTime:{future:"in %s",past:"%s ago",s:"a few seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",M:"a month",MM:"%d months",y:"a year",yy:"%d years"},relativeTime:function(e,t,n,r){var i=this._relativeTime[n];return typeof i=="function"?i(e,t,n,r):i.replace(/%d/i,e)},pastFuture:function(e,t){var n=this._relativeTime[e>0?"future":"past"];return typeof n=="function"?n(t):n.replace(/%s/i,t)},ordinal:function(e){return this._ordinal.replace("%d",e)},_ordinal:"%d",preparse:function(e){return e},postformat:function(e){return e},week:function(e){return Kt(e,this._week.dow,this._week.doy).week},_week:{dow:0,doy:6},_invalidDate:"Invalid date",invalidDate:function(){return this._invalidDate}}),t=function(t,n,r,i){var s;return typeof r=="boolean"&&(i=r,r=e),s={},s._isAMomentObject=!0,s._i=t,s._f=n,s._l=r,s._strict=i,s._isUTC=!1,s._pf=Y(),Gt(s)},t.suppressDeprecationWarnings=!1,t.createFromInputFallback=Z("moment construction falls back to js Date. This is discouraged and will be removed in upcoming major release. Please refer to https://github.com/moment/moment/issues/1407 for more info.",function(e){e._d=new Date(e._i)}),t.utc=function(t,n,r,i){var s;return typeof r=="boolean"&&(i=r,r=e),s={},s._isAMomentObject=!0,s._useUTC=!0,s._isUTC=!0,s._l=r,s._i=t,s._f=n,s._strict=i,s._pf=Y(),Gt(s).utc()},t.unix=function(e){return t(e*1e3)},t.duration=function(e,n){var r=e,i=null,s,o,u;return t.isDuration(e)?r={ms:e._milliseconds,d:e._days,M:e._months}:typeof e=="number"?(r={},n?r[n]=e:r.milliseconds=e):(i=y.exec(e))?(s=i[1]==="-"?-1:1,r={y:0,d:mt(i[f])*s,h:mt(i[l])*s,m:mt(i[c])*s,s:mt(i[h])*s,ms:mt(i[p])*s}):!(i=b.exec(e))||(s=i[1]==="-"?-1:1,u=function(e){var t=e&&parseFloat(e.replace(",","."));return(isNaN(t)?0:t)*s},r={y:u(i[2]),M:u(i[3]),d:u(i[4]),h:u(i[5]),m:u(i[6]),s:u(i[7]),w:u(i[8])}),o=new it(r),t.isDuration(e)&&e.hasOwnProperty("_lang")&&(o._lang=e._lang),o},t.version=n,t.defaultFormat=I,t.momentProperties=v,t.updateOffset=function(){},t.lang=function(e,n){var r;return e?(n?Nt(xt(e),n):n===null?(Ct(e),e="en"):d[e]||kt(e),r=t.duration.fn._lang=t.fn._lang=kt(e),r._abbr):t.fn._lang._abbr},t.langData=function(e){return e&&e._lang&&e._lang._abbr&&(e=e._lang._abbr),kt(e)},t.isMoment=function(e){return e instanceof rt||e!=null&&e.hasOwnProperty("_isAMomentObject")},t.isDuration=function(e){return e instanceof it};for(o=G.length-1;o>=0;--o)vt(G[o]);t.normalizeUnits=function(e){return pt(e)},t.invalid=function(e){var n=t.utc(NaN);return e!=null?st(n._pf,e):n._pf.userInvalidated=!0,n},t.parseZone=function(){return t.apply(null,arguments).parseZone()},t.parseTwoDigitYear=function(e){return mt(e)+(mt(e)>68?1900:2e3)},st(t.fn=rt.prototype,{clone:function(){return t(this)},valueOf:function(){return+this._d+(this._offset||0)*6e4},unix:function(){return Math.floor(+this/1e3)},toString:function(){return this.clone().lang("en").format("ddd MMM DD YYYY HH:mm:ss [GMT]ZZ")},toDate:function(){return this._offset?new Date(+this):this._d},toISOString:function(){var e=t(this).utc();return 0<e.year()&&e.year()<=9999?Ot(e,"YYYY-MM-DD[T]HH:mm:ss.SSS[Z]"):Ot(e,"YYYYYY-MM-DD[T]HH:mm:ss.SSS[Z]")},toArray:function(){var e=this;return[e.year(),e.month(),e.date(),e.hours(),e.minutes(),e.seconds(),e.milliseconds()]},isValid:function(){return St(this)},isDSTShifted:function(){return this._a?this.isValid()&&ht(this._a,(this._isUTC?t.utc(this._a):t(this._a)).toArray())>0:!1},parsingFlags:function(){return st({},this._pf)},invalidAt:function(){return this._pf.overflow},utc:function(){return this.zone(0)},local:function(){return this.zone(0),this._isUTC=!1,this},format:function(e){var n=Ot(this,e||t.defaultFormat);return this.lang().postformat(n)},add:function(e,n){var r;return typeof e=="string"?r=t.duration(+n,e):r=t.duration(e,n),ft(this,r,1),this},subtract:function(e,n){var r;return typeof e=="string"?r=t.duration(+n,e):r=t.duration(e,n),ft(this,r,-1),this},diff:function(e,n,r){var i=Tt(e,this),s=(this.zone()-i.zone())*6e4,o,u;return n=pt(n),n==="year"||n==="month"?(o=(this.daysInMonth()+i.daysInMonth())*432e5,u=(this.year()-i.year())*12+(this.month()-i.month()),u+=(this-t(this).startOf("month")-(i-t(i).startOf("month")))/o,u-=(this.zone()-t(this).startOf("month").zone()-(i.zone()-t(i).startOf("month").zone()))*6e4/o,n==="year"&&(u/=12)):(o=this-i,u=n==="second"?o/1e3:n==="minute"?o/6e4:n==="hour"?o/36e5:n==="day"?(o-s)/864e5:n==="week"?(o-s)/6048e5:o),r?u:ut(u)},from:function(e,n){return t.duration(this.diff(e)).lang(this.lang()._abbr).humanize(!n)},fromNow:function(e){return this.from(t(),e)},calendar:function(){var e=Tt(t(),this).startOf("day"),n=this.diff(e,"days",!0),r=n<-6?"sameElse":n<-1?"lastWeek":n<0?"lastDay":n<1?"sameDay":n<2?"nextDay":n<7?"nextWeek":"sameElse";return this.format(this.lang().calendar(r,this))},isLeapYear:function(){return wt(this.year())},isDST:function(){return this.zone()<this.clone().month(0).zone()||this.zone()<this.clone().month(5).zone()},day:function(e){var t=this._isUTC?this._d.getUTCDay():this._d.getDay();return e!=null?(e=Vt(e,this.lang()),this.add({d:e-t})):t},month:tn("Month",!0),startOf:function(e){e=pt(e);switch(e){case"year":this.month(0);case"quarter":case"month":this.date(1);case"week":case"isoWeek":case"day":this.hours(0);case"hour":this.minutes(0);case"minute":this.seconds(0);case"second":this.milliseconds(0)}return e==="week"?this.weekday(0):e==="isoWeek"&&this.isoWeekday(1),e==="quarter"&&this.month(Math.floor(this.month()/3)*3),this},endOf:function(e){return e=pt(e),this.startOf(e).add(e==="isoWeek"?"week":e,1).subtract("ms",1)},isAfter:function(e,n){return n=typeof n!="undefined"?n:"millisecond",+this.clone().startOf(n)>+t(e).startOf(n)},isBefore:function(e,n){return n=typeof n!="undefined"?n:"millisecond",+this.clone().startOf(n)<+t(e).startOf(n)},isSame:function(e,t){return t=t||"ms",+this.clone().startOf(t)===+Tt(e,this).startOf(t)},min:function(e){return e=t.apply(null,arguments),e<this?this:e},max:function(e){return e=t.apply(null,arguments),e>this?this:e},zone:function(e,n){var r=this._offset||0;return e==null?this._isUTC?r:this._d.getTimezoneOffset():(typeof e=="string"&&(e=Dt(e)),Math.abs(e)<16&&(e*=60),this._offset=e,this._isUTC=!0,r!==e&&(!n||this._changeInProgress?ft(this,t.duration(r-e,"m"),1,!1):this._changeInProgress||(this._changeInProgress=!0,t.updateOffset(this,!0),this._changeInProgress=null)),this)},zoneAbbr:function(){return this._isUTC?"UTC":""},zoneName:function(){return this._isUTC?"Coordinated Universal Time":""},parseZone:function(){return this._tzm?this.zone(this._tzm):typeof this._i=="string"&&this.zone(this._i),this},hasAlignedHourOffset:function(e){return e?e=t(e).zone():e=0,(this.zone()-e)%60===0},daysInMonth:function(){return gt(this.year(),this.month())},dayOfYear:function(e){var n=s((t(this).startOf("day")-t(this).startOf("year"))/864e5)+1;return e==null?n:this.add("d",e-n)},quarter:function(e){return e==null?Math.ceil((this.month()+1)/3):this.month((e-1)*3+this.month()%3)},weekYear:function(e){var t=Kt(this,this.lang()._week.dow,this.lang()._week.doy).year;return e==null?t:this.add("y",e-t)},isoWeekYear:function(e){var t=Kt(this,1,4).year;return e==null?t:this.add("y",e-t)},week:function(e){var t=this.lang().week(this);return e==null?t:this.add("d",(e-t)*7)},isoWeek:function(e){var t=Kt(this,1,4).week;return e==null?t:this.add("d",(e-t)*7)},weekday:function(e){var t=(this.day()+7-this.lang()._week.dow)%7;return e==null?t:this.add("d",e-t)},isoWeekday:function(e){return e==null?this.day()||7:this.day(this.day()%7?e:e-7)},isoWeeksInYear:function(){return yt(this.year(),1,4)},weeksInYear:function(){var e=this._lang._week;return yt(this.year(),e.dow,e.doy)},get:function(e){return e=pt(e),this[e]()},set:function(e,t){return e=pt(e),typeof this[e]=="function"&&this[e](t),this},lang:function(t){return t===e?this._lang:(this._lang=kt(t),this)}}),t.fn.millisecond=t.fn.milliseconds=tn("Milliseconds",!1),t.fn.second=t.fn.seconds=tn("Seconds",!1),t.fn.minute=t.fn.minutes=tn("Minutes",!1),t.fn.hour=t.fn.hours=tn("Hours",!0),t.fn.date=tn("Date",!0),t.fn.dates=Z("dates accessor is deprecated. Use date instead.",tn("Date",!0)),t.fn.year=tn("FullYear",!0),t.fn.years=Z("years accessor is deprecated. Use year instead.",tn("FullYear",!0)),t.fn.days=t.fn.day,t.fn.months=t.fn.month,t.fn.weeks=t.fn.week,t.fn.isoWeeks=t.fn.isoWeek,t.fn.quarters=t.fn.quarter,t.fn.toJSON=t.fn.toISOString,st(t.duration.fn=it.prototype,{_bubble:function(){var e=this._milliseconds,t=this._days,n=this._months,r=this._data,i,s,o,u;r.milliseconds=e%1e3,i=ut(e/1e3),r.seconds=i%60,s=ut(i/60),r.minutes=s%60,o=ut(s/60),r.hours=o%24,t+=ut(o/24),r.days=t%30,n+=ut(t/30),r.months=n%12,u=ut(n/12),r.years=u},weeks:function(){return ut(this.days()/7)},valueOf:function(){return this._milliseconds+this._days*864e5+this._months%12*2592e6+mt(this._months/12)*31536e6},humanize:function(e){var t=+this,n=Jt(t,!e,this.lang());return e&&(n=this.lang().pastFuture(t,n)),this.lang().postformat(n)},add:function(e,n){var r=t.duration(e,n);return this._milliseconds+=r._milliseconds,this._days+=r._days,this._months+=r._months,this._bubble(),this},subtract:function(e,n){var r=t.duration(e,n);return this._milliseconds-=r._milliseconds,this._days-=r._days,this._months-=r._months,this._bubble(),this},get:function(e){return e=pt(e),this[e.toLowerCase()+"s"]()},as:function(e){return e=pt(e),this["as"+e.charAt(0).toUpperCase()+e.slice(1)+"s"]()},lang:t.fn.lang,toIsoString:function(){var e=Math.abs(this.years()),t=Math.abs(this.months()),n=Math.abs(this.days()),r=Math.abs(this.hours()),i=Math.abs(this.minutes()),s=Math.abs(this.seconds()+this.milliseconds()/1e3);return this.asSeconds()?(this.asSeconds()<0?"-":"")+"P"+(e?e+"Y":"")+(t?t+"M":"")+(n?n+"D":"")+(r||i||s?"T":"")+(r?r+"H":"")+(i?i+"M":"")+(s?s+"S":""):"P0D"}});for(o in W)W.hasOwnProperty(o)&&(rn(o,W[o]),nn(o.toLowerCase()));rn("Weeks",6048e5),t.duration.fn.asMonths=function(){return(+this-this.years()*31536e6)/2592e6+this.years()*12},t.lang("en",{ordinal:function(e){var t=e%10,n=mt(e%100/10)===1?"th":t===1?"st":t===2?"nd":t===3?"rd":"th";return e+n}}),m?module.exports=t:typeof define=="function"&&define.amd?(define("moment",["require","exports","module"],function(e,n,s){return s.config&&s.config()&&s.config().noGlobal===!0&&(r.moment=i),t}),sn(!0)):sn()}.call(this),function(e,t){function l(e){return f.PF.compile(e||"nplurals=2; plural=(n != 1);")}function c(e,t){this._key=e,this._i18n=t}var n=Array.prototype,r=Object.prototype,i=n.slice,s=r.hasOwnProperty,o=n.forEach,u={},a={forEach:function(e,t,n){var r,i,a;if(e===null)return;if(o&&e.forEach===o)e.forEach(t,n);else if(e.length===+e.length){for(r=0,i=e.length;r<i;r++)if(r in e&&t.call(n,e[r],r,e)===u)return}else for(a in e)if(s.call(e,a)&&t.call(n,e[a],a,e)===u)return},extend:function(e){return this.forEach(i.call(arguments,1),function(t){for(var n in t)e[n]=t[n]}),e}},f=function(e){this.defaults={locale_data:{messages:{"":{domain:"messages",lang:"en",plural_forms:"nplurals=2; plural=(n != 1);"}}},domain:"messages"},this.options=a.extend({},this.defaults,e),this.textdomain(this.options.domain);if(e.domain&&!this.options.locale_data[this.options.domain])throw new Error("Text domain set to non-existent domain: `"+e.domain+"`")};f.context_delimiter=String.fromCharCode(4),a.extend(c.prototype,{onDomain:function(e){return this._domain=e,this},withContext:function(e){return this._context=e,this},ifPlural:function(e,t){return this._val=e,this._pkey=t,this},fetch:function(e){return{}.toString.call(e)!="[object Array]"&&(e=[].slice.call(arguments)),(e&&e.length?f.sprintf:function(e){return e})(this._i18n.dcnpgettext(this._domain,this._context,this._key,this._pkey,this._val),e)}}),a.extend(f.prototype,{translate:function(e){return new c(e,this)},textdomain:function(e){if(!e)return this._textdomain;this._textdomain=e},gettext:function(e){return this.dcnpgettext.call(this,t,t,e)},dgettext:function(e,n){return this.dcnpgettext.call(this,e,t,n)},dcgettext:function(e,n){return this.dcnpgettext.call(this,e,t,n)},ngettext:function(e,n,r){return this.dcnpgettext.call(this,t,t,e,n,r)},dngettext:function(e,n,r,i){return this.dcnpgettext.call(this,e,t,n,r,i)},dcngettext:function(e,n,r,i){return this.dcnpgettext.call(this,e,t,n,r,i)},pgettext:function(e,n){return this.dcnpgettext.call(this,t,e,n)},dpgettext:function(e,t,n){return this.dcnpgettext.call(this,e,t,n)},dcpgettext:function(e,t,n){return this.dcnpgettext.call(this,e,t,n)},npgettext:function(e,n,r,i){return this.dcnpgettext.call(this,t,e,n,r,i)},dnpgettext:function(e,t,n,r,i){return this.dcnpgettext.call(this,e,t,n,r,i)},dcnpgettext:function(e,t,n,r,i){r=r||n,e=e||this._textdomain,i=typeof i=="undefined"?1:i;var s;if(!this.options)return s=new f,s.dcnpgettext.call(s,undefined,undefined,n,r,i);if(!this.options.locale_data)throw new Error("No locale data provided.");if(!this.options.locale_data[e])throw new Error("Domain `"+e+"` was not found.");if(!this.options.locale_data[e][""])throw new Error("No locale meta information provided.");if(!n)throw new Error("No translation key found.");if(typeof i!="number"){i=parseInt(i,10);if(isNaN(i))throw new Error("The number that was passed in is not a number.")}var o=t?t+f.context_delimiter+n:n,u=this.options.locale_data,a=u[e],c=a[""].plural_forms||(u.messages||this.defaults.locale_data.messages)[""].plural_forms,h=l(c)(i)+1,p,d;if(!a)throw new Error("No domain named `"+e+"` could be found.");return p=a[o],!p||h>=p.length?(this.options.missing_key_callback&&this.options.missing_key_callback(o),d=[null,n,r],d[l(c)(i)+1]):(d=p[h],d?d:(d=[null,n,r],d[l(c)(i)+1]))}});var h=function(){function e(e){return Object.prototype.toString.call(e).slice(8,-1).toLowerCase()}function t(e,t){for(var n=[];t>0;n[--t]=e);return n.join("")}var n=function(){return n.cache.hasOwnProperty(arguments[0])||(n.cache[arguments[0]]=n.parse(arguments[0])),n.format.call(null,n.cache[arguments[0]],arguments)};return n.format=function(n,r){var i=1,s=n.length,o="",u,a=[],f,l,c,p,d,v;for(f=0;f<s;f++){o=e(n[f]);if(o==="string")a.push(n[f]);else if(o==="array"){c=n[f];if(c[2]){u=r[i];for(l=0;l<c[2].length;l++){if(!u.hasOwnProperty(c[2][l]))throw h('[sprintf] property "%s" does not exist',c[2][l]);u=u[c[2][l]]}}else c[1]?u=r[c[1]]:u=r[i++];if(/[^s]/.test(c[8])&&e(u)!="number")throw h("[sprintf] expecting number but found %s",e(u));if(typeof u=="undefined"||u===null)u="";switch(c[8]){case"b":u=u.toString(2);break;case"c":u=String.fromCharCode(u);break;case"d":u=parseInt(u,10);break;case"e":u=c[7]?u.toExponential(c[7]):u.toExponential();break;case"f":u=c[7]?parseFloat(u).toFixed(c[7]):parseFloat(u);break;case"o":u=u.toString(8);break;case"s":u=(u=String(u))&&c[7]?u.substring(0,c[7]):u;break;case"u":u=Math.abs(u);break;case"x":u=u.toString(16);break;case"X":u=u.toString(16).toUpperCase()}u=/[def]/.test(c[8])&&c[3]&&u>=0?"+"+u:u,d=c[4]?c[4]=="0"?"0":c[4].charAt(1):" ",v=c[6]-String(u).length,p=c[6]?t(d,v):"",a.push(c[5]?u+p:p+u)}}return a.join("")},n.cache={},n.parse=function(e){var t=e,n=[],r=[],i=0;while(t){if((n=/^[^\x25]+/.exec(t))!==null)r.push(n[0]);else if((n=/^\x25{2}/.exec(t))!==null)r.push("%");else{if((n=/^\x25(?:([1-9]\d*)\$|\(([^\)]+)\))?(\+)?(0|'[^$])?(-)?(\d+)?(?:\.(\d+))?([b-fosuxX])/.exec(t))===null)throw"[sprintf] huh?";if(n[2]){i|=1;var s=[],o=n[2],u=[];if((u=/^([a-z_][a-z_\d]*)/i.exec(o))===null)throw"[sprintf] huh?";s.push(u[1]);while((o=o.substring(u[0].length))!=="")if((u=/^\.([a-z_][a-z_\d]*)/i.exec(o))!==null)s.push(u[1]);else{if((u=/^\[(\d+)\]/.exec(o))===null)throw"[sprintf] huh?";s.push(u[1])}n[2]=s}else i|=2;if(i===3)throw"[sprintf] mixing positional and named placeholders is not (yet) supported";r.push(n)}t=t.substring(n[0].length)}return r},n}(),p=function(e,t){return t.unshift(e),h.apply(null,t)};f.parse_plural=function(e,t){return e=e.replace(/n/g,t),f.parse_expression(e)},f.sprintf=function(e,t){return{}.toString.call(t)=="[object Array]"?p(e,[].slice.call(t)):h.apply(this,[].slice.call(arguments))},f.prototype.sprintf=function(){return f.sprintf.apply(this,arguments)},f.PF={},f.PF.parse=function(e){var t=f.PF.extractPluralExpr(e);return f.PF.parser.parse.call(f.PF.parser,t)},f.PF.compile=function(e){function t(e){return e===!0?1:e?e:0}var n=f.PF.parse(e);return function(e){return t(f.PF.interpreter(n)(e))}},f.PF.interpreter=function(e){return function(t){var n;switch(e.type){case"GROUP":return f.PF.interpreter(e.expr)(t);case"TERNARY":if(f.PF.interpreter(e.expr)(t))return f.PF.interpreter(e.truthy)(t);return f.PF.interpreter(e.falsey)(t);case"OR":return f.PF.interpreter(e.left)(t)||f.PF.interpreter(e.right)(t);case"AND":return f.PF.interpreter(e.left)(t)&&f.PF.interpreter(e.right)(t);case"LT":return f.PF.interpreter(e.left)(t)<f.PF.interpreter(e.right)(t);case"GT":return f.PF.interpreter(e.left)(t)>f.PF.interpreter(e.right)(t);case"LTE":return f.PF.interpreter(e.left)(t)<=f.PF.interpreter(e.right)(t);case"GTE":return f.PF.interpreter(e.left)(t)>=f.PF.interpreter(e.right)(t);case"EQ":return f.PF.interpreter(e.left)(t)==f.PF.interpreter(e.right)(t);case"NEQ":return f.PF.interpreter(e.left)(t)!=f.PF.interpreter(e.right)(t);case"MOD":return f.PF.interpreter(e.left)(t)%f.PF.interpreter(e.right)(t);case"VAR":return t;case"NUM":return e.val;default:throw new Error("Invalid Token found.")}}},f.PF.extractPluralExpr=function(e){e=e.replace(/^\s\s*/,"").replace(/\s\s*$/,""),/;\s*$/.test(e)||(e=e.concat(";"));var t=/nplurals\=(\d+);/,n=/plural\=(.*);/,r=e.match(t),i={},s;if(r.length>1){i.nplurals=r[1],e=e.replace(t,""),s=e.match(n);if(!(s&&s.length>1))throw new Error("`plural` expression not found: "+e);return s[1]}throw new Error("nplurals not found in plural_forms string: "+e)},f.PF.parser=function(){var e={trace:function(){},yy:{},symbols_:{error:2,expressions:3,e:4,EOF:5,"?":6,":":7,"||":8,"&&":9,"<":10,"<=":11,">":12,">=":13,"!=":14,"==":15,"%":16,"(":17,")":18,n:19,NUMBER:20,$accept:0,$end:1},terminals_:{2:"error",5:"EOF",6:"?",7:":",8:"||",9:"&&",10:"<",11:"<=",12:">",13:">=",14:"!=",15:"==",16:"%",17:"(",18:")",19:"n",20:"NUMBER"},productions_:[0,[3,2],[4,5],[4,3],[4,3],[4,3],[4,3],[4,3],[4,3],[4,3],[4,3],[4,3],[4,3],[4,1],[4,1]],performAction:function(t,n,r,i,s,o,u){var a=o.length-1;switch(s){case 1:return{type:"GROUP",expr:o[a-1]};case 2:this.$={type:"TERNARY",expr:o[a-4],truthy:o[a-2],falsey:o[a]};break;case 3:this.$={type:"OR",left:o[a-2],right:o[a]};break;case 4:this.$={type:"AND",left:o[a-2],right:o[a]};break;case 5:this.$={type:"LT",left:o[a-2],right:o[a]};break;case 6:this.$={type:"LTE",left:o[a-2],right:o[a]};break;case 7:this.$={type:"GT",left:o[a-2],right:o[a]};break;case 8:this.$={type:"GTE",left:o[a-2],right:o[a]};break;case 9:this.$={type:"NEQ",left:o[a-2],right:o[a]};break;case 10:this.$={type:"EQ",left:o[a-2],right:o[a]};break;case 11:this.$={type:"MOD",left:o[a-2],right:o[a]};break;case 12:this.$={type:"GROUP",expr:o[a-1]};break;case 13:this.$={type:"VAR"};break;case 14:this.$={type:"NUM",val:Number(t)}}},table:[{3:1,4:2,17:[1,3],19:[1,4],20:[1,5]},{1:[3]},{5:[1,6],6:[1,7],8:[1,8],9:[1,9],10:[1,10],11:[1,11],12:[1,12],13:[1,13],14:[1,14],15:[1,15],16:[1,16]},{4:17,17:[1,3],19:[1,4],20:[1,5]},{5:[2,13],6:[2,13],7:[2,13],8:[2,13],9:[2,13],10:[2,13],11:[2,13],12:[2,13],13:[2,13],14:[2,13],15:[2,13],16:[2,13],18:[2,13]},{5:[2,14],6:[2,14],7:[2,14],8:[2,14],9:[2,14],10:[2,14],11:[2,14],12:[2,14],13:[2,14],14:[2,14],15:[2,14],16:[2,14],18:[2,14]},{1:[2,1]},{4:18,17:[1,3],19:[1,4],20:[1,5]},{4:19,17:[1,3],19:[1,4],20:[1,5]},{4:20,17:[1,3],19:[1,4],20:[1,5]},{4:21,17:[1,3],19:[1,4],20:[1,5]},{4:22,17:[1,3],19:[1,4],20:[1,5]},{4:23,17:[1,3],19:[1,4],20:[1,5]},{4:24,17:[1,3],19:[1,4],20:[1,5]},{4:25,17:[1,3],19:[1,4],20:[1,5]},{4:26,17:[1,3],19:[1,4],20:[1,5]},{4:27,17:[1,3],19:[1,4],20:[1,5]},{6:[1,7],8:[1,8],9:[1,9],10:[1,10],11:[1,11],12:[1,12],13:[1,13],14:[1,14],15:[1,15],16:[1,16],18:[1,28]},{6:[1,7],7:[1,29],8:[1,8],9:[1,9],10:[1,10],11:[1,11],12:[1,12],13:[1,13],14:[1,14],15:[1,15],16:[1,16]},{5:[2,3],6:[2,3],7:[2,3],8:[2,3],9:[1,9],10:[1,10],11:[1,11],12:[1,12],13:[1,13],14:[1,14],15:[1,15],16:[1,16],18:[2,3]},{5:[2,4],6:[2,4],7:[2,4],8:[2,4],9:[2,4],10:[1,10],11:[1,11],12:[1,12],13:[1,13],14:[1,14],15:[1,15],16:[1,16],18:[2,4]},{5:[2,5],6:[2,5],7:[2,5],8:[2,5],9:[2,5],10:[2,5],11:[2,5],12:[2,5],13:[2,5],14:[2,5],15:[2,5],16:[1,16],18:[2,5]},{5:[2,6],6:[2,6],7:[2,6],8:[2,6],9:[2,6],10:[2,6],11:[2,6],12:[2,6],13:[2,6],14:[2,6],15:[2,6],16:[1,16],18:[2,6]},{5:[2,7],6:[2,7],7:[2,7],8:[2,7],9:[2,7],10:[2,7],11:[2,7],12:[2,7],13:[2,7],14:[2,7],15:[2,7],16:[1,16],18:[2,7]},{5:[2,8],6:[2,8],7:[2,8],8:[2,8],9:[2,8],10:[2,8],11:[2,8],12:[2,8],13:[2,8],14:[2,8],15:[2,8],16:[1,16],18:[2,8]},{5:[2,9],6:[2,9],7:[2,9],8:[2,9],9:[2,9],10:[2,9],11:[2,9],12:[2,9],13:[2,9],14:[2,9],15:[2,9],16:[1,16],18:[2,9]},{5:[2,10],6:[2,10],7:[2,10],8:[2,10],9:[2,10],10:[2,10],11:[2,10],12:[2,10],13:[2,10],14:[2,10],15:[2,10],16:[1,16],18:[2,10]},{5:[2,11],6:[2,11],7:[2,11],8:[2,11],9:[2,11],10:[2,11],11:[2,11],12:[2,11],13:[2,11],14:[2,11],15:[2,11],16:[2,11],18:[2,11]},{5:[2,12],6:[2,12],7:[2,12],8:[2,12],9:[2,12],10:[2,12],11:[2,12],12:[2,12],13:[2,12],14:[2,12],15:[2,12],16:[2,12],18:[2,12]},{4:30,17:[1,3],19:[1,4],20:[1,5]},{5:[2,2],6:[1,7],7:[2,2],8:[1,8],9:[1,9],10:[1,10],11:[1,11],12:[1,12],13:[1,13],14:[1,14],15:[1,15],16:[1,16],18:[2,2]}],defaultActions:{6:[2,1]},parseError:function(t,n){throw new Error(t)},parse:function(t){function d(e){r.length=r.length-2*e,i.length=i.length-e,s.length=s.length-e}function v(){var e;return e=n.lexer.lex()||1,typeof e!="number"&&(e=n.symbols_[e]||e),e}var n=this,r=[0],i=[null],s=[],o=this.table,u="",a=0,f=0,l=0,c=2,h=1;this.lexer.setInput(t),this.lexer.yy=this.yy,this.yy.lexer=this.lexer,typeof this.lexer.yylloc=="undefined"&&(this.lexer.yylloc={});var p=this.lexer.yylloc;s.push(p),typeof this.yy.parseError=="function"&&(this.parseError=this.yy.parseError);var m,g,y,b,w,E,S={},x,T,N,C;for(;;){y=r[r.length-1],this.defaultActions[y]?b=this.defaultActions[y]:(m==null&&(m=v()),b=o[y]&&o[y][m]);if(typeof b=="undefined"||!b.length||!b[0]){if(!l){C=[];for(x in o[y])this.terminals_[x]&&x>2&&C.push("'"+this.terminals_[x]+"'");var k="";this.lexer.showPosition?k="Parse error on line "+(a+1)+":\n"+this.lexer.showPosition()+"\nExpecting "+C.join(", ")+", got '"+this.terminals_[m]+"'":k="Parse error on line "+(a+1)+": Unexpected "+(m==1?"end of input":"'"+(this.terminals_[m]||m)+"'"),this.parseError(k,{text:this.lexer.match,token:this.terminals_[m]||m,line:this.lexer.yylineno,loc:p,expected:C})}if(l==3){if(m==h)throw new Error(k||"Parsing halted.");f=this.lexer.yyleng,u=this.lexer.yytext,a=this.lexer.yylineno,p=this.lexer.yylloc,m=v()}for(;;){if(c.toString()in o[y])break;if(y==0)throw new Error(k||"Parsing halted.");d(1),y=r[r.length-1]}g=m,m=c,y=r[r.length-1],b=o[y]&&o[y][c],l=3}if(b[0]instanceof Array&&b.length>1)throw new Error("Parse Error: multiple actions possible at state: "+y+", token: "+m);switch(b[0]){case 1:r.push(m),i.push(this.lexer.yytext),s.push(this.lexer.yylloc),r.push(b[1]),m=null,g?(m=g,g=null):(f=this.lexer.yyleng,u=this.lexer.yytext,a=this.lexer.yylineno,p=this.lexer.yylloc,l>0&&l--);break;case 2:T=this.productions_[b[1]][1],S.$=i[i.length-T],S._$={first_line:s[s.length-(T||1)].first_line,last_line:s[s.length-1].last_line,first_column:s[s.length-(T||1)].first_column,last_column:s[s.length-1].last_column},E=this.performAction.call(S,u,f,a,this.yy,b[1],i,s);if(typeof E!="undefined")return E;T&&(r=r.slice(0,-1*T*2),i=i.slice(0,-1*T),s=s.slice(0,-1*T)),r.push(this.productions_[b[1]][0]),i.push(S.$),s.push(S._$),N=o[r[r.length-2]][r[r.length-1]],r.push(N);break;case 3:return!0}}return!0}},t=function(){var e={EOF:1,parseError:function(t,n){if(!this.yy.parseError)throw new Error(t);this.yy.parseError(t,n)},setInput:function(e){return this._input=e,this._more=this._less=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this},input:function(){var e=this._input[0];this.yytext+=e,this.yyleng++,this.match+=e,this.matched+=e;var t=e.match(/\n/);return t&&this.yylineno++,this._input=this._input.slice(1),e},unput:function(e){return this._input=e+this._input,this},more:function(){return this._more=!0,this},pastInput:function(){var e=this.matched.substr(0,this.matched.length-this.match.length);return(e.length>20?"...":"")+e.substr(-20).replace(/\n/g,"")},upcomingInput:function(){var e=this.match;return e.length<20&&(e+=this._input.substr(0,20-e.length)),(e.substr(0,20)+(e.length>20?"...":"")).replace(/\n/g,"")},showPosition:function(){var e=this.pastInput(),t=(new Array(e.length+1)).join("-");return e+this.upcomingInput()+"\n"+t+"^"},next:function(){if(this.done)return this.EOF;this._input||(this.done=!0);var e,t,n,r;this._more||(this.yytext="",this.match="");var i=this._currentRules();for(var s=0;s<i.length;s++){t=this._input.match(this.rules[i[s]]);if(t){r=t[0].match(/\n.*/g),r&&(this.yylineno+=r.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:r?r[r.length-1].length-1:this.yylloc.last_column+t[0].length},this.yytext+=t[0],this.match+=t[0],this.matches=t,this.yyleng=this.yytext.length,this._more=!1,this._input=this._input.slice(t[0].length),this.matched+=t[0],e=this.performAction.call(this,this.yy,this,i[s],this.conditionStack[this.conditionStack.length-1]);if(e)return e;return}}if(this._input==="")return this.EOF;this.parseError("Lexical error on line "+(this.yylineno+1)+". Unrecognized text.\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},lex:function(){var t=this.next();return typeof t!="undefined"?t:this.lex()},begin:function(t){this.conditionStack.push(t)},popState:function(){return this.conditionStack.pop()},_currentRules:function(){return this.conditions[this.conditionStack[this.conditionStack.length-1]].rules},topState:function(){return this.conditionStack[this.conditionStack.length-2]},pushState:function(t){this.begin(t)}};return e.performAction=function(t,n,r,i){var s=i;switch(r){case 0:break;case 1:return 20;case 2:return 19;case 3:return 8;case 4:return 9;case 5:return 6;case 6:return 7;case 7:return 11;case 8:return 13;case 9:return 10;case 10:return 12;case 11:return 14;case 12:return 15;case 13:return 16;case 14:return 17;case 15:return 18;case 16:return 5;case 17:return"INVALID"}},e.rules=[/^\s+/,/^[0-9]+(\.[0-9]+)?\b/,/^n\b/,/^\|\|/,/^&&/,/^\?/,/^:/,/^<=/,/^>=/,/^</,/^>/,/^!=/,/^==/,/^%/,/^\(/,/^\)/,/^$/,/^./],e.conditions={INITIAL:{rules:[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17],inclusive:!0}},e}();return e.lexer=t,e}(),typeof exports!="undefined"?(typeof module!="undefined"&&module.exports&&(exports=module.exports=f),exports.Jed=f):(typeof define=="function"&&define.amd&&define("jed",[],function(){return f}),e.Jed=f)}(this),function(e,t){var n={domain:"converse",locale_data:{converse:{"":{"Project-Id-Version":"Converse.js 0.4","Report-Msgid-Bugs-To":"","POT-Creation-Date":"2013-09-15 21:55+0200","PO-Revision-Date":"2013-09-15 21:56+0200","Last-Translator":"JC Brand <jc@opkode.com>","Language-Team":"Afrikaans",Language:"af","MIME-Version":"1.0","Content-Type":"text/plain; charset=UTF-8","Content-Transfer-Encoding":"8bit",domain:"converse",lang:"af",plural_forms:"nplurals=2; plural=(n != 1);"},unencrypted:[null,"nie-privaat"],unverified:[null,"ongeverifieer"],verified:[null,"privaat"],finished:[null,"afgesluit"],Disconnected:[null,"Verbindung onderbreek"],Error:[null,"Fout"],Connecting:[null,"Verbind tans"],"Connection Failed":[null,"Verbinding het gefaal"],Authenticating:[null,"Besig om te bekragtig"],"Authentication Failed":[null,"Bekragtiging het gefaal"],Disconnecting:[null,"Onderbreek verbinding"],"Re-establishing encrypted session":[null,"Herstel versleutelde sessie"],"Your browser needs to generate a private key, which will be used in your encrypted chat session. This can take up to 30 seconds during which your browser might freeze and become unresponsive.":[null,"Die webblaaier moet 'n private sleutel vir die versleutelde klets-sessie genereer. Dit kan tot 30 sekondes duur, waartydenѕ die webblaaier mag vries en nie reageer nie."],"Private key generated.":[null,"Private sleutel"],"Authentication request from %1$s\n\nYour buddy is attempting to verify your identity, by asking you the question below.\n\n%2$s":[null,"Verifikasie versoek van %1$s\n\nU gespreksmaat probeer om u identiteit te verifieer, deur die volgende vraag te vra \n\n%2$s"],"Could not verify this user's identify.":[null,"Kon nie hierdie gebruiker se identitied verifieer nie."],"Personal message":[null,"Persoonlike boodskap"],"Start encrypted conversation":[null,"Begin versleutelde gesprek"],"Refresh encrypted conversation":[null,"Verfris versleutelde gesprek"],"End encrypted conversation":[null,"Beëindig versleutelde gesprek"],"Verify with SMP":[null,"Verifieer met SMP"],"Verify with fingerprints":[null,"Verifieer met vingerafdrukke"],"What's this?":[null,"Wat is hierdie?"],me:[null,"ek"],"Show this menu":[null,"Vertoon hierdie keuselys"],"Write in the third person":[null,"Skryf in die derde persoon"],"Remove messages":[null,"Verwyder boodskappe"],"Your message could not be sent":[null,"U boodskap kon nie gestuur word nie"],"We received an unencrypted message":[null,"Ons het 'n onversleutelde boodskap ontvang"],"We received an unreadable encrypted message":[null,"Ons het 'n onleesbare versleutelde boodskap ontvang"],"This user has requested an encrypted session.":[null,"Hierdie gebruiker versoek 'n versleutelde sessie"],"Here are the fingerprints, please confirm them with %1$s, outside of this chat.\n\nFingerprint for you, %2$s: %3$s\n\nFingerprint for %1$s: %4$s\n\nIf you have confirmed that the fingerprints match, click OK, otherwise click Cancel.":[null,"Hier is die vingerafdrukke, bevestig hulle met %1$s, buite hierdie kletskanaal \n\nU vingerafdruk, %2$s: %3$s\n\nVingerafdruk vir %1$s: %4$s\n\nIndien u die vingerafdrukke bevestig het, klik OK, andersinds klik Kanselleer"],"You will be prompted to provide a security question and then an answer to that question.\n\nYour buddy will then be prompted the same question and if they type the exact same answer (case sensitive), their identity will have been verified.":[null,"Daar sal van u verwag word om 'n sekuriteitsvraag te stel, en dan ook die antwoord tot daardie vraag te verskaf.\n\nU gespreksmaat sal dan daardie vraag gestel word, en indien hulle presies dieselfde antwoord (hoofletters tel) verskaf, sal hul identiteit geverifieer wees."],"What is your security question?":[null,"Wat is u sekuriteitsvraag?"],"What is the answer to the security question?":[null,"Wat is die antwoord tot die sekuriteitsvraag?"],"Invalid authentication scheme provided":[null,"Ongeldige verifikasiemetode verskaf"],"Your messages are not encrypted anymore":[null,"U boodskappe is nie meer versleutel nie"],"Your messages are now encrypted but your buddy's identity has not been verified.":[null,"U boodskappe is now versleutel maar u gespreksmaat se identiteit is nog onseker."],"Your buddy's identify has been verified.":[null,"U gespreksmaat se identiteit is geverifieer."],"Your buddy has ended encryption on their end, you should do the same.":[null,"U gespreksmaat het versleuteling gestaak, u behoort nou dieselfde te doen."],"Your messages are not encrypted. Click here to enable OTR encryption.":[null,"U boodskappe is nie versleutel nie. Klik hier om OTR versleuteling te aktiveer."],"Your messages are encrypted, but your buddy has not been verified.":[null,"U boodskappe is versleutel, maar u gespreksmaat se identiteit is not onseker."],"Your messages are encrypted and your buddy verified.":[null,"U boodskappe is versleutel en u gespreksmaat se identiteit geverifieer."],"Your buddy has closed their end of the private session, you should do the same":[null,"U gespreksmaat het die private sessie gestaak. U behoort dieselfde te doen"],Contacts:[null,"Kontakte"],Online:[null,"Aangemeld"],Busy:[null,"Besig"],Away:[null,"Afwesig"],Offline:[null,"Afgemeld"],"Click to add new chat contacts":[null,"Kliek om nuwe kletskontakte by te voeg"],"Add a contact":[null,"Voeg 'n kontak by"],"Contact username":[null,"Konak gebruikersnaam"],Add:[null,"Voeg by"],"Contact name":[null,"Kontaknaam"],Search:[null,"Soek"],"No users found":[null,"Geen gebruikers gevind"],"Click to add as a chat contact":[null,"Kliek om as kletskontak by te voeg"],"Click to open this room":[null,"Kliek om hierdie kletskamer te open"],"Show more information on this room":[null,"Wys meer inligting aangaande hierdie kletskamer"],"Description:":[null,"Beskrywing:"],"Occupants:":[null,"Deelnemers:"],"Features:":[null,"Eienskappe:"],"Requires authentication":[null,"Benodig magtiging"],Hidden:[null,"Verskuil"],"Requires an invitation":[null,"Benodig 'n uitnodiging"],Moderated:[null,"Gemodereer"],"Non-anonymous":[null,"Nie-anoniem"],"Open room":[null,"Oop kletskamer"],"Permanent room":[null,"Permanente kamer"],Public:[null,"Publiek"],"Semi-anonymous":[null,"Deels anoniem"],"Temporary room":[null,"Tydelike kamer"],Unmoderated:[null,"Ongemodereer"],Rooms:[null,"Kamers"],"Room name":[null,"Kamer naam"],Nickname:[null,"Bynaam"],Server:[null,"Bediener"],Join:[null,"Sluit aan"],"Show rooms":[null,"Wys kamers"],"No rooms on %1$s":[null,"Geen kamers op %1$s"],"Rooms on %1$s":[null,"Kamers op %1$s"],"Set chatroom topic":[null,"Stel kletskamer onderwerp"],"Kick user from chatroom":[null,"Skop gebruiker uit die kletskamer"],"Ban user from chatroom":[null,"Verban gebruiker vanuit die kletskamer"],Message:[null,"Boodskap"],Save:[null,"Stoor"],Cancel:[null,"Kanseleer"],"An error occurred while trying to save the form.":[null,"A fout het voorgekom terwyl probeer is om die vorm te stoor."],"This chatroom requires a password":[null,"Hiedie kletskamer benodig 'n wagwoord"],"Password: ":[null,"Wagwoord:"],Submit:[null,"Dien in"],"This room is not anonymous":[null,"Hierdie vertrek is nie anoniem nie"],"This room now shows unavailable members":[null,"Hierdie vertrek wys nou onbeskikbare lede"],"This room does not show unavailable members":[null,"Hierdie vertrek wys nie onbeskikbare lede nie"],"Non-privacy-related room configuration has changed":[null,"Nie-privaatheidverwante kamer instellings het verander"],"Room logging is now enabled":[null,"Kamer log is nou aangeskakel"],"Room logging is now disabled":[null,"Kamer log is nou afgeskakel"],"This room is now non-anonymous":[null,"Hiedie kamer is nou nie anoniem nie"],"This room is now semi-anonymous":[null,"Hierdie kamer is nou gedeeltelik anoniem"],"This room is now fully-anonymous":[null,"Hierdie kamer is nou ten volle anoniem"],"A new room has been created":[null,"'n Nuwe kamer is geskep"],"Your nickname has been changed":[null,"Jou bynaam is verander"],"<strong>%1$s</strong> has been banned":[null,"<strong>%1$s</strong> is verban"],"<strong>%1$s</strong> has been kicked out":[null,"<strong>%1$s</strong> is uitgeskop"],"<strong>%1$s</strong> has been removed because of an affiliation change":[null,"<strong>%1$s</strong> is verwyder a.g.v 'n verandering van affiliasie"],"<strong>%1$s</strong> has been removed for not being a member":[null,"<strong>%1$s</strong> is nie 'n lid nie, en dus verwyder"],"You have been banned from this room":[null,"Jy is uit die kamer verban"],"You have been kicked from this room":[null,"Jy is uit die kamer geskop"],"You have been removed from this room because of an affiliation change":[null,"Jy is vanuit die kamer verwyder a.g.v 'n verandering van affiliasie"],"You have been removed from this room because the room has changed to members-only and you're not a member":[null,"Jy is vanuit die kamer verwyder omdat die kamer nou slegs tot lede beperk word en jy nie 'n lid is nie."],"You have been removed from this room because the MUC (Multi-user chat) service is being shut down.":[null,"Jy is van hierdie kamer verwyder aangesien die MUC (Multi-user chat) diens nou afgeskakel word."],"You are not on the member list of this room":[null,"Jy is nie op die ledelys van hierdie kamer nie"],"No nickname was specified":[null,"Geen bynaam verskaf nie"],"You are not allowed to create new rooms":[null,"Jy word nie toegelaat om nog kamers te skep nie"],"Your nickname doesn't conform to this room's policies":[null,"Jou bynaam voldoen nie aan die kamer se beleid nie"],"Your nickname is already taken":[null,"Jou bynaam is reeds geneem"],"This room does not (yet) exist":[null,"Hierdie kamer bestaan tans (nog) nie"],"This room has reached it's maximum number of occupants":[null,"Hierdie kamer het sy maksimum aantal deelnemers bereik"],"Topic set by %1$s to: %2$s":[null,"Onderwerp deur %1$s bygewerk na: %2$s"],"This user is a moderator":[null,"Hierdie gebruiker is 'n moderator"],"This user can send messages in this room":[null,"Hierdie gebruiker kan boodskappe na die kamer stuur"],"This user can NOT send messages in this room":[null,"Hierdie gebruiker kan NIE boodskappe na die kamer stuur nie"],"Click to chat with this contact":[null,"Kliek om met hierdie kontak te klets"],"Click to remove this contact":[null,"Kliek om hierdie kontak te verwyder"],"This contact is busy":[null,"Hierdie persoon is besig"],"This contact is online":[null,"Hierdie persoon is aanlyn"],"This contact is offline":[null,"Hierdie persoon is aflyn"],"This contact is unavailable":[null,"Hierdie persoon is onbeskikbaar"],"This contact is away for an extended period":[null,"Hierdie persoon is vir lank afwesig"],"This contact is away":[null,"Hierdie persoon is afwesig"],"Contact requests":[null,"Kontak versoeke"],"My contacts":[null,"My kontakte"],"Pending contacts":[null,"Hangende kontakte"],"Custom status":[null,"Doelgemaakte status"],"Click to change your chat status":[null,"Kliek om jou klets-status te verander"],"Click here to write a custom status message":[null,"Kliek hier om jou eie statusboodskap te skryf"],online:[null,"aangemeld"],busy:[null,"besig"],"away for long":[null,"vir lank afwesig"],away:[null,"afwesig"],"I am %1$s":[null,"Ek is %1$s"],"Sign in":[null,"Teken in"],"XMPP/Jabber Username:":[null,"XMPP/Jabber Gebruikersnaam:"],"Password:":[null,"Wagwoord"],"Log In":[null,"Meld aan"],"BOSH Service URL:":[null,"BOSH bediener URL"],"Online Contacts":[null,"Kontakte aangemeld"],Connected:[null,"Verbind"],Attached:[null,"Geheg"]}}};typeof define=="function"&&define.amd?define("af",["jed"],function(){return t(new Jed(n))}):(window.locales||(window.locales={}),window.locales.af=t(new Jed(n)))}(this,function(e){return e}),function(e,t){var n={domain:"converse",locale_data:{converse:{"":{"Project-Id-Version":"Converse.js 0.4","Report-Msgid-Bugs-To":"","POT-Creation-Date":"2013-09-15 21:55+0200","PO-Revision-Date":"2013-09-15 22:03+0200","Last-Translator":"JC Brand <jc@opkode.com>","Language-Team":"German",Language:"de","MIME-Version":"1.0","Content-Type":"text/plain; charset=UTF-8","Content-Transfer-Encoding":"8bit","Plural-Forms":"nplurals=2; plural=(n != 1);",domain:"converse",lang:"de",plural_forms:"nplurals=2; plural=(n != 1);"},unencrypted:[null,""],unverified:[null,""],verified:[null,""],finished:[null,""],Disconnected:[null,"Verbindung unterbrochen."],Error:[null,"Fehler"],Connecting:[null,"Verbindungsaufbau "],"Connection Failed":[null,"Entfernte Verbindung fehlgeschlagen"],Authenticating:[null,"Authentifizierung"],"Authentication Failed":[null,"Authentifizierung gescheitert"],Disconnecting:[null,"Trenne Verbindung"],"Re-establishing encrypted session":[null,""],"Your browser needs to generate a private key, which will be used in your encrypted chat session. This can take up to 30 seconds during which your browser might freeze and become unresponsive.":[null,""],"Private key generated.":[null,""],"Authentication request from %1$s\n\nYour buddy is attempting to verify your identity, by asking you the question below.\n\n%2$s":[null,""],"Could not verify this user's identify.":[null,""],"Personal message":[null,"Persönliche Nachricht"],"Start encrypted conversation":[null,""],"Refresh encrypted conversation":[null,""],"End encrypted conversation":[null,""],"Verify with SMP":[null,""],"Verify with fingerprints":[null,""],"What's this?":[null,""],me:[null,"Ich"],"Show this menu":[null,"Dieses Menü anzeigen"],"Write in the third person":[null,"In der dritten Person schreiben"],"Remove messages":[null,"Nachrichten entfernen"],"Your message could not be sent":[null,""],"We received an unencrypted message":[null,""],"We received an unreadable encrypted message":[null,""],"This user has requested an encrypted session.":[null,""],"Here are the fingerprints, please confirm them with %1$s, outside of this chat.\n\nFingerprint for you, %2$s: %3$s\n\nFingerprint for %1$s: %4$s\n\nIf you have confirmed that the fingerprints match, click OK, otherwise click Cancel.":[null,""],"You will be prompted to provide a security question and then an answer to that question.\n\nYour buddy will then be prompted the same question and if they type the exact same answer (case sensitive), their identity will have been verified.":[null,""],"What is your security question?":[null,""],"What is the answer to the security question?":[null,""],"Invalid authentication scheme provided":[null,""],"Your messages are not encrypted anymore":[null,""],"Your messages are now encrypted but your buddy's identity has not been verified.":[null,""],"Your buddy's identify has been verified.":[null,""],"Your buddy has ended encryption on their end, you should do the same.":[null,""],"Your messages are not encrypted. Click here to enable OTR encryption.":[null,""],"Your messages are encrypted, but your buddy has not been verified.":[null,""],"Your messages are encrypted and your buddy verified.":[null,""],"Your buddy has closed their end of the private session, you should do the same":[null,""],Contacts:[null,"Kontakte"],Online:[null,"Online"],Busy:[null,"Beschäfticht"],Away:[null,"Abwesend"],Offline:[null,"Abgemeldet"],"Click to add new chat contacts":[null,"Klicken Sie, um einen neuen Kontakt hinzuzufügen"],"Add a contact":[null,"Kontakte hinzufügen"],"Contact username":[null,"Benutzername"],Add:[null,"Hinzufügen"],"Contact name":[null,"Name des Kontakts"],Search:[null,"Suche"],"No users found":[null,"Keine Benutzer gefunden"],"Click to add as a chat contact":[null,"Hier klicken um als Kontakt hinzuzufügen"],"Click to open this room":[null,"Hier klicken um diesen Raum zu öffnen"],"Show more information on this room":[null,"Mehr Information über diesen Raum zeigen"],"Description:":[null,"Beschreibung"],"Occupants:":[null,"Teilnehmer"],"Features:":[null,"Funktionen:"],"Requires authentication":[null,"Authentifizierung erforderlich"],Hidden:[null,"Versteckt"],"Requires an invitation":[null,"Einladung erforderlich"],Moderated:[null,"Moderiert"],"Non-anonymous":[null,"Nicht anonym"],"Open room":[null,"Offener Raum"],"Permanent room":[null,"Dauerhafter Raum"],Public:[null,"Öffentlich"],"Semi-anonymous":[null,"Teils anonym"],"Temporary room":[null,"Vorübergehender Raum"],Unmoderated:[null,"Unmoderiert"],Rooms:[null,"Räume"],"Room name":[null,"Raumname"],Nickname:[null,"Spitzname"],Server:[null,"Server"],Join:[null,"Beitreten"],"Show rooms":[null,"Räume anzeigen"],"No rooms on %1$s":[null,"Keine Räume auf %1$s"],"Rooms on %1$s":[null,"Räume auf %1$s"],"Set chatroom topic":[null,"Chatraum Thema festlegen"],"Kick user from chatroom":[null,"Werfe einen Benutzer aus dem Raum."],"Ban user from chatroom":[null,"Verbanne einen Benutzer aus dem Raum."],Message:[null,"Nachricht"],Save:[null,"Speichern"],Cancel:[null,"Abbrechen"],"An error occurred while trying to save the form.":[null,"Beim Speichern der Formular is ein Fehler aufgetreten."],"This chatroom requires a password":[null,"Passwort wird für die Anmeldung benötigt."],"Password: ":[null,"Passwort: "],Submit:[null,"Einreichen"],"This room is not anonymous":[null,"Dieser Raum ist nicht anonym"],"This room now shows unavailable members":[null,"Dieser Raum zeigt jetzt unferfügbare Mitglieder"],"This room does not show unavailable members":[null,"Dieser Raum zeigt nicht unverfügbare Mitglieder"],"Non-privacy-related room configuration has changed":[null,"Die Konfiguration, die nicht auf die Privatsphäre bezogen ist, hat sich geändert"],"Room logging is now enabled":[null,"Zukünftige Nachrichten dieses Raums werden protokolliert."],"Room logging is now disabled":[null,"Zukünftige Nachrichten dieses Raums werden nicht protokolliert."],"This room is now non-anonymous":[null,"Dieser Raum ist jetzt nicht anonym"],"This room is now semi-anonymous":[null,"Dieser Raum ist jetzt teils anonym"],"This room is now fully-anonymous":[null,"Dieser Raum ist jetzt anonym"],"A new room has been created":[null,"Einen neuen Raum ist erstellen"],"Your nickname has been changed":[null,"Spitzname festgelegen"],"<strong>%1$s</strong> has been banned":[null,"<strong>%1$s</strong> ist verbannt"],"<strong>%1$s</strong> has been kicked out":[null,"<strong>%1$s</strong> ist hinausgeworfen"],"<strong>%1$s</strong> has been removed because of an affiliation change":[null,"<strong>%1$s</strong> wurde wegen einer Zugehörigkeitsänderung entfernt"],"<strong>%1$s</strong> has been removed for not being a member":[null,"<strong>%1$s</strong> ist kein Mitglied und wurde daher entfernt"],"You have been banned from this room":[null,"Sie sind aus diesem Raum verbannt worden"],"You have been kicked from this room":[null,"Sie wurden aus diesem Raum hinausgeworfen"],"You have been removed from this room because of an affiliation change":[null,"Sie wurden wegen einer Zugehörigkeitsänderung entfernt"],"You have been removed from this room because the room has changed to members-only and you're not a member":[null,"Sie wurden aus diesem Raum entfernt da Sie kein Mitglied sind."],"You have been removed from this room because the MUC (Multi-user chat) service is being shut down.":[null,"Sie werden aus diesem Raum entfernt da der MUC (Muli-user chat) Dienst gerade abgeschalten wird."],"You are not on the member list of this room":[null,"Sie sind nicht auf der Mitgliederliste dieses Raums"],"No nickname was specified":[null,"Kein Spitzname festgelegt"],"You are not allowed to create new rooms":[null,"Es ist Ihnen nicht erlaubt, neue Räume anzulegen"],"Your nickname doesn't conform to this room's policies":[null,"Ungültiger Spitzname"],"Your nickname is already taken":[null,"Ihre Spitzname existiert bereits."],"This room does not (yet) exist":[null,"Dieser Raum existiert (noch) nicht"],"This room has reached it's maximum number of occupants":[null,"Dieser Raum hat die maximale Mitgliederanzahl erreicht"],"Topic set by %1$s to: %2$s":[null,'%1$s hat das Thema zu "%2$s" abgeändert'],"This user is a moderator":[null,"Dieser Benutzer ist ein Moderator"],"This user can send messages in this room":[null,"Dieser Benutzer kann Nachrichten in diesem Raum verschicken"],"This user can NOT send messages in this room":[null,"Dieser Benutzer kann keine Nachrichten in diesem Raum verschicken"],"Click to chat with this contact":[null,"Hier klicken um mit diesem Kontakt zu chatten"],"Click to remove this contact":[null,"Hier klicken um diesen Kontakt zu entfernen"],"This contact is busy":[null,"Dieser Kontakt ist beschäfticht"],"This contact is online":[null,"Dieser Kontakt ist online"],"This contact is offline":[null,"Dieser Kontakt ist offline"],"This contact is unavailable":[null,"Dieser Kontakt ist nicht verfügbar"],"This contact is away for an extended period":[null,"Dieser Kontakt is für längere Zeit abwesend"],"This contact is away":[null,"Dieser Kontakt ist abwesend"],"Contact requests":[null,"Kontaktanfragen"],"My contacts":[null,"Meine Kontakte"],"Pending contacts":[null,"Unbestätigte Kontakte"],"Custom status":[null,"Status-Nachricht"],"Click to change your chat status":[null,"Klicken Sie, um ihrer Status to ändern"],"Click here to write a custom status message":[null,"Klicken Sie hier, um ihrer Status-Nachricht to ändern"],online:[null,"online"],busy:[null,"beschäfticht"],"away for long":[null,"länger abwesend"],away:[null,"abwesend"],"I am %1$s":[null,"Ich bin %1$s"],"Sign in":[null,"Anmelden"],"XMPP/Jabber Username:":[null,"XMPP/Jabber Benutzername"],"Password:":[null,"Passwort:"],"Log In":[null,"Anmelden"],"BOSH Service URL:":[null,"BOSH "],"Online Contacts":[null,"Online-Kontakte"],"%1$s is typing":[null,"%1$s tippt"],Connected:[null,"Verbunden"],Attached:[null,"Angehängt"]}}};typeof define=="function"&&define.amd?define("de",["jed"],function(){return t(new Jed(n))}):(window.locales||(window.locales={}),window.locales.de=t(new Jed(n)))}(this,function(e){return e}),function(e,t){var n={domain:"converse",locale_data:{converse:{"":{domain:"converse",lang:"en",plural_forms:"nplurals=2; plural=(n != 1);"}}}};typeof define=="function"&&define.amd?define("en",["jed"],function(){return t(new Jed(n))}):(window.locales||(window.locales={}),window.locales.en=t(new Jed(n)))}(this,function(e){return e}),function(e,t){var n={domain:"converse",locale_data:{converse:{"":{"Project-Id-Version":"Converse.js 0.4","Report-Msgid-Bugs-To":"","POT-Creation-Date":"2013-09-15 21:55+0200","PO-Revision-Date":"2013-09-15 21:59+0200","Last-Translator":"Javier Lopez <m@javier.io>","Language-Team":"ES <LL@li.org>",Language:"es","MIME-Version":"1.0","Content-Type":"text/plain; charset=UTF-8","Content-Transfer-Encoding":"8bit","Plural-Forms":"nplurals=2; plural=(n != 1);",plural_forms:"nplurals=2; plural=(n != 1);",lang:"es","Language-Code":"es","Language-Name":"Español","Preferred-Encodings":"utf-8 latin1",Domain:"converse",domain:"converse","X-Is-Fallback-For":"es-ar es-bo es-cl es-co es-cr es-do es-ec es-es es-sv es-gt es-hn es-mx es-ni es-pa es-py es-pe es-pr es-us es-uy es-ve"},unencrypted:[null,"texto plano"],unverified:[null,"sin verificar"],verified:[null,"verificado"],finished:[null,"finalizado"],Disconnected:[null,"Desconectado"],Error:[null,"Error"],Connecting:[null,"Conectando"],"Connection Failed":[null,"La conexión falló"],Authenticating:[null,"Autenticando"],"Authentication Failed":[null,"La autenticación falló"],Disconnecting:[null,"Desconectando"],"Re-establishing encrypted session":[null,"Re-estableciendo sesión cifrada"],"Your browser needs to generate a private key, which will be used in your encrypted chat session. This can take up to 30 seconds during which your browser might freeze and become unresponsive.":[null,"Su navegador generará una llave privada para usarse en la sesión cifrada. Esto puede tomar hasta 30 segundo, durante este tiempo su navegador puede dejar de responder."],"Private key generated.":[null,"Llave privada generada"],"Authentication request from %1$s\n\nYour buddy is attempting to verify your identity, by asking you the question below.\n\n%2$s":[null,"Petición de autenticación de %1$s\n\nSu contacto intenta verificar su identidad haciendo la siguiente pregunta.\n\n%2$s"],"Could not verify this user's identify.":[null,"No se pudo verificar la identidad de este usuario"],"Personal message":[null,"Mensaje personal"],"Start encrypted conversation":[null,"Iniciar sesión cifrada"],"Refresh encrypted conversation":[null,"Actualizar sesión cifrada"],"End encrypted conversation":[null,"Finalizar sesión cifrada"],"Verify with SMP":[null,"Verificar con SMP"],"Verify with fingerprints":[null,"Verificar con identificadores"],"What's this?":[null,"¿Qué es esto?"],me:[null,"yo"],"Show this menu":[null,"Mostrar este menú"],"Write in the third person":[null,"Escribir en tercera persona"],"Remove messages":[null,"Eliminar mensajes"],"Your message could not be sent":[null,"Su mensaje no se pudo enviar"],"We received an unencrypted message":[null,"Se recibío un mensaje sin cifrar"],"We received an unreadable encrypted message":[null,"Se recibío un mensaje cifrado corrupto"],"This user has requested an encrypted session.":[null,"El usuario ha solicitado una sesión cifrada"],"Here are the fingerprints, please confirm them with %1$s, outside of this chat.\n\nFingerprint for you, %2$s: %3$s\n\nFingerprint for %1$s: %4$s\n\nIf you have confirmed that the fingerprints match, click OK, otherwise click Cancel.":[null,"Por favor confirme los identificadores de %1$s fuera de este chat\n\n. Su identificador es, %2$s: %3$s\n\n. El identificador de %1$s es: %4$s\n\n. Después de confirmar los identificadores haga click en OK, cancele si no concuerdan."],"You will be prompted to provide a security question and then an answer to that question.\n\nYour buddy will then be prompted the same question and if they type the exact same answer (case sensitive), their identity will have been verified.":[null,"Se le solicitará una pregunta de seguridad.\n\n. La pregunta que responda se le hará a su contacto, si las respuestas concuerdan (cuidando mayúsculas/minúsculas) su identidad quedará verificada."],"What is your security question?":[null,"Introduzca su pregunta de seguridad"],"What is the answer to the security question?":[null,"Introduzca la respuesta a su pregunta de seguridad"],"Invalid authentication scheme provided":[null,"Esquema de autenticación inválido"],"Your messages are not encrypted anymore":[null,"Sus mensajes han dejado de cifrarse"],"Your messages are now encrypted but your buddy's identity has not been verified.":[null,"Sus mensajes están ahora cifrados pero la identidad de su contacto no ha sido verificada"],"Your buddy's identify has been verified.":[null,"La identidad de su contacto ha sido confirmada"],"Your buddy has ended encryption on their end, you should do the same.":[null,"Su contacto finalizó la sesión cifrada, debería hacer lo mismo"],"Your messages are not encrypted. Click here to enable OTR encryption.":[null,"Sus mensajes no están cifrados. Haga click aquí para habilitar el cifrado OTR"],"Your messages are encrypted, but your buddy has not been verified.":[null,"Sus mensajes están cifrados pero la identidad de su contacto no ha sido verificada"],"Your messages are encrypted and your buddy verified.":[null,"Sus mensajes están cifrados y su contacto ha sido verificado"],"Your buddy has closed their end of the private session, you should do the same":[null,"Su contacto finalizó la sesión cifrada, debería hacer lo mismo"],Contacts:[null,"Contactos"],Online:[null,"En linea"],Busy:[null,"Ocupado"],Away:[null,"Ausente"],Offline:[null,"Desconectado"],"Click to add new chat contacts":[null,"Haga click para agregar nuevos contactos al chat"],"Add a contact":[null,"Agregar un contacto"],"Contact username":[null,"Nombre de usuario de contacto"],Add:[null,"Agregar"],"Contact name":[null,"Nombre de contacto"],Search:[null,"Búsqueda"],"No users found":[null,"Sin usuarios encontrados"],"Click to add as a chat contact":[null,"Haga click para agregar como contacto de chat"],"Click to open this room":[null,"Haga click para abrir esta sala"],"Show more information on this room":[null,"Mostrar más información en esta sala"],"Description:":[null,"Descripción"],"Occupants:":[null,"Ocupantes:"],"Features:":[null,"Características:"],"Requires authentication":[null,"Autenticación requerida"],Hidden:[null,"Oculto"],"Requires an invitation":[null,"Requiere una invitación"],Moderated:[null,"Moderado"],"Non-anonymous":[null,"No anónimo"],"Open room":[null,"Abrir sala"],"Permanent room":[null,"Sala permanente"],Public:[null,"Publico"],"Semi-anonymous":[null,"Semi anónimo"],"Temporary room":[null,"Sala temporal"],Unmoderated:[null,"Sin moderar"],Rooms:[null,"Salas"],"Room name":[null,"Nombre de sala"],Nickname:[null,"Apodo"],Server:[null,"Servidor"],Join:[null,"Unirse"],"Show rooms":[null,"Mostrar salas"],"No rooms on %1$s":[null,"Sin salas en %1$s"],"Rooms on %1$s":[null,"Salas en %1$s"],"Set chatroom topic":[null,"Definir tema de sala de chat"],"Kick user from chatroom":[null,"Expulsar usuario de sala de chat."],"Ban user from chatroom":[null,"Bloquear usuario de sala de chat."],Message:[null,"Mensaje"],Save:[null,"Guardar"],Cancel:[null,"Cancelar"],"An error occurred while trying to save the form.":[null,"Un error ocurrío mientras se guardaba el formulario."],"This chatroom requires a password":[null,"Esta sala de chat requiere una contraseña."],"Password: ":[null,"Contraseña: "],Submit:[null,"Enviar"],"This room is not anonymous":[null,"Esta sala no es para usuarios anónimos"],"This room now shows unavailable members":[null,"Esta sala ahora muestra los miembros no disponibles"],"This room does not show unavailable members":[null,"Esta sala no muestra los miembros no disponibles"],"Non-privacy-related room configuration has changed":[null,"Una configuración de la sala no relacionada con la privacidad ha sido cambiada"],"Room logging is now enabled":[null,"El registro de la sala ahora está habilitado"],"Room logging is now disabled":[null,"El registro de la sala ahora está deshabilitado"],"This room is now non-anonymous":[null,"Esta sala ahora es pública"],"This room is now semi-anonymous":[null,"Esta sala ahora es semi-anónima"],"This room is now fully-anonymous":[null,"Esta sala ahora es completamente anónima"],"A new room has been created":[null,"Una nueva sala ha sido creada"],"Your nickname has been changed":[null,"Su apodo ha sido cambiado"],"<strong>%1$s</strong> has been banned":[null,"<strong>%1$s</strong> ha sido bloqueado"],"<strong>%1$s</strong> has been kicked out":[null,"<strong>%1$s</strong> ha sido expulsado"],"<strong>%1$s</strong> has been removed because of an affiliation change":[null,"<strong>%1$s</strong> ha sido eliminado debido a un cambio de afiliación"],"<strong>%1$s</strong> has been removed for not being a member":[null,"<strong>%1$s</strong> ha sido eliminado debido a que no es miembro"],"You have been banned from this room":[null,"Usted ha sido bloqueado de esta sala"],"You have been kicked from this room":[null,"Usted ha sido expulsado de esta sala"],"You have been removed from this room because of an affiliation change":[null,"Usted ha sido eliminado de esta sala debido a un cambio de afiliación"],"You have been removed from this room because the room has changed to members-only and you're not a member":[null,"Usted ha sido eliminado de esta sala debido a que la sala cambio su configuración a solo-miembros y usted no es un miembro"],"You have been removed from this room because the MUC (Multi-user chat) service is being shut down.":[null,"Usted ha sido eliminado de esta sala debido a que el servicio MUC (Multi-user chat) está deshabilitado."],"You are not on the member list of this room":[null,"Usted no está en la lista de miembros de esta sala"],"No nickname was specified":[null,"Sin apodo especificado"],"You are not allowed to create new rooms":[null,"Usted no esta autorizado para crear nuevas salas"],"Your nickname doesn't conform to this room's policies":[null,"Su apodo no se ajusta a la política de esta sala"],"Your nickname is already taken":[null,"Su apodo ya ha sido tomando por otro usuario"],"This room does not (yet) exist":[null,"Esta sala (aún) no existe"],"This room has reached it's maximum number of occupants":[null,"Esta sala ha alcanzado su número máximo de ocupantes"],"Topic set by %1$s to: %2$s":[null,"Tema fijado por %1$s a: %2$s"],"This user is a moderator":[null,"Este usuario es un moderador"],"This user can send messages in this room":[null,"Este usuario puede enviar mensajes en esta sala"],"This user can NOT send messages in this room":[null,"Este usuario NO puede enviar mensajes en esta"],"Click to chat with this contact":[null,"Haga click para conversar con este contacto"],"Click to remove this contact":[null,"Haga click para eliminar este contacto"],"This contact is busy":[null,"Este contacto está ocupado"],"This contact is online":[null,"Este contacto está en línea"],"This contact is offline":[null,"Este contacto está desconectado"],"This contact is unavailable":[null,"Este contacto no está disponible"],"This contact is away for an extended period":[null,"Este contacto está ausente por un largo periodo de tiempo"],"This contact is away":[null,"Este contacto está ausente"],"Contact requests":[null,"Solicitudes de contacto"],"My contacts":[null,"Mis contactos"],"Pending contacts":[null,"Contactos pendientes"],"Custom status":[null,"Personalizar estatus"],"Click to change your chat status":[null,"Haga click para cambiar su estatus de chat"],"Click here to write a custom status message":[null,"Haga click para escribir un mensaje de estatus personalizado"],online:[null,"en línea"],busy:[null,"ocupado"],"away for long":[null,"ausente por mucho tiempo"],away:[null,"ausente"],"I am %1$s":[null,"Estoy %1$s"],"Sign in":[null,"Registrar"],"XMPP/Jabber Username:":[null,"Nombre de usuario XMPP/Jabber"],"Password:":[null,"Contraseña:"],"Log In":[null,"Iniciar sesión"],"BOSH Service URL:":[null,"URL del servicio BOSH:"],"Online Contacts":[null,"En línea"],Connected:[null,"Conectado"],Attached:[null,"Adjuntado"]}}};typeof define=="function"&&define.amd?define("es",["jed"],function(){return t(new Jed(n))}):(window.locales||(window.locales={}),window.locales.es=t(new Jed(n)))}(this,function(e){return e}),function(e,t){var n={domain:"converse",locale_data:{converse:{"":{"Project-Id-Version":"Converse.js 0.4","Report-Msgid-Bugs-To":"","POT-Creation-Date":"2013-09-15 21:55+0200","PO-Revision-Date":"2013-09-15 21:58+0200","Language-Team":"FR <LL@li.org>",Language:"fr","MIME-Version":"1.0","Content-Type":"text/plain; charset=UTF-8","Content-Transfer-Encoding":"8bit","Plural-Forms":"nplurals=2; plural=(n != 1);",plural_forms:"nplurals=2; plural=(n != 1);",lang:"fr","Language-Code":"fr","Preferred-Encodings":"utf-8 latin1",Domain:"converse",domain:"converse"},unencrypted:[null,""],unverified:[null,""],verified:[null,""],finished:[null,""],Disconnected:[null,"Déconnecté"],Error:[null,"Erreur"],Connecting:[null,"Connection"],"Connection Failed":[null,"La connection a échoué"],Authenticating:[null,"Authentification"],"Authentication Failed":[null,"L'authentification a échoué"],Disconnecting:[null,"Déconnection"],"Re-establishing encrypted session":[null,""],"Your browser needs to generate a private key, which will be used in your encrypted chat session. This can take up to 30 seconds during which your browser might freeze and become unresponsive.":[null,""],"Private key generated.":[null,""],"Authentication request from %1$s\n\nYour buddy is attempting to verify your identity, by asking you the question below.\n\n%2$s":[null,""],"Could not verify this user's identify.":[null,""],"Personal message":[null,"Message personnel"],"Start encrypted conversation":[null,""],"Refresh encrypted conversation":[null,""],"End encrypted conversation":[null,""],"Verify with SMP":[null,""],"Verify with fingerprints":[null,""],"What's this?":[null,""],me:[null,""],"Show this menu":[null,"Afficher ce menu"],"Write in the third person":[null,"Écrire à la troisième personne"],"Remove messages":[null,"Effacer les messages"],"Your message could not be sent":[null,""],"We received an unencrypted message":[null,""],"We received an unreadable encrypted message":[null,""],"This user has requested an encrypted session.":[null,""],"Here are the fingerprints, please confirm them with %1$s, outside of this chat.\n\nFingerprint for you, %2$s: %3$s\n\nFingerprint for %1$s: %4$s\n\nIf you have confirmed that the fingerprints match, click OK, otherwise click Cancel.":[null,""],"You will be prompted to provide a security question and then an answer to that question.\n\nYour buddy will then be prompted the same question and if they type the exact same answer (case sensitive), their identity will have been verified.":[null,""],"What is your security question?":[null,""],"What is the answer to the security question?":[null,""],"Invalid authentication scheme provided":[null,""],"Your messages are not encrypted anymore":[null,""],"Your messages are now encrypted but your buddy's identity has not been verified.":[null,""],"Your buddy's identify has been verified.":[null,""],"Your buddy has ended encryption on their end, you should do the same.":[null,""],"Your messages are not encrypted. Click here to enable OTR encryption.":[null,""],"Your messages are encrypted, but your buddy has not been verified.":[null,""],"Your messages are encrypted and your buddy verified.":[null,""],"Your buddy has closed their end of the private session, you should do the same":[null,""],Contacts:[null,"Contacts"],Online:[null,"En ligne"],Busy:[null,"Occupé"],Away:[null,"Absent"],Offline:[null,"Déconnecté"],"Click to add new chat contacts":[null,"Cliquez pour ajouter de nouveaux contacts"],"Add a contact":[null,"Ajouter un contact"],"Contact username":[null,"Nom du contact"],Add:[null,"Ajouter"],"Contact name":[null,"Nom du contact"],Search:[null,"Rechercher"],"No users found":[null,"Aucun utilisateur trouvé"],"Click to add as a chat contact":[null,"Cliquer pour ajouter aux contacts de chat"],"Click to open this room":[null,"Cliquer pour ouvrir ce salon"],"Show more information on this room":[null,"Afficher davantage d'informations sur ce salon"],"Description:":[null,"Description :"],"Occupants:":[null,"Participants :"],"Features:":[null,"Caractéristiques :"],"Requires authentication":[null,"Nécessite une authentification"],Hidden:[null,"Masqué"],"Requires an invitation":[null,"Nécessite une invitation"],Moderated:[null,"Modéré"],"Non-anonymous":[null,"Non-anonyme"],"Open room":[null,"Ouvrir un salon"],"Permanent room":[null,"Salon permanent"],Public:[null,"Public"],"Semi-anonymous":[null,"Semi-anonyme"],"Temporary room":[null,"Salon temporaire"],Unmoderated:[null,"Non modéré"],Rooms:[null,"Salons"],"Room name":[null,"Numéro de salon"],Nickname:[null,"Alias"],Server:[null,"Serveur"],Join:[null,"Rejoindre"],"Show rooms":[null,"Afficher les salons"],"No rooms on %1$s":[null,"Aucun salon dans %1$s"],"Rooms on %1$s":[null,"Salons dans %1$s"],"Set chatroom topic":[null,"Indiquer le sujet du salon"],"Kick user from chatroom":[null,"Expulser l'utilisateur du salon."],"Ban user from chatroom":[null,"Bannir l'utilisateur du salon."],Message:[null,"Message"],Save:[null,"Enregistrer"],Cancel:[null,"Annuler"],"An error occurred while trying to save the form.":[null,"Une erreur est survenue lors de l'enregistrement du formulaire."],"This chatroom requires a password":[null,"Ce salon nécessite un mot de passe."],"Password: ":[null,"Mot de passe : "],Submit:[null,"Soumettre"],"This room is not anonymous":[null,"Ce salon n'est pas anonyme"],"This room now shows unavailable members":[null,"Ce salon affiche maintenant des membres indisponibles"],"This room does not show unavailable members":[null,"Ce salon n'affiche pas les membres indisponibles"],"Non-privacy-related room configuration has changed":[null,"Les paramètres du salon non liés à la confidentialité ont été modifiés"],"Room logging is now enabled":[null,"Le logging du salon est activé"],"Room logging is now disabled":[null,"Le logging du salon est désactivé"],"This room is now non-anonymous":[null,"Ce salon est maintenant non-anonyme"],"This room is now semi-anonymous":[null,"Ce salon est maintenant semi-anonyme"],"This room is now fully-anonymous":[null,"Ce salon est maintenant entièrement anonyme"],"A new room has been created":[null,"Un nouveau salon a été créé"],"Your nickname has been changed":[null,"Votre alias a été modifié"],"<strong>%1$s</strong> has been banned":[null,"<strong>%1$s</strong> a été banni"],"<strong>%1$s</strong> has been kicked out":[null,"<strong>%1$s</strong> a été expulsé"],"<strong>%1$s</strong> has been removed because of an affiliation change":[null,"<strong>%1$s</strong> a été supprimé à cause d'un changement d'affiliation"],"<strong>%1$s</strong> has been removed for not being a member":[null,"<strong>%1$s</strong> a été supprimé car il n'est pas membre"],"You have been banned from this room":[null,"Vous avez été banni de ce salon"],"You have been kicked from this room":[null,"Vous avez été expulsé de ce salon"],"You have been removed from this room because of an affiliation change":[null,"Vous avez été retiré de ce salon du fait d'un changement d'affiliation"],"You have been removed from this room because the room has changed to members-only and you're not a member":[null,"Vous avez été retiré de ce salon parce que ce salon est devenu réservé aux membres et vous n'êtes pas membre"],"You have been removed from this room because the MUC (Multi-user chat) service is being shut down.":[null,"Vous avez été retiré de ce salon parce que le service de chat multi-utilisateur a été désactivé."],"You are not on the member list of this room":[null,"Vous n'êtes pas dans la liste des membres de ce salon"],"No nickname was specified":[null,"Aucun alias n'a été indiqué"],"You are not allowed to create new rooms":[null,"Vous n'êtes pas autorisé à créer des salons"],"Your nickname doesn't conform to this room's policies":[null,"Votre alias n'est pas conforme à la politique de ce salon"],"Your nickname is already taken":[null,"Votre alias est déjà utilisé"],"This room does not (yet) exist":[null,"Ce salon n'existe pas encore"],"This room has reached it's maximum number of occupants":[null,"Ce salon a atteint la limite maximale d'occupants"],"Topic set by %1$s to: %2$s":[null,"Le sujet '%1$s' a été défini par %2$s"],"This user is a moderator":[null,"Cet utilisateur est modérateur"],"This user can send messages in this room":[null,"Cet utilisateur peut envoyer des messages dans ce salon"],"This user can NOT send messages in this room":[null,"Cet utilisateur ne peut PAS envoyer de messages dans ce salon"],"Click to chat with this contact":[null,"Cliquez pour discuter avec ce contact"],"Click to remove this contact":[null,"Cliquez pour supprimer ce contact"],"This contact is busy":[null,""],"This contact is online":[null,""],"This contact is offline":[null,""],"This contact is unavailable":[null,"Ce salon affiche maintenant des membres indisponibles"],"This contact is away for an extended period":[null,""],"This contact is away":[null,""],"Contact requests":[null,"Demandes de contacts"],"My contacts":[null,"Mes contacts"],"Pending contacts":[null,"Contacts en attente"],"Custom status":[null,"Statut personnel"],"Click to change your chat status":[null,"Cliquez pour changer votre statut"],"Click here to write a custom status message":[null,"Cliquez ici pour indiquer votre statut personnel"],online:[null,"en ligne"],busy:[null,"occupé"],"away for long":[null,"absent pour une longue durée"],away:[null,"absent"],"I am %1$s":[null,"Je suis %1$s"],"Sign in":[null,"S'inscrire"],"XMPP/Jabber Username:":[null,"Nom d'utilisateur XMPP/Jabber"],"Password:":[null,"Mot de passe :"],"Log In":[null,"Se connecter"],"BOSH Service URL:":[null,"URL du service BOSH:"],"Online Contacts":[null,"Contacts en ligne"],Connected:[null,"Connecté"],Attached:[null,"Attaché"]}}};typeof define=="function"&&define.amd?define("fr",["jed"],function(){return t(new Jed(n))}):(window.locales||(window.locales={}),window.locales.fr=t(new Jed(n)))}(this,function(e){return e}),function(e,t){var n={domain:"converse",locale_data:{converse:{"":{"project-id-version":"Converse.js 0.8.1","report-msgid-bugs-to":"","pot-creation-date":"2014-08-25 14:37+0200","po-revision-date":"2014-02-21 06:07+0200","last-translator":"GreenLunar <GreenLunar@github.com>","language-team":"Rahut <http://sourceforge.net/projects/rahut/>",language:"he","mime-version":"1.0","content-type":"text/plain; charset=UTF-8","content-transfer-encoding":"8bit","x-generator":"Poedit 1.5.1","plural-forms":"nplurals=2; plural=(n != 1);"},unencrypted:[null,"לא מוצפנת"],unverified:[null,"לא מאומתת"],verified:[null,"מאומתת"],finished:[null,"מוגמרת"],"This contact is busy":[null,"איש קשר זה עסוק"],"This contact is online":[null,"איש קשר זה מקוון"],"This contact is offline":[null,"איש קשר זה לא מקוון"],"This contact is unavailable":[null,"איש קשר זה לא זמין"],"This contact is away for an extended period":[null,"איש קשר זה נעדר למשך זמן ממושך"],"This contact is away":[null,"איש קשר זה הינו נעדר"],"Click to hide these contacts":[null,"לחץ כדי להסתיר את אנשי קשר אלה"],"My contacts":[null,"אנשי הקשר שלי"],"Pending contacts":[null,"אנשי קשר ממתינים"],"Contact requests":[null,"בקשות איש קשר"],Ungrouped:[null,"ללא קבוצה"],Contacts:[null,"אנשי קשר"],Groups:[null,"קבוצות"],Reconnecting:[null,"כעת מתחבר"],Disconnected:[null,"מנותק"],Error:[null,"שגיאה"],Connecting:[null,"כעת מתחבר"],"Connection Failed":[null,"חיבור נכשל"],Authenticating:[null,"כעת מאמת"],"Authentication Failed":[null,"אימות נכשל"],Disconnecting:[null,"כעת מתנתק"],"Online Contacts":[null,"אנשי קשר מקוונים"],"Re-establishing encrypted session":[null,"בסס מחדש ישיבה מוצפנת"],"Generating private key.":[null,"כעת מפיק מפתח פרטי."],"Your browser might become unresponsive.":[null,"הדפדפן שלך עשוי שלא להגיב."],"Authentication request from %1$s\n\nYour buddy is attempting to verify your identity, by asking you the question below.\n\n%2$s":[null,"בקשת אימות מאת %1$s\n\nהאישיות שכנגד מנסה לאמת את הזהות שלך, בעזרת שאילת שאלה להלן.\n\n%2$s"],"Could not verify this user's identify.":[null,"לא היתה אפשרות לאמת את זהות משתמש זה."],"Exchanging private key with buddy.":[null,"ממיר מפתח פרטי עם איש קשר."],"Personal message":[null,"הודעה אישית"],"Are you sure you want to clear the messages from this room?":[null,"האם אתה בטוח כי ברצונך לטהר את ההודעות מתוך חדר זה?"],me:[null,"אני"],"is typing":[null,"מקליד/ה כעת"],"has stopped typing":[null,"חדל/ה מלהקליד"],"Show this menu":[null,"הצג את תפריט זה"],"Write in the third person":[null,"כתוב בגוף השלישי"],"Remove messages":[null,"הסר הודעות"],"Are you sure you want to clear the messages from this chat box?":[null,"האם אתה בטוח כי ברצונך לטהר את ההודעות מתוך תיבת שיחה זה?"],"Your message could not be sent":[null,"ההודעה שלך לא היתה יכולה להישלח"],"We received an unencrypted message":[null,"אנחנו קיבלנו הודעה לא מוצפנת"],"We received an unreadable encrypted message":[null,"אנחנו קיבלנו הודעה מוצפנת לא קריאה"],"This user has requested an encrypted session.":[null,"משתמש זה ביקש ישיבה מוצפנת."],"Here are the fingerprints, please confirm them with %1$s, outside of this chat.\n\nFingerprint for you, %2$s: %3$s\n\nFingerprint for %1$s: %4$s\n\nIf you have confirmed that the fingerprints match, click OK, otherwise click Cancel.":[null,"הרי טביעות האצבע, אנא אמת אותן עם %1$s, מחוץ לשיחה זו.\n\nטביעת אצבע עבורך, %2$s: %3$s\n\nטביעת אצבע עבור %1$s: %4$s\n\nהיה ואימתת כי טביעות האצבע תואמות, לחץ אישור (OK), אחרת לחץ ביטול (Cancel)."],"You will be prompted to provide a security question and then an answer to that question.\n\nYour buddy will then be prompted the same question and if they type the exact same answer (case sensitive), their identity will be verified.":[null,"אתה תתבקש לספק שאלת אבטחה ולאחריה תשובה לשאלה הזו.\n\nהאישיות שכנגד תתבקש עובר זאת לאותה שאלת אבטחה ואם זו תקלידו את את אותה התשובה במדויק (case sensitive), זהותה תאומת."],"What is your security question?":[null,"מהי שאלת האבטחה שלך?"],"What is the answer to the security question?":[null,"מהי התשובה לשאלת האבטחה?"],"Invalid authentication scheme provided":[null,"סופקה סכימת אימות שגויה"],"Your messages are not encrypted anymore":[null,"ההודעות שלך אינן מוצפנות עוד"],"Your messages are now encrypted but your buddy's identity has not been verified.":[null,"ההודעות שלך מוצפנות כעת אך זהות האישיות שכנגד טרם אומתה."],"Your buddy's identify has been verified.":[null,"זהות האישיות שכנגד אומתה."],"Your buddy has ended encryption on their end, you should do the same.":[null,"האישיות שכנגד סיימה הצפנה בקצה שלה, עליך לעשות את אותו הדבר."],"Your messages are not encrypted. Click here to enable OTR encryption.":[null,"ההודעות שלך אינן מוצפנות. לחץ כאן כדי לאפשר OTR."],"Your messages are encrypted, but your buddy has not been verified.":[null,"ההודעות שלך מוצפנות כעת, אך האישיות שכנגד טרם אומתה."],"Your messages are encrypted and your buddy verified.":[null,"ההודעות שלך מוצפנות כעת והאישיות שכנגד אומתה."],"Your buddy has closed their end of the private session, you should do the same":[null,"האישיות שכנגד סגרה את קצה הישיבה הפרטית שלה, עליך לעשות את אותו הדבר"],"End encrypted conversation":[null,"סיים ישיבה מוצפנת"],"Refresh encrypted conversation":[null,"רענן ישיבה מוצפנת"],"Start encrypted conversation":[null,"התחל ישיבה מוצפנת"],"Verify with fingerprints":[null,"אמת בעזרת טביעות אצבע"],"Verify with SMP":[null,"אמת בעזרת SMP"],"What's this?":[null,"מה זה?"],Online:[null,"מקוון"],Busy:[null,"עסוק"],Away:[null,"נעדר"],Offline:[null,"בלתי מקוון"],"Contact name":[null,"שם איש קשר"],Search:[null,"חיפוש"],"Contact username":[null,"שם משתמש איש קשר"],Add:[null,"הוסף"],"Click to add new chat contacts":[null,"לחץ כדי להוסיף אנשי קשר שיחה חדשים"],"Add a contact":[null,"הוסף איש קשר"],"No users found":[null,"לא נמצאו משתמשים"],"Click to add as a chat contact":[null,"לחץ כדי להוסיף בתור איש קשר שיחה"],"Room name":[null,"שם חדר"],Nickname:[null,"שם כינוי"],Server:[null,"שרת"],Join:[null,"הצטרף"],"Show rooms":[null,"הצג חדרים"],Rooms:[null,"חדרים"],"No rooms on %1$s":[null,"אין חדרים על %1$s"],"Rooms on %1$s":[null,"חדרים על %1$s"],"Click to open this room":[null,"לחץ כדי לפתוח את חדר זה"],"Show more information on this room":[null,"הצג עוד מידע אודות חדר זה"],"Description:":[null,"תיאור:"],"Occupants:":[null,"נוכחים:"],"Features:":[null,"תכונות:"],"Requires authentication":[null,"מצריך אישור"],Hidden:[null,"נסתר"],"Requires an invitation":[null,"מצריך הזמנה"],Moderated:[null,"מבוקר"],"Non-anonymous":[null,"לא אנונימי"],"Open room":[null,"חדר פתוח"],"Permanent room":[null,"חדר צמיתה"],Public:[null,"פומבי"],"Semi-anonymous":[null,"אנונימי למחצה"],"Temporary room":[null,"חדר זמני"],Unmoderated:[null,"לא מבוקר"],"Set chatroom topic":[null,"קבע נושא חדר שיחה"],"Kick user from chatroom":[null,"בעט משתמש מתוך חדר שיחה"],"Ban user from chatroom":[null,"אסור משתמש מתוך חדר שיחה"],Message:[null,"הודעה"],Save:[null,"שמור"],Cancel:[null,"ביטול"],"An error occurred while trying to save the form.":[null,"אירעה שגיאה במהלך ניסיון שמירת הטופס."],"This chatroom requires a password":[null,"חדר שיחה זה מצריך סיסמה"],"Password: ":[null,"סיסמה: "],Submit:[null,"שלח"],"This room is not anonymous":[null,"חדר זה אינו אנונימי"],"This room now shows unavailable members":[null,"חדר זה כעת מציג חברים לא זמינים"],"This room does not show unavailable members":[null,"חדר זה לא מציג חברים לא זמינים"],"Non-privacy-related room configuration has changed":[null,"תצורת חדר אשר לא-קשורה-בפרטיות שונתה"],"Room logging is now enabled":[null,"יומן חדר הינו מופעל כעת"],"Room logging is now disabled":[null,"יומן חדר הינו מנוטרל כעת"],"This room is now non-anonymous":[null,"חדר זה אינו אנונימי כעת"],"This room is now semi-anonymous":[null,"חדר זה הינו אנונימי למחצה כעת"],"This room is now fully-anonymous":[null,"חדר זה הינו אנונימי לחלוטין כעת"],"A new room has been created":[null,"חדר חדש נוצר"],"Your nickname has been changed":[null,"שם הכינוי שלך שונה"],"<strong>%1$s</strong> has been banned":[null,"<strong>%1$s</strong> נאסר(ה)"],"<strong>%1$s</strong> has been kicked out":[null,"<strong>%1$s</strong> נבעט(ה)"],"<strong>%1$s</strong> has been removed because of an affiliation change":[null,"<strong>%1$s</strong> הוסרה(ה) משום שינוי שיוך"],"<strong>%1$s</strong> has been removed for not being a member":[null,"<strong>%1$s</strong> הוסר(ה) משום אי הימצאות במסגרת מעמד של חבר"],"You have been banned from this room":[null,"נאסרת מתוך חדר זה"],"You have been kicked from this room":[null,"נבעטת מתוך חדר זה"],"You have been removed from this room because of an affiliation change":[null,"הוסרת מתוך חדר זה משום שינוי שיוך"],"You have been removed from this room because the room has changed to members-only and you're not a member":[null,"הוסרת מתוך חדר זה משום שהחדר שונה לחברים-בלבד ואינך במעמד של חבר"],"You have been removed from this room because the MUC (Multi-user chat) service is being shut down.":[null,"הוסרת מתוך חדר זה משום ששירות שמ״מ (שיחה מרובת משתמשים) זה כעת מצוי בהליכי סגירה."],"You are not on the member list of this room":[null,"אינך ברשימת החברים של חדר זה"],"No nickname was specified":[null,"לא צוין שום שם כינוי"],"You are not allowed to create new rooms":[null,"אין לך רשות ליצור חדרים חדשים"],"Your nickname doesn't conform to this room's policies":[null,"שם הכינוי שלך לא תואם את המדינויות של חדר זה"],"Your nickname is already taken":[null,"שם הכינוי שלך הינו תפוס"],"This room does not (yet) exist":[null,"חדר זה (עדיין) לא קיים"],"This room has reached it's maximum number of occupants":[null,"חדר זה הגיע לסף הנוכחים המרבי שלו"],"Topic set by %1$s to: %2$s":[null,"נושא חדר זה נקבע על ידי %1$s אל: %2$s"],"This user is a moderator":[null,"משתמש זה הינו אחראי"],"This user can send messages in this room":[null,"משתמש זה מסוגל לשלוח הודעות בתוך חדר זה"],"This user can NOT send messages in this room":[null,"משתמש זה מסוגל לשלוח הודעות בתוך חדר זה"],"Click to restore this chat":[null,"לחץ כדי לשחזר את שיחה זו"],Minimized:[null,"ממוזער"],"Are you sure you want to remove this contact?":[null,"האם אתה בטוח כי ברצונך להסיר את איש קשר זה?"],"Are you sure you want to decline this contact request?":[null,"האם אתה בטוח כי ברצונך לסרב את בקשת איש קשר זה?"],"Click to remove this contact":[null,"לחץ כדי להסיר את איש קשר זה"],"Click to accept this contact request":[null,"לחץ כדי לקבל את בקשת איש קשר זה"],"Click to decline this contact request":[null,"לחץ כדי לסרב את בקשת איש קשר זה"],"Click to chat with this contact":[null,"לחץ כדי לשוחח עם איש קשר זה"],"Type to filter":[null,"הקלד כדי לסנן"],"Custom status":[null,"מצב מותאם"],online:[null,"מקוון"],busy:[null,"עסוק"],"away for long":[null,"נעדר לזמן מה"],away:[null,"נעדר"],"I am %1$s":[null,"מצבי כעת הינו %1$s"],"Click here to write a custom status message":[null,"לחץ כאן כדי לכתוב הודעת מצב מותאמת"],"Click to change your chat status":[null,"לחץ כדי לשנות את הודעת השיחה שלך"],"XMPP/Jabber Username:":[null,"שם משתמש XMPP/Jabber:"],"Password:":[null,"סיסמה:"],"Log In":[null,"כניסה"],"Sign in":[null,"התחברות"],"Toggle chat":[null,"הפעל שיח"]}}};typeof define=="function"&&define.amd?define("he",["jed"],function(){return t(new Jed(n))}):(window.locales||(window.locales={}),window.locales.he=t(new Jed(n)))}(this,function(e){return e}),function(e,t){var n={domain:"converse",locale_data:{converse:{"":{"Project-Id-Version":"Converse.js 0.4","Report-Msgid-Bugs-To":"","POT-Creation-Date":"2013-09-24 23:22+0200","PO-Revision-Date":"2013-09-25 22:42+0200","Last-Translator":"Krisztian Kompar <w3host@w3host.hu>","Language-Team":"Hungarian",Language:"hu","MIME-Version":"1.0","Content-Type":"text/plain; charset=UTF-8","Content-Transfer-Encoding":"8bit",domain:"converse",lang:"hu",plural_forms:"nplurals=2; plural=(n != 1);"},Disconnected:[null,"Szétkapcsolva"],Error:[null,"Hiba"],Connecting:[null,"Kapcsolódás"],"Connection Failed":[null,"Kapcsolódási hiba"],Authenticating:[null,"Azonosítás"],"Authentication Failed":[null,"Azonosítási hiba"],Disconnecting:[null,"Szétkapcsolás"],me:[null,"én"],"%1$s is typing":[null,"%1$s gépel"],"Show this menu":[null,"Mutasd ezt a menüt"],"Write in the third person":[null,""],"Remove messages":[null,"Üzenet törlése"],"Personal message":[null,"Saját üzenet"],Contacts:[null,"Kapcsolatok"],Online:[null,"Elérhető"],Busy:[null,"Foglalt"],Away:[null,"Távol"],Offline:[null,"Nem elérhető"],"Click to add new chat contacts":[null,"Új kapcsolatok hozzáadása"],"Add a contact":[null,"Új kapcsolat"],"Contact username":[null,"Felhasználónév"],Add:[null,"Hozzáadás"],"Contact name":[null,"Kapcsolat neve"],Search:[null,"Keresés"],"No users found":[null,"Nincs találat"],"Click to add as a chat contact":[null,"Csevegő kapcsolatként hozzáad"],"Click to open this room":[null,"Belépés a csevegő szobába"],"Show more information on this room":[null,"További információk a csevegő szobáról"],"Description:":[null,"Leírás:"],"Occupants:":[null,"Jelenlevők:"],"Features:":[null,"Tulajdonságok"],"Requires authentication":[null,"Azonosítás szükséges"],Hidden:[null,"Rejtett"],"Requires an invitation":[null,"Meghívás szükséges"],Moderated:[null,"Moderált"],"Non-anonymous":[null,"NEM névtelen"],"Open room":[null,"Nyitott szoba"],"Permanent room":[null,"Állandó szoba"],Public:[null,"Nyílvános"],"Semi-anonymous":[null,"Félig névtelen"],"Temporary room":[null,"Ideiglenes szoba"],Unmoderated:[null,"Moderálatlan"],Rooms:[null,"Szobák"],"Room name":[null,"A szoba neve"],Nickname:[null,"Becenév"],Server:[null,"Szerver"],Join:[null,"Csatlakozás"],"Show rooms":[null,"Létező szobák"],"No rooms on %1$s":[null,"Nincs csevegő szoba a(z) %1$s szerveren"],"Rooms on %1$s":[null,"Csevegő szobák a(z) %1$s szerveren"],"Set chatroom topic":[null,"Csevegőszoba téma beállítás"],"Kick user from chatroom":[null,"Felhasználó kiléptetése a csevegő szobából"],"Ban user from chatroom":[null,"Felhasználó kitíltása a csevegő szobából"],Message:[null,"Üzenet"],Save:[null,"Mentés"],Cancel:[null,"Mégsem"],"An error occurred while trying to save the form.":[null,"Hiba történt az adatok mentése közben."],"This chatroom requires a password":[null,"A csevegő szoba belépéshez jelszó szükséges"],"Password: ":[null,"Jelszó:"],Submit:[null,"Küldés"],"This room is not anonymous":[null,"Ez a szoba NEM névtelen"],"This room now shows unavailable members":[null,"Ez a szoba mutatja az elérhetetlen tagokat"],"This room does not show unavailable members":[null,"Ez a szoba nem mutatja az elérhetetlen tagokat"],"Non-privacy-related room configuration has changed":[null,"A szoba általános konfigurációja módosult"],"Room logging is now enabled":[null,"A szobába a belépés lehetséges"],"Room logging is now disabled":[null,"A szobába a belépés szünetel"],"This room is now non-anonymous":[null,"Ez a szoba most NEM névtelen"],"This room is now semi-anonymous":[null,"Ez a szoba most félig névtelen"],"This room is now fully-anonymous":[null,"Ez a szoba most teljesen névtelen"],"A new room has been created":[null,"Létrejött egy új csevegő szoba"],"Your nickname has been changed":[null,"A beceneved módosításra került"],"<strong>%1$s</strong> has been banned":[null,"A szobából kitíltva: <strong>%1$s</strong>"],"<strong>%1$s</strong> has been kicked out":[null,"A szobából kidobva: <strong>%1$s</strong>"],"<strong>%1$s</strong> has been removed because of an affiliation change":[null,"Taglista módosítás miatt a szobából kiléptetve: <strong>%1$s</strong>"],"<strong>%1$s</strong> has been removed for not being a member":[null,"A taglistán nem szerepel így a szobából kiléptetve: <strong>%1$s</strong>"],"You have been banned from this room":[null,"Ki lettél tíltva ebből a szobából"],"You have been kicked from this room":[null,"Ki lettél dobva ebből a szobából"],"You have been removed from this room because of an affiliation change":[null,"Taglista módosítás miatt kiléptettünk a csevegő szobából"],"You have been removed from this room because the room has changed to members-only and you're not a member":[null,"Kiléptettünk a csevegő szobából, mert mostantól csak a taglistán szereplők lehetnek jelen."],"You have been removed from this room because the MUC (Multi-user chat) service is being shut down.":[null,"Kiléptettünk a csevegő szobából, mert a MUC (Multi-User Chat) szolgáltatás leállításra került."],"You are not on the member list of this room":[null,"Nem szerepelsz a csevegő szoba taglistáján"],"No nickname was specified":[null,"Nem lett megadva becenév"],"You are not allowed to create new rooms":[null,"Nem lehet új csevegő szobát létrehozni"],"Your nickname doesn't conform to this room's policies":[null,"A beceneved ütközik a csevegő szoba szabályzataival"],"Your nickname is already taken":[null,"A becenevedet már valaki használja"],"This room does not (yet) exist":[null,"Ez a szoba (még) nem létezik"],"This room has reached it's maximum number of occupants":[null,"Ez a csevegő szoba elérte a maximális jelenlevők számát"],"Topic set by %1$s to: %2$s":[null,"A következő témát állította be %1$s: %2$s"],"This user is a moderator":[null,"Ez a felhasználó egy moderátor"],"This user can send messages in this room":[null,"Ez a felhasználó küldhet üzenetet ebbe a szobába"],"This user can NOT send messages in this room":[null,"Ez a felhasználó NEM küldhet üzenetet ebbe a szobába"],"Click to chat with this contact":[null,"Csevegés indítása ezzel a kapcsolatunkkal"],"Click to remove this contact":[null,"A kapcsolat törlése"],"This contact is busy":[null,"Elfoglalt"],"This contact is online":[null,"Online"],"This contact is offline":[null,"Nincs bejelentkezve"],"This contact is unavailable":[null,"Elérhetetlen"],"This contact is away for an extended period":[null,"Hosszabb ideje távol"],"This contact is away":[null,"Távol"],"Contact requests":[null,"Kapcsolat felvételi kérés"],"My contacts":[null,"Kapcsolatok:"],"Pending contacts":[null,"Függőben levő kapcsolatok"],"Custom status":[null,"Egyedi státusz"],"Click to change your chat status":[null,"Saját státusz beállítása"],"Click here to write a custom status message":[null,"Egyedi státusz üzenet írása"],online:[null,"online"],busy:[null,"elfoglalt"],"away for long":[null,"hosszú ideje távol"],away:[null,"távol"],"I am %1$s":[null,"%1$s vagyok"],"Sign in":[null,"Belépés"],"XMPP/Jabber Username:":[null,"XMPP/Jabber azonosító:"],"Password:":[null,"Jelszó:"],"Log In":[null,"Belépés"],"BOSH Service URL:":[null,"BOSH szerver URL"],"Online Contacts":[null,"Online kapcsolatok"]}}};typeof define=="function"&&define.amd?define("hu",["jed"],function(){return t(new Jed(n))}):(window.locales||(window.locales={}),window.locales.hu=t(new Jed(n)))}(this,function(e){return e}),function(e,t){var n={domain:"converse",locale_data:{converse:{"":{"project-id-version":"Converse.js 0.7.0","report-msgid-bugs-to":"","pot-creation-date":"2014-01-22 17:07+0200","po-revision-date":"2014-01-25 21:30+0700","last-translator":"Priyadi Iman Nurcahyo <priyadi@priyadi.net>","language-team":"Bahasa Indonesia","mime-version":"1.0","content-type":"text/plain; charset=UTF-8","content-transfer-encoding":"8bit",language:"id"},unencrypted:[null,"tak dienkripsi"],unverified:[null,"tak diverifikasi"],verified:[null,"diverifikasi"],finished:[null,"selesai"],"This contact is busy":[null,"Teman ini sedang sibuk"],"This contact is online":[null,"Teman ini terhubung"],"This contact is offline":[null,"Teman ini tidak terhubung"],"This contact is unavailable":[null,"Teman ini tidak tersedia"],"This contact is away for an extended period":[null,"Teman ini tidak di tempat untuk waktu yang lama"],"This contact is away":[null,"Teman ini tidak di tempat"],Disconnected:[null,"Terputus"],Error:[null,"Kesalahan"],Connecting:[null,"Menyambung"],"Connection Failed":[null,"Gagal Menyambung"],Authenticating:[null,"Melakukan otentikasi"],"Authentication Failed":[null,"Otentikasi gagal"],Disconnecting:[null,"Memutuskan hubungan"],"Online Contacts":[null,"Teman yang Terhubung"],"Re-establishing encrypted session":[null,"Menyambung kembali sesi terenkripsi"],"Your browser needs to generate a private key, which will be used in your encrypted chat session. This can take up to 30 seconds during which your browser might freeze and become unresponsive.":[null,"Perambah anda perlu membuat kunci privat, yang akan digunakan pada sesi perbincangan anda. Ini akan membutuhkan waktu sampai 30 detik, dan selama itu perambah mungkin akan tidak responsif."],"Private key generated.":[null,"Kunci privat berhasil dibuat."],"Authentication request from %1$s\n\nYour buddy is attempting to verify your identity, by asking you the question below.\n\n%2$s":[null,"Permintaan otentikasi dari %1$s\n\nTeman anda mencoba untuk melakukan verifikasi identitas anda dengan cara menanyakan pertanyaan di bawah ini.\n\n%2$s"],"Could not verify this user's identify.":[null,"Tak dapat melakukan verifikasi identitas pengguna ini."],"Personal message":[null,"Pesan pribadi"],"Start encrypted conversation":[null,"Mulai sesi terenkripsi"],"Refresh encrypted conversation":[null,"Setel ulang percakapan terenkripsi"],"End encrypted conversation":[null,"Sudahi percakapan terenkripsi"],"Verify with SMP":[null,"Verifikasi menggunakan SMP"],"Verify with fingerprints":[null,"Verifikasi menggunakan sidik jari"],"What's this?":[null,"Apakah ini?"],me:[null,"saya"],"Show this menu":[null,"Tampilkan menu ini"],"Write in the third person":[null,"Tulis ini menggunakan bahasa pihak ketiga"],"Remove messages":[null,"Hapus pesan"],"Your message could not be sent":[null,"Pesan anda tak dapat dikirim"],"We received an unencrypted message":[null,"Kami menerima pesan terenkripsi"],"We received an unreadable encrypted message":[null,"Kami menerima pesan terenkripsi yang gagal dibaca"],"This user has requested an encrypted session.":[null,"Pengguna ini meminta sesi terenkripsi"],"Here are the fingerprints, please confirm them with %1$s, outside of this chat.\n\nFingerprint for you, %2$s: %3$s\n\nFingerprint for %1$s: %4$s\n\nIf you have confirmed that the fingerprints match, click OK, otherwise click Cancel.":[null,"Ini adalah sidik jari anda, konfirmasikan bersama mereka dengan %1$s, di luar percakapan ini.\n\nSidik jari untuk anda, %2$s: %3$s\n\nSidik jari untuk %1$s: %4$s\n\nJika anda bisa mengkonfirmasi sidik jadi cocok, klik Lanjutkan, jika tidak klik Batal."],"You will be prompted to provide a security question and then an answer to that question.\n\nYour buddy will then be prompted the same question and if they type the exact same answer (case sensitive), their identity will have been verified.":[null,"Anda akan ditanyakan pertanyaan untuk keamanan beserta jawaban untuk pertanyaan tersebut.\n\nTeman anda akan ditanyakan pertanyaan yang sama dan jika dia memberikan jawaban yang sama (huruf kapital diperhatikan), identitas mereka diverifikasi."],"What is your security question?":[null,"Apakah pertanyaan keamanan anda?"],"What is the answer to the security question?":[null,"Apa jawaban dari pertanyaan keamanan tersebut?"],"Invalid authentication scheme provided":[null,"Skema otentikasi salah"],"Your messages are not encrypted anymore":[null,"Pesan anda tidak lagi terenkripsi"],"Your messages are now encrypted but your buddy's identity has not been verified.":[null,"Pesan anda sekarang terenkripsi, namun identitas teman anda belum dapat diverifikasi."],"Your buddy's identify has been verified.":[null,"Identitas teman anda telah diverifikasi."],"Your buddy has ended encryption on their end, you should do the same.":[null,"Teman anda menghentikan percakapan terenkripsi, anda sebaiknya melakukan hal yang sama."],"Your messages are not encrypted. Click here to enable OTR encryption.":[null,"Pesan anda tak terenkripsi. Klik di sini untuk menyalakan enkripsi OTR."],"Your messages are encrypted, but your buddy has not been verified.":[null,"Pesan anda terenkripsi, tetapi teman anda belum diverifikasi."],"Your messages are encrypted and your buddy verified.":[null,"Pesan anda terenkripsi dan teman anda telah diverifikasi."],"Your buddy has closed their end of the private session, you should do the same":[null,"Teman anda telah mematikan sesi terenkripsi, dan anda juga sebaiknya melakukan hal yang sama"],Contacts:[null,"Teman"],Online:[null,"Terhubung"],Busy:[null,"Sibuk"],Away:[null,"Pergi"],Offline:[null,"Tak Terhubung"],"Click to add new chat contacts":[null,"Klik untuk menambahkan teman baru"],"Add a contact":[null,"Tambah teman"],"Contact username":[null,"Username teman"],Add:[null,"Tambah"],"Contact name":[null,"Nama teman"],Search:[null,"Cari"],"No users found":[null,"Pengguna tak ditemukan"],"Click to add as a chat contact":[null,"Klik untuk menambahkan sebagai teman"],"Click to open this room":[null,"Klik untuk membuka ruangan ini"],"Show more information on this room":[null,"Tampilkan informasi ruangan ini"],"Description:":[null,"Keterangan:"],"Occupants:":[null,"Penghuni:"],"Features:":[null,"Fitur:"],"Requires authentication":[null,"Membutuhkan otentikasi"],Hidden:[null,"Tersembunyi"],"Requires an invitation":[null,"Membutuhkan undangan"],Moderated:[null,"Dimoderasi"],"Non-anonymous":[null,"Tidak anonim"],"Open room":[null,"Ruangan terbuka"],"Permanent room":[null,"Ruangan permanen"],Public:[null,"Umum"],"Semi-anonymous":[null,"Semi-anonim"],"Temporary room":[null,"Ruangan sementara"],Unmoderated:[null,"Tak dimoderasi"],Rooms:[null,"Ruangan"],"Room name":[null,"Nama ruangan"],Nickname:[null,"Nama panggilan"],Server:[null,"Server"],Join:[null,"Ikuti"],"Show rooms":[null,"Perlihatkan ruangan"],"No rooms on %1$s":[null,"Tak ada ruangan di %1$s"],"Rooms on %1$s":[null,"Ruangan di %1$s"],"Set chatroom topic":[null,"Setel topik ruangan"],"Kick user from chatroom":[null,"Tendang pengguna dari ruangan"],"Ban user from chatroom":[null,"Larang pengguna dari ruangan"],Message:[null,"Pesan"],Save:[null,"Simpan"],Cancel:[null,"Batal"],"An error occurred while trying to save the form.":[null,"Kesalahan terjadi saat menyimpan formulir ini."],"This chatroom requires a password":[null,"Ruangan ini membutuhkan kata sandi"],"Password: ":[null,"Kata sandi: "],Submit:[null,"Kirim"],"This room is not anonymous":[null,"Ruangan ini tidak anonim"],"This room now shows unavailable members":[null,"Ruangan ini menampilkan anggota yang tak tersedia"],"This room does not show unavailable members":[null,"Ruangan ini tidak menampilkan anggota yang tak tersedia"],"Non-privacy-related room configuration has changed":[null,"Konfigurasi ruangan yang tak berhubungan dengan privasi telah diubah"],"Room logging is now enabled":[null,"Pencatatan di ruangan ini sekarang dinyalakan"],"Room logging is now disabled":[null,"Pencatatan di ruangan ini sekarang dimatikan"],"This room is now non-anonymous":[null,"Ruangan ini sekarang tak-anonim"],"This room is now semi-anonymous":[null,"Ruangan ini sekarang semi-anonim"],"This room is now fully-anonymous":[null,"Ruangan ini sekarang anonim"],"A new room has been created":[null,"Ruangan baru telah dibuat"],"Your nickname has been changed":[null,"Nama panggilan anda telah diubah"],"<strong>%1$s</strong> has been banned":[null,"<strong>%1$s</strong> telah dicekal"],"<strong>%1$s</strong> has been kicked out":[null,"<strong>%1$s</strong> telah ditendang keluar"],"<strong>%1$s</strong> has been removed because of an affiliation change":[null,"<strong>%1$s</strong> telah dihapus karena perubahan afiliasi"],"<strong>%1$s</strong> has been removed for not being a member":[null,"<strong>%1$s</strong> telah dihapus karena bukan anggota"],"You have been banned from this room":[null,"Anda telah dicekal dari ruangan ini"],"You have been kicked from this room":[null,"Anda telah ditendang dari ruangan ini"],"You have been removed from this room because of an affiliation change":[null,"Anda telah dihapus dari ruangan ini karena perubahan afiliasi"],"You have been removed from this room because the room has changed to members-only and you're not a member":[null,"Anda telah dihapus dari ruangan ini karena ruangan ini hanya terbuka untuk anggota dan anda bukan anggota"],"You have been removed from this room because the MUC (Multi-user chat) service is being shut down.":[null,"Anda telah dihapus dari ruangan ini karena layanan MUC (Multi-user chat) telah dimatikan."],"You are not on the member list of this room":[null,"Anda bukan anggota dari ruangan ini"],"No nickname was specified":[null,"Nama panggilan belum ditentukan"],"You are not allowed to create new rooms":[null,"Anda tak diizinkan untuk membuat ruangan baru"],"Your nickname doesn't conform to this room's policies":[null,"Nama panggilan anda tidak sesuai aturan ruangan ini"],"Your nickname is already taken":[null,"Nama panggilan anda telah digunakan orang lain"],"This room does not (yet) exist":[null,"Ruangan ini belum dibuat"],"This room has reached it's maximum number of occupants":[null,"Ruangan ini telah mencapai jumlah penghuni maksimum"],"Topic set by %1$s to: %2$s":[null,"Topik diganti oleh %1$s menjadi: %2$s"],"This user is a moderator":[null,"Pengguna ini adalah moderator"],"This user can send messages in this room":[null,"Pengguna ini dapat mengirim pesan di ruangan ini"],"This user can NOT send messages in this room":[null,"Pengguna ini tak dapat mengirim pesan di ruangan ini"],"Click to chat with this contact":[null,"Klik untuk mulai perbinjangan dengan teman ini"],"Click to remove this contact":[null,"Klik untuk menghapus teman ini"],"Contact requests":[null,"Permintaan pertemanan"],"My contacts":[null,"Teman saya"],"Pending contacts":[null,"Teman yang menunggu"],"Custom status":[null,"Status kustom"],"Click to change your chat status":[null,"Klik untuk mengganti status"],"Click here to write a custom status message":[null,"Klik untuk menulis status kustom"],online:[null,"terhubung"],busy:[null,"sibuk"],"away for long":[null,"lama tak di tempat"],away:[null,"tak di tempat"],"I am %1$s":[null,"Saya %1$s"],"Sign in":[null,"Masuk"],"XMPP/Jabber Username:":[null,"Nama pengguna XMPP/Jabber:"],"Password:":[null,"Kata sandi:"],"Log In":[null,"Masuk"],"BOSH Service URL:":[null,"URL Layanan BOSH:"]}}};typeof define=="function"&&define.amd?define("id",["jed"],function(){return t(new Jed(n))}):(window.locales||(window.locales={}),window.locales.id=t(new Jed(n)))}(this,function(e){return e}),function(e,t){var n={domain:"converse",locale_data:{converse:{"":{"Project-Id-Version":"Converse.js 0.4","Report-Msgid-Bugs-To":"","POT-Creation-Date":"2013-09-15 21:55+0200","PO-Revision-Date":"2013-09-15 22:00+0200","Last-Translator":"Fabio Bas <ctrlaltca@gmail.com>","Language-Team":"Italian",Language:"it","MIME-Version":"1.0","Content-Type":"text/plain; charset=UTF-8","Content-Transfer-Encoding":"8bit","Plural-Forms":"nplurals=2; plural=(n != 1);",domain:"converse",lang:"it",plural_forms:"nplurals=2; plural=(n != 1);"},unencrypted:[null,""],unverified:[null,""],verified:[null,""],finished:[null,""],Disconnected:[null,"Disconnesso"],Error:[null,"Errore"],Connecting:[null,"Connessione in corso"],"Connection Failed":[null,"Connessione fallita"],Authenticating:[null,"Autenticazione in corso"],"Authentication Failed":[null,"Autenticazione fallita"],Disconnecting:[null,"Disconnessione in corso"],"Re-establishing encrypted session":[null,""],"Your browser needs to generate a private key, which will be used in your encrypted chat session. This can take up to 30 seconds during which your browser might freeze and become unresponsive.":[null,""],"Private key generated.":[null,""],"Authentication request from %1$s\n\nYour buddy is attempting to verify your identity, by asking you the question below.\n\n%2$s":[null,""],"Could not verify this user's identify.":[null,""],"Personal message":[null,"Messaggio personale"],"Start encrypted conversation":[null,""],"Refresh encrypted conversation":[null,""],"End encrypted conversation":[null,""],"Verify with SMP":[null,""],"Verify with fingerprints":[null,""],"What's this?":[null,""],me:[null,""],"Show this menu":[null,"Mostra questo menu"],"Write in the third person":[null,"Scrivi in terza persona"],"Remove messages":[null,"Rimuovi messaggi"],"Your message could not be sent":[null,""],"We received an unencrypted message":[null,""],"We received an unreadable encrypted message":[null,""],"This user has requested an encrypted session.":[null,""],"Here are the fingerprints, please confirm them with %1$s, outside of this chat.\n\nFingerprint for you, %2$s: %3$s\n\nFingerprint for %1$s: %4$s\n\nIf you have confirmed that the fingerprints match, click OK, otherwise click Cancel.":[null,""],"You will be prompted to provide a security question and then an answer to that question.\n\nYour buddy will then be prompted the same question and if they type the exact same answer (case sensitive), their identity will have been verified.":[null,""],"What is your security question?":[null,""],"What is the answer to the security question?":[null,""],"Invalid authentication scheme provided":[null,""],"Your messages are not encrypted anymore":[null,""],"Your messages are now encrypted but your buddy's identity has not been verified.":[null,""],"Your buddy's identify has been verified.":[null,""],"Your buddy has ended encryption on their end, you should do the same.":[null,""],"Your messages are not encrypted. Click here to enable OTR encryption.":[null,""],"Your messages are encrypted, but your buddy has not been verified.":[null,""],"Your messages are encrypted and your buddy verified.":[null,""],"Your buddy has closed their end of the private session, you should do the same":[null,""],Contacts:[null,"Contatti"],Online:[null,"In linea"],Busy:[null,"Occupato"],Away:[null,"Assente"],Offline:[null,"Non in linea"],"Click to add new chat contacts":[null,"Clicca per aggiungere nuovi contatti alla chat"],"Add a contact":[null,"Aggiungi contatti"],"Contact username":[null,"Nome utente del contatto"],Add:[null,"Aggiungi"],"Contact name":[null,"Nome del contatto"],Search:[null,"Cerca"],"No users found":[null,"Nessun utente trovato"],"Click to add as a chat contact":[null,"Clicca per aggiungere il contatto alla chat"],"Click to open this room":[null,"Clicca per aprire questa stanza"],"Show more information on this room":[null,"Mostra più informazioni su questa stanza"],"Description:":[null,"Descrizione:"],"Occupants:":[null,"Utenti presenti:"],"Features:":[null,"Funzionalità:"],"Requires authentication":[null,"Richiede autenticazione"],Hidden:[null,"Nascosta"],"Requires an invitation":[null,"Richiede un invito"],Moderated:[null,"Moderata"],"Non-anonymous":[null,"Non-anonima"],"Open room":[null,"Stanza aperta"],"Permanent room":[null,"Stanza permanente"],Public:[null,"Pubblica"],"Semi-anonymous":[null,"Semi-anonima"],"Temporary room":[null,"Stanza temporanea"],Unmoderated:[null,"Non moderata"],Rooms:[null,"Stanze"],"Room name":[null,"Nome stanza"],Nickname:[null,"Soprannome"],Server:[null,"Server"],Join:[null,"Entra"],"Show rooms":[null,"Mostra stanze"],"No rooms on %1$s":[null,"Nessuna stanza su %1$s"],"Rooms on %1$s":[null,"Stanze su %1$s"],"Set chatroom topic":[null,"Cambia oggetto della stanza"],"Kick user from chatroom":[null,"Espelli utente dalla stanza"],"Ban user from chatroom":[null,"Bandisci utente dalla stanza"],Message:[null,"Messaggio"],Save:[null,"Salva"],Cancel:[null,"Annulla"],"An error occurred while trying to save the form.":[null,"Errore durante il salvataggio del modulo"],"This chatroom requires a password":[null,"Questa stanza richiede una password"],"Password: ":[null,"Password: "],Submit:[null,"Invia"],"This room is not anonymous":[null,"Questa stanza non è anonima"],"This room now shows unavailable members":[null,"Questa stanza mostra i membri non disponibili al momento"],"This room does not show unavailable members":[null,"Questa stanza non mostra i membri non disponibili"],"Non-privacy-related room configuration has changed":[null,"Una configurazione della stanza non legata alla privacy è stata modificata"],"Room logging is now enabled":[null,"La registrazione è abilitata nella stanza"],"Room logging is now disabled":[null,"La registrazione è disabilitata nella stanza"],"This room is now non-anonymous":[null,"Questa stanza è non-anonima"],"This room is now semi-anonymous":[null,"Questa stanza è semi-anonima"],"This room is now fully-anonymous":[null,"Questa stanza è completamente-anonima"],"A new room has been created":[null,"Una nuova stanza è stata creata"],"Your nickname has been changed":[null,"Il tuo soprannome è stato cambiato"],"<strong>%1$s</strong> has been banned":[null,"<strong>%1$s</strong> è stato bandito"],"<strong>%1$s</strong> has been kicked out":[null,"<strong>%1$s</strong> è stato espulso"],"<strong>%1$s</strong> has been removed because of an affiliation change":[null,"<strong>%1$s</strong> è stato rimosso a causa di un cambio di affiliazione"],"<strong>%1$s</strong> has been removed for not being a member":[null,"<strong>%1$s</strong> è stato rimosso in quanto non membro"],"You have been banned from this room":[null,"Sei stato bandito da questa stanza"],"You have been kicked from this room":[null,"Sei stato espulso da questa stanza"],"You have been removed from this room because of an affiliation change":[null,"Sei stato rimosso da questa stanza a causa di un cambio di affiliazione"],"You have been removed from this room because the room has changed to members-only and you're not a member":[null,"Sei stato rimosso da questa stanza poiché ora la stanza accetta solo membri"],"You have been removed from this room because the MUC (Multi-user chat) service is being shut down.":[null,"Sei stato rimosso da questa stanza poiché il servizio MUC (Chat multi utente) è in fase di spegnimento"],"You are not on the member list of this room":[null,"Non sei nella lista dei membri di questa stanza"],"No nickname was specified":[null,"Nessun soprannome specificato"],"You are not allowed to create new rooms":[null,"Non ti è permesso creare nuove stanze"],"Your nickname doesn't conform to this room's policies":[null,"Il tuo soprannome non è conforme alle regole di questa stanza"],"Your nickname is already taken":[null,"Il tuo soprannome è già utilizzato"],"This room does not (yet) exist":[null,"Questa stanza non esiste (per ora)"],"This room has reached it's maximum number of occupants":[null,"Questa stanza ha raggiunto il limite massimo di utenti"],"Topic set by %1$s to: %2$s":[null,"Topic impostato da %1$s a: %2$s"],"This user is a moderator":[null,"Questo utente è un moderatore"],"This user can send messages in this room":[null,"Questo utente può inviare messaggi in questa stanza"],"This user can NOT send messages in this room":[null,"Questo utente NON può inviare messaggi in questa stanza"],"Click to chat with this contact":[null,"Clicca per parlare con questo contatto"],"Click to remove this contact":[null,"Clicca per rimuovere questo contatto"],"This contact is busy":[null,""],"This contact is online":[null,""],"This contact is offline":[null,""],"This contact is unavailable":[null,"Questa stanza mostra i membri non disponibili al momento"],"This contact is away for an extended period":[null,""],"This contact is away":[null,""],"Contact requests":[null,"Richieste dei contatti"],"My contacts":[null,"I miei contatti"],"Pending contacts":[null,"Contatti in attesa"],"Custom status":[null,"Stato personalizzato"],"Click to change your chat status":[null,"Clicca per cambiare il tuo stato"],"Click here to write a custom status message":[null,"Clicca qui per scrivere un messaggio di stato personalizzato"],online:[null,"in linea"],busy:[null,"occupato"],"away for long":[null,"assente da molto"],away:[null,"assente"],"I am %1$s":[null,"Sono %1$s"],"Sign in":[null,"Accesso"],"XMPP/Jabber Username:":[null,"Nome utente:"],"Password:":[null,"Password:"],"Log In":[null,"Entra"],"BOSH Service URL:":[null,"Indirizzo servizio BOSH:"],"Online Contacts":[null,"Contatti in linea"],Connected:[null,"Connesso"],Attached:[null,"Allegato"]}}};typeof define=="function"&&define.amd?define("it",["jed"],function(){return t(new Jed(n))}):(window.locales||(window.locales={}),window.locales.it=t(new Jed(n)))}(this,function(e){return e}),function(e,t){var n={domain:"converse",locale_data:{converse:{"":{"Project-Id-Version":"Converse.js 0.4","Report-Msgid-Bugs-To":"","POT-Creation-Date":"2014-01-07 11:12+0900","PO-Revision-Date":"2014-01-07 11:32+0900","Last-Translator":"Mako N <mako@pasero.net>","Language-Team":"Language JA",Language:"JA","MIME-Version":"1.0","Content-Type":"text/plain; charset=UTF-8","Content-Transfer-Encoding":"8bit","Plural-Forms":"nplurals=1; plural=0;"},unencrypted:[null,""],unverified:[null,""],verified:[null,""],finished:[null,""],"This contact is busy":[null,""],"This contact is online":[null,""],"This contact is offline":[null,""],"This contact is unavailable":[null,""],"This contact is away for an extended period":[null,""],"This contact is away":[null,""],Disconnected:[null,""],Error:[null,""],Connecting:[null,""],"Connection Failed":[null,""],Authenticating:[null,""],"Authentication Failed":[null,""],Disconnecting:[null,""],"Online Contacts":[null,""],"Re-establishing encrypted session":[null,""],"Your browser needs to generate a private key, which will be used in your encrypted chat session. This can take up to 30 seconds during which your browser might freeze and become unresponsive.":[null,"使30"],"Private key generated.":[null,""],"Authentication request from %1$s\n\nYour buddy is attempting to verify your identity, by asking you the question below.\n\n%2$s":[null,"%1$s \n\n\n\n%2$s"],"Could not verify this user's identify.":[null,""],"Personal message":[null,""],"Start encrypted conversation":[null,""],"Refresh encrypted conversation":[null,""],"End encrypted conversation":[null,""],"Verify with SMP":[null,"SMP "],"Verify with fingerprints":[null,""],"What's this?":[null,"?"],me:[null,""],"Show this menu":[null,""],"Write in the third person":[null,""],"Remove messages":[null,""],"Your message could not be sent":[null,""],"We received an unencrypted message":[null,""],"We received an unreadable encrypted message":[null,""],"This user has requested an encrypted session.":[null,""],"Here are the fingerprints, please confirm them with %1$s, outside of this chat.\n\nFingerprint for you, %2$s: %3$s\n\nFingerprint for %1$s: %4$s\n\nIf you have confirmed that the fingerprints match, click OK, otherwise click Cancel.":[null," %1$s \n\n %2$s : %3$s\n\n%1$s : %4$s\n\nOK"],"You will be prompted to provide a security question and then an answer to that question.\n\nYour buddy will then be prompted the same question and if they type the exact same answer (case sensitive), their identity will have been verified.":[null,"\n\n()"],"What is your security question?":[null,"?"],"What is the answer to the security question?":[null,"?"],"Invalid authentication scheme provided":[null,""],"Your messages are not encrypted anymore":[null,""],"Your messages are now encrypted but your buddy's identity has not been verified.":[null,""],"Your buddy's identify has been verified.":[null,""],"Your buddy has ended encryption on their end, you should do the same.":[null,""],"Your messages are not encrypted. Click here to enable OTR encryption.":[null,"OTR "],"Your messages are encrypted, but your buddy has not been verified.":[null,""],"Your messages are encrypted and your buddy verified.":[null,""],"Your buddy has closed their end of the private session, you should do the same":[null,""],Contacts:[null,""],Online:[null,""],Busy:[null,""],Away:[null,""],Offline:[null,""],"Click to add new chat contacts":[null,""],"Add a contact":[null,""],"Contact username":[null,""],Add:[null,""],"Contact name":[null,""],Search:[null,""],"No users found":[null,""],"Click to add as a chat contact":[null,""],"Click to open this room":[null,""],"Show more information on this room":[null,""],"Description:":[null,": "],"Occupants:":[null,":"],"Features:":[null,":"],"Requires authentication":[null,""],Hidden:[null,""],"Requires an invitation":[null,""],Moderated:[null,""],"Non-anonymous":[null,""],"Open room":[null,""],"Permanent room":[null,""],Public:[null,""],"Semi-anonymous":[null,""],"Temporary room":[null,""],Unmoderated:[null,""],Rooms:[null,""],"Room name":[null,""],Nickname:[null,""],Server:[null,""],Join:[null,""],"Show rooms":[null,""],"No rooms on %1$s":[null,"%1$s "],"Rooms on %1$s":[null,"%1$s "],"Set chatroom topic":[null,""],"Kick user from chatroom":[null,""],"Ban user from chatroom":[null,""],Message:[null,""],Save:[null,""],Cancel:[null,""],"An error occurred while trying to save the form.":[null,""],"This chatroom requires a password":[null,""],"Password: ":[null,":"],Submit:[null,""],"This room is not anonymous":[null,""],"This room now shows unavailable members":[null,""],"This room does not show unavailable members":[null,""],"Non-privacy-related room configuration has changed":[null,"()"],"Room logging is now enabled":[null,""],"Room logging is now disabled":[null,""],"This room is now non-anonymous":[null,""],"This room is now semi-anonymous":[null,""],"This room is now fully-anonymous":[null,""],"A new room has been created":[null,""],"Your nickname has been changed":[null,""],"<strong>%1$s</strong> has been banned":[null,"<strong>%1$s</strong> "],"<strong>%1$s</strong> has been kicked out":[null,"<strong>%1$s</strong> "],"<strong>%1$s</strong> has been removed because of an affiliation change":[null,"<strong>%1$s</strong> "],"<strong>%1$s</strong> has been removed for not being a member":[null,"<strong>%1$s</strong> "],"You have been banned from this room":[null,""],"You have been kicked from this room":[null,""],"You have been removed from this room because of an affiliation change":[null,""],"You have been removed from this room because the room has changed to members-only and you're not a member":[null,""],"You have been removed from this room because the MUC (Multi-user chat) service is being shut down.":[null,"MUC()"],"You are not on the member list of this room":[null,""],"No nickname was specified":[null,""],"You are not allowed to create new rooms":[null,""],"Your nickname doesn't conform to this room's policies":[null,""],"Your nickname is already taken":[null,"使"],"This room does not (yet) exist":[null,""],"This room has reached it's maximum number of occupants":[null,""],"Topic set by %1$s to: %2$s":[null,"%1$s : %2$s"],"This user is a moderator":[null,""],"This user can send messages in this room":[null,""],"This user can NOT send messages in this room":[null,""],"Click to chat with this contact":[null,""],"Click to remove this contact":[null,""],"Contact requests":[null,""],"My contacts":[null,""],"Pending contacts":[null,""],"Custom status":[null,""],"Click to change your chat status":[null,""],"Click here to write a custom status message":[null,""],online:[null,""],busy:[null,""],"away for long":[null,""],away:[null,""],"I am %1$s":[null," %1$s"],"Sign in":[null,""],"XMPP/Jabber Username:":[null,"XMPP/Jabber :"],"Password:":[null,":"],"Log In":[null,""],"BOSH Service URL:":[null,"BOSH URL:"]}}};typeof define=="function"&&define.amd?define("ja",["jed"],function(){return t(new Jed(n))}):(window.locales||(window.locales={}),window.locales.ja=t(new Jed(n)))}(this,function(e){return e}),function(e,t){var n={domain:"converse",locale_data:{converse:{"":{"Project-Id-Version":"Converse.js 0.4","Report-Msgid-Bugs-To":"","POT-Creation-Date":"2013-09-15 21:55+0200","PO-Revision-Date":"2013-09-15 22:03+0200","Last-Translator":"Maarten Kling <maarten@fourdigits.nl>","Language-Team":"Dutch",Language:"nl","MIME-Version":"1.0","Content-Type":"text/plain; charset=UTF-8","Content-Transfer-Encoding":"8bit","Plural-Forms":"nplurals=2; plural=(n != 1);",domain:"converse",lang:"nl",plural_forms:"nplurals=2; plural=(n != 1);"},unencrypted:[null,"ongecodeerde"],unverified:[null,"niet geverifieerd"],verified:[null,"geverifieerd"],finished:[null,"klaar"],Disconnected:[null,"Verbinding verbroken."],Error:[null,"Error"],Connecting:[null,"Verbinden"],"Connection Failed":[null,"Verbinden mislukt"],Authenticating:[null,"Authenticeren"],"Authentication Failed":[null,"Authenticeren mislukt"],Disconnecting:[null,""],"Re-establishing encrypted session":[null,"Bezig versleutelde sessie te herstellen"],"Your browser needs to generate a private key, which will be used in your encrypted chat session. This can take up to 30 seconds during which your browser might freeze and become unresponsive.":[null,""],"Private key generated.":[null,"Private key gegenereerd."],"Authentication request from %1$s\n\nYour buddy is attempting to verify your identity, by asking you the question below.\n\n%2$s":[null,""],"Could not verify this user's identify.":[null,"Niet kon de identiteit van deze gebruiker niet identificeren."],"Personal message":[null,"Persoonlijk bericht"],"Start encrypted conversation":[null,"Start encrypted gesprek"],"Refresh encrypted conversation":[null,"Ververs encrypted gesprek"],"End encrypted conversation":[null,"Beeindig encrypted gesprek"],"Verify with SMP":[null,""],"Verify with fingerprints":[null,""],"What's this?":[null,"Wat is dit?"],me:[null,"ikzelf"],"Show this menu":[null,"Toon dit menu"],"Write in the third person":[null,"Schrijf in de 3de persoon"],"Remove messages":[null,"Verwijder bericht"],"Your message could not be sent":[null,"Je bericht kon niet worden verzonden"],"We received an unencrypted message":[null,"We ontvingen een unencrypted bericht "],"We received an unreadable encrypted message":[null,"We ontvangen een onleesbaar unencrypted bericht"],"This user has requested an encrypted session.":[null,"Deze gebruiker heeft een encrypted sessie aangevraagd."],"Here are the fingerprints, please confirm them with %1$s, outside of this chat.\n\nFingerprint for you, %2$s: %3$s\n\nFingerprint for %1$s: %4$s\n\nIf you have confirmed that the fingerprints match, click OK, otherwise click Cancel.":[null,""],"You will be prompted to provide a security question and then an answer to that question.\n\nYour buddy will then be prompted the same question and if they type the exact same answer (case sensitive), their identity will have been verified.":[null,""],"What is your security question?":[null,"Wat is jou sericury vraag?"],"What is the answer to the security question?":[null,"Wat is het antwoord op de security vraag?"],"Invalid authentication scheme provided":[null,""],"Your messages are not encrypted anymore":[null,"Je berichten zijn niet meer encrypted"],"Your messages are now encrypted but your buddy's identity has not been verified.":[null,""],"Your buddy's identify has been verified.":[null,"Jou contact is geverifieerd"],"Your buddy has ended encryption on their end, you should do the same.":[null,"Jou contact heeft encryption aanstaan, je moet het zelfde doen."],"Your messages are not encrypted. Click here to enable OTR encryption.":[null,"Jou bericht is niet encrypted. KLik hier om ORC encrytion aan te zetten."],"Your messages are encrypted, but your buddy has not been verified.":[null,"Jou berichten zijn encrypted, maar je contact is niet geverifieerd."],"Your messages are encrypted and your buddy verified.":[null,"Jou bericht is encrypted en jou contact is geverifieerd."],"Your buddy has closed their end of the private session, you should do the same":[null,""],Contacts:[null,"Contacten"],Online:[null,"Online"],Busy:[null,"Bezet"],Away:[null,"Afwezig"],Offline:[null,""],"Click to add new chat contacts":[null,"Klik om nieuwe contacten toe te voegen"],"Add a contact":[null,"Voeg contact toe"],"Contact username":[null,"Contact gebruikernaam"],Add:[null,"Toevoegen"],"Contact name":[null,"Contact naam"],Search:[null,"Zoeken"],"No users found":[null,"Geen gebruikers gevonden"],"Click to add as a chat contact":[null,"Klik om contact toe te voegen"],"Click to open this room":[null,"Klik om room te openen"],"Show more information on this room":[null,"Toon meer informatie over deze room"],"Description:":[null,"Beschrijving"],"Occupants:":[null,"Deelnemers:"],"Features:":[null,"Functies:"],"Requires authentication":[null,"Verificatie vereist"],Hidden:[null,"Verborgen"],"Requires an invitation":[null,"Veriest een uitnodiging"],Moderated:[null,"Gemodereerd"],"Non-anonymous":[null,"Niet annoniem"],"Open room":[null,"Open room"],"Permanent room":[null,"Blijvend room"],Public:[null,"Publiek"],"Semi-anonymous":[null,"Semi annoniem"],"Temporary room":[null,"Tijdelijke room"],Unmoderated:[null,"Niet gemodereerd"],Rooms:[null,"Rooms"],"Room name":[null,"Room naam"],Nickname:[null,"Nickname"],Server:[null,"Server"],Join:[null,"Deelnemen"],"Show rooms":[null,"Toon rooms"],"No rooms on %1$s":[null,"Geen room op %1$s"],"Rooms on %1$s":[null,"Room op %1$s"],"Set chatroom topic":[null,"Zet chatroom topic"],"Kick user from chatroom":[null,"Goei gebruiker uit chatroom"],"Ban user from chatroom":[null,"Ban gebruiker van chatroom"],Message:[null,"Bericht"],Save:[null,"Opslaan"],Cancel:[null,"Annuleren"],"An error occurred while trying to save the form.":[null,"Een error tijdens het opslaan van het formulier."],"This chatroom requires a password":[null,"Chatroom heeft een wachtwoord"],"Password: ":[null,"Wachtwoord: "],Submit:[null,"Indienen"],"This room is not anonymous":[null,"Deze room is niet annoniem"],"This room now shows unavailable members":[null,""],"This room does not show unavailable members":[null,""],"Non-privacy-related room configuration has changed":[null,""],"Room logging is now enabled":[null,""],"Room logging is now disabled":[null,""],"This room is now non-anonymous":[null,"Deze room is nu niet annoniem"],"This room is now semi-anonymous":[null,"Deze room is nu semie annoniem"],"This room is now fully-anonymous":[null,"Deze room is nu volledig annoniem"],"A new room has been created":[null,"Een nieuwe room is gemaakt"],"Your nickname has been changed":[null,"Je nickname is veranderd"],"<strong>%1$s</strong> has been banned":[null,"<strong>%1$s</strong> is verbannen"],"<strong>%1$s</strong> has been kicked out":[null,"<strong>%1$s</strong> has been kicked out"],"<strong>%1$s</strong> has been removed because of an affiliation change":[null,""],"<strong>%1$s</strong> has been removed for not being a member":[null,""],"You have been banned from this room":[null,"Je bent verbannen uit deze room"],"You have been kicked from this room":[null,"Je bent uit de room gegooid"],"You have been removed from this room because of an affiliation change":[null,""],"You have been removed from this room because the room has changed to members-only and you're not a member":[null,""],"You have been removed from this room because the MUC (Multi-user chat) service is being shut down.":[null,""],"You are not on the member list of this room":[null,"Je bent niet een gebruiker van deze room"],"No nickname was specified":[null,"Geen nickname ingegeven"],"You are not allowed to create new rooms":[null,"Je bent niet toegestaan nieuwe rooms te maken"],"Your nickname doesn't conform to this room's policies":[null,"Je nickname is niet conform policy"],"Your nickname is already taken":[null,"Je nickname bestaat al"],"This room does not (yet) exist":[null,"Deze room bestaat niet"],"This room has reached it's maximum number of occupants":[null,"Deze room heeft het maximale aantal gebruikers"],"Topic set by %1$s to: %2$s":[null,""],"This user is a moderator":[null,"Dit is een moderator"],"This user can send messages in this room":[null,"Deze gebruiker kan berichten sturen in deze room"],"This user can NOT send messages in this room":[null,"Deze gebruiker kan NIET een bericht sturen in deze room"],"Click to chat with this contact":[null,"Klik om te chatten met contact"],"Click to remove this contact":[null,"Klik om contact te verwijderen"],"This contact is busy":[null,"Contact is bezet"],"This contact is online":[null,"Contact is online"],"This contact is offline":[null,"Contact is offline"],"This contact is unavailable":[null,"Contact is niet beschikbaar"],"This contact is away for an extended period":[null,"Contact is afwezig voor lange periode"],"This contact is away":[null,"Conact is afwezig"],"Contact requests":[null,"Contact uitnodiging"],"My contacts":[null,"Mijn contacts"],"Pending contacts":[null,"Conacten in afwachting van"],"Custom status":[null,""],"Click to change your chat status":[null,"Klik hier om status te wijzigen"],"Click here to write a custom status message":[null,"Klik hier om custom status bericht te maken"],online:[null,"online"],busy:[null,"bezet"],"away for long":[null,"afwezig lange tijd"],away:[null,"afwezig"],"I am %1$s":[null,"Ik ben %1$s"],"Sign in":[null,"Aanmelden"],"XMPP/Jabber Username:":[null,"XMPP/Jabber Username:"],"Password:":[null,"Wachtwoord:"],"Log In":[null,"Aanmelden"],"BOSH Service URL:":[null,""],"Online Contacts":[null,"Online Contacten"],"%1$s is typing":[null,"%1$s is aan typen"],Connected:[null,"Verbonden"],Attached:[null,"Bijlage"]}}};typeof define=="function"&&define.amd?define("nl",["jed"],function(){return t(new Jed(n))}):(window.locales||(window.locales={}),window.locales.nl=t(new Jed(n)))}(this,function(e){return e}),function(e,t){var n={domain:"converse",locale_data:{converse:{"":{"Project-Id-Version":"Converse.js 0.6.3","Report-Msgid-Bugs-To":"","POT-Creation-Date":"2013-09-15 21:55+0200","PO-Revision-Date":"2014-07-07 11:02+0200","Last-Translator":"Alan Meira <alan@engarte.com>","Language-Team":"Brazilian Portuguese",Language:"pt_BR","MIME-Version":"1.0","Content-Type":"text/plain; charset=UTF-8","Content-Transfer-Encoding":"8bit","Plural-Forms":"nplurals=2; plural=(n > 1);",domain:"converse",lang:"pt_BR",plural_forms:"nplurals=2; plural=(n != 1);"},unencrypted:[null,"não-criptografado"],unverified:[null,"não-verificado"],verified:[null,"não-verificado"],finished:[null,"finalizado"],Disconnected:[null,"Desconectado"],Error:[null,"Erro"],Connecting:[null,"Conectando"],"Connection Failed":[null,"Falha de conexão"],Authenticating:[null,"Autenticando"],"Authentication Failed":[null,"Falha de autenticação"],Disconnecting:[null,"Desconectando"],"Re-establishing encrypted session":[null,"Reestabelecendo sessão criptografada"],"Your browser needs to generate a private key, which will be used in your encrypted chat session. This can take up to 30 seconds during which your browser might freeze and become unresponsive.":[null,"Seu navegador precisa gerar uma chave-privada, que será usada em sua sessão criptografada de bate-papo. Isso pode levar até 30 segundos durante os quais seu navegador poderá se travar ou não responder."],"Private key generated.":[null,"Chave-privada gerada:"],"Authentication request from %1$s\n\nYour buddy is attempting to verify your identity, by asking you the question below.\n\n%2$s":[null,"Pedido de autenticação de %$s\n\nSeu contato está tentando verificar sua identidade, perguntando a questão abaixo.\n\n%2$s"],"Could not verify this user's identify.":[null,"Não foi possível verificar a identidade deste usuário."],"Personal message":[null,"Mensagem pessoal"],"Start encrypted conversation":[null,"Iniciar conversa criptografada"],"Refresh encrypted conversation":[null,"Atualizar conversa criptografada"],"End encrypted conversation":[null,"Finalizar conversa criptografada"],"Verify with SMP":[null,"Verificar com SMP"],"Verify with fingerprints":[null,"Verificar com assinatura digital"],"What's this?":[null,"O que é isso?"],me:[null,"eu"],"Show this menu":[null,"Mostrar o menu"],"Write in the third person":[null,"Escrever em terceira pessoa"],"Remove messages":[null,"Remover mensagens"],"Your message could not be sent":[null,"Sua mensagem não pôde ser enviada"],"We received an unencrypted message":[null,"Recebemos uma mensagem não-criptografada"],"We received an unreadable encrypted message":[null,"Recebemos uma mensagem não-criptografada ilegível"],"This user has requested an encrypted session.":[null,"Usuário pediu uma sessão criptografada."],"Here are the fingerprints, please confirm them with %1$s, outside of this chat.\n\nFingerprint for you, %2$s: %3$s\n\nFingerprint for %1$s: %4$s\n\nIf you have confirmed that the fingerprints match, click OK, otherwise click Cancel.":[null,"Aqui estão as assinaturas digitais, por favor confirme elas com %1$s, fora deste chat.\n\nAssinaturas para você, %2$s: %3$s\n\nAssinaturas para %1$s: %4$s\n\nSe você tiver confirmado que as assinaturas conferem, clique OK, caso contrário, clique Cancel."],"You will be prompted to provide a security question and then an answer to that question.\n\nYour buddy will then be prompted the same question and if they type the exact same answer (case sensitive), their identity will have been verified.":[null,"Será solicitado que você informe uma pergunta de segurança e também uma resposta.\n\nNós iremos, então, transfeir a pergunta para seu contato e caso ele envie corretamente a mesma resposta (caso sensitivo), a identidade dele será verificada."],"What is your security question?":[null,"Qual é a sua pergunta de segurança?"],"What is the answer to the security question?":[null,"Qual é a resposta para a pergunta de segurança?"],"Invalid authentication scheme provided":[null,"Schema de autenticação fornecido é inválido"],"Your messages are not encrypted anymore":[null,"Suas mensagens não estão mais criptografadas"],"Your messages are now encrypted but your buddy's identity has not been verified.":[null,"Suas mensagens estão agora criptografadas mas a identidade do contato não foi confirmada."],"Your buddy's identify has been verified.":[null,"A identidade do contato foi verificada."],"Your buddy has ended encryption on their end, you should do the same.":[null,"Seu contato parou de usar criptografia, você deveria fazer o mesmo."],"Your messages are not encrypted. Click here to enable OTR encryption.":[null,"Suas mensagens não estão criptografadas. Clique aqui para habilitar criptografia OTR."],"Your messages are encrypted, but your buddy has not been verified.":[null,"Suas mensagens estão criptografadas, mas seu contato não foi verificado."],"Your messages are encrypted and your buddy verified.":[null,"Suas mensagens estão criptografadas e seu contato verificado."],"Your buddy has closed their end of the private session, you should do the same":[null,"Seu contato fechou a sessão privada, você deveria fazer o mesmo"],Contacts:[null,"Contatos"],Online:[null,"Online"],Busy:[null,"Ocupado"],Away:[null,"Ausente"],Offline:[null,"Offline"],"Click to add new chat contacts":[null,"Clique para adicionar novos contatos ao chat"],"Add a contact":[null,"Adicionar contato"],"Contact username":[null,"Usuário do contatt"],Add:[null,"Adicionar"],"Contact name":[null,"Nome do contato"],Search:[null,"Procurar"],"No users found":[null,"Não foram encontrados usuários"],"Click to add as a chat contact":[null,"Clique para adicionar como um contato do chat"],"Click to open this room":[null,"CLique para abrir a sala"],"Show more information on this room":[null,"Mostrar mais informações nessa sala"],"Description:":[null,"Descrição:"],"Occupants:":[null,"Ocupantes:"],"Features:":[null,"Recursos:"],"Requires authentication":[null,"Requer autenticação"],Hidden:[null,"Escondido"],"Requires an invitation":[null,"Requer um convite"],Moderated:[null,"Moderado"],"Non-anonymous":[null,"Não anônimo"],"Open room":[null,"Sala aberta"],"Permanent room":[null,"Sala permanente"],Public:[null,"Público"],"Semi-anonymous":[null,"Semi anônimo"],"Temporary room":[null,"Sala temporária"],Unmoderated:[null,"Sem moderação"],Rooms:[null,"Salas"],"Room name":[null,"Nome da sala"],Nickname:[null,"Apelido"],Server:[null,"Server"],Join:[null,"Entrar"],"Show rooms":[null,"Mostar salas"],"No rooms on %1$s":[null,"Sem salas em %1$s"],"Rooms on %1$s":[null,"Salas em %1$s"],"Set chatroom topic":[null,"Definir tópico do chat"],"Kick user from chatroom":[null,"Expulsar usuário do chat"],"Ban user from chatroom":[null,"Banir usuário do chat"],Message:[null,"Mensagem"],Save:[null,"Salvar"],Cancel:[null,"Cancelar"],"An error occurred while trying to save the form.":[null,"Ocorreu um erro enquanto tentava salvar o formulário"],"This chatroom requires a password":[null,"Esse chat precisa de senha"],"Password: ":[null,"Senha: "],Submit:[null,"Enviar"],"This room is not anonymous":[null,"Essa sala não é anônima"],"This room now shows unavailable members":[null,"Agora esta sala mostra membros indisponíveis"],"This room does not show unavailable members":[null,"Essa sala não mostra membros indisponíveis"],"Non-privacy-related room configuration has changed":[null,"Configuraçõs não relacionadas à privacidade mudaram"],"Room logging is now enabled":[null,"O log da sala está ativado"],"Room logging is now disabled":[null,"O log da sala está desativado"],"This room is now non-anonymous":[null,"Esse sala é não anônima"],"This room is now semi-anonymous":[null,"Essa sala agora é semi anônima"],"This room is now fully-anonymous":[null,"Essa sala agora é totalmente anônima"],"A new room has been created":[null,"Uma nova sala foi criada"],"Your nickname has been changed":[null,"Seu apelido foi mudado"],"<strong>%1$s</strong> has been banned":[null,"<strong>%1$s</strong> foi banido"],"<strong>%1$s</strong> has been kicked out":[null,"<strong>%1$s</strong> foi expulso"],"<strong>%1$s</strong> has been removed because of an affiliation change":[null,"<srtong>%1$s</strong> foi removido por causa de troca de associação"],"<strong>%1$s</strong> has been removed for not being a member":[null,"<strong>%1$s</strong> foi removido por não ser um membro"],"You have been banned from this room":[null,"Você foi banido dessa sala"],"You have been kicked from this room":[null,"Você foi expulso dessa sala"],"You have been removed from this room because of an affiliation change":[null,"Você foi removido da sala devido a uma mudança de associação"],"You have been removed from this room because the room has changed to members-only and you're not a member":[null,"Você foi removido da sala porque ela foi mudada para somente membrose você não é um membro"],"You have been removed from this room because the MUC (Multi-user chat) service is being shut down.":[null,"Você foi removido da sala devido a MUC (Multi-user chat)o serviço está sendo desligado"],"You are not on the member list of this room":[null,"Você não é membro dessa sala"],"No nickname was specified":[null,"Você não escolheu um apelido "],"You are not allowed to create new rooms":[null,"Você não tem permitição de criar novas salas"],"Your nickname doesn't conform to this room's policies":[null,"Seu apelido não está de acordo com as regras da sala"],"Your nickname is already taken":[null,"Seu apelido já foi escolhido"],"This room does not (yet) exist":[null,"A sala não existe (ainda)"],"This room has reached it's maximum number of occupants":[null,"A sala atingiu o número máximo de ocupantes"],"Topic set by %1$s to: %2$s":[null,"Topico definido por %1$s para: %2$s"],"This user is a moderator":[null,"Esse usuário é o moderador"],"This user can send messages in this room":[null,"Esse usuário pode enviar mensagens nessa sala"],"This user can NOT send messages in this room":[null,"Esse usuário NÃO pode enviar mensagens nessa sala"],"Click to chat with this contact":[null,"Clique para conversar com o contato"],"Click to remove this contact":[null,"Clique para remover o contato"],"This contact is busy":[null,"Este contato está ocupado"],"This contact is online":[null,"Este contato está online"],"This contact is offline":[null,"Este contato está offline"],"This contact is unavailable":[null,"Este contato está indisponível"],"This contact is away for an extended period":[null,"Este contato está ausente por um longo período"],"This contact is away":[null,"Este contato está ausente"],"Contact requests":[null,"Solicitação de contatos"],"My contacts":[null,"Meus contatos"],"Pending contacts":[null,"Contados pendentes"],"Custom status":[null,"Status customizado"],"Click to change your chat status":[null,"Clique para mudar seu status no chat"],"Click here to write a custom status message":[null,"Clique aqui para customizar a mensagem de status"],online:[null,"online"],busy:[null,"ocupado"],"away for long":[null,"ausente a bastante tempo"],away:[null,"ausente"],"I am %1$s":[null,"Estou %1$s"],"Sign in":[null,"Conectar-se"],"XMPP/Jabber Username:":[null,"Usuário XMPP/Jabber:"],"Password:":[null,"Senha:"],"Log In":[null,"Entrar"],"BOSH Service URL:":[null,"URL de serviço BOSH:"],"Online Contacts":[null,"Contatos online"],"%1$s is typing":[null,"%1$s está digitando"],Connected:[null,"Conectado"],Attached:[null,"Anexado"]}}};typeof define=="function"&&define.amd?define("pt_BR",["jed"],function(){return t(new Jed(n))}):(window.locales||(window.locales={}),window.locales.pt_BR=t(new Jed(n)))}(this,function(e){return e}),function(e,t){var n={domain:"converse",locale_data:{converse:{"":{"Project-Id-Version":"Converse.js 0.4","Report-Msgid-Bugs-To":"","POT-Creation-Date":"2013-09-15 22:06+0200","PO-Revision-Date":"2013-09-29 17:24+0300","Last-Translator":"Boris Kocherov <bk@raskon.org>","Language-Team":"<bk@raskon.ru>",Language:"ru","MIME-Version":"1.0","Content-Type":"text/plain; charset=UTF-8","Content-Transfer-Encoding":"8bit","X-Generator":"Poedit 1.5.5"},unencrypted:[null,"не зашифровано"],unverified:[null,"непроверено"],verified:[null,"проверено"],finished:[null,"закончено"],Disconnected:[null,"Отключено"],Error:[null,"Ошибка"],Connecting:[null,"Соединение"],"Connection Failed":[null,"Не удалось соединится"],Authenticating:[null,"Авторизация"],"Authentication Failed":[null,"Не удалось авторизоваться"],Disconnecting:[null,"Отключаемся"],"Private key generated.":[null,"Приватный ключ сгенерирован."],"Personal message":[null,"Введите сообщение"],"What's this?":[null,"Что это?"],me:[null,"Я"],"Show this menu":[null,"Показать это меню"],"Remove messages":[null,"Удалить сообщения"],"Your message could not be sent":[null,"Ваше сообщение не послано"],"Your messages are not encrypted anymore":[null,"Ваши сообщения больше не шифруются"],"Your messages are now encrypted but your buddy's identity has not been verified.":[null,"Ваши сообщения шифруются, но ваша учётная запись не проверена вашим собеседником."],"Your buddy's identify has been verified.":[null,"Ваша учётная запись проверена вашим собеседником."],"Your messages are not encrypted. Click here to enable OTR encryption.":[null,"Ваши сообщения не шифруются. Нажмите здесь чтобы настроить шифрование."],"Your messages are encrypted, but your buddy has not been verified.":[null,"Ваши сообщения шифруются, но ваш контакт не проверен."],"Your messages are encrypted and your buddy verified.":[null,"Ваши сообщения шифруются и ваш контакт проверен"],Contacts:[null,"Контакты"],Online:[null,"В сети"],Busy:[null,"Занят"],Away:[null,"Отошёл"],Offline:[null,"Не в сети"],"Click to add new chat contacts":[null,"Добавить новую конференцию"],"Add a contact":[null,"Добавть контакт"],"Contact username":[null,"Имя пользователя"],Add:[null,"Добавить"],"Contact name":[null,"Имя контакта"],Search:[null,"Поиск"],"No users found":[null,"Пользователи не найдены"],"Click to add as a chat contact":[null,"Добавить контакт"],"Click to open this room":[null,"Зайти в конференцию"],"Show more information on this room":[null,"Показать больше информации об этой конференции"],"Description:":[null,"Описание:"],"Occupants:":[null,"Участники:"],"Features:":[null,"Свойства:"],"Requires authentication":[null,"Требуется авторизация"],Hidden:[null,"Скрыто"],"Requires an invitation":[null,"Требуется приглашение"],Moderated:[null,"Модерируемая"],"Non-anonymous":[null,"Не анонимная"],"Open room":[null,"Открыть конференцию"],"Permanent room":[null,"Перманентная конференция"],Public:[null,"Публичный"],"Semi-anonymous":[null,"Частично анонимная"],"Temporary room":[null,"Временная конференция"],Unmoderated:[null,"Немодерируемая"],Rooms:[null,"Конфер."],"Room name":[null,"Имя конференции"],Nickname:[null,"Псевдоним"],Server:[null,"Сервер"],Join:[null,"Подключиться"],"Show rooms":[null,"Обновить"],"No rooms on %1$s":[null,"Нет доступных конференций %1$s"],"Rooms on %1$s":[null,"Конференции %1$s:"],"Set chatroom topic":[null,"Установить тему"],"Kick user from chatroom":[null,"Отключить пользователя от кнофер."],"Ban user from chatroom":[null,"Забанить пользователя в этой конф."],Message:[null,"Сообщение"],Save:[null,"Сохранить"],Cancel:[null,"Отменить"],"An error occurred while trying to save the form.":[null,"При сохранение формы произошла ошибка."],"This chatroom requires a password":[null,"Для доступа в конфер. необходим пароль."],"Password: ":[null,"Пароль: "],Submit:[null,"Отправить"],"This room is not anonymous":[null,"Эта комната не анонимная"],"This room now shows unavailable members":[null,"Эта комната показывает доступных собеседников"],"This room does not show unavailable members":[null,"Эта комната не показывает недоступных собеседников"],"This room is now non-anonymous":[null,"Эта комната не анонимная"],"This room is now semi-anonymous":[null,"Эта комната частично анонимная"],"This room is now fully-anonymous":[null,"Эта комната стала полностью анонимной"],"A new room has been created":[null,"Новая комната была создана"],"Your nickname has been changed":[null,"Ваш псевдоним уже используется другим пользователем"],"<strong>%1$s</strong> has been banned":[null,"<strong>%1$s</strong> забанен"],"<strong>%1$s</strong> has been kicked out":[null,"<strong>%1$s</strong> выдворен"],"<strong>%1$s</strong> has been removed because of an affiliation change":[null,"<strong>%1$s</strong> has been removed because of an affiliation change"],"<strong>%1$s</strong> has been removed for not being a member":[null,"<strong>%1$s</strong> удалён потому что не участник"],"You have been banned from this room":[null,"Вам запрещено подключатся к этой конференции"],"You have been kicked from this room":[null,"Вам запрещено подключатся к этой конференции"],"You have been removed from this room because of an affiliation change":[null,"<strong>%1$s</strong> удалён потому что изменились права"],"You have been removed from this room because the room has changed to members-only and you're not a member":[null,"Вы отключены от этой конференции потому что режим изменился: только-участники"],"You have been removed from this room because the MUC (Multi-user chat) service is being shut down.":[null,"Вы отключены от этой конференции потому что сервись конференций выключен."],"You are not on the member list of this room":[null,"Вас нет в списке этой конференции"],"No nickname was specified":[null,"Вы не указали псевдоним"],"You are not allowed to create new rooms":[null,"Вы не имеете права создавать конфер."],"Your nickname doesn't conform to this room's policies":[null,"Псевдоним не согласуется с правилами конфер."],"Your nickname is already taken":[null,"Ваш ник уже используется другим пользователем"],"This room does not (yet) exist":[null,"Эта комната не существует"],"This room has reached it's maximum number of occupants":[null,"Конференция достигла максимального количества участников"],"Topic set by %1$s to: %2$s":[null,"Тема %2$s устатновлена %1$s"],"This user is a moderator":[null,"Модератор"],"This user can send messages in this room":[null,"Собеседник"],"This user can NOT send messages in this room":[null,"Пользователь не может посылать сообщения в эту комнату"],"Click to chat with this contact":[null,"Начать общение"],"Click to remove this contact":[null,"Удалить контакт"],"This contact is busy":[null,"Занят"],"This contact is online":[null,"В сети"],"This contact is offline":[null,"Не в сети"],"This contact is unavailable":[null,"Не доступен"],"This contact is away for an extended period":[null,"На долго отошёл"],"This contact is away":[null,"Отошёл"],"Contact requests":[null,"Запросы на авторизацию"],"My contacts":[null,"Контакты"],"Pending contacts":[null,"Собеседники ожидающие авторизации"],"Custom status":[null,"Произвольный статус"],"Click to change your chat status":[null,"Изменить ваш статус"],"Click here to write a custom status message":[null,"Редактировать произвольный статус"],online:[null,"на связи"],busy:[null,"занят"],"away for long":[null,"отошёл на долго"],away:[null,"отошёл"],"I am %1$s":[null,"%1$s"],"Sign in":[null,"Подписать"],"XMPP/Jabber Username:":[null,"JID:"],"Password:":[null,"Пароль:"],"Log In":[null,"Войти"],"Online Contacts":[null,"Cписок собеседников"]}}};typeof define=="function"&&define.amd?define("ru",["jed"],function(){return t(new Jed(n))}):(window.locales||(window.locales={}),window.locales.ru=t(new Jed(n)))}(this,function(e){return e}),function(e,t){var n={domain:"converse",locale_data:{converse:{"":{"Project-Id-Version":"Converse.js 0.8","Report-Msgid-Bugs-To":"","POT-Creation-Date":"2014-01-07 11:12+0900","PO-Revision-Date":"2014-01-07 11:32+0900","Last-Translator":"Huxisuz Hu <huxisuz@gmail.com>","Language-Team":"Language zh",Language:"zh","MIME-Version":"1.0","Content-Type":"text/plain; charset=UTF-8","Content-Transfer-Encoding":"8bit","Plural-Forms":"nplurals=1; plural=0;"},unencrypted:[null,""],unverified:[null,""],verified:[null,""],finished:[null,""],"This contact is busy":[null,""],"This contact is online":[null,"线"],"This contact is offline":[null,"线"],"This contact is unavailable":[null,""],"This contact is away for an extended period":[null,""],"This contact is away":[null,""],Disconnected:[null,""],Error:[null,""],Connecting:[null,""],"Connection Failed":[null,""],Authenticating:[null,""],"Authentication Failed":[null,""],Disconnecting:[null,""],"Online Contacts":[null,"线"],"Re-establishing encrypted session":[null,""],"Generating private key.":[null,""],"Your browser might become unresponsive.":[null,""],"Authentication request from %1$s\n\nYour buddy is attempting to verify your identity, by asking you the question below.\n\n%2$s":[null,"%1$s \n\n\n\n%2$s"],"Could not verify this user's identify.":[null,""],"Exchanging private key with buddy.":[null,""],"Personal message":[null,""],me:[null,""],"Show this menu":[null,""],"Write in the third person":[null,""],"Remove messages":[null,""],"Are you sure you want to clear the messages from this chat box?":[null,""],"Your message could not be sent":[null,""],"We received an unencrypted message":[null,""],"We received an unreadable encrypted message":[null,""],"This user has requested an encrypted session.":[null,""],"Here are the fingerprints, please confirm them with %1$s, outside of this chat.\n\nFingerprint for you, %2$s: %3$s\n\nFingerprint for %1$s: %4$s\n\nIf you have confirmed that the fingerprints match, click OK, otherwise click Cancel.":[null," %1$s \n\n %2$s : %3$s\n\n%1$s : %4$s\n\nOK"],"What is your security question?":[null,"?"],"What is the answer to the security question?":[null,"?"],"Invalid authentication scheme provided":[null,""],"Your messages are not encrypted anymore":[null,""],"Your messages are now encrypted but your buddy's identity has not been verified.":[null,""],"Your buddy's identify has been verified.":[null,""],"Your buddy has ended encryption on their end, you should do the same.":[null,""],"Your messages are not encrypted. Click here to enable OTR encryption.":[null,"OTR"],"Your messages are encrypted, but your buddy has not been verified.":[null,""],"Your messages are encrypted and your buddy verified.":[null,""],"Your buddy has closed their end of the private session, you should do the same":[null,""],"End encrypted conversation":[null,""],"Refresh encrypted conversation":[null,""],"Start encrypted conversation":[null,""],"Verify with fingerprints":[null,""],"Verify with SMP":[null,"SMP"],"What's this?":[null,"?"],Online:[null,"线"],Busy:[null,""],Away:[null,""],Offline:[null,"线"],Contacts:[null,""],"Contact name":[null,""],Search:[null,""],"Contact username":[null,""],Add:[null,""],"Click to add new chat contacts":[null,""],"Add a contact":[null,""],"No users found":[null,""],"Click to add as a chat contact":[null,""],"Room name":[null,""],Nickname:[null,""],Server:[null,""],Join:[null,""],"Show rooms":[null,""],Rooms:[null,""],"No rooms on %1$s":[null,"%1$s "],"Rooms on %1$s":[null,"%1$s "],"Click to open this room":[null,""],"Show more information on this room":[null,""],"Description:":[null,": "],"Occupants:":[null,":"],"Features:":[null,":"],"Requires authentication":[null,""],Hidden:[null,""],"Requires an invitation":[null,""],Moderated:[null,""],"Non-anonymous":[null,""],"Open room":[null,""],"Permanent room":[null,""],Public:[null,""],"Semi-anonymous":[null,""],"Temporary room":[null,""],Unmoderated:[null,""],"Set chatroom topic":[null,""],"Kick user from chatroom":[null,""],"Ban user from chatroom":[null,""],Message:[null,""],Save:[null,""],Cancel:[null,""],"An error occurred while trying to save the form.":[null,""],"This chatroom requires a password":[null,""],"Password: ":[null,":"],Submit:[null,""],"This room is not anonymous":[null,""],"This room now shows unavailable members":[null,""],"This room does not show unavailable members":[null,""],"Non-privacy-related room configuration has changed":[null,"()"],"Room logging is now enabled":[null,""],"Room logging is now disabled":[null,""],"This room is now non-anonymous":[null,""],"This room is now semi-anonymous":[null,""],"This room is now fully-anonymous":[null,""],"A new room has been created":[null,""],"Your nickname has been changed":[null,""],"<strong>%1$s</strong> has been banned":[null,"<strong>%1$s</strong> "],"<strong>%1$s</strong> has been kicked out":[null,"<strong>%1$s</strong> "],"<strong>%1$s</strong> has been removed because of an affiliation change":[null,"<strong>%1$s</strong> "],"<strong>%1$s</strong> has been removed for not being a member":[null,"<strong>%1$s</strong> "],"You have been banned from this room":[null,""],"You have been kicked from this room":[null,""],"You have been removed from this room because of an affiliation change":[null,""],"You have been removed from this room because the room has changed to members-only and you're not a member":[null,""],"You have been removed from this room because the MUC (Multi-user chat) service is being shut down.":[null,""],"You are not on the member list of this room":[null,""],"No nickname was specified":[null,""],"You are not allowed to create new rooms":[null,""],"Your nickname doesn't conform to this room's policies":[null,""],"Your nickname is already taken":[null,""],"This room does not (yet) exist":[null,""],"This room has reached it's maximum number of occupants":[null,"线"],"Topic set by %1$s to: %2$s":[null,"%1$s : %2$s"],"This user is a moderator":[null,""],"This user can send messages in this room":[null,""],"This user can NOT send messages in this room":[null,""],Minimized:[null,""],"Click to remove this contact":[null,""],Accept:[null,""],"Click to chat with this contact":[null,""],"My contacts":[null,""],"Contact requests":[null,""],"Pending contacts":[null,""],"Custom status":[null,"DIY"],online:[null,"线"],busy:[null,""],"away for long":[null,""],away:[null,""],"I am %1$s":[null,"%1$s"],"Click here to write a custom status message":[null,""],"Click to change your chat status":[null,""],"XMPP/Jabber Username:":[null,"XMPP/Jabber:"],"Password:":[null,":"],"Log In":[null,""],"Sign in":[null,""],"Toggle chat":[null,""]}}};typeof define=="function"&&define.amd?define("zh",["jed"],function(){return t(new Jed(n))}):(window.locales||(window.locales={}),window.locales.zh=t(new Jed(n)))}(this,function(e){return e}),function(e,t){define("locales",["jed","af","de","en","es","fr","he","hu","id","it","ja","nl","pt_BR","ru","zh"],function(t,n,r,i,s,o,u,a,f,l,c,h,p,d,v){e.locales={af:n,de:r,en:i,es:s,fr:o,he:u,hu:a,id:f,it:l,ja:c,nl:h,"pt-br":p,ru:d,zh:v}})}(this),function(){var e=this,t=e._,n={},r=Array.prototype,i=Object.prototype,s=Function.prototype,o=r.push,u=r.slice,a=r.concat,f=i.toString,l=i.hasOwnProperty,c=r.forEach,h=r.map,p=r.reduce,d=r.reduceRight,v=r.filter,m=r.every,g=r.some,y=r.indexOf,b=r.lastIndexOf,w=Array.isArray,E=Object.keys,S=s.bind,x=function(e){if(e instanceof x)return e;if(!(this instanceof x))return new x(e);this._wrapped=e};typeof exports!="undefined"?(typeof module!="undefined"&&module.exports&&(exports=module.exports=x),exports._=x):e._=x,x.VERSION="1.6.0";var T=x.each=x.forEach=function(e,t,r){if(e==null)return e;if(c&&e.forEach===c)e.forEach(t,r);else if(e.length===+e.length){for(var i=0,s=e.length;i<s;i++)if(t.call(r,e[i],i,e)===n)return}else{var o=x.keys(e);for(var i=0,s=o.length;i<s;i++)if(t.call(r,e[o[i]],o[i],e)===n)return}return e};x.map=x.collect=function(e,t,n){var r=[];return e==null?r:h&&e.map===h?e.map(t,n):(T(e,function(e,i,s){r.push(t.call(n,e,i,s))}),r)};var N="Reduce of empty array with no initial value";x.reduce=x.foldl=x.inject=function(e,t,n,r){var i=arguments.length>2;e==null&&(e=[]);if(p&&e.reduce===p)return r&&(t=x.bind(t,r)),i?e.reduce(t,n):e.reduce(t);T(e,function(e,s,o){i?n=t.call(r,n,e,s,o):(n=e,i=!0)});if(!i)throw new TypeError(N);return n},x.reduceRight=x.foldr=function(e,t,n,r){var i=arguments.length>2;e==null&&(e=[]);if(d&&e.reduceRight===d)return r&&(t=x.bind(t,r)),i?e.reduceRight(t,n):e.reduceRight(t);var s=e.length;if(s!==+s){var o=x.keys(e);s=o.length}T(e,function(u,a,f){a=o?o[--s]:--s,i?n=t.call(r,n,e[a],a,f):(n=e[a],i=!0)});if(!i)throw new TypeError(N);return n},x.find=x.detect=function(e,t,n){var r;return C(e,function(e,i,s){if(t.call(n,e,i,s))return r=e,!0}),r},x.filter=x.select=function(e,t,n){var r=[];return e==null?r:v&&e.filter===v?e.filter(t,n):(T(e,function(e,i,s){t.call(n,e,i,s)&&r.push(e)}),r)},x.reject=function(e,t,n){return x.filter(e,function(e,r,i){return!t.call(n,e,r,i)},n)},x.every=x.all=function(e,t,r){t||(t=x.identity);var i=!0;return e==null?i:m&&e.every===m?e.every(t,r):(T(e,function(e,s,o){if(!(i=i&&t.call(r,e,s,o)))return n}),!!i)};var C=x.some=x.any=function(e,t,r){t||(t=x.identity);var i=!1;return e==null?i:g&&e.some===g?e.some(t,r):(T(e,function(e,s,o){if(i||(i=t.call(r,e,s,o)))return n}),!!i)};x.contains=x.include=function(e,t){return e==null?!1:y&&e.indexOf===y?e.indexOf(t)!=-1:C(e,function(e){return e===t})},x.invoke=function(e,t){var n=u.call(arguments,2),r=x.isFunction(t);return x.map(e,function(e){return(r?t:e[t]).apply(e,n)})},x.pluck=function(e,t){return x.map(e,x.property(t))},x.where=function(e,t){return x.filter(e,x.matches(t))},x.findWhere=function(e,t){return x.find(e,x.matches(t))},x.max=function(e,t,n){if(!t&&x.isArray(e)&&e[0]===+e[0]&&e.length<65535)return Math.max.apply(Math,e);var r=-Infinity,i=-Infinity;return T(e,function(e,s,o){var u=t?t.call(n,e,s,o):e;u>i&&(r=e,i=u)}),r},x.min=function(e,t,n){if(!t&&x.isArray(e)&&e[0]===+e[0]&&e.length<65535)return Math.min.apply(Math,e);var r=Infinity,i=Infinity;return T(e,function(e,s,o){var u=t?t.call(n,e,s,o):e;u<i&&(r=e,i=u)}),r},x.shuffle=function(e){var t,n=0,r=[];return T(e,function(e){t=x.random(n++),r[n-1]=r[t],r[t]=e}),r},x.sample=function(e,t,n){return t==null||n?(e.length!==+e.length&&(e=x.values(e)),e[x.random(e.length-1)]):x.shuffle(e).slice(0,Math.max(0,t))};var k=function(e){return e==null?x.identity:x.isFunction(e)?e:x.property(e)};x.sortBy=function(e,t,n){return t=k(t),x.pluck(x.map(e,function(e,r,i){return{value:e,index:r,criteria:t.call(n,e,r,i)}}).sort(function(e,t){var n=e.criteria,r=t.criteria;if(n!==r){if(n>r||n===void 0)return 1;if(n<r||r===void 0)return-1}return e.index-t.index}),"value")};var L=function(e){return function(t,n,r){var i={};return n=k(n),T(t,function(s,o){var u=n.call(r,s,o,t);e(i,u,s)}),i}};x.groupBy=L(function(e,t,n){x.has(e,t)?e[t].push(n):e[t]=[n]}),x.indexBy=L(function(e,t,n){e[t]=n}),x.countBy=L(function(e,t){x.has(e,t)?e[t]++:e[t]=1}),x.sortedIndex=function(e,t,n,r){n=k(n);var i=n.call(r,t),s=0,o=e.length;while(s<o){var u=s+o>>>1;n.call(r,e[u])<i?s=u+1:o=u}return s},x.toArray=function(e){return e?x.isArray(e)?u.call(e):e.length===+e.length?x.map(e,x.identity):x.values(e):[]},x.size=function(e){return e==null?0:e.length===+e.length?e.length:x.keys(e).length},x.first=x.head=x.take=function(e,t,n){return e==null?void 0:t==null||n?e[0]:t<0?[]:u.call(e,0,t)},x.initial=function(e,t,n){return u.call(e,0,e.length-(t==null||n?1:t))},x.last=function(e,t,n){return e==null?void 0:t==null||n?e[e.length-1]:u.call(e,Math.max(e.length-t,0))},x.rest=x.tail=x.drop=function(e,t,n){return u.call(e,t==null||n?1:t)},x.compact=function(e){return x.filter(e,x.identity)};var A=function(e,t,n){return t&&x.every(e,x.isArray)?a.apply(n,e):(T(e,function(e){x.isArray(e)||x.isArguments(e)?t?o.apply(n,e):A(e,t,n):n.push(e)}),n)};x.flatten=function(e,t){return A(e,t,[])},x.without=function(e){return x.difference(e,u.call(arguments,1))},x.partition=function(e,t){var n=[],r=[];return T(e,function(e){(t(e)?n:r).push(e)}),[n,r]},x.uniq=x.unique=function(e,t,n,r){x.isFunction(t)&&(r=n,n=t,t=!1);var i=n?x.map(e,n,r):e,s=[],o=[];return T(i,function(n,r){if(t?!r||o[o.length-1]!==n:!x.contains(o,n))o.push(n),s.push(e[r])}),s},x.union=function(){return x.uniq(x.flatten(arguments,!0))},x.intersection=function(e){var t=u.call(arguments,1);return x.filter(x.uniq(e),function(e){return x.every(t,function(t){return x.contains(t,e)})})},x.difference=function(e){var t=a.apply(r,u.call(arguments,1));return x.filter(e,function(e){return!x.contains(t,e)})},x.zip=function(){var e=x.max(x.pluck(arguments,"length").concat(0)),t=new Array(e);for(var n=0;n<e;n++)t[n]=x.pluck(arguments,""+n);return t},x.object=function(e,t){if(e==null)return{};var n={};for(var r=0,i=e.length;r<i;r++)t?n[e[r]]=t[r]:n[e[r][0]]=e[r][1];return n},x.indexOf=function(e,t,n){if(e==null)return-1;var r=0,i=e.length;if(n){if(typeof n!="number")return r=x.sortedIndex(e,t),e[r]===t?r:-1;r=n<0?Math.max(0,i+n):n}if(y&&e.indexOf===y)return e.indexOf(t,n);for(;r<i;r++)if(e[r]===t)return r;return-1},x.lastIndexOf=function(e,t,n){if(e==null)return-1;var r=n!=null;if(b&&e.lastIndexOf===b)return r?e.lastIndexOf(t,n):e.lastIndexOf(t);var i=r?n:e.length;while(i--)if(e[i]===t)return i;return-1},x.range=function(e,t,n){arguments.length<=1&&(t=e||0,e=0),n=arguments[2]||1;var r=Math.max(Math.ceil((t-e)/n),0),i=0,s=new Array(r);while(i<r)s[i++]=e,e+=n;return s};var O=function(){};x.bind=function(e,t){var n,r;if(S&&e.bind===S)return S.apply(e,u.call(arguments,1));if(!x.isFunction(e))throw new TypeError;return n=u.call(arguments,2),r=function(){if(this instanceof r){O.prototype=e.prototype;var i=new O;O.prototype=null;var s=e.apply(i,n.concat(u.call(arguments)));return Object(s)===s?s:i}return e.apply(t,n.concat(u.call(arguments)))}},x.partial=function(e){var t=u.call(arguments,1);return function(){var n=0,r=t.slice();for(var i=0,s=r.length;i<s;i++)r[i]===x&&(r[i]=arguments[n++]);while(n<arguments.length)r.push(arguments[n++]);return e.apply(this,r)}},x.bindAll=function(e){var t=u.call(arguments,1);if(t.length===0)throw new Error("bindAll must be passed function names");return T(t,function(t){e[t]=x.bind(e[t],e)}),e},x.memoize=function(e,t){var n={};return t||(t=x.identity),function(){var r=t.apply(this,arguments);return x.has(n,r)?n[r]:n[r]=e.apply(this,arguments)}},x.delay=function(e,t){var n=u.call(arguments,2);return setTimeout(function(){return e.apply(null,n)},t)},x.defer=function(e){return x.delay.apply(x,[e,1].concat(u.call(arguments,1)))},x.throttle=function(e,t,n){var r,i,s,o=null,u=0;n||(n={});var a=function(){u=n.leading===!1?0:x.now(),o=null,s=e.apply(r,i),r=i=null};return function(){var f=x.now();!u&&n.leading===!1&&(u=f);var l=t-(f-u);return r=this,i=arguments,l<=0?(clearTimeout(o),o=null,u=f,s=e.apply(r,i),r=i=null):!o&&n.trailing!==!1&&(o=setTimeout(a,l)),s}},x.debounce=function(e,t,n){var r,i,s,o,u,a=function(){var f=x.now()-o;f<t?r=setTimeout(a,t-f):(r=null,n||(u=e.apply(s,i),s=i=null))};return function(){s=this,i=arguments,o=x.now();var f=n&&!r;return r||(r=setTimeout(a,t)),f&&(u=e.apply(s,i),s=i=null),u}},x.once=function(e){var t=!1,n;return function(){return t?n:(t=!0,n=e.apply(this,arguments),e=null,n)}},x.wrap=function(e,t){return x.partial(t,e)},x.compose=function(){var e=arguments;return function(){var t=arguments;for(var n=e.length-1;n>=0;n--)t=[e[n].apply(this,t)];return t[0]}},x.after=function(e,t){return function(){if(--e<1)return t.apply(this,arguments)}},x.keys=function(e){if(!x.isObject(e))return[];if(E)return E(e);var t=[];for(var n in e)x.has(e,n)&&t.push(n);return t},x.values=function(e){var t=x.keys(e),n=t.length,r=new Array(n);for(var i=0;i<n;i++)r[i]=e[t[i]];return r},x.pairs=function(e){var t=x.keys(e),n=t.length,r=new Array(n);for(var i=0;i<n;i++)r[i]=[t[i],e[t[i]]];return r},x.invert=function(e){var t={},n=x.keys(e);for(var r=0,i=n.length;r<i;r++)t[e[n[r]]]=n[r];return t},x.functions=x.methods=function(e){var t=[];for(var n in e)x.isFunction(e[n])&&t.push(n);return t.sort()},x.extend=function(e){return T(u.call(arguments,1),function(t){if(t)for(var n in t)e[n]=t[n]}),e},x.pick=function(e){var t={},n=a.apply(r,u.call(arguments,1));return T(n,function(n){n in e&&(t[n]=e[n])}),t},x.omit=function(e){var t={},n=a.apply(r,u.call(arguments,1));for(var i in e)x.contains(n,i)||(t[i]=e[i]);return t},x.defaults=function(e){return T(u.call(arguments,1),function(t){if(t)for(var n in t)e[n]===void 0&&(e[n]=t[n])}),e},x.clone=function(e){return x.isObject(e)?x.isArray(e)?e.slice():x.extend({},e):e},x.tap=function(e,t){return t(e),e};var M=function(e,t,n,r){if(e===t)return e!==0||1/e==1/t;if(e==null||t==null)return e===t;e instanceof x&&(e=e._wrapped),t instanceof x&&(t=t._wrapped);var i=f.call(e);if(i!=f.call(t))return!1;switch(i){case"[object String]":return e==String(t);case"[object Number]":return e!=+e?t!=+t:e==0?1/e==1/t:e==+t;case"[object Date]":case"[object Boolean]":return+e==+t;case"[object RegExp]":return e.source==t.source&&e.global==t.global&&e.multiline==t.multiline&&e.ignoreCase==t.ignoreCase}if(typeof e!="object"||typeof t!="object")return!1;var s=n.length;while(s--)if(n[s]==e)return r[s]==t;var o=e.constructor,u=t.constructor;if(o!==u&&!(x.isFunction(o)&&o instanceof o&&x.isFunction(u)&&u instanceof u)&&"constructor"in e&&"constructor"in t)return!1;n.push(e),r.push(t);var a=0,l=!0;if(i=="[object Array]"){a=e.length,l=a==t.length;if(l)while(a--)if(!(l=M(e[a],t[a],n,r)))break}else{for(var c in e)if(x.has(e,c)){a++;if(!(l=x.has(t,c)&&M(e[c],t[c],n,r)))break}if(l){for(c in t)if(x.has(t,c)&&!(a--))break;l=!a}}return n.pop(),r.pop(),l};x.isEqual=function(e,t){return M(e,t,[],[])},x.isEmpty=function(e){if(e==null)return!0;if(x.isArray(e)||x.isString(e))return e.length===0;for(var t in e)if(x.has(e,t))return!1;return!0},x.isElement=function(e){return!!e&&e.nodeType===1},x.isArray=w||function(e){return f.call(e)=="[object Array]"},x.isObject=function(e){return e===Object(e)},T(["Arguments","Function","String","Number","Date","RegExp"],function(e){x["is"+e]=function(t){return f.call(t)=="[object "+e+"]"}}),x.isArguments(arguments)||(x.isArguments=function(e){return!!e&&!!x.has(e,"callee")}),typeof /./!="function"&&(x.isFunction=function(e){return typeof e=="function"}),x.isFinite=function(e){return isFinite(e)&&!isNaN(parseFloat(e))},x.isNaN=function(e){return x.isNumber(e)&&e!=+e},x.isBoolean=function(e){return e===!0||e===!1||f.call(e)=="[object Boolean]"},x.isNull=function(e){return e===null},x.isUndefined=function(e){return e===void 0},x.has=function(e,t){return l.call(e,t)},x.noConflict=function(){return e._=t,this},x.identity=function(e){return e},x.constant=function(e){return function(){return e}},x.property=function(e){return function(t){return t[e]}},x.matches=function(e){return function(t){if(t===e)return!0;for(var n in e)if(e[n]!==t[n])return!1;return!0}},x.times=function(e,t,n){var r=Array(Math.max(0,e));for(var i=0;i<e;i++)r[i]=t.call(n,i);return r},x.random=function(e,t){return t==null&&(t=e,e=0),e+Math.floor(Math.random()*(t-e+1))},x.now=Date.now||function(){return(new Date).getTime()};var _={escape:{"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#x27;"}};_.unescape=x.invert(_.escape);var D={escape:new RegExp("["+x.keys(_.escape).join("")+"]","g"),unescape:new RegExp("("+x.keys(_.unescape).join("|")+")","g")};x.each(["escape","unescape"],function(e){x[e]=function(t){return t==null?"":(""+t).replace(D[e],function(t){return _[e][t]})}}),x.result=function(e,t){if(e==null)return void 0;var n=e[t];return x.isFunction(n)?n.call(e):n},x.mixin=function(e){T(x.functions(e),function(t){var n=x[t]=e[t];x.prototype[t]=function(){var e=[this._wrapped];return o.apply(e,arguments),F.call(this,n.apply(x,e))}})};var P=0;x.uniqueId=function(e){var t=++P+"";return e?e+t:t},x.templateSettings={evaluate:/<%([\s\S]+?)%>/g,interpolate:/<%=([\s\S]+?)%>/g,escape:/<%-([\s\S]+?)%>/g};var H=/(.)^/,B={"'":"'","\\":"\\","\r":"r","\n":"n"," ":"t","\u2028":"u2028","\u2029":"u2029"},j=/\\|'|\r|\n|\t|\u2028|\u2029/g;x.template=function(e,t,n){var r;n=x.defaults({},n,x.templateSettings);var i=new RegExp([(n.escape||H).source,(n.interpolate||H).source,(n.evaluate||H).source].join("|")+"|$","g"),s=0,o="__p+='";e.replace(i,function(t,n,r,i,u){return o+=e.slice(s,u).replace(j,function(e){return"\\"+B[e]}),n&&(o+="'+\n((__t=("+n+"))==null?'':_.escape(__t))+\n'"),r&&(o+="'+\n((__t=("+r+"))==null?'':__t)+\n'"),i&&(o+="';\n"+i+"\n__p+='"),s=u+t.length,t}),o+="';\n",n.variable||(o="with(obj||{}){\n"+o+"}\n"),o="var __t,__p='',__j=Array.prototype.join,print=function(){__p+=__j.call(arguments,'');};\n"+o+"return __p;\n";try{r=new Function(n.variable||"obj","_",o)}catch(u){throw u.source=o,u}if(t)return r(t,x);var a=function(e){return r.call(this,e,x)};return a.source="function("+(n.variable||"obj")+"){\n"+o+"}",a},x.chain=function(e){return x(e).chain()};var F=function(e){return this._chain?x(e).chain():e};x.mixin(x),T(["pop","push","reverse","shift","sort","splice","unshift"],function(e){var t=r[e];x.prototype[e]=function(){var n=this._wrapped;return t.apply(n,arguments),(e=="shift"||e=="splice")&&n.length===0&&delete n[0],F.call(this,n)}}),T(["concat","join","slice"],function(e){var t=r[e];x.prototype[e]=function(){return F.call(this,t.apply(this._wrapped,arguments))}}),x.extend(x.prototype,{chain:function(){return this._chain=!0,this},value:function(){return this._wrapped}}),typeof define=="function"&&define.amd&&define("underscore",[],function(){return x})}.call(this),function(e,t){if(typeof define=="function"&&define.amd)define("backbone",["underscore","jquery","exports"],function(n,r,i){e.Backbone=t(e,i,n,r)});else if(typeof exports!="undefined"){var n=require("underscore");t(e,exports,n)}else e.Backbone=t(e,{},e._,e.jQuery||e.Zepto||e.ender||e.$)}(this,function(e,t,n,r){var i=e.Backbone,s=[],o=s.push,u=s.slice,a=s.splice;t.VERSION="1.1.2",t.$=r,t.noConflict=function(){return e.Backbone=i,this},t.emulateHTTP=!1,t.emulateJSON=!1;var f=t.Events={on:function(e,t,n){if(!c(this,"on",e,[t,n])||!t)return this;this._events||(this._events={});var r=this._events[e]||(this._events[e]=[]);return r.push({callback:t,context:n,ctx:n||this}),this},once:function(e,t,r){if(!c(this,"once",e,[t,r])||!t)return this;var i=this,s=n.once(function(){i.off(e,s),t.apply(this,arguments)});return s._callback=t,this.on(e,s,r)},off:function(e,t,r){var i,s,o,u,a,f,l,h;if(!this._events||!c(this,"off",e,[t,r]))return this;if(!e&&!t&&!r)return this._events=void 0,this;u=e?[e]:n.keys(this._events);for(a=0,f=u.length;a<f;a++){e=u[a];if(o=this._events[e]){this._events[e]=i=[];if(t||r)for(l=0,h=o.length;l<h;l++)s=o[l],(t&&t!==s.callback&&t!==s.callback._callback||r&&r!==s.context)&&i.push(s);i.length||delete this._events[e]}}return this},trigger:function(e){if(!this._events)return this;var t=u.call(arguments,1);if(!c(this,"trigger",e,t))return this;var n=this._events[e],r=this._events.all;return n&&h(n,t),r&&h(r,arguments),this},stopListening:function(e,t,r){var i=this._listeningTo;if(!i)return this;var s=!t&&!r;!r&&typeof t=="object"&&(r=this),e&&((i={})[e._listenId]=e);for(var o in i)e=i[o],e.off(t,r,this),(s||n.isEmpty(e._events))&&delete this._listeningTo[o];return this}},l=/\s+/,c=function(e,t,n,r){if(!n)return!0;if(typeof n=="object"){for(var i in n)e[t].apply(e,[i,n[i]].concat(r));return!1}if(l.test(n)){var s=n.split(l);for(var o=0,u=s.length;o<u;o++)e[t].apply(e,[s[o]].concat(r));return!1}return!0},h=function(e,t){var n,r=-1,i=e.length,s=t[0],o=t[1],u=t[2];switch(t.length){case 0:while(++r<i)(n=e[r]).callback.call(n.ctx);return;case 1:while(++r<i)(n=e[r]).callback.call(n.ctx,s);return;case 2:while(++r<i)(n=e[r]).callback.call(n.ctx,s,o);return;case 3:while(++r<i)(n=e[r]).callback.call(n.ctx,s,o,u);return;default:while(++r<i)(n=e[r]).callback.apply(n.ctx,t);return}},p={listenTo:"on",listenToOnce:"once"};n.each(p,function(e,t){f[t]=function(t,r,i){var s=this._listeningTo||(this._listeningTo={}),o=t._listenId||(t._listenId=n.uniqueId("l"));return s[o]=t,!i&&typeof r=="object"&&(i=this),t[e](r,i,this),this}}),f.bind=f.on,f.unbind=f.off,n.extend(t,f);var d=t.Model=function(e,t){var r=e||{};t||(t={}),this.cid=n.uniqueId("c"),this.attributes={},t.collection&&(this.collection=t.collection),t.parse&&(r=this.parse(r,t)||{}),r=n.defaults({},r,n.result(this,"defaults")),this.set(r,t),this.changed={},this.initialize.apply(this,arguments)};n.extend(d.prototype,f,{changed:null,validationError:null,idAttribute:"id",initialize:function(){},toJSON:function(e){return n.clone(this.attributes)},sync:function(){return t.sync.apply(this,arguments)},get:function(e){return this.attributes[e]},escape:function(e){return n.escape(this.get(e))},has:function(e){return this.get(e)!=null},set:function(e,t,r){var i,s,o,u,a,f,l,c;if(e==null)return this;typeof e=="object"?(s=e,r=t):(s={})[e]=t,r||(r={});if(!this._validate(s,r))return!1;o=r.unset,a=r.silent,u=[],f=this._changing,this._changing=!0,f||(this._previousAttributes=n.clone(this.attributes),this.changed={}),c=this.attributes,l=this._previousAttributes,this.idAttribute in s&&(this.id=s[this.idAttribute]);for(i in s)t=s[i],n.isEqual(c[i],t)||u.push(i),n.isEqual(l[i],t)?delete this.changed[i]:this.changed[i]=t,o?delete c[i]:c[i]=t;if(!a){u.length&&(this._pending=r);for(var h=0,p=u.length;h<p;h++)this.trigger("change:"+u[h],this,c[u[h]],r)}if(f)return this;if(!a)while(this._pending)r=this._pending,this._pending=!1,this.trigger("change",this,r);return this._pending=!1,this._changing=!1,this},unset:function(e,t){return this.set(e,void 0,n.extend({},t,{unset:!0}))},clear:function(e){var t={};for(var r in this.attributes)t[r]=void 0;return this.set(t,n.extend({},e,{unset:!0}))},hasChanged:function(e){return e==null?!n.isEmpty(this.changed):n.has(this.changed,e)},changedAttributes:function(e){if(!e)return this.hasChanged()?n.clone(this.changed):!1;var t,r=!1,i=this._changing?this._previousAttributes:this.attributes;for(var s in e){if(n.isEqual(i[s],t=e[s]))continue;(r||(r={}))[s]=t}return r},previous:function(e){return e==null||!this._previousAttributes?null:this._previousAttributes[e]},previousAttributes:function(){return n.clone(this._previousAttributes)},fetch:function(e){e=e?n.clone(e):{},e.parse===void 0&&(e.parse=!0);var t=this,r=e.success;return e.success=function(n){if(!t.set(t.parse(n,e),e))return!1;r&&r(t,n,e),t.trigger("sync",t,n,e)},I(this,e),this.sync("read",this,e)},save:function(e,t,r){var i,s,o,u=this.attributes;e==null||typeof e=="object"?(i=e,r=t):(i={})[e]=t,r=n.extend({validate:!0},r);if(i&&!r.wait){if(!this.set(i,r))return!1}else if(!this._validate(i,r))return!1;i&&r.wait&&(this.attributes=n.extend({},u,i)),r.parse===void 0&&(r.parse=!0);var a=this,f=r.success;return r.success=function(e){a.attributes=u;var t=a.parse(e,r);r.wait&&(t=n.extend(i||{},t));if(n.isObject(t)&&!a.set(t,r))return!1;f&&f(a,e,r),a.trigger("sync",a,e,r)},I(this,r),s=this.isNew()?"create":r.patch?"patch":"update",s==="patch"&&(r.attrs=i),o=this.sync(s,this,r),i&&r.wait&&(this.attributes=u),o},destroy:function(e){e=e?n.clone(e):{};var t=this,r=e.success,i=function(){t.trigger("destroy",t,t.collection,e)};e.success=function(n){(e.wait||t.isNew())&&i(),r&&r(t,n,e),t.isNew()||t.trigger("sync",t,n,e)};if(this.isNew())return e.success(),!1;I(this,e);var s=this.sync("delete",this,e);return e.wait||i(),s},url:function(){var e=n.result(this,"urlRoot")||n.result(this.collection,"url")||F();return this.isNew()?e:e.replace(/([^\/])$/,"$1/")+encodeURIComponent(this.id)},parse:function(e,t){return e},clone:function(){return new this.constructor(this.attributes)},isNew:function(){return!this.has(this.idAttribute)},isValid:function(e){return this._validate({},n.extend(e||{},{validate:!0}))},_validate:function(e,t){if(!t.validate||!this.validate)return!0;e=n.extend({},this.attributes,e);var r=this.validationError=this.validate(e,t)||null;return r?(this.trigger("invalid",this,r,n.extend(t,{validationError:r})),!1):!0}});var v=["keys","values","pairs","invert","pick","omit"];n.each(v,function(e){d.prototype[e]=function(){var t=u.call(arguments);return t.unshift(this.attributes),n[e].apply(n,t)}});var m=t.Collection=function(e,t){t||(t={}),t.model&&(this.model=t.model),t.comparator!==void 0&&(this.comparator=t.comparator),this._reset(),this.initialize.apply(this,arguments),e&&this.reset(e,n.extend({silent:!0},t))},g={add:!0,remove:!0,merge:!0},y={add:!0,remove:!1};n.extend(m.prototype,f,{model:d,initialize:function(){},toJSON:function(e){return this.map(function(t){return t.toJSON(e)})},sync:function(){return t.sync.apply(this,arguments)},add:function(e,t){return this.set(e,n.extend({merge:!1},t,y))},remove:function(e,t){var r=!n.isArray(e);e=r?[e]:n.clone(e),t||(t={});var i,s,o,u;for(i=0,s=e.length;i<s;i++){u=e[i]=this.get(e[i]);if(!u)continue;delete this._byId[u.id],delete this._byId[u.cid],o=this.indexOf(u),this.models.splice(o,1),this.length--,t.silent||(t.index=o,u.trigger("remove",u,this,t)),this._removeReference(u,t)}return r?e[0]:e},set:function(e,t){t=n.defaults({},t,g),t.parse&&(e=this.parse(e,t));var r=!n.isArray(e);e=r?e?[e]:[]:n.clone(e);var i,s,o,u,a,f,l,c=t.at,h=this.model,p=this.comparator&&c==null&&t.sort!==!1,v=n.isString(this.comparator)?this.comparator:null,m=[],y=[],b={},w=t.add,E=t.merge,S=t.remove,x=!p&&w&&S?[]:!1;for(i=0,s=e.length;i<s;i++){a=e[i]||{},a instanceof d?o=u=a:o=a[h.prototype.idAttribute||"id"];if(f=this.get(o))S&&(b[f.cid]=!0),E&&(a=a===u?u.attributes:a,t.parse&&(a=f.parse(a,t)),f.set(a,t),p&&!l&&f.hasChanged(v)&&(l=!0)),e[i]=f;else if(w){u=e[i]=this._prepareModel(a,t);if(!u)continue;m.push(u),this._addReference(u,t)}u=f||u,x&&(u.isNew()||!b[u.id])&&x.push(u),b[u.id]=!0}if(S){for(i=0,s=this.length;i<s;++i)b[(u=this.models[i]).cid]||y.push(u);y.length&&this.remove(y,t)}if(m.length||x&&x.length){p&&(l=!0),this.length+=m.length;if(c!=null)for(i=0,s=m.length;i<s;i++)this.models.splice(c+i,0,m[i]);else{x&&(this.models.length=0);var T=x||m;for(i=0,s=T.length;i<s;i++)this.models.push(T[i])}}l&&this.sort({silent:!0});if(!t.silent){for(i=0,s=m.length;i<s;i++)(u=m[i]).trigger("add",u,this,t);(l||x&&x.length)&&this.trigger("sort",this,t)}return r?e[0]:e},reset:function(e,t){t||(t={});for(var r=0,i=this.models.length;r<i;r++)this._removeReference(this.models[r],t);return t.previousModels=this.models,this._reset(),e=this.add(e,n.extend({silent:!0},t)),t.silent||this.trigger("reset",this,t),e},push:function(e,t){return this.add(e,n.extend({at:this.length},t))},pop:function(e){var t=this.at(this.length-1);return this.remove(t,e),t},unshift:function(e,t){return this.add(e,n.extend({at:0},t))},shift:function(e){var t=this.at(0);return this.remove(t,e),t},slice:function(){return u.apply(this.models,arguments)},get:function(e){return e==null?void 0:this._byId[e]||this._byId[e.id]||this._byId[e.cid]},at:function(e){return this.models[e]},where:function(e,t){return n.isEmpty(e)?t?void 0:[]:this[t?"find":"filter"](function(t){for(var n in e)if(e[n]!==t.get(n))return!1;return!0})},findWhere:function(e){return this.where(e,!0)},sort:function(e){if(!this.comparator)throw new Error("Cannot sort a set without a comparator");return e||(e={}),n.isString(this.comparator)||this.comparator.length===1?this.models=this.sortBy(this.comparator,this):this.models.sort(n.bind(this.comparator,this)),e.silent||this.trigger("sort",this,e),this},pluck:function(e){return n.invoke(this.models,"get",e)},fetch:function(e){e=e?n.clone(e):{},e.parse===void 0&&(e.parse=!0);var t=e.success,r=this;return e.success=function(n){var i=e.reset?"reset":"set";r[i](n,e),t&&t(r,n,e),r.trigger("sync",r,n,e)},I(this,e),this.sync("read",this,e)},create:function(e,t){t=t?n.clone(t):{};if(!(e=this._prepareModel(e,t)))return!1;t.wait||this.add(e,t);var r=this,i=t.success;return t.success=function(e,n){t.wait&&r.add(e,t),i&&i(e,n,t)},e.save(null,t),e},parse:function(e,t){return e},clone:function(){return new this.constructor(this.models)},_reset:function(){this.length=0,this.models=[],this._byId={}},_prepareModel:function(e,t){if(e instanceof d)return e;t=t?n.clone(t):{},t.collection=this;var r=new this.model(e,t);return r.validationError?(this.trigger("invalid",this,r.validationError,t),!1):r},_addReference:function(e,t){this._byId[e.cid]=e,e.id!=null&&(this._byId[e.id]=e),e.collection||(e.collection=this),e.on("all",this._onModelEvent,this)},_removeReference:function(e,t){this===e.collection&&delete e.collection,e.off("all",this._onModelEvent,this)},_onModelEvent:function(e,t,n,r){if((e==="add"||e==="remove")&&n!==this)return;e==="destroy"&&this.remove(t,r),t&&e==="change:"+t.idAttribute&&(delete this._byId[t.previous(t.idAttribute)],t.id!=null&&(this._byId[t.id]=t)),this.trigger.apply(this,arguments)}});var b=["forEach","each","map","collect","reduce","foldl","inject","reduceRight","foldr","find","detect","filter","select","reject","every","all","some","any","include","contains","invoke","max","min","toArray","size","first","head","take","initial","rest","tail","drop","last","without","difference","indexOf","shuffle","lastIndexOf","isEmpty","chain","sample"];n.each(b,function(e){m.prototype[e]=function(){var t=u.call(arguments);return t.unshift(this.models),n[e].apply(n,t)}});var w=["groupBy","countBy","sortBy","indexBy"];n.each(w,function(e){m.prototype[e]=function(t,r){var i=n.isFunction(t)?t:function(e){return e.get(t)};return n[e](this.models,i,r)}});var E=t.View=function(e){this.cid=n.uniqueId("view"),e||(e={}),n.extend(this,n.pick(e,x)),this._ensureElement(),this.initialize.apply(this,arguments),this.delegateEvents()},S=/^(\S+)\s*(.*)$/,x=["model","collection","el","id","attributes","className","tagName","events"];n.extend(E.prototype,f,{tagName:"div",$:function(e){return this.$el.find(e)},initialize:function(){},render:function(){return this},remove:function(){return this.$el.remove(),this.stopListening(),this},setElement:function(e,n){return this.$el&&this.undelegateEvents(),this.$el=e instanceof t.$?e:t.$(e),this.el=this.$el[0],n!==!1&&this.delegateEvents(),this},delegateEvents:function(e){if(!e&&!(e=n.result(this,"events")))return this;this.undelegateEvents();for(var t in e){var r=e[t];n.isFunction(r)||(r=this[e[t]]);if(!r)continue;var i=t.match(S),s=i[1],o=i[2];r=n.bind(r,this),s+=".delegateEvents"+this.cid,o===""?this.$el.on(s,r):this.$el.on(s,o,r)}return this},undelegateEvents:function(){return this.$el.off(".delegateEvents"+this.cid),this},_ensureElement:function(){if(!this.el){var e=n.extend({},n.result(this,"attributes"));this.id&&(e.id=n.result(this,"id")),this.className&&(e["class"]=n.result(this,"className"));var r=t.$("<"+n.result(this,"tagName")+">").attr(e);this.setElement(r,!1)}else this.setElement(n.result(this,"el"),!1)}}),t.sync=function(e,r,i){var s=N[e];n.defaults(i||(i={}),{emulateHTTP:t.emulateHTTP,emulateJSON:t.emulateJSON});var o={type:s,dataType:"json"};i.url||(o.url=n.result(r,"url")||F()),i.data==null&&r&&(e==="create"||e==="update"||e==="patch")&&(o.contentType="application/json",o.data=JSON.stringify(i.attrs||r.toJSON(i))),i.emulateJSON&&(o.contentType="application/x-www-form-urlencoded",o.data=o.data?{model:o.data}:{});if(i.emulateHTTP&&(s==="PUT"||s==="DELETE"||s==="PATCH")){o.type="POST",i.emulateJSON&&(o.data._method=s);var u=i.beforeSend;i.beforeSend=function(e){e.setRequestHeader("X-HTTP-Method-Override",s);if(u)return u.apply(this,arguments)}}o.type!=="GET"&&!i.emulateJSON&&(o.processData=!1),o.type==="PATCH"&&T&&(o.xhr=function(){return new ActiveXObject("Microsoft.XMLHTTP")});var a=i.xhr=t.ajax(n.extend(o,i));return r.trigger("request",r,a,i),a};var T=typeof window!="undefined"&&!!window.ActiveXObject&&(!window.XMLHttpRequest||!(new XMLHttpRequest).dispatchEvent),N={create:"POST",update:"PUT",patch:"PATCH","delete":"DELETE",read:"GET"};t.ajax=function(){return t.$.ajax.apply(t.$,arguments)};var C=t.Router=function(e){e||(e={}),e.routes&&(this.routes=e.routes),this._bindRoutes(),this.initialize.apply(this,arguments)},k=/\((.*?)\)/g,L=/(\(\?)?:\w+/g,A=/\*\w+/g,O=/[\-{}\[\]+?.,\\\^$|#\s]/g;n.extend(C.prototype,f,{initialize:function(){},route:function(e,r,i){n.isRegExp(e)||(e=this._routeToRegExp(e)),n.isFunction(r)&&(i=r,r=""),i||(i=this[r]);var s=this;return t.history.route(e,function(n){var o=s._extractParameters(e,n);s.execute(i,o),s.trigger.apply(s,["route:"+r].concat(o)),s.trigger("route",r,o),t.history.trigger("route",s,r,o)}),this},execute:function(e,t){e&&e.apply(this,t)},navigate:function(e,n){return t.history.navigate(e,n),this},_bindRoutes:function(){if(!this.routes)return;this.routes=n.result(this,"routes");var e,t=n.keys(this.routes);while((e=t.pop())!=null)this.route(e,this.routes[e])},_routeToRegExp:function(e){return e=e.replace(O,"\\$&").replace(k,"(?:$1)?").replace(L,function(e,t){return t?e:"([^/?]+)"}).replace(A,"([^?]*?)"),new RegExp("^"+e+"(?:\\?([\\s\\S]*))?$")},_extractParameters:function(e,t){var r=e.exec(t).slice(1);return n.map(r,function(e,t){return t===r.length-1?e||null:e?decodeURIComponent(e):null})}});var M=t.History=function(){this.handlers=[],n.bindAll(this,"checkUrl"),typeof window!="undefined"&&(this.location=window.location,this.history=window.history)},_=/^[#\/]|\s+$/g,D=/^\/+|\/+$/g,P=/msie [\w.]+/,H=/\/$/,B=/#.*$/;M.started=!1,n.extend(M.prototype,f,{interval:50,atRoot:function(){return this.location.pathname.replace(/[^\/]$/,"$&/")===this.root},getHash:function(e){var t=(e||this).location.href.match(/#(.*)$/);return t?t[1]:""},getFragment:function(e,t){if(e==null)if(this._hasPushState||!this._wantsHashChange||t){e=decodeURI(this.location.pathname+this.location.search);var n=this.root.replace(H,"");e.indexOf(n)||(e=e.slice(n.length))}else e=this.getHash();return e.replace(_,"")},start:function(e){if(M.started)throw new Error("Backbone.history has already been started");M.started=!0,this.options=n.extend({root:"/"},this.options,e),this.root=this.options.root,this._wantsHashChange=this.options.hashChange!==!1,this._wantsPushState=!!this.options.pushState,this._hasPushState=!!(this.options.pushState&&this.history&&this.history.pushState);var r=this.getFragment(),i=document.documentMode,s=P.exec(navigator.userAgent.toLowerCase())&&(!i||i<=7);this.root=("/"+this.root+"/").replace(D,"/");if(s&&this._wantsHashChange){var o=t.$('<iframe src="javascript:0" tabindex="-1">');this.iframe=o.hide().appendTo("body")[0].contentWindow,this.navigate(r)}this._hasPushState?t.$(window).on("popstate",this.checkUrl):this._wantsHashChange&&"onhashchange"in window&&!s?t.$(window).on("hashchange",this.checkUrl):this._wantsHashChange&&(this._checkUrlInterval=setInterval(this.checkUrl,this.interval)),this.fragment=r;var u=this.location;if(this._wantsHashChange&&this._wantsPushState){if(!this._hasPushState&&!this.atRoot())return this.fragment=this.getFragment(null,!0),this.location.replace(this.root+"#"+this.fragment),!0;this._hasPushState&&this.atRoot()&&u.hash&&(this.fragment=this.getHash().replace(_,""),this.history.replaceState({},document.title,this.root+this.fragment))}if(!this.options.silent)return this.loadUrl()},stop:function(){t.$(window).off("popstate",this.checkUrl).off("hashchange",this.checkUrl),this._checkUrlInterval&&clearInterval(this._checkUrlInterval),M.started=!1},route:function(e,t){this.handlers.unshift({route:e,callback:t})},checkUrl:function(e){var t=this.getFragment();t===this.fragment&&this.iframe&&(t=this.getFragment(this.getHash(this.iframe)));if(t===this.fragment)return!1;this.iframe&&this.navigate(t),this.loadUrl()},loadUrl:function(e){return e=this.fragment=this.getFragment(e),n.any(this.handlers,function(t){if(t.route.test(e))return t.callback(e),!0})},navigate:function(e,t){if(!M.started)return!1;if(!t||t===!0)t={trigger:!!t};var n=this.root+(e=this.getFragment(e||""));e=e.replace(B,"");if(this.fragment===e)return;this.fragment=e,e===""&&n!=="/"&&(n=n.slice(0,-1));if(this._hasPushState)this.history[t.replace?"replaceState":"pushState"]({},document.title,n);else{if(!this._wantsHashChange)return this.location.assign(n);this._updateHash(this.location,e,t.replace),this.iframe&&e!==this.getFragment(this.getHash(this.iframe))&&(t.replace||this.iframe.document.open().close(),this._updateHash(this.iframe.location,e,t.replace))}if(t.trigger)return this.loadUrl(e)},_updateHash:function(e,t,n){if(n){var r=e.href.replace(/(javascript:|#).*$/,"");e.replace(r+"#"+t)}else e.hash="#"+t}}),t.history=new M;var j=function(e,t){var r=this,i;e&&n.has(e,"constructor")?i=e.constructor:i=function(){return r.apply(this,arguments)},n.extend(i,r,t);var s=function(){this.constructor=i};return s.prototype=r.prototype,i.prototype=new s,e&&n.extend(i.prototype,e),i.__super__=r.prototype,i};d.extend=m.extend=C.extend=E.extend=M.extend=j;var F=function(){throw new Error('A "url" property or function must be specified')},I=function(e,t){var n=t.error;t.error=function(r){n&&n(e,r,t),e.trigger("error",e,r,t)}};return t}),function(e,t){typeof exports=="object"&&typeof require=="function"?module.exports=t(require("backbone"),require("underscore")):typeof define=="function"&&define.amd?define("backbone.browserStorage",["backbone","underscore"],function(n,r){return t(n||e.Backbone,r||e._)}):t(Backbone,_)}(this,function(e,t){function n(){return((1+Math.random())*65536|0).toString(16).substring(1)}function r(){return n()+n()+"-"+n()+"-"+n()+"-"+n()+"-"+n()+n()+n()}function i(e,t){var n=e.length;while(n--)if(e[n]===t)return!0;return!1}function s(e,t){for(var n in t)e[n]=t[n];return e}function o(e,n,r){var i;if(r==="local"&&!window.localStorage)throw"Backbone.browserStorage: Environment does not support localStorage.";if(r==="session"&&!window.sessionStorage)throw"Backbone.browserStorage: Environment does not support sessionStorage.";this.name=e,this.serializer=n||{serialize:function(e){return t.isObject(e)?JSON.stringify(e):e},deserialize:function(e){return e&&JSON.parse(e)}};if(r==="session")this.store=window.sessionStorage;else{if(r!=="local")throw"Backbone.browserStorage: No storage type was specified";this.store=window.localStorage}i=this.store.getItem(this.name),this.records=i&&i.split(",")||[]}e.BrowserStorage={local:function(e,t){return o.bind(this,e,t,"local")()},session:function(e,t){return o.bind(this,e,t,"session")()}};var u={save:function(){this.store.setItem(this.name,this.records.join(","))},create:function(e){return e.id||(e.id=r(),e.set(e.idAttribute,e.id)),this.store.setItem(this._itemName(e.id),this.serializer.serialize(e)),this.records.push(e.id.toString()),this.save(),this.find(e)!==!1},update:function(e){this.store.setItem(this._itemName(e.id),this.serializer.serialize(e));var t=e.id.toString();return i(this.records,t)||(this.records.push(t),this.save()),this.find(e)!==!1},find:function(e){return this.serializer.deserialize(this.store.getItem(this._itemName(e.id)))},findAll:function(){var e=[];for(var t=0,n,r;t<this.records.length;t++)n=this.records[t],r=this.serializer.deserialize(this.store.getItem(this._itemName(n))),r!==null&&e.push(r);return e},destroy:function(e){this.store.removeItem(this._itemName(e.id));var t=e.id.toString();for(var n=0,r;n<this.records.length;n++)this.records[n]===t&&this.records.splice(n,1);return this.save(),e},browserStorage:function(){return{session:sessionStorage,local:localStorage}},_clear:function(){var e=this.store,t=new RegExp("^"+this.name+"-");e.removeItem(this.name);for(var n in e)t.test(n)&&e.removeItem(n);this.records.length=0},_storageSize:function(){return this.store.length},_itemName:function(e){return this.name+"-"+e}};return s(e.BrowserStorage.session.prototype,u),s(e.BrowserStorage.local.prototype,u),e.BrowserStorage.sync=e.localSync=function(t,n,r){var i=n.browserStorage||n.collection.browserStorage,s,o,u=e.$?e.$.Deferred&&e.$.Deferred():e.Deferred&&e.Deferred();try{switch(t){case"read":s=n.id!==undefined?i.find(n):i.findAll();break;case"create":s=i.create(n);break;case"update":s=i.update(n);break;case"delete":s=i.destroy(n)}}catch(a){a.code===22&&i._storageSize()===0?o="Private browsing is unsupported":o=a.message}return s?(r&&r.success&&(e.VERSION==="0.9.10"?r.success(n,s,r):r.success(s)),u&&u.resolve(s)):(o=o?o:"Record Not Found",r&&r.error&&(e.VERSION==="0.9.10"?r.error(n,o,r):r.error(o)),u&&u.reject(o)),r&&r.complete&&r.complete(s),u&&u.promise()},e.ajaxSync=e.sync,e.getSyncMethod=function(t){return t.browserStorage||t.collection&&t.collection.browserStorage?e.localSync:e.ajaxSync},e.sync=function(t,n,r){return e.getSyncMethod(n).apply(this,[t,n,r])},e.BrowserStorage}),function(e,t){typeof define=="function"&&define.amd?define("backbone.overview",["underscore","backbone"],function(n,r){return t(n||e._,r||e.Backbone)}):t(_,Backbone)}(this,function(e,t){var n=t.Overview=function(n){var r={};this.keys=function(){return e.keys(r)},this.getAll=function(){return r},this.get=function(e){return r[e]},this.add=function(e,t){return r[e]=t,t},this.remove=function(e){var t=r[e];if(t)return delete r[e],t.remove(),t},this.removeAll=function(t){e.each(e.keys(r),this.remove)},t.View.apply(this,Array.prototype.slice.apply(arguments))};return e.extend(n.prototype,t.View.prototype),n.extend=t.View.extend,t.Overview}),function(e,t){typeof define=="function"&&define.amd?define("typeahead",["jquery"],function(n){t(n,e)}):t(jQuery,e)}(this,function(e,t){var n=function(){return{isMsie:function(){return/(msie|trident)/i.test(navigator.userAgent)?navigator.userAgent.match(/(msie |rv:)(\d+(.\d+)?)/i)[2]:!1},isBlankString:function(e){return!e||/^\s*$/.test(e)},escapeRegExChars:function(e){return e.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&")},isString:function(e){return typeof e=="string"},isNumber:function(e){return typeof e=="number"},isArray:e.isArray,isFunction:e.isFunction,isObject:e.isPlainObject,isUndefined:function(e){return typeof e=="undefined"},toStr:function(t){return n.isUndefined(t)||t===null?"":t+""},bind:e.proxy,each:function(t,n){function r(e,t){return n(t,e)}e.each(t,r)},map:e.map,filter:e.grep,every:function(t,n){var r=!0;return t?(e.each(t,function(e,i){if(!(r=n.call(null,i,e,t)))return!1}),!!r):r},some:function(t,n){var r=!1;return t?(e.each(t,function(e,i){if(r=n.call(null,i,e,t))return!1}),!!r):r},mixin:e.extend,getUniqueId:function(){var e=0;return function(){return e++}}(),templatify:function(n){function r(){return String(n)}return e.isFunction(n)?n:r},defer:function(e){setTimeout(e,0)},debounce:function(e,t,n){var r,i;return function(){var s=this,o=arguments,u,a;return u=function(){r=null,n||(i=e.apply(s,o))},a=n&&!r,clearTimeout(r),r=setTimeout(u,t),a&&(i=e.apply(s,o)),i}},throttle:function(e,t){var n,r,i,s,o,u;return o=0,u=function(){o=new Date,i=null,s=e.apply(n,r)},function(){var a=new Date,f=t-(a-o);return n=this,r=arguments,f<=0?(clearTimeout(i),i=null,o=a,s=e.apply(n,r)):i||(i=setTimeout(u,f)),s}},noop:function(){}}}(),r=function(){return{wrapper:'<span class="twitter-typeahead"></span>',dropdown:'<span class="tt-dropdown-menu"></span>',dataset:'<div class="tt-dataset-%CLASS%"></div>',suggestions:'<span class="tt-suggestions"></span>',suggestion:'<div class="tt-suggestion"></div>'}}(),i=function(){var e={wrapper:{position:"relative",display:"inline-block"},hint:{position:"absolute",top:"0",left:"0",borderColor:"transparent",boxShadow:"none",opacity:"1"},input:{position:"relative",verticalAlign:"top",backgroundColor:"transparent"},inputWithNoHint:{position:"relative",verticalAlign:"top"},dropdown:{position:"absolute",top:"100%",left:"0",zIndex:"100",display:"none"},suggestions:{display:"block"},suggestion:{whiteSpace:"nowrap",cursor:"pointer"},suggestionChild:{whiteSpace:"normal"},ltr:{left:"0",right:"auto"},rtl:{left:"auto",right:" 0"}};return n.isMsie()&&n.mixin(e.input,{backgroundImage:"url(data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7)"}),n.isMsie()&&n.isMsie()<=7&&n.mixin(e.input,{marginTop:"-1px"}),e}(),s=function(){function r(t){(!t||!t.el)&&e.error("EventBus initialized without el"),this.$el=e(t.el)}var t="typeahead:";return n.mixin(r.prototype,{trigger:function(e){var n=[].slice.call(arguments,1);this.$el.trigger(t+e,n)}}),r}(),o=function(){function r(t,n,r,i){var s;if(!r)return this;n=n.split(e),r=i?l(r,i):r,this._callbacks=this._callbacks||{};while(s=n.shift())this._callbacks[s]=this._callbacks[s]||{sync:[],async:[]},this._callbacks[s][t].push(r);return this}function i(e,t,n){return r.call(this,"async",e,t,n)}function s(e,t,n){return r.call(this,"sync",e,t,n)}function o(t){var n;if(!this._callbacks)return this;t=t.split(e);while(n=t.shift())delete this._callbacks[n];return this}function u(t){var r,i,s,o,u;if(!this._callbacks)return this;t=t.split(e),s=[].slice.call(arguments,1);while((r=t.shift())&&(i=this._callbacks[r]))o=a(i.sync,this,[r].concat(s)),u=a(i.async,this,[r].concat(s)),o()&&n(u);return this}function a(e,t,n){function r(){var r;for(var i=0,s=e.length;!r&&i<s;i+=1)r=e[i].apply(t,n)===!1;return!r}return r}function f(){var e;return t.setImmediate?e=function(t){setImmediate(function(){t()})}:e=function(t){setTimeout(function(){t()},0)},e}function l(e,t){return e.bind?e.bind(t):function(){e.apply(t,[].slice.call(arguments,0))}}var e=/\s+/,n=f();return{onSync:s,onAsync:i,off:o,trigger:u}}(),u=function(e){function r(e,t,r){var i=[],s;for(var o=0,u=e.length;o<u;o++)i.push(n.escapeRegExChars(e[o]));return s=r?"\\b("+i.join("|")+")\\b":"("+i.join("|")+")",t?new RegExp(s):new RegExp(s,"i")}var t={node:null,pattern:null,tagName:"strong",className:null,wordsOnly:!1,caseSensitive:!1};return function(s){function u(t){var n,r,i;if(n=o.exec(t.data))i=e.createElement(s.tagName),s.className&&(i.className=s.className),r=t.splitText(n.index),r.splitText(n[0].length),i.appendChild(r.cloneNode(!0)),t.parentNode.replaceChild(i,r);return!!n}function a(e,t){var n,r=3;for(var i=0;i<e.childNodes.length;i++)n=e.childNodes[i],n.nodeType===r?i+=t(n)?1:0:a(n,t)}var o;s=n.mixin({},t,s);if(!s.node||!s.pattern)return;s.pattern=n.isArray(s.pattern)?s.pattern:[s.pattern],o=r(s.pattern,s.caseSensitive,s.wordsOnly),a(s.node,u)}}(t.document),a=function(){function r(r){var s=this,o,u,a,f;r=r||{},r.input||e.error("input is missing"),o=n.bind(this._onBlur,this),u=n.bind(this._onFocus,this),a=n.bind(this._onKeydown,this),f=n.bind(this._onInput,this),this.$hint=e(r.hint),this.$input=e(r.input).on("blur.tt",o).on("focus.tt",u).on("keydown.tt",a),this.$hint.length===0&&(this.setHint=this.getHint=this.clearHint=this.clearHintIfInvalid=n.noop),n.isMsie()?this.$input.on("keydown.tt keypress.tt cut.tt paste.tt",function(e){if(t[e.which||e.keyCode])return;n.defer(n.bind(s._onInput,s,e))}):this.$input.on("input.tt",f),this.query=this.$input.val(),this.$overflowHelper=i(this.$input)}function i(t){return e('<pre aria-hidden="true"></pre>').css({position:"absolute",visibility:"hidden",whiteSpace:"pre",fontFamily:t.css("font-family"),fontSize:t.css("font-size"),fontStyle:t.css("font-style"),fontVariant:t.css("font-variant"),fontWeight:t.css("font-weight"),wordSpacing:t.css("word-spacing"),letterSpacing:t.css("letter-spacing"),textIndent:t.css("text-indent"),textRendering:t.css("text-rendering"),textTransform:t.css("text-transform")}).insertAfter(t)}function s(e,t){return r.normalizeQuery(e)===r.normalizeQuery(t)}function u(e){return e.altKey||e.ctrlKey||e.metaKey||e.shiftKey}var t;return t={9:"tab",27:"esc",37:"left",39:"right",13:"enter",38:"up",40:"down"},r.normalizeQuery=function(e){return(e||"").replace(/^\s*/g,"").replace(/\s{2,}/g," ")},n.mixin(r.prototype,o,{_onBlur:function(){this.resetInputValue(),this.trigger("blurred")},_onFocus:function(){this.trigger("focused")},_onKeydown:function(n){var r=t[n.which||n.keyCode];this._managePreventDefault(r,n),r&&this._shouldTrigger(r,n)&&this.trigger(r+"Keyed",n)},_onInput:function(){this._checkInputValue()},_managePreventDefault:function(t,n){var r,i,s;switch(t){case"tab":i=this.getHint(),s=this.getInputValue(),r=i&&i!==s&&!u(n);break;case"up":case"down":r=!u(n);break;default:r=!1}r&&n.preventDefault()},_shouldTrigger:function(t,n){var r;switch(t){case"tab":r=!u(n);break;default:r=!0}return r},_checkInputValue:function(){var t,n,r;t=this.getInputValue(),n=s(t,this.query),r=n?this.query.length!==t.length:!1,this.query=t,n?r&&this.trigger("whitespaceChanged",this.query):this.trigger("queryChanged",this.query)},focus:function(){this.$input.focus()},blur:function(){this.$input.blur()},getQuery:function(){return this.query},setQuery:function(t){this.query=t},getInputValue:function(){return this.$input.val()},setInputValue:function(t,n){this.$input.val(t),n?this.clearHint():this._checkInputValue()},resetInputValue:function(){this.setInputValue(this.query,!0)},getHint:function(){return this.$hint.val()},setHint:function(t){this.$hint.val(t)},clearHint:function(){this.setHint("")},clearHintIfInvalid:function(){var t,n,r,i;t=this.getInputValue(),n=this.getHint(),r=t!==n&&n.indexOf(t)===0,i=t!==""&&r&&!this.hasOverflow(),!i&&this.clearHint()},getLanguageDirection:function(){return(this.$input.css("direction")||"ltr").toLowerCase()},hasOverflow:function(){var t=this.$input.width()-2;return this.$overflowHelper.text(this.getInputValue()),this.$overflowHelper.width()>=t},isCursorAtEnd:function(){var e,t,r;return e=this.$input.val().length,t=this.$input[0].selectionStart,n.isNumber(t)?t===e:document.selection?(r=document.selection.createRange(),r.moveStart("character",-e),e===r.text.length):!0},destroy:function(){this.$hint.off(".tt"),this.$input.off(".tt"),this.$hint=this.$input=this.$overflowHelper=null}}),r}(),f=function(){function f(t){t=t||{},t.templates=t.templates||{},t.source||e.error("missing source"),t.name&&!h(t.name)&&e.error("invalid dataset name: "+t.name),this.query=null,this.highlight=!!t.highlight,this.name=t.name||n.getUniqueId(),this.source=t.source,this.displayFn=l(t.display||t.displayKey),this.templates=c(t.templates,this.displayFn),this.$el=e(r.dataset.replace("%CLASS%",this.name))}function l(e){function t(t){return t[e]}return e=e||"value",n.isFunction(e)?e:t}function c(e,t){function r(e){return"<p>"+t(e)+"</p>"}return{empty:e.empty&&n.templatify(e.empty),header:e.header&&n.templatify(e.header),footer:e.footer&&n.templatify(e.footer),suggestion:e.suggestion||r}}function h(e){return/^[_a-zA-Z0-9-]+$/.test(e)}var t="ttDataset",s="ttValue",a="ttDatum";return f.extractDatasetName=function(r){return e(r).data(t)},f.extractValue=function(n){return e(n).data(s)},f.extractDatum=function(n){return e(n).data(a)},n.mixin(f.prototype,o,{_render:function(f,l){function p(){return c.templates.empty({query:f,isEmpty:!0})}function d(){function p(n){var o;return o=e(r.suggestion).append(c.templates.suggestion(n)).data(t,c.name).data(s,c.displayFn(n)).data(a,n),o.children().each(function(){e(this).css(i.suggestionChild)}),o}var o,h;return o=e(r.suggestions).css(i.suggestions),h=n.map(l,p),o.append.apply(o,h),c.highlight&&u({className:"tt-highlight",node:o[0],pattern:f}),o}function v(){return c.templates.header({query:f,isEmpty:!h})}function m(){return c.templates.footer({query:f,isEmpty:!h})}if(!this.$el)return;var c=this,h;this.$el.empty(),h=l&&l.length,!h&&this.templates.empty?this.$el.html(p()).prepend(c.templates.header?v():null).append(c.templates.footer?m():null):h&&this.$el.html(d()).prepend(c.templates.header?v():null).append(c.templates.footer?m():null),this.trigger("rendered")},getRoot:function(){return this.$el},update:function(t){function r(e){!n.canceled&&t===n.query&&n._render(t,e)}var n=this;this.query=t,this.canceled=!1,this.source(t,r)},cancel:function(){this.canceled=!0},clear:function(){this.cancel(),this.$el.empty(),this.trigger("rendered")},isEmpty:function(){return this.$el.is(":empty")},destroy:function(){this.$el=null}}),f}(),l=function(){function t(t){var i=this,s,o,u;t=t||{},t.menu||e.error("menu is required"),this.isOpen=!1,this.isEmpty=!0,this.datasets=n.map(t.datasets,r),s=n.bind(this._onSuggestionClick,this),o=n.bind(this._onSuggestionMouseEnter,this),u=n.bind(this._onSuggestionMouseLeave,this),this.$menu=e(t.menu).on("click.tt",".tt-suggestion",s).on("mouseenter.tt",".tt-suggestion",o).on("mouseleave.tt",".tt-suggestion",u),n.each(this.datasets,function(e){i.$menu.append(e.getRoot()),e.onSync("rendered",i._onRendered,i)})}function r(e){return new f(e)}return n.mixin(t.prototype,o,{_onSuggestionClick:function(n){this.trigger("suggestionClicked",e(n.currentTarget))},_onSuggestionMouseEnter:function(n){this._removeCursor(),this._setCursor(e(n.currentTarget),!0)},_onSuggestionMouseLeave:function(){this._removeCursor()},_onRendered:function(){function t(e){return e.isEmpty()}this.isEmpty=n.every(this.datasets,t),this.isEmpty?this._hide():this.isOpen&&this._show(),this.trigger("datasetRendered")},_hide:function(){this.$menu.hide()},_show:function(){this.$menu.css("display","block")},_getSuggestions:function(){return this.$menu.find(".tt-suggestion")},_getCursor:function(){return this.$menu.find(".tt-cursor").first()},_setCursor:function(t,n){t.first().addClass("tt-cursor"),!n&&this.trigger("cursorMoved")},_removeCursor:function(){this._getCursor().removeClass("tt-cursor")},_moveCursor:function(t){var n,r,i,s;if(!this.isOpen)return;r=this._getCursor(),n=this._getSuggestions(),this._removeCursor(),i=n.index(r)+t,i=(i+1)%(n.length+1)-1;if(i===-1){this.trigger("cursorRemoved");return}i<-1&&(i=n.length-1),this._setCursor(s=n.eq(i)),this._ensureVisible(s)},_ensureVisible:function(t){var n,r,i,s;n=t.position().top,r=n+t.outerHeight(!0),i=this.$menu.scrollTop(),s=this.$menu.height()+parseInt(this.$menu.css("paddingTop"),10)+parseInt(this.$menu.css("paddingBottom"),10),n<0?this.$menu.scrollTop(i+n):s<r&&this.$menu.scrollTop(i+(r-s))},close:function(){this.isOpen&&(this.isOpen=!1,this._removeCursor(),this._hide(),this.trigger("closed"))},open:function(){this.isOpen||(this.isOpen=!0,!this.isEmpty&&this._show(),this.trigger("opened"))},setLanguageDirection:function(t){this.$menu.css(t==="ltr"?i.ltr:i.rtl)},moveCursorUp:function(){this._moveCursor(-1)},moveCursorDown:function(){this._moveCursor(1)},getDatumForSuggestion:function(t){var n=null;return t.length&&(n={raw:f.extractDatum(t),value:f.extractValue(t),datasetName:f.extractDatasetName(t)}),n},getDatumForCursor:function(){return this.getDatumForSuggestion(this._getCursor().first())},getDatumForTopSuggestion:function(){return this.getDatumForSuggestion(this._getSuggestions().first())},update:function(t){function r(e){e.update(t)}n.each(this.datasets,r)},empty:function(){function t(e){e.clear()}n.each(this.datasets,t),this.isEmpty=!0},isVisible:function(){return this.isOpen&&!this.isEmpty},destroy:function(){function t(e){e.destroy()}this.$menu.off(".tt"),this.$menu=null,n.each(this.datasets,t)}}),t}(),c=function(){function o(t){var r,i,o;t=t||{},t.input||e.error("missing input"),this.isActivated=!1,this.autoselect=!!t.autoselect,this.minLength=n.isNumber(t.minLength)?t.minLength:1,this.$node=u(t.input,t.withHint),r=this.$node.find(".tt-dropdown-menu"),i=this.$node.find(".tt-input"),o=this.$node.find(".tt-hint"),i.on("blur.tt",function(e){var t,s,o;t=document.activeElement,s=r.is(t),o=r.has(t).length>0,n.isMsie()&&(s||o)&&(e.preventDefault(),e.stopImmediatePropagation(),n.defer(function(){i.focus()}))}),r.on("mousedown.tt",function(e){e.preventDefault()}),this.eventBus=t.eventBus||new s({el:i}),this.dropdown=(new l({menu:r,datasets:t.datasets})).onSync("suggestionClicked",this._onSuggestionClicked,this).onSync("cursorMoved",this._onCursorMoved,this).onSync("cursorRemoved",this._onCursorRemoved,this).onSync("opened",this._onOpened,this).onSync("closed",this._onClosed,this).onAsync("datasetRendered",this._onDatasetRendered,this),this.input=(new a({input:i,hint:o})).onSync("focused",this._onFocused,this).onSync("blurred",this._onBlurred,this).onSync("enterKeyed",this._onEnterKeyed,this).onSync("tabKeyed",this._onTabKeyed,this).onSync("escKeyed",this._onEscKeyed,this).onSync("upKeyed",this._onUpKeyed,this).onSync("downKeyed",this._onDownKeyed,this).onSync("leftKeyed",this._onLeftKeyed,this).onSync("rightKeyed",this._onRightKeyed,this).onSync("queryChanged",this._onQueryChanged,this).onSync("whitespaceChanged",this._onWhitespaceChanged,this),this._setLanguageDirection()}function u(n,s){var o,u,a,l;o=e(n),u=e(r.wrapper).css(i.wrapper),a=e(r.dropdown).css(i.dropdown),l=o.clone().css(i.hint).css(f(o)),l.val("").removeData().addClass("tt-hint").removeAttr("id name placeholder required").prop("readonly",!0).attr({autocomplete:"off",spellcheck:"false",tabindex:-1}),o.data(t,{dir:o.attr("dir"),autocomplete:o.attr("autocomplete"),spellcheck:o.attr("spellcheck"),style:o.attr("style")}),o.addClass("tt-input").attr({autocomplete:"off",spellcheck:!1}).css(s?i.input:i.inputWithNoHint);try{!o.attr("dir")&&o.attr("dir","auto")}catch(c){}return o.wrap(u).parent().prepend(s?l:null).append(a)}function f(e){return{backgroundAttachment:e.css("background-attachment"),backgroundClip:e.css("background-clip"),backgroundColor:e.css("background-color"),backgroundImage:e.css("background-image"),backgroundOrigin:e.css("background-origin"),backgroundPosition:e.css("background-position"),backgroundRepeat:e.css("background-repeat"),backgroundSize:e.css("background-size")}}function c(e){var r=e.find(".tt-input");n.each(r.data(t),function(e,t){n.isUndefined(e)?r.removeAttr(t):r.attr(t,e)}),r.detach().removeData(t).removeClass("tt-input").insertAfter(e),e.remove()}var t="ttAttrs";return n.mixin(o.prototype,{_onSuggestionClicked:function(t,n){var r;(r=this.dropdown.getDatumForSuggestion(n))&&this._select(r)},_onCursorMoved:function(){var t=this.dropdown.getDatumForCursor();this.input.setInputValue(t.value,!0),this.eventBus.trigger("cursorchanged",t.raw,t.datasetName)},_onCursorRemoved:function(){this.input.resetInputValue(),this._updateHint()},_onDatasetRendered:function(){this._updateHint()},_onOpened:function(){this._updateHint(),this.eventBus.trigger("opened")},_onClosed:function(){this.input.clearHint(),this.eventBus.trigger("closed")},_onFocused:function(){this.isActivated=!0,this.dropdown.open()},_onBlurred:function(){this.isActivated=!1,this.dropdown.empty(),this.dropdown.close()},_onEnterKeyed:function(t,n){var r,i;r=this.dropdown.getDatumForCursor(),i=this.dropdown.getDatumForTopSuggestion(),r?(this._select(r),n.preventDefault()):this.autoselect&&i&&(this._select(i),n.preventDefault())},_onTabKeyed:function(t,n){var r;(r=this.dropdown.getDatumForCursor())?(this._select(r),n.preventDefault()):this._autocomplete(!0)},_onEscKeyed:function(){this.dropdown.close(),this.input.resetInputValue()},_onUpKeyed:function(){var t=this.input.getQuery();this.dropdown.isEmpty&&t.length>=this.minLength?this.dropdown.update(t):this.dropdown.moveCursorUp(),this.dropdown.open()},_onDownKeyed:function(){var t=this.input.getQuery();this.dropdown.isEmpty&&t.length>=this.minLength?this.dropdown.update(t):this.dropdown.moveCursorDown(),this.dropdown.open()},_onLeftKeyed:function(){this.dir==="rtl"&&this._autocomplete()},_onRightKeyed:function(){this.dir==="ltr"&&this._autocomplete()},_onQueryChanged:function(t,n){this.input.clearHintIfInvalid(),n.length>=this.minLength?this.dropdown.update(n):this.dropdown.empty(),this.dropdown.open(),this._setLanguageDirection()},_onWhitespaceChanged:function(){this._updateHint(),this.dropdown.open()},_setLanguageDirection:function(){var t;this.dir!==(t=this.input.getLanguageDirection())&&(this.dir=t,this.$node.css("direction",t),this.dropdown.setLanguageDirection(t))},_updateHint:function(){var t,r,i,s,o,u;t=this.dropdown.getDatumForTopSuggestion(),t&&this.dropdown.isVisible()&&!this.input.hasOverflow()?(r=this.input.getInputValue(),i=a.normalizeQuery(r),s=n.escapeRegExChars(i),o=new RegExp("^(?:"+s+")(.+$)","i"),u=o.exec(t.value),u?this.input.setHint(r+u[1]):this.input.clearHint()):this.input.clearHint()},_autocomplete:function(t){var n,r,i,s;n=this.input.getHint(),r=this.input.getQuery(),i=t||this.input.isCursorAtEnd(),n&&r!==n&&i&&(s=this.dropdown.getDatumForTopSuggestion(),s&&this.input.setInputValue(s.value),this.eventBus.trigger("autocompleted",s.raw,s.datasetName))},_select:function(t){this.input.setQuery(t.value),this.input.setInputValue(t.value,!0),this._setLanguageDirection(),this.eventBus.trigger("selected",t.raw,t.datasetName),this.dropdown.close(),n.defer(n.bind(this.dropdown.empty,this.dropdown))},open:function(){this.dropdown.open()},close:function(){this.dropdown.close()},setVal:function(t){t=n.toStr(t),this.isActivated?this.input.setInputValue(t):(this.input.setQuery(t),this.input.setInputValue(t,!0)),this._setLanguageDirection()},getVal:function(){return this.input.getQuery()},destroy:function(){this.input.destroy(),this.dropdown.destroy(),c(this.$node),this.$node=null}}),o}();return function(){var t,r,i;t=e.fn.typeahead,r="ttTypeahead",i={initialize:function(i,o){function u(){var t=e(this),u,a;n.each(o,function(e){e.highlight=!!i.highlight}),a=new c({input:t,eventBus:u=new s({el:t}),withHint:n.isUndefined(i.hint)?!0:!!i.hint,minLength:i.minLength,autoselect:i.autoselect,datasets:o}),t.data(r,a)}return o=n.isArray(o)?o:[].slice.call(arguments,1),i=i||{},this.each(u)},open:function(){function n(){var t=e(this),n;(n=t.data(r))&&n.open()}return this.each(n)},close:function(){function n(){var t=e(this),n;(n=t.data(r))&&n.close()}return this.each(n)},val:function(n){function i(){var t=e(this),i;(i=t.data(r))&&i.setVal(n)}function s(e){var t,n;if(t=e.data(r))n=t.getVal();return n}return arguments.length?this.each(i):s(this.first())},destroy:function(){function n(){var t=e(this),n;if(n=t.data(r))n.destroy(),t.removeData(r)}return this.each(n)}},e.fn.typeahead=function(t){var n;return i[t]&&t!=="initialize"?(n=this.filter(function(){return!!e(this).data(r)}),i[t].apply(n,[].slice.call(arguments,1))):i.initialize.apply(this,arguments)},e.fn.typeahead.noConflict=function(){return e.fn.typeahead=t,this}}(),{}});var Base64=function(){var e="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",t={encode:function(t){var n="",r,i,s,o,u,a,f,l=0;do r=t.charCodeAt(l++),i=t.charCodeAt(l++),s=t.charCodeAt(l++),o=r>>2,u=(r&3)<<4|i>>4,a=(i&15)<<2|s>>6,f=s&63,isNaN(i)?a=f=64:isNaN(s)&&(f=64),n=n+e.charAt(o)+e.charAt(u)+e.charAt(a)+e.charAt(f);while(l<t.length);return n},decode:function(t){var n="",r,i,s,o,u,a,f,l=0;t=t.replace(/[^A-Za-z0-9\+\/\=]/g,"");do o=e.indexOf(t.charAt(l++)),u=e.indexOf(t.charAt(l++)),a=e.indexOf(t.charAt(l++)),f=e.indexOf(t.charAt(l++)),r=o<<2|u>>4,i=(u&15)<<4|a>>2,s=(a&3)<<6|f,n+=String.fromCharCode(r),a!=64&&(n+=String.fromCharCode(i)),f!=64&&(n+=String.fromCharCode(s));while(l<t.length);return n}};return t}(),MD5=function(){var e=function(e,t){var n=(e&65535)+(t&65535),r=(e>>16)+(t>>16)+(n>>16);return r<<16|n&65535},t=function(e,t){return e<<t|e>>>32-t},n=function(e){var t=[];for(var n=0;n<e.length*8;n+=8)t[n>>5]|=(e.charCodeAt(n/8)&255)<<n%32;return t},r=function(e){var t="";for(var n=0;n<e.length*32;n+=8)t+=String.fromCharCode(e[n>>5]>>>n%32&255);return t},i=function(e){var t="0123456789abcdef",n="";for(var r=0;r<e.length*4;r++)n+=t.charAt(e[r>>2]>>r%4*8+4&15)+t.charAt(e[r>>2]>>r%4*8&15);return n},s=function(n,r,i,s,o,u){return e(t(e(e(r,n),e(s,u)),o),i)},o=function(e,t,n,r,i,o,u){return s(t&n|~t&r,e,t,i,o,u)},u=function(e,t,n,r,i,o,u){return s(t&r|n&~r,e,t,i,o,u)},a=function(e,t,n,r,i,o,u){return s(t^n^r,e,t,i,o,u)},f=function(e,t,n,r,i,o,u){return s(n^(t|~r),e,t,i,o,u)},l=function(t,n){t[n>>5]|=128<<n%32,t[(n+64>>>9<<4)+14]=n;var r=1732584193,i=-271733879,s=-1732584194,l=271733878,c,h,p,d;for(var v=0;v<t.length;v+=16)c=r,h=i,p=s,d=l,r=o(r,i,s,l,t[v+0],7,-680876936),l=o(l,r,i,s,t[v+1],12,-389564586),s=o(s,l,r,i,t[v+2],17,606105819),i=o(i,s,l,r,t[v+3],22,-1044525330),r=o(r,i,s,l,t[v+4],7,-176418897),l=o(l,r,i,s,t[v+5],12,1200080426),s=o(s,l,r,i,t[v+6],17,-1473231341),i=o(i,s,l,r,t[v+7],22,-45705983),r=o(r,i,s,l,t[v+8],7,1770035416),l=o(l,r,i,s,t[v+9],12,-1958414417),s=o(s,l,r,i,t[v+10],17,-42063),i=o(i,s,l,r,t[v+11],22,-1990404162),r=o(r,i,s,l,t[v+12],7,1804603682),l=o(l,r,i,s,t[v+13],12,-40341101),s=o(s,l,r,i,t[v+14],17,-1502002290),i=o(i,s,l,r,t[v+15],22,1236535329),r=u(r,i,s,l,t[v+1],5,-165796510),l=u(l,r,i,s,t[v+6],9,-1069501632),s=u(s,l,r,i,t[v+11],14,643717713),i=u(i,s,l,r,t[v+0],20,-373897302),r=u(r,i,s,l,t[v+5],5,-701558691),l=u(l,r,i,s,t[v+10],9,38016083),s=u(s,l,r,i,t[v+15],14,-660478335),i=u(i,s,l,r,t[v+4],20,-405537848),r=u(r,i,s,l,t[v+9],5,568446438),l=u(l,r,i,s,t[v+14],9,-1019803690),s=u(s,l,r,i,t[v+3],14,-187363961),i=u(i,s,l,r,t[v+8],20,1163531501),r=u(r,i,s,l,t[v+13],5,-1444681467),l=u(l,r,i,s,t[v+2],9,-51403784),s=u(s,l,r,i,t[v+7],14,1735328473),i=u(i,s,l,r,t[v+12],20,-1926607734),r=a(r,i,s,l,t[v+5],4,-378558),l=a(l,r,i,s,t[v+8],11,-2022574463),s=a(s,l,r,i,t[v+11],16,1839030562),i=a(i,s,l,r,t[v+14],23,-35309556),r=a(r,i,s,l,t[v+1],4,-1530992060),l=a(l,r,i,s,t[v+4],11,1272893353),s=a(s,l,r,i,t[v+7],16,-155497632),i=a(i,s,l,r,t[v+10],23,-1094730640),r=a(r,i,s,l,t[v+13],4,681279174),l=a(l,r,i,s,t[v+0],11,-358537222),s=a(s,l,r,i,t[v+3],16,-722521979),i=a(i,s,l,r,t[v+6],23,76029189),r=a(r,i,s,l,t[v+9],4,-640364487),l=a(l,r,i,s,t[v+12],11,-421815835),s=a(s,l,r,i,t[v+15],16,530742520),i=a(i,s,l,r,t[v+2],23,-995338651),r=f(r,i,s,l,t[v+0],6,-198630844),l=f(l,r,i,s,t[v+7],10,1126891415),s=f(s,l,r,i,t[v+14],15,-1416354905),i=f(i,s,l,r,t[v+5],21,-57434055),r=f(r,i,s,l,t[v+12],6,1700485571),l=f(l,r,i,s,t[v+3],10,-1894986606),s=f(s,l,r,i,t[v+10],15,-1051523),i=f(i,s,l,r,t[v+1],21,-2054922799),r=f(r,i,s,l,t[v+8],6,1873313359),l=f(l,r,i,s,t[v+15],10,-30611744),s=f(s,l,r,i,t[v+6],15,-1560198380),i=f(i,s,l,r,t[v+13],21,1309151649),r=f(r,i,s,l,t[v+4],6,-145523070),l=f(l,r,i,s,t[v+11],10,-1120210379),s=f(s,l,r,i,t[v+2],15,718787259),i=f(i,s,l,r,t[v+9],21,-343485551),r=e(r,c),i=e(i,h),s=e(s,p),l=e(l,d);return[r,i,s,l]},c={hexdigest:function(e){return i(l(n(e),e.length*8))},hash:function(e){return r(l(n(e),e.length*8))}};return c}();Function.prototype.bind||(Function.prototype.bind=function(e){var t=this,n=Array.prototype.slice,r=Array.prototype.concat,i=n.call(arguments,1);return function(){return t.apply(e?e:this,r.call(i,n.call(arguments,0)))}}),Array.prototype.indexOf||(Array.prototype.indexOf=function(e){var t=this.length,n=Number(arguments[1])||0;n=n<0?Math.ceil(n):Math.floor(n),n<0&&(n+=t);for(;n<t;n++)if(n in this&&this[n]===e)return n;return-1}),function(e){function n(e,n){return new t.Builder(e,n)}function r(e){return new t.Builder("message",e)}function i(e){return new t.Builder("iq",e)}function s(e){return new t.Builder("presence",e)}var t;t={VERSION:"1.1.3",NS:{HTTPBIND:"http://jabber.org/protocol/httpbind",BOSH:"urn:xmpp:xbosh",CLIENT:"jabber:client",AUTH:"jabber:iq:auth",ROSTER:"jabber:iq:roster",PROFILE:"jabber:iq:profile",DISCO_INFO:"http://jabber.org/protocol/disco#info",DISCO_ITEMS:"http://jabber.org/protocol/disco#items",MUC:"http://jabber.org/protocol/muc",SASL:"urn:ietf:params:xml:ns:xmpp-sasl",STREAM:"http://etherx.jabber.org/streams",BIND:"urn:ietf:params:xml:ns:xmpp-bind",SESSION:"urn:ietf:params:xml:ns:xmpp-session",VERSION:"jabber:iq:version",STANZAS:"urn:ietf:params:xml:ns:xmpp-stanzas",XHTML_IM:"http://jabber.org/protocol/xhtml-im",XHTML:"http://www.w3.org/1999/xhtml"},XHTML:{tags:["a","blockquote","br","cite","em","img","li","ol","p","span","strong","ul","body"],attributes:{a:["href"],blockquote:["style"],br:[],cite:["style"],em:[],img:["src","alt","style","height","width"],li:["style"],ol:["style"],p:["style"],span:["style"],strong:[],ul:["style"],body:[]},css:["background-color","color","font-family","font-size","font-style","font-weight","margin-left","margin-right","text-align","text-decoration"],validTag:function(e){for(var n=0;n<t.XHTML.tags.length;n++)if(e==t.XHTML.tags[n])return!0;return!1},validAttribute:function(e,n){if(typeof t.XHTML.attributes[e]!="undefined"&&t.XHTML.attributes[e].length>0)for(var r=0;r<t.XHTML.attributes[e].length;r++)if(n==t.XHTML.attributes[e][r])return!0;return!1},validCSS:function(e){for(var n=0;n<t.XHTML.css.length;n++)if(e==t.XHTML.css[n])return!0;return!1}},Status:{ERROR:0,CONNECTING:1,CONNFAIL:2,AUTHENTICATING:3,AUTHFAIL:4,CONNECTED:5,DISCONNECTED:6,DISCONNECTING:7,ATTACHED:8},LogLevel:{DEBUG:0,INFO:1,WARN:2,ERROR:3,FATAL:4},ElementType:{NORMAL:1,TEXT:3,CDATA:4,FRAGMENT:11},TIMEOUT:1.1,SECONDARY_TIMEOUT:.1,addNamespace:function(e,n){t.NS[e]=n},forEachChild:function(e,n,r){var i,s;for(i=0;i<e.childNodes.length;i++)s=e.childNodes[i],s.nodeType==t.ElementType.NORMAL&&(!n||this.isTagEqual(s,n))&&r(s)},isTagEqual:function(e,t){return e.tagName.toLowerCase()==t.toLowerCase()},_xmlGenerator:null,_makeGenerator:function(){var e;return document.implementation.createDocument===undefined||document.implementation.createDocument&&document.documentMode&&document.documentMode<10?(e=this._getIEXmlDom(),e.appendChild(e.createElement("strophe"))):e=document.implementation.createDocument("jabber:client","strophe",null),e},xmlGenerator:function(){return t._xmlGenerator||(t._xmlGenerator=t._makeGenerator()),t._xmlGenerator},_getIEXmlDom:function(){var e=null,t=["Msxml2.DOMDocument.6.0","Msxml2.DOMDocument.5.0","Msxml2.DOMDocument.4.0","MSXML2.DOMDocument.3.0","MSXML2.DOMDocument","MSXML.DOMDocument","Microsoft.XMLDOM"];for(var n=0;n<t.length;n++){if(e!==null)break;try{e=new ActiveXObject(t[n])}catch(r){e=null}}return e},xmlElement:function(e){if(!e)return null;var n=t.xmlGenerator().createElement(e),r,i,s;for(r=1;r<arguments.length;r++){if(!arguments[r])continue;if(typeof arguments[r]=="string"||typeof arguments[r]=="number")n.appendChild(t.xmlTextNode(arguments[r]));else if(typeof arguments[r]=="object"&&typeof arguments[r].sort=="function")for(i=0;i<arguments[r].length;i++)typeof arguments[r][i]=="object"&&typeof arguments[r][i].sort=="function"&&n.setAttribute(arguments[r][i][0],arguments[r][i][1]);else if(typeof arguments[r]=="object")for(s in arguments[r])arguments[r].hasOwnProperty(s)&&n.setAttribute(s,arguments[r][s])}return n},xmlescape:function(e){return e=e.replace(/\&/g,"&amp;"),e=e.replace(/</g,"&lt;"),e=e.replace(/>/g,"&gt;"),e=e.replace(/'/g,"&apos;"),e=e.replace(/"/g,"&quot;"),e},xmlTextNode:function(e){return t.xmlGenerator().createTextNode(e)},xmlHtmlNode:function(e){var t;if(window.DOMParser){var n=new DOMParser;t=n.parseFromString(e,"text/xml")}else t=new ActiveXObject("Microsoft.XMLDOM"),t.async="false",t.loadXML(e);return t},getText:function(e){if(!e)return null;var n="";e.childNodes.length===0&&e.nodeType==t.ElementType.TEXT&&(n+=e.nodeValue);for(var r=0;r<e.childNodes.length;r++)e.childNodes[r].nodeType==t.ElementType.TEXT&&(n+=e.childNodes[r].nodeValue);return t.xmlescape(n)},copyElement:function(e){var n,r;if(e.nodeType==t.ElementType.NORMAL){r=t.xmlElement(e.tagName);for(n=0;n<e.attributes.length;n++)r.setAttribute(e.attributes[n].nodeName.toLowerCase(),e.attributes[n].value);for(n=0;n<e.childNodes.length;n++)r.appendChild(t.copyElement(e.childNodes[n]))}else e.nodeType==t.ElementType.TEXT&&(r=t.xmlGenerator().createTextNode(e.nodeValue));return r},createHtml:function(e){var n,r,i,s,o,u,a,f,l,c,h;if(e.nodeType==t.ElementType.NORMAL){s=e.nodeName.toLowerCase();if(t.XHTML.validTag(s))try{r=t.xmlElement(s);for(n=0;n<t.XHTML.attributes[s].length;n++){o=t.XHTML.attributes[s][n],u=e.getAttribute(o);if(typeof u=="undefined"||u===null||u===""||u===!1||u===0)continue;o=="style"&&typeof u=="object"&&typeof u.cssText!="undefined"&&(u=u.cssText);if(o=="style"){a=[],f=u.split(";");for(i=0;i<f.length;i++)l=f[i].split(":"),c=l[0].replace(/^\s*/,"").replace(/\s*$/,"").toLowerCase(),t.XHTML.validCSS(c)&&(h=l[1].replace(/^\s*/,"").replace(/\s*$/,""),a.push(c+": "+h));a.length>0&&(u=a.join("; "),r.setAttribute(o,u))}else r.setAttribute(o,u)}for(n=0;n<e.childNodes.length;n++)r.appendChild(t.createHtml(e.childNodes[n]))}catch(p){r=t.xmlTextNode("")}else{r=t.xmlGenerator().createDocumentFragment();for(n=0;n<e.childNodes.length;n++)r.appendChild(t.createHtml(e.childNodes[n]))}}else if(e.nodeType==t.ElementType.FRAGMENT){r=t.xmlGenerator().createDocumentFragment();for(n=0;n<e.childNodes.length;n++)r.appendChild(t.createHtml(e.childNodes[n]))}else e.nodeType==t.ElementType.TEXT&&(r=t.xmlTextNode(e.nodeValue));return r},escapeNode:function(e){return e.replace(/^\s+|\s+$/g,"").replace(/\\/g,"\\5c").replace(/ /g,"\\20").replace(/\"/g,"\\22").replace(/\&/g,"\\26").replace(/\'/g,"\\27").replace(/\//g,"\\2f").replace(/:/g,"\\3a").replace(/</g,"\\3c").replace(/>/g,"\\3e").replace(/@/g,"\\40")},unescapeNode:function(e){return e.replace(/\\20/g," ").replace(/\\22/g,'"').replace(/\\26/g,"&").replace(/\\27/g,"'").replace(/\\2f/g,"/").replace(/\\3a/g,":").replace(/\\3c/g,"<").replace(/\\3e/g,">").replace(/\\40/g,"@").replace(/\\5c/g,"\\")},getNodeFromJid:function(e){return e.indexOf("@")<0?null:e.split("@")[0]},getDomainFromJid:function(e){var n=t.getBareJidFromJid(e);if(n.indexOf("@")<0)return n;var r=n.split("@");return r.splice(0,1),r.join("@")},getResourceFromJid:function(e){var t=e.split("/");return t.length<2?null:(t.splice(0,1),t.join("/"))},getBareJidFromJid:function(e){return e?e.split("/")[0]:null},log:function(e,t){return},debug:function(e){this.log(this.LogLevel.DEBUG,e)},info:function(e){this.log(this.LogLevel.INFO,e)},warn:function(e){this.log(this.LogLevel.WARN,e)},error:function(e){this.log(this.LogLevel.ERROR,e)},fatal:function(e){this.log(this.LogLevel.FATAL,e)},serialize:function(e){var n;if(!e)return null;typeof e.tree=="function"&&(e=e.tree());var r=e.nodeName,i,s;e.getAttribute("_realname")&&(r=e.getAttribute("_realname")),n="<"+r;for(i=0;i<e.attributes.length;i++)e.attributes[i].nodeName!="_realname"&&(n+=" "+e.attributes[i].nodeName.toLowerCase()+"='"+e.attributes[i].value.replace(/&/g,"&amp;").replace(/\'/g,"&apos;").replace(/>/g,"&gt;").replace(/</g,"&lt;")+"'");if(e.childNodes.length>0){n+=">";for(i=0;i<e.childNodes.length;i++){s=e.childNodes[i];switch(s.nodeType){case t.ElementType.NORMAL:n+=t.serialize(s);break;case t.ElementType.TEXT:n+=t.xmlescape(s.nodeValue);break;case t.ElementType.CDATA:n+="<![CDATA["+s.nodeValue+"]]>"}}n+="</"+r+">"}else n+="/>";return n},_requestId:0,_connectionPlugins:{},addConnectionPlugin:function(e,n){t._connectionPlugins[e]=n}},t.Builder=function(e,n){if(e=="presence"||e=="message"||e=="iq")n&&!n.xmlns?n.xmlns=t.NS.CLIENT:n||(n={xmlns:t.NS.CLIENT});this.nodeTree=t.xmlElement(e,n),this.node=this.nodeTree},t.Builder.prototype={tree:function(){return this.nodeTree},toString:function(){return t.serialize(this.nodeTree)},up:function(){return this.node=this.node.parentNode,this},attrs:function(e){for(var t in e)e.hasOwnProperty(t)&&this.node.setAttribute(t,e[t]);return this},c:function(e,n,r){var i=t.xmlElement(e,n,r);return this.node.appendChild(i),r||(this.node=i),this},cnode:function(e){var n,r=t.xmlGenerator();try{n=r.importNode!==undefined}catch(i){n=!1}var s=n?r.importNode(e,!0):t.copyElement(e);return this.node.appendChild(s),this.node=s,this},t:function(e){var n=t.xmlTextNode(e);return this.node.appendChild(n),this},h:function(e){var n=document.createElement("body");n.innerHTML=e;var r=t.createHtml(n);while(r.childNodes.length>0)this.node.appendChild(r.childNodes[0]);return this}},t.Handler=function(e,n,r,i,s,o,u){this.handler=e,this.ns=n,this.name=r,this.type=i,this.id=s,this.options=u||{matchBare:!1},this.options.matchBare||(this.options.matchBare=!1),this.options.matchBare?this.from=o?t.getBareJidFromJid(o):null:this.from=o,this.user=!0},t.Handler.prototype={isMatch:function(e){var n,r=null;this.options.matchBare?r=t.getBareJidFromJid(e.getAttribute("from")):r=e.getAttribute("from"),n=!1;if(!this.ns)n=!0;else{var i=this;t.forEachChild(e,null,function(e){e.getAttribute("xmlns")==i.ns&&(n=!0)}),n=n||e.getAttribute("xmlns")==this.ns}return!n||!!this.name&&!t.isTagEqual(e,this.name)||!!this.type&&e.getAttribute("type")!=this.type||!!this.id&&e.getAttribute("id")!=this.id||!!this.from&&r!=this.from?!1:!0},run:function(e){var n=null;try{n=this.handler(e)}catch(r){throw r.sourceURL?t.fatal("error: "+this.handler+" "+r.sourceURL+":"+r.line+" - "+r.name+": "+r.message):r.fileName?(typeof console!="undefined"&&(console.trace(),console.error(this.handler," - error - ",r,r.message)),t.fatal("error: "+this.handler+" "+r.fileName+":"+r.lineNumber+" - "+r.name+": "+r.message)):t.fatal("error: "+r.message+"\n"+r.stack),r}return n},toString:function(){return"{Handler: "+this.handler+"("+this.name+","+this.id+","+this.ns+")}"}},t.TimedHandler=function(e,t){this.period=e,this.handler=t,this.lastCalled=(new Date).getTime(),this.user=!0},t.TimedHandler.prototype={run:function(){return this.lastCalled=(new Date).getTime(),this.handler()},reset:function(){this.lastCalled=(new Date).getTime()},toString:function(){return"{TimedHandler: "+this.handler+"("+this.period+")}"}},t.Connection=function(e,n){this.service=e,this.options=n||{};var r=this.options.protocol||"";e.indexOf("ws:")===0||e.indexOf("wss:")===0||r.indexOf("ws")===0?this._proto=new t.Websocket(this):this._proto=new t.Bosh(this),this.jid="",this.domain=null,this.features=null,this._sasl_data={},this.do_session=!1,this.do_bind=!1,this.timedHandlers=[],this.handlers=[],this.removeTimeds=[],this.removeHandlers=[],this.addTimeds=[],this.addHandlers=[],this._authentication={},this._idleTimeout=null,this._disconnectTimeout=null,this.do_authentication=!0,this.authenticated=!1,this.disconnecting=!1,this.connected=!1,this.errors=0,this.paused=!1,this._data=[],this._uniqueId=0,this._sasl_success_handler=null,this._sasl_failure_handler=null,this._sasl_challenge_handler=null,this.maxRetries=5,this._idleTimeout=setTimeout(this._onIdle.bind(this),100);for(var i in t._connectionPlugins)if(t._connectionPlugins.hasOwnProperty(i)){var s=t._connectionPlugins[i],o=function(){};o.prototype=s,this[i]=new o,this[i].init(this)}},t.Connection.prototype={reset:function(){this._proto._reset(),this.do_session=!1,this.do_bind=!1,this.timedHandlers=[],this.handlers=[],this.removeTimeds=[],this.removeHandlers=[],this.addTimeds=[],this.addHandlers=[],this._authentication={},this.authenticated=!1,this.disconnecting=!1,this.connected=!1,this.errors=0,this._requests=[],this._uniqueId=0},pause:function(){this.paused=!0},resume:function(){this.paused=!1},getUniqueId:function(e){return typeof e=="string"||typeof e=="number"?++this._uniqueId+":"+e:++this._uniqueId+""},connect:function(e,n,r,i,s,o){this.jid=e,this.authzid=t.getBareJidFromJid(this.jid),this.authcid=t.getNodeFromJid(this.jid),this.pass=n,this.servtype="xmpp",this.connect_callback=r,this.disconnecting=!1,this.connected=!1,this.authenticated=!1,this.errors=0,this.domain=t.getDomainFromJid(this.jid),this._changeConnectStatus(t.Status.CONNECTING,null),this._proto._connect(i,s,o)},attach:function(e,t,n,r,i,s,o){this._proto._attach(e,t,n,r,i,s,o)},xmlInput:function(e){return},xmlOutput:function(e){return},rawInput:function(e){return},rawOutput:function(e){return},send:function(e){if(e===null)return;if(typeof e.sort=="function")for(var t=0;t<e.length;t++)this._queueData(e[t]);else typeof e.tree=="function"?this._queueData(e.tree()):this._queueData(e);this._proto._send()},flush:function(){clearTimeout(this._idleTimeout),this._onIdle()},sendIQ:function(e,t,n,r){var i=null,s=this;typeof e.tree=="function"&&(e=e.tree());var o=e.getAttribute("id");o||(o=this.getUniqueId("sendIQ"),e.setAttribute("id",o));var u=this.addHandler(function(e){i&&s.deleteTimedHandler(i);var r=e.getAttribute("type");if(r=="result")t&&t(e);else{if(r!="error")throw{name:"StropheError",message:"Got bad IQ type of "+r};n&&n(e)}},null,"iq",null,o);return r&&(i=this.addTimedHandler(r,function(){return s.deleteHandler(u),n&&n(null),!1})),this.send(e),o},_queueData:function(e){if(e===null||!e.tagName||!e.childNodes)throw{name:"StropheError",message:"Cannot queue non-DOMElement."};this._data.push(e)},_sendRestart:function(){this._data.push("restart"),this._proto._sendRestart(),this._idleTimeout=setTimeout(this._onIdle.bind(this),100)},addTimedHandler:function(e,n){var r=new t.TimedHandler(e,n);return this.addTimeds.push(r),r},deleteTimedHandler:function(e){this.removeTimeds.push(e)},addHandler:function(e,n,r,i,s,o,u){var a=new t.Handler(e,n,r,i,s,o,u);return this.addHandlers.push(a),a},deleteHandler:function(e){this.removeHandlers.push(e)},disconnect:function(e){this._changeConnectStatus(t.Status.DISCONNECTING,e),t.info("Disconnect was called because: "+e);if(this.connected){var n=!1;this.disconnecting=!0,this.authenticated&&(n=s({xmlns:t.NS.CLIENT,type:"unavailable"})),this._disconnectTimeout=this._addSysTimedHandler(3e3,this._onDisconnectTimeout.bind(this)),this._proto._disconnect(n)}},_changeConnectStatus:function(e,n){for(var r in t._connectionPlugins)if(t._connectionPlugins.hasOwnProperty(r)){var i=this[r];if(i.statusChanged)try{i.statusChanged(e,n)}catch(s){t.error(""+r+" plugin caused an exception "+"changing status: "+s)}}if(this.connect_callback)try{this.connect_callback(e,n)}catch(o){t.error("User connection callback caused an exception: "+o)}},_doDisconnect:function(){this._disconnectTimeout!==null&&(this.deleteTimedHandler(this._disconnectTimeout),this._disconnectTimeout=null),t.info("_doDisconnect was called"),this._proto._doDisconnect(),this.authenticated=!1,this.disconnecting=!1,this.handlers=[],this.timedHandlers=[],this.removeTimeds=[],this.removeHandlers=[],this.addTimeds=[],this.addHandlers=[],this._changeConnectStatus(t.Status.DISCONNECTED,null),this.connected=!1},_dataRecv:function(e,n){t.info("_dataRecv called");var r=this._proto._reqToData(e);if(r===null)return;this.xmlInput!==t.Connection.prototype.xmlInput&&(r.nodeName===this._proto.strip&&r.childNodes.length?this.xmlInput(r.childNodes[0]):this.xmlInput(r)),this.rawInput!==t.Connection.prototype.rawInput&&(n?this.rawInput(n):this.rawInput(t.serialize(r)));var i,s;while(this.removeHandlers.length>0)s=this.removeHandlers.pop(),i=this.handlers.indexOf(s),i>=0&&this.handlers.splice(i,1);while(this.addHandlers.length>0)this.handlers.push(this.addHandlers.pop());if(this.disconnecting&&this._proto._emptyQueue()){this._doDisconnect();return}var o=r.getAttribute("type"),u,a;if(o!==null&&o=="terminate"){if(this.disconnecting)return;u=r.getAttribute("condition"),a=r.getElementsByTagName("conflict"),u!==null?(u=="remote-stream-error"&&a.length>0&&(u="conflict"),this._changeConnectStatus(t.Status.CONNFAIL,u)):this._changeConnectStatus(t.Status.CONNFAIL,"unknown"),this.disconnect("unknown stream-error");return}var f=this;t.forEachChild(r,null,function(e){var n,r;r=f.handlers,f.handlers=[];for(n=0;n<r.length;n++){var i=r[n];try{i.isMatch(e)&&(f.authenticated||!i.user)?i.run(e)&&f.handlers.push(i):f.handlers.push(i)}catch(s){t.warn("Removing Strophe handlers due to uncaught exception: "+s.message)}}})},mechanisms:{},_connect_cb:function(e,n,r){t.info("_connect_cb was called"),this.connected=!0;var i=this._proto._reqToData(e);if(!i)return;this.xmlInput!==t.Connection.prototype.xmlInput&&(i.nodeName===this._proto.strip&&i.childNodes.length?this.xmlInput(i.childNodes[0]):this.xmlInput(i)),this.rawInput!==t.Connection.prototype.rawInput&&(r?this.rawInput(r):this.rawInput(t.serialize(i)));var s=this._proto._connect_cb(i);if(s===t.Status.CONNFAIL)return;this._authentication.sasl_scram_sha1=!1,this._authentication.sasl_plain=!1,this._authentication.sasl_digest_md5=!1,this._authentication.sasl_anonymous=!1,this._authentication.legacy_auth=!1;var o=i.getElementsByTagName("stream:features").length>0;o||(o=i.getElementsByTagName("features").length>0);var u=i.getElementsByTagName("mechanism"),a=[],f,l,c=!1;if(!o){this._proto._no_auth_received(n);return}if(u.length>0)for(f=0;f<u.length;f++)l=t.getText(u[f]),this.mechanisms[l]&&a.push(this.mechanisms[l]);this._authentication.legacy_auth=i.getElementsByTagName("auth").length>0,c=this._authentication.legacy_auth||a.length>0;if(!c){this._proto._no_auth_received(n);return}this.do_authentication!==!1&&this.authenticate(a)},authenticate:function(e){var r;for(r=0;r<e.length-1;++r){var s=r;for(var o=r+1;o<e.length;++o)e[o].prototype.priority>e[s].prototype.priority&&(s=o);if(s!=r){var u=e[r];e[r]=e[s],e[s]=u}}var a=!1;for(r=0;r<e.length;++r){if(!e[r].test(this))continue;this._sasl_success_handler=this._addSysHandler(this._sasl_success_cb.bind(this),null,"success",null,null),this._sasl_failure_handler=this._addSysHandler(this._sasl_failure_cb.bind(this),null,"failure",null,null),this._sasl_challenge_handler=this._addSysHandler(this._sasl_challenge_cb.bind(this),null,"challenge",null,null),this._sasl_mechanism=new e[r],this._sasl_mechanism.onStart(this);var f=n("auth",{xmlns:t.NS.SASL,mechanism:this._sasl_mechanism.name});if(this._sasl_mechanism.isClientFirst){var l=this._sasl_mechanism.onChallenge(this,null);f.t(Base64.encode(l))}this.send(f.tree()),a=!0;break}a||(t.getNodeFromJid(this.jid)===null?(this._changeConnectStatus(t.Status.CONNFAIL,"x-strophe-bad-non-anon-jid"),this.disconnect("x-strophe-bad-non-anon-jid")):(this._changeConnectStatus(t.Status.AUTHENTICATING,null),this._addSysHandler(this._auth1_cb.bind(this),null,null,null,"_auth_1"),this.send(i({type:"get",to:this.domain,id:"_auth_1"}).c("query",{xmlns:t.NS.AUTH}).c("username",{}).t(t.getNodeFromJid(this.jid)).tree())))},_sasl_challenge_cb:function(e){var r=Base64.decode(t.getText(e)),i=this._sasl_mechanism.onChallenge(this,r),s=n("response",{xmlns:t.NS.SASL});return i!==""&&s.t(Base64.encode(i)),this.send(s.tree()),!0},_auth1_cb:function(e){var n=i({type:"set",id:"_auth_2"}).c("query",{xmlns:t.NS.AUTH}).c("username",{}).t(t.getNodeFromJid(this.jid)).up().c("password").t(this.pass);return t.getResourceFromJid(this.jid)||(this.jid=t.getBareJidFromJid(this.jid)+"/strophe"),n.up().c("resource",{}).t(t.getResourceFromJid(this.jid)),this._addSysHandler(this._auth2_cb.bind(this),null,null,null,"_auth_2"),this.send(n.tree()),!1},_sasl_success_cb:function(e){if(this._sasl_data["server-signature"]){var n,r=Base64.decode(t.getText(e)),i=/([a-z]+)=([^,]+)(,|$)/,s=r.match(i);s[1]=="v"&&(n=s[2]);if(n!=this._sasl_data["server-signature"])return this.deleteHandler(this._sasl_failure_handler),this._sasl_failure_handler=null,this._sasl_challenge_handler&&(this.deleteHandler(this._sasl_challenge_handler),this._sasl_challenge_handler=null),this._sasl_data={},this._sasl_failure_cb(null)}return t.info("SASL authentication succeeded."),this._sasl_mechanism&&this._sasl_mechanism.onSuccess(),this.deleteHandler(this._sasl_failure_handler),this._sasl_failure_handler=null,this._sasl_challenge_handler&&(this.deleteHandler(this._sasl_challenge_handler),this._sasl_challenge_handler=null),this._addSysHandler(this._sasl_auth1_cb.bind(this),null,"stream:features",null,null),this._sendRestart(),!1},_sasl_auth1_cb:function(e){this.features=e;var n,r;for(n=0;n<e.childNodes.length;n++)r=e.childNodes[n],r.nodeName=="bind"&&(this.do_bind=!0),r.nodeName=="session"&&(this.do_session=!0);if(!this.do_bind)return this._changeConnectStatus(t.Status.AUTHFAIL,null),!1;this._addSysHandler(this._sasl_bind_cb.bind(this),null,null,null,"_bind_auth_2");var s=t.getResourceFromJid(this.jid);return s?this.send(i({type:"set",id:"_bind_auth_2"}).c("bind",{xmlns:t.NS.BIND}).c("resource",{}).t(s).tree()):this.send(i({type:"set",id:"_bind_auth_2"}).c("bind",{xmlns:t.NS.BIND}).tree()),!1},_sasl_bind_cb:function(e){if(e.getAttribute("type")=="error"){t.info("SASL binding failed.");var n=e.getElementsByTagName("conflict"),r;return n.length>0&&(r="conflict"),this._changeConnectStatus(t.Status.AUTHFAIL,r),!1}var s=e.getElementsByTagName("bind"),o;if(!(s.length>0))return t.info("SASL binding failed."),this._changeConnectStatus(t.Status.AUTHFAIL,null),!1;o=s[0].getElementsByTagName("jid"),o.length>0&&(this.jid=t.getText(o[0]),this.do_session?(this._addSysHandler(this._sasl_session_cb.bind(this),null,null,null,"_session_auth_2"),this.send(i({type:"set",id:"_session_auth_2"}).c("session",{xmlns:t.NS.SESSION}).tree())):(this.authenticated=!0,this._changeConnectStatus(t.Status.CONNECTED,null)))},_sasl_session_cb:function(e){if(e.getAttribute("type")=="result")this.authenticated=!0,this._changeConnectStatus(t.Status.CONNECTED,null);else if(e.getAttribute("type")=="error")return t.info("Session creation failed."),this._changeConnectStatus(t.Status.AUTHFAIL,null),!1;return!1},_sasl_failure_cb:function(e){return this._sasl_success_handler&&(this.deleteHandler(this._sasl_success_handler),this._sasl_success_handler=null),this._sasl_challenge_handler&&(this.deleteHandler(this._sasl_challenge_handler),this._sasl_challenge_handler=null),this._sasl_mechanism&&this._sasl_mechanism.onFailure(),this._changeConnectStatus(t.Status.AUTHFAIL,null),!1},_auth2_cb:function(e){return e.getAttribute("type")=="result"?(this.authenticated=!0,this._changeConnectStatus(t.Status.CONNECTED,null)):e.getAttribute("type")=="error"&&(this._changeConnectStatus(t.Status.AUTHFAIL,null),this.disconnect("authentication failed")),!1},_addSysTimedHandler:function(e,n){var r=new t.TimedHandler(e,n);return r.user=!1,this.addTimeds.push(r),r},_addSysHandler:function(e,n,r,i,s){var o=new t.Handler(e,n,r,i,s);return o.user=!1,this.addHandlers.push(o),o},_onDisconnectTimeout:function(){return t.info("_onDisconnectTimeout was called"),this._proto._onDisconnectTimeout(),this._doDisconnect(),!1},_onIdle:function(){var e,t,n,r;while(this.addTimeds.length>0)this.timedHandlers.push(this.addTimeds.pop());while(this.removeTimeds.length>0)t=this.removeTimeds.pop(),e=this.timedHandlers.indexOf(t),e>=0&&this.timedHandlers.splice(e,1);var i=(new Date).getTime();r=[];for(e=0;e<this.timedHandlers.length;e++){t=this.timedHandlers[e];if(this.authenticated||!t.user)n=t.lastCalled+t.period,n-i<=0?t.run()&&r.push(t):r.push(t)}this.timedHandlers=r,clearTimeout(this._idleTimeout),this._proto._onIdle(),this.connected&&(this._idleTimeout=setTimeout(this._onIdle.bind(this),100))}},e&&e(t,n,r,i,s),t.SASLMechanism=function(e,t,n){this.name=e,this.isClientFirst=t,this.priority=n},t.SASLMechanism.prototype={test:function(e){return!0},onStart:function(e){this._connection=e},onChallenge:function(e,t){throw new Error("You should implement challenge handling!")},onFailure:function(){this._connection=null},onSuccess:function(){this._connection=null}},t.SASLAnonymous=function(){},t.SASLAnonymous.prototype=new t.SASLMechanism("ANONYMOUS",!1,10),t.SASLAnonymous.test=function(e){return e.authcid===null},t.Connection.prototype.mechanisms[t.SASLAnonymous.prototype.name]=t.SASLAnonymous,t.SASLPlain=function(){},t.SASLPlain.prototype=new t.SASLMechanism("PLAIN",!0,20),t.SASLPlain.test=function(e){return e.authcid!==null},t.SASLPlain.prototype.onChallenge=function(e){var t=e.authzid;return t+="\0",t+=e.authcid,t+="\0",t+=e.pass,t},t.Connection.prototype.mechanisms[t.SASLPlain.prototype.name]=t.SASLPlain,t.SASLSHA1=function(){},t.SASLSHA1.prototype=new t.SASLMechanism("SCRAM-SHA-1",!0,40),t.SASLSHA1.test=function(e){return e.authcid!==null},t.SASLSHA1.prototype.onChallenge=function(e,t,n){var r=n||MD5.hexdigest(Math.random()*1234567890),i="n="+e.authcid;return i+=",r=",i+=r,e._sasl_data.cnonce=r,e._sasl_data["client-first-message-bare"]=i,i="n,,"+i,this.onChallenge=function(e,t){var n,r,i,s,o,u,a,f,l,c,h,p="c=biws,",d=e._sasl_data["client-first-message-bare"]+","+t+",",v=e._sasl_data.cnonce,m=/([a-z]+)=([^,]+)(,|$)/;while(t.match(m)){var g=t.match(m);t=t.replace(g[0],"");switch(g[1]){case"r":n=g[2];break;case"s":r=g[2];break;case"i":i=g[2]}}if(n.substr(0,v.length)!==v)return e._sasl_data={},e._sasl_failure_cb();p+="r="+n,d+=p,r=Base64.decode(r),r+="\0\0\0",s=u=core_hmac_sha1(e.pass,r);for(a=1;a<i;a++){o=core_hmac_sha1(e.pass,binb2str(u));for(f=0;f<5;f++)s[f]^=o[f];u=o}s=binb2str(s),l=core_hmac_sha1(s,"Client Key"),c=str_hmac_sha1(s,"Server Key"),h=core_hmac_sha1(str_sha1(binb2str(l)),d),e._sasl_data["server-signature"]=b64_hmac_sha1(c,d);for(f=0;f<5;f++)l[f]^=h[f];return p+=",p="+Base64.encode(binb2str(l)),p}.bind(this),i},t.Connection.prototype.mechanisms[t.SASLSHA1.prototype.name]=t.SASLSHA1,t.SASLMD5=function(){},t.SASLMD5.prototype=new t.SASLMechanism("DIGEST-MD5",!1,30),t.SASLMD5.test=function(e){return e.authcid!==null},t.SASLMD5.prototype._quote=function(e){return'"'+e.replace(/\\/g,"\\\\").replace(/"/g,'\\"')+'"'},t.SASLMD5.prototype.onChallenge=function(e,t,n){var r=/([a-z]+)=("[^"]+"|[^,"]+)(?:,|$)/,i=n||MD5.hexdigest(""+Math.random()*1234567890),s="",o=null,u="",a="",f;while(t.match(r)){f=t.match(r),t=t.replace(f[0],""),f[2]=f[2].replace(/^"(.+)"$/,"$1");switch(f[1]){case"realm":s=f[2];break;case"nonce":u=f[2];break;case"qop":a=f[2];break;case"host":o=f[2]}}var l=e.servtype+"/"+e.domain;o!==null&&(l=l+"/"+o);var c=MD5.hash(e.authcid+":"+s+":"+this._connection.pass)+":"+u+":"+i,h="AUTHENTICATE:"+l,p="";return p+="charset=utf-8,",p+="username="+this._quote(e.authcid)+",",p+="realm="+this._quote(s)+",",p+="nonce="+this._quote(u)+",",p+="nc=00000001,",p+="cnonce="+this._quote(i)+",",p+="digest-uri="+this._quote(l)+",",p+="response="+MD5.hexdigest(MD5.hexdigest(c)+":"+u+":00000001:"+i+":auth:"+MD5.hexdigest(h))+",",p+="qop=auth",this.onChallenge=function(){return""}.bind(this),p},t.Connection.prototype.mechanisms[t.SASLMD5.prototype.name]=t.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(e,t,n,r){this.id=++Strophe._requestId,this.xmlData=e,this.data=Strophe.serialize(e),this.origFunc=t,this.func=t,this.rid=n,this.date=NaN,this.sends=r||0,this.abort=!1,this.dead=null,this.age=function(){if(!this.date)return 0;var e=new Date;return(e-this.date)/1e3},this.timeDead=function(){if(!this.dead)return 0;var e=new Date;return(e-this.dead)/1e3},this.xhr=this._newXHR()},Strophe.Request.prototype={getResponse:function(){var e=null;if(this.xhr.responseXML&&this.xhr.responseXML.documentElement){e=this.xhr.responseXML.documentElement;if(e.tagName=="parsererror")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 e},_newXHR:function(){var e=null;return window.XMLHttpRequest?(e=new XMLHttpRequest,e.overrideMimeType&&e.overrideMimeType("text/xml")):window.ActiveXObject&&(e=new ActiveXObject("Microsoft.XMLHTTP")),e.onreadystatechange=this.func.bind(null,this),e}},Strophe.Bosh=function(e){this._conn=e,this.rid=Math.floor(Math.random()*4294967295),this.sid=null,this.hold=1,this.wait=60,this.window=5,this._requests=[]},Strophe.Bosh.prototype={strip:null,_buildBody:function(){var e=$build("body",{rid:this.rid++,xmlns:Strophe.NS.HTTPBIND});return this.sid!==null&&e.attrs({sid:this.sid}),e},_reset:function(){this.rid=Math.floor(Math.random()*4294967295),this.sid=null},_connect:function(e,t,n){this.wait=e||this.wait,this.hold=t||this.hold;var r=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});n&&r.attrs({route:n});var i=this._conn._connect_cb;this._requests.push(new Strophe.Request(r.tree(),this._onRequestStateChange.bind(this,i.bind(this._conn)),r.tree().getAttribute("rid"))),this._throttledRequestHandler()},_attach:function(e,t,n,r,i,s,o){this._conn.jid=e,this.sid=t,this.rid=n,this._conn.connect_callback=r,this._conn.domain=Strophe.getDomainFromJid(this._conn.jid),this._conn.authenticated=!0,this._conn.connected=!0,this.wait=i||this.wait,this.hold=s||this.hold,this.window=o||this.window,this._conn._changeConnectStatus(Strophe.Status.ATTACHED,null)},_connect_cb:function(e){var t=e.getAttribute("type"),n,r;if(t!==null&&t=="terminate")return Strophe.error("BOSH-Connection failed: "+n),n=e.getAttribute("condition"),r=e.getElementsByTagName("conflict"),n!==null?(n=="remote-stream-error"&&r.length>0&&(n="conflict"),this._conn._changeConnectStatus(Strophe.Status.CONNFAIL,n)):this._conn._changeConnectStatus(Strophe.Status.CONNFAIL,"unknown"),this._conn._doDisconnect(),Strophe.Status.CONNFAIL;this.sid||(this.sid=e.getAttribute("sid"));var i=e.getAttribute("requests");i&&(this.window=parseInt(i,10));var s=e.getAttribute("hold");s&&(this.hold=parseInt(s,10));var o=e.getAttribute("wait");o&&(this.wait=parseInt(o,10))},_disconnect:function(e){this._sendTerminate(e)},_doDisconnect:function(){this.sid=null,this.rid=Math.floor(Math.random()*4294967295)},_emptyQueue:function(){return this._requests.length===0},_hitError:function(e){this.errors++,Strophe.warn("request errored, status: "+e+", number of errors: "+this.errors),this.errors>4&&this._onDisconnectTimeout()},_no_auth_received:function(e){e?e=e.bind(this._conn):e=this._conn._connect_cb.bind(this._conn);var t=this._buildBody();this._requests.push(new Strophe.Request(t.tree(),this._onRequestStateChange.bind(this,e.bind(this._conn)),t.tree().getAttribute("rid"))),this._throttledRequestHandler()},_onDisconnectTimeout:function(){var e;while(this._requests.length>0)e=this._requests.pop(),e.abort=!0,e.xhr.abort(),e.xhr.onreadystatechange=function(){}},_onIdle:function(){var e=this._conn._data;this._conn.authenticated&&this._requests.length===0&&e.length===0&&!this._conn.disconnecting&&(Strophe.info("no requests during idle cycle, sending blank request"),e.push(null));if(this._requests.length<2&&e.length>0&&!this._conn.paused){var t=this._buildBody();for(var n=0;n<e.length;n++)e[n]!==null&&(e[n]==="restart"?t.attrs({to:this._conn.domain,"xml:lang":"en","xmpp:restart":"true","xmlns:xmpp":Strophe.NS.BOSH}):t.cnode(e[n]).up());delete this._conn._data,this._conn._data=[],this._requests.push(new Strophe.Request(t.tree(),this._onRequestStateChange.bind(this,this._conn._dataRecv.bind(this._conn)),t.tree().getAttribute("rid"))),this._processRequest(this._requests.length-1)}if(this._requests.length>0){var r=this._requests[0].age();this._requests[0].dead!==null&&this._requests[0].timeDead()>Math.floor(Strophe.SECONDARY_TIMEOUT*this.wait)&&this._throttledRequestHandler(),r>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(e,t){Strophe.debug("request id "+t.id+"."+t.sends+" state changed to "+t.xhr.readyState);if(t.abort){t.abort=!1;return}var n;if(t.xhr.readyState==4){n=0;try{n=t.xhr.status}catch(r){}typeof n=="undefined"&&(n=0);if(this.disconnecting&&n>=400){this._hitError(n);return}var i=this._requests[0]==t,s=this._requests[1]==t;if(n>0&&n<500||t.sends>5)this._removeRequest(t),Strophe.debug("request id "+t.id+" should now be removed");if(n==200)(s||i&&this._requests.length>0&&this._requests[0].age()>Math.floor(Strophe.SECONDARY_TIMEOUT*this.wait))&&this._restartRequest(0),Strophe.debug("request id "+t.id+"."+t.sends+" got 200"),e(t),this.errors=0;else{Strophe.error("request id "+t.id+"."+t.sends+" error "+n+" happened");if(n===0||n>=400&&n<600||n>=12e3)this._hitError(n),n>=400&&n<500&&(this._conn._changeConnectStatus(Strophe.Status.DISCONNECTING,null),this._conn._doDisconnect())}n>0&&n<500||t.sends>5||this._throttledRequestHandler()}},_processRequest:function(e){var t=this,n=this._requests[e],r=-1;try{n.xhr.readyState==4&&(r=n.xhr.status)}catch(i){Strophe.error("caught an error in _requests["+e+"], reqStatus: "+r)}typeof r=="undefined"&&(r=-1);if(n.sends>this.maxRetries){this._onDisconnectTimeout();return}var s=n.age(),o=!isNaN(s)&&s>Math.floor(Strophe.TIMEOUT*this.wait),u=n.dead!==null&&n.timeDead()>Math.floor(Strophe.SECONDARY_TIMEOUT*this.wait),a=n.xhr.readyState==4&&(r<1||r>=500);if(o||u||a)u&&Strophe.error("Request "+this._requests[e].id+" timed out (secondary), restarting"),n.abort=!0,n.xhr.abort(),n.xhr.onreadystatechange=function(){},this._requests[e]=new Strophe.Request(n.xmlData,n.origFunc,n.rid,n.sends),n=this._requests[e];if(n.xhr.readyState===0){Strophe.debug("request id "+n.id+"."+n.sends+" posting");try{n.xhr.open("POST",this._conn.service,this._conn.options.sync?!1:!0)}catch(f){Strophe.error("XHR open failed."),this._conn.connected||this._conn._changeConnectStatus(Strophe.Status.CONNFAIL,"bad-service"),this._conn.disconnect();return}var l=function(){n.date=new Date;if(t._conn.options.customHeaders){var e=t._conn.options.customHeaders;for(var r in e)e.hasOwnProperty(r)&&n.xhr.setRequestHeader(r,e[r])}n.xhr.send(n.data)};if(n.sends>1){var c=Math.min(Math.floor(Strophe.TIMEOUT*this.wait),Math.pow(n.sends,3))*1e3;setTimeout(l,c)}else l();n.sends++,this._conn.xmlOutput!==Strophe.Connection.prototype.xmlOutput&&(n.xmlData.nodeName===this.strip&&n.xmlData.childNodes.length?this._conn.xmlOutput(n.xmlData.childNodes[0]):this._conn.xmlOutput(n.xmlData)),this._conn.rawOutput!==Strophe.Connection.prototype.rawOutput&&this._conn.rawOutput(n.data)}else Strophe.debug("_processRequest: "+(e===0?"first":"second")+" request has readyState of "+n.xhr.readyState)},_removeRequest:function(e){Strophe.debug("removing request");var t;for(t=this._requests.length-1;t>=0;t--)e==this._requests[t]&&this._requests.splice(t,1);e.xhr.onreadystatechange=function(){},this._throttledRequestHandler()},_restartRequest:function(e){var t=this._requests[e];t.dead===null&&(t.dead=new Date),this._processRequest(e)},_reqToData:function(e){try{return e.getResponse()}catch(t){if(t!="parsererror")throw t;this._conn.disconnect("strophe-parsererror")}},_sendTerminate:function(e){Strophe.info("_sendTerminate was called");var t=this._buildBody().attrs({type:"terminate"});e&&t.cnode(e.tree());var n=new Strophe.Request(t.tree(),this._onRequestStateChange.bind(this,this._conn._dataRecv.bind(this._conn)),t.tree().getAttribute("rid"));this._requests.push(n),this._throttledRequestHandler()},_send:function(){clearTimeout(this._conn._idleTimeout),this._throttledRequestHandler(),this._conn._idleTimeout=setTimeout(this._conn._onIdle.bind(this._conn),100)},_sendRestart:function(){this._throttledRequestHandler(),clearTimeout(this._conn._idleTimeout)},_throttledRequestHandler:function(){this._requests?Strophe.debug("_throttledRequestHandler called with "+this._requests.length+" requests"):Strophe.debug("_throttledRequestHandler called with undefined requests");if(!this._requests||this._requests.length===0)return;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(e){this._conn=e,this.strip="stream:stream";var t=e.service;if(t.indexOf("ws:")!==0&&t.indexOf("wss:")!==0){var n="";e.options.protocol==="ws"&&window.location.protocol!=="https:"?n+="ws":n+="wss",n+="://"+window.location.host,t.indexOf("/")!==0?n+=window.location.pathname+t:n+=t,e.service=n}},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(e,t){var n=e.getElementsByTagName("stream:error");if(n.length===0)return!1;var r=n[0],i="",s="",o="urn:ietf:params:xml:ns:xmpp-streams";for(var u=0;u<r.childNodes.length;u++){var a=r.childNodes[u];if(a.getAttribute("xmlns")!==o)break;a.nodeName==="text"?s=a.textContent:i=a.nodeName}var f="WebSocket stream error: ";return i?f+=i:f+="unknown",s&&(f+=" - "+i),Strophe.error(f),this._conn._changeConnectStatus(t,i),this._conn._doDisconnect(),!0},_reset:function(){return},_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(e){var t=this._check_streamerror(e,Strophe.Status.CONNFAIL);if(t)return Strophe.Status.CONNFAIL},_handleStreamStart:function(e){var t=!1,n=e.getAttribute("xmlns");typeof n!="string"?t="Missing xmlns in stream:stream":n!==Strophe.NS.CLIENT&&(t="Wrong xmlns in stream:stream: "+n);var r=e.namespaceURI;typeof r!="string"?t="Missing xmlns:stream in stream:stream":r!==Strophe.NS.STREAM&&(t="Wrong xmlns:stream in stream:stream: "+r);var i=e.getAttribute("version");return typeof i!="string"?t="Missing version in stream:stream":i!=="1.0"&&(t="Wrong version in stream:stream: "+i),t?(this._conn._changeConnectStatus(Strophe.Status.CONNFAIL,t),this._conn._doDisconnect(),!1):!0},_connect_cb_wrapper:function(e){if(e.data.indexOf("<stream:stream ")===0||e.data.indexOf("<?xml")===0){var t=e.data.replace(/^(<\?.*?\?>\s*)*/,"");if(t==="")return;t=e.data.replace(/<stream:stream (.*[^\/])>/,"<stream:stream $1/>");var n=(new DOMParser).parseFromString(t,"text/xml").documentElement;this._conn.xmlInput(n),this._conn.rawInput(e.data),this._handleStreamStart(n)&&(this._connect_cb(n),this.streamStart=e.data.replace(/^<stream:(.*)\/>$/,"<stream:$1>"))}else{if(e.data==="</stream:stream>"){this._conn.rawInput(e.data),this._conn.xmlInput(document.createElement("stream:stream")),this._conn._changeConnectStatus(Strophe.Status.CONNFAIL,"Received closing stream"),this._conn._doDisconnect();return}var r=this._streamWrap(e.data),i=(new DOMParser).parseFromString(r,"text/xml").documentElement;this.socket.onmessage=this._onMessage.bind(this),this._conn._connect_cb(i,null,e.data)}},_disconnect:function(e){if(this.socket.readyState!==WebSocket.CLOSED){e&&this._conn.send(e);var t="</stream:stream>";this._conn.xmlOutput(document.createElement("stream:stream")),this._conn.rawOutput(t);try{this.socket.send(t)}catch(n){Strophe.info("Couldn't send closing stream tag.")}}this._conn._doDisconnect()},_doDisconnect:function(){Strophe.info("WebSockets _doDisconnect was called"),this._closeSocket()},_streamWrap:function(e){return this.streamStart+e+"</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(e){Strophe.error("Server did not send any auth methods"),this._conn._changeConnectStatus(Strophe.Status.CONNFAIL,"Server did not send any auth methods"),e&&(e=e.bind(this._conn),e()),this._conn._doDisconnect()},_onDisconnectTimeout:function(){},_onError:function(e){Strophe.error("Websocket error "+e),this._conn._changeConnectStatus(Strophe.Status.CONNFAIL,"The WebSocket connection could not be established was disconnected."),this._disconnect()},_onIdle:function(){var e=this._conn._data;if(e.length>0&&!this._conn.paused){for(var t=0;t<e.length;t++)if(e[t]!==null){var n,r;e[t]==="restart"?(n=this._buildStream(),r=this._removeClosingTag(n),n=n.tree()):(n=e[t],r=Strophe.serialize(n)),this._conn.xmlOutput(n),this._conn.rawOutput(r),this.socket.send(r)}this._conn._data=[]}},_onMessage:function(e){var t,n;if(e.data==="</stream:stream>"){var r="</stream:stream>";this._conn.rawInput(r),this._conn.xmlInput(document.createElement("stream:stream")),this._conn.disconnecting||this._conn._doDisconnect();return}if(e.data.search("<stream:stream ")===0){n=e.data.replace(/<stream:stream (.*[^\/])>/,"<stream:stream $1/>"),t=(new DOMParser).parseFromString(n,"text/xml").documentElement;if(!this._handleStreamStart(t))return}else n=this._streamWrap(e.data),t=(new DOMParser).parseFromString(n,"text/xml").documentElement;if(this._check_streamerror(t,Strophe.Status.ERROR))return;if(this._conn.disconnecting&&t.firstChild.nodeName==="presence"&&t.firstChild.getAttribute("type")==="unavailable"){this._conn.xmlInput(t),this._conn.rawInput(Strophe.serialize(t));return}this._conn._dataRecv(t,e.data)},_onOpen:function(){Strophe.info("Websocket open");var e=this._buildStream();this._conn.xmlOutput(e.tree());var t=this._removeClosingTag(e);this._conn.rawOutput(t),this.socket.send(t)},_removeClosingTag:function(e){var t=Strophe.serialize(e);return t=t.replace(/<(stream:stream .*[^\/])\/>$/,"<$1>"),t},_reqToData:function(e){return e},_send:function(){this._conn.flush()},_sendRestart:function(){clearTimeout(this._conn._idleTimeout),this._conn._onIdle.bind(this._conn)()}},define("strophe",function(e){return function(){var t,n;return t||e.Strophe}}(this)),function(){var e,t,n,r={}.hasOwnProperty,i=function(e,t){return function(){return e.apply(t,arguments)}};Strophe.addConnectionPlugin("muc",{_connection:null,rooms:{},roomNames:[],init:function(e){return this._connection=e,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"),Strophe.addNamespace("MUC_REGISTER","jabber:iq:register")},join:function(e,t,r,i,s,o,u){var a,f;return f=this.test_append_nick(e,t),a=$pres({from:this._connection.jid,to:f}).c("x",{xmlns:Strophe.NS.MUC}),u!=null&&(a=a.c("history",u).up()),o!=null&&a.cnode(Strophe.xmlElement("password",[],o)),typeof extended_presence!="undefined"&&extended_presence!==null&&a.up.cnode(extended_presence),this._muc_handler==null&&(this._muc_handler=this._connection.addHandler(function(t){return function(n){var r,i,s,o,u,a,f,l,c,h;r=n.getAttribute("from");if(!r)return!0;u=r.split("/")[0];if(!t.rooms[u])return!0;e=t.rooms[u],s={};if(n.nodeName==="message")s=e._message_handlers;else if(n.nodeName==="presence"){l=n.getElementsByTagName("x");if(l.length>0)for(c=0,h=l.length;c<h;c++){a=l[c],f=a.getAttribute("xmlns");if(f&&f.match(Strophe.NS.MUC)){s=e._presence_handlers;break}}}for(o in s)i=s[o],i(n,e)||delete s[o];return!0}}(this))),this.rooms.hasOwnProperty(e)||(this.rooms[e]=new n(this,e,t,o),this.roomNames.push(e)),i&&this.rooms[e].addHandler("presence",i),r&&this.rooms[e].addHandler("message",r),s&&this.rooms[e].addHandler("roster",s),this._connection.send(a)},leave:function(e,t,n,r){var i,s,o,u;return i=this.roomNames.indexOf(e),delete this.rooms[e],i>=0&&(this.roomNames.splice(i,1),this.roomNames.length===0&&(this._connection.deleteHandler(this._muc_handler),this._muc_handler=null)),u=this.test_append_nick(e,t),o=this._connection.getUniqueId(),s=$pres({type:"unavailable",id:o,from:this._connection.jid,to:u}),r!=null&&s.c("status",r),n!=null&&this._connection.addHandler(n,null,"presence",null,o),this._connection.send(s),o},message:function(e,t,n,r,i,s){var o,u,a;return a=this.test_append_nick(e,t),i=i||(t!=null?"chat":"groupchat"),s=s||this._connection.getUniqueId(),o=$msg({to:a,from:this._connection.jid,type:i,id:s}).c("body",{xmlns:Strophe.NS.CLIENT}).t(n),o.up(),r!=null&&(o.c("html",{xmlns:Strophe.NS.XHTML_IM}).c("body",{xmlns:Strophe.NS.XHTML}).h(r),o.node.childNodes.length===0?(u=o.node.parentNode,o.up().up(),o.node.removeChild(u)):o.up().up()),o.c("x",{xmlns:"jabber:x:event"}).c("composing"),this._connection.send(o),s},groupchat:function(e,t,n,r){return this.message(e,null,t,n,void 0,r)},invite:function(e,t,n){var r,i;return i=this._connection.getUniqueId(),r=$msg({from:this._connection.jid,to:e,id:i}).c("x",{xmlns:Strophe.NS.MUC_USER}).c("invite",{to:t}),n!=null&&r.c("reason",n),this._connection.send(r),i},multipleInvites:function(e,t,n){var r,i,s,o,u;i=this._connection.getUniqueId(),r=$msg({from:this._connection.jid,to:e,id:i}).c("x",{xmlns:Strophe.NS.MUC_USER});for(o=0,u=t.length;o<u;o++)s=t[o],r.c("invite",{to:s}),n!=null&&(r.c("reason",n),r.up()),r.up();return this._connection.send(r),i},directInvite:function(e,t,n,r){var i,s,o;return o=this._connection.getUniqueId(),i={xmlns:"jabber:x:conference",jid:e},n!=null&&(i.reason=n),r!=null&&(i.password=r),s=$msg({from:this._connection.jid,to:t,id:o}).c("x",i),this._connection.send(s),o},queryOccupants:function(e,t,n){var r,i;return r={xmlns:Strophe.NS.DISCO_ITEMS},i=$iq({from:this._connection.jid,to:e,type:"get"}).c("query",r),this._connection.sendIQ(i,t,n)},configure:function(e,t,n){var r,i;return r=$iq({to:e,type:"get"}).c("query",{xmlns:Strophe.NS.MUC_OWNER}),i=r.tree(),this._connection.sendIQ(i,t,n)},cancelConfigure:function(e){var t,n;return t=$iq({to:e,type:"set"}).c("query",{xmlns:Strophe.NS.MUC_OWNER}).c("x",{xmlns:"jabber:x:data",type:"cancel"}),n=t.tree(),this._connection.sendIQ(n)},saveConfiguration:function(e,t,n,r){var i,s,o,u,a;s=$iq({to:e,type:"set"}).c("query",{xmlns:Strophe.NS.MUC_OWNER});if(typeof Form!="undefined"&&t instanceof Form)t.type="submit",s.cnode(t.toXML());else{s.c("x",{xmlns:"jabber:x:data",type:"submit"});for(u=0,a=t.length;u<a;u++)i=t[u],s.cnode(i).up()}return o=s.tree(),this._connection.sendIQ(o,n,r)},createInstantRoom:function(e,t,n){var r;return r=$iq({to:e,type:"set"}).c("query",{xmlns:Strophe.NS.MUC_OWNER}).c("x",{xmlns:"jabber:x:data",type:"submit"}),this._connection.sendIQ(r.tree(),t,n)},createConfiguredRoom:function(e,t,n,i){var s,o,u;o=$iq({to:e,type:"set"}).c("query",{xmlns:Strophe.NS.MUC_OWNER}).c("x",{xmlns:"jabber:x:data",type:"submit"}),o.c("field",{"var":"FORM_TYPE"}).c("value").t("http://jabber.org/protocol/muc#roomconfig").up().up();for(s in t){if(!r.call(t,s))continue;u=t[s],o.c("field",{"var":s}).c("value").t(u).up().up()}return this._connection.sendIQ(o.tree(),n,i)},setTopic:function(e,t){var n;return n=$msg({to:e,from:this._connection.jid,type:"groupchat"}).c("subject",{xmlns:"jabber:client"}).t(t),this._connection.send(n.tree())},_modifyPrivilege:function(e,t,n,r,i){var s;return s=$iq({to:e,type:"set"}).c("query",{xmlns:Strophe.NS.MUC_ADMIN}).cnode(t.node),n!=null&&s.c("reason",n),this._connection.sendIQ(s.tree(),r,i)},modifyRole:function(e,t,n,r,i,s){var o;return o=$build("item",{nick:t,role:n}),this._modifyPrivilege(e,o,r,i,s)},kick:function(e,t,n,r,i){return this.modifyRole(e,t,"none",n,r,i)},voice:function(e,t,n,r,i){return this.modifyRole(e,t,"participant",n,r,i)},mute:function(e,t,n,r,i){return this.modifyRole(e,t,"visitor",n,r,i)},op:function(e,t,n,r,i){return this.modifyRole(e,t,"moderator",n,r,i)},deop:function(e,t,n,r,i){return this.modifyRole(e,t,"participant",n,r,i)},modifyAffiliation:function(e,t,n,r,i,s){var o;return o=$build("item",{jid:t,affiliation:n}),this._modifyPrivilege(e,o,r,i,s)},ban:function(e,t,n,r,i){return this.modifyAffiliation(e,t,"outcast",n,r,i)},member:function(e,t,n,r,i){return this.modifyAffiliation(e,t,"member",n,r,i)},revoke:function(e,t,n,r,i){return this.modifyAffiliation(e,t,"none",n,r,i)},owner:function(e,t,n,r,i){return this.modifyAffiliation(e,t,"owner",n,r,i)},admin:function(e,t,n,r,i){return this.modifyAffiliation(e,t,"admin",n,r,i)},changeNick:function(e,t){var n,r;return r=this.test_append_nick(e,t),n=$pres({from:this._connection.jid,to:r,id:this._connection.getUniqueId()}),this._connection.send(n.tree())},setStatus:function(e,t,n,r){var i,s;return s=this.test_append_nick(e,t),i=$pres({from:this._connection.jid,to:s}),n!=null&&i.c("show",n).up(),r!=null&&i.c("status",r),this._connection.send(i.tree())},registrationRequest:function(e,t,n){var r;return r=$iq({to:e,from:this._connection.jid,type:"get"}).c("query",{xmlns:Strophe.NS.MUC_REGISTER}),this._connection.sendIQ(r,function(e){var n,r,i,s,o,u,a;r=e.getElementsByTagName("field"),o=r.length,s={required:[],optional:[]};for(u=0,a=r.length;u<a;u++)n=r[u],i={"var":n.getAttribute("var"),label:n.getAttribute("label"),type:n.getAttribute("type")},n.getElementsByTagName("required").length>0?s.required.push(i):s.optional.push(i);return t(s)},n)},submitRegistrationForm:function(e,t,n,r){var i,s,o;i=$iq({to:e,type:"set"}).c("query",{xmlns:Strophe.NS.MUC_REGISTER}),i.c("x",{xmlns:"jabber:x:data",type:"submit"}),i.c("field",{"var":"FORM_TYPE"}).c("value").t("http://jabber.org/protocol/muc#register").up().up();for(s in t)o=t[s],i.c("field",{"var":s}).c("value").t(o).up().up();return this._connection.sendIQ(i,n,r)},listRooms:function(e,t,n){var r;return r=$iq({to:e,from:this._connection.jid,type:"get"}).c("query",{xmlns:Strophe.NS.DISCO_ITEMS}),this._connection.sendIQ(r,t,n)},test_append_nick:function(e,t){var n,r;return r=Strophe.escapeNode(Strophe.getNodeFromJid(e)),n=Strophe.getDomainFromJid(e),r+"@"+n+(t!=null?"/"+t:"")}}),n=function(){function t(e,t,n,r){this.client=e,this.name=t,this.nick=n,this.password=r,this._roomRosterHandler=i(this._roomRosterHandler,this),this._addOccupant=i(this._addOccupant,this),this.roster={},this._message_handlers={},this._presence_handlers={},this._roster_handlers={},this._handler_ids=0,e.muc&&(this.client=e.muc),this.name=Strophe.getBareJidFromJid(t),this.addHandler("presence",this._roomRosterHandler)}return t.prototype.join=function(e,t,n){return this.client.join(this.name,this.nick,e,t,n,this.password)},t.prototype.leave=function(e,t){return this.client.leave(this.name,this.nick,e,t),delete this.client.rooms[this.name]},t.prototype.message=function(e,t,n,r){return this.client.message(this.name,e,t,n,r)},t.prototype.groupchat=function(e,t){return this.client.groupchat(this.name,e,t)},t.prototype.invite=function(e,t){return this.client.invite(this.name,e,t)},t.prototype.multipleInvites=function(e,t){return this.client.invite(this.name,e,t)},t.prototype.directInvite=function(e,t){return this.client.directInvite(this.name,e,t,this.password)},t.prototype.configure=function(e){return this.client.configure(this.name,e)},t.prototype.cancelConfigure=function(){return this.client.cancelConfigure(this.name)},t.prototype.saveConfiguration=function(e){return this.client.saveConfiguration(this.name,e)},t.prototype.queryOccupants=function(e,t){return this.client.queryOccupants(this.name,e,t)},t.prototype.setTopic=function(e){return this.client.setTopic(this.name,e)},t.prototype.modifyRole=function(e,t,n,r,i){return this.client.modifyRole(this.name,e,t,n,r,i)},t.prototype.kick=function(e,t,n,r){return this.client.kick(this.name,e,t,n,r)},t.prototype.voice=function(e,t,n,r){return this.client.voice(this.name,e,t,n,r)},t.prototype.mute=function(e,t,n,r){return this.client.mute(this.name,e,t,n,r)},t.prototype.op=function(e,t,n,r){return this.client.op(this.name,e,t,n,r)},t.prototype.deop=function(e,t,n,r){return this.client.deop(this.name,e,t,n,r)},t.prototype.modifyAffiliation=function(e,t,n,r,i){return this.client.modifyAffiliation(this.name,e,t,n,r,i)},t.prototype.ban=function(e,t,n,r){return this.client.ban(this.name,e,t,n,r)},t.prototype.member=function(e,t,n,r){return this.client.member(this.name,e,t,n,r)},t.prototype.revoke=function(e,t,n,r){return this.client.revoke(this.name,e,t,n,r)},t.prototype.owner=function(e,t,n,r){return this.client.owner(this.name,e,t,n,r)},t.prototype.admin=function(e,t,n,r){return this.client.admin(this.name,e,t,n,r)},t.prototype.changeNick=function(e){return this.nick=e,this.client.changeNick(this.name,e)},t.prototype.setStatus=function(e,t){return this.client.setStatus(this.name,this.nick,e,t)},t.prototype.addHandler=function(e,t){var n;n=this._handler_ids++;switch(e){case"presence":this._presence_handlers[n]=t;break;case"message":this._message_handlers[n]=t;break;case"roster":this._roster_handlers[n]=t;break;default:return this._handler_ids--,null}return n},t.prototype.removeHandler=function(e){return delete this._presence_handlers[e],delete this._message_handlers[e],delete this._roster_handlers[e]},t.prototype._addOccupant=function(t){var n;return n=new e(t,this),this.roster[n.nick]=n,n},t.prototype._roomRosterHandler=function(e){var n,r,i,s,o,u;n=t._parsePresence(e),o=n.nick,s=n.newnick||null;switch(n.type){case"error":return!0;case"unavailable":s&&(n.nick=s,this.roster[o]&&this.roster[s]&&(this.roster[o].update(this.roster[s]),this.roster[s]=this.roster[o]),this.roster[o]&&!this.roster[s]&&(this.roster[s]=this.roster[o].update(n))),delete this.roster[o];break;default:this.roster[o]?this.roster[o].update(n):this._addOccupant(n)}u=this._roster_handlers;for(i in u)r=u[i],r(this.roster,this)||delete this._roster_handlers[i];return!0},t._parsePresence=function(e){var t,n,r,i,s,o,u,a,f;r={},r.nick=Strophe.getResourceFromJid(e.getAttribute("from")),r.type=e.getAttribute("type"),r.states=[],a=e.childNodes;for(i=0,o=a.length;i<o;i++){t=a[i];switch(t.nodeName){case"status":r.status=t.textContent||null;break;case"show":r.show=t.textContent||null;break;case"x":if(t.getAttribute("xmlns")===Strophe.NS.MUC_USER){f=t.childNodes;for(s=0,u=f.length;s<u;s++){n=f[s];switch(n.nodeName){case"item":r.affiliation=n.getAttribute("affiliation"),r.role=n.getAttribute("role"),r.jid=n.getAttribute("jid"),r.newnick=n.getAttribute("nick");break;case"status":n.getAttribute("code")&&r.states.push(n.getAttribute("code"))}}}}}return r},t}(),t=function(){function e(e){this.parse=i(this.parse,this),e!=null&&this.parse(e)}return e.prototype.parse=function(e){var t,n,r,i,s,o,u,a,f,l,c,h,p;o=e.getElementsByTagName("query")[0].childNodes,this.identities=[],this.features=[],this.x=[];for(u=0,l=o.length;u<l;u++){r=o[u],n=r.attributes;switch(r.nodeName){case"identity":s={};for(a=0,c=n.length;a<c;a++)t=n[a],s[t.name]=t.textContent;this.identities.push(s);break;case"feature":this.features.push(r.getAttribute("var"));break;case"x":if(!r.childNodes[0].getAttribute("var")==="FORM_TYPE"||!r.childNodes[0].getAttribute("type")==="hidden")break;p=r.childNodes;for(f=0,h=p.length;f<h;f++)i=p[f],i.attributes.type||this.x.push({"var":i.getAttribute("var"),label:i.getAttribute("label")||"",value:i.firstChild.textContent||""})}}return{identities:this.identities,features:this.features,x:this.x}},e}(),e=function(){function e(e,t){this.room=t,this.update=i(this.update,this),this.admin=i(this.admin,this),this.owner=i(this.owner,this),this.revoke=i(this.revoke,this),this.member=i(this.member,this),this.ban=i(this.ban,this),this.modifyAffiliation=i(this.modifyAffiliation,this),this.deop=i(this.deop,this),this.op=i(this.op,this),this.mute=i(this.mute,this),this.voice=i(this.voice,this),this.kick=i(this.kick,this),this.modifyRole=i(this.modifyRole,this),this.update(e)}return e.prototype.modifyRole=function(e,t,n,r){return this.room.modifyRole(this.nick,e,t,n,r)},e.prototype.kick=function(e,t,n){return this.room.kick(this.nick,e,t,n)},e.prototype.voice=function(e,t,n){return this.room.voice(this.nick,e,t,n)},e.prototype.mute=function(e,t,n){return this.room.mute(this.nick,e,t,n)},e.prototype.op=function(e,t,n){return this.room.op(this.nick,e,t,n)},e.prototype.deop=function(e,t,n){return this.room.deop(this.nick,e,t,n)},e.prototype.modifyAffiliation=function(e,t,n,r){return this.room.modifyAffiliation(this.jid,e,t,n,r)},e.prototype.ban=function(e,t,n){return this.room.ban(this.jid,e,t,n)},e.prototype.member=function(e,t,n){return this.room.member(this.jid,e,t,n)},e.prototype.revoke=function(e,t,n){return this.room.revoke(this.jid,e,t,n)},e.prototype.owner=function(e,t,n){return this.room.owner(this.jid,e,t,n)},e.prototype.admin=function(e,t,n){return this.room.admin(this.jid,e,t,n)},e.prototype.update=function(e){return this.nick=e.nick||null,this.affiliation=e.affiliation||null,this.role=e.role||null,this.jid=e.jid||null,this.status=e.status||null,this.show=e.show||null,this},e}()}.call(this),define("strophe.muc",["strophe"],function(){}),Strophe.addConnectionPlugin("roster",{init:function(e){this._connection=e,this._callbacks=[],this.items=[],this.ver=null;var t,n=this,r=e.connect,i=e.attach,s=function(r){if(r==Strophe.Status.ATTACHED||r==Strophe.Status.CONNECTED)try{e.addHandler(n._onReceivePresence.bind(n),null,"presence",null,null,null),e.addHandler(n._onReceiveIQ.bind(n),Strophe.NS.ROSTER,"iq","set",null,null)}catch(i){Strophe.error(i)}typeof t=="function"&&t.apply(this,arguments)};e.connect=function(n,i,o,u,a,f){t=o,typeof n=="undefined"&&(n=null),typeof i=="undefined"&&(i=null),o=s,r.apply(e,[n,i,o,u,a,f])},e.attach=function(n,r,o,u,a,f,l){t=u,typeof n=="undefined"&&(n=null),typeof r=="undefined"&&(r=null),typeof o=="undefined"&&(o=null),u=s,i.apply(e,[n,r,o,u,a,f,l])},Strophe.addNamespace("ROSTER_VER","urn:xmpp:features:rosterver"),Strophe.addNamespace("NICK","http://jabber.org/protocol/nick")},supportVersioning:function(){return this._connection.features&&this._connection.features.getElementsByTagName("ver").length>0},get:function(e,t,n){var r={xmlns:Strophe.NS.ROSTER};this.supportVersioning()&&(r.ver=t||"",this.items=n||[]);var i=$iq({type:"get",id:this._connection.getUniqueId("roster")}).c("query",r);return this._connection.sendIQ(i,this._onReceiveRosterSuccess.bind(this,e),this._onReceiveRosterError.bind(this,e))},registerCallback:function(e){this._callbacks.push(e)},findItem:function(e){try{for(var t=0;t<this.items.length;t++)if(this.items[t]&&this.items[t].jid==e)return this.items[t]}catch(n){Strophe.error(n)}return!1},removeItem:function(e){for(var t=0;t<this.items.length;t++)if(this.items[t]&&this.items[t].jid==e)return this.items.splice(t,1),!0;return!1},subscribe:function(e,t,n){var r=$pres({to:e,type:"subscribe"});t&&t!==""&&r.c("status").t(t).up(),n&&n!==""&&r.c("nick",{xmlns:Strophe.NS.NICK}).t(n).up(),this._connection.send(r)},unsubscribe:function(e,t){var n=$pres({to:e,type:"unsubscribe"});t&&t!==""&&n.c("status").t(t),this._connection.send(n)},authorize:function(e,t){var n=$pres({to:e,type:"subscribed"});t&&t!==""&&n.c("status").t(t),this._connection.send(n)},unauthorize:function(e,t){var n=$pres({to:e,type:"unsubscribed"});t&&t!==""&&n.c("status").t(t),this._connection.send(n)},add:function(e,t,n,r){var i=$iq({type:"set"}).c("query",{xmlns:Strophe.NS.ROSTER}).c("item",{jid:e,name:t});for(var s=0;s<n.length;s++)i.c("group").t(n[s]).up();this._connection.sendIQ(i,r,r)},update:function(e,t,n,r){var i=this.findItem(e);if(!i)throw"item not found";var s=t||i.name,o=n||i.groups,u=$iq({type:"set"}).c("query",{xmlns:Strophe.NS.ROSTER}).c("item",{jid:i.jid,name:s});for(var a=0;a<o.length;a++)u.c("group").t(o[a]).up();return this._connection.sendIQ(u,r,r)},remove:function(e,t){var n=this.findItem(e);if(!n)throw"item not found";var r=$iq({type:"set"}).c("query",{xmlns:Strophe.NS.ROSTER}).c("item",{jid:n.jid,subscription:"remove"});this._connection.sendIQ(r,t,t)},_onReceiveRosterSuccess:function(e,t){this._updateItems(t),typeof e=="function"&&e(this.items)},_onReceiveRosterError:function(e,t){e(this.items)},_onReceivePresence:function(e){var t=e.getAttribute("from"),n=Strophe.getBareJidFromJid(t),r=this.findItem(n);if(!r)return!0;var i=e.getAttribute("type");if(i=="unavailable")delete r.resources[Strophe.getResourceFromJid(t)];else{if(!!i)return!0;r.resources[Strophe.getResourceFromJid(t)]={show:e.getElementsByTagName("show").length!==0?Strophe.getText(e.getElementsByTagName("show")[0]):"",status:e.getElementsByTagName("status").length!==0?Strophe.getText(e.getElementsByTagName("status")[0]):"",priority:e.getElementsByTagName("priority").length!==0?Strophe.getText(e.getElementsByTagName("priority")[0]):""}}return this._call_backs(this.items,r),!0},_call_backs:function(e,t){for(var n=0;n<this._callbacks.length;n++)this._callbacks[n](e,t)},_onReceiveIQ:function(e){var t=e.getAttribute("id"),n=e.getAttribute("from");if(n&&n!==""&&n!=this._connection.jid&&n!=Strophe.getBareJidFromJid(this._connection.jid))return!0;var r=$iq({type:"result",id:t,from:this._connection.jid});return this._connection.send(r),this._updateItems(e),!0},_updateItems:function(e){var t=e.getElementsByTagName("query");if(t.length!==0){this.ver=t.item(0).getAttribute("ver");var n=this;Strophe.forEachChild(t.item(0),"item",function(e){n._updateItem(e)})}this._call_backs(this.items)},_updateItem:function(e){var t=e.getAttribute("jid"),n=e.getAttribute("name"),r=e.getAttribute("subscription"),i=e.getAttribute("ask"),s=[];Strophe.forEachChild(e,"group",function(e){s.push(Strophe.getText(e))});if(r=="remove"){this.removeItem(t);return}e=this.findItem(t),e?(e.name=n,e.subscription=r,e.ask=i,e.groups=s):this.items.push({name:n,jid:t,subscription:r,ask:i,groups:s,resources:{}})}}),define("strophe.roster",["strophe"],function(){});var buildIq;buildIq=function(e,t,n){var r;return r=$iq(t?{type:e,to:t}:{type:e}),r.c("vCard",{xmlns:Strophe.NS.VCARD}),n&&r.cnode(n),r},Strophe.addConnectionPlugin("vcard",{_connection:null,init:function(e){return this._connection=e,Strophe.addNamespace("VCARD","vcard-temp")},get:function(e,t,n){var r;return r=buildIq("get",t),this._connection.sendIQ(r,e,n)},set:function(e,t,n,r){var i;return i=buildIq("set",n,t),this._connection.sendIQ(i,e,error_rb)}}),define("strophe.vcard",["strophe"],function(){}),Strophe.addConnectionPlugin("disco",{_connection:null,_identities:[],_features:[],_items:[],init:function(e){this._connection=e,this._identities=[],this._features=[],this._items=[],e.addHandler(this._onDiscoInfo.bind(this),Strophe.NS.DISCO_INFO,"iq","get",null,null),e.addHandler(this._onDiscoItems.bind(this),Strophe.NS.DISCO_ITEMS,"iq","get",null,null)},addIdentity:function(e,t,n,r){for(var i=0;i<this._identities.length;i++)if(this._identities[i].category==e&&this._identities[i].type==t&&this._identities[i].name==n&&this._identities[i].lang==r)return!1;return this._identities.push({category:e,type:t,name:n,lang:r}),!0},addFeature:function(e){for(var t=0;t<this._features.length;t++)if(this._features[t]==e)return!1;return this._features.push(e),!0},removeFeature:function(e){for(var t=0;t<this._features.length;t++)if(this._features[t]===e)return this._features.splice(t,1),!0;return!1},addItem:function(e,t,n,r){return n&&!r?!1:(this._items.push({jid:e,name:t,node:n,call_back:r}),!0)},info:function(e,t,n,r,i){var s={xmlns:Strophe.NS.DISCO_INFO};t&&(s.node=t);var o=$iq({from:this._connection.jid,to:e,type:"get"}).c("query",s);this._connection.sendIQ(o,n,r,i)},items:function(e,t,n,r,i){var s={xmlns:Strophe.NS.DISCO_ITEMS};t&&(s.node=t);var o=$iq({from:this._connection.jid,to:e,type:"get"}).c("query",s);this._connection.sendIQ(o,n,r,i)},_buildIQResult:function(e,t){var n=e.getAttribute("id"),r=e.getAttribute("from"),i=$iq({type:"result",id:n});return r!==null&&i.attrs({to:r}),i.c("query",t)},_onDiscoInfo:function(e){var t=e.getElementsByTagName("query")[0].getAttribute("node"),n={xmlns:Strophe.NS.DISCO_INFO};t&&(n.node=t);var r=this._buildIQResult(e,n);for(var i=0;i<this._identities.length;i++){var n={category:this._identities[i].category,type:this._identities[i].type};this._identities[i].name&&(n.name=this._identities[i].name),this._identities[i].lang&&(n["xml:lang"]=this._identities[i].lang),r.c("identity",n).up()}for(var i=0;i<this._features.length;i++)r.c("feature",{"var":this._features[i]}).up();return this._connection.send(r.tree()),!0},_onDiscoItems:function(e){var t={xmlns:Strophe.NS.DISCO_ITEMS},n=e.getElementsByTagName("query")[0].getAttribute("node");if(n){t.node=n;var r=[];for(var i=0;i<this._items.length;i++)if(this._items[i].node==n){r=this._items[i].call_back(e);break}}else var r=this._items;var s=this._buildIQResult(e,t);for(var i=0;i<r.length;i++){var o={jid:r[i].jid};r[i].name&&(o.name=r[i].name),r[i].node&&(o.node=r[i].node),s.c("item",o).up()}return this._connection.send(s.tree()),!0}}),define("strophe.disco",["strophe"],function(){}),define("converse-dependencies",["jquery","utils","otr","moment","locales","backbone.browserStorage","backbone.overview","jquery.browser","typeahead","strophe","strophe.muc","strophe.roster","strophe.vcard","strophe.disco"],function(e,t,n,r){return{jQuery:e,moment:r,otr:n,utils:t}}),define("text",["module"],function(e){var t,n,r,i,s,o=["Msxml2.XMLHTTP","Microsoft.XMLHTTP","Msxml2.XMLHTTP.4.0"],u=/^\s*<\?xml(\s)+version=[\'\"](\d)*.(\d)*[\'\"](\s)*\?>/im,a=/<body[^>]*>\s*([\s\S]+)\s*<\/body>/im,f=typeof location!="undefined"&&location.href,l=f&&location.protocol&&location.protocol.replace(/\:/,""),c=f&&location.hostname,h=f&&(location.port||undefined),p={},d=e.config&&e.config()||{};t={version:"2.0.12",strip:function(e){if(e){e=e.replace(u,"");var t=e.match(a);t&&(e=t[1])}else e="";return e},jsEscape:function(e){return e.replace(/(['\\])/g,"\\$1").replace(/[\f]/g,"\\f").replace(/[\b]/g,"\\b").replace(/[\n]/g,"\\n").replace(/[\t]/g,"\\t").replace(/[\r]/g,"\\r").replace(/[\u2028]/g,"\\u2028").replace(/[\u2029]/g,"\\u2029")},createXhr:d.createXhr||function(){var e,t,n;if(typeof XMLHttpRequest!="undefined")return new XMLHttpRequest;if(typeof ActiveXObject!="undefined")for(t=0;t<3;t+=1){n=o[t];try{e=new ActiveXObject(n)}catch(r){}if(e){o=[n];break}}return e},parseName:function(e){var t,n,r,i=!1,s=e.indexOf("."),o=e.indexOf("./")===0||e.indexOf("../")===0;return s!==-1&&(!o||s>1)?(t=e.substring(0,s),n=e.substring(s+1,e.length)):t=e,r=n||t,s=r.indexOf("!"),s!==-1&&(i=r.substring(s+1)==="strip",r=r.substring(0,s),n?n=r:t=r),{moduleName:t,ext:n,strip:i}},xdRegExp:/^((\w+)\:)?\/\/([^\/\\]+)/,useXhr:function(e,n,r,i){var s,o,u,a=t.xdRegExp.exec(e);return a?(s=a[2],o=a[3],o=o.split(":"),u=o[1],o=o[0],(!s||s===n)&&(!o||o.toLowerCase()===r.toLowerCase())&&(!u&&!o||u===i)):!0},finishLoad:function(e,n,r,i){r=n?t.strip(r):r,d.isBuild&&(p[e]=r),i(r)},load:function(e,n,r,i){if(i&&i.isBuild&&!i.inlineText){r();return}d.isBuild=i&&i.isBuild;var s=t.parseName(e),o=s.moduleName+(s.ext?"."+s.ext:""),u=n.toUrl(o),a=d.useXhr||t.useXhr;if(u.indexOf("empty:")===0){r();return}!f||a(u,l,c,h)?t.get(u,function(n){t.finishLoad(e,s.strip,n,r)},function(e){r.error&&r.error(e)}):n([o],function(e){t.finishLoad(s.moduleName+"."+s.ext,s.strip,e,r)})},write:function(e,n,r,i){if(p.hasOwnProperty(n)){var s=t.jsEscape(p[n]);r.asModule(e+"!"+n,"define(function () { return '"+s+"';});\n")}},writeFile:function(e,n,r,i,s){var o=t.parseName(n),u=o.ext?"."+o.ext:"",a=o.moduleName+u,f=r.toUrl(o.moduleName+u)+".js";t.load(a,r,function(n){var r=function(e){return i(f,e)};r.asModule=function(e,t){return i.asModule(e,f,t)},t.write(e,a,r,s)},s)}};if(d.env==="node"||!d.env&&typeof process!="undefined"&&process.versions&&!!process.versions.node&&!process.versions["node-webkit"])n=require.nodeRequire("fs"),t.get=function(e,t,r){try{var i=n.readFileSync(e,"utf8");i.indexOf("")===0&&(i=i.substring(1)),t(i)}catch(s){r&&r(s)}};else if(d.env==="xhr"||!d.env&&t.createXhr())t.get=function(e,n,r,i){var s=t.createXhr(),o;s.open("GET",e,!0);if(i)for(o in i)i.hasOwnProperty(o)&&s.setRequestHeader(o.toLowerCase(),i[o]);d.onXhr&&d.onXhr(s,e),s.onreadystatechange=function(t){var i,o;s.readyState===4&&(i=s.status||0,i>399&&i<600?(o=new Error(e+" HTTP status: "+i),o.xhr=s,r&&r(o)):n(s.responseText),d.onXhrComplete&&d.onXhrComplete(s,e))},s.send(null)};else if(d.env==="rhino"||!d.env&&typeof Packages!="undefined"&&typeof java!="undefined")t.get=function(e,t){var n,r,i="utf-8",s=new java.io.File(e),o=java.lang.System.getProperty("line.separator"),u=new java.io.BufferedReader(new java.io.InputStreamReader(new java.io.FileInputStream(s),i)),a="";try{n=new java.lang.StringBuffer,r=u.readLine(),r&&r.length()&&r.charAt(0)===65279&&(r=r.substring(1)),r!==null&&n.append(r);while((r=u.readLine())!==null)n.append(o),n.append(r);a=String(n.toString())}finally{u.close()}t(a)};else if(d.env==="xpconnect"||!d.env&&typeof Components!="undefined"&&Components.classes&&Components.interfaces)r=Components.classes,i=Components.interfaces,Components.utils["import"]("resource://gre/modules/FileUtils.jsm"),s="@mozilla.org/windows-registry-key;1"in r,t.get=function(e,t){var n,o,u,a={};s&&(e=e.replace(/\//g,"\\")),u=new FileUtils.File(e);try{n=r["@mozilla.org/network/file-input-stream;1"].createInstance(i.nsIFileInputStream),n.init(u,1,0,!1),o=r["@mozilla.org/intl/converter-input-stream;1"].createInstance(i.nsIConverterInputStream),o.init(n,"utf-8",n.available(),i.nsIConverterInputStream.DEFAULT_REPLACEMENT_CHARACTER),o.readString(n.available(),a),o.close(),n.close(),t(a.value)}catch(f){throw new Error((u&&u.path||"")+": "+f)}};return t}),define("tpl",["text","underscore"],function(e,t){var n={},r="define('{pluginName}!{moduleName}', function () { return {source}; });\n";return{version:"0.0.2",load:function(r,i,s,o){o.tpl&&o.tpl.templateSettings&&(t.templateSettings=o.tpl.templateSettings);if(n[r])s(n[r]);else{var u=o.tpl&&o.tpl.extension||".html",a=o.tpl&&o.tpl.path||"";e.load(a+r+u,i,function(e){n[r]=t.template(e),s(n[r])},o)}},write:function(e,t,i){var s=n[t],o=s&&s.source;o&&i.asModule(e+"!"+t,r.replace("{pluginName}",e).replace("{moduleName}",t).replace("{source}",o))}}}),define("tpl!action",[],function(){return function(obj){var __t,__p="",__j=Array.prototype.join,print=function(){__p+=__j.call(arguments,"")};with(obj||{})__p+='<div class="chat-message '+((__t=extra_classes)==null?"":__t)+'">\n <span class="chat-message-'+((__t=sender)==null?"":__t)+'">'+((__t=time)==null?"":__t)+" **"+((__t=username)==null?"":__t)+' </span>\n <span class="chat-message-content">'+((__t=message)==null?"":__t)+"</span>\n</div>\n";return __p}}),define("tpl!add_contact_dropdown",[],function(){return function(obj){var __t,__p="",__j=Array.prototype.join,print=function(){__p+=__j.call(arguments,"")};with(obj||{})__p+='<dl class="add-converse-contact dropdown">\n <dt id="xmpp-contact-search" class="fancy-dropdown">\n <a class="toggle-xmpp-contact-form" href="#"\n title="'+((__t=label_click_to_chat)==null?"":__t)+'">\n <span class="icon-plus"></span>'+((__t=label_add_contact)==null?"":__t)+'</a>\n </dt>\n <dd class="search-xmpp" style="display:none"><ul></ul></dd>\n</dl>\n';return __p}}),define("tpl!add_contact_form",[],function(){return function(obj){var __t,__p="",__j=Array.prototype.join,print=function(){__p+=__j.call(arguments,"")};with(obj||{})__p+='<li>\n <form class="add-xmpp-contact">\n <input type="text"\n name="identifier"\n class="username"\n placeholder="'+((__t=label_contact_username)==null?"":__t)+'"/>\n <button type="submit">'+((__t=label_add)==null?"":__t)+"</button>\n </form>\n</li>\n";return __p}}),define("tpl!change_status_message",[],function(){return function(obj){var __t,__p="",__j=Array.prototype.join,print=function(){__p+=__j.call(arguments,"")};with(obj||{})__p+='<form id="set-custom-xmpp-status">\n <input type="text" class="custom-xmpp-status" '+((__t=status_message)==null?"":__t)+'\n placeholder="'+((__t=label_custom_status)==null?"":__t)+'"/>\n <button type="submit">'+((__t=label_save)==null?"":__t)+"</button>\n</form>\n";return __p}}),define("tpl!chat_status",[],function(){return function(obj){var __t,__p="",__j=Array.prototype.join,print=function(){__p+=__j.call(arguments,"")};with(obj||{})__p+='<div class="xmpp-status">\n <a class="choose-xmpp-status '+((__t=chat_status)==null?"":__t)+'"\n data-value="'+((__t=status_message)==null?"":__t)+'"\n href="#" title="'+((__t=desc_change_status)==null?"":__t)+'">\n\n <span class="icon-'+((__t=chat_status)==null?"":__t)+'"></span>'+((__t=status_message)==null?"":__t)+'\n </a>\n <a class="change-xmpp-status-message icon-pencil"\n href="#"\n title="'+((__t=desc_custom_status)==null?"":__t)+'"></a>\n</div>\n';return __p}}),define("tpl!chatarea",[],function(){return function(obj){var __t,__p="",__j=Array.prototype.join,print=function(){__p+=__j.call(arguments,"")};with(obj||{})__p+='<div class="chat-area">\n <div class="chat-content"></div>\n <form class="sendXMPPMessage" action="" method="post">\n ',show_toolbar&&(__p+='\n <ul class="chat-toolbar no-text-select"></ul>\n '),__p+='\n <textarea type="text" class="chat-textarea" \n placeholder="'+((__t=label_message)==null?"":__t)+'"/>\n </form>\n</div>\n';return __p}}),define("tpl!chatbox",[],function(){return function(obj){var __t,__p="",__j=Array.prototype.join,print=function(){__p+=__j.call(arguments,"")};with(obj||{})__p+='<div class="box-flyout" style="height: '+((__t=height)==null?"":__t)+'px">\n <div class="dragresize dragresize-tm"></div>\n <div class="chat-head chat-head-chatbox">\n <a class="close-chatbox-button icon-close"></a>\n <a class="toggle-chatbox-button icon-minus"></a>\n <div class="chat-title">\n ',url&&(__p+='\n <a href="'+((__t=url)==null?"":__t)+'" target="_blank" class="user">\n '),__p+="\n "+((__t=fullname)==null?"":__t)+"\n ",url&&(__p+="\n </a>\n "),__p+='\n </div>\n <p class="user-custom-message"><p/>\n </div>\n <div class="chat-body">\n <div class="chat-content"></div>\n <form class="sendXMPPMessage" action="" method="post">\n ',show_toolbar&&(__p+='\n <ul class="chat-toolbar no-text-select"></ul>\n '),__p+='\n <textarea\n type="text"\n class="chat-textarea"\n placeholder="'+((__t=label_personal_message)==null?"":__t)+'"/>\n </form>\n </div>\n</div>\n';return __p}}),define("tpl!chatroom",[],function(){return function(obj){var __t,__p="",__j=Array.prototype.join,print=function(){__p+=__j.call(arguments,"")};with(obj||{})__p+='<div class="box-flyout" style="height: '+((__t=height)==null?"":__t)+'px"\n ',minimized&&(__p+=' style="display:none" '),__p+='>\n <div class="dragresize dragresize-tm"></div>\n <div class="chat-head chat-head-chatroom">\n <a class="close-chatbox-button icon-close"></a>\n <a class="toggle-chatbox-button icon-minus"></a>\n <a class="configure-chatroom-button icon-wrench" style="display:none"></a>\n <div class="chat-title"> '+((__t=name)==null?"":__t)+' </div>\n <p class="chatroom-topic"><p/>\n </div>\n <div class="chat-body"><span class="spinner centered"/></div>\n</div>\n';return __p}}),define("tpl!chatroom_password_form",[],function(){return function(obj){var __t,__p="",__j=Array.prototype.join,print=function(){__p+=__j.call(arguments,"")};with(obj||{})__p+='<div class="chatroom-form-container">\n <form class="chatroom-form">\n <legend>'+((__t=heading)==null?"":__t)+"</legend>\n <label>"+((__t=label_password)==null?"":__t)+'<input type="password" name="password"/></label>\n <input type="submit" value="'+((__t=label_submit)==null?"":__t)+'"/>\n </form>\n</div>\n';return __p}}),define("tpl!chatroom_sidebar",[],function(){return function(obj){var __t,__p="",__j=Array.prototype.join,print=function(){__p+=__j.call(arguments,"")};with(obj||{})__p+='<!-- <div class="participants"> -->\n<form class="room-invite">\n <input class="invited-contact" placeholder="'+((__t=label_invitation)==null?"":__t)+'" type="text"/>\n</form>\n<label>'+((__t=label_occupants)==null?"":__t)+':</label>\n<ul class="participant-list"></ul>\n<!-- </div> -->\n';return __p}}),define("tpl!chatrooms_tab",[],function(){return function(obj){var __t,__p="",__j=Array.prototype.join,print=function(){__p+=__j.call(arguments,"")};with(obj||{})__p+='<li><a class="s" href="#chatrooms">'+((__t=label_rooms)==null?"":__t)+"</a></li>\n";return __p}}),define("tpl!chats_panel",[],function(){return function(obj){var __t,__p="",__j=Array.prototype.join,print=function(){__p+=__j.call(arguments,"")};with(obj||{})__p+='<div id="minimized-chats">\n <a id="toggle-minimized-chats" href="#"></a>\n <div class="minimized-chats-flyout"></div>\n</div>\n';return __p}}),define("tpl!choose_status",[],function(){return function(obj){var __t,__p="",__j=Array.prototype.join,print=function(){__p+=__j.call(arguments,"")};with(obj||{})__p+='<dl id="target" class="dropdown">\n <dt id="fancy-xmpp-status-select" class="fancy-dropdown"></dt>\n <dd><ul class="xmpp-status-menu"></ul></dd>\n</dl>\n';return __p}}),define("tpl!contacts_panel",[],function(){return function(obj){var __t,__p="",__j=Array.prototype.join,print=function(){__p+=__j.call(arguments,"")};with(obj||{})__p+='<form class="set-xmpp-status" action="" method="post">\n <span id="xmpp-status-holder">\n <select id="select-xmpp-status" style="display:none">\n <option value="online">'+((__t=label_online)==null?"":__t)+'</option>\n <option value="dnd">'+((__t=label_busy)==null?"":__t)+'</option>\n <option value="away">'+((__t=label_away)==null?"":__t)+'</option>\n <option value="offline">'+((__t=label_offline)==null?"":__t)+"</option>\n ",allow_logout&&(__p+='\n <option value="logout">'+((__t=label_logout)==null?"":__t)+"</option>\n "),__p+="\n </select>\n </span>\n</form>\n";return __p}}),define("tpl!contacts_tab",[],function(){return function(obj){var __t,__p="",__j=Array.prototype.join,print=function(){__p+=__j.call(arguments,"")};with(obj||{})__p+='<li><a class="s current" href="#users">'+((__t=label_contacts)==null?"":__t)+"</a></li>\n";return __p}}),define("tpl!controlbox",[],function(){return function(obj){var __t,__p="",__j=Array.prototype.join,print=function(){__p+=__j.call(arguments,"")};with(obj||{})__p+='<div class="box-flyout" style="height: '+((__t=height)==null?"":__t)+'px">\n <div class="dragresize dragresize-tm"></div>\n <div class="chat-head controlbox-head">\n <ul id="controlbox-tabs"></ul>\n <a class="close-chatbox-button icon-close"></a>\n </div>\n <div class="controlbox-panes"></div>\n</div>\n';return __p}}),define("tpl!controlbox_toggle",[],function(){return function(obj){var __t,__p="",__j=Array.prototype.join,print=function(){__p+=__j.call(arguments,"")};with(obj||{})__p+='<span class="conn-feedback">'+((__t=label_toggle)==null?"":__t)+'</span>\n<span style="display: none" id="online-count">(0)</span>\n';return __p}}),define("tpl!field",[],function(){return function(obj){var __t,__p="",__j=Array.prototype.join,print=function(){__p+=__j.call(arguments,"")};with(obj||{})__p+='<field var="'+((__t=name)==null?"":__t)+'">',_.isArray(value)?(__p+="\n ",_.each(value,function(e){__p+="<value>"+((__t=e)==null?"":__t)+"</value>"}),__p+="\n"):__p+="\n <value>"+((__t=value)==null?"":__t)+"</value>\n",__p+="</field>\n";return __p}}),define("tpl!form_checkbox",[],function(){return function(obj){var __t,__p="",__j=Array.prototype.join,print=function(){__p+=__j.call(arguments,"")};with(obj||{})__p+="<label>"+((__t=label)==null?"":__t)+'<input name="'+((__t=name)==null?"":__t)+'" type="'+((__t=type)==null?"":__t)+'" '+((__t=checked)==null?"":__t)+"></label>\n";return __p}}),define("tpl!form_input",[],function(){return function(obj){var __t,__p="",__j=Array.prototype.join,print=function(){__p+=__j.call(arguments,"")};with(obj||{})__p+="<label>"+((__t=label)==null?"":__t)+'<input name="'+((__t=name)==null?"":__t)+'" type="'+((__t=type)==null?"":__t)+'" value="'+((__t=value)==null?"":__t)+'"></label>\n';return __p}}),define("tpl!form_select",[],function(){return function(obj){var __t,__p="",__j=Array.prototype.join,print=function(){__p+=__j.call(arguments,"")};with(obj||{})__p+="<label>"+((__t=label)==null?"":__t)+'<select name="'+((__t=name)==null?"":__t)+'" ',multiple&&(__p+=' multiple="multiple" '),__p+=">"+((__t=options)==null?"":__t)+"</select></label>\n";return __p}}),define("tpl!group_header",[],function(){return function(obj){var __t,__p="",__j=Array.prototype.join,print=function(){__p+=__j.call(arguments,"")};with(obj||{})__p+='<a href="#" class="group-toggle icon-'+((__t=toggle_state)==null?"":__t)+'" title="'+((__t=desc_group_toggle)==null?"":__t)+'">'+((__t=label_group)==null?"":__t)+"</a>\n";return __p}}),define("tpl!info",[],function(){return function(obj){var __t,__p="",__j=Array.prototype.join,print=function(){__p+=__j.call(arguments,"")};with(obj||{})__p+='<div class="chat-info">'+((__t=message)==null?"":__t)+"</div>\n";return __p}}),define("tpl!login_panel",[],function(){return function(obj){var __t,__p="",__j=Array.prototype.join,print=function(){__p+=__j.call(arguments,"")};with(obj||{})__p+='<form id="converse-login" method="post">\n <label>'+((__t=label_username)==null?"":__t)+'</label>\n <input type="username" name="jid" placeholder="Username">\n <label>'+((__t=label_password)==null?"":__t)+'</label>\n <input type="password" name="password" placeholder="Password">\n <input class="login-submit" type="submit" value="'+((__t=label_login)==null?"":__t)+'">\n <span class="conn-feedback"></span>\n</form>\n';return __p}}),define("tpl!login_tab",[],function(){return function(obj){var __t,__p="",__j=Array.prototype.join,print=function(){__p+=__j.call(arguments,"")};with(obj||{})__p+='<li><a class="current" href="#login">'+((__t=label_sign_in)==null?"":__t)+"</a></li>\n";return __p}}),define("tpl!message",[],function(){return function(obj){var __t,__p="",__j=Array.prototype.join,print=function(){__p+=__j.call(arguments,"")};with(obj||{})__p+='<div class="chat-message '+((__t=extra_classes)==null?"":__t)+'">\n <span class="chat-message-'+((__t=sender)==null?"":__t)+'">'+((__t=time)==null?"":__t)+" "+((__t=username)==null?"":__t)+':&nbsp;</span>\n <span class="chat-message-content">'+((__t=message)==null?"":__t)+"</span>\n</div>\n";return __p}}),define("tpl!new_day",[],function(){return function(obj){var __t,__p="",__j=Array.prototype.join,print=function(){__p+=__j.call(arguments,"")};with(obj||{})__p+='<time class="chat-date" datetime="'+((__t=isodate)==null?"":__t)+'">'+((__t=datestring)==null?"":__t)+"</time>\n";return __p}}),define("tpl!occupant",[],function(){return function(obj){var __t,__p="",__j=Array.prototype.join,print=function(){__p+=__j.call(arguments,"")};with(obj||{})__p+='<li class="'+((__t=role)==null?"":__t)+'"\n ',role==="moderator"&&(__p+='\n title="'+((__t=desc_moderator)==null?"":__t)+'"\n '),__p+="\n ",role==="participant"&&(__p+='\n title="'+((__t=desc_participant)==null?"":__t)+'"\n '),__p+="\n ",role==="visitor"&&(__p+='\n title="'+((__t=desc_visitor)==null?"":__t)+'"\n '),__p+="\n>"+((__t=nick)==null?"":__t)+"</li>\n";return __p}}),define("tpl!pending_contact",[],function(){return function(obj){var __t,__p="",__j=Array.prototype.join,print=function(){__p+=__j.call(arguments,"")};with(obj||{})__p+='<span class="pending-contact-name">'+((__t=fullname)==null?"":__t)+'</span> <a class="remove-xmpp-contact icon-remove" title="'+((__t=desc_remove)==null?"":__t)+'" href="#"></a>\n';return __p}}),define("tpl!pending_contacts",[],function(){return function(obj){var __t,__p="",__j=Array.prototype.join,print=function(){__p+=__j.call(arguments,"")};with(obj||{})__p+='<dt id="pending-xmpp-contacts"><a href="#" class="group-toggle icon-'+((__t=toggle_state)==null?"":__t)+'" title="'+((__t=desc_group_toggle)==null?"":__t)+'">'+((__t=label_pending_contacts)==null?"":__t)+"</a></dt>\n";return __p}}),define("tpl!requesting_contact",[],function(){return function(obj){var __t,__p="",__j=Array.prototype.join,print=function(){__p+=__j.call(arguments,"")};with(obj||{})__p+='<span class="req-contact-name">'+((__t=fullname)==null?"":__t)+'</span>\n<span class="request-actions">\n <a class="accept-xmpp-request icon-checkmark" title="'+((__t=desc_accept)==null?"":__t)+'" href="#"></a>\n <a class="decline-xmpp-request icon-close" title="'+((__t=desc_decline)==null?"":__t)+'" href="#"></a>\n</span>\n';return __p}}),define("tpl!requesting_contacts",[],function(){return function(obj){var __t,__p="",__j=Array.prototype.join,print=function(){__p+=__j.call(arguments,"")};with(obj||{})__p+='<dt id="xmpp-contact-requests"><a href="#" class="group-toggle icon-'+((__t=toggle_state)==null?"":__t)+'" title="'+((__t=desc_group_toggle)==null?"":__t)+'">'+((__t=label_contact_requests)==null?"":__t)+"</a></dt>\n";return __p}}),define("tpl!room_description",[],function(){return function(obj){var __t,__p="",__j=Array.prototype.join,print=function(){__p+=__j.call(arguments,"")};with(obj||{})__p+='<!-- FIXME: check markup in mockup -->\n<div class="room-info">\n<p class="room-info"><strong>'+((__t=label_desc)==null?"":__t)+"</strong> "+((__t=desc)==null?"":__t)+'</p>\n<p class="room-info"><strong>'+((__t=label_occ)==null?"":__t)+"</strong> "+((__t=occ)==null?"":__t)+'</p>\n<p class="room-info"><strong>'+((__t=label_features)==null?"":__t)+"</strong>\n <ul>\n ",passwordprotected&&(__p+='\n <li class="room-info locked">'+((__t=label_requires_auth)==null?"":__t)+"</li>\n "),__p+="\n ",hidden&&(__p+='\n <li class="room-info">'+((__t=label_hidden)==null?"":__t)+"</li>\n "),__p+="\n ",membersonly&&(__p+='\n <li class="room-info">'+((__t=label_requires_invite)==null?"":__t)+"</li>\n "),__p+="\n ",moderated&&(__p+='\n <li class="room-info">'+((__t=label_moderated)==null?"":__t)+"</li>\n "),__p+="\n ",nonanonymous&&(__p+='\n <li class="room-info">'+((__t=label_non_anon)==null?"":__t)+"</li>\n "),__p+="\n ",open&&(__p+='\n <li class="room-info">'+((__t=label_open_room)==null?"":__t)+"</li>\n "),__p+="\n ",persistent&&(__p+='\n <li class="room-info">'+((__t=label_permanent_room)==null?"":__t)+"</li>\n "),__p+="\n ",publicroom&&(__p+='\n <li class="room-info">'+((__t=label_public)==null?"":__t)+"</li>\n "),__p+="\n ",semianonymous&&(__p+='\n <li class="room-info">'+((__t=label_semi_anon)==null?"":__t)+"</li>\n "),__p+="\n ",temporary&&(__p+='\n <li class="room-info">'+((__t=label_temp_room)==null?"":__t)+"</li>\n "),__p+="\n ",unmoderated&&(__p+='\n <li class="room-info">'+((__t=label_unmoderated)==null?"":__t)+"</li>\n "),__p+="\n </ul>\n</p>\n</div>\n";return __p}}),define("tpl!room_item",[],function(){return function(obj){var __t,__p="",__j=Array.prototype.join,print=function(){__p+=__j.call(arguments,"")};with(obj||{})__p+='<dd class="available-chatroom">\n<a class="open-room" data-room-jid="'+((__t=jid)==null?"":__t)+'"\n title="'+((__t=open_title)==null?"":__t)+'" href="#">'+((__t=name)==null?"":__t)+'</a>\n<a class="room-info icon-room-info" data-room-jid="'+((__t=jid)==null?"":__t)+'"\n title="'+((__t=info_title)==null?"":__t)+'" href="#">&nbsp;</a>\n</dd>\n';return __p}}),define("tpl!room_panel",[],function(){return function(obj){var __t,__p="",__j=Array.prototype.join,print=function(){__p+=__j.call(arguments,"")};with(obj||{})__p+='<form class="add-chatroom" action="" method="post">\n <input type="text" name="chatroom" class="new-chatroom-name"\n placeholder="'+((__t=label_room_name)==null?"":__t)+'"/>\n <input type="text" name="nick" class="new-chatroom-nick"\n placeholder="'+((__t=label_nickname)==null?"":__t)+'"/>\n <input type="'+((__t=server_input_type)==null?"":__t)+'" name="server" class="new-chatroom-server"\n placeholder="'+((__t=label_server)==null?"":__t)+'"/>\n <input type="submit" name="join" value="'+((__t=label_join)==null?"":__t)+'"/>\n <input type="button" name="show" id="show-rooms" value="'+((__t=label_show_rooms)==null?"":__t)+'"/>\n</form>\n<dl id="available-chatrooms"></dl>\n';return __p}}),define("tpl!roster",[],function(){return function(obj){var __t,__p="",__j=Array.prototype.join,print=function(){__p+=__j.call(arguments,"")};with(obj||{})__p+='<input style="display: none;" class="roster-filter" placeholder="'+((__t=placeholder)==null?"":__t)+'">\n<select style="display: none;" class="filter-type">\n <option value="contacts">'+((__t=label_contacts)==null?"":__t)+'</option>\n <option value="groups">'+((__t=label_groups)==null?"":__t)+"</option>\n</select>\n";return __p}}),define("tpl!roster_item",[],function(){return function(obj){var __t,__p="",__j=Array.prototype.join,print=function(){__p+=__j.call(arguments,"")};with(obj||{})__p+='<a class="open-chat" title="'+((__t=desc_chat)==null?"":__t)+'" href="#"><span class="icon-'+((__t=chat_status)==null?"":__t)+'" title="'+((__t=desc_status)==null?"":__t)+'"></span>'+((__t=fullname)==null?"":__t)+'</a>\n<a class="remove-xmpp-contact icon-remove" title="'+((__t=desc_remove)==null?"":__t)+'" href="#"></a>\n';return __p}}),define("tpl!select_option",[],function(){return function(obj){var __t,__p="",__j=Array.prototype.join,print=function(){__p+=__j.call(arguments,"")};with(obj||{})__p+='<option value="'+((__t=value)==null?"":__t)+'" ',selected&&(__p+=' selected="selected" '),__p+=" >"+((__t=label)==null?"":__t)+"</option>\n";return __p}}),define("tpl!search_contact",[],function(){return function(obj){var __t,__p="",__j=Array.prototype.join,print=function(){__p+=__j.call(arguments,"")};with(obj||{})__p+='<li>\n <form class="search-xmpp-contact">\n <input type="text"\n name="identifier"\n class="username"\n placeholder="'+((__t=label_contact_name)==null?"":__t)+'"/>\n <button type="submit">'+((__t=label_search)==null?"":__t)+"</button>\n </form>\n</li>\n";return __p}}),define("tpl!status_option",[],function(){return function(obj){var __t,__p="",__j=Array.prototype.join,print=function(){__p+=__j.call(arguments,"")};with(obj||{})__p+='<li>\n <a href="#" class="'+((__t=value)==null?"":__t)+'" data-value="'+((__t=value)==null?"":__t)+'">\n <span class="icon-'+((__t=value)==null?"":__t)+'"></span>\n '+((__t=text)==null?"":__t)+"\n </a>\n</li>\n";return __p}}),define("tpl!toggle_chats",[],function(){return function(obj){var __t,__p="",__j=Array.prototype.join,print=function(){__p+=__j.call(arguments,"")};with(obj||{})__p+=""+((__t=Minimized)==null?"":__t)+' <span id="minimized-count">('+((__t=num_minimized)==null?"":__t)+')</span>\n<span class="unread-message-count"\n ',num_unread||(__p+=' style="display: none" '),__p+='\n href="#">'+((__t=num_unread)==null?"":__t)+"</span>\n";return __p}}),define("tpl!toolbar",[],function(){return function(obj){var __t,__p="",__j=Array.prototype.join,print=function(){__p+=__j.call(arguments,"")};with(obj||{})__p+="",show_emoticons&&(__p+='\n <li class="toggle-smiley icon-happy" title="Insert a smilery">\n <ul>\n <li><a class="icon-smiley" href="#" data-emoticon=":)"></a></li>\n <li><a class="icon-wink" href="#" data-emoticon=";)"></a></li>\n <li><a class="icon-grin" href="#" data-emoticon=":D"></a></li>\n <li><a class="icon-tongue" href="#" data-emoticon=":P"></a></li>\n <li><a class="icon-cool" href="#" data-emoticon="8)"></a></li>\n <li><a class="icon-evil" href="#" data-emoticon=">:)"></a></li>\n <li><a class="icon-confused" href="#" data-emoticon=":S"></a></li>\n <li><a class="icon-wondering" href="#" data-emoticon=":\\"></a></li>\n <li><a class="icon-angry" href="#" data-emoticon=">:("></a></li>\n <li><a class="icon-sad" href="#" data-emoticon=":("></a></li>\n <li><a class="icon-shocked" href="#" data-emoticon=":O"></a></li>\n <li><a class="icon-thumbs-up" href="#" data-emoticon="(^.^)b"></a></li>\n <li><a class="icon-heart" href="#" data-emoticon="<3"></a></li>\n </ul>\n </li>\n'),__p+="\n",show_call_button&&(__p+='\n<li class="toggle-call"><a class="icon-phone" title="'+((__t=label_start_call)==null?"":__t)+'"></a></li>\n'),__p+="\n",show_participants_toggle&&(__p+='\n<li class="toggle-participants"><a class="icon-hide-users" title="'+((__t=label_hide_participants)==null?"":__t)+'"></a></li>\n'),__p+="\n",show_clear_button&&(__p+='\n<li class="toggle-clear"><a class="icon-remove" title="'+((__t=label_clear)==null?"":__t)+'"></a></li>\n'),__p+="\n",allow_otr&&(__p+='\n <li class="toggle-otr '+((__t=otr_status_class)==null?"":__t)+'" title="'+((__t=otr_tooltip)==null?"":__t)+'">\n <span class="chat-toolbar-text">'+((__t=otr_translated_status)==null?"":__t)+"</span>\n ",otr_status==UNENCRYPTED&&(__p+='\n <span class="icon-unlocked"></span>\n '),__p+="\n ",otr_status==UNVERIFIED&&(__p+='\n <span class="icon-lock"></span>\n '),__p+="\n ",otr_status==VERIFIED&&(__p+='\n <span class="icon-lock"></span>\n '),__p+="\n ",otr_status==FINISHED&&(__p+='\n <span class="icon-unlocked"></span>\n '),__p+="\n <ul>\n ",otr_status==UNENCRYPTED&&(__p+='\n <li><a class="start-otr" href="#">'+((__t=label_start_encrypted_conversation)==null?"":__t)+"</a></li>\n "),__p+="\n ",otr_status!=UNENCRYPTED&&(__p+='\n <li><a class="start-otr" href="#">'+((__t=label_refresh_encrypted_conversation)==null?"":__t)+'</a></li>\n <li><a class="end-otr" href="#">'+((__t=label_end_encrypted_conversation)==null?"":__t)+'</a></li>\n <li><a class="auth-otr" data-scheme="smp" href="#">'+((__t=label_verify_with_smp)==null?"":__t)+"</a></li>\n "),__p+="\n ",otr_status==UNVERIFIED&&(__p+='\n <li><a class="auth-otr" data-scheme="fingerprint" href="#">'+((__t=label_verify_with_fingerprints)==null?"":__t)+"</a></li>\n "),__p+='\n <li><a href="http://www.cypherpunks.ca/otr/help/3.2.0/levels.php" target="_blank">'+((__t=label_whats_this)==null?"":__t)+"</a></li>\n </ul>\n </li>\n"),__p+="\n";return __p}}),define("tpl!trimmed_chat",[],function(){return function(obj){var __t,__p="",__j=Array.prototype.join,print=function(){__p+=__j.call(arguments,"")};with(obj||{})__p+='<a class="close-chatbox-button icon-close"></a>\n<a class="chat-head-message-count" \n ',num_unread||(__p+=' style="display: none" '),__p+='\n href="#">'+((__t=num_unread)==null?"":__t)+'</a>\n<a href="#" class="restore-chat" title="'+((__t=tooltip)==null?"":__t)+'">\n '+((__t=title)==null?"":__t)+"\n</a>\n";return __p}}),define("tpl!form_textarea",[],function(){return function(obj){var __t,__p="",__j=Array.prototype.join,print=function(){__p+=__j.call(arguments,"")};with(obj||{})__p+='<label class="label-ta">'+((__t=label)==null?"":__t)+'<textarea name="'+((__t=name)==null?"":__t)+'">'+((__t=value)==null?"":__t)+"</textarea></label>\n";return __p}}),define("converse-templates",["tpl!action","tpl!add_contact_dropdown","tpl!add_contact_form","tpl!change_status_message","tpl!chat_status","tpl!chatarea","tpl!chatbox","tpl!chatroom","tpl!chatroom_password_form","tpl!chatroom_sidebar","tpl!chatrooms_tab","tpl!chats_panel","tpl!choose_status","tpl!contacts_panel","tpl!contacts_tab","tpl!controlbox","tpl!controlbox_toggle","tpl!field","tpl!form_checkbox","tpl!form_input","tpl!form_select","tpl!group_header","tpl!info","tpl!login_panel","tpl!login_tab","tpl!message","tpl!new_day","tpl!occupant","tpl!pending_contact","tpl!pending_contacts","tpl!requesting_contact","tpl!requesting_contacts","tpl!room_description","tpl!room_item","tpl!room_panel","tpl!roster","tpl!roster_item","tpl!select_option","tpl!search_contact","tpl!status_option","tpl!toggle_chats","tpl!toolbar","tpl!trimmed_chat","tpl!form_textarea"],function(){return{action:arguments[0],add_contact_dropdown:arguments[1],add_contact_form:arguments[2],change_status_message:arguments[3],chat_status:arguments[4],chatarea:arguments[5],chatbox:arguments[6],chatroom:arguments[7],chatroom_password_form:arguments[8],chatroom_sidebar:arguments[9],chatrooms_tab:arguments[10],chats_panel:arguments[11],choose_status:arguments[12],contacts_panel:arguments[13],contacts_tab:arguments[14],controlbox:arguments[15],controlbox_toggle:arguments[16],field:arguments[17],form_checkbox:arguments[18],form_input:arguments[19],form_select:arguments[20],group_header:arguments[21],info:arguments[22],login_panel:arguments[23],login_tab:arguments[24],message:arguments[25],new_day:arguments[26],occupant:arguments[27],pending_contact:arguments[28],pending_contacts:arguments[29],requesting_contact:arguments[30],requesting_contacts:arguments[31],room_description:arguments[32],room_item:arguments[33],room_panel:arguments[34],roster:arguments[35],roster_item:arguments[36],select_option:arguments[37],search_contact:arguments[38],status_option:arguments[39],toggle_chats:arguments[40],toolbar:arguments[41],trimmed_chat:arguments[42],form_textarea:arguments[43]}}),function(e,t){typeof define=="function"&&define.amd?define("converse",["converse-dependencies","converse-templates"],function(e,n){var r=e.otr;return typeof r!="undefined"?t(e.jQuery,_,r.OTR,r.DSA,n,e.moment,e.utils):t(e.jQuery,_,undefined,undefined,n,e.moment,e.utils)}):e.converse=t(jQuery,_,OTR,DSA,JST,moment,utils)}(this,function(e,t,n,r,s,o,u){if(typeof console=="undefined"||typeof console.log=="undefined")console={log:function(){},error:function(){}};t.templateSettings={evaluate:/\{\[([\s\S]+?)\]\}/g,interpolate:/\{\{([\s\S]+?)\}\}/g};var a=function(e,n){return function(r){if(typeof e=="object"){var i=!1;return t.each(e,function(e){i=i||r.get(e).toLowerCase().indexOf(n.toLowerCase())!==-1}),i}if(typeof e=="string")return r.get(e).toLowerCase().indexOf(n.toLowerCase())!==-1;throw new Error("Wrong attribute type. Must be string or array.")}};a.not=function(e,t){return function(n){return!a(e,t)(n)}},String.prototype.splitOnce=function(e){var t=this.split(e);return[t.shift(),t.join(e)]},e.fn.addEmoticons=function(){return l.visible_toolbar_buttons.emoticons&&this.length>0&&this.each(function(t,n){var r=e(n).html();r=r.replace(/&gt;:\)/g,'<span class="emoticon icon-evil"></span>'),r=r.replace(/:\)/g,'<span class="emoticon icon-smiley"></span>'),r=r.replace(/:\-\)/g,'<span class="emoticon icon-smiley"></span>'),r=r.replace(/;\)/g,'<span class="emoticon icon-wink"></span>'),r=r.replace(/;\-\)/g,'<span class="emoticon icon-wink"></span>'),r=r.replace(/:D/g,'<span class="emoticon icon-grin"></span>'),r=r.replace(/:\-D/g,'<span class="emoticon icon-grin"></span>'),r=r.replace(/:P/g,'<span class="emoticon icon-tongue"></span>'),r=r.replace(/:\-P/g,'<span class="emoticon icon-tongue"></span>'),r=r.replace(/:p/g,'<span class="emoticon icon-tongue"></span>'),r=r.replace(/:\-p/g,'<span class="emoticon icon-tongue"></span>'),r=r.replace(/8\)/g,'<span class="emoticon icon-cool"></span>'),r=r.replace(/:S/g,'<span class="emoticon icon-confused"></span>'),r=r.replace(/:\\/g,'<span class="emoticon icon-wondering"></span>'),r=r.replace(/:\/ /g,'<span class="emoticon icon-wondering"></span>'),r=r.replace(/&gt;:\(/g,'<span class="emoticon icon-angry"></span>'),r=r.replace(/:\(/g,'<span class="emoticon icon-sad"></span>'),r=r.replace(/:\-\(/g,'<span class="emoticon icon-sad"></span>'),r=r.replace(/:O/g,'<span class="emoticon icon-shocked"></span>'),r=r.replace(/:\-O/g,'<span class="emoticon icon-shocked"></span>'),r=r.replace(/\=\-O/g,'<span class="emoticon icon-shocked"></span>'),r=r.replace(/\(\^.\^\)b/g,'<span class="emoticon icon-thumbs-up"></span>'),r=r.replace(/&lt;3/g,'<span class="emoticon icon-heart"></span>'),e(n).html(r)}),this};var f=function(){var e;l.play_sounds&&typeof Audio!="undefined"&&(e=new Audio("sounds/msg_received.ogg"),e.canPlayType("/audio/ogg")?e.play():(e=new Audio("/sounds/msg_received.mp3"),e.play()))},l={plugins:{},templates:s,emit:function(t,n){e(this).trigger(t,n)},once:function(t,n){e(this).one(t,n)},on:function(t,n){e(this).bind(t,n)},off:function(t,n){e(this).unbind(t,n)},refreshWebkit:function(){if(e.browser.webkit){var t=document.getElementById("conversejs");t.style.display="none",t.offsetHeight=t.offsetHeight,t.style.display="block"}}};l.initialize=function(s,l){var c=this,h=0,p=1,d=2,v=3,m={ENTER:13},g={offline:6,unavailable:5,xa:4,away:3,dnd:2,online:1},y="inactive",b="active",w="composing",E="paused",S="gone",x=typeof crypto!="undefined"&&(typeof crypto.randomBytes=="function"||typeof crypto.getRandomValues=="function"),T=x&&typeof CryptoJS!="undefined"&&typeof n!="undefined"&&typeof r!="undefined",N="opened",C="closed";this.allow_contact_requests=!0,this.allow_dragresize=!0,this.allow_logout=!0,this.allow_muc=!0,this.allow_otr=!0,this.animate=!0,this.auto_list_rooms=!1,this.auto_reconnect=!1,this.auto_subscribe=!1,this.bosh_service_url=undefined,this.cache_otr_key=!1,this.debug=!1,this.default_box_height=324,this.expose_rid_and_sid=!1,this.forward_messages=!1,this.hide_muc_server=!1,this.hide_offline_users=!1,this.i18n=locales.en,this.keepalive=!1,this.message_carbons=!1,this.no_trimming=!1,this.play_sounds=!1,this.prebind=!1,this.roster_groups=!1,this.show_controlbox_by_default=!1,this.show_only_online_users=!1,this.show_toolbar=!0,this.storage="session",this.use_otr_by_default=!1,this.use_vcards=!0,this.visible_toolbar_buttons={emoticons:!0,call:!1,clear:!0,toggle_participants:!0},this.xhr_custom_status=!1,this.xhr_custom_status_url="",this.xhr_user_search=!1,this.xhr_user_search_url="",t.extend(this,t.pick(s,["allow_contact_requests","allow_dragresize","allow_logout","allow_muc","allow_otr","animate","auto_list_rooms","auto_reconnect","auto_subscribe","bosh_service_url","cache_otr_key","connection","debug","default_box_height","expose_rid_and_sid","forward_messages","fullname","hide_muc_server","hide_offline_users","i18n","jid","keepalive","message_carbons","no_trimming","play_sounds","prebind","rid","roster_groups","show_controlbox_by_default","show_only_online_users","show_toolbar","sid","storage","use_otr_by_default","use_vcards","xhr_custom_status","xhr_custom_status_url","xhr_user_search","xhr_user_search_url"])),s.visible_toolbar_buttons&&t.extend(this.visible_toolbar_buttons,t.pick(s.visible_toolbar_buttons,["emoticons","call","clear","toggle_participants"])),e.fx.off=!this.animate,this.allow_otr=this.allow_otr&&T,this.use_otr_by_default=this.use_otr_by_default&&this.allow_otr;var k=e.proxy(u.__,this),L=u.___,A={};A[h]="unencrypted",A[p]="unverified",A[d]="verified",A[v]="finished";var O={};O[h]=k("unencrypted"),O[p]=k("unverified"),O[d]=k("verified"),O[v]=k("finished");var M={dnd:k("This contact is busy"),online:k("This contact is online"),offline:k("This contact is offline"),unavailable:k("This contact is unavailable"),xa:k("This contact is away for an extended period"),away:k("This contact is away")},D=k("Click to hide these contacts"),P=k("My contacts"),H=k("Pending contacts"),B=k("Contact requests"),j=k("Ungrouped"),F=k("Contacts"),I=k("Groups"),q={};q[P]=0,q[j]=1,q[B]=2,q[H]=3,this.callback=l||function(){},this.initial_presence_sent=0,this.msg_counter=0,this.giveFeedback=function(t,n){e(".conn-feedback").attr("class","conn-feedback").text(t),n&&e(".conn-feedback").addClass(n)},this.log=function(e,t){this.debug&&(t=="error"?console.log("ERROR: "+e):console.log(e))},this.getVCard=function(n,r,i){if(!this.use_vcards){r&&r(n,n);return}c.connection.vcard.get(e.proxy(function(i){var s=e(i).find("vCard"),u=s.find("FN").text(),a=s.find("BINVAL").text(),f=s.find("TYPE").text(),l=s.find("URL").text();if(n){var h=c.roster.get(n);h&&(u=t.isEmpty(u)?h.get("fullname")||n:u,h.save({fullname:u,image_type:f,image:a,url:l,vcard_updated:o().format()}))}r&&r(n,u,a,f,l)},this),n,function(e){var t=c.roster.get(n);t&&t.save({vcard_updated:o().format()}),i&&i(n,e)})},this.reconnect=function(){c.giveFeedback(k("Reconnecting"),"error"),c.emit("reconnect"),c.prebind||this.connection.connect(this.connection.jid,this.connection.pass,function(e,t){c.onConnect(e,t,!0)},this.connection.wait,this.connection.hold,this.connection.route)},this.renderLoginPanel=function(){c._tearDown();var e=c.chatboxviews.get("controlbox");e.model.set({connected:!1}),e.renderLoginPanel()},this.onConnect=function(e,t,n){var r,i;e===Strophe.Status.CONNECTED||e===Strophe.Status.ATTACHED?typeof n!="undefined"&&n?(c.log(e===Strophe.Status.CONNECTED?"Reconnected":"Reattached"),c.onReconnected()):(c.log(e===Strophe.Status.CONNECTED?"Connected":"Attached"),c.onConnected()):e===Strophe.Status.DISCONNECTED?(c.giveFeedback(k("Disconnected"),"error"),c.auto_reconnect?c.reconnect():c.renderLoginPanel()):e===Strophe.Status.Error?(c.renderLoginPanel(),c.giveFeedback(k("Error"),"error")):e===Strophe.Status.CONNECTING?c.giveFeedback(k("Connecting")):e===Strophe.Status.CONNFAIL?(c.renderLoginPanel(),c.giveFeedback(k("Connection Failed"),"error")):e===Strophe.Status.AUTHENTICATING?c.giveFeedback(k("Authenticating")):e===Strophe.Status.AUTHFAIL?(c.renderLoginPanel(),c.giveFeedback(k("Authentication Failed"),"error")):e===Strophe.Status.DISCONNECTING&&(c.connection.connected?c.giveFeedback(k("Disconnecting"),"error"):c.renderLoginPanel())},this.applyHeightResistance=function(e){if(typeof e=="undefined")return c.default_box_height;var t=10;return e!==c.default_box_height&&Math.abs(e-c.default_box_height)<t?c.default_box_height:e},this.updateMsgCounter=function(){this.msg_counter>0?(document.title.search(/^Messages \(\d+\) /)==-1?document.title="Messages ("+this.msg_counter+") "+document.title:document.title=document.title.replace(/^Messages \(\d+\) /,"Messages ("+this.msg_counter+") "),window.blur(),window.focus()):document.title.search(/^Messages \(\d+\) /)!=-1&&(document.title=document.title.replace(/^Messages \(\d+\) /,""))},this.incrementMsgCounter=function(){this.msg_counter+=1,this.updateMsgCounter()},this.clearMsgCounter=function(){this.msg_counter=0,this.updateMsgCounter()},this.initStatus=function(e){this.xmppstatus=new this.XMPPStatus;var t=b64_sha1("converse.xmppstatus-"+c.bare_jid);this.xmppstatus.id=t,this.xmppstatus.browserStorage=new Backbone.BrowserStorage[c.storage](t),this.xmppstatus.fetch({success:e,error:e})},this.initSession=function(){this.session=new this.BOSHSession;var t=b64_sha1("converse.bosh-session");this.session.id=t,this.session.browserStorage=new Backbone.BrowserStorage[c.storage](t),this.session.fetch(),e(window).on("beforeunload",e.proxy(function(){c.connection.connected?this.setSession():this.clearSession()},this))},this.clearSession=function(){this.roster.browserStorage._clear(),this.session.browserStorage._clear(),c.chatboxes.get("controlbox").save({connected:!1})},this.setSession=function(){this.keepalive&&this.session.save({jid:this.connection.jid,rid:this.connection._proto.rid,sid:this.connection._proto.sid})},this.logOut=function(){c.chatboxviews.closeAllChatBoxes(!1),c.clearSession(),c.connection.disconnect(),c.connection.reset()},this.registerGlobalEventHandlers=function(){e(document).click(function(){e(".toggle-otr ul").is(":visible")&&e(".toggle-otr ul",this).slideUp(),e(".toggle-smiley ul").is(":visible")&&e(".toggle-smiley ul",this).slideUp()}),e(document).on("mousemove",e.proxy(function(e){if(!this.resized_chatbox||!this.allow_dragresize)return!0;e.preventDefault(),this.resized_chatbox.resizeChatBox(e)},this)),e(document).on("mouseup",e.proxy(function(e){if(!this.resized_chatbox||!this.allow_dragresize)return!0;e.preventDefault();var t=this.applyHeightResistance(this.resized_chatbox.height);this.connection.connected?this.resized_chatbox.model.save({height:t}):this.resized_chatbox.model.set({height:t}),this.resized_chatbox=null},this)),e(window).on("blur focus",e.proxy(function(e){this.windowState!=e.type&&e.type=="focus"&&c.clearMsgCounter(),this.windowState=e.type},this)),e(window).on("resize",t.debounce(e.proxy(function(e){this.chatboxviews.trimChats()},this),200))},this.onReconnected=function(){this.initStatus(e.proxy(function(){this.registerRosterXHandler(),this.registerPresenceHandler(),this.chatboxes.registerMessageHandler(),c.xmppstatus.sendPresence(),this.giveFeedback(k("Online Contacts"))},this))},this.enableCarbons=function(){if(!this.message_carbons)return;var t=(new Strophe.Builder("iq",{from:this.connection.jid,id:"enablecarbons",type:"set"})).c("enable",{xmlns:"urn:xmpp:carbons:2"});this.connection.send(t),this.connection.addHandler(function(t){e(t).find("error").length>0?c.log("ERROR: An error occured while trying to enable message carbons."):c.log("Message carbons appear to have been enabled.")},null,"iq",null,"enablecarbons")},this.onConnected=function(){this.debug&&(this.connection.xmlInput=function(e){console.log(e)},this.connection.xmlOutput=function(e){console.log(e)},Strophe.log=function(e,t){console.log(e+" "+t)},Strophe.error=function(e){console.log("ERROR: "+e)}),this.chatboxviews.closeAllChatBoxes(),this.setSession(),this.jid=this.connection.jid,this.bare_jid=Strophe.getBareJidFromJid(this.connection.jid),this.domain=Strophe.getDomainFromJid(this.connection.jid),this.minimized_chats=new c.MinimizedChats({model:this.chatboxes}),this.features=new this.Features,this.enableCarbons(),this.initStatus(e.proxy(function(){this.chatboxes.onConnected(),this.giveFeedback(k("Online Contacts")),this.callback&&(this.connection.service==="jasmine tests"?this.callback(this):this.callback())},this)),c.emit("ready")},this.OTR=Backbone.Model.extend({getSessionPassphrase:function(){if(c.prebind){var e=b64_sha1(c.connection.jid),t=window.sessionStorage[e];return typeof t=="undefined"&&(t=Math.floor(Math.random()*4294967295).toString(),window.sessionStorage[e]=t),t}return c.connection.pass},generatePrivateKey:function(){var e=new r,t=c.connection.jid;if(c.cache_otr_key){var n=CryptoJS.lib.PasswordBasedCipher,i=this.getSessionPassphrase();typeof i!="undefined"&&(window.sessionStorage[b64_sha1(t+"priv_key")]=n.encrypt(CryptoJS.algo.AES,e.packPrivate(),i).toString(),window.sessionStorage[b64_sha1(t+"instance_tag")]=instance_tag,window.sessionStorage[b64_sha1(t+"pass_check")]=n.encrypt(CryptoJS.algo.AES,"match",i).toString())}return e}}),this.Message=Backbone.Model,this.Messages=Backbone.Collection.extend({model:c.Message}),this.ChatBox=Backbone.Model.extend({initialize:function(){var e=c.applyHeightResistance(this.get("height"));this.get("box_id")!=="controlbox"?(this.messages=new c.Messages,this.messages.browserStorage=new Backbone.BrowserStorage[c.storage](b64_sha1("converse.messages"+this.get("jid")+c.bare_jid)),this.save({box_id:b64_sha1(this.get("jid")),height:e,minimized:this.get("minimized")||!1,otr_status:this.get("otr_status")||h,time_minimized:this.get("time_minimized")||o(),time_opened:this.get("time_opened")||o().valueOf(),user_id:Strophe.getNodeFromJid(this.get("jid")),num_unread:this.get("num_unread")||0,url:""})):this.set({height:e,time_opened:o(0).valueOf(),num_unread:this.get("num_unread")||0})},maximize:function(){this.save({minimized:!1,time_opened:o().valueOf()})},minimize:function(){this.save({minimized:!0,time_minimized:o().format()})},getSession:function(e){var t=CryptoJS.lib.PasswordBasedCipher,i,s,o,u,a;if(c.cache_otr_key){s=c.otr.getSessionPassphrase();if(typeof s!="undefined"){o=window.sessionStorage[b64_sha1(this.id+"instance_tag")],u=window.sessionStorage[b64_sha1(this.id+"priv_key")],a=window.sessionStorage[b64_sha1(this.connection.jid+"pass_check")];if(u&&o&&typeof a!="undefined"){var f=t.decrypt(CryptoJS.algo.AES,u,s),l=r.parsePrivate(f.toString(CryptoJS.enc.Latin1));if(t.decrypt(CryptoJS.algo.AES,a,s).toString(CryptoJS.enc.Latin1)==="match"){this.trigger("showHelpMessages",[k("Re-establishing encrypted session")]),e({key:l,instance_tag:o});return}}}}this.trigger("showHelpMessages",[k("Generating private key."),k("Your browser might become unresponsive.")],null,!0),setTimeout(function(){e({key:c.otr.generatePrivateKey.apply(this),instance_tag:n.makeInstanceTag()})},500)},updateOTRStatus:function(e){switch(e){case n.CONST.STATUS_AKE_SUCCESS:this.otr.msgstate===n.CONST.MSGSTATE_ENCRYPTED&&this.save({otr_status:p});break;case n.CONST.STATUS_END_OTR:this.otr.msgstate===n.CONST.MSGSTATE_FINISHED?this.save({otr_status:v}):this.otr.msgstate===n.CONST.MSGSTATE_PLAINTEXT&&this.save({otr_status:h})}},onSMP:function(e,t){switch(e){case"question":this.otr.smpSecret(prompt(k("Authentication request from %1$s\n\nYour chat contact is attempting to verify your identity, by asking you the question below.\n\n%2$s",[this.get("fullname"),t])));break;case"trust":t===!0?this.save({otr_status:d}):(this.trigger("showHelpMessages",[k("Could not verify this user's identify.")],"error"),this.save({otr_status:p}));break;default:throw new Error("Unknown type.")}},initiateOTR:function(t){this.save({otr_status:h});var r=this.getSession(e.proxy(function(r){this.otr=new n({fragment_size:140,send_interval:200,priv:r.key,instance_tag:r.instance_tag,debug:this.debug}),this.otr.on("status",e.proxy(this.updateOTRStatus,this)),this.otr.on("smp",e.proxy(this.onSMP,this)),this.otr.on("ui",e.proxy(function(e){this.trigger("showReceivedOTRMessage",e)},this)),this.otr.on("io",e.proxy(function(e){this.trigger("sendMessageStanza",e)},this)),this.otr.on("error",e.proxy(function(e){this.trigger("showOTRError",e)},this)),this.trigger("showHelpMessages",[k("Exchanging private key with contact.")]),t?this.otr.receiveMsg(t):this.otr.sendQueryMsg()},this))},endOTR:function(){this.otr&&this.otr.endOtr(),this.save({otr_status:h})},createMessage:function(e){var n=e.children("body").text(),r=e.find("composing"),i=e.find("paused"),s=e.find("delay").length>0,u=this.get("fullname"),a=e.attr("type")==="groupchat",f=e.attr("id"),l,h,p,d;a?d=Strophe.unescapeNode(Strophe.getResourceFromJid(e.attr("from"))):d=Strophe.getBareJidFromJid(e.attr("from")),u=(t.isEmpty(u)?d:u).split(" ")[0],n?(s?(l=e.find("delay").attr("stamp"),h=l):h=o().format(),a&&d===this.get("nick")||!a&&d==c.bare_jid?p="me":p="them",this.messages.create({fullname:u,sender:p,delayed:s,time:h,message:n,msgid:f})):(r.length||i.length)&&this.messages.add({fullname:u,sender:"them",delayed:s,time:o().format(),composing:r.length,paused:i.length})},receiveMessage:function(e){var n=e.children("body"),r=n.length>0?n.text():undefined;if(!r||!c.allow_otr)return this.createMessage(e);r.match(/^\?OTRv23?/)?this.initiateOTR(r):t.contains([p,d],this.get("otr_status"))?this.otr.receiveMsg(r):r.match(/^\?OTR/)?this.otr?this.otr.receiveMsg(r):this.initiateOTR(r):this.createMessage(e)}}),this.ChatBoxView=Backbone.View.extend({length:200,tagName:"div",className:"chatbox",is_chatroom:!1,events:{"click .close-chatbox-button":"close","click .toggle-chatbox-button":"minimize","keypress textarea.chat-textarea":"keyPressed","click .toggle-smiley":"toggleEmoticonMenu","click .toggle-smiley ul li":"insertEmoticon","click .toggle-clear":"clearMessages","click .toggle-otr":"toggleOTRMenu","click .start-otr":"startOTRFromToolbar","click .end-otr":"endOTR","click .auth-otr":"authOTR","click .toggle-call":"toggleCall","mousedown .dragresize-tm":"onDragResizeStart"},initialize:function(){this.model.messages.on("add",this.onMessageAdded,this),this.model.on("show",this.show,this),this.model.on("destroy",this.hide,this),this.model.on("change",this.onChange,this),this.model.on("showOTRError",this.showOTRError,this),this.model.on("buddyStartsOTR",this.buddyStartsOTR,this),this.model.on("showHelpMessages",this.showHelpMessages,this),this.model.on("sendMessageStanza",this.sendMessageStanza,this),this.model.on("showSentOTRMessage",function(e){this.showMessage({message:e,sender:"me"})},this),this.model.on("showReceivedOTRMessage",function(e){this.showMessage({message:e,sender:"them"})},this),this.updateVCard(),this.$el.insertAfter(c.chatboxviews.get("controlbox").$el),this.render().model.messages.fetch({add:!0}),this.model.get("minimized")?this.hide():this.show(),(t.contains([p,d],this.model.get("otr_status"))||c.use_otr_by_default)&&this.model.initiateOTR()},render:function(){return this.$el.attr("id",this.model.get("box_id")).html(c.templates.chatbox(t.extend(this.model.toJSON(),{show_toolbar:c.show_toolbar,label_personal_message:k("Personal message")}))),this.renderToolbar().renderAvatar(),c.emit("chatBoxOpened",this),setTimeout(function(){c.refreshWebkit()},50),this.showStatusMessage()},initDragResize:function(){return this.prev_pageY=0,c.connection.connected&&(this.height=this.model.get("height")),this},showStatusNotification:function(t,n){var r=this.$el.find(".chat-content");n||r.find("div.chat-event").remove(),r.append(e('<div class="chat-event"></div>').text(t)),this.scrollDown()},clearChatRoomMessages:function(e){typeof e!="undefined"&&e.stopPropagation();var t=confirm(k("Are you sure you want to clear the messages from this room?"));return t===!0&&this.$el.find(".chat-content").empty(),this},showMessage:function(t){var n=this.$el.find(".chat-content"),r=o(t.time)||o,i=t.message,s=i.match(/^\/(.*?)(?: (.*))?$/),u=this.model.get("fullname"),a=t.delayed&&"delayed"||"",f,l;s&&s[1]==="me"?(i=i.replace(/^\/me/,""),f=c.templates.action,l=u):(f=c.templates.message,l=t.sender==="me"&&k("me")||u),n.find("div.chat-event").remove(),this.is_chatroom&&t.sender=="them"&&(new RegExp("\\b"+this.model.get("nick")+"\\b")).test(i)&&(a+=" mentioned");var h=f({sender:t.sender,time:r.format("hh:mm"),username:l,message:"",extra_classes:a});n.append(e(h).children(".chat-message-content").first().text(i).addHyperlinks().addEmoticons().parent()),this.scrollDown()},showHelpMessages:function(t,n,r){var i=this.$el.find(".chat-content"),s,o=t.length;for(s=0;s<o;s++)i.append(e('<div class="chat-'+(n||"info")+'">'+t[s]+"</div>"));return r===!0?i.append('<span class="spinner"/>'):r===!1&&i.find("span.spinner").remove(),this.scrollDown()},onMessageAdded:function(e){var n=e.get("time"),r=this.model.messages.pluck("time"),i,s,u,a,f,l;s=t.indexOf(r,n)-1,s>=0&&(i=this.model.messages.at(s),a=o(i.get("time")),a.isBefore(n,"day")&&(u=o(n),this.$el.find(".chat-content").append(c.templates.new_day({isodate:u.format("YYYY-MM-DD"),datestring:u.format("dddd MMM Do YYYY")}))));if(e.get(w)){this.showStatusNotification(e.get("fullname")+" "+k("is typing"));return}if(e.get(E)){this.showStatusNotification(e.get("fullname")+" "+k("has stopped typing"));return}return this.showMessage(t.clone(e.attributes)),e.get("sender")!="me"&&c.windowState=="blur"&&c.incrementMsgCounter(),this.scrollDown()},sendMessageStanza:function(e){var t=(new Date).getTime(),n=this.model.get("jid"),r=$msg({from:c.connection.jid,to:n,type:"chat",id:t}).c("body").t(e).up().c("active",{xmlns:"http://jabber.org/protocol/chatstates"});c.connection.send(r);if(c.forward_messages){var i=$msg({to:c.bare_jid,type:"chat",id:t}).c("forwarded",{xmlns:"urn:xmpp:forward:0"}).c("delay",{xmns:"urn:xmpp:delay",stamp:t}).up().cnode(r.tree());c.connection.send(i)}},sendMessage:function(e){var n=e.replace(/^\s*/,"").match(/^\/(.*)\s*$/),r;if(n){if(n[1]==="clear")return this.clearMessages();if(n[1]==="help"){r=["<strong>/help</strong>:"+k("Show this menu")+"","<strong>/me</strong>:"+k("Write in the third person")+"","<strong>/clear</strong>:"+k("Remove messages")+""],this.showHelpMessages(r);return}if(c.allow_otr&&n[1]==="endotr")return this.endOTR();if(c.allow_otr&&n[1]==="otr")return this.model.initiateOTR()}if(t.contains([p,d],this.model.get("otr_status")))this.model.otr.sendMsg(e),this.model.trigger("showSentOTRMessage",e);else{var i=c.xmppstatus.get("fullname");i=t.isEmpty(i)?c.bare_jid:i,this.model.messages.create({fullname:i,sender:"me",time:o().format(),message:e}),this.sendMessageStanza(e)}},keyPressed:function(t){var n=e(t.target),r,i,s;t.keyCode==m.ENTER?(t.preventDefault(),r=n.val(),n.val("").focus(),r!==""&&(this.model.get("chatroom")?this.sendChatRoomMessage(r):this.sendMessage(r),c.emit("messageSend",r)),this.$el.data("composing",!1)):this.model.get("chatroom")||(s=this.$el.data("composing"),s||(t.keyCode!=47&&(i=$msg({to:this.model.get("jid"),type:"chat"}).c("composing",{xmlns:"http://jabber.org/protocol/chatstates"}),c.connection.send(i)),this.$el.data("composing",!0)))},onDragResizeStart:function(e){if(!c.allow_dragresize)return!0;this.height=this.$el.children(".box-flyout").height(),c.resized_chatbox=this,this.prev_pageY=e.pageY},setChatBoxHeight:function(e){this.model.get("minimized")||(this.$el.children(".box-flyout")[0].style.height=c.applyHeightResistance(e)+"px")},resizeChatBox:function(e){var t=e.pageY-this.prev_pageY;if(!t)return;this.height-=t,this.prev_pageY=e.pageY,this.setChatBoxHeight(this.height)},clearMessages:function(e){e&&e.preventDefault&&e.preventDefault();var t=confirm(k("Are you sure you want to clear the messages from this chat box?"));return t===!0&&(this.$el.find(".chat-content").empty(),this.model.messages.reset(),this.model.messages.browserStorage._clear()),this},insertEmoticon:function(t){t.stopPropagation(),this.$el.find(".toggle-smiley ul").slideToggle(200);var n=this.$el.find("textarea.chat-textarea"),r=n.val(),i=e(t.target);i=i.is("a")?i:i.children("a"),r&&r[r.length-1]!==" "&&(r+=" "),n.focus().val(r+i.data("emoticon")+" ")},toggleEmoticonMenu:function(e){e.stopPropagation(),this.$el.find(".toggle-smiley ul").slideToggle(200)},toggleOTRMenu:function(e){e.stopPropagation(),this.$el.find(".toggle-otr ul").slideToggle(200)},showOTRError:function(e){e=="Message cannot be sent at this time."?this.showHelpMessages([k("Your message could not be sent")],"error"):e=="Received an unencrypted message."?this.showHelpMessages([k("We received an unencrypted message")],"error"):e=="Received an unreadable encrypted message."?this.showHelpMessages([k("We received an unreadable encrypted message")],"error"):this.showHelpMessages(["Encryption error occured: "+e],"error"),console.log("OTR ERROR:"+e)},buddyStartsOTR:function(e){this.showHelpMessages([k("This user has requested an encrypted session.")]),this.model.initiateOTR()},startOTRFromToolbar:function(t){e(t.target).parent().parent().slideUp(),t.stopPropagation(),this.model.initiateOTR()},endOTR:function(e){typeof e!="undefined"&&(e.preventDefault(),e.stopPropagation()),this.model.endOTR()},authOTR:function(t){var n=e(t.target).data().scheme,r,i,s;n==="fingerprint"?(r=confirm(k("Here are the fingerprints, please confirm them with %1$s, outside of this chat.\n\nFingerprint for you, %2$s: %3$s\n\nFingerprint for %1$s: %4$s\n\nIf you have confirmed that the fingerprints match, click OK, otherwise click Cancel.",[this.model.get("fullname"),c.xmppstatus.get("fullname")||c.bare_jid,this.model.otr.priv.fingerprint(),this.model.otr.their_priv_pk.fingerprint()])),r===!0?this.model.save({otr_status:d}):this.model.save({otr_status:p})):n==="smp"?(alert(k("You will be prompted to provide a security question and then an answer to that question.\n\nYour contact will then be prompted the same question and if they type the exact same answer (case sensitive), their identity will be verified.")),i=prompt(k("What is your security question?")),i&&(s=prompt(k("What is the answer to the security question?")),this.model.otr.smpSecret(s,i))):this.showHelpMessages([k("Invalid authentication scheme provided")],"error")},toggleCall:function(e){e.stopPropagation(),c.emit("callButtonClicked",{connection:c.connection,model:this.model})},onChange:function(e,n){if(t.has(e.changed,"chat_status")){var r=e.get("chat_status"),i=e.get("fullname");i=t.isEmpty(i)?e.get("jid"):i,this.$el.is(":visible")&&(r==="offline"?this.showStatusNotification(i+" "+"has gone offline"):r==="away"?this.showStatusNotification(i+" "+"has gone away"):r==="dnd"?this.showStatusNotification(i+" "+"is busy"):r==="online"&&this.$el.find("div.chat-event").remove()),c.emit("contactStatusChanged",e.attributes,e.get("chat_status")),c.emit("buddyStatusChanged",e.attributes,e.get("chat_status"))}t.has(e.changed,"status")&&(this.showStatusMessage(),c.emit("contactStatusMessageChanged",e.attributes,e.get("status")),c.emit("buddyStatusMessageChanged",e.attributes,e.get("status"))),t.has(e.changed,"image")&&this.renderAvatar(),t.has(e.changed,"otr_status")&&this.renderToolbar().informOTRChange(),t.has(e.changed,"minimized")&&(e.get("minimized")?this.hide():this.maximize())},showStatusMessage:function(e){return e=e||this.model.get("status"),typeof e=="string"&&this.$el.find("p.user-custom-message").text(e).attr("title",e),this},close:function(e){return e&&e.preventDefault&&e.preventDefault(),c.connection.connected?this.model.destroy():this.model.trigger("hide"),c.emit("chatBoxClosed",this),this},maximize:function(){this.$el.insertAfter(c.chatboxviews.get("controlbox").$el).show("fast",e.proxy(function(){c.refreshWebkit(),this.focus(),c.emit("chatBoxMaximized",this)},this))},minimize:function(e){e&&e.preventDefault&&e.preventDefault(),this.model.minimize(),this.$el.hide("fast",c.refreshwebkit),c.emit("chatBoxMinimized",this)},updateVCard:function(){var t=this.model.get("jid"),n=c.roster.get(t);n&&!n.get("vcard_updated")&&c.getVCard(t,e.proxy(function(e,t,n,r,i){this.model.save({fullname:t||e,url:i,image_type:r,image:n})},this),e.proxy(function(e){c.log("ChatBoxView.initialize: An error occured while fetching vcard")},this))},informOTRChange:function(){var e=this.model.toJSON(),t=[];return e.otr_status==h?t.push(k("Your messages are not encrypted anymore")):e.otr_status==p?t.push(k("Your messages are now encrypted but your contact's identity has not been verified.")):e.otr_status==d?t.push(k("Your contact's identify has been verified.")):e.otr_status==v&&t.push(k("Your contact has ended encryption on their end, you should do the same.")),this.showHelpMessages(t,"info",!1)},renderToolbar:function(){if(c.show_toolbar){var e=this.model.toJSON();e.otr_status==h?e.otr_tooltip=k("Your messages are not encrypted. Click here to enable OTR encryption."):e.otr_status==p?e.otr_tooltip=k("Your messages are encrypted, but your contact has not been verified."):e.otr_status==d?e.otr_tooltip=k("Your messages are encrypted and your contact verified."):e.otr_status==v&&(e.otr_tooltip=k("Your contact has closed their end of the private session, you should do the same")),this.$el.find(".chat-toolbar").html(c.templates.toolbar(t.extend(e,{FINISHED:v,UNENCRYPTED:h,UNVERIFIED:p,VERIFIED:d,allow_otr:c.allow_otr&&!this.is_chatroom,label_clear:k("Clear all messages"),label_end_encrypted_conversation:k("End encrypted conversation"),label_hide_participants:k("Hide the list of participants"),label_refresh_encrypted_conversation:k("Refresh encrypted conversation"),label_start_call:k("Start a call"),label_start_encrypted_conversation:k("Start encrypted conversation"),label_verify_with_fingerprints:k("Verify with fingerprints"),label_verify_with_smp:k("Verify with SMP"),label_whats_this:k("What's this?"),otr_status_class:A[e.otr_status],otr_translated_status:O[e.otr_status],show_call_button:c.visible_toolbar_buttons.call,show_clear_button:c.visible_toolbar_buttons.clear,show_emoticons:c.visible_toolbar_buttons.emoticons,show_participants_toggle:this.is_chatroom&&c.visible_toolbar_buttons.toggle_participants})))}return this},renderAvatar:function(){if(!this.model.get("image"))return;var t="data:"+this.model.get("image_type")+";base64,"+this.model.get("image"),n=e('<canvas height="31px" width="31px" class="avatar"></canvas>').get(0);if(!n.getContext||!n.getContext("2d"))return this;var r=n.getContext("2d"),i=new Image;return i.onload=function(){var e=i.width/i.height;r.drawImage(i,0,0,35*e,35)},i.src=t,this.$el.find(".chat-title").before(n),this},focus:function(){return this.$el.find(".chat-textarea").focus(),c.emit("chatBoxFocused",this),this},hide:function(){return this.$el.is(":visible")&&this.$el.css("opacity")=="1"&&(this.$el.hide(),c.refreshWebkit()),this},show:function(e){return this.$el.is(":visible")&&this.$el.css("opacity")=="1"?this.focus():(this.$el.fadeIn(e),c.connection.connected&&(this.model.save(),this.initDragResize()),this)},scrollDown:function(){var e=this.$(".chat-content");return e.is(":visible")&&e.scrollTop(e[0].scrollHeight),this}}),this.ContactsPanel=Backbone.View.extend({tagName:"div",className:"controlbox-pane",id:"users",events:{"click a.toggle-xmpp-contact-form":"toggleContactForm","submit form.add-xmpp-contact":"addContactFromForm","submit form.search-xmpp-contact":"searchContacts","click a.subscribe-to-user":"addContactFromList"},initialize:function(e){e.$parent.append(this.$el),this.$tabs=e.$parent.parent().find("#controlbox-tabs")},render:function(){var e,t=c.templates.contacts_panel({label_online:k("Online"),label_busy:k("Busy"),label_away:k("Away"),label_offline:k("Offline"),label_logout:k("Log out"),allow_logout:c.allow_logout});return this.$tabs.append(c.templates.contacts_tab({label_contacts:F})),c.xhr_user_search?e=c.templates.search_contact({label_contact_name:k("Contact name"),label_search:k("Search")}):e=c.templates.add_contact_form({label_contact_username:k("Contact username"),label_add:k("Add")}),c.allow_contact_requests&&(t+=c.templates.add_contact_dropdown({label_click_to_chat:k("Click to add new chat contacts"),label_add_contact:k("Add a contact")})),this.$el.html(t),this.$el.find(".search-xmpp ul").append(e),this},toggleContactForm:function(t){t.preventDefault(),this.$el.find(".search-xmpp").toggle("fast",function(){e(this).is(":visible")&&e(this).find("input.username").focus()})},searchContacts:function(t){t.preventDefault(),e.getJSON(c.xhr_user_search_url+"?q="+e(t.target).find("input.username").val(),function(t){var n=e(".search-xmpp ul");n.find("li.found-user").remove(),n.find("li.chat-info").remove(),t.length||n.append('<li class="chat-info">'+k("No users found")+"</li>"),e(t).each(function(t,r){n.append(e('<li class="found-user"></li>').append(e('<a class="subscribe-to-user" href="#" title="'+k("Click to add as a chat contact")+'"></a>').attr("data-recipient",Strophe.escapeNode(r.id)+"@"+c.domain).text(r.fullname)))})})},addContactFromForm:function(t){t.preventDefault();var n=e(t.target).find("input"),r=n.val();if(!r){n.addClass("error");return}this.addContact(r),e(".search-xmpp").hide()},addContactFromList:function(t){t.preventDefault();var n=e(t.target),r=n.attr("data-recipient"),i=n.text();this.addContact(r,i),n.parent().remove(),e(".search-xmpp").hide()},addContact:function(e,n){n=t.isEmpty(n)?e:n,c.connection.roster.add(e,n,[],function(t){c.connection.roster.subscribe(e,null,c.xmppstatus.get("fullname"))})}}),this.RoomsPanel=Backbone.View.extend({tagName:"div",id:"chatrooms",events:{"submit form.add-chatroom":"createChatRoom","click input#show-rooms":"showRooms","click a.open-room":"createChatRoom","click a.room-info":"showRoomInfo","change input[name=server]":"setDomain","change input[name=nick]":"setNick"},initialize:function(e){this.$parent=e.$parent,this.model.on("change:muc_domain",this.onDomainChange,this),this.model.on("change:nick",this.onNickChange,this)},render:function(){return this.$parent.append(this.$el.html(c.templates.room_panel({server_input_type:c.hide_muc_server&&"hidden"||"text",label_room_name:k("Room name"),label_nickname:k("Nickname"),label_server:k("Server"),label_join:k("Join"),label_show_rooms:k("Show rooms")})).hide()),this.$tabs=this.$parent.parent().find("#controlbox-tabs"),this.$tabs.append(c.templates.chatrooms_tab({label_rooms:k("Rooms")})),this},onDomainChange:function(e){var t=this.$el.find("input.new-chatroom-server");t.val(e.get("muc_domain")),c.auto_list_rooms&&this.updateRoomsList()},onNickChange:function(e){var t=this.$el.find("input.new-chatroom-nick");t.val(e.get("nick"))},informNoRoomsFound:function(){var t=this.$el.find("#available-chatrooms");t.html("<dt>"+k("No rooms on %1$s",this.model.get("muc_domain"))+"</dt>"),e("input#show-rooms").show().siblings("span.spinner").remove()},updateRoomsList:function(){c.connection.muc.listRooms(this.model.get("muc_domain"),e.proxy(function(t){var n,r,i,s,o=this,u=this.$el.find("#available-chatrooms");this.rooms=e(t).find("query").find("item");if(this.rooms.length){u.html("<dt>"+k("Rooms on %1$s",this.model.get("muc_domain"))+"</dt>"),s=document.createDocumentFragment();for(i=0;i<this.rooms.length;i++)n=Strophe.unescapeNode(e(this.rooms[i]).attr("name")||e(this.rooms[i]).attr("jid")),r=e(this.rooms[i]).attr("jid"),s.appendChild(e(c.templates.room_item({name:n,jid:r,open_title:k("Click to open this room"),info_title:k("Show more information on this room")}))[0]);u.append(s),e("input#show-rooms").show().siblings("span.spinner").remove()}else this.informNoRoomsFound();return!0},this),e.proxy(function(e){this.informNoRoomsFound()},this))},showRooms:function(t){var n=this.$el.find("#available-chatrooms"),r=this.$el.find("input.new-chatroom-server"),i=r.val();if(!i){r.addClass("error");return}this.$el.find("input.new-chatroom-name").removeClass("error"),r.removeClass("error"),n.empty(),e("input#show-rooms").hide().after('<span class="spinner"/>'),this.model.save({muc_domain:i}),this.updateRoomsList()},showRoomInfo:function(n){var r=n.target,i=e(r).parent("dd"),s=i.find("div.room-info");s.length?s.remove():(i.find("span.spinner").remove(),i.append('<span class="spinner hor_centered"/>'),c.connection.disco.info(e(r).attr("data-room-jid"),null,e.proxy(function(n){var r=e(n);i.find("span.spinner").replaceWith(c.templates.room_description({desc:r.find('field[var="muc#roominfo_description"] value').text(),occ:r.find('field[var="muc#roominfo_occupants"] value').text(),hidden:r.find('feature[var="muc_hidden"]').length,membersonly:r.find('feature[var="muc_membersonly"]').length,moderated:r.find('feature[var="muc_moderated"]').length,nonanonymous:r.find('feature[var="muc_nonanonymous"]').length,open:r.find('feature[var="muc_open"]').length,passwordprotected:r.find('feature[var="muc_passwordprotected"]').length,persistent:r.find('feature[var="muc_persistent"]').length,publicroom:r.find('feature[var="muc_public"]').length,semianonymous:r.find('feature[var="muc_semianonymous"]').length,temporary:r.find('feature[var="muc_temporary"]').length,unmoderated:r.find('feature[var="muc_unmoderated"]').length,label_desc:k("Description:"),label_occ:k("Occupants:"),label_features:k("Features:"),label_requires_auth:k("Requires authentication"),label_hidden:k("Hidden"),label_requires_invite:k("Requires an invitation"),label_moderated:k("Moderated"),label_non_anon:k("Non-anonymous"),label_open_room:k("Open room"),label_permanent_room:k("Permanent room"),label_public:k("Public"),label_semi_anon:t("Semi-anonymous"),label_temp_room:t("Temporary room"),label_unmoderated:k("Unmoderated")}))},this)))},createChatRoom:function(t){t.preventDefault();var n,r,i,s,o,u=this.$el.find("input.new-chatroom-nick"),a=u.val(),f;a?u.removeClass("error"):u.addClass("error");if(t.type==="click")o=e(t.target).attr("data-room-jid");else{r=this.$el.find("input.new-chatroom-name"),s=this.$el.find("input.new-chatroom-server"),i=s.val(),n=r.val().trim().toLowerCase(),r.val("");if(!n||!i){n||r.addClass("error"),i||s.addClass("error");return}o=Strophe.escapeNode(n)+"@"+i,r.removeClass("error"),s.removeClass("error"),this.model.save({muc_domain:i})}if(!a)return;f=c.chatboxviews.showChat({id:o,jid:o,name:Strophe.unescapeNode(Strophe.getNodeFromJid(o)),nick:a,chatroom:!0,box_id:b64_sha1(o)})},setDomain:function(e){this.model.save({muc_domain:e.target.value})},setNick:function(e){this.model.save({nick:e.target.value})}}),this.ControlBoxView=c.ChatBoxView.extend({tagName:"div",className:"chatbox",id:"controlbox",events:{"click a.close-chatbox-button":"close","click ul#controlbox-tabs li a":"switchTab","mousedown .dragresize-tm":"onDragResizeStart"},initialize:function(){this.$el.insertAfter(c.controlboxtoggle.$el),this.model.on("change:connected",this.onConnected,this),this.model.on("destroy",this.hide,this),this.model.on("hide",this.hide,this),this.model.on("show",this.show,this),this.model.on("change:closed",this.ensureClosedState,this),this.render(),this.model.get("connected")&&this.initRoster(),this.model.get("closed")?this.hide():this.show()},onConnected:function(){if(this.model.get("connected")){this.render().initRoster(),c.features.off("add",this.featureAdded,this),c.features.on("add",this.featureAdded,this);var e=c.features.findWhere({"var":"http://jabber.org/protocol/muc"});e&&this.featureAdded(e)}},initRoster:function(){c.roster=new c.RosterContacts,c.roster.browserStorage=new Backbone.BrowserStorage[c.storage](b64_sha1("converse.contacts-"+c.bare_jid));var e=new c.RosterGroups;return e.browserStorage=new Backbone.BrowserStorage[c.storage](b64_sha1("converse.roster.groups"+c.bare_jid)),c.rosterview=new c.RosterView({model:e}),this.contactspanel.$el.append(c.rosterview.$el),c.rosterview.render().fetch().update(),this},render:function(){return!c.connection.connected||!c.connection.authenticated||c.connection.disconnecting?this.renderLoginPanel():(!this.contactspanel||!this.contactspanel.$el.is(":visible"))&&this.renderContactsPanel(),this},renderLoginPanel:function(){this.$el.html(c.templates.controlbox(this.model.toJSON()));var e={$parent:this.$el.find(".controlbox-panes"),model:this};this.loginpanel?this.loginpanel.delegateEvents().initialize(e):this.loginpanel=new c.LoginPanel(e),this.loginpanel.render(),this.initDragResize()},renderContactsPanel:function(){var e;this.$el.html(c.templates.controlbox(this.model.toJSON())),this.contactspanel=new c.ContactsPanel({$parent:this.$el.find(".controlbox-panes")}),this.contactspanel.render(),c.xmppstatusview=new c.XMPPStatusView({model:c.xmppstatus}),c.xmppstatusview.render(),c.allow_muc&&(this.roomspanel=new c.RoomsPanel({$parent:this.$el.find(".controlbox-panes"),model:new(Backbone.Model.extend({id:b64_sha1("converse.roomspanel"+c.bare_jid),browserStorage:new Backbone.BrowserStorage[c.storage](b64_sha1("converse.roomspanel"+c.bare_jid))}))}),this.roomspanel.render().model.fetch(),this.roomspanel.model.get("nick")||this.roomspanel.model.save({nick:Strophe.getNodeFromJid(c.bare_jid)})),this.initDragResize()},close:function(e){return e&&e.preventDefault&&e.preventDefault(),c.connection.connected?this.model.save({closed:!0}):this.model.trigger("hide"),c.emit("controlBoxClosed",this),this},ensureClosedState:function(){this.model.get("closed")?this.hide():this.show()},hide:function(e){return this.$el.hide("fast",function(){c.refreshWebkit(),c.emit("chatBoxClosed",this),c.controlboxtoggle.show(function(){typeof e=="function"&&e()})}),this},show:function(){return c.controlboxtoggle.hide(e.proxy(function(){this.$el.show("fast",function(){c.rosterview&&c.rosterview.update(),c.refreshWebkit()}.bind(this)),c.emit("controlBoxOpened",this)},this)),this},featureAdded:function(e){if(e.get("var")=="http://jabber.org/protocol/muc"&&c.allow_muc){this.roomspanel.model.save({muc_domain:e.get("from")});var t=this.$el.find("input.new-chatroom-server");t.is(":focus")||t.val(this.roomspanel.model.get("muc_domain"))}},switchTab:function(t){t.preventDefault();var n=e(t.target),r=n.parent().siblings("li").children("a"),i=e(n.attr("href"));e(r.attr("href")).hide(),r.removeClass("current"),n.addClass("current"),i.show()},showHelpMessages:function(e){return}}),this.ChatRoomOccupant=Backbone.Model,this.ChatRoomOccupantView=Backbone.View.extend({tagName:"li",initialize:function(){this.model.on("change",this.render,this),this.model.on("destroy",this.destroy,this)},render:function(){var e=c.templates.occupant(t.extend(this.model.toJSON(),{desc_moderator:k("This user is a moderator"),desc_participant:k("This user can send messages in this room"),desc_visitor:k("This user can NOT send messages in this room")}));return this.$el.replaceWith(e),this.setElement(e,!0),this},destroy:function(){this.$el.remove()}}),this.ChatRoomOccupants=Backbone.Collection.extend({model:c.ChatRoomOccupant,initialize:function(e){this.browserStorage=new Backbone.BrowserStorage[c.storage](b64_sha1("converse.occupants"+c.bare_jid+e.nick))}}),this.ChatRoomOccupantsView=Backbone.Overview.extend({tagName:"div",className:"participants",initialize:function(){this.model.on("add",this.onOccupantAdded,this)},render:function(){return this.$el.html(c.templates.chatroom_sidebar({label_invitation:k("Invite..."),label_occupants:k("Occupants")})),this.initInviteWidget()},onOccupantAdded:function(e){var t=this.get(e.get("id"));t?(delete t.model,t.model=e,t.initialize()):t=this.add(e.get("id"),new c.ChatRoomOccupantView({model:e})),this.$(".participant-list").append(t.render().$el)},onChatRoomRoster:function(e,n){var r=t.size(e),i=this.$(".participant-list"),s=[],o=t.keys(e),u,a,f,l;for(f=0;f<r;f++)l=Strophe.unescapeNode(o[f]),a={id:l,role:e[o[f]].role,nick:l},u=this.model.get(l),u?u.save(a):this.model.create(a);return t.each(t.difference(this.model.pluck("id"),o),function(e){this.model.get(e).destroy()},this),!0},initInviteWidget:function(){var n=this.$("input.invited-contact");return n.typeahead({minLength:1,highlight:!0},{name:"contacts-dataset",source:function(e,n){var r=[];t.each(c.roster.filter(a(["fullname","jid"],e)),function(e){r.push({value:e.get("fullname"),jid:e.get("jid")})}),n(r)},templates:{suggestion:t.template('<p data-jid="{{jid}}">{{value}}</p>')}}),n.on("typeahead:selected",e.proxy(function(t,n,r){var i=prompt(k(L('You are about to invite %1$s to the chat room "%2$s". '),n.value,this.model.get("id"))+k("You may optionally include a message, explaining the reason for the invitation."));i!==null&&(c.connection.muc.rooms[this.chatroomview.model.get("id")].directInvite(n.jid,i),c.emit("roomInviteSent",this,n.jid,i)),e(t.target).typeahead("val","")},this)),this}}),this.ChatRoomView=c.ChatBoxView.extend({length:300,tagName:"div",className:"chatroom",events:{"click .close-chatbox-button":"close","click .toggle-chatbox-button":"minimize","click .configure-chatroom-button":"configureChatRoom","click .toggle-smiley":"toggleEmoticonMenu","click .toggle-smiley ul li":"insertEmoticon","click .toggle-clear":"clearChatRoomMessages","click .toggle-participants a":"toggleOccupants","keypress textarea.chat-textarea":"keyPressed","mousedown .dragresize-tm":"onDragResizeStart"},is_chatroom:!0,initialize:function(){this.model.messages.on("add",this.onMessageAdded,this),this.model.on("change:minimized",function(e){e.get("minimized")?this.hide():this.maximize()},this),this.model.on("destroy",function(t,n,r){this.hide(),c.connection.muc.leave(this.model.get("jid"),this.model.get("nick"),e.proxy(this.onLeave,this),undefined)},this),this.occupantsview=new c.ChatRoomOccupantsView({model:new c.ChatRoomOccupants({nick:this.model.get("nick")})}),this.occupantsview.chatroomview=this,this.render(),this.occupantsview.model.fetch({add:!0}),this.connect(null),c.emit("chatRoomOpened",this),this.$el.insertAfter(c.chatboxviews.get("controlbox").$el),this.model.messages.fetch({add:!0}),this.model.get("minimized")?this.hide():this.show()},render:function(){return this.$el.attr("id",this.model.get("box_id")).html(c.templates.chatroom(this.model.toJSON())),this.renderChatArea(),setTimeout(function(){c.refreshWebkit()},50),this},renderChatArea:function(){return this.$(".chat-area").length||(this.$(".chat-body").empty().append(c.templates.chatarea({show_toolbar:c.show_toolbar,label_message:k("Message")})).append(this.occupantsview.render().$el),this.renderToolbar()),this.model.set({hidden_occupants:!this.model.get("hidden_occupants")}),this.toggleOccupants(),this},toggleOccupants:function(t){t&&(t.preventDefault(),t.stopPropagation());var n=this.$(".icon-hide-users");this.model.get("hidden_occupants")?(this.model.save({hidden_occupants:!1}),n.removeClass("icon-show-users").addClass("icon-hide-users"),this.$(".chat-area, form.sendXMPPMessage").css({width:""}),this.$("div.participants").show().animate({width:"auto"},e.proxy(function(){this.scrollDown()},this))):(this.model.save({hidden_occupants:!0}),n.removeClass("icon-hide-users").addClass("icon-show-users"),this.$("form.sendXMPPMessage, .chat-area").animate({width:"100%"}),this.$("div.participants").animate({width:0},e.proxy(function(){this.scrollDown()},this)))},onCommandError:function(e){this.showStatusNotification(k("Error: could not execute the command"),!0)},createChatRoomMessage:function(e){var n=c.xmppstatus.get("fullname");this.model.messages.create({fullname:t.isEmpty(n)?c.bare_jid:n,sender:"me",time:o().format(),message:e,msgid:c.connection.muc.groupchat(this.model.get("jid"),e,undefined,String((new Date).getTime()))})},sendChatRoomMessage:function(t){var n=t.replace(/^\s*/,"").match(/^\/(.*?)(?: (.*))?$/)||[!1],r;switch(n[1]){case"ban":r=n[2].splitOnce(" "),c.connection.muc.ban(this.model.get("jid"),r[0],r[1],undefined,e.proxy(this.onCommandError,this));break;case"clear":this.clearChatRoomMessages();break;case"deop":r=n[2].splitOnce(" "),c.connection.muc.deop(this.model.get("jid"),r[0],r[1],undefined,e.proxy(this.onCommandError,this));break;case"help":this.showHelpMessages(["<strong>/ban</strong>: "+k("Ban user from room"),"<strong>/clear</strong>: "+k("Remove messages"),"<strong>/help</strong>: "+k("Show this menu"),"<strong>/kick</strong>: "+k("Kick user from room"),"<strong>/me</strong>: "+k("Write in 3rd person"),"<strong>/mute</strong>: "+k("Remove user's ability to post messages"),"<strong>/nick</strong>: "+k("Change your nickname"),"<strong>/topic</strong>: "+k("Set room topic"),"<strong>/voice</strong>: "+k("Allow muted user to post messages")]);break;case"kick":r=n[2].splitOnce(" "),c.connection.muc.kick(this.model.get("jid"),r[0],r[1],undefined,e.proxy(this.onCommandError,this));break;case"mute":r=n[2].splitOnce(" "),c.connection.muc.mute(this.model.get("jid"),r[0],r[1],undefined,e.proxy(this.onCommandError,this));break;case"nick":c.connection.muc.changeNick(this.model.get("jid"),n[2]);break;case"op":r=n[2].splitOnce(" "),c.connection.muc.op(this.model.get("jid"),r[0],r[1],undefined,e.proxy(this.onCommandError,this));break;case"topic":c.connection.muc.setTopic(this.model.get("jid"),n[2]);break;case"voice":r=n[2].splitOnce(" "),c.connection.muc.voice(this.model.get("jid"),r[0],r[1],undefined,e.proxy(this.onCommandError,this));break;default:this.createChatRoomMessage(t)}},connect:function(n){t.has(c.connection.muc.rooms,this.model.get("jid"))?c.connection.muc.join(this.model.get("jid"),this.model.get("nick"),null,null,null,n):c.connection.muc.join(this.model.get("jid"),this.model.get("nick"),e.proxy(this.onChatRoomMessage,this),e.proxy(this.onChatRoomPresence,this),e.proxy(this.onChatRoomRoster,this),n)},onLeave:function(){this.model.set("connected",!1)},renderConfigurationForm:function(t){var n=this.$el.find("form.chatroom-form"),r=e(t),i=r.find("field"),s=r.find("title").text(),o=r.find("instructions").text(),u,a,f=[],l,h,p=[],d,v,m={"text-private":"password","text-single":"textline",fixed:"label","boolean":"checkbox",hidden:"hidden","jid-multi":"textarea","list-single":"dropdown","list-multi":"dropdown"};n.find("span.spinner").remove(),n.append(e("<legend>").text(s)),o!=s&&n.append(e("<p>").text(o));for(u=0;u<i.length;u++){l=e(i[u]);if(l.attr("type")=="list-single"||l.attr("type")=="list-multi"){p=[],d=l.children("value");for(a=0;a<d.length;a++)p.push(e(d[a]).text());f=[],h=l.children("option");for(a=0;a<h.length;a++)v=e(h[a]).find("value").text(),f.push(c.templates.select_option({value:v,label:e(h[a]).attr("label"),selected:p.indexOf(v)>=0}));n.append(c.templates.form_select({name:l.attr("var"),label:l.attr("label"),options:f.join(""),multiple:l.attr("type")=="list-multi"}))}else l.attr("type")=="fixed"?n.append(e("<p>").text(l.find("value").text())):l.attr("type")=="jid-multi"?n.append(c.templates.form_textarea({name:l.attr("var"),label:l.attr("label")||"",value:l.find("value").text()})):l.attr("type")=="boolean"?n.append(c.templates.form_checkbox({name:l.attr("var"),type:m[l.attr("type")],label:l.attr("label")||"",checked:l.find("value").text()==="1"&&'checked="1"'||""})):n.append(c.templates.form_input({name:l.attr("var"),type:m[l.attr("type")],label:l.attr("label")||"",value:l.find("value").text()}))}n.append('<input type="submit" value="'+k("Save")+'"/>'),n.append('<input type="button" value="'+k("Cancel")+'"/>'),n.on("submit",e.proxy(this.saveConfiguration,this)),n.find("input[type=button]").on("click",e.proxy(this.cancelConfiguration,this))},saveConfiguration:function(t){t.preventDefault();var n=this,r=e(t.target).find(":input:not([type=button]):not([type=submit])"),i=r.length,s=[];r.each(function(){var t=e(this),r;if(t.is("[type=checkbox]"))r=t.is(":checked")&&1||0;else if(t.is("textarea")){r=[];var o=t.val().split("\n");for(var u=0;u<o.length;u++){var a=e.trim(o[u]);if(a==="")continue;r.push(a)}}else r=t.val();var f=e(c.templates.field({name:t.attr("name"),value:r}))[0];s.push(f),--i||c.connection.muc.saveConfiguration(n.model.get("jid"),s,e.proxy(n.onConfigSaved,n),e.proxy(n.onErrorConfigSaved,n))}),this.$el.find("div.chatroom-form-container").hide(function(){e(this).remove(),n.$el.find(".chat-area").show(),n.$el.find(".participants").show()})},onConfigSaved:function(e){},onErrorConfigSaved:function(e){this.showStatusNotification(k("An error occurred while trying to save the form."))},cancelConfiguration:function(t){t.preventDefault();var n=this;this.$el.find("div.chatroom-form-container").hide(function(){e(this).remove(),n.$el.find(".chat-area").show(),n.$el.find(".participants").show()})},configureChatRoom:function(t){t.preventDefault();if(this.$el.find("div.chatroom-form-container").length)return;this.$(".chat-body").children().hide(),this.$(".chat-body").append(e('<div class="chatroom-form-container"><form class="chatroom-form"><span class="spinner centered"/></form></div>')),c.connection.muc.configure(this.model.get("jid"),e.proxy(this.renderConfigurationForm,this))},submitPassword:function(e){e.preventDefault();var t=this.$el.find(".chatroom-form").find("input[type=password]").val();this.$el.find(".chatroom-form-container").replaceWith('<span class="spinner centered"/>'),this.connect(t)},renderPasswordForm:function(){this.$(".chat-body").children().hide(),this.$("span.centered.spinner").remove(),this.$(".chat-body").append(c.templates.chatroom_password_form({heading:k("This chatroom requires a password"),label_password:k("Password: "),label_submit:k("Submit")})),this.$(".chatroom-form").on("submit",e.proxy(this.submitPassword,this))},showDisconnectMessage:function(t){this.$(".chat-area").hide(),this.$(".participants").hide(),this.$("span.centered.spinner").remove(),this.$(".chat-body").append(e("<p>"+t+"</p>"))},infoMessages:{100:k("This room is not anonymous"),102:k("This room now shows unavailable members"),103:k("This room does not show unavailable members"),104:k("Non-privacy-related room configuration has changed"),170:k("Room logging is now enabled"),171:k("Room logging is now disabled"),172:k("This room is now non-anonymous"),173:k("This room is now semi-anonymous"),174:k("This room is now fully-anonymous"),201:k("A new room has been created")},disconnectMessages:{301:k("You have been banned from this room"),307:k("You have been kicked from this room"),321:k("You have been removed from this room because of an affiliation change"),322:k("You have been removed from this room because the room has changed to members-only and you're not a member"),332:k("You have been removed from this room because the MUC (Multi-user chat) service is being shut down.")},actionInfoMessages:{301:L("<strong>%1$s</strong> has been banned"),303:L("<strong>%1$s</strong>'s nickname has changed"),307:L("<strong>%1$s</strong> has been kicked out"),321:L("<strong>%1$s</strong> has been removed because of an affiliation change"),322:L("<strong>%1$s</strong> has been removed for not being a member")},newNicknameMessages:{210:L("Your nickname has been automatically changed to: <strong>%1$s</strong>"),303:L("Your nickname has been changed to: <strong>%1$s</strong>")},showStatusMessages:function(n,r){var s,o=[],u=[],a=[];n.find('x[xmlns="'+Strophe.NS.MUC_USER+'"]').each(e.proxy(function(i,s){var f=e(s).find("item");Strophe.getBareJidFromJid(f.attr("jid"))===c.bare_jid&&f.attr("affiliation")==="owner"&&this.$el.find("a.configure-chatroom-button").show(),e(s).find("item reason").each(function(t,n){e(n).text()&&a.push(e(n).text())}),e(s).find("status").each(e.proxy(function(i,s){var a=s.getAttribute("code");r&&t.contains(t.keys(this.newNicknameMessages),a)?(this.model.save({nick:Strophe.getResourceFromJid(n.attr("from"))}),u.push(k(this.newNicknameMessages[a],f.attr("nick")))):r&&t.contains(t.keys(this.disconnectMessages),a)?o.push(this.disconnectMessages[a]):!r&&t.contains(t.keys(this.actionInfoMessages),a)?u.push(k(this.actionInfoMessages[a],Strophe.unescapeNode(Strophe.getResourceFromJid(n.attr("from"))))):t.contains(t.keys(this.infoMessages),a)?u.push(this.infoMessages[a]):a!=="110"&&e(s).text()&&u.push(e(s).text())},this))},this));if(o.length>0){for(i=0;i<o.length;i++)this.showDisconnectMessage(o[i]);for(i=0;i<a.length;i++)this.showDisconnectMessage(k('The reason given is: "'+a[i]+'"'),!0);this.model.set("connected",!1);return}s=this.$el.find(".chat-content");for(i=0;i<u.length;i++)s.append(c.templates.info({message:u[i]}));for(i=0;i<a.length;i++)this.showStatusNotification(k('The reason given is: "'+a[i]+'"'),!0);return this.scrollDown()},showErrorMessage:function(e,t){delete c.connection.muc[t.name],e.attr("type")=="auth"?e.find("not-authorized").length?this.renderPasswordForm():e.find("registration-required").length?this.showDisconnectMessage(k("You are not on the member list of this room")):e.find("forbidden").length&&this.showDisconnectMessage(k("You have been banned from this room")):e.attr("type")=="modify"?e.find("jid-malformed").length&&this.showDisconnectMessage(k("No nickname was specified")):e.attr("type")=="cancel"&&(e.find("not-allowed").length?this.showDisconnectMessage(k("You are not allowed to create new rooms")):e.find("not-acceptable").length?this.showDisconnectMessage(k("Your nickname doesn't conform to this room's policies")):e.find("conflict").length?this.showDisconnectMessage(k("Your nickname is already taken")):e.find("item-not-found").length?this.showDisconnectMessage(k("This room does not (yet) exist")):e.find("service-unavailable").length&&this.showDisconnectMessage(k("This room has reached it's maximum number of occupants")))},onChatRoomPresence:function(t,n){var r=e(t),i;return r.attr("type")==="error"?(this.model.set("connected",!1),this.showErrorMessage(r.find("error"),n)):(i=r.find("status[code='110']").length||r.attr("from")==n.name+"/"+Strophe.escapeNode(n.nick),this.model.get("conneced")||(this.model.set("connected",!0),this.$("span.centered.spinner").remove(),this.$el.find(".chat-body").children().show()),this.showStatusMessages(r,i)),!0},onChatRoomMessage:function(t){var n=e(t),r=n.children("body").text(),i=n.attr("from"),s=n.attr("id"),o=Strophe.getResourceFromJid(i),u=o&&Strophe.unescapeNode(o)||"",a=n.find("delay").length>0,l=n.children("subject").text();return s&&this.model.messages.findWhere({msgid:s})?!0:(this.showStatusMessages(n),l&&(this.$el.find(".chatroom-topic").text(l).attr("title",l),this.$el.find(".chat-content").append(c.templates.info({message:k("Topic set by %1$s to: %2$s",u,l)}))),u===""?!0:(this.model.createMessage(n),!a&&u!==this.model.get("nick")&&(new RegExp("\\b"+this.model.get("nick")+"\\b")).test(r)&&f(),u!==this.model.get("nick")&&c.emit("message",t),!0))},onChatRoomRoster:function(e,t){return this.occupantsview.onChatRoomRoster(e,t)}}),this.ChatBoxes=Backbone.Collection.extend({model:c.ChatBox,comparator:"time_opened",registerMessageHandler:function(){c.connection.addHandler(e.proxy(function(e){return this.onMessage(e),!0},this),null,"message","chat"),c.connection.addHandler(e.proxy(function(e){return this.onInvite(e),!0},this),"jabber:x:conference","message")},onConnected:function(){this.browserStorage=new Backbone.BrowserStorage[c.storage](b64_sha1("converse.chatboxes-"+c.bare_jid)),this.registerMessageHandler(),this.fetch({add:!0,success:e.proxy(function(e,n){t.include(t.pluck(n,"id"),"controlbox")||this.add({id:"controlbox",box_id:"controlbox"}),this.get("controlbox").save({connected:!0})},this)})},isOnlyChatStateNotification:function(e){return e.find("body").length===0&&(e.find(b).length!==0||e.find(w).length!==0||e.find(y).length!==0||e.find(E).length!==0||e.find(S).length!==0)},onInvite:function(t){var n=e(t),r=n.children('x[xmlns="jabber:x:conference"]'),i=Strophe.getBareJidFromJid(n.attr("from")),s=r.attr("jid"),o=r.attr("reason"),u=c.roster.get(i),a;o?a=confirm(k(L('%1$s has invited you to join a chat room: %2$s, and left the following reason: "%3$s"'),u.get("fullname"),s,o)):a=confirm(k(L("%1$s has invited you to join a chat room: %2$s"),u.get("fullname"),s));if(a===!0){var f=c.chatboxviews.showChat({id:s,jid:s,name:Strophe.unescapeNode(Strophe.getNodeFromJid(s)),nick:Strophe.unescapeNode(Strophe.getNodeFromJid(c.connection.jid)),chatroom:!0,box_id:b64_sha1(s),password:r.attr("password")});f.get("connected")||c.chatboxviews.get(s).connect(null)}},onMessage:function(n){var r=e(n),i,s,o,u,a=r.attr("id"),l,h,p,d=r.attr("from");if(d===c.connection.jid)return!0;s=r.children("forwarded"),o=r.children('received[xmlns="urn:xmpp:carbons:2"]'),u=r.children('sent[xmlns="urn:xmpp:carbons:2"]'),s.length?r=s.children("message"):o.length?(r=o.children("forwarded").children("message"),d=r.attr("from")):u.length&&(r=u.children("forwarded").children("message"),d=r.attr("from"));var v=Strophe.getBareJidFromJid(d),m=Strophe.getBareJidFromJid(r.attr("to"));v==c.bare_jid?(i=m,h=Strophe.getResourceFromJid(r.attr("to"))):(i=v,h=Strophe.getResourceFromJid(d)),p=c.roster.get(i);if(p===undefined)return c.log("Could not get roster item for JID "+i,"error"),!0;l=this.get(i);if(!l){var g=p.get("fullname");g=t.isEmpty(g)?i:g,l=this.create({id:i,jid:i,fullname:g,image_type:p.get("image_type"),image:p.get("image"),url:p.get("url")})}return a&&l.messages.findWhere({msgid:a})?!0:(!this.isOnlyChatStateNotification(r)&&v!==c.bare_jid&&f(),l.receiveMessage(r),c.roster.addResource(i,h),c.emit("message",n),!0)}}),this.ChatBoxViews=Backbone.Overview.extend({initialize:function(){this.model.on("add",this.onChatBoxAdded,this),this.model.on("change:minimized",function(e){e.get("minimized")===!1?this.trimChats(this.get(e.get("id"))):this.trimChats()},this)},_ensureElement:function(){if(!this.el){var n=e("#conversejs");n.length||(n=e('<div id="conversejs">'),e("body").append(n)),n.html(c.templates.chats_panel()),this.setElement(n,!1)}else this.setElement(t.result(this,"el"),!1)},onChatBoxAdded:function(e){var t=this.get(e.get("id"));t?(delete t.model,t.model=e,t.initialize()):(e.get("chatroom")?t=new c.ChatRoomView({model:e}):e.get("box_id")==="controlbox"?t=new c.ControlBoxView({model:e}):t=new c.ChatBoxView({model:e}),this.add(e.get("id"),t)),this.trimChats(t)},trimChats:function(e){if(c.no_trimming||this.model.length<=1)return;var n,r=0,i=c.minimized_chats.$el,s=t.contains(this.model.pluck("minimized"),!0)?i.outerWidth(!0):0,o=e?e.$el.outerWidth(!0):0,u=e?e.model.get("id"):null,a=this.get("controlbox");!a||!a.$el.is(":visible")?r=c.controlboxtoggle.$el.outerWidth(!0):r=a.$el.outerWidth(!0),t.each(this.getAll(),function(e){var t=e.model.get("id");t!=="controlbox"&&t!==u&&!e.model.get("minimized")&&e.$el.is(":visible")&&(o+=e.$el.outerWidth(!0))}),s+o+r>this.$el.outerWidth(!0)&&(n=this.getOldestMaximizedChat(),n&&n.minimize())},getOldestMaximizedChat:function(){var e=0,t=this.model.sort().at(e);while(t.get("id")==="controlbox"||t.get("minimized")===!0){e++,t=this.model.at(e);if(!t)return null}return t},closeAllChatBoxes:function(t){var n,r;return this.model.each(e.proxy(function(e){var n=e.get("id");(t||n!=="controlbox")&&this.get(n).close()},this)),this},showChat:function(e){var t=this.model.get(e.jid);return t||(t=this.model.create(e,{error:function(e,t){c.log(t.responseText)}})),t.get("minimized")?t.maximize():t.trigger("show"),t}}),this.MinimizedChatBoxView=Backbone.View.extend({tagName:"div",className:"chat-head",events:{"click .close-chatbox-button":"close","click .restore-chat":"restore"},initialize:function(){this.model.messages.on("add",function(e){!e.get("composing")&&!e.get("paused")&&this.updateUnreadMessagesCounter()},this),this.model.on("change:minimized",this.clearUnreadMessagesCounter,this),this.model.on("showReceivedOTRMessage",this.updateUnreadMessagesCounter,this),this.model.on("showSentOTRMessage",this.updateUnreadMessagesCounter,this)},render:function(){var e=t.extend(this.model.toJSON(),{tooltip:k("Click to restore this chat")});return this.model.get("chatroom")?(e.title=this.model.get("name"),this.$el.addClass("chat-head-chatroom")):(e.title=this.model.get("fullname"),this.$el.addClass("chat-head-chatbox")),this.$el.html(c.templates.trimmed_chat(e))},clearUnreadMessagesCounter:function(){this.model.set({num_unread:0}),this.render()},updateUnreadMessagesCounter:function(){this.model.set({num_unread:this.model.get("num_unread")+1}),this.render()},close:function(e){return e&&e.preventDefault&&e.preventDefault(),this.remove(),this.model.destroy(),c.emit("chatBoxClosed",this),this},restore:t.debounce(function(e){e&&e.preventDefault&&e.preventDefault(),this.model.messages.off("add",null,this),this.remove(),this.model.maximize()},200)}),this.MinimizedChats=Backbone.Overview.extend({el:"#minimized-chats",events:{"click #toggle-minimized-chats":"toggle"},initialize:function(){this.initToggle(),this.model.on("add",this.onChanged,this),this.model.on("destroy",this.removeChat,this),this.model.on("change:minimized",this.onChanged,this),this.model.on("change:num_unread",this.updateUnreadMessagesCounter,this)},tearDown:function(){return this.model.off("add",this.onChanged),this.model.off("destroy",this.removeChat),this.model.off("change:minimized",this.onChanged),this.model.off("change:num_unread",this.updateUnreadMessagesCounter),this},initToggle:function(){this.toggleview=new c.MinimizedChatsToggleView({model:new c.MinimizedChatsToggle});var e=b64_sha1("converse.minchatstoggle"+c.bare_jid);this.toggleview.model.id=e,this.toggleview.model.browserStorage=new Backbone.BrowserStorage[c.storage](e),this.toggleview.model.fetch()},render:function(){return this.keys().length===0?this.$el.hide("fast"):this.keys().length===1&&this.$el.show("fast"),this.$el},toggle:function(e){e&&e.preventDefault&&e.preventDefault(),this.toggleview.model.save({collapsed:!this.toggleview.model.get("collapsed")}),this.$(".minimized-chats-flyout").toggle()},onChanged:function(e){e.get("id")!=="controlbox"&&e.get("minimized")?this.addChat(e):this.get(e.get("id"))&&this.removeChat(e)},addChat:function(e){var t=this.get(e.get("id"));if(t&&t.$el.parent().length!==0)return;var n=new c.MinimizedChatBoxView({model:e});this.$(".minimized-chats-flyout").append(n.render()),this.add(e.get("id"),n),this.toggleview.model.set({num_minimized:this.keys().length}),this.render()},removeChat:function(e){this.remove(e.get("id")),this.toggleview.model.set({num_minimized:this.keys().length}),this.render()},updateUnreadMessagesCounter:function(){var e=this.model.pluck("num_unread"),t=0,n;for(n=0;n<e.length;n++)t+=e[n];this.toggleview.model.set({num_unread:t}),this.render()}}),this.MinimizedChatsToggle=Backbone.Model.extend({initialize:function(){this.set({collapsed:this.get("collapsed")||!1,num_minimized:this.get("num_minimized")||0,num_unread:this.get("num_unread")||0})}}),this.MinimizedChatsToggleView=Backbone.View.extend({el:"#toggle-minimized-chats",initialize:function(){this.model.on("change:num_minimized",this.render,this),this.model.on("change:num_unread",this.render,this),this.$flyout=this.$el.siblings(".minimized-chats-flyout")},render:function(){return this.$el.html(c.templates.toggle_chats(t.extend(this.model.toJSON(),{Minimized:k("Minimized")}))),this.model.get("collapsed")?this.$flyout.hide():this.$flyout.show(),this.$el}}),this.RosterContact=Backbone.Model.extend({initialize:function(e,n){var r=e.jid,i=t.extend({id:r,fullname:r,chat_status:"offline",user_id:Strophe.getNodeFromJid(r),resources:[],groups:[],status:""},e);this.set(i)},showInRoster:function(){var e=this.get("chat_status");return c.show_only_online_users&&e!=="online"?!1:c.hide_offline_users&&e==="offline"?!1:!0}}),this.RosterContactView=Backbone.View.extend({tagName:"dd",events:{"click .accept-xmpp-request":"acceptRequest","click .decline-xmpp-request":"declineRequest","click .open-chat":"openChat","click .remove-xmpp-contact":"removeContact"},initialize:function(){this.model.on("change",this.render,this),this.model.on("remove",this.remove,this),this.model.on("destroy",this.remove,this),this.model.on("open",this.openChat,this)},render:function(){if(!this.model.showInRoster())return this.$el.hide(),this;this.$el[0].style.display==="none"&&this.$el.show();var e=this.model,n=e.get("ask"),r=e.get("chat_status"),i=e.get("requesting"),s=e.get("subscription"),o=["current-xmpp-contact","pending-xmpp-contact","requesting-xmpp-contact"].concat(t.keys(M));t.each(o,function(e){this.el.className.indexOf(e)!==-1&&this.$el.removeClass(e)},this),this.$el.addClass(r).data("status",r);if(n==="subscribe"||s==="from")this.$el.addClass("pending-xmpp-contact"),this.$el.html(c.templates.pending_contact(t.extend(e.toJSON(),{desc_remove:k("Click to remove this contact")})));else if(i===!0)this.$el.addClass("requesting-xmpp-contact"),this.$el.html(c.templates.requesting_contact(t.extend(e.toJSON(),{desc_accept:k("Click to accept this contact request"),desc_decline:k("Click to decline this contact request")}))),c.controlboxtoggle.showControlBox();else if(s==="both"||s==="to")this.$el.addClass("current-xmpp-contact"),this.$el.html(c.templates.roster_item(t.extend(e.toJSON(),{desc_status:M[r||"offline"],desc_chat:k("Click to chat with this contact"),desc_remove:k("Click to remove this contact")})));return this},openChat:function(e){return e&&e.preventDefault&&e.preventDefault(),c.chatboxviews.showChat({id:this.model.get("jid"),jid:this.model.get("jid"),fullname:this.model.get("fullname"),image_type:this.model.get("image_type"),image:this.model.get("image"),url:this.model.get("url"),status:this.model.get("status")})},removeContact:function(t){t&&t.preventDefault&&t.preventDefault();var n=confirm(k("Are you sure you want to remove this contact?"));if(n===!0){var r=this.model.get("jid");c.connection.roster.remove(r,e.proxy(function(e){c.connection.roster.unauthorize(r),c.rosterview.model.remove(r),this.model.destroy(),this.remove()},this))}},acceptRequest:function(e){e&&e.preventDefault&&e.preventDefault();var t=this.model.get("jid");c.connection.roster.authorize(t),c.connection.roster.add(t,this.model.get("fullname"),[],function(e){c.connection.roster.subscribe(t,null,c.xmppstatus.get("fullname"))})},declineRequest:function(e){e&&e.preventDefault&&e.preventDefault();var t=confirm(k("Are you sure you want to decline this contact request?"));return t===!0&&(c.connection.roster.unauthorize(this.model.get("jid")),this.model.destroy()),this}}),this.RosterContacts=Backbone.Collection.extend({model:c.RosterContact,comparator:function(e,t){var n,r,i=e.get("chat_status")||"offline",s=t.get("chat_status")||"offline";return g[i]===g[s]?(n=e.get("fullname").toLowerCase(),r=t.get("fullname").toLowerCase(),n<r?-1:n>r?1:0):g[i]<g[s]?-1:1},subscribeToSuggestedItems:function(t){return e(t).find("item").each(function(t,n){var r=e(this),i=r.attr("jid"),s=r.attr("action"),o=r.attr("name");s==="add"&&c.connection.roster.subscribe(i,null,c.xmppstatus.get("fullname"))}),!0},isSelf:function(e){return Strophe.getBareJidFromJid(e)===Strophe.getBareJidFromJid(c.connection.jid)},addResource:function(e,n){var r=this.get(e),i;r&&(i=r.get("resources"),i?t.indexOf(i,n)==-1&&(i.push(n),r.set({resources:i})):r.set({resources:[n]}))},removeResource:function(e,n){var r=this.get(e),i,s;if(r){i=r.get("resources"),s=t.indexOf(i,n);if(s!==-1)return i.splice(s,1),r.save({resources:i}),i.length}return 0},subscribeBack:function(e){var t=Strophe.getBareJidFromJid(e);c.connection.roster.findItem(t)?(c.connection.roster.authorize(t),c.connection.roster.subscribe(e,null,c.xmppstatus.get("fullname"))):c.connection.roster.add(e,"",[],function(n){c.connection.roster.authorize(t),c.connection.roster.subscribe(e,null,c.xmppstatus.get("fullname"))})},unsubscribe:function(e){c.xmppstatus.sendPresence("unsubscribe"),c.connection.roster.findItem(e)&&c.connection.roster.remove(e,function(t){c.rosterview.model.remove(e)})},getNumOnlineContacts:function(){var e=0,n=["offline","unavailable"],r=this.models,i=r.length,s;c.show_only_online_users&&(n=t.union(n,["dnd","xa","away"]));for(s=0;s<i;s++)t.indexOf(n,r[s].get("chat_status"))===-1&&e++;return e},clearCache:function(e){var n,r,i;for(r=0;r<this.models.length;++r)n=this.models[r].get("id"),t.indexOf(t.pluck(e,"jid"),n)===-1&&(i=this.get(n),i&&!i.get("requesting")&&i.destroy())},rosterHandler:function(e,n){c.emit("roster",e),this.clearCache(e);var r=n?[n]:e;t.each(r,function(e,t,n){if(this.isSelf(e.jid))return;var r=this.get(e.jid);if(!r){var i=t===n.length-1?!0:!1;if(e.subscription==="none"&&e.ask===null&&!i)return;this.create({ask:e.ask,fullname:e.name||e.jid,groups:e.groups,jid:e.jid,subscription:e.subscription},{sort:!1})}else e.subscription==="none"&&e.ask===null?r.destroy():r.save({subscription:e.subscription,ask:e.ask,requesting:null,groups:e.groups})},this),c.initial_presence_sent||(c.initial_presence_sent=1,c.xmppstatus.sendPresence())},handleIncomingSubscription:function(t){var n=Strophe.getBareJidFromJid(t),r=this.get(n);if(!c.allow_contact_requests)return c.connection.roster.unauthorize(n),!0;if(c.auto_subscribe)!r||r.get("subscription")!="to"?this.subscribeBack(t):c.connection.roster.authorize(n);else if(r&&r.get("subscription")!="none")c.connection.roster.authorize(n);else{if(!!this.get(n))return!0;c.getVCard(n,e.proxy(function(e,t,r,i,s){this.create({jid:n,subscription:"none",ask:null,requesting:!0,fullname:t||e,image:r,image_type:i,url:s,vcard_updated:o().format()})},this),e.proxy(function(e,t){c.log("Error while retrieving vcard"),this.create({jid:n,subscription:"none",ask:null,requesting:!0,fullname:n,vcard_updated:o().format()})},this))}return!0},presenceHandler:function(t){var n=e(t),r=n.attr("type");if(r==="error")return!0;var i=n.attr("from"),s=Strophe.getBareJidFromJid(i),o=Strophe.getResourceFromJid(i),u=n.find("show"),a=u.text()||"online",f=n.find("status"),l;return this.isSelf(s)?(c.connection.jid!==i&&r!=="unavailable"&&c.xmppstatus.save({status:a}),!0):(n.find("x").attr("xmlns")||"").indexOf(Strophe.NS.MUC)===0?!0:(l=this.get(s),l&&f.text()!=l.get("status")&&l.save({status:f.text()}),r==="subscribed"||r==="unsubscribe"?!0:r==="subscribe"?this.handleIncomingSubscription(i):(r==="unsubscribed"?this.unsubscribe(s):r==="unavailable"?(this.removeResource(s,o)===0&&(a="offline"),l&&a&&l.save({chat_status:a})):l&&(this.addResource(s,o),l.save({chat_status:a})),!0))}}),this.RosterGroup=Backbone.Model.extend({initialize:function(e,n){this.set(t.extend({description:D,state:N},e)),this.contacts=new c.RosterContacts}}),this.RosterGroupView=Backbone.Overview.extend({tagName:"dt",className:"roster-group",events:{"click a.group-toggle":"toggle"},initialize:function(){this.model.contacts.on("add",this.addContact,this),this.model.contacts.on("change:subscription",this.onContactSubscriptionChange,this),this.model.contacts.on("change:requesting",this.onContactRequestChange,this),this.model.contacts.on("change:chat_status",function(e){this.model.contacts.sort(),this.positionContact(e).render()},this),this.model.contacts.on("destroy",this.onRemove,this),this.model.contacts.on("remove",this.onRemove,this),c.roster.on("change:groups",this.onContactGroupChange,this)},render:function(){return this.$el.attr("data-group",this.model.get("name")),this.$el.html(e(c.templates.group_header({label_group:this.model.get("name"),desc_group_toggle:this.model.get("description"),toggle_state:this.model.get("state")}))),this},addContact:function(e){var t=new c.RosterContactView({model:e});this.add(e.get("id"),t),t=this.positionContact(e).render(),e.showInRoster()&&(this.model.get("state")===C?(t.$el[0].style.display!=="none"&&t.$el.hide(),this.$el[0].style.display==="none"&&this.$el.show()):this.$el[0].style.display!=="block"&&this.show())},positionContact:function(e){var t=this.get(e.get("id")),n=this.model.contacts.indexOf(e);return t.$el.detach(),n===0?this.$el.after(t.$el):n==this.model.contacts.length-1?this.$el.nextUntil("dt").last().after(t.$el):this.$el.nextUntil("dt").eq(n).before(t.$el),t},show:function(){this.$el.nextUntil("dt").addBack().show()},hide:function(){this.$el.nextUntil("dt").addBack().hide()},filter:function(n){var r,i;n.length===0?(this.model.get("state")===N&&this.model.contacts.each(e.proxy(function(e){e.showInRoster()&&this.get(e.get("id")).$el.show()},this)),this.showIfNecessary()):(n=n.toLowerCase(),r=this.model.contacts.filter(a.not("fullname",n)),r.length===this.model.contacts.length?this.hide():(t.each(r,e.proxy(function(e){this.get(e.get("id")).$el.hide()},this)),t.each(this.model.contacts.reject(a.not("fullname",n)),e.proxy(function(e){this.get(e.get("id")).$el.show()},this)),this.showIfNecessary()))},showIfNecessary:function(){!this.$el.is(":visible")&&this.model.contacts.length>0&&this.$el.show()},toggle:function(t){t&&t.preventDefault&&t.preventDefault();var n=e(t.target);n.hasClass("icon-opened")?(this.$el.nextUntil("dt").slideUp(),this.model.save({state:C}),n.removeClass("icon-opened").addClass("icon-closed")):(n.removeClass("icon-closed").addClass("icon-opened"),this.model.save({state:N}),this.filter(c.rosterview.$(".roster-filter").val(),c.rosterview.$(".filter-type").val()))},onContactGroupChange:function(e){var n=t.contains(e.get("groups"),this.model.get("name")),r=e.get("id"),i=!this.get(r);n&&!i?this.model.contacts.remove(r):!n&&i&&this.addContact(e)},onContactSubscriptionChange:function(e){this.model.get("name")===H&&e.get("subscription")!=="from"&&this.model.contacts.remove(e.get("id"))},onContactRequestChange:function(e){this.model.get("name")===B&&!e.get("requesting")&&this.model.contacts.remove(e.get("id"))},onRemove:function(e){this.remove(e.get("id")),this.model.contacts.length===0&&this.$el.hide()}}),this.RosterGroups=Backbone.Collection.extend({model:c.RosterGroup,comparator:function(e,n){e=e.get("name"),n=n.get("name");var r=t.keys(q),i=t.contains(r,e),s=t.contains(r,n);if(!i&&!s)return e.toLowerCase()<n.toLowerCase()?-1:e.toLowerCase()>n.toLowerCase()?1:0;if(i&&s)return q[e]<q[n]?-1:q[e]>q[n]?1:0;if(!i&&s)return n===P?1:-1;if(i&&!s)return e===P?-1:1}}),this.RosterView=Backbone.Overview.extend({tagName:"div",id:"converse-roster",events:{"keydown .roster-filter":"liveFilter","click .onX":"clearFilter","mousemove .x":"togglePointer","change .filter-type":"changeFilterType"},initialize:function(){this.registerRosterHandler(),this.registerRosterXHandler(),this.registerPresenceHandler(),c.roster.on("add",this.onContactAdd,this),c.roster.on("change",this.onContactChange,this),c.roster.on("destroy",this.update,this),c.roster.on("remove",this.update,this),this.model.on("add",this.onGroupAdd,this),this.model.on("reset",this.reset,this),this.$roster=e('<dl class="roster-contacts" style="display: none;"></dl>')},update:t.debounce(function(){var t=e("#online-count");return t.text("("+c.roster.getNumOnlineContacts()+")"),t.is(":visible")||t.show(),this.$roster.parent().length===0&&this.$el.append(this.$roster.show()),this.showHideFilter()},c.animate?100:0),render:function(){return this.$el.html(c.templates.roster({placeholder:k("Type to filter"),label_contacts:F,label_groups:I})),this},fetch:function(){return this.model.fetch({silent:!0,success:e.proxy(function(e,t,n){e.length!==0&&this.positionFetchedGroups(e,t,n),c.roster.fetch({add:!0,success:function(e){e.length>0?(e.each(function(e){c.connection.roster.items.push({name:e.get("fullname"),jid:e.get("jid"),subscription:e.get("subscription"),ask:e.get("ask"),groups:e.get("groups"),resources:e.get("resources")})}),c.initial_presence_sent=1,c.xmppstatus.sendPresence()):c.connection.roster.get()}})},this)}),this},changeFilterType:function(e){e&&e.preventDefault&&e.preventDefault(),this.clearFilter(),this.filter(this.$(".roster-filter").val(),e.target.value)},tog:function(e){return e?"addClass":"removeClass"},togglePointer:function(t){t&&t.preventDefault&&t.preventDefault();var n=t.target;e(n)[this.tog(n.offsetWidth-18<t.clientX-n.getBoundingClientRect().left)]("onX")},filter:function(e,n){var r;e=e.toLowerCase(),n==="groups"?t.each(this.getAll(),function(t,n){t.model.get("name").toLowerCase().indexOf(e.toLowerCase())===-1?t.hide():t.model.contacts.length>0&&t.show()}):t.each(this.getAll(),function(t){t.filter(e,n)})},liveFilter:t.debounce(function(e){e&&e.preventDefault&&e.preventDefault();var t=this.$(".roster-filter"),n=t.val(),r=this.$(".filter-type").val();t[this.tog(n)]("x"),this.filter(n,r)},300),clearFilter:function(t){t&&t.preventDefault&&(t.preventDefault(),e(t.target).removeClass("x onX").val("")),this.filter("")},showHideFilter:function(){if(!this.$el.is(":visible"))return;var e=this.$(".roster-filter"),t=this.$(".filter-type"),n=e.is(":visible");if(n&&e.val().length>0)return;return this.$roster.hasScrollBar()?n||(e.show(),t.show()):(e.hide(),t.hide()),this},reset:function(){return c.roster.reset(),this.removeAll(),this.$roster=e('<dl class="roster-contacts" style="display: none;"></dl>'),this.render().update(),this},registerRosterHandler:function(){c.connection.roster.registerCallback(e.proxy(c.roster.rosterHandler,c.roster))},registerRosterXHandler:function(){var t=0;c.connection.addHandler(function(n){return window.setTimeout(function(){c.connection.flush(),e.proxy(c.roster.subscribeToSuggestedItems,c.roster)(n)},t),t+=e(n).find("item").length*250,!0},"http://jabber.org/protocol/rosterx","message",null)},registerPresenceHandler:function(){c.connection.addHandler(e.proxy(function(e){return c.roster.presenceHandler(e),!0},this),null,"presence",null)},onGroupAdd:function(e){var t=new c.RosterGroupView({model:e});this.add(e.get("name"),t.render()),this.positionGroup(t)},onContactAdd:function(e){this.addRosterContact(e).update(),e.get("vcard_updated")||c.getVCard(e.get("jid"))},onContactChange:function(e){this.updateChatBox(e).update(),t.has(e.changed,"subscription")&&(e.changed.subscription=="from"?this.addContactToGroup(e,H):e.get("subscription")==="both"&&this.addExistingContact(e)),t.has(e.changed,"ask")&&e.changed.ask=="subscribe"&&this.addContactToGroup(e,H),t.has(e.changed,"subscription")&&e.changed.requesting=="true"&&this.addContactToGroup(e,B),this.liveFilter()},updateChatBox:function(e){var n=c.chatboxes.get(e.get("jid")),r={};return n?(t.has(e.changed,"chat_status")&&(r.chat_status=e.get("chat_status")),t.has(e.changed,"status")&&(r.status=e.get("status")),n.save(r),this):this},positionFetchedGroups:function(t,n,r){t.sort(),t.each(e.proxy(function(e,t){var n=this.get(e.get("name"));n||(n=new c.RosterGroupView({model:e}),this.add(e.get("name"),n.render())),t===0?this.$roster.append(n.$el):this.appendGroup(n)},this))},positionGroup:function(t){var n=this.$roster.find(".roster-group"),r=n.length?this.model.indexOf(t.model):0;return r===0?this.$roster.prepend(t.$el):r==this.model.length-1?this.appendGroup(t):e(n.eq(r)).before(t.$el),this},appendGroup:function(e){var t=this.$roster.find(".roster-group").last(),n=t.siblings("dd");return n.length>0?n.last().after(e.$el):t.after(e.$el),this},getGroup:function(e){var t=this.get(e);return t?t.model:this.model.create({name:e,id:b64_sha1(e)})},addContactToGroup:function(e,t){this.getGroup(t).contacts.add(e)},addExistingContact:function(n){var r;c.roster_groups?(r=n.get("groups"),r.length===0&&(r=[j])):r=[P],t.each(r,e.proxy(function(e){this.addContactToGroup(n,e)},this))},addRosterContact:function(e){return e.get("subscription")==="both"||e.get("subscription")==="to"?this.addExistingContact(e):e.get("ask")==="subscribe"||e.get("subscription")==="from"?this.addContactToGroup(e,H):e.get("requesting")===!0&&this.addContactToGroup(e,B),this}}),this.XMPPStatus=Backbone.Model.extend({initialize:function(){this.set({status:this.get("status")||"online"}),this.on("change",e.proxy(function(n){this.get("fullname")===undefined&&c.getVCard(null,e.proxy(function(e,t,n,r,i){this.save({fullname:t})},this)),t.has(n.changed,"status")&&c.emit("statusChanged",this.get("status")),t.has(n.changed,"status_message")&&c.emit("statusMessageChanged",this.get("status_message"))},this))},sendPresence:function(e){e===undefined&&(e=this.get("status")||"online");var t=this.get("status_message"),n;e==="unavailable"||e==="probe"||e==="error"||e==="unsubscribe"||e==="unsubscribed"||e==="subscribe"||e==="subscribed"?n=$pres({type:e}):e==="offline"?(n=$pres({type:"unavailable"}),t&&n.c("show").t(e)):(e==="online"?n=$pres():n=$pres().c("show").t(e).up(),t&&n.c("status").t(t)),c.connection.send(n)},setStatus:function(e){this.sendPresence(e),this.save({status:e})},setStatusMessage:function(t){c.connection.send($pres().c("show").t(this.get("status")).up().c("status").t(t)),this.save({status_message:t}),this.xhr_custom_status&&e.ajax({url:this.xhr_custom_status_url,type:"POST",data:{msg:t}})}}),this.XMPPStatusView=Backbone.View.extend({el:"span#xmpp-status-holder",events:{"click a.choose-xmpp-status":"toggleOptions","click #fancy-xmpp-status-select a.change-xmpp-status-message":"renderStatusChangeForm","submit #set-custom-xmpp-status":"setStatusMessage","click .dropdown dd ul li a":"setStatus"},initialize:function(){this.model.on("change",this.updateStatusUI,this)},render:function(){var t=this.$el.find("select#select-xmpp-status"),n=this.model.get("status")||"offline",r=e("option",t),i,s=[],o=this;return this.$el.html(c.templates.choose_status()),this.$el.find("#fancy-xmpp-status-select").html(c.templates.chat_status({status_message:this.model.get("status_message")||k("I am %1$s",this.getPrettyStatus(n)),chat_status:n,desc_custom_status:k("Click here to write a custom status message"),desc_change_status:k("Click to change your chat status")})),r.each(function(){s.push(c.templates.status_option({value:e(this).val(),text:this.text}))}),i=this.$el.find("#target dd ul").hide(),i.append(s.join("")),t.remove(),this},toggleOptions:function(t){t.preventDefault(),e(t.target).parent().parent().siblings("dd").find("ul").toggle("fast")},renderStatusChangeForm:function(e){e.preventDefault();var t=this.model.get("status")||"offline",n=c.templates.change_status_message({status_message:t,label_custom_status:k("Custom status"),label_save:k("Save")});this.$el.find(".xmpp-status").replaceWith(n),this.$el.find(".custom-xmpp-status").focus().focus()},setStatusMessage:function(t){t.preventDefault();var n=e(t.target).find("input").val();this.model.setStatusMessage(n)},setStatus:function(t){t.preventDefault();var n=e(t.target),r=n.attr("data-value");r==="logout"?(this.$el.find(".dropdown dd ul").hide(),c.logOut()):(this.model.setStatus(r),this.$el.find(".dropdown dd ul").hide())},getPrettyStatus:function(e){var t;return e==="chat"?t=k("online"):e==="dnd"?t=k("busy"):e==="xa"?t=k("away for long"):e==="away"?t=k("away"):t=k(e)||k("online"),t},updateStatusUI:function(e){if(!t.has(e.changed,"status")&&!t.has(e.changed,"status_message"))return;var n=e.get("status"),r=e.get("status_message")||k("I am %1$s",this.getPrettyStatus(n));this.$el.find("#fancy-xmpp-status-select").html(c.templates.chat_status({chat_status:n,status_message:r,desc_custom_status:k("Click here to write a custom status message"),desc_change_status:k("Click to change your chat status")}))}}),this.BOSHSession=Backbone.Model,this.Feature=Backbone.Model,this.Features=Backbone.Collection.extend({model:c.Feature,initialize:function(){this.addClientIdentities().addClientFeatures(),this.browserStorage=new Backbone.BrowserStorage[c.storage](b64_sha1("converse.features"+c.bare_jid)),this.browserStorage.records.length===0?(c.connection.disco.info(c.domain,null,e.proxy(this.onInfo,this)),c.connection.disco.items(c.domain,null,e.proxy(this.onItems,this))):this.fetch({add:!0})},addClientIdentities:function(){return c.connection.disco.addIdentity("client","web","Converse.js"),this},addClientFeatures:function(){return c.connection.disco.addFeature("http://jabber.org/protocol/chatstates"),c.connection.disco.addFeature("http://jabber.org/protocol/rosterx"),c.connection.disco.addFeature("jabber:x:conference"),c.connection.disco.addFeature("urn:xmpp:carbons:2"),c.connection.disco.addFeature(Strophe.NS.VCARD),c.connection.disco.addFeature(Strophe.NS.BOSH),c.connection.disco.addFeature(Strophe.NS.DISCO_INFO),c.connection.disco.addFeature(Strophe.NS.MUC),this},onItems:function(t){e(t).find("query item").each(e.proxy(function(t,n){c.connection.disco.info(e(n).attr("jid"),null,e.proxy(this.onInfo,this))},this))},onInfo:function(t){var n=e(t);if(n.find("identity[category=server][type=im]").length===0&&n.find("identity[category=conference][type=text]").length===0)return;n.find("feature").each(e.proxy(function(t,r){this.create({"var":e(r).attr("var"),from:n.attr("from")})},this))}}),this.LoginPanel=Backbone.View.extend({tagName:"div",id:"login-dialog",events:{"submit form#converse-login":"authenticate"},connect:function(e,t,n){e&&e.find("input[type=submit]").hide().after('<span class="spinner login-submit"/>');var r=Strophe.getResourceFromJid(t);r||(t+="/converse.js-"+Math.floor(Math.random()*139749825).toString()),c.connection.connect(t,n,c.onConnect)},initialize:function(e){e.$parent.html(this.$el.html(c.templates.login_panel({label_username:k("XMPP/Jabber Username:"),label_password:k("Password:"),label_login:k("Log In")}))),this.$tabs=e.$parent.parent().find("#controlbox-tabs")},render:function(){return this.$tabs.append(c.templates.login_tab({label_sign_in:k("Sign in")})),this.$el.find("input#jid").focus(),this},authenticate:function(t){t&&t.preventDefault&&t.preventDefault();var n=e(t.target),r=n.find("input[name=jid]"),i=r.val(),s=n.find("input[name=password]"),o=s.val(),u=null,a=!1;c.bosh_service_url||(u=n.find("input#bosh_service_url"),c.bosh_service_url=u.val(),c.bosh_service_url||(a=!0,u.addClass("error"))),i||(a=!0,r.addClass("error")),o||(a=!0,s.addClass("error"));if(a)return;return this.connect(n,i,o),!1},remove:function(){this.$tabs.empty(),this.$el.parent().empty()}}),this.ControlBoxToggle=Backbone.View.extend({tagName:"a",className:"toggle-controlbox",id:"toggle-controlbox",events:{click:"onClick"},attributes:{href:"#"},initialize:function(){this.render()},render:function(){return e("#conversejs").prepend(this.$el.html(c.templates.controlbox_toggle({label_toggle:k("Toggle chat")}))),this.$el.hide(),this},hide:function(e){this.$el.fadeOut("fast",e)},show:function(e){this.$el.show("fast",e)},showControlBox:function(){var e=c.chatboxes.get("controlbox");e||(e=c.addControlBox()),c.connection.connected?e.save({closed:!1}):e.trigger("show")},onClick:function(t){t.preventDefault();if(e("div#controlbox").is(":visible")){var n=c.chatboxes.get("controlbox");c.connection.connected?n.save({closed:!0}):n.trigger("hide")}else this.showControlBox()}}),this.addControlBox=function(){return this.chatboxes.add({id:"controlbox",box_id:"controlbox",height:this.default_box_height,closed:!this.show_controlbox_by_default})},this.initConnection=function(){var e,t,n;if(this.connection&&this.connection.connected)this.onConnected();else{if(!this.bosh_service_url)throw"Error: you must supply a value for the bosh_service_url";this.connection=new Strophe.Connection(this.bosh_service_url);if(this.prebind){this.jid&&this.sid&&this.rid&&this.connection.attach(this.jid,this.sid,this.rid,this.onConnect);if(!this.keepalive)throw"If you use prebind and don't use keepalive, then you MUST supply JID, RID and SID values"}this.keepalive&&(e=this.session.get("rid"),t=this.session.get("sid"),n=this.session.get("jid"),e&&n&&t?(this.session.save({rid:e}),this.connection.attach(n,t,e,this.onConnect)):this.prebind&&(delete this.connection,this.emit("noResumeableSession")))}},this._tearDown=function(){return this.initial_presence_sent=!1,this.roster.off().reset(),this.connection.roster._callbacks=[],this.rosterview.model.off().reset(),this.rosterview.undelegateEvents().remove(),this.chatboxes.remove(),this.features&&this.features.reset(),this.minimized_chats&&(this.minimized_chats.undelegateEvents().model.reset(),this.minimized_chats.removeAll(),this.minimized_chats.tearDown().remove(),delete this.minimized_chats),this},this._initialize=function(){return this.chatboxes=new this.ChatBoxes,this.chatboxviews=new this.ChatBoxViews({model:this.chatboxes}),this.controlboxtoggle=new this.ControlBoxToggle,this.otr=new this.OTR,this.initSession(),this.initConnection(),this.connection&&this.addControlBox(),this},this._initializePlugins=function(){t.each(this.plugins,e.proxy(function(t){e.proxy(t,this)(this)},this))},this._initializePlugins(),this._initialize(),this.registerGlobalEventHandlers(),c.emit("initialized")};var c=function(t){return{endOTR:e.proxy(t.endOTR,t),get:e.proxy(t.get,t),initiateOTR:e.proxy(t.initiateOTR,t),maximize:e.proxy(t.maximize,t),minimize:e.proxy(t.minimize,t),set:e.proxy(t.set,t),open:t.trigger.bind(t,"show")}};return{initialize:function(e,t){l.initialize(e,t)},contacts:{get:function(e){var n=function(e){var t=l.roster.get(Strophe.getBareJidFromJid(e));return t?t.attributes:null};return typeof e=="string"?n(e):t.map(e,n)}},chats:{get:function(e){var n=function(e){var n=l.chatboxes.get(e);if(!n){var r=l.roster.get(e);if(r===undefined)return l.log("Could not get roster item for JID "+e,"error"),null;n=l.chatboxes.create({id:e,jid:e,fullname:t.isEmpty(r.get("fullname"))?e:r.get("fullname"),image_type:r.get("image_type"),image:r.get("image"),url:r.get("url")})}return c(n)};return typeof e=="string"?n(e):t.map(e,n)}},tokens:{get:function(e){if(!l.expose_rid_and_sid||typeof l.connection=="undefined")return null;if(e.toLowerCase()==="rid")return l.connection.rid||l.connection._proto.rid;if(e.toLowerCase()==="sid")return l.connection.sid||l.connection._proto.sid}},listen:{once:function(e,t){l.once(e,t)},on:function(e,t){l.on(e,t)},not:function(e,t){l.off(e,t)}},plugins:{add:function(e,t){l.plugins[e]=t},remove:function(e){delete l.plugins[e]},extend:function(e,n){e.prototype._super||(e.prototype._super={}),t.each(n,function(n,r){r==="events"?e.prototype[r]=t.extend(n,e.prototype[r]):(typeof r=="function"&&(e.prototype._super[r]=e.prototype[r]),e.prototype[r]=n)})}},env:{jQuery:e,Strophe:Strophe,_:t},getBuddy:function(e){return l.log('WARNING: the "getBuddy" API method has been deprecated. Please use "contacts.get" instead'),this.contacts.get(e)},getChatBox:function(e){return l.log('WARNING: the "getChatBox" API method has been deprecated. Please use "chats.get" instead'),this.chats.get(e)},openChatBox:function(e){l.log('WARNING: the "openChatBox" API method has been deprecated. Please use "chats.get(jid).open()" instead');var t=this.chats.get(e);return t&&t.open(),t},getRID:function(){return l.log('WARNING: the "getRID" API method has been deprecated. Please use "tokens.get(\'rid\')" instead'),this.tokens.get("rid")},getSID:function(){return l.log('WARNING: the "getSID" API method has been deprecated. Please use "tokens.get(\'sid\')" instead'),this.tokens.get("sid")},once:function(e,t){return l.log('WARNING: the "one" API method has been deprecated. Please use "listen.once" instead'),this.listen.once(e,t)},on:function(e,t){return l.log('WARNING: the "on" API method has been deprecated. Please use "listen.on" instead'),this.listen.on(e,t)},off:function(e,t){return l.log('WARNING: the "off" API method has been deprecated. Please use "listen.not" instead'),this.listen.not(e,t)}}}),require.config({baseUrl:".",paths:{backbone:"components/backbone/backbone","backbone.browserStorage":"components/backbone.browserStorage/backbone.browserStorage","backbone.overview":"components/backbone.overview/backbone.overview",bootstrap:"components/bootstrap/dist/js/bootstrap",bootstrapJS:"components/bootstrapJS/index","converse-dependencies":"src/deps-website","converse-templates":"src/templates",eventemitter:"components/otr/build/dep/eventemitter",jquery:"components/jquery/dist/jquery","jquery-private":"src/jquery-private","jquery.browser":"components/jquery.browser/index","jquery.easing":"components/jquery-easing-original/index",moment:"components/momentjs/moment",strophe:"components/strophe/strophe","strophe.disco":"components/strophejs-plugins/disco/strophe.disco","strophe.muc":"components/strophe.muc/index","strophe.roster":"src/strophe.roster","strophe.vcard":"components/strophejs-plugins/vcard/strophe.vcard",text:"components/requirejs-text/text",tpl:"components/requirejs-tpl-jcbrand/tpl",typeahead:"components/typeahead.js/index",underscore:"components/underscore/underscore",utils:"src/utils",bigint:"src/bigint",crypto:"src/crypto","crypto.aes":"components/otr/vendor/cryptojs/aes","crypto.cipher-core":"components/otr/vendor/cryptojs/cipher-core","crypto.core":"components/otr/vendor/cryptojs/core","crypto.enc-base64":"components/otr/vendor/cryptojs/enc-base64","crypto.evpkdf":"components/crypto-js-evanvosberg/src/evpkdf","crypto.hmac":"components/otr/vendor/cryptojs/hmac","crypto.md5":"components/crypto-js-evanvosberg/src/md5","crypto.mode-ctr":"components/otr/vendor/cryptojs/mode-ctr","crypto.pad-nopadding":"components/otr/vendor/cryptojs/pad-nopadding","crypto.sha1":"components/otr/vendor/cryptojs/sha1","crypto.sha256":"components/otr/vendor/cryptojs/sha256",salsa20:"components/otr/build/dep/salsa20",otr:"src/otr",locales:"locale/locales",jed:"components/jed/jed",af:"locale/af/LC_MESSAGES/af",de:"locale/de/LC_MESSAGES/de",en:"locale/en/LC_MESSAGES/en",es:"locale/es/LC_MESSAGES/es",fr:"locale/fr/LC_MESSAGES/fr",he:"locale/he/LC_MESSAGES/he",hu:"locale/hu/LC_MESSAGES/hu",id:"locale/id/LC_MESSAGES/id",it:"locale/it/LC_MESSAGES/it",ja:"locale/ja/LC_MESSAGES/ja",nl:"locale/nl/LC_MESSAGES/nl",pt_BR:"locale/pt_BR/LC_MESSAGES/pt_BR",ru:"locale/ru/LC_MESSAGES/ru",zh:"locale/zh/LC_MESSAGES/zh",action:"src/templates/action",add_contact_dropdown:"src/templates/add_contact_dropdown",add_contact_form:"src/templates/add_contact_form",change_status_message:"src/templates/change_status_message",chat_status:"src/templates/chat_status",chatarea:"src/templates/chatarea",chatbox:"src/templates/chatbox",chatroom:"src/templates/chatroom",chatroom_password_form:"src/templates/chatroom_password_form",chatroom_sidebar:"src/templates/chatroom_sidebar",chatrooms_tab:"src/templates/chatrooms_tab",chats_panel:"src/templates/chats_panel",choose_status:"src/templates/choose_status",contacts_panel:"src/templates/contacts_panel",contacts_tab:"src/templates/contacts_tab",controlbox:"src/templates/controlbox",controlbox_toggle:"src/templates/controlbox_toggle",field:"src/templates/field",form_checkbox:"src/templates/form_checkbox",form_input:"src/templates/form_input",form_select:"src/templates/form_select",group_header:"src/templates/group_header",info:"src/templates/info",login_panel:"src/templates/login_panel",login_tab:"src/templates/login_tab",message:"src/templates/message",new_day:"src/templates/new_day",occupant:"src/templates/occupant",pending_contact:"src/templates/pending_contact",pending_contacts:"src/templates/pending_contacts",requesting_contact:"src/templates/requesting_contact",requesting_contacts:"src/templates/requesting_contacts",room_description:"src/templates/room_description",room_item:"src/templates/room_item",room_panel:"src/templates/room_panel",roster:"src/templates/roster",roster_item:"src/templates/roster_item",search_contact:"src/templates/search_contact",select_option:"src/templates/select_option",status_option:"src/templates/status_option",toggle_chats:"src/templates/toggle_chats",toolbar:"src/templates/toolbar",trimmed_chat:"src/templates/trimmed_chat",form_textarea:"src/templates/form_textarea"},map:{"*":{jquery:"jquery-private"},"jquery-private":{jquery:"jquery"}},tpl:{templateSettings:{evaluate:/\{\[([\s\S]+?)\]\}/g,interpolate:/\{\{([\s\S]+?)\}\}/g}},shim:{underscore:{exports:"_"},"crypto.aes":{deps:["crypto.cipher-core"]},"crypto.cipher-core":{deps:["crypto.enc-base64","crypto.evpkdf"]},"crypto.enc-base64":{deps:["crypto.core"]},"crypto.evpkdf":{deps:["crypto.md5"]},"crypto.hmac":{deps:["crypto.core"]},"crypto.md5":{deps:["crypto.core"]},"crypto.mode-ctr":{deps:["crypto.cipher-core"]},"crypto.pad-nopadding":{deps:["crypto.cipher-core"]},"crypto.sha1":{deps:["crypto.core"]},"crypto.sha256":{deps:["crypto.core"]},bigint:{deps:["crypto"]},strophe:{exports:"Strophe"},"strophe.disco":{deps:["strophe"]},"strophe.muc":{deps:["strophe"]},"strophe.roster":{deps:["strophe"]},"strophe.vcard":{deps:["strophe"]}}}),require(["converse"],function(e){window.converse=e}),define("main",function(){});