Tweet
","",""].join("");this.document.write(e),this.document.close()},e(u)})});provide("sandbox/minimal",function(e){using("sandbox/baseframe","util/env","util/promise","util/util",function(t,n,r,i){function s(e,t){if(!e)return;this._frame=e,this._win=e.contentWindow,this._doc=this._win.document,this._body=this._doc.body,this._head=this._body.parentNode.children[0],this.layout=t}i.aug(s.prototype,{createElement:function(e){return this._doc.createElement(e)},createDocumentFragment:function(){return this._doc.createDocumentFragment()},appendChild:function(e){return this.layout(i.bind(function(){return this._body.appendChild(e)},this))},setBaseTarget:function(e){var t=this._doc.createElement("base");return t.target=e,this.layout(i.bind(function(){return this._head.appendChild(t)},this))},setTitle:function(e){if(!e)return;this._frame.title=e},element:function(){return this._frame},document:function(){return this._doc}}),s.createSandbox=function(e,n,r,i){var o=new t(e,n,r,i);return o.ready().then(function(e){return new s(e.frame,e.layout)})},e(s)})});provide("dom/delegate",function(e){using("util/env",function(t){function i(e){var t=e.getAttribute("data-twitter-event-id");return t?t:(e.setAttribute("data-twitter-event-id",++r),r)}function s(e,t,n){var r=0,i=e&&e.length||0;for(r=0;r1&&String(n)!=="[object Object]"){if(n===null||n===undefined)i.expires=-1;if(typeof i.expires=="number"){var s=i.expires,o=new Date((new Date).getTime()+s*60*1e3);i.expires=o}return n=String(n),document.cookie=[encodeURIComponent(e),"=",i.raw?n:encodeURIComponent(n),i.expires?"; expires="+i.expires.toUTCString():"",i.path?"; path="+i.path:"",i.domain?"; domain="+i.domain:"",i.secure?"; secure":""].join("")}i=n||{};var u,a=i.raw?function(e){return e}:decodeURIComponent;return(u=(new RegExp("(?:^|; )"+encodeURIComponent(e)+"=([^;]*)")).exec(document.cookie))?a(u[1]):null})})});provide("tfw/util/tracking",function(e){using("dom/cookie","dom/delegate","sandbox/minimal","util/donottrack","util/promise","util/querystring","tfw/util/env","util/iframe","util/util","$xd/json2.js",function(t,n,r,i,s,o,u,a,f){function E(){return y?y:y=r.createSandbox({id:"rufous-sandbox"},{display:"none"}).then(f.bind(function(e){g=e,p=_(),d=D();while(v[0])k.apply(this,v.shift());return m?L():[p,d]},this))}function S(e,t,n,r){var i=!f.isObject(e),s=t?!f.isObject(t):!1,o,u;if(i||s)return;o=O(e),u=M(t,!!n,!!r),C(o,u,!0)}function x(e,t,n,r,i){var s=T(e.target||e.srcElement);s.action=i||"click",S(s,t,n,r)}function T(e,t){var n;return t=t||{},!e||e.nodeType!==1?t:((n=e.getAttribute("data-scribe"))&&f.forEach(n.split(" "),function(e){var n=f.trim(e).split(":"),r=n[0],i=n[1];r&&i&&!t[r]&&(t[r]=i)}),T(e.parentNode,t))}function N(e,t,n){var r=l+t;if(!e)return;return e[r]=n,e}function C(e,t,n){var r,i,s,u,a;if(!f.isObject(e)||!f.isObject(t))return;s=f.aug({},t,{event_namespace:e}),n?(u={l:B(s)},s.dnt&&(u.dnt=1),P(o.url(b,u))):(r=p.firstChild,r.value=+(+r.value||s.dnt||0),a=B(s),i=g.createElement("input"),i.type="hidden",i.name="l",i.value=a,p.appendChild(i))}function k(e,t,n,r){var i=!f.isObject(e),s=t?!f.isObject(t):!1,o,u;if(i||s)return;if(!g||!p){v.push([e,t,n,r]);return}o=O(e),u=M(t,!!n,!!r),C(o,u)}function L(){if(!p)return m=!0,y||s.reject();if(p.children.length<=2)return s.reject();var e=s.every(g.appendChild(p),g.appendChild(d)).then(function(e){var t=e[0],r=e[1];return n.on(r,"load",function(){window.setTimeout(A(t,r),0)}),t.submit(),e});return p=_(),d=D(),e}function A(e,t){return function(){var n=e.parentNode;if(!n)return;n.removeChild(e),n.removeChild(t)}}function O(e){return f.aug({client:"tfw"},e||{})}function M(e,t,n){var r={_category_:"tfw_client_event"},s,o;t=!!t,n=!!n,s=f.aug(r,e||{}),o=s.widget_origin||document.referrer,s.format_version=1,s.triggered_on=s.triggered_on||+(new Date),t||(s.widget_origin=o);if(n||i(o))s.dnt=!0,H(s);return s}function _(){var e=g.createElement("form"),t=g.createElement("input"),n=g.createElement("input");return h++,e.action=b,e.method="POST",e.target="rufous-frame-"+h,e.id="rufous-form-"+h,t.type="hidden",t.name="dnt",t.value=0,n.type="hidden",n.name="tfw_redirect",n.value=w,e.appendChild(t),e.appendChild(n),e}function D(){var e="rufous-frame-"+h;return a({id:e,name:e,width:0,height:0,border:0},{display:"none"},g.document())}function P(e){var t=new Image;t.src=e}function H(e){f.forIn(e,function(t){~f.indexOf(c,t)&&delete e[t]})}function B(e){var t=Array.prototype.toJSON,n;return delete Array.prototype.toJSON,n=JSON.stringify(e),t&&(Array.prototype.toJSON=t),n}var l="twttr_",c=["hask","li","logged_in","pid","user_id","guest_id",l+"hask",l+"li",l+"pid"],h=0,p,d,v=[],m,g,y,b="https://twitter.com/i/jot",w="https://platform.twitter.com/jot.html";e({enqueue:k,flush:L,initPostLogging:E,scribeInteraction:x,extractTermsFromDOM:T,addPixel:S,addVar:N})})});using("util/domready","util/util","util/querystring","util/params","tfw/util/tracking","util/widgetrpc","util/twitter","i18n/languages",function(e,t,n,r,i,s,o,u){function C(e){f=e,c.innerHTML=D(f)}function k(){e(function(){if(p.url&&p.count!=="none"){var e=l.createElement("script");e.type="text/javascript",e.src=twttr.config.countURL+"?url="+n.encodePart(b)+"&callback=twttr.receiveCount",l.body.appendChild(e)}})}function L(){switch(p.type){case"hashtag":return _("Tweet %{hashtag}",{hashtag:"#"+p.button_hashtag+""});case"mention":return _("Tweet to %{name}",{name:"@"+p.screen_name+""});default:return _("Tweet")}}function A(){var e=l.getElementById("l");l.title=_("Tweet Button"),e.innerHTML=L()}function O(e,t){var n=e.id+"-desc",r=document.createElement("p");r.id=n,r.className="aria",r.innerHTML=t,l.body.appendChild(r),e.setAttribute("aria-describedby",n)}function M(e){var t="scrollbars=yes,resizable=yes,toolbar=no,location=yes",n=550,r=420,i=screen.height,s=screen.width,o=Math.round(s/2-n/2),u=0;return i>r&&(u=Math.round(i/2-r/2)),window.open(e,null,t+",width="+n+",height="+r+",left="+o+",top="+u)}function D(e){var t,n,r=parseInt(e,10),i=new RegExp("^\\"+_(",")),s={ja:1,ko:1};return isNaN(r)?"":r<1e4?r.toString().split("").reverse().join("").replace(/(\d{3})/g,"$1"+_(",")).split("").reverse().join("").replace(i,""):r<1e5?s[p.lang]?(n=(Math.floor(r/100)/100).toString(),n+_("10k unit")):(t=(Math.round(r/100)/10).toString(),t.replace(/\./,_("."))+_("K")):_("100K+")}function P(e){return e=e||window.event,e&&e.preventDefault?e.preventDefault():e.returnValue=!1,e&&e.stopPropagation?e.stopPropagation():e.cancelBubble=!0,!1}function H(e){return e.replace(/(<)|(>)/g,function(e){var t;return e[0]==="<"?t="<":t=">",t})}function B(e){for(var t=0,n=e.length;t0&&(c.title=_("This page has been shared %{tweets} times. View these Tweets.",{tweets:e.count}),O(c,c.title)))},p.type=~t.indexOf(m,p.type)?p.type:"share",p.size=v[p.size]?p.size:"m",j(l.documentElement,v[p.size]||""),p.align=="right"&&j(l.body,"right");if(p.type=="mention"||p.screen_name)(T=o.screenName(p.screen_name))?p.screen_name=T:(delete p.screen_name,p.type=="mention"&&(p.type="share",p.count="none"));p.type=="hashtag"||p.button_hashtag?((x=o.hashTag(p.button_hashtag,!1))?(p.button_hashtag=x,p.hashtags=p.button_hashtag+","+(p.hashtags||"")):(delete p.button_hashtag,p.type="share"),p.count="none"):p.type=="share"?(p.url=p.url||l.referrer,b=p.counturl||p.url,w=b&&"http://twitter.com/search?q="+n.encodePart(b),p.size=="l"&&p.count=="vertical"&&(p.count="none"),g.push(d[p.count]||"hcount"),k()):p.count="none",g.push(N),j(l.body,g.join(" ")),l.body.setAttribute("data-scribe","section:"+p.type),A(),j(l.body,"ready"),y={text:p.text,screen_name:p.screen_name,hashtags:p.hashtags,url:p.url,via:p.via,related:p.related,share_with_retweet:p.share_with_retweet,placeid:p.placeid,original_referer:l.referrer,partner:p.partner,tw_p:"tweetbutton"},E=twttr.config.intentURL+"?"+n.encode(y),S=p.dnt&&p.dnt.toLowerCase()==="true",i.addPixel({page:"button",section:p.type,action:"impression"},{language:p.lang,client_version:a+":"+p.size+(p.count!=="none"?":c":""),widget_origin:l.referrer},!1,S),c.href=w,h.href=E,h.onclick=function(e){return e=e||window.event,i.scribeInteraction(e,{},!1,S),s.withHub({nohub:function(){M(E,p.id)},timeout:function(){M(E,p.id)},success:function(e){e.openIntent(E,p.id),e.trigger("click",{region:"tweet"},p.id)}}),P(e)},p.searchlink!="disabled"?(j(c.parentNode,"enabled"),c.onclick=function(e){e=e||window.event,i.scribeInteraction(e,{},!1,S),s.withHub(function(e){e.trigger("click",{region:"tweetcount"},p.id)});if(e.altKey||e.shiftKey||e.metaKey)return;return window.open(w),P(e)}):c.onclick=function(e){P(e)}})});;