!function(e){if("function"==typeof bootstrap)bootstrap("simplewebrtc",e);else if("object"==typeof exports)module.exports=e();else if("function"==typeof define&&define.amd)define(e);else if("undefined"!=typeof ses){if(!ses.ok())return;ses.makeSimpleWebRTC=e}else"undefined"!=typeof window?window.SimpleWebRTC=e():global.SimpleWebRTC=e()}(function(){var define,ses,bootstrap,module,exports;return function(e,t,n){function i(n,s){if(!t[n]){if(!e[n]){var o="function"==typeof require&&require;if(!s&&o)return o(n,!0);if(r)return r(n,!0);throw new Error("Cannot find module '"+n+"'")}var u=t[n]={exports:{}};e[n][0].call(u.exports,function(t){var r=e[n][1][t];return i(r?r:t)},u,u.exports)}return t[n].exports}for(var r="function"==typeof require&&require,s=0;s=26||"moz"===prefix&&version>=33),AudioContext=window.AudioContext||window.webkitAudioContext,videoEl=document.createElement("video"),supportVp8=videoEl&&videoEl.canPlayType&&"probably"===videoEl.canPlayType('video/webm; codecs="vp8", vorbis'),getUserMedia=navigator.getUserMedia||navigator.webkitGetUserMedia||navigator.msGetUserMedia||navigator.mozGetUserMedia;module.exports={prefix:prefix,browserVersion:version,support:!!PC&&supportVp8&&!!getUserMedia,supportRTCPeerConnection:!!PC,supportVp8:supportVp8,supportGetUserMedia:!!getUserMedia,supportDataChannel:!!(PC&&PC.prototype&&PC.prototype.createDataChannel),supportWebAudio:!(!AudioContext||!AudioContext.prototype.createMediaStreamSource),supportMediaStream:!(!MediaStream||!MediaStream.prototype.removeTrack),supportScreenSharing:!!screenSharing,dataChannel:!!(PC&&PC.prototype&&PC.prototype.createDataChannel),webAudio:!(!AudioContext||!AudioContext.prototype.createMediaStreamSource),mediaStream:!(!MediaStream||!MediaStream.prototype.removeTrack),screenSharing:!!screenSharing,AudioContext:AudioContext,PeerConnection:PC,SessionDescription:SessionDescription,IceCandidate:IceCandidate,MediaStream:MediaStream,getUserMedia:getUserMedia}},{}],5:[function(require,module,exports){function WildEmitter(){this.isWildEmitter=!0,this.callbacks={}}module.exports=WildEmitter,WildEmitter.prototype.on=function(event,groupName,fn){var hasGroup=3===arguments.length,group=hasGroup?arguments[1]:void 0,func=hasGroup?arguments[2]:arguments[1];return func._groupName=group,(this.callbacks[event]=this.callbacks[event]||[]).push(func),this},WildEmitter.prototype.once=function(event,groupName,fn){function on(){self.off(event,on),func.apply(this,arguments)}var self=this,hasGroup=3===arguments.length,group=hasGroup?arguments[1]:void 0,func=hasGroup?arguments[2]:arguments[1];return this.on(event,group,on),this},WildEmitter.prototype.releaseGroup=function(groupName){var item,i,len,handlers;for(item in this.callbacks)for(handlers=this.callbacks[item],i=0,len=handlers.length;len>i;i++)handlers[i]._groupName===groupName&&(handlers.splice(i,1),i--,len--);return this},WildEmitter.prototype.off=function(event,fn){var i,callbacks=this.callbacks[event];return callbacks?1===arguments.length?(delete this.callbacks[event],this):(i=callbacks.indexOf(fn),callbacks.splice(i,1),0===callbacks.length&&delete this.callbacks[event],this):this},WildEmitter.prototype.emit=function(event){var i,len,listeners,args=[].slice.call(arguments,1),callbacks=this.callbacks[event],specialCallbacks=this.getWildcardCallbacks(event);if(callbacks)for(listeners=callbacks.slice(),i=0,len=listeners.length;len>i&&listeners[i];++i)listeners[i].apply(this,args);if(specialCallbacks)for(len=specialCallbacks.length,listeners=specialCallbacks.slice(),i=0,len=listeners.length;len>i&&listeners[i];++i)listeners[i].apply(this,[event].concat(args));return this},WildEmitter.prototype.getWildcardCallbacks=function(eventName){var item,split,result=[];for(item in this.callbacks)split=item.split("*"),("*"===item||2===split.length&&eventName.slice(0,split[0].length)===split[0])&&(result=result.concat(this.callbacks[item]));return result}},{}],6:[function(require,module,exports){module.exports=function(stream,el,options){var item,URL=window.URL,opts={autoplay:!0,mirror:!1,muted:!1},element=el||document.createElement("video");if(options)for(item in options)opts[item]=options[item];if(opts.autoplay&&(element.autoplay="autoplay"),opts.muted&&(element.muted=!0),opts.mirror&&["","moz","webkit","o","ms"].forEach(function(prefix){var styleName=prefix?prefix+"Transform":"transform";element.style[styleName]="scaleX(-1)"}),URL&&URL.createObjectURL)element.src=URL.createObjectURL(stream);else if(element.srcObject)element.srcObject=stream;else{if(!element.mozSrcObject)return!1;element.mozSrcObject=stream}return element}},{}],7:[function(require,module,exports){for(var methods="assert,count,debug,dir,dirxml,error,exception,group,groupCollapsed,groupEnd,info,log,markTimeline,profile,profileEnd,time,timeEnd,trace,warn".split(","),l=methods.length,fn=function(){},mockconsole={};l--;)mockconsole[methods[l]]=fn;module.exports=mockconsole},{}],3:[function(require,module,exports){function SocketIoConnection(config){this.connection=io.connect(config.url,config.socketio)}var io=require("socket.io-client");SocketIoConnection.prototype.on=function(ev,fn){this.connection.on(ev,fn)},SocketIoConnection.prototype.emit=function(){this.connection.emit.apply(this.connection,arguments)},SocketIoConnection.prototype.getSessionid=function(){return this.connection.socket.sessionid},SocketIoConnection.prototype.disconnect=function(){return this.connection.disconnect()},module.exports=SocketIoConnection},{"socket.io-client":8}],2:[function(require,module,exports){function WebRTC(opts){var item,self=this,options=opts||{};this.config={debug:!1,peerConnectionConfig:{iceServers:[{url:"stun:stun.l.google.com:19302"}]},peerConnectionConstraints:{optional:[{DtlsSrtpKeyAgreement:!0}]},receiveMedia:{offerToReceiveAudio:0,offerToReceiveVideo:0},enableDataChannels:!0};this.screenSharingSupport=webrtc.screenSharing,this.logger=function(){return opts.debug?opts.logger||console:opts.logger||mockconsole}();for(item in options)this.config[item]=options[item];webrtc.support||this.logger.error("Your browser doesn't seem to support WebRTC"),this.peers=[],localMedia.call(this,this.config),this.on("speaking",function(){self.hardMuted||self.peers.forEach(function(peer){if(peer.enableDataChannels){var dc=peer.getDataChannel("hark");if("open"!=dc.readyState)return;dc.send(JSON.stringify({type:"speaking"}))}})}),this.on("stoppedSpeaking",function(){self.hardMuted||self.peers.forEach(function(peer){if(peer.enableDataChannels){var dc=peer.getDataChannel("hark");if("open"!=dc.readyState)return;dc.send(JSON.stringify({type:"stoppedSpeaking"}))}})}),this.on("volumeChange",function(volume,treshold){self.hardMuted||self.peers.forEach(function(peer){if(peer.enableDataChannels){var dc=peer.getDataChannel("hark");if("open"!=dc.readyState)return;dc.send(JSON.stringify({type:"volume",volume:volume}))}})}),this.config.debug&&this.on("*",function(event,val1,val2){var logger;logger=self.config.logger===mockconsole?console:self.logger,logger.log("event:",event,val1,val2)})}var util=require("util"),webrtc=require("webrtcsupport"),mockconsole=(require("wildemitter"),require("mockconsole")),localMedia=require("localmedia"),Peer=require("./peer");util.inherits(WebRTC,localMedia),WebRTC.prototype.createPeer=function(opts){var peer;return opts.parent=this,peer=new Peer(opts),this.peers.push(peer),peer},WebRTC.prototype.removePeers=function(id,type){this.getPeers(id,type).forEach(function(peer){peer.end()})},WebRTC.prototype.getPeers=function(sessionId,type){return this.peers.filter(function(peer){return!(sessionId&&peer.id!==sessionId||type&&peer.type!==type)})},WebRTC.prototype.sendToAll=function(message,payload){this.peers.forEach(function(peer){peer.send(message,payload)})},WebRTC.prototype.sendDirectlyToAll=function(channel,message,payload){this.peers.forEach(function(peer){peer.enableDataChannels&&peer.sendDirectly(channel,message,payload)})},module.exports=WebRTC},{"./peer":10,localmedia:11,mockconsole:7,util:9,webrtcsupport:4,wildemitter:5}],9:[function(require,module,exports){function isArray(ar){return Array.isArray(ar)||"object"==typeof ar&&"[object Array]"===Object.prototype.toString.call(ar)}function isRegExp(re){"object"==typeof re&&"[object RegExp]"===Object.prototype.toString.call(re)}function isDate(d){return"object"==typeof d&&"[object Date]"===Object.prototype.toString.call(d)}require("events");exports.isArray=isArray,exports.isDate=function(obj){return"[object Date]"===Object.prototype.toString.call(obj)},exports.isRegExp=function(obj){return"[object RegExp]"===Object.prototype.toString.call(obj)},exports.print=function(){},exports.puts=function(){},exports.debug=function(){},exports.inspect=function(obj,showHidden,depth,colors){function format(value,recurseTimes){if(value&&"function"==typeof value.inspect&&value!==exports&&(!value.constructor||value.constructor.prototype!==value))return value.inspect(recurseTimes);switch(typeof value){case"undefined":return stylize("undefined","undefined");case"string":var simple="'"+JSON.stringify(value).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return stylize(simple,"string");case"number":return stylize(""+value,"number");case"boolean":return stylize(""+value,"boolean")}if(null===value)return stylize("null","null");var visible_keys=Object_keys(value),keys=showHidden?Object_getOwnPropertyNames(value):visible_keys;if("function"==typeof value&&0===keys.length){if(isRegExp(value))return stylize(""+value,"regexp");var name=value.name?": "+value.name:"";return stylize("[Function"+name+"]","special")}if(isDate(value)&&0===keys.length)return stylize(value.toUTCString(),"date");var base,type,braces;if(isArray(value)?(type="Array",braces=["[","]"]):(type="Object",braces=["{","}"]),"function"==typeof value){var n=value.name?": "+value.name:"";base=isRegExp(value)?" "+value:" [Function"+n+"]"}else base="";if(isDate(value)&&(base=" "+value.toUTCString()),0===keys.length)return braces[0]+base+braces[1];if(0>recurseTimes)return isRegExp(value)?stylize(""+value,"regexp"):stylize("[Object]","special");seen.push(value);var output=keys.map(function(key){var name,str;if(value.__lookupGetter__&&(value.__lookupGetter__(key)?str=value.__lookupSetter__(key)?stylize("[Getter/Setter]","special"):stylize("[Getter]","special"):value.__lookupSetter__(key)&&(str=stylize("[Setter]","special"))),visible_keys.indexOf(key)<0&&(name="["+key+"]"),str||(seen.indexOf(value[key])<0?(str=null===recurseTimes?format(value[key]):format(value[key],recurseTimes-1),str.indexOf("\n")>-1&&(str=isArray(value)?str.split("\n").map(function(line){return" "+line}).join("\n").substr(2):"\n"+str.split("\n").map(function(line){return" "+line}).join("\n"))):str=stylize("[Circular]","special")),"undefined"==typeof name){if("Array"===type&&key.match(/^\d+$/))return str;name=JSON.stringify(""+key),name.match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(name=name.substr(1,name.length-2),name=stylize(name,"name")):(name=name.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),name=stylize(name,"string"))}return name+": "+str});seen.pop();var numLinesEst=0,length=output.reduce(function(prev,cur){return numLinesEst++,cur.indexOf("\n")>=0&&numLinesEst++,prev+cur.length+1},0);return output=length>50?braces[0]+(""===base?"":base+"\n ")+" "+output.join(",\n ")+" "+braces[1]:braces[0]+base+" "+output.join(", ")+" "+braces[1]}var seen=[],stylize=function(str,styleType){var styles={bold:[1,22],italic:[3,23],underline:[4,24],inverse:[7,27],white:[37,39],grey:[90,39],black:[30,39],blue:[34,39],cyan:[36,39],green:[32,39],magenta:[35,39],red:[31,39],yellow:[33,39]},style={special:"cyan",number:"blue","boolean":"yellow",undefined:"grey","null":"bold",string:"green",date:"magenta",regexp:"red"}[styleType];return style?"["+styles[style][0]+"m"+str+"["+styles[style][1]+"m":str};return colors||(stylize=function(str,styleType){return str}),format(obj,"undefined"==typeof depth?2:depth)};exports.log=function(msg){},exports.pump=null;var Object_keys=Object.keys||function(obj){var res=[];for(var key in obj)res.push(key);return res},Object_getOwnPropertyNames=Object.getOwnPropertyNames||function(obj){var res=[];for(var key in obj)Object.hasOwnProperty.call(obj,key)&&res.push(key);return res},Object_create=Object.create||function(prototype,properties){var object;if(null===prototype)object={__proto__:null};else{if("object"!=typeof prototype)throw new TypeError("typeof prototype["+typeof prototype+"] != 'object'");var Type=function(){};Type.prototype=prototype,object=new Type,object.__proto__=prototype}return"undefined"!=typeof properties&&Object.defineProperties&&Object.defineProperties(object,properties),object};exports.inherits=function(ctor,superCtor){ctor.super_=superCtor,ctor.prototype=Object_create(superCtor.prototype,{constructor:{value:ctor,enumerable:!1,writable:!0,configurable:!0}})};var formatRegExp=/%[sdj%]/g;exports.format=function(f){if("string"!=typeof f){for(var objects=[],i=0;i=len)return x;switch(x){case"%s":return String(args[i++]);case"%d":return Number(args[i++]);case"%j":return JSON.stringify(args[i++]);default:return x}}),x=args[i];len>i;x=args[++i])str+=null===x||"object"!=typeof x?" "+x:" "+exports.inspect(x);return str}},{events:12}],8:[function(require,module,exports){var io="undefined"==typeof module?{}:module.exports;!function(){if(function(exports,global){var io=exports;io.version="0.9.16",io.protocol=1,io.transports=[],io.j=[],io.sockets={},io.connect=function(host,details){var uuri,socket,uri=io.util.parseUri(host);global&&global.location&&(uri.protocol=uri.protocol||global.location.protocol.slice(0,-1),uri.host=uri.host||(global.document?global.document.domain:global.location.hostname),uri.port=uri.port||global.location.port),uuri=io.util.uniqueUri(uri);var options={host:uri.host,secure:"https"==uri.protocol,port:uri.port||("https"==uri.protocol?443:80),query:uri.query||""};return io.util.merge(options,details),(options["force new connection"]||!io.sockets[uuri])&&(socket=new io.Socket(options)),!options["force new connection"]&&socket&&(io.sockets[uuri]=socket),socket=socket||io.sockets[uuri],socket.of(uri.path.length>1?uri.path:"")}}("object"==typeof module?module.exports:this.io={},this),function(exports,global){var util=exports.util={},re=/^(?:(?![^:@]+:[^:@\/]*@)([^:\/?#.]+):)?(?:\/\/)?((?:(([^:@]*)(?::([^:@]*))?)?@)?([^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/,parts=["source","protocol","authority","userInfo","user","password","host","port","relative","path","directory","file","query","anchor"];util.parseUri=function(str){for(var m=re.exec(str||""),uri={},i=14;i--;)uri[parts[i]]=m[i]||"";return uri},util.uniqueUri=function(uri){var protocol=uri.protocol,host=uri.host,port=uri.port;return"document"in global?(host=host||document.domain,port=port||("https"==protocol&&"https:"!==document.location.protocol?443:document.location.port)):(host=host||"localhost",port||"https"!=protocol||(port=443)),(protocol||"http")+"://"+host+":"+(port||80)},util.query=function(base,addition){var query=util.chunkQuery(base||""),components=[];util.merge(query,util.chunkQuery(addition||""));for(var part in query)query.hasOwnProperty(part)&&components.push(part+"="+query[part]);return components.length?"?"+components.join("&"):""},util.chunkQuery=function(qs){for(var kv,query={},params=qs.split("&"),i=0,l=params.length;l>i;++i)kv=params[i].split("="),kv[0]&&(query[kv[0]]=kv[1]);return query};var pageLoaded=!1;util.load=function(fn){return"document"in global&&"complete"===document.readyState||pageLoaded?fn():void util.on(global,"load",fn,!1)},util.on=function(element,event,fn,capture){element.attachEvent?element.attachEvent("on"+event,fn):element.addEventListener&&element.addEventListener(event,fn,capture)},util.request=function(xdomain){if(xdomain&&"undefined"!=typeof XDomainRequest&&!util.ua.hasCORS)return new XDomainRequest;if("undefined"!=typeof XMLHttpRequest&&(!xdomain||util.ua.hasCORS))return new XMLHttpRequest;if(!xdomain)try{return new(window[["Active"].concat("Object").join("X")])("Microsoft.XMLHTTP")}catch(e){}return null},"undefined"!=typeof window&&util.load(function(){pageLoaded=!0}),util.defer=function(fn){return util.ua.webkit&&"undefined"==typeof importScripts?void util.load(function(){setTimeout(fn,100)}):fn()},util.merge=function(target,additional,deep,lastseen){var prop,seen=lastseen||[],depth="undefined"==typeof deep?2:deep;for(prop in additional)additional.hasOwnProperty(prop)&&util.indexOf(seen,prop)<0&&("object"==typeof target[prop]&&depth?util.merge(target[prop],additional[prop],depth-1,seen):(target[prop]=additional[prop],seen.push(additional[prop])));return target},util.mixin=function(ctor,ctor2){util.merge(ctor.prototype,ctor2.prototype)},util.inherit=function(ctor,ctor2){function f(){}f.prototype=ctor2.prototype,ctor.prototype=new f},util.isArray=Array.isArray||function(obj){return"[object Array]"===Object.prototype.toString.call(obj)},util.intersect=function(arr,arr2){for(var ret=[],longest=arr.length>arr2.length?arr:arr2,shortest=arr.length>arr2.length?arr2:arr,i=0,l=shortest.length;l>i;i++)~util.indexOf(longest,shortest[i])&&ret.push(shortest[i]);return ret},util.indexOf=function(arr,o,i){for(var j=arr.length,i=0>i?0>i+j?0:i+j:i||0;j>i&&arr[i]!==o;i++);return i>=j?-1:i},util.toArray=function(enu){for(var arr=[],i=0,l=enu.length;l>i;i++)arr.push(enu[i]);return arr},util.ua={},util.ua.hasCORS="undefined"!=typeof XMLHttpRequest&&function(){try{var a=new XMLHttpRequest}catch(e){return!1}return void 0!=a.withCredentials}(),util.ua.webkit="undefined"!=typeof navigator&&/webkit/i.test(navigator.userAgent),util.ua.iDevice="undefined"!=typeof navigator&&/iPad|iPhone|iPod/i.test(navigator.userAgent)}("undefined"!=typeof io?io:module.exports,this),function(exports,io){function EventEmitter(){}exports.EventEmitter=EventEmitter,EventEmitter.prototype.on=function(name,fn){return this.$events||(this.$events={}),this.$events[name]?io.util.isArray(this.$events[name])?this.$events[name].push(fn):this.$events[name]=[this.$events[name],fn]:this.$events[name]=fn,this},EventEmitter.prototype.addListener=EventEmitter.prototype.on,EventEmitter.prototype.once=function(name,fn){function on(){self.removeListener(name,on),fn.apply(this,arguments)}var self=this;return on.listener=fn,this.on(name,on),this},EventEmitter.prototype.removeListener=function(name,fn){if(this.$events&&this.$events[name]){var list=this.$events[name];if(io.util.isArray(list)){for(var pos=-1,i=0,l=list.length;l>i;i++)if(list[i]===fn||list[i].listener&&list[i].listener===fn){pos=i;break}if(0>pos)return this;list.splice(pos,1),list.length||delete this.$events[name]}else(list===fn||list.listener&&list.listener===fn)&&delete this.$events[name]}return this},EventEmitter.prototype.removeAllListeners=function(name){return void 0===name?(this.$events={},this):(this.$events&&this.$events[name]&&(this.$events[name]=null),this)},EventEmitter.prototype.listeners=function(name){return this.$events||(this.$events={}),this.$events[name]||(this.$events[name]=[]),io.util.isArray(this.$events[name])||(this.$events[name]=[this.$events[name]]),this.$events[name]},EventEmitter.prototype.emit=function(name){if(!this.$events)return!1;var handler=this.$events[name];if(!handler)return!1;var args=Array.prototype.slice.call(arguments,1);if("function"==typeof handler)handler.apply(this,args);else{if(!io.util.isArray(handler))return!1;for(var listeners=handler.slice(),i=0,l=listeners.length;l>i;i++)listeners[i].apply(this,args)}return!0}}("undefined"!=typeof io?io:module.exports,"undefined"!=typeof io?io:module.parent.exports),function(exports,nativeJSON){"use strict";function f(n){return 10>n?"0"+n:n}function date(d,key){return isFinite(d.valueOf())?d.getUTCFullYear()+"-"+f(d.getUTCMonth()+1)+"-"+f(d.getUTCDate())+"T"+f(d.getUTCHours())+":"+f(d.getUTCMinutes())+":"+f(d.getUTCSeconds())+"Z":null}function quote(string){return escapable.lastIndex=0,escapable.test(string)?'"'+string.replace(escapable,function(a){var c=meta[a];return"string"==typeof c?c:"\\u"+("0000"+a.charCodeAt(0).toString(16)).slice(-4)})+'"':'"'+string+'"'}function str(key,holder){var i,k,v,length,partial,mind=gap,value=holder[key];switch(value instanceof Date&&(value=date(key)),"function"==typeof rep&&(value=rep.call(holder,key,value)),typeof value){case"string":return quote(value);case"number":return isFinite(value)?String(value):"null";case"boolean":case"null":return String(value);case"object":if(!value)return"null";if(gap+=indent,partial=[],"[object Array]"===Object.prototype.toString.apply(value)){for(length=value.length,i=0;length>i;i+=1)partial[i]=str(i,value)||"null";return v=0===partial.length?"[]":gap?"[\n"+gap+partial.join(",\n"+gap)+"\n"+mind+"]":"["+partial.join(",")+"]",gap=mind,v}if(rep&&"object"==typeof rep)for(length=rep.length,i=0;length>i;i+=1)"string"==typeof rep[i]&&(k=rep[i],v=str(k,value),v&&partial.push(quote(k)+(gap?": ":":")+v));else for(k in value)Object.prototype.hasOwnProperty.call(value,k)&&(v=str(k,value),v&&partial.push(quote(k)+(gap?": ":":")+v));return v=0===partial.length?"{}":gap?"{\n"+gap+partial.join(",\n"+gap)+"\n"+mind+"}":"{"+partial.join(",")+"}",gap=mind,v}}if(nativeJSON&&nativeJSON.parse)return exports.JSON={parse:nativeJSON.parse,stringify:nativeJSON.stringify};var JSON=exports.JSON={},cx=/[\u0000\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,escapable=/[\\\"\x00-\x1f\x7f-\x9f\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,gap,indent,meta={"\b":"\\b"," ":"\\t","\n":"\\n","\f":"\\f","\r":"\\r",'"':'\\"',"\\":"\\\\"},rep;JSON.stringify=function(value,replacer,space){var i;if(gap="",indent="","number"==typeof space)for(i=0;space>i;i+=1)indent+=" ";else"string"==typeof space&&(indent=space);if(rep=replacer,replacer&&"function"!=typeof replacer&&("object"!=typeof replacer||"number"!=typeof replacer.length))throw new Error("JSON.stringify");return str("",{"":value})},JSON.parse=function(text,reviver){function walk(holder,key){var k,v,value=holder[key];if(value&&"object"==typeof value)for(k in value)Object.prototype.hasOwnProperty.call(value,k)&&(v=walk(value,k), void 0!==v?value[k]=v:delete value[k]);return reviver.call(holder,key,value)}var j;if(text=String(text),cx.lastIndex=0,cx.test(text)&&(text=text.replace(cx,function(a){return"\\u"+("0000"+a.charCodeAt(0).toString(16)).slice(-4)})),/^[\],:{}\s]*$/.test(text.replace(/\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g,"@").replace(/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,"]").replace(/(?:^|:|,)(?:\s*\[)+/g,"")))return j=eval("("+text+")"),"function"==typeof reviver?walk({"":j},""):j;throw new SyntaxError("JSON.parse")}}("undefined"!=typeof io?io:module.exports,"undefined"!=typeof JSON?JSON:void 0),function(exports,io){var parser=exports.parser={},packets=parser.packets=["disconnect","connect","heartbeat","message","json","event","ack","error","noop"],reasons=parser.reasons=["transport not supported","client not handshaken","unauthorized"],advice=parser.advice=["reconnect"],JSON=io.JSON,indexOf=io.util.indexOf;parser.encodePacket=function(packet){var type=indexOf(packets,packet.type),id=packet.id||"",endpoint=packet.endpoint||"",ack=packet.ack,data=null;switch(packet.type){case"error":var reason=packet.reason?indexOf(reasons,packet.reason):"",adv=packet.advice?indexOf(advice,packet.advice):"";(""!==reason||""!==adv)&&(data=reason+(""!==adv?"+"+adv:""));break;case"message":""!==packet.data&&(data=packet.data);break;case"event":var ev={name:packet.name};packet.args&&packet.args.length&&(ev.args=packet.args),data=JSON.stringify(ev);break;case"json":data=JSON.stringify(packet.data);break;case"connect":packet.qs&&(data=packet.qs);break;case"ack":data=packet.ackId+(packet.args&&packet.args.length?"+"+JSON.stringify(packet.args):"")}var encoded=[type,id+("data"==ack?"+":""),endpoint];return null!==data&&void 0!==data&&encoded.push(data),encoded.join(":")},parser.encodePayload=function(packets){var decoded="";if(1==packets.length)return packets[0];for(var i=0,l=packets.length;l>i;i++){var packet=packets[i];decoded+="�"+packet.length+"�"+packets[i]}return decoded};var regexp=/([^:]+):([0-9]+)?(\+)?:([^:]+)?:?([\s\S]*)?/;parser.decodePacket=function(data){var pieces=data.match(regexp);if(!pieces)return{};var id=pieces[2]||"",data=pieces[5]||"",packet={type:packets[pieces[1]],endpoint:pieces[4]||""};switch(id&&(packet.id=id,pieces[3]?packet.ack="data":packet.ack=!0),packet.type){case"error":var pieces=data.split("+");packet.reason=reasons[pieces[0]]||"",packet.advice=advice[pieces[1]]||"";break;case"message":packet.data=data||"";break;case"event":try{var opts=JSON.parse(data);packet.name=opts.name,packet.args=opts.args}catch(e){}packet.args=packet.args||[];break;case"json":try{packet.data=JSON.parse(data)}catch(e){}break;case"connect":packet.qs=data||"";break;case"ack":var pieces=data.match(/^([0-9]+)(\+)?(.*)/);if(pieces&&(packet.ackId=pieces[1],packet.args=[],pieces[3]))try{packet.args=pieces[3]?JSON.parse(pieces[3]):[]}catch(e){}break;case"disconnect":case"heartbeat":}return packet},parser.decodePayload=function(data){if("�"==data.charAt(0)){for(var ret=[],i=1,length="";ii;i++)this.onPacket(msgs[i])}return this},Transport.prototype.onPacket=function(packet){return this.socket.setHeartbeatTimeout(),"heartbeat"==packet.type?this.onHeartbeat():("connect"==packet.type&&""==packet.endpoint&&this.onConnect(),"error"==packet.type&&"reconnect"==packet.advice&&(this.isOpen=!1),this.socket.onPacket(packet),this)},Transport.prototype.setCloseTimeout=function(){if(!this.closeTimeout){var self=this;this.closeTimeout=setTimeout(function(){self.onDisconnect()},this.socket.closeTimeout)}},Transport.prototype.onDisconnect=function(){return this.isOpen&&this.close(),this.clearTimeouts(),this.socket.onDisconnect(),this},Transport.prototype.onConnect=function(){return this.socket.onConnect(),this},Transport.prototype.clearCloseTimeout=function(){this.closeTimeout&&(clearTimeout(this.closeTimeout),this.closeTimeout=null)},Transport.prototype.clearTimeouts=function(){this.clearCloseTimeout(),this.reopenTimeout&&clearTimeout(this.reopenTimeout)},Transport.prototype.packet=function(packet){this.send(io.parser.encodePacket(packet))},Transport.prototype.onHeartbeat=function(heartbeat){this.packet({type:"heartbeat"})},Transport.prototype.onOpen=function(){this.isOpen=!0,this.clearCloseTimeout(),this.socket.onOpen()},Transport.prototype.onClose=function(){this.isOpen=!1,this.socket.onClose(),this.onDisconnect()},Transport.prototype.prepareUrl=function(){var options=this.socket.options;return this.scheme()+"://"+options.host+":"+options.port+"/"+options.resource+"/"+io.protocol+"/"+this.name+"/"+this.sessid},Transport.prototype.ready=function(socket,fn){fn.call(this)}}("undefined"!=typeof io?io:module.exports,"undefined"!=typeof io?io:module.parent.exports),function(exports,io,global){function Socket(options){if(this.options={port:80,secure:!1,document:"document"in global?document:!1,resource:"socket.io",transports:io.transports,"connect timeout":1e4,"try multiple transports":!0,reconnect:!0,"reconnection delay":500,"reconnection limit":1/0,"reopen delay":3e3,"max reconnection attempts":10,"sync disconnect on unload":!1,"auto connect":!0,"flash policy port":10843,manualFlush:!1},io.util.merge(this.options,options),this.connected=!1,this.open=!1,this.connecting=!1,this.reconnecting=!1,this.namespaces={},this.buffer=[],this.doBuffer=!1,this.options["sync disconnect on unload"]&&(!this.isXDomain()||io.util.ua.hasCORS)){var self=this;io.util.on(global,"beforeunload",function(){self.disconnectSync()},!1)}this.options["auto connect"]&&this.connect()}function empty(){}exports.Socket=Socket,io.util.mixin(Socket,io.EventEmitter),Socket.prototype.of=function(name){return this.namespaces[name]||(this.namespaces[name]=new io.SocketNamespace(this,name),""!==name&&this.namespaces[name].packet({type:"connect"})),this.namespaces[name]},Socket.prototype.publish=function(){this.emit.apply(this,arguments);var nsp;for(var i in this.namespaces)this.namespaces.hasOwnProperty(i)&&(nsp=this.of(i),nsp.$emit.apply(nsp,arguments))},Socket.prototype.handshake=function(fn){function complete(data){data instanceof Error?(self.connecting=!1,self.onError(data.message)):fn.apply(null,data.split(":"))}var self=this,options=this.options,url=["http"+(options.secure?"s":"")+":/",options.host+":"+options.port,options.resource,io.protocol,io.util.query(this.options.query,"t="+ +new Date)].join("/");if(this.isXDomain()&&!io.util.ua.hasCORS){var insertAt=document.getElementsByTagName("script")[0],script=document.createElement("script");script.src=url+"&jsonp="+io.j.length,insertAt.parentNode.insertBefore(script,insertAt),io.j.push(function(data){complete(data),script.parentNode.removeChild(script)})}else{var xhr=io.util.request();xhr.open("GET",url,!0),this.isXDomain()&&(xhr.withCredentials=!0),xhr.onreadystatechange=function(){4==xhr.readyState&&(xhr.onreadystatechange=empty,200==xhr.status?complete(xhr.responseText):403==xhr.status?self.onError(xhr.responseText):(self.connecting=!1,!self.reconnecting&&self.onError(xhr.responseText)))},xhr.send(null)}},Socket.prototype.getTransport=function(override){for(var transport,transports=override||this.transports,i=0;transport=transports[i];i++)if(io.Transport[transport]&&io.Transport[transport].check(this)&&(!this.isXDomain()||io.Transport[transport].xdomainCheck(this)))return new io.Transport[transport](this,this.sessionid);return null},Socket.prototype.connect=function(fn){if(this.connecting)return this;var self=this;return self.connecting=!0,this.handshake(function(sid,heartbeat,close,transports){function connect(transports){return self.transport&&self.transport.clearTimeouts(),self.transport=self.getTransport(transports),self.transport?void self.transport.ready(self,function(){self.connecting=!0,self.publish("connecting",self.transport.name),self.transport.open(),self.options["connect timeout"]&&(self.connectTimeoutTimer=setTimeout(function(){if(!self.connected&&(self.connecting=!1,self.options["try multiple transports"])){for(var remaining=self.transports;remaining.length>0&&remaining.splice(0,1)[0]!=self.transport.name;);remaining.length?connect(remaining):self.publish("connect_failed")}},self.options["connect timeout"]))}):self.publish("connect_failed")}self.sessionid=sid,self.closeTimeout=1e3*close,self.heartbeatTimeout=1e3*heartbeat,self.transports||(self.transports=self.origTransports=transports?io.util.intersect(transports.split(","),self.options.transports):self.options.transports),self.setHeartbeatTimeout(),connect(self.transports),self.once("connect",function(){clearTimeout(self.connectTimeoutTimer),fn&&"function"==typeof fn&&fn()})}),this},Socket.prototype.setHeartbeatTimeout=function(){if(clearTimeout(this.heartbeatTimeoutTimer),!this.transport||this.transport.heartbeats()){var self=this;this.heartbeatTimeoutTimer=setTimeout(function(){self.transport.onClose()},this.heartbeatTimeout)}},Socket.prototype.packet=function(data){return this.connected&&!this.doBuffer?this.transport.packet(data):this.buffer.push(data),this},Socket.prototype.setBuffer=function(v){this.doBuffer=v,!v&&this.connected&&this.buffer.length&&(this.options.manualFlush||this.flushBuffer())},Socket.prototype.flushBuffer=function(){this.transport.payload(this.buffer),this.buffer=[]},Socket.prototype.disconnect=function(){return(this.connected||this.connecting)&&(this.open&&this.of("").packet({type:"disconnect"}),this.onDisconnect("booted")),this},Socket.prototype.disconnectSync=function(){var xhr=io.util.request(),uri=["http"+(this.options.secure?"s":"")+":/",this.options.host+":"+this.options.port,this.options.resource,io.protocol,"",this.sessionid].join("/")+"/?disconnect=1";xhr.open("GET",uri,!1),xhr.send(null),this.onDisconnect("booted")},Socket.prototype.isXDomain=function(){var port=global.location.port||("https:"==global.location.protocol?443:80);return this.options.host!==global.location.hostname||this.options.port!=port},Socket.prototype.onConnect=function(){this.connected||(this.connected=!0,this.connecting=!1,this.doBuffer||this.setBuffer(!1),this.emit("connect"))},Socket.prototype.onOpen=function(){this.open=!0},Socket.prototype.onClose=function(){this.open=!1,clearTimeout(this.heartbeatTimeoutTimer)},Socket.prototype.onPacket=function(packet){this.of(packet.endpoint).onPacket(packet)},Socket.prototype.onError=function(err){err&&err.advice&&"reconnect"===err.advice&&(this.connected||this.connecting)&&(this.disconnect(),this.options.reconnect&&this.reconnect()),this.publish("error",err&&err.reason?err.reason:err)},Socket.prototype.onDisconnect=function(reason){var wasConnected=this.connected,wasConnecting=this.connecting;this.connected=!1,this.connecting=!1,this.open=!1,(wasConnected||wasConnecting)&&(this.transport.close(),this.transport.clearTimeouts(),wasConnected&&(this.publish("disconnect",reason),"booted"!=reason&&this.options.reconnect&&!this.reconnecting&&this.reconnect()))},Socket.prototype.reconnect=function(){function reset(){if(self.connected){for(var i in self.namespaces)self.namespaces.hasOwnProperty(i)&&""!==i&&self.namespaces[i].packet({type:"connect"});self.publish("reconnect",self.transport.name,self.reconnectionAttempts)}clearTimeout(self.reconnectionTimer),self.removeListener("connect_failed",maybeReconnect),self.removeListener("connect",maybeReconnect),self.reconnecting=!1,delete self.reconnectionAttempts,delete self.reconnectionDelay,delete self.reconnectionTimer,delete self.redoTransports,self.options["try multiple transports"]=tryMultiple}function maybeReconnect(){return self.reconnecting?self.connected?reset():self.connecting&&self.reconnecting?self.reconnectionTimer=setTimeout(maybeReconnect,1e3):void(self.reconnectionAttempts++>=maxAttempts?self.redoTransports?(self.publish("reconnect_failed"),reset()):(self.on("connect_failed",maybeReconnect),self.options["try multiple transports"]=!0,self.transports=self.origTransports,self.transport=self.getTransport(),self.redoTransports=!0,self.connect()):(self.reconnectionDelayi;i++)this.packet(arr[i]);return this},WS.prototype.close=function(){return this.websocket.close(),this},WS.prototype.onError=function(e){this.socket.onError(e)},WS.prototype.scheme=function(){return this.socket.options.secure?"wss":"ws"},WS.check=function(){return"WebSocket"in global&&!("__addTask"in WebSocket)||"MozWebSocket"in global},WS.xdomainCheck=function(){return!0},io.transports.push("websocket")}("undefined"!=typeof io?io.Transport:module.exports,"undefined"!=typeof io?io:module.parent.exports,this),function(exports,io){function Flashsocket(){io.Transport.websocket.apply(this,arguments)}exports.flashsocket=Flashsocket,io.util.inherit(Flashsocket,io.Transport.websocket),Flashsocket.prototype.name="flashsocket",Flashsocket.prototype.open=function(){var self=this,args=arguments;return WebSocket.__addTask(function(){io.Transport.websocket.prototype.open.apply(self,args)}),this},Flashsocket.prototype.send=function(){var self=this,args=arguments;return WebSocket.__addTask(function(){io.Transport.websocket.prototype.send.apply(self,args)}),this},Flashsocket.prototype.close=function(){return WebSocket.__tasks.length=0,io.Transport.websocket.prototype.close.call(this),this},Flashsocket.prototype.ready=function(socket,fn){function init(){var options=socket.options,port=options["flash policy port"],path=["http"+(options.secure?"s":"")+":/",options.host+":"+options.port,options.resource,"static/flashsocket","WebSocketMain"+(socket.isXDomain()?"Insecure":"")+".swf"];Flashsocket.loaded||("undefined"==typeof WEB_SOCKET_SWF_LOCATION&&(WEB_SOCKET_SWF_LOCATION=path.join("/")),843!==port&&WebSocket.loadFlashPolicyFile("xmlsocket://"+options.host+":"+port),WebSocket.__initialize(),Flashsocket.loaded=!0),fn.call(self)}var self=this;return document.body?init():void io.util.load(init)},Flashsocket.check=function(){return"undefined"!=typeof WebSocket&&"__initialize"in WebSocket&&swfobject?swfobject.getFlashPlayerVersion().major>=10:!1},Flashsocket.xdomainCheck=function(){return!0},"undefined"!=typeof window&&(WEB_SOCKET_DISABLE_AUTO_INITIALIZATION=!0),io.transports.push("flashsocket")}("undefined"!=typeof io?io.Transport:module.exports,"undefined"!=typeof io?io:module.parent.exports),"undefined"!=typeof window)var swfobject=function(){function f(){if(!J){try{var Z=j.getElementsByTagName("body")[0].appendChild(C("span"));Z.parentNode.removeChild(Z)}catch(aa){return}J=!0;for(var X=U.length,Y=0;X>Y;Y++)U[Y]()}}function K(X){J?X():U[U.length]=X}function s(Y){if(typeof O.addEventListener!=D)O.addEventListener("load",Y,!1);else if(typeof j.addEventListener!=D)j.addEventListener("load",Y,!1);else if(typeof O.attachEvent!=D)i(O,"onload",Y);else if("function"==typeof O.onload){var X=O.onload;O.onload=function(){X(),Y()}}else O.onload=Y}function h(){T?V():H()}function V(){var X=j.getElementsByTagName("body")[0],aa=C(r);aa.setAttribute("type",q);var Z=X.appendChild(aa);if(Z){var Y=0;!function(){if(typeof Z.GetVariable!=D){var ab=Z.GetVariable("$version");ab&&(ab=ab.split(" ")[1].split(","),M.pv=[parseInt(ab[0],10),parseInt(ab[1],10),parseInt(ab[2],10)])}else if(10>Y)return Y++,void setTimeout(arguments.callee,10);X.removeChild(aa),Z=null,H()}()}else H()}function H(){var ag=o.length;if(ag>0)for(var af=0;ag>af;af++){var Y=o[af].id,ab=o[af].callbackFn,aa={success:!1,id:Y};if(M.pv[0]>0){var ae=c(Y);if(ae)if(!F(o[af].swfVersion)||M.wk&&M.wk<312)if(o[af].expressInstall&&A()){var ai={};ai.data=o[af].expressInstall,ai.width=ae.getAttribute("width")||"0",ai.height=ae.getAttribute("height")||"0",ae.getAttribute("class")&&(ai.styleclass=ae.getAttribute("class")),ae.getAttribute("align")&&(ai.align=ae.getAttribute("align"));for(var ah={},X=ae.getElementsByTagName("param"),ac=X.length,ad=0;ac>ad;ad++)"movie"!=X[ad].getAttribute("name").toLowerCase()&&(ah[X[ad].getAttribute("name")]=X[ad].getAttribute("value"));P(ai,ah,Y,ab)}else p(ae),ab&&ab(aa);else w(Y,!0),ab&&(aa.success=!0,aa.ref=z(Y),ab(aa))}else if(w(Y,!0),ab){var Z=z(Y);Z&&typeof Z.SetVariable!=D&&(aa.success=!0,aa.ref=Z),ab(aa)}}}function z(aa){var X=null,Y=c(aa);if(Y&&"OBJECT"==Y.nodeName)if(typeof Y.SetVariable!=D)X=Y;else{var Z=Y.getElementsByTagName(r)[0];Z&&(X=Z)}return X}function A(){return!a&&F("6.0.65")&&(M.win||M.mac)&&!(M.wk&&M.wk<312)}function P(aa,ab,X,Z){a=!0,E=Z||null,B={success:!1,id:X};var ae=c(X);if(ae){"OBJECT"==ae.nodeName?(l=g(ae),Q=null):(l=ae,Q=X),aa.id=R,(typeof aa.width==D||!/%$/.test(aa.width)&&parseInt(aa.width,10)<310)&&(aa.width="310"),(typeof aa.height==D||!/%$/.test(aa.height)&&parseInt(aa.height,10)<137)&&(aa.height="137"),j.title=j.title.slice(0,47)+" - Flash Player Installation";var ad=M.ie&&M.win?["Active"].concat("").join("X"):"PlugIn",ac="MMredirectURL="+O.location.toString().replace(/&/g,"%26")+"&MMplayerType="+ad+"&MMdoctitle="+j.title;if(typeof ab.flashvars!=D?ab.flashvars+="&"+ac:ab.flashvars=ac,M.ie&&M.win&&4!=ae.readyState){var Y=C("div");X+="SWFObjectNew",Y.setAttribute("id",X),ae.parentNode.insertBefore(Y,ae),ae.style.display="none",function(){4==ae.readyState?ae.parentNode.removeChild(ae):setTimeout(arguments.callee,10)}()}u(aa,ab,X)}}function p(Y){if(M.ie&&M.win&&4!=Y.readyState){var X=C("div");Y.parentNode.insertBefore(X,Y),X.parentNode.replaceChild(g(Y),X),Y.style.display="none",function(){4==Y.readyState?Y.parentNode.removeChild(Y):setTimeout(arguments.callee,10)}()}else Y.parentNode.replaceChild(g(Y),Y)}function g(ab){var aa=C("div");if(M.win&&M.ie)aa.innerHTML=ab.innerHTML;else{var Y=ab.getElementsByTagName(r)[0];if(Y){var ad=Y.childNodes;if(ad)for(var X=ad.length,Z=0;X>Z;Z++)1==ad[Z].nodeType&&"PARAM"==ad[Z].nodeName||8==ad[Z].nodeType||aa.appendChild(ad[Z].cloneNode(!0))}}return aa}function u(ai,ag,Y){var X,aa=c(Y);if(M.wk&&M.wk<312)return X;if(aa)if(typeof ai.id==D&&(ai.id=Y),M.ie&&M.win){var ah="";for(var ae in ai)ai[ae]!=Object.prototype[ae]&&("data"==ae.toLowerCase()?ag.movie=ai[ae]:"styleclass"==ae.toLowerCase()?ah+=' class="'+ai[ae]+'"':"classid"!=ae.toLowerCase()&&(ah+=" "+ae+'="'+ai[ae]+'"'));var af="";for(var ad in ag)ag[ad]!=Object.prototype[ad]&&(af+='');aa.outerHTML='"+af+"",N[N.length]=ai.id,X=c(ai.id)}else{var Z=C(r);Z.setAttribute("type",q);for(var ac in ai)ai[ac]!=Object.prototype[ac]&&("styleclass"==ac.toLowerCase()?Z.setAttribute("class",ai[ac]):"classid"!=ac.toLowerCase()&&Z.setAttribute(ac,ai[ac]));for(var ab in ag)ag[ab]!=Object.prototype[ab]&&"movie"!=ab.toLowerCase()&&e(Z,ab,ag[ab]);aa.parentNode.replaceChild(Z,aa),X=Z}return X}function e(Z,X,Y){var aa=C("param");aa.setAttribute("name",X),aa.setAttribute("value",Y),Z.appendChild(aa)}function y(Y){var X=c(Y);X&&"OBJECT"==X.nodeName&&(M.ie&&M.win?(X.style.display="none",function(){4==X.readyState?b(Y):setTimeout(arguments.callee,10)}()):X.parentNode.removeChild(X))}function b(Z){var Y=c(Z);if(Y){for(var X in Y)"function"==typeof Y[X]&&(Y[X]=null);Y.parentNode.removeChild(Y)}}function c(Z){var X=null;try{X=j.getElementById(Z)}catch(Y){}return X}function C(X){return j.createElement(X)}function i(Z,X,Y){Z.attachEvent(X,Y),I[I.length]=[Z,X,Y]}function F(Z){var Y=M.pv,X=Z.split(".");return X[0]=parseInt(X[0],10),X[1]=parseInt(X[1],10)||0,X[2]=parseInt(X[2],10)||0,Y[0]>X[0]||Y[0]==X[0]&&Y[1]>X[1]||Y[0]==X[0]&&Y[1]==X[1]&&Y[2]>=X[2]?!0:!1}function v(ac,Y,ad,ab){if(!M.ie||!M.mac){var aa=j.getElementsByTagName("head")[0];if(aa){var X=ad&&"string"==typeof ad?ad:"screen";if(ab&&(n=null,G=null),!n||G!=X){var Z=C("style");Z.setAttribute("type","text/css"),Z.setAttribute("media",X),n=aa.appendChild(Z),M.ie&&M.win&&typeof j.styleSheets!=D&&j.styleSheets.length>0&&(n=j.styleSheets[j.styleSheets.length-1]),G=X}M.ie&&M.win?n&&typeof n.addRule==r&&n.addRule(ac,Y):n&&typeof j.createTextNode!=D&&n.appendChild(j.createTextNode(ac+" {"+Y+"}"))}}}function w(Z,X){if(m){var Y=X?"visible":"hidden";J&&c(Z)?c(Z).style.visibility=Y:v("#"+Z,"visibility:"+Y)}}function L(Y){var Z=/[\\\"<>\.;]/,X=null!=Z.exec(Y);return X&&typeof encodeURIComponent!=D?encodeURIComponent(Y):Y}var l,Q,E,B,n,G,D="undefined",r="object",S="Shockwave Flash",W="ShockwaveFlash.ShockwaveFlash",q="application/x-shockwave-flash",R="SWFObjectExprInst",x="onreadystatechange",O=window,j=document,t=navigator,T=!1,U=[h],o=[],N=[],I=[],J=!1,a=!1,m=!0,M=function(){var aa=typeof j.getElementById!=D&&typeof j.getElementsByTagName!=D&&typeof j.createElement!=D,ah=t.userAgent.toLowerCase(),Y=t.platform.toLowerCase(),ae=Y?/win/.test(Y):/win/.test(ah),ac=Y?/mac/.test(Y):/mac/.test(ah),af=/webkit/.test(ah)?parseFloat(ah.replace(/^.*webkit\/(\d+(\.\d+)?).*$/,"$1")):!1,X=!1,ag=[0,0,0],ab=null;if(typeof t.plugins!=D&&typeof t.plugins[S]==r)ab=t.plugins[S].description,!ab||typeof t.mimeTypes!=D&&t.mimeTypes[q]&&!t.mimeTypes[q].enabledPlugin||(T=!0,X=!1,ab=ab.replace(/^.*\s+(\S+\s+\S+$)/,"$1"),ag[0]=parseInt(ab.replace(/^(.*)\..*$/,"$1"),10),ag[1]=parseInt(ab.replace(/^.*\.(.*)\s.*$/,"$1"),10),ag[2]=/[a-zA-Z]/.test(ab)?parseInt(ab.replace(/^.*[a-zA-Z]+(.*)$/,"$1"),10):0);else if(typeof O[["Active"].concat("Object").join("X")]!=D)try{var ad=new(window[["Active"].concat("Object").join("X")])(W);ad&&(ab=ad.GetVariable("$version"),ab&&(X=!0,ab=ab.split(" ")[1].split(","),ag=[parseInt(ab[0],10),parseInt(ab[1],10),parseInt(ab[2],10)]))}catch(Z){}return{w3:aa,pv:ag,wk:af,ie:X,win:ae,mac:ac}}();(function(){M.w3&&((typeof j.readyState!=D&&"complete"==j.readyState||typeof j.readyState==D&&(j.getElementsByTagName("body")[0]||j.body))&&f(),J||(typeof j.addEventListener!=D&&j.addEventListener("DOMContentLoaded",f,!1),M.ie&&M.win&&(j.attachEvent(x,function(){"complete"==j.readyState&&(j.detachEvent(x,arguments.callee),f())}),O==top&&!function(){if(!J){try{j.documentElement.doScroll("left")}catch(X){return void setTimeout(arguments.callee,0)}f()}}()),M.wk&&!function(){return J?void 0:/loaded|complete/.test(j.readyState)?void f():void setTimeout(arguments.callee,0)}(),s(f)))})(),function(){M.ie&&M.win&&window.attachEvent("onunload",function(){for(var ac=I.length,ab=0;ac>ab;ab++)I[ab][0].detachEvent(I[ab][1],I[ab][2]);for(var Z=N.length,aa=0;Z>aa;aa++)y(N[aa]);for(var Y in M)M[Y]=null;M=null;for(var X in swfobject)swfobject[X]=null;swfobject=null})}();return{registerObject:function(ab,X,aa,Z){if(M.w3&&ab&&X){var Y={};Y.id=ab,Y.swfVersion=X,Y.expressInstall=aa,Y.callbackFn=Z,o[o.length]=Y,w(ab,!1)}else Z&&Z({success:!1,id:ab})},getObjectById:function(X){return M.w3?z(X):void 0},embedSWF:function(ab,ah,ae,ag,Y,aa,Z,ad,af,ac){var X={success:!1,id:ah};M.w3&&!(M.wk&&M.wk<312)&&ab&&ah&&ae&&ag&&Y?(w(ah,!1),K(function(){ae+="",ag+="";var aj={};if(af&&typeof af===r)for(var al in af)aj[al]=af[al];aj.data=ab,aj.width=ae,aj.height=ag;var am={};if(ad&&typeof ad===r)for(var ak in ad)am[ak]=ad[ak];if(Z&&typeof Z===r)for(var ai in Z)typeof am.flashvars!=D?am.flashvars+="&"+ai+"="+Z[ai]:am.flashvars=ai+"="+Z[ai];if(F(Y)){var an=u(aj,am,ah);aj.id==ah&&w(ah,!0),X.success=!0,X.ref=an}else{if(aa&&A())return aj.data=aa,void P(aj,am,ah,ac);w(ah,!0)}ac&&ac(X)})):ac&&ac(X)},switchOffAutoHideShow:function(){m=!1},ua:M,getFlashPlayerVersion:function(){return{major:M.pv[0],minor:M.pv[1],release:M.pv[2]}},hasFlashPlayerVersion:F,createSWF:function(Z,Y,X){return M.w3?u(Z,Y,X):void 0},showExpressInstall:function(Z,aa,X,Y){M.w3&&A()&&P(Z,aa,X,Y)},removeSWF:function(X){M.w3&&y(X)},createCSS:function(aa,Z,Y,X){M.w3&&v(aa,Z,Y,X)},addDomLoadEvent:K,addLoadEvent:s,getQueryParamValue:function(aa){var Z=j.location.search||j.location.hash;if(Z){if(/\?/.test(Z)&&(Z=Z.split("?")[1]),null==aa)return L(Z);for(var Y=Z.split("&"),X=0;X= 10.0.0 is required.");"file:"==location.protocol&&console.error("WARNING: web-socket-js doesn't work in file:///... URL unless you set Flash Security Settings properly. Open the page via Web server i.e. http://..."),WebSocket=function(url,protocols,proxyHost,proxyPort,headers){var self=this;self.__id=WebSocket.__nextId++,WebSocket.__instances[self.__id]=self,self.readyState=WebSocket.CONNECTING,self.bufferedAmount=0,self.__events={},protocols?"string"==typeof protocols&&(protocols=[protocols]):protocols=[],setTimeout(function(){WebSocket.__addTask(function(){WebSocket.__flash.create(self.__id,url,protocols,proxyHost||null,proxyPort||0,headers||null)})},0)},WebSocket.prototype.send=function(data){if(this.readyState==WebSocket.CONNECTING)throw"INVALID_STATE_ERR: Web Socket connection has not been established";var result=WebSocket.__flash.send(this.__id,encodeURIComponent(data));return 0>result?!0:(this.bufferedAmount+=result,!1)},WebSocket.prototype.close=function(){this.readyState!=WebSocket.CLOSED&&this.readyState!=WebSocket.CLOSING&&(this.readyState=WebSocket.CLOSING,WebSocket.__flash.close(this.__id))},WebSocket.prototype.addEventListener=function(type,listener,useCapture){type in this.__events||(this.__events[type]=[]),this.__events[type].push(listener)},WebSocket.prototype.removeEventListener=function(type,listener,useCapture){if(type in this.__events)for(var events=this.__events[type],i=events.length-1;i>=0;--i)if(events[i]===listener){events.splice(i,1);break}},WebSocket.prototype.dispatchEvent=function(event){for(var events=this.__events[event.type]||[],i=0;ii;i++)msgs.push(io.parser.encodePacket(payload[i]));this.send(io.parser.encodePayload(msgs))},XHR.prototype.send=function(data){return this.post(data),this},XHR.prototype.post=function(data){function stateChange(){4==this.readyState&&(this.onreadystatechange=empty,self.posting=!1,200==this.status?self.socket.setBuffer(!1):self.onClose())}function onload(){this.onload=empty,self.socket.setBuffer(!1)}var self=this;this.socket.setBuffer(!0),this.sendXHR=this.request("POST"),global.XDomainRequest&&this.sendXHR instanceof XDomainRequest?this.sendXHR.onload=this.sendXHR.onerror=onload:this.sendXHR.onreadystatechange=stateChange,this.sendXHR.send(data)},XHR.prototype.close=function(){return this.onClose(),this},XHR.prototype.request=function(method){var req=io.util.request(this.socket.isXDomain()),query=io.util.query(this.socket.options.query,"t="+ +new Date);if(req.open(method||"GET",this.prepareUrl()+query,!0),"POST"==method)try{req.setRequestHeader?req.setRequestHeader("Content-type","text/plain;charset=UTF-8"):req.contentType="text/plain"}catch(e){}return req},XHR.prototype.scheme=function(){return this.socket.options.secure?"https":"http"},XHR.check=function(socket,xdomain){try{var request=io.util.request(xdomain),usesXDomReq=global.XDomainRequest&&request instanceof XDomainRequest,socketProtocol=socket&&socket.options&&socket.options.secure?"https:":"http:",isXProtocol=global.location&&socketProtocol!=global.location.protocol;if(request&&(!usesXDomReq||!isXProtocol))return!0}catch(e){}return!1},XHR.xdomainCheck=function(socket){return XHR.check(socket,!0)}}("undefined"!=typeof io?io.Transport:module.exports,"undefined"!=typeof io?io:module.parent.exports,this),function(exports,io){function HTMLFile(socket){io.Transport.XHR.apply(this,arguments)}exports.htmlfile=HTMLFile,io.util.inherit(HTMLFile,io.Transport.XHR),HTMLFile.prototype.name="htmlfile",HTMLFile.prototype.get=function(){this.doc=new(window[["Active"].concat("Object").join("X")])("htmlfile"),this.doc.open(),this.doc.write(""),this.doc.close(),this.doc.parentWindow.s=this;var iframeC=this.doc.createElement("div");iframeC.className="socketio",this.doc.body.appendChild(iframeC),this.iframe=this.doc.createElement("iframe"),iframeC.appendChild(this.iframe);var self=this,query=io.util.query(this.socket.options.query,"t="+ +new Date);this.iframe.src=this.prepareUrl()+query,io.util.on(window,"unload",function(){self.destroy()})},HTMLFile.prototype._=function(data,doc){data=data.replace(/\\\//g,"/"),this.onData(data);try{var script=doc.getElementsByTagName("script")[0];script.parentNode.removeChild(script)}catch(e){}},HTMLFile.prototype.destroy=function(){if(this.iframe){try{this.iframe.src="about:blank"}catch(e){}this.doc=null,this.iframe.parentNode.removeChild(this.iframe),this.iframe=null,CollectGarbage()}},HTMLFile.prototype.close=function(){return this.destroy(),io.Transport.XHR.prototype.close.call(this)},HTMLFile.check=function(socket){if("undefined"!=typeof window&&["Active"].concat("Object").join("X")in window)try{var a=new(window[["Active"].concat("Object").join("X")])("htmlfile");return a&&io.Transport.XHR.check(socket)}catch(e){}return!1},HTMLFile.xdomainCheck=function(){return!1},io.transports.push("htmlfile")}("undefined"!=typeof io?io.Transport:module.exports,"undefined"!=typeof io?io:module.parent.exports),function(exports,io,global){function XHRPolling(){io.Transport.XHR.apply(this,arguments)}function empty(){}exports["xhr-polling"]=XHRPolling,io.util.inherit(XHRPolling,io.Transport.XHR),io.util.merge(XHRPolling,io.Transport.XHR),XHRPolling.prototype.name="xhr-polling",XHRPolling.prototype.heartbeats=function(){return!1},XHRPolling.prototype.open=function(){var self=this;return io.Transport.XHR.prototype.open.call(self),!1},XHRPolling.prototype.get=function(){function stateChange(){4==this.readyState&&(this.onreadystatechange=empty,200==this.status?(self.onData(this.responseText),self.get()):self.onClose())}function onload(){this.onload=empty,this.onerror=empty,self.retryCounter=1,self.onData(this.responseText),self.get()}function onerror(){self.retryCounter++,!self.retryCounter||self.retryCounter>3?self.onClose():self.get()}if(this.isOpen){var self=this;this.xhr=this.request(),global.XDomainRequest&&this.xhr instanceof XDomainRequest?(this.xhr.onload=onload,this.xhr.onerror=onerror):this.xhr.onreadystatechange=stateChange,this.xhr.send(null)}},XHRPolling.prototype.onClose=function(){if(io.Transport.XHR.prototype.onClose.call(this),this.xhr){this.xhr.onreadystatechange=this.xhr.onload=this.xhr.onerror=empty;try{this.xhr.abort()}catch(e){}this.xhr=null}},XHRPolling.prototype.ready=function(socket,fn){var self=this;io.util.defer(function(){fn.call(self)})},io.transports.push("xhr-polling")}("undefined"!=typeof io?io.Transport:module.exports,"undefined"!=typeof io?io:module.parent.exports,this),function(exports,io,global){function JSONPPolling(socket){io.Transport["xhr-polling"].apply(this,arguments),this.index=io.j.length;var self=this;io.j.push(function(msg){self._(msg)})}var indicator=global.document&&"MozAppearance"in global.document.documentElement.style;exports["jsonp-polling"]=JSONPPolling,io.util.inherit(JSONPPolling,io.Transport["xhr-polling"]),JSONPPolling.prototype.name="jsonp-polling",JSONPPolling.prototype.post=function(data){function complete(){initIframe(),self.socket.setBuffer(!1)}function initIframe(){self.iframe&&self.form.removeChild(self.iframe);try{iframe=document.createElement('