if (self.CavalryLogger) { CavalryLogger.start_js(["dsK6T"]); }
__d('UFIOrderingModeSelector.react',['cx','invariant','ix','Image.react','InlineBlock.react','Link.react','PopoverMenu.react','React','ReactXUIMenu'],(function a(b,c,d,e,f,g,h,i,j){var k,l;if(c.__markCompiled)c.__markCompiled();var m=c('React').PropTypes,n=c('ReactXUIMenu').SelectableMenu,o=c('ReactXUIMenu').SelectableItem;k=babelHelpers.inherits(p,c('React').Component);l=k&&k.prototype;function p(){var q,r;'use strict';for(var s=arguments.length,t=Array(s),u=0;uc('Random').random())c('BanzaiLogger').log('CommentsOrderingModeSelectorUsageLoggerConfig',{start_order:this.props.selectedMode,end_order:q,post_fbid:r.commentstargetfbid,post_owner_fbid:r.ownerid,available_orders:r.orderingmodes.map(function(s){return s.value;})});c('UFISharedDispatcher').dispatch(c('UFIInstanceAction').changeOrderingMode(this.props.contextArgs,q));}.bind(this),m;}k.prototype.componentDidMount=function(){'use strict';this.$UFIOrderingModeSelectorContainer1=new (c('SubscriptionsHandler'))();this.$UFIOrderingModeSelectorContainer1.addSubscriptions(c('UFIOrderingModeStore').addListener(function(){if(!this.$UFIOrderingModeSelectorContainer1)return;this.setState({selectedMode:c('UFIOrderingModeStore').getOrderingMode(c('UFIOrderingModeStore').getState(),this.props.contextArgs.instanceid,this.props.feedback.orderingmodes,this.props.feedback.defaultcommentorderingmode)});}.bind(this)));};k.prototype.componentWillUnmount=function(){'use strict';if(this.$UFIOrderingModeSelectorContainer1){this.$UFIOrderingModeSelectorContainer1.release();this.$UFIOrderingModeSelectorContainer1=null;}};k.prototype.shouldComponentUpdate=function(l,m){'use strict';return this.state.selectedMode!==m.selectedMode;};k.prototype.render=function(){'use strict';return (c('React').createElement(c('UFIOrderingModeSelector.react'),{onOrderChanged:this.onOrderChanged,orderingModes:this.props.feedback.orderingmodes,selectedMode:this.state.selectedMode}));};k.propTypes={feedback:j.shape({defaultcommentorderingmode:j.string.isRequired,orderingmodes:j.arrayOf(j.shape({name:j.string.isRequired,description:j.string.isRequired,selected:j.bool.isRequired,value:j.string.isRequired})).isRequired,commentstargetfbid:j.string.isRequired,ownerid:j.string.isRequired}).isRequired,contextArgs:j.object.isRequired};f.exports=k;}),null);
__d("XPubcontentInlinePhotoPivotsEventsController",["XController"],(function a(b,c,d,e,f,g){c.__markCompiled&&c.__markCompiled();f.exports=c("XController").create("\/pubcontent\/inline_photo_pivots_chaining\/events\/",{});}),null);
__d('EntstreamAttachmentRelatedShare',['csx','cx','Arbiter','AsyncRequest','AttachmentRelatedShareConstants','CSS','DOM','Event','XPubcontentInlinePhotoPivotsEventsController','ge','getOrCreateDOMID','tidyEvent'],(function a(b,c,d,e,f,g,h,i){if(c.__markCompiled)c.__markCompiled();var j=2,k=3,l={loadRelatedAttachment:function m(n,o,p){var q=null;if(typeof n==="string"){q=c('ge')(n);}else q=n;if(!q)return;var r=c('Event').listen(q,'click',function(){r.remove();c('Arbiter').inform(c('AttachmentRelatedShareConstants').ARTICLE_CLICK,{attachment:q,global_share_id:o,is_right_click:false,share_id:p});}),s=c('Event').listen(q,'mousedown',function(event){if(event.which===k||event.button===j){s.remove();c('Arbiter').inform(c('AttachmentRelatedShareConstants').ARTICLE_CLICK,{attachment:q,global_share_id:o,is_right_click:true});}});},loadInlineStoryPivotAttachment:function m(n,o){var p=c('ge')(n);if(!p)return;var q=c('Event').listen(p,'click',function(){q.remove();c('Arbiter').inform(c('AttachmentRelatedShareConstants').PHOTO_CLICK,{attachment:p,storyid:o});});},loadRelatedGameAttachment:function m(n,o){var p=null;if(typeof n==="string"){p=c('ge')(n);}else p=n;if(!p)return;c('tidyEvent')(c('Event').listen(p,'click',function(){c('Arbiter').inform(c('AttachmentRelatedShareConstants').GAME_CLICK,{attachment:p,global_share_id:o});}));c('tidyEvent')(c('Event').listen(p,'mousedown',function(event){if(event.which===k||event.button===j)c('Arbiter').inform(c('AttachmentRelatedShareConstants').GAME_CLICK,{attachment:p,global_share_id:o});}));},loadRelatedLSCVideoAttachment:function m(n,o){var p=null;if(typeof n==='string'){p=c('ge')(n);}else p=n;if(!p)return;var q="^div._4-u2",r=c('DOM').scry(p,q),s=c('Event').listen(p,'click',function(){s.remove();c('Arbiter').inform(c('AttachmentRelatedShareConstants').VIDEO_CLICK,{attachment:p,global_share_id:o});});},loadRelatedLSCInlineVideoAttachment:function m(n,o){var p=null;if(typeof n==='string'){p=c('ge')(n);}else p=n;if(!p)return;c('Event').listen(p,'click',function(){var q="^div._4-u2",r="_1d8v",s=c('DOM').scry(p,q),t=s.length===1?s[0]:null,u=t.parentNode,v=u.previousSibling;while(!v){u=u.parentNode;v=u.previousSibling;}if(!c('CSS').hasClass(v,r)){var w=c('DOM').create('div',{className:r}),x=c('DOM').insertBefore(t.parentNode,w),y=x.length>=1?x[0]:null;}else y=v;var z=c('getOrCreateDOMID')(y);new (c('AsyncRequest'))().setURI('/ajax/flash/expand_inline.php').setData({share_id:o,target_div:z,max_width:470,max_height:264,replace_target_div:true}).setMethod('GET').setReadOnly(true).setRelativeTo(p.parentNode).send();});},loadRelatedEventsPivotAttachment:function m(n,o){var p=null;if(typeof n==="string"){p=c('ge')(n);}else p=n;if(!p)return;c('tidyEvent')(c('Event').listen(p,'click',function(){c('Arbiter').inform(c('AttachmentRelatedShareConstants').EVENT_JOIN,{attachment:p,event_id:o});}));},loadRelatedProductAttachment:function m(n,o){var p=null;if(typeof n==='string'){p=c('ge')(n);}else p=n;if(!p)return;c('tidyEvent')(c('Event').listen(p,'click',function(){c('Arbiter').inform(c('AttachmentRelatedShareConstants').PRODUCT_CLICK,{attachment:p,product_id:o});}));},closeButton:function m(n,o){c('Event').listen(n,'click',function(){c('DOM').remove(o);});},closeButtonPhotoPivots:function m(n,o,p,q){c('Event').listen(n,'click',function(){var r=c('XPubcontentInlinePhotoPivotsEventsController').getURIBuilder(),s={story_id:p,search_query_type:q,event:'hide'};new (c('AsyncRequest'))().setMethod('POST').setURI(r.getURI()).setData(s).send();c('DOM').remove(o);});},seeAllLinkPhotoPivots:function m(n,o,p){c('Event').listen(n,'click',function(){var q=c('XPubcontentInlinePhotoPivotsEventsController').getURIBuilder(),r={story_id:o,search_query_type:p,event:'see_all'};new (c('AsyncRequest'))().setMethod('POST').setURI(q.getURI()).setData(r).send();});},removeOldSuggestions:function m(n){var o=c('ge')(n);if(!o)return;var p=c('DOM').scry(o.parentNode,"._5d73");for(var q=1;q