/*1358462502,173217045*/

if (self.CavalryLogger) { CavalryLogger.start_js(["ax6GZ"]); }

/** js/calendar/modules/CalendarUI.js */
__d("CalendarUI",["Event","Arbiter","AsyncRequest","CSS","DOM","DOMQuery","DOMScroll","Hovercard","Parent","Run","ScrollAwareDOM","Style","UIPagelet","Vector","ViewportBounds","$","copyProperties","ge","goURI"],function(a,b,c,d,e,f){




var g=b('Event'),

h=b('Arbiter'),
i=b('AsyncRequest'),
j=b('CSS'),
k=b('DOM'),
l=b('DOMQuery'),
m=b('DOMScroll'),
n=b('Hovercard'),
o=b('Parent'),
p=b('Run'),
q=b('ScrollAwareDOM'),
r=b('Style'),
s=b('UIPagelet'),
t=b('Vector'),
u=b('ViewportBounds'),

v=b('$'),
w=b('copyProperties'),
x=b('ge'),
y=b('goURI');

function z(){}

w(z,
{EVENT_ACTION:'EVENT_ACTION',
SUGGESTIONS_LOADED:'SUGGESTIONS_LOADED',
HIDE_SUGGESTED_EVENT:'HIDE_SUGGESTED_EVENT',

_todayButton:null,
_todayElement:null,
_registeredReminders:false,

init:function(){
h.subscribe(this.EVENT_ACTION,function(){

s.loadFromEndpoint
('CalendarHeaderPagelet',
'pagelet_calendar_header');



if(x('pagelet_calendar_invites'))
s.loadFromEndpoint
('CalendarInvitesPagelet',
'pagelet_calendar_invites');});





var aa=u.addTop(function(){
var ba=x('pagelet_calendar_header');
if(ba&&r.isFixed(ba.firstChild)){
var ca=ba.firstChild.getBoundingClientRect();
return ca.bottom;}

return 0;});


p.onLeave(function(){aa.remove();});},


initGridItem:function(aa,ba){
g.listen(aa,'click',function(event){

if(o.byTag(event.getTarget(),'a'))
return;




i.bootstrap(ba,aa.firstChild);
return;});},



initGridItemList:function(aa,ba,ca){
h.subscribe(this.SUGGESTIONS_LOADED,function(da,ea){
if(ba==ea.timestamp)
for(var fa=0;fa<ca&&fa<ea.content.length;fa++)
k.appendContent(aa,ea.content[fa]);});},





initScrollItem:function(aa,ba){
g.listen(aa,'click',this.scrollTo.bind(this,ba));},


scrollTo:function(aa,ba){
aa=l.isNode(aa)?aa:x(aa);
var ca=0;
if(aa){
var da=t.getElementPosition(v('fbCalendarWrapper')).y,
ea=t.getElementPosition(aa).y;
ca=ea-da;}else 

ca=t.getElementPosition(v('bottomContent')).y;

m.scrollTo(new t(0,ca,'document'),ba!==false);},


registerHomepageReminders:function(){
if(!this._registeredReminders){
h.subscribe(this.EVENT_ACTION,function(aa,ba){
if(x('pagelet_reminders'))
s.loadFromEndpoint
('RemindersPagelet',
'pagelet_reminders');});




this._registeredReminders=true;}},



registerTodayClickHandler:function(){

this._todayButton.onclick=null;
g.listen
(this._todayButton,
'click',
this.scrollTo.bind(this,this._todayElement));},



registerTodayElement:function(aa){
this._todayElement=l.isNode(aa)?aa:x(aa);
this._todayButton&&this.registerTodayClickHandler();},


registerTodayButton:function(aa){
this._todayButton=aa;
this._todayElement&&this.registerTodayClickHandler();},


registerEventLink:function(aa,ba){
h.subscribe(this.EVENT_ACTION,function(ca,da){
if(da.eid===ba){

var ea=l.scry(v("facebook"),".fbCalendarSuggestedLabel");
if(ea.length>0)
j.addClass(ea[0],"hidden_elem");

switch(da.action){
case 'GOING':
j.removeClass(aa.parentNode,"hidden_elem");
j.removeClass(aa,"fbCalendarEventSuggested");
j.addClass(aa,"fbCalendarEventGoing");
break;
case 'MAYBE':
j.removeClass(aa.parentNode,"hidden_elem");
j.removeClass(aa,"fbCalendarEventSuggested");
j.removeClass(aa,"fbCalendarEventGoing");
break;
case 'DECLINED':
case 'HIDDEN':
n.hide(true);
j.addClass(aa.parentNode,"hidden_elem");
break;
case 'EDITED':
if(da.name)
k.setContent(aa,da.name);

if(da.day){
var fa=x("pagelet_calendar_day_"+da.day);
if(fa){

var ga=l.find(fa,".fbCalendarGridEventList");
if(l.scry(ga,"li").length>=4){

j.addClass(aa.parentNode,"hidden_elem");
s.loadFromEndpoint
("CalendarDayPagelet",
"pagelet_calendar_day_"+da.day,
{day:da.timestamp});}else 


k.prependContent(ga,aa.parentNode);}else 



j.addClass(aa.parentNode,"hidden_elem");}


break;}}});},





informEventGoing:function(aa){
h.inform(this.EVENT_ACTION,
{eid:aa,
action:'GOING'});},



informEventMaybe:function(aa){
h.inform(this.EVENT_ACTION,
{eid:aa,
action:'MAYBE'});},



informEventDeclined:function(aa){
h.inform(this.EVENT_ACTION,
{eid:aa,
action:'DECLINED'});},



informEventHidden:function(aa){
h.inform(this.EVENT_ACTION,
{eid:aa,
action:'HIDDEN'});},



informEventEdited:function(aa,ba,ca,da){
h.inform(this.EVENT_ACTION,
{eid:aa,
action:'EDITED',
name:ba,
day:ca,
timestamp:da});},



informSuggestionsAdded:function(aa,ba){
h.inform(this.SUGGESTIONS_LOADED,
{timestamp:aa,
content:ba});},



removeCalendarListHeader:function(aa){
var ba=k.scry(aa,
"^.fbCalendarList .fbCalendarItem"),
ca=k.find(aa,"^.fbCalendarItem");

if(ba.length==1)
ca=k.find(aa,"^.fbCalendarList");

k.remove(ca);},


reloadPage:function(){
y(window.location);},


unhide:function(aa){


!function(){
q.monitor(aa.nextSibling,j.show.curry(aa));}.
defer();}});



e.exports=z;});

/** js/canvas/AppRequestController.js */
__d("CanvasAppRequestUpdater",["Arbiter","CSS","ChannelConstants","DOM","copyProperties","csx"],function(a,b,c,d,e,f){


var g=b('Arbiter'),
h=b('CSS'),
i=b('ChannelConstants'),
j=b('DOM'),
k=b('copyProperties'),
l=b('csx');

function m(n){
this._root=n;

g.subscribe
(i.getArbiterType('app_request_create'),

function(o,p){
var q=j.scry
(this._root,
".item_"+p.obj.appid)[0],

r=q&&
j.scry(q,"._1k71")[0];
r&&j.appendContent(r,p.obj.request);
q&&this._updateBookmark(q,1);}.
bind(this));


g.subscribe
(i.getArbiterType('app_request_delete'),

function(o,p){
var q=j.scry
(this._root,
".item_"+p.obj.appid)[0],

r=q&&j.scry
(q,"[data-requestid='"+p.obj.requestid+"']")[0];


r&&j.remove(r.parentElement);
q&&this._updateBookmark(q,-1);}.
bind(this));}



k(m.prototype,
{_updateBookmark:function(n,o){
var p=j.find(n,"._1k72"),
q=j.find(n,'.countValue'),
r=parseInt(j.getText(q),10),
s=Math.max(0,r+o);
j.setContent(q,s);
if(s<1){
h.hide(q.parentElement);
h.hide(p);}else{

h.show(q.parentElement);
h.show(p);}}});




e.exports=m;});

/** js/canvas/FlyoutLoader.js */
__d("CanvasFlyoutLoader",["Event","AsyncRequest"],function(a,b,c,d,e,f){


var g=b('Event'),

h=b('AsyncRequest'),

i=
{endpoint:'/ajax/canvas/flyouts',

init:function(j,k,l){
this.root=j;
this.largeApps=k;
this.seeAllApps=l;

this.handler=g.listen
(j,
'mouseenter',
this.loadFlyouts.shield(this));},



loadFlyouts:function(){
this.handler.remove();
this.handler=null;
var j=
{items:this.largeApps,
all_apps:this.seeAllApps};

new h().
setURI(this.endpoint).
setRelativeTo(this.root).
setMethod('post').
setReadOnly(true).
setData(j).
setAllowCrossPageTransition(true).
send();}};



e.exports=i;});

/** js/canvas/RecommendationFlyoutLoader.js */
__d("CanvasRecommendationFlyoutLoader",["Event","AsyncRequest"],function(a,b,c,d,e,f){


var g=b('Event'),

h=b('AsyncRequest'),

i=
{endpoint:'/ajax/canvas/recommendation/flyouts',

init:function(j,k){
this.root=j;
this.apps=k;

this.handler=g.listen
(j,
'mouseenter',
this.loadFlyouts.shield(this));},



loadFlyouts:function(){
this.handler.remove();
this.handler=null;
var j=
{items:this.apps};

new h().
setURI(this.endpoint).
setRelativeTo(this.root).
setMethod('post').
setReadOnly(true).
setData(j).
setAllowCrossPageTransition(true).
send();}};



e.exports=i;});

/** js/chat/BuddyListNub.js */
__d("BuddyListNub",["Event","Arbiter","AvailableList","BlackbirdUpsell","ChannelConnection","ChannelConstants","ChatConfig","ChatVisibility","Class","CSS","Dock","DOM","HTML","Keys","MercuryConfig","NubController","OrderedFriendsList","PresencePrivacy","Toggler","copyProperties","ge","tx"],function(a,b,c,d,e,f){



var g=b('Event'),

h=b('Arbiter'),
i=b('AvailableList'),
j=b('BlackbirdUpsell'),
k=b('ChannelConnection'),
l=b('ChannelConstants'),
m=b('ChatConfig'),
n=b('ChatVisibility'),
o=b('Class'),
p=b('CSS'),
q=b('Dock'),
r=b('DOM'),
s=b('HTML'),
t=b('Keys'),
u=b('MercuryConfig'),
v=b('NubController'),
w=b('OrderedFriendsList'),
x=b('PresencePrivacy'),
y=b('Toggler'),

z=b('copyProperties'),
aa=b('ge'),
ba=b('tx'),

ca=32,
da=10;

function ea(fa,ga,ha){
this.parent.construct(this);

this.parent.init(fa);

this.root=fa;
this.orderedList=ga;
this.typeahead=ha;


this.button=r.find(fa,'a.fbNubButton');
this.label=r.find(fa,'span.label');
this.body=r.scry(fa,'div.fbNubFlyoutBody')[0];

var ia=r.find(fa,'div.fbNubFlyoutTitlebar');
y.createInstance(ia).setSticky(false);


ga.subscribe
('render',
this.flyoutContentChanged.bind(this));


ga.setScrollContainer(this.body);


i.subscribe
('buddylist/availability-changed',
this._updateCount.bind(this));



h.subscribe
('chat/connect',
this._handleConnect.bind(this));

x.subscribe
('privacy-user-presence-changed',
this._handleVisibilityChange.bind(this));

this.message=r.find
(fa,
'div.fbDockChatBuddyListNubMessage div.message');

this.warningMsgText=null;
this.warningMsgEventListener=null;
this.showWarningTimeout=null;
k.subscribe
(k.CONNECTED,
this._handleChannelConnected.bind(this));

k.subscribe
(k.SHUTDOWN,
this._handleChannelShutdown.bind(this));

k.subscribe
(k.RECONNECTING,
this._handleChannelReconnecting.bind(this));

k.subscribe
([k.MUTE_WARNING,
k.UNMUTE_WARNING],
this._updateView.bind(this));



this.subscribe('show',this.onShow.bind(this));
this.subscribe('hide',this.onHide.bind(this));
this.subscribe('resize',this.onResize.bind(this));


g.listen(fa,'keydown',this._onKeyDown.bind(this));
g.listen(this.button,'click',this.onButtonClick.bind(this));


ha.subscribe(['respond','reset'],function(ja,ka){
if(this._isOpen){
var la=this.orderedList.isVisible();
if(ka&&
ka.value&&
ka.value===ha.getCore().getValue()&&
ha.getView().isVisible()){
q.setUseMaxHeight(this.root,false);
this.orderedList.hide();}else 

this._showBuddyList();




if(la!==this.orderedList.isVisible())
this.flyoutContentChanged();}}.


bind(this));


h.subscribe('sidebar/show',this.hide.bind(this));

this._orderedListCount=w.getList().length;


h.inform
('buddylist-nub/initialized',
this,
h.BEHAVIOR_PERSISTENT);

this._handleVisibilityChange();}


o.extend(ea,v);

z(ea.prototype,





{getButton:function(){
return this.button;},






getRoot:function(){
return this.root;},






_handleConnect:function(fa){
this._updateView(true);},






_getShutdownReason:function(fa){
switch(fa){
case l.HINT_AUTH:
return "Your session has timed out. Please log in.";
case l.HINT_CONN:
return ba._("Facebook {Chat} is currently unavailable.",{Chat:"Chat"});
case l.HINT_MAINT:
return ba._("Facebook {Chat} is currently down for maintenance.",{Chat:"Chat"});

default:return ba._("Facebook {Chat} is currently unavailable.",{Chat:"Chat"});
}},










_getReconnectMsg:function(fa){
var ga;

if(fa===null){

ga="Unable to connect to chat. Check your Internet connection.";}else
if(fa>m.get('warning_countdown_threshold_msec')){


var ha=r.create
('a',
{href:'#',className:'fbChatReconnectLink'},
"Try again"),

ia=r.create('div',null,ha),
ja=ia.innerHTML;

ga=s(ba._("Unable to connect to chat. {try-again-link}",
{'try-again-link':ja}));}else

if(fa>1000){

ga=ba._("Unable to connect to chat. Reconnecting in {seconds}...",
{seconds:Math.floor(fa/1000)});}else 



ga="Unable to connect to chat. Reconnecting...";


return ga;},


_resetShowWarningTimeout:function(){
if(this.showWarningTimeout){
clearTimeout(this.showWarningTimeout);
this.showWarningTimeout=null;}},



_handleChannelConnected:function(fa){

this._resetShowWarningTimeout();


if(this.orderedList.isVisible())
n.goOnline();



this.warningMsgText=null;


this._updateView();},


_handleChannelShutdown:function(fa,ga){

this._resetShowWarningTimeout();


this.warningMsgText=this._getShutdownReason(ga);


this._updateView();},


_handleChannelReconnecting:function(fa,ga){

this._resetShowWarningTimeout();


this.warningMsgText=this._getReconnectMsg(ga);



if(ga>1000){
if(ga>m.get('warning_countdown_threshold_msec')){
if(this.warningMsgEventListener){
this.warningMsgEventListener.remove();
this.warningMsgEventListener=null;}

this.warningMsgEventListener=g.listen
(this.message,
'click',
function(event){
if(p.hasClass(event.getTarget(),'fbChatReconnectLink')){
this._tryReconnect();
event.kill();}}.

bind(this));}


this.showWarningTimeout=setTimeout
(this._handleChannelReconnecting.bind(this,fa,ga-1000),
1000,
false);}




this._updateView();},


_tryReconnect:function(){

if(k.disconnected())
k.reconnect();},



_handleVisibilityChange:function(){
this._updateView();


if(j.shouldShow()){
if(n.hasBlackbirdEnabled()){
j.showBlackbirdDialog
(this.getButton(),
x.getVisibility());}else

if(!n.isOnline())
j.showOfflineDialog(this.getButton());}else 


j.hide();


if(!n.isOnline())
this.hide();},










_updateView:function(fa){

var ga=aa('fbDockChat');
p.conditionClass(ga,'offline',!n.isOnline());
p.conditionClass
(ga,
'error',
k.disconnected());



if(k.disconnected())
r.setContent(this.message,this.warningMsgText);



if(!n.isOnline()){
if(u.ChatControlLanguageChangeGK){

this._setLabel(ba._("{Chat} (Off)",{Chat:"Chat"}));}else 


this._setLabel(ba._("{Chat} (Offline)",{Chat:"Chat"}));}else

if(k.disconnected()){

this._setLabel(ba._("{Chat} (Disconnected)",{Chat:"Chat"}));}else{

var ha=i.getOnlineCount();

if(ha){
var ia=ba._("{Chat} {number-available}",
{Chat:"Chat",
'number-available':
['<span class="count">',
'(<strong>',ha,'</strong>)',
'</span>'].
join('')});

this._setLabel(s(ia));}else 

this._setLabel("Chat",fa);}},







onButtonClick:function(){
this._conditionallyShowTypeahead();




if(p.shown(this.typeahead.getElement())){
var fa=this.subscribe('show',function(){
this.typeahead.getCore().getElement().focus();

j.dismiss();}.
bind(this));
this.unsubscribe.bind(this,fa).defer();}},






onHide:function(){
this._isOpen=false;

if(this._buddyListRenderSubscription){
this.orderedList.unsubscribe(this._buddyListRenderSubscription);
this._buddyListRenderSubscription=null;}

this.orderedList.hide();

this.typeahead.getCore().reset();},






_onKeyDown:function(event){
var fa=g.getKeyCode(event);


if(fa===t.ESC&&
!p.hasClass(this.root,'menuOpened')){
this.hide();
return false;}},



onResize:function(){



var fa=q.getMaxFlyoutHeight(this.root)-60,

ga=Math.max(250,fa);
this.orderedList.setNumTopFriends
(Math.floor(ga/ca));},


_showBuddyList:function(){


if(!this._buddyListRenderSubscription)
this._buddyListRenderSubscription=
this.orderedList.subscribe
('render',
q.setUseMaxHeight.bind(q,this.root,false));


this.orderedList.show();},





onShow:function(){
this._isOpen=true;

if(k.disconnected()){
this._tryReconnect();
this._showBuddyList();}else 

n.goOnline(this._showBuddyList.bind(this));},










_setLabel:function(fa,ga){
var ha=this.label.cloneNode(true);
r.setContent(ha,fa);
r.replace(this.label,ha);
this.label=ha;

this.throbber&&p.conditionShow(this.throbber,!!ga);},


_conditionallyShowTypeahead:function(){
p.conditionShow
(this.typeahead.getElement(),
this._orderedListCount>=da);},






_updateCount:function(){
this._updateView();

this._conditionallyShowTypeahead();}});



e.exports=ea;});

/** js/ui/xhp/link/tooltip.js */
__d("TooltipLink",["Parent","Tooltip"],function(a,b,c,d,e,f){



var g=b('Parent'),
h=b('Tooltip'),




i=






{setTooltipText:function(j,k){
j=g.byTag(j,'a');
j&&h.set(j,k);}};



e.exports=i;});

/** js/chat/ChatOnlineFriends.js */
__d("ChatOnlineFriends",["Event","AvailableList","AvailableListConstants","ChannelConnection","Chat","ChatConfig","ChatVisibility","CSS","DataStore","DOM","OrderedFriendsList","Parent","Run","ShortProfiles","TooltipLink","XHPTemplate","copyProperties","createObjectFrom","cx","ChatTypeaheadBehavior","ChatTypeaheadCore","ChatTypeaheadDataSource","ChatTypeaheadRenderer","Typeahead"],function(a,b,c,d,e,f){






var g=b('Event'),

h=b('AvailableList'),
i=b('AvailableListConstants'),
j=b('ChannelConnection'),
k=b('Chat'),
l=b('ChatConfig'),
m=b('ChatVisibility'),
n=b('CSS'),
o=b('DataStore'),
p=b('DOM'),
q=b('OrderedFriendsList'),
r=b('Parent'),
s=b('Run'),
t=b('ShortProfiles'),
u=b('TooltipLink'),
v=b('XHPTemplate'),

w=b('copyProperties'),
x=b('createObjectFrom'),
y=b('cx');


b('ChatTypeaheadBehavior');
b('ChatTypeaheadCore');
b('ChatTypeaheadDataSource');
b('ChatTypeaheadRenderer');
b('Typeahead');

function z(ba){
switch(ba){
case i.OFFLINE:
return 'chatOffline';
case i.IDLE:
return 'chatIdle';
case i.ACTIVE:
return 'chatOnline';
case i.MOBILE:
return 'chatMobile';}}



var aa=function(ba,
ca,
da,
ea,
fa,
ga,
ha){
var ia=(ea&&fa)||
(ga&&ha);

if(ba&&ca&&da&&ia)
this.init
(ba,
ca,
da,
ea,
fa,
ga,
ha);};



w(aa.prototype,





{chatFriends:{},




chatStatuses:['chatOnline','chatIdle','chatMobile','chatOffline'],

_availableListSubscribe:function(event,ba){
this._arbiterTokens.push(h.subscribe(event,ba));},


_channelSubscribe:function(event,ba){
this._arbiterTokens.push
(j.subscribe(event,ba));},








onunload:function(){
this._arbiterTokens.forEach(function(ba){
ba.unsubscribe();});},



_setStatus:function(ba,ca){

if(n.hasClass(ba,ca))
return;


this.chatStatuses.forEach(function(da){
n.conditionClass(ba,da,da==ca);});},



initTypeahead:function(ba,ca,da){
ba.subscribe('reset',function(){
n.show(ca);});


ba.subscribe('query',function(ea,fa){
n.conditionShow(ca,!fa.value);});



if(da)
ba.subscribe(['query','reset'],function(ea){
n.conditionShow(da,ea==='reset');});},





init:
function(ba,
ca,
da,
ea,
fa,
ga,
ha){

this.maxElements=ba;
this._faceTmpl=fa;
this._arbiterTokens=[];
this._root=da;

s.onLeave(this.onunload.bind(this));

var ia=p.scry(da,'.chatUpgradeLink');
this.initTypeahead(ca,ea||ga,ia[0]);

var ja=p.find(da,'.sidebarBtn');
g.listen(ja,'click',function(event){
k.toggleSidebar();
event.kill();});





this._faceFutures&&this._hideAllFaces();
this._faceFutures=[];

this._orderedFriends=q.getList();
this._hashedFriends=x(this._orderedFriends);


this._availableListSubscribe
(i.ON_AVAILABILITY_CHANGED,
this.update.shield(this));
this.update.bind(this).defer();

this._channelSubscribe
(j.CONNECTED,
this.update.shield(this));

this._channelSubscribe
(j.RECONNECTING,
this._handleChannelReconnecting.bind(this));

this._channelSubscribe
(j.SHUTDOWN,
this._handleChannelShutdown.bind(this));

this._channelSubscribe
([j.MUTE_WARNING,
j.UNMUTE_WARNING],
this.update.shield(this));


if(ea){
this._facepile=ea.firstChild;
g.listen(ea,'click',this.clickHandler.bind(this));}else{

this._miniDivebar=ga;
this._divebarTmpl=ha;}


g.listen
(p.find(da,'.fbChatGoOnlineLink'),
'click',
function(event){
if(j.disconnected()){
k.openBuddyList();}else 

m.goOnline(k.openBuddyList);

event.kill();}.
bind(this));


g.listen
(p.find(da,'.fbChatReconnectLink'),
'click',
function(event){
if(j.disconnected())
j.reconnect();

event.kill();}.
bind(this));



h.update();},


_updateMiniDivebar:function(){
var ba=Math.min(this._orderedFriends.length,10),

ca=[];
for(var da=0;da<ba;da++)
ca.push(this._renderDivebarItem(this._orderedFriends[da]));


p.setContent(this._miniDivebar,ca);},


_renderDivebarItem:function(ba){
var ca=this._divebarTmpl.build(),

da=ca.getNode('anchor'),
ea=ca.getNode('status'),

fa=h.get(ba);

if(fa===i.ACTIVE){
n.addClass(ea,'active');}else
if(fa===i.MOBILE)
n.addClass(ea,'mobile');


t.get(ba,function(ga){
ca.
setNodeContent('name',ga.name).
setNodeProperty('profile-photo','src',ga.thumbSrc);

g.listen(da,'click',function(){
k.openTab(ba,null,'friend','online_friends');
return false;});});



return ca.getRoot();},


_handleChannelReconnecting:function(ba,ca){
var da=(ca<1000),

ea=p.find(this._root,'.fbChatReconnectLink'),
fa=p.find(this._root,'.fbChatReconnecting');


n.conditionShow(ea,!da);


n.conditionShow(fa,da);},


_handleChannelShutdown:function(){
var ba=p.find(this._root,'.fbChatReconnectLink'),
ca=p.find(this._root,'.fbChatReconnecting');


n.hide(ba);
n.hide(ca);},


update:function(){
var ba=j.disconnected(),

ca=m.isOnline();


n.conditionClass(this._root,'disconnected',ba);


if(this._facepile){
n.conditionShow(this._facepile,ca);
ca&&this._updateFacepile(ba);}else 

ca&&this._updateMiniDivebar();



var da=p.find(this._root,'.typeaheadContainer');
n.conditionShow(da,ca);


if(l.get('chat_upgrade_link')){
var ea=p.find(this._root,'.chatUpgradeLink');
n.conditionShow(ea,ca);}



var fa=p.find(this._root,'.chatGoOnlineLink');
n.conditionShow(fa,!ca);


var ga=p.find(this._root,'.chatReconnectLink');


n.conditionShow(ga,ca&&ba);},


_updateFacepile:function(ba){


h.getAvailableIDs().forEach(function(ia){
if(!this._hashedFriends[ia]){
this._orderedFriends.push(ia);
this._hashedFriends[ia]=true;}}.

bind(this));

var ca=0;
for(var da=0;
da<this._orderedFriends.length;
da++){
var ea=this._orderedFriends[da],
fa=h.get(ea),
ga=this._faceFutures[da],

ha=(ba||
fa!==i.OFFLINE)&&
(ca<this.maxElements);
if(ha){
if(!ga){
ga=this._makeFace(da);
this._faceFutures[da]=ga;}

ca++;}

this._updateFace(ga,ha,z(fa));}},



_updateFace:function(ba,ca,da){
ba&&ba(function(ea){
this._setStatus(ea,da);
n.conditionShow(ea,ca);}.
bind(this));},





_makeFace:function(ba){
var ca=null,
da=null,
ea=this._orderedFriends[ba];

t.get(ea,function(fa){
da=this._faceTmpl.render();
o.set(da,'friendID',ea);

var ga=v.getNode(da,'img'),


ha=ga.cloneNode(false);
ha.setAttribute('src',fa.thumbSrc);
p.replace(ga,ha);

var ia=v.getNode(da,'anchor');
u.setTooltipText(ia,fa.name);

ca&&ca(da);

var ja=false;


for(var ka=ba+1;
ka<this._orderedFriends.length&&!ja;
ka++){
var la=this._faceFutures[ka],
ma=la&&la();
if(ma){
this._facepile.insertBefore(da,ma);
ja=true;}}



if(!ja)
this._facepile.appendChild(da);}.

bind(this));

return function fa(ga){
if(ga)
if(da){
ga(da);}else 

ca=ga;



return da;};},



clickHandler:function(event){
var ba=event.getTarget(),
ca=r.byClass(ba,"_43q7");
if(ca){
var da=o.get(ca,'friendID');
if(da&&m.isOnline()){
k.openTab(da,null,'friend','online_friends');
return false;}}},




_hideAllFaces:function(){
this._faceFutures.forEach(function(ba){
ba&&ba(function(ca){
p.remove(ca);});});}});






e.exports=aa;});

/** js/chat/livebar/LiveBarData.js */
__d("LiveBarData",["function-extensions","Arbiter","ArbiterMixin","AsyncRequest","ChannelConstants","LayerDestroyOnHide","copyProperties","setTimeoutAcrossTransitions"],function(a,b,c,d,e,f){



b('function-extensions');

var g=b('Arbiter'),
h=b('ArbiterMixin'),
i=b('AsyncRequest'),
j=b('ChannelConstants'),
k=b('LayerDestroyOnHide'),

l=b('copyProperties'),
m=b('setTimeoutAcrossTransitions'),

n=false,

o={},
p={},
q={};

function r(y){
if((y.expires*1000)-Date.now()>0)
return true;

return false;}





function s(y){
var z=y.payload.actions;
if(!(z&&z.length))
return;


var aa;
for(var ba=0;ba<z.length;ba++){
aa=z[ba].actor_id;
if(!o[aa]||
z[ba].action_id!=o[aa].action_id)



continue;


if(z[ba].delete_action||z[ba].remove){
v(z[ba]);
continue;}}}




function t(y){
var z=false;
for(var aa=0;aa<y.length;aa++){
if(y[aa].delete_action||y[aa].remove){
v(y[aa]);
continue;}


var ba=y[aa].actor_id,
ca=y[aa].action_id;
if(o[ba]){
if(o[ba].action_id==ca)
continue;

v(o[ba]);}


z=true;
o[ba]=y[aa];
u(y[aa]);}


if(z)
x.inform('new-actions');}



function u(y){
var z=(y.expires*1000)-Date.now();
p[y.actor_id]=
m
(v.curry(y),
Math.max(0,z));}






function v(y){
if(!o[y.actor_id])
return;


if(o[y.actor_id].action_id!=y.action_id)
return;


delete o[y.actor_id];

var z=y.actor_id;

if(p[z]){
clearTimeout(p[z]);
delete p[z];}


w(z);

x.inform('remove-action',y);}


function w(y){
var z=q[y];
if(z){

z.enableBehavior(k);
if(!z.isShown())
z.destroy();

delete q[y];}}



g.subscribe
(j.getArbiterType('livebar_update'),
function(y,z){
t(z.obj.actions);});



var x={};

l(x,h,




{fetch:function(){
if(n)
return;


var y=[];

for(var z in o){
var aa=o[z];
if(aa.suppress_callout)
continue;



if(!q[aa.actor_id])
y.push(o[z]);}



if(y.length>0){
n=true;
new i().
setURI('/ajax/chat/livebar.php').
setData({actions:y}).
setHandler(s).
setFinallyHandler(function(){
n=false;}).

setAllowCrossPageTransition(true).
send();}},



addActions:t,

getAction:function(y){
var z=o[y];
if(z&&r(z))
return z;

return null;},


getDialog:function(y){
var z=this.getAction(y);
if(z&&q[z.actor_id])
return q[z.actor_id];

return null;},





setDialog:function(y,z,aa){
var ba=o[y];
if(ba&&ba.action_id==z){
w(y);

q[y]=aa;
x.inform('dialog-fetched',y);}}});





e.exports=x;});

/** js/chat/livebar/LiveBar.js */
__d("LiveBar",["function-extensions","ChatConfig","CSS","LiveBarData","copyProperties","setTimeoutAcrossTransitions","ChatOrderedList","ContextualDialogX"],function(a,b,c,d,e,f){



b('function-extensions');

var g=b('ChatConfig'),
h=b('CSS'),
i=b('LiveBarData'),

j=b('copyProperties'),
k=b('setTimeoutAcrossTransitions');


b('ChatOrderedList');
b('ContextualDialogX');



var l=g.get('livebar_fetch_defer')||1000;

function m(n,o,p){
this._orderedList=n;
this._root=n.getRoot();
this._liveBarTypes=p;

this._hoverController=n.getHoverController();
this._hoverController.subscribe('hover',this._mouseMove.bind(this));
this._hoverController.subscribe('leave',this._mouseLeave.bind(this));

n.subscribe('render',this._handleChatListUpdate.shield(this));

i.subscribe('new-actions',this._updateIcons.bind(this));
i.subscribe('remove-action',this._handleRemoveAction.bind(this));
i.subscribe('dialog-fetched',function(q,r){
this._setDialogContent(r);}.
bind(this));

i.addActions(o);}


j(m,




{setDialog:function(n,o,p){
i.setDialog(n,o,p);}});




j(m.prototype,
{_root:null,
_liveBarTypes:null,

_hoverController:null,
_registrations:{},

_renderedIcons:{},
_fetchTimer:null,
_mouseLeftRoot:false,
_chatListRendered:false,

_getLiveBarTypes:function(){
return this._liveBarTypes;},





_handleChatListUpdate:function(){
if(!this._chatListRendered){
this._chatListRendered=true;
this._updateIcons();}},



_handleShow:function(n){

this._setDialogContent(n);},




_mouseMove:function(){
if(!this._fetchTimer){
this._fetchTimer=k
(this._fetch.bind(this),
l);

this._mouseLeftRoot=false;}},



_mouseLeave:function(){
this._mouseLeftRoot=true;
clearTimeout(this._fetchTimer);
this._fetchTimer=null;},


_setDialogContent:function(n){
var o=i.getDialog(n);
if(o)
this._hoverController.showHovercard(n,o);},



_fetch:function(){
if(this._mouseLeftRoot)
return;


this._fetchTimer=null;
i.fetch();},


_updateIcons:function(){
if(!this._chatListRendered)
return;


var n=this._orderedList.getAllNodes(),
o=this._getLiveBarTypes();
for(var p in n){

var q=i.getAction(p);
if(q&&
(!this._renderedIcons[p]||
this._renderedIcons[p]!=q.action_id)){
for(var r=0;r<o.length;r++)
h.removeClass(n[p],o[r]);

h.addClass(n[p],q.livebar_type);
this._renderedIcons[p]=q.action_id;

var s=
this._hoverController.register(p,this._handleShow.bind(this));
if(s)
this._registrations[p]=s;}}},








_handleRemoveAction:function(n,o){
var p=o.action_id,
q=o.actor_id;

this._registrations[q]&&
this._registrations[q].unregister();
delete this._registrations[q];

if(this._renderedIcons[q]==p){
var r=this._getLiveBarTypes(),
s=this._orderedList.getAllNodes();
if(s[q])
for(var t=0;t<r.length;t++)
h.removeClass(s[q],r[t]);


delete this._renderedIcons[q];}}});





e.exports=m;});

/** js/chat/livebar/LiveBarDark.js */
__d("LiveBarDark",["Class","LiveBar","copyProperties","emptyFunction"],function(a,b,c,d,e,f){



var g=b('Class'),
h=b('LiveBar'),

i=b('copyProperties'),
j=b('emptyFunction');

function k(l,m,n){
this.parent.construct(this,l,m,n);}


g.extend(k,h);

i(k.prototype,
{_setupDialogContent:j,
_show:j,
_updateIcons:j,
_handleRemoveAction:j,
_handleChatListUpdate:j});


e.exports=k;});

/** js/chat/sidebar/ChatSidebarDropdown.js */
__d("ChatSidebarDropdown",["Arbiter","AsyncRequest","Chat","ChatOptions","ChatVisibility","CSS","DOM","JSLogger","PresenceState","Selector","copyProperties"],function(a,b,c,d,e,f){




var g=b('Arbiter'),
h=b('AsyncRequest'),
i=b('Chat'),
j=b('ChatOptions'),
k=b('ChatVisibility'),
l=b('CSS'),
m=b('DOM'),
n=b('JSLogger'),
o=b('PresenceState'),
p=b('Selector'),

q=b('copyProperties');

function r(s){
this._root=s;
this._logger=n.create('blackbird');
this._displayBrowserNotificationsIfNeeded();

p.listen(s,'select',this._onSelect.bind(this));
p.listen(s,'toggle',this._onToggle.bind(this));

g.subscribe('chat/option-changed',this._onOptionChanged.bind(this));}


q(r.prototype,
{changeSetting:function(s,t){
if(this._pendingChange)
return false;

this._pendingChange=true;

var u={};
u[s]=t;

j.setSetting(s,t,'sidebar_menu');

new h('/ajax/chat/settings.php').
setHandler(this._onChangeSettingResponse.bind(this,s,t)).
setErrorHandler(this._onChangeSettingError.bind(this,s,t)).
setFinallyHandler(this._onChangeFinally.bind(this)).
setData(u).
setAllowCrossPageTransition(true).
send();},


_displayBrowserNotificationsIfNeeded:function(){
if(window.webkitNotifications){


m.scry(document,'li.sidebar-browser-notif').forEach(l.show);
if(window.webkitNotifications.checkPermission()!==0)


m.scry(document,'li.sidebar-browser-notif').forEach(function(s){
l.removeClass(s,'checked');});}},





_conditionEnabled:function(s,t){
var u=p.getOption(this._root,s);
u&&p.setOptionEnabled(u,t);},


_onChangeSettingResponse:function(s,t,u){

o.doSync();},


_onChangeSettingError:function(s,t,u){

j.setSetting(s,!t,'sidebar_menu_error');},


_onChangeFinally:function(){
this._pendingChange=false;},


_onOptionChanged:function(s,t){
var u=t.name,
v=t.value;
if(u==='sound'||u==='browser_notif'){
var w=p.getOption(this._root,u);
if(v!==p.isOptionSelected(w))
p.setSelected(this._root,u,v);}},




_onSelect:function(s){
if(this._pendingChange)
return false;


var t=false,
u=false,
v=p.getOptionValue(s.option);

switch(v){
case 'sidebar':
return this.toggleSidebar();

case 'online':
if(!k.isOnline()){
k.goOnline();}else 

u=true;

t=true;
break;

case 'offline':
if(k.isOnline()){
k.goOffline();}else 

u=true;

t=true;
break;

case 'advanced_settings':
g.inform('chat/advanced-settings-dialog-opened');
t=true;
break;}


if(u){
this._logger.error
('sidebar_dropdown_visibility_error',
{action:v});}else 


this._logger.log
('sidebar_dropdown_set_visibility',
{action:v});



if(t){
p.toggle(this._root);
return false;}},



_onToggle:function(s){
if(this._pendingChange)
return false;


var t=p.getOptionValue(s.option),
u=p.isOptionSelected(s.option);

switch(t){
case 'visibility':
if(!k){
this._jslogger.error('on_toggle_visibility_undefined');
return;}


k.toggleVisibility();
this._logger.log
('sidebar_dropdown_toggle_visibility',
{available:u});
break;
case 'browser_notif':

if(u&&
window.webkitNotifications&&
window.webkitNotifications.checkPermission()!==0){
window.webkitNotifications.requestPermission(function(){
this.changeSetting(t,u);}.
bind(this));}else 

this.changeSetting(t,u);

break;
case 'sound':
this.changeSetting(t,u);
break;}

p.toggle(this._root);},


_onVisibilityChanged:function(){
var s=k.isOnline(),
t=p.getOption(this._root,'visibility');
if(s!==p.isOptionSelected(t))
p.setSelected(this._root,'visibility',s);},



toggleSidebar:function(){
i.toggleSidebar();
p.toggle(this._root);
return false;}});



e.exports=r;});

/** js/desktop/marketing/FbdEventLog.js */
__d("FbdEventLog",["URI","AsyncSignal"],function(a,b,c,d,e,f){






var g=b('URI'),
h=b('AsyncSignal'),

i=
{log:function(j,k,l,m){
if(!j)
return;


var n=g('/desktop/eventlog.php'),
o=new h
(n.toString(),

{event:j,
category:k||'unknown',
payload:l||''});

o.setHandler(m).send();}};



e.exports=i;});

/** js/download_dialog/DownloadDialog.js */
__d("DownloadDialog",["Event","Arbiter","Class","DataStore","ModalMask","Overlay","Parent","Style","copyProperties","emptyFunction"],function(a,b,c,d,e,f){









var g=b('Event'),

h=b('Arbiter'),
i=b('Class'),
j=b('DataStore'),
k=b('ModalMask'),
l=b('Overlay'),
m=b('Parent'),
n=b('Style'),

o=b('copyProperties'),
p=b('emptyFunction');

function q(){
this.parent.construct(this);
return this;}


i.extend(q,l);

o(q,


{POSITIONS:
{BOTTOM_LEFT:'bottom_left',
TOP_LEFT:'top_left',
IE9_BOTTOM:'ie9_bottom'},



activeDialogs:{},




dismissAll:function(){

for(var r in this.POSITIONS)
this.hideDialog(this.POSITIONS[r]);},



hideDialog:function(r){
var s=this.activeDialogs[r];
s&&s.hide();
this.activeDialogs[r]=null;}});



o(q.prototype,

{_cancelHandler:p,
_closeHandler:p,
_width:null,
position:q.POSITIONS.BOTTOM_LEFT,

init:function(r,s){
this.parent.init(r);
this.position=s;

var t=(j.get(this._root,'modal')==='true');


q.hideDialog(s);
q.activeDialogs[s]=this;


g.listen(this._root,'click',function(event){
if(m.byClass(event.getTarget(),'closeButton'))
if(this._cancelHandler()!==false)
q.hideDialog(this.position);}.


bind(this));

this.subscribe('show',function(){
if(t)
k.show();

h.inform('layer_shown',{type:'DownloadDialog'});}.
bind(this));

this.subscribe('hide',function(){
if(t)
k.hide();

h.inform('layer_hidden',{type:'DownloadDialog'});
this._closeHandler();}.
bind(this));},



setWidth:function(r){
this._width=Math.floor(r);
return this;},


updatePosition:function(){
if(this._width)
n.set(this._overlay,'width',this._width+'px');

return true;},


setCancelHandler:function(r){
this._cancelHandler=r||p;
return this;},


setCloseHandler:function(r){
this._closeHandler=r||p;
return this;}});




e.exports=q;});

/** js/desktop/promo/FbdConversionTracking.js */
__d("FbdConversionTracking",["AsyncRequest","emptyFunction"],function(a,b,c,d,e,f){



var g=b('AsyncRequest'),

h=b('emptyFunction'),

i=
{logClick:function(j,k){
if(!k)
k='desktop';

new g().
setURI('/ajax/desktop/log_clicks.php').
setData({click_source:j,promo:k}).
setAllowCrossPageTransition(true).
setErrorHandler(h).
send();},


logConversion:function(j,k){
if(!k)
k='desktop';

new g().
setURI('/ajax/desktop/log_conversions.php').
setData({conversion_action:j,promo:k}).
setAllowCrossPageTransition(true).
setErrorHandler(h).
send();}};



e.exports=i;});

/** js/megaphone/MegaphoneHelper.js */
__d("MegaphoneHelper",["Animation","AsyncRequest","Dialog","ge"],function(a,b,c,d,e,f){








var g=b('Animation'),
h=b('AsyncRequest'),
i=b('Dialog'),
j=b('ge'),










k=

{hideStory:function(l,m,n,o,p){
var q=
{mp_id:l,
location:m,
context:o};

new h().
setURI('/ajax/megaphone/megaphone_hide.php').
setMethod('POST').
setData(q).
setHandler(function(s){
p&&p(s);}).

send();

var r=j(n);
if(r)
g(r).
to('height',0).
duration(500).
hide().
go();},



createModalStory:function(l,
m,
n,
o){
var p;
if(!l.buttons||!l.buttons.length){
l.buttons=i.CLOSE;
p=this.hideStory.bind(this,m,n,o,null);}


var q=new i(l);
if(p)
q.setHandler(p);

q.show();},


buttonOnClick:function(l,m,n,o,p,q){
var r=function(){
if(p){
new h().
setURI(o).
send();}else 

document.location.href=o;};



if(q){
this.hideStory(l,m,'',n,function(){
r();});}else 


r();}};





e.exports=k;});

/** js/desktop/marketing/FbdInstall.js */
__d("FbdInstall",["$","AsyncRequest","CSS","DOM","DownloadDialog","FbdConversionTracking","FbdEventLog","FBDesktopDetect","FBDesktopPlugin","MegaphoneHelper"],function(a,b,c,d,e,f){



var g=b('$'),
h=b('AsyncRequest'),
i=b('CSS'),
j=b('DOM'),
k=b('DownloadDialog'),
l=b('FbdConversionTracking'),
m=b('FbdEventLog'),
n=b('FBDesktopDetect'),
o=b('FBDesktopPlugin'),
p=b('MegaphoneHelper'),

q=1000,
r=300*q,

s=
{cancelSetup:function(){
var t=JSON.stringify({ref:this.ref});
m.log('download_canceled','setup',t);
l.logConversion('download_canceled');},


hideMegaphone:function(){


if(this.megaphoneId&&this.megaphoneLoc)
p.hideStory
(this.megaphoneId,
this.megaphoneLoc,
this.elementId,
'',
null);},



init:function(t,u){
this.downloadUrl=t;
this.ref=u||'unknown';},


initInstallWait:function(t,u,v){

this.megaphoneId=t;
this.megaphoneLoc=u;
this.elementId=v;

this._waitForInstall(r);},


promptDownload:function(t){
t=t||this.downloadUrl;
if(t){
var u=JSON.stringify({ref:this.ref});
m.log('download_prompted','setup',u);
l.logConversion('download_prompted');

var v=j.create('iframe',
{src:t,
className:'hidden_elem'});

j.appendContent(document.body,v);}},



_responseHandler:function(t){
if(t.payload){
this._authToken=t.payload.access_token;
this._userId=t.payload.id;}


if(this._authToken&&this._userId){
this._waitForRunningStart=new Date().getTime();
setTimeout(this._waitForRunning.bind(this),q);}},



setupPlugin:function(){
new h('/ajax/desktop/download').send();
this.promptDownload();},


updateSidebarLinkVisibility:function(){
if(!n.isPluginInstalled()){
i.show(g('sidebar-messenger-install-link'));
i.show(g('sidebar-messenger-install-separator'));}},



_waitForInstall:function(t){
var u=JSON.stringify({ref:this.ref});

if(n.isPluginInstalled()){
m.log('install_success','setup',u);
l.logConversion('install_success');

o.recheck();

new h("/desktop/fbdesktop2/transfer.php").
setMethod("POST").
setHandler(this._responseHandler.bind(this)).
send();

k.dismissAll();
this.hideMegaphone();
return;}

if(t<=0){
m.log('install_timeout','setup',u);
l.logConversion('install_timeout');
k.dismissAll();}else 

setTimeout
(this._waitForInstall.bind(this,t-q),
q);},



_waitForRunning:function(){
var t=new Date().getTime()-this._waitForRunningStart;

if(o.isAppRunning()){
o.transferAuthToken(this._authToken,this._userId);}else
if(t<r)
setTimeout(this._waitForRunning.bind(this),q);}};




e.exports=s;});

/** js/desktop/marketing/fbDesktopInstall.js */
__d("legacy:fbdesktop2-install-js",["FbdInstall"],function(a,b,c,d){



a.FbdInstall=b('FbdInstall');},

3);

/** js/desktop/promo/FbdPromo.js */
__d("FbdPromo",["Event","Arbiter","AsyncRequest","ChatSidebar","copyProperties","CSS","DOM","FbdConversionTracking","FBDesktopDetect","FbdInstall"],function(a,b,c,d,e,f){



var g=b('Event'),

h=b('Arbiter'),
i=b('AsyncRequest'),
j=b('ChatSidebar'),
k=b('copyProperties'),
l=b('CSS'),
m=b('DOM'),
n=b('FbdConversionTracking'),
o=b('FBDesktopDetect'),
p=b('FbdInstall'),

q="show",
r="install",
s="cancel",
t="learn_more";

function u(v,w,x){
this._root=v;

g.listen
(m.find(v,'.install-button'),
'click',
this.installClick.bind(this,w));
g.listen
(m.find(v,'.learn-more'),
'click',
this.learnMoreClick.bind(this));
g.listen
(m.find(v,'.promo-close-button'),
'click',
this.cancelClick.bind(this));

this.type=x;
this.showPromo();}


k(u.prototype,
{cancelClick:function(){
this.hidePromo();
this.postPromoAction(s);},


hidePromo:function(v){
l.hide(this._root);
j.resize();},


installClick:function(v){
p.init(v,this.type);
p.setupPlugin();
this.postPromoAction(r);

setTimeout(function(){
this.hidePromo();}.
bind(this),3000);},


learnMoreClick:function(){
this.postPromoAction(t);},


postPromoAction:function(v){
new i("/ajax/desktop/promo_action.php").
setMethod("POST").
setData
({action:v,
type:this.type}).
send();

n.
logClick(this.type+'_promo_'+v);},


showPromo:function(){
if(o.isPluginInstalled())

return;


l.show(this._root);

if(j.isVisible()){
this.postPromoAction(q);}else{



var v=true;
h.subscribe('sidebar/show',function(){
if(v){
v=false;
this.postPromoAction(q);}}.

bind(this));}}});




e.exports=u;});

/** js/desktop/promo/fbDesktopConversionTracking.js */
__d("legacy:fbdesktop-conversion-tracking",["FbdConversionTracking"],function(a,b,c,d){



a.FbdConversionTracking=b('FbdConversionTracking');},

3);

/** js/home/SidebarTicker.js */
__d("SidebarTicker",["Arbiter","ChatSidebar","CSS","DOM","Run","TickerController","$","copyProperties"],function(a,b,c,d,e,f){



var g=b('Arbiter'),
h=b('ChatSidebar'),
i=b('CSS'),
j=b('DOM'),
k=b('Run'),
l=b('TickerController'),

m=b('$'),
n=b('copyProperties');

function o(){
this._ticker=m('pagelet_ticker');
this._initSubscriptions();
if(i.hasClass(document.documentElement,'sidebarMode'))
this._onSidebarShow();}



o.hide=function(){
k.onAfterLoad(function(){
j.remove(m('pagelet_ticker'));
j.remove(j.find(document.body,'div.fbSidebarGripper'));
h.resize();});};



n(o.prototype,
{_initSubscriptions:function(){
this._subscriptions=
[g.subscribe('sidebar/show',this._onSidebarShow.bind(this))];},



_onSidebarShow:function(){
l.show(this._ticker);}});



e.exports=o;});

/** js/megaphone/base.js */
__d("legacy:megaphone",["MegaphoneHelper"],function(a,b,c,d){



a.MegaphoneHelper=b('MegaphoneHelper');},

3);

/** js/reminders/AppRequestRemindersMenu.js */
__d("AppRequestRemindersMenu",["DOMQuery","CSS","Form"],function(a,b,c,d,e,f){



var g=b('DOMQuery'),
h=b('CSS'),
i=b('Form'),

j=
{init:function(k,l,m){



var n=m.getTriggerElem();
m=m.getPopover();
m.subscribe(['show','hide'],function(o){
var p=g.find(n,'^.fbRemindersRemove');
h.conditionClass(p,'openMenu',o=='show');});




l.subscribe('itemclick',function(o,p){
var q=p.getValue();
if(q){
var r={};
r[q]=true;
i.createHiddenInputs(r,k);
i.bootstrap(k);}});}};






e.exports=j;});
