// Input 0
var pa=navigator.userAgent.toLowerCase();
var Hb=pa.indexOf("msie")!=-1;
var Xc=pa.indexOf("konqueror")!=-1;
var Yc=pa.indexOf("safari")!=-1||Xc;
var $c=!Hb&&(!Yc&&pa.indexOf("mozilla")!=-1);
delete pa;
function za(a,b)
{
if(a==null||a.className==null)return false;
var c=a.className.split(" ");
for(var d=0;
d<c.length;
d++)
{
if(c[d]==b)
{
return true
}
}
return false
}
function r(a,b)
{
if(za(a,b))return;
a.className+=" "+b
}
function t(a,b)
{
if(a.className==null)return;
var c=a.className.split(" ");
var d=[];
var e=false;
for(var f=0;
f<c.length;
f++)
{
if(c[f]!=b)
{
if(c[f])
{
d.push(c[f])
}
}
else
{
e=true
}
}
if(e)
{
a.className=d.join(" ")
}
}
function Pc(a,b)
{
var c=[];
for(var d=a.firstChild;
d;
d=d.nextSibling)
{
Xa(d,b,c)
}
return c
}
function Xa(a,b,c)
{
if(b.select(a))
{
c.push(a)
}
for(var d=a.firstChild;
d;
d=d.nextSibling)
{
Xa(d,b,c)
}
}
function Db(a)
{
var b=a.offsetTop;
if(a.offsetParent!=null)b+=Db(a.offsetParent);
return b
}
;
function Qc(a)
{
return Hb?a.document.body.clientHeight:a.innerHeight
}
function Gb(a,b,c,d,e,f,h,k)
{
if(!d)
{
d=Math.floor(Qc(window.top)*0.8)
}
if(!c)
{
c=Math.min(window.screen.availWidth,d)
}
var s="resizable="+(h?"no":"yes")+","+"scrollbars="+(f?"no":"yes")+","+"width="+c+",height="+d;
if(e)
{
s+=",left="+(window.screen.availWidth-c>>1)+","+"top="+(window.screen.availHeight-d>>1)
}
return Va(window,a,b,s,k)
}
function Va(a,b,c,d,e)
{
var f=Fb(top,b,c,d);
if(!f||(f.closed||!f.focus))
{
f=Fb(a,b,c,d)
}
if(!f||(f.closed||!f.focus))
{
if(e)alert(e)
}
else
{
f.focus()
}
return f
}
function Fb(a,b,c,d)
{
var e;
if(d)
{
e=a.open(b,c,d)
}
else if(c)
{
e=a.open(b,c)
}
else
{
e=a.open(b)
}
return e
}
function Ua(a)
{
if(!a)return"";
return a.replace(/&#(\d+);
/g,function(b,c)
{
return String.fromCharCode(parseInt(c,10))
}
).replace(/&#x([a-f0-9]+);
/gi,function(b,c)
{
return String.fromCharCode(parseInt(c,16))
}
).replace(/&(\w+);
/g,function(b,c)
{
c=c.toLowerCase();
return c in Ua.unesc?Ua.unesc[c]:"?"
}
)
}
Ua.unesc=
{
"lt":"<","gt":">","quot":'"',"nbsp":" ","amp":"&"
}
;
var Zc=/\s+/g;
var Rc=/^ /;
var Sc=/ $/;
function Ba(a)
{
if(!a)return"";
return a.replace(Zc," ").replace(Rc,"").replace(Sc,"")
}
function y(a)
{
return encodeURIComponent(a)
}
function ea(a)
{
if(!a)return"";
return a.replace(/^\s+/,"").replace(/\s+$/,"")
}
function Eb(a)
{
return Ba(a)==""
}
function Ya(a)
{
if(typeof a=="object")
{
var b=[];
for(var c in a)
{
b[c]=Ya(a[c])
}
return b
}
return a
}
function Uc(a)
{
return document.getElementById(a)
}
function Vc(a)
{
return document.all[a]
}
var Tc=document.getElementById?Uc:Vc;
function Wa(a)
{
if(window.parent!=window&&window.parent.log)
{
window.parent.log(window.name+"::"+a);
return
}
var b=Tc("log");
if(b)
{
var c="<p class=logentry><span class=logdate>"+new Date()+"</span><span class=logmsg>"+a+"</span></p>";
b.innerHTML=c+b.innerHTML
}
else
{
window.status=a
}
}
;
// Input 1
var ia="/reader/";
var lc="/reader/atom/";
var mc="/reader/lens/";
var oc="/reader/finder";
var nc="/reader/subscriptions/export";
var pc="/reader/preview/";
var Z="label";
var Pa="state";
var Ec="pref";
var ob="reading-list";
var nb="read";
var Dc="kept-unread";
var pb="starred";
var Cc="subscriptions";
var Bc="labels";
var kb="queue-sorting";
var lb="read-items-visible";
var mb="subscriptions-sorting";
// Input 2
;
// Input 3
var fa=ia+"api/0";
var Ra=30;
var sb=2000;
var S=10;
function Ab(a)
{
var b=a.replace(/\<
/g,"<");
b=b.replace(/\>
/g,">");
b=b.replace(/\>
/g,">");
b=b.replace(/\&
/g,"&");
return b
}
function Lc(a,b)
{
var c=a.getElementsByTagName("a");
for(var d=0;
d<c.length;
d++)
{
c[d].target=b
}
}
function Ic(a)
{
var b=a.toString().split(" ");
var c=b[1];
var d=b[2];
var e=b[3];
if(isNaN(e))
{
e=b[b.length-1]
}
return c+" "+d+", "+e
}
function v(a,b,c)
{
if(v.timeout)
{
window.clearTimeout(v.timeout)
}
var d=g("message-area");
d.innerHTML=a;
d.className=b.className;
if(c)
{
v.timeout=window.setTimeout(function()
{
r(d,"hidden");
m.resize()
}
,c*1000)
}
}
v.INFO=
{
"className":"info-message"
}
;
v.ERROR=
{
"className":"error-message"
}
;
function Kc()
{
if(self.innerHeight)
{
return
{
"width":self.innerWidth,"height":self.innerHeight
}
}
else if(document.documentElement&&document.documentElement.clientHeight)
{
return
{
"width":document.documentElement.clientWidth,"height":document.documentElement.clientHeight
}
}
else if(document.body)
{
return
{
"width":document.body.clientWidth,"height":document.body.clientHeight
}
}
return
{
"width":-1,"height":-1
}
}
var na=
{
}
;
function Ta(a)
{
if(na[a.id])
{
window.clearTimeout(na[a.id])
}
a.startTime=(new Date()).getTime();
na[a.id]=window.setTimeout(function()
{
Bb(a)
}
,0)
}
function Bb(a)
{
if(a.start==a.end)
{
var b=1
}
else
{
var c=(new Date()).getTime();
var b=(c-a.startTime)/a.runTime;
if(b>1)
{
b=1
}
}
a.updateFunc(a.start*(1-b)+a.end*b);
if(b==1)
{
na[a.id]=null
}
else
{
na[a.id]=window.setTimeout(function()
{
Bb(a)
}
,Ra)
}
}
function Sa(a,b)
{
return Math.log(Math.abs(a-b))/2+1
}
function O(a,b)
{
if(b instanceof Array)
{
for(var c=0;
c<b.length;
c++)
{
a=a.replace("%"+(c+1),b[c])
}
return a
}
else
{
return a.replace("%1",b)
}
}
function vb(a,b)
{
var c=document.createElement("div");
var d=document.createElement("a");
d.href=a;
d.innerHTML=b;
c.appendChild(d);
return c.innerHTML
}
function Jc(a,b,c,d)
{
var e=document.createElement("div");
var f=document.createElement(a);
if(c)f.className=c;
if(d)f.id=d;
f.innerHTML=b;
e.appendChild(f);
return e.innerHTML
}
function xa(a,b)
{
var c=function()
{
}
;
c.prototype=b.prototype;
a.prototype=new c()
}
function xb(a,b,c)
{
return"http://mail.google.com/mail/?"+["view=cm","fs=1","tf=1","to="+y(a),"su="+y(b),"body="+y(c)].join("&")
}
function wb(a,b,c)
{
return["http://www.blogger.com/blog_this.pyra?n=",y(a),"&u=",y(b),"&t=",y(c)].join("")
}
var tb=["br","div"];
var ub=["p","h1","h2","h3","h4","h5","h6","blockquote"];
var ba=function(a,b,c)
{
if(!a)return"";
a=Ba(a);
for(var d=0;
d<tb.length;
d++)
{
var e=tb[d];
a=a.replace(new RegExp("<"+e+"[^>]*>","g"),"\n")
}
for(var d=0;
d<ub.length;
d++)
{
var e=ub[d];
a=a.replace(new RegExp("<"+e+"[^>]*>","g"),"\n\n")
}
a=oa(ea(a));
if(!c)
{
return a.substring(0,b)
}
else
{
if(b>y(a).length)
{
return a
}
var f=0;
var h=b;
while(1)
{
var k=Math.round((f+h)/2);
var s=a.substring(0,k);
var G=y(s).length;
if(b>=G&&b-G<=3)
{
return s
}
else if(G>b)
{
h=k
}
else
{
f=k
}
}
}
return a
}
;
var oa=function(a)
{
if(!a)return null;
var b=new RegExp("<[^>]*>","gi");
return Ab(a.replace(b,""))
}
;
function ca(a)
{
a.selectedIndex=0;
a.blur()
}
function zb(a)
{
var b=j.getTagFeedUrl(p.da())+"?n=1";
var c=new D();
c.n(function()
{
var d=bb(c.document);
a(d.length>=1)
}
);
c.get(b)
}
function aa(a,b,c)
{
if(a.indexOf("?")==-1)
{
a+="?"
}
else
{
a+="&"
}
return a+y(b)+"="+y(c)
}
function ya(a,b)
{
try
{
if(b)
{
t(a,"hidden")
}
else
{
r(a,"hidden")
}
}
catch(c)
{
throw"Cannot set display for node"+(a.id?"with id of '"+a.id+"'":"");
}
}
function Hc(a,b,c)
{
if(a)
{
a+="&"
}
return a+y(b)+"="+y(c)
}
function $()
{
}
$.show=function()
{
t(g("loading-area"),"hidden");
try
{
if(l.currentDrawer.id=="subscriptions")
{
r(g("loading-area"),"with-open-drawer")
}
}
catch(a)
{
}
}
;
$.hide=function()
{
r(g("loading-area"),"hidden");
t(g("loading-area"),"with-open-drawer");
t(g("chrome"),"invisible")
}
;
function x()
{
}
x.currentTimeout=null;
x.step=0;
x.TOTAL_STEPS=25;
x.MIN_OPACITY=0.5;
x.start=function()
{
x.step=0;
x.currentTimeout=window.setTimeout(x.update,Ra)
}
;
x.stop=function()
{
window.clearTimeout(x.currentTimeout);
x.setOpacity(1)
}
;
x.update=function()
{
var a=x.TOTAL_STEPS;
var b=x.MIN_OPACITY+(1-x.MIN_OPACITY)*Math.abs((x.step%(2*a)-a)/a);
x.setOpacity(b);
x.step++;
x.currentTimeout=window.setTimeout(x.update,Ra)
}
;
x.setOpacity=function(a)
{
var b=g("logo");
b.style.MozOpacity=a;
b.style.opacity=a;
b.style.filter="filter: alpha(opacity="+Math.round(a*100)+")"
}
;
function Mc()
{
var a=this;
var b=a.T;
if(!b.value)
{
jb(function(c)
{
b.value=c;
a.submit()
}
);
return false
}
else
{
return true
}
}
var Gc=/[^a-z0-9_-]/;
function wa(a)
{
if(Eb(a))return[];
var b=[];
a=Ba(a);
var c=a.split(/\s*,\s*/);
for(var d=0;
d<c.length;
d++)
{
var e=c[d];
e=oa(e);
e=e.replace(/[\s\/\-]/g,"-");
e=e.toLowerCase();
if(e.search(Gc)!=-1)
{
throw O(_MSG_ILLEGAL_TAG_NAME,e);
}
b.push(e)
}
return b
}
function yb(a)
{
if(!a)
{
return
}
if(a.indexOf("x-")==0)
{
a=a.substring(2)
}
var b=a.split("/");
return ea(b[0]).toLowerCase()
}
;
// Input 4
var E=new Object();
function L(a)
{
Ha(window,"load",a,false)
}
function Wb(a)
{
Ha(window,"resize",a,false)
}
function Xb()
{
var a=E;
for(var b in a)
{
ja(b,a[b])
}
}
function ja(a,b)
{
try
{
var c=g(a)
}
catch(d)
{
Wa("could not find object '"+a+'"')
}
Ha(c,b.event,b.func,false)
}
function Ha(a,b,c,d)
{
try
{
if(a.addEventListener)
{
a.addEventListener(b,c,d);
if(b=="click")
{
a.onclick=function()
{
return false
}
}
}
else if(a.attachEvent)
{
var e=function()
{
c();
return false
}
;
return a.attachEvent("on"+b,e)
}
}
catch(f)
{
var h=a?a.id:a;
Wa(b+" handler could not be attached to '"+h+"' object")
}
}
function cb(a)
{
if(typeof a.srcElement!="undefined")
{
return a.srcElement
}
else
{
return a.target
}
}
function Ia(a)
{
return!a?window.event:a
}
;
// Input 5
var Ca=fa+"/edit-subscription";
var Kb=fa+"/edit-tag";
function C(a,b,c)
{
this.streamId=a;
this.itemId=b;
this.onLoadFunc=c
}
C.prototype.j=function()
{
return
{
"EDIT_TAGS":
{
"name":"edit-tags","msgFunc":this.sb,"url":Kb
}
,"SUBSCRIBE":
{
"name":"subscribe","msgFunc":this.gb,"url":Ca
}
,"UNSUBSCRIBE":
{
"name":"unsubscribe","msgFunc":this.lb,"url":Ca
}
,"EDIT_SUBSCRIPTION":
{
"name":"edit","msgFunc":this.hb,"url":Ca
}
}
}
;
C.prototype.l=function(a)
{
return this.type.msgFunc(a,this.streamId)
}
;
C.prototype.sb=function(a,b)
{
return false
}
;
C.prototype.lb=function(a,b)
{
return O(_MSG_UNSUBSCRIBED,a)
}
;
C.prototype.hb=function(a,b)
{
return O(_MSG_SUBSCRIPTION_EDITED,a)
}
;
C.prototype.gb=function(a,b)
{
var c=[];
c.push(O(_MSG_SUBSCRIBED,a));
c.push(vb(ia,_MSG_SUBSCRIBED_LINK));
return c.join(" ")
}
;
C.prototype.Za=function()
{
var a=[];
a.push("s="+y(this.streamId));
a.push("i="+y(this.itemId));
a.push("ac="+this.type.name);
if(this.title)
{
a.push("t="+this.title)
}
for(var b=0;
b<this.addTags.length;
b++)
{
var c=this.addTags[b];
if(!(c instanceof w))
{
c=p.v(c)
}
a.push("a="+y(c.a()))
}
for(var b=0;
b<this.removeTags.length;
b++)
{
var c=this.removeTags[b];
if(!(c instanceof w))
{
c=p.v(c)
}
a.push("r="+y(c.a()))
}
return a.join("&")
}
;
C.prototype.exec=function(a,b,c)
{
var d=this;
var e=new D();
e.n(function()
{
if(e.status==200)
{
var f=d.l(a);
if(f)
{
v(f,v.INFO,S)
}
if(d.onLoadFunc)
{
d.onLoadFunc()
}
}
else
{
v(_MSG_SERVER_ERROR,v.ERROR,S)
}
}
);
this.title=a;
this.addTags=b||[];
this.removeTags=c||[];
e.overrideCache=false;
e.post(this.type.url,this.Za())
}
;
// Input 6
function ab(a)
{
return Pb(a,"name")
}
function Pb(a,b)
{
try
{
var c=V(a,"author");
var d=V(c.item(0),b);
var e=d.item(0).childNodes[0].nodeValue;
return e
}
catch(f)
{
return null
}
}
function qa(a)
{
return V(a,"category")
}
function bb(a)
{
return V(a,"entry")
}
function P(a)
{
return Ga(a,"id")
}
function V(a,b)
{
if(!a)
{
throw"Node may not be null when getting '"+b+"' Atom nodes";
}
var c=a.getElementsByTagName(b);
try
{
if(!c.length)c=a.getElementsByTagNameNS("*",b)
}
catch(d)
{
}
return c
}
function Ga(a,b)
{
if(!a.cachedValues_)
{
try
{
a.cachedValues_=
{
}
}
catch(c)
{
}
}
if(a.cachedValues_&&a.cachedValues_[b])
{
return a.cachedValues_[b]
}
var d=Fa(a,b);
try
{
var e=d.childNodes[0].nodeValue
}
catch(c)
{
var e=null
}
try
{
a.cachedValues_[b]=e
}
catch(c)
{
}
return e
}
function Fa(a,b)
{
try
{
return V(a,b).item(0)
}
catch(c)
{
return null
}
}
function Ea(a)
{
return Sb(a,"published")
}
function Rb(a,b)
{
var c=Ga(a,b);
if(!c)return null;
var d=c.split("T");
var e=d[0].split("-");
var f=e[0].replace(/\n/g,"").replace(/\s/g,"");
var h=e[1];
var k=e[2];
var h=h.replace(/^0/,"")-1;
var k=k.replace(/^0/,"");
var s=d[1].split(":");
var G=s[0];
var J=s[1];
var da=s[2].toString().replace(/Z/,"");
var Aa=s[2].toString();
if(isNaN(Aa))
{
da=Aa.substring(0,2)
}
return new Date(f,h,k,G,J,da)
}
function Sb(a,b)
{
var c=Rb(a,b);
return Ic(c)
}
function Q(a,b)
{
var c=V(a,"link");
if(!c)return null;
for(var d=0,e;
e=c[d];
d++)
{
var f=e.getAttribute("rel");
if(f&&f==b||!f&&b==null)
{
return e
}
}
}
function ra(a,b)
{
if(b)
{
var c=Q(a,b)
}
else
{
var c=Q(a,null)
}
try
{
return c.getAttribute("href")
}
catch(d)
{
return null
}
}
function K(a)
{
return oa(ea(Ga(a,"title")))
}
function Qb(a)
{
var b=Fa(a,"content");
if(b)return b;
var c=Fa(a,"summary");
if(c)return c;
return null
}
function ha(a)
{
var b=Qb(a);
var c=document.createElement("div");
var d=Ub(b);
try
{
c.appendChild(d);
c.innerHTML=Ab(c.innerHTML)
}
catch(e)
{
}
return c
}
function U(a)
{
var b=Q(a,"feed");
try
{
return oa(ea(b.getAttribute("title")))
}
catch(c)
{
return null
}
}
function T(a)
{
var b=Q(a,"feed");
try
{
return b.getAttribute("href")
}
catch(c)
{
return null
}
}
function Nb(a,b)
{
var c=a.ownerDocument.createElement("category");
c.setAttribute("term",b.a());
a.appendChild(c)
}
function Ob(a,b)
{
var c=qa(a);
for(var d=0;
d<c.length;
d++)
{
var e=c[d].getAttribute("term");
try
{
var f=w.fromExternalForm(e);
if(f.equals(b))
{
a.removeChild(c[d])
}
}
catch(h)
{
}
}
}
function ga(a)
{
var b=qa(a);
var c=[];
var d=[];
for(var e=0;
e<b.length;
e++)
{
var f=b[e].getAttribute("term");
try
{
var h=w.fromExternalForm(f);
d.push(h)
}
catch(k)
{
c.push(f)
}
}
return
{
"tags":d,"authorTags":c
}
}
function Da(a,b)
{
var c=qa(a);
for(var d=0;
d<c.length;
d++)
{
var e=c[d].getAttribute("term");
try
{
if(w.fromExternalForm(e).equals(b))
{
return true
}
}
catch(f)
{
}
}
return false
}
function Za(a)
{
return P(a).substring("feed/".length)
}
function $a(a)
{
return a.getAttribute("isSubscriptionMarker")=="true"
}
;
// Input 7
;
// Input 8
var sa=new Jb();
function Jb()
{
this.IE=function()
{
try
{
return this.Run(document.all&&(!document.contains&&!this.OPERA()))!=false
}
catch(a)
{
if(document.all)return true;
return false
}
}
;
this.IE_5_5_newer=function()
{
try
{
return this.Run(this.IE()&&(Array.prototype.pop&&!this.OPERA()))!=false
}
catch(a)
{
return false
}
}
;
this.IE_5_Mac=function()
{
try
{
return true==undefined
}
catch(a)
{
return(document.all&&(document.getElementById&&(!document.mimeType&&!this.OPERA())))!=false
}
}
;
this.OPERA=function()
{
try
{
return this.Run(window.opera)!=false
}
catch(a)
{
return false
}
}
;
this.MOZILLA=function()
{
try
{
return this.Run(document.implementation&&(document.implementation.createDocument&&(!document.contains&&!this.OPERA())))!=false
}
catch(a)
{
return false
}
}
;
this.SAFARI_1_3=function()
{
try
{
return this.Run(this.SAFARI()&&document.defaultView.getComputedStyle)!=false
}
catch(a)
{
return false
}
}
;
this.SAFARI=function()
{
try
{
return this.Run(document.implementation&&(document.implementation.createDocument&&document.contains))!=false
}
catch(a)
{
return false
}
}
;
this.DOM=function()
{
return document.getElementById
}
;
this.Run=function(a)
{
if(a==undefined)
{
return false
}
else
{
return a
}
}
}
;
// Input 9
function g(a)
{
return document.getElementById(a)
}
function u(a,b)
{
var c=Pc(a,
{
"select":function(d)
{
return za(d,b)
}
}
);
if(c.length==1)
{
return c[0]
}
return c
}
function Ub(a)
{
if(!a)return null;
var b=document.createElement("div");
document.body.appendChild(b);
b.style.display="none";
if(typeof a.xml=="string")
{
b.innerHTML=a.xml
}
else
{
var c=Tb(a);
var d=c.join("");
var e=document.createTextNode(d);
b.appendChild(e)
}
a=b.childNodes[0];
b=null;
return a
}
function Tb(a)
{
var b=[];
var c=function(d)
{
if(d.hasChildNodes())
{
for(var e=0,f;
f=d.childNodes[e];
e++)
{
var h=f.nodeType;
var k=f.innerHTML;
if(k)
{
b.push(k)
}
else if(h==1)
{
c(f)
}
else if(h==3)
{
b.push(f.nodeValue)
}
else if(h==4)
{
b.push(f.nodeValue)
}
}
}
}
;
c(a);
return b
}
;
// Input 10
var Vb=5000;
function l(a,b)
{
this.id=a;
this.customEventHandlers=b||
{
}
;
this.isLoaded=false;
this.isVisible=false;
this.isDisabled=false;
this.listNode=g(a+"-drawer");
this.contentsNode=g(a+"-drawer-contents");
this.currentEntries=[]
}
l.prototype.N=function()
{
var a=this;
ja(this.listNode.id,
{
"event":"click","func":function()
{
a.select()
}
}
);
for(var b in this.customEventHandlers)
{
ja(b,this.customEventHandlers[b])
}
}
;
l.prototype.select=function()
{
if(this.isDisabled)return;
var a=this;
if(this.isVisible)
{
l.closeCover(this.contentsNode,this.clearedNodeVisibilities,function()
{
a.hide()
}
);
l.currentDrawer=null
}
else
{
var b=l.currentDrawer?l.currentDrawer.contentsNode:null;
l.closeCover(b,null,function()
{
if(l.currentDrawer)
{
l.currentDrawer.hide()
}
l.currentDrawer=a;
a.show();
l.openCover(a.contentsNode)
}
)
}
}
;
l.prototype.hide=function()
{
this.listNode.className="";
r(this.contentsNode,"hidden");
this.isVisible=false
}
;
l.prototype.show=function()
{
this.listNode.className="selected";
t(this.contentsNode,"hidden");
this.isVisible=true;
var a=this;
window.setTimeout(function()
{
a.refresh(a.isLoaded)
}
,0)
}
;
l.prototype.refresh=function(a)
{
if(a)
{
this.display(this.filter(this.currentEntries))
}
else
{
this.Nb();
this.load()
}
}
;
l.prototype.load=function(a)
{
if(_IS_INTRO)
{
zb(function(d)
{
if(d)
{
window.location.href=Y
}
}
)
}
if(this.sourceStream)
{
var b=new H(this.sourceStream,250);
var c=this;
b.La(function(d)
{
c.currentEntries=d;
c.currentFetcher=b;
c.isLoaded=true;
if(!a)
{
c.display(c.filter(c.currentEntries))
}
}
)
}
else
{
this.display()
}
}
;
l.prototype.prefetch=function()
{
this.load(true)
}
;
l.prototype.invalidate=function()
{
this.isLoaded=false
}
;
l.prototype.Nb=function()
{
try
{
if(this.clearedNodeVisibilities)
{
for(var a=0,b;
b=this.clearedNodeVisibilities[a];
a++)
{
ya(b.obj,b.show)
}
}
t(g(this.id+"-loading-message"),"hidden")
}
catch(c)
{
}
m.resize()
}
;
l.prototype.pb=function()
{
try
{
r(g(this.id+"-loading-message"),"hidden")
}
catch(a)
{
}
}
;
l.prototype.filter=function(a)
{
return a
}
;
l.initialize=function()
{
this.HOME=new Ja();
this.SUBSCRIPTIONS=new o();
this.CONTACTS=new l("contacts");
this.READ=new Ma();
this.STARRED=new Na();
this.DRAWERS=[this.HOME,this.SUBSCRIPTIONS,this.CONTACTS,this.READ,this.STARRED];
this.currentDrawer=this.HOME;
this.N();
this.coverNode=g("drawer-contents-cover");
var a=this;
window.setTimeout(function()
{
a.SUBSCRIPTIONS.prefetch()
}
,Vb);
if(_IS_INTRO)
{
for(var b=0,c;
c=this.DRAWERS[b];
b++)
{
if(c.id!="subscriptions")
{
c.isDisabled=true
}
}
}
}
;
l.N=function()
{
for(var a=0;
a<this.DRAWERS.length;
a++)
{
this.DRAWERS[a].N()
}
}
;
l.openCover=function(a,b)
{
l.animateOpenClose(a.offsetHeight,"closed","open",b)
}
;
l.closeCover=function(a,b,c)
{
if(b)
{
for(var d=0,e;
e=b[d];
d++)
{
ya(e.obj,e.show)
}
}
l.animateOpenClose(0,"open","closed",c);
setTimeout(function()
{
m.resize()
}
,500)
}
;
l.animateOpenClose=function(a,b,c,d)
{
var e=this;
this.coverNode.style.overflow="hidden";
Ta(
{
"id":"drawer-open-close","start":this.coverNode.offsetHeight,"end":a,"runTime":50*Sa(this.coverNode.offsetHeight,a),"updateFunc":function(f)
{
if(f==a)
{
e.coverNode.style.height="";
t(e.coverNode,b);
r(e.coverNode,c);
e.coverNode.style.overflow="";
if(d)
{
d()
}
}
else
{
e.coverNode.style.height=f+"px"
}
m.resize(false,10)
}
}
)
}
;
function Ja()
{
l.call(this,"home");
this.sourceStream=null
}
xa(Ja,l);
Ja.prototype.display=function()
{
n.renderReadingList()
}
;
function Na()
{
l.call(this,"starred");
this.sourceStream=null
}
xa(Na,l);
Na.prototype.display=function()
{
n.renderStarred()
}
;
function Ma()
{
l.call(this,"read");
this.sourceStream=null
}
xa(Ma,l);
Ma.prototype.display=function()
{
n.renderRead()
}
;
// Input 11
var zc=8;
var xc=100;
var Ac=
{
"name":function(a)
{
var b=K(a);
return b||"<em>"+_MSG_UNTITLED_SUBSCRIPTION+"</em>"
}
,"feed-url":function(a)
{
try
{
return Za(a)
}
catch(b)
{
return null
}
}
}
;
var yc=
{
"name":function(a)
{
return a
}
,"feed-url":function(a)
{
}
}
;
function o()
{
this.prefix="drawer-browser-";
this.labels=[];
this.subscriptions=[];
this.labelsColumn=g(this.prefix+"labels");
this.subscriptionsColumn=g(this.prefix+"subscriptions");
this.listNodeLabels=u(this.labelsColumn,this.prefix+"list");
this.listNodeSubs=u(this.subscriptionsColumn,this.prefix+"list");
this.subscriptionForms=
{
}
;
this.subscriptionForms["add"]=
{
"obj":g(this.prefix+"add")
}
;
this.subscriptionForms["edit"]=
{
"obj":g(this.prefix+"edit")
}
;
this.subscriptionForms["import"]=
{
"obj":g(this.prefix+"import")
}
;
this.clearedNodeVisibilities=[
{
"obj":this.subscriptionsColumn,"show":false
}
,
{
"obj":this.labelsColumn,"show":false
}
];
this.filledNodeVisibilities=[
{
"obj":this.labelsColumn,"show":true
}
,
{
"obj":this.subscriptionsColumn,"show":true
}
,
{
"obj":this.listNodeSubs,"show":true
}
,
{
"obj":this.listNodeLabels,"show":true
}
];
for(var a in this.subscriptionForms)
{
this.filledNodeVisibilities.push(
{
"obj":this.subscriptionForms[a].obj,"show":false
}
)
}
this.moreActions=g("drawer-browser-more-actions");
l.call(this,"subscriptions",this.Ta());
this.sourceStream=j.fromTag(p.da());
ca(this.moreActions);
this.order=null;
var b=this;
A.getPref(function(c)
{
b.qa(c,true)
}
)
}
xa(o,l);
o.prototype.Ta=function()
{
var a=
{
}
;
var b=this;
a["drawer-browser-expand"]=
{
"event":"click","func":function()
{
t(b.listNodeLabels,"collapsed");
t(b.listNodeSubs,"collapsed");
return false
}
}
;
a["drawer-browser-collapse"]=
{
"event":"click","func":function()
{
r(b.listNodeLabels,"collapsed");
r(b.listNodeSubs,"collapsed");
return false
}
}
;
a["subscriptions-add"]=
{
"event":"click","func":this.S()
}
;
a["subscriptions-filter-input"]=
{
"event":"keyup","func":function()
{
b.Qb()
}
}
;
a["drawer-browser-more-actions"]=
{
"event":"change","func":function()
{
b.Ab(g("drawer-browser-more-actions"))
}
}
;
return a
}
;
o.prototype.Xa=function()
{
var a=
{
}
;
for(var b in A.ORDERS)
{
var c=A.ORDERS[b];
a[c.p()]=c.L(this)
}
a["drawer-import"]=this.J();
a["drawer-export"]=function()
{
Va(window,nc,null,null,_MSG_POPUP_BLOCKED)
}
;
return a
}
;
o.prototype.Ja=function(a)
{
var b=this.Xa()[a];
b()
}
;
o.prototype.Ab=function(a)
{
var b=a.options[a.selectedIndex].id;
if(!b)return;
this.Ja(b)
}
;
o.prototype.qa=function(a,b)
{
this.order=a;
if(!b)
{
A.setPref(a);
this.refresh(true)
}
}
;
o.prototype.Na=function()
{
var a=this;
return function()
{
a.filterValue=(g("subscriptions-filter-input").value="");
ca(a.moreActions);
a.load();
n.renderTagStream(p.i());
return false
}
}
;
o.prototype.Ha=function(a)
{
var b=[];
for(var c in this.subscriptionsByLabel)
{
b.push(c)
}
b.sort();
this.listNodeLabels.innerHTML="";
var d=this;
this.D(
{
"collection":b,"container":this.listNodeLabels,"callback":function(f)
{
return d.ba(f,d.subscriptionsByLabel[f])
}
}
);
var e=this.ba(_MSG_DRAWER_ALL);
this.oa(e,1);
e.onclick=this.Na();
this.listNodeLabels.insertBefore(e,this.listNodeLabels.firstChild)
}
;
o.prototype.Q=function()
{
var a=this.subscriptions;
this.listNodeSubs.innerHTML="";
var b=this;
this.D(
{
"collection":a,"container":this.listNodeSubs,"callback":function(c)
{
return b.jb(c)
}
}
);
g("subscriptions-total").innerHTML=a.length>0?"("+a.length+")":"";
this.wb()
}
;
o.prototype.wb=function()
{
this.listNodeSubs.scrollTop=0
}
;
o.prototype.D=function(a)
{
if(!a.currentItemIndex)
{
a.currentItemIndex=0
}
var b=0;
for(var c;
(c=a.collection[a.currentItemIndex])||a.currentItemIndex<zc;
a.currentItemIndex++)
{
this.ya(a.callback(c),a.container,a.currentItemIndex);
b++;
if(b>xc)
{
var d=this;
window.setTimeout(function()
{
d.D(a)
}
,0);
return
}
}
}
;
o.prototype.ya=function(a,b,c)
{
this.oa(a,c);
b.appendChild(a)
}
;
o.prototype.oa=function(a,b)
{
if(b%2!=0)
{
r(a,"mod")
}
}
;
o.prototype.P=function(a,b)
{
var c=g(b);
if(c)c.id="";
a.id=b
}
;
o.prototype.aa=function(a)
{
return N(a,yc,"drawer-row-template")
}
;
o.prototype.ib=function(a)
{
return N(a,Ac,"drawer-row-template")
}
;
o.prototype.X=function()
{
var a=this.aa("
");
u(a,"item").onclick=function()
{
return false
}
;
a.onclick=null;
return a
}
;
o.prototype.ba=function(a,b)
{
if(!a)return this.X();
var c=this.aa(a);
var d=u(c,"item");
var e=p.v(a);
var f=e.a();
var h=this;
d.href=Y+f;
d.onclick=function()
{
return false
}
;
c.onclick=function()
{
h.subscriptions=b;
h.r();
h.Q();
h.P(c,"drawer-labels-row-selected");
n.renderStream(new j(f))
}
;
return c
}
;
o.prototype.jb=function(a)
{
if(!a)return this.X();
var b=this.ib(a);
this.Ba(a,b);
return b
}
;
o.prototype.Ba=function(a,b)
{
var c=u(b,"edit");
var d=u(b,"url");
var e=u(b,"item");
t(c,"hidden");
t(d,"hidden");
var f=P(a);
var h=this;
e.href=Y+f;
c.href="";
c.onclick=this.Sa(b,f);
d.onclick=(e.onclick=function()
{
n.renderStream(new j(f));
h.P(b,"drawer-subs-row-selected");
return false
}
)
}
;
o.prototype.filter=function(a)
{
var b=[];
var c=this.filterValue;
var d=p.i();
for(var e=0;
e<a.length;
e++)
{
var f=a[e];
var h=qa(f);
var k=c?K(f).toLowerCase().indexOf(c)!=-1:true;
var s=false;
var G=false;
for(var J=0;
J<h.length;
J++)
{
try
{
var da=w.fromExternalForm(h[J].getAttribute("term"));
if(da.equals(d))
{
G=true
}
else if(c&&(da.type==Z&&da.w().toLowerCase().indexOf(c)!=-1))
{
s=true
}
}
catch(Aa)
{
}
}
if(G&&(k||s))
{
b.push(f)
}
}
return b
}
;
o.prototype.Qb=function()
{
this.filterValue=g("subscriptions-filter-input").value.toLowerCase();
if(this.filterTimeout)
{
window.clearTimeout(this.filterTimeout)
}
var a=this;
this.filterTimeout=window.setTimeout(function()
{
a.filterTimeout=null;
a.refresh(true)
}
,300)
}
;
o.prototype.display=function(a)
{
this.subscriptionsByLabel=
{
}
;
this.subscriptionsById=
{
}
;
for(var b=0,c;
c=a[b];
b++)
{
this.subscriptionsById[P(c)]=c;
var d=ga(c).tags;
for(var e=0;
e<d.length;
e++)
{
var f=d[e];
if(f.type==Z)
{
var h=f.w();
if(!Eb(h))
{
if(!this.subscriptionsByLabel[h])
{
this.subscriptionsByLabel[h]=[]
}
this.subscriptionsByLabel[h].push(c)
}
}
}
}
this.subscriptions=this.order?this.order.sortingFunc(a):a;
this.setAllLabelsSelected=true;
this.fill();
this.pb()
}
;
o.prototype.fill=function(a)
{
this.Ha(a);
this.Q();
if(this.setAllLabelsSelected)
{
this.rb(0);
this.setAllLabelsSelected=false
}
for(var b=0,c;
c=this.filledNodeVisibilities[b];
b++)
{
ya(c.obj,c.show)
}
}
;
o.prototype.rb=function(a)
{
var b=this.listNodeLabels.getElementsByTagName("li")[a];
this.P(b,"drawer-labels-row-selected")
}
;
o.prototype.Sa=function(a,b)
{
var c=this.subscriptionsById[b];
if(!c)return function()
{
}
;
var b=P(c);
var d=K(c);
var e=ga(c).tags;
var f=Za(c);
var h=qb(e);
var k=this;
return function()
{
r(k.listNodeSubs,"hidden");
t(k.subscriptionForms["edit"].obj,"hidden");
g("subscriptions-edit-title").innerHTML=d;
g("subscriptions-edit-feed-url").innerHTML=f;
g("subscriptions-edit-labels").value=h.join(", ");
g("subscriptions-edit-save").onclick=k.ca(b,d,h);
eb(g("subscriptions-edit-labels"),k.ca(b,d,h));
g("subscriptions-edit-cancel").onclick=k.G();
g("subscriptions-edit-unsubscribe").onclick=k.kb(b,d);
return false
}
}
;
o.prototype.r=function()
{
for(var a in this.subscriptionForms)
{
r(this.subscriptionForms[a].obj,"hidden");
t(this.listNodeSubs,"hidden")
}
}
;
o.prototype.ca=function(a,b,c)
{
var d=this;
return function()
{
var e=new C(a,null,function()
{
r(d.subscriptionForms["edit"].obj,"hidden");
d.load()
}
);
e.type=e.j().EDIT_SUBSCRIPTION;
var f=g("subscriptions-edit-title").innerHTML;
try
{
var h=wa(g("subscriptions-edit-labels").value)
}
catch(k)
{
alert(k);
return false
}
var s=Qa(c,h);
e.exec(f,s.addTags,s.removeTags);
return false
}
}
;
o.prototype.G=function()
{
var a=this;
return function()
{
a.r();
return false
}
}
;
o.prototype.S=function()
{
var a=this;
return function()
{
a.r();
r(a.listNodeSubs,"hidden");
t(a.subscriptionForms["add"].obj,"hidden");
g("subscriptions-add-preview").onclick=a.ab();
g("subscriptions-add-cancel").onclick=a.G();
g("subscriptions-import").onclick=a.J()
}
}
;
o.prototype.J=function()
{
var a=this;
return function()
{
a.r();
r(a.listNodeSubs,"hidden");
ya(a.subscriptionForms["import"].obj,true);
g("import-cancel").onclick=a.G();
return false
}
}
;
o.prototype.ab=function()
{
return function()
{
var a=g("subscriptions-add-url").value;
var b=pc;
window.location.href=b+"*/"+"feed/"+a
}
}
;
o.prototype.kb=function(a,b)
{
var c=this;
return function()
{
if(confirm(_MSG_UNSUBSCRIBE_CONFIRM))
{
var d=new C(a,null,function()
{
r(c.subscriptionForms["edit"].obj,"hidden");
c.load()
}
);
d.type=d.j().UNSUBSCRIBE;
d.exec(b)
}
return false
}
}
;
// Input 12
function _FR_chromeMain(a,b)
{
if(!_IS_INTRO)L($.show);
if(!_IS_INTRO)L(z.initialize);
L(Xb);
L(function()
{
if(g("drawer"))l.initialize()
}
);
L(function()
{
i.initialize()
}
);
if(a)
{
L(cc)
}
p=new F(b)
}
function _FR_finderMain(a)
{
L(ac);
p=new F(a)
}
var _FR_Import_success=hc;
var _FR_Import_failure=fc;
// Input 13
var db=[];
function ac()
{
$b(dc);
ec(Yb)
}
function $b(a)
{
if(!g("results"))
{
return
}
var b=g("results").getElementsByTagName("div");
for(var c=0,d;
d=b[c];
c++)
{
if(za(d,"result"))
{
a(d)
}
}
}
function dc(a)
{
db.push(bc(a))
}
function bc(a)
{
var b;
try
{
b=oa(u(a,"result-title").innerHTML).replace(/\n/g,"")
}
catch(c)
{
throw"Could not parse feed finder result title.";
}
var d=u(a,"result-feed-url").innerHTML;
var e=u(a,"result-tags-input");
var f=u(a,"subscribe");
return
{
"TITLE":b,"FEED_URL":d,"TAGS_INPUT":e,"SUBSCRIBE_BUTTON":f
}
}
function ec(a)
{
for(var b=0,c;
c=db[b];
b++)
{
a(c)
}
}
function Yb(a)
{
a.SUBSCRIBE_BUTTON.onclick=function()
{
var b=new C("feed/"+a.FEED_URL,null);
b.type=b.j().SUBSCRIBE;
window.scroll(0,0);
try
{
var c=wa(a.TAGS_INPUT.value)
}
catch(d)
{
alert(d);
return false
}
var e=Qa([],c);
b.exec(a.TITLE,e.addTags,e.removeTags)
}
}
function cc()
{
var a=oc+"?q="+_PREVIEW_QUERY;
var b=vb(a,_MSG_RETURN_TO_SEARCH);
v(b,v.INFO)
}
function Zb()
{
g("web-search-input").value=g("search-input").value;
return true
}
L(function()
{
g("web-search-form").onsubmit=Zb
}
);
// Input 14
function gc()
{
l.currentDrawer.r();
ca(l.currentDrawer.moreActions);
v(_MSG_IMPORT_PROGRESS,v.INFO)
}
function hc()
{
v(_MSG_IMPORT_SUCCESS,v.INFO,S);
l.currentDrawer.refresh()
}
function fc()
{
v(_MSG_IMPORT_FAILURE,v.ERROR)
}
L(function()
{
var a=g("import-form");
if(a)
{
a.onsubmit=function()
{
if(!sa.SAFARI())
{
gc()
}
return Mc.apply(a)
}
}
}
);
// Input 15
function kc()
{
document.onkeypress=function(a)
{
a=Ia(a);
if(ic(a))return true;
if(a.ctrlKey||(a.shiftKey||(a.altKey||a.metaKey)))return true;
var b=a.charCode?a.charCode:a.keyCode;
var c=String.fromCharCode(b);
var d=
{
"j":function()
{
m.down()
}
,"k":function()
{
m.up()
}
,"n":function()
{
m.ka()
}
,"p":function()
{
m.la()
}
,"h":function()
{
m.top()
}
,"o":function()
{
m.ta()
}
,"r":function()
{
m.refresh()
}
,"s":function()
{
m.A(m.currentItemIndex)
}
,"v":function()
{
Cb().qb()
}
}
;
if(c in d)
{
d[c]();
window.scroll(0,0);
try
{
a.preventDefault()
}
catch(a)
{
}
}
}
;
jc()
}
function ic(a)
{
try
{
var b=cb(a);
if(b.nodeName.toLowerCase()=="input")
{
if(b.type=="text"||b.type=="password")
{
return true
}
else
{
return false
}
}
else if(b.nodeName.toLowerCase()=="textarea")
{
return true
}
else
{
return false
}
}
catch(a)
{
return false
}
}
function jc()
{
try
{
if(!sa.IE())document.f.h.focus()
}
catch(a)
{
}
}
function eb(a,b)
{
a.onkeypress=function(c)
{
c=Ia(c);
var d=c.charCode?c.charCode:c.keyCode;
var e=String.fromCharCode(d);
if(d!=13)
{
return
}
b()
}
}
;
// Input 16
E["source-actions-select"]=
{
"event":"change","func":function()
{
(new W(g("source-actions-select"))).zb()
}
}
;
function W(a)
{
var b=this;
this.sel=a;
this.ACTIONS_MAP=
{
"UNSUBSCRIBE":function()
{
b.unsubscribe()
}
,"BLOG_THIS":function()
{
ca(b.sel);
I.Da()
}
,"EMAIL_THIS":function()
{
ca(b.sel);
I.nb()
}
}
}
W.prototype.Ra=function()
{
return m.H()
}
;
W.prototype.c=function()
{
return m.c()
}
;
W.prototype.Ma=function()
{
var a=this;
return new C(this.Ra().url,null,function()
{
ca(a.sel)
}
)
}
;
W.prototype.zb=function()
{
var a=this.sel.options[this.sel.selectedIndex].value;
if(!a||a.length==0)return;
this.ACTIONS_MAP[a]()
}
;
W.prototype.unsubscribe=function()
{
if(confirm(_MSG_UNSUBSCRIBE_CONFIRM))
{
var a=this.Ma();
a.type=a.j().UNSUBSCRIBE;
a.exec(U(this.c()))
}
}
;
// Input 17
var Lb=fa+"/get-preference";
var Mb=fa+"/set-preference";
var ta=
{
}
;
function Ka(a,b)
{
if(ta[a])
{
b(ta[a]);
return
}
var c=new D();
c.n(function()
{
if(c.status==200)
{
var d=c.text;
ta[a]=d;
b(d)
}
else
{
v(_MSG_SERVER_ERROR,v.ERROR,S)
}
}
);
c.get(Lb+"?k="+y(a))
}
function La(a,b,c)
{
ta[a]=b;
var d=new D();
d.n(function()
{
if(d.status==200)
{
if(c)
{
c()
}
}
else
{
v(_MSG_SERVER_ERROR,v.ERROR,S)
}
}
);
d.overrideCache=false;
d.post(Mb,"k="+y(a)+"&"+"v="+y(b))
}
function B(a,b)
{
this.id=a;
this.param=b
}
B.prototype.p=function()
{
return"order-by-"+this.id
}
;
B.prototype.K=function()
{
return g(this.p())
}
;
B.prototype.L=function()
{
var a=this;
return function()
{
m.y(a)
}
}
;
B.getPref=function(a)
{
Ka(kb,function(b)
{
a(B.RANKINGS[b])
}
)
}
;
B.setPref=function(a)
{
La(kb,a.id)
}
;
B.RANKINGS=
{
}
;
B.addRanking=function(a,b)
{
B.RANKINGS[a]=new B(a,b)
}
;
B.addRanking("magic","m");
B.addRanking("date","d");
function fb(a)
{
Ka(lb,function(b)
{
a(b=="true")
}
)
}
function qc(a)
{
La(lb,a.toString())
}
function A(a,b,c)
{
this.id=a;
this.insertTagBreaks=b;
this.sortingFunc=c
}
A.prototype.p=function()
{
return"subscriptions-sorting-"+this.id
}
;
A.prototype.K=function()
{
return g(this.p())
}
;
A.prototype.L=function()
{
var a=this;
return function()
{
l.SUBSCRIPTIONS.qa(a);
return false
}
}
;
A.getPref=function(a)
{
Ka(mb,function(b)
{
a(A.ORDERS[b])
}
)
}
;
A.setPref=function(a)
{
La(mb,a.id)
}
;
A.ORDERS=
{
}
;
A.addOrder=function(a,b,c)
{
A.ORDERS[a]=new A(a,b,c)
}
;
A.addOrder("creation",false,function(a)
{
return a
}
);
A.addOrder("name",false,function(a)
{
return a.sort(A.titleComparator)
}
);
A.titleComparator=function(a,b)
{
var c=ea((K(a)||"").toLowerCase());
var d=ea((K(b)||"").toLowerCase());
if(c==d)
{
return 0
}
else if(c<d&&c||!d)
{
return-1
}
else
{
return 1
}
}
;
// Input 18
var la=1;
var sc=la+1;
var uc=210;
var tc=250;
var ka=
{
"site-title":U,"return-title":function(a)
{
var b=p.i();
var c=z.drawerStream;
if(c)
{
b=w.fromExternalForm(c.url)
}
return b.l(va.DEFAULT).toLowerCase()
}
,"title":function(a)
{
var b=K(a);
if(b)return b;
return ba(ha(a).innerHTML,100)
}
,"author":ab,"date":Ea,"body":ha
}
;
var rc=
{
"caption":function(a)
{
return U(a)||""
}
}
;
var gb=
{
"caption":Ea,"return-title":function(a)
{
}
}
;
var vc=
{
"site-title":function(a)
{
var b=w.fromExternalForm(z.current.url);
return b.l(va.DEFAULT)
}
,"return-title":function(a)
{
return p.i().l(va.DEFAULT).toLowerCase()
}
}
;
function i(a)
{
this.currentItemIndex=0;
this.position=0;
this.listCoverNode=g("reading-list-cover");
this.listNode=g("reading-list");
this.topFillerNode=g("reading-list-top-filler");
this.lensNode=g("lens");
this.itemTemplateId=a;
this.isCurrentItemRead=false;
this.pageSize=0;
this.stream=null;
this.streamFetcher=null;
this.itemNodes=
{
}
;
this.viewBounds=this.M();
this.Rb();
this.tb();
this.mode=i.Mode.TAG;
this.currentRanking=null;
var b=this;
B.getPref(function(c)
{
b.y(c,true)
}
);
this.readItemsVisible=false;
fb(function(c)
{
b.z(c,true)
}
)
}
i.prototype.tb=function()
{
this.lensNode.style.height=(g("lens-cover-left").style.height=(g("lens-cover-right").style.height=this.itemHeight+"px"));
this.lensNode.style.top=this.listCoverNode.offsetTop+la*this.itemHeight+"px"
}
;
i.prototype.Rb=function()
{
this.listNode.innerHTML="";
this.baseHeight=g("queue-container").offsetHeight;
for(var a=0;
a<10;
a++)
{
var b=g(this.itemTemplateId).cloneNode(true);
b.style.visibility="hidden";
this.listNode.appendChild(b)
}
this.itemHeight=this.listNode.offsetHeight/10;
if(sa.MOZILLA()||sa.SAFARI())
{
this.itemHeight+=1
}
this.listNode.innerHTML="";
this.listNode.appendChild(this.topFillerNode)
}
;
i.prototype.fill=function(a)
{
kc();
this.clear();
this.stream=a;
this.streamFetcher=new H(a,20,10);
this.mode=a.bb();
this.k(0,true);
this.Aa()
}
;
i.prototype.Aa=function()
{
if(this.mode.allowsStreamTitleClosure())
{
this.mode.Eb()
}
else
{
this.mode.topTitleMarker.clear()
}
if(this.mode.hideQueueTogglersClosure())
{
r(g("queue-togglers"),"hidden")
}
else
{
t(g("queue-togglers"),"hidden")
}
}
;
i.prototype.clear=function()
{
for(var a in this.itemNodes)
{
var b=this.itemNodes[a];
if(b.parentNode)
{
b.parentNode.removeChild(b)
}
}
if(this.mode)
{
this.mode.Fa()
}
this.itemNodes=
{
}
;
this.currentItemIndex=0;
this.position=0;
this.viewBounds=this.M(true);
if(this.streamFetcher)
{
this.streamFetcher.abort()
}
}
;
i.prototype.resize=function(a,b)
{
var c=Kc();
if(_IS_INTRO)return;
try
{
if(l.currentDrawer.id=="subscriptions")
{
return
}
}
catch(d)
{
}
var e=c.height-this.baseHeight-Db(g("queue-container"));
var f=this.pageSize;
this.pageSize=Math.floor(e/this.itemHeight);
var h=b||sc;
if(this.pageSize<h)
{
this.pageSize=h
}
if(Math.abs(f-this.pageSize)>1)
{
var k=this;
Ta(
{
"id":"queue-resize","start":f,"end":this.pageSize,"runTime":tc*Sa(f,this.pageSize),"updateFunc":function(s)
{
k.listCoverNode.style.height=Math.round(s*k.itemHeight)+"px"
}
}
)
}
else
{
this.listCoverNode.style.height=Math.round(this.pageSize*this.itemHeight)+"px"
}
if(!a)
{
var k=this;
window.setTimeout(function()
{
k.na()
}
,0)
}
}
;
i.prototype.M=function(a)
{
var b=Math.floor(this.position);
var c=b-la-1;
var d=b+this.pageSize-la;
if(this.pageSize==0||a)
{
return
{
"top":c,"bottom":c-1
}
}
else
{
return
{
"top":c,"bottom":d
}
}
}
;
i.prototype.Jb=function(a)
{
var b=a.top-this.viewBounds.top;
var c=a.bottom-this.viewBounds.bottom;
if(b>=0)
{
for(var d=this.viewBounds.bottom+1;
d<=a.bottom;
d++)
{
this.listNode.appendChild(this.e(d))
}
for(var d=this.viewBounds.top;
d<a.top;
d++)
{
this.listNode.removeChild(this.e(d))
}
}
if(c<=0)
{
for(var d=this.viewBounds.top-1;
d>=a.top;
d--)
{
this.listNode.insertBefore(this.e(d),this.topFillerNode.nextSibling)
}
for(var d=this.viewBounds.bottom;
d>a.bottom;
d--)
{
this.listNode.removeChild(this.e(d))
}
}
this.viewBounds=a;
var e=a.top>=0?a.top:0;
this.topFillerNode.style.height=e*this.itemHeight+"px"
}
;
i.prototype.na=function()
{
var a=this.M();
if(a.top!=this.viewBounds.top||a.bottom!=this.viewBounds.bottom)
{
this.Jb(a)
}
}
;
i.prototype.e=function(a)
{
if(!this.itemNodes[a])
{
var b=document.createElement("li");
b.className="loading";
this.itemNodes[a]=b;
this.vb(a)
}
return this.itemNodes[a]
}
;
i.prototype.vb=function(a)
{
if(!this.streamFetcher)return;
var b=this;
this.streamFetcher.o(a,function(c)
{
if(!b.streamFetcher.m())
{
$.hide();
if(b.streamFetcher.d()==0)
{
b.B();
Cb().ua(b.stream)
}
}
b.B();
if(c==null)
{
var d=b.itemNodes[a];
if(d)
{
r(d,"hidden")
}
if(!b.streamFetcher.m()&&b.currentItemIndex>=b.streamFetcher.d())
{
b.k(b.streamFetcher.d()-1)
}
}
else
{
var e=b.Va(c,a);
var d=b.itemNodes[a];
if(d.parentNode)
{
d.parentNode.replaceChild(e,d)
}
b.itemNodes[a]=e;
$.hide()
}
}
)
}
;
i.prototype.Va=function(a,b)
{
var c=N(a,this.mode.Wa(),this.itemTemplateId);
var d=new M(c,a);
d.Sb(a);
var e=this;
c.onclick=function(f)
{
if(!d.Ia(f))
{
e.k(b)
}
}
;
if(this.ja(a))
{
ib(c,true)
}
return c
}
;
i.prototype.B=function()
{
var a=this.streamFetcher.m()?_MSG_QUEUE_ITEM_COUNT_APPROXIMATE:(this.streamFetcher.d()>0?_MSG_QUEUE_ITEM_COUNT_EXACT:"");
a=O(a,[this.currentItemIndex+1,this.streamFetcher.d()]);
g("queue-item-count").innerHTML=a
}
;
i.prototype.ja=function(a)
{
return Da(a,p.g())
}
;
i.prototype.ia=function(a)
{
return Da(a,p.u())
}
;
i.prototype.k=function(a,b)
{
if(!this.streamFetcher.m()&&a>=this.streamFetcher.d())
{
a=this.streamFetcher.d()-1
}
if(a<0)a=0;
if(!b&&a==this.currentItemIndex)return;
t(this.e(this.currentItemIndex),"current");
if(a!=this.currentItemIndex&&(this.currentItemIndex==this.position&&this.currentItemIndex<this.streamFetcher.d()))
{
if(this.isCurrentItemRead)
{
if(I.sa())
{
this.O(true);
this.x(false)
}
else
{
this.x(true);
this.isCurrentItemRead=false
}
}
else
{
if(I.sa())
{
this.O(true);
this.x(false)
}
else
{
this.O(false);
this.x(true)
}
}
}
this.B();
this.currentItemIndex=a;
this.yb(a)
}
;
i.prototype.yb=function(a)
{
var b=this;
Ta(
{
"id":"queue-scroll","start":b.position,"end":a,"runTime":uc*Sa(b.position,a),"updateFunc":function(c)
{
b.position=c;
b.ub();
if(c==a)
{
b.R()
}
}
}
)
}
;
i.prototype.R=function()
{
if(this.c()==null)
{
var a=this;
window.setTimeout(function()
{
a.R()
}
,50);
return
}
this.B();
this.Tb();
r(this.e(this.currentItemIndex),"current")
}
;
i.prototype.ub=function()
{
this.listNode.style.top=Math.round((-this.position+la)*this.itemHeight)+"px";
this.na()
}
;
i.prototype.Tb=function()
{
var a=this.c();
I.Ga(a);
this.mode.Hb(a);
this.mode.Fb(a);
this.resize();
if(!this.ja(a)&&!this.ia(a))
{
this.Pb(a)
}
else
{
I.va(this.ia(a))
}
}
;
i.prototype.H=function()
{
var a=T(this.c());
return new j(a)
}
;
i.prototype.c=function()
{
var a=null;
this.streamFetcher.o(this.currentItemIndex,function(b)
{
a=b
}
);
return a
}
;
i.prototype.ta=function()
{
n.renderStream(this.H())
}
;
i.prototype.y=function(a,b)
{
if(this.currentRanking)
{
t(this.currentRanking.K(),"selected")
}
r(a.K(),"selected");
this.currentRanking=a;
if(!b)
{
B.setPref(a);
n.renderStream(z.current)
}
}
;
i.prototype.z=function(a,b)
{
var c=g("read-items-"+(this.readItemsVisible?"visible":"hidden"));
t(c,"selected");
var d=g("read-items-"+(a?"visible":"hidden"));
r(d,"selected");
this.readItemsVisible=a;
if(!b)
{
qc(a);
n.renderStream(z.current)
}
}
;
i.prototype.refresh=function()
{
this.fill(this.stream)
}
;
i.prototype.up=function()
{
this.k(this.currentItemIndex-1)
}
;
i.prototype.down=function()
{
this.k(this.currentItemIndex+1)
}
;
i.prototype.top=function()
{
this.k(0)
}
;
i.prototype.la=function()
{
this.k(this.currentItemIndex-this.pageSize+1)
}
;
i.prototype.ka=function()
{
this.k(this.currentItemIndex+this.pageSize-1)
}
;
i.prototype.x=function(a)
{
if(this.mode==i.Mode.PREVIEW)
{
return
}
ib(this.e(this.currentItemIndex),a);
X.setReadState(this.c(),a)
}
;
i.prototype.O=function(a)
{
if(this.mode==i.Mode.PREVIEW)
{
return
}
X.setKeptUnreadState(this.c(),a)
}
;
function ib(a,b)
{
if(b)
{
r(a,"item-read")
}
else
{
t(a,"item-read")
}
}
i.Mode=function(a,b,c,d,e,f,h,k)
{
this.queueModeMap=a;
this.titleTemplateId=c;
this.titleActionClosure=d;
this.streamTitleActionClosure=e;
this.showSubscribeButton=f;
this.hideQueueTogglersClosure=h;
this.allowsStreamTitleClosure=k;
this.subscribeMarker=new R("chrome-subscribe","span",true);
this.subscribeEditMarker=new R("chrome-subscribe-edit","span",false);
this.chromeTitleMarker=new R("source-title","span",true);
this.topTitleMarker=new R("single-only-title","h2",false);
this.titleMarker=b?this.topTitleMarker:this.chromeTitleMarker
}
;
i.Mode.prototype.Wa=function()
{
return Fc([ka,this.queueModeMap])
}
;
i.Mode.prototype.Fb=function(a)
{
this.subscribeMarker.clear();
this.subscribeEditMarker.clear();
if(this.showSubscribeButton)
{
this.subscribeMarker.s();
var b=N(a,ka,"chrome-subscribe-template");
this.subscribeMarker.b().appendChild(b);
var c=b.getElementsByTagName("a")[0];
c.onclick=this.Qa(a);
var d=b.getElementsByTagName("input")[0];
d.onclick=this.Pa(a)
}
}
;
i.Mode.prototype.Pa=function(a)
{
var b=this;
return function()
{
var c="";
var d=U(a);
if(b.subscribeEditMarker.b())
{
var e=b.subscribeEditMarker.b().getElementsByTagName("input");
d=e[0].value;
c=e[1].value
}
b.wa(T(a),d,c)
}
}
;
i.Mode.prototype.Qa=function(a)
{
var b=this;
return function()
{
if(b.isChromeEditOpen)
{
b.C()
}
else
{
b.za(a)
}
return false
}
}
;
i.Mode.prototype.C=function()
{
t(g("source-actions"),"hidden");
this.subscribeEditMarker.clear();
t(this.subscribeMarker.b().getElementsByTagName("a")[0],"edit");
this.isChromeEditOpen=false
}
;
i.Mode.prototype.za=function(a)
{
r(g("source-actions"),"hidden");
var b=N(a,ka,"chrome-subscribe-edit-template");
this.subscribeEditMarker.s();
this.subscribeEditMarker.b().appendChild(b);
var c=this.subscribeEditMarker.b().getElementsByTagName("input");
this.Gb(a,c);
this.isChromeEditOpen=true;
r(this.subscribeMarker.b().getElementsByTagName("a")[0],"edit");
c[0].value=U(a)
}
;
i.Mode.prototype.Gb=function(a,b)
{
var c=this;
b[2].onclick=function()
{
c.wa(T(a),b[0].value,b[1].value);
return false
}
;
b[3].onclick=function()
{
c.C();
return false
}
}
;
i.Mode.prototype.wa=function(a,b,c)
{
var d=this;
try
{
var e=wa(c)
}
catch(f)
{
alert(f);
return
}
var h=new C(a,null,function()
{
d.C()
}
);
h.type=h.j().SUBSCRIBE;
h.exec(b,e,[])
}
;
i.Mode.prototype.Eb=function()
{
this.topTitleMarker.s();
var a=ka;
var b=m.c();
if(z.current.mode.isTagMode)
{
a=vc;
b=new Object()
}
var c=N(b,a,"source-template");
this.topTitleMarker.b().appendChild(c);
if(this.titleActionClosure)
{
ja(this.topTitleMarker.id,
{
"event":"click","func":this.streamTitleActionClosure
}
)
}
}
;
i.Mode.prototype.Hb=function(a)
{
this.titleMarker.s();
var b=N(a,ka,this.titleTemplateId);
this.titleMarker.b().appendChild(b);
if(this.titleActionClosure)
{
ja(this.titleMarker.id,
{
"event":"click","func":this.titleActionClosure
}
)
}
}
;
i.Mode.prototype.Fa=function()
{
this.titleMarker.clear()
}
;
var m=null;
E["queue-up"]=
{
"event":"click","func":function()
{
m.up()
}
}
;
E["queue-down"]=
{
"event":"click","func":function()
{
m.down()
}
}
;
E["queue-top"]=
{
"event":"click","func":function()
{
m.top()
}
}
;
E["queue-page-up"]=
{
"event":"click","func":function()
{
m.la()
}
}
;
E["queue-page-down"]=
{
"event":"click","func":function()
{
m.ka()
}
}
;
E["queue-refresh"]=
{
"event":"click","func":function()
{
m.refresh()
}
}
;
E["read-items-hidden"]=
{
"event":"click","func":function()
{
m.z(false)
}
}
;
E["read-items-visible"]=
{
"event":"click","func":function()
{
m.z(true)
}
}
;
for(var Wc in B.RANKINGS)
{
var Ib=B.RANKINGS[Wc];
E[Ib.p()]=
{
"event":"click","func":Ib.L()
}
}
i.initialize=function()
{
m=hb();
m.resize(true);
Wb(function()
{
m.resize()
}
)
}
;
function hb()
{
if(!m)
{
i.Mode.TAG=new i.Mode(rc,false,"chrome-title-template",function()
{
m.ta()
}
,function()
{
n.renderReadingList();
if(l.currentDrawer)l.currentDrawer.hide()
}
,false,function()
{
var a=z.current;
return a.mode==j.Mode.READ
}
,function()
{
return!(z.current.url==j.getReadingListUrl()&&ma.isRequestStreamRoot())
}
);
i.Mode.SINGLE_FEED=new i.Mode(gb,true,"source-template",function()
{
if(z.drawerStream)
{
n.renderStream(z.drawerStream)
}
else
{
n.renderStream(z.FROM_URL)
}
if(l.currentDrawer)l.currentDrawer.hide()
}
,null,false,function()
{
return false
}
,function()
{
return false
}
);
i.Mode.PREVIEW=new i.Mode(gb,true,"source-template",function()
{
window.location.href=ia
}
,null,true,function()
{
return true
}
,function()
{
return false
}
);
m=new i("queue-entry-template")
}
return m
}
i.prototype.A=function(a)
{
var b=this.e(a);
var c=null;
this.streamFetcher.o(a,function(e)
{
c=e
}
);
if(c==null)
{
throw new Error("Entry should have been fetched already.");
}
var d=new M(b,c);
d.A()
}
;
i.prototype.Pb=function(a)
{
if(this.readTimeout)
{
window.clearTimeout(this.readTimeout)
}
var b=this;
if(_USER_ID)
{
this.readTimeout=window.setTimeout(function()
{
b.isCurrentItemRead=true;
I.va(false);
b.readTimeout=null
}
,700)
}
}
;
function X()
{
}
X.setReadState=function(a,b)
{
if(b)
{
this.editTags(a,[p.g()],[p.u()])
}
else
{
this.editTags(a,[],[p.g()])
}
}
;
X.setKeptUnreadState=function(a,b)
{
if(b)
{
this.editTags(a,[p.u()],[p.g()])
}
else
{
this.editTags(a,[],[p.u()])
}
}
;
X.editTags=function(a,b,c)
{
var d=this.getEditTagsAction(a);
if(d)
{
d.exec(null,b,c)
}
else
{
v(_MSG_SERVER_ERROR,v.ERROR,S)
}
for(var e=0;
e<b.length;
e++)
{
Nb(a,b[e])
}
for(var e=0;
e<c.length;
e++)
{
Ob(a,c[e])
}
}
;
X.getEditTagsAction=function(a)
{
var b;
var c=T(a);
var d=P(a);
if(c&&d)
{
b=new C(c,d,null);
b.type=b.j().EDIT_TAGS
}
return b
}
;
function M(a,b)
{
this.feedUrl=T(b);
this.itemId=P(b);
var c=this.Ka(a);
this.star=c
}
M.prototype.Sb=function(a)
{
if($a(a))
{
this.star.style.visibility="hidden";
return
}
this.star.onclick=this.cb();
if(Da(a,p.q()))
{
this.ra()
}
}
;
M.prototype.ra=function()
{
var a=this.fa();
this.star.className=a.className
}
;
M.prototype.A=function()
{
var a=this.fa();
this.ra();
var b=new C(this.feedUrl,this.itemId);
b.type=b.j().EDIT_TAGS;
b.exec(null,a.getAddTags(),a.getRemoveTags())
}
;
M.prototype.cb=function()
{
var a=this;
return function()
{
a.A(this);
return false
}
}
;
M.prototype.fa=function()
{
var a=this.db();
if(this.star.className==a.STARRED.className)
{
return a.UNSTARRED
}
else
{
return a.STARRED
}
}
;
M.prototype.db=function()
{
return
{
"STARRED":
{
"getAddTags":function()
{
return[p.q()]
}
,"getRemoveTags":function()
{
return[]
}
,"className":"item-star-active"
}
,"UNSTARRED":
{
"getAddTags":function()
{
return[]
}
,"getRemoveTags":function()
{
return[p.q()]
}
,"className":"item-star"
}
}
}
;
M.prototype.Ia=function(a)
{
var b=Ia(a);
var c=cb(b);
return c==this.star
}
;
M.prototype.Ka=function(a)
{
try
{
var b=a.getElementsByTagName("a")[0];
if(b&&b.className.indexOf("item-star")!=-1)
{
return b
}
else
{
return null
}
}
catch(c)
{
return null
}
}
;
// Input 19
var n=new Object();
n.MAXIMUM_ITEM_AGE=1209600;
n.renderReadingList=function()
{
n.renderTagStream(p.i())
}
;
n.renderStarred=function()
{
var a=new j(j.getTagFeedUrl(p.q(),true));
n.renderStream(a,true)
}
;
n.renderRead=function()
{
var a=new j(j.getTagFeedUrl(p.g(),true));
n.renderStream(a,true)
}
;
n.renderTagStream=function(a)
{
var b=new j(j.getTagFeedUrl(a,true));
n.renderStream(b)
}
;
n.setRawFeed=function(a)
{
g("raw-feed-link").href=a.I()
}
;
n.renderStream=function(a,b)
{
z.current=a;
if(b)
{
n.renderStreamFinal(a)
}
else
{
n.renderStreamWithPrefs(a,function(c)
{
n.renderStreamFinal(c)
}
)
}
}
;
n.renderStreamFinal=function(a)
{
if(a.ob())
{
var b=Math.round((new Date()).getTime()/1000)-n.MAXIMUM_ITEM_AGE;
a.Cb(b)
}
n.updateDrawerStream(a);
$.show();
hb().fill(a)
}
;
n.updateDrawerStream=function(a)
{
if(a.mode.isTagMode)
{
z.drawerStream=a
}
if(j.Mode.READING_LIST==a.mode||j.Mode.PREVIEW==a.mode)
{
z.drawerStream=null
}
else if(j.Mode.SINGLE_FEED!=a.mode)
{
z.drawerStream=a
}
}
;
n.renderStreamWithPrefs=function(a,b)
{
var c=Ya(a);
c.ga();
B.getPref(function(d)
{
c.y(d);
fb(function(e)
{
c.Ea();
if(!e)
{
c.xa(p.g())
}
b(c)
}
)
}
)
}
;
// Input 20
var D=function()
{
this.overrideCache=true;
this.xmlhttp=this.mb();
this.Bb(true)
}
;
D.prototype.mb=function()
{
try
{
return new XMLHttpRequest()
}
catch(a)
{
return new ActiveXObject("Msxml2.XMLHTTP")
}
}
;
D.prototype.n=function(a)
{
this.execOnReady=a
}
;
D.prototype.Bb=function(a)
{
if(a)
{
this.async=true;
var b=this;
this.xmlhttp.onreadystatechange=function()
{
if(b.xmlhttp.readyState==4)
{
b.status=b.xmlhttp.status;
b.document=b.xmlhttp.responseXML;
b.text=b.xmlhttp.responseText;
if(b.execOnReady)b.execOnReady(b)
}
}
}
else
{
this.async=false
}
}
;
D.prototype.Ib=function(a)
{
if(this.overrideCache&&a.indexOf("?")==-1)
{
var b=(new Date()).getTime();
a=a+"?"+b
}
this.uri=a
}
;
D.prototype.get=function(a)
{
this.send(a,"GET")
}
;
D.prototype.post=function(a,b)
{
var c=this;
jb(function(d)
{
c.send(a,"POST",Hc(b,"T",d))
}
)
}
;
D.prototype.Db=function(a)
{
try
{
this.xmlhttp.setRequestHeader("Content-Type","application/x-www-form-urlencoded");
this.xmlhttp.setRequestHeader("Content-Length",a.length)
}
catch(b)
{
}
}
;
D.prototype.send=function(a,b,c)
{
if(a)
{
this.Ib(a);
this.xmlhttp.open(b,this.uri,this.async);
if(b=="POST")
{
this.Db(c)
}
this.xmlhttp.send(c);
if(!this.async)
{
this.status=this.xmlhttp.status;
this.document=this.xmlhttp.responseXML;
this.text=this.xmlhttp.responseText;
if(this.execOnReady)this.execOnReady()
}
}
else
{
}
}
;
D.prototype.abort=function()
{
this.xmlhttp.abort()
}
;
function jb(a)
{
var b=(new Date()).getTime();
if(b>_COMMAND_TOKEN_EXPIRES)
{
var c=new D();
c.n(function(d)
{
wc(d.xmlhttp.responseText);
if(a)a(_COMMAND_TOKEN)
}
);
c.get(fa+"/token")
}
else
{
if(a)a(_COMMAND_TOKEN)
}
}
function wc(a)
{
_COMMAND_TOKEN=a;
_COMMAND_TOKEN_EXPIRES=(new Date()).getTime()+1200000
}
;
// Input 21
var ua=lc;
var Y=mc;
function j(a,b)
{
try
{
if(b)a="feed/"+a;
this.url=a.replace(/&
/g,"&")
}
catch(c)
{
this.url=null
}
this.ranking=null;
this.excludedTags=[];
this.ga()
}
j.Mode=function(a,b)
{
this.allowsPrefs=a;
this.isTagMode=b
}
;
j.prototype.ga=function()
{
var a;
if(this.mode instanceof j.Mode)
{
return
}
else if(_PREVIEW_QUERY)
{
a=j.Mode.PREVIEW
}
else if(w.parseTag(this.url))
{
a=j.getTagMode(this)
}
else
{
a=j.Mode.SINGLE_FEED
}
this.mode=a
}
;
j.Mode.PREVIEW=new j.Mode(false);
j.Mode.READ=new j.Mode(false,true);
j.Mode.READING_LIST=new j.Mode(true,true);
j.Mode.STARRED=new j.Mode(false,true);
j.Mode.TAG=new j.Mode(true,true);
j.Mode.SINGLE_FEED=new j.Mode(true);
j.getTagMode=function(a)
{
try
{
var b=w.fromExternalForm(a.url);
if(b.equals(p.g()))
{
return j.Mode.READ
}
else if(b.equals(p.q()))
{
return j.Mode.STARRED
}
else if(b.equals(p.i()))
{
return j.Mode.READING_LIST
}
else
{
return j.Mode.TAG
}
}
catch(c)
{
return null
}
}
;
j.fromTag=function(a)
{
return new j(a.a(),false)
}
;
j.prototype.Y=function()
{
if(this.url==null)return null;
var a=this.url.substring(this.url.indexOf("/",1)+1,this.url.length);
var b=y(a);
return this.url.substring(0,this.url.indexOf("/",1)+1)+b
}
;
j.prototype.I=function()
{
var a;
if(this.url.indexOf(Oa)==32)
{
a=ua+this.url
}
else if(this.url.indexOf(ua)==0)
{
a=this.Y()
}
else
{
a=ua+this.Y()
}
if(this.oldestTimestamp)
{
a=aa(a,"ot",this.oldestTimestamp)
}
if(this.ranking)
{
a=aa(a,"r",this.ranking.param)
}
for(var b=0;
b<this.excludedTags.length;
b++)
{
var c=this.excludedTags[b];
a=aa(a,"xt",c.a())
}
return a
}
;
j.prototype.y=function(a)
{
this.ranking=a
}
;
j.prototype.Cb=function(a)
{
this.oldestTimestamp=a
}
;
j.prototype.Ea=function()
{
this.excludedTags=[]
}
;
j.prototype.xa=function(a)
{
this.excludedTags.push(a)
}
;
j.prototype.ob=function()
{
return this.excludedTags.length>0
}
;
j.prototype.bb=function()
{
if(this.mode==j.Mode.PREVIEW)
{
return i.Mode.PREVIEW
}
else if(this.mode.isTagMode)
{
return i.Mode.TAG
}
else
{
return i.Mode.SINGLE_FEED
}
}
;
j.getTagFeedUrl=function(a,b)
{
var c=b?"":ua;
return c+a.a()
}
;
j.getReadingListUrl=function()
{
return this.getTagFeedUrl(p.i(),true)
}
;
function z()
{
}
z.initialize=function()
{
var a=ma.getStreamUrlFromRequestUrl();
if(!a)a=j.getReadingListUrl();
z.current=(z.FROM_URL=new j(a));
n.renderStream(z.current)
}
;
var ma=new Object();
ma.getStreamUrlFromRequestUrl=function()
{
var a=window.location.pathname+window.location.search;
if(_PREVIEW_QUERY)
{
var b=a.substring(ia.length);
return b.split("/").slice(2).join("/")
}
return a.substring(Y.length)
}
;
ma.isRequestStreamRoot=function()
{
return ma.getStreamUrlFromRequestUrl()==""
}
;
function H(a,b,c)
{
this.stream=a;
this.fetchChunkSize=b;
this.prefetchThreshold=c;
this.fetchedChunks=[];
this.fetchedEntries=[];
this.timeoutRetryCount=0;
this.loadRequest=null
}
H.prototype.m=function()
{
return this.fetchedChunks.length==0||this.W()!=null
}
;
H.prototype.ha=function()
{
return this.loadRequest!=null
}
;
H.prototype.Mb=function(a)
{
return
}
;
H.prototype.W=function()
{
if(this.fetchedChunks.length==0)
{
return null
}
var a=this.fetchedChunks[this.fetchedChunks.length-1];
if(a==null)
{
return null
}
var b=Q(a,"continuation");
if(b==null)
{
return null
}
else
{
return b.getAttribute("href")
}
}
;
H.prototype.F=function(a,b)
{
if(this.ha())
{
throw"Already fetching data for stream: "+this.stream.I();
}
this.loadRequest=new D();
var c=this;
this.loadRequest.n(function()
{
if(c.loadRequest.status>=400)
{
v(_MSG_SERVER_ERROR,v.ERROR,S);
c.ma(null)
}
else
{
c.ma(c.loadRequest.document)
}
c.loadRequest=null;
a()
}
);
var d=this.stream.I();
if(b)
{
d=aa(d,"complete","true")
}
else
{
var e=this.W();
if(e!=null)
{
d=aa(d,"c",e)
}
if(this.fetchChunkSize)
{
d=aa(d,"n",this.fetchChunkSize)
}
}
this.loadRequest.get(d)
}
;
H.prototype.ma=function(a)
{
this.fetchedChunks.push(a);
if(a!=null)
{
var b=bb(a);
for(var c=0;
c<b.length;
c++)
{
this.fetchedEntries.push(b[c])
}
}
}
;
H.prototype.abort=function()
{
if(this.loadRequest)
{
this.loadRequest.abort()
}
this.aborted=true
}
;
H.prototype.o=function(a,b)
{
if(this.aborted)
{
return
}
var c=this;
if(a<0)
{
b(null);
return
}
if(a<this.fetchedEntries.length)
{
b(this.fetchedEntries[a]);
if(this.Mb(a))
{
this.F(function()
{
}
)
}
return
}
if(this.m())
{
if(this.ha())
{
this.timeoutRetryCount++;
window.setTimeout(function()
{
c.timeoutRetryCount=0;
c.o(a,b)
}
,50*this.timeoutRetryCount)
}
else
{
this.F(function()
{
c.o(a,b)
}
)
}
return
}
b(null)
}
;
H.prototype.d=function()
{
return this.fetchedEntries.length
}
;
H.prototype.La=function(a)
{
if(this.m())
{
var b=this;
this.F(function()
{
a(b.fetchedEntries)
}
,true);
return
}
else
{
a(b.fetchedEntries)
}
}
;
// Input 22
var Oa="com.google";
var va=
{
"DEFAULT":"DEFAULT","EMPTY":"EMPTY","EXCLUDES_READ":"EXCLUDES_READ"
}
;
function Qa(a,b)
{
var c=
{
}
;
for(var d=0;
d<b.length;
d++)
{
c[b[d]]=1
}
var e=
{
}
;
for(var d=0;
d<a.length;
d++)
{
var f=a[d];
if(c[f])
{
delete c[f]
}
else
{
e[f]=1
}
}
var h=
{
"addTags":[],"removeTags":[]
}
;
for(var k in c)
{
h.addTags.push(k)
}
for(var k in e)
{
h.removeTags.push(k)
}
return h
}
function qb(a)
{
var b=[];
for(var c=0;
c<a.length;
c++)
{
if(a[c].type==Z)
{
b.push(a[c].w())
}
}
return b
}
function w(a,b,c)
{
this.userId=a;
this.type=b;
this.path=c
}
w.prototype.a=function()
{
var a=[];
a.push("user");
a.push(this.userId);
a.push(this.type);
a=a.concat(this.path);
return a.join("/")
}
;
w.prototype.equals=function(a)
{
if(!a instanceof w)
{
return false
}
return a.a()==this.a()
}
;
w.fromExternalForm=function(a)
{
var b=w.parseTag(a);
if(b)
{
return new w(b[1],b[2],b.slice(3))
}
else
{
throw"Malformed tag from '"+a+"'";
}
}
;
w.parseTag=function(a)
{
var b=a.split("/");
if(b.length<3)
{
return false
}
else if(b[0]=="user")
{
return b
}
else
{
return false
}
}
;
w.prototype.w=function()
{
if(this.type==Z)
{
return this.path[0]
}
else
{
return null
}
}
;
w.prototype.fb=function()
{
if(this.type==Pa)
{
return this.path[1]
}
else
{
return null
}
}
;
w.prototype.l=function(a)
{
if(this.type==Pa)
{
var b=this.fb();
if(b==nb)
{
return _MSG_TAGS.READ[a]
}
else if(b==pb)
{
return _MSG_TAGS.STARRED[a]
}
else if(b==ob)
{
return _MSG_TAGS.READING_LIST[a]
}
}
else
{
var c=Jc("span",this.w(),"label-name");
return O(_MSG_TAGS.LABELED[a],c)
}
}
;
function F(a)
{
this.userId=a
}
F.prototype.i=function()
{
return this.t(ob)
}
;
F.prototype.da=function()
{
return this.$(Cc)
}
;
F.prototype.g=function()
{
return this.t(nb)
}
;
F.prototype.u=function()
{
return this.t(Dc)
}
;
F.prototype.q=function()
{
return this.t(pb)
}
;
F.prototype.Vb=function()
{
return this.$(Bc)
}
;
F.prototype.v=function(a)
{
return new w(this.userId,Z,[a])
}
;
F.prototype.t=function(a)
{
return this.eb(Oa,a)
}
;
F.prototype.eb=function(a,b)
{
return new w(this.userId,Pa,[a,b])
}
;
F.prototype.$=function(a)
{
return this.$a(Oa,a)
}
;
F.prototype.$a=function(a,b)
{
return new w(this.userId,Ec,[a,b])
}
;
var p;
// Input 23
function rb(a)
{
this.root=g(a).cloneNode(true);
this.root.id=""
}
rb.prototype.Ya=function()
{
var a=[];
var b=this.root.getElementsByTagName("ins");
for(var c=0;
c<b.length;
c++)
{
a.push(b[c])
}
return a
}
;
function R(a,b,c)
{
this.id=a;
this.MARKER_SUFFIX="-marker";
this.marker=g(a+this.MARKER_SUFFIX);
this.child=null;
this.childNodeName=b;
this.isFloatChild=c
}
R.prototype.clear=function()
{
var a=this.isFloatChild?"
":"";
this.marker.innerHTML=a;
this.child=null
}
;
R.prototype.s=function()
{
this.clear();
if(!this.child)
{
this.child=document.createElement(this.childNodeName);
this.child.id=this.id
}
this.child.innerHTML="";
this.marker.appendChild(this.child)
}
;
R.prototype.b=function()
{
return this.child
}
;
function N(a,b,c)
{
var d=new rb(c);
if(!b||!a)
{
d.root.className="empty";
return d.root
}
var e=d.Ya();
for(var f=0,h;
h=e[f];
f++)
{
var k=h.className;
try
{
var s=b[k](a,h)
}
catch(G)
{
Wa('Could not find parameter "'+k+'" in map "'+c+'".'+"\n"+G);
continue
}
if(s!=null)
{
h.innerHTML="";
try
{
h.appendChild(s)
}
catch(G)
{
h.innerHTML=s
}
}
else
{
var J=h.parentNode;
while(J&&!za(J,k+"-parent"))
{
J=J.parentNode
}
if(J)
{
J.style.display="none"
}
}
}
return d.root
}
function Fc(a)
{
var b=
{
}
;
for(var c=0;
c<a.length;
c++)
{
for(var d in a[c])
{
b[d]=a[c][d]
}
}
return b
}
;
// Input 24
function q(a,b)
{
this.viewerNode=a;
this.viewerTemplateId=b;
if(g("welcome"))
{
this.welcomeMessageNode=g("welcome").cloneNode(true)
}
if(g("empty-tag"))
{
this.emptyTagMessageNode=g("empty-tag").cloneNode(true)
}
if(g("empty-reading-list"))
{
this.emptyReadingListMessageNode=g("empty-reading-list").cloneNode(true)
}
if(g("viewer-show-read"))
{
this.showReadItemsNode=g("viewer-show-read").cloneNode(true);
this.showReadItemsNode.getElementsByTagName("a")[0].onclick=function()
{
m.z(true);
return false
}
}
}
q.prototype.qb=function()
{
Va(window,ra(this.entry,"alternate"),null,null,_MSG_POPUP_BLOCKED)
}
;
q.prototype.Ga=function(a)
{
var b=N(a,Nc,this.viewerTemplateId);
this.viewerNode.innerHTML="";
this.viewerNode.appendChild(b);
this.entry=a;
if($a(a))
{
r(g("item-attribution"),"hidden");
r(g("tags-container"),"hidden");
r(this.viewerNode,"subscription-marker");
var c=u(b,"subscription-marker-older");
var d=m.H();
c.onclick=function()
{
n.renderStream(d);
return false
}
;
c.href=Y+d.url
}
else
{
t(this.viewerNode,"subscription-marker");
var e=ra(a,"alternate");
u(b,"item-title-link").href=e;
u(b,"launch-original").href=e;
this.Lb(b,a);
var f=ga(a).tags;
this.currentUserTagNames=qb(f);
var h=this;
u(b,"tags-edit-link").onclick=function()
{
if(h.isEditingTags)
{
h.E()
}
else
{
h.Ca()
}
return false
}
;
var k=T(a);
var s=P(a);
u(b,"tags-edit-save").onclick=this.ea(k,s);
eb(u(g("tags-edit-contents"),"tags-edit-tags"),this.ea(k,s));
u(b,"tags-edit-cancel").onclick=function()
{
h.E();
return false
}
;
t(g("source-actions"),"hidden")
}
}
;
q.prototype.ea=function(a,b)
{
var c=this;
return function()
{
c.xb(a,b);
c.E();
return false
}
}
;
q.prototype.Lb=function(a,b)
{
var c=Q(b,"enclosure");
var d=u(a,"audio-player-placeholder");
if(c==null)return;
var e=c.getAttribute("href");
var f=c.getAttribute("type");
if(!e||(!f||yb(f)!="audio"))
{
return
}
var h=_AUDIO_PLAYER_URI+"?audioUrl="+e;
var k=['<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" ','codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,0,0" ','align="middle" width="400px" height="27px">','<param name="quality" value="best">','<param name="allowScriptAccess" value="sameDomain">','<paran name="scale" value="noScale">','<param name="wmode" value="window">','<param name="salign" value="TL">','<param name="movie" value="',h,'">','<embed class="audio-player-embed "','src="',h,'" ','quality="best" width="400px" height="27px" name="audio-player" ','type="application/x-shockwave-flash" ','pluginspage="http://www.macromedia.com/go/getflashplayer">',"</object>"];
d.innerHTML=k.join("")
}
;
q.prototype.sa=function()
{
return u(this.viewerNode,"keep-unread").checked
}
;
q.prototype.va=function(a)
{
u(this.viewerNode,"keep-unread").checked=a;
t(u(this.viewerNode,"read-state"),"hidden")
}
;
q.prototype.Ca=function(a)
{
this.isEditingTags=true;
r(u(this.viewerNode,"user-tags"),"edit");
u(this.viewerNode,"tags-edit-tags").value=this.currentUserTagNames.join(", ")
}
;
q.prototype.E=function()
{
this.isEditingTags=false;
t(u(this.viewerNode,"user-tags"),"edit")
}
;
q.prototype.xb=function(a,b)
{
try
{
var c=wa(u(this.viewerNode,"tags-edit-tags").value)
}
catch(d)
{
alert(d);
return
}
var e=Qa(this.currentUserTagNames,c);
this.currentUserTagNames=c;
var f=new C(a,b,function()
{
var h=[];
for(var k=0;
k<c.length;
k++)
{
h.push(p.v(c[k]))
}
var s=g("user-tags-list");
s.parentNode.replaceChild(q.getTagsListNode(h),s)
}
);
f.type=f.j().EDIT_TAGS;
f.exec(null,e.addTags,e.removeTags)
}
;
q.prototype.Ob=function()
{
window.location.href=ia+"things/tour"
}
;
q.prototype.ua=function(a)
{
this.Kb(this.emptyTagMessageNode);
this.excluded=a.excludedTags;
if(a.mode.isTagMode)
{
this.pa(va,function(b)
{
return w.fromExternalForm(a.url).l(b)
}
)
}
else
{
this.pa(_MSG_SINGLE_FEED,function(b)
{
return b
}
)
}
}
;
q.prototype.pa=function(a,b)
{
var c=a.EMPTY;
for(var d=0,e;
e=this.excluded[d];
d++)
{
if(e.equals(p.g()))
{
c=a.EXCLUDES_READ;
break
}
}
this.emptyTagMessageNode.innerHTML=b(c);
if(c==a.EXCLUDES_READ)
{
this.emptyTagMessageNode.appendChild(this.showReadItemsNode);
t(this.showReadItemsNode,"hidden")
}
}
;
q.prototype.Ub=function()
{
var a=this;
zb(function(b)
{
if(b)
{
var c=j.fromTag(p.i());
a.ua(c)
}
else
{
a.Ob()
}
}
)
}
;
q.prototype.Kb=function(a)
{
this.viewerNode.innerHTML="";
this.viewerNode.appendChild(a);
t(a,"hidden")
}
;
q.getAuthorTags=function(a)
{
var b=ga(a).authorTags;
if(b.length)
{
return b.join(" ")
}
else
{
return null
}
}
;
q.getUserTags=function(a)
{
return q.getTagsListNode(ga(a).tags)
}
;
q.getTagsListNode=function(a)
{
var b=document.createElement("ul");
b.id="user-tags-list";
var c=false;
for(var d=0;
d<a.length;
d++)
{
var e=a[d];
if(e.type!=Z)
{
continue
}
var f=N(e,Oc,"viewer-user-tags-template");
var h=f.getElementsByTagName("a")[0];
h.href=Y+e.a();
h.onclick=q.getViewTagClosure(e);
b.appendChild(f);
c=true
}
if(c)
{
b.appendChild(document.createTextNode(" - "))
}
return b
}
;
q.getViewTagClosure=function(a)
{
return function()
{
n.renderTagStream(a);
return false
}
}
;
var I=null;
L(function()
{
if(!I)
{
I=new q(g("viewer"),"entry-template")
}
}
);
function Cb()
{
if(!I)
{
I=new q(g("viewer"),"entry-template")
}
return I
}
var Nc=
{
"site-title":U,"title":K,"author":ab,"date":Ea,"body":function(a)
{
var b=ha(a);
Lc(b,"_new");
return b
}
,"author-tags-param":q.getAuthorTags,"user-tags-param":q.getUserTags,"view-enclosure":function(a,b)
{
var c=Q(a,"enclosure");
if(c==null||!c.getAttribute("href"))
{
return null
}
else
{
var d=b.parentNode;
d.href=c.getAttribute("href");
switch(yb(c.getAttribute("type")))
{
case "audio":return _MSG_ENCLOSURE_AUDIO;
case "video":return _MSG_ENCLOSURE_VIDEO;
default:return _MSG_ENCLOSURE_DEFAULT
}
}
}
}
;
var Oc=
{
"name":function(a)
{
return a.path.join("")
}
}
;
q.prototype.Da=function()
{
var a=wb(this.U(),this.V(),this.Oa());
Gb(a,"reactor-blog-this",475,300,true,true,false,_MSG_POPUP_BLOCKED)
}
;
q.prototype.U=function()
{
return ba(K(this.entry),300)
}
;
q.prototype.V=function()
{
return ra(this.entry,"alternate")
}
;
q.prototype.Oa=function()
{
var a=wb(this.U(),this.V(),"");
var b=sb-a.length;
var c=ha(this.entry).innerHTML;
return ba(c,b,true)
}
;
q.prototype.nb=function()
{
var a=xb("",this.Z(),this.Ua());
Gb(a,"reactor-gmail-this",null,null,false,false,false,_MSG_POPUP_BLOCKED)
}
;
q.prototype.Z=function()
{
return _MSG_GMAIL_THIS_PREFIX+" "+ba(K(this.entry),300)
}
;
q.prototype.Ua=function()
{
var a=[O(_MSG_GMAIL_THIS_FROM,_USER_EMAIL),ba(K(this.entry),300),""].join("\n\n");
var b=[O(_MSG_GMAIL_THIS_SOURCE,ra(this.entry,"alternate")),_MSG_GMAIL_THIS_DONT_RECEIVE,_MSG_GMAIL_THIS_TRY_REACTOR].join("\n\n");
var c=xb("",this.Z(),a+b);
var d=sb-c.length-3;
var e=ha(this.entry).innerHTML;
var f=ba(e,d,true);
if(f)
{
f+="...\n\n"
}
return a+f+b
}
;
E["subscriptions-tour-import"]=
{
"event":"click","func":function()
{
var a=l.SUBSCRIPTIONS;
if(!a.isVisible)a.select();
setTimeout(function()
{
a.J()()
}
,1000);
return false
}
}
;
E["subscriptions-add-feed"]=
{
"event":"click","func":function()
{
var a=l.SUBSCRIPTIONS;
if(!a.isVisible)a.select();
setTimeout(function()
{
a.S()()
}
,1000);
return false
}
}
;
// Input 25
;
// Input 26
;
// Input 27
;