/*!CK:1375010882!*//*1445283968,*/

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

__d("str2rstr",[],function a(b,c,d,e,f,g){if(c.__markCompiled)c.__markCompiled();function h(i){var j="",k,l;for(var m=0;m<i.length;m++){k=i.charCodeAt(m);l=m+1<i.length?i.charCodeAt(m+1):0;if(55296<=k&&k<=56319&&56320<=l&&l<=57343){k=65536+((k&1023)<<10)+(l&1023);m++;}if(k<=127){j+=String.fromCharCode(k);}else if(k<=2047){j+=String.fromCharCode(192|k>>>6&31,128|k&63);}else if(k<=65535){j+=String.fromCharCode(224|k>>>12&15,128|k>>>6&63,128|k&63);}else if(k<=2097151)j+=String.fromCharCode(240|k>>>18&7,128|k>>>12&63,128|k>>>6&63,128|k&63);}return j;}f.exports=h;},null);
__d('BasicVector',[],function a(b,c,d,e,f,g){if(c.__markCompiled)c.__markCompiled();function h(i,j){'use strict';this.x=i;this.y=j;}h.prototype.derive=function(i,j){'use strict';return new h(i,j);};h.prototype.toString=function(){'use strict';return '('+this.x+', '+this.y+')';};h.prototype.add=function(i,j){'use strict';if(i instanceof h){j=i.y;i=i.x;}var k=parseFloat(i),l=parseFloat(j);return this.derive(this.x+k,this.y+l);};h.prototype.mul=function(i,j){'use strict';if(j===undefined)j=i;return this.derive(this.x*i,this.y*j);};h.prototype.div=function(i,j){'use strict';if(j===undefined)j=i;return this.derive(this.x*1/i,this.y*1/j);};h.prototype.sub=function(i,j){'use strict';if(arguments.length===1){return this.add(i.mul(-1));}else return this.add(-i,-j);};h.prototype.distanceTo=function(i){'use strict';return this.sub(i).magnitude();};h.prototype.magnitude=function(){'use strict';return Math.sqrt(this.x*this.x+this.y*this.y);};h.prototype.rotate=function(i){'use strict';return this.derive(this.x*Math.cos(i)-this.y*Math.sin(i),this.x*Math.sin(i)+this.y*Math.cos(i));};f.exports=h;},null);
__d("Keys",[],function a(b,c,d,e,f,g){if(c.__markCompiled)c.__markCompiled();f.exports={BACKSPACE:8,TAB:9,RETURN:13,ALT:18,ESC:27,SPACE:32,PAGE_UP:33,PAGE_DOWN:34,END:35,HOME:36,LEFT:37,UP:38,RIGHT:39,DOWN:40,DELETE:46,COMMA:188,PERIOD:190,A:65,Z:90,ZERO:48,NUMPAD_0:96,NUMPAD_9:105};},null);
__d("arrayContains",[],function a(b,c,d,e,f,g){if(c.__markCompiled)c.__markCompiled();function h(i,j){return i.indexOf(j)!==-1;}f.exports=h;},null);
__d('getUnboundedScrollPosition',['Scroll'],function a(b,c,d,e,f,g,h){'use strict';if(c.__markCompiled)c.__markCompiled();function i(j){if(j===window)return {x:window.pageXOffset||h.getLeft(document.documentElement),y:window.pageYOffset||h.getTop(document.documentElement)};return {x:h.getLeft(j),y:h.getTop(j)};}f.exports=i;},null);
__d("getOwnObjectValues",[],function a(b,c,d,e,f,g){if(c.__markCompiled)c.__markCompiled();function h(i){return Object.keys(i).map(function(j){return i[j];});}f.exports=h;},null);
__d('htmlSpecialChars',[],function a(b,c,d,e,f,g){if(c.__markCompiled)c.__markCompiled();var h=/&/g,i=/</g,j=/>/g,k=/"/g,l=/'/g;function m(n){if(typeof n=='undefined'||n===null||!n.toString)return '';if(n===false){return '0';}else if(n===true)return '1';return n.toString().replace(h,'&amp;').replace(k,'&quot;').replace(l,'&#039;').replace(i,'&lt;').replace(j,'&gt;');}f.exports=m;},null);
__d('htmlize',['htmlSpecialChars'],function a(b,c,d,e,f,g,h){if(c.__markCompiled)c.__markCompiled();function i(j){return h(j).replace(/\r\n|[\r\n]/g,'<br/>');}f.exports=i;},null);
__d('joinClasses',[],function a(b,c,d,e,f,g){'use strict';if(c.__markCompiled)c.__markCompiled();function h(i){if(!i)i='';var j,k=arguments.length;if(k>1)for(var l=1;l<k;l++){j=arguments[l];if(j)i=(i?i+' ':'')+j;}return i;}f.exports=h;},null);
__d('DOMVector',['BasicVector','getDocumentScrollElement','getElementPosition','getUnboundedScrollPosition','getViewportDimensions'],function a(b,c,d,e,f,g,h,i,j,k,l){if(c.__markCompiled)c.__markCompiled();var m,n;m=babelHelpers.inherits(o,h);n=m&&m.prototype;function o(p,q,r){'use strict';n.constructor.call(this,p,q);this.domain=r||'pure';}o.prototype.derive=function(p,q,r){'use strict';return new o(p,q,r||this.domain);};o.prototype.add=function(p,q){'use strict';if(p instanceof o&&p.getDomain()!=='pure')p=p.convertTo(this.domain);return n.add.call(this,p,q);};o.prototype.convertTo=function(p){'use strict';if(p!='pure'&&p!='viewport'&&p!='document')return this.derive(0,0);if(p==this.domain)return this.derive(this.x,this.y,this.domain);if(p=='pure')return this.derive(this.x,this.y);if(this.domain=='pure')return this.derive(0,0);var q=o.getScrollPosition('document'),r=this.x,s=this.y;if(this.domain=='document'){r-=q.x;s-=q.y;}else{r+=q.x;s+=q.y;}return this.derive(r,s,p);};o.prototype.getDomain=function(){'use strict';return this.domain;};o.from=function(p,q,r){'use strict';return new o(p,q,r);};o.getScrollPosition=function(p){'use strict';p=p||'document';var q=k(window);return this.from(q.x,q.y,'document').convertTo(p);};o.getElementPosition=function(p,q){'use strict';q=q||'document';var r=j(p);return this.from(r.x,r.y,'viewport').convertTo(q);};o.getElementDimensions=function(p){'use strict';return this.from(p.offsetWidth||0,p.offsetHeight||0);};o.getViewportDimensions=function(){'use strict';var p=l();return this.from(p.width,p.height,'viewport');};o.getViewportWithoutScrollbarDimensions=function(){'use strict';var p=l.withoutScrollbars();return this.from(p.width,p.height,'viewport');};o.getDocumentDimensions=function(p){'use strict';var q=i(p);return this.from(q.scrollWidth,q.scrollHeight,'document');};f.exports=o;},null);
__d('SearchI18nArabic',[],function a(b,c,d,e,f,g){'use strict';if(c.__markCompiled)c.__markCompiled();var h=/[\u0600-\u06FF]/;function i(o){return h.test(o);}var j={1570:1575,1571:1575,1573:1575,1649:1575,1609:1610,1577:1607,1572:1569,1574:1569},k=[1600,1611,1612,1613,1614,1615,1616,1617,1618];function l(o){return j.hasOwnProperty(o)?String.fromCharCode(j[o]):k.indexOf(o)!=-1?'':String.fromCharCode(o);}function m(o){if(!i(o))return o;var p=[];for(var q=0;q<o.length;q++){var r=o.charCodeAt(q);p.push(l(r));}return p.join('');}var n={hasArabicCharacters:i,normalizeCharCode:l,arabicNormalization:m};f.exports=n;},null);
__d('UnicodeHangulKorean',[],function a(b,c,d,e,f,g){'use strict';if(c.__markCompiled)c.__markCompiled();var h=/[\u3130-\u318F\uAC00-\uD7AF]/;function i(ba){return h.test(ba);}var j=[4352,4353,4522,4354,4524,4525,4355,4356,4357,4528,4529,4530,4531,4532,4533,4378,4358,4359,4360,4385,4361,4362,4363,4364,4365,4366,4367,4368,4369,4370,4449,4450,4451,4452,4453,4454,4455,4456,4457,4458,4459,4460,4461,4462,4463,4464,4465,4466,4467,4468,4469,4448,4372,4373,4551,4552,4556,4558,4563,4567,4569,4380,4573,4575,4381,4382,4384,4386,4387,4391,4393,4395,4396,4397,4398,4399,4402,4406,4416,4423,4428,4593,4594,4439,4440,4441,4484,4485,4488,4497,4498,4500,4510,4513],k=12593,l=j.length,m=k+l;function n(ba){return String.fromCharCode(j[ba-k]);}var o=4352,p=4449,q=4519,r=44032,s=19,t=21,u=28,v=t*u,w=s*v,x=r+w;function y(ba){var ca=ba-r,da=ca%u;return String.fromCharCode(o+ca/v)+String.fromCharCode(p+ca%v/u)+(da>0?String.fromCharCode(q+da):'');}function z(ba){if(!i(ba))return ba;var ca=[];for(var da=0;da<ba.length;da++){var ea=ba.charAt(da),fa=ea.charCodeAt(0);ca.push(k<=fa&&fa<m?n(fa):r<=fa&&fa<x?y(fa):ea);}return ca.join('');}var aa={toConjoiningJamo:z};f.exports=aa;},null);
__d('UnicodeCJK',[],function a(b,c,d,e,f,g){'use strict';if(c.__markCompiled)c.__markCompiled();var h='a-zA-Z',i='\uFF21-\uFF3A\uFF41-\uFF5A',j=h+i,k='\u3040-\u309F',l='\u30A0-\u30FF',m='\u31F0-\u31FF',n='\uFF65-\uFF9F',o=l+m+n,p=k+o,q=[12352,12447],r=[12448,12543],s=r[0]-q[0],t='\u4E00-\u9FCF',u='\u3400-\u4DBF',v=t+u,w='\uAC00-\uD7AF',x=v+p+w,y=null,z=null,aa=null,ba=null;function ca(ka){z=z||new RegExp('['+p+']');return z.test(ka);}function da(ka){y=y||new RegExp('['+v+']');return y.test(ka);}function ea(ka){aa=aa||new RegExp('['+x+']');return aa.test(ka);}function fa(ka){var la=ka.charCodeAt(0);return String.fromCharCode(la<q[0]||la>q[1]?la:la+s);}function ga(ka){if(!ca(ka))return ka;return ka.split('').map(fa).join('');}function ha(ka){ba=ba||new RegExp('^'+'['+p+']+'+'['+j+']'+'$');return ba.test(ka);}function ia(ka){if(ha(ka))return ka.substr(0,ka.length-1);return ka;}var ja={hasKana:ca,hasIdeograph:da,hasIdeoOrSyll:ea,hiraganaToKatakana:ga,isKanaWithTrailingLatin:ha,kanaRemoveTrailingLatin:ia};f.exports=ja;},null);
__d('SearchI18nMatch',['UnicodeHangulKorean','UnicodeCJK','SearchI18nArabic','invariant','createObjectFrom','mapObject'],function a(b,c,d,e,f,g,h,i,j,k,l,m){'use strict';if(c.__markCompiled)c.__markCompiled();var n=['prefix_hangul_conjoining_jamo','prefix_kana_drop_trailing_latin','prefix_kana_hiragana_to_katakana','search_i18n_prefix_arabic_normalization'];function o(p){this.config=l(n,false);this.setConfigs(p||{});}o.prototype.setConfigs=function(p){m(p,(function(q,r){return this.setConfig(r,q);}).bind(this),this);};o.prototype.setConfig=function(p,q){!(p in this.config)?k(0):undefined;this.config[p]=q;};o.prototype.prefixMatchPrepare=function(p){if(p){if(this.config.prefix_hangul_conjoining_jamo)p=h.toConjoiningJamo(p);if(this.config.prefix_kana_drop_trailing_latin)p=i.kanaRemoveTrailingLatin(p);if(this.config.prefix_kana_hiragana_to_katakana)p=i.hiraganaToKatakana(p);if(this.config.search_i18n_prefix_arabic_normalization)p=j.arabicNormalization(p);}return p;};o.prototype.prefixMatch=function(p,q){p=this.prefixMatchPrepare(p);q=this.prefixMatchPrepare(q);return p.startsWith(q);};f.exports=o;},null);
__d('TokenizeUtil',[],function a(b,c,d,e,f,g){if(c.__markCompiled)c.__markCompiled();var h=/[ ]+/g,i=/[^ ]+/g,j=new RegExp(k(),'g');function k(){return '[.,+*?$|#{}()\'\\^\\-\\[\\]\\\\\\/!@%"~=<>_:;'+'\u30fb\u3001\u3002\u3008-\u3011\u3014-\u301f\uff1a-\uff1f\uff01-\uff0f'+'\uff3b-\uff40\uff5b-\uff65\u2E2E\u061f\u066a-\u066c\u061b\u060c\u060d'+'\uFD3e\uFD3F\u1801\u0964\u104a\u104b\u2010-\u2027\u2030-\u205e'+'\u00a1-\u00b1\u00b4-\u00b8\u00ba\u00bb\u00bf]';}var l={},m={a:"\u0430 \u00e0 \u00e1 \u00e2 \u00e3 \u00e4 \u00e5 \u0101",b:"\u0431",c:"\u0446 \u00e7 \u010d",d:"\u0434 \u00f0 \u010f \u0111",e:"\u044d \u0435 \u00e8 \u00e9 \u00ea \u00eb \u011b \u0113",f:"\u0444",g:"\u0433 \u011f \u0123",h:"\u0445 \u0127",i:"\u0438 \u00ec \u00ed \u00ee \u00ef \u0131 \u012b",j:"\u0439",k:"\u043a \u0138 \u0137",l:"\u043b \u013e \u013a \u0140 \u0142 \u013c",m:"\u043c",n:"\u043d \u00f1 \u0148 \u0149 \u014b \u0146",o:"\u043e \u00f8 \u00f6 \u00f5 \u00f4 \u00f3 \u00f2",p:"\u043f",r:"\u0440 \u0159 \u0155",s:"\u0441 \u015f \u0161 \u017f",t:"\u0442 \u0165 \u0167 \u00fe",u:"\u0443 \u044e \u00fc \u00fb \u00fa \u00f9 \u016f \u016b",v:"\u0432",y:"\u044b \u00ff \u00fd",z:"\u0437 \u017e",ae:"\u00e6",oe:"\u0153",ts:"\u0446",ch:"\u0447",ij:"\u0133",sh:"\u0448",ss:"\u00df",ya:"\u044f"};for(var n in m){var o=m[n].split(' ');for(var p=0;p<o.length;p++)l[o[p]]=n;}var q={};function r(x){return x?x.replace(j,' '):'';}function s(x){x=x.toLowerCase();var y='',z='';for(var aa=x.length;aa--;){z=x.charAt(aa);y=(l[z]||z)+y;}return y.replace(h,' ');}function t(x){var y=[],z=i.exec(x);while(z){z=z[0];y.push(z);z=i.exec(x);}return y;}function u(x,y){if(!q.hasOwnProperty(x)){var z=s(x),aa=r(z);q[x]={value:x,flatValue:z,tokens:t(aa),isPrefixQuery:aa&&aa[aa.length-1]!=' '};}if(y&&typeof q[x].sortedTokens=='undefined'){q[x].sortedTokens=q[x].tokens.slice();q[x].sortedTokens.sort(function(ba,ca){return ca.length-ba.length;});}return q[x];}function v(x,y,z){var aa=u(y,x=='prefix'),ba=x=='prefix'?aa.sortedTokens:aa.tokens,ca=u(z).tokens,da={},ea=aa.isPrefixQuery&&x=='query'?ba.length-1:null,fa=function(ga,ha){for(var ia=0;ia<ca.length;++ia){var ja=ca[ia];if(!da[ia]&&(ja==ga||(x=='query'&&ha===ea||x=='prefix')&&ja.indexOf(ga)===0))return da[ia]=true;}return false;};return Boolean(ba.length&&ba.every(fa));}var w={flatten:s,parse:u,getPunctuation:k,isExactMatch:v.bind(null,'exact'),isQueryMatch:v.bind(null,'query'),isPrefixMatch:v.bind(null,'prefix'),tokenize:t};f.exports=w;},null);
__d('createIxElement',['DOM','invariant','joinClasses'],function a(b,c,d,e,f,g,h,i,j){if(c.__markCompiled)c.__markCompiled();function k(l,m){var n='img',o;!(l.sprited||l.uri)?i(0):undefined;if(l.sprited){n=j(n,l.spriteMapCssClass,l.spriteCssClass);o=h.create('i',{className:n});if(m!=null)h.setContent(o,h.create('u',null,m));}else if(l.uri){o=h.create('img',{className:n,src:l.uri});if(m!=null)o.setAttribute('alt',m);if(l.width)o.setAttribute('width',l.width);if(l.height)o.setAttribute('height',l.height);}return o;}f.exports=k;},null);
__d('throttle',['setTimeout','setTimeoutAcrossTransitions'],function a(b,c,d,e,f,g,h,i){if(c.__markCompiled)c.__markCompiled();function j(l,m,n){return k(l,m,n,h,false);}Object.assign(j,{acrossTransitions:function(l,m,n){return k(l,m,n,i,false);},withBlocking:function(l,m,n){return k(l,m,n,h,true);},acrossTransitionsWithBlocking:function(l,m,n){return k(l,m,n,i,true);}});function k(l,m,n,o,p){var q=m==null?100:m,r,s,t=0,u=null,v=function(){t=Date.now();if(s){l.apply(r,s);s=null;u=o(v,q);}else u=null;};v.__SMmeta=l.__SMmeta;return function w(){s=arguments;r=this;if(n!==undefined)r=n;if(u===null||Date.now()-t>q)if(p){v();}else u=o(v,0);};}f.exports=j;},null);
__d('TypeaheadFacepile',['DOM'],function a(b,c,d,e,f,g,h){if(c.__markCompiled)c.__markCompiled();function i(){}i.render=function(j){var k=[h.create('span',{className:'splitpic leftpic'},[h.create('img',{alt:'',src:j[0]})]),h.create('span',{className:'splitpic'+(j[2]?' toppic':'')},[h.create('img',{alt:'',src:j[1]})])];if(j[2])k.push(h.create('span',{className:'splitpic bottompic'},[h.create('img',{alt:'',src:j[2]})]));return h.create('span',{className:'splitpics clearfix'},k);};f.exports=i;},null);
__d('ARIA',['DOM','emptyFunction','ge'],function a(b,c,d,e,f,g,h,i,j){if(c.__markCompiled)c.__markCompiled();var k,l,m=function(){k=j('ariaAssertiveAlert');if(!k){k=h.create('div',{id:'ariaAssertiveAlert',className:'accessible_elem','aria-live':'assertive'});h.appendContent(document.body,k);}l=j('ariaPoliteAlert');if(!l){l=k.cloneNode(false);l.setAttribute('id','ariaPoliteAlert');l.setAttribute('aria-live','polite');h.appendContent(document.body,l);}m=i;};function n(p,q){m();var r=q?k:l;h.setContent(r,p);}var o={owns:function(p,q){p.setAttribute('aria-owns',h.getID(q));},setPopup:function(p,q){var r=h.getID(q);p.setAttribute('aria-owns',r);p.setAttribute('aria-haspopup','true');if(p.tabIndex==-1)p.tabIndex=0;},announce:function(p){n(p,true);},notify:function(p){n(p);}};f.exports=o;},null);
__d('BusyUIManager',['UserAgent_DEPRECATED'],function a(b,c,d,e,f,g,h){if(c.__markCompiled)c.__markCompiled();var i=false,j=[];function k(m){if(!h.webkit()){j.push([m,m.style.cursor]);m.style.cursor='progress';}}var l={lookBusy:function(m){if(m)k(m);if(i)return;i=true;k(document.documentElement);},stopLookingBusy:function(){if(!i)return;i=false;while(j.length){var m=j.pop(),n=m[0],o=m[1];if(n.style)n.style.cursor=o||'';}}};f.exports=l;},null);
__d('BadgeHelper',['DOM','cx','joinClasses'],function a(b,c,d,e,f,g,h,i,j){if(c.__markCompiled)c.__markCompiled();var k={xsmall:"_5dzz",small:"_5dz-",medium:"_5dz_",large:"_5d-0",xlarge:"_5d-1"},l={verified:"_56_f",trending:"_1gop",topcommenter:"_59t2",page_gray_check:"_5n3t",work:"_5d62",gamegreen:"_3a8y"};function m(o,p){return j(k[o],l[p],"_5dzy");}function n(o,p){var q=m(o,p);if(q)return h.create('span',{className:q});}f.exports={getClasses:m,renderBadge:n,sizes:Object.keys(k),types:Object.keys(l)};},null);
__d('BasicTypeaheadRenderer',['BadgeHelper','DOM'],function a(b,c,d,e,f,g,h,i){if(c.__markCompiled)c.__markCompiled();var j=' \u00B7 ';function k(l,m){var n=[];if(l.icon)n.push(i.create('img',{alt:'',src:l.icon}));var o=l.debug_info;if(o)n.push(i.create('span',{className:'debugInfo'},o));if(l.text){var p=[l.text];if(l.is_verified)p.push(h.renderBadge('xsmall','verified'));n.push(i.create('span',{className:'text'},p));}if(l.subtext){var q=[l.subtext];if(l.saved_context){var r=i.create('span',{className:'saved'},[l.saved_context]);q.unshift(r,j);}n.push(i.create('span',{className:'subtext'},q));}var s=i.create('li',{className:l.type||''},n);if(l.text){s.setAttribute('title',l.text);s.setAttribute('aria-label',l.text);}return s;}k.className='basic';f.exports=k;},null);
__d('TypeaheadView',['ArbiterMixin','BasicTypeaheadRenderer','createIxElement','CSS','DOM','Event','ix','Parent','$','emptyFunction','getElementText','mixin'],function a(b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s){if(c.__markCompiled)c.__markCompiled();var t,u;t=babelHelpers.inherits(v,s(h));u=t&&t.prototype;function v(w,x){'use strict';u.constructor.call(this);this.element=this.content=p(w);Object.assign(this,x);}v.prototype.init=function(){'use strict';this.init=q;this.initializeEvents();this.reset();};v.prototype.initializeEvents=function(){'use strict';m.listen(this.element,{mouseup:this.mouseup.bind(this),mouseover:this.mouseover.bind(this)});};v.prototype.setTypeahead=function(w){'use strict';this.typeahead=w;};v.prototype.setAccessibilityControlElement=function(w){'use strict';this.accessibilityElement=w;};v.prototype.getElement=function(){'use strict';return this.element;};v.prototype.mouseup=function(event){'use strict';if(event.button!=2){this.select(true);event.prevent();}};v.prototype.mouseover=function(event){'use strict';if(this.ignoreMouseover){this.ignoreMouseover=false;return;}if(this.visible)this.highlight(this.getIndex(event));};v.prototype.reset=function(w){'use strict';if(!w)this.disableAutoSelect=false;this.index=-1;this.items=[];this.results=[];this.value='';this.content.innerHTML='';this.inform('reset');return this;};v.prototype.getIndex=function(event){'use strict';return this.items.indexOf(o.byTag(event.getTarget(),'li'));};v.prototype.getSelection=function(){'use strict';var w=this.results[this.index]||null;return this.visible?w:null;};v.prototype.isEmpty=function(){'use strict';return !this.results.length;};v.prototype.isVisible=function(){'use strict';return !!this.visible;};v.prototype.show=function(){'use strict';k.show(this.element);if(this.results&&this.results.length)if(this.autoSelect&&this.accessibilityElement&&this.selected)this.accessibilityElement.setAttribute('aria-activedescendant',l.getID(this.selected));this.accessibilityElement&&this.accessibilityElement.setAttribute('aria-expanded','true');this.visible=true;return this;};v.prototype.hide=function(){'use strict';k.hide(this.element);if(this.accessibilityElement){this.accessibilityElement.setAttribute('aria-expanded','false');this.accessibilityElement.removeAttribute('aria-activedescendant');}this.visible=false;return this;};v.prototype.render=function(w,x){'use strict';this.value=w;if(!x.length){this.accessibilityElement&&this.accessibilityElement.removeAttribute('aria-activedescendant');this.reset(true);return;}var y={results:x,value:w};this.inform('beforeRender',y);x=y.results;var z=this.getDefaultIndex(x);this.results=x;l.setContent(this.content,this.buildResults(x));this.items=this.getItems();this.highlight(z,false);this.inform('render',x);};v.prototype.getItems=function(){'use strict';return l.scry(this.content,'li');};v.prototype.buildResults=function(w){'use strict';var x,y=null;if(typeof this.renderer=='function'){x=this.renderer;y=this.renderer.className||'';}else{x=b.TypeaheadRenderers[this.renderer];y=this.renderer;}x=x.bind(this);var z=w.map(function(ba,ca){var da=ba.node||x(ba,ca);da.setAttribute('role','option');return da;}),aa=l.create('ul',{className:y,id:'typeahead_list_'+(this.typeahead?l.getID(this.typeahead):l.getID(this.element))},z);aa.setAttribute('role','listbox');return aa;};v.prototype.showLoadingIndicator=function(){'use strict';var w=j(n('/images/loaders/indicator_blue_small.gif')),x=l.create('li',{className:'typeaheadViewInternalLoading'},w),y=l.create('ul',{role:'listbox'},x);l.setContent(this.content,y);};v.prototype.getDefaultIndex=function(){'use strict';var w=this.autoSelect&&!this.disableAutoSelect;return this.index<0&&!w?-1:0;};v.prototype.next=function(){'use strict';this.highlight(this.index+1);this.inform('next',this.selected);};v.prototype.prev=function(){'use strict';this.highlight(this.index-1);this.inform('prev',this.selected);};v.prototype.getItemText=function(w){'use strict';var x='';if(w){x=w.getAttribute('aria-label');if(!x){x=r(w);w.setAttribute('aria-label',x);}}return x;};v.prototype.setIsViewingSelectedItems=function(w){'use strict';this.viewingSelected=w;return this;};v.prototype.getIsViewingSelectedItems=function(){'use strict';return !!this.viewingSelected;};v.prototype.highlight=function(w,x){'use strict';if(this.selected){k.removeClass(this.selected,'selected');this.selected.setAttribute('aria-selected','false');}if(w>this.items.length-1){w=-1;}else if(w<-1)w=this.items.length-1;if(w>=0&&w<this.items.length){this.selected=this.items[w];k.addClass(this.selected,'selected');this.selected.setAttribute('aria-selected','true');if(this.accessibilityElement)setTimeout((function(){this.accessibilityElement.setAttribute('aria-activedescendant',l.getID(this.selected));}).bind(this),0);}else this.accessibilityElement&&this.accessibilityElement.removeAttribute('aria-activedescendant');this.index=w;this.disableAutoSelect=w==-1;if(x!==false)this.inform('highlight',{index:w,selected:this.results[w],element:this.selected});};v.prototype.select=function(w){'use strict';if(this.headerIndex&&w)return;var x=this.index,y=this.results[x],z=this.element.getAttribute('id');if(y){var aa=(function(ba){this.inform('select',{index:x,clicked:!!w,selected:ba,id:z,query:this.value});this.inform('afterSelect');}).bind(this);if(this.shouldValidateTypeaheadSelection(y)){this.validateTypeaheadSelection(y,aa);}else aa(y);}};v.prototype.shouldValidateTypeaheadSelection=function(w){'use strict';return false;};v.prototype.validateTypeaheadSelection=function(w,x){'use strict';};Object.assign(v.prototype,{events:['highlight','render','reset','select','beforeRender','next','prev'],renderer:i,autoSelect:false,ignoreMouseover:false});f.exports=v;},null);
__d('BucketedTypeaheadView',['DOM','TypeaheadView','fbt'],function a(b,c,d,e,f,g,h,i,j){if(c.__markCompiled)c.__markCompiled();var k,l;k=babelHelpers.inherits(m,i);l=k&&k.prototype;m.prototype.render=function(n,o,p){'use strict';var q=o.length>0;for(var r=0;r<o.length;++r)if(o[r].type!=='hashtag')q=false;if(!q)o=this.buildBuckets(n,o);return l.render.call(this,n,o,p);};m.prototype.highlight=function(n,o){'use strict';this.headerIndex=false;if(n==-1&&this.index!==0)n=this.index;while(n>=0&&n<this.items.length&&!this.isHighlightable(this.results[n])){n=n+1;this.headerIndex=true;}l.highlight.call(this,n,o);};m.prototype.buildBuckets=function(n,o){'use strict';if(!this.typeObjects||!o||!o.length)return o;var p=[],q={};for(var r=0;r<o.length;++r){var s=o[r],t=s.render_type||s.type;if(!q.hasOwnProperty(t)){q[t]=p.length;p.push([this.buildBucketHeader(t)]);}s.classNames=s.classNames||t;s.groupIndex=q[t];s.indexInGroup=p[s.groupIndex].length-1;s.globalIndex=r;p[s.groupIndex].push(s);}for(t in this.typeObjects)if(!q.hasOwnProperty(t)&&this.typeObjects[t].show_always){q[t]=p.length;p.push([this.buildBucketHeader(t)]);s=this.buildNoResultsEntry();s.classNames=s.type;s.groupIndex=q[t];s.indexInGroup=p[s.groupIndex].length-1;p[s.groupIndex].push(s);}var u=[];if(this.typeObjectsOrder){for(var v=0;v<this.typeObjectsOrder.length;++v){var w=this.typeObjectsOrder[v];if(q.hasOwnProperty(w))u=u.concat(p[q[w]]);}}else for(var x=0;x<p.length;++x)u=u.concat(p[x]);return u;};m.prototype.buildNoResultsEntry=function(){'use strict';return {uid:'disabled_result',type:'disabled_result',text:j._("Nincs tal\u00e1lat")};};m.prototype.buildBucketHeader=function(n){'use strict';var o=this.typeObjects[n];if(o===undefined)throw new Error(n+" is undefined in "+JSON.stringify(this.typeObjects));if(o.markup){o.text=o.markup;delete o.markup;}return this.typeObjects[n];};m.prototype.buildResults=function(n){'use strict';var o=l.buildResults.call(this,n);if(this.typeObjects){return h.create('div',{className:'bucketed'},[o]);}else return o;};m.prototype.isHighlightable=function(n){'use strict';return n.type!='header'&&n.type!='disabled_result';};m.prototype.select=function(n){'use strict';var o=this.results[this.index];if(o&&this.isHighlightable(o))l.select.call(this,n);};m.prototype.updateResults=function(n){'use strict';this.results=n;};m.prototype.normalizeIndex=function(n){'use strict';var o=this.results.length;if(o===0){return -1;}else if(n<-1){return n%o+o+1;}else if(n>=o){return n%o-1;}else return n;};m.prototype.getDefaultIndex=function(n){'use strict';var o=this.autoSelect&&!this.disableAutoSelect;if(this.index<0&&!o)return -1;if(n.length===0)return -1;var p=0;while(!this.isHighlightable(n)&&p<n.length)p++;return p;};m.prototype.prev=function(){'use strict';var n=this.results[this.normalizeIndex(this.index-1)];while(n&&!this.isHighlightable(n)){this.index=this.normalizeIndex(this.index-1);n=this.results[this.normalizeIndex(this.index-1)];}return l.prev.call(this);};m.prototype.next=function(){'use strict';var n=this.results[this.normalizeIndex(this.index+1)];while(n&&!this.isHighlightable(n)){this.index=this.normalizeIndex(this.index+1);n=this.results[this.normalizeIndex(this.index+1)];}return l.next.call(this);};function m(){'use strict';k.apply(this,arguments);}f.exports=m;},null);
__d('LinkController',['Event','DataStore','Parent','trackReferrer'],function a(b,c,d,e,f,g,h,i,j,k){if(c.__markCompiled)c.__markCompiled();var l='LinkControllerHandler',m=[],n=[];function o(event){var s=event.getTarget(),t=j.byTag(s,'a'),u=t&&t.getAttribute('href',2);if(!u||t.rel||!q(u)||s.nodeName=='INPUT'&&s.type=='file'||i.get(t,l))return;var v=h.listen(t,'click',function(w){if(u.charAt(u.length-1)=='#'){w.prevent();return;}k(t,u);p(t,w);});i.set(t,l,v);}function p(s,event){if(s.target||s.rel||event.getModifiers().any||event.which&&event.which!=1)return;var t=m.concat(n);for(var u=0,v=t.length;u<v;u++)if(t[u](s,event)===false)return event.prevent();}function q(s){var t=s.match(/^(\w+):/);return !t||t[1].match(/^http/i);}var r={registerHandler:function(s){m.push(s);},registerFallbackHandler:function(s){n.push(s);}};h.listen(document.documentElement,'mousedown',o);h.listen(document.documentElement,'keydown',o);f.exports=r;},null);
__d('computeRelativeURI',['URI','isFacebookURI','isEmpty'],function a(b,c,d,e,f,g,h,i,j){if(c.__markCompiled)c.__markCompiled();function k(m,n){if(!n)return m;if(n.charAt(0)=='/')return n;var o=m.split('/').slice(0,-1);o[0]!=='';n.split('/').forEach(function(p){if(!(p=='.'))if(p=='..'){if(o.length>1)o=o.slice(0,-1);}else o.push(p);});return o.join('/');}function l(m,n){var o=new h(),p=n;m=new h(m);n=new h(n);if(n.getDomain()&&!i(n))return p;var q=m,r=['Protocol','Domain','Port','Path','QueryData','Fragment'];r.forEach(function(s){var t=s=='Path'&&q===m;if(t)o.setPath(k(m.getPath(),n.getPath()));if(!j(n['get'+s]()))q=n;if(!t)o['set'+s](q['get'+s]());});return o;}f.exports=l;},null);
__d('PageTransitionsRegistrar',['Bootloader','BusyUIManager','DOMQuery','Event','Form','LinkController','Parent','Run','URI','computeRelativeURI','goURI','setTimeoutAcrossTransitions'],function a(b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s){if(c.__markCompiled)c.__markCompiled();o.onAfterLoad(function(){h.loadModules(["PageTransitions"],function(){});});var t=[],u=[],v={registerHandler:function(da,ea){ea=ea||5;if(!t[ea])t[ea]=[];t[ea].push(da);},removeHandler:function(da,ea){ea=ea||5;var fa=-1;if(t[ea])fa=t[ea].indexOf(da);if(fa>-1)t[ea].splice(fa,1);},registerCompletionCallback:function(da){u.push(da);},getMostRecentURI:ca,_getTransitionHandlers:function(){return t;},_getCompletionCallbacks:function(){return u;},_resetCompletionCallbacks:function(){u=[];}},w=null,x=null;function y(da){x=da;s(function(){x=null;},0);}function z(event){var da=x;if(da){if(!event.isDefaultPrevented()){aa(x);i.lookBusy(da);r(da.getAttribute('href'));}event.kill();}else{w=event.getTarget();s(function(){w=null;},0);}}function aa(da){var ea=da.getAttribute('href'),fa=q(ca().getQualifiedURI(),ea).toString();if(ea!=fa)da.setAttribute('href',fa);}function ba(event){var da=event.getTarget();if(l.getAttribute(da,'rel')||l.getAttribute(da,'target'))return;var ea=new p(l.getAttribute(da,'action')),fa=q(ca(),ea);da.setAttribute('action',fa.toString());if((l.getAttribute(da,'method')||'GET').toUpperCase()=='GET'){var ga=l.serialize(da),ha=w;if(ha&&(j.isNodeOfType(ha,'input')&&ha.type==='submit'||(ha=n.byTag(ha,'button')))&&ha.name)ga[ha.name]=ha.value;r(fa.addQueryData(ga));event.kill();}}m.registerFallbackHandler(y);k.listen(document,'click',z,k.Priority._BUBBLE);k.listen(document,'submit',ba,k.Priority._BUBBLE);function ca(){if(b.PageTransitions&&b.PageTransitions.isInitialized()){return b.PageTransitions.getMostRecentURI();}else{var da=p.getRequestURI(false),ea=da.getUnqualifiedURI(),fa=new p(ea).setFragment(null),ga=ea.getFragment();if(ga.charAt(0)==='!'&&fa.toString()===ga.substr(1))ea=fa;return ea;}}f.exports=v;},null);
__d('LayerHideOnTransition',['PageTransitionsRegistrar'],function a(b,c,d,e,f,g,h){if(c.__markCompiled)c.__markCompiled();function i(j){'use strict';this._layer=j;}i.prototype.enable=function(){'use strict';this._enabled=true;if(!this._subscribed)setTimeout(this._subscribe.bind(this),0);};i.prototype.disable=function(){'use strict';this._enabled=false;};i.prototype._handler=function(){'use strict';if(this._enabled)this._layer.hide();this._subscribe();};i.prototype._subscribe=function(){'use strict';h.registerHandler(this._handler.bind(this));this._subscribed=true;};Object.assign(i.prototype,{_enabled:false,_subscribed:false});f.exports=i;},null);
__d('Vector',['DOMVector','Event','Scroll'],function a(b,c,d,e,f,g,h,i,j){if(c.__markCompiled)c.__markCompiled();var k,l;k=babelHelpers.inherits(m,h);l=k&&k.prototype;function m(n,o,p){'use strict';l.constructor.call(this,parseFloat(n),parseFloat(o),p);}m.prototype.derive=function(n,o,p){'use strict';return new m(n,o,p||this.domain);};m.prototype.setElementPosition=function(n){'use strict';var o=this.convertTo('document');n.style.left=parseInt(o.x,10)+'px';n.style.top=parseInt(o.y,10)+'px';return this;};m.prototype.setElementDimensions=function(n){'use strict';return this.setElementWidth(n).setElementHeight(n);};m.prototype.setElementWidth=function(n){'use strict';n.style.width=parseInt(this.x,10)+'px';return this;};m.prototype.setElementHeight=function(n){'use strict';n.style.height=parseInt(this.y,10)+'px';return this;};m.prototype.scrollElementBy=function(n){'use strict';if(n==document.body){window.scrollBy(this.x,this.y);}else{j.setLeft(n,j.getLeft(n)+this.x);j.setTop(n,j.getTop(n)+this.y);}return this;};m.from=function(n,o,p){'use strict';return new m(n,o,p);};m.getEventPosition=function(n,o){'use strict';o=o||'document';var p=i.getPosition(n),q=this.from(p.x,p.y,'document');return q.convertTo(o);};m.deserialize=function(n){'use strict';var o=n.split(',');return this.from(o[0],o[1]);};f.exports=m;},null);
__d('Rect',['Vector','$'],function a(b,c,d,e,f,g,h,i){if(c.__markCompiled)c.__markCompiled();function j(k,l,m,n,o){'use strict';if(arguments.length===1){if(k instanceof j)return k;if(k instanceof h)return new j(k.y,k.x,k.y,k.x,k.domain);return j.getElementBounds(i(k));}Object.assign(this,{t:k,r:l,b:m,l:n,domain:o||'pure'});}j.prototype.w=function(){'use strict';return this.r-this.l;};j.prototype.h=function(){'use strict';return this.b-this.t;};j.prototype.toString=function(){'use strict';return '(('+this.l+', '+this.t+'), ('+this.r+', '+this.b+'))';};j.prototype.contains=function(k){'use strict';k=new j(k).convertTo(this.domain);var l=this;return l.l<=k.l&&l.r>=k.r&&l.t<=k.t&&l.b>=k.b;};j.prototype.isEqualTo=function(k){'use strict';return (this.t===k.t&&this.r===k.r&&this.b===k.b&&this.l===k.l&&this.domain===k.domain);};j.prototype.add=function(k,l){'use strict';if(arguments.length==1){if(k.domain!='pure')k=k.convertTo(this.domain);return this.add(k.x,k.y);}var m=parseFloat(k),n=parseFloat(l);return new j(this.t+n,this.r+m,this.b+n,this.l+m,this.domain);};j.prototype.sub=function(k,l){'use strict';if(arguments.length==1){return this.add(k.mul(-1));}else return this.add(-k,-l);};j.prototype.rotateAroundOrigin=function(k){'use strict';var l=this.getCenter().rotate(k*Math.PI/2),m,n;if(k%2){m=this.h();n=this.w();}else{m=this.w();n=this.h();}var o=l.y-n/2,p=l.x-m/2,q=o+n,r=p+m;return new j(o,r,q,p,this.domain);};j.prototype.boundWithin=function(k){'use strict';var l=0,m=0;if(this.l<k.l){l=k.l-this.l;}else if(this.r>k.r)l=k.r-this.r;if(this.t<k.t){m=k.t-this.t;}else if(this.b>k.b)m=k.b-this.b;return this.add(l,m);};j.prototype.getCenter=function(){'use strict';return new h(this.l+this.w()/2,this.t+this.h()/2,this.domain);};j.prototype.getTop=function(){'use strict';return this.t;};j.prototype.getLeft=function(){'use strict';return this.l;};j.prototype.getPositionVector=function(){'use strict';return new h(this.l,this.t,this.domain);};j.prototype.getDimensionVector=function(){'use strict';return new h(this.w(),this.h(),'pure');};j.prototype.convertTo=function(k){'use strict';if(this.domain==k)return this;if(k=='pure')return new j(this.t,this.r,this.b,this.l,'pure');if(this.domain=='pure')return new j(0,0,0,0);var l=new h(this.l,this.t,this.domain).convertTo(k);return new j(l.y,l.x+this.w(),l.y+this.h(),l.x,k);};j.deserialize=function(k){'use strict';var l=k.split(':');return new j(parseFloat(l[1]),parseFloat(l[2]),parseFloat(l[3]),parseFloat(l[0]));};j.newFromVectors=function(k,l){'use strict';return new j(k.y,k.x+l.x,k.y+l.y,k.x,k.domain);};j.getElementBounds=function(k){'use strict';return j.newFromVectors(h.getElementPosition(k),h.getElementDimensions(k));};j.getViewportBounds=function(){'use strict';return j.newFromVectors(h.getScrollPosition(),h.getViewportDimensions());};j.getViewportWithoutScrollbarsBounds=function(){'use strict';return j.newFromVectors(h.getScrollPosition(),h.getViewportWithoutScrollbarDimensions());};j.minimumBoundingBox=function(k){'use strict';var l=new j(Math.min(),Math.max(),Math.max(),Math.min()),m;for(var n=0;n<k.length;n++){m=k[n];l.t=Math.min(l.t,m.t);l.r=Math.max(l.r,m.r);l.b=Math.max(l.b,m.b);l.l=Math.min(l.l,m.l);}return l;};f.exports=j;},null);
__d("SVGChecker",[],function a(b,c,d,e,f,g){if(c.__markCompiled)c.__markCompiled();f.exports={isSVG:function(h){return !!h.ownerSVGElement||h.tagName.toLowerCase()==="svg";},isDisplayed:function(h){try{var j=h.getBBox();if(j&&(j.height===0||j.width===0))return false;}catch(i){return false;}return true;}};},null);
__d('getOverlayZIndex',['Style'],function a(b,c,d,e,f,g,h){if(c.__markCompiled)c.__markCompiled();function i(j,k){k=k||document.body;var l=[];while(j&&j!==k){l.push(j);j=j.parentNode;}if(j!==k)return 0;for(var m=l.length-1;m>=0;m--){var n=l[m];if(h.get(n,'position')!='static'){var o=parseInt(h.get(n,'z-index'),10);if(!isNaN(o))return o;}}return 0;}f.exports=i;},null);
__d('ContextualLayer',['Arbiter','ARIA','ContextualThing','CSS','DataStore','DOM','Event','Layer','LayerHideOnTransition','Locale','Parent','Rect','Scroll','Style','SVGChecker','Vector','arrayContains','containsNode','emptyFunction','getOwnObjectValues','getOffsetParent','getOverlayZIndex','removeFromArray','throttle'],function a(b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z,aa,ba,ca,da,ea){if(c.__markCompiled)c.__markCompiled();var fa,ga;function ha(na){return na.getPosition()==='left'||na.isVertical()&&na.getAlignment()==='right';}fa=babelHelpers.inherits(ia,o);ga=fa&&fa.prototype;ia.prototype._configure=function(na,oa){'use strict';ga._configure.call(this,na,oa);if(na.shouldSetARIAProperties===false)this._shouldSetARIAProperties=na.shouldSetARIAProperties;if(na.context){this.setContext(na.context);}else if(na.contextID){this._setContextID(na.contextID);}else if(na.contextSelector)this._setContextSelector(na.contextSelector);this.setPosition(na.position);this.setAlignment(na.alignment);this.setOffsetX(na.offsetX);this.setOffsetY(na.offsetY);this.setArrowDimensions(na.arrowDimensions);this._content=oa;};ia.prototype._getDefaultBehaviors=function(){'use strict';var na=ia.getDefaultBehaviorsAsObject();return ga._getDefaultBehaviors.call(this).concat(aa(na));};ia.prototype._buildWrapper=function(na,oa){'use strict';this._contentWrapper=m.create('div',{className:'uiContextualLayer'},oa);return m.create('div',{className:'uiContextualLayerPositioner'},this._contentWrapper);};ia.prototype.getInsertParent=function(){'use strict';var na=this._insertParent;if(!na){var oa=this.getContext();if(oa)na=r.byClass(oa,'uiContextualLayerParent');}return na||ga.getInsertParent.call(this);};ia.prototype.setContent=function(na){'use strict';this._content=na;m.setContent(this._contentWrapper,this._content);this._shown&&this.updatePosition();return this;};ia.prototype.setContext=function(na){'use strict';return this.setContextWithBounds(na,null);};ia.prototype.setContextWithBounds=function(na,oa){'use strict';if(this._contextNode===na&&oa&&this._contextBounds&&oa.isEqualTo(this._contextBounds))return this;this._contextNode=na;var pa=oa&&this._contextBounds&&oa.t===this._contextBounds.t&&oa.r===this._contextBounds.r&&oa.b===this._contextBounds.b&&oa.l===this._contextBounds.l;if(pa)return this;this._contextBounds=oa||null;this._contextSelector=this._contextScrollParent=null;if(this._shown){j.register(this.getRoot(),this._contextNode);this.updatePosition();}this._setParentSubscription();this.setARIAProperties();return this;};ia.prototype.shouldSetARIAProperties=function(na){'use strict';this._shouldSetARIAProperties=na;return this;};ia.prototype.setARIAProperties=function(){'use strict';if(this._shouldSetARIAProperties)i.setPopup(this.getCausalElement(),this.getRoot());return this;};ia.prototype._setContextID=function(na){'use strict';this._contextSelector='#'+na;this._contextNode=null;};ia.prototype._setContextSelector=function(na){'use strict';this._contextSelector=na;this._contextNode=null;};ia.prototype.getCausalElement=function(){'use strict';return ga.getCausalElement.call(this)||this.getContext();};ia.prototype._setParentSubscription=function(){'use strict';var na=this.getContext(),oa=null;while(na!==null){oa=l.get(na,'layer');if(oa)break;na=na.parentNode;}if(oa===this._parentLayer)return;if(this._parentLayer&&this._parentSubscription){this._parentLayer.unsubscribe(this._parentSubscription);this._parentSubscription=null;}if(oa)this._parentSubscription=oa.subscribe('hide',this.hide.bind(this));this._parentLayer=oa;};ia.prototype.setPosition=function(na){'use strict';if(this.getOrientation().setDefaultPosition(na))this._shown&&this.updatePosition();return this;};ia.prototype.setAlignment=function(na){'use strict';if(this.getOrientation().setDefaultAlignment(na))this._shown&&this.updatePosition();return this;};ia.prototype.setOffsetX=function(na){'use strict';if(this.getOrientation().setDefaultOffsetX(na))this._shown&&this.updatePosition();return this;};ia.prototype.setArrowDimensions=function(na){'use strict';if(na&&this.getOrientation().setArrowOffset(na.offset))this._shown&&this.updatePosition();return this;};ia.prototype.setOffsetY=function(na){'use strict';if(this.getOrientation().setDefaultOffsetY(na))this._shown&&this.updatePosition();return this;};ia.prototype.getPosition=function(){'use strict';return this.getOrientation().getPosition();};ia.prototype.getOrientation=function(){'use strict';if(!this._orientation)this._orientation=new ma();return this._orientation;};ia.prototype.getContentRoot=function(){'use strict';return this._contentWrapper;};ia.prototype.getContent=function(){'use strict';return this._content;};ia.prototype.getContext=function(){'use strict';if(!this._contextNode)this._contextNode=m.find(document,this._contextSelector);return this._contextNode;};ia.prototype.getContextBounds=function(na){'use strict';if(this._contextBounds)return this._contextBounds.convertTo(na);var oa=this.getContext();return s.newFromVectors(w.getElementPosition(oa,na),w.getElementDimensions(oa));};ia.prototype.getContextScrollParent=function(){'use strict';if(!this._contextScrollParent){this._contextScrollParent=u.getScrollParent(this.getContext());}else if(m.isElementNode(this._contextScrollParent)&&!y(document.documentElement,this._contextScrollParent))this._contextScrollParent=u.getScrollParent(this.getContext());return this._contextScrollParent;};ia.prototype.setInsertParent=function(na){'use strict';this._insertScrollParent=null;return ga.setInsertParent.call(this,na);};ia.prototype.getInsertScrollParent=function(){'use strict';if(!this._insertScrollParent)this._insertScrollParent=u.getScrollParent(this.getInsertParent());return this._insertScrollParent;};ia.prototype.show=function(){'use strict';if(this._shown)return this;ga.show.call(this);if(this._shown){j.register(this.getRoot(),this.getContext());ja.push(this);this._resizeListener=this._resizeListener||n.listen(window,'resize',ea(this.updatePosition.bind(this)));}return this;};ia.prototype.finishHide=function(){'use strict';da(ja,this);this._resizeListener&&this._resizeListener.remove();this._resizeListener=null;return ga.finishHide.call(this);};ia.prototype.isFixed=function(){'use strict';return (u.isFixed(this.getContext())&&!u.isFixed(this.getInsertParent()));};ia.prototype.updatePosition=function(){'use strict';var na=this.getContext();if(!na)return false;var oa=this.isFixed();if(!oa&&!(na.offsetParent||v.isSVG(na)&&v.isDisplayed(na)))return false;var pa=this.getRoot();u.set(pa,'width',w.getViewportDimensions().x+'px');var qa=this.getOrientation();this.inform('adjust',qa.reset());if(!qa.isValid())return false;this._updateWrapperPosition(qa);this._updateWrapperClass(qa);k.conditionClass(pa,'uiContextualLayerPositionerFixed',oa);var ra,sa,ta=oa?'viewport':'document',ua=oa?document.documentElement:ba(pa);if(ua===document.documentElement){ra=new w(0,0);sa=document.documentElement.clientWidth;}else if(!pa.offsetParent){return false;}else{ra=w.getElementPosition(ua,ta);sa=ua.offsetWidth;if(ua!==document.body)ra=ra.sub(new w(t.getLeft(ua),t.getTop(ua)));}var va=this.getContextBounds(ta),wa=va.l-ra.x,xa=va.t-ra.y,ya=va.h(),za=va.w(),ab=q.isRTL();if(qa.getPosition()==='below')xa+=ya;if((qa.getPosition()==='right'||qa.isVertical()&&qa.getAlignment()==='right')!=ab)wa+=za;var bb=qa.getOffsetX();if(qa.isVertical()&&qa.getAlignment()==='center')bb+=(za-this.getContentRoot().offsetWidth)/2;if(ab)bb*=-1;var cb='left',db=Math.floor(wa+bb);if(ha(qa)!==ab){cb='right';db=sa-db;}u.set(pa,cb,db+'px');u.set(pa,cb==='left'?'right':'left','');var eb=this.getInsertScrollParent(),fb;if(eb!==window){fb=eb.clientWidth;}else fb=document.documentElement.clientWidth;var gb=w.getElementPosition(pa).x;if(cb==='left'&&fb-gb>0){u.set(pa,'width',fb-gb+'px');}else if(cb==='right'&&gb+pa.offsetWidth>0){u.set(pa,'width',gb+pa.offsetWidth+'px');}else u.set(pa,'width','');u.set(pa,'top',xa+qa.getOffsetY()+'px');var hb=ca(na,this.getInsertParent());u.set(pa,'z-index',hb>200?hb:'');this.inform('reposition',qa);return true;};ia.prototype._updateWrapperPosition=function(na){'use strict';var oa=na.getPosition()==='above';u.set(this._contentWrapper,'bottom',oa?'0':null);var pa=q.isRTL()?'left':'right',qa=ha(na);u.set(this._contentWrapper,pa,qa?'0':null);};ia.prototype._updateWrapperClass=function(na){'use strict';var oa=na.getClassName();if(oa===this._orientationClass)return;if(this._orientationClass)k.removeClass(this._contentWrapper,this._orientationClass);this._orientationClass=oa;k.addClass(this._contentWrapper,oa);};ia.prototype.simulateOrientation=function(na,oa){'use strict';var pa=na.getClassName();if(pa===this._orientationClass){return oa();}else{if(this._orientationClass)k.removeClass(this._contentWrapper,this._orientationClass);k.addClass(this._contentWrapper,pa);var qa=oa();k.removeClass(this._contentWrapper,pa);if(this._orientationClass)k.addClass(this._contentWrapper,this._orientationClass);return qa;}};ia.prototype.destroy=function(){'use strict';ga.destroy.call(this);this._contentWrapper=null;this._content=null;return this;};ia.prototype.getArrowDimensions=function(){'use strict';return this._config.arrowDimensions||{offset:0,length:0};};ia.getDefaultBehaviorsAsObject=function(){'use strict';return {LayerHideOnTransition:p};};function ia(){'use strict';fa.apply(this,arguments);}var ja=[];h.subscribe('reflow',function(){ja.forEach(function(na){if(na.updatePosition()===false)na.hide();});});Object.assign(ia.prototype,{_contentWrapper:null,_content:null,_contextNode:null,_contextBounds:null,_contextSelector:null,_parentLayer:null,_parentSubscription:null,_orientation:null,_orientationClass:null,_shouldSetARIAProperties:true});var ka=z.thatReturnsArgument,la=z.thatReturnsArgument;function ma(){'use strict';this._default={_position:'above',_alignment:'left',_offsetX:0,_offsetY:0,_valid:true};this.reset();}ma.prototype.setPosition=function(na){'use strict';this._position=ka(na);return this;};ma.prototype.setAlignment=function(na){'use strict';this._alignment=la(na);return this;};ma.prototype.getOppositePosition=function(){'use strict';return ma.OPPOSITE[this.getPosition()];};ma.prototype.invalidate=function(){'use strict';this._valid=false;return this;};ma.prototype.getPosition=function(){'use strict';return this._position||'above';};ma.prototype.getAlignment=function(){'use strict';return this._alignment||'left';};ma.prototype.getOffsetX=function(){'use strict';var na=this._offsetX||0;if(!this.isVertical()){if(this._default._position!==this._position)na*=-1;}else if(this._default._alignment!==this._alignment)na*=-1;return na;};ma.prototype.getOffsetY=function(){'use strict';var na=this._offsetY||0;if(this.isVertical()&&this._default._position!==this._position)na*=-1;return na;};ma.prototype.getClassName=function(){'use strict';var na=this.getAlignment(),oa=this.getPosition();if(oa==='below'){if(na==='left'){return 'uiContextualLayerBelowLeft';}else if(na==='right'){return 'uiContextualLayerBelowRight';}else return 'uiContextualLayerBelowCenter';}else if(oa==='above'){if(na==='left'){return 'uiContextualLayerAboveLeft';}else if(na==='right'){return 'uiContextualLayerAboveRight';}else return 'uiContextualLayerAboveCenter';}else if(oa==='left'){return 'uiContextualLayerLeft';}else return 'uiContextualLayerRight';};ma.prototype.isValid=function(){'use strict';return this._valid;};ma.prototype.isVertical=function(){'use strict';return this.getPosition()==='above'||this.getPosition()==='below';};ma.prototype.reset=function(){'use strict';Object.assign(this,this._default);return this;};ma.prototype.setDefaultPosition=function(na){'use strict';var oa=this._default._position;this._default._position=ka(na);return oa!==na;};ma.prototype.setDefaultAlignment=function(na){'use strict';var oa=this._default._alignment;this._default._alignment=la(na);return oa!==na;};ma.prototype.setDefaultOffsetX=function(na){'use strict';var oa=this._default._offsetX;this._default._offsetX=na;return oa!==na;};ma.prototype.setArrowOffset=function(na){'use strict';var oa=this._default._arrowOffset;this._default._arrowOffset=na;return oa!==na;};ma.prototype.getArrowOffset=function(){'use strict';return this._default._arrowOffset||0;};ma.prototype.setDefaultOffsetY=function(na){'use strict';var oa=this._default._offsetY;this._default._offsetY=na;return oa!==na;};ma.OPPOSITE={above:'below',below:'above',left:'right',right:'left'};f.exports=ia;},null);
__d('ViewportBounds',['Arbiter','ArbiterMixin','DOM','Style','Vector','csx','emptyFunction','removeFromArray'],function a(b,c,d,e,f,g,h,i,j,k,l,m,n,o){if(c.__markCompiled)c.__markCompiled();var p={top:[],right:[],bottom:[],left:[]};function q(u){return function(){var v=0;p[u].forEach(function(w){v=Math.max(v,w.getSize());});return v;};}function r(u,v){return function(w){return new s(u,w,v);};}function s(u,v,w){this.getSide=n.thatReturns(u);this.getSize=function(){return typeof v==='function'?v():v;};this.isPersistent=n.thatReturns(w);p[u].push(this);t.inform('change');}s.prototype.remove=function(){o(p[this.getSide()],this);t.inform('change');};h.subscribe('page_transition',function(){for(var u in p)for(var v=p[u].length-1;v>=0;v--){var w=p[u][v];if(!w.isPersistent())w.remove();}});var t=babelHelpers._extends({getTop:q('top'),getRight:q('right'),getBottom:q('bottom'),getLeft:q('left'),getElementPosition:function(u){var v=l.getElementPosition(u);v.y-=t.getTop();return v;},addTop:r('top'),addRight:r('right'),addBottom:r('bottom'),addLeft:r('left'),addPersistentTop:r('top',true),addPersistentRight:r('right',true),addPersistentBottom:r('bottom',true),addPersistentLeft:r('left',true)},i);t.addPersistentTop(function(){var u=j.scry(document,"div._4f7n")[0];if(u&&k.isFixed(u)){var v=j.scry(document,"div._21mm")[0];return v?v.offsetHeight:0;}return 0;});f.exports=t;},null);
__d('ContextualLayerDimensions',['DOM','Locale','Rect','Vector','ViewportBounds','ge','getOverlayZIndex'],function a(b,c,d,e,f,g,h,i,j,k,l,m,n){if(c.__markCompiled)c.__markCompiled();var o={getViewportRect:function(p){var q=m('globalContainer'),r=p.getContext(),s=q&&h.contains(q,r)||n(r)<300,t=j.getViewportWithoutScrollbarsBounds();if(s){t.t+=l.getTop();if(i.isRTL()){t.r-=l.getLeft();t.l+=l.getRight();}else{t.r-=l.getRight();t.l+=l.getLeft();}}return t;},getLayerRect:function(p,q){var r=p.getContextBounds('viewport'),s=p.simulateOrientation(q,function(){return k.getElementDimensions(p.getContentRoot());}),t=r.t+q.getOffsetY();if(q.getPosition()==='above'){t-=s.y;}else if(q.getPosition()==='below')t+=r.b-r.t;var u=r.l+q.getOffsetX(),v=r.r-r.l;if(q.isVertical()){var w=q.getAlignment();if(w==='center'){u+=(v-s.x)/2;}else if(w==='right'!==i.isRTL()){u+=v-s.x+q.getArrowOffset();}else u-=q.getArrowOffset();}else if(q.getPosition()==='right'!==i.isRTL()){u+=v;}else u-=s.x;return new j(t,u+s.x,t+s.y,u,'viewport');}};f.exports=o;},null);
__d('ContextualLayerAutoFlip',['ContextualLayerDimensions','DOM','Vector','Rect','arrayContains'],function a(b,c,d,e,f,g,h,i,j,k,l){if(c.__markCompiled)c.__markCompiled();function m(o,p){p=new k(p).convertTo(o.domain);var q=Math.max(o.l,p.l),r=Math.min(o.r,p.r);return Math.max(r-q,0);}function n(o){'use strict';this._layer=o;}n.prototype.enable=function(){'use strict';this._subscription=this._layer.subscribe('adjust',this._adjustOrientation.bind(this));if(this._layer.isShown())this._layer.updatePosition();};n.prototype.disable=function(){'use strict';this._subscription.unsubscribe();this._subscription=null;if(this._layer.isShown())this._layer.updatePosition();};n.prototype._adjustOrientation=function(o,p){'use strict';var q=this.getValidPositions(p);if(!q.length){p.invalidate();return;}var r=h.getViewportRect(this._layer),s=this._getValidAlignments(p),t,u,v;for(t=0;t<s.length;t++){p.setAlignment(s[t]);for(u=0;u<q.length;u++){p.setPosition(q[u]);v=h.getLayerRect(this._layer,p);if(r.contains(v))return;}}p.setPosition(l(q,'below')?'below':q[0]);var w,x=0,y=0;for(t=0;t<s.length;t++){p.setAlignment(s[t]);v=h.getLayerRect(this._layer,p);w=m(r,v);if(w>y){y=w;x=t;}}p.setAlignment(s[x]);};n.prototype.getValidPositions=function(o){'use strict';var p=[o.getPosition(),o.getOppositePosition()],q=this._layer.getContextScrollParent();if(q===window||q===i.getDocumentScrollElement())return p;var r=this._layer.getContext(),s=j.getElementPosition(q,'viewport').y,t=j.getElementPosition(r,'viewport').y;if(o.isVertical()){return p.filter(function(v){if(v==='above'){return t>=s;}else{var w=s+q.offsetHeight,x=t+r.offsetHeight;return x<=w;}});}else{var u=s+q.offsetHeight;if(t>=s&&t+r.offsetHeight<=u){return p;}else return [];}};n.prototype._getValidAlignments=function(o){'use strict';var p=['left','right','center'],q=o.getAlignment(),r=p.indexOf(q);if(r>0){p.splice(r,1);p.unshift(q);}return p;};Object.assign(n.prototype,{_subscription:null});f.exports=n;},null);
__d('ContextualLayerHideOnScroll',['Event'],function a(b,c,d,e,f,g,h){if(c.__markCompiled)c.__markCompiled();function i(j){'use strict';this._layer=j;}i.prototype.enable=function(){'use strict';this._subscriptions=[this._layer.subscribe('contextchange',this._handleContextChange.bind(this)),this._layer.subscribe('show',this.attach.bind(this)),this._layer.subscribe('hide',this.detach.bind(this))];};i.prototype.disable=function(){'use strict';while(this._subscriptions.length)this._subscriptions.pop().unsubscribe();this.detach();};i.prototype.attach=function(){'use strict';if(this._listener)return;var j=this._layer.getContextScrollParent();if(j===window)return;this._listener=h.listen(j,'scroll',this._layer.hide.bind(this._layer));};i.prototype.detach=function(){'use strict';this._listener&&this._listener.remove();this._listener=null;};i.prototype._handleContextChange=function(){'use strict';this.detach();if(this._layer.isShown())this.attach();};Object.assign(i.prototype,{_subscriptions:[]});f.exports=i;},null);
__d('ContextualTypeaheadView',['BucketedTypeaheadView','CSS','ContextualLayer','ContextualLayerAutoFlip','ContextualLayerHideOnScroll','DOM','DOMDimensions','Style'],function a(b,c,d,e,f,g,h,i,j,k,l,m,n,o){if(c.__markCompiled)c.__markCompiled();var p,q;p=babelHelpers.inherits(r,h);q=p&&p.prototype;r.prototype.init=function(){'use strict';this.initializeLayer();q.init.call(this);};r.prototype.initializeLayer=function(){'use strict';this.context=this.getContext();this.wrapper=m.create('div');m.appendContent(this.wrapper,this.element);i.addClass(this.element,'uiContextualTypeaheadView');this.layer=new j({context:this.context,position:'below',alignment:this.alignment,causalElement:this.causalElement,permanent:true,shouldSetARIAProperties:false},this.wrapper);this.layer.enableBehavior(l);if(o.isFixed(this.context)||this.autoflip)this.layer.enableBehavior(k);this.subscribe('render',this.renderLayer.bind(this));};r.prototype.show=function(){'use strict';if(this.minWidth){o.set(this.wrapper,'min-width',this.minWidth+'px');}else if(this.width){o.set(this.wrapper,'width',this.width+'px');}else o.set(this.wrapper,'width',n.getElementDimensions(this.context).width+'px');var s=q.show.call(this);this.layer.show();this.inform('show');return s;};r.prototype.hide=function(){'use strict';this.layer.hide();this.inform('hide');return q.hide.call(this);};r.prototype.renderLayer=function(){'use strict';if(!this.isVisible())return;if(this.layer.isShown()){this.layer.updatePosition();}else this.layer.show();};r.prototype.clearText=function(){'use strict';this.layer.getCausalElement().value='';};r.prototype.getContext=function(){'use strict';return this.element.parentNode;};function r(){'use strict';p.apply(this,arguments);}f.exports=r;},null);
__d('DataSource',['ArbiterMixin','AsyncRequest','TokenizeUtil','SearchI18nMatch','createArrayFromMixed','createObjectFrom','emptyFunction','mixin','str2rstr'],function a(b,c,d,e,f,g,h,i,j,k,l,m,n,o,p){if(c.__markCompiled)c.__markCompiled();var q,r;q=babelHelpers.inherits(s,o(h));r=q&&q.prototype;function s(t){'use strict';r.constructor.call(this);this._maxResults=t.maxResults||10;this.token=t.token;this.queryData=t.queryData||{};this.queryEndpoint=t.queryEndpoint||'';this.bootstrapData=t.bootstrapData||{};this.bootstrapEndpoint=t.bootstrapEndpoint||'';this._indexedFields=t.indexedFields||['text','tokens'];this._titleFields=t.titleFields||[];this._alwaysPrefixMatch=t.alwaysPrefixMatch||false;this._deduplicationKey=t.deduplicationKey||null;this._enabledLocalCache=t.enabledLocalCache!=null?t.enabledLocalCache:true;this._enabledQueryCache=t.enabledQueryCache!=null?t.enabledQueryCache:true;this._disableAllCaches=t.disableAllCaches!=null?t.disableAllCaches:false;this._enabledMergeUids=t.enabledMergeUids!=null?t.enabledMergeUids:false;this._queryExactMatch=t.queryExactMatch||false;this._acrossTransitions=t.acrossTransitions||false;this._minQueryLength=t.minQueryLength||-1;this._enforceNewRequestIDUponFetch=t.enforceNewRequestIDUponFetch||false;this._minExactMatchLength=4;this._filters=[];this.setExclusions(t.exclusions);this.backendUnicodeMatch=new k({prefix_kana_hiragana_to_katakana:!!t.kanaNormalization});this.cacheUnicodeMatch=new k({prefix_kana_hiragana_to_katakana:!!t.kanaNormalization});}s.prototype.init=function(){'use strict';this.init=n;this._fields=m(this._indexedFields);this._activeQueries=0;this.dirty();};s.prototype.dirty=function(){'use strict';this.value='';this._bootstrapped=false;this._bootstrapping=false;this._data={};this.localCache={};this.queryCache={};this.queryIDs={};this.inform('dirty',{});return this;};s.prototype.bootstrap=function(){'use strict';var t=arguments.length<=0||arguments[0]===undefined?false:arguments[0];if(this._bootstrapped&&!t)return;this.bootstrapWithoutToken();this._bootstrapped=true;this._bootstrapping=true;this.inform('bootstrap',{bootstrapping:true});};s.prototype.bootstrapWithoutToken=function(){'use strict';this.fetch(this.bootstrapEndpoint,this.bootstrapData,{bootstrap:true,token:this.token});};s.prototype.bootstrapWithToken=function(){'use strict';var t=babelHelpers._extends({},this.bootstrapData);t.token=this.token;this.fetch(this.bootstrapEndpoint,t,{bootstrap:true,replaceCache:true,value:''});};s.prototype.query=function(t,u,v,w,x){'use strict';this.inform('beforeQuery',babelHelpers._extends({value:t,local_only:u,exclusions:v,time_waited:w},x));var y=Date.now();if(this._disableAllCaches){this.dirty();if(!t){this.bootstrap();return true;}}else if(!this._enabledQueryCache){this.queryCache={};this.queryIDs={};}var z=this.buildUids(t,[],v),aa=this.respond(t,z);this.value=t;this.inform('query',babelHelpers._extends({value:t,results:aa},x));var ba=this.tokenizeBackend(t).flatValue;if(u||!ba||this._isQueryTooShort(ba)||!this.queryEndpoint||this.getQueryCache().hasOwnProperty(ba)||!this.shouldFetchMoreResults(aa)){this.inform('logPerformanceTiming',babelHelpers._extends({field:'cache_keypress_render',value:Date.now()-y},x));this.inform('completeCacheFetch');return false;}this.inform('queryEndpoint',babelHelpers._extends({value:t},x));this.fetch(this.queryEndpoint,this.getQueryData(t,z),babelHelpers._extends({value:t,exclusions:v},x));return true;};s.prototype._isQueryTooShort=function(t){'use strict';return t.length<this._minQueryLength;};s.prototype._tokenize=function(t,u){'use strict';return j.parse(t,u);};s.prototype.tokenizeBackend=function(t,u){'use strict';t=this.backendUnicodeMatch.prefixMatchPrepare(t);return this._tokenize(t,u);};s.prototype.tokenizeCache=function(t,u){'use strict';t=this.cacheUnicodeMatch.prefixMatchPrepare(t);return this._tokenize(t,u);};s.prototype.shouldFetchMoreResults=function(t){'use strict';return t.length<this._maxResults;};s.prototype.getQueryData=function(t,u){'use strict';var v=babelHelpers._extends({value:t},this.queryData);u=u||[];if(u.length)v.existing_ids=u.join(',');if(this._bootstrapping)v.bsp=true;return v;};s.prototype.setQueryData=function(t,u){'use strict';if(u)this.queryData={};Object.assign(this.queryData,t);return this;};s.prototype.setBootstrapData=function(t,u){'use strict';if(u)this.bootstrapData={};Object.assign(this.bootstrapData,t);return this;};s.prototype.getExclusions=function(){'use strict';return l(this._exclusions);};s.prototype.setExclusions=function(t){'use strict';this._exclusions=t?t.map(String):[];};s.prototype.addFilter=function(t){'use strict';var u=this._filters;u.push(t);return {remove:function(){u.splice(u.indexOf(t),1);}};};s.prototype.clearFilters=function(){'use strict';this._filters=[];};s.prototype.notify=function(t,u,v,w){'use strict';var x=this.buildData(u);this.inform('notify',{value:t,results:x,isAsync:!!v,rootid:w});return x;};s.prototype.respond=function(t,u,v){'use strict';var w=this.buildData(u);this.processResults(t,w,v);this.inform('respond',{value:t,results:w,isAsync:!!v});return w;};s.prototype.respondWithResults=function(t,u,v){'use strict';this.processResults(t,u,v);this.inform('respond',{value:t,results:u,isAsync:!!v});return u;};s.prototype.processResults=function(t,u,v){'use strict';if(this.bootstrapData.alwaysShowEcho){var w=-1;for(var x=0;x<u.length;++x)if(u[x].text.toLowerCase()===t.toLowerCase()){w=x;break;}var y={};if(w===-1){y={bootstrapped:false,index:0,query:t,render_type:'hashtag',text:t,type:'hashtag',uid:this.getUniqueID()};u.map(function(z){z.index+=1;});u.unshift(y);}else if(w>0){y=u.splice(w,1)[0];u.unshift(y);u.map(function(z,aa){z.index=aa;});}}};s.prototype.getUniqueID=function(){'use strict';var t='_'+Math.random().toString(36).substr(2,9);while(this._data[t]!==undefined)t='_'+Math.random().toString(36).substr(2,9);return t;};s.prototype.fetch=function(t,u,v){'use strict';if(!t)return;if(this._enforceNewRequestIDUponFetch||u.request_id===undefined){u.request_id=this._guid();v.request_id=u.request_id;}var w=new i().setURI(t).setData(u).setMethod('GET').setReadOnly(true).setAllowCrossPageTransition(this._acrossTransitions).setHandler((function(x){this.fetchHandler(x,v||{});}).bind(this));if(t===this.queryEndpoint)w.setFinallyHandler((function(){this._activeQueries--;if(!this._activeQueries)this.inform('activity',{activity:false});}).bind(this));w.setErrorHandler((function(x){return this.asyncErrorHandler(x,v);}).bind(this));this.inform('beforeFetch',{request:w,fetch_context:v});w.send();if(t===this.queryEndpoint){if(!this._activeQueries)this.inform('activity',{activity:true});this._activeQueries++;}};s.prototype.fetchHandler=function(t,u){'use strict';var v=u.value,w=u.exclusions;if(t.getPayload().requestID!==undefined)u.request_id=t.getPayload().requestID;var x=this.getQueryIDs(),y=this.tokenizeBackend(v||'').flatValue;x[y]=u.request_id;if(!v&&u.replaceCache)this.localCache={};this.inform('buildQueryCache',{});var z=t.getPayload().entries;this.addEntries(z,v);this.inform('fetchComplete',{entries:z,response:t,value:v,fetch_context:u});var aa=!v&&this.value?this.value:v;this.respond(aa,this.buildUids(aa,[],w),true);if(!v){if(this._bootstrapping){this._bootstrapping=false;this.inform('bootstrap',{bootstrapping:false});}if(u.token&&t.getPayload().token!==u.token)this.bootstrapWithToken();}};s.prototype.addEntries=function(t,u){'use strict';var v=this.processEntries(l(t||[]),u),w=v;if(this._enabledMergeUids)w=this.buildUids(u,v);if(u){var x=this.getQueryCache(),y=this.tokenizeBackend(u).flatValue;x[y]=w;}else this.fillCache(w);return v;};s.prototype.processEntries=function(t,u){'use strict';return t.map(function(v,w){var x=v.uid=v.uid+'',y=this.getEntry(x);if(!y){y=v;y.query=u;y.bootstrapped=!u;this.setEntry(x,y);}else Object.assign(y,v);this.processEntry(y,u);y.index===undefined&&(y.index=w);return x;},this);};s.prototype.processEntry=function(t,u){'use strict';};s.prototype.getAllEntries=function(){'use strict';return this._data||{};};s.prototype.getEntry=function(t){'use strict';return this._data[t]||null;};s.prototype.setEntry=function(t,u){'use strict';this._data[t]=u;};s.prototype.fillCache=function(t){'use strict';if(!this._enabledLocalCache)return;var u=this.localCache;t.forEach(function(v){var w=this.getEntry(v);if(!w)return;var x=this.tokenizeCache(this.getTextToIndex(w)).tokens;for(var y=0,z=x.length;y<z;++y){var aa=x[y];if(!u.hasOwnProperty(aa))u[aa]={};u[aa][v]=true;}},this);};s.prototype.getTextToIndex=function(t){'use strict';if(t.textToIndex&&!t.needs_update)return t.textToIndex;t.needs_update=false;t.textToIndex=this.getTextToIndexFromFields(t,this._indexedFields);return t.textToIndex;};s.prototype.getTextToIndexFromFields=function(t,u){'use strict';var v=[];for(var w=0;w<u.length;++w){var x=t[u[w]];if(x)v.push(x.join?x.join(' '):x);}return v.join(' ');};s.prototype.mergeUids=function(t,u,v,w){'use strict';this.inform('mergeUids',{local_uids:t,query_uids:u,new_uids:v,value:w});this._checkExtendedMatch(w,t);return this.deduplicateByKey(t.sort(this.bootstrapSort.bind(this)).concat(u,v));};s.prototype.bootstrapSort=function(t,u){'use strict';var v=this.getEntry(t),w=this.getEntry(u);if(v.extended_match!==w.extended_match)return v.extended_match?1:-1;if(v.index!==w.index)return v.index-w.index;if(v.text.length!==w.text.length)return v.text.length-w.text.length;if(v.text===w.text)return v.uid<w.uid?-1:1;return v.text<w.text?-1:1;};s.prototype._checkExtendedMatch=function(t,u){'use strict';var v=this._alwaysPrefixMatch?j.isPrefixMatch:j.isQueryMatch;for(var w=0;w<u.length;++w){var x=this.getEntry(u[w]);x.extended_match=x.tokens?!v(t,x.text):false;}};s.prototype.buildUids=function(t,u,v){'use strict';if(!u)u=[];if(!t)return u;if(!v)v=[];var w=this.buildCacheResults(t,this.localCache),x=this.buildQueryResults(t),y=this.mergeUids(w,x,u,t),z=m(v.concat(this._exclusions)),aa=y.filter(function(ba){if(z.hasOwnProperty(ba)||!this.getEntry(ba))return false;for(var ca=0;ca<this._filters.length;++ca)if(!this._filters[ca](this.getEntry(ba),t))return false;return z[ba]=true;},this);return this.uidsIncludingExact(t,aa);};s.prototype.uidsIncludingExact=function(t,u){'use strict';var v=u.length;if(v<=this._maxResults||p(t).length<this._minExactMatchLength)return u;for(var w=0;w<v;++w){var x=this.getEntry(u[w]);x.text_lower||(x.text_lower=x.text.toLowerCase());if(x.text_lower===this.tokenizeCache(t).flatValue){if(w>=this._maxResults){var y=u.splice(w,1)[0];u.splice(this._maxResults-1,0,y);}break;}}return u;};s.prototype.buildData=function(t){'use strict';var u=[],v=Math.min(t.length,this._maxResults);for(var w=0;w<v;++w)u.push(this.getEntry(t[w]));return u;};s.prototype.findBestPreviousQuery=function(t,u){'use strict';var v=0,w=null;if(this._queryExactMatch)return u.hasOwnProperty(t)?t:null;for(var x in u)if(t.indexOf(x)===0&&x.length>v){v=x.length;w=x;}return w;};s.prototype.findQueryCache=function(t){'use strict';var u=this.findBestPreviousQuery(t,this.getQueryCache());return this.getQueryCache()[u]||[];};s.prototype.buildQueryResults=function(t){'use strict';var u=this.tokenizeBackend(t).flatValue,v=this.findQueryCache(u);if(this.getQueryCache().hasOwnProperty(u))return v;var w=this.filterQueryResults(u,v);return w;};s.prototype.filterQueryResults=function(t,u){'use strict';var v=this._alwaysPrefixMatch?j.isPrefixMatch:j.isQueryMatch;return u.filter(function(w){return v(t,this.getTextToIndex(this.getEntry(w)));},this);};s.prototype.buildCacheResults=function(t,u){'use strict';var v=this.tokenizeCache(t,this._alwaysPrefixMatch),w=this._alwaysPrefixMatch?v.sortedTokens:v.tokens,x=w.length,y=v.isPrefixQuery?x-1:null,z={},aa={},ba={},ca=[],da=false,ea={},fa=0;for(var ga=0;ga<x;++ga){var ha=w[ga];if(!ea.hasOwnProperty(ha)){fa++;ea[ha]=true;}else continue;for(var ia in u)if(!z.hasOwnProperty(ia)&&ia===ha||(this._alwaysPrefixMatch||y===ga)&&this.cacheUnicodeMatch.prefixMatch(ia,ha)){if(ia===ha){if(aa.hasOwnProperty(ia))da=true;z[ia]=true;}else{if(z.hasOwnProperty(ia)||aa.hasOwnProperty(ia))da=true;aa[ia]=true;}for(var ja in u[ia])if(ga===0||ba.hasOwnProperty(ja)&&ba[ja]==fa-1)ba[ja]=fa;}}for(var ka in ba)if(ba[ka]==fa)ca.push(ka);if(da||fa<x)ca=this.filterQueryResults(t,ca);if(this._titleFields&&this._titleFields.length>0)ca=this.filterNonTitleMatchQueryResults(t,ca);return ca;};s.prototype.filterNonTitleMatchQueryResults=function(t,u){'use strict';return u.filter(function(v){var w=this.tokenizeCache(t),x=w.tokens.length;if(x===0)return true;var y=this.getTitleTerms(this.getEntry(v)),z=w.tokens[0];return x===1||this._alwaysPrefixMatch?j.isPrefixMatch(z,y)||this.cacheUnicodeMatch.prefixMatch(y,z):j.isQueryMatch(z,y);},this);};s.prototype.getTitleTerms=function(t){'use strict';if(!t.titleToIndex)t.titleToIndex=this.getTextToIndexFromFields(t,this._titleFields);return t.titleToIndex;};s.prototype.deduplicateByKey=function(t){'use strict';if(!this._deduplicationKey)return t;var u=m(t.map(this._getDeduplicationKey.bind(this)),t);return t.filter((function(v){return u[this._getDeduplicationKey(v)]==v;}).bind(this));};s.prototype._getDeduplicationKey=function(t){'use strict';var u=this.getEntry(t);if(u[this._deduplicationKey]){return u[this._deduplicationKey]+'';}else return '__'+t+'__';};s.prototype.getQueryCache=function(){'use strict';return this.queryCache;};s.prototype.getQueryIDs=function(){'use strict';return this.queryIDs;};s.prototype.setMaxResults=function(t){'use strict';this._maxResults=t;this.value&&this.respond(this.value,this.buildUids(this.value));};s.prototype.getMaxResults=function(){'use strict';return this._maxResults;};s.prototype.updateToken=function(t){'use strict';this.token=t;this.dirty();return this;};s.prototype._guid=function(){'use strict';var t=Date.now(),u='xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'.replace(/[xy]/g,function(v){var w=Math.floor((t+Math.random()*16)%16);t=Math.floor(t/16);var x=(v=='x'?w:w&7|8).toString(16);return x;});return u;};Object.assign(s.prototype,{events:['bootstrap','query','respond'],asyncErrorHandler:n});f.exports=s;},null);
__d('Typeahead',['ArbiterMixin','BehaviorsMixin','DataStore','DOM','Event','Parent','Run','Style','emptyFunction','ge','mixin'],function a(b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r){if(c.__markCompiled)c.__markCompiled();var s,t;s=babelHelpers.inherits(u,r(h,i));t=s&&s.prototype;function u(v,w,x,y){'use strict';t.constructor.call(this);this.args={data:v,view:w,core:x};j.set(y,'Typeahead',this);this.element=y;}u.prototype.init=function(v){'use strict';this.init=p;this.getCore();this.getView().setAccessibilityControlElement(this.getCore().getElement());this.proxyEvents();this.initBehaviors(v||[]);this.inform('init',this);this.data.bootstrap();this.core.focus();};u.prototype.getData=function(){'use strict';if(!this.data){var v=this.args.data;this.data=v;this.data.init();}return this.data;};u.prototype.getView=function(){'use strict';if(!this.view){var v=this.args.view,w=v.node||q(v.node_id);if(!w){w=k.create('div',{className:'uiTypeaheadView'});k.appendContent(this.element,w);}if(typeof v.ctor==='string'){this.view=new window[v.ctor](w,v.options||{});}else this.view=new v.ctor(w,v.options||{});this.view.init();this.view.setTypeahead(this.element);}return this.view;};u.prototype.getCore=function(){'use strict';if(!this.core){var v=this.args.core;if(typeof v.ctor==='string'){this.core=new window[v.ctor](v.options||{});}else this.core=new v.ctor(v.options||{});this.core.init(this.getData(),this.getView(),this.getElement());}return this.core;};u.prototype.getElement=function(){'use strict';return this.element;};u.prototype.setHeight=function(v){'use strict';if(v!=='auto')v=v+'px';o.set(this.element,'height',v);};u.prototype.swapData=function(v){'use strict';return this.$Typeahead1(v,true);};u.prototype.swapDataNoCoreReset=function(v){'use strict';return this.$Typeahead1(v,false);};u.prototype.$Typeahead1=function(v,w){'use strict';var x=this.core;this.data=this.args.data=v;v.init();if(x){x.data=v;x.initData();if(w)x.reset();this.proxyEvents();}v.bootstrap();return v;};u.prototype.proxyEvents=function(){'use strict';[this.data,this.view,this.core].forEach(function(v){v.subscribe(v.events,this.inform.bind(this));},this);};u.prototype.initBehaviors=function(v){'use strict';v.forEach(function(w){if(typeof w==='string'){if(b.TypeaheadBehaviors&&b.TypeaheadBehaviors[w]){b.TypeaheadBehaviors[w](this);}else n.onLoad((function(){if(b.TypeaheadBehaviors)(b.TypeaheadBehaviors[w]||p)(this);}).bind(this));}else this.enableBehavior(w);},this);};u.getInstance=function(v){'use strict';var w=m.byClass(v,'uiTypeahead');return w?j.get(w,'Typeahead'):null;};u.initNow=function(v,w,x){'use strict';if(x)x.init(v);v.init(w);};u.init=function(v,w,x,y){'use strict';if(!k.isNodeOfType(v,['input','textarea']))v=k.scry(v,'input')[0]||k.scry(v,'textarea')[0];var z=false;try{z=document.activeElement===v;}catch(aa){}if(z){u.initNow(w,x,y);}else var ba=l.listen(v,'focus',function(){u.initNow(w,x,y);ba.remove();});};f.exports=u;},null);
__d('StickyPlaceholderInput',['Event','CSS','DOM','Input','Parent','emptyFunction','getElementText'],function a(b,c,d,e,f,g,h,i,j,k,l,m,n){if(c.__markCompiled)c.__markCompiled();function o(s){return l.byClass(s,'uiStickyPlaceholderInput');}function p(s){return j.scry(s,'.placeholder')[0];}function q(s){s=s||window.event;var t=s.target||s.srcElement;if(j.isNodeOfType(t,['input','textarea'])){var u=o(t);if(u)setTimeout(function(){i.conditionClass(u,'uiStickyPlaceholderEmptyInput',!t.value.length);},0);}}var r={init:function(){r.init=m;h.listen(document.documentElement,{keydown:q,paste:q,focusout:q});},registerInput:function(s){r.init();var t=s.getAttribute('placeholder')||'';if(t.length)if(document.activeElement===s){var u=h.listen(s,'blur',function(){r.manipulateInput(s,t);u.remove();});}else r.manipulateInput(s,t);},manipulateInput:function(s,t){var u=j.create('div',{className:'placeholder','aria-hidden':'true'},t),v=j.create('div',{className:'uiStickyPlaceholderInput'},u);if(j.isNodeOfType(s,'textarea'))i.addClass(v,'uiStickyPlaceholderTextarea');h.listen(u,'click',function(){s.focus();});if(s.value===t)s.value='';s.setAttribute('placeholder','');j.replace(s,v);j.appendContent(v,s);i.conditionClass(v,'uiStickyPlaceholderEmptyInput',!s.value.length);},setPlaceholderText:function(s,t){var u=o(s);if(!u){k.setPlaceholder(s,t);}else{var v=p(u);v&&j.setContent(v,t);}},getPlaceholderText:function(s){var t=o(s),u=p(t);return u&&n(u);},update:function(s){var t=o(s);if(t)i.conditionClass(t,'uiStickyPlaceholderEmptyInput',!s.value.length);},getVisibleText:function(s){var t=o(s);if(i.hasClass(t,'uiStickyPlaceholderEmptyInput')){var u=p(t);return u&&n(u);}else return s.value;}};f.exports=r;},null);
__d('TypeaheadCore',['Arbiter','ArbiterMixin','CSS','DOM','Event','Focus','Input','InputSelection','Keys','StickyPlaceholderInput','UserAgent_DEPRECATED','bind','emptyFunction','mixin'],function a(b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u){if(c.__markCompiled)c.__markCompiled();var v,w;v=babelHelpers.inherits(x,u(i));w=v&&v.prototype;function x(y){'use strict';w.constructor.call(this);Object.assign(this,y);}x.prototype.init=function(y,z,aa){'use strict';this.init=t;this.data=y;this.view=z;this.root=aa;this.initInput();this.inputWrap=k.find(aa,'div.wrap');this.hiddenInput=k.find(aa,'input.hiddenInput');this.value='';this.nextQuery=null;this.selectedText=null;if(this.setValueOnSelect&&j.hasClass(this.inputWrap,'selected'))this.selectedText=this.getValue();this.initView();this.initData();this.initEvents();this.initToggle();this._exclusions=[];};x.prototype.initInput=function(){'use strict';this.element=k.find(this.root,'.textInput');var y=k.scry(this.element,'input')[0];if(y)this.element=y;};x.prototype.initView=function(){'use strict';this.view.subscribe('highlight',m.set.bind(null,this.element));this.view.subscribe('select',(function(y,z){this.select(z.selected);}).bind(this));this.view.subscribe('afterSelect',(function(){this.afterSelect();}).bind(this));};x.prototype.initData=function(){'use strict';this.data.subscribe('notify',(function(y,z){if(this.root.id==z.rootid&&!this.element.disabled&&z.value==this.getValue())this.view.render(z.value,z.results,z.isAsync);}).bind(this));this.data.subscribe('respond',(function(y,z){if(z.forceDisplay||z.value==this.getValue()&&!this.element.disabled&&(this.element.getAttribute('singlestate')!=='true'||z.nullState))this.view.render(z.value,z.results,z.isAsync);}).bind(this));this.data.subscribe('activity',(function(y,z){this.fetching=z.activity;if(!this.fetching)this.nextQuery&&this.performQuery();if(this.loading!=this.fetching){this.loading=this.fetching;this.inform('loading',{loading:this.loading});}}).bind(this));};x.prototype.initEvents=function(){'use strict';l.listen(this.view.getElement(),{mouseup:this.viewMouseup.bind(this),mousedown:this.viewMousedown.bind(this)});var y={blur:s(this,'blur'),focus:s(this,'focus'),click:s(this,'click'),keyup:s(this,'keyup'),keydown:s(this,'keydown'),keypress:s(this,'keypress')};if(r.firefox())y.input=y.keyup;l.listen(this.element,y);};x.prototype.initToggle=function(){'use strict';this.subscribe('blur',this.view.hide.bind(this.view));this.subscribe('focus',this.view.show.bind(this.view));};x.prototype.viewMousedown=function(){'use strict';this.selecting=true;};x.prototype.viewMouseup=function(){'use strict';this.selecting=false;};x.prototype.blur=function(){'use strict';if(this.selecting){this.selecting=false;return;}this.inform('blur');};x.prototype.click=function(){'use strict';var y=o.get(this.element);if(y.start==y.end)this.element.select();this.inform('click');};x.prototype.focus=function(){'use strict';this.checkValue();this.inform('focus');};x.prototype.keyup=function(){'use strict';if(this.resetOnKeyup&&!this.getValue())this.view.reset();this.checkValue();if(this.getValue().length===0)this.inform('change',null);};x.prototype.keydown=function(event){'use strict';if(!this.view.isVisible()||this.view.isEmpty()){setTimeout(this.checkValue.bind(this),0);return;}switch(l.getKeyCode(event)){case p.TAB:this.handleTab(event);return;case p.UP:this.view.prev();break;case p.DOWN:this.view.next();break;case p.ESC:this.view.reset();break;default:setTimeout(this.checkValue.bind(this),0);return;}event.kill();};x.prototype.keypress=function(event){'use strict';if(this.view.getSelection()&&l.getKeyCode(event)==p.RETURN){this.view.select();event.kill();}};x.prototype.handleTab=function(event){'use strict';if(this.preventFocusChangeOnTab)if(this.view.getSelection()){event.kill();}else event.prevent();this.view.select();};x.prototype.select=function(y){'use strict';if(y&&this.setValueOnSelect){var z=y.orig_text||y.text;this.setValue(z);this.setHiddenValue(y.uid);this.selectedText=z;j.addClass(this.inputWrap,'selected');}};x.prototype.afterSelect=function(){'use strict';this.keepFocused?m.set(this.element):this.element.blur();if(!this.noResetAfterSelect)this.resetOnSelect?this.reset():this.view.reset();};x.prototype.unselect=function(){'use strict';if(this.setValueOnSelect){this.selectedText=null;j.removeClass(this.inputWrap,'selected');}this.setHiddenValue();this.inform('unselect',this);};x.prototype.setEnabled=function(y){'use strict';var z=y===false;this.element.disabled=z;j.conditionClass(this.root,'uiTypeaheadDisabled',z);};x.prototype.reset=function(){'use strict';this.unselect();this.setValue();!this.keepFocused&&n.reset(this.element);this.view.reset();this.inform('reset');};x.prototype.getElement=function(){'use strict';return this.element;};x.prototype.setExclusions=function(y){'use strict';this._exclusions=y.map(String);};x.prototype.getExclusions=function(){'use strict';return this._exclusions;};x.prototype.setValue=function(y){'use strict';this.value=this.nextQuery=y||'';n.setValue(this.element,this.value);q.update(this.element);this.inform('change',y);};x.prototype.setHiddenValue=function(y){'use strict';this.hiddenInput.value=y||y===0?y:'';h.inform('Form/change',{node:this.hiddenInput});};x.prototype.getValue=function(){'use strict';return n.getValue(this.element);};x.prototype.getHiddenValue=function(){'use strict';return this.hiddenInput.value||'';};x.prototype.checkValue=function(){'use strict';var y=this.getValue();if(y==this.value)return;if(this.selectedText&&this.selectedText!=y)this.unselect();var z=Date.now(),aa=z-this.time;this.time=z;this.value=this.nextQuery=y;this.performQuery(aa);};x.prototype.performQuery=function(y){'use strict';if(this.selectedText)return;y=y||0;if(this.fetching&&y<this.queryTimeout){this.data.query(this.nextQuery,true,this._exclusions,y);}else{this.data.query(this.nextQuery,false,this._exclusions,y);this.nextQuery=null;}};x.prototype.updateHeight=function(){'use strict';};Object.assign(x.prototype,{events:['blur','focus','click','unselect','loading'],keepFocused:true,resetOnSelect:false,resetOnKeyup:true,setValueOnSelect:false,noResetAfterSelect:false,queryTimeout:250,preventFocusChangeOnTab:false});f.exports=x;},null);
__d('PluginFlyoutDialog',['Arbiter','DOMEvent','DOMEventListener','PluginFlyout'],function a(b,c,d,e,f,g,h,i,j,k){if(c.__markCompiled)c.__markCompiled();function l(m,n,o){this.parent=new k(m,n,o);this.flyout=m;h.subscribe(k.SHOW,this.show.bind(this),h.SUBSCRIBE_NEW);}Object.assign(l.prototype,{show:function(){if(this.subscribed)return;this.subscribed=1;var m=window.ServerJSAsyncLoader;m&&m.ondemandjs&&m.run(m.ondemandjs);j.add(this.flyout.parentNode,'click',(function(n){n=new i(n);if(n.target===this.flyout.parentNode){n.kill();this.parent.hide();}}).bind(this));}});f.exports=l;},null);
__d('TypeaheadBestName',['FamilyMentionsData','TokenizeUtil'],function a(b,c,d,e,f,g,h,i){if(c.__markCompiled)c.__markCompiled();function j(k){'use strict';this._typeahead=k;}j.prototype.enable=function(){'use strict';var k=this._typeahead.getView(),l=this._getAvailableAlternateNameFields();this._subscription=k.subscribe('beforeRender',(function(m,n){var o=n.value;for(var p=0;p<n.results.length;++p){var q=n.results[p],r=this._getNameToDisplay(q,o,l);if(r!==null){q.text=r;if(q.hasOwnProperty('default_name')&&q.text!==q.default_name){q.subtext=q.default_name;}else q.subtext=null;}}}).bind(this));};j.prototype.disable=function(){'use strict';this._typeahead.getView().unsubscribe(this._subscription);this._subscription=null;};j.prototype._getNameToDisplay=function(k,l,m){'use strict';if(k.hasOwnProperty('default_name')&&i.isQueryMatch(l,k.default_name))return k.default_name;for(var n=0;n<m.length;n++){var o=k[m[n]];if(o==undefined)continue;for(var p=0;p<o.length;p++){var q=o[p];if(i.isQueryMatch(l,q))return q;}}if(k.hasOwnProperty('default_name'))return k.default_name;return null;};j.prototype._getAvailableAlternateNameFields=function(){'use strict';var k=['alternate_names'];if(h.allowFamilyNames)k.push('family_names');return k;};Object.assign(j.prototype,{_subscription:null});f.exports=j;},null);
__d('legacy:BestNameTypeaheadBehavior',['TypeaheadBestName'],function a(b,c,d,e,f,g,h){if(c.__markCompiled)c.__markCompiled();if(!b.TypeaheadBehaviors)b.TypeaheadBehaviors={};b.TypeaheadBehaviors.buildBestAvailableNames=function(i){i.enableBehavior(h);};},3);
__d('MentionsInputMatchers',[],function a(b,c,d,e,f,g){if(c.__markCompiled)c.__markCompiled();var h=['@','\\uff20'].join(''),i=['#','\\uFF03'].join(''),j='.,+*?$|#{}()\\^\\-\\[\\]\\\\\/!%\'"~=<>_:;\n\r',k=j.replace('#','')+'&',l='\u200B';function m(p,q){'use strict';this.$Matchers1=p;this.$Matchers2=q;this.$Matchers3();}m.prototype.$Matchers3=function(){'use strict';var p=this.$Matchers4(this.$Matchers2),q=this.$Matchers5(this.$Matchers1,this.$Matchers2),r=this.$Matchers6(this.$Matchers1,q),s=this.$Matchers7(p,r),t=this.$Matchers8(p);this.$Matchers9=new RegExp('['+this.$Matchers1+']$');this.$Matchers10=new RegExp(r+'$');this.$Matchers11=new RegExp(t+'$');this.$Matchers12=new RegExp(s+'$');this.$Matchers13=new RegExp('['+i+']');};m.prototype.$Matchers4=function(p){'use strict';return '\\b[A-Z][^ A-Z'+p+l+']';};m.prototype.$Matchers5=function(p,q){'use strict';return '(?:[^'+p+q+']|['+q+'][^ '+q+'])';};m.prototype.$Matchers6=function(p,q){'use strict';return '(?:^|\\s)(['+p+']('+q+'{0,20}))';};m.prototype.$Matchers7=function(p,q){'use strict';return '(?:(?:^|[^#])('+p+'+)|'+q+')';};m.prototype.$Matchers8=function(p){'use strict';return '(?:'+p+'{4,})';};m.prototype.getMainMatcher=function(){'use strict';return this.$Matchers10;};m.prototype.getTriggerMatcher=function(){'use strict';return this.$Matchers9;};m.prototype.getAutoMatcher=function(){'use strict';return this.$Matchers12;};m.prototype.getHashtagMatcher=function(){'use strict';return this.$Matchers13;};var n='\\b[A-Z][^ A-Z'+j+']',o={mentionsMatchers:new m(h,j),hashtagMatchers:new m(i,k),userMatcher:new RegExp('(?:'+n+'{4,})'+'$')};f.exports=o;},null);
__d('MentionsInput',['Arbiter','ArbiterMixin','Bootloader','CSS','DataStore','DOM','Event','FbtResult','FlipDirection','Input','InputSelection','Keys','MentionsInputMatchers','Parent','Style','TokenizeUtil','UserAgent_DEPRECATED','htmlize','mixin','removeFromArray','cx'],function a(b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z,aa,ba){if(c.__markCompiled)c.__markCompiled();var ca,da,ea='\u200B',fa=new RegExp(ea,'g'),ga=function(qa){return qa+ea;},ha='\uFFFD',ia=/@+\[[0-9]+\:([^\]]|\\\])*\]+/g,ja=/[\\\]:]/g,ka={MENTIONS:'mentions',HASHTAGS:'hashtags'};function la(qa,ra){return qa.replace(ra,' '.repeat(ra.length));}function ma(qa,ra){return qa.substring(0,ra)+qa.substring(ra+1);}function na(qa){var ra=qa.lastIndexOf('>');if(ra>=0){var sa=qa.indexOf(' ',ra);return sa>=0?qa.substr(0,sa+1):qa;}else return '';}function oa(qa,ra,sa){var ta=sa.lastIndexOf('<',ra)>sa.lastIndexOf('>',ra);return ta?' ':'&nbsp;<wbr />';}ca=babelHelpers.inherits(pa,z(i));da=ca&&ca.prototype;function pa(qa,ra,sa,ta,ua,va){'use strict';da.constructor.call(this);l.set(qa,'MentionsInput',this);this._root=qa;this._typeahead=ra;this._input=sa;this._offsets=[];var wa=null,xa=this.init.bind(this,ta,ua,va);try{wa=document.activeElement===this._input;}catch(ya){}if(wa){setTimeout(xa,0);}else var za=n.listen(this._input,'focus',function(){setTimeout(xa,0);za.remove();});this._hasHashtags=ta.hashtags;this._hashtagsDataSource=ta.hashtags_data_source;this._mentionsDataSource=this._typeahead.getData();this._currentDataSource=this._mentionsDataSource;this._autoSuggestPages=ta.autosuggest_pages;this._lastHighlighterHTML='';this._hashtags=[];this._matchers=t.mentionsMatchers;this._setMatchersMode(ka.MENTIONS);}pa.prototype.init=function(qa,ra,sa){'use strict';if(this._initialized)return;this._initValue=ra?ra.value:'';this._initialized=true;this._highlighter=m.find(this._root,'.highlighter');this._highlighterInner=this._highlighter.firstChild;this._highlighterContent=m.find(this._root,'.highlighterContent');this._hiddenInput=m.find(this._root,'.mentionsHidden');this._placeholder=this._input.getAttribute('placeholder')||'';this._metrics=sa;if(!this._hiddenInput.name){var ta=this._input.name;this._input.name=ta+'_text';this._hiddenInput.name=ta;}this._initEvents();this._initTypeahead();if(ra===null){this._setup();}else this.reset(ra);this.inform('init',null,h.BEHAVIOR_STATE);};pa.prototype._setup=function(){'use strict';this._mentioned={};this._orderedUIDs=[];this._numMentioned=0;this._filterData=null;this._highlighterContent&&m.empty(this._highlighterContent);this._highlighterAuxContent&&m.remove(this._highlighterAuxContent);this._highlighterAuxContent=null;q.setPlaceholder(this._input,this._placeholder);v.set(this._typeahead.getElement(),'height','auto');};pa.prototype.reset=function(qa){'use strict';if(!this._initialized)return;this._setup();var ra=qa&&qa.value||'';this._value=ra;this._hiddenInput&&(this._hiddenInput.value=ra);if(this._input&&qa)q.setValue(this._input,qa.value);var sa=qa&&qa.mentions;if(sa&&sa.length){var ta=[];sa.forEach(function(ua){ta.push(ua.offset+ua.length);delete ua.offset;delete ua.length;this._addToken(ua);},this);ta.reverse().forEach(function(ua){ra=ra.substring(0,ua)+ea+ra.substring(ua);});}q.setValue(this._input,ra);if(this._value==='')p.setDirection(this._input);this._update();};pa.prototype.getValue=function(){'use strict';return q.getValue(this._input).replace(fa,'');};pa.prototype._getMarkedValue=function(){'use strict';return q.getValueRaw(this._input);};pa.prototype.getRawValue=function(){'use strict';this._update();return q.getValue(this._hiddenInput);};pa.prototype.checkValue=function(){'use strict';var qa=this._typeahead.getCore().getValue();if(this._matchers.getTriggerMatcher().exec(qa)||qa==='')this.inform('sessionEnd',{});};pa.prototype.getTypeahead=function(){'use strict';return this._typeahead;};pa.prototype.hasChanges=function(){'use strict';return !q.isEmpty(this._input)&&this._input.value!==this._initValue&&this._initialized;};pa.prototype.focus=function(){'use strict';this._input.focus();};pa.prototype._initEvents=function(){'use strict';var qa=this._update.bind(this);n.listen(this._input,{input:qa,keyup:qa,change:qa,blur:this._handleBlur.bind(this),focus:this._handleFocus.bind(this),keydown:this._handleKeydown.bind(this)});if(this._metrics){this._metrics.init(this._typeahead);this._metrics._reset();this._metrics.bindSessionStart(this._typeahead,'render',true);this._metrics.bindSessionEnd(this._typeahead.getView(),'select',true);this._metrics.bindSessionEnd(this,'sessionEnd',false);n.listen(this._input,'keyup',(function(event){setTimeout(this.checkValue.bind(this),0);}).bind(this));}};pa.prototype._initTypeahead=function(){'use strict';this._typeahead.subscribe('select',(function(va,wa){var xa=wa.selected;this._addToken({uid:xa.uid,text:xa.text,type:xa.type,weakreference:xa.weak_reference});this.updateValue();}).bind(this));var qa=this._input,ra=null;function sa(){if(ra===null){ra=q.getSubmitOnEnter(qa);q.setSubmitOnEnter(qa,false);}}function ta(){if(ra!==null){q.setSubmitOnEnter(qa,ra);ra=null;}}this._typeahead.subscribe('reset',ta);this._typeahead.subscribe('render',sa);this._typeahead.subscribe('highlight',function(va,wa){wa.index>=0?sa():ta();});this._typeahead.subscribe('query',(function(){this._filterData=null;}).bind(this));var ua=this._typeahead.getCore();ua.suffix=ea;this._handleFocus();};pa.prototype._handleBlur=function(){'use strict';if(this._filterToken){this._filterToken.remove();this._filterToken=null;}};pa.prototype._handleFocus=function(){'use strict';if(!this._filterToken)this._filterToken=this._typeahead.getData().addFilter(this._filterResults.bind(this));this._updateWidth();};pa.prototype._handleKeydown=function(event){'use strict';var qa=event.keyCode;if(qa==s.BACKSPACE||qa==s.DELETE)this._handleBackspaceAndDelete(event,qa);if(qa==s.LEFT||qa==s.RIGHT)setTimeout(this._handleLeftAndRight.bind(this,qa),10);};pa.prototype._handleLeftAndRight=function(qa){'use strict';var ra=this._getMarkedValue(),sa=r.get(this._input),ta=sa.start,ua=sa.end,va=qa==s.LEFT,wa=qa==s.RIGHT;if(ta==ua){var xa=va?-1:1;if(ra.charAt(ta)==ea)r.set(this._input,ta+xa);}else if(va&&ra.charAt(ta)==ea){r.set(this._input,ta-1,ua);}else if(va&&ra.charAt(ua)==ea){r.set(this._input,ta,ua-1);}else if(wa&&ra.charAt(ua)==ea){r.set(this._input,ta,ua+1);}else if(wa&&ra.charAt(ta)==ea)r.set(this._input,ta+1,ua);};pa.prototype._handleBackspaceAndDelete=function(event,qa){'use strict';var ra=r.get(this._input),sa=false;if(ra.start!==ra.end)if(this._offsetIsInsideMention(ra.start+1)&&this._offsetIsInsideMention(ra.end)){sa=qa===s.BACKSPACE;}else return;var ta=qa===s.DELETE?1:-1,ua=ta+(sa?ra.end:ra.start),va=this._getMarkedValue(),wa=va;for(var xa=0;xa<this._orderedUIDs.length;++xa){var ya=this._mentioned[this._orderedUIDs[xa]],za=ya.text,ab=ga(za),bb=wa.indexOf(ab),cb=bb+ab.length;if(ua<bb||ua>=cb){wa=la(wa,ab);continue;}var db,eb;if(ya.type!='user'){db=0;eb=[za];}else{db=ab.substring(0,ua-bb).split(' ').length-1;eb=za.split(' ');}var fb=eb.splice(db,1)[0],gb=eb.join(' '),hb=db===0?bb:cb-fb.length-1;if(gb){ya.text=gb;gb=ga(gb);}else this._removeToken(ya.uid);var ib=va.substring(0,bb)+gb+va.substring(cb);q.setValue(this._input,ib);r.set(this._input,hb);this._update();event.kill();break;}};pa.prototype._offsetIsInsideMention=function(qa){'use strict';for(var ra=0;ra<this._offsets.length;ra++)if(qa>this._offsets[ra][0]&&qa<=this._offsets[ra][1])return true;return false;};pa.prototype._filterResults=function(qa){'use strict';if(this._filterData===null){var ra=r.get(this._input).start;if(this._offsetIsInsideMention(ra)){this._filterData={caretIsInsideMention:true};return false;}var sa=this._typeahead.getCore();this._filterData={value:sa.getValue(),rawValue:sa.getRawValue()};}if(this._filterData.caretIsInsideMention)return false;if(this._matchers.getMainMatcher().test(this._filterData.rawValue))return true;if(qa.type!='user'&&!qa.connected_page)return false;if(qa.disable_autosuggest)return false;if(this._matchersMode===ka.MENTIONS&&t.userMatcher.test(this._filterData.value))return true;return w.isExactMatch(this._filterData.value,this._typeahead.getData().getTextToIndex(qa));};pa.prototype._addToken=function(qa){'use strict';var ra=qa.uid;if(!this._mentioned.hasOwnProperty(ra)){this._mentioned[ra]=qa;var sa=this._orderedUIDs,ta=this._getMarkedValue().replace(ia,ha),ua=ta.indexOf(ga(this._mentioned[ra].text)),va=false,wa=0;for(var xa=0;xa<sa.length;++xa){var ya=ga(this._mentioned[sa[xa]].text),za=ta.indexOf(ya,wa);wa=za+ya.length;if(ua<za){this._orderedUIDs.splice(xa,0,ra);va=true;break;}}if(!va)this._orderedUIDs.push(ra);this._numMentioned++;this._update();}};pa.prototype._removeToken=function(qa){'use strict';if(this._mentioned.hasOwnProperty(qa)){delete this._mentioned[qa];aa(this._orderedUIDs,qa);this._numMentioned--;this._update();}};pa.prototype._update=function(qa){'use strict';qa=qa||{};var ra=this._getMarkedValue();this._checkShouldSwapDataSource(ra);if(ra==this._value)return;this._value=ra;this._updateTypeahead();this._updateMentions();this._updateWidth();setTimeout(this._updateDirection.bind(this),0);this.updateValue();var sa=this.hasAuxContent();this.inform('valueUpdate',{value:ra,hasAuxContent:sa});};pa.prototype._updateMentions=function(){'use strict';this._offsets=[];var qa=this._getMarkedValue(),ra=qa;for(var sa=0;sa<this._orderedUIDs.length;++sa){var ta=this._orderedUIDs[sa],ua=ga(this._mentioned[ta].text),va=ra.indexOf(ua);if(va==-1)this._removeToken(ta);ra=la(ra,ua);this._offsets.push([va,va+ua.length]);}var wa=qa;while((va=ra.indexOf(ea))>-1){wa=ma(wa,va);ra=ma(ra,va);}if(qa!==wa){var xa=r.get(this._input);q.setValue(this._input,wa);r.set(this._input,xa.start);this._value=wa;}};pa.prototype._renderHashtags=function(qa){'use strict';this._initHashtagParser(qa);if(!this._hasHashtags||!this._hashtagParser)return y(qa);this._hashtags=this._hashtagParser.parse(qa);var ra=[],sa=0;for(var ta=0;ta<this._hashtags.length;ta++){var ua=this._hashtags[ta];ra.push(y(qa.substring(sa,ua.rawOffset)),'<b>',ua.marker,ua.tag,'</b>');sa=ua.rawOffset+ua.marker.length+ua.tag.length;}ra.push(y(qa.substring(sa)));return ra.join('');};pa.prototype.updateValue=function(){'use strict';var qa=this._value=this._getMarkedValue(),ra=this._orderedUIDs,sa=qa.replace(ia,ha);for(var ta=0;ta<ra.length;++ta){var ua='@['+ra[ta]+':]',va=ga(this._mentioned[ra[ta]].text);sa=sa.replace(va,ua);qa=qa.replace(va,ua);}var wa=this._renderHashtags(qa);for(var ta=0;ta<ra.length;++ta){var xa=ra[ta],ya=this._mentioned[xa],za=ya.text,ab=ya.weakreference?'<b class="weak">':'<b>';wa=wa.replace('@['+xa+':]',ab+y(ga(za))+'</b>');za=za.replace(ja,function(cb){return '\\'+cb;});sa=sa.replace('@['+xa+':]','@['+xa+':'+za+']');}var bb=na(wa);if(this._highlighterAuxContent||bb!==this._lastHighlighterHTML){if(x.ie()<9)wa=wa.replace(/ /g,oa);this._highlighterContent.innerHTML=wa;this._updateHighlighter();this._lastHighlighterHTML=bb;}this._hiddenInput.value=sa;this._updateHeight();};pa.prototype._updateDirection=function(){'use strict';var qa=v.get(this._input,'direction');if(qa==this._dir)return;this._dir=qa;v.set(this._highlighter,'direction',qa);if(qa=='rtl'){v.set(this._highlighter,'text-align','right');}else v.set(this._highlighter,'text-align','left');};pa.prototype._updateWidth=function(){'use strict';var qa=this._input.offsetWidth;if(qa===this._lastInputWidth)return;this._lastInputWidth=qa;var ra=v.getFloat.bind(null,this._input),sa=qa-ra('paddingLeft')-ra('paddingRight')-ra('borderLeftWidth')-ra('borderRightWidth');this._highlighterInner.style.width=Math.max(sa,0)+'px';};pa.prototype._updateHeight=function(){'use strict';if(this._highlighterAuxContent){var qa=this._highlighter.offsetHeight,ra=this._typeahead.getElement();if(qa>ra.offsetHeight){this._typeahead.setHeight(qa);h.inform('reflow');}}};pa.prototype._updateTypeahead=function(){'use strict';var qa=this._typeahead.getCore();qa.matcher=this._matchers.getAutoMatcher();qa.setExclusions(this._orderedUIDs);this.inform('update',{mentioned:this._mentioned});};pa.prototype.setPlaceholder=function(qa){'use strict';this._placeholder=qa instanceof o?qa.toString():qa;if(!this.hasAuxContent())q.setPlaceholder(this._input,this._placeholder);};pa.prototype._updateHighlighter=function(){'use strict';if(this._highlighterContent)k.conditionShow(this._highlighterContent,this._numMentioned>0||this.hasAuxContent()||this._hashtags.length);};pa.prototype.setAuxContent=function(qa){'use strict';if(this._highlighterContent){if(!this._highlighterAuxContent){this._highlighterAuxContent=m.create('span',{className:"highlighterAuxContent"});m.insertAfter(this._highlighterContent,this._highlighterAuxContent);}m.setContent(this._highlighterAuxContent,qa);if(qa){q.setPlaceholder(this._input,'');}else q.setPlaceholder(this._input,this._placeholder);this._value=null;this._update();this._updateHighlighter();this._updateHeight();}};pa.prototype.hasAuxContent=function(){'use strict';var qa=this.getAuxContentRoot();return qa&&k.shown(qa)&&qa.innerHTML.length>0;};pa.prototype.getAuxContentRoot=function(){'use strict';return this._highlighterAuxContent;};pa.prototype.addMention=function(qa,ra){'use strict';ra=typeof ra==='undefined'?true:ra;var sa=ra===false?'':' ',ta=this._getMarkedValue();if(ta!=='')ta+=' ';q.setValue(this._input,ta+ga(qa.text)+sa);this._addToken(qa);this._update();};pa.prototype.getMentions=function(){'use strict';return this._mentioned;};pa.prototype.bootloadHashtagParser=function(){'use strict';if(!this._hashtagParser)j.loadModules(["HashtagParser"],(function(qa){this._hashtagParser=qa;if(this._initialized){this._value=null;this._update();}}).bind(this));};pa.getInstance=function(qa){'use strict';var ra=u.byClass(qa,'uiMentionsInput');return ra?l.get(ra,'MentionsInput'):null;};pa.prototype._checkShouldSwapDataSource=function(qa){'use strict';this._initHashtagParser(qa);if(!this._hashtagsDataSource||!this._hashtagParser)return;var ra=this._isInsideHashtagToken(qa);if(this._matchersMode===ka.HASHTAGS&&!ra){this._setMatchersMode(ka.MENTIONS);this._swapData(this._mentionsDataSource);}else if(this._matchersMode===ka.MENTIONS&&ra){this._setMatchersMode(ka.HASHTAGS);this._swapData(this._hashtagsDataSource);}};pa.prototype._swapData=function(qa){'use strict';this._currentDataSource=qa;this._typeahead.swapDataNoCoreReset(this._currentDataSource);this._metrics.data=this._currentDataSource;this._metrics.initEvents();};pa.prototype._isInsideHashtagToken=function(qa){'use strict';this._hashtags=this._hashtagParser.parse(qa);var ra=r.get(this._input).start;for(var sa=0;sa<this._hashtags.length;sa++){var ta=this._hashtags[sa],ua=ta.offset;if(ra>=ua&&ra<=ua+ta.tag.length+1)return true;}return false;};pa.prototype._initHashtagParser=function(qa){'use strict';if(this._hashtagParser)return;if(this._matchers.getHashtagMatcher().exec(qa))this.bootloadHashtagParser();};pa.prototype._setMatchersMode=function(qa){'use strict';switch(qa){case ka.MENTIONS:this._matchers=t.mentionsMatchers;break;case ka.HASHTAGS:this._matchers=t.hashtagMatchers;break;default:throw new Error('MatchersMode enum is missing constant '+qa);}this._matchersMode=qa;};f.exports=pa;},null);
__d('legacy:MentionsInput',['MentionsInput'],function a(b,c,d,e){if(c.__markCompiled)c.__markCompiled();b.MentionsInput=c('MentionsInput');},3);
__d('TypeaheadAreaCore',['InputSelection','TextAreaControl','TypeaheadCore','emptyFunction'],function a(b,c,d,e,f,g,h,i,j,k){if(c.__markCompiled)c.__markCompiled();var l,m;l=babelHelpers.inherits(n,j);m=l&&l.prototype;function n(o){'use strict';m.constructor.call(this,o);this.matcher=new RegExp(this.matcher+'$');this.preventFocusChangeOnTab=true;}n.prototype.select=function(o){'use strict';m.select.call(this,o);var p=this.element.value,q=this.prefix+o.text+this.suffix;this.expandBounds(p,q);var r=p.substring(0,this.start),s=p.substring(this.end);this.element.value=r+q+s;h.set(this.element,r.length+q.length);};n.prototype.expandBounds=function(o,p){'use strict';o=o.toLowerCase();p=p.toLowerCase();var q,r,s,t,u=/\s/;r=o.substring(this.start,this.end);s=p.indexOf(r);q=this.start;while(q>=0&&s>=0){t=o.charAt(q-1);if(!t||u.test(t))this.start=q;r=t+r;s=p.indexOf(r);q--;}r=o.substring(this.start,this.end);s=p.indexOf(r);q=this.end;while(q<=o.length&&s>=0){t=o.charAt(q);if(!t||u.test(t))this.end=q;r=r+t;s=p.indexOf(r);q++;}};n.prototype.getRawValue=function(){'use strict';var o=h.get(this.element).start||0;return m.getValue.call(this).substring(0,o);};n.prototype.getValue=function(){'use strict';var o=this.matcher&&this.matcher.exec(this.getRawValue());if(!o)return '';var p=o[0],q=o.index+p.length;p=p.replace(/^\s/,'');var r=p.length;p=p.replace(/\s$/,'');var s=r-p.length;this.start=q-r;this.end=q+s;if(o[2]&&(o[2].charAt(0)==='#'||o[2].charAt(0)==='\\uFF03'))return o[2];return o[3]||o[1]||o[0];};n.prototype.updateHeight=function(){'use strict';var o=i.getInstance(this.element);o.updateHeight();};Object.assign(n.prototype,{prefix:'',suffix:', ',matcher:"\\b[^,]*",click:k});f.exports=n;},null);
__d('TypeaheadHoistFriends',[],function a(b,c,d,e,f,g){if(c.__markCompiled)c.__markCompiled();function h(i){'use strict';this._typeahead=i;}h.prototype.enable=function(){'use strict';var i=this._typeahead.getView();this._subscription=i.subscribe('beforeRender',function(j,k){var l=[],m=[],n=[];for(var o=0;o<k.results.length;++o){var p=k.results[o];if(p.type=='header'){n=n.concat(m,l);n.push(p);m=[];l=[];}else if(p.type=='user'&&p.bootstrapped){m.push(p);}else l.push(p);}k.results=n.concat(m,l);});};h.prototype.disable=function(){'use strict';this._typeahead.getView().unsubscribe(this._subscription);this._subscription=null;};Object.assign(h.prototype,{_subscription:null});f.exports=h;},null);
__d('legacy:HoistFriendsTypeaheadBehavior',['TypeaheadHoistFriends'],function a(b,c,d,e,f,g,h){if(c.__markCompiled)c.__markCompiled();if(!b.TypeaheadBehaviors)b.TypeaheadBehaviors={};b.TypeaheadBehaviors.hoistFriends=function(i){i.enableBehavior(h);};},3);
__d("QueriesHistory",[],function a(b,c,d,e,f,g){if(c.__markCompiled)c.__markCompiled();function h(i){"use strict";this.$QueriesHistory1=i;this.reset();}h.prototype.getQueries=function(){"use strict";return this.$QueriesHistory2;};h.prototype.getCurrentLength=function(){"use strict";return this.$QueriesHistory3;};h.prototype.add=function(i){"use strict";this.$QueriesHistory2.push(i);this.$QueriesHistory3+=i.length;while(this.$QueriesHistory2.length!==0&&this.$QueriesHistory3>this.$QueriesHistory1){var j=this.$QueriesHistory2.shift();this.$QueriesHistory3-=j.length;}};h.prototype.reset=function(){"use strict";this.$QueriesHistory3=0;this.$QueriesHistory2=[];};f.exports=h;},null);
__d('TypeaheadMetrics',['AsyncRequest','Event','QueriesHistory','emptyFunction'],function a(b,c,d,e,f,g,h,i,j,k){if(c.__markCompiled)c.__markCompiled();var l=1000;function m(n){'use strict';this.extraData={};Object.assign(this,n);}m.prototype.init=function(n){'use strict';this.init=k;this._initImpl(n);};m.prototype._initImpl=function(n){'use strict';this.core=n.getCore();this.view=n.getView();this.data=n.getData();this.queriesHistory=new j(l);this.stats={};this.sessionActive=false;this._sessionStartEvents=[];this._sessionEndEvents=[];this._reset();this.initEvents();};m.prototype._reset=function(){'use strict';this.log=[];this.stats={};this.avgStats={};this.sessionActive=false;this._setSid(Math.floor(Date.now()*Math.random()));this.request_ids=[];this.lastNotBackspacedQuery='';this.queriesHistory.reset();this._logEvent('session_started',{});};m.prototype._logEvent=function(n,o){'use strict';var p={type:n,data:o,time:Date.now()};this.log.push(p);};m.prototype._setSid=function(n){'use strict';this.sid=n;if(typeof this.data.queryData==='object'&&this.data.queryData!==null){this.data.queryData.sid=this.sid;}else this.data.setQueryData({sid:this.sid});if(typeof this.data.bootstrapData==='object'&&this.data.bootstrapData!==null){this.data.bootstrapData.sid=this.sid;}else this.data.setBootstrapData({sid:this.sid});};m.prototype.resetWithData=function(n){'use strict';this.init=k;this._initImpl(n);};m.prototype.resetWithDataBeforeSessionEnd=function(n){'use strict';var o=this.sessionActive;this.init=k;this._initImpl(n);this.sessionActive=o;};m.prototype.recordSelect=function(n){'use strict';var o=n.selected;if(o.uid==null){this.recordStat('selected_id','SELECT_NULL');}else this.recordStat('selected_id',o.uid);this.recordStat('selected_type',o.type);this.recordStat('selected_score',o.score);this.recordStat('selected_original_id',o.original_id);this.recordStat('place_id',o.place_id);this.recordStat('client_time',o.client_time);this.recordStat('selected_position',n.index);this.recordStat('selected_with_mouse',n.clicked?1:0);this.recordStat('selected_query',n.query);this._sessionEnd();};m.prototype.bindSessionStart=function(n,event,o){'use strict';if(o)for(var p=0;p<this._sessionStartEvents.length;++p){var q=this._sessionStartEvents[p];q.obj.unsubscribe(q.token);}this._sessionStartEvents.push({obj:n,token:n.subscribe(event,(function(r,s){this._sessionStart();}).bind(this))});};m.prototype.bindSessionEnd=function(n,event,o){'use strict';if(o)for(var p=0;p<this._sessionEndEvents.length;++p){var q=this._sessionEndEvents[p];q.obj.unsubscribe(q.token);}this._sessionEndEvents.push({obj:n,token:n.subscribe(event,(function(r,s){this._sessionEnd();}).bind(this))});};m.prototype.dataSubscribe=function(n,o){'use strict';var p=this.data,q=this.data.subscribe(n,o);this._dataSubscriptions.push(function(){p.unsubscribe(q);});};m.prototype.initEvents=function(){'use strict';this._dataSubscriptions=this._dataSubscriptions||[];this._dataSubscriptions.forEach(function(n){n();});this._dataSubscriptions=[];this.bindSessionStart(this.core,'focus',false);this.bindSessionEnd(this.core,'blur',false);this.view.subscribe('select',(function(n,o){this.recordSelect(o);}).bind(this));this.bindSessionEnd(this.view,'select',false);this.view.subscribe('render',(function(n,o){this.results=o;}).bind(this));this.dataSubscribe('beforeQuery',(function(n,o){this._logEvent('user_typed',{query:o.value});if(!o.value)return;this.query=o.value;this.queriesHistory.add(this.query);if(this.lastNotBackspacedQuery.indexOf(this.query)!==0)this.lastNotBackspacedQuery=this.query;this.recordCountStat('num_queries');}).bind(this));this.dataSubscribe('beforeFetch',(function(n,o){if(o.fetch_context.bootstrap){this.bootstrapBegin=Date.now();}else o.fetch_context.queryBegin=Date.now();this._logEvent('async_query_started',{query:o.fetch_context.value,request_id:o.fetch_context.request_id});}).bind(this));this.dataSubscribe('fetchComplete',(function(n,o){this._logEvent('async_query_completed',{query:o.fetch_context.value,request_id:o.fetch_context.request_id});if(o.fetch_context.bootstrap){this.recordAvgStat('bootstrap_latency',Date.now()-this.bootstrapBegin);var p={};o.response.payload.entries.forEach(function(q){if(!p[q.type]){p[q.type]=1;}else p[q.type]++;});this.recordStat('bootstrap_response_types',p);this.bootstrapped=true;}else{if('filtered_count' in o.response.payload)this.recordStat('filtered_count',o.response.payload.filtered_count);this.recordAvgStat('avg_query_latency',Date.now()-o.fetch_context.queryBegin);}}).bind(this));this.dataSubscribe('respond',(function(n,o){this._logEvent('respond',{query:o.value,num_results:o.results.length});var p=this.data.tokenizeBackend(o.value||'').flatValue,q=this.data.findBestPreviousQuery(p,this.data.getQueryIDs())||'',r=this.data.getQueryIDs()[q];this.normalized_backend_query=q;this.request_id=r;this.request_ids.push(r);}).bind(this));this.dataSubscribe('dirty',(function(n,o){this.bootstrapped=false;}).bind(this));};m.prototype._sessionStart=function(){'use strict';if(this.sessionActive)return;this.sessionActive=true;};m.prototype._sessionEnd=function(){'use strict';if(!this.sessionActive)return;this.sessionActive=false;this.submit();this._reset();};m.prototype.recordStat=function(n,o){'use strict';this.stats[n]=o;};m.prototype.recordCountStat=function(n){'use strict';var o=this.stats[n];this.stats[n]=o?o+1:1;};m.prototype.recordAvgStat=function(n,o){'use strict';if(this.avgStats[n]){this.avgStats[n][0]+=o;++this.avgStats[n][1];}else this.avgStats[n]=[o,1];};m.prototype.hasStats=function(){'use strict';return !!Object.keys(this.stats).length;};m.prototype.submit=function(){'use strict';if('log_all_sessions' in this.extraData||this.hasStats()){Object.assign(this.stats,this.extraData);if(this.results){var n=this.results.map(function(q,r){return q.uid;});this.recordStat('candidate_results',JSON.stringify(n));}if(this.query)this.recordStat('query',this.query);if(this.lastNotBackspacedQuery)this.recordStat('last_not_backspaced_query',this.lastNotBackspacedQuery);this.recordStat('queries_history',JSON.stringify(this.queriesHistory.getQueries()));if(this.normalized_backend_query)this.recordStat('normalized_backend_query',this.normalized_backend_query);if(this.request_id)this.recordStat('request_id',this.request_id);if(this.request_ids.length)this.recordStat('request_ids',this.request_ids);if(this.sid)this.recordStat('sid',this.sid);if(this.bootstrapped)this.recordStat('bootstrapped',1);for(var o in this.avgStats){var p=this.avgStats[o];this.stats[o]=p[0]/p[1];}this.recordStat('log',JSON.stringify(this.log));new h().setURI(this.endPoint).setMethod('POST').setData({stats:this.stats}).setErrorHandler(k).send();this._reset();}};m.register=function(n,o,p){'use strict';if(document.activeElement===n){o.init(p);}else var q=i.listen(n,'focus',function(){o.init(p);q.remove();});};Object.assign(m.prototype,{endPoint:'/ajax/typeahead/record_basic_metrics.php'});f.exports=m;},null);
__d('CompactTypeaheadRenderer',['BadgeHelper','DOM','TypeaheadFacepile','cx','fbt'],function a(b,c,d,e,f,g,h,i,j,k,l){if(c.__markCompiled)c.__markCompiled();function m(n,o){var p=[];if(n.xhp)return i.create('li',{className:'raw'},n.xhp);var q=n.photos||n.photo;if(q){if(q instanceof Array){q=j.render(q);}else q=i.create('img',{alt:'',src:q});p.push(q);}var r=n.debug_info;if(r)p.push(i.create('span',{className:'debugInfo'},r));if(n.text){var s=[n.text];if(n.is_verified){s.push(h.renderBadge('xsmall','verified'));}else if(n.is_work_user){s.push(h.renderBadge('xsmall','work'));}else if(n.is_trending_hashtag)s.push(h.renderBadge('xsmall','trending'));p.push(i.create('span',{className:'text'},s));}var t=n.subtext,u=n.category;if(t||u){var v=[];t&&v.push(t);t&&u&&v.push(" \u00b7 ");u&&v.push(u);p.push(i.create('span',{className:'subtext'},v));}var w=i.create('li',{className:n.type||''},p);if(n.text){w.setAttribute('title',n.text);w.setAttribute('aria-label',n.text);}return w;}m.className='compact';f.exports=m;},null);