text: /*!CK:25106661!*//*1442807650,*/
  
  if (self.CavalryLogger) { CavalryLogger.start_js(["nGFja"]); }
  
  __d('MessengerTokenizer.react',['AbstractTokenizer.react','immutable','Keys','React','SearchableEntry','MessengerScrollableTypeaheadView.react','MessengerTypeaheadUtils','ReactComponentWithPureRenderMixin','cx','invariant','joinClasses'],function a(b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r){'use strict';if(c.__markCompiled)c.__markCompiled();var s=k.PropTypes,t=30,u=100,v=k.createClass({displayName:'MessengerTokenizer',mixins:[o],propTypes:{className:s.string,context:s.object,entries:s.instanceOf(i.List).isRequired,excludeGroups:s.bool,extraRendererProps:s.object,hasHoverState:s.bool,hideViewWithEntries:s.bool,onAddEntryAttempt:s.func.isRequired,onEntriesFound:s.func,onRemoveEntryAttempt:s.func.isRequired,onReorderEntryAttempt:s.func,originalEntryIDs:s.instanceOf(i.Set),placeholder:s.string,searchSource:s.object.isRequired,tabIndex:s.number,useLayer:s.bool,viewer:s.string.isRequired},getDefaultProps:function(){return {excludeGroups:false,hideViewWithEntries:true};},getInitialState:function(){return {isLoading:false,isLoaded:false,queryString:''};},render:function(){return (k.createElement('div',{className:r(this.props.className,"_14-7")},k.createElement(h,{autoHighlight:this.props.hasHoverState,context:this.props.context,entries:this.props.entries.toArray(),excludeTokenEntries:!!this.state.queryString,hideViewWithEntries:this.props.hideViewWithEntries,onAddEntryAttempt:this._handleAddEntryAttempt,onEntriesFound:this.props.onEntriesFound,onQueryStringChange:this._handleQueryStringChange,onRemoveEntryAttempt:this.props.onRemoveEntryAttempt,onReorderEntryAttempt:this.props.onReorderEntryAttempt,placeholder:this.props.placeholder,presenter:{ViewRenderer:m,TokenRenderer:w,alwaysVisibleOnFocus:(this.state.isLoading||this.state.isLoaded)&&!!this.state.queryString,useLayer:this.props.useLayer,extraRendererProps:babelHelpers._extends({hasHoverState:this.props.hasHoverState,isLoading:this.state.isLoading,originalEntryIDs:this.props.originalEntryIDs,selectedEntryIDs:i.Seq(this.props.entries).map(function(x){return x.getUniqueID();}).toSet(),viewer:this.props.viewer},this.props.extraRendererProps),maxEntries:t,sortEntries:this._sortEntries},queryString:this.state.queryString,ref:'tokenizer',searchSource:this.props.searchSource,searchSourceOptions:{onQueryFinished:this._handleQueryFinished,onQueryStarted:this._handleQueryStarted,showDefaultEntries:this.props.showDefaultEntries},showEntriesOnFocus:true,tabIndex:this.props.tabIndex&&this.props.tabIndex.toString()})));},_handleAddEntryAttempt:function(x){this.setState({isLoaded:false,queryString:''});var y=x.getUniqueID();if(this.props.entries.some(function(z){return (z.getUniqueID()===y);})){this.props.onRemoveEntryAttempt(x);return;}if(this.props.originalEntryIDs&&this.props.originalEntryIDs.contains(y))return;this.props.onAddEntryAttempt(x);},_sortEntries:function(x){if(this.props.entries.size||this.props.excludeGroups)return n.sortEntriesWithoutGroupsOrViewer(x,this.props.viewer);return n.sortEntries(x,this.state.queryString);},focusInput:function(){this.refs.tokenizer&&this.refs.tokenizer.focusInput();},_handleQueryStarted:function(x){if(x===this.state.queryString)this.setState({isLoading:true});},_handleQueryFinished:function(x){if(x===this.state.queryString)this.setState({isLoaded:true,isLoading:false});},_handleQueryStringChange:function(event){!(event.target instanceof HTMLInputElement)?q(0):undefined;this.setState({isLoaded:false,queryString:event.target.value});}}),w=k.createClass({displayName:'MessengerTokenizerToken',propTypes:{className:s.string,entry:s.instanceOf(l),index:s.number,label:s.string.isRequired,onRemove:s.func},render:function(){return (k.createElement('span',{className:r(this.props.className,"_14-8"),label:null,onClick:this._handleClick,onKeyDown:this._handleKeyDown,tabIndex:this.props.index+u},k.createElement('span',{'aria-label':this.props.label,title:this.props.label,className:"_14-9"},this.props.label)));},_handleClick:function(event){event.stopPropagation();},_handleKeyDown:function(event){if(event.keyCode===j.BACKSPACE){event.preventDefault();this.props.onRemove&&this.props.onRemove(this.props.entry);}}});f.exports=v;},null);