CINXE.COM

User:Evad37/rater/sandbox/app.js - Wikipedia

<!DOCTYPE html> <html class="client-nojs vector-feature-language-in-header-enabled vector-feature-language-in-main-page-header-disabled vector-feature-sticky-header-disabled vector-feature-page-tools-pinned-disabled vector-feature-toc-pinned-clientpref-1 vector-feature-main-menu-pinned-disabled vector-feature-limited-width-clientpref-1 vector-feature-limited-width-content-enabled vector-feature-custom-font-size-clientpref-1 vector-feature-appearance-pinned-clientpref-1 vector-feature-night-mode-enabled skin-theme-clientpref-day vector-toc-not-available" lang="en" dir="ltr"> <head> <meta charset="UTF-8"> <title>User:Evad37/rater/sandbox/app.js - Wikipedia</title> <script>(function(){var className="client-js vector-feature-language-in-header-enabled vector-feature-language-in-main-page-header-disabled vector-feature-sticky-header-disabled vector-feature-page-tools-pinned-disabled vector-feature-toc-pinned-clientpref-1 vector-feature-main-menu-pinned-disabled vector-feature-limited-width-clientpref-1 vector-feature-limited-width-content-enabled vector-feature-custom-font-size-clientpref-1 vector-feature-appearance-pinned-clientpref-1 vector-feature-night-mode-enabled skin-theme-clientpref-day vector-toc-not-available";var cookie=document.cookie.match(/(?:^|; )enwikimwclientpreferences=([^;]+)/);if(cookie){cookie[1].split('%2C').forEach(function(pref){className=className.replace(new RegExp('(^| )'+pref.replace(/-clientpref-\w+$|[^\w-]+/g,'')+'-clientpref-\\w+( |$)'),'$1'+pref+'$2');});}document.documentElement.className=className;}());RLCONF={"wgBreakFrames":false,"wgSeparatorTransformTable":["",""],"wgDigitTransformTable":["",""],"wgDefaultDateFormat": "dmy","wgMonthNames":["","January","February","March","April","May","June","July","August","September","October","November","December"],"wgRequestId":"675f96c7-f351-439b-ab0d-0c379be7e133","wgCanonicalNamespace":"User","wgCanonicalSpecialPageName":false,"wgNamespaceNumber":2,"wgPageName":"User:Evad37/rater/sandbox/app.js","wgTitle":"Evad37/rater/sandbox/app.js","wgCurRevisionId":1249460456,"wgRevisionId":1249460456,"wgArticleId":62155311,"wgIsArticle":true,"wgIsRedirect":false,"wgAction":"view","wgUserName":null,"wgUserGroups":["*"],"wgCategories":[],"wgPageViewLanguage":"en","wgPageContentLanguage":"en","wgPageContentModel":"javascript","wgRelevantPageName":"User:Evad37/rater/sandbox/app.js","wgRelevantArticleId":62155311,"wgIsProbablyEditable":false,"wgRelevantPageIsProbablyEditable":false,"wgRestrictionEdit":[],"wgRestrictionMove":[],"wgRelevantUserName":"Evad37","wgNoticeProject":"wikipedia","wgCiteReferencePreviewsActive":false,"wgFlaggedRevsParams":{"tags":{"status":{"levels":1}} },"wgMediaViewerOnClick":true,"wgMediaViewerEnabledByDefault":true,"wgPopupsFlags":0,"wgVisualEditor":{"pageLanguageCode":"en","pageLanguageDir":"ltr","pageVariantFallbacks":"en"},"wgMFDisplayWikibaseDescriptions":{"search":true,"watchlist":true,"tagline":false,"nearby":true},"wgWMESchemaEditAttemptStepOversample":false,"wgWMEPageLength":100000,"wgRelatedArticlesCompat":[],"wgEditSubmitButtonLabelPublish":true,"wgULSPosition":"interlanguage","wgULSisCompactLinksEnabled":false,"wgVector2022LanguageInHeader":true,"wgULSisLanguageSelectorEmpty":false,"wgCheckUserClientHintsHeadersJsApi":["brands","architecture","bitness","fullVersionList","mobile","model","platform","platformVersion"],"GEHomepageSuggestedEditsEnableTopics":true,"wgGETopicsMatchModeEnabled":false,"wgGEStructuredTaskRejectionReasonTextInputEnabled":false,"wgGELevelingUpEnabledForUser":false};RLSTATE={"ext.globalCssJs.user.styles":"ready","site.styles":"ready","user.styles":"ready","ext.globalCssJs.user":"ready","user": "ready","user.options":"loading","mediawiki.action.styles":"ready","ext.pygments":"ready","skins.vector.search.codex.styles":"ready","skins.vector.styles":"ready","skins.vector.icons":"ready","ext.wikimediamessages.styles":"ready","ext.visualEditor.desktopArticleTarget.noscript":"ready","ext.uls.interlanguage":"ready","ext.wikimediaBadges":"ready"};RLPAGEMODULES=["ext.pygments.view","site","mediawiki.page.ready","skins.vector.js","ext.centralNotice.geoIP","ext.centralNotice.startUp","ext.gadget.ReferenceTooltips","ext.gadget.switcher","ext.urlShortener.toolbar","ext.centralauth.centralautologin","mmv.bootstrap","ext.popups","ext.visualEditor.desktopArticleTarget.init","ext.visualEditor.targetLoader","ext.echo.centralauth","ext.eventLogging","ext.wikimediaEvents","ext.navigationTiming","ext.uls.interface","ext.cx.eventlogging.campaigns","ext.checkUser.clientHints"];</script> <script>(RLQ=window.RLQ||[]).push(function(){mw.loader.impl(function(){return["user.options@12s5i",function($,jQuery,require,module){mw.user.tokens.set({"patrolToken":"+\\","watchToken":"+\\","csrfToken":"+\\"}); }];});});</script> <link rel="stylesheet" href="/w/load.php?lang=en&amp;modules=ext.pygments%2CwikimediaBadges%7Cext.uls.interlanguage%7Cext.visualEditor.desktopArticleTarget.noscript%7Cext.wikimediamessages.styles%7Cmediawiki.action.styles%7Cskins.vector.icons%2Cstyles%7Cskins.vector.search.codex.styles&amp;only=styles&amp;skin=vector-2022"> <script async="" src="/w/load.php?lang=en&amp;modules=startup&amp;only=scripts&amp;raw=1&amp;skin=vector-2022"></script> <meta name="ResourceLoaderDynamicStyles" content=""> <link rel="stylesheet" href="/w/load.php?lang=en&amp;modules=site.styles&amp;only=styles&amp;skin=vector-2022"> <meta name="generator" content="MediaWiki 1.44.0-wmf.5"> <meta name="referrer" content="origin"> <meta name="referrer" content="origin-when-cross-origin"> <meta name="robots" content="noindex,follow,max-image-preview:standard"> <meta name="format-detection" content="telephone=no"> <meta name="viewport" content="width=1120"> <meta property="og:title" content="User:Evad37/rater/sandbox/app.js - Wikipedia"> <meta property="og:type" content="website"> <link rel="preconnect" href="//upload.wikimedia.org"> <link rel="alternate" media="only screen and (max-width: 640px)" href="//en.m.wikipedia.org/wiki/User:Evad37/rater/sandbox/app.js"> <link rel="apple-touch-icon" href="/static/apple-touch/wikipedia.png"> <link rel="icon" href="/static/favicon/wikipedia.ico"> <link rel="search" type="application/opensearchdescription+xml" href="/w/rest.php/v1/search" title="Wikipedia (en)"> <link rel="EditURI" type="application/rsd+xml" href="//en.wikipedia.org/w/api.php?action=rsd"> <link rel="canonical" href="https://en.wikipedia.org/wiki/User:Evad37/rater/sandbox/app.js"> <link rel="license" href="https://creativecommons.org/licenses/by-sa/4.0/deed.en"> <link rel="alternate" type="application/atom+xml" title="Wikipedia Atom feed" href="/w/index.php?title=Special:RecentChanges&amp;feed=atom"> <link rel="dns-prefetch" href="//meta.wikimedia.org" /> <link rel="dns-prefetch" href="//login.wikimedia.org"> </head> <body class="skin--responsive skin-vector skin-vector-search-vue mediawiki ltr sitedir-ltr mw-hide-empty-elt ns-2 ns-subject page-User_Evad37_rater_sandbox_app_js rootpage-User_Evad37 skin-vector-2022 action-view"><a class="mw-jump-link" href="#bodyContent">Jump to content</a> <div class="vector-header-container"> <header class="vector-header mw-header"> <div class="vector-header-start"> <nav class="vector-main-menu-landmark" aria-label="Site"> <div id="vector-main-menu-dropdown" class="vector-dropdown vector-main-menu-dropdown vector-button-flush-left vector-button-flush-right" > <input type="checkbox" id="vector-main-menu-dropdown-checkbox" role="button" aria-haspopup="true" data-event-name="ui.dropdown-vector-main-menu-dropdown" class="vector-dropdown-checkbox " aria-label="Main menu" > <label id="vector-main-menu-dropdown-label" for="vector-main-menu-dropdown-checkbox" class="vector-dropdown-label cdx-button cdx-button--fake-button cdx-button--fake-button--enabled cdx-button--weight-quiet cdx-button--icon-only " aria-hidden="true" ><span class="vector-icon mw-ui-icon-menu mw-ui-icon-wikimedia-menu"></span> <span class="vector-dropdown-label-text">Main menu</span> </label> <div class="vector-dropdown-content"> <div id="vector-main-menu-unpinned-container" class="vector-unpinned-container"> <div id="vector-main-menu" class="vector-main-menu vector-pinnable-element"> <div class="vector-pinnable-header vector-main-menu-pinnable-header vector-pinnable-header-unpinned" data-feature-name="main-menu-pinned" data-pinnable-element-id="vector-main-menu" data-pinned-container-id="vector-main-menu-pinned-container" data-unpinned-container-id="vector-main-menu-unpinned-container" > <div class="vector-pinnable-header-label">Main menu</div> <button class="vector-pinnable-header-toggle-button vector-pinnable-header-pin-button" data-event-name="pinnable-header.vector-main-menu.pin">move to sidebar</button> <button class="vector-pinnable-header-toggle-button vector-pinnable-header-unpin-button" data-event-name="pinnable-header.vector-main-menu.unpin">hide</button> </div> <div id="p-navigation" class="vector-menu mw-portlet mw-portlet-navigation" > <div class="vector-menu-heading"> Navigation </div> <div class="vector-menu-content"> <ul class="vector-menu-content-list"> <li id="n-mainpage-description" class="mw-list-item"><a href="/wiki/Main_Page" title="Visit the main page [z]" accesskey="z"><span>Main page</span></a></li><li id="n-contents" class="mw-list-item"><a href="/wiki/Wikipedia:Contents" title="Guides to browsing Wikipedia"><span>Contents</span></a></li><li id="n-currentevents" class="mw-list-item"><a href="/wiki/Portal:Current_events" title="Articles related to current events"><span>Current events</span></a></li><li id="n-randompage" class="mw-list-item"><a href="/wiki/Special:Random" title="Visit a randomly selected article [x]" accesskey="x"><span>Random article</span></a></li><li id="n-aboutsite" class="mw-list-item"><a href="/wiki/Wikipedia:About" title="Learn about Wikipedia and how it works"><span>About Wikipedia</span></a></li><li id="n-contactpage" class="mw-list-item"><a href="//en.wikipedia.org/wiki/Wikipedia:Contact_us" title="How to contact Wikipedia"><span>Contact us</span></a></li> </ul> </div> </div> <div id="p-interaction" class="vector-menu mw-portlet mw-portlet-interaction" > <div class="vector-menu-heading"> Contribute </div> <div class="vector-menu-content"> <ul class="vector-menu-content-list"> <li id="n-help" class="mw-list-item"><a href="/wiki/Help:Contents" title="Guidance on how to use and edit Wikipedia"><span>Help</span></a></li><li id="n-introduction" class="mw-list-item"><a href="/wiki/Help:Introduction" title="Learn how to edit Wikipedia"><span>Learn to edit</span></a></li><li id="n-portal" class="mw-list-item"><a href="/wiki/Wikipedia:Community_portal" title="The hub for editors"><span>Community portal</span></a></li><li id="n-recentchanges" class="mw-list-item"><a href="/wiki/Special:RecentChanges" title="A list of recent changes to Wikipedia [r]" accesskey="r"><span>Recent changes</span></a></li><li id="n-upload" class="mw-list-item"><a href="/wiki/Wikipedia:File_upload_wizard" title="Add images or other media for use on Wikipedia"><span>Upload file</span></a></li> </ul> </div> </div> </div> </div> </div> </div> </nav> <a href="/wiki/Main_Page" class="mw-logo"> <img class="mw-logo-icon" src="/static/images/icons/wikipedia.png" alt="" aria-hidden="true" height="50" width="50"> <span class="mw-logo-container skin-invert"> <img class="mw-logo-wordmark" alt="Wikipedia" src="/static/images/mobile/copyright/wikipedia-wordmark-en.svg" style="width: 7.5em; height: 1.125em;"> <img class="mw-logo-tagline" alt="The Free Encyclopedia" src="/static/images/mobile/copyright/wikipedia-tagline-en.svg" width="117" height="13" style="width: 7.3125em; height: 0.8125em;"> </span> </a> </div> <div class="vector-header-end"> <div id="p-search" role="search" class="vector-search-box-vue vector-search-box-collapses vector-search-box-show-thumbnail vector-search-box-auto-expand-width vector-search-box"> <a href="/wiki/Special:Search" class="cdx-button cdx-button--fake-button cdx-button--fake-button--enabled cdx-button--weight-quiet cdx-button--icon-only search-toggle" title="Search Wikipedia [f]" accesskey="f"><span class="vector-icon mw-ui-icon-search mw-ui-icon-wikimedia-search"></span> <span>Search</span> </a> <div class="vector-typeahead-search-container"> <div class="cdx-typeahead-search cdx-typeahead-search--show-thumbnail cdx-typeahead-search--auto-expand-width"> <form action="/w/index.php" id="searchform" class="cdx-search-input cdx-search-input--has-end-button"> <div id="simpleSearch" class="cdx-search-input__input-wrapper" data-search-loc="header-moved"> <div class="cdx-text-input cdx-text-input--has-start-icon"> <input class="cdx-text-input__input" type="search" name="search" placeholder="Search Wikipedia" aria-label="Search Wikipedia" autocapitalize="sentences" title="Search Wikipedia [f]" accesskey="f" id="searchInput" > <span class="cdx-text-input__icon cdx-text-input__start-icon"></span> </div> <input type="hidden" name="title" value="Special:Search"> </div> <button class="cdx-button cdx-search-input__end-button">Search</button> </form> </div> </div> </div> <nav class="vector-user-links vector-user-links-wide" aria-label="Personal tools"> <div class="vector-user-links-main"> <div id="p-vector-user-menu-preferences" class="vector-menu mw-portlet emptyPortlet" > <div class="vector-menu-content"> <ul class="vector-menu-content-list"> </ul> </div> </div> <div id="p-vector-user-menu-userpage" class="vector-menu mw-portlet emptyPortlet" > <div class="vector-menu-content"> <ul class="vector-menu-content-list"> </ul> </div> </div> <nav class="vector-appearance-landmark" aria-label="Appearance"> <div id="vector-appearance-dropdown" class="vector-dropdown " title="Change the appearance of the page&#039;s font size, width, and color" > <input type="checkbox" id="vector-appearance-dropdown-checkbox" role="button" aria-haspopup="true" data-event-name="ui.dropdown-vector-appearance-dropdown" class="vector-dropdown-checkbox " aria-label="Appearance" > <label id="vector-appearance-dropdown-label" for="vector-appearance-dropdown-checkbox" class="vector-dropdown-label cdx-button cdx-button--fake-button cdx-button--fake-button--enabled cdx-button--weight-quiet cdx-button--icon-only " aria-hidden="true" ><span class="vector-icon mw-ui-icon-appearance mw-ui-icon-wikimedia-appearance"></span> <span class="vector-dropdown-label-text">Appearance</span> </label> <div class="vector-dropdown-content"> <div id="vector-appearance-unpinned-container" class="vector-unpinned-container"> </div> </div> </div> </nav> <div id="p-vector-user-menu-notifications" class="vector-menu mw-portlet emptyPortlet" > <div class="vector-menu-content"> <ul class="vector-menu-content-list"> </ul> </div> </div> <div id="p-vector-user-menu-overflow" class="vector-menu mw-portlet" > <div class="vector-menu-content"> <ul class="vector-menu-content-list"> <li id="pt-sitesupport-2" class="user-links-collapsible-item mw-list-item user-links-collapsible-item"><a data-mw="interface" href="https://donate.wikimedia.org/wiki/Special:FundraiserRedirector?utm_source=donate&amp;utm_medium=sidebar&amp;utm_campaign=C13_en.wikipedia.org&amp;uselang=en" class=""><span>Donate</span></a> </li> <li id="pt-createaccount-2" class="user-links-collapsible-item mw-list-item user-links-collapsible-item"><a data-mw="interface" href="/w/index.php?title=Special:CreateAccount&amp;returnto=User%3AEvad37%2Frater%2Fsandbox%2Fapp.js" title="You are encouraged to create an account and log in; however, it is not mandatory" class=""><span>Create account</span></a> </li> <li id="pt-login-2" class="user-links-collapsible-item mw-list-item user-links-collapsible-item"><a data-mw="interface" href="/w/index.php?title=Special:UserLogin&amp;returnto=User%3AEvad37%2Frater%2Fsandbox%2Fapp.js" title="You&#039;re encouraged to log in; however, it&#039;s not mandatory. [o]" accesskey="o" class=""><span>Log in</span></a> </li> </ul> </div> </div> </div> <div id="vector-user-links-dropdown" class="vector-dropdown vector-user-menu vector-button-flush-right vector-user-menu-logged-out" title="Log in and more options" > <input type="checkbox" id="vector-user-links-dropdown-checkbox" role="button" aria-haspopup="true" data-event-name="ui.dropdown-vector-user-links-dropdown" class="vector-dropdown-checkbox " aria-label="Personal tools" > <label id="vector-user-links-dropdown-label" for="vector-user-links-dropdown-checkbox" class="vector-dropdown-label cdx-button cdx-button--fake-button cdx-button--fake-button--enabled cdx-button--weight-quiet cdx-button--icon-only " aria-hidden="true" ><span class="vector-icon mw-ui-icon-ellipsis mw-ui-icon-wikimedia-ellipsis"></span> <span class="vector-dropdown-label-text">Personal tools</span> </label> <div class="vector-dropdown-content"> <div id="p-personal" class="vector-menu mw-portlet mw-portlet-personal user-links-collapsible-item" title="User menu" > <div class="vector-menu-content"> <ul class="vector-menu-content-list"> <li id="pt-sitesupport" class="user-links-collapsible-item mw-list-item"><a href="https://donate.wikimedia.org/wiki/Special:FundraiserRedirector?utm_source=donate&amp;utm_medium=sidebar&amp;utm_campaign=C13_en.wikipedia.org&amp;uselang=en"><span>Donate</span></a></li><li id="pt-createaccount" class="user-links-collapsible-item mw-list-item"><a href="/w/index.php?title=Special:CreateAccount&amp;returnto=User%3AEvad37%2Frater%2Fsandbox%2Fapp.js" title="You are encouraged to create an account and log in; however, it is not mandatory"><span class="vector-icon mw-ui-icon-userAdd mw-ui-icon-wikimedia-userAdd"></span> <span>Create account</span></a></li><li id="pt-login" class="user-links-collapsible-item mw-list-item"><a href="/w/index.php?title=Special:UserLogin&amp;returnto=User%3AEvad37%2Frater%2Fsandbox%2Fapp.js" title="You&#039;re encouraged to log in; however, it&#039;s not mandatory. [o]" accesskey="o"><span class="vector-icon mw-ui-icon-logIn mw-ui-icon-wikimedia-logIn"></span> <span>Log in</span></a></li> </ul> </div> </div> <div id="p-user-menu-anon-editor" class="vector-menu mw-portlet mw-portlet-user-menu-anon-editor" > <div class="vector-menu-heading"> Pages for logged out editors <a href="/wiki/Help:Introduction" aria-label="Learn more about editing"><span>learn more</span></a> </div> <div class="vector-menu-content"> <ul class="vector-menu-content-list"> <li id="pt-anoncontribs" class="mw-list-item"><a href="/wiki/Special:MyContributions" title="A list of edits made from this IP address [y]" accesskey="y"><span>Contributions</span></a></li><li id="pt-anontalk" class="mw-list-item"><a href="/wiki/Special:MyTalk" title="Discussion about edits from this IP address [n]" accesskey="n"><span>Talk</span></a></li> </ul> </div> </div> </div> </div> </nav> </div> </header> </div> <div class="mw-page-container"> <div class="mw-page-container-inner"> <div class="vector-sitenotice-container"> <div id="siteNotice"><!-- CentralNotice --></div> </div> <div class="vector-column-start"> <div class="vector-main-menu-container"> <div id="mw-navigation"> <nav id="mw-panel" class="vector-main-menu-landmark" aria-label="Site"> <div id="vector-main-menu-pinned-container" class="vector-pinned-container"> </div> </nav> </div> </div> </div> <div class="mw-content-container"> <main id="content" class="mw-body"> <header class="mw-body-header vector-page-titlebar"> <h1 id="firstHeading" class="firstHeading mw-first-heading"><span class="mw-page-title-namespace">User</span><span class="mw-page-title-separator">:</span><span class="mw-page-title-main">Evad37/rater/sandbox/app.js</span></h1> <div id="p-lang-btn" class="vector-dropdown mw-portlet mw-portlet-lang" > <input type="checkbox" id="p-lang-btn-checkbox" role="button" aria-haspopup="true" data-event-name="ui.dropdown-p-lang-btn" class="vector-dropdown-checkbox mw-interlanguage-selector" aria-label="This article exist only in this language. Add the article for other languages" > <label id="p-lang-btn-label" for="p-lang-btn-checkbox" class="vector-dropdown-label cdx-button cdx-button--fake-button cdx-button--fake-button--enabled cdx-button--weight-quiet cdx-button--action-progressive mw-portlet-lang-heading-0" aria-hidden="true" ><span class="vector-icon mw-ui-icon-language-progressive mw-ui-icon-wikimedia-language-progressive"></span> <span class="vector-dropdown-label-text">Add languages</span> </label> <div class="vector-dropdown-content"> <div class="vector-menu-content"> <ul class="vector-menu-content-list"> </ul> <div class="after-portlet after-portlet-lang"><span class="uls-after-portlet-link"></span></div> </div> </div> </div> </header> <div class="vector-page-toolbar"> <div class="vector-page-toolbar-container"> <div id="left-navigation"> <nav aria-label="Namespaces"> <div id="p-associated-pages" class="vector-menu vector-menu-tabs mw-portlet mw-portlet-associated-pages" > <div class="vector-menu-content"> <ul class="vector-menu-content-list"> <li id="ca-nstab-user" class="selected vector-tab-noicon mw-list-item"><a href="/wiki/User:Evad37/rater/sandbox/app.js" title="View the user page [c]" accesskey="c"><span>User page</span></a></li><li id="ca-talk" class="vector-tab-noicon mw-list-item"><a href="/wiki/User_talk:Evad37/rater/sandbox/app.js" rel="discussion" class="mw-redirect" title="Discuss improvements to the content page [t]" accesskey="t"><span>Talk</span></a></li> </ul> </div> </div> <div id="vector-variants-dropdown" class="vector-dropdown emptyPortlet" > <input type="checkbox" id="vector-variants-dropdown-checkbox" role="button" aria-haspopup="true" data-event-name="ui.dropdown-vector-variants-dropdown" class="vector-dropdown-checkbox " aria-label="Change language variant" > <label id="vector-variants-dropdown-label" for="vector-variants-dropdown-checkbox" class="vector-dropdown-label cdx-button cdx-button--fake-button cdx-button--fake-button--enabled cdx-button--weight-quiet" aria-hidden="true" ><span class="vector-dropdown-label-text">English</span> </label> <div class="vector-dropdown-content"> <div id="p-variants" class="vector-menu mw-portlet mw-portlet-variants emptyPortlet" > <div class="vector-menu-content"> <ul class="vector-menu-content-list"> </ul> </div> </div> </div> </div> </nav> </div> <div id="right-navigation" class="vector-collapsible"> <nav aria-label="Views"> <div id="p-views" class="vector-menu vector-menu-tabs mw-portlet mw-portlet-views" > <div class="vector-menu-content"> <ul class="vector-menu-content-list"> <li id="ca-view" class="selected vector-tab-noicon mw-list-item"><a href="/wiki/User:Evad37/rater/sandbox/app.js"><span>Read</span></a></li><li id="ca-viewsource" class="vector-tab-noicon mw-list-item"><a href="/w/index.php?title=User:Evad37/rater/sandbox/app.js&amp;action=edit" title="This page is protected.&#10;You can view its source [e]" accesskey="e"><span>View source</span></a></li><li id="ca-history" class="vector-tab-noicon mw-list-item"><a href="/w/index.php?title=User:Evad37/rater/sandbox/app.js&amp;action=history" title="Past revisions of this page [h]" accesskey="h"><span>View history</span></a></li> </ul> </div> </div> </nav> <nav class="vector-page-tools-landmark" aria-label="Page tools"> <div id="vector-page-tools-dropdown" class="vector-dropdown vector-page-tools-dropdown" > <input type="checkbox" id="vector-page-tools-dropdown-checkbox" role="button" aria-haspopup="true" data-event-name="ui.dropdown-vector-page-tools-dropdown" class="vector-dropdown-checkbox " aria-label="Tools" > <label id="vector-page-tools-dropdown-label" for="vector-page-tools-dropdown-checkbox" class="vector-dropdown-label cdx-button cdx-button--fake-button cdx-button--fake-button--enabled cdx-button--weight-quiet" aria-hidden="true" ><span class="vector-dropdown-label-text">Tools</span> </label> <div class="vector-dropdown-content"> <div id="vector-page-tools-unpinned-container" class="vector-unpinned-container"> <div id="vector-page-tools" class="vector-page-tools vector-pinnable-element"> <div class="vector-pinnable-header vector-page-tools-pinnable-header vector-pinnable-header-unpinned" data-feature-name="page-tools-pinned" data-pinnable-element-id="vector-page-tools" data-pinned-container-id="vector-page-tools-pinned-container" data-unpinned-container-id="vector-page-tools-unpinned-container" > <div class="vector-pinnable-header-label">Tools</div> <button class="vector-pinnable-header-toggle-button vector-pinnable-header-pin-button" data-event-name="pinnable-header.vector-page-tools.pin">move to sidebar</button> <button class="vector-pinnable-header-toggle-button vector-pinnable-header-unpin-button" data-event-name="pinnable-header.vector-page-tools.unpin">hide</button> </div> <div id="p-cactions" class="vector-menu mw-portlet mw-portlet-cactions emptyPortlet vector-has-collapsible-items" title="More options" > <div class="vector-menu-heading"> Actions </div> <div class="vector-menu-content"> <ul class="vector-menu-content-list"> <li id="ca-more-view" class="selected vector-more-collapsible-item mw-list-item"><a href="/wiki/User:Evad37/rater/sandbox/app.js"><span>Read</span></a></li><li id="ca-more-viewsource" class="vector-more-collapsible-item mw-list-item"><a href="/w/index.php?title=User:Evad37/rater/sandbox/app.js&amp;action=edit"><span>View source</span></a></li><li id="ca-more-history" class="vector-more-collapsible-item mw-list-item"><a href="/w/index.php?title=User:Evad37/rater/sandbox/app.js&amp;action=history"><span>View history</span></a></li> </ul> </div> </div> <div id="p-tb" class="vector-menu mw-portlet mw-portlet-tb" > <div class="vector-menu-heading"> General </div> <div class="vector-menu-content"> <ul class="vector-menu-content-list"> <li id="t-whatlinkshere" class="mw-list-item"><a href="/wiki/Special:WhatLinksHere/User:Evad37/rater/sandbox/app.js" title="List of all English Wikipedia pages containing links to this page [j]" accesskey="j"><span>What links here</span></a></li><li id="t-recentchangeslinked" class="mw-list-item"><a href="/wiki/Special:RecentChangesLinked/User:Evad37/rater/sandbox/app.js" rel="nofollow" title="Recent changes in pages linked from this page [k]" accesskey="k"><span>Related changes</span></a></li><li id="t-contributions" class="mw-list-item"><a href="/wiki/Special:Contributions/Evad37" title="A list of contributions by this user"><span>User contributions</span></a></li><li id="t-log" class="mw-list-item"><a href="/wiki/Special:Log/Evad37" title="A list of logged actions by this user"><span>User logs</span></a></li><li id="t-userrights" class="mw-list-item"><a href="/wiki/Special:UserRights/Evad37"><span>View user groups</span></a></li><li id="t-upload" class="mw-list-item"><a href="/wiki/Wikipedia:File_Upload_Wizard" title="Upload files [u]" accesskey="u"><span>Upload file</span></a></li><li id="t-specialpages" class="mw-list-item"><a href="/wiki/Special:SpecialPages" title="A list of all special pages [q]" accesskey="q"><span>Special pages</span></a></li><li id="t-permalink" class="mw-list-item"><a href="/w/index.php?title=User:Evad37/rater/sandbox/app.js&amp;oldid=1249460456" title="Permanent link to this revision of this page"><span>Permanent link</span></a></li><li id="t-info" class="mw-list-item"><a href="/w/index.php?title=User:Evad37/rater/sandbox/app.js&amp;action=info" title="More information about this page"><span>Page information</span></a></li><li id="t-urlshortener" class="mw-list-item"><a href="/w/index.php?title=Special:UrlShortener&amp;url=https%3A%2F%2Fen.wikipedia.org%2Fwiki%2FUser%3AEvad37%2Frater%2Fsandbox%2Fapp.js"><span>Get shortened URL</span></a></li><li id="t-urlshortener-qrcode" class="mw-list-item"><a href="/w/index.php?title=Special:QrCode&amp;url=https%3A%2F%2Fen.wikipedia.org%2Fwiki%2FUser%3AEvad37%2Frater%2Fsandbox%2Fapp.js"><span>Download QR code</span></a></li> </ul> </div> </div> <div id="p-coll-print_export" class="vector-menu mw-portlet mw-portlet-coll-print_export" > <div class="vector-menu-heading"> Print/export </div> <div class="vector-menu-content"> <ul class="vector-menu-content-list"> <li id="coll-download-as-rl" class="mw-list-item"><a href="/w/index.php?title=Special:DownloadAsPdf&amp;page=User%3AEvad37%2Frater%2Fsandbox%2Fapp.js&amp;action=show-download-screen" title="Download this page as a PDF file"><span>Download as PDF</span></a></li><li id="t-print" class="mw-list-item"><a href="/w/index.php?title=User:Evad37/rater/sandbox/app.js&amp;printable=yes" title="Printable version of this page [p]" accesskey="p"><span>Printable version</span></a></li> </ul> </div> </div> <div id="p-wikibase-otherprojects" class="vector-menu mw-portlet mw-portlet-wikibase-otherprojects emptyPortlet" > <div class="vector-menu-heading"> In other projects </div> <div class="vector-menu-content"> <ul class="vector-menu-content-list"> </ul> </div> </div> </div> </div> </div> </div> </nav> </div> </div> </div> <div class="vector-column-end"> <div class="vector-sticky-pinned-container"> <nav class="vector-page-tools-landmark" aria-label="Page tools"> <div id="vector-page-tools-pinned-container" class="vector-pinned-container"> </div> </nav> <nav class="vector-appearance-landmark" aria-label="Appearance"> <div id="vector-appearance-pinned-container" class="vector-pinned-container"> <div id="vector-appearance" class="vector-appearance vector-pinnable-element"> <div class="vector-pinnable-header vector-appearance-pinnable-header vector-pinnable-header-pinned" data-feature-name="appearance-pinned" data-pinnable-element-id="vector-appearance" data-pinned-container-id="vector-appearance-pinned-container" data-unpinned-container-id="vector-appearance-unpinned-container" > <div class="vector-pinnable-header-label">Appearance</div> <button class="vector-pinnable-header-toggle-button vector-pinnable-header-pin-button" data-event-name="pinnable-header.vector-appearance.pin">move to sidebar</button> <button class="vector-pinnable-header-toggle-button vector-pinnable-header-unpin-button" data-event-name="pinnable-header.vector-appearance.unpin">hide</button> </div> </div> </div> </nav> </div> </div> <div id="bodyContent" class="vector-body" aria-labelledby="firstHeading" data-mw-ve-target-container> <div class="vector-body-before-content"> <div class="mw-indicators"> </div> <div id="siteSub" class="noprint">From Wikipedia, the free encyclopedia</div> </div> <div id="contentSub"><div id="mw-content-subtitle"><div class="subpages">&lt; <bdi dir="ltr"><a href="/wiki/User:Evad37" title="User:Evad37">User:Evad37</a></bdi> | <bdi dir="ltr"><a href="/wiki/User:Evad37/rater" title="User:Evad37/rater">rater</a></bdi> | <bdi dir="ltr"><a href="/wiki/User:Evad37/rater/sandbox" title="User:Evad37/rater/sandbox">sandbox</a></bdi></div></div></div> <div id="mw-content-text" class="mw-body-content"><div id="mw-clearyourcache" lang="en" dir="ltr" class="mw-content-ltr"> <div class="mw-parser-output"> <style data-mw-deduplicate="TemplateStyles:r1238441935">.mw-parser-output .fmbox{clear:both;margin:0.2em 0;width:100%;border:1px solid #a2a9b1;background-color:var(--background-color-interactive-subtle,#f8f9fa);box-sizing:border-box;color:var(--color-base,#202122)}.mw-parser-output .fmbox-warning{border:1px solid #bb7070;background-color:#ffdbdb}.mw-parser-output .fmbox-editnotice{background-color:transparent}.mw-parser-output .fmbox .mbox-text{border:none;padding:0.25em 0.9em;width:100%}.mw-parser-output .fmbox .mbox-image{border:none;padding:2px 0 2px 0.9em;text-align:center}.mw-parser-output .fmbox .mbox-imageright{border:none;padding:2px 0.9em 2px 0;text-align:center}.mw-parser-output .fmbox .mbox-invalid-type{text-align:center}@media screen{html.skin-theme-clientpref-night .mw-parser-output .fmbox-warning{background-color:#300}}@media screen and (prefers-color-scheme:dark){html.skin-theme-clientpref-os .mw-parser-output .fmbox-warning{background-color:#300}}</style><table id="jswarning" class="plainlinks fmbox fmbox-warning" role="presentation"><tbody><tr><td class="mbox-text">Code that you insert on this page could contain malicious content capable of compromising your account. If you import a script from another page with "importScript", "mw.loader.load", "iusc", or "lusc", take note that this causes you to dynamically load a remote script, which could be changed by others. Editors are responsible for all edits and actions they perform, including by scripts. User scripts are not centrally supported and may malfunction or become inoperable due to software changes. <a href="https://www.mediawiki.org/wiki/Help:Locating_broken_scripts" class="extiw" title="mw:Help:Locating broken scripts">A guide</a> to help you find broken scripts is available. If you are unsure whether code you are adding to this page is safe, you can ask at the <a href="/wiki/Wikipedia:Village_pump_(technical)" title="Wikipedia:Village pump (technical)">appropriate village pump</a>.<br />This code <i>will</i> be executed when previewing this page.</td></tr></tbody></table></div><div class="mw-parser-output"><style data-mw-deduplicate="TemplateStyles:r1250344667">.mw-parser-output .script-doc-auto-box.script-doc-auto-box{background:#ecfcf4}@media screen{html.skin-theme-clientpref-night .mw-parser-output .script-doc-auto-box.script-doc-auto-box{background-color:#0b1e1c}}@media screen and (prefers-color-scheme:dark){html.skin-theme-clientpref-os .mw-parser-output .script-doc-auto-box.script-doc-auto-box{background-color:#0b1e1c}}</style><link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1238441935"><table id="mw-script-doc" class="plainlinks fmbox fmbox-system script-doc-auto-box" role="presentation"><tbody><tr><td class="mbox-image"><span typeof="mw:File"><a href="/wiki/File:Template-info.svg" class="mw-file-description"><img src="//upload.wikimedia.org/wikipedia/en/thumb/4/4c/Template-info.svg/43px-Template-info.svg.png" decoding="async" width="43" height="22" class="mw-file-element" srcset="//upload.wikimedia.org/wikipedia/en/thumb/4/4c/Template-info.svg/65px-Template-info.svg.png 1.5x, //upload.wikimedia.org/wikipedia/en/thumb/4/4c/Template-info.svg/86px-Template-info.svg.png 2x" data-file-width="117" data-file-height="60" /></a></span></td><td class="mbox-text">Documentation for this <a href="/wiki/Wikipedia:User_scripts" title="Wikipedia:User scripts">user script</a> can be added at <a href="/w/index.php?title=User:Evad37/rater/sandbox/app&amp;action=edit&amp;redlink=1" class="new" title="User:Evad37/rater/sandbox/app (page does not exist)">User:Evad37/rater/sandbox/app</a>.</td></tr></tbody></table><span id="clearprefcache"><b>Note:</b> After saving, you have to bypass your browser's cache to see the changes. <b>Google Chrome</b>, <b>Firefox</b>, <b>Microsoft Edge</b> and <b>Safari</b>: Hold down the <style data-mw-deduplicate="TemplateStyles:r1249182868">.mw-parser-output .keyboard-key{border:1px solid #aaa;border-radius:0.2em;box-shadow:0.1em 0.1em 0.2em rgba(0,0,0,0.1);background-color:var(--background-color-neutral-subtle,#f8f9fa);background-image:linear-gradient(to bottom,var(--background-color-neutral,#eaecf0),var(--background-color-neutral-subtle,#f8f9fa),var(--background-color-neutral,#eaecf0));color:var(--color-base,#202122);padding:0.1em 0.3em;font-family:inherit;font-size:0.85em}</style><kbd class="keyboard-key nowrap">⇧ Shift</kbd> key and click the <i>Reload</i> toolbar button. For details and instructions about other browsers, see <a href="/wiki/Wikipedia:Bypass_your_cache" title="Wikipedia:Bypass your cache">Wikipedia:Bypass your cache</a>.</span></div> </div><div class="mw-content-ltr mw-parser-output" lang="en" dir="ltr"><div class="mw-highlight mw-highlight-lang-javascript mw-content-ltr mw-highlight-lines" dir="ltr"><pre>/* * Rater: dialog interface to add, remove, or modify WikiProject banners * Author: Evad37 * Licence: MIT / CC-BY 4.0 [https://github.com/evad37/rater/blob/master/LICENSE] * * Built from source code at GitHub repository [https://github.com/evad37/rater]. * All changes should be made in the repository, otherwise they will be lost. * * To update this script from github, you must have a local repository set up. Then * follow the instructions at [https://github.com/evad37/rater/blob/master/README.md] */ /* jshint esversion: 5, laxbreak: true, undef: true, eqnull: true, maxerr: 3000 */ /* globals console, document, window, $, mw, OO, extraJs */ /* &lt;nowiki> */ !function r(e,n,t){function o(i,f){if(!n[i]){if(!e[i]){var c="function"==typeof require&amp;&amp;require;if(!f&amp;&amp;c)return c(i,!0);if(u)return u(i,!0);var a=new Error("Cannot find module '"+i+"'");throw a.code="MODULE_NOT_FOUND",a}var p=n[i]={exports:{}};e[i][0].call(p.exports,function(r){return o(e[i][1][r]||r)},p,p.exports,r,e,n,t)}return n[i].exports}for(var u="function"==typeof require&amp;&amp;require,i=0;i&lt;t.length;i++)o(t[i]);return o}({1:[function(require,module,exports){module.exports={name:"rater",version:"2.7.2",description:"Wikipedia userscript that helps assess pages for WikiProjects",homepage:"https://github.com/evad37/rater",browser:"index.js",scripts:{test:'echo "Error: no test specified" &amp;&amp; exit 1',"lint:es5":"jshint index.js","lint:es6":'eslint index.js "rater-src/**"',"lint:fix":'eslint index.js "rater-src/**" --fix',lint:"npm run lint:es6 &amp;&amp; npm run lint:es5","build:bundle":"browserify rater-src/App.js --debug -t babelify --outfile dist/rater.js","build:minify":"uglifyjs dist/rater.js --compress -b ascii_only=true,beautify=false --output dist/rater.min.js","build:concat":'concat-cli -f "comment-top.js" dist/rater.min.js "comment-bottom.js" -o dist/rater.min.js',build:"npm run lint &amp;&amp; npm run build:bundle &amp;&amp; npm run build:minify &amp;&amp; npm run build:concat"},author:{name:"Evad37",url:"https://en.wikipedia.org/wiki/User:Evad37"},repository:{type:"git",url:"https://github.com/evad37/rater.git"},license:"(MIT OR CC-BY-4.0)",devDependencies:{"@babel/core":"^7.9.0","@babel/preset-env":"^7.9.0",babelify:"^10.0.0",browserify:"^16.5.0","concat-cli":"^4.0.0",eslint:"^6.8.0",jshint:"^2.11.0","uglify-js":"^3.8.0"}}},{}],2:[function(require,module,exports){"use strict";var stylesheet,showSetupError,_setup=_interopRequireDefault(require("./setup")),_autostart=_interopRequireDefault(require("./autostart")),_css=_interopRequireDefault(require("./css.js")),_api=require("./api"),_windowManager=_interopRequireDefault(require("./windowManager"));function _interopRequireDefault(obj){return obj&amp;&amp;obj.__esModule?obj:{default:obj}}function showMainWindow(data){data&amp;&amp;data.success&amp;&amp;(stylesheet?stylesheet.disabled=!1:stylesheet=mw.util.addCSS(_css.default),document.getElementsByTagName("body")[0].classList.add("rater-mainWindow-open"),_windowManager.default.openWindow("main",data).closed.then(function(result){if(stylesheet&amp;&amp;(stylesheet.disabled=!0),document.getElementsByTagName("body")[0].classList.remove("rater-mainWindow-open"),result&amp;&amp;result.restart)_windowManager.default.removeWindows(["main"]).then(_setup.default).then(showMainWindow,showSetupError);else if(result&amp;&amp;result.success){var $message=$("&lt;span>").append($("&lt;strong>").text("Ratings saved successfully."));result.upgradedStub&amp;&amp;$message.append($("&lt;br>"),$("&lt;span>").text("Note that the article appears to be tagged as a stub.")),mw.notify($message,{autoHide:!0,autoHideSeconds:"long",tag:"Rater-saved"})}}))}showSetupError=function(code,jqxhr){return OO.ui.alert((0,_api.makeErrorMsg)(code,jqxhr),{title:"Rater failed to open"})},mw.util.addPortletLink("p-cactions","#","Rater","ca-rater","Rate quality and importance","5"),$("#ca-rater").click(function(event){event.preventDefault(),(0,_setup.default)().then(showMainWindow,showSetupError)}),(0,_autostart.default)().then(showMainWindow)},{"./api":15,"./autostart":16,"./css.js":19,"./setup":22,"./windowManager":24}],3:[function(require,module,exports){"use strict";function _typeof(obj){return(_typeof="function"==typeof Symbol&amp;&amp;"symbol"==typeof Symbol.iterator?function(obj){return typeof obj}:function(obj){return obj&amp;&amp;"function"==typeof Symbol&amp;&amp;obj.constructor===Symbol&amp;&amp;obj!==Symbol.prototype?"symbol":typeof obj})(obj)}Object.defineProperty(exports,"__esModule",{value:!0}),exports.getWithRedirectTo=exports.parseTemplates=exports.Template=void 0;var _api=_interopRequireDefault(require("./api")),_util=require("./util"),_config=_interopRequireDefault(require("./config")),cache=function(obj){if(obj&amp;&amp;obj.__esModule)return obj;if(null===obj||"object"!==_typeof(obj)&amp;&amp;"function"!=typeof obj)return{default:obj};var cache=_getRequireWildcardCache();if(cache&amp;&amp;cache.has(obj))return cache.get(obj);var newObj={},hasPropertyDescriptor=Object.defineProperty&amp;&amp;Object.getOwnPropertyDescriptor;for(var key in obj)if(Object.prototype.hasOwnProperty.call(obj,key)){var desc=hasPropertyDescriptor?Object.getOwnPropertyDescriptor(obj,key):null;desc&amp;&amp;(desc.get||desc.set)?Object.defineProperty(newObj,key,desc):newObj[key]=obj[key]}newObj.default=obj,cache&amp;&amp;cache.set(obj,newObj);return newObj}(require("./cache"));function _getRequireWildcardCache(){if("function"!=typeof WeakMap)return null;var cache=new WeakMap;return _getRequireWildcardCache=function(){return cache},cache}function _interopRequireDefault(obj){return obj&amp;&amp;obj.__esModule?obj:{default:obj}}function _toConsumableArray(arr){return function(arr){if(Array.isArray(arr))return _arrayLikeToArray(arr)}(arr)||function(iter){if("undefined"!=typeof Symbol&amp;&amp;Symbol.iterator in Object(iter))return Array.from(iter)}(arr)||function(o,minLen){if(!o)return;if("string"==typeof o)return _arrayLikeToArray(o,minLen);var n=Object.prototype.toString.call(o).slice(8,-1);"Object"===n&amp;&amp;o.constructor&amp;&amp;(n=o.constructor.name);if("Map"===n||"Set"===n)return Array.from(n);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return _arrayLikeToArray(o,minLen)}(arr)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function _arrayLikeToArray(arr,len){(null==len||len>arr.length)&amp;&amp;(len=arr.length);for(var i=0,arr2=new Array(len);i&lt;len;i++)arr2[i]=arr[i];return arr2}var Template=function(wikitext){this.wikitext=wikitext,this.parameters=[],this.pipeStyle=" |",this.equalsStyle="=",this.endBracesStyle="}}"};(exports.Template=Template).prototype.addParam=function(name,val,wikitext){this.parameters.push({name:name,value:val,wikitext:"|"+wikitext})},Template.prototype.getParam=function(paramName){return this.parameters.find(function(p){return p.name==paramName})},Template.prototype.setName=function(name){this.name=name.trim()},Template.prototype.getTitle=function(){return mw.Title.newFromText("Template:"+this.name)};exports.parseTemplates=function parseTemplates(wikitext,recursive){if(!wikitext)return[];for(var startIdx,strReplaceAt=function(string,index,_char){return string.slice(0,index)+_char+string.slice(index+1)},result=[],processTemplateText=function(startIdx,endIdx){for(var text=wikitext.slice(startIdx,endIdx),template=new Template("{{"+text.replace(/\x01/g,"|")+"}}");/(\[\[[^\]]*?)\|(.*?\]\])/g.test(text);)text=text.replace(/(\[\[[^\]]*?)\|(.*?\]\])/g,"$1\x01$2");template.pipeStyle=(0,_util.mostFrequent)(text.match(/[\s\n]*\|[\s\n]*/g))||" |",template.equalsStyle=(0,_util.mostFrequent)(text.replace(/(=[^|]*)=+/g,"$1").match(/[\s\n]*=[\s\n]*/g))||"=";var endSpacing=text.match(/[\s\n]*$/);template.endBracesStyle=(endSpacing?endSpacing[0]:"")+"}}";var chunks=text.split("|").map(function(chunk){return chunk.replace(/\x01/g,"|")});template.setName(chunks[0]);var parameterChunks=chunks.slice(1),unnamedIdx=1;parameterChunks.forEach(function(chunk){var pName,pNum,pVal,indexOfEqualTo=chunk.indexOf("="),indexOfOpenBraces=chunk.indexOf("{{"),isWithoutEquals=!chunk.includes("="),hasBracesBeforeEquals=chunk.includes("{{")&amp;&amp;indexOfOpenBraces&lt;indexOfEqualTo;if(isWithoutEquals||hasBracesBeforeEquals){for(;template.getParam(unnamedIdx);)unnamedIdx++;pNum=unnamedIdx,pVal=chunk.trim()}else pName=chunk.slice(0,indexOfEqualTo).trim(),pVal=chunk.slice(indexOfEqualTo+1).trim();template.addParam(pName||pNum,pVal,chunk)}),result.push(template)},n=wikitext.length,numUnclosed=0,inComment=!1,inNowiki=!1,inParameter=!1,i=0;i&lt;n;i++)inComment||inNowiki||inParameter?"|"===wikitext[i]?wikitext=strReplaceAt(wikitext,i,"\x01"):/^-->/.test(wikitext.slice(i,i+3))?(inComment=!1,i+=2):/^&lt;\/nowiki ?>/.test(wikitext.slice(i,i+10))?(inNowiki=!1,i+=8):"}"===wikitext[i]&amp;&amp;"}"===wikitext[i+1]&amp;&amp;"}"===wikitext[i+2]&amp;&amp;(inParameter=!1,i+=2):"{"===wikitext[i]&amp;&amp;"{"===wikitext[i+1]&amp;&amp;"{"===wikitext[i+2]&amp;&amp;"{"!==wikitext[i+3]?(inParameter=!0,i+=2):"{"===wikitext[i]&amp;&amp;"{"===wikitext[i+1]?(0===numUnclosed&amp;&amp;(startIdx=i+2),numUnclosed+=2,i++):"}"===wikitext[i]&amp;&amp;"}"===wikitext[i+1]?(2===numUnclosed&amp;&amp;processTemplateText(startIdx,i),numUnclosed-=2,i++):"|"===wikitext[i]&amp;&amp;2&lt;numUnclosed?wikitext=strReplaceAt(wikitext,i,"\x01"):/^&lt;!--/.test(wikitext.slice(i,i+4))?(inComment=!0,i+=3):/^&lt;nowiki ?>/.test(wikitext.slice(i,i+9))&amp;&amp;(inNowiki=!0,i+=7);if(recursive){var subtemplates=(0,_util.filterAndMap)(result,function(template){return/\{\{(?:.|\n)*\}\}/.test(template.wikitext.slice(2,-2))},function(template){return parseTemplates(template.wikitext.slice(2,-2),!0)});return result.concat.apply(result,subtemplates)}return result};exports.getWithRedirectTo=function(templates){var templatesArray=Array.isArray(templates)?templates:[templates];return 0===templatesArray.length?$.Deferred().resolve([]):_api.default.get({action:"query",format:"json",titles:(0,_util.filterAndMap)(templatesArray,function(template){return null!==template.getTitle()},function(template){return template.getTitle().getPrefixedText()}),redirects:1}).then(function(result){return result&amp;&amp;result.query?(result.query.redirects&amp;&amp;result.query.redirects.forEach(function(redirect){var i=templatesArray.findIndex(function(template){var title=template.getTitle();return title&amp;&amp;title.getPrefixedText()===redirect.from});-1!==i&amp;&amp;(templatesArray[i].redirectTarget=mw.Title.newFromText(redirect.to))}),Array.isArray(templates)?templatesArray:templatesArray[0]):$.Deferred().reject("Empty response")})},Template.prototype.getDataForParam=function(key,paraName){if(!this.paramData)return null;var para=this.paramAliases[paraName]||paraName;if(this.paramData[para]){var data=this.paramData[para][key];return data&amp;&amp;data.en&amp;&amp;!Array.isArray(data)?data.en:data}},Template.prototype.isShellTemplate=function(){var mainText=this.redirectTarget?this.redirectTarget.getMainText():this.getTitle().getMainText();return _config.default.shellTemplates.includes(mainText)},Template.prototype.setParamDataAndSuggestions=function(){var self=this,paramDataSet=$.Deferred();if(self.paramData)return paramDataSet.resolve();var prefixedText=self.redirectTarget?self.redirectTarget.getPrefixedText():self.getTitle().getPrefixedText(),cachedInfo=cache.read(prefixedText+"-params");return cachedInfo&amp;&amp;cachedInfo.value&amp;&amp;cachedInfo.staleDate&amp;&amp;null!=cachedInfo.value.paramData&amp;&amp;null!=cachedInfo.value.parameterSuggestions&amp;&amp;null!=cachedInfo.value.paramAliases&amp;&amp;(self.notemplatedata=cachedInfo.value.notemplatedata,self.paramData=cachedInfo.value.paramData,self.parameterSuggestions=cachedInfo.value.parameterSuggestions,self.paramAliases=cachedInfo.value.paramAliases,paramDataSet.resolve(),!(0,_util.isAfterDate)(cachedInfo.staleDate))||_api.default.get({action:"templatedata",titles:prefixedText,redirects:1,includeMissingTitles:1}).then(function(response){return response},function(){return null}).then(function(result){var id=result&amp;&amp;$.map(result.pages,function(_value,key){return key});result&amp;&amp;result.pages[id]&amp;&amp;!result.pages[id].notemplatedata&amp;&amp;result.pages[id].params?self.paramData=result.pages[id].params:(self.notemplatedata=!0,self.templatedataApiError=!result,self.paramData=_config.default.defaultParameterData),self.paramAliases={},$.each(self.paramData,function(paraName,paraData){if(paraData.aliases&amp;&amp;paraData.aliases.length&amp;&amp;paraData.aliases.forEach(function(alias){self.paramAliases[alias]=paraName}),paraData.description&amp;&amp;/\[.*'.+?'.*?\]/.test(paraData.description.en))try{var allowedVals=JSON.parse(paraData.description.en.replace(/^.*\[/,"[").replace(/"/g,'\\"').replace(/'/g,'"').replace(/,\s*]/,"]").replace(/].*$/,"]"));self.paramData[paraName].allowedValues=allowedVals}catch(e){console.warn("[Rater] Could not parse allowed values in description:\n "+paraData.description.en+"\n Check TemplateData for parameter |"+paraName+"= in "+self.getTitle().getPrefixedText())}});var allParamsArray=!self.notemplatedata&amp;&amp;result.pages[id].paramOrder||$.map(self.paramData,function(_val,key){return key});return self.parameterSuggestions=allParamsArray.filter(function(paramName){return paramName&amp;&amp;"class"!==paramName&amp;&amp;"importance"!==paramName}).map(function(paramName){var optionObject={data:paramName},label=self.getDataForParam(label,paramName);return label&amp;&amp;(optionObject.label=label+" (|"+paramName+"=)"),optionObject}),self.templatedataApiError||cache.write(prefixedText+"-params",{notemplatedata:self.notemplatedata,paramData:self.paramData,parameterSuggestions:self.parameterSuggestions,paramAliases:self.paramAliases},1),!0}).then(paramDataSet.resolve,paramDataSet.reject),paramDataSet};Template.prototype.addMissingParams=function(){var thisTemplate=this;if(("WikiProject Biography"===this.getTitle().getMainText()||this.redirectTarget&amp;&amp;"WikiProject Biography"===this.redirectTarget.getMainText())&amp;&amp;!this.getParam("listas")){var subjectTitle=mw.Title.newFromText(_config.default.mw.wgPageName).getSubjectPage();this.parameters.push({name:"listas",value:function(subjectTitle){var name=subjectTitle.getMainText().replace(/\s\(.*\)/,"");if(-1===name.indexOf(" "))return name;var generationalSuffix="";return/ (?:[JS]r.?|[IVX]+)$/.test(name)&amp;&amp;(generationalSuffix=name.slice(name.lastIndexOf(" ")),-1===(name=name.slice(0,name.lastIndexOf(" "))).indexOf(" "))?name+generationalSuffix:name.slice(name.lastIndexOf(" ")+1).replace(/,$/,"")+", "+name.slice(0,name.lastIndexOf(" "))+generationalSuffix}(subjectTitle),autofilled:!0})}return $.each(thisTemplate.paramData,function(paraName,paraData){if((paraData.required||paraData.suggested)&amp;&amp;!thisTemplate.getParam(paraName)){if(paraData.aliases.length)if(thisTemplate.parameters.filter(function(p){var isAlias=paraData.aliases.includes(p.name),isEmpty=!p.value;return isAlias&amp;&amp;!isEmpty}).length)return;thisTemplate.parameters.push({name:paraName,value:paraData.autovalue||null,autofilled:!0})}}),thisTemplate},Template.prototype.setClassesAndImportances=function(){var _this=this,parsed=$.Deferred();if(this.isShellTemplate())return this.classes=_toConsumableArray(_config.default.bannerDefaults.classes),parsed.resolve();if(this.classes&amp;&amp;this.importances||this.withoutRatings)return parsed.resolve();var mainText=this.getTitle().getMainText(),redirectTargetOrMainText=this.redirectTarget?this.redirectTarget.getMainText():mainText;if(_config.default.customBanners[redirectTargetOrMainText])return this.classes=_config.default.customBanners[redirectTargetOrMainText].classes,this.importances=_config.default.customBanners[redirectTargetOrMainText].importances,parsed.resolve();var cachedRatings=cache.read(mainText+"-ratings");if(cachedRatings&amp;&amp;cachedRatings.value&amp;&amp;cachedRatings.staleDate&amp;&amp;null!=cachedRatings.value.classes&amp;&amp;null!=cachedRatings.value.importances&amp;&amp;(this.classes=cachedRatings.value.classes,this.importances=cachedRatings.value.importances,parsed.resolve(),!(0,_util.isAfterDate)(cachedRatings.staleDate)))return parsed;var wikitextToParse="";return _config.default.bannerDefaults.extendedClasses.forEach(function(classname,index){wikitextToParse+="{{"+mainText+"|class="+classname+"|importance="+(_config.default.bannerDefaults.extendedImportances[index]||"")+"}}/n"}),_api.default.get({action:"parse",title:"Talk:Wikipedia",text:wikitextToParse,prop:"categorieshtml"}).then(function(result){var catsHtml=result.parse.categorieshtml["*"],extendedClasses=_config.default.bannerDefaults.extendedClasses.filter(function(cl){return-1!==catsHtml.indexOf(cl+"-Class")});return _this.classes=[].concat(_toConsumableArray(_config.default.bannerDefaults.classes),_toConsumableArray(extendedClasses)),_this.importances=_config.default.bannerDefaults.extendedImportances.filter(function(imp){return-1!==catsHtml.indexOf(imp+"-importance")}),cache.write(mainText+"-ratings",{classes:_this.classes,importances:_this.importances},1),!0})}},{"./api":15,"./cache":17,"./config":18,"./util":23}],4:[function(require,module,exports){"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var _config=_interopRequireDefault(require("../../config")),_BannerWidget=_interopRequireDefault(require("./BannerWidget")),_util=require("../../util"),_ParameterWidget=_interopRequireDefault(require("./ParameterWidget"));function _interopRequireDefault(obj){return obj&amp;&amp;obj.__esModule?obj:{default:obj}}function _slicedToArray(arr,i){return function(arr){if(Array.isArray(arr))return arr}(arr)||function(arr,i){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(arr)))return;var _arr=[],_n=!0,_d=!1,_e=void 0;try{for(var _s,_i=arr[Symbol.iterator]();!(_n=(_s=_i.next()).done)&amp;&amp;(_arr.push(_s.value),!i||_arr.length!==i);_n=!0);}catch(err){_d=!0,_e=err}finally{try{_n||null==_i.return||_i.return()}finally{if(_d)throw _e}}return _arr}(arr,i)||function(o,minLen){if(!o)return;if("string"==typeof o)return _arrayLikeToArray(o,minLen);var n=Object.prototype.toString.call(o).slice(8,-1);"Object"===n&amp;&amp;o.constructor&amp;&amp;(n=o.constructor.name);if("Map"===n||"Set"===n)return Array.from(n);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return _arrayLikeToArray(o,minLen)}(arr,i)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function _arrayLikeToArray(arr,len){(null==len||len>arr.length)&amp;&amp;(len=arr.length);for(var i=0,arr2=new Array(len);i&lt;len;i++)arr2[i]=arr[i];return arr2}function BannerListWidget(config){config=config||{},BannerListWidget.parent.call(this,config),OO.ui.mixin.GroupElement.call(this,{$group:this.$element}),this.$element.addClass("rater-bannerListWidget").css({padding:"20px 10px 16px 10px"}),this.preferences=config.preferences,this.oresClass=config.oresClass,this.changed=!1,this.aggregate({remove:"bannerRemove"}),this.connect(this,{bannerRemove:"onBannerRemove"}),this.aggregate({changed:"bannerChanged"}),this.connect(this,{bannerChanged:"setChanged"}),this.aggregate({biographyBannerChange:"biographyBannerChanged"}),this.connect(this,{biographyBannerChanged:"syncShellTemplateWithBiographyBanner"}),this.aggregate({updatedSize:"bannerUpdatedSize"}),this.connect(this,{bannerUpdatedSize:"onUpdatedSize"})}OO.inheritClass(BannerListWidget,OO.ui.Widget),OO.mixinClass(BannerListWidget,OO.ui.mixin.GroupElement),BannerListWidget.prototype.onUpdatedSize=function(){this.emit("updatedSize")},BannerListWidget.prototype.setChanged=function(){this.changed=!0},BannerListWidget.prototype.onBannerRemove=function(banner){this.removeItems([banner]),this.setChanged()},BannerListWidget.prototype.syncShellTemplateWithBiographyBanner=function(biographyBanner){if(biographyBanner=biographyBanner||this.items.find(function(banner){return"WikiProject Biography"===banner.mainText||"WikiProject Biography"===banner.redirectTargetMainText})){var bannerShellTemplate=this.items.find(function(banner){return banner.mainText===_config.default.shellTemplates[0]||banner.redirectTargetMainText===_config.default.shellTemplates[0]});if(bannerShellTemplate){[{name:"living",normalise:!0},{name:"blpo",normalise:!0},{name:"activepol",normalise:!0},{name:"listas",normalise:!1}].forEach(function(paramToSync){var _map2=_slicedToArray([biographyBanner,bannerShellTemplate].map(function(banner){return banner.parameterList.getParameterItems().find(function(parameter){return parameter.name===paramToSync.name||banner.paramAliases[parameter.name]===paramToSync.name})}),2),biographyParam=_map2[0],shellParam=_map2[1];if(biographyParam){var paramSyncValue=paramToSync.normalise?(0,_util.normaliseYesNo)(biographyParam.value):biographyParam.value;if(biographyParam.delete(),!shellParam&amp;&amp;paramSyncValue){var index=bannerShellTemplate.addParameterLayout.isVisible()?-1:bannerShellTemplate.parameterList.items.length-1;bannerShellTemplate.parameterList.addItems([new _ParameterWidget.default({name:paramToSync.name,value:paramSyncValue,autofilled:!0},bannerShellTemplate.paramData&amp;&amp;bannerShellTemplate.paramData[paramToSync.name])],index)}else!biographyParam.autofilled&amp;&amp;paramSyncValue&amp;&amp;(shellParam.setValue(paramSyncValue),shellParam.setAutofilled())}})}}},BannerListWidget.prototype.addShellTemplateIfNeeeded=function(){var _this=this;return this.items.some(function(banner){return banner.isShellTemplate})||_BannerWidget.default.newFromTemplateName(_config.default.shellTemplates[0],{withoutRatings:!0},{preferences:this.preferences,isArticle:this.pageInfo.isArticle}).then(function(shellBannerWidget){OO.ui.mixin.GroupElement.prototype.addItems.call(_this,[shellBannerWidget],0),_this.autofillClassRatings({forBannerShell:!0}),_this.onUpdatedSize()}),this},BannerListWidget.prototype.addItems=function(items,index){return 0===items.length||(OO.ui.mixin.GroupElement.prototype.addItems.call(this,items,index),this.items.some(function(banner){return banner.isShellTemplate})||this.autofillClassRatings(),this.autofillImportanceRatings(),this.onUpdatedSize()),this},BannerListWidget.prototype.autofillClassRatings=function(config){if(config=config||{},this.preferences.autofillClassFromOthers||this.preferences.autofillClassFromOres||config.forBannerShell){var uniqueClassRatings=(0,_util.uniqueArray)((0,_util.filterAndMap)(this.items,function(banner){if(banner.isShellTemplate||!banner.hasClassRatings)return!1;var classItem=banner.classDropdown.getMenu().findSelectedItem();return classItem&amp;&amp;classItem.getData()},function(banner){return banner.classDropdown.getMenu().findSelectedItem().getData()}));if(!(1&lt;uniqueClassRatings.length)){var autoClass;if(1===uniqueClassRatings.length&amp;&amp;(this.preferences.autofillClassFromOthers||config.forBannerShell))autoClass=uniqueClassRatings[0];else{if(0!==uniqueClassRatings.length||!this.preferences.autofillClassFromOres||!this.oresClass)return;switch(this.oresClass){case"Stub":case"Start":case"C":case"List":autoClass=this.oresClass}}this.items.forEach(function(banner){if(banner.hasClassRatings||banner.isShellTemplate){var classItem=banner.classDropdown.getMenu().findSelectedItem();classItem&amp;&amp;classItem.getData()&amp;&amp;!config.forBannerShell||(!config.forBannerShell||banner.isShellTemplate||classItem.getData()!==autoClass?(banner.classDropdown.getMenu().selectItemByData(autoClass),banner.classDropdown.setAutofilled(!0)):banner.classDropdown.getMenu().selectItemByData(null))}})}}},BannerListWidget.prototype.autofillImportanceRatings=function(){if(this.preferences.autofillImportance&amp;&amp;(this.pageInfo&amp;&amp;this.pageInfo.isArticle&amp;&amp;!this.pageInfo.redirect&amp;&amp;!this.pageInfo.isDisambig)){this.items.forEach(function(banner){if(banner.hasImportanceRatings){var importanceItem=banner.importanceDropdown.getMenu().findSelectedItem();importanceItem&amp;&amp;importanceItem.getData()||(banner.importanceDropdown.getMenu().selectItemByData("Low"),banner.importanceDropdown.setAutofilled(!0))}})}},BannerListWidget.prototype.setPreferences=function(prefs){this.preferences=prefs,this.items.forEach(function(banner){return banner.setPreferences(prefs)}),this.autofillClassRatings(),this.autofillImportanceRatings()},BannerListWidget.prototype.makeWikitext=function(){var bannersWikitext=(0,_util.filterAndMap)(this.items,function(banner){return!banner.isShellTemplate},function(banner){return banner.makeWikitext()}).join("\n"),shellTemplate=this.items.find(function(banner){return banner.isShellTemplate});if(!shellTemplate)return bannersWikitext;var shellParam1=new _ParameterWidget.default({name:"1",value:"\n"+bannersWikitext+"\n"+(shellTemplate.nonStandardTemplates?shellTemplate.nonStandardTemplates+"\n":"")});shellTemplate.parameterList.addItems([shellParam1]);var shellWikitext=shellTemplate.makeWikitext();return shellTemplate.parameterList.removeItems([shellParam1]),shellWikitext};var _default=BannerListWidget;exports.default=_default},{"../../config":18,"../../util":23,"./BannerWidget":5,"./ParameterWidget":9}],5:[function(require,module,exports){"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var _ParameterListWidget=_interopRequireDefault(require("./ParameterListWidget")),_ParameterWidget=_interopRequireDefault(require("./ParameterWidget")),_DropdownParameterWidget=_interopRequireDefault(require("./DropdownParameterWidget")),_SuggestionLookupTextInputWidget=_interopRequireDefault(require("./SuggestionLookupTextInputWidget")),_util=require("../../util"),_Template=require("../../Template"),_HorizontalLayoutWidget=_interopRequireDefault(require("./HorizontalLayoutWidget")),_config=_interopRequireDefault(require("../../config"));function _interopRequireDefault(obj){return obj&amp;&amp;obj.__esModule?obj:{default:obj}}function _toConsumableArray(arr){return function(arr){if(Array.isArray(arr))return _arrayLikeToArray(arr)}(arr)||function(iter){if("undefined"!=typeof Symbol&amp;&amp;Symbol.iterator in Object(iter))return Array.from(iter)}(arr)||function(o,minLen){if(!o)return;if("string"==typeof o)return _arrayLikeToArray(o,minLen);var n=Object.prototype.toString.call(o).slice(8,-1);"Object"===n&amp;&amp;o.constructor&amp;&amp;(n=o.constructor.name);if("Map"===n||"Set"===n)return Array.from(n);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return _arrayLikeToArray(o,minLen)}(arr)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function _arrayLikeToArray(arr,len){(null==len||len>arr.length)&amp;&amp;(len=arr.length);for(var i=0,arr2=new Array(len);i&lt;len;i++)arr2[i]=arr[i];return arr2}function BannerWidget(template,config){var _this=this;if(config=config||{},BannerWidget.super.call(this,config),this.$overlay=config.$overlay,this.preferences=config.preferences,this.paramData=template.paramData,this.paramAliases=template.paramAliases||{},this.parameterSuggestions=template.parameterSuggestions,this.name=template.name,this.wikitext=template.wikitext,this.pipeStyle=template.pipeStyle,this.equalsStyle=template.equalsStyle,this.endBracesStyle=template.endBracesStyle,this.mainText=template.getTitle().getMainText(),this.redirectTargetMainText=template.redirectTarget&amp;&amp;template.redirectTarget.getMainText(),this.isShellTemplate=template.isShellTemplate(),this.changed=template.parameters.some(function(parameter){return parameter.autofilled}),this.hasClassRatings=template.classes&amp;&amp;template.classes.length,this.hasImportanceRatings=template.importances&amp;&amp;template.importances.length,this.inactiveProject=template.inactiveProject,this.removeButton=new OO.ui.ButtonWidget({icon:"trash",label:"Remove banner",title:"Remove banner",flags:"destructive",$element:$('&lt;div style="width:100%">')}),this.clearButton=new OO.ui.ButtonWidget({icon:"cancel",label:"Clear parameters",title:"Clear parameters",flags:"destructive",$element:$('&lt;div style="width:100%">')}),this.removeButton.$element.find("a").css("width","100%"),this.clearButton.$element.find("a").css("width","100%"),this.titleButtonsGroup=new OO.ui.ButtonGroupWidget({items:[this.removeButton,this.clearButton],$element:$("&lt;span style='width:100%;'>")}),this.mainLabelPopupButton=new OO.ui.PopupButtonWidget({label:"{{".concat(template.getTitle().getMainText(),"}}").concat(this.inactiveProject?" (inactive)":""),$element:$("&lt;span style='display:inline-block;width:48%;margin-right:0;padding-right:8px'>"),$overlay:this.$overlay,indicator:"down",framed:!1,popup:{$content:this.titleButtonsGroup.$element,width:200,padded:!1,align:"force-right",anchor:!1}}),this.mainLabelPopupButton.$element.children("a").first().css({"font-size":"110%"}).find("span.oo-ui-labelElement-label").css({"white-space":"normal"}),this.isShellTemplate){this.classDropdown=new _DropdownParameterWidget.default({label:new OO.ui.HtmlSnippet('&lt;span style="color:#777">Class&lt;/span>'),menu:{items:[new OO.ui.MenuOptionWidget({data:null,label:new OO.ui.HtmlSnippet('&lt;span style="color:#777">('.concat(config.isArticle?"no class":"auto-detect",")&lt;/span>"))})].concat(_toConsumableArray(_config.default.bannerDefaults.classes.map(function(classname){return new OO.ui.MenuOptionWidget({data:classname,label:classname})})))},$overlay:this.$overlay});var shellClassParam=template.parameters.find(function(parameter){return"class"===parameter.name});this.classDropdown.getMenu().selectItemByData(shellClassParam&amp;&amp;(0,_util.classMask)(shellClassParam.value))}else if(this.hasClassRatings){this.classDropdown=new _DropdownParameterWidget.default({label:new OO.ui.HtmlSnippet('&lt;span style="color:#777">Class&lt;/span>'),menu:{items:[new OO.ui.MenuOptionWidget({data:null,label:new OO.ui.HtmlSnippet('&lt;span style="color:#777">('.concat(config.isArticle?"inherit from shell":"auto-detect",")&lt;/span>"))})].concat(_toConsumableArray(template.classes.map(function(classname){return new OO.ui.MenuOptionWidget({data:classname,label:classname})})))},$overlay:this.$overlay});var classParam=template.parameters.find(function(parameter){return"class"===parameter.name});this.classDropdown.getMenu().selectItemByData(classParam&amp;&amp;(0,_util.classMask)(classParam.value))}if(this.hasImportanceRatings){this.importanceDropdown=new _DropdownParameterWidget.default({label:new OO.ui.HtmlSnippet('&lt;span style="color:#777">Importance&lt;/span>'),menu:{items:[new OO.ui.MenuOptionWidget({data:null,label:new OO.ui.HtmlSnippet('&lt;span style="color:#777">('.concat(config.isArticle?"no importance":"auto-detect",")&lt;/span>"))})].concat(_toConsumableArray(template.importances.map(function(importance){return new OO.ui.MenuOptionWidget({data:importance,label:importance})})))},$overlay:this.$overlay});var importanceParam=template.parameters.find(function(parameter){return"importance"===parameter.name});this.importanceDropdown.getMenu().selectItemByData(importanceParam&amp;&amp;(0,_util.importanceMask)(importanceParam.value))}this.titleLayout=new OO.ui.HorizontalLayout({items:[this.mainLabelPopupButton]}),(this.hasClassRatings||this.isShellTemplate)&amp;&amp;this.titleLayout.addItems([this.classDropdown]),this.hasImportanceRatings&amp;&amp;this.titleLayout.addItems([this.importanceDropdown]);var parameterWidgets=(0,_util.filterAndMap)(template.parameters,function(param){return _this.isShellTemplate?"1"==param.name?(_this.shellParam1Value=param.value,!1):"class"!==param.name:"class"!==param.name&amp;&amp;"importance"!==param.name},function(param){return new _ParameterWidget.default(param,template.paramData[param.name],{$overlay:_this.$overlay})});this.parameterList=new _ParameterListWidget.default({items:parameterWidgets,preferences:this.preferences}),this.addParameterNameInput=new _SuggestionLookupTextInputWidget.default({suggestions:template.parameterSuggestions,placeholder:"parameter name",$element:$("&lt;div style='display:inline-block;width:40%'>"),validate:function(val){var _this$getAddParameter=this.getAddParametersInfo(val),validName=_this$getAddParameter.validName,name=_this$getAddParameter.name,value=_this$getAddParameter.value;return!name&amp;&amp;!value||validName}.bind(this),allowSuggestionsWhenEmpty:!0,$overlay:this.$overlay}),this.updateAddParameterNameSuggestions(),this.addParameterValueInput=new _SuggestionLookupTextInputWidget.default({placeholder:"parameter value",$element:$("&lt;div style='display:inline-block;width:40%'>"),validate:function(val){var _this$getAddParameter2=this.getAddParametersInfo(null,val),validValue=_this$getAddParameter2.validValue,name=_this$getAddParameter2.name,value=_this$getAddParameter2.value;return!name&amp;&amp;!value||validValue}.bind(this),allowSuggestionsWhenEmpty:!0,$overlay:this.$overlay}),this.addParameterButton=new OO.ui.ButtonWidget({label:"Add",icon:"add",flags:"progressive"}).setDisabled(!0),this.addParameterControls=new _HorizontalLayoutWidget.default({items:[this.addParameterNameInput,new OO.ui.LabelWidget({label:"="}),this.addParameterValueInput,this.addParameterButton]}),this.addParameterLayout=new OO.ui.FieldLayout(this.addParameterControls,{label:"Add parameter:",align:"top"}).toggle(!1),this.addParameterLayout.$element.find(".oo-ui-fieldLayout-messages").css({clear:"both","padding-top":0}),this.$element.addClass("rater-bannerWidget").append(this.titleLayout.$element,this.parameterList.$element,this.addParameterLayout.$element),this.isShellTemplate||this.$element.append($("&lt;hr>")),this.isShellTemplate&amp;&amp;this.$element.css({background:"#eee","border-radius":"10px",padding:"0 10px 5px","margin-bottom":"12px","font-size":"92%"}),this.hasClassRatings&amp;&amp;this.classDropdown.connect(this,{change:"onClassChange"}),this.hasImportanceRatings&amp;&amp;this.importanceDropdown.connect(this,{change:"onImportanceChange"}),this.parameterList.connect(this,{change:"onParameterChange",addParametersButtonClick:"showAddParameterInputs",updatedSize:"onUpdatedSize"}),this.addParameterButton.connect(this,{click:"onParameterAdd"}),this.addParameterNameInput.connect(this,{change:"onAddParameterNameChange",enter:"onAddParameterNameEnter",choose:"onAddParameterNameEnter"}),this.addParameterValueInput.connect(this,{change:"onAddParameterValueChange",enter:"onAddParameterValueEnter",choose:"onAddParameterValueEnter"}),this.removeButton.connect(this,{click:"onRemoveButtonClick"}),this.clearButton.connect(this,{click:"onClearButtonClick"}),this.preferences.bypassRedirects&amp;&amp;this.bypassRedirect()}OO.inheritClass(BannerWidget,OO.ui.Widget),BannerWidget.newFromTemplateName=function(templateName,data,config){var template=new _Template.Template;return template.name=templateName,data&amp;&amp;data.withoutRatings&amp;&amp;(template.withoutRatings=!0),(0,_Template.getWithRedirectTo)(template).then(function(template){return $.when(template.setClassesAndImportances(),template.setParamDataAndSuggestions()).then(function(){return template.addMissingParams(),template})}).then(function(template){return new BannerWidget(template,config)})},BannerWidget.prototype.onUpdatedSize=function(){this.emit("updatedSize")},BannerWidget.prototype.setChanged=function(){this.changed=!0,this.emit("changed"),"WikiProject Biography"!==this.mainText&amp;&amp;"WikiProject Biography"!==this.redirectTargetMainText||this.emit("biographyBannerChange")},BannerWidget.prototype.onParameterChange=function(){this.setChanged(),this.updateAddParameterNameSuggestions()},BannerWidget.prototype.onClassChange=function(){this.setChanged(),this.classChanged=!0;var classItem=this.classDropdown.getMenu().findSelectedItem();classItem&amp;&amp;null==classItem.getData()&amp;&amp;this.classDropdown.getMenu().selectItem()},BannerWidget.prototype.onImportanceChange=function(){this.setChanged(),this.importanceChanged=!0;var importanceItem=this.importanceDropdown.getMenu().findSelectedItem();importanceItem&amp;&amp;null==importanceItem.getData()&amp;&amp;this.importanceDropdown.getMenu().selectItem()},BannerWidget.prototype.showAddParameterInputs=function(){this.addParameterLayout.toggle(!0),this.addParameterNameInput.focus(),this.onUpdatedSize()},BannerWidget.prototype.getAddParametersInfo=function(nameInputVal,valueInputVal){var name=nameInputVal&amp;&amp;nameInputVal.trim()||this.addParameterNameInput.getValue().trim(),paramAlreadyIncluded="class"===name||"importance"===name||"1"===name&amp;&amp;this.isShellTemplate||this.parameterList.getParameterItems().some(function(paramWidget){return paramWidget.name===name}),value=valueInputVal&amp;&amp;valueInputVal.trim()||this.addParameterValueInput.getValue().trim(),autovalue=name&amp;&amp;this.paramData[name]&amp;&amp;this.paramData[name].autovalue||null;return{validName:!(!name||paramAlreadyIncluded),validValue:!(!value&amp;&amp;!autovalue),isAutovalue:!(value||!autovalue),isAlreadyIncluded:!(!name||!paramAlreadyIncluded),name:name,value:value,autovalue:autovalue}},BannerWidget.prototype.onAddParameterNameChange=function(){var _this$getAddParameter3=this.getAddParametersInfo(),validName=_this$getAddParameter3.validName,validValue=_this$getAddParameter3.validValue,isAutovalue=_this$getAddParameter3.isAutovalue,isAlreadyIncluded=_this$getAddParameter3.isAlreadyIncluded,name=_this$getAddParameter3.name,autovalue=_this$getAddParameter3.autovalue;this.addParameterValueInput.$input.attr("placeholder",autovalue||"");var allowedValues=this.paramData[name]&amp;&amp;this.paramData[name].allowedValues&amp;&amp;this.paramData[name].allowedValues.map(function(val){return{data:val,label:val}});this.addParameterValueInput.setSuggestions(allowedValues||[]),this.addParameterButton.setDisabled(!validName||!validValue),this.addParameterLayout.setNotices(validName&amp;&amp;isAutovalue?["Parameter value will be autofilled"]:[]),this.addParameterLayout.setErrors(isAlreadyIncluded?["Parameter is already present"]:[])},BannerWidget.prototype.onAddParameterNameEnter=function(){this.addParameterValueInput.focus()},BannerWidget.prototype.onAddParameterValueChange=function(){var _this$getAddParameter4=this.getAddParametersInfo(),validName=_this$getAddParameter4.validName,validValue=_this$getAddParameter4.validValue,isAutovalue=_this$getAddParameter4.isAutovalue;this.addParameterButton.setDisabled(!validName||!validValue),this.addParameterLayout.setNotices(validName&amp;&amp;isAutovalue?["Parameter value will be autofilled"]:[])},BannerWidget.prototype.onAddParameterValueEnter=function(){this.onAddParameterValueChange(),this.addParameterButton.isDisabled()||this.onParameterAdd()},BannerWidget.prototype.onParameterAdd=function(){var _this$getAddParameter5=this.getAddParametersInfo(),validName=_this$getAddParameter5.validName,validValue=_this$getAddParameter5.validValue,name=_this$getAddParameter5.name,value=_this$getAddParameter5.value,autovalue=_this$getAddParameter5.autovalue;if(validName&amp;&amp;validValue){var newParameter=new _ParameterWidget.default({name:name,value:value||autovalue},this.paramData[name],{$overlay:this.$overlay});this.parameterList.addItems([newParameter]),this.addParameterNameInput.setValue(""),this.addParameterValueInput.setValue(""),this.addParameterNameInput.$input.focus()}},BannerWidget.prototype.updateAddParameterNameSuggestions=function(){var paramsInUse={};this.parameterList.getParameterItems().forEach(function(paramWidget){return paramsInUse[paramWidget.name]=!0}),this.addParameterNameInput.setSuggestions(this.parameterSuggestions.filter(function(suggestion){return!paramsInUse[suggestion.data]}))},BannerWidget.prototype.onRemoveButtonClick=function(){this.emit("remove")},BannerWidget.prototype.onClearButtonClick=function(){this.parameterList.clearItems(this.parameterList.getParameterItems()),this.hasClassRatings&amp;&amp;this.classDropdown.getMenu().selectItem(),this.hasImportanceRatings&amp;&amp;this.importanceDropdown.getMenu().selectItem()},BannerWidget.prototype.bypassRedirect=function(){this.redirectTargetMainText&amp;&amp;(this.bypassedName=this.name,this.mainLabelPopupButton.setLabel("{{".concat(this.redirectTargetMainText,"}}").concat(this.inactiveProject?" (inactive)":"")),this.name=this.redirectTargetMainText,this.mainText=this.redirectTargetMainText,this.redirectTargetMainText=null,this.setChanged())},BannerWidget.prototype.makeWikitext=function(){if(!this.changed&amp;&amp;this.wikitext)return this.wikitext;var pipe=this.pipeStyle,equals=this.equalsStyle,classItem=(this.hasClassRatings||this.isShellTemplate)&amp;&amp;this.classDropdown.getMenu().findSelectedItem(),classVal=classItem&amp;&amp;classItem.getData(),importanceItem=this.hasImportanceRatings&amp;&amp;this.importanceDropdown.getMenu().findSelectedItem(),importanceVal=importanceItem&amp;&amp;importanceItem.getData();return("{{"+this.name+((this.hasClassRatings||this.isShellTemplate)&amp;&amp;null!=classVal?"".concat(pipe,"class").concat(equals).concat(classVal||""):"")+(this.hasImportanceRatings&amp;&amp;null!=importanceVal?"".concat(pipe,"importance").concat(equals).concat(importanceVal||""):"")+this.parameterList.getParameterItems().map(function(parameter){return parameter.makeWikitext(pipe,equals)}).join("")+this.endBracesStyle).replace(/\n+}}$/,"\n}}")},BannerWidget.prototype.setPreferences=function(prefs){this.preferences=prefs,this.preferences.bypassRedirects&amp;&amp;this.bypassRedirect(),this.parameterList.setPreferences(prefs)};var _default=BannerWidget;exports.default=_default},{"../../Template":3,"../../config":18,"../../util":23,"./DropdownParameterWidget":6,"./HorizontalLayoutWidget":7,"./ParameterListWidget":8,"./ParameterWidget":9,"./SuggestionLookupTextInputWidget":11}],6:[function(require,module,exports){"use strict";function DropdownParameterWidget(config){config=$.extend({$element:$("&lt;span style='display:inline-block;width:24%'>")},config||{}),DropdownParameterWidget.super.call(this,config),this.$overlay=config.$overlay,this.$element.addClass("rater-dropdownParameterWidget"),this.autofilled=!!config.autofilled,this.autofilledIcon=new OO.ui.IconWidget({icon:"robot",title:"Autofilled by Rater",flags:"progressive",$element:$("&lt;span style='margin: 0 -5px 0 5px;min-width: 16px;width: 16px;left:unset;'>")}).toggle(this.autofilled),this.$element.find(".oo-ui-indicatorElement-indicator").before(this.autofilledIcon.$element),this.menu.connect(this,{choose:"onDropdownMenuChoose",select:"onDropdownMenuSelect"})}Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0,OO.inheritClass(DropdownParameterWidget,OO.ui.DropdownWidget),DropdownParameterWidget.prototype.setAutofilled=function(setAutofill){this.autofilledIcon.toggle(!!setAutofill),this.$element.find(".oo-ui-dropdownWidget-handle").css({border:setAutofill?"1px dashed #36c":""}),this.autofilled=!!setAutofill},DropdownParameterWidget.prototype.onDropdownMenuChoose=function(){this.setAutofilled(!1),this.emit("change")},DropdownParameterWidget.prototype.onDropdownMenuSelect=function(){this.emit("change")},DropdownParameterWidget.prototype.getValue=function(){var selectedItem=this.menu.findSelectedItem();return selectedItem&amp;&amp;selectedItem.getData()};var _default=DropdownParameterWidget;exports.default=_default},{}],7:[function(require,module,exports){"use strict";function ownKeys(object,enumerableOnly){var keys=Object.keys(object);if(Object.getOwnPropertySymbols){var symbols=Object.getOwnPropertySymbols(object);enumerableOnly&amp;&amp;(symbols=symbols.filter(function(sym){return Object.getOwnPropertyDescriptor(object,sym).enumerable})),keys.push.apply(keys,symbols)}return keys}function _defineProperty(obj,key,value){return key in obj?Object.defineProperty(obj,key,{value:value,enumerable:!0,configurable:!0,writable:!0}):obj[key]=value,obj}function HorizontalLayoutWidget(config){config=config||{},HorizontalLayoutWidget.super.call(this,{}),this.layout=new OO.ui.HorizontalLayout(function(target){for(var i=1;i&lt;arguments.length;i++){var source=null!=arguments[i]?arguments[i]:{};i%2?ownKeys(Object(source),!0).forEach(function(key){_defineProperty(target,key,source[key])}):Object.getOwnPropertyDescriptors?Object.defineProperties(target,Object.getOwnPropertyDescriptors(source)):ownKeys(Object(source)).forEach(function(key){Object.defineProperty(target,key,Object.getOwnPropertyDescriptor(source,key))})}return target}({},config,{$element:this.$element}))}Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0,OO.inheritClass(HorizontalLayoutWidget,OO.ui.Widget);var _default=HorizontalLayoutWidget;exports.default=_default},{}],8:[function(require,module,exports){"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;function ParameterListWidget(config){config=config||{},ParameterListWidget.parent.call(this,config),OO.ui.mixin.GroupElement.call(this,{$group:this.$element}),this.addItems(config.items),this.$element.addClass("rater-parameterListWidget"),this.preferences=config.preferences;var displayLimit=this.preferences.collapseParamsLowerLimit+1;if(displayLimit&amp;&amp;this.items.length>displayLimit){for(var hiddenCount=0,i=displayLimit-1-1;i&lt;this.items.length;i++)this.items[i].autofilled||(this.items[i].toggle(!1),hiddenCount++);0&lt;hiddenCount&amp;&amp;(this.showMoreParametersButton=new OO.ui.ButtonWidget({label:"Show "+hiddenCount+" more "+(1===hiddenCount?"parameter":"parameters"),framed:!1,$element:$("&lt;span style='margin-bottom:0'>")}),this.addItems([this.showMoreParametersButton]))}this.addParametersButton=new OO.ui.ButtonWidget({label:"Add parameter",icon:"add",framed:!1,$element:$("&lt;span style='margin-bottom:0'>")}),this.addItems([this.addParametersButton]),this.aggregate({delete:"parameterDelete"}),this.connect(this,{parameterDelete:"onParameterDelete"}),this.aggregate({change:"parameterChange"}),this.connect(this,{parameterChange:"onParameterChange"}),this.aggregate({updatedSize:"parameterUpdatedSize"}),this.connect(this,{parameterUpdatedSize:"onUpdatedSize"}),this.showMoreParametersButton&amp;&amp;this.showMoreParametersButton.connect(this,{click:"onShowMoreParametersButtonClick"}),this.addParametersButton.connect(this,{click:"onAddParametersButtonClick"})}OO.inheritClass(ParameterListWidget,OO.ui.Widget),OO.mixinClass(ParameterListWidget,OO.ui.mixin.GroupElement),ParameterListWidget.prototype.onUpdatedSize=function(){this.emit("updatedSize")},ParameterListWidget.prototype.addItems=function(items,index){return 0===items.length||(OO.ui.mixin.GroupElement.prototype.addItems.call(this,items,index),this.onUpdatedSize()),this},ParameterListWidget.prototype.onParameterDelete=function(parameter){this.removeItems([parameter]),this.emit("change")},ParameterListWidget.prototype.onParameterChange=function(){this.emit("change")},ParameterListWidget.prototype.getParameterItems=function(){return this.items.filter(function(item){return"ParameterWidget"===item.constructor.name})},ParameterListWidget.prototype.onShowMoreParametersButtonClick=function(){this.removeItems([this.showMoreParametersButton]),this.items.forEach(function(parameterWidget){return parameterWidget.toggle(!0)}),this.onUpdatedSize()},ParameterListWidget.prototype.onAddParametersButtonClick=function(){this.removeItems([this.addParametersButton]),this.emit("addParametersButtonClick")},ParameterListWidget.prototype.makeWikitext=function(pipeStyle,equalsStyle){return this.getParameterItems().map(function(parameter){return parameter.makeWikitext(pipeStyle,equalsStyle)}).join("")},ParameterListWidget.prototype.setPreferences=function(prefs){this.preferences=prefs;var params=this.getParameterItems();if(!(params.length&lt;=this.preferences.collapseParamsLowerLimit)){var hiddenParams=params.filter(function(param){return!param.isVisible()}),visibleParamsCount=params.length-hiddenParams.length;if(!(0===hiddenParams||visibleParamsCount>=this.preferences.collapseParamsLowerLimit)){for(var numToUnhide=Math.min(this.preferences.collapseParamsLowerLimit-visibleParamsCount,hiddenParams.length),i=0;i&lt;numToUnhide;i++)hiddenParams[i].toggle(!0);var stillHiddenCount=hiddenParams.length-numToUnhide;0==stillHiddenCount?this.removeItems([this.showMoreParametersButton]):this.showMoreParametersButton.setLabel("Show "+stillHiddenCount+" more "+(1==stillHiddenCount?"paramter":"paramters"))}}};var _default=ParameterListWidget;exports.default=_default},{}],9:[function(require,module,exports){"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var obj,_util=require("../../util"),_HorizontalLayoutWidget=(obj=require("./HorizontalLayoutWidget"))&amp;&amp;obj.__esModule?obj:{default:obj};function ParameterWidget(parameter,paramData,config){switch(config=config||{},ParameterWidget.super.call(this,config),this.$overlay=config.$overlay,this.name=parameter.name,this.value=parameter.value,this.autofilled=parameter.autofilled,this.isInvalid=null==parameter.value,this.paramData=paramData||{},this.allowedValues=this.paramData.allowedValues||[],this.isRequired=this.paramData.required,this.isSuggested=this.paramData.suggested,this.allowedValues.length){case 1:this.allowedValues[1]=null;case 2:var isFirstAllowedVal=0===this.allowedValues.indexOf(parameter.value)||0===this.allowedValues.map(_util.normaliseYesNo).indexOf((0,_util.normaliseYesNo)(parameter.value)),isSecondAllowedVal=1===this.allowedValues.indexOf(parameter.value||null)||1===this.allowedValues.map(_util.normaliseYesNo).indexOf(parameter.value?(0,_util.normaliseYesNo)(parameter.value):null),isIndeterminate=!isFirstAllowedVal&amp;&amp;!isSecondAllowedVal;this.checkbox=new OO.ui.CheckboxInputWidget({selected:isIndeterminate?void 0:isFirstAllowedVal,indeterminate:isIndeterminate||void 0,$element:$("&lt;label style='margin:0 0 0 5px'>")})}this.input=new OO.ui.ComboBoxInputWidget({value:this.value,options:(0,_util.filterAndMap)(this.allowedValues,function(val){return null!==val},function(val){return{data:val,label:val}}),$element:$("&lt;div style='margin-bottom:0;'>"),$overlay:this.$overlay}),this.input.$element.find("input").css({"padding-top":0,"padding-bottom":"2px",height:"24px"}),this.input.$element.find("span.oo-ui-labelElement-label").css({"line-height":"normal"}),this.input.$element.find("a.oo-ui-buttonElement-button").css({"padding-top":0,height:"24px","min-height":"0"}),this.confirmButton=new OO.ui.ButtonWidget({icon:"check",label:"Done",framed:!1,flags:"progressive",$element:$("&lt;span style='margin-right:0'>")}),this.cancelButton=new OO.ui.ButtonWidget({icon:"undo",label:"Cancel",framed:!1}),this.deleteButton=new OO.ui.ButtonWidget({icon:this.isRequired?"restore":"trash",label:this.isRequired?"Required parameter":"Delete",framed:!1,flags:"destructive",disabled:this.isRequired}),this.editButtonControls=new OO.ui.ButtonGroupWidget({items:[this.confirmButton,this.cancelButton,this.deleteButton],$element:$("&lt;span style='font-size:92%'>")}),this.editButtonControls.$element.find("a span:first-child").css({"min-width":"unset",width:"16px","margin-right":0}),this.editLayoutControls=new _HorizontalLayoutWidget.default({items:[this.input,this.editButtonControls]}),this.editLayout=new OO.ui.FieldLayout(this.editLayoutControls,{label:this.name+" =",align:"top",help:this.paramData.description&amp;&amp;this.paramData.description.en||!1,helpInline:!0}).toggle(),this.editLayout.$element.find("label.oo-ui-inline-help").css({margin:"-10px 0 5px 10px"}),this.invalidIcon=new OO.ui.IconWidget({icon:"block",title:"Invalid parameter: no value specified!",flags:"destructive",$element:$("&lt;span style='margin: 0 5px 0 -5px; min-width: 16px; width: 16px;'>")}).toggle(this.isInvalid),this.fullLabel=new OO.ui.LabelWidget({label:this.name+(this.value?" = "+this.value:" "),$element:$("&lt;label style='margin: 0;'>")}),this.autofilledIcon=new OO.ui.IconWidget({icon:"robot",title:"Autofilled by Rater",flags:"progressive",$element:$("&lt;span style='margin: 0 -5px 0 5px;min-width: 16px;width: 16px;'>")}).toggle(this.autofilled),this.editButton=new OO.ui.ButtonWidget({icon:"edit",framed:!1,$element:$("&lt;span style='margin-bottom: 0;'>")}),this.editButton.$element.find("a").css({"border-radius":"0 10px 10px 0","margin-left":"5px"}),this.editButton.$element.find("a span").first().css({"min-width":"unset",width:"16px"}),this.readLayout=new OO.ui.HorizontalLayout({items:[this.invalidIcon,this.fullLabel,this.autofilledIcon,this.editButton],$element:$("&lt;span style='margin:0;width:unset;'>")}),this.checkbox&amp;&amp;this.readLayout.addItems([this.checkbox],2),this.$element=$("&lt;div>").addClass("rater-parameterWidget").css({width:"unset",display:"inline-block",border:this.autofilled?"1px dashed #36c":"1px solid #ddd","border-radius":"10px","padding-left":"10px",margin:"0 8px 8px 0",background:this.isInvalid?"#fddd":"#fffe"}).append(this.readLayout.$element,this.editLayout.$element),this.editButton.connect(this,{click:"onEditClick"}),this.confirmButton.connect(this,{click:"onConfirmClick"}),this.cancelButton.connect(this,{click:"onCancelClick"}),this.deleteButton.connect(this,{click:"onDeleteClick"}),this.checkbox&amp;&amp;this.checkbox.connect(this,{change:"onCheckboxChange"})}OO.inheritClass(ParameterWidget,OO.ui.Widget),ParameterWidget.prototype.onUpdatedSize=function(){this.emit("updatedSize")},ParameterWidget.prototype.onEditClick=function(){this.readLayout.toggle(!1),this.editLayout.toggle(!0),this.$element.css({background:"#fffe"}),this.input.focus(),this.onUpdatedSize()},ParameterWidget.prototype.onConfirmClick=function(){this.setValue(this.input.getValue()),this.readLayout.toggle(!0),this.editLayout.toggle(!1),this.onUpdatedSize()},ParameterWidget.prototype.onCancelClick=function(){this.input.setValue(this.value),this.readLayout.toggle(!0),this.editLayout.toggle(!1),this.onUpdatedSize()},ParameterWidget.prototype.onDeleteClick=function(){this.delete()},ParameterWidget.prototype.onCheckboxChange=function(isSelected,isIndeterminate){isIndeterminate||(isSelected?this.setValue(this.allowedValues[0]):this.setValue(this.allowedValues[1]))},ParameterWidget.prototype.delete=function(){this.emit("delete")},ParameterWidget.prototype.setValue=function(val){if(this.autofilled=!1,this.autofilledIcon.toggle(!1),this.$element.css({border:"1px solid #ddd"}),this.value=val,this.input.setValue(this.value),this.isInvalid=null==this.value,this.invalidIcon.toggle(this.isInvalid),this.$element.css({background:this.isInvalid?"#fddd":"#fffe"}),this.fullLabel.setLabel(this.name+(this.value?" = "+this.value:"")),this.checkbox){var isFirstAllowedVal=0===this.allowedValues.indexOf(val)||0===this.allowedValues.map(_util.normaliseYesNo).indexOf((0,_util.normaliseYesNo)(val)),isSecondAllowedVal=1===this.allowedValues.indexOf(val||null)||1===this.allowedValues.map(_util.normaliseYesNo).indexOf(val?(0,_util.normaliseYesNo)(val):null),isIndeterminate=!isFirstAllowedVal&amp;&amp;!isSecondAllowedVal;if(this.checkbox.setIndeterminate(isIndeterminate,!0),!isIndeterminate){var isSelected=isFirstAllowedVal;this.checkbox.setSelected(isSelected,!0)}}this.emit("change")},ParameterWidget.prototype.setAutofilled=function(){this.autofilled=!0,this.autofilledIcon.toggle(!0),this.$element.css({border:"1px dashed #36c"})},ParameterWidget.prototype.makeWikitext=function(pipeStyle,equalsStyle){return this.isInvalid?"":pipeStyle+this.name+equalsStyle+(this.value||"")},ParameterWidget.prototype.focusInput=function(){return this.input.focus()};var _default=ParameterWidget;exports.default=_default},{"../../util":23,"./HorizontalLayoutWidget":7}],10:[function(require,module,exports){"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var obj,_config=(obj=require("../../config"))&amp;&amp;obj.__esModule?obj:{default:obj};function PrefsFormWidget(config){for(var prefName in config=config||{},PrefsFormWidget.super.call(this,config),this.$element.addClass("rater-prefsFormWidget"),this.layout=new OO.ui.FieldsetLayout({label:"Preferences",$element:this.$element}),this.preferences={autostart:{input:new OO.ui.ToggleSwitchWidget,label:"Autostart Rater"},autostartRedirects:{input:new OO.ui.ToggleSwitchWidget,label:"Autostart on redirects"},autostartNamespaces:{input:new mw.widgets.NamespacesMultiselectWidget,label:"Autostart in these namespaces"},bypassRedirects:{input:new OO.ui.ToggleSwitchWidget,label:"Bypass redirects to banners"},autofillClassFromOthers:{input:new OO.ui.ToggleSwitchWidget,label:"Autofill class from other banners"},autofillClassFromOres:{input:new OO.ui.ToggleSwitchWidget,label:"Autofill class based on ORES prediction"},autofillImportance:{input:new OO.ui.ToggleSwitchWidget,label:"Autofill low importance"},collapseParamsLowerLimit:{input:new OO.ui.NumberInputWidget({min:1}),label:"Minimum number of parameters to show uncollapsed"},watchlist:{input:new OO.ui.ButtonSelectWidget({items:[new OO.ui.ButtonOptionWidget({data:"preferences",label:"Default",title:"Uses the same setting as if you manually edited the page, as per Special:Preferences"}),new OO.ui.ButtonOptionWidget({data:"watch",label:"Always",title:"Always add pages Rater edits to your watchlist"}),new OO.ui.ButtonOptionWidget({data:"nochange",label:"Never",title:"Never add pages Rater edit to your watchlist"})]}).selectItemByData("preferences"),label:"Add edited pages to watchlist"},resetCache:{input:new OO.ui.ButtonWidget({label:"Reset cache",title:"Remove cached data, including list of WikiProjects and template parameters",flags:["destructive"]})}},this.preferences)this.layout.addItems([new OO.ui.FieldLayout(this.preferences[prefName].input,{label:this.preferences[prefName].label,align:"right"})]);this.preferences.resetCache.input.connect(this,{click:"onResetCacheClick"})}OO.inheritClass(PrefsFormWidget,OO.ui.Widget),PrefsFormWidget.prototype.setPrefValues=function(prefs){var _this=this,_loop=function(prefName){var value=prefs[prefName],input=_this.preferences[prefName]&amp;&amp;_this.preferences[prefName].input;switch(input&amp;&amp;input.constructor.name){case"OoUiButtonSelectWidget":input.selectItemByData(value);break;case"OoUiNumberInputWidget":case"OoUiToggleSwitchWidget":input.setValue(value);break;case"MwWidgetsNamespacesMultiselectWidget":input.clearItems(),value.forEach(function(ns){return input.addTag(ns.toString(),0===ns?"(Main)":_config.default.mw.wgFormattedNamespaces[ns])})}};for(var prefName in prefs)_loop(prefName)},PrefsFormWidget.prototype.getPrefs=function(){var prefs={};for(var prefName in this.preferences){var input=this.preferences[prefName].input,value=void 0;switch(input.constructor.name){case"OoUiButtonSelectWidget":value=input.findSelectedItem().getData();break;case"OoUiToggleSwitchWidget":value=input.getValue();break;case"OoUiNumberInputWidget":value=Number(input.getValue());break;case"MwWidgetsNamespacesMultiselectWidget":value=input.getValue().map(Number)}prefs[prefName]=value}return prefs},PrefsFormWidget.prototype.onResetCacheClick=function(){var _this2=this;OO.ui.confirm("After reseting cache, Rater will close and restart. Any changes made will be discarded.").then(function(confirmed){confirmed&amp;&amp;_this2.emit("resetCache")})};var _default=PrefsFormWidget;exports.default=_default},{"../../config":18}],11:[function(require,module,exports){"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var SuggestionLookupTextInputWidget=function(config){OO.ui.TextInputWidget.call(this,config),OO.ui.mixin.LookupElement.call(this,config),this.suggestions=Array.isArray(config.suggestions)?config.suggestions:[],this.$element.addClass("rater-suggestionLookupTextInputWidget")};OO.inheritClass(SuggestionLookupTextInputWidget,OO.ui.TextInputWidget),OO.mixinClass(SuggestionLookupTextInputWidget,OO.ui.mixin.LookupElement),SuggestionLookupTextInputWidget.prototype.setSuggestions=function(suggestions){Array.isArray(suggestions)?this.suggestions=suggestions:null!=suggestions&amp;&amp;console.warn("[Rater] SuggestionLookupTextInputWidget.prototype.setSuggestions called with a non-array value:",suggestions)},SuggestionLookupTextInputWidget.prototype.getLookupRequest=function(){return $.Deferred().resolve(new RegExp("\\b"+mw.util.escapeRegExp(this.getValue()),"i")).promise({abort:function(){}})},SuggestionLookupTextInputWidget.prototype.getLookupCacheDataFromResponse=function(response){return response||[]},SuggestionLookupTextInputWidget.prototype.getLookupMenuOptionsFromData=function(pattern){return this.suggestions.filter(function(suggestionItem){return pattern.test(suggestionItem.label)||!suggestionItem.label&amp;&amp;pattern.test(suggestionItem.data)}).map(function(optionItem){return new OO.ui.MenuOptionWidget({data:optionItem.data,label:optionItem.label||optionItem.data})})},SuggestionLookupTextInputWidget.prototype.onLookupMenuChoose=function(item){var itemData=item.getData();itemData&amp;&amp;itemData.name&amp;&amp;item.setData(itemData.name),this.$input.blur(),OO.ui.mixin.LookupElement.prototype.onLookupMenuChoose.call(this,item),this.emit("choose",itemData)};var _default=SuggestionLookupTextInputWidget;exports.default=_default},{}],12:[function(require,module,exports){"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var _config=_interopRequireDefault(require("../../config")),_SuggestionLookupTextInputWidget=_interopRequireDefault(require("./SuggestionLookupTextInputWidget")),_getBanners=require("../../getBanners");function _interopRequireDefault(obj){return obj&amp;&amp;obj.__esModule?obj:{default:obj}}function _toConsumableArray(arr){return function(arr){if(Array.isArray(arr))return _arrayLikeToArray(arr)}(arr)||function(iter){if("undefined"!=typeof Symbol&amp;&amp;Symbol.iterator in Object(iter))return Array.from(iter)}(arr)||function(o,minLen){if(!o)return;if("string"==typeof o)return _arrayLikeToArray(o,minLen);var n=Object.prototype.toString.call(o).slice(8,-1);"Object"===n&amp;&amp;o.constructor&amp;&amp;(n=o.constructor.name);if("Map"===n||"Set"===n)return Array.from(n);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return _arrayLikeToArray(o,minLen)}(arr)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function _arrayLikeToArray(arr,len){(null==len||len>arr.length)&amp;&amp;(len=arr.length);for(var i=0,arr2=new Array(len);i&lt;len;i++)arr2[i]=arr[i];return arr2}function TopBarWidget(config){var _this=this;config=$.extend({expanded:!1,framed:!1,padded:!1},config||{}),TopBarWidget.super.call(this,config),this.$overlay=config.$overlay,this.searchBox=new _SuggestionLookupTextInputWidget.default({placeholder:"Add a WikiProject...",$element:$("&lt;div style='display:inline-block; margin:0 -1px; width:calc(100% - 55px);'>"),$overlay:this.$overlay}),(0,_getBanners.getBannerNames)().then(function(banners){return[].concat(_toConsumableArray(banners.withRatings.map(function(bannerName){return{label:bannerName.replace("WikiProject ",""),data:{name:bannerName}}})),_toConsumableArray(banners.withoutRatings.map(function(bannerName){return{label:bannerName.replace("WikiProject ",""),data:{name:bannerName,withoutRatings:!0}}})),_toConsumableArray(banners.wrappers.map(function(bannerName){return{label:bannerName.replace("WikiProject ","")+" [template wrapper]",data:{name:bannerName,wrapper:!0}}})),_toConsumableArray(banners.notWPBM.map(function(bannerName){return{label:bannerName.replace("WikiProject ",""),data:{name:bannerName}}})),_toConsumableArray(banners.inactive.map(function(bannerName){return{label:bannerName.replace("WikiProject ","")+" [inactive]",data:{name:bannerName,withoutRatings:!0}}})),_toConsumableArray(banners.wir.map(function(bannerName){return{label:bannerName+" [Women In Red meetup/initiative]",data:{name:bannerName,withoutRatings:!0}}})))}).then(function(bannerOptions){return _this.searchBox.setSuggestions(bannerOptions)}),this.addBannerButton=new OO.ui.ButtonWidget({icon:"add",title:"Add",flags:"progressive",$element:$("&lt;span style='float:right;margin: 0;transform: translateX(-12px);'>")});var $searchContainer=$("&lt;div style='display:inline-block; flex-shrink:1; flex-grow:100; min-width:250px; width:50%;'>").append(this.searchBox.$element,this.addBannerButton.$element);this.setAllDropDown=new OO.ui.DropdownWidget({icon:"tag",label:"Set all...",invisibleLabel:!0,menu:{items:[new OO.ui.MenuSectionOptionWidget({label:"Classes"}),new OO.ui.MenuOptionWidget({data:{class:null},label:new OO.ui.HtmlSnippet('&lt;span style="color:#777">(no class)&lt;/span>')})].concat(_toConsumableArray(_config.default.bannerDefaults.classes.map(function(classname){return new OO.ui.MenuOptionWidget({data:{class:classname},label:classname})})),[new OO.ui.MenuSectionOptionWidget({label:"Importances"}),new OO.ui.MenuOptionWidget({data:{importance:null},label:new OO.ui.HtmlSnippet('&lt;span style="color:#777">(no importance)&lt;/span>')})],_toConsumableArray(_config.default.bannerDefaults.importances.map(function(importance){return new OO.ui.MenuOptionWidget({data:{importance:importance},label:importance})})))},$element:$("&lt;span style=\"width:auto;display:inline-block;float:left;margin:0\" title='Set all...'>"),$overlay:this.$overlay}),this.removeAllButton=new OO.ui.ButtonWidget({icon:"trash",title:"Remove all",flags:"destructive"}),this.clearAllButton=new OO.ui.ButtonWidget({icon:"cancel",title:"Clear all",flags:"destructive"}),this.menuButtons=new OO.ui.ButtonGroupWidget({items:[this.removeAllButton,this.clearAllButton],$element:$("&lt;span style='flex:1 0 auto;'>")}),this.menuButtons.$element.prepend(this.setAllDropDown.$element),this.$element.addClass("rater-topBarWidget").css({position:"fixed",width:"100%",background:"#ccc",display:"flex","flex-wrap":"wrap","justify-content":"space-around",margin:"-2px 0 0 0"}).append($searchContainer,this.menuButtons.$element),this.searchBox.connect(this,{enter:"onSearchSelect",choose:"onSearchSelect"}),this.addBannerButton.connect(this,{click:"onSearchSelect"}),this.setAllDropDown.getMenu().connect(this,{choose:"onRatingChoose"}),this.removeAllButton.connect(this,{click:"onRemoveAllClick"}),this.clearAllButton.connect(this,{click:"onClearAllClick"})}OO.inheritClass(TopBarWidget,OO.ui.PanelLayout),TopBarWidget.prototype.onSearchSelect=function(data){this.emit("searchSelect",data)},TopBarWidget.prototype.onRatingChoose=function(item){var data=item.getData();!data.class&amp;&amp;null!==data.class||this.emit("setClasses",data.class),!data.importance&amp;&amp;null!==data.importance||this.emit("setImportances",data.importance)},TopBarWidget.prototype.onRemoveAllClick=function(){this.emit("removeAll")},TopBarWidget.prototype.onClearAllClick=function(){this.emit("clearAll")},TopBarWidget.prototype.setDisabled=function(disable){[this.searchBox,this.addBannerButton,this.setAllDropDown,this.removeAllButton,this.clearAllButton].forEach(function(widget){return widget.setDisabled(disable)})};var _default=TopBarWidget;exports.default=_default},{"../../config":18,"../../getBanners":20,"./SuggestionLookupTextInputWidget":11}],13:[function(require,module,exports){"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var _api=require("../api");function _toConsumableArray(arr){return function(arr){if(Array.isArray(arr))return _arrayLikeToArray(arr)}(arr)||function(iter){if("undefined"!=typeof Symbol&amp;&amp;Symbol.iterator in Object(iter))return Array.from(iter)}(arr)||function(o,minLen){if(!o)return;if("string"==typeof o)return _arrayLikeToArray(o,minLen);var n=Object.prototype.toString.call(o).slice(8,-1);"Object"===n&amp;&amp;o.constructor&amp;&amp;(n=o.constructor.name);if("Map"===n||"Set"===n)return Array.from(n);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return _arrayLikeToArray(o,minLen)}(arr)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function _arrayLikeToArray(arr,len){(null==len||len>arr.length)&amp;&amp;(len=arr.length);for(var i=0,arr2=new Array(len);i&lt;len;i++)arr2[i]=arr[i];return arr2}function LoadDialog(config){LoadDialog.super.call(this,config)}OO.inheritClass(LoadDialog,OO.ui.Dialog),LoadDialog.static.name="loadDialog",LoadDialog.static.title="Loading Rater...",LoadDialog.prototype.initialize=function(){var _this$content$$elemen;LoadDialog.super.prototype.initialize.call(this),this.content=new OO.ui.PanelLayout({padded:!0,expanded:!1}),this.progressBar=new OO.ui.ProgressBarWidget({progress:1}),this.setuptasks=[new OO.ui.LabelWidget({label:"Loading your Rater preferences...",$element:$('&lt;p style="display:block">')}),new OO.ui.LabelWidget({label:"Loading list of project banners...",$element:$('&lt;p style="display:block">')}),new OO.ui.LabelWidget({label:"Loading talkpage wikitext...",$element:$('&lt;p style="display:block">')}),new OO.ui.LabelWidget({label:"Parsing talkpage templates...",$element:$('&lt;p style="display:block">')}),new OO.ui.LabelWidget({label:"Getting templates' parameter data...",$element:$('&lt;p style="display:block">')}),new OO.ui.LabelWidget({label:"Checking subject page...",$element:$('&lt;p style="display:block">')}),new OO.ui.LabelWidget({label:"Retrieving quality prediction...",$element:$('&lt;p style="display:block">')}).toggle()],this.closeButton=new OO.ui.ButtonWidget({label:"Close"}).toggle(),this.setupPromises=[],(_this$content$$elemen=this.content.$element).append.apply(_this$content$$elemen,[this.progressBar.$element,new OO.ui.LabelWidget({label:"Initialising:",$element:$('&lt;strong style="display:block">')}).$element].concat(_toConsumableArray(this.setuptasks.map(function(widget){return widget.$element})),[this.closeButton.$element])),this.$body.append(this.content.$element),this.closeButton.connect(this,{click:"onCloseButtonClick"})},LoadDialog.prototype.onCloseButtonClick=function(){this.close()},LoadDialog.prototype.getBodyHeight=function(){return this.content.$element.outerHeight(!0)},LoadDialog.prototype.incrementProgress=function(amount,maximum){var priorProgress=this.progressBar.getProgress(),incrementedProgress=Math.min(maximum||100,priorProgress+amount);this.progressBar.setProgress(incrementedProgress)},LoadDialog.prototype.addTaskPromiseHandlers=function(taskPromises){var _this=this;taskPromises.forEach(function(promise,index){promise.then(function(){return function(index){var widget=_this.setuptasks[index];widget.setLabel(widget.getLabel()+" Done!");for(var incrementPerStep=100/_this.setuptasks.length/10,step=0;step&lt;10;step++)window.setTimeout(_this.incrementProgress.bind(_this),400*step/10,incrementPerStep)}(index)},function(code,info){return function(index,code,info){var widget=_this.setuptasks[index];widget.setLabel(widget.getLabel()+" Failed. "+(0,_api.makeErrorMsg)(code,info)),_this.closeButton.toggle(!0),_this.updateSize()}(index,code,info)})})},LoadDialog.prototype.getSetupProcess=function(data){var _this2=this;return data=data||{},LoadDialog.super.prototype.getSetupProcess.call(this,data).next(function(){var showOresTask=!!data.ores;_this2.setuptasks[6].toggle(showOresTask);var taskPromises=data.ores?data.promises:data.promises.slice(0,-1);data.isOpened.then(function(){return _this2.addTaskPromiseHandlers(taskPromises)})},this)},LoadDialog.prototype.getHoldProcess=function(data){return(data=data||{}).success?LoadDialog.super.prototype.getHoldProcess.call(this,data).next(800):LoadDialog.super.prototype.getHoldProcess.call(this,data)},LoadDialog.prototype.getTeardownProcess=function(data){var _this3=this;return LoadDialog.super.prototype.getTeardownProcess.call(this,data).first(function(){_this3.setuptasks.forEach(function(setuptask){var currentLabel=setuptask.getLabel();setuptask.setLabel(currentLabel.slice(0,currentLabel.indexOf("...")+3))})},this)};var _default=LoadDialog;exports.default=_default},{"../api":15}],14:[function(require,module,exports){"use strict";function _typeof(obj){return(_typeof="function"==typeof Symbol&amp;&amp;"symbol"==typeof Symbol.iterator?function(obj){return typeof obj}:function(obj){return obj&amp;&amp;"function"==typeof Symbol&amp;&amp;obj.constructor===Symbol&amp;&amp;obj!==Symbol.prototype?"symbol":typeof obj})(obj)}Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var _BannerWidget=_interopRequireDefault(require("./Components/BannerWidget")),_BannerListWidget=_interopRequireDefault(require("./Components/BannerListWidget")),_config=_interopRequireDefault(require("../config")),_api=_interopRequireWildcard(require("../api")),_PrefsFormWidget=_interopRequireDefault(require("./Components/PrefsFormWidget")),_prefs=require("../prefs"),_Template=require("../Template"),_TopBarWidget=_interopRequireDefault(require("./Components/TopBarWidget")),_util=require("../util"),cache=_interopRequireWildcard(require("../cache"));function _getRequireWildcardCache(){if("function"!=typeof WeakMap)return null;var cache=new WeakMap;return _getRequireWildcardCache=function(){return cache},cache}function _interopRequireWildcard(obj){if(obj&amp;&amp;obj.__esModule)return obj;if(null===obj||"object"!==_typeof(obj)&amp;&amp;"function"!=typeof obj)return{default:obj};var cache=_getRequireWildcardCache();if(cache&amp;&amp;cache.has(obj))return cache.get(obj);var newObj={},hasPropertyDescriptor=Object.defineProperty&amp;&amp;Object.getOwnPropertyDescriptor;for(var key in obj)if(Object.prototype.hasOwnProperty.call(obj,key)){var desc=hasPropertyDescriptor?Object.getOwnPropertyDescriptor(obj,key):null;desc&amp;&amp;(desc.get||desc.set)?Object.defineProperty(newObj,key,desc):newObj[key]=obj[key]}return newObj.default=obj,cache&amp;&amp;cache.set(obj,newObj),newObj}function _interopRequireDefault(obj){return obj&amp;&amp;obj.__esModule?obj:{default:obj}}function MainWindow(config){MainWindow.super.call(this,config)}OO.inheritClass(MainWindow,OO.ui.ProcessDialog),MainWindow.static.name="main",MainWindow.static.title=$("&lt;span>").css({"font-weight":"normal"}).append($("&lt;a>").css({"font-weight":"bold"}).attr({href:mw.util.getUrl("WP:RATER"),target:"_blank"}).text("Rater")," (",$("&lt;a>").attr({href:mw.util.getUrl("WT:RATER"),target:"_blank"}).text("talk"),") ",$("&lt;span>").css({"font-size":"90%"}).text("v"+_config.default.script.version)),MainWindow.static.size="large",MainWindow.static.actions=[{label:"X",title:"Close (and discard any changes)",flags:"primary",modes:["edit","diff","preview"]},{action:"showPrefs",flags:"safe",icon:"settings",title:"Preferences",modes:["edit","diff","preview"]},{action:"save",accessKey:"s",label:new OO.ui.HtmlSnippet("&lt;span style='padding:0 1em;'>Save&lt;/span>"),flags:["primary","progressive"],modes:["edit","diff","preview"]},{action:"preview",accessKey:"p",label:"Show preview",modes:["edit","diff"]},{action:"changes",accessKey:"v",label:"Show changes",modes:["edit","preview"]},{action:"back",label:"Back",modes:["diff","preview"]},{action:"savePrefs",label:"Update",flags:["primary","progressive"],modes:"prefs"},{action:"closePrefs",label:"Cancel",flags:"safe",modes:"prefs"}],MainWindow.prototype.initialize=function(){MainWindow.super.prototype.initialize.call(this),this.preferences=_config.default.defaultPrefs,this.topBar=new _TopBarWidget.default({$overlay:this.$overlay}),this.$head.css({height:"73px"}).append(this.topBar.$element),this.oresLabel=new OO.ui.LabelWidget({$element:$("&lt;span style='float:right; padding: 10px; max-width: 50%; text-align: center;'>"),label:$("&lt;span>").append($("&lt;a>").attr({href:mw.util.getUrl("mw:ORES"),target:"_blank"}).append($("&lt;img>").css({"vertical-align":"text-bottom;"}).attr({src:"//upload.wikimedia.org/wikipedia/commons/thumb/5/51/Objective_Revision_Evaluation_Service_logo.svg/40px-Objective_Revision_Evaluation_Service_logo.svg.png",title:"Machine predicted quality from ORES",alt:"ORES logo",width:"20px",height:"20px"}))," ",$("&lt;span class='oresPrediction'>"))}).toggle(!1),this.pagetypeLabel=new OO.ui.LabelWidget({$element:$("&lt;span style='float:right; padding: 10px; max-width: 33.33%; text-align: center;'>")}).toggle(!1),this.$foot.prepend(this.oresLabel.$element,this.pagetypeLabel.$element),this.bannerList=new _BannerListWidget.default({preferences:this.preferences}),this.editLayout=new OO.ui.PanelLayout({padded:!1,expanded:!1,$content:this.bannerList.$element}),this.prefsForm=new _PrefsFormWidget.default,this.prefsLayout=new OO.ui.PanelLayout({padded:!0,expanded:!1,$content:this.prefsForm.$element}),this.parsedContentContainer=new OO.ui.FieldsetLayout({label:"Preview"}),this.parsedContentWidget=new OO.ui.LabelWidget({label:"",$element:$("&lt;div>")}),this.parsedContentContainer.addItems([new OO.ui.FieldLayout(this.parsedContentWidget,{align:"top"})]),this.parsedContentLayout=new OO.ui.PanelLayout({padded:!0,expanded:!1,$content:this.parsedContentContainer.$element}),this.contentArea=new OO.ui.StackLayout({items:[this.editLayout,this.prefsLayout,this.parsedContentLayout],padded:!1,expanded:!1}),this.$body.css({top:"73px"}).append(this.contentArea.$element),this.topBar.connect(this,{searchSelect:"onSearchSelect",setClasses:"onSetClasses",setImportances:"onSetImportances",removeAll:"onRemoveAll",clearAll:"onClearAll"}),this.bannerList.connect(this,{updatedSize:"onBannerListUpdateSize"}),this.$body.attr("tabindex","999").parent().attr("tabindex","999").keydown(function(event){var scrollAmount;switch(event.which){case 33:scrollAmount=this.$body.scrollTop()-.9*this.$body.height();break;case 34:scrollAmount=this.$body.scrollTop()+.9*this.$body.height();break;default:return}this.$body.scrollTop(scrollAmount),event.preventDefault()}.bind(this)),this.prefsForm.connect(this,{resetCache:"onResetCache"})},MainWindow.prototype.onBannerListUpdateSize=function(){var scrollAmount=this.$body.scrollTop();this.updateSize(),this.$body.scrollTop(scrollAmount)},MainWindow.prototype.makeDraggable=function(){var $frameEl=this.$element.find(".oo-ui-window-frame"),$handleEl=this.$element.find(".oo-ui-processDialog-location").css({cursor:"move"}),position={x:0,y:0},constrain=function(val,minVal,maxVal){return val&lt;minVal?minVal:maxVal&lt;val?maxVal:val},pointerdown=!1,dragFrom={},pointer="PointerEvent"in window?"pointer":"mouse";$handleEl.on(pointer+"enter.raterMainWin",function(){return $frameEl.css("will-change","transform")}),$handleEl.on(pointer+"leave.raterMainWin",function(){pointerdown||$frameEl.css("will-change","")}),$handleEl.on(pointer+"down.raterMainWin",function(event){pointerdown=!0,dragFrom.x=event.clientX,dragFrom.y=event.clientY}),$("body").on(pointer+"move.raterMainWin",function(event){if(pointerdown&amp;&amp;null!=dragFrom.x&amp;&amp;null!==dragFrom.y){var val,limit,dx=event.clientX-dragFrom.x,dy=event.clientY-dragFrom.y;dragFrom.x=event.clientX,dragFrom.y=event.clientY,position.x=(val=position.x+dx,limit=window.innerWidth/2+$frameEl.outerWidth()/2-100,constrain(val,-1*limit,limit)),position.y=function(val){var minLimit=-1*(window.innerHeight-$frameEl.outerHeight())/2,maxLimit=(document.documentElement||document).scrollHeight-window.innerHeight/2;return constrain(val,minLimit,maxLimit)}(position.y+dy),$frameEl.css("transform","translate(".concat(position.x,"px, ").concat(position.y,"px)"))}}),$("body").on(pointer+"up.raterMainWin",function(){pointerdown=!1,delete dragFrom.x,delete dragFrom.y,position.x=Math.round(position.x),position.y=Math.round(position.y),$frameEl.css("transform","translate(".concat(position.x,"px, ").concat(position.y,"px)"))})},MainWindow.prototype.getBodyHeight=function(){var currentlayout=this.contentArea.getCurrentItem(),layoutHeight=currentlayout&amp;&amp;currentlayout.$element.outerHeight(!0),contentHeight=currentlayout&amp;&amp;currentlayout.$element.children(":first-child").outerHeight(!0);return Math.max(200,layoutHeight,contentHeight)},MainWindow.prototype.getSetupProcess=function(data){var _this=this;return data=data||{},MainWindow.super.prototype.getSetupProcess.call(this,data).next(function(){_this.makeDraggable(),_this.setPreferences(data.preferences),_this.prefsForm.setPrefValues(data.preferences),_this.subjectPage=data.subjectPage,_this.pageInfo={redirect:data.redirectTarget,isDisambig:data.disambig,hasStubtag:data.stubtag,isArticle:data.isArticle},_this.actions.setMode("edit"),_this.bannerList.oresClass=data.isArticle&amp;&amp;data.isList?"List":data.ores&amp;&amp;data.ores.prediction,_this.bannerList.pageInfo=_this.pageInfo,_this.bannerList.addItems(data.banners.map(function(bannerTemplate){return new _BannerWidget.default(bannerTemplate,{preferences:_this.preferences,$overlay:_this.$overlay,isArticle:_this.pageInfo.isArticle})}));var shellTemplateBanner=_this.bannerList.items.find(function(banner){return banner.isShellTemplate});shellTemplateBanner&amp;&amp;shellTemplateBanner.shellParam1Value&amp;&amp;(shellTemplateBanner.nonStandardTemplates=_this.bannerList.items.reduce(function(bannersList,curBanner){return bannersList.replace(curBanner.wikitext,"")},shellTemplateBanner.shellParam1Value).trim().replace(/\n+/g,"\n")),_this.bannerList.addShellTemplateIfNeeeded().syncShellTemplateWithBiographyBanner(),_this.pageInfo.redirect?_this.pagetypeLabel.setLabel("Redirect page").toggle(!0):_this.pageInfo.isDisambig?_this.pagetypeLabel.setLabel("Disambiguation page").toggle(!0):_this.pageInfo.isArticle&amp;&amp;data.isGA?_this.pagetypeLabel.setLabel("Good article").toggle(!0):_this.pageInfo.isArticle&amp;&amp;data.isFA?_this.pagetypeLabel.setLabel("Featured article").toggle(!0):_this.pageInfo.isArticle&amp;&amp;data.isFL?_this.pagetypeLabel.setLabel("Featured list").toggle(!0):_this.pageInfo.isArticle&amp;&amp;data.isList?_this.pagetypeLabel.setLabel("List article").toggle(!0):data.ores?(_this.oresClass=data.ores.prediction,_this.oresLabel.toggle(!0).$element.find(".oresPrediction").append("Prediction: ",$("&lt;strong>").text(data.ores.prediction),"&amp;nbsp;("+data.ores.probability+")")):_this.pageInfo.isArticle?_this.pagetypeLabel.setLabel("Article page").toggle(!0):_this.pagetypeLabel.setLabel(_this.subjectPage.getNamespacePrefix().slice(0,-1)+" page").toggle(!0),_this.talkWikitext=data.talkWikitext,_this.existingBannerNames=data.banners.map(function(bannerTemplate){return bannerTemplate.name}),_this.talkpage=data.talkpage,_this.updateSize()},this)},MainWindow.prototype.getReadyProcess=function(data){var _this2=this;return data=data||{},MainWindow.super.prototype.getReadyProcess.call(this,data).next(function(){return _this2.topBar.searchBox.focus()})},MainWindow.prototype.getActionProcess=function(action){var _this3=this;if("showPrefs"===action)this.actions.setMode("prefs"),this.contentArea.setItem(this.prefsLayout),this.topBar.setDisabled(!0),this.updateSize();else{if("savePrefs"===action){var updatedPrefs=this.prefsForm.getPrefs();return(new OO.ui.Process).next((0,_prefs.setPrefs)(updatedPrefs).then(function(){_this3.setPreferences(updatedPrefs),_this3.actions.setMode("edit"),_this3.contentArea.setItem(_this3.editLayout),_this3.topBar.setDisabled(!1),_this3.updateSize()},function(code,err){return $.Deferred().reject(new OO.ui.Error($("&lt;div>").append($("&lt;strong style='display:block;'>").text("Could not save preferences."),$("&lt;span style='color:#777'>").text((0,_api.makeErrorMsg)(code,err)))))}))}if("clearCache"===action)return(new OO.ui.Process).next(function(){cache.clearAllItems(),_this3.close({restart:!0})});if("closePrefs"===action)this.actions.setMode("edit"),this.contentArea.setItem(this.editLayout),this.topBar.setDisabled(!1),this.prefsForm.setPrefValues(this.preferences),this.updateSize();else{if("save"===action)return(new OO.ui.Process).next(_api.default.editWithRetry(this.talkpage.getPrefixedText(),{rvsection:0},function(revision){return{section:0,text:_this3.transformTalkWikitext(revision.content),summary:_this3.makeEditSummary(),watchlist:_this3.preferences.watchlist}}).catch(function(code,err){return $.Deferred().reject(new OO.ui.Error($("&lt;div>").append($("&lt;strong style='display:block;'>").text("Could not save your changes."),$("&lt;span style='color:#777'>").text((0,_api.makeErrorMsg)(code,err)))))})).next(function(){return _this3.close({success:!0,upgradedStub:_this3.pageInfo.hasStubtag&amp;&amp;_this3.isRatedAndNotStub()})});if("preview"===action)return(new OO.ui.Process).next(_api.default.post({action:"parse",contentmodel:"wikitext",text:this.transformTalkWikitext(this.talkWikitext)+"\n&lt;hr>\n'''Edit summary:''' "+this.makeEditSummary(),title:this.talkpage.getPrefixedText(),pst:1}).then(function(result){if(!(result&amp;&amp;result.parse&amp;&amp;result.parse.text&amp;&amp;result.parse.text["*"]))return $.Deferred().reject("Empty result");var previewHtmlSnippet=new OO.ui.HtmlSnippet(result.parse.text["*"]);_this3.parsedContentWidget.setLabel(previewHtmlSnippet),_this3.parsedContentContainer.setLabel("Preview:"),_this3.actions.setMode("preview"),_this3.contentArea.setItem(_this3.parsedContentLayout),_this3.topBar.setDisabled(!0),_this3.updateSize()}).catch(function(code,err){return $.Deferred().reject(new OO.ui.Error($("&lt;div>").append($("&lt;strong style='display:block;'>").text("Could not show changes."),$("&lt;span style='color:#777'>").text((0,_api.makeErrorMsg)(code,err)))))}));if("changes"===action)return(new OO.ui.Process).next(_api.default.post({action:"compare",format:"json",fromtext:this.talkWikitext,fromcontentmodel:"wikitext",totext:this.transformTalkWikitext(this.talkWikitext),tocontentmodel:"wikitext",prop:"diff"}).then(function(result){if(!result||!result.compare||!result.compare["*"])return $.Deferred().reject("Empty result");var $diff=$("&lt;table>").addClass("diff").css("width","100%").append($("&lt;tr>").append($("&lt;th>").attr({colspan:"2",scope:"col"}).css("width","50%").text("Latest revision"),$("&lt;th>").attr({colspan:"2",scope:"col"}).css("width","50%").text("New text")),result.compare["*"],$("&lt;tfoot>").append($("&lt;tr>").append($("&lt;td colspan='4'>").append($("&lt;strong>").text("Edit summary: "),_this3.makeEditSummary()))));_this3.parsedContentWidget.setLabel($diff),_this3.parsedContentContainer.setLabel("Changes:"),_this3.actions.setMode("diff"),_this3.contentArea.setItem(_this3.parsedContentLayout),_this3.topBar.setDisabled(!0),_this3.updateSize()}).catch(function(code,err){return $.Deferred().reject(new OO.ui.Error($("&lt;div>").append($("&lt;strong style='display:block;'>").text("Could not show changes."),$("&lt;span style='color:#777'>").text((0,_api.makeErrorMsg)(code,err)))))}));if("back"===action)this.actions.setMode("edit"),this.contentArea.setItem(this.editLayout),this.topBar.setDisabled(!1),this.updateSize();else if(!action&amp;&amp;this.bannerList.changed)return(new OO.ui.Process).next(OO.ui.confirm("Changes made will be discarded.",{title:"Close Rater?"}).then(function(confirmed){return confirmed?_this3.close():null}))}}return MainWindow.super.prototype.getActionProcess.call(this,action)},MainWindow.prototype.getTeardownProcess=function(data){var _this4=this;return MainWindow.super.prototype.getTeardownProcess.call(this,data).first(function(){_this4.bannerList.clearItems(),_this4.topBar.searchBox.setValue(""),_this4.contentArea.setItem(_this4.editLayout),_this4.topBar.setDisabled(!1),_this4.oresLabel.toggle(!1).$element.find(".oresPrediction").empty(),_this4.pagetypeLabel.toggle(!1).setLabel(""),_this4.$element.find(".oo-ui-window-frame").css("transform",""),_this4.$element.find(".oo-ui-processDialog-location").off(".raterMainWin"),$("body").off(".raterMainWin")})},MainWindow.prototype.setPreferences=function(prefs){this.preferences=$.extend({},_config.default.defaultPrefs,prefs),this.bannerList.setPreferences(this.preferences)},MainWindow.prototype.onResetCache=function(){this.executeAction("clearCache")},MainWindow.prototype.onSearchSelect=function(data){var _this5=this;this.topBar.searchBox.pushPending();var name=this.topBar.searchBox.getValue().trim();if(name){var confirmText;if(this.bannerList.items.find(function(banner){return banner.mainText===name||banner.redirectTargetMainText===name}))return this.topBar.searchBox.popPending(),OO.ui.alert("There is already a {{"+name+"}} banner").then(this.searchBox.focus());/^[Ww](?:P|iki[Pp]roject)/.test(name)?"WikiProject Disambiguation"===name&amp;&amp;0!==$("#ca-talk.new").length&amp;&amp;0===this.bannerList.items.length&amp;&amp;(confirmText="New talk pages shouldn't be created if they will only contain the {{WikiProject Disambiguation}} banner. Continue?"):confirmText=new OO.ui.HtmlSnippet("{{"+mw.html.escape(name)+"}} is not a recognised WikiProject banner.&lt;br/>Do you want to continue?"),$.when(!confirmText||OO.ui.confirm(confirmText)).then(function(confirmed){if(confirmed)return _BannerWidget.default.newFromTemplateName(name,data,{preferences:_this5.preferences,$overlay:_this5.$overlay,isArticle:_this5.pageInfo.isArticle}).then(function(banner){_this5.bannerList.addItems([banner]),banner.setChanged(),_this5.updateSize()})}).then(function(){return _this5.topBar.searchBox.setValue("").focus().popPending()})}else this.topBar.searchBox.popPending().focus()},MainWindow.prototype.onSetClasses=function(classVal){var shellTemplate=this.bannerList.items.find(function(banner){return banner.isShellTemplate});shellTemplate&amp;&amp;(shellTemplate.classDropdown.getMenu().selectItemByData(classVal),shellTemplate.classDropdown.setAutofilled(!1)),this.bannerList.items.forEach(function(banner){banner.hasClassRatings&amp;&amp;!banner.isShellTemplate&amp;&amp;(banner.classDropdown.getMenu().selectItemByData(shellTemplate?null:classVal),banner.classDropdown.setAutofilled(!1))})},MainWindow.prototype.onSetImportances=function(importanceVal){this.bannerList.items.forEach(function(banner){banner.hasImportanceRatings&amp;&amp;(banner.importanceDropdown.getMenu().selectItemByData(importanceVal),banner.importanceDropdown.setAutofilled(!1))})},MainWindow.prototype.onRemoveAll=function(){this.bannerList.clearItems()},MainWindow.prototype.onClearAll=function(){this.bannerList.items.forEach(function(banner){return banner.onClearButtonClick()})},MainWindow.prototype.transformTalkWikitext=function(talkWikitext){var _this6=this,bannersWikitext=this.bannerList.makeWikitext();if(!talkWikitext)return bannersWikitext.trim();var talkTemplates=(0,_Template.parseTemplates)(talkWikitext,!0);talkTemplates.forEach(function(template){_this6.existingBannerNames.includes(template.name)&amp;&amp;(talkWikitext=talkWikitext.replace(template.wikitext,"\x01"))});var talkWikitextSections=(talkWikitext=(talkWikitext=talkWikitext.replace("\x01","\x02")).replace(/(?:\s|\n)*\x01(?:\s|\n)*/g,"")).split("\x02").map(function(t){return t.trim()});if(2===talkWikitextSections.length)return(talkWikitextSections[0]+"\n"+bannersWikitext.trim()+"\n"+talkWikitextSections[1]).trim();var tempStr=talkWikitext;return talkTemplates.forEach(function(template){tempStr=tempStr.replace(template.wikitext,"")}),/^#REDIRECT/i.test(talkWikitext)||!tempStr.trim()?talkWikitext.trim()+"\n"+bannersWikitext.trim():bannersWikitext.trim()+"\n"+talkWikitext.trim()},MainWindow.prototype.isRatedAndNotStub=function(){return 0&lt;this.bannerList.items.filter(function(banner){return banner.hasClassRatings&amp;&amp;banner.classDropdown.getValue()&amp;&amp;"Stub"!==banner.classDropdown.getValue()}).length},MainWindow.prototype.makeEditSummary=function(){var _this7=this,removedBanners=[],editedBanners=[],newBanners=[],shortName=function(name){return name.replace("WikiProject ","").replace("Subst:","")},allClasses=(0,_util.uniqueArray)((0,_util.filterAndMap)(this.bannerList.items,function(banner){return banner.hasClassRatings||banner.isShellTemplate},function(banner){return banner.classDropdown.getValue()})),overallClass=1===allClasses.length&amp;&amp;allClasses[0],allImportances=(0,_util.uniqueArray)((0,_util.filterAndMap)(this.bannerList.items,function(banner){return banner.hasImportanceRatings},function(banner){return banner.importanceDropdown.getValue()})),overallImportance=1===allImportances.length&amp;&amp;allImportances[0],someClassesChanged=!1,someImportancesChanged=!1;this.existingBannerNames.forEach(function(name){_this7.bannerList.items.find(function(banner){return banner.name===name||banner.bypassedName===name})||removedBanners.push("\u2212"+shortName(name))}),this.bannerList.items.forEach(function(banner){var isNew=!banner.wikitext;if(isNew||banner.changed){var newClass=banner.hasClassRatings&amp;&amp;(isNew||banner.classChanged)&amp;&amp;banner.classDropdown.getValue();newClass&amp;&amp;(someClassesChanged=!0),overallClass&amp;&amp;(newClass=null);var newImportance=banner.hasImportanceRatings&amp;&amp;(isNew||banner.importanceChanged)&amp;&amp;banner.importanceDropdown.getValue();newImportance&amp;&amp;(someImportancesChanged=!0),overallImportance&amp;&amp;(newImportance=null);var rating=newClass&amp;&amp;newImportance?newClass+"/"+newImportance:newClass||newImportance||"";rating=rating&amp;&amp;" ("+rating+")",isNew?newBanners.push("+"+shortName(banner.name)+rating):editedBanners.push(shortName(banner.name)+rating)}});var overallRating=someClassesChanged&amp;&amp;overallClass&amp;&amp;someImportancesChanged&amp;&amp;overallImportance?overallClass+"/"+overallImportance:someClassesChanged&amp;&amp;overallClass||someImportancesChanged&amp;&amp;overallImportance||"";return"Assessment".concat(overallRating=overallRating&amp;&amp;" ("+overallRating+")",": ").concat([].concat(editedBanners,newBanners,removedBanners).join(", ")).concat(_config.default.script.advert)};var _default=MainWindow;exports.default=_default},{"../Template":3,"../api":15,"../cache":17,"../config":18,"../prefs":21,"../util":23,"./Components/BannerListWidget":4,"./Components/BannerWidget":5,"./Components/PrefsFormWidget":10,"./Components/TopBarWidget":12}],15:[function(require,module,exports){"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.makeErrorMsg=exports.default=void 0;var obj,_config=(obj=require("./config"))&amp;&amp;obj.__esModule?obj:{default:obj};function _typeof(obj){return(_typeof="function"==typeof Symbol&amp;&amp;"symbol"==typeof Symbol.iterator?function(obj){return typeof obj}:function(obj){return obj&amp;&amp;"function"==typeof Symbol&amp;&amp;obj.constructor===Symbol&amp;&amp;obj!==Symbol.prototype?"symbol":typeof obj})(obj)}var API=new mw.Api({ajax:{headers:{"Api-User-Agent":"Rater/"+_config.default.script.version+" ( https://en.wikipedia.org/wiki/User:Evad37/Rater )"}}});API.getORES=function(revisionID){return $.get("https://ores.wikimedia.org/v3/scores/enwiki?models=articlequality&amp;revids="+revisionID)},API.getRaw=function(page){return $.get("https:"+_config.default.mw.wgServer+mw.util.getUrl(page,{action:"raw"})).then(function(data){return data||$.Deferred().reject("ok-but-empty")})};var getPage=function(title,params){return API.get($.extend({action:"query",format:"json",curtimestamp:1,titles:title,prop:"revisions|info",rvprop:"content|timestamp",rvslots:"main"},params)).then(function(response){var page=Object.values(response.query.pages)[0],starttime=response.curtimestamp;return $.Deferred().resolve(page,starttime)})},processPage=function(page,starttime,transform){var basetimestamp=page.revisions&amp;&amp;page.revisions[0].timestamp,simplifiedPage={pageid:page.pageid,missing:""===page.missing,redirect:""===page.redirect,categories:page.categories,ns:page.ns,title:page.title,content:page.revisions&amp;&amp;page.revisions[0].slots.main["*"]};return $.when(transform(simplifiedPage)).then(function(editParams){return $.extend({action:"edit",title:page.title,assert:"user",basetimestamp:basetimestamp,starttimestamp:starttime},editParams)})};API.editWithRetry=function(title,getParams,transform){return getPage(title,getParams).then(function(page,starttime){return processPage(page,starttime,transform)},function(){return getPage(title,getParams).then(processPage,transform)}).then(function(editParams){return API.postWithToken("csrf",editParams).catch(function(errorCode){return"editconflict"===errorCode?API.editWithRetry(title,getParams,transform):API.postWithToken("csrf",editParams)})})};exports.makeErrorMsg=function(first,second){var code,xhr,message;if("object"===_typeof(first)&amp;&amp;"string"==typeof second){var errorObj=first.responseJSON&amp;&amp;first.responseJSON.error;errorObj?(code=errorObj.code,message=errorObj.message):xhr=first}else if("string"==typeof first&amp;&amp;"object"===_typeof(second)){second.error?(code=errorObj.code,message=errorObj.info):"ok-but-empty"===first?(code=null,message="Got an empty response from the server"):xhr=second&amp;&amp;second.xhr}return code&amp;&amp;message?"API error ".concat(code,": ").concat(message):message?"API error: ".concat(message):xhr?"HTTP error ".concat(xhr.status):"string"==typeof first&amp;&amp;"error"!==first&amp;&amp;"string"==typeof second&amp;&amp;"error"!==second?"Error ".concat(first,": ").concat(second):"string"==typeof first&amp;&amp;"error"!==first?"Error: ".concat(first):"Unknown API error"};var _default=API;exports.default=_default},{"./config":18}],16:[function(require,module,exports){"use strict";function _typeof(obj){return(_typeof="function"==typeof Symbol&amp;&amp;"symbol"==typeof Symbol.iterator?function(obj){return typeof obj}:function(obj){return obj&amp;&amp;"function"==typeof Symbol&amp;&amp;obj.constructor===Symbol&amp;&amp;obj!==Symbol.prototype?"symbol":typeof obj})(obj)}Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var _config=_interopRequireDefault(require("./config")),_prefs=require("./prefs"),_api=function(obj){if(obj&amp;&amp;obj.__esModule)return obj;if(null===obj||"object"!==_typeof(obj)&amp;&amp;"function"!=typeof obj)return{default:obj};var cache=_getRequireWildcardCache();if(cache&amp;&amp;cache.has(obj))return cache.get(obj);var newObj={},hasPropertyDescriptor=Object.defineProperty&amp;&amp;Object.getOwnPropertyDescriptor;for(var key in obj)if(Object.prototype.hasOwnProperty.call(obj,key)){var desc=hasPropertyDescriptor?Object.getOwnPropertyDescriptor(obj,key):null;desc&amp;&amp;(desc.get||desc.set)?Object.defineProperty(newObj,key,desc):newObj[key]=obj[key]}newObj.default=obj,cache&amp;&amp;cache.set(obj,newObj);return newObj}(require("./api")),_setup=_interopRequireDefault(require("./setup"));function _getRequireWildcardCache(){if("function"!=typeof WeakMap)return null;var cache=new WeakMap;return _getRequireWildcardCache=function(){return cache},cache}function _interopRequireDefault(obj){return obj&amp;&amp;obj.__esModule?obj:{default:obj}}function _default(){return(0,_prefs.getPrefs)().then(function(prefs){if(prefs.autostart&amp;&amp;((prefs.autostartRedirects||!window.location.search.includes("redirect=no"))&amp;&amp;!/(action|diff|oldid)/.test(window.location.search)&amp;&amp;"Main Page"!==mw.Title.newFromText(_config.default.mw.wgPageName).getSubjectPage().getPrefixedText()&amp;&amp;(!prefs.autostartNamespaces||!prefs.autostartNamespaces.length||prefs.autostartNamespaces.includes(_config.default.mw.wgNamespaceNumber)))){if($("#ca-talk.new").length)return(0,_setup.default)();var talkTitle=mw.Title.newFromText(_config.default.mw.wgPageName).getTalkPage();return _api.default.get({action:"query",format:"json",prop:"templates",titles:talkTitle.getPrefixedText(),tlnamespace:"10",tllimit:"500",indexpageids:1}).then(function(result){var id=result.query.pageids,templates=result.query.pages[id].templates;return templates&amp;&amp;templates.some(function(template){return/(WikiProject|WPBanner)/.test(template.title)})?void 0:(0,_setup.default)()},function(code,jqxhr){return console.warn(""),$.Deferred().reject()})}})}exports.default=_default},{"./api":15,"./config":18,"./prefs":21,"./setup":22}],17:[function(require,module,exports){"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.clearAllItems=exports.clearInvalidItems=exports.clearItemIfInvalid=exports.read=exports.write=void 0;var _util=require("./util");exports.write=function(key,val,staleDays,expiryDays){try{var staleDuration=864e5*(staleDays||1),expiryDuration=864e5*(expiryDays||30),stringVal=JSON.stringify({value:val,staleDate:new Date(Date.now()+staleDuration).toISOString(),expiryDate:new Date(Date.now()+expiryDuration).toISOString()});localStorage.setItem("Rater-"+key,stringVal)}catch(e){}};var read=function(key){var val;try{var stringVal=localStorage.getItem("Rater-"+key);""!==stringVal&amp;&amp;(val=JSON.parse(stringVal))}catch(e){console.log("[Rater] error reading "+key+" from localStorage cache:"),console.log("\t"+e.name+" message: "+e.message+(e.at?" at: "+e.at:"")+(e.text?" text: "+e.text:""))}return val||null};exports.read=read;var isRaterKey=function(key){return key&amp;&amp;0===key.indexOf("Rater-")},clearItemIfInvalid=function(key){if(isRaterKey(key)){var item=read(key.replace("Rater-",""));(!item||!item.expiryDate||(0,_util.isAfterDate)(item.expiryDate))&amp;&amp;localStorage.removeItem(key)}};exports.clearItemIfInvalid=clearItemIfInvalid;exports.clearInvalidItems=function(){for(var i=localStorage.length;0&lt;=i;i--)setTimeout(clearItemIfInvalid,100,localStorage.key(i))};exports.clearAllItems=function(){for(var i=localStorage.length;0&lt;=i;i--){var key=localStorage.key(i);isRaterKey(key)&amp;&amp;localStorage.removeItem(key)}}},{"./util":23}],18:[function(require,module,exports){"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var version=require("../package.json").version,_default={script:{advert:" ([[WP:RATER#".concat(version,"|Rater]])"),version:version},defaultPrefs:{autostart:!1,autostartRedirects:!1,autostartNamespaces:[0],minForShell:1,bypassRedirects:!0,autofillClassFromOthers:!0,autofillClassFromOres:!0,autofillImportance:!0,collapseParamsLowerLimit:6,watchlist:"preferences"},mw:mw.config.get(["skin","wgPageName","wgNamespaceNumber","wgUserName","wgFormattedNamespaces","wgMonthNames","wgRevisionId","wgScriptPath","wgServer","wgCategories","wgIsMainPage"]),bannerDefaults:{classes:["FA","FL","A","GA","B","C","Start","Stub","List"],importances:["Top","High","Mid","Low"],extendedClasses:["Category","Draft","File","FM","Portal","Project","Template","Bplus","Future","Current","Disambig","NA","Redirect","Book"],extendedImportances:["Top","High","Mid","Low","Bottom","NA"]},customBanners:{"WikiProject Military history":{classes:["FA","FL","A","GA","B","C","Start","Stub","List","AL","BL","CL","Category","Draft","File","Portal","Project","Template","Disambig","Redirect","Book"],importances:[]},"WikiProject Portals":{classes:["FPo","Complete","Substantial","Basic","Incomplete","Meta","List","Category","Draft","File","Project","Template","Disambig","NA","Redirect"],importances:["Top","High","Mid","Low","Bottom","NA"]},"WikiProject Video games":{classes:["FA","FL","FM","GA","B","C","Start","Stub","List","Category","Draft","File","Portal","Project","Template","Disambig","Redirect"],importances:["Top","High","Mid","Low","NA"]}},shellTemplates:["WikiProject banner shell","WikiProjectBanners","WikiProject Banners","WPB","WPBS","Wikiprojectbannershell","WikiProject Banner Shell","Wpb","WPBannerShell","Wpbs","Wikiprojectbanners","WP Banner Shell","WP banner shell","Bannershell","Wikiproject banner shell","WikiProject Banners Shell","WikiProjectBanner Shell","WikiProjectBannerShell","WikiProject BannerShell","WikiprojectBannerShell","WikiProject banner shell/redirect","WikiProject Shell","Banner shell","Scope shell","Project shell","WikiProject banner"],defaultParameterData:{auto:{label:{en:"Auto-rated"},description:{en:"Automatically rated by a bot. Allowed values: ['yes']."},autovalue:"yes"},listas:{label:{en:"List as"},description:{en:"Sortkey for talk page"}},small:{label:{en:"Small?"},description:{en:"Display a small version. Allowed values: ['yes']."},autovalue:"yes"},attention:{label:{en:"Attention required?"},description:{en:"Immediate attention required. Allowed values: ['yes']."},autovalue:"yes"},"needs-image":{label:{en:"Needs image?"},description:{en:"Request that an image or photograph of the subject be added to the article. Allowed values: ['yes']."},aliases:["needs-photo"],autovalue:"yes",suggested:!0},"needs-infobox":{label:{en:"Needs infobox?"},description:{en:"Request that an infobox be added to the article. Allowed values: ['yes']."},aliases:["needs-photo"],autovalue:"yes",suggested:!0}}};exports.default=_default},{"../package.json":1}],19:[function(require,module,exports){"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;exports.default="table.diff, td.diff-otitle, td.diff-ntitle { table-layout: auto !important;; }\ntd.diff-otitle, td.diff-ntitle { text-align: center; }\ntd.diff-marker { text-align: right; font-weight: bold; font-size: 1.25em; }\ntd.diff-lineno { font-weight: bold; }\ntd.diff-addedline, td.diff-deletedline, td.diff-context { font-size: 88%; vertical-align: top; white-space: -moz-pre-wrap; white-space: pre-wrap; }\ntd.diff-addedline, td.diff-deletedline { border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; }\ntd.diff-addedline { border-color: #a3d3ff; }\ntd.diff-deletedline { border-color: #ffe49c; }\ntd.diff-context { background: #f3f3f3; color: #333333; border-style: solid; border-width: 1px 1px 1px 4px; border-color: #e6e6e6; border-radius: 0.33em; }\n.diffchange { font-weight: bold; text-decoration: none; }\ntable.diff {\n border: none;\n width: 98%; border-spacing: 4px;\n table-layout: fixed; /* Ensures that colums are of equal width */\n}\ntd.diff-addedline .diffchange, td.diff-deletedline .diffchange { border-radius: 0.33em; padding: 0.25em 0; }\ntd.diff-addedline .diffchange {\tbackground: #d8ecff; }\ntd.diff-deletedline .diffchange { background: #feeec8; }\ntable.diff td {\tpadding: 0.33em 0.66em; }\ntable.diff col.diff-marker { width: 2%; }\ntable.diff col.diff-content { width: 48%; }\ntable.diff td div {\n /* Force-wrap very long lines such as URLs or page-widening char strings. */\n word-wrap: break-word;\n /* As fallback (FF&lt;3.5, Opera &lt;10.5), scrollbars will be added for very wide cells\n instead of text overflowing or widening */\n overflow: auto;\n}html body.rater-mainWindow-open {\n\tposition: unset;\n\toverflow: unset;\n}\nhtml body.rater-mainWindow-open .oo-ui-windowManager-modal > .oo-ui-dialog.oo-ui-window-active {\n position: static;\n padding: 0;\n}html body.rater-mainWindow-open .oo-ui-dialog.oo-ui-window-active > div {\n z-index: 110;\n transition: all 0.25s ease-out 0s, transform 0s !important\n}\nhtml body.rater-mainWindow-open #mw-teleport-target {\n top: 0;\n bottom: 0;\n left: 0;\n right:0;\n}\n"},{}],20:[function(require,module,exports){"use strict";function _typeof(obj){return(_typeof="function"==typeof Symbol&amp;&amp;"symbol"==typeof Symbol.iterator?function(obj){return typeof obj}:function(obj){return obj&amp;&amp;"function"==typeof Symbol&amp;&amp;obj.constructor===Symbol&amp;&amp;obj!==Symbol.prototype?"symbol":typeof obj})(obj)}Object.defineProperty(exports,"__esModule",{value:!0}),exports.getBannerNames=void 0;var _api=_interopRequireWildcard(require("./api")),_util=require("./util"),cache=_interopRequireWildcard(require("./cache"));function _getRequireWildcardCache(){if("function"!=typeof WeakMap)return null;var cache=new WeakMap;return _getRequireWildcardCache=function(){return cache},cache}function _interopRequireWildcard(obj){if(obj&amp;&amp;obj.__esModule)return obj;if(null===obj||"object"!==_typeof(obj)&amp;&amp;"function"!=typeof obj)return{default:obj};var cache=_getRequireWildcardCache();if(cache&amp;&amp;cache.has(obj))return cache.get(obj);var newObj={},hasPropertyDescriptor=Object.defineProperty&amp;&amp;Object.getOwnPropertyDescriptor;for(var key in obj)if(Object.prototype.hasOwnProperty.call(obj,key)){var desc=hasPropertyDescriptor?Object.getOwnPropertyDescriptor(obj,key):null;desc&amp;&amp;(desc.get||desc.set)?Object.defineProperty(newObj,key,desc):newObj[key]=obj[key]}return newObj.default=obj,cache&amp;&amp;cache.set(obj,newObj),newObj}var cacheBanners=function(banners){cache.write("banners",banners,2,60)},getListOfBannersFromApi=function(){var finishedPromise=$.Deferred(),querySkeleton={action:"query",format:"json",list:"categorymembers",cmprop:"title",cmnamespace:"10",cmlimit:"500"},categories=[{title:"Category:WikiProject banners with quality assessment",abbreviation:"withRatings",banners:[],processed:$.Deferred()},{title:"Category:WikiProject banners without quality assessment",abbreviation:"withoutRatings",banners:[],processed:$.Deferred()},{title:"Category:WikiProject banner wrapper templates",abbreviation:"wrappers",banners:[],processed:$.Deferred()},{title:"Category:WikiProject banner templates not based on WPBannerMeta",abbreviation:"notWPBM",banners:[],processed:$.Deferred()},{title:"Category:Inactive WikiProject banners",abbreviation:"inactive",banners:[],processed:$.Deferred()},{title:"Category:Wrapper templates for WikiProject Women in Red",abbreviation:"wir",banners:[],processed:$.Deferred()}],processQuery=function(result,catIndex){if(result.query&amp;&amp;result.query.categorymembers){var resultTitles=result.query.categorymembers.map(function(info){return info.title.slice(9)});Array.prototype.push.apply(categories[catIndex].banners,resultTitles),result.continue?doApiQuery($.extend(categories[catIndex].query,result.continue),catIndex):categories[catIndex].processed.resolve()}else finishedPromise.reject()},doApiQuery=function(q,catIndex){_api.default.get(q).done(function(result){processQuery(result,catIndex)}).fail(function(code,jqxhr){console.warn("[Rater] "+(0,_api.makeErrorMsg)(code,jqxhr,"Could not retrieve pages from [[:"+q.cmtitle+"]]")),finishedPromise.reject()})};return categories.forEach(function(cat,index,arr){cat.query=$.extend({cmtitle:cat.title},querySkeleton),$.when(arr[index-1]&amp;&amp;arr[index-1].processed||!0).then(function(){doApiQuery(cat.query,index)})}),categories[categories.length-1].processed.then(function(){var banners={};categories.forEach(function(catObject){banners[catObject.abbreviation]=catObject.banners}),finishedPromise.resolve(banners)}),finishedPromise};exports.getBannerNames=function(){return((cachedBanners=cache.read("banners"))&amp;&amp;cachedBanners.value&amp;&amp;cachedBanners.staleDate?((0,_util.isAfterDate)(cachedBanners.staleDate)&amp;&amp;getListOfBannersFromApi().then(cacheBanners),$.Deferred().resolve(cachedBanners.value)):$.Deferred().reject()).then(function(banners){return banners.withRatings&amp;&amp;banners.withoutRatings&amp;&amp;banners.wrappers&amp;&amp;banners.notWPBM&amp;&amp;banners.inactive&amp;&amp;banners.wir?banners:(getListOfBannersFromApi().then(cacheBanners),$.extend({withRatings:[],withoutRatings:[],wrappers:[],notWPBM:[],inactive:[],wir:[]},banners))}).catch(function(){var bannersPromise=getListOfBannersFromApi();return bannersPromise.then(cacheBanners),bannersPromise});var cachedBanners}},{"./api":15,"./cache":17,"./util":23}],21:[function(require,module,exports){"use strict";function _typeof(obj){return(_typeof="function"==typeof Symbol&amp;&amp;"symbol"==typeof Symbol.iterator?function(obj){return typeof obj}:function(obj){return obj&amp;&amp;"function"==typeof Symbol&amp;&amp;obj.constructor===Symbol&amp;&amp;obj!==Symbol.prototype?"symbol":typeof obj})(obj)}Object.defineProperty(exports,"__esModule",{value:!0}),exports.setPrefs=exports.getPrefs=exports.default=void 0;var _api=_interopRequireDefault(require("./api")),_util=require("./util"),_config=_interopRequireDefault(require("./config")),cache=function(obj){if(obj&amp;&amp;obj.__esModule)return obj;if(null===obj||"object"!==_typeof(obj)&amp;&amp;"function"!=typeof obj)return{default:obj};var cache=_getRequireWildcardCache();if(cache&amp;&amp;cache.has(obj))return cache.get(obj);var newObj={},hasPropertyDescriptor=Object.defineProperty&amp;&amp;Object.getOwnPropertyDescriptor;for(var key in obj)if(Object.prototype.hasOwnProperty.call(obj,key)){var desc=hasPropertyDescriptor?Object.getOwnPropertyDescriptor(obj,key):null;desc&amp;&amp;(desc.get||desc.set)?Object.defineProperty(newObj,key,desc):newObj[key]=obj[key]}newObj.default=obj,cache&amp;&amp;cache.set(obj,newObj);return newObj}(require("./cache"));function _getRequireWildcardCache(){if("function"!=typeof WeakMap)return null;var cache=new WeakMap;return _getRequireWildcardCache=function(){return cache},cache}function _interopRequireDefault(obj){return obj&amp;&amp;obj.__esModule?obj:{default:obj}}var prefsPage="User:".concat(mw.config.get("wgUserName"),"/raterPrefs.json"),writePrefsToCache=function(prefs){return cache.write("prefs",prefs,1/24/60*1,1/24/60*1)},getPrefs=function(){return((cachedPrefs=cache.read("prefs"))&amp;&amp;cachedPrefs.value&amp;&amp;cachedPrefs.staleDate&amp;&amp;!(0,_util.isAfterDate)(cachedPrefs.staleDate)?$.Deferred().resolve(cachedPrefs.value):$.Deferred().reject()).then(function(prefs){return $.Deferred().resolve(prefs)},function(){return _api.default.get({action:"query",format:"json",prop:"revisions",titles:prefsPage,rvprop:"content",rvslots:"main"}).then(function(response){var prefs,page=response.query.pages[Object.keys(response.query.pages)[0]];if(!page.pageid||""===page.missing)return _config.default.defaultPrefs;try{prefs=JSON.parse(page.revisions[0].slots.main["*"])}catch(e){return $.Deferred().reject("JSON-parsing-error",e)}return writePrefsToCache(prefs),prefs})});var cachedPrefs},setPrefs=function(updatedPrefs){return _api.default.editWithRetry(prefsPage,null,function(){return{text:JSON.stringify(updatedPrefs),summary:"Saving Rater preferences "+_config.default.script.advert}}).then(function(){return writePrefsToCache(updatedPrefs)})},_default={get:exports.getPrefs=getPrefs,set:exports.setPrefs=setPrefs};exports.default=_default},{"./api":15,"./cache":17,"./config":18,"./util":23}],22:[function(require,module,exports){"use strict";function _typeof(obj){return(_typeof="function"==typeof Symbol&amp;&amp;"symbol"==typeof Symbol.iterator?function(obj){return typeof obj}:function(obj){return obj&amp;&amp;"function"==typeof Symbol&amp;&amp;obj.constructor===Symbol&amp;&amp;obj!==Symbol.prototype?"symbol":typeof obj})(obj)}Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var _config=_interopRequireDefault(require("./config")),_api=_interopRequireDefault(require("./api")),_Template=require("./Template"),_getBanners=require("./getBanners"),cache=function(obj){if(obj&amp;&amp;obj.__esModule)return obj;if(null===obj||"object"!==_typeof(obj)&amp;&amp;"function"!=typeof obj)return{default:obj};var cache=_getRequireWildcardCache();if(cache&amp;&amp;cache.has(obj))return cache.get(obj);var newObj={},hasPropertyDescriptor=Object.defineProperty&amp;&amp;Object.getOwnPropertyDescriptor;for(var key in obj)if(Object.prototype.hasOwnProperty.call(obj,key)){var desc=hasPropertyDescriptor?Object.getOwnPropertyDescriptor(obj,key):null;desc&amp;&amp;(desc.get||desc.set)?Object.defineProperty(newObj,key,desc):newObj[key]=obj[key]}newObj.default=obj,cache&amp;&amp;cache.set(obj,newObj);return newObj}(require("./cache")),_windowManager=_interopRequireDefault(require("./windowManager")),_prefs=require("./prefs"),_util=require("./util");function _getRequireWildcardCache(){if("function"!=typeof WeakMap)return null;var cache=new WeakMap;return _getRequireWildcardCache=function(){return cache},cache}function _interopRequireDefault(obj){return obj&amp;&amp;obj.__esModule?obj:{default:obj}}function ownKeys(object,enumerableOnly){var keys=Object.keys(object);if(Object.getOwnPropertySymbols){var symbols=Object.getOwnPropertySymbols(object);enumerableOnly&amp;&amp;(symbols=symbols.filter(function(sym){return Object.getOwnPropertyDescriptor(object,sym).enumerable})),keys.push.apply(keys,symbols)}return keys}function _defineProperty(obj,key,value){return key in obj?Object.defineProperty(obj,key,{value:value,enumerable:!0,configurable:!0,writable:!0}):obj[key]=value,obj}function _toConsumableArray(arr){return function(arr){if(Array.isArray(arr))return _arrayLikeToArray(arr)}(arr)||function(iter){if("undefined"!=typeof Symbol&amp;&amp;Symbol.iterator in Object(iter))return Array.from(iter)}(arr)||function(o,minLen){if(!o)return;if("string"==typeof o)return _arrayLikeToArray(o,minLen);var n=Object.prototype.toString.call(o).slice(8,-1);"Object"===n&amp;&amp;o.constructor&amp;&amp;(n=o.constructor.name);if("Map"===n||"Set"===n)return Array.from(n);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return _arrayLikeToArray(o,minLen)}(arr)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function _arrayLikeToArray(arr,len){(null==len||len>arr.length)&amp;&amp;(len=arr.length);for(var i=0,arr2=new Array(len);i&lt;len;i++)arr2[i]=arr[i];return arr2}function _default(clickEvent){clickEvent&amp;&amp;clickEvent.preventDefault();var setupCompletedPromise=$.Deferred(),currentPage=mw.Title.newFromText(_config.default.mw.wgPageName),talkPage=currentPage&amp;&amp;currentPage.getTalkPage(),subjectPage=currentPage&amp;&amp;currentPage.getSubjectPage(),subjectIsArticle=_config.default.mw.wgNamespaceNumber&lt;=1,prefsPromise=(0,_prefs.getPrefs)(),bannersPromise=(0,_getBanners.getBannerNames)(),loadTalkPromise=_api.default.get({action:"query",prop:"revisions",rvprop:"content",rvsection:"0",titles:talkPage.getPrefixedText(),indexpageids:1}).then(function(result){var id=result.query.pageids;return id&lt;0?"":result.query.pages[id].revisions[0]["*"]}),parseTalkPromise=loadTalkPromise.then(function(wikitext){return(0,_Template.parseTemplates)(wikitext,!0)}).then(function(templates){return templates.filter(function(template){return null!==template.getTitle()})}).then(function(templates){return(0,_Template.getWithRedirectTo)(templates)}).then(function(templates){return bannersPromise.then(function(allBanners){return(0,_util.filterAndMap)(templates,function(template){if(template.isShellTemplate())return!0;var mainText=template.redirectTarget?template.redirectTarget.getMainText():template.getTitle().getMainText();return allBanners.withRatings.includes(mainText)||allBanners.withoutRatings.includes(mainText)||allBanners.wrappers.includes(mainText)||allBanners.notWPBM.includes(mainText)||allBanners.inactive.includes(mainText)||allBanners.wir.includes(mainText)},function(template){var mainText=template.redirectTarget?template.redirectTarget.getMainText():template.getTitle().getMainText();return allBanners.wrappers.includes(mainText)&amp;&amp;(template.redirectTarget=mw.Title.newFromText("Template:Subst:"+mainText)),(allBanners.withoutRatings.includes(mainText)||allBanners.wir.includes(mainText))&amp;&amp;(template.withoutRatings=!0),allBanners.inactive.includes(mainText)&amp;&amp;(template.inactiveProject=!0),template})})}),templateDetailsPromise=parseTalkPromise.then(function(templates){return $.when.apply(null,[].concat(_toConsumableArray(templates.map(function(template){return template.isShellTemplate()?null:template.setClassesAndImportances()})),_toConsumableArray(templates.map(function(template){return template.setParamDataAndSuggestions()})))).then(function(){return templates.forEach(function(template){return template.addMissingParams()}),templates})}),subjectPageCheckPromise=_api.default.get({action:"query",format:"json",formatversion:"2",prop:"categories",titles:subjectPage.getPrefixedText(),redirects:1,clcategories:["Category:All disambiguation pages","Category:All stub articles","Category:Good articles","Category:Featured articles","Category:Featured lists"]}).then(function(response){if(!response||!response.query||!response.query.pages)return null;var redirectTarget=response.query.redirects&amp;&amp;response.query.redirects[0].to||!1;if(redirectTarget||!subjectIsArticle)return{redirectTarget:redirectTarget};var page=response.query.pages[0],hasCategory=function(category){return page.categories&amp;&amp;page.categories.find(function(cat){return cat.title==="Category:"+category})};return{redirectTarget:redirectTarget,disambig:hasCategory("All disambiguation pages"),stubtag:hasCategory("All stub articles"),isGA:hasCategory("Good articles"),isFA:hasCategory("Featured articles"),isFL:hasCategory("Featured lists"),isList:!hasCategory("Featured lists")&amp;&amp;/^Lists? of/.test(subjectPage.getPrefixedText())}}).catch(function(){return null}),shouldGetOres=subjectIsArticle;if(shouldGetOres)var oresPromise=(currentPage.isTalkPage()?_api.default.get({action:"query",format:"json",prop:"revisions",titles:subjectPage.getPrefixedText(),rvprop:"ids",indexpageids:1}).then(function(result){if(result.query.redirects)return!1;var id=result.query.pageids,page=result.query.pages[id];return""!==page.missing&amp;&amp;(id&lt;0?$.Deferred().reject():page.revisions[0].revid)}):$.Deferred().resolve(_config.default.mw.wgRevisionId)).then(function(latestRevId){return!!latestRevId&amp;&amp;_api.default.getORES(latestRevId).then(function(result){var data=result.enwiki.scores[latestRevId].articlequality;if(data.error)return $.Deferred().reject(data.error.type,data.error.message);var prediction=data.score.prediction,probabilities=data.score.probability;return"FA"===prediction||"GA"===prediction?{prediction:"B or higher",probability:(100*(probabilities.FA+probabilities.GA+probabilities.B)).toFixed(1)+"%"}:{prediction:prediction,probability:(100*probabilities[prediction]).toFixed(1)+"%"}}).catch(function(){return null})});var isOpenedPromise=$.Deferred(),loadDialogWin=_windowManager.default.openWindow("loadDialog",{promises:[bannersPromise,loadTalkPromise,parseTalkPromise,templateDetailsPromise,subjectPageCheckPromise,shouldGetOres&amp;&amp;oresPromise],ores:shouldGetOres,isOpened:isOpenedPromise});return loadDialogWin.opened.then(isOpenedPromise.resolve),$.when(prefsPromise,loadTalkPromise,templateDetailsPromise,subjectPageCheckPromise,shouldGetOres&amp;&amp;oresPromise).then(function(preferences,talkWikitext,banners,subjectPageCheck,oresPredicition){var result={success:!0,talkpage:talkPage,subjectPage:subjectPage,talkWikitext:talkWikitext,banners:banners,preferences:preferences,isArticle:subjectIsArticle};subjectPageCheck&amp;&amp;(result=function(target){for(var i=1;i&lt;arguments.length;i++){var source=null!=arguments[i]?arguments[i]:{};i%2?ownKeys(Object(source),!0).forEach(function(key){_defineProperty(target,key,source[key])}):Object.getOwnPropertyDescriptors?Object.defineProperties(target,Object.getOwnPropertyDescriptors(source)):ownKeys(Object(source)).forEach(function(key){Object.defineProperty(target,key,Object.getOwnPropertyDescriptor(source,key))})}return target}({},result,{},subjectPageCheck)),!oresPredicition||!subjectPageCheck||subjectPageCheck.isGA||subjectPageCheck.isFA||subjectPageCheck.isFL||(result.ores=oresPredicition),_windowManager.default.closeWindow("loadDialog",result)}),loadDialogWin.closed.then(function(data){data&amp;&amp;data.success?setupCompletedPromise.resolve(data):data&amp;&amp;data.error?setupCompletedPromise.reject(data.error.code,data.error.info):setupCompletedPromise.resolve(null),cache.clearInvalidItems()}),setupCompletedPromise}exports.default=_default},{"./Template":3,"./api":15,"./cache":17,"./config":18,"./getBanners":20,"./prefs":21,"./util":23,"./windowManager":24}],23:[function(require,module,exports){"use strict";function _toConsumableArray(arr){return function(arr){if(Array.isArray(arr))return _arrayLikeToArray(arr)}(arr)||function(iter){if("undefined"!=typeof Symbol&amp;&amp;Symbol.iterator in Object(iter))return Array.from(iter)}(arr)||function(o,minLen){if(!o)return;if("string"==typeof o)return _arrayLikeToArray(o,minLen);var n=Object.prototype.toString.call(o).slice(8,-1);"Object"===n&amp;&amp;o.constructor&amp;&amp;(n=o.constructor.name);if("Map"===n||"Set"===n)return Array.from(n);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return _arrayLikeToArray(o,minLen)}(arr)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function _arrayLikeToArray(arr,len){(null==len||len>arr.length)&amp;&amp;(len=arr.length);for(var i=0,arr2=new Array(len);i&lt;len;i++)arr2[i]=arr[i];return arr2}Object.defineProperty(exports,"__esModule",{value:!0}),exports.mostFrequent=function(array){if(!array||!Array.isArray(array)||0===array.length)return null;var map={},mostFreq=null;return array.forEach(function(item){map[item]=(map[item]||0)+1,(null===mostFreq||map[item]>map[mostFreq])&amp;&amp;(mostFreq=item)}),mostFreq},exports.uniqueArray=function(array){if(!array||!Array.isArray(array)||0===array.length)return[];var seen={},unique=[];return array.forEach(function(item){seen[item]||(unique.push(item),seen[item]=!0)}),unique},exports.classMask=function(classVal){if(!classVal)return classVal;switch(classVal.toLowerCase()){case"fa":case"fl":case"a":case"ga":case"b":case"c":case"na":case"fm":case"al":case"bl":case"cl":return classVal.toUpperCase();case"start":case"stub":case"list":case"portal":case"project":case"draft":case"book":case"future":case"current":case"complete":case"substantial":case"basic":case"incomplete":case"meta":return classVal.slice(0,1).toUpperCase()+classVal.slice(1).toLowerCase();case"image":case"img":case"file":return"File";case"category":case"cat":case"categ":return"Category";case"disambiguation":case"disambig":case"disamb":case"dab":return"Disambig";case"redirect":case"redir":case"red":return"Redirect";case"template":case"temp":case"tpl":return"Template";case"bplus":case"b+":return"Bplus";case"fpo":return"FPo";default:return classVal}},exports.importanceMask=function(importance){return importance?"na"!==importance.toLowerCase()?importance.slice(0,1).toUpperCase()+importance.slice(1).toLowerCase():"NA":importance},exports.normaliseYesNo=exports.filterAndMap=exports.isAfterDate=void 0;exports.isAfterDate=function(dateString){return new Date(dateString)&lt;new Date};var yesWords=["add","added","affirm","affirmed","include","included","on","true","yes","y","1"],noWords=["decline","declined","exclude","excluded","false","none","not","no","n","off","omit","omitted","remove","removed","0"];exports.normaliseYesNo=function(val){if(null==val)return val;var trimmedLcVal=val.trim().toLowerCase();return yesWords.includes(trimmedLcVal)?"yes":noWords.includes(trimmedLcVal)?"no":trimmedLcVal};exports.filterAndMap=function(array,filterPredicate,mapTransform){return array.reduce(function(accumulated,currentVal,currentIndex){return filterPredicate(currentVal,currentIndex,array)?[].concat(_toConsumableArray(accumulated),[mapTransform(currentVal,currentIndex,array)]):accumulated},[])}},{}],24:[function(require,module,exports){"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var _LoadDialog=_interopRequireDefault(require("./Windows/LoadDialog")),_MainWindow=_interopRequireDefault(require("./Windows/MainWindow"));function _interopRequireDefault(obj){return obj&amp;&amp;obj.__esModule?obj:{default:obj}}var factory=new OO.Factory;factory.register(_LoadDialog.default),factory.register(_MainWindow.default);var manager=new OO.ui.WindowManager({factory:factory});$(document.body).append(manager.$element);var _default=manager;exports.default=_default},{"./Windows/LoadDialog":13,"./Windows/MainWindow":14}]},{},[2]); /* &lt;/nowiki> */</pre></div> <!-- NewPP limit report Parsed by mw‐web.codfw.main‐5f58cd8b6‐bs464 Cached time: 20241203195917 Cache expiry: 2592000 Reduced expiry: false Complications: [] CPU time usage: 0.007 seconds Real time usage: 0.007 seconds Preprocessor visited node count: 4/1000000 Post‐expand include size: 0/2097152 bytes Template argument size: 0/2097152 bytes Highest expansion depth: 2/100 Expensive parser function count: 0/500 Unstrip recursion depth: 0/20 Unstrip post‐expand size: 124606/5000000 bytes Number of Wikibase entities loaded: 0/400 --> <!-- Transclusion expansion time report (%,ms,calls,template) 100.00% 0.000 1 -total --> </div><!--esi <esi:include src="/esitest-fa8a495983347898/content" /> --><noscript><img src="https://login.wikimedia.org/wiki/Special:CentralAutoLogin/start?type=1x1&amp;useformat=desktop" alt="" width="1" height="1" style="border: none; position: absolute;"></noscript> <div class="printfooter" data-nosnippet="">Retrieved from "<a dir="ltr" href="https://en.wikipedia.org/w/index.php?title=User:Evad37/rater/sandbox/app.js&amp;oldid=1249460456">https://en.wikipedia.org/w/index.php?title=User:Evad37/rater/sandbox/app.js&amp;oldid=1249460456</a>"</div></div> <div id="catlinks" class="catlinks catlinks-allhidden" data-mw="interface"></div> </div> </main> </div> <div class="mw-footer-container"> <footer id="footer" class="mw-footer" > <ul id="footer-info"> <li id="footer-info-lastmod"> This page was last edited on 5 October 2024, at 01:22<span class="anonymous-show">&#160;(UTC)</span>.</li> <li id="footer-info-copyright">Text is available under the <a href="/wiki/Wikipedia:Text_of_the_Creative_Commons_Attribution-ShareAlike_4.0_International_License" title="Wikipedia:Text of the Creative Commons Attribution-ShareAlike 4.0 International License">Creative Commons Attribution-ShareAlike 4.0 License</a>; additional terms may apply. By using this site, you agree to the <a href="https://foundation.wikimedia.org/wiki/Special:MyLanguage/Policy:Terms_of_Use" class="extiw" title="foundation:Special:MyLanguage/Policy:Terms of Use">Terms of Use</a> and <a href="https://foundation.wikimedia.org/wiki/Special:MyLanguage/Policy:Privacy_policy" class="extiw" title="foundation:Special:MyLanguage/Policy:Privacy policy">Privacy Policy</a>. Wikipedia® is a registered trademark of the <a rel="nofollow" class="external text" href="https://wikimediafoundation.org/">Wikimedia Foundation, Inc.</a>, a non-profit organization.</li> </ul> <ul id="footer-places"> <li id="footer-places-privacy"><a href="https://foundation.wikimedia.org/wiki/Special:MyLanguage/Policy:Privacy_policy">Privacy policy</a></li> <li id="footer-places-about"><a href="/wiki/Wikipedia:About">About Wikipedia</a></li> <li id="footer-places-disclaimers"><a href="/wiki/Wikipedia:General_disclaimer">Disclaimers</a></li> <li id="footer-places-contact"><a href="//en.wikipedia.org/wiki/Wikipedia:Contact_us">Contact Wikipedia</a></li> <li id="footer-places-wm-codeofconduct"><a href="https://foundation.wikimedia.org/wiki/Special:MyLanguage/Policy:Universal_Code_of_Conduct">Code of Conduct</a></li> <li id="footer-places-developers"><a href="https://developer.wikimedia.org">Developers</a></li> <li id="footer-places-statslink"><a href="https://stats.wikimedia.org/#/en.wikipedia.org">Statistics</a></li> <li id="footer-places-cookiestatement"><a href="https://foundation.wikimedia.org/wiki/Special:MyLanguage/Policy:Cookie_statement">Cookie statement</a></li> <li id="footer-places-mobileview"><a href="//en.m.wikipedia.org/w/index.php?title=User:Evad37/rater/sandbox/app.js&amp;mobileaction=toggle_view_mobile" class="noprint stopMobileRedirectToggle">Mobile view</a></li> </ul> <ul id="footer-icons" class="noprint"> <li id="footer-copyrightico"><a href="https://wikimediafoundation.org/" class="cdx-button cdx-button--fake-button cdx-button--size-large cdx-button--fake-button--enabled"><img src="/static/images/footer/wikimedia-button.svg" width="84" height="29" alt="Wikimedia Foundation" loading="lazy"></a></li> <li id="footer-poweredbyico"><a href="https://www.mediawiki.org/" class="cdx-button cdx-button--fake-button cdx-button--size-large cdx-button--fake-button--enabled"><img src="/w/resources/assets/poweredby_mediawiki.svg" alt="Powered by MediaWiki" width="88" height="31" loading="lazy"></a></li> </ul> </footer> </div> </div> </div> <div class="vector-settings" id="p-dock-bottom"> <ul></ul> </div><script>(RLQ=window.RLQ||[]).push(function(){mw.config.set({"wgHostname":"mw-web.codfw.main-5f58cd8b6-bs464","wgBackendResponseTime":218,"wgPageParseReport":{"limitreport":{"cputime":"0.051","walltime":"0.079","ppvisitednodes":{"value":56,"limit":1000000},"postexpandincludesize":{"value":4746,"limit":2097152},"templateargumentsize":{"value":0,"limit":2097152},"expansiondepth":{"value":5,"limit":100},"expensivefunctioncount":{"value":2,"limit":500},"unstrip-depth":{"value":0,"limit":20},"unstrip-size":{"value":3080,"limit":5000000},"entityaccesscount":{"value":0,"limit":400},"timingprofile":["100.00% 71.176 1 -total"," 50.17% 35.709 1 Template:Script_doc_auto"," 40.40% 28.752 1 Template:Fmbox"," 9.14% 6.506 1 Template:Key_press"," 1.90% 1.354 1 MediaWiki:Userjsdangerous"]},"scribunto":{"limitreport-timeusage":{"value":"0.030","limit":"10.000"},"limitreport-memusage":{"value":929645,"limit":52428800}},"cachereport":{"origin":"mw-web.codfw.main-5f58cd8b6-bs464","timestamp":"20241203195917","ttl":2592000,"transientcontent":false}}});});</script> </body> </html>

Pages: 1 2 3 4 5 6 7 8 9 10