var xwiHome=function(){"use strict";function a(n,t){$.getJSON("/JSON/"+n,function(n){$(t).autocomplete({source:n.Authors,select:function(n,t){window.location.href="/Thumbs?author="+t.item.label.replace(/\s/g,"+").replace(/&/g,"$")}})})}function w(t,i){$(u).removeClass().addClass(t?c:h);$(n).hide("slide","400",function(){$(u).html(t?f.SyndTabs:f.Tabs);$(n).tabs({active:i,show:{effect:"fade",duration:200}});$("a",".tabbuttons").button();$(u).removeClass().addClass(t?h:c);t?xwi.setSyndMode():xwi.clearSyndMode();v(t);$(n).show("slide",500)})}function v(n){$(r).removeClass();n&&$(r).addClass(y);xwi.isLocalHost()&&$(r).addClass(p)}function s(n){t.html(t.html()+" "+n)}function b(n){fetch(n).then(function(t){if(t.ok){if(s("<a href='"+n+"'>"+n+"<\/a>"),o++,o===e.length){$("#warmfs").css("border","2px solid green");var i=(new Date).getTime();s("<span class='done'>DONE in "+(i-l)/1e3+"<\/span>")}return}throw new Error("Network fetch response not ok");}).catch(function(t){s("<span class='werror'><a href='"+n+"'>"+n+"<\/a> "+t.message+"<\/span>")})}function k(t){var u=t.date,e=t.maxDate===undefined?u:t.maxDate,s=t.mode==="archive",r=xwi.isSyndMode(),o;xwi.LoadImg();$(n).tabs({active:6,show:{effect:"fade",duration:200}}).show();$("a",".tabbuttons").button();v(r);s&&$(".pow").hide();xwiTT.Grid("a.dtlink");xwiTT.Grid("a.dtlink2, a.dtal",{hide:!0});xwiTT.TDates();xwiTT.InfoGrid("a",".loggedongrid");$("input","#puzsrc").checkboxradio();$(r?"#radio-2":"#radio-1").attr("checked","checked").checkboxradio("refresh");$.getJSON("/JSON/TabsData.aspx",{date:u,maxDate:e},function(t){f=t;$("#sdfrom").css("color","inherit");$("input","#puzsrc").checkboxradio("enable").click(function(){var i=r,u=$("input:radio[name=radio-1]:checked").val(),t;r=u!=="nyt";r!==i&&(t=$(n).tabs("option","active"),w(r,t))})});$("#datepicker").datepicker({onSelect:function(n){var t="/Crossword?date="+$.datepicker.formatDate("m/d/yy",new Date(n));window.location.href=t+(r?"&synd=true":"")},minDate:new Date("11/21/1993"),maxDate:e});a("ConList.aspx","#conlist");a("ConList.aspx?type=ps","#psconlist");for(o in i)d(o);$("#oplink a").tooltip({items:"a",classes:{"ui-tooltip":"ttLite tips"},position:{my:"center bottom",at:"center-60 top-6"},content:"<div>Tooltips like this can show thumbnail grids when you hover your mouse over dates, or constructor photos when you hover over their names.<\/div><div>Click here to manage how they are displayed on this site.<\/div>"})}function d(n){$.getJSON("/JSON/Feed.aspx",{feed:i[n][0],max:i[n][1]},function(t){var o="",s=65,h,u,r,c,f,e;for(h in t.syndItems)u=t.syndItems[h],r=u.title,r.length>s+15&&(r=r.substring(0,s),c=r.lastIndexOf(" "),r=r.substring(0,c)+"..."),f=new Date(u.date),e="",f.getFullYear()>2e3&&(e=" alt='"+f.toLocaleString("en-US",{month:"short",day:"numeric",hour:"numeric",minute:"numeric"})+"'"),o+="<li><a class='blink' href='"+u.link+"'"+e+">"+r+"<\/a><\/li>";$("#"+i[n][2]).html(o);xwiTT.Title("a.blink",{my:"center bottom",at:"center top"})})}var y="syndication",p="local",r="#body",u="#hptabs",n="#tabs",h="syndbg",c="normbg",f,e=["Account","Celebrities","Admin","WordList","XPF","Exp","Exp/wordplay","Tour","chron/WarmUp.aspx","PSPP/Notes.aspx","Finder","Thumbs","Admin/Rare","T2/AcrossLite","Syndication"],t,o,l,i=[["https://www.nytimes.com/svc/collections/v1/publish/http:/www.nytimes.com/column/wordplay/rss.xml",2,"wpposts"],["https://crosswordfiend.com/feed/",2,"cfposts"],["https://rexwordpuzzle.blogspot.com/feeds/posts/default",1,"rpposts"],["https://xkcd.com/rss.xml",2,"xkcdposts"]];return{Go:function(n){k(n)},Warm:function(){o=0;l=(new Date).getTime();t=$("#winfo");t.empty();for(var n in e)b(e[n])}}}()