“MediaWiki:Gadget-popups-main.js”的版本间的差异
来自希灵百科
(创建页面,内容为“/* * 全部内容引自 https://en.wikipedia.org/w/index.php?title=MediaWiki:Gadget-popups.js&action=raw&ctype=text/javascript * 为了节省流量,已进行Ugli...”) |
(没有差异)
|
2017年1月18日 (三) 13:04的最新版本
/*
* 全部内容引自 https://en.wikipedia.org/w/index.php?title=MediaWiki:Gadget-popups.js&action=raw&ctype=text/javascript
* 为了节省流量,已进行UglifyJS压缩
* 为了不向enwiki请求i18n文件,已将相关条件判断改为false
*/
$(function(){function setupTooltips(a,b,c,d){if(log("setupTooltips, container="+a+", remove="+b),a||(getValueOf("popupOnEditSelection")&&document&&document.editform&&document.editform.wpTextbox1&&(document.editform.wpTextbox1.onmouseup=doSelectionPopup),a=defaultPopupsContainer()),b||c||!a.ranSetupTooltipsAlready){a.ranSetupTooltipsAlready=!b;var e;e=a.getElementsByTagName("A"),setupTooltipsLoop(e,0,250,100,b,d)}}function defaultPopupsContainer(){return getValueOf("popupOnlyArticleLinks")?document.getElementById("mw_content")||document.getElementById("content")||document.getElementById("article")||document:document}function setupTooltipsLoop(a,b,c,d,e,f){var g,h,i,j,k;if(log(simplePrintf("setupTooltipsLoop(%s,%s,%s,%s,%s)",arguments)),g=b+c,h=min(g,a.length),i=h-b,log("setupTooltips: anchors.length="+a.length+", begin="+b+", howmany="+c+", loopend="+h+", remove="+e),j=e?removeTooltip:addTooltip,i>0)do k=a[h-i],"undefined"!=typeof k&&k&&k.href?j(k,f):log("got null anchor at index "+h-i);while(--i);g<a.length?setTimeout(function(){setupTooltipsLoop(a,g,c,d,e,f)},d):(e||getValueOf("popupTocLinks")||rmTocTooltips(),pg.flag.finishedLoading=!0)}function rmTocTooltips(){var b,c,a=document.getElementById("toc");if(a)for(b=a.getElementsByTagName("A"),c=b.length,j=0;c>j;++j)removeTooltip(b[j],!0)}function addTooltip(a,b){isPopupLink(a)&&(a.onmouseover=mouseOverWikiLink,a.onmouseout=mouseOutWikiLink,a.onmousedown=killPopup,a.hasPopup=!0,a.popData=b)}function removeTooltip(a){a.hasPopup&&(a.onmouseover=null,a.onmouseout=null,a.originalTitle&&(a.title=a.originalTitle),a.hasPopup=!1)}function removeTitle(a){a.originalTitle||(a.originalTitle=a.title),a.title=""}function restoreTitle(a){!a.title&&a.originalTitle&&(a.title=a.originalTitle)}function registerHooks(a){var c,b=getValueOf("popupMaxWidth");"number"==typeof b&&(c=function(){a.mainDiv.style.maxWidth=b+"px",a.maxWidth=b;try{a.mainDiv.style.setExpression&&a.mainDiv.style.setExpression("width","document.body.clientWidth > "+b+' ? "'+b+'px": "auto"')}catch(c){errlog("Running on IE8 are we not?: "+c)}},a.addHook(c,"unhide","before")),a.addHook(addPopupShortcuts,"unhide","after"),a.addHook(rmPopupShortcuts,"hide","before")}function mouseOverWikiLink(a){return!a&&window.event&&(a=window.event),mouseOverWikiLink2(this,a)}function footnoteTarget(a){var d,e,f,b=Title.fromAnchor(a),c=b.anchor;if(!/^(cite_note-|_note-|endnote)/.test(c))return!1;if(d=Title.fromURL(location.href),d.toString(!0)!==b.toString(!0))return!1;for(e=document.getElementById(c);e&&"string"==typeof e.nodeName;){if(f=e.nodeName.toLowerCase(),"li"===f)return e;if("body"===f)return!1;if(!e.parentNode)return!1;e=e.parentNode}return!1}function footnotePreview(a,b){setPopupHTML("<hr />"+a.innerHTML,"popupPreview",b.idNumber,getValueOf("popupSubpopups")?function(){setupTooltips(document.getElementById("popupPreview"+b.idNumber))}:null)}function modifierKeyHandler(a){return function(b){var e,c=getValueOf("popupModifier");return c?(!b&&window.event&&(b=window.event),modifierPressed(b),e=getValueOf("popupModifierAction"),"disable"===e&&modifierPressed?!0:"enable"!==e||modifierPressed?(mouseOverWikiLink2(a,b),void 0):!0):!0}}function modifierPressed(a){var b=getValueOf("popupModifier");return b?(!a&&window.event&&(a=window.event),a&&b&&a[b.toLowerCase()+"Key"]):!1}function dealWithModifier(a,b){var c,d,e,f;if(!getValueOf("popupModifier"))return!1;if(c=getValueOf("popupModifierAction"),"enable"==c&&!modifierPressed(b)||"disable"==c&&modifierPressed(b)){if(restoreTitle(a),d="addEventListener",e="removeEventListener",f="",document.addEventListener||(d="attachEvent",e="detachEvent",f="on"),!document[d])return;switch(a.modifierKeyHandler=modifierKeyHandler(a),c){case"enable":document[d](f+"keydown",a.modifierKeyHandler,!1),a[d](f+"mouseout",function(){document[e](f+"keydown",a.modifierKeyHandler,!1)},!0);break;case"disable":document[d](f+"keyup",a.modifierKeyHandler,!1)}return!0}return!1}function mouseOverWikiLink2(a,b){var c,d,e;if(!dealWithModifier(a,b)&&(getValueOf("removeTitles")&&removeTitle(a),a!=pg.current.link||!a.navpopup||!a.navpopup.isVisible()))return pg.current.link=a,getValueOf("simplePopups")&&null===pg.option.popupStructure&&setDefault("popupStructure","original"),c=(new Title).fromAnchor(a),pg.current.article=c,a.navpopup||(a.navpopup=newNavpopup(a,c),pg.current.linksHash[a.href]=a.navpopup,pg.current.links.push(a)),(null===a.navpopup.pending||0!==a.navpopup.pending)&&simplePopupContent(a,c),a.navpopup.showSoonIfStable(a.navpopup.delay),getValueOf("popupInitialWidth"),clearInterval(pg.timer.checkPopupPosition),pg.timer.checkPopupPosition=setInterval(checkPopupPosition,600),getValueOf("simplePopups")?(getValueOf("popupPreviewButton")&&!a.simpleNoMore&&(d=document.createElement("div"),d.className="popupPreviewButtonDiv",e=document.createElement("span"),d.appendChild(e),e.className="popupPreviewButton",e["on"+getValueOf("popupPreviewButtonEvent")]=function(){a.simpleNoMore=!0,nonsimplePopupContent(a,c)},e.innerHTML=popupString("show preview"),setPopupHTML(d,"popupPreview",a.navpopup.idNumber)),void 0):(0!==a.navpopup.pending&&nonsimplePopupContent(a,c),void 0)}function simplePopupContent(a,b){if(a.navpopup.hasPopupMenu=!1,a.navpopup.setInnerHTML(popupHTML(a)),fillEmptySpans({navpopup:a.navpopup}),getValueOf("popupDraggable")){var c=getValueOf("popupDragHandle")||null;c&&"all"!=c&&(c+=a.navpopup.idNumber),setTimeout(function(){a.navpopup.makeDraggable(c)},150)}getValueOf("popupRedlinkRemoval")&&"new"==a.className&&setPopupHTML("<br>"+popupRedlinkHTML(b),"popupRedlink",a.navpopup.idNumber)}function debugData(a){getValueOf("popupDebugging")&&a.idNumber&&setPopupHTML("idNumber="+a.idNumber+", pending="+a.pending,"popupError",a.idNumber)}function newNavpopup(a,b){var c=new Navpopup;return c.fuzz=5,c.delay=1e3*getValueOf("popupDelay"),c.idNumber=++pg.idNumber,c.parentAnchor=a,c.parentPopup=a.popData&&a.popData.owner,c.article=b,registerHooks(c),c}function nonsimplePopupContent(a,b){var g,c=null,d=null,e=parseParams(a.href),f="undefined"==typeof e.oldid?null:e.oldid;getValueOf("popupPreviewDiffs")&&(c=e.diff),getValueOf("popupPreviewHistory")&&(d="history"==e.action),a.navpopup.pending=0,(g=footnoteTarget(a))?footnotePreview(g,a.navpopup):c||0===c?loadDiff(b,f,c,a.navpopup):d?loadAPIPreview("history",b,a.navpopup):pg.re.contribs.test(a.href)?loadAPIPreview("contribs",b,a.navpopup):pg.re.backlinks.test(a.href)?loadAPIPreview("backlinks",b,a.navpopup):b.namespaceId()!=pg.nsImageId||!getValueOf("imagePopupsForImages")&&anchorContainsImage(a)?(b.namespaceId()==pg.nsCategoryId&&getValueOf("popupCategoryMembers")?loadAPIPreview("category",b,a.navpopup):b.namespaceId()!=pg.nsUserId&&b.namespaceId()!=pg.nsUsertalkId||!getValueOf("popupUserInfo")||loadAPIPreview("userinfo",b,a.navpopup),startArticlePreview(b,f,a.navpopup)):(loadAPIPreview("imagepagepreview",b,a.navpopup),loadImage(b,a.navpopup))}function pendingNavpopTask(a){a&&null===a.pending&&(a.pending=0),++a.pending,debugData(a)}function completedNavpopTask(a){a&&a.pending&&--a.pending,debugData(a)}function startArticlePreview(a,b,c){c.redir=0,loadPreview(a,b,c)}function loadPreview(a,b,c){if(pendingNavpopTask(c),c.redir||(c.originalArticle=a),!c.visible&&getValueOf("popupLazyDownloads")){var d=c.redir?"DOWNLOAD_PREVIEW_REDIR_HOOK":"DOWNLOAD_PREVIEW_HOOK";c.addHook(function(){return getWiki(a,insertPreview,b,c),!0},"unhide","before",d)}else getWiki(a,insertPreview,b,c)}function loadPreviewFromRedir(a,b){var e,c=(new Title).fromWikiText(a[2]);return b.article.anchor&&(c.anchor=b.article.anchor),a[4],b.redir++,b.redirTarget=c,e=redirLink(c,b.article),setPopupHTML(e,"popupWarnRedir",b.idNumber),b.article=c,fillEmptySpans({redir:!0,redirTarget:c,navpopup:b}),loadPreview(c,null,b)}function insertPreview(a){var b,c;if(a.owner)return b=pg.re.redirect.exec(a.data),0===a.owner.redir&&b?(completedNavpopTask(a.owner),loadPreviewFromRedir(b,a.owner),void 0):(a.owner.visible||!getValueOf("popupLazyPreviews")?insertPreviewNow(a):(c=a.owner.redir?"PREVIEW_REDIR_HOOK":"PREVIEW_HOOK",a.owner.addHook(function(){return insertPreviewNow(a),!0},"unhide","after",c)),void 0)}function insertPreviewNow(a){var b,c,d,f;a.owner&&(b=a.data,c=a.owner,completedNavpopTask(c),d=c.redirTarget||c.originalArticle,makeFixDabs(b,c),getValueOf("popupSummaryData")&&(getPageInfo(b,a),setPopupTrailer(getPageInfo(b,a),c.idNumber)),f="",f=d.namespaceId()==pg.nsImageId?d.toString():getValidImageFromWikiText(b),f&&loadImage(Title.fromWikiText(f),c),getValueOf("popupPreviews")&&insertArticlePreview(a,d,c))}function insertArticlePreview(a,b,c){var d,e;a&&"string"==typeof a.data&&(b.namespaceId()==pg.nsTemplateId&&getValueOf("popupPreviewRawTemplates")?(d='<hr /><span style="font-family: monospace;">'+a.data.entify().split("\\n").join("<br />\\n")+"</span>",setPopupHTML(d,"popupPreview",c.idNumber)):(e=prepPreviewmaker(a.data,b,c),e.showPreview()))}function prepPreviewmaker(a,b,c){var d=anchorize(a,b.anchorString()),e=joinPath([pg.wiki.articlebase,b.urlString()]),f=new Previewmaker(d,e,c);return f}function anchorize(a,b){var c,d,e,f;if(!b)return a;if(c=RegExp("(?:=+\\s*"+literalizeRegex(b).replace(/[_ ]/g,"[_ ]")+"\\s*=+|\\{\\{\\s*"+getValueOf("popupAnchorRegexp")+"\\s*(?:\\|[^|}]*)*?\\s*"+literalizeRegex(b)+"\\s*(?:\\|[^}]*)?}})"),d=a.match(c),d&&d.length>0&&d[0])return a.substring(a.indexOf(d[0]));for(e=a.split("\n"),f=0;f<e.length;++f)if(e[f]=e[f].replace(RegExp("[[]{2}([^|\\]]*?[|])?(.*?)[\\]]{2}","g"),"$2").replace(/'''([^'])/g,"$1").replace(RegExp("''([^'])","g"),"$1"),e[f].match(c))return a.split("\n").slice(f).join("\n").replace(RegExp("^[^=]*"),"");return a}function killPopup(){return getValueOf("popupShortcutKeys")&&rmPopupShortcuts(),pg?(pg.current.link&&pg.current.link.navpopup&&pg.current.link.navpopup.banish(),pg.current.link=null,abortAllDownloads(),null!==pg.timer.checkPopupPosition&&(clearInterval(pg.timer.checkPopupPosition),pg.timer.checkPopupPosition=null),!0):void 0}function Drag(){this.startCondition=null,this.endHook=null}function copyStructure(a,b){pg.structures[b]={};for(var c in pg.structures[a])pg.structures[b][c]=pg.structures[a][c]}function menuTitle(a){return'<a href="#" noPopup=1>'+popupString(a)+"</a>"}function substitute(a,b){var c=RegExp(b.from,b.flags);return a.replace(c,b.to)}function execCmds(a,b){for(var c=0;c<b.length;++c)a=b[c].action(a,b[c]);return a}function parseCmd(a){if(!a.length)return[];var b=!1;switch(a.charAt(0)){case"s":b=parseSubstitute(a);break;default:return!1}return b?[b].concat(parseCmd(b.remainder)):!1}function unEscape(a,b){return a.split("\\\\").join("\\").split("\\"+b).join(b).split("\\n").join("\n")}function parseSubstitute(a){var b,c,d,e,f;return a.length<4?!1:(f=a.charAt(1),a=a.substring(2),(e=skipOver(a,f))?(b=e.segment,a=e.remainder,(e=skipOver(a,f))?(c=e.segment,a=e.remainder,d="",a.length&&(e=skipOver(a,";")||skipToEnd(a,";"),e&&(d=e.segment,a=e.remainder)),{action:substitute,from:b,to:c,flags:d,remainder:a}):!1):!1)}function skipOver(a,b){var d,c=findNext(a,b);return 0>c?!1:(d=unEscape(a.substring(0,c),b),{segment:d,remainder:a.substring(c+1)})}function skipToEnd(a){return{segment:a,remainder:""}}function findNext(a,b){for(var c=0;c<a.length;++c)if("\\"==a.charAt(c)&&(c+=2),a.charAt(c)==b)return c;return-1}function setCheckbox(a,b){var c=mw.util.getParamValue(a);if(null!==c)switch(c){case"1":case"yes":case"true":b.checked=!0;break;case"0":case"no":case"false":b.checked=!1}}function autoEdit(){var a,b,d,e,f,g,h;if(setupPopups.completed||setupPopups(),!mw.config.get("wgEnableAPI")||mw.util.getParamValue("autoimpl")!==popupString("autoedit_version"))return!1;if(mw.util.getParamValue("autowatchlist")&&mw.util.getParamValue("actoken")===autoClickToken()&&pg.fn.modifyWatchlist(mw.util.getParamValue("title"),mw.util.getParamValue("action")),!document.editform)return!1;if(autoEdit.alreadyRan)return!1;if(autoEdit.alreadyRan=!0,a=mw.util.getParamValue("autoedit")){try{b=document.editform.wpTextbox1}catch(c){return}d=parseCmd(a),e=b.value,f=execCmds(e,d),b.value=f,"undefined"!=typeof wikEdUseWikEd&&wikEdUseWikEd===!0&&WikEdUpdateFrame()}setCheckbox("autominor",document.editform.wpMinoredit),setCheckbox("autowatch",document.editform.wpWatchthis),g=mw.util.getParamValue("autorv"),g?(h=pg.wiki.apiwikibase+"?action=query&format=json&prop=revisions&revids="+g,startDownload(h,null,autoEdit2)):autoEdit2()}function autoEdit2(a){var e,f,g,b=mw.util.getParamValue("autosummary"),c=mw.util.getParamValue("autosummaryprompt"),d="";if(a&&a.data&&mw.util.getParamValue("autorv")&&(e=getRvSummary(b,a.data),e===!1?(c=!0,d=popupString("Failed to get revision information, please edit manually.\n\n"),b=simplePrintf(b,[mw.util.getParamValue("autorv"),"(unknown)","(unknown)"])):b=e),c){if(f=d+popupString("Enter a non-empty edit summary or press cancel to abort"),g=prompt(f,b),!g)return;b=g}b&&(document.editform.wpSummary.value=b),setTimeout(autoEdit3,100)}function autoClickToken(){return mw.user.sessionId()}function autoEdit3(){var a,b,c;mw.util.getParamValue("actoken")==autoClickToken()&&(a=mw.util.getParamValue("autoclick"),a&&(document.editform&&document.editform[a]?(b=document.editform[a],c=tprintf("The %s button has been automatically clicked. Please wait for the next page to load.",[b.value]),bannerMessage(c),document.title="("+document.title+")",b.click()):alert(tprintf("Could not find button %s. Please check the settings in your javascript file.",[a]))))}function bannerMessage(a){var c,b=document.getElementsByTagName("h1");b&&(c=document.createElement("div"),c.innerHTML="<font size=+1><b>"+a+"</b></font>",b[0].parentNode.insertBefore(c,b[0]))}function getRvSummary(a,b){var c,d,f;try{c=getJsObj(b),d=anyChild(c.query.pages).revisions[0]}catch(e){return!1}return f=d.timestamp.split(/[A-Z]/g).join(" ").replace(/^ *| *$/g,""),simplePrintf(a,[d.revid,f,d.user])}function Downloader(a){"undefined"!=typeof XMLHttpRequest&&(this.http=new XMLHttpRequest),this.url=a,this.id=null,this.lastModified=null,this.callbackFunction=null,this.onFailure=null,this.aborted=!1,this.method="GET",this.async=!0}function newDownload(a,b,c,d){var f,e=new Downloader(a);return e.http?(e.id=b,e.setTarget(),d||(d=2),f=function(){if(4==e.getReadyState()){delete pg.misc.downloadsInProgress[this.id];try{200==e.getStatus()?(e.data=e.getData(),e.lastModified=e.getLastModifiedDate(),c(e)):"number"==typeof d?d>0&&newDownload(a,b,c,d-1):$.isFunction(d)&&d(e,a,b,c)}catch(f){}}},e.setCallback(f),e):"ohdear"}function fakeDownload(a,b,c,d,e,f){var g=newDownload(a,c);return g.owner=f,g.id=b,g.data=d,g.lastModified=e,c(g)}function startDownload(a,b,c){var d=newDownload(a,b,c);return"string"==typeof d?d:(d.start(),d)}function abortAllDownloads(){for(var a in pg.misc.downloadsInProgress)try{pg.misc.downloadsInProgress[a].aborted=!0,pg.misc.downloadsInProgress[a].abort(),delete pg.misc.downloadsInProgress[a]}catch(b){}}function setupLivePreview(){with(Insta.conf={baseUrl:"",user:{},wiki:{lang:pg.wiki.lang,interwiki:pg.wiki.interwiki,default_thumb_width:180},paths:{articles:pg.wiki.articlePath+"/",math:"/math/",images:"//upload.wikimedia.org/wikipedia/en/",images_fallback:"//upload.wikimedia.org/wikipedia/commons/"},locale:{user:mw.config.get("wgFormattedNamespaces")[pg.nsUserId],image:mw.config.get("wgFormattedNamespaces")[pg.nsImageId],category:mw.config.get("wgFormattedNamespaces")[pg.nsCategoryId],months:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"]}},Insta.conf)user.name=user.name||"Wikipedian",user.signature="[["+locale.user+":"+user.name+"|"+user.name+"]]";Insta.BLOCK_IMAGE=new RegExp("^\\[\\[(?:File|Image|"+Insta.conf.locale.image+"):.*?\\|.*?(?:frame|thumbnail|thumb|none|right|left|center)","i")}function wiki2html(a,b){return Insta.conf.baseUrl=b,Insta.convert(a)}function popupFilterPageSize(a){return formatBytes(a.length)}function popupFilterCountLinks(a){var b=countLinks(a);return String(b)+" "+(1!=b?popupString("wikiLinks"):popupString("wikiLink"))}function popupFilterCountImages(a){var b=countImages(a);return String(b)+" "+(1!=b?popupString("images"):popupString("image"))}function popupFilterCountCategories(a){var b=countCategories(a);return String(b)+" "+(1!=b?popupString("categories"):popupString("category"))}function popupFilterLastModified(a,b){var c=b.lastModified,d=new Date,e=d-c;return c&&getValueOf("popupLastModified")?tprintf("%s old",[formatAge(e)]).replace(RegExp(" ","g")," "):""}function formatAge(a){var j,k,l,m,n,o,p,q,r,b=0+a,c=b,d=1e3,e=60*d,f=60*e,g=24*f,h=7*g,i=(b-b%h)/h;return b-=i*h,j=addunit(i,"week"),k=(b-b%g)/g,b-=k*g,l=addunit(k,"day"),m=(b-b%f)/f,b-=m*f,n=addunit(m,"hour"),o=(b-b%e)/e,b-=o*e,p=addunit(o,"minute"),q=(b-b%d)/d,b-=q*d,r=addunit(q,"second"),c>4*h?j:c>h?j+" "+l:c>g?l+" "+n:c>6*f?n:c>f?n+" "+p:c>10*e?p:c>e?p+" "+r:r}function addunit(a,b){return""+a+" "+(1!=a?popupString(b+"s"):popupString(b))}function runPopupFilters(a,b,c){var e,f,d=[];for(e=0;e<a.length;++e)a[e]&&"function"==typeof a[e]&&(f=a[e](b,c,c.owner.article),f&&d.push(f));return d}function getPageInfo(a,b){var c,d,e,f;return a&&0!==a.length?(c=getValueOf("popupFilters")||[],d=getValueOf("extraPopupFilters")||[],e=runPopupFilters(c.concat(d),a,b),f=e.join(", "),""!==f&&(f=upcaseFirst(f)),f):popupString("Empty page")}function countLinks(a){return a.split("[[").length-1}function countImages(a){return(a.parenSplit(pg.re.image).length-1)/(pg.re.imageBracketCount+1)}function countCategories(a){return(a.parenSplit(pg.re.category).length-1)/(pg.re.categoryBracketCount+1)}function popupFilterStubDetect(a,b,c){var d=stubCount(a,c);return d.real?popupString("stub"):d.sect?popupString("section stub"):""}function popupFilterDisambigDetect(a,b,c){return getValueOf("popupOnlyArticleDabStub")&&c.namespace()?"":isDisambig(a,c)?popupString("disambig"):""}function formatBytes(a){return a>949?Math.round(a/100)/10+popupString("kB"):a+" "+popupString("bytes")}function Stringwrapper(){this.indexOf=function(a){return this.toString().indexOf(a)},this.toString=function(){return this.value},this.parenSplit=function(a){return this.toString().parenSplit(a)},this.substring=function(a,b){return"undefined"==typeof b?this.toString().substring(a):this.toString().substring(a,b)},this.split=function(a){return this.toString().split(a)},this.replace=function(a,b){return this.toString().replace(a,b)}}function Title(a){this.value=null,this.anchor="",this.setUtf(a)}function parseParams(a){var c,d,e,f,g,h,i,b=pg.re.specialdiff.exec(a);if(null!==b){if(c=b[1].split("/"),1==c.length)return{oldid:c[0],diff:"prev"};if(2==c.length)return{oldid:c[0],diff:c[1]}}if(d={},-1==a.indexOf("?"))return d;for(a=a.split("#")[0],e=a.split("?").slice(1).join(),f=e.split("&"),g=0;g<f.length;++g)h=f[g].split("="),h.push(null),d[h[0]]=h[1];return d.diff&&"undefined"==typeof d.oldid&&(d.oldid="prev"),!d.oldid||"prev"!==d.oldid&&"next"!==d.oldid&&"cur"!==d.oldid||(i=d.diff,d.diff=d.oldid,d.oldid=i),d}function myDecodeURI(a){var b,d,e,f;try{b=decodeURI(a.toString())}catch(c){return a}for(d=0;d<pg.misc.decodeExtras.length;++d)e=pg.misc.decodeExtras[d].from,f=pg.misc.decodeExtras[d].to,b=b.split(e).join(f);return b}function safeDecodeURI(a){var b=myDecodeURI(a);return b||a}function isDisambig(a,b){return!getValueOf("popupAllDabsStubs")&&b.namespace()?!1:!b.isTalkPage()&&pg.re.disambig.test(a)}function stubCount(a,b){var c,d,e,f;if(!getValueOf("popupAllDabsStubs")&&b.namespace())return!1;if(c=0,d=0,pg.re.stub.test(a))for(e=a.parenSplit(pg.re.stub),f=1;f<e.length;f+=2)e[f]?++c:++d;return{real:d,sect:c}}function isValidImageName(a){return-1==a.indexOf("{")}function isInStrippableNamespace(a){return""!==a.namespace()}function isInMainNamespace(a){return!isInStrippableNamespace(a)}function anchorContainsImage(a){if(null===a)return!1;kids=a.childNodes;for(var b=0;b<kids.length;++b)if("IMG"==kids[b].nodeName)return!0;return!1}function isPopupLink(a){if(markNopopupSpanLinks.done||markNopopupSpanLinks(),a.inNopopupSpan)return!1;if(a.onmousedown||a.getAttribute("nopopup"))return!1;var b=a.href;return b===document.location.href+"#"?!1:pg.re.basenames.test(b)?pg.re.urlNoPopup.test(b)?(pg.re.email.test(b)||pg.re.contribs.test(b)||pg.re.backlinks.test(b)||pg.re.specialdiff.test(b))&&-1==b.indexOf("&limit="):!0:!1}function markNopopupSpanLinks(){var a,b,c,d;for(getValueOf("popupOnlyArticleLinks")||fixVectorMenuPopups(),a=$(".nopopups").toArray(),b=0;b<a.length;++b)for(c=a[b].getElementsByTagName("a"),d=0;d<c.length;++d)c[d].inNopopupSpan=!0;markNopopupSpanLinks.done=!0}function fixVectorMenuPopups(){$("div.vectorMenu h3:first a:first").prop("inNopopupSpan",!0)}function getWiki(a,b,c,d){var e=pg.wiki.titlebase;a.namespaceId()>=0&&(e+=a.removeAnchor().urlString()),(c||0===c||"0"===c)&&(e+="&oldid="+c),e+="&action=raw&ctype=text/css&maxage=0&smaxage=0",getPageWithCaching(e,b,d)}function getPageWithCaching(a,b,c){var d,e;log("getPageWithCaching, url="+a),d=findInPageCache(a),d>-1?e=fakeDownload(a,c.idNumber,b,pg.cache.pages[d].data,pg.cache.pages[d].lastModified,c):(e=getPage(a,b,c),e&&c&&c.addDownload&&(c.addDownload(e),e.owner=c))}function getPage(a,b,c){log("getPage");var d=function(a){a.aborted||(addPageToCache(a),b(a))};return startDownload(a,c.idNumber,d)}function findInPageCache(a){for(var b=0;b<pg.cache.pages.length;++b)if(a==pg.cache.pages[b].url)return b;return-1}function addPageToCache(a){log("addPageToCache "+a.url);var b={url:a.url,data:a.data,lastModified:a.lastModified};return pg.cache.pages.push(b)}function hex_md5(a){return rstr2hex(rstr_md5(str2rstr_utf8(a)))}function rstr_md5(a){return binl2rstr(binl_md5(rstr2binl(a),8*a.length))}function rstr2hex(a){var d,e,b=hexcase?"0123456789ABCDEF":"0123456789abcdef",c="";for(e=0;e<a.length;e++)d=a.charCodeAt(e),c+=b.charAt(15&d>>>4)+b.charAt(15&d);return c}function str2rstr_utf8(a){for(var d,e,b="",c=-1;++c<a.length;)d=a.charCodeAt(c),e=c+1<a.length?a.charCodeAt(c+1):0,d>=55296&&56319>=d&&e>=56320&&57343>=e&&(d=65536+((1023&d)<<10)+(1023&e),c++),127>=d?b+=String.fromCharCode(d):2047>=d?b+=String.fromCharCode(192|31&d>>>6,128|63&d):65535>=d?b+=String.fromCharCode(224|15&d>>>12,128|63&d>>>6,128|63&d):2097151>=d&&(b+=String.fromCharCode(240|7&d>>>18,128|63&d>>>12,128|63&d>>>6,128|63&d));return b}function rstr2binl(a){var c,b=Array(a.length>>2);for(c=0;c<b.length;c++)b[c]=0;for(c=0;c<8*a.length;c+=8)b[c>>5]|=(255&a.charCodeAt(c/8))<<c%32;return b}function binl2rstr(a){var c,b="";for(c=0;c<32*a.length;c+=8)b+=String.fromCharCode(255&a[c>>5]>>>c%32);return b}function binl_md5(a,b){var c,d,e,f,g,h,i,j,k;for(a[b>>5]|=128<<b%32,a[(b+64>>>9<<4)+14]=b,c=1732584193,d=-271733879,e=-1732584194,f=271733878,g=0;g<a.length;g+=16)h=c,i=d,j=e,k=f,c=md5_ff(c,d,e,f,a[g+0],7,-680876936),f=md5_ff(f,c,d,e,a[g+1],12,-389564586),e=md5_ff(e,f,c,d,a[g+2],17,606105819),d=md5_ff(d,e,f,c,a[g+3],22,-1044525330),c=md5_ff(c,d,e,f,a[g+4],7,-176418897),f=md5_ff(f,c,d,e,a[g+5],12,1200080426),e=md5_ff(e,f,c,d,a[g+6],17,-1473231341),d=md5_ff(d,e,f,c,a[g+7],22,-45705983),c=md5_ff(c,d,e,f,a[g+8],7,1770035416),f=md5_ff(f,c,d,e,a[g+9],12,-1958414417),e=md5_ff(e,f,c,d,a[g+10],17,-42063),d=md5_ff(d,e,f,c,a[g+11],22,-1990404162),c=md5_ff(c,d,e,f,a[g+12],7,1804603682),f=md5_ff(f,c,d,e,a[g+13],12,-40341101),e=md5_ff(e,f,c,d,a[g+14],17,-1502002290),d=md5_ff(d,e,f,c,a[g+15],22,1236535329),c=md5_gg(c,d,e,f,a[g+1],5,-165796510),f=md5_gg(f,c,d,e,a[g+6],9,-1069501632),e=md5_gg(e,f,c,d,a[g+11],14,643717713),d=md5_gg(d,e,f,c,a[g+0],20,-373897302),c=md5_gg(c,d,e,f,a[g+5],5,-701558691),f=md5_gg(f,c,d,e,a[g+10],9,38016083),e=md5_gg(e,f,c,d,a[g+15],14,-660478335),d=md5_gg(d,e,f,c,a[g+4],20,-405537848),c=md5_gg(c,d,e,f,a[g+9],5,568446438),f=md5_gg(f,c,d,e,a[g+14],9,-1019803690),e=md5_gg(e,f,c,d,a[g+3],14,-187363961),d=md5_gg(d,e,f,c,a[g+8],20,1163531501),c=md5_gg(c,d,e,f,a[g+13],5,-1444681467),f=md5_gg(f,c,d,e,a[g+2],9,-51403784),e=md5_gg(e,f,c,d,a[g+7],14,1735328473),d=md5_gg(d,e,f,c,a[g+12],20,-1926607734),c=md5_hh(c,d,e,f,a[g+5],4,-378558),f=md5_hh(f,c,d,e,a[g+8],11,-2022574463),e=md5_hh(e,f,c,d,a[g+11],16,1839030562),d=md5_hh(d,e,f,c,a[g+14],23,-35309556),c=md5_hh(c,d,e,f,a[g+1],4,-1530992060),f=md5_hh(f,c,d,e,a[g+4],11,1272893353),e=md5_hh(e,f,c,d,a[g+7],16,-155497632),d=md5_hh(d,e,f,c,a[g+10],23,-1094730640),c=md5_hh(c,d,e,f,a[g+13],4,681279174),f=md5_hh(f,c,d,e,a[g+0],11,-358537222),e=md5_hh(e,f,c,d,a[g+3],16,-722521979),d=md5_hh(d,e,f,c,a[g+6],23,76029189),c=md5_hh(c,d,e,f,a[g+9],4,-640364487),f=md5_hh(f,c,d,e,a[g+12],11,-421815835),e=md5_hh(e,f,c,d,a[g+15],16,530742520),d=md5_hh(d,e,f,c,a[g+2],23,-995338651),c=md5_ii(c,d,e,f,a[g+0],6,-198630844),f=md5_ii(f,c,d,e,a[g+7],10,1126891415),e=md5_ii(e,f,c,d,a[g+14],15,-1416354905),d=md5_ii(d,e,f,c,a[g+5],21,-57434055),c=md5_ii(c,d,e,f,a[g+12],6,1700485571),f=md5_ii(f,c,d,e,a[g+3],10,-1894986606),e=md5_ii(e,f,c,d,a[g+10],15,-1051523),d=md5_ii(d,e,f,c,a[g+1],21,-2054922799),c=md5_ii(c,d,e,f,a[g+8],6,1873313359),f=md5_ii(f,c,d,e,a[g+15],10,-30611744),e=md5_ii(e,f,c,d,a[g+6],15,-1560198380),d=md5_ii(d,e,f,c,a[g+13],21,1309151649),c=md5_ii(c,d,e,f,a[g+4],6,-145523070),f=md5_ii(f,c,d,e,a[g+11],10,-1120210379),e=md5_ii(e,f,c,d,a[g+2],15,718787259),d=md5_ii(d,e,f,c,a[g+9],21,-343485551),c=safe_add(c,h),d=safe_add(d,i),e=safe_add(e,j),f=safe_add(f,k);return Array(c,d,e,f)}function md5_cmn(a,b,c,d,e,f){return safe_add(bit_rol(safe_add(safe_add(b,a),safe_add(d,f)),e),c)}function md5_ff(a,b,c,d,e,f,g){return md5_cmn(b&c|~b&d,a,b,e,f,g)}function md5_gg(a,b,c,d,e,f,g){return md5_cmn(b&d|c&~d,a,b,e,f,g)}function md5_hh(a,b,c,d,e,f,g){return md5_cmn(b^c^d,a,b,e,f,g)}function md5_ii(a,b,c,d,e,f,g){return md5_cmn(c^(b|~d),a,b,e,f,g)}function safe_add(a,b){var c=(65535&a)+(65535&b),d=(a>>16)+(b>>16)+(c>>16);return d<<16|65535&c}function bit_rol(a,b){return a<<b|a>>>32-b}function nonGlobalRegex(a){var c,d,b=a.toString();for(flags="",c=b.length;"/"!=b.charAt(c);--c)"g"!=b.charAt(c)&&(flags+=b.charAt(c));return d=b.substring(1,c),RegExp(d,flags)}function getJsObj(a){var b,d;try{b=JSON.parse(a)}catch(c){return errlog("Something went wrong with getJsobj, json="+a),1}if(b["warnings"])for(d=0;d<b["warnings"].length;d++)log(b["warnings"][d]["*"]);else b["error"]&&errlog(b["error"].code+": "+b["error"].info);return b}function anyChild(a){for(var b in a)return a[b];return null}function decode_utf8(a){for(var b="",c=0,d=0,f=0;c<a.length;)d=a.charCodeAt(c),128>d?(b+=String.fromCharCode(d),c++):d>191&&224>d?(f=a.charCodeAt(c+1),b+=String.fromCharCode((31&d)<<6|63&f),c+=2):(f=a.charCodeAt(c+1),c3=a.charCodeAt(c+2),b+=String.fromCharCode((15&d)<<12|(63&f)<<6|63&c3),c+=3);return b}function upcaseFirst(a){return"string"!=typeof a||""==a?"":a.charAt(0).toUpperCase()+a.substring(1)}function literalizeRegex(a){return a.replace(RegExp("([-.|()\\\\+?*^${}\\[\\]])","g"),"\\$1")}function findThis(a,b){if("undefined"==typeof a.length)return null;for(var c=0;c<a.length;++c)if(a[c]==b)return c;return null}function removeNulls(a){var c,b=[];for(c=0;c<a.length;++c)a[c]&&b.push(a[c]);return b}function joinPath(a){return removeNulls(a).join("/")}function simplePrintf(a,b){var c,d,e,f,g;if(!a||!b)return a;c=[],d=a.parenSplit(/(%s|\$[0-9]+)/),e=0;do{if(c.push(d.shift()),!d.length)break;f=d.shift(),"%s"==f?(e<b.length?c.push(b[e]):c.push(f),++e):(g=parseInt(f.replace("$",""),10)-1,g>-1&&g<b.length?c.push(b[g]):c.push(f))}while(d.length>0);return c.join("")}function max(a,b){return b>a?b:a}function min(a,b){return a>b?b:a}function isString(a){return"string"==typeof a||a instanceof String}function isRegExp(a){return a instanceof RegExp}function isArray(a){return a instanceof Array}function repeatString(a,b){var d,c="";for(d=0;b>d;++d)c+=a;return c}function zeroFill(a,b){b=b||2;var c=a.toString();return repeatString("0",b-c.length)+c}function map(a,b){return isArray(b)?map_array(a,b):map_object(a,b)}function map_array(a,b){var d,c=[];for(d=0;d<b.length;++d)c.push(a(b[d]));return c}function map_object(a,b){var d,c={};for(d in b)c[b]=a(b[d]);return c}function retargetDab(a,b,c,d){return log("retargetDab: newTarget="+a+" oldTarget="+b),changeLinkTargetLink({newTarget:a,text:a.split(" ").join(" "),hint:tprintf("disambigHint",[a]),summary:simplePrintf(getValueOf("popupFixDabsSummary"),[c,a]),clickButton:getValueOf("popupDabsAutoClick"),minor:!0,oldTarget:b,watch:getValueOf("popupWatchDisambiggedPages"),title:d})}function listLinks(a,b,c){var j,k,l,d=RegExp("\\[\\[([^|]*?) *(\\||\\]\\])","gi"),e=[],f=a.parenSplit(d),g=RegExp("^[a-z]*:|^[Ss]pecial:|^[Ii]mage|^[Cc]ategory"),h=b.toString(),i=getValueOf("popupDabWiktionary");for(j=1;j<f.length;j+=3)"string"==typeof f[j]&&f[j].length>0&&!g.test(f[j])&&e.push(retargetDab(f[j],b,h,c));return e=rmDupesFromSortedList(e.sort()),i&&(k="wiktionary:"+h.replace(RegExp("^(.+)\\s+[(][^)]+[)]\\s*$"),"$1"),l="first"==i.toLowerCase()?"unshift":"push",e[l](retargetDab(k,b,h,c))),e.push(changeLinkTargetLink({newTarget:null,text:popupString("remove this link").split(" ").join(" "),hint:popupString("remove all links to this disambig page from this article"),clickButton:"wpDiff",oldTarget:b,summary:simplePrintf(getValueOf("popupRmDabLinkSummary"),[h]),watch:getValueOf("popupWatchDisambiggedPages"),title:c})),e}function rmDupesFromSortedList(a){var c,b=[];for(c=0;c<a.length;++c)(0===b.length||a[c]!=b[b.length-1])&&b.push(a[c]);return b}function makeFixDab(a,b){var e,c=b.parentPopup&&b.parentPopup.article.toString(),d=listLinks(a,b.originalArticle,c);return 0===d.length?(log("listLinks returned empty list"),null):(e="<hr />"+popupString("Click to disambiguate this link to:")+"<br>",e+=d.join(", "))}function makeFixDabs(a,b){getValueOf("popupFixDabs")&&isDisambig(a,b.article)&&Title.fromURL(location.href).namespaceId()!=pg.nsSpecialId&&b.article.talkPage()&&setPopupHTML(makeFixDab(a,b),"popupFixDab",b.idNumber)}function popupRedlinkHTML(a){return changeLinkTargetLink({newTarget:null,text:popupString("remove this link").split(" ").join(" "),hint:popupString("remove all links to this page from this article"),clickButton:"wpDiff",oldTarget:a.toString(),summary:simplePrintf(getValueOf("popupRedlinkSummary"),[a.toString()])})}function setPopupHTML(a,b,c,d,e){"undefined"==typeof c&&(c=pg.idNumber);var f=document.getElementById(b+c);return f?(e||(f.innerHTML=""),isString(a)?f.innerHTML+=a:f.appendChild(a),d&&d(),setTimeout(checkPopupPosition,100),!0):(setTimeout(function(){setPopupHTML(a,b,c,d)},600),null)}function setPopupTrailer(a,b){return setPopupHTML(a,"popupData",b)}function fillEmptySpans(a){return fillEmptySpans2(a)}function fillEmptySpans2(a){var c,d,e,f,g,h,i,j,k,l,m,n,o,p,b=!0;if("object"==typeof a&&"undefined"!=typeof a.redir&&a.redir||(b=!1),c=a.navpopup.parentAnchor,e=null,f=null,g={},b&&typeof a.redirTarget==typeof{}?d=a.redirTarget:(d=(new Title).fromAnchor(c),e=c.originalTitle||d.hintValue(),g=parseParams(c.href),f=getValueOf("popupHistoricalLinks")?g.oldid:null,rcid=g.rcid),h={article:d,hint:e,oldid:f,rcid:rcid,navpop:a.navpopup,params:g},i=pg.structures[getValueOf("popupStructure")],"object"!=typeof i)return setPopupHTML("popupError","Unknown structure (this should never happen): "+pg.option.popupStructure,a.navpopup.idNumber),void 0;for(j=flatten(pg.misc.layout),k=j.length,l=pg.misc.redirSpans,m=0;k>m;++m)if(n=findThis(l,j[m]),!(null!==n&&!b||null===n&&b))switch(o=i[j[m]],p=setPopupHTML,!getValueOf("popupActiveNavlinks")||0!=j[m].indexOf("popupTopLinks")&&0!=j[m].indexOf("popupRedirTopLinks")||(p=setPopupTipsAndHTML),typeof o){case"function":p(o(h),j[m],a.navpopup.idNumber);break;case"string":p(o,j[m],a.navpopup.idNumber);break;default:errlog("unknown thing with label "+j[m])}}function flatten(a,b){var d,c=[];for("undefined"==typeof b&&(b=0),d=b;d<a.length;++d){if(typeof a[d]==typeof[])return c.concat(flatten(a[d])).concat(flatten(a,d+1));c.push(a[d])}return c}function popupHTML(a){getValueOf("popupStructure");var b=pg.structures[pg.option.popupStructure];return"object"!=typeof b?(pg.option.popupStructure=pg.optionDefault.popupStructure,popupHTML(a)):"function"!=typeof b.popupLayout?"Bad layout":(pg.misc.layout=b.popupLayout(),pg.misc.redirSpans=$.isFunction(b.popupRedirSpans)?b.popupRedirSpans():[],makeEmptySpans(pg.misc.layout,a.navpopup))
}function makeEmptySpans(a,b){var d,c="";for(d=0;d<a.length;++d)"string"==typeof a[d]?c+=emptySpanHTML(a[d],b.idNumber,"div"):typeof a[d]==typeof[]&&a[d].length>0?c=c.parenSplit(RegExp("(</[^>]*?>$)")).join(makeEmptySpans(a[d],b)):typeof a[d]==typeof{}&&a[d].nodeType&&(c+=emptySpanHTML(a[d].name,b.idNumber,a[d].nodeType));return c}function emptySpanHTML(a,b,c,d){return c=c||"span",d||(d=emptySpanHTML.classAliases[a]),d=d||a,a==getValueOf("popupDragHandle")&&(d+=" popupDragHandle"),simplePrintf('<%s id="%s" class="%s"></%s>',[c,a+b,d,c])}function imageHTML(a,b){return simplePrintf('<a id="popupImageLink$1"><img align="right" valign="top" id="popupImg$1" style="display: none;"></img></a>',[b])}function popTipsSoonFn(a,b,c){b||(b=250);var d=function(){setupTooltips(document.getElementById(a),!1,!0,c)};return function(){setTimeout(d,b,c)}}function setPopupTipsAndHTML(a,b,c,d){setPopupHTML(a,b,c,getValueOf("popupSubpopups")?popTipsSoonFn(b+c,null,d):null)}function fuzzyCursorOffMenus(a,b,c,d){var e,f;if(!d)return null;for(e=d.getElementsByTagName("ul"),f=0;f<e.length;++f)if("popup_menu"==e[f].className&&e[f].offsetWidth>0)return!1;return!0}function checkPopupPosition(){pg.current.link&&pg.current.link.navpopup&&pg.current.link.navpopup.limitHorizontalPosition()}function mouseOutWikiLink(){var a=this;if(null!=a.navpopup){if(!a.navpopup.isVisible())return a.navpopup.banish(),void 0;restoreTitle(a),Navpopup.tracker.addHook(posCheckerHook(a.navpopup))}}function posCheckerHook(a){return function(){var b,c,d,e,f;return a.isVisible()?Navpopup.tracker.dirty?!1:(b=Navpopup.tracker.x,c=Navpopup.tracker.y,d=a.isWithin(b,c,a.fuzz,a.mainDiv)||!fuzzyCursorOffMenus(b,c,a.fuzz,a.mainDiv),e=getValueOf("popupHideDelay"),e&&(e=1e3*e),e?(f=+new Date,a.mouseLeavingTime?d?(a.mouseLeavingTime=null,!1):f-a.mouseLeavingTime>e?(a.mouseLeavingTime=null,a.banish(),!0):!1:(a.mouseLeavingTime=f,!1)):d?!1:(a.parentAnchor&&restoreTitle(a.parentAnchor),a.banish(),!0)):!0}}function runStopPopupTimer(a){a.stopPopupTimer||(a.stopPopupTimer=setInterval(posCheckerHook(a),500),a.addHook(function(){clearInterval(a.stopPopupTimer)},"hide","before"))}function Previewmaker(a,b,c){this.originalData=a,this.setData(),this.baseUrl=b,this.owner=c,this.maxCharacters=getValueOf("popupMaxPreviewCharacters"),this.maxSentences=getValueOf("popupMaxPreviewSentences")}function loadAPIPreview(a,b,c){var g,h,i,j,k,d=new Title(b).urlString(),e=pg.wiki.apiwikibase+"?format=json&action=query&",f=function(){alert("invalid html generator")};switch(a){case"history":e+="meta=userinfo&uiprop=options&titles="+d+"&prop=revisions&rvlimit="+getValueOf("popupHistoryPreviewLimit"),f=APIhistoryPreviewHTML;break;case"category":e+="list=categorymembers&rawcontinue=&cmtitle="+d,f=APIcategoryPreviewHTML;break;case"userinfo":g=new Title(b).userName(),h=encodeURIComponent(g),e+=pg.re.ipUser.test(g)?"list=blocks&bkprop=range&bkip="+h:"list=users&usprop=blockinfo|groups|editcount|registration&ususers="+h+"&meta=globaluserinfo&guiprop=groups|unattached&guiuser="+h,f=APIuserInfoPreviewHTML;break;case"contribs":h=encodeURIComponent(new Title(b).userName()),e+="list=usercontribs&meta=userinfo&uiprop=options&ucuser="+h+"&uclimit="+getValueOf("popupContribsPreviewLimit"),f=APIcontribsPreviewHTML;break;case"imagepagepreview":i="",getValueOf("popupImageLinks")&&(i="&list=imageusage&iutitle="+d),e+="titles="+d+"&prop=revisions|imageinfo&rvprop=content"+i,f=APIimagepagePreviewHTML;break;case"backlinks":e+="list=backlinks&rawcontinue=&bltitle="+d,f=APIbacklinksPreviewHTML}pendingNavpopTask(c),mw.config.get("wgEnableAPI")||(f=function(){return'This function of navigation popups now requires a MediaWiki installation with the <a href="http://www.mediawiki.org/wiki/API">API</a> enabled.'}),j=function(d){log("callback of API functions was hit"),showAPIPreview(a,f(b,d,c),c.idNumber,c,d)},pg.flag.isIE&&(e+="&*"),k=function(){return getPageWithCaching(e,j,c),!0},c.visible||!getValueOf("popupLazyDownloads")?k():c.addHook(k,"unhide","before","DOWNLOAD_"+a+"_QUERY_DATA")}function linkList(a){var b,c;for(a.sort(function(a,b){return a==b?0:b>a?-1:1}),b=[],c=0;c<a.length;++c)b.push(wikiLink({article:new Title(a[c]),text:a[c].split(" ").join(" "),action:"view"}));return b.join(", ")}function getTimeOffset(a){if(a){if(a.indexOf("|")>-1)return parseInt(a.split("|")[1],10);if(a.indexOf(":")>-1)return 60*parseInt(a,10)+parseInt(a.split(":")[1],10)}return 0}function editPreviewTable(a,b,c,d){var h,i,j,k,l,m,n,o,p,q,r,e=["<table>"],f=null,g=a;for(h=0;h<b.length;++h)c&&(i=b[h]["title"],g=new Title(i)),j="undefined"==typeof b[h]["minor"]?"":"<b>m </b>",k=adjustDate(getDateFromTimestamp(b[h].timestamp),d),l=dayFormat(k),m=timeFormat(k),l==f?l="":f=l,l&&e.push('<tr><td colspan=3><span class="popup_history_date">'+l+"</span></td></tr>"),e.push('<tr class="popup_history_row_'+(h%2?"odd":"even")+'">'),e.push('<td>(<a href="'+pg.wiki.titlebase+new Title(g).urlString()+"&diff=prev&oldid="+b[h]["revid"]+'">'+popupString("last")+"</a>)</td>"),e.push('<td><a href="'+pg.wiki.titlebase+new Title(g).urlString()+"&oldid="+b[h]["revid"]+'">'+m+"</a></td>"),n="",o="",c?(n=pg.wiki.titlebase+g.urlString(),o=pg.escapeQuotesHTML(i)):(p=b[h]["user"],"undefined"==typeof b[h]["userhidden"]?(n=pg.re.ipUser.test(p)?pg.wiki.titlebase+mw.config.get("wgFormattedNamespaces")[pg.nsSpecialId]+":Contributions&target="+new Title(p).urlString():pg.wiki.titlebase+mw.config.get("wgFormattedNamespaces")[pg.nsUserId]+":"+new Title(p).urlString(),o=pg.escapeQuotesHTML(p)):(n=getValueOf("popupRevDelUrl"),o=pg.escapeQuotesHTML(popupString("revdel")))),e.push("<td>"+(c?j:"")+'<a href="'+n+'">'+o+"</a></td>"),q="",r=b[h].comment||b[h]["*"],r?q=new Previewmaker(r,new Title(g).toUrl()).editSummaryPreview():"undefined"!=typeof b[h]["commenthidden"]&&(q=popupString("revdel")),e.push("<td>"+(c?"":j)+q+"</td>"),e.push("</tr>"),e=[e.join("")];return e.push("</table>"),e.join("")}function getDateFromTimestamp(a){var b=a.split(/[^0-9]/);switch(b.length){case 0:return null;case 1:return new Date(b[0]);case 2:return new Date(b[0],b[1]-1);case 3:return new Date(b[0],b[1]-1,b[2]);case 4:return new Date(b[0],b[1]-1,b[2],b[3]);case 5:return new Date(b[0],b[1]-1,b[2],b[3],b[4]);case 6:return new Date(b[0],b[1]-1,b[2],b[3],b[4],b[5]);default:return new Date(b[0],b[1]-1,b[2],b[3],b[4],b[5],b[6])}}function adjustDate(a,b){var c=1e3*60*b;return new Date(+a+c)}function dayFormat(a,b){return b?map(zeroFill,[a.getUTCFullYear(),a.getUTCMonth()+1,a.getUTCDate()]).join("-"):map(zeroFill,[a.getFullYear(),a.getMonth()+1,a.getDate()]).join("-")}function timeFormat(a,b){return b?map(zeroFill,[a.getUTCHours(),a.getUTCMinutes(),a.getUTCSeconds()]).join(":"):map(zeroFill,[a.getHours(),a.getMinutes(),a.getSeconds()]).join(":")}function showAPIPreview(a,b,c,d){var f="popupPreview";switch(a){case"imagelinks":case"category":case"userinfo":f="popupPostPreview"}setPopupTipsAndHTML(b,f,c),completedNavpopTask(d)}function APIbacklinksPreviewHTML(a,b){var d,e,g,h,i;try{d=getJsObj(b.data),e=d.query.backlinks}catch(f){return"backlinksPreviewHTML went wonky"}if(g=[],!e)return popupString("No backlinks found");for(h=0;h<e.length;h++)i=new Title(e[h]["title"]),g.push('<a href="'+pg.wiki.titlebase+i.urlString()+'">'+i+"</a>");return g=g.join(", "),d["query-continue"]&&d["query-continue"].backlinks&&d["query-continue"].backlinks.blcontinue&&(g+=popupString(" and more")),g}function APIimagepagePreviewHTML(a,b,c){var d,e,f,h,i,k,l,m,n,o;try{d=getJsObj(b.data),e=anyChild(d.query.pages),f=e&&e.revisions?e.revisions[0]["*"]:null}catch(g){return"API imagepage preview failed :("}h="",i="";try{i=c.parentAnchor.childNodes[0].alt}catch(j){}return i&&(h=h+"<hr /><b>"+popupString("Alt text:")+"</b> "+pg.escapeQuotesHTML(i)),f&&(k=prepPreviewmaker(f,a,c),k.makePreview(),k.html&&(h+="<hr />"+k.html)),null!==f&&getValueOf("popupSummaryData")&&(l=getPageInfo(f,b),log(l),setPopupTrailer(l,c.idNumber)),e&&"shared"==e.imagerepository&&(m=new Title(a),n=encodeURIComponent("File:"+m.stripNamespace()),o=pg.wiki.apicommonsbase+"?format=json&callback=pg.fn.APIsharedImagePagePreviewHTML"+"&requestid="+c.idNumber+"&action=query&prop=revisions&rvprop=content&titles="+n,pg.flag.isIE&&(o+="&*"),h=h+"<hr />"+popupString("Image from Commons")+': <a href="'+pg.wiki.commonsbase+"?title="+n+'">'+popupString("Description page")+"</a>",mw.loader.load(o)),showAPIPreview("imagelinks",APIimagelinksPreviewHTML(a,b),c.idNumber,b),h}function APIimagelinksPreviewHTML(a,b){var c,d,f,g;try{if(c=getJsObj(b.data),d=c.query.imageusage,!d)return popupString("No image links found")}catch(e){return"Image links preview generation failed :("}for(f=[],g=0;g<d.length;g++)f.push(d[g]["title"]);return 0===f.length?popupString("No image links found"):"<h2>"+popupString("File links")+"</h2>"+linkList(f)}function APIcategoryPreviewHTML(a,b){var c,d,f,g;try{c=getJsObj(b.data),d=c.query.categorymembers}catch(e){return"Category preview failed :("}for(f=[],g=0;g<d.length;g++)f.push(d[g]["title"]);return 0===f.length?popupString("Empty category"):(f="<h2>"+tprintf("Category members (%s shown)",[f.length])+"</h2>"+linkList(f),c["query-continue"]&&c["query-continue"].categorymembers&&c["query-continue"].categorymembers.cmcontinue&&(f+=popupString(" and more")),f)}function APIuserInfoPreviewHTML(a,b){var d,f,g,h,i,c=[];try{d=getJsObj(b.data).query}catch(e){return"Userinfo preview failed :("}if(f=anyChild(d.users)){if(g=d.globaluserinfo,""==f.invalid?c.push(popupString("Invalid user")):""==f.missing&&c.push(popupString("Not a registered username")),f.blockedby&&c.push("<b>"+popupString("BLOCKED")+"</b>"),g&&(null!=g.locked||null!=g.hidden)){for(h=!0,i=0;g.unattached&&i<g.unattached.length;i++)if(g.unattached[i].wiki===mw.config.get("wgDBname")){h=!1;break}h&&(null!=g.locked&&c.push("<b><i>"+popupString("LOCKED")+"</i></b>"),null!=g.hidden&&c.push("<b><i>"+popupString("HIDDEN")+"</i></b>"))}for(i=0;f.groups&&i<f.groups.length;i++)switch(f.groups[i]){case"*":case"user":case"autoconfirmed":break;default:c.push(pg.escapeQuotesHTML(f.groups[i]))}for(i=0;g&&g.groups&&i<g.groups.length;i++)c.push("<i>"+pg.escapeQuotesHTML(g.groups[i])+"</i>");(f.editcount||f.registration)&&c.push(pg.escapeQuotesHTML((f.editcount?f.editcount:"")+popupString(" edits since: ")+(f.registration?dayFormat(getDateFromTimestamp(f.registration)):"")))}if(d.blocks)for(c.push(popupString("IP user")),i=0;i<d.blocks.length;i++)c.push("<b>"+popupString(d.blocks[i].rangestart===d.blocks[i].rangeend?"BLOCKED":"RANGEBLOCKED")+"</b>");return c="<hr />"+c.join(", ")}function APIcontribsPreviewHTML(a,b,c){return APIhistoryPreviewHTML(a,b,c,!0)}function APIhistoryPreviewHTML(a,b,c,d){var e,f,g,i,j;try{e=getJsObj(b.data),f=e.query.userinfo.options.timecorrection,g=d?e.query.usercontribs:anyChild(e.query.pages)["revisions"]}catch(h){return"History preview failed :-("}return i=getTimeOffset(f),Cookie.create("popTz",i,1),j=editPreviewTable(a,g,d,i)}function setupDebugging(){window.popupDebug?(window.log=function(a){window.console.log(a)},window.errlog=function(a){window.console.error(a)},log("Initializing logger")):(window.log=function(){},window.errlog=function(){})}function loadImage(a,b){var c,d,e,f;if("function"!=typeof a.stripNamespace&&alert("loadImages bad"),getValueOf("popupImages")&&mw.config.get("wgEnableAPI")){if(!isValidImageName(a))return!1;c=a.urlString(),d=pg.wiki.apiwikibase+"?format=json&action=query",d+="&prop=imageinfo&iiprop=url|mime&iiurlwidth="+getValueOf("popupImageSizeLarge"),d+="&titles="+c,pg.flag.isIE&&(d+="&*"),pendingNavpopTask(b),e=function(a){popupsInsertImage(b.idNumber,b,a)},f=function(){return getPageWithCaching(d,e,b),!0},b.visible||!getValueOf("popupLazyDownloads")?f():b.addHook(f,"unhide","after","DOWNLOAD_IMAGE_QUERY_DATA")}}function popupsInsertImage(a,b,c){var d,e,f,h,i;log("popupsInsertImage");try{if(d=getJsObj(c.data),e=anyChild(d.query.pages),"undefined"==typeof e.imageinfo)return;f=e.imageinfo[0]}catch(g){return log("popupsInsertImage failed :("),void 0}if(h=document.getElementById("popupImg"+a),!h)return log("could not find insertion point for image"),void 0;if(h.width=getValueOf("popupImageSize"),h.style.display="inline",f.thumburl?h.src=f.thumburl:0==f.mime.indexOf("image")?(h.src=f.url,log("a thumb could not be found, using original image")):log("fullsize imagethumb, but not sure if it's an image"),i=document.getElementById("popupImageLink"+a),null===i)return null;switch(getValueOf("popupThumbAction")){case"imagepage":if(pg.current.article.namespaceId()!=pg.nsImageId){i.href=f.descriptionurl,popTipsSoonFn("popupImage"+a)();break}case"sizetoggle":return i.onclick=toggleSize,i.title=popupString("Toggle image size"),void 0;case"linkfull":return i.href=f.url,i.title=popupString("Open full-size image"),void 0}}function toggleSize(){var a=this;return a?(img=a.firstChild)?(img.style.width=img.style.width&&""!=img.style.width?"":"100%",void 0):(alert("img is null :/"),void 0):(alert("imgContainer is null :/"),void 0)}function getValidImageFromWikiText(a){for(var c,e,b=null,d=removeMatchesUnless(a,RegExp("(<!--[\\s\\S]*?-->)"),1,RegExp("^<!--[^[]*popup","i"));c=pg.re.image.exec(d);)if(e=c[2]||c[6],isValidImageName(e)){b=e;break}return pg.re.image.lastIndex=0,b?mw.config.get("wgFormattedNamespaces")[pg.nsImageId]+":"+upcaseFirst(b):null}function removeMatchesUnless(a,b,c,d){var g,e=a.parenSplit(b),f=c+1;for(g=0;g<e.length;++g)0===g%f||d.test(e[g])||(e[g]="");return e.join("")}function setNamespaces(){pg.nsSpecialId=-1,pg.nsMainspaceId=0,pg.nsImageId=6,pg.nsUserId=2,pg.nsUsertalkId=3,pg.nsCategoryId=14,pg.nsTemplateId=10}function setRedirs(){var a="redirect",b="REDIRECT",c={ar:[b,"تحويل"],be:[a,"перанакіраваньне"],bg:[a,"пренасочване","виж"],bs:[a,"Preusmjeri","preusmjeri","PREUSMJERI"],cs:[b,"PŘESMĚRUJ"],cy:[a,"ail-cyfeirio"],de:[b,"WEITERLEITUNG"],el:[b,"ΑΝΑΚΑΤΕΥΘΥΝΣΗ"],eo:[b,"ALIDIREKTU","ALIDIREKTI"],es:[b,"REDIRECCIÓN"],et:[a,"suuna"],ga:[a,"athsheoladh"],gl:[a,"REDIRECCIÓN","REDIRECIONAMENTO"],he:[b,"הפניה"],hu:[b,"ÁTIRÁNYÍTÁS"],is:[a,"tilvísun","TILVÍSUN"],it:[b,"RINVIA","Rinvia"],ja:[b,"転送"],mk:[a,"пренасочување","види"],nds:[a,"wiederleiden"],nl:[b,"DOORVERWIJZING"],nn:[a,"omdiriger"],pl:[b,"PATRZ","PRZEKIERUJ","TAM"],pt:[b,"redir"],ru:[b,"ПЕРЕНАПРАВЛЕНИЕ","ПЕРЕНАПР"],sk:[a,"presmeruj"],sr:[a,"Преусмери","преусмери","ПРЕУСМЕРИ","Preusmeri","preusmeri","PREUSMERI"],tt:[b,"yünältü","перенаправление","перенапр"],uk:[b,"ПЕРЕНАПРАВЛЕННЯ","ПЕРЕНАПР"],vi:[a,"đổi"],zh:[b,"重定向"]},d=c[pg.wiki.lang]||[a,b];pg.re.redirect=RegExp("^\\s*[#]("+d.join("|")+").*?\\[{2}([^\\|\\]]*)(|[^\\]]*)?\\]{2}\\s*(.*)","i")}function setInterwiki(){pg.wiki.wikimedia?(pg.wiki.interwiki="aa|ab|ace|af|ak|als|am|an|ang|ar|arc|arz|as|ast|av|ay|az|ba|bar|bat-smg|bcl|be|be-x-old|bg|bh|bi|bjn|bm|bn|bo|bpy|br|bs|bug|bxr|ca|cbk-zam|cdo|ce|ceb|ch|cho|chr|chy|ckb|co|cr|crh|cs|csb|cu|cv|cy|da|de|diq|dsb|dv|dz|ee|el|eml|en|eo|es|et|eu|ext|fa|ff|fi|fiu-vro|fj|fo|fr|frp|frr|fur|fy|ga|gag|gan|gd|gl|glk|gn|got|gu|gv|ha|hak|haw|he|hi|hif|ho|hr|hsb|ht|hu|hy|hz|ia|id|ie|ig|ii|ik|ilo|io|is|it|iu|ja|jbo|jv|ka|kaa|kab|kbd|kg|ki|kj|kk|kl|km|kn|ko|koi|kr|krc|ks|ksh|ku|kv|kw|ky|la|lad|lb|lbe|lg|li|lij|lmo|ln|lo|lt|ltg|lv|map-bms|mdf|mg|mh|mhr|mi|mk|ml|mn|mo|mr|mrj|ms|mt|mus|mwl|my|myv|mzn|na|nah|nap|nds|nds-nl|ne|new|ng|nl|nn|no|nov|nrm|nv|ny|oc|om|or|os|pa|pag|pam|pap|pcd|pdc|pfl|pi|pih|pl|pms|pnb|pnt|ps|pt|qu|rm|rmy|rn|ro|roa-rup|roa-tara|ru|rue|rw|sa|sah|sc|scn|sco|sd|se|sg|sh|si|simple|sk|sl|sm|sn|so|sq|sr|srn|ss|st|stq|su|sv|sw|szl|ta|te|tet|tg|th|ti|tk|tl|tn|to|tpi|tr|ts|tt|tum|tw|ty|udm|ug|uk|ur|uz|ve|vec|vi|vls|vo|wa|war|wo|wuu|xal|xh|yi|yo|za|zea|zh|zh-classical|zh-min-nan|zh-yue|zu",pg.re.interwiki=RegExp("^"+pg.wiki.interwiki+":")):(pg.wiki.interwiki=null,pg.re.interwiki=RegExp("^$"))}function nsRe(a){var b=[];return jQuery.each(mw.config.get("wgNamespaceIds"),function(c,d){d==a&&(c=upcaseFirst(c),b.push(c.split(" ").join("[ _]")),b.push(encodeURI(c)))}),"(?:"+b.join("|")+")"}function nsReImage(){return nsRe(pg.nsImageId)}function getEditboxSelection(){var a,c,d;try{a=document.editform.wpTextbox1}catch(b){return}return document.selection?document.selection.createRange().text:(c=a.selectionStart,d=a.selectionEnd,a.value.substring(c,d))}function doSelectionPopup(){var e,f,a=getEditboxSelection(),b=a.indexOf("[["),c=a.indexOf("|"),d=a.indexOf("]]");if(!(-1==b||-1==c&&-1==d||-1!=c&&b>c||-1!=d&&b>d)){if("boxpreview"==getValueOf("popupOnEditSelection"))return doSeparateSelectionPopup(a);e=new Title(a.substring(b+2,0>c?d:c)).urlString(),d>0&&a.substring(d+2).indexOf("[[")>=0||(f=document.createElement("a"),f.href=pg.wiki.titlebase+e,mouseOverWikiLink2(f),f.navpopup&&f.navpopup.addHook(function(){runStopPopupTimer(f.navpopup)},"unhide","after"))}}function doSeparateSelectionPopup(a){var c,b=document.getElementById("selectionPreview");if(!b){b=document.createElement("div"),b.id="selectionPreview";try{c=document.editform.wpTextbox1}catch(d){return}c.parentNode.insertBefore(b,c)}b.innerHTML=wiki2html(a),b.ranSetupTooltipsAlready=!1,popTipsSoonFn("selectionPreview")()}function Mousetracker(){this.loopDelay=400,this.timer=null,this.active=!1,this.dirty=!0,this.hooks=[]}function Navpopup(){this.uid=Navpopup.uid++,this.visible=!1,this.noshow=!1,this.hooks={create:[],unhide:[],hide:[]},this.hookIds={},this.downloads=[],this.pending=null,this.fuzz=5,this.constrained=!0,this.width=0,this.height=0,this.mainDiv=null,this.createMainDiv()}function delFmt(a){return a.length?"<del class='popupDiff'>"+a.join("")+"</del>":""}function insFmt(a){return a.length?"<ins class='popupDiff'>"+a.join("")+"</ins>":""}function countCrossings(a,b,c,d){var e,f;if(!b[c].row&&0!==b[c].row)return-1;for(e=0,f=0;f<a.length;++f)if((a[f].row||0===a[f].row)&&(f-b[c].row)*(c-a[f].row)>0){if(d)return!0;e++}return e}function shortenDiffString(a,b){var f,c=RegExp("(<del[\\s\\S]*?</del>|<ins[\\s\\S]*?</ins>)"),d=a.parenSplit(c),e=[""];for(f=0;f<d.length;f+=2)d[f].length<2*b?(e[e.length-1]+=d[f],f+1<d.length&&(e[e.length-1]+=d[f+1])):(f>0&&(e[e.length-1]+=d[f].substring(0,b)),f+1<d.length&&e.push(d[f].substring(d[f].length-b)+d[f+1]));for(;e.length>0&&!e[0];)e=e.slice(1);return e}function diffString(a,b,c){var e,f,g,h,i,j,k,l,d=RegExp("([[]{2}|[\\]]{2}|[{]{2,3}|[}]{2,3}|[|]|=|<|>|[*:]+|\\s|\\b)");for(c?(g=a.split(/\b/),h=b.split(/\b/)):(g=a.parenSplit(d),h=b.parenSplit(d)),f=0;f<g.length;++f)g[f]=g[f].entify();for(f=0;f<h.length;++f)h[f]=h[f].entify();for(e=diff(g,h),i="",j=[],k=0,f=0;f<e.n.length;++f)e.n[f].paired&&(k>e.n[f].row&&(e.o[e.n[f].row]=e.o[e.n[f].row].text,e.n[f]=e.n[f].text),k<e.n[f].row&&(k=e.n[f].row));for(f=0;f<e.o.length&&!e.o[f].paired;++f)j.push(e.o[f]);for(i+=delFmt(j),j=[],f=0;f<e.n.length;++f){for(;f<e.n.length&&!e.n[f].paired;)j.push(e.n[f++]);if(i+=insFmt(j),j=[],f<e.n.length){for(i+=e.n[f].text,l=e.n[f].row+1;l<e.o.length&&!e.o[l].paired;)j.push(e.o[l++]);i+=delFmt(j),j=[]}}return i}function diffBugAlert(a){diffBugAlert.list[a]||(diffBugAlert.list[a]=1,alert("Bad word: "+a+"\n\nPlease report this bug."))}function makeDiffHashtable(a){var c,b={};for(c=0;c<a.length;c++){jsReservedProperties.test(a[c])&&(a[c]+="<!-- -->"),b[a[c]]||(b[a[c]]=[]);try{b[a[c]].push(c)}catch(d){diffBugAlert(a[c])}}return b}function diff(a,b){var e,c=makeDiffHashtable(b),d=makeDiffHashtable(a);for(e in c)1==c[e].length&&d[e]&&1==d[e].length&&(b[c[e][0]]={text:b[c[e][0]],row:d[e][0],paired:!0},a[d[e][0]]={text:a[d[e][0]],row:c[e][0],paired:!0});for(e=0;e<b.length-1;e++)b[e].paired&&!b[e+1].paired&&b[e].row+1<a.length&&!a[b[e].row+1].paired&&b[e+1]==a[b[e].row+1]&&(b[e+1]={text:b[e+1],row:b[e].row+1,paired:!0},a[b[e].row+1]={text:a[b[e].row+1],row:e+1,paired:!0});for(e=b.length-1;e>0;e--)b[e].paired&&!b[e-1].paired&&b[e].row>0&&!a[b[e].row-1].paired&&b[e-1]==a[b[e].row-1]&&(b[e-1]={text:b[e-1],row:b[e].row-1,paired:!0},a[b[e].row-1]={text:a[b[e].row-1],row:e-1,paired:!0});return{o:a,n:b}}function setSiteInfo(){pg.wiki.hostname=window.popupLocalDebug?"en.wikipedia.org":location.hostname,pg.wiki.wikimedia=RegExp("(wiki([pm]edia|source|books|news|quote|versity)|wiktionary|mediawiki)[.]org").test(pg.wiki.hostname),pg.wiki.wikia=RegExp("[.]wikia[.]com$","i").test(pg.wiki.hostname),pg.wiki.isLocal=RegExp("^localhost").test(pg.wiki.hostname),pg.wiki.commons=pg.wiki.wikimedia&&"commons.wikimedia.org"!=pg.wiki.hostname?"commons.wikimedia.org":null,pg.wiki.lang=mw.config.get("wgContentLanguage");var a=location.port?":"+location.port:"";pg.wiki.sitebase=pg.wiki.hostname+a}function setTitleBase(){var b,a=window.popupLocalDebug?"http:":location.protocol;pg.wiki.articlePath=mw.config.get("wgArticlePath").replace(/\/\$1/,""),pg.wiki.botInterfacePath=mw.config.get("wgScript"),pg.wiki.APIPath=mw.config.get("wgScriptPath")+"/api.php",b=pg.wiki.botInterfacePath+"?title=",pg.wiki.titlebase=a+"//"+pg.wiki.sitebase+b,pg.wiki.wikibase=a+"//"+pg.wiki.sitebase+pg.wiki.botInterfacePath,pg.wiki.apiwikibase=a+"//"+pg.wiki.sitebase+pg.wiki.APIPath,pg.wiki.articlebase=a+"//"+pg.wiki.sitebase+pg.wiki.articlePath,pg.wiki.commonsbase=a+"//"+pg.wiki.commons+pg.wiki.botInterfacePath,pg.wiki.apicommonsbase=a+"//"+pg.wiki.commons+pg.wiki.APIPath,pg.re.basenames=RegExp("^("+map(literalizeRegex,[pg.wiki.titlebase,pg.wiki.articlebase]).join("|")+")")}function setMainRegex(){var c,a="[^:]*://",b=literalizeRegex(mw.config.get("wgScriptPath"))+"/(?:index[.]php|wiki[.]phtml)[?]title=";b+="|"+literalizeRegex(pg.wiki.articlePath+"/"),c="("+b+")([^&?#]*)[^#]*(?:#(.+))?",pg.re.main=RegExp(a+literalizeRegex(pg.wiki.sitebase)+c)}function setRegexps(){var a,b;setMainRegex(),a=nsRe(pg.nsSpecialId),pg.re.urlNoPopup=RegExp("((title=|/)"+a+"(?:%3A|:)|section=[0-9]|^#$)"),pg.re.contribs=RegExp("(title=|/)"+a+"(?:%3A|:)Contributions"+"(&target=|/|/"+mw.config.get("wgFormattedNamespaces")[pg.nsUserId]+":)(.*)"),pg.re.email=RegExp("(title=|/)"+a+"(?:%3A|:)EmailUser"+"(&target=|/|/(?:"+mw.config.get("wgFormattedNamespaces")[pg.nsUserId]+":)?)(.*)"),pg.re.backlinks=RegExp("(title=|/)"+a+"(?:%3A|:)WhatLinksHere"+"(&target=|/)([^&]*)"),pg.re.specialdiff=RegExp("/"+a+"(?:%3A|:)Diff/([^?#]*)"),b=nsReImage(),pg.re.image=RegExp("(^|\\[\\[)"+b+": *([^|\\]]*[^|\\] ])"+"([^0-9\\]]*([0-9]+) *px)?|(?:\\n *[|]?|[|]) *"+"("+getValueOf("popupImageVarsRegexp")+")"+" *= *(?:\\[\\[ *)?(?:"+b+":)?"+"([^|]*?)(?:\\]\\])? *[|]? *\\n","img"),pg.re.imageBracketCount=6,pg.re.category=RegExp("\\[\\["+nsRe(pg.nsCategoryId)+": *([^|\\]]*[^|\\] ]) *","i"),pg.re.categoryBracketCount=1,pg.re.ipUser=RegExp("^(?::(?::|(?::[0-9A-Fa-f]{1,4}){1,7})|[0-9A-Fa-f]{1,4}(?::[0-9A-Fa-f]{1,4}){0,6}::|[0-9A-Fa-f]{1,4}(?::[0-9A-Fa-f]{1,4}){7})|(((25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\\.){3}(25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9]))$"),pg.re.stub=RegExp(getValueOf("popupStubRegexp"),"im"),pg.re.disambig=RegExp(getValueOf("popupDabRegexp"),"im"),pg.re.oldid=RegExp("[?&]oldid=([^&]*)"),pg.re.diff=RegExp("[?&]diff=([^&]*)")}function setupCache(){pg.cache.pages=[]}function setMisc(){pg.current.link=null,pg.current.links=[],pg.current.linksHash={},setupCache(),pg.timer.checkPopupPosition=null,pg.counter.loop=0,pg.idNumber=0,pg.misc.decodeExtras=[{from:"%2C",to:","},{from:"_",to:" "},{from:"%24",to:"$"},{from:"%26",to:"&"}]}function setBrowserHacks(){var b,c,a=!1;"undefined"!=typeof window.opera?(a=!0,setDefault("popupNavLinkSeparator"," · ")):"Konqueror"==navigator.appName?(setDefault("popupNavLinkSeparator"," • "),pg.flag.isKonq=!0):navigator.vendor&&0===navigator.vendor.toLowerCase().indexOf("apple computer")?(pg.flag.isSafari=!0,b=+navigator.userAgent.replace(RegExp("^.*AppleWebKit[/](\\d+).*","i"),"$1"),420>b&&(a=!0)):-1!=navigator.appName.indexOf("Microsoft")&&(setDefault("popupNavLinkSeparator"," · "),c=+navigator.userAgent.replace(RegExp("^.*MSIE (\\d+).*"),"$1"),pg.flag.isIE=!0,pg.flag.IEVersion=c),pg.flag.isIE&&pg.flag.IEVersion<8&&(a=!0),(pg.flag.isIE&&pg.flag.IEVersion<7||pg.flag.isKonq||pg.flag.isSafari&&420>b)&&(pg.flag.linksLikeIE6=!0),a&&pg.structures.original&&setDefault("popupStructure","original")}function setupPopups(a){mw.loader.using("mediawiki.user",function(){setupDebugging(),setSiteInfo(),setTitleBase(),setOptions(),setNamespaces(),setInterwiki(),setRegexps(),setRedirs(),setBrowserHacks(),setMisc(),setupLivePreview(),setupTooltips(),Navpopup.tracker.enable(),setupPopups.completed=!0,$.isFunction(a)&&a()})}function defaultNavlinkSpec(){var b,c,d,e,a="";return a+="<b><<mainlink|shortcut= >></b>",getValueOf("popupLastEditLink")&&(a+="*<<lastEdit|shortcut=/>>|<<lastContrib>>|<<sinceMe>>if(oldid){|<<oldEdit>>|<<diffCur>>}"),a+="if(user){<br><<contribs|shortcut=c>>*<<userlog|shortcut=L|log>>",a+="if(ipuser){*<<arin>>}if(wikimedia){*<<count|shortcut=#>>}",a+="if(ipuser){}else{*<<email|shortcut=E>>}if(admin){*<<block|shortcut=b>>|<<blocklog|log>>}}",b="<<edit|shortcut=e>>",c="if(oldid){<<editOld|shortcut=e>>|<<revert|shortcut=v|rv>>|<<edit|cur>>}else{"+b+"}",d="<<history|shortcut=h>>if(mainspace_en){|<<editors|shortcut=E|>>}",e="<<unwatch|unwatchShort>>|<<watch|shortcut=w|watchThingy>>",a+="<br>if(talk){"+c+"|<<new|shortcut=+>>"+"*"+d+"*"+e+"*"+"<b><<article|shortcut=a>></b>|<<editArticle|edit>>"+"}else{"+c+"*"+d+"*"+e+"*"+"<b><<talk|shortcut=t>></b>|<<editTalk|edit>>|<<newTalk|shortcut=+|new>>"+"}",a+="<br><<whatLinksHere|shortcut=l>>*<<relatedChanges|shortcut=r>>*<<move|shortcut=m>>",a+="if(admin){<br><<unprotect|unprotectShort>>|<<protect|shortcut=p>>|<<protectlog|log>>*<<undelete|undeleteShort>>|<<delete|shortcut=d>>|<<deletelog|log>>}"}function navLinksHTML(a,b,c){var d='<span class="popupNavLinks">'+defaultNavlinkSpec()+"</span>";return navlinkStringToHTML(d,a,c)}function expandConditionalNavlinkString(a,b,c,d){var h,i,j,k,l,m,n,o,p,e=c.oldid,f=c.rcid,g=c.diff;for("number"!=typeof d&&(d=0),h=RegExp("(;?\\s*if\\s*\\(\\s*([\\w]*)\\s*\\)\\s*\\{([^{}]*)\\}(\\s*else\\s*\\{([^{}]*?)\\}|))","i"),i=a.parenSplit(h),j=5,k=i[0],l=1;l<i.length;l=l+j+1){switch(m=i[l+2-1],n=i[l+3-1],o=i[l+5-1],"undefined"!=typeof o&&o||(o=""),p=null,m){case"user":p=b.userName()?!0:!1;break;case"talk":p=b.talkPage()?!1:!0;break;case"admin":p=getValueOf("popupAdminLinks")?!0:!1;break;case"oldid":p="undefined"!=typeof e&&e?!0:!1;break;case"rcid":p="undefined"!=typeof f&&f?!0:!1;break;case"ipuser":p=b.isIpUser()?!0:!1;break;case"mainspace_en":p=isInMainNamespace(b)&&"en.wikipedia.org"==pg.wiki.hostname;break;case"wikimedia":p=pg.wiki.wikimedia?!0:!1;break;case"diff":p="undefined"!=typeof g&&g?!0:!1}switch(p){case null:k+=i[l];break;case!0:k+=n;break;case!1:k+=o}k+=i[l+j]}return h.test(k)&&10>d?expandConditionalNavlinkString(k,b,c,d+1):k}function navlinkStringToArray(a,b,c){var d,e,f,g,h,i,j,k,l,m;for(a=expandConditionalNavlinkString(a,b,c),d=a.parenSplit(RegExp("<<(.*?)>>")),e=[],f=0;f<d.length;++f)if(f%2){for(g=new navlinkTag,h=d[f].split("|"),g.id=h[0],i=1;i<h.length;++i)j=h[i].split("="),j.length>1?g[j[0]]=j[1]:g.text=popupString(j[0]);g.article=b,k=c.oldid,l=c.rcid,m=c.diff,"undefined"!=typeof k&&null!=k&&(g.oldid=k),"undefined"!=typeof l&&null!=l&&(g.rcid=l),"undefined"!=typeof m&&null!=m&&(g.diff=m),g.text||"mainlink"==g.id||(g.text=popupString(g.id)),e.push(g)}else e.push(d[f]);return e}function navlinkSubstituteHTML(a){return a.split("*").join(getValueOf("popupNavLinkSeparator")).split("<menurow>").join('<li class="popup_menu_row">').split("</menurow>").join("</li>").split("<menu>").join('<ul class="popup_menu">').split("</menu>").join("</ul>")}function navlinkDepth(a,b){return b.split("<"+a+">").length-b.split("</"+a+">").length}function navlinkStringToHTML(a,b,c){var i,d=navlinkStringToArray(a,b,c),e="",f=0,g=0;for(i=0;i<d.length;++i)"string"==typeof d[i]?(e+=navlinkSubstituteHTML(d[i]),f+=navlinkDepth("menu",d[i]),g+=navlinkDepth("menurow",d[i])):"undefined"!=typeof d[i].type&&"navlinkTag"==d[i].type&&(e+=f>0&&0===g?'<li class="popup_menu_item">'+d[i].html()+"</li>":d[i].html());return e}function navlinkTag(){this.type="navlinkTag"}function popupHandleKeypress(a){var c,d,e,f,g,b=window.event?window.event.keyCode:a.keyCode?a.keyCode:a.which;if(b&&pg.current.link&&pg.current.link.navpopup){if(27==b)return killPopup(),!1;if(c=String.fromCharCode(b),d=pg.current.link.navpopup.mainDiv.getElementsByTagName("A"),e=0,popupHandleKeypress.lastPopupLinkSelected)for(f=0;f<d.length;++f)d[f]==popupHandleKeypress.lastPopupLinkSelected&&(e=f);for(g=0;g<d.length;++g)if(f=(e+g+1)%d.length,d[f].getAttribute("popupkey")==c)return a&&a.preventDefault&&a.preventDefault(),d[f].focus(),popupHandleKeypress.lastPopupLinkSelected=d[f],!1;return document.oldPopupOnkeypress?document.oldPopupOnkeypress(a):!0}}function addPopupShortcuts(){document.onkeypress!=popupHandleKeypress&&(document.oldPopupOnkeypress=document.onkeypress),document.onkeypress=popupHandleKeypress}function rmPopupShortcuts(){popupHandleKeypress.lastPopupLinkSelected=null;try{if(document.oldPopupOnkeypress&&document.oldPopupOnkeypress==popupHandleKeypress)return document.onkeypress=null,void 0;document.onkeypress=document.oldPopupOnkeypress}catch(a){}}function addLinkProperty(a,b){var c=a.indexOf(">");return 0>c?a:a.substring(0,c)+" "+b+a.substring(c)}function addPopupShortcut(a,b){if(!getValueOf("popupShortcutKeys"))return a;var c=addLinkProperty(a,'popupkey="'+b+'"');return" "==b&&(b=popupString("spacebar")),c.replace(RegExp('^(.*?)(title=")(.*?)(".*)$',"i"),"$1$2$3 ["+b+"]$4")}function loadDiff(a,b,c,d){var e,f,g;switch(d.diffData={},c){case"cur":switch(b){case null:case"":case"prev":e="0&direction=prev",f=0;break;default:e=b,f=(b||0)+"&direction=cur"}break;case"prev":e=(b||0)+"&direction=prev",f=b;break;case"next":e=b,f=b+"&direction=next";break;default:e=b||0,f=c||0}e=e||0,f=f||0,g=function(){pendingNavpopTask(d),getWiki(a,doneDiffNew,f,d),pendingNavpopTask(d),getWiki(a,doneDiffOld,e,d);var b=Cookie.read("popTz");return mw.config.get("wgEnableAPI")&&getValueOf("popupAdjustDiffDates")&&null===b&&(pendingNavpopTask(d),getPageWithCaching(pg.wiki.apiwikibase+"?format=json&action=query&meta=userinfo&uiprop=options",function(a){completedNavpopTask(d),setTimecorrectionCookie(a),diffDownloadsComplete(d)&&insertDiff(d)},d)),!0},d.visible||!getValueOf("popupLazyDownloads")?g():d.addHook(g,"unhide","before","DOWNLOAD_DIFFS")}function setTimecorrectionCookie(a){var b,c;try{b=getJsObj(a.data),c=b.query.userinfo.options.timecorrection}catch(d){return logerr("setTimecorretion failed"),void 0}Cookie.create("popTz",getTimeOffset(c),1)}function doneDiff(a,b){var c,d;a.owner&&a.owner.diffData&&(c=a.owner,d=b?"Old":"New",c.diffData[d]=a,completedNavpopTask(a.owner),diffDownloadsComplete(c)&&insertDiff(c))}function diffDownloadsComplete(a){return null===Cookie.read("popTz")?!1:a.diffData.Old&&a.diffData.New}function doneDiffNew(a){doneDiff(a,!1)}function doneDiffOld(a){doneDiff(a,!0)}function rmBoringLines(a,b,c){var d,e,f,g,h,i;for("undefined"==typeof c&&(c=2),d=[],e=[],f=[],g=[],h=0;h<a.length;++h)a[h].paired?countCrossings(b,a,h,!0)&&(d[h]=1,f[a[h].row]=1):d[h]=1;for(h=0;h<b.length;++h)1!=f[h]&&(b[h].paired||(f[h]=1));for(h=0;h<b.length;++h)if(1==f[h])for(i=max(0,h-c);i<min(b.length,h+c);++i)f[i]||(f[i]=1,d[b[i].row]=.5);for(h=0;h<a.length;++h)if(1==d[h])for(i=max(0,h-c);i<min(a.length,h+c);++i)d[i]||(d[i]=1,f[a[i].row]=.5);for(h=0;h<f.length;++h)f[h]>0&&(b[h].paired?g.push(b[h].text):g.push(b[h]));for(h=0;h<d.length;++h)d[h]>0&&(a[h].paired?e.push(a[h].text):e.push(a[h]));return{a:e,b:g}}function stripOuterCommonLines(a,b,c){for(var e,f,d=0;d<a.length&&d<b.length&&a[d]==b[d];)++d;for(e=a.length-1,f=b.length-1;e>=0&&f>=0&&a[e]==b[f];)--e,--f;return{a:a.slice(max(0,d-1-c),min(a.length+1,e+c+1)),b:b.slice(max(0,d-1-c),min(b.length+1,f+c+1))}}function insertDiff(a){var e,f,g,h,i,j,k,b=a.diffData.Old.data.split("\n"),c=a.diffData.New.data.split("\n"),d=stripOuterCommonLines(b,c,getValueOf("popupDiffContextLines"));b=d.a,c=d.b,e=!1,getValueOf("popupDiffMaxLines"),(b.length>pg.option.popupDiffMaxLines||c.length>pg.option.popupDiffMaxLines)&&(e=!0,d=stripOuterCommonLines(b.slice(0,pg.option.popupDiffMaxLines),c.slice(0,pg.option.popupDiffMaxLines),pg.option.popupDiffContextLines),b=d.a,c=d.b),f=diff(b,c),g=rmBoringLines(f.o,f.n),h=g.a,i=g.b,j=!String.prototype.parenSplit.isNative,k="<hr />",getValueOf("popupDiffDates")&&(k+=diffDatesTable(a.diffData.Old,a.diffData.New),k+="<hr />"),k+=shortenDiffString(diffString(h.join("\n"),i.join("\n"),j),getValueOf("popupDiffContextCharacters")).join("<hr />"),setPopupTipsAndHTML(k.split("\n").join("<br>")+(e?"<hr /><b>"+popupString("Diff truncated for performance reasons")+"</b>":""),"popupPreview",a.idNumber)
}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§ion=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"," ⋅ "),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 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 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,"&").replace(/</g,"<").replace(/>/g,">")}function k(a){return a.replace(/</g,"<").replace(/>/g,">").replace(/:/g,":").replace(/\[/g,"[").replace(/]/g,"]")}function l(a){return k(a).replace(/'/g,"'").replace(/"/g,""")}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("&").split("<").join("<").split(">").join(">").split('"').join(""")},pg.escapeQuotesHTML=function(a){var b=new RegExp("&","g");return a=a.replace(b,"&"),b=new RegExp('"',"g"),a=a.replace(b,"""),b=new RegExp("<","g"),a=a.replace(b,"<"),b=new RegExp(">","g"),a=a.replace(b,">")},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+'">→</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§ion=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§ion=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 revision":"this 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 page":"user 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}}))}();