{"size": 42152, "ext": "js", "max_stars_repo_path": "Warning_files/WV8fflIylNe.js", "max_stars_repo_name": "mehrdad-shokri/T0rn", "max_stars_repo_stars_event_min_datetime": "2015-01-04T21:18:38.000Z", "max_stars_repo_stars_event_max_datetime": "2021-04-26T08:16:10.000Z", "max_issues_repo_path": "zero_files/WV8fflIylNe.js", "max_issues_repo_name": "FingerLeakers/T0rn", "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_issues_event_max_datetime": null, "max_forks_repo_path": "zero_files/WV8fflIylNe.js", "max_forks_repo_name": "FingerLeakers/T0rn", "max_forks_repo_forks_event_min_datetime": "2015-01-28T22:37:08.000Z", "max_forks_repo_forks_event_max_datetime": "2020-12-22T17:34:02.000Z"}
{"max_stars_count": 27, "max_issues_count": null, "max_forks_count": 22, "avg_line_length": 2341.7777777778, "max_line_length": 10185, "alphanum_fraction": 0.7904251281}
/*1300153728,176832694*/

if (window.CavalryLogger) { CavalryLogger.start_js(["+si3g"]); }

var ChannelRebuildReasons={Unknown:0,AsyncError:1,TooLong:2,Refresh:3,RefreshDelay:4,UIRestart:5,NeedSeq:6,PrevFailed:7,IFrameLoadGiveUp:8,IFrameLoadRetry:9,IFrameLoadRetryWorked:10,PageTransitionRetry:11,IFrameLoadMaxSubdomain:12,ChannelUnknown:100,ChannelNoCUser:101,ChannelInvalidCUser:102,ChannelInvalidChanstr:103,ChannelChDistribTimeout:104,ChannelGetChannelOther:105,ChannelNodeShutdown:106,ChannelTermination:107,ChannelUserMismatch:108,ChannelUserMismatchShady:109,ChannelBadXs:110,ChannelSeqNeg:111,ChannelSeqTooBig:112,ChannelSeqTooSmall:113,ChannelUnexpectedJoin:114,ChannelInvalidXsCookie:115};
var CrossDocument={};(function(){CrossDocument.setListener=function(eventHandler){if(window.postMessage){if(window.addEventListener){window.addEventListener('message',eventHandler,false);}else window.onmessage=eventHandler;}else if(document.postMessage)document.addEventListener('message',eventHandler,false);};CrossDocument.mkPostMessage=function(targetWindow,targetDocument,msgHandler){if(window.postMessage){if("object"==typeof window.postMessage){return function(message,origin){targetWindow.postMessage(message,origin);};}else return bind(targetWindow,targetWindow.postMessage);}else if(document.postMessage){return bind(targetDocument,targetDocument.postMessage);}else return bind(targetWindow,msgHandler);};CrossDocument.targetOrigin=function(parent){if(window.postMessage||document.postMessage){var parentLoc=parent.location;var parentHost=parentLoc.hostname;if(parentHost=='facebook.com'||parentHost.substring(parentHost.length-13)=='.facebook.com')return parentLoc.protocol+'//'+parentLoc.host;}else return null;};var _handleMessage=function(msgCallback,msgStr){if(!msgStr||msgStr.charAt(0)!='{')return;var msg=eval('('+msgStr+')');return msgCallback(msg);};CrossDocument.mkEventHandler=function(msgCallback){return function(event){event=event||window.event;var domain=(event.domain||event.origin);if(domain.substring(domain.length-13)!='.facebook.com'&&domain.substring(domain.length-15)!='://facebook.com'&&domain!='facebook.com')return;return _handleMessage(msgCallback,event.data);};};CrossDocument.mkMessageHandler=function(msgCallback){return function(msgStr){return _handleMessage(msgCallback,msgStr);};};})();
function ChannelManager(b,f,e,a,d,c){this.user=f;this.iframeLoadMaxRetries=1;this.iframeLoadMaxSubdomain=6;this.expectResponseTimeout=5000;this.retryInterval=e;this.channelConfig=a;this._init(b,d);this.loginErrorGk=c;}ChannelManager.prototype={_init:function(c,d){this.channelManagerId=rand32();this.config={};this.channel={};this.isActionRequest=true;this.isReady=false;this.isRebuilding=false;this.iframeIsLoaded=false;this.iframeEverLoaded=false;this.iframeCheckFailedCount=0;this.permaShutdown=false;this.shouldClearSubdomain=false;this.subframe=c;Event.listen(this.subframe,'load',this._iframeLoadCheck.bind(this));this.postMessage=null;var a=presenceCookieManager.getSubCookie('ch');if(d){this.iframeSubdomain=null;}else{this.iframeSubdomain=0;if(a&&a.sub){for(var b=0;b<a.sub.length;b++)if(!a.sub[b]){this.iframeSubdomain=b;break;}if(b==a.sub.length)if(b==this.iframeLoadMaxSubdomain&&URI().isSecure()){this.iframeSubdomain=null;presence.error('channel: iframe max subdomains reached');this._sendDummyReconnect(ChannelRebuildReasons.IFrameLoadMaxSubdomain);}else this.iframeSubdomain=a.sub.length;}}this.handleIframeEvent=CrossDocument.mkEventHandler(this._handleIframeMessage.bind(this));this.handleIframeMessage=CrossDocument.mkMessageHandler(this._handleIframeMessage.bind(this));CrossDocument.setListener(this.handleIframeEvent.bind(this));presenceCookieManager.register('ch',this._getCookieInfo.bind(this));if(typeof window.onpageshow!='undefined'){Event.listen(window,'pagehide',this._onUnload.bind(this));Event.listen(window,'pageshow',this.rebuild.bind(this,ChannelRebuildReasons.Refresh));}else onunloadRegister(this._onUnload.bind(this));},sendIframeMessage:function(b){if(!this.postMessage)return;var c=JSON.stringify(b);try{this.postMessage(c,this.targetOrigin);}catch(a){presence.error('channel: iframe msg error: '+'message "'+c+'" and error '+a.toString());}},_handleIframeMessage:function(a){if(a.type=='init'){this.iframeLoaded();}else if(a.type=='channelMsg'){this.handleChannelMsg(a.channel,a.msg);}else if(a.type=='log')window.chatErrorLog&&window.chatErrorLog.log(a.msg);},_onUnload:function(){this.shouldClearSubdomain=true;presenceCookieManager.setCheckUserCookie(true);presence.doSync(true);},addChannel:function(a,d,b,f,e,c){if(this.channel.name){presence.error("channel: addChannel called twice");return;}this.channel.name=a;this.channel.currentSeq=d;this.channel.msgHandler=b;this.channel.startHandler=f;this.channel.shutdownHandler=e;this.channel.restartHandler=c;presence.doSync();},_getCookieInfo:function(){var b={};if(this.config.host){b.h=this.config.host;if(this.config.port)b.p=this.config.port;if(null!==this.iframeSubdomain){var a=presenceCookieManager.getSubCookie('ch');var e=(a&&a.sub)?a.sub:[];var d=e.length;if(this.shouldClearSubdomain){e[this.iframeSubdomain]=0;}else{e[this.iframeSubdomain]=1;for(var c=d;c<=this.iframeSubdomain;c++)if(!e[c])e[c]=0;}b.sub=e;}b[this.channel.name]=this.channel.currentSeq;}b.ri=this.retryInterval;return b;},getConfig:function(c,b){var a=this.channelConfig;return a&&(c in a)?a[c]:b;},stop:function(){this.stopped=true;this.setReady(false);},setReady:function(a){this.isReady=a;var b={type:'isReady',isReady:a,isActionRequest:this.isActionRequest};if(a&&this.isActionRequest)this.isActionRequest=false;if(a){b.channelName=this.channel.name;b.currentSeq=this.channel.currentSeq;b.channelManagerId=this.channelManagerId;b.channelConfig=this.channelConfig;}this.sendIframeMessage(b);},setActionRequest:function(a){this.sendIframeMessage({type:'isActionRequest',isActionRequest:a});},expectResponse:function(){this.sendIframeMessage({type:'expectResponse',newTimeout:this.expectResponseTimeout});},_iframeUrl:function(a,c,b){var d;if(null===this.iframeSubdomain){d='';}else{d=this.iframeSubdomain;d+=URI().isSecure()?'-':'.';}return new URI().setDomain(d+a+'.facebook.com').setPort(c).setPath(b).setSecure(URI().isSecure()).toString();},iframeLoad:function(a,c){this.isReady=c;this.iframeIsLoaded=false;this.config=a;var e=this._iframeUrl(a.host,a.port,a.path);clearTimeout(this._checkTimer);this._checkTimer=this._iframeCheck.bind(this).defer(this.getConfig('IFRAME_LOAD_TIMEOUT',30000));var d=null;if(!ua.ie()||ua.ie()<8)try{d=this.subframe.contentDocument;}catch(b){}if(d){try{d.location.replace(e);}catch(b){presence.error('channel: error setting location: '+b.toString());}}else if(this.subframe.contentWindow){this.subframe.src=e;}else if(this.subframe.document){this.subframe.src=e;}else presence.error('channel: error setting subframe url');presence.debug('channel: done with iframeLoad, subframe sent to '+e);},_iframeLoadCheck:function(){try{this.subframe.contentWindow.document.body.innerHTML;}catch(a){presence.error('channel:iframe load check error:(check #'+this.iframeCheckFailedCount+'):'+a);}},iframeLoaded:function(){if(!this.iframeIsLoaded){this.iframeIsLoaded=true;this.postMessage=CrossDocument.mkPostMessage(this.subframe.contentWindow,this.subframe.contentDocument,this.subframe.contentWindow.channelUplink.handleParentMessage);this.targetOrigin="*";this.setReady(this.isReady);if(this.iframeCheckFailedCount){this.channel.restartHandler(false);this._sendDummyReconnect(ChannelRebuildReasons.IFrameLoadRetryWorked);}else this.channel.startHandler();this.iframeCheckFailedCount=0;this.iframeEverLoaded=true;}},_diagnoseIframeError:function(b){function a(j){var k={},l=new Date();var h=j=='channel'?b.host:b.host2;var g=function(m){if(!k.result){k.t=new Date()-l;k.result=m?'contact':'error';e();}};k.toString=function(){return 'NAME STATUS (t=TIME)'.replace('NAME',j).replace('STATUS',k.result||'timeout').replace('TIME',Math.round(k.t/1000));};var i=new Image();i.onload=g.bind(null,true);i.onerror=g.bind(null,false);i.src=new URI().setDomain(h+'.facebook.com').setPort(b.port).setPath('/iping').setSecure(URI().isSecure());return k;}function e(g){if(g||(c.result&&d.result))presence.error('channel:iframe_failed:'+c+', '+d);}var f=e.bind(null,true).defer(120000);var c=a('channel'),d=a('alias');},_iframeCheck:function(){delete this._checkTimer;if(!this.iframeIsLoaded){this.iframeCheckFailedCount++;var a=this.config;this.config={};presenceCookieManager.store();if(this.iframeCheckFailedCount<=this.iframeLoadMaxRetries){this.rebuild(ChannelRebuildReasons.IFrameLoadRetry);}else{this.channel.shutdownHandler();this._sendDummyReconnect(ChannelRebuildReasons.IFrameLoadGiveUp);this._diagnoseIframeError(a);}}else this.retryInterval=0;},_sendDummyReconnect:function(b){var a=new AsyncRequest().setURI('/ajax/presence/reconnect.php').setData({reason:b,iframe_loaded:this.iframeEverLoaded}).setOption('suppressErrorHandlerWarning',true).setOption('retries',1).setMethod('GET').setReadOnly(true).setAllowCrossPageTransition(true);a.specifiesWriteRequiredParams()&&a.send();},_rebuildResponse:function(c){var b=c.getPayload();var a=b.user_channel;presence.debug('got rebuild response with channel '+a+', seq '+b.seq+', host '+b.host+', port '+b.port);this.channel.currentSeq=b.seq;this.isRebuilding=false;if(b.path!=this.config.path||b.host!=this.config.host){this.iframeLoad(b,true);}else this.setReady(true);presenceCookieManager.store();if(typeof chatOptions!='undefined')chatOptions.setVisibility(b.visibility);this.channel.restartHandler(true);},_retryRebuild:function(c,a){var d=this.getConfig('MAX_RETRY_INTERVAL',60000);var e=this.getConfig('MIN_RETRY_INTERVAL',10000);if(a){this.retryInterval=d;}else if(this.retryInterval==0){this.retryInterval=e;}else this.retryInterval=Math.min(d,this.retryInterval*2);var b=this.retryInterval*(.75+Math.random()*.5);presence.warn('channel: retry: manager trying again in '+(b*.001)+' secs');setTimeout(this._rebuildSend.bind(this,c),this.retryInterval);},_rebuildError:function(a,b){this.channel.shutdownHandler(true);presence.error('channel: got rebuild error: '+b.getErrorDescription());if(presence.checkMaintenanceError(b)){presence.warn('channel: manager not trying again');}else if(presence.checkLoginError(b)){if(presence.inPopoutWindow||this.loginErrorGk){this._retryRebuild(ChannelRebuildReasons.PrevFailed,true);}else presence.warn('channel: manager not trying again');}else this._retryRebuild(ChannelRebuildReasons.PrevFailed,false);},_rebuildTransportError:function(a,b){this.channel.shutdownHandler(true);presence.error('channel: got rebuild transport error: '+b.getErrorDescription());this._retryRebuild(a,false);},_rebuildSend:function(b){if(!presence.hasUserCookie(true))return;if(typeof b!='number')b=ChannelRebuildReasons.Unknown;presence.debug('channel: sending rebuild');var a=new AsyncRequest().setURI('/ajax/presence/reconnect.php').setData({reason:b,iframe_loaded:this.iframeEverLoaded}).setHandler(this._rebuildResponse.bind(this)).setErrorHandler(this._rebuildError.bind(this,b)).setTransportErrorHandler(this._rebuildTransportError.bind(this,b)).setOption('suppressErrorAlerts',true).setOption('retries',1).setMethod('GET').setReadOnly(true).setAllowCrossPageTransition(true);return a.specifiesWriteRequiredParams()&&a.send();},rebuild:function(a){presenceCookieManager.setCheckUserCookie(false);if(this.stopped)return;if(this.isRebuilding){presence.debug('channel: rebuild called, but already rebuilding');return;}this.setReady(false);this.isRebuilding=true;presence.debug('channel: rebuilding');if(a==ChannelRebuildReasons.RefreshDelay)this.retryInterval=this.channelConfig.MAX_RETRY_INTERVAL;setTimeout(this._rebuildSend.bind(this,a),this.retryInterval);},handleChannelMsg:function(a,c){if(c.type=='seq'){presence.pauseSync();this.channel.currentSeq=c.Seq;presence.resumeSync();}else if(c.type=='shutdown'||c.type=='permaShutdown'){if(!window.loaded||this.permaShutdown)return;if(c.type=='permaShutdown'){presence.error('channel:permaShutdown');this.permaShutdown=true;}else{presence.error('channel:refresh_'+c.reason);this.rebuild(c.reason);}this.channel.shutdownHandler(true);}else if(c.type=='fullReload'){presence.error('channel:fullReload');presenceCookieManager.clear();this._rebuildSend(ChannelRebuildReasons.ChannelSeqTooSmall);Arbiter.inform('channel/invalid_history');}else try{this.channel.msgHandler(a,c);}catch(b){presence.error('channel: error in channel handlers: '+b.toString()+', msg: '+c);}}};
function TinyPresence(g,c,b,a,e,d,f){this.user=g;this.name=c;this.firstName=b;this.alias=a;this.sitevars=f;this.popoutURL=env_get('www_base')+'presence/popout.php';this.updateServerTime(e);this.pageLoadTime=this.getTime();this._init(d);}TinyPresence.prototype={cookiePollTime:2000,popoutHeartbeatTime:1000,popoutHeartbeatAllowance:4000,popoutHeartbeatFirstAllowance:15000,shutdownDelay:5000,restartDelay:3000,POPOUT_TYPE_NONE:0,POPOUT_TYPE_CHAT:1,_init:function(a){this.stateStorers=[];this.stateLoaders=[];this._syncTimeout=null;this.windowID=rand32()+1;this.cookiePoller=null;this.heartbeat=null;this.stateUpdateTime=0;this.loaded=false;this.isShutdown=false;this.isShuttingDown=false;this.isRestarting=false;this.isPermaShutdown=false;this.shutdownTime=0;this.justPoppedOut=false;this.syncPaused=0;this.inPopoutWindow=a==this.POPOUT_TYPE_CHAT;this.poppedOut=this.inPopoutWindow;presenceCookieManager.register('state',this._getCookieData.bind(this));Arbiter.subscribe("page_transition",this.checkRebuild.bind(this));this.load();},updateServerTime:function(a){this.timeSkew=new Date().getTime()-a;},getTime:function(){return new Date().getTime()-this.timeSkew;},debug:function(a){},warn:function(a){this.logError("13003:warning:"+a);},error:function(a){this.logError("13002:error:"+a);},logError:function(a){if(window.send_error_signal)send_error_signal("presence",a);},load:function(){var b=presenceCookieManager.getSubCookie('state');if(!b){this.debug('presence: got null state cookie, loading with current state');this._load(this._getCookieData());return;}try{this._load(b);}catch(a){this.error('presence: got load exception: '+a.toString());this._load(this._getCookieData());}},_load:function(b){this.syncPaused++;this.stateUpdateTime=verifyNumber(b.ut);this.popoutTime=verifyNumber(b.pt);this.poppedOut=!!b.p;if(this.poppedOut){if(this.inPopoutWindow)if(!this.heartbeat)this.heartbeat=setInterval(this._popoutHeartbeat.bind(this),this.popoutHeartbeatTime);}else if(this.inPopoutWindow){if(!this.loaded){this.poppedOut=true;this.doSync();}}else this.justPoppedOut=true;if(!this.inPopoutWindow&&!this.cookiePoller)this.cookiePoller=setInterval(this._pollCookie.bind(this),this.cookiePollTime);this.state=b;for(var a=0;a<this.stateLoaders.length;a++)this.stateLoaders[a](b);this.syncPaused--;this._loaded();},_loaded:function(){this.loaded=true;},_pollCookie:function(){var e=presenceCookieManager.getSubCookie('state');if(!e)return;var d=this.popoutTime;if(e.ut>this.stateUpdateTime){this.load(e);return;}if(this.poppedOut&&!this.inPopoutWindow){var a=verifyNumber(e.pt);var b=new Date().getTime()-a;var c=this.popoutHeartbeatTime+this.popoutHeartbeatAllowance;if(this.justPoppedOut)if(a==d){c+=this.popoutHeartbeatFirstAllowance;}else this.justPoppedOut=false;this.popoutTime=a;if(b>c){this.poppedOut=false;this.doSync();}}},_popoutHeartbeat:function(){this._pollCookie();if(this.poppedOut)presenceCookieManager.store();},_getCookieData:function(){var b={p:this.poppedOut?1:0,ut:this.stateUpdateTime,pt:this.inPopoutWindow?new Date().getTime():this.popoutTime};for(var a=0;a<this.stateStorers.length;a++)b=this.stateStorers[a](b);this.state=b;return this.state;},doSync:function(a){if(this.syncPaused)return;if(a){this._doSync();}else if(!this._syncTimeout)this._syncTimeout=this._doSync.bind(this).defer();},_doSync:function(){clearTimeout(this._syncTimeout);this._syncTimeout=null;this.stateUpdateTime=new Date().getTime();presenceCookieManager.store();this._load(this.state);},pauseSync:function(){this.syncPaused++;},resumeSync:function(){this.syncPaused--;this.doSync();},handleMsg:function(a,b){this._handleMsg.bind(this,a,b).defer();},_handleMsg:function(a,b){if(typeof b=='string'){if(b=='shutdown'){this.connectionShutdown();}else if(b=='restart')if(this.isShutdown)this.restart();return;}if(this.isShutdown)return false;if(!b.type)return;Arbiter.inform(PresenceMessage.getArbiterMessageType(b.type),{sender:this,channel:a,obj:b});},checkRebuild:function(){if(this.isShutdown&&!this.isPermaShutdown)channelManager.rebuild(ChannelRebuildReasons.PageTransitionRetry);},getErrorDescription:function(a){var c=a.getError();var b=a.getErrorDescription();if(!b)b=_tx("An error occurred.");if(c==1357001)b=_tx("Your session has timed out. Please log in.");return b;},checkLoginError:function(a){var b=a.getError();if(b==1357001||b==1357004||b==1348009){this.loginShutdown();return true;}return false;},checkMaintenanceError:function(a){if(a.getError()==1356007){this.maintenanceShutdown();return true;}return false;},permaShutdown:function(){this.isPermaShutdown=true;var a=_tx("Facebook {Chat} is experiencing technical problems.",{Chat:_tx("Chat")});this.shutdown(false,a,"perma_shutdown");},loginShutdown:function(){var a=_tx("Your session has timed out. Please log in.");this.shutdown(false,a,"login_shutdown");},connectionShutdown:function(b){var a=_tx("Could not connect to Facebook {Chat} at this time.",{Chat:_tx("Chat")});this.shutdown(b,a,"connection_shutdown");},maintenanceShutdown:function(){var a=_tx("Facebook {Chat} is down for maintenance at this time.",{Chat:_tx("Chat")});this.shutdown(false,a,"maintenance_shutdown");channelManager.stop();},versionShutdown:function(){var a=_tx("Please refresh the page to get the latest version of Facebook {Chat}.",{Chat:_tx("Chat")});this.shutdown(false,a,"version_shutdown");channelManager.stop();},shutdown:function(d,c,a){this.isRestarting=false;this.isShuttingDown=true;var b=new Date().getTime();this.shutdownTime=b;if(!d){this._shutdown(c,0,a);}else setTimeout(this._shutdown.bind(this,c,b,a),this.shutdownDelay);},_shutdown:function(b,c,a){if(!this.isShuttingDown&&c==this.shutdownTime)return;if(c&&this.isShutdown)return;if(typeof b!='string'||!b)b=_tx("Facebook {Chat} is experiencing technical problems.",{Chat:_tx("Chat")});if(typeof a!='string'||!a)a="undefined";this.warn("presence:displaying_shutdown:"+a);if(this.isShutdown)return;this.logError("13001:shutdown:presence:"+a);this.isShutdown=true;Arbiter.inform(PresenceMessage.SHUTDOWN,{sender:this});},restart:function(a){this.isShuttingDown=false;this.isRestarting=true;if(!a){this._restart(0);}else this._restart.bind(this,this.shutdownTime).defer(this.restartDelay);},_restart:function(a){if(!this.isRestarting||(a&&a!=this.shutdownTime))return;this.debug("presence: restarting");this.isShutdown=false;this.load();Arbiter.inform(PresenceMessage.RESTARTED,{sender:this});},start:function(){Arbiter.inform(PresenceMessage.STARTED,{sender:this});},registerStateStorer:function(a){this.stateStorers.push(a);},registerStateLoader:function(a){this.stateLoaders.push(a);},hasUserCookie:function(a){var b=this.user==getCookie('c_user');if(!b&&a)this.permaShutdown();return b;}};
function Presence(g,c,b,a,e,d,f){this.parent.construct(this,g,c,b,a,e,d,f);}Presence.extend('TinyPresence');Presence.prototype={minWidth:100,minHeight:100,defWidth:900,defHeight:650,defX:30,defY:30,_init:function(b){if(b!==this.POPOUT_TYPE_CHAT){this.holder=$('fbDockChat');}else this.holder=document.body;this.parent._init(b);this.popoutWidth=this.defWidth;this.popoutHeight=this.defHeight;this.popoutClicked=false;this.popinClicked=false;if(this.inPopoutWindow){Util.fallbackErrorHandler=null;onbeforeunloadRegister(this.popin.bind(this,false));onunloadRegister(this.popin.bind(this,false));}if(this.inPopoutWindow){Event.listen(window,'resize',this._windowOnResize.bind(this));Event.listen(window,'keypress',this._documentKeyPress.bind(this));}var c=ua.safari();this.isSafari2=(c&&c<500);this.isOpera=(ua.opera()>0);var a=ua.firefox();this.isFF2=(a&&a<3);this.isWindows=ua.windows();if(this.inPopoutWindow){this._windowOnResize.bind(this).defer();setTimeout(this._windowOnResize.bind(this),3000);}},_load:function(a){this.parent._load(a);if(this.poppedOut){if(!this.inPopoutWindow)CSS.addClass(this.holder,'popped_out');}else{if(this.inPopoutWindow)if(this.loaded)if(!this.popinClicked)window.close();CSS.removeClass(this.holder,'popped_out');}if(this.inPopoutWindow){this._handleResize.bind(this,0,0).defer();setTimeout(this._handleResize.bind(this,0,0),100);}this.parent._loaded();},_loaded:bagofholding,_handleMsg:function(a,b){this.parent._handleMsg(a,b);if(typeof b=='string'||!b.type)return;if(this.isShutdown)return false;if(b.type=='app_msg')if(b.event_name=='beep_event'){Bootloader.loadComponents('beeper',function(){Beeper.ensureInitialized();LiveMessageReceiver.route(b);});}else LiveMessageReceiver.route(b);},popout:function(){if(this.inPopoutWindow||this.poppedOut){this.popin(true);return;}if(this.popoutClicked)return;this.popoutClicked=true;var a=window.open(this.popoutURL,"fbChatWindow","status=0,toolbar=0,location=0,menubar=0,"+"directories=0,resizable=1,scrollbars=0,"+"width="+this.popoutWidth+",height="+this.popoutHeight+","+"left="+this.defX+",top="+this.defY);CSS.removeClass(this.holder,'popped_out');this.poppedOut=true;this.justPoppedOut=true;this.popoutTime=(new Date()).getTime();this.doSync();this.popoutClicked=false;},popin:function(a){if(typeof a=='undefined')a=true;if(this.inPopoutWindow){if(this.popinClicked)return;this.popinClicked=true;}this.poppedOut=false;this.doSync();if(this.inPopoutWindow&&a)window.close();},_windowOnResize:function(){if(!this.inPopoutWindow)return;this.contentResized={};var a=Vector2.getViewportDimensions();this._handleResize(a.x-this.virtPopoutWidth,a.y-this.virtPopoutHeight);if(this.inPopoutWindow)this.popoutHeight=a.y;},_handleResize:function(b,c){var a=this.loaded?100:10;if(this.handleResizeTimer)clearTimeout(this.handleResizeTimer);this.handleResizeTimer=setTimeout(function(){this.virtPopoutWidth+=b;this.virtPopoutHeight+=c;this.popoutWidth=Math.max(this.virtPopoutWidth,this.minWidth);this.popoutHeight=Math.max(this.virtPopoutHeight,this.minHeight);Arbiter.inform(PresenceMessage.WINDOW_RESIZED,{sender:this});},a);},_documentKeyPress:function(a){if(!this.inPopoutWindow)return;a=$E(a);var b=a?a.keyCode:-1;if(b==KEYS.ESC)Event.kill(a);},renderLink:function(b,c,a){return '<a href="'+b+'"'+(this.inPopoutWindow?' target="_blank"':'')+(a?a:'')+'>'+c+'</a>';},_shutdown:function(c,d,b){this.parent._shutdown(c,d,b);if((!this.isShuttingDown&&d===this.shutdownTime)||(d&&this.isShutdown))return;if(!this.inPopoutWindow){if(Chat.isOnline())CSS.addClass(this.holder,'presence_error');var a=$('fbChatErrorNub');TooltipLink.setTooltipText(DOM.find(a,'a.fbNubButton'),c);}else{if(this.shutdownErrorDialog)this.shutdownErrorDialog.hide();this.shutdownErrorDialog=ErrorDialog.show(_tx("Facebook Chat Error"),c);}},_restart:function(a){this.parent._restart(a);if(!this.isRestarting||(a&&a!=this.shutdownTime))return;if(!this.inPopoutWindow){CSS.removeClass(this.holder,'presence_error');}else if(this.shutdownErrorDialog)this.shutdownErrorDialog.hide();},isOnline:function(){return this.state&&this.state.vis;}};function getFirstName(c){var d=c.split(" ");var b=d[0];var a=b.length;if(typeof d[1]!='undefined'&&(a==1||(a==2&&b.indexOf('.')!=-1)||(a==3&&b.toLowerCase()=='the')))b+=' '+d[1];return b;}
function LiveMessageReceiver(a){this.eventName=a;this.subs=null;this.handler=bagofholding;this.shutdownHandler=null;this.restartHandler=null;this.registered=false;this.appId=1;}LiveMessageReceiver.prototype.setAppId=function(a){this.appId=a;return this;};LiveMessageReceiver.prototype.setHandler=function(a){this.handler=a;this._dirty();return this;};LiveMessageReceiver.prototype.setRestartHandler=function(a){this.restartHandler=a.shield();this._dirty();return this;};LiveMessageReceiver.prototype.setShutdownHandler=function(a){this.shutdownHandler=a.shield();this._dirty();return this;};LiveMessageReceiver.prototype._dirty=function(){if(this.registered){this.unregister();this.register();}};LiveMessageReceiver.prototype.register=function(){var b=function(d,c){return this.handler(c);}.bind(this);var a=PresenceMessage.getAppMessageType(this.appId,this.eventName);this.subs={};this.subs.main=Arbiter.subscribe(a,b);if(this.shutdownHandler)this.subs.shut=Arbiter.subscribe(PresenceMessage.SHUTDOWN,this.shutdownHandler);if(this.restartHandler)this.subs.restart=Arbiter.subscribe(PresenceMessage.RESTARTED,this.restartHandler);this.registered=true;return this;};LiveMessageReceiver.prototype.unregister=function(){if(!this.subs)return this;for(var a in this.subs)if(this.subs[a])Arbiter.unsubscribe(this.subs[a]);this.subs=null;this.registered=false;return this;};LiveMessageReceiver.route=function(b){var a=function(c){var d=PresenceMessage.getAppMessageType(b.app_id,b.event_name);Arbiter.inform(d,c,Arbiter.BEHAVIOR_PERSISTENT);};if(b.hasCapture){new AsyncRequest().setHandler(function(c){a(c.getPayload());}).setAllowCrossPageTransition(true).handleResponse(b.response);}else a(b.response);};
var PrivacyBaseValue={FACEBOOK_EMPLOYEES:112,CUSTOM:111,OPEN:100,EVERYONE:80,NETWORKS_FRIENDS_OF_FRIENDS:60,NETWORKS_FRIENDS:55,FRIENDS_OF_FRIENDS:50,ALL_FRIENDS:40,SELF:10,NOBODY:0};var PrivacyFriendsValue={EVERYONE:80,NETWORKS_FRIENDS:55,FRIENDS_OF_FRIENDS:50,ALL_FRIENDS:40,SOME_FRIENDS:30,SELF:10,NO_FRIENDS:0};var PrivacySpecialPreset={ONLY_CORP_NETWORK:200,COLLEGE_NETWORK_FRIENDS_OF_FRIENDS:201,COLLEGE_NETWORK_FRIENDS:202};var PrivacyNetworkTypes={TYPE_COLLEGE:1,TYPE_HS:2,TYPE_CORP:3,TYPE_GEO:4,TYPE_MANAGED:14,TYPE_TEST:50};var PrivacyNetworksAll=1;copy_properties(PrivacyBaseValue,PrivacySpecialPreset);function PrivacyModel(){this.value=PrivacyBaseValue.ALL_FRIENDS;this.friends=PrivacyFriendsValue.NO_FRIENDS;this.networks=[];this.objects=[];this.lists=[];this.lists_x=[];this.list_anon=0;this.ids_anon=[];this.list_x_anon=0;this.ids_x_anon=[];this.tdata={};return this;}copy_properties(PrivacyModel.prototype,{init:function(k,a,h,i,f,g,d,b,e,c,j){this.value=k;this.friends=a;this.networks=h.clone();this.objects=i.clone();this.lists=f.clone();this.lists_x=g.clone();this.list_anon=d;this.ids_anon=b.clone();this.list_x_anon=e;this.ids_x_anon=c.clone();j=j||{};copy_properties(this.tdata,j);},clone:function(){var a=new PrivacyModel();a.init(this.value,this.friends,this.networks,this.objects,this.lists,this.lists_x,this.list_anon,this.ids_anon,this.list_x_anon,this.ids_x_anon,this.tdata);return a;},getData:function(){var b=['value','friends','networks','objects','lists','lists_x','list_anon','ids_anon','list_x_anon','ids_x_anon'];var d={};for(var c=0;c<b.length;++c){var a=b[c];d[a]=this[a];}return d;}});
function BasePrivacyWidget(){}BasePrivacyWidget.mixin('Arbiter',{init:function(a,c,b){this._controllerId=a;this._root=$(a);this._options=copy_properties(b||{},c||{});this._formDataKey='privacy_data';},getData:function(){return this._model.getData();},_getPrivacyData:function(a){a=a||this._fbid;var b={};b[a]=this.getData();return b;},getRoot:function(){return this._root;},_initSelector:function(a){this._selector=a;Selector.listen(a,'select',function(b){var c=Selector.getOptionValue(b.option);this._onMenuSelect(c);}.bind(this));Event.listen(a,'click',function(){this.inform('menuActivated');}.bind(this));},_isCustomSetting:function(a){return (a==PrivacyBaseValue.CUSTOM);},_updateSelector:function(a){var b=this._model.objects;if(b&&b.length){selected_value=b[0];}else selected_value=this._model.value;Selector.setSelected(this._selector,selected_value);if(!this._isCustomSetting(selected_value))return;var c=Selector.getOption(this._selector,PrivacyBaseValue.CUSTOM+'');c.setAttribute('data-label',a||_tx("Custom"));Selector.updateSelector(this._selector);},_onPrivacyChanged:function(){this._saveFormData();this.inform('privacyChanged',this.getData());Arbiter.inform(UIPrivacyWidget.GLOBAL_PRIVACY_CHANGED_EVENT,{fbid:this._fbid,data:this.getData()});},_saveFormData:function(){var b=DOM.find(this._root,'div.UIPrivacyWidget_Form');DOM.empty(b);var a={};if(this._options.useLegacyFormData){a[this._formDataKey]=this.getData();}else a[this._formDataKey]=this._getPrivacyData();Form.createHiddenInputs(a,b);}});
function UIPrivacyWidget(){this.parent.construct(this);}copy_properties(UIPrivacyWidget,{GLOBAL_PRIVACY_CHANGED_EVENT:'UIPrivacyWidget/globalPrivacyChanged',instances:{},getInstance:function(a){return this.instances[a];}});UIPrivacyWidget.extend('BasePrivacyWidget');UIPrivacyWidget.mixin('Arbiter',{init:function(i,a,b,h,c,e,g){var f={autoSave:false,saveAsDefaultFbid:0,initialExplanation:'',useLegacyFormData:false,composerEvents:false};if(b=='0')b=0;this.parent.init(a,g,f);this._lists=c;this._networks=e;this._fbid=b;this._row=h;this._groups={};for(var d in e)this._groups[e[d].fbid]=d;UIPrivacyWidget.instances[this._controllerId]=this;this._initSelector(i);this.setData(this._row,this._options.initialExplanation,true);this._saveFormData();if(this._options.composerEvents)Arbiter.subscribe('composer/publish',this.reset.bind(this));},reset:function(){this._model=this._originalModel.clone();this._modelClone=this._originalModel.clone();this._updateSelector(this._options.initialExplanation);this._saveFormData();return this;},revert:function(){this._model=this._modelClone.clone();this._updateSelector(this._previousDescription);this._saveFormData();return this;},getValue:function(){return this._model.value;},getDefaultValue:function(){return this._originalModel.value;},isEveryonePrivacy:function(){return this._model.value==PrivacyBaseValue.EVERYONE;},dialogOpen:function(){return this._dialog&&this._dialog.getRoot();},setData:function(b,a,c){this._model=new PrivacyModel();this._model.init(b.value,b.friends,b.networks,b.objects,b.lists,b.lists_x,b.list_anon,b.ids_anon,b.list_x_anon,b.ids_x_anon,b.tdata);this._modelClone=this._model.clone();if(c)this._originalModel=this._model.clone();this._previousDescription=a;this._customModel=null;this._updateSelector(a);},setLists:function(a){this._lists=a;return this;},setNetworks:function(a){this._networks=a;return this;},_isCustomSetting:function(a){return (a==PrivacyBaseValue.CUSTOM||a==PrivacyBaseValue.NETWORKS_FRIENDS_OF_FRIENDS||a==PrivacyBaseValue.SELF);},_onMenuSelect:function(b){this._modelClone=this._model.clone();var a=this._isCustomSetting(this._model.value);var c=this._isCustomSetting(b);if(a&&!c)this._customModel=this._model.clone();if(!(a&&c)){this._model.value=b;this._resetModelAuxiliaryData();}if(b==PrivacyBaseValue.CUSTOM){if(this._customModel){this._model=this._customModel.clone();}else if(this._modelClone.value!=PrivacyBaseValue.CUSTOM)this._model.friends=PrivacyFriendsValue.ALL_FRIENDS;this._showDialog();}else{if(this._groups[b]){this._model=new PrivacyModel();this._model.value=PrivacyBaseValue.CUSTOM;this._model.objects=[b];}this._onPrivacyChanged();if(this._options.autoSave)this._saveSetting();}this._updateSelector();},_showDialog:function(){if(!this._fbid){this._model.list_x_anon=0;this._model.list_anon=0;}var a={controller_id:this._controllerId,privacy_data:this.getData(),fbid:this._fbid,save_as_default_fbid:this._options.saveAsDefaultFbid};this._dialog=new Dialog().setAsync(new AsyncRequest('/ajax/privacy/privacy_widget_dialog.php').setData(a)).setModal(true).show();return false;},_resetModelAuxiliaryData:function(){if(this._model.value!=PrivacyBaseValue.CUSTOM){this._model.lists_x=this._model.lists=this._model.networks=this._model.ids_anon=this._model.ids_x_anon=[];this._model.list_x_anon=0;this._model.list_anon=0;}},_saveSetting:function(a){a=a||this._fbid;new AsyncRequest('/ajax/privacy/widget_save.php').setData({privacy_data:this._getPrivacyData(a),old_privacy_data:this._modelClone.getData(),fbid:a}).setHandler(this._handleResponse.bind(this)).setErrorHandler(this._handleError.bind(this)).send();},_handleResponse:function(b){var a=b.getPayload();this.setData(a.privacy_row,a.explanation);},_handleError:function(a){AsyncResponse.defaultErrorHandler(a);this.revert();}});
function useFacebookReferer(b,a){var d=false;function e(){if(d)return;d=true;b.contentWindow.document.body.style.margin=0;a();}var c=(URI().isSecure()?'https://s-static.ak.facebook.com':'http://static.ak.facebook.com')+'/common/referer_frame.php';Event.listen(b,'load',e);b.src=c;}function useFacebookRefererHtml(b,a){useFacebookReferer(b,function(){b.contentWindow.document.body.innerHTML=a;});}
if(typeof deconcept=="undefined")var deconcept={};if(typeof deconcept.util=="undefined")deconcept.util={};if(typeof deconcept.SWFObjectUtil=="undefined")deconcept.SWFObjectUtil={};deconcept.SWFObject=function(h,d,j,c,i,a,f,l,g,b){if(!document.getElementById)return;this.DETECT_KEY=b?b:'detectflash';this.skipDetect=deconcept.util.getRequestParameter(this.DETECT_KEY);this.params={};this.variables={};this.attributes=[];this.fallback_html='';this.fallback_js_fcn=function(){};if(h)this.setAttribute('swf',h);if(d)this.setAttribute('id',d);if(j)this.setAttribute('width',j);if(c)this.setAttribute('height',c);this.installedVer=deconcept.SWFObjectUtil.getPlayerVersion();if(i){if(!(i instanceof Array))i=[i];var k;i.each(function(n){k=new deconcept.PlayerVersion(n.toString().split('.'));if(k.major==this.installedVer.major){this.setAttribute('version',k);return;}else if(!this.getAttribute('version')||k.major<this.getAttribute('version').major)this.setAttribute('version',k);}.bind(this));}if(!window.opera&&document.all&&this.installedVer.major>7)if(!deconcept.unloadSet){deconcept.SWFObjectUtil.prepUnload=function(){__flash_unloadHandler=function(){};__flash_savedUnloadHandler=function(){};window.attachEvent("onunload",deconcept.SWFObjectUtil.cleanupSWFs);};window.attachEvent("onbeforeunload",deconcept.SWFObjectUtil.prepUnload);deconcept.unloadSet=true;}if(a)this.addParam('bgcolor',a);var e=f?f:'high';this.addParam('quality',e);this.setAttribute('useExpressInstall',false);this.setAttribute('doExpressInstall',false);var m=(l)?l:window.location;this.setAttribute('xiRedirectUrl',m);this.setAttribute('redirectUrl','');if(g)this.setAttribute('redirectUrl',g);this.setAttribute('useIframe',false);};deconcept.SWFObject.prototype={useExpressInstall:function(a){this.xiSWFPath=!a?"/swf/expressinstall.swf":a;this.setAttribute('useExpressInstall',true);},setAttribute:function(a,b){this.attributes[a]=b;},getAttribute:function(a){return this.attributes[a]||"";},addParam:function(a,b){this.params[a]=b;},getParams:function(){return this.params;},addVariable:function(a,b){this.variables[a]=b;},getVariable:function(a){return this.variables[a]||"";},getVariables:function(){return this.variables;},getVariablePairs:function(){var b=[];var a;var c=this.getVariables();for(a in c)b[b.length]=a+"="+c[a];return b;},getSWFHTML:function(){var d="";if(navigator.plugins&&navigator.mimeTypes&&navigator.mimeTypes.length){if(this.getAttribute("doExpressInstall")){this.addVariable("MMplayerType","PlugIn");this.setAttribute('swf',this.xiSWFPath);}d='<embed type="application/x-shockwave-flash" src="'+htmlspecialchars(this.getAttribute('swf'))+'" width="'+htmlspecialchars(this.getAttribute('width'))+'" height="'+htmlspecialchars(this.getAttribute('height'))+'" style="'+htmlspecialchars(this.getAttribute('style')||"")+'"';d+=' id="'+htmlspecialchars(this.getAttribute('id'))+'" name="'+htmlspecialchars(this.getAttribute('id'))+'" ';var c=this.getParams();for(var a in c)d+=htmlspecialchars(a)+'="'+htmlspecialchars(c[a])+'" ';var b=this.getVariablePairs().join("&");if(b.length>0)d+='flashvars="'+b+'"';d+='/>';}else{if(this.getAttribute("doExpressInstall")){this.addVariable("MMplayerType","ActiveX");this.setAttribute('swf',this.xiSWFPath);}d='<object id="'+this.getAttribute('id')+'" classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" width="'+this.getAttribute('width')+'" height="'+this.getAttribute('height')+'" style="'+(this.getAttribute('style')||"")+'">';d+='<param name="movie" value="'+this.getAttribute('swf')+'" />';var c=this.getParams();for(var a in c)d+='<param name="'+a+'" value="'+c[a]+'" />';var b=this.getVariablePairs().join("&");if(b.length>0)d+='<param name="flashvars" value="'+b+'" />';d+="</object>";}return d;},write:function(a){if(this.getAttribute('useExpressInstall')){var b=new deconcept.PlayerVersion([6,0,65]);if(this.installedVer.versionIsValid(b)&&!this.installedVer.versionIsValid(this.getAttribute('version'))){this.setAttribute('doExpressInstall',true);this.addVariable("MMredirectURL",escape(this.getAttribute('xiRedirectUrl')));document.title=document.title.slice(0,47)+" - Flash Player Installation";this.addVariable("MMdoctitle",document.title);}}var c=(typeof a=='string')?document.getElementById(a):a;if(this.skipDetect||this.getAttribute('doExpressInstall')||this.installedVer.versionIsValid(this.getAttribute('version'))){if(!this.getAttribute('useIframe')){c.innerHTML=this.getSWFHTML();}else this._createIframe(c);return true;}else{if(this.getAttribute('redirectUrl')!="")document.location.replace(this.getAttribute('redirectUrl'));need_version=this.getAttribute('version').major+'.'+this.getAttribute('version').minor+'.'+this.getAttribute('version').rev;have_version=this.installedVer.major+'.'+this.installedVer.minor+'.'+this.installedVer.rev;this.fallback_js_fcn(have_version,need_version);c.innerHTML=this.fallback_html;}return false;},_createIframe:function(b){var a=$N('iframe',{width:this.getAttribute('width'),height:this.getAttribute('height'),frameBorder:0});DOM.empty(b);b.appendChild(a);useFacebookRefererHtml.bind(null,a,this.getSWFHTML()).defer();}};deconcept.SWFObjectUtil.getPlayerVersion=function(){var a=new deconcept.PlayerVersion([0,0,0]);if(navigator.plugins&&navigator.mimeTypes.length){for(var f=0;f<navigator.plugins.length;f++)try{var x=navigator.plugins[f];if(x.name=='Shockwave Flash'){PlayerVersion_tmp=new deconcept.PlayerVersion(x.description.replace(/([a-zA-Z]|\s)+/,"").replace(/(\s+r|\s+b[0-9]+)/,".").split("."));if(typeof a=='undefined'||PlayerVersion_tmp.major>a.major||(PlayerVersion_tmp.major==a.major&&(PlayerVersion_tmp.minor>a.minor||(PlayerVersion_tmp.minor==a.minor&&PlayerVersion_tmp.rev>a.rev))))a=PlayerVersion_tmp;}}catch(e){}}else if(navigator.userAgent&&navigator.userAgent.indexOf("Windows CE")>=0){var b=1;var c=3;while(b)try{c++;b=new ActiveXObject("ShockwaveFlash.ShockwaveFlash."+c);a=new deconcept.PlayerVersion([c,0,0]);}catch(d){b=null;}}else{try{var b=new ActiveXObject("ShockwaveFlash.ShockwaveFlash.7");}catch(d){try{var b=new ActiveXObject("ShockwaveFlash.ShockwaveFlash.6");a=new deconcept.PlayerVersion([6,0,21]);b.AllowScriptAccess="always";}catch(d){if(a.major==6)return a;}try{b=new ActiveXObject("ShockwaveFlash.ShockwaveFlash");}catch(d){}}if(b!=null)a=new deconcept.PlayerVersion(b.GetVariable("$version").split(" ")[1].split(","));}return a;};deconcept.PlayerVersion=function(a){this.major=a[0]!=null?parseInt(a[0]):0;this.minor=a[1]!=null?parseInt(a[1]):0;this.rev=a[2]!=null?parseInt(a[2]):0;};deconcept.PlayerVersion.prototype.versionIsValid=function(a){if(this.major<a.major)return false;if(this.major>a.major)return true;if(this.minor<a.minor)return false;if(this.minor>a.minor)return true;if(this.rev<a.rev)return false;return true;};deconcept.util={getRequestParameter:function(c){var d=document.location.search||document.location.hash;if(c==null)return d;if(d){var b=d.substring(1).split("&");for(var a=0;a<b.length;a++)if(b[a].substring(0,b[a].indexOf("="))==c)return b[a].substring((b[a].indexOf("=")+1));}return "";}};deconcept.SWFObjectUtil.cleanupSWFs=function(){var b=document.getElementsByTagName("OBJECT");for(var a=b.length-1;a>=0;a--){b[a].style.display='none';for(var c in b[a])if(typeof b[a][c]=='function')b[a][c]=function(){};}};if(!document.getElementById&&document.all)document.getElementById=function(a){return document.all[a];};var getQueryParamValue=deconcept.util.getRequestParameter;var FlashObject=deconcept.SWFObject;var SWFObject=deconcept.SWFObject;var flash_update_dialog_shown=false;function spawn_flash_update_dialog(a,b){if(flash_update_dialog_shown)return;flash_update_dialog_shown=true;new AsyncRequest().setURI('/ajax/flash_update_dialog.php').setData({have_version:a,need_version:b}).setMethod('GET').setReadOnly(true).send();}function setFlashFallback(d,g){var b=ge(d);var a=deconcept.SWFObjectUtil.getPlayerVersion();var e;g.each(function(h){h=new deconcept.PlayerVersion(h.toString().split('.'));if(h.major==a.major){e=h;return;}else if(typeof e=='undefined'||h.major<e.major)e=h;}.bind(this));if(b&&a.major>0){var c=a.major+'.'+a.minor+'.'+a.rev;var f=e.major+'.'+e.minor+'.'+e.rev;b.innerHTML=_tx("Flash {required-version} is required to view this content. Your current version is {current-version}. Please download the latest Flash Player.",{'required-version':f,'current-version':c});}}function getFlashPlayer(){goURI('http://get.adobe.com/flashplayer');return false;}function showFlashErrorDialog(b,a){Bootloader.loadComponents('error-dialog',function(){ErrorDialog.show(b,a);});}
function CreditsBalanceUpdater(){}CreditsBalanceUpdater.UPDATE='creditsBalance/update';CreditsBalanceUpdater.negBalance='negativeBalance';CreditsBalanceUpdater.repay='needsRepayment';CreditsBalanceUpdater.prototype={init:function(b,a){this.root=b;this.targetBalance=DOM.find(this.root,'span.creditsBalance');Arbiter.inform(CreditsBalanceUpdater.UPDATE,a,Arbiter.BEHAVIOR_STATE);Arbiter.subscribe(CreditsBalanceUpdater.UPDATE,this.oninform.bind(this),Arbiter.SUBSCRIBE_NEW);new LiveMessageReceiver('update_canvas_balance').setHandler(this.oninform_livemessage.bind(this)).register();},oninform_livemessage:function(a){this.oninform(CreditsBalanceUpdater.UPDATE,a);},oninform:function(c,b){if(c==CreditsBalanceUpdater.UPDATE){var a=ge('get_more_link');if(b>=0){CSS.removeClass(this.root,CreditsBalanceUpdater.negBalance);a&&CSS.removeClass(a,CreditsBalanceUpdater.repay);}else{CSS.addClass(this.root,CreditsBalanceUpdater.negBalance);a&&CSS.addClass(a,CreditsBalanceUpdater.repay);}DOM.setContent(this.targetBalance,b);}}};

if (window.Bootloader) { Bootloader.done(["+si3g"]); }