/*!CK:468947535!*//*1459382601,*/

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

__d("AdPageMessageTypeEnum",[],function a(b,c,d,e,f,g){c.__markCompiled&&c.__markCompiled();f.exports={AD_ADMIN_TEXT:"ad_admin_text",AD_TEXT:"ad_text",AD_BUBBLE:"ad_bubble",NON_AD:"non_ad"};},null);
__d("MercuryCommands",[],function a(b,c,d,e,f,g){c.__markCompiled&&c.__markCompiled();f.exports={ME:"\/me "};},null);
__d("MessagesViewerSetID",[],function a(b,c,d,e,f,g){c.__markCompiled&&c.__markCompiled();f.exports={MESSAGES:"messages",MESSAGES_VIEW_ALL_IN_THREAD:"messages:view_all_in_thread"};},null);
__d('TypingDetector',['ArbiterMixin','Event','Input','Run','SubscriptionsHandler','TypingStates','createObjectFrom','emptyFunction'],function a(b,c,d,e,f,g){if(c.__markCompiled)c.__markCompiled();function h(i,j){this._input=i;this._ignoreKeys={};this._getValueFn=j;}Object.assign(h.prototype,c('ArbiterMixin'),{_timeout:7000,_currentState:c('TypingStates').INACTIVE,init:function(){this.init=c('emptyFunction');this.reset();this._subscriptions=new (c('SubscriptionsHandler'))();this._subscriptions.addSubscriptions(c('Event').listen(this._input,'keyup',this._update.bind(this)),c('Run').onUnload(this._onunload.bind(this)));},reset:function(){clearTimeout(this._checkTimer);this._checkTimer=null;this._lastKeystrokeAt=null;this._currentState=c('TypingStates').INACTIVE;},setIgnoreKeys:function(i){this._ignoreKeys=c('createObjectFrom')(i);},destroy:function(){this._subscriptions.release();},_onunload:function(){if(this._currentState==c('TypingStates').TYPING)this._transition(c('TypingStates').QUITTING);},_update:function(event){var i=c('Event').getKeyCode(event),j=this._currentState;if(!this._ignoreKeys[i]){var k=this._getValueFn?this._getValueFn():c('Input').getValue(this._input);if(k.trim().length===0){if(j==c('TypingStates').TYPING)this._transition(c('TypingStates').INACTIVE);}else if(j==c('TypingStates').TYPING){this._recordKeystroke();}else if(j==c('TypingStates').INACTIVE){this._transition(c('TypingStates').TYPING);this._recordKeystroke();}}},_transition:function(i){this.reset();this._currentState=i;this.inform('change',i);},_recordKeystroke:function(){this._lastKeystrokeTime=Date.now();if(!this._checkTimer)this._checkTimer=setTimeout(this._checkTyping.bind(this),this._timeout);},_checkTyping:function(){var i=this._lastKeystrokeTime+this._timeout,j=Date.now();if(j>i){this._transition(c('TypingStates').INACTIVE);}else{clearTimeout(this._checkTimer);this._checkTimer=setTimeout(this._checkTyping.bind(this),i-j+10);}}});f.exports=h;},null);
__d('TypingDetectorController',['AsyncRequest','AvailableList','AvailableListConstants','ChatVisibility','Keys','MercuryServerRequestsConfig','TypingDetector','TypingStates','emptyFunction','ifRequired','setTimeoutAcrossTransitions','shield'],function a(b,c,d,e,f,g){'use strict';if(c.__markCompiled)c.__markCompiled();function h(i,j,k,l,m,n){this.userID=i;this.input=j;this.source=k;this.threadID=m;this.remoteState=c('TypingStates').INACTIVE;this.notifyTimer=null;l=l||{};this.notifyDelay=l.notifyDelay||this.notifyDelay;this._typingDetector=new (c('TypingDetector'))(j,n);this._typingDetector.init(l);this._typingDetector.subscribe('change',this._stateChange.bind(this));}h.prototype.setUserAndThread=function(i,j){if(this.userID!==i||this.threadID!==j){this.resetState();this.userID=i;this.threadID=j;}};h.prototype.setIgnoreEnter=function(i){var j=i?[c('Keys').RETURN]:[];this._typingDetector.setIgnoreKeys(j);};h.prototype.resetState=function(){this._notifyState(c('TypingStates').INACTIVE);this.remoteState=c('TypingStates').INACTIVE;this._typingDetector.reset();clearTimeout(this.notifyTimer);this.notifyTimer=null;};h.prototype.destroy=function(){this.resetState();this._typingDetector.destroy();};h.prototype._stateChange=function(i,j){if(j!=c('TypingStates').QUITTING){clearTimeout(this.notifyTimer);this.notifyTimer=c('setTimeoutAcrossTransitions')(c('shield')(this._notifyState,this,j),this.notifyDelay);}else this._notifyState(j,true);};h.prototype._notifyState=function(i,j){if(!this.userID&&!this.threadID||!c('ChatVisibility').isOnline()||i===this.remoteState||c('ifRequired')('ChannelConnection',function(k){return k.disconnected();},function(){return true;}))return;this._sendRequest(i,this.userID,j);};h.prototype._sendRequest=function(i,j,k){this.remoteState=i;var l={typ:i,to:j,source:this.source,thread:this.threadID},m=new (c('AsyncRequest'))().setHandler(this._onTypResponse.bind(this,j)).setErrorHandler(c('emptyFunction')).setData(l).setURI('/ajax/messaging/typ.php').setAllowCrossPageTransition(true).setOption('asynchronous_DEPRECATED',!k);if(c('MercuryServerRequestsConfig').msgrRegion)m.setRequestHeader('X-MSGR-Region',c('MercuryServerRequestsConfig').msgrRegion);m.send();};h.prototype._onTypResponse=function(i,j){var k=j.getPayload()||{};if(k.offline)c('AvailableList').set(i,c('AvailableListConstants').OFFLINE,'typing_response');};Object.assign(h.prototype,{notifyDelay:1000});f.exports=h;},null);
__d('MercuryMessageDeliveryState',[],function a(b,c,d,e,f,g){'use strict';if(c.__markCompiled)c.__markCompiled();var h={SENDING:1,SENT:2,DELIVERED:3,ERROR:0,UNKNOWN:-1};f.exports=h;},null);
__d('MercuryMessageInfo',['MercuryActionStatus','MercuryMessageDeliveryState','MercuryViewer'],function a(b,c,d,e,f,g){'use strict';if(c.__markCompiled)c.__markCompiled();var h={isOutbound:function(i){return i.author===c('MercuryViewer').getID();},isInbound:function(i){return !h.isOutbound(i);},isSending:function(i){return (i.status===c('MercuryActionStatus').UNSENT||i.status===c('MercuryActionStatus').UNCONFIRMED||i.status===c('MercuryActionStatus').UNABLE_TO_CONFIRM||i.status===c('MercuryActionStatus').RESENDING);},isSent:function(i){return (i.status===undefined||i.status===c('MercuryActionStatus').SUCCESS);},hasError:function(i){return (i.status===c('MercuryActionStatus').FAILED_UNKNOWN_REASON||i.status===c('MercuryActionStatus').UNABLE_TO_CONFIRM||i.status===c('MercuryActionStatus').ERROR);},getDeliveryState:function(i,j){if(this.hasError(i))return c('MercuryMessageDeliveryState').ERROR;if(this.isSending(i))return c('MercuryMessageDeliveryState').SENDING;if(this.isSent(i)){if(i.timestamp<=j)return c('MercuryMessageDeliveryState').DELIVERED;return c('MercuryMessageDeliveryState').SENT;}return c('MercuryMessageDeliveryState').UNKNOWN;}};f.exports=h;},null);
__d('MercuryErrorInfo',['fbt','MercuryErrorType','MercuryMessageInfo'],function a(b,c,d,e,f,g,h){if(c.__markCompiled)c.__markCompiled();var i={getMessage:function(j){var k='';if(i.isConnectionError(j)){k=h._("This message didn't send.");if(i.isTransient(j))k=h._("{message} Check your internet connection and click to try again.",[h.param('message',k)]);}else{if(j&&j.description){k=j.description;}else k=h._("This message failed to send.");if(i.isTransient(j))k=h._("{message} Click to send again.",[h.param('message',k)]);}return k;},isConnectionError:function(j){if(j&&j.type==c('MercuryErrorType').TRANSPORT)return j.code===1001||j.code===1004||j.code===1006;return false;},isTransient:function(j){return j&&j.is_transient;},isPermanent:function(j){return j?!this.isTransient(j):false;},hasErrorStatus:function(j){return c('MercuryMessageInfo').hasError(j);}};f.exports=i;},null);
__d('MercuryMessageError.react',['cx','CurrentUser','ImmutableObject','MercuryErrorInfo','MercuryMessageActions','React','joinClasses'],function a(b,c,d,e,f,g,h){'use strict';if(c.__markCompiled)c.__markCompiled();var i=c('React').PropTypes,j=c('React').createClass({displayName:'MercuryMessageError',propTypes:{authorFBID:i.string,message:i.instanceOf(c('ImmutableObject')).isRequired},getDefaultProps:function(){return {authorFBID:c('CurrentUser').getID()};},render:function(){var k=this.props.message,l=k.error_data;return (c('React').createElement('div',babelHelpers['extends']({},this.props,{className:c('joinClasses')(this.props.className,this._getClassNameFromStatus(k)),tabIndex:c('MercuryErrorInfo').isTransient(l)?0:null,onClick:c('MercuryErrorInfo').isTransient(l)?this.messageResend:null}),c('React').createElement('div',{className:"_2fs1"}),c('React').createElement('span',{dangerouslySetInnerHTML:{__html:this._getTextFromStatus(k)}})));},messageResend:function(){c('MercuryMessageActions').getForFBID(this.props.authorFBID).resend(this.props.message);},_getClassNameFromStatus:function(k){if(c('MercuryErrorInfo').hasErrorStatus(k)){return "_2fs2"+(' '+"_2fs3")+(c('MercuryErrorInfo').isTransient(k.error_data)?' '+"_2fs4":'')+(c('MercuryErrorInfo').isPermanent(k.error_data)?' '+"_2fs5":'');}else return "_2fs6 _2fs2";},_getTextFromStatus:function(k){var l='',m=k.error_data;if(c('MercuryErrorInfo').hasErrorStatus(k))l=c('MercuryErrorInfo').getMessage(m);if(typeof l==='object'&&l.__html)l=l.__html;return l;}});f.exports=j;},null);
__d('PhotoStoreCore',[],function a(b,c,d,e,f,g){if(c.__markCompiled)c.__markCompiled();var h={actions:{UPDATE:'update'},_photoCache:{},_postCreateCallbacks:{},getPhotoCache:function(i){if(!this._photoCache[i])throw new Error('Photo cache requested for unknown set ID');return this._photoCache[i];},hasBeenCreated:function(i){return !!this._photoCache[i];},clearSetCache:function(i){delete this._photoCache[i];delete this._postCreateCallbacks[i];},getByIndex:function(i,j,k){this.getPhotoCache(i).getItemAtIndex(j,k);},getByIndexImmediate:function(i,j){if(this._photoCache[i])return this._photoCache[i].getItemAtIndexImmediate(j);return undefined;},getItemsInAvailableRange:function(i){var j=this.getAvailableRange(i),k=[];for(var l=j.offset;l<j.length;l++)k.push(this.getByIndexImmediate(i,l));return k;},getItemsAfterIndex:function(i,j,k,l){var m=this.getCursorByIndexImmediate(i,j);this.fetchForward(i,m,k,l);},getAllByIDImmediate:function(i){var j=Object.keys(this._photoCache);return j.map(function(k){return this.getByIndexImmediate(k,this.getIndexForID(k,i));}.bind(this)).filter(function(k){return !!k;});},getIndexForID:function(i,j){if(this._photoCache[i])return this._photoCache[i].getIndexForID(j);return undefined;},getEndIndex:function(i){var j=this.getAvailableRange(i);return j.offset+j.length-1;},getCursorByIndexImmediate:function(i,j){var k=this.getByIndexImmediate(i,j);if(k)return this._photoCache[i].getCursorForID(k.id);return undefined;},hasNextPage:function(i){var j=this.getCursorByIndexImmediate(i,this.getEndIndex(i));return this.getPhotoCache(i).hasNextPage(j);},getAvailableRange:function(i){return this.getPhotoCache(i).getAvailableRange();},hasLooped:function(i){return this.getPhotoCache(i).hasLooped();},fetchForward:function(i,j,k,l){this.getPhotoCache(i).getItemsAfterCursor(j,k,l);},fetchBackward:function(i,j,k,l){this.getPhotoCache(i).getItemsBeforeCursor(j,k,l);},executePostCreate:function(i,j){if(this._photoCache[i]){j&&j();}else this._postCreateCallbacks[i]=j;},runPostCreateCallback:function(i){var j=this._postCreateCallbacks[i];if(j){j();delete this._postCreateCallbacks[i];}},setPreFetchCallback:function(i,j){this.getPhotoCache(i).setPreFetchCallback(j);},updateData:function(i){var j=i.set_id;if(!this._photoCache[j]){this._photoCache[j]=new i.cache_class(i);this.runPostCreateCallback(j);}else if(i.query_metadata.action==h.actions.UPDATE){this._photoCache[j].updateData(i);}else this._photoCache[j].addData(i);},updateFeedbackData:function(i){var j=Object.keys(i);j.forEach(function(k){return h.getAllByIDImmediate(k).forEach(function(l){l.feedback=i[k].feedback;});});},reset:function(){Object.keys(this._photoCache).forEach(function(i){return this.clearSetCache(i);}.bind(this));}};f.exports=h;},null);
__d('ChatEditParticipantsUtils',['AsyncDialog','AsyncRequest','MercuryIDs','MercuryThreadIDMap','URI'],function a(b,c,d,e,f,g){'use strict';if(c.__markCompiled)c.__markCompiled();var h=c('MercuryThreadIDMap').get(),i={showParticipantsModal:function(j){if(!c('MercuryIDs').isGroupChat(j))return;h.getServerIDFromClientID(j,function(k){c('AsyncDialog').send(new (c('AsyncRequest'))(new (c('URI'))('/ajax/browser/dialog/multichat_members/').addQueryData({id:k})));});}};f.exports=i;},null);
__d('MessengerHotLikePreviewEvents',['mixInEventEmitter'],function a(b,c,d,e,f,g){'use strict';if(c.__markCompiled)c.__markCompiled();var h={START:'start',STOP:'stop',POP:'pop',REMOVE:'remove',FINISH_ANIMATION:'finish_animation'};c('mixInEventEmitter')(h,{start:true,stop:true,pop:true,remove:'remove',finish_animation:'finish_animation'});f.exports=h;},null);
__d('MNCommerceDialogStateActions',['MessengerDispatcher','MNCommerceActionTypes'],function a(b,c,d,e,f,g){'use strict';if(c.__markCompiled)c.__markCompiled();var h={showDialog:function(i,j){c('MessengerDispatcher').dispatch({type:c('MNCommerceActionTypes').DIALOG.SHOW,dialogContainer:i,state:j});},hideDialog:function(){c('MessengerDispatcher').dispatch({type:c('MNCommerceActionTypes').DIALOG.HIDE});}};f.exports=h;},null);
__d('MNCommercePromotionStateActions',['MessengerDispatcher','MNCommerceActionTypes'],function a(b,c,d,e,f,g){'use strict';if(c.__markCompiled)c.__markCompiled();var h={stateLoaded:function(i){c('MessengerDispatcher').dispatch({type:c('MNCommerceActionTypes').PROMOTION_STATE.LOADED,state:i});},stateLoadError:function(i){c('MessengerDispatcher').dispatch({type:c('MNCommerceActionTypes').PROMOTION_STATE.LOAD_ERROR,pageID:i});},stateReload:function(i){c('MessengerDispatcher').dispatch({type:c('MNCommerceActionTypes').PROMOTION_STATE.RELOAD,pageID:i});}};f.exports=h;},null);
__d('MessengerContextBannerBootloader',['BootloadedComponent.react','CurrentUser','DOM','JSResource','React','ReactDOM'],function a(b,c,d,e,f,g){'use strict';if(c.__markCompiled)c.__markCompiled();function h(k,l,m,n,o){var p=c('DOM').create('div');i(k,l,function(q){c('ReactDOM').render(q,p,m(p));},n,o);}function i(k,l,m,n,o,p){p=babelHelpers['extends']({left:0,position:'absolute',right:0,top:0},p);j({otherUserFBIDs:n&&[n],threadID:k,style:p},l,m,o);}function j(k,l,m,n){m(c('React').createElement(c('BootloadedComponent.react'),babelHelpers['extends']({bootloadPlaceholder:c('React').createElement('div',{style:{height:80}}),bootloadLoader:c('JSResource')('MessengerContextBannerContainer.react'),location:l,onResize:n,viewer:c('CurrentUser').getID()},k)));}f.exports={bootload:h,getBootloadedComponent:i};},null);
__d("XMNCommercePromotionBlockController",["XController"],function a(b,c,d,e,f,g){c.__markCompiled&&c.__markCompiled();f.exports=c("XController").create("\/messages\/commerce\/promotion\/block\/",{page_id:{type:"String",required:true},type:{type:"String",required:true}});},null);
__d('MNCommercePromotionBlockDataManager',['AsyncRequest','MNCommercePromotionStateActions','XMNCommercePromotionBlockController'],function a(b,c,d,e,f,g){'use strict';if(c.__markCompiled)c.__markCompiled();h.prototype.block=function(i,j){var k=c('XMNCommercePromotionBlockController').getURIBuilder().setString('page_id',i).setString('type',j).getURI();new (c('AsyncRequest'))().setURI(k).setHandler(this.$MNCommercePromotionBlockDataManager1).setErrorHandler(this.$MNCommercePromotionBlockDataManager2).send();};h.prototype.$MNCommercePromotionBlockDataManager1=function(i){var j=i.getRequest().uri.getQueryData(),k=j.page_id;c('MNCommercePromotionStateActions').stateReload(k);};h.prototype.$MNCommercePromotionBlockDataManager2=function(i){var j=i.getRequest().uri.getQueryData(),k=j.page_id;c('MNCommercePromotionStateActions').stateLoadError(k);};function h(){}f.exports=new h();},null);
__d('MercuryTypingReceiver',['Arbiter','ChannelConstants','FBID','MercuryActionType','MercuryIDs','MercuryPayloadSource','MercuryDispatcher','MercurySingletonMixin','MercuryThreadIDMap','MercuryViewer','TypingStates','isEmpty','mixInEventEmitter','setTimeoutAcrossTransitions'],function a(b,c,d,e,f,g){if(c.__markCompiled)c.__markCompiled();var h=c('MercuryThreadIDMap').get(),i=30000;function j(k){'use strict';this.$MercuryTypingReceiver1=null;this.$MercuryTypingReceiver2={};this.$MercuryTypingReceiver3=c('MercuryDispatcher').getForFBID(k);this.$MercuryTypingReceiver3.subscribe('update-typing-state',function(m,n){var o=n.payload_source;if(o!=c('MercuryPayloadSource').CLIENT_CHANNEL_MESSAGE)return;var p=n.actions;if(!p||!p.length)return;var q=c('MercuryActionType').USER_GENERATED_MESSAGE;p.forEach(function(r){if(r.action_type==q&&r.author!=c('MercuryViewer').getID())this.$MercuryTypingReceiver4(r.thread_id,r.author);}.bind(this));}.bind(this));var l;if(c('FBID').isUser(k)){l=[c('ChannelConstants').getArbiterType('typ'),c('ChannelConstants').getArbiterType('ttyp')];}else l=[c('ChannelConstants').getArbiterType('page_typing')];c('Arbiter').subscribe(l,function(m,n){var o=n.obj,p=this.$MercuryTypingReceiver5(o);if(p){var q=c('MercuryIDs').getParticipantIDFromUserID(o.from.toString());if(o.st==c('TypingStates').TYPING){this.$MercuryTypingReceiver2[p]=this.$MercuryTypingReceiver2[p]||{};var r=this.$MercuryTypingReceiver2[p][q];this.$MercuryTypingReceiver2[p][q]=Date.now();if(!this.$MercuryTypingReceiver1)this.$MercuryTypingReceiver1=c('setTimeoutAcrossTransitions')(function(){this.$MercuryTypingReceiver6();}.bind(this),3000);!r&&this.$MercuryTypingReceiver7(p);}else if(o.st==c('TypingStates').INACTIVE)this.$MercuryTypingReceiver4(p,q);}}.bind(this));}j.prototype.$MercuryTypingReceiver8=function(k){'use strict';var l=this.$MercuryTypingReceiver2[k]||{},m=Object.keys(l);m.sort(function(n,o){return l[n]-l[o];});return m;};j.prototype.$MercuryTypingReceiver6=function(){'use strict';this.$MercuryTypingReceiver1=null;var k=Date.now(),l={},m=false;for(var n in this.$MercuryTypingReceiver2){var o=false;for(var p in this.$MercuryTypingReceiver2[n]||{})if(this.$MercuryTypingReceiver2[n][p]<k-i){delete this.$MercuryTypingReceiver2[n][p];o=true;}else m=true;if(o)l[n]=this.$MercuryTypingReceiver8(n);}if(!c('isEmpty')(l))this.$MercuryTypingReceiver9(l);if(m)this.$MercuryTypingReceiver1=c('setTimeoutAcrossTransitions')(function(){this.$MercuryTypingReceiver6();}.bind(this),3000);};j.prototype.$MercuryTypingReceiver4=function(k,l){'use strict';if(k in this.$MercuryTypingReceiver2)if(l in this.$MercuryTypingReceiver2[k]){delete this.$MercuryTypingReceiver2[k][l];this.$MercuryTypingReceiver7(k);}};j.prototype.$MercuryTypingReceiver9=function(k){'use strict';this.releaseHeldEventType('state-changed');this.emitAndHold('state-changed',k);};j.prototype.$MercuryTypingReceiver7=function(k){'use strict';var l={};l[k]=this.$MercuryTypingReceiver8(k);this.$MercuryTypingReceiver9(l);};j.prototype.$MercuryTypingReceiver5=function(k){'use strict';if(k.thread_fbid)return h.getClientIDFromServerIDNow(k.thread_fbid.toString());if(k.type==='typ'||k.type==='page_typing')return c('MercuryIDs').getThreadIDFromUserID(k.from.toString());return null;};c('mixInEventEmitter')(j,{'state-changed':true});Object.assign(j,c('MercurySingletonMixin'));f.exports=j;},null);
__d('MercuryIndicatorController',['fbt','ArbiterMixin','DOM','MercuryActionType','MercuryDelayedRoger','MercuryIDs','MercuryMessageSourceTags','MercuryParticipants','MercuryRoger','MercuryThreads','MercuryTypingReceiver','MercuryViewer','WorkModeConfig','arrayContains','formatDate','removeFromArray'],function a(b,c,d,e,f,g,h){if(c.__markCompiled)c.__markCompiled();var i=c('MercuryRoger').get(),j=c('MercuryThreads').get(),k=c('MercuryTypingReceiver').get(),l=[];function m(n){this._threadID=n;this._canonicalUser=c('MercuryIDs').getUserIDFromThreadID(n);l.push(this);}Object.assign(m.prototype,c('ArbiterMixin'),{destroy:function(){c('removeFromArray')(l,this);},setLastMessage:function(n){this._lastMsg=n;this._handleStateChange();},_informStateChanged:function(n){if(n.activity=='none'&&this._currentActivity=='none')return;if(this._lastMsg&&c('MercuryViewer').isViewer(this._lastMsg.author))n.self_authored=true;this._currentActivity=n.activity;this.inform('state-changed',n);},_notifySentFrom:function(){var n,o,p=this._lastMsg.source_tags||[];if(c('arrayContains')(p,c('MercuryMessageSourceTags').MESSENGER)){if(!c('WorkModeConfig').is_work_user){n=c('DOM').create('a',{href:'/mobile/messenger','class':'fcg',target:'_blank'},h._("Sent from Messenger"));}else n=c('DOM').create('a',{href:'/mobile','class':'fcg',target:'_blank'},h._("Sent from Work Chat"));o='sentFromMobile';}else if(c('arrayContains')(p,c('MercuryMessageSourceTags').MOBILE)){n=c('DOM').create('a',{href:'/mobile','class':'fcg',target:'_blank'},h._("Sent from Mobile"));o='sentFromMobile';}else if(c('arrayContains')(p,c('MercuryMessageSourceTags').EMAIL)){n=h._("Sent from email");o='sentFromEmail';}else{this._informStateChanged({activity:'none'});return;}this._informStateChanged({activity:o,text:n});},_notifySeenTimestamp:function(n){var o=i.getSeenTimestamp(this._threadID,n[0])*.001,p=Date.now()*.001,q;if(o<p-518400){q='M j';}else if(o<p-86400){q='D g:ia';}else q='g:ia';this._informStateChanged({activity:'seen-timestamp',text:h._("Seen {timestamp}",[h.param('timestamp',c('formatDate')(o,q))])});},_nameNormalizer:function(n){var o;c('MercuryParticipants').getMulti(n,function(p){function q(s){if(p[s]!==undefined&&p[s].short_name){return p[s].short_name.toLowerCase();}else return s;}var r=n.map(q);o=function(s){var t=q(s),u=r.indexOf(t)!==r.lastIndexOf(t);return u?p[s].name:p[s].short_name;};});return o;},_seenByEveryone:function(n,o,p){var q=p?p.participants.length:0,r=n.length;if(o.author!=c('MercuryViewer').getID()&&(!p||p.participants.indexOf(o.author)>-1))r++;return q>2&&r>=q-1;},_notifySeenBy:function(n){var o=this._lastMsg,p=true;c('MercuryParticipants').getMulti(n,function(q){p=false;if(this._lastMsg!=o)return;var r=j.getThreadMetaNow(this._threadID),s=null;if(r&&r.custom_nickname)s=r.custom_nickname;var t=[];for(var u in q){var v=q[u],w=v.short_name;if(s&&s[v.fbid])w=s[v.fbid];t[u]=w;}var x,y=false;if(this._seenByEveryone(n,o,r)){x=h._("Seen by everyone");}else if(n.length==1){x=h._("Seen by {user}",[h.param('user',t[n[0]])]);}else if(n.length==2){x=h._("Seen by {user1}, {user2}",[h.param('user1',t[n[0]]),h.param('user2',t[n[1]])]);}else if(n.length==3){x=h._("Seen by {user1}, {user2}, {user3}",[h.param('user1',t[n[0]]),h.param('user2',t[n[1]]),h.param('user3',t[n[2]])]);}else if(n.length>3){var z=Object.keys(q).length-2,aa=h._({"*":"{num} more"},[h.param('num',z,[0])]),ba=c('DOM').create('span',{className:'more'},aa);x=h._("Seen by {user1}, {user2}, {=num more link}",[h.param('user1',t[n[0]]),h.param('user2',t[n[1]]),h.param('=num more link',ba)]);y=true;}this._informStateChanged({activity:'seen-by',text:x,seenBy:n,tooltip:y});}.bind(this));p&&this._informStateChanged({activity:'none'});},_notifyTyping:function(n){var o=this._lastMsg,p=true;c('MercuryParticipants').getMulti(n,function(q){p=false;if(this._lastMsg!=o)return;var r=j.getThreadMetaNow(this._threadID),s=r?r.participants.length:0,t;if(r)t=this._nameNormalizer(r.participants);if(!t)t=function(z){return q[z].short_name;};var u,v=false;if(s>2&&n.length>=s-1){u=h._("Everyone is typing...");}else if(n.length==1){u=h._("{name} is typing...",[h.param('name',q[n[0]].short_name)]);}else if(n.length==2){u=h._("{user1} and {user2} are typing...",[h.param('user1',q[n[0]].short_name),h.param('user2',q[n[1]].short_name)]);}else if(n.length==3){u=h._("{user1}, {user2}, and {user3} are typing...",[h.param('user1',q[n[0]].short_name),h.param('user2',q[n[1]].short_name),h.param('user3',q[n[2]].short_name)]);}else if(n.length>3){var w=Object.keys(q).length-2,x=h._({"*":"{num} more"},[h.param('num',w,[0])]),y=c('DOM').create('a',{href:'#'},x);u=h._("{user1}, {user2}, and {=num more link} are typing...",[h.param('user1',q[n[0]].short_name),h.param('user2',q[n[1]].short_name),h.param('=num more link',y)]);v=true;}this._informStateChanged({activity:'typing',text:u,typing:n,tooltip:v});}.bind(this));p&&this._informStateChanged({activity:'none'});},_handleStateChange:function(){var n=c('MercuryActionType').LOG_MESSAGE;if(!this._lastMsg||this._lastMsg.action_type==n){this._informStateChanged({activity:'none'});return;}if(this._typing&&this._typing.length){this._notifyTyping(this._typing);return;}if(this._canonicalUser&&this._lastMsg.author!=c('MercuryViewer').getID()){this._notifySentFrom();return;}var o=c('MercuryDelayedRoger').getSeenBy(this._threadID,true);if(o.length)if(this._canonicalUser){this._notifySeenTimestamp(o);return;}else{this._notifySeenBy(o);return;}this._informStateChanged({activity:'none'});}});k.addRetroactiveListener('state-changed',function(n){l.forEach(function(o){var p=n[o._threadID];if(p!==undefined){o._typing=p;o._handleStateChange();}});});c('MercuryDelayedRoger').subscribe('state-changed',function(n,o){l.forEach(function(p){o[p._threadID]&&p._handleStateChange();});});f.exports=m;},null);
__d('MercuryLastMessageIndicator.react',['cx','DOM','MercuryIndicatorController','MercuryParticipants','React','ReactDOM','TooltipData','emptyFunction','joinClasses'],function a(b,c,d,e,f,g,h){if(c.__markCompiled)c.__markCompiled();var i=c('React').PropTypes,j=c('React').createClass({displayName:'MercuryLastMessageIndicator',propTypes:{hideTyping:i.bool,indicatorWillShow:i.func,indicatorDidShow:i.func,lastMessage:i.object,threadID:i.string.isRequired},getDefaultProps:function(){return {indicatorWillShow:c('emptyFunction'),indicatorDidShow:c('emptyFunction')};},getInitialState:function(){return {data:{}};},componentDidMount:function(){this._setup(this.props);},componentWillReceiveProps:function(k){if(k.threadID!=this.props.threadID){this._destroy();this._setup(k);}else if(k.lastMessage!=this.props.lastMessage)this._controller.setLastMessage(k.lastMessage);},componentWillUpdate:function(k,l){if(this.isVisible(k,l))this.props.indicatorWillShow();},componentDidUpdate:function(){if(!this.isVisible())return;this.setText();this.setTooltip();this.props.indicatorDidShow();},componentWillUnmount:function(){this._destroy();},render:function(){return (c('React').createElement('div',{className:this.getRootClass()},c('React').createElement('div',{className:"_510h"}),c('React').createElement('span',{className:"_510f",ref:'text'},' ')));},getRootClass:function(){var k="_510g"+(this.state.data.self_authored?' '+"_510e":''),l=this.state.data.activity,m=null;if(String(l).startsWith('seen')){m='seen';}else if(l=='typing'){m=this.props.hideTyping?null:l;}else m=l;return c('joinClasses')(k,m,this.props.className);},isVisible:function(k,l){k=k||this.props;l=l||this.state;return (l.data&&l.data.activity!='none'&&!(k.hideTyping&&l.data.activity=='typing'));},setText:function(){if(this.state.data.text)c('DOM').setContent(c('ReactDOM').findDOMNode(this.refs.text),this.state.data.text);},setTooltip:function(){if(this.state.data.activity=='seen-by'&&this.state.data.tooltip)c('MercuryParticipants').getMulti(this.state.data.seenBy,function(k){var l=c('DOM').create('div',null,this.state.data.seenBy.map(function(m){return c('DOM').create('div',null,k[m].name);}));c('TooltipData').set(c('DOM').find(c('ReactDOM').findDOMNode(this),'span.more'),l,'above','center');}.bind(this));},_setup:function(k){this._controller=new (c('MercuryIndicatorController'))(k.threadID);this._subscription=this._controller.subscribe('state-changed',function(l,m){return this.setState({data:m});}.bind(this));k.lastMessage&&this._controller.setLastMessage(k.lastMessage);},_destroy:function(){this._subscription.unsubscribe();this._controller.destroy();}});f.exports=j;},null);
__d('WebMessengerThreadPermalinks',['MercuryIDs','MessagingTag','URI','WebMessengerPermalinkConstants','WWWBase','requireWeak'],function a(b,c,d,e,f,g){'use strict';if(c.__markCompiled)c.__markCompiled();var h={getThreadURI:function(l,m,n){if(c('MercuryIDs').isCanonical(l)){i(l,m,n);}else j(l,m,n);}};function i(l,m,n){var o=new (c('URI'))(c('WWWBase').uri),p=c('MercuryIDs').tokenize(l).value;o.setPath(k(n)+'/'+p);m&&m(o.toString());}function j(l,m,n){c('requireWeak')('MercuryThreadIDMap',function(o){var p=o.get();p.getServerIDFromClientID(l,function(q){var r=new (c('URI'))(c('WWWBase').uri);r.setPath(c('WebMessengerPermalinkConstants').getURIPathForThreadID(q,k(n)));m&&m(r.toString());});});}function k(l){var m=c('WebMessengerPermalinkConstants').BASE_PATH;if(l&&l!=c('MessagingTag').INBOX)m+='/'+l;return m;}f.exports=h;},null);
__d('MercuryMeMessageProcessor',['ImmutableObject','MercuryActionType','MercuryConfig','MercuryLogMessageType','MercuryParticipants','MercuryCommands'],function a(b,c,d,e,f,g){'use strict';if(c.__markCompiled)c.__markCompiled();function h(l){if(!l)return false;if(l.action_type!==c('MercuryActionType').USER_GENERATED_MESSAGE)return false;var m=l.body;return i(m);}function i(l){if(!c('MercuryConfig').MessengerRenderMeAsAdminMessageGK)return false;if(typeof l==='string'&&l.startsWith(c('MercuryCommands').ME))return true;return false;}function j(l){var m=k(l.body,l.author);return c('ImmutableObject').set(l,{action_type:c('MercuryActionType').LOG_MESSAGE,body:m,log_message_body:m,log_message_data:{message_type:'',untypedData:{}},log_message_type:c('MercuryLogMessageType').GENERIC_ADMIN_TEXT});}function k(l,m){var n=c('MercuryParticipants').getOrFetch(m),o=n?n.short_name:c('MercuryCommands').ME;return l.replace(c('MercuryCommands').ME,o+' ').replace(/\n+\s*\n+/g,'\n');}f.exports={transform:j,transformSnippet:k,shouldTransform:h,shouldTransformSnippet:i};},null);
__d('MNAdsMessageUtils',['cx','fbt','AdPageMessageTypeEnum','Bootloader','FBJSON','Link.react','MercuryConfig','MercuryIDs','MessagingGenericAdminTextType','MessagingTag','MNCommerceDialogStateActions','MNCommercePromotionBlockDataManager','React'],function a(b,c,d,e,f,g,h,i){'use strict';if(c.__markCompiled)c.__markCompiled();var j='offsite_ad';k.prototype.isAdsMessageRequest=function(l){return l.folder==c('MessagingTag').PENDING&&l.last_message_type!==c('AdPageMessageTypeEnum').NON_AD;};k.prototype.renderAdsMessageRequestStatus=function(){if(c('MercuryConfig').ADS_MESSAGE_PROMOTION_TAG){var l='';if(c('MercuryConfig').ADS_MESSAGE_PROMOTION_TAG==='sponsored'){l=i._("Sponsored");}else if(c('MercuryConfig').ADS_MESSAGE_PROMOTION_TAG==='promoted')l=i._("Promoted");return (c('React').createElement('span',null,l));}return null;};k.prototype.isAdsAdminMessage=function(l){return l&&l.log_message_data&&l.log_message_data.message_type&&l.log_message_data.message_type===c('MessagingGenericAdminTextType').AD_MANAGE_MESSAGE;};k.prototype.isOffsiteAd=function(l){if(l.log_message_data&&l.log_message_data.untypedData&&l.log_message_data.untypedData.ad_properties){var m=c('FBJSON').parse(l.log_message_data.untypedData.ad_properties);for(var n=m,o=Array.isArray(n),p=0,n=o?n:n[typeof Symbol==='function'?Symbol.iterator:'@@iterator']();;){var q;if(o){if(p>=n.length)break;q=n[p++];}else{p=n.next();if(p.done)break;q=p.value;}var r=q;if(r===j)return true;}}return false;};k.prototype.getadPreferencesUrl=function(l){if(l.log_message_data&&l.log_message_data.untypedData&&l.log_message_data.untypedData.ad_preferences_url)return l.log_message_data.untypedData.ad_preferences_url;return '';};k.prototype.getAdsPageManage=function(l,m){var n=null;if(c('MercuryConfig').WWWMessengerManageAdminGK){var o=function(){var p=this.isOffsiteAd(l),q=c('MercuryIDs').getUserIDFromParticipantID(l.author),r=this.getadPreferencesUrl(l),s=function(t,u){return c('MNCommercePromotionBlockDataManager').block(t,u);};c('Bootloader').loadModules(["MNAdsMessagesManageBlockDialogContainer.react"],function(t){c('MNCommerceDialogStateActions').showDialog(t,{adPreferencesUrl:r,isOffsiteAd:p,onConfirmButtonClick:s,pageID:q});});}.bind(this);n=c('React').createElement(c('Link.react'),{className:(!m?"_3kyk":'')+(m?' '+"_3kyl":''),onClick:o},i._("Manage"));return (c('React').createElement('span',{className:!m?"_3kym":''},l.log_message_body,' ','·',' ',n));}return (c('React').createElement('span',{className:!m?"_3kym":''},l.log_message_body));};function k(){}f.exports=new k();},null);
__d('MercuryXMATRenderer',['fbt','invariant','MercuryConfig','MercuryIDs','MercuryParticipants','MessagingGenericAdminTextType','MNAdsMessageUtils','React','TextWithEntities.react'],function a(b,c,d,e,f,g,h,i){'use strict';if(c.__markCompiled)c.__markCompiled();var j={renderText:function(k){var l=null;if(c('MercuryConfig').MessengerNewEmojiGK&&c('MercuryConfig').MessengerTextWithEntitiesModule){var m=c('MercuryConfig').MessengerTextWithEntitiesModule;l=c('React').createElement(m,{renderEmoji:true,text:k.log_message_body});}else l=c('React').createElement(c('TextWithEntities.react'),{renderEmoji:true,text:k.log_message_body});switch(k.log_message_data.message_type){case c('MessagingGenericAdminTextType').TURN_ON_PUSH:var n=k.log_message_data.untypedData&&k.log_message_data.untypedData.recipient_id,o=n&&c('MercuryParticipants').getNow(c('MercuryIDs').getParticipantIDFromUserID(n)),p=c('MercuryIDs').getUserIDFromParticipantID(k.author);!!!p?i(0):void 0;var q=c('MercuryParticipants').getNow(c('MercuryIDs').getParticipantIDFromUserID(p));if(p!==k.other_user_fbid){if(o){l=h._("You asked {admin-text-message} to turn on notifications for Messenger on mobile.",[h.param('admin-text-message',o.name)]);}else l=h._("You asked a contact to turn on notifications for Messenger on mobile.");}else if(q){l=h._("{admin-text-message} asked you to turn on notifications for Messenger on mobile.",[h.param('admin-text-message',q.name)]);}else l=h._("A contact asked you to turn on notifications for Messenger on mobile.");break;case c('MessagingGenericAdminTextType').JOURNEY_PROMPT_COLOR:l=h._("You need to be on the latest version of Messenger on a mobile device to pick a color for this conversation.");break;case c('MessagingGenericAdminTextType').JOURNEY_PROMPT_NICKNAME:var r=null,s=c('MercuryIDs').getUserIDFromParticipantID(k.author);if(k.other_user_fbid&&s!==k.other_user_fbid){var t=c('MercuryIDs').getParticipantIDFromUserID(k.other_user_fbid);r=c('MercuryParticipants').getOrFetch(t);}if(r&&r.short_name){l=h._("You need to be on the latest version of Messenger on a mobile device to set a nickname for {admin-text-message} .",[h.param('admin-text-message',r.short_name)]);}else l=h._("You need to be on the latest version of Messenger on a mobile device to set a nickname for yourself.");break;case c('MessagingGenericAdminTextType').JOURNEY_PROMPT_LIKE:l=h._("You need to be on the latest version of Messenger on a mobile device to pick an emoji for this conversation.");break;case c('MessagingGenericAdminTextType').JOURNEY_PROMPT_BOT:l=h._("You need to be on the latest version of Messenger on a mobile device to add a subscription to this conversation.");break;case c('MessagingGenericAdminTextType').AD_MANAGE_MESSAGE:if(c('MNAdsMessageUtils').isAdsAdminMessage(k))l=c('MNAdsMessageUtils').getAdsPageManage(k,false);break;default:break;}return c('React').createElement('span',null,l);}};f.exports=j;},null);
__d('PhotoStore',['Arbiter','PhotoStoreCore'],function a(b,c,d,e,f,g){if(c.__markCompiled)c.__markCompiled();c('Arbiter').subscribe('update-photos',function(h,i){c('PhotoStoreCore').updateData(i);});f.exports=c('PhotoStoreCore');},null);
__d('MessagesViewer',['AsyncRequest','Bootloader','DOM','MessagesViewerSetID','PhotoStore','React','ReactDOM','Run','emptyFunction','ge'],function a(b,c,d,e,f,g){if(c.__markCompiled)c.__markCompiled();var h={bootstrapWithElem:function(k){h.bootstrapWithConfig({fbid:k.getAttribute('data-fbid'),dimensions:k.getAttribute('data-dimensions'),src:k.getAttribute('href'),endpoint:k.getAttribute('data-endpoint'),disablePaging:k.getAttribute('data-disablepaging')},k);},bootstrapWithConfig:function(k,l){var m=k.setID;if(!m)m=c('MessagesViewerSetID').MESSAGES;j(function(n,o){i(c('React').createElement(n,{actorid:k.actorid,dimensions:[k.dimensions],disablepaging:k.disablePaging,disableForward:k.disableForward,open:true,photoid:k.fbid,reverse:false,rootClassName:k.rootClassName,setid:m,snapToPhoto:k.snapToPhoto,thumbsrc:k.src}));if(!c('PhotoStore').hasBeenCreated(m)&&k.endpoint){var p=new (c('AsyncRequest'))(k.endpoint);if(l)p.setRelativeTo(l);p.send();}});},renderVideo:function(k){j(function(l,m){i(c('React').createElement(m,k));});},preload:function(){c('Run').onAfterLoad(function(){return j(c('emptyFunction'));});}};function i(k){var l=c('ge')('messages_viewer');if(!l){l=c('DOM').create('div',{id:'messages_viewer'});document.body.appendChild(l);}k=c('ReactDOM').render(k,l);k.subscribeOnce('close',function(){c('ReactDOM').unmountComponentAtNode(l);});}function j(k){c('Bootloader').loadModules(["SpotlightMessagesViewer","MessagingVideoViewer.react"],k);}f.exports=h;},null);
__d('MercuryLogMessageRenderer',['cx','fbt','ix','Bootloader','CSS','HovercardLink','Image.react','MercuryConfig','MercuryViewer','MercuryXMATRenderer','MessagesViewer','MercuryLogMessageType','MercuryParticipants','React','ReactDOM','TextWithEntities.react','TooltipLink.react','UserAgent'],function a(b,c,d,e,f,g,h,i,j){if(c.__markCompiled)c.__markCompiled();var k={renderText:function(z,aa,ba){switch(z.log_message_type){case c('MercuryLogMessageType').SUBSCRIBE:n(z,ba);break;case c('MercuryLogMessageType').UNSUBSCRIBE:s(z,ba);break;case c('MercuryLogMessageType').THREAD_NAME:t(z,aa,ba);break;case c('MercuryLogMessageType').THREAD_IMAGE:u(z,aa,ba);break;case c('MercuryLogMessageType').WALLPAPER:v(z,ba);break;case c('MercuryLogMessageType').GENERIC_ADMIN_TEXT:w(z,ba);break;default:c('Bootloader').loadModules(["MercurySpecialLogMessageRenderer"],function(ca){ca.renderText(z,ba);});break;}},renderIcon:function(z){return (c('React').createElement(c('Image.react'),{className:l(z),src:j('images/spacer.gif')}));},renderLegacy:function(z,aa,ba,ca){l(ca).split(' ').forEach(function(da){return da&&c('CSS').addClass(z,da);});this.renderText(ca,null,function(da){c('ReactDOM').render(c('React').createElement('span',null,da),aa);});this.renderAttachmentLegacy(ba,ca);},renderAttachmentLegacy:function(z,aa){if(aa.log_message_type==c('MercuryLogMessageType').THREAD_IMAGE){var ba=aa.log_message_data.image;if(ba&&ba.preview_url){c('ReactDOM').render(c('React').createElement(c('Image.react'),{className:"_z6a",onClick:function(){return m(ba);},src:ba.preview_url}),z);c('CSS').show(z);}}}};f.exports=k;function l(z){var aa=z.log_message_type,ba=z.log_message_data;return "_5wzu"+(aa==c('MercuryLogMessageType').SUBSCRIBE?' '+"_5wzj":'')+(aa==c('MercuryLogMessageType').UNSUBSCRIBE?' '+"_5wzk":'')+(aa==c('MercuryLogMessageType').THREAD_NAME?' '+"_5wzl":'')+(aa==c('MercuryLogMessageType').THREAD_IMAGE?' '+"_5wzm":'')+(aa==c('MercuryLogMessageType').VIDEO_CALL&&ba.answered?' '+"_5wzn":'')+(aa==c('MercuryLogMessageType').VIDEO_CALL&&!ba.answered?' '+"_5wzo":'')+(aa==c('MercuryLogMessageType').PHONE_CALL&&ba.answered?' '+"_5wzp":'')+(aa==c('MercuryLogMessageType').PHONE_CALL&&!ba.answered?' '+"_5wzq":'')+(aa==c('MercuryLogMessageType').SERVER_ERROR?' '+"_5wzr":'');}function m(z){c('MessagesViewer').bootstrapWithConfig({src:z.preview_url,endpoint:z.url,fbid:z.metadata.fbid,dimensions:z.metadata.dimensions,disablePaging:true},null);}function n(z,aa){var ba=y(z.log_message_data.added_participants);switch(ba.length){case 1:o(z,aa,ba);break;case 2:p(z,aa,ba);break;case 3:q(z,aa,ba);break;default:r(z,aa,ba);break;}}function o(z,aa,ba){var ca=[z.author,ba[0]];c('MercuryParticipants').getMulti(ca,function(da){if(z.author==c('MercuryViewer').getID()){aa(i._("You added {subscriber1}.",[i.param('subscriber1',x(da[ba[0]]))]));}else if(ba[0]==c('MercuryViewer').getID()){aa(i._("{actor} added you.",[i.param('actor',x(da[z.author]))]));}else aa(i._("{actor} added {subscriber1}.",[i.param('actor',x(da[z.author])),i.param('subscriber1',x(da[ba[0]]))]));});}function p(z,aa,ba){var ca=[z.author].concat(ba);c('MercuryParticipants').getMulti(ca,function(da){if(z.author==c('MercuryViewer').getID()){aa(i._("You added {subscriber1} and {subscriber2}.",[i.param('subscriber1',x(da[ba[0]])),i.param('subscriber2',x(da[ba[1]]))]));}else if(ba[0]==c('MercuryViewer').getID()){aa(i._("{actor} added you and {subscriber2}.",[i.param('actor',x(da[z.author])),i.param('subscriber2',x(da[ba[1]]))]));}else aa(i._("{actor} added {subscriber1} and {subscriber2}.",[i.param('actor',x(da[z.author])),i.param('subscriber1',x(da[ba[0]])),i.param('subscriber2',x(da[ba[1]]))]));});}function q(z,aa,ba){var ca=[z.author].concat(ba);c('MercuryParticipants').getMulti(ca,function(da){if(z.author==c('MercuryViewer').getID()){aa(i._("You added {subscriber1}, {subscriber2} and {subscriber3}.",[i.param('subscriber1',x(da[ba[0]])),i.param('subscriber2',x(da[ba[1]])),i.param('subscriber3',x(da[ba[2]]))]));}else if(ba[0]==c('MercuryViewer').getID()){aa(i._("{actor} added you, {subscriber2} and {subscriber3}.",[i.param('actor',x(da[z.author])),i.param('subscriber2',x(da[ba[1]])),i.param('subscriber3',x(da[ba[2]]))]));}else aa(i._("{actor} added {subscriber1}, {subscriber2} and {subscriber3}.",[i.param('actor',x(da[z.author])),i.param('subscriber1',x(da[ba[0]])),i.param('subscriber2',x(da[ba[1]])),i.param('subscriber3',x(da[ba[2]]))]));});}function r(z,aa,ba){var ca=[z.author].concat(ba);c('MercuryParticipants').getMulti(ca,function(da){function ea(ga){var ha=c('React').createElement('div',null,ga.map(function(ia){return c('React').createElement('div',null,ia.name);}));return (c('React').createElement(c('TooltipLink.react'),{alignH:'center',position:'above',tooltip:ha},i._({"*":"{num} more"},[i.param('num',ga.length,[0])])));}var fa=ba.map(function(ga){return da[ga];});if(z.author==c('MercuryViewer').getID()){aa(i._("You added {subscriber1}, {subscriber2} and {more_people}.",[i.param('subscriber1',x(fa[0])),i.param('subscriber2',x(fa[1])),i.param('more_people',ea(fa.slice(2)))]));}else if(ba[0]==c('MercuryViewer').getID()){aa(i._("{actor} added you, {subscriber2} and {more_people}.",[i.param('actor',x(da[z.author])),i.param('subscriber2',x(fa[1])),i.param('more_people',ea(fa.slice(2)))]));}else aa(i._("{actor} added {subscriber1}, {subscriber2} and {more_people}.",[i.param('actor',x(da[z.author])),i.param('subscriber1',x(fa[0])),i.param('subscriber2',x(fa[1])),i.param('more_people',ea(fa.slice(2)))]));});}function s(z,aa){var ba=[z.author],ca=z.log_message_data.removed_participants,da;if(ca.length===1){da=ca[0];ba.push(da);}c('MercuryParticipants').getMulti(ba,function(ea){var fa=ea[z.author],ga=ea[da];if(z.author==c('MercuryViewer').getID()){if(!da||da==z.author){aa(i._("You left the conversation."));}else aa(i._("You removed {name} from the conversation.",[i.param('name',x(ga))]));}else if(!da||da==z.author){aa(i._("{actor} left the conversation.",[i.param('actor',x(fa))]));}else if(da==c('MercuryViewer').getID()){aa(i._("{actor} removed you from the conversation.",[i.param('actor',x(fa))]));}else aa(i._("{actor} removed {name} from the conversation.",[i.param('actor',x(fa)),i.param('name',x(ga))]));});}function t(z,aa,ba){var ca=z.log_message_data.name,da="_5wzs"+(c('UserAgent').isBrowser('Chrome')?' '+"_4fbd":'');if(z.author==c('MercuryViewer').getID()){if(ca){var ea=c('React').createElement(c('TextWithEntities.react'),{renderEmoticons:true,renderEmoji:true,text:ca});if(c('MercuryConfig').MessengerNewEmojiGK&&c('MercuryConfig').MessengerTextWithEmoticonsModule){var fa=c('MercuryConfig').MessengerTextWithEmoticonsModule;ea=c('React').createElement(fa,{renderEmoticons:true,renderEmoji:true,text:ca});}ba(i._("You named the conversation: {name}.",[i.param('name',c('React').createElement('span',{className:da},ea))]));}else ba(i._("You removed the conversation name."));}else c('MercuryParticipants').get(z.author,function(ga){var ha=x(ga,aa);if(ca){var ia=c('React').createElement(c('TextWithEntities.react'),{renderEmoticons:true,renderEmoji:true,text:ca});if(c('MercuryConfig').MessengerNewEmojiGK&&c('MercuryConfig').MessengerTextWithEmoticonsModule){var ja=c('MercuryConfig').MessengerTextWithEmoticonsModule;ia=c('React').createElement(ja,{renderEmoticons:true,renderEmoji:true,text:ca});}ba(i._("{actor} named the conversation: {name}.",[i.param('actor',ha),i.param('name',c('React').createElement('span',{className:da},ia))]));}else ba(i._("{actor} removed the conversation name.",[i.param('actor',ha)]));});}function u(z,aa,ba){if(z.author==c('MercuryViewer').getID()){if(z.log_message_data.image){ba(i._("You changed the conversation picture."));}else ba(i._("You removed the conversation picture."));}else c('MercuryParticipants').get(z.author,function(ca){var da=x(ca,aa);if(z.log_message_data.image){ba(i._("{actor} changed the conversation picture.",[i.param('actor',da)]));}else ba(i._("{actor} removed the conversation picture.",[i.param('actor',da)]));});}function v(z,aa){if(z.author==c('MercuryViewer').getID()){aa(i._("You changed the wallpaper."));}else c('MercuryParticipants').get(z.author,function(ba){var ca=x(ba);aa(i._("{actor} changed the wallpaper.",[i.param('actor',ca)]));});}function w(z,aa){var ba=c('MercuryXMATRenderer').renderText(z);aa(ba);}function x(z,aa){var ba=z.fbid,ca=c('HovercardLink').constructEndpoint({id:ba}),da=aa&&aa.custom_nickname&&aa.custom_nickname[ba];if(da&&c('MercuryConfig').MessengerNewEmojiGK&&c('MercuryConfig').MessengerTextWithEmoticonsModule){var ea=c('MercuryConfig').MessengerTextWithEmoticonsModule;da=c('React').createElement(ea,{renderEmoticons:true,renderEmoji:true,text:da});}var fa=da?da:z.name;if(z.href)return (c('React').createElement('a',{className:"_5wzt",href:z.href,'data-hovercard':ca},fa));return fa;}function y(z){var aa=z.indexOf(c('MercuryViewer').getID());if(aa>0){var ba=z.filter(function(ca){return ca!==c('MercuryViewer').getID();});return [c('MercuryViewer').getID()].concat(ba);}return z;}},null);
__d('MercuryMessageGroup',['MercuryActionType','MercuryAttachmentType','MercuryMeMessageProcessor','MercuryShareAttachmentRenderLocations','MercuryThreadlistConstants','enumerate'],function a(b,c,d,e,f,g){'use strict';if(c.__markCompiled)c.__markCompiled();var h={calculateMessageGroups:function(k,l){var m=[],n=null,o={value:null},p=c('enumerate')(k),q;while(!(q=p.next()).done){var r=h.canAppendMessageToLastGroup(o.value,q.value,l);if(!r){n=[];m.push(n);}n.push(q.value);o=q;}return m;},canAppendMessageToLastGroup:function(k,l,m){var n=c('MercuryThreadlistConstants').GROUPING_THRESHOLD;if(!k||i(k,m)||i(l,m)||k.author!=l.author||k.timestamp<l.timestamp-n||k.is_spoof_warning!==l.is_spoof_warning||k.page_admin_notes)return false;return true;}};function i(k,l){var m=k.has_attachment;if(m&&(l===c('MercuryShareAttachmentRenderLocations').MESSENGER||l===c('MercuryShareAttachmentRenderLocations').CHAT))m=j(k);return !!(k.action_type==c('MercuryActionType').LOG_MESSAGE||c('MercuryMeMessageProcessor').shouldTransform(k)||m||k.forward_count||k.html_body||k.body&&k.body.length>c('MercuryThreadlistConstants').MAX_CHARS_BEFORE_BREAK);}function j(k){var l=k.attachments[0];return (!l||l.attach_type===c('MercuryAttachmentType').STICKER||l.attach_type===c('MercuryAttachmentType').ANIMATED_IMAGE);}f.exports=h;},null);
__d('shouldAddMRefParam',['URI','isFacebookURI'],function a(b,c,d,e,f,g){if(c.__markCompiled)c.__markCompiled();var h=function(i){if(!c('isFacebookURI')(i)||i.getFragment())return false;if(/^\/safetycheck\//.test(i.getPath()))return false;return true;};f.exports=h;},null);
__d('MessagingGiftWrap.react',['cx','CurrentEnvironment','ReactComponentWithPureRenderMixin','React','emptyFunction'],function a(b,c,d,e,f,g,h){'use strict';if(c.__markCompiled)c.__markCompiled();var i=c('React').PropTypes,j=c('React').createClass({displayName:'MessagingGiftWrap',mixins:[c('ReactComponentWithPureRenderMixin')],propTypes:{isSticker:i.bool,onUnwrap:i.func},getDefaultProps:function(){return {onUnwrap:c('emptyFunction')};},getInitialState:function(){return {unwrapped:false};},render:function(){var k=c('CurrentEnvironment').messengerdotcom;return (c('React').createElement('div',{className:"_4p0m"+(this.state.unwrapped?' '+"_4p0o":'')+(k?' '+"_mxz":'')+(k?' '+"_4br2":'')+(!k?' '+"_3_om":'')+(this.props.isSticker?' '+"_52vq":''),onClick:this._handleClick},c('React').createElement('div',{className:"_4p0r"}),c('React').createElement('div',{className:"_4p0s _4p0t"}),c('React').createElement('div',{className:"_4p0s _4p0u"})));},_handleClick:function(k){k.stopPropagation();this.setState({unwrapped:true});this.props.onUnwrap&&this.props.onUnwrap();}});f.exports=j;},null);