打开/关闭菜单
1680
2.2万
6524
11.7万
舰R百科
打开/关闭外观设置菜单
打开/关闭个人菜单
未登录
未登录用户的IP地址会在进行任意编辑后公开展示。

舰R百科是靠无数志愿编辑者持续地建设更新完善的。编辑非常简单,无需代码知识,请勇于更新页面!
编辑入门 | 资助百科 | 留言讨论页 | 微博@舰R百科 | 百科编辑讨论Q群:366818861

MediaWiki:Gadget-popups-main.js:修订间差异

MediaWiki界面页面
AnnAngela留言 | 贡献
创建页面,内容为“/* * 全部内容引自 https://en.wikipedia.org/w/index.php?title=MediaWiki:Gadget-popups.js&action=raw&ctype=text/javascript * 为了节省流量,已进行Ugli...”
 
AnnAngela留言 | 贡献
无编辑摘要
 
第8行: 第8行:
}function diffDatesTable(a,b){var c='<table class="popup_diff_dates">';return c+=diffDatesTableRow(b,tprintf("New revision")),c+=diffDatesTableRow(a,tprintf("Old revision")),c+="</table>"}function diffDatesTableRow(a,b){var d,e,f,g,c="";return a?a.lastModified?(d=getValueOf("popupDiffDatePrinter"),"function"==typeof a.lastModified[d]?getValueOf("popupAdjustDiffDates")?(e=Cookie.read("popTz"))&&(f=adjustDate(a.lastModified,e),c=dayFormat(f,!0)+" "+timeFormat(f,!0)):c=a.lastModified[d]():c=tprintf("Invalid %s %s",["popupDiffDatePrinter",d])):c=/^\s*$/.test(a.data)?popupString("Empty revision, maybe non-existent"):popupString("Unknown date"):c=popupString("Something went wrong :-("),g=generalLink({url:a.url.replace(/&.*?(oldid=[0-9]+(?:&direction=[^&]*)?).*/,"&$1"),text:b,title:b}),simplePrintf("<tr><td>%s</td><td>%s</td></tr>",[g,c])}function titledDiffLink(a){return titledWikiLink({article:a.article,action:a.to+"&oldid="+a.from,newWin:a.newWin,noPopup:a.noPopup,text:a.text,title:a.title,actionName:"diff"})}function wikiLink(a){var b,c,d,e,f;if(typeof a.article!=typeof{}||"string"!=typeof a.action||"string"!=typeof a.text)return null;switch("undefined"==typeof a.oldid&&(a.oldid=null),b=a.oldid,/^(edit|view|revert|render)$|^raw/.test(a.action)||(a.oldid=null),c=popupString(a.action+"Hint"),d=[a.oldid,safeDecodeURI(a.article)],e=tprintf("revision %s of %s",d),log("revisionString="+e),a.action){case"edit&section=new":c=popupString("newSectionHint");break;case"edit&undo=":a.diff&&"prev"!=a.diff&&b?a.action+=a.diff+"&undoafter="+b:b&&(a.action+=b),c=popupString("undoHint");break;case"raw&ctype=text/css":c=popupString("rawHint");break;case"revert":if(!mw.config.get("wgEnableAPI")){alert("This function of navigation popups now requires a MediaWiki installation with the API enabled.");break}f=parseParams(pg.current.link.href),a.action="edit&autoclick=wpSave&actoken="+autoClickToken()+"&autoimpl="+popupString("autoedit_version")+"&autosummary="+revertSummary(a.oldid,f.diff),"prev"==f.diff&&(a.action+="&direction=prev",e=tprintf("the revision prior to revision %s of %s",d)),getValueOf("popupRevertSummaryPrompt")&&(a.action+="&autosummaryprompt=true"),getValueOf("popupMinorReverts")&&(a.action+="&autominor=true"),log("revisionString is now "+e);break;case"nullEdit":a.action="edit&autoclick=wpSave&actoken="+autoClickToken()+"&autoimpl="+popupString("autoedit_version")+"&autosummary=null";break;case"historyfeed":a.action="history&feed=rss";break;case"markpatrolled":a.action="markpatrolled&rcid="+a.rcid}return c=c?a.oldid?simplePrintf(c,[e]):simplePrintf(c,[safeDecodeURI(a.article)]):safeDecodeURI(a.article+"&action="+a.action)+a.oldid?"&oldid="+a.oldid:"",titledWikiLink({article:a.article,action:a.action,text:a.text,newWin:a.newWin,title:c,oldid:a.oldid,noPopup:a.noPopup,onclick:a.onclick})}function revertSummary(a,b){var c="";return c="prev"==b?getValueOf("popupQueriedRevertToPreviousSummary"):getValueOf("popupQueriedRevertSummary"),c+"&autorv="+a}function titledWikiLink(a){var b,c,d;return"undefined"==typeof a.article||"undefined"==typeof a.action?(errlog("got undefined article or action in titledWikiLink"),null):(b=pg.wiki.titlebase+a.article.urlString(),c=b,"undefined"!=typeof a.actionName&&a.actionName||(a.actionName="action"),"view"!=a.action&&(c=b+"&"+a.actionName+"="+a.action),"undefined"!=typeof a.oldid&&a.oldid&&(c+="&oldid="+a.oldid),d=pg.misc.defaultNavlinkClassname,"undefined"!=typeof a.className&&a.className&&(d=a.className),generalNavLink({url:c,newWin:a.newWin,title:"undefined"!=typeof a.title?a.title:null,text:"undefined"!=typeof a.text?a.text:null,className:d,noPopup:a.noPopup,onclick:a.onclick}))}function processLastContribInfo(a,b){if(!a.edits||!a.edits.length)return alert("Popups: an odd thing happened. Please retry."),void 0;if(!a.firstNewEditor)return alert(tprintf("Only found one editor: %s made %s edits",[a.edits[0].editor,a.edits.length])),void 0;var c=pg.wiki.titlebase+new Title(b.page).urlString()+"&diff=cur&oldid="+a.firstNewEditor.oldid;displayUrl(c,b.newWin)}function processDiffSinceMyEdit(a,b){var c,d;return a.edits&&a.edits.length?(c=b.page.split("_").join(" "),a.myLastEdit?0==a.myLastEdit.index?(alert(tprintf("%s seems to be the last editor to the page %s",[a.userName,c])),void 0):(d=pg.wiki.titlebase+new Title(b.page).urlString()+"&diff=cur&oldid="+a.myLastEdit.oldid,displayUrl(d,b.newWin),void 0):(alert(tprintf("Couldn't find an edit by %s\nin the last %s edits to\n%s",[a.userName,getValueOf("popupHistoryLimit"),c])),void 0)):(alert("Popups: something fishy happened. Please try again."),void 0)}function displayUrl(a,b){b?window.open(a):document.location=a}function processAllPopups(a,b){for(var c=0;pg.current.links&&c<pg.current.links.length;++c)pg.current.links[c].navpopup&&((a||b)&&pg.current.links[c].navpopup.banish(),pg.current.links[c].simpleNoMore=!1,a&&(pg.current.links[c].navpopup=null))}function magicWatchLink(a){return a.onclick=simplePrintf("pg.fn.modifyWatchlist('%s','%s');return false;",[a.article.toString(!0).split("\\").join("\\\\").split("'").join("\\'"),this.id]),wikiLink(a)}function magicHistoryLink(a){var b="",c="",d="";switch(a.id){case"lastContrib":d=simplePrintf("pg.fn.getLastContrib('%s',%s)",[a.article.toString(!0).split("\\").join("\\\\").split("'").join("\\'"),a.newWin]),c=popupString("lastContribHint");break;case"sinceMe":d=simplePrintf("pg.fn.getDiffSinceMyEdit('%s',%s)",[a.article.toString(!0).split("\\").join("\\\\").split("'").join("\\'"),a.newWin]),c=popupString("sinceMeHint")}return b="javascript:"+d,d+=";return false;",generalNavLink({url:b,newWin:!1,title:c,text:a.text,noPopup:a.noPopup,onclick:d})}function popupMenuLink(a){var b=simplePrintf("javascript:pg.fn.%s()",[a.id]),c=popupString(simplePrintf("%sHint",[a.id])),d=simplePrintf("pg.fn.%s();return false;",[a.id]);return generalNavLink({url:b,newWin:!1,title:c,text:a.text,noPopup:a.noPopup,onclick:d})}function specialLink(a){var b,c,d,e;if("undefined"==typeof a.specialpage||!a.specialpage)return null;switch(b=pg.wiki.titlebase+mw.config.get("wgFormattedNamespaces")[pg.nsSpecialId]+":"+a.specialpage,("undefined"==typeof a.sep||null===a.sep)&&(a.sep="&target="),c=a.article.urlString({keepSpaces:"Search"==a.specialpage}),d=popupString(a.specialpage+"Hint"),a.specialpage){case"Log":switch(a.sep){case"&user=":d=popupString("userLogHint");break;case"&type=block&page=":d=popupString("blockLogHint");break;case"&page=":d=popupString("pageLogHint");break;case"&type=protect&page=":d=popupString("protectLogHint");break;case"&type=delete&page=":d=popupString("deleteLogHint");break;default:log("Unknown log type, sep="+a.sep),d="Missing hint (FIXME)"}break;case"PrefixIndex":c+="/"}return d=d?simplePrintf(d,[safeDecodeURI(a.article)]):safeDecodeURI(a.specialpage+":"+a.article),e=b+a.sep+c,generalNavLink({url:e,title:d,text:a.text,newWin:a.newWin,noPopup:a.noPopup})}function generalLink(a){var b,c,d;return"undefined"==typeof a.url?null:(b=a.url.split('"').join("%22"),c='<a href="'+b+'"',"undefined"!=typeof a.title&&a.title&&(c+=' title="'+pg.escapeQuotesHTML(a.title)+'"'),"undefined"!=typeof a.onclick&&a.onclick&&(c+=' onclick="'+pg.escapeQuotesHTML(a.onclick)+'"'),a.noPopup&&(c+=" noPopup=1"),d="undefined"==typeof a.newWin||null===a.newWin?getValueOf("popupNewWindows"):a.newWin,d&&(c+=' target="_blank"'),"undefined"!=typeof a.className&&a.className&&(c+=' class="'+a.className+'"'),c+=">","string"==typeof a.text&&(c+=a.text),c+="</a>")}function appendParamsToLink(a,b){var d,c=a.parenSplit(RegExp('(href="[^"]+?)"',"i"));return c.length<2?null:(d=c.shift()+c.shift(),d+="&"+b+'"',d+=c.join(""))}function changeLinkTargetLink(a){var b,c,d,e,f,g,h,i;return a.newTarget&&log("changeLinkTargetLink: newTarget="+a.newTarget),a.oldTarget!==decodeURIComponent(a.oldTarget)&&log("This might be an input problem: "+a.oldTarget),b=literalizeRegex(a.oldTarget),c=b.charAt(0).toUpperCase(),c="["+c+c.toLowerCase()+"]",d=c+b.substring(1),d=d.split(RegExp("(?:[_ ]+|%20)","g")).join("(?:[_ ]+|%20)").split("\\(").join("(?:%28|\\()").split("\\)").join("(?:%29|\\))"),d="\\s*("+d+"(?:#[^\\[\\|]*)?)\\s*",e=a.title||mw.config.get("wgPageName").split("_").join(" "),f=titledWikiLink({article:new Title(e),newWin:a.newWin,action:"edit",text:a.text,title:a.hint,className:"popup_change_title_link"}),g="",a.newTarget?(h=a.newTarget,i=literalizeRegex(a.newTarget),g+="s~\\[\\["+d+"\\]\\]~[["+h+"|$1]]~g;",g+="s~\\[\\["+d+"[|]~[["+h+"|~g;",g+="s~\\[\\["+i+"\\|"+i+"\\]\\]~[["+h+"]]~g"):(g+="s~\\[\\["+d+"\\]\\]~$1~g;",g+="s~\\[\\["+d+"[|](.*?)\\]\\]~$2~g"),g="autoedit="+encodeURIComponent(g),g+="&autoclick="+encodeURIComponent(a.clickButton)+"&actoken="+encodeURIComponent(autoClickToken()),g+=null==a.minor?"":"&autominor="+encodeURIComponent(a.minor),g+=null==a.watch?"":"&autowatch="+encodeURIComponent(a.watch),g+="&autosummary="+encodeURIComponent(a.summary),g+="&autoimpl="+encodeURIComponent(popupString("autoedit_version")),appendParamsToLink(f,g)}function redirLink(a,b){var c="";return getValueOf("popupAppendRedirNavLinks")&&getValueOf("popupNavLinks")?(c+="<hr />",getValueOf("popupFixRedirs")&&"undefined"!=typeof autoEdit&&autoEdit?(log("redirLink: newTarget="+a),c+=addPopupShortcut(changeLinkTargetLink({newTarget:a,text:popupString("Redirects"),hint:popupString("Fix this redirect"),summary:simplePrintf(getValueOf("popupFixRedirsSummary"),[b.toString(),a]),oldTarget:b.toString(),clickButton:getValueOf("popupRedirAutoClick"),minor:!0,watch:getValueOf("popupWatchRedirredPages")}),"R"),c+=popupString(" to ")):c+=popupString("Redirects")+popupString(" to "),c):"<br> "+popupString("Redirects")+popupString(" to ")+titledWikiLink({article:(new Title).fromWikiText(a),action:"view",text:safeDecodeURI(a),title:popupString("Bypass redirect")})}function arinLink(a){if(!saneLinkCheck(a))return null;if(!a.article.isIpUser()||!pg.wiki.wikimedia)return null;var b=a.article.userName();return generalNavLink({url:"http://ws.arin.net/cgi-bin/whois.pl?queryinput="+encodeURIComponent(b),newWin:a.newWin,title:tprintf("Look up %s in ARIN whois database",[b]),text:a.text,noPopup:1})}function toolDbName(a){var b=mw.config.get("wgDBname");return a||(b+="_p"),b}function saneLinkCheck(a){return typeof a.article!=typeof{}||"string"!=typeof a.text?!1:!0}function editCounterLink(a){var b,c,d,e,f;if(!saneLinkCheck(a))return null;if(!pg.wiki.wikimedia)return null;switch(b=a.article.userName(),c=getValueOf("popupEditCounterTool"),e="//tools.wmflabs.org/supercount/index.php?user=$1&project=$2.$3",c){case"custom":d=simplePrintf(getValueOf("popupEditCounterUrl"),[encodeURIComponent(b),toolDbName()]);break;case"kate":case"interiot":default:f=pg.wiki.hostname.split("."),d=simplePrintf(e,[encodeURIComponent(b),f[0],f[1]])}return generalNavLink({url:d,title:tprintf("editCounterLinkHint",[b]),newWin:a.newWin,text:a.text,noPopup:1})}function globalSearchLink(a){var b,c;return saneLinkCheck(a)?(b="http://vs.aka-online.de/cgi-bin/globalwpsearch.pl?timeout=120&search=",c=a.article.urlString({keepSpaces:!0}),generalNavLink({url:b+c,newWin:a.newWin,title:tprintf("globalSearchHint",[safeDecodeURI(a.article)]),text:a.text,noPopup:1})):null}function googleLink(a){var b,c;return saneLinkCheck(a)?(b="http://www.google.com/search?q=",c=a.article.urlString({keepSpaces:!0}),generalNavLink({url:b+"%22"+c+"%22",newWin:a.newWin,title:tprintf("googleSearchHint",[safeDecodeURI(a.article)]),text:a.text,noPopup:1})):null}function editorListLink(a){var b,c,d;return saneLinkCheck(a)?(b=a.article.articleFromTalkPage()||a.article,c=pg.wiki.hostname.split("."),d="//tools.wmflabs.org/xtools/articleinfo/index.php?&uselang="+mw.config.get("wgUserLanguage")+"lang="+c[0]+"&wiki="+c[1]+"&begin=&end=&article=",generalNavLink({url:d+b.urlString(),title:tprintf("editorListHint",[b]),newWin:a.newWin,text:a.text,noPopup:1})):null}function generalNavLink(a){return a.className=null==a.className?"popupNavLink":a.className,generalLink(a)}function getHistoryInfo(a,b){log("getHistoryInfo"),getHistory(a,b?function(a){b(processHistory(a))}:processHistory)}function getHistory(a,b){if(log("getHistory"),!mw.config.get("wgEnableAPI"))return alert("This function of navigation popups now requires a MediaWiki installation with the API enabled."),!1;var c=pg.wiki.apiwikibase+"?format=json&action=query&prop=revisions&titles="+new Title(a).urlString()+"&rvlimit="+getValueOf("popupHistoryLimit");return log("getHistory: url="+c),pg.flag.isIE&&(c+="&*"),startDownload(c,pg.idNumber+"history",b)}function processHistory(a){var c,d,e,g,h,b=getJsObj(a.data);try{window.x=b,c=b["query"]["pages"];for(d in c){e=c[d]["revisions"];break}}catch(f){return log("Something went wrong with JSON business"),finishProcessHistory([])}for(g=[],h=0;h<e.length;++h)g.push({oldid:e[h]["revid"],editor:e[h]["user"]});return log("processed "+g.length+" edits"),finishProcessHistory(g,mw.config.get("wgUserName"))}function finishProcessHistory(a,b){var d,c={};for(c.edits=a,c.userName=b,d=0;d<a.length;++d)"undefined"==typeof c.myLastEdit&&b&&a[d].editor==b&&(c.myLastEdit={index:d,oldid:a[d].oldid,previd:0==d?null:a[d-1].oldid}),"undefined"==typeof c.firstNewEditor&&a[d].editor!=a[0].editor&&(c.firstNewEditor={index:d,oldid:a[d].oldid,previd:0==d?null:a[d-1].oldid});return c}function defaultize(a){var b=null;return"popupCookies"!=a&&(defaultize("popupCookies"),pg.option.popupCookies&&(b=Cookie.read(a)))?(pg.option[a]=b,void 0):((null===pg.option[a]||"undefined"==typeof pg.option[a])&&(pg.option[a]="undefined"!=typeof window[a]?window[a]:pg.optionDefault[a]),void 0)}function newOption(a,b){pg.optionDefault[a]=b}function setDefault(a,b){return newOption(a,b)}function getValueOf(a){return defaultize(a),pg.option[a]}function setOptions(){var b,a=!1;if(mw.config.get("wgUserGroups"))for(b=0;b<mw.config.get("wgUserGroups").length;++b)"sysop"==mw.config.get("wgUserGroups")[b]&&(a=!0);newOption("popupDelay",.5),newOption("popupHideDelay",.5),newOption("simplePopups",!1),newOption("popupStructure","shortmenus"),newOption("popupActionsMenu",!0),newOption("popupSetupMenu",!0),newOption("popupAdminLinks",a),newOption("popupShortcutKeys",!1),newOption("popupHistoricalLinks",!0),newOption("popupOnlyArticleLinks",!0),newOption("removeTitles",!0),newOption("popupMaxWidth",350),newOption("popupInitialWidth",!1),newOption("popupSimplifyMainLink",!0),newOption("popupAppendRedirNavLinks",!0),newOption("popupTocLinks",!1),newOption("popupSubpopups",!0),newOption("popupDragHandle",!1),newOption("popupLazyPreviews",!0),newOption("popupLazyDownloads",!0),newOption("popupAllDabsStubs",!1),newOption("popupDebugging",!1),newOption("popupAdjustDiffDates",!0),newOption("popupActiveNavlinks",!0),newOption("popupModifier",!1),newOption("popupModifierAction","enable"),newOption("popupDraggable",!0),newOption("popupImages",!0),newOption("imagePopupsForImages",!0),newOption("popupNeverGetThumbs",!1),newOption("popupThumbAction","imagepage"),newOption("popupImageSize",60),newOption("popupImageSizeLarge",200),newOption("popupFixRedirs",!1),newOption("popupRedirAutoClick","wpDiff"),newOption("popupFixDabs",!1),newOption("popupDabsAutoClick","wpDiff"),newOption("popupRevertSummaryPrompt",!1),newOption("popupMinorReverts",!1),newOption("popupRedlinkRemoval",!1),newOption("popupWatchDisambiggedPages",null),newOption("popupWatchRedirredPages",null),newOption("popupDabWiktionary","last"),newOption("popupNavLinks",!0),newOption("popupNavLinkSeparator"," &sdot; "),newOption("popupLastEditLink",!0),newOption("popupEditCounterTool","soxred"),newOption("popupEditCounterUrl",""),newOption("popupExtraUserMenu",""),newOption("popupPreviews",!0),newOption("popupSummaryData",!0),newOption("popupMaxPreviewSentences",5),newOption("popupMaxPreviewCharacters",600),newOption("popupLastModified",!0),newOption("popupPreviewKillTemplates",!0),newOption("popupPreviewRawTemplates",!0),newOption("popupPreviewFirstParOnly",!0),newOption("popupPreviewCutHeadings",!0),newOption("popupPreviewButton",!1),newOption("popupPreviewButtonEvent","click"),newOption("popupPreviewDiffs",!0),newOption("popupDiffMaxLines",100),newOption("popupDiffContextLines",2),newOption("popupDiffContextCharacters",40),newOption("popupDiffDates",!0),newOption("popupDiffDatePrinter","toLocaleString"),newOption("popupFixDabsSummary",popupString("defaultpopupFixDabsSummary")),newOption("popupExtendedRevertSummary",popupString("defaultpopupExtendedRevertSummary")),newOption("popupTimeOffset",null),newOption("popupRevertSummary",popupString("defaultpopupRevertSummary")),newOption("popupRevertToPreviousSummary",popupString("defaultpopupRevertToPreviousSummary")),newOption("popupQueriedRevertSummary",popupString("defaultpopupQueriedRevertSummary")),newOption("popupQueriedRevertToPreviousSummary",popupString("defaultpopupQueriedRevertToPreviousSummary")),newOption("popupFixRedirsSummary",popupString("defaultpopupFixRedirsSummary")),newOption("popupRedlinkSummary",popupString("defaultpopupRedlinkSummary")),newOption("popupRmDabLinkSummary",popupString("defaultpopupRmDabLinkSummary")),newOption("popupCookies",!1),newOption("popupHistoryLimit",50),newOption("popupFilters",[popupFilterStubDetect,popupFilterDisambigDetect,popupFilterPageSize,popupFilterCountLinks,popupFilterCountImages,popupFilterCountCategories,popupFilterLastModified]),newOption("extraPopupFilters",[]),newOption("popupOnEditSelection","cursor"),newOption("popupPreviewHistory",!0),newOption("popupImageLinks",!0),newOption("popupCategoryMembers",!0),newOption("popupUserInfo",!0),newOption("popupHistoryPreviewLimit",25),newOption("popupContribsPreviewLimit",25),newOption("popupRevDelUrl","//en.wikipedia.org/wiki/Wikipedia:Revision_deletion"),newOption("popupNewWindows",!1),newOption("popupLinksNewWindow",{lastContrib:!0,sinceMe:!0}),newOption("popupDabRegexp","(\\{\\{\\s*disambig(?!uation needed)|disambig(uation|)\\s*\\}\\}|disamb\\s*\\}\\}|dab\\s*\\}\\})|\\{\\{\\s*(((geo|hn|road?|school|number)dis)|[234][lc][acw]|(road|ship)index)(\\s*[|][^}]*)?\\s*[}][}]|is a .*disambiguation.*page"),newOption("popupAnchorRegexp","anchors?"),newOption("popupStubRegexp","(sect)?stub[}][}]|This .*-related article is a .*stub"),newOption("popupImageVarsRegexp","image|image_(?:file|skyline|name|flag|seal)|cover|badge|logo")}function popupString(a){return"undefined"!=typeof popupStrings&&popupStrings&&popupStrings[a]?popupStrings[a]:pg.string[a]?pg.string[a]:a}function tprintf(a,b){return typeof b!=typeof[]&&(b=[b]),simplePrintf(popupString(a),b)}var Insta,Cookie,hexcase,jsReservedProperties,pg={re:{},ns:{},string:{},wiki:{},misc:{},option:{},optionDefault:{},flag:{},cache:{},structures:{},timer:{},counter:{},current:{},fn:{},endoflist:null};window.pg=pg,Drag.prototype.fixE=function(a){return"undefined"==typeof a&&(a=window.event),"undefined"==typeof a.layerX&&(a.layerX=a.offsetX),"undefined"==typeof a.layerY&&(a.layerY=a.offsetY),a},Drag.prototype.init=function(a,b){var c=this;this.obj=a,a.onmousedown=function(a){c.start.apply(c,[a])},a.dragging=!1,a.popups_draggable=!0,a.hmode=!0,a.vmode=!0,a.root=b&&null!==b?b:a,isNaN(parseInt(a.root.style.left,10))&&(a.root.style.left="0px"),isNaN(parseInt(a.root.style.top,10))&&(a.root.style.top="0px"),a.root.onthisStart=function(){},a.root.onthisEnd=function(){},a.root.onthis=function(){}},Drag.prototype.start=function(a){var c,d,e,b=this.obj;return a=this.fixE(a),!this.startCondition||this.startCondition(a)?(c=parseInt(b.vmode?b.root.style.top:b.root.style.bottom,10),d=parseInt(b.hmode?b.root.style.left:b.root.style.right,10),b.root.onthisStart(d,c),b.lastMouseX=a.clientX,b.lastMouseY=a.clientY,e=this,b.onmousemoveDefault=document.onmousemove,b.dragging=!0,document.onmousemove=function(a){e.drag.apply(e,[a])},document.onmouseup=function(a){e.end.apply(e,[a])},!1):void 0},Drag.prototype.drag=function(a){var b,c,d,e,f,g,h;return a=this.fixE(a),b=this.obj,c=a.clientY,d=a.clientX,e=parseInt(b.vmode?b.root.style.top:b.root.style.bottom,10),f=parseInt(b.hmode?b.root.style.left:b.root.style.right,10),g=f+(d-b.lastMouseX)*(b.hmode?1:-1),h=e+(c-b.lastMouseY)*(b.vmode?1:-1),this.obj.root.style[b.hmode?"left":"right"]=g+"px",this.obj.root.style[b.vmode?"top":"bottom"]=h+"px",this.obj.lastMouseX=d,this.obj.lastMouseY=c,this.obj.root.onthis(g,h),!1},Drag.prototype.end=function(){document.onmousemove=this.obj.onmousemoveDefault,document.onmouseup=null,this.obj.dragging=!1,this.endHook&&this.endHook(parseInt(this.obj.root.style[this.obj.hmode?"left":"right"],10),parseInt(this.obj.root.style[this.obj.vmode?"top":"bottom"],10))},pg.structures.original={},pg.structures.original.popupLayout=function(){return["popupError","popupImage","popupTopLinks","popupTitle","popupData","popupOtherLinks","popupRedir",["popupWarnRedir","popupRedirTopLinks","popupRedirTitle","popupRedirData","popupRedirOtherLinks"],"popupMiscTools",["popupRedlink"],"popupPrePreviewSep","popupPreview","popupSecondPreview","popupPreviewMore","popupPostPreview","popupFixDab"]},pg.structures.original.popupRedirSpans=function(){return["popupRedir","popupWarnRedir","popupRedirTopLinks","popupRedirTitle","popupRedirData","popupRedirOtherLinks"]},pg.structures.original.popupTitle=function(a){return log("defaultstructure.popupTitle"),getValueOf("popupNavLinks")?"":navlinkStringToHTML("<b><<mainlink>></b>",a.article,a.params)},pg.structures.original.popupTopLinks=function(a){return log("defaultstructure.popupTopLinks"),getValueOf("popupNavLinks")?navLinksHTML(a.article,a.hint,a.params):""},pg.structures.original.popupImage=function(a){return log("original.popupImage, x.article="+a.article+", x.navpop.idNumber="+a.navpop.idNumber),imageHTML(a.article,a.navpop.idNumber)},pg.structures.original.popupRedirTitle=pg.structures.original.popupTitle,pg.structures.original.popupRedirTopLinks=pg.structures.original.popupTopLinks,copyStructure("original","nostalgia"),pg.structures.nostalgia.popupTopLinks=function(a){var c,d,e,f,b="";return b+="<b><<mainlink|shortcut= >></b>",b+="if(user){<br><<contribs|shortcut=c>>",b+="if(wikimedia){*<<count|shortcut=#>>}",b+="if(ipuser){}else{*<<email|shortcut=E>>}if(admin){*<<block|shortcut=b>>}}",c="<<edit|shortcut=e>>",d="if(oldid){<<editOld|shortcut=e>>|<<revert|shortcut=v|rv>>|<<edit|cur>>}else{"+c+"}",e="<<history|shortcut=h>>",f="<<unwatch|unwatchShort>>|<<watch|shortcut=w|watchThingy>>",b+="<br>if(talk){"+d+"|<<new|shortcut=+>>"+"*"+e+"*"+f+"*"+"<b><<article|shortcut=a>></b>|<<editArticle|edit>>"+"}else{"+d+"*"+e+"*"+f+"*"+"<b><<talk|shortcut=t>></b>|<<editTalk|edit>>|<<newTalk|shortcut=+|new>>"+"}",b+="<br><<whatLinksHere|shortcut=l>>*<<relatedChanges|shortcut=r>>",b+="if(admin){<br>}else{*}<<move|shortcut=m>>",b+="if(admin){*<<unprotect|unprotectShort>>|<<protect|shortcut=p>>*<<undelete|undeleteShort>>|<<delete|shortcut=d>>}",navlinkStringToHTML(b,a.article,a.params)},pg.structures.nostalgia.popupRedirTopLinks=pg.structures.nostalgia.popupTopLinks,copyStructure("original","fancy"),pg.structures.fancy.popupTitle=function(a){return navlinkStringToHTML("<font size=+0><<mainlink>></font>",a.article,a.params)},pg.structures.fancy.popupTopLinks=function(a){var b="<<history|shortcut=h|hist>>|<<lastEdit|shortcut=/|last>>if(mainspace_en){|<<editors|shortcut=E|eds>>}",c="<<unwatch|unwatchShort>>|<<watch|shortcut=w|watchThingy>>",d="<<move|shortcut=m|move>>";return navlinkStringToHTML("if(talk){<<edit|shortcut=e>>|<<new|shortcut=+|+>>*"+b+"*"+"<<article|shortcut=a>>|<<editArticle|edit>>"+"*"+c+"*"+d+"}else{<<edit|shortcut=e>>*"+b+"*<<talk|shortcut=t|>>|<<editTalk|edit>>|<<newTalk|shortcut=+|new>>"+"*"+c+"*"+d+"}<br>",a.article,a.params)},pg.structures.fancy.popupOtherLinks=function(a){var d,b="<<unprotect|unprotectShort>>|<<protect|shortcut=p>>*<<undelete|undeleteShort>>|<<delete|shortcut=d|del>>",c="<<contribs|shortcut=c>>if(wikimedia){|<<count|shortcut=#|#>>}";return c+="if(ipuser){|<<arin>>}else{*<<email|shortcut=E|"+popupString("email")+">>}if(admin){*<<block|shortcut=b>>}",d="<<whatLinksHere|shortcut=l|links here>>*<<relatedChanges|shortcut=r|related>>",navlinkStringToHTML("<br>if(user){"+c+"*}if(admin){"+b+"if(user){<br>}else{*}}"+d,a.article,a.params)},pg.structures.fancy.popupRedirTitle=pg.structures.fancy.popupTitle,pg.structures.fancy.popupRedirTopLinks=pg.structures.fancy.popupTopLinks,pg.structures.fancy.popupRedirOtherLinks=pg.structures.fancy.popupOtherLinks,copyStructure("fancy","fancy2"),pg.structures.fancy2.popupTopLinks=function(a){return"<br>"+pg.structures.fancy.popupTopLinks(a).replace(RegExp("<br>$","i"),"")},pg.structures.fancy2.popupLayout=function(){return["popupError","popupImage","popupTitle","popupData","popupTopLinks","popupOtherLinks","popupRedir",["popupWarnRedir","popupRedirTopLinks","popupRedirTitle","popupRedirData","popupRedirOtherLinks"],"popupMiscTools",["popupRedlink"],"popupPrePreviewSep","popupPreview","popupSecondPreview","popupPreviewMore","popupPostPreview","popupFixDab"]},copyStructure("original","menus"),pg.structures.menus.popupLayout=function(){return["popupError","popupImage","popupTopLinks","popupTitle","popupOtherLinks","popupRedir",["popupWarnRedir","popupRedirTopLinks","popupRedirTitle","popupRedirData","popupRedirOtherLinks"],"popupData","popupMiscTools",["popupRedlink"],"popupPrePreviewSep","popupPreview","popupSecondPreview","popupPreviewMore","popupPostPreview","popupFixDab"]},pg.structures.menus.popupTopLinks=function(a,b){var h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,c=[],d='<div class="popup_drop">',e="</div>",g="<<history|shortcut=h>>";return b||(g="<menurow>"+g+"|<<historyfeed|rss>>if(mainspace_en){|<<editors|shortcut=E>>}</menurow>"),h="<<lastEdit|shortcut=/|show last edit>>",i="<<lastContrib|last set of edits>><<sinceMe|changes since mine>>",j="<<whatLinksHere|shortcut=l|what links here>>",k="<<relatedChanges|shortcut=r|related changes>>",l="<menurow><<search|shortcut=s>>if(wikimedia){|<<globalsearch|shortcut=g|global>>}|<<google|shortcut=G|web>></menurow>",m="<menurow><<unwatch|unwatchShort>>|<<watch|shortcut=w|watchThingy>></menurow>",n="<menurow><<unprotect|unprotectShort>>|<<protect|shortcut=p>>|<<protectlog|log>></menurow>",o="<menurow><<undelete|undeleteShort>>|<<delete|shortcut=d>>|<<deletelog|log>></menurow>",p="<<move|shortcut=m|move page>>",q="<menurow><<nullEdit|shortcut=n|null edit>>|<<purge|shortcut=P>></menurow>",r="<menurow><<view|shortcut=v>>|<<render|shortcut=S>>|<<raw>></menurow>",s="if(oldid){<menurow><<edit|shortcut=e>>|<<editOld|shortcut=e|this&nbsp;revision>></menurow><menurow><<revert|shortcut=v>>|<<undo>></menurow>}else{<<edit|shortcut=e>>}",t="if(rcid){<<markpatrolled|mark patrolled>>}",u="if(talk){<<new|shortcut=+|new topic>>}",v="if(admin){"+n+o+"}",getValueOf("popupActionsMenu")?c.push("<<mainlink>>*"+d+menuTitle("actions")):c.push(d+"<<mainlink>>"),c.push("<menu>"),c.push(s+t+u+g+h),b||c.push(i),c.push(p+j+k),b||c.push(q+l),b||c.push(r),c.push("<hr />"+m+v),c.push("<hr />if(talk){<<article|shortcut=a|view article>><<editArticle|edit article>>}else{<<talk|shortcut=t|talk page>><<editTalk|edit talk>><<newTalk|shortcut=+|new topic>>}</menu>"+e),w="<<email|shortcut=E|email user>>",x="if(wikimedia){<menurow>}<<contribs|shortcut=c|contributions>>if(wikimedia){</menurow>}if(admin){<menurow><<deletedContribs>></menurow>}",c.push("if(user){*"+d+menuTitle("user")),c.push("<menu>"),+c.push("<menurow><<userPage|shortcut=u|user&nbsp;page>>|<<userSpace|space>></menurow>"),c.push("<<userTalk|shortcut=t|user talk>><<editUserTalk|edit user talk>><<newUserTalk|shortcut=+|leave comment>>"),b?c.push("if(ipuser){}else{"+w+"}"):c.push("if(ipuser){<<arin>>}else{"+w+"}"),c.push("<hr />"+x+"<<userlog|shortcut=L|user log>>"),c.push("if(wikimedia){<<count|shortcut=#|edit counter>>}"),c.push("if(admin){<menurow><<unblock|unblockShort>>|<<block|shortcut=b|block user>></menurow>}"),c.push("<<blocklog|shortcut=B|block log>>"+getValueOf("popupExtraUserMenu")),c.push("</menu>"+e+"}"),getValueOf("popupSetupMenu")&&!a.navpop.hasPopupMenu&&(a.navpop.hasPopupMenu=!0,c.push("*"+d+menuTitle("popupsMenu")+"<menu>"),c.push("<<togglePreviews|toggle previews>>"),c.push("<<purgePopups|reset>>"),c.push("<<disablePopups|disable>>"),c.push("</menu>"+e)),navlinkStringToHTML(c.join(""),a.article,a.params)},pg.structures.menus.popupRedirTitle=pg.structures.menus.popupTitle,pg.structures.menus.popupRedirTopLinks=pg.structures.menus.popupTopLinks,copyStructure("menus","shortmenus"),pg.structures.shortmenus.popupTopLinks=function(a){return pg.structures.menus.popupTopLinks(a,!0)},pg.structures.shortmenus.popupRedirTopLinks=pg.structures.shortmenus.popupTopLinks,copyStructure("shortmenus","dabshortmenus"),pg.structures.dabshortmenus.popupLayout=function(){return["popupError","popupImage","popupTopLinks","popupTitle","popupOtherLinks","popupRedir",["popupWarnRedir","popupRedirTopLinks","popupRedirTitle","popupRedirData","popupRedirOtherLinks"],"popupData","popupMiscTools",["popupRedlink"],"popupFixDab","popupPrePreviewSep","popupPreview","popupSecondPreview","popupPreviewMore","popupPostPreview"]},copyStructure("menus","dabmenus"),pg.structures.dabmenus.popupLayout=pg.structures.dabshortmenus.popupLayout,pg.structures.lite={},pg.structures.lite.popupLayout=function(){return["popupTitle","popupPreview"]},pg.structures.lite.popupTitle=function(a){return log(a.article+": structures.lite.popupTitle"),'<div><span class="popup_mainlink"><b>'+a.article.toString()+"</b></span></div>"},new Downloader,Downloader.prototype.send=function(a){return this.http?this.http.send(a):null},Downloader.prototype.abort=function(){return this.http?(this.aborted=!0,this.http.abort()):null},Downloader.prototype.getData=function(){return this.http?this.http.responseText:null},Downloader.prototype.setTarget=function(){return this.http?(this.http.open(this.method,this.url,this.async),void 0):null},Downloader.prototype.getReadyState=function(){return this.http?this.http.readyState:null},pg.misc.downloadsInProgress={},Downloader.prototype.start=function(){this.http&&(pg.misc.downloadsInProgress[this.id]=this,this.http.send(null))},Downloader.prototype.getLastModifiedDate=function(){if(!this.http)return null;var a=null;try{a=this.http.getResponseHeader("Last-Modified")}catch(b){}return a?new Date(a):null},Downloader.prototype.setCallback=function(a){this.http&&(this.http.onreadystatechange=a)},Downloader.prototype.getStatus=function(){return this.http?this.http.status:null},Insta={},Insta.dump=function(a,b){"string"==typeof a&&(a=document.getElementById(a)),"string"==typeof b&&(b=document.getElementById(b)),b.innerHTML=this.convert(a.value)},Insta.convert=function(a){function f(){return b.length}function g(){return b.shift()}function h(a){c+=a}function i(){for(var e,f,a=1,b=arguments,c=b[0],d="";a<b.length&&(f=c.indexOf("?"))+1;a++)a-=e="?"==c.charAt(f+1)?1:0,d+=c.substring(0,f)+(e?"?":b[a]),c=c.substr(f+1+e);return d+c}function j(a){return a.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;")}function k(a){return a.replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/:/g,"&#58;").replace(/\[/g,"&#91;").replace(/]/g,"&#93;")}function l(a){return k(a).replace(/'/g,"&#39;").replace(/"/g,"&quot;")}function n(a,b){return b>a?a:b}function o(a,b){for(var c=0,d=n(a.length,b.length);d>c&&a.charAt(c)==b.charAt(c);c++);return c}function p(a){return"string"==typeof a?b[0].substr(0,a.length)==a:e=b[0].match(a)}function q(a){return b[0]==a}function r(a){return b[0].charAt(a)}function s(a){h(a),g()}function t(){for(var c,d,j,k,l,m,a="";f()&&p(/^([*#:;]+)(.*)$/);){for(c=e,g(),d=o(a,c[1]),j=a.length-1;j>=d;j--)if(k=a.charAt(j),"*"==k)h("</ul>");else if("#"==k)h("</ol>");else switch(c[1].charAt(j)){case"":case"*":case"#":h("</dl>")}for(j=d;j<c[1].length;j++)if(l=c[1].charAt(j),"*"==l)h("<ul>");else if("#"==l)h("<ol>");else switch(a.charAt(j)){case"":case"*":case"#":h("<dl>")}switch(c[1].charAt(c[1].length-1)){case"*":case"#":h("<li>"+z(c[2]));break;case";":h("<dt>"),(m=c[2].match(/(.*?)(:.*?)$/))?(h(z(m[1])),b.unshift(m[2])):h(z(c[2]));break;case":":h("<dd>"+z(c[2]))}a=c[1]}for(j=a.length-1;j>=0;j--)h(i("</?>","*"==a.charAt(j)?"ul":"#"==a.charAt(j)?"ol":"dl"))
}function diffDatesTable(a,b){var c='<table class="popup_diff_dates">';return c+=diffDatesTableRow(b,tprintf("New revision")),c+=diffDatesTableRow(a,tprintf("Old revision")),c+="</table>"}function diffDatesTableRow(a,b){var d,e,f,g,c="";return a?a.lastModified?(d=getValueOf("popupDiffDatePrinter"),"function"==typeof a.lastModified[d]?getValueOf("popupAdjustDiffDates")?(e=Cookie.read("popTz"))&&(f=adjustDate(a.lastModified,e),c=dayFormat(f,!0)+" "+timeFormat(f,!0)):c=a.lastModified[d]():c=tprintf("Invalid %s %s",["popupDiffDatePrinter",d])):c=/^\s*$/.test(a.data)?popupString("Empty revision, maybe non-existent"):popupString("Unknown date"):c=popupString("Something went wrong :-("),g=generalLink({url:a.url.replace(/&.*?(oldid=[0-9]+(?:&direction=[^&]*)?).*/,"&$1"),text:b,title:b}),simplePrintf("<tr><td>%s</td><td>%s</td></tr>",[g,c])}function titledDiffLink(a){return titledWikiLink({article:a.article,action:a.to+"&oldid="+a.from,newWin:a.newWin,noPopup:a.noPopup,text:a.text,title:a.title,actionName:"diff"})}function wikiLink(a){var b,c,d,e,f;if(typeof a.article!=typeof{}||"string"!=typeof a.action||"string"!=typeof a.text)return null;switch("undefined"==typeof a.oldid&&(a.oldid=null),b=a.oldid,/^(edit|view|revert|render)$|^raw/.test(a.action)||(a.oldid=null),c=popupString(a.action+"Hint"),d=[a.oldid,safeDecodeURI(a.article)],e=tprintf("revision %s of %s",d),log("revisionString="+e),a.action){case"edit&section=new":c=popupString("newSectionHint");break;case"edit&undo=":a.diff&&"prev"!=a.diff&&b?a.action+=a.diff+"&undoafter="+b:b&&(a.action+=b),c=popupString("undoHint");break;case"raw&ctype=text/css":c=popupString("rawHint");break;case"revert":if(!mw.config.get("wgEnableAPI")){alert("This function of navigation popups now requires a MediaWiki installation with the API enabled.");break}f=parseParams(pg.current.link.href),a.action="edit&autoclick=wpSave&actoken="+autoClickToken()+"&autoimpl="+popupString("autoedit_version")+"&autosummary="+revertSummary(a.oldid,f.diff),"prev"==f.diff&&(a.action+="&direction=prev",e=tprintf("the revision prior to revision %s of %s",d)),getValueOf("popupRevertSummaryPrompt")&&(a.action+="&autosummaryprompt=true"),getValueOf("popupMinorReverts")&&(a.action+="&autominor=true"),log("revisionString is now "+e);break;case"nullEdit":a.action="edit&autoclick=wpSave&actoken="+autoClickToken()+"&autoimpl="+popupString("autoedit_version")+"&autosummary=null";break;case"historyfeed":a.action="history&feed=rss";break;case"markpatrolled":a.action="markpatrolled&rcid="+a.rcid}return c=c?a.oldid?simplePrintf(c,[e]):simplePrintf(c,[safeDecodeURI(a.article)]):safeDecodeURI(a.article+"&action="+a.action)+a.oldid?"&oldid="+a.oldid:"",titledWikiLink({article:a.article,action:a.action,text:a.text,newWin:a.newWin,title:c,oldid:a.oldid,noPopup:a.noPopup,onclick:a.onclick})}function revertSummary(a,b){var c="";return c="prev"==b?getValueOf("popupQueriedRevertToPreviousSummary"):getValueOf("popupQueriedRevertSummary"),c+"&autorv="+a}function titledWikiLink(a){var b,c,d;return"undefined"==typeof a.article||"undefined"==typeof a.action?(errlog("got undefined article or action in titledWikiLink"),null):(b=pg.wiki.titlebase+a.article.urlString(),c=b,"undefined"!=typeof a.actionName&&a.actionName||(a.actionName="action"),"view"!=a.action&&(c=b+"&"+a.actionName+"="+a.action),"undefined"!=typeof a.oldid&&a.oldid&&(c+="&oldid="+a.oldid),d=pg.misc.defaultNavlinkClassname,"undefined"!=typeof a.className&&a.className&&(d=a.className),generalNavLink({url:c,newWin:a.newWin,title:"undefined"!=typeof a.title?a.title:null,text:"undefined"!=typeof a.text?a.text:null,className:d,noPopup:a.noPopup,onclick:a.onclick}))}function processLastContribInfo(a,b){if(!a.edits||!a.edits.length)return alert("Popups: an odd thing happened. Please retry."),void 0;if(!a.firstNewEditor)return alert(tprintf("Only found one editor: %s made %s edits",[a.edits[0].editor,a.edits.length])),void 0;var c=pg.wiki.titlebase+new Title(b.page).urlString()+"&diff=cur&oldid="+a.firstNewEditor.oldid;displayUrl(c,b.newWin)}function processDiffSinceMyEdit(a,b){var c,d;return a.edits&&a.edits.length?(c=b.page.split("_").join(" "),a.myLastEdit?0==a.myLastEdit.index?(alert(tprintf("%s seems to be the last editor to the page %s",[a.userName,c])),void 0):(d=pg.wiki.titlebase+new Title(b.page).urlString()+"&diff=cur&oldid="+a.myLastEdit.oldid,displayUrl(d,b.newWin),void 0):(alert(tprintf("Couldn't find an edit by %s\nin the last %s edits to\n%s",[a.userName,getValueOf("popupHistoryLimit"),c])),void 0)):(alert("Popups: something fishy happened. Please try again."),void 0)}function displayUrl(a,b){b?window.open(a):document.location=a}function processAllPopups(a,b){for(var c=0;pg.current.links&&c<pg.current.links.length;++c)pg.current.links[c].navpopup&&((a||b)&&pg.current.links[c].navpopup.banish(),pg.current.links[c].simpleNoMore=!1,a&&(pg.current.links[c].navpopup=null))}function magicWatchLink(a){return a.onclick=simplePrintf("pg.fn.modifyWatchlist('%s','%s');return false;",[a.article.toString(!0).split("\\").join("\\\\").split("'").join("\\'"),this.id]),wikiLink(a)}function magicHistoryLink(a){var b="",c="",d="";switch(a.id){case"lastContrib":d=simplePrintf("pg.fn.getLastContrib('%s',%s)",[a.article.toString(!0).split("\\").join("\\\\").split("'").join("\\'"),a.newWin]),c=popupString("lastContribHint");break;case"sinceMe":d=simplePrintf("pg.fn.getDiffSinceMyEdit('%s',%s)",[a.article.toString(!0).split("\\").join("\\\\").split("'").join("\\'"),a.newWin]),c=popupString("sinceMeHint")}return b="javascript:"+d,d+=";return false;",generalNavLink({url:b,newWin:!1,title:c,text:a.text,noPopup:a.noPopup,onclick:d})}function popupMenuLink(a){var b=simplePrintf("javascript:pg.fn.%s()",[a.id]),c=popupString(simplePrintf("%sHint",[a.id])),d=simplePrintf("pg.fn.%s();return false;",[a.id]);return generalNavLink({url:b,newWin:!1,title:c,text:a.text,noPopup:a.noPopup,onclick:d})}function specialLink(a){var b,c,d,e;if("undefined"==typeof a.specialpage||!a.specialpage)return null;switch(b=pg.wiki.titlebase+mw.config.get("wgFormattedNamespaces")[pg.nsSpecialId]+":"+a.specialpage,("undefined"==typeof a.sep||null===a.sep)&&(a.sep="&target="),c=a.article.urlString({keepSpaces:"Search"==a.specialpage}),d=popupString(a.specialpage+"Hint"),a.specialpage){case"Log":switch(a.sep){case"&user=":d=popupString("userLogHint");break;case"&type=block&page=":d=popupString("blockLogHint");break;case"&page=":d=popupString("pageLogHint");break;case"&type=protect&page=":d=popupString("protectLogHint");break;case"&type=delete&page=":d=popupString("deleteLogHint");break;default:log("Unknown log type, sep="+a.sep),d="Missing hint (FIXME)"}break;case"PrefixIndex":c+="/"}return d=d?simplePrintf(d,[safeDecodeURI(a.article)]):safeDecodeURI(a.specialpage+":"+a.article),e=b+a.sep+c,generalNavLink({url:e,title:d,text:a.text,newWin:a.newWin,noPopup:a.noPopup})}function generalLink(a){var b,c,d;return"undefined"==typeof a.url?null:(b=a.url.split('"').join("%22"),c='<a href="'+b+'"',"undefined"!=typeof a.title&&a.title&&(c+=' title="'+pg.escapeQuotesHTML(a.title)+'"'),"undefined"!=typeof a.onclick&&a.onclick&&(c+=' onclick="'+pg.escapeQuotesHTML(a.onclick)+'"'),a.noPopup&&(c+=" noPopup=1"),d="undefined"==typeof a.newWin||null===a.newWin?getValueOf("popupNewWindows"):a.newWin,d&&(c+=' target="_blank"'),"undefined"!=typeof a.className&&a.className&&(c+=' class="'+a.className+'"'),c+=">","string"==typeof a.text&&(c+=a.text),c+="</a>")}function appendParamsToLink(a,b){var d,c=a.parenSplit(RegExp('(href="[^"]+?)"',"i"));return c.length<2?null:(d=c.shift()+c.shift(),d+="&"+b+'"',d+=c.join(""))}function changeLinkTargetLink(a){var b,c,d,e,f,g,h,i;return a.newTarget&&log("changeLinkTargetLink: newTarget="+a.newTarget),a.oldTarget!==decodeURIComponent(a.oldTarget)&&log("This might be an input problem: "+a.oldTarget),b=literalizeRegex(a.oldTarget),c=b.charAt(0).toUpperCase(),c="["+c+c.toLowerCase()+"]",d=c+b.substring(1),d=d.split(RegExp("(?:[_ ]+|%20)","g")).join("(?:[_ ]+|%20)").split("\\(").join("(?:%28|\\()").split("\\)").join("(?:%29|\\))"),d="\\s*("+d+"(?:#[^\\[\\|]*)?)\\s*",e=a.title||mw.config.get("wgPageName").split("_").join(" "),f=titledWikiLink({article:new Title(e),newWin:a.newWin,action:"edit",text:a.text,title:a.hint,className:"popup_change_title_link"}),g="",a.newTarget?(h=a.newTarget,i=literalizeRegex(a.newTarget),g+="s~\\[\\["+d+"\\]\\]~[["+h+"|$1]]~g;",g+="s~\\[\\["+d+"[|]~[["+h+"|~g;",g+="s~\\[\\["+i+"\\|"+i+"\\]\\]~[["+h+"]]~g"):(g+="s~\\[\\["+d+"\\]\\]~$1~g;",g+="s~\\[\\["+d+"[|](.*?)\\]\\]~$2~g"),g="autoedit="+encodeURIComponent(g),g+="&autoclick="+encodeURIComponent(a.clickButton)+"&actoken="+encodeURIComponent(autoClickToken()),g+=null==a.minor?"":"&autominor="+encodeURIComponent(a.minor),g+=null==a.watch?"":"&autowatch="+encodeURIComponent(a.watch),g+="&autosummary="+encodeURIComponent(a.summary),g+="&autoimpl="+encodeURIComponent(popupString("autoedit_version")),appendParamsToLink(f,g)}function redirLink(a,b){var c="";return getValueOf("popupAppendRedirNavLinks")&&getValueOf("popupNavLinks")?(c+="<hr />",getValueOf("popupFixRedirs")&&"undefined"!=typeof autoEdit&&autoEdit?(log("redirLink: newTarget="+a),c+=addPopupShortcut(changeLinkTargetLink({newTarget:a,text:popupString("Redirects"),hint:popupString("Fix this redirect"),summary:simplePrintf(getValueOf("popupFixRedirsSummary"),[b.toString(),a]),oldTarget:b.toString(),clickButton:getValueOf("popupRedirAutoClick"),minor:!0,watch:getValueOf("popupWatchRedirredPages")}),"R"),c+=popupString(" to ")):c+=popupString("Redirects")+popupString(" to "),c):"<br> "+popupString("Redirects")+popupString(" to ")+titledWikiLink({article:(new Title).fromWikiText(a),action:"view",text:safeDecodeURI(a),title:popupString("Bypass redirect")})}function arinLink(a){if(!saneLinkCheck(a))return null;if(!a.article.isIpUser()||!pg.wiki.wikimedia)return null;var b=a.article.userName();return generalNavLink({url:"http://ws.arin.net/cgi-bin/whois.pl?queryinput="+encodeURIComponent(b),newWin:a.newWin,title:tprintf("Look up %s in ARIN whois database",[b]),text:a.text,noPopup:1})}function toolDbName(a){var b=mw.config.get("wgDBname");return a||(b+="_p"),b}function saneLinkCheck(a){return typeof a.article!=typeof{}||"string"!=typeof a.text?!1:!0}function editCounterLink(a){var b,c,d,e,f;if(!saneLinkCheck(a))return null;if(!pg.wiki.wikimedia)return null;switch(b=a.article.userName(),c=getValueOf("popupEditCounterTool"),e="//tools.wmflabs.org/supercount/index.php?user=$1&project=$2.$3",c){case"custom":d=simplePrintf(getValueOf("popupEditCounterUrl"),[encodeURIComponent(b),toolDbName()]);break;case"kate":case"interiot":default:f=pg.wiki.hostname.split("."),d=simplePrintf(e,[encodeURIComponent(b),f[0],f[1]])}return generalNavLink({url:d,title:tprintf("editCounterLinkHint",[b]),newWin:a.newWin,text:a.text,noPopup:1})}function globalSearchLink(a){var b,c;return saneLinkCheck(a)?(b="http://vs.aka-online.de/cgi-bin/globalwpsearch.pl?timeout=120&search=",c=a.article.urlString({keepSpaces:!0}),generalNavLink({url:b+c,newWin:a.newWin,title:tprintf("globalSearchHint",[safeDecodeURI(a.article)]),text:a.text,noPopup:1})):null}function googleLink(a){var b,c;return saneLinkCheck(a)?(b="http://www.google.com/search?q=",c=a.article.urlString({keepSpaces:!0}),generalNavLink({url:b+"%22"+c+"%22",newWin:a.newWin,title:tprintf("googleSearchHint",[safeDecodeURI(a.article)]),text:a.text,noPopup:1})):null}function editorListLink(a){var b,c,d;return saneLinkCheck(a)?(b=a.article.articleFromTalkPage()||a.article,c=pg.wiki.hostname.split("."),d="//tools.wmflabs.org/xtools/articleinfo/index.php?&uselang="+mw.config.get("wgUserLanguage")+"lang="+c[0]+"&wiki="+c[1]+"&begin=&end=&article=",generalNavLink({url:d+b.urlString(),title:tprintf("editorListHint",[b]),newWin:a.newWin,text:a.text,noPopup:1})):null}function generalNavLink(a){return a.className=null==a.className?"popupNavLink":a.className,generalLink(a)}function getHistoryInfo(a,b){log("getHistoryInfo"),getHistory(a,b?function(a){b(processHistory(a))}:processHistory)}function getHistory(a,b){if(log("getHistory"),!mw.config.get("wgEnableAPI"))return alert("This function of navigation popups now requires a MediaWiki installation with the API enabled."),!1;var c=pg.wiki.apiwikibase+"?format=json&action=query&prop=revisions&titles="+new Title(a).urlString()+"&rvlimit="+getValueOf("popupHistoryLimit");return log("getHistory: url="+c),pg.flag.isIE&&(c+="&*"),startDownload(c,pg.idNumber+"history",b)}function processHistory(a){var c,d,e,g,h,b=getJsObj(a.data);try{window.x=b,c=b["query"]["pages"];for(d in c){e=c[d]["revisions"];break}}catch(f){return log("Something went wrong with JSON business"),finishProcessHistory([])}for(g=[],h=0;h<e.length;++h)g.push({oldid:e[h]["revid"],editor:e[h]["user"]});return log("processed "+g.length+" edits"),finishProcessHistory(g,mw.config.get("wgUserName"))}function finishProcessHistory(a,b){var d,c={};for(c.edits=a,c.userName=b,d=0;d<a.length;++d)"undefined"==typeof c.myLastEdit&&b&&a[d].editor==b&&(c.myLastEdit={index:d,oldid:a[d].oldid,previd:0==d?null:a[d-1].oldid}),"undefined"==typeof c.firstNewEditor&&a[d].editor!=a[0].editor&&(c.firstNewEditor={index:d,oldid:a[d].oldid,previd:0==d?null:a[d-1].oldid});return c}function defaultize(a){var b=null;return"popupCookies"!=a&&(defaultize("popupCookies"),pg.option.popupCookies&&(b=Cookie.read(a)))?(pg.option[a]=b,void 0):((null===pg.option[a]||"undefined"==typeof pg.option[a])&&(pg.option[a]="undefined"!=typeof window[a]?window[a]:pg.optionDefault[a]),void 0)}function newOption(a,b){pg.optionDefault[a]=b}function setDefault(a,b){return newOption(a,b)}function getValueOf(a){return defaultize(a),pg.option[a]}function setOptions(){var b,a=!1;if(mw.config.get("wgUserGroups"))for(b=0;b<mw.config.get("wgUserGroups").length;++b)"sysop"==mw.config.get("wgUserGroups")[b]&&(a=!0);newOption("popupDelay",.5),newOption("popupHideDelay",.5),newOption("simplePopups",!1),newOption("popupStructure","shortmenus"),newOption("popupActionsMenu",!0),newOption("popupSetupMenu",!0),newOption("popupAdminLinks",a),newOption("popupShortcutKeys",!1),newOption("popupHistoricalLinks",!0),newOption("popupOnlyArticleLinks",!0),newOption("removeTitles",!0),newOption("popupMaxWidth",350),newOption("popupInitialWidth",!1),newOption("popupSimplifyMainLink",!0),newOption("popupAppendRedirNavLinks",!0),newOption("popupTocLinks",!1),newOption("popupSubpopups",!0),newOption("popupDragHandle",!1),newOption("popupLazyPreviews",!0),newOption("popupLazyDownloads",!0),newOption("popupAllDabsStubs",!1),newOption("popupDebugging",!1),newOption("popupAdjustDiffDates",!0),newOption("popupActiveNavlinks",!0),newOption("popupModifier",!1),newOption("popupModifierAction","enable"),newOption("popupDraggable",!0),newOption("popupImages",!0),newOption("imagePopupsForImages",!0),newOption("popupNeverGetThumbs",!1),newOption("popupThumbAction","imagepage"),newOption("popupImageSize",60),newOption("popupImageSizeLarge",200),newOption("popupFixRedirs",!1),newOption("popupRedirAutoClick","wpDiff"),newOption("popupFixDabs",!1),newOption("popupDabsAutoClick","wpDiff"),newOption("popupRevertSummaryPrompt",!1),newOption("popupMinorReverts",!1),newOption("popupRedlinkRemoval",!1),newOption("popupWatchDisambiggedPages",null),newOption("popupWatchRedirredPages",null),newOption("popupDabWiktionary","last"),newOption("popupNavLinks",!0),newOption("popupNavLinkSeparator"," &sdot; "),newOption("popupLastEditLink",!0),newOption("popupEditCounterTool","soxred"),newOption("popupEditCounterUrl",""),newOption("popupExtraUserMenu",""),newOption("popupPreviews",!0),newOption("popupSummaryData",!0),newOption("popupMaxPreviewSentences",5),newOption("popupMaxPreviewCharacters",600),newOption("popupLastModified",!0),newOption("popupPreviewKillTemplates",!0),newOption("popupPreviewRawTemplates",!0),newOption("popupPreviewFirstParOnly",!0),newOption("popupPreviewCutHeadings",!0),newOption("popupPreviewButton",!1),newOption("popupPreviewButtonEvent","click"),newOption("popupPreviewDiffs",!0),newOption("popupDiffMaxLines",100),newOption("popupDiffContextLines",2),newOption("popupDiffContextCharacters",40),newOption("popupDiffDates",!0),newOption("popupDiffDatePrinter","toLocaleString"),newOption("popupFixDabsSummary",popupString("defaultpopupFixDabsSummary")),newOption("popupExtendedRevertSummary",popupString("defaultpopupExtendedRevertSummary")),newOption("popupTimeOffset",null),newOption("popupRevertSummary",popupString("defaultpopupRevertSummary")),newOption("popupRevertToPreviousSummary",popupString("defaultpopupRevertToPreviousSummary")),newOption("popupQueriedRevertSummary",popupString("defaultpopupQueriedRevertSummary")),newOption("popupQueriedRevertToPreviousSummary",popupString("defaultpopupQueriedRevertToPreviousSummary")),newOption("popupFixRedirsSummary",popupString("defaultpopupFixRedirsSummary")),newOption("popupRedlinkSummary",popupString("defaultpopupRedlinkSummary")),newOption("popupRmDabLinkSummary",popupString("defaultpopupRmDabLinkSummary")),newOption("popupCookies",!1),newOption("popupHistoryLimit",50),newOption("popupFilters",[popupFilterStubDetect,popupFilterDisambigDetect,popupFilterPageSize,popupFilterCountLinks,popupFilterCountImages,popupFilterCountCategories,popupFilterLastModified]),newOption("extraPopupFilters",[]),newOption("popupOnEditSelection","cursor"),newOption("popupPreviewHistory",!0),newOption("popupImageLinks",!0),newOption("popupCategoryMembers",!0),newOption("popupUserInfo",!0),newOption("popupHistoryPreviewLimit",25),newOption("popupContribsPreviewLimit",25),newOption("popupRevDelUrl","//en.wikipedia.org/wiki/Wikipedia:Revision_deletion"),newOption("popupNewWindows",!1),newOption("popupLinksNewWindow",{lastContrib:!0,sinceMe:!0}),newOption("popupDabRegexp","(\\{\\{\\s*disambig(?!uation needed)|disambig(uation|)\\s*\\}\\}|disamb\\s*\\}\\}|dab\\s*\\}\\})|\\{\\{\\s*(((geo|hn|road?|school|number)dis)|[234][lc][acw]|(road|ship)index)(\\s*[|][^}]*)?\\s*[}][}]|is a .*disambiguation.*page"),newOption("popupAnchorRegexp","anchors?"),newOption("popupStubRegexp","(sect)?stub[}][}]|This .*-related article is a .*stub"),newOption("popupImageVarsRegexp","image|image_(?:file|skyline|name|flag|seal)|cover|badge|logo")}function popupString(a){return"undefined"!=typeof popupStrings&&popupStrings&&popupStrings[a]?popupStrings[a]:pg.string[a]?pg.string[a]:a}function tprintf(a,b){return typeof b!=typeof[]&&(b=[b]),simplePrintf(popupString(a),b)}var Insta,Cookie,hexcase,jsReservedProperties,pg={re:{},ns:{},string:{},wiki:{},misc:{},option:{},optionDefault:{},flag:{},cache:{},structures:{},timer:{},counter:{},current:{},fn:{},endoflist:null};window.pg=pg,Drag.prototype.fixE=function(a){return"undefined"==typeof a&&(a=window.event),"undefined"==typeof a.layerX&&(a.layerX=a.offsetX),"undefined"==typeof a.layerY&&(a.layerY=a.offsetY),a},Drag.prototype.init=function(a,b){var c=this;this.obj=a,a.onmousedown=function(a){c.start.apply(c,[a])},a.dragging=!1,a.popups_draggable=!0,a.hmode=!0,a.vmode=!0,a.root=b&&null!==b?b:a,isNaN(parseInt(a.root.style.left,10))&&(a.root.style.left="0px"),isNaN(parseInt(a.root.style.top,10))&&(a.root.style.top="0px"),a.root.onthisStart=function(){},a.root.onthisEnd=function(){},a.root.onthis=function(){}},Drag.prototype.start=function(a){var c,d,e,b=this.obj;return a=this.fixE(a),!this.startCondition||this.startCondition(a)?(c=parseInt(b.vmode?b.root.style.top:b.root.style.bottom,10),d=parseInt(b.hmode?b.root.style.left:b.root.style.right,10),b.root.onthisStart(d,c),b.lastMouseX=a.clientX,b.lastMouseY=a.clientY,e=this,b.onmousemoveDefault=document.onmousemove,b.dragging=!0,document.onmousemove=function(a){e.drag.apply(e,[a])},document.onmouseup=function(a){e.end.apply(e,[a])},!1):void 0},Drag.prototype.drag=function(a){var b,c,d,e,f,g,h;return a=this.fixE(a),b=this.obj,c=a.clientY,d=a.clientX,e=parseInt(b.vmode?b.root.style.top:b.root.style.bottom,10),f=parseInt(b.hmode?b.root.style.left:b.root.style.right,10),g=f+(d-b.lastMouseX)*(b.hmode?1:-1),h=e+(c-b.lastMouseY)*(b.vmode?1:-1),this.obj.root.style[b.hmode?"left":"right"]=g+"px",this.obj.root.style[b.vmode?"top":"bottom"]=h+"px",this.obj.lastMouseX=d,this.obj.lastMouseY=c,this.obj.root.onthis(g,h),!1},Drag.prototype.end=function(){document.onmousemove=this.obj.onmousemoveDefault,document.onmouseup=null,this.obj.dragging=!1,this.endHook&&this.endHook(parseInt(this.obj.root.style[this.obj.hmode?"left":"right"],10),parseInt(this.obj.root.style[this.obj.vmode?"top":"bottom"],10))},pg.structures.original={},pg.structures.original.popupLayout=function(){return["popupError","popupImage","popupTopLinks","popupTitle","popupData","popupOtherLinks","popupRedir",["popupWarnRedir","popupRedirTopLinks","popupRedirTitle","popupRedirData","popupRedirOtherLinks"],"popupMiscTools",["popupRedlink"],"popupPrePreviewSep","popupPreview","popupSecondPreview","popupPreviewMore","popupPostPreview","popupFixDab"]},pg.structures.original.popupRedirSpans=function(){return["popupRedir","popupWarnRedir","popupRedirTopLinks","popupRedirTitle","popupRedirData","popupRedirOtherLinks"]},pg.structures.original.popupTitle=function(a){return log("defaultstructure.popupTitle"),getValueOf("popupNavLinks")?"":navlinkStringToHTML("<b><<mainlink>></b>",a.article,a.params)},pg.structures.original.popupTopLinks=function(a){return log("defaultstructure.popupTopLinks"),getValueOf("popupNavLinks")?navLinksHTML(a.article,a.hint,a.params):""},pg.structures.original.popupImage=function(a){return log("original.popupImage, x.article="+a.article+", x.navpop.idNumber="+a.navpop.idNumber),imageHTML(a.article,a.navpop.idNumber)},pg.structures.original.popupRedirTitle=pg.structures.original.popupTitle,pg.structures.original.popupRedirTopLinks=pg.structures.original.popupTopLinks,copyStructure("original","nostalgia"),pg.structures.nostalgia.popupTopLinks=function(a){var c,d,e,f,b="";return b+="<b><<mainlink|shortcut= >></b>",b+="if(user){<br><<contribs|shortcut=c>>",b+="if(wikimedia){*<<count|shortcut=#>>}",b+="if(ipuser){}else{*<<email|shortcut=E>>}if(admin){*<<block|shortcut=b>>}}",c="<<edit|shortcut=e>>",d="if(oldid){<<editOld|shortcut=e>>|<<revert|shortcut=v|rv>>|<<edit|cur>>}else{"+c+"}",e="<<history|shortcut=h>>",f="<<unwatch|unwatchShort>>|<<watch|shortcut=w|watchThingy>>",b+="<br>if(talk){"+d+"|<<new|shortcut=+>>"+"*"+e+"*"+f+"*"+"<b><<article|shortcut=a>></b>|<<editArticle|edit>>"+"}else{"+d+"*"+e+"*"+f+"*"+"<b><<talk|shortcut=t>></b>|<<editTalk|edit>>|<<newTalk|shortcut=+|new>>"+"}",b+="<br><<whatLinksHere|shortcut=l>>*<<relatedChanges|shortcut=r>>",b+="if(admin){<br>}else{*}<<move|shortcut=m>>",b+="if(admin){*<<unprotect|unprotectShort>>|<<protect|shortcut=p>>*<<undelete|undeleteShort>>|<<delete|shortcut=d>>}",navlinkStringToHTML(b,a.article,a.params)},pg.structures.nostalgia.popupRedirTopLinks=pg.structures.nostalgia.popupTopLinks,copyStructure("original","fancy"),pg.structures.fancy.popupTitle=function(a){return navlinkStringToHTML("<font size=+0><<mainlink>></font>",a.article,a.params)},pg.structures.fancy.popupTopLinks=function(a){var b="<<history|shortcut=h|hist>>|<<lastEdit|shortcut=/|last>>if(mainspace_en){|<<editors|shortcut=E|eds>>}",c="<<unwatch|unwatchShort>>|<<watch|shortcut=w|watchThingy>>",d="<<move|shortcut=m|move>>";return navlinkStringToHTML("if(talk){<<edit|shortcut=e>>|<<new|shortcut=+|+>>*"+b+"*"+"<<article|shortcut=a>>|<<editArticle|edit>>"+"*"+c+"*"+d+"}else{<<edit|shortcut=e>>*"+b+"*<<talk|shortcut=t|>>|<<editTalk|edit>>|<<newTalk|shortcut=+|new>>"+"*"+c+"*"+d+"}<br>",a.article,a.params)},pg.structures.fancy.popupOtherLinks=function(a){var d,b="<<unprotect|unprotectShort>>|<<protect|shortcut=p>>*<<undelete|undeleteShort>>|<<delete|shortcut=d|del>>",c="<<contribs|shortcut=c>>if(wikimedia){|<<count|shortcut=#|#>>}";return c+="if(ipuser){|<<arin>>}else{*<<email|shortcut=E|"+popupString("email")+">>}if(admin){*<<block|shortcut=b>>}",d="<<whatLinksHere|shortcut=l|links here>>*<<relatedChanges|shortcut=r|related>>",navlinkStringToHTML("<br>if(user){"+c+"*}if(admin){"+b+"if(user){<br>}else{*}}"+d,a.article,a.params)},pg.structures.fancy.popupRedirTitle=pg.structures.fancy.popupTitle,pg.structures.fancy.popupRedirTopLinks=pg.structures.fancy.popupTopLinks,pg.structures.fancy.popupRedirOtherLinks=pg.structures.fancy.popupOtherLinks,copyStructure("fancy","fancy2"),pg.structures.fancy2.popupTopLinks=function(a){return"<br>"+pg.structures.fancy.popupTopLinks(a).replace(RegExp("<br>$","i"),"")},pg.structures.fancy2.popupLayout=function(){return["popupError","popupImage","popupTitle","popupData","popupTopLinks","popupOtherLinks","popupRedir",["popupWarnRedir","popupRedirTopLinks","popupRedirTitle","popupRedirData","popupRedirOtherLinks"],"popupMiscTools",["popupRedlink"],"popupPrePreviewSep","popupPreview","popupSecondPreview","popupPreviewMore","popupPostPreview","popupFixDab"]},copyStructure("original","menus"),pg.structures.menus.popupLayout=function(){return["popupError","popupImage","popupTopLinks","popupTitle","popupOtherLinks","popupRedir",["popupWarnRedir","popupRedirTopLinks","popupRedirTitle","popupRedirData","popupRedirOtherLinks"],"popupData","popupMiscTools",["popupRedlink"],"popupPrePreviewSep","popupPreview","popupSecondPreview","popupPreviewMore","popupPostPreview","popupFixDab"]},pg.structures.menus.popupTopLinks=function(a,b){var h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,c=[],d='<div class="popup_drop">',e="</div>",g="<<history|shortcut=h>>";return b||(g="<menurow>"+g+"|<<historyfeed|rss>>if(mainspace_en){|<<editors|shortcut=E>>}</menurow>"),h="<<lastEdit|shortcut=/|show last edit>>",i="<<lastContrib|last set of edits>><<sinceMe|changes since mine>>",j="<<whatLinksHere|shortcut=l|what links here>>",k="<<relatedChanges|shortcut=r|related changes>>",l="<menurow><<search|shortcut=s>>if(wikimedia){|<<globalsearch|shortcut=g|global>>}|<<google|shortcut=G|web>></menurow>",m="<menurow><<unwatch|unwatchShort>>|<<watch|shortcut=w|watchThingy>></menurow>",n="<menurow><<unprotect|unprotectShort>>|<<protect|shortcut=p>>|<<protectlog|log>></menurow>",o="<menurow><<undelete|undeleteShort>>|<<delete|shortcut=d>>|<<deletelog|log>></menurow>",p="<<move|shortcut=m|move page>>",q="<menurow><<nullEdit|shortcut=n|null edit>>|<<purge|shortcut=P>></menurow>",r="<menurow><<view|shortcut=v>>|<<render|shortcut=S>>|<<raw>></menurow>",s="if(oldid){<menurow><<edit|shortcut=e>>|<<editOld|shortcut=e|this&nbsp;revision>></menurow><menurow><<revert|shortcut=v>>|<<undo>></menurow>}else{<<edit|shortcut=e>>}",t="if(rcid){<<markpatrolled|mark patrolled>>}",u="if(talk){<<new|shortcut=+|new topic>>}",v="if(admin){"+n+o+"}",getValueOf("popupActionsMenu")?c.push("<<mainlink>>*"+d+menuTitle("actions")):c.push(d+"<<mainlink>>"),c.push("<menu>"),c.push(s+t+u+g+h),b||c.push(i),c.push(p+j+k),b||c.push(q+l),b||c.push(r),c.push("<hr />"+m+v),c.push("<hr />if(talk){<<article|shortcut=a|view article>><<editArticle|edit article>>}else{<<talk|shortcut=t|talk page>><<editTalk|edit talk>><<newTalk|shortcut=+|new topic>>}</menu>"+e),w="<<email|shortcut=E|email user>>",x="if(wikimedia){<menurow>}<<contribs|shortcut=c|contributions>>if(wikimedia){</menurow>}if(admin){<menurow><<deletedContribs>></menurow>}",c.push("if(user){*"+d+menuTitle("user")),c.push("<menu>"),+c.push("<menurow><<userPage|shortcut=u|user&nbsp;page>>|<<userSpace|space>></menurow>"),c.push("<<userTalk|shortcut=t|user talk>><<editUserTalk|edit user talk>><<newUserTalk|shortcut=+|leave comment>>"),b?c.push("if(ipuser){}else{"+w+"}"):c.push("if(ipuser){<<arin>>}else{"+w+"}"),c.push("<hr />"+x+"<<userlog|shortcut=L|user log>>"),c.push("if(wikimedia){<<count|shortcut=#|edit counter>>}"),c.push("if(admin){<menurow><<unblock|unblockShort>>|<<block|shortcut=b|block user>></menurow>}"),c.push("<<blocklog|shortcut=B|block log>>"+getValueOf("popupExtraUserMenu")),c.push("</menu>"+e+"}"),getValueOf("popupSetupMenu")&&!a.navpop.hasPopupMenu&&(a.navpop.hasPopupMenu=!0,c.push("*"+d+menuTitle("popupsMenu")+"<menu>"),c.push("<<togglePreviews|toggle previews>>"),c.push("<<purgePopups|reset>>"),c.push("<<disablePopups|disable>>"),c.push("</menu>"+e)),navlinkStringToHTML(c.join(""),a.article,a.params)},pg.structures.menus.popupRedirTitle=pg.structures.menus.popupTitle,pg.structures.menus.popupRedirTopLinks=pg.structures.menus.popupTopLinks,copyStructure("menus","shortmenus"),pg.structures.shortmenus.popupTopLinks=function(a){return pg.structures.menus.popupTopLinks(a,!0)},pg.structures.shortmenus.popupRedirTopLinks=pg.structures.shortmenus.popupTopLinks,copyStructure("shortmenus","dabshortmenus"),pg.structures.dabshortmenus.popupLayout=function(){return["popupError","popupImage","popupTopLinks","popupTitle","popupOtherLinks","popupRedir",["popupWarnRedir","popupRedirTopLinks","popupRedirTitle","popupRedirData","popupRedirOtherLinks"],"popupData","popupMiscTools",["popupRedlink"],"popupFixDab","popupPrePreviewSep","popupPreview","popupSecondPreview","popupPreviewMore","popupPostPreview"]},copyStructure("menus","dabmenus"),pg.structures.dabmenus.popupLayout=pg.structures.dabshortmenus.popupLayout,pg.structures.lite={},pg.structures.lite.popupLayout=function(){return["popupTitle","popupPreview"]},pg.structures.lite.popupTitle=function(a){return log(a.article+": structures.lite.popupTitle"),'<div><span class="popup_mainlink"><b>'+a.article.toString()+"</b></span></div>"},new Downloader,Downloader.prototype.send=function(a){return this.http?this.http.send(a):null},Downloader.prototype.abort=function(){return this.http?(this.aborted=!0,this.http.abort()):null},Downloader.prototype.getData=function(){return this.http?this.http.responseText:null},Downloader.prototype.setTarget=function(){return this.http?(this.http.open(this.method,this.url,this.async),void 0):null},Downloader.prototype.getReadyState=function(){return this.http?this.http.readyState:null},pg.misc.downloadsInProgress={},Downloader.prototype.start=function(){this.http&&(pg.misc.downloadsInProgress[this.id]=this,this.http.send(null))},Downloader.prototype.getLastModifiedDate=function(){if(!this.http)return null;var a=null;try{a=this.http.getResponseHeader("Last-Modified")}catch(b){}return a?new Date(a):null},Downloader.prototype.setCallback=function(a){this.http&&(this.http.onreadystatechange=a)},Downloader.prototype.getStatus=function(){return this.http?this.http.status:null},Insta={},Insta.dump=function(a,b){"string"==typeof a&&(a=document.getElementById(a)),"string"==typeof b&&(b=document.getElementById(b)),b.innerHTML=this.convert(a.value)},Insta.convert=function(a){function f(){return b.length}function g(){return b.shift()}function h(a){c+=a}function i(){for(var e,f,a=1,b=arguments,c=b[0],d="";a<b.length&&(f=c.indexOf("?"))+1;a++)a-=e="?"==c.charAt(f+1)?1:0,d+=c.substring(0,f)+(e?"?":b[a]),c=c.substr(f+1+e);return d+c}function j(a){return a.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;")}function k(a){return a.replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/:/g,"&#58;").replace(/\[/g,"&#91;").replace(/]/g,"&#93;")}function l(a){return k(a).replace(/'/g,"&#39;").replace(/"/g,"&quot;")}function n(a,b){return b>a?a:b}function o(a,b){for(var c=0,d=n(a.length,b.length);d>c&&a.charAt(c)==b.charAt(c);c++);return c}function p(a){return"string"==typeof a?b[0].substr(0,a.length)==a:e=b[0].match(a)}function q(a){return b[0]==a}function r(a){return b[0].charAt(a)}function s(a){h(a),g()}function t(){for(var c,d,j,k,l,m,a="";f()&&p(/^([*#:;]+)(.*)$/);){for(c=e,g(),d=o(a,c[1]),j=a.length-1;j>=d;j--)if(k=a.charAt(j),"*"==k)h("</ul>");else if("#"==k)h("</ol>");else switch(c[1].charAt(j)){case"":case"*":case"#":h("</dl>")}for(j=d;j<c[1].length;j++)if(l=c[1].charAt(j),"*"==l)h("<ul>");else if("#"==l)h("<ol>");else switch(a.charAt(j)){case"":case"*":case"#":h("<dl>")}switch(c[1].charAt(c[1].length-1)){case"*":case"#":h("<li>"+z(c[2]));break;case";":h("<dt>"),(m=c[2].match(/(.*?)(:.*?)$/))?(h(z(m[1])),b.unshift(m[2])):h(z(c[2]));break;case":":h("<dd>"+z(c[2]))}a=c[1]}for(j=a.length-1;j>=0;j--)h(i("</?>","*"==a.charAt(j)?"ul":"#"==a.charAt(j)?"ol":"dl"))
}function u(){for(s(i("<table>",p(/^\{\|( .*)$/)?e[1]:""));f();)if(p("|"))switch(r(1)){case"}":return s("</table>"),void 0;case"-":s(i("<tr>",p(/\|-*(.*)/)[1]));break;default:v()}else p("!")?v():g()}function v(){var a,c,e,i,d=g().match(/^(\|\+|\||!)((?:([^[|]*?)\|(?!\|))?(.*))$/);if("|+"==d[1]?h("<caption"):h("<t"+("|"==d[1]?"d":"h")),c="undefined"!=typeof d[3]?4:2,h(">"),"|+"!=d[1])for(a=d[c].split("|"==d[1]?"||":/(?:\|\||!!)/),h(z(a.shift()));a.length;)b.unshift(d[1]+a.pop());else h(d[c]);for(e=0,i=[];f();i.push(g()))if(p("|")){if(!e)break;"}"==r(1)&&e--}else{if(!e&&p("!"))break;p("{|")&&e++}i.length&&h(Insta.convert(i))}function w(){h("<pre>");do s(z(b[0].substring(1))+"\n");while(f()&&p(" "));h("</pre>")}function x(){h(y(g()))}function y(a){var c,e,m,n,o,p,q,b=a.substring(a.indexOf(":")+1,a.length-2),d=[],f="",g=0,h=0,j=0,k="";if(b.match(/\|/)){for(m=0,o=b.length-1;o>0;o--){if("|"==b.charAt(o)&&!m){n=b.substr(o+1),b=b.substring(0,o);break}switch(b.substr(o-1,2)){case"]]":m++,o--;break;case"[[":m--,o--}}for(d=b.split(/\s*\|\s*/),d.push(n),e=d.shift();d.length;d.shift())if(p=d[0].match(/^(\d*)(?:[px]*\d*)?px$/))c=p[1];else switch(d[0]){case"thumb":case"thumbnail":g=!0;case"frame":h=!0;break;case"none":case"right":case"left":j=!1,k=d[0];break;case"center":j=!0,k="none";break;default:1==d.length&&(f=d[0])}}else e=b;if(q="",h)""==k&&(k="right"),q+=i("<div class='thumb t?'>",k),g?(c||(c=Insta.conf.wiki.default_thumb_width),q+=i("<div style='width:?px;'>?",2+1*c,A(e,f,c))+i("<div class='thumbcaption'><div class='magnify' style='float:right'><a href='?' title='Enlarge'></a></div>?</div>",l(Insta.conf.paths.articles+Insta.conf.locale.image+":"+e),z(f))):q+="<div>"+A(e,f)+i("<div class='thumbcaption'>?</div>",z(f)),q+="</div></div>";else{if(""==k)return A(e,f,c);q+=i("<div class='float?'><span>?</span></div>",k,A(e,f,c))}return j?i("<div class='center'>?</div>",q):q}function z(a){for(var b,f,g,h,c=0,d=0,e=0,i="";-1!=(b=a.indexOf("<nowiki>",d));){i+=D(a.substring(c,b)),b+=8,d=b,h=!0;do if(f=a.indexOf("<nowiki>",d),g=a.indexOf("</nowiki>",d),f>=g||-1==f){if(-1==g)return i+j(a.substr(b));d=g+9,e?e--:(c=d,i+=j(a.substring(b,c-9)),h=!1)}else d=f+8,e++;while(h)}return i+D(a.substr(c))}function A(a,b,c){var d,e,f;return a=a.charAt(0).toUpperCase()+a.substr(1),a=a.replace(/ /g,"_"),b=E(b),d=hex_md5(a),e=d.charAt(0)+"/"+d.substr(0,2)+"/"+a,c&&(c="width='"+c+"px'"),f='<img onerror="'+pg.escapeQuotesHTML("this.onerror=null;this.src='"+pg.jsescape(Insta.conf.paths.images_fallback+e)+"'")+'" src="'+pg.escapeQuotesHTML(Insta.conf.paths.images+e)+'" '+(""!=b?'alt="'+pg.escapeQuotesHTML(b)+'"':"")+" "+c+">",i("<a class='image' ? href=\"?\">?</a>",""!=b?'title="'+pg.escapeQuotesHTML(b)+'"':"",pg.escapeQuotesHTML(Insta.conf.paths.articles+Insta.conf.locale.image+":"+a),f)}function B(a){for(var b,e,f,g,h,i,c=0,d=0;-1!=(b=a.indexOf("[[",c))&&a.substr(b+2).match(RegExp("^(Image|File|"+Insta.conf.locale.image+"):","i"));){e=!0,c=b;do if(c+=2,f=a.indexOf("]]",c),g=a.indexOf("[[",c),g>=f||-1==g){if(-1==f)return a;c=f,d?d--:(h=a.substring(b,f+2),i=y(h),a=a.replace(h,i),c=b+i.length,e=!1)}else c=g,d++;while(e)}return a}function C(a){for(var b,c,d,e,f="";(d=a.indexOf("''",e))+1;)f+=a.substring(e,d),e=d+2,"'"==a.charAt(d+2)?(e++,c=!c,f+=c?"<strong>":"</strong>"):(b=!b,f+=b?"<em>":"</em>");return f+a.substr(e)}function D(a){var b,c,d,e;for(a=B(a),a=C(a);b=a.match(/<(?:)math>(.*?)<\/math>/i);)c=hex_md5(b[1]),a=a.replace(b[0],i("<img src='?.png'>",Insta.conf.paths.math+c));return d=new Date,e=d.getUTCMinutes(),10>e&&(e="0"+e),d=i("?:?, ? ? ? (UTC)",d.getUTCHours(),e,d.getUTCDate(),Insta.conf.locale.months[d.getUTCMonth()],d.getUTCFullYear()),a.replace(/~{5}(?!~)/g,d).replace(/~{4}(?!~)/g,Insta.conf.user.name+" "+d).replace(/~{3}(?!~)/g,Insta.conf.user.name).replace(RegExp("\\[\\[:((?:"+Insta.conf.locale.category+"|Image|File|"+Insta.conf.locale.image+"|"+Insta.conf.wiki.interwiki+"):[^|]*?)\\]\\](w*)","gi"),function(a,b,c){return i("<a href='?'>?</a>",Insta.conf.paths.articles+l(b),k(b)+k(c))}).replace(RegExp("\\[\\[(?:"+Insta.conf.locale.category+"|"+Insta.conf.wiki.interwiki+"):.*?\\]\\]","gi"),"").replace(RegExp("\\[\\[:((?:"+Insta.conf.locale.category+"|Image|File|"+Insta.conf.locale.image+"|"+Insta.conf.wiki.interwiki+"):.*?)\\|([^\\]]+?)\\]\\](\\w*)","gi"),function(a,b,c,d){return i("<a href='?'>?</a>",Insta.conf.paths.articles+l(b),k(c)+k(d))}).replace(/\[\[(\/[^|]*?)\]\]/g,function(a,b){return i("<a href='?'>?</a>",Insta.conf.baseUrl+l(b),k(b))}).replace(/\[\[(\/.*?)\|(.+?)\]\]/g,function(a,b,c){return i("<a href='?'>?</a>",Insta.conf.baseUrl+l(b),k(c))}).replace(/\[\[([^|]*?)\]\](\w*)/g,function(a,b,c){return i("<a href='?'>?</a>",Insta.conf.paths.articles+l(b),k(b)+k(c))}).replace(/\[\[(.*?)\|([^\]]+?)\]\](\w*)/g,function(a,b,c,d){return i("<a href='?'>?</a>",Insta.conf.paths.articles+l(b),k(c)+k(d))}).replace(/\[\[([^\]]*?:)?(.*?)( *\(.*?\))?\|\]\]/g,function(a,b,c,d){return i("<a href='?'>?</a>",Insta.conf.paths.articles+l(b)+l(c)+l(d),k(c))}).replace(/\[(https?|news|ftp|mailto|gopher|irc):(\/*)([^\]]*?) (.*?)\]/g,function(a,b,c,d,e){return i("<a class='external' href='?:?'>?</a>",l(b),l(c)+l(d),k(e))}).replace(/\[http:\/\/(.*?)\]/g,function(a,b){return i("<a class='external' href='http://?'>[#]</a>",l(b))}).replace(/\[(news|ftp|mailto|gopher|irc):(\/*)(.*?)\]/g,function(a,b,c,d){return i("<a class='external' href='?:?'>?:?</a>",l(b),l(c)+l(d),k(b),k(c)+k(d))}).replace(/(^| )(https?|news|ftp|mailto|gopher|irc):(\/*)([^ $]*[^.,!?;: $])/g,function(a,b,c,d,e){return i("?<a class='external' href='?:?'>?:?</a>",k(b),l(c),l(d)+l(e),k(c),k(d)+k(e))}).replace("__NOTOC__","").replace("__NOEDITSECTION__","")}function E(a){return a.replace(/\[\[[^\]]*\|(.*?)\]\]/g,"$1").replace(/\[\[(.*?)\]\]/g,"$1").replace(/''(.*?)''/g,"$1")}for(var e,b="string"==typeof a?a.replace(/\r/g,"").split(/\n/):a,c="",d=0;f();)p(/^(={1,6})(.*)\1(.*)$/)?(d=0,s(i("<h?>?</h?>?",e[1].length,z(e[2]),e[1].length,e[3]))):p(/^[*#:;]/)?(d=0,t()):p(" ")?(d=0,w()):p("{|")?(d=0,u()):p(/^----+$/)?(d=0,s("<hr />")):p(Insta.BLOCK_IMAGE)?(d=0,x()):(q("")?(d=f()>1&&""==b[1])&&s("<p><br>"):(d||(h("<p>"),d=1),h(z(b[0])+" ")),g());return c},Title.prototype=new Stringwrapper,Title.prototype.toString=function(a){return this.value+(!a&&this.anchor?"#"+this.anchorString():"")},Title.prototype.anchorString=function(){var a,b,c;if(!this.anchor)return"";for(a=this.anchor.parenSplit(/((?:[.][0-9A-F]{2})+)/),b=a.length,c=1;b>c;c+=2)a[c]=decodeURIComponent(a[c].split(".").join("%")).split("_").join(" ");return a.join("")},Title.prototype.urlAnchor=function(){var c,a=this.anchor.parenSplit("/((?:[%][0-9A-F]{2})+)/"),b=a.length;for(c=1;b>c;c+=2)a[c]=a[c].split("%").join(".");return a.join("")},Title.prototype.anchorFromUtf=function(a){this.anchor=encodeURIComponent(a.split(" ").join("_")).split("%3A").join(":").split("'").join("%27").split("%").join(".")},Title.fromURL=function(a){return(new Title).fromURL(a)},Title.prototype.fromURL=function(a){var b,c,d,e,f,g,h,i,j;return"string"!=typeof a?(this.value=null,this):(b=a.split("?"),b[0]=b[0].split("&").join("%26"),pg.flag.linksLikeIE6&&(b[0]=encodeURI(decode_utf8(b[0]))),a=b.join("?"),c=pg.re.contribs.exec(a),null!==c?("title="==c[1]&&(c[3]=c[3].split("+").join(" ")),d=new Title(c[3]),this.setUtf(this.decodeNasties(mw.config.get("wgFormattedNamespaces")[pg.nsUserId]+":"+d.stripNamespace())),this):(e=pg.re.email.exec(a),null!==e?(this.setUtf(this.decodeNasties(mw.config.get("wgFormattedNamespaces")[pg.nsUserId]+":"+new Title(e[3]).stripNamespace())),this):(f=pg.re.backlinks.exec(a))?(this.setUtf(this.decodeNasties(new Title(f[3]))),this):(g=pg.re.specialdiff.exec(a))?(this.setUtf(this.decodeNasties(new Title(mw.config.get("wgFormattedNamespaces")[pg.nsSpecialId]+":Diff"))),this):(h=pg.re.main.exec(a),null===h?this.value=null:(i=/[?](.+[&])?title=/.test(a),i&&(h[2]=h[2].split("+").join("_")),j=h[2]+(h[3]?"#"+h[3]:""),pg.flag.isSafari&&/%25[0-9A-Fa-f]{2}/.test(j)?this.setUtf(decodeURIComponent(unescape(j))):this.setUtf(this.decodeNasties(j))),this)))},Title.prototype.decodeNasties=function(a){var b=this.decodeEscapes(decodeURI(a));return b=b.replace(/[_ ]*$/,"")},Title.prototype.decodeEscapes=function(a){var d,b=a.parenSplit(/((?:[%][0-9A-Fa-f]{2})+)/),c=b.length;for(d=1;c>d;d+=2)b[d]=unescape(b[d]);return b.join("")},Title.fromAnchor=function(a){return(new Title).fromAnchor(a)},Title.prototype.fromAnchor=function(a){return a?this.fromURL(a.href):(this.value=null,this)},Title.fromWikiText=function(a){return(new Title).fromWikiText(a)},Title.prototype.fromWikiText=function(a){return pg.flag.linksLikeIE6||(a=myDecodeURI(a)),this.setUtf(a),this},Title.prototype.hintValue=function(){return this.value?safeDecodeURI(this.value):""},Title.prototype.toUserName=function(a){return this.namespaceId()!=pg.nsUserId&&this.namespaceId()!=pg.nsUsertalkId?(this.value=null,void 0):(this.value=(a?mw.config.get("wgFormattedNamespaces")[pg.nsUserId]+":":"")+this.stripNamespace().split("/")[0],void 0)},Title.prototype.userName=function(a){var b=new Title(this.value);return b.toUserName(a),b.value?b:null},Title.prototype.toTalkPage=function(){var a,b;return null===this.value?null:(a=this.namespaceId(),a>=0&&0==a%2&&(b=mw.config.get("wgFormattedNamespaces")[a+1],"undefined"!=typeof b)?""===b?this.value=this.stripNamespace():(this.value=b.split(" ").join("_")+":"+this.stripNamespace(),this.value):(this.value=null,null))},Title.prototype.namespace=function(){return mw.config.get("wgFormattedNamespaces")[this.namespaceId()]},Title.prototype.namespaceId=function(){var b,a=this.value.indexOf(":");return 0>a?0:(b=mw.config.get("wgNamespaceIds")[this.value.substring(0,a).split(" ").join("_").toLowerCase()],"undefined"==typeof b?0:b)},Title.prototype.talkPage=function(){var a=new Title(this.value);return a.toTalkPage(),a.value?a:null},Title.prototype.isTalkPage=function(){return null===this.talkPage()?!0:!1},Title.prototype.toArticleFromTalkPage=function(){var a,b;return null===this.value?null:(a=this.namespaceId(),a>=0&&1==a%2&&(b=mw.config.get("wgFormattedNamespaces")[a-1],"undefined"!=typeof b)?""===b?this.value=this.stripNamespace():(this.value=b.split(" ").join("_")+":"+this.stripNamespace(),this.value):(this.value=null,null))},Title.prototype.articleFromTalkPage=function(){var a=new Title(this.value);return a.toArticleFromTalkPage(),a.value?a:null},Title.prototype.articleFromTalkOrArticle=function(){var a=new Title(this.value);return a.toArticleFromTalkPage()?a:this},Title.prototype.isIpUser=function(){return pg.re.ipUser.test(this.userName())},Title.prototype.stripNamespace=function(){var b,a=this.value.indexOf(":");return 0>a?this.value:(b=this.namespaceId(),b===pg.nsMainspaceId?this.value:this.value.substring(a+1))},Title.prototype.setUtf=function(a){if(!a)return this.value="",void 0;var b=a.indexOf("#");return 0>b?(this.value=a.split("_").join(" "),this.anchor="",void 0):(this.value=a.substring(0,b).split("_").join(" "),this.anchor=a.substring(b+1),this.ns=null,void 0)},Title.prototype.setUrl=function(a){var b=a.indexOf("#");this.value=safeDecodeURI(a.substring(0,b)),this.anchor=value.substring(b+1)},Title.prototype.append=function(a){this.setUtf(this.value+a)},Title.prototype.urlString=function(a){a||(a={});var b=this.toString(!0);return!a.omitAnchor&&this.anchor&&(b+="#"+this.urlAnchor()),a.keepSpaces||(b=b.split(" ").join("_")),encodeURI(b).split("&").join("%26").split("?").join("%3F").split("+").join("%2B")},Title.prototype.removeAnchor=function(){return new Title(this.toString(!0))},Title.prototype.toUrl=function(){return pg.wiki.titlebase+this.urlString()},Cookie={create:function(a,b,c){var d,e;c?(e=new Date,e.setTime(e.getTime()+1e3*60*60*24*c),d="; expires="+e.toGMTString()):d="",document.cookie=a+"="+b+d+"; path=/"},read:function(a){var d,e,b=a+"=",c=document.cookie.split(";");for(d=0;d<c.length;d++){for(e=c[d];" "==e.charAt(0);)e=e.substring(1,e.length);if(0===e.indexOf(b))return e.substring(b.length,e.length)}return null},erase:function(a){Cookie.create(a,"",-1)}},hexcase=0,"a,b,c"!=String("abc".split(/(b)/))?String.prototype.parenSplit=function(a){var b,c,d,e;for(a=nonGlobalRegex(a),b=this,c=a.exec(b),d=[];c&&b;){for(e=0;e<c.length;++e)"undefined"==typeof c[e]&&(c[e]="");d.push(b.substring(0,c.index)),d=d.concat(c.slice(1)),b=b.substring(c.index+c[0].length),c=a.exec(b)}return d.push(b),d}:(String.prototype.parenSplit=function(a){return this.split(a)},String.prototype.parenSplit.isNative=!0),String.prototype.entify=function(){return this.split("&").join("&amp;").split("<").join("&lt;").split(">").join("&gt;").split('"').join("&quot;")},pg.escapeQuotesHTML=function(a){var b=new RegExp("&","g");return a=a.replace(b,"&amp;"),b=new RegExp('"',"g"),a=a.replace(b,"&quot;"),b=new RegExp("<","g"),a=a.replace(b,"&lt;"),b=new RegExp(">","g"),a=a.replace(b,"&gt;")},pg.jsescape=function(a){var b,c,d,e;if("string"!=typeof a)throw"Invalid type in pg.jsescape";for(b="",c=0;c<a.length;c++)switch(d=a[c]){case"\b":b+="\\b";continue;case"\f":b+="\\f";continue;case"\n":b+="\\n";continue;case"\0":b+="\\0";continue;case"\r":b+="\\r";continue;case" ":b+="\\t";continue;case"�":b+="\\v";continue;case"\\":b+="\\\\";continue;case'"':b+='\\"';continue;case"'":b+="\\'";continue;default:" ">d||"<"===d||">"===d||"'"===d?(e=d.charCodeAt(0).toString(16).toUpperCase(),b+="\\u"+(e.length>1?"00":"000")+e):b+=d}return b},emptySpanHTML.classAliases={popupSecondPreview:"popupPreview"},Previewmaker.prototype.setData=function(){var a=max(1e4,2*this.maxCharacters);this.data=this.originalData.substring(0,a)},Previewmaker.prototype.killComments=function(){this.data=this.data.replace(RegExp("<!--[\\s\\S]*?-->\\n?","g"),"")},Previewmaker.prototype.killDivs=function(){this.data=this.data.replace(RegExp("< *div[^>]* *>[\\s\\S]*?< */ *div *>","gi"),"")},Previewmaker.prototype.killGalleries=function(){this.data=this.data.replace(RegExp("< *gallery[^>]* *>[\\s\\S]*?< */ *gallery *>","gi"),"")},Previewmaker.prototype.kill=function(a,b,c,d,e){for(var f=this.data,g=this.killStuff(this.data,a,b,c,d,e);g.length<f.length;)f=g,g=this.killStuff(g,a,b,c,d,e);this.data=g},Previewmaker.prototype.killStuff=function(a,b,c,d,e,f){var k,l,m,n,g=this.makeRegexp(b),h=this.makeRegexp(c,"^"),i=d?this.makeRegexp(d,"^"):null,j=e?this.makeRegexp(e,"^"):h;if(!g||!h)return alert("Navigation Popups error: op or cl is null! something is wrong."),void 0;if(!g.test(a))return a;for(k="",l=g.exec(a),k=a.substring(0,l.index),a=a.substring(l.index+l[0].length),m=1;a.length>0&&(n=0,1==m&&h.test(a)?(m--,n=h.exec(a)[0].length):m>1&&j.test(a)?(m--,n=j.exec(a)[0].length):i&&i.test(a)&&(m++,n=i.exec(a)[0].length),n||(n=1),a=a.substring(n),0!=m););return k+(f||"")+a},Previewmaker.prototype.makeRegexp=function(a,b,c){var d,e,f,g;return b=b||"",c=c||"",d="",e="",isString(a)?d=b+literalizeRegex(a)+c:isRegExp(a)?(f=a.toString().substring(1),g=f.split("/"),e=g[g.length-1],g[g.length-1]="",f=g.join("/"),f=f.substring(0,f.length-1),d=b+f+c):log("makeRegexp failed"),log("makeRegexp: got reStr="+d+", flags="+e),RegExp(d,e)},Previewmaker.prototype.killBoxTemplates=function(){this.kill(RegExp("[{][{][^{}\\s|]*?(float|box)[_ ](begin|start)","i"),/[}][}]\s*/,"{{"),this.kill(RegExp("[{][{][^{}\\s|]*?(infobox|elementbox|frame)[_ ]","i"),/[}][}]\s*/,"{{")},Previewmaker.prototype.killTemplates=function(){this.kill("{{","}}","{","}"," ")},Previewmaker.prototype.killTables=function(){this.kill("{|",/[|]}\s*/,"{|"),this.kill(/<table.*?>/i,/<\/table.*?>/i,/<table.*?>/i),this.data=this.data.replace(RegExp("^[|].*$","mg"),"")},Previewmaker.prototype.killImages=function(){var a=[];jQuery.each(mw.config.get("wgNamespaceIds"),function(b,c){(c==pg.nsImageId||c==pg.nsCategoryId)&&a.push(b.split(" ").join("[ _]"))}),this.kill(RegExp("[[][[]\\s*("+a.join("|")+")\\s*:","i"),/\]\]\s*/,"[","]")},Previewmaker.prototype.killHTML=function(){var a,b,c;for(this.kill(/<ref\b[^/>]*?>/i,/<\/ref>/i),this.data=this.data.replace(RegExp("(^|\\n) *<.*","g"),"\n"),a=this.data.parenSplit(/(<[\w\W]*?(?:>|$|(?=<)))/),b=a.length,c=1;b>c;c+=2)switch(a[c]){case"<nowiki>":case"</nowiki>":case"<blockquote>":case"</blockquote>":break;default:a[c]=""}this.data=a.join("")},Previewmaker.prototype.killChunks=function(){var a=new RegExp("((^|\\n)\\s*:*\\s*''[^']([^']|'''|'[^']){20}(.|\\n[^\\n])*''[.!?\\s]*\\n)+","g");this.data=this.data.replace(a,"\n")},Previewmaker.prototype.mopup=function(){this.data=this.data.replace(RegExp("^-{4,}","mg"),""),this.data=this.data.replace(RegExp("(^|\\n) *:[^\\n]*","g"),""),this.data=this.data.replace(RegExp("^__[A-Z_]*__ *$","gmi"),"")},Previewmaker.prototype.firstBit=function(){var b,d,e,a=this.data;getValueOf("popupPreviewCutHeadings")&&(this.data=this.data.replace(RegExp("\\s*(==+[^=]*==+)\\s*","g"),"\n\n$1 "),this.data=this.data.replace(RegExp("([:;]) *\\n{2,}","g"),"$1\n"),this.data=this.data.replace(RegExp("^[\\s\\n]*"),""),stuff=RegExp("^([^\\n]|\\n[^\\n\\s])*").exec(this.data),stuff&&(a=stuff[0]),getValueOf("popupPreviewFirstParOnly")||(a=this.data),a=a.replace(RegExp("(==+[^=]*==+)\\s*","g"),"$1\n\n")),a=a.parenSplit(RegExp("([!?.]+[\"']*\\s)","g")),a[0]=a[0].replace(RegExp("^\\s*"),""),b=RegExp("([^.][a-z][.] *[a-z]|etc|sic|Dr|Mr|Mrs|Ms|St|no|op|cit|\\[[^\\]]*|\\s[A-Zvclm])$","i"),a=this.fixSentenceEnds(a,b),this.fullLength=a.join("").length,getValueOf("popupMaxPreviewCharacters")+this.extraCharacters,d=this.maxSentences,e=this.firstSentences(a,d);do e=this.firstSentences(a,d),--d;while(e.length>this.maxCharacters&&0!=d);this.data=e},Previewmaker.prototype.fixSentenceEnds=function(a,b){var d,e,g;for(d=0;d<a.length-2;++d)if(b.test(a[d])){for(g=[],e=0;e<a.length;++e)d>e&&(g[e]=a[e]),e==d&&(g[d]=a[d]+a[d+1]+a[d+2]),e>d+2&&(g[e-2]=a[e]);return this.fixSentenceEnds(g,b)}return a},Previewmaker.prototype.firstSentences=function(a,b){var c=a.slice(0,2*b);return c.join("")},Previewmaker.prototype.killBadWhitespace=function(){this.data=this.data.replace(RegExp("^ *'+ *$","gm"),"")},Previewmaker.prototype.makePreview=function(){this.owner.article.namespaceId()!=pg.nsTemplateId&&this.owner.article.namespaceId()!=pg.nsImageId?(this.killComments(),this.killDivs(),this.killGalleries(),this.killBoxTemplates(),getValueOf("popupPreviewKillTemplates")?this.killTemplates():this.killMultilineTemplates(),this.killTables(),this.killImages(),this.killHTML(),this.killChunks(),this.mopup(),this.firstBit(),this.killBadWhitespace()):this.killHTML(),this.html=wiki2html(this.data,this.baseUrl),this.fixHTML(),this.stripLongTemplates()},Previewmaker.prototype.esWiki2HtmlPart=function(a){var c,d,e,b=/(?:\[\[([^|\]]*)(?:\|([^|\]]*))*]]([a-z]*))/gi;for(b.lastIndex=0,d="",e=0;null!=(c=b.exec(a));)d+=pg.escapeQuotesHTML(a.substring(e,c.index))+'<a href="'+Insta.conf.paths.articles+pg.escapeQuotesHTML(c[1])+'">'+pg.escapeQuotesHTML((c[2]?c[2]:c[1])+c[3])+"</a>",e=b.lastIndex;return d+=pg.escapeQuotesHTML(a.substring(e))},Previewmaker.prototype.editSummaryPreview=function(){var b,c,d,e,f,g,h,i,a=/\/\* *(.*?) *\*\//g;return a.lastIndex=0,b=a.exec(this.data),b?(c=this.data.substring(0,b.index-1),d=b[1],e=this.data.substring(a.lastIndex),f="<span class='autocomment'>",g="</span>",c.length>0&&(f=this.esWiki2HtmlPart(c)+" "+f+"- "),e.length>0&&(g=": "+g+this.esWiki2HtmlPart(e)),h=(new Title).fromURL(this.baseUrl),h.anchorFromUtf(d),i=Insta.conf.paths.articles+pg.escapeQuotesHTML(h.toString(!0))+"#"+pg.escapeQuotesHTML(h.anchor),f+'<a href="'+i+'">&rarr;</a> '+pg.escapeQuotesHTML(d)+g):this.esWiki2HtmlPart(this.data)},Previewmaker.prototype.fixHTML=function(){if(this.html){var a=this.html;a=a.replace(RegExp('(<a href="'+pg.wiki.articlePath+'/[^"]*)[?](.*?")',"g"),"$1%3F$2"),a=a.replace(RegExp("(<a href='"+pg.wiki.articlePath+"/[^']*)[?](.*?')","g"),"$1%3F$2"),this.html=a}},Previewmaker.prototype.showPreview=function(){if(this.makePreview(),"string"==typeof this.html&&!RegExp("^\\s*$").test(this.html)){setPopupHTML("<hr />","popupPrePreviewSep",this.owner.idNumber),setPopupTipsAndHTML(this.html,"popupPreview",this.owner.idNumber,{owner:this.owner});var a=this.fullLength>this.data.length?this.moreLink():"";setPopupHTML(a,"popupPreviewMore",this.owner.idNumber)}},Previewmaker.prototype.moreLink=function(){var b,a=document.createElement("a");return a.className="popupMoreLink",a.innerHTML=popupString("more..."),b=this,a.onclick=function(){b.maxCharacters+=2e3,b.maxSentences+=20,b.setData(),b.showPreview()},a},Previewmaker.prototype.stripLongTemplates=function(){this.html=this.html.replace(RegExp("^.{0,1000}[{][{][^}]*?(<(p|br)( /)?>\\s*){2,}([^{}]*?[}][}])?","gi"),""),this.html=this.html.split("\n").join(" "),this.html=this.html.replace(RegExp("[{][{][^}]*<pre>[^}]*[}][}]","gi"),"")},Previewmaker.prototype.killMultilineTemplates=function(){this.kill("{{{","}}}"),this.kill(RegExp("\\s*[{][{][^{}]*\\n"),"}}","{{")},pg.fn.APIsharedImagePagePreviewHTML=function(a){var b,c,d,e;log("APIsharedImagePagePreviewHTML"),b=a["requestid"],a["query"]&&a["query"]["pages"]&&(c=anyChild(a["query"]["pages"]),d=c&&c.revisions?c.revisions[0]["*"]:null,d&&(e=new Previewmaker(d,pg.current.link.navpopup.article,pg.current.link.navpopup),e.makePreview(),setPopupHTML(e.html,"popupSecondPreview",b)))},Mousetracker.prototype.addHook=function(a){this.hooks.push(a)},Mousetracker.prototype.runHooks=function(){var a,b,c,d,e,f;if(this.hooks&&this.hooks.length){for(a=!1,b={},c=this.x,d=this.y,e=this.hooks.length,f=0;e>f;++f)this.hooks[f](c,d)===!0&&(a=!0,b[f]=!0);a&&this.removeHooks(b)}},Mousetracker.prototype.removeHooks=function(a){var d,b=[],c=this.hooks.length;for(d=0;c>d;++d)a[d]||b.push(this.hooks[d]);this.hooks=b},Mousetracker.prototype.track=function(a){var b,c,d,e,f;if(a=a||window.event){if(a.pageX)b=a.pageX,c=a.pageY;else{if("undefined"==typeof a.clientX)return;f=document.documentElement,f&&(d=f.scrollLeft),d=d||document.body.scrollLeft||document.scrollLeft||0,f&&(e=f.scrollTop),e=e||document.body.scrollTop||document.scrollTop||0,b=a.clientX+d,c=a.clientY+e}this.setPosition(b,c)}},Mousetracker.prototype.setPosition=function(a,b){if(this.x=a,this.y=b,this.dirty||0===this.hooks.length)return this.dirty=!1,void 0;"number"!=typeof this.lastHook_x&&(this.lastHook_x=-100,this.lastHook_y=-100);var c=(this.lastHook_x-a)*(this.lastHook_y-b);c=c>=0?c:-c,c>1&&(this.lastHook_x=a,this.lastHook_y=b,this.dirty?this.dirty=!1:this.runHooks())},Mousetracker.prototype.enable=function(){if(!this.active){this.active=!0,this.savedHandler=document.onmousemove;var a=this;document.onmousemove=function(b){a.track.apply(a,[b])},this.loopDelay&&(this.timer=setInterval(function(){a.runHooks()},this.loopDelay))}},Mousetracker.prototype.disable=function(){this.active&&($.isFunction(this.savedHandler)?document.onmousemove=this.savedHandler:delete document.onmousemove,this.timer&&clearInterval(this.timer),this.active=!1)},Navpopup.uid=0,Navpopup.prototype.isVisible=function(){return this.visible},Navpopup.prototype.reposition=function(a,b,c){log("reposition("+a+","+b+","+c+")"),"undefined"!=typeof a&&null!==a&&(this.left=a),"undefined"!=typeof b&&null!==b&&(this.top=b),"undefined"!=typeof this.left&&"undefined"!=typeof this.top&&(this.mainDiv.style.left=this.left+"px",this.mainDiv.style.top=this.top+"px"),c||this.limitHorizontalPosition()},Navpopup.prototype.limitHorizontalPosition=function(){var a,b,c,d,e;this.constrained&&!this.tooWide&&(this.updateDimensions(),a=this.left,b=this.width,c=document.body.clientWidth,(a+b>=c||a>0&&this.maxWidth&&this.width<this.maxWidth&&this.height>this.width&&a>c-this.maxWidth)&&(this.mainDiv.style.left="-10000px",this.mainDiv.style.width=this.maxWidth+"px",d=parseInt(this.mainDiv.offsetWidth,10),e=c-d-1,0>e&&(e=0,this.tooWide=!0),log("limitHorizontalPosition: moving to ("+e+","+this.top+");"+" naturalWidth="+d+", clientWidth="+c),this.reposition(e,null,!0)))},Navpopup.highest=1e3,Navpopup.prototype.raise=function(){this.mainDiv.style.zIndex=Navpopup.highest+1,++Navpopup.highest},Navpopup.prototype.show=function(){this.noshow||(this.reposition(),this.raise(),this.unhide())},Navpopup.prototype.showSoon=function(a){if(!this.visible){this.noshow=!1;var b=this;setTimeout(function(){Navpopup.tracker.active&&b.reposition.apply(b,[Navpopup.tracker.x+2,Navpopup.tracker.y+2]),b.show.apply(b,[])},a)}},Navpopup.prototype.showSoonIfStable=function(a){var b,c;log("showSoonIfStable, time="+a),this.visible||(this.noshow=!1,this.stable_x=-1e4,this.stable_y=-1e4,b=function(){var a,b,d,e,f;return log("stableShow called"),a=Navpopup.tracker.x,b=Navpopup.tracker.y,d=c.stable_x-a,e=c.stable_y-b,f=0,f>=d*d&&f>=e*e?(log("mouse is stable"),clearInterval(c.showSoonStableTimer),c.reposition.apply(c,[a+2,b+2]),c.show.apply(c,[]),void 0):(c.stable_x=a,c.stable_y=b,void 0)},c=this,this.showSoonStableTimer=setInterval(b,a/2))},Navpopup.prototype.stick=function(){this.noshow=!1,this.sticky=!0},Navpopup.prototype.unstick=function(){this.sticky=!1},Navpopup.prototype.banish=function(){log("banish called"),this.noshow=!0,this.showSoonStableTimer&&(log("clearing showSoonStableTimer"),clearInterval(this.showSoonStableTimer)),this.hide()},Navpopup.prototype.runHooks=function(a,b){var c,d,e;if(this.hooks[a])for(c=this.hooks[a],d=c.length,e=0;d>e;++e)c[e]&&c[e].when==b&&c[e].hook.apply(this,[])&&(c[e].hookId&&delete this.hookIds[c[e].hookId],c[e]=null)},Navpopup.prototype.addHook=function(a,b,c,d){if(c=c||"after",this.hooks[b]){var e=null;if(d){if(e=[b,c,d].join("|"),this.hookIds[e])return;this.hookIds[e]=!0}this.hooks[b].push({hook:a,when:c,hookId:e})}},Navpopup.prototype.createMainDiv=function(){var a,b;this.mainDiv||(this.runHooks("create","before"),a=document.createElement("div"),b=this,a.onclick=function(a){b.onclickHandler(a)},a.className=this.className?this.className:"navpopup_maindiv",a.id=a.className+this.uid,a.style.position="absolute",a.style.display="none",a.className="navpopup",a.navpopup=this,this.mainDiv=a,document.body.appendChild(a),this.runHooks("create","after"))},Navpopup.prototype.onclickHandler=function(){this.raise()},Navpopup.prototype.makeDraggable=function(a){var b,c,d;this.mainDiv||this.createMainDiv(),b=new Drag,a||(b.startCondition=function(a){try{if(!a.shiftKey)return!1}catch(b){return!1}return!0}),a&&(c=document.getElementById(a)),c||(c=this.mainDiv),d=this,b.endHook=function(a,b){Navpopup.tracker.dirty=!0,d.reposition(a,b)},b.init(c,this.mainDiv)},Navpopup.prototype.hide=function(){this.runHooks("hide","before"),this.abortDownloads(),this.sticky||("undefined"!=typeof this.visible&&this.visible&&(this.mainDiv.style.display="none",this.visible=!1),this.runHooks("hide","after"))},Navpopup.prototype.unhide=function(){this.runHooks("unhide","before"),"undefined"==typeof this.visible||this.visible||(this.mainDiv.style.display="inline",this.visible=!0),this.runHooks("unhide","after")},Navpopup.prototype.setInnerHTML=function(a){this.mainDiv.innerHTML=a},Navpopup.prototype.updateDimensions=function(){this.width=parseInt(this.mainDiv.offsetWidth,10),this.height=parseInt(this.mainDiv.offsetHeight,10)},Navpopup.prototype.isWithin=function(a,b){if(!this.visible)return!1;this.updateDimensions();var c=this.fuzz||0;return a+c>=this.left&&a-c<=this.left+this.width&&b+c>=this.top&&b-c<=this.top+this.height},Navpopup.prototype.addDownload=function(a){a&&this.downloads.push(a)},Navpopup.prototype.abortDownloads=function(){var a,b;for(a=0;a<this.downloads.length;++a)b=this.downloads[a],b&&b.abort&&b.abort();this.downloads=[]},Navpopup.tracker=new Mousetracker,jsReservedProperties=RegExp("^(constructor|prototype|__((define|lookup)[GS]etter)__|eval|hasOwnProperty|propertyIsEnumerable|to(Source|String|LocaleString)|(un)?watch|valueOf)$"),diffBugAlert.list={},navlinkTag.prototype.html=function(){var a,b,c,d;return this.getNewWin(),this.getPrintFunction(),a="",d="span",d?(b="<"+d+' class="popup_'+this.id+'">',c="</"+d+">"):(b="",c=""),"function"!=typeof this.print?errlog("Oh dear - invalid print function for a navlinkTag, id="+this.id):(a=this.print(this),"string"!=typeof a?a="":"undefined"!=typeof this.shortcut&&(a=addPopupShortcut(a,this.shortcut))),b+a+c},navlinkTag.prototype.getNewWin=function(){getValueOf("popupLinksNewWindow"),"undefined"==typeof pg.option.popupLinksNewWindow[this.id]&&(this.newWin=null),this.newWin=pg.option.popupLinksNewWindow[this.id]},navlinkTag.prototype.getPrintFunction=function(){var d,e;if("string"==typeof this.id&&typeof this.article==typeof{}){switch(this.noPopup=1,this.id){case"contribs":case"history":case"whatLinksHere":case"userPage":case"monobook":case"userTalk":case"talk":case"article":case"lastEdit":this.noPopup=null}switch(this.id){case"email":case"contribs":case"block":case"unblock":case"userlog":case"userSpace":case"deletedContribs":this.article=this.article.userName()}switch(this.id){case"userTalk":case"newUserTalk":case"editUserTalk":case"userPage":case"monobook":case"editMonobook":case"blocklog":this.article=this.article.userName(!0);case"pagelog":case"deletelog":case"protectlog":delete this.oldid}switch(("editMonobook"==this.id||"monobook"==this.id)&&this.article.append("/monobook.js"),"mainlink"!=this.id&&(this.article=this.article.removeAnchor()),this.id){case"undelete":this.print=specialLink,this.specialpage="Undelete",this.sep="/";break;case"whatLinksHere":this.print=specialLink,this.specialpage="Whatlinkshere";break;case"relatedChanges":this.print=specialLink,this.specialpage="Recentchangeslinked";break;case"move":this.print=specialLink,this.specialpage="Movepage";break;case"contribs":this.print=specialLink,this.specialpage="Contributions";break;case"deletedContribs":this.print=specialLink,this.specialpage="Deletedcontributions";break;case"email":this.print=specialLink,this.specialpage="EmailUser",this.sep="/";break;case"block":this.print=specialLink,this.specialpage="Blockip",this.sep="&ip=";break;case"unblock":this.print=specialLink,this.specialpage="Ipblocklist",this.sep="&action=unblock&ip=";break;case"userlog":this.print=specialLink,this.specialpage="Log",this.sep="&user=";break;case"blocklog":this.print=specialLink,this.specialpage="Log",this.sep="&type=block&page=";break;case"pagelog":this.print=specialLink,this.specialpage="Log",this.sep="&page=";break;case"protectlog":this.print=specialLink,this.specialpage="Log",this.sep="&type=protect&page=";break;case"deletelog":this.print=specialLink,this.specialpage="Log",this.sep="&type=delete&page=";break;case"userSpace":this.print=specialLink,this.specialpage="PrefixIndex",this.sep="&namespace=2&prefix=";break;case"search":this.print=specialLink,this.specialpage="Search",this.sep="&fulltext=Search&search=";break;case"unwatch":case"watch":this.print=magicWatchLink,this.action=this.id+"&autowatchlist=1&autoimpl="+popupString("autoedit_version")+"&actoken="+autoClickToken();break;case"history":case"historyfeed":case"unprotect":case"protect":this.print=wikiLink,this.action=this.id;break;case"delete":this.print=wikiLink,this.action="delete",this.article.namespaceId()==pg.nsImageId&&(d=this.article.stripNamespace(),this.action+="&image="+d);break;case"markpatrolled":case"edit":delete this.oldid;case"view":case"purge":case"render":this.print=wikiLink,this.action=this.id;break;case"raw":this.print=wikiLink,this.action="raw&ctype=text/css";break;case"new":this.print=wikiLink,this.action="edit&section=new";break;case"mainlink":"undefined"==typeof this.text&&(this.text=this.article.toString().entify()),getValueOf("popupSimplifyMainLink")&&isInStrippableNamespace(this.article)&&(e=this.text.split("/"),this.text=e[e.length-1],""==this.text&&e.length>1&&(this.text=e[e.length-2])),this.print=titledWikiLink,"undefined"==typeof this.title&&pg.current.link&&"undefined"!=typeof pg.current.link.href&&(this.title=safeDecodeURI(pg.current.link.originalTitle?pg.current.link.originalTitle:this.article),"undefined"!=typeof this.oldid&&this.oldid&&(this.title=tprintf("Revision %s of %s",[this.oldid,this.title]))),this.action="view";break;case"userPage":case"article":case"monobook":case"editMonobook":case"editArticle":delete this.oldid,this.article=this.article.articleFromTalkOrArticle(),this.print=wikiLink,this.action=0==this.id.indexOf("edit")?"edit":"view";
}function u(){for(s(i("<table>",p(/^\{\|( .*)$/)?e[1]:""));f();)if(p("|"))switch(r(1)){case"}":return s("</table>"),void 0;case"-":s(i("<tr>",p(/\|-*(.*)/)[1]));break;default:v()}else p("!")?v():g()}function v(){var a,c,e,i,d=g().match(/^(\|\+|\||!)((?:([^[|]*?)\|(?!\|))?(.*))$/);if("|+"==d[1]?h("<caption"):h("<t"+("|"==d[1]?"d":"h")),c="undefined"!=typeof d[3]?4:2,h(">"),"|+"!=d[1])for(a=d[c].split("|"==d[1]?"||":/(?:\|\||!!)/),h(z(a.shift()));a.length;)b.unshift(d[1]+a.pop());else h(d[c]);for(e=0,i=[];f();i.push(g()))if(p("|")){if(!e)break;"}"==r(1)&&e--}else{if(!e&&p("!"))break;p("{|")&&e++}i.length&&h(Insta.convert(i))}function w(){h("<pre>");do s(z(b[0].substring(1))+"\n");while(f()&&p(" "));h("</pre>")}function x(){h(y(g()))}function y(a){var c,e,m,n,o,p,q,b=a.substring(a.indexOf(":")+1,a.length-2),d=[],f="",g=0,h=0,j=0,k="";if(b.match(/\|/)){for(m=0,o=b.length-1;o>0;o--){if("|"==b.charAt(o)&&!m){n=b.substr(o+1),b=b.substring(0,o);break}switch(b.substr(o-1,2)){case"]]":m++,o--;break;case"[[":m--,o--}}for(d=b.split(/\s*\|\s*/),d.push(n),e=d.shift();d.length;d.shift())if(p=d[0].match(/^(\d*)(?:[px]*\d*)?px$/))c=p[1];else switch(d[0]){case"thumb":case"thumbnail":g=!0;case"frame":h=!0;break;case"none":case"right":case"left":j=!1,k=d[0];break;case"center":j=!0,k="none";break;default:1==d.length&&(f=d[0])}}else e=b;if(q="",h)""==k&&(k="right"),q+=i("<div class='thumb t?'>",k),g?(c||(c=Insta.conf.wiki.default_thumb_width),q+=i("<div style='width:?px;'>?",2+1*c,A(e,f,c))+i("<div class='thumbcaption'><div class='magnify' style='float:right'><a href='?' title='Enlarge'></a></div>?</div>",l(Insta.conf.paths.articles+Insta.conf.locale.image+":"+e),z(f))):q+="<div>"+A(e,f)+i("<div class='thumbcaption'>?</div>",z(f)),q+="</div></div>";else{if(""==k)return A(e,f,c);q+=i("<div class='float?'><span>?</span></div>",k,A(e,f,c))}return j?i("<div class='center'>?</div>",q):q}function z(a){for(var b,f,g,h,c=0,d=0,e=0,i="";-1!=(b=a.indexOf("<nowiki>",d));){i+=D(a.substring(c,b)),b+=8,d=b,h=!0;do if(f=a.indexOf("<nowiki>",d),g=a.indexOf("</nowiki>",d),f>=g||-1==f){if(-1==g)return i+j(a.substr(b));d=g+9,e?e--:(c=d,i+=j(a.substring(b,c-9)),h=!1)}else d=f+8,e++;while(h)}return i+D(a.substr(c))}function A(a,b,c){var d,e,f;return a=a.charAt(0).toUpperCase()+a.substr(1),a=a.replace(/ /g,"_"),b=E(b),d=hex_md5(a),e=d.charAt(0)+"/"+d.substr(0,2)+"/"+a,c&&(c="width='"+c+"px'"),f='<img onerror="'+pg.escapeQuotesHTML("this.onerror=null;this.src='"+pg.jsescape(Insta.conf.paths.images_fallback+e)+"'")+'" src="'+pg.escapeQuotesHTML(Insta.conf.paths.images+e)+'" '+(""!=b?'alt="'+pg.escapeQuotesHTML(b)+'"':"")+" "+c+">",i("<a class='image' ? href=\"?\">?</a>",""!=b?'title="'+pg.escapeQuotesHTML(b)+'"':"",pg.escapeQuotesHTML(Insta.conf.paths.articles+Insta.conf.locale.image+":"+a),f)}function B(a){for(var b,e,f,g,h,i,c=0,d=0;-1!=(b=a.indexOf("[[",c))&&a.substr(b+2).match(RegExp("^(Image|File|"+Insta.conf.locale.image+"):","i"));){e=!0,c=b;do if(c+=2,f=a.indexOf("]]",c),g=a.indexOf("[[",c),g>=f||-1==g){if(-1==f)return a;c=f,d?d--:(h=a.substring(b,f+2),i=y(h),a=a.replace(h,i),c=b+i.length,e=!1)}else c=g,d++;while(e)}return a}function C(a){for(var b,c,d,e,f="";(d=a.indexOf("''",e))+1;)f+=a.substring(e,d),e=d+2,"'"==a.charAt(d+2)?(e++,c=!c,f+=c?"<strong>":"</strong>"):(b=!b,f+=b?"<em>":"</em>");return f+a.substr(e)}function D(a){var b,c,d,e;for(a=B(a),a=C(a);b=a.match(/<(?:)math>(.*?)<\/math>/i);)c=hex_md5(b[1]),a=a.replace(b[0],i("<img src='?.png'>",Insta.conf.paths.math+c));return d=new Date,e=d.getUTCMinutes(),10>e&&(e="0"+e),d=i("?:?, ? ? ? (UTC)",d.getUTCHours(),e,d.getUTCDate(),Insta.conf.locale.months[d.getUTCMonth()],d.getUTCFullYear()),a.replace(/~{5}(?!~)/g,d).replace(/~{4}(?!~)/g,Insta.conf.user.name+" "+d).replace(/~{3}(?!~)/g,Insta.conf.user.name).replace(RegExp("\\[\\[:((?:"+Insta.conf.locale.category+"|Image|File|"+Insta.conf.locale.image+"|"+Insta.conf.wiki.interwiki+"):[^|]*?)\\]\\](w*)","gi"),function(a,b,c){return i("<a href='?'>?</a>",Insta.conf.paths.articles+l(b),k(b)+k(c))}).replace(RegExp("\\[\\[(?:"+Insta.conf.locale.category+"|"+Insta.conf.wiki.interwiki+"):.*?\\]\\]","gi"),"").replace(RegExp("\\[\\[:((?:"+Insta.conf.locale.category+"|Image|File|"+Insta.conf.locale.image+"|"+Insta.conf.wiki.interwiki+"):.*?)\\|([^\\]]+?)\\]\\](\\w*)","gi"),function(a,b,c,d){return i("<a href='?'>?</a>",Insta.conf.paths.articles+l(b),k(c)+k(d))}).replace(/\[\[(\/[^|]*?)\]\]/g,function(a,b){return i("<a href='?'>?</a>",Insta.conf.baseUrl+l(b),k(b))}).replace(/\[\[(\/.*?)\|(.+?)\]\]/g,function(a,b,c){return i("<a href='?'>?</a>",Insta.conf.baseUrl+l(b),k(c))}).replace(/\[\[([^|]*?)\]\](\w*)/g,function(a,b,c){return i("<a href='?'>?</a>",Insta.conf.paths.articles+l(b),k(b)+k(c))}).replace(/\[\[(.*?)\|([^\]]+?)\]\](\w*)/g,function(a,b,c,d){return i("<a href='?'>?</a>",Insta.conf.paths.articles+l(b),k(c)+k(d))}).replace(/\[\[([^\]]*?:)?(.*?)( *\(.*?\))?\|\]\]/g,function(a,b,c,d){return i("<a href='?'>?</a>",Insta.conf.paths.articles+l(b)+l(c)+l(d),k(c))}).replace(/\[(https?|news|ftp|mailto|gopher|irc):(\/*)([^\]]*?) (.*?)\]/g,function(a,b,c,d,e){return i("<a class='external' href='?:?'>?</a>",l(b),l(c)+l(d),k(e))}).replace(/\[http:\/\/(.*?)\]/g,function(a,b){return i("<a class='external' href='http://?'>[#]</a>",l(b))}).replace(/\[(news|ftp|mailto|gopher|irc):(\/*)(.*?)\]/g,function(a,b,c,d){return i("<a class='external' href='?:?'>?:?</a>",l(b),l(c)+l(d),k(b),k(c)+k(d))}).replace(/(^| )(https?|news|ftp|mailto|gopher|irc):(\/*)([^ $]*[^.,!?;: $])/g,function(a,b,c,d,e){return i("?<a class='external' href='?:?'>?:?</a>",k(b),l(c),l(d)+l(e),k(c),k(d)+k(e))}).replace("__NOTOC__","").replace("__NOEDITSECTION__","")}function E(a){return a.replace(/\[\[[^\]]*\|(.*?)\]\]/g,"$1").replace(/\[\[(.*?)\]\]/g,"$1").replace(/''(.*?)''/g,"$1")}for(var e,b="string"==typeof a?a.replace(/\r/g,"").split(/\n/):a,c="",d=0;f();)p(/^(={1,6})(.*)\1(.*)$/)?(d=0,s(i("<h?>?</h?>?",e[1].length,z(e[2]),e[1].length,e[3]))):p(/^[*#:;]/)?(d=0,t()):p(" ")?(d=0,w()):p("{|")?(d=0,u()):p(/^----+$/)?(d=0,s("<hr />")):p(Insta.BLOCK_IMAGE)?(d=0,x()):(q("")?(d=f()>1&&""==b[1])&&s("<p><br>"):(d||(h("<p>"),d=1),h(z(b[0])+" ")),g());return c},Title.prototype=new Stringwrapper,Title.prototype.toString=function(a){return this.value+(!a&&this.anchor?"#"+this.anchorString():"")},Title.prototype.anchorString=function(){var a,b,c;if(!this.anchor)return"";for(a=this.anchor.parenSplit(/((?:[.][0-9A-F]{2})+)/),b=a.length,c=1;b>c;c+=2)a[c]=decodeURIComponent(a[c].split(".").join("%")).split("_").join(" ");return a.join("")},Title.prototype.urlAnchor=function(){var c,a=this.anchor.parenSplit("/((?:[%][0-9A-F]{2})+)/"),b=a.length;for(c=1;b>c;c+=2)a[c]=a[c].split("%").join(".");return a.join("")},Title.prototype.anchorFromUtf=function(a){this.anchor=encodeURIComponent(a.split(" ").join("_")).split("%3A").join(":").split("'").join("%27").split("%").join(".")},Title.fromURL=function(a){return(new Title).fromURL(a)},Title.prototype.fromURL=function(a){var b,c,d,e,f,g,h,i,j;return"string"!=typeof a?(this.value=null,this):(b=a.split("?"),b[0]=b[0].split("&").join("%26"),pg.flag.linksLikeIE6&&(b[0]=encodeURI(decode_utf8(b[0]))),a=b.join("?"),c=pg.re.contribs.exec(a),null!==c?("title="==c[1]&&(c[3]=c[3].split("+").join(" ")),d=new Title(c[3]),this.setUtf(this.decodeNasties(mw.config.get("wgFormattedNamespaces")[pg.nsUserId]+":"+d.stripNamespace())),this):(e=pg.re.email.exec(a),null!==e?(this.setUtf(this.decodeNasties(mw.config.get("wgFormattedNamespaces")[pg.nsUserId]+":"+new Title(e[3]).stripNamespace())),this):(f=pg.re.backlinks.exec(a))?(this.setUtf(this.decodeNasties(new Title(f[3]))),this):(g=pg.re.specialdiff.exec(a))?(this.setUtf(this.decodeNasties(new Title(mw.config.get("wgFormattedNamespaces")[pg.nsSpecialId]+":Diff"))),this):(h=pg.re.main.exec(a),null===h?this.value=null:(i=/[?](.+[&])?title=/.test(a),i&&(h[2]=h[2].split("+").join("_")),j=h[2]+(h[3]?"#"+h[3]:""),pg.flag.isSafari&&/%25[0-9A-Fa-f]{2}/.test(j)?this.setUtf(decodeURIComponent(unescape(j))):this.setUtf(this.decodeNasties(j))),this)))},Title.prototype.decodeNasties=function(a){var b=this.decodeEscapes(decodeURI(a));return b=b.replace(/[_ ]*$/,"")},Title.prototype.decodeEscapes=function(a){var d,b=a.parenSplit(/((?:[%][0-9A-Fa-f]{2})+)/),c=b.length;for(d=1;c>d;d+=2)b[d]=unescape(b[d]);return b.join("")},Title.fromAnchor=function(a){return(new Title).fromAnchor(a)},Title.prototype.fromAnchor=function(a){return a?this.fromURL(a.href):(this.value=null,this)},Title.fromWikiText=function(a){return(new Title).fromWikiText(a)},Title.prototype.fromWikiText=function(a){return pg.flag.linksLikeIE6||(a=myDecodeURI(a)),this.setUtf(a),this},Title.prototype.hintValue=function(){return this.value?safeDecodeURI(this.value):""},Title.prototype.toUserName=function(a){return this.namespaceId()!=pg.nsUserId&&this.namespaceId()!=pg.nsUsertalkId?(this.value=null,void 0):(this.value=(a?mw.config.get("wgFormattedNamespaces")[pg.nsUserId]+":":"")+this.stripNamespace().split("/")[0],void 0)},Title.prototype.userName=function(a){var b=new Title(this.value);return b.toUserName(a),b.value?b:null},Title.prototype.toTalkPage=function(){var a,b;return null===this.value?null:(a=this.namespaceId(),a>=0&&0==a%2&&(b=mw.config.get("wgFormattedNamespaces")[a+1],"undefined"!=typeof b)?""===b?this.value=this.stripNamespace():(this.value=b.split(" ").join("_")+":"+this.stripNamespace(),this.value):(this.value=null,null))},Title.prototype.namespace=function(){return mw.config.get("wgFormattedNamespaces")[this.namespaceId()]},Title.prototype.namespaceId=function(){var b,a=this.value.indexOf(":");return 0>a?0:(b=mw.config.get("wgNamespaceIds")[this.value.substring(0,a).split(" ").join("_").toLowerCase()],"undefined"==typeof b?0:b)},Title.prototype.talkPage=function(){var a=new Title(this.value);return a.toTalkPage(),a.value?a:null},Title.prototype.isTalkPage=function(){return null===this.talkPage()?!0:!1},Title.prototype.toArticleFromTalkPage=function(){var a,b;return null===this.value?null:(a=this.namespaceId(),a>=0&&1==a%2&&(b=mw.config.get("wgFormattedNamespaces")[a-1],"undefined"!=typeof b)?""===b?this.value=this.stripNamespace():(this.value=b.split(" ").join("_")+":"+this.stripNamespace(),this.value):(this.value=null,null))},Title.prototype.articleFromTalkPage=function(){var a=new Title(this.value);return a.toArticleFromTalkPage(),a.value?a:null},Title.prototype.articleFromTalkOrArticle=function(){var a=new Title(this.value);return a.toArticleFromTalkPage()?a:this},Title.prototype.isIpUser=function(){return pg.re.ipUser.test(this.userName())},Title.prototype.stripNamespace=function(){var b,a=this.value.indexOf(":");return 0>a?this.value:(b=this.namespaceId(),b===pg.nsMainspaceId?this.value:this.value.substring(a+1))},Title.prototype.setUtf=function(a){if(!a)return this.value="",void 0;var b=a.indexOf("#");return 0>b?(this.value=a.split("_").join(" "),this.anchor="",void 0):(this.value=a.substring(0,b).split("_").join(" "),this.anchor=a.substring(b+1),this.ns=null,void 0)},Title.prototype.setUrl=function(a){var b=a.indexOf("#");this.value=safeDecodeURI(a.substring(0,b)),this.anchor=value.substring(b+1)},Title.prototype.append=function(a){this.setUtf(this.value+a)},Title.prototype.urlString=function(a){a||(a={});var b=this.toString(!0);return!a.omitAnchor&&this.anchor&&(b+="#"+this.urlAnchor()),a.keepSpaces||(b=b.split(" ").join("_")),encodeURI(b).split("&").join("%26").split("?").join("%3F").split("+").join("%2B")},Title.prototype.removeAnchor=function(){return new Title(this.toString(!0))},Title.prototype.toUrl=function(){return pg.wiki.titlebase+this.urlString()},Cookie={create:function(a,b,c){var d,e;c?(e=new Date,e.setTime(e.getTime()+1e3*60*60*24*c),d="; expires="+e.toGMTString()):d="",document.cookie=a+"="+b+d+"; path=/"},read:function(a){var d,e,b=a+"=",c=document.cookie.split(";");for(d=0;d<c.length;d++){for(e=c[d];" "==e.charAt(0);)e=e.substring(1,e.length);if(0===e.indexOf(b))return e.substring(b.length,e.length)}return null},erase:function(a){Cookie.create(a,"",-1)}},hexcase=0,"a,b,c"!=String("abc".split(/(b)/))?String.prototype.parenSplit=function(a){var b,c,d,e;for(a=nonGlobalRegex(a),b=this,c=a.exec(b),d=[];c&&b;){for(e=0;e<c.length;++e)"undefined"==typeof c[e]&&(c[e]="");d.push(b.substring(0,c.index)),d=d.concat(c.slice(1)),b=b.substring(c.index+c[0].length),c=a.exec(b)}return d.push(b),d}:(String.prototype.parenSplit=function(a){return this.split(a)},String.prototype.parenSplit.isNative=!0),String.prototype.entify=function(){return this.split("&").join("&amp;").split("<").join("&lt;").split(">").join("&gt;").split('"').join("&quot;")},pg.escapeQuotesHTML=function(a){var b=new RegExp("&","g");return a=a.replace(b,"&amp;"),b=new RegExp('"',"g"),a=a.replace(b,"&quot;"),b=new RegExp("<","g"),a=a.replace(b,"&lt;"),b=new RegExp(">","g"),a=a.replace(b,"&gt;")},pg.jsescape=function(a){var b,c,d,e;if("string"!=typeof a)throw"Invalid type in pg.jsescape";for(b="",c=0;c<a.length;c++)switch(d=a[c]){case"\b":b+="\\b";continue;case"\f":b+="\\f";continue;case"\n":b+="\\n";continue;case"\0":b+="\\0";continue;case"\r":b+="\\r";continue;case" ":b+="\\t";continue;case"�":b+="\\v";continue;case"\\":b+="\\\\";continue;case'"':b+='\\"';continue;case"'":b+="\\'";continue;default:" ">d||"<"===d||">"===d||"'"===d?(e=d.charCodeAt(0).toString(16).toUpperCase(),b+="\\u"+(e.length>1?"00":"000")+e):b+=d}return b},emptySpanHTML.classAliases={popupSecondPreview:"popupPreview"},Previewmaker.prototype.setData=function(){var a=max(1e4,2*this.maxCharacters);this.data=this.originalData.substring(0,a)},Previewmaker.prototype.killComments=function(){this.data=this.data.replace(RegExp("<!--[\\s\\S]*?-->\\n?","g"),"")},Previewmaker.prototype.killDivs=function(){this.data=this.data.replace(RegExp("< *div[^>]* *>[\\s\\S]*?< */ *div *>","gi"),"")},Previewmaker.prototype.killGalleries=function(){this.data=this.data.replace(RegExp("< *gallery[^>]* *>[\\s\\S]*?< */ *gallery *>","gi"),"")},Previewmaker.prototype.kill=function(a,b,c,d,e){for(var f=this.data,g=this.killStuff(this.data,a,b,c,d,e);g.length<f.length;)f=g,g=this.killStuff(g,a,b,c,d,e);this.data=g},Previewmaker.prototype.killStuff=function(a,b,c,d,e,f){var k,l,m,n,g=this.makeRegexp(b),h=this.makeRegexp(c,"^"),i=d?this.makeRegexp(d,"^"):null,j=e?this.makeRegexp(e,"^"):h;if(!g||!h)return alert("Navigation Popups error: op or cl is null! something is wrong."),void 0;if(!g.test(a))return a;for(k="",l=g.exec(a),k=a.substring(0,l.index),a=a.substring(l.index+l[0].length),m=1;a.length>0&&(n=0,1==m&&h.test(a)?(m--,n=h.exec(a)[0].length):m>1&&j.test(a)?(m--,n=j.exec(a)[0].length):i&&i.test(a)&&(m++,n=i.exec(a)[0].length),n||(n=1),a=a.substring(n),0!=m););return k+(f||"")+a},Previewmaker.prototype.makeRegexp=function(a,b,c){var d,e,f,g;return b=b||"",c=c||"",d="",e="",isString(a)?d=b+literalizeRegex(a)+c:isRegExp(a)?(f=a.toString().substring(1),g=f.split("/"),e=g[g.length-1],g[g.length-1]="",f=g.join("/"),f=f.substring(0,f.length-1),d=b+f+c):log("makeRegexp failed"),log("makeRegexp: got reStr="+d+", flags="+e),RegExp(d,e)},Previewmaker.prototype.killBoxTemplates=function(){this.kill(RegExp("[{][{][^{}\\s|]*?(float|box)[_ ](begin|start)","i"),/[}][}]\s*/,"{{"),this.kill(RegExp("[{][{][^{}\\s|]*?(infobox|elementbox|frame)[_ ]","i"),/[}][}]\s*/,"{{")},Previewmaker.prototype.killTemplates=function(){this.kill("{{","}}","{","}"," ")},Previewmaker.prototype.killTables=function(){this.kill("{|",/[|]}\s*/,"{|"),this.kill(/<table.*?>/i,/<\/table.*?>/i,/<table.*?>/i),this.data=this.data.replace(RegExp("^[|].*$","mg"),"")},Previewmaker.prototype.killImages=function(){var a=[];jQuery.each(mw.config.get("wgNamespaceIds"),function(b,c){(c==pg.nsImageId||c==pg.nsCategoryId)&&a.push(b.split(" ").join("[ _]"))}),this.kill(RegExp("[[][[]\\s*("+a.join("|")+")\\s*:","i"),/\]\]\s*/,"[","]")},Previewmaker.prototype.killHTML=function(){var a,b,c;for(this.kill(/<ref\b[^/>]*?>/i,/<\/ref>/i),this.data=this.data.replace(RegExp("(^|\\n) *<.*","g"),"\n"),a=this.data.parenSplit(/(<[\w\W]*?(?:>|$|(?=<)))/),b=a.length,c=1;b>c;c+=2)switch(a[c]){case"<nowiki>":case"</nowiki>":case"<blockquote>":case"</blockquote>":break;default:a[c]=""}this.data=a.join("")},Previewmaker.prototype.killChunks=function(){var a=new RegExp("((^|\\n)\\s*:*\\s*''[^']([^']|'''|'[^']){20}(.|\\n[^\\n])*''[.!?\\s]*\\n)+","g");this.data=this.data.replace(a,"\n")},Previewmaker.prototype.mopup=function(){this.data=this.data.replace(RegExp("^-{4,}","mg"),""),this.data=this.data.replace(RegExp("(^|\\n) *:[^\\n]*","g"),""),this.data=this.data.replace(RegExp("^__[A-Z_]*__ *$","gmi"),"")},Previewmaker.prototype.firstBit=function(){var b,d,e,a=this.data;getValueOf("popupPreviewCutHeadings")&&(this.data=this.data.replace(RegExp("\\s*(==+[^=]*==+)\\s*","g"),"\n\n$1 "),this.data=this.data.replace(RegExp("([:;]) *\\n{2,}","g"),"$1\n"),this.data=this.data.replace(RegExp("^[\\s\\n]*"),""),stuff=RegExp("^([^\\n]|\\n[^\\n\\s])*").exec(this.data),stuff&&(a=stuff[0]),getValueOf("popupPreviewFirstParOnly")||(a=this.data),a=a.replace(RegExp("(==+[^=]*==+)\\s*","g"),"$1\n\n")),a=a.parenSplit(RegExp("([!?.]+[\"']*\\s)","g")),a[0]=a[0].replace(RegExp("^\\s*"),""),b=RegExp("([^.][a-z][.] *[a-z]|etc|sic|Dr|Mr|Mrs|Ms|St|no|op|cit|\\[[^\\]]*|\\s[A-Zvclm])$","i"),a=this.fixSentenceEnds(a,b),this.fullLength=a.join("").length,getValueOf("popupMaxPreviewCharacters")+this.extraCharacters,d=this.maxSentences,e=this.firstSentences(a,d);do e=this.firstSentences(a,d),--d;while(e.length>this.maxCharacters&&0!=d);this.data=e},Previewmaker.prototype.fixSentenceEnds=function(a,b){var d,e,g;for(d=0;d<a.length-2;++d)if(b.test(a[d])){for(g=[],e=0;e<a.length;++e)d>e&&(g[e]=a[e]),e==d&&(g[d]=a[d]+a[d+1]+a[d+2]),e>d+2&&(g[e-2]=a[e]);return this.fixSentenceEnds(g,b)}return a},Previewmaker.prototype.firstSentences=function(a,b){var c=a.slice(0,2*b);return c.join("")},Previewmaker.prototype.killBadWhitespace=function(){this.data=this.data.replace(RegExp("^ *'+ *$","gm"),"")},Previewmaker.prototype.makePreview=function(){this.owner.article.namespaceId()!=pg.nsTemplateId&&this.owner.article.namespaceId()!=pg.nsImageId?(this.killComments(),this.killDivs(),this.killGalleries(),this.killBoxTemplates(),getValueOf("popupPreviewKillTemplates")?this.killTemplates():this.killMultilineTemplates(),this.killTables(),this.killImages(),this.killHTML(),this.killChunks(),this.mopup(),this.firstBit(),this.killBadWhitespace()):this.killHTML(),this.html=wiki2html(this.data,this.baseUrl),this.fixHTML(),this.stripLongTemplates()},Previewmaker.prototype.esWiki2HtmlPart=function(a){var c,d,e,b=/(?:\[\[([^|\]]*)(?:\|([^|\]]*))*]]([a-z]*))/gi;for(b.lastIndex=0,d="",e=0;null!=(c=b.exec(a));)d+=pg.escapeQuotesHTML(a.substring(e,c.index))+'<a href="'+Insta.conf.paths.articles+pg.escapeQuotesHTML(c[1])+'">'+pg.escapeQuotesHTML((c[2]?c[2]:c[1])+c[3])+"</a>",e=b.lastIndex;return d+=pg.escapeQuotesHTML(a.substring(e))},Previewmaker.prototype.editSummaryPreview=function(){var b,c,d,e,f,g,h,i,a=/\/\* *(.*?) *\*\//g;return a.lastIndex=0,b=a.exec(this.data),b?(c=this.data.substring(0,b.index-1),d=b[1],e=this.data.substring(a.lastIndex),f="<span class='autocomment'>",g="</span>",c.length>0&&(f=this.esWiki2HtmlPart(c)+" "+f+"- "),e.length>0&&(g=": "+g+this.esWiki2HtmlPart(e)),h=(new Title).fromURL(this.baseUrl),h.anchorFromUtf(d),i=Insta.conf.paths.articles+pg.escapeQuotesHTML(h.toString(!0))+"#"+pg.escapeQuotesHTML(h.anchor),f+'<a href="'+i+'">&rarr;</a> '+pg.escapeQuotesHTML(d)+g):this.esWiki2HtmlPart(this.data)},Previewmaker.prototype.fixHTML=function(){if(this.html){var a=this.html;a=a.replace(RegExp('(<a href="'+pg.wiki.articlePath+'/[^"]*)[?](.*?")',"g"),"$1%3F$2"),a=a.replace(RegExp("(<a href='"+pg.wiki.articlePath+"/[^']*)[?](.*?')","g"),"$1%3F$2"),this.html=a}},Previewmaker.prototype.showPreview=function(){if(this.makePreview(),"string"==typeof this.html&&!RegExp("^\\s*$").test(this.html)){setPopupHTML("<hr />","popupPrePreviewSep",this.owner.idNumber),setPopupTipsAndHTML(this.html,"popupPreview",this.owner.idNumber,{owner:this.owner});var a=this.fullLength>this.data.length?this.moreLink():"";setPopupHTML(a,"popupPreviewMore",this.owner.idNumber)}},Previewmaker.prototype.moreLink=function(){var b,a=document.createElement("a");return a.className="popupMoreLink",a.innerHTML=popupString("more..."),b=this,a.onclick=function(){b.maxCharacters+=2e3,b.maxSentences+=20,b.setData(),b.showPreview()},a},Previewmaker.prototype.stripLongTemplates=function(){this.html=this.html.replace(RegExp("^.{0,1000}[{][{][^}]*?(<(p|br)( /)?>\\s*){2,}([^{}]*?[}][}])?","gi"),""),this.html=this.html.split("\n").join(" "),this.html=this.html.replace(RegExp("[{][{][^}]*<pre>[^}]*[}][}]","gi"),"")},Previewmaker.prototype.killMultilineTemplates=function(){this.kill("{{{","}}}"),this.kill(RegExp("\\s*[{][{][^{}]*\\n"),"}}","{{")},pg.fn.APIsharedImagePagePreviewHTML=function(a){var b,c,d,e;log("APIsharedImagePagePreviewHTML"),b=a["requestid"],a["query"]&&a["query"]["pages"]&&(c=anyChild(a["query"]["pages"]),d=c&&c.revisions?c.revisions[0]["*"]:null,d&&(e=new Previewmaker(d,pg.current.link.navpopup.article,pg.current.link.navpopup),e.makePreview(),setPopupHTML(e.html,"popupSecondPreview",b)))},Mousetracker.prototype.addHook=function(a){this.hooks.push(a)},Mousetracker.prototype.runHooks=function(){var a,b,c,d,e,f;if(this.hooks&&this.hooks.length){for(a=!1,b={},c=this.x,d=this.y,e=this.hooks.length,f=0;e>f;++f)this.hooks[f](c,d)===!0&&(a=!0,b[f]=!0);a&&this.removeHooks(b)}},Mousetracker.prototype.removeHooks=function(a){var d,b=[],c=this.hooks.length;for(d=0;c>d;++d)a[d]||b.push(this.hooks[d]);this.hooks=b},Mousetracker.prototype.track=function(a){var b,c,d,e,f;if(a=a||window.event){if(a.pageX)b=a.pageX,c=a.pageY;else{if("undefined"==typeof a.clientX)return;f=document.documentElement,f&&(d=f.scrollLeft),d=d||document.body.scrollLeft||document.scrollLeft||0,f&&(e=f.scrollTop),e=e||document.body.scrollTop||document.scrollTop||0,b=a.clientX+d,c=a.clientY+e}this.setPosition(b,c)}},Mousetracker.prototype.setPosition=function(a,b){if(this.x=a,this.y=b,this.dirty||0===this.hooks.length)return this.dirty=!1,void 0;"number"!=typeof this.lastHook_x&&(this.lastHook_x=-100,this.lastHook_y=-100);var c=(this.lastHook_x-a)*(this.lastHook_y-b);c=c>=0?c:-c,c>1&&(this.lastHook_x=a,this.lastHook_y=b,this.dirty?this.dirty=!1:this.runHooks())},Mousetracker.prototype.enable=function(){if(!this.active){this.active=!0,this.savedHandler=document.onmousemove;var a=this;document.onmousemove=function(b){a.track.apply(a,[b])},this.loopDelay&&(this.timer=setInterval(function(){a.runHooks()},this.loopDelay))}},Mousetracker.prototype.disable=function(){this.active&&($.isFunction(this.savedHandler)?document.onmousemove=this.savedHandler:delete document.onmousemove,this.timer&&clearInterval(this.timer),this.active=!1)},Navpopup.uid=0,Navpopup.prototype.isVisible=function(){return this.visible},Navpopup.prototype.reposition=function(a,b,c){log("reposition("+a+","+b+","+c+")"),"undefined"!=typeof a&&null!==a&&(this.left=a),"undefined"!=typeof b&&null!==b&&(this.top=b),"undefined"!=typeof this.left&&"undefined"!=typeof this.top&&(this.mainDiv.style.left=this.left+"px",this.mainDiv.style.top=this.top+"px"),c||this.limitHorizontalPosition()},Navpopup.prototype.limitHorizontalPosition=function(){var a,b,c,d,e;this.constrained&&!this.tooWide&&(this.updateDimensions(),a=this.left,b=this.width,c=document.body.clientWidth,(a+b>=c||a>0&&this.maxWidth&&this.width<this.maxWidth&&this.height>this.width&&a>c-this.maxWidth)&&(this.mainDiv.style.left="-10000px",this.mainDiv.style.width=this.maxWidth+"px",d=parseInt(this.mainDiv.offsetWidth,10),e=c-d-1,0>e&&(e=0,this.tooWide=!0),log("limitHorizontalPosition: moving to ("+e+","+this.top+");"+" naturalWidth="+d+", clientWidth="+c),this.reposition(e,null,!0)))},Navpopup.highest=1e3,Navpopup.prototype.raise=function(){this.mainDiv.style.zIndex=Navpopup.highest+1,++Navpopup.highest},Navpopup.prototype.show=function(){this.noshow||(this.reposition(),this.raise(),this.unhide())},Navpopup.prototype.showSoon=function(a){if(!this.visible){this.noshow=!1;var b=this;setTimeout(function(){Navpopup.tracker.active&&b.reposition.apply(b,[Navpopup.tracker.x+2,Navpopup.tracker.y+2]),b.show.apply(b,[])},a)}},Navpopup.prototype.showSoonIfStable=function(a){var b,c;log("showSoonIfStable, time="+a),this.visible||(this.noshow=!1,this.stable_x=-1e4,this.stable_y=-1e4,b=function(){var a,b,d,e,f;return log("stableShow called"),a=Navpopup.tracker.x,b=Navpopup.tracker.y,d=c.stable_x-a,e=c.stable_y-b,f=0,f>=d*d&&f>=e*e?(log("mouse is stable"),clearInterval(c.showSoonStableTimer),c.reposition.apply(c,[a+2,b+2]),c.show.apply(c,[]),void 0):(c.stable_x=a,c.stable_y=b,void 0)},c=this,this.showSoonStableTimer=setInterval(b,a/2))},Navpopup.prototype.stick=function(){this.noshow=!1,this.sticky=!0},Navpopup.prototype.unstick=function(){this.sticky=!1},Navpopup.prototype.banish=function(){log("banish called"),this.noshow=!0,this.showSoonStableTimer&&(log("clearing showSoonStableTimer"),clearInterval(this.showSoonStableTimer)),this.hide()},Navpopup.prototype.runHooks=function(a,b){var c,d,e;if(this.hooks[a])for(c=this.hooks[a],d=c.length,e=0;d>e;++e)c[e]&&c[e].when==b&&c[e].hook.apply(this,[])&&(c[e].hookId&&delete this.hookIds[c[e].hookId],c[e]=null)},Navpopup.prototype.addHook=function(a,b,c,d){if(c=c||"after",this.hooks[b]){var e=null;if(d){if(e=[b,c,d].join("|"),this.hookIds[e])return;this.hookIds[e]=!0}this.hooks[b].push({hook:a,when:c,hookId:e})}},Navpopup.prototype.createMainDiv=function(){var a,b;this.mainDiv||(this.runHooks("create","before"),a=document.createElement("div"),b=this,a.onclick=function(a){b.onclickHandler(a)},a.className=this.className?this.className:"navpopup_maindiv",a.id=a.className+this.uid,a.style.position="absolute",a.style.display="none",a.className="navpopup",a.navpopup=this,this.mainDiv=a,document.body.appendChild(a),this.runHooks("create","after"))},Navpopup.prototype.onclickHandler=function(){this.raise()},Navpopup.prototype.makeDraggable=function(a){var b,c,d;this.mainDiv||this.createMainDiv(),b=new Drag,a||(b.startCondition=function(a){try{if(!a.shiftKey)return!1}catch(b){return!1}return!0}),a&&(c=document.getElementById(a)),c||(c=this.mainDiv),d=this,b.endHook=function(a,b){Navpopup.tracker.dirty=!0,d.reposition(a,b)},b.init(c,this.mainDiv)},Navpopup.prototype.hide=function(){this.runHooks("hide","before"),this.abortDownloads(),this.sticky||("undefined"!=typeof this.visible&&this.visible&&(this.mainDiv.style.display="none",this.visible=!1),this.runHooks("hide","after"))},Navpopup.prototype.unhide=function(){this.runHooks("unhide","before"),"undefined"==typeof this.visible||this.visible||(this.mainDiv.style.display="inline",this.visible=!0),this.runHooks("unhide","after")},Navpopup.prototype.setInnerHTML=function(a){this.mainDiv.innerHTML=a},Navpopup.prototype.updateDimensions=function(){this.width=parseInt(this.mainDiv.offsetWidth,10),this.height=parseInt(this.mainDiv.offsetHeight,10)},Navpopup.prototype.isWithin=function(a,b){if(!this.visible)return!1;this.updateDimensions();var c=this.fuzz||0;return a+c>=this.left&&a-c<=this.left+this.width&&b+c>=this.top&&b-c<=this.top+this.height},Navpopup.prototype.addDownload=function(a){a&&this.downloads.push(a)},Navpopup.prototype.abortDownloads=function(){var a,b;for(a=0;a<this.downloads.length;++a)b=this.downloads[a],b&&b.abort&&b.abort();this.downloads=[]},Navpopup.tracker=new Mousetracker,jsReservedProperties=RegExp("^(constructor|prototype|__((define|lookup)[GS]etter)__|eval|hasOwnProperty|propertyIsEnumerable|to(Source|String|LocaleString)|(un)?watch|valueOf)$"),diffBugAlert.list={},navlinkTag.prototype.html=function(){var a,b,c,d;return this.getNewWin(),this.getPrintFunction(),a="",d="span",d?(b="<"+d+' class="popup_'+this.id+'">',c="</"+d+">"):(b="",c=""),"function"!=typeof this.print?errlog("Oh dear - invalid print function for a navlinkTag, id="+this.id):(a=this.print(this),"string"!=typeof a?a="":"undefined"!=typeof this.shortcut&&(a=addPopupShortcut(a,this.shortcut))),b+a+c},navlinkTag.prototype.getNewWin=function(){getValueOf("popupLinksNewWindow"),"undefined"==typeof pg.option.popupLinksNewWindow[this.id]&&(this.newWin=null),this.newWin=pg.option.popupLinksNewWindow[this.id]},navlinkTag.prototype.getPrintFunction=function(){var d,e;if("string"==typeof this.id&&typeof this.article==typeof{}){switch(this.noPopup=1,this.id){case"contribs":case"history":case"whatLinksHere":case"userPage":case"monobook":case"userTalk":case"talk":case"article":case"lastEdit":this.noPopup=null}switch(this.id){case"email":case"contribs":case"block":case"unblock":case"userlog":case"userSpace":case"deletedContribs":this.article=this.article.userName()}switch(this.id){case"userTalk":case"newUserTalk":case"editUserTalk":case"userPage":case"monobook":case"editMonobook":case"blocklog":this.article=this.article.userName(!0);case"pagelog":case"deletelog":case"protectlog":delete this.oldid}switch(("editMonobook"==this.id||"monobook"==this.id)&&this.article.append("/monobook.js"),"mainlink"!=this.id&&(this.article=this.article.removeAnchor()),this.id){case"undelete":this.print=specialLink,this.specialpage="Undelete",this.sep="/";break;case"whatLinksHere":this.print=specialLink,this.specialpage="Whatlinkshere";break;case"relatedChanges":this.print=specialLink,this.specialpage="Recentchangeslinked";break;case"move":this.print=specialLink,this.specialpage="Movepage";break;case"contribs":this.print=specialLink,this.specialpage="Contributions";break;case"deletedContribs":this.print=specialLink,this.specialpage="Deletedcontributions";break;case"email":this.print=specialLink,this.specialpage="EmailUser",this.sep="/";break;case"block":this.print=specialLink,this.specialpage="Blockip",this.sep="&ip=";break;case"unblock":this.print=specialLink,this.specialpage="Ipblocklist",this.sep="&action=unblock&ip=";break;case"userlog":this.print=specialLink,this.specialpage="Log",this.sep="&user=";break;case"blocklog":this.print=specialLink,this.specialpage="Log",this.sep="&type=block&page=";break;case"pagelog":this.print=specialLink,this.specialpage="Log",this.sep="&page=";break;case"protectlog":this.print=specialLink,this.specialpage="Log",this.sep="&type=protect&page=";break;case"deletelog":this.print=specialLink,this.specialpage="Log",this.sep="&type=delete&page=";break;case"userSpace":this.print=specialLink,this.specialpage="PrefixIndex",this.sep="&namespace=2&prefix=";break;case"search":this.print=specialLink,this.specialpage="Search",this.sep="&fulltext=Search&search=";break;case"unwatch":case"watch":this.print=magicWatchLink,this.action=this.id+"&autowatchlist=1&autoimpl="+popupString("autoedit_version")+"&actoken="+autoClickToken();break;case"history":case"historyfeed":case"unprotect":case"protect":this.print=wikiLink,this.action=this.id;break;case"delete":this.print=wikiLink,this.action="delete",this.article.namespaceId()==pg.nsImageId&&(d=this.article.stripNamespace(),this.action+="&image="+d);break;case"markpatrolled":case"edit":delete this.oldid;case"view":case"purge":case"render":this.print=wikiLink,this.action=this.id;break;case"raw":this.print=wikiLink,this.action="raw&ctype=text/css";break;case"new":this.print=wikiLink,this.action="edit&section=new";break;case"mainlink":"undefined"==typeof this.text&&(this.text=this.article.toString().entify()),getValueOf("popupSimplifyMainLink")&&isInStrippableNamespace(this.article)&&(e=this.text.split("/"),this.text=e[e.length-1],""==this.text&&e.length>1&&(this.text=e[e.length-2])),this.print=titledWikiLink,"undefined"==typeof this.title&&pg.current.link&&"undefined"!=typeof pg.current.link.href&&(this.title=safeDecodeURI(pg.current.link.originalTitle?pg.current.link.originalTitle:this.article),"undefined"!=typeof this.oldid&&this.oldid&&(this.title=tprintf("Revision %s of %s",[this.oldid,this.title]))),this.action="view";break;case"userPage":case"article":case"monobook":case"editMonobook":case"editArticle":delete this.oldid,this.article=this.article.articleFromTalkOrArticle(),this.print=wikiLink,this.action=0==this.id.indexOf("edit")?"edit":"view";
break;case"userTalk":case"talk":this.article=this.article.talkPage(),delete this.oldid,this.print=wikiLink,this.action="view";break;case"arin":this.print=arinLink;break;case"count":this.print=editCounterLink;break;case"google":this.print=googleLink;break;case"editors":this.print=editorListLink;break;case"globalsearch":this.print=globalSearchLink;break;case"lastEdit":this.print=titledDiffLink,this.title=popupString("Show the last edit"),this.from="prev",this.to="cur";break;case"oldEdit":this.print=titledDiffLink,this.title=popupString("Show the edit made to get revision")+" "+this.oldid,this.from="prev",this.to=this.oldid;break;case"editOld":this.print=wikiLink,this.action="edit";break;case"undo":this.print=wikiLink,this.action="edit&undo=";break;case"markpatrolled":this.print=wikiLink,this.action="markpatrolled";case"revert":this.print=wikiLink,this.action="revert";break;case"nullEdit":this.print=wikiLink,this.action="nullEdit";break;case"diffCur":this.print=titledDiffLink,this.title=tprintf("Show changes since revision %s",[this.oldid]),this.from=this.oldid,this.to="cur";break;case"editUserTalk":case"editTalk":delete this.oldid,this.article=this.article.talkPage(),this.action="edit",this.print=wikiLink;break;case"newUserTalk":case"newTalk":this.article=this.article.talkPage(),this.action="edit&section=new",this.print=wikiLink;break;case"lastContrib":case"sinceMe":this.print=magicHistoryLink;break;case"togglePreviews":this.text=popupString(pg.option.simplePopups?"enable previews":"disable previews");case"disablePopups":case"purgePopups":this.print=popupMenuLink;break;default:this.print=function(){return"Unknown navlink type: "+this.id}}}},pg.fn.getLastContrib=function(a,b){getHistoryInfo(a,function(c){processLastContribInfo(c,{page:a,newWin:b})})},pg.fn.getDiffSinceMyEdit=function(a,b){getHistoryInfo(a,function(c){processDiffSinceMyEdit(c,{page:a,newWin:b})})},pg.fn.purgePopups=function(){processAllPopups(!0),setupCache(),pg.option={},abortAllDownloads()},pg.fn.disablePopups=function(){processAllPopups(!1,!0),setupTooltips(null,!0)},pg.fn.togglePreviews=function(){processAllPopups(!0,!0),pg.option.simplePopups=!pg.option.simplePopups,abortAllDownloads()},pg.fn.modifyWatchlist=function(a,b){var c={action:"watch",format:"json",title:a,token:mw.user.tokens.get("watchToken"),uselang:mw.config.get("wgUserLanguage")};"unwatch"===b&&(c.unwatch=""),jQuery.ajax({url:mw.util.wikiScript("api"),dataType:"json",type:"POST",data:c,success:function(a){mw.util.jsMessage(a.watch.message,"watch")}})},pg.string={article:"article",category:"category",categories:"categories",image:"image",images:"images",stub:"stub","section stub":"section stub","Empty page":"Empty page",kB:"kB",bytes:"bytes",day:"day",days:"days",hour:"hour",hours:"hours",minute:"minute",minutes:"minutes",second:"second",seconds:"seconds",week:"week",weeks:"weeks",search:"search",SearchHint:"Find English Wikipedia articles containing %s",web:"web",global:"global",globalSearchHint:"Search across Wikipedias in different languages for %s",googleSearchHint:"Google for %s",actions:"actions",popupsMenu:"popups",togglePreviewsHint:"Toggle preview generation in popups on this page","enable previews":"enable previews","disable previews":"disable previews","toggle previews":"toggle previews","show preview":"show preview",reset:"reset","more...":"more...",disable:"disable popups",disablePopupsHint:"Disable popups on this page. Reload page to re-enable.",historyfeedHint:"RSS feed of recent changes to this page",purgePopupsHint:"Reset popups, clearing all cached popup data.",PopupsHint:"Reset popups, clearing all cached popup data.",spacebar:"space",view:"view","view article":"view article",viewHint:"Go to %s",talk:"talk","talk page":"talk page","this&nbsp;revision":"this&nbsp;revision","revision %s of %s":"revision %s of %s","Revision %s of %s":"Revision %s of %s","the revision prior to revision %s of %s":"the revision prior to revision %s of %s","Toggle image size":"Click to toggle image size",del:"del","delete":"delete",deleteHint:"Delete %s",undeleteShort:"un",UndeleteHint:"Show the deletion history for %s",protect:"protect",protectHint:"Restrict editing rights to %s",unprotectShort:"un",unprotectHint:"Allow %s to be edited by anyone again",move:"move","move page":"move page",MovepageHint:"Change the title of %s",edit:"edit","edit article":"edit article",editHint:"Change the content of %s","edit talk":"edit talk","new":"new","new topic":"new topic",newSectionHint:"Start a new section on %s","null edit":"null edit",nullEditHint:"Submit an edit to %s, making no changes ",hist:"hist",history:"history",historyHint:"List the changes made to %s",last:"last",lastEdit:"lastEdit","mark patrolled":"mark patrolled",markpatrolledHint:"Mark this edit as patrolled","show last edit":"most recent edit","Show the last edit":"Show the effects of the most recent change",lastContrib:"lastContrib","last set of edits":"latest edits",lastContribHint:"Show the net effect of changes made by the last editor",cur:"cur",diffCur:"diffCur","Show changes since revision %s":"Show changes since revision %s","%s old":"%s old",oldEdit:"oldEdit",purge:"purge",purgeHint:"Demand a fresh copy of %s",raw:"source",rawHint:"Download the source of %s",render:"simple",renderHint:"Show a plain HTML version of %s","Show the edit made to get revision":"Show the edit made to get revision",sinceMe:"sinceMe","changes since mine":"diff my edit",sinceMeHint:"Show changes since my last edit","Couldn't find an edit by %s\nin the last %s edits to\n%s":"Couldn't find an edit by %s\nin the last %s edits to\n%s",eds:"eds",editors:"editors",editorListHint:"List the users who have edited %s",related:"related",relatedChanges:"relatedChanges","related changes":"related changes",RecentchangeslinkedHint:"Show changes in articles related to %s",editOld:"editOld",rv:"rv",revert:"revert",revertHint:"Revert to %s",defaultpopupRedlinkSummary:"Removing link to empty page [[%s]] using [[:en:Wikipedia:Tools/Navigation_popups|popups]]",defaultpopupFixDabsSummary:"Disambiguate [[%s]] to [[%s]] using [[:en:Wikipedia:Tools/Navigation_popups|popups]]",defaultpopupFixRedirsSummary:"Redirect bypass from [[%s]] to [[%s]] using [[:en:Wikipedia:Tools/Navigation_popups|popups]]",defaultpopupExtendedRevertSummary:"Revert to revision dated %s by %s, oldid %s using [[:en:Wikipedia:Tools/Navigation_popups|popups]]",defaultpopupRevertToPreviousSummary:"Revert to the revision prior to revision %s using [[:en:Wikipedia:Tools/Navigation_popups|popups]]",defaultpopupRevertSummary:"Revert to revision %s using [[:en:Wikipedia:Tools/Navigation_popups|popups]]",defaultpopupQueriedRevertToPreviousSummary:"Revert to the revision prior to revision $1 dated $2 by $3 using [[:en:Wikipedia:Tools/Navigation_popups|popups]]",defaultpopupQueriedRevertSummary:"Revert to revision $1 dated $2 by $3 using [[:en:Wikipedia:Tools/Navigation_popups|popups]]",defaultpopupRmDabLinkSummary:"Remove link to dab page [[%s]] using [[:en:Wikipedia:Tools/Navigation_popups|popups]]",Redirects:"Redirects"," to ":" to ","Bypass redirect":"Bypass redirect","Fix this redirect":"Fix this redirect",disambig:"disambig",disambigHint:"Disambiguate this link to [[%s]]","Click to disambiguate this link to:":"Click to disambiguate this link to:","remove this link":"remove this link","remove all links to this page from this article":"remove all links to this page from this article","remove all links to this disambig page from this article":"remove all links to this disambig page from this article",mainlink:"mainlink",wikiLink:"wikiLink",wikiLinks:"wikiLinks","links here":"links here",whatLinksHere:"whatLinksHere","what links here":"what links here",WhatlinkshereHint:"List the pages that are hyperlinked to %s",unwatchShort:"un",watchThingy:"watch",watchHint:"Add %s to my watchlist",unwatchHint:"Remove %s from my watchlist","Only found one editor: %s made %s edits":"Only found one editor: %s made %s edits","%s seems to be the last editor to the page %s":"%s seems to be the last editor to the page %s",rss:"rss","Diff truncated for performance reasons":"Diff truncated for performance reasons","Old revision":"Old revision","New revision":"New revision","Something went wrong :-(":"Something went wrong :-(","Empty revision, maybe non-existent":"Empty revision, maybe non-existent","Unknown date":"Unknown date","Empty category":"Empty category","Category members (%s shown)":"Category members (%s shown)","No image links found":"No image links found","File links":"File links","No image found":"No image found","Image from Commons":"Image from Commons","Description page":"Description page","Alt text:":"Alt text:",revdel:"Hidden revision",user:"user","user&nbsp;page":"user&nbsp;page","user talk":"user talk","edit user talk":"edit user talk","leave comment":"leave comment",email:"email","email user":"email user",EmailuserHint:"Send an email to %s",space:"space",PrefixIndexHint:"Show pages in the userspace of %s",count:"count","edit counter":"edit counter",editCounterLinkHint:"Count the contributions made by %s",contribs:"contribs",contributions:"contributions",deletedContribs:"deleted contributions",DeletedcontributionsHint:"List deleted edits made by %s",ContributionsHint:"List the contributions made by %s",log:"log","user log":"user log",userLogHint:"Show %s's user log",arin:"ARIN lookup","Look up %s in ARIN whois database":"Look up %s in the ARIN whois database",unblockShort:"un",block:"block","block user":"block user",IpblocklistHint:"Unblock %s",BlockipHint:"Prevent %s from editing","block log":"block log",blockLogHint:"Show the block log for %s",protectLogHint:"Show the protection log for %s",pageLogHint:"Show the page log for %s",deleteLogHint:"Show the deletion log for %s","Invalid %s %s":"The option %s is invalid: %s","No backlinks found":"No backlinks found"," and more":" and more",undo:"undo",undoHint:"undo this edit","Download preview data":"Download preview data","Invalid or IP user":"Invalid or IP user","Not a registered username":"Not a registered username",BLOCKED:"BLOCKED"," edits since: ":" edits since: ","Enter a non-empty edit summary or press cancel to abort":"Enter a non-empty edit summary or press cancel to abort","Failed to get revision information, please edit manually.\n\n":"Failed to get revision information, please edit manually.\n\n","The %s button has been automatically clicked. Please wait for the next page to load.":"The %s button has been automatically clicked. Please wait for the next page to load.","Could not find button %s. Please check the settings in your javascript file.":"Could not find button %s. Please check the settings in your javascript file.","Open full-size image":"Open full-size image",zxy:"zxy",autoedit_version:"np20140416"},"complete"==document.readyState?autoEdit():$(window).on("load",autoEdit),function(){function b(b){function c(){b.each(function(){this.ranSetupTooltipsAlready=!1,setupTooltips(this)})}return"mw-content-text"==b.attr("id")&&a?(a=!1,void 0):(setupPopups.completed?c():setupPopups(c),void 0)}var a=!0;mw.hook("wikipage.content").add(b),mw.hook("ext.echo.overlay.beforeShowingOverlay").add(function(a){b(a.find(".mw-echo-state"))})}()});
break;case"userTalk":case"talk":this.article=this.article.talkPage(),delete this.oldid,this.print=wikiLink,this.action="view";break;case"arin":this.print=arinLink;break;case"count":this.print=editCounterLink;break;case"google":this.print=googleLink;break;case"editors":this.print=editorListLink;break;case"globalsearch":this.print=globalSearchLink;break;case"lastEdit":this.print=titledDiffLink,this.title=popupString("Show the last edit"),this.from="prev",this.to="cur";break;case"oldEdit":this.print=titledDiffLink,this.title=popupString("Show the edit made to get revision")+" "+this.oldid,this.from="prev",this.to=this.oldid;break;case"editOld":this.print=wikiLink,this.action="edit";break;case"undo":this.print=wikiLink,this.action="edit&undo=";break;case"markpatrolled":this.print=wikiLink,this.action="markpatrolled";case"revert":this.print=wikiLink,this.action="revert";break;case"nullEdit":this.print=wikiLink,this.action="nullEdit";break;case"diffCur":this.print=titledDiffLink,this.title=tprintf("Show changes since revision %s",[this.oldid]),this.from=this.oldid,this.to="cur";break;case"editUserTalk":case"editTalk":delete this.oldid,this.article=this.article.talkPage(),this.action="edit",this.print=wikiLink;break;case"newUserTalk":case"newTalk":this.article=this.article.talkPage(),this.action="edit&section=new",this.print=wikiLink;break;case"lastContrib":case"sinceMe":this.print=magicHistoryLink;break;case"togglePreviews":this.text=popupString(pg.option.simplePopups?"enable previews":"disable previews");case"disablePopups":case"purgePopups":this.print=popupMenuLink;break;default:this.print=function(){return"Unknown navlink type: "+this.id}}}},pg.fn.getLastContrib=function(a,b){getHistoryInfo(a,function(c){processLastContribInfo(c,{page:a,newWin:b})})},pg.fn.getDiffSinceMyEdit=function(a,b){getHistoryInfo(a,function(c){processDiffSinceMyEdit(c,{page:a,newWin:b})})},pg.fn.purgePopups=function(){processAllPopups(!0),setupCache(),pg.option={},abortAllDownloads()},pg.fn.disablePopups=function(){processAllPopups(!1,!0),setupTooltips(null,!0)},pg.fn.togglePreviews=function(){processAllPopups(!0,!0),pg.option.simplePopups=!pg.option.simplePopups,abortAllDownloads()},pg.fn.modifyWatchlist=function(a,b){var c={action:"watch",format:"json",title:a,token:mw.user.tokens.get("watchToken"),uselang:mw.config.get("wgUserLanguage")};"unwatch"===b&&(c.unwatch=""),jQuery.ajax({url:mw.util.wikiScript("api"),dataType:"json",type:"POST",data:c,success:function(a){mw.util.jsMessage(a.watch.message,"watch")}})},pg.string={article:"article",category:"category",categories:"categories",image:"image",images:"images",stub:"stub","section stub":"section stub","Empty page":"Empty page",kB:"kB",bytes:"bytes",day:"day",days:"days",hour:"hour",hours:"hours",minute:"minute",minutes:"minutes",second:"second",seconds:"seconds",week:"week",weeks:"weeks",search:"search",SearchHint:"Find English Wikipedia articles containing %s",web:"web",global:"global",globalSearchHint:"Search across Wikipedias in different languages for %s",googleSearchHint:"Google for %s",actions:"actions",popupsMenu:"popups",togglePreviewsHint:"Toggle preview generation in popups on this page","enable previews":"enable previews","disable previews":"disable previews","toggle previews":"toggle previews","show preview":"show preview",reset:"reset","more...":"more...",disable:"disable popups",disablePopupsHint:"Disable popups on this page. Reload page to re-enable.",historyfeedHint:"RSS feed of recent changes to this page",purgePopupsHint:"Reset popups, clearing all cached popup data.",PopupsHint:"Reset popups, clearing all cached popup data.",spacebar:"space",view:"view","view article":"view article",viewHint:"Go to %s",talk:"talk","talk page":"talk page","this&nbsp;revision":"this&nbsp;revision","revision %s of %s":"revision %s of %s","Revision %s of %s":"Revision %s of %s","the revision prior to revision %s of %s":"the revision prior to revision %s of %s","Toggle image size":"Click to toggle image size",del:"del","delete":"delete",deleteHint:"Delete %s",undeleteShort:"un",UndeleteHint:"Show the deletion history for %s",protect:"protect",protectHint:"Restrict editing rights to %s",unprotectShort:"un",unprotectHint:"Allow %s to be edited by anyone again",move:"move","move page":"move page",MovepageHint:"Change the title of %s",edit:"edit","edit article":"edit article",editHint:"Change the content of %s","edit talk":"edit talk","new":"new","new topic":"new topic",newSectionHint:"Start a new section on %s","null edit":"null edit",nullEditHint:"Submit an edit to %s, making no changes ",hist:"hist",history:"history",historyHint:"List the changes made to %s",last:"last",lastEdit:"lastEdit","mark patrolled":"mark patrolled",markpatrolledHint:"Mark this edit as patrolled","show last edit":"most recent edit","Show the last edit":"Show the effects of the most recent change",lastContrib:"lastContrib","last set of edits":"latest edits",lastContribHint:"Show the net effect of changes made by the last editor",cur:"cur",diffCur:"diffCur","Show changes since revision %s":"Show changes since revision %s","%s old":"%s old",oldEdit:"oldEdit",purge:"purge",purgeHint:"Demand a fresh copy of %s",raw:"source",rawHint:"Download the source of %s",render:"simple",renderHint:"Show a plain HTML version of %s","Show the edit made to get revision":"Show the edit made to get revision",sinceMe:"sinceMe","changes since mine":"diff my edit",sinceMeHint:"Show changes since my last edit","Couldn't find an edit by %s\nin the last %s edits to\n%s":"Couldn't find an edit by %s\nin the last %s edits to\n%s",eds:"eds",editors:"editors",editorListHint:"List the users who have edited %s",related:"related",relatedChanges:"relatedChanges","related changes":"related changes",RecentchangeslinkedHint:"Show changes in articles related to %s",editOld:"editOld",rv:"rv",revert:"revert",revertHint:"Revert to %s",defaultpopupRedlinkSummary:"Removing link to empty page [[%s]] using [[:en:Wikipedia:Tools/Navigation_popups|popups]]",defaultpopupFixDabsSummary:"Disambiguate [[%s]] to [[%s]] using [[:en:Wikipedia:Tools/Navigation_popups|popups]]",defaultpopupFixRedirsSummary:"Redirect bypass from [[%s]] to [[%s]] using [[:en:Wikipedia:Tools/Navigation_popups|popups]]",defaultpopupExtendedRevertSummary:"Revert to revision dated %s by %s, oldid %s using [[:en:Wikipedia:Tools/Navigation_popups|popups]]",defaultpopupRevertToPreviousSummary:"Revert to the revision prior to revision %s using [[:en:Wikipedia:Tools/Navigation_popups|popups]]",defaultpopupRevertSummary:"Revert to revision %s using [[:en:Wikipedia:Tools/Navigation_popups|popups]]",defaultpopupQueriedRevertToPreviousSummary:"Revert to the revision prior to revision $1 dated $2 by $3 using [[:en:Wikipedia:Tools/Navigation_popups|popups]]",defaultpopupQueriedRevertSummary:"Revert to revision $1 dated $2 by $3 using [[:en:Wikipedia:Tools/Navigation_popups|popups]]",defaultpopupRmDabLinkSummary:"Remove link to dab page [[%s]] using [[:en:Wikipedia:Tools/Navigation_popups|popups]]",Redirects:"Redirects"," to ":" to ","Bypass redirect":"Bypass redirect","Fix this redirect":"Fix this redirect",disambig:"disambig",disambigHint:"Disambiguate this link to [[%s]]","Click to disambiguate this link to:":"Click to disambiguate this link to:","remove this link":"remove this link","remove all links to this page from this article":"remove all links to this page from this article","remove all links to this disambig page from this article":"remove all links to this disambig page from this article",mainlink:"mainlink",wikiLink:"wikiLink",wikiLinks:"wikiLinks","links here":"links here",whatLinksHere:"whatLinksHere","what links here":"what links here",WhatlinkshereHint:"List the pages that are hyperlinked to %s",unwatchShort:"un",watchThingy:"watch",watchHint:"Add %s to my watchlist",unwatchHint:"Remove %s from my watchlist","Only found one editor: %s made %s edits":"Only found one editor: %s made %s edits","%s seems to be the last editor to the page %s":"%s seems to be the last editor to the page %s",rss:"rss","Diff truncated for performance reasons":"Diff truncated for performance reasons","Old revision":"Old revision","New revision":"New revision","Something went wrong :-(":"Something went wrong :-(","Empty revision, maybe non-existent":"Empty revision, maybe non-existent","Unknown date":"Unknown date","Empty category":"Empty category","Category members (%s shown)":"Category members (%s shown)","No image links found":"No image links found","File links":"File links","No image found":"No image found","Image from Commons":"Image from Commons","Description page":"Description page","Alt text:":"Alt text:",revdel:"Hidden revision",user:"user","user&nbsp;page":"user&nbsp;page","user talk":"user talk","edit user talk":"edit user talk","leave comment":"leave comment",email:"email","email user":"email user",EmailuserHint:"Send an email to %s",space:"space",PrefixIndexHint:"Show pages in the userspace of %s",count:"count","edit counter":"edit counter",editCounterLinkHint:"Count the contributions made by %s",contribs:"contribs",contributions:"contributions",deletedContribs:"deleted contributions",DeletedcontributionsHint:"List deleted edits made by %s",ContributionsHint:"List the contributions made by %s",log:"log","user log":"user log",userLogHint:"Show %s's user log",arin:"ARIN lookup","Look up %s in ARIN whois database":"Look up %s in the ARIN whois database",unblockShort:"un",block:"block","block user":"block user",IpblocklistHint:"Unblock %s",BlockipHint:"Prevent %s from editing","block log":"block log",blockLogHint:"Show the block log for %s",protectLogHint:"Show the protection log for %s",pageLogHint:"Show the page log for %s",deleteLogHint:"Show the deletion log for %s","Invalid %s %s":"The option %s is invalid: %s","No backlinks found":"No backlinks found"," and more":" and more",undo:"undo",undoHint:"undo this edit","Download preview data":"Download preview data","Invalid or IP user":"Invalid or IP user","Not a registered username":"Not a registered username",BLOCKED:"BLOCKED"," edits since: ":" edits since: ","Enter a non-empty edit summary or press cancel to abort":"Enter a non-empty edit summary or press cancel to abort","Failed to get revision information, please edit manually.\n\n":"Failed to get revision information, please edit manually.\n\n","The %s button has been automatically clicked. Please wait for the next page to load.":"The %s button has been automatically clicked. Please wait for the next page to load.","Could not find button %s. Please check the settings in your javascript file.":"Could not find button %s. Please check the settings in your javascript file.","Open full-size image":"Open full-size image",zxy:"zxy",autoedit_version:"np20140416"},"complete"==document.readyState?autoEdit():$(window).on("load",autoEdit),function(){function b(b){function c(){b.each(function(){this.ranSetupTooltipsAlready=!1,setupTooltips(this)})}return"mw-content-text"==b.attr("id")&&a?(a=!1,void 0):(setupPopups.completed?c():setupPopups(c),void 0)}var a=!0;mw.hook("wikipage.content").add(b),mw.hook("ext.echo.overlay.beforeShowingOverlay").add(function(a){b(a.find(".mw-echo-state"))})}()});/*当链接带有【nopopus】属性时,禁止添加popus*/!function(){var b,a=document.getElementsByClassName("nopopus");for(b in a)"[object HTMLAnchorElement]"==Object.prototype.toString.call(b)&&(b.onmousedown=b.onmouseover=b.onmouseout=null,b.hasPopup=fasle,Object.defineProperties(b,{onmouseover:{value:null,writable:!1,configurable:!1,enumerable:!1},onmousedown:{value:null,writable:!1,configurable:!1,enumerable:!1},onmouseout:{value:null,writable:!1,configurable:!1,enumerable:!1},hasPopup:{value:!1,writable:!1,configurable:!1,enumerable:!1}}))}();
/*当链接带有【nopopus】属性时,禁止添加popus*/!function(){var b,a=document.getElementsByClassName("nopopus");for(b in a)"[object HTMLAnchorElement]"==Object.prototype.toString.call(b)&&(b.onmousedown=b.onmouseover=b.onmouseout=null,b.hasPopup=fasle,Object.defineProperties(b,{onmouseover:{value:null,writable:!1,configurable:!1,enumerable:!1},onmousedown:{value:null,writable:!1,configurable:!1,enumerable:!1},onmouseout:{value:null,writable:!1,configurable:!1,enumerable:!1},hasPopup:{value:!1,writable:!1,configurable:!1,enumerable:!1}}))}();