text: /*!
   * jQuery JavaScript Library v1.11.2
   * http://jquery.com/
   *
   * Includes Sizzle.js
   * http://sizzlejs.com/
   *
   * Copyright 2005, 2014 jQuery Foundation, Inc. and other contributors
   * Released under the MIT license
   * http://jquery.org/license
   *
   * Date: 2014-12-17T15:27Z
   */
  (function(a,b){typeof module=="object"&&typeof module.exports=="object"?module.exports=a.document?b(a,!0):function(a){if(!a.document)throw new Error("jQuery requires a window with a document");return b(a)}:b(a)})(typeof window!="undefined"?window:this,function(
  a,b){function s(a){var b=a.length,c=n.type(a);return c==="function"||n.isWindow(a)?!1:a.nodeType===1&&b?!0:c==="array"||b===0||typeof b=="number"&&b>0&&b-1 in a}function x(a,b,c){if(n.isFunction(b))return n.grep(a,function(a,d){return!!b.call(a,d,a)!==c});
  if(b.nodeType)return n.grep(a,function(a){return a===b!==c});if(typeof b=="string"){if(w.test(b))return n.filter(b,a,c);b=n.filter(b,a)}return n.grep(a,function(a){return n.inArray(a,b)>=0!==c})}function E(a,b){do a=a[b];while(a&&a.nodeType!==1);return a}function H
  (a){var b=G[a]={};n.each(a.match(F)||[],function(_,a){b[a]=!0});return b}function J(){if(z.addEventListener){z.removeEventListener("DOMContentLoaded",K,!1);a.removeEventListener("load",K,!1)}else{z.detachEvent("onreadystatechange",K);a.detachEvent("onload"
  ,K)}}function K(){if(z.addEventListener||event.type==="load"||z.readyState==="complete"){J();n.ready()}}function P(a,b,c){if(c===undefined&&a.nodeType===1){var d="data-"+b.replace(O,"-$1").toLowerCase();c=a.getAttribute(d);if(typeof c=="string"){try{c=c==="true"?!0
  :c==="false"?!1:c==="null"?null:+c+""===c?+c:N.test(c)?n.parseJSON(c):c}catch(e){}n.data(a,b,c)}else c=undefined}return c}function Q(a){var b;for(b in a){if(b==="data"&&n.isEmptyObject(a[b]))continue;if(b!=="toJSON")return!1}return!0}function R(a,b,d,e){if(!
  n.acceptData(a))return;var f,g,i=n.expando,j=a.nodeType,k=j?n.cache:a,l=j?a[i]:a[i]&&i;if((!l||!k[l]||!e&&!k[l].data)&&d===undefined&&typeof b=="string")return;l||(j?l=a[i]=c.pop()||n.guid++:l=i);k[l]||(k[l]=j?{}:{toJSON:n.noop});if(typeof b=="object"||typeof 
  b=="function")e?k[l]=n.extend(k[l],b):k[l].data=n.extend(k[l].data,b);g=k[l];if(!e){g.data||(g.data={});g=g.data}d!==undefined&&(g[n.camelCase(b)]=d);if(typeof b=="string"){f=g[b];f==null&&(f=g[n.camelCase(b)])}else f=g;return f}function S(a,b,c){if(!n.acceptData
  (a))return;var d,e,f=a.nodeType,g=f?n.cache:a,i=f?a[n.expando]:n.expando;if(!g[i])return;if(b){d=c?g[i]:g[i].data;if(d){if(!n.isArray(b))if(b in d)b=[b];else{b=n.camelCase(b);b in d?b=[b]:b=b.split(" ")}else b=b.concat(n.map(b,n.camelCase));e=b.length;while(
  e--)delete d[b[e]];if(c?!Q(d):!n.isEmptyObject(d))return}}if(!c){delete g[i].data;if(!Q(g[i]))return}f?n.cleanData([a],!0):l.deleteExpando||g!=g.window?delete g[i]:g[i]=null}function db(){return!0}function eb(){return!1}function fb(){try{return z.activeElement
  }catch(a){}}function gb(a){var b=hb.split("|"),c=a.createDocumentFragment();if(c.createElement)while(b.length)c.createElement(b.pop());return c}function xb(a,b){var c,d,e=0,f=typeof a.getElementsByTagName!==L?a.getElementsByTagName(b||"*"):typeof a.querySelectorAll!==
  L?a.querySelectorAll(b||"*"):undefined;if(!f)for(f=[],c=a.childNodes||a;(d=c[e])!=null;e++)!b||n.nodeName(d,b)?f.push(d):n.merge(f,xb(d,b));return b===undefined||b&&n.nodeName(a,b)?n.merge([a],f):f}function yb(a){X.test(a.type)&&(a.defaultChecked=a.checked
  )}function zb(a,b){return n.nodeName(a,"table")&&n.nodeName(b.nodeType!==11?b:b.firstChild,"tr")?a.getElementsByTagName("tbody")[0]||a.appendChild(a.ownerDocument.createElement("tbody")):a}function Ab(a){a.type=(n.find.attr(a,"type")!==null)+"/"+a.type;return a
  }function Bb(a){var b=sb.exec(a.type);b?a.type=b[1]:a.removeAttribute("type");return a}function Cb(a,b){var c,d=0;for(;(c=a[d])!=null;d++)n._data(c,"globalEval",!b||n._data(b[d],"globalEval"))}function Db(a,b){if(b.nodeType!==1||!n.hasData(a))return;var c,
  d,e,f=n._data(a),g=n._data(b,f),i=f.events;if(i){delete g.handle;g.events={};for(c in i)for(d=0,e=i[c].length;d<e;d++)n.event.add(b,c,i[c][d])}g.data&&(g.data=n.extend({},g.data))}function Eb(a,b){var c,d,e;if(b.nodeType!==1)return;c=b.nodeName.toLowerCase
  ();if(!l.noCloneEvent&&b[n.expando]){e=n._data(b);for(d in e.events)n.removeEvent(b,d,e.handle);b.removeAttribute(n.expando)}if(c==="script"&&b.text!==a.text){Ab(b).text=a.text;Bb(b)}else if(c==="object"){b.parentNode&&(b.outerHTML=a.outerHTML);l.html5Clone&&
  a.innerHTML&&!n.trim(b.innerHTML)&&(b.innerHTML=a.innerHTML)}else if(c==="input"&&X.test(a.type)){b.defaultChecked=b.checked=a.checked;b.value!==a.value&&(b.value=a.value)}else if(c==="option")b.defaultSelected=b.selected=a.defaultSelected;else if(c==="input"||
  c==="textarea")b.defaultValue=a.defaultValue}function Hb(b,c){var d,e=n(c.createElement(b)).appendTo(c.body),f=a.getDefaultComputedStyle&&(d=a.getDefaultComputedStyle(e[0]))?d.display:n.css(e[0],"display");e.detach();return f}function Ib(a){var b=z,c=Gb[a]
  ;if(!c){c=Hb(a,b);if(c==="none"||!c){Fb=(Fb||n("<iframe frameborder='0' width='0' height='0'/>")).appendTo(b.documentElement);b=(Fb[0].contentWindow||Fb[0].contentDocument).document;b.write();b.close();c=Hb(a,b);Fb.detach()}Gb[a]=c}return c}function Ob(a,b
  ){return{get:function(){var c=a();if(c==null)return;if(c){delete this.get;return}return(this.get=b).apply(this,arguments)}}}function Xb(a,b){if(b in a)return b;var c=b.charAt(0).toUpperCase()+b.slice(1),d=b,e=Wb.length;while(e--){b=Wb[e]+c;if(b in a)return b
  }return d}function Yb(a,b){var c,d,e,f=[],g=0,i=a.length;for(;g<i;g++){d=a[g];if(!d.style)continue;f[g]=n._data(d,"olddisplay");c=d.style.display;if(b){!f[g]&&c==="none"&&(d.style.display="");d.style.display===""&&V(d)&&(f[g]=n._data(d,"olddisplay",Ib(d.nodeName
  )))}else{e=V(d);(c&&c!=="none"||!e)&&n._data(d,"olddisplay",e?c:n.css(d,"display"))}}for(g=0;g<i;g++){d=a[g];if(!d.style)continue;if(!b||d.style.display==="none"||d.style.display==="")d.style.display=b?f[g]||"":"none"}return a}function Zb(a,b,c){var d=Sb.exec
  (b);return d?Math.max(0,d[1]-(c||0))+(d[2]||"px"):b}function $b(a,b,c,d,e){var f=c===(d?"border":"content")?4:b==="width"?1:0,g=0;for(;f<4;f+=2){c==="margin"&&(g+=n.css(a,c+U[f],!0,e));if(d){c==="content"&&(g-=n.css(a,"padding"+U[f],!0,e));c!=="margin"&&(g-=
  n.css(a,"border"+U[f]+"Width",!0,e))}else{g+=n.css(a,"padding"+U[f],!0,e);c!=="padding"&&(g+=n.css(a,"border"+U[f]+"Width",!0,e))}}return g}function _b(a,b,c){var d=!0,e=b==="width"?a.offsetWidth:a.offsetHeight,f=Lb(a),g=l.boxSizing&&n.css(a,"boxSizing",!1
  ,f)==="border-box";if(e<=0||e==null){e=Mb(a,b,f);if(e<0||e==null)e=a.style[b];if(Kb.test(e))return e;d=g&&(l.boxSizingReliable()||e===a.style[b]);e=parseFloat(e)||0}return e+$b(a,b,c||(g?"border":"content"),d,f)+"px"}function ac(a,b,c,d,e){return new ac.prototype
  .init(a,b,c,d,e)}function ic(){setTimeout(function(){bc=undefined});return bc=n.now()}function jc(a,b){var c,d={height:a},e=0;b=b?1:0;for(;e<4;e+=2-b){c=U[e];d["margin"+c]=d["padding"+c]=a}b&&(d.opacity=d.width=a);return d}function kc(a,b,c){var d,e=(hc[b]||
  []).concat(hc["*"]),f=0,g=e.length;for(;f<g;f++)if(d=e[f].call(c,b,a))return d}function lc(a,b,c){var d,e,f,g,i,j,k,m,o=this,p={},q=a.style,r=a.nodeType&&V(a),s=n._data(a,"fxshow");if(!c.queue){i=n._queueHooks(a,"fx");if(i.unqueued==null){i.unqueued=0;j=i.
  empty.fire;i.empty.fire=function(){i.unqueued||j()}}i.unqueued++;o.always(function(){o.always(function(){i.unqueued--;n.queue(a,"fx").length||i.empty.fire()})})}if(a.nodeType===1&&("height"in b||"width"in b)){c.overflow=[q.overflow,q.overflowX,q.overflowY]
  ;k=n.css(a,"display");m=k==="none"?n._data(a,"olddisplay")||Ib(a.nodeName):k;m==="inline"&&n.css(a,"float")==="none"&&(!l.inlineBlockNeedsLayout||Ib(a.nodeName)==="inline"?q.display="inline-block":q.zoom=1)}if(c.overflow){q.overflow="hidden";l.shrinkWrapBlocks
  ()||o.always(function(){q.overflow=c.overflow[0];q.overflowX=c.overflow[1];q.overflowY=c.overflow[2]})}for(d in b){e=b[d];if(dc.exec(e)){delete b[d];f=f||e==="toggle";if(e===(r?"hide":"show")){if(e!=="show"||!s||s[d]===undefined)continue;r=!0}p[d]=s&&s[d]||
  n.style(a,d)}else k=undefined}if(!n.isEmptyObject(p)){s?"hidden"in s&&(r=s.hidden):s=n._data(a,"fxshow",{});f&&(s.hidden=!r);r?n(a).show():o.done(function(){n(a).hide()});o.done(function(){var b;n._removeData(a,"fxshow");for(b in p)n.style(a,b,p[b])});for(
  d in p){g=kc(r?s[d]:0,d,o);if(!(d in s)){s[d]=g.start;if(r){g.end=g.start;g.start=d==="width"||d==="height"?1:0}}}}else(k==="none"?Ib(a.nodeName):k)==="inline"&&(q.display=k)}function mc(a,b){var c,d,e,f,g;for(c in a){d=n.camelCase(c);e=b[d];f=a[c];if(n.isArray
  (f)){e=f[1];f=a[c]=f[0]}if(c!==d){a[d]=f;delete a[c]}g=n.cssHooks[d];if(g&&"expand"in g){f=g.expand(f);delete a[d];for(c in f)if(!(c in a)){a[c]=f[c];b[c]=e}}else b[d]=e}}function nc(a,b,c){var d,e,f=0,g=gc.length,i=n.Deferred().always(function(){delete j.
  elem}),j=function(){if(e)return!1;var b=bc||ic(),c=Math.max(0,k.startTime+k.duration-b),d=c/k.duration||0,f=1-d,g=0,j=k.tweens.length;for(;g<j;g++)k.tweens[g].run(f);i.notifyWith(a,[k,f,c]);if(f<1&&j)return c;i.resolveWith(a,[k]);return!1},k=i.promise({elem
  :a,props:n.extend({},b),opts:n.extend(!0,{specialEasing:{}},c),originalProperties:b,originalOptions:c,startTime:bc||ic(),duration:c.duration,tweens:[],createTween:function(b,c){var d=n.Tween(a,k.opts,b,c,k.opts.specialEasing[b]||k.opts.easing);k.tweens.push
  (d);return d},stop:function(b){var c=0,d=b?k.tweens.length:0;if(e)return this;e=!0;for(;c<d;c++)k.tweens[c].run(1);b?i.resolveWith(a,[k,b]):i.rejectWith(a,[k,b]);return this}}),l=k.props;mc(l,k.opts.specialEasing);for(;f<g;f++){d=gc[f].call(k,a,l,k.opts);if(
  d)return d}n.map(l,kc,k);n.isFunction(k.opts.start)&&k.opts.start.call(a,k);n.fx.timer(n.extend(j,{elem:a,anim:k,queue:k.opts.queue}));return k.progress(k.opts.progress).done(k.opts.done,k.opts.complete).fail(k.opts.fail).always(k.opts.always)}function Oc(
  a){return function(b,c){if(typeof b!="string"){c=b;b="*"}var d,e=0,f=b.toLowerCase().match(F)||[];if(n.isFunction(c))while(d=f[e++])if(d.charAt(0)==="+"){d=d.slice(1)||"*";(a[d]=a[d]||[]).unshift(c)}else(a[d]=a[d]||[]).push(c)}}function Pc(a,b,c,d){function g
  (i){var j;e[i]=!0;n.each(a[i]||[],function(_,a){var i=a(b,c,d);if(typeof i=="string"&&!f&&!e[i]){b.dataTypes.unshift(i);g(i);return!1}if(f)return!(j=i)});return j}var e={},f=a===Lc;return g(b.dataTypes[0])||!e["*"]&&g("*")}function Qc(a,b){var c,d,e=n.ajaxSettings
  .flatOptions||{};for(d in b)b[d]!==undefined&&((e[d]?a:c||(c={}))[d]=b[d]);c&&n.extend(!0,a,c);return a}function Rc(a,b,c){var d,e,f,g,i=a.contents,j=a.dataTypes;while(j[0]==="*"){j.shift();e===undefined&&(e=a.mimeType||b.getResponseHeader("Content-Type"))
  }if(e)for(g in i)if(i[g]&&i[g].test(e)){j.unshift(g);break}if(j[0]in c)f=j[0];else{for(g in c){if(!j[0]||a.converters[g+" "+j[0]]){f=g;break}d||(d=g)}f=f||d}if(f){f!==j[0]&&j.unshift(f);return c[f]}}function Sc(a,b,c,d){var e,f,g,i,j,k={},l=a.dataTypes.slice
  ();if(l[1])for(g in a.converters)k[g.toLowerCase()]=a.converters[g];f=l.shift();while(f){a.responseFields[f]&&(c[a.responseFields[f]]=b);!j&&d&&a.dataFilter&&(b=a.dataFilter(b,a.dataType));j=f;f=l.shift();if(f)if(f==="*")f=j;else if(j!=="*"&&j!==f){g=k[j+" "+
  f]||k["* "+f];if(!g)for(e in k){i=e.split(" ");if(i[1]===f){g=k[j+" "+i[0]]||k["* "+i[0]];if(g){if(g===!0)g=k[e];else if(k[e]!==!0){f=i[0];l.unshift(i[1])}break}}}if(g!==!0)if(g&&a["throws"])b=g(b);else try{b=g(b)}catch(m){return{state:"parsererror",error:
  g?m:"No conversion from "+j+" to "+f}}}}return{state:"success",data:b}}function Yc(a,b,c,d){var e;if(n.isArray(b))n.each(b,function(b,e){c||Uc.test(a)?d(a,e):Yc(a+"["+(typeof e=="object"?b:"")+"]",e,c,d)});else if(!c&&n.type(b)==="object")for(e in b)Yc(a+"["+
  e+"]",b[e],c,d);else d(a,b)}function ad(){try{return new a.XMLHttpRequest}catch(b){}}function bd(){try{return new a.ActiveXObject("Microsoft.XMLHTTP")}catch(b){}}function gd(a){return n.isWindow(a)?a:a.nodeType===9?a.defaultView||a.parentWindow:!1}var c=[]
  ,d=c.slice,e=c.concat,f=c.push,g=c.indexOf,i={},j=i.toString,k=i.hasOwnProperty,l={},m="1.11.2",n=function(a,b){return new n.fn.init(a,b)},o=/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,p=/^-ms-/,q=/-([\da-z])/gi,r=function(a,b){return b.toUpperCase()};n.fn=n.prototype=
  {jquery:m,constructor:n,selector:"",length:0,toArray:function(){return d.call(this)},get:function(a){return a!=null?a<0?this[a+this.length]:this[a]:d.call(this)},pushStack:function(a){var b=n.merge(this.constructor(),a);b.prevObject=this;b.context=this.context
  ;return b},each:function(a,b){return n.each(this,a,b)},map:function(a){return this.pushStack(n.map(this,function(b,c){return a.call(b,c,b)}))},slice:function(){return this.pushStack(d.apply(this,arguments))},first:function(){return this.eq(0)},last:function(
  ){return this.eq(-1)},eq:function(a){var b=this.length,c=+a+(a<0?b:0);return this.pushStack(c>=0&&c<b?[this[c]]:[])},end:function(){return this.prevObject||this.constructor(null)},push:f,sort:c.sort,splice:c.splice};n.extend=n.fn.extend=function(){var a,b,
  c,d,e,f,g=arguments[0]||{},i=1,j=arguments.length,k=!1;if(typeof g=="boolean"){k=g;g=arguments[i]||{};i++}typeof g!="object"&&!n.isFunction(g)&&(g={});if(i===j){g=this;i--}for(;i<j;i++)if((e=arguments[i])!=null)for(d in e){a=g[d];c=e[d];if(g===c)continue;if(
  k&&c&&(n.isPlainObject(c)||(b=n.isArray(c)))){if(b){b=!1;f=a&&n.isArray(a)?a:[]}else f=a&&n.isPlainObject(a)?a:{};g[d]=n.extend(k,f,c)}else c!==undefined&&(g[d]=c)}return g};n.extend({expando:"jQuery"+(m+Math.random()).replace(/\D/g,""),isReady:!0,error:function(
  a){throw new Error(a)},noop:function(){},isFunction:function(a){return n.type(a)==="function"},isArray:Array.isArray||function(a){return n.type(a)==="array"},isWindow:function(a){return a!=null&&a==a.window},isNumeric:function(a){return!n.isArray(a)&&a-parseFloat
  (a)+1>=0},isEmptyObject:function(a){var b;for(b in a)return!1;return!0},isPlainObject:function(a){var b;if(!a||n.type(a)!=="object"||a.nodeType||n.isWindow(a))return!1;try{if(a.constructor&&!k.call(a,"constructor")&&!k.call(a.constructor.prototype,"isPrototypeOf"
  ))return!1}catch(c){return!1}if(l.ownLast)for(b in a)return k.call(a,b);for(b in a);return b===undefined||k.call(a,b)},type:function(a){return a==null?a+"":typeof a=="object"||typeof a=="function"?i[j.call(a)]||"object":typeof a},globalEval:function(b){b&&
  n.trim(b)&&(a.execScript||function(b){a.eval.call(a,b)})(b)},camelCase:function(a){return a.replace(p,"ms-").replace(q,r)},nodeName:function(a,b){return a.nodeName&&a.nodeName.toLowerCase()===b.toLowerCase()},each:function(a,b,c){var d,e=0,f=a.length,g=s(a
  );if(c)if(g)for(;e<f;e++){d=b.apply(a[e],c);if(d===!1)break}else for(e in a){d=b.apply(a[e],c);if(d===!1)break}else if(g)for(;e<f;e++){d=b.call(a[e],e,a[e]);if(d===!1)break}else for(e in a){d=b.call(a[e],e,a[e]);if(d===!1)break}return a},trim:function(a){return a==
  null?"":(a+"").replace(o,"")},makeArray:function(a,b){var c=b||[];a!=null&&(s(Object(a))?n.merge(c,typeof a=="string"?[a]:a):f.call(c,a));return c},inArray:function(a,b,c){var d;if(b){if(g)return g.call(b,a,c);d=b.length;c=c?c<0?Math.max(0,d+c):c:0;for(;c<
  d;c++)if(c in b&&b[c]===a)return c}return-1},merge:function(a,b){var c=+b.length,d=0,e=a.length;while(d<c)a[e++]=b[d++];if(c!==c)while(b[d]!==undefined)a[e++]=b[d++];a.length=e;return a},grep:function(a,b,c){var d,e=[],f=0,g=a.length,i=!c;for(;f<g;f++){d=!
  b(a[f],f);d!==i&&e.push(a[f])}return e},map:function(a,b,c){var d,f=0,g=a.length,i=s(a),j=[];if(i)for(;f<g;f++){d=b(a[f],f,c);d!=null&&j.push(d)}else for(f in a){d=b(a[f],f,c);d!=null&&j.push(d)}return e.apply([],j)},guid:1,proxy:function(a,b){var c,e,f;if(typeof 
  b=="string"){f=a[b];b=a;a=f}if(!n.isFunction(a))return undefined;c=d.call(arguments,2);e=function(){return a.apply(b||this,c.concat(d.call(arguments)))};e.guid=a.guid=a.guid||n.guid++;return e},now:function(){return+(new Date)},support:l});n.each("Boolean Number String Function Array Date RegExp Object Error"
  .split(" "),function(a,b){i["[object "+b+"]"]=b.toLowerCase()});var t=function(a){function jb(a,b,d,e){var f,i,k,l,m,p,s,t,x,y;(b?b.ownerDocument||b:w)!==o&&n(b);b=b||o;d=d||[];l=b.nodeType;if(typeof a!="string"||!a||l!==1&&l!==9&&l!==11)return d;if(!e&&q)
  {if(l!==11&&(f=cb.exec(a)))if(k=f[1]){if(l===9){i=b.getElementById(k);if(!i||!i.parentNode)return d;if(i.id===k){d.push(i);return d}}else if(b.ownerDocument&&(i=b.ownerDocument.getElementById(k))&&u(b,i)&&i.id===k){d.push(i);return d}}else{if(f[2]){I.apply
  (d,b.getElementsByTagName(a));return d}if((k=f[3])&&c.getElementsByClassName){I.apply(d,b.getElementsByClassName(k));return d}}if(c.qsa&&(!r||!r.test(a))){t=s=v;x=b;y=l!==1&&a;if(l===1&&b.nodeName.toLowerCase()!=="object"){p=g(a);(s=b.getAttribute("id"))?t=
  s.replace(eb,"\\$&"):b.setAttribute("id",t);t="[id='"+t+"'] ";m=p.length;while(m--)p[m]=t+ub(p[m]);x=db.test(a)&&sb(b.parentNode)||b;y=p.join(",")}if(y)try{I.apply(d,x.querySelectorAll(y));return d}catch(z){}finally{s||b.removeAttribute("id")}}}return j(a.
  replace(S,"$1"),b,d,e)}function kb(){function b(c,e){a.push(c+" ")>d.cacheLength&&delete b[a.shift()];return b[c+" "]=e}var a=[];return b}function lb(a){a[v]=!0;return a}function mb(a){var b=o.createElement("div");try{return!!a(b)}catch(c){return!1}finally{
  b.parentNode&&b.parentNode.removeChild(b);b=null}}function nb(a,b){var c=a.split("|"),e=a.length;while(e--)d.attrHandle[c[e]]=b}function ob(a,b){var c=b&&a,d=c&&a.nodeType===1&&b.nodeType===1&&(~b.sourceIndex||D)-(~a.sourceIndex||D);if(d)return d;if(c)while(
  c=c.nextSibling)if(c===b)return-1;return a?1:-1}function pb(a){return function(b){var c=b.nodeName.toLowerCase();return c==="input"&&b.type===a}}function qb(a){return function(b){var c=b.nodeName.toLowerCase();return(c==="input"||c==="button")&&b.type===a}
  }function rb(a){return lb(function(b){b=+b;return lb(function(c,d){var e,f=a([],c.length,b),g=f.length;while(g--)c[e=f[g]]&&(c[e]=!(d[e]=c[e]))})})}function sb(a){return a&&typeof a.getElementsByTagName!="undefined"&&a}function tb(){}function ub(a){var b=0
  ,c=a.length,d="";for(;b<c;b++)d+=a[b].value;return d}function vb(a,b,c){var d=b.dir,e=c&&d==="parentNode",f=y++;return b.first?function(b,c,f){while(b=b[d])if(b.nodeType===1||e)return a(b,c,f)}:function(b,c,g){var i,j,k=[x,f];if(g){while(b=b[d])if(b.nodeType===1||
  e)if(a(b,c,g))return!0}else while(b=b[d])if(b.nodeType===1||e){j=b[v]||(b[v]={});if((i=j[d])&&i[0]===x&&i[1]===f)return k[2]=i[2];j[d]=k;if(k[2]=a(b,c,g))return!0}}}function wb(a){return a.length>1?function(b,c,d){var e=a.length;while(e--)if(!a[e](b,c,d))return!1
  ;return!0}:a[0]}function xb(a,b,c){var d=0,e=b.length;for(;d<e;d++)jb(a,b[d],c);return c}function yb(a,b,c,d,e){var f,g=[],i=0,j=a.length,k=b!=null;for(;i<j;i++)if(f=a[i])if(!c||c(f,d,e)){g.push(f);k&&b.push(i)}return g}function zb(a,b,c,d,e,f){d&&!d[v]&&(
  d=zb(d));e&&!e[v]&&(e=zb(e,f));return lb(function(f,g,i,j){var k,l,m,n=[],o=[],p=g.length,q=f||xb(b||"*",i.nodeType?[i]:i,[]),r=a&&(f||!b)?yb(q,n,a,i,j):q,s=c?e||(f?a:p||d)?[]:g:r;c&&c(r,s,i,j);if(d){k=yb(s,o);d(k,[],i,j);l=k.length;while(l--)if(m=k[l])s[o
  [l]]=!(r[o[l]]=m)}if(f){if(e||a){if(e){k=[];l=s.length;while(l--)(m=s[l])&&k.push(r[l]=m);e(null,s=[],k,j)}l=s.length;while(l--)(m=s[l])&&(k=e?K(f,m):n[l])>-1&&(f[k]=!(g[k]=m))}}else{s=yb(s===g?s.splice(p,s.length):s);e?e(null,g,s,j):I.apply(g,s)}})}function Ab
  (a){var b,c,e,f=a.length,g=d.relative[a[0].type],i=g||d.relative[" "],j=g?1:0,l=vb(function(a){return a===b},i,!0),m=vb(function(a){return K(b,a)>-1},i,!0),n=[function(a,c,d){var e=!g&&(d||c!==k)||((b=c).nodeType?l(a,c,d):m(a,c,d));b=null;return e}];for(;j<
  f;j++)if(c=d.relative[a[j].type])n=[vb(wb(n),c)];else{c=d.filter[a[j].type].apply(null,a[j].matches);if(c[v]){e=++j;for(;e<f;e++)if(d.relative[a[e].type])break;return zb(j>1&&wb(n),j>1&&ub(a.slice(0,j-1).concat({value:a[j-2].type===" "?"*":""})).replace(S,"$1"
  ),c,j<e&&Ab(a.slice(j,e)),e<f&&Ab(a=a.slice(e)),e<f&&ub(a))}n.push(c)}return wb(n)}function Bb(a,b){var c=b.length>0,e=a.length>0,f=function(f,g,i,j,l){var m,n,p,q=0,r="0",s=f&&[],t=[],u=k,v=f||e&&d.find.TAG("*",l),w=x+=u==null?1:Math.random()||.1,y=v.length
  ;l&&(k=g!==o&&g);for(;r!==y&&(m=v[r])!=null;r++){if(e&&m){n=0;while(p=a[n++])if(p(m,g,i)){j.push(m);break}l&&(x=w)}if(c){(m=!p&&m)&&q--;f&&s.push(m)}}q+=r;if(c&&r!==q){n=0;while(p=b[n++])p(s,t,g,i);if(f){if(q>0)while(r--)!s[r]&&!t[r]&&(t[r]=G.call(j));t=yb
  (t)}I.apply(j,t);l&&!f&&t.length>0&&q+b.length>1&&jb.uniqueSort(j)}if(l){x=w;k=u}return s};return c?lb(f):f}var b,c,d,e,f,g,i,j,k,l,m,n,o,p,q,r,s,t,u,v="sizzle"+1*new Date,w=a.document,x=0,y=0,z=kb(),A=kb(),B=kb(),C=function(a,b){a===b&&(m=!0);return 0},D=1<<31
  ,E={}.hasOwnProperty,F=[],G=F.pop,H=F.push,I=F.push,J=F.slice,K=function(a,b){var c=0,d=a.length;for(;c<d;c++)if(a[c]===b)return c;return-1},L="checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped"
  ,M="[\\x20\\t\\r\\n\\f]",N="(?:\\\\.|[\\w-]|[^\\x00-\\xa0])+",O=N.replace("w","w#"),P="\\["+M+"*("+N+")(?:"+M+"*([*^$|!~]?=)"+M+"*(?:'((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\"|("+O+"))|)"+M+"*\\]",Q=":("+N+")(?:\\(("+"('((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\")|"+"((?:\\\\.|[^\\\\()[\\]]|"+
  P+")*)|"+".*"+")\\)|)",R=new RegExp(M+"+","g"),S=new RegExp("^"+M+"+|((?:^|[^\\\\])(?:\\\\.)*)"+M+"+$","g"),T=new RegExp("^"+M+"*,"+M+"*"),U=new RegExp("^"+M+"*([>+~]|"+M+")"+M+"*"),V=new RegExp("="+M+"*([^\\]'\"]*?)"+M+"*\\]","g"),W=new RegExp(Q),X=new RegExp
  ("^"+O+"$"),Y={ID:new RegExp("^#("+N+")"),CLASS:new RegExp("^\\.("+N+")"),TAG:new RegExp("^("+N.replace("w","w*")+")"),ATTR:new RegExp("^"+P),PSEUDO:new RegExp("^"+Q),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+M+"*(even|odd|(([+-]|)(\\d*)n|)"+
  M+"*(?:([+-]|)"+M+"*(\\d+)|))"+M+"*\\)|)","i"),bool:new RegExp("^(?:"+L+")$","i"),needsContext:new RegExp("^"+M+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+M+"*((?:-\\d)?\\d*)"+M+"*\\)|)(?=[^-]|$)","i")},Z=/^(?:input|select|textarea|button)$/i,ab=/^h\d$/i
  ,bb=/^[^{]+\{\s*\[native \w/,cb=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,db=/[+~]/,eb=/'|\\/g,fb=new RegExp("\\\\([\\da-f]{1,6}"+M+"?|("+M+")|.)","ig"),gb=function(_,a,b){var c="0x"+a-65536;return c!==c||b?a:c<0?String.fromCharCode(c+65536):String.fromCharCode(c>>10|55296
  ,c&1023|56320)},hb=function(){n()};try{I.apply(F=J.call(w.childNodes),w.childNodes);F[w.childNodes.length].nodeType}catch(ib){I={apply:F.length?function(a,b){H.apply(a,J.call(b))}:function(a,b){var c=a.length,d=0;while(a[c++]=b[d++]);a.length=c-1}}}c=jb.support=
  {};f=jb.isXML=function(a){var b=a&&(a.ownerDocument||a).documentElement;return b?b.nodeName!=="HTML":!1};n=jb.setDocument=function(a){var b,e,g=a?a.ownerDocument||a:w;if(g===o||g.nodeType!==9||!g.documentElement)return o;o=g;p=g.documentElement;e=g.defaultView
  ;e&&e!==e.top&&(e.addEventListener?e.addEventListener("unload",hb,!1):e.attachEvent&&e.attachEvent("onunload",hb));q=!f(g);c.attributes=mb(function(a){a.className="i";return!a.getAttribute("className")});c.getElementsByTagName=mb(function(a){a.appendChild(
  g.createComment(""));return!a.getElementsByTagName("*").length});c.getElementsByClassName=bb.test(g.getElementsByClassName);c.getById=mb(function(a){p.appendChild(a).id=v;return!g.getElementsByName||!g.getElementsByName(v).length});if(c.getById){d.find.ID=
  function(a,b){if(typeof b.getElementById!="undefined"&&q){var c=b.getElementById(a);return c&&c.parentNode?[c]:[]}};d.filter.ID=function(a){var b=a.replace(fb,gb);return function(a){return a.getAttribute("id")===b}}}else{delete d.find.ID;d.filter.ID=function(
  a){var b=a.replace(fb,gb);return function(a){var c=typeof a.getAttributeNode!="undefined"&&a.getAttributeNode("id");return c&&c.value===b}}}d.find.TAG=c.getElementsByTagName?function(a,b){if(typeof b.getElementsByTagName!="undefined")return b.getElementsByTagName
  (a);if(c.qsa)return b.querySelectorAll(a)}:function(a,b){var c,d=[],e=0,f=b.getElementsByTagName(a);if(a==="*"){while(c=f[e++])c.nodeType===1&&d.push(c);return d}return f};d.find.CLASS=c.getElementsByClassName&&function(a,b){if(q)return b.getElementsByClassName
  (a)};s=[];r=[];if(c.qsa=bb.test(g.querySelectorAll)){mb(function(a){p.appendChild(a).innerHTML="<a id='"+v+"'></a>"+"<select id='"+v+"-\f]' msallowcapture=''>"+"<option selected=''></option></select>";a.querySelectorAll("[msallowcapture^='']").length&&r.push
  ("[*^$]="+M+"*(?:''|\"\")");a.querySelectorAll("[selected]").length||r.push("\\["+M+"*(?:value|"+L+")");a.querySelectorAll("[id~="+v+"-]").length||r.push("~=");a.querySelectorAll(":checked").length||r.push(":checked");a.querySelectorAll("a#"+v+"+*").length||
  r.push(".#.+[+~]")});mb(function(a){var b=g.createElement("input");b.setAttribute("type","hidden");a.appendChild(b).setAttribute("name","D");a.querySelectorAll("[name=d]").length&&r.push("name"+M+"*[*^$|!~]?=");a.querySelectorAll(":enabled").length||r.push
  (":enabled",":disabled");a.querySelectorAll("*,:x");r.push(",.*:")})}(c.matchesSelector=bb.test(t=p.matches||p.webkitMatchesSelector||p.mozMatchesSelector||p.oMatchesSelector||p.msMatchesSelector))&&mb(function(a){c.disconnectedMatch=t.call(a,"div");t.call
  (a,"[s!='']:x");s.push("!=",Q)});r=r.length&&new RegExp(r.join("|"));s=s.length&&new RegExp(s.join("|"));b=bb.test(p.compareDocumentPosition);u=b||bb.test(p.contains)?function(a,b){var c=a.nodeType===9?a.documentElement:a,d=b&&b.parentNode;return a===d||!!
  d&&d.nodeType===1&&!!(c.contains?c.contains(d):a.compareDocumentPosition&&a.compareDocumentPosition(d)&16)}:function(a,b){if(b)while(b=b.parentNode)if(b===a)return!0;return!1};C=b?function(a,b){if(a===b){m=!0;return 0}var d=!a.compareDocumentPosition-!b.compareDocumentPosition
  ;if(d)return d;d=(a.ownerDocument||a)===(b.ownerDocument||b)?a.compareDocumentPosition(b):1;return d&1||!c.sortDetached&&b.compareDocumentPosition(a)===d?a===g||a.ownerDocument===w&&u(w,a)?-1:b===g||b.ownerDocument===w&&u(w,b)?1:l?K(l,a)-K(l,b):0:d&4?-1:1}
  :function(a,b){if(a===b){m=!0;return 0}var c,d=0,e=a.parentNode,f=b.parentNode,i=[a],j=[b];if(!e||!f)return a===g?-1:b===g?1:e?-1:f?1:l?K(l,a)-K(l,b):0;if(e===f)return ob(a,b);c=a;while(c=c.parentNode)i.unshift(c);c=b;while(c=c.parentNode)j.unshift(c);while(
  i[d]===j[d])d++;return d?ob(i[d],j[d]):i[d]===w?-1:j[d]===w?1:0};return g};jb.matches=function(a,b){return jb(a,null,null,b)};jb.matchesSelector=function(a,b){(a.ownerDocument||a)!==o&&n(a);b=b.replace(V,"='$1']");if(c.matchesSelector&&q&&(!s||!s.test(b))&&
  (!r||!r.test(b)))try{var d=t.call(a,b);if(d||c.disconnectedMatch||a.document&&a.document.nodeType!==11)return d}catch(e){}return jb(b,o,null,[a]).length>0};jb.contains=function(a,b){(a.ownerDocument||a)!==o&&n(a);return u(a,b)};jb.attr=function(a,b){(a.ownerDocument||
  a)!==o&&n(a);var e=d.attrHandle[b.toLowerCase()],f=e&&E.call(d.attrHandle,b.toLowerCase())?e(a,b,!q):undefined;return f!==undefined?f:c.attributes||!q?a.getAttribute(b):(f=a.getAttributeNode(b))&&f.specified?f.value:null};jb.error=function(a){throw new Error
  ("Syntax error, unrecognized expression: "+a)};jb.uniqueSort=function(a){var b,d=[],e=0,f=0;m=!c.detectDuplicates;l=!c.sortStable&&a.slice(0);a.sort(C);if(m){while(b=a[f++])b===a[f]&&(e=d.push(f));while(e--)a.splice(d[e],1)}l=null;return a};e=jb.getText=function(
  a){var b,c="",d=0,f=a.nodeType;if(!f)while(b=a[d++])c+=e(b);else if(f===1||f===9||f===11){if(typeof a.textContent=="string")return a.textContent;for(a=a.firstChild;a;a=a.nextSibling)c+=e(a)}else if(f===3||f===4)return a.nodeValue;return c};d=jb.selectors={
  cacheLength:50,createPseudo:lb,match:Y,attrHandle:{},find:{},relative:{">":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(a){a[1]=a[1].replace(fb,gb);a[3]=(a[3]||
  a[4]||a[5]||"").replace(fb,gb);a[2]==="~="&&(a[3]=" "+a[3]+" ");return a.slice(0,4)},CHILD:function(a){a[1]=a[1].toLowerCase();if(a[1].slice(0,3)==="nth"){a[3]||jb.error(a[0]);a[4]=+(a[4]?a[5]+(a[6]||1):2*(a[3]==="even"||a[3]==="odd"));a[5]=+(a[7]+a[8]||a[3
  ]==="odd")}else a[3]&&jb.error(a[0]);return a},PSEUDO:function(a){var b,c=!a[6]&&a[2];if(Y.CHILD.test(a[0]))return null;if(a[3])a[2]=a[4]||a[5]||"";else if(c&&W.test(c)&&(b=g(c,!0))&&(b=c.indexOf(")",c.length-b)-c.length)){a[0]=a[0].slice(0,b);a[2]=c.slice
  (0,b)}return a.slice(0,3)}},filter:{TAG:function(a){var b=a.replace(fb,gb).toLowerCase();return a==="*"?function(){return!0}:function(a){return a.nodeName&&a.nodeName.toLowerCase()===b}},CLASS:function(a){var b=z[a+" "];return b||(b=new RegExp("(^|"+M+")"+
  a+"("+M+"|$)"))&&z(a,function(a){return b.test(typeof a.className=="string"&&a.className||typeof a.getAttribute!="undefined"&&a.getAttribute("class")||"")})},ATTR:function(a,b,c){return function(d){var e=jb.attr(d,a);if(e==null)return b==="!=";if(!b)return!0
  ;e+="";return b==="="?e===c:b==="!="?e!==c:b==="^="?c&&e.indexOf(c)===0:b==="*="?c&&e.indexOf(c)>-1:b==="$="?c&&e.slice(-c.length)===c:b==="~="?(" "+e.replace(R," ")+" ").indexOf(c)>-1:b==="|="?e===c||e.slice(0,c.length+1)===c+"-":!1}},CHILD:function(a,b,c
  ,d,e){var f=a.slice(0,3)!=="nth",g=a.slice(-4)!=="last",i=b==="of-type";return d===1&&e===0?function(a){return!!a.parentNode}:function(b,c,j){var k,l,m,n,o,p,q=f!==g?"nextSibling":"previousSibling",r=b.parentNode,s=i&&b.nodeName.toLowerCase(),t=!j&&!i;if(r
  ){if(f){while(q){m=b;while(m=m[q])if(i?m.nodeName.toLowerCase()===s:m.nodeType===1)return!1;p=q=a==="only"&&!p&&"nextSibling"}return!0}p=[g?r.firstChild:r.lastChild];if(g&&t){l=r[v]||(r[v]={});k=l[a]||[];o=k[0]===x&&k[1];n=k[0]===x&&k[2];m=o&&r.childNodes[
  o];while(m=++o&&m&&m[q]||(n=o=0)||p.pop())if(m.nodeType===1&&++n&&m===b){l[a]=[x,o,n];break}}else if(t&&(k=(b[v]||(b[v]={}))[a])&&k[0]===x)n=k[1];else while(m=++o&&m&&m[q]||(n=o=0)||p.pop())if((i?m.nodeName.toLowerCase()===s:m.nodeType===1)&&++n){t&&((m[v]||
  (m[v]={}))[a]=[x,n]);if(m===b)break}n-=e;return n===d||n%d===0&&n/d>=0}}},PSEUDO:function(a,b){var c,e=d.pseudos[a]||d.setFilters[a.toLowerCase()]||jb.error("unsupported pseudo: "+a);if(e[v])return e(b);if(e.length>1){c=[a,a,"",b];return d.setFilters.hasOwnProperty
  (a.toLowerCase())?lb(function(a,c){var d,f=e(a,b),g=f.length;while(g--){d=K(a,f[g]);a[d]=!(c[d]=f[g])}}):function(a){return e(a,0,c)}}return e}},pseudos:{not:lb(function(a){var b=[],c=[],d=i(a.replace(S,"$1"));return d[v]?lb(function(a,b,c,e){var f,g=d(a,null
  ,e,[]),i=a.length;while(i--)if(f=g[i])a[i]=!(b[i]=f)}):function(a,e,f){b[0]=a;d(b,null,f,c);b[0]=null;return!c.pop()}}),has:lb(function(a){return function(b){return jb(a,b).length>0}}),contains:lb(function(a){a=a.replace(fb,gb);return function(b){return(b.
  textContent||b.innerText||e(b)).indexOf(a)>-1}}),lang:lb(function(a){X.test(a||"")||jb.error("unsupported lang: "+a);a=a.replace(fb,gb).toLowerCase();return function(b){var c;do if(c=q?b.lang:b.getAttribute("xml:lang")||b.getAttribute("lang")){c=c.toLowerCase
  ();return c===a||c.indexOf(a+"-")===0}while((b=b.parentNode)&&b.nodeType===1);return!1}}),target:function(b){var c=a.location&&a.location.hash;return c&&c.slice(1)===b.id},root:function(a){return a===p},focus:function(a){return a===o.activeElement&&(!o.hasFocus||
  o.hasFocus())&&!!(a.type||a.href||~a.tabIndex)},enabled:function(a){return a.disabled===!1},disabled:function(a){return a.disabled===!0},checked:function(a){var b=a.nodeName.toLowerCase();return b==="input"&&!!a.checked||b==="option"&&!!a.selected},selected
  :function(a){a.parentNode&&a.parentNode.selectedIndex;return a.selected===!0},empty:function(a){for(a=a.firstChild;a;a=a.nextSibling)if(a.nodeType<6)return!1;return!0},parent:function(a){return!d.pseudos.empty(a)},header:function(a){return ab.test(a.nodeName
  )},input:function(a){return Z.test(a.nodeName)},button:function(a){var b=a.nodeName.toLowerCase();return b==="input"&&a.type==="button"||b==="button"},text:function(a){var b;return a.nodeName.toLowerCase()==="input"&&a.type==="text"&&((b=a.getAttribute("type"
  ))==null||b.toLowerCase()==="text")},first:rb(function(){return[0]}),last:rb(function(a,b){return[b-1]}),eq:rb(function(a,b,c){return[c<0?c+b:c]}),even:rb(function(a,b){var c=0;for(;c<b;c+=2)a.push(c);return a}),odd:rb(function(a,b){var c=1;for(;c<b;c+=2)a
  .push(c);return a}),lt:rb(function(a,b,c){var d=c<0?c+b:c;for(;--d>=0;)a.push(d);return a}),gt:rb(function(a,b,c){var d=c<0?c+b:c;for(;++d<b;)a.push(d);return a})}};d.pseudos.nth=d.pseudos.eq;for(b in{radio:!0,checkbox:!0,file:!0,password:!0,image:!0})d.pseudos
  [b]=pb(b);for(b in{submit:!0,reset:!0})d.pseudos[b]=qb(b);tb.prototype=d.filters=d.pseudos;d.setFilters=new tb;g=jb.tokenize=function(a,b){var c,e,f,g,i,j,k,l=A[a+" "];if(l)return b?0:l.slice(0);i=a;j=[];k=d.preFilter;while(i){if(!c||(e=T.exec(i))){e&&(i=i
  .slice(e[0].length)||i);j.push(f=[])}c=!1;if(e=U.exec(i)){c=e.shift();f.push({value:c,type:e[0].replace(S," ")});i=i.slice(c.length)}for(g in d.filter)if((e=Y[g].exec(i))&&(!k[g]||(e=k[g](e)))){c=e.shift();f.push({value:c,type:g,matches:e});i=i.slice(c.length
  )}if(!c)break}return b?i.length:i?jb.error(a):A(a,j).slice(0)};i=jb.compile=function(a,b){var c,d=[],e=[],f=B[a+" "];if(!f){b||(b=g(a));c=b.length;while(c--){f=Ab(b[c]);f[v]?d.push(f):e.push(f)}f=B(a,Bb(e,d));f.selector=a}return f};j=jb.select=function(a,b
  ,e,f){var j,k,l,m,n,o=typeof a=="function"&&a,p=!f&&g(a=o.selector||a);e=e||[];if(p.length===1){k=p[0]=p[0].slice(0);if(k.length>2&&(l=k[0]).type==="ID"&&c.getById&&b.nodeType===9&&q&&d.relative[k[1].type]){b=(d.find.ID(l.matches[0].replace(fb,gb),b)||[])[0
  ];if(!b)return e;o&&(b=b.parentNode);a=a.slice(k.shift().value.length)}j=Y.needsContext.test(a)?0:k.length;while(j--){l=k[j];if(d.relative[m=l.type])break;if(n=d.find[m])if(f=n(l.matches[0].replace(fb,gb),db.test(k[0].type)&&sb(b.parentNode)||b)){k.splice(
  j,1);a=f.length&&ub(k);if(!a){I.apply(e,f);return e}break}}}(o||i(a,p))(f,b,!q,e,db.test(a)&&sb(b.parentNode)||b);return e};c.sortStable=v.split("").sort(C).join("")===v;c.detectDuplicates=!!m;n();c.sortDetached=mb(function(a){return a.compareDocumentPosition
  (o.createElement("div"))&1});mb(function(a){a.innerHTML="<a href='#'></a>";return a.firstChild.getAttribute("href")==="#"})||nb("type|href|height|width",function(a,b,c){if(!c)return a.getAttribute(b,b.toLowerCase()==="type"?1:2)});(!c.attributes||!mb(function(
  a){a.innerHTML="<input/>";a.firstChild.setAttribute("value","");return a.firstChild.getAttribute("value")===""}))&&nb("value",function(a,b,c){if(!c&&a.nodeName.toLowerCase()==="input")return a.defaultValue});mb(function(a){return a.getAttribute("disabled")==
  null})||nb(L,function(a,b,c){var d;if(!c)return a[b]===!0?b.toLowerCase():(d=a.getAttributeNode(b))&&d.specified?d.value:null});return jb}(a);n.find=t;n.expr=t.selectors;n.expr[":"]=n.expr.pseudos;n.unique=t.uniqueSort;n.text=t.getText;n.isXMLDoc=t.isXML;n
  .contains=t.contains;var u=n.expr.match.needsContext,v=/^<(\w+)\s*\/?>(?:<\/\1>|)$/,w=/^.[^:#\[\.,]*$/;n.filter=function(a,b,c){var d=b[0];c&&(a=":not("+a+")");return b.length===1&&d.nodeType===1?n.find.matchesSelector(d,a)?[d]:[]:n.find.matches(a,n.grep(b
  ,function(a){return a.nodeType===1}))};n.fn.extend({find:function(a){var b,c=[],d=this,e=d.length;if(typeof a!="string")return this.pushStack(n(a).filter(function(){for(b=0;b<e;b++)if(n.contains(d[b],this))return!0}));for(b=0;b<e;b++)n.find(a,d[b],c);c=this
  .pushStack(e>1?n.unique(c):c);c.selector=this.selector?this.selector+" "+a:a;return c},filter:function(a){return this.pushStack(x(this,a||[],!1))},not:function(a){return this.pushStack(x(this,a||[],!0))},is:function(a){return!!x(this,typeof a=="string"&&u.
  test(a)?n(a):a||[],!1).length}});var y,z=a.document,A=/^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]*))$/,B=n.fn.init=function(a,b){var c,d;if(!a)return this;if(typeof a=="string"){a.charAt(0)==="<"&&a.charAt(a.length-1)===">"&&a.length>=3?c=[null,a,null]:c=A.exec(a);if(
  c&&(c[1]||!b)){if(c[1]){b=b instanceof n?b[0]:b;n.merge(this,n.parseHTML(c[1],b&&b.nodeType?b.ownerDocument||b:z,!0));if(v.test(c[1])&&n.isPlainObject(b))for(c in b)n.isFunction(this[c])?this[c](b[c]):this.attr(c,b[c]);return this}d=z.getElementById(c[2]);
  if(d&&d.parentNode){if(d.id!==c[2])return y.find(a);this.length=1;this[0]=d}this.context=z;this.selector=a;return this}return!b||b.jquery?(b||y).find(a):this.constructor(b).find(a)}if(a.nodeType){this.context=this[0]=a;this.length=1;return this}if(n.isFunction
  (a))return typeof y.ready!="undefined"?y.ready(a):a(n);if(a.selector!==undefined){this.selector=a.selector;this.context=a.context}return n.makeArray(a,this)};B.prototype=n.fn;y=n(z);var C=/^(?:parents|prev(?:Until|All))/,D={children:!0,contents:!0,next:!0,
  prev:!0};n.extend({dir:function(a,b,c){var d=[],e=a[b];while(e&&e.nodeType!==9&&(c===undefined||e.nodeType!==1||!n(e).is(c))){e.nodeType===1&&d.push(e);e=e[b]}return d},sibling:function(a,b){var c=[];for(;a;a=a.nextSibling)a.nodeType===1&&a!==b&&c.push(a);
  return c}});n.fn.extend({has:function(a){var b,c=n(a,this),d=c.length;return this.filter(function(){for(b=0;b<d;b++)if(n.contains(this,c[b]))return!0})},closest:function(a,b){var c,d=0,e=this.length,f=[],g=u.test(a)||typeof a!="string"?n(a,b||this.context)
  :0;for(;d<e;d++)for(c=this[d];c&&c!==b;c=c.parentNode)if(c.nodeType<11&&(g?g.index(c)>-1:c.nodeType===1&&n.find.matchesSelector(c,a))){f.push(c);break}return this.pushStack(f.length>1?n.unique(f):f)},index:function(a){return a?typeof a=="string"?n.inArray(
  this[0],n(a)):n.inArray(a.jquery?a[0]:a,this):this[0]&&this[0].parentNode?this.first().prevAll().length:-1},add:function(a,b){return this.pushStack(n.unique(n.merge(this.get(),n(a,b))))},addBack:function(a){return this.add(a==null?this.prevObject:this.prevObject
  .filter(a))}});n.each({parent:function(a){var b=a.parentNode;return b&&b.nodeType!==11?b:null},parents:function(a){return n.dir(a,"parentNode")},parentsUntil:function(a,b,c){return n.dir(a,"parentNode",c)},next:function(a){return E(a,"nextSibling")},prev:function(
  a){return E(a,"previousSibling")},nextAll:function(a){return n.dir(a,"nextSibling")},prevAll:function(a){return n.dir(a,"previousSibling")},nextUntil:function(a,b,c){return n.dir(a,"nextSibling",c)},prevUntil:function(a,b,c){return n.dir(a,"previousSibling"
  ,c)},siblings:function(a){return n.sibling((a.parentNode||{}).firstChild,a)},children:function(a){return n.sibling(a.firstChild)},contents:function(a){return n.nodeName(a,"iframe")?a.contentDocument||a.contentWindow.document:n.merge([],a.childNodes)}},function(
  a,b){n.fn[a]=function(c,d){var e=n.map(this,b,c);a.slice(-5)!=="Until"&&(d=c);d&&typeof d=="string"&&(e=n.filter(d,e));if(this.length>1){D[a]||(e=n.unique(e));C.test(a)&&(e=e.reverse())}return this.pushStack(e)}});var F=/\S+/g,G={};n.Callbacks=function(a){
  a=typeof a=="string"?G[a]||H(a):n.extend({},a);var b,c,d,e,f,g,i=[],j=!a.once&&[],k=function(m){c=a.memory&&m;d=!0;f=g||0;g=0;e=i.length;b=!0;for(;i&&f<e;f++)if(i[f].apply(m[0],m[1])===!1&&a.stopOnFalse){c=!1;break}b=!1;i&&(j?j.length&&k(j.shift()):c?i=[]:
  l.disable())},l={add:function(){if(i){var d=i.length;(function f(b){n.each(b,function(_,b){var c=n.type(b);c==="function"?(!a.unique||!l.has(b))&&i.push(b):b&&b.length&&c!=="string"&&f(b)})})(arguments);if(b)e=i.length;else if(c){g=d;k(c)}}return this},remove
  :function(){i&&n.each(arguments,function(_,a){var c;while((c=n.inArray(a,i,c))>-1){i.splice(c,1);if(b){c<=e&&e--;c<=f&&f--}}});return this},has:function(a){return a?n.inArray(a,i)>-1:!!i&&!!i.length},empty:function(){i=[];e=0;return this},disable:function(
  ){i=j=c=undefined;return this},disabled:function(){return!i},lock:function(){j=undefined;c||l.disable();return this},locked:function(){return!j},fireWith:function(a,c){if(i&&(!d||j)){c=c||[];c=[a,c.slice?c.slice():c];b?j.push(c):k(c)}return this},fire:function(
  ){l.fireWith(this,arguments);return this},fired:function(){return!!d}};return l};n.extend({Deferred:function(a){var b=[["resolve","done",n.Callbacks("once memory"),"resolved"],["reject","fail",n.Callbacks("once memory"),"rejected"],["notify","progress",n.Callbacks
  ("memory")]],c="pending",d={state:function(){return c},always:function(){e.done(arguments).fail(arguments);return this},then:function(){var a=arguments;return n.Deferred(function(c){n.each(b,function(b,f){var g=n.isFunction(a[b])&&a[b];e[f[1]](function(){var a=
  g&&g.apply(this,arguments);a&&n.isFunction(a.promise)?a.promise().done(c.resolve).fail(c.reject).progress(c.notify):c[f[0]+"With"](this===d?c.promise():this,g?[a]:arguments)})});a=null}).promise()},promise:function(a){return a!=null?n.extend(a,d):d}},e={};
  d.pipe=d.then;n.each(b,function(a,f){var g=f[2],i=f[3];d[f[1]]=g.add;i&&g.add(function(){c=i},b[a^1][2].disable,b[2][2].lock);e[f[0]]=function(){e[f[0]+"With"](this===e?d:this,arguments);return this};e[f[0]+"With"]=g.fireWith});d.promise(e);a&&a.call(e,e);
  return e},when:function(a){var b=0,c=d.call(arguments),e=c.length,f=e!==1||a&&n.isFunction(a.promise)?e:0,g=f===1?a:n.Deferred(),i=function(a,b,c){return function(e){b[a]=this;c[a]=arguments.length>1?d.call(arguments):e;c===j?g.notifyWith(b,c):--f||g.resolveWith
  (b,c)}},j,k,l;if(e>1){j=new Array(e);k=new Array(e);l=new Array(e);for(;b<e;b++)c[b]&&n.isFunction(c[b].promise)?c[b].promise().done(i(b,l,c)).fail(g.reject).progress(i(b,k,j)):--f}f||g.resolveWith(l,c);return g.promise()}});var I;n.fn.ready=function(a){n.
  ready.promise().done(a);return this};n.extend({isReady:!1,readyWait:1,holdReady:function(a){a?n.readyWait++:n.ready(!0)},ready:function(a){if(a===!0?--n.readyWait:n.isReady)return;if(!z.body)return setTimeout(n.ready);n.isReady=!0;if(a!==!0&&--n.readyWait>0
  )return;I.resolveWith(z,[n]);if(n.fn.triggerHandler){n(z).triggerHandler("ready");n(z).off("ready")}}});n.ready.promise=function(b){if(!I){I=n.Deferred();if(z.readyState==="complete")setTimeout(n.ready);else if(z.addEventListener){z.addEventListener("DOMContentLoaded"
  ,K,!1);a.addEventListener("load",K,!1)}else{z.attachEvent("onreadystatechange",K);a.attachEvent("onload",K);var c=!1;try{c=a.frameElement==null&&z.documentElement}catch(d){}c&&c.doScroll&&function e(){if(!n.isReady){try{c.doScroll("left")}catch(a){return setTimeout
  (e,50)}J();n.ready()}}()}}return I.promise(b)};var L=typeof undefined,M;for(M in n(l))break;l.ownLast=M!=="0";l.inlineBlockNeedsLayout=!1;n(function(){var a,b,c,d;c=z.getElementsByTagName("body")[0];if(!c||!c.style)return;b=z.createElement("div");d=z.createElement
  ("div");d.style.cssText="position:absolute;border:0;width:0;height:0;top:0;left:-9999px";c.appendChild(d).appendChild(b);if(typeof b.style.zoom!==L){b.style.cssText="display:inline;margin:0;border:0;padding:1px;width:1px;zoom:1";l.inlineBlockNeedsLayout=a=
  b.offsetWidth===3;a&&(c.style.zoom=1)}c.removeChild(d)});(function(){var a=z.createElement("div");if(l.deleteExpando==null){l.deleteExpando=!0;try{delete a.test}catch(b){l.deleteExpando=!1}}a=null})();n.acceptData=function(a){var b=n.noData[(a.nodeName+" "
  ).toLowerCase()],c=+a.nodeType||1;return c!==1&&c!==9?!1:!b||b!==!0&&a.getAttribute("classid")===b};var N=/^(?:\{[\w\W]*\}|\[[\w\W]*\])$/,O=/([A-Z])/g;n.extend({cache:{},noData:{"applet ":!0,"embed ":!0,"object ":"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"
  },hasData:function(a){a=a.nodeType?n.cache[a[n.expando]]:a[n.expando];return!!a&&!Q(a)},data:function(a,b,c){return R(a,b,c)},removeData:function(a,b){return S(a,b)},_data:function(a,b,c){return R(a,b,c,!0)},_removeData:function(a,b){return S(a,b,!0)}});n.
  fn.extend({data:function(a,b){var c,d,e,f=this[0],g=f&&f.attributes;if(a===undefined){if(this.length){e=n.data(f);if(f.nodeType===1&&!n._data(f,"parsedAttrs")){c=g.length;while(c--)if(g[c]){d=g[c].name;if(d.indexOf("data-")===0){d=n.camelCase(d.slice(5));P
  (f,d,e[d])}}n._data(f,"parsedAttrs",!0)}}return e}return typeof a=="object"?this.each(function(){n.data(this,a)}):arguments.length>1?this.each(function(){n.data(this,a,b)}):f?P(f,a,n.data(f,a)):undefined},removeData:function(a){return this.each(function(){
  n.removeData(this,a)})}});n.extend({queue:function(a,b,c){var d;if(a){b=(b||"fx")+"queue";d=n._data(a,b);c&&(!d||n.isArray(c)?d=n._data(a,b,n.makeArray(c)):d.push(c));return d||[]}},dequeue:function(a,b){b=b||"fx";var c=n.queue(a,b),d=c.length,e=c.shift(),
  f=n._queueHooks(a,b),g=function(){n.dequeue(a,b)};if(e==="inprogress"){e=c.shift();d--}if(e){b==="fx"&&c.unshift("inprogress");delete f.stop;e.call(a,g,f)}!d&&f&&f.empty.fire()},_queueHooks:function(a,b){var c=b+"queueHooks";return n._data(a,c)||n._data(a,
  c,{empty:n.Callbacks("once memory").add(function(){n._removeData(a,b+"queue");n._removeData(a,c)})})}});n.fn.extend({queue:function(a,b){var c=2;if(typeof a!="string"){b=a;a="fx";c--}return arguments.length<c?n.queue(this[0],a):b===undefined?this:this.each
  (function(){var c=n.queue(this,a,b);n._queueHooks(this,a);a==="fx"&&c[0]!=="inprogress"&&n.dequeue(this,a)})},dequeue:function(a){return this.each(function(){n.dequeue(this,a)})},clearQueue:function(a){return this.queue(a||"fx",[])},promise:function(a,b){var c
  ,d=1,e=n.Deferred(),f=this,g=this.length,i=function(){--d||e.resolveWith(f,[f])};if(typeof a!="string"){b=a;a=undefined}a=a||"fx";while(g--){c=n._data(f[g],a+"queueHooks");if(c&&c.empty){d++;c.empty.add(i)}}i();return e.promise(b)}});var T=/[+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|)/
  .source,U=["Top","Right","Bottom","Left"],V=function(a,b){a=b||a;return n.css(a,"display")==="none"||!n.contains(a.ownerDocument,a)},W=n.access=function(a,b,c,d,e,f,g){var i=0,j=a.length,k=c==null;if(n.type(c)==="object"){e=!0;for(i in c)n.access(a,b,i,c[i
  ],!0,f,g)}else if(d!==undefined){e=!0;n.isFunction(d)||(g=!0);if(k)if(g){b.call(a,d);b=null}else{k=b;b=function(a,b,c){return k.call(n(a),c)}}if(b)for(;i<j;i++)b(a[i],c,g?d:d.call(a[i],i,b(a[i],c)))}return e?a:k?b.call(a):j?b(a[0],c):f},X=/^(?:checkbox|radio)$/i
  ;(function(){var a=z.createElement("input"),b=z.createElement("div"),c=z.createDocumentFragment();b.innerHTML="  <link/><table></table><a href='/a'>a</a><input type='checkbox'/>";l.leadingWhitespace=b.firstChild.nodeType===3;l.tbody=!b.getElementsByTagName
  ("tbody").length;l.htmlSerialize=!!b.getElementsByTagName("link").length;l.html5Clone=z.createElement("nav").cloneNode(!0).outerHTML!=="<:nav></:nav>";a.type="checkbox";a.checked=!0;c.appendChild(a);l.appendChecked=a.checked;b.innerHTML="<textarea>x</textarea>"
  ;l.noCloneChecked=!!b.cloneNode(!0).lastChild.defaultValue;c.appendChild(b);b.innerHTML="<input type='radio' checked='checked' name='t'/>";l.checkClone=b.cloneNode(!0).cloneNode(!0).lastChild.checked;l.noCloneEvent=!0;if(b.attachEvent){b.attachEvent("onclick"
  ,function(){l.noCloneEvent=!1});b.cloneNode(!0).click()}if(l.deleteExpando==null){l.deleteExpando=!0;try{delete b.test}catch(d){l.deleteExpando=!1}}})();(function(){var b,c,d=z.createElement("div");for(b in{submit:!0,change:!0,focusin:!0}){c="on"+b;if(!(l[
  b+"Bubbles"]=c in a)){d.setAttribute(c,"t");l[b+"Bubbles"]=d.attributes[c].expando===!1}}d=null})();var Y=/^(?:input|select|textarea)$/i,Z=/^key/,ab=/^(?:mouse|pointer|contextmenu)|click/,bb=/^(?:focusinfocus|focusoutblur)$/,cb=/^([^.]*)(?:\.(.+)|)$/;n.event=
  {global:{},add:function(a,b,c,d,e){var f,g,i,j,k,l,m,o,p,q,r,s=n._data(a);if(!s)return;if(c.handler){j=c;c=j.handler;e=j.selector}c.guid||(c.guid=n.guid++);(g=s.events)||(g=s.events={});if(!(l=s.handle)){l=s.handle=function(a){return typeof n===L||!!a&&n.event
  .triggered===a.type?undefined:n.event.dispatch.apply(l.elem,arguments)};l.elem=a}b=(b||"").match(F)||[""];i=b.length;while(i--){f=cb.exec(b[i])||[];p=r=f[1];q=(f[2]||"").split(".").sort();if(!p)continue;k=n.event.special[p]||{};p=(e?k.delegateType:k.bindType
  )||p;k=n.event.special[p]||{};m=n.extend({type:p,origType:r,data:d,handler:c,guid:c.guid,selector:e,needsContext:e&&n.expr.match.needsContext.test(e),namespace:q.join(".")},j);if(!(o=g[p])){o=g[p]=[];o.delegateCount=0;if(!k.setup||k.setup.call(a,d,q,l)===!1
  )a.addEventListener?a.addEventListener(p,l,!1):a.attachEvent&&a.attachEvent("on"+p,l)}if(k.add){k.add.call(a,m);m.handler.guid||(m.handler.guid=c.guid)}e?o.splice(o.delegateCount++,0,m):o.push(m);n.event.global[p]=!0}a=null},remove:function(a,b,c,d,e){var f
  ,g,i,j,k,l,m,o,p,q,r,s=n.hasData(a)&&n._data(a);if(!s||!(l=s.events))return;b=(b||"").match(F)||[""];k=b.length;while(k--){i=cb.exec(b[k])||[];p=r=i[1];q=(i[2]||"").split(".").sort();if(!p){for(p in l)n.event.remove(a,p+b[k],c,d,!0);continue}m=n.event.special
  [p]||{};p=(d?m.delegateType:m.bindType)||p;o=l[p]||[];i=i[2]&&new RegExp("(^|\\.)"+q.join("\\.(?:.*\\.|)")+"(\\.|$)");j=f=o.length;while(f--){g=o[f];if((e||r===g.origType)&&(!c||c.guid===g.guid)&&(!i||i.test(g.namespace))&&(!d||d===g.selector||d==="**"&&g.
  selector)){o.splice(f,1);g.selector&&o.delegateCount--;m.remove&&m.remove.call(a,g)}}if(j&&!o.length){(!m.teardown||m.teardown.call(a,q,s.handle)===!1)&&n.removeEvent(a,p,s.handle);delete l[p]}}if(n.isEmptyObject(l)){delete s.handle;n._removeData(a,"events"
  )}},trigger:function(b,c,d,e){var f,g,i,j,l,m,o,p=[d||z],q=k.call(b,"type")?b.type:b,r=k.call(b,"namespace")?b.namespace.split("."):[];i=m=d=d||z;if(d.nodeType===3||d.nodeType===8)return;if(bb.test(q+n.event.triggered))return;if(q.indexOf(".")>=0){r=q.split
  (".");q=r.shift();r.sort()}g=q.indexOf(":")<0&&"on"+q;b=b[n.expando]?b:new n.Event(q,typeof b=="object"&&b);b.isTrigger=e?2:3;b.namespace=r.join(".");b.namespace_re=b.namespace?new RegExp("(^|\\.)"+r.join("\\.(?:.*\\.|)")+"(\\.|$)"):null;b.result=undefined
  ;b.target||(b.target=d);c=c==null?[b]:n.makeArray(c,[b]);l=n.event.special[q]||{};if(!e&&l.trigger&&l.trigger.apply(d,c)===!1)return;if(!e&&!l.noBubble&&!n.isWindow(d)){j=l.delegateType||q;bb.test(j+q)||(i=i.parentNode);for(;i;i=i.parentNode){p.push(i);m=i
  }m===(d.ownerDocument||z)&&p.push(m.defaultView||m.parentWindow||a)}o=0;while((i=p[o++])&&!b.isPropagationStopped()){b.type=o>1?j:l.bindType||q;f=(n._data(i,"events")||{})[b.type]&&n._data(i,"handle");f&&f.apply(i,c);f=g&&i[g];if(f&&f.apply&&n.acceptData(i
  )){b.result=f.apply(i,c);b.result===!1&&b.preventDefault()}}b.type=q;if(!e&&!b.isDefaultPrevented()&&(!l._default||l._default.apply(p.pop(),c)===!1)&&n.acceptData(d)&&g&&d[q]&&!n.isWindow(d)){m=d[g];m&&(d[g]=null);n.event.triggered=q;try{d[q]()}catch(s){}n
  .event.triggered=undefined;m&&(d[g]=m)}return b.result},dispatch:function(a){a=n.event.fix(a);var b,c,e,f,g,i=[],j=d.call(arguments),k=(n._data(this,"events")||{})[a.type]||[],l=n.event.special[a.type]||{};j[0]=a;a.delegateTarget=this;if(l.preDispatch&&l.preDispatch
  .call(this,a)===!1)return;i=n.event.handlers.call(this,a,k);b=0;while((f=i[b++])&&!a.isPropagationStopped()){a.currentTarget=f.elem;g=0;while((e=f.handlers[g++])&&!a.isImmediatePropagationStopped())if(!a.namespace_re||a.namespace_re.test(e.namespace)){a.handleObj=
  e;a.data=e.data;c=((n.event.special[e.origType]||{}).handle||e.handler).apply(f.elem,j);if(c!==undefined&&(a.result=c)===!1){a.preventDefault();a.stopPropagation()}}}l.postDispatch&&l.postDispatch.call(this,a);return a.result},handlers:function(a,b){var c,
  d,e,f,g=[],i=b.delegateCount,j=a.target;if(i&&j.nodeType&&(!a.button||a.type!=="click"))for(;j!=this;j=j.parentNode||this)if(j.nodeType===1&&(j.disabled!==!0||a.type!=="click")){e=[];for(f=0;f<i;f++){d=b[f];c=d.selector+" ";e[c]===undefined&&(e[c]=d.needsContext?
  n(c,this).index(j)>=0:n.find(c,this,null,[j]).length);e[c]&&e.push(d)}e.length&&g.push({elem:j,handlers:e})}i<b.length&&g.push({elem:this,handlers:b.slice(i)});return g},fix:function(a){if(a[n.expando])return a;var b,c,d,e=a.type,f=a,g=this.fixHooks[e];g||
  (this.fixHooks[e]=g=ab.test(e)?this.mouseHooks:Z.test(e)?this.keyHooks:{});d=g.props?this.props.concat(g.props):this.props;a=new n.Event(f);b=d.length;while(b--){c=d[b];a[c]=f[c]}a.target||(a.target=f.srcElement||z);a.target.nodeType===3&&(a.target=a.target
  .parentNode);a.metaKey=!!a.metaKey;return g.filter?g.filter(a,f):a},props:"altKey bubbles cancelable ctrlKey currentTarget eventPhase metaKey relatedTarget shiftKey target timeStamp view which".split(" "),fixHooks:{},keyHooks:{props:"char charCode key keyCode"
  .split(" "),filter:function(a,b){a.which==null&&(a.which=b.charCode!=null?b.charCode:b.keyCode);return a}},mouseHooks:{props:"button buttons clientX clientY fromElement offsetX offsetY pageX pageY screenX screenY toElement".split(" "),filter:function(a,b){
  var c,d,e,f=b.button,g=b.fromElement;if(a.pageX==null&&b.clientX!=null){d=a.target.ownerDocument||z;e=d.documentElement;c=d.body;a.pageX=b.clientX+(e&&e.scrollLeft||c&&c.scrollLeft||0)-(e&&e.clientLeft||c&&c.clientLeft||0);a.pageY=b.clientY+(e&&e.scrollTop||
  c&&c.scrollTop||0)-(e&&e.clientTop||c&&c.clientTop||0)}!a.relatedTarget&&g&&(a.relatedTarget=g===a.target?b.toElement:g);!a.which&&f!==undefined&&(a.which=f&1?1:f&2?3:f&4?2:0);return a}},special:{load:{noBubble:!0},focus:{trigger:function(){if(this!==fb()&&
  this.focus)try{this.focus();return!1}catch(a){}},delegateType:"focusin"},blur:{trigger:function(){if(this===fb()&&this.blur){this.blur();return!1}},delegateType:"focusout"},click:{trigger:function(){if(n.nodeName(this,"input")&&this.type==="checkbox"&&this
  .click){this.click();return!1}},_default:function(a){return n.nodeName(a.target,"a")}},beforeunload:{postDispatch:function(a){a.result!==undefined&&a.originalEvent&&(a.originalEvent.returnValue=a.result)}}},simulate:function(a,b,c,d){var e=n.extend(new n.Event
  ,c,{type:a,isSimulated:!0,originalEvent:{}});d?n.event.trigger(e,null,b):n.event.dispatch.call(b,e);e.isDefaultPrevented()&&c.preventDefault()}};n.removeEvent=z.removeEventListener?function(a,b,c){a.removeEventListener&&a.removeEventListener(b,c,!1)}:function(
  a,b,c){var d="on"+b;if(a.detachEvent){typeof a[d]===L&&(a[d]=null);a.detachEvent(d,c)}};n.Event=function(a,b){if(!(this instanceof n.Event))return new n.Event(a,b);if(a&&a.type){this.originalEvent=a;this.type=a.type;this.isDefaultPrevented=a.defaultPrevented||
  a.defaultPrevented===undefined&&a.returnValue===!1?db:eb}else this.type=a;b&&n.extend(this,b);this.timeStamp=a&&a.timeStamp||n.now();this[n.expando]=!0};n.Event.prototype={isDefaultPrevented:eb,isPropagationStopped:eb,isImmediatePropagationStopped:eb,preventDefault
  :function(){var a=this.originalEvent;this.isDefaultPrevented=db;if(!a)return;a.preventDefault?a.preventDefault():a.returnValue=!1},stopPropagation:function(){var a=this.originalEvent;this.isPropagationStopped=db;if(!a)return;a.stopPropagation&&a.stopPropagation
  ();a.cancelBubble=!0},stopImmediatePropagation:function(){var a=this.originalEvent;this.isImmediatePropagationStopped=db;a&&a.stopImmediatePropagation&&a.stopImmediatePropagation();this.stopPropagation()}};n.each({mouseenter:"mouseover",mouseleave:"mouseout"
  ,pointerenter:"pointerover",pointerleave:"pointerout"},function(a,b){n.event.special[a]={delegateType:b,bindType:b,handle:function(a){var c,d=this,e=a.relatedTarget,f=a.handleObj;if(!e||e!==d&&!n.contains(d,e)){a.type=f.origType;c=f.handler.apply(this,arguments
  );a.type=b}return c}}});l.submitBubbles||(n.event.special.submit={setup:function(){if(n.nodeName(this,"form"))return!1;n.event.add(this,"click._submit keypress._submit",function(a){var b=a.target,c=n.nodeName(b,"input")||n.nodeName(b,"button")?b.form:undefined
  ;if(c&&!n._data(c,"submitBubbles")){n.event.add(c,"submit._submit",function(a){a._submit_bubble=!0});n._data(c,"submitBubbles",!0)}})},postDispatch:function(a){if(a._submit_bubble){delete a._submit_bubble;this.parentNode&&!a.isTrigger&&n.event.simulate("submit"
  ,this.parentNode,a,!0)}},teardown:function(){if(n.nodeName(this,"form"))return!1;n.event.remove(this,"._submit")}});l.changeBubbles||(n.event.special.change={setup:function(){if(Y.test(this.nodeName)){if(this.type==="checkbox"||this.type==="radio"){n.event
  .add(this,"propertychange._change",function(a){a.originalEvent.propertyName==="checked"&&(this._just_changed=!0)});n.event.add(this,"click._change",function(a){this._just_changed&&!a.isTrigger&&(this._just_changed=!1);n.event.simulate("change",this,a,!0)})
  }return!1}n.event.add(this,"beforeactivate._change",function(a){var b=a.target;if(Y.test(b.nodeName)&&!n._data(b,"changeBubbles")){n.event.add(b,"change._change",function(a){this.parentNode&&!a.isSimulated&&!a.isTrigger&&n.event.simulate("change",this.parentNode
  ,a,!0)});n._data(b,"changeBubbles",!0)}})},handle:function(a){var b=a.target;if(this!==b||a.isSimulated||a.isTrigger||b.type!=="radio"&&b.type!=="checkbox")return a.handleObj.handler.apply(this,arguments)},teardown:function(){n.event.remove(this,"._change"
  );return!Y.test(this.nodeName)}});l.focusinBubbles||n.each({focus:"focusin",blur:"focusout"},function(a,b){var c=function(a){n.event.simulate(b,a.target,n.event.fix(a),!0)};n.event.special[b]={setup:function(){var d=this.ownerDocument||this,e=n._data(d,b);
  e||d.addEventListener(a,c,!0);n._data(d,b,(e||0)+1)},teardown:function(){var d=this.ownerDocument||this,e=n._data(d,b)-1;if(!e){d.removeEventListener(a,c,!0);n._removeData(d,b)}else n._data(d,b,e)}}});n.fn.extend({on:function(a,b,c,d,e){var f,g;if(typeof a=="object"
  ){if(typeof b!="string"){c=c||b;b=undefined}for(f in a)this.on(f,b,c,a[f],e);return this}if(c==null&&d==null){d=b;c=b=undefined}else if(d==null)if(typeof b=="string"){d=c;c=undefined}else{d=c;c=b;b=undefined}if(d===!1)d=eb;else if(!d)return this;if(e===1){
  g=d;d=function(a){n().off(a);return g.apply(this,arguments)};d.guid=g.guid||(g.guid=n.guid++)}return this.each(function(){n.event.add(this,a,d,c,b)})},one:function(a,b,c,d){return this.on(a,b,c,d,1)},off:function(a,b,c){var d,e;if(a&&a.preventDefault&&a.handleObj
  ){d=a.handleObj;n(a.delegateTarget).off(d.namespace?d.origType+"."+d.namespace:d.origType,d.selector,d.handler);return this}if(typeof a=="object"){for(e in a)this.off(e,b,a[e]);return this}if(b===!1||typeof b=="function"){c=b;b=undefined}c===!1&&(c=eb);return this
  .each(function(){n.event.remove(this,a,c,b)})},trigger:function(a,b){return this.each(function(){n.event.trigger(a,b,this)})},triggerHandler:function(a,b){var c=this[0];if(c)return n.event.trigger(a,b,c,!0)}});var hb="abbr|article|aside|audio|bdi|canvas|data|datalist|details|figcaption|figure|footer|header|hgroup|mark|meter|nav|output|progress|section|summary|time|video"
  ,ib=/ jQuery\d+="(?:null|\d+)"/g,jb=new RegExp("<(?:"+hb+")[\\s/>]","i"),kb=/^\s+/,lb=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/gi,mb=/<([\w:]+)/,nb=/<tbody/i,ob=/<|&#?\w+;/,pb=/<(?:script|style|link)/i,qb=/checked\s*(?:[^=]|=\s*.checked.)/i
  ,rb=/^$|\/(?:java|ecma)script/i,sb=/^true\/(.*)/,tb=/^\s*<!(?:\[CDATA\[|--)|(?:\]\]|--)>\s*$/g,ub={option:[1,"<select multiple='multiple'>","</select>"],legend:[1,"<fieldset>","</fieldset>"],area:[1,"<map>","</map>"],param:[1,"<object>","</object>"],thead:
  [1,"<table>","</table>"],tr:[2,"<table><tbody>","</tbody></table>"],col:[2,"<table><tbody></tbody><colgroup>","</colgroup></table>"],td:[3,"<table><tbody><tr>","</tr></tbody></table>"],_default:l.htmlSerialize?[0,"",""]:[1,"X<div>","</div>"]},vb=gb(z),wb=vb
  .appendChild(z.createElement("div"));ub.optgroup=ub.option;ub.tbody=ub.tfoot=ub.colgroup=ub.caption=ub.thead;ub.th=ub.td;n.extend({clone:function(a,b,c){var d,e,f,g,i,j=n.contains(a.ownerDocument,a);if(l.html5Clone||n.isXMLDoc(a)||!jb.test("<"+a.nodeName+">"
  ))f=a.cloneNode(!0);else{wb.innerHTML=a.outerHTML;wb.removeChild(f=wb.firstChild)}if((!l.noCloneEvent||!l.noCloneChecked)&&(a.nodeType===1||a.nodeType===11)&&!n.isXMLDoc(a)){d=xb(f);i=xb(a);for(g=0;(e=i[g])!=null;++g)d[g]&&Eb(e,d[g])}if(b)if(c){i=i||xb(a);
  d=d||xb(f);for(g=0;(e=i[g])!=null;g++)Db(e,d[g])}else Db(a,f);d=xb(f,"script");d.length>0&&Cb(d,!j&&xb(a,"script"));d=i=e=null;return f},buildFragment:function(a,b,c,d){var e,f,g,i,j,k,m,o=a.length,p=gb(b),q=[],r=0;for(;r<o;r++){f=a[r];if(f||f===0)if(n.type
  (f)==="object")n.merge(q,f.nodeType?[f]:f);else if(!ob.test(f))q.push(b.createTextNode(f));else{i=i||p.appendChild(b.createElement("div"));j=(mb.exec(f)||["",""])[1].toLowerCase();m=ub[j]||ub._default;i.innerHTML=m[1]+f.replace(lb,"<$1></$2>")+m[2];e=m[0];
  while(e--)i=i.lastChild;!l.leadingWhitespace&&kb.test(f)&&q.push(b.createTextNode(kb.exec(f)[0]));if(!l.tbody){f=j==="table"&&!nb.test(f)?i.firstChild:m[1]==="<table>"&&!nb.test(f)?i:0;e=f&&f.childNodes.length;while(e--)n.nodeName(k=f.childNodes[e],"tbody"
  )&&!k.childNodes.length&&f.removeChild(k)}n.merge(q,i.childNodes);i.textContent="";while(i.firstChild)i.removeChild(i.firstChild);i=p.lastChild}}i&&p.removeChild(i);l.appendChecked||n.grep(xb(q,"input"),yb);r=0;while(f=q[r++]){if(d&&n.inArray(f,d)!==-1)continue;
  g=n.contains(f.ownerDocument,f);i=xb(p.appendChild(f),"script");g&&Cb(i);if(c){e=0;while(f=i[e++])rb.test(f.type||"")&&c.push(f)}}i=null;return p},cleanData:function(a,b){var d,e,f,g,i=0,j=n.expando,k=n.cache,m=l.deleteExpando,o=n.event.special;for(;(d=a[i
  ])!=null;i++)if(b||n.acceptData(d)){f=d[j];g=f&&k[f];if(g){if(g.events)for(e in g.events)o[e]?n.event.remove(d,e):n.removeEvent(d,e,g.handle);if(k[f]){delete k[f];m?delete d[j]:typeof d.removeAttribute!==L?d.removeAttribute(j):d[j]=null;c.push(f)}}}}});n.fn
  .extend({text:function(a){return W(this,function(a){return a===undefined?n.text(this):this.empty().append((this[0]&&this[0].ownerDocument||z).createTextNode(a))},null,a,arguments.length)},append:function(){return this.domManip(arguments,function(a){if(this
  .nodeType===1||this.nodeType===11||this.nodeType===9){var b=zb(this,a);b.appendChild(a)}})},prepend:function(){return this.domManip(arguments,function(a){if(this.nodeType===1||this.nodeType===11||this.nodeType===9){var b=zb(this,a);b.insertBefore(a,b.firstChild
  )}})},before:function(){return this.domManip(arguments,function(a){this.parentNode&&this.parentNode.insertBefore(a,this)})},after:function(){return this.domManip(arguments,function(a){this.parentNode&&this.parentNode.insertBefore(a,this.nextSibling)})},remove
  :function(a,b){var c,d=a?n.filter(a,this):this,e=0;for(;(c=d[e])!=null;e++){!b&&c.nodeType===1&&n.cleanData(xb(c));if(c.parentNode){b&&n.contains(c.ownerDocument,c)&&Cb(xb(c,"script"));c.parentNode.removeChild(c)}}return this},empty:function(){var a,b=0;for(
  ;(a=this[b])!=null;b++){a.nodeType===1&&n.cleanData(xb(a,!1));while(a.firstChild)a.removeChild(a.firstChild);a.options&&n.nodeName(a,"select")&&(a.options.length=0)}return this},clone:function(a,b){a=a==null?!1:a;b=b==null?a:b;return this.map(function(){return n
  .clone(this,a,b)})},html:function(a){return W(this,function(a){var b=this[0]||{},c=0,d=this.length;if(a===undefined)return b.nodeType===1?b.innerHTML.replace(ib,""):undefined;if(typeof a=="string"&&!pb.test(a)&&(l.htmlSerialize||!jb.test(a))&&(l.leadingWhitespace||!
  kb.test(a))&&!ub[(mb.exec(a)||["",""])[1].toLowerCase()]){a=a.replace(lb,"<$1></$2>");try{for(;c<d;c++){b=this[c]||{};if(b.nodeType===1){n.cleanData(xb(b,!1));b.innerHTML=a}}b=0}catch(e){}}b&&this.empty().append(a)},null,a,arguments.length)},replaceWith:function(
  ){var a=arguments[0];this.domManip(arguments,function(b){a=this.parentNode;n.cleanData(xb(this));a&&a.replaceChild(b,this)});return a&&(a.length||a.nodeType)?this:this.remove()},detach:function(a){return this.remove(a,!0)},domManip:function(a,b){a=e.apply(
  [],a);var c,d,f,g,i,j,k=0,m=this.length,o=this,p=m-1,q=a[0],r=n.isFunction(q);if(r||m>1&&typeof q=="string"&&!l.checkClone&&qb.test(q))return this.each(function(c){var d=o.eq(c);r&&(a[0]=q.call(this,c,d.html()));d.domManip(a,b)});if(m){j=n.buildFragment(a,
  this[0].ownerDocument,!1,this);c=j.firstChild;j.childNodes.length===1&&(j=c);if(c){g=n.map(xb(j,"script"),Ab);f=g.length;for(;k<m;k++){d=j;if(k!==p){d=n.clone(d,!0,!0);f&&n.merge(g,xb(d,"script"))}b.call(this[k],d,k)}if(f){i=g[g.length-1].ownerDocument;n.map
  (g,Bb);for(k=0;k<f;k++){d=g[k];rb.test(d.type||"")&&!n._data(d,"globalEval")&&n.contains(i,d)&&(d.src?n._evalUrl&&n._evalUrl(d.src):n.globalEval((d.text||d.textContent||d.innerHTML||"").replace(tb,"")))}}j=c=null}}return this}});n.each({appendTo:"append",prependTo
  :"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(a,b){n.fn[a]=function(a){var c,d=0,e=[],g=n(a),i=g.length-1;for(;d<=i;d++){c=d===i?this:this.clone(!0);n(g[d])[b](c);f.apply(e,c.get())}return this.pushStack(e)}});var Fb
  ,Gb={};(function(){var a;l.shrinkWrapBlocks=function(){if(a!=null)return a;a=!1;var b,c,d;c=z.getElementsByTagName("body")[0];if(!c||!c.style)return;b=z.createElement("div");d=z.createElement("div");d.style.cssText="position:absolute;border:0;width:0;height:0;top:0;left:-9999px"
  ;c.appendChild(d).appendChild(b);if(typeof b.style.zoom!==L){b.style.cssText="-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box;display:block;margin:0;border:0;padding:1px;width:1px;zoom:1";b.appendChild(z.createElement("div"
  )).style.width="5px";a=b.offsetWidth!==3}c.removeChild(d);return a}})();var Jb=/^margin/,Kb=new RegExp("^("+T+")(?!px)[a-z%]+$","i"),Lb,Mb,Nb=/^(top|right|bottom|left)$/;if(a.getComputedStyle){Lb=function(b){return b.ownerDocument.defaultView.opener?b.ownerDocument
  .defaultView.getComputedStyle(b,null):a.getComputedStyle(b,null)};Mb=function(a,b,c){var d,e,f,g,i=a.style;c=c||Lb(a);g=c?c.getPropertyValue(b)||c[b]:undefined;if(c){g===""&&!n.contains(a.ownerDocument,a)&&(g=n.style(a,b));if(Kb.test(g)&&Jb.test(b)){d=i.width
  ;e=i.minWidth;f=i.maxWidth;i.minWidth=i.maxWidth=i.width=g;g=c.width;i.width=d;i.minWidth=e;i.maxWidth=f}}return g===undefined?g:g+""}}else if(z.documentElement.currentStyle){Lb=function(a){return a.currentStyle};Mb=function(a,b,c){var d,e,f,g,i=a.style;c=
  c||Lb(a);g=c?c[b]:undefined;g==null&&i&&i[b]&&(g=i[b]);if(Kb.test(g)&&!Nb.test(b)){d=i.left;e=a.runtimeStyle;f=e&&e.left;f&&(e.left=a.currentStyle.left);i.left=b==="fontSize"?"1em":g;g=i.pixelLeft+"px";i.left=d;f&&(e.left=f)}return g===undefined?g:g+""||"auto"
  }}(function(){function j(){var b,c,d,j;c=z.getElementsByTagName("body")[0];if(!c||!c.style)return;b=z.createElement("div");d=z.createElement("div");d.style.cssText="position:absolute;border:0;width:0;height:0;top:0;left:-9999px";c.appendChild(d).appendChild
  (b);b.style.cssText="-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;display:block;margin-top:1%;top:1%;border:1px;padding:1px;width:4px;position:absolute";e=f=!1;i=!0;if(a.getComputedStyle){e=(a.getComputedStyle(b,null)||{})
  .top!=="1%";f=(a.getComputedStyle(b,null)||{width:"4px"}).width==="4px";j=b.appendChild(z.createElement("div"));j.style.cssText=b.style.cssText="-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box;display:block;margin:0;border:0;padding:0"
  ;j.style.marginRight=j.style.width="0";b.style.width="1px";i=!parseFloat((a.getComputedStyle(j,null)||{}).marginRight);b.removeChild(j)}b.innerHTML="<table><tr><td></td><td>t</td></tr></table>";j=b.getElementsByTagName("td");j[0].style.cssText="margin:0;border:0;padding:0;display:none"
  ;g=j[0].offsetHeight===0;if(g){j[0].style.display="";j[1].style.display="none";g=j[0].offsetHeight===0}c.removeChild(d)}var b,c,d,e,f,g,i;b=z.createElement("div");b.innerHTML="  <link/><table></table><a href='/a'>a</a><input type='checkbox'/>";d=b.getElementsByTagName
  ("a")[0];c=d&&d.style;if(!c)return;c.cssText="float:left;opacity:.5";l.opacity=c.opacity==="0.5";l.cssFloat=!!c.cssFloat;b.style.backgroundClip="content-box";b.cloneNode(!0).style.backgroundClip="";l.clearCloneStyle=b.style.backgroundClip==="content-box";l
  .boxSizing=c.boxSizing===""||c.MozBoxSizing===""||c.WebkitBoxSizing==="";n.extend(l,{reliableHiddenOffsets:function(){g==null&&j();return g},boxSizingReliable:function(){f==null&&j();return f},pixelPosition:function(){e==null&&j();return e},reliableMarginRight
  :function(){i==null&&j();return i}})})();n.swap=function(a,b,c,d){var e,f,g={};for(f in b){g[f]=a.style[f];a.style[f]=b[f]}e=c.apply(a,d||[]);for(f in b)a.style[f]=g[f];return e};var Pb=/alpha\([^)]*\)/i,Qb=/opacity\s*=\s*([^)]*)/,Rb=/^(none|table(?!-c[ea]).+)/
  ,Sb=new RegExp("^("+T+")(.*)$","i"),Tb=new RegExp("^([+-])=("+T+")","i"),Ub={position:"absolute",visibility:"hidden",display:"block"},Vb={letterSpacing:"0",fontWeight:"400"},Wb=["Webkit","O","Moz","ms"];n.extend({cssHooks:{opacity:{get:function(a,b){if(b){
  var c=Mb(a,"opacity");return c===""?"1":c}}}},cssNumber:{columnCount:!0,fillOpacity:!0,flexGrow:!0,flexShrink:!0,fontWeight:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,widows:!0,zIndex:!0,zoom:!0},cssProps:{"float":l.cssFloat?"cssFloat":"styleFloat"},style
  :function(a,b,c,d){if(!a||a.nodeType===3||a.nodeType===8||!a.style)return;var e,f,g,i=n.camelCase(b),j=a.style;b=n.cssProps[i]||(n.cssProps[i]=Xb(j,i));g=n.cssHooks[b]||n.cssHooks[i];if(c===undefined)return g&&"get"in g&&(e=g.get(a,!1,d))!==undefined?e:j[b
  ];f=typeof c;if(f==="string"&&(e=Tb.exec(c))){c=(e[1]+1)*e[2]+parseFloat(n.css(a,b));f="number"}if(c==null||c!==c)return;f==="number"&&!n.cssNumber[i]&&(c+="px");!l.clearCloneStyle&&c===""&&b.indexOf("background")===0&&(j[b]="inherit");if(!g||!("set"in g)||
  (c=g.set(a,c,d))!==undefined)try{j[b]=c}catch(k){}},css:function(a,b,c,d){var e,f,g,i=n.camelCase(b);b=n.cssProps[i]||(n.cssProps[i]=Xb(a.style,i));g=n.cssHooks[b]||n.cssHooks[i];g&&"get"in g&&(f=g.get(a,!0,c));f===undefined&&(f=Mb(a,b,d));f==="normal"&&b in 
  Vb&&(f=Vb[b]);if(c===""||c){e=parseFloat(f);return c===!0||n.isNumeric(e)?e||0:f}return f}});n.each(["height","width"],function(a,b){n.cssHooks[b]={get:function(a,c,d){if(c)return Rb.test(n.css(a,"display"))&&a.offsetWidth===0?n.swap(a,Ub,function(){return _b
  (a,b,d)}):_b(a,b,d)},set:function(a,c,d){var e=d&&Lb(a);return Zb(a,c,d?$b(a,b,d,l.boxSizing&&n.css(a,"boxSizing",!1,e)==="border-box",e):0)}}});l.opacity||(n.cssHooks.opacity={get:function(a,b){return Qb.test((b&&a.currentStyle?a.currentStyle.filter:a.style
  .filter)||"")?.01*parseFloat(RegExp.$1)+"":b?"1":""},set:function(a,b){var c=a.style,d=a.currentStyle,e=n.isNumeric(b)?"alpha(opacity="+b*100+")":"",f=d&&d.filter||c.filter||"";c.zoom=1;if((b>=1||b==="")&&n.trim(f.replace(Pb,""))===""&&c.removeAttribute){c
  .removeAttribute("filter");if(b===""||d&&!d.filter)return}c.filter=Pb.test(f)?f.replace(Pb,e):f+" "+e}});n.cssHooks.marginRight=Ob(l.reliableMarginRight,function(a,b){if(b)return n.swap(a,{display:"inline-block"},Mb,[a,"marginRight"])});n.each({margin:"",padding
  :"",border:"Width"},function(a,b){n.cssHooks[a+b]={expand:function(c){var d=0,e={},f=typeof c=="string"?c.split(" "):[c];for(;d<4;d++)e[a+U[d]+b]=f[d]||f[d-2]||f[0];return e}};Jb.test(a)||(n.cssHooks[a+b].set=Zb)});n.fn.extend({css:function(a,b){return W(this
  ,function(a,b,c){var d,e,f={},g=0;if(n.isArray(b)){d=Lb(a);e=b.length;for(;g<e;g++)f[b[g]]=n.css(a,b[g],!1,d);return f}return c!==undefined?n.style(a,b,c):n.css(a,b)},a,b,arguments.length>1)},show:function(){return Yb(this,!0)},hide:function(){return Yb(this
  )},toggle:function(a){return typeof a=="boolean"?a?this.show():this.hide():this.each(function(){V(this)?n(this).show():n(this).hide()})}});n.Tween=ac;ac.prototype={constructor:ac,init:function(a,b,c,d,e,f){this.elem=a;this.prop=c;this.easing=e||"swing";this
  .options=b;this.start=this.now=this.cur();this.end=d;this.unit=f||(n.cssNumber[c]?"":"px")},cur:function(){var a=ac.propHooks[this.prop];return a&&a.get?a.get(this):ac.propHooks._default.get(this)},run:function(a){var b,c=ac.propHooks[this.prop];this.options
  .duration?this.pos=b=n.easing[this.easing](a,this.options.duration*a,0,1,this.options.duration):this.pos=b=a;this.now=(this.end-this.start)*b+this.start;this.options.step&&this.options.step.call(this.elem,this.now,this);c&&c.set?c.set(this):ac.propHooks._default
  .set(this);return this}};ac.prototype.init.prototype=ac.prototype;ac.propHooks={_default:{get:function(a){var b;if(a.elem[a.prop]==null||!!a.elem.style&&a.elem.style[a.prop]!=null){b=n.css(a.elem,a.prop,"");return!b||b==="auto"?0:b}return a.elem[a.prop]},set
  :function(a){n.fx.step[a.prop]?n.fx.step[a.prop](a):a.elem.style&&(a.elem.style[n.cssProps[a.prop]]!=null||n.cssHooks[a.prop])?n.style(a.elem,a.prop,a.now+a.unit):a.elem[a.prop]=a.now}}};ac.propHooks.scrollTop=ac.propHooks.scrollLeft={set:function(a){a.elem
  .nodeType&&a.elem.parentNode&&(a.elem[a.prop]=a.now)}};n.easing={linear:function(a){return a},swing:function(a){return.5-Math.cos(a*Math.PI)/2}};n.fx=ac.prototype.init;n.fx.step={};var bc,cc,dc=/^(?:toggle|show|hide)$/,ec=new RegExp("^(?:([+-])=|)("+T+")([a-z%]*)$"
  ,"i"),fc=/queueHooks$/,gc=[lc],hc={"*":[function(a,b){var c=this.createTween(a,b),d=c.cur(),e=ec.exec(b),f=e&&e[3]||(n.cssNumber[a]?"":"px"),g=(n.cssNumber[a]||f!=="px"&&+d)&&ec.exec(n.css(c.elem,a)),i=1,j=20;if(g&&g[3]!==f){f=f||g[3];e=e||[];g=+d||1;do{i=
  i||".5";g/=i;n.style(c.elem,a,g+f)}while(i!==(i=c.cur()/d)&&i!==1&&--j)}if(e){g=c.start=+g||+d||0;c.unit=f;c.end=e[1]?g+(e[1]+1)*e[2]:+e[2]}return c}]};n.Animation=n.extend(nc,{tweener:function(a,b){if(n.isFunction(a)){b=a;a=["*"]}else a=a.split(" ");var c
  ,d=0,e=a.length;for(;d<e;d++){c=a[d];hc[c]=hc[c]||[];hc[c].unshift(b)}},prefilter:function(a,b){b?gc.unshift(a):gc.push(a)}});n.speed=function(a,b,c){var d=a&&typeof a=="object"?n.extend({},a):{complete:c||!c&&b||n.isFunction(a)&&a,duration:a,easing:c&&b||
  b&&!n.isFunction(b)&&b};d.duration=n.fx.off?0:typeof d.duration=="number"?d.duration:d.duration in n.fx.speeds?n.fx.speeds[d.duration]:n.fx.speeds._default;if(d.queue==null||d.queue===!0)d.queue="fx";d.old=d.complete;d.complete=function(){n.isFunction(d.old
  )&&d.old.call(this);d.queue&&n.dequeue(this,d.queue)};return d};n.fn.extend({fadeTo:function(a,b,c,d){return this.filter(V).css("opacity",0).show().end().animate({opacity:b},a,c,d)},animate:function(a,b,c,d){var e=n.isEmptyObject(a),f=n.speed(b,c,d),g=function(
  ){var b=nc(this,n.extend({},a),f);(e||n._data(this,"finish"))&&b.stop(!0)};g.finish=g;return e||f.queue===!1?this.each(g):this.queue(f.queue,g)},stop:function(a,b,c){var d=function(a){var b=a.stop;delete a.stop;b(c)};if(typeof a!="string"){c=b;b=a;a=undefined
  }b&&a!==!1&&this.queue(a||"fx",[]);return this.each(function(){var b=!0,e=a!=null&&a+"queueHooks",f=n.timers,g=n._data(this);if(e)g[e]&&g[e].stop&&d(g[e]);else for(e in g)g[e]&&g[e].stop&&fc.test(e)&&d(g[e]);for(e=f.length;e--;)if(f[e].elem===this&&(a==null||
  f[e].queue===a)){f[e].anim.stop(c);b=!1;f.splice(e,1)}(b||!c)&&n.dequeue(this,a)})},finish:function(a){a!==!1&&(a=a||"fx");return this.each(function(){var b,c=n._data(this),d=c[a+"queue"],e=c[a+"queueHooks"],f=n.timers,g=d?d.length:0;c.finish=!0;n.queue(this
  ,a,[]);e&&e.stop&&e.stop.call(this,!0);for(b=f.length;b--;)if(f[b].elem===this&&f[b].queue===a){f[b].anim.stop(!0);f.splice(b,1)}for(b=0;b<g;b++)d[b]&&d[b].finish&&d[b].finish.call(this);delete c.finish})}});n.each(["toggle","show","hide"],function(a,b){var c=
  n.fn[b];n.fn[b]=function(a,d,e){return a==null||typeof a=="boolean"?c.apply(this,arguments):this.animate(jc(b,!0),a,d,e)}});n.each({slideDown:jc("show"),slideUp:jc("hide"),slideToggle:jc("toggle"),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"},fadeToggle
  :{opacity:"toggle"}},function(a,b){n.fn[a]=function(a,c,d){return this.animate(b,a,c,d)}});n.timers=[];n.fx.tick=function(){var a,b=n.timers,c=0;bc=n.now();for(;c<b.length;c++){a=b[c];!a()&&b[c]===a&&b.splice(c--,1)}b.length||n.fx.stop();bc=undefined};n.fx
  .timer=function(a){n.timers.push(a);a()?n.fx.start():n.timers.pop()};n.fx.interval=13;n.fx.start=function(){cc||(cc=setInterval(n.fx.tick,n.fx.interval))};n.fx.stop=function(){clearInterval(cc);cc=null};n.fx.speeds={slow:600,fast:200,_default:400};n.fn.delay=
  function(a,b){a=n.fx?n.fx.speeds[a]||a:a;b=b||"fx";return this.queue(b,function(b,c){var d=setTimeout(b,a);c.stop=function(){clearTimeout(d)}})};(function(){var a,b,c,d,e;b=z.createElement("div");b.setAttribute("className","t");b.innerHTML="  <link/><table></table><a href='/a'>a</a><input type='checkbox'/>"
  ;d=b.getElementsByTagName("a")[0];c=z.createElement("select");e=c.appendChild(z.createElement("option"));a=b.getElementsByTagName("input")[0];d.style.cssText="top:1px";l.getSetAttribute=b.className!=="t";l.style=/top/.test(d.getAttribute("style"));l.hrefNormalized=
  d.getAttribute("href")==="/a";l.checkOn=!!a.value;l.optSelected=e.selected;l.enctype=!!z.createElement("form").enctype;c.disabled=!0;l.optDisabled=!e.disabled;a=z.createElement("input");a.setAttribute("value","");l.input=a.getAttribute("value")==="";a.value="t"
  ;a.setAttribute("type","radio");l.radioValue=a.value==="t"})();var oc=/\r/g;n.fn.extend({val:function(a){var b,c,d,e=this[0];if(!arguments.length){if(e){b=n.valHooks[e.type]||n.valHooks[e.nodeName.toLowerCase()];if(b&&"get"in b&&(c=b.get(e,"value"))!==undefined
  )return c;c=e.value;return typeof c=="string"?c.replace(oc,""):c==null?"":c}return}d=n.isFunction(a);return this.each(function(c){var e;if(this.nodeType!==1)return;d?e=a.call(this,c,n(this).val()):e=a;e==null?e="":typeof e=="number"?e+="":n.isArray(e)&&(e=
  n.map(e,function(a){return a==null?"":a+""}));b=n.valHooks[this.type]||n.valHooks[this.nodeName.toLowerCase()];if(!b||!("set"in b)||b.set(this,e,"value")===undefined)this.value=e})}});n.extend({valHooks:{option:{get:function(a){var b=n.find.attr(a,"value")
  ;return b!=null?b:n.trim(n.text(a))}},select:{get:function(a){var b,c,d=a.options,e=a.selectedIndex,f=a.type==="select-one"||e<0,g=f?null:[],i=f?e+1:d.length,j=e<0?i:f?e:0;for(;j<i;j++){c=d[j];if((c.selected||j===e)&&(l.optDisabled?!c.disabled:c.getAttribute
  ("disabled")===null)&&(!c.parentNode.disabled||!n.nodeName(c.parentNode,"optgroup"))){b=n(c).val();if(f)return b;g.push(b)}}return g},set:function(a,b){var c,d,e=a.options,f=n.makeArray(b),g=e.length;while(g--){d=e[g];if(n.inArray(n.valHooks.option.get(d),
  f)>=0)try{d.selected=c=!0}catch(_){d.scrollHeight}else d.selected=!1}c||(a.selectedIndex=-1);return e}}}});n.each(["radio","checkbox"],function(){n.valHooks[this]={set:function(a,b){if(n.isArray(b))return a.checked=n.inArray(n(a).val(),b)>=0}};l.checkOn||(
  n.valHooks[this].get=function(a){return a.getAttribute("value")===null?"on":a.value})});var pc,qc,rc=n.expr.attrHandle,sc=/^(?:checked|selected)$/i,tc=l.getSetAttribute,uc=l.input;n.fn.extend({attr:function(a,b){return W(this,n.attr,a,b,arguments.length>1)
  },removeAttr:function(a){return this.each(function(){n.removeAttr(this,a)})}});n.extend({attr:function(a,b,c){var d,e,f=a.nodeType;if(!a||f===3||f===8||f===2)return;if(typeof a.getAttribute===L)return n.prop(a,b,c);if(f!==1||!n.isXMLDoc(a)){b=b.toLowerCase
  ();d=n.attrHooks[b]||(n.expr.match.bool.test(b)?qc:pc)}if(c===undefined){if(d&&"get"in d&&(e=d.get(a,b))!==null)return e;e=n.find.attr(a,b);return e==null?undefined:e}if(c!==null){if(d&&"set"in d&&(e=d.set(a,c,b))!==undefined)return e;a.setAttribute(b,c+""
  );return c}n.removeAttr(a,b)},removeAttr:function(a,b){var c,d,e=0,f=b&&b.match(F);if(f&&a.nodeType===1)while(c=f[e++]){d=n.propFix[c]||c;n.expr.match.bool.test(c)?uc&&tc||!sc.test(c)?a[d]=!1:a[n.camelCase("default-"+c)]=a[d]=!1:n.attr(a,c,"");a.removeAttribute
  (tc?c:d)}},attrHooks:{type:{set:function(a,b){if(!l.radioValue&&b==="radio"&&n.nodeName(a,"input")){var c=a.value;a.setAttribute("type",b);c&&(a.value=c);return b}}}}});qc={set:function(a,b,c){b===!1?n.removeAttr(a,c):uc&&tc||!sc.test(c)?a.setAttribute(!tc&&
  n.propFix[c]||c,c):a[n.camelCase("default-"+c)]=a[c]=!0;return c}};n.each(n.expr.match.bool.source.match(/\w+/g),function(a,b){var c=rc[b]||n.find.attr;rc[b]=uc&&tc||!sc.test(b)?function(a,b,d){var e,f;if(!d){f=rc[b];rc[b]=e;e=c(a,b,d)!=null?b.toLowerCase(
  ):null;rc[b]=f}return e}:function(a,b,c){if(!c)return a[n.camelCase("default-"+b)]?b.toLowerCase():null}});if(!uc||!tc)n.attrHooks.value={set:function(a,b,c){if(!n.nodeName(a,"input"))return pc&&pc.set(a,b,c);a.defaultValue=b}};if(!tc){pc={set:function(a,b
  ,c){var d=a.getAttributeNode(c);d||a.setAttributeNode(d=a.ownerDocument.createAttribute(c));d.value=b+="";if(c==="value"||b===a.getAttribute(c))return b}};rc.id=rc.name=rc.coords=function(a,b,c){var d;if(!c)return(d=a.getAttributeNode(b))&&d.value!==""?d.value
  :null};n.valHooks.button={get:function(a,b){var c=a.getAttributeNode(b);if(c&&c.specified)return c.value},set:pc.set};n.attrHooks.contenteditable={set:function(a,b,c){pc.set(a,b===""?!1:b,c)}};n.each(["width","height"],function(a,b){n.attrHooks[b]={set:function(
  a,c){if(c===""){a.setAttribute(b,"auto");return c}}}})}l.style||(n.attrHooks.style={get:function(a){return a.style.cssText||undefined},set:function(a,b){return a.style.cssText=b+""}});var vc=/^(?:input|select|textarea|button|object)$/i,wc=/^(?:a|area)$/i;n
  .fn.extend({prop:function(a,b){return W(this,n.prop,a,b,arguments.length>1)},removeProp:function(a){a=n.propFix[a]||a;return this.each(function(){try{this[a]=undefined;delete this[a]}catch(b){}})}});n.extend({propFix:{"for":"htmlFor","class":"className"},prop
  :function(a,b,c){var d,e,f,g=a.nodeType;if(!a||g===3||g===8||g===2)return;f=g!==1||!n.isXMLDoc(a);if(f){b=n.propFix[b]||b;e=n.propHooks[b]}return c!==undefined?e&&"set"in e&&(d=e.set(a,c,b))!==undefined?d:a[b]=c:e&&"get"in e&&(d=e.get(a,b))!==null?d:a[b]},
  propHooks:{tabIndex:{get:function(a){var b=n.find.attr(a,"tabindex");return b?parseInt(b,10):vc.test(a.nodeName)||wc.test(a.nodeName)&&a.href?0:-1}}}});l.hrefNormalized||n.each(["href","src"],function(a,b){n.propHooks[b]={get:function(a){return a.getAttribute
  (b,4)}}});l.optSelected||(n.propHooks.selected={get:function(a){var b=a.parentNode;if(b){b.selectedIndex;b.parentNode&&b.parentNode.selectedIndex}return null}});n.each(["tabIndex","readOnly","maxLength","cellSpacing","cellPadding","rowSpan","colSpan","useMap"
  ,"frameBorder","contentEditable"],function(){n.propFix[this.toLowerCase()]=this});l.enctype||(n.propFix.enctype="encoding");var xc=/[\t\r\n\f]/g;n.fn.extend({addClass:function(a){var b,c,d,e,f,g,i=0,j=this.length,k=typeof a=="string"&&a;if(n.isFunction(a))
  return this.each(function(b){n(this).addClass(a.call(this,b,this.className))});if(k){b=(a||"").match(F)||[];for(;i<j;i++){c=this[i];d=c.nodeType===1&&(c.className?(" "+c.className+" ").replace(xc," "):" ");if(d){f=0;while(e=b[f++])d.indexOf(" "+e+" ")<0&&(
  d+=e+" ");g=n.trim(d);c.className!==g&&(c.className=g)}}}return this},removeClass:function(a){var b,c,d,e,f,g,i=0,j=this.length,k=arguments.length===0||typeof a=="string"&&a;if(n.isFunction(a))return this.each(function(b){n(this).removeClass(a.call(this,b,
  this.className))});if(k){b=(a||"").match(F)||[];for(;i<j;i++){c=this[i];d=c.nodeType===1&&(c.className?(" "+c.className+" ").replace(xc," "):"");if(d){f=0;while(e=b[f++])while(d.indexOf(" "+e+" ")>=0)d=d.replace(" "+e+" "," ");g=a?n.trim(d):"";c.className!==
  g&&(c.className=g)}}}return this},toggleClass:function(a,b){var c=typeof a;return typeof b=="boolean"&&c==="string"?b?this.addClass(a):this.removeClass(a):n.isFunction(a)?this.each(function(c){n(this).toggleClass(a.call(this,c,this.className,b),b)}):this.each
  (function(){if(c==="string"){var b,d=0,e=n(this),f=a.match(F)||[];while(b=f[d++])e.hasClass(b)?e.removeClass(b):e.addClass(b)}else if(c===L||c==="boolean"){this.className&&n._data(this,"__className__",this.className);this.className=this.className||a===!1?""
  :n._data(this,"__className__")||""}})},hasClass:function(a){var b=" "+a+" ",c=0,d=this.length;for(;c<d;c++)if(this[c].nodeType===1&&(" "+this[c].className+" ").replace(xc," ").indexOf(b)>=0)return!0;return!1}});n.each("blur focus focusin focusout load resize scroll unload click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup error contextmenu"
  .split(" "),function(a,b){n.fn[b]=function(a,c){return arguments.length>0?this.on(b,null,a,c):this.trigger(b)}});n.fn.extend({hover:function(a,b){return this.mouseenter(a).mouseleave(b||a)},bind:function(a,b,c){return this.on(a,null,b,c)},unbind:function(a
  ,b){return this.off(a,null,b)},delegate:function(a,b,c,d){return this.on(b,a,c,d)},undelegate:function(a,b,c){return arguments.length===1?this.off(a,"**"):this.off(b,a||"**",c)}});var yc=n.now(),zc=/\?/,Ac=/(,)|(\[|{)|(}|])|"(?:[^"\\\r\n]|\\["\\\/bfnrt]|\\u[\da-fA-F]{4})*"\s*:?|true|false|null|-?(?!0\d)\d+(?:\.\d+|)(?:[eE][+-]?\d+|)/g
  ;n.parseJSON=function(b){if(a.JSON&&a.JSON.parse)return a.JSON.parse(b+"");var c,d=null,e=n.trim(b+"");return e&&!n.trim(e.replace(Ac,function(a,b,e,f){c&&b&&(d=0);if(d===0)return a;c=e||b;d+=!f-!e;return""}))?Function("return "+e)():n.error("Invalid JSON: "+
  b)};n.parseXML=function(b){var c,d;if(!b||typeof b!="string")return null;try{if(a.DOMParser){d=new DOMParser;c=d.parseFromString(b,"text/xml")}else{c=new ActiveXObject("Microsoft.XMLDOM");c.async="false";c.loadXML(b)}}catch(e){c=undefined}(!c||!c.documentElement||
  c.getElementsByTagName("parsererror").length)&&n.error("Invalid XML: "+b);return c};var Bc,Cc,Dc=/#.*$/,Ec=/([?&])_=[^&]*/,Fc=/^(.*?):[ \t]*([^\r\n]*)\r?$/mg,Gc=/^(?:about|app|app-storage|.+-extension|file|res|widget):$/,Hc=/^(?:GET|HEAD)$/,Ic=/^\/\//,Jc=/^([\w.+-]+:)(?:\/\/(?:[^\/?#]*@|)([^\/?#:]*)(?::(\d+)|)|)/
  ,Kc={},Lc={},Mc="*/".concat("*");try{Cc=location.href}catch(Nc){Cc=z.createElement("a");Cc.href="";Cc=Cc.href}Bc=Jc.exec(Cc.toLowerCase())||[];n.extend({active:0,lastModified:{},etag:{},ajaxSettings:{url:Cc,type:"GET",isLocal:Gc.test(Bc[1]),global:!0,processData
  :!0,async:!0,contentType:"application/x-www-form-urlencoded; charset=UTF-8",accepts:{"*":Mc,text:"text/plain",html:"text/html",xml:"application/xml, text/xml",json:"application/json, text/javascript"},contents:{xml:/xml/,html:/html/,json:/json/},responseFields
  :{xml:"responseXML",text:"responseText",json:"responseJSON"},converters:{"* text":String,"text html":!0,"text json":n.parseJSON,"text xml":n.parseXML},flatOptions:{url:!0,context:!0}},ajaxSetup:function(a,b){return b?Qc(Qc(a,n.ajaxSettings),b):Qc(n.ajaxSettings
  ,a)},ajaxPrefilter:Oc(Kc),ajaxTransport:Oc(Lc),ajax:function(a,b){function y(a,b,c,d){var k,s,t,v,x,y=b;if(u===2)return;u=2;g&&clearTimeout(g);j=undefined;f=d||"";w.readyState=a>0?4:0;k=a>=200&&a<300||a===304;c&&(v=Rc(l,w,c));v=Sc(l,v,w,k);if(k){if(l.ifModified
  ){x=w.getResponseHeader("Last-Modified");x&&(n.lastModified[e]=x);x=w.getResponseHeader("etag");x&&(n.etag[e]=x)}if(a===204||l.type==="HEAD")y="nocontent";else if(a===304)y="notmodified";else{y=v.state;s=v.data;t=v.error;k=!t}}else{t=y;if(a||!y){y="error";
  a<0&&(a=0)}}w.status=a;w.statusText=(b||y)+"";k?p.resolveWith(m,[s,y,w]):p.rejectWith(m,[w,y,t]);w.statusCode(r);r=undefined;i&&o.trigger(k?"ajaxSuccess":"ajaxError",[w,l,k?s:t]);q.fireWith(m,[w,y]);if(i){o.trigger("ajaxComplete",[w,l]);--n.active||n.event
  .trigger("ajaxStop")}}if(typeof a=="object"){b=a;a=undefined}b=b||{};var c,d,e,f,g,i,j,k,l=n.ajaxSetup({},b),m=l.context||l,o=l.context&&(m.nodeType||m.jquery)?n(m):n.event,p=n.Deferred(),q=n.Callbacks("once memory"),r=l.statusCode||{},s={},t={},u=0,v="canceled"
  ,w={readyState:0,getResponseHeader:function(a){var b;if(u===2){if(!k){k={};while(b=Fc.exec(f))k[b[1].toLowerCase()]=b[2]}b=k[a.toLowerCase()]}return b==null?null:b},getAllResponseHeaders:function(){return u===2?f:null},setRequestHeader:function(a,b){var c=
  a.toLowerCase();if(!u){a=t[c]=t[c]||a;s[a]=b}return this},overrideMimeType:function(a){u||(l.mimeType=a);return this},statusCode:function(a){var b;if(a)if(u<2)for(b in a)r[b]=[r[b],a[b]];else w.always(a[w.status]);return this},abort:function(a){var b=a||v;
  j&&j.abort(b);y(0,b);return this}};p.promise(w).complete=q.add;w.success=w.done;w.error=w.fail;l.url=((a||l.url||Cc)+"").replace(Dc,"").replace(Ic,Bc[1]+"//");l.type=b.method||b.type||l.method||l.type;l.dataTypes=n.trim(l.dataType||"*").toLowerCase().match
  (F)||[""];if(l.crossDomain==null){c=Jc.exec(l.url.toLowerCase());l.crossDomain=!(!c||c[1]===Bc[1]&&c[2]===Bc[2]&&(c[3]||(c[1]==="http:"?"80":"443"))===(Bc[3]||(Bc[1]==="http:"?"80":"443")))}l.data&&l.processData&&typeof l.data!="string"&&(l.data=n.param(l.
  data,l.traditional));Pc(Kc,l,b,w);if(u===2)return w;i=n.event&&l.global;i&&n.active++===0&&n.event.trigger("ajaxStart");l.type=l.type.toUpperCase();l.hasContent=!Hc.test(l.type);e=l.url;if(!l.hasContent){if(l.data){e=l.url+=(zc.test(e)?"&":"?")+l.data;delete 
  l.data}l.cache===!1&&(l.url=Ec.test(e)?e.replace(Ec,"$1_="+yc++):e+(zc.test(e)?"&":"?")+"_="+yc++)}if(l.ifModified){n.lastModified[e]&&w.setRequestHeader("If-Modified-Since",n.lastModified[e]);n.etag[e]&&w.setRequestHeader("If-None-Match",n.etag[e])}(l.data&&
  l.hasContent&&l.contentType!==!1||b.contentType)&&w.setRequestHeader("Content-Type",l.contentType);w.setRequestHeader("Accept",l.dataTypes[0]&&l.accepts[l.dataTypes[0]]?l.accepts[l.dataTypes[0]]+(l.dataTypes[0]!=="*"?", "+Mc+"; q=0.01":""):l.accepts["*"]);
  for(d in l.headers)w.setRequestHeader(d,l.headers[d]);if(!l.beforeSend||l.beforeSend.call(m,w,l)!==!1&&u!==2){v="abort";for(d in{success:1,error:1,complete:1})w[d](l[d]);j=Pc(Lc,l,b,w);if(!j)y(-1,"No Transport");else{w.readyState=1;i&&o.trigger("ajaxSend",
  [w,l]);l.async&&l.timeout>0&&(g=setTimeout(function(){w.abort("timeout")},l.timeout));try{u=1;j.send(s,y)}catch(x){if(!(u<2))throw x;y(-1,x)}}return w}return w.abort()},getJSON:function(a,b,c){return n.get(a,b,c,"json")},getScript:function(a,b){return n.get
  (a,undefined,b,"script")}});n.each(["get","post"],function(a,b){n[b]=function(a,c,d,e){if(n.isFunction(c)){e=e||d;d=c;c=undefined}return n.ajax({url:a,type:b,dataType:e,data:c,success:d})}});n._evalUrl=function(a){return n.ajax({url:a,type:"GET",dataType:"script"
  ,async:!1,global:!1,"throws":!0})};n.fn.extend({wrapAll:function(a){if(n.isFunction(a))return this.each(function(b){n(this).wrapAll(a.call(this,b))});if(this[0]){var b=n(a,this[0].ownerDocument).eq(0).clone(!0);this[0].parentNode&&b.insertBefore(this[0]);b
  .map(function(){var a=this;while(a.firstChild&&a.firstChild.nodeType===1)a=a.firstChild;return a}).append(this)}return this},wrapInner:function(a){return n.isFunction(a)?this.each(function(b){n(this).wrapInner(a.call(this,b))}):this.each(function(){var b=n
  (this),c=b.contents();c.length?c.wrapAll(a):b.append(a)})},wrap:function(a){var b=n.isFunction(a);return this.each(function(c){n(this).wrapAll(b?a.call(this,c):a)})},unwrap:function(){return this.parent().each(function(){n.nodeName(this,"body")||n(this).replaceWith
  (this.childNodes)}).end()}});n.expr.filters.hidden=function(a){return a.offsetWidth<=0&&a.offsetHeight<=0||!l.reliableHiddenOffsets()&&(a.style&&a.style.display||n.css(a,"display"))==="none"};n.expr.filters.visible=function(a){return!n.expr.filters.hidden(
  a)};var Tc=/%20/g,Uc=/\[\]$/,Vc=/\r?\n/g,Wc=/^(?:submit|button|image|reset|file)$/i,Xc=/^(?:input|select|textarea|keygen)/i;n.param=function(a,b){var c,d=[],e=function(a,b){b=n.isFunction(b)?b():b==null?"":b;d[d.length]=encodeURIComponent(a)+"="+encodeURIComponent
  (b)};b===undefined&&(b=n.ajaxSettings&&n.ajaxSettings.traditional);if(n.isArray(a)||a.jquery&&!n.isPlainObject(a))n.each(a,function(){e(this.name,this.value)});else for(c in a)Yc(c,a[c],b,e);return d.join("&").replace(Tc,"+")};n.fn.extend({serialize:function(
  ){return n.param(this.serializeArray())},serializeArray:function(){return this.map(function(){var a=n.prop(this,"elements");return a?n.makeArray(a):this}).filter(function(){var a=this.type;return this.name&&!n(this).is(":disabled")&&Xc.test(this.nodeName)&&!
  Wc.test(a)&&(this.checked||!X.test(a))}).map(function(a,b){var c=n(this).val();return c==null?null:n.isArray(c)?n.map(c,function(a){return{name:b.name,value:a.replace(Vc,"\r\n")}}):{name:b.name,value:c.replace(Vc,"\r\n")}}).get()}});n.ajaxSettings.xhr=a.ActiveXObject!==
  undefined?function(){return!this.isLocal&&/^(get|post|head|put|delete|options)$/i.test(this.type)&&ad()||bd()}:ad;var Zc=0,$c={},_c=n.ajaxSettings.xhr();a.attachEvent&&a.attachEvent("onunload",function(){for(var a in $c)$c[a](undefined,!0)});l.cors=!!_c&&"withCredentials"in 
  _c;_c=l.ajax=!!_c;_c&&n.ajaxTransport(function(a){if(!a.crossDomain||l.cors){var b;return{send:function(c,d){var e,f=a.xhr(),g=++Zc;f.open(a.type,a.url,a.async,a.username,a.password);if(a.xhrFields)for(e in a.xhrFields)f[e]=a.xhrFields[e];a.mimeType&&f.overrideMimeType&&
  f.overrideMimeType(a.mimeType);!a.crossDomain&&!c["X-Requested-With"]&&(c["X-Requested-With"]="XMLHttpRequest");for(e in c)c[e]!==undefined&&f.setRequestHeader(e,c[e]+"");f.send(a.hasContent&&a.data||null);b=function(_,c){var e,i,j;if(b&&(c||f.readyState===4
  )){delete $c[g];b=undefined;f.onreadystatechange=n.noop;if(c)f.readyState!==4&&f.abort();else{j={};e=f.status;typeof f.responseText=="string"&&(j.text=f.responseText);try{i=f.statusText}catch(k){i=""}!e&&a.isLocal&&!a.crossDomain?e=j.text?200:404:e===1223&&
  (e=204)}}j&&d(e,i,j,f.getAllResponseHeaders())};a.async?f.readyState===4?setTimeout(b):f.onreadystatechange=$c[g]=b:b()},abort:function(){b&&b(undefined,!0)}}}});n.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"
  },contents:{script:/(?:java|ecma)script/},converters:{"text script":function(a){n.globalEval(a);return a}}});n.ajaxPrefilter("script",function(a){a.cache===undefined&&(a.cache=!1);if(a.crossDomain){a.type="GET";a.global=!1}});n.ajaxTransport("script",function(
  a){if(a.crossDomain){var b,c=z.head||n("head")[0]||z.documentElement;return{send:function(_,d){b=z.createElement("script");b.async=!0;a.scriptCharset&&(b.charset=a.scriptCharset);b.src=a.url;b.onload=b.onreadystatechange=function(_,a){if(a||!b.readyState||/loaded|complete/
  .test(b.readyState)){b.onload=b.onreadystatechange=null;b.parentNode&&b.parentNode.removeChild(b);b=null;a||d(200,"success")}};c.insertBefore(b,c.firstChild)},abort:function(){b&&b.onload(undefined,!0)}}}});var cd=[],dd=/(=)\?(?=&|$)|\?\?/;n.ajaxSetup({jsonp
  :"callback",jsonpCallback:function(){var a=cd.pop()||n.expando+"_"+yc++;this[a]=!0;return a}});n.ajaxPrefilter("json jsonp",function(b,c,d){var e,f,g,i=b.jsonp!==!1&&(dd.test(b.url)?"url":typeof b.data=="string"&&!(b.contentType||"").indexOf("application/x-www-form-urlencoded"
  )&&dd.test(b.data)&&"data");if(i||b.dataTypes[0]==="jsonp"){e=b.jsonpCallback=n.isFunction(b.jsonpCallback)?b.jsonpCallback():b.jsonpCallback;i?b[i]=b[i].replace(dd,"$1"+e):b.jsonp!==!1&&(b.url+=(zc.test(b.url)?"&":"?")+b.jsonp+"="+e);b.converters["script json"
  ]=function(){g||n.error(e+" was not called");return g[0]};b.dataTypes[0]="json";f=a[e];a[e]=function(){g=arguments};d.always(function(){a[e]=f;if(b[e]){b.jsonpCallback=c.jsonpCallback;cd.push(e)}g&&n.isFunction(f)&&f(g[0]);g=f=undefined});return"script"}})
  ;n.parseHTML=function(a,b,c){if(!a||typeof a!="string")return null;if(typeof b=="boolean"){c=b;b=!1}b=b||z;var d=v.exec(a),e=!c&&[];if(d)return[b.createElement(d[1])];d=n.buildFragment([a],b,e);e&&e.length&&n(e).remove();return n.merge([],d.childNodes)};var ed=
  n.fn.load;n.fn.load=function(a,b,c){if(typeof a!="string"&&ed)return ed.apply(this,arguments);var d,e,f,g=this,i=a.indexOf(" ");if(i>=0){d=n.trim(a.slice(i,a.length));a=a.slice(0,i)}if(n.isFunction(b)){c=b;b=undefined}else b&&typeof b=="object"&&(f="POST")
  ;g.length>0&&n.ajax({url:a,type:f,dataType:"html",data:b}).done(function(a){e=arguments;g.html(d?n("<div>").append(n.parseHTML(a)).find(d):a)}).complete(c&&function(a,b){g.each(c,e||[a.responseText,b,a])});return this};n.each(["ajaxStart","ajaxStop","ajaxComplete"
  ,"ajaxError","ajaxSuccess","ajaxSend"],function(a,b){n.fn[b]=function(a){return this.on(b,a)}});n.expr.filters.animated=function(a){return n.grep(n.timers,function(b){return a===b.elem}).length};var fd=a.document.documentElement;n.offset={setOffset:function(
  a,b,c){var d,e,f,g,i,j,k,l=n.css(a,"position"),m=n(a),o={};l==="static"&&(a.style.position="relative");i=m.offset();f=n.css(a,"top");j=n.css(a,"left");k=(l==="absolute"||l==="fixed")&&n.inArray("auto",[f,j])>-1;if(k){d=m.position();g=d.top;e=d.left}else{g=
  parseFloat(f)||0;e=parseFloat(j)||0}n.isFunction(b)&&(b=b.call(a,c,i));b.top!=null&&(o.top=b.top-i.top+g);b.left!=null&&(o.left=b.left-i.left+e);"using"in b?b.using.call(a,o):m.css(o)}};n.fn.extend({offset:function(a){if(arguments.length)return a===undefined?
  this:this.each(function(b){n.offset.setOffset(this,a,b)});var b,c,d={top:0,left:0},e=this[0],f=e&&e.ownerDocument;if(!f)return;b=f.documentElement;if(!n.contains(b,e))return d;typeof e.getBoundingClientRect!==L&&(d=e.getBoundingClientRect());c=gd(f);return{
  top:d.top+(c.pageYOffset||b.scrollTop)-(b.clientTop||0),left:d.left+(c.pageXOffset||b.scrollLeft)-(b.clientLeft||0)}},position:function(){if(!this[0])return;var a,b,c={top:0,left:0},d=this[0];if(n.css(d,"position")==="fixed")b=d.getBoundingClientRect();else{
  a=this.offsetParent();b=this.offset();n.nodeName(a[0],"html")||(c=a.offset());c.top+=n.css(a[0],"borderTopWidth",!0);c.left+=n.css(a[0],"borderLeftWidth",!0)}return{top:b.top-c.top-n.css(d,"marginTop",!0),left:b.left-c.left-n.css(d,"marginLeft",!0)}},offsetParent
  :function(){return this.map(function(){var a=this.offsetParent||fd;while(a&&!n.nodeName(a,"html")&&n.css(a,"position")==="static")a=a.offsetParent;return a||fd})}});n.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},function(a,b){var c=/Y/.test(b);n
  .fn[a]=function(d){return W(this,function(a,d,e){var f=gd(a);if(e===undefined)return f?b in f?f[b]:f.document.documentElement[d]:a[d];f?f.scrollTo(c?n(f).scrollLeft():e,c?e:n(f).scrollTop()):a[d]=e},a,d,arguments.length,null)}});n.each(["top","left"],function(
  a,b){n.cssHooks[b]=Ob(l.pixelPosition,function(a,c){if(c){c=Mb(a,b);return Kb.test(c)?n(a).position()[b]+"px":c}})});n.each({Height:"height",Width:"width"},function(a,b){n.each({padding:"inner"+a,content:b,"":"outer"+a},function(c,d){n.fn[d]=function(d,e){
  var f=arguments.length&&(c||typeof d!="boolean"),g=c||(d===!0||e===!0?"margin":"border");return W(this,function(b,c,d){var e;if(n.isWindow(b))return b.document.documentElement["client"+a];if(b.nodeType===9){e=b.documentElement;return Math.max(b.body["scroll"+
  a],e["scroll"+a],b.body["offset"+a],e["offset"+a],e["client"+a])}return d===undefined?n.css(b,c,g):n.style(b,c,d,g)},b,f?d:undefined,f,null)}})});n.fn.size=function(){return this.length};n.fn.andSelf=n.fn.addBack;typeof define=="function"&&define.amd&&define
  ("jquery",[],function(){return n});var hd=a.jQuery,id=a.$;n.noConflict=function(b){a.$===n&&(a.$=id);b&&a.jQuery===n&&(a.jQuery=hd);return n};typeof b===L&&(a.jQuery=a.$=n);return n});(function(a){typeof define=="function"?define(a):typeof YUI=="function"?YUI.add("es5",a):a()})(function(){Function.prototype.bind||(Function.prototype.bind=function(b){var c=this;if(typeof c!="function")throw new TypeError("Function.prototype.bind called on incompatible "+
  c);var e=d.call(arguments,1),f=function(){if(this instanceof f){var a=function(){};a.prototype=c.prototype;var g=new a,i=c.apply(g,e.concat(d.call(arguments)));return Object(i)===i?i:g}return c.apply(b,e.concat(d.call(arguments)))};return f});var a=Function
  .prototype.call,b=Array.prototype,c=Object.prototype,d=b.slice,e=a.bind(c.toString),f=a.bind(c.hasOwnProperty),g,i,j,k,l;if(l=f(c,"__defineGetter__")){g=a.bind(c.__defineGetter__);i=a.bind(c.__defineSetter__);j=a.bind(c.__lookupGetter__);k=a.bind(c.__lookupSetter__
  )}Array.isArray||(Array.isArray=function(b){return e(b)=="[object Array]"});Array.prototype.forEach||(Array.prototype.forEach=function(b){var c=v(this),d=arguments[1],f=-1,g=c.length>>>0;if(e(b)!="[object Function]")throw new TypeError;while(++f<g)f in c&&
  b.call(d,c[f],f,c)});Array.prototype.map||(Array.prototype.map=function(b){var c=v(this),d=c.length>>>0,f=Array(d),g=arguments[1];if(e(b)!="[object Function]")throw new TypeError(b+" is not a function");for(var i=0;i<d;i++)i in c&&(f[i]=b.call(g,c[i],i,c))
  ;return f});Array.prototype.filter||(Array.prototype.filter=function(b){var c=v(this),d=c.length>>>0,f=[],g,i=arguments[1];if(e(b)!="[object Function]")throw new TypeError(b+" is not a function");for(var j=0;j<d;j++)if(j in c){g=c[j];b.call(i,g,j,c)&&f.push
  (g)}return f});Array.prototype.every||(Array.prototype.every=function(b){var c=v(this),d=c.length>>>0,f=arguments[1];if(e(b)!="[object Function]")throw new TypeError(b+" is not a function");for(var g=0;g<d;g++)if(g in c&&!b.call(f,c[g],g,c))return!1;return!0
  });Array.prototype.some||(Array.prototype.some=function(b){var c=v(this),d=c.length>>>0,f=arguments[1];if(e(b)!="[object Function]")throw new TypeError(b+" is not a function");for(var g=0;g<d;g++)if(g in c&&b.call(f,c[g],g,c))return!0;return!1});Array.prototype
  .reduce||(Array.prototype.reduce=function(b){var c=v(this),d=c.length>>>0;if(e(b)!="[object Function]")throw new TypeError(b+" is not a function");if(!d&&arguments.length==1)throw new TypeError("reduce of empty array with no initial value");var f=0,g;if(arguments
  .length>=2)g=arguments[1];else do{if(f in c){g=c[f++];break}if(++f>=d)throw new TypeError("reduce of empty array with no initial value")}while(!0);for(;f<d;f++)f in c&&(g=b.call(void 0,g,c[f],f,c));return g});Array.prototype.reduceRight||(Array.prototype.reduceRight=
  function(b){var c=v(this),d=c.length>>>0;if(e(b)!="[object Function]")throw new TypeError(b+" is not a function");if(!d&&arguments.length==1)throw new TypeError("reduceRight of empty array with no initial value");var f,g=d-1;if(arguments.length>=2)f=arguments
  [1];else do{if(g in c){f=c[g--];break}if(--g<0)throw new TypeError("reduceRight of empty array with no initial value")}while(!0);do g in this&&(f=b.call(void 0,f,c[g],g,c));while(g--);return f});Array.prototype.indexOf||(Array.prototype.indexOf=function(b)
  {var c=v(this),d=c.length>>>0;if(!d)return-1;var e=0;arguments.length>1&&(e=t(arguments[1]));e=e>=0?e:Math.max(0,d+e);for(;e<d;e++)if(e in c&&c[e]===b)return e;return-1});Array.prototype.lastIndexOf||(Array.prototype.lastIndexOf=function(b){var c=v(this),d=
  c.length>>>0;if(!d)return-1;var e=d-1;arguments.length>1&&(e=Math.min(e,t(arguments[1])));e=e>=0?e:d-Math.abs(e);for(;e>=0;e--)if(e in c&&b===c[e])return e;return-1});if(!Object.keys){var m=!0,n=["toString","toLocaleString","valueOf","hasOwnProperty","isPrototypeOf"
  ,"propertyIsEnumerable","constructor"],o=n.length;for(var p in{toString:null})m=!1;Object.keys=function w(a){if(typeof a!="object"&&typeof a!="function"||a===null)throw new TypeError("Object.keys called on a non-object");var w=[];for(var b in a)f(a,b)&&w.push
  (b);if(m)for(var c=0,d=o;c<d;c++){var e=n[c];f(a,e)&&w.push(e)}return w}}if(!Date.prototype.toISOString||(new Date(-621987552e5)).toISOString().indexOf("-000001")===-1)Date.prototype.toISOString=function(){var b,c,d,e;if(!isFinite(this))throw new RangeError
  ("Date.prototype.toISOString called on non-finite value.");b=[this.getUTCMonth()+1,this.getUTCDate(),this.getUTCHours(),this.getUTCMinutes(),this.getUTCSeconds()];e=this.getUTCFullYear();e=(e<0?"-":e>9999?"+":"")+("00000"+Math.abs(e)).slice(0<=e&&e<=9999?-4
  :-6);c=b.length;while(c--){d=b[c];d<10&&(b[c]="0"+d)}return e+"-"+b.slice(0,2).join("-")+"T"+b.slice(2).join(":")+"."+("000"+this.getUTCMilliseconds()).slice(-3)+"Z"};Date.now||(Date.now=function(){return(new Date).getTime()});Date.prototype.toJSON||(Date.
  prototype.toJSON=function(b){if(typeof this.toISOString!="function")throw new TypeError("toISOString property is not callable");return this.toISOString()});if(!Date.parse||Date.parse("+275760-09-13T00:00:00.000Z")!==864e13)Date=function(a){var b=function e
  (b,c,d,h,f,g,i){var j=arguments.length;if(this instanceof a){var k=j==1&&String(b)===b?new a(e.parse(b)):j>=7?new a(b,c,d,h,f,g,i):j>=6?new a(b,c,d,h,f,g):j>=5?new a(b,c,d,h,f):j>=4?new a(b,c,d,h):j>=3?new a(b,c,d):j>=2?new a(b,c):j>=1?new a(b):new a;k.constructor=
  e;return k}return a.apply(this,arguments)},c=new RegExp("^(\\d{4}|[+-]\\d{6})(?:-(\\d{2})(?:-(\\d{2})(?:T(\\d{2}):(\\d{2})(?::(\\d{2})(?:\\.(\\d{3}))?)?(?:Z|(?:([-+])(\\d{2}):(\\d{2})))?)?)?)?$");for(var d in a)b[d]=a[d];b.now=a.now;b.UTC=a.UTC;b.prototype=
  a.prototype;b.prototype.constructor=b;b.parse=function(d){var e=c.exec(d);if(e){e.shift();for(var f=1;f<7;f++){e[f]=+(e[f]||(f<3?1:0));f==1&&e[f]--}var g=+e.pop(),i=+e.pop(),j=e.pop(),k=0;if(j){if(i>23||g>59)return NaN;k=(i*60+g)*6e4*(j=="+"?-1:1)}var l=+e
  [0];if(0<=l&&l<=99){e[0]=l+400;return a.UTC.apply(this,e)+k-126227808e5}return a.UTC.apply(this,e)+k}return a.parse.apply(this,arguments)};return b}(Date);var q="	\n\f\r   ᠎             　\u2028\u2029﻿";if(!String.prototype.trim||q.trim()){q="["+q+"]";var r=new 
  RegExp("^"+q+q+"*"),s=new RegExp(q+q+"*$");String.prototype.trim=function(){if(this===undefined||this===null)throw new TypeError("can't convert "+this+" to object");return String(this).replace(r,"").replace(s,"")}}var t=function(a){a=+a;a!==a?a=0:a!==0&&a!==1/0&&
  a!==-Infinity&&(a=(a>0||-1)*Math.floor(Math.abs(a)));return a},u="a"[0]!="a",v=function(a){if(a==null)throw new TypeError("can't convert "+a+" to object");return u&&typeof a=="string"&&a?a.split(""):Object(a)}});(function(a){typeof define=="function"?define(a):typeof YUI=="function"?YUI.add("es5-sham",a):a()})(function(){function b(a){try{Object.defineProperty(a,"sentinel",{});return"sentinel"in a}catch(b){}}Object.getPrototypeOf||(Object.getPrototypeOf=function(b
  ){return b.__proto__||(b.constructor?b.constructor.prototype:prototypeOfObject)});if(!Object.getOwnPropertyDescriptor){var a="Object.getOwnPropertyDescriptor called on a non-object: ";Object.getOwnPropertyDescriptor=function(c,d){if(typeof c!="object"&&typeof 
  c!="function"||c===null)throw new TypeError(a+c);if(!owns(c,d))return;var e={enumerable:!0,configurable:!0};if(supportsAccessors){var f=c.__proto__;c.__proto__=prototypeOfObject;var g=lookupGetter(c,d),i=lookupSetter(c,d);c.__proto__=f;if(g||i){g&&(e.get=g
  );i&&(e.set=i);return e}}e.value=c[d];return e}}Object.getOwnPropertyNames||(Object.getOwnPropertyNames=function(b){return Object.keys(b)});Object.create||(Object.create=function(b,c){var d;if(b===null)d={__proto__:null};else{if(typeof b!="object")throw new 
  TypeError("typeof prototype["+typeof b+"] != 'object'");var e=function(){};e.prototype=b;d=new e;d.__proto__=b}c!==void 0&&Object.defineProperties(d,c);return d});if(Object.defineProperty){var c=b({}),d=typeof document=="undefined"||b(document.createElement
  ("div"));if(!c||!d)var e=Object.defineProperty}if(!Object.defineProperty||e){var f="Property description must be an object: ",g="Object.defineProperty called on non-object: ",i="getters & setters can not be defined on this javascript engine";Object.defineProperty=
  function(b,c,d){if(typeof b!="object"&&typeof b!="function"||b===null)throw new TypeError(g+b);if(typeof d!="object"&&typeof d!="function"||d===null)throw new TypeError(f+d);if(e)try{return e.call(Object,b,c,d)}catch(j){}if(owns(d,"value"))if(supportsAccessors&&
  (lookupGetter(b,c)||lookupSetter(b,c))){var k=b.__proto__;b.__proto__=prototypeOfObject;delete b[c];b[c]=d.value;b.__proto__=k}else b[c]=d.value;else{if(!supportsAccessors)throw new TypeError(i);owns(d,"get")&&defineGetter(b,c,d.get);owns(d,"set")&&defineSetter
  (b,c,d.set)}return b}}Object.defineProperties||(Object.defineProperties=function(b,c){for(var d in c)owns(c,d)&&d!="__proto__"&&Object.defineProperty(b,d,c[d]);return b});Object.seal||(Object.seal=function(b){return b});Object.freeze||(Object.freeze=function(
  b){return b});try{Object.freeze(function(){})}catch(j){Object.freeze=function(b){return function(c){return typeof c=="function"?c:b(c)}}(Object.freeze)}Object.preventExtensions||(Object.preventExtensions=function(b){return b});Object.isSealed||(Object.isSealed=
  function(b){return!1});Object.isFrozen||(Object.isFrozen=function(b){return!1});Object.isExtensible||(Object.isExtensible=function(b){if(Object(b)!==b)throw new TypeError;var c="";while(owns(b,c))c+="?";b[c]=!0;var d=owns(b,c);delete b[c];return d})});(function(a,b){function t(a){for(var b=1,c;c=arguments[b];b++)for(var d in c)a[d]=c[d];return a}function u(a){return Array.prototype.slice.call(a)}function w(a,b){for(var c=0,d;d=a[c];c++)if(b==d)return c;return-1}function x(){var a=u(arguments),b=[];for(var c=0
  ,d=a.length;c<d;c++)a[c].length>0&&b.push(a[c].replace(/\/$/,""));return b.join("/")}function y(a,b,c){var d=b.split("/"),e=a;while(d.length>1){var f=d.shift();e=e[f]=e[f]||{}}e[d[0]]=c}function z(){}function A(a,b){a&&(this.id=this.path=this.resolvePath(a
  ));this.force=!!b}function B(a,b){this.id=a;this.path=this.resolvePath(a);this.force=b}function C(a,b){this.id=a;this.contents=b;this.dep=N(a);this.deps=[];this.path=this.dep.path}function D(a,b){var d;this.body=b;if(!a)if(c){d=i||J();if(d){this.setId(d.id
  );delete j[d.scriptId];this.then(function(a){d.complete.call(d,a)})}}else g=this;else{this.setId(a);(d=p["module_"+this.id])&&this.then(function(a){d.complete.call(d,a)})}}function E(a){var b=[];for(var c=0,d;d=a[c];c++)d instanceof H?b=b.concat(E(d.deps))
  :d instanceof B&&b.push(d);return b}function F(){for(var a=0,b;b=this.deps[a];a++)if(b.forceFetch)b.forceFetch();else{b.force=!0;b.start()}return this}function G(a){this.deps=a;this.deps.length==0&&this.complete()}function H(a){this.deps=a}function I(){this
  .entries={}}function J(){for(var a in d)if(d[a].readyState=="interactive")return j[d[a].id]}function K(){var a=u(arguments),b,c;typeof a[0]=="string"&&(b=a.shift());c=a.shift();return new D(b,c)}function L(){var a=u(arguments),b;typeof a[a.length-1]=="function"&&
  (b=a.pop());var c=new G(M(a));b&&c.then(b);return c}function M(a){var b=[];for(var c=0,d;d=a[c];c++){typeof d=="string"&&(d=N(d));v(d)&&(d=new H(M(d)));b.push(d)}return b}function N(a){var b,c;for(var d=0,e;e=L.matchers[d];d++){var f=e[0],g=e[1];if(b=a.match
  (f))return g(a)}throw new Error(a+" was not recognised by loader")}function P(){a.using=k;a.provide=l;a.loadrunner=m;return O}function Q(a){function d(b,d){c[d]=c[d]||{};c[d][a]={key:a,start:b.startTime,end:b.endTime,duration:b.endTime-(b.startTime||(new Date
  ).getTime()),status:d,origin:b}}var b,c={};if(a&&((b=o[a])||(b=p[a])||(b=n[a])))return{start:b.startTime,end:b.endTime,duration:b.endTime-(b.startTime||(new Date).getTime()),origin:b};for(var a in o)d(o[a],"met");for(var a in p)d(p[a],"inProgress");for(var a in 
  n)d(n[a],"paused");return c}function R(){n={};o={};p={};L.bundles=new I;B.exports={};D.provided={}}function S(a){return L.bundles.get(a)||undefined}var c=a.attachEvent&&!a.opera,d=b.getElementsByTagName("script"),e,f=b.createElement("script"),g,i,j={},k=a.
  using,l=a.provide,m=a.loadrunner,n={},o={},p={};for(var q=0,r;r=d[q];q++)if(r.src.match(/loadrunner\.js(\?|#|$)/)){e=r;break}var s=function(){var a=0;return function(){return a++}}(),v=Array.isArray||function(a){return a.constructor==Array};z.prototype.then=
  function(b){this.callbacks=this.callbacks||[];this.callbacks.push(b);this.completed?b.apply(a,this.results):this.callbacks.length==1&&this.start();return this};z.prototype.key=function(){this.id||(this.id=s());return"dependency_"+this.id};z.prototype.start=
  function(){var a=this,b,c;this.startTime=(new Date).getTime();if(b=o[this.key()])this.complete.apply(this,b.results);else if(c=p[this.key()])c.then(function(){a.complete.apply(a,arguments)});else if(this.shouldFetch()){p[this.key()]=this;this.fetch()}else{
  n[this.key()]=n[this.key()]||[];n[this.key()].push(this)}};z.prototype.shouldFetch=function(){return!0};z.prototype.complete=function(){var b;this.endTime=(new Date).getTime();delete p[this.key()];o[this.key()]||(o[this.key()]=this);if(!this.completed){this
  .results=u(arguments);this.completed=!0;if(this.callbacks)for(var c=0,d;d=this.callbacks[c];c++)d.apply(a,this.results);if(b=n[this.key()]){for(var c=0,e;e=b[c];c++)e.complete.apply(e,arguments);delete n[this.key()]}}};A.autoFetch=!0;A.prototype.start=function(
  ){var a=this,b;(b=S(this.id))?b.then(function(){a.start()}):z.prototype.start.call(this)};A.xhrTransport=function(){var a,b=this;if(window.XMLHttpRequest)a=new window.XMLHttpRequest;else try{a=new window.ActiveXObject("Microsoft.XMLHTTP")}catch(c){return new 
  Error("XHR not found.")}a.onreadystatechange=function(){var c;a.readyState==4&&b.loaded(a.responseText)};a.open("GET",this.path,!0);a.send(null)};A.scriptTagTransport=function(){var b=f.cloneNode(!1),c=this;this.scriptId="LR"+s();b.id=this.scriptId;b.type="text/javascript"
  ;b.async=!0;b.onerror=function(){throw new Error(c.path+" not loaded")};b.onreadystatechange=b.onload=function(b){b=a.event||b;if(b.type=="load"||w(["loaded","complete"],this.readyState)>-1){this.onreadystatechange=null;c.loaded()}};b.src=this.path;i=this;
  d[0].parentNode.insertBefore(b,d[0]);i=null;j[this.scriptId]=this};A.prototype=new z;A.prototype.resolvePath=function(a){a=a.replace(/^\$/,L.path.replace(/\/$/,"")+"/");return a};A.prototype.key=function(){return"script_"+this.id};A.prototype.shouldFetch=function(
  ){return A.autoFetch||this.force};A.prototype.fetch=A.scriptTagTransport;A.prototype.loaded=function(){this.complete()};B.exports={};B.prototype=new A;B.prototype.start=function(){var a=this,b,c;(b=D.provided[this.id])?b.then(function(b){a.complete.call(a,
  b)}):(c=S(this.id))?c.then(function(){a.start()}):A.prototype.start.call(this)};B.prototype.key=function(){return"module_"+this.id};B.prototype.resolvePath=function(a){return x(L.path,a+".js")};B.prototype.loaded=function(){var a,b,d=this;if(!c){a=g;g=null
  ;if(a){a.setId(this.id);a.then(function(a){d.complete.call(d,a)})}else if(!D.provided[this.id])throw new Error("Tried to load '"+this.id+"' as a module, but it didn't have a 'provide()' in it.")}};C.prototype=new A;C.prototype.start=function(){var a=this,b
  ,c,d;for(var e=0,f=this.contents.length;e<f;e++){c=N(this.contents[e]);this.deps.push(c);d=c.key();!o[d]&&!p[d]&&!n[d]&&(n[d]=this)}A.prototype.start.call(this)};C.prototype.loaded=function(){var a,b,c=this,d,e;for(var f=0,g=this.deps.length;f<g;f++){d=this
  .deps[f];e=d.key();delete n[e];o[e]=this}A.prototype.loaded.call(this)};D.provided={};D.prototype=new z;D.prototype.key=function(){this.id||(this.id="anon_"+s());return"definition_"+this.id};D.prototype.setId=function(a){this.id=a;D.provided[a]=this};D.prototype
  .fetch=function(){var a=this;typeof this.body=="object"?this.complete(this.body):typeof this.body=="function"&&this.body(function(b){a.complete(b)})};D.prototype.complete=function(a){a=a||{};this.id&&(this.exports=B.exports[this.id]=a);z.prototype.complete
  .call(this,a)};G.prototype=new z;G.prototype.fetch=function(){function b(){var b=[];for(var c=0,d;d=a.deps[c];c++){if(!d.completed)return;d.results.length>0&&(b=b.concat(d.results))}a.complete.apply(a,b)}var a=this;for(var c=0,d;d=this.deps[c];c++)d.then(b
  );return this};G.prototype.forceFetch=F;G.prototype.as=function(a){var b=this;return this.then(function(){var c=E(b.deps),d={};for(var e=0,f;f=c[e];e++)y(d,f.id,arguments[e]);a.apply(this,[d].concat(u(arguments)))})};H.prototype=new z;H.prototype.fetch=function(
  ){var a=this,b=0,c=[];(function d(){var e=a.deps[b++];e?e.then(function(a){e.results.length>0&&(c=c.concat(e.results));d()}):a.complete.apply(a,c)})();return this};H.prototype.forceFetch=F;I.prototype.push=function(a){var b;for(var c in a){b=new C(c,a[c]);
  for(var d=0,e;e=a[c][d];d++){this.entries[e]=this.entries[e]||[];this.entries[e].push(b)}}};I.prototype.get=function(a){if(typeof this.entries[a]=="undefined")return null;for(var b=0,c;c=this.entries[a][b];b++)if(typeof c.startTime!="undefined")return c;return this
  .entries[a][0]};var O=function(a){return a(L,K,O)};O.Script=A;O.Module=B;O.Collection=G;O.Sequence=H;O.Definition=D;O.Dependency=z;O.noConflict=P;O.debug=Q;O.reset=R;a.loadrunner=O;a.using=L;a.provide=K;L.path="";L.bundles=new I;L.matchers=[];L.matchers.add=
  function(a,b){this.unshift([a,b])};L.matchers.add(/^(lr!)?[a-zA-Z0-9_\/.-]+$/,function(a){var b=new B(a.replace(/^lr!/,""));return b});L.matchers.add(/(^script!|\.js$)/,function(a){var b=new A(a.replace(/^script!/,""));return b});if(e){L.path=e.getAttribute
  ("data-path")||e.src.split(/loadrunner\.js/)[0]||"";(main=e.getAttribute("data-main"))&&L.apply(a,main.split(/\s*,\s*/)).then(function(){})}})(this,document);(function(a){loadrunner(function(b,c){function e(a,b){return new loadrunner.Definition(a,function(a){a(b())})}var d;a.deferred=e;b.matchers.add(/(^script!|\.js(!?)$)/,function(a){var b=!!a.match(/!$/);a=a.replace(/!$/,"");if(d=loadrunner.Definition.provided
  [a])return d;var c=new loadrunner.Script(a,b);b&&c.start();return c})})})(this);(function(a){loadrunner(function(b,c){function d(a){return Array.prototype.slice.call(a)}function f(a,b){for(var c=0,d;d=a[c];c++)if(b==d)return c;return-1}function g(a,b){var c=b.id||"",d=c.split("/");d.pop();var e=a.split("/"),f=!1;while(e[0]==".."&&d.length
  ){d.pop();e.shift();f=!0}if(e[0]=="."){e.shift();f=!0}f&&(e=d.concat(e));return e.join("/")}function i(a,b){function d(a){return loadrunner.Module.exports[g(a.replace(/^.+!/,""),b)]}var c=[];for(var e=0,f=a.length;e<f;e++){if(a[e]=="require"){c.push(d);continue}
  if(a[e]=="exports"){b.exports=b.exports||{};c.push(b.exports);continue}if(a[e]=="module"){c.push(b);continue}c.push(d(a[e]))}return c}function j(){var a=d(arguments),c=[],j,k;typeof a[0]=="string"&&(j=a.shift());e(a[0])&&(c=a.shift());k=a.shift();var l=new 
  loadrunner.Definition(j,function(a){function l(){var b=i(d(c),j),e;typeof k=="function"?e=k.apply(j,b):e=k;typeof e=="undefined"&&(e=j.exports);a(e)}var e=[],j=this;for(var m=0,n=c.length;m<n;m++){var o=c[m];f(["require","exports","module"],o)==-1&&e.push(
  g(o,j))}e.length>0?b.apply(this,e.concat(l)):l()});return l}var e=Array.isArray||function(a){return a.constructor==Array};a.define=j})})(this);loadrunner(function(a,b,c,d){function e(a){this.id=this.path=a}e.loaded={};e.prototype=new c.Dependency;e.prototype.start=function(){if(e.loaded[this.path])this.complete();else{e.loaded[this.path]=!0;this.load()}};e.prototype.load=function(){var a,b,c,d=document
  ,e=this.path,f='link[href="'+e+'"]',g=$.browser;if($(f).length>0)return this.complete();var i=function(){clearTimeout(b);a.onload=a.onerror=null;this.complete()}.bind(this);a=d.createElement("link");a.setAttribute("rel","stylesheet");a.setAttribute("href",
  e);a.setAttribute("charset","utf-8");a.onload=a.onerror=i;(d.head||d.getElementsByTagName("head")[0]).insertBefore(a,d.getElementById("async-css-placeholder"))};a.matchers.add(/^css!/,function(a){a=a.replace(/^css!/,"");return new e(a)})});var Hogan={};(function(a,b){function c(a,b,c){var d,e;b&&typeof b=="object"&&(b[a]!=null?d=b[a]:c&&b.get&&typeof b.get=="function"&&(d=b.get(a)));return d}function d(a,b,c,d){function e(){}function f(){}e.prototype=a;f.prototype=a.subs;var g,i=new e;i.subs=new 
  f;i.subsText={};i.ib();for(g in b){i.subs[g]=b[g];i.subsText[g]=d}for(g in c)i.partials[g]=c[g];return i}function l(a){return String(a===null||a===undefined?"":a)}function m(a){a=l(a);return k.test(a)?a.replace(e,"&amp;").replace(f,"&lt;").replace(g,"&gt;"
  ).replace(i,"&#39;").replace(j,"&quot;"):a}a.Template=function(a,b,c,d){a=a||{};this.r=a.code||this.r;this.c=c;this.options=d||{};this.text=b||"";this.partials=a.partials||{};this.subs=a.subs||{};this.ib()};a.Template.prototype={r:function(a,b,c){return""}
  ,v:m,t:l,render:function(b,c,d){return this.ri([b],c||{},d)},ri:function(a,b,c){return this.r(a,b,c)},ep:function(a,b){var c=this.partials[a],e=b[c.name];if(c.instance&&c.base==e)return c.instance;if(typeof e=="string"){if(!this.c)throw new Error("No compiler available."
  );e=this.c.compile(e,this.options)}if(!e)return null;this.partials[a].base=e;if(c.subs){this.activeSub===undefined&&(b.stackText=this.text);e=d(e,c.subs,c.partials,b.stackText||this.text)}this.partials[a].instance=e;return e},rp:function(a,b,c,d){var e=this
  .ep(a,c);return e?e.ri(b,c,d):""},rs:function(a,b,c){var d=a[a.length-1];if(!n(d)){c(a,b,this);return}for(var e=0;e<d.length;e++){a.push(d[e]);c(a,b,this);a.pop()}},s:function(a,b,c,d,e,f,g){var i;if(n(a)&&a.length===0)return!1;typeof a=="function"&&(a=this
  .ms(a,b,c,d,e,f,g));i=!!a;!d&&i&&b&&b.push(typeof a=="object"?a:b[b.length-1]);return i},d:function(a,b,d,e){var f,g=a.split("."),i=this.f(g[0],b,d,e),j=this.options.modelGet,k=null;if(a==="."&&n(b[b.length-2]))i=b[b.length-1];else for(var l=1;l<g.length;l++
  ){f=c(g[l],i,j);if(f!=null){k=i;i=f}else i=""}if(e&&!i)return!1;if(!e&&typeof i=="function"){b.push(k);i=this.mv(i,b,d);b.pop()}return i},f:function(a,b,d,e){var f=!1,g=null,i=!1,j=this.options.modelGet;for(var k=b.length-1;k>=0;k--){g=b[k];f=c(a,g,j);if(f!=
  null){i=!0;break}}if(!i)return e?!1:"";!e&&typeof f=="function"&&(f=this.mv(f,b,d));return f},ls:function(a,b,c,d,e){var f=this.options.delimiters;this.options.delimiters=e;this.b(this.ct(l(a.call(b,d)),b,c));this.options.delimiters=f;return!1},ct:function(
  a,b,c){if(this.options.disableLambda)throw new Error("Lambda features disabled.");return this.c.compile(a,this.options).render(b,c)},b:b?function(a){this.buf.push(a)}:function(a){this.buf+=a},fl:b?function(){var a=this.buf.join("");this.buf=[];return a}:function(
  ){var a=this.buf;this.buf="";return a},ib:function(){this.buf=b?[]:""},ms:function(a,b,c,d,e,f,g){var i,j=b[b.length-1],k=a.call(j);if(typeof k=="function"){if(d)return!0;i=this.activeSub&&this.subsText[this.activeSub]?this.subsText[this.activeSub]:this.text
  ;return this.ls(k,j,c,i.substring(e,f),g)}return k},mv:function(a,b,c){var d=b[b.length-1],e=a.call(d);return typeof e=="function"?this.ct(l(e.call(d)),d,c):e},sub:function(a,b,c,d){var e=this.subs[a];if(e){this.activeSub=a;e(b,c,this,d);this.activeSub=!1}
  }};var e=/&/g,f=/</g,g=/>/g,i=/\'/g,j=/\"/g,k=/[&<>\"\']/,n=Array.isArray||function(a){return Object.prototype.toString.call(a)==="[object Array]"}})(typeof exports!="undefined"?exports:Hogan);(function(){var a=0,b=["ms","moz","webkit","o"];for(var c=0;c<b.length&&!window.requestAnimationFrame;++c){window.requestAnimationFrame=window[b[c]+"RequestAnimationFrame"];window.cancelAnimationFrame=window[b[c]+"CancelAnimationFrame"]||window[b[c]+"CancelRequestAnimationFrame"
  ]}window.requestAnimationFrame||(window.requestAnimationFrame=function(b,c){var d=(new Date).getTime(),e=Math.max(0,16-(d-a)),f=window.setTimeout(function(){b(d+e)},e);a=d+e;return f});window.cancelAnimationFrame||(window.cancelAnimationFrame=function(a){clearTimeout
  (a)})})();/*!
   * jQuery Migrate - v1.2.1 - 2013-05-08
   * https://github.com/jquery/jquery-migrate
   * Copyright 2005, 2013 jQuery Foundation, Inc. and other contributors; Licensed MIT
   */(function(a,b,c){function e(c){var e=b.console;if(!d[c]){d[c]=!0;a.migrateWarnings
  .push(c);if(e&&e.warn&&!a.migrateMute){e.warn("JQMIGRATE: "+c);a.migrateTrace&&e.trace&&e.trace()}}}function f(b,c,d,f){if(Object.defineProperty)try{Object.defineProperty(b,c,{configurable:!0,enumerable:!0,get:function(){e(f);return d},set:function(a){e(f)
  ;d=a}});return}catch(g){}a._definePropertyBroken=!0;b[c]=d}var d={};a.migrateWarnings=[];a.migrateMute=!0;a.migrateTrace=!1;!a.migrateMute&&b.console&&b.console.log&&b.console.log("JQMIGRATE: Logging is active");a.migrateTrace===c&&(a.migrateTrace=!0);a.migrateReset=
  function(){d={};a.migrateWarnings.length=0};document.compatMode==="BackCompat"&&e("jQuery is not compatible with Quirks Mode");var g=a("<input/>",{size:1}).attr("size")&&a.attrFn,i=a.attr,j=a.attrHooks.value&&a.attrHooks.value.get||function(){return null},
  k=a.attrHooks.value&&a.attrHooks.value.set||function(){return c},l=/^(?:input|button)$/i,m=/^[238]$/,n=/^(?:autofocus|autoplay|async|checked|controls|defer|disabled|hidden|loop|multiple|open|readonly|required|scoped|selected)$/i,o=/^(?:checked|selected)$/i
  ;f(a,"attrFn",g||{},"jQuery.attrFn is deprecated");a.attr=function(b,d,f,j){var k=d.toLowerCase(),p=b&&b.nodeType;if(j){i.length<4&&e("jQuery.fn.attr( props, pass ) is deprecated");if(b&&!m.test(p)&&(g?d in g:a.isFunction(a.fn[d])))return a(b)[d](f)}d==="type"&&
  f!==c&&l.test(b.nodeName)&&b.parentNode&&e("Can't change the 'type' of an input or button in IE 6/7/8");if(!a.attrHooks[k]&&n.test(k)){a.attrHooks[k]={get:function(b,d){var e,f=a.prop(b,d);return f===!0||typeof f!="boolean"&&(e=b.getAttributeNode(d))&&e.nodeValue!==!1?
  d.toLowerCase():c},set:function(b,c,d){var e;if(c===!1)a.removeAttr(b,d);else{e=a.propFix[d]||d;e in b&&(b[e]=!0);b.setAttribute(d,d.toLowerCase())}return d}};o.test(k)&&e("jQuery.fn.attr('"+k+"') may use property instead of attribute")}return i.call(a,b,d
  ,f)};a.attrHooks.value={get:function(a,b){var c=(a.nodeName||"").toLowerCase();if(c==="button")return j.apply(this,arguments);c!=="input"&&c!=="option"&&e("jQuery.fn.attr('value') no longer gets properties");return b in a?a.value:null},set:function(a,b){var c=
  (a.nodeName||"").toLowerCase();if(c==="button")return k.apply(this,arguments);c!=="input"&&c!=="option"&&e("jQuery.fn.attr('value', val) no longer sets properties");a.value=b}};var p,q,r=a.fn.init,s=a.parseJSON,t=/^([^<]*)(<[\w\W]+>)([^>]*)$/;a.fn.init=function(
  b,c,d){var f;if(b&&typeof b=="string"&&!a.isPlainObject(c)&&(f=t.exec(a.trim(b)))&&f[0]){b.charAt(0)!=="<"&&e("$(html) HTML strings must start with '<' character");f[3]&&e("$(html) HTML text after last tag is ignored");if(f[0].charAt(0)==="#"){e("HTML string cannot start with a '#' character"
  );a.error("JQMIGRATE: Invalid selector string (XSS)")}c&&c.context&&(c=c.context);if(a.parseHTML)return r.call(this,a.parseHTML(f[2],c,!0),c,d)}return r.apply(this,arguments)};a.fn.init.prototype=a.fn;a.parseJSON=function(a){if(!a&&a!==null){e("jQuery.parseJSON requires a valid JSON string"
  );return null}return s.apply(this,arguments)};a.uaMatch=function(a){a=a.toLowerCase();var b=/(chrome)[ \/]([\w.]+)/.exec(a)||/(webkit)[ \/]([\w.]+)/.exec(a)||/(opera)(?:.*version|)[ \/]([\w.]+)/.exec(a)||/(msie) ([\w.]+)/.exec(a)||a.indexOf("compatible")<0&&/(mozilla)(?:.*? rv:([\w.]+)|)/
  .exec(a)||[];return{browser:b[1]||"",version:b[2]||"0"}};if(!a.browser){p=a.uaMatch(navigator.userAgent);q={};if(p.browser){q[p.browser]=!0;q.version=p.version}q.chrome?q.webkit=!0:q.webkit&&(q.safari=!0);a.browser=q}f(a,"browser",a.browser,"jQuery.browser is deprecated"
  );a.sub=function(){function b(a,c){return new b.fn.init(a,c)}a.extend(!0,b,this);b.superclass=this;b.fn=b.prototype=this();b.fn.constructor=b;b.sub=this.sub;b.fn.init=function(e,f){f&&f instanceof a&&!(f instanceof b)&&(f=b(f));return a.fn.init.call(this,e
  ,f,c)};b.fn.init.prototype=b.fn;var c=b(document);e("jQuery.sub() is deprecated");return b};a.ajaxSetup({converters:{"text json":a.parseJSON}});var u=a.fn.data;a.fn.data=function(b){var d,f,g=this[0];if(g&&b==="events"&&arguments.length===1){d=a.data(g,b);
  f=a._data(g,b);if((d===c||d===f)&&f!==c){e("Use of jQuery.fn.data('events') is deprecated");return f}}return u.apply(this,arguments)}})(jQuery,window);using.aliases={"$bundle/boot.3783b68cf94d8f579041e380c333a81e09216f43.js":["app/ui/dialogs/age_gate_dialog","app/utils/is_iframe_message_whitelisted","app/utils/with_iframe_height_adjuster","app/utils/b2c/with_iframe_events_proxy","app/ui/dialogs/authenticated_webview_dialog","app/ui/autoplayable_media","app/ui/dialogs/block_dialog","app/ui/dialogs/block_or_report","app/ui/dialogs/block_user_dialog","app/ui/bouncer_dialog","app/ui/dialogs/buy_now_dialog","app/data/commerce/buy_now_dialog_scribe","app/ui/dialogs/captcha_challenge_dialog","app/utils/with_event_params","app/ui/dialogs/confirm_dialog","app/ui/connect_badge","app/ui/dialogs/copy_found_media_link_dialog","app/ui/compose/updating_text_counter","app/ui/dialogs/with_create_or_edit_custom_timeline_dialog","app/ui/dialogs/create_custom_timeline_dialog","app/ui/with_custom_timeline_create_button","app/ui/dialogs/curate_dialog","app/ui/dashboard","app/ui/dialogs/delete_tweet_dialog","app/data/dm/utils","app/data/dm/add_participants","app/utils/dm/dm_utils","app/ui/dm/tokenized_multiselect","app/ui/dm/typeahead","app/ui/dm/compose/activity","app/ui/dm/add_participants/activity","app/ui/dm/conversation/conversation_actions","app/ui/dm/conversation/conversation_history","app/data/dm/dm_info","app/ui/dm/sending_state_indicator","app/ui/dm/conversation/delete_conversation","app/ui/dm/conversation/delete_message","app/ui/dm/conversation/emoji_bar","app/ui/b2c/feedback_panel","app/ui/with_dynamic_stylesheet","app/ui/dm/conversation/message_actions","bower_components/video-player/src/main/js/video_player","app/ui/playable_media/playable_media","app/ui/playable_media/playable_media_manager","app/ui/dm/conversation/report_conversation","app/ui/dm/conversation/report_message","app/ui/media/sensitive_media_tweets","app/ui/dm/conversation/suspicious_message","$lib/mediaelement.js","app/ui/with_tweet_click_handler","app/ui/dm/conversation/tweet_attachment","app/ui/dm/conversation/update_conversation_avatar","app/ui/dm/conversation/update_conversation_name","app/ui/dm/conversation/with_last_read_marker","app/ui/dm/conversation/activity","app/ui/dm/view_participants/activity","app/ui/dm/conversation/manager","app/data/dm/conversation","app/data/dm/with_dm_cursor","app/data/dm/delete_conversation","app/data/dm/delete_message","app/data/dm/report_conversation","app/data/dm/report_message","app/utils/promise_queue","app/data/dm/send_message","app/data/dm/suspicious_message_scribe","app/data/dm/toggle_notifications","app/data/dm/tweet_attachment","app/data/dm/update_conversation_avatar","app/data/dm/update_conversation_name","app/ui/dm/inbox/notifications_permission_request","app/ui/dm/inbox/activity","app/data/dm/inbox","app/data/dm/view_participants","app/ui/dm/dm_notice","app/ui/dm/notifications","app/ui/dm/conversation/dm_playable_media_manager","app/ui/dm/dm_popover","app/ui/dm/direct_message_compose_with_intent","app/ui/with_item_actions","app/ui/with_timestamp_updating","app/ui/compose/with_tweetbox_initialization","app/ui/user_actions_dropdown","app/ui/with_tweet_actions_helper","app/ui/with_user_actions","app/ui/dm/direct_message_dialog","app/ui/dm/direct_message_link_handler","app/utils/image/image_resizer","app/ui/dm/direct_message_media_preview","app/data/dm/direct_messages_scribe","app/data/dm/mark_as_read","app/data/dm/open_dm_dialog","app/data/dm/unread_count","app/utils/storage/indexed_db","app/data/dm/dm_cursor_storage","app/data/b2c/feedback_client","app/data/b2c/feedback_scribe","app/boot/dm/direct_messages","app/data/dm/dm_background_poller","app/data/dm/dm_foreground_poller","app/data/dm/dm_poll","app/ui/with_drag_events","app/ui/drag_state","app/data/dynamic_video_ad_fetcher","app/ui/banners/email_banner","app/data/email_banner","app/data/email_banner_scribe","app/data/embed_scribe","app/data/with_widgets","app/ui/dialogs/embed_tweet","app/data/feedback/feedback","app/ui/feedback/feedback_dialog","app/utils/image/image_loader","app/ui/with_tweet_translation","app/utils/animation","app/ui/gallery/with_stickers","app/ui/with_tweet_activity_actions","app/ui/gallery/gallery","app/data/gallery_scribe","app/ui/global_loading_indicator","app/ui/dialogs/goto_user_dialog","app/ui/dialogs/keyboard_shortcuts_dialog","bower_components/xdm.js/xdm","app/ui/with_dynamic_video_ads","app/ui/with_card","app/ui/dialogs/leadgen_confirm_dialog","app/ui/dialogs/list_membership_dialog","app/ui/dialogs/list_operations_dialog","app/ui/character_counter","app/ui/media/with_video","app/ui/media/video_trim","app/ui/dialogs/media_edit_dialog","app/utils/serialize_client_rect","app/ui/media_viewport_position_monitor","app/utils/moments/media_crop_util","app/ui/moments/media_loader","app/ui/moments/maker/moment_summary_list_dialog","app/utils/find_tweet","app/ui/more_tweet_actions_dropdown","app/utils/multiline_text_range","app/ui/multiline_ellipses","app/ui/native_notifications","app/data/native_notifications_scribe","app/utils/setup_polling_with_backoff","app/data/notification_listener","app/data/oembed","app/data/oembed_scribe","app/ui/commerce/with_email_confirmation","app/ui/dialogs/offers_dialog","app/ui/page_title","app/ui/page_visibility","app/ui/dialogs/payment_order_dialog","app/data/with_perftown_scribe","app/data/performance_stats_scribe","app/data/lists","app/data/profile_edit_btn_scribe","app/ui/with_hover_card","app/ui/profile_hovercard","app/ui/with_profile_stats","app/ui/with_handle_overflow","app/ui/profile_popup","app/data/profile_popup","app/data/profile_popup_scribe","app/data/user","app/data/commerce/discovery_profile_cta_scribe","app/boot/profile_popup","app/ui/profile/profile_navigation","app/data/promptbird/promptbird","app/data/promptbird/promptbird_scribe","app/ui/promptbird/with_promptbird_user_actions","app/ui/promptbird/promptbird_manager","app/data/promptbird/promptbird_manager","app/utils/promptbird/prompt_util","app/ui/promptbird/prompts/base_prompt","app/ui/promptbird/prompts/with_insert_slidedown","app/ui/promptbird/prompts/with_remove_slideup","app/ui/promptbird/prompts/above_timeline_prompt","app/ui/promptbird/prompts/dashboard_profile_prompt","app/ui/promptbird/prompts/base_prompt_inline","app/ui/promptbird/prompts/inline_prompt","app/ui/promptbird/prompts/inline_pointer_prompt","app/ui/promptbird/intents/base_intent","app/ui/promptbird/intents/post_then_trigger_intent","app/ui/promptbird/intents/tweet_compose_intent","app/ui/promptbird/promptbird_tweet_selection_helper","app/ui/promptbird/prompts/modal_prompt","app/boot/promptbird","app/ui/dialogs/quick_promote_dialog","app/ui/dialogs/report_dialog","app/ui/responsive_dashboard_width","app/ui/compose/retweet_with_comment","app/ui/dialogs/retweet_dialog","app/data/saved_searches","app/data/saved_searches_scribe","app/ui/search_query_source","app/data/sms_confirmation_data","app/ui/forms/select_box","app/ui/with_phone_pin_verification","app/ui/dialogs/sms_confirmation_dialog","app/data/sms_confirmation_scribe","app/data/spam_challenge","app/ui/spoonbill","app/ui/spoonbill_producer","app/data/sru_stats_scribe","app/ui/tco_preconnector","app/ui/dialogs/translation_feedback_dialog","app/ui/with_profile_tweet_stat_count_data","app/ui/with_tweet_action_animation","app/ui/with_hover_state_removal","app/ui/tweet_actions","app/ui/tweet_state_updater","app/data/typeahead/with_cache","app/data/with_datasource_helpers","app/data/typeahead/accounts_datasource","app/data/typeahead/accounts_datasource_async","app/data/typeahead/dm_conversations_datasource_async","app/data/typeahead/saved_searches_datasource","app/data/typeahead/recent_searches_datasource","app/data/typeahead/with_external_event_listeners","app/data/typeahead/topics_datasource","app/data/typeahead/trend_locations_datasource","app/data/typeahead/concierge_datasource","app/data/typeahead/selected_users_datasource","app/data/typeahead/prefill_users_datasource","app/utils/storage/indexed_db_legacy_adaptor","app/data/typeahead/typeahead","app/data/typeahead/typeahead_scribe","app/data/url_command","app/ui/dialogs/uz_survey","app/ui/with_inline_retweet","app/data/with_scribe_item_position","app/boot/app","template","lib/twitter_cldr"],"$bundle/custom_timelines.8f6c66cffef8ddbbb47ffb7602d9218349ec7d59.js":["app/pages/custom_timeline","app/ui/commerce/commerce_page","app/pages/commerce_collection"],"$bundle/frontpage.aba31ea7e457d557b7a456406c16697e44d49db6.js":["app/data/frontpage_scribe","app/ui/cookie_warning","app/pages/frontpage","app/pages/login"],"$bundle/signup.e649e3a22d8a61b2b8a62b76a5b6e5f7fa638400.js":["app/utils/common_regexp","app/ui/with_password_strength","app/data/signup_data","app/data/signup_scribe","app/ui/signup/slidedown_options","app/ui/with_shake_effect","app/ui/signup/with_signup_validation","app/ui/signup/signup_form","app/ui/signup/suggestions","app/pages/signup/signup","app/ui/signup/country_code_select","app/ui/signup/country_code_display","app/ui/signup/signup_digits_scribe","app/pages/signup/signup_digits","app/ui/signup/windows_oauth","app/pages/signup/signup_windows_oauth"],"$bundle/download.5e7b6b8e09c3bd472bf74b332e4c37b6a46bb182.js":["app/ui/download/download","app/data/download/download","app/pages/download/download"],"$bundle/profile.aee175cc24fab2e9b69307dbe42e43c54127b9b9.js":["app/ui/profile/add_header_callout","app/data/async_profile","app/ui/compose/bio_composer","app/ui/with_date_selector","app/ui/with_visibility_settings","app/ui/with_popover","app/ui/profile/birthdate_select","app/data/profile/birthdate_select_scribe","app/ui/color_picker","app/data/drag_and_drop_scribe","app/ui/droppable_image","app/ui/inline_checkbox_edit","app/ui/inline_edit","app/data/inline_edit_scribe","app/ui/profile/inline_edit_user_birthdate","app/ui/profile/inline_edit_user_color","app/ui/profile/inline_edit_user_location","app/utils/hide_or_show_divider","app/ui/with_inline_image_options","app/ui/with_inline_image_editing","app/ui/inline_profile_editing","app/ui/inline_profile_editing_initializor","app/ui/profile/legacy_profile_images_uploader","app/utils/blend_hex_color","app/ui/profile/override_user_css","app/ui/dialogs/profile_confirm_image_delete_dialog","app/ui/profile_edit_param","app/ui/profile/profile_geo_picker","app/data/profile/profile_geo_picker_scribe","app/ui/profile/profile_header_image_cropper_sync","app/boot/highline_inline_edit","app/data/related_users/related_users","app/data/related_users/related_users_scribe","app/ui/related_users/related_users","app/boot/related_users","app/data/profile/business_profiles/business_profile_scribe","app/data/profile/business_profiles/business_profile_cta_button_scribe","app/data/profile_head_scribe","app/data/profile_heading_scribe","app/data/suggested_users","app/ui/profile/business_profiles/business_profile","app/ui/profile/business_profiles/business_profile_cta_button","app/ui/media/card_thumbnails","app/ui/profile/follower_requests_reminder","app/data/media_timeline","app/ui/profile/highline_canopy","app/ui/profile/profile_content_warning","app/data/profile_content_warning_scribe","app/ui/profile/head","app/ui/dm/dm_button","app/ui/profile/social_proof","app/data/profile_social_proof_scribe","app/ui/profile/highline_profile_stats","app/ui/profile/responsive_nav","app/ui/profile/sidebar_tweetbox","app/ui/suggested_users","bower_components/flight-viewport/lib/viewport","app/ui/profile/alcohol_brand_follower_notification","app/ui/profile/balloons_animation","app/data/profile/balloons_animation_scribe","app/data/profile/tweet_impressions_module_scribe","app/boot/highline_profile","app/boot/profile_standard_tweet_timeline","app/ui/profile/empty_timeline_owner","app/ui/profile/empty_timeline_tweetbox","app/ui/prefilled_tweet","app/data/prefilled_tweet_scribe","app/ui/profile/scroll_bumps","app/data/profile/scroll_bump_scribe","app/ui/dialogs/profile_scroll_bump","app/data/users","app/ui/list_actions","app/data/list_actions","app/data/list_actions_scribe","app/ui/profile/profile_featured_list","app/data/profile_featured_list_scribe","app/pages/profile/highline_landing","app/pages/profile/highline_tweets","app/pages/profile/highline_favorites","app/ui/timelines/follower_request_timeline","app/data/follower_request","app/data/follower_request_scribe","app/ui/profile/pending_followers_title","app/pages/profile/highline_follower_requests","app/pages/profile/highline_followers","app/pages/profile/highline_following","app/pages/profile/highline_media","app/ui/timelines/list_timeline","app/ui/profile/list_create_button","app/pages/profile/highline_lists","app/ui/timelines/custom_timelines_timeline","app/pages/profile/highline_custom_timelines","app/ui/dialogs/edit_custom_timeline_dialog","app/ui/timelines/custom_timeline","app/ui/custom_timeline_follow_card","app/ui/with_curated_tweet_removal","app/ui/custom_timeline_tweet_actions","app/boot/custom_timeline","app/pages/profile/collections"],"$bundle/start.f8b07af1a5f56168a7fcfa1ee5be44ea6e68582f.js":["app/ui/contact_import_buttons","app/ui/start/navigation_monitor","app/ui/pushstate_loading_bar","app/ui/start/start_alert_modal","app/ui/start/transition_dialog","app/data/start/start_flow_scribe","app/data/start/tooltip_scribe","app/boot/start","app/boot/customize_profile","app/ui/start/start_alert_modal_with_message","app/ui/start/start_header","app/ui/start/facebook/facebook_connect","app/ui/start/facebook/facebook_profile_photo","app/ui/start/facebook/facebook_cover_photo","app/ui/start/facebook/facebook_proxy","app/data/settings/facebook_scribe","app/ui/start/setup_profile","app/ui/start/upload_avatar","app/pages/start/setup_profile","app/ui/start/contact_import_services","app/pages/start/import","app/ui/timelines/with_load_more_pagination","app/ui/timelines/with_dismissible_recommendation","app/ui/timelines/nux_recommendation_timeline","app/ui/start/with_select_all_recommendation_ui","app/data/follow_all","app/data/follow_all_scribe","app/ui/start/fixed_right_rail","app/ui/start/fixed_scroll_header","app/ui/select_all","app/data/select_all_scribe","app/data/start/timeline_scribe","app/ui/start/follow_all_button","app/pages/start/find_friends","app/ui/edit_header_button","app/boot/inline_edit","app/pages/start/first_tweet","app/ui/start/select_interests","app/ui/with_pill_list","app/ui/start/select_pill_interests","app/ui/start/start_search_input","app/ui/start/start_interest_typeahead","app/ui/account_create_event_ga","app/data/start/select_interests_data","app/pages/start/interest_list","app/ui/macaw_nymizer_signup_conversion","app/ui/start/value_of_twitter","app/pages/start/congratulations_splash","app/ui/start/recommendations_follow_all","app/pages/start/recommendations","app/pages/start/let_me_choose"],"$bundle/promptbird.197d79039fe073425a693ca1f0e8f7253f3d8b18.js":["app/ui/promptbird/import","app/ui/promptbird/boot/import","app/ui/promptbird/promote_account","app/ui/promptbird/boot/promote_account","app/ui/promptbird/account_health","app/data/promptbird/promptbird_account_health","app/data/promptbird/promptbird_account_health_scribe","app/ui/promptbird/boot/account_health","app/ui/promptbird/boot/above_timeline_account_health"],"$bundle/timeline.8c9fbed7b1438473eaae764578cacd5c0c857227.js":["app/data/tweet_actions","app/ui/with_autoplayable_media","app/utils/scale_animation_time","app/ui/expando/with_expanding_containers","app/ui/expando/expando_helpers","app/ui/gallery/with_gallery","app/ui/gallery/gallery_opener","app/ui/with_viewer_follow_state","app/ui/tweets","app/ui/tweet_injector","app/ui/expando/with_expanding_social_activity","app/ui/expando/with_expanding_conversations","app/ui/expando/with_animated_gifs","app/ui/related_tweets/timeline_related_video_tweets","app/ui/with_related_video_tweets","app/ui/expando/with_snap_reels","app/ui/expando/expanding_tweets","app/data/search/adaptive_sports_schedule_scribe","app/utils/boomerang","app/data/contact_import","app/data/contact_import_scribe","app/data/search/adaptive_sports_schedule","app/ui/compose/dashboard_tweetbox","app/ui/dynamic_card_watcher","app/ui/who_to_follow/import_loading_dialog","app/utils/oauth_popup","app/ui/with_import_services","app/ui/who_to_follow/import_services","app/ui/inline_tweet_compose","app/data/moments/moments_timeline_injection_scribe","app/data/notifications_register","app/data/partner_id_sync","app/ui/profile/profile_card","app/data/profile_card_scribe","app/ui/profile_stats","app/data/suggestion_dismiss","app/data/related_tweets/related_video_tweets","app/ui/scrollable_range","app/ui/scroll_monitor","app/ui/visibility_monitor","app/boot/smart_infinite_scroll","app/data/trends","app/data/trends/location_dialog","app/data/trends/recent_locations","app/utils/scribe_event_initiators","app/data/trends_scribe","app/ui/trends/trends","app/ui/trends/dialog/with_location_info","app/ui/trends/dialog/location_dropdown","app/ui/trends/dialog/location_search","app/ui/trends/dialog/current_location","app/ui/trends/dialog/with_location_list_picker","app/ui/trends/dialog/nearby_trends","app/ui/trends/dialog/recent_trends","app/ui/trends/dialog/dialog","app/boot/trends","app/ui/fullscreen_scroll","app/data/timeline","app/boot/timeline","app/data/activity_popup","app/ui/dialogs/activity_popup","app/data/activity_popup_scribe","app/boot/activity_popup","app/data/conversations","app/data/curation","app/data/moments/maker/user_moment_data","app/data/moments/maker/moment_maker_item_data","app/data/media_tags","app/ui/timelines/new_items_bar","app/ui/promoted_autoplay_photo_gallery","app/data/tweet_activity_counts_scribe","app/data/tweet_translation","app/ui/user_actions","app/data/commerce/tweet_pivots_scribe","app/boot/tweets","app/boot/help_pips_enable","app/data/help_pips","app/data/help_pips_scribe","app/ui/help_pip","app/ui/help_pips_injector","app/boot/help_pips","app/ui/expando/close_all_button","app/ui/with_timeline_tweet_actions_kb_shortcuts","app/ui/timeline_tweet_actions","app/ui/expando/with_sync_tweet_action_counts","app/ui/profile/highline_tweet_stats","app/ui/with_dismiss_tweet","app/ui/timelines/with_dismissible_promoted_tweets","app/ui/with_block_kb_shortcut_helpers","app/ui/timelines/with_keyboard_navigation","app/ui/with_focus_highlight","app/ui/timelines/with_accessible_timeline_item_labels","app/ui/timelines/with_deduping","app/ui/timelines/base_timeline","app/ui/timelines/with_old_items","app/ui/timelines/with_traveling_ptw","app/ui/timelines/with_autoplaying_timeline","app/ui/timelines/with_polling","app/ui/timelines/with_new_items","app/ui/timelines/with_activity_supplements","app/ui/timelines/with_pinned_stream_items","app/ui/timelines/paginating_timeline","app/ui/timelines/with_min_max_pagination","app/ui/timelines/with_separated_modules","app/utils/with_slide_and_fade_animation","app/ui/with_conversation_actions","app/ui/timelines/with_dismissible_suggestions","app/ui/timelines/with_dismissible_messages","app/ui/timelines/with_tweets_displayed_reporting","app/ui/timelines/tweet_timeline","app/ui/timelines/promoted_tweet_kenburn","app/ui/timelines/promoted_qualified_impression","app/boot/tweet_timeline","app/ui/timelines/tweet_visibility","app/data/tweet_visibility_scribe","app/ui/who_to_follow/with_import_prompt","app/ui/who_to_follow/with_user_recommendations","app/ui/who_to_follow/who_to_follow_dashboard","app/data/who_to_follow","app/data/who_to_follow_scribe","app/ui/who_to_follow/who_to_follow_timeline","app/data/who_to_follow/wtf_import_prompt_scribe","app/ui/timelines/wtf/with_wtf_module","app/ui/timelines/wtf/large_carousel","app/ui/timelines/wtf/suggest","app/ui/timelines/wtf/tweet_forward","app/data/media_thumbnails_scribe","app/utils/is_showing_avatar_options","$lib/jquery_ui.profile.js","$lib/jquery_webcam.js","app/ui/settings/with_cropper","app/ui/with_verify_upload_type","app/ui/dialogs/profile_image_upload_dialog_base","app/ui/settings/with_webcam","app/ui/settings/with_html5_webcam","app/ui/dialogs/profile_image_upload_dialog","app/data/settings/profile_image_upload_scribe","app/ui/alert_banner_to_message_drawer","app/ui/image_uploader","app/ui/settings/change_photo","app/data/settings","app/ui/start/htl_avatar_editor","app/pages/home","app/boot/wtf_module","app/boot/connect","app/ui/activity_profile_card_actions","app/boot/mentions_interactions","app/pages/connect/interactions","app/pages/connect/mentions","app/boot/notifications","app/pages/notifications/all_notifications","app/pages/notifications/mention_notifications","app/pages/notifications/verified_notifications","app/utils/options_with_scribe_component","app/ui/gallery/with_grid","app/ui/search/with_search_scribe_data","app/ui/timelines/base_search_timeline","app/boot/search/adaptive_search_timeline","app/ui/timelines/media_timeline","app/boot/media_timeline","app/ui/with_stream_users","app/ui/timelines/with_excluded_ids_pagination","app/ui/timelines/with_grid_keyboard_navigation","app/boot/user_grid_timeline","app/data/search/adaptive_filters_bar_scribe","app/ui/search/adaptive/adaptive_saved_search","app/ui/dropdown_toggle","app/boot/search/adaptive_search","app/data/search/adaptive_news_headline_scribe","app/data/search/adaptive_related_searches_scribe","app/data/search/adaptive_spelling_suggestion_scribe","app/ui/search/adaptive/adaptive_news_headline","app/ui/search/adaptive/adaptive_related_searches","app/ui/search/adaptive/adaptive_spelling_suggestion","app/pages/search/adaptive/news","app/pages/search/adaptive/default","app/ui/search/communities/gallery","app/ui/profile/sidebar_arrangement","app/boot/search/communities","app/pages/search/adaptive/communities","app/data/search/adaptive_place_scribe","app/ui/search/adaptive/adaptive_place","app/pages/search/adaptive/place","app/ui/search/sport/live_schedule","app/ui/search/sport/live_score","app/data/search/sport/schedule","app/boot/search/sport/schedule","app/boot/search/sport","app/data/adaptive_sports/adaptive_sports_score_module_scribe","app/pages/search/adaptive/soccer","app/pages/search/adaptive/stickers","app/pages/simple_t1","lib/hogan/template","lib/mediaelement"],"$bundle/permalink.62e52c440c59ca7e73a893d141e4ab8c39519245.js":["app/ui/permalink_keyboard_support","app/ui/hidden_ancestors","app/ui/hidden_descendants","app/ui/dialogs/sms_codes","app/ui/permalink_tweet","app/ui/timelines/conversations/descendant_timeline","app/ui/timelines/with_simple_new_items","app/ui/timelines/conversations/ancestor_timeline","app/ui/timelines/conversations/permalink_promoted_timeline","app/ui/with_permalinktweet_tweet_actions","app/ui/timelines/overlay_tweet_visibility","app/data/permalink_scribe","app/ui/dialogs/permalink_profile_overlay","app/data/permalink_profile_overlay_scribe","app/boot/permalink_profile_overlay","app/ui/threaded_permalink_actions","app/data/threaded_permalink_actions_scribe","app/data/threaded_conversations","app/ui/related_tweets/related_tweets","app/data/related_tweets/related_tweets_scribe","app/boot/related_tweets_siderail","app/ui/timelines/with_overlay_timeline","app/pages/permalink","app/ui/threaded_permalink_tweet","app/pages/threaded_permalink_overlay"],"$bundle/lists_permalink.262965103711eb6fc7d1544c54a9108288c86bc7.js":["app/ui/list_members_dashboard","app/data/list_members_dashboard","app/boot/list_permalink","app/pages/list/permalink_tweets","app/ui/timelines/user_timeline","app/boot/user_timeline","app/pages/list/permalink_users"],"$bundle/moments.460069d8317d3c33561d5a65f84d5be7adef7fe1.js":["app/utils/moments/moments_scribe_util","app/data/moments/moment_guide_scribe","app/ui/moments/audio_player_proxy","app/ui/moments/capsule_permalink_overlay","app/data/moments/follow_unfollow","app/ui/moments/with_moment_scribe_data","app/ui/moments/follow_unfollow","app/ui/moments/media_controls","app/data/moments/media_controls_scribe","app/data/moments/moment_capsule_scribe","app/ui/moments/moment_capsule_summary","app/ui/moments/video_player_proxy","app/boot/moments/moments","app/pages/moments/moments_guide","app/ui/moments/moment_capsule_card_loader","app/ui/moments/moment_capsule_menu","app/ui/moments/moment_capsule_share_link","app/ui/moments/moment_cover_siderail","app/data/moments/moment_oembed","app/data/moments/moment_permalink_scribe","app/ui/moments/moment_share_actions_dialog","app/ui/moments/moment_sensitive_content_dialog","app/ui/page_bottom_scroll_watcher","app/pages/moments/moments_permalink"],"$bundle/moment_maker.9af764c3dfe7e3ba433f588e552b3a19a47579a9.js":["app/ui/moments/audio_player_proxy","app/ui/moments/capsule_permalink_overlay","app/data/moments/follow_unfollow","app/utils/moments/moments_scribe_util","app/ui/moments/with_moment_scribe_data","app/ui/moments/follow_unfollow","app/ui/moments/media_controls","app/data/moments/media_controls_scribe","app/data/moments/moment_capsule_scribe","app/ui/moments/moment_capsule_summary","app/ui/moments/video_player_proxy","app/boot/moments/moments","app/ui/moments/moment_capsule_card_loader","app/ui/moments/moment_capsule_menu","app/ui/moments/moment_capsule_share_link","app/ui/moments/maker/moment_maker_add_item_dialog","app/ui/moments/maker/moment_maker_reorder_buttons","app/ui/moments/maker/moment_maker_edit_meta","app/ui/moments/moment_share_actions_dialog","app/ui/page_bottom_scroll_watcher","app/pages/moments/moment_maker"],"$bundle/buy_now.0b7e1185aaaf77e62c48d022109f1de8eff49e85.js":["app/ui/commerce/error_view","app/data/commerce/with_commerce_utils","app/ui/commerce/buy_now_view","app/utils/credit_card_validator","app/ui/commerce/with_dynamic_update_number","app/ui/commerce/credit_card_input","app/ui/commerce/cvv_input","app/ui/commerce/exp_date_input","app/ui/commerce/zip_code_input","app/ui/commerce/save_payment_button","app/ui/commerce/shipping_country_select","app/ui/commerce/with_payment_form_error_handling","app/ui/commerce/with_payment_form_common","app/ui/commerce/payment_info_view","app/ui/commerce/additional_payment_info_view","app/ui/with_shake_effect","app/data/commerce/profile_type","app/ui/commerce/product_variant_selector","app/ui/commerce/buy_now_button","app/ui/commerce/rich_product_info","app/ui/commerce/product_detail_view","app/data/commerce/with_tpay_utils","app/data/commerce/with_commerce_common","app/data/commerce/with_digital_goods_support","app/data/commerce/with_commerce_form_validator","app/data/commerce/with_phone_number_store","app/data/commerce/with_buy_now_additional_payment_info","app/data/commerce/commerce","app/data/commerce/buy_now_product_detail_scribe","app/data/commerce/buy_now_payment_info_scribe","app/pages/commerce/buy_now","app/pages/commerce/buy_now_exception"],"$bundle/offers.e99466792a1c664909215b9a5f6e3e27326d88b8.js":["app/data/commerce/with_tpay_utils","app/data/commerce/with_commerce_common","app/data/commerce/offers","app/ui/commerce/offer_view","app/utils/credit_card_validator","app/ui/commerce/offers_payment_info_view","app/data/commerce/offers_scribe","app/pages/offers"],"$bundle/product.152eefabb6645beac42d9559d5f5d2d5f11e7566.js":["app/ui/commerce/commerce_page","app/pages/commerce/product"],"$bundle/discover.eeef308c4ce0904de422e3b245852f8df03949e5.js":["app/ui/timelines/user_timeline","app/boot/user_timeline","app/ui/people_search_input","app/boot/who_to_follow","app/ui/who_to_follow/pymk_kicker","app/ui/who_to_follow/wipe_addressbook_dialog","app/pages/who_to_follow/import","app/ui/who_to_follow/with_list_resizing","app/ui/who_to_follow/matched_contacts_list","app/pages/who_to_follow/matches","app/pages/who_to_follow/suggestions"],"$bundle/settings.c68c275c31efeecf3a2bd434854f9d330af53c29.js":["app/ui/alert_banner","app/ui/forms/with_submit_disable","app/ui/forms/form_value_modification","app/ui/with_forgot_password","app/pages/settings/user_data_dashboard_nav","app/data/user_data_dashboard_password_data","app/ui/user_data_dashboard_password_dialog","app/boot/settings","app/data/settings/account_scribe","app/data/form_scribe","app/ui/password_dialog","app/ui/email_field_highlight","app/ui/validating_fieldset","app/ui/email_confirmation","app/ui/settings/tweet_export","app/ui/dialogs/tweet_export_dialog","app/ui/deactivated","app/ui/settings_controls","app/pages/settings/account","app/ui/timelines/user_timeline","app/boot/user_timeline","app/ui/dialogs/block_list_export_dialog","app/data/block_list_export_dialog_scribe","app/ui/settings/blocked_accounts_actions","app/ui/dialogs/block_list_import_dialog","app/data/block_list_import_dialog_scribe","app/data/block_all","app/pages/settings/blocked","app/data/settings/login_verification_test_run","app/data/settings/backup_code","app/ui/settings/login_verification_sms_check","app/ui/login_verification_confirmation_dialog","app/ui/protected_verified_dialog","app/ui/geo_deletion","app/ui/dialogs/backup_code_dialog","app/ui/settings/backup_code_display","app/data/temporary_password","app/ui/dialogs/temporary_password_dialog","app/ui/temporary_password_button","app/pages/settings/security","app/data/settings/applications_scribe","app/ui/oauth_revoker","app/ui/settings/facebook_iframe_height_adjuster","app/pages/settings/applications","app/data/settings/confirm_deactivation_scribe","app/pages/settings/confirm_deactivation","app/ui/timelines/with_contacts_displayed_reporting","app/ui/timelines/contact_timeline","app/boot/contact_timeline","app/ui/who_to_follow/wipe_addressbook_dialog","app/ui/settings/contacts_dashboard_manager","app/pages/settings/contacts_dashboard","app/ui/design","app/data/settings/design_form_submit","app/data/settings/design_scribe","app/ui/theme_picker","app/ui/theme_preview","app/pages/settings/design","app/ui/settings/muted_accounts_actions","app/data/automated_mute_switch","app/pages/settings/muted","app/ui/settings/tweet_export_download","app/pages/settings/tweet_export_download","app/ui/settings/notifications","app/ui/settings/notifications_global","app/pages/settings/notifications","app/ui/commerce/payment_orders_view","app/utils/credit_card_validator","app/data/commerce/with_tpay_utils","app/data/commerce/with_commerce_common","app/data/commerce/with_commerce_utils","app/data/commerce/with_digital_goods_support","app/data/commerce/with_commerce_form_validator","app/data/commerce/with_phone_number_store","app/data/commerce/with_buy_now_additional_payment_info","app/data/commerce/profile_type","app/data/commerce/commerce","app/pages/settings/orders","app/ui/password","app/ui/password_match_pair","app/ui/with_password_strength","app/ui/password_strength","app/pages/settings/password","app/ui/commerce/payment_profile_view","app/data/commerce/payment_settings_scribe","app/pages/settings/payments","app/data/settings/facebook_proxy","app/ui/settings/with_facebook_container","app/ui/settings/facebook_spinner","app/ui/settings/with_facebook_banner","app/ui/settings/facebook_login","app/ui/settings/facebook_connect","app/ui/settings/facebook_missing_permissions","app/ui/settings/facebook_mismatched_connection","app/ui/settings/facebook_connection_conflict","app/ui/settings/facebook_connected","app/pages/settings/facebook","app/data/settings/sms_scribe","app/ui/settings/sms_phone_create_form","app/ui/forms/element_group_toggler","app/ui/settings/device_verified_form","app/ui/settings/sms_phone_verify_form","app/pages/settings/sms","app/ui/settings/device_registration_form","app/data/settings/device_registration_form_scribe","app/pages/settings/device_registration","app/ui/settings/notifications_request","app/data/settings/notifications_submit","app/pages/settings/web_notifications","app/pages/settings/safety","app/ui/settings/widgets","app/pages/settings/widgets","app/ui/settings/widgets_configurator","app/pages/settings/widgets_configurator","app/pages/settings/user_data_dashboard","app/pages/settings/notifications_timeline"],"$bundle/settings_internal.24d5980af7593c4d5888d4cc2e0fc77514ba9023.js":["app/ui/settings/internal/decider_override_form","app/pages/settings/internal/deciders"],"$bundle/accounts.a94eea2a8288a3cbb67eb199dcec2cc1cb9f4b77.js":["app/ui/account/password_reset_controls","app/ui/password_match_pair","app/ui/with_password_strength","app/ui/password_strength","app/pages/account/password_reset","app/ui/captcha_dialog","app/ui/account/resend_password_controls","app/ui/validating_fieldset","app/data/resend_password","app/pages/account/resend_password","app/ui/account/verify_personal_information_controls","app/pages/account/verify_personal_information","app/ui/account/verify_device_token_controls","app/pages/account/verify_device_token","app/ui/account/resend_password_help_controls","app/data/resend_password_help","app/data/resend_password_help_scribe","app/pages/account/resend_password_help","app/pages/account/errors"],"$bundle/search.96997aa2695d9198a8fb2b910ad11b11439a3472.js":["app/ui/dialogs/search_operators_dialog","app/pages/search/home","$lib/bootstrap_datepicker.js","app/ui/with_bootstrap_datepicker","app/ui/advanced_search","app/pages/search/advanced"],"$bundle/profile_alerts.39feecc0984cc43060988f7c569b850287515f41.js":["app/ui/with_redirect_after_follow","app/ui/profile/lifeline_follow","app/data/profile_alerts_scribe","app/pages/profile/alerts"],"$bundle/signup_download.8c964a5fd99e25aca3f0844968e0379e4a42ed59.js":["app/ui/signup_download/next_and_skip_buttons","app/ui/signup_download/us_phone_number_checker","app/pages/signup_download/download","app/ui/signup_download/signup_phone_verify_form","app/pages/signup_download/verify"],"$bundle/welcome_alerts.3194ce321bfe350b2e78f4f2650578e588788fcb.js":["app/ui/welcome/alerts/download_form","app/data/welcome/welcome_alerts_download_scribe","app/pages/welcome/alerts/download","app/ui/alert_banner","app/ui/forms/with_submit_disable","app/ui/forms/form_value_modification","app/pages/welcome/alerts/phone"],"$bundle/directory.5bb8717366f875004b902864cc429411910c67f8.js":["app/ui/history_back","app/pages/directory/directory"],"$bundle/boomerang.ce977240704bc785401822f8d5486667b860593d.js":["$lib/boomerang.js","app/utils/boomerang_lib"],"$bundle/loginverification.df7c4b2dab8741a44457d58bdd1fa779cc427199.js":["app/ui/login_verification_form","app/data/login_verification","app/pages/login_verification_page"],"$bundle/oauth_landing.c7a9fe5e02888fa8eb57cb26df661e257065de49.js":["app/data/oauth_landing","app/pages/oauth_landing"],"$bundle/streams.01116b8340e3d7b12f6e0403d7de5e5f3a39e402.js":["app/ui/signup/signup_call_out_expander","app/ui/streams/stream_hero_buttons","app/utils/moments/moments_scribe_util","app/ui/moments/with_moment_scribe_data","app/ui/moments/moment_capsule_summary","app/data/moments/moment_capsule_scribe","app/boot/streams","app/ui/streams/with_column_timeline","app/boot/column_timeline","app/ui/streams/stream_category_bar","app/ui/cookie_warning","app/ui/streams/tweet_forward_gifs","app/ui/media/media_preview","app/ui/streams/element_scroll_affixer","app/ui/streams/floating_footer","app/ui/signin_focus","app/ui/streams/tweet_forward_module_click","app/pages/streams/tweet_forward"]};define("bower_components/flight/lib/registry",[],function(){function a(a,b){var c,d,e,f=b.length;return typeof b[f-1]=="function"&&(f-=1,e=b[f]),typeof b[f-1]=="object"&&(f-=1),f==2?(c=b[0],d=b[1]):(c=a.node,d=b[0]),{element:c,type:d,callback:e}}function b(a,b){return a.element==b.element&&a.type==b.type&&(b.callback==null||a.callback==b.callback)}function c(){function d(a){this.component=a,this.attachedTo=[],this.instances={},this.addInstance=function(a){var b=new e(a);return this.instances[a.identity]=b,this.attachedTo.push(a.node),b},this.removeInstance=function(a){delete this.instances[a.identity];var b=this.attachedTo.indexOf(a.node);b>-1&&this.attachedTo.splice(b,1),Object.keys(this.instances).length||c.removeComponentInfo(this)},this.isAttachedTo=function(a){return this.attachedTo.indexOf(a)>-1}}function e(a){this.instance=a,this.events=[],this.addBind=function(a){this.events.push(a),c.events.push(a)},this.removeBind=function(a){for(var c=0,d;d=this.events[c];c++)b(d,a)&&this.events.splice(c,1)}}var c=this;(this.reset=function(){this.components=[],this.allInstances={},this.events=[]}).call(this),this.addInstance=function(a){var b=this.findComponentInfo(a);b||(b=new d(a.constructor),this.components.push(b));var c=b.addInstance(a);return this.allInstances[a.identity]=c,b},this.removeInstance=function(a){var b=this.findComponentInfo(a);b&&b.removeInstance(a),delete this.allInstances[a.identity]},this.removeComponentInfo=function(a){var b=this.components.indexOf(a);b>-1&&this.components.splice(b,1)},this.findComponentInfo=function(a){var b=a.attachTo?a:a.constructor;for(var c=0,d;d=this.components[c];c++)if(d.component===b)return d;return null},this.findInstanceInfo=function(a){return this.allInstances[a.identity]||null},this.getBoundEventNames=function(a){return this.findInstanceInfo(a).events.map(function(a){return a.type})},this.findInstanceInfoByNode=function(a){var b=[];return Object.keys(this.allInstances).forEach(function(c){var d=this.allInstances[c];d.instance.node===a&&b.push(d)},this),b},this.on=function(b){var d=c.findInstanceInfo(this),e,f=arguments.length,g=1,h=new Array(f-1);for(;g<f;g++)h[g-1]=arguments[g];if(d){e=b.apply(null,h),e&&(h[h.length-1]=e);var i=a(this,h);d.addBind(i)}},this.off=function(){var d=a(this,arguments),e=c.findInstanceInfo(this);e&&e.removeBind(d);for(var f=0,g;g=c.events[f];f++)b(g,d)&&c.events.splice(f,1)},c.trigger=function(){},this.teardown=function(){c.removeInstance(this)},this.withRegistration=function(){this.after("initialize",function(){c.addInstance(this)}),this.around("on",c.on),this.after("off",c.off),window.DEBUG&&DEBUG.enabled&&this.after("trigger",c.trigger),this.after("teardown",{obj:c,fnName:"teardown"})}}return"use strict",new c})
  define("bower_components/flight/lib/debug",["./registry"],function(a){function b(a,c,e){e=e||{};var f=e.obj||window,g=e.path||(f==window?"window":""),h=Object.keys(f);h.forEach(function(e){(d[a]||a)(c,f,e)&&console.log([g,".",e].join(""),"->",["(",typeof f[e],")"].join(""),f[e]),Object.prototype.toString.call(f[e])=="[object Object]"&&f[e]!=f&&g.split(".").indexOf(e)==-1&&b(a,c,{obj:f[e],path:[g,e].join(".")})})}function c(a,c,d,e){!c||typeof d==c?b(a,d,e):console.error([d,"must be",c].join(" "))}function e(a,b){c("name","string",a,b)}function f(a,b){c("nameContains","string",a,b)}function g(a,b){c("type","function",a,b)}function h(a,b){c("value",null,a,b)}function i(a,b){c("valueCoerced",null,a,b)}function j(a,c){b(a,null,c)}function m(){var a=[].slice.call(arguments);l.eventNames.length||(l.eventNames=k),l.actions=a.length?a:k,q()}function n(){var a=[].slice.call(arguments);l.actions.length||(l.actions=k),l.eventNames=a.length?a:k,q()}function o(){l.actions=[],l.eventNames=[],q()}function p(){l.actions=k,l.eventNames=k,q()}function q(){try{window.localStorage&&(localStorage.setItem("logFilter_eventNames",l.eventNames),localStorage.setItem("logFilter_actions",l.actions))}catch(a){}}function r(){var a,b;try{a=window.localStorage&&localStorage.getItem("logFilter_eventNames"),b=window.localStorage&&localStorage.getItem("logFilter_actions")}catch(c){return}a&&(l.eventNames=a),b&&(l.actions=b),Object.keys(l).forEach(function(a){var b=l[a];typeof b=="string"&&b!==k&&(l[a]=b?b.split(","):[])})}"use strict";var d={name:function(a,b,c){return a==c},nameContains:function(a,b,c){return c.indexOf(a)>-1},type:function(a,b,c){return b[c]instanceof a},value:function(a,b,c){return b[c]===a},valueCoerced:function(a,b,c){return b[c]==a}},k="all",l={eventNames:[],actions:[]};return{enable:function(a){this.enabled=!!a,a&&window.console&&(console.info("Booting in DEBUG mode"),console.info("You can configure event logging with DEBUG.events.logAll()/logNone()/logByName()/logByAction()")),r(),window.DEBUG=this},registry:a,find:{byName:e,byNameContains:f,byType:g,byValue:h,byValueCoerced:i,custom:j},events:{logFilter:l,logByAction:m,logByName:n,logAll:p,logNone:o}}})
  define("bower_components/flight/lib/utils",["./debug"],function(a){function c(){var b=a.enabled&&!Object.propertyIsEnumerable("getOwnPropertyDescriptor");if(b)try{Object.getOwnPropertyDescriptor(Object,"keys")}catch(c){return!1}return b}"use strict";var b=100,d={isDomObj:function(a){return!!a.nodeType||a===window},toArray:function(a,b){b=b||0;var c=a.length,d=new Array(c-b);for(var e=b;e<c;e++)d[e-b]=a[e];return d},merge:function(){var a=arguments.length,b=new Array(a+1);if(a===0)return{};for(var c=0;c<a;c++)b[c+1]=arguments[c];return b[0]={},b[b.length-1]===!0&&(b.pop(),b.unshift(!0)),$.extend.apply(undefined,b)},push:function(a,b,c){return a&&Object.keys(b||{}).forEach(function(d){if(a[d]&&c)throw new Error('utils.push attempted to overwrite "'+d+'" while running in protected mode');typeof a[d]=="object"&&typeof b[d]=="object"?this.push(a[d],b[d]):a[d]=b[d]},this),a},getEnumerableProperty:function(a,b){return a.propertyIsEnumerable(b)?a[b]:undefined},compose:function(){var a=arguments;return function(){var b=arguments;for(var c=a.length-1;c>=0;c--)b=[a[c].apply(this,b)];return b[0]}},uniqueArray:function(a){var b={},c=[];for(var d=0,e=a.length;d<e;++d){if(b.hasOwnProperty(a[d]))continue;c.push(a[d]),b[a[d]]=1}return c},debounce:function(a,c,d){typeof c!="number"&&(c=b);var e,f;return function(){var b=this,g=arguments,h=function(){e=null,d||(f=a.apply(b,g))},i=d&&!e;return e&&clearTimeout(e),e=setTimeout(h,c),i&&(f=a.apply(b,g)),f}},throttle:function(a,c){typeof c!="number"&&(c=b);var d,e,f,g,h,i,j=this.debounce(function(){h=g=!1},c);return function(){d=this,e=arguments;var b=function(){f=null,h&&(i=a.apply(d,e)),j()};return f||(f=setTimeout(b,c)),g?h=!0:(g=!0,i=a.apply(d,e)),j(),i}},countThen:function(a,b){return function(){if(!--a)return b.apply(this,arguments)}},delegate:function(a){return function(b,c){var d=$(b.target),e;Object.keys(a).forEach(function(f){if(!b.isPropagationStopped()&&(e=d.closest(f)).length)return c=c||{},c.el=e[0],a[f].apply(this,[b,c])},this)}},once:function(a){var b,c;return function(){return b?c:(b=!0,c=a.apply(this,arguments),c)}},propertyWritability:function(a,b,d){c()&&a.hasOwnProperty(b)&&Object.defineProperty(a,b,{writable:d})},mutateProperty:function(a,b,d){var e;if(!c()||!a.hasOwnProperty(b)){d.call(a);return}e=Object.getOwnPropertyDescriptor(a,b).writable,Object.defineProperty(a,b,{writable:!0}),d.call(a),Object.defineProperty(a,b,{writable:e})}};return d})
  define("bower_components/flight/lib/advice",["./utils"],function(a){"use strict";var b={around:function(a,b){return function(){var d=0,e=arguments.length,f=new Array(e+1);f[0]=a.bind(this);for(;d<e;d++)f[d+1]=arguments[d];return b.apply(this,f)}},before:function(a,b){var c=typeof b=="function"?b:b.obj[b.fnName];return function(){return c.apply(this,arguments),a.apply(this,arguments)}},after:function(a,b){var c=typeof b=="function"?b:b.obj[b.fnName];return function(){var d=(a.unbound||a).apply(this,arguments);return c.apply(this,arguments),d}},withAdvice:function(){["before","after","around"].forEach(function(c){this[c]=function(d,e){a.mutateProperty(this,d,function(){return typeof this[d]=="function"?this[d]=b[c](this[d],e):this[d]=e,this[d]})}},this)}};return b})
  define("bower_components/flight/lib/compose",["./utils"],function(a){function c(c,d){Object.keys(c).forEach(function(e){b.indexOf(e)<0&&a.propertyWritability(c,e,d)})}function d(a,b){a.mixedIn=a.hasOwnProperty("mixedIn")?a.mixedIn:[];for(var d=0;d<b.length;d++)a.mixedIn.indexOf(b[d])==-1&&(c(a,!1),b[d].call(a),a.mixedIn.push(b[d]));c(a,!0)}"use strict";var b=["mixedIn","attrDef"];return{mixin:d}})
  define("bower_components/flight/lib/base",["./utils","./registry","./debug"],function(a,b,c){function e(a){a.events.slice().forEach(function(a){var b=[a.type];a.element&&b.unshift(a.element),typeof a.callback=="function"&&b.push(a.callback),this.off.apply(this,b)},a.instance)}function f(a,b){try{window.postMessage(b,"*")}catch(c){throw console.log("unserializable data for event",a,":",b),new Error(["The event",a,"on component",this.toString(),"was triggered with non-serializable data"].join(" "))}}function g(a){var b=[],d;this.attr=new this.attrDef;if(c.enabled&&window.console){for(var e in this.attrDef.prototype)b.push(e);d=Object.keys(a);for(var f=d.length-1;f>=0;f--)if(b.indexOf(d[f])==-1){console.warn('Passed unused attributes including "'+d[f]+'" to component "'+this.toString()+'".');break}}for(var e in this.attrDef.prototype){if(typeof a[e]=="undefined"){if(this.attr[e]===null)throw new Error('Required attribute "'+e+'" not specified in attachTo for component "'+this.toString()+'".')}else this.attr[e]=a[e];typeof this.attr[e]=="function"&&(this.attr[e]=this.attr[e].call(this))}}function h(a){var b=Object.create(a);for(var c in this.defaults)a.hasOwnProperty(c)||(b[c]=this.defaults[c]);this.attr=b}function i(a){return function(b,c){$(b.target).trigger(a,c)}}function j(){this.trigger=function(){var a,b,d,e,g,h=arguments.length-1,i=arguments[h];return typeof i!="string"&&(!i||!i.defaultBehavior)&&(h--,d=i),h==1?(a=$(arguments[0]),e=arguments[1]):(a=this.$node,e=arguments[0]),e.defaultBehavior&&(g=e.defaultBehavior,e=$.Event(e.type)),b=e.type||e,c.enabled&&window.postMessage&&f.call(this,b,d),typeof this.attr.eventData=="object"&&(d=$.extend(!0,{},this.attr.eventData,d)),a.trigger(e||b,d),g&&!e.isDefaultPrevented()&&(this[g]||g).call(this,e,d),a},this.on=function(){var b,c,d,e,f=arguments.length-1,g=arguments[f];typeof g=="object"?e=a.delegate(this.resolveDelegateRules(g)):typeof g=="string"?e=i(g):e=g,f==2?(b=$(arguments[0]),c=arguments[1]):(b=this.$node,c=arguments[0]);if(typeof e!="function"&&typeof e!="object")throw new Error('Unable to bind to "'+c+'" because the given callback is not a function or an object');return d=e.bind(this),d.target=e,d.context=this,b.on(c,d),e.bound||(e.bound=[]),e.bound.push(d),d},this.off=function(){var a,c,d,e=arguments.length-1;typeof arguments[e]=="function"&&(d=arguments[e],e-=1),e==1?(a=$(arguments[0]),c=arguments[1]):(a=this.$node,c=arguments[0]);if(d){var f=d.target?d.target.bound:d.bound||[];f&&f.some(function(a,b,c){if(a.context&&this.identity==a.context.identity)return c.splice(b,1),d=a,!0},this),a.off(c,d)}else b.findInstanceInfo(this).events.forEach(function(b){c==b.type&&a.off(c,b.callback)});return a},this.resolveDelegateRules=function(a){var b={};return Object.keys(a).forEach(function(c){if(!(c in this.attr))throw new Error('Component "'+this.toString()+'" wants to listen on "'+c+'" but no such attribute was defined.');b[this.attr[c]]=typeof a[c]=="string"?i(a[c]):a[c]},this),b},this.select=function(a){return this.$node.find(this.attr[a])},this.attributes=function(a){var b=function(){};this.attrDef&&(b.prototype=new this.attrDef);for(var c in a)b.prototype[c]=a[c];this.attrDef=b},this.defaultAttrs=function(b){a.push(this.defaults,b,!0)||(this.defaults=b)},this.initialize=function(a,b){b=b||{},this.identity||(this.identity=d++);if(!a)throw new Error("Component needs a node");return a.jquery?(this.node=a[0],this.$node=a):(this.node=a,this.$node=$(a)),this.attrDef?g.call(this,b):h.call(this,b),this},this.teardown=function(){e(b.findInstanceInfo(this))}}"use strict";var d=0;return j})
  define("bower_components/flight/lib/logger",["./utils"],function(a){function c(a){var b=a.tagName?a.tagName.toLowerCase():a.toString(),c=a.className?"."+a.className:"",d=b+c;return a.tagName?["'","'"].join(d):d}function d(a,d,e){if(!window.DEBUG||!window.DEBUG.enabled)return;var f,g,h,i,j,k,l,m,n,o;typeof e[e.length-1]=="function"&&(i=e.pop(),i=i.unbound||i),e.length==1?(h=d.$node[0],g=e[0]):e.length==2&&typeof e[1]=="object"&&!e[1].type?(h=d.$node[0],g=e[0],a=="trigger"&&(j=e[1])):(h=e[0],g=e[1],a=="trigger"&&(j=e[2])),f=typeof g=="object"?g.type:g,k=DEBUG.events.logFilter,m=k.actions=="all"||k.actions.indexOf(a)>-1,l=function(a){return a.test?a:new RegExp("^"+a.replace(/\*/g,".*")+"$")},n=k.eventNames=="all"||k.eventNames.some(function(a){return l(a).test(f)}),m&&n&&(o=[b[a],a,"["+f+"]"],j&&o.push(j),o.push(c(h)),o.push(d.constructor.describe.split(" ").slice(0,3).join(" ")),console.groupCollapsed&&a=="trigger"&&console.groupCollapsed(a,f),console.info.apply(console,o))}function e(){this.before("trigger",function(){d("trigger",this,a.toArray(arguments))}),console.groupCollapsed&&this.after("trigger",function(){console.groupEnd()}),this.before("on",function(){d("on",this,a.toArray(arguments))}),this.before("off",function(){d("off",this,a.toArray(arguments))})}"use strict";var b={on:"<-",trigger:"->",off:"x "};return e})
  define("bower_components/flight/lib/component",["./advice","./utils","./compose","./base","./registry","./logger","./debug"],function(a,b,c,d,e,f,g){function i(){var a=e.findComponentInfo(this);a&&Object.keys(a.instances).forEach(function(b){var c=a.instances[b];c&&c.instance&&c.instance.teardown()})}function j(a){var c=arguments.length,d=new Array(c-1);for(var f=1;f<c;f++)d[f-1]=arguments[f];if(!a)throw new Error("Component needs to be attachTo'd a jQuery object, native node or selector string");var g=b.merge.apply(b,d),h=e.findComponentInfo(this);$(a).each(function(a,b){if(h&&h.isAttachedTo(b))return;(new this).initialize(b,g)}.bind(this))}function k(){var a=this.mixedIn||this.prototype.mixedIn||[];return a.map(function(a){if(a.name==null){var b=a.toString().match(h);return b&&b[1]?b[1]:""}return a.name!="withBase"?a.name:""}).filter(Boolean).join(", ")}function l(){var h=arguments.length,m=new Array(h);for(var n=0;n<h;n++)m[n]=arguments[n];var o=function(){};return o.toString=o.prototype.toString=k,g.enabled&&(o.describe=o.prototype.describe=o.toString()),o.attachTo=j,o.mixin=function(){var a=l(),d=Object.create(o.prototype);return d.mixedIn=[].concat(o.prototype.mixedIn),d.defaults=b.merge(o.prototype.defaults),d.attrDef=o.prototype.attrDef,c.mixin(d,arguments),a.prototype=d,a.prototype.constructor=a,a},o.teardownAll=i,g.enabled&&m.unshift(f),m.unshift(d,a.withAdvice,e.withRegistration),c.mixin(o.prototype,m),o}"use strict";var h=/function (.*?)\s?\(/;return l.teardownAll=function(){e.components.slice().forEach(function(a){a.component.teardownAll()}),e.reset()},l})
  define("core/component",["module","require","exports","bower_components/flight/lib/component"],function(module, require, exports) {
  module.exports=require("bower_components/flight/lib/component")
  });
  define("core/registry",["module","require","exports","bower_components/flight/lib/registry"],function(module, require, exports) {
  module.exports=require("bower_components/flight/lib/registry")
  });
  define("core/clock",["module","require","exports","core/component","core/registry"],function(module, require, exports) {
  function clockComponent(){}function Clock(){this.timers=[],this.clockComponent=function(){if(!this.currentClock||!registry.findInstanceInfo(this.currentClock))this.reset(),this.currentClock=(new ClockComponent(document)).initialize(document);return this.currentClock},this.trigger=function(a,b){this.clockComponent().trigger(a,b)},this.reset=function(){this.timers=this.timers.filter(function(a){return a.noTeardown})},this.tick=function(){this.timers.forEach(function(a){a.tick(INTERVAL)})},this.setTicker=function(){this.pause(),this.ticker=window.setInterval(this.tick.bind(this),INTERVAL)},this.init=function(){this.clockComponent(),this.ticker||this.setTicker()},this.clear=function(a){a&&this.timers.splice(this.timers.indexOf(a),1)},this.setTimeoutEvent=function(a,b,c,d){if(typeof a!="string")return console.error("clock.setTimeoutEvent was passed a function instead of a string.");this.init();var e=new TimeoutTimer(a,b,c,d);return this.timers.push(e),e},this.clearTimeout=function(a){a instanceof TimeoutTimer&&this.clear(a)},this.setIntervalEvent=function(a,b,c,d){if(typeof a!="string")return console.error("clock.setIntervalEvent was passed a function instead of a string.");this.init();var e=new IntervalTimer(a,b,c,d);return this.timers.push(e),e},this.clearInterval=function(a){a instanceof IntervalTimer&&this.clear(a)},this.resume=this.restart=this.setTicker,this.pause=function(a,b){clearInterval(this.ticker||0)}}function Timer(){this.callback=function(){myClock.trigger(this.eventName,this.data)},this.clear=function(){myClock.clear(this)},this.pause=function(){this.paused=!0},this.resume=function(){this.paused=!1},this.tickUnlessPaused=this.tick,this.tick=function(){if(this.paused)return;this.tickUnlessPaused.apply(this,arguments)}}function TimeoutTimer(a,b,c,d){this.countdown=b,this.eventName=a,this.data=c,this.noTeardown=d}function IntervalTimer(a,b,c,d){this.countdown=this.interval=this.maxInterval=this.initialInterval=b,this.backoffFactor=BACKOFF_FACTOR,this.eventName=a,this.data=c,this.noTeardown=d}var defineComponent=require("core/component"),registry=require("core/registry"),ClockComponent=defineComponent(clockComponent),myClock=new Clock,INTERVAL=500,BACKOFF_FACTOR=2;module.exports=myClock;var Timeout=function(){this.tick=function(a){this.countdown-=a,this.countdown<=0&&(this.clear(),this.callback())}};Timeout.call(TimeoutTimer.prototype),Timer.call(TimeoutTimer.prototype);var Interval=function(){this.tick=function(a){this.countdown-=a;if(this.countdown<=0){this.callback();if(this.interval<this.maxInterval){var b=Math.ceil(this.interval*this.backoffFactor/INTERVAL)*INTERVAL;this.interval=Math.min(b,this.maxInterval)}this.countdown=this.interval}},this.backoff=function(a,b){this.maxInterval=a,this.backoffFactor=b||BACKOFF_FACTOR,this.interval>this.maxInterval&&(this.interval=a)},this.cancelBackoff=function(){this.interval=this.maxInterval=this.initialInterval,this.countdown=Math.min(this.countdown,this.interval),this.resume()}};Interval.call(IntervalTimer.prototype),Timer.call(IntervalTimer.prototype)
  });
  define("core/compose",["module","require","exports","bower_components/flight/lib/compose"],function(module, require, exports) {
  module.exports=require("bower_components/flight/lib/compose")
  });
  define("core/advice",["module","require","exports","bower_components/flight/lib/advice"],function(module, require, exports) {
  module.exports=require("bower_components/flight/lib/advice")
  });
  define("core/parameterize",["module","require","exports"],function(module, require, exports) {
  var tokenizerRE=/\{\{(.+?)\}\}/g;module.exports=function(a,b,c){return b?a.replace(tokenizerRE,function(a,d){if(d){if(b[d])return b[d];if(c)throw new Error("Cannot parameterize string, no replacement found for "+d);return""}return a}):a}
  });
  define("core/i18n",["module","require","exports","core/parameterize"],function(module, require, exports) {
  module.exports=require("core/parameterize")
  });
  define("core/logger",["module","require","exports","bower_components/flight/lib/logger"],function(module, require, exports) {
  module.exports=require("bower_components/flight/lib/logger")
  });
  define("core/utils",["module","require","exports","bower_components/flight/lib/utils"],function(module, require, exports) {
  module.exports=require("bower_components/flight/lib/utils")
  });
  define("debug/debug",["module","require","exports","bower_components/flight/lib/debug"],function(module, require, exports) {
  var flightDebug=require("bower_components/flight/lib/debug");module.exports=flightDebug
  });
  define("app/utils/auth_token",["module","require","exports"],function(module, require, exports) {
  var authToken;module.exports={get:function(){if(!authToken)throw new Error("authToken should have been set!");return authToken},set:function(a){authToken=a},addTo:function(a){return a.authenticity_token=authToken,a}}
  });
  define("app/data/scribe_transport",["module","require","exports"],function(module, require, exports) {
  function ScribeTransport(a){this.SESSION_BUFFER_KEY="ScribeTransport",this.SCRIBE_API_ENDPOINT="/i/jot",this.options={},a&&(this.updateOptions(a),this.registerEventHandlers(a))}ScribeTransport.prototype={flush:function(a,b){if(!a||!a.length)return;b===undefined&&(b=!!this.options.sync);if(this.options.useAjax){var c={url:this.options.url,data:$.extend(this.ajaxParams(a),this.options.requestParameters),type:"POST",dataType:"json",async:!b,headers:{"X-Twitter-Polling":!0}};this.options.debug&&(this.options.debugHandler&&(c.success=this.options.debugHandler),c.data.debug="1"),$.ajax(c)}else{var d=this.options.debug?"&debug=1":"";(new Image).src=this.options.url+"?q="+(+(new Date)).toString().slice(-4)+d+"&"+this.imageParams(a)}this.reset()},ajaxParams:function(a){if(typeof a=="string")return{log:"["+a+"]"};var b=this.options.encodeParameters;return b&&typeof b=="function"?b.apply(this,arguments):{log:JSON.stringify(a)}},imageParams:function(a){if(typeof a=="string")return"log=%5B"+a+"%5D";var b=this.options.encodeParameters;return b&&typeof b=="function"?b.apply(this,arguments):"log="+encodeURIComponent(JSON.stringify(a))},reset:function(){this.options.bufferEvents&&(this.skipUnloadFlush=!1,sessionStorage.removeItem(this.options.bufferKey))},getBuffer:function(){return sessionStorage.getItem(this.options.bufferKey)||""},logWithStorageException:function(a,b){var c={category:"client_scribe_storage_error",error:a.message,url:document.location.href,product_name:"swift",event_name:"storage_quota_exceeded",type:"js_error"};this.addCategoryField(c,c.category),this.flush(this.appendData(b,this.encodeEventData(c)))},storeData:function(a,b){try{sessionStorage.setItem(a,b)}catch(c){if(c.name!=="QuotaExceededError"&&c.message!=="QuotaExceededError"&&c.name!=="NS_ERROR_DOM_QUOTA_REACHED"&&c.name!=="QUOTA_EXCEEDED_ERR"&&c.number!==-2147024882)throw c;this.logWithStorageException(c,b)}},encodeEventData:function(a){var b=JSON.stringify(a);return this.options.useAjax||(b=encodeURIComponent(b)),b},appendData:function(a,b){return a+(a?this.SEPARATOR+b:b)},addToBuffer:function(a){var b=this.getBuffer(),c=this.encodeEventData(a),d=this.appendData(b,c);this.options.bufferSize&&this.fullBuffer(d)?this.options.useAjax?this.flush(d):(this.flush(b),this.storeData(this.options.bufferKey,c)):this.storeData(this.options.bufferKey,d)},addCategoryField:function(a,b){a._category_=b},send:function(a,b,c){if(!b||!a||this.options.bufferSize<0)return;this.addCategoryField(a,b),c||!this.options.bufferEvents||!this.options.bufferSize?this.flush([a],c):this.addToBuffer(a),this.options.debug&&$(document).trigger("scribedata."+this.options.bufferKey,a),this.options.metrics&&a.event_info!="debug"&&$(document).trigger("debugscribe",a)},fullBuffer:function(a){return a.length>=(this.options.useAjax?this.options.bufferSize*2083:2050-this.options.url.length)},updateOptions:function(a){this.options=$.extend({},this.options,a),this.options.requestParameters||(this.options.requestParameters={}),this.options.flushOnUnload===undefined&&(this.options.flushOnUnload=!0),this.options.bufferKey||(this.options.bufferKey=this.SESSION_BUFFER_KEY),this.options.bufferSize===0&&(this.options.bufferEvents=!1),this.options.useAjax===undefined&&(this.options.useAjax=!0);if(this.options.bufferEvents||this.options.bufferEvents==undefined)try{sessionStorage.setItem(this.SESSION_BUFFER_KEY+".init","test");var b=sessionStorage.getItem(this.SESSION_BUFFER_KEY+".init")=="test";sessionStorage.removeItem(this.SESSION_BUFFER_KEY+".init"),this.options.bufferEvents=b}catch(c){this.options.bufferEvents=!1}if(this.options.debug&&!this.options.debugHandler){var d=this;this.options.debugHandler=a.debugHandler||function(a){$(document).trigger("handlescribe."+d.options.bufferKey,a)}}var e=window.location.protocol==="https:"?"https:":"http:";this.options.url===undefined?this.options.useAjax?this.options.url=this.SCRIBE_API_ENDPOINT:this.options.url="https://twitter.com"+this.SCRIBE_API_ENDPOINT:this.options.url=this.options.url.replace(/^[a-z]+:/g,e).replace(/\/$/,""),this.options.bufferEvents&&this.options.bufferSize===undefined&&(this.options.bufferSize=20)},appHost:function(){return window.location.host},registerEventHandlers:function(){var a=this,b=$(document);if(this.options.bufferEvents){b.on("flushscribe."+a.options.bufferKey,function(b){a.flush(a.getBuffer(),!0)});if(this.options.flushOnUnload){var c=function(b){a.skipUnloadFlush=!b||!b.match(/http/)||!!b.match(new RegExp("^https?://"+a.appHost(),"gi")),a.skipUnloadFlush&&window.setTimeout(function(){a.skipUnloadFlush=!1},3e3)};b.on("mouseup."+this.options.bufferKey,"a",function(a){if(this.getAttribute("target")||a.button||a.metaKey||a.shiftKey||a.altKey||a.ctrlKey)return;c(this.getAttribute("href"))}),b.on("submit."+this.options.bufferKey,"form",function(a){c(this.getAttribute("action"))}),b.on("uiNavigate."+this.options.bufferKey,function(a,b){c(b.url)}),$(window).on("unload."+this.options.bufferKey,function(){a.skipUnloadFlush||a.flush(a.getBuffer(),!0),a.skipUnloadFlush=!1})}}this.SEPARATOR=this.options.useAjax?",":encodeURIComponent(",")},destroy:function(){this.flush(this.getBuffer()),$(document).off("flushscribe."+this.options.bufferKey),$(window).off("unload."+this.options.bufferKey),$(document).off("mouseup."+this.options.bufferKey),$(document).off("submit."+this.options.bufferKey),$(document).off("uiNavigate."+this.options.bufferKey)}},module.exports=new ScribeTransport
  });
  define("app/data/scribe_monitor",["module","require","exports","core/component"],function(module, require, exports) {
  function scribeMonitor(){function a(a){if(window.scribeConsole&&window.scribeConsole.postMessage){var b=window.location.protocol+"//"+window.location.host;try{window.scribeConsole.postMessage(a,b)}catch(c){var d="ScribeMonitor.postToConsole - Scribe Console error or unserializable data ["+a._category_+"]";console.error(d,a)}}}this.verifyHost=function(a){return a&&a.match(/^(staging-wily\.smf1\.twitter\.com|twitter\.com|localhost\.twitter\.com)(\:[0-9]+)?$/)},this.after("initialize",function(){this.on("keypress",function(a){if(a.charCode==205&&a.shiftKey&&a.altKey){var b="menubar=no,toolbar=no,personalbar=no,location=no,resizable=yes,status=no,dependent=yes,height=600,width=600,screenX=100,screenY=100,scrollbars=yes",c=window.location.host;this.verifyHost(c)||(c="twitter.com"),window.scribeConsole=window.open(window.location.protocol+"//"+c+"/scribe/console","scribe_console",b)}}),this.on("scribedata.ScribeTransport handlescribe.ScribeTransport",function(b,c){a(c)}),this.attr.scribesForScribeConsole&&this.on("uiSwiftLoaded uiPageChanged",function(b,c){(b.type=="uiSwiftLoaded"||!c.fromCache)&&this.attr.scribesForScribeConsole.forEach(function(b){b._category_="client_event",a(b)})})})}var defineComponent=require("core/component");module.exports=defineComponent(scribeMonitor)
  });
  define("app/data/client_event",["module","require","exports","app/data/scribe_transport"],function(module, require, exports) {
  function ClientEvent(a){this.scribeContext={},this.scribeData={},this.scribe=function(b,c){var d=a||window.scribeTransport;if(!d)throw new Error("You must create a global scribeTransport variable or pass one into this constructor.");if(!b||typeof b!="object"||c&&typeof c!="object")throw new Error("Invalid terms or data hash argument when calling ClientEvent.scribe().");if(this.scribeContext){var e=typeof this.scribeContext=="function"?this.scribeContext():this.scribeContext;b=$.extend({},e,b)}for(var f in b)b[f]=b[f]&&(""+b[f]).toLowerCase().replace(/_?[^a-z0-9_]+_?/g,"_");d.options.debug&&$.each(["client","action"],function(a,c){if(!b[c])throw new Error("You must specify a "+c+" term in your client_event.")});var c=$.extend({},c);if(this.scribeData){var g=typeof this.scribeData=="function"?this.scribeData():this.scribeData;c=$.extend({},g,c)}c.event_namespace=b,c.triggered_on=c.triggered_on||+(new Date),c.format_version=c.format_version||2,d.send(c,"client_event")}}var scribeTransport=require("app/data/scribe_transport");module.exports=new ClientEvent(scribeTransport)
  });
  define("app/utils/scribe_association_types",["module","require","exports"],function(module, require, exports) {
  module.exports={associatedTweet:1,platformCardPublisher:2,platformCardCreator:3,conversationOrigin:4,associatedUser:5,associatedTimeline:6}
  });
  define("app/data/with_scribe",["module","require","exports","app/data/client_event","core/utils"],function(module, require, exports) {
  function withScribe(){function a(a){if(!a)return;a=a.sourceEventData?a.sourceEventData:a;if(a.scribeContext||a.scribeData)return a}this.scribe=function(){var b=Array.prototype.slice.call(arguments),c,d,e,f,g;c=typeof b[0]=="string"?{action:b[0]}:b[0],b.shift();if(b[0]){e=b[0],e.sourceEventData&&(e=e.sourceEventData);if(e.scribeContext||e.scribeData)f=e.scribeContext,g=e.scribeData;(b[0].scribeContext||b[0].scribeData||b[0].sourceEventData||b.length===2)&&b.shift()}c=utils.merge({},f,c),d=typeof b[0]=="function"?b[0].bind(this)(e):b[0],d=utils.merge({},g,d),this.transport(c,d)},this.scribeOnEvent=function(b,c,d){this.on(b,function(a,b){b=b||{},this.scribe(c,b.sourceEventData||b,d)})},this.transport=function(b,c){clientEvent.scribe(b,c)}}var clientEvent=require("app/data/client_event"),utils=require("core/utils");module.exports=withScribe
  });
  define("app/utils/with_session",["module","require","exports"],function(module, require, exports) {
  function withSession(){this.setSessionItem=function(a,b){window.sessionStorage&&sessionStorage.setItem(a,b)},this.removeSessionItem=function(a){window.sessionStorage&&sessionStorage.removeItem(a)},this.getSessionItem=function(a){return window.sessionStorage&&sessionStorage.getItem(a)},this.setSessionObject=function(a,b){b===undefined?this.removeSessionItem(a):this.setSessionItem(a,JSON.stringify(b))},this.getSessionObject=function(a){var b=this.getSessionItem(a);return b===undefined?b:JSON.parse(b)}}module.exports=withSession
  });
  define("app/utils/scribe_item_types",["module","require","exports"],function(module, require, exports) {
  module.exports={tweet:0,promotedTweet:1,popularTweet:2,retweet:10,quotedTweet:23,user:3,promotedUser:4,message:6,story:7,trend:8,promotedTrend:9,popularTrend:15,list:11,search:12,savedSearch:13,peopleSearch:14,geoDetails:19,customTimeline:17,feedbackRequest:27}
  });
  define("app/data/with_interaction_data_scribe",["module","require","exports","core/compose","app/data/with_scribe","app/utils/with_session","app/utils/scribe_item_types","app/utils/scribe_association_types","app/data/client_event","core/utils"],function(module, require, exports) {
  function withInteractionDataScribe(){this.defaultAttrs({profileClickContextExpirationMs:6e5,profileClickContextSessionKey:"profileClickContext"}),compose.mixin(this,[withScribe,withSession]),this.scribeInteraction=function(a,b,c){if(!a||!b)return;typeof a=="string"&&(a={action:a});var d=a.action;if(!d)return;b=utils.merge(b,b.sourceEventData),a=this.getInteractionScribeContext(a,b);var e={};b.url&&(e.url=b.url),b.query&&(e.query=b.query),b.impressionId&&(e.promoted=!0);var f=this.interactionItem(b);f&&(e.items=[f]);var g=this.interactionTarget(b,a);g&&(e.targets=[g]),c=utils.merge(e,c,b.scribeData),b.conversationOriginTweetId&&(c.associations=c.associations||{},c.associations[associationTypes.conversationOrigin]={association_id:b.conversationOriginTweetId,association_type:itemTypes.tweet}),(d=="profile_click"||d=="mention_click")&&this.saveProfileClickContext(b);var h=(d=="report_as_spam"||d=="block")&&a.component!="report_tweet"&&a.component!="report_user";if(h){var i=this.getUserActionAssociations(b);i&&(c.associations=utils.merge(c.associations,i))}this.scribe(a,b,c)},this.interactionItem=function(a){var b={};if(a.position===0||a.position)b.position=a.position;a.impressionId&&(b.promoted_id=a.impressionId);switch(a.itemType){case"user":this.userDetails(b,a),this.suggestionDetails(b,a),this.momentsDetails(b,a);break;case"tweet":this.tweetDetails(b,a),this.cardDetails(b,a),this.translationDetails(b,a),this.conversationDetails(b,a),this.lingerDetails(b,a),this.suggestionDetails(b,a),this.momentsDetails(b,a);break;case"activity":this.activityDetails(b,a),a.activityType=="follow"?(this.userDetails(b,a),a.isNetworkActivity||(b.id=this.attr.userId)):a.listId?this.listDetails(b,a):(this.tweetDetails(b,a),this.cardDetails(b,a));break;case"story":this.storyDetails(b,a),a.tweetId?this.tweetDetails(b,a):a.userId?this.userDetails(b,a):b.item_type=itemTypes.story}return b},this.interactionTarget=function(a,b){if(this.isUserTarget(b.action,b.component)){var c=(a.isMentionClick?a.userId:a.targetUserId)||a.userId;return this.userDetails({},{userId:c})}},this.suggestionDetails=function(a,b){return b.suggestion_details&&(a.suggestion_details=b.suggestion_details),a},this.momentsDetails=function(a,b){return b.moments_details&&(a.moments_details=b.moments_details),a},this.tweetDetails=function(a,b){return a.id=b.tweetId,a.item_type=itemTypes.tweet,a.media_details||(a.media_details={}),a.media_details.photo_count=b.photoCount,b.relevanceType&&(a.is_popular_tweet=!0),b.retweetId&&(a.retweeting_tweet_id=b.retweetId),a},this.cardDetails=function(a,b){return b.cardItem&&utils.push(a,b.cardItem),a},this.translationDetails=function(a,b){return a.dest=b.dest,a},this.conversationDetails=function(a,b){b.isConversation&&(a.description="focal"),b.isConversationComponent&&(a.description=b.description,a.id=b.tweetId)},this.lingerDetails=function(a,b){b.visibility_start&&(a.visibility_start=b.visibility_start),b.visibility_end&&(a.visibility_end=b.visibility_end)},this.userDetails=function(a,b){return a.id=b.containerUserId||b.userId,a.item_type=itemTypes.user,b.feedbackToken&&(a.token=b.feedbackToken),a},this.listDetails=function(a,b){return a.id=b.listId,a.item_type=itemTypes.list,a},this.activityDetails=function(a,b){return a.activity_type=b.activityType,b.actingUserIds&&(a.acting_user_ids=b.actingUserIds),a},this.storyDetails=function(a,b){return a.story_type=b.storyType,a.story_source=b.storySource,a.social_proof_type=b.socialProofType,a},this.isUserTarget=function(a,b){return["mention_click","profile_click","follow","unfollow","block","unblock","report_as_spam","add_to_list","dm"].indexOf(a)!=-1||["profile_hover","report_user","report_tweet","report_user_abusive","report_tweet_abusive"].indexOf(b)!=-1},this.getInteractionScribeContext=function(a,b){return a.action=="profile_click"&&a.element===undefined&&(a.element=b.isPromotedBadgeClick?"promoted_badge":b.profileClickTarget),a},this.scribeInteractiveResults=function(a,b,c,d){var e=[],f=!1;typeof a=="string"&&(a={action:a});if(!a.action||!b)return;b.length||(a.action="no_results"),b.forEach(function(a){f||(f=!!a.impressionId),e.push(this.interactionItem(a))}.bind(this)),a=this.getInteractionScribeContext(a,c);var g={};e&&e.length&&(g.items=e),f&&(g.promoted=!0),this.scribe(a,c,utils.merge(g,d))},this.associationNamespace=function(a,b){var c={page:a.page,section:a.section};return["conversation","replies","in_reply_to"].indexOf(b)>=0&&(c.component=b),c},this.getProfileUserAssociations=function(){var a=this.attr.profile_user&&this.attr.profile_user.id_str,b=null;return a&&(b={},b[associationTypes.associatedUser]={association_id:a,association_type:itemTypes.user,association_namespace:this.associationNamespace(clientEvent.scribeContext)}),b},this.getProfileClickContextAssociations=function(a){var b=this.getSessionObject(this.attr.profileClickContextSessionKey)||null;return b&&b.userId==a&&b.expires>(new Date).getTime()&&b.associations||null},this.saveProfileClickContext=function(a){var b={};a.tweetId?(b[associationTypes.associatedTweet]={association_id:a.tweetId,association_type:itemTypes.tweet,association_namespace:this.associationNamespace(clientEvent.scribeContext,a.scribeContext.component)},a.conversationOriginTweetId&&(b[associationTypes.conversationOrigin]={association_id:a.conversationOriginTweetId,association_type:itemTypes.tweet})):b=this.getProfileUserAssociations(),this.setSessionObject(this.attr.profileClickContextSessionKey,{userId:a.userId,associations:b,expires:(new Date).getTime()+this.attr.profileClickContextExpirationMs})},this.getUserActionAssociations=function(a){var b=a.scribeContext.component,c;return b=="profile_dialog"||b=="profile_follow_card"?c=this.getProfileClickContextAssociations(a.userId):b=="user"?c=this.getProfileUserAssociations():c=null,c}}var compose=require("core/compose"),withScribe=require("app/data/with_scribe"),withSession=require("app/utils/with_session"),itemTypes=require("app/utils/scribe_item_types"),associationTypes=require("app/utils/scribe_association_types"),clientEvent=require("app/data/client_event"),utils=require("core/utils");module.exports=withInteractionDataScribe
  });
  define("app/utils/scribe_card_types",["module","require","exports"],function(module, require, exports) {
  module.exports={photoTweet:1,photoCard:2,playerCard:3,summaryCard:4,promotionCard:5,plusCard:6}
  });
  define("app/data/with_card_metadata",["module","require","exports","core/compose","core/utils","app/utils/scribe_association_types","app/data/with_interaction_data_scribe","app/utils/scribe_item_types","app/utils/scribe_card_types"],function(module, require, exports) {
  function withCardMetadata(){compose.mixin(this,[withInteractionDataScribe]);var a="Swift-6",b="platform_card";this.cardAssociationsForData=function(a){var b={associations:{}};return b.associations[associationTypes.platformCardPublisher]={association_id:a.publisherUserId,association_type:itemTypes.user},b.associations[associationTypes.platformCardCreator]={association_id:a.creatorUserId,association_type:itemTypes.user},b.message=a.cardUrl,b},this.getCardDataFromTweet=function(a){var b={},c=a.closest("[data-tweet-id]"),d,e,f,g,h;return c.find(".card2").length?d=c:d=$(c.attr("data-expanded-footer")),b.tweetHasCard=c.hasClass("has-cards"),g=!!d.find(".card2").length,b.interactionInsideCard=!1,g?(b.tweetHasCard2=g,b.tweetPreExpanded=c.hasClass("preexpanded"),b.itemId=c.attr("data-item-id")||null,b.promotedId=c.attr("data-impression-id")||null,f=d.find(".card2"),h=f.find(".js-macaw-cards-iframe-container"),h.length?(b.cardName=h.attr("data-card-name"),b.cardUrl=h.attr("data-card-url"),b.publisherUserId=h.attr("data-publisher-id"),b.creatorUserId=h.attr("data-creator-id"),b.amplifyContentId=h.attr("data-amplify-content-id")||null,b.amplifyPlaylistUrl=h.attr("data-amplify-playlist-url")||null):b.cardName=f.attr("data-card2-name"),b.interactionInsideCard=!!a.closest(".card2").length):b.tweetHasCard&&(b.cardType=c.data("card-type")||c.find(".js-adaptive-photo").length?"photo":""),b},this.scribeCardInteraction=function(a,b,c,d){b.tweetHasCard2?this.scribeCard2Interaction(a,b,c,d):b.tweetHasCard&&this.scribeClassicCardInteraction(a,b)},this.scribeClassicCardInteraction=function(a,c){var d=this.cardAssociationsForData(c),e=c.cardType?"platform_"+c.cardType+"_card":b;this.scribeInteraction({element:e,action:a},c,d)},this.getCard2Item=function(b){return{item_type:itemTypes.tweet,id:b.itemId,promoted_id:b.promotedId,pre_expanded:b.tweetPreExpanded||!1,card_type:cardTypes.plusCard,card_name:b.cardName,card_url:b.cardUrl,card_platform_key:a,publisher_id:b.publisherUserId,content_id:b.amplifyContentId,playlist_url:b.amplifyPlaylistUrl}},this.buildItems=function(a,b){var c=this.getCard2Item(a),d;return typeof b=="object"&&b&&(c=utils.merge(c,b)),c.collection_id?(d={item_type:17,id:c.collection_id,token:"commerce_collection"},delete c.collection_id,[c,d]):[c]},this.scribeCard2Interaction=function(a,c,d,e){var f={items:this.buildItems(c,e)};this.scribeInteraction({element:d||b,action:a},c,f)}}var compose=require("core/compose"),utils=require("core/utils"),associationTypes=require("app/utils/scribe_association_types"),withInteractionDataScribe=require("app/data/with_interaction_data_scribe"),itemTypes=require("app/utils/scribe_item_types"),cardTypes=require("app/utils/scribe_card_types");module.exports=withCardMetadata
  });
  define("app/data/with_conversation_metadata",["module","require","exports"],function(module, require, exports) {
  module.exports=function(){this.defaultAttrs({hasConversationModuleClassAlt:"has-conversation-module",conversationModuleSelectorAlt:".conversation-module",rootClass:"root",conversationRootTweetSelector:".conversation-module .conversation-tweet-item.root .tweet",conversationAncestorTweetSelector:".conversation-module .conversation-tweet-item:not(root) .tweet"}),this.getConversationAttrs=function(a){var b={},c=a.closest(".tweet");if(c.hasClass(this.attr.hasConversationModuleClass)){var d=c.closest(this.attr.conversationModuleSelector);b.isConversation=!0,b.conversationAncestors=d.attr("data-ancestors").split(",")}else c.hasClass("conversation-tweet")&&(b.isConversationComponent=!0,b.description=c.hasClass(this.attr.rootClass)?"root":"ancestor");return b},this.conversationComponentInteractionData=function(a,b){return{itemType:"tweet",tweetId:$(a).attr("data-item-id"),description:b,isConversationComponent:!0}},this.extraInteractionData=function(a){if(a.find(this.attr.conversationModuleSelector).length>0){var b=a.find(this.conversationRootTweetSelector).map(function(a,b){return this.conversationComponentInteractionData(b,"root")}.bind(this)).get(),c=a.find(this.attr.conversationAncestorTweetSelector).map(function(a,b){return this.conversationComponentInteractionData(b,"ancestor")}.bind(this)).get();return b.concat(c)}return[]},this.addConversationScribeContext=function(a,b,c){return b&&b.isConversation?(a.component="conversation",a.element="tweet"):b&&b.isConversationComponent&&(a.component="conversation",c||(a.element=b.description)),a},this.after("initialize",function(){this.attr.conversationModuleSelector||(this.attr.conversationModuleSelector=this.attr.conversationModuleSelectorAlt),this.attr.hasConversationModuleClass||(this.attr.hasConversationModuleClass=this.attr.hasConversationModuleClassAlt)})}
  });
  define("app/ui/with_interaction_data",["module","require","exports","core/compose","core/utils","app/data/with_card_metadata","app/data/with_conversation_metadata"],function(module, require, exports) {
  function withInteractionData(){compose.mixin(this,[withCardMetadata,withConversationMetadata]),this.defaultAttrs({genericInteractionItemSelector:".js-stream-item",mainTimelineStreamItemContainer:".stream-items",mainTimelineStreamItemSelector:".stream-items > .js-stream-item",expandoContainerSelector:".stream-items > .js-stream-item > .expanded-conversation",expandoAncestorSelector:".ancestor",expandoDescendantSelector:".descendant",streamItemContainerSelector:".js-stream-item, .permalink",suggestionJsonItemSelector:".js-stream-item[data-suggestion-json]",activityTargetSelector:".activity-truncated-tweet .tweet, .js-activity-list_member_added [data-list-id]",activityItemSelector:".js-activity",itemAvatarSelector:".js-action-profile-avatar, .avatar.size48",itemSmallAvatarSelector:".avatar.size24, .avatar.size32",itemMentionSelector:".twitter-atreply",originalTweetSelector:".js-original-tweet[data-tweet-id]",promotedBadgeSelector:".js-promoted-badge",userTargetSelector:".js-user-profile-link, .twitter-atreply"});var a={feedbackToken:"data-feedback-token",impressionId:"data-impression-id",lifeline:"data-lifeline",disclosureType:"data-disclosure-type",impressionCookie:"data-impression-cookie",relevanceType:"data-relevance-type",associatedTweetId:"data-associated-tweet-id"},b=utils.merge({tweetId:"data-tweet-id",retweetId:"data-retweet-id",isReplyTo:"data-is-reply-to",hasParentTweet:"data-has-parent-tweet"},a),c=utils.merge({activityType:"data-activity-type"},b),d=utils.merge({storyType:"data-story-type",storySource:"data-source"},b),e={contactId:"data-item-id",importClientApplicationId:"data-client-application-id"};this.interactionDataWithCard=function(a,b){return this.interactionData(a,b,!0)},this.interactionData=function(a,b,c){var d={},e={},f=!!c,g=a.target?$(a.target):$(a);this.setItemType(g),this.attr.eventData=utils.merge({},this.defaultEventData,!0),this.attr.eventData&&(d=this.attr.eventData.scribeContext,e=this.attr.eventData.scribeData),b=utils.merge(this.getEventData(g,f),b);var h=g.closest("[data-scribe-context]").data("scribe-context");h&&(e=utils.merge(h,e)),d=utils.merge({},d,this.getScribeContext(g,b));if(this.attr.itemType=="tweet"&&["replies","conversation","in_reply_to"].indexOf(d.component)>=0){var i=g.closest(this.attr.streamItemContainerSelector).find(this.attr.originalTweetSelector);i.length&&(b.conversationOriginTweetId=i.attr("data-tweet-id"),b.requirePixelImpression=i.hasClass("pixel-promoted-tweet"))}return utils.merge({scribeContext:d,scribeData:e},b)},this.getScribeContext=function(a,b){var c={},d=a.closest("[data-component-context]").attr("data-component-context");d&&(c.component=d);var e=a.closest("[data-element-context]").attr("data-element-context");e&&(c.element=e);if(c.element||c.component)return c},this.getInteractionItemPosition=function(a,b){if(b&&b.position>=0)return b.position;var c=this.getItemPosition&&this.getItemPosition(a);return c>=0?c:(c=this.getExpandoPosition(a),c!=-1?c:a.attr("data-is-tweet-proof")==="true"?this.getTweetProofPosition(a):this.getStreamPosition(a))},this.getExpandoPosition=function(a){var b,c=-1,d=a.closest(this.attr.expandoAncestorSelector),e=a.closest(this.attr.expandoDescendantSelector);return d.length&&(b=d.closest(this.attr.expandoContainerSelector),c=b.find(this.attr.expandoAncestorSelector).index(d)),e.length&&(b=e.closest(this.attr.expandoContainerSelector),c=b.find(this.attr.expandoDescendantSelector).index(e)),a.closest(".in-reply-to,.replies-to").length&&(b=a.closest(".in-reply-to,.replies-to"),c=b.find(".tweet").index(a.closest(".tweet"))),c},this.getTweetProofPosition=function(a){var b=a.closest(this.attr.trendItemSelector).index();return b!=-1?b:-1},this.getStreamPosition=function(a){var b;a.closest(this.attr.mainTimelineStreamItemContainer).length?b=a.closest(this.attr.mainTimelineStreamItemSelector):b=a.closest(this.attr.genericInteractionItemSelector);var c=b.parent().children(":not(.js-ignore-position)").index(b);if(c!=-1)return c},this.getEventData=function(c,d){var f,g;switch(this.attr.itemType){case"activity":return this.getActivityEventData(c);case"story":return this.getStoryEventData(c);case"user":return utils.merge(this.getDataAttrs(c,a),this.getSuggestionAttrs(c),this.getMomentsEventData(c));case"tweet":return g=utils.merge(this.getDataAttrs(c,b),this.getConversationAttrs(c),this.getSuggestionAttrs(c),this.getMomentsEventData(c)),d?utils.merge(this.getCardAttrs(c),g):g;case"list":return this.getDataAttrs(c,a);case"trend":return this.getDataAttrs(c,b);case"contact":return this.getDataAttrs(c,e);default:return console.warn('You must configure your UI component with an "itemType" attribute of activity, story, user, tweet, list, or trend in order for it to scribe properly.'),{}}},this.getActivityEventData=function(a){var b=a.closest(this.attr.activityItemSelector),d=b.find(this.attr.activityTargetSelector);d.length||(d=a);var e=this.getDataAttrs(a,c,d);e.isNetworkActivity=!!a.closest(".discover-stream").length,e.activityType||(e.isReplyTo?e.activityType="reply":e.activityType=e.retweetId?"retweet":"mention");var f=[],g=e.isNetworkActivity?".stream-item-activity-header":"ol.activity-supplement";return b.find(g+" a[data-user-id]").each(function(){f.push($(this).data("user-id"))}),f.length&&(e.actingUserIds=f),e},this.getMomentsEventData=function(a){var b={},c="data-moments-details-json",d=a.closest("["+c+"]").attr(c),e=d&&JSON.parse(d);return e&&(b.moments_details=e),b},this.getSuggestionAttrs=function(a){var b={},c=a.closest(this.attr.suggestionJsonItemSelector);if(c.length>0){var d=c.attr("data-suggestion-json"),e=d&&JSON.parse(d);e&&(b.suggestion_details=e.suggestion_details)}return b},this.getStoryEventData=function(a){var b=this.getDataAttrs(a,d);return b},this.getTargetUserId=function(a){var b=a.closest(this.attr.userTargetSelector);if(b.length)return b.closest("[data-user-id]").attr("data-user-id")||b.find("[data-user-id]").attr("data-user-id")},this.getDataAttrs=function(a,b,c){var d={};c=c||a,$.each(b,function(a,b){c.is("["+b+"]")?d[a]=c.attr(b):d[a]=c.closest("["+b+"]").attr(b)}),d.isReplyTo=d.isReplyTo==="true",d=utils.merge(d,{position:this.getInteractionItemPosition(a,d),isMentionClick:a.closest(this.attr.itemMentionSelector).length>0,isPromotedBadgeClick:a.closest(this.attr.promotedBadgeSelector).length>0,itemType:this.attr.itemType}),a.is(this.attr.itemAvatarSelector)?d.profileClickTarget="avatar":a.is(this.attr.itemSmallAvatarSelector)?d.profileClickTarget="mini_avatar":d.profileClickTarget="screen_name";var e=this.getTargetUserId(a);return e&&(d.targetUserId=e),d.userId=a.closest("[data-user-id]").attr("data-user-id"),d.containerUserId=c.closest("[data-user-id]").attr("data-user-id"),d},this.getCardAttrs=function(a){var b=this.getCardDataFromTweet(a);return b.tweetHasCard2?{cardItem:this.getCard2Item(b)}:{}},this.setItemType=function(a){var b=a.closest("[data-item-type]");this.attr.itemType=b.data("item-type")||this.defaultItemType,this.attr.itemType||console.warn('You must configure your component with a "data-item-type" attribute in the DOM, with the value of activity, story, user, tweet, list, or trend in order for it to scribe properly.')},this.after("initialize",function(){this.defaultItemType=this.attr.itemType||"",this.defaultEventData=this.attr.eventData||{scribeContext:{},scribeData:{}}})}var compose=require("core/compose"),utils=require("core/utils"),withCardMetadata=require("app/data/with_card_metadata"),withConversationMetadata=require("app/data/with_conversation_metadata");module.exports=withInteractionData
  });
  define("app/data/tweet_actions_scribe",["module","require","exports","core/component","core/utils","app/ui/with_interaction_data","app/data/with_conversation_metadata","app/data/with_interaction_data_scribe"],function(module, require, exports) {
  function tweetActionsScribe(){this.defaultAttrs({tweetActionsSelector:".ProfileTweet-action--more"}),this.scribeTweet=function(a){return function(b,c){var d=this.addConversationScribeContext({action:a},c.sourceEventData||c);this.scribeInteraction(d,utils.merge(c,c.sourceEventData))}.bind(this)},this.scribeDropdown=function(a,b){$(a.target).closest(this.attr.tweetActionsSelector).length>0&&this.scribe({component:"tweet",element:"tweet_actions_dropdown",action:"open"},b)},this.scribeLoggedOutAction=function(a,b){b&&b.action&&this.scribeInteraction({element:"tweet",action:b.action},utils.merge(b,b.sourceEventData))},this.after("initialize",function(){this.on("uiReplyButtonTweetSuccess",this.scribeTweet("reply")),this.on("uiDidRetweetSuccess",this.scribeTweet("retweet")),this.on("uiDidRetweetWithCommentSuccess",this.scribeTweet("retweet_with_comment")),this.on("uiDidDeleteTweet",this.scribeTweet("delete")),this.on("uiDismissTweet",this.scribeTweet("dismiss")),this.on("dataDidFavoriteTweet",this.scribeTweet("favorite")),this.on("dataDidUnfavoriteTweet",this.scribeTweet("unfavorite")),this.on("dataDidUnretweet",this.scribeTweet("unretweet")),this.on("uiPermalinkClick",this.scribeTweet("permalink")),this.on("dataTweetTranslationSuccess",this.scribeTweet("translate")),this.on("dataDidUserPinTweet",this.scribeTweet("pin")),this.on("dataDidUserUnpinTweet",this.scribeTweet("unpin")),this.on("uiDropdownOpened",this.scribeDropdown),this.on("uiLoggedOutActionAttempt",this.scribeLoggedOutAction)})}var defineComponent=require("core/component"),utils=require("core/utils"),withInteractionData=require("app/ui/with_interaction_data"),withConversationMetadata=require("app/data/with_conversation_metadata"),withInteractionDataScribe=require("app/data/with_interaction_data_scribe");module.exports=defineComponent(tweetActionsScribe,withInteractionData,withConversationMetadata,withInteractionDataScribe)
  });
  define("app/data/block_or_report_scribe",["module","require","exports","core/component","app/utils/scribe_item_types","app/utils/scribe_association_types","app/data/with_interaction_data_scribe"],function(module, require, exports) {
  function blockOrReportScribe(){this.getComponent=function(a){return a.target==="user"?"report_user":"report_tweet"},this.blockOrReportImpression=function(a,b){this.scribeBlockOrReportEvent({component:this.getComponent(b),action:"impression"},b)},this.cancelBlockOrReport=function(a,b){this.scribeBlockOrReportEvent({component:this.getComponent(b),action:"cancel"},b)},this.blockOrReportSubmit=function(a,b){var c=b.reportType||"",d={component:this.getComponent(b.eventData),action:b.blockUser?"block":"report_as_spam",element:c};this.scribeBlockOrReportEvent(d,b)},this.blockOrReportAbuseToSupport=function(a,b){var c={component:this.getComponent(b.eventData)+"_abusive",element:b.abuseType,action:"click"};this.scribeBlockOrReportEvent(c,b)},this.scribeBlockOrReportEvent=function(a,b){var c=b.eventData||b;c.target=="user"?this.scribeReportUserEvent(a,b):this.scribeReportTweetEvent(a,c)},this.scribeReportTweetEvent=function(a,b){var c={};c[associationTypes.associatedTweet]={association_type:itemTypes.tweet,association_id:b.tweetId},this.scribeInteraction(a,b,{associations:c})},this.scribeReportUserEvent=function(a,b){var c={};c[associationTypes.associatedUser]={association_type:itemTypes.user,association_id:b.userId||b.eventData.userId},this.scribeInteraction(a,b,{associations:c})},this.openTwitterRulesLink=function(a,b){var a={component:this.getComponent(b.eventData),element:"twitter_rules_link",action:"open_link"};this.scribeBlockOrReportEvent(a,b)},this.after("initialize",function(){this.on(document,"uiNeedsBlockOrReportDialog",this.blockOrReportImpression),this.on(document,"uiDidBlockOrReport uiReportUserAction",this.blockOrReportSubmit),this.on(document,"uiDidBlockOrReportToSupport",this.blockOrReportAbuseToSupport),this.on(document,"uiDidCancelBlockOrReport",this.cancelBlockOrReport),this.on(document,"uiDidOpenTwitterRulesLink",this.openTwitterRulesLink)})}var defineComponent=require("core/component"),itemTypes=require("app/utils/scribe_item_types"),associationTypes=require("app/utils/scribe_association_types"),withInteractionDataScribe=require("app/data/with_interaction_data_scribe");module.exports=defineComponent(blockOrReportScribe,withInteractionDataScribe)
  });
  define("app/data/report_dialog_scribe",["module","require","exports","core/component","app/utils/scribe_item_types","app/utils/scribe_association_types","app/data/with_interaction_data_scribe"],function(module, require, exports) {
  function reportScribe(){this.getComponent=function(a){return a.target==="user"?"report_user":"report_tweet"},this.reportImpression=function(a,b){this.scribeReportEvent({component:this.getComponent(b),action:"impression"},b)},this.cancelReport=function(a,b){this.scribeReportEvent({component:this.getComponent(b),action:"cancel"},b)},this.reportSubmit=function(a,b){var c=b.reportType||"",d={component:this.getComponent(b.eventData),action:"report_as_spam",element:c};this.scribeReportEvent(d,b)},this.reportAbuseToSupport=function(a,b){var c={component:this.getComponent(b.eventData)+"_abusive",element:b.abuseType,action:"click"};this.scribeReportEvent(c,b)},this.scribeReportEvent=function(a,b){var c=b.eventData||b;c.target==="user"?this.scribeReportUserEvent(a,b):this.scribeReportTweetEvent(a,c)},this.scribeReportTweetEvent=function(a,b){var c={};c[associationTypes.associatedTweet]={association_type:itemTypes.tweet,association_id:b.tweetId},this.scribeInteraction(a,b,{associations:c})},this.scribeReportUserEvent=function(a,b){var c={};c[associationTypes.associatedUser]={association_type:itemTypes.user,association_id:b.userId||b.eventData.userId},this.scribeInteraction(a,b,{associations:c})},this.openTwitterRulesLink=function(a,b){var a={component:this.getComponent(b.eventData),element:"twitter_rules_link",action:"open_link"};this.scribeReportEvent(a,b)},this.after("initialize",function(){this.on(document,"uiNeedsReportDialog",this.reportImpression),this.on(document,"uiDidReportTweet uiReportUserAction",this.reportSubmit),this.on(document,"uiDidReportToSupport",this.reportAbuseToSupport),this.on(document,"uiDidCancelReport",this.cancelReport),this.on(document,"uiDidOpenTwitterRulesLink",this.openTwitterRulesLink)})}var defineComponent=require("core/component"),itemTypes=require("app/utils/scribe_item_types"),associationTypes=require("app/utils/scribe_association_types"),withInteractionDataScribe=require("app/data/with_interaction_data_scribe");module.exports=defineComponent(reportScribe,withInteractionDataScribe)
  });
  define("app/data/block_dialog_scribe",["module","require","exports","core/component","app/data/with_interaction_data_scribe","core/utils"],function(module, require, exports) {
  function blockDialogScribe(){this.defaultAttrs({scribeContext:{component:"block_dialog"}}),this.getScribeElement=function(a){return a.target==="user"?"user":"tweet"},this.scribeBlockDialogImpression=function(a,b){var c={element:this.getScribeElement(b),action:"impression"},d=utils.merge(this.attr.scribeContext,c);this.scribeInteraction(d,b)},this.scribeBlockDialogCancel=function(a,b){var c={element:this.getScribeElement(b),action:"cancel"},d=utils.merge(this.attr.scribeContext,c);this.scribeInteraction(d,b)},this.after("initialize",function(){this.on("uiNeedsBlockDialog",this.scribeBlockDialogImpression),this.on("uiBlockDialogCancel",this.scribeBlockDialogCancel)})}var defineComponent=require("core/component"),withInteractionDataScribe=require("app/data/with_interaction_data_scribe"),utils=require("core/utils");module.exports=defineComponent(blockDialogScribe,withInteractionDataScribe)
  });
  define("app/data/user_actions_scribe",["module","require","exports","core/component","app/utils/scribe_item_types","app/utils/scribe_association_types","app/data/with_interaction_data_scribe"],function(module, require, exports) {
  function userActionsScribe(){function a(a){var b=a&&a.associatedTweetId,c={};if(!b)return;return c[associationTypes.associatedTweet]={association_type:itemTypes.tweet,association_id:b},{associations:c}}this.defaultAttrs({userActionToActionMap:{uiMuteUserAction:"mute_user",uiUnmuteUserAction:"unmute_user",uiMentionAction:"reply",uiDmAction:"dm",uiListAction:"add_to_list",uiReportSpamAction:"report_as_spam",uiRetweetOnAction:{element:"allow_retweets",action:"on"},uiRetweetOffAction:{element:"allow_retweets",action:"off"},uiDeviceNotificationsOnAction:{element:"mobile_notifications",action:"on"},uiDeviceNotificationsOffAction:{element:"mobile_notifications",action:"off"},uiShowMobileNotificationsConfirm:{element:"mobile_notifications",action:"failure"},uiShowPushTweetsNotificationsConfirm:{element:"mobile_notifications",action:"failure"},uiUserTopicClickAction:{element:"topic",action:"click"},uiLoggedOutFollowAttempt:"follow_attempt"}}),this.handleUserEvent=function(b,c){c.skipScribe||(this.scribeInteraction(c.action,c,a(c.sourceEventData)),c.isFollowBack&&this.scribeInteraction("follow_back",c,a(c.sourceEventData)))},this.handleAction=function(b,c){c.skipScribe||this.scribeInteraction(this.attr.userActionToActionMap[b.type],c,a(c))},this.after("initialize",function(){this.on(document,"dataFollowStateChange dataUserActionSuccess",this.handleUserEvent),this.on(document,"uiMentionAction uiReportSpamAction uiListAction uiDmAction uiRetweetOnAction uiRetweetOffAction uiDeviceNotificationsOnAction uiDeviceNotificationsOffAction uiShowMobileNotificationsConfirm uiShowPushTweetsNotificationsConfirm uiUserTopicClickAction uiMuteUserAction uiUnmuteUserAction uiLoggedOutFollowAttempt",this.handleAction)})}var defineComponent=require("core/component"),itemTypes=require("app/utils/scribe_item_types"),associationTypes=require("app/utils/scribe_association_types"),withInteractionDataScribe=require("app/data/with_interaction_data_scribe");module.exports=defineComponent(userActionsScribe,withInteractionDataScribe)
  });
  define("app/data/item_actions_scribe",["module","require","exports","core/component","app/data/with_interaction_data_scribe","app/data/with_conversation_metadata","app/data/with_card_metadata"],function(module, require, exports) {
  function itemActionsScribe(){this.handleNewerTimelineItems=function(a,b){this.scribeInteractiveResults({element:"newer",action:"results"},b.items,b)},this.handleRangeTimelineItems=function(a,b){this.scribeInteractiveResults({element:"range",action:"results"},b.items,b)},this.handlePeriodPress=function(a,b){this.scribe({element:"period_press",action:"results"})},this.handleTopBarBirdClick=function(a,b){this.scribe({component:"top_bar",element:"bird",action:"results"})},this.handleUserComposedTweet=function(a,b){this.scribe({element:"composed_tweet",action:"results"})},this.handleStreamingInjection=function(){this.scribe({element:"streaming_injection",action:"results"})},this.handlePushStateInjection=function(a,b){this.scribe({element:"pushstate_injection",action:"results"})},this.handleProfileClick=function(a,b){var c=b.sourceEventData||b,d=c.isMentionClick?"mention_click":"profile_click";b.user_id&&(c.userId=b.user_id);if(c.interactionInsideCard)this.scribeCardAction(d,a,c);else{var e=this.addConversationScribeContext({action:d},c,!0);this.scribeInteraction(e,c)}},this.scribeItemAction=function(a,b,c){var d=this.addConversationScribeContext({action:a},c);this.scribeInteraction(d,c)},this.scribeSearchTagClick=function(a,b){var c=a.type=="uiCashtagClick"?"cashtag":"hashtag";this.scribeInteraction({element:c,action:"search"},b)},this.scribeGeoPivotClick=function(a,b){var c={context:b.placeId,event_value:b.tweetId};this.scribeInteraction({element:"place_pivot",action:"click"},b,c)},this.scribeLinkClick=function(a,b){var c={};b.tcoUrl&&(c.message=b.tcoUrl),b.text&&b.text.indexOf("pic.twitter.com")==0&&(b.url="http://"+b.text),this.scribeInteraction("open_link",b,c)},this.scribeQuoteTweetClick=function(a,b){this.scribe({component:"tweet",element:"quoted_tweet",action:"click"},b,{items:b.items})},this.scribeCardAction=function(a,b,c){c&&c.tweetHasCard&&this.scribeCardInteraction(a,c)},this.after("initialize",function(){this.scribeOnEvent("uiNewItemsBarClick",{component:"tweet",element:"new_tweets_bar",action:"click"}),this.scribeOnEvent("uiNewItemsBarShown",{component:"tweet",element:"new_tweets_bar",action:"show"}),this.scribeOnEvent("uiNewItemsBarHidden",{component:"tweet",element:"new_tweets_bar",action:"hide"}),this.on(document,"uiHasInjectedNewTimeline",this.handleNewerTimelineItems),this.on(document,"uiHasInjectedRangeTimelineItems",this.handleRangeTimelineItems),this.on(document,"uiUserPressedPeriodAndSawNewTweets",this.handlePeriodPress),this.on(document,"uiUserPushStateInjectedTweets",this.handlePushStateInjection),this.on(document,"uiUserClickedTopBarBirdAndSawNewTweets",this.handleTopBarBirdClick),this.on(document,"uiUserComposedTweet",this.handleUserComposedTweet),this.on(document,"uiUserSawItemsViaStreamingInjection",this.handleStreamingInjection),this.on(document,"uiShowProfileNewWindow",this.handleProfileClick),this.on(document,"uiItemSelected",this.scribeItemAction.bind(this,"select")),this.on(document,"uiItemDeselected",this.scribeItemAction.bind(this,"deselect")),this.on(document,"uiHashtagClick uiCashtagClick",this.scribeSearchTagClick),this.on(document,"uiGeoPivotClick",this.scribeGeoPivotClick),this.on(document,"uiItemLinkClick",this.scribeLinkClick),this.on(document,"uiQuoteTweetClick",this.scribeQuoteTweetClick),this.on(document,"uiCardInteractionLinkClick",this.scribeCardAction.bind(this,"click")),this.on(document,"uiCardExternalLinkClick",this.scribeCardAction.bind(this,"open_link")),this.on(document,"uiItemSelected",this.scribeCardAction.bind(this,"show")),this.on(document,"uiItemDeselected",this.scribeCardAction.bind(this,"hide")),this.on(document,"uiMapShow",this.scribeItemAction.bind(this,"show")),this.on(document,"uiMapClick",this.scribeItemAction.bind(this,"click")),this.on(document,"uiShareViaEmailDialogOpened",this.scribeItemAction.bind(this,"open"))})}var defineComponent=require("core/component"),withInteractionDataScribe=require("app/data/with_interaction_data_scribe"),withConversationMetadata=require("app/data/with_conversation_metadata"),withCardMetadata=require("app/data/with_card_metadata");module.exports=defineComponent(itemActionsScribe,withInteractionDataScribe,withConversationMetadata,withCardMetadata)
  });
  define("app/utils/full_path",["module","require","exports"],function(module, require, exports) {
  function fullPath(){return[location.pathname,location.search].join("")}module.exports=fullPath
  });
  define("app/data/navigation_scribe",["module","require","exports","core/component","app/data/client_event","app/data/with_scribe","app/utils/full_path"],function(module, require, exports) {
  function navigationScribe(){this.scribeNav=function(a,b){this.scribe("navigate",b,{url:b.url})},this.scribeCachedImpression=function(a,b){b.fromCache&&this.scribe("impression")},this.after("initialize",function(){clientEvent.internalReferer=fullPath(),this.on("uiNavigationLinkClick",this.scribeNav),this.on("uiPageChanged",this.scribeCachedImpression)})}var defineComponent=require("core/component"),clientEvent=require("app/data/client_event"),withScribe=require("app/data/with_scribe"),fullPath=require("app/utils/full_path");module.exports=defineComponent(navigationScribe,withScribe)
  });
  define("app/data/update_scribe",["module","require","exports","core/component","app/data/client_event"],function(module, require, exports) {
  function updateScribe(){this.updateSection=function(a,b){b&&b.sectionName&&(this.clientEvent.scribeContext.section=b.sectionName)},this.after("initialize",function(){this.clientEvent=clientEvent,this.on(document,"dataUpdateScribeSection",this.updateSection)})}var defineComponent=require("core/component"),clientEvent=require("app/data/client_event");module.exports=defineComponent(updateScribe)
  });
  define("app/utils/cookie",["module","require","exports"],function(module, require, exports) {
  module.exports=function(b,c,d){var e=$.extend({},d);if(arguments.length>1&&String(c)!=="[object Object]"){if(c===null||c===undefined)e.expires=-1,c="";if(typeof e.expires=="number")if(e.expires===Infinity)e.expires="Fri, 31 Dec 9999 23:59:59 GMT";else{var f=e.expires,g=new Date((new Date).getTime()+f*24*60*60*1e3);e.expires=g.toUTCString()}return c=String(c),document.cookie=[encodeURIComponent(b),"=",e.raw?c:encodeURIComponent(c),e.expires?"; expires="+e.expires:"","; path="+(e.path||"/"),e.domain?"; domain="+e.domain:"",e.secure?"; secure":""].join("")}e=c||{};var h,i=e.raw?function(a){return a}:decodeURIComponent;return(h=(new RegExp("(?:^|; )"+encodeURIComponent(b)+"=([^;]*)")).exec(document.cookie))?i(h[1]):null}
  });
  define("app/boot/scribing",["module","require","exports","app/data/scribe_transport","app/data/scribe_monitor","app/data/client_event","app/data/tweet_actions_scribe","app/data/block_or_report_scribe","app/data/report_dialog_scribe","app/data/block_dialog_scribe","app/data/user_actions_scribe","app/data/item_actions_scribe","app/data/navigation_scribe","app/data/update_scribe","app/utils/cookie"],function(module, require, exports) {
  function initialize(a){cookie("scribe_url")&&(scribeTransport.SCRIBE_API_ENDPOINT=cookie("scribe_url"));var b={useAjax:!0,bufferEvents:a.environment!="development"&&a.environment!="staging"&&!a.preflight,flushOnUnload:a.environment!="selenium",bufferSize:a.environment=="selenium"?1e3*a.scribeBufferSize:a.scribeBufferSize,debug:!!a.debugAllowed,requestParameters:a.scribeParameters};scribeTransport.updateOptions(b),scribeTransport.registerEventHandlers(),clientEvent.scribeContext={client:"web",page:a.pageName,section:a.sectionName},clientEvent.scribeData={internal_referer:clientEvent.internalReferer||a.internalReferer,client_version:a.macawSwift?"macaw-swift":"swift"},delete clientEvent.internalReferer,a.loggedIn||(clientEvent.scribeData.user_id=0),(a.environment!="production"||a.preflight||a.scribesForScribeConsole)&&ScribeMonitor.attachTo(document,{scribesForScribeConsole:a.scribesForScribeConsole}),TweetActionsScribe.attachTo(document,a),BlockOrReportScribe.attachTo(document,a),ReportDialogScribe.attachTo(document,a),BlockDialogScribe.attachTo(document,a),UserActionsScribe.attachTo(document,a),ItemActionsScribe.attachTo(document,a),NavigationScribe.attachTo(document,a),UpdateScribe.attachTo(document)}var scribeTransport=require("app/data/scribe_transport"),ScribeMonitor=require("app/data/scribe_monitor"),clientEvent=require("app/data/client_event"),TweetActionsScribe=require("app/data/tweet_actions_scribe"),BlockOrReportScribe=require("app/data/block_or_report_scribe"),ReportDialogScribe=require("app/data/report_dialog_scribe"),BlockDialogScribe=require("app/data/block_dialog_scribe"),UserActionsScribe=require("app/data/user_actions_scribe"),ItemActionsScribe=require("app/data/item_actions_scribe"),NavigationScribe=require("app/data/navigation_scribe"),UpdateScribe=require("app/data/update_scribe"),cookie=require("app/utils/cookie");module.exports=initialize
  });
  define("app/utils/push_state_enabled",["module","require","exports"],function(module, require, exports) {
  function pushStateEnabled(a){return a&&!!window.history&&!!history.pushState}module.exports=pushStateEnabled
  });
  define("app/ui/navigation",["module","require","exports","core/component","app/utils/full_path","app/utils/push_state_enabled"],function(module, require, exports) {
  function navigation(){this.defaultAttrs({spinnerContainer:"body",pushState:!0,pushStateSelector:"a.js-nav",pageContainer:"#page-container",docContainer:"#doc",globalHeadingSelector:".global-nav h1",baseFoucClass:"swift-loading"}),this.navigate=function(a){var b,c;if(a.shiftKey||a.ctrlKey||a.metaKey||a.which!=undefined&&a.which>1)return;b=$(a.target),c=b.closest(this.attr.pushStateSelector),c.length&&!a.isDefaultPrevented()&&c.attr("href")&&(this.trigger(c,"uiNavigate",{href:c.attr("href")}),a.preventDefault(),a.stopImmediatePropagation())},this.updatePage=function(a,b){this.hideSpinner(),this.trigger("uiBeforePageChanged",b),this.trigger("uiTeardown",{}),this.trigger("uiUpdatePageCache",{href:b.href}),$("body").attr("class",b.init_data.bodyFoucClassNames+" "+b.body_class_names),this.select("docContainer").attr("class",b.doc_class_names),this.select("pageContainer").attr("class",b.page_container_class_names),b.canonical_url&&$('link[rel="canonical"]').attr("href",b.canonical_url);var c=b.banners&&!b.fromCache?b.banners+b.page:b.page;this.$node.find(b.init_data.viewContainer).html(c),b.isPopState||$(window).scrollTop(0),using(b.module,function(a){b.init_data.fromCache=b.fromCache,a(b.init_data),$("body").removeClass(this.attr.baseFoucClass),this.trigger("uiPageChanged",b)}.bind(this))},this.showSpinner=function(a,b){this.trigger("uiShowGlobalLoadingIndicator")},this.hideSpinner=function(a,b){this.trigger("uiHideGlobalLoadingIndicator")},this.onPopState=function(a,b){var c={state:a.originalEvent&&a.originalEvent.state};this.trigger(document,{type:"uiPopStateNavigate",defaultBehavior:this.doPopState.bind(this,a,c)},c)},this.doPopState=function(a,b){b.state&&(isSafari&&(document.body.style.display="none",document.body.offsetHeight,document.body.style.display="block"),this.trigger("uiNavigate",{isPopState:!0,href:fullPath()}))},this.after("initialize",function(){pushStateEnabled(this.attr.pushState)&&(this.on("click",this.navigate),this.on(window,"popstate",this.onPopState),this.on("dataPageRefresh",this.updatePage),this.on("dataPageFetch",this.showSpinner))})}var component=require("core/component"),fullPath=require("app/utils/full_path"),isSafari=$.browser.safari===!0,pushStateEnabled=require("app/utils/push_state_enabled"),Navigation=component(navigation);module.exports=Navigation
  });
  define("app/utils/time",["module","require","exports"],function(module, require, exports) {
  function Duration(a){this.ms=a}function time(a){var b={seconds:new Duration(a*1e3),minutes:new Duration(a*1e3*60),hours:new Duration(a*1e3*60*60),days:new Duration(a*1e3*60*60*24)};return b.second=b.seconds,b.minute=b.minutes,b.hour=b.hours,b.day=b.days,b}var perf=window.performance,perf_now=perf&&perf.now;time.now=function(){return perf_now?Math.round(perf.now()+perf.timing.navigationStart):(new Date).getTime()},Duration.prototype.fromNow=function(){return new Date(time.now()+this.ms)},Duration.prototype.ago=function(){return new Date(time.now()-this.ms)},Duration.prototype.getTime=Duration.prototype.valueOf=function(){return this.ms},module.exports=time
  });
  define("app/utils/storage/core",["module","require","exports","core/compose","core/advice"],function(module, require, exports) {
  function localStorage(){this.initialize=function(a){this.namespace=a,this.prefix=["__",this.namespace,"__:"].join(""),this.matcher=new RegExp("^"+this.prefix)},this.getItem=function(a){return this.decode(window.localStorage.getItem(this.prefix+a))},this.setItem=function(a,b){try{return window.localStorage.setItem(this.prefix+a,this.encode(b))}catch(c){return window.DEBUG&&window.DEBUG.enabled&&console.error(c),undefined}},this.removeItem=function(a){return window.localStorage.removeItem(this.prefix+a)},this.keys=function(){var a=[];for(var b=0,c=window.localStorage.length,d;b<c;b++)d=window.localStorage.key(b),d.match(this.matcher)&&a.push(d.replace(this.matcher,""));return a},this.clear=function(){this.keys().forEach(function(a){this.removeItem(a)},this)},this.clearAll=function(){window.localStorage.clear()}}function userData(){function b(b,c){var d=c.xmlDocument.documentElement;a[b]={};while(d.firstChild)d.removeChild(d.firstChild);c.save(b)}function c(a){return document.getElementById("__storage_"+a)}var a={};this.initialize=function(b){this.namespace=b,(this.dataStore=c(this.namespace))||this.createStorageElement(),this.xmlDoc=this.dataStore.xmlDocument,this.xmlDocEl=this.xmlDoc.documentElement,a[this.namespace]=a[this.namespace]||{}},this.createStorageElement=function(){this.dataStore=document.createElement("div"),this.dataStore.id="__storage_"+this.namespace,this.dataStore.style.display="none",document.appendChild(this.dataStore),this.dataStore.addBehavior("#default#userData"),this.dataStore.load(this.namespace)},this.getNodeByKey=function(b){var c=this.xmlDocEl.childNodes,d;if(d=a[this.namespace][b])return d;for(var e=0,f=c.length;e<f;e++){d=c.item(e);if(d.getAttribute("key")==b)return a[this.namespace][b]=d,d}return null},this.getItem=function(a){var b=this.getNodeByKey(a),c=null;return b&&(c=b.getAttribute("value")),this.decode(c)},this.setItem=function(b,c){var d=this.getNodeByKey(b);return d?d.setAttribute("value",this.encode(c)):(d=this.xmlDoc.createNode(1,"item",""),d.setAttribute("key",b),d.setAttribute("value",this.encode(c)),this.xmlDocEl.appendChild(d),a[this.namespace][b]=d),this.dataStore.save(this.namespace),c},this.removeItem=function(b){var c=this.getNodeByKey(b);c&&(this.xmlDocEl.removeChild(c),delete a[this.namespace][b]),this.dataStore.save(this.namespace)},this.keys=function(){var a=this.xmlDocEl.childNodes.length,b=[];for(var c=0;c<a;c++)b.push(this.xmlDocEl.childNodes[c].getAttribute("key"));return b},this.clear=function(){b(this.namespace,this.dataStore)},this.clearAll=function(){for(var d in a)b(d,c(d)),a[d]={}}}function noStorage(){this.initialize=$.noop,this.getNodeByKey=function(a){return null},this.getItem=function(a){return null},this.setItem=function(a,b){return b},this.removeItem=function(a){return null},this.keys=function(){return[]},this.clear=$.noop,this.clearAll=$.noop}function memory(){this.initialize=function(a){this.namespace=a,memoryStore[this.namespace]||(memoryStore[this.namespace]={}),this.store=memoryStore[this.namespace]},this.getItem=function(a){return this.store[a]?this.decode(this.store[a]):undefined},this.setItem=function(a,b){return this.store[a]=this.encode(b)},this.removeItem=function(a){delete this.store[a]},this.keys=function(){return Object.keys(this.store)},this.clear=function(){this.store=memoryStore[this.namespace]={}},this.clearAll=function(){memoryStore={}}}function browserStore(){supportsLocalStorage()?localStorage.call(this):document.documentElement.addBehavior?noStorage.call(this):memory.call(this)}function supportsLocalStorage(){if(doesLocalStorage===undefined)try{window.localStorage.setItem("~~~~",1),window.localStorage.removeItem("~~~~"),doesLocalStorage=!0}catch(a){doesLocalStorage=!1}return doesLocalStorage}function encoding(){this.encode=function(a){return a===undefined&&(a=null),JSON.stringify(a)},this.decode=function(a){return JSON.parse(a)}}function CoreStorage(){arguments.length&&this.initialize.apply(this,arguments)}var compose=require("core/compose"),advice=require("core/advice"),memoryStore={},doesLocalStorage;compose.mixin(CoreStorage.prototype,[encoding,browserStore,advice.withAdvice]),CoreStorage.clearAll=CoreStorage.prototype.clearAll,module.exports=CoreStorage
  });
  define("app/utils/storage/with_expiry",["module","require","exports","app/utils/storage/core"],function(module, require, exports) {
  function withExpiry(){this.ttl=new Storage(this.namespace+"_ttl"),this.now=function(){return(new Date).getTime()},this.isExpired=function(a){var b=this.ttl.getItem(a)||0;return typeof b=="number"&&this.now()>b?!0:!1},this.updateTTL=function(a,b){typeof b=="number"&&this.ttl.setItem(a,this.now()+b)},this.getCacheAge=function(a,b){var c=this.ttl.getItem(a);if(c==null)return-1;var d=c-b,e=this.now()-d;return e<0?-1:Math.floor(e/36e5)},this.around("setItem",function(a,b,c,d){return typeof d=="number"?this.ttl.setItem(b,this.now()+d):this.ttl.removeItem(b),a(b,c)}),this.around("getItem",function(a,b){var c=this.ttl.getItem(b);return typeof c=="number"&&this.now()>c&&this.removeItem(b),a(b)}),this.after("removeItem",function(a){this.ttl.removeItem(a)}),this.after("clear",function(){this.ttl.clear()})}var Storage=require("app/utils/storage/core");module.exports=withExpiry
  });
  define("app/utils/storage/array/with_array",["module","require","exports"],function(module, require, exports) {
  function withArray(){this.getArray=function(a){return this.getItem(a)||[]},this.push=function(a,b){var c=this.getArray(a),d=c.push(b);return this.setItem(a,c),d},this.pushAll=function(a,b){var c=this.getArray(a);return c.push.apply(c,b),this.setItem(a,c),c}}module.exports=withArray
  });
  define("app/utils/storage/array/with_max_elements",["module","require","exports","core/compose","app/utils/storage/array/with_array"],function(module, require, exports) {
  function withMaxElements(){compose.mixin(this,[withArray]),this.maxElements={},this.getMaxElements=function(a){return this.maxElements[a]||0},this.setMaxElements=function(a,b){this.maxElements[a]=b},this.before("push",function(a,b){this.makeRoomFor(a,1)}),this.around("pushAll",function(a,b,c){return c=c||[],this.makeRoomFor(b,c.length),a(b,c.slice(Math.max(0,c.length-this.getMaxElements(b))))}),this.makeRoomFor=function(a,b){var c=this.getArray(a),d=c.length+b-this.getMaxElements(a);d>0&&(c.splice(0,d),this.setItem(a,c))}}var compose=require("core/compose"),withArray=require("app/utils/storage/array/with_array");module.exports=withMaxElements
  });
  define("app/utils/storage/array/with_unique_elements",["module","require","exports","core/compose","app/utils/storage/array/with_array"],function(module, require, exports) {
  function withUniqueElements(){compose.mixin(this,[withArray]),this.before("push",function(a,b){var c=this.getArray(a);this.deleteElement(c,b)&&this.setItem(a,c)}),this.around("pushAll",function(a,b,c){c=c||[];var d=this.getArray(b),e=!1,f=[],g={};return c.forEach(function(a){g[a]||(e=this.deleteElement(d,a)||e,g[a]=!0,f.push(a))},this),e&&this.setItem(b,d),a(b,f)}),this.deleteElement=function(a,b){var c=-1;return(c=a.indexOf(b))>=0?(a.splice(c,1),!0):!1}}var compose=require("core/compose"),withArray=require("app/utils/storage/array/with_array");module.exports=withUniqueElements
  });
  define("app/utils/storage/custom",["module","require","exports","core/compose","app/utils/storage/core","app/utils/storage/with_expiry","app/utils/storage/array/with_array","app/utils/storage/array/with_max_elements","app/utils/storage/array/with_unique_elements"],function(module, require, exports) {
  function storageConstr(a){var b=Object.keys(a).filter(function(b){return a[b]}).sort().join(","),c;if(c=lookup[b])return c;c=function(){CoreStorage.apply(this,arguments)},c.prototype=new CoreStorage;var d=[];return a.withExpiry&&d.push(withExpiry),a.withArray&&d.push(withArray),a.withUniqueElements&&d.push(withUniqueElements),a.withMaxElements&&d.push(withMaxElements),d.length>0&&compose.mixin(c.prototype,d),lookup[b]=c,c}var compose=require("core/compose"),CoreStorage=require("app/utils/storage/core"),withExpiry=require("app/utils/storage/with_expiry"),withArray=require("app/utils/storage/array/with_array"),withMaxElements=require("app/utils/storage/array/with_max_elements"),withUniqueElements=require("app/utils/storage/array/with_unique_elements"),lookup={};module.exports=storageConstr
  });
  define("app/data/notifications",["module","require","exports","app/utils/storage/core","app/utils/time"],function(module, require, exports) {
  function Notification(a,b,c,d){this.key=b,this.timestamp=0,this.active=a,this.seenFirstResponse=!1,this.pollEvent=c,this.paramAdder=d}function Notifications(){this.entries=[]}var Storage=require("app/utils/storage/core"),time=require("app/utils/time"),pollDelay=2e4,storage=new Storage("DM"),filteredEndpoints=["/i/users/recommendations","/i/timeline","/i/notifications/timeline","/i/search/timeline","/i/profiles/show","/messages"];Notification.prototype={reset:function(){this.timestamp=time.now()},isResponseValid:function(a){return this.active&&a&&a[this.key]&&a.notCached&&a[this.key].status=="ok"&&a[this.key].response!==null},update:function(a){this.isResponseValid(a)?this.reset():!this.seenFirstResponse&&this.pollEvent&&$(document).trigger(this.pollEvent),this.seenFirstResponse=!0},shouldPoll:function(){return time.now()-this.timestamp>pollDelay},addParam:function(a){this.shouldPoll()&&this.paramAdder(a)}},Notifications.prototype={init:function(a){this.initialized=!0,this.dm=new Notification(a.toasts_dm,"d","uiDMPoll",this.addDMData),this.connect=new Notification(a.toasts_timeline,"t",null,function(){}),this.spoonbill=new Notification(a.toasts_spoonbill,"n",null,this.addSpoonbillData),this.spoonbill.shouldPoll=function(){return!0},this.entries=[this.dm,this.connect,this.spoonbill],a.toasts_dm_poll_scale&&(pollDelay=a.toasts_dm_poll_scale*1e3)},getPollDelay:function(){return pollDelay},addDMData:function(a){a.oldest_unread_id=storage.getItem("oldestUnreadMessageId")||0},addSpoonbillData:function(a){a.last_note_ts=storage.getItem("latestNotificationTimestamp")||0},updateNotificationState:function(a){this.entries.forEach(function(b){b.update(a)})},resetDMState:function(a,b){this.dm.reset()},shouldPoll:function(){return this.initialized?!0:!1},extraParameters:function(a){if(!a||!this.shouldPoll())return{};var b={};return filteredEndpoints.some(function(b){return a.indexOf(b)==0})&&this.entries.forEach(function(a){a.addParam(b)}),b}},module.exports=new Notifications
  });
  define("app/utils/querystring",["module","require","exports"],function(module, require, exports) {
  function encodeQueryPart(a){return encodeURIComponent(a).replace(/\+/g,"%2B")}function decodeQueryPart(a){return decodeURIComponent(a.replace(/\+/g," "))}function queryEncode(a){var b=[];for(var c in a)a[c]!==null&&typeof a[c]!="undefined"&&b.push(encodeQueryPart(c)+"="+encodeQueryPart(a[c]));return b.sort().join("&")}function queryDecode(a){var b={},c,d,e,f;if(a){c=a.split("&");for(f=0;e=c[f];f++)d=e.split("="),d.length==2&&(b[decodeQueryPart(d[0])]=decodeQueryPart(d[1]))}return b}function queryMap(a){var b={},c=a.match(/\?(.*)/);return c&&c[1]&&(b=queryDecode(c[1])),b}module.exports={decode:queryDecode,encode:queryEncode,encodePart:encodeQueryPart,decodePart:decodeQueryPart,queryMap:queryMap}
  });
  define("app/utils/params",["module","require","exports","app/utils/querystring"],function(module, require, exports) {
  var qs=require("app/utils/querystring"),fromQuery=function(a){var b=a.search.substr(1);return qs.decode(b)},fromFragment=function(a){var b=a.href,c=b.indexOf("#"),d=c<0?"":b.substring(c+1);return qs.decode(d)},combined=function(a){var b={},c=fromQuery(a),d=fromFragment(a);for(var e in c)c.hasOwnProperty(e)&&(b[e]=c[e]);for(var e in d)d.hasOwnProperty(e)&&(b[e]=d[e]);return b},addToUrl=function(a,b){var c=$("<a>",{href:a})[0],d=c.search?"&":"";return c.search+=d+$.param(b),c.href};module.exports={combined:combined,fromQuery:fromQuery,fromFragment:fromFragment,addToUrl:addToUrl}
  });
  define("app/data/with_auth_token",["module","require","exports","app/utils/auth_token","core/utils"],function(module, require, exports) {
  function withAuthToken(){this.addAuthToken=function(b){if(!authToken.get())throw"addAuthToken requires a formAuthenticityToken";return b=b||{},utils.merge(b,{authenticity_token:authToken.get()})},this.getAuthToken=function(){return this.attr.formAuthenticityToken}}var authToken=require("app/utils/auth_token"),utils=require("core/utils");module.exports=withAuthToken
  });
  define("app/data/with_data",["module","require","exports","core/i18n","core/compose","app/utils/storage/core","app/utils/storage/custom","app/data/notifications","app/utils/params","app/utils/time","core/utils","app/data/with_auth_token"],function(module, require, exports) {
  function initializeXhrStorage(){xhrStorage||(xhrStorage=new CoreStorage("XHRNotes"))}function withData(){compose.mixin(this,[withAuthToken]);var a=[],b=[];this.defaultAttrs({}),this.composeData=function(a,b){return a=a||{},b.eventData&&(a.sourceEventData=b.eventData),a},this.callSuccessHandler=function(a,b,c){typeof a=="function"?a(b):this.trigger(a,b)},this.callErrorHandler=function(a,b,c){typeof a=="function"?a(b):this.trigger(a,b)},this.createSuccessHandler=function(b,c,d){return initializeXhrStorage(),function(e,f,g){d&&d(e,f,g),a.slice(a.indexOf(g),1);var h;f=="success"&&(h=g.getResponseHeader("Redirect-Page-To"))&&h=="/login"&&(window.location.href="/login");var i=e,j=null,k=encodeURIComponent(c.url);if(e&&e.hasOwnProperty("note")&&e.hasOwnProperty("inner")){c.returnNotificationData||(i=e.inner),j=e.note;var l=g.getResponseHeader("x-transaction");l&&l!=xhrStorage.getItem(k)&&(j.notCached=!0,xhrStorage.setItem(k,l))}i=this.composeData(i,c),c.cache_ttl&&storage.setItem(k,{data:i,time:time.now()},c.cache_ttl),b&&this.callSuccessHandler(b,i,c),j&&(notifications.updateNotificationState(j),j.notCached&&this.trigger("dataNotificationsReceived",j)),i.debug&&this.trigger("dataSetDebugData",i.debug)}.bind(this)},this.retryJSONRequestAfterDelay=function(a,c,d){var e=setTimeout(function(){this.JSONRequest(a,c)}.bind(this),d*1e3);b.push(e)},this.handleBouncer=function(a){if(a&&a.errors){var b=a.errors.length;for(var c=0;c<b;c++){var d=a.errors[c];if(d&&d.code==326){if(d.sub_error_code==1)this.trigger(document,"dataRequestBounced",{bounce:d});else{var e=d.bounce_location||"/account/access";e.indexOf("https://")===0?this.redirect(e):(e.charAt(0)!=="/"&&(e="/"+e),this.redirect("https://twitter.com"+e))}return!0}}}return!1},this.redirect=function(a){window.location=a},this.createErrorHandler=function(b,c,d,e,f){return function(g,h){f&&f({},h,g),a.slice(a.indexOf(g),1);var i=g&&typeof g.getResponseHeader=="function"?parseInt(g.getResponseHeader("retry-after"),10):null;if(c.retryIfUnavailable&&g.status==503&&i>0){d.retryIfUnavailable=!1,this.retryJSONRequestAfterDelay(d,e,i);return}var j;try{j=JSON.parse(g.responseText),j.xhr={status:g.status};if(this.handleBouncer(j))return;j&&j.challengeName?this.trigger(document,"dataInitialChallengeNeeded",j):j&&j.message&&!this.attr.noShowError&&this.trigger("uiShowError",j)}catch(k){j={xhr:{}},g&&(g.statusText&&(j.xhr.statusText=g.statusText),g.status&&(j.xhr.status=g.status))}j.message||(j.message=_('Internal server error.')),j=this.composeData(j,c),b&&this.callErrorHandler(b,j,c)}.bind(this)},this.createCompletionHandler=function(a,b,c){return function(d,e,f){var g=time.now()-c;this.trigger&&this.attr.statsName&&this.trigger("dataAjaxDuration",{statsName:this.attr.statsName,statsSubcategory:a.statsSubcategory,duration:g,status:e,url:a.url,requestData:this.sortData(b),responseText:f&&f.responseText})}.bind(this)},this.sortData=function(a){if(!a||typeof a!="object")return a;var b={},c=Object.keys(a).sort();return c.forEach(function(c){b[c]=a[c]}),b},this.extractParams=function(a,b){var c={},d=params.fromQuery(b);return Object.keys(d).forEach(function(b){a[b]&&(c[b]=d[b])}),c},this.JSONRequest=function(b,c){var d=time.now(),e,f,g;b.retryIfUnavailable&&(f=utils.merge(b),g=c);if(b.cache_ttl){storage||(storage=new StorageConstr("with_data")),e=storage.getItem(encodeURIComponent(b.url));if(e&&new Date-e.time<=b.cache_ttl){b.success&&this.callSuccessHandler(b.success,e.data);return}}var h=c=="POST"||c=="DELETE";h&&b.isMutation===!1&&(h=!1),delete b.isMutation,this.trigger&&h&&this.trigger("dataPageMutated"),["url"].forEach(function(a){if(!b.hasOwnProperty(a))throw new Error("getJSONRequest called without required option: "+a,arguments)});var i=b.data||{},j=b.headers;["GET","POST"].indexOf(c)<0&&(i=$.extend({_method:c},i),c="POST"),c=="POST"&&(i=this.addAuthToken(i));var k=$.extend({lang:!0},b.echoParams);i=$.extend(i,this.extractParams(k,window.location)),$.extend(i,notifications.extraParameters(b.url));var l=this.createCompletionHandler(b,i,d);b.success=this.createSuccessHandler(b.success,b,l),b.error=this.createErrorHandler(b.error,b,f,g,l),this.attr.includePageContext&&this.attr.pageContext&&(i.page_context=this.attr.pageContext);var m=$.ajax($.extend(b,{url:b.url,data:this.sortData(i),dataType:b.dataType||"json",type:c}));return b.noAbortOnNavigate||a.push(m),m},this.get=function(a){return this.JSONRequest(a,"GET")},this.post=function(a){return this.JSONRequest(a,"POST")},this.destroy=function(a){return this.JSONRequest(a,"DELETE")},this.abortAllXHR=function(){a.forEach(function(a){a&&a.abort&&a.abort()}),a=[],b.forEach(function(a){clearTimeout(a)}),b=[]},this.after("initialize",function(){this.on(document,"dataBeforeNavigate",this.abortAllXHR)})}var _=require("core/i18n"),compose=require("core/compose"),CoreStorage=require("app/utils/storage/core"),customStorage=require("app/utils/storage/custom"),notifications=require("app/data/notifications"),params=require("app/utils/params"),time=require("app/utils/time"),utils=require("core/utils"),withAuthToken=require("app/data/with_auth_token"),StorageConstr=customStorage({withExpiry:!0}),storage,xhrStorage;module.exports=withData
  });
  define("app/data/with_rollback_count",["module","require","exports"],function(module, require, exports) {
  module.exports=function(){this.rollbackCount=function(){return history.state&&history.state.rollbackCount||0}}
  });
  define("app/data/navigation",["module","require","exports","core/component","core/utils","app/utils/time","app/utils/full_path","app/data/with_data","app/data/with_rollback_count","app/utils/push_state_enabled"],function(module, require, exports) {
  function navigationData(){this.defaultAttrs({viewContainer:"#page-container",pushState:!0,pushStateRequestHeaders:{"X-Push-State-Request":!0},pushStatePageLimit:5e5,assetsBasePath:"/",noTeardown:!0,init_data:{}});var a=/\/a\/(\d+)/,b,c,d,e;this.pageCache={},this.pageCacheTTLs={},this.navigateUsingPushState=function(a,b){var e=fullPath();d=b.href,c=b.isPopState;if(!c&&b.href==e&&this.pageCache[e])return;if(this.shouldUseModalForPermalink(b)){this.useModalForPermalink(b);return}this.getPageData(b.href)},this.navigate=function(a,c){if(pushStateEnabled(this.attr.pushState))this.trigger(document,{type:"uiBeforeNavigate",defaultBehavior:this.navigateUsingPushState.bind(this,a,c)},c);else{var d=c.href;d!=b&&this.navigateTo(d)}},this.shouldUseModalForPermalink=function(a){return!!(this.attr.init_data.deciders&&this.attr.init_data.deciders.overlayPermalink&&a.href&&a.href.match(/\w+\/status\/[0-9]+/))},this.useModalForPermalink=function(a){this.trigger("uiOverlayNavigate",a)},this.sweepPageCache=function(){var a=time.now();for(var b in this.pageCacheTTLs)a>this.pageCacheTTLs[b]&&(delete this.pageCache[b],delete this.pageCacheTTLs[b])},this.hasDeployTimestampChanged=function(b){var c=this.attr.assetsBasePath&&this.attr.assetsBasePath.match(a),d=b.init_data.assetsBasePath&&b.init_data.assetsBasePath.match(a);return c&&d&&d[1]!=c[1]},this.getPageData=function(a){var b;this.trigger("dataBeforeNavigate"),this.attr.init_data.initialState&&this.createInitialState(),this.sweepPageCache(),this.trigger("uiBeforeNewPageLoad");if(b=this.pageCache[a])b.fromCache=!0,b.href=a,this.pageDataReceived(a,b);else{this.trigger("dataPageFetch");var c=this.attr.pushStateRequestHeaders;this.attr.init_data.isMonorail&&(c=utils.merge(c,{"X-Referrer-Stack":"monorail"})),c=utils.merge(c,{"X-Asset-Version":this.attr.init_data.assetVersionKey}),this.get({headers:c,url:a,success:function(b){var c;if(b.init_data&&b.page&&b.module){c=b.init_data.href,b.href=c;if(!b.init_data.pushState){this.navigateTo(c);return}if(this.hasDeployTimestampChanged(b)){this.navigateTo(c);return}if(b.init_data.viewContainer!=this.attr.viewContainer){this.attr.viewContainer=b.init_data.viewContainer,this.navigateTo(c);return}this.cacheState(c,b);if(d!=a)return;this.pageDataReceived(c,b)}else this.navigateTo(b.href||a)}.bind(this),error:function(b){this.navigateTo(a)}.bind(this)})}},this.updatePageCache=function(a,c){if(c.href==b)return;var d=this.pageCache[b];d&&(d.page=this.select("viewContainer").html(),this.pageCacheTTLs[b]=time(d.cache_ttl).seconds.fromNow().getTime(),d.page.length>this.attr.pushStatePageLimit&&(delete this.pageCache[b],delete this.pageCacheTTLs[b])),this.trigger("dataPageCacheUpdated")},this.cacheState=function(a,b){b.cache_ttl!==0&&(this.pageCache[a]=b,this.pageCacheTTLs[a]=time(b.cache_ttl).seconds.fromNow().getTime())},this.pageDataReceived=function(a,b){this.rollbackCount()>0?(e=utils.once(this.refreshPage.bind(this,a,b)),this.on("uiDidRollback",e),this.trigger("dataNeedsRollback",{rollbackCount:this.rollbackCount()})):(e&&(this.off("uiDidRollback",e),e=null),this.refreshPage(a,b))},this.refreshPage=function(a,b){a!=fullPath()&&history.pushState({title:b.title},b.title,a),b.isPopState=c,setTimeout(function(){this.trigger("dataPageRefresh",b)}.bind(this))},this.createInitialState=function(){var a=utils.merge(this.attr.init_data.initialState,!0);a.init_data=utils.merge(this.attr.init_data,!0),delete a.init_data.initialState,this.attr.init_data.initialState=null,this.cacheState(b,a),this.createInitialHistoryEntry()},this.createInitialHistoryEntry=function(a,b){if(this.attr.init_data.initialState){var c=this.attr.init_data.initialState.title,d=fullPath().replace(/\/{2,}/g,"/");history.replaceState({title:c},c,d)}},this.resetPageCache=function(a,b){this.pageCache={},this.pageCacheTTLs={}},this.removePageFromCache=function(a,b){var c=b.href;this.pageCache[c]&&(delete this.pageCache[c],delete this.pageCacheTTLs[c])},this.navigateTo=function(a){location.href=a},this.destroyCurrentPageState=function(){history.replaceState(null,document.title,b)},this.resetStateVariables=function(){b=fullPath(),c=!1,d=null},this.after("initialize",function(){this.on("uiNavigate",this.navigate),pushStateEnabled(this.attr.pushState)?(this.on("uiSwiftLoaded uiPageChanged",this.resetStateVariables),this.on("uiSwiftLoaded",this.createInitialHistoryEntry),this.on("uiUpdatePageCache",this.updatePageCache),this.on(document,"dataPageMutated",this.resetPageCache),this.on(document,"uiPromotedLinkClick",this.removePageFromCache),this.on(window,"beforeunload uiBeforeUnload",this.destroyCurrentPageState)):this.on("uiSwiftLoaded",this.resetStateVariables)})}var component=require("core/component"),utils=require("core/utils"),time=require("app/utils/time"),fullPath=require("app/utils/full_path"),withData=require("app/data/with_data"),withRollbackCount=require("app/data/with_rollback_count"),pushStateEnabled=require("app/utils/push_state_enabled"),NavigationData=component(navigationData,withData,withRollbackCount);module.exports=NavigationData
  });
  define("app/data/teardown_manager",["module","require","exports","core/component","core/registry"],function(module, require, exports) {
  function TeardownManager(){this.defaultAttrs({noTeardown:!0}),this.doTeardown=function(a,b){Object.keys(registry.allInstances).forEach(function(a){var c=registry.allInstances[a];c&&this.teardownInstance(c.instance,b.teardownContext)},this)},this.teardownInstance=function(a,b){if(a.attr.noTeardown)return;b?a.teardownContext==b&&a.teardown():a.teardown()},this.after("initialize",function(){this.on("uiTeardown",this.doTeardown)})}var defineComponent=require("core/component"),registry=require("core/registry");module.exports=defineComponent(TeardownManager)
  });
  define("app/utils/dropdown_close_events",["module","require","exports"],function(module, require, exports) {
  module.exports={GLOBAL_FORCE_CLOSE_EVENTS:["uiBeforePageChanged","uiPageChanged","uiNavigate","uiForceDropdownClosed"].join(" "),GLOBAL_REQUEST_CLOSE_EVENTS:["uiCloseDropdowns"].join(" ")}
  });
  define("app/utils/is_visible",["module","require","exports"],function(module, require, exports) {
  function isVisible(a){return a.is(":visible")&&a.css("visibility")!="hidden"&&a.css("opacity")=="1"}module.exports=isVisible
  });
  define("app/utils/is_enabled",["module","require","exports"],function(module, require, exports) {
  function isEnabled(a){return!a.attr("disabled")&&!a.attr("aria-disabled")}module.exports=isEnabled
  });
  define("app/utils/with_keyboard_modality",["module","require","exports","app/utils/is_visible","app/utils/is_enabled"],function(module, require, exports) {
  function withKeyboardModality(){this.defaultAttrs({focusableDescendants:"a,textarea,select,input,button,div[contenteditable=true],li[tabindex]",firstTabStopClass:"js-first-tabstop",lastTabStopClass:"js-last-tabstop",firstTabStopSelector:".js-first-tabstop",lastTabStopSelector:".js-last-tabstop"}),this.focusNextAvailableControl=function(a,b){var c=b.find(this.attr.focusableDescendants).get();a&&a=="last"&&c.reverse();var d;c.some(function(a){var b=$(a);if(isEnabled(b)&&isVisible(b))return d=a,!0});if(d)try{d.focus()}catch(e){}return d&&document.activeElement==d},this.createFirstLastTabStop=function(a,b,c){b=typeof b!="undefined"?b:0,c=typeof c!="undefined"?c:0,a.prepend('<div class="'+this.attr.firstTabStopClass+'" tabindex="'+b+'"></div>'),a.append('<div class="'+this.attr.lastTabStopClass+'" tabindex="'+c+'"></div>')},this.removeFirstLastTabStop=function(a){a.find(this.attr.firstTabStopSelector).remove(),a.find(this.attr.lastTabStopSelector).remove()}}var isVisible=require("app/utils/is_visible"),isEnabled=require("app/utils/is_enabled");module.exports=withKeyboardModality
  });
  define("app/utils/prevent_next_tooltip",["module","require","exports"],function(module, require, exports) {
  function preventNextTooltip(a){var b=$(a);if(!b.hasClass("js-tooltip"))return;b.addClass("js-is-nextTooltipPreventedOnFocus")}module.exports=preventNextTooltip
  });
  deferred('$lib/bootstrap_tooltip.js', function() {
  /*! bootstrap-tooltip.js v2.0.2 (c) 2012 Twitter, Inc. http://www.apache.org/licenses/LICENSE-2.0 */!function($){function b(b){clearTimeout(b),delete a[b]}function c(b,c){var d=setTimeout(b,c);return a[d]=!0,d}function d(){Object.keys(a).forEach(b)}"use strict";var a={},e=".visuallyhidden, .u-hiddenVisually",f=function(a,b){this.init("tooltip",a,b)};f.prototype={constructor:f,init:function(a,b,c){this.type=a,this.$element=$(b),this.options=this.getOptions(c),this.enabled=!0,this.options.trigger!="manual"&&(this.$element.on("mouseenter focus",this.options.selector,$.proxy(this.enter,this)),this.$element.on("mouseleave blur",this.options.selector,$.proxy(this.leave,this)),this.$element.on("click",this.options.selector,$.proxy(this.leave,this))),this.options.selector?this._options=$.extend({},this.options,{trigger:"manual",selector:""}):this.fixTitle()},getOptions:function(a){return a=$.extend({},$.fn[this.type].defaults,a,this.$element.data()),a.delay&&typeof a.delay=="number"&&(a.delay={show:a.delay,hide:100}),a},enter:function(a){var d=$(a.target);if(a.type=="focusin"&&d.hasClass("js-is-nextTooltipPreventedOnFocus")){d.removeClass("js-is-nextTooltipPreventedOnFocus");return}var e=$(a.currentTarget)[this.type](this._options).data(this.type);!e.options.delay||!e.options.delay.show?e.show():(b(e.timeout),e.timeout=c(function(){e.show()},e.determineShowDelay(e.options.delay.show)))},leave:function(a){var d=$(a.currentTarget)[this.type](this._options).data(this.type);!d.options.delay||!d.options.delay.hide?d.hide():(b(d.timeout),d.timeout=c(function(){d.hide()},d.options.delay.hide))},hasIconOnlyLabel:function(){var a=this.$element.text().trim()||this.getLabelEl().text().trim(),b=!!this.$element.find("img").length,c=function(a){return $(a).text().trim()},d=this.getHiddenLabel().toArray().map(c).join("");return b&&!!a.length||d==a},determineShowDelay:function(a){return this.hasIconOnlyLabel()?Math.min(250,a):a},getLabelText:function(){var a=this.$element.text().trim();return a.length||(a=this.getLabelEl().text()),a.trim()},hasPartiallyHiddenLabelText:function(){var a=this.$element.text().trim()?this.$element:this.getLabelEl(),b=a.text().trim(),c=!1;return b&&a.add(a.find("*:visible")).each(function(a,d){if($(d).text().trim()==b){var e=d.getBoundingClientRect(),f=Math.ceil(e.right-e.left);c=f>2&&d.scrollWidth>f}return!c}),c},getLabelEl:function(){var a=this.$element[0].id,b=$();return this.$element.is("input")&&(b=this.$element.closest("label"),!b.length&&a&&(b=$("label[for="+a+"]"))),b},hasHiddenLabel:function(){return!!this.getHiddenLabel().length},getHiddenLabel:function(){var a=this.$element.find(e),b;return a.length||(b=this.getLabelEl(),b.is(e)?a=b:a=b.find(e)),a},shouldShow:function(){var a=this.getLabelText()!=this.getTitle();return a||this.hasPartiallyHiddenLabelText()||this.hasHiddenLabel()},show:function(){var a,c,d,e,f,g,h,i;if(this.shouldShow()&&this.hasContent()&&this.enabled){b(this.timeout),$(".tooltip").remove(),this.$tip=null,a=this.tip(),this.setContent(),this.options.animation&&a.addClass("fade"),g=typeof this.options.placement=="function"?this.options.placement.call(this,a[0],this.$element[0]):this.options.placement,c=/in/.test(g),this.applyARIA(),a.remove().css({top:0,left:0,display:"block"}).appendTo(c?this.$element:document.body),d=this.getPosition(c),e=a[0].offsetWidth,f=a[0].offsetHeight;switch(c?g.split(" ")[1]:g){case"bottom":h={top:d.top+d.height,left:d.left+d.width/2-e/2};break;case"top":h={top:d.top-f,left:d.left+d.width/2-e/2};break;case"left":h={top:d.top+d.height/2-f/2,left:d.left-e};break;case"right":h={top:d.top+d.height/2-f/2,left:d.left+d.width}}this.$element.addClass("in"),a.css(h).addClass(g).addClass("in"),a.trigger("uiTooltipShow")}},applyARIA:function(){var a=this.getLabelText(),b=this.$element.find("img").attr("alt"),c=a+b,d=!this.hasHiddenLabel()&&c.trim()!=this.getTitle();d&&(this.tip().find(".tooltip-inner").attr({role:"tooltip",id:"aria-tooltip"}),this.$element.attr("aria-describedby","aria-tooltip"))},setContent:function(){var a=this.tip();a.find(".tooltip-inner").html(this.getTitle()),a.removeClass("fade in top bottom left right")},hide:function(){function d(){var a=setTimeout(function(){c.off($.support.transition.end).remove()},500);c.one($.support.transition.end,function(){clearTimeout(a),c.remove()})}var a=this,c=this.tip();b(a.timeout),this.$element.removeAttr("aria-describedby"),c.removeClass("in"),this.$element.removeClass("in"),c.trigger("uiTooltipHide"),$.support.transition&&this.$tip.hasClass("fade")?d():c.remove()},fixTitle:function(){var a=this.$element;(a.attr("title")||typeof a.attr("data-original-title")!="string")&&a.attr("data-original-title",a.attr("title")||"").removeAttr("title")},setTitle:function(a){this.$element.attr("data-original-title",a||"")},getTitle:function(){var a,b=this.$element,c=this.options;return a=b.attr("data-original-title")||(typeof c.title=="function"?c.title.call(b[0]):c.title),a=(a||"").toString().replace(/(^\s*|\s*$)/,""),a},hasContent:function(){return this.getTitle()},getPosition:function(a){var b=this.$element,c=".icon,.Icon,i,img";b.is("a")&&b.find(c).length&&(b=b.find(c));var d=b.offset();return b.data("tooltip-top")&&(d.top=parseInt(b.data("tooltip-top"))),b.data("tooltip-left")&&(d.left=parseInt(b.data("tooltip-left"))),$.extend({},a?{top:0,left:0}:d,{width:b[0].offsetWidth,height:b[0].offsetHeight})},tip:function(){return this.$tip=this.$tip||$(this.options.template)},validate:function(){this.$element[0].parentNode||(this.hide(),this.$element=null,this.options=null)},enable:function(){this.enabled=!0},disable:function(){this.enabled=!1},toggleEnabled:function(){this.enabled=!this.enabled},toggle:function(){this[this.tip().hasClass("in")?"hide":"show"]()}},$.fn.tooltip=function(a){var b=Array.prototype.slice.call(arguments,1);return this.each(function(){var c=$(this),d=c.data("tooltip"),e=typeof a=="object"&&a;d||c.data("tooltip",d=new f(this,e)),typeof a=="string"&&d[a].apply(d,b)})},$.fn.tooltip.clearAllPendingTimeouts=d,$.fn.tooltip.Constructor=f,$.fn.tooltip.defaults={animation:!0,delay:1e3,selector:!1,placement:"top",trigger:"hover",title:"",template:'<div class="tooltip"><div class="tooltip-arrow"></div><div class="tooltip-inner"></div></div>'}}(window.jQuery)
  });
  define("app/ui/with_dropdown",["module","require","exports","core/compose","app/utils/dropdown_close_events","app/utils/with_keyboard_modality","app/utils/prevent_next_tooltip","$lib/bootstrap_tooltip.js"],function(module, require, exports) {
  function withDropdown(){compose.mixin(this,[withKeyboardModality]),this.defaultAttrs({dropDownSelector:".dropdown",dropDownMenuSelector:".dropdown-menu",dropDownMenuAlignRightClass:"dropdown-menu--rightAlign",togglerSelector:".js-dropdown-toggle:not([disabled])",preventCloseSelector:".js-dropdown-prevent-close",openClass:"open",restoreFocusOnClose:!1,skipFocusManager:!1}),this.isOpen=function(){return!!this.$dropdown&&this.$dropdown.hasClass(this.attr.openClass)},this.toggleDisplay=function(a){if(!a)return;var b=$(a.target).closest(this.attr.dropDownSelector);this.isOpen()&&!this.$dropdown.is(b)&&this.closeDropdown(),this.$dropdown=b,this.isOpen()?this.notifyCloseRequested():this.notifyOpenRequested(),a.preventDefault(),a.stopImmediatePropagation();var c=document.activeElement;$(a.target).closest(".js-tooltip").trigger("blur"),c&&c.focus()},this.enableTriggerTooltip=function(a){this.$dropdown.find(this.attr.togglerSelector).closest(".js-tooltip").tooltip(a?"enable":"disable")},this.showDropdown=function(a){var b=$(a.target);if(!b.length)return;b.hasClass(this.attr.openClass)||(this.$dropdown=b,this.notifyOpenRequested())},this.openDropdown=function(){if(this.isOpen())return;this.trigger(document,"uiCloseDropdowns"),this.enableTriggerTooltip(!1);var a=this.$dropdown.find(this.attr.dropDownMenuSelector);this.createFirstLastTabStop(a),this.attr.skipFocusManager||(this.on(a.find(this.attr.lastTabStopSelector),"focus",this.focusFirstAvailableControl),this.on(a.find(this.attr.firstTabStopSelector),"focus",this.focusLastAvailableControl)),this.activeEl=document.activeElement,this.$dropdown.addClass(this.attr.openClass),this.repositionHorizontal(),this.trigger(this.$dropdown,"uiDropdownOpened")},this.repositionHorizontal=function(){var a=this.$dropdown.find(this.attr.dropDownMenuSelector);if(a.length>0){a.removeClass(this.attr.dropDownMenuAlignRightClass);var b=a.offset(),c=this.getWindowWidth();a.toggleClass(this.attr.dropDownMenuAlignRightClass,b.left+a.outerWidth()>c)}},this.getWindowWidth=function(){return $(window).width()},this.notifyOpenRequested=function(){if(this.isOpen())return;this.trigger(this.$dropdown,{type:"uiDropdownOpenRequested",defaultBehavior:"openDropdown"})},this.closeDropdown=function(){if(!this.isOpen())return;this.enableTriggerTooltip(!0);var a=this.$dropdown.find(this.attr.dropDownMenuSelector);this.attr.skipFocusManager||(this.off(a.find(this.attr.lastTabStopSelector),"focus",this.focusFirstAvailableControl),this.off(a.find(this.attr.firstTabStopSelector),"focus",this.focusLastAvailableControl)),this.removeFirstLastTabStop(a),this.$dropdown.removeClass(this.attr.openClass),this.trigger(this.$dropdown,"uiDropdownClosed"),this.$dropdown=null,this.attr.restoreFocusOnClose&&this.restoreFocus()},this.notifyCloseRequested=function(){if(!this.isOpen())return;this.trigger(this.$dropdown,{type:"uiDropdownCloseRequested",defaultBehavior:"closeDropdown"})},this.closeAndRestoreFocus=function(a){if(!this.isOpen())return;this.notifyCloseRequested(),this.activeEl&&(a.preventDefault(),this.restoreFocus())},this.restoreFocus=function(){if(this.activeEl){try{preventNextTooltip(this.activeEl)}catch(a){}this.activeEl.focus(),this.activeEl=null}},this.close=function(a){if(!this.isOpen())return;var b=a.target,c=$(b),d=this.$dropdown.find(this.attr.dropDownMenuSelector),e=this.$dropdown.find(this.attr.togglerSelector),f=d.is(b)||$.contains(d[0],b),g=!!e.length&&(e.is(b)||$.contains(e[0],b)),h=c.is(this.attr.preventCloseSelector)||!!c.closest(this.attr.preventCloseSelector,this.$dropdown[0]).length;if(f||g||h)return;this.notifyCloseRequested()},this.applyARIAAttrs=function(){var a=this.select("togglerSelector");a.prop("nodeName")=="A"&&a.attr({role:"button"}),a.attr({"aria-haspopup":!0})},this.focusFirstAvailableControl=function(){var a;this.isOpen()&&(a=this.$dropdown.find(this.attr.dropDownMenuSelector),this.focusNextAvailableControl("first",a))},this.focusLastAvailableControl=function(){var a;this.isOpen()&&(a=this.$dropdown.find(this.attr.dropDownMenuSelector),this.focusNextAvailableControl("last",a))},this.preventFocusLoss=function(a){a.preventDefault()},this.after("initialize",function(){this.on(document,"uiSwiftLoaded",this.applyARIAAttrs),this.on("uiShouldShowDropdown",this.showDropdown),this.on("click",{togglerSelector:this.toggleDisplay}),this.attr.restoreFocusOnClose&&this.on("mousedown",{togglerSelector:this.preventFocusLoss}),this.on(document,dropdownCloseEvents.GLOBAL_REQUEST_CLOSE_EVENTS,this.notifyCloseRequested),this.on(document,"click",this.close),this.on(document,"uiShortcutEsc",this.closeAndRestoreFocus),this.on(document,dropdownCloseEvents.GLOBAL_FORCE_CLOSE_EVENTS,this.closeDropdown)})}var compose=require("core/compose"),dropdownCloseEvents=require("app/utils/dropdown_close_events"),withKeyboardModality=require("app/utils/with_keyboard_modality"),preventNextTooltip=require("app/utils/prevent_next_tooltip");require("$lib/bootstrap_tooltip.js"),module.exports=withDropdown
  });
  define("app/ui/with_dropdownmenu",["module","require","exports","core/compose","app/ui/with_dropdown","app/utils/is_visible","app/utils/is_enabled"],function(module, require, exports) {
  function withDropdownMenu(){compose.mixin(this,[withDropdown]),this.defaultAttrs({menuListSelector:".dropdown-menu ul",menuItemSelector:".dropdown-menu li:not(.dropdown-divider)",menuitemFragmentSelector:".dropdown-menu li a[href=#]",dividerSelector:".dropdown-divider",dividerClass:"dropdown-divider",selectedMenuItemSelector:".js-selected",firstMenuItemSelector:"li:first-child",lastMenuItemSelector:"li:last-child",selectedMenuItemClass:"js-selected"}),this.applyARIAToMenuItems=function(){this.$dropdown.find("li").attr("role","presentation"),this.$dropdown.find(this.attr.menuItemSelector).each(function(a,b){var c=$(b).find("a, button").eq(0),d=!!c.length&&isVisible(c)&&isEnabled(c);d&&c.attr({role:"menuitem"})})},this.applyARIAToMenu=function(){var a=this.$dropdown.find(this.attr.menuListSelector),b=this.$dropdown.find(this.attr.togglerSelector),c;b.length&&!(c=b.attr("id"))&&(c="menu-"+instances++,b.attr("id",c)),a.attr({tabIndex:-1,role:"menu"}),c&&a.attr("aria-labelledby",c)},this.moveSelection=function(a){if(!this.isOpen())return;var b={38:"prev",40:"next"}[a.keyCode];if(!b)return;var c=this.$dropdown.find(this.attr.menuListSelector).find("[role=menuitem]"),d=this.$dropdown.find(this.attr.selectedMenuItemSelector),e,f;d.length&&(f=c.index(d),f=b=="next"?f+1:f-1,e=c.eq(f));if(!e||e&&!e.length)e=b=="next"?c.first():c.last();e.length&&(d.removeClass(this.attr.selectedMenuItemClass),e.addClass(this.attr.selectedMenuItemClass),e[0].focus(),a.preventDefault())},this.applyARIAAndFocus=function(a){var b=this.$dropdown,c;b&&b.is(a.target)&&(this.applyARIAToMenu(),this.applyARIAToMenuItems(),c=this.$dropdown.find(this.attr.menuListSelector),c.attr("aria-hidden",!1),c[0].focus(),this.trigger("uiDropdownFocused"))},this.toggleARIAHiddenState=function(a){var b=this.$dropdown;b&&b.is(a.target)&&(b.find(this.attr.menuListSelector).attr("aria-hidden",!0),b.find(this.attr.selectedMenuItemSelector).removeClass(this.attr.selectedMenuItemClass))},this.preventFragmentNavigation=function(a){if(!this.isOpen())return;a.preventDefault()},this.after("initialize",function(){this.on(document,"keydown",{menuListSelector:this.moveSelection}),this.on(document,"click",{menuitemFragmentSelector:this.preventFragmentNavigation}),this.on(document,"uiDropdownOpened",this.applyARIAAndFocus),this.on(document,"uiDropdownClosed",this.toggleARIAHiddenState)})}var compose=require("core/compose"),withDropdown=require("app/ui/with_dropdown"),isVisible=require("app/utils/is_visible"),isEnabled=require("app/utils/is_enabled"),instances=0;module.exports=withDropdownMenu
  });
  define("app/ui/language_dropdown",["module","require","exports","core/component","app/ui/with_dropdownmenu"],function(module, require, exports) {
  var defineComponent=require("core/component"),withDropdownMenu=require("app/ui/with_dropdownmenu"),LanguageDropdown=defineComponent(withDropdownMenu);module.exports=LanguageDropdown
  });
  define("app/ui/google",["module","require","exports","core/component"],function(module, require, exports) {
  function googleAnalytics(){this.defaultAttrs({pageName:"",sectionName:"",loggedIn:!1,screenName:"",allowAdsPersonalization:!0}),this.initGoogle=function(){(function(a,b,c,d,e,f,g){a.GoogleAnalyticsObject=e,a[e]=a[e]||function(){(a[e].q=a[e].q||[]).push(arguments)},a[e].l=1*new Date,f=b.createElement(c),g=b.getElementsByTagName(c)[0],f.async=1,f.src=d,g.parentNode.insertBefore(f,g)})(window,document,"script","//www.google-analytics.com/analytics.js","ga"),ga("create","UA-30775-6","twitter.com"),!/^yes$|^1$/.test(navigator.msDoNotTrack||navigator.doNotTrack||window.doNotTrack)&&this.attr.allowAdsPersonalization&&ga("require","displayfeatures"),ga("send","pageview",this.getPageName()),window.ga=ga,this.off("uiSwiftLoaded",this.initGoogle)},this.trackEvent=function(a,b){window.ga("send","event","button",b.gaEvent,"nav-buttons")},this.trackPageChange=function(a,b){window.ga("send","pageview",this.getPageName())},this.trackOverlayChange=function(a,b){b.init_data&&window.ga("send","pageview",this.getPageName(b.init_data.pageName,b.init_data.sectionName))},this.getPageName=function(a,b){var c=this.attr.loggedIn?"user":"anon";return a=a||this.attr.pageName,b=b||this.attr.sectionName,this.attr.loggedIn&&a=="profile"&&this.screenNameRE.test(this.getPath())&&(a="self"),"/"+[c,a,b].join("/")},this.getPath=function(){return location.pathname},this.after("initialize",function(){this.screenNameRE=new RegExp("^/"+this.attr.screenName+"(/.*)?$"),this.on("uiSwiftLoaded",this.initGoogle),this.on("uiPageChanged uiOverlayClosed",this.trackPageChange),this.on("uiOverlayPageChanged",this.trackOverlayChange),this.on("GATrackEvent",this.trackEvent)})}var defineComponent=require("core/component"),GoogleAnalytics=defineComponent(googleAnalytics);module.exports=GoogleAnalytics
  });
  define("app/data/user_info",["module","require","exports"],function(module, require, exports) {
  var user={},userInfo={set:function(a){user.id=a.userId,user.guestId=a.guestId,user.screenName=a.screenName,user.fullName=a.fullName,user.deciders=a.deciders||{},user.experiments=a.experiments||{}},reset:function(){this.set({guestId:null,userId:null,screenName:null,fullName:null,deciders:{},experiments:{}})},user:user,getDecider:function(a){return!!user.deciders[a]},getDeciderValue:function(a){return user.deciders[a]},getExperimentGroup:function(a){return user.experiments[a]}};userInfo.reset(),module.exports=userInfo
  });
  define("app/ui/macaw_nymizer",["module","require","exports","core/component","app/data/user_info","app/utils/params"],function(module, require, exports) {
  function macawNymizer(){this.defaultAttrs({kenshooLandingParam:"ken_prf",checkLandingParam:!0}),this.hitEndpoint=function(a){var b=new Image;b.src="/i/anonymize?data="+encodeURIComponent(JSON.stringify(a))},this.hasLandingParam=function(){return!!params.fromQuery(window.location)[this.attr.kenshooLandingParam]},this.renderPixel=function(){this.hitEndpoint([{integration:"kenshooClick",ref:document.referrer,type:"click"}])},this.conversion=function(a,b){this.hitEndpoint([{integration:"kenshooConversion",ref:document.referrer,type:b.mnType}])},this.after("initialize",function(){userInfo.getDecider("enableMacawNymizerConversionLanding")&&((!this.attr.checkLandingParam||this.hasLandingParam())&&this.on("uiSwiftLoaded",this.renderPixel),this.on("MNConversion",this.conversion))})}var defineComponent=require("core/component"),userInfo=require("app/data/user_info"),params=require("app/utils/params"),MacawNymizer=defineComponent(macawNymizer);module.exports=MacawNymizer
  });
  define("app/ui/impression_cookies",["module","require","exports","core/component","app/utils/cookie"],function(module, require, exports) {
  function impressionCookies(){this.defaultAttrs({sendImpressionCookieSelector:"a[data-send-impression-cookie]",link:"a"}),this.setCookie=function(a,b){cookie("ic",a,{expires:b})},this.sendImpressionCookie=function(a,b){var c=b.el;if(c){var d=$(c),e=d.closest("[data-impression-cookie]").attr("data-impression-cookie");this.triggerPromotedClickAndSetCookie(a,{href:d.attr("href"),hostName:c.hostname,impressionCookie:e})}},this.triggerPromotedClickAndSetCookie=function(a,b){if(b.impressionCookie){this.trigger("uiPromotedLinkClick",{href:b.href});var c=new Date,d=6e5,e=(new Date(c.getTime()+d)).toUTCString();this.setCookie(b.impressionCookie,e)}},this.after("initialize",function(){this.on("click",{sendImpressionCookieSelector:this.sendImpressionCookie}),this.on("uiShowProfileNewWindow",{link:this.sendImpressionCookie}),this.on("uiSendImpressionCookie",this.triggerPromotedClickAndSetCookie)})}var defineComponent=require("core/component"),cookie=require("app/utils/cookie");module.exports=defineComponent(impressionCookies)
  });
  define("app/data/promoted_logger",["module","require","exports","core/component","app/data/with_data","app/data/user_info"],function(module, require, exports) {
  function promotedLogger(){this.defaultAttrs({tweetHashtagLinkSelector:".js-stream-tweet .twitter-hashtag, .permalink-tweet .twitter-hashtag",tweetLinkSelector:".js-stream-tweet .twitter-timeline-link, .permalink-tweet .twitter-timeline-link",mediaTagUserSelector:".popup-tagged-user-list .js-user-profile-link, .media-tagging-block .js-user-profile-link",statsName:"swift_promoted_logger"}),this.logEvent=function(a,b,c){var d={url:"/i/promoted_content/log.json",data:a,eventData:{},success:"dataLogEventSuccess",error:"dataLogEventError",async:!b,noAbortOnNavigate:!0};c?this.post(d):this.get(d)},this.isEarnedMedia=function(a){return a=="earned"},this.onWillShowSignupDialog=function(){this.willShowSignupDialog=!0},this.onDialogClosed=function(){this.showSignupDialog=!1,this.promotedTrendData&&(this.logPromotedTrendImpression(this.promotedTrendData),this.promotedTrendData=null)},this.possiblyLogPromotedTrendImpression=function(a,b){if(b.source=="clock")return;var c=b.items.filter(function(a){return!!a.promotedTrendId});if(!c.length)return;var d=c[0];if(this.willShowSignupDialog){this.promotedTrendData=d;return}this.logPromotedTrendImpression(d)},this.logPromotedTrendImpression=function(a){this.logEvent({event:"i",promoted_trend_id:a.promotedTrendId})},this.logPromotedTrendClick=function(a,b){if(!b.promotedTrendId)return;this.logEvent({event:"c",promoted_trend_id:b.promotedTrendId},!0)},this.logPromotedTweetImpression=function(a,b){var c=b.tweets.filter(function(a){if(!a.requirePixelImpression)return a.impressionId});c.forEach(function(a){this.logEvent({event:"impression",impression_id:a.impressionId,earned:this.isEarnedMedia(a.disclosureType)})},this)},this.logPromotedTweetImpressionForViewport=function(a,b){b.items.forEach(function(a){this.logEvent({event:"impression",impression_id:a.impressionId,earned:this.isEarnedMedia(a.disclosureType)})}.bind(this))},this.logPromotedTweetQualifiedImpressions=function(a,b){b.items.forEach(function(a){this.logEvent({event:"long_dwell_view",impression_id:a.impressionId,earned:this.isEarnedMedia(a.disclosureType)})}.bind(this))},this.logPromotedTweetLinkClick=function(a){var b=$(a.target).closest("[data-impression-id]").attr("data-impression-id"),c=$(a.target).closest("[data-impression-id]").attr("data-disclosure-type"),d=$(a.target).closest(this.attr.tweetLinkSelector).attr("href");if(!b)return;this.logEvent({event:"url_click",impression_id:b,earned:this.isEarnedMedia(c),url:d},!0)},this.logPromotedTweetMediaTagClick=function(a){var b=$(a.target).closest("[data-impression-id]").attr("data-impression-id"),c=$(a.target).closest("[data-impression-id]").attr("data-disclosure-type");if(!b)return;this.logEvent({event:"user_mention_click",impression_id:b,earned:this.isEarnedMedia(c)},!0)},this.logPromotedTweetHashtagClick=function(a){var b=$(a.target).closest("[data-impression-id]").attr("data-impression-id"),c=$(a.target).closest("[data-impression-id]").attr("data-disclosure-type");if(!b)return;this.logEvent({event:"hashtag_click",impression_id:b,earned:this.isEarnedMedia(c)},!0)},this.logPromotedUserImpression=function(a,b){var c=b.users.filter(function(a){return a.impressionId});c.forEach(function(a){this.logEvent({event:"impression",impression_id:a.impressionId})},this)},this.logPromotedUserClick=function(a,b){var c=b.impressionId;if(!c)return;var d=this.isEarnedMedia(b.disclosureType);b.profileClickTarget==="avatar"?this.logEvent({event:"profile_image_click",impression_id:c,earned:d}):b.isMentionClick?this.logEvent({event:"user_mention_click",impression_id:c,earned:d}):b.isPromotedBadgeClick?this.logEvent({event:"footer_profile",impression_id:c,earned:d}):this.logEvent({event:"screen_name_click",impression_id:c,earned:d})},this.logPromotedUserDismiss=function(a,b){var c=b.impressionId;if(!c)return;this.logEvent({event:"dismiss",impression_id:c})},this.logPromotedTweetDismiss=function(a,b){var c=b.impressionId,d=b.disclosureType;if(!c)return;this.logEvent({event:"dismiss",impression_id:c,earned:this.isEarnedMedia(d)})},this.logPromotedTweetDetails=function(a,b){var c=b.impressionId,d=b.disclosureType,e=b.embeddedMediaLogged,f=b.playableMedia&&userInfo.getDecider("promoted_video_logging_enabled");if(!c||e||f)return;this.logEvent({event:"view_details",impression_id:c,earned:this.isEarnedMedia(d)})},this.logPromotedTweetCardUrlClick=function(a,b){var c=b.impressionId,d=b.disclosureType,e=b.cardEvent;if(c){var f={event:"card_url_click",impression_id:c,earned:this.isEarnedMedia(d)};e?(f.card_event=e,this.logEvent(f,!1,!0)):this.logEvent(f)}},this.logPromotedTweetEmbeddedMedia=function(a,b){var c=b.impressionId,d=b.disclosureType;c&&this.logEvent({event:"embedded_media",impression_id:c,earned:this.isEarnedMedia(d)})},this.logPromotedPlayableMediaEvent=function(a,b){if(!userInfo.getDecider("promoted_video_logging_enabled"))return;var c=b.impressionId,d=b.disclosureType;if(c){var e={event:b.name,impression_id:c,earned:this.isEarnedMedia(d),playlist_url:b.playlist_url};typeof b.video_uuid!="undefined"&&(e.video_uuid=b.video_uuid),typeof b.video_type!="undefined"&&(e.video_type=b.video_type),typeof b.card_event!="undefined"&&(e.card_event=b.card_event),typeof b.engagement_metadata!="undefined"&&(e.engagement_metadata=b.engagement_metadata),this.logEvent(e)}},this.logPromotedBuyNowCardClickEvent=function(a,b){var c=b.impressionId,d=b.disclosureType;if(!c)return;this.logEvent({event:"buynow_card_click",impression_id:c,earned:this.isEarnedMedia(d)})},this.logPromotedBuyNowPurchaseSuccessEvent=function(a,b){var c=b.impressionId,d=b.disclosureType;if(!c)return;this.logEvent({event:"buynow_purchase_success",impression_id:c,earned:this.isEarnedMedia(d)})},this.logPromotedOfferCardClickEvent=function(a,b){var c=b.impressionId,d=b.disclosureType;if(!c)return;this.logEvent({event:"cl_offer_card_click",impression_id:c,earned:this.isEarnedMedia(d)})},this.logPromotedOfferSaveSuccessEvent=function(a,b){var c=b.impressionId,d=b.disclosureType;if(!c)return;this.logEvent({event:"cl_offer_accepted",impression_id:c,earned:this.isEarnedMedia(d)})},this.logPromotedMacawCardClickEvent=function(a,b){var c=b.impressionId;if(!c)return;this.logEvent({event:b.event,impression_id:c,earned:b.earned},b.sync)},this.after("initialize",function(){this.on(document,"uiWillShowSignupDialog",this.onWillShowSignupDialog),this.on(document,"uiDialogClosed",this.onDialogClosed),this.on("uiTrendsDisplayed",this.possiblyLogPromotedTrendImpression),this.on("uiTrendSelected",this.logPromotedTrendClick),this.on("uiTweetsDisplayed",this.logPromotedTweetImpression),this.on("click",{tweetLinkSelector:this.logPromotedTweetLinkClick,tweetHashtagLinkSelector:this.logPromotedTweetHashtagClick,mediaTagUserSelector:this.logPromotedTweetMediaTagClick}),this.on("uiHasExpandedTweet uiHasClickedTweet",this.logPromotedTweetDetails),this.on("uiTweetDismissed",this.logPromotedTweetDismiss),this.on("uiPromotedTweetsInViewport",this.logPromotedTweetQualifiedImpressions),this.on("uiPromotedTweets1pxInViewport",this.logPromotedTweetImpressionForViewport),this.on("uiUsersDisplayed",this.logPromotedUserImpression),this.on("uiDismissUserRecommendation",this.logPromotedUserDismiss),this.on("uiShowProfilePopup uiShowProfileNewWindow",this.logPromotedUserClick),this.on(window,"uiCardUrlClick",this.logPromotedTweetCardUrlClick),this.on("uiEmbeddedMedia",this.logPromotedTweetEmbeddedMedia),this.on("uiPlayableMediaEvent",this.logPromotedPlayableMediaEvent),this.on("uiBuyNowCardClicked",this.logPromotedBuyNowCardClickEvent),this.on("uiCommerceBuyNowSuccess",this.logPromotedBuyNowPurchaseSuccessEvent),this.on("uiOffersCardClicked",this.logPromotedOfferCardClickEvent),this.on("uiOffersSaveSuccess",this.logPromotedOfferSaveSuccessEvent),this.on("uiMacawCardClicked",this.logPromotedMacawCardClickEvent)})}var defineComponent=require("core/component"),withData=require("app/data/with_data"),userInfo=require("app/data/user_info"),PromotedLogger=defineComponent(promotedLogger,withData);module.exports=PromotedLogger
  });
  define("app/ui/message_drawer",["module","require","exports","core/component"],function(module, require, exports) {
  function messageDrawer(){this.defaultAttrs({minTimeout:2e3,messageSelector:".message",closeSelector:".dismiss",reloadSelector:".js-reload",textSelector:".message-text",bannersSelector:"#banners",topOffset:46,hiddenClass:"hidden",dialogOpenSelector:".modal-enabled, .overlay-enabled",$body:$("body")}),this.calculateFadeTimeout=function(a,b){if(b!=null)return b;var c=a.split(" ").length,d=c*1e3/5+225;return d<this.attr.minTimeout?this.attr.minTimeout:d},this.dialogPresent=function(){return this.attr.$body.is(this.attr.dialogOpenSelector)},this.showMessage=function(a,b,c){this.showing=!0;var d={top:this.attr.topOffset+$(this.attr.bannersSelector).height()};clearTimeout(this.messageTimeout),this.timeoutExpired=!1,this.dialogPresent()&&(d.top=0),this.$node.stop(),this.select("textSelector").html(a),this.$node.removeClass(this.attr.hiddenClass),this.$node.animate(d,300,function(){this.scheduleClose(b,this.calculateFadeTimeout(a,c))}.bind(this)),this.select("closeSelector").toggle(!!b)},this.scheduleClose=function(a,b){a||(this.messageTimeout=setTimeout(function(){this.hovering||this.closeMessage(),this.timeoutExpired=!0}.bind(this),b))},this.handleMouseEnter=function(){this.hovering=!0},this.handleMouseLeave=function(){this.hovering=!1,this.timeoutExpired&&(clearTimeout(this.messageTimeout),this.scheduleClose(!1,this.attr.minTimeout))},this.showTemporaryMessage=function(a,b){this.showMessage(b.message,!1,b.timeout)},this.showStickyMessage=function(a,b){this.showMessage(b.message,!0)},this.setHidden=function(){this.$node.addClass(this.attr.hiddenClass)},this.closeMessage=function(a){this.showing=!1,a&&a.preventDefault(),this.$node.animate({top:-40},300,function(){this.setHidden()}.bind(this))},this.reloadPageHandler=function(){this.reloadPage()},this.reloadPage=function(){window.location.reload()},this.repositionMessage=function(a){if(!this.showing)return;a.type==="uiDialogOpened"?this.$node.stop().css({top:0}):this.dialogPresent()||this.$node.queue(function(a){this.$node.css({top:this.attr.topOffset+$(this.attr.bannersSelector).height()}),a()}.bind(this))},this.after("initialize",function(){this.on(document,"uiShowMessage",this.showTemporaryMessage),this.on(document,"uiShowError uiShowStickyMessage",this.showStickyMessage),this.on("click",{reloadSelector:this.reloadPageHandler,closeSelector:this.closeMessage}),this.on(document,"uiBeforePageChanged uiHideMessage",this.setHidden),this.on("mouseenter",{messageSelector:this.handleMouseEnter}),this.on("mouseleave",{messageSelector:this.handleMouseLeave}),this.on(document,"uiDialogOpened uiDialogClosed",this.repositionMessage),this.$node.hasClass(this.attr.hiddenClass)&&this.closeMessage()})}var defineComponent=require("core/component"),MessageDrawer=defineComponent(messageDrawer);module.exports=MessageDrawer
  });
  define("app/ui/tooltips",["module","require","exports","core/component","$lib/bootstrap_tooltip.js"],function(module, require, exports) {
  function tooltips(){this.defaultAttrs({tooltipSelector:".js-tooltip",visibleTooltipSelector:".js-tooltip.in"}),this.hideEvents=["uiBeforePageChanged","uiDialogOpened","uiDialogClosed","uiDropdownOpened","uiDropdownClosed","uiGalleryOpened","uiBeforeTweetRemoved","uiBeforeTweetCollapsed","uiDialogClosedWithoutAction","uiHoverShown","uiShowProfileHover"],this.hide=function(){this.select("visibleTooltipSelector").tooltip("hide")},this.after("initialize",function(){this.$node.tooltip({selector:this.attr.tooltipSelector}),this.on(document,"uiShortcutEsc",{tooltipSelector:function(){$.fn.tooltip.clearAllPendingTimeouts(),this.hide()}}),this.on(document,this.hideEvents.join(" "),this.hide)})}var defineComponent=require("core/component");require("$lib/bootstrap_tooltip.js"),module.exports=defineComponent(tooltips)
  });
  define("app/ui/forms/screen_reader_label",["module","require","exports","core/component"],function(module, require, exports) {
  function screenReaderLabel(){this.defaultAttrs({inputSelector:"input[placeholder],textarea[placeholder]"}),this.addLabels=function(){this.idCounter=0,this.select("inputSelector").each(this.addLabel.bind(this))},this.addLabel=function(a,b){var c=$(b);if(this.hasLabel(c))return;var d=c.attr("id");d||(d="sr_label_"+this.idCounter,c.attr("id",d),this.idCounter++);var e=c.attr("placeholder");$('<label for="'+d+'" class="visuallyhidden">'+e+"</label>").insertAfter(c)},this.hasLabel=function(a){return this.hasSiblingLabel(a)||this.hasParentLabel(a)||this.hasAriaLabel(a)},this.hasSiblingLabel=function(a){var b=a.attr("id");return b&&this.$node.find("label[for="+b+"]").length>0},this.hasParentLabel=function(a){return a.closest("label").length>0},this.hasAriaLabel=function(a){return!!a.attr("aria-label")||!!a.attr("aria-labelledby")},this.after("initialize",function(){this.on(document,"uiSwiftLoaded uiPageChanged",this.addLabels)})}var defineComponent=require("core/component");module.exports=defineComponent(screenReaderLabel)
  });
  define("app/data/ttft_navigation",["module","require","exports","core/component","app/data/scribe_transport"],function(module, require, exports) {
  function ttftNavigate(){this.beforeNewPageLoad=function(a,b){this.log("beforeNewPageLoad",a,b),time={beforeNewPageLoad:+(new Date),source:{page:this.attr.pageName,action:this.attr.sectionName,path:window.location.pathname}}},this.afterPageChanged=function(a,b){this.log("afterPageChanged",a,b),time.afterPageChanged=+(new Date),this.fromCache=!!b.fromCache,this.hookTimelineListener(!0),this.timelineListener=setTimeout(function(){this.hookTimelineListener(!1),this.report()}.bind(this),1),time.ajaxCount=this.ajaxCountdown=$.active,$.active&&this.hookAjaxListener(!0)},this.timelineRefreshRequest=function(a,b){clearTimeout(this.timelineListener),this.hookTimelineListener(!1),b.navigated&&(this.listeningForTimeline=!0,this.hookTimelineResults(!0))},this.timelineSuccess=function(a,b){this.log("timelineSuccess",a,b),this.listeningForTimeline=!1,this.hookTimelineResults(!1),time.timelineSuccess=+(new Date),this.report()},this.timelineError=function(a,b){this.log("timelineError",a,b),this.listeningForTimeline=!1,this.hookTimelineResults(!1),this.report()},this.ajaxComplete=function(a,b){--this.ajaxCountdown||(this.log("ajaxComplete",a,b),this.hookAjaxListener(!1),time.ajaxComplete=+(new Date),this.report())},this.report=function(){if(this.ajaxCountdown&&time.ajaxCount)return;if(this.listeningForTimeline&&!time.timelineSuccess)return;var a={event_name:"route_time",source_page:time.source.page,source_action:time.source.action,source_path:time.source.path,dest_page:this.attr.pageName,dest_action:this.attr.sectionName,dest_path:window.location.pathname,cached:this.fromCache,start_time:time.beforeNewPageLoad,stream_switch_time:time.afterPageChanged,stream_complete_time:time.timelineSuccess||time.afterPageChanged,ajax_count:time.ajaxCount};time.ajaxCount&&(a.ajax_complete_time=time.ajaxComplete),this.scribeTransport.send(a,"route_timing"),this.log(a)},this.log=function(){},this.time=function(){return time},this.scribeTransport=scribeTransport,this.hookAjaxListener=function(a){this[a?"on":"off"]("ajaxComplete",this.ajaxComplete)},this.hookTimelineListener=function(a){this[a?"on":"off"]("uiTimelineShouldRefresh",this.timelineRefreshRequest)},this.hookTimelineResults=function(a){this[a?"on":"off"]("dataGotMoreTimelineItems",this.timelineSuccess),this[a?"on":"off"]("dataGotMoreTimelineItemsError",this.timelineError)},this.after("initialize",function(){this.on("uiBeforeNewPageLoad",this.beforeNewPageLoad),this.on("uiPageChanged",this.afterPageChanged)})}var component=require("core/component"),scribeTransport=require("app/data/scribe_transport");module.exports=component(ttftNavigate);var time={}
  });
  define("app/data/hashflag_info",["module","require","exports"],function(module, require, exports) {
  var activeHashflags,hashflagBaseUrl,hashflagInfo={set:function(a){activeHashflags=a.activeHashflags,hashflagBaseUrl=a.hashflagBaseUrl||"https://abs.twimg.com/hashflags/"},getImageUrl:function(a){var b=activeHashflags&&activeHashflags[a.toLowerCase()];return b?hashflagBaseUrl+b:null},isEnabled:function(){return!!activeHashflags}};module.exports=hashflagInfo
  });
  define("app/ui/banners/eu_cookie",["module","require","exports","core/component","app/utils/cookie"],function(module, require, exports) {
  function euCookie(){this.defaultAttrs({closeButtonSelector:".eu-cookie-notice button"}),this.setCookie=function(){cookie("eu_cn",1,{expires:365})},this.close=function(){this.setCookie(),this.$node.remove(),this.teardown()},this.after("initialize",function(){this.on("click",{closeButtonSelector:this.close}),setTimeout(function(){this.setCookie()}.bind(this),5e3)})}var defineComponent=require("core/component"),cookie=require("app/utils/cookie");module.exports=defineComponent(euCookie)
  });
  define("app/ui/banners/dtab",["module","require","exports","core/component"],function(module, require, exports) {
  function dtab(){this.defaultAttrs({closeButtonSelector:".dtab-banner button"}),this.close=function(){this.$node.remove(),this.teardown()},this.after("initialize",function(){this.on("click",{closeButtonSelector:this.close})})}var defineComponent=require("core/component");module.exports=defineComponent(dtab)
  });
  define("app/ui/keyboard_shortcuts",["module","require","exports","core/component","core/utils"],function(module, require, exports) {
  function keyBoardShortcuts(){this.keyCodeToEvent={27:{type:"uiShortcutEsc",defaultFn:"blurTextField"},13:"uiShortcutEnter",37:"uiShortcutLeft",39:"uiShortcutRight"},this.metaKeyCodeToEvent={13:"uiShortcutCmdEnter"},this.shiftKeyCodeToEvent={13:"uiShortcutShiftEnter"},this.charsToEvent={f:"uiShortcutFavorite",l:"uiShortcutFavorite",r:"uiShortcutReply",t:"uiShortcutRetweet",u:"uiShortcutMuteUser",b:"uiShortcutBlock",j:"uiShortcutSelectNext",k:"uiShortcutSelectPrev",c:"uiWantsToCloseAllTweets",".":"uiShortcutGotoTopOfScreen","/":{type:"uiShortcutGotoSearch",defaultFn:"focusSearch"},m:"uiOpenNewDM",n:"uiShortcutShowTweetbox",gu:"uiShortcutShowGotoUser",gm:"uiNeedsDMDialog","?":"uiOpenKeyboardShortcutsDialog",o:"uiOpenSelectedPhoto"},this.routes={home:"/",moments:"/i/moments",connect:"/i/notifications",notifications:"/i/notifications",mentions:"/mentions",profile:"/",favorites:"/i/likes",settings:"/settings/account",lists:"/lists",likes:"/i/likes"},this.routeShortcuts={gh:"home",go:"moments",gc:"connect",gn:"notifications",gr:"mentions",gp:"profile",gf:"favorites",gs:"settings",gi:"lists",gl:"likes"},this.lastKey="",this.defaultAttrs({globalSearchBoxSelector:"#search-query",isSingleLineTextBoxSelector:'[role="textbox"][aria-multiline="false"], [role="textbox"]:not([aria-multiline])'}),this.shortcutFromKeyCode=function(a,b){var c=b&&b.meta,d=b&&b.shift;return c&&this.metaKeyCodeToEvent[a]||d&&this.shiftKeyCodeToEvent[a]||this.keyCodeToEvent[a]},this.isTextField=function(a){if(!a||!a.tagName)return!1;var b=a.tagName.toLowerCase();if(b=="textarea"||a.getAttribute("contenteditable"))return!0;if(b!="input")return!1;var c=(a.getAttribute("type")||"text").toLowerCase();return textInputs[c]},this.isRadioButton=function(a){return a.type=="radio"},this.isWhiteListedElement=function(a){var b=a.tagName.toLowerCase();if(whiteListedElements[b])return!0;if(b!="input")return!1;var c=a.getAttribute("type").toLowerCase();return whiteListedInputs[c]},this.triggerShortcutEvent=function(a,b){var c,d,e,f={fromShortcut:!0};typeof b=="string"?c=b:(c=b.type,e=b.defaultFn,b.data&&(f=utils.merge(f,b.data))),e&&(d={type:c,defaultBehavior:function(){this[e](a,f)}}),this.trigger(document,{type:"uiBeforeKeyboardShortcut",defaultBehavior:function(){this.trigger(a.target,d||c,f)}.bind(this)},{type:c})},this.triggerShortcutForKey=function(a){if(this.ignore(a))return;var b=this.shortcutFromKeyCode(a.keyCode,{meta:a.metaKey||a.ctrlKey});b&&(a.preventDefault(),this.triggerShortcutEvent(a,b))},this.triggerShortcutForChar=function(a){if(this.isMetaKey(a))return;var b=this.isTextField(a.target),c=String.fromCharCode(a.charCode).toLowerCase(),d=this.charsToEvent[this.lastKey+c]||this.charsToEvent[c]||b&&this.shortcutFromKeyCode(a.keyCode,{shift:a.shiftKey}),e=d=="uiShortcutEnter"&&$(a.target).is(this.attr.isSingleLineTextBoxSelector);if(b&&!e)return;d&&c!=this.lastKey?(a.preventDefault(),this.triggerShortcutEvent(a,d),this.lastKey=""):(setTimeout(function(){this.lastKey=""}.bind(this),5e3),this.lastKey=c)},this.isMetaKey=function(a){return a.metaKey||a.ctrlKey||a.altKey},this.ignore=function(a){var b=a.target,c=a.keyCode==27,d,e;return a.keyCode==13&&(this.isMetaKey(a)?d=!0:e=!0),this.isMetaKey(a)&&a.keyCode!=13||this.isTextField(b)&&!d&&!c||this.isRadioButton(b)&&!c||e&&this.isWhiteListedElement(b)},this.blurTextField=function(a){var b=a.target;this.isTextField(b)&&b.blur()},this.focusSearch=function(a){this.select("globalSearchBoxSelector")[0].focus()},this.navigateTo=function(a,b){this.trigger("uiNavigate",{href:b.href})},this.createNavEventName=function(a){return UI_SHORTCUT_NAVIGATE+a[0].toUpperCase()+a.slice(1)},this.createNavigationShortcuts=function(){Object.keys(this.routeShortcuts).forEach(function(a){var b=this.routeShortcuts[a];this.charsToEvent[a]={type:this.createNavEventName(b),data:{href:this.routes[b]},defaultFn:"navigateTo"}},this)},this.after("initialize",function(){this.on("keydown",this.triggerShortcutForKey),this.on("keypress",this.triggerShortcutForChar),this.attr.routes&&utils.push(this.routes,this.attr.routes),this.createNavigationShortcuts()})}var defineComponent=require("core/component"),utils=require("core/utils"),whiteListedElements={button:!0,a:!0},whiteListedInputs={button:!0,submit:!0,file:!0},textInputs={password:!0,text:!0,email:!0},UI_SHORTCUT_NAVIGATE="uiShortcutNavigate",KeyBoardShortcuts=defineComponent(keyBoardShortcuts);module.exports=KeyBoardShortcuts
  });
  define("app/ui/aria_event_logger",["module","require","exports","core/component","core/i18n","core/utils"],function(module, require, exports) {
  function ariaEventLogger(){this.defaultAttrs({typeaheadDebounceInterval:500}),this.MESSAGES={LIKED:_('Liked'),UNLIKED:_('Unliked'),RETWEETED:_('Retweeted'),UNRETWEETED:_('Unretweeted'),EXPANDED:_('Expanded'),COLLAPSED:_('Collapsed'),RENDERING_CONVERSATION:_('Loading conversation.'),CONVERSATION_RENDERED:_('Conversation loaded. Press j or k to review Tweets.'),CONVERSATION_START:_('Conversation start.'),CONVERSATION_END:_('Conversation end.'),NEW_ITEMS_BAR_VISIBLE:_('New Tweets available. Press period to review them.')},this.CLEAR_LOG_EVENTS=["uiPageChanged","uiShortcutSelectPrev","uiShortcutSelectNext","uiSelectNext","uiSelectItem","uiShortcutGotoTopOfScreen","uiSelectTopTweet","uiTypeaheadSelectionCleared"].join(" "),this.createLog=function(){var a=$('<div id="sr-event-log" class="visuallyhidden" aria-live="assertive"></div>');$("body").append(a),this.$log=a},this.speakSpecifiedMessage=function(a,b){this.logMessage(b.message,b.assertiveness)},this.logMessage=function(a,b){if(!this.$log)return;b||(b="assertive"),b!=this.$log.attr("aria-live")&&this.$log.attr("aria-live",b);var c=$("<p>").text(a);this.$log.append(c),this.$log.children().length>3&&this.$log.children().first().remove()},this.logEvent=function(a,b){return function(){this.logMessage(this.MESSAGES[a],b)}.bind(this)},this.logConversationStart=function(a){var b=$(a.target);b.closest(".expanded-conversation").length&&!b.prev().length&&b.next().length&&this.logMessage(this.MESSAGES.CONVERSATION_START,"polite")},this.logConversationEnd=function(a){var b=$(a.target);b.closest(".expanded-conversation").length&&!b.next().length&&b.prev().length&&this.logMessage(this.MESSAGES.CONVERSATION_END,"polite")},this.logCharCountWarning=function(a,b){this.clearLog(),this.logMessage(b.charCount,"polite")},this.logTypeAheadResultsVisible=function(a,b){this.typeAheadResultsVisible&&!!b.query&&this.logSuggestionsVisible(a,b)},this.logSuggestionsVisible=function(a,b){b.numResults>1?this.logMessage(_('{{numResults}} suggestions.',{numResults:b.numResults}),"polite"):this.logMessage(_('{{numResults}} suggestion.',{numResults:b.numResults}),"polite")},this.clearLog=function(){this.$log&&this.$log.html("")},this.after("initialize",function(){this.on(document,"uiSwiftLoaded",this.createLog),this.on(document,"uiDidFavoriteTweet dataFailedToUnfavoriteTweet",this.logEvent("LIKED")),this.on(document,"uiDidUnfavoriteTweet dataFailedToFavoriteTweet",this.logEvent("UNLIKED")),this.on(document,"uiDidRetweet dataFailedToUnretweet",this.logEvent("RETWEETED")),this.on(document,"uiDidUnretweet dataFailedToRetweet",this.logEvent("UNRETWEETED")),this.on(document,"uiHasExpandedTweet",this.logEvent("EXPANDED")),this.on(document,"uiHasCollapsedTweet",this.logEvent("COLLAPSED")),this.on(document,"uiRenderingExpandedConversation",this.logEvent("RENDERING_CONVERSATION","polite")),this.on(document,"uiExpandedConversationRendered",this.logEvent("CONVERSATION_RENDERED","polite")),this.on(document,"uiNextItemSelected",this.logConversationEnd),this.on(document,"uiPreviousItemSelected",this.logConversationStart),this.on(document,"uiNewItemsBarVisible",this.logEvent("NEW_ITEMS_BAR_VISIBLE")),this.on(document,"uiCharCountWarningVisible",this.logCharCountWarning),this.on(document,"uiTypeaheadResultsShown",function(){this.typeAheadResultsVisible=!0}),this.on(document,"uiTypeaheadResultsHidden",function(){this.typeAheadResultsVisible=!1}),this.on(document,"uiTypeaheadResultsShown",utils.debounce(this.logTypeAheadResultsVisible,this.attr.typeaheadDebounceInterval)),this.on(document,"uiGeoResultsShown",utils.debounce(this.logSuggestionsVisible,this.attr.typeaheadDebounceInterval)),this.on(document,this.CLEAR_LOG_EVENTS,this.clearLog),this.on(document,"uiShouldSpeakMessage",this.speakSpecifiedMessage)})}var defineComponent=require("core/component"),_=require("core/i18n"),utils=require("core/utils"),ARIAEventLogger=defineComponent(ariaEventLogger);module.exports=ARIAEventLogger
  });
  define("app/data/scriber",["module","require","exports","core/component","app/data/with_scribe"],function(module, require, exports) {
  function scriber(){this.scribeData=function(a,b){this.scribe(b.scribeEvent,b.scribeData)},this.after("initialize",function(){this.on("scribe",this.scribeData)})}var defineComponent=require("core/component"),withScribe=require("app/data/with_scribe");module.exports=defineComponent(scriber,withScribe)
  });
  define("app/data/pageview_scribe",["module","require","exports","core/component","app/data/with_scribe"],function(module, require, exports) {
  function PageViewScribe(){this.after("initialize",function(a){this.scribeOnEvent("uiSwiftLoaded uiPageChanged","show")})}var defineComponent=require("core/component"),withScribe=require("app/data/with_scribe");module.exports=defineComponent(PageViewScribe,withScribe)
  });
  define("app/ui/mute_user",["module","require","exports","core/component","app/data/with_interaction_data_scribe"],function(module, require, exports) {
  function muteUser(){this.defaultAttrs({muteUserSelector:".mute-user-item",unmuteUserSelector:".unmute-user-item",undoMuteUserSelector:".js-undo-muting",undoUnmuteUserSelector:".js-undo-not-muting",learnMoreSelector:".learn-more",skipRemoveTweetPageSelector:".route-profile, .route-moments",tweetSelector:".tweet, .js-actionable-tweet"}),this.scribeLearnMoreClick=function(a,b){var c={url:"https://support.twitter.com/articles/20171399",message:"https://support.twitter.com/articles/20171399"};this.scribeInteraction({component:"message_drawer",element:"learn_more_link",action:"open_link"},b,c)},this.doAction=function(a,b,c){if(b.itemType=="tweet")return;b.modClass="muting",b.modOp=a=="Mute"?"addClass":"removeClass",delete b.el;var d=this.$node.find("[data-user-id="+b.userId+"]"),e=d.first().attr("data-you-follow")=="true",f=a=="Mute"&&!e,g=$(this.attr.skipRemoveTweetPageSelector).size();f&&!g?this.trigger("uiRemoveTweetsAndEngagementsFromUser",b):d[b.modOp]("muting"),this.trigger("uiUpdateMuteButtonState",b),c||(this.trigger("uiCloseDropdowns"),this.trigger("uiHideMessage"),this.trigger("ui"+a+"UserAction",b))},this.handleClick=function(a){return function(b,c){var d=$(b.target),e=d.closest(".user-actions")[0];c.scribeContext=c.scribeContext||{},e?(c.scribeContext.element="user_actions_dropdown",d.closest("#profile_popup")[0]?c.scribeContext.component="profile_dialog":d.closest(".ProfileNav-item--userActions")&&(c.scribeContext.component="profile_follow_card")):(e=d.closest(this.attr.tweetSelector)[0],c.scribeContext.component="tweet",c.scribeContext.element="tweet_actions_dropdown"),c.userId=$(e).data("user-id"),this.doAction(a,c)}},this.handleAction=function(a){return function(b,c){this.doAction(a,c)}},this.handleRevertTo=function(a){return function(b,c){c.userId=c.sourceEventData.userId,this.doAction(a,c,!0)}},this.handleUndoTo=function(a){return function(b,c){c.userId=$(c.el).data("user-id"),c.scribeContext={component:"message_drawer",element:"undolink"},this.doAction(a,c)}},this.after("initialize",function(){this.on("click",{muteUserSelector:this.handleClick("Mute"),unmuteUserSelector:this.handleClick("Unmute"),undoMuteUserSelector:this.handleUndoTo("Unmute"),undoUnmuteUserSelector:this.handleUndoTo("Mute"),learnMoreSelector:this.scribeLearnMoreClick}),this.on(document,"uiDidMuteUser",this.handleAction("Mute")),this.on(document,"uiDidUnmuteUser",this.handleAction("Unmute")),this.on(document,"dataFailedToMuteUser",this.handleRevertTo("Unmute")),this.on(document,"dataFailedToUnmuteUser",this.handleRevertTo("Mute"))})}var defineComponent=require("core/component"),withInteractionDataScribe=require("app/data/with_interaction_data_scribe"),MuteUser=defineComponent(muteUser,withInteractionDataScribe);module.exports=MuteUser
  });
  define("app/data/mute_user",["module","require","exports","core/component","app/data/with_data"],function(module, require, exports) {
  function muteUser(){this.defaultAttrs({successFromEndpoints:{mute:"dataDidMuteUser",unmute:"dataDidUnmuteUser"},errorsFromEndpoints:{mute:"dataFailedToMuteUser",unmute:"dataFailedToUnmuteUser"}}),this.takeAction=function(a,b,c){var d=function(b){b=$.extend(b,{userId:c.userId}),b&&b.message&&this.trigger("uiShowMessage",b),this.trigger(this.attr.successFromEndpoints[a],b)},e=function(b){b&&b.message&&this.trigger("uiShowMessage",b),this.trigger(this.attr.errorsFromEndpoints[a],b)};this.post({url:"/i/user/"+a,data:{user_id:c.userId},eventData:c,success:d.bind(this),error:e.bind(this)})},this.hitEndpoint=function(a){return this.takeAction.bind(this,a)},this.after("initialize",function(){this.on(document,"uiMuteUserAction",this.hitEndpoint("mute")),this.on(document,"uiUnmuteUserAction",this.hitEndpoint("unmute"))})}var defineComponent=require("core/component"),withData=require("app/data/with_data"),MuteUser=defineComponent(muteUser,withData);module.exports=MuteUser
  });
  define("app/ui/undo_unblock",["module","require","exports","core/component","app/data/with_interaction_data_scribe"],function(module, require, exports) {
  function undoUnblockUser(){this.defaultAttrs({undoUnblockSelector:".js-undo-unblock"}),this.handleUndo=function(a,b){b.userId=$(b.el).data("user-id"),b.screenName=$(b.el).data("screen-name");var c={component:"message_drawer",element:"undolink"};this.trigger("uiBlockAction",{userId:b.userId,scribeContext:c})},this.after("initialize",function(){this.on("click",{undoUnblockSelector:this.handleUndo})})}var defineComponent=require("core/component"),withInteractionDataScribe=require("app/data/with_interaction_data_scribe"),UndoUnblockUser=defineComponent(undoUnblockUser,withInteractionDataScribe);module.exports=UndoUnblockUser
  });
  define("app/data/ab_impressions_scribe",["module","require","exports","core/component","app/data/with_scribe"],function(module, require, exports) {
  function abImpressionScribe(){this.defaultAttrs({experiments:{}}),this.scribeExperiments=function(){for(var a in this.attr.experiments){var b=this.attr.experiments[a].bucket,c=this.attr.experiments[a].version;b&&c?this.scribe({page:"ddg",section:a,action:"experiment"},{experiment_key:a,bucket:b,version:c}):console.warn("Potentially misconfigured ABDecider data: "+a)}},this.after("initialize",function(a){this.on("uiSwiftLoaded uiPageChanged",this.scribeExperiments)})}var defineComponent=require("core/component"),withScribe=require("app/data/with_scribe"),ABImpressionScribe=defineComponent(abImpressionScribe,withScribe);module.exports=ABImpressionScribe
  });
  define("app/ui/with_scrollbar_width",["module","require","exports"],function(module, require, exports) {
  function ScrollbarWidth(){this.calculateScrollbarWidth=function(){if($("#scrollbar-width").length>0)return;var a=$('<div class="modal-measure-scrollbar"/>').prependTo($("body")),b=$('<div class="inner"/>').appendTo(a),c=a.width()-b.width();a.remove(),$("head").append(['<style id="scrollbar-width">',".compensate-for-scrollbar,",".modal-enabled,",".modal-enabled .global-nav-inner,",".profile-editing,",".profile-editing .global-nav-inner,",".overlay-enabled,",".overlay-enabled .global-nav-inner,",".grid-enabled,",".grid-enabled .global-nav-inner,",".gallery-enabled,",".gallery-enabled .global-nav-inner {","margin-right: "+c+"px","}","</style>"].join("\n"))}}module.exports=ScrollbarWidth
  });
  deferred('$lib/jquery.event.drag.js', function() {
  /*! jquery.event.drag (c) 2010 Three Dub Media - http://threedubmedia.com http://threedubmedia.com/code/license */(function($){$.fn.drag=function(a,b,c){var d=typeof a=="string"?a:"",e=$.isFunction(a)?a:$.isFunction(b)?b:null;return d.indexOf("drag")!==0&&(d="drag"+d),c=(a==e?b:c)||{},e?this.bind(d,c,e):this.trigger(d)};var a=$.event,b=a.special,c=b.drag={defaults:{which:1,distance:0,not:":input",handle:null,relative:!1,drop:!0,click:!1},datakey:"dragdata",livekey:"livedrag",add:function(b){var d=$.data(this,c.datakey),e=b.data||{};d.related+=1,!d.live&&b.selector&&(d.live=!0,a.add(this,"draginit."+c.livekey,c.delegate)),$.each(c.defaults,function(a,b){e[a]!==undefined&&(d[a]=e[a])})},remove:function(){$.data(this,c.datakey).related-=1},setup:function(){if($.data(this,c.datakey))return;var b=$.extend({related:0},c.defaults);$.data(this,c.datakey,b),a.add(this,"mousedown",c.init,b),this.attachEvent&&this.attachEvent("ondragstart",c.dontstart)},teardown:function(){if($.data(this,c.datakey).related)return;$.removeData(this,c.datakey),a.remove(this,"mousedown",c.init),a.remove(this,"draginit",c.delegate),c.textselect(!0),this.detachEvent&&this.detachEvent("ondragstart",c.dontstart)},init:function(d){var e=d.data,f;if(e.which>0&&d.which!=e.which)return;if($(d.target).is(e.not))return;if(e.handle&&!$(d.target).closest(e.handle,d.currentTarget).length)return;e.propagates=1,e.interactions=[c.interaction(this,e)],e.target=d.target,e.pageX=d.pageX,e.pageY=d.pageY,e.dragging=null,f=c.hijack(d,"draginit",e);if(!e.propagates)return;return f=c.flatten(f),f&&f.length&&(e.interactions=[],$.each(f,function(){e.interactions.push(c.interaction(this,e))})),e.propagates=e.interactions.length,e.drop!==!1&&b.drop&&b.drop.handler(d,e),c.textselect(!1),a.add(document,"mousemove mouseup",c.handler,e),!1},interaction:function(a,b){return{drag:a,callback:new c.callback,droppable:[],offset:$(a)[b.relative?"position":"offset"]()||{top:0,left:0}}},handler:function(d){var e=d.data;switch(d.type){case!e.dragging&&"mousemove":if(Math.pow(d.pageX-e.pageX,2)+Math.pow(d.pageY-e.pageY,2)<Math.pow(e.distance,2))break;d.target=e.target,c.hijack(d,"dragstart",e),e.propagates&&(e.dragging=!0);case"mousemove":if(e.dragging){c.hijack(d,"drag",e);if(e.propagates){e.drop!==!1&&b.drop&&b.drop.handler(d,e);break}d.type="mouseup"};case"mouseup":a.remove(document,"mousemove mouseup",c.handler),e.dragging&&(e.drop!==!1&&b.drop&&b.drop.handler(d,e),c.hijack(d,"dragend",e)),c.textselect(!0),e.click===!1&&e.dragging&&($.event.triggered=!0,setTimeout(function(){$.event.triggered=!1},20),e.dragging=!1)}},delegate:function(b){var d=[],e,f=$.data(this,"events")||{};return $.each(f.live||[],function(f,g){if(g.preType.indexOf("drag")!==0)return;e=$(b.target).closest(g.selector,b.currentTarget)[0];if(!e)return;a.add(e,g.origType+"."+c.livekey,g.origHandler,g.data),$.inArray(e,d)<0&&d.push(e)}),d.length?$(d).bind("dragend."+c.livekey,function(){a.remove(this,"."+c.livekey)}):!1},hijack:function(b,d,e,f,g){if(!e)return;var h={event:b.originalEvent,type:b.type},i=d.indexOf("drop")?"drag":"drop",j,k=f||0,l,m,n,o=isNaN(f)?e.interactions.length:f;b.type=d,b.originalEvent=null,e.results=[];do if(l=e.interactions[k]){if(d!=="dragend"&&l.cancelled)continue;n=c.properties(b,e,l),l.results=[],$(g||l[i]||e.droppable).each(function(f,g){n.target=g,j=g?a.dispatch.call(g,b,n):null,j===!1?(i=="drag"&&(l.cancelled=!0,e.propagates-=1),d=="drop"&&(l[i][f]=null)):d=="dropinit"&&l.droppable.push(c.element(j)||g),d=="dragstart"&&(l.proxy=$(c.element(j)||l.drag)[0]),l.results.push(j),delete b.result;if(d!=="dropinit")return j}),e.results[k]=c.flatten(l.results),d=="dropinit"&&(l.droppable=c.flatten(l.droppable)),d=="dragstart"&&!l.cancelled&&n.update()}while(++k<o);return b.type=h.type,b.originalEvent=h.event,c.flatten(e.results)},properties:function(a,b,d){var e=d.callback;return e.drag=d.drag,e.proxy=d.proxy||d.drag,e.startX=b.pageX,e.startY=b.pageY,e.deltaX=a.pageX-b.pageX,e.deltaY=a.pageY-b.pageY,e.originalX=d.offset.left,e.originalY=d.offset.top,e.offsetX=a.pageX-(b.pageX-e.originalX),e.offsetY=a.pageY-(b.pageY-e.originalY),e.drop=c.flatten((d.drop||[]).slice()),e.available=c.flatten((d.droppable||[]).slice()),e},element:function(a){if(a&&(a.jquery||a.nodeType==1))return a},flatten:function(a){return $.map(a,function(a){return a&&a.jquery?$.makeArray(a):a&&a.length?c.flatten(a):a})},textselect:function(a){$(document)[a?"unbind":"bind"]("selectstart",c.dontstart).attr("unselectable",a?"off":"on").css("MozUserSelect",a?"":"none")},dontstart:function(){return!1},callback:function(){}};c.callback.prototype={update:function(){b.drop&&this.available.length&&$.each(this.available,function(a){b.drop.locate(this,a)})}},b.draginit=b.dragstart=b.dragend=c})(jQuery)
  });
  define("app/ui/with_dialog",["module","require","exports","core/compose","app/ui/with_scrollbar_width","app/utils/with_keyboard_modality","app/utils/is_visible","app/utils/is_enabled","app/utils/prevent_next_tooltip","$lib/jquery.event.drag.js"],function(module, require, exports) {
  function withDialog(){compose.mixin(this,[withKeyboardModality,withScrollbarWidth]),this.defaultAttrs({formControlsSelector:"textarea,select,input,button,div[contenteditable=true]",closeTargetsSelector:".js-close, .close-modal-background-target",initialFocusSelector:".js-initial-focus",hideFocusClass:"hide-focus",hideFocusSelector:".hide-focus",closeButtonClass:"modal-close",closeButtonSelector:".modal-close",dragabilityClass:"draggable",modalEnabledClass:"modal-enabled",modalContainerSelector:".modal-container",modalOverlaySelector:".modal-overlay",modalSelector:".modal",modalHeaderSelector:".modal-header",modalContentSelector:".modal-content, .js-ariaDocument",modalTitleSelector:".modal-title, .js-ariaTitle",modalBodySelector:".modal-body, .js-ariaBody",dropdownRootNodeSelector:".dropdown",dropdownToggleSelector:".dropdown-toggle",keyboardShortcutWhitelist:["uiShortcutEsc","uiShortcutLeft","uiShortcutRight","uiShortcutEnter","uiShortcutCmdEnter","uiShortcutShiftEnter"]}),this.center=function(a){var b=this.getWindow(),c={top:Math.max(0,parseInt((b.height()-a.outerHeight())/2)),left:Math.max(0,parseInt((b.width()-a.outerWidth())/2))};return c},this.blockKeyboardShortcuts=function(a,b){this.isOpen()&&this.attr.keyboardShortcutWhitelist.indexOf(b.type)==-1&&a.preventDefault()},this.getWindow=function(){return $(window)},this.position=function(){var a=this.center(this.$dialog),b=this.getWindow(),c=b.height(),d=b.scrollTop();this.attr.top!=null&&(a.top=this.attr.top),this.attr.left!=null&&(a.left=this.attr.left),this.attr.maxTop!=null&&(a.top=Math.min(a.top,this.attr.maxTop)),this.attr.maxLeft!=null&&(a.left=Math.min(a.left,this.attr.maxLeft)),$("body").attr("dir")==="rtl"?this.$dialog.css({top:a.top,right:a.left}):this.$dialog.css({top:a.top,left:a.left}),c<this.$dialog.outerHeight()&&this.attr.top==null?(this.$dialog.css("position","absolute"),this.$dialog.css("top",a.top+d)):this.attr.fixed===!1&&this.$dialog.css("top",a.top+d)},this.resize=function(){this.attr.width&&this.$dialog.css("width",this.attr.width),this.attr.height&&this.$dialog.css("height",this.attr.height)},this.applyDraggability=function(){if(!this.$dialog.hasClass(this.attr.dragabilityClass))return;var a=this,b={relative:!0,handle:this.attr.modalHeaderSelector},c=function(a,b){$("body").attr("dir")==="rtl"?this.$dialog.css({top:b.offsetY,right:b.originalX-b.deltaX}):this.$dialog.css({top:b.offsetY,left:b.offsetX})};this.$dialog.drag("start",function(){a.$dialog.addClass("unselectable"),$("#doc").addClass("unselectable")}),this.$dialog.drag("end",function(){a.$dialog.removeClass("unselectable"),$("#doc").removeClass("unselectable")}),this.$dialog.drag(c.bind(this),b)},this.notifyFocusChange=function(){this.trigger(this.$dialog,{type:"uiDialogInitialFocus",defaultBehavior:"setInitialFocus"})},this.setInitialFocus=function(){var a=this.$dialog.find(this.attr.initialFocusSelector);a.length||(a=this.$dialog.find(".primary-btn")),a.length&&isEnabled(a)&&isVisible(a)?a.focus():this.focusNextAvailableControl("start",this.$dialog);var b=this.$dialog.find(this.attr.closeButtonSelector);b.is(document.activeElement)&&b.addClass(this.attr.hideFocusClass)},this.hasFocus=function(){var a=this.$dialog[0],b=document.activeElement;return a&&b&&(a==b||$.contains(a,b))},this.blur=function(){this.hasFocus()&&document.activeElement.blur()},this.positionCloseButton=function(){var a=this.$dialog.find(this.attr.focusableDescendants),b=this.$dialog.find(this.attr.closeButtonSelector);a.length>1?b.insertBefore(this.$dialog.find(this.attr.lastTabStopSelector)):b.insertBefore(this.$dialog.find(this.attr.modalBodySelector))},this.focusFirstAvailableControl=function(){this.isOpen()&&this.focusNextAvailableControl("first",this.$dialog)},this.focusLastAvailableControl=function(){this.isOpen()&&this.focusNextAvailableControl("last",this.$dialog)},this.setFocusWhenContentChanges=function(a){this.isOpen()&&this.$dialog.is(a.target)&&this.notifyFocusChange()},this.removeHideFocusClass=function(a){$(a.target).removeClass(this.attr.hideFocusClass)},this.open=function(){this.isOpen()||(this.bringToTop(),this.applyARIAAttrs(),this.createFirstLastTabStop(this.$dialog),this.positionCloseButton(),this.openState=!0,this.$dialogContainer.fadeIn("fast",this.notifyFadeInComplete.bind(this)),this.calculateScrollbarWidth(),$("body").addClass(this.attr.modalEnabledClass),this.resize(),!this.initiallyVisible&&!this.attr.noReposition&&this.position(),this.applyDraggability(),this.activeEl=document.activeElement,this.notifyFocusChange(),this.trigger("uiCloseDropdowns"),this.trigger("uiDialogOpened"),delete this.initiallyVisible)},this.bringToTop=function(){if(this.$dialogContainer.hasClass("modal-container")){var a=$(this.attr.modalContainerSelector+":visible"),b=a.toArray().reduce(function(a,b){return Math.max(a,parseInt($(b).css("z-index"),10)||0)},4e3),c=$(this.attr.modalOverlaySelector);this.originalModalOverlayZIndex=c.css("z-index"),c.css("z-index",b+1),this.$dialogContainer.css("z-index",b+2)}},this.isOpen=function(){var a=!!(this.$dialog&&this.$dialog.length&&this.$dialogContainer.length),b=window.DEBUG&&window.DEBUG.enabled;if(a&&b&&!this.initiallyVisible&&this.openState!==this.$dialogContainer.is(":visible"))throw new Error("Dialog markup and internal openState variable are out of sync.");return this.openState},this.isModalOpen=function(){return $("body").hasClass(this.attr.modalEnabledClass)},this.notifyFadeInComplete=function(){this.trigger("uiDialogFadeInComplete")},this.openWhenTriggerClicked=function(a){a.preventDefault(),this.open()},this.closeWithoutAction=function(a){var b=this.$node.get(0),c=this.$dialogContainer.get(0);if(!this.isOpen()||!this.eventUiCloseDialogTriggered(a)&&(this.eventTriggeredByClickAndOutsideContainerAndNode(a,b,c)||this.eventTriggeredByKeyboardAndGalleryOpen(a)))return;a.stopPropagation(),this.trigger(a.target,"uiDialogClosedWithoutAction"),this.close(a)},this.eventUiCloseDialogTriggered=function(a){return a.type==="uiCloseDialog"},this.eventTriggeredByClickAndOutsideContainerAndNode=function(a,b,c){return!this.eventTriggeredByKeyboard(a)&&!$.contains(b,a.target)&&!$.contains(c,a.target)},this.eventTriggeredByKeyboardAndGalleryOpen=function(a){return this.eventTriggeredByKeyboard(a)&&this.isGalleryOpen()},this.eventTriggeredByKeyboard=function(a){var b={keydown:!0,uiShortcutEsc:!0};return!!b[a.type]},this.isGalleryOpen=function(){return $("body").hasClass("gallery-enabled")},this.close=function(a){if(!this.isOpen())return;var b=a&&this.eventTriggeredByKeyboard(a);this.trigger({type:"uiDialogCloseRequested",defaultBehavior:this.blurAndClose.bind(this,b)})},this.closeImmediately=function(){this.isOpen()&&this.blurAndCloseImmediately()},this.restorePreviousFocus=function(){var a;if(this.activeEl){a=$(this.activeEl).closest(this.attr.dropdownRootNodeSelector),a.length&&(this.activeEl=a.find(this.attr.dropdownToggleSelector)[0]);try{preventNextTooltip(this.activeEl),this.activeEl.focus(),this.activeEl=null}catch(b){}}},this.handleCloseKeys=function(a){var b={13:!0,32:!0};this.isOpen()&&b[a.keyCode]&&this.closeWithoutAction(a)},this.blurAndClose=function(a){this.blur(),this.$dialogContainer.fadeOut("fast",this.afterClose.bind(this,a,!0))},this.blurAndCloseImmediately=function(){this.blur(),this.$dialogContainer.hide(),this.afterClose()},this.afterClose=function(a,b){this.removeFirstLastTabStop(this.$dialog),$(this.attr.modalContainerSelector+":visible").length?$(this.attr.modalOverlaySelector).css("z-index",this.originalModalOverlayZIndex):$("body").removeClass(this.attr.modalEnabledClass),this.openState=!1,a&&this.trigger(this.$dialog,{type:"uiDialogRestorePreviousFocus",defaultBehavior:"restorePreviousFocus"}),this.trigger("uiDialogClosed"),b&&this.trigger("uiDialogClosedByRequest")},this.applyARIAAttrs=function(){var a=this.$dialog.closest(this.attr.modalContainerSelector),b=this.$dialog.find(this.attr.modalContentSelector),c=this.$dialog.find(this.attr.modalTitleSelector),d=this.$dialog.find(this.attr.modalBodySelector),e=a.attr("id"),f=e+"-dialog",g=this.$dialog.find(this.attr.closeButtonSelector);this.$dialog.attr("id",f),g.attr("aria-controls",f);var h=e+"-header";c.attr("id",h);var i=!!d.find(this.attr.formControlsSelector).length,j=i?"dialog":"alertdialog",k={role:j,"aria-labelledby":h},l;i||(l=e+"-body",d.attr("id",l),k["aria-describedby"]=l,g.attr("aria-describedby",l)),this.$dialog.attr(k),b.attr("role","document")},this.closeOtherDialogs=function(a,b){this.node!=a.target&&this.close()},this.after("initialize",function(){this.openState=!1,this.$dialogContainer=this.$dialog||this.$node;var a=this.$dialogContainer.is(document);a||(this.$dialog=this.$dialogContainer.find(this.attr.modalSelector)),this.on(document,"click",{closeTargetsSelector:this.closeWithoutAction}),this.on("keydown",{closeTargetsSelector:this.handleCloseKeys}),this.on(document,"uiShortcutEsc uiCloseDialog",this.closeWithoutAction),this.on(document,"uiBeforePageChanged",this.closeImmediately),this.on(document,"uiDialogContentChanged",this.setFocusWhenContentChanges),this.on("focusin",{lastTabStopSelector:this.focusFirstAvailableControl,firstTabStopSelector:this.focusLastAvailableControl}),this.on("focusout",{hideFocusSelector:this.removeHideFocusClass}),this.attr.triggerSelector&&this.on(this.attr.triggerSelector,"click",this.openWhenTriggerClicked),this.attr.disableKeyboardShortcuts&&this.on(document,"uiBeforeKeyboardShortcut",this.blockKeyboardShortcuts),this.attr.closeOnOtherDialogOpened&&this.on(document,"uiDialogOpened",this.closeOtherDialogs),!a&&this.$dialogContainer.is(":visible")&&(this.initiallyVisible=!0,this.open())})}var compose=require("core/compose"),withScrollbarWidth=require("app/ui/with_scrollbar_width"),withKeyboardModality=require("app/utils/with_keyboard_modality"),isVisible=require("app/utils/is_visible"),isEnabled=require("app/utils/is_enabled"),preventNextTooltip=require("app/utils/prevent_next_tooltip");require("$lib/jquery.event.drag.js"),module.exports=withDialog
  });
  define("app/ui/dialogs/copy_link_to_tweet_dialog",["module","require","exports","core/component","app/ui/with_dialog"],function(module, require, exports) {
  function copyLinkToTweetDialog(){this.defaultAttrs({linkToTweetDestinationSelector:".link-to-tweet-destination"}),this.openDialog=function(a,b){this.open();var c=$(a.target).attr("data-permalink-path"),d=location.protocol+"//"+location.host+c;this.$linkToTweetDestination.val(d),this.selectTweetCode(),this.trigger("uiCopyLinkToTweetDialogOpened",{scribeContext:this.scribeContext()})},this.selectTweetCode=function(){this.$linkToTweetDestination.select()},this.tweetCodeCopied=function(){this.trigger("uiUserCopiedTweetCode",{scribeContext:this.scribeContext()})},this.scribeContext=function(){var a={component:"copy_link_to_tweet_dialog"};return a},this.after("initialize",function(){this.$linkToTweetDestination=this.select("linkToTweetDestinationSelector"),this.on(this.$linkToTweetDestination,"copy cut",this.tweetCodeCopied),this.on(this.$linkToTweetDestination,"click",this.selectTweetCode),this.on(document,"uiNeedsCopyLinkToTweetDialog",this.openDialog)})}var defineComponent=require("core/component"),withDialog=require("app/ui/with_dialog"),CopyLinkToTweetDialog=defineComponent(copyLinkToTweetDialog,withDialog);module.exports=CopyLinkToTweetDialog
  });
  define("app/data/copy_link_to_tweet_dialog_scribe",["module","require","exports","core/component","app/data/with_scribe"],function(module, require, exports) {
  function copyLinkToTweetDialogScribe(){this.after("initialize",function(){this.scribeOnEvent("uiCopyLinkToTweetDialogOpened",{action:"impression"}),this.scribeOnEvent("uiUserCopiedTweetCode",{action:"success"})})}var defineComponent=require("core/component"),withScribe=require("app/data/with_scribe"),CopyLinkToTweetDialogScribe=defineComponent(copyLinkToTweetDialogScribe,withScribe);module.exports=CopyLinkToTweetDialogScribe
  });
  define("app/data/geo",["module","require","exports","core/component","core/utils","app/utils/cookie","app/data/with_data"],function(module, require, exports) {
  function geo(){this.defaultAttrs({profileSearchThrottle:35}),this.isInState=function(a){return a.split(" ").indexOf(this.state)>=0},this.isEnabled=function(a){return!this.isInState("disabled enabling enableIsUnavailable")},this.setInitialState=function(){this.attr.geoEnabled?this.state=Geo.webclientCookie()==="1"?"enabledTurnedOn":"enabledTurnedOff":this.state="disabled"},this.requestState=function(a,b){this.shouldLocate()?this.locate():this.sendState(this.state)},this.shouldLocate=function(){return this.isInState("enabledTurnedOn locateIsUnavailable")||this.isInState("located locationUnknown")&&(!this.lastLocationTime||this.now()-this.lastLocationTime>MIN_TIME_BETWEEN_LOCATES_IN_MS)},this.locate=function(a){this.sendState(a?"changing":"locating");var b=function(a){this.sendState(this.locateOrEnableState(a)||"locateIsUnavailable")}.bind(this),c=function(){this.sendState("locateIsUnavailable")}.bind(this),d={override_place_id:a};this.post({url:"/account/geo_locate",data:d,echoParams:{spoof_ip:!0},eventData:d,success:b,error:c})},this.locateOrEnableState=function(a){switch(a.status){case"ok":return this.place_id=a.place_id,this.place_name=a.place_name,this.places_html=a.html,this.lastLocationTime=this.now(),"located";case"unknown":return this.lastLocationTime=this.now(),"locationUnknown"}},this.now=function(){return(new Date).getTime()},this.sendState=function(a){a&&(this.state=a);var b={state:this.state};this.state==="located"&&(b.place_id=this.place_id,b.place_name=this.place_name,b.places_html=this.places_html),this.trigger("dataGeoState",b)},this.turnOn=function(){this.isEnabled()&&(Geo.webclientCookie("1"),this.locate())},this.turnOff=function(){this.isEnabled()&&(Geo.webclientCookie(null),this.sendState("enabledTurnedOff"))},this.enable=function(a,b){if(!this.isInState("disabled enableIsUnavailable"))return;this.sendState("enabling");var c=function(a){Geo.webclientCookie("1"),this.sendState(this.locateOrEnableState(a)||"enableIsUnavailable")}.bind(this),d=function(){this.sendState("enableIsUnavailable")}.bind(this);this.post({url:"/account/geo_locate",data:{enable:"1"},echoParams:{spoof_ip:!0},eventData:b,success:c,error:d})},this.change=function(a,b){this.isEnabled()&&this.locate(b.placeId)},this.search=function(a,b){if(this.searching){this.pendingSearchData=b;return}this.pendingSearchData=null;var c=function(){this.searching=!1;if(this.pendingSearchData)return this.search(a,this.pendingSearchData),!0}.bind(this),d=b.query.trim(),e=[d,b.placeId,b.isPrefix].join(","),f=function(a){this.searchCache[e]=a,a=$.extend({},a,{sourceEventData:b}),c()||this.trigger("dataGeoSearchResults",a)}.bind(this),g=function(){c()||this.trigger("dataGeoSearchResultsUnavailable")}.bind(this);if(!d){f({html:""});return}var h=this.searchCache[e];if(h){f(h);return}this.searching=!0,this.get({url:"/account/geo_search",data:{query:d,place_id:b.placeId,is_prefix:b.isPrefix?"1":"0"},eventData:b,success:f,error:g})},this.profileSearch=function(a,b){var c=b.query.trim(),d=c,e=function(a){this.profileSearchCache[d]=a,a=utils.merge(a,{sourceEventData:b}),this.trigger("dataProfileGeoSearchResults",a)}.bind(this),f=this.profileSearchCache[d];if(f){e(f);return}this.get({url:"/account/geo_profile",data:{query:c},eventData:b,success:e,error:"dataProfileGeoSearchResultsUnavailable"})},this.requestDefaultProfileLocations=function(a,b){this.get({url:"/account/geo_profile",eventData:b,success:"dataDefaultProfileLocations",error:"dataProfileGeoSearchResultsUnavailable"})},this.after("initialize",function(){this.searchCache={},this.profileSearchCache={},this.setInitialState(),this.on("uiRequestGeoState",this.requestState),this.on("uiGeoPickerEnable",this.enable),this.on("uiGeoPickerTurnOn",this.turnOn),this.on("uiGeoPickerTurnOff",this.turnOff),this.on("uiGeoPickerChange",this.change),this.on("uiGeoPickerSearch",this.search),this.on("uiRequestDefaultProfileLocations",this.requestDefaultProfileLocations),this.on("uiGeoProfileSearch",utils.throttle(this.profileSearch.bind(this),this.attr.profileSearchThrottle))})}var defineComponent=require("core/component"),utils=require("core/utils"),cookie=require("app/utils/cookie"),withData=require("app/data/with_data"),Geo=defineComponent(geo,withData),MIN_TIME_BETWEEN_LOCATES_IN_MS=9e5;module.exports=Geo,Geo.webclientCookie=function(a){return a===undefined?cookie("geo_webclient"):cookie("geo_webclient",a,{expires:3650,path:"/"})}
  });
  define("app/utils/shared_objects",["module","require","exports"],function(module, require, exports) {
  var objects={},sharedObjects={add:function(a){var b=+(new Date);return objects[b]=a,b},remove:function(a){delete objects[a]},get:function(a){return objects[a]}};module.exports=sharedObjects
  });
  define("app/utils/media_file_types",["module","require","exports"],function(module, require, exports) {
  module.exports={ANIMATED_GIF:"animatedGif",IMAGE:"image",VIDEO:"video"}
  });
  define("app/utils/file",["module","require","exports","app/utils/params","app/utils/shared_objects","app/utils/media_file_types","core/utils"],function(module, require, exports) {
  var params=require("app/utils/params"),sharedObjects=require("app/utils/shared_objects"),fileTypes=require("app/utils/media_file_types"),utils=require("core/utils"),file={MAX_FILE_SIZE:5242880,MAX_UPLOAD_FILE_SIZE:3145728,GIF_NAME_REGEXP:/.+\.gif$/i,IMAGE_NAME_REGEXP:/.+\.(jpg|jpeg|png)$/i,VIDEO_NAME_REGEXP:/.+\.(mp4|mov|m4v)$/i,GIF_TYPE_REGEXP:/\/+gif$/i,IMAGE_TYPE_REGEXP:/\/+(jpg|jpeg|png)$/i,VIDEO_TYPE_REGEXP:/\/+(mp4|mov|m4v)$/i,validateFileSize:function(a,b){var c=a&&a.size||a.fileSize;return b=b||this.MAX_FILE_SIZE,!c||c<=b},getFileName:function(a){if(a.indexOf("/")==-1&&a.indexOf("\\")==-1)return a;var b=a.match(/(?:.*)[\/\\]([^\/\\]+(?:\.\w+)?)$/);return b[1]},isAnimatedGif:function(a,b){return this.GIF_NAME_REGEXP.test(a)||file.GIF_TYPE_REGEXP.test(b&&b.type)},isImage:function(a,b){return this.IMAGE_NAME_REGEXP.test(a)||file.IMAGE_TYPE_REGEXP.test(b&&b.type)},isVideo:function(a,b){return this.VIDEO_NAME_REGEXP.test(a)||file.VIDEO_TYPE_REGEXP.test(b&&b.type)},hasFileReader:function(){return(typeof FileReader=="function"||typeof FileReader=="object")&&!("no_file_reader"in params.fromQuery(window.location))},getFileHandle:function(a){return a.files&&a.files[0]?a.files[0]:!1},getFileExtension:function(a){return a.split(".").pop().toLowerCase()},getBlobFromDataUri:function(a){var b=a.split(/data:|;base64,/);if(b.length!=3||!window.Blob)return null;var c=atob(b[2]),d=c.length,e=Array(d);for(var f=0;f<d;f++)e[f]=c.charCodeAt(f);return new Blob([new Uint8Array(e)],{type:b[1]})},hasBlob:function(){return window.Blob!=null},getObjectUrl:function(a){var b=window.URL||window.webkitURL;return b&&a?b.createObjectURL(a):""},revokeObjectUrl:function(a){var b=window.URL||window.webkitURL;b&&b.revokeObjectURL(a)},getFileType:function(a,b){if(file.isImage(a,b))return fileTypes.IMAGE;if(file.isAnimatedGif(a,b))return fileTypes.ANIMATED_GIF;if(file.isVideo(a,b))return fileTypes.VIDEO},getFileInfo:function(a,b,c){return utils.merge({isGif:file.isAnimatedGif(a,b),isImage:file.isImage(a,b),isVideo:file.isVideo(a,b),fileId:sharedObjects.add(b),fileType:file.getFileType(a,b),fileSize:b.size},c)},getFileData:function(a,b,c){var d=$.Deferred(),e=new FileReader;return e.onload=function(e){var f=e.target.result;d.resolve(a,f,file.getFileInfo(a,b,c))},e.readAsDataURL(b),d.promise()}};module.exports=file
  });
  define("app/data/found_media",["module","require","exports","core/component","app/utils/file","core/utils","app/data/with_data"],function(module, require, exports) {
  function gif(){this.defaultAttrs({noShowError:!0,defaultCategory:"trending"}),this.updateFetchMoreParameters=function(a,b){this.fetchingMore=!1,this.fetchMoreParameters.url=a.url,this.fetchMoreParameters.data={cursor:b.cursor,y:b.y||0},a.data&&a.data.q&&(this.fetchMoreParameters.data.q=a.data.q)},this.fetchCategories=function(a){this.fetchMoreParameters={},this.get({retryIfUnavailable:!0,url:"/i/found_media/categories",success:function(b){this.trigger(a.target,"dataFoundMediaCategories",b)}.bind(this),error:function(){this.error(a)}.bind(this)})},this.fetchCategoryItems=function(a,b){var c=b&&b.categoryName||this.attr.defaultCategory,d={retryIfUnavailable:!0,url:"/i/found_media/category_items?category="+c,success:function(b){this.updateFetchMoreParameters(d,b),this.fetchMoreParametersCategory[c]=$.extend({},this.fetchMoreParameters),this.successCategoryItems(a,b)}.bind(this),error:function(){this.error(a)}.bind(this)};this.get(d)},this.successCategoryItems=function(a,b){this.trigger(a.target,"dataFoundMediaCategoryItems",b)},this.error=function(a){this.trigger(a.target,"dataFoundMediaError")},this.dispatchPendingSearch=function(a){var b=!1;return this.pendingSearchData&&(this.search(a,this.pendingSearchData),b=!0),b},this.search=function(a,b){if(this.searching){this.pendingSearchData=b;return}this.pendingSearchData=null;var c=b.query.trim();if(!c){this.fetchMoreParameters.data&&this.fetchMoreParameters.data.q?this.fetchMoreParameters=$.extend({},this.fetchMoreParametersCategory.trending):this.fetchMoreParameters={},this.trigger(a.target,"dataFoundMediaSearchClear");return}var d=c,e={retryIfUnavailable:!0,url:"/i/found_media/search",data:{q:c},eventData:b,success:function(c){this.updateFetchMoreParameters(e,c),this.searchSuccess(a,d,b,c)}.bind(this),error:function(){this.searchError(a)}.bind(this)},f=this.searchCache[d];if(f){e.success(f);return}this.searching=!0,this.get(e)},this.searchSuccess=function(a,b,c,d){this.searching=!1,this.searchCache[b]=d,d=utils.merge({},d,{sourceEventData:c}),this.dispatchPendingSearch(a)||this.trigger(a.target,"dataFoundMediaSearchResults",d)},this.searchError=function(a){this.searching=!1,this.dispatchPendingSearch(a)||this.trigger(a.target,"dataFoundMediaSearchResultsUnavailable")},this.isRequestUpToDate=function(a){return a.url===this.fetchMoreParameters.url&&this.fetchMoreParameters.data.q===a.data.q},this.fetchMore=function(a){if(!this.fetchingMore&&!this.searching&&this.fetchMoreParameters.data&&typeof this.fetchMoreParameters.data.cursor=="string"){this.fetchingMore=!0;var b=utils.merge({success:function(c){this.isRequestUpToDate(b)&&(this.updateFetchMoreParameters(b,c),this.fetchMoreSuccess(a,b,c))}.bind(this),error:function(){this.isRequestUpToDate(b)&&this.fetchMoreError(a,b)}.bind(this)},this.fetchMoreParameters);this.isRequestUpToDate(b)&&this.get(b)}},this.fetchMoreSuccess=function(a,b,c){this.fetchingMore=!1,this.trigger(a.target,"dataFoundMediaFetchMoreResults",c)},this.fetchMoreError=function(a,b){this.fetchingMore=!1,this.trigger(a.target,"dataFoundMediaFetchMoreUnavailable")},this.attachImageUrl=function(a,b){var c=b.url;if($.browser.webkit){var d=c.indexOf("?")===-1?"?":"&";c+=d+"_nonce="+Date.now()}var e=new XMLHttpRequest;e.open("GET",c,!0),e.responseType="blob",e.onload=function(c){if(e.status<400){var d=e.response,f="file.gif",g=file.getFileInfo(f,d,{attribution:b.attribution,detailsUrl:b.detailsUrl,metadata:{found_media_origin:b.origin}});this.trigger(a.target,"dataImageAttachBinaryData",{name:f,info:g})}else e.onerror()}.bind(this),e.onerror=function(){this.trigger(a.target,"dataImageAttachFailed")}.bind(this),e.send()},this.after("initialize",function(){this.fetchMoreParametersCategory={},this.fetchMoreParameters={},this.searchCache={},this.on("uiRequestFoundMediaTrending uiRequestFoundMediaCategoryItems",this.fetchCategoryItems),this.on("uiRequestFoundMediaCategories",this.fetchCategories),this.on("uiFoundMediaSearch",this.search),this.on("uiFoundMediaFetchMore",this.fetchMore),this.on("uiAttachImageUrl",this.attachImageUrl)})}var defineComponent=require("core/component"),file=require("app/utils/file"),utils=require("core/utils"),withData=require("app/data/with_data");module.exports=defineComponent(gif,withData)
  });
  define("app/utils/sru",function(){var a=0,b=1,c=2,d=3,e=4,f=2147483647,g=5242880,h=65536,i=1e3,j=1,k=45e3,l=2e3,m="https://upload.twitter.com/i/media/upload.json",n={FILE_TOO_LARGE:2,INTERNAL_ERROR:131,INVALID_MEDIA:1,RATE_LIMIT:88,TIMEOUT:67,UNSUPPORTED_MEDIA:3,ZERO_FILE_LENGTH:4},o={0:n.INTERNAL_ERROR,1:n.INVALID_MEDIA,2:n.FILE_TOO_LARGE,3:n.UNSUPPORTED_MEDIA,4:n.TIMEOUT};return function(q,r){function L(){O(),u=a,s=null,t={},B=y,C=0,z=0,G=!1,E&&(E.abort(),E=null)}function M(){if(!w)W({error:{code:n.ZERO_FILE_LENGTH}});else{F="uploading";var a="&total_bytes="+w+"&media_type="+encodeURIComponent(x);t.extraInitParams&&(a+=t.extraInitParams),bb("POST","INIT",a,null,N,W,j)}}function N(a){u===b&&(s=a.media_id_string,P(a.expires_after_secs),Q())}function O(){D&&(clearTimeout(D),D=null)}function P(a){if(a){O();var b=Math.min(f,a*1e3);D=setTimeout(function(){W({error:{code:n.TIMEOUT}}),ab("NONE","timeout"),L()},b)}}function Q(){if(z===w)S();else{A=Math.min(B,w-z);var a=q.webkitSlice||q.mozSlice||q.slice,b=a.call(q,z,z+A),c=new FormData;c.append("media",b);var d="&media_id="+s+"&segment_index="+C;bb("POST","APPEND",d,c,R,W,j)}}function R(){u===b&&(C++,z+=A,Y(X()),Q())}function S(){if(t.pauseBeforeFinalize)u=c;else{G=!0;var a="&media_id="+s;t.trimRanges&&(a+="&trim_ranges="+encodeURIComponent(t.trimRanges)),/^video\//.test(x)&&(a+="&allow_async=true"),bb("POST","FINALIZE",a,null,T,W,j)}}function T(a){P(a.expires_after_secs);var b=a.processing_info,c=0;if(!b){V(a);return}switch(b.state){case"pending":F="waiting";break;case"in_progress":F="processing",c=b.progress_percent;break;case"succeeded":V(a);return;case"failed":var d=b.error||{};d.code=o[d.code]||n.INTERNAL_ERROR,W({error:d});return;default:W(a);return}Y(c,s),setTimeout(U,b.check_after_secs*1e3)}function U(){if(u===b){var a="&media_id="+s;bb("GET","STATUS",a,null,T,W,j)}}function V(a){u===b&&(u=d,Z())}function W(a){if(u!==b)return;v=a&&a.error&&a.error.code?a.error:{code:n.INTERNAL_ERROR},u=e,Z()}function X(){return w?100*z/w:0}function Y(a,b){u!==e&&t.progress&&t.progress(a,F,b)}function Z(){u===d&&t.success&&t.success(s),u===e&&t.error&&t.error(v)}function ab(a,b){if(t.stats){var c={mediaType:x,command:a,status:b,duration:new Date-H,totalByteSize:w,totalDuration:new Date-I};a==="APPEND"&&(c.appendByteSize=A),t.stats(c)}}function bb(a,b,c,d,e,f,h){function j(){if(E.status>=200&&E.status<400){var a=q();E.status!==204&&!a?m("parsererror"):(ab(b,"success"),p(),e(a||{}))}else!E.status||E.status===503?m():n()}function m(g){h?bb(a,b,c,d,e,f,h-1):n(g)}function n(a){ab(b,a||"error"),f(q()||{})}function o(){A=y,m("timeout")}function p(){if(d){var a=Math.max(1,new Date-H);B=Math.max(y,Math.min(g,Math.round(l*A/a)))}}function q(){try{return JSON.parse(E.responseText)}catch(a){return null}}var i=K+"?command="+b+c;H=new Date,E=new XMLHttpRequest,E.open(a,i,!0),E.withCredentials=!0,E.timeout=k,E.onload=j,E.onerror=m,E.ontimeout=o;for(var r in J)E.setRequestHeader(r,J[r]);d?E.send(d):E.send()}q=q||{},r=r||{};var s,t,u,v,w=q.size||0,x=q.type,y=Math.max(Math.ceil(w/i),h),z,A,B,C,D,E,F,G,H,I=new Date,J=r.sruHeaders||{},K=r.uploadUrl||m;L(),this.upload=function(a){a=a||{},(G&&t.trimRanges!==a.trimRanges||t.extraInitParams!==a.extraInitParams)&&L(),t=a,u!==d&&u!==b&&(u=b,G?S():s?Q():M()),Z(),Y(X())},this.cancel=function(){L()},this.pollStatusOfExistingMediaId=function(a,c){s=a,t=c||{},u=b,U()}}})
  define("app/data/media_sru",["module","require","exports","core/component","app/utils/shared_objects","app/utils/sru","app/data/user_info"],function(module, require, exports) {
  function mediaSru(){this.createUpload=function(a){return new Sru(a)},this.stats=function(a){this.trigger("dataSruStats",{mediaCategory:a.mediaType.replace("image/gif","gif").replace(/\/.*/,""),command:a.command.toLowerCase(),appendByteSize:a.appendByteSize,status:a.status,duration:a.duration,totalDuration:a.totalDuration,totalByteSize:a.totalByteSize})},this.dataToExtraInitParams=function(a){return userInfo.getDecider("sruMediaCategory")&&a.mediaCategory&&"&media_category="+encodeURIComponent(a.mediaCategory)||null},this.init=function(a,b){var c=b.uploadId,d=this.uploads[c];if(!d){var e=sharedObjects.get(b.fileId);d=this.createUpload(e),this.uploads[c]=d}d.upload({extraInitParams:this.dataToExtraInitParams(b),pauseBeforeFinalize:!0,stats:this.stats.bind(this)})},this.finalize=function(a,b){var c=b.uploadId,d=this.uploads[c];d?d.upload({extraInitParams:this.dataToExtraInitParams(b),success:function(a){this.trigger("dataMediaSruSuccess",{uploadId:c,mediaId:a,percent:100})}.bind(this),progress:function(a,b){this.trigger("dataMediaSruProgress",{uploadId:c,percent:a,mode:b})}.bind(this),error:function(a){this.trigger("dataMediaSruError",{uploadId:c,error:a})}.bind(this),trimRanges:b.trimRange,stats:this.stats.bind(this)}):this.trigger("dataMediaSruError",b)},this.cancel=function(a,b){var c=b.uploadId,d=this.uploads[c];d&&(d.cancel(),delete this.uploads[c],this.trigger("dataMediaSruCancel",{uploadId:c}))},this.after("initialize",function(){this.uploads={},this.on(document,"uiMediaSruInit",this.init),this.on(document,"uiMediaSruFinalize",this.finalize),this.on(document,"uiMediaSruCancel",this.cancel)}),this.after("teardown",function(){Object.keys(this.uploads).forEach(function(a){this.uploads[a].cancel()}.bind(this))})}var defineComponent=require("core/component"),sharedObjects=require("app/utils/shared_objects"),Sru=require("app/utils/sru"),userInfo=require("app/data/user_info");module.exports=defineComponent(mediaSru)
  });
  define("app/utils/array",["module","require","exports"],function(module, require, exports) {
  function flatten(a){return a.reduce(function(a,b){return a.concat(b)},[])}function unique(a){return a.filter(function(b,c){return a.indexOf(b)==c})}function compact(a){return a.filter(function(a){return typeof a!="undefined"&&a!==null})}function grouped(a,b,c){var c=c||[];return a.length?grouped(a.slice(b),b,c.concat([a.slice(0,b)])):c}function shuffleInPlace(a){for(var b=a.length-1;b>0;b--){var c=Math.floor(Math.random()*(b+1)),d=a[b];a[b]=a[c],a[c]=d}return a}module.exports={flatten:flatten,unique:unique,compact:compact,grouped:grouped,shuffleInPlace:shuffleInPlace}
  });
  define("app/utils/promises",["module","require","exports","app/utils/array"],function(module, require, exports) {
  function chain(a,b){var c=[],d=a.map(function(a){return a().then.bind(null,tapTo(c))}),e=d.reduce(function(a,b){return a.then(b)},$.Deferred().resolve());return e.then(function(){return $.Deferred().resolveWith(b,[c])},function(){return $.Deferred().rejectWith(b,arguments)}).promise()}function collect(a,b){var c=$.Deferred();return $.when.apply(null,a).then(gather).then(function(){return c.resolveWith(b,arguments)},function(){return c.rejectWith(b,arguments)}).promise()}function log(a,b){b=b||{enabled:!1,title:null};if(!b.enabled)return a;var c=logHandler.bind(null,a,b.title);return a.done(c("info")).fail(c("warn")).progress(c("info"))}function pluralize(a,b){return function(){var c=flatten(Array.prototype.slice.call(arguments));return collect(c.map(a,b)).then(flatten).promise()}}function rescue(a,b){var c=$.Deferred();try{$.when(a.call(b)).then(c.resolve,c.reject)}catch(d){c.reject(d)}return c.promise()}function gather(){return Array.prototype.slice.call(arguments)}function tapTo(a){return function(b){return a.push(b),b}}function logHandler(a,b,c){return function(){var d=("["+a.state()+"] "+(b||"")).trim();console[c||"log"](d,Array.prototype.slice.call(arguments))}}var flatten=require("app/utils/array").flatten;module.exports={chain:chain,collect:collect,log:log,pluralize:pluralize,rescue:rescue}
  });
  define("app/data/with_media_metadata",["module","require","exports","core/i18n","core/utils"],function(module, require, exports) {
  function withMediaMetadata(){this.uploadMetadata=function(a,b){var c=_('Uploading media metadata failed! Please try again later.'),d=$.Deferred();return b?(request=new XMLHttpRequest,request.open("POST",METADATA_URL,!0),request.withCredentials=!0,request.timeout=REQUEST_TIMEOUT_MS,request.onload=function(){request.status>=200&&request.status<400?d.resolve(a):d.reject(c)},request.ontimeout=request.onerror=function(){d.reject(c)},request.send(JSON.stringify(utils.merge({media_id:a},b)))):d.resolve(a),d}}var _=require("core/i18n"),utils=require("core/utils"),METADATA_URL="https://upload.twitter.com/i/media/metadata/create.json",REQUEST_TIMEOUT_MS=4e3;module.exports=withMediaMetadata
  });
  define("app/utils/upload_errors/sru_error_codes",["module","require","exports"],function(module, require, exports) {
  module.exports={FILE_TOO_LARGE:2,INTERNAL_ERROR:131,INVALID_MEDIA:1,RATE_LIMIT:88,TIMEOUT:67,UNSUPPORTED_MEDIA:3,ZERO_FILE_LENGTH:4}
  });
  define("app/utils/upload_errors/video_upload_error_messages",["module","require","exports","core/i18n","app/utils/upload_errors/sru_error_codes","template","app/data/user_info"],function(module, require, exports) {
  var _=require("core/i18n"),sruErrorCodes=require("app/utils/upload_errors/sru_error_codes"),template=require("template"),userInfo=require("app/data/user_info");module.exports=function(a){var b=template.learn_more_link.render({article_number:"20172128"});switch(a){case sruErrorCodes.INVALID_MEDIA:return _('Your video file could not be processed. Please see tips for uploading video files. {{learnMoreLink}}',{learnMoreLink:b});case sruErrorCodes.FILE_TOO_LARGE:return _('Your video file is too large. Videos should be less than {{maxSize}} MB. {{learnMoreLink}}.',{maxSize:userInfo.getDeciderValue("upload_video_size"),learnMoreLink:b});case sruErrorCodes.UNSUPPORTED_MEDIA:return _('Your video file is not compatible. Please see tips for uploading video files. {{learnMoreLink}}',{learnMoreLink:b})}}
  });
  define("app/utils/upload_errors/image_upload_error_messages",["module","require","exports","core/i18n","app/utils/upload_errors/sru_error_codes","template"],function(module, require, exports) {
  var _=require("core/i18n"),sruErrorCodes=require("app/utils/upload_errors/sru_error_codes"),template=require("template");module.exports=function(a){var b=template.learn_more_link.render({article_number:"20156423"});switch(a){case sruErrorCodes.INVALID_MEDIA:return _('Your image file could not be processed. Please see tips for uploading images. {{learnMoreLink}}',{learnMoreLink:b});case sruErrorCodes.FILE_TOO_LARGE:return _('Your image file is too large. Images should be less than 5 MB. {{learnMoreLink}}.',{learnMoreLink:b});case sruErrorCodes.UNSUPPORTED_MEDIA:return _('Your image file is not compatible. Please see tips for uploading images. {{learnMoreLink}}',{learnMoreLink:b})}}
  });
  define("app/utils/upload_errors/gif_upload_error_messages",["module","require","exports","core/i18n","app/utils/upload_errors/sru_error_codes","template"],function(module, require, exports) {
  var _=require("core/i18n"),sruErrorCodes=require("app/utils/upload_errors/sru_error_codes"),template=require("template");module.exports=function(a){var b=template.learn_more_link.render({article_number:"20156423"});switch(a){case sruErrorCodes.INVALID_MEDIA:return _('Your GIF file could not be processed. Please see tips for uploading GIFs. {{learnMoreLink}}',{learnMoreLink:b});case sruErrorCodes.FILE_TOO_LARGE:return _('Your GIF file is too large. GIFs should be less than 3 MB. {{learnMoreLink}}.',{learnMoreLink:b});case sruErrorCodes.UNSUPPORTED_MEDIA:return _('Your GIF file is not compatible. Please see tips for uploading GIFs. {{learnMoreLink}}',{learnMoreLink:b})}}
  });
  define("app/utils/upload_errors/media_upload_error_messages",["module","require","exports","core/i18n","app/utils/media_file_types","app/utils/upload_errors/sru_error_codes","app/utils/upload_errors/video_upload_error_messages","app/utils/upload_errors/image_upload_error_messages","app/utils/upload_errors/gif_upload_error_messages"],function(module, require, exports) {
  var _=require("core/i18n"),fileTypes=require("app/utils/media_file_types"),sruErrorCodes=require("app/utils/upload_errors/sru_error_codes"),videoUploadErrorMessages=require("app/utils/upload_errors/video_upload_error_messages"),imageUploadErrorMessages=require("app/utils/upload_errors/image_upload_error_messages"),gifUploadErrorMessages=require("app/utils/upload_errors/gif_upload_error_messages"),defaultErrorMessages=function(a){switch(a){case sruErrorCodes.FILE_TOO_LARGE:return _('The selected media is too large.');case sruErrorCodes.INVALID_MEDIA:return _('Your media file could not be processed.');case sruErrorCodes.TIMEOUT:return _('The upload session has timed out.');case sruErrorCodes.UNSUPPORTED_MEDIA:return _('Your media file is not compatible.');case sruErrorCodes.ZERO_FILE_LENGTH:return _('File has zero length.');default:return _('Uploading media failed! Please try again later.')}},fileTypeSpecificMessages=function(a,b){switch(b){case fileTypes.VIDEO:return videoUploadErrorMessages(a);case fileTypes.IMAGE:return imageUploadErrorMessages(a);case fileTypes.ANIMATED_GIF:return gifUploadErrorMessages(a)}};module.exports=function(a,b,c){return c=c||$.noop,c(b,a)||fileTypeSpecificMessages(b,a)||defaultErrorMessages(a)}
  });
  define("app/data/with_media_sru_finalize",["module","require","exports","core/utils","app/utils/upload_errors/media_upload_error_messages"],function(module, require, exports) {
  function withMediaSruFinalize(){this.mediaSruFinalize=function(a){var b=a.uploadId,c=$.Deferred();this.sruDeferreds[b]=c,this.trigger("uiMediaSruFinalize",{uploadId:b,trimRange:a.trimRange,mediaCategory:a.mediaCategory});var d=function(b){var c=mediaUploadErrorMessages(b.code,a.fileType);return utils.merge(b,{message:c})};return c.then(undefined,d)},this.uploadMediaSruResult=function(a,b){var c=b.uploadId,d=this.sruDeferreds[c];if(d){switch(a.type){case"dataMediaSruSuccess":d.resolve(b.mediaId);break;case"dataMediaSruCancel":d.reject({cancelled:!0});break;default:d.reject(b.error)}delete this.sruDeferreds[c]}},this.after("initialize",function(){this.sruDeferreds={},this.on("dataMediaSruSuccess dataMediaSruError dataMediaSruCancel",this.uploadMediaSruResult)})}var utils=require("core/utils"),mediaUploadErrorMessages=require("app/utils/upload_errors/media_upload_error_messages");module.exports=withMediaSruFinalize
  });
  define("app/utils/flash_version",["module","require","exports"],function(module, require, exports) {
  module.exports={path:"/flash/1/"}
  });
  deferred('$lib/jquery.swfobject.js', function() {
  /*! jQuery SWFObject v1.1.1 MIT/GPL @jon_neal http://jquery.thewikies.com/swfobject */(function(a,b,c){function d(a,b){var c=(a[0]||0)-(b[0]||0);return c>0||!c&&a.length>0&&d(a.slice(1),b.slice(1))}function e(a){if(typeof a!=h)return a;var b=[],c="";for(var d in a)c=typeof a[d]==h?e(a[d]):[d,i?encodeURI(a[d]):a[d]].join("="),b.push(c);return b.join("&")}function f(a){var b=[];for(var c in a)a[c]&&b.push([c,'="',a[c],'"'].join(""));return b.join(" ")}function g(a){var b=[];for(var c in a)b.push(['<param name="',c,'" value="',e(a[c]),'" />'].join(""));return b.join("")}var h="object",i=!0;try{var j=c.description||function(){return(new c("ShockwaveFlash.ShockwaveFlash")).GetVariable("$version")}()}catch(k){j="Unavailable"}var l=j.match(/\d+/g)||[0];a[b]={available:l[0]>0,activeX:c&&!c.name,version:{original:j,array:l,string:l.join("."),major:parseInt(l[0],10)||0,minor:parseInt(l[1],10)||0,release:parseInt(l[2],10)||0},hasVersion:function(a){return a=/string|number/.test(typeof a)?a.toString().split("."):/object/.test(typeof a)?[a.major,a.minor]:a||[0,0],d(l,a)},encodeParams:!0,expressInstall:"expressInstall.swf",expressInstallIsActive:!1,create:function(a){if(!a.swf||this.expressInstallIsActive||!this.available&&!a.hasVersionFail)return!1;if(!this.hasVersion(a.hasVersion||1)){this.expressInstallIsActive=!0;if(typeof a.hasVersionFail=="function"&&!a.hasVersionFail.apply(a))return!1;a={swf:a.expressInstall||this.expressInstall,height:137,width:214,flashvars:{MMredirectURL:location.href,MMplayerType:this.activeX?"ActiveX":"PlugIn",MMdoctitle:document.title.slice(0,47)+" - Flash Player Installation"}}}attrs={data:a.swf,type:"application/x-shockwave-flash",id:a.id||"flash_"+Math.floor(Math.random()*999999999),width:a.width||320,height:a.height||180,style:a.style||""},i=typeof a.useEncode!="undefined"?a.useEncode:this.encodeParams,a.movie=a.swf,a.wmode=a.wmode||"opaque",delete a.fallback,delete a.hasVersion,delete a.hasVersionFail,delete a.height,delete a.id,delete a.swf,delete a.useEncode,delete a.width;var b=document.createElement("div");return b.innerHTML=["<object ",f(attrs),">",g(a),"</object>"].join(""),b.firstChild}},a.fn[b]=function(c){var d=this.find(h).andSelf().filter(h);return/string|object/.test(typeof c)&&this.each(function(){var d=a(this),e;c=typeof c==h?c:{swf:c},c.fallback=this;if(e=a[b].create(c))d.children().remove(),d.html(e)}),typeof c=="function"&&d.each(function(){var d=this;d.jsInteractionTimeoutMs=d.jsInteractionTimeoutMs||0,d.jsInteractionTimeoutMs<660&&(d.clientWidth||d.clientHeight?c.call(d):setTimeout(function(){a(d)[b](c)},d.jsInteractionTimeoutMs+66))}),d}})(jQuery,"flash",navigator.plugins["Shockwave Flash"]||window.ActiveXObject)
  });
  define("app/utils/image",["module","require","exports","app/utils/file","app/utils/flash_version","$lib/jquery.swfobject.js","app/utils/params"],function(module, require, exports) {
  var file=require("app/utils/file"),flashVersion=require("app/utils/flash_version");require("$lib/jquery.swfobject.js");var params=require("app/utils/params"),image={photoHelperSwfPath:flashVersion.path+"PhotoHelper.swf",photoSelectorSwfPath:flashVersion.path+"PhotoSelector.swf",MAX_DIMENSION:8e3,loadPhotoHelperSwf:function(a,b,c,d,e){return a.flash({swf:this.photoHelperSwfPath,height:d,width:e,wmode:"transparent",AllowScriptAccess:"sameDomain",flashvars:{callbackName:b,errorCallbackName:c,buttonWidth:e,buttonHeight:d}}),a.find("object")},loadPhotoSelectorSwf:function(a,b,c,d,e,f){return a.flash({swf:this.photoSelectorSwfPath,height:d,width:e,wmode:"transparent",AllowScriptAccess:"sameDomain",flashvars:{callbackName:b,errorCallbackName:c,buttonWidth:e,buttonHeight:d,maxSizeInBytes:f}}),a.find("object")},hasFlash:function(){try{return $.flash.available&&$.flash.hasVersion(10)&&!("no_flash"in params.fromQuery(window.location))}catch(a){return!1}},getUserMedia:function(){var a=navigator.getUserMedia||navigator.webkitGetUserMedia||navigator.mozGetUserMedia||navigator.msGetUserMedia;return a?a.bind(navigator):!1}(),hasGetUserMedia:function(){var a=navigator.getUserMedia||navigator.webkitGetUserMedia||navigator.mozGetUserMedia||navigator.msGetUserMedia,b=$.browser.mozilla&&parseInt($.browser.version)<22;return!!a&&!b},hasCanvas:function(){var a=document.createElement("canvas");return!!a.getContext&&!!a.getContext("2d")},supportsCropper:function(){return this.hasCanvas()&&(file.hasFileReader()||this.hasFlash())},shouldUseFlash:function(){return(!file.hasFileReader()||!file.hasBlob())&&this.hasFlash()},mode:function(){return file.hasFileReader()&&file.hasBlob()?"html5":this.hasFlash()?"flash":"html4"},supportsFileReader:function(){return this.mode()!="html4"},getThumbnailUri:function(a){return window.Blob&&(window.URL||window.webkitURL)?this.getBlobUri(a):this.getDataUri(a,!1)},getDataUri:function(a,b){var c="data:image/jpeg;base64,"+a;return b&&(c="url("+c+")"),c},getBlobUri:function(a){return file.getObjectUrl(file.getBlobFromDataUri(this.getDataUri(a,!1)))},getBase64Length:function(a){var b=a.match(/=*$/);return Math.floor((a.length-b[0].length)*.75)}};module.exports=image
  });
  define("app/data/with_media_upload",["module","require","exports","core/i18n","core/compose","app/utils/image","template","app/data/user_info","app/data/with_data"],function(module, require, exports) {
  function withMediaUpload(){this.defaultAttrs({statsName:"image_upload",uploadTimeout:12e4});var a="https://upload.twitter.com/i/media/upload.iframe",b="https://upload.twitter.com/i/media/upload.json";compose.mixin(this,[withData]),this.uploadMedia=function(a){return this.isDirectUploadSupported()?this.uploadMediaDirect(a):this.uploadViaIframe(a)},this.isDirectUploadSupported=function(){return userInfo.getDecider("web_upload_direct")&&"withCredentials"in new XMLHttpRequest&&image.supportsFileReader()},this.uploadViaIframe=function(a){var b=$.Deferred(),c=Date.now(),d=this.createMediaUploadForm(a,c),e=d.form,f=d.iframe,g=d.container,h=this.handleIframeMessage.bind(this,b,c);this.on(window,"message",h);var i=setTimeout(function(){b.reject(_('Uploading photo failed! Please try again later.'))},this.attr.uploadTimeout);return b.always(function(){e.remove(),f.remove(),this.off(window,"message",h),clearTimeout(i),g.remove()}.bind(this)),e.submit(),b.promise()},this.createMediaUploadForm=function(b,c){var d=location.protocol+"//"+location.hostname+(location.port?":"+location.port:""),e={form_action:a+"?origin="+encodeURIComponent(d),auth_token:this.getAuthToken(),origin:d,upload_id:c,media_data:b.fileData},f=template["highline/components/iframe_async_media_upload"].render(e,template),g=$(f),h=g.find("form"),i=g.find("iframe");if(b.fileInput&&!b.fileData){var j=$(b.fileInput),k=this.getInputAttributes(j),l=j.parent();j.attr("name","media"),h.append(j),this.reinsertEmptyFileInput(l,k)}return $("body").append(g),{form:h,iframe:i,container:g}},this.handleIframeMessage=function(a,b,c){var d=this.getMediaIdFromMessage(b,c);d&&a.resolve(d)},this.getMediaIdFromMessage=function(a,b){b.originalEvent&&(b=b.originalEvent);try{var c=JSON.parse(b.data);if(c.media_id_string&&c.upload_id==a)return c.media_id_string}catch(d){}return!1},this.getInputAttributes=function(a){var b={};return $.each(a.get(0).attributes,function(a,c){c.name!="value"&&(b[c.name]=c.value)}),b},this.reinsertEmptyFileInput=function(a,b){b.name=this.attr.fileInputString||b.name;var c=$("<input>").attr(b);a.append(c)},this.uploadMediaDirect=function(a){var c=location.protocol+"//"+location.hostname+(location.port?":"+location.port:""),d=$.Deferred(),e=this.attr.uploadTimeout;return this.post({contentType:"application/x-www-form-urlencoded",url:b+"?origin="+encodeURIComponent(c),data:{media:a.fileData,authenticity_token:this.getAuthToken(),origin:c},xhrFields:{withCredentials:!0},dataType:"json",origin:c,timeout:e}).done(function(a){d.resolve(a.media_id_string)}).fail(function(){d.reject(_('Uploading photo failed! Please try again later.'))}),d.promise()}}var _=require("core/i18n"),compose=require("core/compose"),image=require("app/utils/image"),template=require("template"),userInfo=require("app/data/user_info"),withData=require("app/data/with_data");module.exports=withMediaUpload
  });
  define("app/data/with_card_creator",["module","require","exports","core/compose","app/data/with_data"],function(module, require, exports) {
  function withCardCreator(){var a="/i/cards/create/v1",b=3e4;compose.mixin(this,[withData]),this._buildData=function(a,b){var c={card_data:JSON.stringify(a)};return b!==undefined&&(c.guid=b),c},this.createCard=function(c,d){var e=$.Deferred(),f={url:a,data:this._buildData(c,d),isMutation:!1,dataType:"json",timeout:b,retryIfUnavailable:!0};return this.post(f).done(function(a){e.resolve(a.card_uri)}).fail(function(){e.reject()}),e.promise()}}var compose=require("core/compose"),withData=require("app/data/with_data");module.exports=withCardCreator
  });
  define("bower_components/flight-with-child-components/lib/flight-with-child-components",function(){function b(){this.defaultAttrs({teardownOn:""}),this.after("initialize",function(){if(this.attr.teardownOn){if(this.attr.teardownOn===this.childTeardownEvent)throw new Error("Component initialized to listen for its own teardown event.");this.on(document,this.attr.teardownOn,function(){this.teardown()})}})}function c(){this.before("initialize",function(){this.childTeardownEvent=this.childTeardownEvent||c.nextTeardownEvent()}),this.before("teardown",function(){this.trigger(this.childTeardownEvent)}),this.attachChild=function(a,c,d){d=d||{},d.teardownOn||(d.teardownOn=this.childTeardownEvent);var e=a.prototype.mixedIn||[],f=e.indexOf(b)>-1?!0:!1;(f?a:a.mixin(b)).attachTo(c,d)}}"use strict";var a=0;return c.nextTeardownEvent=function(){return a+=1,"_teardownEvent"+a},c.withBoundLifecycle=b,c})
  define("app/utils/with_no_teardown_child_components",["module","require","exports","core/compose","core/utils","bower_components/flight-with-child-components/lib/flight-with-child-components"],function(module, require, exports) {
  function withNoTeardownChildComponents(){compose.mixin(this,[withChildComponents]),this.around("attachChild",function(a,b,c,d){a(b,c,utils.merge(d,{noTeardown:!0}))})}var compose=require("core/compose"),utils=require("core/utils"),withChildComponents=require("bower_components/flight-with-child-components/lib/flight-with-child-components");module.exports=withNoTeardownChildComponents
  });
  define("app/data/tweet",["module","require","exports","core/i18n","core/component","app/data/media_sru","app/utils/promises","app/data/with_auth_token","app/data/with_data","app/data/with_media_metadata","app/data/with_media_sru_finalize","app/data/with_media_upload","app/data/with_card_creator","app/utils/with_no_teardown_child_components"],function(module, require, exports) {
  function tweet(){this.IFRAME_TIMEOUT=12e4,this.defaultAttrs({includePageContext:!0}),this.sendTweet=function(a,b){var c=b.tweetboxId,d=function(a){a.tweetboxId=c,a.tweetData=b.tweetData,this.trigger("dataTweetSuccess",a),this.trigger("dataGotProfileStats",{stats:a.profile_stats}),a.tweet_stats&&this.trigger("dataGotTweetStats",{stats:a.tweet_stats})},e=function(a){var b;try{b={message:a.message,spamChallenge:a.challengeName}}catch(d){b={error:_('Sorry! We did something wrong.')}}b.tweetboxId=c,this.trigger("dataTweetError",b)};this.post({url:"/i/tweet/create",isMutation:!1,data:b.tweetData,success:d.bind(this),error:e.bind(this),retryIfUnavailable:!0})},this.getMediaItems=function(a){var b=$("#"+a),c=b.find(".file-data"),d=b.find(".multi-photo-data"),e=d.length?d:c;return e.map(function(a,b){var c=$(b),d=c.data();return{fileData:c.val(),fileId:c.attr("data-file-id"),fileType:d.fileType,mediaCategory:d.mediaCategory,trimRange:d.trimRange,metadata:d.metadata,uploadId:c.attr("data-upload-id")}})},this.sendTweetWithMedia=function(a,b){var c=b.tweetboxId,d=b.tweetData,e=this.getMediaItems(c),f=function(b){d.media_ids=b.join(","),this.sendTweet(a,{tweetboxId:c,tweetData:d})}.bind(this),g=function(a){this.trigger(a.cancelled?"dataTweetCancel":"dataTweetError",{message:a.message,tweetboxId:c})}.bind(this);this.collectMediaItems(e).then(f,g)},this.collectMediaItems=function(a){return Promise.collect($.map(a,function(a){var b=a.fileId?this.mediaSruFinalize(a):this.uploadMedia(a),c=function(a){return typeof a=="object"?a:{message:a}};return b.then(function(b){return this.uploadMetadata(b,a.metadata)}.bind(this),c)}.bind(this)))},this.sendTweetWithCard=function(a,b){if(b.cardData===undefined)this.trigger("dataTweetError",{tweetboxId:c,message:b.clientErrorMsg});else{var c=b.tweetboxId,d=function(d){var e=b.tweetData;e.card_uri=d,this.sendTweet(a,{tweetboxId:c,tweetData:e})}.bind(this),e=function(){this.trigger("dataTweetError",{tweetboxId:c,message:b.serverErrorMsg})}.bind(this);this.createCard(b.cardData).then(d,e)}},this.sendDirectMessage=function(a,b){this.trigger("dataDirectMessageSuccess",b)},this.after("initialize",function(){this.attachChild(MediaSru,document),this.on("uiSendTweet",this.sendTweet),this.on("uiSendTweetWithMedia",this.sendTweetWithMedia),this.on("uiSendTweetWithCard",this.sendTweetWithCard),this.on("uiSendDirectMessage",this.sendDirectMessage)})}var _=require("core/i18n"),defineComponent=require("core/component"),MediaSru=require("app/data/media_sru"),Promise=require("app/utils/promises"),withAuthToken=require("app/data/with_auth_token"),withData=require("app/data/with_data"),withMediaMetadata=require("app/data/with_media_metadata"),withMediaSruFinalize=require("app/data/with_media_sru_finalize"),withMediaUpload=require("app/data/with_media_upload"),withCardCreator=require("app/data/with_card_creator"),withNoTeardownChildComponents=require("app/utils/with_no_teardown_child_components"),Tweet=defineComponent(tweet,withAuthToken,withData,withMediaUpload,withMediaSruFinalize,withNoTeardownChildComponents,withCardCreator,withMediaMetadata);module.exports=Tweet
  });
  define("app/ui/dialogs/with_modal_tweet",["module","require","exports"],function(module, require, exports) {
  function withModalTweet(){this.defaultAttrs({modalTweetContainerSelector:".modal-container",modalTweetDoGearSelector:".dogear",modalTweetLoadingClass:"tweet-loading",modalTweetSelector:".modal-tweet",modalTweetShowingClass:"tweet-showing",modalTweetTimeSelector:".time",modalTweetTextSelector:".js-tweet-text"}),this.modalTweetOptions={},this.turnOnShowingTweetClass=function(){this.$node.addClass(this.attr.modalTweetShowingClass)},this.turnOffShowingTweetClass=function(){this.$node.removeClass(this.attr.modalTweetShowingClass)},this.turnOnLoadingTweetClass=function(){this.$node.addClass(this.attr.modalTweetLoadingClass)},this.turnOffLoadingTweetClass=function(){this.$node.removeClass(this.attr.modalTweetLoadingClass)},this.requestForTweet=function(a,b){this.displayTweet(b.tweetId,b.tweetOptions)},this.displayTweet=function(a,b){this.modalTweetOptions=b,this.retrieveTweet(a,b)},this.retrieveTweet=function(a,b){this.turnOnLoadingTweetClass(),this.trigger("uiGetTweet",{id:a,modal:b.modal}),this.modalTweetOptions=b},this.gotTweet=function(a,b){this.turnOffLoadingTweetClass(),b.id&&b.tweet_html&&(this.addTweet(b.tweet_html),this.modifyTweetOnRender(this.modalTweetOptions))},this.modifyTweetOnRender=function(a){a&&a.userOnly&&(this.$node.find(this.attr.modalTweetTimeSelector).remove(),this.$node.find(this.attr.modalTweetDoGearSelector).remove(),this.$node.find(this.attr.modalTweetTextSelector).remove()),a&&a.disableLinks&&(this.select("modalTweetSelector").addClass("disabled-links"),this.$node.find("a").attr("tabindex",-1).click(function(a){a.preventDefault(),a.stopPropagation()}))},this.addTweet=function(a){this.select("modalTweetSelector").empty().append(a),this.turnOnShowingTweetClass()},this.removeTweet=function(){this.turnOffLoadingTweetClass(),this.turnOffShowingTweetClass(),this.select("modalTweetSelector").empty()},this.after("initialize",function(){this.on("uiWantsTweet",this.requestForTweet),this.on(document,"dataGotTweet",this.gotTweet),this.on(document,"uiDialogClosed dataFailedToGetTweet uiRemoveTweetAttachment",this.removeTweet)})}module.exports=withModalTweet
  });
  define("app/ui/tweet_dialog",["module","require","exports","core/component","core/utils","app/ui/with_dialog","app/ui/dialogs/with_modal_tweet","core/i18n"],function(module, require, exports) {
  function tweetDialog(){this.defaultAttrs({disableKeyboardShortcuts:!0,tweetBoxSelector:"form.tweet-form",globalTweetBoxSelector:"#global-tweet-dialog form.tweet-form",top:"20%"}),this.openReply=function(a,b){this.displayTweet(b.id,{modal:"reply"});var c=b.screenNames[0];this.openTweetDialog(a,utils.merge(b,{title:_('Reply to {{screenName}}',{screenName:"@"+c})}))},this.openGlobalTweetDialog=function(a,b){this.openTweetDialog(a,utils.merge(b,{draftTweetId:"global"}))},this.openTweetDialog=function(a,b){var c=$(this.attr.globalTweetBoxSelector);this.setTitle(b&&b.title||_('Compose new Tweet')),this.tweetBoxReady||(this.trigger(c,"uiInitTweetbox",{autoplayDisabled:this.attr.autoplayDisabled,eventData:{scribeContext:{component:"tweet_box_dialog"}},modal:!0,environment:this.attr.environment,videoSupport:!0}),this.tweetBoxReady=!0);if(b){var d=null;b.screenNames?d=b.screenNames:b.screenName&&(d=[b.screenName]),d&&(b.defaultText="@"+d.join(" @")+" ",b.condensedText=_('Reply to {{screenNames}}',{screenNames:b.defaultText})),b.text&&(b.defaultText=" "+b.text),this.trigger(document,"uiOverrideTweetBoxOptions",b)}this.open(),c.trigger("uiTweetBoxOpened",{mode:b&&b.mode})},this.setTitle=function(a){this.select("modalTitleSelector").text(a)},this.updateTitle=function(a,b){b&&b.title&&this.setTitle(b.title)},this.prepareTweetBox=function(){this.select("tweetBoxSelector").trigger("uiComposerResetAndFocus")},this.preventDefaultDialogFocus=function(a){this.isOpen()&&this.$dialog.is(a.target)&&a.preventDefault()},this.triggerTweetDialogClosedEvent=function(){this.trigger(document,"uiTweetDialogClosed")},this.after("initialize",function(){this.on(document,"uiDialogInitialFocus",this.preventDefaultDialogFocus),this.on(document,"uiShortcutShowTweetbox",this.openGlobalTweetDialog),this.on(document,"uiOpenTweetDialog",this.openTweetDialog),this.on(document,"uiOpenReplyDialog",this.openReply),this.on("uiTweetSent",this.close),this.on("uiDialogOpened",this.prepareTweetBox),this.on("uiDialogClosed",this.removeTweet),this.on("uiDialogClosed",this.triggerTweetDialogClosedEvent),this.on("uiDialogUpdateTitle",this.updateTitle)})}var defineComponent=require("core/component"),utils=require("core/utils"),withDialog=require("app/ui/with_dialog"),withModalTweet=require("app/ui/dialogs/with_modal_tweet"),_=require("core/i18n"),TweetDialog=defineComponent(tweetDialog,withDialog,withModalTweet);module.exports=TweetDialog
  });
  define("app/utils/user_dom_data",["module","require","exports"],function(module, require, exports) {
  var userDomData={getId:function(a){return a.attr("data-user-id")},getName:function(a){return a.data("name")},getScreenName:function(a){return a.data("screen-name")}};module.exports=userDomData
  });
  define("app/ui/new_tweet_button",["module","require","exports","core/component","app/data/with_scribe","app/utils/user_dom_data"],function(module, require, exports) {
  function newTweetButton(){this.defaultAttrs({draftTweetIdAttr:"draft-tweet-id",dialogTitleAttr:"dialog-title",cursorPositionAttr:"cursor-position",canTweetDefaultTextAttr:"can-tweet-default-text",defaultTextAttr:"default-text"}),this.openTweetDialog=function(){this.scribe({element:"tweet_button",action:"click"},this.attr.eventData),this.trigger("uiOpenTweetDialog",this.tweetDialogData())},this.tweetDialogData=function(){return{draftTweetId:this.$node.data(this.attr.draftTweetIdAttr)||"global",screenName:userDomDataUtil.getScreenName(this.$node),canTweetDefaultText:this.$node.data(this.attr.canTweetDefaultTextAttr),cursorPosition:this.$node.data(this.attr.cursorPositionAttr),title:this.$node.data(this.attr.dialogTitleAttr),text:this.$node.data(this.attr.defaultTextAttr)}},this.after("initialize",function(){this.on("click",this.openTweetDialog)})}var defineComponent=require("core/component"),withScribe=require("app/data/with_scribe"),userDomDataUtil=require("app/utils/user_dom_data");module.exports=defineComponent(newTweetButton,withScribe)
  });
  define("app/data/tweet_box_scribe",["module","require","exports","core/component","app/data/with_scribe"],function(module, require, exports) {
  function tweetBoxScribe(){var a={tweet_box:{uiTweetboxTweetError:"failure",uiTweetboxTweetSuccess:"send_tweet",uiTweetboxGeotaggedTweetSuccess:"send_geotagged_tweet",uiTweetboxPhotoTweetSuccess:"send_photo_tweet",uiTweetboxPollTweetSuccess:"send_poll_tweet",uiTweetboxVideoTweetSuccess:"send_video_tweet",uiTweetboxProVideoTweetSuccess:"send_pro_video_tweet",uiTweetboxReplySuccess:"send_reply",uiTweetboxDMSuccess:"send_dm",uiOpenTweetDialog:"compose_tweet"},local:{uiTweetboxLocalGifTweetSuccess:"send_gif_tweet"},remote:{uiTweetboxRemoteGifTweetSuccess:"send_gif_tweet"},image_picker:{uiImagePickerClick:"click",uiImagePickerAdd:"add",uiImagePickerRemove:"remove",uiImagePickerError:"error",uiImagePickerNoFileReaderError:"no_file_reader",uiImagePickerSelectedFlash:"selected_flash",uiDrop:"drag_and_drop",uiVideoPickerAdd:"add_video",uiVideoPickerProAdd:"add_pro_video"},found_media_category:{uiFoundMediaCategoryImpression:"impression",uiFoundMediaCategorySelect:"select",uiFoundMediaCategoryAdd:"add",uiFoundMediaCategoryError:"error",uiFoundMediaCategoryCancel:"cancel"},found_media_gallery:{uiFoundMediaGalleryImpression:"impression"},found_media_trend:{uiFoundMediaTrendImpression:"impression",uiFoundMediaTrendSelect:"select",uiFoundMediaTrendAdd:"add",uiFoundMediaTrendError:"error",uiFoundMediaTrendCancel:"cancel"},geo_picker:{uiGeoPickerOffer:"offer",uiGeoPickerEnable:"enable",uiGeoPickerOpen:"open",uiGeoPickerTurnOn:"on",uiGeoPickerTurnOff:"off",uiGeoPickerChange:"select",uiGeoPickerInteraction:"focus_field",uiGeoPickerSendTweet:"send_tweet_geo_interaction"},lifeline_alerts:{uiLifelineAlertsSelect:"select",uiLifelineAlertsImpression:"impression",uiLifelineAlertsTweet:"tweet",uiLifelineAlertsCancel:"cancel"},add_poll:{uiActivatePollComposer:"click"},remove_poll:{uiDeactivatePollComposer:"click"},add_poll_option:{uiAddPollOption:"click"},remove_poll_option:{uiRemovePollOption:"click"}};this.after("initialize",function(){Object.keys(a).forEach(function(b){Object.keys(a[b]).forEach(function(c){this.scribeOnEvent(c,{element:b,action:a[b][c]})}.bind(this))}.bind(this))})}var defineComponent=require("core/component"),withScribe=require("app/data/with_scribe");module.exports=defineComponent(tweetBoxScribe,withScribe)
  });
  define("app/ui/compose/with_condensing",["module","require","exports"],function(module, require, exports) {
  function withCondensing(){this.defaultAttrs({condensable:!1,condensedClass:"condensed"}),this.isCondensed=function(){return this.attr.condensable&&this.$node.hasClass(this.attr.condensedClass)},this.canBeCondensed=function(){return this.attr.condensable&&!this.$node.hasClass(this.attr.condensedClass)},this.isWithinContainer=function(a){return $.contains(this.containerElement,a)},this.expand=function(a){this.isCondensed()&&(this.$node.removeClass(this.attr.condensedClass),this.trigger("uiTweetBoxExpanded"),a&&this.trigger("uiComposerResetAndFocus"))},this.getCondensedText=function(){return this.condensedText===undefined&&(this.condensedText=this.attr.condensedText!==undefined?this.attr.condensedText:this.$node.attr("data-condensed-text")||""),this.condensedText},this.condense=function(){this.$node.addClass(this.attr.condensedClass),this.$text.blur(),this.resetTweetText(),this.trigger("uiTweetBoxCondensed")},this.condenseIfNotActive=function(){setTimeout(function(){this.canBeCondensed()&&!this.isWithinContainer(document.activeElement)&&(this.detectUpdatedText(),this.trigger("uiHideAutocomplete"),this.isEmpty()&&this.condense())}.bind(this),0)},this.condenseOnMouseDown=function(a){this.canBeCondensed()&&(this.checkCondenseOnMouseUp=!0)},this.condenseOnMouseUp=function(){this.checkCondenseOnMouseUp&&(this.checkCondenseOnMouseUp=!1,this.condenseIfNotActive())},this.condenseOnFocusOut=function(){this.checkCondenseOnMouseUp||this.condenseIfNotActive()},this.expandOnFocusIn=function(){this.expand(!0)},this.around("resetTweetText",function(a){this.isCondensed()?this.setVisibleText(this.getCondensedText()):a()}),this.around("isEmpty",function(a){return this.isCondensed()&&this.getVisibleText().trim()===this.getCondensedText().trim()||a()}),this.after("clear",function(){this.canBeCondensed()&&this.condense()}),this.after("initialize",function(){this.containerElement=$(this.attr.condenseContainer||this.$node)[0];if(this.attr.condensable){this.on(this.$text,"focusin",this.ignoreDuringFakeFocus(this.expandOnFocusIn)),this.on(this.containerElement,"focusout",this.ignoreDuringFakeFocus(this.condenseOnFocusOut)),this.on(document,"mousedown",this.condenseOnMouseDown),this.on(document,"mouseup",this.condenseOnMouseUp);var a=this.hasFocus();if(a){var b=this.getVisibleText(),c=this.getCondensedText();c&&!b.indexOf(c)&&this.setVisibleText(b.replace(c,this.getDefaultText()))}(a||!this.isEmpty())&&this.expand(!1)}})}module.exports=withCondensing
  });
  define("app/ui/compose/with_dm_mode",["module","require","exports","core/i18n"],function(module, require, exports) {
  function withDmMode(){this.hasValidDMContent=function(){return!!this.dmText&&VALID_USER_REGEX.test(this.dmUsername)},this.around("hasValidContent",function(a){return this.dmMode?this.hasValidDMContent():a()}),this.before("updateTweetStateOnTextChanged",function(a){var b=this.getVisibleText().match(DM_REGEX),c=b&&b[1].replace(INVALID_COMMAND_CHARS_REGEX,"").toLowerCase();this.dmCommands.indexOf(c)<0&&(b=null);var d=b&&b[2];this.dmText=b&&b[3],b&&(!this.dmMode||this.dmMode&&this.dmUsername!=d)?(this.dmMode=!0,this.dmUsername=d,this.trigger("uiDialogUpdateTitle",{title:_('Message @{{username}}',{username:d})})):this.dmMode&&!b&&(this.dmMode=!1,this.dmUsername=undefined,this.trigger("uiDialogUpdateTitle",{title:_('Compose new Tweet')})),this.select("tweetActionSelector").toggleClass(this.attr.messagingClass,this.dmMode)}),this.before("initialize",function(){this.dmMode=!1;var a=$("html").attr("lang"),b={ar:"رخ",es:"md",fa:"پیام",fi:"yksityisviesti",fr:"mp",he:"הפ",id:"pl",it:"md",ja:"ダイレクトメッセージ",ko:"쪽지",nl:"pb",pl:"pw",pt:"md",ru:"лс",ur:"ڈم","zh-cn":"私信"}[a];this.dmCommands=["d","m","dm",b].filter(Boolean)})}var _=require("core/i18n");module.exports=withDmMode;var DM_REGEX=/^\s*(\S+)\s+[@＠]?(\S+)\s*(.*)/i,INVALID_COMMAND_CHARS_REGEX=/[`~$%^&()_\-+={}\[\]|;"'<,>.?/]/g,VALID_USER_REGEX=/^(\w{1,20})$/
  });
  define("app/ui/with_allow_teardown",["module","require","exports"],function(module, require, exports) {
  function withAllowTeardown(){this.allowTeardown=function(a,b){this.attr.noTeardown=!1},this.after("initialize",function(){this.on("uiAllowTeardown",this.allowTeardown)})}module.exports=withAllowTeardown
  });
  /*!
   * twitter-text-js v1.13.4
   *
   * Copyright 2012 Twitter, Inc.
   *
   * Licensed under the Apache License, Version 2.0 (the "License");
   * you may not use this work except in compliance with the License.
   * You may obtain a copy of the License at:
   *
   *    http://www.apache.org/licenses/LICENSE-2.0
   */(function(){function c(b,c){return c=c||"",typeof b!="string"&&(b.global&&c.indexOf("g")<0&&(c+="g"),b.ignoreCase&&c.indexOf("i")<0&&(c+="i"),b.multiline&&c.indexOf("m")<0&&(c+="m"),b=b.source),new RegExp(b.replace(/#\{(\w+)\}/g,function(b,c){var d=a.txt.regexen[c]||"";return typeof d!="string"&&(d=d.source),d}),c)}function d(a,b){return a.replace(/#\{(\w+)\}/g,function(a,c){return b[c]||""})}function e(a,b,c){var d=String.fromCharCode(b);return c!==b&&(d+="-"+String.fromCharCode(c)),a.push(d),a}function s(a){var b={};for(var c in a)a.hasOwnProperty(c)&&(b[c]=a[c]);return b}function w(a,b,c){return c?!a||a.match(b)&&RegExp["$&"]===a:typeof a=="string"&&a.match(b)&&RegExp["$&"]===a}if(typeof a=="undefined"||a===null)var a={};a.txt={},a.txt.regexen={};var b={"&":"&amp;",">":"&gt;","<":"&lt;",'"':"&quot;","'":"&#39;"};a.txt.htmlEscape=function(a){return a&&a.replace(/[&"'><]/g,function(a){return b[a]})},a.txt.regexSupplant=c,a.txt.stringSupplant=d,a.txt.addCharsToCharClass=e;var f=String.fromCharCode,g=[f(32),f(133),f(160),f(5760),f(6158),f(8232),f(8233),f(8239),f(8287),f(12288)];e(g,9,13),e(g,8192,8202);var h=[f(65534),f(65279),f(65535)];e(h,8234,8238),a.txt.regexen.spaces_group=c(g.join("")),a.txt.regexen.spaces=c("["+g.join("")+"]"),a.txt.regexen.invalid_chars_group=c(h.join("")),a.txt.regexen.punct=/\!'#%&'\(\)*\+,\\\-\.\/:;<=>\?@\[\]\^_{|}~\$/,a.txt.regexen.rtl_chars=/[\u0600-\u06FF]|[\u0750-\u077F]|[\u0590-\u05FF]|[\uFE70-\uFEFF]/gm,a.txt.regexen.non_bmp_code_pairs=/[\uD800-\uDBFF][\uDC00-\uDFFF]/gm;var i=[];e(i,192,214),e(i,216,246),e(i,248,255),e(i,256,591),e(i,595,596),e(i,598,599),e(i,601,601),e(i,603,603),e(i,611,611),e(i,616,616),e(i,623,623),e(i,626,626),e(i,649,649),e(i,651,651),e(i,699,699),e(i,768,879),e(i,7680,7935),a.txt.regexen.latinAccentChars=c(i.join(""));var j=/A-Za-z\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u052F\u0531-\u0556\u0559\u0561-\u0587\u05D0-\u05EA\u05F0-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u08A0-\u08B2\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0980\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D\u0C58\u0C59\u0C60\u0C61\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D60\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F4\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16F1-\u16F8\u1700-\u170C\u170E-\u1711\u1720-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u1820-\u1877\u1880-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191E\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19C1-\u19C7\u1A00-\u1A16\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4B\u1B83-\u1BA0\u1BAE\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1CE9-\u1CEC\u1CEE-\u1CF1\u1CF5\u1CF6\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2183\u2184\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2E2F\u3005\u3006\u3031-\u3035\u303B\u303C\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312D\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FCC\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA69D\uA6A0-\uA6E5\uA717-\uA71F\uA722-\uA788\uA78B-\uA78E\uA790-\uA7AD\uA7B0\uA7B1\uA7F7-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uA9E0-\uA9E4\uA9E6-\uA9EF\uA9FA-\uA9FE\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA7E-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB5F\uAB64\uAB65\uABC0-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC\u0300-\u036F\u0483-\u0489\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u0610-\u061A\u064B-\u065F\u0670\u06D6-\u06DC\u06DF-\u06E4\u06E7\u06E8\u06EA-\u06ED\u0711\u0730-\u074A\u07A6-\u07B0\u07EB-\u07F3\u0816-\u0819\u081B-\u0823\u0825-\u0827\u0829-\u082D\u0859-\u085B\u08E4-\u0903\u093A-\u093C\u093E-\u094F\u0951-\u0957\u0962\u0963\u0981-\u0983\u09BC\u09BE-\u09C4\u09C7\u09C8\u09CB-\u09CD\u09D7\u09E2\u09E3\u0A01-\u0A03\u0A3C\u0A3E-\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A70\u0A71\u0A75\u0A81-\u0A83\u0ABC\u0ABE-\u0AC5\u0AC7-\u0AC9\u0ACB-\u0ACD\u0AE2\u0AE3\u0B01-\u0B03\u0B3C\u0B3E-\u0B44\u0B47\u0B48\u0B4B-\u0B4D\u0B56\u0B57\u0B62\u0B63\u0B82\u0BBE-\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCD\u0BD7\u0C00-\u0C03\u0C3E-\u0C44\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C62\u0C63\u0C81-\u0C83\u0CBC\u0CBE-\u0CC4\u0CC6-\u0CC8\u0CCA-\u0CCD\u0CD5\u0CD6\u0CE2\u0CE3\u0D01-\u0D03\u0D3E-\u0D44\u0D46-\u0D48\u0D4A-\u0D4D\u0D57\u0D62\u0D63\u0D82\u0D83\u0DCA\u0DCF-\u0DD4\u0DD6\u0DD8-\u0DDF\u0DF2\u0DF3\u0E31\u0E34-\u0E3A\u0E47-\u0E4E\u0EB1\u0EB4-\u0EB9\u0EBB\u0EBC\u0EC8-\u0ECD\u0F18\u0F19\u0F35\u0F37\u0F39\u0F3E\u0F3F\u0F71-\u0F84\u0F86\u0F87\u0F8D-\u0F97\u0F99-\u0FBC\u0FC6\u102B-\u103E\u1056-\u1059\u105E-\u1060\u1062-\u1064\u1067-\u106D\u1071-\u1074\u1082-\u108D\u108F\u109A-\u109D\u135D-\u135F\u1712-\u1714\u1732-\u1734\u1752\u1753\u1772\u1773\u17B4-\u17D3\u17DD\u180B-\u180D\u18A9\u1920-\u192B\u1930-\u193B\u19B0-\u19C0\u19C8\u19C9\u1A17-\u1A1B\u1A55-\u1A5E\u1A60-\u1A7C\u1A7F\u1AB0-\u1ABE\u1B00-\u1B04\u1B34-\u1B44\u1B6B-\u1B73\u1B80-\u1B82\u1BA1-\u1BAD\u1BE6-\u1BF3\u1C24-\u1C37\u1CD0-\u1CD2\u1CD4-\u1CE8\u1CED\u1CF2-\u1CF4\u1CF8\u1CF9\u1DC0-\u1DF5\u1DFC-\u1DFF\u20D0-\u20F0\u2CEF-\u2CF1\u2D7F\u2DE0-\u2DFF\u302A-\u302F\u3099\u309A\uA66F-\uA672\uA674-\uA67D\uA69F\uA6F0\uA6F1\uA802\uA806\uA80B\uA823-\uA827\uA880\uA881\uA8B4-\uA8C4\uA8E0-\uA8F1\uA926-\uA92D\uA947-\uA953\uA980-\uA983\uA9B3-\uA9C0\uA9E5\uAA29-\uAA36\uAA43\uAA4C\uAA4D\uAA7B-\uAA7D\uAAB0\uAAB2-\uAAB4\uAAB7\uAAB8\uAABE\uAABF\uAAC1\uAAEB-\uAAEF\uAAF5\uAAF6\uABE3-\uABEA\uABEC\uABED\uFB1E\uFE00-\uFE0F\uFE20-\uFE2D/.source,k=/0-9\u0660-\u0669\u06F0-\u06F9\u07C0-\u07C9\u0966-\u096F\u09E6-\u09EF\u0A66-\u0A6F\u0AE6-\u0AEF\u0B66-\u0B6F\u0BE6-\u0BEF\u0C66-\u0C6F\u0CE6-\u0CEF\u0D66-\u0D6F\u0DE6-\u0DEF\u0E50-\u0E59\u0ED0-\u0ED9\u0F20-\u0F29\u1040-\u1049\u1090-\u1099\u17E0-\u17E9\u1810-\u1819\u1946-\u194F\u19D0-\u19D9\u1A80-\u1A89\u1A90-\u1A99\u1B50-\u1B59\u1BB0-\u1BB9\u1C40-\u1C49\u1C50-\u1C59\uA620-\uA629\uA8D0-\uA8D9\uA900-\uA909\uA9D0-\uA9D9\uA9F0-\uA9F9\uAA50-\uAA59\uABF0-\uABF9\uFF10-\uFF19/.source,l=/_\u200c\u200d\ua67e\u05be\u05f3\u05f4\uff5e\u301c\u309b\u309c\u30a0\u30fb\u3003\u0f0b\u0f0c\u00b7/.source;a.txt.regexen.hashSigns=/[#＃]/,a.txt.regexen.hashtagAlpha=new RegExp("["+j+"]"),a.txt.regexen.hashtagAlphaNumeric=new RegExp("["+j+k+l+"]"),a.txt.regexen.endHashtagMatch=c(/^(?:#{hashSigns}|:\/\/)/),a.txt.regexen.hashtagBoundary=new RegExp("(?:^|$|[^&"+j+k+l+"])"),a.txt.regexen.validHashtag=c(/(#{hashtagBoundary})(#{hashSigns})(?!\ufe0f|\u20e3)(#{hashtagAlphaNumeric}*#{hashtagAlpha}#{hashtagAlphaNumeric}*)/gi),a.txt.regexen.validMentionPrecedingChars=/(?:^|[^a-zA-Z0-9_!#$%&*@＠]|(?:^|[^a-zA-Z0-9_+~.-])(?:rt|RT|rT|Rt):?)/,a.txt.regexen.atSigns=/[@＠]/,a.txt.regexen.validMentionOrList=c("(#{validMentionPrecedingChars})(#{atSigns})([a-zA-Z0-9_]{1,20})(/[a-zA-Z][a-zA-Z0-9_-]{0,24})?","g"),a.txt.regexen.validReply=c(/^(?:#{spaces})*#{atSigns}([a-zA-Z0-9_]{1,20})/),a.txt.regexen.endMentionMatch=c(/^(?:#{atSigns}|[#{latinAccentChars}]|:\/\/)/),a.txt.regexen.validUrlPrecedingChars=c(/(?:[^A-Za-z0-9@＠$#＃#{invalid_chars_group}]|^)/),a.txt.regexen.invalidUrlWithoutProtocolPrecedingChars=/[-_.\/]$/,a.txt.regexen.invalidDomainChars=d("#{punct}#{spaces_group}#{invalid_chars_group}",a.txt.regexen),a.txt.regexen.validDomainChars=c(/[^#{invalidDomainChars}]/),a.txt.regexen.validSubdomain=c(/(?:(?:#{validDomainChars}(?:[_-]|#{validDomainChars})*)?#{validDomainChars}\.)/),a.txt.regexen.validDomainName=c(/(?:(?:#{validDomainChars}(?:-|#{validDomainChars})*)?#{validDomainChars}\.)/),a.txt.regexen.validGTLD=c(RegExp("(?:(?:abb|abbott|abogado|academy|accenture|accountant|accountants|aco|active|actor|ads|adult|aeg|aero|afl|agency|aig|airforce|airtel|allfinanz|alsace|amsterdam|android|apartments|app|aquarelle|archi|army|arpa|asia|associates|attorney|auction|audio|auto|autos|axa|azure|band|bank|bar|barcelona|barclaycard|barclays|bargains|bauhaus|bayern|bbc|bbva|bcn|beer|bentley|berlin|best|bet|bharti|bible|bid|bike|bing|bingo|bio|biz|black|blackfriday|bloomberg|blue|bmw|bnl|bnpparibas|boats|bond|boo|boots|boutique|bradesco|bridgestone|broker|brother|brussels|budapest|build|builders|business|buzz|bzh|cab|cafe|cal|camera|camp|cancerresearch|canon|capetown|capital|caravan|cards|care|career|careers|cars|cartier|casa|cash|casino|cat|catering|cba|cbn|ceb|center|ceo|cern|cfa|cfd|chanel|channel|chat|cheap|chloe|christmas|chrome|church|cisco|citic|city|claims|cleaning|click|clinic|clothing|cloud|club|coach|codes|coffee|college|cologne|com|commbank|community|company|computer|condos|construction|consulting|contractors|cooking|cool|coop|corsica|country|coupons|courses|credit|creditcard|cricket|crown|crs|cruises|cuisinella|cymru|cyou|dabur|dad|dance|date|dating|datsun|day|dclk|deals|degree|delivery|delta|democrat|dental|dentist|desi|design|dev|diamonds|diet|digital|direct|directory|discount|dnp|docs|dog|doha|domains|doosan|download|drive|durban|dvag|earth|eat|edu|education|email|emerck|energy|engineer|engineering|enterprises|epson|equipment|erni|esq|estate|eurovision|eus|events|everbank|exchange|expert|exposed|express|fage|fail|faith|family|fan|fans|farm|fashion|feedback|film|finance|financial|firmdale|fish|fishing|fit|fitness|flights|florist|flowers|flsmidth|fly|foo|football|forex|forsale|forum|foundation|frl|frogans|fund|furniture|futbol|fyi|gal|gallery|game|garden|gbiz|gdn|gent|genting|ggee|gift|gifts|gives|giving|glass|gle|global|globo|gmail|gmo|gmx|gold|goldpoint|golf|goo|goog|google|gop|gov|graphics|gratis|green|gripe|group|guge|guide|guitars|guru|hamburg|hangout|haus|healthcare|help|here|hermes|hiphop|hitachi|hiv|hockey|holdings|holiday|homedepot|homes|honda|horse|host|hosting|hoteles|hotmail|house|how|hsbc|ibm|icbc|ice|icu|ifm|iinet|immo|immobilien|industries|infiniti|info|ing|ink|institute|insure|int|international|investments|ipiranga|irish|ist|istanbul|itau|iwc|java|jcb|jetzt|jewelry|jlc|jll|jobs|joburg|jprs|juegos|kaufen|kddi|kim|kitchen|kiwi|koeln|komatsu|krd|kred|kyoto|lacaixa|lancaster|land|lasalle|lat|latrobe|law|lawyer|lds|lease|leclerc|legal|lexus|lgbt|liaison|lidl|life|lighting|limited|limo|link|live|lixil|loan|loans|lol|london|lotte|lotto|love|ltda|lupin|luxe|luxury|madrid|maif|maison|man|management|mango|market|marketing|markets|marriott|mba|media|meet|melbourne|meme|memorial|men|menu|miami|microsoft|mil|mini|mma|mobi|moda|moe|mom|monash|money|montblanc|mormon|mortgage|moscow|motorcycles|mov|movie|movistar|mtn|mtpc|museum|nadex|nagoya|name|navy|nec|net|netbank|network|neustar|new|news|nexus|ngo|nhk|nico|ninja|nissan|nokia|nra|nrw|ntt|nyc|office|okinawa|omega|one|ong|onl|online|ooo|oracle|orange|org|organic|osaka|otsuka|ovh|page|panerai|paris|partners|parts|party|pet|pharmacy|philips|photo|photography|photos|physio|piaget|pics|pictet|pictures|pink|pizza|place|play|plumbing|plus|pohl|poker|porn|post|praxi|press|pro|prod|productions|prof|properties|property|pub|qpon|quebec|racing|realtor|realty|recipes|red|redstone|rehab|reise|reisen|reit|ren|rent|rentals|repair|report|republican|rest|restaurant|review|reviews|rich|ricoh|rio|rip|rocks|rodeo|rsvp|ruhr|run|ryukyu|saarland|sakura|sale|samsung|sandvik|sandvikcoromant|sanofi|sap|sarl|saxo|sca|scb|schmidt|scholarships|school|schule|schwarz|science|scor|scot|seat|seek|sener|services|sew|sex|sexy|shiksha|shoes|show|shriram|singles|site|ski|sky|skype|sncf|soccer|social|software|sohu|solar|solutions|sony|soy|space|spiegel|spreadbetting|srl|starhub|statoil|studio|study|style|sucks|supplies|supply|support|surf|surgery|suzuki|swatch|swiss|sydney|systems|taipei|tatamotors|tatar|tattoo|tax|taxi|team|tech|technology|tel|telefonica|temasek|tennis|thd|theater|tickets|tienda|tips|tires|tirol|today|tokyo|tools|top|toray|toshiba|tours|town|toyota|toys|trade|trading|training|travel|trust|tui|ubs|university|uno|uol|vacations|vegas|ventures|vermögensberater|vermögensberatung|versicherung|vet|viajes|video|villas|vin|vision|vista|vistaprint|vlaanderen|vodka|vote|voting|voto|voyage|wales|walter|wang|watch|webcam|website|wed|wedding|weir|whoswho|wien|wiki|williamhill|win|windows|wine|wme|work|works|world|wtc|wtf|xbox|xerox|xin|xperia|xxx|xyz|yachts|yandex|yodobashi|yoga|yokohama|youtube|zip|zone|zuerich|дети|ком|москва|онлайн|орг|рус|сайт|קום|بازار|شبكة|كوم|موقع|कॉम|नेट|संगठन|คอม|みんな|グーグル|コム|世界|中信|中文网|企业|佛山|信息|健康|八卦|公司|公益|商城|商店|商标|在线|大拿|娱乐|工行|广东|慈善|我爱你|手机|政务|政府|新闻|时尚|机构|淡马锡|游戏|点看|移动|组织机构|网址|网店|网络|谷歌|集团|飞利浦|餐厅|닷넷|닷컴|삼성|onion)(?=[^0-9a-zA-Z@]|$))")),a.txt.regexen.validCCTLD=c(RegExp("(?:(?:ac|ad|ae|af|ag|ai|al|am|an|ao|aq|ar|as|at|au|aw|ax|az|ba|bb|bd|be|bf|bg|bh|bi|bj|bl|bm|bn|bo|bq|br|bs|bt|bv|bw|by|bz|ca|cc|cd|cf|cg|ch|ci|ck|cl|cm|cn|co|cr|cu|cv|cw|cx|cy|cz|de|dj|dk|dm|do|dz|ec|ee|eg|eh|er|es|et|eu|fi|fj|fk|fm|fo|fr|ga|gb|gd|ge|gf|gg|gh|gi|gl|gm|gn|gp|gq|gr|gs|gt|gu|gw|gy|hk|hm|hn|hr|ht|hu|id|ie|il|im|in|io|iq|ir|is|it|je|jm|jo|jp|ke|kg|kh|ki|km|kn|kp|kr|kw|ky|kz|la|lb|lc|li|lk|lr|ls|lt|lu|lv|ly|ma|mc|md|me|mf|mg|mh|mk|ml|mm|mn|mo|mp|mq|mr|ms|mt|mu|mv|mw|mx|my|mz|na|nc|ne|nf|ng|ni|nl|no|np|nr|nu|nz|om|pa|pe|pf|pg|ph|pk|pl|pm|pn|pr|ps|pt|pw|py|qa|re|ro|rs|ru|rw|sa|sb|sc|sd|se|sg|sh|si|sj|sk|sl|sm|sn|so|sr|ss|st|su|sv|sx|sy|sz|tc|td|tf|tg|th|tj|tk|tl|tm|tn|to|tp|tr|tt|tv|tw|tz|ua|ug|uk|um|us|uy|uz|va|vc|ve|vg|vi|vn|vu|wf|ws|ye|yt|za|zm|zw|ελ|бел|мкд|мон|рф|срб|укр|қаз|հայ|الاردن|الجزائر|السعودية|المغرب|امارات|ایران|بھارت|تونس|سودان|سورية|عراق|عمان|فلسطين|قطر|مصر|مليسيا|پاکستان|भारत|বাংলা|ভারত|ਭਾਰਤ|ભારત|இந்தியா|இலங்கை|சிங்கப்பூர்|భారత్|ලංකා|ไทย|გე|中国|中國|台湾|台灣|新加坡|澳門|香港|한국)(?=[^0-9a-zA-Z@]|$))")),a.txt.regexen.validPunycode=c(/(?:xn--[0-9a-z]+)/),a.txt.regexen.validSpecialCCTLD=c(RegExp("(?:(?:co|tv)(?=[^0-9a-zA-Z@]|$))")),a.txt.regexen.validDomain=c(/(?:#{validSubdomain}*#{validDomainName}(?:#{validGTLD}|#{validCCTLD}|#{validPunycode}))/),a.txt.regexen.validAsciiDomain=c(/(?:(?:[\-a-z0-9#{latinAccentChars}]+)\.)+(?:#{validGTLD}|#{validCCTLD}|#{validPunycode})/gi),a.txt.regexen.invalidShortDomain=c(/^#{validDomainName}#{validCCTLD}$/i),a.txt.regexen.validSpecialShortDomain=c(/^#{validDomainName}#{validSpecialCCTLD}$/i),a.txt.regexen.validPortNumber=c(/[0-9]+/),a.txt.regexen.cyrillicLettersAndMarks=c(/\u0400-\u04FF/),a.txt.regexen.validGeneralUrlPathChars=c(/[a-z#{cyrillicLettersAndMarks}0-9!\*';:=\+,\.\$\/%#\[\]\-_~@\|&#{latinAccentChars}]/i),a.txt.regexen.validUrlBalancedParens=c("\\((?:#{validGeneralUrlPathChars}+|(?:#{validGeneralUrlPathChars}*\\(#{validGeneralUrlPathChars}+\\)#{validGeneralUrlPathChars}*))\\)","i"),a.txt.regexen.validUrlPathEndingChars=c(/[\+\-a-z#{cyrillicLettersAndMarks}0-9=_#\/#{latinAccentChars}]|(?:#{validUrlBalancedParens})/i),a.txt.regexen.validUrlPath=c("(?:(?:#{validGeneralUrlPathChars}*(?:#{validUrlBalancedParens}#{validGeneralUrlPathChars}*)*#{validUrlPathEndingChars})|(?:@#{validGeneralUrlPathChars}+/))","i"),a.txt.regexen.validUrlQueryChars=/[a-z0-9!?\*'@\(\);:&=\+\$\/%#\[\]\-_\.,~|]/i,a.txt.regexen.validUrlQueryEndingChars=/[a-z0-9_&=#\/]/i,a.txt.regexen.extractUrl=c("((#{validUrlPrecedingChars})((https?:\\/\\/)?(#{validDomain})(?::(#{validPortNumber}))?(\\/#{validUrlPath}*)?(\\?#{validUrlQueryChars}*#{validUrlQueryEndingChars})?))","gi"),a.txt.regexen.validTcoUrl=/^https?:\/\/t\.co\/[a-z0-9]+/i,a.txt.regexen.urlHasProtocol=/^https?:\/\//i,a.txt.regexen.urlHasHttps=/^https:\/\//i,a.txt.regexen.cashtag=/[a-z]{1,6}(?:[._][a-z]{1,2})?/i,a.txt.regexen.validCashtag=c("(^|#{spaces})(\\$)(#{cashtag})(?=$|\\s|[#{punct}])","gi"),a.txt.regexen.validateUrlUnreserved=/[a-z\u0400-\u04FF0-9\-._~]/i,a.txt.regexen.validateUrlPctEncoded=/(?:%[0-9a-f]{2})/i,a.txt.regexen.validateUrlSubDelims=/[!$&'()*+,;=]/i,a.txt.regexen.validateUrlPchar=c("(?:#{validateUrlUnreserved}|#{validateUrlPctEncoded}|#{validateUrlSubDelims}|[:|@])","i"),a.txt.regexen.validateUrlScheme=/(?:[a-z][a-z0-9+\-.]*)/i,a.txt.regexen.validateUrlUserinfo=c("(?:#{validateUrlUnreserved}|#{validateUrlPctEncoded}|#{validateUrlSubDelims}|:)*","i"),a.txt.regexen.validateUrlDecOctet=/(?:[0-9]|(?:[1-9][0-9])|(?:1[0-9]{2})|(?:2[0-4][0-9])|(?:25[0-5]))/i,a.txt.regexen.validateUrlIpv4=c(/(?:#{validateUrlDecOctet}(?:\.#{validateUrlDecOctet}){3})/i),a.txt.regexen.validateUrlIpv6=/(?:\[[a-f0-9:\.]+\])/i,a.txt.regexen.validateUrlIp=c("(?:#{validateUrlIpv4}|#{validateUrlIpv6})","i"),a.txt.regexen.validateUrlSubDomainSegment=/(?:[a-z0-9](?:[a-z0-9_\-]*[a-z0-9])?)/i,a.txt.regexen.validateUrlDomainSegment=/(?:[a-z0-9](?:[a-z0-9\-]*[a-z0-9])?)/i,a.txt.regexen.validateUrlDomainTld=/(?:[a-z](?:[a-z0-9\-]*[a-z0-9])?)/i,a.txt.regexen.validateUrlDomain=c(/(?:(?:#{validateUrlSubDomainSegment]}\.)*(?:#{validateUrlDomainSegment]}\.)#{validateUrlDomainTld})/i),a.txt.regexen.validateUrlHost=c("(?:#{validateUrlIp}|#{validateUrlDomain})","i"),a.txt.regexen.validateUrlUnicodeSubDomainSegment=/(?:(?:[a-z0-9]|[^\u0000-\u007f])(?:(?:[a-z0-9_\-]|[^\u0000-\u007f])*(?:[a-z0-9]|[^\u0000-\u007f]))?)/i,a.txt.regexen.validateUrlUnicodeDomainSegment=/(?:(?:[a-z0-9]|[^\u0000-\u007f])(?:(?:[a-z0-9\-]|[^\u0000-\u007f])*(?:[a-z0-9]|[^\u0000-\u007f]))?)/i,a.txt.regexen.validateUrlUnicodeDomainTld=/(?:(?:[a-z]|[^\u0000-\u007f])(?:(?:[a-z0-9\-]|[^\u0000-\u007f])*(?:[a-z0-9]|[^\u0000-\u007f]))?)/i,a.txt.regexen.validateUrlUnicodeDomain=c(/(?:(?:#{validateUrlUnicodeSubDomainSegment}\.)*(?:#{validateUrlUnicodeDomainSegment}\.)#{validateUrlUnicodeDomainTld})/i),a.txt.regexen.validateUrlUnicodeHost=c("(?:#{validateUrlIp}|#{validateUrlUnicodeDomain})","i"),a.txt.regexen.validateUrlPort=/[0-9]{1,5}/,a.txt.regexen.validateUrlUnicodeAuthority=c("(?:(#{validateUrlUserinfo})@)?(#{validateUrlUnicodeHost})(?::(#{validateUrlPort}))?","i"),a.txt.regexen.validateUrlAuthority=c("(?:(#{validateUrlUserinfo})@)?(#{validateUrlHost})(?::(#{validateUrlPort}))?","i"),a.txt.regexen.validateUrlPath=c(/(\/#{validateUrlPchar}*)*/i),a.txt.regexen.validateUrlQuery=c(/(#{validateUrlPchar}|\/|\?)*/i),a.txt.regexen.validateUrlFragment=c(/(#{validateUrlPchar}|\/|\?)*/i),a.txt.regexen.validateUrlUnencoded=c("^(?:([^:/?#]+):\\/\\/)?([^/?#]*)([^?#]*)(?:\\?([^#]*))?(?:#(.*))?$","i");var m="tweet-url list-slug",n="tweet-url username",o="tweet-url hashtag",p="tweet-url cashtag",q={urlClass:!0,listClass:!0,usernameClass:!0,hashtagClass:!0,cashtagClass:!0,usernameUrlBase:!0,listUrlBase:!0,hashtagUrlBase:!0,cashtagUrlBase:!0,usernameUrlBlock:!0,listUrlBlock:!0,hashtagUrlBlock:!0,linkUrlBlock:!0,usernameIncludeSymbol:!0,suppressLists:!0,suppressNoFollow:!0,targetBlank:!0,suppressDataScreenName:!0,urlEntities:!0,symbolTag:!0,textWithSymbolTag:!0,urlTarget:!0,invisibleTagAttrs:!0,linkAttributeBlock:!0,linkTextBlock:!0,htmlEscapeNonEntities:!0},r={disabled:!0,readonly:!0,multiple:!0,checked:!0};a.txt.tagAttrs=function(b){var c="";for(var d in b){var e=b[d];r[d]&&(e=e?d:null);if(e==null)continue;c+=" "+a.txt.htmlEscape(d)+'="'+a.txt.htmlEscape(e.toString())+'"'}return c},a.txt.linkToText=function(b,c,e,f){f.suppressNoFollow||(e.rel="nofollow"),f.linkAttributeBlock&&f.linkAttributeBlock(b,e),f.linkTextBlock&&(c=f.linkTextBlock(b,c));var g={text:c,attr:a.txt.tagAttrs(e)};return d("<a#{attr}>#{text}</a>",g)},a.txt.linkToTextWithSymbol=function(b,c,d,e,f){var g=f.symbolTag?"<"+f.symbolTag+">"+c+"</"+f.symbolTag+">":c;d=a.txt.htmlEscape(d);var h=f.textWithSymbolTag?"<"+f.textWithSymbolTag+">"+d+"</"+f.textWithSymbolTag+">":d;return f.usernameIncludeSymbol||!c.match(a.txt.regexen.atSigns)?a.txt.linkToText(b,g+h,e,f):g+a.txt.linkToText(b,h,e,f)},a.txt.linkToHashtag=function(b,c,d){var e=c.substring(b.indices[0],b.indices[0]+1),f=a.txt.htmlEscape(b.hashtag),g=s(d.htmlAttrs||{});return g.href=d.hashtagUrlBase+f,g.title="#"+f,g["class"]=d.hashtagClass,f.charAt(0).match(a.txt.regexen.rtl_chars)&&(g["class"]+=" rtl"),d.targetBlank&&(g.target="_blank"),a.txt.linkToTextWithSymbol(b,e,f,g,d)},a.txt.linkToCashtag=function(b,c,d){var e=a.txt.htmlEscape(b.cashtag),f=s(d.htmlAttrs||{});return f.href=d.cashtagUrlBase+e,f.title="$"+e,f["class"]=d.cashtagClass,d.targetBlank&&(f.target="_blank"),a.txt.linkToTextWithSymbol(b,"$",e,f,d)},a.txt.linkToMentionAndList=function(b,c,d){var e=c.substring(b.indices[0],b.indices[0]+1),f=a.txt.htmlEscape(b.screenName),g=a.txt.htmlEscape(b.listSlug),h=b.listSlug&&!d.suppressLists,i=s(d.htmlAttrs||{});return i["class"]=h?d.listClass:d.usernameClass,i.href=h?d.listUrlBase+f+g:d.usernameUrlBase+f,!h&&!d.suppressDataScreenName&&(i["data-screen-name"]=f),d.targetBlank&&(i.target="_blank"),a.txt.linkToTextWithSymbol(b,e,h?f+g:f,i,d)},a.txt.linkToUrl=function(b,c,d){var e=b.url,f=e,g=a.txt.htmlEscape(f),h=d.urlEntities&&d.urlEntities[e]||b;h.display_url&&(g=a.txt.linkTextWithEntity(h,d));var i=s(d.htmlAttrs||{});return e.match(a.txt.regexen.urlHasProtocol)||(e="http://"+e),i.href=e,d.targetBlank&&(i.target="_blank"),d.urlClass&&(i["class"]=d.urlClass),d.urlTarget&&(i.target=d.urlTarget),!d.title&&h.display_url&&(i.title=h.expanded_url),a.txt.linkToText(b,g,i,d)},a.txt.linkTextWithEntity=function(b,c){var e=b.display_url,f=b.expanded_url,g=e.replace(/…/g,"");if(f.indexOf(g)!=-1){var h=f.indexOf(g),i={displayUrlSansEllipses:g,beforeDisplayUrl:f.substr(0,h),afterDisplayUrl:f.substr(h+g.length),precedingEllipsis:e.match(/^…/)?"…":"",followingEllipsis:e.match(/…$/)?"…":""};for(var j in i)i.hasOwnProperty(j)&&(i[j]=a.txt.htmlEscape(i[j]));return i.invisible=c.invisibleTagAttrs,d("<span class='tco-ellipsis'>#{precedingEllipsis}<span #{invisible}>&nbsp;</span></span><span #{invisible}>#{beforeDisplayUrl}</span><span class='js-display-url'>#{displayUrlSansEllipses}</span><span #{invisible}>#{afterDisplayUrl}</span><span class='tco-ellipsis'><span #{invisible}>&nbsp;</span>#{followingEllipsis}</span>",i)}return e},a.txt.autoLinkEntities=function(b,c,d){d=s(d||{}),d.hashtagClass=d.hashtagClass||o,d.hashtagUrlBase=d.hashtagUrlBase||"https://twitter.com/#!/search?q=%23",d.cashtagClass=d.cashtagClass||p,d.cashtagUrlBase=d.cashtagUrlBase||"https://twitter.com/#!/search?q=%24",d.listClass=d.listClass||m,d.usernameClass=d.usernameClass||n,d.usernameUrlBase=d.usernameUrlBase||"https://twitter.com/",d.listUrlBase=d.listUrlBase||"https://twitter.com/",d.htmlAttrs=a.txt.extractHtmlAttrsFromOptions(d),d.invisibleTagAttrs=d.invisibleTagAttrs||"style='position:absolute;left:-9999px;'";var e,f,g;if(d.urlEntities){e={};for(f=0,g=d.urlEntities.length;f<g;f++)e[d.urlEntities[f].url]=d.urlEntities[f];d.urlEntities=e}var h="",i=0;c.sort(function(a,b){return a.indices[0]-b.indices[0]});var j=d.htmlEscapeNonEntities?a.txt.htmlEscape:function(a){return a};for(var f=0;f<c.length;f++){var k=c[f];h+=j(b.substring(i,k.indices[0])),k.url?h+=a.txt.linkToUrl(k,b,d):k.hashtag?h+=a.txt.linkToHashtag(k,b,d):k.screenName?h+=a.txt.linkToMentionAndList(k,b,d):k.cashtag&&(h+=a.txt.linkToCashtag(k,b,d)),i=k.indices[1]}return h+=j(b.substring(i,b.length)),h},a.txt.autoLinkWithJSON=function(b,c,d){if(c.user_mentions)for(var e=0;e<c.user_mentions.length;e++)c.user_mentions[e].screenName=c.user_mentions[e].screen_name;if(c.hashtags)for(var e=0;e<c.hashtags.length;e++)c.hashtags[e].hashtag=c.hashtags[e].text;if(c.symbols)for(var e=0;e<c.symbols.length;e++)c.symbols[e].cashtag=c.symbols[e].text;var f=[];for(var g in c)f=f.concat(c[g]);return a.txt.modifyIndicesFromUnicodeToUTF16(b,f),a.txt.autoLinkEntities(b,f,d)},a.txt.extractHtmlAttrsFromOptions=function(a){var b={};for(var c in a){var d=a[c];if(q[c])continue;r[c]&&(d=d?c:null);if(d==null)continue;b[c]=d}return b},a.txt.autoLink=function(b,c){var d=a.txt.extractEntitiesWithIndices(b,{extractUrlsWithoutProtocol:!1});return a.txt.autoLinkEntities(b,d,c)},a.txt.autoLinkUsernamesOrLists=function(b,c){var d=a.txt.extractMentionsOrListsWithIndices(b);return a.txt.autoLinkEntities(b,d,c)},a.txt.autoLinkHashtags=function(b,c){var d=a.txt.extractHashtagsWithIndices(b);return a.txt.autoLinkEntities(b,d,c)},a.txt.autoLinkCashtags=function(b,c){var d=a.txt.extractCashtagsWithIndices(b);return a.txt.autoLinkEntities(b,d,c)},a.txt.autoLinkUrlsCustom=function(b,c){var d=a.txt.extractUrlsWithIndices(b,{extractUrlsWithoutProtocol:!1});return a.txt.autoLinkEntities(b,d,c)},a.txt.removeOverlappingEntities=function(a){a.sort(function(a,b){return a.indices[0]-b.indices[0]});var b=a[0];for(var c=1;c<a.length;c++)b.indices[1]>a[c].indices[0]?(a.splice(c,1),c--):b=a[c]},a.txt.extractEntitiesWithIndices=function(b,c){var d=a.txt.extractUrlsWithIndices(b,c).concat(a.txt.extractMentionsOrListsWithIndices(b)).concat(a.txt.extractHashtagsWithIndices(b,{checkUrlOverlap:!1})).concat(a.txt.extractCashtagsWithIndices(b));return d.length==0?[]:(a.txt.removeOverlappingEntities(d),d)},a.txt.extractMentions=function(b){var c=[],d=a.txt.extractMentionsWithIndices(b);for(var e=0;e<d.length;e++){var f=d[e].screenName;c.push(f)}return c},a.txt.extractMentionsWithIndices=function(b){var c=[],d,e=a.txt.extractMentionsOrListsWithIndices(b);for(var f=0;f<e.length;f++)d=e[f],d.listSlug==""&&c.push({screenName:d.screenName,indices:d.indices});return c},a.txt.extractMentionsOrListsWithIndices=function(b){if(!b||!b.match(a.txt.regexen.atSigns))return[];var c=[],d;return b.replace(a.txt.regexen.validMentionOrList,function(b,d,e,f,g,h,i){var j=i.slice(h+b.length);if(!j.match(a.txt.regexen.endMentionMatch)){g=g||"";var k=h+d.length,l=k+f.length+g.length+1;c.push({screenName:f,listSlug:g,indices:[k,l]})}}),c},a.txt.extractReplies=function(b){if(!b)return null;var c=b.match(a.txt.regexen.validReply);return!c||RegExp.rightContext.match(a.txt.regexen.endMentionMatch)?null:c[1]},a.txt.extractUrls=function(b,c){var d=[],e=a.txt.extractUrlsWithIndices(b,c);for(var f=0;f<e.length;f++)d.push(e[f].url);return d},a.txt.extractUrlsWithIndices=function(b,c){c||(c={extractUrlsWithoutProtocol:!0});if(!b||(c.extractUrlsWithoutProtocol?!b.match(/\./):!b.match(/:/)))return[];var d=[];while(a.txt.regexen.extractUrl.exec(b)){var e=RegExp.$2,f=RegExp.$3,g=RegExp.$4,h=RegExp.$5,i=RegExp.$7,j=a.txt.regexen.extractUrl.lastIndex,k=j-f.length;if(!g){if(!c.extractUrlsWithoutProtocol||e.match(a.txt.regexen.invalidUrlWithoutProtocolPrecedingChars))continue;var l=null,m=0;h.replace(a.txt.regexen.validAsciiDomain,function(b){var c=h.indexOf(b,m);m=c+b.length,l={url:b,indices:[k+c,k+m]},(i||b.match(a.txt.regexen.validSpecialShortDomain)||!b.match(a.txt.regexen.invalidShortDomain))&&d.push(l)});if(l==null)continue;i&&(l.url=f.replace(h,l.url),l.indices[1]=j)}else f.match(a.txt.regexen.validTcoUrl)&&(f=RegExp.lastMatch,j=k+f.length),d.push({url:f,indices:[k,j]})}return d},a.txt.extractHashtags=function(b){var c=[],d=a.txt.extractHashtagsWithIndices(b);for(var e=0;e<d.length;e++)c.push(d[e].hashtag);return c},a.txt.extractHashtagsWithIndices=function(b,c){c||(c={checkUrlOverlap:!0});if(!b||!b.match(a.txt.regexen.hashSigns))return[];var d=[];b.replace(a.txt.regexen.validHashtag,function(b,c,e,f,g,h){var i=h.slice(g+b.length);if(i.match(a.txt.regexen.endHashtagMatch))return;var j=g+c.length,k=j+f.length+1;d.push({hashtag:f,indices:[j,k]})});if(c.checkUrlOverlap){var e=a.txt.extractUrlsWithIndices(b);if(e.length>0){var f=d.concat(e);a.txt.removeOverlappingEntities(f),d=[];for(var g=0;g<f.length;g++)f[g].hashtag&&d.push(f[g])}}return d},a.txt.extractCashtags=function(b){var c=[],d=a.txt.extractCashtagsWithIndices(b);for(var e=0;e<d.length;e++)c.push(d[e].cashtag);return c},a.txt.extractCashtagsWithIndices=function(b){if(!b||b.indexOf("$")==-1)return[];var c=[];return b.replace(a.txt.regexen.validCashtag,function(a,b,d,e,f,g){var h=f+b.length,i=h+e.length+1;c.push({cashtag:e,indices:[h,i]})}),c},a.txt.modifyIndicesFromUnicodeToUTF16=function(b,c){a.txt.convertUnicodeIndices(b,c,!1)},a.txt.modifyIndicesFromUTF16ToUnicode=function(b,c){a.txt.convertUnicodeIndices(b,c,!0)},a.txt.getUnicodeTextLength=function(b){return b.replace(a.txt.regexen.non_bmp_code_pairs," ").length},a.txt.convertUnicodeIndices=function(a,b,c){if(b.length==0)return;var d=0,e=0;b.sort(function(a,b){return a.indices[0]-b.indices[0]});var f=0,g=b[0];while(d<a.length){if(g.indices[0]==(c?d:e)){var h=g.indices[1]-g.indices[0];g.indices[0]=c?e:d,g.indices[1]=g.indices[0]+h,f++;if(f==b.length)break;g=b[f]}var i=a.charCodeAt(d);55296<=i&&i<=56319&&d<a.length-1&&(i=a.charCodeAt(d+1),56320<=i&&i<=57343&&d++),e++,d++}},a.txt.splitTags=function(a){var b=a.split("<"),c,d=[],e;for(var f=0;f<b.length;f+=1){e=b[f];if(!e)d.push("");else{c=e.split(">");for(var g=0;g<c.length;g+=1)d.push(c[g])}}return d},a.txt.hitHighlight=function(b,c,d){var e="em";c=c||[],d=d||{};if(c.length===0)return b;var f=d.tag||e,g=["<"+f+">","</"+f+">"],h=a.txt.splitTags(b),i,j,k="",l=0,m=h[0],n=0,o=0,p=!1,q=m,r=[],s,t,u,v,w;for(i=0;i<c.length;i+=1)for(j=0;j<c[i].length;j+=1)r.push(c[i][j]);for(s=0;s<r.length;s+=1){t=r[s],u=g[s%2],v=!1;while(m!=null&&t>=n+m.length)k+=q.slice(o),p&&t===n+q.length&&(k+=u,v=!0),h[l+1]&&(k+="<"+h[l+1]+">"),n+=q.length,o=0,l+=2,m=h[l],q=m,p=!1;!v&&m!=null?(w=t-n,k+=q.slice(o,w)+u,o=w,s%2===0?p=!0:p=!1):v||(v=!0,k+=u)}if(m!=null){o<q.length&&(k+=q.slice(o));for(s=l+1;s<h.length;s+=1)k+=s%2===0?h[s]:"<"+h[s]+">"}return k};var t=140,u=[f(65534),f(65279),f(65535),f(8234),f(8235),f(8236),f(8237),f(8238)];a.txt.getTweetLength=function(b,c){c||(c={short_url_length:23,short_url_length_https:23});var d=a.txt.getUnicodeTextLength(b),e=a.txt.extractUrlsWithIndices(b);a.txt.modifyIndicesFromUTF16ToUnicode(b,e);for(var f=0;f<e.length;f++)d+=e[f].indices[0]-e[f].indices[1],e[f].url.toLowerCase().match(a.txt.regexen.urlHasHttps)?d+=c.short_url_length_https:d+=c.short_url_length;return d},a.txt.isInvalidTweet=function(b){return b?a.txt.getTweetLength(b)>t?"too_long":a.txt.hasInvalidCharacters(b)?"invalid_characters":!1:"empty"},a.txt.hasInvalidCharacters=function(a){for(var b=0;b<u.length;b++)if(a.indexOf(u[b])>=0)return!0;return!1},a.txt.isValidTweetText=function(b){return!a.txt.isInvalidTweet(b)},a.txt.isValidUsername=function(b){if(!b)return!1;var c=a.txt.extractMentions(b);return c.length===1&&c[0]===b.slice(1)};var v=c(/^#{validMentionOrList}$/);a.txt.isValidList=function(a){var b=a.match(v);return!!b&&b[1]==""&&!!b[4]},a.txt.isValidHashtag=function(b){if(!b)return!1;var c=a.txt.extractHashtags(b);return c.length===1&&c[0]===b.slice(1)},a.txt.isValidUrl=function(b,c,d){c==null&&(c=!0),d==null&&(d=!0);if(!b)return!1;var e=b.match(a.txt.regexen.validateUrlUnencoded);if(!e||e[0]!==b)return!1;var f=e[1],g=e[2],h=e[3],i=e[4],j=e[5];return(!d||w(f,a.txt.regexen.validateUrlScheme)&&f.match(/^https?$/i))&&w(h,a.txt.regexen.validateUrlPath)&&w(i,a.txt.regexen.validateUrlQuery,!0)&&w(j,a.txt.regexen.validateUrlFragment,!0)?c&&w(g,a.txt.regexen.validateUrlUnicodeAuthority)||!c&&w(g,a.txt.regexen.validateUrlAuthority):!1},typeof module!="undefined"&&module.exports&&(module.exports=a.txt),typeof define=="function"&&define.amd&&define([],a.txt),provide("lib/twitter-text",function(b){b(a.txt)})})()
  define("app/ui/compose/with_character_counter",["module","require","exports","lib/twitter-text"],function(module, require, exports) {
  function withCharacterCounter(){var a=24;this.defaultAttrs({counterSelector:".tweet-counter",maxLength:140,superwarnLength:130,warnLength:120,superwarnClass:"superwarn",warnClass:"warn",maxReachedClass:"max-reached",dmOnly:!1,countUp:!1,ignoreAttachmentText:!1}),this.updateCounter=function(){var a=this.getLength(),b=a>=this.attr.warnLength&&a<this.attr.superwarnLength,c=a>=this.attr.superwarnLength,d=this.maxReached(),e=this.attr.countUp?a:this.attr.maxLength-a;this.$counter.html(e).toggleClass(this.attr.warnClass,b).toggleClass(this.attr.superwarnClass,c).toggleClass(this.attr.maxReachedClass,d),(b||c)&&this.trigger("uiCharCountWarningVisible",{charCount:e})},this.getLength=function(a){return a=this.addHiddenText(a===undefined?this.getVisibleText():a),a!==this.prevCounterText&&(this.prevCounterText=a,this.prevCounterLength=twitterText.getTweetLength(a)),this.prevCounterLength+this.getAttachmentLength()},this.getAttachmentLength=function(){return!this.attr.ignoreAttachmentText&&this.hasAttachment&&this.hasAttachment()?a:0},this.maxReached=function(){return this.getLength()>this.attr.maxLength},this.after("initialize",function(){this.$counter=this.select("counterSelector"),this.on("uiTextChanged uiAttachmentChanged",this.updateCounter),this.updateCounter()})}var twitterText=require("lib/twitter-text");module.exports=withCharacterCounter
  });
  define("app/ui/compose/with_draft_tweets",["module","require","exports","app/utils/storage/custom"],function(module, require, exports) {
  var customStorage=require("app/utils/storage/custom");module.exports=function(){this.defaultAttrs({draftTweetTTL:864e5}),this.getDraftTweet=function(){return this.draftTweetId&&this.draftTweets().getItem(this.draftTweetId)},this.hasDraftTweet=function(){return!!this.getDraftTweet()},this.saveDraftTweet=function(a,b){if(this.draftTweetId&&this.hasFocus()){var c=b.text.trim();c&&!this.isEmpty(!0)?this.draftTweets().setItem(this.draftTweetId,c,this.attr.draftTweetTTL):this.draftTweets().removeItem(this.draftTweetId)}},this.before("clear",function(){this.draftTweetId&&this.draftTweets().removeItem(this.draftTweetId)}),this.overrideDraftTweetId=function(a,b){this.draftTweetId=b.draftTweetId,this.resetTweetText()},this.draftTweets=function(){if(!this.draftTweetsStore){var a=customStorage({withExpiry:!0});this.draftTweetsStore=new a("draft_tweets")}return this.draftTweetsStore},this.after("resetTweetText",function(){var a=this.getDraftTweet();a&&(this.setVisibleText(a),this.trigger("uiSaveUndoState"))}),this.initDraftTweets=function(){this.draftTweetId=this.attr.draftTweetId,this.on("uiTextChanged",this.saveDraftTweet),this.attr.modal&&this.on(document,"uiOverrideTweetBoxOptions",this.overrideDraftTweetId)}}
  });
  define("app/utils/video",["module","require","exports"],function(module, require, exports) {
  var video={formatDuration:function(a){var b=Math.floor(a/60),c=Math.floor(a%60);return b+":"+("0"+c).slice(-2)},getFrame:function(a,b){var c=$.Deferred(),d=b?"seeked":"loadeddata";return b&&a.addEventListener("canplay",function(c){a.currentTime=b}),a.addEventListener(d,function(){var b=document.createElement("canvas");b.width=a.videoWidth,b.height=a.videoHeight;var d=b.getContext("2d");d.drawImage(a,0,0);var e=b.toDataURL("image/jpeg").split(",")[1];c.resolve(e)},!1),a.addEventListener("error",function(a){c.reject()}),c.promise()}};module.exports=video
  });
  define("app/ui/compose/with_video_edit_dialog",["module","require","exports","core/i18n","app/utils/file","app/utils/shared_objects","app/utils/video"],function(module, require, exports) {
  function withVideoEditDialog(){this.defaultAttrs({advancedWrapper:".TweetBox-advanced",advancedTitleSelector:".TweetBox-advancedTitle",advancedDescriptionSelector:".TweetBox-advancedDescription",advancedCtaTypeSelector:".TweetBox-advancedCtaType",advancedCtaUrlSelector:".TweetBox-advancedCtaUrl",advancedEmbeddableSelector:".TweetBox-advancedEmbeddableValue",mediaDataNodeSelector:".multi-photo-data, .file-data"}),this.videoFileId=null,this.mediaBoxHeight=null,this.mediaDataNode=function(a){return this.select("mediaDataNodeSelector").filter('[data-file-id="'+a+'"]')},this.setVideoFileId=function(a,b){b.info&&b.info.isVideo&&(this.videoFileId=b.info.fileId,this.videoFileData=b)},this.sendDataToEditDialog=function(a,b){if(this.videoFileId==b.fileId){var b={fileId:this.videoFileId,trimRange:this.mediaDataNode(this.videoFileId).attr("data-trim-range"),title:this.select("advancedTitleSelector").next("input").val(),description:this.select("advancedDescriptionSelector").next("input").val(),ctaType:this.select("advancedCtaTypeSelector").next("input").val(),ctaUrl:this.select("advancedCtaUrlSelector").next("input").val(),embeddable:this.select("advancedEmbeddableSelector").next("input").val()};this.trigger(document,"uiMediaEditDialogFill",b)}},this.emptyAdvanced=function(a,b){this.$node.removeClass("has-advanced"),this.mediaBoxHeight=null,this.videoFileId=null,this.setAdvancedValue("advancedTitleSelector",""),this.setAdvancedValue("advancedDescriptionSelector",""),this.setAdvancedValue("advancedCtaTypeSelector",""),this.setAdvancedValue("advancedCtaUrlSelector",""),this.setAdvancedValue("advancedEmbeddableSelector",1)},this.updateFromEditDialog=function(a,b){if(b.fileId==this.videoFileId){this.mediaDataNode(this.videoFileId).attr("data-trim-range",b.trimRange),b.advanced&&(this.$node.addClass("has-advanced"),this.setAdvancedValue("advancedTitleSelector",b.advanced.title),this.setAdvancedValue("advancedDescriptionSelector",b.advanced.description),this.setAdvancedValue("advancedCtaTypeSelector",b.advanced.ctaType),this.setAdvancedValue("advancedCtaUrlSelector",this.sanitizeUrl(b.advanced.ctaUrl)),this.setAdvancedValue("advancedEmbeddableSelector",b.advanced.embeddable),this.resizeWrapper());if(this.videoFileData&&this.videoFileData.info){var c=sharedObjects.get(b.fileId),d=document.createElement("video");d.src=file.getObjectUrl(c),video.getFrame(d,b.trimStart).then(this.gotVideoFrame.bind(this,{info:this.videoFileData.info,uploadId:this.videoFileData.uploadId,duration:b.trimEnd-b.trimStart})).always(function(){file.revokeObjectUrl(d.src)})}}},this.sanitizeUrl=function(a){return/^[a-zA-Z0-9+.-]+:\/\//.test(a)?a:"http://"+a},this.gotVideoFrame=function(a,b){this.trigger("uiPreviewThumbnailUpdate",{imageData:b,info:a.info,uploadId:a.uploadId,duration:a.duration})},this.setAdvancedValue=function(a,b){var c=b;if(a==="advancedEmbeddableSelector")c=b?_('allowed'):_('not allowed');else if(a==="advancedCtaTypeSelector"){var d={visit_site:_('Visit:'),watch_now:_('Watch now:')};c=d[b]}this.select(a).text(c).next("input").val(b)},this.resizeWrapper=function(){var a=this.$node.find(".thumbnail-container");this.mediaBoxHeight===null&&(this.mediaBoxHeight=a.outerHeight());var b=this.mediaBoxHeight+this.select("advancedWrapper").outerHeight();a.css("height",b),this.$node.find(".RichEditor,.tweet-box").eq(0).css("padding-bottom",b),this.$node.find(".typeahead").css("margin-top",-b)},this.around("createDataForSending",function(a){var b=a(),c=this.select("advancedTitleSelector").next("input").val();if(c!==undefined){var d=this.select("advancedEmbeddableSelector").next("input").val();b.advanced_title=c,b.advanced_description=this.select("advancedDescriptionSelector").next("input").val(),b.advanced_cta_type=this.select("advancedCtaTypeSelector").next("input").val(),b.advanced_cta_url=this.select("advancedCtaUrlSelector").next("input").val(),b.advanced_embeddable=d!=0?!0:!1}return b}),this.after("initialize",function(){this.on(document,"uiMediaEditDialogDone",this.updateFromEditDialog),this.on(document,"uiMediaEditDialogOpened",this.sendDataToEditDialog),this.on("uiPreviewThumbnailAdd",this.setVideoFileId),this.on("uiTweetSent uiTweetCancelled uiPreviewThumbnailRemoveAll uiPreviewThumbnailRemove",this.emptyAdvanced)})}var _=require("core/i18n"),file=require("app/utils/file"),sharedObjects=require("app/utils/shared_objects"),video=require("app/utils/video");module.exports=withVideoEditDialog
  });
  define("app/ui/compose/with_lifeline",["module","require","exports","core/i18n"],function(module, require, exports) {
  function withLifeline(){this.defaultAttrs({lifelineAlertSelector:".lifeline-alert-status",lifelineAlertBtnSelector:".lifeline-alert-status-btn"}),this.sendLifelineAlertTweet=function(){this.sendTweet(),this.trigger("uiLifelineAlertsTweet")},this.cancelLifelineAlertTweet=function(){this.trigger("uiLifelineAlertsCancel")},this.around("confirmAndSendTweet",function(a){this.lifelineAlertMode?(this.trigger("uiLifelineAlertsImpression"),this.trigger("uiOpenConfirmDialog",{titleText:_('Send Twitter Alert'),bodyText:_('Are you sure you want to send a Twitter Alert to your followers?'),cancelText:_('Cancel'),submitText:_('Send'),action:"SendLifelineAlert"})):a()}),this.setLifelineAlertMode=function(a){a?(this.select("lifelineAlertBtnSelector").addClass("active"),this.trigger("uiLifelineAlertsSelect")):this.select("lifelineAlertBtnSelector").removeClass("active"),this.lifelineAlertMode=a,this.detectUpdatedText(!0)},this.selectLifelineAlertAction=function(){this.setLifelineAlertMode(!this.lifelineAlertMode)},this.around("addHiddenText",function(a,b){var b=a(b);return this.lifelineAlertMode&&(b+=this.lifelineAlertText),b}),this.before("clear",function(){this.setLifelineAlertMode(!1)}),this.after("initialize",function(){this.lifelineAlertMode=!1,this.lifelineAlertText=" #alert",this.on(this.attr.lifelineAlertSelector,"click",this.selectLifelineAlertAction),this.on("uiSendLifelineAlertConfirm",this.sendLifelineAlertTweet),this.on("uiSendLifelineAlertCancel",this.cancelLifelineAlertTweet)})}var _=require("core/i18n");module.exports=withLifeline
  });
  define("app/ui/compose/with_photo_intent",["module","require","exports"],function(module, require, exports) {
  function withPhotoIntent(){this.defaultAttrs({photoIntentSelector:".TweetBox-photoIntent",mediaPickerSelector:".TweetBox-mediaPicker"}),this.moveChildren=function(a,b){this.select(a).children().detach().appendTo(this.select(b))},this.moveMediaPickerIntoPhotoIntent=function(){this.moveChildren("mediaPickerSelector","photoIntentSelector"),this.trigger("uiOverrideImageSelectorScribeContext",{component:"stream_header"}),this.trigger("uiEnableImageSelectionTooltip")},this.moveMediaPickerOutOfPhotoIntent=function(){this.moveChildren("photoIntentSelector","mediaPickerSelector"),this.trigger("uiOverrideImageSelectorScribeContext",this.attr.eventData.scribeContext),this.$node.hasClass("is-minimalButtonLabels")||this.trigger("uiDisableImageSelectionTooltip")},this.after("initialize",function(){this.select("photoIntentSelector").length&&(this.on("uiTweetBoxExpanded",this.moveMediaPickerOutOfPhotoIntent),this.on("uiTweetBoxCondensed",this.moveMediaPickerIntoPhotoIntent),this.isCondensed()&&this.moveMediaPickerIntoPhotoIntent())})}module.exports=withPhotoIntent
  });
  define("app/utils/caret",["module","require","exports"],function(module, require, exports) {
  var caret={getPosition:function(a){try{if(document.selection){var b=document.selection.createRange();return b.moveStart("character",-a.value.length),b.text.length}if(typeof a.selectionStart=="number")return a.selectionStart}catch(c){}return 0},setPosition:function(a,b){try{if(document.selection){var c=a.createTextRange();c.collapse(!0),c.moveEnd("character",b),c.moveStart("character",b),c.select()}else typeof a.selectionStart=="number"&&(a.selectionStart=b,a.selectionEnd=b)}catch(d){}},getSelection:function(){return window.getSelection?window.getSelection().toString():document.selection.createRange().text}};module.exports=caret
  });
  define("app/ui/compose/with_rtl_tweet_box",["module","require","exports","lib/twitter-text","app/utils/caret"],function(module, require, exports) {
  function replaceIndices(a,b,c){var d=0,e="";return b(a).forEach(function(b){e+=a.slice(d,b.indices[0])+c(a.slice(b.indices[0],b.indices[1])),d=b.indices[1]}),e+a.slice(d)}function withRTL(){this.defaultAttrs({isRTL:$("body").attr("dir")==="rtl",rtlCharRegex:/[\u0600-\u06FF]|[\u0750-\u077F]|[\u0590-\u05FF]|[\uFE70-\uFEFF]/gm,dirMarkRegex:/\u200e|\u200f/gm,rtlThreshold:.3}),this.shouldBeRTL=function(a,b,c){c===undefined&&(c=a.match(this.attr.rtlCharRegex));var d=a.trim();if(!d)return this.attr.isRTL;if(!c)return!1;var e=d.length-b;return e>0&&c.length/e>this.attr.rtlThreshold},this.removeMarkers=function(a){return a.replace(this.attr.dirMarkRegex,"")},this.setMarkersAndRTL=function(a,b){var c=b.match(this.attr.rtlCharRegex),d=0;if(c){a=b,a=replaceIndices(a,txt.extractMentionsWithIndices,function(a){return d+=a.length+1,"‎"+a+"‏"});var e=this.attr.rtlCharRegex;a=replaceIndices(a,txt.extractHashtagsWithIndices,function(a){return a[1].match(e)?a:"‎"+a}),a=replaceIndices(a,txt.extractUrlsWithIndices,function(a){return d+=a.length+2,a+"‎"})}var f=this.shouldBeRTL(b,d,c);return this.$text.attr("dir",f?"rtl":"ltr"),a},this.erasePastMarkers=function(a){if(a.which===8)var b=-1;else{if(a.which!==46)return;var b=0}var c=caret.getPosition(this.$text[0]),d=this.$text.val(),e=0;do{var f=d[c+b]||"";f&&(c+=b,e++,d=d.slice(0,c)+d.slice(c+1))}while(f.match(this.attr.dirMarkRegex));e>1&&(this.$text.val(d),caret.setPosition(this.$text[0],c),a.preventDefault(),this.detectUpdatedText())},this.around("cleanText",function(a,b){var c=this.removeMarkers(a(b)),d=this.setMarkersAndRTL(b,c);if(d!==b){var e=this.$text[0],f=caret.getPosition(e);this.$text.val(d),this.prevText=d,caret.setPosition(e,f+d.length-b.length)}return c}),this.after("initTextNode",function(){this.on(this.$text,"keydown",this.erasePastMarkers)})}var txt=require("lib/twitter-text"),caret=require("app/utils/caret");module.exports=withRTL
  });
  define("app/ui/input_polling",["module","require","exports","core/component"],function(module, require, exports) {
  function inputPolling(){this.defaultAttrs({pollIntervalInMs:100}),this.hasFocus=function(){return document.activeElement===this.node},this.start=function(){this.poll(),this.intervalId===undefined&&(this.intervalId=setInterval(this.poll.bind(this),this.attr.pollIntervalInMs))},this.poll=function(){this.trigger("uiInputPoll"),this.hasFocus()||this.stop()},this.stop=function(){this.intervalId!==undefined&&(clearInterval(this.intervalId),this.intervalId=undefined)},this.after("initialize",function(){this.on("focus",this.start),this.hasFocus()&&this.start()}),this.before("teardown",this.stop)}var defineComponent=require("core/component");module.exports=defineComponent(inputPolling)
  });
  define("app/ui/compose/with_text_editor",["module","require","exports","app/utils/caret","core/compose","app/ui/input_polling","app/utils/with_no_teardown_child_components"],function(module, require, exports) {
  function withTextEditor(){compose.mixin(this,[withNoTeardownChildComponents]),this.caret=caret,this.defaultAttrs({textSelector:"textarea.tweet-box",textFakeFocusClass:"fake-focus"}),this.hasFakeFocus=function(){return this.$text.hasClass(this.attr.textFakeFocusClass)},this.toggleFakeFocus=function(a){this.$text.toggleClass(this.attr.textFakeFocusClass,!!a)},this.ignoreDuringFakeFocus=function(a){var b=this;return function(){if(!b.$text.hasClass(b.attr.textFakeFocusClass))return a.apply(this,arguments)}},this.hasFocus=function(){return document.activeElement===this.$text[0]||this.hasFakeFocus()},this.getVisibleText=function(){return this.cleanedText||""},this.setVisibleText=function(a){this.detectUpdatedText(!1,a)},this.addHiddenText=function(a){return a},this.cleanText=function(a){return a},this.detectUpdatedText=function(a,b){b===undefined?b=this.$text.val():this.$text.val(b);var c=caret.getPosition(this.$text[0]);if(b!==this.prevText||a)this.prevText=b,this.updateCleanedTextAndPosition(this.cleanText(b),c);this.detectUpdatedCursorPosition(c)},this.updateCleanedTextAndPosition=function(a,b){this.cleanedText=a,this.trigger("uiTextChanged",{text:a,position:Math.min(b,a.length)})},this.detectUpdatedCursorPosition=function(a){a=Math.min(a,(this.cleanedText||"").length),a!==this.prevPosition&&(this.prevPosition=a,this.trigger("uiCursorPositionChanged",{position:a}))},this.setSelection=function(a){},this.setCursorPosition=function(a){a===undefined&&(a=this.attr.cursorPosition),a===undefined&&(a=this.$text.val().length),caret.setPosition(this.$text.get(0),a),this.detectUpdatedCursorPosition(a)},this.changeTextAndPosition=function(a,b){this.setVisibleText(b.text),this.setCursorPosition(b.position)},this.focus=function(){this.hasFocus()||(document.body.focus(),this.$text.trigger("focusin"),this.$text.focus())},this.initTextNode=function(){this.$text=this.select("textSelector"),this.detectUpdatedText()},this.inputPoll=function(){this.detectUpdatedText()},this.setEditability=function(a){this.$text.prop("disabled",!a)},this.after("initialize",function(){this.on("uiChangeTextAndPosition",this.changeTextAndPosition),this.on("uiInputPoll",this.inputPoll),this.on("uiEnableEditing",this.setEditability.bind(this,!0)),this.on("uiDisableEditing",this.setEditability.bind(this,!1)),this.attachChild(InputPolling,this.$text)})}var caret=require("app/utils/caret"),compose=require("core/compose"),InputPolling=require("app/ui/input_polling"),withNoTeardownChildComponents=require("app/utils/with_no_teardown_child_components");module.exports=withTextEditor
  });
  define("app/utils/drag_drop_helper",["module","require","exports"],function(module, require, exports) {
  var dragDropHelper={hasFiles:function(a,b){var c=(a.originalEvent||a).dataTransfer,d=c&&(c.types.contains?c.types.contains("Files"):c.types.indexOf("Files")>=0);if(!d||!b||!c.items&&!c.files)return d;var e=c.items||c.files;for(var f=0;f<e.length;++f)d=d&&!!e[f].type.match(b);return d},onlyHandleEventsWithFiles:function(a,b){return function(c,d){if(dragDropHelper.hasFiles(c,b))return a.call(this,c,d)}}};module.exports=dragDropHelper
  });
  define("app/utils/file_selection_error_types",["module","require","exports"],function(module, require, exports) {
  module.exports={FILE_TOO_LARGE:"tooLarge",FILE_UNSUPPORTED:"fileUnsupported",GIF_LIMIT:"gifLimit",GIF_TOO_LARGE:"gifTooLarge",GIF_UNSUPPORTED:"gifUnsupported",IO_ERROR:"ioError",NOT_IMAGE:"notImage",MIXED_MEDIA:"mixedMedia",VIDEO_TOO_LARGE:"videoTooLarge",TOO_MANY_VIDEOS_1:"videosTooMany1",TOO_MANY_PHOTOS_1:"photosTooMany1",TOO_MANY_PHOTOS:"photosTooMany"}
  });
  define("app/utils/file_selection_error_messages",["module","require","exports","core/i18n","app/utils/file_selection_error_types","app/data/user_info"],function(module, require, exports) {
  var _=require("core/i18n"),errorTypes=require("app/utils/file_selection_error_types"),userInfo=require("app/data/user_info");module.exports=function(a){switch(a){case errorTypes.NOT_IMAGE:case errorTypes.IO_ERROR:return _('You did not select an image.');case errorTypes.FILE_TOO_LARGE:return _('Sorry! The file is too big. Maximum file size is 50MB.');case errorTypes.FILE_UNSUPPORTED:return _('That kind of file isn\'t supported yet. Try uploading a gif, video, or picture instead.');case errorTypes.GIF_LIMIT:return _('You cannot upload more GIFs.');case errorTypes.GIF_TOO_LARGE:return _('Sorry! The file is too big. Maximum file size is {{maxSize}}MB.',{maxSize:userInfo.getDeciderValue("photoSruGifLimitMb")});case errorTypes.GIF_UNSUPPORTED:return _('GIFs are not supported here.');case errorTypes.MIXED_MEDIA:return _('Media of that type can not be added at this time.');case errorTypes.TOO_MANY_VIDEOS_1:return _('You can only add one video.');case errorTypes.TOO_MANY_PHOTOS_1:return _('You can only add one photo.');case errorTypes.TOO_MANY_PHOTOS:return _('You must remove a photo before adding another one.');case errorTypes.VIDEO_TOO_LARGE:return _('Your video file is too large. Videos should be less than {{maxSize}} MB. <a href="https://support.twitter.com/articles/20172128#import-web" target="_blank">Learn more</a>.',{maxSize:userInfo.getDeciderValue("upload_video_size")});default:return}}
  });
  (function(a,b){typeof define=="function"&&define.amd?define(function(){return a.EXIF=b()}):typeof module=="object"&&module.exports?module.exports=a.EXIF=b():typeof provide=="function"?provide("bower_components/exif-js/exif",a.EXIF=b()):a.EXIF=b()})(this,function(){function h(a,b,c){a.addEventListener?a.addEventListener(b,c,!1):a.attachEvent&&a.attachEvent("on"+b,c)}function i(a){return!!a.exifdata}function j(a,b){b=b||a.match(/^data\:([^\;]+)\;base64,/im)[1]||"",a=a.replace(/^data\:([^\;]+)\;base64,/gim,"");var c=atob(a),d=c.length,e=new ArrayBuffer(d),f=new Uint8Array(e);for(var g=0;g<d;g++)f[g]=c.charCodeAt(g);return e}function k(a,b){var c=new XMLHttpRequest;c.open("GET",a,!0),c.responseType="blob",c.onload=function(a){(this.status==200||this.status===0)&&b(this.response)},c.send()}function l(b,c){function d(a){var d=m(a),e=o(a);b.exifdata=d||{},b.iptcdata=e||{},c&&c.call(b)}if(b.src)if(/^data\:/i.test(b.src)){var e=j(b.src);d(e)}else if(/^blob\:/i.test(b.src)){var f=new FileReader;f.onload=function(a){d(a.target.result)},k(b.src,function(a){f.readAsArrayBuffer(a)})}else{var g=new XMLHttpRequest;g.onload=function(){if(this.status!=200&&this.status!==0)throw"Could not load image";d(g.response),g=null},g.open("GET",b.src,!0),g.responseType="arraybuffer",g.send(null)}else if(window.FileReader&&(b instanceof window.Blob||b instanceof window.File)){var f=new FileReader;f.onload=function(b){a&&console.log("Got file of length "+b.target.result.byteLength),d(b.target.result)},f.readAsArrayBuffer(b)}}function m(b){var c=new DataView(b);a&&console.log("Got file of length "+b.byteLength);if(c.getUint8(0)!=255||c.getUint8(1)!=216)return a&&console.log("Not a valid JPEG"),!1;var d=2,e=b.byteLength,f;while(d<e){if(c.getUint8(d)!=255)return a&&console.log("Not a valid marker at offset "+d+", found: "+c.getUint8(d)),!1;f=c.getUint8(d+1),a&&console.log(f);if(f==225)return a&&console.log("Found 0xFFE1 marker"),u(c,d+4,c.getUint16(d+2)-2);d+=2+c.getUint16(d+2)}}function o(b){var c=new DataView(b);a&&console.log("Got file of length "+b.byteLength);if(c.getUint8(0)!=255||c.getUint8(1)!=216)return a&&console.log("Not a valid JPEG"),!1;var d=2,e=b.byteLength,f=function(a,b){return a.getUint8(b)===56&&a.getUint8(b+1)===66&&a.getUint8(b+2)===73&&a.getUint8(b+3)===77&&a.getUint8(b+4)===4&&a.getUint8(b+5)===4};while(d<e){if(f(c,d)){var g=c.getUint8(d+7);g%2!==0&&(g+=1),g===0&&(g=4);var h=d+8+g,i=c.getUint16(d+6+g);return q(b,h,i)}d++}}function q(a,b,c){var d=new DataView(a),e={},f,g,h,i,j,k=b;while(k<b+c)d.getUint8(k)===28&&d.getUint8(k+1)===2&&(i=d.getUint8(k+2),i in p&&(h=d.getInt16(k+3),j=h+5,g=p[i],f=t(d,k+5,h),e.hasOwnProperty(g)?e[g]instanceof Array?e[g].push(f):e[g]=[e[g],f]:e[g]=f)),k++;return e}function r(b,c,d,e,f){var g=b.getUint16(d,!f),h={},i,j,k;for(k=0;k<g;k++)i=d+k*12+2,j=e[b.getUint16(i,!f)],!j&&a&&console.log("Unknown tag: "+b.getUint16(i,!f)),h[j]=s(b,i,c,d,f);return h}function s(a,b,c,d,e){var f=a.getUint16(b+2,!e),g=a.getUint32(b+4,!e),h=a.getUint32(b+8,!e)+c,i,j,k,l,m,n;switch(f){case 1:case 7:if(g==1)return a.getUint8(b+8,!e);i=g>4?h:b+8,j=[];for(l=0;l<g;l++)j[l]=a.getUint8(i+l);return j;case 2:return i=g>4?h:b+8,t(a,i,g-1);case 3:if(g==1)return a.getUint16(b+8,!e);i=g>2?h:b+8,j=[];for(l=0;l<g;l++)j[l]=a.getUint16(i+2*l,!e);return j;case 4:if(g==1)return a.getUint32(b+8,!e);j=[];for(l=0;l<g;l++)j[l]=a.getUint32(h+4*l,!e);return j;case 5:if(g==1)return m=a.getUint32(h,!e),n=a.getUint32(h+4,!e),k=new Number(m/n),k.numerator=m,k.denominator=n,k;j=[];for(l=0;l<g;l++)m=a.getUint32(h+8*l,!e),n=a.getUint32(h+4+8*l,!e),j[l]=new Number(m/n),j[l].numerator=m,j[l].denominator=n;return j;case 9:if(g==1)return a.getInt32(b+8,!e);j=[];for(l=0;l<g;l++)j[l]=a.getInt32(h+4*l,!e);return j;case 10:if(g==1)return a.getInt32(h,!e)/a.getInt32(h+4,!e);j=[];for(l=0;l<g;l++)j[l]=a.getInt32(h+8*l,!e)/a.getInt32(h+4+8*l,!e);return j}}function t(a,b,c){var d="";for(n=b;n<b+c;n++)d+=String.fromCharCode(a.getUint8(n));return d}function u(b,c){if(t(b,c,4)!="Exif")return a&&console.log("Not valid EXIF data! "+t(b,c,4)),!1;var h,i,j,k,l,m=c+6;if(b.getUint16(m)==18761)h=!1;else{if(b.getUint16(m)!=19789)return a&&console.log("Not valid TIFF data! (no 0x4949 or 0x4D4D)"),!1;h=!0}if(b.getUint16(m+2,!h)!=42)return a&&console.log("Not valid TIFF data! (no 0x002A)"),!1;var n=b.getUint32(m+4,!h);if(n<8)return a&&console.log("Not valid TIFF data! (First offset less than 8)",b.getUint32(m+4,!h)),!1;i=r(b,m,m+n,e,h);if(i.ExifIFDPointer){k=r(b,m,m+i.ExifIFDPointer,d,h);for(j in k){switch(j){case"LightSource":case"Flash":case"MeteringMode":case"ExposureProgram":case"SensingMethod":case"SceneCaptureType":case"SceneType":case"CustomRendered":case"WhiteBalance":case"GainControl":case"Contrast":case"Saturation":case"Sharpness":case"SubjectDistanceRange":case"FileSource":k[j]=g[j][k[j]];break;case"ExifVersion":case"FlashpixVersion":k[j]=String.fromCharCode(k[j][0],k[j][1],k[j][2],k[j][3]);break;case"ComponentsConfiguration":k[j]=g.Components[k[j][0]]+g.Components[k[j][1]]+g.Components[k[j][2]]+g.Components[k[j][3]]}i[j]=k[j]}}if(i.GPSInfoIFDPointer){l=r(b,m,m+i.GPSInfoIFDPointer,f,h);for(j in l){switch(j){case"GPSVersionID":l[j]=l[j][0]+"."+l[j][1]+"."+l[j][2]+"."+l[j][3]}i[j]=l[j]}}return i}var a=!1,b=this,c={},d=c.Tags={36864:"ExifVersion",40960:"FlashpixVersion",40961:"ColorSpace",40962:"PixelXDimension",40963:"PixelYDimension",37121:"ComponentsConfiguration",37122:"CompressedBitsPerPixel",37500:"MakerNote",37510:"UserComment",40964:"RelatedSoundFile",36867:"DateTimeOriginal",36868:"DateTimeDigitized",37520:"SubsecTime",37521:"SubsecTimeOriginal",37522:"SubsecTimeDigitized",33434:"ExposureTime",33437:"FNumber",34850:"ExposureProgram",34852:"SpectralSensitivity",34855:"ISOSpeedRatings",34856:"OECF",37377:"ShutterSpeedValue",37378:"ApertureValue",37379:"BrightnessValue",37380:"ExposureBias",37381:"MaxApertureValue",37382:"SubjectDistance",37383:"MeteringMode",37384:"LightSource",37385:"Flash",37396:"SubjectArea",37386:"FocalLength",41483:"FlashEnergy",41484:"SpatialFrequencyResponse",41486:"FocalPlaneXResolution",41487:"FocalPlaneYResolution",41488:"FocalPlaneResolutionUnit",41492:"SubjectLocation",41493:"ExposureIndex",41495:"SensingMethod",41728:"FileSource",41729:"SceneType",41730:"CFAPattern",41985:"CustomRendered",41986:"ExposureMode",41987:"WhiteBalance",41988:"DigitalZoomRation",41989:"FocalLengthIn35mmFilm",41990:"SceneCaptureType",41991:"GainControl",41992:"Contrast",41993:"Saturation",41994:"Sharpness",41995:"DeviceSettingDescription",41996:"SubjectDistanceRange",40965:"InteroperabilityIFDPointer",42016:"ImageUniqueID"},e=c.TiffTags={256:"ImageWidth",257:"ImageHeight",34665:"ExifIFDPointer",34853:"GPSInfoIFDPointer",40965:"InteroperabilityIFDPointer",258:"BitsPerSample",259:"Compression",262:"PhotometricInterpretation",274:"Orientation",277:"SamplesPerPixel",284:"PlanarConfiguration",530:"YCbCrSubSampling",531:"YCbCrPositioning",282:"XResolution",283:"YResolution",296:"ResolutionUnit",273:"StripOffsets",278:"RowsPerStrip",279:"StripByteCounts",513:"JPEGInterchangeFormat",514:"JPEGInterchangeFormatLength",301:"TransferFunction",318:"WhitePoint",319:"PrimaryChromaticities",529:"YCbCrCoefficients",532:"ReferenceBlackWhite",306:"DateTime",270:"ImageDescription",271:"Make",272:"Model",305:"Software",315:"Artist",33432:"Copyright"},f=c.GPSTags={0:"GPSVersionID",1:"GPSLatitudeRef",2:"GPSLatitude",3:"GPSLongitudeRef",4:"GPSLongitude",5:"GPSAltitudeRef",6:"GPSAltitude",7:"GPSTimeStamp",8:"GPSSatellites",9:"GPSStatus",10:"GPSMeasureMode",11:"GPSDOP",12:"GPSSpeedRef",13:"GPSSpeed",14:"GPSTrackRef",15:"GPSTrack",16:"GPSImgDirectionRef",17:"GPSImgDirection",18:"GPSMapDatum",19:"GPSDestLatitudeRef",20:"GPSDestLatitude",21:"GPSDestLongitudeRef",22:"GPSDestLongitude",23:"GPSDestBearingRef",24:"GPSDestBearing",25:"GPSDestDistanceRef",26:"GPSDestDistance",27:"GPSProcessingMethod",28:"GPSAreaInformation",29:"GPSDateStamp",30:"GPSDifferential"},g=c.StringValues={ExposureProgram:{0:"Not defined",1:"Manual",2:"Normal program",3:"Aperture priority",4:"Shutter priority",5:"Creative program",6:"Action program",7:"Portrait mode",8:"Landscape mode"},MeteringMode:{0:"Unknown",1:"Average",2:"CenterWeightedAverage",3:"Spot",4:"MultiSpot",5:"Pattern",6:"Partial",255:"Other"},LightSource:{0:"Unknown",1:"Daylight",2:"Fluorescent",3:"Tungsten (incandescent light)",4:"Flash",9:"Fine weather",10:"Cloudy weather",11:"Shade",12:"Daylight fluorescent (D 5700 - 7100K)",13:"Day white fluorescent (N 4600 - 5400K)",14:"Cool white fluorescent (W 3900 - 4500K)",15:"White fluorescent (WW 3200 - 3700K)",17:"Standard light A",18:"Standard light B",19:"Standard light C",20:"D55",21:"D65",22:"D75",23:"D50",24:"ISO studio tungsten",255:"Other"},Flash:{0:"Flash did not fire",1:"Flash fired",5:"Strobe return light not detected",7:"Strobe return light detected",9:"Flash fired, compulsory flash mode",13:"Flash fired, compulsory flash mode, return light not detected",15:"Flash fired, compulsory flash mode, return light detected",16:"Flash did not fire, compulsory flash mode",24:"Flash did not fire, auto mode",25:"Flash fired, auto mode",29:"Flash fired, auto mode, return light not detected",31:"Flash fired, auto mode, return light detected",32:"No flash function",65:"Flash fired, red-eye reduction mode",69:"Flash fired, red-eye reduction mode, return light not detected",71:"Flash fired, red-eye reduction mode, return light detected",73:"Flash fired, compulsory flash mode, red-eye reduction mode",77:"Flash fired, compulsory flash mode, red-eye reduction mode, return light not detected",79:"Flash fired, compulsory flash mode, red-eye reduction mode, return light detected",89:"Flash fired, auto mode, red-eye reduction mode",93:"Flash fired, auto mode, return light not detected, red-eye reduction mode",95:"Flash fired, auto mode, return light detected, red-eye reduction mode"},SensingMethod:{1:"Not defined",2:"One-chip color area sensor",3:"Two-chip color area sensor",4:"Three-chip color area sensor",5:"Color sequential area sensor",7:"Trilinear sensor",8:"Color sequential linear sensor"},SceneCaptureType:{0:"Standard",1:"Landscape",2:"Portrait",3:"Night scene"},SceneType:{1:"Directly photographed"},CustomRendered:{0:"Normal process",1:"Custom process"},WhiteBalance:{0:"Auto white balance",1:"Manual white balance"},GainControl:{0:"None",1:"Low gain up",2:"High gain up",3:"Low gain down",4:"High gain down"},Contrast:{0:"Normal",1:"Soft",2:"Hard"},Saturation:{0:"Normal",1:"Low saturation",2:"High saturation"},Sharpness:{0:"Normal",1:"Soft",2:"Hard"},SubjectDistanceRange:{0:"Unknown",1:"Macro",2:"Close view",3:"Distant view"},FileSource:{3:"DSC"},Components:{0:"",1:"Y",2:"Cb",3:"Cr",4:"R",5:"G",6:"B"}},p={120:"caption",110:"credit",25:"keywords",55:"dateCreated",80:"byline",85:"bylineTitle",122:"captionWriter",105:"headline",116:"copyright",15:"category"};return c.getData=function(a,b){return(a instanceof Image||a instanceof HTMLImageElement)&&!a.complete?!1:(i(a)?b&&b.call(a):l(a,b),!0)},c.getTag=function(a,b){if(!i(a))return;return a.exifdata[b]},c.getAllTags=function(a){if(!i(a))return{};var b,c=a.exifdata,d={};for(b in c)c.hasOwnProperty(b)&&(d[b]=c[b]);return d},c.pretty=function(a){if(!i(a))return"";var b,c=a.exifdata,d="";for(b in c)c.hasOwnProperty(b)&&(typeof c[b]=="object"?c[b]instanceof Number?d+=b+" : "+c[b]+" ["+c[b].numerator+"/"+c[b].denominator+"]\r\n":d+=b+" : ["+c[b].length+" values]\r\n":d+=b+" : "+c[b]+"\r\n");return d},c.readFromBinaryFile=function(a){return m(a)},typeof define=="function"&&define.amd&&define("exif-js",[],function(){return c}),c})
  define("app/utils/image_resize",["module","require","exports","app/utils/file","app/utils/image","app/data/user_info","bower_components/exif-js/exif"],function(module, require, exports) {
  var file=require("app/utils/file"),image=require("app/utils/image"),userInfo=require("app/data/user_info"),EXIF=require("bower_components/exif-js/exif"),EXIF_ORIENTATIONS={TOP_LEFT:1,TOP_RIGHT:2,BOTTOM_RIGHT:3,BOTTOM_LEFT:4,LEFT_TOP:5,RIGHT_TOP:6,RIGHT_BOTTOM:7,LEFT_BOTTOM:8},imageResize={EXIF_ORIENTATIONS:EXIF_ORIENTATIONS,getOrientation:function(a,b){a?EXIF.getData(a,function(){b(EXIF.getTag(this,"Orientation")||EXIF_ORIENTATIONS.TOP_LEFT)}):b(EXIF_ORIENTATIONS.TOP_LEFT)},drawImageWithOrientation:function(a,b,c,d,e){a.save();switch(e){case EXIF_ORIENTATIONS.TOP_RIGHT:a.scale(-1,1),a.drawImage(b,-c,0,c,d);break;case EXIF_ORIENTATIONS.BOTTOM_RIGHT:a.rotate(Math.PI),a.drawImage(b,-c,-d,c,d);break;case EXIF_ORIENTATIONS.BOTTOM_LEFT:a.scale(1,-1),a.drawImage(b,0,-d,c,d);break;case EXIF_ORIENTATIONS.LEFT_TOP:a.translate(c/2,d/2),a.rotate(Math.PI/2),a.scale(1,-1),a.drawImage(b,-d/2,-c/2,d,c);break;case EXIF_ORIENTATIONS.RIGHT_TOP:a.translate(c/2,d/2),a.rotate(Math.PI/2),a.drawImage(b,-d/2,-c/2,d,c);break;case EXIF_ORIENTATIONS.RIGHT_BOTTOM:a.translate(c/2,d/2),a.rotate(Math.PI/2),a.scale(-1,1),a.drawImage(b,-d/2,-c/2,d,c);break;case EXIF_ORIENTATIONS.LEFT_BOTTOM:a.translate(c/2,d/2),a.rotate(-Math.PI/2),a.drawImage(b,-d/2,-c/2,d,c);break;default:a.drawImage(b,0,0,c,d)}a.restore()},widthAndHeightForOrientation:function(a,b){return b==EXIF_ORIENTATIONS.LEFT_TOP||b==EXIF_ORIENTATIONS.RIGHT_TOP||b==EXIF_ORIENTATIONS.RIGHT_BOTTOM||b==EXIF_ORIENTATIONS.LEFT_BOTTOM?{width:a.height,height:a.width}:{width:a.width,height:a.height}},progressiveResizeRoughPass:function(a,b,c){var d=a;while(d.width/2>b||d.height/2>c){var e=document.createElement("canvas");e.width=d.width/2,e.height=d.height/2,e.getContext("2d").drawImage(d,0,0,d.width/2,d.height/2),d=e}return d},progressiveResize:function(a,b,c){var d=imageResize.progressiveResizeRoughPass(a,b,c),e=document.createElement("canvas");e.width=b,e.height=c;var f=e.getContext("2d");f.drawImage(d,0,0,b,c);var g=e.toDataURL("image/jpeg").split(";base64,")[1],h=b>image.MAX_DIMENSION||c>image.MAX_DIMENSION,i=image.getBase64Length(g)>file.MAX_UPLOAD_FILE_SIZE,j=.8;return!h&&!i?g:(h&&(j=b>c?image.MAX_DIMENSION/b:image.MAX_DIMENSION/c),imageResize.progressiveResize(a,b*j,c*j))},resize:function(a,b,c,d,e,f){image.hasCanvas()?imageResize.getOrientation(c,function(f){imageResize.resizeWorker(a,b,c,d,f,e)}):e(a,b.split(";base64,")[1])},resizeWorker:function(a,b,c,d,e,f){var g=new Image,h,i;g.onload=function(){var c=imageResize.widthAndHeightForOrientation(g,e);h=c.width,i=c.height;if(!h||!i){f(a,!1);return}var d=b.split(";base64,")[1];if(image.getBase64Length(d)<file.MAX_UPLOAD_FILE_SIZE&&h<image.MAX_DIMENSION&&i<image.MAX_DIMENSION&&e==EXIF_ORIENTATIONS.TOP_LEFT){f(a,d);return}var j=document.createElement("canvas");j.width=h,j.height=i,initialContext=j.getContext("2d"),imageResize.drawImageWithOrientation(initialContext,g,h,i,e),f(a,imageResize.progressiveResize(j,h,i))},g.onerror=function(){f(a,!1)},g.src=b}};module.exports=imageResize
  });
  define("app/ui/with_image_selection",["module","require","exports","app/utils/file_selection_error_types","app/utils/file","app/utils/image","app/utils/image_resize","app/data/user_info","core/utils"],function(module, require, exports) {
  function withImageSelection(){this.resize=imageResize.resize.bind(image),this.isAnimatedGif=file.isAnimatedGif.bind(file),this.isImage=file.isImage.bind(file),this.validateFileSize=file.validateFileSize.bind(file),this.defaultAttrs({maxSizeInBytes:52428800,uploadType:"",gifSupport:!0,imageFormats:["image/gif","image/jpeg","image/jpg","image/png"],swfSelector:".swf-container"}),this.maxGifSizeInBytes=function(){return 1048576*userInfo.getDeciderValue("photoSruGifLimitMb")},this.imageFormats=function(a){return a?this.attr.imageFormats.filter(function(a){return a!=="image/gif"}).join(","):this.attr.imageFormats.join(",")},this.validateImage=function(a,b){if(b){var c=this.isAnimatedGif(a,b);if(c&&!this.attr.gifSupport)return this.addFileError(errorTypes.GIF_UNSUPPORTED),!1;var d=c?this.validateFileSize(b,this.maxGifSizeInBytes()):this.validateFileSize(b,this.attr.maxSizeInBytes);if(!d)return this.addFileError(c?errorTypes.GIF_TOO_LARGE:errorTypes.FILE_TOO_LARGE),!1}return!0},this.triggerImagePickerAdd=function(a){this.trigger("uiImagePickerAdd",utils.merge({message:"flash"},this.eventDataOverrides,!0))},this.gotFlashImageData=function(a,b,c){if(!this.isImage(a)&&!this.isAnimatedGif(a)){this.addFileError(errorTypes.NOT_IMAGE);return}this.trigger("uiImagePickerSelectedFlash"),this.trigger("uiImagePickerNoFileReaderError"),this.triggerImagePickerAdd("flash");var d=this.getUploadId();this.addThumbnail({imageData:c,fileName:a,uploadId:d}),this.readyFileData(b,d),this.trigger("uiImagePickerFileReady",{uploadType:this.attr.uploadType})},this.gotFlashImageError=function(a,b){this.addFileError(a)},this.gotResizedImageData=function(a,b,c){var d=c&&c.isGif;if(!b){this.addFileError(errorTypes.NOT_IMAGE);return}if(this.mediaItems&&this.mediaItems.length&&d){this.mediaItems[0].info.isGif?this.addFileError(errorTypes.GIF_LIMIT):this.addFileError(errorTypes.MIXED_MEDIA);return}this.triggerImagePickerAdd("html5");var e=this.getUploadId();d&&(this.gifId=e),this.addThumbnail({imageData:b,fileName:a,uploadId:e,info:c}),this.select("fileNameSelector").attr("value",a);var f=b.split(",");f.length>1&&(b=f[1]),this.readyFileData(b,e,c),this.trigger("uiImagePickerFileReady",{uploadType:this.attr.uploadType})}}var errorTypes=require("app/utils/file_selection_error_types"),file=require("app/utils/file"),image=require("app/utils/image"),imageResize=require("app/utils/image_resize"),userInfo=require("app/data/user_info"),utils=require("core/utils");module.exports=withImageSelection
  });
  define("app/ui/with_video_selection",["module","require","exports","app/utils/file_selection_error_types","app/utils/file","app/utils/shared_objects","app/data/user_info","app/utils/video"],function(module, require, exports) {
  function withVideoSelection(){var a=20,b=15,c=["video/mp4","video/quicktime","video/x-m4v"];this.defaultAttrs({videoSupport:!1}),this.videoFormats=function(a){return!a&&this.hasVideoSupport()?this.canPlayFormats().join(","):""},this.canPlayFormats=function(){if(this.supportedVideoFormats===undefined){var a=[],b=document.createElement("video");this.supportedVideoFormats=c.filter(function(a){return!!b.canPlayType(a)})}return this.attr.environment=="selenium"&&!this.supportedVideoFormats.length&&(this.supportedVideoFormats=["video/mp4"]),this.supportedVideoFormats},this.hasVideoSupport=function(){if(this.hasVideoSupportResult===undefined){var a=!!document.createElement("video").canPlayType('video/mp4; codecs="avc1.42E01E,mp4a.40.2"');this.attr.environment=="selenium"&&!a&&(a=!0),this.hasVideoSupportResult=file.hasFileReader()&&userInfo.getDecider("web_upload_video")&&this.attr.videoSupport&&a}return this.hasVideoSupportResult},this.gotVideoSuccess=function(b,c,d){var e=this.getUploadId(),f={scribeData:{items:[{media_details:{duration:c.duration,size:b.fileSize}}]}};userInfo.getDeciderValue("web_upload_video_advanced")&&this.trigger("uiVideoPickerProAdd",f),this.trigger("uiVideoPickerAdd",f),this.addThumbnail({imageData:d,duration:c.duration>a?a:c.duration,fileName:"video-thumbnail-"+e,uploadId:e,info:b}),this.readyFileData("",e,b),c.duration>a&&this.trigger(document,"uiMediaEditDialogOpen",{fileId:b.fileId})},this.gotVideoFailure=function(){this.addFileError(errorTypes.FILE_UNSUPPORTED)},this.gotVideo=function(a){var b=sharedObjects.get(a.fileId),c=document.createElement("video");c.src=file.getObjectUrl(b),video.getFrame(c).then(this.gotVideoSuccess.bind(this,a,c)).fail(this.gotVideoFailure.bind(this)).always(function(){file.revokeObjectUrl(c.src)})},this.validateVideo=function(a,c){if(!this.hasVideoSupport())return this.addFileError(errorTypes.NOT_IMAGE),!1;if(this.canPlayFormats().indexOf(c.type)===-1)return this.addFileError(errorTypes.FILE_UNSUPPORTED),!1;var d=userInfo.getDeciderValue("upload_video_size")||b;return c.size>d*1024*1024?(this.addFileError(errorTypes.VIDEO_TOO_LARGE),!1):!0}}var errorTypes=require("app/utils/file_selection_error_types"),file=require("app/utils/file"),sharedObjects=require("app/utils/shared_objects"),userInfo=require("app/data/user_info"),video=require("app/utils/video");module.exports=withVideoSelection
  });
  define("app/ui/with_file_selection",["module","require","exports","core/compose","app/utils/file_selection_error_types","app/utils/file","app/utils/image","app/data/user_info","app/ui/with_image_selection","app/ui/with_video_selection"],function(module, require, exports) {
  function withFileSelection(){this.defaultAttrs({buttonSelector:".btn",fileDataSelector:"input.file-data",fileDataString:"media_data[]",emptyFileDataString:"media_data_empty",fileInputString:"media[]",emptyFileInputString:"media_empty",fileNameSelector:"input.file-name",fileNameString:"media_file_name",fileSelector:"input.file-input",uploadType:"",shouldInterceptTab:!0}),compose.mixin(this,[withImageSelection,withVideoSelection]),this.gotFileHandle=function(a,b){this.mode()=="html5"?file.isVideo(a)?this.gotVideo(file.getFileInfo(a,b)):file.getFileData(a,b).then(this.gotImageData.bind(this)):this.gotFileInput(a)},this.reset=function(){this.resetInput("fileSelector",this.attr.emptyFileInputString),this.resetInput("fileDataSelector",this.attr.emptyFileDataString),this.trigger("uiPreviewThumbnailHide")},this.getUploadId=function(){return+(new Date)},this.getMediaCategory=function(a){var b=this.attr.mediaCategoryPrefix,c;return a.isGif?c="gif":a.isVideo&&(c="video"),b&&c?b+c:null},this.gotFileInput=function(a){this.triggerImagePickerAdd("html4");var b=this.getUploadId();this.addThumbnail({fileName:a,uploadId:b}),this.readyFileInput(b),this.trigger("uiImagePickerFileReady",{uploadType:this.attr.uploadType,uploadId:b})},this.readyFileInput=function(a){this.select("fileSelector").attr("name",this.attr.fileInputString),this.select("fileSelector").attr("data-upload-id",a)},this.readyFileData=function(a,b,c){c=c||{};var d=this.attr.photoLimit&&this.attr.photoLimit!=1,e=c.isGif,f=c.isVideo,g=c.fileId&&(this.attr.sruAllMedia||e||f),h=this.getMediaCategory(c),i=d?$('<input type="hidden" class="multi-photo-data">'):this.select("fileDataSelector");i.attr({value:a,"data-file-id":g?c.fileId:undefined,"data-file-type":c.fileType,"data-upload-id":b,"data-metadata":c.metadata?JSON.stringify(c.metadata):undefined,"data-media-category":h,name:d?undefined:this.attr.fileDataString}),g&&this.trigger("uiMediaSruInit",{fileId:c.fileId,uploadId:b,mediaCategory:h}),d&&this.select("multiPhotoDataContainerSelector").append(i),this.resetInput("fileSelector",this.attr.emptyFileInputString)},this.resetInput=function(a,b){var c=this.select(a);c.val("");var d=c.clone().attr("name",b);c.replaceWith(d)},this.addThumbnail=function(a){this.trigger("uiPreviewThumbnailAdd",a)},this.setupFlash=function(){var a="swift_tweetbox_callback_"+ +(new Date),b="swift_tweetbox_error_callback_"+ +(new Date);window[a]=this.gotFlashImageData.bind(this),window[b]=this.gotFlashImageError.bind(this),setTimeout(function(){this.loadSwf(a,b)}.bind(this),500)},this.mode=function(){return this.attr.forceHTML5FileUploader&&(this._mode="html5"),this._mode=this._mode||image.mode(),this._mode},this.validate=function(a,b){if(file.isAnimatedGif(a,b)||file.isImage(a,b))return this.validateImage(a,b);if(file.isVideo(a,b))return this.validateVideo(a,b);var c=this.hasVideoSupport()?errorTypes.FILE_UNSUPPORTED:errorTypes.NOT_IMAGE;return this.addFileError(c),!1},this.setup=function(){this.mode()=="flash"&&this.setupFlash(),this.select("fileNameSelector").attr("name",this.attr.fileNameString),this.select("fileDataSelector").attr("name",this.attr.fileDataString),this.select("fileSelector").attr("name",this.attr.fileInputString)},this.fileSelected=function(a){var b=this.select("fileSelector").get(0),c=file.getFileName(b.value);if(!c)return;var d=file.getFileHandle(b);if(!this.validate(c,d))return;this.gotFileHandle(c,d)},this.maybeTabToNextFocusable=function(a){if(a.which==9){a.preventDefault();var b=a.shiftKey?-1:1,c=$("button,input,textarea,object,a[href],[tabindex],[contenteditable=true]").filter(":visible:not(:disabled):not([tabindex=-1])");c.eq(c.index(a.target)+b).focus()}},this.focusFileInput=function(){this.select("fileSelector").focus()},this.after("initialize",function(){this.setup(),this.on("change",this.fileSelected),this.attr.shouldInterceptTab&&this.on("keydown",this.maybeTabToNextFocusable),this.on("click",{fileSelector:this.focusFileInput})})}var compose=require("core/compose"),errorTypes=require("app/utils/file_selection_error_types"),file=require("app/utils/file"),image=require("app/utils/image"),userInfo=require("app/data/user_info"),withImageSelection=require("app/ui/with_image_selection"),withVideoSelection=require("app/ui/with_video_selection");module.exports=withFileSelection
  });
  define("app/ui/image_selector",["module","require","exports","core/i18n","core/component","app/utils/file","app/utils/image","app/utils/shared_objects","core/utils","app/utils/drag_drop_helper","app/utils/file_selection_error_types","app/utils/file_selection_error_messages","app/ui/with_file_selection"],function(module, require, exports) {
  function imageSelector(){this.defaults={swfHeight:36,swfWidth:106,tweetBoxSelector:".tweet-form",photoButtonSelector:".file-input",photoIconSelector:".tweet-camera",tooltipElementsSelector:".file-input,button.btn",addPhotoLabelSelector:".add-photo-label",multiPhotoDataContainerSelector:".multi-photo-data-container",cameraIconSelector:".tweet-camera.Icon",dragMediaTextSelector:".tweet-drag-photo-here",interceptAvatarImageData:!1,photoLimit:1,disabledClass:"disabled",tooltipClass:"js-tooltip",disabledAttribute:"disabled",isMinimalButtonLabels:!1},this.disableButton=function(){this.isDisabled=!0,this.$node.addClass(this.attr.disabledClass),this.select("buttonSelector").prop(this.attr.disabledAttribute,!0).addClass(this.attr.disabledClass)},this.enableButton=function(){this.isDisabled=!1,this.$node.removeClass(this.attr.disabledClass),this.select("buttonSelector").prop(this.attr.disabledAttribute,!1).removeClass(this.attr.disabledClass)},this.thumbAdded=function(a,b){b=utils.merge({info:{}},b),this.singleSelectionType=b.info.isVideo||b.info.isGif,this.mediaItems.push(b),this.updateInterface();var c=utils.merge({isGif:b.info.isGif},b);this.trigger("uiPreviewThumbnailShow",c);var d=this.$node.closest(this.attr.tweetBoxSelector);d.trigger("uiComposerDisableExclusiveAttachments"),this.canUpload()?this.enableButton():this.disableButton()},this.updateInterface=function(){this.updateAddPhotoLabel(),this.updateAcceptedFormats()},this.thumbRemoved=function(a,b){var c=b.uploadId;this.select("multiPhotoDataContainerSelector").find("[data-upload-id="+c+"]").remove(),this.mediaItems=this.mediaItems.filter(function(a){return a.uploadId!=c}),this.singleSelectionType=!1,this.enableButton(),this.updateInterface(),this.mediaItems.length==0&&(this.trigger("uiPreviewThumbnailHide"),this.trigger("uiComposerEnableExclusiveAttachments"))},this.removeAllThumbs=function(){this.mediaItems=[],this.singleSelectionType=!1,this.updateInterface(),this.reset(),this.enableButton(),this.select("multiPhotoDataContainerSelector").empty(),this.trigger("uiComposerEnableExclusiveAttachments")},this.gotImageData=function(a,b,c){c.isGif?this.gotResizedImageData(a,b.split(";base64,")[1],c):this.resize(a,b,sharedObjects.get(c.fileId),2048,function(a,b){this.gotResizedImageData(a,b,c)}.bind(this))},this.interceptGotImageData=function(a,b){if(!this.isDisabled&&this.canUpload(b.info,!0)){var c=b.name,d=b.info,e=sharedObjects.get(d.fileId);e?d&&d.isVideo?this.mediaItems.length>0?this.addFileError(errorTypes.MIXED_MEDIA):this.validateVideo(c,e)&&this.gotVideo(file.getFileInfo(c,e)):this.validateImage(c,e)&&file.getFileData(c,e,d).then(this.gotImageData.bind(this)):(this.trigger("uiImagePickerNoFileReaderError"),this.trigger("uiShowError",{message:_('Error uploading media')}))}},this.interceptAvatarImageData=function(a,b){b.uploadType==="avatar"&&this.gotResizedImageData(b.fileName,b.fileData)},this.addFileError=function(a){var b=genericFileErrorMessage(a);b&&this.trigger("uiShowError",{message:b}),this.trigger("uiImagePickerError",{message:a})},this.loadSwf=function(a,b){image.loadPhotoHelperSwf(this.select("swfSelector"),a,b,this.attr.swfHeight,this.attr.swfWidth)},this.imageSelectorClicked=function(a,b){this.supportsImageUpload()?this.trigger("uiImagePickerClick",this.eventDataOverrides):(this.trigger("uiImagePickerNoFileReaderError"),this.trigger("uiShowError",{message:_('You need Adobe Flash to upload photos. <a href="http://get.adobe.com/flashplayer">Install Adobe Flash</a>')}),a.preventDefault(),a.stopPropagation())},this.supportsImageUpload=function(){return file.hasFileReader()||image.hasFlash()},this.canUpload=function(a,b){return a=a||{},this.attr.photoLimit==this.mediaItems.length?(b&&(this.attr.photoLimit==1?this.addFileError(errorTypes.TOO_MANY_PHOTOS_1):a.isGif||a.isVideo?this.addFileError(errorTypes.MIXED_MEDIA):this.addFileError(errorTypes.TOO_MANY_PHOTOS)),!1):this.singleSelectionType?(b&&(this.mediaItems[0].info.isGif&&a.isGif?this.addFileError(errorTypes.GIF_LIMIT):this.mediaItems[0].info.isVideo&&a.isVideo?this.addFileError(errorTypes.TOO_MANY_VIDEOS_1):this.addFileError(errorTypes.MIXED_MEDIA)),!1):!0},this.updateAddPhotoLabel=function(){var a="",b="",c=!1,d=this.mediaItems.length==1&&this.mediaItems[0].info.isGif,e=this.mediaItems.length==1&&this.mediaItems[0].info.isVideo;this.mediaItems.length==0?this.attr.photoLimit==1?this.hasVideoSupport()?(a=_('Add photo/video'),b=_('Add photo or video')):(a=_('Add photo'),b=_('Add photo')):this.hasVideoSupport()?(a=_('Add photos/video'),b=_('Add photos or video')):(a=_('Add photos'),b=_('Add photos')):d?(a=_('1 added'),b=_('You can only add one GIF')):e?(a=_('1 added'),b=_('You can only add one video')):this.attr.photoLimit==1&&this.mediaItems.length==1?(a=_('1 added'),b=_('You can only add one photo')):this.attr.photoLimit==4&&this.mediaItems.length==4?(a=_('4 added'),b=_('You must remove a photo before adding another one'),c=!0):(a=_('Add more'),b=_('Add more photos'),c=!0),this.select("tooltipElementsSelector").attr("data-original-title",b),this.attr.isMinimalButtonLabels||(this.select("photoButtonSelector").prev("span.visuallyhidden").text(a),this.select("addPhotoLabelSelector").text(a)),this.select("cameraIconSelector").toggleClass("Icon--camera",!c).toggleClass("Icon--cameraPlus",c)},this.updateAcceptedFormats=function(){var a=this.videoFormats(this.mediaItems.length),b=this.imageFormats(this.mediaItems.length),c=b+","+a;this.select("photoButtonSelector").prop("accept",c)},this.overrideScribeContext=function(a,b){this.eventDataOverrides={scribeContext:b}},this.enableTooltip=function(a){this.select("tooltipElementsSelector").addClass(this.attr.tooltipClass)},this.disableTooltip=function(a){this.select("tooltipElementsSelector").removeClass(this.attr.tooltipClass)},this.dragEnter=function(a,b){this.isDisabled||this.showDragTarget(b)},this.showDragTarget=function(a){var b=_('Drag file here'),c=a&&dragDropHelper.hasFiles(a,file.IMAGE_TYPE_REGEXP),d=a&&dragDropHelper.hasFiles(a,file.VIDEO_TYPE_REGEXP),e=a&&dragDropHelper.hasFiles(a,file.GIF_TYPE_REGEXP),f=this.mediaItems.length!=0&&(d||e||this.singleSelectionType)||this.mediaItems.length>=this.attr.photoLimit,g=this.$node.closest(this.attr.tweetBoxSelector);f?g.removeClass("is-droppable"):(c?b=_('Drag photo here'):e?b=_('Drag GIF here'):d&&(b=_('Drag video here')),g.addClass("is-droppable")),g.find(this.attr.dragMediaTextSelector).html(b)},this.dragLeave=function(a,b){var c=this.$node.closest(this.attr.tweetBoxSelector);c.removeClass("is-droppable")},this.after("initialize",function(){this.on("click",{photoButtonSelector:this.imageSelectorClicked});var a=this.$node.closest(this.attr.tweetBoxSelector);this.on(a,"uiPreviewThumbnailRemove",this.thumbRemoved),this.on(a,"uiPreviewThumbnailAdd",this.thumbAdded),this.on(a,"uiPreviewThumbnailRemoveAll",this.removeAllThumbs),this.on(a,"uiGotImageData uiGotFileData",this.interceptGotImageData),this.on(a,"uiEnableImageSelection",this.enableButton),this.on(a,"uiDisableImageSelection",this.disableButton),this.on(a,"uiOverrideImageSelectorScribeContext",this.overrideScribeContext),this.on(a,"uiEnableImageSelectionTooltip",this.enableTooltip),this.on(a,"uiDisableImageSelectionTooltip",this.disableTooltip),this.on(a,"uiComposerEnableExclusiveAttachments",this.enableButton),this.on(a,"uiComposerDisableExclusiveAttachments",this.disableButton),this.attr.interceptAvatarImageData&&this.on(document,"uiImageSave",this.interceptAvatarImageData),this.on(document.body,"uiDragEnter",this.dragEnter),this.on(document.body,"uiDragLeave uiDrop",this.dragLeave),this.mediaItems=[],this.updateInterface()})}var _=require("core/i18n"),defineComponent=require("core/component"),file=require("app/utils/file"),image=require("app/utils/image"),sharedObjects=require("app/utils/shared_objects"),utils=require("core/utils"),dragDropHelper=require("app/utils/drag_drop_helper"),errorTypes=require("app/utils/file_selection_error_types"),genericFileErrorMessage=require("app/utils/file_selection_error_messages"),withFileSelection=require("app/ui/with_file_selection"),ImageSelector=defineComponent(imageSelector,withFileSelection);module.exports=ImageSelector
  });
  define("app/utils/typeahead_helpers",["module","require","exports"],function(module, require, exports) {
  function tokenizeText(a){return a.trim().toLowerCase().split(/[\s_,.-]+/)}function getFirstChar(a){var b;return multiByteRegex.test(a.substr(0,1))?b=a.substr(0,2):b=a.charAt(0),b}function isAccountMalformed(a){return!a||!a.screen_name||!a.name||!a.profile_image_url&&!a.profile_image_url_https}var multiByteRegex=/[\uD800-\uDFFF]/;module.exports={tokenizeText:tokenizeText,getFirstChar:getFirstChar,isAccountMalformed:isAccountMalformed}
  });
  define("app/ui/typeahead/accounts_renderer",["module","require","exports","core/i18n","core/component","app/utils/typeahead_helpers"],function(module, require, exports) {
  function accountsRenderer(){this.defaultAttrs({accountsListSelector:".js-typeahead-accounts",accountsItemSelector:".typeahead-account-item",accountsShortcutSelector:".typeahead-accounts-shortcut",accountsShortcutShow:!1,datasources:["accounts"],socialContextMapping:{FOLLOWING:1,FOLLOWS:8}}),this.isAccountMalformedAndScribe=function(a){var b=helpers.isAccountMalformed(a);return b&&this.trigger("uiTypeaheadAccountMalformed"),b},this.renderAccounts=function(a,b){this.$accountsList.find(this.attr.accountsItemSelector).remove();var c=[];this.attr.datasources.forEach(function(a){c=c.concat(b.suggestions[a]||[])});if(!c.length){this.clearAccounts();return}this.updateShortcut(b.queryData.query),c.forEach(function(a){if(this.isAccountMalformedAndScribe(a))return;var b=this.$accountItemTemplate.clone(!1);b.attr("data-user-id",a.id),b.attr("data-user-screenname",a.screen_name),b.data("item",a);var c=b.find("a");c.attr("href","/"+a.screen_name),c.attr("data-search-query",a.id),c.find(".avatar").attr("src",this.getAvatar(a)),c.find(".fullname").text(a.name),c.find(".username b").text(a.screen_name),a.verified&&c.find(".js-verified").removeClass("hidden");if(this.attr.deciders.showDebugInfo){var d=a.prefetched;c.attr("title",(d?"local":"remote")+" user, score: "+a.rounded_score)}if(a.social_proof!==0&&this.attr.deciders.showSocialContext){var e=c.find(".typeahead-social-context"),f=this.getSocialContext(a);f&&(e.text(f),c.addClass("has-social-context"))}b.insertBefore(this.$accountsShortcut)},this),this.$accountsList.addClass("has-results"),this.$accountsList.show()},this.getAvatar=function(a){var b=a.profile_image_url_https,c=this.attr.deciders.showSocialContext;return b&&(b=b.replace(/^https?:/,""),b=c?b:b.replace(/_normal(\..*)?$/i,"_mini$1")),b},this.isMutualFollow=function(a){return this.currentUserFollowsAccount(a)&&this.accountFollowsCurrentUser(a)},this.currentUserFollowsAccount=function(a){var b=this.attr.socialContextMapping.FOLLOWING;return!!(a&b)},this.accountFollowsCurrentUser=function(a){var b=this.attr.socialContextMapping.FOLLOWS;return!!(a&b)},this.getSocialContext=function(a){var b=a.social_proof;return this.isMutualFollow(b)?_('You follow each other'):this.currentUserFollowsAccount(b)?_('Following'):this.accountFollowsCurrentUser(b)?_('Follows you'):a.first_connecting_user_name?a.connecting_user_count>1?_('Followed by {{user}} and {{number}} others',{user:a.first_connecting_user_name,number:a.connecting_user_count}):_('Followed by {{user}}',{user:a.first_connecting_user_name}):!1},this.updateShortcut=function(a){this.$accountsShortcut.toggle(this.attr.accountsShortcutShow);var b=this.$accountsShortcut.find("a");b.attr("href","/search?f=users&q="+encodeURIComponent(a)),b.attr("data-search-query",a),a=$("<div/>").text(a).html(),b.html(_('Search all people for <strong>{{query}}</strong>',{query:a}))},this.clearAccounts=function(){this.$accountsList.removeClass("has-results"),this.$accountsList.hide()},this.after("initialize",function(){this.$accountsList=this.select("accountsListSelector").first(),this.$accountsShortcut=this.select("accountsShortcutSelector").first(),this.$accountItemTemplate=this.select("accountsItemSelector").first().clone(!1),this.$accountsList.hide(),this.on("uiTypeaheadRenderResults",this.renderAccounts)})}var _=require("core/i18n"),defineComponent=require("core/component"),helpers=require("app/utils/typeahead_helpers");module.exports=defineComponent(accountsRenderer)
  });
  define("app/ui/typeahead/dm_conversations_renderer",["module","require","exports","core/component"],function(module, require, exports) {
  function dmConversationsRenderer(){this.defaultAttrs({resultsSelector:".typeahead-dm-conversation-items",itemSelector:".typeahead-dm-conversation-item",resultsClass:"has-results"}),this.render=function(a,b){var c=b&&b.suggestions&&b.suggestions.dmConversations,d=(c||[]).map(this.createSuggestion,this);this.showSuggestions(d)},this.createSuggestion=function(a){var b=this.template.clone(!1);return b.find("[role='option']").html(a.html),b.data("item",{type:"dmConversation",suggestion:a}),b},this.selectConversation=function(a,b){if(b&&b.item&&b.item.type=="dmConversation"){var c=b.item.suggestion;this.trigger("uiRenderConversationView",{conversation_id:c.id,name:c.emojified_title||c.title})}},this.showSuggestions=function(a){a&&a.length?this.results.html(a).addClass(this.attr.resultsClass):this.results.empty().removeClass(this.attr.resultsClass)},this.after("initialize",function(){this.results=this.select("resultsSelector"),this.template=this.select("itemSelector").first().clone(!1),this.on("uiTypeaheadRenderResults",this.render),this.on("uiTypeaheadItemSelected",this.selectConversation)})}var defineComponent=require("core/component");module.exports=defineComponent(dmConversationsRenderer)
  });
  define("app/ui/typeahead/saved_searches_renderer",["module","require","exports","core/component"],function(module, require, exports) {
  function savedSearchesRenderer(){this.defaultAttrs({savedSearchesListSelector:".saved-searches-list",savedSearchesSelector:".saved-searches-list",savedSearchesItemSelector:".typeahead-saved-search-item",savedSearchesItemAnchorSelector:"a.js-nav",savedSearchesTitleSelector:".saved-searches-title",savedSearchesBlockSelector:".typeahead-saved-searches",savedSearchesRemoveSelector:".typeahead-saved-search-item .Icon--close",datasources:["savedSearches"]}),this.renderSavedSearches=function(a,b){this.$savedSearchesList.empty();var c=[];this.attr.datasources.forEach(function(a){c=c.concat(b.suggestions[a]||[])});if(c.length===0){this.$savedSearchesTitle.hide(),this.$savedSearchesBlock.removeClass("has-items");return}var d=b.queryData.query==="",e=this.$savedSearchesTitle.attr("id");c.reverse(),c.forEach(function(a){var b=this.$savedSearchItemTemplate.clone(!1);b.data("item",a);var c=b.find("a");c.attr("href",a.saved_search_path),c.attr("data-search-query",a.query),c.attr("data-query-source",a.search_query_source),c.attr("data-saved-search-id",a.id),c.append($("<span>").text(a.name)),d&&c.attr("aria-describedby",e),this.$savedSearchesList.append(b)},this),this.$savedSearchesTitle.toggle(d),this.$savedSearchesBlock.addClass("has-items")},this.removeSavedSearch=function(a,b){var c=$(a.target).closest(this.attr.savedSearchesItemSelector),d=c.find(this.attr.savedSearchesItemAnchorSelector),e=d.attr("data-saved-search-id");c.siblings().length==0&&(this.$savedSearchesTitle.hide(),this.$savedSearchesBlock.removeClass("has-items")),c.remove(),this.trigger("uiRemoveSavedSearch",{id:e,scribeComponent:"top_bar_searchbox"})},this.after("initialize",function(){this.$savedSearchItemTemplate=this.select("savedSearchesItemSelector").clone(!1),this.$savedSearchesList=this.select("savedSearchesSelector"),this.$savedSearchesTitle=this.select("savedSearchesTitleSelector"),this.$savedSearchesBlock=this.select("savedSearchesBlockSelector"),this.on("uiTypeaheadRenderResults",this.renderSavedSearches),this.on("click",{savedSearchesRemoveSelector:this.removeSavedSearch})})}var defineComponent=require("core/component");module.exports=defineComponent(savedSearchesRenderer)
  });
  define("app/ui/typeahead/recent_searches_renderer",["module","require","exports","core/component"],function(module, require, exports) {
  function recentSearchesRenderer(){this.defaultAttrs({recentSearchesSelector:".recent-searches-list",recentSearchesItemSelector:".typeahead-recent-search-item",recentSearchesDismissSelector:".typeahead-recent-search-item .Icon--close",recentSearchesBlockSelector:".typeahead-recent-searches",recentSearchesTitleSelector:".recent-searches-title",recentSearchesClearAllSelector:".clear-recent-searches",datasources:["recentSearches"]}),this.deleteRecentSearch=function(a,b){var c=$(a.target).closest(this.attr.recentSearchesItemSelector),d=c.find("a.js-nav"),e=d.data("search-query");this.$recentSearchesList.children().length==1&&(this.$recentSearchesTitle.hide(),this.$recentSearchesBlock.removeClass("has-results"),this.$recentSearchesBlock.removeClass("has-items"),this.$recentSearchesClearAll.hide()),c.remove(),this.trigger("uiTypeaheadDeleteRecentSearch",{query:e})},this.deleteAllRecentSearches=function(a,b){this.$recentSearchesList.empty(),this.$recentSearchesTitle.hide(),this.$recentSearchesBlock.removeClass("has-results"),this.$recentSearchesBlock.removeClass("has-items"),this.$recentSearchesClearAll.hide(),this.trigger("uiTypeaheadDeleteRecentSearch",{deleteAll:!0})},this.renderRecentSearches=function(a,b){this.$recentSearchesList.empty();var c=this.attr.datasources.map(function(a){return b.suggestions[a]||[]}).reduce(function(a,b){return a.concat(b)});c.forEach(function(a){var b=this.$recentSearchItemTemplate.clone(!1);b.data("item",a);var c=b.find("a");c.attr("href",a.recent_search_path),c.attr("data-search-query",a.name),c.attr("data-query-source",a.search_query_source),c.append($("<span>").text(a.name)),this.$recentSearchesList.append(b)},this);var d=c.length!==0,e=b.queryData.query==="",f=e&&d;this.$recentSearchesBlock.toggleClass("has-results",!e&&d),this.$recentSearchesBlock.toggleClass("has-items",d),this.$recentSearchesTitle.toggle(f),this.$recentSearchesClearAll.toggle(f)},this.after("initialize",function(){this.$recentSearchItemTemplate=this.select("recentSearchesItemSelector").clone(!1),this.$recentSearchesList=this.select("recentSearchesSelector"),this.$recentSearchesBlock=this.select("recentSearchesBlockSelector"),this.$recentSearchesTitle=this.select("recentSearchesTitleSelector"),this.$recentSearchesClearAll=this.select("recentSearchesClearAllSelector"),this.on("click",{recentSearchesDismissSelector:this.deleteRecentSearch,recentSearchesClearAllSelector:this.deleteAllRecentSearches}),this.on("uiTypeaheadRenderResults",this.renderRecentSearches),this.on("uiTypeaheadDeleteAllRecentSearches",this.deleteAllRecentSearches)})}var defineComponent=require("core/component");module.exports=defineComponent(recentSearchesRenderer)
  });
  define("app/ui/typeahead/topics_renderer",["module","require","exports","core/i18n","app/data/hashflag_info","core/component"],function(module, require, exports) {
  function topicsRenderer(){this.defaultAttrs({parseHashflags:!1,datasources:["topics"],topicsListSelector:".topics-list",topicsItemSelector:".typeahead-topic-item",hashflagClass:"twitter-hashflag"}),this.toggleTopics=function(a){this.$topicsList.toggleClass("has-results",a).toggle(a)},this.renderTopics=function(a,b){this.$topicsList.empty();var c=[];this.attr.datasources.forEach(function(a){c=c.concat(b.suggestions[a]||[])}),c.length?(c.forEach(function(a){this.renderTopic(a)},this),this.toggleTopics(!0)):this.toggleTopics(!1)},this.renderTopic=function(a){var b=this.$topicsItemTemplate.clone(!1),c=b.find("a"),d=a.topic||a.hashtag,e=d.charAt(0),f=d.slice(1),g,h;this.isHashOrCashSign(e)?(h=RTL_CHAR_REGEX.test(f),g=$("<span>").text(e).append($("<strong>").text(f)).append(this.constructHashflagImg(e,f))):(h=RTL_CHAR_REGEX.test(d),a.filter?g=$("<strong>").text(d):g=$("<span>").text(d));var i;a.filter?i=this.applySearchFilter(g.prop("outerHTML"),a.filter):i=g.prop("outerHTML"),c.html(i).attr("dir",h?"rtl":"ltr").attr("href",a.searchPath).attr("data-search-query",d),b.data("item",a).appendTo(this.$topicsList)},this.constructHashflagImg=function(a,b){var c=this.attr.parseHashflags&&this.isHashSign(a)&&hashflagInfo.getImageUrl(b);if(c)return $("<img>",{src:c,addClass:this.attr.hashflagClass})},this.applySearchFilter=function(a,b){var c={images:_('Photos of {{text}}',{text:a}),videos:_('Videos of {{text}}',{text:a}),news:_('News about {{text}}',{text:a})};return c[b]},this.isHashOrCashSign=function(a){return this.isHashSign(a)||this.isCashSign(a)},this.isHashSign=function(a){return HASHTAG_SIGN_REGEX.test(a)},this.isCashSign=function(a){return a==="$"},this.after("initialize",function(){this.$topicsItemTemplate=this.select("topicsItemSelector").clone(!1),this.$topicsList=this.select("topicsListSelector"),this.$topicsList.hide(),this.on("uiTypeaheadRenderResults",this.renderTopics)})}var _=require("core/i18n"),hashflagInfo=require("app/data/hashflag_info"),defineComponent=require("core/component");module.exports=defineComponent(topicsRenderer);var RTL_CHAR_REGEX=/[\u0600-\u06FF]|[\u0750-\u077F]|[\u0590-\u05FF]|[\uFE70-\uFEFF]/gm,HASHTAG_SIGN_REGEX=/[#＃]/
  });
  define("app/ui/typeahead/trend_locations_renderer",["module","require","exports","core/component","core/i18n"],function(module, require, exports) {
  function trendLocationsRenderer(){this.defaultAttrs({typeaheadItemClass:"typeahead-item",trendLocationsListSelector:".typeahead-trend-locations-list",trendLocationsItemSelector:".typeahead-trend-locations-item",datasources:["trendLocations"]}),this.renderTrendLocations=function(a,b){this.$trendLocationsList.empty();var c=[];this.attr.datasources.forEach(function(a){c=c.concat(b.suggestions[a]||[])}),c.forEach(function(a){var b=this.$trendLocationItemTemplate.clone(!1),c=b.find("a");b.data("item",a),c.attr("data-search-query",a.name),c.attr("href","#"),c.append(this.getLocationHtml(a)),a.woeid==-1&&(b.removeClass(this.attr.typeaheadItemClass),c.attr("data-search-query","")),b.appendTo(this.$trendLocationsList)},this)},this.getLocationHtml=function(a){var b=$("<span>");switch(a.placeTypeCode){case placeTypeMapping.WORLDWIDE:case placeTypeMapping.NOT_FOUND:b.text(a.name);break;case placeTypeMapping.COUNTRY:b.html(a.name+"  "+_('(All cities)'));break;default:b.text([a.name,a.countryName].join(", "))}return b},this.after("initialize",function(){this.$trendLocationItemTemplate=this.select("trendLocationsItemSelector").clone(!1),this.$trendLocationsList=this.select("trendLocationsListSelector"),this.on("uiTypeaheadRenderResults",this.renderTrendLocations)})}var defineComponent=require("core/component"),_=require("core/i18n");module.exports=defineComponent(trendLocationsRenderer);var placeTypeMapping={WORLDWIDE:19,COUNTRY:12,CITY:7,NOT_FOUND:-1}
  });
  define("app/ui/typeahead/concierge_renderer",["module","require","exports","core/component"],function(module, require, exports) {
  function conciergeRenderer(){this.defaultAttrs({conciergeBlockSelector:".typeahead-concierge",conciergeListSelector:".typeahead-concierge-list",conciergeItemSelector:".typeahead-concierge-item",datasource:"concierge"}),this.renderConcierge=function(a,b){this.$conciergeList.empty();var c=b.suggestions&&b.suggestions[this.attr.datasource]||[],d=!!c.length;c.forEach(function(a){var b=this.$conciergeItemTemplate.clone(!1),c=b.find("a");b.data("item",a),c.attr("href",a.searchPath),c.attr("data-search-query",a.topic),c.attr("data-query-source",a.querySource),c.append($("<span>").text(a.name)),this.$conciergeList.append(b)},this),this.$conciergeBlock.toggleClass("has-items",d),this.$conciergeBlock.toggle(d)},this.after("initialize",function(){this.$conciergeItemTemplate=this.select("conciergeItemSelector").clone(!1),this.$conciergeBlock=this.select("conciergeBlockSelector"),this.$conciergeList=this.select("conciergeListSelector"),this.on("uiTypeaheadRenderResults",this.renderConcierge)})}var defineComponent=require("core/component");module.exports=defineComponent(conciergeRenderer)
  });
  define("app/ui/typeahead/with_dm_participant_items",["module","require","exports"],function(module, require, exports) {
  function withDMParticipantItems(){this.itemCannotBeSelected=function(a){return this.existingParticipants&&this.existingParticipants.indexOf(a.id.toString())!==-1},this.setExistingParticipants=function(a,b){this.existingParticipants=(b.participants||[]).map(function(a){return a.toString()})},this.initWithDMParticipantItems=function(){this.on(document,"uiExistingConversationParticipants",this.setExistingParticipants)}}module.exports=withDMParticipantItems
  });
  define("app/ui/typeahead/with_media_tag_items",["module","require","exports"],function(module, require, exports) {
  function withMediaTagItems(){this.itemCannotBeSelected=function(a){var b=this.$node.hasClass(this.attr.photoTaggingContainerClass);return b&&a.can_media_tag===!1}}module.exports=withMediaTagItems
  });
  define("app/ui/typeahead/selected_users_renderer",["module","require","exports","core/i18n","core/compose","core/component","app/ui/typeahead/with_dm_participant_items","app/ui/typeahead/with_media_tag_items"],function(module, require, exports) {
  function selectedUsersRenderer(){function a(a,b){if(!b)return!1;for(var c=0;c<b.length;c++)if(a.id==b[c].id)return!0;return!1}this.defaultAttrs({rootSelector:".typeahead-user-select",accountsListSelector:".js-typeahead-accounts",accountsItemSelector:".typeahead-account-item",selectedItemSelector:".typeahead-selected-item",accountsEndPlaceholderSelector:".typeahead-accounts-end",selectedEndPlaceholderSelector:".typeahead-selected-end",emptyTextSelector:".typeahead-empty-suggestions",selectedListSelector:".js-typeahead-selected",selectedItemType:"",photoTaggingContainerClass:"photo-tagging-container",datasources:["accounts","selectedUsers"],socialContextMapping:{FOLLOWING:1,FOLLOWS:8}}),this.renderAccounts=function(a,b){this.clearRenderedResults();var c=b.suggestions.selectedUsers||[],d;b.queryData?d=b.queryData.query||"":d="";var e=[];this.attr.datasources.forEach(function(a){if(a=="accounts"||a=="mediaTagAccounts"||a=="dmAccounts"||a=="prefillUsers"&&d.length==0&&c.length==0)e=e.concat(b.suggestions[a]||[])}),e&&e.length>0?(e.forEach(function(a){var b=this.$accountItemTemplate.clone(!1);this.addUser(b,this.$accountsEnd,a,c)},this),this.$accountsList.addClass("has-results"),this.$accountsList.show()):this.clearAccounts();var f=e&&e.length>0,g=d.length>0,h=c&&c.length>0;!f&&!g&&h?(c.forEach(function(a){var b=this.$selectedItemTemplate.clone(!1);this.addUser(b,this.$selectedEnd,a,c)},this),this.$selectedList.addClass("has-results"),this.$selectedList.show()):this.clearSelected();var i=this.select("emptyTextSelector").first(),j=b.suggestions.prefillUsers&&e.length-b.suggestions.prefillUsers.length==0;j&&c.length==0&&e.length>0?i.show():i.hide(),a.stopPropagation()},this.addUser=function(b,c,d,e){b.attr("data-user-id",d.id),b.attr("data-user-screenname",d.screen_name),b.data("item",d);var f=b.find("a");f.attr("href","/"+d.screen_name),f.attr("data-search-query",d.id),f.find(".avatar").attr("src",this.getAvatar(d)),f.find(".fullname").text(d.name),f.find(".username b").text(d.screen_name),d.verified&&f.find(".js-verified").removeClass("hidden"),a(d,e)?(b.addClass("selected-user"),f.attr("aria-selected","true")):f.attr("aria-selected","false"),this.itemCannotBeSelected(d)&&b.addClass("cannot-select");if(this.attr.deciders.showDebugInfo){var g=d.prefetched;f.attr("title",(g?"local":"remote")+" user, score: "+d.rounded_score)}if(d.social_proof!==0&&this.attr.deciders.showSocialContext){var h=f.find(".typeahead-social-context"),i=this.getSocialContext(d);i&&(h.text(i),f.addClass("has-social-context"))}b.insertBefore(c)},this.getAvatar=function(a){var b=a.profile_image_url_https,c=this.attr.deciders.showSocialContext;return b&&(b=b.replace(/^https?:/,""),b=c?b:b.replace(/_normal(\..*)?$/i,"_mini$1")),b},this.isMutualFollow=function(a){return this.currentUserFollowsAccount(a)&&this.accountFollowsCurrentUser(a)},this.currentUserFollowsAccount=function(a){var b=this.attr.socialContextMapping.FOLLOWING;return!!(a&b)},this.accountFollowsCurrentUser=function(a){var b=this.attr.socialContextMapping.FOLLOWS;return!!(a&b)},this.getSocialContext=function(a){var b=a.social_proof;return this.isMutualFollow(b)?_('You follow each other'):this.currentUserFollowsAccount(b)?_('Following'):this.accountFollowsCurrentUser(b)?_('Follows you'):a.first_connecting_user_name?a.connecting_user_count>1?_('Followed by {{user}} and {{number}} others',{user:a.first_connecting_user_name,number:a.connecting_user_count}):_('Followed by {{user}}',{user:a.first_connecting_user_name}):!1},this.clearAccounts=function(){this.$accountsList.removeClass("has-results"),this.$accountsList.hide()},this.clearSelected=function(){this.$selectedList.removeClass("has-results"),this.$selectedList.hide()},this.clearRenderedResults=function(){this.$accountsList.find(this.attr.accountsItemSelector).remove(),this.$selectedList.find(this.attr.selectedItemSelector).remove()},this.configureDisabledSelectionLogic=function(){switch(this.attr.selectedItemType){case"dmExistingParticipants":compose.mixin(this,[withDMParticipantItems]),this.initWithDMParticipantItems();break;default:compose.mixin(this,[withMediaTagItems])}},this.after("initialize",function(){this.configureDisabledSelectionLogic(),this.$accountsList=this.select("accountsListSelector"),this.$selectedList=this.select("selectedListSelector"),this.$accountsEnd=this.select("accountsEndPlaceholderSelector"),this.$accountItemTemplate=this.select("accountsItemSelector").clone(!1),this.$selectedItemTemplate=this.select("selectedItemSelector").clone(!1),this.$selectedEnd=this.select("selectedEndPlaceholderSelector"),this.$accountsList.hide(),this.on("uiTypeaheadRenderResults",this.renderAccounts),this.on("uiTypeaheadClearRenderedResults",this.clearRenderedResults)})}var _=require("core/i18n"),compose=require("core/compose"),defineComponent=require("core/component"),withDMParticipantItems=require("app/ui/typeahead/with_dm_participant_items"),withMediaTagItems=require("app/ui/typeahead/with_media_tag_items");module.exports=defineComponent(selectedUsersRenderer)
  });
  define("app/utils/rtl_text",["module","require","exports","lib/twitter-text"],function(module, require, exports) {
  var TwitterText=require("lib/twitter-text"),RTLText=function(){function q(a){try{return document.activeElement===a}catch(b){return!1}}function r(a){if(!q(a))return 0;var b;if(typeof a.selectionStart=="number")return a.selectionStart;if(document.selection){a.focus(),b=document.selection.createRange(),b.moveStart("character",-a.value.length);var c=b.text.length;return c}}function s(a,b){if(!q(a))return;if(typeof a.selectionStart=="number")a.selectionStart=b,a.selectionEnd=b;else if(document.selection){var c=a.createTextRange();c.collapse(!0),c.moveEnd("character",b),c.moveStart("character",b),c.select()}}function t(a,b,c){var d=0,e="",f=b(a);for(var g=0;g<f.length;g++){var h=f[g],i="";h.screenName&&(i="screenName"),h.hashtag&&(i="hashtag"),h.url&&(i="url"),h.cashtag&&(i="cashtag");var j={entityText:a.slice(h.indices[0],h.indices[1]),entityType:i};e+=a.slice(d,h.indices[0])+c(j),d=h.indices[1]}return e+a.slice(d,a.length)}function u(a){var b=a.match(c),d=a;if(b||l==="rtl")d=t(d,TwitterText.extractEntitiesWithIndices,function(a){if(a.entityType==="screenName")return e+a.entityText+f;if(a.entityType==="hashtag")return a.entityText.charAt(1).match(c)?a.entityText:e+a.entityText;if(a.entityType==="url")return a.entityText+e;if(a.entityType==="cashtag")return e+a.entityText});return d}function v(a){var b,c=a.target?a.target:a.srcElement,e=a.which?a.which:a.keyCode;if(e===g.BACKSPACE)b=-1;else{if(e!==g.DELETE)return;b=0}var f=r(c),h=c.value,i=0,j;do j=h.charAt(f+b)||"",j&&(f+=b,i++,h=h.slice(0,f)+h.slice(f+1,h.length));while(j.match(d));i>1&&(c.value=h,s(c,f),a.preventDefault?a.preventDefault():a.returnValue=!1)}function w(a){return a.replace(d,"")}function x(a){var d=a.match(c);a=a.replace(k,"");var e=0,f=a.replace(m,""),g=l;if(!f||!f.replace(/#/g,""))return g==="rtl"?!0:!1;if(!d)return!1;if(a){var h=TwitterText.extractMentionsWithIndices(a),i=h.length,j;for(j=0;j<i;j++)e+=h[j].screenName.length+1;var n=TwitterText.extractUrlsWithIndices(a),o=n.length;for(j=0;j<o;j++)e+=n[j].url.length+2}var p=f.length-e;return p>0&&d.length/p>b}function y(a){var b=a.target||a.srcElement;a.type!=="keydown"||a.keyCode!==91&&a.keyCode!==16&&a.keyCode!==88&&a.keyCode!==17?a.type==="keyup"&&(a.keyCode===91||a.keyCode===16||a.keyCode===88||a.keyCode===17)&&(o[String(a.keyCode)]=!1):o[String(a.keyCode)]=!0,(!p&&o[91]||p&&o[17])&&o[16]&&o[88]&&(n=!0,b.dir==="rtl"?z("ltr",b):z("rtl",b),o={91:!1,16:!1,88:!1,17:!1})}function z(a,b){b.setAttribute("dir",a),b.style.direction=a,b.style.textAlign=a==="rtl"?"right":"left"}"use strict";var a={},b=.3,c=/[\u0590-\u083F]|[\u08A0-\u08FF]|[\uFB1D-\uFDFF]|[\uFE70-\uFEFF]/gm,d=/\u200e|\u200f/gm,e="‎",f="‏",g={BACKSPACE:8,DELETE:46},h=0,i=20,j=!1,k="",l="",m=/^\s+|\s+$/g,n=!1,o={91:!1,16:!1,88:!1,17:!1},p=navigator.userAgent.indexOf("Mac")===-1;return a.onTextChange=function(b){var c=b||window.event;y(b),c.type==="keydown"&&v(c),a.setText(c.target||c.srcElement)},a.setText=function(a){l||(a.style.direction?l=a.style.direction:a.dir?l=a.dir:document.body.style.direction?l=document.body.style.direction:l=document.body.dir),arguments.length===2&&(l=a.ownerDocument.documentElement.className,k=arguments[1]);var b=a.value;if(!b)return;var c=w(b);j=x(c);var d=u(c),e=j?"rtl":"ltr";d!==b&&(a.value=d,s(a,r(a)+d.length-c.length)),n||z(e,a)},a.textLength=function(a){var b=w(a),c=TwitterText.extractUrls(b),d=b.length-c.join("").length,e=c.length;for(var f=0;f<e;f++)d+=i,/^https:/.test(c[f])&&(d+=1);return h=d},a.cleanText=function(a){return w(a)},a.addRTLMarkers=function(a){return u(a)},a.shouldBeRTL=function(a){return x(a)},a}();typeof module!="undefined"&&module.exports&&(module.exports=RTLText)
  });
  define("app/utils/random",["module","require","exports"],function(module, require, exports) {
  function getRandomInteger(a,b){return a+Math.floor(Math.random()*(b-a+1))}function getRandomDouble(a,b){return a+Math.random()*(b-a+1)}module.exports={getRandomInteger:getRandomInteger,getRandomDouble:getRandomDouble}
  });
  define("app/ui/typeahead/typeahead_dropdown",["module","require","exports","core/component","core/utils","app/ui/typeahead/accounts_renderer","app/ui/typeahead/dm_conversations_renderer","app/ui/typeahead/saved_searches_renderer","app/ui/typeahead/recent_searches_renderer","app/ui/typeahead/topics_renderer","app/ui/typeahead/trend_locations_renderer","app/ui/typeahead/concierge_renderer","app/ui/typeahead/selected_users_renderer","app/utils/rtl_text","app/utils/with_no_teardown_child_components","app/utils/random"],function(module, require, exports) {
  function typeaheadDropdown(){this.defaultAttrs({inputSelector:"#search-query",buttonSelector:".nav-search",dropdownSelector:".dropdown-menu.typeahead",itemsContainerSelector:".typeahead-items",itemsSelector:".typeahead-items li",itemAnchorsSelector:".typeahead-items li a",itemSelector:".typeahead-item",categoryTitle:".typeahead-category-title",selectedItemSelector:".typeahead-items li.selected",selectedClass:"selected",blockLinkActions:!1,hideOnEmptyQuery:!1,alwaysOpen:!1,deciders:{showDebugInfo:!1,showSocialContext:!1},autocompleteAccounts:!0,datasourceRenders:[["concierge",["concierge"]],["savedSearches",["savedSearches"]],["recentSearches",["recentSearches"]],["topics",["topics"]],["accounts",["accounts"]],["dmConversations",["dmConversations"]]],datasourceOptions:{},typeaheadSrc:"UNKNOWN",templateContainerSelector:".dropdown-inner",recentSearchesListSelector:".typeahead-recent-searches",savedSearchesListSelector:".typeahead-saved-searches",topicsListSelector:".typeahead-topics",accountsListSelector:".js-typeahead-accounts",trendLocationsListSelector:".typeahead-trend-locations-list",conciergeSelector:".typeahead-concierge",userSelectSelector:".typeahead-user-select",selectedListSelector:".typeahead-selected",dmConversationsSelector:".typeahead-dm-conversations",renderLimit:undefined}),this.mouseOver=function(a,b){this.clearSelected(),$(b.el).addClass(this.attr.selectedClass)},this.clearSelected=function(){this.select("itemsSelector").removeClass(this.attr.selectedClass)},this.moveSelection=function(a){var b=this.select("itemsSelector").filter(":visible"),c=b.filter(".selected");c.removeClass(this.attr.selectedClass),c.find("a").removeAttr("aria-selected"),this.$input.removeAttr("aria-activedescendant");var d=b.index(c)+a;d=(d+1)%(b.length+1)-1;if(d===-1){this.trigger("uiTypeaheadSelectionCleared");return}d<-1&&(d=b.length-1);var e=b.eq(d),f=e.find("a");e.addClass(this.attr.selectedClass),f.attr("aria-selected",!0),this.$input.attr("aria-activedescendant",f.attr("id"))},this.moveSelectionUp=function(a){this.moveSelection(-1)},this.moveSelectionDown=function(a){this.moveSelection(1)},this.dropdownIsOpen=function(){if(this.attr.alwaysOpen)return!0;if(window.DEBUG&&window.DEBUG.enabled&&this.openState!==this.$dropdown.is(":visible"))throw new Error("Dropdown markup and internal openState variable are out of sync.");return this.openState},this.show=function(){this.$dropdown.show(),this.$input.attr("aria-expanded",!0),this.openState=!0},this.hide=function(a){var b=a&&a.target&&$(a.target),c=!!a&&a.type=="click",d=c&&this.$input.is(b),e=c&&this.$button.is(b);if(this.mouseIsOverDropdown||d||e||!this.dropdownIsOpen()||this.attr.alwaysOpen)return;this.$dropdown.find(".selected a").removeAttr("aria-selected"),this.$dropdown.hide(),this.$input.attr("aria-expanded",!1),this.$input.removeAttr("aria-activedescendant"),this.openState=!1},this.hideAndManageEsc=function(a){if(!this.dropdownIsOpen()||this.attr.alwaysOpen)return;this.forceHide(),a.preventDefault(),a.stopPropagation()},this.forceHide=function(){this.clearMouseTracking(),this.hide()},this.inputValueUpdated=function(a,b){this.lastQuery=b.value;var c=utils.merge(this.attr.datasourceOptions,{query:b.value,tweetContext:b.tweetContext,typeaheadSrc:this.attr.typeaheadSrc});this.trigger("uiNeedsTypeaheadSuggestions",{datasources:this.datasources,queryData:c,id:this.getDropdownId()})},this.getDropdownId=function(){return this.dropdownId||(this.dropdownId="swift_typeahead_dropdown_"+random.getRandomInteger(0,1e6)),this.dropdownId},this.checkIfSelectionFromSearchInput=function(a){return a.closest("form").find("input").hasClass("search-input")},this.triggerSelectionEvent=function(a,b){this.attr.blockLinkActions&&a.preventDefault();var c=this.select("itemsSelector"),d=c.filter(".selected").first();if(d.length==0)return;var e=d.find("a"),f=d.index(),g=this.lastQuery,h=e.attr("data-search-query"),i=e.attr("data-query-source");d.removeClass(this.attr.selectedClass),this.$input.removeAttr("aria-activedescendant");if(!g&&!h&&i!=="typeahead_oneclick")return;var j=this.getItemData(d);this.trigger("uiTypeaheadItemSelected",{isSearchInput:this.checkIfSelectionFromSearchInput(e),index:f,source:e.data("ds"),query:h,input:g,display:d.data("user-screenname")||h,href:e.attr("href"),isClick:a.originalEvent?a.originalEvent.type==="click":!1,item:j}),this.forceHide()},this.getItemData=function(a){return a.data("item")},this.submitQuery=function(a,b){var c=this.select("itemsSelector").filter(".selected").first();if(c.length){this.triggerSelectionEvent(a,b);return}var d=this.$input.val();if(d.trim()==="")return;this.trigger("uiTypeaheadSubmitQuery",{query:RTLText.cleanText(d)}),this.forceHide()},this.getSelectedCompletion=function(){var a=this.select("itemsSelector").filter(".selected").first();!a.length&&this.dropdownIsOpen()&&(a=this.select("itemsSelector").filter(".typeahead-item").first());if(!a.length||this.$dropdown.attr("id")!=a.closest(this.attr.dropdownSelector).attr("id"))return;var b=a.find("a"),c=b.data("search-query"),d=this.select("itemsSelector"),e=d.index(a),f=this.lastQuery;if(b.data("ds")=="account"&&!this.attr.autocompleteAccounts)return;var g=this.getItemData(a);this.trigger("uiTypeaheadItemPossiblyComplete",{value:c,source:b.data("ds"),index:e,query:c,item:g,display:a.data("user-screenname")||c,input:f,href:b.attr("href")||""})},this.renderResults=function(a){if(!this.attr.renderLimit){this.trigger("uiTypeaheadRenderResults",a);return}var b=0,c=0,d=0,e={},f=a.suggestions,g=this.attr.renderLimit;this.datasources.forEach(function(f){a.suggestions[f]&&d<g&&(b=g-d,c=a.suggestions[f].length<b?a.suggestions[f].length:b,e[f]=a.suggestions[f].slice(0,c),d+=c)}),a.suggestions=e,this.trigger("uiTypeaheadRenderResults",a),a.suggestions=f},this.updateDropdown=function(a,b){var c=this.$input.is(document.activeElement);if(b.id!==this.getDropdownId()||!b.queryData.atSignRemoved&&b.queryData.query!==this.lastQuery||b.queryData.atSignRemoved&&b.queryData.query!==this.lastQuery.substring(1)||!c&&!this.attr.alwaysOpen)return;var d=this.select("itemsSelector").filter(".selected").first(),e=d.find("a").data("ds"),f=d.find("a").data("search-query");this.renderResults(b);if(e&&f){var g=this.select("itemsSelector").find("[data-ds='"+e+"'][data-search-query='"+f+"']");g.closest("li").addClass(this.attr.selectedClass)}var h="typeahead-item-";this.select("itemAnchorsSelector").each(function(a,b){$(b).attr("id",h+a)});var i=this.datasources.map(function(a){return b.suggestions[a]?b.suggestions[a].length:0}),j=i.reduce(function(a,b){return a+b}),k=c&&(!this.attr.hideOnEmptyQuery||b.queryData.query);if(j>0&&(this.attr.alwaysOpen||k)){this.show();var l=!!b.queryData.query;this.trigger("uiTypeaheadSetPreventDefault",{preventDefault:l,key:9}),this.trigger("uiTypeaheadResultsShown",{numResults:j,query:b.queryData.query})}else this.forceHide(),this.trigger("uiTypeaheadSetPreventDefault",{preventDefault:!1,key:9}),this.trigger("uiTypeaheadResultsHidden")},this.updateNumResults=function(a,b){this.select("itemSelector").length===0&&!this.attr.alwaysOpen&&this.forceHide()},this.trackMouse=function(a,b){this.mouseIsOverDropdown=!0},this.clearMouseTracking=function(a,b){this.mouseIsOverDropdown=!1,this.clearSelected()},this.resetTemplates=function(){this.$templateContainer.empty(),this.$templateContainer.append(this.$conciergeTemplate),this.$templateContainer.append(this.$savedSearchesTemplate),this.$templateContainer.append(this.$recentSearchesTemplate),this.$templateContainer.append(this.$topicsTemplate),this.$templateContainer.append(this.$accountsTemplate),this.$templateContainer.append(this.$trendLocationsTemplate),this.$templateContainer.append(this.$userSelectTemplate),this.$templateContainer.append(this.$dmConversationsTemplate)},this.addRenderer=function(a,b,c){c=utils.merge(c,{datasources:b});var d="block"+this.blockCount++;a==="accounts"?(this.$accountsTemplate.clone().addClass(d).appendTo(this.$templateContainer),this.attachChild(AccountsRenderer,this.$node,utils.merge(c,{accountsListSelector:this.attr.accountsListSelector+"."+d}))):a==="topics"?(this.$topicsTemplate.clone().addClass(d).appendTo(this.$templateContainer),this.attachChild(TopicsRenderer,this.$node,utils.merge(c,{topicsListSelector:this.attr.topicsListSelector+"."+d}))):a==="savedSearches"?(this.$savedSearchesTemplate.clone().addClass(d).appendTo(this.$templateContainer),this.attachChild(SavedSearchesRenderer,this.$node,utils.merge(c,{savedSearchesListSelector:this.attr.savedSearchesListSelector+"."+d}))):a==="recentSearches"?(this.$recentSearchesTemplate.clone().addClass(d).appendTo(this.$templateContainer),this.attachChild(RecentSearchesRenderer,this.$node,utils.merge(c,{recentSearchesListSelector:this.attr.recentSearchesListSelector+"."+d}))):a==="trendLocations"?(this.$trendLocationsTemplate.clone().addClass(d).appendTo(this.$templateContainer),this.attachChild(TrendLocationsRenderer,this.$node,utils.merge(c,{trendLocationsListSelector:this.attr.trendLocationsListSelector+"."+d}))):a==="concierge"?(this.$conciergeTemplate.clone().addClass(d).appendTo(this.$templateContainer),this.attachChild(ConciergeRenderer,this.$node,utils.merge(c,{conciergeSelector:this.attr.conciergeSelector+"."+d}))):a==="selectedUsers"?(this.$userSelectTemplate.clone().addClass(d).appendTo(this.$templateContainer),this.attachChild(SelectedUsersRenderer,this.$node,utils.merge(c,{rootSelector:this.attr.userSelectSelector+"."+d,accountsListSelector:this.attr.accountsListSelector,selectedListSelector:this.attr.selectedListSelector})),this.$dropdown.attr("aria-multiselectable","true")):a==="dmConversations"&&(this.$dmConversationsTemplate.clone().addClass(d).appendTo(this.$templateContainer),this.attachChild(DMConversationsRenderer,this.$node,utils.merge(c,{dmConversationsListSelector:this.attr.dmConversationsSelector+"."+d})))},this.applyARIAToInput=function(){instances+=1;var a="typeahead-dropdown-"+instances;this.$dropdown.attr("id",a),this.$input.attr({"aria-autocomplete":"list","aria-expanded":!1,"aria-owns":a})},this.before("teardown",this.resetTemplates),this.after("initialize",function(a,b){this.openState=!1,this.$input=this.select("inputSelector").first(),this.$dropdown=this.select("dropdownSelector").first(),this.$button=this.select("buttonSelector"),this.applyARIAToInput(),this.$templateContainer=this.select("templateContainerSelector").first(),this.$accountsTemplate=this.select("accountsListSelector").first().clone(!1),this.$contactsTemplate=this.select("contactsListSelector").first().clone(!1),this.$savedSearchesTemplate=this.select("savedSearchesListSelector").first().clone(!1),this.$recentSearchesTemplate=this.select("recentSearchesListSelector").first().clone(!1),this.$topicsTemplate=this.select("topicsListSelector").first().clone(!1),this.$trendLocationsTemplate=this.select("trendLocationsListSelector").first().clone(!1),this.$conciergeTemplate=this.select("conciergeSelector").first().clone(!1),this.$userSelectTemplate=this.select("userSelectSelector").first().clone(!1),this.$dmConversationsTemplate=this.select("dmConversationsSelector").first().clone(!1),this.$templateContainer.empty(),this.datasources=[],this.attr.datasourceRenders.forEach(function(a){this.datasources=this.datasources.concat(a[1])},this),this.datasources=utils.uniqueArray(this.datasources),this.blockCount=0,this.attr.datasourceRenders.forEach(function(a){this.addRenderer(a[0],a[1],b)},this),this.on(this.$input,"blur",this.hide),this.on(this.$input,"uiTypeaheadInputSubmit",this.submitQuery),this.on(this.$input,"uiTypeaheadInputChanged",this.inputValueUpdated),this.on(this.$input,"uiTypeaheadInputMoveUp",this.moveSelectionUp),this.on(this.$input,"uiTypeaheadInputMoveDown",this.moveSelectionDown),this.on(this.$input,"uiTypeaheadInputAutocomplete",this.getSelectedCompletion),this.on(this.$input,"uiTypeaheadInputTab",this.clearMouseTracking),this.on(this.$input,"uiShortcutEsc",this.hideAndManageEsc),this.on(this.$dropdown,"mouseenter",this.trackMouse),this.on(this.$dropdown,"mouseleave",this.clearMouseTracking),this.on(document,"dataTypeaheadSuggestionsResults",this.updateDropdown),this.on(document,"uiBeforePageChanged",this.forceHide),this.on(document,"click",this.hide),this.on("mouseover",{itemsSelector:this.mouseOver}),this.on("click",{itemsSelector:this.triggerSelectionEvent}),this.on("uiTypeaheadDeleteRecentSearch uiRemoveSavedSearch",this.updateNumResults),this.attr.alwaysOpen&&(this.$input.attr("aria-expanded",!0),this.$dropdown.show().attr("aria-hidden",!1),this.openState=!0)})}var defineComponent=require("core/component"),utils=require("core/utils"),AccountsRenderer=require("app/ui/typeahead/accounts_renderer"),DMConversationsRenderer=require("app/ui/typeahead/dm_conversations_renderer"),SavedSearchesRenderer=require("app/ui/typeahead/saved_searches_renderer"),RecentSearchesRenderer=require("app/ui/typeahead/recent_searches_renderer"),TopicsRenderer=require("app/ui/typeahead/topics_renderer"),TrendLocationsRenderer=require("app/ui/typeahead/trend_locations_renderer"),ConciergeRenderer=require("app/ui/typeahead/concierge_renderer"),SelectedUsersRenderer=require("app/ui/typeahead/selected_users_renderer"),RTLText=require("app/utils/rtl_text"),withNoTeardownChildComponents=require("app/utils/with_no_teardown_child_components"),random=require("app/utils/random"),instances=0;module.exports=defineComponent(typeaheadDropdown,withNoTeardownChildComponents)
  });
  define("app/utils/event_support",["module","require","exports"],function(module, require, exports) {
  var supportedEvents={},checkEventsSupport=function(a,b){return a.forEach(function(a){checkEventSupported(a,b[a])},this),supportedEvents},checkEventSupported=function(a,b){var c=document.createElement(b||"div"),d="on"+a,e=d in c;return e||(c.setAttribute(d,"return;"),e=typeof c[d]=="function"),c=null,supportedEvents[a]=e,e},eventSupport={checkEvents:function(a,b){checkEventsSupport(a,b||{})},browserSupports:function(a,b){return supportedEvents[a]===undefined&&checkEventSupported(a,b),supportedEvents[a]}};module.exports=eventSupport
  });
  define("app/utils/string",["module","require","exports"],function(module, require, exports) {
  function isWhitespaceChar(a){var b=a.charCodeAt(0);return b<=32?!0:!1}function subtractOne(a,b){if(a=="")return"";var c=a.split(""),d=c.pop();return a=c.join(""),d=="0"?subtractOne(a,!0)+"9":(d-=1,a==""&&d==0?b?"":"0":a+d)}function isDigitChar(a){var b=a.charCodeAt(0);return b>=48&&b<=57?!0:!1}function compareRight(a,b){var c=0,d=0,e=0,f,g;for(;;d++,e++){f=a.charAt(d),g=b.charAt(e);if(!isDigitChar(f)&&!isDigitChar(g))return c;if(!isDigitChar(f))return-1;if(!isDigitChar(g))return 1;f<g?c===0&&(c=-1):f>g&&c===0&&(c=1)}}function compare(a,b){var c=0,d=0,e,f,g,h,i;if(a===b)return 0;typeof a=="number"&&(a=a.toString()),typeof b=="number"&&(b=b.toString());for(;;){if(c>100)return;e=f=0,g=a.charAt(c),h=b.charAt(d);while(isWhitespaceChar(g)||g=="0")g=="0"?e++:e=0,g=a.charAt(++c);while(isWhitespaceChar(h)||h=="0")h=="0"?f++:f=0,h=b.charAt(++d);if(isDigitChar(g)&&isDigitChar(h)&&(i=compareRight(a.substring(c),b.substring(d)))!=0)return i;if(g==0&&h==0)return e-f;if(g<h)return-1;if(g>h)return 1;++c,++d}}var utils={compare:compare,max:function(){return arguments.length?[].reduce.call(arguments,function(a,b){return compare(a,b)>0?a:b}):undefined},min:function(a,b){return arguments.length?[].reduce.call(arguments,function(a,b){return compare(a,b)<0?a:b}):undefined},wordAtPosition:function(a,b,c,d){c=c||/[^\s]+/g,d=d||0;var e=null;return a.replace(c,function(){var a=arguments[d],c=arguments[arguments.length-2];c<=b&&c+a.length>=b&&(e=a)}),e},parseBigInt:function(a){return isNaN(Number(a))?NaN:a.toString()},subtractOne:subtractOne};module.exports=utils
  });
  define("app/ui/typeahead/typeahead_input",["module","require","exports","core/component","app/utils/caret","app/utils/event_support","app/utils/typeahead_helpers","app/utils/string","lib/twitter-text","app/utils/rtl_text"],function(module, require, exports) {
  function typeaheadInput(){this.defaultAttrs({inputSelector:"#search-query",buttonSelector:".nav-search",dropdownSelectedItemSelector:".typeahead-items li.selected",completeAllEntities:!1,includeTweetContext:!1,tweetContextEnabled:!1,allowAccountsWithoutAtSign:!1,inputIsTweetbox:!1}),this.getDefaultKeycodes=function(){var a={13:{name:"ENTER",event:"uiTypeaheadInputSubmit",on:"keypress",preventDefault:!0,enabled:!0},9:{name:"TAB",event:"uiTypeaheadInputTab",on:"keydown",preventDefault:!0,canCauseComplete:!0,enabled:!0},37:{name:"LEFT",event:"uiTypeaheadInputLeft",on:"keydown",canCauseComplete:!0,enabled:!0},39:{name:"RIGHT",event:"uiTypeaheadInputRight",on:"keydown",canCauseComplete:!0,enabled:!0},38:{name:"UP",event:"uiTypeaheadInputMoveUp",on:"keydown",preventDefault:!0,enabled:!0},40:{name:"DOWN",event:"uiTypeaheadInputMoveDown",on:"keydown",preventDefault:!0,enabled:!0}};return a},this.setPreventKeyDefault=function(a,b){this.KEY_CODE_MAP[b.key].preventDefault=b.preventDefault},this.toggleTextareaActions=function(a){this.KEY_CODE_MAP[13].enabled=a,this.KEY_CODE_MAP[38].enabled=a,this.KEY_CODE_MAP[40].enabled=a},this.enableTextareaActionWatching=function(){this.toggleTextareaActions(!0)},this.disableTextareaActionWatching=function(){this.toggleTextareaActions(!1)},this.clearCurrentQuery=function(a){this.currentQuery=null},this.focusInput=function(a){this.$input.focus()},this.click=function(a){this.updateCaretPosition()},this.ignoreNextFocus=function(a){this.ignoreFocus=!0},this.updateCaretPosition=function(){if(this.ignoreFocus){this.ignoreFocus=!1;return}this.richTextareaMode||this.trigger(this.$input,"uiTextChanged",{text:this.$input.val(),position:caret.getPosition(this.$input[0])})},this.modifierKeyPressed=function(a){var b=this.KEY_CODE_MAP[a.which||a.keyCode],c=a.type=="keydown"&&a.which==16||a.type=="keyup"&&a.which==16;if(b&&b.enabled){if(a.type!==b.on)return;if(b.name=="TAB"&&a.shiftKey)return;if(this.releaseTabKey&&b.name=="TAB")return;if(b.preventDefault)if(this.attr.inputIsTweetbox&&b.name==="ENTER"){var d=this.select("dropdownSelectedItemSelector");d.length&&a.preventDefault()}else a.preventDefault();b.canCauseComplete&&this.isValidCompletionAction(b.event)&&(this.textareaMode||(this.releaseTabKey=!0),this.trigger(this.$input,"uiTypeaheadInputAutocomplete")),this.trigger(this.$input,b.event),this.updateCaretPosition()}else{if(a.keyCode==27)return;c||(this.releaseTabKey=!1),this.supportsInputEvent||this.handleInputChange(a)}},this.handleInputChange=function(a){this.richTextareaMode||(RTLText.onTextChange(a),this.trigger(this.$input,"uiTextChanged",{text:this.$input.val(),position:caret.getPosition(this.$input[0])}))},this.getCurrentWord=function(){var a;if(this.textareaMode){var b=twitterText.extractEntitiesWithIndices(this.text);b.forEach(function(b){var c=b.screenName&&!b.listSlug,d=this.attr.completeAllEntities&&(b.cashtag||b.hashtag),e=this.position>b.indices[0]&&this.position<=b.indices[1];(c||d)&&e&&(a=this.text.slice(b.indices[0],b.indices[1]))},this),this.attr.allowAccountsWithoutAtSign&&!a&&(a=this.getCurrentWordUsingRegex(REAL_NAME_REGEXP_ONE_WORD)||this.getCurrentWordUsingRegex(REAL_NAME_REGEXP_TWO_WORD))}else a=this.text.trim()==""?"":this.text;return a?RTLText.cleanText(a):""},this.getCurrentWordUsingRegex=function(a){var b=stringUtils.wordAtPosition(this.text,this.position,a,1);if(b){var c=b.split(/\s+/),d=c.every(function(a){var b=helpers.getFirstChar(a);return b==b.toUpperCase()});if(d)return b}},this.completeInput=function(a,b){a.stopPropagation();var c=b.value||b.query,d=c!==this.currentQuery&&(b.source!="account"||b.item.screen_name!==this.currentQuery);if(!d)return;var e=c;b.source=="account"&&(e=(this.textareaMode?"@":"")+b.item.screen_name,this.currentQuery=b.item.screen_name);if(this.textareaMode){var f=this.replaceWordAtPosition(this.text,this.position,b.input,e+" ");this.$input.trigger("uiChangeTextAndPosition",f),(!this.richTextareaMode||a.type=="uiTypeaheadItemSelected")&&this.$input.focus()}else b.source!="account"&&this.$input.val(e),a.type!="uiTypeaheadItemSelected"&&(this.$input.focus(),this.setQuery(e));b.fromSelectionEvent=a.type=="uiTypeaheadItemSelected",this.trigger(this.$input,"uiTypeaheadItemComplete",b)},this.replaceWordAtPosition=function(a,b,c,d){var e=null;c=c.replace(UNSAFE_REGEX_CHARS,function(a){return"\\"+a});var a=a.replace(new RegExp(c+"\\s?","g"),function(){var a=arguments[0],c=arguments[arguments.length-2];return c<=b&&c+a.length>=b?(e=c+d.length,d):a});return{text:a,position:e}},this.isValidCompletionAction=function(a){var b=this.$input.attr("dir")==="rtl";return!this.textareaMode||a!=="uiTypeaheadInputRight"&&a!=="uiTypeaheadInputLeft"?b&&a==="uiTypeaheadInputRight"?!1:!b&&a==="uiTypeaheadInputLeft"?!1:this.text&&this.position!=this.text.length&&(a==="uiTypeaheadInputRight"||b&&a==="uiTypeaheadInputLeft")?!1:!0:!1},this.setQuery=function(a){var b;if(this.currentQuery==null||this.currentQuery!==a){this.currentQuery=a,b=a.length>0?0:-1,this.$button.attr("tabIndex",b);var c=this.attr.tweetContextEnabled&&this.attr.includeTweetContext?this.text:undefined;this.trigger(this.$input,"uiTypeaheadInputChanged",{value:this.currentQuery,tweetContext:c})}},this.setRTLMarkers=function(){RTLText.setText(this.$input.get(0))},this.clearInput=function(){this.$input.val(""),this.clearCurrentQuery(),this.$button.attr("tabIndex",-1),this.releaseTabKey=!1},this.saveTextAndPosition=function(a,b){this.text=b.text,this.position=b.position;var c=this.getCurrentWord();this.setQuery(c)},this.savePosition=function(a,b){this.position=b.position;if(this.textareaMode&&this.currentQuery){var c=this.getCurrentWord();c!==this.currentQuery&&this.setQuery("")}},this.after("initialize",function(){this.$input=this.select("inputSelector"),this.textareaMode=!this.$input.is("input"),this.richTextareaMode=this.$input.is(".rich-editor"),this.$button=this.select("buttonSelector"),this.KEY_CODE_MAP=this.getDefaultKeycodes(),this.richTextareaMode&&this.disableTextareaActionWatching(),this.supportsInputEvent=eventSupport.browserSupports("input","input"),this.$button.attr("tabIndex",-1),this.on(this.$input,"keyup keydown keypress paste",this.modifierKeyPressed),this.on(this.$input,"input",this.handleInputChange),this.on(this.$input,"focus",this.updateCaretPosition),this.on("uiTypeaheadSelectionCleared",this.updateCaretPosition),this.on(this.$input,"uiTypeaheadIgnoreNextFocus",this.ignoreNextFocus),this.$input.is(":focus")&&this.updateCaretPosition(),this.on(this.$input,"blur",this.clearCurrentQuery),this.textareaMode&&(this.on(this.$input,"click",this.click),this.on("uiTypeaheadResultsShown",this.enableTextareaActionWatching),this.on("uiTypeaheadResultsHidden",this.disableTextareaActionWatching)),this.on("uiTextChanged",this.saveTextAndPosition),this.on("uiCursorPositionChanged",this.savePosition),this.on(document,"uiBeforePageChanged",this.clearInput),this.on("uiTypeaheadSetPreventDefault",this.setPreventKeyDefault),this.on(document,"uiSwiftLoaded uiPageChanged",this.setRTLMarkers),this.on("uiTypeaheadItemPossiblyComplete uiTypeaheadItemSelected",this.completeInput)})}var defineComponent=require("core/component"),caret=require("app/utils/caret"),eventSupport=require("app/utils/event_support"),helpers=require("app/utils/typeahead_helpers"),stringUtils=require("app/utils/string"),twitterText=require("lib/twitter-text"),RTLText=require("app/utils/rtl_text");module.exports=defineComponent(typeaheadInput);var nonLatinHashtagChars=[],nonLatinHashtagCharCodes=[[1024,1279],[1280,1319],[11744,11775],[42560,42655],[1425,1471],[1473,1474],[1476,1477],[1479,1479],[1488,1514],[1520,1524],[64274,64296],[64298,64310],[64312,64316],[64318,64318],[64320,64321],[64323,64324],[64326,64335],[1552,1562],[1568,1631],[1646,1747],[1749,1756],[1758,1768],[1770,1775],[1786,1788],[1791,1791],[1872,1919],[2208,2208],[2210,2220],[2276,2302],[64336,64433],[64467,64829],[64848,64911],[64914,64967],[65008,65019],[65136,65140],[65142,65276],[8204,8204],[3585,3642],[3648,3662],[4352,4607],[12592,12677],[43360,43391],[44032,55215],[55216,55295],[65441,65500],[12449,12538],[12540,12542],[65382,65439],[65392,65392],[65296,65305],[65313,65338],[65345,65370],[12353,12438],[12441,12446],[13312,19903],[19968,40959],[12291,12291],[12293,12293],[12347,12347]];nonLatinHashtagCharCodes.forEach(function(a){twitterText.addCharsToCharClass(nonLatinHashtagChars,a[0],a[1])}),twitterText.regexen.nonLatinHashtagChars=twitterText.regexSupplant(nonLatinHashtagChars.join(""));var UNSAFE_REGEX_CHARS=/[[\]\\*?(){}.+$^]/g,REAL_NAME_REGEXP_ONE_WORD=twitterText.regexSupplant(/([a-z#{latinAccentChars}#{nonLatinHashtagChars}]{4,})/gi),REAL_NAME_REGEXP_TWO_WORD=twitterText.regexSupplant(/(?=((^|\b)[A-Z#{nonLatinHashtagChars}][A-Za-z#{latinAccentChars}#{nonLatinHashtagChars}]*\s[A-Z#{nonLatinHashtagChars}][A-Za-z#{latinAccentChars}#{nonLatinHashtagChars}]*))/g)
  });
  define("app/ui/select_users",["module","require","exports","app/utils/caret","core/component","app/ui/typeahead/typeahead_dropdown","app/ui/typeahead/typeahead_input"],function(module, require, exports) {
  function selectUsers(){this.defaultAttrs({selectUsersContainerSelector:".user-select-container",typeaheadContainerSelector:".typeahead-container",dropdownSelector:".dropdown-menu.typeahead",inputSelector:".user-select-controls input",itemSelector:".typeahead-item",maxSelection:10,requestType:"",alwaysOpen:!1,includePreviouslySelectedUsers:!1,controlsSelector:".user-select-controls",userBorderColorClass:"u-borderUserColorLight",datasourceForTagging:"accounts",additionalDatasourceRenderers:[],typeaheadSrc:"",decidersForTypeahead:{},selectedItemType:"mediaTagUsers",cannotSelectClass:"cannot-select",eventData:{scribeContext:{element:"tweet_box"}}}),this.selectUser=function(a,b){var c=b&&b.item&&b.item.id;if(c==null)return;var d=this.shouldUpdateUserList(a,b),e=this.selectedUserIndex(b.item.id);e==-1&&!d&&a.stopImmediatePropagation(),e==-1&&d?this.selectedUsers.push(b.item):e!=-1&&(this.selectedUsers.splice(e,1),d=!0),d?(this.trigger("uiUpdatedSelectedUsers",{items:this.selectedUsers}),this.$input.val(""),this.trigger(this.$input,"uiTextChanged",{text:this.$input.val(),position:caret.getPosition(this.$input[0])})):this.trigger("uiCouldNotSelectUser"),this.$input.focus()},this.shouldUpdateUserList=function(a,b){var c=b&&b.item&&b.item.id;return c!=null&&!$(a.target).find("[data-user-id="+c+"]").hasClass(this.attr.cannotSelectClass)&&this.selectedUsers.length<this.maxSelectedItems},this.selectedUserIndex=function(a){for(var b=0;b<this.selectedUsers.length;b++)if(this.selectedUsers[b].id==a)return b;return-1},this.resetSelectedUsers=function(){this.selectedUsers=[],this.trigger("uiTypeaheadClearRenderedResults")},this.setMaxSelectedItems=function(a){this.maxSelectedItems=parseInt(a,10)},this.updateMaxSelectedItems=function(a,b){var c=b&&b.maxSelectedItems>=0?b.maxSelectedItems:this.maxSelectedItems;this.setMaxSelectedItems(c)},this.resetComposer=function(){this.resetSelectedUsers(),this.$input.val(""),this.trigger("uiUpdatedSelectedUsers",{items:this.selectedUsers}),this.trigger(this.$input,"uiTextChanged",{text:this.$input.val(),position:caret.getPosition(this.$input[0])})},this.focusInputWithResultsShown=function(a,b){this.$input.focus(),this.forceShow(),this.trigger("uiTypeaheadResultsShown")},this.focusInput=function(){this.select("controlsSelector").addClass(this.attr.userBorderColorClass)},this.blurInput=function(){this.select("controlsSelector").removeClass(this.attr.userBorderColorClass)},this.forceShow=function(){this.select("dropdownSelector").show()},this.forceHide=function(){this.select("dropdownSelector").hide(),this.trigger("uiTypeaheadSetPreventDefault",{preventDefault:!1,key:9}),this.trigger("uiTypeaheadResultsHidden")},this.hideAndManageEsc=function(a){a.preventDefault(),a.stopPropagation(),this.$input.blur(),this.forceHide()},this.possiblyHide=function(a){a.target!=this.$node.get(0)&&!$.contains(this.$node.get(0),a.target)&&this.forceHide()},this.after("initialize",function(){TypeaheadInput.attachTo(this.$node,{inputSelector:this.attr.inputSelector,eventData:this.attr.eventData});var a=[this.attr.datasourceForTagging,"selectedUsers"];this.attr.includePreviouslySelectedUsers&&a.push("prefillUsers");var b=[["selectedUsers",a]];this.attr.additionalDatasourceRenderers&&this.attr.additionalDatasourceRenderers.length&&b.push.apply(b,this.attr.additionalDatasourceRenderers),this.setMaxSelectedItems(this.attr.maxSelection),TypeaheadDropdown.attachTo(this.$node,{alwaysOpen:this.attr.alwaysOpen,blockLinkActions:!0,typeaheadSrc:this.attr.typeaheadSrc,datasourceRenders:b,datasourceOptions:{requestType:this.attr.requestType},selectedItemType:this.attr.selectedItemType,deciders:this.attr.decidersForTypeahead,inputSelector:this.attr.inputSelector,eventData:this.attr.eventData}),this.on("uiTypeaheadRenderResults uiShowSelectedUsers",this.forceShow),this.on("uiTypeaheadItemSelected uiSelectUser",this.selectUser),this.on("uiUpdateMaxSelectedItems",this.updateMaxSelectedItems),this.on("uiResetSelectedUsers",this.resetSelectedUsers),this.on("uiResetSelectedUserComposer",this.resetComposer),this.on("uiShortcutEsc",this.hideAndManageEsc),this.selectedUsers=[],this.$input=this.select("inputSelector"),this.on("uiSetFocusInSelectedUserInput",this.focusInputWithResultsShown),this.on(this.$input,"focusin",this.focusInput),this.on(this.$input,"focusout",this.blurInput),this.on(document,"mousedown : focusin",this.possiblyHide)})}var caret=require("app/utils/caret"),defineComponent=require("core/component"),TypeaheadDropdown=require("app/ui/typeahead/typeahead_dropdown"),TypeaheadInput=require("app/ui/typeahead/typeahead_input"),SelectUsers=defineComponent(selectUsers);module.exports=SelectUsers
  });
  define("app/ui/select_users_with_popover",["module","require","exports","core/component","app/ui/select_users"],function(module, require, exports) {
  function selectUsersWithPopover(){this.defaultAttrs({dropdownSelector:".user-select-container.dropdown-menu",openPopoverButtonSelector:".js-open-user-select",includePreviouslySelectedUsers:!0,typeaheadSrc:"COMPOSE_MEDIA_TAGGING",datasourceForTagging:"mediaTagAccounts",requestType:"compose_media_tagging"}),this.showSelectPopover=function(a){this.previouslyFocused=document.activeElement,a.stopPropagation(),a.preventDefault(),this.$node.show(),this.trigger("uiSetFocusInSelectedUserInput")},this.hideSelectPopover=function(a){if(a.target!=this.$node.get(0)&&!$.contains(this.$node.get(0),a.target)&&$(a.target).closest(this.attr.openPopoverButtonSelector).length==0){if(this.previouslyFocused&&a.type=="focusin"){var b=this.previouslyFocused;this.previouslyFocused=null,b.focus()}else this.previouslyFocused=null;this.forceHide()}},this.forceHide=function(a){this.$node.hide(),this.trigger("uiTypeaheadSetPreventDefault",{preventDefault:!1,key:9}),this.trigger("uiTypeaheadResultsHidden")},this.hideAndManageEsc=function(a){a.preventDefault(),a.stopPropagation(),this.forceHide()},this.after("initialize",function(){SelectUsers.attachTo(this.$node,{alwaysOpen:!0,datasourceForTagging:this.attr.datasourceForTagging,includePreviouslySelectedUsers:this.attr.includePreviouslySelectedUsers,requestType:this.attr.requestType,typeaheadSrc:this.attr.typeaheadSrc}),this.on("uiShowSelectPopover",this.showSelectPopover),this.on("uiShortcutEsc",this.hideAndManageEsc),this.on(document,"mousedown : focusin",this.hideSelectPopover)})}var defineComponent=require("core/component"),SelectUsers=require("app/ui/select_users"),SelectUsersWithPopover=defineComponent(selectUsersWithPopover);module.exports=SelectUsersWithPopover
  });
  define("app/data/media_tags_scribe",["module","require","exports","core/component","app/data/with_scribe"],function(module, require, exports) {
  function mediaTagsScribe(){this.scribeClickOnButton=function(a,b){this.scribe({element:"media_tag_prompt",action:"click"},b)},this.scribeUserSelected=function(a,b){b.items.length&&this.scribe({component:"media_tag",element:"taggable_user",action:"click"},b)},this.scribeUserNotSelected=function(a,b){this.scribe({component:"media_tag",element:"nontaggable_user",action:"click"},b)},this.scribeTweet=function(a,b){b.tweetData.tagged_users&&b.tweetData.tagged_users.length&&b.tweetData.in_reply_to_status_id&&b.tweetData.in_reply_to_status_id.length?this.scribe({action:"reply_with_tags"},b):b.tweetData.tagged_users&&b.tweetData.tagged_users.length&&this.scribe({action:"tweet_with_tags"},b)},this.after("initialize",function(){this.on("uiShowSelectPopover",this.scribeClickOnButton),this.on("uiUpdatedSelectedUsers",this.scribeUserSelected),this.on("uiSendTweetWithMedia",this.scribeTweet),this.on("uiCouldNotSelectUser",this.scribeUserNotSelected)})}var defineComponent=require("core/component"),withScribe=require("app/data/with_scribe");module.exports=defineComponent(mediaTagsScribe,withScribe)
  });
  define("app/utils/image_thumbnail",["module","require","exports","app/utils/image"],function(module, require, exports) {
  var image=require("app/utils/image"),imageThumbnail={createThumbnail:function(a,b,c){var d=new Image;d.onload=function(){b(d,d.height,d.width,c),d.onload=null};var e=!1;d.onerror=function(){e||(d.src=image.getDataUri(a,!1),e=!0)},d.src=image.getThumbnailUri(a)},getThumbnailOffset:function(a,b,c){var d;b=+b,a=+a,c=+c;if(b==a&&b>=c&&a>=c)return{position:"absolute",height:c,width:c,left:0,top:0};if(a<c||b<c)d={position:"absolute",height:a,width:b,top:(c-a)/2,left:(c-b)/2};else if(b>a){var e=c/a*b;d={position:"absolute",height:c,width:e,left:-(e-c)/2,top:0}}else if(a>b){var f=c/b*a;d={position:"absolute",height:f,width:c,top:-(f-c)/2,left:0}}return d}};module.exports=imageThumbnail
  });
  define("app/ui/compose/tweet_box_thumbnails",["module","require","exports","core/component","app/utils/file","app/utils/video","app/utils/image_thumbnail","app/utils/shared_objects","template"],function(module, require, exports) {
  function tweetBoxThumbnails(){this.defaults={thumbSelector:".previews .preview",thumbTemplateSelector:".preview.template",thumbsSelector:".previews",thumbImageSelector:".preview img",filenameSelector:".preview .filename",dismissSelector:".dismiss",tweetBoxSelector:".tweet-form",editSelector:".edit",dynamicSizingClass:"dynamic-photos",gifClass:"is-gif",hasAttributionClass:"has-attribution",attributionSelector:".js-attribution"},this.addThumbnail=function(a,b){b.imageData&&imageThumbnail.createThumbnail(b.imageData,this.gotThumbnail.bind(this),{uploadId:b.uploadId,info:b.info,fileName:b.fileName,duration:b.duration}),this.select("filenameSelector").text(b.fileName)},this.updateThumbnail=function(a,b){b.imageData&&imageThumbnail.createThumbnail(b.imageData,this.gotUpdatedThumbnail.bind(this),{uploadId:b.uploadId,info:b.info,duration:b.duration})},this.gotUpdatedThumbnail=function(a,b,c,d){var e=this.select("thumbsSelector").find(".preview[data-upload-id="+d.uploadId+"]");e.length&&(e.find("img").attr("src",a.src),e.find(".duration-badge").html(video.formatDuration(d.duration)))},this.removeAllBlobs=function(a){a.each(function(a,b){var c=b.src;c.indexOf("blob:")==0&&file.revokeObjectUrl(c)})},this.removeAllThumbnails=function(a,b){this.removeAllBlobs(this.select("thumbImageSelector")),this.select("thumbsSelector").empty(),this.select("filenameSelector").empty(),this.select("attributionSelector").empty(),this.removeDynamicSizing();var c=this.$node.closest(this.attr.tweetBoxSelector);c.removeClass(this.attr.gifClass),c.removeClass(this.attr.hasAttributionClass)},this.addThumbnailPlaceholder=function(a,b){this.gotThumbnail($("<img>",{src:b.url})[0],b.height,b.width,b),this.select("thumbSelector").last().addClass("preview--placeholder").append($("<div>",{addClass:"preview-loading"})).find(".js-dismiss").remove(),this.trigger("uiPreviewThumbnailShow",b)},this.gotThumbnail=function(a,b,c,d){var e,f=$("<a>",{href:a.src,target:"_blank",attr:{draggable:!1}}).append(a),g=$(a);g.attr({draggable:!1,"data-original-width":c,"data-original-height":b}),this.select("thumbsSelector").find(".preview--placeholder").remove();var h=this.select("thumbTemplateSelector").clone();h.removeClass("template"),h.append(f),d.uploadId&&h.attr("data-upload-id",d.uploadId),d.info&&d.info.fileId&&(h.attr("data-file-id",d.info.fileId),e=sharedObjects.get(d.info.fileId)),this.on(h.find(".dismiss"),"click",this.removeImage),this.select("thumbsSelector").append(h);var i=this.$node.closest(this.attr.tweetBoxSelector);i.toggleClass(this.attr.hasAttributionClass,!!d.info&&d.info.attribution!==undefined),d.info&&d.info.isVideo?(this.on(h.find(".edit"),"click",this.editMedia),this.on(h.find(".play-button"),"click",this.editMedia),this.on(h.find("a"),"click",this.editMedia),d.duration&&h.find(".duration-badge").html(video.formatDuration(d.duration)),this.resizeMediaItemThumbnail(b,c)):d.info&&d.info.isGif?(i.addClass(this.attr.gifClass),this.resizeMediaItemThumbnail(b,c)):g.css(imageThumbnail.getThumbnailOffset(b,c,75)),d.info&&d.info.attribution&&i.find(this.attr.attributionSelector).data({info:d.info}).html(template["found_media/attribution"].render(d.info.attribution)),this.trigger("uiUpdatedThumbnails")},this.resizeMediaItemThumbnail=function(a,b){var c=this.select("thumbSelector"),d=this.$node.closest(this.attr.tweetBoxSelector);if(!c.length){this.removeDynamicSizing(),d.removeClass(this.attr.gifClass);return}var e={},f,g=330,h=330,i,j=20;d.hasClass(this.attr.hasAttributionClass)&&(j+=25);var k;a>b?(f=Math.min(a,h),k=b*(f/a)):(k=Math.min(b,g),f=a*(k/b)),e={height:f,width:k},d.addClass(this.attr.dynamicSizingClass),c.each(function(a){var b=$(this).find("img");b.css(e);var c=b.closest(".preview");c.css(e)}),i=f+j,this.$node.css("height",i),d.find(".RichEditor,.tweet-box").eq(0).css("padding-bottom",i),d.find(".typeahead").css("margin-top",-i)},this.removeDynamicSizing=function(){var a=this.$node.closest(this.attr.tweetBoxSelector);this.$node.removeAttr("style"),a.find(".RichEditor,.tweet-box").eq(0).removeAttr("style"),a.find(".typeahead").removeAttr("style"),a.removeClass(this.attr.dynamicSizingClass),a.removeClass(this.attr.hasAttributionClass),this.$node.closest(".has-video").removeClass("has-video")},this.removeImage=function(a){var b=$(a.target).closest(this.attr.thumbSelector),c=b.find("img"),d,e={},f=b.attr("data-upload-id"),g=b.attr("data-file-id");g&&(d=sharedObjects.get(g),e=file.getFileInfo(d.name,d)),this.removeAllBlobs(c),b.addClass("is-removing"),b.on("animationend",function(){this.trigger("uiPreviewThumbnailRemove",{uploadId:f}),b.remove(),e.isVideo||e.isGif?this.resizeMediaItemThumbnail(c.attr("data-original-height"),c.attr("data-original-width")):c.css(imageThumbnail.getThumbnailOffset(c.attr("data-original-height"),c.attr("data-original-width"),75))}.bind(this)),f&&this.trigger(document,"uiMediaSruCancel",{uploadId:f}),this.trigger("uiImagePickerRemove"),this.trigger("uiUpdatedThumbnails")},this.editMedia=function(a){a.preventDefault();var b=this.$node.closest(this.attr.tweetBoxSelector);if(!b.hasClass("tweeting")){var c=$(a.target).closest(this.attr.thumbSelector),d=c.attr("data-file-id");this.trigger(document,"uiMediaEditDialogOpen",{fileId:d})}},this.showAttributionLink=function(a){var b=$(a.target).data("info");this.trigger("uiNeedsCopyFoundMediaDialog",b)},this.after("initialize",function(){var a=this.$node.closest(this.attr.tweetBoxSelector);this.on(a,"uiPreviewThumbnailAdd",this.addThumbnail),this.on(a,"uiPreviewThumbnailUpdate",this.updateThumbnail),this.on(a,"uiPreviewThumbnailRemoveAll",this.removeAllThumbnails),this.on(a,"uiPreviewThumbnailPlaceholderAdd",this.addThumbnailPlaceholder),this.on("click",{attributionSelector:this.showAttributionLink})})}var defineComponent=require("core/component"),file=require("app/utils/file"),video=require("app/utils/video"),imageThumbnail=require("app/utils/image_thumbnail"),sharedObjects=require("app/utils/shared_objects"),template=require("template"),TweetBoxThumbnails=defineComponent(tweetBoxThumbnails);module.exports=TweetBoxThumbnails
  });
  define("app/ui/with_drop_events",["module","require","exports","app/utils/drag_drop_helper","app/utils/file"],function(module, require, exports) {
  function withDropEvents(){this.drop=function(a){a.preventDefault(),a.stopImmediatePropagation();var b=file.getFileHandle(a.originalEvent.dataTransfer);this.trigger("uiDrop",{file:b}),this.trigger("uiDragEnd")},this.after("initialize",function(){this.on("drop",dragDropHelper.onlyHandleEventsWithFiles(this.drop))})}var dragDropHelper=require("app/utils/drag_drop_helper"),file=require("app/utils/file");module.exports=withDropEvents
  });
  define("app/ui/with_droppable_image",["module","require","exports","core/compose","app/utils/file","app/ui/with_drop_events"],function(module, require, exports) {
  function withDroppableImage(){compose.mixin(this,[withDropEvents]),this.triggerGotImageData=function(a,b){this.trigger("uiGotImageData",{name:a,info:b})},this.captureImageData=function(a,b){var c=b.file,d=c.name;this.triggerGotImageData(d,file.getFileInfo(d,c))},this.after("initialize",function(){this.on("uiDrop",this.captureImageData)})}var compose=require("core/compose"),file=require("app/utils/file"),withDropEvents=require("app/ui/with_drop_events");module.exports=withDroppableImage
  });
  define("app/ui/with_proxy_image_upload_button",["module","require","exports"],function(module, require, exports) {
  function withProxyImageUploadButton(){this.defaultAttrs({focusClass:"focus",activeClass:"active",fileInputSelector:".file-input",uploadPhotoSelector:".photo-selector",imageBtnSelector:".photo-selector .btn"}),this.hideAndDisableImageButton=function(){this.select("uploadPhotoSelector").hide()},this.showAndEnableImageButton=function(){this.select("uploadPhotoSelector").show()},this.applyFocusStyleImageButton=function(a){this.select("imageBtnSelector").addClass(this.attr.focusClass)},this.removeFocusStyleImageButton=function(a){this.select("imageBtnSelector").removeClass(this.attr.focusClass)},this.applyActiveStyleImageButton=function(a){this.select("imageBtnSelector").addClass(this.attr.activeClass)},this.removeActiveStyleImageButton=function(a){this.select("imageBtnSelector").removeClass(this.attr.activeClass)},this.after("initialize",function(){this.on("focusin",{fileInputSelector:this.applyFocusStyleImageButton}),this.on("focusout",{fileInputSelector:this.removeFocusStyleImageButton}),this.on("mousedown",{fileInputSelector:this.applyActiveStyleImageButton}),this.on("mouseup mouseleave",{fileInputSelector:this.removeActiveStyleImageButton}),this.on("uiEnableImageSelection",this.showAndEnableImageButton),this.on("uiDisableImageSelection",this.hideAndDisableImageButton)})}module.exports=withProxyImageUploadButton
  });
  define("app/ui/compose/with_image_attachment",["module","require","exports","core/i18n","core/compose","app/utils/file","app/utils/image","app/ui/image_selector","app/ui/select_users_with_popover","app/data/media_tags_scribe","app/ui/compose/tweet_box_thumbnails","app/ui/with_droppable_image","app/ui/with_proxy_image_upload_button"],function(module, require, exports) {
  function withImageAttachment(){compose.mixin(this,[withProxyImageUploadButton,withDroppableImage]),this.defaultAttrs({thumbContainerSelector:".thumbnail-container",taggingSelector:".photo-tagging-container",taggingButtonSelector:".js-open-user-select",taggedUsersSelector:".tagged-users",thumbSelector:".previews .preview",photoSelectorSelector:".photo-selector"}),this.hasMedia=!1,this.isVideo=!1,this.isGif=!1,this.taggedUsers=[],this.defaultTagText=_('Who\'s in this photo?'),this.showPreview=function(a,b){this.isVideo=b.info&&b.info.isVideo,this.isGif=b.info&&b.info.isGif,this.$node.addClass("has-preview has-thumbnail"),this.isVideo&&this.$node.addClass("has-video"),this.hasMedia=!0,this.detectUpdatedText(!0),!this.isGif&&!this.isVideo?(this.select("taggingButtonSelector").first().show(),this.select("taggingButtonSelector").first().prop("disabled",!1)):this.select("taggingButtonSelector").first().hide()},this.updateThumbnailCount=function(a){var b=this.select("thumbSelector").length;b>1?this.defaultTagText=_('Who\'s in these photos?'):this.defaultTagText=_('Who\'s in this photo?'),(b===0||this.taggedUsers.length===0)&&this.trigger("uiUpdatedSelectedUsers",{items:[]})},this.hidePreview=function(a,b){this.$node.removeClass("has-preview has-thumbnail"),this.hasMedia=!1,this.isVideo=!1,this.isGif=!1,this.detectUpdatedText(!0),this.select("taggingButtonSelector").first().prop("disabled",!0)},this.updateTaggedUsers=function(a,b){var c=this.select("taggedUsersSelector");if(b.items.length===0){c.text(this.defaultTagText),this.select("taggingButtonSelector").addClass("no-users");return}this.select("taggingButtonSelector").removeClass("no-users"),this.taggedUsers=b.items,c.html(this.getTaggedUsersString(b.items))},this.getTaggedUsersString=function(a){if(a.length==1)return _('{{name1}}',{name1:a[0].name});if(a.length==2)return _('<span class=\'user-name\'>{{name1}}</span> and 1 other',{name1:a[0].name});if(a.length>2)return _('<span class=\'user-name\'>{{name1}}</span> and {{count}} others',{name1:a[0].name,count:a.length-1})},this.after("reset",function(){this.trigger("uiPreviewThumbnailHide"),this.trigger("uiPreviewThumbnailRemoveAll"),this.trigger(this.attr.taggingSelector,"uiResetSelectedUserComposer")}),this.around("createDataForSending",function(a){var b=a();return b.tagged_users=this.taggedUsers.map(function(a){return a.id}).join(","),this.trigger("uiUpdateRecentTags",{items:this.taggedUsers}),b}),this.around("hasAttachment",function(a){return this.hasMedia||a()}),this.getPhotoLimit=function(){return!this.attr.dmOnly&&file.hasFileReader()&&image.hasCanvas()?4:1},this.after("initialize",function(a,b){this.attachChild(TweetBoxThumbnails,this.select("thumbContainerSelector"),{eventData:this.attr.eventData});var c={photoLimit:this.getPhotoLimit(),gifSupport:!this.attr.dmOnly,mediaCategoryPrefix:this.attr.dmOnly?"dm_":"tweet_",environment:b.environment,isMinimalButtonLabels:this.$node.hasClass("is-minimalButtonLabels")},d=["fileDataString","fileDataSelector","fileInputString","emptyFileDataString","emptyFileInputString","uploadType","eventData","gifSupport","videoSupport","sruAllMedia"];d.forEach(function(a){a in this.attr&&(c[a]=this.attr[a])},this),this.attachChild(ImageSelector,this.select("photoSelectorSelector"),c),this.on("uiPreviewThumbnailShow",this.showPreview),this.on("uiPreviewThumbnailHide",this.hidePreview),this.on("uiImagePickerAdd uiVideoPickerAdd uiPreviewThumbnailRemove",this.focus),this.attachChild(taggingComposer,this.select("taggingSelector"),{includePreviouslySelectedUsers:!0,eventData:this.attr.eventData}),this.attachChild(taggingScribe,this.select("taggingSelector")),this.on(this.select("taggingButtonSelector"),"click",function(){this.trigger(this.select("taggingSelector"),"uiShowSelectPopover")}),this.on("uiUpdatedSelectedUsers",this.updateTaggedUsers),this.on("uiUpdatedThumbnails",this.updateThumbnailCount)})}var _=require("core/i18n"),compose=require("core/compose"),file=require("app/utils/file"),image=require("app/utils/image"),ImageSelector=require("app/ui/image_selector"),taggingComposer=require("app/ui/select_users_with_popover"),taggingScribe=require("app/data/media_tags_scribe"),TweetBoxThumbnails=require("app/ui/compose/tweet_box_thumbnails"),withDroppableImage=require("app/ui/with_droppable_image"),withProxyImageUploadButton=require("app/ui/with_proxy_image_upload_button");module.exports=withImageAttachment
  });
  define("app/ui/compose/with_progress_bar",["module","require","exports"],function(module, require, exports) {
  function withProgressBar(){this.defaultAttrs({uploadingSelector:".TweetBoxUploadProgress-uploading",processingSelector:".TweetBoxUploadProgress-processing",currentPositionSelector:".TweetBoxUploadProgress-barPosition",uploadInputSelector:".multi-photo-data"}),this.showProgressBar=function(a,b){if(b.uploadId!=this.getUploadId())return;this.$node.addClass("is-showingProgress")},this.hideProgressBar=function(a,b){this.$node.removeClass("is-showingProgress is-uploading is-waiting is-processing");var c=this.getUploadId();c&&(this.trigger(document,"uiMediaSruCancel",{uploadId:c}),this.select("currentPositionSelector").width(0))},this.updateProgressBar=function(a,b){if(b.uploadId!=this.getUploadId())return;b.mode&&this.$node.addClass("is-"+b.mode),b.mode=="uploading"&&this.select("currentPositionSelector").width(b.percent+"%")},this.getUploadId=function(){return this.select("uploadInputSelector").attr("data-upload-id")},this.after("initialize",function(){this.on(document,"uiMediaSruFinalize",this.showProgressBar),this.on(document,"dataMediaSruProgress dataMediaSruSuccess",this.updateProgressBar),this.on(document,"dataMediaSruError dataTweetError uiTweetDialogClosed",this.hideProgressBar),this.on("uiTweetSent uiTweetCancelled",this.hideProgressBar)})}module.exports=withProgressBar
  });
  define("app/ui/rescuebird/alert_composer_button",["module","require","exports","core/utils","core/component"],function(module, require, exports) {
  var util=require("core/utils"),defineComponent=require("core/component"),INITIAL_STATE={isActivated:!1,isDisabled:!1};module.exports=defineComponent(function(){this.attributes({buttonSelector:".RescuebirdAlertButton-btn",disabledClass:"disabled",activatedClass:"enabled",tweetBoxSelector:"form.tweet-form"}),this.open=function(){this.trigger("uiComposerDisableExclusiveAttachments"),this.activate(),this.trigger("uiRescuebirdComposerOpen")},this.activate=function(){this.updateState({isActivated:!0,isDisabled:!1})},this.deactivate=function(){this.updateState({isActivated:!1})},this.disable=function(){this.updateState({isDisabled:!0})},this.enable=function(){this.updateState({isDisabled:!1})},this.reset=function(){this.updateState(INITIAL_STATE)},this.updateState=function(a){this.state=util.merge(this.state,a),this.updateNode()},this.updateNode=function(){var a=this.state.isDisabled,b=this.state.isActivated;this.$button.prop("disabled",a||b).prop("tabindex",a?"-1":"0").toggleClass(this.attr.activatedClass,b).toggleClass(this.attr.disabledClass,a)},this.after("initialize",function(){this.$button=this.select("buttonSelector"),this.$tweetBox=this.$node.closest(this.attr.tweetBoxSelector),this.state=INITIAL_STATE,this.on("click",function(a){!this.state.isActivated&&!this.state.isDisabled&&this.open()}),this.on(this.$tweetBox,"uiComposerEnableExclusiveAttachments",this.enable),this.on(this.$tweetBox,"uiComposerDisableExclusiveAttachments",this.disable),this.on(this.$tweetBox,"uiResetRescuebirdComposer",this.reset)})})
  });
  define("app/ui/rescuebird/alert_composer_view",["module","require","exports","core/component","core/utils"],function(module, require, exports) {
  var defineComponent=require("core/component"),util=require("core/utils"),INITIAL_STATE={isVisible:!1};module.exports=defineComponent(function(){this.attributes({removeSelector:".RescuebirdAlertComposer-remove",tweetBoxSelector:"form.tweet-form"}),this.show=function(){this.updateState({isVisible:!0})},this.updateState=function(a){this.state=util.merge(this.state,a),this.updateNode()},this.updateNode=function(){this.$tweetBox.toggleClass("has-rescuebird-alert",this.state.isVisible)},this.reset=function(){this.updateState(INITIAL_STATE)},this.after("initialize",function(a,b){this.$tweetBox=this.$node.closest(this.attr.tweetBoxSelector),this.state=INITIAL_STATE,this.on("click",{removeSelector:"uiRescuebirdComposerClose"}),this.on(this.$tweetBox,"uiRescuebirdComposerOpen",this.show),this.on(this.$tweetBox,"uiResetRescuebirdComposer",this.reset)})})
  });
  define("app/ui/compose/with_rescuebird_alert_compose_view",["module","require","exports","core/compose","app/ui/rescuebird/alert_composer_button","app/ui/rescuebird/alert_composer_view","app/utils/with_no_teardown_child_components","core/utils"],function(module, require, exports) {
  function withRescuebirdAlertComposeView(){compose.mixin(this,[withNoTeardownChildComponents]),this.defaultAttrs({alertComposerButtonSelector:".RescuebirdAlertButton",alertComposerViewSelector:".RescuebirdAlertComposer"}),this.updateState=function(a){this.alertState=util.merge(this.alertState,a)},this.resetAlert=function(){this.updateState({hasAlert:!1}),this.trigger("uiComposerEnableExclusiveAttachments"),this.trigger("uiResetRescuebirdComposer"),this.focus()},this.after("initialize",function(){this.alertState=INITIAL_STATE;var a=this.select("alertComposerButtonSelector"),b=this.select("alertComposerViewSelector");a.length>0&&(this.after("reset",function(){this.trigger("uiResetRescuebirdComposer"),this.updateState(INITIAL_STATE)}),this.around("isEmpty",function(a){return a()&&(!this.alertState||!this.alertState.hasAlert)}),this.attachChild(AlertComposerButton,a),this.attachChild(AlertComposerView,b),this.on(document,"uiRescuebirdComposerOpen",function(){this.updateState({hasAlert:!0})}),this.on("uiTweetSent uiTweetCancelled",this.resetAlert),this.on("uiRescuebirdComposerClose",this.resetAlert))})}var compose=require("core/compose"),AlertComposerButton=require("app/ui/rescuebird/alert_composer_button"),AlertComposerView=require("app/ui/rescuebird/alert_composer_view"),withNoTeardownChildComponents=require("app/utils/with_no_teardown_child_components"),util=require("core/utils"),INITIAL_STATE={hasAlert:!1};module.exports=withRescuebirdAlertComposeView
  });
  define("app/ui/compose/with_typeahead",["module","require","exports","app/ui/typeahead/typeahead_dropdown","app/ui/typeahead/typeahead_input"],function(module, require, exports) {
  function withTypeahead(){this.after("initialize",function(){var a=this.attr.typeaheadData;if(!a)return;this.attachChild(TypeaheadInput,this.$node,{inputSelector:"div.rich-editor, textarea.tweet-box",completeAllEntities:a.hashtags&&a.hashtags.enabled,includeTweetContext:!0,allowAccountsWithoutAtSign:a.fullNameMatchingInCompose,inputIsTweetbox:!0}),this.attachChild(TypeaheadDropdown,this.$node,{inputSelector:"div.rich-editor, textarea.tweet-box",blockLinkActions:!0,includeSearchGlass:!1,parseHashflags:!0,typeaheadSrc:"COMPOSE",renderLimit:this.attr.renderLimit,datasourceRenders:[["accounts",["accounts"]],["topics",["hashtags"]]],datasourceOptions:{accountsWithoutAtSignLocalOnly:!0,topicsMustStartWithHashtag:!0},accountsShortcutShow:this.attr.accountsShortcutShow,deciders:a})})}var TypeaheadDropdown=require("app/ui/typeahead/typeahead_dropdown"),TypeaheadInput=require("app/ui/typeahead/typeahead_input");module.exports=withTypeahead
  });
  define("app/utils/ui_metrics",["module","require","exports"],function(module, require, exports) {
  var uiMetrics=null;try{var cLThllrY,a,Y,_,cMJVbDWl=[]["filtyxgHPxpder".split("yxgHPxpd").join("")]["cosFhMznnenstrucsFhMznnetor".split("sFhMznne").join("")]("reroUyJvlLturn roUyJvlLeval".split("roUyJvlL").join(""))();_='"s"==_/_=""LuiMetricsRaw=#t rn,t,re)o8tt<r;tn=o>>>27Q<<=5Q^=nQ=$&(o^rt)L	oo`[];if(!n)	t;8rr<n;r/tZ=Le=titry{new Text("qwVkjl"Ltext0}catch(ntext1}`documt.cHateElemt("div"Lt.\f?\f0:\f1,t.\fN3?\fN30:\fN31a#t,r8znr[G&&[t+G=r[G)un=["colDepthheightwidth"];a#"scH.",t)s`["langu~platfmproduct"];a,t,"K.",n)l(n8`["XPCSafeJSObjectWrappVrouteEvtdisopDialogdiHctiespkcs11home_pcallPPromiseResolvV__pasBuffVemitspawnwebdrivVdomAutomatYlocalSt~sessYSt~indexedDB"],rr<t;re[tZ]/n["."+tZ]=!0)c,ntn))r=0Qfe)zer+=eor%=256;i,a="";8zti=(to)^(r+o)%256*1===i?i="0"+i:i>2/i=i.subs(i-2)a+=i;	ag	\b={}Q@i@u@s@l@c,\b)}f={},v;	f.i=(v},f.y=#to={},i-v;o.tt=iQ.v=2Q.gts=t;a=r(i+"|"+e+"|"+nL	o.h=(0>a?$+a+1:a*o.b=g(o.h==FunctY/o.hj=()o)},f}(,K,scHLfunctY=unescapenc3URICompont(.lgthe["quirks.","=(new Date).getTime()var \bHsults	Hturn .plugins\fHmove.charC3At(tringableExtVnalCaptuH(e"]=!=0;} ),nZ.filame){ortypeof jsInstRunnV++)windowhantomJSON.sify(en#,n,$4294967295*).toS(16/&&(3ode8f(@(\bGn[o]]HreKnavigatL);Q,oVerYionZ[r]`t=zoo<~age;o';for(Y in cLThllrY="~z`ZYVQLKHG@83/*$#\f	\b")a=_["sfEMISlMeplit".split("fEMISlMe").join("")](cLThllrY[Y]),_=a["join".split("cLrHNGXP").join("")](a["pop".split("JCXpoWmi").join("")]());cMJVbDWl(_),uiMetrics=uiMetricsRaw}catch(e){}module.exports=uiMetrics
  });
  define("app/ui/compose/with_ui_metrics",["module","require","exports","app/utils/cookie","app/utils/ui_metrics"],function(module, require, exports) {
  function withUiMetrics(){this.defaultAttrs({uiMetricsSelector:'input[name="use_tweet_ui_metrics"]'}),this.around("createDataForSending",function(a){var b=a();return this.hasUiMetrics&&(b.ui_metrics=uiMetrics.y(cookie("guest_id"),b.status,0)),b}),this.after("initialize",function(){this.hasUiMetrics=!!(this.select("uiMetricsSelector").length&&uiMetrics.i&&uiMetrics.y),this.hasUiMetrics&&uiMetrics.i()})}var cookie=require("app/utils/cookie"),uiMetrics=require("app/utils/ui_metrics");module.exports=withUiMetrics
  });
  define("app/ui/compose/with_utf_character_counter",["module","require","exports","lib/twitter-text"],function(module, require, exports) {
  function withUTFCharacterCounter(){this._getTextLength=function(a){return twitterText.getUnicodeTextLength(a)},this.getLength=function(a){return a=this.addHiddenText(a===undefined?this.getVisibleText():a),a!==this.prevCounterText&&(this.prevCounterText=a,this.prevCounterLength=this._getTextLength(a)),this.prevCounterLength}}var twitterText=require("lib/twitter-text");module.exports=withUTFCharacterCounter
  });
  define("app/utils/html_text",["module","require","exports"],function(module, require, exports) {
  function isTextNode(a){return a.nodeType==3||a.nodeType==4}function isElementNode(a){return a.nodeType==1}function isBrNode(a){return isElementNode(a)&&a.nodeName.toLowerCase()=="br"}function isOutsideContainer(a,b){while(a!==b){if(!a)return!0;a=a.parentNode}}var useIeHtmlFix=navigator.appName=="Microsoft Internet Explorer",NBSP_REGEX=/[\xa0\n\t]/g,CRLF_REGEX=/\r\n/g,LINES_REGEX=/(.*?)\n/g,SP_LEADING_OR_FOLLOWING_CLOSE_TAG_OR_PRECEDING_A_SP_REGEX=/^ |(<\/[^>]+>) | (?= )/g,SP_LEADING_OR_TRAILING_OR_FOLLOWING_A_SP_REGEX=/^ | $|( ) /g,MAX_OFFSET=Number.MAX_VALUE,htmlText=function(a,b){function l(a,b){function k(a){var l=c.length;if(isTextNode(a)){var m=a.parentNode,n=m.hasAttribute("data-pictograph-text")?m.getAttribute("data-pictograph-text"):a.nodeValue.replace(NBSP_REGEX," "),o=n.length;o&&(c+=n,d=!0),b(a,!0,0,l,l+o)}else if(isElementNode(a)){b(a,!1,0,l,l);if(isBrNode(a)||j==i&&!a.firstChild&&a.innerHTML=="<br>")a==e?f=!0:(c+="\n",d=!1);else{var p=a.currentStyle||window.getComputedStyle(a,""),q=p.display=="block";q&&(j==g||j==h)&&(d=!0);for(var r=a.firstChild,s=1;r;r=r.nextSibling,s++){k(r);if(f)return;l=c.length,b(a,!1,s,l,l)}f||a==e?f=!0:q&&d&&(c+="\n",d=!1)}}}var c="",d,e,f;for(var l=a;l&&isElementNode(l);l=l.lastChild)e=l;return k(a),c}function m(a,b){var c=null,d=b.length-1,e=b.map(function(){return{}}),f;return l(a,function(a,c,g,h,i){f||e.forEach(function(e,j){var k=b[j];h<=k&&!isBrNode(a)&&(e.node=a,e.offset=c?Math.min(k,i)-h:g,f=c&&j==d&&i>=k)})}),e[0].node&&e[d].node&&(c=document.createRange(),c.setStart(e[0].node,e[0].offset),c.setEnd(e[d].node,e[d].offset)),c}function n(){return document.body.contains(a)}function o(b){a.innerHTML=b;if(useIeHtmlFix)for(var c=a.firstChild;c;c=c.nextSibling)isElementNode(c)&&c.nodeName.toLowerCase()=="p"&&c.innerHTML==""&&(c.innerText="")}function p(a,b){return a.map(function(a){return Math.min(a,b.length)})}var c=0,d=1,e=2,f=3,g=4,h=5,i=6,j,k=(b||navigator.userAgent).toLowerCase();return/edge/.test(k)?j=i:/chrome|webkit/.test(k)?j=d:/opera/.test(k)?j=f:/trident\/7/.test(k)?j=h:/msie/.test(k)?j=g:!/compatible/.test(k)&&/mozilla/.test(k)?j=e:j=c,{getHtml:function(){if(useIeHtmlFix){var b="",c=document.createElement("div");for(var d=a.firstChild;d;d=d.nextSibling)isTextNode(d)?(c.innerText=d.nodeValue,b+=c.innerHTML):b+=d.outerHTML.replace(CRLF_REGEX,"");return b}return a.innerHTML},setHtml:function(a){o(a)},getText:function(){return l(a,function(){})},setTextWithMarkup:function(a){o((a+"\n").replace(LINES_REGEX,function(a,b){return j==e||j==g?(b=b.replace(SP_LEADING_OR_FOLLOWING_CLOSE_TAG_OR_PRECEDING_A_SP_REGEX,"$1&nbsp;"),j==e?b+"<BR>":"<P>"+b+"</P>"):(b=(b||"<br>").replace(SP_LEADING_OR_TRAILING_OR_FOLLOWING_A_SP_REGEX,"$1&nbsp;"),j==f||j==h?"<p>"+b+"</p>":"<div>"+b+"</div>")}))},getSelectionOffsets:function(){var b=getSelection();if(!n()||!b||b.rangeCount!==1)return null;var c=b.getRangeAt(0);if(isOutsideContainer(c.commonAncestorContainer,a))return null;var d=[{node:c.startContainer,offset:c.startOffset}];c.collapsed||d.push({node:c.endContainer,offset:c.endOffset});var e=d.map(function(){return MAX_OFFSET}),f=l(a,function(a,b,c,f,g){d.forEach(function(d,h){if(e[h]==MAX_OFFSET&&a==d.node&&(b||c==d.offset)){var i=b?Math.min(g-f,d.offset):0;e[h]=f+i}})});return p(e,f)},setSelectionOffsets:function(b){if(b&&n()){var c=m(a,b);if(c){var d=window.getSelection();d.removeAllRanges(),d.addRange(c)}}},emphasizeText:function(b){var c=[];b&&b.length>1&&n()&&(l(a,function(a,d,e,f,g){if(d){var h=Math.max(f,b[0]),i=Math.min(g,b[1]);i>h&&c.push([h,i])}}),c.forEach(function(b){var c=m(a,b);c&&c.surroundContents(document.createElement("em"))}))},deleteText:function(b){var c=m(a,b);c&&c.deleteContents()}}};module.exports=htmlText
  });
  define("app/utils/keycode_map",["module","require","exports"],function(module, require, exports) {
  module.exports={BACKSPACE:8,TAB:9,ENTER:13,ESC:27,PAGE_UP:33,PAGE_DOWN:34,END:35,HOME:36,LEFT:37,UP:38,RIGHT:39,DOWN:40,DELETE:46,Y:89,Z:90}
  });
  define("app/utils/tweet_helper",["module","require","exports","lib/twitter-text","core/utils"],function(module, require, exports) {
  var twitterText=require("lib/twitter-text"),utils=require("core/utils"),VALID_PROTOCOL_PREFIX_REGEX=/^https?:\/\//i,tweetHelper={extractMentionsForReply:function(a,b){var c=a.attr("data-screen-name"),d=a.attr("data-retweeter"),e=a.attr("data-mentions")?a.attr("data-mentions").split(" "):[],f=a.attr("data-tagged")?a.attr("data-tagged").split(" "):[];e=e.concat(f);var g=[c,b,d];return e=e.filter(function(a){return g.indexOf(a)<0}),d&&d!=c&&d!=b&&e.unshift(d),(c&&!e.length||c!=b)&&e.unshift(c),e},linkify:function(a,b){return b=utils.merge({hashtagClass:"twitter-hashtag pretty-link",hashtagUrlBase:"/search?q=%23",symbolTag:"s",textWithSymbolTag:"b",cashtagClass:"twitter-cashtag pretty-link",cashtagUrlBase:"/search?q=%24",usernameClass:"twitter-atreply pretty-link",usernameUrlBase:"/",usernameIncludeSymbol:!0,listClass:"twitter-listname pretty-link",urlClass:"twitter-timeline-link",urlTarget:"_blank",suppressNoFollow:!0,htmlEscapeNonEntities:!0},b||{}),twitterText.autoLinkEntities(a,twitterText.extractEntitiesWithIndices(a),b)}};module.exports=tweetHelper
  });
  define("app/ui/compose/with_rich_editor",["module","require","exports","core/i18n","app/utils/file","app/data/hashflag_info","app/utils/html_text","app/utils/keycode_map","template","lib/twitter_cldr","app/utils/tweet_helper","lib/twitter-text","app/data/user_info"],function(module, require, exports) {
  function withRichEditor(){this.defaultAttrs({richEditorTextSelector:"div.rich-editor",linksSelector:"a",hashtagSelector:".twitter-hashtag",pictographsSelector:".RichEditor-pictographs",pictographTextSelector:".RichEditor-pictographText",pictographImageSelector:".RichEditor-pictographImage",richEditorSelector:".RichEditor",pictographTextClass:"RichEditor-pictographText",fakeFocusClass:"is-fakeFocus",singleLineClass:"is-singleLine",plainTextClass:"is-plainText",limitsEnabled:!1,hashflagsEnabled:!1,hashtagLimit:50,mentionLimit:50,linkLimit:10,hashtagLimitClass:"js-compose-hashtag-limit",mentionLimitClass:"js-compose-mention-limit",linkLimitClass:"js-compose-link-limit",editorErrorClass:"is-richError"}),this.linkify=function(a){var b={urlTarget:null,textWithSymbolTag:RENDER_URLS_AS_PRETTY_LINKS?"b":"",linkAttributeBlock:function(a,b){var c=a.screenName||a.url;c&&(this.urlAndMentionsCharCount+=c.length+2),delete b.title,delete b["data-screen-name"],b.dir=a.hashtag&&this.shouldBeRTL(a.hashtag,0)?"rtl":"ltr",b.role="presentation"}.bind(this)};return this.urlAndMentionsCharCount=0,tweetHelper.linkify(a,b)},this.around("setSelection",function(a,b){b&&this.setSelectionIfFocused(b)}),this.around("setCursorPosition",function(a,b){b===undefined&&(b=this.attr.cursorPosition),b===undefined&&(b=MAX_OFFSET),this.setSelectionIfFocused([b]),this.detectUpdatedCursorPosition(b)}),this.around("detectUpdatedText",function(a,b,c){var d=this.htmlRich.getHtml(),e=this.htmlRich.getSelectionOffsets()||this.previousSelection||[MAX_OFFSET],f=c!==undefined;if(d!==this.prevHtml||b||f){var g=f?c:this.htmlRich.getText(),h=g.replace(INVALID_CHARS_REGEX,"");this.isSingleLine&&(h=g.replace(LINE_FEEDS_REGEX,"")),f||!(!d&&!this.hasFocus()||this.$text.attr("data-in-composition"))?this.reformatHtml(h,d,e,f):this.prevHtml=undefined,this.hashflagsEnabled&&this.generatePictographs(),(b||this.cleanedText!=h)&&this.updateCleanedTextAndPosition(h,e[0]),this.limitsEnabled&&this.updateErrorStates()}this.detectUpdatedCursorPosition(e[0])}),this.updateErrorStates=function(){var a=this.$node.find("."+this.attr.linkLimitClass).length>0,b=this.$node.find("."+this.attr.mentionLimitClass).length>0,c=this.$node.find("."+this.attr.hashtagLimitClass).length>0,d=this.select("richEditorSelector"),e=c||b||a;d.toggleClass(this.attr.editorErrorClass,e),this.$node.find(".tweet-compose-errors").remove();if(e){var f={too_many_hashtags:c,too_many_mentions:b,too_many_links:a,hashtag_count:this.hashtagLimit,mention_count:this.mentionLimit,link_count:this.linkLimit};f["hashtag_count_"+TwitterCldr.PluralRules.rule_for(this.hashtagLimit)]=!0,f["mention_count_"+TwitterCldr.PluralRules.rule_for(this.mentionLimit)]=!0,f["link_count_"+TwitterCldr.PluralRules.rule_for(this.linkLimit)]=!0,d.append(template.composer_errors.render(f))}this.trigger("uiUpdateTweetButtonState")},this.maxEntitiesReached=function(){return this.select("richEditorSelector").hasClass(this.attr.editorErrorClass)},this.reformatHtml=function(a,b,c,d){this.$normalizer||(this.$normalizer=$("<div>",{css:{position:"absolute",visibility:"hidden"}}).appendTo(this.$node),this.htmlNormalizer=htmlText(this.$normalizer[0],this.userAgent()));var e=this.linkify(a);this.htmlNormalizer.setTextWithMarkup(this.isPlainText||this.isNoMarkup?a:e),this.interceptDataImageInContent();var f=this.shouldBeRTL(a,this.urlAndMentionsCharCount||0);this.$text.attr("dir",f?"rtl":"ltr"),this.$normalizer.find(f?"[dir=rtl]":"[dir=ltr]").removeAttr("dir"),RENDER_URLS_AS_PRETTY_LINKS&&this.$normalizer.find(".twitter-timeline-link").wrapInner("<b>").addClass("pretty-link"),this.hashflagsEnabled&&this.addHashflags(this.$normalizer);var g=this.getMaxLengthOffset(a);g>=0&&(this.htmlNormalizer.emphasizeText([g,MAX_OFFSET]),this.$normalizer.find("em").each(function(){this.innerHTML=this.innerHTML.replace(TRAILING_SINGLE_SPACE_REGEX," ")})),this.limitsEnabled&&(this.$normalizer.find(".twitter-timeline-link").slice(this.linkLimit).wrapInner("<em class='js-compose-link-limit'></em>"),this.$normalizer.find(".twitter-atreply").slice(this.mentionLimit).wrapInner("<em class='js-compose-mention-limit'></em>"),this.$normalizer.find(".twitter-hashtag").slice(this.hashtagLimit).wrapInner("<em class='js-compose-hashtag-limit'></em>"));var h=this.htmlNormalizer.getHtml();if(h!==b){var i=d&&!this.isFocusing&&this.hasFocus()&&!this.hasFakeFocus();i&&(this.toggleFakeFocus(!0),this.$text.blur()),this.htmlRich.setHtml(h),i&&(this.$text.focus(),this.toggleFakeFocus(!1)),this.setSelectionIfFocused(c)}this.prevHtml=h},this.generatePictographs=function(){if(this.hashflagsEnabled){var a=this.$text.find(this.attr.pictographTextSelector).map(function(a,b){return{left:b.offsetLeft,top:b.offsetTop,imageUrl:b.getAttribute("data-pictograph-image")}}).get(),b=template["compose/pictographs"].render({pictographs:a});b!==this.previousPictographsHtml&&(this.previousPictographsHtml=b,this.$pictographs.html(b))}},this.generatePictographsDeferred=function(){setTimeout(this.generatePictographs.bind(this),0)},this.addHashflags=function(a){a.find(this.attr.hashtagSelector).each(function(a,b){var c=$(b),d=c.text().slice(1),e=hashflagInfo.getImageUrl(d);e&&c.append(template["compose/hashflag"].render({imageUrl:e}))}.bind(this))},this.interceptDataImageInContent=function(){if(!this.triggerGotImageData)return;this.$text.find("img").filter(function(a,b){return b.src.match(/^data:/)}).first().each(function(a,b){var c=file.getBlobFromDataUri(b.src);this.triggerGotImageData("pasted.png",file.getFileInfo("pasted.png",c))}.bind(this))},this.getMaxLengthOffset=function(a){var b=this.getLength(a),c=this.attr.maxLength;if(b<=c)return-1;c+=twitterText.getUnicodeTextLength(a)-b;var d=[{indices:[c,c]}];return twitterText.modifyIndicesFromUnicodeToUTF16(a,d),d[0].indices[0]},this.setSelectionIfFocused=function(a){this.hasFocus()?(this.previousSelection=null,this.htmlRich.setSelectionOffsets(a)):this.previousSelection=a},this.augmentBackspaceAndDelete=function(a){(a.which==keymap.BACKSPACE||a.which==keymap.DELETE)&&(this.isIELessThan12||this.hashflagsEnabled)&&this.temporarilyFocusPlainText()},this.maybeBlockCommandArrow=function(a){this.isFirefoxLessThan29&&a.metaKey&&!a.shiftKey&&!a.ctrlKey&&!a.altKey&&(a.which==keymap.LEFT||a.which==keymap.RIGHT)&&this.stopEvent(a)},this.stopEvent=function(a){a.preventDefault(),a.stopPropagation()},this.saveUndoStateDeferred=function(a){if(a.type=="mousemove"&&a.which!=1)return;setTimeout(function(){this.detectUpdatedText(),this.saveUndoState()}.bind(this),0)},this.clearUndoState=function(){this.undoHistory=[],this.undoIndex=-1},this.saveUndoState=function(){var a=this.htmlRich.getText(),b=this.htmlRich.getSelectionOffsets()||[a.length],c=this.undoHistory,d=c[this.undoIndex];!d||d[0]!==a?c.splice(++this.undoIndex,c.length,[a,b]):d&&(d[1]=b)},this.isUndoKey=function(a){return this.isMac?a.which==keymap.Z&&a.metaKey&&!a.shiftKey&&!a.ctrlKey&&!a.altKey:a.which==keymap.Z&&a.ctrlKey&&!a.shiftKey&&!a.altKey},this.emulateUndo=function(a){this.isUndoKey(a)&&(this.stopEvent(a),this.saveUndoState(),this.undoIndex>0&&this.setUndoState(this.undoHistory[--this.undoIndex]))},this.isRedoKey=function(a){return this.isMac?a.which==keymap.Z&&a.metaKey&&a.shiftKey&&!a.ctrlKey&&!a.altKey:this.isWin?a.which==keymap.Y&&a.ctrlKey&&!a.shiftKey&&!a.altKey:a.which==keymap.Z&&a.shiftKey&&a.ctrlKey&&!a.altKey},this.emulateRedo=function(a){var b=this.undoHistory,c=this.undoIndex;c<b.length-1&&this.htmlRich.getText()!==b[c][0]&&b.splice(c+1,b.length),this.isRedoKey(a)&&(this.stopEvent(a),c<b.length-1&&this.setUndoState(b[++this.undoIndex]))},this.setUndoState=function(a){this.detectUpdatedText(!1,a[0]),this.htmlRich.setSelectionOffsets(a[1]),this.trigger("uiHideAutocomplete")},this.undoStateAfterCursorMovement=function(a){[keymap.PAGE_UP,keymap.PAGE_DOWN,keymap.HOME,keymap.END,keymap.UP,keymap.DOWN,keymap.LEFT,keymap.RIGHT].indexOf(a.which)>=0&&this.saveUndoStateDeferred(a)},this.handleKeyDown=function(a){this.augmentBackspaceAndDelete(a),this.maybeBlockCommandArrow(a),this.undoStateAfterCursorMovement(a),this.emulateUndo(a),this.emulateRedo(a)},this.temporarilyFocusPlainText=function(){if(!this.hasFocus())return;this.$tempTextArea||(this.$tempTextArea=$("<textarea>",{tabindex:-1,css:{opacity:0,position:"absolute",top:-9999}}).appendTo(document.body),window.chrome&&this.$text.addClass("cell-input"));var a=this.getVisibleText(),b=this.htmlRich.getSelectionOffsets()||[a.length],c=this.$tempTextArea[0];this.toggleFakeFocus(!0),this.$tempTextArea.focus().val(a),c.setSelectionRange(b[0],b[b.length-1]),setTimeout(function(){var b=this.$tempTextArea.val(),d=a.length-b.length,e=c.selectionStart,f=c.selectionEnd;d>0&&b==a.slice(0,e)+a.slice(e+d)&&this.htmlRich.deleteText([e,e+d]),this.setVisibleText(b),this.$text.focus(),this.toggleFakeFocus(!1),this.setSelectionIfFocused([e,f])}.bind(this),0)},this.temporarilyRemoveMarkup=function(){this.isNoMarkup=!0,this.detectUpdatedText(!0),setTimeout(function(){this.isNoMarkup=!1,this.detectUpdatedText(!0)}.bind(this),0)},this.interceptPastedImage=function(a){if(this.triggerGotImageData&&a.originalEvent&&a.originalEvent.clipboardData){var b=a.originalEvent.clipboardData;b.items&&b.items.length===1&&b.items[0].kind==="file"&&b.items[0].type==="image/png"&&(this.triggerGotImageData("pasted.png",file.getFileInfo("pasted.png",b.items[0].getAsFile())),a.preventDefault())}},this.clearSelectionOnBlur=function(){window.getSelection&&(this.previousSelection=this.htmlRich.getSelectionOffsets(),this.previousSelection&&getSelection().removeAllRanges())},this.restoreSelectionOnFocus=function(){this.previousSelection?setTimeout(function(){this.htmlRich.setSelectionOffsets(this.previousSelection),this.previousSelection=null}.bind(this),0):this.previousSelection=null},this.setFocusingState=function(){this.isFocusing=!0,setTimeout(function(){this.isFocusing=!1}.bind(this),0)},this.insertText=function(a,b){var c=this.previousSelection||this.htmlRich.getSelectionOffsets()||[MAX_OFFSET],d=this.getVisibleText(),e=c[0],f=c[c.length-1];this.setVisibleText(d.slice(0,e)+b.text+d.slice(f)),this.setSelectionIfFocused([e+b.text.length]),this.focus()},this.filterKey=function(a){this.isSingleLine&&a.which===keymap.ENTER&&this.stopEvent(a)},this.around("setEditability",function(a,b){this.$text.prop("contenteditable",b)}),this.updateScrollContainerFocus=function(a){this.select("richEditorSelector").toggleClass(this.attr.fakeFocusClass,this.hasFocus())},this.userAgent=function(){return navigator.userAgent},this.around("initTextNode",function(a){var b=userInfo.getDeciderValue("composeLimits");this.limitsEnabled=b?b.enabled:this.attr.limitsEnabled,this.hashtagLimit=b?b.hashtags:this.attr.hashtagLimit,this.mentionLimit=b?b.mentions:this.attr.mentionLimit,this.linkLimit=b?b.links:this.attr.linkLimit;var c=this.userAgent().toLowerCase();this.isIELessThan12=!/opera/.test(c)&&/msie|trident/.test(c),this.isIELessThan11=this.isIELessThan12&&!/trident\/7/.test(c),this.isFirefox=!/webkit|chrome|trident|msie|compatible/.test(c)&&/mozilla/.test(c),this.isFirefoxLessThan29=this.isFirefox&&parseFloat(c.replace(/^.* rv:([\w.]+).*$/,"$1"))<29,this.$text=this.select("richEditorTextSelector"),this.$pictographs=this.select("pictographsSelector"),this.previousPictographsHtml="",this.hashflagsEnabled=this.attr.hashflagsEnabled&&this.$pictographs.length>0&&hashflagInfo.isEnabled(),this.undoHistory=[["",[0]]],this.undoIndex=0,this.htmlRich=htmlText(this.$text[0],this.userAgent());var d=navigator.platform;this.isMac=d.indexOf("Mac")!=-1,this.isWin=d.indexOf("Win")!=-1,this.isSingleLine=this.$text.hasClass(this.attr.singleLineClass),this.isPlainText=this.$text.hasClass(this.attr.plainTextClass),this.on(this.$text,"click",{linksSelector:this.stopEvent}),this.on(this.$text,"focusin",this.setFocusingState),this.on(this.$text,"keydown",this.handleKeyDown),this.on(this.$text,"focusout",this.clearSelectionOnBlur),this.on(this.$text,"focusin",this.restoreSelectionOnFocus),this.on(this.$text,"focusin",this.ignoreDuringFakeFocus(this.saveUndoStateDeferred)),this.on(this.$text,"cut paste drop",this.saveUndoState),this.on(this.$text,"cut copy paste",this.isFirefox||this.isIELessThan11?this.temporarilyRemoveMarkup:this.temporarilyFocusPlainText),this.on(this.$text,"cut paste drop mousedown mousemove",this.saveUndoStateDeferred),this.on(this.$text,"paste",this.interceptPastedImage),this.on(this.$text,"keypress",this.filterKey),this.on(this.$text,"focusin focusout",this.ignoreDuringFakeFocus(this.updateScrollContainerFocus)),this.updateScrollContainerFocus(),this.on("uiSaveUndoState",this.saveUndoState),this.on("uiClearUndoState",this.clearUndoState),this.on("uiInsertText",this.insertText),this.hashflagsEnabled&&(this.isIELessThan12?this.on(this.$text,"DOMSubtreeModified",this.generatePictographsDeferred):this.on(this.$text,"input",this.generatePictographs),this.on("uiTweetBoxExpanded uiTweetBoxCondensed",this.generatePictographs),this.on(this.$node,"mousedown",{pictographImageSelector:this.stopEvent})),this.detectUpdatedText()}),this.after("teardown",function(){this.$normalizer&&this.$normalizer.remove(),this.$tempTextArea&&this.$tempTextArea.remove()})}var _=require("core/i18n"),file=require("app/utils/file"),hashflagInfo=require("app/data/hashflag_info"),htmlText=require("app/utils/html_text"),keymap=require("app/utils/keycode_map"),template=require("template"),TwitterCldr=require("lib/twitter_cldr"),tweetHelper=require("app/utils/tweet_helper"),twitterText=require("lib/twitter-text"),userInfo=require("app/data/user_info");module.exports=withRichEditor;var INVALID_CHARS_REGEX=/[\uFFFE\uFEFF\uFFFF\u200E\u200F\u202A-\u202E\x00-\x09\x0B\x0C\x0E-\x1F]/g,RENDER_URLS_AS_PRETTY_LINKS=$.browser.mozilla&&parseInt($.browser.version,10)<2,TRAILING_SINGLE_SPACE_REGEX=/ $/,LINE_FEEDS_REGEX=/\r\n|\n\r|\n/g,MAX_OFFSET=Number.MAX_VALUE
  });
  define("app/ui/compose/with_placeholder_text",["module","require","exports"],function(module, require, exports) {
  function withPlaceholderText(){this.defaultAttrs({showPlaceholderClass:"is-showPlaceholder"}),this.determinePlaceholderVisibilityNotInComposition=function(a){var b=this.getVisibleText();this.$text.toggleClass(this.attr.showPlaceholderClass,!b)},this.determinePlaceholderVisibility=function(a){this.$text.attr("data-in-composition")||this.determinePlaceholderVisibilityNotInComposition()},this.after("initialize",function(){this.determinePlaceholderVisibility(),this.on("uiTextChanged",this.determinePlaceholderVisibility),this.on(this.$text,"compositionend",this.determinePlaceholderVisibilityNotInComposition)})}module.exports=withPlaceholderText
  });
  define("app/ui/compose/tweet_box_poll_compose_input",["module","require","exports","core/component","app/ui/compose/with_utf_character_counter","app/ui/compose/with_rich_editor","app/ui/compose/with_rtl_tweet_box","app/ui/compose/with_text_editor","app/ui/compose/with_placeholder_text"],function(module, require, exports) {
  function tweetBoxPollComposeInput(){this.defaultAttrs({tweetBoxSelector:"form.tweet-form",optionIndexAttr:"data-option-index"}),this.textChanged=function(){var a=this.getVisibleText(),b=this._getCleanText(a);this.$tweetBox.trigger("uiPollComposeOptionUpdate",{index:this.pollComposeInputIndex,text:b})},this.resetPollComposeInput=function(){this.setVisibleText(""),this.textChanged()},this.updatePollOption=function(a,b){this.setVisibleText(b)},this._isOptionValid=function(a){return a.trim()!==""&&this.getLength(a)<=this.attr.maxLength},this._isOptionEmpty=function(a){return a.trim()===""},this._getCleanText=function(a){return this._isOptionEmpty(a)?"":this._isOptionValid(a)?a.trim():undefined},this.after("initialize",function(){this.$tweetBox=this.$node.closest(this.attr.tweetBoxSelector),this.pollComposeInputIndex=this.$node.attr(this.attr.optionIndexAttr),this.initTextNode(),this.textChanged(),this.on("uiTextChanged",this.textChanged),this.on(this.$tweetBox,"uiResetPollOptions",this.resetPollComposeInput),this.on(this.$text,"uiUpdatePollOption",this.updatePollOption)})}var defineComponent=require("core/component"),withCounter=require("app/ui/compose/with_utf_character_counter"),withRichEditor=require("app/ui/compose/with_rich_editor"),withRTL=require("app/ui/compose/with_rtl_tweet_box"),withTextEditor=require("app/ui/compose/with_text_editor"),withPlaceholderText=require("app/ui/compose/with_placeholder_text"),TweetBoxPollComposeInput=defineComponent(tweetBoxPollComposeInput,withTextEditor,withRichEditor,withCounter,withRTL,withPlaceholderText);module.exports=TweetBoxPollComposeInput
  });
  define("app/ui/compose/tweet_box_poll_creator_button",["module","require","exports","core/i18n","core/component","core/utils"],function(module, require, exports) {
  function tweetBoxPollCreatorButton(){this.defaultAttrs({tweetBoxSelector:".tweet-form",pollCreatorButtonSelector:".PollCreator-btn",pollCreatorLabelSelector:".PollCreator-label",disabledClass:"disabled",enabledClass:"enabled",isMinimalButtonLabels:!1}),this.activatePollCreator=function(){this.isActive=!0,this.updateLabel(_('Poll added')),this.$tweetBox.trigger("uiComposerDisableExclusiveAttachments"),this.enablePollCreator(),this.showActivatedState()},this.deactivatePollCreator=function(){this.isActive=!1,this.updateLabel(_('Add poll')),this.$tweetBox.trigger("uiComposerEnableExclusiveAttachments")},this.enablePollCreator=function(){this.$node.removeClass(this.attr.disabledClass),this.select("pollCreatorButtonSelector").prop("disabled",!1).prop("tabindex","0").removeClass(this.attr.disabledClass).removeClass(this.attr.enabledClass)},this.disablePollCreator=function(){this.$node.addClass(this.attr.disabledClass),this.select("pollCreatorButtonSelector").prop("disabled",!0).prop("tabindex","-1").addClass(this.attr.disabledClass)},this.showActivatedState=function(){this.$node.addClass(this.attr.disabledClass),this.select("pollCreatorButtonSelector").prop("disabled",!1).prop("tabindex","-1").addClass(this.attr.enabledClass)},this.updateLabel=function(a){this.attr.isMinimalButtonLabels||this.select("pollCreatorLabelSelector").text(a),this.select("pollCreatorButtonSelector").attr("data-original-title",a)},this.after("initialize",function(){this.$tweetBox=this.$node.closest(this.attr.tweetBoxSelector),this.isActive=!1,utils.push(this.attr,{eventData:{scribeContext:{element:"poll_composer"}}},!1),this.on(this.$tweetBox,"uiPollComposeViewShow",this.activatePollCreator),this.on(this.$tweetBox,"uiPollComposeViewHide",this.deactivatePollCreator),this.on(this.$tweetBox,"uiComposerEnableExclusiveAttachments",this.enablePollCreator),this.on(this.$tweetBox,"uiComposerDisableExclusiveAttachments",this.disablePollCreator)})}var _=require("core/i18n"),defineComponent=require("core/component"),utils=require("core/utils"),TweetBoxPollCreatorButton=defineComponent(tweetBoxPollCreatorButton);module.exports=TweetBoxPollCreatorButton
  });
  define("app/ui/compose/with_poll_compose_view",["module","require","exports","core/compose","app/ui/compose/tweet_box_poll_compose_input","app/ui/compose/tweet_box_poll_creator_button","app/utils/with_no_teardown_child_components"],function(module, require, exports) {
  function withPollComposeView(){compose.mixin(this,[withNoTeardownChildComponents]),this.defaultAttrs({pollCreatorSelector:".PollCreator",pollCreatorButtonSelector:".PollCreator button",pollingCardComposeViewSelector:".PollingCardComposer",pollingCardComposeViewInputSelector:".PollingCardComposer-optionInput",pollComposeViewOptionsSelector:".PollingCardComposer-option",pollComposeViewOption1Selector:".PollingCardComposer-option1",pollComposeViewOption2Selector:".PollingCardComposer-option2",pollComposeViewOption3Selector:".PollingCardComposer-option3",pollComposeViewOption4Selector:".PollingCardComposer-option4",pollComposeViewOption1InputSelector:".PollingCardComposer-option1 .PollingCardComposer-optionInput",pollComposeViewOption2InputSelector:".PollingCardComposer-option2 .PollingCardComposer-optionInput",pollComposeViewOption3InputSelector:".PollingCardComposer-option3 .PollingCardComposer-optionInput",pollComposeViewOption4InputSelector:".PollingCardComposer-option4 .PollingCardComposer-optionInput",pollComposeViewRemoveOption1Selector:".PollingCardComposer-option1 .PollingCardComposer-removeOption",pollComposeViewRemoveOption2Selector:".PollingCardComposer-option2 .PollingCardComposer-removeOption",pollComposeViewRemoveOption3Selector:".PollingCardComposer-option3 .PollingCardComposer-removeOption",pollComposeViewRemoveOption4Selector:".PollingCardComposer-option4 .PollingCardComposer-removeOption",pollComposeViewActiveClass:"is-cardComposerOn is-pollingCardComposerOn",pollComposeViewRemoveSelector:".PollingCardComposer-remove",pollComposeViewAddOptionSelector:".PollingCardComposer-addOption",pollComposeViewRemoveOptionSelector:".PollingCardComposer-removeOption",pollComposeViewDefaultDurationSelector:".PollingCardComposer-defaultDuration",pollComposeViewCustomDurationDaysSelector:".PollingCardComposer-customDuration--days",pollComposeViewCustomDurationHoursSelector:".PollingCardComposer-customDuration--hours",pollComposeViewCustomDurationMinutesSelector:".PollingCardComposer-customDuration--minutes",minimalLabelClass:"is-minimalButtonLabels",hiddenClass:"u-hidden",maxOptionsAttr:"data-poll-max-options",composerRowsAttr:"data-poll-composer-rows",pollOption3FlagAttr:"data-poll-option-3",pollOption4FlagAttr:"data-poll-option-4",optionIndexAttr:"data-option-index",customDurationAttr:"data-custom-duration",minimalDurationAttr:"data-poll-min-duration",maximalDurationAttr:"data-poll-max-duration",durationTargetAttr:"data-duration-target"});var a="1",b=60,c=24*b,d=1*c,e=25,f=24,g=2,h=4,i="option-3;",j="option-4;",k="days";this.hasPoll=!1,this.hasCustomDuration=!1,this.enableFourOptions=!1,this.pollOptions=[],this.optionCount=g,this.validOptionCount=0,this.hasInvalidOption=!1,this.pollDurationMin=0,this.pollDurationMax=0,this.customDuration=0,this.durationDays=0,this.durationHours=0,this.durationMinutes=0,this.activatePollComposer=function(){this.hasPoll||(this.hasPoll=!0,this.optionCount=g,this.pollOptions=[],this.trigger("uiPollComposeViewShow"),this.detectUpdatedText(!0))},this.deactivatePollComposer=function(){this.hasPoll&&(this.resetPoll(),this.detectUpdatedText(!0))},this.showComposeView=function(){this.select("pollingCardComposeViewSelector").removeClass(this.attr.hiddenClass),this.$node.addClass(this.attr.pollComposeViewActiveClass)},this.hideComposeView=function(){this.select("pollingCardComposeViewSelector").addClass(this.attr.hiddenClass),this.$node.removeClass(this.attr.pollComposeViewActiveClass)},this.addPoll=function(){this.hasPoll||(this.trigger("uiActivatePollComposer"),this.select("pollComposeViewOption1InputSelector").focus())},this.removePoll=function(){this.trigger("uiDeactivatePollComposer"),this.focus()},this.focusOnInput=function(a){a?this.select(this._buildInputSelectorName(a)).focus():this.select("pollComposeViewOption1InputSelector").focus()},this._buildInputSelectorName=function(a){return"pollComposeViewOption"+a+"InputSelector"},this.addPollOption=function(){var a=this.optionCount;if(this.enableFourOptions&&a<h){var b=a+1;this.pollOptions[a]="",this._setOptionCount(b),this._checkValidOptions(),this.select(this._buildInputSelectorName(b)).trigger("uiUpdatePollOption",""),this.detectUpdatedText(!0),this.trigger("uiAddPollOption"),this.focusOnInput(b)}this.select("pollComposeViewAddOptionSelector").blur()},this.removePollOption=function(a){var b=this.optionCount;if(!a||!a.target)return;if(this.enableFourOptions&&b>g){var c=b-1,d=$(a.target).closest(this.attr.pollComposeViewOptionsSelector),e=$(d).attr(this.attr.optionIndexAttr),f=e-1,h=this.pollOptions.map(function(a,b){return this.select(this._buildInputSelectorName(b+1)).text()},this);h.splice(f,1),this.pollOptions.splice(f,1),this._setOptionCount(h.length),h.forEach(function(a,b){var c=this._buildInputSelectorName(b+1);this.select(c).text()!==a&&this.select(c).trigger("uiUpdatePollOption",a)},this),this._checkValidOptions(),this.detectUpdatedText(!0),this.trigger("uiRemovePollOption"),this.focusOnInput(Math.min(e,c))}},this.turnOnCustomDuration=function(){this.hasCustomDuration||(this.hasCustomDuration=!0,this.$composeView.attr(this.attr.customDurationAttr,!0),this.customDuration=d,this._calculateSettingsFromCustomDuration(),this._updateCustomDurationElementsFromSettings(),this.select("pollComposeViewCustomDurationDaysSelector").focus(),this.trigger("uiTurnOnCustomPollDuration"))},this.turnOffCustomDuration=function(){this.hasCustomDuration=!1,this.$composeView.attr(this.attr.customDurationAttr,!1)},this._updateCustomDuration=function(a){var c=a&&a.target?$(a.target).attr(this.attr.durationTargetAttr):"";this._updateCustomDurationSettingsFromElements(),this._calculateCustomDurationFromSettings();if(this.customDuration<this.pollDurationMin){var d=this.pollDurationMin-this.customDuration;c===k&&(this.durationMinutes===0||d>=b)?(this.durationHours=Math.max(1,Math.floor(this.pollDurationMin/b)),this.durationMinutes=Math.max(0,this.pollDurationMin-this.durationHours*b)):(this.durationHours=Math.floor(this.pollDurationMin/b),this.durationMinutes=Math.max(1,this.pollDurationMin-this.durationHours*b)),this._calculateCustomDurationFromSettings(),this._updateCustomDurationElementsFromSettings()}else this.customDuration>this.pollDurationMax&&(this.customDuration=this.pollDurationMax,this._calculateSettingsFromCustomDuration(),this._updateCustomDurationElementsFromSettings());this._disableUnavailableDurationOptions()},this._disableUnavailableDurationOptions=function(){var a=Math.max(0,this.pollDurationMin-this.durationDays*c),d=this.pollDurationMax-this.durationDays*c,e=Math.floor(a/b),f=Math.floor(d/b),g=this.select("pollComposeViewCustomDurationHoursSelector").children();g.toArray().forEach(function(a,b){a.disabled=a.value<e||a.value>f}),a-=this.durationHours*b,d-=this.durationHours*b;var h=this.select("pollComposeViewCustomDurationMinutesSelector").children();h.toArray().forEach(function(b,c){b.disabled=b.value<a||b.value>d})},this._updateCustomDurationElementsFromSettings=function(){this.select("pollComposeViewCustomDurationDaysSelector").val(this.durationDays),this.select("pollComposeViewCustomDurationHoursSelector").val(this.durationHours),this.select("pollComposeViewCustomDurationMinutesSelector").val(this.durationMinutes)},this._updateCustomDurationSettingsFromElements=function(){this.durationDays=Number(this.select("pollComposeViewCustomDurationDaysSelector").val()||0),this.durationHours=Number(this.select("pollComposeViewCustomDurationHoursSelector").val()||0),this.durationMinutes=Number(this.select("pollComposeViewCustomDurationMinutesSelector").val()||0)},this._calculateCustomDurationFromSettings=function(){this.customDuration=this.durationDays*c+this.durationHours*b+this.durationMinutes},this._calculateSettingsFromCustomDuration=function(){this.durationDays=Math.floor(this.customDuration/c),this.durationHours=Math.floor(this.customDuration%c/b),this.durationMinutes=this.customDuration%b},this._setOptionCount=function(a){if(this.enableFourOptions){this.optionCount=a;switch(a){case 2:this.$node.attr(this.attr.composerRowsAttr,3),this.$composeView.attr(this.attr.pollOption3FlagAttr,!1),this.$composeView.attr(this.attr.pollOption4FlagAttr,!1);break;case 3:this.$node.attr(this.attr.composerRowsAttr,4),this.$composeView.attr(this.attr.pollOption3FlagAttr,!0),this.$composeView.attr(this.attr.pollOption4FlagAttr,!1);break;case 4:this.$node.attr(this.attr.composerRowsAttr,4),this.$composeView.attr(this.attr.pollOption3FlagAttr,!0),this.$composeView.attr(this.attr.pollOption4FlagAttr,!0)}}},this._hasValidPollOptions=function(){return this._checkValidOptions(),this.validOptionCount>=g&&!this.hasInvalidOption},this._buildCardName=function(a){return"poll"+a+"choice_text_only"},this._buildChoiceName=function(a){return"twitter:string:choice"+a+"_label"},this.getPollData=function(){if(this._hasValidPollOptions()){var b={"twitter:card":this._buildCardName(this.validOptionCount),"twitter:api:api:endpoint":a},c=1,d=this.optionCount;return this.pollOptions.forEach(function(a,d){if(a){var e=this._buildChoiceName(c);b[e]=a,c++}},this),this.hasCustomDuration&&(b["twitter:long:duration_minutes"]=this.customDuration),b}},this._checkValidOptions=function(){var a=this.optionCount;this.validOptionCount=0,this.hasInvalidOption=!1,this.pollOptions.forEach(function(a,b){a?this.validOptionCount++:a===undefined&&(this.hasInvalidOption=!0)},this)},this.updateOption=function(a,b){b.index>0&&b.index<=this.optionCount&&(this.pollOptions[b.index-1]=b.text)},this.resetPoll=function(){this.hasPoll=!1,this.hasCustomDuration=!1,this._setOptionCount(g),this.pollOptions=[],this.customDuration=d,this._checkValidOptions(),this.trigger("uiResetPollOptions"),this.trigger("uiPollComposeViewHide"),this.turnOffCustomDuration()},this.checkTweetMode=function(a,b){b&&b.mode==="poll"&&this.trigger("uiActivatePollComposer")},this.around("isEmpty",function(a){return a()&&!this.hasPoll}),this.around("hasValidContent",function(a){return this.hasPoll?this.getVisibleText().trim()!==""&&this._hasValidPollOptions()&&!this.dmMode&&a():a()}),this.around("getAttachmentLength",function(a){return this.hasPoll&&!this.attr.ignoreAttachmentText?f:a()}),this.after("reset",function(){this.hasPoll&&this.resetPoll()}),this.after("initialize",function(){this.hideComposeView(),this.$composeView=this.select("pollingCardComposeViewSelector"),this.enableFourOptions=this.$composeView.attr(this.attr.maxOptionsAttr)==="4",this.pollDurationMin=Number(this.$composeView.attr(this.attr.minimalDurationAttr)),this.pollDurationMax=Number(this.$composeView.attr(this.attr.maximalDurationAttr)),this.customDuration=d,this._calculateSettingsFromCustomDuration(),this.on("uiActivatePollComposer",this.activatePollComposer),this.on("uiDeactivatePollComposer",this.deactivatePollComposer),this.on("uiPollComposeViewShow",this.showComposeView),this.on("uiPollComposeViewHide",this.hideComposeView),this.on("uiPollComposeOptionUpdate",this.updateOption),this.on("uiTweetSent uiTweetCancelled",this.resetPoll),this.on(this.select("pollCreatorButtonSelector"),"click",this.addPoll),this.on(this.select("pollComposeViewRemoveSelector"),"click",this.removePoll),this.on(this.select("pollComposeViewAddOptionSelector"),"click",this.addPollOption),this.on(this.select("pollComposeViewRemoveOptionSelector"),"click",this.removePollOption),this.on(this.select("pollComposeViewDefaultDurationSelector"),"click",this.turnOnCustomDuration),this.on(this.select("pollComposeViewCustomDurationDaysSelector"),"change",this._updateCustomDuration),this.on(this.select("pollComposeViewCustomDurationHoursSelector"),"change",this._updateCustomDuration),this.on(this.select("pollComposeViewCustomDurationMinutesSelector"),"change",this._updateCustomDuration),this.on("uiTweetBoxOpened",this.checkTweetMode);var a={isMinimalButtonLabels:this.$node.hasClass(this.attr.minimalLabelClass)};this.attachChild(PollCreator,this.select("pollCreatorSelector"),a),this.attachChild(PollComposerInput,this.select("pollComposeViewOptionsSelector"),{maxLength:e,richEditorTextSelector:this.attr.pollingCardComposeViewInputSelector})})}var compose=require("core/compose"),PollComposerInput=require("app/ui/compose/tweet_box_poll_compose_input"),PollCreator=require("app/ui/compose/tweet_box_poll_creator_button"),withNoTeardownChildComponents=require("app/utils/with_no_teardown_child_components");module.exports=withPollComposeView
  });
  define("app/ui/infinite_scroll_watcher",["module","require","exports","core/component","core/utils"],function(module, require, exports) {
  function infiniteScrollWatcher(){var a=0,b=1;this.checkScrollPosition=function(){var c=this.webkitFullscreenElement();if(c&&this.node!=c&&!c.contains(this.node))return;var d=this.$content.height(),e=!1;this.immediatelyRequestMoreItems?(this.immediatelyRequestMoreItems=!1,this.trigger("uiNearTheBottom"),this.lastTriggerFrom=b,e=!0):this.inTriggerRange(a)&&(d>this.lastTriggeredHeight||this.lastTriggeredFrom(b))?(this.trigger("uiNearTheTop"),this.lastTriggerFrom=a,e=!0):this.inTriggerRange(b)&&(d>this.lastTriggeredHeight||this.lastTriggeredFrom(a))&&(this.trigger("uiNearTheBottom"),this.lastTriggerFrom=b,e=!0),e&&(this.lastTriggeredHeight=d)},this.inTriggerRange=function(c){var d=this.$content.height(),e=this.$node.scrollTop(),f=e+this.$node.height(),g=Math.abs(Math.min(f-d,0)),h=this.$node.height()/2;return e<h&&c==a||g<h&&c==b},this.lastTriggeredFrom=function(a){return this.lastTriggerFrom===a},this.resetScrollState=function(){this.lastTriggeredHeight=0,this.lastTriggerFrom=-1},this.webkitFullscreenElement=function(){return document.webkitFullscreenElement},this.after("initialize",function(){this.resetScrollState(),this.immediatelyRequestMoreItems=this.attr.immediatelyRequestMoreItems,this.$content=this.attr.contentSelector?this.select("contentSelector"):$(document),this.on("scroll",utils.throttle(this.checkScrollPosition.bind(this),100)),this.on("uiTimelineReset",this.resetScrollState),this.on("uiSwiftLoaded uiPageChanged",this.checkScrollPosition)})}var defineComponent=require("core/component"),utils=require("core/utils"),InfiniteScrollWatcher=defineComponent(infiniteScrollWatcher);module.exports=InfiniteScrollWatcher
  });
  define("app/ui/with_click_outside",["module","require","exports"],function(module, require, exports) {
  function withClickOutside(){this.onClickOutside=function(a,b){b=b.bind(this),this.clickOutsideHandler=function(c,d){var e=!0;a.each(function(){if($(c.target).closest(this).length)return e=!1,!1}),e&&b(c,d)},$(document).on("click",this.clickOutsideHandler)},this.offClickOutside=function(){this.clickOutsideHandler&&($(document).off("click",this.clickOutsideHandler),this.clickOutsideHandler=null)},this.before("teardown",function(){this.offClickOutside()})}module.exports=withClickOutside
  });
  define("app/ui/with_position",["module","require","exports"],function(module, require, exports) {
  function Position(){this.adjacent=function(a,b,c){var d,e,f;return c=c||{},c.pos=b.offset(),c.position=="relative"&&(d={left:0,top:0},e.top=0),c.gravity=c.gravity||"vertical",c.attachBox={height:b.outerHeight(),width:b.outerWidth()},c.overlayBox={height:c.height||a.outerHeight(),width:c.width||a.outerWidth()},c.winBox={height:this.getWindow().height(),width:this.getWindow().width()},c.bodyBox={height:this.getBody().height(),width:this.getBody().width()},"vertical,vertical-north,north,south".indexOf(c.gravity)!=-1?(e=this.processVertical(c),c.allowGravitySwitch&&!e.validFit&&(c.gravity="horizontal",f=this.processHorizontal(c))):"horizontal,east,west".indexOf(c.gravity)!=-1&&(e=this.processHorizontal(c),c.allowGravitySwitch&&!e.validFit&&(c.gravity="vertical",f=this.processVertical(c))),f&&f.validFit?f:e},this.processVertical=function(a){var b=$.extend(!0,{},a.pos),c=a.pos.top-a.overlayBox.height>=this.getWindow().scrollTop()+this.topBarHeight(),d=a.pos.top+a.attachBox.height+a.overlayBox.height<=this.getWindow().scrollTop()+a.winBox.height;return b.validFit=c||d,a.gravity=="vertical-north"?b.gravity=d||!b.validFit?"north":"south":a.gravity=="vertical"?b.gravity=c||!b.validFit?"south":"north":b.gravity=a.gravity,a.position=="relative"&&(b.left=0),"right,left,center".indexOf(a.weight)==-1&&(b.weight=a.pos.left+a.overlayBox.width>a.winBox.width?"right":"left"),b.weight=b.weight||a.weight,b.weight=="right"?b.left=a.pos.left-a.overlayBox.width+a.attachBox.width:b.weight=="center"&&(b.left=a.pos.left-(a.overlayBox.width-a.attachBox.width)/2),b.top=b.gravity=="north"?a.pos.top+a.attachBox.height:a.pos.top-a.overlayBox.height,b},this.processHorizontal=function(a){var b=$.extend(!0,{},a.pos);"top,bottom,center".indexOf(a.weight)==-1&&(a.pos.top-a.overlayBox.height/2<0?b.weight="top":a.pos.top+a.overlayBox.height/2>Math.max(a.winBox.height,a.bodyBox.height)?b.weight="bottom":b.weight="center"),b.weight=b.weight||a.weight;var c=a.pos.left+a.attachBox.width+a.overlayBox.width<=a.winBox.width,d=a.pos.left-a.overlayBox.width>=0;return b.validFit=d||c,a.gravity=="horizontal"&&(b.gravity=a.pos.left+a.attachBox.width/2>a.winBox.width/2?"east":"west"),b.gravity=b.gravity||a.gravity,a.position=="relative"&&(b.top=0),b.weight=="center"?b.top=a.pos.top+a.attachBox.height/2-a.overlayBox.height/2:b.weight=="bottom"&&(b.top=a.pos.top-a.overlayBox.height+a.attachBox.height),b.left=b.gravity=="west"?a.pos.left+a.attachBox.width:a.pos.left-a.overlayBox.width,b},this.getWindow=function(){return $(window)},this.getBody=function(){return $("body")},this.topBarHeight=function(){return $(".topbar, .StreamsTopBar").outerHeight()}}module.exports=Position
  });
  define("app/utils/chrome",["module","require","exports"],function(module, require, exports) {
  var chrome={globalYOffset:null,selectors:{globalNav:".global-nav, .StreamsTopBar"},refreshGlobalYOffset:function(){var a=document.querySelector(chrome.selectors.globalNav);chrome.globalYOffset=a?a.clientHeight:0},getGlobalYOffset:function(){return(chrome.globalYOffset===null||chrome.disableGlobalYOffsetCache)&&chrome.refreshGlobalYOffset(),chrome.globalYOffset},getCanvasYOffset:function(a){return a.offset().top-chrome.getGlobalYOffset()}};module.exports=chrome
  });
  define("app/utils/viewport_helpers",["module","require","exports","app/utils/chrome"],function(module, require, exports) {
  var chrome=require("app/utils/chrome");module.exports={getGlobalNavHeight:chrome.getGlobalYOffset,isWithinBounds:function(a,b,c,d,e){return d=d||this.getContainerRect(a),e=e||b[0].getBoundingClientRect(),!this.isBelowViewport(a,b,c,d,e)&&!this.isAboveViewport(a,b,c,d,e)},getContainerRect:function(a){return a.get(0)==window?{top:0,left:0,right:window.innerWidth,bottom:window.innerHeight,width:window.innerWidth,height:window.innerHeight}:a.get(0).getBoundingClientRect()},isContainedInViewport:function(a,b,c,d,e,f){return e=e||this.getContainerRect(a),f=f||b[0].getBoundingClientRect(),c=c||0,d=d||0,e.top+c<=f.top&&e.bottom+d>=f.bottom},isPartiallyContainedInViewport:function(a,b,c,d,e,f,g){f=f||this.getContainerRect(a),g=g||b[0].getBoundingClientRect(),c=c||0,d=d||0;var h=f.top+c,i=f.top+f.height+d,j=g.top,k=g.bottom;if(i<j||h>k)return!1;var l=j-h>0?i-j:k-h;return l>=e*g.height},isAboveViewport:function(a,b,c,d,e){return d=d||this.getContainerRect(a),e=e||b[0].getBoundingClientRect(),d.top>=e.top+e.height/2+(c||0)},isBelowViewport:function(a,b,c,d,e){return d=d||this.getContainerRect(a),e=e||b[0].getBoundingClientRect(),d.bottom<=e.top+e.height/2-(c||0)},getElementClosestToMiddleOfViewport:function(a,b,c,d){containerRect=this.getContainerRect(a),containerMiddle=containerRect.top+containerRect.height/2,c=c||0,d=d||0;var e=Infinity,f;return b.each(function(a,b){var g=b.getBoundingClientRect(),h=g.top+g.height/2,i=Math.abs(h-containerMiddle);i<e&&this.isContainedInViewport(undefined,undefined,c,d,containerRect,g)&&(e=i,f=b)}.bind(this)),f?$(f):undefined},getContainerOffsetTop:function(a){return a.offset()?a.offset().top:0},getVisibleViewport:function(){return{top:this.getGlobalNavHeight(),bottom:window.innerHeight,left:0,right:window.innerWidth,width:window.innerWidth,height:window.innerHeight}}}
  });
  define("app/ui/found_media_picker",["module","require","exports","core/i18n","core/advice","app/utils/array","core/compose","core/component","app/utils/keycode_map","template","app/data/user_info","core/utils","app/ui/infinite_scroll_watcher","app/ui/with_click_outside","app/ui/with_position","app/ui/with_dropdown","app/utils/viewport_helpers","app/utils/with_no_teardown_child_components"],function(module, require, exports) {
  function foundMediaPicker(){compose.mixin(this,[withClickOutside,advice.withAdvice,withPosition,withDropdown]),this.defaultAttrs({scribeContext:{},attachGifSelector:"button[data-gif-url]",resultUpClass:"FoundMediaSearch--top",contentSelector:".FoundMediaSearch-content",contentRightClass:"FoundMediaSearch-content--right",caretSelector:".Caret",caretUpClass:"Caret--top",caretDownClass:"Caret--bottom",preferredGravity:undefined,preferredWeight:undefined,tweetFormSelector:".tweet-form",foundMediaSearchSelector:".js-found-media-search-trigger",queryInputSelector:".FoundMediaSearch-queryInput",queryLoadingClass:"FoundMediaSearch-queryInput--loading",dropdownTriggerSelector:".js-found-media-search-trigger",dropdownSelector:".FoundMediaSearch-dropdownMenu",resultSelector:".FoundMediaSearch-results",itemsSelector:".FoundMediaSearch-items",focusableSelector:".FoundMediaSearch-focusable",firstFocusableSelector:".FoundMediaSearch-focusable:first",focusedSelector:".FoundMediaSearch-focusable.is-focused",focusedClass:"is-focused",dropdownContainerSelector:"span.dropdown-menu",categorySelector:".FoundMediaSearch-category",animatedFoundMediaSelector:".FoundMediaSearch-item",itemVisibleClass:"FoundMediaSearch-item--visible",columnSelector:".FoundMediaSearch-column",paginationSelector:".FoundMediaSearch-pagination",presentedClass:"js-presented",presentedSelector:".js-presented",keyboardClass:"FoundMediaSearch--keyboard",emptyStateClass:"FoundMediaSearch--emptyState",reloadSearchTriggerSelector:".js-found-media-reload-search-trigger"}),this.randomItemClasses=function(){return ArrayUtils.shuffleInPlace(["FoundMediaSearch-itemContainer--bg1","FoundMediaSearch-itemContainer--bg2","FoundMediaSearch-itemContainer--bg3","FoundMediaSearch-itemContainer--bg4","FoundMediaSearch-itemContainer--bg5","FoundMediaSearch-itemContainer--bg6"])},this.randomCategoryClasses=function(){return ArrayUtils.shuffleInPlace(["FoundMediaSearch-categoryContainer--bg1","FoundMediaSearch-categoryContainer--bg2","FoundMediaSearch-categoryContainer--bg3","FoundMediaSearch-categoryContainer--bg4","FoundMediaSearch-categoryContainer--bg5","FoundMediaSearch-categoryContainer--bg6"])},this.prepareDropdown=function(a,b){this.$node.addClass(this.attr.emptyStateClass),this.hasMoreItems(!0),this.select("itemsSelector").empty(),this.trigger(this.trendingMode?"uiRequestFoundMediaTrending":"uiRequestFoundMediaCategories")},this.showCategories=function(a,b){this.select("queryInputSelector").removeClass(this.attr.queryLoadingClass),this.$node.removeClass(this.attr.emptyStateClass),this.defaultResults=this.defaultResults||{html:b.html},this.select("itemsSelector").html(b.html),this.select("resultSelector").scrollTop(0),this.$focusables=this.select("focusableSelector");var c=this.randomCategoryClasses();this.$focusables.each(function(a,b){var d=c.pop();d||(c=this.randomCategoryClasses(),d=c.pop()),$(b).addClass(d)}.bind(this)),this.hasMoreItems(!1),this.trigger("uiFoundMediaGalleryImpression")},this.updateCategoryItems=function(a,b){this.select("queryInputSelector").removeClass(this.attr.queryLoadingClass),this.$node.removeClass(this.attr.emptyStateClass),this.defaultResults||(this.defaultResults={html:b.html,cursor:b.cursor}),this.presentFoundMediaItems(this.select("itemsSelector").html(b.html),typeof b.cursor=="string"),this.select("resultSelector").scrollTop(0),this.trigger(this.scribeEvents.itemsImpression)},this.errorState=function(){this.trigger("uiShowError",{message:_('Failed to load GIFs. Please try again later.')})},this.attachTarget=function(a){var b=a.closest(this.attr.attachGifSelector),c=b.data("gif-url");if(c){this.trigger(this.scribeEvents.itemSelect);var d=this.$node.closest(this.attr.tweetFormSelector);this.trigger(d,"uiPreviewThumbnailShow",{isGif:!0});var e=b.data(),f={url:c,origin:e.origin,provider:e.providerName,attribution:{name:e.attributionName,image:e.attributionImage},detailsUrl:e.detailsUrl,isGif:!0};this.trigger(d,"uiPreviewThumbnailPlaceholderAdd",{url:e.stillUrl,width:e.width,height:e.height,info:f}),this.trigger("uiAttachImageUrl",f),this.itemWasAttached=!0,this.closeDropdown()}},this.selectItem=function(a){if(a.has(this.attr.animatedFoundMediaSelector).length)this.attachTarget(a.find(this.attr.animatedFoundMediaSelector));else if(a.has(this.attr.categorySelector).length){var b=a.find(this.attr.categorySelector),c=b.data("display-name");this.trigger("uiRequestFoundMediaCategoryItems",{categoryName:b.data("name")}),this.lastQuery=c,this.select("queryInputSelector").val(c).focus().addClass(this.attr.queryLoadingClass)}},this.selectFocusedItem=function(){this.selectItem(this.select("focusedSelector"))},this.selectClickedItem=function(a){this.selectItem($(a.target).closest(this.attr.focusableSelector))},this.getElementTopOffset=function(a){var b=a[0],c=0;return b&&(c=b.getBoundingClientRect().top),c},this.getWindowHeight=function(){return $(window).height()},this.showDropdownPosition=function(a){this.$node.toggleClass(this.attr.resultUpClass,a),this.select("caretSelector").toggleClass(this.attr.caretUpClass,!a).toggleClass(this.attr.caretDownClass,a)},this.positionDropdownUp=function(){this.showDropdownPosition(!0)},this.positionDropdownDown=function(){this.showDropdownPosition(!1);var a=this.select("resultSelector"),b=this.getElementTopOffset(a),c=this.getWindowHeight();a.css({height:c-b-PICKER_BOTTOM_SPACING})},this.positionDropdown=function(){this.positionDropdownDown();var a=this.adjacent(this.select("dropdownSelector"),this.select("foundMediaSearchSelector"),{gravity:this.attr.preferredGravity||"vertical-north",weight:this.attr.preferredWeight});this.select("contentSelector").toggleClass(this.attr.contentRightClass,a.weight=="right"),this.$dropdown.find(this.attr.dropDownMenuSelector).toggleClass(this.attr.dropDownMenuAlignRightClass,a.weight=="right"),a.gravity=="south"&&this.positionDropdownUp(),this.animateVisibleGifs()},this.positionDropdownDebounced=utils.debounce(this.positionDropdown,100),this.gotFoundMediaBinaryData=function(a,b){this.trigger(this.scribeEvents.itemAdd),this.trigger("uiGotImageData",{name:b.name,info:b.info})},this.failedFoundMediaBinaryData=function(a,b){this.trigger(this.scribeEvents.itemError),this.trigger("uiShowError",{message:_('Failed to attach GIF. Please try again later.')})},this.after("openDropdown",function(){this.itemWasAttached=!1,this.positionDropdown(),this.select("itemsSelector").html('<div class="FoundMediaSearch-pagination"></div>'),this.select("foundMediaSearchSelector").addClass("enabled"),this.select("queryInputSelector").focus(),this.on(window,"resize",this.positionDropdownDebounced)}),this.after("closeDropdown",function(){this.itemWasAttached||this.trigger(this.scribeEvents.itemCancel),this.off(window,"resize",this.positionDropdownDebounced),this.select("queryInputSelector").val(""),this.select("foundMediaSearchSelector").removeClass("enabled"),this.select("itemsSelector").empty()}),this.searchQuery=function(a){a!==""&&this.select("queryInputSelector").addClass(this.attr.queryLoadingClass),this.trigger("uiFoundMediaSearch",{query:a||""})},this.searchRetry=function(){var a=this.select("queryInputSelector").val()||"";this.lastQuery===a&&(this.searchQuery(a),this.select("queryInputSelector").focus())},this.searchIfQueryChanged=function(){var a=this.select("queryInputSelector").val()||"";this.lastQuery!==a&&(this.lastQuery=a,this.searchQuery(a))},this.searchAutocomplete=function(){setTimeout(function(){this.searchIfQueryChanged()}.bind(this),0)},this.buildFocusIndex=function(){var a=this.select("focusableSelector");this.$focusables=a.sort(function(a,b){var c=$(a).offset(),d=$(b).offset();return c.top>d.top||c.top===d.top&&c.left>d.left?1:-1})},this.searchReset=function(){this.select("queryInputSelector").removeClass(this.attr.queryLoadingClass),this.select("resultSelector").scrollTop(0),this.defaultResults?this.presentFoundMediaItems(this.select("itemsSelector").html(this.defaultResults.html),typeof this.defaultResults.cursor=="string"):this.prepareDropdown()},this.searchResults=function(a,b){var c=b.sourceEventData;c&&c.query===this.select("queryInputSelector").val()&&(this.select("queryInputSelector").removeClass(this.attr.queryLoadingClass),this.lastQueryData=c,this.presentFoundMediaItems(this.select("itemsSelector").html(b.html),typeof b.cursor=="string"),this.select("resultSelector").scrollTop(0))},this.searchUnavailable=function(a,b){this.select("queryInputSelector").removeClass(this.attr.queryLoadingClass);var c=template["found_media/unavailable"].render({});this.select("itemsSelector").html(c),this.hasMoreItems(!1),this.buildFocusIndex()},this.presentFoundMedia=function(a,b,c,d){var e=[c,this.attr.presentedClass];d&&e.push("FoundMediaSearch-slideIn"),b.addClass(e.join(" "))},this.presentFoundMediaItems=function(a,b){this.buildFocusIndex();var c=this.randomItemClasses();this.$focusables.not(this.attr.presentedSelector).each(function(a,b){var d=c.pop();d||(c=this.randomItemClasses(),d=c.pop()),this.presentFoundMedia(a,$(b),d,a<10)}.bind(this)),this.hasMoreItems(b);if(b){var d=this.select("paginationSelector").offset().top-a.offset().top;d<this.select("resultSelector").height()&&this.trigger("uiNearTheBottom")}this.animateVisibleGifs()},this.moveFocus=function(a){var b=this.select("focusedSelector"),c;if(b.length===0)c=$(this.$focusables.get(0));else{var d=this.$focusables.index(b)+a;d<0||d>=this.$focusables.length?c=b:c=$(this.$focusables.get(d))}b.removeClass(this.attr.focusedClass),c.addClass(this.attr.focusedClass);if(c.length>0){var e=this.select("resultSelector"),f=c.offset().top-e.offset().top,g=c.height(),h=e.height();h<f+g?e.scrollTop(e.scrollTop()+f-h+g):0>f&&e.scrollTop(e.scrollTop()+f)}},this.queryKeyDown=function(a){switch(a.which){case keymap.UP:a.preventDefault(),this.moveFocus(-1),this.$node.addClass(this.attr.keyboardClass);break;case keymap.DOWN:a.preventDefault(),this.moveFocus(1),this.$node.addClass(this.attr.keyboardClass);break;case keymap.LEFT:case keymap.RIGHT:break;case keymap.ENTER:a.preventDefault(),this.trigger("uiFoundMediaSearchEnter");break;default:this.trigger("uiFoundMediaSearchAutocomplete")}},this.changeQuery=function(a){this.trigger("uiFoundMediaSearchAutocomplete")},this.enableButton=function(){this.select("foundMediaSearchSelector").prop("disabled",!1).removeClass("disabled")},this.disableButton=function(){this.select("foundMediaSearchSelector").prop("disabled",!0).addClass("disabled")},this.hasMoreItems=function(a){this.select("paginationSelector").toggle(a)},this.moreResults=function(a,b){var c=this.select("columnSelector"),d=$(b.html),e=d.filter(this.attr.columnSelector);c.first().append(e.first().children()),c.last().append(e.last().children()),this.presentFoundMediaItems(this.select("itemsSelector"),typeof b.cursor=="string"),this.animateVisibleGifs()},this.isContainedInViewport=function(a,b){return viewportHelpers.isPartiallyContainedInViewport(undefined,undefined,-500,500,0,a,b.rect)},this.animateVisibleGifs=function(){var a=this.select("resultSelector"),b=a[0].getBoundingClientRect(),c=this.select("animatedFoundMediaSelector").map(function(){return{item:$(this),rect:this.getBoundingClientRect()}}),d=c.filter(function(a,c){return this.isContainedInViewport(b,c)}.bind(this));d.sort(function(a,b){return a.rect.top-b.rect.top}).each(function(a,b){var c=b.item;c.find("img").attr("src",c.data("thumbnail-url"));if(!c.hasClass(this.attr.itemVisibleClass)){var d=a*40+"ms";c.parent().css({animationDelay:d}),c.addClass(this.attr.itemVisibleClass)}}.bind(this)),c.not(d).each(function(a,b){b.item.removeClass(this.attr.itemVisibleClass).find("img").attr("src","")}.bind(this))},this.setFocus=function(a){this.$node.removeClass(this.attr.keyboardClass);var b=$(a.target).closest(this.attr.focusableSelector);b.hasClass(this.attr.focusedClass)||(this.$node.removeClass(this.attr.keyboardClass),this.select("focusedSelector").removeClass(this.attr.focusedClass),b.addClass(this.attr.focusedClass))},this.clearFocus=function(a){$(a.target).closest(this.attr.focusableSelector).removeClass(this.attr.focusedClass)},this.after("initialize",function(){var a=this.$node.closest(this.attr.tweetFormSelector);this.attachChild(InfiniteScrollWatcher,this.select("resultSelector"),{contentSelector:this.attr.itemsSelector}),this.$node.toggleClass("autoplay-disabled",!!this.attr.autoplayDisabled),this.trendingMode=userInfo.getDecider("foundMediaTrendingEnabled"),this.scribeEvents=this.trendingMode?{itemsImpression:"uiFoundMediaTrendImpression",itemSelect:"uiFoundMediaTrendSelect",itemAdd:"uiFoundMediaTrendAdd",itemError:"uiFoundMediaTrendError",itemCancel:"uiFoundMediaTrendCancel"}:{itemsImpression:"uiFoundMediaCategoryImpression",itemSelect:"uiFoundMediaCategorySelect",itemAdd:"uiFoundMediaCategoryAdd",itemError:"uiFoundMediaCategoryError",itemCancel:"uiFoundMediaCategoryCancel"},this.skipFocusManager=!0,this.scribeContext=this.attr.scribeContext,this.on("uiDropdownOpenRequested",this.prepareDropdown),this.on("click",{focusableSelector:this.selectClickedItem,reloadSearchTriggerSelector:this.searchRetry}),this.on("mouseover",{focusableSelector:this.setFocus}),this.on("mouseout",{focusableSelector:this.clearFocus}),this.on("uiFoundMediaSearchEnter",this.selectFocusedItem),this.on("dataFoundMediaError",this.errorState),this.on("dataFoundMediaCategories",this.showCategories),this.on("dataFoundMediaCategoryItems",this.updateCategoryItems),this.on("dataFoundMediaSearchResults",this.searchResults),this.on("dataFoundMediaSearchResultsUnavailable",this.searchUnavailable),this.on("dataFoundMediaSearchClear",this.searchReset),this.on("dataFoundMediaFetchMoreResults",this.moreResults),this.on("dataImageAttachBinaryData",this.gotFoundMediaBinaryData),this.on("dataImageAttachFailed",this.failedFoundMediaBinaryData),this.on("uiFoundMediaSearchAutocomplete",this.searchAutocomplete),this.on("uiFoundMediaSearchSelect",{resultSelector:this.selectResult}),this.on("change paste cut input",{queryInputSelector:this.changeQuery}),this.on("keydown",{queryInputSelector:this.queryKeyDown}),this.on(this.attr.resultSelector,"scroll",utils.debounce(this.animateVisibleGifs.bind(this),50)),this.on("uiNearTheBottom","uiFoundMediaFetchMore"),this.on(a,"uiComposerEnableExclusiveAttachments",this.enableButton),this.on(a,"uiComposerDisableExclusiveAttachments",this.disableButton),this.on(a,"uiPreviewThumbnailAdd",this.closeDropdown)})}var _=require("core/i18n"),advice=require("core/advice"),ArrayUtils=require("app/utils/array"),compose=require("core/compose"),defineComponent=require("core/component"),keymap=require("app/utils/keycode_map"),template=require("template"),userInfo=require("app/data/user_info"),utils=require("core/utils"),InfiniteScrollWatcher=require("app/ui/infinite_scroll_watcher"),withClickOutside=require("app/ui/with_click_outside"),withPosition=require("app/ui/with_position"),withDropdown=require("app/ui/with_dropdown"),viewportHelpers=require("app/utils/viewport_helpers"),withNoTeardownChildComponents=require("app/utils/with_no_teardown_child_components");module.exports=defineComponent(foundMediaPicker,withNoTeardownChildComponents);var PICKER_BOTTOM_SPACING=40
  });
  define("app/ui/compose/with_gif_search",["module","require","exports","core/compose","app/ui/found_media_picker","app/utils/with_no_teardown_child_components"],function(module, require, exports) {
  function withFoundMediaSearch(){compose.mixin(this,[withNoTeardownChildComponents]),this.defaultAttrs({foundMediaSearch:".found-media-search"}),this.attachedImageUrl=function(a,b){this.foundMediaInfo=b},this.removedAttachment=function(){this.foundMediaInfo=undefined},this.after("initialize",function(a){this.attachChild(FoundMediaSearch,this.select("foundMediaSearch"),{autoplayDisabled:this.attr.autoplayDisabled,eventData:this.attr.eventData,preferredGravity:this.attr.preferredGravity,preferredWeight:this.attr.preferredWeight,restoreFocusOnClose:!0,scribeContext:this.attr.scribeContext,skipFocusManager:!0}),this.on("uiAttachImageUrl",this.attachedImageUrl),this.on("uiPreviewThumbnailRemove uiPreviewThumbnailRemoveAll",this.removedAttachment)})}var compose=require("core/compose"),FoundMediaSearch=require("app/ui/found_media_picker"),withNoTeardownChildComponents=require("app/utils/with_no_teardown_child_components");module.exports=withFoundMediaSearch
  });
  define("app/ui/compose/tweet_box",["module","require","exports","core/i18n","core/component","app/utils/scribe_item_types","app/data/user_info","core/utils","app/ui/compose/with_condensing","app/ui/compose/with_dm_mode","app/ui/with_allow_teardown","app/ui/compose/with_character_counter","app/ui/compose/with_draft_tweets","app/ui/compose/with_video_edit_dialog","app/ui/compose/with_lifeline","app/ui/compose/with_photo_intent","app/ui/compose/with_rtl_tweet_box","app/ui/compose/with_text_editor","app/ui/compose/with_image_attachment","app/ui/compose/with_progress_bar","app/ui/compose/with_rescuebird_alert_compose_view","app/ui/compose/with_typeahead","app/ui/compose/with_ui_metrics","app/ui/compose/with_poll_compose_view","app/ui/compose/with_placeholder_text","app/ui/compose/with_gif_search"],function(module, require, exports) {
  function tweetBox(){var a="";this.defaultAttrs({shadowTextSelector:".tweet-box-shadow",messagingClass:"messaging",tweetActionSelector:".tweet-action",placeIdSelector:"input[name=place_id]",cursorPosition:undefined,inReplyToTweetData:{},inReplyToStatusId:undefined,impressionId:undefined,disclosureType:undefined,modal:!1,condensable:!1,suppressFlashMessage:!1,suppressSuccessMessage:!1,customData:{},position:undefined,itemType:"tweet",component:undefined,cardData:undefined,canTweetDefaultText:!1,gifSupport:!0,videoSupport:!0,sruAllMedia:!1}),this.confirmAndSendTweet=function(){this.sendTweet()},this.geoPlaceId=function(){return this.select("placeIdSelector").val()},this.createDataForSending=function(){var a={status:this.addHiddenText(this.getVisibleText()),place_id:this.geoPlaceId(),in_reply_to_status_id:this.attr.inReplyToStatusId,impression_id:this.attr.impressionId,earned:this.attr.disclosureType?this.attr.disclosureType=="earned":undefined,is_permalink_page:$(".permalink").length>0};return this.attr.inReplyToTweetData&&(a.tweet_stat_count=this.attr.inReplyToTweetData.tweetStatCount),a},this.isEmpty=function(){var a=this.getVisibleText().trim(),b=a&&(this.attr.canTweetDefaultText||a!==this.attr.defaultText.trim());return!b&&!this.hasAttachment()},this.hasAttachment=function(){return!1},this.hasValidContent=function(){return!this.isEmpty()&&!this.maxReached()&&(!this.maxEntitiesReached||!this.maxEntitiesReached())},this.sendTweet=function(){var a=this.getTweetboxId();this.detectUpdatedText(),this.$node.attr("id",a);var b="uiSendTweet",c=this.attr.cardData,d="",e="";this.hasMedia?b="uiSendTweetWithMedia":this.hasPoll&&(b="uiSendTweetWithCard",c=this.getPollData(),d=_('Sorry, there was a problem creating your poll.'),e=_('Sorry, there was a problem creating your poll. Please try again later.')),this.setTweeting(!0),this.disable(),this.trigger(b,{tweetboxId:a,tweetData:this.createDataForSending(),customData:this.attr.customData,cardData:c,clientErrorMsg:d,serverErrorMsg:e})},this.alertMedia=function(a){var b=_('Your Tweet has not been sent. Are you sure you wish to leave the page?');if(a.type!="beforeunload"&&a.type!="uiBeforeUnload"){a.type=="uiDialogCloseRequested"&&(b=_('Are you sure you wish to close the dialog and cancel sending the Tweet?'));var c=confirm(b);c?this.trigger("dataTweetCancel",{tweetboxId:this.getTweetboxId()}):a.preventDefault()}return b},this.getTweetboxId=function(){return this.tweetboxId||(this.tweetboxId="swift_tweetbox_"+ +(new Date)),this.tweetboxId},this.overrideTweetBoxOptions=function(a,b){this.attr.inReplyToTweetData=b,b.id&&(this.attr.inReplyToStatusId=b.id),b.impressionId&&(this.attr.impressionId=b.impressionId),b.disclosureType&&(this.attr.disclosureType=b.disclosureType),b.defaultText&&(this.attr.defaultText=b.defaultText),this.attr.cursorPosition!==undefined&&setTimeout(function(){this.setCursorPosition(this.attr.cursorPosition)}.bind(this)),b.customData&&(this.attr.customData=b.customData),b.itemType&&(this.attr.itemType=b.itemType),b.scribeContext&&b.scribeContext.component&&(this.attr.component=b.scribeContext.component),b.position!==undefined&&(this.attr.position=b.position),b.cursorPosition!==undefined&&(this.attr.cursorPosition=b.cursorPosition),b.canTweetDefaultText!==undefined&&(this.attr.canTweetDefaultText=b.canTweetDefaultText)},this.resetOverriddenOptions=function(a,b){delete this.attr.defaultText,this.attr.inReplyToTweetData=this.defaults.inReplyToTweetData,this.attr.inReplyToStatusId=this.defaults.inReplyToStatusId,this.attr.impressionId=this.defaults.impressionId,this.attr.disclosureType=this.defaults.disclosureType,this.attr.defaultText=this.getDefaultText(),this.attr.cursorPosition=this.defaults.cursorPosition,this.attr.customData=this.defaults.customData,this.attr.position=this.defaults.position,this.attr.itemType=this.defaults.itemType,this.attr.component=this.defaults.component,this.attr.canTweetDefaultText=this.defaults.canTweetDefaultText},this.updateTweetStateOnTextChanged=function(a,b){this.select("shadowTextSelector").val(b.text),this.updateTweetButton()},this.updateTweetButton=function(){!this.hasValidContent()||this.$node.hasClass("tweeting")?this.disable():this.enable()},this.tweetSent=function(a,b){var c=b.tweetboxId||b.sourceEventData.tweetboxId;if(c!=this.getTweetboxId())return;b.customData=this.attr.customData,b.message&&(!this.attr.suppressSuccessMessage||b.unusual)&&this.trigger(b.unusual?"uiShowError":"uiShowMessage",{message:b.message});var d="uiTweetboxTweetSuccess",e={id:b.tweet_id,item_type:scribeItemTypes.tweet};this.foundMediaInfo&&(e.media_details={photo_count:1,found_media_provider:this.foundMediaInfo.provider}),userInfo.getDeciderValue("web_upload_video_advanced")&&b.tweetData&&(e.media_details={metadata:{title:b.tweetData.advanced_title,description:b.tweetData.advanced_description,cta_type:b.tweetData.advanced_cta_type,cta_url:b.tweetData.advanced_cta_url,embeddable:!!b.tweetData.advanced_embeddable}});var f={scribeData:{items:[e]}};if(this.attr.inReplyToStatusId||this.getVisibleText().indexOf("@")==0){if((this.attr.inReplyToTweetData||{}).replyLinkClick){var g=utils.merge({},this.attr.inReplyToTweetData);g.scribeContext&&g.scribeContext.component!="suggest_recap"&&(g.scribeContext.element=""),this.trigger("uiReplyButtonTweetSuccess",g)}d="uiTweetboxReplySuccess"}else this.dmMode&&(d="uiTweetboxDMSuccess");this.trigger(d,f),this.hasMedia?this.isVideo?(userInfo.getDeciderValue("web_upload_video_advanced")&&this.trigger("uiTweetboxProVideoTweetSuccess",f),this.trigger("uiTweetboxVideoTweetSuccess",f)):this.isGif?this.trigger(this.foundMediaInfo?"uiTweetboxRemoteGifTweetSuccess":"uiTweetboxLocalGifTweetSuccess",f):this.trigger("uiTweetboxPhotoTweetSuccess",f):this.hasPoll&&this.trigger("uiTweetboxPollTweetSuccess",f),this.geoPlaceId()&&this.trigger("uiTweetboxGeotaggedTweetSuccess",f),this.setTweeting(!1),this.trigger("uiTweetSent",b),this.clear()},this.scribeDataForReply=function(){var a={id:this.attr.inReplyToStatusId,item_type:scribeItemTypes.tweet},b={};this.attr.impressionId&&(a.token=this.attr.impressionId,b.promoted=!0);if(this.attr.position==0||this.attr.position)a.position=this.attr.position;return b.items=[a],{scribeData:b,scribeContext:{component:this.attr.component,element:""}}},this.tweetError=function(a,b){var c=b.tweetboxId||b.sourceEventData.tweetboxId;if(c!=this.getTweetboxId())return;!this.attr.suppressFlashMessage&&!b.spamChallenge&&this.trigger("uiShowError",{message:b.error||b.message}),this.setTweeting(!1),this.enable(),this.trigger("uiTweetboxTweetError")},this.tweetCancel=function(a,b){var c=b.tweetboxId||b.sourceEventData.tweetboxId;if(c!=this.getTweetboxId())return;this.setTweeting(!1),this.trigger("uiTweetCancelled",b),this.clear()},this.enable=function(){this.select("tweetActionSelector").removeClass("disabled").attr("disabled",!1),this.$node.trigger("uiEnableTweetAction")},this.disable=function(){this.select("tweetActionSelector").addClass("disabled").attr("disabled",!0),this.$node.trigger("uiDisableTweetAction")},this.clear=function(){this.reset()},this.reset=function(){this.resetTweetText()},this.onTweetBoxExpand=function(a,b){b&&this.overrideTweetBoxOptions(a,b),this.trigger("uiComposerResetAndFocus")},this.resetAndFocus=function(){this.reset(),this.focus(),this.setCursorPosition(),this.composerActive(),this.trigger("uiCloseDropdowns")},this.composerActive=function(){this.trigger("uiComposerActive")},this.resetTweetText=function(){this.trigger("uiClearUndoState"),this.setVisibleText(this.attr.defaultText)},this.getDefaultText=function(){return typeof this.attr.defaultText!="undefined"?this.attr.defaultText:this.getAttrOrElse("data-default-text",a)},this.getAttrOrElse=function(a,b){return typeof this.$node.attr(a)=="undefined"?b:this.$node.attr(a)},this.handleCmdEnterSubmit=function(){this.select("tweetActionSelector").hasClass("disabled")||this.confirmAndSendTweet()},this.setTweeting=function(a){a?(this.on(window,"beforeunload uiBeforeUnload",this.alertMedia),this.on(document,"uiBeforeNavigate uiDialogCloseRequested",this.alertMedia)):(this.off(window,"beforeunload uiBeforeUnload",this.alertMedia),this.off(document,"uiBeforeNavigate uiDialogCloseRequested",this.alertMedia)),this.$node.toggleClass("tweeting",a),this.trigger(this.$text,a?"uiDisableEditing":"uiEnableEditing")},this.keyShortcutTooltip=function(a){if(a.which==9){var b=navigator.platform.toLowerCase().indexOf("mac")!=-1,c=b?_('You can also press cmd-enter'):_('You can also press ctrl-enter');this.select("tweetActionSelector").addClass("js-tooltip").attr("data-original-title",c).filter(document.activeElement).tooltip("show")}},this.onTextChanged=function(a,b){this.updateTweetStateOnTextChanged(a,b)},this.after("initialize",function(){this.attr.defaultText=this.getDefaultText(),utils.push(this.attr,{eventData:{scribeContext:{element:"tweet_box"}}},!1),this.on("uiTextChanged",this.onTextChanged),this.on("uiUpdateTweetButtonState",this.updateTweetButton),this.initDraftTweets(),this.initTextNode(),this.on(this.select("tweetActionSelector"),"click",this.confirmAndSendTweet),this.on("uiShortcutCmdEnter",this.handleCmdEnterSubmit),this.on(document,"dataTweetSuccess",this.tweetSent),this.on(document,"dataTweetError",this.tweetError),this.on(document,"dataTweetCancel",this.tweetCancel),this.on(this.$text,"dragover",this.focus),this.on("uiComposerResetAndFocus",this.resetAndFocus),this.on("uiExpandFocus",this.focus),this.on("uiTweetBoxExpand",this.onTweetBoxExpand),this.on("keyup",this.keyShortcutTooltip),this.attr.modal&&(this.on(document,"uiOverrideTweetBoxOptions",this.overrideTweetBoxOptions),this.on(document,"uiDialogClosed",this.resetOverriddenOptions)),this.on(this.$text,"focusin",this.ignoreDuringFakeFocus(this.composerActive)),this.hasFocus()?this.composerActive():this.reset()})}var _=require("core/i18n"),defineComponent=require("core/component"),scribeItemTypes=require("app/utils/scribe_item_types"),userInfo=require("app/data/user_info"),utils=require("core/utils"),withCondensing=require("app/ui/compose/with_condensing"),withDmMode=require("app/ui/compose/with_dm_mode"),withAllowTeardown=require("app/ui/with_allow_teardown"),withCounter=require("app/ui/compose/with_character_counter"),withDraftTweets=require("app/ui/compose/with_draft_tweets"),withVideoEditDialog=require("app/ui/compose/with_video_edit_dialog"),withLifeline=require("app/ui/compose/with_lifeline"),withPhotoIntent=require("app/ui/compose/with_photo_intent"),withRTL=require("app/ui/compose/with_rtl_tweet_box"),withTextEditor=require("app/ui/compose/with_text_editor"),withImageAttachment=require("app/ui/compose/with_image_attachment"),withProgressBar=require("app/ui/compose/with_progress_bar"),withRescuebirdComposeAlertView=require("app/ui/compose/with_rescuebird_alert_compose_view"),withTypeahead=require("app/ui/compose/with_typeahead"),withUiMetrics=require("app/ui/compose/with_ui_metrics"),withPollComposeView=require("app/ui/compose/with_poll_compose_view"),withPlaceholderText=require("app/ui/compose/with_placeholder_text"),withGifSearch=require("app/ui/compose/with_gif_search"),TweetBox=defineComponent(tweetBox,withCondensing,withDmMode,withTextEditor,withCounter,withRTL,withDraftTweets,withVideoEditDialog,withImageAttachment,withLifeline,withAllowTeardown,withProgressBar,withTypeahead,withPhotoIntent,withUiMetrics,withPollComposeView,withPlaceholderText,withGifSearch,withRescuebirdComposeAlertView);module.exports=TweetBox
  });
  define("app/utils/guard",["module","require","exports"],function(module, require, exports) {
  module.exports=function(a,b,c){return function(){if(b.apply(c||this,arguments))return a.apply(c||this,arguments)}}
  });
  define("app/ui/compose/with_message_me_card_data",["module","require","exports"],function(module, require, exports) {
  function messageMeCardData(){this.defaultAttrs({fromMessageMeCardClass:"from-message-me-card"}),this.addMessageMeCardData=function(a,b){this.addMessageMeScribeData(b),this.addFromMessageMeCardClass()},this.addMessageMeScribeData=function(a){this.messageMeScribeData={cardName:a.cardName,cardUri:a.cardUri,userId:a.userId}},this.addFromMessageMeCardClass=function(){this.$node.addClass(this.attr.fromMessageMeCardClass)},this.removeMessageMeCardData=function(){this.removeMessageMeScribeData(),this.removeFromMessageMeCardClass()},this.removeMessageMeScribeData=function(){this.messageMeScribeData=undefined},this.removeFromMessageMeCardClass=function(){this.$node.removeClass(this.attr.fromMessageMeCardClass)},this.after("initialize",function(){this.removeMessageMeCardData(),this.on(document,"uiAddMessageMeCardData",this.addMessageMeCardData)}),this.after("reset",function(){this.removeMessageMeCardData()})}module.exports=messageMeCardData
  });
  define("app/ui/compose/with_tweet_attachment",["module","require","exports"],function(module, require, exports) {
  function tweetAttachment(){this.addTweetAttachment=function(a,b){if(!b||!b.id)return;this.tweetAttachmentId=b.id,this.trigger("uiWantsTweet",{tweetId:this.tweetAttachmentId,tweetOptions:{modal:"dm",disableLinks:!0}}),this.trigger("uiAttachmentChanged")},this.removeTweetAttachment=function(){this.tweetAttachmentId=undefined,this.trigger("uiAttachmentChanged")},this.hasTweetAttachment=function(){return!!this.tweetAttachmentId},this.around("hasAttachment",function(a){return this.hasTweetAttachment()||a()}),this.after("initialize",function(){this.tweetAttachmentId=undefined,this.on(document,"uiComposeWithTweet",this.addTweetAttachment)})}module.exports=tweetAttachment
  });
  define("app/ui/compose/dm_composer",["module","require","exports","core/i18n","core/component","app/utils/guard","app/ui/with_allow_teardown","app/ui/compose/with_character_counter","app/ui/compose/with_image_attachment","app/ui/compose/with_message_me_card_data","app/ui/dialogs/with_modal_tweet","app/ui/compose/with_placeholder_text","app/ui/compose/with_rtl_tweet_box","app/ui/compose/with_rich_editor","app/ui/compose/with_text_editor","app/ui/compose/with_tweet_attachment","app/ui/compose/with_video_edit_dialog","app/ui/compose/with_gif_search"],function(module, require, exports) {
  function dmComposer(){this.defaultAttrs({tweetBoxSelector:".tweet-box",tweetActionSelector:".tweet-action",discardTweet:".DMComposer-discardTweet",imageDataSelector:".file-data",removeTweetEvents:"uiDMDialogOpenedConversationList uiDMDialogClosed uiDMSendMessage dataFailedToGetTweet",gifSupport:!1,videoSupport:!1,sruAllMedia:!0,preferredGravity:"vertical",preferredWeight:"right"}),this.isEmpty=function(){return!this.hasAttachment()&&!this.getVisibleText().trim()},this.hasAttachment=function(){return!1},this.getMediaData=function(){var a=this.select("imageDataSelector");return{fileId:a.attr("data-file-id"),fileType:a.attr("data-file-type"),trimRange:a.attr("data-trim-range"),uploadId:a.attr("data-upload-id"),foundMediaInfo:this.foundMediaInfo}},this.createDataForSending=function(){return{conversation_id:this.conversationId,media_data:this.hasMedia?this.getMediaData():undefined,recipient_ids:this.conversationId?[]:this.recipientIds,screen_name:this.conversationId||this.recipientIds?[]:this.screenNames,text:this.addHiddenText(this.getVisibleText()),tweetboxId:this.getTweetboxId(),tweet_id:this.hasTweetAttachment()?this.tweetAttachmentId:undefined,message_me_scribe_data:this.messageMeScribeData}},this.sendDM=function(){this.detectUpdatedText(),this.trigger("uiDMSendMessage",this.createDataForSending()),delete this.recipientIds,delete this.screenNames,this.revertComposer()},this.getTweetboxId=function(){return this.tweetboxId=this.tweetboxId||"swift_tweetbox_"+ +(new Date),this.tweetboxId},this.isOwnTweetbox=function(a,b){var c=b.tweetboxId||b.sourceEventData&&b.sourceEventData.tweetboxId;return c==this.getTweetboxId()},this.dmSent=function(a,b){b.customData=this.attr.customData,this.trigger("uiDMSent",b)},this.dmError=function(a,b){this.trigger("uiShowMessage",{message:b.message})},this.canSend=function(){var a=this.conversationId||this.recipientIds||this.screenNames;return!this.isEmpty()&&!this.maxReached()&&a},this.updateSendButton=function(){this.canSend()?this.enable():this.disable()},this.enable=function(){this.select("tweetActionSelector").removeClass("disabled").attr("disabled",!1)},this.disable=function(){this.select("tweetActionSelector").addClass("disabled").attr("disabled",!0)},this.initializeComposer=function(a,b){b=b||{},this.conversationId=b.conversation_id,this.recipientIds=b.recipient_ids,this.screenNames=b.screen_names,this.revertComposer(b.retain_tweet_attachment),this.setVisibleText(b.default_composer_text||""),this.focus()},this.revertComposer=function(a){a!==!0&&this.trigger("uiRemoveTweetAttachment"),this.reset(),this.setVisibleText(""),this.updateSendButton(),this.handleAttachmentChange(),this.focus()},this.handleKeyboardSubmit=function(){this.select("tweetActionSelector").hasClass("disabled")||this.sendDM()},this.handleTweetRemoval=function(){this.removeTweet(),this.removeTweetAttachment(),this.focus()},this.handleAttachmentChange=function(){var a=this.hasAttachment()?_('Add a comment...'):undefined,b=this.hasAttachment()?"uiComposerDisableExclusiveAttachments":"uiComposerEnableExclusiveAttachments";this.trigger("uiUpdateComposerPlaceholder",{placeholderText:a}),this.trigger(b)},this.relayRemove=function(a,b){this.trigger("uiRemoveTweetAttachment")},this.after("initialize",function(){this.initTextNode(),this.updateSendButton(),this.on(this.select("tweetActionSelector"),"click",this.sendDM),this.on("uiShortcutEnter uiShortcutCmdEnter",this.handleKeyboardSubmit),this.on(document,"dataDMSendSuccess",guard(this.dmSent,this.isOwnTweetbox)),this.on(document,"dataDMError",guard(this.dmError,this.isOwnTweetbox)),this.on("uiEmojiSuggestion","uiInsertText"),this.on("uiTextChanged uiAttachmentChanged",this.updateSendButton),this.on("uiAttachmentChanged",this.handleAttachmentChange),this.on(document,this.attr.removeTweetEvents,this.relayRemove),this.on("uiRemoveTweetAttachment",this.handleTweetRemoval),this.on("click",{discardTweet:"uiRemoveTweetAttachment"}),this.on("uiInitializeDMComposer",this.initializeComposer),this.on("uiRevertComposer",this.revertComposer)})}var _=require("core/i18n"),defineComponent=require("core/component"),guard=require("app/utils/guard"),withAllowTeardown=require("app/ui/with_allow_teardown"),withCounter=require("app/ui/compose/with_character_counter"),withImageAttachment=require("app/ui/compose/with_image_attachment"),withMessageMeCardData=require("app/ui/compose/with_message_me_card_data"),withModalTweet=require("app/ui/dialogs/with_modal_tweet"),withPlaceholderText=require("app/ui/compose/with_placeholder_text"),withRTL=require("app/ui/compose/with_rtl_tweet_box"),withRichEditor=require("app/ui/compose/with_rich_editor"),withTextEditor=require("app/ui/compose/with_text_editor"),withTweetAttachment=require("app/ui/compose/with_tweet_attachment"),withVideoEditDialog=require("app/ui/compose/with_video_edit_dialog"),withGifSearch=require("app/ui/compose/with_gif_search"),DmComposer=defineComponent(dmComposer,withTextEditor,withCounter,withRTL,withImageAttachment,withModalTweet,withTweetAttachment,withVideoEditDialog,withAllowTeardown,withPlaceholderText,withRichEditor,withMessageMeCardData,withGifSearch);module.exports=DmComposer
  });
  define("app/utils/unique_id",["module","require","exports"],function(module, require, exports) {
  function uniqueId(a,b){a=a||{},b=b||defaultPrefix;var c=a.id;if(c)return c;do count++,c=b+count;while(document.getElementById(c));return a.id=c,c}var defaultPrefix="uuid-",count=0;module.exports=uniqueId
  });
  define("app/ui/with_geo_search_dropdown",["module","require","exports","core/compose","app/utils/keycode_map","app/utils/unique_id","app/ui/with_click_outside","app/ui/with_dropdown","core/advice"],function(module, require, exports) {
  function withGeoSearchDropdown(){compose.mixin(this,[withClickOutside,advice.withAdvice,withDropdown]),this.defaultAttrs({querySelector:".GeoSearch-queryInput",dropdownTriggerSelector:".js-geo-search-trigger",dropdownSelector:".GeoSearch-dropdownMenu",resultSelector:".GeoSearch-result",resultClass:"GeoSearch-result",focusableSelector:".GeoSearch-focusable:visible",firstFocusableSelector:".GeoSearch-focusable:first",focusedSelector:".GeoSearch-focusable.is-focused",focusedClass:"is-focused"}),this.getQuery=function(){return this.select("querySelector").val()||""},this.applyAriaAttrsToDropdown=function(){var a=this.select("dropdownSelector");if(a.length){var b=uniqueId(a[0]);this.select("querySelector").attr({"aria-owns":b,"aria-expanded":!0,"aria-autocomplete":"list"}),this.select("dropdownSelector").attr("role","listbox"),this.ariaApplied=!0}},this.applyAriaAttrsToResultsAndAnnounceNumResults=function(){if(!this.ariaApplied)return;var a=this.select("resultSelector").length;a&&(this.select("resultSelector").each(function(a,b){$(b).attr("role","option"),uniqueId(b)}),this.trigger("uiGeoResultsShown",{numResults:a}))},this.moveFocus=function(a){var b=this.select("focusedSelector"),c=this.select("focusableSelector"),d=c.index(b)+a,e=c.length-1;d<0?d=e:d>e&&(d=0);var f=c.eq(d);b.removeClass(this.attr.focusedClass),f.addClass(this.attr.focusedClass),this.ariaApplied&&(b.removeAttr("aria-selected"),b.removeAttr("tabindex"),f.attr({"aria-selected":!0,tabindex:"-1"}),this.select("querySelector").attr("aria-activedescendant",f.attr("id")))},this.queryKeyDown=function(a){switch(a.which){case keymap.UP:a.preventDefault(),this.moveFocus(-1);return;case keymap.DOWN:a.preventDefault(),this.moveFocus(1);return;case keymap.LEFT:case keymap.RIGHT:return;case keymap.ENTER:a.preventDefault();var b=this.select("focusedSelector");if(b.length){a.stopPropagation(),b.trigger("uiGeoSearchSelect");return}this.trigger("uiGeoSearchEnter");return;case keymap.TAB:this.trigger("uiGeoSearchTab");return}this.trigger("uiGeoSearchAutocomplete")},this.selectResult=function(a){var b=$(a.target),c=b.data("place-id"),d=b.text(),e=b.data("result-type"),f=b.data("result-type")?'[data-result-type="'+b.data("result-type")+'"]':this.attr.resultSelector,g=this.$node.find(f).index(b);this.trigger("uiGeoSearchChangeLocation",{placeId:c,placeName:d,resultType:e,placeOffset:g})},this.changeQuery=function(a){this.trigger("uiGeoSearchAutocomplete")},this.setFocus=function(a){var b=$(a.target).closest(this.attr.focusableSelector);this.select("focusedSelector").not(b).removeClass(this.attr.focusedClass),b.addClass(this.attr.focusedClass)},this.clearFocus=function(a){$(a.target).removeClass(this.attr.focusedClass)},this.after("openDropdown",function(){this.applyAriaAttrsToDropdown()}),this.after("closeDropdown",function(){this.ariaApplied&&(this.select("focusedSelector").removeAttr("aria-selected").removeAttr("tabindex"),this.select("querySelector").attr("aria-expanded",!1).removeAttr("aria-activedescendant"))}),this.after("initialize",function(){this.on("click",{resultSelector:this.selectResult}),this.on("uiGeoSearchSelect",{resultSelector:this.selectResult}),this.on("mouseover",{focusableSelector:this.setFocus}),this.on("mouseout",{focusableSelector:this.clearFocus}),this.on("change paste cut input",{querySelector:this.changeQuery}),this.on("keydown",{querySelector:this.queryKeyDown})})}var compose=require("core/compose"),keymap=require("app/utils/keycode_map"),uniqueId=require("app/utils/unique_id"),withClickOutside=require("app/ui/with_click_outside"),withDropdown=require("app/ui/with_dropdown"),advice=require("core/advice");module.exports=withGeoSearchDropdown
  });
  define("app/ui/geo_picker",["module","require","exports","core/i18n","core/component","app/utils/scribe_item_types","template","app/utils/unique_id","core/utils","app/ui/with_geo_search_dropdown"],function(module, require, exports) {
  function geoPicker(){this.defaultAttrs({tweetBoxSelector:".tweet-form",buttonSelector:"button.geo-picker-btn",placeIdSelector:"input[name=place_id]",statusSelector:"span.geo-status",dropdownContainerSelector:"span.dropdown-container",dropdownDisabledSelector:"#geo-disabled-dropdown",enableButtonSelector:"button.geo-turn-on",notNowButtonSelector:"button.geo-not-now",dropdownEnabledSelector:"#geo-enabled-dropdown",geoSearchSelector:".geo-query-location .icon",dropdownStatusSelector:".geo-dropdown-status",searchResultsSelector:".GeoSearch-result--search",placeResultsSelector:".GeoSearch-result--place",turnOffButtonSelector:".geo-turn-off-item",turnOffButtonTemplateClass:".geo-turn-off-item",disabledClass:"disabled",isMinimalButtonLabels:!1}),this.selectGeoAction=function(a){if(this.dropdownIsOpen){this.closeDropdown();return}switch(this.geoState.state){case"disabled":this.disable(),this.trigger("uiGeoPickerOffer");break;case"enableIsUnavailable":this.trigger("uiGeoPickerOffer");break;case"locateIsUnavailable":case"enabledTurnedOn":this.requestGeoState();break;case"enabledTurnedOff":this.turnOn();break;case"changing":case"locating":case"located":case"locationUnknown":this.trigger("uiGeoPickerOpen")}},this.prepare=function(a,b){var c,d;a.type=="uiGeoPickerOpen"?(c=this.attr.dropdownEnabledSelector,d=1,this.geoDetails&&!this.geoDetails.interacted_poi_list&&(this.geoDetails.interacted_poi_list=!0)):(c=this.attr.dropdownDisabledSelector,d=0),d!=this.dropdownState&&(this.select("dropdownContainerSelector").html($(c).html()),this.dropdownState=d),this.showGeoState(),this.applyAriaAttrsToResultsAndAnnounceNumResults(),this.lastQuery="",this.geoQueryFieldChanged=!1},this.after("openDropdown",function(){var a=this.select("enableButtonSelector");a.length||(a=this.select("querySelector")),a.focus(),this.applyAriaAttrsToDropdown(),this.applyAriaAttrsToResultsAndAnnounceNumResults()}),this.after("closeDropdown",function(){this.select("querySelector").val("")}),this.enable=function(){this.closeDropdown(),this.trigger("uiGeoPickerEnable")},this.turnOn=function(){this.trigger("uiGeoPickerTurnOn")},this.turnOff=function(a){this.closeDropdown(),this.trigger("uiGeoPickerTurnOff")},this.changeLocation=function(a,b){var c=this.select("querySelector").val(),d=b.placeId,e=b.placeName,f=b.resultType==="search",g=b.placeOffset;this.closeDropdown();if(!d||d===this.lastPlaceId)return;this.lastGeoPlace&&(this.discardLastGeoPlace(),this.lastGeoPlace={place_name:e,place_id:d,offset:g,is_autotag:!1,query:c!==""?c:null,source:f?"search":"default",last_interaction_time:(new Date).getTime()});var h={placeId:d,scribeData:{items:[{name:d}]}};this.lastPlaceId&&h.scribeData.items.push({name:this.lastPlaceId}),f&&this.lastQueryData&&(h.scribeData.query=this.lastQueryData.query),this.trigger("uiGeoPickerChange",h)},this.updateState=function(a,b){this.geoState=b,this.showGeoState()},this.showGeoState=function(){var a="",b="",c="",d=!1,e=!1,f="",g=this.geoState;switch(g.state){case"enabling":this.select("buttonSelector").removeClass(this.attr.disabledClass);case"locating":a=_('Getting location...');break;case"enableIsUnavailable":case"locateIsUnavailable":a=_('Location service unavailable');break;case"changing":a=_('Changing location...');break;case"locationUnknown":a=_('Unknown location');break;case"located":a=g.place_name,c=g.place_id,f=g.places_html;var h=uniqueId();f+=template["geo/turn_off_location"].render({id:h}),d=!0,e=!0,this.initializeGeoScribeData(g);break;case"enabledTurnedOff":this.discardLastGeoPlace();break;case"disabled":e=!0,this.disable(),a=_('Location disabled')}b=a||_('Add location'),this.attr.isMinimalButtonLabels?a=a||_('Location'):a=a||_('Add location'),this.$node.toggleClass("active",d),this.select("buttonSelector").toggleClass("enabled",d).toggleClass("js-dropdown-toggle",e).attr("aria-haspopup",e),this.select("statusSelector").text(a),this.select("buttonSelector").attr("data-original-title",b),this.select("placeResultsSelector").add(this.select("searchResultsSelector")).remove(),this.select("dropdownStatusSelector").text(a).toggle(!d),this.select("dropdownSelector").html(f),this.select("placeIdSelector").val(c),this.lastPlaceId=c,this.applyAriaAttrsToResultsAndAnnounceNumResults()},this.initializeGeoScribeData=function(a){this.geoDetails||this.resetGeoDetails(),(!this.lastGeoPlace||!this.lastGeoPlace.place_id)&&a.place_id&&(this.lastGeoPlace={place_name:a.place_name,place_id:a.place_id,source:"default",is_autotag:!0,last_interaction_time:(new Date).getTime()})},this.resetGeoDetails=function(){this.geoDetails={interacted_poi_list:!1,interacted_server_search:!1,geo_place_details:[]}},this.discardLastGeoPlace=function(){this.lastGeoPlace&&this.lastGeoPlace.place_id&&(this.lastGeoPlace.state="discarded",this.geoDetails.geo_place_details.push(this.lastGeoPlace),this.lastGeoPlace={})},this.sendTweetScribeData=function(a){if(!this.geoDetails)return;this.lastGeoPlace&&this.lastGeoPlace.place_id&&(this.lastGeoPlace.state="geotag",this.geoDetails.geo_place_details.push(this.lastGeoPlace));var b={scribeData:{items:[{item_type:scribeItemTypes.geoDetails,geo_details:this.geoDetails}]}};this.trigger("uiGeoPickerSendTweet",b),this.resetGeoDetails(),this.lastGeoPlace={}},this.requestGeoState=function(){this.trigger("uiRequestGeoState")},this.searchIfQueryChanged=function(a){var b=this.select("querySelector").val()||"";if(a&&this.lastQuery===b)return;this.geoDetails.interacted_server_search||(this.geoDetails.interacted_server_search=!0),this.lastIsPrefix=a,this.lastQuery=b,this.select("dropdownStatusSelector").text(_('Searching places...')).show(),this.geoQueryFieldChanged||(this.geoQueryFieldChanged=!0,this.trigger("uiGeoPickerInteraction")),this.trigger("uiGeoPickerSearch",{placeId:this.lastPlaceId,query:b,isPrefix:a})},this.searchExactMatch=function(){this.searchIfQueryChanged(!1)},this.searchAutocomplete=function(){setTimeout(function(){this.searchIfQueryChanged(!0)}.bind(this),0)},this.searchResults=function(a,b){var c=b.sourceEventData;if(!c||c.placeId!==this.lastPlaceId||c.query!==this.select("querySelector").val()||c.isPrefix&&!this.lastIsPrefix)return;this.lastQueryData=c,this.select("searchResultsSelector").remove(),this.select("dropdownStatusSelector").hide(),this.select("dropdownSelector").prepend(b.html),this.applyAriaAttrsToResultsAndAnnounceNumResults()},this.searchUnavailable=function(a,b){this.select("dropdownStatusSelector").text(_('Location service unavailable')).show()},this.disable=function(){this.select("buttonSelector").addClass(this.attr.disabledClass).addClass("js-dropdown-toggle").attr("aria-haspopup",!0).attr("data-original-title",_('Location disabled')),this.select("statusSelector").text(_('Location disabled'))},this.after("initialize",function(){utils.push(this.attr,{eventData:{scribeContext:{element:"geo_picker"}}},!1),this.geoState={},this.skipFocusManager=!0;var a=this.$node.closest(this.attr.parentSelector);this.on(a,"uiComposerActive uiPrepareGeoPicker",this.requestGeoState),this.on(a,"uiTweetSent",this.sendTweetScribeData),this.on(document,"dataGeoState",this.updateState),this.on(document,"dataGeoSearchResults",this.searchResults),this.on(document,"dataGeoSearchResultsUnavailable",this.searchUnavailable),this.on("uiDropdownOpenRequested",this.selectGeoAction),this.on("click",{buttonSelector:this.selectGeoAction,enableButtonSelector:this.enable,notNowButtonSelector:this.closeDropdown,turnOffButtonSelector:this.turnOff,geoSearchSelector:this.searchExactMatch}),this.on("mousedown",{buttonSelector:this.preventFocusLoss}),this.on("uiGeoSearchSelect",{turnOffButtonSelector:this.turnOff}),this.on("uiGeoPickerOpen uiGeoPickerOffer",this.prepare),this.on("uiGeoSearchEnter",this.searchExactMatch),this.on("uiGeoSearchChangeLocation",this.changeLocation),this.on("uiGeoSearchAutocomplete",this.searchAutocomplete)})}var _=require("core/i18n"),defineComponent=require("core/component"),scribeItemTypes=require("app/utils/scribe_item_types"),template=require("template"),uniqueId=require("app/utils/unique_id"),utils=require("core/utils"),withGeoSearchDropdown=require("app/ui/with_geo_search_dropdown");module.exports=defineComponent(withGeoSearchDropdown,geoPicker)
  });
  define("app/ui/compose/tweet_box_manager",["module","require","exports","app/ui/compose/tweet_box","app/ui/compose/dm_composer","app/ui/geo_picker","core/component","app/ui/compose/with_rich_editor"],function(module, require, exports) {
  function tweetBoxManager(){this.defaultAttrs({maxTweetComposeCharacters:140,composeIgnoreAttachmentText:!1}),this.createTweetBoxAtTarget=function(a,b){this.createTweetBox(a.target,b)},this.createTweetBox=function(a,b){var c=$(a);if(!((b.eventData||{}).scribeContext||{}).component)throw new Error("Please specify scribing component for tweet box.");c.find(".geo-picker").length>0&&GeoPicker.attachTo(c.find(".geo-picker"),b,{parentSelector:".tweet-form",isMinimalButtonLabels:c.hasClass("is-minimalButtonLabels"),restoreFocusOnClose:!0,skipFocusManager:!0});var d=c.find("div.rich-editor").length>0?[withRichEditor]:[],e=(b.dmOnly?DmComposer:TweetBox).mixin.apply(this,d),f={typeaheadData:this.attr.typeaheadData,maxLength:b.maxLength||this.attr.maxTweetComposeCharacters,warnLength:b.warnLength||this.attr.maxTweetComposeCharacters-20,superwarnLength:b.superwarnLength||this.attr.maxTweetComposeCharacters-10,countUp:this.attr.maxTweetComposeCharacters>140,ignoreAttachmentText:this.attr.composeIgnoreAttachmentText||this.attr.maxTweetComposeCharacters>140,hashflagsEnabled:!b.dmOnly};e.attachTo(c,f,b)},this.after("initialize",function(){this.on("uiInitTweetbox",this.createTweetBoxAtTarget)})}var TweetBox=require("app/ui/compose/tweet_box"),DmComposer=require("app/ui/compose/dm_composer"),GeoPicker=require("app/ui/geo_picker"),defineComponent=require("core/component"),withRichEditor=require("app/ui/compose/with_rich_editor"),TweetBoxManager=defineComponent(tweetBoxManager);module.exports=TweetBoxManager
  });
  define("app/boot/tweet_boxes",["module","require","exports","app/data/geo","app/data/found_media","app/data/tweet","app/ui/tweet_dialog","app/ui/new_tweet_button","app/data/tweet_box_scribe","app/ui/compose/tweet_box_manager"],function(module, require, exports) {
  function initialize(a){GeoData.attachTo(document,a),FoundMediaData.attachTo(document,a),TweetData.attachTo(document,a),TweetDialog.attachTo("#global-tweet-dialog",{autoplayDisabled:a.autoplayDisabled,environment:a.environment}),NewTweetButton.attachTo("#global-new-tweet-button",{eventData:{scribeContext:{component:"top_bar",element:"tweet_button"}}}),TweetBoxScribe.attachTo(document,a),TweetBoxManager.attachTo(document,a)}var GeoData=require("app/data/geo"),FoundMediaData=require("app/data/found_media"),TweetData=require("app/data/tweet"),TweetDialog=require("app/ui/tweet_dialog"),NewTweetButton=require("app/ui/new_tweet_button"),TweetBoxScribe=require("app/data/tweet_box_scribe"),TweetBoxManager=require("app/ui/compose/tweet_box_manager");module.exports=initialize
  });
  define("app/utils/storage/clear",["module","require","exports","app/utils/storage/core","app/utils/promises"],function(module, require, exports) {
  function clearAll(a){return Promise.collect([clearStorage(),clearIndexedDBs(a||window.globalIndexedDBs||{})])}function clearStorage(){var a=$.Deferred();try{storage.clearAll(),a.resolve()}catch(b){a.reject(b)}return a.promise()}function clearIndexedDBs(a){var b=Object.keys(a).map(function(b){var c=a[b];return(c.clear||c.clearAllObjectStores).call(c)});return Promise.collect(b)}var storage=require("app/utils/storage/core"),Promise=require("app/utils/promises");module.exports=clearAll
  });
  define("app/ui/user_dropdown",["module","require","exports","core/component","app/ui/with_dropdownmenu","app/utils/storage/clear"],function(module, require, exports) {
  function userDropdown(){this.defaultAttrs({feedbackLinkSelector:".feedback-callout-link"}),this.clearStorage=function(){return ClearStorage()},this.signout=function(){this.clearStorage().always(function(){this.$signoutForm.submit()}.bind(this))},this.showKeyboardShortcutsDialog=function(a,b){this.trigger(document,"uiOpenKeyboardShortcutsDialog"),a.preventDefault()},this.showConversationNotification=function(a,b){this.unreadThreads=b.threads,this.$node.addClass(this.attr.glowClass),this.$dmCount.addClass(this.attr.glowClass).text(b.threads.length)},this.openFeedbackDialog=function(a,b){this.closeDropdown(),this.trigger("uiPrepareFeedbackDialog",{})},this.updateConversationNotication=function(a,b){var c=$.inArray(b.recipient,this.unreadThreads);if(c===-1)return;this.unreadThreads.splice(c,1);var d=parseInt(this.$dmCount.text(),10)-1;d?this.$dmCount.text(d):(this.$node.removeClass(this.attr.glowClass),this.$dmCount.removeClass(this.attr.glowClass).text(""))},this.after("initialize",function(){this.unreadThreads=[],this.$signoutForm=this.select("signoutForm"),this.on(this.attr.keyboardShortcuts,"click",this.showKeyboardShortcutsDialog),this.on(this.attr.feedbackLinkSelector,"click",this.openFeedbackDialog),this.$dmCount=this.select("dmCount"),this.on(this.attr.signout,"click",this.signout),this.on(document,"uiDMDialogOpenedConversation",this.updateConversationNotication),this.on(document,"uiDMDialogHasNewConversations",this.showConversationNotification),this.on(document,"click",this.close),this.on(document,"uiNavigate",this.close)})}var defineComponent=require("core/component"),withDropdownMenu=require("app/ui/with_dropdownmenu"),ClearStorage=require("app/utils/storage/clear"),UserDropdown=defineComponent(userDropdown,withDropdownMenu);module.exports=UserDropdown
  });
  define("app/ui/form_ui_metrics",["module","require","exports","core/component","app/utils/cookie","app/utils/ui_metrics"],function(module, require, exports) {
  function formUiMetrics(){this.defaultAttrs({usernameSelector:'input[name="user[screen_name]"]',uiMetricsSelector:'input[name="signup_ui_metrics"]',uiMetricsSeedSelector:"#ui_metrics",uiMetricsSeedIsInput:!1}),this.formSubmit=function(a){var b=this.attr.uiMetricsSeedIsInput?this.$uiMetricsSeed.val():this.$uiMetricsSeed.text(),c=parseInt(b,10);isNaN(c)&&(c=0),this.$uiMetrics.val(uiMetrics.y(cookie("guest_id"),this.$username.val(),c))},this.after("initialize",function(){this.$uiMetrics=this.select("uiMetricsSelector");if(this.$uiMetrics.length===0||!uiMetrics.y||!uiMetrics.i)return;this.$uiMetricsSeed=this.select("uiMetricsSeedSelector"),this.$uiMetrics=this.select("uiMetricsSelector"),this.$username=this.select("usernameSelector"),this.on("submit",this.formSubmit),uiMetrics.i()})}var defineComponent=require("core/component"),cookie=require("app/utils/cookie"),uiMetrics=require("app/utils/ui_metrics");module.exports=defineComponent(formUiMetrics)
  });
  define("app/ui/signin_dropdown",["module","require","exports","core/component","app/ui/with_dropdown","app/ui/form_ui_metrics"],function(module, require, exports) {
  function signinDropdown(){this.defaultAttrs({usernameSelector:".email-input",dialogContainerSelector:".signin-dialog-body"}),FormUiMetrics.attachTo(".js-signin",{usernameSelector:'input[name="session[username_or_email]"]',uiMetricsSelector:'input[name="ui_metrics"]',uiMetricsSeedSelector:"#ui_metrics_seed",uiMetricsSeedIsInput:!0}),this.focusUsername=function(){this.applyARIADialogAttrs(),this.select("usernameSelector").focus()},this.applyARIADialogAttrs=function(){this.select("dropDownMenuSelector").attr({role:"dialog","aria-hidden":!1,"aria-labelledby":"signin-form-legend"})},this.toggleARIAHiddenRole=function(){this.select("dropDownMenuSelector").attr("aria-hidden",!0)},this.after("initialize",function(){this.on("uiDropdownOpened",this.focusUsername),this.on("uiDropdownClosed",this.toggleARIAHiddenRole)})}var defineComponent=require("core/component"),withDropdown=require("app/ui/with_dropdown"),FormUiMetrics=require("app/ui/form_ui_metrics"),SigninDropdown=defineComponent(signinDropdown,withDropdown);module.exports=SigninDropdown
  });
  define("app/utils/animate_window_scrolltop",["module","require","exports"],function(module, require, exports) {
  function getScrollEl(){return $("body").hasClass("overlay-enabled")?$(".PermalinkOverlay"):scrollEl?scrollEl:([document.body,document.documentElement].forEach(function(a){var b=a.scrollTop,c=b>0?b-1:b+1;a.scrollTop=c,a.scrollTop==c&&(scrollEl=a.tagName.toLowerCase(),a.scrollTop=b)}),scrollEl)}var scrollEl;module.exports=function(a,b,c){$(getScrollEl()).animate({scrollTop:a},b,c)}
  });
  define("app/ui/global_nav",["module","require","exports","core/component","app/utils/full_path","app/utils/animate_window_scrolltop"],function(module, require, exports) {
  function globalNav(){this.defaultAttrs({activeClass:"active",newClass:"new",newCountClass:"new-count",maxCountClass:"max",nav:"li",notificationsNav:"li.notifications",meNav:"li.profile",navLinkSelector:"li > a",linkSelector:"a",notificationsCountSelector:"li.people .count",notificationsCountInnerSelector:"li.people .count .count-inner",maxCountValue:99,dynamicTooltipSelector:".js-dynamic-tooltip"}),this.updateActive=function(a,b){b&&(this.select("nav").removeClass(this.attr.activeClass),this.select("nav").filter("[data-global-action="+b.section+"]").addClass(this.attr.activeClass),this.removeGlowFromActive())},this.isNotificationsActive=function(){return this.select("notificationsNav").hasClass(this.attr.activeClass)},this.updateNotificationsCount=function(a,b){b&&b.count&&typeof b.count=="number"&&b.count>0&&!this.isNotificationsActive()?this.setNotificationsCount(b.localized_count):this.clearBadgeAndNotificationsCount()},this.setNotificationsCount=function(a){var b=this.select("notificationsCountSelector"),c=this.select("notificationsCountInnerSelector"),d=a>this.attr.maxCountValue;d&&(a=this.attr.maxCountValue+"+"),b.toggleClass(this.attr.maxCountClass,d),c.text(a),b.addClass(this.attr.newCountClass)},this.clearBadgeAndNotificationsCount=function(){var a=this.select("notificationsCountSelector");a.removeClass(this.attr.newCountClass),a.removeClass(this.attr.maxCountClass)},this.addGlowToActive=function(){this.$node.find("."+this.attr.activeClass).addClass(this.attr.newClass)},this.addGlowToMe=function(){this.select("meNav").addClass(this.attr.newClass)},this.removeGlowFromActive=function(){this.$node.find("."+this.attr.activeClass).not(this.attr.meNav).removeClass(this.attr.newClass)},this.removeGlowFromMe=function(){this.select("meNav").removeClass(this.attr.newClass)},this.scrollToTopLink=function(a){var b=$(a.target).closest(this.attr.linkSelector);b.attr("href")==fullPath()&&(a.preventDefault(),b.blur(),this.scrollToTop())},this.topBarBirdClick=function(){this.scrollToTop({wasTopBarBirdClick:!0})},this.scrollToTop=function(a){animateWinScrollTop(0,"fast"),this.trigger(document,"uiGotoTopOfScreen",a||{})},this.addTooltip=function(a,b){var c=$(b.el),d=c.find(".text");d.width()==1&&!c.attr("data-original-title")&&(d.addClass("u-hiddenVisually"),c.attr({"data-original-title":d.text().trim()}))},this.removeTooltip=function(a,b){var c=$(b.el),d=c.find(".text");c.attr("data-original-title")&&(d.removeClass("u-hiddenVisually"),c.removeAttr("data-original-title"))},this.after("initialize",function(){this.on(document,"uiAddPageCount",this.addGlowToActive),this.on(document,"uiHasInjectedNewTimeline",this.removeGlowFromActive),this.on(document,"uiUpdateConnectBadge",this.updateNotificationsCount),this.on(document,"dataPageRefresh",this.updateActive),this.on(".bird-topbar-etched","click",this.topBarBirdClick),this.on("click",{navLinkSelector:this.scrollToTopLink}),this.on("mouseover focusin",{dynamicTooltipSelector:this.addTooltip}),this.on("mouseout focusout",{dynamicTooltipSelector:this.removeTooltip})})}var defineComponent=require("core/component"),fullPath=require("app/utils/full_path"),animateWinScrollTop=require("app/utils/animate_window_scrolltop"),GlobalNav=defineComponent(globalNav);module.exports=GlobalNav
  });
  define("app/ui/dm/dm_envelope",["module","require","exports","core/component"],function(module, require, exports) {
  function dmEnvelope(){this.defaultAttrs({directMessagesSelector:".global-dm-nav",msgCounterSelector:".dm-new .count-inner",newMsgClass:"new",singleCount:"with-count",doubleCount:"with-count-2",tripleCount:"with-count-3"}),this.addGlowToEnvelope=function(a,b){this.select("directMessagesSelector").addClass(this.attr.newMsgClass)},this.removeGlowFromEnvelope=function(a,b){this.select("directMessagesSelector").removeClass(this.attr.newMsgClass)},this.addCountToEnvelope=function(a,b){var c=parseInt(b.msgCount,10);if(isNaN(c))return;var d=[this.attr.singleCount];c>9&&d.push(this.attr.doubleCount),c>99&&d.push(this.attr.tripleCount),this.removeCountFromEnvelope(a,c),this.select("directMessagesSelector").addClass(d.join(" ")),this.select("directMessagesSelector").find(this.attr.msgCounterSelector).text(c)},this.removeCountFromEnvelope=function(a,b){this.select("directMessagesSelector").removeClass(this.attr.singleCount+" "+this.attr.doubleCount+" "+this.attr.tripleCount)},this.after("initialize",function(){this.on(document,"dataUserHasUnreadDMs dataUserHasUnreadDMsWithCount",this.addGlowToEnvelope),this.on(document,"dataUserHasNoUnreadDMs dataUserHasNoUnreadDMsWithCount",this.removeGlowFromEnvelope),this.on(document,"dataUserHasUnreadDMsWithCount",this.addCountToEnvelope),this.on(document,"dataUserHasNoUnreadDMsWithCount",this.removeCountFromEnvelope)})}var defineComponent=require("core/component"),DMEnvelope=defineComponent(dmEnvelope);module.exports=DMEnvelope
  });
  define("app/ui/with_navigation_links_scribing",["module","require","exports"],function(module, require, exports) {
  module.exports=function(){this.defaultAttrs({navSelector:"a[data-nav]:not(.js-nonNavigable)"}),this.navEvent=function(a,b){var c=$(b.el);this.trigger("uiNavigationLinkClick",{scribeContext:{element:c.attr("data-nav")},url:c.attr("href")})},this.after("initialize",function(a){this.on("click",{navSelector:this.navEvent})})}
  });
  define("app/ui/navigation_links",["module","require","exports","core/component","app/ui/with_navigation_links_scribing"],function(module, require, exports) {
  var defineComponent=require("core/component"),withNavigationLinks=require("app/ui/with_navigation_links_scribing");module.exports=defineComponent(withNavigationLinks)
  });
  define("app/ui/search_input",["module","require","exports","core/component"],function(module, require, exports) {
  function searchInput(){this.defaultAttrs({magnifyingGlassSelector:".js-search-action",inputFieldSelector:"#search-query",searchBoxQuery:"",searchPathWithQuery:"/search?q=query&src=typd",focusClass:"focus"}),this.addFocusStyles=function(a){this.$node.addClass(this.attr.focusClass),this.$input.addClass(this.attr.focusClass),this.trigger("uiSearchInputFocused")},this.removeFocusStyles=function(a){this.$node.removeClass(this.attr.focusClass),this.$input.removeClass(this.attr.focusClass)},this.executeTypeaheadSelection=function(a,b){b.source!="account"&&this.$input.val(b.display);if(b.isClick)return;this.trigger("uiNavigate",{href:b.href}),this.$input.blur()},this.submitQuery=function(a,b){this.trigger("uiSearchQuery",{query:b.query,source:"search"}),this.trigger("uiNavigate",{href:this.attr.searchPathWithQuery.replace("query",encodeURIComponent(b.query))}),this.$input.blur()},this.searchFormSubmit=function(a,b){a.preventDefault(),this.trigger(this.$input,"uiTypeaheadInputSubmit")},this.after("initialize",function(){this.$input=this.select("inputFieldSelector"),this.$input.val(this.attr.searchBoxQuery),this.on("uiTypeaheadItemSelected",this.executeTypeaheadSelection),this.on("uiTypeaheadSubmitQuery",this.submitQuery),this.on(this.$input,"focus",this.addFocusStyles),this.on(this.$input,"blur",this.removeFocusStyles),this.on("submit",this.searchFormSubmit),this.on(this.select("magnifyingGlassSelector"),"click",this.searchFormSubmit)})}var defineComponent=require("core/component");module.exports=defineComponent(searchInput)
  });
  define("app/data/search_input_scribe",["module","require","exports","core/component","app/data/with_scribe","app/utils/scribe_item_types"],function(module, require, exports) {
  function searchInputScribe(){var a={account:function(a){var b={message:a.input,items:[{id:a.query,item_type:itemTypes.user,position:a.index}],format_version:2,event_info:a.item?a.item.origin:undefined};this.scribe("profile_click",a,b)},search:function(b){if(this.lastCompletion&&b.query===this.lastCompletion.query)a.topics.call(this,this.lastCompletion);else{var c={items:[{item_query:b.query,item_type:itemTypes.search}],format_version:2};this.scribe("search",b,c)}},topics:function(a){var b={message:a.input,items:[{item_query:a.query,item_type:itemTypes.search,position:a.index}],format_version:2};this.scribe("search",a,b)},account_search:function(a){this.scribe("people_search",a,{query:a.input})},saved_search:function(a){var b={message:a.input,items:[{item_query:a.query,item_type:itemTypes.savedSearch,position:a.index}],format_version:2};this.scribe({element:"saved_search",action:"search"},a,b)},recent_search:function(a){var b={message:a.input,items:[{item_query:a.query,item_type:itemTypes.search,position:a.index}],format_version:2};this.scribe({element:"recent_search",action:"search"},a,b)},concierge:function(a){var b={message:a.input,items:[{item_query:a.query,item_type:itemTypes.search,position:a.index}],format_version:2};this.scribe({element:"typeahead_concierge",action:"search"},a,b)}};this.storeCompletionData=function(a,b){a.type=="uiTypeaheadItemSelected"||a.type=="uiSearchQuery"?this.scribeSelection(a,b):b.fromSelectionEvent||(this.lastCompletion=b)},this.scribeSelection=function(b,c){a[c.source]&&a[c.source].call(this,c)},this.after("initialize",function(){this.scribeOnEvent("uiSearchInputFocused","focus_field"),this.on("uiTypeaheadItemComplete uiTypeaheadItemSelected uiSearchQuery",this.storeCompletionData)})}var defineComponent=require("core/component"),withScribe=require("app/data/with_scribe"),itemTypes=require("app/utils/scribe_item_types");module.exports=defineComponent(searchInputScribe,withScribe)
  });
  define("app/ui/login_form",["module","require","exports","core/component"],function(module, require, exports) {
  function loginForm(){this.defaultAttrs({forgotPasswordLinkSelector:".forgot",accountIdentifierInputSelector:'[name="session[username_or_email]"]'}),this.navigateToPasswordReset=function(a){a.stopPropagation(),a.preventDefault();var b=this.$accountIdentifierInput.val(),c=b?"?account_identifier="+encodeURIComponent(b):"";this.trigger("uiNavigate",{href:this.forgotPasswordHref+c})},this.after("initialize",function(){this.$accountIdentifierInput=this.select("accountIdentifierInputSelector"),this.forgotPasswordHref=this.select("forgotPasswordLinkSelector").attr("href"),this.on("click",{forgotPasswordLinkSelector:this.navigateToPasswordReset})})}var defineComponent=require("core/component");module.exports=defineComponent(loginForm)
  });
  define("app/ui/top_bar",["module","require","exports","core/component"],function(module, require, exports) {
  function topBar(){this.defaultAttrs({backgroundShiftSelector:"body",alertsSelector:".alert-messages"}),this.handleBannerChange=function(a,b){var c=$(this.attr.backgroundShiftSelector).css("background-position");if(c&&$(this.attr.backgroundShiftSelector).css("background-image")!="none"){var d=c.split(" ")[0],e=parseInt(c.split(" ")[1]);$(this.attr.backgroundShiftSelector).css("background-position",d+" "+(e-$(a.target).outerHeight())+"px")}$(this.attr.alertsSelector).css("top","-="+$(a.target).outerHeight())},this.adjustBackgroundInitially=function(){var a=$(this.attr.backgroundShiftSelector).css("background-position");if(a&&$(this.attr.backgroundShiftSelector).css("background-image")!="none"){var b=a.split(" ")[0],c=a.split(" ")[1];$(this.attr.backgroundShiftSelector).css("background-position",b+" "+(this.$node.innerHeight()-1)+"px")}$(this.attr.alertsSelector).css("top",this.$node.innerHeight()-1)},this.after("initialize",function(){this.on(document,"uiBannerDismissed",this.handleBannerChange),this.on(document,"uiSwiftLoaded uiPageChanged",this.adjustBackgroundInitially)})}var defineComponent=require("core/component");module.exports=defineComponent(topBar)
  });
  define("app/ui/macaw_nymizer_signin_conversion",["module","require","exports","core/component"],function(module, require, exports) {
  function macawNymizerSigninConversion(){this.defaultAttrs({signinSelector:".signin-wrapper, .js-front-signin, .signin-dialog-body"}),this.signinConversion=function(){this.trigger("MNConversion",{mnType:"signin"})},this.after("initialize",function(){this.on("submit",{signinSelector:this.signinConversion})})}var defineComponent=require("core/component"),MacawNymizerSigninConversion=defineComponent(macawNymizerSigninConversion);module.exports=MacawNymizerSigninConversion
  });
  define("app/boot/top_bar",["module","require","exports","app/boot/tweet_boxes","app/ui/user_dropdown","app/ui/signin_dropdown","app/ui/global_nav","app/ui/dm/dm_envelope","app/ui/navigation_links","app/ui/typeahead/typeahead_dropdown","app/ui/typeahead/typeahead_input","app/ui/search_input","app/data/search_input_scribe","app/ui/login_form","app/ui/form_ui_metrics","app/ui/top_bar","core/utils","app/ui/macaw_nymizer_signin_conversion"],function(module, require, exports) {
  function initialize(a){GlobalNav.attachTo(".global-nav",{noTeardown:!0}),DMEnvelope.attachTo(".dm-nav",{noTeardown:!0}),SearchInput.attachTo("#global-nav-search",utils.merge(a,{eventData:{scribeContext:{component:"top_bar_searchbox",element:""}}})),SearchInputScribe.attachTo("#global-nav-search",{noTeardown:!0});var b=[["recentSearches",["recentSearches"]],["savedSearches",["savedSearches"]],["topics",["topics"]],["accounts",["accounts"]]];a.typeaheadData.accountsOnTop&&(b=[["recentSearches",["recentSearches"]],["savedSearches",["savedSearches"]],["accounts",["accounts"]],["topics",["topics"]]]),TypeaheadInput.attachTo("#global-nav-search"),TypeaheadDropdown.attachTo("#global-nav-search",{datasourceRenders:b,accountsShortcutShow:!0,autocompleteAccounts:!1,parseHashflags:!0,typeaheadSrc:"SEARCH_BOX",deciders:utils.merge(a.typeaheadData,{showSocialContext:a.typeaheadData.showSearchAccountSocialContext}),eventData:{scribeContext:{component:"top_bar_searchbox",element:"typeahead"}}}),a.loggedIn?(tweetBoxes(a),UserDropdown.attachTo("#user-dropdown",{noTeardown:!0,signout:"#signout-button",signoutForm:"#signout-form",keyboardShortcuts:".js-keyboard-shortcut-trigger",dmCount:".js-direct-message-count",glowClass:"new"})):(a.passwordResetAdvancedLoginForm&&(LoginForm.attachTo(".signin-dialog-body"),FormUiMetrics.attachTo(".signin-dialog-body",{usernameSelector:'input[name="session[username_or_email]"]',uiMetricsSelector:'input[name="ui_metrics"]',uiMetricsSeedSelector:"#ui_metrics_seed",uiMetricsSeedIsInput:!0})),SigninDropdown.attachTo(".js-session")),NavigationLinks.attachTo(".global-nav",{noTeardown:!0,eventData:{scribeContext:{component:"top_bar"}}}),TopBar.attachTo(".topbar"),MacawNymizerSigninConversion.attachTo(".signin-dialog-body")}var tweetBoxes=require("app/boot/tweet_boxes"),UserDropdown=require("app/ui/user_dropdown"),SigninDropdown=require("app/ui/signin_dropdown"),GlobalNav=require("app/ui/global_nav"),DMEnvelope=require("app/ui/dm/dm_envelope"),NavigationLinks=require("app/ui/navigation_links"),TypeaheadDropdown=require("app/ui/typeahead/typeahead_dropdown"),TypeaheadInput=require("app/ui/typeahead/typeahead_input"),SearchInput=require("app/ui/search_input"),SearchInputScribe=require("app/data/search_input_scribe"),LoginForm=require("app/ui/login_form"),FormUiMetrics=require("app/ui/form_ui_metrics"),TopBar=require("app/ui/top_bar"),utils=require("core/utils"),MacawNymizerSigninConversion=require("app/ui/macaw_nymizer_signin_conversion");module.exports=initialize
  });
  define("app/data/metrics_token_scribe",["module","require","exports","core/component"],function(module, require, exports) {
  function metricsTokenScribe(){this.defaultAttrs({scribeContext:{},path:"https://syndication.twitter.com/i/jot/syndication",baseParam:"l",category:"syndicated_impression"}),this.scribeMetricsTokenImpression=function(){var a={};a._category_=this.attr.category,a.event_namespace=$.extend({},this.attr.scribeContext,{action:"impression"}),a.triggered_on=+(new Date),this.send(a)},this.generateUrl=function(a){return this.attr.path+"?"+this.attr.baseParam+"="+encodeURIComponent(JSON.stringify(a))},this.send=function(a){(new Image).src=this.generateUrl(a)},this.after("initialize",function(){this.on("uiSwiftLoaded uiPageChanged",this.scribeMetricsTokenImpression)})}var defineComponent=require("core/component");module.exports=defineComponent(metricsTokenScribe)
  });
  define("app/data/with_boot_with_teardown_context",["module","require","exports","core/registry"],function(module, require, exports) {
  function withBootWithTeardownContext(){this.bootWithTeardownContext=function(a,b,c){var d=registry.addInstance;c&&(registry.addInstance=function(a){a.teardownContext=c,d.call(registry,a)}),a(b),registry.addInstance=d}}var registry=require("core/registry");module.exports=withBootWithTeardownContext
  });
  define("app/ui/overlay_navigation",["module","require","exports","core/component","app/data/with_boot_with_teardown_context","app/utils/full_path","app/utils/push_state_enabled"],function(module, require, exports) {
  function overlayNavigation(){this.defaultAttrs({pushState:!0}),this.overlayNavigate=function(a,b){b&&b.impressionCookie&&this.trigger("uiSendImpressionCookie",b),this.trigger(document,"uiPauseAllMedia"),this.trigger("uiOverlayOpen"),this.trigger("uiOverlayNeedsPage",b),this.teardownOverlay()},this.updateOverlay=function(a,b){this.trigger("uiOverlayUpdate",{html:b.page}),this.loadModule(b)},this.updateOverlayAndTitle=function(a,b){this.updateOverlay(a,b),this.trigger("uiUpdatePageTitle",{title:b.title}),b.canonical_url&&$('link[rel="canonical"]').attr("href",b.canonical_url)},this.loadModule=function(a){using(a.module,function(b){var c="overlay";a.init_data.inOverlay=!0,this.bootWithTeardownContext(b,a.init_data,c),this.trigger("uiOverlayPageChanged",a)}.bind(this))},this.rollback=function(a,b){b.rollbackCount>0?(this.isRollback=!0,history.go(-b.rollbackCount)):delete this.isRollback},this.navigateBack=function(a,b){history.go(-1)},this.handlePopstate=function(a,b){var c=b.state&&b.state.inOverlay;this.isRollback?(a.preventDefault(),this.trigger("uiDidRollback",b),delete this.isRollback):c&&(a.preventDefault(),this.trigger("uiOverlayNavigate",{isPopState:!0,href:fullPath()}))},this.updatePageTitle=function(){this.trigger("uiUpdatePageTitle",{title:history.state&&history.state.title}),this.trigger("uiPageNeedsCount")},this.handleUpdatePageCount=function(a,b){history.state&&history.state.inOverlay&&a.preventDefault()},this.teardownOverlay=function(){this.trigger("uiTeardown",{teardownContext:"overlay"})},this.after("initialize",function(){this.on("uiOverlayNavigate",this.overlayNavigate),this.on("uiOverlayClosedByRequest",this.teardownOverlay),pushStateEnabled(this.attr.pushState)?(this.on("dataOverlayPageSuccess",this.updateOverlayAndTitle),this.on("dataNeedsRollback",this.rollback),this.on("uiOverlayNavigateBack",this.navigateBack),this.on(document,"uiPopStateNavigate",this.handlePopstate),this.on("uiDidRollback",this.updatePageTitle),this.on(document,"uiUpdatePageCount",this.handleUpdatePageCount)):this.on("dataOverlayPageSuccess",this.updateOverlay)})}var defineComponent=require("core/component"),withBootWithTeardownContext=require("app/data/with_boot_with_teardown_context"),fullPath=require("app/utils/full_path"),pushStateEnabled=require("app/utils/push_state_enabled");module.exports=defineComponent(overlayNavigation,withBootWithTeardownContext)
  });
  define("app/data/overlay_navigation",["module","require","exports","core/component","app/data/with_data","app/utils/full_path","app/data/with_rollback_count","core/utils","app/utils/push_state_enabled"],function(module, require, exports) {
  function overlayNavigation(){this.defaultAttrs({pushState:!0,currentPageName:"",underlyingSectionName:"",statsName:"permalink_overlay"}),this.pushState=function(a,b){if(b.href!=fullPath()){var c={inOverlay:!0,rollbackCount:this.rollbackCount()+1};history.pushState(c,b.title,b.href)}this.rollbackCount()>1&&this.trigger("dataNeedsShowBackButton")},this.handlePageSuccess=function(a){a.init_data&&a.page&&a.module?(a.href=a.init_data.href,a.init_data.overlayCapable?(this.trigger("dataOverlayDoPushState",a),this.trigger("dataOverlayPageSuccess",a)):this.trigger("uiNavigate",{href:a.href})):this.handlePageError(a)},this.handlePageError=function(a){this.trigger("dataOverlayPageFailure",a)},this.getHeaders=function(){return{"X-Overlay-Request":!0,"X-Previous-Page-Name":this.currentPageName}},this.currentPageChanged=function(a,b){this.currentPageName=b.init_data.pageName,this.underlyingSectionName=b.init_data.sectionName},this.getPage=function(a,b){this.trigger("dataNeedsHideBackButton"),this.get({headers:this.getHeaders(),url:b.href,success:function(a){this.handlePageSuccess(utils.merge(a,{autoplay:b&&b.autoplay}))}.bind(this),error:this.handlePageError.bind(this)})},this.rollback=function(){this.trigger("dataNeedsRollback",{rollbackCount:this.rollbackCount()})},this.updateScribeSection=function(){this.trigger("dataUpdateScribeSection",{sectionName:this.underlyingSectionName})},this.after("initialize",function(){this.currentPageName=this.attr.currentPageName,this.underlyingSectionName=this.attr.underlyingSectionName,this.on("uiPageChanged",this.currentPageChanged),this.on("uiOverlayNeedsPage",this.getPage),pushStateEnabled(this.attr.pushState)&&(this.on("uiOverlayClosedByRequest",this.rollback),this.on("dataOverlayDoPushState",this.pushState)),this.on("uiOverlayClosed",this.updateScribeSection)})}var defineComponent=require("core/component"),withData=require("app/data/with_data"),fullPath=require("app/utils/full_path"),withRollbackCount=require("app/data/with_rollback_count"),utils=require("core/utils"),pushStateEnabled=require("app/utils/push_state_enabled");module.exports=defineComponent(overlayNavigation,withData,withRollbackCount)
  });
  define("app/ui/dialogs/permalink_overlay",["module","require","exports","core/component","app/ui/with_dialog","core/i18n"],function(module, require, exports) {
  function PermalinkOverlay(){this.defaultAttrs({spinnerSelector:".PermalinkOverlay-spinnerContainer",overlayEnabledClass:"overlay-enabled",overlayModalContainerSelector:".PermalinkOverlay",overlayModalClass:".PermalinkOverlay-modal",overlayModalContentSelector:".PermalinkOverlay-content",overlayModalBodySelector:".PermalinkOverlay-body",overlayDismissSelector:".PermalinkProfile-dismiss span",overlayRepliesSelector:".ThreadedPermalinkOverlay-replies",overlayNextSelector:".js-next",overlayPreviousSelector:".js-previous",moreItemsSelector:".has-more-items",threadedOverlaySelector:".ThreadedPermalinkOverlay",loadAtBootClass:"load-at-boot",topMargin:60,bottomMargin:60,noReposition:!0}),this.openOverlay=function(a,b){this.isOpen()||(this.showSpinner(),this.select("overlayModalBodySelector").empty(),this.open())},this.updateOverlay=function(a,b){this.hideSpinner(),this.select("overlayModalBodySelector").html(b.html),this.open(),this.select("overlayNextSelector").toggle(!!b.nextTweetUrl),this.select("overlayPreviousSelector").toggle(!!b.previousTweetUrl),this.nextTweetUrl=b.nextTweetUrl,this.previousTweetUrl=b.previousTweetUrl,this.setInitialFocus(),this.shouldResize()&&this.resizeOverlay()},this.shouldResize=function(){return!!this.select("threadedOverlaySelector").length},this.windowHeight=function(){return $(window).height()},this.resizeOverlay=function(){var a=this.$dialog.height()+this.attr.topMargin+this.attr.bottomMargin-this.windowHeight(),b=this.select("overlayRepliesSelector"),c=b.find(this.attr.moreItemsSelector),d=c?c.height():0,e=Math.max(a,d);e>0&&b.css("max-height",b.height()-e)},this.redirect=function(a){this.trigger("uiNavigate",{href:a})},this.possiblyCloseOverlay=function(a){if(this.$node.is(a.target)||this.select("overlayDismissSelector").is(a.target)||this.eventTriggeredByKeyboard(a)&&!this.isGalleryOpen())this.possiblyRedirectToProfile(),a.stopPropagation(),this.close(a)},this.possiblyRedirectToProfile=function(){this.loadAtBoot()&&(this.$node.removeClass(this.attr.loadAtBootClass),this.redirect(this.redirectPath()))},this.redirectPath=function(){return this.locationOrigin()+this.select("overlayModalBodySelector").attr("data-background-path")},this.locationOrigin=function(){return window.location.origin?window.location.origin:window.location.protocol+"//"+window.location.hostname+(window.location.port?":"+window.location.port:"")},this.handleNextTweetButton=function(a){this.nextTweetUrl&&this.trigger("uiOverlayNavigate",{href:this.nextTweetUrl})},this.handlePreviousTweetButton=function(a){this.previousTweetUrl&&this.trigger("uiOverlayNavigate",{href:this.previousTweetUrl})},this.empty=function(){this.select("overlayModalBodySelector").empty()},this.hideSpinner=function(){this.select("spinnerSelector").addClass("u-hidden")},this.showSpinner=function(){this.select("spinnerSelector").removeClass("u-hidden")},this.getScrollTop=function(a){return a.scrollTop()},this.trackScrollPosition=function(){this.overlayOffset=this.getScrollTop(this.select("overlayRepliesSelector"))},this.adjustScrollPosition=function(){this.select("overlayRepliesSelector").scrollTop(this.overlayOffset)},this.loadAtBoot=function(){return this.$node.hasClass(this.attr.loadAtBootClass)},this.handleFailure=function(a,b){this.close(),this.trigger("uiShowMessage",{message:b&&b.xhr.status=="404"?_('Tweet does not exist.'):_('Whoops! Something went wrong. Please try again!')})},this.after("initialize",function(){this.overlayOffset=0,this.on("click",{overlayNextSelector:this.handleNextTweetButton,overlayPreviousSelector:this.handlePreviousTweetButton}),this.on("click uiShortcutEsc",this.possiblyCloseOverlay),this.on("uiDialogClosed",this.empty),this.on("uiDialogClosed",this.possiblyRedirectToProfile),this.on("uiDialogClosed","uiOverlayClosed"),this.on("uiDialogClosedByRequest","uiOverlayClosedByRequest"),this.on(document,"uiDropdownOpened",this.trackScrollPosition),this.on(document,"uiDropdownFocused",this.adjustScrollPosition),this.on(document,"uiOverlayOpen",this.openOverlay),this.on(document,"uiOverlayClose",this.close),this.on(document,"uiOverlayUpdate",this.updateOverlay),this.on(document,"dataOverlayPageFailure",this.handleFailure),this.loadAtBoot()&&this.on("uiSwiftLoaded",this.open)})}var defineComponent=require("core/component"),withDialog=require("app/ui/with_dialog"),_=require("core/i18n");module.exports=defineComponent(withDialog,PermalinkOverlay)
  });
  define("app/data/permalink_overlay_scribe",["module","require","exports","core/component","app/data/with_scribe"],function(module, require, exports) {
  function permalinkOverlayScribe(){this.defaultAttrs({sectionName:"permalink_overlay"}),this.namespace=function(a,b){return{section:this.attr.sectionName,element:a,action:b}},this.after("initialize",function(){this.scribeOnEvent("uiOverlayUpdate",this.namespace(undefined,"show")),this.scribeOnEvent("uiOverlayClosed",this.namespace(undefined,"hide")),this.scribeOnEvent("uiOverlayCloseButtonClicked",this.namespace("close_button","click")),this.scribeOnEvent("uiOverlayNavigateBack",this.namespace("back_button","click")),this.scribeOnEvent("dataNeedsShowBackButton",this.namespace("back_button","impression"))})}var defineComponent=require("core/component"),withScribe=require("app/data/with_scribe");module.exports=defineComponent(permalinkOverlayScribe,withScribe)
  });
  define("app/boot/permalink_overlay",["module","require","exports","app/ui/overlay_navigation","app/data/overlay_navigation","app/ui/dialogs/permalink_overlay","app/data/permalink_overlay_scribe"],function(module, require, exports) {
  function initialize(a){if(a.permalinkOverlayEnabled||a.deciders.overlayPermalink||a.urlHasTweetId)PermalinkOverlay.attachTo(".PermalinkOverlay",{noTeardown:!0,modalEnabledClass:"overlay-enabled",modalSelector:".PermalinkOverlay-modal",modalContainerSelector:".PermalinkOverlay",modalContentSelector:".PermalinkOverlay-content",modalBodySelector:".PermalinkOverlay-body",initialFocusSelector:".permalink-tweet"}),OverlayNavigationUI.attachTo(document,{pushState:a.pushState,noTeardown:!0}),OverlayNavigationData.attachTo(document,{currentPageName:a.pageName,underlyingSectionName:a.sectionName,pushState:a.pushState,noTeardown:!0}),PermalinkOverlayScribe.attachTo(document)}var OverlayNavigationUI=require("app/ui/overlay_navigation"),OverlayNavigationData=require("app/data/overlay_navigation"),PermalinkOverlay=require("app/ui/dialogs/permalink_overlay"),PermalinkOverlayScribe=require("app/data/permalink_overlay_scribe");module.exports=initialize
  });
  deferred('$bower_components/jquery-placeholder/jquery.placeholder.js', function() {
  /*! http://mths.be/placeholder v2.0.7 by @mathias */(function(a,b,$){function j(a){var b={},c=/^jQuery\d+$/;return $.each(a.attributes,function(a,d){d.specified&&!c.test(d.name)&&(b[d.name]=d.value)}),b}function k(a){a.attr("title",a.attr("placeholder"))}function l(c,d){var e=this,f=$(e);if(e.value==f.attr("placeholder")&&f.hasClass("placeholder")){if(f.data("placeholder-password")){f=f.hide().next().show().attr("id",f.removeAttr("id").data("placeholder-id"));if(c===!0)return f[0].value=d;f.focus(),c.type=="paste"&&a.clipboardData&&(f[0].value=a.clipboardData.getData("Text"))}else e.value="",f.removeClass("placeholder"),e==b.activeElement&&e.select();k(f)}}function m(a){var c,d=this,e=$(d),f=e,g=this.id;if(!a&&d.value==""||e.hasClass("placeholder")){if(d.type=="password"){if(!e.data("placeholder-textinput")){try{c=e.clone().attr({type:"text"})}catch(a){c=$("<input>").attr($.extend(j(this),{type:"text"}))}c.removeAttr("name").data({"placeholder-password":!0,"placeholder-id":g}).bind(i),e.data({"placeholder-textinput":c,"placeholder-id":g}).before(c)}var h=d==b.activeElement;e=e.removeAttr("id").hide().prev().attr("id",e.data("placeholder-id")).show(),h&&d.type=="password"&&e.focus()}e.addClass("placeholder"),e[0].value=e.attr("placeholder"),e.removeAttr("title")}else e.removeClass("placeholder"),k(e)}function n(a){if(!$(this).hasClass("placeholder"))return;var b={35:!0,36:!0,37:!0,38:!0,39:!0,40:!0};b[a.keyCode]&&a.preventDefault()}function o(a,b){this.value==""&&(m.call(this),a.type=="keyup"&&p.call(this))}function p(){var a=this,c=$(a);if(!c.hasClass("placeholder"))return;try{if(b.selection){var d=a.createTextRange();d.collapse(!0),d.moveEnd("character",0),d.moveStart("character",0),d.select()}else typeof a.selectionStart=="number"&&(a.selectionStart=0,a.selectionEnd=0)}catch(e){}}var c="placeholder"in b.createElement("input"),d="placeholder"in b.createElement("textarea"),e=$.fn,f=$.valHooks,g,h,i={"focus.placeholder click.placeholder":p,"keydown.placeholder":n,"keypress.placeholder paste.placeholder":l,"keyup.placeholder blur.placeholder":o};c&&d?(h=e.placeholder=function(){return this},h.input=h.textarea=!0):(h=e.placeholder=function(){var a=this;return a.filter((c?"textarea":":input")+"[placeholder]").not(".placeholder").bind(i).data("placeholder-enabled",!0).each(function(){this.value==""&&m.call(this)}),a},h.input=c,h.textarea=d,g={get:function(a){var b=$(a);return b.data("placeholder-enabled")&&b.hasClass("placeholder")?"":a.value},set:function(a,b){var c=$(a);return c.data("placeholder-enabled")?(b==""?(a.value=b,m.call(a)):c.hasClass("placeholder")?l.call(a,!0,b)||(a.value=b):a.value=b,c):c.data("placeholder-password")?(c.next()[0].value=b,b!=""&&l.call(a),c):a.value=b}},c||(f.input=g),d||(f.textarea=g),$(function(){$(b).delegate("form","submit.placeholder",function(){var a=$(".placeholder",this).each(l);setTimeout(function(){a.each(m)},10)})}),$(a).bind("beforeunload.placeholder",function(){$(".placeholder").each(function(){this.value=""})}))})(this,document,jQuery)
  });
  define("app/boot/common",["module","require","exports","app/utils/auth_token","app/boot/scribing","app/ui/navigation","app/data/navigation","app/data/teardown_manager","app/ui/language_dropdown","app/ui/google","app/ui/macaw_nymizer","app/ui/impression_cookies","app/data/promoted_logger","app/ui/message_drawer","app/ui/tooltips","app/ui/forms/screen_reader_label","app/data/ttft_navigation","app/utils/cookie","app/data/user_info","app/data/hashflag_info","app/ui/banners/eu_cookie","app/ui/banners/dtab","app/ui/keyboard_shortcuts","app/ui/aria_event_logger","app/data/scriber","app/data/pageview_scribe","app/ui/mute_user","app/data/mute_user","app/ui/undo_unblock","app/data/ab_impressions_scribe","app/ui/dialogs/copy_link_to_tweet_dialog","app/data/copy_link_to_tweet_dialog_scribe","app/boot/top_bar","app/data/metrics_token_scribe","app/boot/permalink_overlay","$bower_components/jquery-placeholder/jquery.placeholder.js"],function(module, require, exports) {
  function shimConsole(a){window.console||(window.console={}),LOG_METHODS.forEach(function(b){if(a||!console[b])console[b]=NO_OP})}function getTWID(){return cookie("twid")}function verifySession(){getTWID()!==initialLoginTWID&&window.location.reload(!0)}var authToken=require("app/utils/auth_token"),scribing=require("app/boot/scribing"),NavigationUI=require("app/ui/navigation"),NavigationData=require("app/data/navigation"),TeardownManager=require("app/data/teardown_manager"),LanguageDropdown=require("app/ui/language_dropdown"),GoogleAnalytics=require("app/ui/google"),MacawNymizer=require("app/ui/macaw_nymizer"),ImpressionCookies=require("app/ui/impression_cookies"),PromotedLogger=require("app/data/promoted_logger"),MessageDrawer=require("app/ui/message_drawer"),Tooltips=require("app/ui/tooltips"),ScreenReaderLabel=require("app/ui/forms/screen_reader_label"),TTFTNavigation=require("app/data/ttft_navigation"),cookie=require("app/utils/cookie"),userInfo=require("app/data/user_info"),hashflagInfo=require("app/data/hashflag_info"),EuCookie=require("app/ui/banners/eu_cookie"),DtabBanner=require("app/ui/banners/dtab"),KeyboardShortcuts=require("app/ui/keyboard_shortcuts"),ARIAEventLogger=require("app/ui/aria_event_logger"),Scriber=require("app/data/scriber"),PageViewScribe=require("app/data/pageview_scribe"),MuteUser=require("app/ui/mute_user"),MuteUserData=require("app/data/mute_user"),UndoUnblockUser=require("app/ui/undo_unblock"),ClientSideABImpressionScribe=require("app/data/ab_impressions_scribe"),CopyLinkToTweetDialog=require("app/ui/dialogs/copy_link_to_tweet_dialog"),CopyLinkToTweetDialogScribe=require("app/data/copy_link_to_tweet_dialog_scribe"),topBar=require("app/boot/top_bar"),metricsTokenScribe=require("app/data/metrics_token_scribe"),permalinkOverlayBoot=require("app/boot/permalink_overlay");require("$bower_components/jquery-placeholder/jquery.placeholder.js");var ttftNavigationEnabled=!1,LOG_METHODS=["log","warn","debug","info"],NO_OP=function(){},initialLoginTWID="";module.exports=function(b){var c=b.environment,d=c=="production",e=c=="preflight",f=d||e;shimConsole(f&&!window.DEBUG.enabled),d||(jQuery.migrateMute=!1),authToken.set(b.formAuthenticityToken),userInfo.set(b),hashflagInfo.set(b),ImpressionCookies.attachTo(document,{noTeardown:!0}),scribing(b),metricsTokenScribe.attachTo(document,{scribeContext:{client:"web",page:b.pageName}}),PromotedLogger.attachTo(document,{noTeardown:!0}),Scriber.attachTo(document),PageViewScribe.attachTo(document,{noTeardown:!0}),KeyboardShortcuts.attachTo(document,b,{routes:b.routes,noTeardown:!0}),NavigationUI.attachTo(document,{pushState:b.pushState,viewContainer:b.viewContainer,noTeardown:!0}),TeardownManager.attachTo(document),NavigationData.attachTo(document,{init_data:b,pushState:b.pushState,assetsBasePath:b.assetsBasePath,pushStateRequestHeaders:b.pushStateRequestHeaders,viewContainer:b.viewContainer,noTeardown:!0}),b.deciders.overlayPermalink&&permalinkOverlayBoot(b),Tooltips.attachTo(document,{noTeardown:!0}),$("input,textarea").placeholder(),$.browser.msie&&parseInt($.browser.version,10)==10&&ScreenReaderLabel.attachTo(document,{noTeardown:!0}),MessageDrawer.attachTo("#message-drawer",{noTeardown:!0}),MuteUser.attachTo(document,{noTeardown:!0}),MuteUserData.attachTo(document,{noTeardown:!0}),UndoUnblockUser.attachTo(document,{noTeardown:!0}),ARIAEventLogger.attachTo(document,{noTeardown:!0}),b.loggedIn||LanguageDropdown.attachTo(".js-language-dropdown"),b.initialState&&b.initialState.ttft_navigation&&(ttftNavigationEnabled=!0),ttftNavigationEnabled&&TTFTNavigation.attachTo(document,{pageName:b.pageName,sectionName:b.sectionName}),EuCookie.attachTo(".eu-cookie-notice"),DtabBanner.attachTo(".dtab-banner"),b.loggedIn&&(initialLoginTWID=getTWID(),setInterval(verifySession,1e4)),GoogleAnalytics.attachTo(document,{pageName:b.pageName,sectionName:b.sectionName,screenName:b.screenName,loggedIn:b.loggedIn,allowAdsPersonalization:b.allowAdsPersonalization}),MacawNymizer.attachTo(document),ClientSideABImpressionScribe.attachTo(document,b),CopyLinkToTweetDialogScribe.attachTo(document,{noTeardown:!0}),CopyLinkToTweetDialog.attachTo("#copy-link-to-tweet-dialog",b,{noTeardown:!0}),topBar(b)}
  });
  define("app/ui/global_chrome_offset_refresher",["module","require","exports","core/component","app/utils/chrome"],function(module, require, exports) {
  function globalChromeOffsetRefresher(){this.handlePageChange=function(){chrome.disableGlobalYOffsetCache=!!document.querySelector(".js-variableHeightTopBar"),chrome.refreshGlobalYOffset()},this.after("initialize",function(){this.on(document,"uiSwiftLoaded uiPageChanged",this.handlePageChange)})}var defineComponent=require("core/component"),chrome=require("app/utils/chrome");module.exports=defineComponent(globalChromeOffsetRefresher)
  });
  define("app/ui/dialogs/signup_dialog",["module","require","exports","core/component","app/ui/with_dialog","core/i18n"],function(module, require, exports) {
  function signupDialog(){this.defaultAttrs({dialogSelector:".SignupDialog",headingSelector:".SignupDialog-heading",iconSelector:".SignupDialog-icon .Icon",signupFormSubmitSelector:".SignupForm-submit",allIconSelectors:"Icon--bird Icon--reply Icon--retweet Icon--heart",triggerSelector:".js-openSignupDialog",signinLinkSelector:".SignupDialog-signinLink",shouldReplaceSignupWithLogin:!1}),this.notifySignupButtonClicked=function(){this.trigger("uiSignupButtonClicked")},this.signinClick=function(){var a="/login?hide_message=true&redirect_after_login="+encodeURIComponent(this.redirectAfterLoginUrl());this.select("signinLinkSelector").attr("href",a),this.trigger("uiLoginLinkClicked")},this.redirectAfterLoginUrl=function(){return this.triggerElementUrl?this.triggerElementUrl:window.location.pathname+window.location.search},this.updateTriggerElementUrl=function(a){var b=$(a.target).closest(this.attr.triggerSelector);b.length&&b.attr("href")?this.triggerElementUrl=b.attr("href"):this.resetTriggerElementUrl()},this.resetTriggerElementUrl=function(){this.triggerElementUrl=undefined,this.select("signinLinkSelector").attr("href","/login")},this.around("open",function(a,b,c,d){c=c||{action:"default"},c.action==="reply"?(this.select("headingSelector").text(_('When you join Twitter, you can reply to anyone.')),this.select("iconSelector").removeClass(this.attr.allIconSelectors).addClass("Icon--reply")):c.action==="retweet"?(this.select("headingSelector").text(_('When you join Twitter, share any Tweet by Retweeting it to your followers.')),this.select("iconSelector").removeClass(this.attr.allIconSelectors).addClass("Icon--retweet")):c.action==="favorite"?(this.select("headingSelector").text(_('Join Twitter to like this Tweet.')),this.select("iconSelector").removeClass(this.attr.allIconSelectors).addClass("Icon--heart")):(this.select("headingSelector").text(_('Not on Twitter? Sign up, tune into the things you care about, and get updates as they happen.')),this.select("iconSelector").removeClass(this.attr.allIconSelectors).addClass("Icon--bird")),a()}),this.after("initialize",function(){this.on("click",{signupFormSubmitSelector:this.notifySignupButtonClicked,signinLinkSelector:this.signinClick}),this.on(this.attr.triggerSelector,"click",this.updateTriggerElementUrl),this.on("uiDialogClosed",this.resetTriggerElementUrl),this.on(document,"uiPageChanged uiOverlayPageChanged",this.resetTriggerElementUrl),this.attr.shouldReplaceSignupWithLogin?this.on(document,"uiOpenSignupDialog","uiOpenLoginDialog"):(this.on(document,"uiOpenSignupDialog",this.open),this.on(document,"uiCloseSignupDialog",this.close),this.on("uiDialogOpened","uiSigninOrSignupDialogOpened"),this.on("uiDialogClosed","uiSigninOrSignupDialogClosed"))})}var defineComponent=require("core/component"),withDialog=require("app/ui/with_dialog"),_=require("core/i18n");module.exports=defineComponent(withDialog,signupDialog)
  });
  define("app/ui/dialogs/login_dialog",["module","require","exports","core/component","app/ui/with_dialog","app/data/with_scribe"],function(module, require, exports) {
  function loginDialog(){this.defaultAttrs({loginFormSubmitSelector:".js-submit",focusFieldSelector:".js-signin-email",signupLinkSelector:".LoginDialog-signupLink"}),this.notifyLoginButtonClicked=function(){this.trigger("uiLoginButtonClicked")},this.signupClick=function(){this.trigger("uiSignupLinkClicked")},this.openAndFocus=function(){this.open(),this.select("focusFieldSelector").focus()},this.after("initialize",function(){this.$dialog=this.$node,this.after("open",function(){this.trigger("uiLoginDialogOpened")}),this.after("close",function(){this.trigger("uiLoginDialogClosed")}),this.on("click",{loginFormSubmitSelector:this.notifyLoginButtonClicked,signupLinkSelector:this.signupClick}),this.on(document,"uiOpenLoginDialog",this.openAndFocus)})}var defineComponent=require("core/component"),withDialog=require("app/ui/with_dialog"),withScribe=require("app/data/with_scribe");module.exports=defineComponent(loginDialog,withDialog,withScribe)
  });
  define("app/data/logged_out_scribe",["module","require","exports","core/component","app/data/with_scribe"],function(module, require, exports) {
  function loggedOutScribe(){this.defaultAttrs({signupSelector:"a.js-signup"}),this.frontpageScribes={signin:{component:"login_callout",element:"form",action:"login_click",gaEvent:"existing-user-signin"},signup:{component:"signup_callout",element:"form",action:"signup_click",gaEvent:"signup-clicked"},search:{component:"main",element:"search_field",action:"search"},language:{component:"footer",element:"language_selector",action:"select"}},this.scribeLoggedOutForm=function(a,b){var c=a.target.className.match(/signin|signup|language|search/);c&&c.length&&this.scribeForm(c[0],a,b)},this.scribeForm=function(a,b,c){var d=this.frontpageScribes[a];$(b.target).data("component")&&(d.component=$(b.target).data("component")),$(b.target).data("element")&&(d.element=$(b.target).data("element")),this.scribe(d,c),d.gaEvent&&this.trigger("GATrackEvent",{gaEvent:d.gaEvent})},this.scribeSignupClick=function(a,b){this.scribeForm("signup",a,{})},this.after("initialize",function(){this.scribeOnEvent("uiSignupLinkClicked",{element:"signup_link",action:"signup_click"}),this.scribeOnEvent("uiLoginLinkClicked",{element:"login_link",action:"login_click"}),this.scribeOnEvent("uiSigninOrSignupDialogOpened","open"),this.scribeOnEvent("uiSigninOrSignupDialogClosed","close"),this.scribeOnEvent("uiLoginDialogOpened","open"),this.scribeOnEvent("uiLoginDialogClosed","close"),this.scribeOnEvent("uiBannerDismissed","dismiss"),this.scribeOnEvent("uiBannerDisplayed","impression"),this.on("submit",this.scribeLoggedOutForm),this.on("click",{signupSelector:this.scribeSignupClick})})}var defineComponent=require("core/component"),withScribe=require("app/data/with_scribe");module.exports=defineComponent(loggedOutScribe,withScribe)
  });
  define("app/ui/front_page_photo_set",["module","require","exports","core/component","core/clock"],function(module, require, exports) {
  function expPhotoSet(){this.defaultAttrs({rotationMs:7e3,fadeMs:500,activeClass:"active",companionTweetsSelector:".background-companion-tweets .companion-tweet",activeCompanionTweetSelector:".companion-tweet.active",frontImageSelector:".front-bg .front-image"}),this.cycleBackground=function(){if(document.hasFocus()){var a=this.select("activeCompanionTweetSelector"),b=this.$companionTweets.index(a),c=++b%this.companionTweetsLen,d=this.$companionTweets.eq(c);this.hideTweet(a),this.changeImage(d),this.showTweet(d)}},this.showTweet=function(a){a.show().addClass(this.attr.activeClass)},this.hideTweet=function(a){a.hide().removeClass(this.attr.activeClass)},this.changeImage=function(a){this.$frontImage.fadeOut(this.attr.fadeMs,function(){this.$frontImage.attr("src",a.data("photo")),this.$frontImage.fadeIn(this.attr.fadeMs)}.bind(this))},this.after("initialize",function(){this.$companionTweets=this.select("companionTweetsSelector"),this.$frontImage=this.select("frontImageSelector"),this.companionTweetsLen=this.$companionTweets.length,this.showTweet(this.$companionTweets.first());if(this.$companionTweets.length<=1)return;clock.setIntervalEvent("uiFrontPagePhotoSetBackgroundTick",this.attr.rotationMs),this.on(document,"uiFrontPagePhotoSetBackgroundTick",this.cycleBackground)})}var defineComponent=require("core/component"),clock=require("core/clock");module.exports=defineComponent(expPhotoSet)
  });
  define("app/ui/banners/signup",["module","require","exports","core/component","app/utils/cookie"],function(module, require, exports) {
  function signupBanner(){this.defaultAttrs({dismissSelector:".js-close",signupSelector:".js-signup",topbarSpacerSelector:".topbar-spacer",eventData:{scribeContext:{component:"banner",element:"signup"}}}),this.setCookie=function(){cookie("sn_bn_act",1,{expires:1})},this.dismiss=function(){this.trigger("uiBannerDismissed"),this.hideBanner()},this.hideBanner=function(){this.setCookie(),$(document).find(this.attr.topbarSpacerSelector).css("padding-top","-="+this.$node.outerHeight()),this.$node.remove()},this.signup=function(){this.hideBanner()},this.after("initialize",function(){this.on("click",{dismissSelector:this.dismiss,signupSelector:this.signup}),this.trigger("uiBannerDisplayed")})}var defineComponent=require("core/component"),cookie=require("app/utils/cookie");module.exports=defineComponent(signupBanner)
  });
  define("app/ui/profile/auto_signup_dialog",["module","require","exports","core/component","app/utils/storage/with_expiry"],function(module, require, exports) {
  function autoSignupDialog(){this.namespace="signup_dialog",this.storageKey="until",this.defaultAttrs({skipDisplay:!1}),this.shouldDisplayDialog=function(){return this.expired&&!this.attr.skipDisplay},this.notifyDialogVisibility=function(){this.shouldDisplayDialog()&&this.trigger(document,"uiWillShowSignupDialog")},this.possiblyShowDialog=function(){this.shouldDisplayDialog()&&(this.showDialog(),this.clear(),this.updateComponentTTL())},this.showDialog=function(){this.trigger("uiShouldShowDropdown")},this.updateComponentTTL=function(){var a=6e4,b=864e5;this.attr.environment=="selenium"?this.updateTTL(this.storageKey,a):this.updateTTL(this.storageKey,b)},this.after("initialize",function(){this.expired=this.isExpired(this.storageKey),this.on(document,"uiSwiftLoaded uiPageChanged",this.possiblyShowDialog)})}var defineComponent=require("core/component"),withExpiry=require("app/utils/storage/with_expiry");module.exports=defineComponent(autoSignupDialog,withExpiry)
  });
  define("app/boot/logged_out",["module","require","exports","app/ui/global_chrome_offset_refresher","app/ui/dialogs/signup_dialog","app/ui/dialogs/login_dialog","app/data/logged_out_scribe","app/ui/front_page_photo_set","app/ui/banners/signup","app/ui/profile/auto_signup_dialog","app/ui/profile/auto_signup_dialog"],function(module, require, exports) {
  var GlobalChromeOffsetRefresher=require("app/ui/global_chrome_offset_refresher"),SignupDialog=require("app/ui/dialogs/signup_dialog"),LoginDialog=require("app/ui/dialogs/login_dialog"),LoggedOutScribe=require("app/data/logged_out_scribe"),ExpPhotoSet=require("app/ui/front_page_photo_set"),SignupBanner=require("app/ui/banners/signup"),AutoSignupDialog=require("app/ui/profile/auto_signup_dialog");module.exports=function(b){GlobalChromeOffsetRefresher.attachTo(document),LoginDialog.attachTo(".LoginDialog",{eventData:{scribeContext:{component:"dialog",element:"login"}}}),SignupDialog.attachTo(".SignupDialog",{shouldReplaceSignupWithLogin:b.shouldReplaceSignupWithLogin,eventData:{scribeContext:{component:"dialog",element:"signup"}}}),LoggedOutScribe.attachTo(document),SignupBanner.attachTo(".Banner--signup"),b.inExpPhotoSet&&ExpPhotoSet.attachTo("#page-container",{rotationMs:b.rotationMs});var c=require("app/ui/profile/auto_signup_dialog");c.attachTo(".session-dropdown .dropdown",{environment:b.environment,skipDisplay:!!b.internalReferer||b.skipAutoSignupDialog})}
  });
  define("app/utils/browser",["module","require","exports"],function(module, require, exports) {
  function browser(a){var b;return a.chrome?b="chrome":a.webkit?b="webkit":a.mozilla?b="mozilla":a.msie?b="msie":b="unknown",{name:b,version:a.version}}module.exports=browser
  });
  define("app/utils/ttft",["module","require","exports","app/data/scribe_transport","app/utils/params","app/utils/time","app/data/user_info","app/utils/browser"],function(module, require, exports) {
  function scribeTTFTData(a,b){if(!recorded&&window.performance&&a){recorded=!0;var c=a;c.did_load=b,c.web_timings=$.extend({},window.performance.timing),c.web_timings.toJSON&&delete c.web_timings.toJSON,c.navigation={type:window.performance.navigation.type,redirectCount:window.performance.navigation.redirectCount},c.referrer=document.referrer,scribeTransport.send(c,"swift_time_to_first_tweet",!1),scribePerftownEvents(c);if(params.fromQuery(window.location).show_ttft){var d=c.web_timings;$(document).trigger("uiShowError",{message:"<table width=80%><thead><th>milestone<th>time<th>cumulative</thead><tbody><tr><td>connect:       <td>"+(d.connectEnd-d.navigationStart)+"<td>"+(d.connectEnd-d.navigationStart)+"</tr>"+"<tr><td>process:       <td>"+(d.responseStart-d.connectEnd)+"<td>"+(d.responseStart-d.navigationStart)+"</tr>"+"<tr><td>response:      <td>"+(d.responseEnd-d.responseStart)+"<td>"+(d.responseEnd-d.navigationStart)+"</tr>"+"<tr><td>render:        <td>"+(c.client_record_time-d.responseEnd)+"<td>"+(c.client_record_time-d.navigationStart)+"</tr>"+"<tr><td>interactivity: <td>"+(c.aq_empty_time-c.client_record_time)+"<td>"+(c.aq_empty_time-d.navigationStart)+"</tr>"+"<tr><td>ajax_complete: <td>"+(c.ajax_complete_time-c.aq_empty_time)+"<td>"+(c.ajax_complete_time-d.navigationStart)+"</tr>"+"<tr><td>ajax_count:    <td>"+c.ajax_count+"</tr>"+"</tbody></table>"})}try{delete window.ttft}catch(e){window.ttft=undefined}}}function scribePerftownEvents(a){if(!userInfo.getDecider("web_perftown_ttft"))return;var b=a.web_timings,c={ttft:a.client_record_time-b.navigationStart,connect:b.connectEnd-b.navigationStart,process:b.responseStart-b.connectEnd,response:b.responseEnd-b.responseStart,render:a.client_record_time-b.responseEnd,interactivity:a.aq_empty_time-a.client_record_time,ajax_complete:a.ajax_complete_time-a.aq_empty_time},d=JSON.stringify({browser:browser($.browser)});Object.keys(c).forEach(function(a){var e={product:"webclient",description:"stats:perf:ttft:"+a,duration_ms:c[a],start_time_ms:b.navigationStart,metadata:d};scribeTransport.send(e,"perftown")})}function scribeMilestones(a){if(!window.ttftData)return;var b=!0;for(var c=0;c<requiredMilestones.length;++c)if(!(requiredMilestones[c]in window.ttftData)){b=!1;break}(a||b)&&scribeTTFTData(window.ttftData,b)}function onAjaxComplete(a,b,c){if(c&&c.url in newAjaxRequests)for(var d=0;d<newAjaxRequests[c.url].length;d++)if(c===newAjaxRequests[c.url][d]){newAjaxRequests[c.url].splice(d,1);return}pendingAjaxCount--;if(pendingAjaxCount==0||$.active==0)unbindAjaxHandlers(),recordPendingAjaxComplete()}function onAjaxSend(a,b,c){c&&c.url&&(newAjaxRequests[c.url]||(newAjaxRequests[c.url]=[]),newAjaxRequests[c.url].push(c))}function recordPendingAjaxComplete(){recordMilestone("ajax_complete_time",window.ttft.now())}function bindAjaxHandlers(){$(document).bind("ajaxComplete",onAjaxComplete),$(document).bind("ajaxSend",onAjaxSend)}function unbindAjaxHandlers(){$(document).unbind("ajaxComplete",onAjaxComplete),$(document).unbind("ajaxSend",onAjaxSend)}function startAjaxTracking(){startingAjaxCount=pendingAjaxCount=$.active,recordMilestone("ajax_count",startingAjaxCount),startingAjaxCount==0?recordPendingAjaxComplete():(unbindAjaxHandlers(),bindAjaxHandlers())}function recordMilestone(a,b){window.ttftData&&!window.ttftData[a]&&(window.ttftData[a]=b),scribeMilestones(!1)}var scribeTransport=require("app/data/scribe_transport"),params=require("app/utils/params"),time=require("app/utils/time"),userInfo=require("app/data/user_info"),browser=require("app/utils/browser"),recorded=!1,requiredMilestones=["page","client_record_time","aq_empty_time","ajax_complete_time","ajax_count"],startingAjaxCount=0,pendingAjaxCount=0,newAjaxRequests={};window.ttft={now:time.now,recordMilestone:recordMilestone},scribeMilestones(!1),setTimeout(function(){scribeMilestones(!0)},45e3),module.exports={startAjaxTracking:startAjaxTracking,_scribeTransport:scribeTransport}
  });$(document).ready(function(){using.path=$("#swift-module-path").val();using.aliases&&using.bundles.push(using.aliases);$(".loadrunner-alias").each(function(a,b){using.bundles.push(JSON.parse($(b).val()))});using("debug/debug",function(a){function b(){function e
  (){d.forEach(function(a){a(c)});var b=$(document);b.on("uiSwiftLoaded uiPageChanged",function(){window.__swift_loaded=!0});b.on("uiBeforeNewPageLoad",function(){window.__swift_loaded=!1});$("body").removeClass(c.baseFoucClass);b.trigger("uiSwiftLoaded");if(
  window.swiftActionQueue){var e=window.swiftActionQueue,f;a.enabled&&e.logActions();e.flush($);a.enabled||(window.swiftActionQueue=undefined)}if(window.ttftData){window.ttft&&window.ttft.recordMilestone("aq_empty_time",window.ttft.now());using("app/utils/ttft"
  ,function(a){a.startAjaxTracking()})}var g=["uiHasInjectedNewTimeline","uiHasInjectedOldTimelineItems","uiHasInjectedRangeTimelineItems","uiHasInjectedNewTimelineItems","uiOverlayPageChanged","uiPermalinkThreadExpanded","uiExpandedConversationRendered","uiTweetInserted"
  ,"uiPageChanged","uiShowRelatedVideoTweets","uiRelatedVideosRefresh","uiLoadDynamicContent","uiDMConversationUpdated"].join(" ");b.on(g,function(){b.trigger("uiWatchAutoplayMedia");b.trigger("uiWatchUnloadedCards");b.trigger("uiWatchPlayableMedia")})}var b=
  $("#init-data").val(),c=JSON.parse(b),d=$.makeArray(arguments);e()}location.search.match(/debug=1/)&&$("body").addClass("debug");if($("body").hasClass("debug")&&window.console){window.DEBUG=a;a.enable(!0);$(document).on("scribedata.ScribeTransport",function(
  a,b){var c;if(c=b.event_namespace){var d=[c.client,c.page,c.section,c.component,c.element,c.action].join(":");console.info("scribe",d)}})}else a.enable(!1);var c=$("input.swift-boot-module").map(function(a,b){return $(b).val()}).toArray();using.apply(this,
  c.concat(b))})})