User:Lisa/convenientDiscussions.js
Note: After publishing, you may have to bypass your browser's cache to see the changes.
- Firefox / Safari: Hold Shift while clicking Reload, or press either Ctrl-F5 or Ctrl-R (⌘-R on a Mac)
- Google Chrome: Press Ctrl-Shift-R (⌘-Shift-R on a Mac)
- Internet Explorer / Edge: Hold Ctrl while clicking Refresh, or press Ctrl-F5
- Opera: Press Ctrl-F5.
/*! <nowiki> */!function(e){var t={};function i(n){if(t[n])return t[n].exports;var o=t[n]={i:n,l:!1,exports:{}};e[n].call(o.exports,o,o.exports,i);o.l=!0;return o.exports}i.m=e;i.c=t;i.d=function(e,t,n){if(!i.o(e,t))Object.defineProperty(e,t,{enumerable:!0,get:n})};i.r=function(e){if("undefined"!=typeof Symbol&&Symbol.toStringTag)Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});Object.defineProperty(e,"__esModule",{value:!0})};i.t=function(e,t){if(1&t)e=i(e);if(8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);i.r(n);Object.defineProperty(n,"default",{enumerable:!0,value:e});if(2&t&&"string"!=typeof e)for(var o in e)i.d(n,o,function(t){return e[t]}.bind(null,o));return n};i.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};i.d(t,"a",t);return t};i.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)};i.p="";i(i.s=85)}([function(e,t,i){"use strict";var n;(n=self).convenientDiscussions||(n.convenientDiscussions={});t.a=self.convenientDiscussions},function(e,t,i){"use strict";i.d(t,"Z",(function(){return d}));i.d(t,"c",(function(){return u}));i.d(t,"ab",(function(){return m}));i.d(t,"Y",(function(){return h}));i.d(t,"U",(function(){return g}));i.d(t,"E",(function(){return f}));i.d(t,"o",(function(){return p}));i.d(t,"H",(function(){return b}));i.d(t,"C",(function(){return v}));i.d(t,"I",(function(){return y}));i.d(t,"i",(function(){return w}));i.d(t,"j",(function(){return x}));i.d(t,"P",(function(){return C}));i.d(t,"l",(function(){return k}));i.d(t,"W",(function(){return T}));i.d(t,"T",(function(){return S}));i.d(t,"N",(function(){return E}));i.d(t,"V",(function(){return O}));i.d(t,"q",(function(){return N}));i.d(t,"k",(function(){return P}));i.d(t,"F",(function(){return L}));i.d(t,"L",(function(){return j}));i.d(t,"z",(function(){return D}));i.d(t,"X",(function(){return I}));i.d(t,"x",(function(){return A}));i.d(t,"g",(function(){return _}));i.d(t,"s",(function(){return B}));i.d(t,"b",(function(){return F}));i.d(t,"u",(function(){return H}));i.d(t,"Q",(function(){return R}));i.d(t,"M",(function(){return U}));i.d(t,"A",(function(){return Y}));i.d(t,"J",(function(){return W}));i.d(t,"d",(function(){return q}));i.d(t,"K",(function(){return z}));i.d(t,"m",(function(){return V}));i.d(t,"R",(function(){return G}));i.d(t,"t",(function(){return K}));i.d(t,"a",(function(){return Z}));i.d(t,"O",(function(){return X}));i.d(t,"y",(function(){return J}));i.d(t,"p",(function(){return Q}));i.d(t,"v",(function(){return ee}));i.d(t,"B",(function(){return te}));i.d(t,"e",(function(){return ie}));i.d(t,"bb",(function(){return ne}));i.d(t,"w",(function(){return oe}));i.d(t,"D",(function(){return se}));i.d(t,"G",(function(){return ae}));i.d(t,"h",(function(){return re}));i.d(t,"r",(function(){return ce}));i.d(t,"n",(function(){return le}));i.d(t,"f",(function(){return de}));i.d(t,"S",(function(){return ue}));var n=i(4),o=i.n(n),s=i(44),a=i.n(s),r=i(18),c=i(6),l=i(0);function d(e,t={}){const i=(e instanceof $?e:$($.parseHTML(e))).wrapAll(`<${t.tagName||"span"}>`).parent(),n=[];if(t.callbacks)Object.keys(t.callbacks).forEach(e=>{const o=i.find("."+e);let s=o.find("a");if(/\$\d$/.test(s.attr("href")))s.removeAttr("href").removeAttr("title");else if(!s.length)s=o.wrapInner("<a>").children().first();const a=new r.a({element:s.get(0),action:t.callbacks[e]});n.push(a)});if(t.targetBlank)i.find("a[href]").attr("target","_blank");return t.returnButtons?{$wrapper:i,buttons:n}:i}function u({text:e,optionalText:t,section:i,addPostfix:n=!0}){let o,s=(i?`/* ${i} */ `:"")+e.trim();if(t){let e=s+t;if(l.a.config.transformSummary)e=l.a.config.transformSummary(e);if(e.length<=l.a.g.summaryLengthLimit){s=e;o=!0}}if(!o){if(l.a.config.transformSummary)s=l.a.config.transformSummary(s);if(s.length>l.a.g.summaryLengthLimit)s=s.slice(0,l.a.g.summaryLengthLimit-1)+"\u2026"}if(n)s+=l.a.g.summaryPostfix;return s}function m(e){return`<table class="${"monospace"===mw.user.options.get("editfont")?"diff diff-editfont-monospace":"diff"}"><col class="diff-marker"><col class="diff-content"><col class="diff-marker"><col class="diff-content">`+e+"</table>"}function h(e,t,i){return i.indexOf(e)===t}function g(e){const t=document.createElement("span");t.style.color=e;return(e=t.style.color).includes("rgba")?e.replace(/\d+(?=\))/,"0"):e.replace("rgb","rgba").replace(")",", 0)")}function f(e,t=!1){if(t&&e.nodeType===Node.TEXT_NODE)return!0;if(e.nodeType!==Node.ELEMENT_NODE)return null;if(l.a.g.popularInlineElements.includes(e.tagName)||"META"===e.tagName&&"mw:PageProp/toc"===e.getAttribute("property"))return!0;else if(l.a.g.popularNotInlineElements.includes(e.tagName))return!1;else if("undefined"!=typeof window){console.warn("Expensive operation: isInline() called for:",e);return window.getComputedStyle(e).display.startsWith("inline")}else return null}function p(e){const t=e[0];if(!t)return"";const i=t.toUpperCase(),n=t.toLowerCase();return(i!==n?"["+i+n+"]":mw.util.escapeRegExp(t))+mw.util.escapeRegExp(e.slice(1)).replace(/[ _]+/g,"[ _]+")}function b(e,t){var i,n;return(t%2==1||(null===(i=l.a.g.pageWhitelistRegexp)||void 0===i?void 0:i.test(e))||!l.a.g.pageWhitelistRegexp&&l.a.config.customTalkNamespaces.includes(t))&&!(null!==(n=l.a.g.pageBlacklistRegexp)&&void 0!==n&&n.test(e))}function v(e){return e&&(e.includes(`${l.a.s("es-edit")} ${l.a.s("es-reply-genitive")}`)||e.includes(`${l.a.s("es-edit")} ${l.a.s("es-addition-genitive")}`))}function y(e){return e&&l.a.config.undoTexts.some(t=>e.includes(t))}function w(e){return void 0!==e}function x(e){return null!=e}function C(e,t,i=!1){return i?e.slice(t+1).concat(e.slice(0,t+1)).reverse():e.slice(t).concat(e.slice(0,t))}function k(e){return[].concat(...e)}function T(e){return e.replace(/_/g," ")}function S(e){return e.replace(/ /g,"_")}function E(e){return e.replace(/ {2,}/g," ")}function O(e){let t=function(e,t,i){const n=i?e.slice(t-1,t+1):e.slice(t,t+2);return/^[\uD800-\uDBFF][\uDC00-\uDFFF]$/.test(n)?n:e.charAt(t)}(e,0);return function(e){if(0===l.a.g.phpCharToUpper[e])return e;else return l.a.g.phpCharToUpper[e]||e.toUpperCase()}(t)+e.slice(t.length)}function N(e){return e.map(e=>l.a.g.contentLanguageMessages[e])}function P(e,t){for(let i=e.length-1;i>=0;i--)if(t(e[i]))return i;return null}function L(){const e=$(document.activeElement);return e.is(":input")||e.prop("isContentEditable")}function j(e){if(!e)return null;const t=e.map(e=>e.source||e).join("|");return t?new RegExp(`(${t})`):null}function D(e,t,i,n,o=!1){return e.replace(t,(e,t,s)=>{if(!o){t=null;s=null}return(t||"")+("table"===n?"\x03":"\x01")+i.push(s||e)+(n?"_"+n:"")+("table"===n?"\x04":"\x02")})}function I(e,t,i){const n=i?new RegExp(`(?:\\x01|\\x03)(\\d+)(?:_${i})?(?:\\x02|\\x04)`,"g"):/(?:\x01|\x03)(\d+)(?:_\w+)?(?:\x02|\x04)/g;for(;n.test(e);)e=e.replace(n,(e,i)=>t[i-1]);return e}function A(e){return M.apply(this,arguments)}function M(){return(M=o()((function*(e){const t={};return Promise.race([e,t]).then(e=>e===t?"pending":"resolved",()=>"rejected")}))).apply(this,arguments)}function _(e){if("loading"===mw.loader.getState(e)){const e=d(l.a.sParse("error-needreloadpage"),{callbacks:{"cd-notification-reloadPage":()=>{location.reload()}}});mw.notify(e,{type:"error"});return!0}return!1}function B(e){if(void 0===e.convenientDiscussionsMarginTop){const t=window.getComputedStyle(e);e.convenientDiscussionsMarginTop=parseFloat(t.marginTop);e.convenientDiscussionsMarginBottom=parseFloat(t.marginBottom);e.convenientDiscussionsMarginLeft=parseFloat(t.marginLeft);e.convenientDiscussionsMarginRight=parseFloat(t.marginRight)}const t=e.getBoundingClientRect(),i=J(t);return{top:t.top,bottom:t.bottom,left:t.left,right:t.right,width:t.width,height:t.height,outerTop:t.top-(i?e.convenientDiscussionsMarginTop:0),outerBottom:t.bottom+(i?e.convenientDiscussionsMarginBottom:0),outerLeft:t.left-(i?e.convenientDiscussionsMarginLeft:0),outerRight:t.right+(i?e.convenientDiscussionsMarginRight:0)}}function F(e,t){const i=e=>null!==e&&"object"==typeof e&&!(e instanceof RegExp||e instanceof Date||"function"==typeof Node&&e instanceof Node||"function"==typeof Worker&&e instanceof Worker),n=e=>e instanceof RegExp||e instanceof Date?e.toString():e;if(!i(e)||!i(t))return n(e)===n(t);const o=Object.keys(e).filter(t=>void 0!==e[t]),s=Object.keys(t).filter(e=>void 0!==t[e]);return o.length===s.length&&o.every(i=>F(e[i],t[i]))}function H(e){const t=mw.storage.getObject("convenientDiscussions-"+e);if(!1===t)console.error("Storage is unavailable.");return t||{}}function R(e,t){mw.storage.setObject("convenientDiscussions-"+e,t)}function U(e,t){return e.replace(/[\u200e\u200f]/g,t?" ":"")}function Y(e,t){V(e);if(!document.execCommand("insertText",!1,t))e.insertContent(t)}function W(e,t=[]){const i=Object.assign({},e);Object.keys(i).forEach(e=>{const n=i[e];if("object"==typeof n&&null!==n&&!(n instanceof RegExp||n instanceof Date))try{if(!F(n,JSON.parse(JSON.stringify(n))))delete i[e]}catch(t){delete i[e]}else if("function"==typeof n)if(t.includes(e))i[e]=n.toString();else delete i[e]});return i}function q(e,t){const i=new RegExp(`[${l.a.g.letterPattern}]{2,}`,"g"),n=(e.match(i)||[]).filter(h),o=(t.match(i)||[]).filter(h);if(!n.length||!o.length)return 0;else return function(e,t){let i=t.length,n=0;e.forEach(e=>{if(t.includes(e))n++;else i++});return n/i}(n,o)}function z(e,t,i=[]){if(i.includes("cmd")){X(i,"cmd");i.push("mac"===l.a.g.clientProfile.platform?"meta":"ctrl")}return e.keyCode===t&&["ctrl","shift","alt","meta"].every(t=>i.includes(t)===e[t+"Key"])}function V(e){e.$input.get(0).focus()}function G(e){return $(e[l.a.g.skin]||e.default||e.vector)}function K(){return G({monobook:"#f-list",modern:"#footer-info",default:"#footer-places"})}function Z(e,t){if(void 0!==t&&!e.includes(t))e.push(t)}function X(e,t){if(void 0!==t&&e.includes(t))e.splice(e.indexOf(t),1)}function J(...e){return!e.some(e=>0===e.left&&0===e.height)}function Q(e){const t=e.map(e=>e.getGender());let i;if(t.every(e=>"female"===e))i="female";else if(t.every(e=>"female"!==e))i="male";else i="unknown";return i}function ee(e){if(!e.anchorNode)return null;const t=e.anchorNode.compareDocumentPosition(e.focusNode)&Node.DOCUMENT_POSITION_FOLLOWING;return{higherNode:t?e.anchorNode:e.focusNode,higherOffset:t?e.anchorOffset:e.focusOffset}}function te(e){return"mac"===l.a.g.clientProfile.platform?e.metaKey:e.ctrlKey}function ie(e,{success:t,fail:i}){const n=$("<textarea>").val(e).appendTo(document.body).select(),o=document.execCommand("copy");n.remove();if(e&&o)mw.notify(t);else mw.notify(i,{type:"error"})}function ne(e,t){return("0000"+e).slice(-t)}function oe(e){return Array.isArray(e)?e[e.length-1]:e}function se(e){return["H1","H2","H3","H4","H5","H6"].includes(e.tagName)}function ae(e){return["STYLE","LINK"].includes(e.tagName)}function re(e){if(-1===e.indexOf("&"))return e;else{let t=e;if(-1!==t.indexOf("&amp;"))t=t.replace(/&amp;/g,"&amp;");if(-1!==t.indexOf("&#"))t=t.replace(/&#(\d+);/g,(e,t)=>String.fromCharCode(t));if(-1!==t.indexOf("&"))t=a()(t);return t}}function ce(){return Math.floor(Date.now()/l.a.g.msInDay)}function le(e,t){return ne(e.getUTCFullYear(),4)+ne(e.getUTCMonth()+1,2)+ne(e.getUTCDate(),2)+ne(e.getUTCHours(),2)+ne(e.getUTCMinutes(),2)+(t?"00":"")}function de(e,t){if(!t.global)throw new c.a('The regexp supplied to countOccurrences() must have the "g" flag.');return(e.match(t)||[]).length}function ue(e){return new Promise(t=>setTimeout(t,e))}},function(e,t,i){"use strict";var n=i(4),o=i.n(n),s=i(6),a=i(22),r=i(13),c=i(5),l=i(32),cd=i(0),d=i(20),u=i(1),m=i(14);let h;class Parser_Parser{constructor(e){this.timestampToSignature=this.timestampToSignature.bind(this);this.context=e;this.existingCommentIds=[]}createComment(e,t){return new this.context.CommentClass(this,e,t)}createSection(e,t){return new this.context.SectionClass(this,e,t)}processAndRemoveDtMarkup(){const e=[...this.context.rootElement.getElementsByTagName("span")].filter(e=>e.hasAttribute("data-mw-comment-start")||e.hasAttribute("data-mw-comment-end")).concat([...this.context.rootElement.getElementsByClassName("ext-discussiontools-init-replylink-buttons")]);this.context.handleDtMarkup(e);this.context.removeDtButtonHtmlComments()}setPropertiesForCommentParsing(){this.foreignComponentClasses=["cd-comment-part","ombox",...cd.a.config.closedDiscussionClasses,cd.a.config.outdentClass];this.elementsToExclude=[...this.context.rootElement.getElementsByTagName("blockquote"),...Object(u.l)(cd.a.config.elementsToExcludeClasses.map(e=>[...this.context.rootElement.getElementsByClassName(e)]))]}handleFactotumOutdents(e,t){var i;const n=document.createElement("span");n.className=cd.a.config.outdentClass;n.textContent=e;if("BR"===(null===(i=t.nextSibling)||void 0===i?void 0:i.tagName))t.nextSibling.remove();t.parentNode.insertBefore(n,t);t.remove()}findTimestamps(){this.setPropertiesForCommentParsing();return this.context.getAllTextNodes().map(e=>{const t=e.textContent;if(/^\u250c\u2500*\u2518$/.test(t)&&!e.parentNode.classList.contains(cd.a.config.outdentClass)&&!e.parentNode.parentNode.classList.contains(cd.a.config.outdentClass))this.handleFactotumOutdents(t,e);const{date:i,match:n}=Object(m.g)(t)||{};if(i&&!this.elementsToExclude.some(t=>t.contains(e)))return{node:e,date:i,match:n}}).filter(u.i).map(e=>{const{node:t,match:i,date:n}=e,o=document.createElement("span");o.classList.add("cd-timestamp");o.appendChild(document.createTextNode(i[2]));const s=t.textContent.slice(i.index+i[0].length),a=s?document.createTextNode(s):void 0;t.textContent=i[1];t.parentNode.insertBefore(o,t.nextSibling);if(a)t.parentNode.insertBefore(a,o.nextSibling);return{element:o,date:n}})}processLinkData(e,t){const{userName:i,linkType:n}=Parser_Parser.processLink(e)||{};if(i){t.name||(t.name=i);if(t.name===i){if(["user","userForeign"].includes(n)){if(t.notForeignLink&&"userForeign"===n)return!1;if("userForeign"!==n)t.notForeignLink=e;t.link=e}else if(["userTalk","userTalkForeign"].includes(n)){if(t.talkNotForeignLink)return!1;if("userTalkForeign"!==n)t.talkNotForeignLink=e;t.talkLink=e}else if(["contribs","contribsForeign"].includes(n)){if(t.contribsNotForeignLink&&(t.link||t.talkLink))return!1;if("contribsForeign"!==n)t.contribsNotForeignLink=e}else if(["userSubpage","userSubpageForeign"].includes(n)){if(t.link||t.talkLink)return!1}else if(["userTalkSubpage","userTalkSubpageForeign"].includes(n)){if(t.link||t.talkLink)return!1}else if(t.link||t.talkLink)return!1;t.isLastLinkAuthorLink=!0}}return!0}timestampToSignature(e){h||(h=new RegExp(`(?:^|${cd.a.g.letterPattern})[.!?\u2026] `));const t=e.element,i=e.element.textContent;let n,o,s=!1;for(let t=e.element;!o;t=t.parentNode)if(Object(u.E)(t)){if(t.classList.contains(cd.a.config.unsignedClass))n=t}else o=t;const a=new d.b(e.element,o);for(;a.previousNode();)if(a.currentNode.classList.contains("cd-signature")){s=!0;break}const r=Boolean(n),c=n||e.element,l=new d.a(c,this.context.rootElement),m={};let g,f=0,p=[];if(n)g=c;else{p.push(c);l.previousSibling()}let b=l.currentNode;do{f+=b.textContent.length;if(b.tagName){m.isLastLinkAuthorLink=!1;if("A"===b.tagName){if(!this.processLinkData(b,m))break}else{const e=[...b.getElementsByTagName("a")].reverse();for(const t of e)if(!t.classList.contains("external"))this.processLinkData(t,m)}if(m.isLastLinkAuthorLink)g=b}p.push(b);b=l.previousSibling();if(!b&&!g){b=l.parentNode();if(!b||!Object(u.E)(b))break;f=0;p=[]}}while(b&&f<cd.a.config.signatureScanLimit&&!(m.name&&(b.tagName&&["S","STRIKE","DEL"].includes(b.tagName)||!b.tagName&&h.test(b.textContent))||b.tagName&&(b.classList.contains("cd-timestamp")||["S","STRIKE","DEL"].includes(b.tagName)&&f>=30)));if(!m.name)return;if(!p.length)p=[c];const v=p.indexOf(g);p.splice(-1===v?1:v+1);const y=p[0].parentNode,w=p[0].nextSibling,x=document.createElement("span");x.classList.add("cd-signature");p.reverse().forEach(x.appendChild.bind(x));y.insertBefore(x,w);return{element:x,timestampElement:t,timestampText:i,date:e.date,authorLink:m.link,authorTalkLink:m.talkLink,authorName:m.name,isUnsigned:r,isExtraSignature:s}}findUnsigneds(){const e=[];if(cd.a.config.unsignedClass)[...this.context.rootElement.getElementsByClassName(cd.a.config.unsignedClass)].filter(e=>{if(this.context.getElementByClassName(e,"cd-timestamp"))return!1;for(let t=e;t&&t!==this.context.rootElement;t=t.parentNode)if(t.classList.contains("cd-signature"))return!1;return!0}).forEach(t=>{[...t.getElementsByTagName("a")].some(i=>{const{userName:n,linkType:o}=Parser_Parser.processLink(i)||{};if(n){let s,a;if("user"===o)s=i;else if("userTalk"===o)a=i;t.classList.add("cd-signature");const r=!0;e.push({element:t,authorName:n,isUnsigned:r,authorLink:s,authorTalkLink:a});return!0}})});return e}findSignatures(){let e=this.findTimestamps().map(this.timestampToSignature).filter(u.i);e.push(...this.findUnsigneds());let t=[];return e.slice().reverse().map(e=>{if(e.isExtraSignature)t.push(e);else{e.extraSignatures=t;t=[]}return Object.assign({type:"signature"},e)}).filter(e=>!e.isExtraSignature)}getTopElementsWithText(e,t=!1){const i=e.textContent.replace(/\s+/g,"");let n,o=[e],s=0;do{n=o;o=n.reduce((e,t)=>e.concat([...t[this.context.childElementsProp]]),[]);if(["DL","UL","OL"].includes(n[0].tagName))s++}while(o.length&&o.every(e=>["DL","UL","OL","DD","LI"].includes(e.tagName)&&(!t||["DD","LI"].includes(e.tagName)||e.classList.contains("cd-commentLevel"))||!e.textContent.trim()&&Object(u.E)(e))&&o.map(e=>e.textContent).join("").replace(/\s+/g,"")===i);return{nodes:n,levelsPassed:s}}findHeadings(){return[...this.context.rootElement.getElementsByTagName("h1"),...this.context.rootElement.getElementsByTagName("h2"),...this.context.rootElement.getElementsByTagName("h3"),...this.context.rootElement.getElementsByTagName("h4"),...this.context.rootElement.getElementsByTagName("h5"),...this.context.rootElement.getElementsByTagName("h6")].filter(e=>"mw-toc-heading"!==e.getAttribute("id")).map(e=>({type:"heading",element:e}))}splitParentAfterNode(e){const t=e.parentNode,i=t.cloneNode();let n;for(;(n=t.lastChild)&&n!==e;)i.insertBefore(n,i.firstChild);if(i[this.context.childElementsProp].length>0)t.parentNode.insertBefore(i,t.nextSibling);return[t,i]}static processLink(e){const t=e.getAttribute("href");let i,n=null;if(t){const{pageName:e,domain:o,fragment:s}=function(e){let t,i=cd.a.g.hostname,n=e.replace(/^(?:https?:)?\/\/([^/]+)/,(e,t)=>{i=t;return""}).replace(cd.a.g.startsWithArticlePathRegexp,"").replace(cd.a.g.startsWithScriptTitleRegexp,"").replace(/&action=edit.*/,"").replace(/#(.*)/,(e,i)=>{t=i;return""}).replace(/_/g," ");try{n=decodeURIComponent(n)}catch(e){return null}return{pageName:n,domain:i,fragment:t}}(t)||{};if(!e||l.a.isAnyId(s))return null;const a=e.match(cd.a.g.userNamespacesRegexp);if(a){i=a[1];if(cd.a.g.userLinkRegexp.test(e))n="user";else if(cd.a.g.userTalkLinkRegexp.test(e))n="userTalk";else if(cd.a.g.userSubpageLinkRegexp.test(e))n="userSubpage";else if(cd.a.g.userTalkSubpageLinkRegexp.test(e))n="userTalkSubpage"}else if(e.startsWith(cd.a.g.contribsPage+"/")){i=e.replace(cd.a.g.contribsPageLinkRegexp,"");if(cd.a.g.isIPv6Address(i))i=i.toUpperCase();n="contribs"}if(o!==cd.a.g.hostname)n+="Foreign";if(i)i=Object(u.V)(Object(u.W)(i.replace(/\/.*/,""))).trim()}else if(e.classList.contains("mw-selflink")&&3===cd.a.g.namespaceNumber&&!cd.a.g.pageName.includes("/"))i=cd.a.g.pageTitle;else return null;return{userName:i,linkType:n}}}var g=Parser_Parser,f=i(35),p=i(9),b=i(30),v=i(15),y=i(23),w=i(17),x=i(18),C=i(19);const k=document.documentElement;let T,S,E,O;var N={mount(){if("vector-2022"!==cd.a.g.skin){this.$topElement=$("<div>").attr("id","cd-pageNav-top").addClass("cd-pageNav").appendTo(document.body);if(cd.a.g.bodyScrollPaddingTop)this.$topElement.css("margin-top",cd.a.g.bodyScrollPaddingTop+"px");this.$bottomElement=$("<ul>").attr("id","cd-pageNav-bottom").addClass("cd-pageNav cd-pageNav-list").appendTo(document.body);this.updateWidth();this.update()}},isMounted(){return Boolean(this.$topElement)},updateWidth(){if(!this.isMounted()||!X.$contentColumn.length)return;const e=X.$contentColumn.offset().left-$(window).scrollLeft();let t=$(document.body).hasClass("ltr")?e-18:$(window).width()-(e+X.$contentColumn.outerWidth())-18;if("minerva"===cd.a.g.skin)t-=X.getContentColumnOffsets().startMargin;if(t<=100){this.$topElement.hide();this.$bottomElement.hide()}else{this.$topElement.show();this.$bottomElement.show()}this.$topElement.css("width",t+"px");this.$bottomElement.css("width",t+"px")},getRelativeOffsets(e){let t;if(C.a.isPresent()){const e=C.a.$element.get(0).getBoundingClientRect();if(Object(u.y)(e))t=e.top}const i=p.a.getFirstSectionRelativeTopOffset(e,t);if(!t)t=i;return{afterLeadOffset:t,firstSectionTop:i}},createOrUpdateSkeleton(e,t){if(e<cd.a.g.bodyScrollPaddingTop+1||"top"===O){if(!this.$linksOnTop){this.$linksOnTop=$("<ul>").attr("id","cd-pageNav-linksOnTop").addClass("cd-pageNav-list").appendTo(this.$topElement);const e=new x.a({href:"#",classes:["cd-pageNav-link"],label:cd.a.s("pagenav-pagetop"),action:()=>{this.jump(0,this.$topLink)}});this.$topLink=$("<li>").attr("id","cd-pageNav-topLink").addClass("cd-pageNav-item").append(e.element).appendTo(this.$linksOnTop)}}else if(this.$linksOnTop)this.reset("top");if(this.$linksOnTop){if(C.a.isPresent()&&!this.$tocLink){const e=new x.a({href:"#toc",classes:["cd-pageNav-link"],label:cd.a.s("pagenav-toc"),action:()=>{this.jump(C.a.$element,this.$tocLink)}});this.$tocLink=$("<li>").attr("id","cd-pageNav-tocLink").addClass("cd-pageNav-item").append(e.element).appendTo(this.$linksOnTop)}this.$currentSection||(this.$currentSection=$("<ul>").attr("id","cd-pageNav-currentSection").addClass("cd-pageNav-list").appendTo(this.$topElement))}if(p.a.getCount()&&t+window.innerHeight<k.scrollHeight||"bottom"===O){if(!this.$bottomLink){const e=new x.a({href:"#footer",classes:["cd-pageNav-link"],label:cd.a.s("pagenav-pagebottom"),action:()=>{this.jump(k.scrollHeight-window.innerHeight,this.$bottomLink)}});this.$bottomLink=$("<li>").attr("id","cd-pageNav-bottomLink").addClass("cd-pageNav-item").append(e.element).appendTo(this.$bottomElement)}}else if(this.$bottomLink)this.reset("bottom")},updateCurrentSection(e){var t;if(void 0===e||e>=cd.a.g.bodyScrollPaddingTop+1){if(T)this.resetSections();return}const i=p.a.getCurrentSection();if(i&&i!==T){T=i;null===(t=S)||void 0===t||t.detach();this.$currentSection.empty();[T,...T.getAncestors()].reverse().forEach((e,t)=>{let i;if(S&&S.data("section")===e)i=S;else{const n=new x.a({href:e.getUrl(),classes:["cd-pageNav-link"],label:e.headline,action:()=>{this.jump(e.$heading,i)}});i=$("<li>").addClass("cd-pageNav-item cd-pageNav-item-level-"+t).data("section",e).append(n.element)}i.appendTo(this.$currentSection)})}},update(){if(!this.isMounted())return;if(k.scrollHeight===k.clientHeight){this.reset();return}const e=window.scrollY,{afterLeadOffset:t,firstSectionTop:i}=this.getRelativeOffsets(e);this.createOrUpdateSkeleton(t,e);this.updateCurrentSection(i)},reset(e){if(!e||"top"===e){var t;null===(t=S)||void 0===t||t.detach();this.$topElement.empty();this.$linksOnTop=this.$topLink=this.$tocLink=this.$currentSection=null;T=null}if(!e||"bottom"===e){this.$bottomElement.empty();this.$bottomLink=null}},resetSections(){var e;null===(e=S)||void 0===e||e.detach();this.$currentSection.empty();T=null},jump(e,t,i){const n=e instanceof $?e.offset().top-cd.a.g.bodyScrollPaddingTop:e;if(i||!(Math.abs(n-window.scrollY)<1)){if(O){O=null;E.prev().removeClass("cd-pageNav-link-inline");E.remove();E=S=null}if(!i){const e=window.scrollY,i=new x.a({classes:["cd-pageNav-backLink"],label:cd.a.s("pagenav-back"),action:i=>{i.stopPropagation();this.jump(e,t,!0)}});E=$("<span>").addClass("cd-pageNav-backLinkContainer").append(cd.a.sParse("dot-separator"),i.element).appendTo(t);E.prev().addClass("cd-pageNav-link-inline");if(t.parent().is("#cd-pageNav-currentSection"))S=t;if(t===this.$topLink||t===this.$tocLink)O="top";else if(t===this.$bottomLink)O="bottom";else O="section"}X.toggleAutoScrolling(!0);X.scrollToY(n)}}},P=i(8),L=i(3),j=i(16),D=i(29),I=i(12),A=i(7),M=i(10),_=i(11);let B,F;function H(){const e=document.createNodeIterator(X.rootElement,NodeFilter.SHOW_TEXT),t=[];let i;for(;i=e.nextNode();)t.push(i);return t}function R(){const e=document.createNodeIterator(X.rootElement,NodeFilter.SHOW_COMMENT);let t;for(;t=e.nextNode();)if(t.textContent.startsWith("__DTREPLYBUTTONS__"))t.remove()}function U(e){var t;const i=cd.a.g.isDtTopicSubscriptionEnabled||"ready"===mw.loader.getState("ext.discussionTools.init");let n;if(i){if(!X.getBootProcess().isPageFirstParsed())n=X.$content.children(".cd-dtMarkupHaven").get(0);if(!n){n=document.createElement("span");n.className="cd-dtMarkupHaven cd-hidden";X.$content.append(n)}}e.concat([...X.rootElement.getElementsByClassName("ext-discussiontools-init-highlight")]).forEach((e,t)=>{if(e.hasAttribute("data-mw-comment-start")&&c.a.isDtId(e.id))X.getBootProcess().addDtCommentId(e.id);if(i){if(t%10==0)n.appendChild(document.createElement("span"));n.lastChild.appendChild(e)}else e.remove()});if(!i)[...X.rootElement.getElementsByTagName("span[data-mw-comment]")].forEach(e=>{e.removeAttribute("data-mw-comment")});if(null!==(t=mw.loader.moduleRegistry["ext.discussionTools.init"])&&void 0!==t&&t.packageExports["highlighter.js"]){mw.loader.moduleRegistry["ext.discussionTools.init"].packageExports["highlighter.js"].highlightTargetComment=()=>{};mw.loader.moduleRegistry["ext.discussionTools.init"].packageExports["highlighter.js"].clearHighlightTargetComment=()=>{}}}var Y=class{constructor(e={}){this.connectToCommentLinks=this.connectToCommentLinks.bind(this);this.highlightMentions=this.highlightMentions.bind(this);this.passedData=e;this.dtCommentIds=[]}passData(e,t){const i="string"==typeof e?{[e]:t}:e;Object.assign(this.passedData,i)}deleteData(e){delete this.passedData[e]}data(e){var t;return e?null!==(t=this.passedData[e])&&void 0!==t?t:null:this.passedData}addDtCommentId(e){this.dtCommentIds.push(e)}getVisitsRequest(){return this.visitsRequest}getPreviousVisitUnixTime(){return this.previousVisitUnixTime}isFirstRun(){return this.firstRun}isPageFirstParsed(){return this.firstRun||this.data("wasPageCreated")}maybeSuggestEnableCommentReformatting(){return o()((function*(){if(null!==L.a.get("reformatComments"))return!1;const{reformatComments:e}=yield L.a.load({reuse:!0});if(Object(u.j)(e))return!1;const t=[{label:cd.a.s("rc-suggestion-yes"),action:"accept",flags:"primary"},{label:cd.a.s("rc-suggestion-no"),action:"reject"}],i=yield Object(_.i)($("<div>").append($("<img>").attr("width",626).attr("height",67).attr("src","//upload.wikimedia.org/wikipedia/commons/0/08/Convenient_Discussions_comment_-_old_format.png").addClass("cd-rcnotice-img"),$("<img>").attr("width",30).attr("height",30).attr("src","data:image/svg+xml,%3Csvg width='20' height='20' viewBox='0 0 20 20' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M16.58 8.59L11 14.17L11 2L9 2L9 14.17L3.41 8.59L2 10L10 18L18 10L16.58 8.59Z' fill='black'/%3E%3C/svg%3E").addClass("cd-rcnotice-img cd-rcnotice-arrow"),$("<img>").attr("width",626).attr("height",118).attr("src","//upload.wikimedia.org/wikipedia/commons/d/da/Convenient_Discussions_comment_-_new_format.png").addClass("cd-rcnotice-img"),$("<div>").addClass("cd-rcnotice-text").append(Object(u.Z)(cd.a.sParse("rc-suggestion"),{callbacks:{"cd-notification-settings":()=>{X.showSettingsDialog()}}}).children())).children(),{size:"large",actions:t});if(i)try{const e="accept"===i;yield L.a.saveSettingOnTheFly("reformatComments",e);return e}catch(e){mw.notify(cd.a.s("error-settings-save"),{type:"error"});console.warn(e)}}))()}maybeConfirmDesktopNotifications(){return o()((function*(){if("undefined"!=typeof Notification){if("unknown"===L.a.get("desktopNotifications")&&"denied"!==Notification.permission){const{desktopNotifications:e}=yield L.a.load();if(["unknown",void 0].includes(e)){const e=[{label:cd.a.s("dn-confirm-yes"),action:"accept",flags:"primary"},{label:cd.a.s("dn-confirm-no"),action:"reject"}],t=yield Object(_.i)(cd.a.s("dn-confirm"),{size:"medium",actions:e});let i;if("accept"===t){if("default"===Notification.permission){OO.ui.alert(cd.a.s("dn-grantpermission"));Notification.requestPermission(e=>{if("granted"===e)i=L.a.saveSettingOnTheFly("desktopNotifications","all");else if("denied"===e)i=L.a.saveSettingOnTheFly("desktopNotifications","none")})}else if("granted"===Notification.permission)i=L.a.saveSettingOnTheFly("desktopNotifications","all")}else if("reject"===t)i=L.a.saveSettingOnTheFly("desktopNotifications","none");if(i)try{yield i}catch(e){mw.notify(cd.a.s("error-settings-save"),{type:"error"});console.warn(e)}}}if(!["unknown","none"].includes(L.a.get("desktopNotifications"))&&"default"===Notification.permission){yield OO.ui.alert(cd.a.s("dn-grantpermission-again"),{title:cd.a.s("script-name")});Notification.requestPermission()}}}))()}searchForNotFoundItem({date:e,decodedFragment:t,guessedCommentText:i,sectionName:n,guessedSectionText:s}){return o()((function*(){var o;const a=e?Object(m.d)(e,!1,cd.a.g.contentTimezone):n.replace(/"/g,"");let r,c=`"${a}"`;if(!e)try{r=decodeURIComponent(n.replace(/\.([0-9A-F]{2})/g,"%$1"))}catch(e){}if(n&&n!==r){c+=` OR "${r.replace(/"/g,"")}"`}if(e)for(let t=1;t<=3;t++){c+=` OR "${Object(m.d)(new Date(e.getTime()-cd.a.g.msInMin*t),!1,cd.a.g.contentTimezone)}"`}c+=" prefix:"+P.b.getCurrent().getArchivePrefix();const l=yield X.getApi().get({action:"query",list:"search",srsearch:c,srprop:e?void 0:"sectiontitle",srsort:"create_timestamp_desc",srlimit:"20"}),d=null==l?void 0:null===(o=l.query)||void 0===o?void 0:o.search,h=cd.a.g.server+mw.util.getUrl("Special:Search",{search:c,sort:"create_timestamp_desc",cdcomment:e&&t});if(0===d.length){let t;if(e)t=cd.a.sParse("deadanchor-comment-lead")+" "+cd.a.sParse("deadanchor-comment-notfound",h)+i;else t=cd.a.sParse("deadanchor-section-lead",n)+(s&&n.includes("{{")?"":" "+cd.a.sParse("deadanchor-section-notfound",h)+" "+cd.a.sParse("deadanchor-section-reason",h))+s;mw.notify(Object(u.Z)(t),{type:"warn",autoHideSeconds:"long"})}else{let o,s,c=n;if(e){const e=Object.entries(d).map(([,e])=>e).filter(e=>{var t;return null===(t=Object(M.k)(e.snippet))||void 0===t?void 0:t.includes(a)});if(1===e.length)o=e[0].title}else{const e=Object.entries(d).map(([,e])=>e).find(e=>e.sectiontitle&&[n,r].filter(u.i).includes(e.sectiontitle));if(e){o=e.title;c=Object(u.W)(e.sectiontitle)}}if(o){const n=`${o}#${e?t:c}`;s=e?cd.a.sParse("deadanchor-comment-exactmatch",n,h)+i:cd.a.sParse("deadanchor-section-exactmatch",c,n,h)}else s=e?cd.a.sParse("deadanchor-comment-inexactmatch",h)+i:cd.a.sParse("deadanchor-section-inexactmatch",c,h);mw.notify(Object(u.Z)(s),{autoHideSeconds:"long"})}}))()}maybeNotifyNotFound(e,t,i){var n=this;return o()((function*(){let o,s,a="",r="";B||(B=new RegExp(mw.util.escapeRegExp(mw.config.get("wgArticlePath")).replace("\\$1","(.*)")));if(t){o=cd.a.sParse("deadanchor-comment-lead");const e=c.a.findPreviousCommentByTime(t,i);if(e){a=(" "+cd.a.sParse("deadanchor-comment-previous","#"+e.id)).replace(B,"$1");o+=a}}else{s=Object(u.W)(e);o=cd.a.sParse("deadanchor-section-lead",s)+" "+cd.a.sParse("deadanchor-section-reason");const t=p.a.findByHeadlineParts(s);if(t){r=(" "+cd.a.sParse("deadanchor-section-similar","#"+t.id,t.headline)).replace(B,"$1");o+=r}}if(P.b.getCurrent().canHaveArchives())n.searchForNotFoundItem({date:t,decodedFragment:e,guessedCommentText:a,sectionName:s,guessedSectionText:r});else mw.notify(Object(u.Z)(o),{type:"warn",autoHideSeconds:"long"})}))()}disableDt(e,t,i){return o()((function*(){t.setPending(!0);try{yield e()}catch(e){mw.notify(Object(u.Z)(cd.a.sParse("error-settings-save")));return}finally{t.setPending(!1)}i.$notification.hide();mw.notify(Object(u.Z)(cd.a.sParse("discussiontools-disabled"),{callbacks:{"cd-notification-refresh":()=>{location.reload()}}}))}))()}maybeSuggestDisableDiscussionTools(){if(!cd.a.g.isDtReplyToolEnabled&&!cd.a.g.isDtVisualEnhancementsEnabled)return;const{$wrapper:e,buttons:[t,i]}=Object(u.Z)(cd.a.sParse("discussiontools-incompatible","Special:Preferences#mw-prefsection-editing-discussion","Special:GlobalPreferences#mw-prefsection-editing-discussion"),{callbacks:{"cd-notification-disabledt":()=>{this.disableDt(()=>X.getApi().saveOptions({"discussiontools-replytool":0,"discussiontools-newtopictool":0,"discussiontools-topicsubscription":0,"discussiontools-visualenhancements":0}).catch(A.m),t,n)},"cd-notification-disableDtGlobally":()=>{this.disableDt(()=>Object(A.u)({"discussiontools-replytool":0,"discussiontools-newtopictool":0,"discussiontools-topicsubscription":0,"discussiontools-visualenhancements":0},!0).catch(A.m),i,n)}},returnButtons:!0}),n=mw.notification.notify(e,{type:"warn",autoHide:!1})}addSettingsLinkToFooter(){Object(u.t)().append($("<li>").append($("<a>").text(cd.a.s("footer-settings")).on("click",()=>{X.showSettingsDialog()})))}setup(){var e=this;return o()((function*(){X.setup(e.data("html"));C.a.setup(e.data("toc"),e.data("hidetoc"));cd.a.comments=c.a.getAll();cd.a.sections=p.a.getAll();if(e.firstRun)yield y.a.talkPage()}))()}findTargets(){this.parser=new g({CommentClass:a.a,SectionClass:f.a,childElementsProp:"children",follows:(e,t)=>Boolean(t.compareDocumentPosition(e)&Node.DOCUMENT_POSITION_FOLLOWING),getAllTextNodes:H,removeDtButtonHtmlComments:R,getElementByClassName:(e,t)=>e.querySelector("."+t),cloneNode:e=>e.cloneNode(),rootElement:X.rootElement,areThereOutdents:X.areThereOutdents.bind(X),handleDtMarkup:U});this.parser.processAndRemoveDtMarkup();const e=this.parser.findHeadings(),t=this.parser.findSignatures();this.targets=e.concat(t).sort((e,t)=>this.parser.context.follows(e.element,t.element)?1:-1)}processComments(){try{this.targets.filter(e=>"signature"===e.type).forEach(e=>{try{c.a.add(this.parser.createComment(e,this.targets))}catch(e){if(!(e instanceof s.a))console.error(e)}});c.a.reformatTimestamps();c.a.setInSingleCommentTableProperty();c.a.adjustDom()}catch(e){console.error(e)}mw.hook("convenientDiscussions.commentsReady").fire(c.a.getAll(),cd.a)}processSections(){this.targets.filter(e=>"heading"===e.type).forEach(e=>{try{p.a.add(this.parser.createSection(e,this.targets))}catch(e){if(!(e instanceof s.a))console.error(e)}});if(L.a.get("useTopicSubscription"))j.a.load();p.a.adjust();c.a.processOutdents(this.parser);c.a.connectBrokenThreads();c.a.setDtIds(this.dtCommentIds);p.a.addMetadataAndActions();j.a.getLoadRequest().then(()=>{p.a.addSubscribeButtons();j.a.cleanUp();C.a.markSubscriptions()});mw.hook("convenientDiscussions.sectionsReady").fire(p.a.getAll(),cd.a)}retractTalkPageness(){v.a.stopTimer("main code");X.setTalkPageness(!1);const e=$("#footer-places-togglecd a");e.attr("href",e.attr("href").replace(/0$/,"1")).text(cd.a.s("footer-runcd"));X.hideLoadingOverlay();this.debugLog()}layOutHtml(){const e=this.data("wasPageCreated")?".noarticletext, .warningbox":".mw-parser-output";X.$content.children(e).remove();X.$content.prepend(X.$root)}addAddTopicButton(){if($("#ca-addsection").length&&(!cd.a.g.isDtNewTopicToolEnabled||X.doesPageExist()))X.setAddSectionButtonContainer($("<div>").addClass("cd-section-button-container cd-addTopicButton-container").append(new OO.ui.ButtonWidget({label:cd.a.s("addtopic"),framed:!1,classes:["cd-button-ooui","cd-section-button"]}).on("click",()=>{r.a.createAddSectionForm()}).$element).insertAfter(X.$root))}connectToAddTopicButtons(){var e,t,i,n;null!==(e=F)&&void 0!==e||(F=["#ca-addsection a",'a[href*="section=new"]','.commentbox input[type="submit"]','.createbox input[type="submit"]'].concat(cd.a.config.customAddTopicLinkSelectors).join(", "));$(F).filter((function(){const e=$(this);if("new"===mw.util.getParamValue("section")&&"ca-addsection"!==e.parent().attr("id")&&!e.closest(X.$root).length)return!1;let t,i,n;if(e.is("a")){const n=e.attr("href");try{i=new mw.Uri(n)}catch(e){return}t=Object(u.w)(i.query.title)}else if(e.is("input"))t=e.closest("form").find('input[name="title"][type="hidden"]').val();else return!1;try{n=P.b.get(t)}catch(e){return!1}if(n!==P.b.getCurrent())return!1;if(e.is("a")){i.query.dtenable=0;e.attr("href",i.toString())}return!0})).off("click").on("click.cd",X.handleAddTopicButtonClick).filter((function(){const e=$(this);return!(cd.a.g.isDtNewTopicToolEnabled||e.is("a")&&Number(mw.util.getParamValue("cdaddtopic",e.attr("href"))))})).attr("title",cd.a.s("addtopicbutton-tooltip"));const o=null===(t=$._data(document.body).events)||void 0===t?void 0:null===(i=t.click)||void 0===i?void 0:null===(n=i.find(e=>{var t;return null===(t=e.selector)||void 0===t?void 0:t.includes("data-mw-comment")}))||void 0===n?void 0:n.handler;if(o)$(document.body).off("click",o)}rescueCommentFormsContent(e){const t=e.map(e=>{let t=void 0!==e.headline?`${cd.a.s("rd-headline")}: ${e.headline}\n\n`:"";t+=`${cd.a.s("rd-comment")}: ${e.comment}\n\n${cd.a.s("rd-summary")}: ${e.summary}`;return t}).join("\n\n----\n"),i=new OO.ui.MultilineTextInputWidget({value:t,rows:20}),n=new OO.ui.FieldLayout(i,{align:"top",label:cd.a.s("rd-intro")}),o=new OO.ui.MessageDialog;X.getWindowManager().addWindows([o]);X.getWindowManager().openWindow(o,{message:n.$element,actions:[{label:cd.a.s("rd-close"),action:"close"}],size:"large"})}hideDtNewTopicForm(){if(!cd.a.g.isDtNewTopicToolEnabled)return;let e,t;const i=$(".ext-discussiontools-ui-newTopic:visible");if(!i.length)return;const n=i.find('.ext-discussiontools-ui-newTopic-sectionTitle input[type="text"]');e=n.val();n.val("");const o=i.find("textarea");t=o.textSelection("getContents");o.textSelection("setContents","");if($("#wpTextbox1").length)$("#wpTextbox1").remove();else{const e=new MutationObserver(t=>{if(t.some(e=>[...e.addedNodes].some(e=>{var t;return null===(t=e.classList)||void 0===t?void 0:t.contains("ext-discussiontools-ui-replyWidget")}))){$("#wpTextbox1").remove();e.disconnect()}});e.observe(X.$content.get(0),{childList:!0,subtree:!0})}i.hide();mw.config.set("wgDiscussionToolsStartNewTopicTool",!1);this.dtNewTopicFormData={headline:e,comment:t,focus:!0}}maybeAddAddSectionForm(){try{const e=(new mw.Uri).query;if("new"===e.section||Number(e.cdaddtopic)||this.dtNewTopicFormData)r.a.createAddSectionForm(void 0,void 0,this.dtNewTopicFormData)}catch(e){}}configureActiveCommentFormsConfirmation(){const e=mw.user.options.get("editondblclick")||mw.user.options.get("editsectiononrightclick");X.addPreventUnloadCondition("commentForms",()=>{r.a.saveSession(!0);return mw.user.options.get("useeditwarning")&&(r.a.getLastActiveAltered()||e&&r.a.getCount())})}setupNavPanel(){if(X.isPageActive())if(!w.a.isMounted())w.a.mount();else w.a.reset();else if(w.a.isMounted())w.a.unmount()}processFragment(){var e=this;return o()((function*(){if(!e.firstRun)return;const t=location.hash.slice(1),i=$.escapeSelector(t);let n,o,s,a,r,l;try{n=decodeURIComponent(t);o=n&&$.escapeSelector(n);if(c.a.isId(t))s=n}catch(e){console.error(e)}if(s){({date:a,author:r}=c.a.parseId(s)||{});l=c.a.getById(s,!0)}else if(n)({comment:l,date:a,author:r}=c.a.getByDtId(n,!0)||{});if(l)Object(u.S)().then(()=>{l.scrollTo({smooth:!1,expandThreads:!0});const e=l.dtId?"#"+l.dtId:void 0,t=Object.assign({},history.state,{cdJumpedToComment:!0});history.replaceState(t,"",e)});if(n&&X.isPageActive()){if(!(l||cd.a.config.idleFragments.includes(n)||n.startsWith("/media/")||$(":target").length||$(`a[name="${o}"]`).length||$(`*[id="${o}"]`).length||$(`a[name="${i}"]`).length||$(`*[id="${i}"]`).length))yield e.maybeNotifyNotFound(n,a,r)}}))()}processTargets(){var e=this;return o()((function*(){const t=e.data("commentIds");if(t){const i=t.map(e=>c.a.getById(e)).filter(u.j);if(i.length)Object(u.S)().then(()=>{const t=e.data("wasCommentFormSubmitted")||e.data("pushState");i[0].scrollTo({smooth:!1,pushState:e.data("pushState"),flash:t});if(!t)i.forEach(e=>e.flashTarget())})}if(e.data("sectionId")){const t=p.a.getById(e.data("sectionId"));if(t){if(e.data("pushState"))history.pushState(history.state,"","#"+t.id);Object(u.S)().then(()=>{t.$heading.cdScrollTo("top",!1)})}}}))()}cleanUpVisits(e,t){for(let i=e.length-1;i>=0;i--)if(!L.a.get("highlightNewInterval")||e[i]<t-60*L.a.get("highlightNewInterval")||this.data("markAsRead")){e.splice(0,i);break}}processVisits(){var e=this;return o()((function*(){let t,i;try{({visits:t,currentPageVisits:i}=yield e.visitsRequest)}catch(e){console.warn("Couldn't load the settings from the server.",e);return}if(i.length>=1)e.previousVisitUnixTime=Number(i[i.length-1]);const n=Math.floor(Date.now()/1e3);e.cleanUpVisits(i,n);let o=!1;if(i.length){c.a.getAll().forEach(t=>{var s;o||(o=t.setNewAndSeenProperties(i,n,(null===(s=e.data("unseenCommentIds"))||void 0===s?void 0:s.some(e=>e===t.id))||!1))});c.a.configureAndAddLayers(c.a.getAll().filter(e=>e.isNew));C.a.addNewComments(c.a.groupBySection(c.a.getAll().filter(e=>!1===e.isSeen)))}i.push(String(n+60*o));Object(A.v)(t);p.a.updateNewCommentsData();C.a.addCommentCount();c.a.registerSeen();w.a.fill();mw.hook("convenientDiscussions.newCommentsHighlighted").fire(cd.a)}))()}connectToCommentLinks(e){if(e.is("#mw-content-text, .cd-commentForm-preview"))e.find('a[href^="#"]').filter((function(){return!this.onclick&&c.a.isAnyId($(this).attr("href").slice(1))})).on("click",(function(e){var t;e.preventDefault();null===(t=c.a.getByAnyId($(this).attr("href").slice(1),!0))||void 0===t||t.scrollTo({expandThreads:!0,pushState:!0})}))}highlightMentions(e){if(!e.is("#mw-content-text, .cd-comment-part"))return;const t=I.a.getCurrent().getName(),i=e.hasClass("cd-comment-part")?`a[title$=":${t}"], a[title*=":${t} ("]`:`.cd-comment-part a[title$=":${t}"], .cd-comment-part a[title*=":${t} ("]`,n=[L.a.get("reformatComments")?"cd-comment-author":"cd-signature"].concat(cd.a.config.elementsToExcludeClasses).map(e=>"."+e).join(", ");e.find(i).filter((function(){var e;return cd.a.g.userLinkRegexp.test(this.title)&&!this.closest(n)&&(null===(e=g.processLink(this))||void 0===e?void 0:e.userName)===I.a.getCurrent().getName()})).each((e,t)=>{t.classList.add("cd-currentUserLink")})}addEventListeners(){if(!L.a.get("reformatComments"))$(document).on("mousemove mouseover",X.handleMouseMove);$(document).on("scroll visibilitychange",X.handleScroll).on("horizontalscroll.cd visibilitychange",X.handleHorizontalScroll).on("selectionchange",X.handleSelectionChange);if(L.a.get("improvePerformance"))$(window).on("focus",p.a.maybeUpdateVisibility.bind(p.a)).on("blur",p.a.maybeUnhideAll.bind(p.a));$(window).on("resize orientationchange",X.handleWindowResize).on("popstate",X.handlePopState);mw.hook("wikipage.content").add(this.connectToCommentLinks,this.highlightMentions);mw.hook("convenientDiscussions.previewReady").add(this.connectToCommentLinks);setInterval(()=>{X.handlePageMutations()},1e3);if(X.isPageCommentable())$(document).on("keydown",X.handleGlobalKeyDown);mw.hook("wikipage.content").add(X.handleWikipageContentHookFirings)}debugLog(){v.a.stopTimer("total time");const e=(v.a.getTimerTotal("main code")+v.a.getTimerTotal("final code and rendering"))/c.a.getCount();v.a.logAndResetTimer("total time");console.debug("number of comments: "+c.a.getCount());console.debug("per comment: "+e.toFixed(2));v.a.logAndResetEverything()}showPopups(){var e=this;return o()((function*(){e.maybeSuggestDisableDiscussionTools();const t=yield e.maybeSuggestEnableCommentReformatting();yield e.maybeConfirmDesktopNotifications();if(t)X.reload()}))()}execute(e){var t=this;return o()((function*(){t.firstRun=!e;if(t.firstRun)v.a.stopTimer("loading data");v.a.startTimer("preparations");yield t.setup();v.a.stopTimer("preparations");v.a.startTimer("main code");if(t.firstRun){X.saveRelativeScrollPosition();I.a.loadMuted()}if(X.doesPageExist()){if(!L.a.get("useTopicSubscription"))j.a.load();if(X.isPageActive())t.visitsRequest=Object(A.l)(!0);mw.hook("convenientDiscussions.beforeParse").fire(cd.a);v.a.startTimer("process comments");t.findTargets();t.processComments();v.a.stopTimer("process comments")}if(!t.firstRun||X.isDefinitelyTalkPage()||c.a.getCount()){if(X.doesPageExist()){v.a.startTimer("process sections");t.processSections();v.a.stopTimer("process sections")}if(t.data("html")){v.a.startTimer("laying out HTML");t.layOutHtml();v.a.stopTimer("laying out HTML")}t.setupNavPanel();v.a.stopTimer("main code");v.a.startTimer("final code and rendering");if(X.doesPageExist()){c.a.reviewHighlightables();c.a.reformatComments()}X.$root.addClass("cd-parsed");if(X.isPageCommentable()){t.addAddTopicButton();t.connectToAddTopicButtons();r.a.restoreSession(t.firstRun||t.data("isPageReloadedExternally"));t.hideDtNewTopicForm();t.maybeAddAddSectionForm();if(t.isPageFirstParsed())t.configureActiveCommentFormsConfirmation()}if(X.doesPageExist()){b.a.init();const e=c.a.getAll().filter(e=>e.isOwn||e.isLineGapped);c.a.configureAndAddLayers(e);t.processFragment();t.processTargets();if(X.isPageActive()){t.processVisits();D.a.init()}else C.a.addCommentCount();if(t.isPageFirstParsed()){N.mount();t.addEventListeners()}else N.update();X.setupMutationObserver();if(L.a.get("reformatComments")&&c.a.getCount())mw.hook(cd.a.config.hookToFireWithAuthorWrappers).fire($(".cd-comment-author-wrapper"))}if(t.firstRun){X.restoreRelativeScrollPosition();t.addSettingsLinkToFooter()}mw.hook("convenientDiscussions.pageReady").fire(cd.a);if(t.firstRun)mw.hook("convenientDiscussions.pageReadyFirstTime").fire(cd.a);X.hideLoadingOverlay();X.rootElement.getBoundingClientRect();v.a.stopTimer("final code and rendering");t.debugLog();if(t.firstRun&&X.isPageActive()&&I.a.getCurrent().isRegistered())t.showPopups()}else t.retractTalkPageness()}))()}},W=i(27),q=i(47),z=i.n(q);function V(){return z()('/*! */\n!function(e){var t={};function i(n){if(t[n])return t[n].exports;var r=t[n]={i:n,l:!1,exports:{}};e[n].call(r.exports,r,r.exports,i);r.l=!0;return r.exports}i.m=e;i.c=t;i.d=function(e,t,n){if(!i.o(e,t))Object.defineProperty(e,t,{enumerable:!0,get:n})};i.r=function(e){if("undefined"!=typeof Symbol&&Symbol.toStringTag)Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});Object.defineProperty(e,"__esModule",{value:!0})};i.t=function(e,t){if(1&t)e=i(e);if(8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);i.r(n);Object.defineProperty(n,"default",{enumerable:!0,value:e});if(2&t&&"string"!=typeof e)for(var r in e)i.d(n,r,function(t){return e[t]}.bind(null,r));return n};i.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};i.d(t,"a",t);return t};i.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)};i.p="";i(i.s=36)}([function(e,t,i){"use strict";var n;(n=self).convenientDiscussions||(n.convenientDiscussions={});t.a=self.convenientDiscussions},function(e,t,i){"use strict";i.d(t,"n",(function(){return s}));i.d(t,"h",(function(){return a}));i.d(t,"b",(function(){return o}));i.d(t,"c",(function(){return l}));i.d(t,"m",(function(){return c}));i.d(t,"k",(function(){return u}));i.d(t,"l",(function(){return h}));i.d(t,"e",(function(){return d}));i.d(t,"j",(function(){return f}));i.d(t,"f",(function(){return p}));i.d(t,"o",(function(){return m}));i.d(t,"g",(function(){return g}));i.d(t,"i",(function(){return b}));i.d(t,"a",(function(){return v}));i.d(t,"d",(function(){return _}));i(25);var n=i(26),r=i.n(n);i(4);var cd=i(0);function s(e,t,i){return i.indexOf(e)===t}function a(e,t=!1){if(t&&e.nodeType===Node.TEXT_NODE)return!0;if(e.nodeType!==Node.ELEMENT_NODE)return null;if(cd.a.g.popularInlineElements.includes(e.tagName)||"META"===e.tagName&&"mw:PageProp/toc"===e.getAttribute("property"))return!0;else if(cd.a.g.popularNotInlineElements.includes(e.tagName))return!1;else if("undefined"!=typeof window){console.warn("Expensive operation: isInline() called for:",e);return window.getComputedStyle(e).display.startsWith("inline")}else return null}function o(e){return void 0!==e}function l(e){return[].concat(...e)}function c(e){return e.replace(/_/g," ")}function u(e){return e.replace(/ /g,"_")}function h(e){let t=function(e,t,i){const n=i?e.slice(t-1,t+1):e.slice(t,t+2);return/^[\\uD800-\\uDBFF][\\uDC00-\\uDFFF]$/.test(n)?n:e.charAt(t)}(e,0);return function(e){if(0===cd.a.g.phpCharToUpper[e])return e;else return cd.a.g.phpCharToUpper[e]||e.toUpperCase()}(t)+e.slice(t.length)}function d(e){return e.map(e=>cd.a.g.contentLanguageMessages[e])}function f(e,t){return e.replace(/[\\u200e\\u200f]/g,t?" ":"")}function p(e){return"mac"===cd.a.g.clientProfile.platform?e.metaKey:e.ctrlKey}function m(e,t){return("0000"+e).slice(-t)}function g(e){return["H1","H2","H3","H4","H5","H6"].includes(e.tagName)}function b(e){return["STYLE","LINK"].includes(e.tagName)}function v(e){if(-1===e.indexOf("&"))return e;else{let t=e;if(-1!==t.indexOf("&amp;"))t=t.replace(/&amp;/g,"&amp;");if(-1!==t.indexOf("&#"))t=t.replace(/&#(\\d+);/g,(e,t)=>String.fromCharCode(t));if(-1!==t.indexOf("&"))t=r()(t);return t}}function _(e,t){return m(e.getUTCFullYear(),4)+m(e.getUTCMonth()+1,2)+m(e.getUTCDate(),2)+m(e.getUTCHours(),2)+m(e.getUTCMinutes(),2)+(t?"00":"")}},function(e,t,i){"use strict";t.a={init(){this.timerTotal={};this.timerStartTimestamps={};this.timerRunCount={};this.timerAllRunsTotal={};this.initCounters();this.array=[];this.object={}},initCounters(){this.counters="undefined"==typeof Proxy?{}:new Proxy({},{get:(e,t)=>t in e?e[t]:0})},startTimer(e){var t,i;null!==(i=(t=this.timerTotal)[e])&&void 0!==i||(t[e]=0);this.timerStartTimestamps[e]=performance.now()},stopTimer(e){var t,i,n,r;if(void 0===this.timerStartTimestamps[e])return;const s=performance.now()-this.timerStartTimestamps[e];this.timerTotal[e]+=s;delete this.timerStartTimestamps[e];null!==(i=(t=this.timerAllRunsTotal)[e])&&void 0!==i||(t[e]=0);this.timerAllRunsTotal[e]+=s;null!==(r=(n=this.timerRunCount)[e])&&void 0!==r||(n[e]=0);this.timerRunCount[e]++},resetTimer(e){if(void 0!==this.timerStartTimestamps[e])this.stopTimer(e);delete this.timerTotal[e]},fullResetTimer(e){this.resetTimer(e);delete this.timerAllRunsTotal[e];delete this.timerRunCount[e]},logAndResetTimer(e){if(void 0!==this.timerStartTimestamps[e])this.stopTimer(e);if(void 0!==this.timerTotal[e]){console.debug(`${e}: ${this.timerTotal[e].toFixed(1)}`);this.resetTimer(e)}},logAndResetEverything(e){const t=Object.keys(this.timerTotal);if(e)t.sort();t.forEach(e=>{this.logAndResetTimer(e)});const i=Object.keys(this.counters);if(e)i.sort();i.forEach(e=>{console.debug(`counter ${e}: ${this.counters[e]}`)});this.initCounters();if(this.array.length){console.debug("array: ",this.array);this.array=[]}if(Object.keys(this.object).length){console.debug("object: ",this.object);this.object={}}},getTimerTotal(e){return this.timerTotal[e]},getAverageTimerTime(e){if(void 0===this.timerAllRunsTotal[e]){console.error("No data for timer "+e);return}const t=this.timerAllRunsTotal[e]/this.timerRunCount[e];console.debug(`${e}: ${t.toFixed(3)} average for ${this.timerRunCount[e]} runs`)},incrementCounter(e){this.counters[e]++}}},function(e,t,i){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,i,n){if(void 0===n)n=i;Object.defineProperty(e,n,{enumerable:!0,get:function(){return t[i]}})}:function(e,t,i,n){if(void 0===n)n=i;e[n]=t[i]}),r=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),s=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var i in e)if("default"!==i&&Object.prototype.hasOwnProperty.call(e,i))n(t,e,i);r(t,e);return t},a=this&&this.__exportStar||function(e,t){for(var i in e)if("default"!==i&&!Object.prototype.hasOwnProperty.call(t,i))n(t,e,i)},o=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});t.RssHandler=t.DefaultHandler=t.DomUtils=t.ElementType=t.Tokenizer=t.createDomStream=t.parseDOM=t.parseDocument=t.DomHandler=t.Parser=void 0;var l=i(12);Object.defineProperty(t,"Parser",{enumerable:!0,get:function(){return l.Parser}});var c=i(6);Object.defineProperty(t,"DomHandler",{enumerable:!0,get:function(){return c.DomHandler}});Object.defineProperty(t,"DefaultHandler",{enumerable:!0,get:function(){return c.DomHandler}});function u(e,t){var i=new c.DomHandler(void 0,t);new l.Parser(i,t).end(e);return i.root}t.parseDocument=u;t.parseDOM=function(e,t){return u(e,t).children};t.createDomStream=function(e,t,i){var n=new c.DomHandler(e,t,i);return new l.Parser(n,t)};var h=i(13);Object.defineProperty(t,"Tokenizer",{enumerable:!0,get:function(){return o(h).default}});var d=s(i(8));t.ElementType=d;a(i(17),t);t.DomUtils=s(i(18));var f=i(17);Object.defineProperty(t,"RssHandler",{enumerable:!0,get:function(){return f.FeedHandler}})},function(e,t,i){"use strict";class CdError extends Error{constructor(e){let t;if(e){var i,n;t=e.type;if(e.code)t+="/"+e.code;if(null!=e&&null!==(i=e.apiResp)&&void 0!==i&&null!==(n=i.error)&&void 0!==n&&n.code)t+="/"+e.apiResp.error.code}else t="";super(t);this.name="CdError";this.data=e}}t.a=CdError},function(e,t,i){"use strict";i.d(t,"c",(function(){return TreeWalker}));i.d(t,"b",(function(){return ElementsTreeWalker}));i.d(t,"a",(function(){return ElementsAndTextTreeWalker}));class TreeWalker{constructor(e,t,i=!1,n=e){this.acceptNode=t;this.root=e;this.currentNode=n;if(i){this.firstChildProp="firstElementChild";this.lastChildProp="lastElementChild";this.previousSiblingProp="previousElementSibling";this.nextSiblingProp="nextElementSibling"}else{this.firstChildProp="firstChild";this.lastChildProp="lastChild";this.previousSiblingProp="previousSibling";this.nextSiblingProp="nextSibling"}}tryMove(e){let t=this.currentNode;if(t===this.root&&!e.includes("Child"))return null;do{t=t[e]}while(t&&this.acceptNode&&!this.acceptNode(t));if(t)this.currentNode=t;return t||null}parentNode(){return this.tryMove("parentNode")}firstChild(){return this.tryMove(this.firstChildProp)}lastChild(){return this.tryMove(this.lastChildProp)}previousSibling(){return this.tryMove(this.previousSiblingProp)}nextSibling(){return this.tryMove(this.nextSiblingProp)}nextNode(){let e=this.currentNode;do{if(e[this.firstChildProp])e=e[this.firstChildProp];else{for(;e&&!e[this.nextSiblingProp]&&e.parentNode!==this.root;)e=e.parentNode;if(e)e=e[this.nextSiblingProp]}}while(e&&this.acceptNode&&!this.acceptNode(e));if(e)this.currentNode=e;return e}previousNode(){let e=this.currentNode;if(e!==this.root){do{if(e[this.previousSiblingProp]){e=e[this.previousSiblingProp];for(;e[this.lastChildProp];)e=e[this.lastChildProp]}else e=e.parentNode}while(e&&this.acceptNode&&!this.acceptNode(e));if(e)this.currentNode=e;return e}}}class ElementsTreeWalker extends TreeWalker{constructor(e,t){super(t,null,!0);if(e)this.currentNode=e}}class ElementsAndTextTreeWalker extends TreeWalker{constructor(e,t){super(t,e=>e.nodeType===Node.TEXT_NODE||e.nodeType===Node.ELEMENT_NODE);if(e)this.currentNode=e}}},function(e,t,i){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,i,n){if(void 0===n)n=i;var r=Object.getOwnPropertyDescriptor(t,i);if(!r||("get"in r?!t.__esModule:r.writable||r.configurable))r={enumerable:!0,get:function(){return t[i]}};Object.defineProperty(e,n,r)}:function(e,t,i,n){if(void 0===n)n=i;e[n]=t[i]}),r=this&&this.__exportStar||function(e,t){for(var i in e)if("default"!==i&&!Object.prototype.hasOwnProperty.call(t,i))n(t,e,i)};Object.defineProperty(t,"__esModule",{value:!0});t.DomHandler=void 0;var s=i(8),a=i(16);r(i(16),t);var o=/\\s+/g,l={normalizeWhitespace:!1,withStartIndices:!1,withEndIndices:!1,xmlMode:!1},c=function(){function e(e,t,i){this.dom=[];this.root=new a.Document(this.dom);this.done=!1;this.tagStack=[this.root];this.lastNode=null;this.parser=null;if("function"==typeof t){i=t;t=l}if("object"==typeof e){t=e;e=void 0}this.callback=null!=e?e:null;this.options=null!=t?t:l;this.elementCB=null!=i?i:null}e.prototype.onparserinit=function(e){this.parser=e};e.prototype.onreset=function(){this.dom=[];this.root=new a.Document(this.dom);this.done=!1;this.tagStack=[this.root];this.lastNode=null;this.parser=null};e.prototype.onend=function(){if(!this.done){this.done=!0;this.parser=null;this.handleCallback(null)}};e.prototype.onerror=function(e){this.handleCallback(e)};e.prototype.onclosetag=function(){this.lastNode=null;var e=this.tagStack.pop();if(this.options.withEndIndices)e.endIndex=this.parser.endIndex;if(this.elementCB)this.elementCB(e)};e.prototype.onopentag=function(e,t){var i=this.options.xmlMode?s.ElementType.Tag:void 0,n=new a.Element(e,t,void 0,i);this.addNode(n);this.tagStack.push(n)};e.prototype.ontext=function(e){var t=this.options.normalizeWhitespace,i=this.lastNode;if(i&&i.type===s.ElementType.Text){if(t)i.data=(i.data+e).replace(o," ");else i.data+=e;if(this.options.withEndIndices)i.endIndex=this.parser.endIndex}else{if(t)e=e.replace(o," ");var n=new a.Text(e);this.addNode(n);this.lastNode=n}};e.prototype.oncomment=function(e){if(!this.lastNode||this.lastNode.type!==s.ElementType.Comment){var t=new a.Comment(e);this.addNode(t);this.lastNode=t}else this.lastNode.data+=e};e.prototype.oncommentend=function(){this.lastNode=null};e.prototype.oncdatastart=function(){var e=new a.Text(""),t=new a.NodeWithChildren(s.ElementType.CDATA,[e]);this.addNode(t);e.parent=t;this.lastNode=e};e.prototype.oncdataend=function(){this.lastNode=null};e.prototype.onprocessinginstruction=function(e,t){var i=new a.ProcessingInstruction(e,t);this.addNode(i)};e.prototype.handleCallback=function(e){if("function"==typeof this.callback)this.callback(e,this.dom);else if(e)throw e};e.prototype.addNode=function(e){var t=this.tagStack[this.tagStack.length-1],i=t.children[t.children.length-1];if(this.options.withStartIndices)e.startIndex=this.parser.startIndex;if(this.options.withEndIndices)e.endIndex=this.parser.endIndex;t.children.push(e);if(i){e.prev=i;i.next=e}e.parent=t;this.lastNode=null};return e}();t.DomHandler=c;t.default=c},function(e,t,i){e.exports=function(){"use strict";var e=6e4,t=36e5,i="millisecond",n="second",r="minute",s="hour",a="day",o="week",l="month",c="quarter",u="year",h="date",d="Invalid Date",f=/^(\\d{4})[-/]?(\\d{1,2})?[-/]?(\\d{0,2})[Tt\\s]*(\\d{1,2})?:?(\\d{1,2})?:?(\\d{1,2})?[.:]?(\\d+)?$/,p=/\\[([^\\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,m={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_")},g=function(e,t,i){var n=String(e);return!n||n.length>=t?e:""+Array(t+1-n.length).join(i)+e},b={s:g,z:function(e){var t=-e.utcOffset(),i=Math.abs(t),n=Math.floor(i/60),r=i%60;return(t<=0?"+":"-")+g(n,2,"0")+":"+g(r,2,"0")},m:function e(t,i){if(t.date()<i.date())return-e(i,t);var n=12*(i.year()-t.year())+(i.month()-t.month()),r=t.clone().add(n,l),s=i-r<0,a=t.clone().add(n+(s?-1:1),l);return+(-(n+(i-r)/(s?r-a:a-r))||0)},a:function(e){return e<0?Math.ceil(e)||0:Math.floor(e)},p:function(e){return{M:l,y:u,w:o,d:a,D:h,h:s,m:r,s:n,ms:i,Q:c}[e]||String(e||"").toLowerCase().replace(/s$/,"")},u:function(e){return void 0===e}},v="en",_={};_[v]=m;var y=function(e){return e instanceof C},E=function e(t,i,n){var r;if(!t)return v;if("string"==typeof t){var s=t.toLowerCase();_[s]&&(r=s),i&&(_[s]=i,r=s);var a=t.split("-");if(!r&&a.length>1)return e(a[0])}else{var o=t.name;_[o]=t,r=o}return!n&&r&&(v=r),r||!n&&v},T=function(e,t){if(y(e))return e.clone();var i="object"==typeof t?t:{};return i.date=e,i.args=arguments,new C(i)},x=b;x.l=E,x.i=y,x.w=function(e,t){return T(e,{locale:t.$L,utc:t.$u,x:t.$x,$offset:t.$offset})};var C=function(){function m(e){this.$L=E(e.locale,null,!0),this.parse(e)}var g=m.prototype;return g.parse=function(e){this.$d=function(e){var t=e.date,i=e.utc;if(null===t)return new Date(NaN);if(x.u(t))return new Date;if(t instanceof Date)return new Date(t);if("string"==typeof t&&!/Z$/i.test(t)){var n=t.match(f);if(n){var r=n[2]-1||0,s=(n[7]||"0").substring(0,3);return i?new Date(Date.UTC(n[1],r,n[3]||1,n[4]||0,n[5]||0,n[6]||0,s)):new Date(n[1],r,n[3]||1,n[4]||0,n[5]||0,n[6]||0,s)}}return new Date(t)}(e),this.$x=e.x||{},this.init()},g.init=function(){var e=this.$d;this.$y=e.getFullYear(),this.$M=e.getMonth(),this.$D=e.getDate(),this.$W=e.getDay(),this.$H=e.getHours(),this.$m=e.getMinutes(),this.$s=e.getSeconds(),this.$ms=e.getMilliseconds()},g.$utils=function(){return x},g.isValid=function(){return!(this.$d.toString()===d)},g.isSame=function(e,t){var i=T(e);return this.startOf(t)<=i&&i<=this.endOf(t)},g.isAfter=function(e,t){return T(e)<this.startOf(t)},g.isBefore=function(e,t){return this.endOf(t)<T(e)},g.$g=function(e,t,i){return x.u(e)?this[t]:this.set(i,e)},g.unix=function(){return Math.floor(this.valueOf()/1e3)},g.valueOf=function(){return this.$d.getTime()},g.startOf=function(e,t){var i=this,c=!!x.u(t)||t,d=x.p(e),f=function(e,t){var n=x.w(i.$u?Date.UTC(i.$y,t,e):new Date(i.$y,t,e),i);return c?n:n.endOf(a)},p=function(e,t){return x.w(i.toDate()[e].apply(i.toDate("s"),(c?[0,0,0,0]:[23,59,59,999]).slice(t)),i)},m=this.$W,g=this.$M,b=this.$D,v="set"+(this.$u?"UTC":"");switch(d){case u:return c?f(1,0):f(31,11);case l:return c?f(1,g):f(0,g+1);case o:var _=this.$locale().weekStart||0,y=(m<_?m+7:m)-_;return f(c?b-y:b+(6-y),g);case a:case h:return p(v+"Hours",0);case s:return p(v+"Minutes",1);case r:return p(v+"Seconds",2);case n:return p(v+"Milliseconds",3);default:return this.clone()}},g.endOf=function(e){return this.startOf(e,!1)},g.$set=function(e,t){var o,c=x.p(e),d="set"+(this.$u?"UTC":""),f=(o={},o[a]=d+"Date",o[h]=d+"Date",o[l]=d+"Month",o[u]=d+"FullYear",o[s]=d+"Hours",o[r]=d+"Minutes",o[n]=d+"Seconds",o[i]=d+"Milliseconds",o)[c],p=c===a?this.$D+(t-this.$W):t;if(c===l||c===u){var m=this.clone().set(h,1);m.$d[f](p),m.init(),this.$d=m.set(h,Math.min(this.$D,m.daysInMonth())).$d}else f&&this.$d[f](p);return this.init(),this},g.set=function(e,t){return this.clone().$set(e,t)},g.get=function(e){return this[x.p(e)]()},g.add=function(i,c){var h,d=this;i=Number(i);var f=x.p(c),p=function(e){var t=T(d);return x.w(t.date(t.date()+Math.round(e*i)),d)};if(f===l)return this.set(l,this.$M+i);if(f===u)return this.set(u,this.$y+i);if(f===a)return p(1);if(f===o)return p(7);var m=(h={},h[r]=e,h[s]=t,h[n]=1e3,h)[f]||1,g=this.$d.getTime()+i*m;return x.w(g,this)},g.subtract=function(e,t){return this.add(-1*e,t)},g.format=function(e){var t=this,i=this.$locale();if(!this.isValid())return i.invalidDate||d;var n=e||"YYYY-MM-DDTHH:mm:ssZ",r=x.z(this),s=this.$H,a=this.$m,o=this.$M,l=i.weekdays,c=i.months,u=function(e,i,r,s){return e&&(e[i]||e(t,n))||r[i].slice(0,s)},h=function(e){return x.s(s%12||12,e,"0")},f=i.meridiem||function(e,t,i){var n=e<12?"AM":"PM";return i?n.toLowerCase():n},m={YY:String(this.$y).slice(-2),YYYY:this.$y,M:o+1,MM:x.s(o+1,2,"0"),MMM:u(i.monthsShort,o,c,3),MMMM:u(c,o),D:this.$D,DD:x.s(this.$D,2,"0"),d:String(this.$W),dd:u(i.weekdaysMin,this.$W,l,2),ddd:u(i.weekdaysShort,this.$W,l,3),dddd:l[this.$W],H:String(s),HH:x.s(s,2,"0"),h:h(1),hh:h(2),a:f(s,a,!0),A:f(s,a,!1),m:String(a),mm:x.s(a,2,"0"),s:String(this.$s),ss:x.s(this.$s,2,"0"),SSS:x.s(this.$ms,3,"0"),Z:r};return n.replace(p,(function(e,t){return t||m[e]||r.replace(":","")}))},g.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},g.diff=function(i,h,d){var f,p=x.p(h),m=T(i),g=(m.utcOffset()-this.utcOffset())*e,b=this-m,v=x.m(this,m);return v=(f={},f[u]=v/12,f[l]=v,f[c]=v/3,f[o]=(b-g)/6048e5,f[a]=(b-g)/864e5,f[s]=b/t,f[r]=b/e,f[n]=b/1e3,f)[p]||b,d?v:x.a(v)},g.daysInMonth=function(){return this.endOf(l).$D},g.$locale=function(){return _[this.$L]},g.locale=function(e,t){if(!e)return this.$L;var i=this.clone(),n=E(e,t,!0);return n&&(i.$L=n),i},g.clone=function(){return x.w(this.$d,this)},g.toDate=function(){return new Date(this.valueOf())},g.toJSON=function(){return this.isValid()?this.toISOString():null},g.toISOString=function(){return this.$d.toISOString()},g.toString=function(){return this.$d.toUTCString()},m}(),N=C.prototype;return T.prototype=N,[["$ms",i],["$s",n],["$m",r],["$H",s],["$W",a],["$M",l],["$y",u],["$D",h]].forEach((function(e){N[e[1]]=function(t){return this.$g(t,e[0],e[1])}})),T.extend=function(e,t){return e.$i||(e(t,C,T),e.$i=!0),T},T.locale=E,T.isDayjs=y,T.unix=function(e){return T(1e3*e)},T.en=_[v],T.Ls=_,T.p={},T}()},function(e,t,i){"use strict";i.r(t);i.d(t,"ElementType",(function(){return n}));i.d(t,"isTag",(function(){return r}));i.d(t,"Root",(function(){return s}));i.d(t,"Text",(function(){return a}));i.d(t,"Directive",(function(){return o}));i.d(t,"Comment",(function(){return l}));i.d(t,"Script",(function(){return c}));i.d(t,"Style",(function(){return u}));i.d(t,"Tag",(function(){return h}));i.d(t,"CDATA",(function(){return d}));i.d(t,"Doctype",(function(){return f}));var n;!function(e){e.Root="root";e.Text="text";e.Directive="directive";e.Comment="comment";e.Script="script";e.Style="style";e.Tag="tag";e.CDATA="cdata";e.Doctype="doctype"}(n||(n={}));function r(e){return e.type===n.Tag||e.type===n.Script||e.type===n.Style}const s=n.Root,a=n.Text,o=n.Directive,l=n.Comment,c=n.Script,u=n.Style,h=n.Tag,d=n.CDATA,f=n.Doctype},function(e,t,i){"use strict";var n=i(4),r=i(0),s=i(5),a=i(1);class CommentSkeleton{constructor(e,t,i){var n,s;this.parser=e;const a=i.indexOf(t);this.followsHeading="heading"===(null===(n=i[a-1])||void 0===n?void 0:n.type);const o=this.followsHeading?i[a-1].element:void 0;this.signatureElement=t.element;this.signatureText=t.element.textContent;this.collectParts(o);this.removeNestedParts();this.encloseInlineParts();this.filterParts();this.parts.reverse();this.replaceListsWithItems();this.wrapNumberedList();this.index=r.a.comments.length;this.date=t.date||null;this.timestamp=null===(s=t.timestampText)||void 0===s?void 0:s.replace(/ {2,}/g," ");this.authorName=t.authorName;this.timestampElement=t.timestampElement;this.extraSignatures=t.extraSignatures;this.authorLink=t.authorLink;this.authorTalkLink=t.authorTalkLink;this.isOwn=this.authorName===r.a.g.userName;this.id=CommentSkeleton.generateId(this.date,this.authorName,e.existingCommentIds);this.isUnsigned=t.isUnsigned;this.elements=this.parts.map(e=>e.node);this.setHighlightables();this.setLevels();if(this.parts[0].isHeading&&0!==this.level){this.parts.shift();this.elements.shift()}if(this.parts[0].isHeading){this.isOpeningSection=!0;const e=this.parts[0].node.tagName.match(/^H([1-6])$/);this.openingSectionOfLevel=e&&Number(e[1])}else this.isOpeningSection=!1;this.addAttributes();this.section=null;this.isOutdented=!1;t.comment=this}getStartNodes(e){const t=[];let i;for(;!i;){for(;(!e.currentNode.nextSibling||![Node.ELEMENT_NODE,Node.TEXT_NODE].includes(e.currentNode.nextSibling.nodeType))&&e.parentNode(););if(!e.nextSibling())break;if(!Object(a.h)(e.currentNode,!0))i=e.currentNode}if(i&&this.signatureElement.parentNode.contains(i)||this.signatureElement.parentNode.getElementsByClassName("cd-signature",2).length>1||!this.isElementEligible(this.signatureElement.parentNode,e,"start")){e.currentNode=this.signatureElement;for(;e.nextSibling()&&Object(a.h)(e.currentNode,!0);)t.push({node:e.currentNode,isTextNode:e.currentNode.nodeType===Node.TEXT_NODE,isHeading:!1,hasCurrentSignature:!1,hasForeignComponents:!1,step:"start"});t.reverse();e.currentNode=this.signatureElement}else e.currentNode=this.signatureElement.parentNode;t.push({node:e.currentNode,isTextNode:!1,isHeading:!1,hasCurrentSignature:!0,hasForeignComponents:!1,step:"start"});return[t,i]}isCellOfMultiCommentTable(e){if(!["TD","TH"].includes(e.tagName))return!1;let t;for(let i=e;!t&&i!==this.parser.context.rootElement;i=i.parentNode)if("TABLE"===i.tagName)t=i;return!t||t.getElementsByClassName("cd-signature",2).length>1}isElementEligible(e,t,i){var n,s;return!(e===t.root||"up"!==i&&(this.parser.foreignComponentClasses.some(t=>e.classList.contains(t))||r.a.g.namespaceNumber%2==1&&e.classList.contains("tmbox"))||"META"===e.tagName&&"mw:PageProp/toc"===e.getAttribute("property")||"toc"===e.getAttribute("id")||"DT"===e.tagName||this.isCellOfMultiCommentTable(e)||"HR"===e.tagName&&e.previousElementSibling&&this.parser.context.getElementByClassName(e.previousElementSibling,"cd-signature")||"up"!==i&&this.parser.context.areThereOutdents()&&this.parser.context.getElementByClassName(e,r.a.config.outdentClass)||null!==(n=(s=r.a.config).checkForCustomForeignComponents)&&void 0!==n&&n.call(s,e,this.context))}isGallery(e){return"UL"===e.tagName&&e.classList.contains("gallery")}isIntroList(e,t,i){const n=e.tagName;if(!["DL","UL","OL"].includes(n))return!1;const r=e.previousElementSibling,s=e.nextElementSibling;let o="DL"===n&&e.firstChild&&"DT"===e.firstChild.tagName||["DL","UL"].includes(n)&&r&&Object(a.g)(r)&&s&&!["DL","OL"].includes(s.tagName)&&!this.isPartOfList(i,!0)&&!this.parser.context.getElementByClassName(e,"cd-signature")||this.isGallery(e);if(t&&!o&&s&&"OL"!==n){const t=this.parser.getTopElementsWithText(e).levelsPassed,i=this.parser.getTopElementsWithText(s).levelsPassed;o=i>t||1===t&&i===t&&e[this.parser.context.childElementsProp].length>1&&n!==s.tagName}return o}isPartOfList(e,t){const i=["DD","DL"];if(!t)i.push("LI","UL");return e&&(i.includes(e.tagName)||i.includes(e.parentNode.tagName))}isIntro({step:e,stage:t,node:i,nextNode:n,lastPartNode:r,previousPart:s}){return"back"===e&&(!s||"up"===s.step)&&!["DD","LI"].includes(i.parentNode.tagName)&&(["UL","OL"].includes(n.tagName)||"DL"===n.tagName&&(2===t||n.parentNode!==this.parser.context.rootElement&&n.parentNode.parentNode!==this.parser.context.rootElement))&&!(["DL","UL","OL"].includes(i.tagName)&&!this.isIntroList(i,2===t,r)||i.nodeType===Node.TEXT_NODE&&i.previousSibling&&["DL","UL","OL"].includes(i.previousSibling.tagName)&&!this.isIntroList(i.previousSibling,!1,r)||r&&!this.isPartOfList(r,!1))&&!(["UL","OL"].includes(n.tagName)&&n[this.parser.context.childElementsProp].length>1&&!n[this.parser.context.childElementsProp][0].contains(this.signatureElement))}traverseDom(e,t,i,n){for(let o=0;o<500;o++){let o;const l=e[e.length-1];if(!l.hasCurrentSignature&&l.hasForeignComponents){let e;for(;(e=t.currentNode)&&t.lastChild();){for(;t.currentNode.nodeType===Node.TEXT_NODE&&!t.currentNode.textContent.trim()&&t.previousSibling(););if(Object(a.h)(t.currentNode,!0)){t.currentNode=e;break}o="dive"}if("dive"!==o)break}else if(t.previousSibling())o="back";else{if(!t.parentNode())break;o="up"}const c=t.currentNode;if(this.isIntro({step:o,stage:1,node:c,nextNode:l.node,previousPart:l}))break;const u=c.nodeType===Node.TEXT_NODE;let h=null,d=null,f=null;if(!u){var s;if(!this.isElementEligible(c,t,o))break;h=Object(a.g)(c);d=c.contains(this.signatureElement);const e=c.getElementsByClassName("cd-signature",Number(d)+1).length;f=Boolean(!Object(a.h)(c)&&(e-Number(d)>0||i&&c.contains(i)&&"TABLE"!==c.tagName||n&&c!==n&&c.contains(n)));if(!d&&!Object(a.h)(c)&&null!==(s=r.a.config.signatureEndingRegexp)&&void 0!==s&&s.test(c.textContent)&&!this.parser.elementsToExclude.some(e=>e.contains(c)))break}e.push({node:c,isTextNode:u,isHeading:h,hasCurrentSignature:d,hasForeignComponents:f,step:o});if(h)break}return e}collectParts(e){const t=new s.a(this.signatureElement,this.parser.context.rootElement);let[i,n]=this.getStartNodes(t);i=this.traverseDom(i,t,n,e);this.parts=i}removeNestedParts(){for(let e=this.parts.length-1;e>=0;e--){const t=this.parts[e];if("up"===t.step&&!t.hasForeignComponents){let t=0;for(let i=e-1;i>0;i--)if("dive"===this.parts[i].step){t=i;break}this.parts.splice(t,e-t);e=t}}}encloseInlineParts(){const e=[];let t=null,i=!1;for(let n=0;n<=this.parts.length;n++){const r=this.parts[n];if(r&&(null===t||["back","start"].includes(r.step))&&!r.hasForeignComponents&&!r.isHeading){if(null===t)if(Object(a.h)(r.node.parentNode)){for(let e=n+1;e<this.parts.length;e++)if("up"!==this.parts[e].step);else n=e-1;break}else t=n;if(!i&&(r.isTextNode&&r.node.textContent.trim()||Object(a.h)(r.node)))i=!0}else if(null!==t){if(i){const i=n-1;e.push({start:t,end:i})}t=null;i=!1}}for(let t=e.length-1;t>=0;t--){const i=e[t],n=document.createElement("div"),r=this.parts[i.start].node.nextSibling,s=this.parts[i.start].node.parentNode;for(let e=i.end;e>=i.start;e--)n.appendChild(this.parts[e].node);s.insertBefore(n,r);const a={node:n,isTextNode:!1,isHeading:!1,hasCurrentSignature:n.contains(this.signatureElement),hasForeignComponents:!1,step:"replaced"};this.parts.splice(i.start,i.end-i.start+1,a)}return this.parts}filterParts(){var e;this.parts=this.parts.filter(e=>!e.hasForeignComponents&&!e.isTextNode);for(let e=this.parts.length-1;e>0;e--){const t=this.parts[e].node;if("P"===t.tagName&&!t.textContent.trim()&&[...t[this.parser.context.childElementsProp]].every(e=>"BR"===e.tagName)||Object(a.i)(t)||Array.from(t.classList).some(e=>["references","reflist-talk"].includes(e)))this.parts.splice(e,1);else break}const t=null===(e=this.parts[this.parts.length-1])||void 0===e?void 0:e.node;if("P"===t.tagName){var i;if("BR"===(null===(i=t.firstChild)||void 0===i?void 0:i.tagName))t.parentNode.insertBefore(t.firstChild,t)}if(this.parts.length>1){let e;for(let t=this.parts.length-1;t>=1;t--){const i=this.parts[t];if(i.isHeading)continue;if(!e){e=i.node;if(["DL","UL","OL","DD","LI"].includes(e.tagName)&&!this.isIntroList(e,!0,this.parts[0].node))break}const n=i.node.nextElementSibling;if(n)if(this.isIntro({step:i.step,stage:2,node:i.node,nextNode:n,lastPartNode:this.parts[0].node}))this.parts.splice(t)}}}isCommentLevel(e,t){var i;const n=this.parts[e];return["DL","UL","OL","DD","LI"].includes(n.node.tagName)&&!this.isGallery(n.node)&&!("up"===n.step&&this.parts[e+1]&&("UL"!==n.node.tagName&&this.isPartOfList(this.parts[e+1].node)&&"replaced"!==this.parts[e+1].step||n.node[this.parser.context.childElementsProp].length>1)&&this.isPartOfList(t,!0))&&("up"===n.step&&(!this.parts[e-1]||"back"!==this.parts[e-1].step)||this.isPartOfList(t,!0)&&!("back"===n.step&&["LI","DD"].includes(n.node.tagName))&&!(0!==e&&["UL","OL"].includes(n.node.tagName)&&["DL","UL"].includes(null===(i=n.node.previousElementSibling)||void 0===i?void 0:i.tagName))||"UL"===n.node.tagName&&1===n.node[this.parser.context.childElementsProp].length&&this.isPartOfList(t,!1))}replaceListsWithItems(){const e=this.parts[this.parts.length-1].node;for(let t=this.parts.length-1;t>=0;t--){const i=this.parts[t];if(this.isCommentLevel(t,e)){const e=this.parser.getTopElementsWithText(i.node).nodes;if(e.length>1){const i=e.map(e=>({node:e,isTextNode:!1,hasCurrentSignature:e.contains(this.signatureElement),hasForeignComponents:!1,step:"replaced"}));this.parts.splice(t,1,...i)}else if(e[0]!==i.node)Object.assign(i,{node:e[0],step:"replaced"})}}}wrapNumberedList(){if(this.parts.length>1){const e=this.parts[0].node.parentNode;if("OL"===e.tagName){const t=Number(e.contains(this.signatureElement));if(e.getElementsByClassName("cd-signature").length-t==0){const t=this.parts.filter(t=>t.node.parentNode===e),i=!this.parts.some(t=>t.node.parentNode!==e&&t.node.parentNode.contains(e));let n,r;const s=e.nextSibling,a=e.parentNode;if(i){r=document.createElement("dd");n=document.createElement("dl");n.appendChild(r)}else{r=document.createElement("div");n=r}r.appendChild(e);a.insertBefore(n,s);const o={node:r,isTextNode:!1,isHeading:!1,hasCurrentSignature:!0,hasForeignComponents:!1,step:"replaced"};this.parts.splice(0,t.length,o)}}}}setHighlightables(){this.highlightables=this.elements.filter(e=>!(Object(a.g)(e)||Object(a.i)(e)||r.a.g.unhighlightableElementClasses.some(t=>e.classList.contains(t))||/float: *(?:left|right)|display: *none/.test(e.getAttribute("style"))));if(!this.highlightables.length)throw new n.a;this.wrapHighlightables()}wrapHighlightables(){[this.highlightables[0],this.highlightables[this.highlightables.length-1]].filter(a.n).filter(e=>r.a.g.badHighlightableElements.includes(e.tagName)||this.highlightables.length>1&&"LI"===e.tagName&&"OL"===e.parentNode.tagName||e.className||e.getAttribute("style")).forEach(e=>{const t=document.createElement("div");t.className="cd-comment-replacedPart";e.parentNode.insertBefore(t,e);this.elements.splice(this.elements.indexOf(e),1,t);this.highlightables.splice(this.highlightables.indexOf(e),1,t);t.appendChild(e)})}addAttributes(){this.elements.forEach(e=>{e.classList.add("cd-comment-part");e.setAttribute("data-cd-comment-index",this.index)});this.highlightables[0].classList.add("cd-comment-part-first");this.highlightables[this.highlightables.length-1].classList.add("cd-comment-part-last")}getListsUpTree(e,t=!1){const i=[],n=new s.b(e,this.parser.context.rootElement);for(;n.parentNode();){const e=n.currentNode;if(["DL","UL","OL"].includes(e.tagName))if(e.classList.contains("cd-commentLevel")){const n=e.getAttribute("class").match(/cd-commentLevel-(\\d+)/);if(n){const r=Array(Number(n[1]));if(t)r[r.length-1]=e;i.unshift(...r)}return i}else i.unshift(e)}return i}reviewDives(){let e=!1;if(this.elements.length>1&&this.parts.some(e=>"dive"===e.step)){const i=this.elements.map(this.getListsUpTree.bind(this)),n=i[i.length-1];if(i[0].length>n.length){var t;let r,s;for(let e=i.length-2;e>=0;e--)if(i[e].length>n.length){r=e;s=this.elements[e];break}if(n.length>0||null!==(t=s.lastElementChild)&&void 0!==t&&t.classList.contains("cd-timestamp")){this.elements.splice(0,r+1);this.setHighlightables();e=!0}}}return e}fixIndentationHoles(){if(!this.level||this.elements.length<=2)return;const e=this.elements.map(e=>this.getListsUpTree(e,!0)),t=[];e.slice(1,e.length-1).forEach((e,i)=>{if(!e.length){const e=t[t.length-1];if(!e||e[e.length-1]!==i)t.push([]);t[t.length-1].push(i+1)}});t.forEach(t=>{var i;const n=null===(i=e.slice(0,t[0]).reverse().find(e=>e.length))||void 0===i?void 0:i.slice(-1)[0];if(n){const e="DL"===n.tagName?"dd":"li",i=document.createElement(e);t.forEach(e=>{i.appendChild(this.elements[e])});n.appendChild(i)}})}fixEndLevel(e){if(this.highlightables[0].className)return;const t=e[e.length-1];if(e[0].length===t.length-1){const e=t[t.length-1];let i=this.highlightables[this.highlightables.length-1];for(;i!==e;)i=this.parser.splitParentAfterNode(i)[0];let n=this.elements.length-1;for(let t=this.elements.length-2;t>0&&e.contains(this.elements[t]);t--)n=t;this.elements.splice(n,this.elements.length-n,e);this.setHighlightables()}}setLevels(e=!0){let t=this.highlightables.map(this.getListsUpTree.bind(this));this.level=Math.min(t[0].length,t[t.length-1].length);this.logicalLevel=this.level;if(e){if(this.reviewDives())t=this.highlightables.map(this.getListsUpTree.bind(this));this.fixIndentationHoles();this.fixEndLevel(t)}for(let e=0;e<this.level;e++)t.forEach(t=>{var i;null===(i=t[e])||void 0===i||i.classList.add("cd-commentLevel","cd-commentLevel-"+(e+1))})}getParent(e=!1){const t=e?"level":"logicalLevel";this.cachedParent||(this.cachedParent={});if(void 0===this.cachedParent[t]){this.cachedParent[t]=null;if(0!==this[t])for(let e=this.index-1;e>=0;e--){var i;const n=r.a.comments[e];if(n.section!==this.section)break;if(n[t]===this[t]&&null!==(i=n.cachedParent)&&void 0!==i&&i[t]){this.cachedParent[t]=n.cachedParent[t];break}if(n[t]<this[t]){this.cachedParent[t]=n;break}}}return this.cachedParent[t]}getChildren(e=!1,t=!1,i=!0){const n=[],s=t?"level":"logicalLevel";r.a.comments.slice(this.index+1).some(t=>{if(t.section===this.section&&(t[s]>this[s]||"level"===s&&i&&t[s]===this[s]&&t.isOutdented)){if(t[s]===this[s]+1||e||t.getParent()===this)n.push(t);return!1}else{if("logicalLevel"===s&&this.parser.context.areThereOutdents())r.a.comments.slice(t.index+1).some(e=>{var t;if((null===(t=e.cachedParent)||void 0===t?void 0:t.logicalLevel)===this){n.push(e);return!0}return e.section!==this.section});return!0}});return n}static isId(e){return/^\\d{12}_.+$/.test(e)}static isDtId(e){return Boolean(null==e?void 0:e.startsWith("c-"))}static isAnyId(e){return this.isId(e)||this.isDtId(e)}static generateId(e,t,i){if(!e||!t)return null;let n=Object(a.d)(e)+"_"+Object(a.k)(t);if(null!=i&&i.includes(n)){let e=2;const t=n;do{n=`${t}_${e}`;e++}while(i.includes(n))}null==i||i.push(n);return n}static updateOutdentWidth(e,t){if(!r.a.isWorker)[...e.childNodes].forEach(e=>{var i,n;const r=null===(i=e.style)||void 0===i?void 0:i.width;if(r){const[,t,i]=r.match(/^([\\d.]+)(.+)$/);if(t)e.style.width=`calc(${1.25*t}${i} + ${1.25*t/2}px)`}else if((null===(n=e[t.context.childElementsProp])||void 0===n||!n.length)&&e.textContent.includes("\\u2500"))e.textContent=e.textContent.replace(/\\u2500+/,e=>"\\u2500".repeat(Math.round(1.25*e.length)))})}static processOutdents(e){if(e.context.areThereOutdents())[...e.context.rootElement.getElementsByClassName(r.a.config.outdentClass)].reverse().forEach(t=>{let i,n;const a=new s.b(t,e.context.rootElement);for(;a.nextNode()&&!i;){let s=a.currentNode.getAttribute("data-cd-comment-index");if("0"===s)break;if(null!==s){s=Number(s);i=r.a.comments[s];for(let e=s-1;e>=0;e--){const t=r.a.comments[e];if(t.section!==i.section)break;if(i.date>=t.date){n=t;break}}if(!n)break;if(n.index!==s-1){var o;(o=i).cachedParent||(o.cachedParent={});i.cachedParent.logicalLevel=n}this.updateOutdentWidth(t,e);i.isOutdented=!0;i.elements[0].classList.add("cd-comment-outdented");r.a.comments.slice(s).some(e=>{if(e.section!==n.section||e.logicalLevel<i.level||e!==i&&e.logicalLevel===i.level||e.date<i.date)return!0;e.logicalLevel=n.level+1+(e.logicalLevel-i.level);return!1})}}})}}t.a=CommentSkeleton},function(e){e.exports=JSON.parse(\'{"Aacute":"\\xc1","aacute":"\\xe1","Abreve":"\\u0102","abreve":"\\u0103","ac":"\\u223e","acd":"\\u223f","acE":"\\u223e\\u0333","Acirc":"\\xc2","acirc":"\\xe2","acute":"\\xb4","Acy":"\\u0410","acy":"\\u0430","AElig":"\\xc6","aelig":"\\xe6","af":"\\u2061","Afr":"\\ud835\\udd04","afr":"\\ud835\\udd1e","Agrave":"\\xc0","agrave":"\\xe0","alefsym":"\\u2135","aleph":"\\u2135","Alpha":"\\u0391","alpha":"\\u03b1","Amacr":"\\u0100","amacr":"\\u0101","amalg":"\\u2a3f","amp":"&","AMP":"&","andand":"\\u2a55","And":"\\u2a53","and":"\\u2227","andd":"\\u2a5c","andslope":"\\u2a58","andv":"\\u2a5a","ang":"\\u2220","ange":"\\u29a4","angle":"\\u2220","angmsdaa":"\\u29a8","angmsdab":"\\u29a9","angmsdac":"\\u29aa","angmsdad":"\\u29ab","angmsdae":"\\u29ac","angmsdaf":"\\u29ad","angmsdag":"\\u29ae","angmsdah":"\\u29af","angmsd":"\\u2221","angrt":"\\u221f","angrtvb":"\\u22be","angrtvbd":"\\u299d","angsph":"\\u2222","angst":"\\xc5","angzarr":"\\u237c","Aogon":"\\u0104","aogon":"\\u0105","Aopf":"\\ud835\\udd38","aopf":"\\ud835\\udd52","apacir":"\\u2a6f","ap":"\\u2248","apE":"\\u2a70","ape":"\\u224a","apid":"\\u224b","apos":"\\\'","ApplyFunction":"\\u2061","approx":"\\u2248","approxeq":"\\u224a","Aring":"\\xc5","aring":"\\xe5","Ascr":"\\ud835\\udc9c","ascr":"\\ud835\\udcb6","Assign":"\\u2254","ast":"*","asymp":"\\u2248","asympeq":"\\u224d","Atilde":"\\xc3","atilde":"\\xe3","Auml":"\\xc4","auml":"\\xe4","awconint":"\\u2233","awint":"\\u2a11","backcong":"\\u224c","backepsilon":"\\u03f6","backprime":"\\u2035","backsim":"\\u223d","backsimeq":"\\u22cd","Backslash":"\\u2216","Barv":"\\u2ae7","barvee":"\\u22bd","barwed":"\\u2305","Barwed":"\\u2306","barwedge":"\\u2305","bbrk":"\\u23b5","bbrktbrk":"\\u23b6","bcong":"\\u224c","Bcy":"\\u0411","bcy":"\\u0431","bdquo":"\\u201e","becaus":"\\u2235","because":"\\u2235","Because":"\\u2235","bemptyv":"\\u29b0","bepsi":"\\u03f6","bernou":"\\u212c","Bernoullis":"\\u212c","Beta":"\\u0392","beta":"\\u03b2","beth":"\\u2136","between":"\\u226c","Bfr":"\\ud835\\udd05","bfr":"\\ud835\\udd1f","bigcap":"\\u22c2","bigcirc":"\\u25ef","bigcup":"\\u22c3","bigodot":"\\u2a00","bigoplus":"\\u2a01","bigotimes":"\\u2a02","bigsqcup":"\\u2a06","bigstar":"\\u2605","bigtriangledown":"\\u25bd","bigtriangleup":"\\u25b3","biguplus":"\\u2a04","bigvee":"\\u22c1","bigwedge":"\\u22c0","bkarow":"\\u290d","blacklozenge":"\\u29eb","blacksquare":"\\u25aa","blacktriangle":"\\u25b4","blacktriangledown":"\\u25be","blacktriangleleft":"\\u25c2","blacktriangleright":"\\u25b8","blank":"\\u2423","blk12":"\\u2592","blk14":"\\u2591","blk34":"\\u2593","block":"\\u2588","bne":"=\\u20e5","bnequiv":"\\u2261\\u20e5","bNot":"\\u2aed","bnot":"\\u2310","Bopf":"\\ud835\\udd39","bopf":"\\ud835\\udd53","bot":"\\u22a5","bottom":"\\u22a5","bowtie":"\\u22c8","boxbox":"\\u29c9","boxdl":"\\u2510","boxdL":"\\u2555","boxDl":"\\u2556","boxDL":"\\u2557","boxdr":"\\u250c","boxdR":"\\u2552","boxDr":"\\u2553","boxDR":"\\u2554","boxh":"\\u2500","boxH":"\\u2550","boxhd":"\\u252c","boxHd":"\\u2564","boxhD":"\\u2565","boxHD":"\\u2566","boxhu":"\\u2534","boxHu":"\\u2567","boxhU":"\\u2568","boxHU":"\\u2569","boxminus":"\\u229f","boxplus":"\\u229e","boxtimes":"\\u22a0","boxul":"\\u2518","boxuL":"\\u255b","boxUl":"\\u255c","boxUL":"\\u255d","boxur":"\\u2514","boxuR":"\\u2558","boxUr":"\\u2559","boxUR":"\\u255a","boxv":"\\u2502","boxV":"\\u2551","boxvh":"\\u253c","boxvH":"\\u256a","boxVh":"\\u256b","boxVH":"\\u256c","boxvl":"\\u2524","boxvL":"\\u2561","boxVl":"\\u2562","boxVL":"\\u2563","boxvr":"\\u251c","boxvR":"\\u255e","boxVr":"\\u255f","boxVR":"\\u2560","bprime":"\\u2035","breve":"\\u02d8","Breve":"\\u02d8","brvbar":"\\xa6","bscr":"\\ud835\\udcb7","Bscr":"\\u212c","bsemi":"\\u204f","bsim":"\\u223d","bsime":"\\u22cd","bsolb":"\\u29c5","bsol":"\\\\\\\\","bsolhsub":"\\u27c8","bull":"\\u2022","bullet":"\\u2022","bump":"\\u224e","bumpE":"\\u2aae","bumpe":"\\u224f","Bumpeq":"\\u224e","bumpeq":"\\u224f","Cacute":"\\u0106","cacute":"\\u0107","capand":"\\u2a44","capbrcup":"\\u2a49","capcap":"\\u2a4b","cap":"\\u2229","Cap":"\\u22d2","capcup":"\\u2a47","capdot":"\\u2a40","CapitalDifferentialD":"\\u2145","caps":"\\u2229\\ufe00","caret":"\\u2041","caron":"\\u02c7","Cayleys":"\\u212d","ccaps":"\\u2a4d","Ccaron":"\\u010c","ccaron":"\\u010d","Ccedil":"\\xc7","ccedil":"\\xe7","Ccirc":"\\u0108","ccirc":"\\u0109","Cconint":"\\u2230","ccups":"\\u2a4c","ccupssm":"\\u2a50","Cdot":"\\u010a","cdot":"\\u010b","cedil":"\\xb8","Cedilla":"\\xb8","cemptyv":"\\u29b2","cent":"\\xa2","centerdot":"\\xb7","CenterDot":"\\xb7","cfr":"\\ud835\\udd20","Cfr":"\\u212d","CHcy":"\\u0427","chcy":"\\u0447","check":"\\u2713","checkmark":"\\u2713","Chi":"\\u03a7","chi":"\\u03c7","circ":"\\u02c6","circeq":"\\u2257","circlearrowleft":"\\u21ba","circlearrowright":"\\u21bb","circledast":"\\u229b","circledcirc":"\\u229a","circleddash":"\\u229d","CircleDot":"\\u2299","circledR":"\\xae","circledS":"\\u24c8","CircleMinus":"\\u2296","CirclePlus":"\\u2295","CircleTimes":"\\u2297","cir":"\\u25cb","cirE":"\\u29c3","cire":"\\u2257","cirfnint":"\\u2a10","cirmid":"\\u2aef","cirscir":"\\u29c2","ClockwiseContourIntegral":"\\u2232","CloseCurlyDoubleQuote":"\\u201d","CloseCurlyQuote":"\\u2019","clubs":"\\u2663","clubsuit":"\\u2663","colon":":","Colon":"\\u2237","Colone":"\\u2a74","colone":"\\u2254","coloneq":"\\u2254","comma":",","commat":"@","comp":"\\u2201","compfn":"\\u2218","complement":"\\u2201","complexes":"\\u2102","cong":"\\u2245","congdot":"\\u2a6d","Congruent":"\\u2261","conint":"\\u222e","Conint":"\\u222f","ContourIntegral":"\\u222e","copf":"\\ud835\\udd54","Copf":"\\u2102","coprod":"\\u2210","Coproduct":"\\u2210","copy":"\\xa9","COPY":"\\xa9","copysr":"\\u2117","CounterClockwiseContourIntegral":"\\u2233","crarr":"\\u21b5","cross":"\\u2717","Cross":"\\u2a2f","Cscr":"\\ud835\\udc9e","cscr":"\\ud835\\udcb8","csub":"\\u2acf","csube":"\\u2ad1","csup":"\\u2ad0","csupe":"\\u2ad2","ctdot":"\\u22ef","cudarrl":"\\u2938","cudarrr":"\\u2935","cuepr":"\\u22de","cuesc":"\\u22df","cularr":"\\u21b6","cularrp":"\\u293d","cupbrcap":"\\u2a48","cupcap":"\\u2a46","CupCap":"\\u224d","cup":"\\u222a","Cup":"\\u22d3","cupcup":"\\u2a4a","cupdot":"\\u228d","cupor":"\\u2a45","cups":"\\u222a\\ufe00","curarr":"\\u21b7","curarrm":"\\u293c","curlyeqprec":"\\u22de","curlyeqsucc":"\\u22df","curlyvee":"\\u22ce","curlywedge":"\\u22cf","curren":"\\xa4","curvearrowleft":"\\u21b6","curvearrowright":"\\u21b7","cuvee":"\\u22ce","cuwed":"\\u22cf","cwconint":"\\u2232","cwint":"\\u2231","cylcty":"\\u232d","dagger":"\\u2020","Dagger":"\\u2021","daleth":"\\u2138","darr":"\\u2193","Darr":"\\u21a1","dArr":"\\u21d3","dash":"\\u2010","Dashv":"\\u2ae4","dashv":"\\u22a3","dbkarow":"\\u290f","dblac":"\\u02dd","Dcaron":"\\u010e","dcaron":"\\u010f","Dcy":"\\u0414","dcy":"\\u0434","ddagger":"\\u2021","ddarr":"\\u21ca","DD":"\\u2145","dd":"\\u2146","DDotrahd":"\\u2911","ddotseq":"\\u2a77","deg":"\\xb0","Del":"\\u2207","Delta":"\\u0394","delta":"\\u03b4","demptyv":"\\u29b1","dfisht":"\\u297f","Dfr":"\\ud835\\udd07","dfr":"\\ud835\\udd21","dHar":"\\u2965","dharl":"\\u21c3","dharr":"\\u21c2","DiacriticalAcute":"\\xb4","DiacriticalDot":"\\u02d9","DiacriticalDoubleAcute":"\\u02dd","DiacriticalGrave":"`","DiacriticalTilde":"\\u02dc","diam":"\\u22c4","diamond":"\\u22c4","Diamond":"\\u22c4","diamondsuit":"\\u2666","diams":"\\u2666","die":"\\xa8","DifferentialD":"\\u2146","digamma":"\\u03dd","disin":"\\u22f2","div":"\\xf7","divide":"\\xf7","divideontimes":"\\u22c7","divonx":"\\u22c7","DJcy":"\\u0402","djcy":"\\u0452","dlcorn":"\\u231e","dlcrop":"\\u230d","dollar":"$","Dopf":"\\ud835\\udd3b","dopf":"\\ud835\\udd55","Dot":"\\xa8","dot":"\\u02d9","DotDot":"\\u20dc","doteq":"\\u2250","doteqdot":"\\u2251","DotEqual":"\\u2250","dotminus":"\\u2238","dotplus":"\\u2214","dotsquare":"\\u22a1","doublebarwedge":"\\u2306","DoubleContourIntegral":"\\u222f","DoubleDot":"\\xa8","DoubleDownArrow":"\\u21d3","DoubleLeftArrow":"\\u21d0","DoubleLeftRightArrow":"\\u21d4","DoubleLeftTee":"\\u2ae4","DoubleLongLeftArrow":"\\u27f8","DoubleLongLeftRightArrow":"\\u27fa","DoubleLongRightArrow":"\\u27f9","DoubleRightArrow":"\\u21d2","DoubleRightTee":"\\u22a8","DoubleUpArrow":"\\u21d1","DoubleUpDownArrow":"\\u21d5","DoubleVerticalBar":"\\u2225","DownArrowBar":"\\u2913","downarrow":"\\u2193","DownArrow":"\\u2193","Downarrow":"\\u21d3","DownArrowUpArrow":"\\u21f5","DownBreve":"\\u0311","downdownarrows":"\\u21ca","downharpoonleft":"\\u21c3","downharpoonright":"\\u21c2","DownLeftRightVector":"\\u2950","DownLeftTeeVector":"\\u295e","DownLeftVectorBar":"\\u2956","DownLeftVector":"\\u21bd","DownRightTeeVector":"\\u295f","DownRightVectorBar":"\\u2957","DownRightVector":"\\u21c1","DownTeeArrow":"\\u21a7","DownTee":"\\u22a4","drbkarow":"\\u2910","drcorn":"\\u231f","drcrop":"\\u230c","Dscr":"\\ud835\\udc9f","dscr":"\\ud835\\udcb9","DScy":"\\u0405","dscy":"\\u0455","dsol":"\\u29f6","Dstrok":"\\u0110","dstrok":"\\u0111","dtdot":"\\u22f1","dtri":"\\u25bf","dtrif":"\\u25be","duarr":"\\u21f5","duhar":"\\u296f","dwangle":"\\u29a6","DZcy":"\\u040f","dzcy":"\\u045f","dzigrarr":"\\u27ff","Eacute":"\\xc9","eacute":"\\xe9","easter":"\\u2a6e","Ecaron":"\\u011a","ecaron":"\\u011b","Ecirc":"\\xca","ecirc":"\\xea","ecir":"\\u2256","ecolon":"\\u2255","Ecy":"\\u042d","ecy":"\\u044d","eDDot":"\\u2a77","Edot":"\\u0116","edot":"\\u0117","eDot":"\\u2251","ee":"\\u2147","efDot":"\\u2252","Efr":"\\ud835\\udd08","efr":"\\ud835\\udd22","eg":"\\u2a9a","Egrave":"\\xc8","egrave":"\\xe8","egs":"\\u2a96","egsdot":"\\u2a98","el":"\\u2a99","Element":"\\u2208","elinters":"\\u23e7","ell":"\\u2113","els":"\\u2a95","elsdot":"\\u2a97","Emacr":"\\u0112","emacr":"\\u0113","empty":"\\u2205","emptyset":"\\u2205","EmptySmallSquare":"\\u25fb","emptyv":"\\u2205","EmptyVerySmallSquare":"\\u25ab","emsp13":"\\u2004","emsp14":"\\u2005","emsp":"\\u2003","ENG":"\\u014a","eng":"\\u014b","ensp":"\\u2002","Eogon":"\\u0118","eogon":"\\u0119","Eopf":"\\ud835\\udd3c","eopf":"\\ud835\\udd56","epar":"\\u22d5","eparsl":"\\u29e3","eplus":"\\u2a71","epsi":"\\u03b5","Epsilon":"\\u0395","epsilon":"\\u03b5","epsiv":"\\u03f5","eqcirc":"\\u2256","eqcolon":"\\u2255","eqsim":"\\u2242","eqslantgtr":"\\u2a96","eqslantless":"\\u2a95","Equal":"\\u2a75","equals":"=","EqualTilde":"\\u2242","equest":"\\u225f","Equilibrium":"\\u21cc","equiv":"\\u2261","equivDD":"\\u2a78","eqvparsl":"\\u29e5","erarr":"\\u2971","erDot":"\\u2253","escr":"\\u212f","Escr":"\\u2130","esdot":"\\u2250","Esim":"\\u2a73","esim":"\\u2242","Eta":"\\u0397","eta":"\\u03b7","ETH":"\\xd0","eth":"\\xf0","Euml":"\\xcb","euml":"\\xeb","euro":"\\u20ac","excl":"!","exist":"\\u2203","Exists":"\\u2203","expectation":"\\u2130","exponentiale":"\\u2147","ExponentialE":"\\u2147","fallingdotseq":"\\u2252","Fcy":"\\u0424","fcy":"\\u0444","female":"\\u2640","ffilig":"\\ufb03","fflig":"\\ufb00","ffllig":"\\ufb04","Ffr":"\\ud835\\udd09","ffr":"\\ud835\\udd23","filig":"\\ufb01","FilledSmallSquare":"\\u25fc","FilledVerySmallSquare":"\\u25aa","fjlig":"fj","flat":"\\u266d","fllig":"\\ufb02","fltns":"\\u25b1","fnof":"\\u0192","Fopf":"\\ud835\\udd3d","fopf":"\\ud835\\udd57","forall":"\\u2200","ForAll":"\\u2200","fork":"\\u22d4","forkv":"\\u2ad9","Fouriertrf":"\\u2131","fpartint":"\\u2a0d","frac12":"\\xbd","frac13":"\\u2153","frac14":"\\xbc","frac15":"\\u2155","frac16":"\\u2159","frac18":"\\u215b","frac23":"\\u2154","frac25":"\\u2156","frac34":"\\xbe","frac35":"\\u2157","frac38":"\\u215c","frac45":"\\u2158","frac56":"\\u215a","frac58":"\\u215d","frac78":"\\u215e","frasl":"\\u2044","frown":"\\u2322","fscr":"\\ud835\\udcbb","Fscr":"\\u2131","gacute":"\\u01f5","Gamma":"\\u0393","gamma":"\\u03b3","Gammad":"\\u03dc","gammad":"\\u03dd","gap":"\\u2a86","Gbreve":"\\u011e","gbreve":"\\u011f","Gcedil":"\\u0122","Gcirc":"\\u011c","gcirc":"\\u011d","Gcy":"\\u0413","gcy":"\\u0433","Gdot":"\\u0120","gdot":"\\u0121","ge":"\\u2265","gE":"\\u2267","gEl":"\\u2a8c","gel":"\\u22db","geq":"\\u2265","geqq":"\\u2267","geqslant":"\\u2a7e","gescc":"\\u2aa9","ges":"\\u2a7e","gesdot":"\\u2a80","gesdoto":"\\u2a82","gesdotol":"\\u2a84","gesl":"\\u22db\\ufe00","gesles":"\\u2a94","Gfr":"\\ud835\\udd0a","gfr":"\\ud835\\udd24","gg":"\\u226b","Gg":"\\u22d9","ggg":"\\u22d9","gimel":"\\u2137","GJcy":"\\u0403","gjcy":"\\u0453","gla":"\\u2aa5","gl":"\\u2277","glE":"\\u2a92","glj":"\\u2aa4","gnap":"\\u2a8a","gnapprox":"\\u2a8a","gne":"\\u2a88","gnE":"\\u2269","gneq":"\\u2a88","gneqq":"\\u2269","gnsim":"\\u22e7","Gopf":"\\ud835\\udd3e","gopf":"\\ud835\\udd58","grave":"`","GreaterEqual":"\\u2265","GreaterEqualLess":"\\u22db","GreaterFullEqual":"\\u2267","GreaterGreater":"\\u2aa2","GreaterLess":"\\u2277","GreaterSlantEqual":"\\u2a7e","GreaterTilde":"\\u2273","Gscr":"\\ud835\\udca2","gscr":"\\u210a","gsim":"\\u2273","gsime":"\\u2a8e","gsiml":"\\u2a90","gtcc":"\\u2aa7","gtcir":"\\u2a7a","gt":">","GT":">","Gt":"\\u226b","gtdot":"\\u22d7","gtlPar":"\\u2995","gtquest":"\\u2a7c","gtrapprox":"\\u2a86","gtrarr":"\\u2978","gtrdot":"\\u22d7","gtreqless":"\\u22db","gtreqqless":"\\u2a8c","gtrless":"\\u2277","gtrsim":"\\u2273","gvertneqq":"\\u2269\\ufe00","gvnE":"\\u2269\\ufe00","Hacek":"\\u02c7","hairsp":"\\u200a","half":"\\xbd","hamilt":"\\u210b","HARDcy":"\\u042a","hardcy":"\\u044a","harrcir":"\\u2948","harr":"\\u2194","hArr":"\\u21d4","harrw":"\\u21ad","Hat":"^","hbar":"\\u210f","Hcirc":"\\u0124","hcirc":"\\u0125","hearts":"\\u2665","heartsuit":"\\u2665","hellip":"\\u2026","hercon":"\\u22b9","hfr":"\\ud835\\udd25","Hfr":"\\u210c","HilbertSpace":"\\u210b","hksearow":"\\u2925","hkswarow":"\\u2926","hoarr":"\\u21ff","homtht":"\\u223b","hookleftarrow":"\\u21a9","hookrightarrow":"\\u21aa","hopf":"\\ud835\\udd59","Hopf":"\\u210d","horbar":"\\u2015","HorizontalLine":"\\u2500","hscr":"\\ud835\\udcbd","Hscr":"\\u210b","hslash":"\\u210f","Hstrok":"\\u0126","hstrok":"\\u0127","HumpDownHump":"\\u224e","HumpEqual":"\\u224f","hybull":"\\u2043","hyphen":"\\u2010","Iacute":"\\xcd","iacute":"\\xed","ic":"\\u2063","Icirc":"\\xce","icirc":"\\xee","Icy":"\\u0418","icy":"\\u0438","Idot":"\\u0130","IEcy":"\\u0415","iecy":"\\u0435","iexcl":"\\xa1","iff":"\\u21d4","ifr":"\\ud835\\udd26","Ifr":"\\u2111","Igrave":"\\xcc","igrave":"\\xec","ii":"\\u2148","iiiint":"\\u2a0c","iiint":"\\u222d","iinfin":"\\u29dc","iiota":"\\u2129","IJlig":"\\u0132","ijlig":"\\u0133","Imacr":"\\u012a","imacr":"\\u012b","image":"\\u2111","ImaginaryI":"\\u2148","imagline":"\\u2110","imagpart":"\\u2111","imath":"\\u0131","Im":"\\u2111","imof":"\\u22b7","imped":"\\u01b5","Implies":"\\u21d2","incare":"\\u2105","in":"\\u2208","infin":"\\u221e","infintie":"\\u29dd","inodot":"\\u0131","intcal":"\\u22ba","int":"\\u222b","Int":"\\u222c","integers":"\\u2124","Integral":"\\u222b","intercal":"\\u22ba","Intersection":"\\u22c2","intlarhk":"\\u2a17","intprod":"\\u2a3c","InvisibleComma":"\\u2063","InvisibleTimes":"\\u2062","IOcy":"\\u0401","iocy":"\\u0451","Iogon":"\\u012e","iogon":"\\u012f","Iopf":"\\ud835\\udd40","iopf":"\\ud835\\udd5a","Iota":"\\u0399","iota":"\\u03b9","iprod":"\\u2a3c","iquest":"\\xbf","iscr":"\\ud835\\udcbe","Iscr":"\\u2110","isin":"\\u2208","isindot":"\\u22f5","isinE":"\\u22f9","isins":"\\u22f4","isinsv":"\\u22f3","isinv":"\\u2208","it":"\\u2062","Itilde":"\\u0128","itilde":"\\u0129","Iukcy":"\\u0406","iukcy":"\\u0456","Iuml":"\\xcf","iuml":"\\xef","Jcirc":"\\u0134","jcirc":"\\u0135","Jcy":"\\u0419","jcy":"\\u0439","Jfr":"\\ud835\\udd0d","jfr":"\\ud835\\udd27","jmath":"\\u0237","Jopf":"\\ud835\\udd41","jopf":"\\ud835\\udd5b","Jscr":"\\ud835\\udca5","jscr":"\\ud835\\udcbf","Jsercy":"\\u0408","jsercy":"\\u0458","Jukcy":"\\u0404","jukcy":"\\u0454","Kappa":"\\u039a","kappa":"\\u03ba","kappav":"\\u03f0","Kcedil":"\\u0136","kcedil":"\\u0137","Kcy":"\\u041a","kcy":"\\u043a","Kfr":"\\ud835\\udd0e","kfr":"\\ud835\\udd28","kgreen":"\\u0138","KHcy":"\\u0425","khcy":"\\u0445","KJcy":"\\u040c","kjcy":"\\u045c","Kopf":"\\ud835\\udd42","kopf":"\\ud835\\udd5c","Kscr":"\\ud835\\udca6","kscr":"\\ud835\\udcc0","lAarr":"\\u21da","Lacute":"\\u0139","lacute":"\\u013a","laemptyv":"\\u29b4","lagran":"\\u2112","Lambda":"\\u039b","lambda":"\\u03bb","lang":"\\u27e8","Lang":"\\u27ea","langd":"\\u2991","langle":"\\u27e8","lap":"\\u2a85","Laplacetrf":"\\u2112","laquo":"\\xab","larrb":"\\u21e4","larrbfs":"\\u291f","larr":"\\u2190","Larr":"\\u219e","lArr":"\\u21d0","larrfs":"\\u291d","larrhk":"\\u21a9","larrlp":"\\u21ab","larrpl":"\\u2939","larrsim":"\\u2973","larrtl":"\\u21a2","latail":"\\u2919","lAtail":"\\u291b","lat":"\\u2aab","late":"\\u2aad","lates":"\\u2aad\\ufe00","lbarr":"\\u290c","lBarr":"\\u290e","lbbrk":"\\u2772","lbrace":"{","lbrack":"[","lbrke":"\\u298b","lbrksld":"\\u298f","lbrkslu":"\\u298d","Lcaron":"\\u013d","lcaron":"\\u013e","Lcedil":"\\u013b","lcedil":"\\u013c","lceil":"\\u2308","lcub":"{","Lcy":"\\u041b","lcy":"\\u043b","ldca":"\\u2936","ldquo":"\\u201c","ldquor":"\\u201e","ldrdhar":"\\u2967","ldrushar":"\\u294b","ldsh":"\\u21b2","le":"\\u2264","lE":"\\u2266","LeftAngleBracket":"\\u27e8","LeftArrowBar":"\\u21e4","leftarrow":"\\u2190","LeftArrow":"\\u2190","Leftarrow":"\\u21d0","LeftArrowRightArrow":"\\u21c6","leftarrowtail":"\\u21a2","LeftCeiling":"\\u2308","LeftDoubleBracket":"\\u27e6","LeftDownTeeVector":"\\u2961","LeftDownVectorBar":"\\u2959","LeftDownVector":"\\u21c3","LeftFloor":"\\u230a","leftharpoondown":"\\u21bd","leftharpoonup":"\\u21bc","leftleftarrows":"\\u21c7","leftrightarrow":"\\u2194","LeftRightArrow":"\\u2194","Leftrightarrow":"\\u21d4","leftrightarrows":"\\u21c6","leftrightharpoons":"\\u21cb","leftrightsquigarrow":"\\u21ad","LeftRightVector":"\\u294e","LeftTeeArrow":"\\u21a4","LeftTee":"\\u22a3","LeftTeeVector":"\\u295a","leftthreetimes":"\\u22cb","LeftTriangleBar":"\\u29cf","LeftTriangle":"\\u22b2","LeftTriangleEqual":"\\u22b4","LeftUpDownVector":"\\u2951","LeftUpTeeVector":"\\u2960","LeftUpVectorBar":"\\u2958","LeftUpVector":"\\u21bf","LeftVectorBar":"\\u2952","LeftVector":"\\u21bc","lEg":"\\u2a8b","leg":"\\u22da","leq":"\\u2264","leqq":"\\u2266","leqslant":"\\u2a7d","lescc":"\\u2aa8","les":"\\u2a7d","lesdot":"\\u2a7f","lesdoto":"\\u2a81","lesdotor":"\\u2a83","lesg":"\\u22da\\ufe00","lesges":"\\u2a93","lessapprox":"\\u2a85","lessdot":"\\u22d6","lesseqgtr":"\\u22da","lesseqqgtr":"\\u2a8b","LessEqualGreater":"\\u22da","LessFullEqual":"\\u2266","LessGreater":"\\u2276","lessgtr":"\\u2276","LessLess":"\\u2aa1","lesssim":"\\u2272","LessSlantEqual":"\\u2a7d","LessTilde":"\\u2272","lfisht":"\\u297c","lfloor":"\\u230a","Lfr":"\\ud835\\udd0f","lfr":"\\ud835\\udd29","lg":"\\u2276","lgE":"\\u2a91","lHar":"\\u2962","lhard":"\\u21bd","lharu":"\\u21bc","lharul":"\\u296a","lhblk":"\\u2584","LJcy":"\\u0409","ljcy":"\\u0459","llarr":"\\u21c7","ll":"\\u226a","Ll":"\\u22d8","llcorner":"\\u231e","Lleftarrow":"\\u21da","llhard":"\\u296b","lltri":"\\u25fa","Lmidot":"\\u013f","lmidot":"\\u0140","lmoustache":"\\u23b0","lmoust":"\\u23b0","lnap":"\\u2a89","lnapprox":"\\u2a89","lne":"\\u2a87","lnE":"\\u2268","lneq":"\\u2a87","lneqq":"\\u2268","lnsim":"\\u22e6","loang":"\\u27ec","loarr":"\\u21fd","lobrk":"\\u27e6","longleftarrow":"\\u27f5","LongLeftArrow":"\\u27f5","Longleftarrow":"\\u27f8","longleftrightarrow":"\\u27f7","LongLeftRightArrow":"\\u27f7","Longleftrightarrow":"\\u27fa","longmapsto":"\\u27fc","longrightarrow":"\\u27f6","LongRightArrow":"\\u27f6","Longrightarrow":"\\u27f9","looparrowleft":"\\u21ab","looparrowright":"\\u21ac","lopar":"\\u2985","Lopf":"\\ud835\\udd43","lopf":"\\ud835\\udd5d","loplus":"\\u2a2d","lotimes":"\\u2a34","lowast":"\\u2217","lowbar":"_","LowerLeftArrow":"\\u2199","LowerRightArrow":"\\u2198","loz":"\\u25ca","lozenge":"\\u25ca","lozf":"\\u29eb","lpar":"(","lparlt":"\\u2993","lrarr":"\\u21c6","lrcorner":"\\u231f","lrhar":"\\u21cb","lrhard":"\\u296d","lrm":"\\u200e","lrtri":"\\u22bf","lsaquo":"\\u2039","lscr":"\\ud835\\udcc1","Lscr":"\\u2112","lsh":"\\u21b0","Lsh":"\\u21b0","lsim":"\\u2272","lsime":"\\u2a8d","lsimg":"\\u2a8f","lsqb":"[","lsquo":"\\u2018","lsquor":"\\u201a","Lstrok":"\\u0141","lstrok":"\\u0142","ltcc":"\\u2aa6","ltcir":"\\u2a79","lt":"<","LT":"<","Lt":"\\u226a","ltdot":"\\u22d6","lthree":"\\u22cb","ltimes":"\\u22c9","ltlarr":"\\u2976","ltquest":"\\u2a7b","ltri":"\\u25c3","ltrie":"\\u22b4","ltrif":"\\u25c2","ltrPar":"\\u2996","lurdshar":"\\u294a","luruhar":"\\u2966","lvertneqq":"\\u2268\\ufe00","lvnE":"\\u2268\\ufe00","macr":"\\xaf","male":"\\u2642","malt":"\\u2720","maltese":"\\u2720","Map":"\\u2905","map":"\\u21a6","mapsto":"\\u21a6","mapstodown":"\\u21a7","mapstoleft":"\\u21a4","mapstoup":"\\u21a5","marker":"\\u25ae","mcomma":"\\u2a29","Mcy":"\\u041c","mcy":"\\u043c","mdash":"\\u2014","mDDot":"\\u223a","measuredangle":"\\u2221","MediumSpace":"\\u205f","Mellintrf":"\\u2133","Mfr":"\\ud835\\udd10","mfr":"\\ud835\\udd2a","mho":"\\u2127","micro":"\\xb5","midast":"*","midcir":"\\u2af0","mid":"\\u2223","middot":"\\xb7","minusb":"\\u229f","minus":"\\u2212","minusd":"\\u2238","minusdu":"\\u2a2a","MinusPlus":"\\u2213","mlcp":"\\u2adb","mldr":"\\u2026","mnplus":"\\u2213","models":"\\u22a7","Mopf":"\\ud835\\udd44","mopf":"\\ud835\\udd5e","mp":"\\u2213","mscr":"\\ud835\\udcc2","Mscr":"\\u2133","mstpos":"\\u223e","Mu":"\\u039c","mu":"\\u03bc","multimap":"\\u22b8","mumap":"\\u22b8","nabla":"\\u2207","Nacute":"\\u0143","nacute":"\\u0144","nang":"\\u2220\\u20d2","nap":"\\u2249","napE":"\\u2a70\\u0338","napid":"\\u224b\\u0338","napos":"\\u0149","napprox":"\\u2249","natural":"\\u266e","naturals":"\\u2115","natur":"\\u266e","nbsp":"\\xa0","nbump":"\\u224e\\u0338","nbumpe":"\\u224f\\u0338","ncap":"\\u2a43","Ncaron":"\\u0147","ncaron":"\\u0148","Ncedil":"\\u0145","ncedil":"\\u0146","ncong":"\\u2247","ncongdot":"\\u2a6d\\u0338","ncup":"\\u2a42","Ncy":"\\u041d","ncy":"\\u043d","ndash":"\\u2013","nearhk":"\\u2924","nearr":"\\u2197","neArr":"\\u21d7","nearrow":"\\u2197","ne":"\\u2260","nedot":"\\u2250\\u0338","NegativeMediumSpace":"\\u200b","NegativeThickSpace":"\\u200b","NegativeThinSpace":"\\u200b","NegativeVeryThinSpace":"\\u200b","nequiv":"\\u2262","nesear":"\\u2928","nesim":"\\u2242\\u0338","NestedGreaterGreater":"\\u226b","NestedLessLess":"\\u226a","NewLine":"\\\\n","nexist":"\\u2204","nexists":"\\u2204","Nfr":"\\ud835\\udd11","nfr":"\\ud835\\udd2b","ngE":"\\u2267\\u0338","nge":"\\u2271","ngeq":"\\u2271","ngeqq":"\\u2267\\u0338","ngeqslant":"\\u2a7e\\u0338","nges":"\\u2a7e\\u0338","nGg":"\\u22d9\\u0338","ngsim":"\\u2275","nGt":"\\u226b\\u20d2","ngt":"\\u226f","ngtr":"\\u226f","nGtv":"\\u226b\\u0338","nharr":"\\u21ae","nhArr":"\\u21ce","nhpar":"\\u2af2","ni":"\\u220b","nis":"\\u22fc","nisd":"\\u22fa","niv":"\\u220b","NJcy":"\\u040a","njcy":"\\u045a","nlarr":"\\u219a","nlArr":"\\u21cd","nldr":"\\u2025","nlE":"\\u2266\\u0338","nle":"\\u2270","nleftarrow":"\\u219a","nLeftarrow":"\\u21cd","nleftrightarrow":"\\u21ae","nLeftrightarrow":"\\u21ce","nleq":"\\u2270","nleqq":"\\u2266\\u0338","nleqslant":"\\u2a7d\\u0338","nles":"\\u2a7d\\u0338","nless":"\\u226e","nLl":"\\u22d8\\u0338","nlsim":"\\u2274","nLt":"\\u226a\\u20d2","nlt":"\\u226e","nltri":"\\u22ea","nltrie":"\\u22ec","nLtv":"\\u226a\\u0338","nmid":"\\u2224","NoBreak":"\\u2060","NonBreakingSpace":"\\xa0","nopf":"\\ud835\\udd5f","Nopf":"\\u2115","Not":"\\u2aec","not":"\\xac","NotCongruent":"\\u2262","NotCupCap":"\\u226d","NotDoubleVerticalBar":"\\u2226","NotElement":"\\u2209","NotEqual":"\\u2260","NotEqualTilde":"\\u2242\\u0338","NotExists":"\\u2204","NotGreater":"\\u226f","NotGreaterEqual":"\\u2271","NotGreaterFullEqual":"\\u2267\\u0338","NotGreaterGreater":"\\u226b\\u0338","NotGreaterLess":"\\u2279","NotGreaterSlantEqual":"\\u2a7e\\u0338","NotGreaterTilde":"\\u2275","NotHumpDownHump":"\\u224e\\u0338","NotHumpEqual":"\\u224f\\u0338","notin":"\\u2209","notindot":"\\u22f5\\u0338","notinE":"\\u22f9\\u0338","notinva":"\\u2209","notinvb":"\\u22f7","notinvc":"\\u22f6","NotLeftTriangleBar":"\\u29cf\\u0338","NotLeftTriangle":"\\u22ea","NotLeftTriangleEqual":"\\u22ec","NotLess":"\\u226e","NotLessEqual":"\\u2270","NotLessGreater":"\\u2278","NotLessLess":"\\u226a\\u0338","NotLessSlantEqual":"\\u2a7d\\u0338","NotLessTilde":"\\u2274","NotNestedGreaterGreater":"\\u2aa2\\u0338","NotNestedLessLess":"\\u2aa1\\u0338","notni":"\\u220c","notniva":"\\u220c","notnivb":"\\u22fe","notnivc":"\\u22fd","NotPrecedes":"\\u2280","NotPrecedesEqual":"\\u2aaf\\u0338","NotPrecedesSlantEqual":"\\u22e0","NotReverseElement":"\\u220c","NotRightTriangleBar":"\\u29d0\\u0338","NotRightTriangle":"\\u22eb","NotRightTriangleEqual":"\\u22ed","NotSquareSubset":"\\u228f\\u0338","NotSquareSubsetEqual":"\\u22e2","NotSquareSuperset":"\\u2290\\u0338","NotSquareSupersetEqual":"\\u22e3","NotSubset":"\\u2282\\u20d2","NotSubsetEqual":"\\u2288","NotSucceeds":"\\u2281","NotSucceedsEqual":"\\u2ab0\\u0338","NotSucceedsSlantEqual":"\\u22e1","NotSucceedsTilde":"\\u227f\\u0338","NotSuperset":"\\u2283\\u20d2","NotSupersetEqual":"\\u2289","NotTilde":"\\u2241","NotTildeEqual":"\\u2244","NotTildeFullEqual":"\\u2247","NotTildeTilde":"\\u2249","NotVerticalBar":"\\u2224","nparallel":"\\u2226","npar":"\\u2226","nparsl":"\\u2afd\\u20e5","npart":"\\u2202\\u0338","npolint":"\\u2a14","npr":"\\u2280","nprcue":"\\u22e0","nprec":"\\u2280","npreceq":"\\u2aaf\\u0338","npre":"\\u2aaf\\u0338","nrarrc":"\\u2933\\u0338","nrarr":"\\u219b","nrArr":"\\u21cf","nrarrw":"\\u219d\\u0338","nrightarrow":"\\u219b","nRightarrow":"\\u21cf","nrtri":"\\u22eb","nrtrie":"\\u22ed","nsc":"\\u2281","nsccue":"\\u22e1","nsce":"\\u2ab0\\u0338","Nscr":"\\ud835\\udca9","nscr":"\\ud835\\udcc3","nshortmid":"\\u2224","nshortparallel":"\\u2226","nsim":"\\u2241","nsime":"\\u2244","nsimeq":"\\u2244","nsmid":"\\u2224","nspar":"\\u2226","nsqsube":"\\u22e2","nsqsupe":"\\u22e3","nsub":"\\u2284","nsubE":"\\u2ac5\\u0338","nsube":"\\u2288","nsubset":"\\u2282\\u20d2","nsubseteq":"\\u2288","nsubseteqq":"\\u2ac5\\u0338","nsucc":"\\u2281","nsucceq":"\\u2ab0\\u0338","nsup":"\\u2285","nsupE":"\\u2ac6\\u0338","nsupe":"\\u2289","nsupset":"\\u2283\\u20d2","nsupseteq":"\\u2289","nsupseteqq":"\\u2ac6\\u0338","ntgl":"\\u2279","Ntilde":"\\xd1","ntilde":"\\xf1","ntlg":"\\u2278","ntriangleleft":"\\u22ea","ntrianglelefteq":"\\u22ec","ntriangleright":"\\u22eb","ntrianglerighteq":"\\u22ed","Nu":"\\u039d","nu":"\\u03bd","num":"#","numero":"\\u2116","numsp":"\\u2007","nvap":"\\u224d\\u20d2","nvdash":"\\u22ac","nvDash":"\\u22ad","nVdash":"\\u22ae","nVDash":"\\u22af","nvge":"\\u2265\\u20d2","nvgt":">\\u20d2","nvHarr":"\\u2904","nvinfin":"\\u29de","nvlArr":"\\u2902","nvle":"\\u2264\\u20d2","nvlt":"<\\u20d2","nvltrie":"\\u22b4\\u20d2","nvrArr":"\\u2903","nvrtrie":"\\u22b5\\u20d2","nvsim":"\\u223c\\u20d2","nwarhk":"\\u2923","nwarr":"\\u2196","nwArr":"\\u21d6","nwarrow":"\\u2196","nwnear":"\\u2927","Oacute":"\\xd3","oacute":"\\xf3","oast":"\\u229b","Ocirc":"\\xd4","ocirc":"\\xf4","ocir":"\\u229a","Ocy":"\\u041e","ocy":"\\u043e","odash":"\\u229d","Odblac":"\\u0150","odblac":"\\u0151","odiv":"\\u2a38","odot":"\\u2299","odsold":"\\u29bc","OElig":"\\u0152","oelig":"\\u0153","ofcir":"\\u29bf","Ofr":"\\ud835\\udd12","ofr":"\\ud835\\udd2c","ogon":"\\u02db","Ograve":"\\xd2","ograve":"\\xf2","ogt":"\\u29c1","ohbar":"\\u29b5","ohm":"\\u03a9","oint":"\\u222e","olarr":"\\u21ba","olcir":"\\u29be","olcross":"\\u29bb","oline":"\\u203e","olt":"\\u29c0","Omacr":"\\u014c","omacr":"\\u014d","Omega":"\\u03a9","omega":"\\u03c9","Omicron":"\\u039f","omicron":"\\u03bf","omid":"\\u29b6","ominus":"\\u2296","Oopf":"\\ud835\\udd46","oopf":"\\ud835\\udd60","opar":"\\u29b7","OpenCurlyDoubleQuote":"\\u201c","OpenCurlyQuote":"\\u2018","operp":"\\u29b9","oplus":"\\u2295","orarr":"\\u21bb","Or":"\\u2a54","or":"\\u2228","ord":"\\u2a5d","order":"\\u2134","orderof":"\\u2134","ordf":"\\xaa","ordm":"\\xba","origof":"\\u22b6","oror":"\\u2a56","orslope":"\\u2a57","orv":"\\u2a5b","oS":"\\u24c8","Oscr":"\\ud835\\udcaa","oscr":"\\u2134","Oslash":"\\xd8","oslash":"\\xf8","osol":"\\u2298","Otilde":"\\xd5","otilde":"\\xf5","otimesas":"\\u2a36","Otimes":"\\u2a37","otimes":"\\u2297","Ouml":"\\xd6","ouml":"\\xf6","ovbar":"\\u233d","OverBar":"\\u203e","OverBrace":"\\u23de","OverBracket":"\\u23b4","OverParenthesis":"\\u23dc","para":"\\xb6","parallel":"\\u2225","par":"\\u2225","parsim":"\\u2af3","parsl":"\\u2afd","part":"\\u2202","PartialD":"\\u2202","Pcy":"\\u041f","pcy":"\\u043f","percnt":"%","period":".","permil":"\\u2030","perp":"\\u22a5","pertenk":"\\u2031","Pfr":"\\ud835\\udd13","pfr":"\\ud835\\udd2d","Phi":"\\u03a6","phi":"\\u03c6","phiv":"\\u03d5","phmmat":"\\u2133","phone":"\\u260e","Pi":"\\u03a0","pi":"\\u03c0","pitchfork":"\\u22d4","piv":"\\u03d6","planck":"\\u210f","planckh":"\\u210e","plankv":"\\u210f","plusacir":"\\u2a23","plusb":"\\u229e","pluscir":"\\u2a22","plus":"+","plusdo":"\\u2214","plusdu":"\\u2a25","pluse":"\\u2a72","PlusMinus":"\\xb1","plusmn":"\\xb1","plussim":"\\u2a26","plustwo":"\\u2a27","pm":"\\xb1","Poincareplane":"\\u210c","pointint":"\\u2a15","popf":"\\ud835\\udd61","Popf":"\\u2119","pound":"\\xa3","prap":"\\u2ab7","Pr":"\\u2abb","pr":"\\u227a","prcue":"\\u227c","precapprox":"\\u2ab7","prec":"\\u227a","preccurlyeq":"\\u227c","Precedes":"\\u227a","PrecedesEqual":"\\u2aaf","PrecedesSlantEqual":"\\u227c","PrecedesTilde":"\\u227e","preceq":"\\u2aaf","precnapprox":"\\u2ab9","precneqq":"\\u2ab5","precnsim":"\\u22e8","pre":"\\u2aaf","prE":"\\u2ab3","precsim":"\\u227e","prime":"\\u2032","Prime":"\\u2033","primes":"\\u2119","prnap":"\\u2ab9","prnE":"\\u2ab5","prnsim":"\\u22e8","prod":"\\u220f","Product":"\\u220f","profalar":"\\u232e","profline":"\\u2312","profsurf":"\\u2313","prop":"\\u221d","Proportional":"\\u221d","Proportion":"\\u2237","propto":"\\u221d","prsim":"\\u227e","prurel":"\\u22b0","Pscr":"\\ud835\\udcab","pscr":"\\ud835\\udcc5","Psi":"\\u03a8","psi":"\\u03c8","puncsp":"\\u2008","Qfr":"\\ud835\\udd14","qfr":"\\ud835\\udd2e","qint":"\\u2a0c","qopf":"\\ud835\\udd62","Qopf":"\\u211a","qprime":"\\u2057","Qscr":"\\ud835\\udcac","qscr":"\\ud835\\udcc6","quaternions":"\\u210d","quatint":"\\u2a16","quest":"?","questeq":"\\u225f","quot":"\\\\"","QUOT":"\\\\"","rAarr":"\\u21db","race":"\\u223d\\u0331","Racute":"\\u0154","racute":"\\u0155","radic":"\\u221a","raemptyv":"\\u29b3","rang":"\\u27e9","Rang":"\\u27eb","rangd":"\\u2992","range":"\\u29a5","rangle":"\\u27e9","raquo":"\\xbb","rarrap":"\\u2975","rarrb":"\\u21e5","rarrbfs":"\\u2920","rarrc":"\\u2933","rarr":"\\u2192","Rarr":"\\u21a0","rArr":"\\u21d2","rarrfs":"\\u291e","rarrhk":"\\u21aa","rarrlp":"\\u21ac","rarrpl":"\\u2945","rarrsim":"\\u2974","Rarrtl":"\\u2916","rarrtl":"\\u21a3","rarrw":"\\u219d","ratail":"\\u291a","rAtail":"\\u291c","ratio":"\\u2236","rationals":"\\u211a","rbarr":"\\u290d","rBarr":"\\u290f","RBarr":"\\u2910","rbbrk":"\\u2773","rbrace":"}","rbrack":"]","rbrke":"\\u298c","rbrksld":"\\u298e","rbrkslu":"\\u2990","Rcaron":"\\u0158","rcaron":"\\u0159","Rcedil":"\\u0156","rcedil":"\\u0157","rceil":"\\u2309","rcub":"}","Rcy":"\\u0420","rcy":"\\u0440","rdca":"\\u2937","rdldhar":"\\u2969","rdquo":"\\u201d","rdquor":"\\u201d","rdsh":"\\u21b3","real":"\\u211c","realine":"\\u211b","realpart":"\\u211c","reals":"\\u211d","Re":"\\u211c","rect":"\\u25ad","reg":"\\xae","REG":"\\xae","ReverseElement":"\\u220b","ReverseEquilibrium":"\\u21cb","ReverseUpEquilibrium":"\\u296f","rfisht":"\\u297d","rfloor":"\\u230b","rfr":"\\ud835\\udd2f","Rfr":"\\u211c","rHar":"\\u2964","rhard":"\\u21c1","rharu":"\\u21c0","rharul":"\\u296c","Rho":"\\u03a1","rho":"\\u03c1","rhov":"\\u03f1","RightAngleBracket":"\\u27e9","RightArrowBar":"\\u21e5","rightarrow":"\\u2192","RightArrow":"\\u2192","Rightarrow":"\\u21d2","RightArrowLeftArrow":"\\u21c4","rightarrowtail":"\\u21a3","RightCeiling":"\\u2309","RightDoubleBracket":"\\u27e7","RightDownTeeVector":"\\u295d","RightDownVectorBar":"\\u2955","RightDownVector":"\\u21c2","RightFloor":"\\u230b","rightharpoondown":"\\u21c1","rightharpoonup":"\\u21c0","rightleftarrows":"\\u21c4","rightleftharpoons":"\\u21cc","rightrightarrows":"\\u21c9","rightsquigarrow":"\\u219d","RightTeeArrow":"\\u21a6","RightTee":"\\u22a2","RightTeeVector":"\\u295b","rightthreetimes":"\\u22cc","RightTriangleBar":"\\u29d0","RightTriangle":"\\u22b3","RightTriangleEqual":"\\u22b5","RightUpDownVector":"\\u294f","RightUpTeeVector":"\\u295c","RightUpVectorBar":"\\u2954","RightUpVector":"\\u21be","RightVectorBar":"\\u2953","RightVector":"\\u21c0","ring":"\\u02da","risingdotseq":"\\u2253","rlarr":"\\u21c4","rlhar":"\\u21cc","rlm":"\\u200f","rmoustache":"\\u23b1","rmoust":"\\u23b1","rnmid":"\\u2aee","roang":"\\u27ed","roarr":"\\u21fe","robrk":"\\u27e7","ropar":"\\u2986","ropf":"\\ud835\\udd63","Ropf":"\\u211d","roplus":"\\u2a2e","rotimes":"\\u2a35","RoundImplies":"\\u2970","rpar":")","rpargt":"\\u2994","rppolint":"\\u2a12","rrarr":"\\u21c9","Rrightarrow":"\\u21db","rsaquo":"\\u203a","rscr":"\\ud835\\udcc7","Rscr":"\\u211b","rsh":"\\u21b1","Rsh":"\\u21b1","rsqb":"]","rsquo":"\\u2019","rsquor":"\\u2019","rthree":"\\u22cc","rtimes":"\\u22ca","rtri":"\\u25b9","rtrie":"\\u22b5","rtrif":"\\u25b8","rtriltri":"\\u29ce","RuleDelayed":"\\u29f4","ruluhar":"\\u2968","rx":"\\u211e","Sacute":"\\u015a","sacute":"\\u015b","sbquo":"\\u201a","scap":"\\u2ab8","Scaron":"\\u0160","scaron":"\\u0161","Sc":"\\u2abc","sc":"\\u227b","sccue":"\\u227d","sce":"\\u2ab0","scE":"\\u2ab4","Scedil":"\\u015e","scedil":"\\u015f","Scirc":"\\u015c","scirc":"\\u015d","scnap":"\\u2aba","scnE":"\\u2ab6","scnsim":"\\u22e9","scpolint":"\\u2a13","scsim":"\\u227f","Scy":"\\u0421","scy":"\\u0441","sdotb":"\\u22a1","sdot":"\\u22c5","sdote":"\\u2a66","searhk":"\\u2925","searr":"\\u2198","seArr":"\\u21d8","searrow":"\\u2198","sect":"\\xa7","semi":";","seswar":"\\u2929","setminus":"\\u2216","setmn":"\\u2216","sext":"\\u2736","Sfr":"\\ud835\\udd16","sfr":"\\ud835\\udd30","sfrown":"\\u2322","sharp":"\\u266f","SHCHcy":"\\u0429","shchcy":"\\u0449","SHcy":"\\u0428","shcy":"\\u0448","ShortDownArrow":"\\u2193","ShortLeftArrow":"\\u2190","shortmid":"\\u2223","shortparallel":"\\u2225","ShortRightArrow":"\\u2192","ShortUpArrow":"\\u2191","shy":"\\xad","Sigma":"\\u03a3","sigma":"\\u03c3","sigmaf":"\\u03c2","sigmav":"\\u03c2","sim":"\\u223c","simdot":"\\u2a6a","sime":"\\u2243","simeq":"\\u2243","simg":"\\u2a9e","simgE":"\\u2aa0","siml":"\\u2a9d","simlE":"\\u2a9f","simne":"\\u2246","simplus":"\\u2a24","simrarr":"\\u2972","slarr":"\\u2190","SmallCircle":"\\u2218","smallsetminus":"\\u2216","smashp":"\\u2a33","smeparsl":"\\u29e4","smid":"\\u2223","smile":"\\u2323","smt":"\\u2aaa","smte":"\\u2aac","smtes":"\\u2aac\\ufe00","SOFTcy":"\\u042c","softcy":"\\u044c","solbar":"\\u233f","solb":"\\u29c4","sol":"/","Sopf":"\\ud835\\udd4a","sopf":"\\ud835\\udd64","spades":"\\u2660","spadesuit":"\\u2660","spar":"\\u2225","sqcap":"\\u2293","sqcaps":"\\u2293\\ufe00","sqcup":"\\u2294","sqcups":"\\u2294\\ufe00","Sqrt":"\\u221a","sqsub":"\\u228f","sqsube":"\\u2291","sqsubset":"\\u228f","sqsubseteq":"\\u2291","sqsup":"\\u2290","sqsupe":"\\u2292","sqsupset":"\\u2290","sqsupseteq":"\\u2292","square":"\\u25a1","Square":"\\u25a1","SquareIntersection":"\\u2293","SquareSubset":"\\u228f","SquareSubsetEqual":"\\u2291","SquareSuperset":"\\u2290","SquareSupersetEqual":"\\u2292","SquareUnion":"\\u2294","squarf":"\\u25aa","squ":"\\u25a1","squf":"\\u25aa","srarr":"\\u2192","Sscr":"\\ud835\\udcae","sscr":"\\ud835\\udcc8","ssetmn":"\\u2216","ssmile":"\\u2323","sstarf":"\\u22c6","Star":"\\u22c6","star":"\\u2606","starf":"\\u2605","straightepsilon":"\\u03f5","straightphi":"\\u03d5","strns":"\\xaf","sub":"\\u2282","Sub":"\\u22d0","subdot":"\\u2abd","subE":"\\u2ac5","sube":"\\u2286","subedot":"\\u2ac3","submult":"\\u2ac1","subnE":"\\u2acb","subne":"\\u228a","subplus":"\\u2abf","subrarr":"\\u2979","subset":"\\u2282","Subset":"\\u22d0","subseteq":"\\u2286","subseteqq":"\\u2ac5","SubsetEqual":"\\u2286","subsetneq":"\\u228a","subsetneqq":"\\u2acb","subsim":"\\u2ac7","subsub":"\\u2ad5","subsup":"\\u2ad3","succapprox":"\\u2ab8","succ":"\\u227b","succcurlyeq":"\\u227d","Succeeds":"\\u227b","SucceedsEqual":"\\u2ab0","SucceedsSlantEqual":"\\u227d","SucceedsTilde":"\\u227f","succeq":"\\u2ab0","succnapprox":"\\u2aba","succneqq":"\\u2ab6","succnsim":"\\u22e9","succsim":"\\u227f","SuchThat":"\\u220b","sum":"\\u2211","Sum":"\\u2211","sung":"\\u266a","sup1":"\\xb9","sup2":"\\xb2","sup3":"\\xb3","sup":"\\u2283","Sup":"\\u22d1","supdot":"\\u2abe","supdsub":"\\u2ad8","supE":"\\u2ac6","supe":"\\u2287","supedot":"\\u2ac4","Superset":"\\u2283","SupersetEqual":"\\u2287","suphsol":"\\u27c9","suphsub":"\\u2ad7","suplarr":"\\u297b","supmult":"\\u2ac2","supnE":"\\u2acc","supne":"\\u228b","supplus":"\\u2ac0","supset":"\\u2283","Supset":"\\u22d1","supseteq":"\\u2287","supseteqq":"\\u2ac6","supsetneq":"\\u228b","supsetneqq":"\\u2acc","supsim":"\\u2ac8","supsub":"\\u2ad4","supsup":"\\u2ad6","swarhk":"\\u2926","swarr":"\\u2199","swArr":"\\u21d9","swarrow":"\\u2199","swnwar":"\\u292a","szlig":"\\xdf","Tab":"\\\\t","target":"\\u2316","Tau":"\\u03a4","tau":"\\u03c4","tbrk":"\\u23b4","Tcaron":"\\u0164","tcaron":"\\u0165","Tcedil":"\\u0162","tcedil":"\\u0163","Tcy":"\\u0422","tcy":"\\u0442","tdot":"\\u20db","telrec":"\\u2315","Tfr":"\\ud835\\udd17","tfr":"\\ud835\\udd31","there4":"\\u2234","therefore":"\\u2234","Therefore":"\\u2234","Theta":"\\u0398","theta":"\\u03b8","thetasym":"\\u03d1","thetav":"\\u03d1","thickapprox":"\\u2248","thicksim":"\\u223c","ThickSpace":"\\u205f\\u200a","ThinSpace":"\\u2009","thinsp":"\\u2009","thkap":"\\u2248","thksim":"\\u223c","THORN":"\\xde","thorn":"\\xfe","tilde":"\\u02dc","Tilde":"\\u223c","TildeEqual":"\\u2243","TildeFullEqual":"\\u2245","TildeTilde":"\\u2248","timesbar":"\\u2a31","timesb":"\\u22a0","times":"\\xd7","timesd":"\\u2a30","tint":"\\u222d","toea":"\\u2928","topbot":"\\u2336","topcir":"\\u2af1","top":"\\u22a4","Topf":"\\ud835\\udd4b","topf":"\\ud835\\udd65","topfork":"\\u2ada","tosa":"\\u2929","tprime":"\\u2034","trade":"\\u2122","TRADE":"\\u2122","triangle":"\\u25b5","triangledown":"\\u25bf","triangleleft":"\\u25c3","trianglelefteq":"\\u22b4","triangleq":"\\u225c","triangleright":"\\u25b9","trianglerighteq":"\\u22b5","tridot":"\\u25ec","trie":"\\u225c","triminus":"\\u2a3a","TripleDot":"\\u20db","triplus":"\\u2a39","trisb":"\\u29cd","tritime":"\\u2a3b","trpezium":"\\u23e2","Tscr":"\\ud835\\udcaf","tscr":"\\ud835\\udcc9","TScy":"\\u0426","tscy":"\\u0446","TSHcy":"\\u040b","tshcy":"\\u045b","Tstrok":"\\u0166","tstrok":"\\u0167","twixt":"\\u226c","twoheadleftarrow":"\\u219e","twoheadrightarrow":"\\u21a0","Uacute":"\\xda","uacute":"\\xfa","uarr":"\\u2191","Uarr":"\\u219f","uArr":"\\u21d1","Uarrocir":"\\u2949","Ubrcy":"\\u040e","ubrcy":"\\u045e","Ubreve":"\\u016c","ubreve":"\\u016d","Ucirc":"\\xdb","ucirc":"\\xfb","Ucy":"\\u0423","ucy":"\\u0443","udarr":"\\u21c5","Udblac":"\\u0170","udblac":"\\u0171","udhar":"\\u296e","ufisht":"\\u297e","Ufr":"\\ud835\\udd18","ufr":"\\ud835\\udd32","Ugrave":"\\xd9","ugrave":"\\xf9","uHar":"\\u2963","uharl":"\\u21bf","uharr":"\\u21be","uhblk":"\\u2580","ulcorn":"\\u231c","ulcorner":"\\u231c","ulcrop":"\\u230f","ultri":"\\u25f8","Umacr":"\\u016a","umacr":"\\u016b","uml":"\\xa8","UnderBar":"_","UnderBrace":"\\u23df","UnderBracket":"\\u23b5","UnderParenthesis":"\\u23dd","Union":"\\u22c3","UnionPlus":"\\u228e","Uogon":"\\u0172","uogon":"\\u0173","Uopf":"\\ud835\\udd4c","uopf":"\\ud835\\udd66","UpArrowBar":"\\u2912","uparrow":"\\u2191","UpArrow":"\\u2191","Uparrow":"\\u21d1","UpArrowDownArrow":"\\u21c5","updownarrow":"\\u2195","UpDownArrow":"\\u2195","Updownarrow":"\\u21d5","UpEquilibrium":"\\u296e","upharpoonleft":"\\u21bf","upharpoonright":"\\u21be","uplus":"\\u228e","UpperLeftArrow":"\\u2196","UpperRightArrow":"\\u2197","upsi":"\\u03c5","Upsi":"\\u03d2","upsih":"\\u03d2","Upsilon":"\\u03a5","upsilon":"\\u03c5","UpTeeArrow":"\\u21a5","UpTee":"\\u22a5","upuparrows":"\\u21c8","urcorn":"\\u231d","urcorner":"\\u231d","urcrop":"\\u230e","Uring":"\\u016e","uring":"\\u016f","urtri":"\\u25f9","Uscr":"\\ud835\\udcb0","uscr":"\\ud835\\udcca","utdot":"\\u22f0","Utilde":"\\u0168","utilde":"\\u0169","utri":"\\u25b5","utrif":"\\u25b4","uuarr":"\\u21c8","Uuml":"\\xdc","uuml":"\\xfc","uwangle":"\\u29a7","vangrt":"\\u299c","varepsilon":"\\u03f5","varkappa":"\\u03f0","varnothing":"\\u2205","varphi":"\\u03d5","varpi":"\\u03d6","varpropto":"\\u221d","varr":"\\u2195","vArr":"\\u21d5","varrho":"\\u03f1","varsigma":"\\u03c2","varsubsetneq":"\\u228a\\ufe00","varsubsetneqq":"\\u2acb\\ufe00","varsupsetneq":"\\u228b\\ufe00","varsupsetneqq":"\\u2acc\\ufe00","vartheta":"\\u03d1","vartriangleleft":"\\u22b2","vartriangleright":"\\u22b3","vBar":"\\u2ae8","Vbar":"\\u2aeb","vBarv":"\\u2ae9","Vcy":"\\u0412","vcy":"\\u0432","vdash":"\\u22a2","vDash":"\\u22a8","Vdash":"\\u22a9","VDash":"\\u22ab","Vdashl":"\\u2ae6","veebar":"\\u22bb","vee":"\\u2228","Vee":"\\u22c1","veeeq":"\\u225a","vellip":"\\u22ee","verbar":"|","Verbar":"\\u2016","vert":"|","Vert":"\\u2016","VerticalBar":"\\u2223","VerticalLine":"|","VerticalSeparator":"\\u2758","VerticalTilde":"\\u2240","VeryThinSpace":"\\u200a","Vfr":"\\ud835\\udd19","vfr":"\\ud835\\udd33","vltri":"\\u22b2","vnsub":"\\u2282\\u20d2","vnsup":"\\u2283\\u20d2","Vopf":"\\ud835\\udd4d","vopf":"\\ud835\\udd67","vprop":"\\u221d","vrtri":"\\u22b3","Vscr":"\\ud835\\udcb1","vscr":"\\ud835\\udccb","vsubnE":"\\u2acb\\ufe00","vsubne":"\\u228a\\ufe00","vsupnE":"\\u2acc\\ufe00","vsupne":"\\u228b\\ufe00","Vvdash":"\\u22aa","vzigzag":"\\u299a","Wcirc":"\\u0174","wcirc":"\\u0175","wedbar":"\\u2a5f","wedge":"\\u2227","Wedge":"\\u22c0","wedgeq":"\\u2259","weierp":"\\u2118","Wfr":"\\ud835\\udd1a","wfr":"\\ud835\\udd34","Wopf":"\\ud835\\udd4e","wopf":"\\ud835\\udd68","wp":"\\u2118","wr":"\\u2240","wreath":"\\u2240","Wscr":"\\ud835\\udcb2","wscr":"\\ud835\\udccc","xcap":"\\u22c2","xcirc":"\\u25ef","xcup":"\\u22c3","xdtri":"\\u25bd","Xfr":"\\ud835\\udd1b","xfr":"\\ud835\\udd35","xharr":"\\u27f7","xhArr":"\\u27fa","Xi":"\\u039e","xi":"\\u03be","xlarr":"\\u27f5","xlArr":"\\u27f8","xmap":"\\u27fc","xnis":"\\u22fb","xodot":"\\u2a00","Xopf":"\\ud835\\udd4f","xopf":"\\ud835\\udd69","xoplus":"\\u2a01","xotime":"\\u2a02","xrarr":"\\u27f6","xrArr":"\\u27f9","Xscr":"\\ud835\\udcb3","xscr":"\\ud835\\udccd","xsqcup":"\\u2a06","xuplus":"\\u2a04","xutri":"\\u25b3","xvee":"\\u22c1","xwedge":"\\u22c0","Yacute":"\\xdd","yacute":"\\xfd","YAcy":"\\u042f","yacy":"\\u044f","Ycirc":"\\u0176","ycirc":"\\u0177","Ycy":"\\u042b","ycy":"\\u044b","yen":"\\xa5","Yfr":"\\ud835\\udd1c","yfr":"\\ud835\\udd36","YIcy":"\\u0407","yicy":"\\u0457","Yopf":"\\ud835\\udd50","yopf":"\\ud835\\udd6a","Yscr":"\\ud835\\udcb4","yscr":"\\ud835\\udcce","YUcy":"\\u042e","yucy":"\\u044e","yuml":"\\xff","Yuml":"\\u0178","Zacute":"\\u0179","zacute":"\\u017a","Zcaron":"\\u017d","zcaron":"\\u017e","Zcy":"\\u0417","zcy":"\\u0437","Zdot":"\\u017b","zdot":"\\u017c","zeetrf":"\\u2128","ZeroWidthSpace":"\\u200b","Zeta":"\\u0396","zeta":"\\u03b6","zfr":"\\ud835\\udd37","Zfr":"\\u2128","ZHcy":"\\u0416","zhcy":"\\u0436","zigrarr":"\\u21dd","zopf":"\\ud835\\udd6b","Zopf":"\\u2124","Zscr":"\\ud835\\udcb5","zscr":"\\ud835\\udccf","zwj":"\\u200d","zwnj":"\\u200c"}\')},function(e){e.exports=JSON.parse(\'{"amp":"&","apos":"\\\'","gt":">","lt":"<","quot":"\\\\""}\')},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.Parser=void 0;var r=n(i(13)),s=new Set(["input","option","optgroup","select","button","datalist","textarea"]),a=new Set(["p"]),o={tr:new Set(["tr","th","td"]),th:new Set(["th"]),td:new Set(["thead","th","td"]),body:new Set(["head","link","script"]),li:new Set(["li"]),p:a,h1:a,h2:a,h3:a,h4:a,h5:a,h6:a,select:s,input:s,output:s,button:s,datalist:s,textarea:s,option:new Set(["option"]),optgroup:new Set(["optgroup","option"]),dd:new Set(["dt","dd"]),dt:new Set(["dt","dd"]),address:a,article:a,aside:a,blockquote:a,details:a,div:a,dl:a,fieldset:a,figcaption:a,figure:a,footer:a,form:a,header:a,hr:a,main:a,nav:a,ol:a,pre:a,section:a,table:a,ul:a,rt:new Set(["rt","rp"]),rp:new Set(["rt","rp"]),tbody:new Set(["thead","tbody"]),tfoot:new Set(["thead","tbody"])},l=new Set(["area","base","basefont","br","col","command","embed","frame","hr","img","input","isindex","keygen","link","meta","param","source","track","wbr"]),c=new Set(["math","svg"]),u=new Set(["mi","mo","mn","ms","mtext","annotation-xml","foreignObject","desc","title"]),h=/\\s|\\//,d=function(){function e(e,t){if(void 0===t)t={};var i,n,s,a,o;this.startIndex=0;this.endIndex=null;this.tagname="";this.attribname="";this.attribvalue="";this.attribs=null;this.stack=[];this.foreignContext=[];this.options=t;this.cbs=null!=e?e:{};this.lowerCaseTagNames=null!==(i=t.lowerCaseTags)&&void 0!==i?i:!t.xmlMode;this.lowerCaseAttributeNames=null!==(n=t.lowerCaseAttributeNames)&&void 0!==n?n:!t.xmlMode;this.tokenizer=new(null!==(s=t.Tokenizer)&&void 0!==s?s:r.default)(this.options,this);null===(o=(a=this.cbs).onparserinit)||void 0===o||o.call(a,this)}e.prototype.updatePosition=function(e){if(null===this.endIndex)if(this.tokenizer.sectionStart<=e)this.startIndex=0;else this.startIndex=this.tokenizer.sectionStart-e;else this.startIndex=this.endIndex+1;this.endIndex=this.tokenizer.getAbsoluteIndex()};e.prototype.ontext=function(e){var t,i;this.updatePosition(1);this.endIndex--;null===(i=(t=this.cbs).ontext)||void 0===i||i.call(t,e)};e.prototype.onopentagname=function(e){var t,i;if(this.lowerCaseTagNames)e=e.toLowerCase();this.tagname=e;if(!this.options.xmlMode&&Object.prototype.hasOwnProperty.call(o,e))for(var n=void 0;this.stack.length>0&&o[e].has(n=this.stack[this.stack.length-1]);)this.onclosetag(n);if(this.options.xmlMode||!l.has(e)){this.stack.push(e);if(c.has(e))this.foreignContext.push(!0);else if(u.has(e))this.foreignContext.push(!1)}null===(i=(t=this.cbs).onopentagname)||void 0===i||i.call(t,e);if(this.cbs.onopentag)this.attribs={}};e.prototype.onopentagend=function(){var e,t;this.updatePosition(1);if(this.attribs){null===(t=(e=this.cbs).onopentag)||void 0===t||t.call(e,this.tagname,this.attribs);this.attribs=null}if(!this.options.xmlMode&&this.cbs.onclosetag&&l.has(this.tagname))this.cbs.onclosetag(this.tagname);this.tagname=""};e.prototype.onclosetag=function(e){this.updatePosition(1);if(this.lowerCaseTagNames)e=e.toLowerCase();if(c.has(e)||u.has(e))this.foreignContext.pop();if(this.stack.length&&(this.options.xmlMode||!l.has(e))){var t=this.stack.lastIndexOf(e);if(-1!==t)if(this.cbs.onclosetag){t=this.stack.length-t;for(;t--;)this.cbs.onclosetag(this.stack.pop())}else this.stack.length=t;else if("p"===e&&!this.options.xmlMode){this.onopentagname(e);this.closeCurrentTag()}}else if(!this.options.xmlMode&&("br"===e||"p"===e)){this.onopentagname(e);this.closeCurrentTag()}};e.prototype.onselfclosingtag=function(){if(this.options.xmlMode||this.options.recognizeSelfClosing||this.foreignContext[this.foreignContext.length-1])this.closeCurrentTag();else this.onopentagend()};e.prototype.closeCurrentTag=function(){var e,t,i=this.tagname;this.onopentagend();if(this.stack[this.stack.length-1]===i){null===(t=(e=this.cbs).onclosetag)||void 0===t||t.call(e,i);this.stack.pop()}};e.prototype.onattribname=function(e){if(this.lowerCaseAttributeNames)e=e.toLowerCase();this.attribname=e};e.prototype.onattribdata=function(e){this.attribvalue+=e};e.prototype.onattribend=function(e){var t,i;null===(i=(t=this.cbs).onattribute)||void 0===i||i.call(t,this.attribname,this.attribvalue,e);if(this.attribs&&!Object.prototype.hasOwnProperty.call(this.attribs,this.attribname))this.attribs[this.attribname]=this.attribvalue;this.attribname="";this.attribvalue=""};e.prototype.getInstructionName=function(e){var t=e.search(h),i=t<0?e:e.substr(0,t);if(this.lowerCaseTagNames)i=i.toLowerCase();return i};e.prototype.ondeclaration=function(e){if(this.cbs.onprocessinginstruction){var t=this.getInstructionName(e);this.cbs.onprocessinginstruction("!"+t,"!"+e)}};e.prototype.onprocessinginstruction=function(e){if(this.cbs.onprocessinginstruction){var t=this.getInstructionName(e);this.cbs.onprocessinginstruction("?"+t,"?"+e)}};e.prototype.oncomment=function(e){var t,i,n,r;this.updatePosition(4);null===(i=(t=this.cbs).oncomment)||void 0===i||i.call(t,e);null===(r=(n=this.cbs).oncommentend)||void 0===r||r.call(n)};e.prototype.oncdata=function(e){var t,i,n,r,s,a;this.updatePosition(1);if(this.options.xmlMode||this.options.recognizeCDATA){null===(i=(t=this.cbs).oncdatastart)||void 0===i||i.call(t);null===(r=(n=this.cbs).ontext)||void 0===r||r.call(n,e);null===(a=(s=this.cbs).oncdataend)||void 0===a||a.call(s)}else this.oncomment("[CDATA["+e+"]]")};e.prototype.onerror=function(e){var t,i;null===(i=(t=this.cbs).onerror)||void 0===i||i.call(t,e)};e.prototype.onend=function(){var e,t;if(this.cbs.onclosetag)for(var i=this.stack.length;i>0;this.cbs.onclosetag(this.stack[--i]));null===(t=(e=this.cbs).onend)||void 0===t||t.call(e)};e.prototype.reset=function(){var e,t,i,n;null===(t=(e=this.cbs).onreset)||void 0===t||t.call(e);this.tokenizer.reset();this.tagname="";this.attribname="";this.attribs=null;this.stack=[];null===(n=(i=this.cbs).onparserinit)||void 0===n||n.call(i,this)};e.prototype.parseComplete=function(e){this.reset();this.end(e)};e.prototype.write=function(e){this.tokenizer.write(e)};e.prototype.end=function(e){this.tokenizer.end(e)};e.prototype.pause=function(){this.tokenizer.pause()};e.prototype.resume=function(){this.tokenizer.resume()};e.prototype.parseChunk=function(e){this.write(e)};e.prototype.done=function(e){this.end(e)};return e}();t.Parser=d},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});var r=n(i(14)),s=n(i(10)),a=n(i(15)),o=n(i(11));function l(e){return" "===e||"\\n"===e||"\\t"===e||"\\f"===e||"\\r"===e}function c(e){return e>="a"&&e<="z"||e>="A"&&e<="Z"}function u(e,t,i){var n=e.toLowerCase();if(e===n)return function(e,r){if(r===n)e._state=t;else{e._state=i;e._index--}};else return function(r,s){if(s===n||s===e)r._state=t;else{r._state=i;r._index--}}}function h(e,t){var i=e.toLowerCase();return function(n,r){if(r===i||r===e)n._state=t;else{n._state=3;n._index--}}}var d=u("C",24,16),f=u("D",25,16),p=u("A",26,16),m=u("T",27,16),g=u("A",28,16),b=h("R",35),v=h("I",36),_=h("P",37),y=h("T",38),E=u("R",40,1),T=u("I",41,1),x=u("P",42,1),C=u("T",43,1),N=h("Y",45),S=h("L",46),D=h("E",47),w=u("Y",49,1),O=u("L",50,1),L=u("E",51,1),M=h("I",54),P=h("T",55),k=h("L",56),A=h("E",57),I=u("I",58,1),q=u("T",59,1),j=u("L",60,1),B=u("E",61,1),U=u("#",63,64),H=u("X",66,65),R=function(){function e(e,t){var i;this._state=1;this.buffer="";this.sectionStart=0;this._index=0;this.bufferOffset=0;this.baseState=1;this.special=1;this.running=!0;this.ended=!1;this.cbs=t;this.xmlMode=!!(null==e?void 0:e.xmlMode);this.decodeEntities=null!==(i=null==e?void 0:e.decodeEntities)&&void 0!==i?i:!0}e.prototype.reset=function(){this._state=1;this.buffer="";this.sectionStart=0;this._index=0;this.bufferOffset=0;this.baseState=1;this.special=1;this.running=!0;this.ended=!1};e.prototype.write=function(e){if(this.ended)this.cbs.onerror(Error(".write() after done!"));this.buffer+=e;this.parse()};e.prototype.end=function(e){if(this.ended)this.cbs.onerror(Error(".end() after done!"));if(e)this.write(e);this.ended=!0;if(this.running)this.finish()};e.prototype.pause=function(){this.running=!1};e.prototype.resume=function(){this.running=!0;if(this._index<this.buffer.length)this.parse();if(this.ended)this.finish()};e.prototype.getAbsoluteIndex=function(){return this.bufferOffset+this._index};e.prototype.stateText=function(e){if("<"===e){if(this._index>this.sectionStart)this.cbs.ontext(this.getSection());this._state=2;this.sectionStart=this._index}else if(this.decodeEntities&&"&"===e&&(1===this.special||4===this.special)){if(this._index>this.sectionStart)this.cbs.ontext(this.getSection());this.baseState=1;this._state=62;this.sectionStart=this._index}};e.prototype.isTagStartChar=function(e){return c(e)||this.xmlMode&&!l(e)&&"/"!==e&&">"!==e};e.prototype.stateBeforeTagName=function(e){if("/"===e)this._state=5;else if("<"===e){this.cbs.ontext(this.getSection());this.sectionStart=this._index}else if(">"===e||1!==this.special||l(e))this._state=1;else if("!"===e){this._state=15;this.sectionStart=this._index+1}else if("?"===e){this._state=17;this.sectionStart=this._index+1}else if(!this.isTagStartChar(e))this._state=1;else{this._state=!this.xmlMode&&("s"===e||"S"===e)?32:!this.xmlMode&&("t"===e||"T"===e)?52:3;this.sectionStart=this._index}};e.prototype.stateInTagName=function(e){if("/"===e||">"===e||l(e)){this.emitToken("onopentagname");this._state=8;this._index--}};e.prototype.stateBeforeClosingTagName=function(e){if(l(e));else if(">"===e)this._state=1;else if(1!==this.special)if(4!==this.special&&("s"===e||"S"===e))this._state=33;else if(4===this.special&&("t"===e||"T"===e))this._state=53;else{this._state=1;this._index--}else if(!this.isTagStartChar(e)){this._state=20;this.sectionStart=this._index}else{this._state=6;this.sectionStart=this._index}};e.prototype.stateInClosingTagName=function(e){if(">"===e||l(e)){this.emitToken("onclosetag");this._state=7;this._index--}};e.prototype.stateAfterClosingTagName=function(e){if(">"===e){this._state=1;this.sectionStart=this._index+1}};e.prototype.stateBeforeAttributeName=function(e){if(">"===e){this.cbs.onopentagend();this._state=1;this.sectionStart=this._index+1}else if("/"===e)this._state=4;else if(!l(e)){this._state=9;this.sectionStart=this._index}};e.prototype.stateInSelfClosingTag=function(e){if(">"===e){this.cbs.onselfclosingtag();this._state=1;this.sectionStart=this._index+1;this.special=1}else if(!l(e)){this._state=8;this._index--}};e.prototype.stateInAttributeName=function(e){if("="===e||"/"===e||">"===e||l(e)){this.cbs.onattribname(this.getSection());this.sectionStart=-1;this._state=10;this._index--}};e.prototype.stateAfterAttributeName=function(e){if("="===e)this._state=11;else if("/"===e||">"===e){this.cbs.onattribend(void 0);this._state=8;this._index--}else if(!l(e)){this.cbs.onattribend(void 0);this._state=9;this.sectionStart=this._index}};e.prototype.stateBeforeAttributeValue=function(e){if(\'"\'===e){this._state=12;this.sectionStart=this._index+1}else if("\'"===e){this._state=13;this.sectionStart=this._index+1}else if(!l(e)){this._state=14;this.sectionStart=this._index;this._index--}};e.prototype.handleInAttributeValue=function(e,t){if(e===t){this.emitToken("onattribdata");this.cbs.onattribend(t);this._state=8}else if(this.decodeEntities&&"&"===e){this.emitToken("onattribdata");this.baseState=this._state;this._state=62;this.sectionStart=this._index}};e.prototype.stateInAttributeValueDoubleQuotes=function(e){this.handleInAttributeValue(e,\'"\')};e.prototype.stateInAttributeValueSingleQuotes=function(e){this.handleInAttributeValue(e,"\'")};e.prototype.stateInAttributeValueNoQuotes=function(e){if(l(e)||">"===e){this.emitToken("onattribdata");this.cbs.onattribend(null);this._state=8;this._index--}else if(this.decodeEntities&&"&"===e){this.emitToken("onattribdata");this.baseState=this._state;this._state=62;this.sectionStart=this._index}};e.prototype.stateBeforeDeclaration=function(e){this._state="["===e?23:"-"===e?18:16};e.prototype.stateInDeclaration=function(e){if(">"===e){this.cbs.ondeclaration(this.getSection());this._state=1;this.sectionStart=this._index+1}};e.prototype.stateInProcessingInstruction=function(e){if(">"===e){this.cbs.onprocessinginstruction(this.getSection());this._state=1;this.sectionStart=this._index+1}};e.prototype.stateBeforeComment=function(e){if("-"===e){this._state=19;this.sectionStart=this._index+1}else this._state=16};e.prototype.stateInComment=function(e){if("-"===e)this._state=21};e.prototype.stateInSpecialComment=function(e){if(">"===e){this.cbs.oncomment(this.buffer.substring(this.sectionStart,this._index));this._state=1;this.sectionStart=this._index+1}};e.prototype.stateAfterComment1=function(e){if("-"===e)this._state=22;else this._state=19};e.prototype.stateAfterComment2=function(e){if(">"===e){this.cbs.oncomment(this.buffer.substring(this.sectionStart,this._index-2));this._state=1;this.sectionStart=this._index+1}else if("-"!==e)this._state=19};e.prototype.stateBeforeCdata6=function(e){if("["===e){this._state=29;this.sectionStart=this._index+1}else{this._state=16;this._index--}};e.prototype.stateInCdata=function(e){if("]"===e)this._state=30};e.prototype.stateAfterCdata1=function(e){if("]"===e)this._state=31;else this._state=29};e.prototype.stateAfterCdata2=function(e){if(">"===e){this.cbs.oncdata(this.buffer.substring(this.sectionStart,this._index-2));this._state=1;this.sectionStart=this._index+1}else if("]"!==e)this._state=29};e.prototype.stateBeforeSpecialS=function(e){if("c"===e||"C"===e)this._state=34;else if("t"===e||"T"===e)this._state=44;else{this._state=3;this._index--}};e.prototype.stateBeforeSpecialSEnd=function(e){if(2===this.special&&("c"===e||"C"===e))this._state=39;else if(3===this.special&&("t"===e||"T"===e))this._state=48;else this._state=1};e.prototype.stateBeforeSpecialLast=function(e,t){if("/"===e||">"===e||l(e))this.special=t;this._state=3;this._index--};e.prototype.stateAfterSpecialLast=function(e,t){if(">"===e||l(e)){this.special=1;this._state=6;this.sectionStart=this._index-t;this._index--}else this._state=1};e.prototype.parseFixedEntity=function(e){if(void 0===e)e=this.xmlMode?o.default:s.default;if(this.sectionStart+1<this._index){var t=this.buffer.substring(this.sectionStart+1,this._index);if(Object.prototype.hasOwnProperty.call(e,t)){this.emitPartial(e[t]);this.sectionStart=this._index+1}}};e.prototype.parseLegacyEntity=function(){for(var e=this.sectionStart+1,t=Math.min(this._index-e,6);t>=2;){var i=this.buffer.substr(e,t);if(Object.prototype.hasOwnProperty.call(a.default,i)){this.emitPartial(a.default[i]);this.sectionStart+=t+1;return}t--}};e.prototype.stateInNamedEntity=function(e){if(";"===e){this.parseFixedEntity();if(1===this.baseState&&this.sectionStart+1<this._index&&!this.xmlMode)this.parseLegacyEntity();this._state=this.baseState}else if((e<"0"||e>"9")&&!c(e)){if(this.xmlMode||this.sectionStart+1===this._index);else if(1!==this.baseState){if("="!==e)this.parseFixedEntity(a.default)}else this.parseLegacyEntity();this._state=this.baseState;this._index--}};e.prototype.decodeNumericEntity=function(e,t,i){var n=this.sectionStart+e;if(n!==this._index){var s=this.buffer.substring(n,this._index),a=parseInt(s,t);this.emitPartial(r.default(a));this.sectionStart=i?this._index+1:this._index}this._state=this.baseState};e.prototype.stateInNumericEntity=function(e){if(";"===e)this.decodeNumericEntity(2,10,!0);else if(e<"0"||e>"9"){if(!this.xmlMode)this.decodeNumericEntity(2,10,!1);else this._state=this.baseState;this._index--}};e.prototype.stateInHexEntity=function(e){if(";"===e)this.decodeNumericEntity(3,16,!0);else if((e<"a"||e>"f")&&(e<"A"||e>"F")&&(e<"0"||e>"9")){if(!this.xmlMode)this.decodeNumericEntity(3,16,!1);else this._state=this.baseState;this._index--}};e.prototype.cleanup=function(){if(this.sectionStart<0){this.buffer="";this.bufferOffset+=this._index;this._index=0}else if(this.running){if(1===this._state){if(this.sectionStart!==this._index)this.cbs.ontext(this.buffer.substr(this.sectionStart));this.buffer="";this.bufferOffset+=this._index;this._index=0}else if(this.sectionStart===this._index){this.buffer="";this.bufferOffset+=this._index;this._index=0}else{this.buffer=this.buffer.substr(this.sectionStart);this._index-=this.sectionStart;this.bufferOffset+=this.sectionStart}this.sectionStart=0}};e.prototype.parse=function(){for(;this._index<this.buffer.length&&this.running;){var e=this.buffer.charAt(this._index);if(1===this._state)this.stateText(e);else if(12===this._state)this.stateInAttributeValueDoubleQuotes(e);else if(9===this._state)this.stateInAttributeName(e);else if(19===this._state)this.stateInComment(e);else if(20===this._state)this.stateInSpecialComment(e);else if(8===this._state)this.stateBeforeAttributeName(e);else if(3===this._state)this.stateInTagName(e);else if(6===this._state)this.stateInClosingTagName(e);else if(2===this._state)this.stateBeforeTagName(e);else if(10===this._state)this.stateAfterAttributeName(e);else if(13===this._state)this.stateInAttributeValueSingleQuotes(e);else if(11===this._state)this.stateBeforeAttributeValue(e);else if(5===this._state)this.stateBeforeClosingTagName(e);else if(7===this._state)this.stateAfterClosingTagName(e);else if(32===this._state)this.stateBeforeSpecialS(e);else if(21===this._state)this.stateAfterComment1(e);else if(14===this._state)this.stateInAttributeValueNoQuotes(e);else if(4===this._state)this.stateInSelfClosingTag(e);else if(16===this._state)this.stateInDeclaration(e);else if(15===this._state)this.stateBeforeDeclaration(e);else if(22===this._state)this.stateAfterComment2(e);else if(18===this._state)this.stateBeforeComment(e);else if(33===this._state)this.stateBeforeSpecialSEnd(e);else if(53===this._state)I(this,e);else if(39===this._state)E(this,e);else if(40===this._state)T(this,e);else if(41===this._state)x(this,e);else if(34===this._state)b(this,e);else if(35===this._state)v(this,e);else if(36===this._state)_(this,e);else if(37===this._state)y(this,e);else if(38===this._state)this.stateBeforeSpecialLast(e,2);else if(42===this._state)C(this,e);else if(43===this._state)this.stateAfterSpecialLast(e,6);else if(44===this._state)N(this,e);else if(29===this._state)this.stateInCdata(e);else if(45===this._state)S(this,e);else if(46===this._state)D(this,e);else if(47===this._state)this.stateBeforeSpecialLast(e,3);else if(48===this._state)w(this,e);else if(49===this._state)O(this,e);else if(50===this._state)L(this,e);else if(51===this._state)this.stateAfterSpecialLast(e,5);else if(52===this._state)M(this,e);else if(54===this._state)P(this,e);else if(55===this._state)k(this,e);else if(56===this._state)A(this,e);else if(57===this._state)this.stateBeforeSpecialLast(e,4);else if(58===this._state)q(this,e);else if(59===this._state)j(this,e);else if(60===this._state)B(this,e);else if(61===this._state)this.stateAfterSpecialLast(e,5);else if(17===this._state)this.stateInProcessingInstruction(e);else if(64===this._state)this.stateInNamedEntity(e);else if(23===this._state)d(this,e);else if(62===this._state)U(this,e);else if(24===this._state)f(this,e);else if(25===this._state)p(this,e);else if(30===this._state)this.stateAfterCdata1(e);else if(31===this._state)this.stateAfterCdata2(e);else if(26===this._state)m(this,e);else if(27===this._state)g(this,e);else if(28===this._state)this.stateBeforeCdata6(e);else if(66===this._state)this.stateInHexEntity(e);else if(65===this._state)this.stateInNumericEntity(e);else if(63===this._state)H(this,e);else this.cbs.onerror(Error("unknown _state"),this._state);this._index++}this.cleanup()};e.prototype.finish=function(){if(this.sectionStart<this._index)this.handleTrailingData();this.cbs.onend()};e.prototype.handleTrailingData=function(){var e=this.buffer.substr(this.sectionStart);if(29===this._state||30===this._state||31===this._state)this.cbs.oncdata(e);else if(19===this._state||21===this._state||22===this._state)this.cbs.oncomment(e);else if(64===this._state&&!this.xmlMode){this.parseLegacyEntity();if(this.sectionStart<this._index){this._state=this.baseState;this.handleTrailingData()}}else if(65===this._state&&!this.xmlMode){this.decodeNumericEntity(2,10,!1);if(this.sectionStart<this._index){this._state=this.baseState;this.handleTrailingData()}}else if(66===this._state&&!this.xmlMode){this.decodeNumericEntity(3,16,!1);if(this.sectionStart<this._index){this._state=this.baseState;this.handleTrailingData()}}else if(3!==this._state&&8!==this._state&&11!==this._state&&10!==this._state&&9!==this._state&&13!==this._state&&12!==this._state&&14!==this._state&&6!==this._state)this.cbs.ontext(e)};e.prototype.getSection=function(){return this.buffer.substring(this.sectionStart,this._index)};e.prototype.emitToken=function(e){this.cbs[e](this.getSection());this.sectionStart=-1};e.prototype.emitPartial=function(e){if(1!==this.baseState)this.cbs.onattribdata(e);else this.cbs.ontext(e)};return e}();t.default=R},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});var r=n(i(38)),s=String.fromCodePoint||function(e){var t="";if(e>65535){e-=65536;t+=String.fromCharCode(e>>>10&1023|55296);e=56320|1023&e}return t+=String.fromCharCode(e)};t.default=function(e){if(e>=55296&&e<=57343||e>1114111)return"\\ufffd";if(e in r.default)e=r.default[e];return s(e)}},function(e){e.exports=JSON.parse(\'{"Aacute":"\\xc1","aacute":"\\xe1","Acirc":"\\xc2","acirc":"\\xe2","acute":"\\xb4","AElig":"\\xc6","aelig":"\\xe6","Agrave":"\\xc0","agrave":"\\xe0","amp":"&","AMP":"&","Aring":"\\xc5","aring":"\\xe5","Atilde":"\\xc3","atilde":"\\xe3","Auml":"\\xc4","auml":"\\xe4","brvbar":"\\xa6","Ccedil":"\\xc7","ccedil":"\\xe7","cedil":"\\xb8","cent":"\\xa2","copy":"\\xa9","COPY":"\\xa9","curren":"\\xa4","deg":"\\xb0","divide":"\\xf7","Eacute":"\\xc9","eacute":"\\xe9","Ecirc":"\\xca","ecirc":"\\xea","Egrave":"\\xc8","egrave":"\\xe8","ETH":"\\xd0","eth":"\\xf0","Euml":"\\xcb","euml":"\\xeb","frac12":"\\xbd","frac14":"\\xbc","frac34":"\\xbe","gt":">","GT":">","Iacute":"\\xcd","iacute":"\\xed","Icirc":"\\xce","icirc":"\\xee","iexcl":"\\xa1","Igrave":"\\xcc","igrave":"\\xec","iquest":"\\xbf","Iuml":"\\xcf","iuml":"\\xef","laquo":"\\xab","lt":"<","LT":"<","macr":"\\xaf","micro":"\\xb5","middot":"\\xb7","nbsp":"\\xa0","not":"\\xac","Ntilde":"\\xd1","ntilde":"\\xf1","Oacute":"\\xd3","oacute":"\\xf3","Ocirc":"\\xd4","ocirc":"\\xf4","Ograve":"\\xd2","ograve":"\\xf2","ordf":"\\xaa","ordm":"\\xba","Oslash":"\\xd8","oslash":"\\xf8","Otilde":"\\xd5","otilde":"\\xf5","Ouml":"\\xd6","ouml":"\\xf6","para":"\\xb6","plusmn":"\\xb1","pound":"\\xa3","quot":"\\\\"","QUOT":"\\\\"","raquo":"\\xbb","reg":"\\xae","REG":"\\xae","sect":"\\xa7","shy":"\\xad","sup1":"\\xb9","sup2":"\\xb2","sup3":"\\xb3","szlig":"\\xdf","THORN":"\\xde","thorn":"\\xfe","times":"\\xd7","Uacute":"\\xda","uacute":"\\xfa","Ucirc":"\\xdb","ucirc":"\\xfb","Ugrave":"\\xd9","ugrave":"\\xf9","uml":"\\xa8","Uuml":"\\xdc","uuml":"\\xfc","Yacute":"\\xdd","yacute":"\\xfd","yen":"\\xa5","yuml":"\\xff"}\')},function(e,t,i){"use strict";var n,r=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)if(Object.prototype.hasOwnProperty.call(t,i))e[i]=t[i]})(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");n(e,t);function i(){this.constructor=e}e.prototype=null===t?Object.create(t):(i.prototype=t.prototype,new i)}),s=this&&this.__assign||function(){return(s=Object.assign||function(e){for(var t,i=1,n=arguments.length;i<n;i++){t=arguments[i];for(var r in t)if(Object.prototype.hasOwnProperty.call(t,r))e[r]=t[r]}return e}).apply(this,arguments)};Object.defineProperty(t,"__esModule",{value:!0});t.cloneNode=t.hasChildren=t.isDocument=t.isDirective=t.isComment=t.isText=t.isCDATA=t.isTag=t.Element=t.Document=t.NodeWithChildren=t.ProcessingInstruction=t.Comment=t.Text=t.DataNode=t.Node=void 0;var a=i(8),o=new Map([[a.ElementType.Tag,1],[a.ElementType.Script,1],[a.ElementType.Style,1],[a.ElementType.Directive,1],[a.ElementType.Text,3],[a.ElementType.CDATA,4],[a.ElementType.Comment,8],[a.ElementType.Root,9]]),l=function(){function e(e){this.type=e;this.parent=null;this.prev=null;this.next=null;this.startIndex=null;this.endIndex=null}Object.defineProperty(e.prototype,"nodeType",{get:function(){var e;return null!==(e=o.get(this.type))&&void 0!==e?e:1},enumerable:!1,configurable:!0});Object.defineProperty(e.prototype,"parentNode",{get:function(){return this.parent},set:function(e){this.parent=e},enumerable:!1,configurable:!0});Object.defineProperty(e.prototype,"previousSibling",{get:function(){return this.prev},set:function(e){this.prev=e},enumerable:!1,configurable:!0});Object.defineProperty(e.prototype,"nextSibling",{get:function(){return this.next},set:function(e){this.next=e},enumerable:!1,configurable:!0});e.prototype.cloneNode=function(e){if(void 0===e)e=!1;return T(this,e)};return e}();t.Node=l;var c=function(e){r(t,e);function t(t,i){var n=e.call(this,t)||this;n.data=i;return n}Object.defineProperty(t.prototype,"nodeValue",{get:function(){return this.data},set:function(e){this.data=e},enumerable:!1,configurable:!0});return t}(l);t.DataNode=c;var u=function(e){r(t,e);function t(t){return e.call(this,a.ElementType.Text,t)||this}return t}(c);t.Text=u;var h=function(e){r(t,e);function t(t){return e.call(this,a.ElementType.Comment,t)||this}return t}(c);t.Comment=h;var d=function(e){r(t,e);function t(t,i){var n=e.call(this,a.ElementType.Directive,i)||this;n.name=t;return n}return t}(c);t.ProcessingInstruction=d;var f=function(e){r(t,e);function t(t,i){var n=e.call(this,t)||this;n.children=i;return n}Object.defineProperty(t.prototype,"firstChild",{get:function(){var e;return null!==(e=this.children[0])&&void 0!==e?e:null},enumerable:!1,configurable:!0});Object.defineProperty(t.prototype,"lastChild",{get:function(){return this.children.length>0?this.children[this.children.length-1]:null},enumerable:!1,configurable:!0});Object.defineProperty(t.prototype,"childNodes",{get:function(){return this.children},set:function(e){this.children=e},enumerable:!1,configurable:!0});return t}(l);t.NodeWithChildren=f;var p=function(e){r(t,e);function t(t){return e.call(this,a.ElementType.Root,t)||this}return t}(f);t.Document=p;var m=function(e){r(t,e);function t(t,i,n,r){if(void 0===n)n=[];if(void 0===r)r="script"===t?a.ElementType.Script:"style"===t?a.ElementType.Style:a.ElementType.Tag;var s=e.call(this,r,n)||this;s.name=t;s.attribs=i;return s}Object.defineProperty(t.prototype,"tagName",{get:function(){return this.name},set:function(e){this.name=e},enumerable:!1,configurable:!0});Object.defineProperty(t.prototype,"attributes",{get:function(){var e=this;return Object.keys(this.attribs).map((function(t){var i,n;return{name:t,value:e.attribs[t],namespace:null===(i=e["x-attribsNamespace"])||void 0===i?void 0:i[t],prefix:null===(n=e["x-attribsPrefix"])||void 0===n?void 0:n[t]}}))},enumerable:!1,configurable:!0});return t}(f);t.Element=m;function g(e){return(0,a.isTag)(e)}t.isTag=g;function b(e){return e.type===a.ElementType.CDATA}t.isCDATA=b;function v(e){return e.type===a.ElementType.Text}t.isText=v;function _(e){return e.type===a.ElementType.Comment}t.isComment=_;function y(e){return e.type===a.ElementType.Directive}t.isDirective=y;function E(e){return e.type===a.ElementType.Root}t.isDocument=E;t.hasChildren=function(e){return Object.prototype.hasOwnProperty.call(e,"children")};function T(e,t){if(void 0===t)t=!1;var i;if(v(e))i=new u(e.data);else if(_(e))i=new h(e.data);else if(g(e)){var n=t?x(e.children):[],r=new m(e.name,s({},e.attribs),n);n.forEach((function(e){return e.parent=r}));if(null!=e.namespace)r.namespace=e.namespace;if(e["x-attribsNamespace"])r["x-attribsNamespace"]=s({},e["x-attribsNamespace"]);if(e["x-attribsPrefix"])r["x-attribsPrefix"]=s({},e["x-attribsPrefix"]);i=r}else if(b(e)){n=t?x(e.children):[];var o=new f(a.ElementType.CDATA,n);n.forEach((function(e){return e.parent=o}));i=o}else if(E(e)){n=t?x(e.children):[];var l=new p(n);n.forEach((function(e){return e.parent=l}));if(e["x-mode"])l["x-mode"]=e["x-mode"];i=l}else if(y(e)){var c=new d(e.name,e.data);if(null!=e["x-name"]){c["x-name"]=e["x-name"];c["x-publicId"]=e["x-publicId"];c["x-systemId"]=e["x-systemId"]}i=c}else throw new Error("Not implemented yet: ".concat(e.type));i.startIndex=e.startIndex;i.endIndex=e.endIndex;if(null!=e.sourceCodeLocation)i.sourceCodeLocation=e.sourceCodeLocation;return i}t.cloneNode=T;function x(e){for(var t=e.map((function(e){return T(e,!0)})),i=1;i<t.length;i++){t[i].prev=t[i-1];t[i-1].next=t[i]}return t}},function(e,t,i){"use strict";var n,r=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)if(Object.prototype.hasOwnProperty.call(t,i))e[i]=t[i]})(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");n(e,t);function i(){this.constructor=e}e.prototype=null===t?Object.create(t):(i.prototype=t.prototype,new i)}),s=this&&this.__createBinding||(Object.create?function(e,t,i,n){if(void 0===n)n=i;Object.defineProperty(e,n,{enumerable:!0,get:function(){return t[i]}})}:function(e,t,i,n){if(void 0===n)n=i;e[n]=t[i]}),a=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),o=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var i in e)if("default"!==i&&Object.prototype.hasOwnProperty.call(e,i))s(t,e,i);a(t,e);return t},l=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});t.parseFeed=t.FeedHandler=void 0;var c,u,h=l(i(6)),d=o(i(18)),f=i(12);!function(e){e[e.image=0]="image";e[e.audio=1]="audio";e[e.video=2]="video";e[e.document=3]="document";e[e.executable=4]="executable"}(c||(c={}));!function(e){e[e.sample=0]="sample";e[e.full=1]="full";e[e.nonstop=2]="nonstop"}(u||(u={}));var p=function(e){r(t,e);function t(t,i){if("object"==typeof t)i=t=void 0;return e.call(this,t,i)||this}t.prototype.onend=function(){var e,t,i=b(E,this.dom);if(i){var n={};if("feed"===i.name){var r=i.children;n.type="atom";y(n,"id","id",r);y(n,"title","title",r);var s=_("href",b("link",r));if(s)n.link=s;y(n,"description","subtitle",r);if(a=v("updated",r))n.updated=new Date(a);y(n,"author","email",r,!0);n.items=g("entry",r).map((function(e){var t={},i=e.children;y(t,"id","id",i);y(t,"title","title",i);var n=_("href",b("link",i));if(n)t.link=n;var r=v("summary",i)||v("content",i);if(r)t.description=r;var s=v("updated",i);if(s)t.pubDate=new Date(s);t.media=m(i);return t}))}else{var a;r=null!==(t=null===(e=b("channel",i.children))||void 0===e?void 0:e.children)&&void 0!==t?t:[];n.type=i.name.substr(0,3);n.id="";y(n,"title","title",r);y(n,"link","link",r);y(n,"description","description",r);if(a=v("lastBuildDate",r))n.updated=new Date(a);y(n,"author","managingEditor",r,!0);n.items=g("item",i.children).map((function(e){var t={},i=e.children;y(t,"id","guid",i);y(t,"title","title",i);y(t,"link","link",i);y(t,"description","description",i);var n=v("pubDate",i);if(n)t.pubDate=new Date(n);t.media=m(i);return t}))}this.feed=n;this.handleCallback(null)}else this.handleCallback(new Error("couldn\'t find root of feed"))};return t}(h.default);t.FeedHandler=p;function m(e){return g("media:content",e).map((function(e){var t={medium:e.attribs.medium,isDefault:!!e.attribs.isDefault};if(e.attribs.url)t.url=e.attribs.url;if(e.attribs.fileSize)t.fileSize=parseInt(e.attribs.fileSize,10);if(e.attribs.type)t.type=e.attribs.type;if(e.attribs.expression)t.expression=e.attribs.expression;if(e.attribs.bitrate)t.bitrate=parseInt(e.attribs.bitrate,10);if(e.attribs.framerate)t.framerate=parseInt(e.attribs.framerate,10);if(e.attribs.samplingrate)t.samplingrate=parseInt(e.attribs.samplingrate,10);if(e.attribs.channels)t.channels=parseInt(e.attribs.channels,10);if(e.attribs.duration)t.duration=parseInt(e.attribs.duration,10);if(e.attribs.height)t.height=parseInt(e.attribs.height,10);if(e.attribs.width)t.width=parseInt(e.attribs.width,10);if(e.attribs.lang)t.lang=e.attribs.lang;return t}))}function g(e,t){return d.getElementsByTagName(e,t,!0)}function b(e,t){return d.getElementsByTagName(e,t,!0,1)[0]}function v(e,t,i){if(void 0===i)i=!1;return d.getText(d.getElementsByTagName(e,t,i,1)).trim()}function _(e,t){if(!t)return null;else return t.attribs[e]}function y(e,t,i,n,r){if(void 0===r)r=!1;var s=v(i,n,r);if(s)e[t]=s}function E(e){return"rss"===e||"feed"===e||"rdf:RDF"===e}t.parseFeed=function(e,t){if(void 0===t)t={xmlMode:!0};var i=new p(t);new f.Parser(i,t).end(e);return i.feed}},function(e,t,i){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,i,n){if(void 0===n)n=i;Object.defineProperty(e,n,{enumerable:!0,get:function(){return t[i]}})}:function(e,t,i,n){if(void 0===n)n=i;e[n]=t[i]}),r=this&&this.__exportStar||function(e,t){for(var i in e)if("default"!==i&&!Object.prototype.hasOwnProperty.call(t,i))n(t,e,i)};Object.defineProperty(t,"__esModule",{value:!0});t.hasChildren=t.isDocument=t.isComment=t.isText=t.isCDATA=t.isTag=void 0;r(i(19),t);r(i(42),t);r(i(43),t);r(i(22),t);r(i(23),t);r(i(44),t);r(i(45),t);var s=i(6);Object.defineProperty(t,"isTag",{enumerable:!0,get:function(){return s.isTag}});Object.defineProperty(t,"isCDATA",{enumerable:!0,get:function(){return s.isCDATA}});Object.defineProperty(t,"isText",{enumerable:!0,get:function(){return s.isText}});Object.defineProperty(t,"isComment",{enumerable:!0,get:function(){return s.isComment}});Object.defineProperty(t,"isDocument",{enumerable:!0,get:function(){return s.isDocument}});Object.defineProperty(t,"hasChildren",{enumerable:!0,get:function(){return s.hasChildren}})},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.innerText=t.textContent=t.getText=t.getInnerHTML=t.getOuterHTML=void 0;var r=i(6),s=n(i(39)),a=i(8);function o(e,t){return(0,s.default)(e,t)}t.getOuterHTML=o;t.getInnerHTML=function(e,t){return(0,r.hasChildren)(e)?e.children.map((function(e){return o(e,t)})).join(""):""};t.getText=function e(t){if(Array.isArray(t))return t.map(e).join("");if((0,r.isTag)(t))return"br"===t.name?"\\n":e(t.children);if((0,r.isCDATA)(t))return e(t.children);if((0,r.isText)(t))return t.data;else return""};t.textContent=function e(t){if(Array.isArray(t))return t.map(e).join("");if((0,r.hasChildren)(t)&&!(0,r.isComment)(t))return e(t.children);if((0,r.isText)(t))return t.data;else return""};t.innerText=function e(t){if(Array.isArray(t))return t.map(e).join("");if((0,r.hasChildren)(t)&&(t.type===a.ElementType.Tag||(0,r.isCDATA)(t)))return e(t.children);if((0,r.isText)(t))return t.data;else return""}},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.decodeHTML=t.decodeHTMLStrict=t.decodeXML=void 0;var r=n(i(10)),s=n(i(15)),a=n(i(11)),o=n(i(14)),l=/&(?:[a-zA-Z0-9]+|#[xX][\\da-fA-F]+|#\\d+);/g;t.decodeXML=c(a.default);t.decodeHTMLStrict=c(r.default);function c(e){var t=h(e);return function(e){return String(e).replace(l,t)}}var u=function(e,t){return e<t?1:-1};t.decodeHTML=function(){for(var e=Object.keys(s.default).sort(u),t=Object.keys(r.default).sort(u),i=0,n=0;i<t.length;i++)if(e[n]===t[i]){t[i]+=";?";n++}else t[i]+=";";var a=new RegExp("&(?:"+t.join("|")+"|#[xX][\\\\da-fA-F]+;?|#\\\\d+;?)","g"),o=h(r.default);function l(e){if(";"!==e.substr(-1))e+=";";return o(e)}return function(e){return String(e).replace(a,l)}}();function h(e){return function(t){if("#"===t.charAt(1)){var i=t.charAt(2);if("X"===i||"x"===i)return o.default(parseInt(t.substr(3),16));else return o.default(parseInt(t.substr(2),10))}return e[t.slice(1,-1)]||t}}},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.escapeUTF8=t.escape=t.encodeNonAsciiHTML=t.encodeHTML=t.encodeXML=void 0;var r=u(n(i(11)).default),s=h(r);t.encodeXML=g(r);var a,o,l=u(n(i(10)).default),c=h(l);t.encodeHTML=(a=l,o=c,function(e){return e.replace(o,(function(e){return a[e]})).replace(d,p)});t.encodeNonAsciiHTML=g(l);function u(e){return Object.keys(e).sort().reduce((function(t,i){t[e[i]]="&"+i+";";return t}),{})}function h(e){for(var t=[],i=[],n=0,r=Object.keys(e);n<r.length;n++){var s=r[n];if(1===s.length)t.push("\\\\"+s);else i.push(s)}t.sort();for(var a=0;a<t.length-1;a++){for(var o=a;o<t.length-1&&t[o].charCodeAt(1)+1===t[o+1].charCodeAt(1);)o+=1;var l=1+o-a;if(!(l<3))t.splice(a,l,t[a]+"-"+t[o])}i.unshift("["+t.join("")+"]");return new RegExp(i.join("|"),"g")}var d=/(?:[\\x80-\\uD7FF\\uE000-\\uFFFF]|[\\uD800-\\uDBFF][\\uDC00-\\uDFFF]|[\\uD800-\\uDBFF](?![\\uDC00-\\uDFFF])|(?:[^\\uD800-\\uDBFF]|^)[\\uDC00-\\uDFFF])/g,f=null!=String.prototype.codePointAt?function(e){return e.codePointAt(0)}:function(e){return 1024*(e.charCodeAt(0)-55296)+e.charCodeAt(1)-56320+65536};function p(e){return"&#x"+(e.length>1?f(e):e.charCodeAt(0)).toString(16).toUpperCase()+";"}var m=new RegExp(s.source+"|"+d.source,"g");t.escape=function(e){return e.replace(m,p)};t.escapeUTF8=function(e){return e.replace(s,p)};function g(e){return function(t){return t.replace(m,(function(t){return e[t]||p(t)}))}}},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});t.findAll=t.existsOne=t.findOne=t.findOneChild=t.find=t.filter=void 0;var n=i(6);t.filter=function(e,t,i,n){if(void 0===i)i=!0;if(void 0===n)n=1/0;if(!Array.isArray(t))t=[t];return r(e,t,i,n)};function r(e,t,i,s){for(var a=[],o=0,l=t;o<l.length;o++){var c=l[o];if(e(c)){a.push(c);if(--s<=0)break}if(i&&(0,n.hasChildren)(c)&&c.children.length>0){var u=r(e,c.children,i,s);a.push.apply(a,u);if((s-=u.length)<=0)break}}return a}t.find=r;t.findOneChild=function(e,t){return t.find(e)};t.findOne=function e(t,i,r){if(void 0===r)r=!0;for(var s=null,a=0;a<i.length&&!s;a++){var o=i[a];if((0,n.isTag)(o))if(t(o))s=o;else if(r&&o.children.length>0)s=e(t,o.children)}return s};t.existsOne=function e(t,i){return i.some((function(i){return(0,n.isTag)(i)&&(t(i)||i.children.length>0&&e(t,i.children))}))};t.findAll=function(e,t){for(var i,r,s=[],a=t.filter(n.isTag);r=a.shift();){var o=null===(i=r.children)||void 0===i?void 0:i.filter(n.isTag);if(o&&o.length>0)a.unshift.apply(a,o);if(e(r))s.push(r)}return s}},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});t.getElementsByTagType=t.getElementsByTagName=t.getElementById=t.getElements=t.testElement=void 0;var n=i(6),r=i(22),s={tag_name:function(e){if("function"==typeof e)return function(t){return(0,n.isTag)(t)&&e(t.name)};else if("*"===e)return n.isTag;return function(t){return(0,n.isTag)(t)&&t.name===e}},tag_type:function(e){if("function"==typeof e)return function(t){return e(t.type)};else return function(t){return t.type===e}},tag_contains:function(e){if("function"==typeof e)return function(t){return(0,n.isText)(t)&&e(t.data)};else return function(t){return(0,n.isText)(t)&&t.data===e}}};function a(e,t){if("function"==typeof t)return function(i){return(0,n.isTag)(i)&&t(i.attribs[e])};else return function(i){return(0,n.isTag)(i)&&i.attribs[e]===t}}function o(e,t){return function(i){return e(i)||t(i)}}function l(e){var t=Object.keys(e).map((function(t){var i=e[t];return Object.prototype.hasOwnProperty.call(s,t)?s[t](i):a(t,i)}));return 0===t.length?null:t.reduce(o)}t.testElement=function(e,t){var i=l(e);return i?i(t):!0};t.getElements=function(e,t,i,n){if(void 0===n)n=1/0;var s=l(e);return s?(0,r.filter)(s,t,i,n):[]};t.getElementById=function(e,t,i){if(void 0===i)i=!0;if(!Array.isArray(t))t=[t];return(0,r.findOne)(a("id",e),t,i)};t.getElementsByTagName=function(e,t,i,n){if(void 0===i)i=!0;if(void 0===n)n=1/0;return(0,r.filter)(s.tag_name(e),t,i,n)};t.getElementsByTagType=function(e,t,i,n){if(void 0===i)i=!0;if(void 0===n)n=1/0;return(0,r.filter)(s.tag_type(e),t,i,n)}},function(e,t,i){"use strict";i.d(t,"a",(function(){return s}));var n=i(3),r=i(1);self.Node={ELEMENT_NODE:1,TEXT_NODE:3,COMMENT_NODE:8};function s(e,t,i){if(i&&t(e))return!0;for(let i=e.firstChild;i;i=i.nextSibling)if(s(i,t,!0))return!0}const a=Object(n.parseDocument)("<a>a</a>"),o=a.constructor,l=a.childNodes[0],c=l.constructor,u=l.childNodes[0].constructor,h=Object.getPrototypeOf(Object.getPrototypeOf(u));Object.defineProperty(c.prototype,"childElements",{get:function(){return this.childNodes.filter(e=>e.tagName)}});Object.defineProperty(c.prototype,"previousElementSibling",{get:function(){for(let e=this.previousSibling;e;e=e.previousSibling)if(e.tagName)return e;return null}});Object.defineProperty(c.prototype,"nextElementSibling",{get:function(){for(let e=this.nextSibling;e;e=e.nextSibling)if(e.tagName)return e;return null}});Object.defineProperty(c.prototype,"firstElementChild",{get:function(){let e;for(e=this.firstChild;e&&e.nodeType!==Node.ELEMENT_NODE;e=e.nextSibling);return e||null}});Object.defineProperty(c.prototype,"lastElementChild",{get:function(){let e;for(e=this.lastChild;e&&e.nodeType!==Node.ELEMENT_NODE;e=e.previousSibling);return e||null}});Object.defineProperty(c.prototype,"textContent",{get:function(){let e="";this.childNodes.forEach(t=>{e+=t.textContent});return e},set:function(e){this.childNodes.forEach(e=>{e.remove()});this.appendChild(new u(e||""))}});Object.defineProperty(c.prototype,"innerHTML",{get:function(){return n.DomUtils.getInnerHTML(this,{decodeEntities:!1})}});Object.defineProperty(c.prototype,"outerHTML",{get:function(){return n.DomUtils.getOuterHTML(this,{decodeEntities:!1})}});c.prototype.hasAttribute=function(e){return void 0!==this.attribs[e]};c.prototype.getAttribute=function(e){let t=this.attribs[e]||null;if(t&&"string"==typeof t&&-1!==t.indexOf("&"))t=t.replace(/&/g,"&").replace(/"/g,\'"\');return t};c.prototype.setAttribute=function(e,t){if(t&&"string"==typeof t){if(-1!==t.indexOf("&"))t=t.replace(/&/g,"&");if(-1!==t.indexOf(\'"\'))t=t.replace(/"/g,""")}this.attribs[e]=t||""};c.prototype.removeAttribute=function(e){delete this.attribs[e]};c.prototype.appendChild=function(e){n.DomUtils.appendChild(this,e)};c.prototype.insertBefore=function(e,t){if(t)n.DomUtils.prepend(t,e);else this.appendChild(e)};c.prototype.removeChild=function(e){if(e.parentNode===this)n.DomUtils.removeElement(e)};c.prototype.contains=function(e){if(e===this)return!0;if(!this.childNodes.length)return!1;for(let t=e;t;t=t.parentNode)if(t===this)return!0;return!1};c.prototype.follows=function(e){if(this.startIndex&&e.startIndex)return this.startIndex>e.startIndex;if(this===e)return!1;const t=[],i=[];let n,r,s;for(let i=this;i;i=i.parentNode){if(i===e)return!0;t.unshift(i)}for(let a=e;a;a=a.parentNode){i.unshift(a);if(t.includes(a)){n=a;r=t[t.indexOf(a)+1];s=i[1];break}}return!n||n.childNodes.indexOf(r)>n.childNodes.indexOf(s)};Object.defineProperty(c.prototype,"tagName",{get:function(){return this.name.toUpperCase()}});Object.defineProperty(c.prototype,"classList",{get:function(){if(this._classList)return this._classList;else{this._classList={list:[],isMovedFromClassAttr:!1,moveFromClassAttr(e){this.list=(e||"").split(" ");this.isMovedFromClassAttr=!0},add:(...e)=>{e.forEach(e=>{let t=this.getAttribute("class")||"";if(t)t+=" ";t+=e;this.setAttribute("class",t);if(this._classList.isMovedFromClassAttr)this._classList.list.push(e);else this._classList.moveFromClassAttr(t)})},remove:(...e)=>{e.forEach(e=>{let t=this.getAttribute("class")||"";const i=` ${t} `.indexOf(` ${e} `);if(-1!==i){t=t.slice(0,i)+t.slice(i+e.length+1);t=t.trim();this.setAttribute("class",t);if(this._classList.isMovedFromClassAttr)this._classList.list.splice(e,this._classList.list.indexOf(e),1);else this._classList.moveFromClassAttr(t)}})},contains:e=>{const t=this.getAttribute("class");if(!t)return!1;if(!this._classList.isMovedFromClassAttr)this._classList.moveFromClassAttr(t);return Boolean(this._classList.list.length)&&-1!==this._classList.list.indexOf(e)}};return this._classList}}});c.prototype.getElementsByClassName=function(e,t){let i=[];s(this,n=>{if(n.tagName&&n.classList.contains(e)){i.push(n);if(t&&i.length===t)return!0}});return i};c.prototype.filterRecursively=function(e){let t=[];s(this,i=>{if(e(i))t.push(i)});return t};c.prototype.getElementsByAttribute=function(e){let t=[];s(this,i=>{if(i.tagName&&Object.keys(i.attribs).some(t=>e.test(t)))t.push(i)});return t};c.prototype.getElementsByTagName=function(e){return n.DomUtils.getElementsByTagName(e,this)};c.prototype.cloneNode=function(){const e=document.createElement(this.tagName);e.attribs=Object.assign({},this.attribs);return e};Object.defineProperty(u.prototype,"textContent",{get:function(){return Object(r.a)(this.data)},set:function(e){this.data=e}});h.prototype.remove=function(){n.DomUtils.removeElement(this)};o.prototype.createElement=e=>new c(e,{});o.prototype.createTextNode=e=>new u(e||"");o.prototype.getElementsByClassName=c.prototype.getElementsByClassName;self.Document=o},function(e,t){function i(e,t,i,n,r,s,a){try{var o=e[s](a),l=o.value}catch(e){i(e);return}if(o.done)t(l);else Promise.resolve(l).then(n,r)}e.exports=function(e){return function(){var t=this,n=arguments;return new Promise((function(r,s){var a=e.apply(t,n);function o(e){i(a,r,s,o,l,"next",e)}function l(e){i(a,r,s,o,l,"throw",e)}o(void 0)}))}},e.exports.__esModule=!0,e.exports.default=e.exports},function(e,t,i){"use strict";e.exports=function(e,t){var n=i(46),r="",s="",a="";r=e.toString();var o=n("HTML_ENTITIES",t);if(!1===o)return!1;delete o["&"];o["&"]="&";for(a in o){s=o[a];r=r.split(s).join(a)}return r=r.split("'").join("\'")}},function(e,t,i){e.exports=function(){"use strict";var e={year:0,month:1,day:2,hour:3,minute:4,second:5},t={};return function(i,n,r){var s,a=function(e,i,n){void 0===n&&(n={});var r=new Date(e);return function(e,i){void 0===i&&(i={});var n=i.timeZoneName||"short",r=e+"|"+n,s=t[r];return s||(s=new Intl.DateTimeFormat("en-US",{hour12:!1,timeZone:e,year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit",timeZoneName:n}),t[r]=s),s}(i,n).formatToParts(r)},o=function(t,i){for(var n=a(t,i),s=[],o=0;o<n.length;o+=1){var l=n[o],c=l.type,u=l.value,h=e[c];h>=0&&(s[h]=parseInt(u,10))}var d=s[3],f=24===d?0:d,p=s[0]+"-"+s[1]+"-"+s[2]+" "+f+":"+s[4]+":"+s[5]+":000",m=+t;return(r.utc(p).valueOf()-(m-=m%1e3))/6e4},l=n.prototype;l.tz=function(e,t){void 0===e&&(e=s);var i=this.utcOffset(),n=this.toDate(),a=n.toLocaleString("en-US",{timeZone:e}),o=Math.round((n-new Date(a))/1e3/60),l=r(a).$set("millisecond",this.$ms).utcOffset(15*-Math.round(n.getTimezoneOffset()/15)-o,!0);if(t){var c=l.utcOffset();l=l.add(i-c,"minute")}return l.$x.$timezone=e,l},l.offsetName=function(e){var t=this.$x.$timezone||r.tz.guess(),i=a(this.valueOf(),t,{timeZoneName:e}).find((function(e){return"timezonename"===e.type.toLowerCase()}));return i&&i.value};var c=l.startOf;l.startOf=function(e,t){if(!this.$x||!this.$x.$timezone)return c.call(this,e,t);var i=r(this.format("YYYY-MM-DD HH:mm:ss:SSS"));return c.call(i,e,t).tz(this.$x.$timezone,!0)},r.tz=function(e,t,i){var n=i&&t,a=i||t||s,l=o(+r(),a);if("string"!=typeof e)return r(e).tz(a);var c=function(e,t,i){var n=e-60*t*1e3,r=o(n,i);if(t===r)return[n,t];var s=o(n-=60*(r-t)*1e3,i);return r===s?[n,r]:[e-60*Math.min(r,s)*1e3,Math.max(r,s)]}(r.utc(e,n).valueOf(),l,a),u=c[0],h=c[1],d=r(u).utcOffset(h);return d.$x.$timezone=a,d},r.tz.guess=function(){return Intl.DateTimeFormat().resolvedOptions().timeZone},r.tz.setDefault=function(e){s=e}}}()},function(e,t,i){e.exports=function(){"use strict";var e="minute",t=/[+-]\\d\\d(?::?\\d\\d)?/g,i=/([+-]|\\d\\d)/g;return function(n,r,s){var a=r.prototype;s.utc=function(e){var t={date:e,utc:!0,args:arguments};return new r(t)},a.utc=function(t){var i=s(this.toDate(),{locale:this.$L,utc:!0});return t?i.add(this.utcOffset(),e):i},a.local=function(){return s(this.toDate(),{locale:this.$L,utc:!1})};var o=a.parse;a.parse=function(e){e.utc&&(this.$u=!0),this.$utils().u(e.$offset)||(this.$offset=e.$offset),o.call(this,e)};var l=a.init;a.init=function(){if(this.$u){var e=this.$d;this.$y=e.getUTCFullYear(),this.$M=e.getUTCMonth(),this.$D=e.getUTCDate(),this.$W=e.getUTCDay(),this.$H=e.getUTCHours(),this.$m=e.getUTCMinutes(),this.$s=e.getUTCSeconds(),this.$ms=e.getUTCMilliseconds()}else l.call(this)};var c=a.utcOffset;a.utcOffset=function(n,r){var s=this.$utils().u;if(s(n))return this.$u?0:s(this.$offset)?c.call(this):this.$offset;if("string"==typeof n&&null===(n=function(e){void 0===e&&(e="");var n=e.match(t);if(!n)return null;var r=(""+n[0]).match(i)||["-",0,0],s=r[0],a=60*+r[1]+ +r[2];return 0===a?0:"+"===s?a:-a}(n)))return this;var a=Math.abs(n)<=16?60*n:n,o=this;if(r)return o.$offset=a,o.$u=0===n,o;if(0!==n){var l=this.$u?this.toDate().getTimezoneOffset():-1*this.utcOffset();(o=this.local().add(a+l,e)).$offset=a,o.$x.$localOffset=l}else o=this.utc();return o};var u=a.format;a.format=function(e){var t=e||(this.$u?"YYYY-MM-DDTHH:mm:ss[Z]":"");return u.call(this,t)},a.valueOf=function(){var e=this.$utils().u(this.$offset)?0:this.$offset+(this.$x.$localOffset||this.$d.getTimezoneOffset());return this.$d.valueOf()-6e4*e},a.isUTC=function(){return!!this.$u},a.toISOString=function(){return this.toDate().toISOString()},a.toString=function(){return this.toDate().toUTCString()};var h=a.toDate;a.toDate=function(e){return"s"===e&&this.$offset?s(this.format("YYYY-MM-DD HH:mm:ss:SSS")).toDate():h.call(this)};var d=a.diff;a.diff=function(e,t,i){if(e&&this.$u===e.$u)return d.call(this,e,t,i);var n=this.local(),r=s(e).local();return d.call(n,r,t,i)}}}()},function(e,t,i){"use strict";var n=i(4),r=i(0),s=i(5),a=i(1);t.a=class{constructor(e,t,i){this.parser=e;this.headingElement=t.element;this.headlineElement=this.parser.context.getElementByClassName(this.headingElement,"mw-headline");if(!this.headlineElement)throw new n.a;this.id=this.headlineElement.getAttribute("id");this.parseHeadline();const s=this.headingElement.tagName.match(/^H([1-6])$/);this.level=s&&Number(s[1]);this.sectionNumber=null;const a=this.parser.context.getElementByClassName(this.headingElement,"mw-editsection"),o=(a?[...a.getElementsByTagName("a")]:[]).find(e=>{var t;return null===(t=e.getAttribute("href"))||void 0===t?void 0:t.includes("action=edit")});if(o){const e=r.a.g.server+o.getAttribute("href");this.editUrl=new URL(e);if(this.editUrl){const e=this.editUrl.searchParams.get("section");if(e.startsWith("T-")){this.sourcePageName=this.editUrl.searchParams.get("title");this.sectionNumber=Number(e.match(/\\d+/)[0])}else this.sectionNumber=Number(e);this.editUrl=this.editUrl.href}}this.setContentProperties(t,i);this.index=r.a.sections.length}setContentProperties(e,t){var i,n;const r=new s.c(this.parser.context.rootElement,e=>!Object(a.i)(e)&&!e.classList.contains("cd-section-button-container"),!0,this.headingElement);this.headingNestingLevel=0;for(;r.parentNode();)if(!r.currentNode.classList.contains("mw-heading"))this.headingNestingLevel++;const o=t.indexOf(e);let l=t.findIndex((e,t)=>t>o&&"heading"===e.type);if(-1===l)l=void 0;const c=null===(i=t[l])||void 0===i?void 0:i.element,u=new RegExp(`^H[1-${this.level}]$`);let h=t.findIndex((e,t)=>t>o&&"heading"===e.type&&u.test(e.element.tagName));if(-1===h)h=void 0;const d=null===(n=t[h])||void 0===n?void 0:n.element;this.lastElement=this.getLastElement(d,r);this.lastElementInFirstChunk=c===d?this.lastElement:this.getLastElement(c,r);const f=e=>e.filter(e=>"signature"===e.type).map(e=>e.comment).filter(a.b);this.comments=f(t.slice(o,h));this.commentsInFirstChunk=f(t.slice(o,l));this.comments.forEach(e=>{if(!this.oldestComment||e.date&&(!this.oldestComment.date||this.oldestComment.date>e.date))this.oldestComment=e});this.comments||(this.comments=[]);this.commentsInFirstChunk||(this.commentsInFirstChunk=this.comments);this.commentsInFirstChunk.forEach(e=>{e.section=this})}getLastElement(e,t){let i;if(e){t.currentNode=e;for(;!t.previousSibling()&&t.parentNode(););i=t.currentNode}else i=this.parser.context.rootElement.lastElementChild;for(;i.contains(this.headingElement)&&i!==this.headingElement;)i=i.lastElementChild;return i}parseHeadline(){const e=["mw-headline-number",...r.a.config.foreignElementInHeadlineClasses];this.headline=[...this.headlineElement.childNodes].filter(t=>t.nodeType===Node.TEXT_NODE||!(Object(a.i)(t)||e.some(e=>t.classList.contains(e)))).map(e=>e.textContent).join("").trim()}getParent(e=!0){if(e&&this.level<=2)return null;else return r.a.sections.slice(0,this.index).reverse().find(e=>e.level<this.level)||null}getAncestors(){if(!this.cachedAncestors){this.cachedAncestors=[];let e=this;for(;e=e.getParent(!1);)this.cachedAncestors.push(e)}return this.cachedAncestors}}},function(e,t,i){"use strict";var n=i(9),cd=i(0),r=i(5),s=i(1);i(7),i(27),i(28);var a={lessThanXSeconds:{one:"less than a second",other:"less than {{count}} seconds"},xSeconds:{one:"1 second",other:"{{count}} seconds"},halfAMinute:"half a minute",lessThanXMinutes:{one:"less than a minute",other:"less than {{count}} minutes"},xMinutes:{one:"1 minute",other:"{{count}} minutes"},aboutXHours:{one:"about 1 hour",other:"about {{count}} hours"},xHours:{one:"1 hour",other:"{{count}} hours"},xDays:{one:"1 day",other:"{{count}} days"},aboutXWeeks:{one:"about 1 week",other:"about {{count}} weeks"},xWeeks:{one:"1 week",other:"{{count}} weeks"},aboutXMonths:{one:"about 1 month",other:"about {{count}} months"},xMonths:{one:"1 month",other:"{{count}} months"},aboutXYears:{one:"about 1 year",other:"about {{count}} years"},xYears:{one:"1 year",other:"{{count}} years"},overXYears:{one:"over 1 year",other:"over {{count}} years"},almostXYears:{one:"almost 1 year",other:"almost {{count}} years"}},o=function(e,t,i){var n,r=a[e];if("string"==typeof r)n=r;else if(1===t)n=r.one;else n=r.other.replace("{{count}}",t.toString());if(null!=i&&i.addSuffix)if(i.comparison&&i.comparison>0)return"in "+n;else return n+" ago";return n};function l(e){return function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},i=t.width?String(t.width):e.defaultWidth,n=e.formats[i]||e.formats[e.defaultWidth];return n}}var c={date:l({formats:{full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},defaultWidth:"full"}),time:l({formats:{full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},defaultWidth:"full"}),dateTime:l({formats:{full:"{{date}} \'at\' {{time}}",long:"{{date}} \'at\' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},defaultWidth:"full"})},u={lastWeek:"\'last\' eeee \'at\' p",yesterday:"\'yesterday at\' p",today:"\'today at\' p",tomorrow:"\'tomorrow at\' p",nextWeek:"eeee \'at\' p",other:"P"};function h(e){return function(t,i){var n;if("formatting"===(null!=i&&i.context?String(i.context):"standalone")&&e.formattingValues){var r=e.defaultFormattingWidth||e.defaultWidth,s=null!=i&&i.width?String(i.width):r;n=e.formattingValues[s]||e.formattingValues[r]}else{var a=e.defaultWidth,o=null!=i&&i.width?String(i.width):e.defaultWidth;n=e.values[o]||e.values[a]}return n[e.argumentCallback?e.argumentCallback(t):t]}}function d(e){return function(t){var i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=i.width,r=n&&e.matchPatterns[n]||e.matchPatterns[e.defaultMatchWidth],s=t.match(r);if(!s)return null;var a,o=s[0],l=n&&e.parsePatterns[n]||e.parsePatterns[e.defaultParseWidth],c=Array.isArray(l)?p(l,(function(e){return e.test(o)})):f(l,(function(e){return e.test(o)}));a=e.valueCallback?e.valueCallback(c):c;a=i.valueCallback?i.valueCallback(a):a;var u=t.slice(o.length);return{value:a,rest:u}}}function f(e,t){for(var i in e)if(e.hasOwnProperty(i)&&t(e[i]))return i}function p(e,t){for(var i=0;i<e.length;i++)if(t(e[i]))return i}var m;h({values:{narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},defaultWidth:"wide"}),h({values:{narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},defaultWidth:"wide",argumentCallback:function(e){return e-1}}),h({values:{narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],wide:["January","February","March","April","May","June","July","August","September","October","November","December"]},defaultWidth:"wide"}),h({values:{narrow:["S","M","T","W","T","F","S"],short:["Su","Mo","Tu","We","Th","Fr","Sa"],abbreviated:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],wide:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},defaultWidth:"wide"}),h({values:{narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"}},defaultWidth:"wide",formattingValues:{narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"}},defaultFormattingWidth:"wide"}),m={matchPattern:/^(\\d+)(th|st|nd|rd)?/i,parsePattern:/\\d+/i,valueCallback:function(e){return parseInt(e,10)}},d({matchPatterns:{narrow:/^(b|a)/i,abbreviated:/^(b\\.?\\s?c\\.?|b\\.?\\s?c\\.?\\s?e\\.?|a\\.?\\s?d\\.?|c\\.?\\s?e\\.?)/i,wide:/^(before christ|before common era|anno domini|common era)/i},defaultMatchWidth:"wide",parsePatterns:{any:[/^b/i,/^(a|c)/i]},defaultParseWidth:"any"}),d({matchPatterns:{narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},defaultMatchWidth:"wide",parsePatterns:{any:[/1/i,/2/i,/3/i,/4/i]},defaultParseWidth:"any",valueCallback:function(e){return e+1}}),d({matchPatterns:{narrow:/^[jfmasond]/i,abbreviated:/^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,wide:/^(january|february|march|april|may|june|july|august|september|october|november|december)/i},defaultMatchWidth:"wide",parsePatterns:{narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^ap/i,/^may/i,/^jun/i,/^jul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},defaultParseWidth:"any"}),d({matchPatterns:{narrow:/^[smtwf]/i,short:/^(su|mo|tu|we|th|fr|sa)/i,abbreviated:/^(sun|mon|tue|wed|thu|fri|sat)/i,wide:/^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i},defaultMatchWidth:"wide",parsePatterns:{narrow:[/^s/i,/^m/i,/^t/i,/^w/i,/^t/i,/^f/i,/^s/i],any:[/^su/i,/^m/i,/^tu/i,/^w/i,/^th/i,/^f/i,/^sa/i]},defaultParseWidth:"any"}),d({matchPatterns:{narrow:/^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,any:/^([ap]\\.?\\s?m\\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i},defaultMatchWidth:"any",parsePatterns:{any:{am:/^a/i,pm:/^p/i,midnight:/^mi/i,noon:/^no/i,morning:/morning/i,afternoon:/afternoon/i,evening:/evening/i,night:/night/i}},defaultParseWidth:"any"});function g(e,t){var i=function(e){if(!v[e]){var t=new Intl.DateTimeFormat("en-US",{hour12:!1,timeZone:"America/New_York",year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit"}).format(new Date("2014-06-25T04:00:00.123Z")),i="06/25/2014, 00:00:00"===t||"\\u200e06\\u200e/\\u200e25\\u200e/\\u200e2014\\u200e \\u200e00\\u200e:\\u200e00\\u200e:\\u200e00"===t;v[e]=i?new Intl.DateTimeFormat("en-US",{hour12:!1,timeZone:e,year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit"}):new Intl.DateTimeFormat("en-US",{hourCycle:"h23",timeZone:e,year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit"})}return v[e]}(t);return i.formatToParts?function(e,t){try{for(var i=e.formatToParts(t),n=[],r=0;r<i.length;r++){var s=b[i[r].type];if(s>=0)n[s]=parseInt(i[r].value,10)}return n}catch(e){if(e instanceof RangeError)return[NaN];throw e}}(i,e):function(e,t){var i=e.format(t).replace(/\\u200E/g,""),n=/(\\d+)\\/(\\d+)\\/(\\d+),? (\\d+):(\\d+):(\\d+)/.exec(i);return[n[3],n[1],n[2],n[4],n[5],n[6]]}(i,e)}var b={year:0,month:1,day:2,hour:3,minute:4,second:5};var v={};function _(e,t,i,n,r,s,a){var o=new Date(0);o.setUTCFullYear(e,t,i);o.setUTCHours(n,r,s,a);return o}var y={timezone:/([Z+-].*)$/,timezoneZ:/^(Z)$/,timezoneHH:/^([+-]\\d{2})$/,timezoneHHMM:/^([+-]\\d{2}):?(\\d{2})$/};function E(e,t,i){var n,r,s;if(""===e)return 0;if(n=y.timezoneZ.exec(e))return 0;if(n=y.timezoneHH.exec(e))if(!x(s=parseInt(n[1],10)))return NaN;else return-36e5*s;if(n=y.timezoneHHMM.exec(e)){s=parseInt(n[1],10);var a=parseInt(n[2],10);if(!x(s,a))return NaN;r=36e5*Math.abs(s)+6e4*a;return s>0?-r:r}if(function(e){if(C[e])return!0;try{new Intl.DateTimeFormat(void 0,{timeZone:e});C[e]=!0;return!0}catch(e){return!1}}(e)){t=new Date(t||Date.now());var o=T(i?t:function(e){return _(e.getFullYear(),e.getMonth(),e.getDate(),e.getHours(),e.getMinutes(),e.getSeconds(),e.getMilliseconds())}(t),e);return-(i?o:function(e,t,i){var n=e.getTime()-t,r=T(new Date(n),i);if(t===r)return t;n-=r-t;var s=T(new Date(n),i);if(r===s)return r;return Math.max(r,s)}(t,o,e))}return NaN}function T(e,t){var i=g(e,t),n=_(i[0],i[1]-1,i[2],i[3]%24,i[4],i[5],0).getTime(),r=e.getTime(),s=r%1e3;return n-(r-=s>=0?s:1e3+s)}function x(e,t){return-23<=e&&e<=23&&(null==t||0<=t&&t<=59)}var C={};function N(e,t){return-E(e,t)}const S={xg:["january-gen","february-gen","march-gen","april-gen","may-gen","june-gen","july-gen","august-gen","september-gen","october-gen","november-gen","december-gen"],D:["sun","mon","tue","wed","thu","fri","sat"],l:["sunday","monday","tuesday","wednesday","thursday","friday","saturday"],F:["january","february","march","april","may_long","june","july","august","september","october","november","december"],M:["jan","feb","mar","apr","may","jun","jul","aug","sep","oct","nov","dec"]};function D(e,t){const i=Object(s.j)(e,!0),n=void 0===t?cd.a.g.parseTimestampContentRegexp:cd.a.g.parseTimestampUiRegexp,r=i.match(n);if(!r)return null;return{date:function(e,t){let i=void 0===t;if(i)t=cd.a.g.contentTimezone;const n=i?cd.a.g.contentDigits:cd.a.g.uiDigits,r=i?cd.a.g.contentTimestampMatchingGroups:cd.a.g.uiTimestampMatchingGroups,a=e=>{if(!n)return e;const t=new RegExp("["+n+"]","g");return e.replace(t,e=>n.indexOf(e))};let o=0,l=0,c=0,u=0,h=0;for(let t=0;t<r.length;t++){const n=r[t],d=e[t+3];switch(n){case"xg":case"F":case"M":l=(i?Object(s.e)(S[n]):S[n].map(mw.msg)).indexOf(d);break;case"d":case"j":c=Number(a(d));break;case"D":case"l":break;case"n":l=Number(a(d))-1;break;case"Y":o=Number(a(d));break;case"xkY":o=Number(a(d))-543;break;case"G":case"H":u=Number(a(d));break;case"i":h=Number(a(d));break;default:throw"Not implemented"}}const d=Date.UTC(o,l,c,u,h);let f;if("number"==typeof t)f=t*cd.a.g.msInMin;else f="UTC"===t?0:N(t,d);return new Date(d-f)}(r,t),match:r}}let w;class Parser_Parser{constructor(e){this.timestampToSignature=this.timestampToSignature.bind(this);this.context=e;this.existingCommentIds=[]}createComment(e,t){return new this.context.CommentClass(this,e,t)}createSection(e,t){return new this.context.SectionClass(this,e,t)}processAndRemoveDtMarkup(){const e=[...this.context.rootElement.getElementsByTagName("span")].filter(e=>e.hasAttribute("data-mw-comment-start")||e.hasAttribute("data-mw-comment-end")).concat([...this.context.rootElement.getElementsByClassName("ext-discussiontools-init-replylink-buttons")]);this.context.handleDtMarkup(e);this.context.removeDtButtonHtmlComments()}setPropertiesForCommentParsing(){this.foreignComponentClasses=["cd-comment-part","ombox",...cd.a.config.closedDiscussionClasses,cd.a.config.outdentClass];this.elementsToExclude=[...this.context.rootElement.getElementsByTagName("blockquote"),...Object(s.c)(cd.a.config.elementsToExcludeClasses.map(e=>[...this.context.rootElement.getElementsByClassName(e)]))]}handleFactotumOutdents(e,t){var i;const n=document.createElement("span");n.className=cd.a.config.outdentClass;n.textContent=e;if("BR"===(null===(i=t.nextSibling)||void 0===i?void 0:i.tagName))t.nextSibling.remove();t.parentNode.insertBefore(n,t);t.remove()}findTimestamps(){this.setPropertiesForCommentParsing();return this.context.getAllTextNodes().map(e=>{const t=e.textContent;if(/^\\u250c\\u2500*\\u2518$/.test(t)&&!e.parentNode.classList.contains(cd.a.config.outdentClass)&&!e.parentNode.parentNode.classList.contains(cd.a.config.outdentClass))this.handleFactotumOutdents(t,e);const{date:i,match:n}=D(t)||{};if(i&&!this.elementsToExclude.some(t=>t.contains(e)))return{node:e,date:i,match:n}}).filter(s.b).map(e=>{const{node:t,match:i,date:n}=e,r=document.createElement("span");r.classList.add("cd-timestamp");r.appendChild(document.createTextNode(i[2]));const s=t.textContent.slice(i.index+i[0].length),a=s?document.createTextNode(s):void 0;t.textContent=i[1];t.parentNode.insertBefore(r,t.nextSibling);if(a)t.parentNode.insertBefore(a,r.nextSibling);return{element:r,date:n}})}processLinkData(e,t){const{userName:i,linkType:n}=Parser_Parser.processLink(e)||{};if(i){t.name||(t.name=i);if(t.name===i){if(["user","userForeign"].includes(n)){if(t.notForeignLink&&"userForeign"===n)return!1;if("userForeign"!==n)t.notForeignLink=e;t.link=e}else if(["userTalk","userTalkForeign"].includes(n)){if(t.talkNotForeignLink)return!1;if("userTalkForeign"!==n)t.talkNotForeignLink=e;t.talkLink=e}else if(["contribs","contribsForeign"].includes(n)){if(t.contribsNotForeignLink&&(t.link||t.talkLink))return!1;if("contribsForeign"!==n)t.contribsNotForeignLink=e}else if(["userSubpage","userSubpageForeign"].includes(n)){if(t.link||t.talkLink)return!1}else if(["userTalkSubpage","userTalkSubpageForeign"].includes(n)){if(t.link||t.talkLink)return!1}else if(t.link||t.talkLink)return!1;t.isLastLinkAuthorLink=!0}}return!0}timestampToSignature(e){w||(w=new RegExp(`(?:^|${cd.a.g.letterPattern})[.!?\\u2026] `));const t=e.element,i=e.element.textContent;let n,a,o=!1;for(let t=e.element;!a;t=t.parentNode)if(Object(s.h)(t)){if(t.classList.contains(cd.a.config.unsignedClass))n=t}else a=t;const l=new r.b(e.element,a);for(;l.previousNode();)if(l.currentNode.classList.contains("cd-signature")){o=!0;break}const c=Boolean(n),u=n||e.element,h=new r.a(u,this.context.rootElement),d={};let f,p=0,m=[];if(n)f=u;else{m.push(u);h.previousSibling()}let g=h.currentNode;do{p+=g.textContent.length;if(g.tagName){d.isLastLinkAuthorLink=!1;if("A"===g.tagName){if(!this.processLinkData(g,d))break}else{const e=[...g.getElementsByTagName("a")].reverse();for(const t of e)if(!t.classList.contains("external"))this.processLinkData(t,d)}if(d.isLastLinkAuthorLink)f=g}m.push(g);g=h.previousSibling();if(!g&&!f){g=h.parentNode();if(!g||!Object(s.h)(g))break;p=0;m=[]}}while(g&&p<cd.a.config.signatureScanLimit&&!(d.name&&(g.tagName&&["S","STRIKE","DEL"].includes(g.tagName)||!g.tagName&&w.test(g.textContent))||g.tagName&&(g.classList.contains("cd-timestamp")||["S","STRIKE","DEL"].includes(g.tagName)&&p>=30)));if(!d.name)return;if(!m.length)m=[u];const b=m.indexOf(f);m.splice(-1===b?1:b+1);const v=m[0].parentNode,_=m[0].nextSibling,y=document.createElement("span");y.classList.add("cd-signature");m.reverse().forEach(y.appendChild.bind(y));v.insertBefore(y,_);return{element:y,timestampElement:t,timestampText:i,date:e.date,authorLink:d.link,authorTalkLink:d.talkLink,authorName:d.name,isUnsigned:c,isExtraSignature:o}}findUnsigneds(){const e=[];if(cd.a.config.unsignedClass)[...this.context.rootElement.getElementsByClassName(cd.a.config.unsignedClass)].filter(e=>{if(this.context.getElementByClassName(e,"cd-timestamp"))return!1;for(let t=e;t&&t!==this.context.rootElement;t=t.parentNode)if(t.classList.contains("cd-signature"))return!1;return!0}).forEach(t=>{[...t.getElementsByTagName("a")].some(i=>{const{userName:n,linkType:r}=Parser_Parser.processLink(i)||{};if(n){let s,a;if("user"===r)s=i;else if("userTalk"===r)a=i;t.classList.add("cd-signature");const o=!0;e.push({element:t,authorName:n,isUnsigned:o,authorLink:s,authorTalkLink:a});return!0}})});return e}findSignatures(){let e=this.findTimestamps().map(this.timestampToSignature).filter(s.b);e.push(...this.findUnsigneds());let t=[];return e.slice().reverse().map(e=>{if(e.isExtraSignature)t.push(e);else{e.extraSignatures=t;t=[]}return Object.assign({type:"signature"},e)}).filter(e=>!e.isExtraSignature)}getTopElementsWithText(e,t=!1){const i=e.textContent.replace(/\\s+/g,"");let n,r=[e],a=0;do{n=r;r=n.reduce((e,t)=>e.concat([...t[this.context.childElementsProp]]),[]);if(["DL","UL","OL"].includes(n[0].tagName))a++}while(r.length&&r.every(e=>["DL","UL","OL","DD","LI"].includes(e.tagName)&&(!t||["DD","LI"].includes(e.tagName)||e.classList.contains("cd-commentLevel"))||!e.textContent.trim()&&Object(s.h)(e))&&r.map(e=>e.textContent).join("").replace(/\\s+/g,"")===i);return{nodes:n,levelsPassed:a}}findHeadings(){return[...this.context.rootElement.getElementsByTagName("h1"),...this.context.rootElement.getElementsByTagName("h2"),...this.context.rootElement.getElementsByTagName("h3"),...this.context.rootElement.getElementsByTagName("h4"),...this.context.rootElement.getElementsByTagName("h5"),...this.context.rootElement.getElementsByTagName("h6")].filter(e=>"mw-toc-heading"!==e.getAttribute("id")).map(e=>({type:"heading",element:e}))}splitParentAfterNode(e){const t=e.parentNode,i=t.cloneNode();let n;for(;(n=t.lastChild)&&n!==e;)i.insertBefore(n,i.firstChild);if(i[this.context.childElementsProp].length>0)t.parentNode.insertBefore(i,t.nextSibling);return[t,i]}static processLink(e){const t=e.getAttribute("href");let i,r=null;if(t){const{pageName:e,domain:a,fragment:o}=function(e){let t,i=cd.a.g.hostname,n=e.replace(/^(?:https?:)?\\/\\/([^/]+)/,(e,t)=>{i=t;return""}).replace(cd.a.g.startsWithArticlePathRegexp,"").replace(cd.a.g.startsWithScriptTitleRegexp,"").replace(/&action=edit.*/,"").replace(/#(.*)/,(e,i)=>{t=i;return""}).replace(/_/g," ");try{n=decodeURIComponent(n)}catch(e){return null}return{pageName:n,domain:i,fragment:t}}(t)||{};if(!e||n.a.isAnyId(o))return null;const l=e.match(cd.a.g.userNamespacesRegexp);if(l){i=l[1];if(cd.a.g.userLinkRegexp.test(e))r="user";else if(cd.a.g.userTalkLinkRegexp.test(e))r="userTalk";else if(cd.a.g.userSubpageLinkRegexp.test(e))r="userSubpage";else if(cd.a.g.userTalkSubpageLinkRegexp.test(e))r="userTalkSubpage"}else if(e.startsWith(cd.a.g.contribsPage+"/")){i=e.replace(cd.a.g.contribsPageLinkRegexp,"");if(cd.a.g.isIPv6Address(i))i=i.toUpperCase();r="contribs"}if(a!==cd.a.g.hostname)r+="Foreign";if(i)i=Object(s.l)(Object(s.m)(i.replace(/\\/.*/,""))).trim()}else if(e.classList.contains("mw-selflink")&&3===cd.a.g.namespaceNumber&&!cd.a.g.pageName.includes("/"))i=cd.a.g.pageTitle;else return null;return{userName:i,linkType:r}}}t.a=Parser_Parser},,,,,,function(e,t,i){"use strict";i.r(t);i(37)},function(module,__webpack_exports__,__webpack_require__){"use strict";var _CdError__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__(4),_CommentSkeleton__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__(9),_Parser__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__(30),_SectionSkeleton__WEBPACK_IMPORTED_MODULE_3__=__webpack_require__(29),_cd__WEBPACK_IMPORTED_MODULE_4__=__webpack_require__(0),_debug__WEBPACK_IMPORTED_MODULE_5__=__webpack_require__(2),_utils__WEBPACK_IMPORTED_MODULE_6__=__webpack_require__(1),_htmlparser2Extended__WEBPACK_IMPORTED_MODULE_7__=__webpack_require__(24),_htmlparser2Extended__WEBPACK_IMPORTED_MODULE_8__=__webpack_require__(3),_htmlparser2Extended__WEBPACK_IMPORTED_MODULE_8___default=__webpack_require__.n(_htmlparser2Extended__WEBPACK_IMPORTED_MODULE_8__);let isFirstRun=!0,alarmTimeout,rootElement;_cd__WEBPACK_IMPORTED_MODULE_4__.a.isWorker=!0;_cd__WEBPACK_IMPORTED_MODULE_4__.a.debug=_debug__WEBPACK_IMPORTED_MODULE_5__.a;_debug__WEBPACK_IMPORTED_MODULE_5__.a.init();function setAlarm(e){clearTimeout(alarmTimeout);alarmTimeout=setTimeout(()=>{postMessage({type:"wakeUp"})},e)}function getAllTextNodes(){let e=[];Object(_htmlparser2Extended__WEBPACK_IMPORTED_MODULE_7__.a)(rootElement,t=>{if(t.nodeType===Node.TEXT_NODE)e.push(t);if(t.nodeType===Node.COMMENT_NODE&&t.data.startsWith("__DTREPLYBUTTONS__"))t.remove()});return e}function removeDtButtonHtmlComments(){}function findTargets(e){e.processAndRemoveDtMarkup();const t=e.findHeadings(),i=e.findSignatures();return t.concat(i).sort((t,i)=>e.context.follows(t.element,i.element)?1:-1)}function processComments(e,t){t.filter(e=>"signature"===e.type).forEach(i=>{try{_cd__WEBPACK_IMPORTED_MODULE_4__.a.comments.push(e.createComment(i,t))}catch(e){if(!(e instanceof _CdError__WEBPACK_IMPORTED_MODULE_0__.a))console.error(e)}})}function processSections(e,t){t.filter(e=>"heading"===e.type).forEach(i=>{try{_cd__WEBPACK_IMPORTED_MODULE_4__.a.sections.push(e.createSection(i,t))}catch(e){if(!(e instanceof _CdError__WEBPACK_IMPORTED_MODULE_0__.a))console.error(e)}})}function removeDataAttributes(e){Object.keys(e.attribs).forEach(t=>{if(/^data-/.test(t))e.removeAttribute(t)})}function hideElement(e,t){let i;if(e.classList.contains("reference"))i="reference";else if(e.classList.contains("references"))i="references";else if(e.classList.contains("autonumber"))i="autonumber";else i="templateStyles";const n=t.hiddenElementsData.push({type:i,tagName:e.tagName,html:e.outerHTML}),r=document.createTextNode(`\\x01${n}_${i}\\x02`);e.parentNode.insertBefore(r,e);e.remove();if(t.elements.includes(e)){t.elements[t.elements.indexOf(e)]=r;return r}}function filterCommentContent(e){e.hiddenElementsData=[];e.elementHtmls=e.elements.map(t=>{if(Object(_utils__WEBPACK_IMPORTED_MODULE_6__.g)(t)){const e=t.getElementsByClassName("mw-headline",1)[0];if(e){var i;null===(i=e.getElementsByClassName("mw-headline-number",1)[0])||void 0===i||i.remove();[...t.childNodes].forEach(e=>{e.remove()});[...e.childNodes].forEach(t.appendChild.bind(t))}}removeDataAttributes(t);t.getElementsByAttribute(/^data-/).forEach(removeDataAttributes);t.getElementsByTagName("span").filter(e=>e.attribs.id&&1===Object.keys(e.attribs).length&&!e.textContent).forEach(e=>{e.remove()});t.filterRecursively(e=>e.nodeType===Node.COMMENT_NODE).forEach(e=>{e.remove()});if(t.classList.contains("references")||Object(_utils__WEBPACK_IMPORTED_MODULE_6__.i)(t))return hideElement(t,e).textContent;else{t.filterRecursively(e=>e.tagName&&(["autonumber","reference","references"].some(t=>e.classList.contains(t))||Object(_utils__WEBPACK_IMPORTED_MODULE_6__.i)(e))).forEach(t=>{hideElement(t,e)});return t.outerHTML}})}function addCompareHelperProperties(e){e.htmlToCompare="";e.textHtmlToCompare="";e.headingHtmlToCompare="";e.elements.forEach(t=>{let i;if("DIV"===t.tagName){t.classList.remove("cd-comment-part","cd-comment-part-first","cd-comment-part-last");if(!t.getAttribute("class"))t.removeAttribute("class");if(Object.keys(t.attribs).length){var n;if("\\n"===(null===(n=t.lastChild)||void 0===n?void 0:n.data))t.lastChild.remove();i=t.outerHTML}else i=t.innerHTML}else i=t.innerHTML||t.textContent;e.htmlToCompare+=i+"\\n";if(Object(_utils__WEBPACK_IMPORTED_MODULE_6__.g)(t))e.headingHtmlToCompare+=i;else e.textHtmlToCompare+=i+"\\n"});e.htmlToCompare=e.htmlToCompare.trim();e.textHtmlToCompare=e.textHtmlToCompare.trim();e.headingHtmlToCompare=e.headingHtmlToCompare.trim();e.signatureElement.remove();e.text=e.elements.map(e=>e.textContent).join("\\n").trim();e.elementNames=e.elements.map(e=>e.tagName)}function keepSafeValues(e,t){Object.keys(e).forEach(i=>{if(t.includes(i))delete e[i]})}function prepareCommentsAndSections(e){_CommentSkeleton__WEBPACK_IMPORTED_MODULE_1__.a.processOutdents(e);_cd__WEBPACK_IMPORTED_MODULE_4__.a.comments.forEach(e=>{filterCommentContent(e);addCompareHelperProperties(e)});let t=["authorLink","authorTalkLink","cachedParent","elements","extraSignatures","highlightables","parser","parts","signatureElement","timestampElement"];_cd__WEBPACK_IMPORTED_MODULE_4__.a.comments.forEach((e,i)=>{e.children=e.getChildren();e.children.forEach(t=>{t.parent=e;t.isToMe=e.isOwn});e.previousComments=_cd__WEBPACK_IMPORTED_MODULE_4__.a.comments.slice(Math.max(0,i-2),i).reverse();keepSafeValues(e,t)});let i=["cachedAncestors","headingElement","headlineElement","lastElement","lastElementInFirstChunk","parser"];_cd__WEBPACK_IMPORTED_MODULE_4__.a.sections.forEach(e=>{var t;e.parent=e.getParent();e.ancestors=e.getAncestors().map(e=>e.headline);e.oldestCommentId=null===(t=e.oldestComment)||void 0===t?void 0:t.id;keepSafeValues(e,i)})}function parse(){_cd__WEBPACK_IMPORTED_MODULE_4__.a.comments=[];_cd__WEBPACK_IMPORTED_MODULE_4__.a.sections=[];let e;const t=new _Parser__WEBPACK_IMPORTED_MODULE_2__.a({CommentClass:_CommentSkeleton__WEBPACK_IMPORTED_MODULE_1__.a,SectionClass:_SectionSkeleton__WEBPACK_IMPORTED_MODULE_3__.a,childElementsProp:"childElements",follows:(e,t)=>e.follows(t),getAllTextNodes:getAllTextNodes,getElementByClassName:(e,t)=>e.getElementsByClassName(t,1)[0]||null,rootElement:rootElement,areThereOutdents:()=>{var t;null!==(t=e)&&void 0!==t||(e=Boolean(rootElement.getElementsByClassName(_cd__WEBPACK_IMPORTED_MODULE_4__.a.config.outdentClass,1).length));return e},handleDtMarkup:e=>{e.forEach(e=>{e.remove()})},removeDtButtonHtmlComments:removeDtButtonHtmlComments}),i=findTargets(t);_debug__WEBPACK_IMPORTED_MODULE_5__.a.startTimer("worker: process comments");processComments(t,i);_debug__WEBPACK_IMPORTED_MODULE_5__.a.stopTimer("worker: process comments");_debug__WEBPACK_IMPORTED_MODULE_5__.a.startTimer("worker: process sections");processSections(t,i);_debug__WEBPACK_IMPORTED_MODULE_5__.a.stopTimer("worker: process sections");_debug__WEBPACK_IMPORTED_MODULE_5__.a.startTimer("worker: prepare comments and sections");prepareCommentsAndSections(t);_debug__WEBPACK_IMPORTED_MODULE_5__.a.stopTimer("worker: prepare comments and sections")}function restoreFunc(code){if(code){if(!/^ *function\\b/.test(code)&&!/^.+=>/.test(code))code="function "+code;if(/^ *function *\\(/.test(code))code="("+code+")"}return eval(code)}function onMessageFromWindow(e){const t=e.data;if(isFirstRun){console.debug("Convenient Discussions\' web worker has been successfully loaded. Click the link with the file name and line number to open the source code in your debug tool.");isFirstRun=!1}if("setAlarm"===t.type)setAlarm(t.interval);if("removeAlarm"===t.type)clearTimeout(alarmTimeout);if("parse"===t.type){_debug__WEBPACK_IMPORTED_MODULE_5__.a.startTimer("worker");_cd__WEBPACK_IMPORTED_MODULE_4__.a.g=t.g;_cd__WEBPACK_IMPORTED_MODULE_4__.a.config=t.config;_cd__WEBPACK_IMPORTED_MODULE_4__.a.config.checkForCustomForeignComponents=restoreFunc(_cd__WEBPACK_IMPORTED_MODULE_4__.a.config.checkForCustomForeignComponents);_cd__WEBPACK_IMPORTED_MODULE_4__.a.g.isIPv6Address=restoreFunc(_cd__WEBPACK_IMPORTED_MODULE_4__.a.g.isIPv6Address);self.document=Object(_htmlparser2Extended__WEBPACK_IMPORTED_MODULE_8__.parseDocument)(t.text,{withStartIndices:!0,withEndIndices:!0,decodeEntities:!1});rootElement=document.childNodes[0];parse();postMessage({type:t.type,revisionId:t.revisionId,resolverId:t.resolverId,comments:_cd__WEBPACK_IMPORTED_MODULE_4__.a.comments,sections:_cd__WEBPACK_IMPORTED_MODULE_4__.a.sections});_debug__WEBPACK_IMPORTED_MODULE_5__.a.stopTimer("worker");_debug__WEBPACK_IMPORTED_MODULE_5__.a.logAndResetEverything()}}self.onmessage=onMessageFromWindow},function(e){e.exports=JSON.parse(\'{"0":65533,"128":8364,"130":8218,"131":402,"132":8222,"133":8230,"134":8224,"135":8225,"136":710,"137":8240,"138":352,"139":8249,"140":338,"142":381,"145":8216,"146":8217,"147":8220,"148":8221,"149":8226,"150":8211,"151":8212,"152":732,"153":8482,"154":353,"155":8250,"156":339,"158":382,"159":376}\')},function(e,t,i){"use strict";var n=this&&this.__assign||function(){return(n=Object.assign||function(e){for(var t,i=1,n=arguments.length;i<n;i++){t=arguments[i];for(var r in t)if(Object.prototype.hasOwnProperty.call(t,r))e[r]=t[r]}return e}).apply(this,arguments)},r=this&&this.__createBinding||(Object.create?function(e,t,i,n){if(void 0===n)n=i;Object.defineProperty(e,n,{enumerable:!0,get:function(){return t[i]}})}:function(e,t,i,n){if(void 0===n)n=i;e[n]=t[i]}),s=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),a=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var i in e)if("default"!==i&&Object.prototype.hasOwnProperty.call(e,i))r(t,e,i);s(t,e);return t};Object.defineProperty(t,"__esModule",{value:!0});var o=a(i(8)),l=i(40),c=i(41),u=new Set(["style","script","xmp","iframe","noembed","noframes","plaintext","noscript"]);var h=new Set(["area","base","basefont","br","col","command","embed","frame","hr","img","input","isindex","keygen","link","meta","param","source","track","wbr"]);function d(e,t){if(void 0===t)t={};for(var i=("length"in e?e:[e]),n="",r=0;r<i.length;r++)n+=f(i[r],t);return n}t.default=d;function f(e,t){switch(e.type){case o.Root:return d(e.children,t);case o.Directive:case o.Doctype:return"<"+e.data+">";case o.Comment:return function(e){return"\\x3c!--"+e.data+"--\\x3e"}(e);case o.CDATA:return function(e){return"<![CDATA["+e.children[0].data+"]]>"}(e);case o.Script:case o.Style:case o.Tag:return function(e,t){var i;if("foreign"===t.xmlMode){e.name=null!==(i=c.elementNames.get(e.name))&&void 0!==i?i:e.name;if(e.parent&&p.has(e.parent.name))t=n(n({},t),{xmlMode:!1})}if(!t.xmlMode&&m.has(e.name))t=n(n({},t),{xmlMode:"foreign"});var r="<"+e.name,s=function(e,t){if(e)return Object.keys(e).map((function(i){var n,r,s=null!==(n=e[i])&&void 0!==n?n:"";if("foreign"===t.xmlMode)i=null!==(r=c.attributeNames.get(i))&&void 0!==r?r:i;if(!t.emptyAttrs&&!t.xmlMode&&""===s)return i;else return i+\'="\'+(!1!==t.decodeEntities?l.encodeXML(s):s.replace(/"/g,"""))+\'"\'})).join(" ")}(e.attribs,t);if(s)r+=" "+s;if(0===e.children.length&&(t.xmlMode?!1!==t.selfClosingTags:t.selfClosingTags&&h.has(e.name))){if(!t.xmlMode)r+=" ";r+="/>"}else{r+=">";if(e.children.length>0)r+=d(e.children,t);if(t.xmlMode||!h.has(e.name))r+="</"+e.name+">"}return r}(e,t);case o.Text:return function(e,t){var i=e.data||"";if(!1!==t.decodeEntities&&(t.xmlMode||!e.parent||!u.has(e.parent.name)))i=l.encodeXML(i);return i}(e,t)}}var p=new Set(["mi","mo","mn","ms","mtext","annotation-xml","foreignObject","desc","title"]),m=new Set(["svg","math"])},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});t.decodeXMLStrict=t.decodeHTML5Strict=t.decodeHTML4Strict=t.decodeHTML5=t.decodeHTML4=t.decodeHTMLStrict=t.decodeHTML=t.decodeXML=t.encodeHTML5=t.encodeHTML4=t.escapeUTF8=t.escape=t.encodeNonAsciiHTML=t.encodeHTML=t.encodeXML=t.encode=t.decodeStrict=t.decode=void 0;var n=i(20),r=i(21);t.decode=function(e,t){return(!t||t<=0?n.decodeXML:n.decodeHTML)(e)};t.decodeStrict=function(e,t){return(!t||t<=0?n.decodeXML:n.decodeHTMLStrict)(e)};t.encode=function(e,t){return(!t||t<=0?r.encodeXML:r.encodeHTML)(e)};var s=i(21);Object.defineProperty(t,"encodeXML",{enumerable:!0,get:function(){return s.encodeXML}});Object.defineProperty(t,"encodeHTML",{enumerable:!0,get:function(){return s.encodeHTML}});Object.defineProperty(t,"encodeNonAsciiHTML",{enumerable:!0,get:function(){return s.encodeNonAsciiHTML}});Object.defineProperty(t,"escape",{enumerable:!0,get:function(){return s.escape}});Object.defineProperty(t,"escapeUTF8",{enumerable:!0,get:function(){return s.escapeUTF8}});Object.defineProperty(t,"encodeHTML4",{enumerable:!0,get:function(){return s.encodeHTML}});Object.defineProperty(t,"encodeHTML5",{enumerable:!0,get:function(){return s.encodeHTML}});var a=i(20);Object.defineProperty(t,"decodeXML",{enumerable:!0,get:function(){return a.decodeXML}});Object.defineProperty(t,"decodeHTML",{enumerable:!0,get:function(){return a.decodeHTML}});Object.defineProperty(t,"decodeHTMLStrict",{enumerable:!0,get:function(){return a.decodeHTMLStrict}});Object.defineProperty(t,"decodeHTML4",{enumerable:!0,get:function(){return a.decodeHTML}});Object.defineProperty(t,"decodeHTML5",{enumerable:!0,get:function(){return a.decodeHTML}});Object.defineProperty(t,"decodeHTML4Strict",{enumerable:!0,get:function(){return a.decodeHTMLStrict}});Object.defineProperty(t,"decodeHTML5Strict",{enumerable:!0,get:function(){return a.decodeHTMLStrict}});Object.defineProperty(t,"decodeXMLStrict",{enumerable:!0,get:function(){return a.decodeXML}})},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});t.attributeNames=t.elementNames=void 0;t.elementNames=new Map([["altglyph","altGlyph"],["altglyphdef","altGlyphDef"],["altglyphitem","altGlyphItem"],["animatecolor","animateColor"],["animatemotion","animateMotion"],["animatetransform","animateTransform"],["clippath","clipPath"],["feblend","feBlend"],["fecolormatrix","feColorMatrix"],["fecomponenttransfer","feComponentTransfer"],["fecomposite","feComposite"],["feconvolvematrix","feConvolveMatrix"],["fediffuselighting","feDiffuseLighting"],["fedisplacementmap","feDisplacementMap"],["fedistantlight","feDistantLight"],["fedropshadow","feDropShadow"],["feflood","feFlood"],["fefunca","feFuncA"],["fefuncb","feFuncB"],["fefuncg","feFuncG"],["fefuncr","feFuncR"],["fegaussianblur","feGaussianBlur"],["feimage","feImage"],["femerge","feMerge"],["femergenode","feMergeNode"],["femorphology","feMorphology"],["feoffset","feOffset"],["fepointlight","fePointLight"],["fespecularlighting","feSpecularLighting"],["fespotlight","feSpotLight"],["fetile","feTile"],["feturbulence","feTurbulence"],["foreignobject","foreignObject"],["glyphref","glyphRef"],["lineargradient","linearGradient"],["radialgradient","radialGradient"],["textpath","textPath"]]);t.attributeNames=new Map([["definitionurl","definitionURL"],["attributename","attributeName"],["attributetype","attributeType"],["basefrequency","baseFrequency"],["baseprofile","baseProfile"],["calcmode","calcMode"],["clippathunits","clipPathUnits"],["diffuseconstant","diffuseConstant"],["edgemode","edgeMode"],["filterunits","filterUnits"],["glyphref","glyphRef"],["gradienttransform","gradientTransform"],["gradientunits","gradientUnits"],["kernelmatrix","kernelMatrix"],["kernelunitlength","kernelUnitLength"],["keypoints","keyPoints"],["keysplines","keySplines"],["keytimes","keyTimes"],["lengthadjust","lengthAdjust"],["limitingconeangle","limitingConeAngle"],["markerheight","markerHeight"],["markerunits","markerUnits"],["markerwidth","markerWidth"],["maskcontentunits","maskContentUnits"],["maskunits","maskUnits"],["numoctaves","numOctaves"],["pathlength","pathLength"],["patterncontentunits","patternContentUnits"],["patterntransform","patternTransform"],["patternunits","patternUnits"],["pointsatx","pointsAtX"],["pointsaty","pointsAtY"],["pointsatz","pointsAtZ"],["preservealpha","preserveAlpha"],["preserveaspectratio","preserveAspectRatio"],["primitiveunits","primitiveUnits"],["refx","refX"],["refy","refY"],["repeatcount","repeatCount"],["repeatdur","repeatDur"],["requiredextensions","requiredExtensions"],["requiredfeatures","requiredFeatures"],["specularconstant","specularConstant"],["specularexponent","specularExponent"],["spreadmethod","spreadMethod"],["startoffset","startOffset"],["stddeviation","stdDeviation"],["stitchtiles","stitchTiles"],["surfacescale","surfaceScale"],["systemlanguage","systemLanguage"],["tablevalues","tableValues"],["targetx","targetX"],["targety","targetY"],["textlength","textLength"],["viewbox","viewBox"],["viewtarget","viewTarget"],["xchannelselector","xChannelSelector"],["ychannelselector","yChannelSelector"],["zoomandpan","zoomAndPan"]])},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});t.prevElementSibling=t.nextElementSibling=t.getName=t.hasAttrib=t.getAttributeValue=t.getSiblings=t.getParent=t.getChildren=void 0;var n=i(6),r=[];function s(e){var t;return null!==(t=e.children)&&void 0!==t?t:r}t.getChildren=s;function a(e){return e.parent||null}t.getParent=a;t.getSiblings=function(e){var t=a(e);if(null!=t)return s(t);for(var i=[e],n=e.prev,r=e.next;null!=n;){i.unshift(n);n=n.prev}for(;null!=r;){i.push(r);r=r.next}return i};t.getAttributeValue=function(e,t){var i;return null===(i=e.attribs)||void 0===i?void 0:i[t]};t.hasAttrib=function(e,t){return null!=e.attribs&&Object.prototype.hasOwnProperty.call(e.attribs,t)&&null!=e.attribs[t]};t.getName=function(e){return e.name};t.nextElementSibling=function(e){for(var t=e.next;null!==t&&!(0,n.isTag)(t);)t=t.next;return t};t.prevElementSibling=function(e){for(var t=e.prev;null!==t&&!(0,n.isTag)(t);)t=t.prev;return t}},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});t.prepend=t.prependChild=t.append=t.appendChild=t.replaceElement=t.removeElement=void 0;function n(e){if(e.prev)e.prev.next=e.next;if(e.next)e.next.prev=e.prev;if(e.parent){var t=e.parent.children;t.splice(t.lastIndexOf(e),1)}}t.removeElement=n;t.replaceElement=function(e,t){var i=t.prev=e.prev;if(i)i.next=t;var n=t.next=e.next;if(n)n.prev=t;var r=t.parent=e.parent;if(r){var s=r.children;s[s.lastIndexOf(e)]=t}};t.appendChild=function(e,t){n(t);t.next=null;t.parent=e;if(e.children.push(t)>1){var i=e.children[e.children.length-2];i.next=t;t.prev=i}else t.prev=null};t.append=function(e,t){n(t);var i=e.parent,r=e.next;t.next=r;t.prev=e;e.next=t;t.parent=i;if(r){r.prev=t;if(i){var s=i.children;s.splice(s.lastIndexOf(r),0,t)}}else if(i)i.children.push(t)};t.prependChild=function(e,t){n(t);t.parent=e;t.prev=null;if(1!==e.children.unshift(t)){var i=e.children[1];i.prev=t;t.next=i}else t.next=null};t.prepend=function(e,t){n(t);var i=e.parent;if(i){var r=i.children;r.splice(r.indexOf(e),0,t)}if(e.prev)e.prev.next=t;t.parent=i;t.prev=e.prev;t.next=e;e.prev=t}},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});t.uniqueSort=t.compareDocumentPosition=t.removeSubsets=void 0;var n=i(6);t.removeSubsets=function(e){for(var t=e.length;--t>=0;){var i=e[t];if(!(t>0&&e.lastIndexOf(i,t-1)>=0)){for(var n=i.parent;n;n=n.parent)if(e.includes(n)){e.splice(t,1);break}}else e.splice(t,1)}return e};function r(e,t){var i=[],r=[];if(e===t)return 0;for(var s=(0,n.hasChildren)(e)?e:e.parent;s;){i.unshift(s);s=s.parent}s=(0,n.hasChildren)(t)?t:t.parent;for(;s;){r.unshift(s);s=s.parent}for(var a=Math.min(i.length,r.length),o=0;o<a&&i[o]===r[o];)o++;if(0===o)return 1;var l=i[o-1],c=l.children,u=i[o],h=r[o];if(c.indexOf(u)>c.indexOf(h))if(l===t)return 20;else return 4;if(l===e)return 10;else return 2}t.compareDocumentPosition=r;t.uniqueSort=function(e){(e=e.filter((function(e,t,i){return!i.includes(e,t+1)}))).sort((function(e,t){var i=r(e,t);if(2&i)return-1;else if(4&i)return 1;return 0}));return e}},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});t.getFeed=void 0;var n=i(19),r=i(23);t.getFeed=function(e){var t=l(h,e);return!t?null:"feed"===t.name?function(e){var t,i=e.children,n={type:"atom",items:(0,r.getElementsByTagName)("entry",i).map((function(e){var t,i=e.children,n={media:o(i)};u(n,"id","id",i);u(n,"title","title",i);var r=null===(t=l("link",i))||void 0===t?void 0:t.attribs.href;if(r)n.link=r;var s=c("summary",i)||c("content",i);if(s)n.description=s;var a=c("updated",i);if(a)n.pubDate=new Date(a);return n}))};u(n,"id","id",i);u(n,"title","title",i);var s=null===(t=l("link",i))||void 0===t?void 0:t.attribs.href;if(s)n.link=s;u(n,"description","subtitle",i);var a=c("updated",i);if(a)n.updated=new Date(a);u(n,"author","email",i,!0);return n}(t):function(e){var t,i,n=null!==(i=null===(t=l("channel",e.children))||void 0===t?void 0:t.children)&&void 0!==i?i:[],s={type:e.name.substr(0,3),id:"",items:(0,r.getElementsByTagName)("item",e.children).map((function(e){var t=e.children,i={media:o(t)};u(i,"id","guid",t);u(i,"title","title",t);u(i,"link","link",t);u(i,"description","description",t);var n=c("pubDate",t);if(n)i.pubDate=new Date(n);return i}))};u(s,"title","title",n);u(s,"link","link",n);u(s,"description","description",n);var a=c("lastBuildDate",n);if(a)s.updated=new Date(a);u(s,"author","managingEditor",n,!0);return s}(t)};var s=["url","type","lang"],a=["fileSize","bitrate","framerate","samplingrate","channels","duration","height","width"];function o(e){return(0,r.getElementsByTagName)("media:content",e).map((function(e){for(var t=e.attribs,i={medium:t.medium,isDefault:!!t.isDefault},n=0,r=s;n<r.length;n++){if(t[c=r[n]])i[c]=t[c]}for(var o=0,l=a;o<l.length;o++){var c;if(t[c=l[o]])i[c]=parseInt(t[c],10)}if(t.expression)i.expression=t.expression;return i}))}function l(e,t){return(0,r.getElementsByTagName)(e,t,!0,1)[0]}function c(e,t,i){if(void 0===i)i=!1;return(0,n.textContent)((0,r.getElementsByTagName)(e,t,i,1)).trim()}function u(e,t,i,n,r){if(void 0===r)r=!1;var s=c(i,n,r);if(s)e[t]=s}function h(e){return"rss"===e||"feed"===e||"rdf:RDF"===e}},function(e,t,i){"use strict";e.exports=function(e,t){var i,n,r={},s={},a=void 0,o={},l={};o[0]="HTML_SPECIALCHARS";o[1]="HTML_ENTITIES";l[0]="ENT_NOQUOTES";l[2]="ENT_COMPAT";l[3]="ENT_QUOTES";i=!isNaN(e)?o[e]:e?e.toUpperCase():"HTML_SPECIALCHARS";n=!isNaN(t)?l[t]:t?t.toUpperCase():"ENT_COMPAT";if("HTML_SPECIALCHARS"!==i&&"HTML_ENTITIES"!==i)throw new Error("Table: "+i+" not supported");r[38]="&";if("HTML_ENTITIES"===i){r[160]=" ";r[161]="¡";r[162]="¢";r[163]="£";r[164]="¤";r[165]="¥";r[166]="¦";r[167]="§";r[168]="¨";r[169]="©";r[170]="ª";r[171]="«";r[172]="¬";r[173]="­";r[174]="®";r[175]="¯";r[176]="°";r[177]="±";r[178]="²";r[179]="³";r[180]="´";r[181]="µ";r[182]="¶";r[183]="·";r[184]="¸";r[185]="¹";r[186]="º";r[187]="»";r[188]="¼";r[189]="½";r[190]="¾";r[191]="¿";r[192]="À";r[193]="Á";r[194]="Â";r[195]="Ã";r[196]="Ä";r[197]="Å";r[198]="Æ";r[199]="Ç";r[200]="È";r[201]="É";r[202]="Ê";r[203]="Ë";r[204]="Ì";r[205]="Í";r[206]="Î";r[207]="Ï";r[208]="Ð";r[209]="Ñ";r[210]="Ò";r[211]="Ó";r[212]="Ô";r[213]="Õ";r[214]="Ö";r[215]="×";r[216]="Ø";r[217]="Ù";r[218]="Ú";r[219]="Û";r[220]="Ü";r[221]="Ý";r[222]="Þ";r[223]="ß";r[224]="à";r[225]="á";r[226]="â";r[227]="ã";r[228]="ä";r[229]="å";r[230]="æ";r[231]="ç";r[232]="è";r[233]="é";r[234]="ê";r[235]="ë";r[236]="ì";r[237]="í";r[238]="î";r[239]="ï";r[240]="ð";r[241]="ñ";r[242]="ò";r[243]="ó";r[244]="ô";r[245]="õ";r[246]="ö";r[247]="÷";r[248]="ø";r[249]="ù";r[250]="ú";r[251]="û";r[252]="ü";r[253]="ý";r[254]="þ";r[255]="ÿ"}if("ENT_NOQUOTES"!==n)r[34]=""";if("ENT_QUOTES"===n)r[39]="'";r[60]="<";r[62]=">";for(a in r)if(r.hasOwnProperty(a))s[String.fromCharCode(a)]=r[a];return s}}]);\n//# sourceMappingURL=https://tools-static.wmflabs.org/convenient-discussions/source-maps/convenientDiscussions.worker.js.map.json',"Worker",void 0,void 0)}var G=i(39),K=i(33),Z=i(34),X=t.a={content:{},scrollData:{offset:null},document:document.documentElement,autoScrolling:!1,isUpdateThreadLinesHandlerAttached:!1,lastScrollX:0,originalPageTitle:document.title,addedCommentCount:0,areRelevantCommentsAdded:0,relevantAddedCommentIds:null,newCommentsTitleMark:"",commentsNotifiedAbout:[],bootProcess:void 0,init(){var e,t;this.handleMouseMove=this.handleMouseMove.bind(this);this.handleWindowResize=this.handleWindowResize.bind(this);this.handleGlobalKeyDown=this.handleGlobalKeyDown.bind(this);this.handleScroll=this.handleScroll.bind(this);this.handlePopState=this.handlePopState.bind(this);this.handleSelectionChange=this.handleSelectionChange.bind(this);this.handlePageMutations=this.handlePageMutations.bind(this);this.handleAddTopicButtonClick=this.handleAddTopicButtonClick.bind(this);this.handleWikipageContentHookFirings=this.handleWikipageContentHookFirings.bind(this);this.$content||(this.$content=$("#mw-content-text"));if(cd.a.g.isMobile)$(document.body).addClass("cd-mobile");const i=/[?&]cdtalkpage=(1|true|yes|y)(?=&|$)/.test(location.search),n=/[?&]cdtalkpage=(0|false|no|n)(?=&|$)/.test(location.search);this.definitelyTalkPage=Boolean(i||this.$content.find(".cd-talkPage").length||($("#ca-addsection").length||(null===(e=cd.a.g.pageWhitelistRegexp)||void 0===e?void 0:e.test(cd.a.g.pageName)))&&!(null!==(t=cd.a.g.pageBlacklistRegexp)&&void 0!==t&&t.test(cd.a.g.pageName)));this.articlePageTalkPage=(!mw.config.get("wgIsRedirect")||!this.isCurrentRevision())&&!this.$content.find(".cd-notTalkPage").length&&(Object(u.H)(cd.a.g.pageName,cd.a.g.namespaceNumber)||this.definitelyTalkPage)&&!("undefined"!=typeof cdOnlyRunByFooterLink&&window.cdOnlyRunByFooterLink);this.diffPage=/[?&]diff=[^&]/.test(location.search);this.talkPage=Boolean(mw.config.get("wgIsArticle")&&!n&&(i||this.articlePageTalkPage))},setup(e){if(!this.$content.get(0).parentNode)this.$content=$("#mw-content-text");if(e){const t=document.createElement("div");t.innerHTML=e;this.rootElement=t.firstChild;this.$root=$(this.rootElement)}else{this.$root=this.$content.children(".mw-parser-output");if(!this.$root.length)this.$root=this.$content;this.rootElement=this.$root.get(0)}this.$root.addClass("cd-parse-started")},reset(){var e;this.cleanUpUrlAndDom();null===(e=this.mutationObserver)||void 0===e||e.disconnect();c.a.reset();p.a.reset();this.content={};this.addedCommentCount=0;this.areRelevantCommentsAdded=!1;this.relevantAddedCommentIds=null;this.updatePageTitle()},setTalkPageness(e){this.talkPage=Boolean(e)},isTalkPage(){return this.talkPage},isWatchlistPage:()=>["Recentchanges","Watchlist"].includes(mw.config.get("wgCanonicalSpecialPageName")),isContributionsPage:()=>"Contributions"===mw.config.get("wgCanonicalSpecialPageName"),isHistoryPage:()=>"history"===mw.config.get("wgAction")&&Object(u.H)(cd.a.g.pageName,cd.a.g.namespaceNumber),isDiffPage(){return this.diffPage},isDefinitelyTalkPage(){return this.definitelyTalkPage},isArticlePageTalkPage(){return this.articlePageTalkPage},doesPageExist:()=>Boolean(mw.config.get("wgArticleId")),isPageActive(){return this.talkPage&&this.doesPageExist()&&!P.b.getCurrent().isArchivePage()&&this.isCurrentRevision()},isPageCommentable(){return this.talkPage&&(this.isPageActive()||!this.doesPageExist())},toggleAutoScrolling(e){this.autoScrolling=Boolean(e)},isAutoScrolling(){return this.autoScrolling},setAddSectionButtonContainer(e){this.$addSectionButtonContainer=e},setActiveAutocompleteMenu(e){this.activeAutocompleteMenu=e},getActiveAutocompleteMenu(){return this.activeAutocompleteMenu},forgetActiveAutocompleteMenu(){delete this.activeAutocompleteMenu},getStickyHeader(){if(void 0===this.stickyHeader)this.stickyHeader=$("#vector-sticky-header").get(0)||null;return this.stickyHeader},getWindowManager(e="default"){var t=this;this.windowManagers||(this.windowManagers={});if(!this.windowManagers[e]){this.windowManagers[e]=(new OO.ui.WindowManager).on("closing",function(){var i=o()((function*(i,n){yield n;t.windowManagers[e].clearWindows()}));return function(e,t){return i.apply(this,arguments)}}());$(document.body).append(this.windowManagers[e].$element)}return this.windowManagers[e]},getApi(){this.api||(this.api=new mw.Api({parameters:{formatversion:2,uselang:cd.a.g.userLanguage},ajax:{headers:{"Api-User-Agent":"c:User:Jack who built the house/Convenient Discussions"}}}));return this.api},getWorker(){this.worker||(this.worker=new V);return this.worker},getContentColumnOffsets(e){if(!this.contentColumnOffsets||e){const t="ltr"===cd.a.g.contentTextDirection?"padding-left":"padding-right";let i=Math.max(parseFloat(this.$contentColumn.css(t)),cd.a.g.contentFontSize);if("timeless"===cd.a.g.skin)i--;const n=this.$contentColumn.offset().left,o=this.$contentColumn.outerWidth();this.contentColumnOffsets={startMargin:i,start:"ltr"===cd.a.g.contentTextDirection?n:n+o,end:"ltr"===cd.a.g.contentTextDirection?n+o:n};if(e)$(this.document).css("--cd-content-start-margin",i+"px")}return this.contentColumnOffsets},isCurrentRevision:()=>mw.config.get("wgRevisionId")>=mw.config.get("wgCurRevisionId"),saveRelativeScrollPosition(e=null){const t=this.bootProcess.data("scrollY")||window.scrollY;this.bootProcess.deleteData("scrollY");if(e&&!C.a.isInSidebar()&&C.a.isPresent()&&t<C.a.getBottomOffset())this.saveScrollPosition(e.saveTocHeight);else{this.scrollData.element=null;this.scrollData.elementTop=null;this.scrollData.touchesBottom=!1;this.scrollData.offsetBottom=this.document.scrollHeight-(t+window.innerHeight);if(this.scrollData.offsetBottom<100)this.scrollData.touchesBottom=!0;else if(0!==t&&this.rootElement.getBoundingClientRect().top<=cd.a.g.bodyScrollPaddingTop){const e=new d.b(this.rootElement.firstElementChild,this.rootElement);for(;;){const t=e.currentNode;if(!Object(u.E)(t)&&!this.getFloatingElements().includes(t)){const i=t.getBoundingClientRect();if(i.top>cd.a.g.bodyScrollPaddingTop+cd.a.g.contentFontSize&&this.scrollData.element&&!Object(u.D)(t))break;if(0!==i.height&&i.bottom>=cd.a.g.bodyScrollPaddingTop){this.scrollData.element=t;this.scrollData.elementTop=i.top;if(e.firstChild())continue;else break}}if(!e.nextSibling())break}}}},restoreRelativeScrollPosition(e=!1){if(e&&null!==this.scrollData.offset)this.restoreScrollPosition();else if(this.scrollData.touchesBottom&&0!==window.scrollY)window.scrollTo(0,this.document.scrollHeight-window.innerHeight-this.scrollData.offsetBottom);else if(this.scrollData.element){const e=this.scrollData.element.getBoundingClientRect();if(Object(u.y)(e))window.scrollTo(0,window.scrollY+e.top-this.scrollData.elementTop);else{const e=this.scrollData.element.closest(".cd-hidden");if(e){var t;null===(t=c.a.getAll().map(e=>e.thread).filter(u.i).filter(e=>e.isCollapsed).find(t=>t.collapsedRange.includes(e)))||void 0===t||t.$expandNote.cdScrollTo("top",!1)}}}},replaceScrollAnchorElement(e,t){if(this.scrollData.element&&e===this.scrollData.element)this.scrollData.element=t},saveScrollPosition(e=!0){this.scrollData.offset=window.scrollY;this.scrollData.tocHeight=(e||this.scrollData.tocHeight)&&!C.a.isInSidebar()&&C.a.isPresent()&&!C.a.isFloating()&&0!==window.scrollY&&C.a.getBottomOffset()<window.scrollY+window.innerHeight?C.a.$element.outerHeight():null},restoreScrollPosition(e=!0){if(null!==this.scrollData.offset){if(this.scrollData.tocHeight)this.scrollData.offset+=(C.a.$element.outerHeight()||0)-this.scrollData.tocHeight;window.scrollTo(0,this.scrollData.offset);this.scrollData.offset=null;if(e)this.scrollData.tocHeight=null}},getClosedDiscussions(){if(!this.content.closedDiscussions){const e=cd.a.config.closedDiscussionClasses.map(e=>"."+e).join(", ");this.content.closedDiscussions=this.$root.find(e).get()}return this.content.closedDiscussions},areThereOutdents(){var e,t;null!==(t=(e=this.content).areThereOutdents)&&void 0!==t||(e.areThereOutdents=Boolean(this.$root.find("."+cd.a.config.outdentClass).length));return this.content.areThereOutdents},extractTemplateStylesSelectors(){this.content.tsSelectorsFloating=[];this.content.tsSelectorsHidden=[];const e=t=>{if(t instanceof CSSStyleRule){const e=t.style;if("left"===e.float||"right"===e.float)this.content.tsSelectorsFloating.push(t.selectorText);if("none"===e.display)this.content.tsSelectorsHidden.push(t.selectorText)}else if(t instanceof CSSMediaRule)[...t.cssRules].forEach(e)};[...document.styleSheets].filter(e=>{var t;return null===(t=e.href)||void 0===t?void 0:t.includes("site.styles")}).forEach(t=>{[...t.cssRules].forEach(e)});[...this.rootElement.querySelectorAll("style")].forEach(t=>{[...t.sheet.cssRules].forEach(e)})},getTsFloatingElementSelectors(){if(!this.content.tsSelectorsFloating)this.extractTemplateStylesSelectors();return this.content.tsSelectorsFloating},getTsHiddenElementSelectors(){if(!this.content.tsSelectorsHidden)this.extractTemplateStylesSelectors();return this.content.tsSelectorsHidden},getFloatingElements(){if(!this.content.floatingElements){const e=[".cd-floating",".tright",".floatright",".tleft",".floatleft",'*[style*="float:right"]','*[style*="float: right"]','*[style*="float:left"]','*[style*="float: left"]',...this.getTsFloatingElementSelectors()].join(", ");this.content.floatingElements=[...this.rootElement.querySelectorAll(e)].filter(e=>!e.classList.contains("cd-ignoreFloating"))}return this.content.floatingElements},getHiddenElements(){if(!this.hiddenElements){const e=this.getTsHiddenElementSelectors().join(", ");this.hiddenElements=e?[...this.rootElement.querySelectorAll(e)]:[]}return this.hiddenElements},areThereLtrRtlMixes(){var e,t;null!==(t=(e=this.content).areThereLtrRtlMixes)&&void 0!==t||(e.areThereLtrRtlMixes=Boolean(document.querySelector(".sitedir-ltr .mw-content-rtl, .sitedir-rtl .mw-content-ltr")));return this.content.areThereLtrRtlMixes},getPopupOverlay(){var e;null!==(e=this.$popupOverlay)&&void 0!==e||(this.$popupOverlay=$("<div>").addClass("cd-popupOverlay").appendTo(document.body));return this.$popupOverlay},addPreventUnloadCondition(e,t){this.beforeUnloadHandlers||(this.beforeUnloadHandlers={});this.beforeUnloadHandlers[e]=e=>{if(t()){e.preventDefault();e.returnValue="";return""}};$(window).on("beforeunload",this.beforeUnloadHandlers[e])},removePreventUnloadCondition(e){if(this.beforeUnloadHandlers[e]){$(window).off("beforeunload",this.beforeUnloadHandlers[e]);delete this.beforeUnloadHandlers[e]}},handleMouseMove(e){if(!(Z.a.is("scroll")||this.isAutoScrolling()||this.isPageOverlayOn()))c.a.highlightHovered(e)},handleWindowResize(){var e=this;return o()((function*(){yield Object(u.S)("vector-2022"===cd.a.g.skin?100:0);e.getContentColumnOffsets(!0);c.a.maybeRedrawLayers(!0);b.a.updateLines();N.updateWidth();r.a.adjustLabels();e.handleScroll()}))()},handleGlobalKeyDown(e){if(!this.isPageOverlayOn()){if(Object(u.K)(e,81,["cmd","alt"])||Object(u.K)(e,81)&&!Object(u.F)()){const t=r.a.getLastActive();if(t){e.preventDefault();t.quote(Object(u.B)(e))}else{const t=c.a.getSelectedComment();if(null!=t&&t.isActionable){e.preventDefault();t.reply()}}}if(w.a.isMounted()){if(Object(u.K)(e,82)&&!Object(u.F)())w.a.refreshClick();if(Object(u.K)(e,87)&&!Object(u.F)())w.a.goToPreviousNewComment();if(Object(u.K)(e,83)&&!Object(u.F)())w.a.goToNextNewComment();if(Object(u.K)(e,70)&&!Object(u.F)())w.a.goToFirstUnseenComment();if(Object(u.K)(e,67)&&!Object(u.F)()){e.preventDefault();w.a.goToNextCommentForm(!0)}}}},handleScroll(){if(!this.isAutoScrolling()){Z.a.add("scroll",()=>{if(!this.isAutoScrolling()){if(this.isPageActive()){c.a.registerSeen();w.a.updateCommentFormButton()}N.update();if(document.hasFocus())p.a.maybeUpdateVisibility()}},300);if(window.scrollX!==this.lastScrollX)$(document).trigger("horizontalscroll.cd");this.lastScrollX=window.scrollX}},handleHorizontalScroll(){N.updateWidth()},handlePopState(){let e=location.hash.slice(1);if(c.a.isAnyId(e)){var t,i;if(null!==(t=history.state)&&void 0!==t&&t.cdJumpedToComment)return;try{e=decodeURIComponent(e)}catch(e){console.error(e);return}null===(i=c.a.getByAnyId(e,!0))||void 0===i||i.scrollTo()}this.updatePageTitle()},handleSelectionChange(){Z.a.add("selectionChange",c.a.getSelectedComment.bind(c.a),200)},handlePageMutations(){if(this.booting)return;const e=this.getFloatingElements().map(u.s);c.a.maybeRedrawLayers(!1,!1,e);const t=()=>{b.a.updateLines(e);$(document).off("mousemove",t);this.isUpdateThreadLinesHandlerAttached=!1};if(!this.isUpdateThreadLinesHandlerAttached&&L.a.get("enableThreads")){$(document).on("mousemove",t);this.isUpdateThreadLinesHandlerAttached=!0}},handleAddTopicButtonClick(e){if(e.ctrlKey||e.shiftKey||e.metaKey)return;const t=$(e.currentTarget);let i,n=!1;if(t.is("a")){var o;const e=t.attr("href");let s;try{({query:s}=new mw.Uri(e))}catch(e){return}i={editIntro:Object(u.w)(s.editintro),commentTemplate:Object(u.w)(s.preload),headline:Object(u.w)(s.preloadtitle),summary:null===(o=Object(u.w)(s.summary))||void 0===o?void 0:o.replace(/^.+?\*\/ */,""),noHeadline:Boolean(Object(u.w)(s.nosummary)),omitSignature:Boolean(s.cdomitsignature)};n="0"===Object(u.w)(s.section)}else{const e=t.closest("form");i={editIntro:e.find('input[name="editintro"]').val(),commentTemplate:e.find('input[name="preload"]').val(),headline:e.find('input[name="preloadtitle"]').val(),summary:e.find('input[name="summary"]').val(),noHeadline:Boolean(e.find('input[name="nosummary"]').val()),omitSignature:!1}}e.preventDefault();r.a.createAddSectionForm(i,n)},isBooting(){return this.booting},isPageOverlayOn(){return document.body.classList.contains("oo-ui-windowManager-modal-active")||this.booting},showLoadingOverlay(){if(!1!==window.cdShowLoadingOverlay)if(!this.$loadingPopup){this.$loadingPopup=$("<div>").addClass("cd-loadingPopup").append($("<div>").addClass("cd-loadingPopup-logo").append($("<div>").addClass("cd-loadingPopup-logo-partBackground"),$("<img>").attr("src","data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADcAAAA3CAYAAACo29JGAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAAewQAAHsEBw2lUUwAAABl0RVh0U29mdHdhcmUAd3d3Lmlua3NjYXBlLm9yZ5vuPBoAAAK7SURBVGiB3Zq/axRBFMc/60VioQgW1yjEiwa0tdXiCkH9AwLaKCLY+Aek9CxUbGw9/wMbrYQgCIrEpEgUAimNmCAqapWAGL2wFrPr7R374739kZ3ZL7ziuHlv3mdndufN7MJQHaAPbAIDwK/ZBkEufeA4BXQB2LIAKMm2ghzV6lgOFgXsaOEeW5C41PpauE0LkpbahgbMw9y4LY1TjdoFJqSNPcwVcUmetOE+ZeA/wAqwhBnxvPoBvAY+FoghknS+vwNORPymgVWFf2h3gf1BDA+4Buwo/EuH+x3AjGsG+KtI7HlCDvfqhFtK8V9RJHY9IcaZKuCk99xOyn+aDtPiaNVlCJxYqkmn5bGYDk6iq0OfJSR6XxEjDi5qI6WaNOgyMBUJnveB0mN0rbqK7r7NggsBOxq4cAQXgQWK7Ry+Ai+BDzl8JXA+QamWN8G6TAq3oV3EXdLRJsO1pEXoe2C9ykyAi8ChsoNK5vmLsjsd02lMxV/mPecjDOgDZ6tj46kij1BdSVtp0E/AkQrAbipyqAzOB9YYXciL6gZmG2UFnA/8BG4x3Lbk0TS6qbhncKF9Ax4Cl4DDGTAecAozUvMUq27EcGUeM3wHvmBG1g+AJoE2ZiofKKmf8JihC7xKayg+bBGoHZg1cq1C2dU0dg3us6axa3DzmsYuwW0DDyK/J7McXIHbBmYxVVKoGYlj3vWmahtg3g08Iv793BtBDHFnPcmV2iNdQbjguwj2C0HekkX8DkO482VnKtQE5ij/MnBO45hGf1vR1kYTgzUGrhcDBnZ85VAILgkMzKO57oRzw6WBgTnFrTvhXHBZYGAWUxc+6xiBk4CFsv2DnP/WwuxsNXDrwBPMzroNHMSdGtV6zaGYli5KCuisJIBOKwvQeaUBNkJJgI1RHGCjNA7YOEUBG6k5gvKriXoLeP8AAFe0oEsY7eMAAAAASUVORK5CYII=")));$(document.body).append(this.$loadingPopup)}else this.$loadingPopup.show()},hideLoadingOverlay(){if(this.$loadingPopup&&!1!==window.cdShowLoadingOverlay)this.$loadingPopup.hide()},tryExecuteBootProcess(e){var t=this;return o()((function*(){t.booting=!0;try{yield t.bootProcess.execute(e);if(e)mw.hook("wikipage.content").fire(t.$content)}catch(e){mw.notify(cd.a.s("error-processpage"),{type:"error"});console.error(e);t.hideLoadingOverlay()}t.booting=!1}))()},getBootProcess(){return this.bootProcess},loadToTalkPage(){if(!this.talkPage)return;v.a.stopTimer("start");v.a.startTimer("loading data");this.bootProcess=new Y;if("ready"===mw.loader.getState("mediawiki.api"))y.a.getSiteData();const e=["jquery.client","jquery.ui","mediawiki.Title","mediawiki.Uri","mediawiki.api","mediawiki.cookie","mediawiki.interface.helpers.styles","mediawiki.jqueryMsg","mediawiki.notification","mediawiki.storage","mediawiki.user","mediawiki.util","mediawiki.widgets.visibleLengthLimit","oojs","oojs-ui-core","oojs-ui-widgets","oojs-ui-windows","oojs-ui.styles.icons-alerts","oojs-ui.styles.icons-content","oojs-ui.styles.icons-editing-advanced","oojs-ui.styles.icons-editing-core","oojs-ui.styles.icons-interactions","oojs-ui.styles.icons-movement","user.options"];let t;if(e.every(e=>"ready"===mw.loader.getState(e))){if(y.a.getSiteDataRequests().every(e=>"resolved"===e.state()))this.bootProcess.passData("scrollY",window.scrollY)}else t=mw.loader.using(e);this.showLoadingOverlay();Promise.all([t,...y.a.getSiteDataRequests()]).then(()=>{this.tryExecuteBootProcess()},e=>{mw.notify(cd.a.s("error-loaddata"),{type:"error"});console.error(e);this.hideLoadingOverlay()});Object(u.S)(15e3).then(()=>{if(this.booting){this.hideLoadingOverlay();console.warn("The loading overlay stays for more than 15 seconds; removing it.")}});this.$contentColumn=Object(u.R)({timeless:"#mw-content",minerva:"#bodyContent",default:"#content"});y.a.memorizeCssValues();y.a.addTalkPageCss()},reload(e={}){var t=this;return o()((function*(){var i,n;if(t.booting)return;const o=new Y(e);c.a.getAll().forEach(e=>{var t;null===(t=e.$animatedBackground)||void 0===t||t.add(e.$marker).stop(!0,!0)});if(o.data("isPageReloadedExternally"))c.a.resetLayers();if(t.isCurrentRevision())r.a.saveSession();if(!o.data("commentIds")&&!o.data("sectionId"))t.saveScrollPosition();K.a.close(null!==(i=o.data("closeNotificationsSmoothly"))&&void 0!==i?i:!0);v.a.init();v.a.startTimer("total time");v.a.startTimer("getting HTML");t.showLoadingOverlay();Object(A.j)().catch(e=>{console.warn(e)});let s;try{s=yield P.b.getCurrent().parse(null,!1,!0)}catch(e){t.hideLoadingOverlay();if(o.data("wasCommentFormSubmitted"))throw e;else{mw.notify(cd.a.s("error-reloadpage"),{type:"error"});console.warn(e);return}}o.passData("html",s.text);o.passData("toc",s.sections);o.passData("hideToc",s.hidetoc);mw.config.set({wgRevisionId:s.revid,wgCurRevisionId:s.revid});mw.loader.load(s.modules);mw.loader.load(s.modulestyles);mw.config.set(s.jsconfigvars);const a=c.a.getAll().filter(e=>!1===e.isSeen).map(e=>e.id);o.passData("unseenCommentIds",a);t.bootProcess=o;r.a.detach();$(".cd-commentForm-addSection").remove();W.a.reset();t.reset();null===(n=t.$addSectionButtonContainer)||void 0===n||n.remove();c.a.resetLayers();v.a.stopTimer("getting HTML");yield t.tryExecuteBootProcess(!0);C.a.maybeHide();if(!t.bootProcess.data("commentIds")&&!t.bootProcess.data("sectionId"))t.restoreScrollPosition(!1)}))()},handleWikipageContentHookFirings(e){if(!e.is("#mw-content-text"))return;const t=e.children(".mw-parser-output");if(t.length&&!t.hasClass("cd-parse-started"))this.reload({isPageReloadedExternally:!0})},cleanUpDom(e){if(e.diff||e.oldid){this.$content.children(".mw-revslider-container, .ve-init-mw-diffPage-diffMode, .diff, .oo-ui-element-hidden, .diff-hr, .diff-currentversion-title").remove();$(".mw-revision").remove();$("#firstHeading").text(P.b.getCurrent().name);document.title=cd.a.mws("pagetitle",P.b.getCurrent().name);this.originalPageTitle=document.title}},cleanUpUrl(e){const t=Object.assign({},e);delete t.title;delete t.curid;delete t.action;delete t.redlink;delete t.section;delete t.cdaddtopic;delete t.dtnewcommentssince;delete t.dtinthread;let i;if(t.diff||t.oldid){i="pushState";delete t.diff;delete t.oldid;delete t.diffmode;delete t.type;$(window).on("popstate",()=>{const{query:e}=new mw.Uri;if(e.diff||e.oldid)location.reload()});this.diffPage=!1}else if(!this.bootProcess.data("pushState"))i="replaceState";if(i)history[i](history.state,"",P.b.getCurrent().getUrl(t))},cleanUpUrlAndDom(){const{query:e}=new mw.Uri;this.cleanUpDom(e);this.cleanUpUrl(e)},loadToCommentLinksPage(){if(this.isWatchlistPage()||this.isContributionsPage()||this.isHistoryPage()||this.diffPage&&this.articlePageTalkPage||this.talkPage){if("ready"===mw.loader.getState("mediawiki.api")){y.a.getSiteData();if(!this.talkPage)Object(A.j)(!0).catch(e=>{console.warn(e)})}mw.loader.using(["jquery.client","mediawiki.Title","mediawiki.api","mediawiki.jqueryMsg","mediawiki.user","mediawiki.util","oojs","oojs-ui-core","oojs-ui-widgets","oojs-ui-windows","oojs-ui.styles.icons-alerts","oojs-ui.styles.icons-editing-list","oojs-ui.styles.icons-interactions","user.options"]).then(()=>{Object(G.b)();i(43);i(79)},e=>{mw.notify(cd.a.s("error-loaddata"),{type:"error"});console.error(e)})}},cleanUpPasteDom(e){e.className="cd-hidden";this.rootElement.appendChild(e);[...e.querySelectorAll("[style]")].forEach(e=>{e.removeAttribute("style")});const t=e=>e.remove(),i=e=>{if(["DIV","H1","H2","H3","H4","H5","H6","DD"].includes(e.tagName)&&e.nextElementSibling)e.after("\n");e.replaceWith(...e.childNodes)};[...e.querySelectorAll("*")].filter(e=>"none"===window.getComputedStyle(e).userSelect).forEach(t);[...e.querySelectorAll("*")].filter(e=>(!["BR","HR"].includes(e.tagName)||e.classList.contains("Apple-interchange-newline"))&&!e.textContent.replace(/[ \n]+/g,"")).forEach(t);[...e.querySelectorAll("style")].forEach(t);const n=new g({childElementsProp:"children"}).getTopElementsWithText(e,!0).nodes;if(n[0]!==e){e.innerHTML="";e.append(...n)}[...e.querySelectorAll("div, span, h1, h2, h3, h4, h5, h6")].forEach(i);[...e.querySelectorAll("p > br")].forEach(e=>{e.after("\n");e.remove()});const o=cd.a.g.allowedTags.concat("a","center","big","strike","tt");[...e.querySelectorAll("*")].forEach(e=>{if(o.includes(e.tagName.toLowerCase()))[...e.attributes].filter(e=>"class"===e.name||/^data-/.test(e.name)).forEach(t=>{e.removeAttribute(t.name)});else i(e)});[...e.children].filter(e=>"DD"===e.tagName).forEach(i);const s=[...e.querySelectorAll("*")],a=Boolean(e.childElementCount&&!(1===s.length&&1===e.childNodes.length&&["P","LI","DD"].includes(e.childNodes[0].tagName)));e.remove();return{needParse:a,text:a?e.innerHTML:e.innerText}},getWikitextFromSelection(e){var t=this;return o()((function*(){const i=document.createElement("div");i.appendChild(window.getSelection().getRangeAt(0).cloneContents());const{text:n,needParse:o}=t.cleanUpPasteDom(i);return o?yield Object(A.n)(n,e):n}))()},isConvertableToWikitext(e){return this.cleanUpPasteDom(this.pasteHtmlToElement(e)).needParse},pasteHtmlToElement(e){const t=document.createElement("div");t.innerHTML=e.replace(/^[^]*<!-- *StartFragment *-->/,"").replace(/<!-- *EndFragment *-->[^]*$/,"");return t},getWikitextFromPaste(e,t){var i=this;return o()((function*(){const{text:n,needParse:o}=i.cleanUpPasteDom(i.pasteHtmlToElement(e));return o?yield Object(A.n)(n,t):n}))()},changeElementType(e,t){const i=document.createElement(t);for(;e.firstChild;)i.appendChild(e.firstChild);[...e.attributes].forEach(e=>{i.setAttribute(e.name,e.value)});let n=e.getAttribute("data-cd-comment-index");if(null!==n)c.a.getAll()[Number(n)].replaceElement(e,i);else e.parentNode.replaceChild(i,e);this.replaceScrollAnchorElement(e,i);return i},isLongPage(){var e,t;null!==(t=(e=this.content).longPage)&&void 0!==t||(e.longPage=$(document).height()>15e3);return this.content.longPage},getRangeContents(e,t){if(e.compareDocumentPosition(t)&Node.DOCUMENT_POSITION_PRECEDING)return;let i;for(let n=e;n;n=n.parentNode)if(n.contains(t)){i=n;break}const n=[e];if(!e.contains(t)){const o=new d.b(e,this.rootElement);for(;o.currentNode.parentNode!==i;){for(;o.nextSibling();)n.push(o.currentNode);o.parentNode()}o.nextSibling();for(;!o.currentNode.contains(t);){n.push(o.currentNode);o.nextSibling()}for(;t.parentNode.lastChild===t&&o.currentNode.contains(t.parentNode);)t=t.parentNode;for(;o.currentNode!==t;){o.firstChild();for(;!o.currentNode.contains(t);){n.push(o.currentNode);o.nextSibling()}}n.push(t)}return n},getRootElement(){return this.rootElement},showSettingsDialog(e){if($(".cd-dialog-settings").length)return;const t=new(0,i(81).default)(e);this.getWindowManager("settings").addWindows([t]);this.getWindowManager("settings").openWindow(t);cd.a.tests.settingsDialog=t},showEditSubscriptionsDialog(){if(this.isPageOverlayOn())return;const e=new(0,i(82).default);this.getWindowManager().addWindows([e]);this.getWindowManager().openWindow(e)},showCopyLinkDialog(e,t){const n=e.getWikilinkFragment(),o=mw.config.get("wgFormattedNamespaces")[-1]+":"+cd.a.g.specialPageAliases.PermanentLink+"/"+mw.config.get("wgRevisionId"),s={fragment:n,wikilink:`[[${P.b.getCurrent().name}#${n}]]`,currentPageWikilink:`[[#${n}]]`,permanentWikilink:`[[${o}#${n}]]`,link:e.getUrl(),permanentLink:e.getUrl(!0),copyMessages:{success:cd.a.s("copylink-copied"),fail:cd.a.s("copylink-error")}},r=e instanceof a.a?L.a.get("defaultCommentLinkType"):L.a.get("defaultSectionLinkType");if(!t.shiftKey&&r){switch(r){case"wikilink":Object(u.e)(s.wikilink,s.copyMessages);break;case"link":Object(u.e)(s.link,s.copyMessages)}return}const c=new(0,i(83).default)(e,s);this.getWindowManager().addWindows([c]);this.getWindowManager().openWindow(c)},scrollToY(e,t=!0,i){const n=()=>{this.toggleAutoScrolling(!1);this.handleScroll();if(i)i()};if(t)$("body, html").animate({scrollTop:e},{complete:function(){if(this===document.documentElement)n()}});else{window.scrollTo(window.scrollX,e);n()}},setupMutationObserver(){var e=this;return o()((function*(){yield Object(u.S)();e.mutationObserver=new MutationObserver(t=>{const i=/^cd-comment(-underlay|-overlay|Layers)/;if(!t.every(e=>i.test(e.target.className)))e.handlePageMutations()});e.mutationObserver.observe(e.$content.get(0),{attributes:!0,childList:!0,subtree:!0})}))()},showRegularNotification(e){let t=[];if("all"===L.a.get("notifications"))t=e;else if("toMe"===L.a.get("notifications"))t=e.filter(e=>e.isToMe);if("none"!==L.a.get("notifications")&&t.length){const e=K.a.get().find(e=>e.comments&&e.notification.isOpen);if(e)t.push(...e.comments)}if(t.length){let e;const i=r.a.getAll().some(e=>e.isAltered())?" "+cd.a.mws("parentheses",cd.a.s("notification-formdata")):"",n=cd.a.sParse("notification-reload",i);if(1===t.length){const i=t[0];if(i.isToMe){const t=i.sectionSubscribedTo?cd.a.mws("word-separator")+cd.a.s("notification-part-insection",i.sectionSubscribedTo.headline):cd.a.mws("word-separator")+cd.a.s("notification-part-onthispage");e=cd.a.sParse("notification-toyou",i.author.getName(),i.author,t)+" "+n}else e=cd.a.sParse("notification-insection",i.author.getName(),i.author,i.sectionSubscribedTo.headline)+" "+n}else{const i=t.every(e=>e.sectionSubscribedTo===t[0].sectionSubscribedTo)?t[0].sectionSubscribedTo:void 0,o=cd.a.mws("word-separator")+(i?cd.a.s("notification-part-insection",i.headline):cd.a.s("notification-part-onthispage"));let s=cd.a.s("notification-newcomments-mayberelevant");if(!s.startsWith(cd.a.mws("comma-separator")))s=cd.a.mws("word-separator")+s;const a=i?"":s;e=cd.a.sParse("notification-newcomments",t.length,o,a)+" "+n}const o=Object(u.Z)(e);K.a.add(o,{tag:"convenient-discussions-new-comments"},{comments:t}).$notification.on("click",()=>{this.reload({commentIds:t.map(e=>e.id)})})}},showDesktopNotification(e){let t,i=[];if("all"===L.a.get("desktopNotifications"))i=e;else if("toMe"===L.a.get("desktopNotifications"))i=e.filter(e=>e.isToMe);if("undefined"==typeof Notification||"granted"!==Notification.permission||!i.length||document.hasFocus())return;const n=i[0],o=P.b.getCurrent().name;if(1===i.length)if(n.isToMe){var s;const e=null!==(s=n.section)&&void 0!==s&&s.headline?cd.a.mws("word-separator")+cd.a.s("notification-part-insection",n.section.headline):"";t=cd.a.s("notification-toyou-desktop",n.author.getName(),n.author,e,o)}else t=cd.a.s("notification-insection-desktop",n.author.getName(),n.author,n.section.headline,o);else{let e;if(i.every(e=>e.sectionSubscribedTo===i[0].sectionSubscribedTo))e=i[0].sectionSubscribedTo;const n=e?cd.a.mws("word-separator")+cd.a.s("notification-part-insection",e.headline):"";let s=cd.a.s("notification-newcomments-mayberelevant");if(!s.startsWith(cd.a.mws("comma-separator")))s=cd.a.mws("word-separator")+s;const a=e?"":s;t=cd.a.s("notification-newcomments-desktop",i.length,n,o,a)}new Notification(mw.config.get("wgSiteName"),{body:t,tag:"convenient-discussions-"+i[i.length-1].id}).onclick=()=>{parent.focus();window.focus();c.a.maybeRedrawLayers(!1,!0);this.reload({commentIds:[n.id],closeNotificationsSmoothly:!1})}},updateAddedComments(e,t){this.addedCommentCount=e.length;this.areRelevantCommentsAdded=Boolean(t.length);if(t.length)this.relevantAddedCommentIds=t.map(e=>e.id);else if(e.length)this.relevantAddedCommentIds=e.map(e=>e.id);const i=c.a.groupBySection(e);w.a.updateRefreshButton(this.addedCommentCount,i,this.areRelevantCommentsAdded);this.updatePageTitle();C.a.addNewComments(i);c.a.addNewCommentsNotes(e);const n=t.filter(e=>!this.commentsNotifiedAbout.some(t=>t.id===e.id));this.showRegularNotification(n);this.showDesktopNotification(n);this.commentsNotifiedAbout.push(...n)},updatePageTitle(){let e=this.originalPageTitle;const t=r.a.getLastActive();if(t){let i=r.a.modeToProperty(t.getMode()).toLowerCase();e=cd.a.s("page-title-"+i,e)}if(0===this.addedCommentCount)document.title="";const i=this.areRelevantCommentsAdded?"*":"";this.newCommentsTitleMark=this.addedCommentCount?`(${this.addedCommentCount}${i}) `:"";document.title=e.replace(/^(?:\(\d+\*?\) )?/,this.newCommentsTitleMark)},getRelevantAddedCommentIds(){return this.relevantAddedCommentIds}}},function(e,t,i){"use strict";var n=i(4),o=i.n(n),s=i(0),a=i(8),r=i(12),c=i(1),l=i(14),d=i(7);t.a={scheme:{local:["insertButtons-altered","insertButtons","signaturePrefix"],undocumented:{defaultCommentLinkType:null,defaultSectionLinkType:null,showLoadingOverlay:!0},aliases:{"insertButtons-altered":["haveInsertButtonsBeenAltered"],"improvePerformance-lastSuggested":["improvePerformanceLastSuggested"],subscribeOnReply:["watchSectionOnReply"],"useTopicSubscription-seenNotice":["topicSubscriptionSeenNotice"]},states:["insertButtons-altered","improvePerformance-lastSuggested","notificationsBlacklist","useTopicSubscription-seenNotice"],resetsTo:{reformatComments:!1}},setDefaults(){this.scheme.default={allowEditOthersComments:!1,alwaysExpandAdvanced:!1,autocompleteTypes:["mentions","commentLinks","wikilinks","templates","tags"],autopreview:!0,collapseThreadsLevel:10,desktopNotifications:"unknown",enableThreads:!0,hideTimezone:!1,highlightNewInterval:15,improvePerformance:!1,"improvePerformance-lastSuggested":null,insertButtons:s.a.config.defaultInsertButtons||[],"insertButtons-altered":!1,modifyToc:!0,notifications:"all",notifyCollapsedThreads:!1,notificationsBlacklist:[],outdentLevel:15,reformatComments:null,showContribsLink:!1,showToolbar:!0,signaturePrefix:s.a.config.defaultSignaturePrefix,subscribeOnReply:!0,timestampFormat:"default",useBackgroundHighlighting:!0,useTemplateData:!0,useTopicSubscription:Boolean(mw.loader.getState("ext.discussionTools.init")),"useTopicSubscription-seenNotice":!1,useUiTime:!0,watchOnReply:!mw.loader.getState("ext.discussionTools.init")}},initUi(){const e=s.a.config.outdentTemplates.length?a.b.get("Template:"+s.a.config.outdentTemplates[0]).getUrl():"https://en.wikipedia.org/wiki/Template:Outdent",t=s.a.config.outdentTemplates.length?"":" "+s.a.sParse("sd-outdentlevel-help-notemplate"),i=new Date(Date.now()-43*s.a.g.msInMin),n=new Date(Date.now()-3.3*s.a.g.msInDay),o=Object(l.d)(i),r=Object(l.c)(i),d=Object(l.c)(n),u=Object(l.e)(i),m=Object(l.e)(n);this.scheme.ui=[{name:"talkPage",label:s.a.s("sd-page-talkpage"),controls:[{name:"reformatComments",type:"checkbox",label:s.a.s("sd-reformatcomments")},{name:"showContribsLink",type:"checkbox",label:s.a.s("sd-showcontribslink"),classes:["cd-setting-indented"]},{name:"allowEditOthersComments",type:"checkbox",label:s.a.s("sd-alloweditotherscomments")},{name:"enableThreads",type:"checkbox",label:s.a.s("sd-enablethreads")},{name:"collapseThreadsLevel",type:"number",min:0,max:999,label:s.a.s("sd-collapsethreadslevel"),help:s.a.s("sd-collapsethreadslevel-help"),classes:["cd-setting-indented"]},{name:"modifyToc",type:"checkbox",label:s.a.s("sd-modifytoc")},{name:"useBackgroundHighlighting",type:"checkbox",label:s.a.s("sd-usebackgroundhighlighting")},{name:"highlightNewInterval",type:"number",min:0,max:99999999,buttonStep:5,label:s.a.s("sd-highlightnewinterval"),help:s.a.s("sd-highlightnewinterval-help")},{name:"improvePerformance",type:"checkbox",label:s.a.s("sd-improveperformance"),help:s.a.s("sd-improveperformance-help")}]},{name:"commentForm",label:s.a.s("sd-page-commentform"),controls:[{name:"autopreview",type:"checkbox",label:s.a.s("sd-autopreview")},{name:"watchOnReply",type:"checkbox",label:s.a.s("sd-watchonreply",mw.user)},{name:"subscribeOnReply",type:"checkbox",label:s.a.s("sd-watchsectiononreply",mw.user),help:s.a.s("sd-watchsectiononreply-help")},{name:"showToolbar",type:"checkbox",label:s.a.s("sd-showtoolbar")},{name:"alwaysExpandAdvanced",type:"checkbox",label:s.a.s("sd-alwaysexpandadvanced")},{name:"outdentLevel",type:"number",min:0,max:999,label:Object(c.Z)(s.a.sParse("sd-outdentlevel",e),{targetBlank:!0}),help:Object(c.Z)(s.a.sParse("sd-outdentlevel-help")+t)},{name:"autocompleteTypes",type:"multicheckbox",label:s.a.s("sd-autocompletetypes"),options:[{data:"mentions",label:s.a.s("sd-autocompletetypes-mentions")},{data:"commentLinks",label:s.a.s("sd-autocompletetypes-commentlinks")},{data:"wikilinks",label:s.a.s("sd-autocompletetypes-wikilinks")},{data:"templates",label:s.a.s("sd-autocompletetypes-templates")},{data:"tags",label:s.a.s("sd-autocompletetypes-tags")}],classes:["cd-autocompleteTypesMultiselect"]},{name:"useTemplateData",type:"checkbox",label:s.a.s("sd-usetemplatedata"),help:s.a.s("sd-usetemplatedata-help")},{name:"insertButtons",type:"multitag",placeholder:s.a.s("sd-insertbuttons-multiselect-placeholder"),tagLimit:100,label:s.a.s("sd-insertbuttons"),help:Object(c.Z)(s.a.sParse("sd-insertbuttons-help")+" "+s.a.sParse("sd-localsetting")),dataToUi:e=>e.map(e=>Array.isArray(e)?e.join(";"):e),uiToData:e=>e.map(e=>{var t;const i=[];e=Object(c.z)(e,/\\[+;\\]/g,i);let[,n,o]=e.match(/^(.*?)(?:;(.+))?$/)||[];if(null!==(t=n)&&void 0!==t&&t.replace(/^ +$/,"")){n=Object(c.X)(n,i);o&&(o=Object(c.X)(o,i));return[n,o].filter(c.i)}}).filter(c.i)},{name:"signaturePrefix",type:"text",maxLength:100,label:s.a.s("sd-signatureprefix"),help:Object(c.Z)(s.a.sParse("sd-signatureprefix-help")+" "+s.a.sParse("sd-localsetting"))}]},{name:"timestamps",label:s.a.s("sd-page-timestamps"),controls:[{name:"useUiTime",type:"checkbox",label:s.a.s("sd-useuitime")},{name:"hideTimezone",type:"checkbox",label:s.a.s("sd-hidetimezone")},{name:"timestampFormat",type:"radio",label:s.a.s("sd-timestampformat"),options:[{data:"default",label:s.a.s("sd-timestampformat-radio-default",o)},{data:"improved",label:s.a.s("sd-timestampformat-radio-improved",r,d)},{data:"relative",label:s.a.s("sd-timestampformat-radio-relative",u,m)}],help:s.a.s("sd-timestampformat-help")}]},{name:"notifications",label:s.a.s("sd-page-notifications"),controls:[{name:"useTopicSubscription",type:"checkbox",label:Object(c.Z)(s.a.sParse("sd-usetopicsubscription",mw.user),{targetBlank:!0}),help:Object(c.Z)(s.a.sParse("sd-usetopicsubscription-help"),{targetBlank:!0})},{name:"notifications",type:"radio",label:s.a.s("sd-notifications"),options:[{data:"all",label:s.a.s("sd-notifications-radio-all",mw.user)},{data:"toMe",label:s.a.s("sd-notifications-radio-tome")},{data:"none",label:s.a.s("sd-notifications-radio-none")}],help:s.a.s("sd-notifications-help")},{name:"desktopNotifications",type:"radio",label:s.a.s("sd-desktopnotifications"),options:[{data:"all",label:s.a.s("sd-desktopnotifications-radio-all",mw.user)},{data:"toMe",label:s.a.s("sd-desktopnotifications-radio-tome")},{data:"none",label:s.a.s("sd-desktopnotifications-radio-none")}],help:s.a.s("sd-desktopnotifications-help",location.hostname)},{name:"notifyCollapsedThreads",type:"checkbox",label:s.a.s("sd-notifycollapsedthreads")}]},{name:"dataRemoval",label:s.a.s("sd-page-dataremoval"),controls:[{name:"removeData",type:"button",label:s.a.s("sd-removedata"),flags:["destructive"],fieldLabel:s.a.s("sd-removedata-description"),help:Object(c.Z)(s.a.sParse("sd-removedata-help"),{targetBlank:!0})}]}]},actuallyInit(){var e=this;return o()((function*(){e.setDefaults();const t={[s.a.g.settingsOptionName]:mw.user.options.get(s.a.g.settingsOptionName),[s.a.g.localSettingsOptionName]:mw.user.options.get(s.a.g.localSettingsOptionName)},i=yield e.load({options:t,omitLocal:!0});e.set(Object.assign({},e.scheme.default,e.getSettingPropertiesOfObject(window,"cd"),i));if(!e.values["insertButtons-altered"]&&JSON.stringify(e.values.insertButtons)!==JSON.stringify(s.a.config.defaultInsertButtons))e.values.insertButtons=s.a.config.defaultInsertButtons;if(!Object(c.b)(e.values,i))e.save().catch(e=>{console.warn("Couldn't save the settings to the server.",e)});e.set(Object.assign({},e.scheme.undocumented,e.getSettingPropertiesOfObject(window,"cd",e.scheme.undocumented),e.getLocalOverrides()))}))()},init(){this.initPromise||(this.initPromise=this.actuallyInit());return this.initPromise},load({options:e,omitLocal:t=!1,reuse:i=!1}={}){var n=this;return o()((function*(){var o;if(null===(o=e)||void 0===o||!o[s.a.g.settingsOptionName])({options:e}=yield Object(d.j)(i));let a,r;try{a=JSON.parse(e[s.a.g.settingsOptionName])||{}}catch(e){a={}}try{r=JSON.parse(e[s.a.g.localSettingsOptionName])||{}}catch(e){r={}}return Object.assign({},n.getSettingPropertiesOfObject(a),n.getSettingPropertiesOfObject(r),t?n.getLocalOverrides():{})}))()},getSettingPropertiesOfObject(e,t,i=this.scheme.default){return Object.keys(i).reduce((n,o)=>{(this.scheme.aliases[o]||[]).concat(o).map(e=>t?t+Object(c.V)(e):e).filter(t=>void 0!==e[t]&&(typeof e[t]==typeof i[o]||null===i[o])).forEach(t=>{n[o]=e[t]});return n},{})},getLocalOverrides(){return this.getSettingPropertiesOfObject(window,"cdLocal")},set(e,t){this.values||(this.values={});const i="string"==typeof e?{[e]:t}:e;Object.assign(this.values,i)},get(e){var t;return e?null!==(t=this.values[e])&&void 0!==t?t:null:this.values},save(e=this.values){var t=this;return o()((function*(){if(r.a.getCurrent().isRegistered())if(s.a.config.useGlobalPreferences){const i={},n={};Object.keys(e).forEach(o=>{if(t.scheme.local.includes(o))n[o]=e[o];else i[o]=e[o]});yield Promise.all([Object(d.t)(s.a.g.localSettingsOptionName,JSON.stringify(n)),Object(d.r)(s.a.g.settingsOptionName,JSON.stringify(i))])}else yield Object(d.t)(s.a.g.localSettingsOptionName,JSON.stringify(e))}))()},saveSettingOnTheFly(e,t){var i=this;return o()((function*(){i.set(e,t);const n=yield i.load();n[e]=t;return i.save(n)}))()}}},function(e,t){function i(e,t,i,n,o,s,a){try{var r=e[s](a),c=r.value}catch(e){i(e);return}if(r.done)t(c);else Promise.resolve(c).then(n,o)}e.exports=function(e){return function(){var t=this,n=arguments;return new Promise((function(o,s){var a=e.apply(t,n);function r(e){i(a,o,s,r,c,"next",e)}function c(e){i(a,o,s,r,c,"throw",e)}r(void 0)}))}},e.exports.__esModule=!0,e.exports.default=e.exports},function(e,t,i){"use strict";var n=i(4),o=i.n(n),s=i(22),a=i(32),r=i(9),c=i(0),l=i(2),d=i(17),u=i(3),m=i(20),h=i(1),g=i(7);const f=new RegExp("^c-(?:(.+?)-(?:(\\d{4})(\\d{2})(\\d{2})(\\d{2})(\\d{2})\\d{2}|(\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}.\\d{3}Z)))(?:-(?:(.+?)-(?:(\\d{4})(\\d{2})(\\d{2})(\\d{2})(\\d{2})\\d{2}|(\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}.\\d{3}Z))|(.+?))(?:-(\\d+))?)?$");let p,b;function v(e,t,i){if(i.includes(e.index))t.push(e);e.children.forEach(e=>{v(e,t,i)})}function y(e,t,i,n){if(!t.length)return;let o;if(e instanceof s.a){o=[];t.forEach(e=>{v(e,o,n)})}else o=t;const a=o.map(e=>e.author).filter(h.Y),r=new OO.ui.ButtonWidget({label:c.a.s("thread"===i?"thread-newcomments":"section-newcomments",o.length,a.length,a.map(e=>e.getName()).join(c.a.mws("comma-separator")),Object(h.p)(a)),framed:!1,classes:["cd-button-ooui"]});r.on("click",()=>{l.a.reload({commentIds:o.map(e=>e.id),pushState:!0})});if(e instanceof s.a){var d;r.$element.addClass("cd-thread-button");const{$wrappingItem:t}=e.addSubitem("newCommentsNote","bottom");t.addClass("cd-thread-button-container cd-thread-newCommentsNote").append(r.$element);if(null!==(d=e.thread)&&void 0!==d&&d.isCollapsed){e.thread.expand();e.thread.collapse(null,!0)}}else if("thread"===i&&e.$replyButtonWrapper){r.$element.addClass("cd-thread-button");const t="DL"===e.$replyButtonContainer.prop("tagName")?"dd":"li";$(`<${t}>`).addClass("cd-thread-button-container cd-thread-newCommentsNote").append(r.$element).insertBefore(e.$replyButtonWrapper)}else{r.$element.addClass("cd-section-button");("section"===i?$("<div>").append(r.$element):$("<dl>").append($("<dd>").append(r.$element))).addClass("cd-section-button-container cd-thread-newCommentsNote").insertAfter(e.$addSubsectionButtonContainer&&!e.getChildren().length?e.$addSubsectionButtonContainer:e.$replyButtonContainer||e.lastElementInFirstChunk)}}const w={items:[],underlays:[],layersContainers:[],add(e){this.items.push(e)},getAll(){return this.items},getByIndex(e){if(e<0)e=this.items.length+e;return this.items[e]||null},getCount(){return this.items.length},reset(){this.items=[]},configureAndAddLayers(e){const t=e.length?l.a.getFloatingElements().map(h.s):void 0;e.forEach(e=>{e.configureLayers({add:!1,update:!1,floatingRects:t})});e.forEach(e=>{e.addLayers()})},maybeRedrawLayers(e=!1,t=!1,i){if(l.a.isBooting()||document.hidden&&!t)return;this.layersContainers.forEach(e=>{e.convenientDiscussionsCouldHaveMoved=!0});const n=[],o=l.a.$root.get(0).getBoundingClientRect().bottom+window.scrollY;let s=0;this.items.slice().reverse().some(a=>{const r=!a.isCollapsed&&!a.editForm&&(a.isNew||a.isOwn||a.isTarget||a.isHovered||a.isDeleted||a.isLineGapped),c=a.offset&&a.offset.bottom>o;if(a.underlay&&!r&&(e||c))a.removeLayers();else if(r){i||(i=l.a.getFloatingElements().map(h.s));const e=a.configureLayers({add:!0,update:!1,floatingRects:i});if(e||t){s=0;n.push(a)}else if(null===e)a.removeLayers();else if(!a.getLayersContainer().convenientDiscussionsIsTopLayersContainer){s++;if(3===s)return!0}}return!1});n.forEach(e=>{e.updateLayersOffset()})},resetLayers(){this.underlays=[];this.layersContainers.forEach(e=>{e.innerHTML=""})},registerSeen(){if(document.hidden)return;const e=this.findInViewport();if(!e)return;const t=e=>{const t=e.isInViewport();if(t){e.registerSeen();return!1}else if(!1===t)return!0};this.items.slice(0,e.index).reverse().some(t);this.items.slice(e.index).some(t);d.a.updateFirstUnseenButton()},groupBySection:e=>e.reduce((e,t)=>{if(!e.get(t.section))e.set(t.section,[]);e.get(t.section).push(t);return e},new Map),findInViewport(e){this.items.forEach(e=>{delete e.roughOffset});const t=window.scrollY+c.a.g.bodyScrollPaddingTop,i=window.scrollY+window.innerHeight,n=e=>{e.getOffset({set:!0});return Boolean(e.roughOffset)},o=(e,t=0,i)=>{let o=Object(h.P)(this.getAll(),t,"backward"===e);if(void 0!==i)o=o.filter(n=>"forward"===e?n.index<i&&n.index>=t:n.index>i&&n.index<=t);return o.find(n)||null},s=o("forward"),a=o("backward",this.items.length-1);if(!s)return null;let r,l={top:s,bottom:a},d=l.top;const u=(e,t,i=!1)=>{if(e){const n=("forward"===e?i:!i)?t.top.index:t.bottom.index;return o(e,n)}return null};for(let n=0;n<this.items.length;n++){if(!d.roughOffset){d.getOffset({set:!0});if(!d.roughOffset){d=o("forward",d.index,l.bottom.index)||o("backward",d.index,l.top.index);if(!d){r=u(e,l);break}}}if(d.isInViewport(!1)){r=d;break}if(d.roughOffset&&(d===s&&i<d.roughOffset.downplayedBottom||d===a&&t>d.roughOffset.top)){r=u(e,l,!0);break}if(l.top===l.bottom){r=u(e,l);break}if(d===s)d=l.bottom;else{l[t>d.roughOffset.top?"top":"bottom"]=d;if(l.bottom.index-l.top.index<=1){r=u(e,l);break}const n=l.top.roughOffset.top,o=(t-n)/(l.bottom.roughOffset.downplayedBottom-i+(t-n));if(o<0||o>=1)console.warn("The proportion shouldn't be less than 0 or greater or equal to 1.","proportion",o,"searchArea",l);const s=Math.round((l.bottom.index-l.top.index-1)*o+l.top.index+.5);d=this.items[s]}}return r||null},highlightHovered(e){var t,i,n,o;if(void 0===p){p=document.querySelector(".mw-notification-area");b=document.getElementById("vector-toc-collapsed-button")}const s=[...(null===(t=p)||void 0===t?void 0:t.querySelectorAll(".mw-notification"))||[],l.a.getActiveAutocompleteMenu(),null===(i=d.a.$element)||void 0===i?void 0:i.get(0),null===(n=l.a.getPopupOverlay())||void 0===n?void 0:n.get(0).querySelector(".oo-ui-popupWidget:not(.oo-ui-element-hidden)"),l.a.getStickyHeader(),null===(o=r.a.getAll().map(e=>{var t;return null===(t=e.actions.moreMenuSelect)||void 0===t?void 0:t.getMenu()}).find(e=>null==e?void 0:e.isVisible()))||void 0===o?void 0:o.$element.get(0),b].filter(h.j).some(e=>e.matches(":hover"))||$(document.body).children(".ui-widget-overlay").length;this.items.filter(e=>e.underlay).forEach(t=>{const i=t.layersOffset,n=t.getLayersContainerOffset();if(i&&n)if(!s&&e.pageY>=i.top+n.top&&e.pageY<=i.top+i.height+n.top&&e.pageX>=i.left+n.left&&e.pageX<=i.left+i.width+n.left)t.highlightHovered();else t.unhighlightHovered();else t.removeLayers()})},getById(e,t=!1){if(!this.items.length||!e)return null;const i=e=>this.items.find(t=>t.id===e);let n=i(e);if(!n&&t){const{date:t,author:o}=this.parseId(e)||{};for(let e=1;!n&&e<=3;e++)n=i(this.generateId(new Date(t.getTime()-c.a.g.msInMin*e),o))}return n||null},getByDtId(e,t=!1){const i=this.parseDtId(e);if(!i)return null;let n,o=this.items.filter(e=>e.date&&e.date.getTime()===i.date.getTime()&&e.author.getName()===i.author);if(1===o.length)n=o[0];else if(o.length>1){o=o.filter(e=>{var t,n,o,s,a;return(null===(t=e.getParent())||void 0===t?void 0:null===(n=t.date)||void 0===n?void 0:n.getTime())===(null===(o=i.parentDate)||void 0===o?void 0:o.getTime())&&(null===(s=e.getParent())||void 0===s?void 0:s.author.getName())===i.parentAuthor&&(!i.sectionIdBeginning||(null===(a=e.section)||void 0===a?void 0:a.id.startsWith(i.sectionIdBeginning)))});n=1===o.length?o[0]:o[i.index||0]}if(t){i.comment=n;return i}else return n},getByAnyId(e,t=!1){return this.isId(e)?this.getById(e,t):this.getByDtId(e)},reviewHighlightables(){this.items.forEach(e=>{e.reviewHighlightables();e.isLineGapped=e.highlightables.length>1&&e.level>0})},addNewCommentsNotes(e){l.a.saveRelativeScrollPosition();this.items.forEach(e=>{e.subitemList.remove("newCommentsNote")});$(".cd-thread-newCommentsNote").remove();const t=new Map;e.forEach(e=>{let i;if(e.parent)i=e.parentMatch;else for(let t=e.section;t&&!i;t=t.parent)i=t.match;if(i){if(!t.get(i))t.set(i,[]);t.get(i).push(e)}});const i=e.map(e=>e.index);t.forEach((e,t)=>{if(t instanceof s.a)y(t,e,"thread",i);else{const n=e.filter(e=>0===e.logicalLevel);let o=[];n.forEach(e=>{v(e,o,i)});const s=e.filter(e=>!o.includes(e));y(t,o,"section",i);y(t,s,"thread",i)}});l.a.restoreRelativeScrollPosition()},reformatComments(){var e=this;return o()((function*(){if(u.a.get("reformatComments")){const t=[];$(document.body).addClass("cd-reformattedComments");e.items.forEach(e=>{t.push(...e.replaceSignatureWithHeader());e.addMenu()});const i={};t.forEach(e=>{const t=e.pageName;if(!i[t])i[t]=[];i[t].push(e.link)});const n=Object.keys(i),o=yield Object(g.f)(n);Object.keys(o).forEach(e=>{i[e].forEach(t=>{t.title=o[e].normalized;if(!o[e].exists){t.classList.add("new");t.href=mw.util.getUrl(e,{action:"edit",redlink:1})}})})}}))()},reformatTimestamps(){if(c.a.g.areTimestampsAltered)this.items.forEach(e=>{e.reformatTimestamp()})},resetSelectedComment(){const e=this.items.find(e=>e.isSelected);if(e){e.isSelected=!1;e.replyButton.setLabel(c.a.s("cm-reply"))}},getSelectedComment(){const e=window.getSelection();let t;if(e.toString().trim()){const{higherNode:o}=Object(h.v)(e),s=new m.c(l.a.rootElement,null,!1,o);let a;do{var i;a=null===(i=s.currentNode.dataset)||void 0===i?void 0:i.cdCommentIndex}while(void 0===a&&s.parentNode());if(void 0!==a){var n;t=this.items[a];this.resetSelectedComment();if(null!==(n=t)&&void 0!==n&&n.isActionable&&!t.replyForm){t.isSelected=!0;t.configureLayers();t.replyButton.setLabel(c.a.s("cm-quote"))}}else this.resetSelectedComment()}else this.resetSelectedComment();return t||null},findPreviousCommentByTime(e,t){return this.items.filter(i=>i.author.getName()===t&&i.date&&i.date<e&&i.date.getTime()>e.getTime()-c.a.g.msInDay).sort((e,t)=>e.date.getTime()-t.date.getTime()).slice(-1)[0]},parseId(e){const t=e.match(/^(\d{4})(\d{2})(\d{2})(\d{2})(\d{2})_(.+)$/);if(!t)return null;const i=Number(t[1]),n=Number(t[2])-1,o=Number(t[3]),s=Number(t[4]),a=Number(t[5]),r=Object(h.W)(t[6]);return{date:new Date(Date.UTC(i,n,o,s,a)),author:r}},parseDtId(e){const t=e.match(f);if(!t)return null;const i=e=>{const i=Object(h.W)(t[e]);let n;if(t[e+1]){const i=Number(t[e+1]),o=Number(t[e+2])-1,s=Number(t[e+3]),a=Number(t[e+4]),r=Number(t[e+5]);n=new Date(Date.UTC(i,o,s,a,r))}else n=new Date(t[e+6]);return[i,n]},[n,o]=i(1),[s,a]=t[8]?i(8):[];return{author:n,date:o,parentAuthor:s,parentDate:a,sectionIdBeginning:t[15],index:t[16]?Number(t[16]):void 0}},setDtIds(e){e.forEach(e=>{const t=this.getByDtId(e);if(t)t.dtId=e})},setInSingleCommentTableProperty(){l.a.rootElement.querySelectorAll("table.cd-comment-part .cd-signature, .cd-comment-part > table .cd-signature").forEach(e=>{this.items[e.closest(".cd-comment-part").dataset.cdCommentIndex].isInSingleCommentTable=!0})},mergeAdjacentCommentLevels(){const e=l.a.rootElement.querySelectorAll(".cd-commentLevel:not(ol) + .cd-commentLevel:not(ol)");if(!e.length)return;const t=e=>e.classList.contains("cd-commentLevel")&&"OL"!==e.tagName||e.querySelector(".cd-commentLevel:not(ol)");[...e].forEach(e=>{const i=e.previousElementSibling;if(!i)return;let n=i,o=e;do{var s;const e=n.tagName,i={};if("UL"===e)i.DD="LI";else if("DL"===e)i.LI="DD";let r;if(t(n)){const e=o.firstElementChild;if(["DL","DD","UL","LI"].includes(e.tagName)){for(;o.childNodes.length;){let e=o.firstChild;if(e.tagName){var a;if(i[e.tagName])e=l.a.changeElementType(e,i[e.tagName]);null!==(a=r)&&void 0!==a||(r=e)}else if(void 0===r&&e.textContent.trim()){r=null;const t=document.createElement("span");t.appendChild(e);e=t}n.appendChild(e)}o.remove()}}o=r;n=null===(s=r)||void 0===s?void 0:s.previousElementSibling}while(n&&o&&t(o))})},adjustDom(){this.mergeAdjacentCommentLevels();this.mergeAdjacentCommentLevels();if(l.a.rootElement.querySelector(".cd-commentLevel:not(ol) + .cd-commentLevel:not(ol)"))console.warn(".cd-commentLevel adjacencies have left.");this.items.slice(1).forEach(e=>{e.maybeSplitParent()})},connectBrokenThreads(){const e=[];l.a.rootElement.querySelectorAll("dd.cd-comment-part-last + dd, li.cd-comment-part-last + li").forEach(t=>{var i;if(null!==(i=t.firstElementChild)&&void 0!==i&&i.classList.contains("cd-commentLevel"))e.push(t)});l.a.rootElement.querySelectorAll(".cd-comment-replacedPart.cd-comment-part-last").forEach(t=>{var i;const n=t.parentNode.nextElementSibling;if(null!=n&&null!==(i=n.firstElementChild)&&void 0!==i&&i.classList.contains("cd-commentLevel"))e.push(n)});l.a.rootElement.querySelectorAll(".cd-commentLevel + .thumb + .cd-commentLevel > li").forEach(t=>{e.push(t)});if(l.a.areThereOutdents()){l.a.rootElement.querySelectorAll(`.cd-commentLevel > li + li > .${c.a.config.outdentClass}, .cd-commentLevel > dd + dd > .${c.a.config.outdentClass}`).forEach(t=>{e.push(t.parentNode)});l.a.rootElement.querySelectorAll(".cd-commentLevel > li + .cd-comment-outdented, .cd-commentLevel > dd + .cd-comment-outdented").forEach(t=>{e.push(t)})}e.forEach(e=>{e.classList.add("cd-connectToPreviousItem")})},scrollToFirstHighlightAll(e){e[0].scrollTo({flash:!1,pushState:!0,callback:()=>{e.forEach(e=>e.flashTarget())}})}},x=Object.entries(Object.getOwnPropertyDescriptors(a.a)).filter(([,e])=>e.writable).reduce((e,[t,i])=>{e[t]=i.value;return e},{});Object.assign(w,x);t.a=w},function(e,t,i){"use strict";class CdError extends Error{constructor(e){let t;if(e){var i,n;t=e.type;if(e.code)t+="/"+e.code;if(null!=e&&null!==(i=e.apiResp)&&void 0!==i&&null!==(n=i.error)&&void 0!==n&&n.code)t+="/"+e.apiResp.error.code}else t="";super(t);this.name="CdError";this.data=e}}t.a=CdError},function(e,t,i){"use strict";i.d(t,"m",(function(){return v}));i.d(t,"w",(function(){return y}));i.d(t,"l",(function(){return C}));i.d(t,"v",(function(){return S}));i.d(t,"c",(function(){return O}));i.d(t,"s",(function(){return N}));i.d(t,"q",(function(){return L}));i.d(t,"p",(function(){return j}));i.d(t,"j",(function(){return D}));i.d(t,"e",(function(){return I}));i.d(t,"d",(function(){return M}));i.d(t,"u",(function(){return B}));i.d(t,"t",(function(){return H}));i.d(t,"r",(function(){return U}));i.d(t,"o",(function(){return W}));i.d(t,"k",(function(){return z}));i.d(t,"i",(function(){return G}));i.d(t,"g",(function(){return K}));i.d(t,"h",(function(){return Z}));i.d(t,"f",(function(){return X}));i.d(t,"b",(function(){return Q}));i.d(t,"a",(function(){return te}));i.d(t,"n",(function(){return ne}));var n=i(4),o=i.n(n),s=i(36),a=i.n(s),r=i(6),c=i(0),l=i(2),d=i(8),u=i(16),m=i(12),h=i(10),g=i(1);let f,p,b;function v(e,t){if(Array.isArray(e))[e,t]=e;throw"http"===e?new r.a({type:"network"}):new r.a({type:"api",code:"error",apiResp:t})}function y(e){const t=(b?b.includes("apihighlimits"):mw.config.get("wgUserGroups").includes("sysop"))?500:50;return e.reduce((e,i,n)=>{const o=Math.floor(n/t);if(!e[o])e[o]=[];e[o].push(i);return e},[])}function w(e){return Object.keys(e).map(t=>`${t},${e[t].join(",")}\n`).join("").trim()}function x(e){return Object.keys(e).filter(t=>Object.keys(e[t]).length).map(t=>` ${t} ${Object.keys(e[t]).join("\n")}\n`).join("").trim()}function C(){return k.apply(this,arguments)}function k(){return(k=o()((function*(e=!1){let t,i;if(m.a.getCurrent().isRegistered()){t=yield l.a.getBootProcess().isPageFirstParsed()&&null===mw.user.options.get(c.a.g.visitsOptionName)?Promise.resolve({}):D(e).then(e=>e.visits);const n=mw.config.get("wgArticleId");t[n]=t[n]||[];i=t[n]}else{t=[];i=[]}Object.assign(c.a.tests,{visits:t,currentPageVisits:i});return{visits:t,currentPageVisits:i}}))).apply(this,arguments)}function T(e){const t=Object.assign({},e),i=Object.keys(t).reduce((e,i)=>e.concat(t[i]),[]);i.sort();const n=i[Math.floor(i.length/10)];Object.keys(t).forEach(e=>{t[e]=t[e].filter(e=>e>=n);if(!t[e].length)delete t[e]});return t}function S(e){return E.apply(this,arguments)}function E(){return(E=o()((function*(e){if(!e||!m.a.getCurrent().isRegistered())return;const t=w(e),i=a.a.compressToEncodedURIComponent(t);try{yield H(c.a.g.visitsOptionName,i)}catch(t){if(t instanceof r.a){const{type:i,code:n}=t.data;if("internal"===i&&"sizeLimit"===n)S(T(e));else console.error(t)}else console.error(t)}}))).apply(this,arguments)}function O(e=!1){var t;return null!==(t=l.a.getBootProcess())&&void 0!==t&&t.isPageFirstParsed()&&null===mw.user.options.get(c.a.g.subscriptionsOptionName)?Promise.resolve({}):D(e).then(e=>e.subscriptions)}function N(e){return P.apply(this,arguments)}function P(){return(P=o()((function*(e){yield H(c.a.g.subscriptionsOptionName,a.a.compressToEncodedURIComponent(x(e)))}))).apply(this,arguments)}function L(e,t="post"){return new Promise((i,n)=>{l.a.getApi()[t](e,{success:e=>{if(e.error){if("badtoken"!==e.error.code)n(["api",e])}else i(e)},error:(e,t)=>{n(["http",t])}})})}function j(e,t){const i={action:"parse",text:e,contentmodel:"wikitext",prop:["text","modules","jsconfigvars"],pst:!0,disabletoc:!0,disablelimitreport:!0,disableeditsection:!0,preview:!0},n=Object.assign({},i,t);return l.a.getApi().post(n).then(e=>{const t=e.parse.text;mw.loader.load(e.parse.modules);mw.loader.load(e.parse.modulestyles);return{html:t,parsedSummary:e.parse.parsedsummary}},v)}function D(e=!1){if(e&&f)return f;f=l.a.getApi().post({action:"query",meta:"userinfo",uiprop:["options","rights"]}).then(e=>{const t=e.query.userinfo,i=t.options,n=t.rights,o=function(e){const t={},i=/^(\d+), *(.+)$/gm;let n;for(;n=i.exec(e);)t[n[1]]=n[2].split(",");return t}(a.a.decompressFromEncodedURIComponent(i[c.a.g.visitsOptionName])||""),s=function(e){const t={},i=e.split(/(?:^|\n )(\d+) /).slice(1);let n;for(let e=0,o=!0;e<i.length;e++,o=!o)if(o)n=i[e];else{const o=i[e].split("\n");t[n]=u.a.itemsToKeys(o)}return t}(a.a.decompressFromEncodedURIComponent(i[c.a.g.subscriptionsOptionName])||"");b=n;return{options:i,visits:o,subscriptions:s,rights:n}},v);return f}function I(e){return A.apply(this,arguments)}function A(){return(A=o()((function*(e){const t=[];for(const i of y(e)){const e=yield l.a.getApi().post({action:"query",pageids:i}).catch(v);t.push(...e.query.pages)}return t}))).apply(this,arguments)}function M(e){return _.apply(this,arguments)}function _(){return(_=o()((function*(e){const t=[],i=[],n=[];for(const o of y(e)){const e=(yield l.a.getApi().post({action:"query",titles:o,redirects:!0}).catch(v)).query;t.push(...e.normalized||[]);i.push(...e.redirects||[]);n.push(...e.pages)}return{normalized:t,redirects:i,pages:n}}))).apply(this,arguments)}function B(e){return F.apply(this,arguments)}function F(){return(F=o()((function*(e,t=!1){const i=t?"globalpreferences":"options";if(Object.entries(e).some(([,e])=>e&&e.length>65535))throw new r.a({type:"internal",code:"sizeLimit",details:{action:i}});const n=yield L(l.a.getApi().assertCurrentUser({action:i,change:"\x1f"+Object.entries(e).map(([e,i])=>e+(null===i&&!t?"":"=")+(null!=i?i:"")).join("\x1f")}),"postWithEditToken").catch(v);if("success"!==(null==n?void 0:n[i]))throw new r.a({type:"api",code:"noSuccess",details:{action:i}})}))).apply(this,arguments)}function H(e,t){return R.apply(this,arguments)}function R(){return(R=o()((function*(e,t){yield B({[e]:t})}))).apply(this,arguments)}function U(e,t){return Y.apply(this,arguments)}function Y(){return(Y=o()((function*(e,t){if(c.a.config.useGlobalPreferences)try{yield B({[e]:t},!0)}catch(n){var i;if(n instanceof r.a&&"badvalue"===(null===(i=n.data.apiResp)||void 0===i?void 0:i.error.code))yield H(e,t);else throw n}else yield H(e,t)}))).apply(this,arguments)}function W(e){return q.apply(this,arguments)}function q(){return(q=o()((function*(e,t=!1){const i=e.filter(e=>!e.getGender()&&e.isRegistered()).filter(g.Y).map(e=>e.getName());for(const e of y(i)){const i={action:"query",list:"users",ususers:e,usprop:"gender"},n=t?L(i):l.a.getApi().post(i);(yield n.catch(v)).query.users.filter(e=>e.gender).forEach(e=>{m.a.get(e.name).setGender(e.gender)})}}))).apply(this,arguments)}function z(e){return V.apply(this,arguments)}function V(){return(V=o()((function*(e){const t=e.map(e=>l.a.getApi().post({action:"query",meta:"globaluserinfo",guiid:e}).catch(v));return(yield Promise.all(t)).map(e=>{const t=e.query.globaluserinfo,i=m.a.get(t.name);i.setGlobalId(t.id);return i})}))).apply(this,arguments)}function G(e){e=Object(g.V)(e);const t=new Promise(function(){var i=o()((function*(i,n){yield Object(g.S)(100);try{var o;if(t!==p)throw new r.a;const n=null===(o=(yield l.a.getApi().get({action:"opensearch",search:e,namespace:3,redirects:"resolve",limit:10}).catch(v))[1])||void 0===o?void 0:o.map(e=>(e.match(c.a.g.userNamespacesRegexp)||[])[1]).filter(g.i).filter(e=>!e.includes("/"));if(n.length)i(n);else{const t=yield l.a.getApi().get({action:"query",list:"allusers",auprefix:e}).catch(v);i(t.query.allusers.map(e=>e.name))}}catch(e){n(e)}}));return function(e,t){return i.apply(this,arguments)}}());p=t;return t}function K(e){let t=!1;if(c.a.g.colonNamespacesPrefixRegexp.test(e)){e=e.slice(1);t=!0}const i=new Promise(function(){var n=o()((function*(n,o){yield Object(g.S)(100);try{if(i!==p)throw new r.a;l.a.getApi().get({action:"opensearch",search:e,redirects:"return",limit:10}).then(i=>{var o;const s=new RegExp("^"+mw.util.escapeRegExp(e[0]),"i"),a=null===(o=i[1])||void 0===o?void 0:o.map(i=>i.replace(s,()=>e[0]).replace(/^/,t?":":""));n(a)},e=>{v(e)})}catch(e){o(e)}}));return function(e,t){return n.apply(this,arguments)}}());p=i;return i}function Z(e){const t=new Promise(function(){var i=o()((function*(i,n){yield Object(g.S)(100);try{if(t!==p)throw new r.a;l.a.getApi().get({action:"opensearch",search:e.startsWith(":")?e.slice(1):"Template:"+e,redirects:"return",limit:10}).then(t=>{var n;const o=new RegExp("^"+mw.util.escapeRegExp(e[0]),"i"),s=null===(n=t[1])||void 0===n?void 0:n.filter(e=>!/(\/doc|\.css)$/.test(e)).map(t=>e.startsWith(":")?t:t.slice(t.indexOf(":")+1)).map(t=>t.replace(o,()=>e[0]));i(s)},e=>{v(e)})}catch(e){n(e)}}));return function(e,t){return i.apply(this,arguments)}}());p=t;return t}function X(e){return J.apply(this,arguments)}function J(){return(J=o()((function*(e){const t={},i=[],n=[];for(const t of y(e)){const e=(yield l.a.getApi().post({action:"query",titles:t}).catch(v)).query;i.push(...e.normalized||[]);n.push(...e.pages)}const o={};i.forEach(e=>{o[e.to]=e.from});n.forEach(e=>{t[o[e.title]||e.title]={exists:!e.missing,normalized:e.title}});return t}))).apply(this,arguments)}function Q(e){return ee.apply(this,arguments)}function ee(){return(ee=o()((function*(e){const t={};for(const i of y(e)){const e=yield l.a.getApi().post({action:"discussiontoolsgetsubscriptions",commentname:i}).catch(v);Object.assign(t,e.subscriptions)}return t}))).apply(this,arguments)}function te(e,t,i){return ie.apply(this,arguments)}function ie(){return(ie=o()((function*(e,t,i){return yield l.a.getApi().postWithEditToken({action:"discussiontoolssubscribe",page:`${d.b.getCurrent().name}#${t}`,commentname:e,subscribe:i}).catch(v)}))).apply(this,arguments)}function ne(e,t){return oe.apply(this,arguments)}function oe(){return(oe=o()((function*(e,t){let i;t.pushPending();t.setDisabled(!0);try{i=yield $.post("/api/rest_v1/transform/html/to/wikitext",{html:e,scrub_wikitext:!0});i=i.replace(/(?:^ .*(?:\n|$))+/gm,e=>'<syntaxhighlight lang="">\n'+e.replace(/^ /gm,"").replace(/[^\n]$/,"$0\n").replace(/<nowiki>(.*?)<\/nowiki>/g,"$1")+"</syntaxhighlight>").replace(/<br \/>/g,"<br>").trim();let t;({code:i,hidden:t}=Object(h.h)(i));i=Object(h.a)(i);i=Object(g.X)(i,t)}catch(e){}t.popPending();t.setDisabled(!1);return i}))).apply(this,arguments)}},function(e,t,i){"use strict";i.d(t,"a",(function(){return Page}));var n=i(4),o=i.n(n),s=i(6),a=i(0),r=i(2),c=i(12),l=i(10),d=i(7),u=i(1),m=i(14);let h,g,f,p;function b(){f=new Map;p=new Map;const e=(e,t,i)=>{let n=[],o=Object(u.z)(e,/\\[$\\]/g,n);o=mw.util.escapeRegExp(o);if(t)o=o.replace(/\\\$/,"$").replace(/\$(\d+)/,(e,i)=>{const n=t[i-1];return n?`(${n.source})`:e});o="^"+o+(i?".*":"")+"$";o=Object(u.X)(o,n);return new RegExp(o)};a.a.config.archivePaths.forEach(t=>{if(t instanceof RegExp){const e=new RegExp(t.source+".*");p.set(e,"")}else{const i=e(t.source,t.replacements),n=e(t.archive,t.replacements,!0);f.set(i,t.archive);p.set(n,t.source)}})}function v(){if(!p)b();return p}class Page{constructor(e,t){if(!(e instanceof mw.Title))e=new mw.Title(e);this.name=t||e.getPrefixedText();this.title=e.getMainText();this.namespaceId=e.getNamespaceId()}isCurrent(){return this.name===a.a.g.pageName}getUrl(e){return mw.util.getUrl(this.name,e)}getDecodedUrlWithFragment(e,t){let i={};if(t)i.oldid=mw.config.get("wgRevisionId");const n=decodeURI(this.getUrl(i));return`${a.a.g.server}${n}#${e}`}findArchivingInfoElement(){if(!this.isCurrent())return null;g||(g=r.a.$root.find(".cd-archivingInfo"));return g}isProbablyTalkPage(){return Object(u.H)(this.realName||this.name,this.namespaceId)}isArchivePage(){var e;let t=null===(e=this.findArchivingInfoElement())||void 0===e?void 0:e.data("isArchivePage");if(null==t){t=!1;const e=this.realName||this.name,i=v().keys();for(const n of i)if(n.test(e)){t=!0;break}}return Boolean(t)}canHaveArchives(){var e;if(this.isArchivePage())return!1;let t=null===(e=this.findArchivingInfoElement())||void 0===e?void 0:e.data("canHaveArchives");if(null==t){var i;const e=this.realName||this.name;if(void 0===h)h=Object(u.L)(a.a.config.pagesWithoutArchives);t=!(null!==(i=h)&&void 0!==i&&i.test(e))}return Boolean(t)}getArchivePrefix(){var e;if(!this.canHaveArchives())return null;let t=null===(e=this.findArchivingInfoElement())||void 0===e?void 0:e.data("archivePrefix");const i=this.realName||this.name;if(!t){const e=function(){if(!f)b();return f}().entries();for(const[n,o]of e)if(n.test(i)){t=i.replace(n,o);break}}return t?String(t):i+"/"}getArchivedPage(){var e;let t=null===(e=this.findArchivingInfoElement())||void 0===e?void 0:e.data("archivedPage");if(!t){const e=this.realName||this.name,i=v().entries();for(const[n,o]of i)if(n.test(e)){t=e.replace(n,o);break}}return t?y.get(String(t)):this}getCode(e=!0){var t=this;return o()((function*(){var i,n,o,a,c,l;const u=yield r.a.getApi().post({action:"query",titles:t.name,prop:"revisions",rvslots:"main",rvprop:["ids","content"],redirects:!(t.isCurrent()&&mw.config.get("wgIsRedirect")),curtimestamp:!0}).catch(d.m),m=u.query,h=null==m?void 0:null===(i=m.pages)||void 0===i?void 0:i[0],g=null==h?void 0:null===(n=h.revisions)||void 0===n?void 0:n[0],f=null==g?void 0:null===(o=g.slots)||void 0===o?void 0:null===(a=o.main)||void 0===a?void 0:a.content;if(!m||!h)throw new s.a({type:"api",code:"noData"});if(h.missing)if(e){Object.assign(t,{code:"",realName:t.name,queryTimestamp:u.curtimestamp});return}else throw new s.a({type:"api",code:"missing"});if(h.invalid)throw new s.a({type:"api",code:"invalid"});if(!g||void 0===f)throw new s.a({type:"api",code:"noData"});const p=(null===(c=m.redirects)||void 0===c?void 0:null===(l=c[0])||void 0===l?void 0:l.to)||null;Object.assign(t,{pageId:h.pageid,code:f+"\n",revisionId:g.revid,redirectTarget:p,realName:p||t.name,queryTimestamp:u.curtimestamp})}))()}parse(e,t=!1,i=!1){var n=this;return o()((function*(){const o={action:"parse",page:n.realName||n.name,disabletoc:"vector-2022"===a.a.g.skin,useskin:a.a.g.skin,redirects:!0,prop:["text","revid","modules","jsconfigvars","sections"],...a.a.g.apiErrorsFormatHtml},c=Object.assign({},o,e);if(null!=e&&e.oldid)delete c.page;let l=t?Object(d.q)(c):r.a.getApi().post(c);l=l.catch(d.m);const u=(yield l).parse;if(void 0===(null==u?void 0:u.text))throw new s.a({type:"api",code:"noData"});if(i)n.markAsRead(u.revid);return u}))()}getRevisions(e={},t=!1){var i=this;return o()((function*(){var n,o,a;const c={action:"query",titles:i.name,rvslots:"main",prop:"revisions",redirects:!(i.isCurrent()&&mw.config.get("wgIsRedirect"))},l=Object.assign({},c,e);let u=t?Object(d.q)(l):r.a.getApi().post(l);u=u.catch(d.m);const m=null===(n=(yield u).query)||void 0===n?void 0:null===(o=n.pages)||void 0===o?void 0:null===(a=o[0])||void 0===a?void 0:a.revisions;if(!m)throw new s.a({type:"api",code:"noData"});return m}))()}modifyWholeCode({commentCode:e,commentForm:t}){const i=this.code;let n;if(t.isNewTopicOnTop()){const t=Object(l.g)(i).search(/^(=+).*\1[ \t\x01\x02]*$/m);let o;if(-1===t)o=i?i+"\n":"";else o=i.slice(0,t);n=o+e+"\n"+i.slice(t)}else{n=(t.isSectionSubmitted()?"":(i+"\n").trimLeft())+e}return{wholeCode:n,commentCode:e}}edit(e){var t=this;return o()((function*(){const i={action:"edit",title:t.realName||t.name,notminor:!e.minor,tags:c.a.getCurrent().isRegistered()&&a.a.config.tagName||void 0,...a.a.g.apiErrorsFormatHtml},n=r.a.getApi().assertCurrentUser(Object.assign({},i,e));let o;try{o=yield r.a.getApi().postWithEditToken(n,{contentType:"multipart/form-data"}).catch(d.m)}catch(e){if(e instanceof s.a){const{type:t,apiResp:i}=e.data;if("network"===t)throw e;else{const e=null==i?void 0:i.errors[0];let t,n,r,c=!1;if(e){r=e.code;switch(r){case"editconflict":t=a.a.sParse("error-editconflict");break;case"missingtitle":t=a.a.sParse("error-pagedeleted");break;default:t=e.html;c=t.includes("<table")||t.includes("<div")}n=[r,i]}else n=i;throw new s.a({type:"api",code:"error",apiResp:o,details:{code:r,message:t,isRawMessage:c,logMessage:n}})}}else throw e}t.pageId=o.edit.pageid;return o.edit.newtimestamp||"nochange"}))()}analyzeNewTopicPlacement(){var e,t;if(void 0===this.code)throw new s.a("Can't analyze the new topics placement: Page#code is undefined.");let i=(null===(e=(t=a.a.config).areNewTopicsOnTop)||void 0===e?void 0:e.call(t,this.name,this.code))||null;const n=Object(l.g)(this.code),o=/^==[^=].*?==[ \t\x01\x02]*\n/gm;let r,c;if(!1!==i){var d;c=o.exec(n);r=null===(d=c)||void 0===d?void 0:d.index;o.lastIndex=0}if(null===i){let e,t=0;for(;c=o.exec(n);){const i=Object(l.e)(this.code.slice(c.index)),{date:n}=i&&Object(m.g)(i)||{};if(n){if(e)t+=n>e?-1:1;e=n}}i=0===t?this.namespaceId%2==0:t>0}Object.assign(this,{areNewTopicsOnTop:i,firstSectionStartIndex:r})}purge(){var e=this;return o()((function*(){yield r.a.getApi().post({action:"purge",titles:e.name}).catch(()=>{mw.notify(a.a.s("error-purgecache"),{type:"warn"})})}))()}markAsRead(e){var t=this;return o()((function*(){yield r.a.getApi().postWithEditToken({action:"setnotificationtimestamp",titles:t.name,newerthanrevid:e})}))()}getRelevantSection(){return null}getRelevantComment(){return null}getIdentifyingData(){return null}}const y={items:{},get(e,t){const i=e instanceof mw.Title?e:new mw.Title(e),n=i.getPrefixedText();if(!this.items[n])this.items[n]=new Page(i,t?e:void 0);else if(t)this.items[n].name=e;return this.items[n]},getCurrent(){return this.get(a.a.g.pageName,!0)}};t.b=y},function(e,t,i){"use strict";var n=i(0),o=i(2),s=i(3),a=i(1);t.a={items:[],add(e){this.items.push(e)},getAll(){return this.items},getByIndex(e){if(e<0)e=this.items.length+e;return this.items[e]||null},getCount(){return this.items.length},reset(){this.items=[]},getById(e){return e&&this.items.find(t=>t.id===e)||null},getByHeadline(e){return this.items.filter(t=>t.headline===e)},getBySubscribeId(e){return this.items.filter(t=>t.subscribeId===e)},findByHeadlineParts(e){const t=this.items.map(t=>({section:t,score:Object(a.d)(e,t.headline)})).filter(e=>e.score>.66).sort((e,t)=>t.score-e.score)[0];return t?t.section:null},search({index:e,headline:t,id:i,ancestors:n,oldestCommentId:o},s){const r=[];this.items.some(s=>{var c;const l=s.index===e,d=s.headline===t,u=s.id===i,m=1*d+1*(n?Object(a.b)(s.getAncestors().map(e=>e.headline),n):!1)+1*((null===(c=s.oldestComment)||void 0===c?void 0:c.id)===o)+.5*u+.001*l;if(m>=2)r.push({section:s,score:m});return m>=3.5});let c;r.forEach(e=>{if(!c||e.score>c.score)c=e});if(s)return c||null;else return c?c.section:null},adjust(){this.items.forEach(e=>{e.isLastSection=e.index===this.items.length-1;e.addAddSubsectionButton();e.addReplyButton()});this.items.filter(e=>e.addSubsectionButton).forEach(e=>{(e.getChildren(!0).slice(-1)[0]||e).showAddSubsectionButtonOnReplyButtonHover(e)})},addSubscribeButtons(){o.a.saveRelativeScrollPosition();this.items.forEach(e=>{e.addSubscribeButton()});o.a.restoreRelativeScrollPosition()},generateDtSubscriptionId(e,t){const i=new Date(t);i.setSeconds(0);return`h-${Object(a.T)(e)}-${Object(a.n)(i,!0)}`},addMetadataAndActions(){this.items.forEach(e=>{e.addMetadataAndActions()})},updateNewCommentsData(){this.items.forEach(e=>{e.updateNewCommentsData()})},getFirstSectionRelativeTopOffset(e=window.scrollY,t){if(e<=n.a.g.bodyScrollPaddingTop)return;let i;this.items.some(e=>{const n=Object(a.s)(e.headingElement);if(Object(a.y)(n)&&(!t||n.outerTop>t))i=n.outerTop;return void 0!==i});return i},getCurrentSection(){const e=this.getFirstSectionRelativeTopOffset();return void 0!==e&&e<n.a.g.bodyScrollPaddingTop+1&&this.items.slice().reverse().find(e=>{const t=Object(a.s)(e.headingElement);return Object(a.y)(t)&&t.outerTop<n.a.g.bodyScrollPaddingTop+1})||null},maybeUpdateVisibility(){if(!s.a.get("improvePerformance")||!this.items.length||!o.a.isLongPage())return;const e=window.scrollY,t=document.documentElement.scrollHeight,i=3*window.innerHeight;let n;if(t-e>2e4){const t=this.getCurrentSection();n=this.items.filter(e=>!t||e.index>t.index).find(t=>{const n=t.headingElement.getBoundingClientRect();return Object(a.y)(n)&&n.top>=i&&Math.floor(e/1e4)!==Math.floor((e+n.top-i)/1e4)})}const r=[];if(n)this.items.slice(n.index).some(e=>{if(2===e.level)return!0;r.push(e);return!1});this.items.filter(e=>2===e.level||e.isHidden||r.includes(e)).forEach(e=>{e.updateVisibility(!(n&&e.index>=n.index))})},maybeUnhideAll(){if(o.a.isLongPage())this.items.forEach(e=>{e.updateVisibility(!0)})}}},function(e,t,i){"use strict";i.d(t,"f",(function(){return d}));i.d(t,"g",(function(){return u}));i.d(t,"e",(function(){return m}));i.d(t,"k",(function(){return h}));i.d(t,"j",(function(){return g}));i.d(t,"b",(function(){return f}));i.d(t,"d",(function(){return p}));i.d(t,"i",(function(){return b}));i.d(t,"h",(function(){return v}));i.d(t,"c",(function(){return y}));i.d(t,"a",(function(){return w}));var n=i(0),o=i(12),s=i(1),a=i(14);let r,c,l;function d(e){const t=e.join("|");return new RegExp(`(<(${t})(?: [\\w ]+(?:=[^<>]+?)?| *)>)([^]*?)(</\\2>)`,"ig")}function u(e){return e.replace(d(["nowiki","syntaxhighlight","source","pre"]),(e,t,i,n,o)=>t+" ".repeat(n.length)+o).replace(/<!--([^]*?)-->/g,(e,t)=>"\x01"+" ".repeat(t.length+5)+"\x02").replace(/[\u200e\u200f]/g,()=>" ").replace(/(<\/?(?:br|p)\b.*)(\n+)(>)/g,(e,t,i,n)=>t+" ".repeat(i.length)+n)}function m(e){const t=p(e);return t.length?t[0].timestamp:null}function h(e){r||(r=new RegExp(`\\[\\[${n.a.g.filePrefixPattern}[^\\]]+?(?:\\|[^\\]]+?\\|((?:\\[\\[[^\\]]+?\\]\\]|[^|\\]])+))?\\]\\]`,"ig"));return e.replace(/<!--[^]*?-->/g,"").replace(/\x01 *\x02/g,"").replace(n.a.g.pipeTrickRegexp,"$1$2$3").replace(r,"$1").replace(/\[\[:?(?:[^|[\]<>\n]+\|)?(.+?)\]\]/g,"$1").replace(/\{\{:?(?:[^|{}<>\n]+)(?:\|(.+?))?\}\}/g,"$1").replace(/\[https?:\/\/[^[\]<>"\n ]+ *([^\]]*)\]/g,"$1").replace(/'''(.+?)'''/g,"$1").replace(/''(.+?)''/g,"$1").replace(/<br ?\/?>/g," ").replace(/<\w+(?: [\w ]+(?:=[^<>]+?)?| *\/?)>/g,"").replace(/<\/\w+(?: [\w ]+)? *>/g,"").replace(/ {2,}/g," ").trim()}function g(e){return Object(s.h)(e).replace(/\s+/g," ").trim()}function f(e){return e.replace(/<(\w+(?: [\w ]+(?:=[^<>]+?)?| *\/?)|\/\w+(?: [\w ]+)? *)>/g,"%3C$1%3E").replace(/\[/g,"%5B").replace(/\]/g,"%5D").replace(/\{/g,"%7B").replace(/\|/g,"%7C").replace(/\}/g,"%7D").replace(/\s+/g," ")}function p(e){if(!l&&(n.a.config.elementsToExcludeClasses.length||n.a.config.templatesToExclude.length||n.a.config.commentAntipatterns.length)){const e=[];if(n.a.config.elementsToExcludeClasses){const t=n.a.config.elementsToExcludeClasses.join("\\b|\\b");e.push(`class=(['"])[^'"\\n]*(?:\\b${t}\\b)[^'"\\n]*\\1`)}if(n.a.config.templatesToExclude.length){const t=n.a.config.templatesToExclude.map(s.o).join("|");e.push(`\\{\\{ *(?:${t}) *(?:\\||\\}\\})`)}if(n.a.config.commentAntipatterns)e.push(...n.a.config.commentAntipatterns.map(e=>e.source));const t=e.join("|");l=new RegExp(`^.*(?:${t}).*$`,"mg")}const t=u(e).replace(n.a.g.quoteRegexp,(e,t,i,n)=>t+" ".repeat(i.length)+n).replace(l,e=>" ".repeat(e.length));let i=function(e,t){const i=new RegExp(`^((.*?)(${n.a.g.contentTimestampRegexp.source})(?!["\xbb])(?:\\}\\}|</small>)?).*(?:\\n*|$)`,"igm"),a=new RegExp(`^(((.*?)${n.a.g.captureUserNamePattern}.{1,251})(${n.a.g.contentTimestampRegexp.source})(?!["\xbb])(?:\\}\\}|</small>)?.*)(?:\\n*|$)`,"im"),r=new RegExp("^.*"+n.a.g.captureUserNamePattern,"i"),c=new RegExp(n.a.g.captureUserNamePattern,"ig");let l,d=[];for(;l=i.exec(e);){const e=l[0],i=l.index,n=e.match(a);let u,m,h,g,f,p;if(n){const e=i+n[2].length,a=e+n[6].length;m=Object(s.M)(t.slice(e,a));h=i+n[3].length;g=i+n[1].length;p=t.slice(h,g);f=i+n[0].length;let l;c.lastIndex=0;const d=Math.max(0,e-i-255),b=n[0].slice(d),[,v]=b.match(r);u=o.a.get(Object(s.h)(v));for(;l=c.exec(b);){if(l[2])continue;if(o.a.get(Object(s.h)(l[1]))===u){h=i+d+l.index;p=t.slice(h,g);break}}}else{h=i+l[2].length;g=i+l[1].length;p=t.slice(h,g);const e=h+l[3].length;m=Object(s.M)(t.slice(h,e));f=i+l[0].length}d.push({author:u,timestamp:m,startIndex:h,endIndex:g,dirtyCode:p,nextCommentStartIndex:f})}return d}(t,e);const r=function(e,t,i){if(!n.a.config.unsignedTemplates.length)return[];const a=[];c||(c=new RegExp(n.a.g.unsignedTemplatesPattern+".*\\n","g"));let r;for(;r=c.exec(e);){let e,c;if(n.a.g.contentTimestampNoTzRegexp.test(r[2])){c=r[2];e=r[3]}else if(n.a.g.contentTimestampNoTzRegexp.test(r[3])){c=r[3];e=r[2]}else e=r[2];e&&(e=o.a.get(Object(s.h)(e)));if(c&&!n.a.g.contentTimestampRegexp.test(c)){c+=" (UTC)";e||(e="<undated>")}let l=r.index;const d=r.index+r[1].length;let u=t.slice(l,d);const m=r.index+r[0].length,h=i.findIndex(e=>e.nextCommentStartIndex===m);if(-1!==h)i.splice(h,1);a.push({author:e,timestamp:c,startIndex:l,endIndex:d,dirtyCode:u,nextCommentStartIndex:m})}return a}(t,e,i);i.push(...r);const d=t.indexOf(n.a.g.signCode);if(-1!==d)i.push({author:o.a.getCurrent().getName(),startIndex:d,nextCommentStartIndex:d+t.slice(d).indexOf("\n")+1});if(r.length||-1!==d)i.sort((e,t)=>e.startIndex>t.startIndex?1:-1);i=i.filter(e=>e.author);i.forEach((e,t)=>{e.commentStartIndex=0===t?0:i[t-1].nextCommentStartIndex});i.forEach((e,t)=>{const{date:i}=e.timestamp&&Object(a.g)(e.timestamp)||{};e.index=t;e.date=i;delete e.nextCommentStartIndex});return i}function b(e,t,i,n){let o=0;const s=[];do{let a=e.indexOf("{{",o),r=e.indexOf("}}",o);if(-1===a&&-1===r&&!s.length)break;if(-1!==a&&(a<r||-1===r)){s.push(a);o=a+2}else{a=s.pop();if(void 0===a)if(-1===r){o+=2;continue}else a=0;if(-1===r)r=e.length;r+=2;let c=e.substring(a,r);if(n)c=n(c);const l=void 0===i?"\x01"+t.push(c)+"_template\x02":"\x01".repeat(i)+" ".repeat(c.length-i-1)+"\x02";e=e.substring(0,a)+l+e.substr(r);o=r-c.length}}while(void 0===i||s.length);return{code:e,hidden:t}}function v(e,t){let i=[];const n=(t,n,o)=>{e=Object(s.z)(e,t,i,n,o)},o=(e,t)=>{n(d(e),t)};o(["pre","source","syntaxhighlight"],"block");o(["gallery","poem"],"gallery");o(["nowiki"],"inline");({code:e,hidden:i}=b(e,i,void 0,t));n(/^(:* *)(\{\|[^]*?\n\|\})/gm,"table",!0);n(/^(:* *)(\{\|[^]*\n\|)/gm,"table",!0);return{code:e,hidden:i}}function y(e){return e.replace(/([^\n])\n?$/,"$1\n\n")}function w(e,t="\n"){return e.replace(/^(?![:*# ]).*<br[ \n]*\/?>.*$/gim,e=>e.replace(/<br[ \n]*\/?>(?![:*#;])\n? */gi,()=>t))}},function(e,t,i){"use strict";i.d(t,"i",(function(){return c}));i.d(t,"h",(function(){return d}));i.d(t,"a",(function(){return u}));i.d(t,"g",(function(){return m}));i.d(t,"f",(function(){return h}));i.d(t,"d",(function(){return g}));i.d(t,"b",(function(){return f}));i.d(t,"e",(function(){return p}));i.d(t,"c",(function(){return b}));i.d(t,"j",(function(){return v}));var n=i(4),o=i.n(n),s=i(6),a=i(0),r=i(2);function c(e){return l.apply(this,arguments)}function l(){return(l=o()((function*(e,t={}){var i;const n={message:e,actions:[{action:"accept",label:OO.ui.deferMsg("ooui-dialog-message-accept"),flags:"primary"},{action:"reject",label:OO.ui.deferMsg("ooui-dialog-message-reject"),flags:"safe"}]},o=new OO.ui.MessageDialog({classes:["cd-dialog-confirm"]});r.a.getWindowManager().addWindows([o]);const s=r.a.getWindowManager().openWindow(o,Object.assign({},n,t));return null===(i=yield s.closed)||void 0===i?void 0:i.action}))).apply(this,arguments)}function d(e){const t=e.actions.get({actions:"save"})[0];return(null==t?void 0:t.isVisible())&&!t.isDisabled()}function u(e,t){if(!d(e)||confirm(a.a.s(t+"-close-confirm"))){e.close({action:"close"});r.a.removePreventUnloadCondition("dialog")}}function m(e,t,i,n){let o;if(t instanceof s.a){const{type:e}=t.data;let s=a.a.s(i);if("network"===e)s+=" "+a.a.s("error-network");o=new OO.ui.Error(s,{recoverable:n})}else o=new OO.ui.Error(a.a.s("error-javascript"),{recoverable:!1});e.showErrors(o);console.warn(t);e.$errors.find(".oo-ui-buttonElement:not(.oo-ui-flaggedElement-primary) > .oo-ui-buttonElement-button").on("click",()=>{if(n)e.updateSize();else e.close()});e.actions.setAbilities({close:!0});e.updateSize();e.popPending()}function h({value:e,maxLength:t,label:i,help:n,title:o}){const s=new OO.ui.TextInputWidget({value:e,maxLength:t});return{field:new OO.ui.FieldLayout(s,{label:i,align:"top",help:n,helpInline:!0,title:o}),input:s}}function g({value:e,label:t,min:i,max:n,buttonStep:o=1,help:s,title:a,classes:r}){const c=new OO.ui.NumberInputWidget({input:{value:e},step:1,buttonStep:o,min:i,max:n,classes:["cd-numberInput"]});return{field:new OO.ui.FieldLayout(c,{label:t,align:"top",help:s,helpInline:!0,title:a,classes:r}),input:c}}function f({value:e,selected:t,disabled:i,label:n,help:o,tabIndex:s,title:a,classes:r}){const c=new OO.ui.CheckboxInputWidget({value:e,selected:t,disabled:i,tabIndex:s});return{field:new OO.ui.FieldLayout(c,{label:n,align:"inline",help:o,helpInline:!0,title:a,classes:r}),input:c}}function p({label:e,selected:t,help:i,options:n}){const o=n.map(e=>new OO.ui.RadioOptionWidget(e)),s=new OO.ui.RadioSelectWidget({items:o}),a=new OO.ui.FieldLayout(s,{label:e,align:"top",help:i,helpInline:!0});s.selectItemByData(t);return{field:a,select:s,items:o}}function b({label:e,value:t,disabled:i=!1,help:n,copyCallback:o}){const s=new OO.ui.TextInputWidget({value:t,disabled:i}),r=new OO.ui.ButtonWidget({label:a.a.s("copy"),icon:"articles",disabled:i});r.on("click",()=>{o(s.getValue())});return new OO.ui.ActionFieldLayout(s,r,{align:"top",label:e,help:n,helpInline:Boolean(n)})}function v(e,t){e.parent=e.super=t;OO.initClass(t);e.static=Object.create(t.static);Object.keys(e).forEach(t=>{e.static[t]=e[t]})}},function(e,t,i){"use strict";var n=i(0),o=i(1),s=i(7);class User{constructor(e,t={}){this.name=e;this.options=new mw.Map;Object.keys(t).forEach(e=>{this.options.set(e,t[e])})}isRegistered(){var e;if("<unregistered>"===this.name)return!1;null!==(e=this.registered)&&void 0!==e||(this.registered=!mw.util.isIPAddress(this.name));return this.registered}getName(){return this.name}setGender(e){this.options.set("gender",e)}getGender(){return this.options.get("gender")}getNamespaceAlias(){var e;return n.a.config.genderNeutralUserNamespaceAlias||(null===(e=n.a.config.userNamespacesByGender)||void 0===e?void 0:e[this.getGender()])||mw.config.get("wgFormattedNamespaces")[2]}getGlobalId(){return this.globalId}setGlobalId(e){this.globalId=Number(e)}isMuted(){return this.muted}setMuted(e){this.muted=Boolean(e)}}t.a={items:{},get(e){if(e.includes("#"))e=e.slice(0,e.indexOf("#"));e=mw.util.isIPv6Address(e)?e.toUpperCase().trim():Object(o.W)(Object(o.V)(e)).trim();if(!this.items[e]){const t=e===n.a.g.userName?{gender:mw.user.options.get("gender")}:{};this.items[e]=new User(e,t)}return this.items[e]},getCurrent(){return this.get(n.a.g.userName)},loadMuted(){const e=mw.user.options.get("echo-notifications-blacklist");if(!e)return;const t=e.split("\n"),i=Object(o.u)("mutedUsers");if(!i.users||t.some(e=>!i.users[e])||i.saveUnixTime<Date.now()-7*n.a.g.msInDay)Object(s.k)(t).then(e=>{e.forEach(e=>{e.setMuted(!0)});Object(o.Q)("mutedUsers",{users:Object.assign({},...e.map(e=>({[e.getGlobalId()]:e.getName()}),{})),saveUnixTime:Date.now()});mw.hook("convenientDiscussions.mutedUsers").fire(e)},e=>{console.error("Couldn't load the names of the muted users.",e)});else{const e=Object.entries(i.users).map(([,e])=>this.get(e));e.forEach(e=>e.setMuted(!0));mw.hook("convenientDiscussions.mutedUsers").fire(e)}}}},function(e,t,i){"use strict";var n=i(26),o=i(5),s=i(9),a=i(0),r=i(2),c=i(8),l=i(34),d=i(1);function u(e,t){const i=e.lastFocused||new Date(0),n=t.lastFocused||new Date(0);if(n>i)return 1;else if(n<i)return-1;else return 0}const m={items:[],add(e){this.items.push(e)},remove(e){Object(d.O)(this.items,e)},getAll(){return this.items},getByIndex(e){if(e<0)e=this.items.length+e;return this.items[e]||null},getCount(){return this.items.length},reset(){this.items.length=0},getDefaultPreloadConfig:()=>({editIntro:void 0,commentTemplate:void 0,headline:void 0,summary:void 0,noHeadline:!1,omitSignature:!1}),modeToProperty:e=>"replyInSection"===e?"reply":e,getLastActive(){return this.items.slice().sort(u)[0]||null},getLastActiveAltered(){return this.items.slice().sort(u).find(e=>e.isAltered())||null},createAddSectionForm(e=this.getDefaultPreloadConfig(),t=!1,i){const o=this.getAddSectionForm();if(o){if(!Object(d.b)(e,o.getPreloadConfig())){mw.notify(a.a.s("cf-error-formconflict"),{type:"error"});return}o.$element.cdScrollIntoView("center");Object(d.m)(o.headlineInput||o.commentInput)}else{const o=new n.a({mode:"addSection",target:c.b.getCurrent(),preloadConfig:e,newTopicOnTop:t,initialState:i});this.setAddSectionForm(o)}},setAddSectionForm(e){this.addSectionForm=e;$("#ca-addsection").addClass("selected");$("#ca-view").removeClass("selected")},getAddSectionForm(){return this.addSectionForm},forgetAddSectionForm(){delete this.addSectionForm;$("#ca-addsection").removeClass("selected");$("#ca-view").addClass("selected")},adjustLabels(){this.items.forEach(e=>{e.adjustLabels()})},detach(){this.items.forEach(e=>{e.$outermostElement.detach()})},saveSession(e){const t=()=>{const e=this.items.filter(e=>e.isAltered()).map(e=>{var t,i,n,o,s,a;return{mode:e.getMode(),targetData:e.getTarget().getIdentifyingData(),preloadConfig:e.getPreloadConfig(),newTopicOnTop:e.isNewTopicOnTop(),headline:null===(t=e.headlineInput)||void 0===t?void 0:t.getValue(),comment:e.commentInput.getValue(),summary:e.summaryInput.getValue(),minor:null===(i=e.minorCheckbox)||void 0===i?void 0:i.isSelected(),watch:null===(n=e.watchCheckbox)||void 0===n?void 0:n.isSelected(),subscribe:null===(o=e.subscribeCheckbox)||void 0===o?void 0:o.isSelected(),omitSignature:null===(s=e.omitSignatureCheckbox)||void 0===s?void 0:s.isSelected(),delete:null===(a=e.deleteCheckbox)||void 0===a?void 0:a.isSelected(),originalHeadline:e.getOriginalHeadline(),originalComment:e.getOriginalComment(),summaryAltered:e.isSummaryAltered(),lastFocused:e.getLastFocused()}}),t=Date.now(),i=e.length?{commentForms:e,saveUnixTime:t}:{},n=Object(d.u)("commentForms");n[mw.config.get("wgPageName")]=i;Object(d.Q)("commentForms",n)};if(e)t();else l.a.add("saveSession",t,5e3)},restoreFromStorage(e){let t=!1;const i=[];e.commentForms.forEach(e=>{var a,r,l;const d=m.modeToProperty(e.mode);if(null!==(a=e.targetData)&&void 0!==a&&a.headline){const n=s.a.search({headline:e.targetData.headline,oldestCommentId:e.targetData.oldestCommentId,index:e.targetData.index,id:e.targetData.id,ancestors:e.targetData.ancestors});if(null!=n&&n.isActionable&&!n[d+"Form"])try{n[d](e);t=!0}catch(t){console.warn(t);i.push(e)}else i.push(e)}else if(null!==(r=e.targetData)&&void 0!==r&&r.id||null!==(l=e.targetData)&&void 0!==l&&l.anchor){const n=o.a.getById(e.targetData.id||e.targetData.anchor);if(null!=n&&n.isActionable&&!n[d+"Form"])try{n[d](e);t=!0}catch(t){console.warn(t);i.push(e)}else i.push(e)}else if("addSection"===e.mode)if(!m.getAddSectionForm()){const i=new n.a({target:c.b.getCurrent(),mode:e.mode,initialState:e,preloadConfig:e.preloadConfig,newTopicOnTop:e.newTopicOnTop});m.setAddSectionForm(i);t=!0}else i.push(e)});if(t){mw.notification.notify(a.a.s("restore-restored-text"),{title:a.a.s("restore-restored-title")}).$notification.on("click",()=>{this.items[0].goTo()})}if(i.length)r.a.getBootProcess().rescueCommentFormsContent(i)},restoreDirectly(){const e=[],t=t=>{var i;e.push({headline:null===(i=t.headlineInput)||void 0===i?void 0:i.getValue(),comment:t.commentInput.getValue(),summary:t.summaryInput.getValue()});this.items.splice(this.items.indexOf(t),1)};this.items.forEach(e=>{e.restore(t)});if(e.length)r.a.getBootProcess().rescueCommentFormsContent(e)},restoreSession(e){if(e){this.reset();const e=function(e){const t=Object.assign({},e);Object.keys(t).forEach(e=>{var i;const n=t[e];if(null===(i=n.commentForms)||void 0===i||!i.length||n.saveUnixTime<Date.now()-60*a.a.g.msInDay)delete t[e]});return t}(Object(d.u)("commentForms"));Object(d.Q)("commentForms",e);const t=e[mw.config.get("wgPageName")]||{};if(t.commentForms)this.restoreFromStorage(t)}else this.restoreDirectly();this.saveSession()}};t.a=m},function(e,t,i){"use strict";i.d(t,"a",(function(){return R}));i.d(t,"h",(function(){return U}));i.d(t,"f",(function(){return Y}));i.d(t,"g",(function(){return W}));i.d(t,"b",(function(){return z}));i.d(t,"d",(function(){return V}));i.d(t,"c",(function(){return G}));i.d(t,"e",(function(){return K}));var n=i(28),o=i.n(n),s=i(45),a=i.n(s),r=i(46),c=i.n(r),l={};function d(){return l}function u(e){var t=new Date(Date.UTC(e.getFullYear(),e.getMonth(),e.getDate(),e.getHours(),e.getMinutes(),e.getSeconds(),e.getMilliseconds()));t.setUTCFullYear(e.getFullYear());return e.getTime()-t.getTime()}function m(e,t){if(t.length<e)throw new TypeError(e+" argument"+(e>1?"s":"")+" required, but only "+t.length+" present")}function h(e){m(1,arguments);var t=Object.prototype.toString.call(e);if(e instanceof Date||"object"==typeof e&&"[object Date]"===t)return new Date(e.getTime());else if("number"==typeof e||"[object Number]"===t)return new Date(e);else{if(("string"==typeof e||"[object String]"===t)&&"undefined"!=typeof console){console.warn("Starting with v2.0.0-beta.1 date-fns doesn't accept strings as date arguments. Please use `parseISO` to parse strings. See: https://github.com/date-fns/date-fns/blob/master/docs/upgradeGuide.md#string-arguments");console.warn((new Error).stack)}return new Date(NaN)}}function g(e,t){m(2,arguments);var i=h(e),n=h(t),o=i.getTime()-n.getTime();if(o<0)return-1;else if(o>0)return 1;else return o}function f(e,t){if(null==e)throw new TypeError("assign requires that input parameter not be null or undefined");for(var i in t)if(Object.prototype.hasOwnProperty.call(t,i))e[i]=t[i];return e}function p(e){return f({},e)}var b={lessThanXSeconds:{one:"less than a second",other:"less than {{count}} seconds"},xSeconds:{one:"1 second",other:"{{count}} seconds"},halfAMinute:"half a minute",lessThanXMinutes:{one:"less than a minute",other:"less than {{count}} minutes"},xMinutes:{one:"1 minute",other:"{{count}} minutes"},aboutXHours:{one:"about 1 hour",other:"about {{count}} hours"},xHours:{one:"1 hour",other:"{{count}} hours"},xDays:{one:"1 day",other:"{{count}} days"},aboutXWeeks:{one:"about 1 week",other:"about {{count}} weeks"},xWeeks:{one:"1 week",other:"{{count}} weeks"},aboutXMonths:{one:"about 1 month",other:"about {{count}} months"},xMonths:{one:"1 month",other:"{{count}} months"},aboutXYears:{one:"about 1 year",other:"about {{count}} years"},xYears:{one:"1 year",other:"{{count}} years"},overXYears:{one:"over 1 year",other:"over {{count}} years"},almostXYears:{one:"almost 1 year",other:"almost {{count}} years"}},v=function(e,t,i){var n,o=b[e];if("string"==typeof o)n=o;else if(1===t)n=o.one;else n=o.other.replace("{{count}}",t.toString());if(null!=i&&i.addSuffix)if(i.comparison&&i.comparison>0)return"in "+n;else return n+" ago";return n};function y(e){return function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},i=t.width?String(t.width):e.defaultWidth,n=e.formats[i]||e.formats[e.defaultWidth];return n}}var w={date:y({formats:{full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},defaultWidth:"full"}),time:y({formats:{full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},defaultWidth:"full"}),dateTime:y({formats:{full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},defaultWidth:"full"})},x={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"};function C(e){return function(t,i){var n;if("formatting"===(null!=i&&i.context?String(i.context):"standalone")&&e.formattingValues){var o=e.defaultFormattingWidth||e.defaultWidth,s=null!=i&&i.width?String(i.width):o;n=e.formattingValues[s]||e.formattingValues[o]}else{var a=e.defaultWidth,r=null!=i&&i.width?String(i.width):e.defaultWidth;n=e.values[r]||e.values[a]}return n[e.argumentCallback?e.argumentCallback(t):t]}}function k(e){return function(t){var i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=i.width,o=n&&e.matchPatterns[n]||e.matchPatterns[e.defaultMatchWidth],s=t.match(o);if(!s)return null;var a,r=s[0],c=n&&e.parsePatterns[n]||e.parsePatterns[e.defaultParseWidth],l=Array.isArray(c)?S(c,(function(e){return e.test(r)})):T(c,(function(e){return e.test(r)}));a=e.valueCallback?e.valueCallback(l):l;a=i.valueCallback?i.valueCallback(a):a;var d=t.slice(r.length);return{value:a,rest:d}}}function T(e,t){for(var i in e)if(e.hasOwnProperty(i)&&t(e[i]))return i}function S(e,t){for(var i=0;i<e.length;i++)if(t(e[i]))return i}var E,O={code:"en-US",formatDistance:v,formatLong:w,formatRelative:function(e,t,i,n){return x[e]},localize:{ordinalNumber:function(e,t){var i=Number(e),n=i%100;if(n>20||n<10)switch(n%10){case 1:return i+"st";case 2:return i+"nd";case 3:return i+"rd"}return i+"th"},era:C({values:{narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},defaultWidth:"wide"}),quarter:C({values:{narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},defaultWidth:"wide",argumentCallback:function(e){return e-1}}),month:C({values:{narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],wide:["January","February","March","April","May","June","July","August","September","October","November","December"]},defaultWidth:"wide"}),day:C({values:{narrow:["S","M","T","W","T","F","S"],short:["Su","Mo","Tu","We","Th","Fr","Sa"],abbreviated:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],wide:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},defaultWidth:"wide"}),dayPeriod:C({values:{narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"}},defaultWidth:"wide",formattingValues:{narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"}},defaultFormattingWidth:"wide"})},match:{ordinalNumber:(E={matchPattern:/^(\d+)(th|st|nd|rd)?/i,parsePattern:/\d+/i,valueCallback:function(e){return parseInt(e,10)}},function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i=e.match(E.matchPattern);if(!i)return null;var n=i[0],o=e.match(E.parsePattern);if(!o)return null;var s=E.valueCallback?E.valueCallback(o[0]):o[0];s=t.valueCallback?t.valueCallback(s):s;var a=e.slice(n.length);return{value:s,rest:a}}),era:k({matchPatterns:{narrow:/^(b|a)/i,abbreviated:/^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,wide:/^(before christ|before common era|anno domini|common era)/i},defaultMatchWidth:"wide",parsePatterns:{any:[/^b/i,/^(a|c)/i]},defaultParseWidth:"any"}),quarter:k({matchPatterns:{narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},defaultMatchWidth:"wide",parsePatterns:{any:[/1/i,/2/i,/3/i,/4/i]},defaultParseWidth:"any",valueCallback:function(e){return e+1}}),month:k({matchPatterns:{narrow:/^[jfmasond]/i,abbreviated:/^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,wide:/^(january|february|march|april|may|june|july|august|september|october|november|december)/i},defaultMatchWidth:"wide",parsePatterns:{narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^ap/i,/^may/i,/^jun/i,/^jul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},defaultParseWidth:"any"}),day:k({matchPatterns:{narrow:/^[smtwf]/i,short:/^(su|mo|tu|we|th|fr|sa)/i,abbreviated:/^(sun|mon|tue|wed|thu|fri|sat)/i,wide:/^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i},defaultMatchWidth:"wide",parsePatterns:{narrow:[/^s/i,/^m/i,/^t/i,/^w/i,/^t/i,/^f/i,/^s/i],any:[/^su/i,/^m/i,/^tu/i,/^w/i,/^th/i,/^f/i,/^sa/i]},defaultParseWidth:"any"}),dayPeriod:k({matchPatterns:{narrow:/^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,any:/^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i},defaultMatchWidth:"any",parsePatterns:{any:{am:/^a/i,pm:/^p/i,midnight:/^mi/i,noon:/^no/i,morning:/morning/i,afternoon:/afternoon/i,evening:/evening/i,night:/night/i}},defaultParseWidth:"any"})},options:{weekStartsOn:0,firstWeekContainsDate:1}};function N(e,t,i){var n,o,s;m(2,arguments);var a=d(),r=null!==(n=null!==(o=null==i?void 0:i.locale)&&void 0!==o?o:a.locale)&&void 0!==n?n:O;if(!r.formatDistance)throw new RangeError("locale must contain localize.formatDistance property");var c=g(e,t);if(isNaN(c))throw new RangeError("Invalid time value");var l,b,v=f(p(i),{addSuffix:Boolean(null==i?void 0:i.addSuffix),comparison:c});if(c>0){l=h(t);b=h(e)}else{l=h(e);b=h(t)}var y,w=String(null!==(s=null==i?void 0:i.roundingMethod)&&void 0!==s?s:"round");if("floor"===w)y=Math.floor;else if("ceil"===w)y=Math.ceil;else if("round"===w)y=Math.round;else throw new RangeError("roundingMethod must be 'floor', 'ceil' or 'round'");var x,C=b.getTime()-l.getTime(),k=C/6e4,T=u(b)-u(l),S=(C-T)/6e4,E=null==i?void 0:i.unit;if(!E)if(k<1)x="second";else if(k<60)x="minute";else if(k<1440)x="hour";else if(S<43200)x="day";else if(S<525600)x="month";else x="year";else x=String(E);if("second"===x){var N=y(C/1e3);return r.formatDistance("xSeconds",N,v)}else if("minute"===x){var P=y(k);return r.formatDistance("xMinutes",P,v)}else if("hour"===x){var L=y(k/60);return r.formatDistance("xHours",L,v)}else if("day"===x){var $=y(S/1440);return r.formatDistance("xDays",$,v)}else if("month"===x){var j=y(S/43200);return 12===j&&"month"!==E?r.formatDistance("xYears",1,v):r.formatDistance("xMonths",j,v)}else if("year"===x){var D=y(S/525600);return r.formatDistance("xYears",D,v)}throw new RangeError("unit must be 'second', 'minute', 'hour', 'day', 'month' or 'year'")}function P(e,t){var i=function(e){if(!$[e]){var t=new Intl.DateTimeFormat("en-US",{hour12:!1,timeZone:"America/New_York",year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit"}).format(new Date("2014-06-25T04:00:00.123Z")),i="06/25/2014, 00:00:00"===t||"\u200e06\u200e/\u200e25\u200e/\u200e2014\u200e \u200e00\u200e:\u200e00\u200e:\u200e00"===t;$[e]=i?new Intl.DateTimeFormat("en-US",{hour12:!1,timeZone:e,year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit"}):new Intl.DateTimeFormat("en-US",{hourCycle:"h23",timeZone:e,year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit"})}return $[e]}(t);return i.formatToParts?function(e,t){try{for(var i=e.formatToParts(t),n=[],o=0;o<i.length;o++){var s=L[i[o].type];if(s>=0)n[s]=parseInt(i[o].value,10)}return n}catch(e){if(e instanceof RangeError)return[NaN];throw e}}(i,e):function(e,t){var i=e.format(t).replace(/\u200E/g,""),n=/(\d+)\/(\d+)\/(\d+),? (\d+):(\d+):(\d+)/.exec(i);return[n[3],n[1],n[2],n[4],n[5],n[6]]}(i,e)}var L={year:0,month:1,day:2,hour:3,minute:4,second:5};var $={};function j(e,t,i,n,o,s,a){var r=new Date(0);r.setUTCFullYear(e,t,i);r.setUTCHours(n,o,s,a);return r}var D={timezone:/([Z+-].*)$/,timezoneZ:/^(Z)$/,timezoneHH:/^([+-]\d{2})$/,timezoneHHMM:/^([+-]\d{2}):?(\d{2})$/};function I(e,t,i){var n,o,s;if(""===e)return 0;if(n=D.timezoneZ.exec(e))return 0;if(n=D.timezoneHH.exec(e))if(!M(s=parseInt(n[1],10)))return NaN;else return-36e5*s;if(n=D.timezoneHHMM.exec(e)){s=parseInt(n[1],10);var a=parseInt(n[2],10);if(!M(s,a))return NaN;o=36e5*Math.abs(s)+6e4*a;return s>0?-o:o}if(function(e){if(_[e])return!0;try{new Intl.DateTimeFormat(void 0,{timeZone:e});_[e]=!0;return!0}catch(e){return!1}}(e)){t=new Date(t||Date.now());var r=A(i?t:function(e){return j(e.getFullYear(),e.getMonth(),e.getDate(),e.getHours(),e.getMinutes(),e.getSeconds(),e.getMilliseconds())}(t),e);return-(i?r:function(e,t,i){var n=e.getTime()-t,o=A(new Date(n),i);if(t===o)return t;n-=o-t;var s=A(new Date(n),i);if(o===s)return o;return Math.max(o,s)}(t,r,e))}return NaN}function A(e,t){var i=P(e,t),n=j(i[0],i[1]-1,i[2],i[3]%24,i[4],i[5],0).getTime(),o=e.getTime(),s=o%1e3;return n-(o-=s>=0?s:1e3+s)}function M(e,t){return-23<=e&&e<=23&&(null==t||0<=t&&t<=59)}var _={};function B(e,t){return-I(e,t)}var cd=i(0),F=i(1);let H;const R={xg:["january-gen","february-gen","march-gen","april-gen","may-gen","june-gen","july-gen","august-gen","september-gen","october-gen","november-gen","december-gen"],D:["sun","mon","tue","wed","thu","fri","sat"],l:["sunday","monday","tuesday","wednesday","thursday","friday","saturday"],F:["january","february","march","april","may_long","june","july","august","september","october","november","december"],M:["jan","feb","mar","apr","may","jun","jul","aug","sep","oct","nov","dec"]},U=[{interval:1,start:0,step:1},{interval:60,start:1,step:1},{interval:1440,start:60,step:60},{interval:44640,start:1440,step:1440}];function Y(){var e;if(o.a.utc)return;const t=null===(e=cd.a.i18n[cd.a.g.userLanguage])||void 0===e?void 0:e.dayjsLocale;if(t)o.a.locale(t);o.a.extend(c.a);o.a.extend(a.a)}function W(e,t){const i=Object(F.M)(e,!0),n=void 0===t?cd.a.g.parseTimestampContentRegexp:cd.a.g.parseTimestampUiRegexp,o=i.match(n);if(!o)return null;return{date:function(e,t){let i=void 0===t;if(i)t=cd.a.g.contentTimezone;const n=i?cd.a.g.contentDigits:cd.a.g.uiDigits,o=i?cd.a.g.contentTimestampMatchingGroups:cd.a.g.uiTimestampMatchingGroups,s=e=>{if(!n)return e;const t=new RegExp("["+n+"]","g");return e.replace(t,e=>n.indexOf(e))};let a=0,r=0,c=0,l=0,d=0;for(let t=0;t<o.length;t++){const n=o[t],u=e[t+3];switch(n){case"xg":case"F":case"M":r=(i?Object(F.q)(R[n]):R[n].map(mw.msg)).indexOf(u);break;case"d":case"j":c=Number(s(u));break;case"D":case"l":break;case"n":r=Number(s(u))-1;break;case"Y":a=Number(s(u));break;case"xkY":a=Number(s(u))-543;break;case"G":case"H":l=Number(s(u));break;case"i":d=Number(s(u));break;default:throw"Not implemented"}}const u=Date.UTC(a,r,c,l,d);let m;if("number"==typeof t)m=t*cd.a.g.msInMin;else m="UTC"===t?0:B(t,u);return new Date(u-m)}(o,t),match:o}}function q(e){H||(H=cd.a.mws("timezone-utc"));let t=" ("+H;if(0!==(e/=60))t+=(e>0?"+":"-")+Math.abs(e);t+=")";return t}function z(e,t=!1){let i;if("default"===cd.a.settings.get("timestampFormat"))i=V(e,t);else if("improved"===cd.a.settings.get("timestampFormat"))i=G(e,t);else if("relative"===cd.a.settings.get("timestampFormat"))i=K(e);return i}function V(e,t=!1,i){let n,s,a,r,c,l,d;if(cd.a.settings.get("useUiTime")&&!["UTC",0].includes(cd.a.g.uiTimezone)&&!i){if(cd.a.g.areUiAndLocalTimezoneSame)n=-e.getTimezoneOffset();else n="number"==typeof cd.a.g.uiTimezone?cd.a.g.uiTimezone:B(cd.a.g.uiTimezone,e.getTime())/cd.a.g.msInMin;e=new Date(e.getTime()+n*cd.a.g.msInMin)}else if(!i||"UTC"===i)n=0;else{const t=o()(e).tz(i);n=t.utcOffset();s=t.year();a=t.month();r=t.date();c=t.hour();l=t.minute();d=t.day()}if(void 0===s){s=e.getUTCFullYear();a=e.getUTCMonth();r=e.getUTCDate();c=e.getUTCHours();l=e.getUTCMinutes();d=e.getUTCDay()}let u="";const m=cd.a.g.uiDateFormat;for(let e=0;e<m.length;e++){let t=m[e];if("x"===t&&e<m.length-1||"xk"===t&&e<m.length-1)t+=m[++e];switch(t){case"xx":u+="x";break;case"xg":case"F":case"M":u+=R[t].map(mw.msg)[a];break;case"d":u+=Object(F.bb)(r,2);break;case"D":case"l":u+=R[t].map(mw.msg)[d];break;case"j":u+=r;break;case"n":u+=a+1;break;case"Y":u+=s;break;case"xkY":u+=s+543;break;case"G":u+=c;break;case"H":u+=Object(F.bb)(c,2);break;case"i":u+=Object(F.bb)(l,2);break;case"\\":if(e<m.length-1)u+=m[++e];else u+="\\";break;case'"':if(e<m.length-1){const t=m.indexOf('"',e+1);if(-1===t)u+='"';else{u+=m.substr(e+1,t-e-1);e=t}}else u+='"';break;default:u+=m[e]}}if(t)u+=q(n);return u}function G(e,t=!1){let i,n=new Date,s=o()(e);if(cd.a.settings.get("useUiTime")&&!["UTC",0].includes(cd.a.g.uiTimezone)){if(cd.a.g.areUiAndLocalTimezoneSame)i=-e.getTimezoneOffset();else{i="number"==typeof cd.a.g.uiTimezone?cd.a.g.uiTimezone:B(cd.a.g.uiTimezone,n.getTime())/cd.a.g.msInMin;s=s.utcOffset(i)}n=new Date(n.getTime()+i*cd.a.g.msInMin)}else{i=0;s=s.utc()}const a=s.date(),r=s.month(),c=s.year(),l=n.getUTCDate(),d=n.getUTCMonth(),u=n.getUTCFullYear(),m=new Date(n.getTime());m.setDate(m.getDate()-1);const h=m.getUTCDate(),g=m.getUTCMonth(),f=m.getUTCFullYear();let p;if(a===l&&r===d&&c===u)p=s.format(cd.a.s("comment-timestamp-today"));else if(a===h&&r===g&&c===f)p=s.format(cd.a.s("comment-timestamp-yesterday"));else if(c===u)p=s.format(cd.a.s("comment-timestamp-currentyear"));else p=s.format(cd.a.s("comment-timestamp-other"));if(t)p+=q(i);return p}function K(e){const t=Date.now(),i=e.getTime();if(i<t&&i>t-cd.a.g.msInMin)return cd.a.s("comment-timestamp-lessthanminute");else return function(e,t){m(1,arguments);return N(e,Date.now(),t)}(e,{addSuffix:!0,roundingMethod:"floor",locale:cd.a.i18n[cd.a.g.userLanguage].dateFnsLocale})}},function(e,t,i){"use strict";t.a={init(){this.timerTotal={};this.timerStartTimestamps={};this.timerRunCount={};this.timerAllRunsTotal={};this.initCounters();this.array=[];this.object={}},initCounters(){this.counters="undefined"==typeof Proxy?{}:new Proxy({},{get:(e,t)=>t in e?e[t]:0})},startTimer(e){var t,i;null!==(i=(t=this.timerTotal)[e])&&void 0!==i||(t[e]=0);this.timerStartTimestamps[e]=performance.now()},stopTimer(e){var t,i,n,o;if(void 0===this.timerStartTimestamps[e])return;const s=performance.now()-this.timerStartTimestamps[e];this.timerTotal[e]+=s;delete this.timerStartTimestamps[e];null!==(i=(t=this.timerAllRunsTotal)[e])&&void 0!==i||(t[e]=0);this.timerAllRunsTotal[e]+=s;null!==(o=(n=this.timerRunCount)[e])&&void 0!==o||(n[e]=0);this.timerRunCount[e]++},resetTimer(e){if(void 0!==this.timerStartTimestamps[e])this.stopTimer(e);delete this.timerTotal[e]},fullResetTimer(e){this.resetTimer(e);delete this.timerAllRunsTotal[e];delete this.timerRunCount[e]},logAndResetTimer(e){if(void 0!==this.timerStartTimestamps[e])this.stopTimer(e);if(void 0!==this.timerTotal[e]){console.debug(`${e}: ${this.timerTotal[e].toFixed(1)}`);this.resetTimer(e)}},logAndResetEverything(e){const t=Object.keys(this.timerTotal);if(e)t.sort();t.forEach(e=>{this.logAndResetTimer(e)});const i=Object.keys(this.counters);if(e)i.sort();i.forEach(e=>{console.debug(`counter ${e}: ${this.counters[e]}`)});this.initCounters();if(this.array.length){console.debug("array: ",this.array);this.array=[]}if(Object.keys(this.object).length){console.debug("object: ",this.object);this.object={}}},getTimerTotal(e){return this.timerTotal[e]},getAverageTimerTime(e){if(void 0===this.timerAllRunsTotal[e]){console.error("No data for timer "+e);return}const t=this.timerAllRunsTotal[e]/this.timerRunCount[e];console.debug(`${e}: ${t.toFixed(3)} average for ${this.timerRunCount[e]} runs`)},incrementCounter(e){this.counters[e]++}}},function(e,t,i){"use strict";var n=i(4),o=i.n(n),s=i(6),a=i(9),r=i(0),c=i(2),l=i(3),d=i(7),u=i(1);let m=Promise.resolve();t.a={load(e=!1){var t=this;this.loadRequest=o()((function*(){if(l.a.get("useTopicSubscription")){const e=a.a.getAll().filter(e=>e.subscribeId).map(e=>e.subscribeId).filter(u.Y);t.registry=yield Object(d.b)(e)}else{t.allPagesRegistry=yield Object(d.c)(e);const i=mw.config.get("wgArticleId");if(i){t.allPagesRegistry[i]=t.allPagesRegistry[i]||{};t.registry=t.allPagesRegistry[i];const e=c.a.getBootProcess();if(e){t.updateRegistry(e.data("justSubscribedToSection"),!0);t.updateRegistry(e.data("justUnsubscribedFromSection"),!1);e.deleteData("justSubscribedToSection");e.deleteData("justUnsubscribedFromSection")}}}}))();return this.loadRequest},getLoadRequest(){return this.loadRequest},areLoaded(){return Boolean(this.registry||this.allPagesRegistry)},saveLegacy(e){var t=this;return o()((function*(){if(!l.a.get("useTopicSubscription"))yield Object(d.s)(e||t.allPagesRegistry)}))()},updateRegistry(e,t){if(void 0!==e){this.registry||(this.registry={});this.registry[e]=Boolean(t);if(!t&&!l.a.get("useTopicSubscription"))delete this.registry[e]}},dtSubscribe(e,t,i){var n=this;return o()((function*(){if(void 0===e)throw new s.a;try{yield Object(d.a)(e,t,i)}catch(e){mw.notify(r.a.s("error-settings-save"),{type:"error"});throw e}n.updateRegistry(e,i);n.maybeShowNotice()}))()},subscribeLegacy(e,t){var i=this;const n=function(){var n=o()((function*(){try{yield i.load()}catch(e){mw.notify(r.a.s("error-settings-load"),{type:"error"});throw e}const n=Object.assign({},i.registry);i.updateRegistry(e,!0);i.updateRegistry(t,!1);try{yield i.saveLegacy()}catch(e){i.registry=n;if(e instanceof s.a){const{type:t,code:i}=e.data;if("internal"===t&&"sizeLimit"===i){const e=Object(u.Z)(r.a.sParse("section-watch-error-maxsize"),{callbacks:{"cd-notification-editWatchedSections":()=>{c.a.showEditSubscriptionsDialog()}}});mw.notify(e,{type:"error",autoHideSeconds:"long"})}else mw.notify(r.a.s("error-settings-save"),{type:"error"})}else mw.notify(r.a.s("error-settings-save"),{type:"error"});throw e}}));return function(){return n.apply(this,arguments)}}();m=m.then(n,n);return m},unsubscribeLegacy(e){var t=this;const i=function(){var i=o()((function*(){try{yield t.load()}catch(e){mw.notify(r.a.s("error-settings-load"),{type:"error"});throw e}const i=Object.assign({},t.registry);t.updateRegistry(e,!1);try{yield t.saveLegacy()}catch(e){t.registry=i;mw.notify(r.a.s("error-settings-save"),{type:"error"});throw e}}));return function(){return i.apply(this,arguments)}}();m=m.then(i,i);return m},subscribe(e,t,i){return l.a.get("useTopicSubscription")?this.dtSubscribe(e,t,!0):this.subscribeLegacy(e,i)},unsubscribe(e,t){return l.a.get("useTopicSubscription")?this.dtSubscribe(e,t,!1):this.unsubscribeLegacy(e)},getPageIds(){if(l.a.get("useTopicSubscription")||!this.areLoaded())return null;else return Object.keys(this.allPagesRegistry)},getForPageId(e){if(l.a.get("useTopicSubscription")||!this.areLoaded())return null;else return Object.keys(this.allPagesRegistry[e]||{})},getForCurrentPage(){return this.getForPageId(mw.config.get("wgArticleId"))},getState(e){if(!this.areLoaded())throw new s.a;if(void 0===this.registry[e])return null;else return this.registry[e]},getOriginalState(e){var t;return null===(t=this.originalList)||void 0===t?void 0:t.includes(e)},cleanUp(){if(l.a.get("useTopicSubscription"))return;this.originalList=Object.keys(this.registry);let e=!1;Object.keys(this.registry).filter(e=>a.a.getAll().every(t=>t.headline!==e)).forEach(t=>{delete this.registry[t];e=!0});if(e)this.saveLegacy()},maybeShowNotice(){if(l.a.get("useTopicSubscription")&&!l.a.get("useTopicSubscription-seenNotice")){OO.ui.alert($("<div>").append($("<img>").attr("width",512).attr("height",253).attr("src","//upload.wikimedia.org/wikipedia/commons/thumb/0/01/Screenshot_of_topic_subscription_prototype.png/512px-Screenshot_of_topic_subscription_prototype.png").addClass("cd-tsnotice-img"),Object(u.Z)(r.a.sParse("topicsubscription-notice"),{callbacks:{"cd-notification-notificationSettings":()=>{c.a.showSettingsDialog("notifications")}},targetBlank:!0,tagName:"div"}).addClass("cd-tsnotice-text")).children(),{size:"large"});l.a.saveSettingOnTheFly("useTopicSubscription-seenNotice",!0)}},itemsToKeys:e=>Object.assign({},...e.map(e=>({[e]:!0})))}},function(e,t,i){"use strict";var n=i(18),o=i(13),s=i(5),a=i(0),r=i(2),c=i(3),l=i(14),d=i(1),u=i(10);let m,h,g;t.a={unseenCommentCount:null,hiddenNewCommentCount:0,mount(){this.$element=$("<div>").attr("id","cd-navPanel").appendTo(document.body);this.refreshButton=new n.a({tagName:"div",classes:["cd-navPanel-button"],id:"cd-navPanel-refreshButton",action:e=>{this.refreshClick(Object(d.B)(e))}});this.updateRefreshButtonTooltip(0);this.previousButton=new n.a({tagName:"div",classes:["cd-navPanel-button"],id:"cd-navPanel-previousButton",tooltip:`${a.a.s("navpanel-previous")} ${a.a.mws("parentheses","W")}`,action:()=>{this.goToPreviousNewComment()}}).hide();this.nextButton=new n.a({tagName:"div",classes:["cd-navPanel-button"],id:"cd-navPanel-nextButton",tooltip:`${a.a.s("navpanel-next")} ${a.a.mws("parentheses","S")}`,action:()=>{this.goToNextNewComment()}}).hide();this.firstUnseenButton=new n.a({tagName:"div",classes:["cd-navPanel-button"],id:"cd-navPanel-firstUnseenButton",tooltip:`${a.a.s("navpanel-firstunseen")} ${a.a.mws("parentheses","F")}`,action:()=>{this.goToFirstUnseenComment()}}).hide();this.commentFormButton=new n.a({tagName:"div",classes:["cd-navPanel-button"],id:"cd-navPanel-commentFormButton",tooltip:`${a.a.s("navpanel-commentform")} ${a.a.mws("parentheses","C")}`,action:()=>{this.goToNextCommentForm()}}).hide();this.$element.append(this.refreshButton.element,this.previousButton.element,this.nextButton.element,this.firstUnseenButton.element,this.commentFormButton.element)},unmount(){this.$element.remove();this.$element=null},isMounted(){return Boolean(this.$element)},reset(){this.refreshButton.setLabel("");this.updateRefreshButtonTooltip(0);this.previousButton.hide();this.nextButton.hide();this.firstUnseenButton.hide();this.commentFormButton.hide();clearTimeout(m)},fill(){if(s.a.getAll().some(e=>e.isNew)){this.updateRefreshButtonTooltip(0);this.previousButton.show();this.nextButton.show();this.updateFirstUnseenButton()}},refreshClick(e){r.a.reload({commentIds:r.a.getRelevantAddedCommentIds(),markAsRead:e})},goToNewCommentInDirection(e){if(r.a.isAutoScrolling())return;const t=s.a.findInViewport(e);if(!t)return;const i=Object(d.P)(s.a.getAll(),t.index,"backward"===e).filter(e=>e.isNew&&!e.isInViewport()),n=i.find(e=>!1===e.isInViewport())||i[0];if(n)n.scrollTo({flash:null,callback:()=>{n.registerSeen(e,!0)}})},goToPreviousNewComment(){this.goToNewCommentInDirection("backward")},goToNextNewComment(){this.goToNewCommentInDirection("forward")},goToFirstUnseenComment(){if(r.a.isAutoScrolling())return;const e=s.a.getAll().filter(e=>!1===e.isSeen),t=e.find(e=>!1===e.isInViewport())||e[0];if(t)t.scrollTo({flash:null,callback:()=>{t.registerSeen("forward",!0)}})},goToNextCommentForm(e){var t;null===(t=o.a.getAll().filter(t=>e||!t.$element.cdIsInViewport(!0)).map(e=>{let t=e.$element.get(0).getBoundingClientRect().top;if(t<0)t+=2*$(document).height();return{commentForm:e,top:t}}).sort((e,t)=>e.top-t.top).map(e=>e.commentForm)[0])||void 0===t||t.goTo()},updateRefreshButton(e,t,i){this.refreshButton.setLabel("");this.updateRefreshButtonTooltip(e,t);if(e)$("<span>").attr("dir","ltr").text("+"+e).appendTo(this.refreshButton.element);this.refreshButton.element.classList.toggle("cd-navPanel-refreshButton-relevant",i);this.hiddenNewCommentCount=e},updateRefreshButtonTooltip(e,t){clearTimeout(m);h=e;g=t;let i=null;const n=s.a.getAll().some(e=>e.isNew);if(e){i=a.a.s("navpanel-newcomments-count",e)+" "+a.a.s("navpanel-newcomments-refresh")+" "+a.a.mws("parentheses","R");if(n&&c.a.get("highlightNewInterval"))i+="\n"+a.a.s("navpanel-markasread",a.a.g.cmdModifier);const o=Object(u.k)(a.a.s("bullet")),s="rtl"===a.a.g.contentTextDirection?"\u200f":"";t.forEach((e,t)=>{const n=null==t?void 0:t.headline;i+=n?"\n\n"+n:"\n";e.forEach(e=>{var t;i+="\n";const n=null!==(t=e.parent)&&void 0!==t&&t.author&&e.level>1?a.a.s("navpanel-newcomments-names",e.author.getName(),e.parent.author.getName()):e.author.getName(),r=e.date?Object(l.b)(e.date):a.a.s("navpanel-newcomments-unknowndate");i+=o+" "+n+s+a.a.mws("comma-separator")+r})});if("relative"===c.a.get("timestampFormat")&&!c.a.get("modifyToc"))m=setTimeout(()=>{this.updateTimestampsInRefreshButtonTooltip()},a.a.g.msInMin)}else{i=a.a.s("navpanel-refresh")+" "+a.a.mws("parentheses","R");if(n&&c.a.get("highlightNewInterval"))i+="\n"+a.a.s("navpanel-markasread",a.a.g.cmdModifier)}this.refreshButton.setTooltip(i)},updateTimestampsInRefreshButtonTooltip(){this.updateRefreshButtonTooltip(h,g)},updateFirstUnseenButton(){if(this.isMounted()){this.unseenCommentCount=s.a.getAll().filter(e=>!1===e.isSeen).length;if(this.unseenCommentCount)this.firstUnseenButton.show().setLabel(this.unseenCommentCount);else this.firstUnseenButton.hide()}},updateCommentFormButton(){if(!this.isMounted()||r.a.isAutoScrolling())return;const e=o.a.getAll().some(e=>!e.$element.cdIsInViewport(!0));this.commentFormButton[e?"show":"hide"]()},getHiddenNewCommentCount(){return this.hiddenNewCommentCount}}},function(e,t,i){"use strict";var n=i(1);const o={};t.a=class{constructor({element:e,buttonElement:t,labelElement:i,iconElement:n,tagName:s="a",classes:a=[],id:r,href:c,label:l,tooltip:d,flags:u,action:m}={}){e||(e=function(e){if(!o[e]){const t=document.createElement(e);t.tabIndex=0;t.setAttribute("role","button");o[e]=t}return o[e]}(s).cloneNode(!0));if(r)e.id=r;if(a.length)e.classList.add(...a);this.element=e;this.buttonElement=t||e;this.labelElement=i||e;this.iconElement=n;if(void 0!==c)this.setHref(c);if(void 0!==l)this.setLabel(l);if(void 0!==d)this.setTooltip(d);if(null!=u&&u.includes("progressive"))this.setIconProgressive();if(void 0!==m)this.setAction(m)}setDisabled(e){e=Boolean(e);this.element.classList.toggle("cd-button-disabled",e);this.buttonElement.ariaDisabled=e;this.buttonElement.tabIndex=e?-1:0;return this}setPending(e){e=Boolean(e);this.setDisabled(e);this.element.classList.toggle("cd-button-pending",e);return this}setHref(e){this.buttonElement.href=e;return this}setLabel(e){this.labelElement.textContent=e;return this}setTooltip(e){this.buttonElement.title=e;return this}maybeRunAction(e,t){if(!(this.isDisabled()||(Object(n.B)(t)||t.shiftKey)&&this.buttonElement.href)){t.preventDefault();e(t)}}setAction(e){this.buttonElement.onclick=e?t=>{this.maybeRunAction(e,t)}:e;this.buttonElement.onkeydown=e?t=>{if([13,32].includes(t.keyCode))this.maybeRunAction(e,t)}:e;return this}isDisabled(){return this.element.classList.contains("cd-button-disabled")}isPending(){return this.element.classList.contains("cd-button-pending")}hide(){this.element.style.display="none";return this}show(){this.element.style.display="";return this}setIconProgressive(){var e;null===(e=this.iconElement)||void 0===e||e.classList.add("oo-ui-image-progressive")}}},function(e,t,i){"use strict";var n=i(4),o=i.n(n),s=i(22),a=i(5),r=i(27),c=i(9),l=i(0),d=i(2),u=i(17),m=i(3),h=i(14);class TocItem{constructor(e){const t=e.querySelector(g.isInSidebar()?".sidebar-toc-text":".toctext");if(!t)throw["Couldn't find text for a link",e];const i=t.textContent,n=e.getAttribute("href").slice(1),o=e.parentNode;let[,s]=o.className.match(g.isInSidebar()?/sidebar-toc-level-(\d+)/:/\btoclevel-(\d+)/);s=Number(s);const a=e.querySelector(g.isInSidebar()?".sidebar-toc-numb":".tocnumber");let r;if(a)r=a.textContent;else{console.error(["Couldn't find a number for a link",e]);r="?"}Object.assign(this,{headline:i,id:n,level:s,number:r,$element:$(o),$link:$(e),$text:$(t)})}replaceText(e){const t=e.clone().find("*").each((e,t)=>{if(["B","EM","I","S","STRIKE","STRONG","SUB","SUP"].includes(t.tagName))[...t.attributes].forEach(e=>{t.removeAttribute(e.name)});else{[...t.childNodes].forEach(e=>{t.parentNode.insertBefore(e,t)});t.remove()}}).end().html();this.$text.html(t);this.headline=this.$text.text().trim()}}const g={maybeHide(){if(!g.isInSidebar()&&g.isPresent())if("1"===mw.cookie.get("hidetoc"))this.$element.find(".toctogglecheckbox").prop("checked",!0)},setup(e,t){this.$element=this.isInSidebar()?$(".sidebar-toc"):d.a.$root.find(".toc");this.tocItems=null;this.floating=null;if(this.isInSidebar())this.$element.find(".cd-toc-commentCount, .cd-toc-newCommentList, .cd-toc-addedCommentList, .cd-toc-subscriptionIcon, .cd-toc-subscriptionIcon-before").remove().end().find(".cd-toc-addedSection").removeClass("cd-toc-addedSection").each((e,t)=>{t.firstChild.onclick=""}).parent().parent().addClass("sidebar-toc-list-item-expanded")},getItem(e){if(!this.isPresent())return null;if(!this.tocItems){const e=[...this.$element.get(0).querySelectorAll("li > a")].filter(e=>"#"!==e.getAttribute("href"));try{this.tocItems=e.map(e=>new TocItem(e))}catch(e){console.error("Couldn't find an element of a table of contents item.",...e);this.tocItems=[];m.a.set("modifyToc",!1)}}return this.tocItems.find(t=>t.id===e)||null},markSubscriptions(){var e=this;return o()((function*(){if(e.isPresent()){yield d.a.bootProcess.getVisitsRequest();yield e.updateTocSectionsPromise;c.a.getAll().filter(t=>t.subscriptionState||e.isInSidebar()).forEach(e=>{e.updateTocLink()})}}))()},addCommentCount(){var e=this;return o()((function*(){if(!e.isPresent())return;yield e.updateTocSectionsPromise;let t=!1;c.a.getAll().forEach(e=>{var i;const n=e.getTocItem();if(!n)return;const o=e.comments.length;if(!o)return;const s=document.createElement("span");s.className="cd-toc-commentCount";const a=document.createElement("bdi"),r=null===(i=e.newComments)||void 0===i?void 0:i.length;if(r)a.textContent=l.a.s(t?"toc-commentcount-new":"toc-commentcount-new-full",o,r);else a.textContent=t?o:l.a.s("toc-commentcount-full",o);s.appendChild(a);n.$text.append(s);t=!0})}))()},handleSectionClick(e){e.preventDefault();d.a.reload({sectionId:e.currentTarget.getAttribute("href").slice(1),pushState:!0})},addToggleToSidebarToc(e,t,i){const n=document.createElement("button");n.className="mw-ui-icon mw-ui-icon-wikimedia-expand mw-ui-icon-small sidebar-toc-toggle";n.setAttribute("ariaExpanded","true");n.setAttribute("ariaControls",e.id);t.$element.append(n);n.click();if(i.includes(t.$element.attr("id")))n.click()},addSection(e,t,i,n){var o;let s=null===(o=e.match)||void 0===o?void 0:o.getTocItem();if(!s){const o=e.headline,a=e.tocLevel,r=t[a-1],c=r?void 0:t[t.length-1],l=document.createElement("li");l.id="toc-"+e.id;const d=this.isInSidebar()?"sidebar-toc-list-item sidebar-toc-level-"+a:"toclevel-"+a;l.className=d+" cd-toc-addedSection";const u=document.createElement("a");u.href="#"+e.id;if(this.isInSidebar())u.className="sidebar-toc-link cd-toc-link-sidebar";u.onclick=this.handleSectionClick.bind(this);let m;if(r)m=r.number;else if(c)m=c.number+".1";else m="1";const h=document.createElement("span"),g=this.isInSidebar()?"sidebar-toc-numb":"tocnumber";h.className=g+" cd-toc-hiddenTocNumber";h.textContent=m;u.appendChild(h);if(this.isInSidebar()){const e=document.createElement("div");e.className="sidebar-toc-text";e.appendChild(document.createTextNode(o));u.appendChild(e);l.appendChild(u)}else{const e=document.createElement("span");e.className="toctext";e.textContent=o;u.appendChild(e);l.appendChild(u)}if(r)r.$element.after(l);else if(c){const t=document.createElement("ul");t.id=`toc-${e.id}-sublist`;t.className="sidebar-toc-list";t.appendChild(l);if(this.isInSidebar()&&2===a&&!c.$element.find(".sidebar-toc-toggle").length)this.addToggleToSidebarToc(t,c,n);c.$element.append(t)}else if(this.isInSidebar())i.children("#toc-mw-content-text").after(l);else i.prepend(l);s={headline:o,level:a,number:m,$element:$(l)}}t[e.tocLevel-1]=s;t.splice(e.tocLevel)},addNewSections(e){if(!m.a.get("modifyToc")||!this.isPresent())return;if(!this.isInSidebar())d.a.saveRelativeScrollPosition({saveTocHeight:!0});const t=this.$element.find(".cd-toc-addedSection"),i=this.isInSidebar()?t.filter(".sidebar-toc-level-1").get().map(e=>e.id):void 0;t.remove();e.forEach((t,i)=>{t.parent=e.slice(0,i).reverse().find(e=>e.level<t.level)});e.forEach(e=>{e.tocLevel=e.parent?e.parent.tocLevel+1:1});const n=[],o=this.$element.children("ul");e.forEach(e=>{this.addSection(e,n,o,i)});if(!this.isInSidebar())d.a.restoreRelativeScrollPosition(!0)},getTargetElementForSection(e,t){var i;let n,o;if(t){const t=e.getTocItem();if(t)o=n=t.$link}else{var s;if(e.match){var a;n=null===(a=e.match.getTocItem())||void 0===a?void 0:a.$link}else{const t=$.escapeSelector(e.id);n=this.$element.find(`.cd-toc-addedSection a[href="#${t}"]`)}if(null!==(s=n)&&void 0!==s&&s.length){o=n;const e=n.next(".cd-toc-newCommentList");if(e.length)o=e}}return(null===(i=o)||void 0===i?void 0:i.get(0))||null},handleCommentClick(e){e.preventDefault();const t=e.currentTarget.getAttribute("href").slice(1),i=a.a.getByAnyId(t);if(i)i.scrollTo({smooth:!1,pushState:!0});else d.a.reload({commentIds:[t],pushState:!0})},addCommentList(e,t,i){if(!t)return;const n=document.createElement("ul");n.className=i?"cd-toc-newCommentList":"cd-toc-addedCommentList";let o="";e.forEach((t,s)=>{const a=i?t.getParent():t.parent,c=null!=a&&a.author&&t.level>1?l.a.s("navpanel-newcomments-names",t.author.getName(),a.author.getName()):t.author.getName(),d=s<3||4===e.length;let g,f;if(t.date){f=Object(h.d)(t.date);g=d&&"default"!==m.a.get("timestampFormat")?Object(h.b)(t.date):f}else g=l.a.s("navpanel-newcomments-unknowndate");const p="rtl"===l.a.g.contentTextDirection?"\u200f":"",b="default"===m.a.get("timestampFormat")?g:"",v=c+p+l.a.mws("comma-separator")+b;if(d){const e=document.createElement("li");n.appendChild(e);const o=document.createElement("a");o.href="#"+(t.dtId||t.id);if(this.isInSidebar())o.className="sidebar-toc-link cd-toc-link-sidebar";o.onclick=this.handleCommentClick.bind(this);let s;if("default"!==m.a.get("timestampFormat")){s=document.createElement("span");s.textContent=g;s.title=f;const e=i?void 0:()=>{u.a.updateTimestampsInRefreshButtonTooltip()};new r.a(s,t.date,!1,e).init()}if(this.isInSidebar()){const t=document.createElement("div");t.className="sidebar-toc-text cd-toc-commentLinkText-sidebar";t.textContent=v;if(s)t.appendChild(s);o.appendChild(t);e.appendChild(o)}else{const t=document.createElement("span"),i=this.isInSidebar()?"sidebar-toc-numb":"tocnumber";t.className=i+" cd-toc-bullet";t.innerHTML=l.a.sParse("bullet");e.appendChild(t);const n=document.createElement("span");n.className="toctext";o.textContent=v;if(s)o.appendChild(s);n.appendChild(o);e.appendChild(n)}}else o+=v+(b?"":f)+"\n"});if(e.length>4){const t=document.createElement("span");t.className="cd-toc-more";t.title=o.trim();t.textContent=l.a.s("toc-more",e.length-3);const i=document.createElement("li");i.appendChild(t);n.appendChild(i)}t.parentNode.insertBefore(n,t.nextSibling)},addNewComments(e){var t=this;return o()((function*(){var i;yield t.updateTocSectionsPromise;const n=null===(i=e.values().next().value)||void 0===i?void 0:i[0];if(!m.a.get("modifyToc")||!t.isPresent())return;t.$element.find(".cd-toc-addedCommentList").remove();if(!n)return;const o=n instanceof s.a;if(!t.isInSidebar()){const e=Boolean(d.a.getBootProcess().isFirstRun()||!o||d.a.getBootProcess().data("commentIds")||d.a.getBootProcess().data("sectionId"));d.a.saveRelativeScrollPosition({saveTocHeight:e})}e.forEach((e,i)=>{if(i)t.addCommentList(e,t.getTargetElementForSection(i,o),o)});if(!t.isInSidebar())d.a.restoreRelativeScrollPosition(!0)}))()},isInSidebar:()=>"vector-2022"===l.a.g.skin,isFloating(){if(null===this.floating)this.floating=Boolean(!this.isInSidebar()&&this.$element.closest($(d.a.getFloatingElements())).length);return this.floating},isPresent(){return Boolean(this.$element.length)},getBottomOffset(){return this.$element.offset().top+this.$element.outerHeight()}};t.a=g},function(e,t,i){"use strict";i.d(t,"c",(function(){return TreeWalker}));i.d(t,"b",(function(){return ElementsTreeWalker}));i.d(t,"a",(function(){return ElementsAndTextTreeWalker}));class TreeWalker{constructor(e,t,i=!1,n=e){this.acceptNode=t;this.root=e;this.currentNode=n;if(i){this.firstChildProp="firstElementChild";this.lastChildProp="lastElementChild";this.previousSiblingProp="previousElementSibling";this.nextSiblingProp="nextElementSibling"}else{this.firstChildProp="firstChild";this.lastChildProp="lastChild";this.previousSiblingProp="previousSibling";this.nextSiblingProp="nextSibling"}}tryMove(e){let t=this.currentNode;if(t===this.root&&!e.includes("Child"))return null;do{t=t[e]}while(t&&this.acceptNode&&!this.acceptNode(t));if(t)this.currentNode=t;return t||null}parentNode(){return this.tryMove("parentNode")}firstChild(){return this.tryMove(this.firstChildProp)}lastChild(){return this.tryMove(this.lastChildProp)}previousSibling(){return this.tryMove(this.previousSiblingProp)}nextSibling(){return this.tryMove(this.nextSiblingProp)}nextNode(){let e=this.currentNode;do{if(e[this.firstChildProp])e=e[this.firstChildProp];else{for(;e&&!e[this.nextSiblingProp]&&e.parentNode!==this.root;)e=e.parentNode;if(e)e=e[this.nextSiblingProp]}}while(e&&this.acceptNode&&!this.acceptNode(e));if(e)this.currentNode=e;return e}previousNode(){let e=this.currentNode;if(e!==this.root){do{if(e[this.previousSiblingProp]){e=e[this.previousSiblingProp];for(;e[this.lastChildProp];)e=e[this.lastChildProp]}else e=e.parentNode}while(e&&this.acceptNode&&!this.acceptNode(e));if(e)this.currentNode=e;return e}}}class ElementsTreeWalker extends TreeWalker{constructor(e,t){super(t,null,!0);if(e)this.currentNode=e}}class ElementsAndTextTreeWalker extends TreeWalker{constructor(e,t){super(t,e=>e.nodeType===Node.TEXT_NODE||e.nodeType===Node.ELEMENT_NODE);if(e)this.currentNode=e}}},function(e,t){e.exports=function(e,t,i){if(t in e)Object.defineProperty(e,t,{value:i,enumerable:!0,configurable:!0,writable:!0});else e[t]=i;return e},e.exports.__esModule=!0,e.exports.default=e.exports},function(e,t,i){"use strict";var n=i(4),o=i.n(n),s=i(18),a=i(6),r=i(3);function c(e){e.stopPropagation()}class CommentButton_CommentButton extends s.a{constructor(e){if(e.element)e.buttonElement=e.element.firstChild;super(e);if(e.href)this.buttonElement.oncontextmenu=c;if(e.element)delete this.labelElement;this.element.classList.add("cd-comment-button");this.widgetConstructor=e.widgetConstructor}createWidget(){const e=this.buttonElement.getAttribute("href");this.buttonWidget=this.widgetConstructor();const t=this.buttonWidget.$element.get(0);this.element.parentNode.replaceChild(t,this.element);this.element=t;this.buttonElement=t.firstChild;if(this.action)this.setAction(this.action);if(e){this.buttonWidget.setHref(e);this.buttonElement.oncontextmenu=c}}setDisabled(e){e=Boolean(e);if(r.a.get("reformatComments"))super.setDisabled(e);else{if(!this.buttonWidget)this.createWidget();this.buttonWidget.setDisabled(e)}return this}setPending(e){super.setPending(e);return this}setLabel(e){if(r.a.get("reformatComments"))super.setLabel(e);else{if(!this.buttonWidget)this.createWidget();this.buttonWidget.setLabel(e)}return this}setTooltip(e){if(r.a.get("reformatComments"))super.setTooltip(e);else{if(!this.buttonWidget)this.createWidget();this.buttonWidget.setTitle(e)}return this}setAction(e){super.setAction(e);this.action=e;return this}isDisabled(){var e;return r.a.get("reformatComments")?super.isDisabled():Boolean(null===(e=this.buttonWidget)||void 0===e?void 0:e.isDisabled())}isPending(){var e;return r.a.get("reformatComments")?super.isPending():Boolean(null===(e=this.buttonWidget)||void 0===e?void 0:e.isPending())}}var l=CommentButton_CommentButton,d=i(26),u=i(32),m=i(5);var h=class{constructor(){this.content={}}add(e,t){this.content[e]=t}remove(e){const t=this.content[e];if(t){delete this.content[e];const i=t.parent("dl, ul, ol");t.remove();if(i.is(":empty")){const e=i.parent("dd, li");if(e.length&&1===e.children().length)e.remove();else i.remove()}}}get(e){return this.content[e]||null}},g=i(27),cd=i(0),f=i(2),p=i(17),b=i(8),v=i(29),y=i(12),w=i(20),x=i(1),C=i(10),k=i(14),T=i(7),S=i(11);let E,O,N,P,L;function j(e){let t;if(["UL","OL"].includes(e.tagName)){t=Object(x.s)(e);t.left=t.outerLeft;t.right=t.outerRight}else t=e.getBoundingClientRect();return t}function D(){if(!p.a.getHiddenNewCommentCount()&&m.a.getAll().every(e=>!e.willFlashChangedOnSight)&&v.a.getLastCheckedRevisionId())b.b.getCurrent().markAsRead(v.a.getLastCheckedRevisionId())}class Comment_Comment extends u.a{constructor(e,t,i){super(e,t,i);this.bindEvents=this.bindEvents.bind(this);this.replyButtonClick=this.replyButtonClick.bind(this);this.editButtonClick=this.editButtonClick.bind(this);this.thankButtonClick=this.thankButtonClick.bind(this);this.copyLink=this.copyLink.bind(this);this.goToParentButtonClick=this.goToParentButtonClick.bind(this);this.highlightHovered=this.highlightHovered.bind(this);this.unhighlightHovered=this.unhighlightHovered.bind(this);this.hideMenu=this.hideMenu.bind(this);this.deferHideMenu=this.deferHideMenu.bind(this);this.dontHideMenu=this.dontHideMenu.bind(this);E=cd.a.g.commentElementPrototypes;this.author=y.a.get(this.authorName);this.$signature=$(this.signatureElement);this.isActionable=f.a.isPageActive()&&!f.a.getClosedDiscussions().some(e=>e.contains(this.elements[0]));this.highlightables.forEach(this.bindEvents);this.setAnchorHighlightable();const n=e=>{const t=new w.b(e,f.a.rootElement);for(;t.parentNode();)if(t.currentNode.classList.contains("cd-commentLevel"))return t.currentNode.tagName.toLowerCase()};if(0!==this.level){this.containerListType=n(this.highlightables[0]);this.ahContainerListType=n(this.anchorHighlightable)}this.isNew=null;this.isSeen=null;this.isTarget=!1;this.isHovered=!1;this.isChangedSincePreviousVisit=null;this.isChanged=null;this.isDeleted=null;this.willFlashChangedOnSight=!1;this.isInSingleCommentTable=!1;this.isCollapsed=!1;this.collapsedThread=null;this.subitemList=new h;this.genderRequestCallbacks=[]}setAnchorHighlightable(){if(this.highlightables.length>1){const e=[],t=[],i=[this.highlightables[0],this.highlightables[this.highlightables.length-1]];i.forEach((i,n)=>{const o=new w.b(i,f.a.rootElement);e[n]=0;for(;o.parentNode();){e[n]++;if(!t[n]&&["DL","UL","OL"].includes(o.currentNode.tagName))t[n]=o.currentNode.tagName.toLowerCase()}});const n=Math.min(...e);let o;for(let i=0;i<2;i++)if(e[i]===n&&void 0===o||"ol"===t[o]&&"ol"!==t[i])o=i;this.anchorHighlightable=i[o]}else this.anchorHighlightable=this.highlightables[0]}processPossibleSignatureNode(e){if(e){if(e.nodeType===Node.TEXT_NODE||!e.children.length)e.textContent=e.textContent.replace(cd.a.config.signaturePrefixRegexp,"").replace(cd.a.config.signaturePrefixRegexp,"");if(e.tagName&&(e.getAttribute("style")||["SUP","SUB"].includes(e.tagName))&&e.textContent.length<30&&(!(e.classList.length||["B","STRONG"].includes(e.tagName)||e.querySelector("b, strong"))||e.textContent.toLowerCase()===this.author.getName().toLowerCase()))e.remove()}}cleanUpSignature(){var e;let t=this.signatureElement.previousSibling;if(!t){const e=this.signatureElement.parentNode,i=e.previousSibling;if(i&&Object(x.E)(i,!0)){const n=e.previousElementSibling;if(!n||Object(x.E)(n))t=i}}const i=null===(e=t)||void 0===e?void 0:e.previousSibling;this.processPossibleSignatureNode(t);if(t&&i&&(!t.parentNode||!t.textContent.trim())){const e=i.previousSibling;this.processPossibleSignatureNode(i);if(!i.parentNode)this.processPossibleSignatureNode(e)}}rewrapHighlightables(){[this.highlightables[0],this.highlightables[this.highlightables.length-1]].filter(x.Y).filter(e=>cd.a.g.badHighlightableElements.includes(e.tagName)||this.highlightables.length>1&&"LI"===e.tagName&&"OL"===e.parentNode.tagName||Array.from(e.classList).some(e=>!e.startsWith("cd-"))).forEach(e=>{const t=document.createElement("div"),i=e;this.replaceElement(e,t);t.appendChild(i);this.addAttributes();i.classList.remove("cd-comment-part","cd-comment-part-first","cd-comment-part-last");delete i.dataset.cdCommentIndex})}replaceSignatureWithHeader(){const e=[];this.headerElement=E.headerElement.cloneNode(!0);const t=this.headerElement.firstChild.firstChild,i=t.nextElementSibling,n=t.firstChild,o=i.firstElementChild;let s;if(r.a.get("showContribsLink")){s=i.lastElementChild;if(!this.author.isRegistered()){s.previousSibling.remove();s.remove()}}if(this.authorLink){var a,c,d,u;if(this.extraSignatures.length)this.authorLink=this.authorLink.cloneNode(!0);const e=null===(a=(c=cd.a.config).beforeAuthorLinkParse)||void 0===a?void 0:a.call(c,this.authorLink,t);t.parentNode.replaceChild(this.authorLink,t);this.authorLink.classList.add("cd-comment-author");this.authorLink.innerHTML="";this.authorLink.appendChild(n);null===(d=(u=cd.a.config).afterAuthorLinkParse)||void 0===d||d.call(u,this.authorLink,e)}else{this.authorLink=t;let i;if(this.author.isRegistered()){i="User:"+this.author.getName();e.push({pageName:i,link:this.authorLink})}else i=`${cd.a.g.contribsPage}/${this.author.getName()}`;this.authorLink.title=i;this.authorLink.href=mw.util.getUrl(i)}if(this.authorTalkLink){if(this.extraSignatures.length)this.authorTalkLink=this.authorTalkLink.cloneNode(!0);o.parentNode.replaceChild(this.authorTalkLink,o);this.authorTalkLink.textContent=cd.a.s("comment-author-talk")}else{this.authorTalkLink=o;const t="User talk:"+this.author.getName();e.push({pageName:t,link:this.authorTalkLink});this.authorTalkLink.title=t;this.authorTalkLink.href=mw.util.getUrl(t)}n.textContent=this.author.getName();if(r.a.get("showContribsLink")&&this.author.isRegistered()){const e=`${cd.a.g.contribsPage}/${this.author.getName()}`;s.title=e;s.href=mw.util.getUrl(e)}if(this.timestamp){this.copyLinkButton=new l({label:this.reformattedTimestamp||this.timestamp,tooltip:this.timestampTitle,classes:["cd-comment-button-label","cd-comment-timestamp","mw-selflink"],action:this.copyLink,href:this.dtId&&"#"+this.dtId});this.headerElement.appendChild(this.copyLinkButton.element);this.timestampElement=this.copyLinkButton.labelElement;new g.a(this.timestampElement,this.date,!r.a.get("hideTimezone")).init()}this.$header=$(this.headerElement);this.rewrapHighlightables();this.highlightables[0].insertBefore(this.headerElement,this.highlightables[0].firstChild);if(!this.extraSignatures.length){this.cleanUpSignature();this.signatureElement.remove()}return e}addMenu(){const e=document.createElement("div");e.className="cd-comment-menu";this.menuElement=e;this.$menu=$(this.menuElement);this.addReplyButton();this.addEditButton();this.addThankButton();this.addGoToParentButton();this.highlightables[this.highlightables.length-1].appendChild(this.menuElement)}addReplyButton(){var e;if(!this.isActionable)return;const t=this.replyButtonClick;if(r.a.get("reformatComments")){this.replyButton=new l({label:cd.a.s("cm-reply"),classes:["cd-comment-button-label"],action:t});this.menuElement.appendChild(this.replyButton.element)}else{const e=E.replyButton.cloneNode(!0),i=E.getReplyButton;this.replyButton=new l({element:e,action:t,widgetConstructor:i});this.overlayMenu.appendChild(this.replyButton.element)}if(null!==(e=m.a.getByIndex(this.index+1))&&void 0!==e&&e.isOutdented){this.replyButton.setDisabled(!0);this.replyButton.setTooltip(cd.a.s("cm-reply-outdented-tooltip"))}}addEditButton(){if(this.isActionable&&(this.isOwn||r.a.get("allowEditOthersComments"))){const e=this.editButtonClick;if(r.a.get("reformatComments")){this.editButton=new l({label:cd.a.s("cm-edit"),classes:["cd-comment-button-label"],action:e});this.menuElement.appendChild(this.editButton.element)}else{const t=E.editButton.cloneNode(!0),i=E.getEditButton;this.editButton=new l({element:t,action:e,widgetConstructor:i});this.overlayMenu.appendChild(this.editButton.element)}}}addThankButton(){if(this.author.isRegistered()&&this.date&&!this.isOwn){if(!O){O=function(e){const t=Object.assign({},e);Object.keys(t).forEach(e=>{const i=t[e];if(!i.thankUnixTime||i.thankUnixTime<Date.now()-60*cd.a.g.msInDay)delete t[e]});return t}(Object(x.u)("thanks"));Object(x.Q)("thanks",O)}const e=Object.keys(O).some(e=>this.id===O[e].id&&Object(x.d)(this.getText(),O[e].text)>.66),t=this.thankButtonClick;if(r.a.get("reformatComments")){this.thankButton=new l({label:cd.a.s(e?"cm-thanked":"cm-thank"),tooltip:cd.a.s(e?"cm-thanked-tooltip":"cm-thank-tooltip"),classes:["cd-comment-button-label"],action:t});this.menuElement.appendChild(this.thankButton.element)}else{const e=E.thankButton.cloneNode(!0),i=E.getThankButton;this.thankButton=new l({element:e,action:t,widgetConstructor:i});this.overlayMenu.appendChild(this.thankButton.element)}if(e)this.setThanked()}}addCopyLinkButton(){if(this.id&&!r.a.get("reformatComments")){const e=E.copyLinkButton.cloneNode(!0),t=E.getCopyLinkButton,i=this.dtId?"#"+this.dtId:void 0;this.copyLinkButton=new l({element:e,action:this.copyLink,widgetConstructor:t,href:i});this.overlayMenu.appendChild(this.copyLinkButton.element)}}addGoToParentButton(){if(this.getParent()){const e=this.goToParentButtonClick;if(r.a.get("reformatComments")){this.goToParentButton=new l({tooltip:cd.a.s("cm-gotoparent-tooltip"),classes:["cd-comment-button-icon","cd-comment-button-goToParent"],action:e});this.headerElement.appendChild(this.goToParentButton.element)}else{const t=E.goToParentButton.cloneNode(!0),i=E.getGoToParentButton;this.goToParentButton=new l({element:t,action:e,widgetConstructor:i});this.overlayMenu.appendChild(this.goToParentButton.element)}}}addGoToChildButton(){if(r.a.get("reformatComments")){this.goToChildButton=new l({tooltip:cd.a.s("cm-gotochild-tooltip"),classes:["cd-comment-button-icon","cd-comment-button-goToChild"]});const e=this.headerElement.lastChild;this.headerElement.insertBefore(this.goToChildButton.element,null==e?void 0:e.nextSibling)}else{const e=E.goToChildButton,t=E.getGoToChildButton;this.goToChildButton=new l({element:e,widgetConstructor:t});this.$overlayMenu.prepend(e)}}formatTimestamp(e,t){let i,n="";if(cd.a.g.areTimestampsAltered)i=Object(k.b)(e,!r.a.get("hideTimezone"));if("relative"===r.a.get("timestampFormat")&&r.a.get("useUiTime")&&cd.a.g.contentTimezone!==cd.a.g.uiTimezone)n=Object(k.d)(e,!0)+"\n";n+=t;return{timestamp:i,title:n}}reformatTimestamp(){if(!this.date)return;const{timestamp:e,title:t}=this.formatTimestamp(this.date,this.timestampElement.textContent);if(e){this.reformattedTimestamp=e;this.timestampTitle=t;if(!r.a.get("reformatComments")||this.extraSignatures.length){this.timestampElement.textContent=e;this.timestampElement.title=t;new g.a(this.timestampElement,this.date,!r.a.get("hideTimezone")).init();this.extraSignatures.forEach(e=>{const{timestamp:t,title:i}=this.formatTimestamp(e.date,e.timestampText);e.timestampElement.textContent=t;e.timestampElement.title=i;new g.a(e.timestampElement,e.date,!r.a.get("hideTimezone")).init()})}}}bindEvents(e){if(!r.a.get("reformatComments")){e.onmouseenter=this.highlightHovered;e.onmouseleave=this.unhighlightHovered;e.ontouchstart=this.highlightHovered}}reviewHighlightables(){for(let e=0;e<this.highlightables.length;e++){const t=this.highlightables[e];if(Array.from(t.classList).some(e=>!e.startsWith("cd-")||"cd-comment-replacedPart"===e)){const i=0===e&&t.classList.contains("cd-comment-replacedPart")?t.firstChild:t;if(this.highlightables.length>1&&(f.a.getFloatingElements().includes(i)||f.a.getHiddenElements().includes(i))){if(t.classList.contains("cd-comment-part-first")){t.classList.remove("cd-comment-part-first");this.highlightables[e+1].classList.add("cd-comment-part-first")}if(t.classList.contains("cd-comment-part-last")){t.classList.remove("cd-comment-part-last");this.highlightables[e-1].classList.add("cd-comment-part-last")}delete t.dataset.commentIndex;this.highlightables.splice(e,1);e--;this.setLevels(!1);this.setAnchorHighlightable()}}}}replyButtonClick(){if(this.replyForm)this.replyForm.cancel();else this.reply()}editButtonClick(){this.edit()}thankButtonClick(){this.thank()}goToParentButtonClick(){this.goToParent()}setOffsetProperty(e,t){if(t.set)if(t.considerFloating){this.offset=e;this.firstHighlightableWidth=this.highlightables[0].offsetWidth}else this.roughOffset=e}getAdjustedRects(e,t,i,n=f.a.getFloatingElements().map(x.s)){let o=0,s=!1;n.forEach(e=>{const t=scrollY+e.outerTop,n=scrollY+e.outerBottom;if(i>t&&i<n+cd.a.g.contentLineHeight)s=!0;if(i>t&&top<n+cd.a.g.contentLineHeight)o++});if(s){const i=[];this.highlightables.forEach((e,t)=>{i[t]=e.style.overflow;e.style.overflow="hidden"});e=j(this.highlightables[0]);t=1===this.elements.length?e:j(this.highlightables[this.highlightables.length-1]);if(o<=1)this.highlightables.forEach((e,t)=>{e.style.overflow=i[t]});else this.highlightables.forEach((e,t)=>{if(f.a.getFloatingElements().some(t=>e.contains(t)))e.style.overflow=i[t]})}return[e,t]}setStretchedProperties(e,t){const i=this.getLayersContainer().convenientDiscussionsIsTopLayersContainer;this.isStartStretched=!1;this.isEndStretched=!1;if(i)if(0===this.level){const i=f.a.getContentColumnOffsets(),n=e-i.startMargin-2,o=t+i.startMargin+2;this.isStartStretched="ltr"===this.getTextDirection()?n<=i.start:o>=i.start;this.isEndStretched="ltr"===this.getTextDirection()?o>=i.end:n<=i.end}}getOffset(e={}){var t,i;null!==(t=e.considerFloating)&&void 0!==t||(e.considerFloating=Boolean(e.floatingRects));null!==(i=e.set)&&void 0!==i||(e.set=!1);let n=j(this.highlightables[0]),o=1===this.elements.length?n:j(this.highlightables[this.highlightables.length-1]);if(!Object(x.y)(n,o)){this.setOffsetProperty(null,e);return null}const s=window.scrollY;let a;if(this.offset){const e=Math.abs(s+n.top-this.offset.top)<.01,t=Math.abs(o.bottom-n.top-(this.offset.bottom-this.offset.top))<.01,i=Math.abs(this.highlightables[0].offsetWidth-this.firstHighlightableWidth)<.01;a=!e||!t||!i}else a=!0;if(!a){if(e.set&&!e.considerFloating)this.roughOffset=this.offset;return e.set?!1:this.offset}const r=s+n.top,c=s+o.bottom;if(e.considerFloating)[n,o]=this.getAdjustedRects(n,o,c,e.floatingRects);const l=window.scrollX,d=l+Math.min(n.left,o.left),u=l+Math.max(n.right,o.right);if(e.considerFloating)this.setStretchedProperties(d,u);const m={top:r,bottom:c,left:d,right:u,downplayedBottom:c-r>window.innerHeight-200?r+(window.innerHeight-200):c};this.setOffsetProperty(m,e);return e.set?!0:m}getTextDirection(){if(!this.textDirection)if(f.a.areThereLtrRtlMixes()){const e=this.elements[this.elements.length-1].closest(".mw-content-ltr, .mw-content-rtl").classList.contains("mw-content-ltr");this.textDirection=e?"ltr":"rtl"}else this.textDirection=cd.a.g.contentTextDirection;return this.textDirection}getMargins(){let e;if("ol"===this.ahContainerListType)e=1===this.highlightables.length?3.2*cd.a.g.contentFontSize:2.2*cd.a.g.contentFontSize-1;else if(this.isStartStretched)e=f.a.getContentColumnOffsets().startMargin;else{const t=this.isCollapsed?this.thread.expandNote:this.anchorHighlightable;if(t.parentNode.classList.contains("cd-commentLevel"))e=-1;else if(this.offset&&t.parentNode.parentNode.classList.contains("cd-commentLevel")){const i="ltr"===this.getTextDirection()?"left":"right";e=Math.abs(this.offset[i]-t.parentNode.getBoundingClientRect()[i])-1}else e=0===this.level?cd.a.g.commentFallbackSideMargin:cd.a.g.contentFontSize}const t=this.isEndStretched?f.a.getContentColumnOffsets().startMargin:cd.a.g.commentFallbackSideMargin;return{left:"ltr"===this.getTextDirection()?e:t,right:"ltr"===this.getTextDirection()?t:e}}setLayersOffsetProperty(e={}){const t=this.getLayersContainerOffset();if(!t)return null;const i=this.getOffset(Object.assign({},e,{considerFloating:!0,set:!0}));if(this.offset){const e=this.getMargins();this.layersOffset={top:this.offset.top-t.top,left:this.offset.left-e.left-t.left,width:this.offset.right+e.right-(this.offset.left-e.left),height:this.offset.bottom-this.offset.top}}else this.layersOffset=null;return i}hideMenu(e){if(e)e.preventDefault();this.overlayInnerWrapper.style.display="none"}deferHideMenu(e){if(1===e.which)this.hideMenuTimeout=setTimeout(this.hideMenu,1200)}dontHideMenu(){clearTimeout(this.hideMenuTimeout)}createLayers(){this.underlay=E.underlay.cloneNode(!0);m.a.underlays.push(this.underlay);this.overlay=E.overlay.cloneNode(!0);this.line=this.overlay.firstChild;this.marker=this.overlay.firstChild.nextSibling;if(!r.a.get("reformatComments")){this.overlayInnerWrapper=this.overlay.lastChild;this.overlayGradient=this.overlayInnerWrapper.firstChild;this.overlayMenu=this.overlayInnerWrapper.lastChild;this.overlayInnerWrapper.oncontextmenu=this.hideMenu;this.overlayInnerWrapper.onmousedown=this.deferHideMenu;this.overlayInnerWrapper.onmouseup=this.dontHideMenu;this.addGoToParentButton();this.addCopyLinkButton();this.addThankButton();this.addEditButton();this.addReplyButton()}this.updateLayersStyles(!0);this.$underlay=$(this.underlay);this.$overlay=$(this.overlay);this.$marker=$(this.marker);if(!r.a.get("reformatComments")){this.$overlayMenu=$(this.overlayMenu);this.$overlayGradient=$(this.overlayGradient)}mw.hook("convenientDiscussions.commentLayersCreated").fire(this,cd.a)}updateClassesForType(e,t){t=Boolean(t);if(this.underlay.classList.contains("cd-comment-underlay-"+e)!==t){this.underlay.classList.toggle("cd-comment-underlay-"+e,t);this.overlay.classList.toggle("cd-comment-overlay-"+e,t);if("deleted"===e){var i,n;null===(i=this.replyButton)||void 0===i||i.setDisabled(t);null===(n=this.editButton)||void 0===n||n.setDisabled(t)}else if("hovered"===e&&!t)this.overlayInnerWrapper.style.display=""}}updateLayersStyles(e=!1){if(this.underlay){this.updateClassesForType("new",this.isNew);this.updateClassesForType("own",this.isOwn);this.updateClassesForType("deleted",this.isDeleted);if(e){if(this.isLineGapped)this.line.classList.add("cd-comment-overlay-line-closingGap");if(this.isStartStretched)this.overlay.classList.add("cd-comment-overlay-stretchedStart");if(this.isEndStretched)this.overlay.classList.add("cd-comment-overlay-stretchedEnd")}}}configureLayers(e={}){var t,i;null!==(t=e.add)&&void 0!==t||(e.add=!0);null!==(i=e.update)&&void 0!==i||(e.update=!0);const n=this.setLayersOffsetProperty(e);if(null===n)return null;if(this.underlay){this.updateLayersStyles();if(n&&e.update)this.updateLayersOffset();return n}else{this.createLayers();if(e.add)this.addLayers();return!0}}addLayers(){if(this.underlay){this.updateLayersOffset();this.getLayersContainer().appendChild(this.underlay);this.getLayersContainer().appendChild(this.overlay)}}updateLayersOffset(){if(this.underlay){this.underlay.style.top=this.overlay.style.top=this.layersOffset.top+"px";this.underlay.style.left=this.overlay.style.left=this.layersOffset.left+"px";this.underlay.style.width=this.overlay.style.width=this.layersOffset.width+"px";this.underlay.style.height=this.overlay.style.height=this.layersOffset.height+"px"}}removeLayers(){var e;if(this.underlay){null===(e=this.$animatedBackground)||void 0===e||e.add(this.$marker).stop(!0,!0);m.a.underlays.splice(m.a.underlays.indexOf(this.underlay),1);this.dontHideMenu();this.underlay.remove();this.underlay=null;this.$underlay=null;this.overlay.remove();this.overlay=null;this.$overlay=null;this.isHovered=!1}}getLayersContainer(){if(void 0===this.layersContainer){let e;const t=this.elements[this.elements.length-1],i=new w.c(document.body,null,!0,t);for(;i.parentNode();){const t=i.currentNode;if(t.classList.contains("cd-connectToPreviousItem"))continue;let n=t.convenientDiscussionsStyle;if(!n){n=window.getComputedStyle(t);t.convenientDiscussionsStyle=n}const o=Array.from(t.classList);if(["absolute","relative"].includes(n.position)||t!==f.a.$content.get(0)&&(o.includes("mw-content-ltr")||o.includes("mw-content-rtl")))e=t;if(n.backgroundColor.includes("rgb(")||"none"!==n.backgroundImage&&!e){e=t;e.classList.add("cd-commentLayersContainer-parent-relative")}if(e)break}e||(e=document.body);e.classList.add("cd-commentLayersContainer-parent");let n=e.firstElementChild;if(!n.classList.contains("cd-commentLayersContainer")){n=document.createElement("div");n.classList.add("cd-commentLayersContainer");e.insertBefore(n,e.firstChild);n.convenientDiscussionsIsTopLayersContainer=!n.parentNode.parentNode.closest(".cd-commentLayersContainer-parent")}this.layersContainer=n;Object(x.a)(m.a.layersContainers,n)}return this.layersContainer}getLayersContainerOffset(){const e=this.getLayersContainer();let t=e.convenientDiscussionsCachedLayersContainerTop,i=e.convenientDiscussionsCachedLayersContainerLeft;if(void 0===t||e.convenientDiscussionsCouldHaveMoved){const n=e.getBoundingClientRect();if(!Object(x.y)(n))return null;t=n.top+window.scrollY;i=n.left+window.scrollX;e.convenientDiscussionsCouldHaveMoved=!1;e.convenientDiscussionsCachedLayersContainerTop=t;e.convenientDiscussionsCachedLayersContainerLeft=i}return{top:t,left:i}}highlightHovered(e){var t;if(this.isHovered||f.a.isPageOverlayOn()||r.a.get("reformatComments"))return;if(e&&"touchstart"===e.type)m.a.getAll().filter(e=>e.isHovered).forEach(e=>{e.unhighlightHovered()});null===(t=this.$animatedBackground)||void 0===t||t.stop(!0,!0);if(!this.configureLayers()&&this.underlay){this.updateClassesForType("hovered",!0);this.isHovered=!0}}unhighlightHovered(){var e;if(this.isHovered&&!r.a.get("reformatComments")){null===(e=this.$animatedBackground)||void 0===e||e.stop(!0,!0);this.dontHideMenu();this.updateClassesForType("hovered",!1);this.isHovered=!1}}animateToColors(e,t,i){const n=e=>{const t={backgroundColor:e};if("rgba(0, 0, 0, 0)"===t.backgroundColor)t.opacity=0;return t},o={backgroundColor:"",backgroundImage:"",opacity:""},s=n(e);this.$marker.animate(s,400,"swing",()=>{this.$marker.css(o)});const a=this,r=n(t);this.$animatedBackground.animate(r,400,"swing",(function(){if(this===a.$animatedBackground.get(-1)){if(i)i();a.$animatedBackground.add(a.$overlayGradient).css(o)}}))}animateBack(e,t){var i,n;this.animateBackBound=null;if(null===(i=this.$underlay)||void 0===i||!i.parent().length){if(t)t();return}const o=this.$marker.css("background-color"),s=this.$underlay.css("background-color");this.updateClassesForType(e,!1);const a=this.$marker.css("background-color");let r=this.$underlay.css("background-color");if(r===s)r="rgba(0, 0, 0, 0)";this.$marker.css({backgroundColor:o,opacity:1});this.$animatedBackground.css({backgroundColor:s});null===(n=this.$overlayGradient)||void 0===n||n.css({backgroundImage:"none"});this.animateToColors(a,r,t)}flash(e,t,i){this.configureLayers();if(this.$underlay){if(this.animateBackBound){clearTimeout(this.unhighlightTimeout);this.animateBackBound()}this.$animatedBackground=this.$underlay.add(this.$overlayMenu);this.$animatedBackground.add(this.$marker).stop(!0,!0);this.updateClassesForType(e,!0);this.animateBackBound=this.animateBack.bind(this,e,i);this.unhighlightTimeout=setTimeout(this.animateBackBound,t)}else if(i)i()}flashTarget(){this.isTarget=!0;this.flash("target",1500,()=>{this.isTarget=!1})}flashChanged(){this.willFlashChangedOnSight=!1;this.flash("changed",1e3);if(this.isChanged){const e=Object(x.u)("seenRenderedChanges"),t=mw.config.get("wgArticleId");e[t]=e[t]||{};e[t][this.id]={htmlToCompare:this.htmlToCompare,seenUnixTime:Date.now()};Object(x.Q)("seenRenderedChanges",e)}D()}flashChangedOnSight(){this.willFlashChangedOnSight=!0;if(!document.hidden&&this.isInViewport())this.flashChanged()}scrubDiff(e,t,i){const n=[[],[]];t.forEach((e,t)=>{const o=e.slots.main.content,s=this.locateInCode(o,i[t]),a=Object(x.f)(o.slice(0,s.lineStartIndex),/\n/g)+1,r=a+Object(x.f)(o.slice(s.lineStartIndex,s.signatureEndIndex),/\n/g);for(let e=a;e<=r;e++)n[t].push(e)});const o=$(Object(x.ab)(e)),s=[];let r="";o.find("tr").each((e,t)=>{const i=$(t),o=i.children(".diff-lineno");for(let e=0;e<o.length;e++){const t=o.eq(e).text().match(/\d+/);s[e]=Number((t||[])[0]);if(!s[e])throw new a.a({type:"parse"});if(1===e)return}if(!i.children(".diff-marker").length)return;let c=!1;for(let e=0;e<2;e++)if(!i.children().eq(2*e).hasClass("diff-empty")){if(n[e].includes(s[e]))c=!0;s[e]++}if(c)r+=i.prop("outerHTML")});return $(Object(x.ab)(r))}showDiff(e,t){var i=this;return o()((function*(){var n,o,s,r;if(Object(x.g)("mediawiki.diff.styles"))return;let c=Math.min(mw.config.get("wgRevisionId"),e),l=Math.max(mw.config.get("wgRevisionId"),e);const d=f.a.getApi().post({action:"query",revids:[c,l],prop:"revisions",rvslots:"main",rvprop:["ids","content"],redirects:!mw.config.get("wgIsRedirect")}).catch(T.m),u=f.a.getApi().post({action:"compare",fromtitle:i.getSourcePage().name,fromrev:c,torev:l,prop:["diff"]}).catch(T.m);let[m,h]=yield Promise.all([d,u,mw.loader.using(["mediawiki.diff","mediawiki.diff.styles"])]);const g=null===(n=m.query)||void 0===n?void 0:null===(o=n.pages)||void 0===o?void 0:null===(s=o[0])||void 0===s?void 0:s.revisions,p=null==h?void 0:null===(r=h.compare)||void 0===r?void 0:r.body;if(!g||void 0===p)throw new a.a({type:"api",code:"noData"});const b=i.scrubDiff(p,g,t);if(!b.find(".diff-deletedline, .diff-addedline").length)throw new a.a({type:"parse",code:"emptyDiff",message:cd.a.sParse("comment-diff-empty")});const v=$("<div>").append(b,$("<div>").addClass("cd-commentDiffView-below").append($("<a>").attr("href",i.getSourcePage().getUrl({oldid:c,diff:l})).attr("target","_blank").attr("data-instantdiffs-link","link").text(cd.a.s("comment-diff-full")),cd.a.sParse("dot-separator"),$("<a>").attr("href",i.getSourcePage().getUrl({action:"history"})).attr("target","_blank").text(cd.a.s("comment-diff-history")))).children();mw.hook("wikipage.content").fire(v);OO.ui.alert(v,{title:cd.a.s("comment-diff-title"),size:"larger"})}))()}markAsChanged(e,t,i,n){var c=this;let l;switch(e){case"changed":default:this.isChanged=!0;l="comment-changed";break;case"changedSince":this.isChangedSincePreviousVisit=!0;l="comment-changedsince";break;case"deleted":this.isDeleted=!0;l="comment-deleted"}const d=t?void 0:new s.a({label:cd.a.s("comment-changed-refresh"),action:()=>{f.a.reload("deleted"===e?{}:{commentIds:[this.id]})}}),u="deleted"===e||this.getSourcePage()!==b.b.getCurrent()?void 0:new s.a({label:cd.a.s("comment-diff"),action:(m=o()((function*(){u.setPending(!0);try{yield c.showDiff(i,n)}catch(t){var e;let i=cd.a.sParse("comment-diff-error");if(t instanceof a.a){const{type:e,message:n}=t.data;if(n)i=n;else if("network"===e)i+=" "+cd.a.sParse("error-network")}mw.notify(Object(x.Z)(i),{type:"emptyDiff"===(null===(e=t.data)||void 0===e?void 0:e.code)?"info":"error"})}u.setPending(!1)})),function(){return m.apply(this,arguments)})});var m;let h,g;if(r.a.get("reformatComments")){l+="-short";h=g=cd.a.sParse("dot-separator")}else{h=" ";g=d?cd.a.sParse("dot-separator"):" "}$(this.highlightables).find(".cd-changeMark").remove();const p=$("<span>").addClass("cd-changeMark").text(cd.a.s(l));if(d)p.append(h,d.element);else p.addClass("cd-changeMark-newVersionRendered");if(u)p.append(g,u.element);if(r.a.get("reformatComments"))this.$header.append(p);else{let e,t=$(this.highlightables).last();do{e=t;t=e.children().last()}while(t.length&&!Object(x.E)(t.get(0)));if(!e.find(".cd-changeMark-before").length)e.append(" ",$("<span>").addClass("cd-changeMark-before"));e.append(p)}if(t)this.flashChangedOnSight()}unmarkAsChanged(e){switch(e){case"changed":default:this.isChanged=!1;break;case"deleted":this.isDeleted=!1;this.updateLayersStyles()}this.$elements.last().find(".cd-changeMark").remove();if("changed"===e)if(this.willFlashChangedOnSight){this.willFlashChangedOnSight=!1;D()}else{const e=Object(x.u)("seenRenderedChanges"),t=mw.config.get("wgArticleId");e[t]=e[t]||{};delete e[t][this.id];Object(x.Q)("seenRenderedChanges",e);this.flashChangedOnSight()}}update(e,t){const i=[...this.$elements].map(e=>e.tagName),n=t.hiddenElementsData.some(e=>"reference"===e.type),o=!t.hiddenElementsData.length||t.hiddenElementsData.every(e=>"templateStyles"!==e.type||"STYLE"===e.tagName)||e.hiddenElementsData.every(e=>"templateStyles"!==e.type||"STYLE"!==e.tagName);if(!n&&o&&Object(x.b)(i,t.elementNames)){const e=this.$elements.find(".autonumber").text().match(/\d+/);let n=e?e[0]:1;t.elementHtmls.forEach((e,n)=>{e=e.replace(/\x01(\d+)_\w+\x02/g,(e,i)=>t.hiddenElementsData[i-1].html);if(/^H[1-6]$/.test(i[n])){const t=this.$elements.eq(n).find(".mw-headline");if(t.length){const i=t.find(".mw-headline-number"),n=$(e);t.html(n.html()).prepend(i);const s=this.section;if(s){const e=s.headline;s.parseHeadline();if(!r.a.get("useTopicSubscription")&&s.subscriptionState&&s.headline!==e)s.subscribe("quiet",e);if(r.a.get("modifyToc")){var o;null===(o=s.getTocItem())||void 0===o||o.replaceText(n)}}}}else this.replaceElement(this.$elements.eq(n),e)});this.$elements.find(".autonumber").each((e,t)=>{$(t).text(`[${n}]`);n++});this.$elements.attr("data-cd-comment-index",this.index);if(r.a.get("reformatComments")){this.signatureElement=this.$elements.find(".cd-signature").get(0);this.replaceSignatureWithHeader();this.addMenu()}else{this.timestampElement=this.$elements.find(".cd-signature .cd-timestamp").get(0);this.reformatTimestamp()}mw.hook("wikipage.content").fire(this.$elements);delete this.cachedText;return!0}else return!1}scrollIntoView(e){(this.editForm?this.editForm.$element:this.$elements).cdScrollIntoView(e)}scrollTo({smooth:e=!0,expandThreads:t=!1,flash:i=!0,pushState:n=!1,callback:o}={}){if(t)this.expandAllThreadsDownTo();const s=this.dtId||this.id;if(n&&s){const e=Object.assign({},history.state,{cdJumpedToComment:!0});history.pushState(e,"","#"+s)}if(this.isCollapsed){this.getVisibleExpandNote().cdScrollTo("top",e,o);const t=mw.notification.notify(Object(x.Z)(cd.a.sParse("navpanel-firstunseen-hidden"),{callbacks:{"cd-notification-expandThread":()=>{this.scrollTo({smooth:e,expandThreads:!0,flash:i,pushState:n,callback:o});t.close()}}}),{title:cd.a.s("navpanel-firstunseen-hidden-title")})}else{const t=this.getOffset({considerFloating:!0});(this.editForm?this.editForm.$element:this.$elements).cdScrollIntoView(this.isOpeningSection||this.editForm||t&&t.bottom!==t.downplayedBottom?"top":"center",e,o);if(i)this.flashTarget()}}goToParent(){const e=this.getParent();if(e){e.scrollTo({pushState:!0});e.configureLayers();if(!e.goToChildButton)e.addGoToChildButton();e.goToChildButton.setAction(()=>{this.scrollTo({pushState:!0})})}else console.error("This comment has no parent.")}generateDiffView(){var e=this;return o()((function*(){const t=yield e.findEdit(),i=yield e.getDiffLink();return $("<div>").addClass("cd-diffView-diff").append($("<div>").append($("<a>").addClass("cd-diffView-nextDiffLink").attr("href",i.replace(/&diff=(\d+)/,"&oldid=$1&diff=next")).attr("target","_blank").attr("data-instantdiffs-link","link").text(cd.a.mws("nextdiff"))).append(cd.a.sParse("cld-summary"),cd.a.mws("colon-separator"),Object(x.Z)(t.parsedcomment,{targetBlank:!0}).addClass("comment")),Object(x.ab)(t.diffBody))}))()}copyLink(e){var t=this;return o()((function*(){if(!f.a.isPageOverlayOn())f.a.showCopyLinkDialog(t,e)}))()}findDiffMatches(e,t){var i=this;return o()((function*(){const n=/<td [^>]*class="[^"]*\bdiff-empty\b[^"]*"[^>]*>\s*<\/td>\s*<td [^>]*class="[^"]*\bdiff-marker\b[^"]*"[^>]*>\s*<\/td>\s*<td [^>]*class="[^"]*\bdiff-addedline\b[^"]*"[^>]*>\s*<div[^>]*>(?!=)(.+?)<\/div>\s*<\/td>/g,o=i.getText(!1)+" "+i.signatureText,s=[];for(let r=0;r<e.length;r++){const c=e[r];if(!c)continue;const l=t[r];let d,u="",m="",h=0;for(;d=n.exec(c);){const e=Object(C.k)(Object(x.h)(d[1])),t=Object(x.d)(e,o);if(t>h)h=t;m+=e+"\n";u+=d[1]+"\n"}if(!u.trim())continue;l.diffBody=c;const g=new Date(l.timestamp).setSeconds(0),f=Math.abs(i.date.getTime()-g);let p=Math.max(Object(x.d)(m,o),h);if(p<1&&u.includes("{{")){try{u=$("<div>").append((yield Object(T.p)(u,{title:b.b.getCurrent().name})).html).cdGetText()}catch(e){throw new a.a({type:"parse"})}p=Object(x.d)(u,o)}s.push({revision:l,wordOverlap:p,dateProximity:f})}return s}))()}findEdit(){var e=this;return o()((function*(){if(!e.addingEdit){const t=yield e.getSourcePage().getArchivedPage().getRevisions({rvprop:["ids","comment","parsedcomment","timestamp"],rvdir:"newer",rvstart:new Date(e.date.getTime()-10*cd.a.g.msInMin).toISOString(),rvend:new Date(e.date.getTime()+3*cd.a.g.msInMin).toISOString(),rvuser:e.author.getName(),rvlimit:500}),i=t.map(t=>f.a.getApi().post({action:"compare",fromtitle:e.getSourcePage().getArchivedPage().name,fromrev:t.revid,torelative:"prev",prop:["diff"]}).catch(T.m)),n=(yield Promise.all(i)).map(e=>e.compare.body),o=(yield e.findDiffMatches(n,t)).sort((e,t)=>e.wordOverlap===t.wordOverlap?e.dateProximity-t.dateProximity:t.wordOverlap-e.wordOverlap);if(!o.length||o[1]&&o[0].wordOverlap===o[1].wordOverlap&&o[0].dateProximity===o[1].dateProximity)throw new a.a({type:"parse"});e.addingEdit=o[0].revision}return e.addingEdit}))()}getDiffLink(e="standard"){var t=this;return o()((function*(){const i=yield t.findEdit();if("standard"===e){const e=decodeURI(b.b.getCurrent().getArchivedPage().getUrl({diff:i.revid}));return`${cd.a.g.server}${e}`}else if("short"===e)return`${cd.a.g.server}/?diff=${i.revid}`;else if("wikilink"===e){return`[[${mw.config.get("wgFormattedNamespaces")[-1]+":"+cd.a.g.specialPageAliases.Diff}/${i.revid}]]`}}))()}setThanked(){this.thankButton.setPending(!1).setDisabled(!0).setLabel(cd.a.s("cm-thanked")).setTooltip(cd.a.s("cm-thanked-tooltip"))}thankFail(e){const{type:t,code:i}=e.data;let n;switch(t){case"parse":{const e=this.getSourcePage().getArchivedPage().getUrl({action:"history"});n=cd.a.sParse("error-diffnotfound")+" "+cd.a.sParse("error-diffnotfound-history",e);break}case"api":default:if("noData"===i){const e=this.getSourcePage().getArchivedPage().getUrl({action:"history"});n=cd.a.sParse("error-diffnotfound")+" "+cd.a.sParse("error-diffnotfound-history",e)}else{n=cd.a.sParse("thank-error");console.warn(e)}break;case"network":n=cd.a.sParse("error-diffnotfound")+" "+cd.a.sParse("error-network")}mw.notify(Object(x.Z)(n,{targetBlank:!0}),{type:"error"});this.thankButton.setPending(!1)}thank(){var e=this;return o()((function*(){if(Object(x.g)("mediawiki.diff.styles"))return;e.thankButton.setPending(!0);const t=cd.a.g.genderAffectsUserString&&e.author.isRegistered()?Object(T.o)([e.author]):void 0;let i;try{[i]=yield Promise.all([e.findEdit(),t,mw.loader.using(["mediawiki.diff","mediawiki.diff.styles"])].filter(x.i))}catch(t){e.thankFail(t);return}const n=e.getSourcePage().getArchivedPage().getUrl({diff:i.revid}),o=cd.a.sParse("thank-confirm",e.author.getName(),e.author,n),s=Object(x.Z)(o,{tagName:"div",targetBlank:!0});s.find("a").attr("data-instantdiffs-link","link");const a=yield e.generateDiffView(),r=$("<div>").append(s,a).children();mw.hook("wikipage.content").fire(r);if("accept"===(yield Object(S.i)(r,{size:"larger"}))){try{yield f.a.getApi().postWithEditToken(f.a.getApi().assertCurrentUser({action:"thank",rev:i.revid,source:cd.a.config.scriptCodeName})).catch(T.m)}catch(t){e.thankFail(t);return}mw.notify(cd.a.s("thank-success"));e.setThanked();O[i.revid]={id:e.id,text:e.getText(),thankUnixTime:Date.now()};Object(x.Q)("thanks",O)}else e.thankButton.setPending(!1)}))()}reply(e){if(!this.replyForm){let t=!1;if(!e){t=m.a.getSelectedComment()===this;if(t){e={focus:!1};let t;if(r.a.get("reformatComments"))t=this.$menu.get(0);else{t=document.createElement("span");this.$elements.last().append(t)}const i=window.getSelection(),{higherNode:n,higherOffset:o}=Object(x.v)(i);if(i.containsNode(t,!0))i.setBaseAndExtent(n,o,t,0);if(!r.a.get("reformatComments"))t.remove()}}this.replyForm=e instanceof d.a?e:new d.a({mode:"reply",target:this,initialState:e});if(t)this.replyForm.quote()}}edit(e){this.$elements.addClass("cd-hidden");this.removeLayers();if(this.isOpeningSection)$(this.section.barElement).addClass("cd-hidden");if(!this.editForm)this.editForm=e instanceof d.a?e:new d.a({mode:"edit",target:this,initialState:e})}getCode(){var e=this;return o()((function*(){try{let t=!1;if(e.section&&null!==e.section.liveSectionNumber)try{yield e.section.requestCode();t=!0}catch(t){if(t instanceof a.a&&"noSuchSection"===t.data.code)yield e.getSourcePage().getCode();else throw t}else yield e.getSourcePage().getCode();e.locateInCode(t)}catch(e){if(e instanceof a.a)throw new a.a(Object.assign({},{message:cd.a.sParse("cf-error-getpagecode")},e.data));else throw e}}))()}isInViewport(e=!1,t=this.getOffset()){if(!t)return null;const i=window.scrollY,n=i+cd.a.g.bodyScrollPaddingTop,o=i+window.innerHeight;return e?t.downplayedBottom>n&&t.top<o:t.top>=n&&t.downplayedBottom<=o}registerSeen(e,t=!1){const i=!e||this.isInViewport();if(!1===this.isSeen&&i){this.isSeen=!0;if(t)this.flashTarget()}if(this.willFlashChangedOnSight&&i)this.flashChanged();const n=m.a.getAll().some(e=>e.isSeen||e.willFlashChangedOnSight);if(e&&n){const i="backward"===e?-1:1,n=m.a.getByIndex(this.index+i);if(n&&!1!==n.isInViewport())n.registerSeen(e,t)}}get $elements(){var e;null!==(e=this.cached$elements)&&void 0!==e||(this.cached$elements=$(this.elements));return this.cached$elements}set $elements(e){this.cached$elements=e;this.elements=e.get()}replaceElement(e,t){const i=e instanceof $?e.get(0):e;let n;if("string"==typeof t){const e=[...i.parentNode.children].indexOf(i),o=i.parentNode;i.outerHTML=t;n=o.children[e]}else{n=t;i.parentNode.replaceChild(n,e)}if(e instanceof $)this.$elements=this.$elements.not(i).add(n);else this.elements.splice(this.elements.indexOf(e),1,t);if(this.highlightables.includes(i)){this.highlightables.splice(this.highlightables.indexOf(i),1,n);this.bindEvents(n)}if(this.anchorHighlightable===i)this.anchorHighlightable=n}getText(e=!0){if(void 0===this.cachedText){const t=this.$elements.not("h1, h2, h3, h4, h5, h6").clone().removeClass("cd-hidden"),i=$("<div>").append(t),n=[".cd-signature",".cd-changeMark",".noprint"];if(r.a.get("reformatComments"))n.push(".cd-comment-header",".cd-comment-menu");if(cd.a.config.unsignedClass)n.push("."+cd.a.config.unsignedClass);const o=n.join(", ");i.find(o).remove();let s=i.cdGetText();if(e){if(cd.a.config.signatureEndingRegexp)s=s.replace(cd.a.config.signatureEndingRegexp,"");if(cd.a.config.signaturePrefixRegexp)s=s.replace(cd.a.config.signaturePrefixRegexp,"")}this.cachedText=s}return this.cachedText}codeToText(){if(!this.inCode){console.error("The Comment#inCode property should contain an object with the comment code data.");return}let e,{code:t,originalIndentation:i}=this.inCode;({code:t,hidden:e}=Object(C.h)(t));let n=t;if(0===this.level){const e=new RegExp(/^(?:\x01\d+_(block|template)\x02) *$/),t=new RegExp(`^\\[\\[${cd.a.g.filePrefixPattern}.+\\]\\]$`,"i"),i=new RegExp(`(?:<${cd.a.g.pniePattern}(?: [\\w ]+?=[^<>]+?| ?\\/?)>|<\\/${cd.a.g.pniePattern}>|\\x04|<br[ \\n]*\\/?>) *$`,"i"),o=new RegExp(`^(?:<\\/${cd.a.g.pniePattern}>|<${cd.a.g.pniePattern}|\\||!)`,"i"),s=/^(=+).*\1[ \t]*$|^----/;n=n.replace(/^((?![:*#; ]).+)\n(?![\n:*#; \x03])(?=(.*))/gm,(n,a,r)=>a+(e.test(a)||e.test(r)||t.test(a)||t.test(r)||s.test(a)||s.test(r)||i.test(a)||o.test(r)?"\n":" "))}n=Object(C.a)(n,"\x01\n").replace(/^((?:\x01\d+_template.*\x02) *)\x01$/gm,(e,t)=>t+"<br>").replace(/\x01\n/g,"\n").replace(/\n([:*#]*)([ \t]*)/g,(e,t,n)=>{let o;if(t.length>=i.length){o=t.slice(i.length);if(t.length>i.length)o+=n}else o=t+n;return"\n"+o});n=Object(x.X)(n,e);if(cd.a.config.paragraphTemplates.length){const e=`\\{\\{(?:${cd.a.config.paragraphTemplates.map(x.o).join("|")})\\}\\}`,t=new RegExp(e,"g"),i=new RegExp("^(?![:*#]).*"+e,"gm");n=n.replace(i,e=>e.replace(t,"\n\n"))}if(0!==this.level)n=n.replace(/\n\n+/g,"\n\n");return n.trim()}excludeBadBeginnings(e){if(e.headingMatch){e.headingCode=e.headingMatch[2];e.headingStartIndex=e.startIndex+e.headingMatch[1].length;e.headingLevel=e.headingMatch[3].length;e.headlineCode=e.headingMatch[4].trim();e.startIndex+=e.headingMatch[0].length;e.code=e.code.slice(e.headingMatch[0].length);e.lineStartIndex=this.isOpeningSection?e.headingStartIndex:e.startIndex}else{const t=this.elements.some(e=>{const t=e.querySelector(".cd-timestamp");return t&&!t.closest(".cd-signature")});[cd.a.config.signatureEndingRegexp,t?null:cd.a.g.timezoneRegexp].filter(x.j).forEach(t=>{const i=new RegExp(t.source+"$","m"),n=/^(.+)\n/gm;let o,s;for(;o=n.exec(e.code);){const t=o[1].replace(/\[\[:?(?:[^|[\]<>\n]+\|)?(.+?)\]\]/g,"$1");if(i.test(t)){const t=o.index+o[0].length;if(t===e.code.length)break;else s=t}}if(s){e.code=e.code.slice(s);e.startIndex+=s;e.lineStartIndex+=s}});cd.a.g.badCommentBeginnings.forEach(t=>{if("^"!==t.source[0])console.debug('Regexps in cd.config.customBadCommentBeginnings should have "^" as the first character.');let i;for(;i=e.code.match(t);){e.code=e.code.slice(i[0].length);e.lineStartIndex=e.startIndex+i[0].lastIndexOf("\n")+1;e.startIndex+=i[0].length}})}return e}excludeIndentationAndIntro(e){if(0===this.level)return e;const t=(t,i,n,o="")=>{if("number"==typeof o)o="";let s="",a=n,r=t.length;if(!i&&Object(x.f)(e.code,/(^|\n)[:*#]/g)>=2&&a.endsWith("#")){a=a.slice(0,-1);e.originalIndentation=a;if(a.length<this.level)a+=":";r-=1+o.length;s="#"+o}else e.originalIndentation=n;e.indentation=a;e.lineStartIndex=e.startIndex+i.length;e.startIndex+=r;return s},i="\\n*"+cd.a.config.indentationCharsPattern;e.code=e.code.replace(new RegExp("^()"+i),t);if(""===e.indentation)e.code=e.code.replace(new RegExp(`(^[^]*?\\n)${i}(?![^]*\\n[^:*#])`),t);if(e.indentation.length<this.level&&Object(x.f)(e.code,/\n/g))e.code=e.code.replace(new RegExp(`^([^]+?\\n)([:*#]{${this.level}})( *)`),t);return e}adjustCommentBeginning({code:e,startIndex:t}){let i={code:e,startIndex:t,lineStartIndex:t,headingMatch:e.match(/(^[^]*(?:^|\n))((=+)(.*)\3[ \t\x01\x02]*\n)/),originalIndentation:"",indentation:""};i=this.excludeBadBeginnings(i);i=this.excludeIndentationAndIntro(i);return i}adjustCommentCodeData(e){const t=Object.assign({},e),i=e=>{t.signatureDirtyCode=e+t.signatureDirtyCode;t.endIndex-=e.length;return""},n=new RegExp(`(<${cd.a.g.piePattern}(?: [\\w ]+?=[^<>]+?)?> *)+$`,"i");[this.isOwn?cd.a.g.userSignaturePrefixRegexp:void 0,/'+$/,cd.a.config.signaturePrefixRegexp,n,cd.a.config.signaturePrefixRegexp,n,new RegExp(`<small class="${cd.a.config.unsignedClass}">.*$`),/<!-- *Template:Unsigned.*$/,cd.a.config.signaturePrefixRegexp].filter(x.i).forEach(e=>{t.code=t.code.replace(e,i)});const o=[{start:/^<small>/,end:/<\/small>[ \xa0\t]*$/}];if(cd.a.config.smallDivTemplates.length)o.push({start:new RegExp(`^(?:\\{\\{(${cd.a.config.smallDivTemplates.join("|")})\\|(?: *1 *= *|(?![^{]*=)))`,"i"),end:/\}\}[ \xa0\t]*$/});t.signatureCode=t.signatureDirtyCode;t.inSmallFont=!1;o.some(e=>{if(e.start.test(t.code)&&e.end.test(t.signatureCode)){t.inSmallFont=!0;t.code=t.code.replace(e.start,"");t.signatureCode=t.signatureCode.replace(e.end,"");return!0}});let s=t.indentation;if(!this.isOpeningSection){const e=(t.code+t.signatureDirtyCode).match(/\n([:*#]*[:*])(?!:*#).*$/);if(e){s=e[1];if(s.length<t.originalIndentation.length){const e=cd.a.config.spaceAfterIndentationChars?" ":"",i=t.originalIndentation.slice(s.length)+e;t.code=i+t.code;t.indentation=t.originalIndentation=t.originalIndentation.slice(0,s.length);t.startIndex-=i.length}}}s+=cd.a.config.defaultIndentationChar;t.replyIndentation=s;return t}getMatchScore(e,t,i,n){const o=t.index===e.index;let s,a,r=!1;if(t.previousComments.length)for(let n=0;n<t.previousComments.length;n++){const o=i[e.index-1-n];if(!o)break;r=o.timestamp===t.previousComments[n].timestamp&&o.author.getName()===t.previousComments[n].authorName;if(!1!==s)s=e.timestamp===o.timestamp&&e.author===o.author;if(!r)break}else r=0===e.index;s=Boolean(s);Object.assign(e,this.adjustCommentBeginning(e));if(t.followsHeading)a=e.headingMatch?Object(C.j)(Object(C.k)(e.headlineCode))===Object(C.j)(t.sectionHeadline):-.75;else a=!e.headingMatch;const c=Object(x.d)(t.commentText,Object(C.k)(e.code));e.score=2*(1===n.length||c>.5||0===t.index&&r&&a||0!==t.index&&r&&!s)+c+1*a+.5*r+1e-4*o;return e}searchInCode(e,t,i){let n;if(t){var o;n={index:t.index,previousComments:t.previousComments,followsHeading:t.followsHeading,sectionHeadline:null===(o=t.section)||void 0===o?void 0:o.headline,commentText:t.text}}else{var s;const e=i?this.section.comments:m.a.getAll(),t=e.indexOf(this);n={index:t,previousComments:e.slice(Math.max(0,t-2),t).reverse(),followsHeading:this.followsHeading,sectionHeadline:null===(s=this.section)||void 0===s?void 0:s.headline,commentText:this.getText()}}const a=Object(C.d)(e);return a.filter(e=>(e.author===this.author||"<undated>"===e.author)&&(this.timestamp===e.timestamp||this.timestamp&&this.timestamp.startsWith(e.timestamp))).map(t=>({index:t.index,author:t.author,timestamp:t.timestamp,date:t.date,signatureDirtyCode:t.dirtyCode,startIndex:t.commentStartIndex,endIndex:t.startIndex,signatureEndIndex:t.startIndex+t.dirtyCode.length,code:e.slice(t.commentStartIndex,t.startIndex)})).map((e,t,i)=>this.getMatchScore(e,n,a,i)).filter(e=>e.score>2.5)}locateInCode(e,t){let i;if("string"==typeof e)i=e;else if(!0===e){i=this.section.code;this.inCode=null}else{i=this.getSourcePage().code;this.inCode=null}if(void 0===i)throw new a.a({type:"parse",code:"noCode"});const n=!0===e,o=this.searchInCode(i,t,n).sort((e,t)=>t.score-e.score)[0];if(!o)throw new a.a({type:"parse",code:"locateComment"});o.isSectionCodeUsed=n;const s=this.adjustCommentCodeData(o);if("string"==typeof e)return s;else this.inCode=s}matchProperPlaceRegexps(e,t){var i;const n="^("+(this.isInSingleCommentTable?"[^]*?(?:(?:\\s*\\n\\|\\})+|</table>).*\\n":"")+"[^]*?(?:"+mw.util.escapeRegExp(e.signatureCode)+"|"+cd.a.g.contentTimestampRegexp.source+".*"+(cd.a.g.unsignedTemplatesPattern?`|${cd.a.g.unsignedTemplatesPattern}.*`:"")+"|(?:^|\\n)\\x01.+)\\n)\\n*",o=e.replyIndentation.length-1,s=new RegExp(n+("((?![:*#\\x01\\n])"+(o>0?`|[:*#\\x01]{1,${o}}(?![:*\\x01])`:"")+")")),r=t.match(s)||[];let c=null!==(i=r[1])&&void 0!==i?i:t,l=r[r.length-1],d=1===Object(x.f)(c,/\n/g);if(cd.a.config.outdentTemplates.length){if(!L){const e=cd.a.config.outdentTemplates.map(x.o).join("|");L=new RegExp(`^\\s*([:*#]*)[ \t]*\\{\\{ *(?:${e}) *(?:\\||\\}\\})`)}const[,i]=t.slice(c.length).match(L)||[];if(void 0!==i)if(d)throw new a.a({type:"parse",code:"findPlace"});else if((i||"").length<=e.replyIndentation.length){const e=new RegExp(n);[,c]=t.match(e)||[]}}return{adjustedCodeBetween:c,indentationAfter:l,isNextLine:d}}findProperPlaceForReply(e,t){let i=e.endIndex;const n=function(e,t){let i=Object(C.g)(t);if(cd.a.config.closedDiscussionTemplates[0][0]){if(!P){const e=cd.a.config.closedDiscussionTemplates[0].map(x.o).join("|"),t=cd.a.config.closedDiscussionTemplates[1].map(x.o).join("|");if(t)N=new RegExp(`\\{\\{ *(?:${e}) *(?=[|}])[^}]*\\}\\}\\s*([:*#]*)[^]*?\\{\\{ *(?:${t}) *(?=[|}])[^}]*\\}\\}`,"g");P=new RegExp(`\\{\\{ *(?:${e}) *\\|[^}]{0,50}?=\\s*([:*#]*)`,"g")}if(N)i=i.replace(N,(e,t)=>"\x01".repeat(t.length)+" ".repeat(e.length-t.length-1)+"\x02");let e;for(;e=P.exec(i);){const t=i.slice(0,e.index),n=i.slice(e.index);i=t+Object(C.i)(n,null,e[1].length).code}}let n=e+i.slice(e).match(/\n+(=+).*\1[ \t\x01\x02]*\n|$/).index+1,o=t.slice(e,n);cd.a.g.keepInSectionEnding.forEach(e=>{const t=o.match(e);if(t)n-=t[0].length-1});return i.slice(e,n)}(i,t);if(/^ +\x02/.test(n))throw new a.a({type:"parse",code:"closed"});const{adjustedCodeBetween:o,indentationAfter:s,isNextLine:c}=this.matchProperPlaceRegexps(e,n);if(cd.a.config.outdentTemplates.length&&r.a.get("outdentLevel")&&e.replyIndentation.length>=r.a.get("outdentLevel")&&e.indentation.length>s.length&&c){e.isReplyOutdented=!0;e.replyIndentation=e.replyIndentation.slice(0,Math.max(s.length,1))+cd.a.config.defaultIndentationChar}const[,l]=o.match(/\n([:*#]{2,}|#[:*#]*).*\n$/)||[];if(l)e.replyIndentation=l.slice(0,e.replyIndentation.length).replace(/:$/,cd.a.config.defaultIndentationChar);i+=o.length;return i}modifyWholeCode({action:e,formAction:t,commentCode:i,wholeCode:n,doDelete:o,thisInCode:s,commentForm:r}){s||(s=this.inCode);n||(n=s.isSectionCodeUsed?this.section.code:this.getSourcePage().code);let c;switch(e){case"reply":{var l;const e=this.findProperPlaceForReply(s,n);null!==(l=i)&&void 0!==l||(i=r.commentTextToCode(t));c=n.slice(0,e)+i+n.slice(e);break}case"edit":if(o){let e,t;if(this.isOpeningSection&&void 0!==s.headingStartIndex){if(!this.section.inCode)this.section.locateInCode();if(Object(C.d)(this.section.inCode.code).length>1)throw new a.a({type:"parse",code:"delete-repliesInSection"});else({startIndex:e,contentEndIndex:t}=this.section.inCode)}else{t=s.signatureEndIndex+1;if(n.slice(s.endIndex).match(new RegExp(`^.+\\n+[:*#]{${s.indentation.length+1},}`)))throw new a.a({type:"parse",code:"delete-repliesToComment"});else e=s.lineStartIndex}c=n.slice(0,e)+n.slice(t)}else{var d;null!==(d=i)&&void 0!==d||(i=r.commentTextToCode(t));c=n.slice(0,s.lineStartIndex)+i+n.slice(s.signatureEndIndex)}}return{wholeCode:c,commentCode:i}}maybeRequestAuthorGender(e,t=!1){var i=this;return o()((function*(){if(cd.a.g.genderAffectsUserString&&i.author.isRegistered()&&!i.author.getGender()){let t;if(!i.genderRequest){i.genderRequest=Object(T.o)([i.author]);t=e=>{console.warn(`Couldn't get the gender of user ${i.author.getName()}.`,e)}}if(!i.genderRequestCallbacks.includes(e)){i.genderRequest.then(e,t);i.genderRequestCallbacks.push(e)}}else if(t){yield Object(x.S)();e()}}))()}getSourcePage(){return this.section?this.section.getSourcePage():b.b.getCurrent()}getVisibleExpandNote(){if(!this.isCollapsed)return null;let e;for(let i=this.collapsedThread;i;i=null===(t=i.rootComment.getParent())||void 0===t?void 0:t.collapsedThread){var t;e=i.$expandNote;if(e.is(":visible"))break}return e}getUrl(e){return b.b.getCurrent().getDecodedUrlWithFragment(this.dtId||this.id,e)}addSubitem(e,t){let i,n,o="dd",s=!0,a=this.$elements.last();if("bottom"===t){const e=this.getChildren(!0);if(e.length){const t=e[e.length-1].$elements.last().closest(".cd-commentLevel-"+(this.level+1));if(t.length){n=t;a=t.prev()}}}let r=n||a.next();const c=r.children().first();if(r.is("dd, li")&&c.hasClass("cd-commentLevel"))r=c;if(r.is("dl, ul, ol")){s=!1;o=r.is("dl")?"dd":"li";r.addClass("cd-commentLevel cd-commentLevel-"+(this.level+1))}else if(a.is("li, dd"))i=a.prop("tagName").toLowerCase();const l=$(`<${o}>`),d=s?$("<dl>").append(l).addClass("cd-commentLevel cd-commentLevel-"+(this.level+1)):void 0;let u;if(i){u=$(`<${i}>`);if(a.is(".cd-commentLevel:not(ol) > li, .cd-commentLevel > dd"))u.addClass("cd-connectToPreviousItem");d.appendTo(u)}if(u){u.insertAfter(a);if(a.closest("dl, ul, ol").is("ol")){u.addClass("cd-skip");const e=u.next(),t=[...u.parent().children("li:not(.cd-skip)")].indexOf(e.get(0));e.attr("value",t+1)}}else if(d)d.insertAfter(a);else if("top"===t)l.prependTo(r);else{const e=r.children().last();if(e.hasClass("cd-replyButtonWrapper"))l.insertBefore(e);else l.insertAfter(e)}this.subitemList.add(e,l);return{$wrappingItem:l,$wrappingList:d,$outerWrapper:u}}getRelevantSection(){return this.section||null}getRelevantComment(){return this}getIdentifyingData(){return{id:this.id}}getWikilinkFragment(){return this.dtId||this.id}getAncestors(){const e=[];let t=this;for(;t=t.getParent();)e.push(t);return e}expandAllThreadsDownTo(){[this,...this.getAncestors()].filter(e=>{var t;return null===(t=e.thread)||void 0===t?void 0:t.isCollapsed}).forEach(e=>{e.thread.expand()})}setNewAndSeenProperties(e,t,i){const n=this.date&&this.date.getTime()>Date.now()+3*cd.a.g.msInMin;if(!this.date||n){this.isNew=!1;this.isSeen=!0;return!1}const o=Math.floor(this.date.getTime()/1e3),s=o+60>e[0],a=o+60<=e[e.length-1];this.isNew=Boolean(s||i);this.isSeen=Boolean((!s||r.a.get("highlightNewInterval")&&a||this.isOwn)&&!i);return o<=t&&t<o+60}maybeSplitParent(){const e=m.a.getByIndex(this.index-1);if(this.level!==e.level)return;const t=e.elements[e.elements.length-1],i=t.nextElementSibling;if(["DD","LI"].includes(t.parentNode.tagName)&&"DIV"===t.tagName&&i===this.elements[0]&&"DIV"===i.tagName)e.parser.splitParentAfterNode(i.previousSibling)}}t.a=Comment_Comment},function(e,t,i){"use strict";var n=i(4),o=i.n(n),s=i(13),a=i(5),r=i(9),cd=i(0),c=i(2),l=i(37),d=i(40),u=i(1),m={cdRemoveNonElementNodes:function(){return this.filter((function(){return this.tagName&&!Object(u.G)(this)}))},cdScrollTo(e="top",t=!0,i){let n=this.cdRemoveNonElementNodes();const o=e=>{const t=n.get();if("backward"===e)t.reverse();for(const e of t){const t=$(e).offset();if(0!==t.top||0!==t.left)return t}return null},s=o("forward"),a=o("backward");if(!s||!a){mw.notify(cd.a.s("error-elementhidden"),{type:"error"});return this}const r=a.top+n.last().outerHeight();let l;if("center"===e)l=Math.min(s.top,s.top+.5*(r-s.top)-.5*$(window).height());else if("bottom"===e)l=r-$(window).height();else l=s.top-cd.a.g.bodyScrollPaddingTop;c.a.toggleAutoScrolling(!0);c.a.scrollToY(l,t,i);return this},cdIsInViewport(e=!1){const t=this.cdRemoveNonElementNodes(),i=t.get().every(e=>"none"===e.style.display);if(i)t.show();const n=t.first().offset().top,o=t.last().offset().top+t.last().height();if(0===n&&0===o)return!1;if(i)t.hide();const s=$(window).scrollTop(),a=s+cd.a.g.bodyScrollPaddingTop,r=s+$(window).height();return e?o>a&&n<r:n>=a&&o<=r},cdScrollIntoView(e="top",t=!0,i){if(this.cdIsInViewport()){if(i)i()}else if(i)Object(u.S)().then(()=>{this.cdScrollTo(e,t,i)});else this.cdScrollTo(e,t,i);return this},cdGetText(){let e;const t=document.createElement("div");[...this.get(0).childNodes].forEach(e=>{t.appendChild(e.cloneNode(!0))});document.body.appendChild(t);e=t.innerText;t.remove();return e},cdAddCloseButton(){if(this.find(".cd-closeButton").length)return this;const e=$("<a>").attr("title",cd.a.s("cf-block-close")).addClass("cd-closeButton").on("click",()=>{this.empty()});this.prepend(e);return this}},h=i(38),g=i(8),f=i(3),p=i(16),b=i(29),v=i(12),y=i(14),w=i(7);let x;function C(){const e=e=>l[e]?e:(e=>(h[e]||["en"]).find(e=>l[e]))(e),t=e(mw.config.get("wgContentLanguage")),i=e(mw.config.get("wgUserLanguage"));cd.a.g.contentDateFormat=l[t];cd.a.g.uiDateFormat=l[i];cd.a.g.contentDigits=mw.config.get("wgTranslateNumerals")?d[t]:null;cd.a.g.uiDigits=mw.config.get("wgTranslateNumerals")?d[i]:null}function k(e){const t=[];for(let i=0;i<e.length;i++){let n=e[i];if("x"===n&&i<e.length-1||"xk"===n&&i<e.length-1)n+=e[++i];if(["xg","D","l","F","M"].includes(n))t.push(n);else if("\\"===n&&i<e.length-1)++i}return t}function T(){const e={};!function(e){if(!1===f.a.get("reformatComments"))return;const t=document.createElement("div");t.className="cd-comment-header";const i=document.createElement("span");i.className="cd-comment-author-wrapper";t.append(i);const n=document.createElement("a");n.className="cd-comment-author mw-userlink";i.append(n);const o=document.createElement("bdi");n.append(o);const s=document.createElement("span");s.className="cd-comment-author-links";const a=document.createElement("a");a.textContent=cd.a.s("comment-author-talk");s.append(cd.a.mws("parentheses-start"),a);if(f.a.get("showContribsLink")){const e=document.createElement("span");e.innerHTML=cd.a.sParse("dot-separator");const t=document.createElement("a");t.textContent=cd.a.s("comment-author-contribs");s.append(e,t)}s.append(cd.a.mws("parentheses-end"));i.append(" ",s);e.headerElement=t}(e);!function(e){if(!0!==f.a.get("reformatComments")){e.getReplyButton=()=>new OO.ui.ButtonWidget({label:cd.a.s("cm-reply"),framed:!1,classes:["cd-button-ooui","cd-comment-button-ooui"]});e.replyButton=e.getReplyButton().$element.get(0);e.getEditButton=()=>new OO.ui.ButtonWidget({label:cd.a.s("cm-edit"),framed:!1,classes:["cd-button-ooui","cd-comment-button-ooui"]});e.editButton=e.getEditButton().$element.get(0);e.getThankButton=()=>new OO.ui.ButtonWidget({label:cd.a.s("cm-thank"),title:cd.a.s("cm-thank-tooltip"),framed:!1,classes:["cd-button-ooui","cd-comment-button-ooui"]});e.thankButton=e.getThankButton().$element.get(0);e.getCopyLinkButton=()=>new OO.ui.ButtonWidget({label:cd.a.s("cm-copylink"),icon:"link",title:cd.a.s("cm-copylink-tooltip"),framed:!1,invisibleLabel:!0,classes:["cd-button-ooui","cd-comment-button-ooui","cd-comment-button-ooui-icon"]});e.copyLinkButton=e.getCopyLinkButton().$element.get(0);e.getGoToParentButton=()=>new OO.ui.ButtonWidget({label:cd.a.s("cm-gotoparent"),icon:"upTriangle",title:cd.a.s("cm-gotoparent-tooltip"),framed:!1,invisibleLabel:!0,classes:["cd-button-ooui","cd-comment-button-ooui","cd-comment-button-ooui-icon"]});e.goToParentButton=e.getGoToParentButton().$element.get(0);e.getGoToChildButton=()=>new OO.ui.ButtonWidget({label:cd.a.s("cm-gotochild"),icon:"downTriangle",title:cd.a.s("cm-gotochild-tooltip"),framed:!1,invisibleLabel:!0,classes:["cd-button-ooui","cd-comment-button-ooui","cd-comment-button-ooui-icon"]});e.goToChildButton=e.getGoToChildButton().$element.get(0)}}(e);!function(e){const t=document.createElement("div");t.className="cd-comment-underlay";e.underlay=t;const i=document.createElement("div");i.className="cd-comment-overlay";e.overlay=i;const n=document.createElement("div");n.className="cd-comment-overlay-line";i.appendChild(n);const o=document.createElement("div");o.className="cd-comment-overlay-marker";i.appendChild(o);if(!f.a.get("reformatComments")){const e=document.createElement("div");e.className="cd-comment-overlay-innerWrapper";i.appendChild(e);const t=document.createElement("div");t.textContent="\xa0";t.className="cd-comment-overlay-gradient";e.appendChild(t);const n=document.createElement("div");n.className="cd-comment-overlay-content";e.appendChild(n)}}(e);cd.a.g.commentElementPrototypes=e}function S(){T();!function(){const e={};e.replyButton=new OO.ui.ButtonWidget({label:cd.a.s("section-reply"),framed:!1,classes:["cd-button-ooui","cd-section-button","cd-thread-button"]}).$element.get(0);e.addSubsectionButton=new OO.ui.ButtonWidget({label:" ",framed:!1,classes:["cd-button-ooui","cd-section-button"]}).$element.get(0);e.copyLinkButton=new OO.ui.ButtonWidget({framed:!1,flags:["progressive"],icon:"link",label:cd.a.s("sm-copylink"),invisibleLabel:!0,title:cd.a.s("sm-copylink-tooltip"),classes:["cd-section-bar-button"]}).$element.get(0);e.getMoreMenuSelect=()=>new OO.ui.ButtonMenuSelectWidget({framed:!1,icon:"ellipsis",label:cd.a.s("sm-more"),invisibleLabel:!0,title:cd.a.s("sm-more"),menu:{horizontalPosition:"end"},classes:["cd-section-bar-button","cd-section-bar-moremenu"]});e.moreMenuSelect=e.getMoreMenuSelect().$element.get(0);cd.a.g.sectionElementPrototypes=e}();!function(){let e={};e.expandButton=new OO.ui.ButtonWidget({label:"Expand the thread",icon:"expand",framed:!1,classes:["cd-button-ooui","cd-button-expandNote","cd-thread-button","cd-thread-button-invisible"]}).$element.get(0);const t=document.createElement("div");t.className="cd-thread-clickArea";const i=document.createElement("div");i.className="cd-thread-line";t.appendChild(i);e.clickArea=t;cd.a.g.threadElementPrototypes=e}()}function E(e){const t="content"===e,i=t?cd.a.g.contentDateFormat:cd.a.g.uiDateFormat,n=t?cd.a.g.contentDigits:cd.a.g.uiDigits,o=n?`[${n}]`:"\\d";let s="\\b";for(let e=0;e<i.length;e++){let n=!1,a=i[e];if("x"===a&&e<i.length-1||"xk"===a&&e<i.length-1)a+=i[++e];switch(a){case"xx":s+="x";break;case"xg":case"D":case"l":case"F":case"M":{const e=t?Object(u.q)(y.a[a]):y.a[a].map(mw.msg);s+="("+e.map(mw.util.escapeRegExp).join("|")+")";break}case"d":case"H":case"i":n="2";break;case"j":case"n":case"G":n="1,2";break;case"Y":case"xkY":n="4";break;case"\\":if(e<i.length-1)s+=i[++e];else s+="\\";break;case'"':if(e<i.length-1){const t=i.indexOf('"',e+1);if(-1===t)s+='"';else{s+=i.substr(e+1,t-e-1);e=t}}else s+='"';break;default:s+=mw.util.escapeRegExp(i[e])}if(!1!==n)s+="("+(o+"{"+n+"}")+")"}return s}function O(e){const t=[];for(let i=0;i<e.length;i++){let n=e[i];if("x"===n&&i<e.length-1||"xk"===n&&i<e.length-1)n+=e[++i];switch(n){case"xx":break;case"xg":case"d":case"j":case"D":case"l":case"F":case"M":case"n":case"Y":case"xkY":case"G":case"H":case"i":t.push(n);break;case"\\":if(i<e.length-1)++i;break;case'"':if(i<e.length-1){const t=e.indexOf('"',i+1);if(-1!==t)i=t}}}return t}t.a={getSiteData(){this.siteDataRequests||(this.siteDataRequests=function(){C();const e=k(cd.a.g.contentDateFormat).map(e=>y.a[e]),t=["word-separator","comma-separator","colon-separator","timezone-utc"].concat(...e),i=k(cd.a.g.uiDateFormat).map(e=>y.a[e]),n=["parentheses","parentheses-start","parentheses-end","word-separator","comma-separator","colon-separator","nextdiff","timezone-utc","pagetitle","discussiontools-topicsubscription-button-subscribe","discussiontools-topicsubscription-button-subscribe-tooltip","discussiontools-topicsubscription-button-unsubscribe","discussiontools-topicsubscription-button-unsubscribe-tooltip","discussiontools-topicsubscription-notify-subscribed-title","discussiontools-topicsubscription-notify-subscribed-body","discussiontools-topicsubscription-notify-unsubscribed-title","discussiontools-topicsubscription-notify-unsubscribed-body"].concat(...i),o=mw.config.get("wgContentLanguage")===mw.config.get("wgUserLanguage");if(o){const e={};Object.keys(cd.a.config.messages).filter(e=>n.includes(e)).forEach(t=>{e[t]=cd.a.config.messages[t]});mw.messages.set(e)}cd.a.g.contentLanguageMessages={};const s=e=>{Object.keys(e).forEach(t=>{mw.messages.set("(content)"+t,e[t]);cd.a.g.contentLanguageMessages[t]=e[t]})},a=e=>{const i={};Object.keys(e).filter(e=>t.includes(e)).forEach(t=>{i[t]=e[t]});s(i)};a(cd.a.config.messages);const r=[];if(o){const e=t.concat(n).filter(u.Y);for(const t of Object(w.w)(e)){const e=c.a.getApi().loadMessagesIfMissing(t).then(()=>{a(mw.messages.get())});r.push(e)}}else{const e=t.filter(e=>!cd.a.g.contentLanguageMessages[e]);for(const t of Object(w.w)(e)){const e=c.a.getApi().getMessages(t,{amlang:mw.config.get("wgContentLanguage")}).then(s);r.push(e)}const i=c.a.getApi().loadMessagesIfMissing(n);r.push(i)}cd.a.g.specialPageAliases=Object.assign({},cd.a.config.specialPageAliases);cd.a.g.contentTimezone=cd.a.config.timezone;const l=["Contributions","Diff","PermanentLink"];if(l.some(e=>!cd.a.g.specialPageAliases[e])||!cd.a.g.contentTimezone){const e=c.a.getApi().get({action:"query",meta:"siteinfo",siprop:["specialpagealiases","general"]}).then(e=>{e.query.specialpagealiases.filter(e=>l.includes(e.realname)).forEach(e=>{cd.a.g.specialPageAliases[e.realname]=e.aliases[0]});cd.a.g.contentTimezone=e.query.general.timezone});r.push(e)}return r}());return this.siteDataRequests},getSiteDataRequests(){return this.siteDataRequests||[]},memorizeCssValues(){cd.a.g.contentLineHeight=parseFloat(c.a.$content.css("line-height"));cd.a.g.contentFontSize=parseFloat(c.a.$content.css("font-size"));x=parseFloat($(document.documentElement).css("font-size"));cd.a.g.bodyScrollPaddingTop=parseFloat($("html, body").css("scroll-padding-top"))||0},addTalkPageCss(){const e=$("#content").css("background-color")||"#fff",t=Object(u.R)({timeless:"#mw-content-container","vector-2022":".mw-page-container",default:"body"}).css("background-color"),n=parseFloat((13/14*cd.a.g.contentFontSize/x).toFixed(7));mw.loader.addStyleTag(`:root {\n --cd-comment-hovered-background-color: ${cd.a.g.commentHoveredBackgroundColor};\n --cd-comment-target-marker-color: ${cd.a.g.commentTargetMarkerColor};\n --cd-comment-target-background-color: ${cd.a.g.commentTargetBackgroundColor};\n --cd-comment-target-hovered-background-color: ${cd.a.g.commentTargetHoverBackgroundColor};\n --cd-comment-new-marker-color: ${cd.a.g.commentNewMarkerColor};\n --cd-comment-new-background-color: ${cd.a.g.commentNewBackgroundColor};\n --cd-comment-new-hovered-background-color: ${cd.a.g.commentNewHoveredBackgroundColor};\n --cd-comment-own-marker-color: ${cd.a.g.commentOwnMarkerColor};\n --cd-comment-own-background-color: ${cd.a.g.commentOwnBackgroundColor};\n --cd-comment-own-hovered-background-color: ${cd.a.g.commentOwnHoveredBackgroundColor};\n --cd-comment-deleted-marker-color: ${cd.a.g.commentDeletedMarkerColor};\n --cd-comment-deleted-background-color: ${cd.a.g.commentDeletedBackgroundColor};\n --cd-comment-deleted-hovered-background-color: ${cd.a.g.commentDeletedHoveredBackgroundColor};\n --cd-comment-fallback-side-margin: ${cd.a.g.commentFallbackSideMargin}px;\n --cd-thread-line-side-margin: ${cd.a.g.threadLineSideMargin}px;\n --cd-content-background-color: ${e};\n --cd-content-start-margin: ${c.a.getContentColumnOffsets().startMargin}px;\n --cd-content-font-size: ${cd.a.g.contentFontSize}px;\n --cd-content-metadata-font-size: ${n}rem;\n --cd-sidebar-color: ${t};\n --cd-sidebar-transparent-color: ${Object(u.U)(t)};\n}`);if(cd.a.config.outdentClass)mw.loader.addStyleTag(`.cd-parsed .${cd.a.config.outdentClass} {\n margin-top: 0.5em;\n margin-bottom: 0.5em;\n}\n\n.cd-reformattedComments .${cd.a.config.outdentClass} {\n margin-top: 0.75em;\n margin-bottom: 0.75em;\n}`);i(43);i(59);i(61);i(63);i(65);i(67);i(69);i(71);i(73);i(75)},globals(){if(!cd.a.g.phpCharToUpper){cd.a.g.phpCharToUpper=mw.loader.moduleRegistry["mediawiki.Title"].script.files["phpCharToUpper.json"]||{};cd.a.page=g.b.getCurrent();cd.a.user=v.a.getCurrent();cd.a.g.genderAffectsUserString=/\{\{ *gender *:[^}]+?\|[^} ]+?\|/i.test(Object.entries(mw.messages.get()).filter(([e])=>e.startsWith("convenient-discussions")).map(([,e])=>e).join());if(cd.a.config.tagName&&v.a.getCurrent().isRegistered()){cd.a.g.summaryPostfix="";cd.a.g.summaryLengthLimit=mw.config.get("wgCommentCodePointLimit")}else{cd.a.g.summaryPostfix=` ([[${cd.a.config.scriptPageWikilink}|${cd.a.s("script-name-short")}]])`;cd.a.g.summaryLengthLimit=mw.config.get("wgCommentCodePointLimit")-cd.a.g.summaryPostfix.length}cd.a.g.clientProfile=$.client.profile();cd.a.g.cmdModifier="mac"===cd.a.g.clientProfile.platform?"Cmd":"Ctrl";cd.a.g.isIPv6Address=mw.util.isIPv6Address;cd.a.g.apiErrorsFormatHtml={errorformat:"html",errorlang:cd.a.g.userLanguage,errorsuselocal:!0};cd.a.settings=f.a;cd.a.tests.processPageInBackground=b.a.processPage.bind(b.a);cd.a.tests.showSettingsDialog=c.a.showSettingsDialog.bind(c.a);cd.a.tests.editSubscriptions=c.a.showEditSubscriptionsDialog.bind(c.a);cd.a.tests.setVisits=w.v;cd.a.tests.subscriptions=p.a;cd.a.api.getCommentById=a.a.getById.bind(a.a);cd.a.api.getCommentByDtId=a.a.getByDtId.bind(a.a);cd.a.api.getSectionById=r.a.getById.bind(r.a);cd.a.api.getSectionsByHeadline=r.a.getByHeadline.bind(r.a);cd.a.api.getLastActiveCommentForm=s.a.getLastActive.bind(s.a);cd.a.api.getLastActiveAlteredCommentForm=s.a.getLastActiveAltered.bind(s.a);cd.a.api.reloadPage=c.a.reload.bind(c.a);cd.a.api.getRootElement=c.a.getRootElement.bind(c.a)}},timestampParsingTools(e){var t,i;if("content"===e){const e=E("content"),t="\\((?:"+mw.util.escapeRegExp(mw.message("(content)timezone-utc").parse())+"|[A-Z]{1,5}|[+-]\\d{0,4})\\)";cd.a.g.contentTimestampRegexp=new RegExp(e+" +"+t);cd.a.g.parseTimestampContentRegexp=new RegExp(`^([^]*)(${cd.a.g.contentTimestampRegexp.source})(?!["\xbb])`);cd.a.g.contentTimestampNoTzRegexp=new RegExp(e);cd.a.g.contentTimestampMatchingGroups=O(cd.a.g.contentDateFormat);cd.a.g.timezoneRegexp=new RegExp(t,"g")}else{cd.a.g.uiTimestampRegexp=new RegExp(E("user"));cd.a.g.parseTimestampUiRegexp=new RegExp(`^([^]*)(${cd.a.g.uiTimestampRegexp.source})`);cd.a.g.uiTimestampMatchingGroups=O(cd.a.g.uiDateFormat)}const n=null===(t=mw.user.options.get("timecorrection"))||void 0===t?void 0:t.split("|");cd.a.g.uiTimezone=null!==(i=n&&n[2]||Number(n[1]))&&void 0!==i?i:null;if(0===cd.a.g.uiTimezone)cd.a.g.uiTimezone="UTC";try{cd.a.g.areUiAndLocalTimezoneSame=cd.a.g.uiTimezone===Intl.DateTimeFormat().resolvedOptions().timeZone}catch(e){}if("content"===e)cd.a.g.areTimestampsAltered=f.a.get("useUiTime")&&cd.a.g.contentTimezone!==cd.a.g.uiTimezone||"default"!==f.a.get("timestampFormat")||mw.config.get("wgContentLanguage")!==cd.a.g.userLanguage||f.a.get("hideTimezone")},talkPage(){var e=this;return o()((function*(){yield Promise.all(e.getSiteData());e.globals();yield f.a.init();e.timestampParsingTools("content");!function(){var e,t,i,n,o;(e=cd.a.config).customTalkNamespaces||(e.customTalkNamespaces=[]);const s=null===(t=cd.a.config.signatureEndingRegexp)||void 0===t?void 0:null===(i=t.source)||void 0===i?void 0:i.slice(-1);if(s&&"$"!==s)cd.a.config.signatureEndingRegexp=new RegExp(cd.a.config.signatureEndingRegexp.source+"$");cd.a.g.contribsPage=mw.config.get("wgFormattedNamespaces")[-1]+":"+cd.a.g.specialPageAliases.Contributions;const a=e=>e.replace(/[ _]/g,"[ _]+").replace(/:/g,"[ _]*:[ _]*"),r=mw.config.get("wgNamespaceIds"),c=Object.keys(r).filter(e=>2===r[e]||3===r[e]).map(a).join("|");cd.a.g.userNamespacesRegexp=new RegExp(`(?:^|:)(?:${c}):(.+)`,"i");const l=Object.keys(r).filter(e=>2===r[e]).map(a).join("|");cd.a.g.userLinkRegexp=new RegExp(`^:?(?:${l}):([^/]+)$`,"i");cd.a.g.userSubpageLinkRegexp=new RegExp(`^:?(?:${l}):.+?/`,"i");const d=Object.keys(r).filter(e=>3===r[e]).map(a).join("|");cd.a.g.userTalkLinkRegexp=new RegExp(`^:?(?:${d}):([^/]+)$`,"i");cd.a.g.userTalkSubpageLinkRegexp=new RegExp(`^:?(?:${d}):.+?/`,"i");cd.a.g.contribsPageLinkRegexp=new RegExp(`^${cd.a.g.contribsPage}/`);const m=Object.keys(r).filter(e=>e).join("|");cd.a.g.allNamespacesRegexp=new RegExp(`^:?(?:${m}):`,"i");const h=a(cd.a.g.contribsPage);cd.a.g.captureUserNamePattern=`\\[\\[[ _]*:?(?:\\w*:){0,2}(?:(?:${c})[ _]*:[ _]*|(?:Special[ _]*:[ _]*Contributions|${h})\\/[ _]*)([^|\\]/]+)(/)?`;if(cd.a.config.unsignedTemplates.length){const e=cd.a.config.unsignedTemplates.map(u.o).join("|");cd.a.g.unsignedTemplatesPattern=`(\\{\\{ *(?:${e}) *\\| *([^}|]+?) *(?:\\| *([^}]+?) *)?\\}\\})`}const g=cd.a.config.clearTemplates.length?cd.a.config.clearTemplates.map(u.o).join("|"):void 0;cd.a.g.keepInSectionEnding=cd.a.config.keepInSectionEnding.slice().concat(g?new RegExp(`\\n+\\{\\{ *(?:${g}) *\\}\\}\\s*$`):[]);cd.a.g.userSignature=f.a.get("signaturePrefix")+cd.a.g.signCode;const p=mw.user.options.get("nickname"),b=p.match(new RegExp(cd.a.g.captureUserNamePattern,"i"));if(b)cd.a.g.userSignaturePrefixRegexp=new RegExp((" "===f.a.get("signaturePrefix")?"":mw.util.escapeRegExp(f.a.get("signaturePrefix")))+mw.util.escapeRegExp(p.slice(0,b.index))+"$");const v=cd.a.g.popularInlineElements.join("|");cd.a.g.piePattern=`(?:${v})`;const y=cd.a.g.popularNotInlineElements.join("|");cd.a.g.pniePattern=`(?:${y})`;cd.a.g.startsWithArticlePathRegexp=new RegExp("^"+mw.util.escapeRegExp(mw.config.get("wgArticlePath")).replace("\\$1",""));cd.a.g.startsWithScriptTitleRegexp=new RegExp("^"+mw.util.escapeRegExp(mw.config.get("wgScript")+"?title="));const w=e=>"\\{\\{ *"+a(mw.util.escapeRegExp(e)),x=["<blockquote","<q"].concat((null===(n=cd.a.config.pairQuoteTemplates)||void 0===n?void 0:n[0].map(w))||[]).join("|"),C=["</blockquote>","</q>"].concat((null===(o=cd.a.config.pairQuoteTemplates)||void 0===o?void 0:o[1].map(w))||[]).join("|");cd.a.g.quoteRegexp=new RegExp(`(${x})([^]*?)(${C})`,"ig");cd.a.g.unhighlightableElementClasses=cd.a.g.unhighlightableElementClasses.concat(cd.a.config.customUnhighlightableElementClasses);const k=Object.keys(r).filter(e=>6===r[e]).map(a).join("|");cd.a.g.filePrefixPattern=`(?:${k}):`;const T=Object.keys(r).filter(e=>6===r[e]||14===r[e]).map(a).join("|");cd.a.g.colonNamespacesPrefixRegexp=new RegExp(`^:(?:${T}):`,"i");cd.a.g.badCommentBeginnings=cd.a.g.badCommentBeginnings.concat(new RegExp(`^\\[\\[${cd.a.g.filePrefixPattern}.+\\n*(?=[*:#])`,"i")).concat(cd.a.config.customBadCommentBeginnings).concat(g?new RegExp(`^\\{\\{ *(?:${g}) *\\}\\} *\\n+`,"i"):[]);cd.a.g.pipeTrickRegexp=/(\[\[:?(?:[^|[\]<>\n:]+:)?([^|[\]<>\n]+)\|)(\]\])/g}();S();if(f.a.get("useBackgroundHighlighting"))i(77);$.fn.extend(m);Object(y.f)();cd.a.commentForms=s.a.getAll()}))()}}},function(e,t,i){"use strict";var n,o=function(){if(void 0===n)n=Boolean(window&&document&&document.all&&!window.atob);return n},s=function(){var e={};return function(t){if(void 0===e[t]){var i=document.querySelector(t);if(window.HTMLIFrameElement&&i instanceof window.HTMLIFrameElement)try{i=i.contentDocument.head}catch(e){i=null}e[t]=i}return e[t]}}(),a=[];function r(e){for(var t=-1,i=0;i<a.length;i++)if(a[i].identifier===e){t=i;break}return t}function c(e,t){for(var i={},n=[],o=0;o<e.length;o++){var s=e[o],c=t.base?s[0]+t.base:s[0],l=i[c]||0,d="".concat(c," ").concat(l);i[c]=l+1;var u=r(d),m={css:s[1],media:s[2],sourceMap:s[3]};if(-1!==u){a[u].references++;a[u].updater(m)}else a.push({identifier:d,updater:p(m,t),references:1});n.push(d)}return n}function l(e){var t=document.createElement("style"),n=e.attributes||{};if(void 0===n.nonce){var o=1?i.nc:void 0;if(o)n.nonce=o}Object.keys(n).forEach((function(e){t.setAttribute(e,n[e])}));if("function"==typeof e.insert)e.insert(t);else{var a=s(e.insert||"head");if(!a)throw new Error("Couldn't find a style target. This probably means that the value for the 'insert' parameter is invalid.");a.appendChild(t)}return t}var d,u=(d=[],function(e,t){d[e]=t;return d.filter(Boolean).join("\n")});function m(e,t,i,n){var o=i?"":n.media?"@media ".concat(n.media," {").concat(n.css,"}"):n.css;if(e.styleSheet)e.styleSheet.cssText=u(t,o);else{var s=document.createTextNode(o),a=e.childNodes;if(a[t])e.removeChild(a[t]);if(a.length)e.insertBefore(s,a[t]);else e.appendChild(s)}}function h(e,t,i){var n=i.css,o=i.media,s=i.sourceMap;if(o)e.setAttribute("media",o);else e.removeAttribute("media");if(s&&"undefined"!=typeof btoa)n+="\n/*# sourceMappingURL=data:application/json;base64,".concat(btoa(unescape(encodeURIComponent(JSON.stringify(s))))," */");if(e.styleSheet)e.styleSheet.cssText=n;else{for(;e.firstChild;)e.removeChild(e.firstChild);e.appendChild(document.createTextNode(n))}}var g=null,f=0;function p(e,t){var i,n,o;if(t.singleton){var s=f++;i=g||(g=l(t));n=m.bind(null,i,s,!1);o=m.bind(null,i,s,!0)}else{i=l(t);n=h.bind(null,i,t);o=function(){!function(e){if(null===e.parentNode)return!1;e.parentNode.removeChild(e)}(i)}}n(e);return function(t){if(t){if(t.css===e.css&&t.media===e.media&&t.sourceMap===e.sourceMap)return;n(e=t)}else o()}}e.exports=function(e,t){if(!(t=t||{}).singleton&&"boolean"!=typeof t.singleton)t.singleton=o();var i=c(e=e||[],t);return function(e){e=e||[];if("[object Array]"===Object.prototype.toString.call(e)){for(var n=0;n<i.length;n++){var o=r(i[n]);a[o].references--}for(var s=c(e,t),l=0;l<i.length;l++){var d=r(i[l]);if(0===a[d].references){a[d].updater();a.splice(d,1)}}i=s}}}},function(e,t,i){"use strict";e.exports=function(e){var t=[];t.toString=function(){return this.map((function(t){var i=function(e,t){var i=e[1]||"",n=e[3];if(!n)return i;if(t&&"function"==typeof btoa){var o=(a=n,r=btoa(unescape(encodeURIComponent(JSON.stringify(a)))),c="sourceMappingURL=data:application/json;charset=utf-8;base64,".concat(r),"/*# ".concat(c," */")),s=n.sources.map((function(e){return"/*# sourceURL=".concat(n.sourceRoot||"").concat(e," */")}));return[i].concat(s).concat([o]).join("\n")}var a,r,c;return[i].join("\n")}(t,e);if(t[2])return"@media ".concat(t[2]," {").concat(i,"}");else return i})).join("")};t.i=function(e,i,n){if("string"==typeof e)e=[[null,e,""]];var o={};if(n)for(var s=0;s<this.length;s++){var a=this[s][0];if(null!=a)o[a]=!0}for(var r=0;r<e.length;r++){var c=[].concat(e[r]);if(!n||!o[c[0]]){if(i)if(!c[2])c[2]=i;else c[2]="".concat(i," and ").concat(c[2]);t.push(c)}}};return t}},function(e,t,i){"use strict";var n=i(4),o=i.n(n),s=i(31),a=i(18),r=i(6),c=i(22),l=i(13),cd=i(0),d=i(10),u=i(1);var m=class{constructor(e,t){this.commentForm=e;this.target=e.getTarget();this.action=t;this.filePatternEnd=`\\[\\[${cd.a.g.filePrefixPattern}.+\\]\\]$`;this.galleryRegexp=/^\x01\d+_gallery\x02$/m;this.setIndentationData()}setIndentationData(){const e=this.target.inCode;switch(this.commentForm.getMode()){case"reply":this.indentation=e.replyIndentation;break;case"edit":this.indentation=e.indentation;break;case"replyInSection":this.indentation=e.lastCommentIndentation&&("#"===e.lastCommentIndentation[0]||"mimic"===cd.a.config.indentationCharMode)?e.lastCommentIndentation[0]:cd.a.config.defaultIndentationChar;break;default:this.indentation=""}this.indented=Boolean(["reply","replyInSection"].includes(this.commentForm.getMode())||"edit"===this.commentForm.getMode()&&this.indentation);if(this.indented)this.restLinesIndentation="preview"===this.action?":":this.indentation.replace(/\*/g,":")}isIndented(){return this.indented}process(e){this.initialCode=this.code=e.trim();this.processAndHideSensitiveCode();this.findWrappers();this.setSignatureAndFixCode();this.processAllCode();this.addHeadline();this.addSignature();this.addOutdent();this.addTrailingNewline();this.addIntentationChars();this.unhideSensitiveCode();return this.code}processAndHideSensitiveCode(){Object.assign(this,Object(d.h)(this.code,e=>this.processCode(e,!0)))}findWrappers(){if(this.indented){const e=this.code.match(Object(d.f)(["[a-z]+"]))||[],t=this.code.match(cd.a.g.quoteRegexp)||[],i=e.concat(t);this.areThereTagsAroundListMarkup=i.some(e=>/\n[:*#;]/.test(e))}this.wrapInSmall=!1;if(!this.commentForm.headlineInput)this.code=this.code.replace(/^<small>([^]*)<\/small>$/i,(e,t)=>{this.wrapInSmall=!0;return t})}setSignatureAndFixCode(){var e;if(null!==(e=this.commentForm.omitSignatureCheckbox)&&void 0!==e&&e.isSelected())this.signature="";else this.signature="edit"===this.commentForm.getMode()?this.target.inCode.signatureCode:cd.a.g.userSignature;if(this.signature&&("edit"!==this.commentForm.getMode()||!/^[ \t]*\n/.test(this.signature))&&/(^|\n)[:*#;].*$/.test(this.code))this.code+="\n"}listMarkupToTags(e){const t=(e,t,n,o=!1)=>{if(o){const i=t-n.items.length-1;if(i>=0){const t={type:e[i].type,items:[e[i],n]};e.splice(i,n.items.length+1,t)}else{const i={type:e[0].type,items:[n]};e.splice(t-n.items.length,n.items.length,i)}}else e.splice(t-n.items.length,n.items.length,n);i(n.items,!0)},i=(e,i=!1)=>{let n={items:[]};for(let a=0;a<=e.length;a++)if(a===e.length){if(n.type)t(e,a,n,i)}else{const r=e[a].text,c=r[0]||"",l=o[c];if(n.type&&l!==n.type){const o=n.items.length;t(e,a,n,i);a-=o-1;n={items:[]}}if(l){n.type=l;n.items.push({type:s[c],text:r.slice(1)})}}return e},n=(e,t=!1)=>{let i="";e.forEach((o,s)=>{if(void 0===o.text){const e=o.items.map(e=>{const t=void 0===e.text?n(e.items,!0):e.text.trim();return e.type?`<${e.type}>${t}</${e.type}>`:t}).join("");i+=`<${o.type}>${e}</${o.type}>`}else i+=t?o.text.trim():o.text;if(s!==e.length-1)i+="\n"});return i},o={":":"dl",";":"dl","*":"ul","#":"ol"},s={":":"dd",";":"dt","*":"li","#":"li"};let a=e.split("\n").map(e=>({type:"",text:e}));i(a);return n(a)}prepareLineStart(e,t,i=!0){return e+(e&&cd.a.config.spaceAfterIndentationChars&&!/^[:*#;]/.test(t)?" ":"")+(i?t:"")}handleIndentedComment(e,t){if(!this.indented)return e;e=e.replace(/^ +/gm,"");if(!cd.a.config.paragraphTemplates.length)e=e.replace(/\n\n+/g,"\n");if(/^[:*#;]/m.test(e)&&(t||"#"===this.restLinesIndentation))e=this.listMarkupToTags(e);const i=new RegExp(`(\\n+)([:*#;\\x03]|${this.filePatternEnd})`,"gmi");e=(e=e.replace(i,(e,t,i)=>(t.length>1?"\n\n\n":"\n")+this.prepareLineStart(this.restLinesIndentation,i))).replace(/(^|[^\n])(\x01\d+_gallery\x02)/g,(e,t,i)=>t+"\n"+i).replace(/\x01\d+_gallery\x02(?=(?:$|[^\n]))/g,e=>e+"\n");if(this.restLinesIndentation.includes("#")&&e.includes("\x03"))throw new r.a({type:"parse",code:"numberedList-table"});if("#"===this.restLinesIndentation)if(this.galleryRegexp.test(e))throw new r.a({type:"parse",code:"numberedList"});e=e.replace(/^((?:[:*#;\x03].+|\x01\d+_gallery\x02))(\n+)(?![:#])/gm,(e,t,i)=>{const n=i.length>1?"\n\n":"";return t+"\n"+this.prepareLineStart(this.restLinesIndentation,n)});const n=cd.a.config.paragraphTemplates.length?`$1{{${cd.a.config.paragraphTemplates[0]}}}\n`:"$1<br>\n";return e=e.replace(/^(.*)\n\n+(?!:)/gm,n)}processNewlines(e,t=!1){const i=new RegExp(/^(?:\x01\d+_(block|template)\x02) *$/),n=/^(=+).*\1[ \t]*$|^----/,o=new RegExp("^"+this.filePatternEnd,"i");let s="",a="";if(t){s="|=";a="|\\||}}"}const r=mw.util.escapeRegExp(`{{${cd.a.config.paragraphTemplates[0]}}}`),c=new RegExp(`(?:<${cd.a.g.pniePattern}(?: [\\w ]+?=[^<>]+?| ?\\/?)>|<\\/${cd.a.g.pniePattern}>|\\x04|<br[ \\n]*\\/?>|${r}${s}) *$`,"i"),l=new RegExp(`^(?:<\\/${cd.a.g.pniePattern}>|<${cd.a.g.pniePattern}${a})`,"i"),d=this.indented?/^(.+)\n(?![:#])(?=(.*))/gm:/^((?![:*#; ]).+)\n(?![\n:*#; \x03])(?=(.*))/gm;return e=e.replace(d,(e,t,s)=>t+(i.test(t)||i.test(s)||!this.indented&&(n.test(t)||n.test(s))||o.test(t)||o.test(s)||this.galleryRegexp.test(t)||this.galleryRegexp.test(s)||c.test(t)||l.test(s)?"":"<br>")+(this.indented&&!this.galleryRegexp.test(s)?"":"\n"))}processCode(e,t){e=this.handleIndentedComment(e,t||this.areThereTagsAroundListMarkup);return e=this.processNewlines(e,t)}processAllCode(){this.code=this.processCode(this.code)}addHeadline(){var e;const t=null===(e=this.commentForm.headlineInput)||void 0===e?void 0:e.getValue().trim();if(!t||"addSection"===this.commentForm.getMode()&&this.commentForm.isSectionSubmitted()&&"submit"===this.action)return;let i;if("addSection"===this.commentForm.getMode())i=2;else if("addSubsection"===this.commentForm.getMode())i=this.target.level+1;else i=this.target.inCode.headingLevel;const n="=".repeat(i);if("addSection"===this.commentForm.getMode()||"edit"===this.commentForm.getMode()&&this.commentForm.getTarget().isOpeningSection&&/^\n/.test(this.target.inCode.code))this.code="\n"+this.code;this.code=`${n} ${t} ${n}\n${this.code}`}addSignature(){var e;if(null===(e=this.commentForm.omitSignatureCheckbox)||void 0===e||!e.isSelected())this.code=this.code.replace(/\s*~{3,}$/,"");if("preview"===this.action&&this.signature)this.signature=`<span class="cd-commentForm-signature">${this.signature}</span>`;if(!this.indented&&/(^|\n)[ =].*$/.test(this.code))this.code+="\n";if(!this.code||this.code.endsWith("\n")||this.code.endsWith(" "))this.signature=this.signature.trimLeft();if(this.wrapInSmall){const e=/^[:*#; ]/.test(this.code)?"\n"+(this.indented?this.restLinesIndentation:""):"";if(cd.a.config.smallDivTemplates.length&&!/^[:*#;]/m.test(this.code)){const e=[];this.code=Object(u.z)(this.code.trim(),/\[\[[^\]|]+\|/g,e,"link");this.code=this.code.replace(/\|/g,"{{!}}")+this.signature;this.code=Object(u.X)(this.code,e,"link");this.code=`{{${cd.a.config.smallDivTemplates[0]}|1=${this.code}}}`}else this.code=`<small>${e}${this.code}${this.signature}</small>`}else this.code+=this.signature}addOutdent(){var e;if(null===(e=this.target.inCode)||void 0===e||!e.isReplyOutdented)return;const t=this.target.level-this.target.inCode.replyIndentation.length;this.code=`{{${cd.a.config.outdentTemplates[0]}|${t}}}`+(/^[:*#]+/.test(this.code)?"\n":" ")+this.code}addTrailingNewline(){if("edit"!==this.commentForm.getMode())this.code+="\n"}addIntentationChars(){if(this.indented&&"preview"!==this.action&&/^[*#;\x03]/.test(this.code))this.indentation=this.restLinesIndentation;if("preview"!==this.action){this.code=this.prepareLineStart(this.indentation,this.code);if("addSubsection"===this.mode)this.code+="\n"}else if("preview"===this.action&&this.indented&&this.initialCode)this.code=this.prepareLineStart(":",this.code)}unhideSensitiveCode(){this.code=Object(u.X)(this.code,this.hidden)}},h=i(5),g=i(35),f=i(9),p=i(2),b=i(17),v=i(33),y=i(8),w=i(3),x=i(16),C=i(12),k=i(11),T=i(7);let S=0;t.a=class{constructor({mode:e,target:t,initialState:i,preloadConfig:n,newTopicOnTop:o}){var s;if(!(t instanceof y.a)&&!t.isActionable||"replyInSection"===e&&!t.replyButton)throw new r.a;this.updateAutoSummary=this.updateAutoSummary.bind(this);this.closeOperation=this.closeOperation.bind(this);this.mode=e;this.setTargets(t);this.preloadConfig=n;this.newTopicOnTop=o;this.index=S++;this.summaryAltered=null!==(s=null==i?void 0:i.summaryAltered)&&void 0!==s?s:!1;this.sectionOpeningCommentEdited="edit"===this.mode&&this.target.isOpeningSection;this.sectionSubmitted=null;this.operations=[];this.lastKeyPresses=[];if("addSection"===this.mode)this.addEditNotices();const a=cd.a.config.customCommentFormModules.filter(e=>!e.checkFunc||e.checkFunc()).map(e=>e.name);mw.loader.using(a).then(()=>{mw.hook("convenientDiscussions.commentFormCustomModulesReady").fire(this,cd.a)});this.createContents(i,a);this.addEventListeners();this.initAutocomplete();this.addToPage();if(!C.a.getCurrent().isRegistered())this.showMessage(cd.a.sParse("error-anoneditwatning"),{type:"warning",name:"anonEditWarning"});if(i){this.originalComment=i.originalComment;this.originalHeadline=i.originalHeadline;if(i.lastFocused)this.lastFocused=new Date(i.lastFocused)}else if("edit"===this.mode)this.loadComment();else{var c;if(null!==(c=this.preloadConfig)&&void 0!==c&&c.commentTemplate)this.preloadTemplate();else this.originalComment="";if(this.headlineInput){var d,m;this.headlineInput.setValue((null===(d=this.preloadConfig)||void 0===d?void 0:d.headline)||"");this.originalHeadline=(null===(m=this.preloadConfig)||void 0===m?void 0:m.headline)||""}}if(!(this.target instanceof y.a)&&"edit"!==this.mode)this.checkCode();l.a.add(this);if(i&&!i.focus)b.a.updateCommentFormButton();else this.$element.cdScrollIntoView("center",!0,()=>{if("edit"!==this.mode)Object(u.m)(this.headlineInput||this.commentInput);b.a.updateCommentFormButton()});p.a.updatePageTitle();mw.hook("convenientDiscussions.commentFormCreated").fire(this,cd.a)}setTargets(e){this.target=e;this.targetSection=this.target.getRelevantSection();this.targetComment="edit"===this.mode?null:this.target.getRelevantComment();this.parentComment=this.mode.startsWith("reply")?this.targetComment:null;this.targetPage=this.targetSection?this.targetSection.getSourcePage():y.b.getCurrent()}getTabIndex(e){return String(this.index)+String(e)}createTextInputs(e){var t,i,n;if(["addSection","addSubsection"].includes(this.mode)&&(null===(t=this.preloadConfig)||void 0===t||!t.noHeadline)||this.sectionOpeningCommentEdited){var o,s;const t=null===(o=this.targetSection)||void 0===o?void 0:o.getParent();if("addSubsection"===this.mode)this.headlineInputPlaceholder=cd.a.s("cf-headline-subsection",this.targetSection.headline);else if("edit"===this.mode&&t)this.headlineInputPlaceholder=cd.a.s("cf-headline-subsection",t.headline);else this.headlineInputPlaceholder=cd.a.s("cf-headline-topic");this.headlineInput=new OO.ui.TextInputWidget({value:null!==(s=null==e?void 0:e.headline)&&void 0!==s?s:"",placeholder:this.headlineInputPlaceholder,classes:["cd-commentForm-headlineInput"],tabIndex:this.getTabIndex(11)})}let a;if("replyInSection"===this.mode||"reply"===this.mode&&this.target.isOpeningSection)a=cd.a.s("cf-comment-placeholder-replytosection",this.targetSection.headline);else if("reply"===this.mode)this.target.maybeRequestAuthorGender(()=>{this.commentInput.$input.attr("placeholder",Object(u.N)(cd.a.s("cf-comment-placeholder-replytocomment",this.target.author.getName(),this.target.author)))},!0);this.commentInput=new OO.ui.MultilineTextInputWidget({value:null!==(i=null==e?void 0:e.comment)&&void 0!==i?i:"",placeholder:a,autosize:!0,rows:this.headlineInput?5:3,maxRows:9999,classes:["cd-commentForm-commentInput"],tabIndex:this.getTabIndex(12)});this.commentInput.$input.addClass("ime-position-inside");this.summaryInput=new OO.ui.TextInputWidget({value:null!==(n=null==e?void 0:e.summary)&&void 0!==n?n:"",maxLength:cd.a.g.summaryLengthLimit,placeholder:cd.a.s("cf-summary-placeholder"),classes:["cd-commentForm-summaryInput"],tabIndex:this.getTabIndex(13)});this.summaryInput.$input.codePointLimit(cd.a.g.summaryLengthLimit);mw.widgets.visibleCodePointLimit(this.summaryInput,cd.a.g.summaryLengthLimit);this.updateAutoSummary(!(null!=e&&e.summary))}createCheckboxes(e){if(C.a.getCurrent().isRegistered()){var t;if("edit"===this.mode){var i;({field:this.minorField,input:this.minorCheckbox}=Object(k.b)({value:"minor",selected:null!==(i=null==e?void 0:e.minor)&&void 0!==i?i:!0,label:cd.a.s("cf-minor"),tabIndex:this.getTabIndex(20)}))}({field:this.watchField,input:this.watchCheckbox}=Object(k.b)({value:"watch",selected:null!==(t=null==e?void 0:e.watch)&&void 0!==t?t:w.a.get("watchOnReply")&&"edit"!==this.mode||$("#ca-unwatch").length||mw.user.options.get(p.a.doesPageExist()?"watchdefault":"watchcreations"),label:cd.a.s("cf-watch"),tabIndex:this.getTabIndex(21)}));if(this.targetSection||"addSection"===this.mode){var n,o,s,a;({field:this.subscribeField,input:this.subscribeCheckbox}=Object(k.b)({value:"subscribe",selected:null!==(n=null==e?void 0:e.subscribe)&&void 0!==n?n:w.a.get("subscribeOnReply")&&"edit"!==this.mode||(w.a.get("useTopicSubscription")?null===(o=this.targetSection)||void 0===o?void 0:null===(s=o.getBase(!0))||void 0===s?void 0:s.subscriptionState:null===(a=this.targetSection)||void 0===a?void 0:a.subscriptionState),label:w.a.get("useTopicSubscription")||"addSubsection"!==this.mode&&(this.targetSection&&this.targetSection.level<=2||"addSection"===this.mode)?cd.a.s("cf-watchsection-topic"):cd.a.s("cf-watchsection-subsection"),tabIndex:this.getTabIndex(22),title:cd.a.s("cf-watchsection-tooltip")}))}}if(["addSection","addSubsection"].includes(this.mode)){var r;({field:this.omitSignatureField,input:this.omitSignatureCheckbox}=Object(k.b)({value:"omitSignature",selected:null!==(r=null==e?void 0:e.omitSignature)&&void 0!==r?r:!1,label:cd.a.s("cf-omitsignature"),title:cd.a.s("cf-omitsignature-tooltip"),tabIndex:this.getTabIndex(25)}))}if("edit"===this.mode&&(this.target.isOpeningSection?1===this.targetSection.comments.length:!this.target.getChildren().length)){var c;({field:this.deleteField,input:this.deleteCheckbox}=Object(k.b)({value:"delete",selected:null!==(c=null==e?void 0:e.delete)&&void 0!==c?c:!1,label:cd.a.s("cf-delete"),tabIndex:this.getTabIndex(26)}))}this.checkboxesLayout=new OO.ui.HorizontalLayout({classes:["cd-commentForm-checkboxes"],items:[this.minorField,this.watchField,this.subscribeField,this.omitSignatureField,this.deleteField].filter(u.i)})}createButtons(){const e={edit:"save",addSection:"addtopic",addSubsection:"addsubsection"}[this.mode]||"reply";this.submitButtonLabelStandard=cd.a.s("cf-"+e);this.submitButtonLabelShort=cd.a.s(`cf-${e}-short`);this.advancedButton=new OO.ui.ButtonWidget({label:cd.a.s("cf-advanced"),framed:!1,classes:["cd-button-ooui","cd-commentForm-advancedButton"],tabIndex:this.getTabIndex(30)});this.helpPopupButton=new OO.ui.PopupButtonWidget({label:cd.a.s("cf-help"),framed:!1,classes:["cd-button-ooui"],popup:{head:!1,$content:Object(u.Z)(cd.a.sParse("cf-help-content",cd.a.config.mentionCharacter,cd.a.g.cmdModifier),{tagName:"div",targetBlank:!0}).contents(),padded:!0,align:"center",width:400},$overlay:p.a.getPopupOverlay(),tabIndex:this.getTabIndex(31)});if(C.a.getCurrent().isRegistered())this.settingsButton=new OO.ui.ButtonWidget({framed:!1,icon:"settings",label:cd.a.s("cf-settings-tooltip"),invisibleLabel:!0,title:cd.a.s("cf-settings-tooltip"),classes:["cd-button-ooui","cd-commentForm-settingsButton"],tabIndex:this.getTabIndex(32)});this.cancelButton=new OO.ui.ButtonWidget({label:cd.a.s("cf-cancel"),flags:"destructive",framed:!1,classes:["cd-button-ooui","cd-commentForm-cancelButton"],tabIndex:this.getTabIndex(33)});this.viewChangesButton=new OO.ui.ButtonWidget({label:cd.a.s("cf-viewchanges"),classes:["cd-commentForm-viewChangesButton"],tabIndex:this.getTabIndex(34)});this.previewButton=new OO.ui.ButtonWidget({label:cd.a.s("cf-preview"),classes:["cd-commentForm-previewButton"],tabIndex:this.getTabIndex(35)});if(w.a.get("autopreview"))this.previewButton.$element.hide();this.submitButton=new OO.ui.ButtonWidget({label:this.submitButtonLabelStandard,flags:["progressive","primary"],classes:["cd-commentForm-submitButton"],tabIndex:this.getTabIndex(36)})}createElements(){var e,t;if(!["addSection","addSubsection"].includes(this.mode))if("reply"===this.mode)this.containerListType="dl";else if("edit"===this.mode)this.containerListType=this.target.containerListType;else if("replyInSection"===this.mode)this.containerListType=this.target.$replyButtonContainer.prop("tagName").toLowerCase();this.$element=$("<div>").addClass("cd-commentForm cd-commentForm-"+this.mode);if("ol"===this.containerListType)this.$element.addClass("cd-commentForm-inNumberedList");if(this.sectionOpeningCommentEdited)this.$element.addClass("cd-commentForm-sectionOpeningComment");if("addSubsection"===this.mode)this.$element.addClass("cd-commentForm-addSubsection-"+this.target.level);this.$messageArea=$("<div>").addClass("cd-commentForm-messageArea");this.$summaryPreview=$("<div>").addClass("cd-summaryPreview");this.$advanced=$("<div>").addClass("cd-commentForm-advanced").append(this.summaryInput.$element,this.$summaryPreview,this.checkboxesLayout.$element);this.$buttonsStart=$("<div>").addClass("cd-commentForm-buttons-start").append(this.advancedButton.$element,this.helpPopupButton.$element,null===(e=this.settingsButton)||void 0===e?void 0:e.$element);this.$buttonsEnd=$("<div>").addClass("cd-commentForm-buttons-end").append(this.cancelButton.$element,this.viewChangesButton.$element,this.previewButton.$element,this.submitButton.$element);this.$buttons=$("<div>").addClass("cd-commentForm-buttons").append(this.$buttonsStart,this.$buttonsEnd);this.$element.append(this.$messageArea,null===(t=this.headlineInput)||void 0===t?void 0:t.$element,this.commentInput.$element,this.$advanced,this.$buttons);if("edit"!==this.mode&&!w.a.get("alwaysExpandAdvanced"))this.$advanced.hide();this.$previewArea=$("<div>").addClass("cd-commentForm-previewArea");if(w.a.get("autopreview"))this.$previewArea.addClass("cd-commentForm-previewArea-below").appendTo(this.$element);else this.$previewArea.addClass("cd-commentForm-previewArea-above").prependTo(this.$element);if("ol"===this.containerListType&&"webkit"!==cd.a.g.clientProfile.layout)$("<div>").html(" ").addClass("cd-commentForm-dummyElement").prependTo(this.$element)}addToolbar(e){var t=this;return o()((function*(){if(!w.a.get("showToolbar"))return;const i=$("<div>").addClass("cd-toolbarPlaceholder").insertBefore(t.commentInput.$element);yield mw.loader.using(["ext.wikiEditor",...e]);i.remove();const n=t.commentInput.$input,o=mw.loader.moduleRegistry["ext.wikiEditor"],s=o.packageExports["jquery.wikiEditor.toolbar.config.js"];n.wikiEditor("addModule",s);const a=o.packageExports["jquery.wikiEditor.dialogs.config.js"];a.replaceIcons(n);n.wikiEditor("addModule",a.getDefaultConfig());t.commentInput.$element.find('.tool[rel="redirect"], .tool[rel="signature"], .tool[rel="newline"], .tool[rel="reference"], .option[rel="heading-2"]').remove();if(!["addSection","addSubsection"].includes(t.mode))t.commentInput.$element.find(".group-heading").remove();n.textSelection("register",{encapsulateSelection:e=>{l.a.getLastActive().encapsulateSelection(e)},setContents:e=>{const t=l.a.getLastActive();t.commentInput.select();Object(u.A)(t.commentInput,e)}});const r=cd.a.g.userLanguage;n.wikiEditor("addToToolbar",{section:"main",group:"format",tools:{smaller:{label:cd.a.mws("wikieditor-toolbar-tool-small"),type:"button",icon:`/w/load.php?modules=oojs-ui.styles.icons-editing-styling&image=smaller&lang=${r}&skin=vector`,action:{type:"encapsulate",options:{pre:"<small>",peri:cd.a.mws("wikieditor-toolbar-tool-small-example"),post:"</small>"}}}}});n.wikiEditor("addToToolbar",{section:"main",groups:{"convenient-discussions":{}}});n.wikiEditor("addToToolbar",{section:"main",group:"convenient-discussions",tools:{quote:{label:`${cd.a.s("cf-quote-tooltip")} ${cd.a.mws("parentheses",`Q${cd.a.mws("comma-separator")}Ctrl+Alt+Q`)}`,type:"button",icon:`/w/load.php?modules=oojs-ui.styles.icons-editing-advanced&image=quotes&lang=${r}&skin=vector`,action:{type:"callback",execute:()=>{t.quote()}}},mention:{label:cd.a.s("cf-mention-tooltip",cd.a.g.cmdModifier),type:"button",icon:`/w/load.php?modules=oojs-ui.styles.icons-user&image=userAvatar&lang=${r}&skin=vector`,action:{type:"callback",execute:()=>{}}}}});t.$element.find('.tool-button[rel="mention"]').off("click").on("click",e=>{t.mention(Object(u.B)(e))});n.wikiEditor("addToToolbar",{section:"advanced",group:"format",tools:{code:{label:cd.a.s("cf-code-tooltip"),type:"button",icon:`/w/load.php?modules=oojs-ui.styles.icons-editing-advanced&image=code&lang=${r}&skin=vector`,action:{type:"encapsulate",options:{pre:"<code><nowiki>",peri:cd.a.s("cf-code-placeholder"),post:"</".concat("nowiki></code>")}}},codeBlock:{label:cd.a.s("cf-codeblock-tooltip"),type:"button",icon:`/w/load.php?modules=oojs-ui.styles.icons-editing-advanced&image=markup&lang=${r}&skin=vector`,action:{type:"encapsulate",options:{pre:'<syntaxhighlight lang="">\n',peri:cd.a.s("cf-codeblock-placeholder"),post:"\n</syntaxhighlight>"}}},underline:{label:cd.a.s("cf-underline-tooltip"),type:"button",icon:`/w/load.php?modules=oojs-ui.styles.icons-editing-styling&image=underline&lang=${r}&skin=vector`,action:{type:"encapsulate",options:{pre:"<u>",peri:cd.a.s("cf-underline-placeholder"),post:"</u>"}}},strikethrough:{label:cd.a.s("cf-strikethrough-tooltip"),type:"button",icon:`/w/load.php?modules=oojs-ui.styles.icons-editing-styling&image=strikethrough&lang=${r}&skin=vector`,action:{type:"encapsulate",options:{pre:"<s>",peri:cd.a.s("cf-strikethrough-placeholder"),post:"</s>"}}}}});t.$element.find('.tool[rel="link"] a, .tool[rel="file"] a').on("click",e=>{const i=e.currentTarget.parentNode.getAttribute("rel"),n=$(`#wikieditor-toolbar-${i}-dialog`);if(n.length){const e=n.data("context");if(e)e.$textarea=e.$focusedElem=t.commentInput.$input;n.parent().data("dialogaction",!1)}});if(n.is(":focus")){n.blur();Object(u.m)(t.commentInput)}n.data("wikiEditor-context").instance=5;$.wikiEditor.instances=Array(5);mw.hook("convenientDiscussions.commentFormToolbarReady").fire(t,cd.a)}))()}addInsertButton(e,t){const i=[];e=Object(u.z)(e,/\\[+;\\]/g,i);let[,n,o]=e.match(/^(.*?)(?:\+(.*))?$/)||[];if(!n)return;o||(o="");const s=e=>e.replace(/\\([+;\\])/g,"$1");n=s(Object(u.X)(n,i));o=s(Object(u.X)(o,i));t=t?s(t):n+o;const r=new a.a({label:t,classes:["cd-insertButtons-button"],action:()=>{this.encapsulateSelection({pre:n,post:o})}});this.$insertButtons.append(r.element," ")}addInsertButtons(){if(w.a.get("insertButtons").length){this.$insertButtons=$("<div>").addClass("cd-insertButtons").insertAfter(this.commentInput.$element);w.a.get("insertButtons").forEach(e=>{let t,i;if(Array.isArray(e)){t=e[0];i=e[1]}else t=e;this.addInsertButton(t,i)})}}createContents(e,t){var i;this.createTextInputs(e);this.createCheckboxes(e);this.createButtons();this.createElements();this.addToolbar(t);this.addInsertButtons();if(null!==(i=this.deleteCheckbox)&&void 0!==i&&i.isSelected())this.updateFormOnDeleteCheckboxChange(!0)}loadComment(){var e=this;return o()((function*(){const t=e.registerOperation("load");try{yield e.target.getCode(!0);let i=e.target.codeToText();if(e.target.inCode.inSmallFont)i=`<small>${i}</small>`;const n=e.target.inCode.headlineCode;e.commentInput.setValue(i);e.originalComment=i;if(e.headlineInput){e.headlineInput.setValue(n);e.originalHeadline=n}e.closeOperation(t);Object(u.m)(e.commentInput);e.preview()}catch(i){if(i instanceof r.a){const n=Object.assign({},i.data,{cancel:!0,currentOperation:t});e.handleError(n)}else e.handleError({type:"javascript",logMessage:i,cancel:!0,currentOperation:t})}}))()}checkCode(){if(!this.checkCodeRequest)this.checkCodeRequest=this.target.getCode(this).catch(e=>{if(e instanceof r.a){const t=Object.assign({},e.data);this.handleError(t)}else this.handleError({type:"javascript",logMessage:e})});return this.checkCodeRequest}addEditNotices(){var e=this;return o()((function*(){var t;const i=y.b.getCurrent().title.replace(/\//g,"-");let n,o=`<div class="cd-editnotice">{{MediaWiki:Editnotice-${cd.a.g.namespaceNumber}}}</div>\n<div class="cd-editnotice">{{MediaWiki:Editnotice-${cd.a.g.namespaceNumber}-${i}}}</div>`;if(null!==(t=e.preloadConfig)&&void 0!==t&&t.editIntro)o=`<div class="cd-editintro">{{${e.preloadConfig.editIntro}}}</div>\n`+o;try{n=yield Object(T.p)(o,{title:y.b.getCurrent().name})}catch(e){return}const s=mw.config.get("wgFormattedNamespaces")[8];e.$messageArea.append(n.html.replace(/<div class="cd-editnotice"><\/div>/g,"")).cdAddCloseButton().find(`.cd-editnotice > a.new[title^="${s}:Editnotice-"]`).parent().remove();e.$messageArea.find(".mw-charinsert-item").each((t,i)=>{const n=$(i),o=n.data("mw-charinsert-start"),s=n.data("mw-charinsert-end");n.on("click",()=>{e.encapsulateSelection({pre:o,post:s})}).data("mw-charinsert-done",!0)});mw.hook("wikipage.content").fire(e.$messageArea)}))()}preloadTemplate(){var e=this;return o()((function*(){const t=e.registerOperation("load",{affectsHeadline:!1}),i=y.b.get(e.preloadConfig.commentTemplate);try{yield i.getCode();let o=i.code;const s=Object(d.f)(["onlyinclude"]);let a,r;for(;a=s.exec(o);){var n;null!==(n=r)&&void 0!==n||(r="");r+=a[2]}if(void 0!==r)o=r;o=o.replace(Object(d.f)(["includeonly"]),"$3").replace(Object(d.f)(["noinclude"]),"");o=o.trim();if(o.includes(cd.a.g.signCode)||e.preloadConfig.omitSignature)e.omitSignatureCheckbox.setSelected(!0);e.commentInput.setValue(o);e.originalComment=o;e.closeOperation(t);Object(u.m)(e.headlineInput||e.commentInput);e.preview()}catch(i){if(i instanceof r.a){const n=Object.assign({},i.data,{cancel:!0,currentOperation:t});e.handleError(n)}else e.handleError({type:"javascript",logMessage:i,cancel:!0,currentOperation:t})}}))()}addToPage(){if("replyInSection"===this.mode)this.target.replyButton.hide();else if("addSubsection"===this.mode&&this.target.$addSubsectionButtonContainer)this.target.$addSubsectionButtonContainer.hide();else if("addSection"===this.mode&&p.a.$addSectionButtonContainer)p.a.$addSectionButtonContainer.hide();if(!p.a.doesPageExist())p.a.$content.children(".noarticletext, .warningbox").hide();let e,t,i;if("reply"===this.mode)({$wrappingItem:e,$wrappingList:t,$outerWrapper:i}=this.target.addSubitem("replyForm","top"));else if("edit"===this.mode){const e=this.target.$elements.first();if(e.is("dd, li")){const t=e.prop("tagName").toLowerCase();i=$(`<${t}>`);this.$element.appendTo(i)}}this.$outermostElement=i||t||e||this.$element;switch(this.mode){case"reply":this.$element.appendTo(e||i);break;case"edit":if(this.target.isOpeningSection)this.$outermostElement.insertAfter(this.target.$elements.last());else this.$outermostElement.insertBefore(this.target.$elements.first());break;case"replyInSection":this.$element.appendTo(this.target.$replyButtonWrapper);this.target.$replyButtonWrapper.addClass("cd-replyButtonWrapper-hasCommentForm");break;case"addSection":if(this.newTopicOnTop&&f.a.getByIndex(0))this.$element.insertBefore(f.a.getByIndex(0).$heading);else this.$element.insertAfter(p.a.$root);break;case"addSubsection":{const e=this.target.findRealLastElement(e=>e.className.match(new RegExp(`\\bcd-commentForm-addSubsection-[${this.target.level}-6]\\b`)));this.$element.insertAfter(e);break}}this.adjustLabels()}haveSuggestedToImprovePerformanceRecently(){return Object(u.r)()-w.a.get("improvePerformance-lastSuggested")<14}checkForPerformanceIssues(e,t,i){if(!this.haveSuggestedToImprovePerformanceRecently()){this.lastKeyPresses.push(e.timeStamp);this.lastKeyPresses.splice(0,this.lastKeyPresses.length-t);if(this.lastKeyPresses[t-1]-this.lastKeyPresses[0]<t*i){const e=Object(u.Z)(cd.a.sParse("warning-performance"),{callbacks:{"cd-notification-talkPageSettings":()=>{p.a.showSettingsDialog("talkPage")}}});mw.notify(e,{title:cd.a.s("warning-performance-title"),type:"warn",autoHideSeconds:"long"});w.a.saveSettingOnTheFly("improvePerformance-lastSuggested",Object(u.r)())}}}getCommentInputDummyFloatableContainer(){const e=this.commentInput.$input.get(0),t=window.getComputedStyle(e),i=$("<span>");$("<div>").text(e.value.substring(0,this.commentInput.getRange().to)).css({whiteSpace:"pre-wrap",wordWrap:"break-word",position:"absolute",visibility:"hidden",width:parseFloat(t.width)+"px",...convenientDiscussions.g.inputPropsAffectingCoords.reduce((e,i)=>{e[i]=t[i];return e},{})}).append(i).appendTo(document.body);return i.css({top:i.get(0).offsetTop,left:i.get(0).offsetLeft,width:0,height:parseFloat(i.css("line-height"))-3}).addClass("cd-dummyFloatableContainer")}destroyInputPopups(){var e,t;null===(e=this.richFormattingPopup)||void 0===e||e.toggle(!1).$element.remove();null===(t=this.$commentInputPopupFloatableContainer)||void 0===t||t.remove()}suggestConvertToWikitext(e,t){var i=this;return o()((function*(){yield Object(u.S)();const n=new OO.ui.ButtonWidget({label:cd.a.s("cf-popup-richformatting-convert"),flags:["progressive"]});n.on("click",o()((function*(){const n=i.commentInput.getRange().to,o=yield p.a.getWikitextFromPaste(e,i.commentInput);i.commentInput.selectRange(n-t.length,n);Object(u.A)(i.commentInput,o);i.destroyInputPopups()})));i.destroyInputPopups();const s=w.a.get("showToolbar")?i.$element.find(".wikiEditor-ui-text"):i.commentInput.$element;i.$commentInputPopupFloatableContainer=i.getCommentInputDummyFloatableContainer();s.append(i.$commentInputPopupFloatableContainer);i.richFormattingPopup=new OO.ui.PopupWidget({icon:"wikiText",label:Object(u.Z)(cd.a.sParse("cf-popup-richformatting")),$content:n.$element,head:!0,autoClose:!0,$autoCloseIgnore:i.commentInput.$input,hideCloseButton:!0,$floatableContainer:i.$commentInputPopupFloatableContainer,$container:s,containerPadding:-10,padded:!0,classes:["cd-popup-richFormatting"]});s.append(i.richFormattingPopup.$element);i.richFormattingPopup.toggle(!0)}))()}addEventListenersToTextInputs(e,t){if(this.headlineInput){this.headlineInput.on("change",e=>{var t;this.updateAutoSummary(!0,!0);if(e.includes("{{")&&(null===(t=this.preloadConfig)||void 0===t||!t.headline))this.showMessage(cd.a.sParse("cf-reaction-templateinheadline"),{type:"warning",name:"templateInHeadline"});else this.hideMessage("templateInHeadline")}).on("change",t).on("change",e);this.headlineInput.$input.on("keydown",e=>{if(13===e.keyCode&&!Object(u.B)(e)&&!p.a.getActiveAutocompleteMenu()){this.submit();e.preventDefault()}})}const i=[{pattern:new RegExp(cd.a.g.signCode+"\\s*$"),message:cd.a.sParse("cf-reaction-signature",cd.a.g.signCode),name:"signatureNotNeeded",type:"notice",checkFunc:()=>{var e;return!(null!==(e=this.omitSignatureCheckbox)&&void 0!==e&&e.isSelected())}},{pattern:/<pre/,message:cd.a.sParse("cf-reaction-pre","<code><nowiki><pre></".concat("nowiki></code>"),'<code><nowiki><syntaxhighlight lang="text"></'.concat("nowiki></code>")),name:"dontUsePre",type:"warning"}].concat(cd.a.config.customTextReactions);this.commentInput.on("change",e=>{if(this.richFormattingPopup)this.destroyInputPopups();this.updateAutoSummary(!0,!0);i.forEach(({pattern:t,checkFunc:i,message:n,type:o,name:s})=>{if(t.test(e)&&("function"!=typeof i||i(this)))this.showMessage(n,{type:o,name:s});else this.hideMessage(s)})}).on("change",t).on("change",e);this.commentInput.$input.on("paste drop",e=>{var t;const i=e.originalEvent.clipboardData||e.originalEvent.dataTransfer;if(!i.types.includes("text/html"))return;const n=i.getData("text/html");if(p.a.isConvertableToWikitext(n))this.suggestConvertToWikitext(n,null===(t=i.getData("text/plain"))||void 0===t?void 0:t.replace(/\r/g,""))}).on("tribute-replaced",e=>{if(e.originalEvent.detail.instance.trigger===cd.a.config.mentionCharacter){var t;if("edit"===this.mode)this.showMessage(Object(u.Z)(cd.a.sParse("cf-reaction-mention-edit"),{targetBlank:!0}),{type:"notice",name:"mentionEdit"});if(null!==(t=this.omitSignatureCheckbox)&&void 0!==t&&t.isSelected())this.showMessage(Object(u.Z)(cd.a.sParse("cf-reaction-mention-nosignature"),{targetBlank:!0}),{type:"notice",name:"mentionNoSignature"})}});if(p.a.isLongPage()&&"webkit"===cd.a.g.clientProfile.layout&&!w.a.get("improvePerformance")&&!this.haveSuggestedToImprovePerformanceRecently()){var n;const e=10,t=10,i=i=>{this.checkForPerformanceIssues(i,e,t)};this.commentInput.$input.on("keydown",i);null===(n=this.headlineInput)||void 0===n||n.$input.on("keydown",i)}this.summaryInput.on("change",()=>{if(this.summaryInput.$input.is(":focus")){this.summaryAltered=!0;this.dontAutopreviewOnSummaryChange=!1}if(!this.dontAutopreviewOnSummaryChange)t()}).on("change",e);this.summaryInput.$input.on("keydown",e=>{if(13===e.keyCode&&!Object(u.B)(e)&&!p.a.getActiveAutocompleteMenu()){this.submit();e.preventDefault()}})}addEventListenersToCheckboxes(e,t){var i,n,o,s,a;null===(i=this.minorCheckbox)||void 0===i||i.on("change",e);null===(n=this.watchCheckbox)||void 0===n||n.on("change",e);null===(o=this.subscribeCheckbox)||void 0===o||o.on("change",e);null===(s=this.omitSignatureCheckbox)||void 0===s||s.on("change",()=>{this.preview(!1)}).on("change",e);null===(a=this.deleteCheckbox)||void 0===a||a.on("change",e=>{this.updateAutoSummary(!0,!0);this.updateFormOnDeleteCheckboxChange(e)}).on("change",t).on("change",e)}addEventListenersToButtons(){var e;this.advancedButton.on("click",()=>{this.toggleAdvanced()});null===(e=this.settingsButton)||void 0===e||e.on("click",()=>{p.a.showSettingsDialog()});this.cancelButton.on("click",()=>{this.cancel()});this.viewChangesButton.on("click",()=>{this.viewChanges()});this.previewButton.on("click",()=>{this.preview(!0,!1)});this.submitButton.on("click",()=>{this.submit()})}addEventListeners(){const e=()=>{l.a.saveSession()},t=()=>{this.preview()};this.$element.on("keydown",e=>{if(Object(u.K)(e,13,["cmd"]))this.submit();if(Object(u.K)(e,27))this.cancel()}).on("focusin",()=>{this.lastFocused=new Date;p.a.updatePageTitle()});this.addEventListenersToTextInputs(e,t);this.addEventListenersToCheckboxes(e,t);this.addEventListenersToButtons()}initAutocomplete(){let e,t=[];if(this.targetSection)t=this.targetSection.getBase().comments;else if("addSection"!==this.mode)t=h.a.getAll().filter(e=>!e.section);if("edit"===this.mode)t=t.filter(e=>e!==this.target);if(3===cd.a.g.namespaceNumber){const t=(y.b.getCurrent().title.match(/^([^/]+)/)||[])[0];if(t)e=C.a.get(t)}let i=t.map(e=>e.author).concat(e).filter(u.i).sort((e,t)=>t.isRegistered()-e.isRegistered()||(t.name>e.name?-1:1)).filter(e=>e!==C.a.getCurrent()).map(e=>e.name);if(this.targetComment)for(let e=this.targetComment;e;e=e.getParent())if(e.author!==C.a.getCurrent()){if(!e.author.isRegistered())break;i.unshift(e.author.getName());break}i=i.filter(u.Y);this.autocomplete=new s.a({types:["mentions","wikilinks","templates","tags","commentLinks"],inputs:[this.commentInput],comments:t,defaultUserNames:i});this.autocomplete.init();if(this.headlineInput){this.headlineAutocomplete=new s.a({types:["mentions","wikilinks","tags"],inputs:[this.headlineInput],comments:t,defaultUserNames:i});this.headlineAutocomplete.init()}this.summaryAutocomplete=new s.a({types:["mentions","wikilinks"],inputs:[this.summaryInput],comments:t,defaultUserNames:i});this.summaryAutocomplete.init()}toggleAdvanced(){if(this.$advanced.is(":hidden")){this.$advanced.show();const e=this.summaryInput.getValue(),t=e.match(/^.+?\*\/ */);Object(u.m)(this.summaryInput);this.summaryInput.selectRange(t?t[0].length:0,e.length)}else{this.$advanced.hide();Object(u.m)(this.commentInput)}}adjustLabels(){let e=this.$element.width();if(this.$element.hasClass("cd-commentForm-short")){if(e>=this.buttonsTotalWidthStandard+7){this.$element.removeClass("cd-commentForm-short");this.submitButton.setLabel(this.submitButtonLabelStandard);this.previewButton.setLabel(cd.a.s("cf-preview"));this.viewChangesButton.setLabel(cd.a.s("cf-viewchanges"));this.cancelButton.setLabel(cd.a.s("cf-cancel"))}}else{this.buttonsTotalWidthStandard=["submitButton","previewButton","viewChangesButton","cancelButton","advancedButton","helpPopupButton","settingsButton"].map(e=>{var t;return null===(t=this[e])||void 0===t?void 0:t.$element}).filter(u.i).filter(e=>e.is(":visible")).reduce((e,t)=>e+t.outerWidth(!0),0);if(e<this.buttonsTotalWidthStandard+7){this.$element.addClass("cd-commentForm-short");this.submitButton.setLabel(this.submitButtonLabelShort);this.previewButton.setLabel(cd.a.s("cf-preview-short"));this.viewChangesButton.setLabel(cd.a.s("cf-viewchanges-short"));this.cancelButton.setLabel(cd.a.s("cf-cancel-short"))}}}pushPending(e=!1,t=!0){this.commentInput.pushPending();this.summaryInput.pushPending();if(t){var i;null===(i=this.headlineInput)||void 0===i||i.pushPending()}if(e){var n,o,s,a,r;this.commentInput.setDisabled(!0);this.summaryInput.setDisabled(!0);if(t){var c;null===(c=this.headlineInput)||void 0===c||c.setDisabled(!0)}this.submitButton.setDisabled(!0);this.previewButton.setDisabled(!0);this.viewChangesButton.setDisabled(!0);this.cancelButton.setDisabled(!0);null===(n=this.minorCheckbox)||void 0===n||n.setDisabled(!0);null===(o=this.watchCheckbox)||void 0===o||o.setDisabled(!0);null===(s=this.subscribeCheckbox)||void 0===s||s.setDisabled(!0);null===(a=this.omitSignatureCheckbox)||void 0===a||a.setDisabled(!0);null===(r=this.deleteCheckbox)||void 0===r||r.setDisabled(!0)}if(this.commentInput.isPending())this.$element.addClass("cd-commentForm-pending")}popPending(e=!1,t=!0){this.commentInput.popPending();this.summaryInput.popPending();if(t){var i;null===(i=this.headlineInput)||void 0===i||i.popPending()}if(e){var n,o,s,a,r,c;this.commentInput.setDisabled(!1);this.summaryInput.setDisabled(!1);if(t){var l;null===(l=this.headlineInput)||void 0===l||l.setDisabled(!1)}this.submitButton.setDisabled(!1);this.previewButton.setDisabled(!1);this.viewChangesButton.setDisabled(!1);this.cancelButton.setDisabled(!1);null===(n=this.minorCheckbox)||void 0===n||n.setDisabled(!1);null===(o=this.watchCheckbox)||void 0===o||o.setDisabled(!1);null===(s=this.subscribeCheckbox)||void 0===s||s.setDisabled(!1);null===(a=this.omitSignatureCheckbox)||void 0===a||a.setDisabled(!1);null===(r=this.deleteCheckbox)||void 0===r||r.setDisabled(!1);if(null!==(c=this.deleteCheckbox)&&void 0!==c&&c.isSelected())this.updateFormOnDeleteCheckboxChange(!0)}if(!this.commentInput.isPending())this.$element.removeClass("cd-commentForm-pending")}showMessage(e,{type:t="notice",name:i,isRaw:n=!1}={}){if(this.destroyed||i&&this.$messageArea.children(".cd-message-"+i).length)return;const o=n?e:new OO.ui.MessageWidget({type:t,inline:!0,label:e instanceof $?e:Object(u.Z)(e),classes:["cd-message"].concat(i?"cd-message-"+i:[])}).$element;this.$messageArea.append(o).cdAddCloseButton().cdScrollIntoView("top")}hideMessage(e){const t=this.$messageArea.children(".cd-message-"+e);if(t.length)t.remove()}abort({message:e,messageType:t="error",isRawMessage:i=!1,logMessage:n,cancel:o=!1,currentOperation:s}){if(s)this.closeOperation(s);if(!this.destroyed){if(n)console.warn(n);if(o){v.a.add(e instanceof $?e:Object(u.Z)(e),{type:"error",autoHideSeconds:"long"});this.cancel(!1)}else{if(!s||"preview"!==s.type||!s.isAuto)this.showMessage(e,{type:t,isRaw:i});this.$messageArea.cdScrollIntoView("top")}}}handleError({type:e,code:t,details:i,apiResp:n,message:s,messageType:a="error",logMessage:r,cancel:c=!1,isRawMessage:l=!1,currentOperation:d}){var m,h=this;switch(e){case"parse":{const e=["locateComment","findPlace","locateSection"].includes(t)?y.b.getCurrent().getUrl({action:"edit",...this.targetSection?{}:{section:0}}):void 0;switch(t){case"locateComment":s=cd.a.sParse("error-locatecomment",e);break;case"locateSection":s=cd.a.sParse("error-locatesection",e);break;case"numberedList":s=cd.a.sParse("cf-error-numberedlist");break;case"numberedList-table":s=cd.a.sParse("cf-error-numberedlist")+" "+cd.a.sParse("cf-error-numberedlist-table");break;case"closed":s=cd.a.sParse("cf-error-closed");break;case"findPlace":s=cd.a.sParse("cf-error-findplace",e);break;case"delete-repliesToComment":s=cd.a.sParse("cf-error-delete-repliestocomment");break;case"delete-repliesInSection":s=cd.a.sParse("cf-error-delete-repliesinsection");break;case"commentLinks-commentNotFound":s=cd.a.sParse("cf-error-commentlinks-commentnotfound",i.id)}s=Object(u.Z)(s,{callbacks:{"cd-message-reloadPage":(m=o()((function*(){if(h.confirmClose())h.reloadPage()})),function(){return m.apply(this,arguments)})}});break}case"api":switch(t){case"missing":s=cd.a.sParse("cf-error-pagedoesntexist");break;case"error":{const e=n.errors[0];switch(e.code){case"missingtitle":s=cd.a.sParse("cf-error-pagedoesntexist");break;default:s=e.html}break}}(s=Object(u.Z)(s)).find(".mw-parser-output").css("display","inline");r||(r=[t,n]);break;case"network":case"javascript":s=(s?s+" ":"")+cd.a.sParse("error-"+e)}this.abort({message:s,messageType:a,isRawMessage:l,logMessage:r,cancel:c,currentOperation:d})}commentTextToCode(e){const t=new m(this,e);this.willCommentBeIndented=t.isIndented();let i=this.commentInput.getValue();if(cd.a.config.preTransformCode)i=cd.a.config.preTransformCode(i,this);i=t.process(i);if(cd.a.config.postTransformCode)i=cd.a.config.postTransformCode(i,this);return i}addAnchorsToComments(e,t){t.forEach(t=>{const i=h.a.getById(t);if(i){const n=i.locateInCode(e),o=cd.a.config.getAnchorCode(t);if(n.code.includes(o))return;const s=m.prototype.prepareLineStart(n.indentation,n.code),a=s.match(/^[:*#]* */)[0].length;({wholeCode:e}=i.modifyWholeCode({action:"edit",commentCode:(n.headingCode||"")+s.slice(0,a)+o+s.slice(a)+n.signatureDirtyCode,wholeCode:e,thisInCode:n}))}else if(!$("#"+t).length)throw new r.a({type:"parse",code:"commentLinks-commentNotFound",details:{id:t}})});return e}prepareWholeCode(e){var t=this;return o()((function*(){var i;const n=function(e){const t=/\[\[#(\d{12}[_ ][^|\]]+)/g,i=[];let n;for(;n=t.exec(e);)i.push(n[1]);return i}(t.commentInput.getValue());t.sectionSubmitted=Boolean("addSection"===t.mode&&!t.newTopicOnTop&&(null===(i=t.headlineInput)||void 0===i?void 0:i.getValue().trim()));try{if(t.targetSection&&null!==t.targetSection.liveSectionNumber&&!n.length)yield t.targetSection.getCode(t);else yield t.targetPage.getCode(!p.a.doesPageExist())}catch(e){if(e instanceof r.a){const i=Object.assign({},{message:cd.a.sParse("cf-error-getpagecode")},e.data);t.handleError(i)}else t.handleError({type:"javascript",logMessage:e});return}let o,s;try{var a;if(!(t.target instanceof y.a||t.target instanceof g.a&&t.sectionSubmitted))t.target.locateInCode(t.sectionSubmitted);if("replyInSection"===t.mode)t.target.setLastCommentIndentation(t);({wholeCode:o,commentCode:s}=t.target.modifyWholeCode({commentCode:t.target instanceof c.a?void 0:t.commentTextToCode(e),action:t.mode,formAction:e,doDelete:null===(a=t.deleteCheckbox)||void 0===a?void 0:a.isSelected(),commentForm:t}));o=t.addAnchorsToComments(o,n)}catch(e){if(e instanceof r.a)t.handleError(e.data);else t.handleError({type:"javascript",logMessage:e});return}return{wholeCode:o,commentCode:s}}))()}registerOperation(e,t={},i=!0){const n=Object.assign(t,{type:e});this.operations.push(n);n.isClosed=!1;if("preview"!==n.type||!n.isAuto){if(i)this.$messageArea.empty();this.pushPending(["load","submit"].includes(n.type),n.affectsHeadline)}return n}closeOperation(e){if(!e.isClosed){e.isClosed=!0;if("preview"!==e.type||!e.isAuto)this.popPending(["load","submit"].includes(e.type),e.affectsHeadline)}}maybeCloseOperation(e){if(e.isClosed)return!0;const t=Object(u.k)(this.operations,t=>e!==t&&["preview","viewChanges"].includes(t.type)&&!t.isDelayed);if(null!==t&&t>this.operations.indexOf(e)){this.closeOperation(e);return!0}else return!1}unregisterOperation(e){Object(u.O)(this.operations,e);if("preview"!==e.type||!e.isAuto)this.popPending("submit"===e.type,e.affectsHeadline)}isBeingSubmitted(){return this.operations.some(e=>"submit"===e.type&&!e.isClosed)}isContentBeingLoaded(){return this.operations.some(e=>"load"===e.type&&!e.isClosed)}preview(e=!0,t=!0,i){var n=this;return o()((function*(){var o;if(n.isContentBeingLoaded()||!(n.target instanceof y.a)&&!n.target.inCode&&n.checkCodeRequest&&"resolved"===(yield Object(u.x)(n.checkCodeRequest))||n.isBeingSubmitted()||t&&!w.a.get("autopreview")){if(i)n.closeOperation(i);return}const s=i||n.registerOperation("preview",{isAuto:t});if(t){const t=Date.now()-n.lastPreviewTimestamp<1e3;if(t||n.operations.some(e=>!e.isClosed&&"preview"===e.type&&e!==s)){if(n.previewTimeout)n.unregisterOperation(s);else{s.isDelayed=!0;n.previewTimeout=setTimeout(()=>{n.previewTimeout=null;n.preview(e,!0,s)},t?1e3-(Date.now()-n.lastPreviewTimestamp):100)}return}n.lastPreviewTimestamp=Date.now()}if(n.maybeCloseOperation(s))return;if(!(n.target instanceof y.a||n.target.inCode)){yield n.checkCode();if(!n.target.inCode)n.closeOperation(s);if(s.isClosed)return}const a=!(n.commentInput.getValue().trim()||null!==(o=n.headlineInput)&&void 0!==o&&o.getValue().trim());if(a&&!e){n.closeOperation(s);return}const c=n.commentTextToCode("preview");let l,d;try{({html:l,parsedSummary:d}=yield Object(T.p)(c,{title:n.targetPage.name,summary:Object(u.c)({text:n.summaryInput.getValue()})}))}catch(e){if(e instanceof r.a){const t=Object.assign({},e.data,{message:cd.a.sParse("cf-error-preview"),currentOperation:s});n.handleError(t)}else n.handleError({type:"javascript",logMessage:e,currentOperation:s});return}if(!n.maybeCloseOperation(s)){if(l){var m;if(t&&a||null!==(m=n.deleteCheckbox)&&void 0!==m&&m.isSelected())n.$previewArea.empty();else{n.$previewArea.html(l).prepend($("<div>").addClass("cd-commentForm-previewArea-label").text(cd.a.s("cf-block-preview"))).cdAddCloseButton().toggleClass("cd-commentForm-previewArea-indentedComment",n.willCommentBeIndented);mw.hook("convenientDiscussions.previewReady").fire(n.$previewArea,cd.a);if(!t)mw.hook("wikipage.content").fire(n.$previewArea)}n.$summaryPreview.empty();if(d)n.$summaryPreview.append(document.createTextNode(cd.a.sParse("cf-summary-preview")),document.createTextNode(cd.a.mws("colon-separator")),$("<span>").addClass("comment").append(d))}if(w.a.get("autopreview")&&n.previewButton.$element.is(":visible")){n.previewButton.$element.hide();n.viewChangesButton.$element.show();n.adjustLabels()}n.closeOperation(s);if(!t){n.$previewArea.cdScrollIntoView(n.$previewArea.hasClass("cd-commentForm-previewArea-above")?"top":"bottom");Object(u.m)(n.commentInput)}}}))()}viewChanges(){var e=this;return o()((function*(){var t;if(e.isBeingSubmitted())return;const i=e.registerOperation("viewChanges"),{wholeCode:n}=(yield e.prepareWholeCode("viewChanges"))||{};if(void 0===n)e.closeOperation(i);if(i.isClosed)return;mw.loader.load("mediawiki.diff.styles");let o;try{const t={action:"compare",totitle:e.targetPage.name,toslots:"main","totext-main":n,topst:!0,prop:"diff",...cd.a.g.apiErrorsFormatHtml};if(e.sectionSubmitted||!p.a.doesPageExist()){t.fromslots="main";t["fromtext-main"]="addSection"===e.mode?"":e.targetSection.code}else t.fromrev=e.targetPage.revisionId;o=yield p.a.getApi().post(t,{contentType:"multipart/form-data"}).catch(T.m)}catch(t){if(t instanceof r.a){const n=Object.assign({},t.data,{message:cd.a.sParse("cf-error-viewchanges"),currentOperation:i});e.handleError(n)}else e.handleError({type:"javascript",logMessage:t,currentOperation:i});return}if(e.maybeCloseOperation(i))return;let s=null===(t=o.compare)||void 0===t?void 0:t.body;if(s){s=Object(u.ab)(s);e.$previewArea.html(s).prepend($("<div>").addClass("cd-commentForm-previewArea-label").text(cd.a.s("cf-block-viewchanges"))).cdAddCloseButton()}else{e.$previewArea.empty();if(void 0!==s)e.showMessage(cd.a.sParse("cf-notice-nochanges"))}if(w.a.get("autopreview")){e.viewChangesButton.$element.hide();e.previewButton.$element.show();e.adjustLabels()}e.closeOperation(i);e.$previewArea.cdScrollIntoView(e.$previewArea.hasClass("cd-commentForm-previewArea-above")?"top":"bottom");Object(u.m)(e.commentInput)}))()}reloadPage(e,t){var i=this;return o()((function*(){i.forget();try{yield p.a.reload(e)}catch(e){if(e instanceof r.a){const n=Object.assign({},e.data,{message:cd.a.sParse("error-reloadpage-saved"),cancel:!0,currentOperation:t});i.handleError(n)}else i.handleError({type:"javascript",logMessage:e,cancel:!0,currentOperation:t});p.a.hideLoadingOverlay()}}))()}runChecks({doDelete:e}){var t,i,n;const o=[{condition:!e&&""===(null===(t=this.headlineInput)||void 0===t?void 0:t.getValue()),confirmation:()=>{const e=this.headlineInputPlaceholder===cd.a.s("cf-headline-topic")?"topic":"subsection";return confirm(cd.a.s("cf-confirm-noheadline-"+e)+" "+cd.a.s("cf-confirm-noheadline-question"))}},{condition:!(e||this.commentInput.getValue().trim()||null!==(i=cd.a.config.noConfirmPostEmptyCommentPageRegexp)&&void 0!==i&&i.test(y.b.getCurrent().name)),confirmation:()=>confirm(cd.a.s("cf-confirm-empty"))},{condition:!e&&this.commentInput.getValue().trim().length>cd.a.config.longCommentThreshold,confirmation:()=>confirm(cd.a.s("cf-confirm-long",cd.a.config.longCommentThreshold))},{condition:!e&&/^==[^=]/m.test(this.commentInput.getValue())&&"edit"!==this.mode&&!(null!==(n=this.preloadConfig)&&void 0!==n&&n.commentTemplate),confirmation:()=>confirm(cd.a.s("cf-confirm-secondlevelheading"))},{condition:e,confirmation:()=>confirm(cd.a.s("cf-confirm-delete"))}];for(const e of o)if(e.condition&&!e.confirmation()){Object(u.m)(this.commentInput);return!1}return!0}editPage(e,t){var i=this;return o()((function*(){let n;try{var o,s,a;let t,r,c;if(i.sectionSubmitted){if("addSection"===i.mode){c=i.headlineInput.getValue().trim();t="new"}else t=i.targetSection.liveSectionNumber;r=i.targetSection}else r=i.targetPage;n=yield i.targetPage.edit({section:t,sectiontitle:c,text:e,summary:Object(u.c)({text:i.summaryInput.getValue()}),minor:null===(o=i.minorCheckbox)||void 0===o?void 0:o.isSelected(),baserevid:null===(s=r)||void 0===s?void 0:s.revisionId,starttimestamp:null===(a=r)||void 0===a?void 0:a.queryTimestamp,watchlist:i.watchCheckbox.isSelected()?"watch":"unwatch"})}catch(e){if(e instanceof r.a){const{type:n,details:o}=e.data;if("network"===n)i.handleError({type:n,message:cd.a.sParse("cf-error-couldntedit"),currentOperation:t});else{let e,{code:s,message:a,isRawMessage:r,logMessage:c}=o;if("editconflict"===s){a+=" "+cd.a.sParse("cf-notice-editconflict-retrying");e="notice"}i.handleError({type:n,message:a,messageType:e,isRawMessage:r,logMessage:c,currentOperation:t});if("editconflict"===s)i.submit(!0)}}else i.handleError({type:"javascript",logMessage:e,currentOperation:t});return null}return n}))()}updateSubscriptionStatus(e,t,i){if(this.subscribeCheckbox.isSelected())if("addSection"===this.mode||!w.a.get("useTopicSubscription")&&("addSubsection"===this.mode||this.sectionOpeningCommentEdited)){let n,o,s,a,r;if(this.headlineInput)o=this.headlineInput.getValue().trim();if(!this.sectionOpeningCommentEdited&&!o)[,o]=t.match(/^==(.*?)==[ \t]*$/m)||[];s=o&&Object(d.k)(o);if(w.a.get("useTopicSubscription"))n=f.a.generateDtSubscriptionId(C.a.getCurrent().getName(),e);else{n=s;if(this.sectionOpeningCommentEdited){a=Object(d.k)(this.originalHeadline);r=n!==a}}if(void 0!==n){i.justSubscribedToSection=n;if(r)i.justUnsubscribedFromSection=a;x.a.subscribe(n,s,a)}}else{var n;let t=null===(n=this.targetSection)||void 0===n?void 0:n.getSectionSubscribedTo();if(t&&!t.subscriptionState){t.ensureSubscribeIdPresent(t.oldestComment||e);t.subscribe("silent");i.justSubscribedToSection=t.subscribeId}}else{var o;const t=null===(o=this.targetSection)||void 0===o?void 0:o.getSectionSubscribedTo();if(null!=t&&t.subscriptionState){t.ensureSubscribeIdPresent(t.oldestComment||e);t.unsubscribe("silent");i.justUnsubscribedFromSection=t.subscribeId}}}generateFutureCommentId(e){const t=new Date(e);t.setSeconds(0);let i;if(this.target instanceof c.a){const e=this.target.getChildren(!0);i=e[e.length-1]||this.target}else if(this.target instanceof g.a){const e="addSubsection"===this.mode&&this.target.getChildren(!0).slice(-1)[0]||this.target;f.a.getAll().slice(0,e.index+1).reverse().some(e=>{if(e.commentsInFirstChunk.length)i=e.commentsInFirstChunk[e.commentsInFirstChunk.length-1];return i})}else i=this.newTopicOnTop?null:h.a.getByIndex(-1);const n=h.a.getAll().slice(0,i?i.index+1:0).filter(e=>{var i;return e.author===C.a.getCurrent()&&(null===(i=e.date)||void 0===i?void 0:i.getTime())===t.getTime()}).map(e=>e.id);return h.a.generateId(t,C.a.getCurrent().getName(),n)}submit(e=!1){var t=this;return o()((function*(){var i,n,o;if(t.isBeingSubmitted()||t.isContentBeingLoaded())return;const s=null===(i=t.deleteCheckbox)||void 0===i?void 0:i.isSelected();if(!t.runChecks({doDelete:s}))return;const a=t.registerOperation("submit",void 0,!e);if(l.a.getAll().some(e=>e!==t&&e.isBeingSubmitted())){t.handleError({type:"ui",message:cd.a.sParse("cf-error-othersubmitted"),currentOperation:a});return}const{wholeCode:r,commentCode:c}=(yield t.prepareWholeCode("submit"))||{};if(void 0===r){t.closeOperation(a);return}const d=yield t.editPage(r,a);if(!d)return;const u={wasCommentFormSubmitted:!0};if(!p.a.doesPageExist()){mw.config.set("wgArticleId",t.targetPage.pageId);u.wasPageCreated=!0}if(t.subscribeCheckbox)t.updateSubscriptionStatus(d,c,u);if(null!==(n=t.watchCheckbox)&&void 0!==n&&n.isSelected()&&$("#ca-watch").length)$("#ca-watch").attr("id","ca-unwatch").find("a").attr("href",y.b.getCurrent().getUrl({action:"unwatch"}));if((null===(o=t.watchCheckbox)||void 0===o||!o.isSelected())&&$("#ca-unwatch").length)$("#ca-unwatch").attr("id","ca-watch").find("a").attr("href",y.b.getCurrent().getUrl({action:"watch"}));if(!s){const e="edit"===t.mode?t.target.id:t.generateFutureCommentId(d);u.commentIds=[e]}if(t.targetPage!==y.b.getCurrent())yield y.b.getCurrent().purge();t.reloadPage(u,a)}))()}confirmClose(){return!this.isAltered()||confirm(cd.a.s("cf-confirm-close"))}cancel(e=!0){var t=this;return o()((function*(){if(!p.a.isPageOverlayOn()&&!t.isBeingSubmitted())if(!e||t.confirmClose()){t.destroy();if("reply"===t.mode)t.target.scrollIntoView("top");else if("replyInSection"===t.mode){t.target.replyButton.show();t.target.$replyButtonWrapper.removeClass("cd-replyButtonWrapper-hasCommentForm")}else if("edit"===t.mode){t.target.$elements.removeClass("cd-hidden");if(t.target.isOpeningSection)$(t.target.section.barElement).removeClass("cd-hidden");t.target.scrollIntoView("top");t.target.configureLayers()}else if("addSection"===t.mode&&p.a.$addSectionButtonContainer)p.a.$addSectionButtonContainer.show()}else Object(u.m)(t.commentInput)}))()}destroy(){if("reply"===this.mode)this.target.subitemList.remove("replyForm");else{this.$outermostElement.remove();if("addSection"===this.mode)if(!p.a.doesPageExist())p.a.$content.removeClass("ext-discussiontools-init-replylink-open").children(".noarticletext, .warningbox").show()}this.operations.filter(e=>!e.isClosed).forEach(this.closeOperation);this.forget();this.destroyed=!0}forget(){if("addSection"===this.mode)l.a.forgetAddSectionForm();else delete this.target[l.a.modeToProperty(this.mode)+"Form"];l.a.remove(this);l.a.saveSession(!0);b.a.updateCommentFormButton();p.a.updatePageTitle();this.autocomplete.cleanUp();this.destroyInputPopups()}isAltered(){return void 0!==this.originalComment&&this.originalComment!==this.commentInput.getValue()||this.autoSummary!==this.summaryInput.getValue()||this.headlineInput&&void 0!==this.originalHeadline&&this.originalHeadline!==this.headlineInput.getValue()}updateAutoSummary(e=!0,t=!1){var i;if(this.summaryAltered)return;this.dontAutopreviewOnSummaryChange=t;const n=this.generateStaticSummaryText(),o=this.headlineInput&&"addSubsection"!==this.mode?Object(d.k)(this.headlineInput.getValue()):null===(i=this.target.getRelevantSection())||void 0===i?void 0:i.headline;let s;if(["reply","replyInSection"].includes(this.mode)){const e=this.commentInput.getValue().trim().replace(/\s+/g," ").replace(cd.a.g.pipeTrickRegexp,"$1$2$3").replace(/\[\[:?(?:([^|[\]<>\n]+)\|)?(.+?)\]\]/g,(e,t,i)=>cd.a.g.userLinkRegexp.test(t)?i:e);if(e&&e.length<=cd.a.config.summaryCommentTextLengthLimit)s=`: ${e} (-)`}else if("addSubsection"===this.mode){const e=Object(d.k)(this.headlineInput.getValue());if(e)s=`: /* ${e} */`}this.autoSummary=Object(u.c)({text:n,section:o,optionalText:s,addPostfix:!1});if(e)this.summaryInput.setValue(this.autoSummary)}generateStaticSummaryText(){switch(this.mode){case"reply":if(this.target.isOpeningSection)return cd.a.s("es-reply");else{this.target.maybeRequestAuthorGender(this.updateAutoSummary);return this.target.isOwn?cd.a.s("es-addition"):Object(u.N)(cd.a.s("es-reply-to",this.target.author.getName(),this.target.author))}case"edit":var e;return(e=>{let t,i=this.target;if(this.target.isOwn){const e=this.target.getParent();if(e)if(0===e.level)t="reply";else{e.maybeRequestAuthorGender(this.updateAutoSummary);t=e.isOwn?"addition":"reply-to";i=e}else if(this.target.isOpeningSection)t=this.targetSection.getParent()?"subsection":"topic";else t="comment"}else if(this.target.isOpeningSection)t=this.targetSection.getParent()?"subsection":"topic";else{this.target.maybeRequestAuthorGender(this.updateAutoSummary);t="comment-by"}const n=i.author.getName();return Object(u.N)(cd.a.s(`es-${e}-${t}`,"comment-by"===t&&i.author.isRegistered()?`[[${i.author.getNamespaceAlias()}:${n}|${n}]]`:n,i.author))})(null!==(e=this.deleteCheckbox)&&void 0!==e&&e.isSelected()?"delete":"edit");case"replyInSection":return cd.a.s("es-reply");case"addSection":var t;return(null===(t=this.preloadConfig)||void 0===t?void 0:t.summary)||cd.a.s("es-new-topic");case"addSubsection":return cd.a.s("es-new-subsection")}}updateFormOnDeleteCheckboxChange(e){if(e){var t,i,n,o,s;this.initialMinorCheckboxSelected=null===(t=this.minorCheckbox)||void 0===t?void 0:t.isSelected();null===(i=this.minorCheckbox)||void 0===i||i.setSelected(!1);this.commentInput.setDisabled(!0);null===(n=this.headlineInput)||void 0===n||n.setDisabled(!0);null===(o=this.minorCheckbox)||void 0===o||o.setDisabled(!0);null===(s=this.omitSignatureCheckbox)||void 0===s||s.setDisabled(!0);this.submitButtonLabelStandard=cd.a.s("cf-delete-button");this.submitButtonLabelShort=cd.a.s("cf-delete-button-short");this.submitButton.clearFlags().setFlags(["destructive","primary"]).setLabel(this.$element.hasClass("cd-commentForm-short")?this.submitButtonLabelStandard:this.submitButtonLabelShort)}else{var a,r,c,l;null===(a=this.minorCheckbox)||void 0===a||a.setSelected(this.initialMinorCheckboxSelected);this.commentInput.setDisabled(!1);null===(r=this.headlineInput)||void 0===r||r.setDisabled(!1);null===(c=this.minorCheckbox)||void 0===c||c.setDisabled(!1);null===(l=this.omitSignatureCheckbox)||void 0===l||l.setDisabled(!1);this.submitButtonLabelStandard=cd.a.s("cf-save");this.submitButtonLabelShort=cd.a.s("cf-save-short");this.submitButton.clearFlags().setFlags(["progressive","primary"]).setLabel(this.$element.hasClass("cd-commentForm-short")?this.submitButtonLabelStandard:this.submitButtonLabelShort)}}mention(e){if(e&&this.targetComment){const e=s.a.getConfig("mentions").transform(this.targetComment.author.getName());if(e.skipContentCheck(e))e.content="";e.cmdModify();const t=e.start+e.content+e.end,i=this.commentInput.getRange();this.commentInput.selectRange(0);Object(u.A)(this.commentInput,t);this.commentInput.selectRange(i.from+t.length,i.to+t.length);return}const t=this.commentInput.getRange().to;if(this.commentInput.getRange().from!==t)this.commentInput.selectRange(t);const i=t&&this.commentInput.getValue().substr(t-1,1);if(t&&!/\s/.test(i))Object(u.A)(this.commentInput," ");this.autocomplete.tribute.showMenuForCollection(this.commentInput.$input.get(0),this.autocomplete.tribute.collection.findIndex(e=>e.trigger===cd.a.config.mentionCharacter))}quote(e=!0){var t=this;return o()((function*(){const i=document.activeElement;let n=Object(u.F)()?i.value.substring(i.selectionStart,i.selectionEnd):yield p.a.getWikitextFromSelection(t.commentInput);n=n.trim();if(n||e){const e=t.commentInput.$input.is(":focus"),i=t.commentInput.getRange(),o=i.to;let s=Math.min(i.to,i.from),a=Math.max(i.to,i.from);if(!e&&s!==a){t.commentInput.selectRange(o);s=a=o}let r=cd.a.config.quoteFormatting;if($.isPlainObject(r))r=n.includes("\n")?r.multiline||r.singleline:r.singleline||r.multiline;const[c,l]=r;t.encapsulateSelection({pre:c,peri:cd.a.s("cf-quote-placeholder"),post:l,selection:n,ownline:!0})}}))()}encapsulateSelection({pre:e="",peri:t="",post:i="",selection:n,replace:o=!1,ownline:s=!1}){const a=this.commentInput.getRange(),r=Math.min(a.from,a.to),c=Math.max(a.from,a.to),l=this.commentInput.getValue(),d=s&&!/(^|\n)$/.test(l.slice(0,r))&&!/^\n/.test(t)?"\n":"",m=s&&!/^\n/.test(l.slice(c))&&!/\n$/.test(i)?"\n":"";let h;if(!n&&!o){h=r+d.length+e.length;n=l.substring(a.from,a.to)}else n||(n="");const[g]=n.match(/^ */),[f]=n.match(/ *$/),p=n||t,b=d+g+e+p.slice(g.length,p.length-f.length)+i+f+m;Object(u.A)(this.commentInput,b);if(!n&&!o)this.commentInput.selectRange(h,h+t.length)}getMode(){return this.mode}getPreloadConfig(){return this.preloadConfig}isNewTopicOnTop(){return this.newTopicOnTop}getOriginalHeadline(){return this.originalHeadline}getOriginalComment(){return this.originalComment}isSummaryAltered(){return this.summaryAltered}getLastFocused(){return this.lastFocused}resetCheckCodeRequest(){this.checkCodeRequest=null}getTarget(){return this.target}getParentComment(){return this.parentComment}setSectionSubmitted(e){this.sectionSubmitted=Boolean(e)}isSectionSubmitted(){return this.sectionSubmitted}getContainerListType(){return this.containerListType}restore(e){this.resetCheckCodeRequest();const t=this.getTarget();if(t instanceof c.a)if(t.id){const i=h.a.getById(t.id);if(i)try{this.setTargets(i);i[l.a.modeToProperty(this.getMode())](this);this.addToPage()}catch(t){console.warn(t);e(this)}else e(this)}else e(this);else if(t instanceof g.a){var i;const n=f.a.search({headline:t.headline,oldestCommentId:null===(i=t.oldestComment)||void 0===i?void 0:i.id,index:t.index,id:t.id,ancestors:t.getAncestors().map(e=>e.headline)});if(n)try{this.setTargets(n);n[l.a.modeToProperty(this.getMode())](this);this.addToPage()}catch(t){console.warn(t);e(this)}else e(this)}else if("addSection"===this.getMode()){this.addToPage();l.a.setAddSectionForm(this)}}goTo(){var e;null===(e=this.getParentComment())||void 0===e||e.expandAllThreadsDownTo();this.$element.cdScrollIntoView("center");Object(u.m)(this.commentInput)}}},function(e,t,i){"use strict";var n=i(28),o=i.n(n),s=i(0),a=i(17),r=i(3),c=i(14),l=i(1);let d,u=[],m=!1,h=[];class LiveTimestamp{constructor(e,t,i,n){this.element=e;this.date=t;this.addTimezone=i;this.callback=n}init(){if("improved"===r.a.get("timestampFormat")){if(!m)LiveTimestamp.initImproved();if(this.date.getTime()>d)h.push(this)}else if("relative"===r.a.get("timestampFormat"))this.setUpdateTimeout()}setUpdateTimeout(e=!1){if(e)this.update();const t=Date.now()-this.date.getTime(),i=c.h.find(e=>t<e.interval*s.a.g.msInMin);if(i){const e=Math.floor(t/s.a.g.msInMin/i.step);for(let n=(i.start+e*i.step)*s.a.g.msInMin;n<=i.interval*s.a.g.msInMin;n+=i.step*s.a.g.msInMin)if(t<n){Object(l.O)(u,this.updateTimeout);this.updateTimeout=setTimeout(()=>{this.setUpdateTimeout(!0)},n-t);u.push(this.updateTimeout);break}}}update(){this.element.textContent=Object(c.b)(this.date,this.addTimezone);if(this.callback)this.callback()}static initImproved(){m=!0;let e=o()();if(r.a.get("useUiTime")&&!["UTC",0].includes(s.a.g.uiTimezone))e="number"==typeof s.a.g.uiTimezone?e.utcOffset(s.a.g.uiTimezone):e.tz(s.a.g.uiTimezone);else e=e.utc();e=e.startOf("day");d=e.subtract(1,"day").valueOf();const t=e.add(1,"day").valueOf(),i=e.add(2,"day").valueOf(),n=t-Date.now(),a=setTimeout(LiveTimestamp.updateImproved,n),c=i-Date.now(),l=setTimeout(LiveTimestamp.updateImproved,c);u.push(a,l)}static updateImproved(){h.forEach(e=>{e.update()});if(a.a.isMounted())a.a.updateTimestampsInRefreshButtonTooltip()}static reset(){u.forEach(clearTimeout);u=[];m=!1;h=[]}}t.a=LiveTimestamp},function(e,t,i){e.exports=function(){"use strict";var e=6e4,t=36e5,i="millisecond",n="second",o="minute",s="hour",a="day",r="week",c="month",l="quarter",d="year",u="date",m="Invalid Date",h=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,g=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,f={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_")},p=function(e,t,i){var n=String(e);return!n||n.length>=t?e:""+Array(t+1-n.length).join(i)+e},b={s:p,z:function(e){var t=-e.utcOffset(),i=Math.abs(t),n=Math.floor(i/60),o=i%60;return(t<=0?"+":"-")+p(n,2,"0")+":"+p(o,2,"0")},m:function e(t,i){if(t.date()<i.date())return-e(i,t);var n=12*(i.year()-t.year())+(i.month()-t.month()),o=t.clone().add(n,c),s=i-o<0,a=t.clone().add(n+(s?-1:1),c);return+(-(n+(i-o)/(s?o-a:a-o))||0)},a:function(e){return e<0?Math.ceil(e)||0:Math.floor(e)},p:function(e){return{M:c,y:d,w:r,d:a,D:u,h:s,m:o,s:n,ms:i,Q:l}[e]||String(e||"").toLowerCase().replace(/s$/,"")},u:function(e){return void 0===e}},v="en",y={};y[v]=f;var w=function(e){return e instanceof T},x=function e(t,i,n){var o;if(!t)return v;if("string"==typeof t){var s=t.toLowerCase();y[s]&&(o=s),i&&(y[s]=i,o=s);var a=t.split("-");if(!o&&a.length>1)return e(a[0])}else{var r=t.name;y[r]=t,o=r}return!n&&o&&(v=o),o||!n&&v},C=function(e,t){if(w(e))return e.clone();var i="object"==typeof t?t:{};return i.date=e,i.args=arguments,new T(i)},k=b;k.l=x,k.i=w,k.w=function(e,t){return C(e,{locale:t.$L,utc:t.$u,x:t.$x,$offset:t.$offset})};var T=function(){function f(e){this.$L=x(e.locale,null,!0),this.parse(e)}var p=f.prototype;return p.parse=function(e){this.$d=function(e){var t=e.date,i=e.utc;if(null===t)return new Date(NaN);if(k.u(t))return new Date;if(t instanceof Date)return new Date(t);if("string"==typeof t&&!/Z$/i.test(t)){var n=t.match(h);if(n){var o=n[2]-1||0,s=(n[7]||"0").substring(0,3);return i?new Date(Date.UTC(n[1],o,n[3]||1,n[4]||0,n[5]||0,n[6]||0,s)):new Date(n[1],o,n[3]||1,n[4]||0,n[5]||0,n[6]||0,s)}}return new Date(t)}(e),this.$x=e.x||{},this.init()},p.init=function(){var e=this.$d;this.$y=e.getFullYear(),this.$M=e.getMonth(),this.$D=e.getDate(),this.$W=e.getDay(),this.$H=e.getHours(),this.$m=e.getMinutes(),this.$s=e.getSeconds(),this.$ms=e.getMilliseconds()},p.$utils=function(){return k},p.isValid=function(){return!(this.$d.toString()===m)},p.isSame=function(e,t){var i=C(e);return this.startOf(t)<=i&&i<=this.endOf(t)},p.isAfter=function(e,t){return C(e)<this.startOf(t)},p.isBefore=function(e,t){return this.endOf(t)<C(e)},p.$g=function(e,t,i){return k.u(e)?this[t]:this.set(i,e)},p.unix=function(){return Math.floor(this.valueOf()/1e3)},p.valueOf=function(){return this.$d.getTime()},p.startOf=function(e,t){var i=this,l=!!k.u(t)||t,m=k.p(e),h=function(e,t){var n=k.w(i.$u?Date.UTC(i.$y,t,e):new Date(i.$y,t,e),i);return l?n:n.endOf(a)},g=function(e,t){return k.w(i.toDate()[e].apply(i.toDate("s"),(l?[0,0,0,0]:[23,59,59,999]).slice(t)),i)},f=this.$W,p=this.$M,b=this.$D,v="set"+(this.$u?"UTC":"");switch(m){case d:return l?h(1,0):h(31,11);case c:return l?h(1,p):h(0,p+1);case r:var y=this.$locale().weekStart||0,w=(f<y?f+7:f)-y;return h(l?b-w:b+(6-w),p);case a:case u:return g(v+"Hours",0);case s:return g(v+"Minutes",1);case o:return g(v+"Seconds",2);case n:return g(v+"Milliseconds",3);default:return this.clone()}},p.endOf=function(e){return this.startOf(e,!1)},p.$set=function(e,t){var r,l=k.p(e),m="set"+(this.$u?"UTC":""),h=(r={},r[a]=m+"Date",r[u]=m+"Date",r[c]=m+"Month",r[d]=m+"FullYear",r[s]=m+"Hours",r[o]=m+"Minutes",r[n]=m+"Seconds",r[i]=m+"Milliseconds",r)[l],g=l===a?this.$D+(t-this.$W):t;if(l===c||l===d){var f=this.clone().set(u,1);f.$d[h](g),f.init(),this.$d=f.set(u,Math.min(this.$D,f.daysInMonth())).$d}else h&&this.$d[h](g);return this.init(),this},p.set=function(e,t){return this.clone().$set(e,t)},p.get=function(e){return this[k.p(e)]()},p.add=function(i,l){var u,m=this;i=Number(i);var h=k.p(l),g=function(e){var t=C(m);return k.w(t.date(t.date()+Math.round(e*i)),m)};if(h===c)return this.set(c,this.$M+i);if(h===d)return this.set(d,this.$y+i);if(h===a)return g(1);if(h===r)return g(7);var f=(u={},u[o]=e,u[s]=t,u[n]=1e3,u)[h]||1,p=this.$d.getTime()+i*f;return k.w(p,this)},p.subtract=function(e,t){return this.add(-1*e,t)},p.format=function(e){var t=this,i=this.$locale();if(!this.isValid())return i.invalidDate||m;var n=e||"YYYY-MM-DDTHH:mm:ssZ",o=k.z(this),s=this.$H,a=this.$m,r=this.$M,c=i.weekdays,l=i.months,d=function(e,i,o,s){return e&&(e[i]||e(t,n))||o[i].slice(0,s)},u=function(e){return k.s(s%12||12,e,"0")},h=i.meridiem||function(e,t,i){var n=e<12?"AM":"PM";return i?n.toLowerCase():n},f={YY:String(this.$y).slice(-2),YYYY:this.$y,M:r+1,MM:k.s(r+1,2,"0"),MMM:d(i.monthsShort,r,l,3),MMMM:d(l,r),D:this.$D,DD:k.s(this.$D,2,"0"),d:String(this.$W),dd:d(i.weekdaysMin,this.$W,c,2),ddd:d(i.weekdaysShort,this.$W,c,3),dddd:c[this.$W],H:String(s),HH:k.s(s,2,"0"),h:u(1),hh:u(2),a:h(s,a,!0),A:h(s,a,!1),m:String(a),mm:k.s(a,2,"0"),s:String(this.$s),ss:k.s(this.$s,2,"0"),SSS:k.s(this.$ms,3,"0"),Z:o};return n.replace(g,(function(e,t){return t||f[e]||o.replace(":","")}))},p.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},p.diff=function(i,u,m){var h,g=k.p(u),f=C(i),p=(f.utcOffset()-this.utcOffset())*e,b=this-f,v=k.m(this,f);return v=(h={},h[d]=v/12,h[c]=v,h[l]=v/3,h[r]=(b-p)/6048e5,h[a]=(b-p)/864e5,h[s]=b/t,h[o]=b/e,h[n]=b/1e3,h)[g]||b,m?v:k.a(v)},p.daysInMonth=function(){return this.endOf(c).$D},p.$locale=function(){return y[this.$L]},p.locale=function(e,t){if(!e)return this.$L;var i=this.clone(),n=x(e,t,!0);return n&&(i.$L=n),i},p.clone=function(){return k.w(this.$d,this)},p.toDate=function(){return new Date(this.valueOf())},p.toJSON=function(){return this.isValid()?this.toISOString():null},p.toISOString=function(){return this.$d.toISOString()},p.toString=function(){return this.$d.toUTCString()},f}(),S=T.prototype;return C.prototype=S,[["$ms",i],["$s",n],["$m",o],["$H",s],["$W",a],["$M",c],["$y",d],["$D",u]].forEach((function(e){S[e[1]]=function(t){return this.$g(t,e[0],e[1])}})),C.extend=function(e,t){return e.$i||(e(t,T,C),e.$i=!0),C},C.locale=x,C.isDayjs=w,C.unix=function(e){return C(1e3*e)},C.en=y[v],C.Ls=y,C.p={},C}()},function(e,t,i){"use strict";var n=i(4),o=i.n(n),s=i(6),a=i(13),r=i(5),c=i(9),l=i(30),d=i(0),u=i(2),m=i(8),h=i(3),g=i(19),f=i(12),p=i(1),b=i(7);const v={},y={};let w,x,C=null,k=0;function T(e){if(!Number.isNaN(Number(e)))u.a.getWorker().postMessage({type:"setAlarm",interval:e})}function S(){u.a.getWorker().postMessage({type:"removeAlarm"})}function E(e){return new Promise(t=>{const i=k++;Object.assign(e,{resolverId:i});u.a.getWorker().postMessage(e);y[i]=t})}function O(e){return N.apply(this,arguments)}function N(){return(N=o()((function*(e){if(v[e])return v[e];const{text:t,revid:i}=(yield m.b.getCurrent().parse({oldid:e},!0))||{},n=yield E({type:"parse",revisionId:i,text:t,g:Object(p.J)(d.a.g,["isIPv6Address"]),config:Object(p.J)(d.a.config,["checkForCustomForeignComponents"])});if(!v[n.revisionId])v[n.revisionId]=n;Object.keys(v).forEach(e=>{const t=Number(e);if(t!==n.revisionId&&t!==C&&t!==x&&t!==mw.config.get("wgRevisionId"))delete v[e]});return n}))).apply(this,arguments)}function P(){return(P=o()((function*(e){var t;const i=yield m.b.getCurrent().getRevisions({rvprop:["ids"],rvstart:new Date(1e3*u.a.getBootProcess().getPreviousVisitUnixTime()).toISOString(),rvlimit:1},!0);x=null===(t=i[0])||void 0===t?void 0:t.revid;const n=mw.config.get("wgRevisionId");if(x&&x<n){const{comments:t}=yield O(x),{comments:i}=yield O(n);if(F(n)){D(i,t);_(i,e)}}}))).apply(this,arguments)}function L(e){c.a.getAll().forEach(e=>{delete e.match;delete e.matchScore});e.forEach(e=>{delete e.match});e.forEach(e=>{const{section:t,score:i}=c.a.search(e,!0)||{};if(t&&(!t.match||i>t.matchScore)){if(t.match)delete t.match.match;t.match=e;t.matchScore=i;e.match=t}});c.a.getAll().forEach(e=>{var t,i;e.liveSectionNumber=null!==(t=null===(i=e.match)||void 0===i?void 0:i.sectionNumber)&&void 0!==t?t:null;e.liveSectionNumberRevisionId=C;delete e.code;delete e.revisionId;delete e.queryTimestamp})}function j(e,t,i){return e.map(e=>{var n,o,s,a,r;const c=(null===(n=e.parent)||void 0===n?void 0:n.id)===(null===(o=t.parent)||void 0===o?void 0:o.id),l=(null===(s=e.section)||void 0===s?void 0:s.headline)===(null===(a=t.section)||void 0===a?void 0:a.headline),d=e.index===t.index&&i,u=e.elementHtmls.filter((e,i)=>e===t.elementHtmls[i]).length/Math.max(e.elementHtmls.length,t.elementHtmls.length),m=1===u?1:Object(p.d)(e.text,t.text);return{comment:e,score:c*(null!==(r=e.parent)&&void 0!==r&&r.id?1:.75)+1*l+u+m+.25*d}}).filter(e=>e.score>1.66).sort((e,t)=>{if(t.score>e.score)return 1;else if(t.score<e.score)return-1;else return 0})}function D(e,t){e.forEach(e=>{delete e.match;delete e.matchScore;delete e.hasPoorMatch;delete e.parentMatch});t.forEach(i=>{const n=e.filter(e=>e.authorName===i.authorName&&e.date&&i.date&&e.date.getTime()===i.date.getTime()),o=e.length===t.length;if(1===n.length)n[0].match=n[0].match?j([n[0].match,i],n[0],o)[0].comment:i;else if(n.length>1){let e;j(n,i,o).forEach(t=>{if(!e&&(!t.comment.match||t.comment.matchScore<t.score)){t.comment.match=i;t.comment.matchScore=t.score;delete t.comment.hasPoorMatch;e=!0}else if(!t.comment.match)t.comment.hasPoorMatch=!0})}})}function I(){return A.apply(this,arguments)}function A(){return(A=o()((function*(){if(!u.a.isPageActive()||u.a.isBooting())return;const e=document.hidden;if(!e||w){try{const e=yield m.b.getCurrent().getRevisions({rvprop:["ids"],rvlimit:1},!0),t=mw.config.get("wgRevisionId");if(e.length&&e[0].revid>(C||t)){const{revisionId:e,comments:i,sections:n}=yield O();if(F(t)){const{comments:o}=yield O(t);C=e;if(F(t)){L(n);g.a.addNewSections(n);D(o,i);B(o);yield H(i,o,t)}}}}catch(e){if(!(e instanceof s.a)||e.data&&"network"!==e.data.type)console.warn(e)}if(e){T(1e3*d.a.g.backgroundUpdateCheckInterval);w=!0}else T(1e3*d.a.g.updateCheckInterval)}else{const e=()=>{$(document).off("visibilitychange",e);w=!1;S();I()};$(document).on("visibilitychange",e);T(1e3*Math.abs(d.a.g.backgroundUpdateCheckInterval-d.a.g.updateCheckInterval));w=!0}}))).apply(this,arguments)}function M(e,t){return t.textHtmlToCompare!==e.textHtmlToCompare||t.headingHtmlToCompare&&t.headingHtmlToCompare!==e.headingHtmlToCompare}function _(e,t){const i=function(e){const t=Object.assign({},e);Object.keys(t).forEach(e=>{const i=t[e],n=Math.min(...Object.entries(i).map(([,e])=>e.seenUnixTime));if(!n||n<Date.now()-60*d.a.g.msInDay)delete t[e]});return t}(Object(p.u)("seenRenderedChanges")),n=mw.config.get("wgArticleId"),o=[];e.forEach(e=>{if(e.id===t)return;const s=e.match;if(s){var a,c;const t=null===(a=i[n])||void 0===a?void 0:null===(c=a[e.id])||void 0===c?void 0:c.htmlToCompare;if(M(s,e)&&t!==e.htmlToCompare){const t=r.a.getById(e.id);if(!t)return;const i={old:s,current:e,0:s,1:e};t.markAsChanged("changedSince",!0,x,i);if(t.isOpeningSection){var l;null===(l=t.section)||void 0===l||l.resubscribeToRenamed(e,s)}o.push({comment:t,commentsData:i})}}});if(o.length)mw.hook("convenientDiscussions.changesSincePreviousVisit").fire(o);delete i[n];Object(p.Q)("seenRenderedChanges",i);mw.storage.remove("convenientDiscussions-seenRenderedEdits")}function B(e){let t=!1;const i=[];e.forEach(e=>{const n=e.match;let o;const s={},a={current:e,new:n,0:e,1:n};if(n){o=r.a.getById(e.id);if(!o)return;if(o.isDeleted){o.unmarkAsChanged("deleted");t=!0;s.undeleted=!0}if(M(e,n)){if(!o.htmlToCompare||o.htmlToCompare!==n.htmlToCompare){const i=o.update(e,n);o.htmlToCompare=n.htmlToCompare;o.markAsChanged("changed",i,C,a);t=!0;s.changed={updateSuccess:i}}}else if(o.isChanged){o.update(e,n);o.unmarkAsChanged("changed");t=!0;s.unchanged=!0}}else if(!e.hasPoorMatch){o=r.a.getById(e.id);if(!o||o.isDeleted)return;o.markAsChanged("deleted");t=!0;s.deleted=!0}if(Object.keys(s).length)i.push({comment:o,events:s,commentsData:a})});if(t){r.a.maybeRedrawLayers(!1,!0);l.a.init(!1)}if(i.length)mw.hook("convenientDiscussions.newChanges").fire(i)}function F(e){return e===mw.config.get("wgRevisionId")&&!u.a.isBooting()&&!a.a.getAll().some(e=>e.isBeingSubmitted())}function H(e,t,i){return R.apply(this,arguments)}function R(){return(R=o()((function*(e,t,i){e.forEach(e=>{var t;e.author=f.a.get(e.authorName);if(null!==(t=e.parent)&&void 0!==t&&t.authorName)e.parent.author=f.a.get(e.parent.authorName)});const n=e.filter(e=>e.id&&!t.some(t=>t.match===e)).map(e=>{const i=Object.assign({},e);if(e.parent){const n=t.find(t=>t.match===e.parent);if(null!=n&&n.id)i.parentMatch=r.a.getById(n.id)}return i}),o=n.filter(e=>{if(!h.a.get("notifyCollapsedThreads")&&0!==e.logicalLevel){var t;let i;for(let t=e;t&&!i;t=t.parent)i=t.parentMatch;if(null!==(t=i)&&void 0!==t&&t.isCollapsed)return!1}if(e.isOwn||e.author.isMuted())return!1;if(e.isToMe)return!0;if(e.section){const t=e.section.match;if(t){const i=t.getClosestSectionSubscribedTo(!0);if(i){e.sectionSubscribedTo=i;return!0}}}return!1});if(d.a.g.genderAffectsUserString)yield Object(b.o)(n.map(e=>e.author),!0);if(F(i))u.a.updateAddedComments(n,o)}))).apply(this,arguments)}function U(e){return Y.apply(this,arguments)}function Y(){return(Y=o()((function*(e){const t=e.data;if("wakeUp"===t.type)I();else{const e=t.resolverId;delete t.resolverId;delete t.type;y[e](t);delete y[e]}}))).apply(this,arguments)}const W={init:()=>o()((function*(){w=!1;x=null;if(u.a.getWorker().onmessage)S();else u.a.getWorker().onmessage=U;T(1e3*d.a.g.updateCheckInterval);const e=u.a.getBootProcess();yield e.getVisitsRequest();if(e.getPreviousVisitUnixTime()){var t;!function(e){P.apply(this,arguments)}(e.data("wasCommentFormSubmitted")&&(null===(t=e.data("commentIds"))||void 0===t?void 0:t[0])||void 0)}}))(),getLastCheckedRevisionId:()=>C};Object.assign(W,{processPage:O});t.a=W},function(e,t,i){"use strict";var n=i(18),o=i(6),s=i(5),a=i(0),r=i(2),c=i(3),l=i(20),d=i(1),u=i(7);let m,h,g,f;function p(e,t,i){f.currentNode=e;let n,o=e;do{if(f.currentNode.classList.contains("cd-commentLevel")){const e=f.currentNode.getAttribute("class").match(/cd-commentLevel-(\d+)/);if(e&&Number(e[1])===(t||1)){n=0===t?f.currentNode:o;if(i&&n.contains(i))return null;break}}o=f.currentNode}while(f.parentNode());return n||null}function b(e,t,i){let n=e;const o=t[t.length-1];do{n=n.parentNode}while(!n.contains(o));let s=o;for(let e=s.parentNode;!(e===n||i&&e.contains(i));e=e.parentNode)s=e;for(let e=s.nextElementSibling;e&&"DL"===e.tagName&&e.classList.contains("cd-section-button-container");e=e.nextElementSibling)s=e;return s}function v(){if(!r.a.isCurrentRevision())return;const e=s.a.getAll().filter(e=>e.thread&&e.thread.isCollapsed!==Boolean(e.thread.isAutocollapseTarget)).map(e=>({id:e.id,collapsed:e.thread.isCollapsed})),t=Date.now(),i=e.length?{threads:e,saveUnixTime:t}:{},n=Object(d.u)("collapsedThreads");n[mw.config.get("wgArticleId")]=i;Object(d.Q)("collapsedThreads",n)}function y(){var e;const t=function(e){const t=Object.assign({},e);Object.keys(t).forEach(e=>{var i;const n=t[e];if(null===(i=n.threads)||void 0===i||!i.length||n.saveUnixTime<Date.now()-60*a.a.g.msInDay)delete t[e]});return t}(Object(d.u)("collapsedThreads")),i=t[mw.config.get("wgArticleId")]||{};let n=[];null===(e=i.threads)||void 0===e||e.forEach(e=>{const t=s.a.getById(e.id);if(null!=t&&t.thread)if(e.collapsed)n.push(t);else t.thread.wasManuallyExpanded=!0;else i.threads.splice(i.threads.indexOf(e.id),1)});const o=c.a.get("collapseThreadsLevel");if(0!==o)for(let e=0;e<s.a.getCount();e++){const t=s.a.getByIndex(e);if(t.thread)if(t.level>=o){if(![...t.getAncestors(),...t.thread.comments].some(e=>e.isOwn)){t.thread.isAutocollapseTarget=!0;if(!t.thread.wasManuallyExpanded)n.push(t)}e=t.thread.lastComment.index}}const l=a.a.g.genderAffectsUserString?Object(u.o)(Object(d.l)(n.map(e=>e.thread.getUsersInThread()))):void 0;n.sort((e,t)=>e.index-t.index).forEach(e=>{e.thread.collapse(l)});if(r.a.isCurrentRevision())Object(d.Q)("collapsedThreads",t)}class Thread{constructor(e){this.handleClickAreaHover=this.handleClickAreaHover.bind(this);this.handleClickAreaUnhover=this.handleClickAreaUnhover.bind(this);this.handleToggleClick=this.handleToggleClick.bind(this);m=a.a.g.threadElementPrototypes;this.rootComment=e;this.comments=[e,...e.getChildren(!0)];this.lastComment=this.comments.slice(-1)[0];this.commentCount=this.lastComment.index-this.rootComment.index+1;this.hasOutdents=r.a.areThereOutdents()&&this.comments.slice(1).some(e=>e.isOutdented);this.visualLastComment=this.hasOutdents?e.getChildren(!0,!0).slice(-1)[0]||e:this.lastComment;this.visualLastCommentFallback=this.hasOutdents?e.getChildren(!0,!0,!1).slice(-1)[0]||e:this.lastComment;this.setMarginalElementProperties();this.isCollapsed=!1}setMarginalElementProperties(){var e;let t,i,n,a;const r=this.rootComment.elements.find(e=>!Object(d.D)(e)),c=this.lastComment.highlightables,l=this.visualLastComment.highlightables,u=this.visualLastCommentFallback.highlightables,m=null===(e=s.a.getByIndex(this.lastComment.index+1))||void 0===e?void 0:e.elements[0];if(0===this.rootComment.level){t=r;n=b(t,l,m);a=this.visualLastComment===this.visualLastCommentFallback?n:b(t,u,m);i=this.hasOutdents?b(t,c,m):n}else{t=p(r,this.rootComment.level,m)||r;const e=c[c.length-1];if(this.hasOutdents){const o=s.a.getAll().slice(0,this.lastComment.index+1).reverse().find(e=>e.isOutdented);i=0===o.level?b(t,c,m):p(e,Math.min(o.level,this.rootComment.level),m);n=p(l[l.length-1],this.rootComment.level,m);a=this.visualLastComment===this.visualLastCommentFallback?n:p(u[u.length-1],this.rootComment.level,m)}else{i=p(e,this.rootComment.level,m)||e;a=n=i}}if(!(t&&i&&n&&a))throw new o.a;this.startElement=t;this.endElement=i;this.visualEndElement=n;this.visualEndElementFallback=a}handleClickAreaHover(){this.highlightTimeout=setTimeout(()=>{var e;null===(e=this.clickArea)||void 0===e||e.classList.add("cd-thread-clickArea-hovered")},75)}handleClickAreaUnhover(){var e;clearTimeout(this.highlightTimeout);null===(e=this.clickArea)||void 0===e||e.classList.remove("cd-thread-clickArea-hovered")}handleToggleClick(){if(this.clickArea.classList.contains("cd-thread-clickArea-hovered"))this.toggle()}createLine(){this.clickArea=m.clickArea.cloneNode(!0);this.clickArea.title=a.a.s("thread-tooltip");if(this.rootComment.isStartStretched)this.clickArea.classList.add("cd-thread-clickArea-stretchedStart");this.clickArea.onmouseenter=this.handleClickAreaHover;this.clickArea.onmouseleave=this.handleClickAreaUnhover;this.clickArea.onclick=this.handleToggleClick;this.line=this.clickArea.firstChild;if(this.endElement!==this.visualEndElement){let t=!1;for(let i=this.rootComment.index;i<=this.lastComment.index;i++){var e;const n=s.a.getByIndex(i);if(n.isOutdented)t=!0;if(null===(e=n.thread)||void 0===e||!e.isCollapsed);else i=n.thread.lastComment.index}if(t)this.line.classList.add("cd-thread-line-extended")}}getAdjustedEndElement(e){let t,i;if(e){var n;t=this.visualLastComment;i=this.visualEndElement;if(i.classList.contains("cd-hidden")&&null!==(n=i.previousElementSibling)&&void 0!==n&&n.classList.contains("cd-thread-expandNote"))i=i.previousElementSibling;if(!Object(d.y)(i.getBoundingClientRect()))i=this.visualEndElementFallback}else{t=this.lastComment;i=this.endElement}const o=(this.rootComment.level>=1||!i.classList.contains("cd-section-button-container"))&&(this.rootComment.subitemList.get("newCommentsNote")||this.rootComment===t&&this.rootComment.subitemList.get("replyForm"))||void 0;return null!=o&&o.is(":visible")?p(o.get(0),this.rootComment.level):i}getUsersInThread(){return[this.rootComment,...this.rootComment.getChildren(!0)].map(e=>e.author).filter(d.Y)}addExpandNode(e){const t=m.expandButton.cloneNode(!0),i=new n.a({tooltip:a.a.s("thread-expand-tooltip",a.a.g.cmdModifier),action:e=>{if(Object(d.B)(e))s.a.getAll().slice().reverse().forEach(e=>{var t;if(null!==(t=e.thread)&&void 0!==t&&t.isCollapsed)e.thread.expand()});else this.expand()},element:t,labelElement:t.querySelector(".oo-ui-labelElement-label")}),o=this.getUsersInThread(),r=o.map(e=>e.getName()).join(a.a.mws("comma-separator")),c=e=>{i.setLabel(a.a.s(e?"thread-expand-label-genderless":"thread-expand-label",this.commentCount,o.length,r,Object(d.p)(o)));i.element.classList.remove("cd-thread-button-invisible")};if(a.a.g.genderAffectsUserString)(e||Object(u.o)(o)).then(c,()=>{c(!0)});else c();const l=this.collapsedRange[0],h=["LI","DD"].includes(l.tagName)?l.tagName:"DIV",g=document.createElement(h);g.className="cd-thread-button-container cd-thread-expandNote";if(l.classList.contains("cd-connectToPreviousItem"))g.className+=" cd-connectToPreviousItem";g.appendChild(i.element);if("OL"===l.parentNode.tagName&&"ol"!==this.rootComment.ahContainerListType){const e=document.createElement("ul");e.className="cd-commentLevel";e.appendChild(g);l.parentNode.parentNode.insertBefore(e,l.parentNode);this.expandNoteContainer=e}else l.parentNode.insertBefore(g,l);this.expandNote=g;this.$expandNote=$(g)}collapse(e,t=!1){this.collapsedRange=r.a.getRangeContents(this.startElement,this.getAdjustedEndElement());this.collapsedRange.forEach(e=>{e.classList.add("cd-hidden");const t=$(e),i=t.data("cd-collapsed-thread-root-comments")||[];i.push(this.rootComment);t.data("cd-collapsed-thread-root-comments",i)});this.isCollapsed=!0;for(let e=this.rootComment.index;e<=this.lastComment.index;e++){var i;const t=s.a.getByIndex(e);if(null===(i=t.thread)||void 0===i||!i.isCollapsed||t.thread===this){t.isCollapsed=!0;t.collapsedThread=this;t.removeLayers()}else e=t.thread.lastComment.index}this.addExpandNode(e);if(h&&!t)this.$expandNote.cdScrollIntoView();if(this.rootComment.isOpeningSection){var n,o;null===(n=this.rootComment.section.actions.moreMenuSelect)||void 0===n||null===(o=n.getMenu().findItemFromData("editOpeningComment"))||void 0===o||o.setDisabled(!0)}if(this.endElement!==this.visualEndElement)for(let e=this.rootComment;e;e=e.getParent(!0)){const t=e.thread;if(t&&t.endElement!==t.visualEndElement){var a;null===(a=t.line)||void 0===a||a.classList.remove("cd-thread-line-extended")}}v();r.a.handleScroll();Thread.updateLines()}expand(){var e;this.collapsedRange.forEach(e=>{const t=$(e),i=t.data("cd-collapsed-thread-root-comments")||[];Object(d.O)(i,this.rootComment);t.data("cd-collapsed-thread-root-comments",i);if(!i.length)e.classList.remove("cd-hidden")});this.expandNote.remove();this.expandNote=null;null===(e=this.expandNoteContainer)||void 0===e||e.remove();this.expandNoteContainer=null;if(this.rootComment.isOpeningSection){var t,i;null===(t=this.rootComment.section.actions.moreMenuSelect)||void 0===t||null===(i=t.getMenu().findItemFromData("editOpeningComment"))||void 0===i||i.setDisabled(!1)}this.isCollapsed=!1;let n=!1;for(let e=this.rootComment.index;e<=this.lastComment.index;e++){var o;const t=s.a.getByIndex(e);if(t.isOutdented)n=!0;if(null===(o=t.thread)||void 0===o||!o.isCollapsed){t.isCollapsed=!1;t.collapsedThread=null;t.configureLayers()}else e=t.thread.lastComment.index}if(this.endElement!==this.visualEndElement&&n)for(let e=this.rootComment;e;e=e.getParent()){const t=e.thread;if(t&&t.endElement!==t.visualEndElement){var a;null===(a=t.line)||void 0===a||a.classList.add("cd-thread-line-extended")}}v();r.a.handleScroll();Thread.updateLines()}toggle(){this[this.isCollapsed?"expand":"collapse"]()}updateLine({elementsToAdd:e,threadsToUpdate:t,scrollX:i,scrollY:n,floatingRects:o}){var s;const c=(e,t,n)=>{let o;if("ltr"===n){o=e.left;if(t)o-=t.left+1}else{o=e.right-l;if(t)o+=t.right+1}if(e instanceof DOMRect)o+=i;return o-u},l=3,u=a.a.g.threadLineSideMargin,m=this.rootComment;if(m.isCollapsed&&!this.isCollapsed){this.removeLine();return!1}const h=0===m.level||"ol"===m.containerListType||"DIV"===this.startElement.tagName,g=h&&!this.isCollapsed?void 0:this[this.isCollapsed?"expandNote":"startElement"].getBoundingClientRect();o||(o=r.a.getFloatingElements().map(d.s));const f=g||m.getOffset({floatingRects:o}),p=h?m.getMargins():void 0;let b,v;const y=m.getTextDirection();if(f){b=(e=>e instanceof DOMRect?n+e.top:e.top)(f);v=c(f,p,y)}const w=this.isCollapsed?g:null===(s=this.getAdjustedEndElement(!0))||void 0===s?void 0:s.getBoundingClientRect();if(void 0===b||!w||!Object(d.y)(...[g,w].filter(d.i))||!(()=>{const e=c(w,p,y);return"ltr"===y?e>=v:e<=v})()){this.removeLine();return!1}const x=w.bottom-(b-n);if(this.clickAreaOffset&&b===this.clickAreaOffset.top&&v===this.clickAreaOffset.left&&x===this.clickAreaOffset.height)return!m.getParent();this.clickAreaOffset={top:b,left:v,height:x};if(!this.line)this.createLine();t.push(this);if(!this.clickArea.parentNode)e.push(this.clickArea)}setClickAreaOffset(){this.clickArea.style.left=this.clickAreaOffset.left+"px";this.clickArea.style.top=this.clickAreaOffset.top+"px";this.clickArea.style.height=this.clickAreaOffset.height+"px"}removeLine(){if(this.line){this.clickArea.remove();this.clickArea=this.clickAreaOffset=this.line=null}}static init(e=!0){if(c.a.get("enableThreads")){h=!1;f=new l.b(void 0,r.a.rootElement);s.a.getAll().forEach(e=>{try{e.thread=new Thread(e)}catch(e){}});if(!g){g=document.createElement("div");g.className="cd-threadLinesContainer"}else g.innerHTML="";Thread.updateLines();if(!g.parentNode)document.body.appendChild(g);if(e)y();h=!0}}static updateLines(e){if(!c.a.get("enableThreads")||(r.a.isBooting()||document.hidden)&&h)return;const t=[],i=[],n=window.scrollX,o=window.scrollY;s.a.getAll().slice().reverse().some(s=>{var a;return(null===(a=s.thread)||void 0===a?void 0:a.updateLine({elementsToAdd:t,threadsToUpdate:i,scrollX:n,scrollY:o,floatingRects:e}))||!1});i.forEach(e=>{e.setClickAreaOffset()});if(t.length)g.append(...t)}}t.a=Thread},function(e,t,i){"use strict";var n=i(4),o=i.n(n),s=i(9);class TributeEvents{constructor(e){this.tribute=e;this.tribute.events=this}static keys(){return[{key:9,value:"TAB"},{key:13,value:"ENTER"},{key:27,value:"ESCAPE"},{key:38,value:"UP"},{key:40,value:"DOWN"}]}bind(e){e.boundKeydown=this.keydown.bind(e,this);e.boundKeyup=this.keyup.bind(e,this);e.boundInput=this.input.bind(e,this);e.addEventListener("keydown",e.boundKeydown,!1);e.addEventListener("keyup",e.boundKeyup,!1);e.addEventListener("input",e.boundInput,!1)}unbind(e){e.removeEventListener("keydown",e.boundKeydown,!1);e.removeEventListener("keyup",e.boundKeyup,!1);e.removeEventListener("input",e.boundInput,!1);delete e.boundKeydown;delete e.boundKeyup;delete e.boundInput}keydown(e,t){let i=this;e.commandEvent=!1;TributeEvents.keys().forEach(n=>{if(n.key===t.keyCode){e.commandEvent=!0;e.callbacks()[n.value.toLowerCase()](t,i)}})}input(e,t){e.inputEvent=!0;e.keyup.call(this,e,t)}click(e,t){if(1!==t.which)return;let i=e.tribute;if(i.menu&&i.menu.contains(t.target)){let e=t.target;t.preventDefault();t.stopPropagation();for(;"li"!==e.nodeName.toLowerCase();){e=e.parentNode;if(!e||e===i.menu)return}if(e.classList.contains("tribute-label"))return;i.selectItemAtIndex(e.getAttribute("data-index"),t);i.hideMenu()}else if(i.current.element&&!i.current.externalTrigger){i.current.externalTrigger=!1;setTimeout(()=>i.hideMenu())}}keyup(e,t){const i=e.tribute;if(e.inputEvent||i.isActive){if(e.inputEvent)e.inputEvent=!1;e.updateSelection(this);if(27!==t.keyCode)if(!i.lastCanceledTriggerChar||i.current.triggerPos!==i.lastCanceledTriggerPos||i.current.triggerChar!==i.lastCanceledTriggerChar){i.lastCanceledTriggerPos=null;i.lastCanceledTriggerChar=null;if(i.allowSpaces||!i.hasTrailingSpace)if(!i.dropMenu&&void 0!==i.current.mentionText){if(!i.isActive){let n=i.current.triggerChar;if(void 0!==n)e.callbacks().triggerChar(t,this,n)}if(!(i.current.mentionText.length<i.current.collection.menuShowMinLength))if(i.current.trigger&&!0!==e.commandEvent||i.isActive&&8===t.keyCode)i.showMenuFor(this,!0)}else{i.isActive=!1;i.hideMenu();i.dropMenu=!1}else{i.hasTrailingSpace=!1;e.commandEvent=!0}}}}shouldDeactivate(e){if(!this.tribute.isActive)return!1;if(0===this.tribute.current.mentionText.length){let t=!1;TributeEvents.keys().forEach(i=>{if(e.keyCode===i.key)t=!0});return!t}return!1}updateSelection(e){this.tribute.current.element=e;let t=this.tribute.range.getTriggerInfo(!1,this.tribute.hasTrailingSpace,!0,this.tribute.allowSpaces);if(t){this.tribute.current.selectedPath=t.mentionSelectedPath;this.tribute.current.mentionText=t.mentionText;this.tribute.current.selectedOffset=t.mentionSelectedOffset;this.tribute.current.triggerChar=t.mentionTriggerChar;const e=this.tribute.current,i=e.element.value.slice(0,e.element.selectionStart);e.triggerPos=i.lastIndexOf(e.triggerChar)}else{const e=this.tribute.current;delete e.selectedPath;delete e.mentionText;delete e.selectedOffset;delete e.triggerChar;delete e.triggerPos}}callbacks(){return{triggerChar:(e,t,i)=>{let n=this.tribute;n.current.trigger=i;let o=n.collection.find(e=>e.trigger===i);n.current.collection=o;if(n.current.mentionText.length>=n.current.collection.menuShowMinLength&&n.inputEvent)n.showMenuFor(t,!0)},enter:e=>{if(this.tribute.isActive&&this.tribute.current.filteredItems){e.preventDefault();e.stopPropagation();this.tribute.selectItemAtIndex(this.tribute.menuSelected,e);this.tribute.hideMenu()}},escape:e=>{if(this.tribute.isActive){e.preventDefault();e.stopPropagation();this.tribute.lastCanceledTriggerPos=this.tribute.current.triggerPos;this.tribute.lastCanceledTriggerChar=this.tribute.current.triggerChar;this.tribute.isActive=!1;this.tribute.hideMenu()}},tab:(e,t)=>{this.callbacks().enter(e,t)},up:e=>{if(this.tribute.isActive&&this.tribute.current.filteredItems){e.preventDefault();e.stopPropagation();let t=this.tribute.current.filteredItems.length,i=this.tribute.menuSelected;if(t>i&&i>0){this.tribute.menuSelected--;this.setActiveLi()}else if(0===i){this.tribute.menuSelected=t-1;this.setActiveLi();this.tribute.menu.scrollTop=this.tribute.menu.scrollHeight}}},down:e=>{if(this.tribute.isActive&&this.tribute.current.filteredItems){e.preventDefault();e.stopPropagation();let t=this.tribute.current.filteredItems.length-1,i=this.tribute.menuSelected;if(t>i){this.tribute.menuSelected++;this.setActiveLi()}else if(t===i){this.tribute.menuSelected=0;this.setActiveLi();this.tribute.menu.scrollTop=0}}}}}setActiveLi(e){let t=this.tribute.menu.getElementsByClassName("tribute-item"),i=t.length>>>0;if(e)this.tribute.menuSelected=parseInt(e);for(let e=0;e<i;e++){let i=t[e];if(e===this.tribute.menuSelected){i.classList.add(this.tribute.current.collection.selectClass);let e=i.getBoundingClientRect(),t=this.tribute.menu.getBoundingClientRect();if(e.bottom>t.bottom){let i=e.bottom-t.bottom;this.tribute.menu.scrollTop+=i}else if(e.top<t.top){let i=t.top-e.top;this.tribute.menu.scrollTop-=i}}else i.classList.remove(this.tribute.current.collection.selectClass)}}getFullHeight(e,t){let i=e.getBoundingClientRect().height;if(t){let t=e.currentStyle||window.getComputedStyle(e);return i+parseFloat(t.marginTop)+parseFloat(t.marginBottom)}return i}}var a=TributeEvents;var r=class{constructor(e){this.tribute=e;this.tribute.menuEvents=this;this.menu=this.tribute.menu}bind(){this.menuClickEvent=this.tribute.events.click.bind(null,this);this.menuContainerScrollEvent=this.debounce(()=>{if(this.tribute.isActive)this.tribute.showMenuFor(this.tribute.current.element,!1)},300,!1);this.windowResizeEvent=this.debounce(()=>{if(this.tribute.isActive)this.tribute.range.positionMenuAtCaret(!0)},300,!1);document.addEventListener("click",this.menuClickEvent,!1);window.addEventListener("resize",this.windowResizeEvent);window.addEventListener("scroll",this.windowResizeEvent);if(this.menuContainer)this.menuContainer.addEventListener("scroll",this.menuContainerScrollEvent,!1);else window.addEventListener("scroll",this.menuContainerScrollEvent)}unbind(){document.removeEventListener("click",this.menuClickEvent,!1);window.removeEventListener("resize",this.windowResizeEvent);window.removeEventListener("scroll",this.windowResizeEvent);if(this.menuContainer)this.menuContainer.removeEventListener("scroll",this.menuContainerScrollEvent,!1);else window.removeEventListener("scroll",this.menuContainerScrollEvent)}debounce(e,t,i){var n;return()=>{var o=this,s=arguments,a=i&&!n;clearTimeout(n);n=setTimeout(()=>{n=null;if(!i)e.apply(o,s)},t);if(a)e.apply(o,s)}}};const c=/[\s!-#%-\x2a,-/:;\x3f@\x5b-\x5d_\x7b}\u00a1\u00a7\u00ab\u00b6\u00b7\u00bb\u00bf\u037e\u0387\u055a-\u055f\u0589\u058a\u05be\u05c0\u05c3\u05c6\u05f3\u05f4\u0609\u060a\u060c\u060d\u061b\u061e\u061f\u066a-\u066d\u06d4\u0700-\u070d\u07f7-\u07f9\u0830-\u083e\u085e\u0964\u0965\u0970\u0af0\u0df4\u0e4f\u0e5a\u0e5b\u0f04-\u0f12\u0f14\u0f3a-\u0f3d\u0f85\u0fd0-\u0fd4\u0fd9\u0fda\u104a-\u104f\u10fb\u1360-\u1368\u1400\u166d\u166e\u169b\u169c\u16eb-\u16ed\u1735\u1736\u17d4-\u17d6\u17d8-\u17da\u1800-\u180a\u1944\u1945\u1a1e\u1a1f\u1aa0-\u1aa6\u1aa8-\u1aad\u1b5a-\u1b60\u1bfc-\u1bff\u1c3b-\u1c3f\u1c7e\u1c7f\u1cc0-\u1cc7\u1cd3\u2010-\u2027\u2030-\u2043\u2045-\u2051\u2053-\u205e\u207d\u207e\u208d\u208e\u2329\u232a\u2768-\u2775\u27c5\u27c6\u27e6-\u27ef\u2983-\u2998\u29d8-\u29db\u29fc\u29fd\u2cf9-\u2cfc\u2cfe\u2cff\u2d70\u2e00-\u2e2e\u2e30-\u2e3b\u3001-\u3003\u3008-\u3011\u3014-\u301f\u3030\u303d\u30a0\u30fb\ua4fe\ua4ff\ua60d-\ua60f\ua673\ua67e\ua6f2-\ua6f7\ua874-\ua877\ua8ce\ua8cf\ua8f8-\ua8fa\ua92e\ua92f\ua95f\ua9c1-\ua9cd\ua9de\ua9df\uaa5c-\uaa5f\uaade\uaadf\uaaf0\uaaf1\uabeb\ufd3e\ufd3f\ufe10-\ufe19\ufe30-\ufe52\ufe54-\ufe61\ufe63\ufe68\ufe6a\ufe6b\uff01-\uff03\uff05-\uff0a\uff0c-\uff0f\uff1a\uff1b\uff1f\uff20\uff3b-\uff3d\uff3f\uff5b\uff5d\uff5f-\uff65]/;var l=class{constructor(e){this.tribute=e;this.tribute.range=this}positionMenuAtCaret(e){let t,i=this.getTriggerInfo(!1,this.tribute.hasTrailingSpace,!0,this.tribute.allowSpaces);if(void 0!==i){if(!this.tribute.positionMenu){this.tribute.menu.style.cssText="display: block;";return}t=this.getTextAreaOrInputUnderlinePosition(this.tribute.current.element,i.mentionPosition);this.tribute.menu.style.cssText=`top: ${t.top}${"number"==typeof t.top?"px":""}; left:${t.left}${"number"==typeof t.left?"px":""}; right: ${t.right}${"number"==typeof t.right?"px":""}; bottom: ${t.bottom}${"number"==typeof t.bottom?"px":""}; position: absolute; display: block;`;if(t.additionalStyles)this.tribute.menu.style.cssText+=" "+t.additionalStyles;if(e)this.scrollIntoView()}else this.tribute.menu.style.cssText="display: none"}get menuContainerIsBody(){return this.tribute.menuContainer===document.body||!this.tribute.menuContainer}selectElement(e,t,i){let n,o=e;if(t)for(var s=0;s<t.length;s++){o=o.childNodes[t[s]];if(void 0===o)return;for(;o.length<i;){i-=o.length;o=o.nextSibling}if(0===o.childNodes.length&&!o.length)o=o.previousSibling}let a=window.getSelection();n=document.createRange();n.setStart(o,i);n.setEnd(o,i);n.collapse(!0);try{a.removeAllRanges()}catch(e){console.warn(e)}a.addRange(n);e.focus()}replaceTriggerText(e,t,i,n,o){let s=this.getTriggerInfo(!0,i,t,this.tribute.allowSpaces);if(void 0!==s){var a,r;let t=this.tribute.current,i=new CustomEvent("tribute-replaced",{detail:{item:o,instance:t,context:s,event:n}});if("object"!=typeof e)e={start:e};e.end=e.end||"";let c=navigator.platform.includes("Mac")?n.metaKey:n.ctrlKey;e.content=!(null!==(a=(r=e).skipContentCheck)&&void 0!==a&&a.call(r,e)&&!n.shiftKey&&!n.altKey)&&e.content||"";if(c&&e.cmdModify)e.cmdModify();let l=this.tribute.current.element,d=s.mentionPosition+s.mentionText.length+s.mentionTriggerChar.length,u=l.value.substring(d,l.value.length);if((n.shiftKey||n.altKey)&&e.shiftModify)e.shiftModify();if(n.altKey){e.content=u;d+=u.length;u=""}let m=s.mentionPosition;l.selectionStart=m;l.selectionEnd=d;if(t.collection.keepAsEnd){const[i]=u.match(t.collection.keepAsEnd)||[];if(i){u=u.slice(i.length);l.selectionEnd+=i.length;if(t.collection.replaceEnd)e.end=i}}let h=e.start+e.content+e.end;h+="string"==typeof this.tribute.replaceTextSuffix?this.tribute.replaceTextSuffix:" ";l.focus();if(!document.execCommand("insertText",!1,h))l.value=l.value.substring(0,m)+h+u;if(n.shiftKey||e.typeContent&&!e.content){l.selectionEnd=m+h.length-e.end.length;l.selectionStart=m+e.start.length}else{l.selectionEnd=m+h.length;l.selectionStart=l.selectionEnd}t.element.dispatchEvent(new CustomEvent("input",{bubbles:!0}));t.element.dispatchEvent(i)}}getNodePositionInParent(e){if(null===e.parentNode)return 0;for(var t=0;t<e.parentNode.childNodes.length;t++){if(e.parentNode.childNodes[t]===e)return t}}getTextPrecedingCurrentSelection(){let e="",t=this.tribute.current.element;if(t){let i=t.selectionStart;if(t.value&&i>=0)e=t.value.substring(0,i)}return e}getTriggerInfo(e,t,i,n){let o;o=this.tribute.current.element;let s=this.getTextPrecedingCurrentSelection();if(null!=s){let a,r,l,d,u,m=-1,h=0;this.tribute.collection.forEach(e=>{let t=e.trigger,n=e.requireLeadingSpace?this.lastIndexWithLeadingSpace(s,t):s.lastIndexOf(t);if(n>m||n>-1&&n===m&&t.length>h){m=n;h=t.length;a=t;i=e.requireLeadingSpace}});let g=m>=0&&(0===m||!i||c.test(s[m-1]));if(g){r=s.substring(m+a.length,s.length);l=r;a=s.substring(m,m+a.length);let e=r.substring(0,1);d=r.length>0&&(" "===e||"\xa0"===e);if(t)r=r.trim();u=n?/[^\S ]/g:/\s/g;this.tribute.hasTrailingSpace=u.test(r)}if(-1===m||l&&!l[0].trim()||l.includes("\n")||o.selectionStart!==o.selectionEnd||this.tribute.current.trigger&&a!==this.tribute.current.trigger){this.tribute.dropMenu=!0;return}else this.tribute.dropMenu=!1;if(g&&!d&&(e||!u.test(r)))return{mentionPosition:m,mentionText:r,mentionSelectedElement:o,mentionSelectedPath:void 0,mentionSelectedOffset:void 0,mentionTriggerChar:a}}}lastIndexWithLeadingSpace(e,t){let i=e.split("").reverse().join(""),n=-1;for(let o=0,s=e.length;o<s;o++){let s=o===e.length-1,a=c.test(i[o+1]),r=!0;for(let e=t.length-1;e>=0;e--)if(t[e]!==i[o-e]){r=!1;break}if(r&&(s||a)){n=e.length-1-o;break}}return n}isMenuOffScreen(e,t){let i=document.documentElement,n=window.scrollX-(i.clientLeft||0),o=window.scrollY-(i.clientTop||0),s="number"==typeof e.top?e.top:o+i.clientHeight-e.bottom-t.height,a="number"==typeof e.right?e.right:e.left+t.width,r="number"==typeof e.bottom?e.bottom:e.top+t.height,c="number"==typeof e.left?e.left:n+i.clientWidth-e.right-t.width;return{top:s<Math.floor(o),right:a>Math.ceil(n+i.clientWidth),bottom:r>Math.ceil(o+i.clientHeight)-3,left:c<Math.floor(n)}}getMenuDimensions(){let e={width:null,height:null};this.tribute.menu.style.cssText="top: 0px;left: 0px;right: auto;position: fixed;display: block;visibility: hidden;";e.width=this.tribute.menu.offsetWidth;e.height=this.tribute.menu.offsetHeight;this.tribute.menu.style.cssText="display: none;";return e}getTextAreaOrInputUnderlinePosition(e,t){let i=convenientDiscussions.g.inputPropsAffectingCoords,n=document.createElement("div");n.id="input-textarea-caret-position-mirror-div";document.body.appendChild(n);let o=n.style,s=window.getComputedStyle?getComputedStyle(e):e.currentStyle;o.whiteSpace="pre-wrap";if("INPUT"!==e.nodeName)o.wordWrap="break-word";o.position="absolute";o.visibility="hidden";i.forEach(e=>{o[e]=s[e]});o.width=parseFloat(s.width)+"px";if(e.scrollHeight>parseFloat(s.height))o.overflowY="scroll";n.textContent=e.value.substring(0,t);let a=document.createElement("span");a.textContent=this.tribute.current.trigger;let r=document.createElement("span");r.append(a,e.value.substring(t+this.tribute.current.trigger.length)||"");n.appendChild(r);let c=document.documentElement,l=c.clientWidth,d=c.clientHeight,u=e.getBoundingClientRect(),m=(window.pageXOffset||c.scrollLeft)-(c.clientLeft||0),h=(window.pageYOffset||c.scrollTop)-(c.clientTop||0),g=0,f=0,p=0;if(this.menuContainerIsBody){g=u.top;f=u.left;p=u.right}let b={top:g+h+r.offsetTop+parseInt(s.borderTopWidth)+parseInt(s.fontSize)-e.scrollTop};if("rtl"===this.tribute.textDirection){const e="rtl"===c.textDirection?l:n.getBoundingClientRect().right;b.right=l-p+(e-r.getBoundingClientRect().right)+a.offsetWidth}else b.left=m+f+r.offsetLeft+a.offsetWidth+1;let v=this.getMenuDimensions(),y=this.isMenuOffScreen(b,v);if("rtl"===this.tribute.textDirection){if(y.left){b.left=0;b.right="auto"}}else if(y.right){b.right=0;b.left="auto"}if(y.bottom){const t=h+d-b.top-parseFloat(getComputedStyle(e).paddingTop)-3;b.additionalStyles=`height: ${t}px; overflow-y: scroll;`}document.body.removeChild(n);return b}scrollIntoView(){let e,t=this.menu;if(void 0===t)return;for(;void 0===e||0===e.height;){e=t.getBoundingClientRect();if(0===e.height){t=t.childNodes[0];if(void 0===t||!t.getBoundingClientRect)return}}let i=e.top,n=i+e.height;if(i<0)window.scrollTo(0,window.pageYOffset+e.top-20);else if(n>window.innerHeight){let t=window.pageYOffset+e.top-20;if(t-window.pageYOffset>100)t=window.pageYOffset+100;let i=window.pageYOffset-(window.innerHeight-n);if(i>t)i=t;window.scrollTo(0,i)}}};var d=class{constructor(e){this.tribute=e;this.tribute.search=this}match(e,t,i){let n=(i=i||{}).pre||"",o=i.post||"",s=i.caseSensitive&&t||t.toLowerCase();if(i.skip)return{rendered:t,score:0};e=i.caseSensitive&&e||e.toLowerCase();let a=this.traverse(s,e,0,0,[]);if(!a)return null;else return{rendered:this.render(t,a.cache,n,o),score:a.score}}traverse(e,t,i,n,o){if(t.length===n)return{score:this.calculateScore(o),cache:o.slice()};if(e.length===i||t.length-n>e.length-i)return;let s,a,r=t[n],c=e.indexOf(r,i);for(;c>-1;){o.push(c);a=this.traverse(e,t,c+1,n+1,o);o.pop();if(!a)return s;if(!s||s.score<a.score)s=a;c=e.indexOf(r,c+1)}return s}calculateScore(e){let t=0,i=1;e.forEach((n,o)=>{if(o>0)if(e[o-1]+1===n)i+=i+1;else i=1;t+=i});return t}render(e,t,i,n){var o=e.substring(0,t[0]);t.forEach((s,a)=>{o+=i+e[s]+n+e.substring(s+1,t[a+1]?t[a+1]:e.length)});return o}filter(e,t,i){i=i||{};return t.reduce((t,n,o)=>{let s=n;if(i.extract){s=i.extract(n);if(!s)s=""}let a=this.match(e,s,i);if(null!=a)t[t.length]={string:a.rendered,score:a.score,index:o,original:n};return t},[]).sort((e,t)=>{let i=t.score-e.score;if(i)return i;else return e.index-t.index})}};class Tribute_Tribute{constructor({selectClass:e="highlight",containerClass:t="tribute-container",itemClass:i="",trigger:n="@",lookup:o="key",fillAttr:s="value",collection:c=null,menuContainer:u=null,noMatchTemplate:m=null,allowSpaces:h=!1,replaceTextSuffix:g=null,positionMenu:f=!0,searchOpts:p={},menuItemLimit:b=null,menuShowMinLength:v=0,textDirection:y="ltr"}){this.menuSelected=0;this.current={};this.inputEvent=!1;this.isActive=!1;this.menuContainer=u;this.allowSpaces=h;this.replaceTextSuffix=g;this.positionMenu=f;this.hasTrailingSpace=!1;this.textDirection=y;if(!c)throw new Error("[Tribute] No collection specified.");this.collection=c.map(a=>({trigger:a.trigger||n,keepAsEnd:a.keepAsEnd||null,replaceEnd:void 0===a.replaceEnd?!0:a.replaceEnd,selectClass:a.selectClass||e,containerClass:a.containerClass||t,itemClass:a.itemClass||i,selectTemplate:(a.selectTemplate||Tribute_Tribute.defaultSelectTemplate).bind(this),menuItemTemplate:(a.menuItemTemplate||Tribute_Tribute.defaultMenuItemTemplate).bind(this),noMatchTemplate:(e=>{if("string"==typeof e)if(""===e.trim())return null;else return e;if("function"==typeof e)return e.bind(this);else return m||function(){return"<li>No Match Found!</li>"}.bind(this)})(m),lookup:a.lookup||o,fillAttr:a.fillAttr||s,values:a.values,requireLeadingSpace:a.requireLeadingSpace,searchOpts:a.searchOpts||p,menuItemLimit:a.menuItemLimit||b,menuShowMinLength:a.menuShowMinLength||v,label:a.label}));new l(this);new a(this);new r(this);new d(this)}get isActive(){return this._isActive}set isActive(e){if(this._isActive!=e){this._isActive=e;if(this.current.element){let t=new CustomEvent("tribute-active-"+e);this.current.element.dispatchEvent(t)}}}static defaultSelectTemplate(e){if(void 0===e)return`${this.current.collection.trigger}${this.current.mentionText}`;else return this.current.collection.trigger+e.original[this.current.collection.fillAttr]}static defaultMenuItemTemplate(e){return e.string}static inputTypes(){return["TEXTAREA","INPUT"]}triggers(){return this.collection.map(e=>e.trigger)}attach(e){if(!e)throw new Error("[Tribute] Must pass in a DOM node or NodeList.");if("undefined"!=typeof $&&e instanceof $)e=e.get();if(e.constructor===NodeList||e.constructor===HTMLCollection||e.constructor===Array){let i=e.length;for(var t=0;t<i;++t)this._attach(e[t])}else this._attach(e)}_attach(e){if(e.hasAttribute("data-tribute"))console.warn("Tribute was already bound to "+e.nodeName);this.events.bind(e);e.setAttribute("data-tribute",!0)}createMenu(e){let t=document.createElement("div"),i=document.createElement("ul");t.className=e;if("rtl"===this.textDirection)t.className+=" tribute-rtl";t.appendChild(i);if(this.menuContainer)return this.menuContainer.appendChild(t);else return document.body.appendChild(t)}showMenuFor(e,t){var i;const n=e=>{if(!this.isActive)return;let i=this.search.filter(this.current.mentionText,e,{pre:this.current.collection.searchOpts.pre||"",post:this.current.collection.searchOpts.post||"",skip:this.current.collection.searchOpts.skip,extract:e=>{if("string"==typeof this.current.collection.lookup)return e[this.current.collection.lookup];else if("function"==typeof this.current.collection.lookup)return this.current.collection.lookup(e,this.current.mentionText);else throw new Error("Invalid lookup attribute, lookup must be string or function.")}});if(this.current.collection.menuItemLimit)i=i.slice(0,this.current.collection.menuItemLimit);this.current.filteredItems=i;let n=this.menu.querySelector("ul");this.range.positionMenuAtCaret(t);if(!i.length){let e=new CustomEvent("tribute-no-match",{detail:this.menu});this.current.element.dispatchEvent(e);if("function"==typeof this.current.collection.noMatchTemplate&&!this.current.collection.noMatchTemplate()||!this.current.collection.noMatchTemplate)this.hideMenu();else"function"==typeof this.current.collection.noMatchTemplate?n.innerHTML=this.current.collection.noMatchTemplate():n.innerHTML=this.current.collection.noMatchTemplate;return}n.innerHTML="";let o=document.createDocumentFragment();if(this.current.collection.label){let e=document.createElement("li");e.classList.add("tribute-label");e.textContent=this.current.collection.label;o.appendChild(e)}i.forEach((e,t)=>{let i=document.createElement("li");i.setAttribute("data-index",t);i.classList.add("tribute-item");if(this.current.collection.itemClass)i.classList.add(this.current.collection.itemClass);i.addEventListener("mousemove",e=>{let[,t]=this._findLiTarget(e.target);if(0!==e.movementY)this.events.setActiveLi(t)});if(this.menuSelected===t)i.classList.add(this.current.collection.selectClass);i.textContent=this.current.collection.menuItemTemplate(e);o.appendChild(i)});n.appendChild(o);this.range.positionMenuAtCaret(t)};if(!this.isActive||this.current.element!==e||this.current.mentionText!==this.snapshot.mentionText){this.snapshot={mentionText:this.current.mentionText,selectionStart:null===(i=this.current.element)||void 0===i?void 0:i.selectionStart};if(!this.menu){this.menu=this.createMenu(this.current.collection.containerClass);e.tributeMenu=this.menu;this.menuEvents.bind(this.menu)}this.isActive=!0;this.menuSelected=0;this.lastCanceledTriggerChar=null;this.lastCanceledTriggerPos=null;if(!this.current.mentionText)this.current.mentionText="";if("function"==typeof this.current.collection.values)this.current.collection.values(this.current.mentionText,n);else n(this.current.collection.values)}else if(this.current.element.selectionStart!==this.snapshot.selectionStart)n([])}_findLiTarget(e){if(!e)return[];const t=e.getAttribute("data-index");return!t?this._findLiTarget(e.parentNode):[e,t]}showMenuForCollection(e,t){if(e!==document.activeElement)this.placeCaretAtEnd(e);this.current.collection=this.collection[t||0];this.current.trigger=this.current.collection.trigger;this.current.externalTrigger=!0;this.current.element=e;this.current.triggerPos=e.selectionStart;if(!this.insertAtCaret(e,this.current.collection.trigger))this.showMenuFor(e)}placeCaretAtEnd(e){e.focus();if(void 0!==window.getSelection&&void 0!==document.createRange){var t=document.createRange();t.selectNodeContents(e);t.collapse(!1);var i=window.getSelection();i.removeAllRanges();i.addRange(t)}else if(void 0!==document.body.createTextRange){var n=document.body.createTextRange();n.moveToElementText(e);n.collapse(!1);n.select()}}insertAtCaret(e,t){var i=e.scrollTop,n=e.selectionStart;e.focus();const o=document.execCommand("insertText",!1,t);if(!o){var s=e.value.substring(0,n),a=e.value.substring(e.selectionEnd,e.value.length);e.value=s+t+a;n+=t.length;e.selectionStart=n;e.selectionEnd=n}e.scrollTop=i;return o}hideMenu(){if(this.menu){this.menu.style.cssText="display: none;";this.isActive=!1;this.menuSelected=0;this.current={}}}selectItemAtIndex(e,t){if("number"!=typeof(e=parseInt(e))||isNaN(e))return;let i=this.current.filteredItems[e],n=this.current.collection.selectTemplate(i,t);if(null!==n)this.replaceText(n,t,i)}replaceText(e,t,i){this.range.replaceTriggerText(e,!0,!0,t,i)}_append(e,t,i){if("function"==typeof e.values)throw new Error("Unable to append to values, as it is a function.");else if(!i)e.values=e.values.concat(t);else e.values=t}append(e,t,i){let n=parseInt(e);if("number"!=typeof n)throw new Error("please provide an index for the collection to update.");let o=this.collection[n];this._append(o,t,i)}appendCurrent(e,t){if(this.isActive)this._append(this.current.collection,e,t);else throw new Error("No active state. Please use append instead and pass an index.")}detach(e){if(!e)throw new Error("[Tribute] Must pass in a DOM node or NodeList.");if("undefined"!=typeof $&&e instanceof $)e=e.get();if(e.constructor===NodeList||e.constructor===HTMLCollection||e.constructor===Array){let i=e.length;for(var t=0;t<i;++t)this._detach(e[t])}else this._detach(e)}_detach(e){this.events.unbind(e);if(e.tributeMenu)this.menuEvents.unbind(e.tributeMenu);setTimeout(()=>{e.removeAttribute("data-tribute");this.isActive=!1;if(e.tributeMenu)e.tributeMenu.remove()})}}var u=Tribute_Tribute,cd=i(0),m=i(2),h=i(3),g=i(12),f=i(1),p=i(7);function b(e,t){const i=new RegExp(mw.util.escapeRegExp(e),"i"),n=new RegExp("^"+mw.util.escapeRegExp(e),"i");return t.filter(e=>i.test(e)).sort((e,t)=>{const i=n.test(e),o=n.test(t);if(i&&!o)return-1;else if(o&&!i)return 1;else return 0})}class Autocomplete_Autocomplete{constructor({types:e,inputs:t,comments:i,defaultUserNames:n}){e=e.filter(e=>h.a.get("autocompleteTypes").includes(e)||"mentions"===e);const o=this.getCollections(e,i,n);this.tribute=new u({collection:o,allowSpaces:!0,menuItemLimit:10,noMatchTemplate:()=>null,containerClass:"tribute-container cd-autocompleteContainer",replaceTextSuffix:"",textDirection:cd.a.g.contentTextDirection});this.inputs=t}init(){i(55);this.inputs.forEach(e=>{const t=e.$input.get(0);this.tribute.attach(t);t.cdInput=e;t.addEventListener("tribute-active-true",()=>{m.a.setActiveAutocompleteMenu(this.tribute.menu)});t.addEventListener("tribute-active-false",()=>{m.a.forgetActiveAutocompleteMenu()});if(e instanceof OO.ui.MultilineTextInputWidget)e.on("resize",()=>{var e,t;null===(e=(t=this.tribute.menuEvents).windowResizeEvent)||void 0===e||e.call(t)})})}cleanUp(){this.inputs.forEach(e=>{this.tribute.detach(e.$input.get(0))})}getCollections(e,t,i){var n=this;const a=e=>e?e.original.transform(e.original.item):"",r=(e,t)=>e.filter(f.i).filter(f.Y).map(e=>{let i;if(Array.isArray(e))i=e[0];else if(e.key)i=e.key;else i=e;return{key:i,item:e,transform:t.transform}}),c=new RegExp(cd.a.mws("word-separator",{language:"content"}),"g"),l={mentions:{label:cd.a.s("cf-autocomplete-mentions-label"),trigger:cd.a.config.mentionCharacter,searchOpts:{skip:!0},requireLeadingSpace:cd.a.config.mentionRequiresLeadingSpace,selectTemplate:a,values:(v=o()((function*(e,t){if(h.a.get("autocompleteTypes").includes("mentions")||n.tribute.current.externalTrigger){if(!(e=Object(f.N)(e)).startsWith(n.mentions.snapshot))n.mentions.cache=[];n.mentions.snapshot=e;if(n.mentions.byText[e])t(r(n.mentions.byText[e],n.mentions));else{const i=b(e,n.mentions.default);let o=i.slice();const s=e&&e.length<=85&&!/[#<>[\]|{}/@:]/.test(e)&&(e.match(c)||[]).length<=4;if(s){if(!i.length)o.push(...n.mentions.cache);o=b(e,o);o[9]=e.trim()}t(r(o,n.mentions));if(s&&!i.length){let i;try{i=yield Object(p.i)(e)}catch(e){return}if(!n.tribute.current||"@"!==n.tribute.current.trigger)return;n.mentions.cache=i.slice();i[9]=e.trim();n.mentions.byText[e]=i;if(n.mentions.snapshot!==e)return;t(r(i,n.mentions))}}}})),function(e,t){return v.apply(this,arguments)})},commentLinks:{label:cd.a.s("cf-autocomplete-commentlinks-label"),trigger:"[[#",keepAsEnd:/^\]\]/,selectTemplate:a,values:(g=o()((function*(e,t){if(!n.commentLinks.default){n.commentLinks.default=[];n.commentLinks.comments.forEach(e=>{let t,{id:i,dtId:o,author:s,timestamp:a}=e;if(e.getText().length>80){t=e.getText().slice(0,80);const i=cd.a.mws("word-separator",{language:"content"}),n=t.lastIndexOf(i);if(-1!==n){t=t.slice(0,n);const e=t[t.length-1];if(/[.\u2026,;!?:-\u2014\u2013]/.test(e))t+=" ";t+=cd.a.s("ellipsis")}}else t=e.getText();let r=s.getName();if(a)r+=cd.a.mws("comma-separator",{language:"content"})+a;const c=r+cd.a.mws("colon-separator",{language:"content"})+t;n.commentLinks.default.push({key:c,id:o||i,author:s.getName(),timestamp:a})});s.a.getAll().forEach(e=>{n.commentLinks.default.push({key:Object(f.W)(e.id),id:Object(f.W)(e.id),headline:e.headline})})}e=Object(f.N)(e);if(/[#<>[\]|{}]/.test(e)){t([]);return}const i=n.tribute.search.filter(e,n.commentLinks.default,{extract:e=>e.key}).map(e=>e.original);t(r(i,n.commentLinks))})),function(e,t){return g.apply(this,arguments)})},wikilinks:{label:cd.a.s("cf-autocomplete-wikilinks-label"),trigger:"[[",keepAsEnd:/^(?:\||\]\])/,searchOpts:{skip:!0},selectTemplate:a,values:(u=o()((function*(e,t){if(!(e=Object(f.N)(e)).startsWith(n.wikilinks.snapshot))n.wikilinks.cache=[];n.wikilinks.snapshot=e;if(n.wikilinks.byText[e])t(r(n.wikilinks.byText[e],n.wikilinks));else{let i=[];const o=e&&":"!==e&&e.length<=255&&(e.match(c)||[]).length<=9&&!/[#<>[\]|{}]/.test(e)&&!((/^:/.test(e)||/^[a-z]\w*:/.test(e))&&!cd.a.g.allNamespacesRegexp.test(e));if(o){i.push(...n.wikilinks.cache);i=b(e,i);i[9]=e.trim()}t(r(i,n.wikilinks));if(o){let i;try{i=yield Object(p.g)(e)}catch(e){return}if(!n.tribute.current||"[["!==n.tribute.current.trigger)return;n.wikilinks.cache=i.slice();i[9]=e.trim();n.wikilinks.byText[e]=i;if(n.wikilinks.snapshot!==e)return;t(r(i,n.wikilinks))}}})),function(e,t){return u.apply(this,arguments)})},templates:{label:cd.a.s("cf-autocomplete-templates-label"),trigger:"{{",keepAsEnd:/^(?:\||\}\})/,searchOpts:{skip:!0},selectTemplate:(e,t)=>{if(e){if(h.a.get("useTemplateData")&&t.shiftKey&&!t.altKey){const t=this.tribute.current.element.cdInput;setTimeout(()=>{t.setDisabled(!0);t.pushPending();m.a.getApi().get({action:"templatedata",titles:"Template:"+e.original.key,redirects:!0}).then(e=>{if(!e.pages)throw"No data.";else if(!Object.keys(e.pages).length)throw"Template missing.";else return e},p.m).then(e=>{const i=e.pages;let n="",o=0;Object.keys(i).forEach(e=>{const t=i[e],s=t.params||[];(t.paramOrder||Object.keys(s)).filter(e=>s[e].required||s[e].suggested).forEach(e=>{if("block"===t.format)n+=`\n| ${e} = `;else if(isNaN(e))n+=`|${e}=`;else n+="|";o||(o=n.length)});if("block"===t.format&&n)n+="\n"});n=n.slice(1);t.setDisabled(!1);const s=t.getRange().to;Object(f.A)(t,n);t.selectRange(s+o-1)},()=>{t.setDisabled(!1);Object(f.m)(t)}).always(()=>{t.popPending()})})}return e.original.transform(e.original.item)}else return""},values:(d=o()((function*(e,t){if(!(e=Object(f.N)(e)).startsWith(n.templates.snapshot))n.templates.cache=[];n.templates.snapshot=e;if(!e.includes("{{"))if(n.templates.byText[e])t(r(n.templates.byText[e],n.templates));else{let i=[];const o=e&&e.length<=255&&!/[#<>[\]|{}]/.test(e)&&(e.match(c)||[]).length<=9;if(o){i.push(...n.templates.cache);i=b(e,i);i[9]=e.trim()}t(r(i,n.templates));if(o){let i;try{i=yield Object(p.h)(e)}catch(e){return}if(!n.tribute.current||"{{"!==n.tribute.current.trigger)return;n.templates.cache=i.slice();i[9]=e.trim();n.templates.byText[e]=i;if(n.templates.snapshot!==e)return;t(r(i,n.templates))}}else t([])})),function(e,t){return d.apply(this,arguments)})},tags:{label:cd.a.s("cf-autocomplete-tags-label"),trigger:"<",keepAsEnd:/^>/,replaceEnd:!1,searchOpts:{skip:!0},selectTemplate:a,values:(e,t)=>{const i=new RegExp("^"+mw.util.escapeRegExp(e),"i");if(!e||!/^[a-z]+$/i.test(e)){t([]);return}const n=this.tags.default.filter(e=>i.test(e));t(r(n,this.tags))}}};var d,u,g,v;const y={mentions:i,commentLinks:t};return e.map(e=>{this[e]=Autocomplete_Autocomplete.getConfig(e,y[e]);return l[e]})}static getConfig(e,...t){let i;switch(e){case"mentions":i={byText:{},cache:[],default:t[0],transform:e=>{const t=e.trim(),i=g.a.get(t),n=i.getNamespaceAlias();return{start:`@[[${i.isRegistered()?`${n}:${t}`:`${cd.a.g.contribsPage}/${t}`}|`,end:"]]",content:t,skipContentCheck:e=>!e.start.includes("/"),cmdModify:function(){this.end+=cd.a.mws("colon-separator",{language:"content"})}}}};break;case"commentLinks":i={comments:t[0]||[],transform:({id:e,author:t,timestamp:i,headline:n})=>({start:`[[#${e}|`,end:"]]",content:i?cd.a.s("cf-autocomplete-commentlinks-text",t,i):n})};break;case"wikilinks":i={byText:{},cache:[],transform:e=>({start:"[["+(e=e.trim()),end:"]]",name:e,shiftModify:function(){this.start+="|";this.content=this.name}})};break;case"templates":i={byText:{},cache:[],transform:e=>({start:"{{"+(e=e.trim()),end:"}}",name:e,shiftModify:function(){this.start+="|"}})};break;case"tags":{const e=[["br","<br>"],["codenowiki","<code><nowiki>","</".concat("nowiki></code>")],["hr","<hr>"],["wbr","<wbr>"],["gallery","<gallery>\n","\n</gallery>"],["references","<references />"],["section","<section />"],["syntaxhighlight","<syntaxhighlight>\n","\n</syntaxhighlight>"],['syntaxhighlight inline lang=""','<syntaxhighlight inline lang="','"></syntaxhighlight>'],['syntaxhighlight lang=""','<syntaxhighlight lang="','">\n\n</syntaxhighlight>'],["templatestyles",'<templatestyles src="','" />']];i={default:cd.a.g.allowedTags.filter(t=>!e.find(e=>e[0]===t)).concat(e),transform:e=>({start:Array.isArray(e)?e[1]:`<${e}>`,end:Array.isArray(e)?e[2]:`</${e}>`,typeContent:!0})};i.default.sort((e,t)=>("string"==typeof e?e:e[0])>("string"==typeof t?t:t[0]));break}}return i}}t.a=Autocomplete_Autocomplete},function(e,t,i){"use strict";var n=i(6),o=i(0),s=i(20),a=i(1);class CommentSkeleton{constructor(e,t,i){var n,s;this.parser=e;const a=i.indexOf(t);this.followsHeading="heading"===(null===(n=i[a-1])||void 0===n?void 0:n.type);const r=this.followsHeading?i[a-1].element:void 0;this.signatureElement=t.element;this.signatureText=t.element.textContent;this.collectParts(r);this.removeNestedParts();this.encloseInlineParts();this.filterParts();this.parts.reverse();this.replaceListsWithItems();this.wrapNumberedList();this.index=o.a.comments.length;this.date=t.date||null;this.timestamp=null===(s=t.timestampText)||void 0===s?void 0:s.replace(/ {2,}/g," ");this.authorName=t.authorName;this.timestampElement=t.timestampElement;this.extraSignatures=t.extraSignatures;this.authorLink=t.authorLink;this.authorTalkLink=t.authorTalkLink;this.isOwn=this.authorName===o.a.g.userName;this.id=CommentSkeleton.generateId(this.date,this.authorName,e.existingCommentIds);this.isUnsigned=t.isUnsigned;this.elements=this.parts.map(e=>e.node);this.setHighlightables();this.setLevels();if(this.parts[0].isHeading&&0!==this.level){this.parts.shift();this.elements.shift()}if(this.parts[0].isHeading){this.isOpeningSection=!0;const e=this.parts[0].node.tagName.match(/^H([1-6])$/);this.openingSectionOfLevel=e&&Number(e[1])}else this.isOpeningSection=!1;this.addAttributes();this.section=null;this.isOutdented=!1;t.comment=this}getStartNodes(e){const t=[];let i;for(;!i;){for(;(!e.currentNode.nextSibling||![Node.ELEMENT_NODE,Node.TEXT_NODE].includes(e.currentNode.nextSibling.nodeType))&&e.parentNode(););if(!e.nextSibling())break;if(!Object(a.E)(e.currentNode,!0))i=e.currentNode}if(i&&this.signatureElement.parentNode.contains(i)||this.signatureElement.parentNode.getElementsByClassName("cd-signature",2).length>1||!this.isElementEligible(this.signatureElement.parentNode,e,"start")){e.currentNode=this.signatureElement;for(;e.nextSibling()&&Object(a.E)(e.currentNode,!0);)t.push({node:e.currentNode,isTextNode:e.currentNode.nodeType===Node.TEXT_NODE,isHeading:!1,hasCurrentSignature:!1,hasForeignComponents:!1,step:"start"});t.reverse();e.currentNode=this.signatureElement}else e.currentNode=this.signatureElement.parentNode;t.push({node:e.currentNode,isTextNode:!1,isHeading:!1,hasCurrentSignature:!0,hasForeignComponents:!1,step:"start"});return[t,i]}isCellOfMultiCommentTable(e){if(!["TD","TH"].includes(e.tagName))return!1;let t;for(let i=e;!t&&i!==this.parser.context.rootElement;i=i.parentNode)if("TABLE"===i.tagName)t=i;return!t||t.getElementsByClassName("cd-signature",2).length>1}isElementEligible(e,t,i){var n,s;return!(e===t.root||"up"!==i&&(this.parser.foreignComponentClasses.some(t=>e.classList.contains(t))||o.a.g.namespaceNumber%2==1&&e.classList.contains("tmbox"))||"META"===e.tagName&&"mw:PageProp/toc"===e.getAttribute("property")||"toc"===e.getAttribute("id")||"DT"===e.tagName||this.isCellOfMultiCommentTable(e)||"HR"===e.tagName&&e.previousElementSibling&&this.parser.context.getElementByClassName(e.previousElementSibling,"cd-signature")||"up"!==i&&this.parser.context.areThereOutdents()&&this.parser.context.getElementByClassName(e,o.a.config.outdentClass)||null!==(n=(s=o.a.config).checkForCustomForeignComponents)&&void 0!==n&&n.call(s,e,this.context))}isGallery(e){return"UL"===e.tagName&&e.classList.contains("gallery")}isIntroList(e,t,i){const n=e.tagName;if(!["DL","UL","OL"].includes(n))return!1;const o=e.previousElementSibling,s=e.nextElementSibling;let r="DL"===n&&e.firstChild&&"DT"===e.firstChild.tagName||["DL","UL"].includes(n)&&o&&Object(a.D)(o)&&s&&!["DL","OL"].includes(s.tagName)&&!this.isPartOfList(i,!0)&&!this.parser.context.getElementByClassName(e,"cd-signature")||this.isGallery(e);if(t&&!r&&s&&"OL"!==n){const t=this.parser.getTopElementsWithText(e).levelsPassed,i=this.parser.getTopElementsWithText(s).levelsPassed;r=i>t||1===t&&i===t&&e[this.parser.context.childElementsProp].length>1&&n!==s.tagName}return r}isPartOfList(e,t){const i=["DD","DL"];if(!t)i.push("LI","UL");return e&&(i.includes(e.tagName)||i.includes(e.parentNode.tagName))}isIntro({step:e,stage:t,node:i,nextNode:n,lastPartNode:o,previousPart:s}){return"back"===e&&(!s||"up"===s.step)&&!["DD","LI"].includes(i.parentNode.tagName)&&(["UL","OL"].includes(n.tagName)||"DL"===n.tagName&&(2===t||n.parentNode!==this.parser.context.rootElement&&n.parentNode.parentNode!==this.parser.context.rootElement))&&!(["DL","UL","OL"].includes(i.tagName)&&!this.isIntroList(i,2===t,o)||i.nodeType===Node.TEXT_NODE&&i.previousSibling&&["DL","UL","OL"].includes(i.previousSibling.tagName)&&!this.isIntroList(i.previousSibling,!1,o)||o&&!this.isPartOfList(o,!1))&&!(["UL","OL"].includes(n.tagName)&&n[this.parser.context.childElementsProp].length>1&&!n[this.parser.context.childElementsProp][0].contains(this.signatureElement))}traverseDom(e,t,i,n){for(let r=0;r<500;r++){let r;const c=e[e.length-1];if(!c.hasCurrentSignature&&c.hasForeignComponents){let e;for(;(e=t.currentNode)&&t.lastChild();){for(;t.currentNode.nodeType===Node.TEXT_NODE&&!t.currentNode.textContent.trim()&&t.previousSibling(););if(Object(a.E)(t.currentNode,!0)){t.currentNode=e;break}r="dive"}if("dive"!==r)break}else if(t.previousSibling())r="back";else{if(!t.parentNode())break;r="up"}const l=t.currentNode;if(this.isIntro({step:r,stage:1,node:l,nextNode:c.node,previousPart:c}))break;const d=l.nodeType===Node.TEXT_NODE;let u=null,m=null,h=null;if(!d){var s;if(!this.isElementEligible(l,t,r))break;u=Object(a.D)(l);m=l.contains(this.signatureElement);const e=l.getElementsByClassName("cd-signature",Number(m)+1).length;h=Boolean(!Object(a.E)(l)&&(e-Number(m)>0||i&&l.contains(i)&&"TABLE"!==l.tagName||n&&l!==n&&l.contains(n)));if(!m&&!Object(a.E)(l)&&null!==(s=o.a.config.signatureEndingRegexp)&&void 0!==s&&s.test(l.textContent)&&!this.parser.elementsToExclude.some(e=>e.contains(l)))break}e.push({node:l,isTextNode:d,isHeading:u,hasCurrentSignature:m,hasForeignComponents:h,step:r});if(u)break}return e}collectParts(e){const t=new s.a(this.signatureElement,this.parser.context.rootElement);let[i,n]=this.getStartNodes(t);i=this.traverseDom(i,t,n,e);this.parts=i}removeNestedParts(){for(let e=this.parts.length-1;e>=0;e--){const t=this.parts[e];if("up"===t.step&&!t.hasForeignComponents){let t=0;for(let i=e-1;i>0;i--)if("dive"===this.parts[i].step){t=i;break}this.parts.splice(t,e-t);e=t}}}encloseInlineParts(){const e=[];let t=null,i=!1;for(let n=0;n<=this.parts.length;n++){const o=this.parts[n];if(o&&(null===t||["back","start"].includes(o.step))&&!o.hasForeignComponents&&!o.isHeading){if(null===t)if(Object(a.E)(o.node.parentNode)){for(let e=n+1;e<this.parts.length;e++)if("up"!==this.parts[e].step);else n=e-1;break}else t=n;if(!i&&(o.isTextNode&&o.node.textContent.trim()||Object(a.E)(o.node)))i=!0}else if(null!==t){if(i){const i=n-1;e.push({start:t,end:i})}t=null;i=!1}}for(let t=e.length-1;t>=0;t--){const i=e[t],n=document.createElement("div"),o=this.parts[i.start].node.nextSibling,s=this.parts[i.start].node.parentNode;for(let e=i.end;e>=i.start;e--)n.appendChild(this.parts[e].node);s.insertBefore(n,o);const a={node:n,isTextNode:!1,isHeading:!1,hasCurrentSignature:n.contains(this.signatureElement),hasForeignComponents:!1,step:"replaced"};this.parts.splice(i.start,i.end-i.start+1,a)}return this.parts}filterParts(){var e;this.parts=this.parts.filter(e=>!e.hasForeignComponents&&!e.isTextNode);for(let e=this.parts.length-1;e>0;e--){const t=this.parts[e].node;if("P"===t.tagName&&!t.textContent.trim()&&[...t[this.parser.context.childElementsProp]].every(e=>"BR"===e.tagName)||Object(a.G)(t)||Array.from(t.classList).some(e=>["references","reflist-talk"].includes(e)))this.parts.splice(e,1);else break}const t=null===(e=this.parts[this.parts.length-1])||void 0===e?void 0:e.node;if("P"===t.tagName){var i;if("BR"===(null===(i=t.firstChild)||void 0===i?void 0:i.tagName))t.parentNode.insertBefore(t.firstChild,t)}if(this.parts.length>1){let e;for(let t=this.parts.length-1;t>=1;t--){const i=this.parts[t];if(i.isHeading)continue;if(!e){e=i.node;if(["DL","UL","OL","DD","LI"].includes(e.tagName)&&!this.isIntroList(e,!0,this.parts[0].node))break}const n=i.node.nextElementSibling;if(n)if(this.isIntro({step:i.step,stage:2,node:i.node,nextNode:n,lastPartNode:this.parts[0].node}))this.parts.splice(t)}}}isCommentLevel(e,t){var i;const n=this.parts[e];return["DL","UL","OL","DD","LI"].includes(n.node.tagName)&&!this.isGallery(n.node)&&!("up"===n.step&&this.parts[e+1]&&("UL"!==n.node.tagName&&this.isPartOfList(this.parts[e+1].node)&&"replaced"!==this.parts[e+1].step||n.node[this.parser.context.childElementsProp].length>1)&&this.isPartOfList(t,!0))&&("up"===n.step&&(!this.parts[e-1]||"back"!==this.parts[e-1].step)||this.isPartOfList(t,!0)&&!("back"===n.step&&["LI","DD"].includes(n.node.tagName))&&!(0!==e&&["UL","OL"].includes(n.node.tagName)&&["DL","UL"].includes(null===(i=n.node.previousElementSibling)||void 0===i?void 0:i.tagName))||"UL"===n.node.tagName&&1===n.node[this.parser.context.childElementsProp].length&&this.isPartOfList(t,!1))}replaceListsWithItems(){const e=this.parts[this.parts.length-1].node;for(let t=this.parts.length-1;t>=0;t--){const i=this.parts[t];if(this.isCommentLevel(t,e)){const e=this.parser.getTopElementsWithText(i.node).nodes;if(e.length>1){const i=e.map(e=>({node:e,isTextNode:!1,hasCurrentSignature:e.contains(this.signatureElement),hasForeignComponents:!1,step:"replaced"}));this.parts.splice(t,1,...i)}else if(e[0]!==i.node)Object.assign(i,{node:e[0],step:"replaced"})}}}wrapNumberedList(){if(this.parts.length>1){const e=this.parts[0].node.parentNode;if("OL"===e.tagName){const t=Number(e.contains(this.signatureElement));if(e.getElementsByClassName("cd-signature").length-t==0){const t=this.parts.filter(t=>t.node.parentNode===e),i=!this.parts.some(t=>t.node.parentNode!==e&&t.node.parentNode.contains(e));let n,o;const s=e.nextSibling,a=e.parentNode;if(i){o=document.createElement("dd");n=document.createElement("dl");n.appendChild(o)}else{o=document.createElement("div");n=o}o.appendChild(e);a.insertBefore(n,s);const r={node:o,isTextNode:!1,isHeading:!1,hasCurrentSignature:!0,hasForeignComponents:!1,step:"replaced"};this.parts.splice(0,t.length,r)}}}}setHighlightables(){this.highlightables=this.elements.filter(e=>!(Object(a.D)(e)||Object(a.G)(e)||o.a.g.unhighlightableElementClasses.some(t=>e.classList.contains(t))||/float: *(?:left|right)|display: *none/.test(e.getAttribute("style"))));if(!this.highlightables.length)throw new n.a;this.wrapHighlightables()}wrapHighlightables(){[this.highlightables[0],this.highlightables[this.highlightables.length-1]].filter(a.Y).filter(e=>o.a.g.badHighlightableElements.includes(e.tagName)||this.highlightables.length>1&&"LI"===e.tagName&&"OL"===e.parentNode.tagName||e.className||e.getAttribute("style")).forEach(e=>{const t=document.createElement("div");t.className="cd-comment-replacedPart";e.parentNode.insertBefore(t,e);this.elements.splice(this.elements.indexOf(e),1,t);this.highlightables.splice(this.highlightables.indexOf(e),1,t);t.appendChild(e)})}addAttributes(){this.elements.forEach(e=>{e.classList.add("cd-comment-part");e.setAttribute("data-cd-comment-index",this.index)});this.highlightables[0].classList.add("cd-comment-part-first");this.highlightables[this.highlightables.length-1].classList.add("cd-comment-part-last")}getListsUpTree(e,t=!1){const i=[],n=new s.b(e,this.parser.context.rootElement);for(;n.parentNode();){const e=n.currentNode;if(["DL","UL","OL"].includes(e.tagName))if(e.classList.contains("cd-commentLevel")){const n=e.getAttribute("class").match(/cd-commentLevel-(\d+)/);if(n){const o=Array(Number(n[1]));if(t)o[o.length-1]=e;i.unshift(...o)}return i}else i.unshift(e)}return i}reviewDives(){let e=!1;if(this.elements.length>1&&this.parts.some(e=>"dive"===e.step)){const i=this.elements.map(this.getListsUpTree.bind(this)),n=i[i.length-1];if(i[0].length>n.length){var t;let o,s;for(let e=i.length-2;e>=0;e--)if(i[e].length>n.length){o=e;s=this.elements[e];break}if(n.length>0||null!==(t=s.lastElementChild)&&void 0!==t&&t.classList.contains("cd-timestamp")){this.elements.splice(0,o+1);this.setHighlightables();e=!0}}}return e}fixIndentationHoles(){if(!this.level||this.elements.length<=2)return;const e=this.elements.map(e=>this.getListsUpTree(e,!0)),t=[];e.slice(1,e.length-1).forEach((e,i)=>{if(!e.length){const e=t[t.length-1];if(!e||e[e.length-1]!==i)t.push([]);t[t.length-1].push(i+1)}});t.forEach(t=>{var i;const n=null===(i=e.slice(0,t[0]).reverse().find(e=>e.length))||void 0===i?void 0:i.slice(-1)[0];if(n){const e="DL"===n.tagName?"dd":"li",i=document.createElement(e);t.forEach(e=>{i.appendChild(this.elements[e])});n.appendChild(i)}})}fixEndLevel(e){if(this.highlightables[0].className)return;const t=e[e.length-1];if(e[0].length===t.length-1){const e=t[t.length-1];let i=this.highlightables[this.highlightables.length-1];for(;i!==e;)i=this.parser.splitParentAfterNode(i)[0];let n=this.elements.length-1;for(let t=this.elements.length-2;t>0&&e.contains(this.elements[t]);t--)n=t;this.elements.splice(n,this.elements.length-n,e);this.setHighlightables()}}setLevels(e=!0){let t=this.highlightables.map(this.getListsUpTree.bind(this));this.level=Math.min(t[0].length,t[t.length-1].length);this.logicalLevel=this.level;if(e){if(this.reviewDives())t=this.highlightables.map(this.getListsUpTree.bind(this));this.fixIndentationHoles();this.fixEndLevel(t)}for(let e=0;e<this.level;e++)t.forEach(t=>{var i;null===(i=t[e])||void 0===i||i.classList.add("cd-commentLevel","cd-commentLevel-"+(e+1))})}getParent(e=!1){const t=e?"level":"logicalLevel";this.cachedParent||(this.cachedParent={});if(void 0===this.cachedParent[t]){this.cachedParent[t]=null;if(0!==this[t])for(let e=this.index-1;e>=0;e--){var i;const n=o.a.comments[e];if(n.section!==this.section)break;if(n[t]===this[t]&&null!==(i=n.cachedParent)&&void 0!==i&&i[t]){this.cachedParent[t]=n.cachedParent[t];break}if(n[t]<this[t]){this.cachedParent[t]=n;break}}}return this.cachedParent[t]}getChildren(e=!1,t=!1,i=!0){const n=[],s=t?"level":"logicalLevel";o.a.comments.slice(this.index+1).some(t=>{if(t.section===this.section&&(t[s]>this[s]||"level"===s&&i&&t[s]===this[s]&&t.isOutdented)){if(t[s]===this[s]+1||e||t.getParent()===this)n.push(t);return!1}else{if("logicalLevel"===s&&this.parser.context.areThereOutdents())o.a.comments.slice(t.index+1).some(e=>{var t;if((null===(t=e.cachedParent)||void 0===t?void 0:t.logicalLevel)===this){n.push(e);return!0}return e.section!==this.section});return!0}});return n}static isId(e){return/^\d{12}_.+$/.test(e)}static isDtId(e){return Boolean(null==e?void 0:e.startsWith("c-"))}static isAnyId(e){return this.isId(e)||this.isDtId(e)}static generateId(e,t,i){if(!e||!t)return null;let n=Object(a.n)(e)+"_"+Object(a.T)(t);if(null!=i&&i.includes(n)){let e=2;const t=n;do{n=`${t}_${e}`;e++}while(i.includes(n))}null==i||i.push(n);return n}static updateOutdentWidth(e,t){if(!o.a.isWorker)[...e.childNodes].forEach(e=>{var i,n;const o=null===(i=e.style)||void 0===i?void 0:i.width;if(o){const[,t,i]=o.match(/^([\d.]+)(.+)$/);if(t)e.style.width=`calc(${1.25*t}${i} + ${1.25*t/2}px)`}else if((null===(n=e[t.context.childElementsProp])||void 0===n||!n.length)&&e.textContent.includes("\u2500"))e.textContent=e.textContent.replace(/\u2500+/,e=>"\u2500".repeat(Math.round(1.25*e.length)))})}static processOutdents(e){if(e.context.areThereOutdents())[...e.context.rootElement.getElementsByClassName(o.a.config.outdentClass)].reverse().forEach(t=>{let i,n;const a=new s.b(t,e.context.rootElement);for(;a.nextNode()&&!i;){let s=a.currentNode.getAttribute("data-cd-comment-index");if("0"===s)break;if(null!==s){s=Number(s);i=o.a.comments[s];for(let e=s-1;e>=0;e--){const t=o.a.comments[e];if(t.section!==i.section)break;if(i.date>=t.date){n=t;break}}if(!n)break;if(n.index!==s-1){var r;(r=i).cachedParent||(r.cachedParent={});i.cachedParent.logicalLevel=n}this.updateOutdentWidth(t,e);i.isOutdented=!0;i.elements[0].classList.add("cd-comment-outdented");o.a.comments.slice(s).some(e=>{if(e.section!==n.section||e.logicalLevel<i.level||e!==i&&e.logicalLevel===i.level||e.date<i.date)return!0;e.logicalLevel=n.level+1+(e.logicalLevel-i.level);return!1})}}})}}t.a=CommentSkeleton},function(e,t,i){"use strict";t.a={data:[],add(e,t,i={}){const n=mw.notification.notify(e,t);this.data.push(Object.assign(i,{notification:n}));return n},get(){return this.data},close(e=!0){this.data.forEach(t=>{if(!e)t.notification.$notification.hide();t.notification.close()});this.data=[]}}},function(e,t,i){"use strict";var n=i(4),o=i.n(n),s=i(1);t.a={list:{},add(e,t,i){var n=this;return o()((function*(){if(!n.list[e]){n.list[e]=!0;yield Object(s.S)(i);n.list[e]=!1;t()}}))()},is(e){return this.list[e]}}},function(e,t,i){"use strict";var n=i(4),o=i.n(n),s=i(18),a=i(6),r=i(26),c=i(5),l=i(27),cd=i(0),d=i(20),u=i(1);var m=class{constructor(e,t,i){this.parser=e;this.headingElement=t.element;this.headlineElement=this.parser.context.getElementByClassName(this.headingElement,"mw-headline");if(!this.headlineElement)throw new a.a;this.id=this.headlineElement.getAttribute("id");this.parseHeadline();const n=this.headingElement.tagName.match(/^H([1-6])$/);this.level=n&&Number(n[1]);this.sectionNumber=null;const o=this.parser.context.getElementByClassName(this.headingElement,"mw-editsection"),s=(o?[...o.getElementsByTagName("a")]:[]).find(e=>{var t;return null===(t=e.getAttribute("href"))||void 0===t?void 0:t.includes("action=edit")});if(s){const e=cd.a.g.server+s.getAttribute("href");this.editUrl=new URL(e);if(this.editUrl){const e=this.editUrl.searchParams.get("section");if(e.startsWith("T-")){this.sourcePageName=this.editUrl.searchParams.get("title");this.sectionNumber=Number(e.match(/\d+/)[0])}else this.sectionNumber=Number(e);this.editUrl=this.editUrl.href}}this.setContentProperties(t,i);this.index=cd.a.sections.length}setContentProperties(e,t){var i,n;const o=new d.c(this.parser.context.rootElement,e=>!Object(u.G)(e)&&!e.classList.contains("cd-section-button-container"),!0,this.headingElement);this.headingNestingLevel=0;for(;o.parentNode();)if(!o.currentNode.classList.contains("mw-heading"))this.headingNestingLevel++;const s=t.indexOf(e);let a=t.findIndex((e,t)=>t>s&&"heading"===e.type);if(-1===a)a=void 0;const r=null===(i=t[a])||void 0===i?void 0:i.element,c=new RegExp(`^H[1-${this.level}]$`);let l=t.findIndex((e,t)=>t>s&&"heading"===e.type&&c.test(e.element.tagName));if(-1===l)l=void 0;const m=null===(n=t[l])||void 0===n?void 0:n.element;this.lastElement=this.getLastElement(m,o);this.lastElementInFirstChunk=r===m?this.lastElement:this.getLastElement(r,o);const h=e=>e.filter(e=>"signature"===e.type).map(e=>e.comment).filter(u.i);this.comments=h(t.slice(s,l));this.commentsInFirstChunk=h(t.slice(s,a));this.comments.forEach(e=>{if(!this.oldestComment||e.date&&(!this.oldestComment.date||this.oldestComment.date>e.date))this.oldestComment=e});this.comments||(this.comments=[]);this.commentsInFirstChunk||(this.commentsInFirstChunk=this.comments);this.commentsInFirstChunk.forEach(e=>{e.section=this})}getLastElement(e,t){let i;if(e){t.currentNode=e;for(;!t.previousSibling()&&t.parentNode(););i=t.currentNode}else i=this.parser.context.rootElement.lastElementChild;for(;i.contains(this.headingElement)&&i!==this.headingElement;)i=i.lastElementChild;return i}parseHeadline(){const e=["mw-headline-number",...cd.a.config.foreignElementInHeadlineClasses];this.headline=[...this.headlineElement.childNodes].filter(t=>t.nodeType===Node.TEXT_NODE||!(Object(u.G)(t)||e.some(e=>t.classList.contains(e)))).map(e=>e.textContent).join("").trim()}getParent(e=!0){if(e&&this.level<=2)return null;else return cd.a.sections.slice(0,this.index).reverse().find(e=>e.level<this.level)||null}getAncestors(){if(!this.cachedAncestors){this.cachedAncestors=[];let e=this;for(;e=e.getParent(!1);)this.cachedAncestors.push(e)}return this.cachedAncestors}},h=i(9),g=i(2),f=i(8),p=i(3),b=i(16),v=i(19),y=i(12),w=i(10),x=i(14),C=i(7);let k;t.a=class extends m{constructor(e,t,i){var n;super(e,t,i);this.scrollToLatestComment=this.scrollToLatestComment.bind(this);this.scrollToNewComments=this.scrollToNewComments.bind(this);this.handleReplyButtonHover=this.handleReplyButtonHover.bind(this);this.handleReplyButtonUnhover=this.handleReplyButtonUnhover.bind(this);this.resetShowAddSubsectionButtonTimeout=this.resetShowAddSubsectionButtonTimeout.bind(this);this.resetHideAddSubsectionButtonTimeout=this.resetHideAddSubsectionButtonTimeout.bind(this);this.deferAddSubsectionButtonHide=this.deferAddSubsectionButtonHide.bind(this);this.toggleAuthors=this.toggleAuthors.bind(this);this.createMoreMenuSelect=this.createMoreMenuSelect.bind(this);k=cd.a.g.sectionElementPrototypes;this.liveSectionNumber=this.sectionNumber;this.liveSectionNumberRevisionId=mw.config.get("wgRevisionId");this.sourcePage=this.sourcePageName?f.b.get(this.sourcePageName):f.b.getCurrent();delete this.sourcePageName;const o=10===(null===(n=this.sourcePage)||void 0===n?void 0:n.namespaceId);this.isActionable=g.a.isPageActive()&&!g.a.getClosedDiscussions().some(e=>e.contains(this.headingElement))&&!o;if(o)this.comments.forEach(e=>{e.isActionable=!1});this.extractSubscribeId();this.$headline=$(this.headlineElement);this.$heading=$(this.headingElement);this.isHidden=!1}addReplyButton(){if(!this.canAddReply())return;const e=this.lastElementInFirstChunk,t="OL"===e.tagName&&1===e.childElementCount&&e.children[0].classList.contains("mw-empty-elt");let i,n=!1;const o=e.tagName,a=this.commentsInFirstChunk[this.commentsInFirstChunk.length-1];if(e.classList.contains("cd-commentLevel")||t)if("UL"===o||"OL"===o&&(t||e!==(null==a?void 0:a.elements[a.elements.length-1])))i="li";else if("DL"===o)i="dd";else{i="li";n=!0}else{i="dd";if(!t)n=!0}const r=new s.a({element:k.replyButton.cloneNode(!0),action:()=>{this.reply()}}),c=document.createElement(i);c.className="cd-replyButtonWrapper";c.append(r.element);let l;if(n){l=document.createElement("dl");l.className="cd-commentLevel cd-commentLevel-1 cd-section-button-container";e.parentNode.insertBefore(l,e.nextElementSibling)}else{l=e;l.classList.add("cd-section-button-container")}l.append(c);this.replyButton=r;this.$replyButtonWrapper=$(c);this.$replyButtonContainer=$(l)}addAddSubsectionButton(){if(2!==this.level||!this.canAddSubsection())return;const e=k.addSubsectionButton.cloneNode(!0),t=new s.a({element:e,labelElement:e.querySelector(".oo-ui-labelElement-label"),label:cd.a.s("section-addsubsection-to",this.headline),action:()=>{this.addSubsection()}});t.buttonElement.onmouseenter=this.resetHideAddSubsectionButtonTimeout;t.buttonElement.onmouseleave=this.deferAddSubsectionButtonHide;const i=document.createElement("div");i.className="cd-section-button-container cd-addSubsectionButton-container";i.style.display="none";i.append(t.element);this.lastElement.parentNode.insertBefore(i,this.lastElement.nextElementSibling);this.addSubsectionButton=t;this.$addSubsectionButtonContainer=$(i)}resetShowAddSubsectionButtonTimeout(){clearTimeout(this.showAddSubsectionButtonTimeout);this.showAddSubsectionButtonTimeout=null}resetHideAddSubsectionButtonTimeout(){clearTimeout(this.hideAddSubsectionButtonTimeout);this.hideAddSubsectionButtonTimeout=null}deferAddSubsectionButtonHide(){if(!this.hideAddSubsectionButtonTimeout)this.hideAddSubsectionButtonTimeout=setTimeout(()=>{this.$addSubsectionButtonContainer.hide()},1e3)}handleReplyButtonHover(){if(!this.addSubsectionForm){this.resetHideAddSubsectionButtonTimeout();if(!this.showAddSubsectionButtonTimeout)this.showAddSubsectionButtonTimeout=setTimeout(()=>{this.$addSubsectionButtonContainer.show()},1e3)}}handleReplyButtonUnhover(){if(!this.addSubsectionForm){this.resetShowAddSubsectionButtonTimeout();this.deferAddSubsectionButtonHide()}}showAddSubsectionButtonOnReplyButtonHover(e){if(this.replyButton){this.replyButton.buttonElement.onmouseenter=e.handleReplyButtonHover;this.replyButton.buttonElement.onmouseleave=e.handleReplyButtonUnhover}}addSubscribeButton(){if(this.subscribeId&&!f.b.getCurrent().isArchivePage()){this.subscriptionState=b.a.getState(this.subscribeId);this.actions.subscribeButton=new OO.ui.ButtonWidget({framed:!1,flags:["progressive"],icon:"bellOutline",label:cd.a.s("sm-subscribe"),title:cd.a.mws("discussiontools-topicsubscription-button-subscribe-tooltip"),classes:["cd-section-bar-button","cd-section-bar-button-subscribe"]});if("monobook"===cd.a.g.skin)this.actions.subscribeButton.$element.find(".oo-ui-iconElement-icon").addClass("oo-ui-image-progressive");this.updateSubscribeButtonState();this.actionsElement.prepend(this.actions.subscribeButton.$element.get(0));mw.hook("convenientDiscussions.subscribeButtonAdded").fire(this)}}canEditFirstComment(){return Boolean(this.isActionable&&this.comments.length&&this.comments[0].isOpeningSection&&this.comments[0].openingSectionOfLevel===this.level&&(this.comments[0].isOwn||p.a.get("allowEditOthersComments"))&&this.comments[0].isActionable&&!this.comments[0].isCollapsed)}canBeMoved(){return this.isActionable&&2===this.level}canAddReply(){const e=this.commentsInFirstChunk[0]&&0===this.commentsInFirstChunk[0].level&&this.commentsInFirstChunk.every(e=>!e.isActionable),t=this.lastElementInFirstChunk!==this.lastElement&&this.lastElementInFirstChunk===this.headingElement,i=!h.a.getByIndex(this.index+1)||h.a.getByIndex(this.index+1).headingNestingLevel===this.headingNestingLevel,n=["TR","TD","TH"].includes(this.lastElementInFirstChunk.tagName);return Boolean(this.isActionable&&!e&&!t&&i&&!n)}canAddSubsection(){const e=this.comments[0]&&0===this.comments[0].level&&this.comments.every(e=>!e.isActionable),t=h.a.getAll().slice(this.index+1).find(e=>e.level===this.level),i=!t||t.headingNestingLevel===this.headingNestingLevel;return Boolean(this.isActionable&&this.level>=2&&this.level<=5&&!e&&i)}toggleAuthors(e){e.preventDefault();if(!this.authorsPopup){this.authorsPopup=new OO.ui.PopupWidget({$content:$(Object(u.l)(this.comments.map(e=>e.author).filter(u.Y).sort((e,t)=>t.getName()>e.getName()?-1:1).map(e=>[e,this.comments.filter(t=>t.author===e)]).map(([e,t],i,n)=>[$("<a>").text(e.getName()).attr("href","#"+(t[0].dtId||t[0].id)).on("click",()=>{c.a.scrollToFirstHighlightAll(t)}).get(0),i===n.length-1?void 0:document.createTextNode(cd.a.mws("comma-separator"))]))),head:!1,padded:!0,autoClose:!0,$autoCloseIgnore:$(this.authorCountWrapper.firstChild),position:"above",$floatableContainer:$(this.authorCountWrapper.firstChild),classes:["cd-section-metadata-authorsPopup"]});$(g.a.getPopupOverlay()).append(this.authorsPopup.$element)}this.authorsPopup.toggle()}scrollToLatestComment(e){e.preventDefault();this.latestComment.scrollTo({pushState:!0})}createMetadataElement(){const e=this.comments.map(e=>e.author).filter(u.Y).length,t=this.comments.reduce((e,t)=>t.date&&(!e||!e.date||e.date<t.date)?t:e,null);let i,n,o,s;if(2===this.level&&this.comments.length){i=document.createElement("span");i.className="cd-section-bar-item";i.append(cd.a.s("section-metadata-commentcount",this.comments.length));const a=document.createElement("a");a.onclick=this.toggleAuthors;a.append(cd.a.s("section-metadata-authorcount",e));n=document.createElement("span");n.className="cd-section-bar-item cd-section-bar-item-authorCount";n.append(a);if(t){const e=document.createElement("a");e.href="#"+(t.dtId||t.id);e.onclick=this.scrollToLatestComment;e.textContent=Object(x.b)(t.date);new l.a(e,t.date,!1).init();o=document.createElement("span");o.className="cd-section-bar-item";o.append(cd.a.s("section-metadata-lastcomment")," ",e)}s=document.createElement("div");s.className="cd-section-metadata";const r=[i,n,o].filter(u.i);s.append(...r)}this.latestComment=t;this.metadataElement=s;this.commentCountWrapper=i;this.authorCountWrapper=n;this.latestCommentWrapper=o;this.$metadata=$(s);this.$commentCountWrapper=$(i);this.$authorCountWrapper=$(n);this.$latestCommentWrapper=$(o)}createMoreMenuSelect(){const e=k.getMoreMenuSelect(),t=this.canEditFirstComment()?new OO.ui.MenuOptionWidget({data:"editOpeningComment",label:cd.a.s("sm-editopeningcomment"),title:cd.a.s("sm-editopeningcomment-tooltip"),icon:"edit"}):void 0,i=this.canBeMoved()?new OO.ui.MenuOptionWidget({data:"move",label:cd.a.s("sm-move"),title:cd.a.s("sm-move-tooltip"),icon:"arrowNext"}):void 0,n=this.canAddSubsection()?new OO.ui.MenuOptionWidget({data:"addSubsection",label:cd.a.s("sm-addsubsection"),title:cd.a.s("sm-addsubsection-tooltip"),icon:"speechBubbleAdd"}):void 0;this.actions.moreMenuSelectDummy.element.remove();this.actionsElement.append(e.$element.get(0));const o=[t,i,n].filter(u.i);e.getMenu().addItems(o).on("choose",e=>{switch(e.getData()){case"editOpeningComment":this.comments[0].edit();break;case"move":this.move();break;case"addSubsection":this.addSubsection()}});this.actions.moreMenuSelect=e;mw.hook("convenientDiscussions.moreMenuSelectCreated").fire(this)}createAndClickMoreMenuSelect(){this.createMoreMenuSelect();this.actions.moreMenuSelect.focus().emit("click")}createActionsElement(){let e,t;if(this.canEditFirstComment()||this.canBeMoved()||this.canAddSubsection()){const t=k.moreMenuSelect.cloneNode(!0);e=new s.a({element:t,action:()=>{this.createAndClickMoreMenuSelect()}});e.buttonElement.onmouseenter=this.createMoreMenuSelect}if(this.headline){const e=k.copyLinkButton.cloneNode(!0);t=new s.a({element:e,buttonElement:e.firstChild,iconElement:e.querySelector(".oo-ui-iconElement-icon"),href:`${f.b.getCurrent().getUrl()}#${this.id}`,action:e=>{this.copyLink(e)},flags:["progressive"]});t.buttonElement.classList.add("mw-selflink")}const i=document.createElement(2===this.level?"div":"span");i.className="cd-section-actions";const n=[t,e].filter(u.i).map(e=>e.element);i.append(...n);this.actionsElement=i;this.$actions=$(i);this.actions={copyLinkButton:t,moreMenuSelectDummy:e}}addeBarElement(){const e=document.createElement("div");e.className="cd-section-bar";if(!this.metadataElement)e.classList.add("cd-section-bar-nometadata");e.append(...[this.metadataElement,this.actionsElement].filter(u.i));this.headingElement.parentNode.insertBefore(e,this.headingElement.nextElementSibling);if(this.lastElement===this.headingElement)this.lastElement=e;if(this.lastElementInFirstChunk===this.headingElement)this.lastElementInFirstChunk=e;this.barElement=e;this.$bar=$(e)}addActionsElement(){const e=document.createElement("span");e.append(...this.headingElement.childNodes);this.headingElement.append(e,this.actionsElement);this.headingElement.classList.add("cd-subsection-heading")}addMetadataAndActions(){this.createActionsElement();if(2===this.level){this.createMetadataElement();this.addeBarElement()}else this.addActionsElement()}scrollToNewComments(e){e.preventDefault();c.a.scrollToFirstHighlightAll(this.newComments)}addNewCommentCountMetadata(){if(2!==this.level||!this.newComments.length)return;const e=cd.a.sParse("section-metadata-commentcount-new",this.comments.length,this.newComments.length);this.commentCountWrapper.innerHTML=e;if(this.newComments.length!==this.comments.length){const e=this.commentCountWrapper.querySelector(".cd-section-metadata-commentcount-new");if(e){const t=document.createElement("a");t.textContent=e.textContent;t.href="#"+this.newComments[0].dtId;t.onclick=this.scrollToNewComments;e.firstChild.replaceWith(t)}}}updateNewCommentsData(){this.newComments=this.comments.filter(e=>!1===e.isSeen);this.addNewCommentCountMetadata()}extractSubscribeId(){if(p.a.get("useTopicSubscription")){if(cd.a.g.isDtTopicSubscriptionEnabled){if(this.headingElement.querySelector(".ext-discussiontools-init-section-subscribe-link")){const e=this.headlineElement.dataset.mwComment;try{this.subscribeId=JSON.parse(e).name}catch(e){}}}else for(let e=this.headingElement.firstChild;e;e=e.nextSibling)if(e.nodeType===Node.COMMENT_NODE&&e.textContent.includes("__DTSUBSCRIBELINK__")){[,this.subscribeId]=e.textContent.match("__DTSUBSCRIBELINK__(.+)")||[];break}}else this.subscribeId=this.headline}reply(e){if(!this.replyForm)this.replyForm=e instanceof r.a?e:new r.a({mode:"replyInSection",target:this,initialState:e});const t=this.getBase();if(t.$addSubsectionButtonContainer){t.$addSubsectionButtonContainer.hide();clearTimeout(t.showAddSubsectionButtonTimeout);t.showAddSubsectionButtonTimeout=null}}addSubsection(e){if(!this.canAddSubsection())throw new a.a;if(this.addSubsectionForm){this.addSubsectionForm.$element.cdScrollIntoView("center");Object(u.m)(this.addSubsectionForm.headlineInput)}else this.addSubsectionForm=e instanceof r.a?e:new r.a({mode:"addSubsection",target:this,initialState:e})}move(){if(g.a.isPageOverlayOn()||Object(u.g)("mediawiki.widgets"))return;const e=new(0,i(57).default)(this);g.a.getWindowManager().addWindows([e]);g.a.getWindowManager().openWindow(e)}updateSubscribeButtonState(){if(this.subscriptionState){var e;null===(e=this.actions.subscribeButton)||void 0===e||e.setLabel(cd.a.s("sm-unsubscribe")).setTitle(cd.a.mws("discussiontools-topicsubscription-button-unsubscribe-tooltip")).setIcon("bell").off("click").on("click",()=>{this.unsubscribe()})}else{var t;null===(t=this.actions.subscribeButton)||void 0===t||t.setLabel(cd.a.s("sm-subscribe")).setTitle(cd.a.mws("discussiontools-topicsubscription-button-subscribe-tooltip")).setIcon("bellOutline").off("click").on("click",()=>{this.subscribe()})}}subscribe(e,t){const i=h.a.getBySubscribeId(this.subscribeId);let n;if("silent"!==e){const e=i.map(e=>e.actions.subscribeButton).filter(u.i);e.forEach(e=>{e.setDisabled(!0)});n=()=>{e.forEach(e=>{e.setDisabled(!1)})}}const o=t&&!h.a.getBySubscribeId(t).length?t:void 0;b.a.subscribe(this.subscribeId,this.id,o).then(()=>{if("silent"!==e)i.forEach(e=>{e.subscriptionState=!0;e.updateSubscribeButtonState();e.updateTocLink()});if(!e){let e,t=cd.a.mws("discussiontools-topicsubscription-notify-subscribed-title"),i=cd.a.mws("discussiontools-topicsubscription-notify-subscribed-body");if(!p.a.get("useTopicSubscription")){i+=" "+cd.a.sParse("section-watch-openpages");if($("#ca-watch").length){i+=" "+cd.a.sParse("section-watch-pagenotwatched");e="long"}}mw.notify(Object(u.Z)(i),{title:t,autoHideSeconds:e})}}).then(n,n)}unsubscribe(e){const t=h.a.getBySubscribeId(this.subscribeId);let i;if("silent"!==e){const e=t.map(e=>e.actions.subscribeButton).filter(u.i);e.forEach(e=>{e.setDisabled(!0)});i=()=>{e.forEach(e=>{e.setDisabled(!1)})}}b.a.unsubscribe(this.subscribeId,this.id).then(()=>{if("silent"!==e)t.forEach(e=>{e.subscriptionState=!1;e.updateSubscribeButtonState();e.updateTocLink()});const i=this.getClosestSectionSubscribedTo();if(!e||i){let e,t=cd.a.mws("discussiontools-topicsubscription-notify-unsubscribed-title"),n=cd.a.mws("discussiontools-topicsubscription-notify-unsubscribed-body");if(i){n+=" "+cd.a.sParse("section-unwatch-stillwatched",i.headline);e="long"}mw.notify(Object(u.Z)(n),{title:t,autoHideSeconds:e})}}).then(i,i)}resubscribeToRenamed(e,t){if(p.a.get("useTopicSubscription")||this.subscriptionState||!/^H[1-6]$/.test(e.elementNames[0])||t.elementNames[0]!==e.elementNames[0])return;const i=t.elementHtmls[0].replace(/\x01(\d+)_\w+\x02/g,(t,i)=>e.hiddenElementsData[i-1].html),n={headlineElement:$("<span>").html($(i).html()).get(0)};h.a.prototype.parseHeadline.call(n);if(this.headline&&n.headline!==this.headline&&b.a.getOriginalState(n.headline))this.subscribe("quiet",n.headline)}copyLink(e){if(!g.a.isPageOverlayOn()){e.preventDefault();g.a.showCopyLinkDialog(this,e)}}setLastCommentIndentation(e){const[,t]=this.inCode.firstChunkCode.match(/\n([#*]) *\n+$/)||[];if(t)this.inCode.lastCommentIndentation=t;else{const t=this.commentsInFirstChunk[this.commentsInFirstChunk.length-1];if(t&&("ol"===e.getContainerListType()||"mimic"===cd.a.config.indentationCharMode)){try{t.locateInCode(e.isSectionSubmitted())}catch(e){return}if(!t.inCode.indentation.startsWith("#")||"ol"===e.getContainerListType())this.inCode.lastCommentIndentation=t.inCode.indentation}}}modifyWholeCode({action:e,commentCode:t}){const i=this.inCode.isSectionCodeUsed?this.code:this.getSourcePage().code;let n;switch(e){case"replyInSection":n=i.slice(0,this.inCode.firstChunkContentEndIndex)+t+i.slice(this.inCode.firstChunkContentEndIndex);break;case"addSubsection":n=Object(w.c)(i.slice(0,this.inCode.contentEndIndex))+t+i.slice(this.inCode.contentEndIndex).trim();break}return{wholeCode:n,commentCode:t}}requestCode(){var e=this;return o()((function*(){var t,i,n,o,s;const r=yield g.a.getApi().post({action:"query",titles:e.getSourcePage().name,prop:"revisions",rvsection:e.liveSectionNumber,rvslots:"main",rvprop:["ids","content"],redirects:!mw.config.get("wgIsRedirect"),curtimestamp:!0}).catch(C.m),c=r.query,l=null==c?void 0:null===(t=c.pages)||void 0===t?void 0:t[0],d=null==l?void 0:null===(i=l.revisions)||void 0===i?void 0:i[0],u=null==d?void 0:null===(n=d.slots)||void 0===n?void 0:n.main,m=null==u?void 0:u.content;if(!c||!l)throw new a.a({type:"api",code:"noData"});if(l.missing)throw new a.a({type:"api",code:"missing"});if(l.invalid)throw new a.a({type:"api",code:"invalid"});if(u.nosuchsection)throw new a.a({type:"api",code:"noSuchSection"});if(!d||void 0===m)throw new a.a({type:"api",code:"noData"});const h=(null===(o=c.redirects)||void 0===o?void 0:null===(s=o[0])||void 0===s?void 0:s.to)||null;Object.assign(e,{code:m+"\n",revisionId:d.revid,queryTimestamp:r.curtimestamp});Object.assign(f.b.getCurrent(),{pageId:l.pageid,redirectTarget:h,realName:h||e.name})}))()}getCode(e){var t=this;return o()((function*(){try{if(null!==t.liveSectionNumber)try{yield t.requestCode();t.locateInCode(!0);if(e)e.setSectionSubmitted(!0)}catch(e){if(e instanceof a.a&&["noSuchSection","locateSection"].includes(e.data.code)){yield t.getSourcePage().getCode();t.locateInCode(!1)}else throw e}else{yield t.getSourcePage().getCode();t.locateInCode(!1)}}catch(e){if(e instanceof a.a)throw new a.a(Object.assign({},{message:cd.a.sParse("cf-error-getpagecode")},e.data));else throw e}}))()}collectMatchData(e,t,i){const n=Object(w.j)(Object(w.k)(e[3])),o=e[1],s=`={1,${e[2].length}}`,a=t.slice(e.index),r=i.slice(e.index),c=r.match(new RegExp("("+mw.util.escapeRegExp(o)+"[^]*?\\n)"+s+"[^=].*=+[ \\t\\x01\\x02]*\\n"))||r.match(new RegExp("("+mw.util.escapeRegExp(o)+"[^]*$)")),l=r.match(new RegExp("("+mw.util.escapeRegExp(o)+"[^]*?\\n)\\n*={1,6}[^=].*=+[ \\t\\x01\\x02]*\n"))||r.match(new RegExp("("+mw.util.escapeRegExp(o)+"[^]*$)")),d=c&&a.substr(c.index,c[1].length),u=l&&a.substr(l.index,l[1].length),m=e.index,h=m+d.length,g=e.index+e[0].length,f=m+u.length,p=g-m;let b=f,v=h;cd.a.g.keepInSectionEnding.forEach(e=>{const t=u.match(e);if(t)b-=t[0].length-1;const i=d.match(e);if(i)v-=i[0].length-1});const y=u.match(/\n([#*] *\n+)$/);if(y)b-=y[1].length;return{startIndex:m,endIndex:h,code:d,contentStartIndex:g,contentEndIndex:v,relativeContentStartIndex:p,firstChunkEndIndex:f,firstChunkContentEndIndex:b,firstChunkCode:u,headline:n}}getMatchScore(e,t,i,n){const o=this.index===t,s=e.headline===i,a=n.slice(-3).reverse(),r=h.a.getAll().slice(Math.max(0,this.index-3),this.index).reverse().map(e=>e.headline).every((e,t)=>Object(w.j)(e)===a[t]);n.push(e.headline);let c;Object(w.d)(e.code).forEach(e=>{if(!c||!c.date&&e.date||c.date>e.date)c=e});const l=c?Boolean(this.oldestComment&&(c.timestamp===this.oldestComment.timestamp||c.author===this.oldestComment.author)):!this.oldestComment;let d=Number(!this.oldestComment&&!c);if(this.oldestComment&&c)d=Object(u.d)(this.oldestComment.getText(),Object(w.k)(e.code.slice(c.commentStartIndex,c.startIndex)));return 1*l+d+1*s+.5*o+.25*r}searchInCode(e){const t=Object(w.j)(this.headline),i=Object(w.g)(e),n=/^((=+)(.*)\2[ \t\x01\x02]*)\n/gm,o=[],s=[];let a,r=-1;for(;a=n.exec(i);){r++;const n=this.collectMatchData(a,e,i);if(n.code&&n.firstChunkCode){n.score=this.getMatchScore(n,r,t,s);if(!(n.score<=1)){o.push(n);if(2.75===n.score)break}}else console.warn(`Couldn't read the "${n.headline}" section contents.`)}return o}locateInCode(e){this.inCode=null;const t=e?this.code:this.getSourcePage().code;if(void 0===t)throw new a.a({type:"parse",code:"noCode"});const i=this.searchInCode(t).sort((e,t)=>t.score-e.score)[0];if(!i)throw new a.a({type:"parse",code:"locateSection"});i.isSectionCodeUsed=e;this.inCode=i}getSourcePage(){return this.sourcePage}getBase(e=!1){const t=e&&2!==this.level?null:this;return this.level<=2?t:h.a.getAll().slice(0,this.index).reverse().find(e=>2===e.level)||t}getChildren(e=!1){const t=[];let i=!1;h.a.getAll().slice(this.index+1).some(n=>{if(n.level>this.level){if(n.level===this.level+1)i=!0;if(e||n.level===this.level+1||!i)t.push(n);return!1}else return!0});return t}getClosestSectionSubscribedTo(e=!1){for(let t=e?this:this.getParent();t;t=t.getParent())if(t.subscriptionState)return t;return null}getTocItem(){return v.a.getItem(this.id)||null}updateTocLink(){if(!p.a.get("modifyToc"))return;const e=this.getTocItem();if(e)if(this.subscriptionState)e.$link.find(v.a.isInSidebar()?".sidebar-toc-text":".toctext").append($("<span>").addClass("cd-toc-subscriptionIcon-before"),$("<span>").addClass("cd-toc-subscriptionIcon").attr("title",cd.a.s("toc-watched")));else e.$link.removeAttr("title").find(".cd-toc-subscriptionIcon, .cd-toc-subscriptionIcon-before").remove()}getUrl(e){return f.b.getCurrent().getDecodedUrlWithFragment(this.id,e)}getRelevantSection(){return this}getRelevantComment(){var e;return null!==(e=this.comments[0])&&void 0!==e&&e.isOpeningSection?this.comments[0]:null}getIdentifyingData(){var e;return{headline:this.headline,oldestCommentId:null===(e=this.oldestComment)||void 0===e?void 0:e.id,index:this.index,id:this.id,ancestors:this.getAncestors().map(e=>e.headline)}}getWikilinkFragment(){return Object(w.b)(Object(u.W)(this.id))}ensureSubscribeIdPresent(e){if(p.a.get("useTopicSubscription")&&!this.subscribeId)this.subscribeId=h.a.generateDtSubscriptionId(y.a.getCurrent().getName(),e)}getSectionSubscribedTo(){return p.a.get("useTopicSubscription")?this.getBase(!0):this}findRealLastElement(e){let t,i=this.lastElement;do{t=i;i=i.nextElementSibling}while(i&&(i.matches(".cd-section-button-container")||!e||e(i)));return t}updateVisibility(e){if(Boolean(e)===this.isHidden){this.elements||(this.elements=g.a.getRangeContents(this.headingElement,this.findRealLastElement()));this.isHidden=!e;this.elements.forEach(t=>{t.classList.toggle("cd-section-hidden",!e)})}}}},function(e,t,i){var n,o=function(){var e=String.fromCharCode,t="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",i="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+-$",n={};function o(e,t){if(!n[e]){n[e]={};for(var i=0;i<e.length;i++)n[e][e.charAt(i)]=i}return n[e][t]}var s={compressToBase64:function(e){if(null==e)return"";var i=s._compress(e,6,(function(e){return t.charAt(e)}));switch(i.length%4){default:case 0:return i;case 1:return i+"===";case 2:return i+"==";case 3:return i+"="}},decompressFromBase64:function(e){if(null==e)return"";if(""==e)return null;else return s._decompress(e.length,32,(function(i){return o(t,e.charAt(i))}))},compressToUTF16:function(t){if(null==t)return"";else return s._compress(t,15,(function(t){return e(t+32)}))+" "},decompressFromUTF16:function(e){if(null==e)return"";if(""==e)return null;else return s._decompress(e.length,16384,(function(t){return e.charCodeAt(t)-32}))},compressToUint8Array:function(e){for(var t=s.compress(e),i=new Uint8Array(2*t.length),n=0,o=t.length;n<o;n++){var a=t.charCodeAt(n);i[2*n]=a>>>8;i[2*n+1]=a%256}return i},decompressFromUint8Array:function(t){if(null==t)return s.decompress(t);else{for(var i=new Array(t.length/2),n=0,o=i.length;n<o;n++)i[n]=256*t[2*n]+t[2*n+1];var a=[];i.forEach((function(t){a.push(e(t))}));return s.decompress(a.join(""))}},compressToEncodedURIComponent:function(e){if(null==e)return"";else return s._compress(e,6,(function(e){return i.charAt(e)}))},decompressFromEncodedURIComponent:function(e){if(null==e)return"";if(""==e)return null;e=e.replace(/ /g,"+");return s._decompress(e.length,32,(function(t){return o(i,e.charAt(t))}))},compress:function(t){return s._compress(t,16,(function(t){return e(t)}))},_compress:function(e,t,i){if(null==e)return"";var n,o,s,a={},r={},c="",l="",d="",u=2,m=3,h=2,g=[],f=0,p=0;for(s=0;s<e.length;s+=1){c=e.charAt(s);if(!Object.prototype.hasOwnProperty.call(a,c)){a[c]=m++;r[c]=!0}l=d+c;if(Object.prototype.hasOwnProperty.call(a,l))d=l;else{if(Object.prototype.hasOwnProperty.call(r,d)){if(d.charCodeAt(0)<256){for(n=0;n<h;n++){f<<=1;if(p==t-1){p=0;g.push(i(f));f=0}else p++}o=d.charCodeAt(0);for(n=0;n<8;n++){f=f<<1|1&o;if(p==t-1){p=0;g.push(i(f));f=0}else p++;o>>=1}}else{o=1;for(n=0;n<h;n++){f=f<<1|o;if(p==t-1){p=0;g.push(i(f));f=0}else p++;o=0}o=d.charCodeAt(0);for(n=0;n<16;n++){f=f<<1|1&o;if(p==t-1){p=0;g.push(i(f));f=0}else p++;o>>=1}}if(0==--u){u=Math.pow(2,h);h++}delete r[d]}else{o=a[d];for(n=0;n<h;n++){f=f<<1|1&o;if(p==t-1){p=0;g.push(i(f));f=0}else p++;o>>=1}}if(0==--u){u=Math.pow(2,h);h++}a[l]=m++;d=String(c)}}if(""!==d){if(Object.prototype.hasOwnProperty.call(r,d)){if(d.charCodeAt(0)<256){for(n=0;n<h;n++){f<<=1;if(p==t-1){p=0;g.push(i(f));f=0}else p++}o=d.charCodeAt(0);for(n=0;n<8;n++){f=f<<1|1&o;if(p==t-1){p=0;g.push(i(f));f=0}else p++;o>>=1}}else{o=1;for(n=0;n<h;n++){f=f<<1|o;if(p==t-1){p=0;g.push(i(f));f=0}else p++;o=0}o=d.charCodeAt(0);for(n=0;n<16;n++){f=f<<1|1&o;if(p==t-1){p=0;g.push(i(f));f=0}else p++;o>>=1}}if(0==--u){u=Math.pow(2,h);h++}delete r[d]}else{o=a[d];for(n=0;n<h;n++){f=f<<1|1&o;if(p==t-1){p=0;g.push(i(f));f=0}else p++;o>>=1}}if(0==--u){u=Math.pow(2,h);h++}}o=2;for(n=0;n<h;n++){f=f<<1|1&o;if(p==t-1){p=0;g.push(i(f));f=0}else p++;o>>=1}for(;;){f<<=1;if(p==t-1){g.push(i(f));break}else p++}return g.join("")},decompress:function(e){if(null==e)return"";if(""==e)return null;else return s._decompress(e.length,32768,(function(t){return e.charCodeAt(t)}))},_decompress:function(t,i,n){var o,s,a,r,c,l,d,u=[],m=4,h=4,g=3,f="",p=[],b={val:n(0),position:i,index:1};for(o=0;o<3;o+=1)u[o]=o;a=0;c=Math.pow(2,2);l=1;for(;l!=c;){r=b.val&b.position;b.position>>=1;if(0==b.position){b.position=i;b.val=n(b.index++)}a|=(r>0?1:0)*l;l<<=1}switch(a){case 0:a=0;c=Math.pow(2,8);l=1;for(;l!=c;){r=b.val&b.position;b.position>>=1;if(0==b.position){b.position=i;b.val=n(b.index++)}a|=(r>0?1:0)*l;l<<=1}d=e(a);break;case 1:a=0;c=Math.pow(2,16);l=1;for(;l!=c;){r=b.val&b.position;b.position>>=1;if(0==b.position){b.position=i;b.val=n(b.index++)}a|=(r>0?1:0)*l;l<<=1}d=e(a);break;case 2:return""}u[3]=d;s=d;p.push(d);for(;;){if(b.index>t)return"";a=0;c=Math.pow(2,g);l=1;for(;l!=c;){r=b.val&b.position;b.position>>=1;if(0==b.position){b.position=i;b.val=n(b.index++)}a|=(r>0?1:0)*l;l<<=1}switch(d=a){case 0:a=0;c=Math.pow(2,8);l=1;for(;l!=c;){r=b.val&b.position;b.position>>=1;if(0==b.position){b.position=i;b.val=n(b.index++)}a|=(r>0?1:0)*l;l<<=1}u[h++]=e(a);d=h-1;m--;break;case 1:a=0;c=Math.pow(2,16);l=1;for(;l!=c;){r=b.val&b.position;b.position>>=1;if(0==b.position){b.position=i;b.val=n(b.index++)}a|=(r>0?1:0)*l;l<<=1}u[h++]=e(a);d=h-1;m--;break;case 2:return p.join("")}if(0==m){m=Math.pow(2,g);g++}if(u[d])f=u[d];else if(d===h)f=s+s.charAt(0);else return null;p.push(f);u[h++]=s+f.charAt(0);s=f;if(0==--m){m=Math.pow(2,g);g++}}}};return s}();if(1)void 0!==(n=function(){return o}.call(t,i,t,e))&&(e.exports=n)},function(e){e.exports=JSON.parse('{"ab":"H:i, j xg Y","abs":"j F Y H.i","ace":"j F Y H.i","ady-cyrl":"H:i, j F Y","aeb-arab":"H:i\u060c j xg Y","aeb-latn":"H:i, j F Y","af":"H:i, j F Y","ais":"H:i, j F Y","ak":"H:i, j F Y","aln":"j F Y H:i","ami":"H:i, j F Y","am":"H:i, j F Y","ang":"H:i, j F Y","an":"H:i j M Y","anp":"H:i, j F Y","arc":"H:i, j F Y","ar":"H:i\u060c j xg Y","arn":"H:i j M Y","arq":"H:i\u060c j xg Y","ary":"H:i, j F Y","arz":"H:i\u060c j xg Y","ase":"H:i, j F Y","as":"H:i, j F Y","ast":"H:i j M Y","atj":"j F Y \xe0 H:i","av":"H:i, j xg Y","avk":"H:i, j F Y","awa":"H:i, j F Y","ay":"H:i j M Y","azb":"j xg Y\u060c \u0633\u0627\u0639\u062a H:i","az":"H:i, j F Y","ba":"H:i, j xg Y","ban":"j F Y H.i","bar":"H:i, j. M Y","bbc-latn":"j F Y H.i","bcc":"j xg Y\u060c \u0633\u0627\u0639\u062a H:i","bcl":"H:i, j F Y","be":"H:i, j xg Y","be-tarask":"H:i, j xg Y","bg":"H:i, j F Y","bgn":"j xg Y\u060c \u0633\u0627\u0639\u062a H:i","bho":"H:i, j F Y","bi":"H:i, j F Y","bjn":"j F Y H.i","bm":"j F Y \xe0 H:i","bn":"H:i, j F Y","bo":"H:i, j F Y","bpy":"H:i, j F Y","bqi":"j xg Y\u060c \u0633\u0627\u0639\u062a H:i","brh":"H:i, j F Y","br":"j M Y \\"da\\" H:i","bs":"H:i, j F Y","btm":"j F Y H.i","bto":"H:i, j F Y","bug":"j F Y H.i","bxr":"H:i, j xg Y","ca":"H:i, j M Y","cbk-zam":"H:i j M Y","cdo":"Y \\"ni\xe8ng\\" n \\"ngu\u014fk\\" j \\"h\xf4\u0324\\" (D) H:i","ceb":"H:i, j F Y","ce":"Y, j F, H:i","ch":"H:i, j F Y","chr":"H:i, j F Y","chy":"H:i, j F Y","ckb":"H:i\u060c j\u06cc xg Y","co":"H:i, j M Y","cps":"H:i, j F Y","crh-cyrl":"H:i, Y \\"\u0441.\\" xg j","crh-latn":"H:i, Y \\"s.\\" xg j","cr":"H:i, j F Y","csb":"H:i, j M Y","cs":"j. n. Y, H:i","cu":"H:i, xg j \u0447\u0438\u0441\u043b\u0430, Y","cv":"H:i, j xg Y","cy":"H:i, j F Y","da":"j. M Y, H:i","de-at":"H:i, j. M Y","de-ch":"H:i, j. M Y","de-formal":"H:i, j. M Y","de":"H:i, j. M Y","din":"H:i, j F Y","diq":"H:i, j F Y","dsb":"j. xg Y, H:i","dtp":"H:i, j F Y","dty":"H:i, j F Y","dv":"H:i, j F Y","dz":"H:i, j F Y","ee":"H:i, j F Y","egl":"H:i, j M Y","el":"H:i, j xg Y","eml":"H:i, j M Y","en-ca":"H:i, j F Y","en-gb":"H:i, j F Y","en":"H:i, j F Y","eo":"H:i, j M. Y","es-formal":"H:i j M Y","es":"H:i j M Y","et":"j. F Y, \\"kell\\" H:i","eu":"H:i, j F Y","exif":"H:i, j F Y","ext":"H:i j M Y","fa":"j xg Y\u060c \u0633\u0627\u0639\u062a H:i","ff":"j F Y \xe0 H:i","fi":"j. F\\"ta\\" Y \\"kello\\" H.i","fit":"j. F\\"ta\\" Y \\"kello\\" H.i","fj":"H:i, j F Y","fo":"j. M Y \\"kl.\\" H:i","frc":"j F Y \xe0 H:i","fr":"j F Y \xe0 H:i","frp":"j F Y \\"a\\" H:i","frr":"H:i, j. M Y","fur":"j \\"di\\" M Y \\"a lis\\" H:i","fy":"j M Y, H.i","gag":"H.i, j F Y","ga":"H:i, j F Y","gan-hans":"Y\u5e74n\u6708j\u65e5 (D) H:i","gan-hant":"Y\u5e74n\u6708j\u65e5 (D) H:i","gan":"Y\u5e74n\u6708j\u65e5 (D) H:i","gcr":"j F Y \xe0 H:i","gd":"H:i, j F Y","gl":"j \\\\d\\\\e F \\\\d\\\\e Y \\"\xe1s\\" H:i","glk":"j xg Y\u060c \u0633\u0627\u0639\u062a H:i","gn":"H:i j M Y","gom-deva":"H:i, j F Y","gom-latn":"H:i, j F Y","gor":"j F Y H.i","got":"H:i, j F Y","grc":"H:i, j xg Y","gsw":"H:i, j. M Y","gu":"H:i, j F Y","gv":"H:i, j F Y","ha":"H:i, j F Y","hak":"H:i, j F Y","haw":"H:i, j F Y","he":"H:i, j xg Y","hif-latn":"H:i, j F Y","hi":"H:i, j F Y","hil":"H:i, j F Y","hr":"H:i, j. F Y.","hrx":"H:i, j. M Y","hsb":"j. xg Y, H:i","ht":"j F Y \xe0 H:i","hu-formal":"Y. F j., H:i","hu":"Y. F j., H:i","hy":"H:i, j xg Y","hyw":"H:i, j xg Y","ia":"H:i, j F Y","id":"j F Y H.i","ie":"H:i, j F Y","ig":"H:i, j F Y","ii":"Y\u5e74n\u6708j\u65e5 (D) H:i","ike-cans":"H:i, j F Y","ike-latn":"H:i, j F Y","ik":"H:i, j F Y","ilo":"H:i, j F Y","inh":"H:i, j xg Y","io":"H:i, j M. Y","is":"j. F Y \\"kl.\\" H:i","it":"H:i, j M Y","ja":"Y\u5e74n\u6708j\u65e5 (D) H:i","jam":"H:i, j F Y","jbo":"H:i, j F Y","jut":"j. M Y, H:i","jv":"j F Y H.i","kaa":"H:i, Y \\"j.\\" xg j","kab":"H:i, j F Y","ka":"H:i, j F Y","kbd-cyrl":"H:i, j F Y","kbp":"j F Y \xe0 H:i","kg":"H:i, j F Y","khw":"H:i\u060c j xg Y\u0621","ki":"H:i, j F Y","kiu":"H.i, j F Y","kjp":" H:i\\"\u104a\\" j F Y","kk-arab":"H:i\u060c Y \\"\u062c.\\" xg j","kk-cyrl":"H:i, Y \\"\u0436.\\" xg j","kk":"H:i, Y \\"\u0436.\\" xg j","kk-latn":"H:i, Y \\"j.\\" xg j","kl":"j. M Y, H:i","km":"\u1798\u17c4\u1784H:i l \u1791d F \u1786\u17d2\u1793\u17b6Y","kn":"H:i, j F Y","krc":"H:i, j xg Y","kri":"H:i, j F Y","krj":"H:i, j F Y","krl":"j. F\\"ta\\" Y \\"kello\\" H.i","ks-arab":"H:i, j F Y","ks-deva":"H:i, j F Y","ksh":"H:i, j. M Y","ks":"H:i, j F Y","ku-arab":"H:i\u060c j\u06cc xg Y","ku-latn":"H:i, j F Y","kum":"H:i, j xg Y","kv":"H:i, j xg Y","kw":"H:i, j F Y","ky":"H:i, j F Y","lad":"H:i j M Y","la":"H:i, j xg Y","lbe":"H:i, j xg Y","lb":"H:i, j. M Y","lez":"H:i, j xg Y","lfn":"H:i, j F Y","lg":"H:i, j F Y","lij":"H:i, j M Y","li":"j M Y H:i","liv":"j. F Y, \\"kell\\" H:i","lki":"j xg Y\u060c \u0633\u0627\u0639\u062a H:i","lmo":"H:i, j M Y","ln":"j F Y \xe0 H:i","lo":"H:i, j F Y","loz":"H:i, j F Y","lrc":"j xg Y\u060c \u0633\u0627\u0639\u062a H:i","ltg":"Y\\". gada\\" j. F\\", plkst.\\" H.i","lt":"H:i, j F Y","lus":"H:i, j F Y","luz":"j xg Y\u060c \u0633\u0627\u0639\u062a H:i","lv":"Y\\". gada\\" j. F\\", plkst.\\" H.i","lzh":"Y\u5e74n\u6708j\u65e5 \uff08D\uff09 H\u6642i\u5206","lzz":"H.i, j F Y","mai":"H:i, j F Y","map-bms":"j F Y H.i","mdf":"H:i, j xg Y","mg":"j F Y \xe0 H:i","mhr":"H:i, j xg Y","mi":"H:i, j F Y","min":"j F Y H.i","mk":"H:i, j F Y","ml":"H:i, j F Y","mni":"H:i, j F Y","mn":"H:i, j F Y","mnw":" H:i\\"\u104a\\" j F Y","mo":"j F Y H:i","mrj":"H:i, j xg Y","mr":"H:i, j F Y","ms":"H:i, j F Y","mt":"H:i, j F Y","mwl":"H\\\\hi\\\\m\\\\i\\\\n \\\\d\\\\e j \\\\d\\\\e F \\\\d\\\\e Y","my":" H:i\\"\u104a\\" j F Y","myv":"H:i, j xg Y","mzn":"j xg Y\u060c \u0633\u0627\u0639\u062a H:i","nah":"H:i j M Y","na":"H:i, j F Y","nan":"Y-\\"n\xee\\" n-\\"goe\u030dh\\" j-\\"ji\u030dt\\" (D) H:i","nap":"H:i, j M Y","nb":"j. M Y \\"kl.\\" H:i","nds":"H:i, j. M Y","nds-nl":"H:i, j M Y","ne":"H:i, j F Y","new":"H:i, j F Y","niu":"H:i, j F Y","nl-informal":"j M Y H:i","nl":"j M Y H:i","nn":"j. F Y \\"kl.\\" H:i","nov":"H:i, j F Y","nqo":"H:i, j F Y","nrm":"j F Y \xe0 H:i","nso":"H:i, j F Y","nv":"H:i, j F Y","ny":"H:i, j F Y","nys":"H:i, j F Y","oc":"j F \\"de\\" Y \\"a\\" H.i","olo":"j. F\\"ta\\" Y \\"kello\\" H.i","om":"H:i, j F Y","or":"H:i, j F Y","os":"H:i, j xg Y","pag":"H:i, j F Y","pa":"H:i, j F Y","pam":"H:i, j F Y","pap":"H:i, j F Y","pcd":"j F Y \xe0 H:i","pdc":"H:i, j. M Y","pdt":"H:i, j. M Y","pfl":"H:i, j. M Y","pih":"H:i, j F Y","pi":"H:i, j F Y","pl":"H:i, j M Y","pms":"H:i, j M Y","pnb":"H:i, j F Y","pnt":"H:i, j xg Y","prg":"H:i, j F Y","ps":"H:i, j F Y","pt-br":"H\\"h\\"i\\"min\\" \\"de\\" j \\"de\\" F \\"de\\" Y","pt":"H\\\\hi\\\\m\\\\i\\\\n \\\\d\\\\e j \\\\d\\\\e F \\\\d\\\\e Y","qqq":"H:i, j F Y","qug":"H:i j M Y","qu":"H:i j M Y","rgn":"H:i, j M Y","rif":"H:i, j F Y","rm":"H:i, j F Y","rmy":"j F Y H:i","roa-tara":"H:i, j M Y","ro":"j F Y H:i","rue":"H:i, j xg Y","ru":"H:i, j xg Y","rup":"j F Y H:i","ruq-cyrl":"H:i, j F Y","ruq-latn":"j F Y H:i","rw":"H:i, j F Y","sah":"H:i, j xg Y","sa":"H:i, j F Y","sat":"H:i, j F Y","sc":"H:i, j M Y","scn":"H:i, j M Y","sco":"H:i, j F Y","sdc":"H:i, j F Y","sdh":"j xg Y\u060c \u0633\u0627\u0639\u062a H:i","sd":"H:i, j F Y","sei":"H:i, j F Y","se":"xg j \\"b.\\" Y \\"dii.\\" G.i","ses":"j F Y \xe0 H:i","sg":"j F Y \xe0 H:i","sgs":"H:i, j F Y","shi":"H:i, j F Y","sh":"H:i, j F Y","shn":"H:i, j F Y","shy-latn":"H:i, j F Y","si":"H:i, j F Y","sk":"H:i, j. F Y","skr-arab":"H:i\u060c j xg Y\u0621","sli":"H:i, j. M Y","sl":"H:i, j. F Y","sma":"H:i, j F Y","sm":"H:i, j F Y","sn":"H:i, j F Y","so":"H:i, j F Y","sq":"j F Y H:i","sr-ec":"H:i, j. F Y.","sr-el":"H:i, j. F Y.","srn":"j M Y H:i","ss":"H:i, j F Y","st":"H:i, j F Y","stq":"H:i, j. M Y","sty":"H:i, j xg Y","su":"j F Y H.i","sv":"j F Y \\"kl.\\" H.i","sw":"H:i, j F Y","szl":"H:i, j M Y","ta":"H:i, j F Y","tay":"H:i, j F Y","tcy":"H:i, j F Y","te":"H:i, j F Y","tet":"H\\\\hi\\\\m\\\\i\\\\n \\\\d\\\\e j \\\\d\\\\e F \\\\d\\\\e Y","tg-cyrl":"H:i, j xg Y","tg-latn":"H:i, j F Y","th":"H:i, j F xkY","ti":"H:i, j F Y","tk":"H:i, j F Y","tl":"H:i, j F Y","tly":"H:i, j F Y","tn":"H:i, j F Y","to":"H:i, j F Y","tpi":"H:i, j F Y","tr":"H.i, j F Y","tru":"H:i, j F Y","trv":"H:i, j F Y","ts":"H:i, j F Y","tt-cyrl":"j M Y, H:i","tt-latn":"j M Y, H:i","tw":"H:i, j F Y","ty":"j F Y \xe0 H:i","tyv":"H:i, j xg Y","tzm":"H:i, j F Y","udm":"H:i, j xg Y","ug-arab":"H:i, j F Y","ug-latn":"H:i, j F Y","uk":"H:i, j xg Y","ur":"H:i\u060c j xg Y\u0621","uz":"H:i, j-F Y","vec":"H:i, j M Y","ve":"H:i, j F Y","vep":"j. F Y, \\"kell\\" H:i","vi":"H:i, \\"ng\xe0y\\" j \\"th\xe1ng\\" n \\"n\u0103m\\" Y","vls":"j M Y H:i","vmf":"H:i, j. M Y","vo":"H:i, Y F j\\"id\\"","vot":"j. F\\"ta\\" Y \\"kello\\" H.i","vro":"j. F Y, \\"kell\\" H:i","wa":"j F Y \xe0 H:i","war":"H:i, j F Y","wo":"j F Y \xe0 H:i","wuu":"Y\u5e74n\u6708j\u53f7 (D) H:i","xal":"H:i, j xg Y","xh":"H:i, j F Y","xmf":"H:i, j F Y","xsy":"H:i, j F Y","yi":"H:i, j xg Y","yo":"H:i, j F Y","yue":"Y\u5e74n\u6708j\u865f (D) H:i","za":"Y\u5e74n\u6708j\u65e5 (D) H:i","zea":"j M Y H:i","zgh":"H:i, j F Y","zh-hans":"Y\u5e74n\u6708j\u65e5 (D) H:i","zh-hant":"Y\u5e74n\u6708j\u65e5 (D) H:i","zh-hk":"Y\u5e74n\u6708j\u65e5 (D) H:i","zh":"Y\u5e74n\u6708j\u65e5 (D) H:i","zh-sg":"Y\u5e74n\u6708j\u65e5 (D) H:i","zh-tw":"Y\u5e74n\u6708j\u65e5 (D) H:i","zu":"H:i, j F Y"}')},function(e){e.exports=JSON.parse('{"ab":["ru"],"abs":["id"],"ace":["id"],"ady":["ady-cyrl"],"aeb":["aeb-arab"],"aeb-arab":["ar"],"aln":["sq"],"alt":["ru"],"ami":["zh-hant"],"an":["es"],"anp":["hi"],"arn":["es"],"arq":["ar"],"ary":["ar"],"arz":["ar"],"ast":["es"],"atj":["fr"],"av":["ru"],"avk":["fr","es","ru"],"awa":["hi"],"ay":["es"],"azb":["fa"],"ba":["ru"],"ban":["id"],"ban-bali":["ban"],"bar":["de"],"bbc":["bbc-latn"],"bbc-latn":["id"],"bcc":["fa"],"be-tarask":["be"],"bgn":["fa"],"bh":["bho"],"bi":["en"],"bjn":["id"],"bm":["fr"],"bpy":["bn"],"bqi":["fa"],"br":["fr"],"btm":["id"],"bug":["id"],"bxr":["ru"],"ca":["oc"],"cbk-zam":["es"],"cdo":["nan","zh-hant"],"ce":["ru"],"co":["it"],"crh":["crh-latn"],"crh-cyrl":["ru"],"cs":["sk"],"csb":["pl"],"cv":["ru"],"de-at":["de"],"de-ch":["de"],"de-formal":["de"],"dsb":["hsb","de"],"dtp":["ms"],"dty":["ne"],"egl":["it"],"eml":["it"],"en-ca":["en"],"en-gb":["en"],"es-formal":["es"],"ext":["es"],"ff":["fr"],"fit":["fi"],"frc":["fr"],"frp":["fr"],"frr":["de"],"fur":["it"],"gag":["tr"],"gan":["gan-hant","zh-hant","zh-hans"],"gan-hans":["zh-hans"],"gan-hant":["zh-hant","zh-hans"],"gcr":["fr"],"gl":["pt"],"glk":["fa"],"gn":["es"],"gom":["gom-deva"],"gom-deva":["hi"],"gor":["id"],"gsw":["de"],"guc":["es"],"hak":["zh-hant"],"hif":["hif-latn"],"hrx":["de"],"hsb":["dsb","de"],"ht":["fr"],"hu-formal":["hu"],"hyw":["hy"],"ii":["zh-cn","zh-hans"],"inh":["ru"],"io":["eo"],"iu":["ike-cans"],"jam":["en"],"jut":["da"],"jv":["id"],"kaa":["kk-latn","kk-cyrl"],"kab":["fr"],"kbd":["kbd-cyrl"],"kbp":["fr"],"khw":["ur"],"kiu":["tr"],"kjp":["my"],"kk":["kk-cyrl"],"kk-arab":["kk-cyrl"],"kk-cn":["kk-arab","kk-cyrl"],"kk-kz":["kk-cyrl"],"kk-latn":["kk-cyrl"],"kk-tr":["kk-latn","kk-cyrl"],"kl":["da"],"ko-kp":["ko"],"koi":["ru"],"krc":["ru"],"krl":["fi"],"ks":["ks-arab"],"ksh":["de"],"ku":["ku-latn"],"ku-arab":["ckb"],"kum":["ru"],"kv":["ru"],"lad":["es"],"lb":["de"],"lbe":["ru"],"lez":["ru","az"],"li":["nl"],"lij":["it"],"liv":["et"],"lki":["fa"],"lld":["it","rm","fur"],"lmo":["pms","eml","lij","vec","it"],"ln":["fr"],"lrc":["fa"],"ltg":["lv"],"luz":["fa"],"lzh":["zh-hant"],"lzz":["tr"],"mad":["id"],"mai":["hi"],"map-bms":["jv","id"],"mdf":["myv","ru"],"mg":["fr"],"mhr":["mrj","ru"],"min":["id"],"mnw":["my"],"mo":["ro"],"mrj":["mhr","ru"],"mwl":["pt"],"myv":["mdf","ru"],"mzn":["fa"],"nah":["es"],"nan":["cdo","zh-hant"],"nap":["it"],"nb":["nn"],"nds":["de"],"nds-nl":["nl"],"nia":["id"],"nl-informal":["nl"],"nn":["nb"],"nrm":["fr"],"oc":["ca","fr"],"olo":["fi"],"os":["ru"],"pcd":["fr"],"pdc":["de"],"pdt":["de"],"pfl":["de"],"pih":["en"],"pms":["it"],"pnt":["el"],"pt":["pt-br"],"pt-br":["pt"],"qu":["qug","es"],"qug":["qu","es"],"rgn":["it"],"rmy":["ro"],"roa-tara":["it"],"rue":["uk","ru"],"rup":["ro"],"ruq":["ruq-latn","ro"],"ruq-cyrl":["mk"],"ruq-latn":["ro"],"sa":["hi"],"sah":["ru"],"scn":["it"],"sco":["en"],"sdc":["it"],"sdh":["cbk","fa"],"ses":["fr"],"sg":["fr"],"sgs":["lt"],"sh":["bs","sr-el","hr"],"shi":["fr"],"shy":["shy-latn"],"shy-latn":["fr","arq"],"sk":["cs"],"skr":["skr-arab"],"skr-arab":["ur","pnb"],"sli":["de"],"smn":["fi"],"sr":["sr-ec"],"srn":["nl"],"stq":["de"],"sty":["ru"],"su":["id"],"szl":["pl"],"szy":["zh-tw","zh-hant","zh-hans"],"tay":["zh-tw","zh-hant","zh-hans"],"tcy":["kn"],"tet":["pt"],"tg":["tg-cyrl"],"trv":["zh-tw","zh-hant","zh-hans"],"tt":["tt-cyrl","ru"],"tt-cyrl":["ru"],"ty":["fr"],"tyv":["ru"],"udm":["ru"],"ug":["ug-arab"],"vec":["it"],"vep":["et"],"vls":["nl"],"vmf":["de"],"vot":["fi"],"vro":["et"],"wa":["fr"],"wo":["fr"],"wuu":["zh-hans"],"xal":["ru"],"xmf":["ka"],"yi":["he"],"za":["zh-hans"],"zea":["nl"],"zgh":["kab"],"zh":["zh-hans"],"zh-cn":["zh-hans"],"zh-hant":["zh-hans"],"zh-hk":["zh-hant","zh-hans"],"zh-mo":["zh-hk","zh-hant","zh-hans"],"zh-my":["zh-sg","zh-hans"],"zh-sg":["zh-hans"],"zh-tw":["zh-hant","zh-hans"]}')},function(e,t,i){"use strict";i.d(t,"b",(function(){return F}));i.d(t,"a",(function(){return R}));var n=i(4),o=i.n(n),s=i(5),a=i(0),r=i(2),c=i(23),l=i(8),d=i(3),u=i(16),m=i(1),h=i(14);let g,f,p,b,v,y,w,x,C;function k(){return T.apply(this,arguments)}function T(){return(T=o()((function*(){c.a.globals();yield d.a.init();const e=[];if(!d.a.get("useTopicSubscription")){u.a.load(!0).catch(e=>{console.warn("Couldn't load the settings from the server.",e)});e.push(u.a.getLoadRequest())}e.push(...c.a.getSiteData());try{yield Promise.all(e)}catch(e){throw["Couldn't load the messages required for the script.",e]}mw.loader.addStyleTag(`:root {\n --cd-parentheses-start: '${a.a.mws("parentheses-start")}';\n --cd-parentheses-end: '${a.a.mws("parentheses-end")}';\n }`);g=a.a.mws("colon-separator",{language:"content"}).trim();[f]=a.a.s("es-move-from").match(/^[^[$]+/)||[];[p]=a.a.s("es-move-to").match(/^[^[$]+/)||[];b=v=a.a.s("lp-comment-tooltip")+" ";b+=a.a.mws("parentheses",a.a.s("lp-comment-toyou"));v+=a.a.mws("parentheses",a.a.s("lp-comment-watchedsection"));const t=$("<a>").text(a.a.s("lp-comment")).attr("title",a.a.s("lp-comment-tooltip")),i=$("<span>").addClass("cd-commentLink-innerWrapper").append(t),n=$("<span>").addClass("cd-commentLink").append(i).prepend(" ");w=n.get(0);x=n.clone().addClass("cd-commentLink-relevant").get(0);const o=Object(m.o)(a.a.g.userName);y=new RegExp(`(?:^|[^${a.a.g.letterPattern}])${o}(?![${a.a.g.letterPattern}])`)}))).apply(this,arguments)}function S(){mw.hook("wikipage.content").add(()=>{if(C)C.setFlags({progressive:!1})});const e=$("<div>").addClass("cd-watchlistMenu");$("<a>").attr("href",mw.util.getUrl(a.a.config.scriptPageWikilink)).attr("target","_blank").addClass("cd-watchlistMenu-scriptPageLink").text(a.a.s("script-name-short")).appendTo(e);if(!d.a.get("useTopicSubscription")){C=new OO.ui.ButtonWidget({framed:!1,icon:"speechBubble",label:a.a.s("wl-button-switchrelevant-tooltip",mw.user),invisibleLabel:!0,title:a.a.s("wl-button-switchrelevant-tooltip",mw.user),classes:["cd-watchlistMenu-button","cd-watchlistMenu-button-switchRelevant"],disabled:!u.a.areLoaded()});C.on("click",()=>{!function(){const e=!$(".mw-changeslist").find("ul.special").length,t=r.a.$content.find(".mw-changeslist .mw-collapsible:not(.mw-changeslist-legend)"),i=r.a.$content.find(".mw-changeslist-line:not(.mw-collapsible)");if(C.hasFlag("progressive")){if(e)i.filter("table").show();else i.not(":has(.cd-commentLink-relevant)").show();t.not(":has(.cd-commentLink-relevant)").find(".mw-rcfilters-ui-highlights-enhanced-toplevel").show();t.not(".mw-collapsed").find(".mw-enhancedchanges-arrow").click()}else{t.not(".mw-collapsed").find(".mw-enhancedchanges-arrow").click();t.has(".cd-commentLink-relevant").find(".mw-enhancedchanges-arrow").click();t.not(":has(.cd-commentLink-relevant)").find(".mw-rcfilters-ui-highlights-enhanced-toplevel").hide();i.not(":has(.cd-commentLink-relevant)").hide()}C.setFlags({progressive:!C.hasFlag("progressive")})}()});C.$element.appendTo(e)}const t={framed:!1,icon:"listBullet",label:a.a.s("wl-button-editwatchedsections-tooltip",mw.user),invisibleLabel:!0,title:a.a.s("wl-button-editwatchedsections-tooltip",mw.user),classes:["cd-watchlistMenu-button","cd-watchlistMenu-button-editSubscriptions"]};if(d.a.get("useTopicSubscription")){t.href=l.b.get("Special:TopicSubscriptions").getUrl();t.target="_blank"}const i=new OO.ui.ButtonWidget(t);if(!d.a.get("useTopicSubscription"))i.on("click",()=>{r.a.showEditSubscriptionsDialog()});i.$element.appendTo(e);const n=new OO.ui.ButtonWidget({framed:!1,icon:"settings",label:a.a.s("wl-button-settings-tooltip"),invisibleLabel:!0,title:a.a.s("wl-button-settings-tooltip"),classes:["cd-watchlistMenu-button","cd-watchlistMenu-button-scriptSettings"]});n.on("click",()=>{Object(h.f)();r.a.showSettingsDialog()});n.$element.appendTo(e);r.a.$content.find(".mw-rcfilters-ui-changesLimitAndDateButtonWidget").prepend(e);r.a.$content.find("#mw-watchlist-options .mw-changeslist-legend").after(e)}function E(e){var t;return"www.wikidata.org"===mw.config.get("wgServerName")&&(null===(t=e.firstElementChild)||void 0===t?void 0:t.classList.contains("wb-itemlink"))}function O(e){const t=e.querySelector(".mw-userlink");if(!t)return null;let i=t.textContent;if("MediaWiki message delivery"===i)return null;if(mw.util.isIPv6Address(i))i=i.toUpperCase();return i}function N(e){return f&&e.includes(": "+f)||p&&e.includes(": "+p)}function P(e){return e.includes("Archiving")}function L(e,t){if(!t)return!1;else return"ltr"===a.a.g.contentTextDirection?e.includes(`\u2192${t}${g}`)||e.endsWith("\u2192"+t):e.includes(`\u2190${t}${g}`)||e.endsWith("\u2190"+t)}function j(e){if("Watchlist"===mw.config.get("wgCanonicalSpecialPageName")&&!r.a.$content.find(".cd-watchlistMenu").length){if(mw.user.options.get("wlenhancedfilters-disable"))S();else mw.hook("structuredChangeFilters.ui.initialized").add(()=>{S()});if(!d.a.get("useTopicSubscription"))$(".mw-rcfilters-ui-filterWrapperWidget-showNewChanges a").on("click",o()((function*(){try{yield u.a.load()}catch(e){console.warn("Couldn't load the settings from the server.",e)}})))}e.get(0).querySelectorAll(".mw-changeslist-line:not(.mw-collapsible)").forEach(e=>{var t,i;const n=e.className.match(/mw-changeslist-ns(\d+)/),o=n&&Number(n[1]);if(null===o)return;const s=("TR"===e.tagName?e.parentNode:e).querySelector(".mw-changeslist-title");if(!s||E(s))return;const r=s.textContent;if(!Object(m.H)(r,o))return;if(e.querySelector(".minoredit"))return;let c=null===(t=e.querySelector(".comment"))||void 0===t?void 0:t.textContent;c&&(c=Object(m.M)(c));if(c&&(Object(m.C)(c)||Object(m.I)(c)||N(c)))return;const l=e.querySelector(".mw-plusminus-pos");if(!l)return;if("STRONG"!==l.tagName){const e=l.textContent.match(/\d+/),t=e&&Number(e[0]);if(!t||t<a.a.config.bytesToDeemComment)return}const d=null===(i=e.getAttribute("data-mw-ts"))||void 0===i?void 0:i.slice(0,12);if(!d)return;const h=O(e);if(!h)return;const g=d+"_"+Object(m.T)(h),f=s.href;if(!f)return;let p;if(c&&y.test(` ${c} `)){p=x.cloneNode(!0);p.lastChild.lastChild.title=b}else{let t=!1;if(c){var C;const i=e.querySelector(".mw-changeslist-diff-cur")||e.querySelector(".mw-changeslist-history"),n=null==i?void 0:null===(C=i.href)||void 0===C?void 0:C.match(/[&?]curid=(\d+)/),o=n&&Number(n[1]);if(o){const e=u.a.getForPageId(o)||[];if(e.length){t=e.find(e=>L(c,e));if(t){p=x.cloneNode(!0);p.lastChild.lastChild.title=v}}}}if(!t)p=w.cloneNode(!0)}p.lastChild.lastChild.href=`${f}#${g}`;const k=e.querySelector(".comment")||e.querySelector(".mw-usertoollinks");if(k)k.parentNode.insertBefore(p,k.nextSibling)})}function D(e){c.a.timestampParsingTools("user");if(null!==a.a.g.uiTimezone)[...e.get(0).querySelectorAll(".mw-contributions-list > li:not(.mw-tag-mw-new-redirect)")].forEach(e=>{var t;const i=e.querySelector(".mw-contributions-title");if(!i||E(i))return;const n=i.textContent;if(!l.b.get(n).isProbablyTalkPage())return;const o=i.href;if(!o)return;if(e.querySelector(".minoredit"))return;let r=null===(t=e.querySelector(".comment"))||void 0===t?void 0:t.textContent;r&&(r=Object(m.M)(r));if(r&&(Object(m.C)(r)||Object(m.I)(r)||N(r)))return;const c=e.querySelector(".mw-plusminus-pos");if(!c)return;if("STRONG"!==c.tagName){const e=c.textContent.match(/\d+/),t=e&&Number(e[0]);if(!t||t<a.a.config.bytesToDeemComment)return}const d=e.querySelector(".mw-changeslist-date");if(!d)return;const{date:u}=Object(h.g)(d.textContent,a.a.g.uiTimezone)||{};if(!u)return;const g=s.a.generateId(u,mw.config.get("wgRelevantUserName"));let f;if(r&&y.test(` ${r} `)){f=x.cloneNode(!0);f.lastChild.lastChild.title=b}else f=w.cloneNode(!0);f.lastChild.lastChild.href=`${o}#${g}`;let p=e.querySelector(".comment");if(!p){p=i;p.nextSibling.textContent=p.nextSibling.textContent.replace(/^\s/,"")}p.parentNode.insertBefore(f,p.nextSibling)})}function I(e){c.a.timestampParsingTools("user");if(null===a.a.g.uiTimezone)return;const t=l.b.getCurrent().getUrl();[...e.get(0).querySelectorAll("#pagehistory > li, #pagehistory > .mw-contributions-list > li:not(.mw-tag-mw-new-redirect)")].forEach(e=>{var i;if(e.querySelector(".minoredit"))return;let n=null===(i=e.querySelector(".comment"))||void 0===i?void 0:i.textContent;n&&(n=Object(m.M)(n));if(n&&(Object(m.C)(n)||Object(m.I)(n)||N(n)))return;const o=e.querySelector(".mw-plusminus-pos");if(!o)return;if("STRONG"!==o.tagName){const e=o.textContent.match(/\d+/),t=e&&Number(e[0]);if(!t||t<a.a.config.bytesToDeemComment)return}const r=e.querySelector(".mw-changeslist-date");if(!r)return;const{date:c}=Object(h.g)(r.textContent,a.a.g.uiTimezone)||{};if(!c)return;const l=O(e);if(!l)return;const d=s.a.generateId(c,l);let g;if(n&&y.test(` ${n} `)){g=x.cloneNode(!0);g.lastChild.lastChild.title=b}else{let e=!1;if(n){const t=u.a.getForCurrentPage()||[];if(t.length){e=t.find(e=>L(n,e));if(e){g=x.cloneNode(!0);g.lastChild.lastChild.title=v}}}if(!e)g=w.cloneNode(!0)}g.lastChild.lastChild.href=`${t}#${d}`;let f=e.querySelector(".comment");if(!f){const t=e.querySelectorAll(".mw-changeslist-separator");f=null==t?void 0:t[t.length-1]}if(f)f.parentNode.insertBefore(g,f.nextSibling)})}function A(e){return M.apply(this,arguments)}function M(){return(M=o()((function*(e){if(r.a.isTalkPage()&&null!=e&&e.parent().is(r.a.$content))return;if(!a.a.g.uiTimestampRegexp)c.a.timestampParsingTools("user");if(null===a.a.g.uiTimezone)return;const t=e||r.a.$content,i=t.get(0);[i.querySelector(".diff-otitle"),i.querySelector(".diff-ntitle")].filter(m.j).forEach(t=>{var i,n;if(t.querySelector(".minoredit"))return;null===(i=t.querySelector(".cd-commentLink"))||void 0===i||i.remove();let o=null===(n=t.querySelector(".comment"))||void 0===n?void 0:n.textContent;o&&(o=Object(m.M)(o));if(o&&(Object(m.C)(o)||Object(m.I)(o)||N(o)||P(o)))return;const c=t.querySelector("#mw-diff-otitle1 a, #mw-diff-ntitle1 a");if(!c)return;const{date:d}=Object(h.g)(c.textContent,a.a.g.uiTimezone)||{};if(!d)return;const g=O(t);if(!g)return;const f=s.a.generateId(d,g);let p,C;if(e)C=l.b.get(new mw.Uri(c.href).query.title);else p=s.a.getById(f,!0);if(p||e&&C.isProbablyTalkPage()){let i;if(o&&y.test(` ${o} `)){i=x.cloneNode(!0);i.lastChild.lastChild.title=b}else{let t=!1;const n=u.a.getForCurrentPage()||[];if(!e&&o&&n.length){t=n.find(e=>L(o,e));if(t){i=x.cloneNode(!0);i.lastChild.lastChild.title=v}}if(!t)i=w.cloneNode(!0)}const n=i.lastChild.lastChild;if(e){n.href=C.getUrl()+"#"+f;if(r.a.isTalkPage())n.target="_blank"}else{n.href="#"+f;n.onclick=e=>{e.preventDefault();p.scrollTo({smooth:!1,pushState:!0})}}const s=t.querySelector("#mw-diff-otitle3, #mw-diff-ntitle3");if(!s)return;s.appendChild(i)}});mw.hook("convenientDiscussions.commentLinksAdded").fire(t,a.a)}))).apply(this,arguments)}function _(e){return B.apply(this,arguments)}function B(){return(B=o()((function*(e){if(e.parent().length){if(r.a.isWatchlistPage())j(e);else if(r.a.isContributionsPage())D(e);else if(r.a.isHistoryPage())I(e);mw.hook("convenientDiscussions.commentLinksAdded").fire(e,a.a)}}))).apply(this,arguments)}function F(){return H.apply(this,arguments)}function H(){return(H=o()((function*(){try{yield k()}catch(e){console.warn(...e);return}if(r.a.isDiffPage())mw.hook("convenientDiscussions.pageReady").add(()=>{A()});else mw.hook("wikipage.content").add(_);mw.hook("wikipage.diff").add(A)}))).apply(this,arguments)}function R(){if("Search"!==mw.config.get("wgCanonicalSpecialPageName"))return;const[,e]=location.search.match(/[?&]cdcomment=([^&]+)(?:&|$)/)||[];if(e)mw.loader.using("mediawiki.api").then(o()((function*(){yield Promise.all(c.a.getSiteData());$(".mw-search-result-heading").each((t,i)=>{const n=$(i).find("a").first().attr("href");$(i).append(" ",$("<span>").addClass("cd-searchCommentLink").append(document.createTextNode(a.a.mws("parentheses-start")),$("<a>").attr("href",`${n}#${e}`).text(a.a.s("deadanchor-search-gotocomment")),document.createTextNode(a.a.mws("parentheses-end"))))})})),console.error)}},function(e){e.exports=JSON.parse('{"aeb-arab":"\u0660\u0661\u0662\u0663\u0664\u0665\u0666\u0667\u0668\u0669","anp":"\u0966\u0967\u0968\u0969\u096a\u096b\u096c\u096d\u096e\u096f","ar":"\u0660\u0661\u0662\u0663\u0664\u0665\u0666\u0667\u0668\u0669","as":"\u09e6\u09e7\u09e8\u09e9\u09ea\u09eb\u09ec\u09ed\u09ee\u09ef","azb":"\u06f0\u06f1\u06f2\u06f3\u06f4\u06f5\u06f6\u06f7\u06f8\u06f9","bcc":"\u06f0\u06f1\u06f2\u06f3\u06f4\u06f5\u06f6\u06f7\u06f8\u06f9","bgn":"\u06f0\u06f1\u06f2\u06f3\u06f4\u06f5\u06f6\u06f7\u06f8\u06f9","bho":"\u0966\u0967\u0968\u0969\u096a\u096b\u096c\u096d\u096e\u096f","bn":"\u09e6\u09e7\u09e8\u09e9\u09ea\u09eb\u09ec\u09ed\u09ee\u09ef","bo":"\u0f20\u0f21\u0f22\u0f23\u0f24\u0f25\u0f26\u0f27\u0f28\u0f29","bpy":"\u09e6\u09e7\u09e8\u09e9\u09ea\u09eb\u09ec\u09ed\u09ee\u09ef","bqi":"\u06f0\u06f1\u06f2\u06f3\u06f4\u06f5\u06f6\u06f7\u06f8\u06f9","ckb":"\u0660\u0661\u0662\u0663\u0664\u0665\u0666\u0667\u0668\u0669","dty":"\u0966\u0967\u0968\u0969\u096a\u096b\u096c\u096d\u096e\u096f","dz":"\u0f20\u0f21\u0f22\u0f23\u0f24\u0f25\u0f26\u0f27\u0f28\u0f29","fa":"\u06f0\u06f1\u06f2\u06f3\u06f4\u06f5\u06f6\u06f7\u06f8\u06f9","glk":"\u06f0\u06f1\u06f2\u06f3\u06f4\u06f5\u06f6\u06f7\u06f8\u06f9","gom-deva":"\u0966\u0967\u0968\u0969\u096a\u096b\u096c\u096d\u096e\u096f","gu":"\u0ae6\u0ae7\u0ae8\u0ae9\u0aea\u0aeb\u0aec\u0aed\u0aee\u0aef","hi":"\u0966\u0967\u0968\u0969\u096a\u096b\u096c\u096d\u096e\u096f","kjp":"\u1040\u1041\u1042\u1043\u1044\u1045\u1046\u1047\u1048\u1049","kk-arab":"\u06f0\u06f1\u06f2\u06f3\u06f4\u06f5\u06f6\u06f7\u06f8\u06f9","km":"\u17e0\u17e1\u17e2\u17e3\u17e4\u17e5\u17e6\u17e7\u17e8\u17e9","kn":"\u0ce6\u0ce7\u0ce8\u0ce9\u0cea\u0ceb\u0cec\u0ced\u0cee\u0cef","ks-arab":"\u0660\u0661\u0662\u0663\u0664\u0665\u0666\u0667\u0668\u0669","ks-deva":"\u0966\u0967\u0968\u0969\u096a\u096b\u096c\u096d\u096e\u096f","ks":"\u0660\u0661\u0662\u0663\u0664\u0665\u0666\u0667\u0668\u0669","ku-arab":"\u0660\u0661\u0662\u0663\u0664\u0665\u0666\u0667\u0668\u0669","lki":"\u06f0\u06f1\u06f2\u06f3\u06f4\u06f5\u06f6\u06f7\u06f8\u06f9","lo":"\u0ed0\u0ed1\u0ed2\u0ed3\u0ed4\u0ed5\u0ed6\u0ed7\u0ed8\u0ed9","lrc":"\u06f0\u06f1\u06f2\u06f3\u06f4\u06f5\u06f6\u06f7\u06f8\u06f9","luz":"\u06f0\u06f1\u06f2\u06f3\u06f4\u06f5\u06f6\u06f7\u06f8\u06f9","lzh":"\u3007\u4e00\u4e8c\u4e09\u56db\u4e94\u516d\u4e03\u516b\u4e5d","mai":"\u0966\u0967\u0968\u0969\u096a\u096b\u096c\u096d\u096e\u096f","mnw":"\u1040\u1041\u1042\u1043\u1044\u1045\u1046\u1047\u1048\u1049","mr":"\u0966\u0967\u0968\u0969\u096a\u096b\u096c\u096d\u096e\u096f","my":"\u1040\u1041\u1042\u1043\u1044\u1045\u1046\u1047\u1048\u1049","mzn":"\u06f0\u06f1\u06f2\u06f3\u06f4\u06f5\u06f6\u06f7\u06f8\u06f9","ne":"\u0966\u0967\u0968\u0969\u096a\u096b\u096c\u096d\u096e\u096f","new":"\u0966\u0967\u0968\u0969\u096a\u096b\u096c\u096d\u096e\u096f","nqo":"\u07c0\u07c1\u07c2\u07c3\u07c4\u07c5\u07c6\u07c7\u07c8\u07c9","or":"\u0b66\u0b67\u0b68\u0b69\u0b6a\u0b6b\u0b6c\u0b6d\u0b6e\u0b6f","pi":"\u0966\u0967\u0968\u0969\u096a\u096b\u096c\u096d\u096e\u096f","ps":"\u06f0\u06f1\u06f2\u06f3\u06f4\u06f5\u06f6\u06f7\u06f8\u06f9","sa":"\u0966\u0967\u0968\u0969\u096a\u096b\u096c\u096d\u096e\u096f","sat":"\u1c50\u1c51\u1c52\u1c53\u1c54\u1c55\u1c56\u1c57\u1c58\u1c59","sdh":"\u06f0\u06f1\u06f2\u06f3\u06f4\u06f5\u06f6\u06f7\u06f8\u06f9","skr-arab":"\u0660\u0661\u0662\u0663\u0664\u0665\u0666\u0667\u0668\u0669","tcy":"\u0ce6\u0ce7\u0ce8\u0ce9\u0cea\u0ceb\u0cec\u0ced\u0cee\u0cef"}')},function(e){e.exports=JSON.parse('["az","bn","de","diq","el","en","es","fa","fi","fr","he","hi","ia","it","ja","ko","lb","mk","nl","pl","pms","pt-br","ru","sh","sk","sl","sv","te","th","tr","uk","vi","zh-hans","zh-hant"]')},function(e){e.exports=JSON.parse('{"commons.wikimedia.org":"https://commons.wikimedia.org/w/index.php?title=User:Jack_who_built_the_house/convenientDiscussions-commonsConfig.js&action=raw&ctype=text/javascript","en.wikipedia.org":"https://en.wikipedia.org/w/index.php?title=User:Jack_who_built_the_house/convenientDiscussions.js&action=raw&ctype=text/javascript","fr.wikipedia.org":"https://fr.wikipedia.org/w/index.php?title=User:Jack_who_built_the_house/convenientDiscussions.js&action=raw&ctype=text/javascript","he.wikipedia.org":"https://he.wikipedia.org/w/index.php?title=%D7%9E%D7%93%D7%99%D7%94_%D7%95%D7%99%D7%A7%D7%99:CD-config.js&action=raw&ctype=text/javascript","meta.wikimedia.org":"https://meta.wikimedia.org/w/index.php?title=User:Jack_who_built_the_house/convenientDiscussions.js&action=raw&ctype=text/javascript","ru.wikipedia.org":"https://ru.wikipedia.org/w/load.php?modules=ext.gadget.convenientDiscussions&only=scripts","ru.wikipedia.org-test":"https://ru.wikipedia.org/w/index.php?title=%D0%A3%D1%87%D0%B0%D1%81%D1%82%D0%BD%D0%B8%D0%BA:Jack_who_built_the_house/convenientDiscussions.test.js&action=raw&ctype=text/javascript"}')},function(e,t,i){var n=i(24),o=i(58);if("string"==typeof(o=o.__esModule?o.default:o))o=[[e.i,o,""]];var s={insert:"head",singleton:!1};n(o,s);e.exports=o.locals||{}},function(e,t,i){"use strict";e.exports=function(e,t){var n=i(54),o="",s="",a="";o=e.toString();var r=n("HTML_ENTITIES",t);if(!1===r)return!1;delete r["&"];r["&"]="&";for(a in r){s=r[a];o=o.split(s).join(a)}return o=o.split("'").join("'")}},function(e,t,i){e.exports=function(){"use strict";var e={year:0,month:1,day:2,hour:3,minute:4,second:5},t={};return function(i,n,o){var s,a=function(e,i,n){void 0===n&&(n={});var o=new Date(e);return function(e,i){void 0===i&&(i={});var n=i.timeZoneName||"short",o=e+"|"+n,s=t[o];return s||(s=new Intl.DateTimeFormat("en-US",{hour12:!1,timeZone:e,year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit",timeZoneName:n}),t[o]=s),s}(i,n).formatToParts(o)},r=function(t,i){for(var n=a(t,i),s=[],r=0;r<n.length;r+=1){var c=n[r],l=c.type,d=c.value,u=e[l];u>=0&&(s[u]=parseInt(d,10))}var m=s[3],h=24===m?0:m,g=s[0]+"-"+s[1]+"-"+s[2]+" "+h+":"+s[4]+":"+s[5]+":000",f=+t;return(o.utc(g).valueOf()-(f-=f%1e3))/6e4},c=n.prototype;c.tz=function(e,t){void 0===e&&(e=s);var i=this.utcOffset(),n=this.toDate(),a=n.toLocaleString("en-US",{timeZone:e}),r=Math.round((n-new Date(a))/1e3/60),c=o(a).$set("millisecond",this.$ms).utcOffset(15*-Math.round(n.getTimezoneOffset()/15)-r,!0);if(t){var l=c.utcOffset();c=c.add(i-l,"minute")}return c.$x.$timezone=e,c},c.offsetName=function(e){var t=this.$x.$timezone||o.tz.guess(),i=a(this.valueOf(),t,{timeZoneName:e}).find((function(e){return"timezonename"===e.type.toLowerCase()}));return i&&i.value};var l=c.startOf;c.startOf=function(e,t){if(!this.$x||!this.$x.$timezone)return l.call(this,e,t);var i=o(this.format("YYYY-MM-DD HH:mm:ss:SSS"));return l.call(i,e,t).tz(this.$x.$timezone,!0)},o.tz=function(e,t,i){var n=i&&t,a=i||t||s,c=r(+o(),a);if("string"!=typeof e)return o(e).tz(a);var l=function(e,t,i){var n=e-60*t*1e3,o=r(n,i);if(t===o)return[n,t];var s=r(n-=60*(o-t)*1e3,i);return o===s?[n,o]:[e-60*Math.min(o,s)*1e3,Math.max(o,s)]}(o.utc(e,n).valueOf(),c,a),d=l[0],u=l[1],m=o(d).utcOffset(u);return m.$x.$timezone=a,m},o.tz.guess=function(){return Intl.DateTimeFormat().resolvedOptions().timeZone},o.tz.setDefault=function(e){s=e}}}()},function(e,t,i){e.exports=function(){"use strict";var e="minute",t=/[+-]\d\d(?::?\d\d)?/g,i=/([+-]|\d\d)/g;return function(n,o,s){var a=o.prototype;s.utc=function(e){var t={date:e,utc:!0,args:arguments};return new o(t)},a.utc=function(t){var i=s(this.toDate(),{locale:this.$L,utc:!0});return t?i.add(this.utcOffset(),e):i},a.local=function(){return s(this.toDate(),{locale:this.$L,utc:!1})};var r=a.parse;a.parse=function(e){e.utc&&(this.$u=!0),this.$utils().u(e.$offset)||(this.$offset=e.$offset),r.call(this,e)};var c=a.init;a.init=function(){if(this.$u){var e=this.$d;this.$y=e.getUTCFullYear(),this.$M=e.getUTCMonth(),this.$D=e.getUTCDate(),this.$W=e.getUTCDay(),this.$H=e.getUTCHours(),this.$m=e.getUTCMinutes(),this.$s=e.getUTCSeconds(),this.$ms=e.getUTCMilliseconds()}else c.call(this)};var l=a.utcOffset;a.utcOffset=function(n,o){var s=this.$utils().u;if(s(n))return this.$u?0:s(this.$offset)?l.call(this):this.$offset;if("string"==typeof n&&null===(n=function(e){void 0===e&&(e="");var n=e.match(t);if(!n)return null;var o=(""+n[0]).match(i)||["-",0,0],s=o[0],a=60*+o[1]+ +o[2];return 0===a?0:"+"===s?a:-a}(n)))return this;var a=Math.abs(n)<=16?60*n:n,r=this;if(o)return r.$offset=a,r.$u=0===n,r;if(0!==n){var c=this.$u?this.toDate().getTimezoneOffset():-1*this.utcOffset();(r=this.local().add(a+c,e)).$offset=a,r.$x.$localOffset=c}else r=this.utc();return r};var d=a.format;a.format=function(e){var t=e||(this.$u?"YYYY-MM-DDTHH:mm:ss[Z]":"");return d.call(this,t)},a.valueOf=function(){var e=this.$utils().u(this.$offset)?0:this.$offset+(this.$x.$localOffset||this.$d.getTimezoneOffset());return this.$d.valueOf()-6e4*e},a.isUTC=function(){return!!this.$u},a.toISOString=function(){return this.toDate().toISOString()},a.toString=function(){return this.toDate().toUTCString()};var u=a.toDate;a.toDate=function(e){return"s"===e&&this.$offset?s(this.format("YYYY-MM-DD HH:mm:ss:SSS")).toDate():u.call(this)};var m=a.diff;a.diff=function(e,t,i){if(e&&this.$u===e.$u)return m.call(this,e,t,i);var n=this.local(),o=s(e).local();return m.call(n,o,t,i)}}}()},function(e,t,i){"use strict";e.exports=function(e,t,i,n){var o=self||window;try{try{var s;try{s=new o.Blob([e])}catch(t){(s=new(o.BlobBuilder||o.WebKitBlobBuilder||o.MozBlobBuilder||o.MSBlobBuilder)).append(e);s=s.getBlob()}var a=o.URL||o.webkitURL,r=a.createObjectURL(s),c=new o[t](r,i);a.revokeObjectURL(r);return c}catch(n){return new o[t]("data:application/javascript,".concat(encodeURIComponent(e)),i)}}catch(e){if(!n)throw Error("Inline worker is not supported");return new o[t](n,i)}}},,,,,,function(e,t){window.convenientDiscussions=window.convenientDiscussions||{};convenientDiscussions.i18n=convenientDiscussions.i18n||{};convenientDiscussions.i18n.en={"script-name":"Convenient Discussions","script-name-short":"CD","page-title-reply":"Replying on $1","page-title-edit":"Editing on $1","page-title-addsection":"Starting new topic on $1","page-title-addsubsection":"Starting new subsection on $1","cm-gotoparent":"Go to parent","cm-gotoparent-tooltip":"Go to the parent comment","cm-gotochild":"Go back to child","cm-gotochild-tooltip":"Go back to the child comment","cm-copylink":"Copy link","cm-copylink-tooltip":"Copy a link","cm-thank":"Thank","cm-thank-tooltip":"Thank for the edit that added this comment","cm-thanked":"Thanked","cm-thanked-tooltip":"You have already thanked the user for this comment","cm-edit":"Edit","cm-reply":"Reply","cm-reply-outdented-tooltip":"Can't reply to a comment that has outdented replies","cm-quote":"Quote","thread-tooltip":"Collapse/expand the thread","thread-tooltip-count":"Collapse/expand the thread ($1 {{plural:$1|comment|comments}})","thread-expand-label-genderless":"Expand the thread ($1 {{plural:$1|comment|comments}} by {{plural:$2|1=|}} $3)","thread-expand-label":"Expand the thread ($1 {{plural:$1|comment|comments}} by {{plural:$2|1={{gender:$4|}}|{{gender:$4|}}}} $3)","thread-expand-tooltip":"Hold $1 to expand all threads on the page","thread-newcomments":"{{plural:$1|There is a new comment|There are $1 new comments}} in this thread from {{plural:$2|1={{gender:$4|}}|{{gender:$4|}}}} $3. Click to refresh the page.","sm-editopeningcomment":"Edit opening comment","sm-editopeningcomment-tooltip":"Edit the opening comment of the section","sm-addsubsection":"Add subsection","sm-addsubsection-tooltip":"Add a subsection to this section","sm-move":"Move","sm-move-tooltip":"Move the topic to another page","sm-subscribe":"Subscribe","sm-unsubscribe":"Unsubscribe","sm-copylink":"Copy link","sm-copylink-tooltip":"Copy a link","sm-more":"More options","comment-timestamp-today":"[Today], h:mm A","comment-timestamp-yesterday":"[Yesterday], h:mm A","comment-timestamp-currentyear":"D MMMM, h:mm A","comment-timestamp-other":"D MMMM YYYY, h:mm A","comment-timestamp-lessthanminute":"less than a minute ago","comment-author-talk":"talk","comment-author-contribs":"contribs","comment-changed":"The comment has changed.","comment-changed-short":"Changed","comment-changed-refresh":"Refresh to see the changes","comment-diff":"Diff","comment-diff-error":"Couldn't render the diff.","comment-diff-empty":"The diff is empty. It may be the case that the rendering of the comment has changed, but it wasn't edited.","comment-diff-title":"Comment diff","comment-diff-full":"Full diff","comment-diff-history":"Edit history","comment-changedsince":"The comment has changed since your last visit.","comment-changedsince-short":"Changed since your last visit","comment-deleted":"The comment was deleted.","comment-deleted-short":"Deleted","section-reply":"Reply to section","section-addsubsection-to":'Add subsection to "$1"',"section-newcomments":"{{plural:$1|There is a new comment|There are $1 new comments}} in this section (outside of threads) from {{plural:$2|1={{gender:$4|}}|{{gender:$4|}}}} $3. Click to refresh the page.","section-unwatch-stillwatched":'<strong>Note:</strong> you are still subscribed to this section as it is included in the section "$1" that you are subscribed to.',"section-watch-openpages":"(You will only get notifications while this tab is open.)","section-watch-pagenotwatched":"<strong>Note:</strong> you subscribed to the section but you don't watch the page. In order for new comments to be highlighted on your watchlist page, add the page to the watchlist.","section-watch-error-maxsize":'Couldn\'t update the settings: the size of the subscription list exceeds the maximum size. <span class="cd-notification-editWatchedSections">[[$1|Edit the subscription list]]</span> to fix this.',"section-metadata-commentcount":"$1 {{plural:$1|comment|comments}}","section-metadata-commentcount-new":'$1 {{plural:$1|comment|comments}} <span class="cd-section-metadata-commentcount-new">+$2 {{plural:$2|new}}</span>',"section-metadata-authorcount":"$1 {{plural:$1|person|people}}","section-metadata-lastcomment":"Latest comment:","cld-title-comment":"Copy comment link","cld-title-section":"Copy section link","cld-select-anchor":"Anchor link","cld-select-diff":"Diff link","cld-summary":"Edit summary","cld-diff":"Diff link","cld-diff-error":"Couldn't find","cld-diff-error-network":"Couldn't find (network error)","cld-diff-error-unknown":"Couldn't find (unknown error)","cld-shortdiff":"Short diff link","cld-diffwikilink":"Diff wikilink","cld-wikilink":"Wikilink","cld-help-onlycd":"This link will work only for users who have Convenient Discussions installed.","cld-help-notonlycd":"An anchor will be added automatically to the linked comment, so the link <em>will</em> work for everybody.","cld-currentpagewikilink":"Wikilink from the same page","cld-link":"Regular link","cld-permanentlink":"Permanent link","cld-permanentwikilink":"Permanent wikilink","cld-close":"Close","copylink-copied":"The link has been copied to the clipboard.","copylink-error":"Couldn't copy the link.","thank-confirm":"Do you want to send a public thanks to {{gender:$2|}} $1 for [$3 this edit]?","thank-error":"Couldn't send thanks.","thank-success":'"Thank you" notification has been sent.',"es-reply":"reply","es-reply-to":"reply to {{gender:$2|}} $1","es-addition":"addition","es-edit-reply":"edit reply","es-edit-reply-to":"edit reply to {{gender:$2|}} $1","es-edit-addition":"edit addition","es-edit-topic":"edit opening comment","es-edit-subsection":"edit opening comment","es-edit-comment":"edit comment","es-edit-comment-by":"edit comment by {{gender:$2|}} $1","es-delete-reply":"delete reply","es-delete-reply-to":"delete reply to {{gender:$2|}} $1","es-delete-addition":"delete addition","es-delete-topic":"delete topic","es-delete-subsection":"delete subsection","es-delete-comment":"delete comment","es-delete-comment-by":"delete comment by {{gender:$2|}} $1","es-new-topic":"new topic","es-new-subsection":"new subsection","es-move-from":"move from [[$1]]","es-move-to":"move to [[$1]]","cf-headline-topic":"Subject","cf-headline-subsection":'Subject for the subsection of "$1"',"cf-comment-placeholder-replytosection":'Reply to "$1"',"cf-comment-placeholder-replytocomment":"Reply to {{gender:$2|}} $1","cf-summary-placeholder":"Edit summary","cf-summary-preview":"Edit summary preview","cf-save":"Save","cf-save-short":"Save","cf-delete-button":"Delete","cf-delete-button-short":"Delete","cf-addtopic":"Add topic","cf-addtopic-short":"Add","cf-addsubsection":"Add subsection","cf-addsubsection-short":"Add","cf-reply":"Reply","cf-reply-short":"Reply","cf-preview":"Preview","cf-preview-short":"Preview","cf-viewchanges":"View changes","cf-viewchanges-short":"Changes","cf-cancel":"Cancel","cf-cancel-short":"Cancel","cf-advanced":"Advanced","cf-settings-tooltip":"Convenient Discussions settings","cf-help":"?","cf-help-short":"?","cf-help-content":"<ul>\n<li>Type <code>$1</code> and choose a user to [[mw:Special:MyLanguage/Help:Notifications/Mention|mention]] them.</li>\n<li>Hold <b>$2</b> while choosing a user to add punctuation after the name.</li>\n<li>Type <code><nowiki>[[#</"+String("")+"nowiki></code> to link a comment in the current section.</li>\n<li>Hold <b>Shift</b> while choosing an autocomplete item to change the displayed text (for example, <code><nowiki>[[Article|</"+String("")+"nowiki><var>text</var><nowiki>]]</"+String("")+'nowiki></code>).</li>\n<li>Hold <b>Alt</b> while choosing an autocomplete item to use the text after the caret as displayed text.</li>\n<li class="cd-helpPopup-hideForReformattedComments">If the comment menu obstructs a link behind it, make a long click/tap on it\u2014it will disappear.</li>\n</ul>\n<p>Hotkeys:</p>\n<ul>\n<li><b>$2+Enter</b> \u2014 post</li>\n<li><b>Esc</b> \u2014 cancel</li>\n<li><b>Q</b> (<b>$2+Alt+Q</b>) \u2014 quote the selected text</li>\n</ul>\n<p>[[mw:c:Special:MyLanguage/User:Jack who built the house/Convenient Discussions|Script documentation]]</p>',"cf-strikethrough-tooltip":"Strikethrough","cf-strikethrough-placeholder":"Struckthrough text","cf-code-tooltip":"Code","cf-code-placeholder":"Code","cf-codeblock-tooltip":"Code block","cf-codeblock-placeholder":"Code block","cf-quote-tooltip":"Quote the selected text","cf-quote-placeholder":"Quoted text","cf-mention-tooltip":"Mention a user. Hold $1 to mention the comment's addressee if available","cf-underline-tooltip":"Underline","cf-underline-placeholder":"Underlined text","cf-minor":"Minor edit","cf-watch":"Watch this page","cf-watchsection-topic":"Subscribe to this topic","cf-watchsection-subsection":"Subscribe to this subsection","cf-watchsection-tooltip":"This affects notifications","cf-omitsignature":"Omit signature","cf-omitsignature-tooltip":"Use this option when a signature is already present in the comment text.","cf-delete":"Delete","cf-block-preview":"Preview","cf-block-viewchanges":"Changes","cf-block-close":"Close","cf-reaction-templateinheadline":"Don't use templates in headlines: they break section links.","cf-reaction-signature":"No need to enter <kbd>$1</kbd>: the signature will be added automatically.","cf-reaction-pre":"$1 tags can break the layout\u2014better use $2.","cf-reaction-mention-edit":"Since you are <em>editing</em> a comment, a [[mw:Special:MyLanguage/Help:Notifications/Mention#How to mention another editor and trigger a notification|mention notification]] will not be sent. To have a notification sent, you may link the user in the edit summary.","cf-reaction-mention-nosignature":"Since you've opted not to include a signature in your comment, a [[mw:Special:MyLanguage/Help:Notifications/Mention#How to mention another editor and trigger a notification|mention notification]] will not be sent. To send a notification, you may link the user in the edit summary.","cf-notice-nochanges":"No changes.","cf-notice-editconflict-retrying":"Trying again\u2026","cf-error-getpagecode":"Couldn't get the page code.","cf-error-closed":"The discussion is closed.","cf-error-findplace":'Couldn\'t find a proper place in the code to insert the comment into. You can try to do it yourself by copying your drafted comment and <span class="cd-message-editSection">[$1 editing the source]</span>.',"cf-error-commentlinks-commentnotfound":"Couldn't find the comment with ID $1, linked from your comment, on the page.","cf-error-numberedlist":"It's impossible to form the comment correctly without distorting the numbered list markup.","cf-error-numberedlist-table":"Remove tables from the comment.","cf-error-delete-repliestocomment":"Can't delete the comment because it has replies.","cf-error-delete-repliesinsection":"Can't delete the section because it has replies.","cf-error-preview":"Couldn't preview the comment.","cf-error-viewchanges":"Couldn't get the changes.","cf-error-couldntedit":"The page may not have been edited.","cf-error-pagedoesntexist":"The page doesn't exist.","cf-error-formconflict":'There already is an "Add topic" form of a different type open on the page. Close that form to open this one.',"cf-error-othersubmitted":"Can't submit the form because another form is being submitted right now.","cf-confirm-noheadline-topic":"You didn't enter the topic subject. The comment will be added to the previous section, without a headline.","cf-confirm-noheadline-subsection":"You didn't enter the section subject. The comment will be added to the previous section, without a headline.","cf-confirm-noheadline-question":"Are you sure you want to post the comment?","cf-confirm-empty":"Are you sure you want to post an empty comment?","cf-confirm-long":"This comment is longer than $1 characters. Are you sure you want to post it?","cf-confirm-secondlevelheading":"The comment contains the code of the second level section. If you are moving the source code, it's better to use the standard edit source function, otherwise it could be altered unpredictably. Are you sure you want to post the comment?","cf-confirm-delete":"Are you sure you want to delete the comment?","cf-confirm-close":"Are you sure you want to close the form? The changes will be lost.","cf-autocomplete-mentions-label":"Mention a user","cf-autocomplete-wikilinks-label":"Link a wikipage","cf-autocomplete-templates-label":"Insert a template","cf-autocomplete-tags-label":"Insert a tag","cf-autocomplete-commentlinks-label":"Link a section or comment in this section","cf-autocomplete-commentlinks-text":"$1 @ $2","cf-popup-richformatting":"You pasted content with rich formatting. Would you like to convert this formatting to wikitext?","cf-popup-richformatting-convert":"Convert to wikitext","dn-confirm":"Do you want Convenient Discussions to send you desktop notifications about new comments on currently open pages if they are addressed to you or posted in sections that you are subscribed to? You can disable this feature in the settings.","dn-confirm-yes":"Yes","dn-confirm-no":"No","dn-grantpermission":"Grant a permission to the site.","dn-grantpermission-again":"You have desktop notifications enabled in the Convenient Discussions settings, but the site is not allowed to send them. Grant a permission to the site to receive notifications or deny to prevent this message from showing up again.","deadanchor-section-lead":'Couldn\'t find a section "$1" on the page.',"deadanchor-section-exactmatch":'Looks like the section "$1" has been archived. [[$2|See archived section]] (or [$3 search in the archive]).',"deadanchor-section-inexactmatch":'Looks like the section "$1" has been archived. [$2 Search in the archive].',"deadanchor-section-notfound":"[$1 Searching for it in the archive] also did not return any results.","deadanchor-section-reason":"It may have been deleted or renamed, or you may have followed a malformed link.","deadanchor-section-similar":'However, a section with a similar name "[[$1|$2]]" was found on the page.',"deadanchor-comment-lead":"Couldn't find the comment on the page.","deadanchor-comment-exactmatch":"Looks like the comment has been archived. [[$1|See archived comment]] (or [$2 search in the archive]).","deadanchor-comment-inexactmatch":"Looks like the comment has been archived. [$1 Search in the archive].","deadanchor-comment-notfound":"[$1 Searching for it in the archive] also did not return any results. It may have been deleted or moved.","deadanchor-comment-previous":"[[$1|The previous comment from this user by time]].","deadanchor-search-gotocomment":"jump to comment","restore-restored-title":"Session restored","restore-restored-text":"The unsent comment forms have been automatically recovered.","rd-intro":"Couldn't find the comments or sections on the page that some of the opened forms were related to. Below is the restored content of these forms. Copy it if you need.","rd-headline":"Subject","rd-comment":"Comment","rd-summary":"Edit summary","rd-close":"Close","rc-suggestion":'<p>Convenient Discussions has an option to change the formatting of comments, moving the author and timestamp up and the reply and thank buttons down. This allows to quickly see the author and date of comments and interact with them easier. Do you want to enable it? (You can always disable it in the settings.)</p>\n\n<p>Note that, in the new formatting, you can get a link to the comment by clicking the timestamp. Also, see <span class="cd-notification-settings">[[$1|the settings]]</span> for various features, such as text insert buttons and customizable formatting of timestamps (which, by the way, are displayed in the timezone set in your wiki preferences by default).</p>',"rc-suggestion-yes":"Enable the new formatting","rc-suggestion-no":"Keep the usual formatting","topicsubscription-notice":'<p>Convenient Discussions now uses the standard notifications interface for section watching (now it is called topic subscriptions). You will get a notification when someone posts a new comment in the topic you subscribed to. If you had desktop notifications enabled, you will still receive them.</p>\n\n<p>You can configure the notification types (web, email, app) in the <b>[[Special:Preferences#mw-prefsection-echo|wiki preferences]]</b>. Or you can go back to the classic section watching. See the details in the <b><span class="cd-notification-notificationSettings">[[$1|Convenient Discussions settings]]</span></b>.</p>',"navpanel-refresh":"Refresh page","navpanel-previous":"Go to the previous new comment","navpanel-next":"Go to the next new comment","navpanel-firstunseen":"Go to the first unseen comment","navpanel-firstunseen-hidden-title":"The comment is in a collapsed thread","navpanel-firstunseen-hidden":'Scrolled to the thread. <span class="cd-notification-expandThread">[[$1|Expand the thread and scroll to the comment]]</span>.',"navpanel-commentform":"Go to the next comment form out of sight","navpanel-newcomments-count":"$1 new {{plural:$1|comment|comments}}.","navpanel-newcomments-names":"$1 \u2192 $2","navpanel-newcomments-unknowndate":"unknown date","navpanel-newcomments-refresh":"Click to refresh the page","navpanel-markasread":"Hold $1 to mark all shown comments as read","toc-commentcount-new":"$1 +$2","toc-commentcount-full":"$1 {{plural:$1|comment|comments}}","toc-commentcount-new-full":"$1 {{plural:$1|comment|comments}} +$2 {{plural:$2|new}}","toc-more":"\u2026$1 more","toc-watched":"You are subscribed to this topic","pagenav-pagetop":"Page top","pagenav-toc":"Table of contents","pagenav-pagebottom":"Page bottom","pagenav-back":"Back","notification-toyou":"$1 {{gender:$2|replied}} to your comment$3.","notification-toyou-desktop":'$1 {{gender:$2|replied}} to your comment$3 on page "$4".',"notification-insection":'$1 {{gender:$2|replied}} in section "$3".',"notification-insection-desktop":'$1 {{gender:$2|replied}} in section "$3" on page "$4".',"notification-newcomments":"$1 new {{plural:$1|comment|comments}}$2$3.","notification-newcomments-desktop":'$1 new {{plural:$1|comment|comments}}$2 on page "$3"$4.',"notification-newcomments-mayberelevant":"that may be relevant to you","notification-reload":"Click to reload the page$1.","notification-formdata":"form data will not be lost","notification-part-insection":'in section "$1"',"notification-part-onthispage":"on this page","footer-runcd":"Run Convenient Discussions on this page once","footer-dontruncd":"Don't run Convenient Discussions on this page once","footer-settings":"Convenient Discussions settings","sd-title":"Convenient Discussions settings","sd-save":"Save","sd-reload":"Reload","sd-page-talkpage":"Talk page","sd-page-commentform":"Comment form","sd-page-timestamps":"Timestamps","sd-page-notifications":"Notifications","sd-page-dataremoval":"Data removal","sd-close-confirm":"The settings were not saved. Are you sure you want to close the window?","sd-saved":"The settings have been saved successfully. Reload the page to apply them.","sd-reset":"Reset settings (in all sections)","sd-reset-confirm":'Are you sure you want to reset the settings? (Click "{{int:convenient-discussions-sd-save}}" after resetting.)',"sd-removedata":"Remove all script data","sd-removedata-description":"Delete the data that Convenient Discussions has collected: your settings, talk page last visits, subscriptions, and drafts of unsent comments","sd-removedata-help":"Note that everything except the global settings is removed for the current wiki only. If you have used Convenient Discussions on other wikis and you want to remove data for them, you will have to remove it on those wikis. See [[mw:c:Special:MyLanguage/User:Jack who built the house/Convenient Discussions#Data|the script's homepage]] for the details on what, why, and how the script stores and instructions on how to delete each piece of data individually. <strong>Note:</strong> If you use the standard notifications interface for topic subscriptions, your subscriptions aren't removed as they are part of your wiki account.","sd-removedata-confirm":"This will permanently delete your settings, talk page last visits, subscriptions, and drafts of unsent comments. Do you want to proceed?","sd-dataremoved":"Your data has been successfully removed. To prevent creation of any new data, make sure you don't visit any talk pages before disabling Convenient Discussions.","sd-error-removedata":"Couldn't remove the data on the server.","sd-localsetting":"<i>This setting is individual for each wiki.</i>","sd-alloweditotherscomments":"Show a link to edit other users' comments","sd-alwaysexpandadvanced":'Expand the "{{int:convenient-discussions-cf-advanced}}" section when replying',"sd-autocompletetypes":"Enable autocomplete for","sd-autocompletetypes-mentions":"mentions","sd-autocompletetypes-commentlinks":"comment links","sd-autocompletetypes-wikilinks":"wikilinks","sd-autocompletetypes-templates":"templates","sd-autocompletetypes-tags":"tags","sd-autopreview":"Preview the comment as I type","sd-collapsethreadslevel":"Autocollapse threads starting with level","sd-collapsethreadslevel-help":"0 to never autocollapse.","sd-desktopnotifications":"Desktop notifications","sd-desktopnotifications-radio-all":"Notify me about replies to my comments and comments in topic I'm {{gender:$1|subscribed to}}","sd-desktopnotifications-radio-tome":"Notify me about replies to my comments only","sd-desktopnotifications-radio-none":"Don't notify me","sd-desktopnotifications-help":"Desktop notifications inform about events on pages that are open but hidden from view (in inactive tabs or minimized windows). To receive them, you must grant a permission to $1.","sd-enablethreads":"Allow to collapse threads","sd-hidetimezone":"Hide the timezone","sd-highlightnewinterval":"Minutes to pass between page loads to stop highlighting comments as new","sd-highlightnewinterval-help":"Set to 0 to only highlight those comments as new that were loaded the first time.","sd-improveperformance":"Try to improve performance of long pages","sd-improveperformance-help":"Enable this if you have lags when you comment on long pages. This is known to happen in Chromium browsers. The script will delay the rendering of the bottom part of the page until you scroll to it. This will speed up the user interface but hinder your ability to search for text in these areas.","sd-insertbuttons":"Text insert buttons","sd-insertbuttons-multiselect-placeholder":"Add a button","sd-insertbuttons-help":"Use <code>+</code> to specify a place where the caret should be put after inserting the text; for example, <code><nowiki>{{+}}</"+String("")+"nowiki></code>. Use <code>;</code> to specify displayed text if you want it to be different from the one inserted; for example, <code><nowiki><code>+</code>;<code /></"+String("")+"nowiki></code>. Use <code><nowiki>\\</"+String("")+"nowiki></code> before the aforementioned characters to insert them as is; for example, <code><nowiki>2\\+2</"+String("")+"nowiki></code>. The buttons can be dragged and dropped.","sd-modifytoc":"Show new comments and sections in the table of contents","sd-outdentlevel":"[$1 Outdent] my replies starting with level","sd-outdentlevel-help":"0 to never outdent.","sd-outdentlevel-help-notemplate":"<strong>Note:</strong> The current wiki doesn't have an outdent template specified. The setting will be idle.","sd-notifications":"Notification popups in the top right corner of the page","sd-notifications-radio-all":"Notify me about replies to my comments and comments in sections I'm {{gender:$1|subscribed to}}","sd-notifications-radio-tome":"Notify me about replies to my comments only","sd-notifications-radio-none":"Don't notify me","sd-notifications-help":"This also affects which comments are considered relevant so that the number of new comments in the navigation panel is highlighted in purple.","sd-notifycollapsedthreads":"Notify about comments in collapsed threads","sd-reformatcomments":"Reformat comments, replacing signatures with standard links above and below","sd-showcontribslink":"Show a contributions link after the user name in comments","sd-showtoolbar":"Show the editing toolbar","sd-signatureprefix":"Signature prefix","sd-signatureprefix-help":"Text that is added before the signature, <em>including</em> a space at the beginning if needed.","sd-timestampformat":"Timestamp format","sd-timestampformat-radio-default":'Default ("$1")',"sd-timestampformat-radio-improved":'Improved ("$1", "$2")',"sd-timestampformat-radio-relative":'Relative ("$1", "$2")',"sd-timestampformat-help":"Timestamps use your interface language (not the content language). You can always see the original timestamp on mouse hover.","sd-usebackgroundhighlighting":"Use background highlighting (not just a colored marker) for new and own comments","sd-useuitime":"Show comment timestamps in the timezone set in my wiki preferences","sd-usetemplatedata":"Use TemplateData in templates autocomplete","sd-usetemplatedata-help":"Hold Shift while choosing a template from the autocomplete menu to insert the template's required and suggested parameters as well.","sd-usetopicsubscription":"Use the [[mw:Special:MyLanguage/Help:Notifications|standard notifications interface]] to receive notifications about comments in topics I'm {{gender:$1|subscribed to}}","sd-usetopicsubscription-help":"You can configure the notification types (web, email, app) in the [[Special:Preferences#mw-prefsection-echo|preferences]]. <strong>Note:</strong> This works only for 2-level sections (<code>==</code>). If you enable this, you won't be able to subscribe to subsections. You won't be able to filter edits in your watchlist by subscription status as well. You may also need to resubscribe to topics after you enable <em>or</em> disable this.","sd-watchonreply":"Watch pages that I {{gender:$1|comment on}}","sd-watchsectiononreply":"Subscribe to topics that {{gender:$1|I comment in}}","sd-watchsectiononreply-help":"This affects notifications.","ewsd-title":"Edit subscription list","ewsd-save":"Save","ewsd-saved":"The subscription list has been successfully saved.","ewsd-error-maxsize":"Couldn't update the settings: the size of the subscription list exceeds the maximum size. Reduce the size of the list to fix this.","ewsd-error-processing":"An error occurred while processing the subscription list.","ewsd-close-confirm":"The subscription list wasn't saved. Are you sure you want to close the window?","msd-title":"Move topic","msd-move":"Move","msd-targetpage":"Enter the name of the discussion page to move the topic to:","msd-keeplink":"Keep a link to the new location","msd-summaryending":"Edit summary (will be added to the standard one)","msd-error-wrongpage":"Wrong page.","msd-error-sourcepagedeleted":"The current page was deleted.","msd-error-invalidpagename":"Invalid page name.","msd-error-editconflict-retry":'Just click "{{int:ooui-dialog-process-retry}}".',"msd-error-editingtargetpage":"Couldn't edit the target page.","msd-error-editingsourcepage":"Couldn't edit the source page. You will have to edit it manually.","msd-moved":"The topic has been successfully moved. You may go to [[$1|the page where the topic was moved to]].","msd-bottom":"The code may be different if the page would be updated while the window is idle.","move-sourcepagecode":"''Moved to [[$1]]. $2''","move-targetpagecode":"''Moved from [[$1]]. $2''","error-loaddata":"{{int:convenient-discussions-script-name}}: Couldn't load the data required by the script.","error-needreloadpage":'API error. Please <span class="cd-notification-reloadPage">[[$1|reload the page]]</span> and try again.',"error-processpage":"{{int:convenient-discussions-script-name}}: Couldn't process the page. See the details in the JavaScript console (F12 \u2192 Console).","error-settings-load":"{{int:convenient-discussions-script-name}}: Couldn't load the settings from the server.","error-settings-save":"{{int:convenient-discussions-script-name}}: Couldn't save the settings to the server.","error-reloadpage":"Couldn't reload the page.","error-reloadpage-saved":"The page was saved, but couldn't reload it.","error-api":"API error: $1.","error-network":"Check your internet connection.","error-nodata":"The server response lacks the requested data.","error-unknown":"Unknown error.","error-javascript":"A JavaScript error occurred. See the details in the JavaScript console (F12 \u2192 Console).","error-locatecomment":'Couldn\'t find the comment in the code. This may be caused by the complexity of the comment code, the script flaw, or the fact that the comment was deleted or heavily edited. You can try to <span class="cd-message-editSection">[$1 edit the source the standard way]</span> or <span class="cd-message-reloadPage">[[$1|reload the page]]</span>.',"error-locatesection":'Couldn\'t find the section in the code. This may be caused by the complexity of the section\'s first comment code, the script flaw, or the fact that the section was deleted. You can try to <span class="cd-message-editPage">[$1 edit the page source the standard way]</span> or <span class="cd-message-reloadPage">[[$1|reload the page]]</span>.',"error-spamblacklist":"You are trying to add a URL with the domain name $1 that is blacklisted. The page was not edited.","error-titleblacklist":"The page name is blacklisted. The page was not edited.","error-abusefilter":'Your edit was automatically rejected by abuse filter "$1".',"error-editconflict":"Edit conflict.","error-blocked":"You or your IP address is blocked from editing. The page was not edited.","error-pagedeleted":"The page was deleted.","error-pagenotedited":"The page was not edited.","error-diffnotfound":"Couldn't find the edit that added this comment.","error-diffnotfound-history":"You can look for it in the [$1 revision history] yourself.","error-elementhidden":"The element is hidden. Can't scroll to it.","error-purgecache":"Couldn't purge the cache of this page.","error-anoneditwatning":"<strong>You are not logged in.</strong> Your IP address will be publicly visible if you make any edits.","warning-performance-title":"Performance issues?","warning-performance":'Convenient Discussions can try to resolve them with the "{{int:convenient-discussions-sd-improveperformance}}" setting. <span class="cd-notification-talkPageSettings">[[$1|Open the settings dialog]]</span>.',"discussiontools-incompatible":'Convenient Discussions is incompatible with DiscussionTools. Please <b><span class="cd-notification-disabledt">[[$1|disable]]</span></b> (or <b><span class="cd-notification-disableDtGlobally">[[$2|globally disable]]</span></b>) DiscussionTools to make Convenient Discussions work correctly.',"discussiontools-disabled":'DiscussionTools has been successfully disabled. <span class="cd-notification-refresh">[[$1|Refresh the page]]</span>.',"wl-button-switchrelevant-tooltip":"Show only comments in topics that I'm {{gender:$1|subscribed to}} and comments addressed to me. (Note: detection is based on edit summaries, so some edits may be missing)","wl-button-editwatchedsections-tooltip":"Edit the list of topics that I'm {{gender:$1|subscribed to}}","wl-button-settings-tooltip":"Convenient Discussions settings","lp-comment":"comment","lp-comment-tooltip":"Go to comment","lp-comment-toyou":"the comment is addressed to you","lp-comment-watchedsection":"you are subscribed to this section",bullet:"<b>\u2022</b>","dot-separator":"\xa0<b>\xb7</b> ",ellipsis:"\u2026","loading-ellipsis":"Loading\u2026",addtopic:"Add topic","addtopicbutton-tooltip":"Open in a new tab to create a new topic on the standard page, not in Convenient Discussions",copy:"Copy"}},function(e,t,i){"use strict";e.exports=function(e,t){var i,n,o={},s={},a=void 0,r={},c={};r[0]="HTML_SPECIALCHARS";r[1]="HTML_ENTITIES";c[0]="ENT_NOQUOTES";c[2]="ENT_COMPAT";c[3]="ENT_QUOTES";i=!isNaN(e)?r[e]:e?e.toUpperCase():"HTML_SPECIALCHARS";n=!isNaN(t)?c[t]:t?t.toUpperCase():"ENT_COMPAT";if("HTML_SPECIALCHARS"!==i&&"HTML_ENTITIES"!==i)throw new Error("Table: "+i+" not supported");o[38]="&";if("HTML_ENTITIES"===i){o[160]=" ";o[161]="¡";o[162]="¢";o[163]="£";o[164]="¤";o[165]="¥";o[166]="¦";o[167]="§";o[168]="¨";o[169]="©";o[170]="ª";o[171]="«";o[172]="¬";o[173]="­";o[174]="®";o[175]="¯";o[176]="°";o[177]="±";o[178]="²";o[179]="³";o[180]="´";o[181]="µ";o[182]="¶";o[183]="·";o[184]="¸";o[185]="¹";o[186]="º";o[187]="»";o[188]="¼";o[189]="½";o[190]="¾";o[191]="¿";o[192]="À";o[193]="Á";o[194]="Â";o[195]="Ã";o[196]="Ä";o[197]="Å";o[198]="Æ";o[199]="Ç";o[200]="È";o[201]="É";o[202]="Ê";o[203]="Ë";o[204]="Ì";o[205]="Í";o[206]="Î";o[207]="Ï";o[208]="Ð";o[209]="Ñ";o[210]="Ò";o[211]="Ó";o[212]="Ô";o[213]="Õ";o[214]="Ö";o[215]="×";o[216]="Ø";o[217]="Ù";o[218]="Ú";o[219]="Û";o[220]="Ü";o[221]="Ý";o[222]="Þ";o[223]="ß";o[224]="à";o[225]="á";o[226]="â";o[227]="ã";o[228]="ä";o[229]="å";o[230]="æ";o[231]="ç";o[232]="è";o[233]="é";o[234]="ê";o[235]="ë";o[236]="ì";o[237]="í";o[238]="î";o[239]="ï";o[240]="ð";o[241]="ñ";o[242]="ò";o[243]="ó";o[244]="ô";o[245]="õ";o[246]="ö";o[247]="÷";o[248]="ø";o[249]="ù";o[250]="ú";o[251]="û";o[252]="ü";o[253]="ý";o[254]="þ";o[255]="ÿ"}if("ENT_NOQUOTES"!==n)o[34]=""";if("ENT_QUOTES"===n)o[39]="'";o[60]="<";o[62]=">";for(a in o)if(o.hasOwnProperty(a))s[String.fromCharCode(a)]=o[a];return s}},function(e,t,i){var n=i(24),o=i(56);if("string"==typeof(o=o.__esModule?o.default:o))o=[[e.i,o,""]];var s={insert:"head",singleton:!1};n(o,s);e.exports=o.locals||{}},function(e,t,i){(t=i(25)(!1)).push([e.i,".tribute-container{position:absolute;top:0;left:0;height:auto;max-height:500px;max-width:500px;overflow:auto;display:block;z-index:999999;font-size:.875rem;margin-top:3px;line-height:1.4285714em;background-color:#fff;box-shadow:0 2px 2px 0 rgba(0,0,0,.25);border:1px solid #a2a9b1}.tribute-container.tribute-rtl{left:auto;right:0}.tribute-container ul{margin:0;padding:0;list-style:none}.tribute-container li{padding:.3571429em .5em;margin:0;cursor:default}.tribute-container li.highlight{background-color:rgba(0,23,70,.086)}.tribute-item.tribute-item{cursor:pointer}.tribute-label{color:#72777d}",""]);e.exports=t},function(e,t,i){"use strict";i.r(t);var n=i(4),o=i.n(n),s=i(21),a=i.n(s),r=i(31),c=i(6),l=i(0),d=i(2),u=i(8),m=i(1),h=i(11),g=i(10);class MoveSectionDialog extends OO.ui.ProcessDialog{constructor(e){super();this.section=e}getBodyHeight(){return this.$errorItems?this.$errors.prop("scrollHeight"):this.$body.prop("scrollHeight")}initialize(...e){super.initialize(...e);this.pushPending();this.preparatoryRequests=[this.section.getSourcePage().getCode(),mw.loader.using("mediawiki.widgets")];this.loadingPanel=new OO.ui.PanelLayout({padded:!0,expanded:!1});this.loadingPanel.$element.append($("<div>").text(l.a.s("loading-ellipsis")));this.movePanel=new OO.ui.PanelLayout({padded:!0,expanded:!1});this.successPanel=new OO.ui.PanelLayout({padded:!0,expanded:!1});this.stackLayout=new OO.ui.StackLayout({items:[this.loadingPanel,this.movePanel,this.successPanel]});this.$body.append(this.stackLayout.$element)}getSetupProcess(e){return super.getSetupProcess(e).next(()=>{this.stackLayout.setItem(this.loadingPanel);this.actions.setMode("move")})}getReadyProcess(e){var t=this;return super.getReadyProcess(e).next(o()((function*(){var e;try{yield Promise.all(t.preparatoryRequests)}catch(e){t.abort(l.a.sParse("cf-error-getpagecode"),!1);return}try{t.section.locateInCode()}catch(e){if(e instanceof c.a){const{data:i}=e.data,n="locateSection"===i?"error-locatesection":"error-unknown",o=l.a.sParse(n);t.abort(o,!1)}else t.abort(l.a.sParse("error-javascript"),!1);return}const i=t.section.inCode.code;t.controls={};t.controls.title={},t.controls.title.input=new mw.widgets.TitleInputWidget({$overlay:t.$overlay,excludeCurrentPage:!0,showMissing:!1,validate:()=>{const e=t.controls.title.input.getMWTitle(),i=e&&u.b.get(e);return i&&i!==t.section.getSourcePage()}});t.controls.title.field=new OO.ui.FieldLayout(t.controls.title.input,{label:l.a.s("msd-targetpage"),align:"top"});t.controls.title.input.connect(t,{change:"onTitleInputChange",enter:()=>{if(!t.actions.get({actions:"move"})[0].isDisabled())t.executeAction("move")}});if(l.a.config.getMoveSourcePageCode||l.a.config.getMoveTargetPageCode)t.controls.keepLink=Object(h.b)({value:"keepLink",selected:!0,label:l.a.s("msd-keeplink")});t.controls.summaryEnding={};t.controls.summaryEnding.input=new OO.ui.TextInputWidget({maxLength:250});t.summaryEndingAutocomplete=new r.a({types:["mentions","wikilinks"],inputs:[t.controls.summaryEnding.input]});t.summaryEndingAutocomplete.init();t.controls.summaryEnding.field=new OO.ui.FieldLayout(t.controls.summaryEnding.input,{label:l.a.s("msd-summaryending"),align:"top"});t.movePanel.$element.append(t.controls.title.field.$element,null===(e=t.controls.keepLink.field)||void 0===e?void 0:e.$element,$("<pre>").addClass("cd-dialog-moveSection-code").text(i.slice(0,300)+(i.length>=300?"...":"")),$("<p>").addClass("cd-dialog-moveSection-code-note").text(l.a.s("msd-bottom")),t.controls.summaryEnding.field.$element);t.stackLayout.setItem(t.movePanel);Object(m.m)(t.controls.title.input);t.actions.setAbilities({close:!0});t.$body.css("overflow","hidden");Object(m.S)(500).then(()=>{t.$body.css("overflow","")});t.updateSize();t.popPending()})))}getActionProcess(e){var t=this;if("move"===e)return new OO.ui.Process(o()((function*(){t.pushPending();t.controls.title.input.$input.blur();let e,i,n=u.b.get(t.controls.title.input.getMWTitle());if(n!==t.section.getSourcePage()){try{[e,i]=yield Promise.all([t.loadSourcePage(),t.loadTargetPage(n)]);yield t.editTargetPage(e,i);yield t.editSourcePage(e,i)}catch(e){t.abort(...e);return}t.successPanel.$element.append(Object(m.Z)(l.a.sParse("msd-moved",i.sectionWikilink),{tagName:"div"}));d.a.reload({sectionId:t.controls.keepLink.input.isSelected()?t.section.id:void 0});t.stackLayout.setItem(t.successPanel);t.actions.setMode("success");t.popPending()}else t.abort(l.a.sParse("msd-error-wrongpage"),!1)})));else if("close"===e)return new OO.ui.Process(()=>{this.close()});return super.getActionProcess(e)}onTitleInputChange(){var e=this;return o()((function*(){let t=!0;yield e.controls.title.input.getValidity().catch(()=>{t=!1});e.actions.setAbilities({move:t})}))()}loadSourcePage(){var e=this;return o()((function*(){try{yield e.section.getSourcePage().getCode(!1)}catch(e){if(e instanceof c.a){const{type:t,code:i}=e.data;if("api"===t)if("missing"===i)throw[l.a.sParse("msd-error-sourcepagedeleted"),!0];else throw[l.a.sParse("error-api",i),!0];else if("network"===t)throw[l.a.sParse("error-network"),!0]}else throw[l.a.sParse("error-javascript"),!1]}try{e.section.locateInCode()}catch(e){if(e instanceof c.a){const{code:t}=e.data,i="locateSection"===t?"error-locatesection":"error-unknown";throw[l.a.sParse(i),!0]}else throw[l.a.sParse("error-javascript"),!1]}const t=e.section.getSourcePage().name,i=Object(g.b)(e.section.headline);return{page:e.section.getSourcePage(),sectionInCode:e.section.inCode,sectionWikilink:e.controls.keepLink.input.isSelected()?`${t}#${i}`:t}}))()}loadTargetPage(e){var t=this;return o()((function*(){try{yield e.getCode()}catch(e){if(e instanceof c.a){const{type:t,code:i}=e.data;if("api"===t)if("invalid"===i)throw[l.a.sParse("msd-error-invalidpagename"),!1];else throw[l.a.sParse("error-api",i),!0];else if("network"===t)throw[l.a.sParse("error-network"),!0]}else throw[l.a.sParse("error-javascript"),!1]}e.analyzeNewTopicPlacement();return{page:e,sectionWikilink:`${e.realName}#${Object(g.b)(t.section.headline)}`}}))()}editTargetPage(e,t){var i=this;return o()((function*(){let n,o;if(l.a.config.getMoveTargetPageCode&&i.controls.keepLink.input.isSelected()){const t=l.a.config.getMoveTargetPageCode(e.sectionWikilink.replace(/=/g,"{{=}}"),l.a.g.userSignature.replace(/=/g,"{{=}}"));if(Array.isArray(t)){n=t[0]+"\n";o="\n"+t[1]}else{n=t;o=""}}else{n="";o=""}const s=e.sectionInCode.code,a=e.sectionInCode.relativeContentStartIndex,r=s.slice(0,a),d=s.slice(a),u=Object(g.c)(r+n+d+o);let h;const f=t.page.code;if(t.page.areNewTopicsOnTop){var p;const e=null!==(p=t.page.firstSectionStartIndex)&&void 0!==p?p:f.length;h=Object(g.c)(f.slice(0,e))+u+f.slice(e)}else h=f+(f?"\n":"")+u;let b=i.controls.summaryEnding.input.getValue();const v=l.a.mws("colon-separator",{language:"content"});b&&(b=v+b);const y=l.a.s("es-move-from",e.sectionWikilink)+b;try{yield t.page.edit({text:h,summary:Object(m.c)({text:y,section:i.section.headline}),baserevid:t.page.revisionId,starttimestamp:t.page.queryTimestamp})}catch(e){const t=l.a.sParse("msd-error-editingtargetpage");if(e instanceof c.a){const{type:i,details:n}=e.data;if("network"===i)throw[t+" "+l.a.sParse("error-network"),!0];else{let{code:e,message:i,logMessage:o}=n;if("editconflict"===e)i+=" "+l.a.sParse("msd-error-editconflict-retry");console.warn(o);throw[t+" "+i,!0]}}else{console.warn(e);throw[t+" "+l.a.sParse("error-javascript"),!1]}}}))()}editSourcePage(e,t){var i=this;return o()((function*(){const n=e.sectionInCode.code,o=Object(g.e)(n)||l.a.g.signCode+"~";let s;if(l.a.config.getMoveSourcePageCode&&i.controls.keepLink.input.isSelected()){const i=l.a.config.getMoveSourcePageCode(t.sectionWikilink,l.a.g.userSignature,o);s=n.slice(0,e.sectionInCode.relativeContentStartIndex)+i+"\n"}else s="";const a=e.page.code.slice(0,e.sectionInCode.startIndex)+s+e.page.code.slice(e.sectionInCode.endIndex);let r=i.controls.summaryEnding.input.getValue();const d=l.a.mws("colon-separator",{language:"content"});r&&(r=d+r);const u=l.a.s("es-move-to",t.sectionWikilink)+r;try{yield e.page.edit({text:a,summary:Object(m.c)({text:u,section:i.section.headline}),baserevid:e.page.revisionId,starttimestamp:e.page.queryTimestamp})}catch(e){const t=l.a.sParse("msd-error-editingsourcepage");if(e instanceof c.a){const{type:i,details:n}=e.data;if("network"===i)throw[t+" "+l.a.sParse("error-network"),!1,!0];else{const{message:e,logMessage:i}=n;console.warn(i);throw[t+" "+e,!1,!0]}}else{console.warn(e);throw[t+" "+l.a.sParse("error-javascript"),!1,!0]}}}))()}abort(e,t,i=!1){const n=Object(m.Z)(e,{callbacks:{"cd-message-reloadPage":()=>{this.close();d.a.reload()}}});this.showErrors(new OO.ui.Error(n,{recoverable:t}));this.$errors.find(".oo-ui-buttonElement-button").on("click",()=>{if(i)this.close();else this.updateSize()});this.actions.setAbilities({close:!0,move:t});this.updateSize();this.popPending()}}a()(MoveSectionDialog,"name","moveSectionDialog");a()(MoveSectionDialog,"title",l.a.s("msd-title"));a()(MoveSectionDialog,"actions",[{action:"close",modes:["move","success"],flags:["safe","close"],disabled:!0},{action:"move",modes:["move"],label:l.a.s("msd-move"),flags:["primary","progressive"],disabled:!0}]);Object(h.j)(MoveSectionDialog,OO.ui.ProcessDialog);t.default=MoveSectionDialog},function(e,t,i){(t=i(25)(!1)).push([e.i,"a:not([href]){cursor:pointer}.cd-autocompleteTypesMultiselect .oo-ui-multioptionWidget.oo-ui-widget-enabled{cursor:default}.cd-autocompleteTypesMultiselect .oo-ui-checkboxMultioptionWidget,.cd-autocompleteTypesMultiselect .oo-ui-checkboxMultioptionWidget .oo-ui-checkboxInputWidget,.cd-autocompleteTypesMultiselect .oo-ui-checkboxMultioptionWidget.oo-ui-labelElement>.oo-ui-labelElement-label{display:inline-block}.cd-autocompleteTypesMultiselect .oo-ui-checkboxMultioptionWidget .oo-ui-checkboxInputWidget{width:auto}.ltr .cd-autocompleteTypesMultiselect .oo-ui-checkboxMultioptionWidget:not(:last-child){margin-right:1em}.rtl .cd-autocompleteTypesMultiselect .oo-ui-checkboxMultioptionWidget:not(:last-child){margin-left:1em}.ltr .cd-setting-indented{margin-left:calc(1.42857em + 6px)}.rtl .cd-setting-indented{margin-right:calc(1.42857em + 6px)}.oo-ui-windowManager-modal>.oo-ui-dialog{z-index:101}.cd-dialog-confirm.cd-dialog-confirm.cd-dialog-confirm,.cd-dialog-copyLink.cd-dialog-copyLink.cd-dialog-copyLink{z-index:100}.cd-dialog-settings{z-index:102}.cd-numberInput{width:10em}.cd-dialog-settings .oo-ui-fieldLayout-header>.oo-ui-labelElement-label:first-child{display:inline-block}.mw-selflink.cd-comment-timestamp.cd-comment-timestamp,.mw-selflink.oo-ui-buttonElement-button.oo-ui-buttonElement-button{font-weight:400;cursor:pointer}",""]);e.exports=t},function(e,t,i){var n=i(24),o=i(60);if("string"==typeof(o=o.__esModule?o.default:o))o=[[e.i,o,""]];var s={insert:"head",singleton:!1};n(o,s);e.exports=o.locals||{}},function(e,t,i){(t=i(25)(!1)).push([e.i,".cd-comment-header{font-size:.9285714em;margin-bottom:.2307692em}.cd-comment-author-links,.cd-comment-menu{-webkit-user-select:none;user-select:none}.cd-comment-menu{font-size:.9285714em;margin-top:.3076923em}.cd-comment-header,.cd-comment-menu{line-height:1.6153846}.cd-comment-author{font-weight:700;font-size:1.0769231em}.cd-comment-button.cd-button-disabled.cd-button-disabled.cd-button-disabled{color:#72777d}.cd-comment-button-label.cd-comment-button-label{color:#54595d;text-decoration:none}.cd-comment-button-label.cd-comment-button-label:hover{color:var(--cd-link-hover-color)}.cd-comment-button-label.cd-comment-button-label:active{color:var(--cd-link-active-color)}.cd-comment-button-icon{display:inline-block;vertical-align:text-bottom;margin-bottom:-1px;width:16px;height:16px;background-size:16px 16px}.cd-comment-button-goToParent{background-image:url(\"data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20'%3E%3Cpath d='M10 5l8 10H2z' fill='%23a2a9b1'/%3E%3C/svg%3E\")}.cd-comment-button-goToParent:hover{background-image:url(\"data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20'%3E%3Cpath d='M10 5l8 10H2z' fill='%230645ad'/%3E%3C/svg%3E\")}.cd-comment-button-goToParent:active{background-image:url(\"data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20'%3E%3Cpath d='M10 5l8 10H2z' fill='%23faa700'/%3E%3C/svg%3E\")}.cd-comment-button-goToChild{background-image:url(\"data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20'%3E%3Cpath d='M10 15L2 5h16z' fill='%23a2a9b1'/%3E%3C/svg%3E\")}.cd-comment-button-goToChild:hover{background-image:url(\"data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20'%3E%3Cpath d='M10 15L2 5h16z' fill='%230645ad'/%3E%3C/svg%3E\")}.cd-comment-button-goToChild:active{background-image:url(\"data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20'%3E%3Cpath d='M10 15L2 5h16z' fill='%23faa700'/%3E%3C/svg%3E\")}.sitedir-ltr .cd-comment-button,.sitedir-rtl .mw-content-ltr .cd-comment-button{margin-left:1em;margin-right:0}.sitedir-ltr .cd-comment-button:first-child,.sitedir-rtl .mw-content-ltr .cd-comment-button:first-child{margin-left:0;margin-right:0}.sitedir-ltr .mw-content-rtl .cd-comment-button,.sitedir-rtl .cd-comment-button{margin-right:1em;margin-left:0}.sitedir-ltr .mw-content-rtl .cd-comment-button:first-child,.sitedir-rtl .cd-comment-button:first-child{margin-right:0;margin-left:0}.mw-content-rtl .cd-comment-header .cd-comment-author-wrapper a,.mw-content-rtl .cd-comment-menu .cd-comment-button{unicode-bidi:isolate}.mw-content-rtl .cd-comment-timestamp{unicode-bidi:plaintext}.cd-comment-part-first{margin-top:.5em}.cd-reformattedComments .cd-comment-part-first{margin-top:.75em}.cd-comment-part-last.cd-comment-part-last.cd-comment-part-last{margin-bottom:.5em}.cd-reformattedComments .cd-comment-part-last.cd-comment-part-last.cd-comment-part-last{margin-bottom:.75em}ol>li.cd-comment-part-first.cd-comment-part-first,ol>li>.cd-comment-part-first.cd-comment-part-first:first-child{margin-top:0}.skin-vector .cd-parsed dd,.skin-vector .cd-parsed li,.skin-vector .cd-parsed ol>li.cd-comment-part-last.cd-comment-part-last{margin-bottom:.14285714em}.cd-commentLevel.cd-commentLevel:not(ol){list-style-type:none;list-style-image:none;margin:0}.sitedir-ltr .cd-commentLevel:not(ol)>dd,.sitedir-ltr .cd-commentLevel:not(ol)>li,.sitedir-rtl .mw-content-ltr .cd-commentLevel:not(ol)>dd,.sitedir-rtl .mw-content-ltr .cd-commentLevel:not(ol)>li{padding-left:1em;padding-right:0;margin-left:1em;margin-right:0;border-left:1px solid #c8ccd1;border-right:0}.sitedir-ltr .mw-content-rtl .cd-commentLevel:not(ol)>dd,.sitedir-ltr .mw-content-rtl .cd-commentLevel:not(ol)>li,.sitedir-rtl .cd-commentLevel:not(ol)>dd,.sitedir-rtl .cd-commentLevel:not(ol)>li{padding-left:0;padding-right:1em;margin-left:0;margin-right:1em;border-left:0;border-right:1px solid #c8ccd1}.cd-connectToPreviousItem.cd-connectToPreviousItem.cd-connectToPreviousItem.cd-connectToPreviousItem{margin-top:-.5em;padding-top:.5em}.cd-reformattedComments .cd-connectToPreviousItem.cd-connectToPreviousItem.cd-connectToPreviousItem.cd-connectToPreviousItem{margin-top:-.75em;padding-top:.75em}.cd-connectToPreviousItem.cd-connectToPreviousItem.cd-connectToPreviousItem.cd-connectToPreviousItem>:first-child,.cd-connectToPreviousItem.cd-connectToPreviousItem.cd-connectToPreviousItem.cd-connectToPreviousItem>:first-child>:first-child,.cd-connectToPreviousItem.cd-connectToPreviousItem.cd-connectToPreviousItem.cd-connectToPreviousItem>:first-child>:first-child>:first-child{margin-top:0}.cd-thread-clickArea{position:absolute;z-index:3;width:3px;padding-left:var(--cd-thread-line-side-margin);padding-right:var(--cd-thread-line-side-margin)}.cd-thread-clickArea-hovered{cursor:pointer}.cd-thread-clickArea-hovered .cd-thread-line{background-color:#72777d;opacity:1;transition:opacity .2s ease-in}.cd-thread-clickArea-hovered .cd-thread-line-extended:after{background-image:linear-gradient(180deg,#72777d,transparent)}.cd-thread-line{width:100%;height:100%;opacity:0}.cd-thread-line-extended:after{display:block;content:\"\";height:10px;top:100%;position:relative}.cd-changeMark{font-size:85%;color:#54595d}.cd-reformattedComments .cd-changeMark{font-size:100%}.cd-reformattedComments .mw-content-ltr .cd-changeMark,.cd-reformattedComments .mw-content-rtl .mw-content-ltr .cd-changeMark{margin-left:1em;margin-right:auto}.cd-reformattedComments .mw-content-ltr .mw-content-rtl .cd-changeMark,.cd-reformattedComments .mw-content-rtl .cd-changeMark{margin-left:auto;margin-right:1em}.sitedir-ltr .cd-changeMark-before,.sitedir-rtl .mw-content-ltr .cd-changeMark-before{margin-left:auto;margin-right:.75em}.sitedir-ltr .mw-content-rtl .cd-changeMark-before,.sitedir-rtl .cd-changeMark-before{margin-left:.75em;margin-right:auto}",""]);e.exports=t},function(e,t,i){var n=i(24),o=i(62);if("string"==typeof(o=o.__esModule?o.default:o))o=[[e.i,o,""]];var s={insert:"head",singleton:!1};n(o,s);e.exports=o.locals||{}},function(e,t,i){(t=i(25)(!1)).push([e.i,".cd-commentForm{display:flow-root;margin:.5em 0;font-weight:400;text-align:start}.cd-commentForm .oo-ui-textInputWidget{max-width:none}.cd-commentForm .oo-ui-buttonElement-framed>.oo-ui-buttonElement-button{vertical-align:middle}.cd-commentForm table.diff{margin-bottom:.5em}.cd-commentForm .wikiEditor-ui-left{float:none}.cd-commentForm .wikiEditor-ui-toolbar{z-index:1}.cd-commentForm .oo-ui-textInputWidget .oo-ui-inputWidget-input{border-radius:0}.cd-commentForm .tool-button{width:2.14285714em;height:2.14285714em;border:1px solid transparent}.sitedir-ltr .cd-commentForm .tool-button{direction:ltr}.sitedir-rtl .cd-commentForm .tool-button{direction:rtl}.cd-commentForm .wikiEditor-ui-toolbar .tabs span.tab a{height:2.14285714em;border:1px solid transparent}.cd-commentForm .wikiEditor-ui-toolbar .group .label{height:2em;line-height:2em}.cd-commentForm .wikiEditor-ui-text{position:relative}.ltr .cd-commentForm{direction:ltr}.rtl .cd-commentForm{direction:rtl}.ltr .cd-commentForm-checkboxes{direction:ltr;text-align:left}.ltr .cd-commentForm-checkboxes .oo-ui-fieldLayout{margin-right:1em;margin-left:0}.ltr .cd-commentForm-checkboxes .oo-ui-fieldLayout:last-child{margin-right:0}.rtl .cd-commentForm-checkboxes{direction:rtl;text-align:right}.rtl .cd-commentForm-checkboxes .oo-ui-fieldLayout{margin-left:1em;margin-right:0}.rtl .cd-commentForm-checkboxes .oo-ui-fieldLayout:last-child{margin-left:0}.ltr .cd-commentForm-buttons{direction:ltr}.ltr .cd-commentForm-buttons-start{float:left}.ltr .cd-commentForm-buttons-end{float:right}.rtl .cd-commentForm-buttons{direction:rtl}.rtl .cd-commentForm-buttons-start{float:right}.rtl .cd-commentForm-buttons-end{float:left}.cd-commentForm-signature{opacity:.67}.cd-commentForm-dummyElement{height:0}.cd-commentForm-summaryInput{margin-top:.214286em}.cd-commentForm-checkboxes{margin-top:.5em;line-height:1}.cd-commentForm-buttons{display:flow-root;margin-top:.5em}.cd-commentForm-addSection,.cd-commentForm-addSubsection,.cd-commentForm-sectionOpeningComment{margin-top:1em}.cd-commentForm-commentInput .wikiEditor-ui .wikiEditor-ui-view{border:0}.cd-commentForm-commentInput .oo-ui-inputWidget-input.oo-ui-inputWidget-input.oo-ui-inputWidget-input{position:relative;padding-bottom:1.4285714em;overflow-y:hidden}.cd-commentForm-commentInput .oo-ui-inputWidget-input.oo-ui-inputWidget-input.oo-ui-inputWidget-input:focus{outline:0}.cd-commentForm-commentInput .wikiEditor-ui-top{border:solid #a2a9b1;border-width:1px 1px 0}.cd-commentForm-commentInput.oo-ui-textInputWidget.oo-ui-widget-disabled+.cd-insertButtons,.cd-commentForm-commentInput.oo-ui-textInputWidget.oo-ui-widget-disabled .wikiEditor-ui-top{border-color:#c8ccd1;pointer-events:none}.cd-reformattedComments .cd-commentForm-signature,.cd-reformattedComments .cd-helpPopup-hideForReformattedComments,.ext-discussiontools-init-replylink-buttons.ext-discussiontools-init-replylink-buttons{display:none}.cd-commentForm-headlineInput,.cd-editnotice{margin-bottom:.214286em}.cd-replyButtonWrapper{margin-top:.5em}.cd-commentForm-previewArea{display:flow-root;margin-top:.5em;padding:.5em .75em;background-color:#f8f9fa}.cd-commentForm-previewArea>.mw-parser-output>:first-child,.cd-commentForm-previewArea>.mw-parser-output>:first-child>:first-child{margin-top:0}.cd-commentForm-previewArea>.mw-parser-output>:last-child,.cd-commentForm-previewArea>.mw-parser-output>:last-child>:last-child{margin-bottom:0}.cd-commentForm-previewArea .diff-lineno,.cd-commentForm-previewArea .mw-headline-number{display:none}.cd-commentForm-previewArea .cd-closeButton{background-color:#f8f9fa}.cd-commentForm-previewArea:empty{margin:0;padding:0}.cd-commentForm-previewArea-above{margin-top:0;margin-bottom:.5em;width:calc(100% - 1.5em)}.cd-commentForm-previewArea-label{color:#72777d;margin-bottom:.5em}.sitedir-ltr .cd-commentForm-previewArea{direction:ltr}.sitedir-ltr .cd-commentForm-previewArea-indentedComment>.mw-parser-output>dl,.sitedir-ltr .cd-commentForm-previewArea-indentedComment>.mw-parser-output>dl>dd{margin-left:0}.sitedir-rtl .cd-commentForm-previewArea{direction:rtl}.sitedir-rtl .cd-commentForm-previewArea-indentedComment>.mw-parser-output>dl,.sitedir-rtl .cd-commentForm-previewArea-indentedComment>.mw-parser-output>dl>dd{margin-right:0}.cd-commentForm-messageArea{width:100%}.cd-commentForm-messageArea,.cd-commentForm-previewArea{position:relative;clear:both}.cd-commentForm-inNumberedList .cd-commentForm-messageArea,.cd-commentForm-inNumberedList .cd-commentForm-previewArea-above{float:left}.cd-commentForm-inNumberedList .cd-commentForm-messageArea+*,.cd-commentForm-inNumberedList .cd-commentForm-previewArea-above+*{clear:both}.cd-closeButton{position:absolute;z-index:1;top:1px;width:20px;height:20px;background-image:url(\"data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20'%3E%3Cpath d='M4.34 2.93l12.73 12.73-1.41 1.41L2.93 4.35z'/%3E%3Cpath d='M17.07 4.34L4.34 17.07l-1.41-1.41L15.66 2.93z'/%3E%3C/svg%3E\");opacity:0;transition:opacity .2s ease-in}.cd-commentForm-messageArea .cd-closeButton{background-color:var(--cd-content-background-color)}.cd-commentForm-messageArea:hover .cd-closeButton,.cd-commentForm-previewArea:hover .cd-closeButton{opacity:1}.cd-mobile .cd-closeButton{top:.5em}.ltr .cd-closeButton,.sitedir-ltr .cd-commentForm-previewArea .cd-closeButton{right:1px;left:unset}.cd-mobile.ltr .cd-closeButton,.cd-mobile.sitedir-ltr .cd-commentForm-previewArea .cd-closeButton{right:.5em}.rtl .cd-closeButton,.sitedir-rtl .cd-commentForm-previewArea .cd-closeButton{left:1px;right:unset}.cd-mobile.rtl .cd-closeButton,.cd-mobile.sitedir-rtl .cd-commentForm-previewArea .cd-closeButton{left:.5em}.cd-message{margin-bottom:.5em}.cd-popupOverlay{position:absolute;top:0;left:0;z-index:5;font-size:.875rem}.cd-insertButtons{background-color:#f8f9fa;border:1px solid #a2a9b1;border-top:0 solid #a2a9b1;font-size:.928571em;line-height:1.384616em}.cd-insertButtons:after{display:block;content:\"\";clear:both}.cd-insertButtons:empty{border:0}.cd-insertButtons-button{color:#222;padding:2px .5em 3px;white-space:nowrap;display:block}.cd-insertButtons-button:focus,.cd-insertButtons-button:hover{text-decoration:none;color:#222;background-color:rgba(0,23,70,.086)}.ltr .cd-insertButtons-button{float:left}.rtl .cd-insertButtons-button{float:right}.sitedir-ltr .cd-insertButtons{direction:ltr}.sitedir-rtl .cd-insertButtons{direction:rtl}.cd-toolbarPlaceholder{background-color:#f8f9fa;border:solid #a2a9b1;border-width:1px 1px 0;height:2.2857143em;margin:1px 0 -1px}.cd-commentForm-pending .cd-toolbarPlaceholder{border-color:#c8ccd1}.cd-autocompleteContainer .highlight{font-weight:400}.cd-popup-richFormatting{width:25rem}.cd-popup-richFormatting .oo-ui-popupWidget-popup{padding-bottom:.5em}.cd-popup-richFormatting .oo-ui-popupWidget-body{width:auto!important}.cd-dummyFloatableContainer{position:absolute;z-index:-1}",""]);e.exports=t},function(e,t,i){var n=i(24),o=i(64);if("string"==typeof(o=o.__esModule?o.default:o))o=[[e.i,o,""]];var s={insert:"head",singleton:!1};n(o,s);e.exports=o.locals||{}},function(e,t,i){(t=i(25)(!1)).push([e.i,'.cd-section-menu-button-wrapper:before{content:" | ";color:#54595d}.mw-editsection-bracket+.cd-section-menu-button-wrapper:before{content:none}.cd-section-menu-button.cd-button-disabled{opacity:.5;text-decoration:none}.cd-section-menu-button.cd-button-disabled:active,.cd-section-menu-button.cd-button-disabled:focus,.cd-section-menu-button.cd-button-disabled:hover{color:var(--cd-link-color)}.cd-section-button-container{margin-top:.5em;margin-bottom:.5em}ol .cd-section-button{margin-top:-2px}.sitedir-rtl.ltr .mw-editsection:before{content:"\\200B\\200E"}.sitedir-ltr.rtl .mw-editsection:before{content:"\\200B\\200F"}.sitedir-rtl.ltr .mw-editsection-bracket:first-of-type{margin-right:.25em;margin-left:0}.sitedir-rtl.ltr .mw-editsection-bracket:last-of-type{margin-left:.25em;margin-right:0}.cd-dialog-moveSection-code{margin:1em 0}.cd-dialog-moveSection-code-note{font-size:95%}.cd-section-bar{margin:.25em 0;display:flex;flex-wrap:wrap}.cd-section-bar-item{display:block;box-sizing:border-box;min-height:30px;border-top:1px solid transparent;border-bottom:1px solid transparent;padding:4px 0;color:#54595d;line-height:1.53846153em;white-space:nowrap;unicode-bidi:plaintext}.cd-section-bar-item-authorCount-innerWrapper{cursor:default}.sitedir-ltr .cd-section-bar-item,.sitedir-rtl .mw-content-ltr .cd-section-bar-item{margin-left:0;margin-right:1.3846154em}.sitedir-ltr .mw-content-rtl .cd-section-bar-item,.sitedir-rtl .cd-section-bar-item{margin-left:1.3846154em;margin-right:0}.cd-section-bar-button .oo-ui-optionWidget>.oo-ui-iconElement-icon.oo-ui-iconElement-icon,.cd-section-bar-button>.oo-ui-buttonElement-button>.oo-ui-iconElement-icon{min-width:16px;min-height:16px}.cd-section-bar-button .oo-ui-buttonElement-button>.oo-ui-labelElement-label.oo-ui-labelElement-label{line-height:1.53846153em}.cd-section-bar-button.cd-section-bar-button>.oo-ui-buttonElement-button{min-width:30px;min-height:30px;padding-top:4px;padding-bottom:4px}.cd-section-bar-moremenu>.oo-ui-buttonElement-button>.oo-ui-iconElement-icon.oo-ui-iconElement-icon{background-size:16px 16px}.cd-section-bar-nometadata{display:block}.sitedir-ltr .cd-section-bar-nometadata .cd-section-actions,.sitedir-rtl .mw-content-ltr .cd-section-bar-nometadata .cd-section-actions{float:right;margin-left:1em}.sitedir-ltr .mw-content-rtl .cd-section-bar-nometadata .cd-section-actions,.sitedir-rtl .cd-section-bar-nometadata .cd-section-actions{float:left;margin-right:1em}.cd-section-bar-nometadata+.cd-subsection-heading{margin-top:2.25rem}.cd-section-metadata{display:flex;flex-wrap:wrap}.cd-section-metadata-authorsPopup{font-size:.8125rem}.cd-section-metadata-authorsPopup>.oo-ui-popupWidget-popup>.oo-ui-popupWidget-body{width:max-content!important;max-width:30em!important}.cd-section-actions,.cd-section-metadata{font-size:var(--cd-content-metadata-font-size)}.cd-section-actions{font-weight:400;white-space:nowrap}.sitedir-ltr .cd-section-actions,.sitedir-rtl .mw-content-ltr .cd-section-actions{margin-left:auto;margin-right:-.4615385em;padding-left:1em}.sitedir-ltr .mw-content-rtl .cd-section-actions,.sitedir-rtl .cd-section-actions{margin-left:-.4615385em;margin-right:auto;padding-right:1em}.cd-subsection-heading{display:flex;align-items:baseline;overflow:unset}.cd-section-hidden{visibility:hidden}',""]);e.exports=t},function(e,t,i){var n=i(24),o=i(66);if("string"==typeof(o=o.__esModule?o.default:o))o=[[e.i,o,""]];var s={insert:"head",singleton:!1};n(o,s);e.exports=o.locals||{}},function(e,t,i){(t=i(25)(!1)).push([e.i,".cd-comment-underlay{position:absolute;z-index:-1}.cd-reformattedComments .cd-comment-underlay{mix-blend-mode:color}.cd-comment-overlay-content,.cd-comment-underlay-hovered{background-color:var(--cd-comment-hovered-background-color)}.cd-comment-underlay-deleted.cd-comment-underlay-deleted{background-color:var(--cd-comment-deleted-background-color)}.cd-comment-overlay-deleted.cd-comment-overlay-deleted .cd-comment-overlay-content,.cd-comment-underlay-deleted.cd-comment-underlay-deleted.cd-comment-underlay-hovered{background-color:var(--cd-comment-deleted-hovered-background-color)}.cd-comment-underlay-changed.cd-comment-underlay-changed{background-color:var(--cd-comment-new-background-color)}.cd-comment-overlay-changed.cd-comment-overlay-changed .cd-comment-overlay-content,.cd-comment-underlay-changed.cd-comment-underlay-changed.cd-comment-underlay-hovered{background-color:var(--cd-comment-new-hovered-background-color)}.cd-comment-underlay-target.cd-comment-underlay-target{background-color:var(--cd-comment-target-background-color)}.cd-comment-overlay-target.cd-comment-overlay-target .cd-comment-overlay-content,.cd-comment-underlay-target.cd-comment-underlay-target.cd-comment-underlay-hovered{background-color:var(--cd-comment-target-hovered-background-color)}.cd-comment-overlay{position:absolute;z-index:1}.cd-comment-overlay-marker{position:absolute;top:0;width:3px;height:100%}.cd-comment-overlay-changed.cd-comment-overlay-changed .cd-comment-overlay-marker,.cd-comment-overlay-new .cd-comment-overlay-marker{background-color:var(--cd-comment-new-marker-color)}.cd-comment-overlay-own .cd-comment-overlay-marker{background-color:var(--cd-comment-own-marker-color)}.cd-comment-overlay-deleted .cd-comment-overlay-marker{background-color:var(--cd-comment-deleted-marker-color)}.cd-comment-overlay-target.cd-comment-overlay-target .cd-comment-overlay-marker{background-color:var(--cd-comment-target-marker-color)}.cd-comment-overlay-line-closingGap{position:absolute;top:0;width:1px;height:100%;background-color:#c8ccd1}.cd-comment-overlay-innerWrapper{position:absolute;z-index:1;bottom:0;font-size:.875rem;display:none;flex-direction:row}.cd-comment-overlay-hovered .cd-comment-overlay-innerWrapper{display:flex}.ltr .cd-comment-overlay-innerWrapper{direction:ltr;right:0}.rtl .cd-comment-overlay-innerWrapper{direction:rtl;left:0}.cd-comment-overlay-gradient{width:1.5em;display:inline-block;-moz-user-select:none;-webkit-user-select:none;user-select:none}.ltr .cd-comment-overlay-gradient{background-image:linear-gradient(270deg,var(--cd-comment-hovered-background-color),hsla(0,0%,100%,0))}.rtl .cd-comment-overlay-gradient{background-image:linear-gradient(90deg,var(--cd-comment-hovered-background-color),hsla(0,0%,100%,0))}.ltr .cd-comment-overlay-deleted.cd-comment-overlay-deleted .cd-comment-overlay-gradient{background-image:linear-gradient(270deg,var(--cd-comment-deleted-hovered-background-color),hsla(0,0%,100%,0))}.rtl .cd-comment-overlay-deleted.cd-comment-overlay-deleted .cd-comment-overlay-gradient{background-image:linear-gradient(90deg,var(--cd-comment-deleted-hovered-background-color),hsla(0,0%,100%,0))}.cd-comment-overlay-target.cd-comment-overlay-target.cd-comment-overlay-target .cd-comment-overlay-gradient{background-image:none}.ltr .cd-comment-overlay-changed.cd-comment-overlay-changed .cd-comment-overlay-gradient{background-image:linear-gradient(270deg,var(--cd-comment-new-hovered-background-color),hsla(0,0%,100%,0))}.rtl .cd-comment-overlay-changed.cd-comment-overlay-changed .cd-comment-overlay-gradient{background-image:linear-gradient(90deg,var(--cd-comment-new-hovered-background-color),hsla(0,0%,100%,0))}.cd-comment-overlay-content{display:inline-flex;padding:0 .5em;flex-direction:row;pointer-events:all}.cd-comment-overlay-content>.oo-ui-buttonElement{line-height:1.4285714em}.sitedir-ltr.ltr .mw-content-rtl .cd-comment-overlay-content,.sitedir-rtl.ltr .cd-comment-overlay-content{margin-left:0;margin-right:.5em}.sitedir-ltr.rtl .cd-comment-overlay-content,.sitedir-rtl.rtl .mw-content-ltr .cd-comment-overlay-content{margin-left:.5em;margin-right:0}.sitedir-ltr.ltr .mw-content-rtl .cd-comment-overlay-stretchedStart .cd-comment-overlay-content,.sitedir-rtl.ltr .cd-comment-overlay-stretchedStart .cd-comment-overlay-content{margin-right:calc(var(--cd-content-start-margin) - var(--cd-comment-fallback-side-margin))}.sitedir-ltr.rtl .cd-comment-overlay-stretchedStart .cd-comment-overlay-content,.sitedir-rtl.rtl .mw-content-ltr .cd-comment-overlay-stretchedStart .cd-comment-overlay-content{margin-left:calc(var(--cd-content-start-margin) - var(--cd-comment-fallback-side-margin))}.sitedir-ltr.ltr .cd-comment-overlay-stretchedEnd .cd-comment-overlay-content,.sitedir-rtl.ltr .mw-content-ltr .cd-comment-overlay-stretchedEnd .cd-comment-overlay-content{padding-right:calc(var(--cd-content-start-margin) - var(--cd-comment-fallback-side-margin) + .5em)}.sitedir-ltr.rtl .mw-content-rtl .cd-comment-overlay-stretchedEnd .cd-comment-overlay-content,.sitedir-rtl.rtl .cd-comment-overlay-stretchedEnd .cd-comment-overlay-content{padding-left:calc(var(--cd-content-start-margin) - var(--cd-comment-fallback-side-margin) + .5em)}.sitedir-ltr .cd-comment-overlay-line,.sitedir-ltr .cd-comment-overlay-marker,.sitedir-rtl .mw-content-ltr .cd-comment-overlay-line,.sitedir-rtl .mw-content-ltr .cd-comment-overlay-marker{left:-1px}.sitedir-ltr .mw-content-rtl .cd-comment-overlay-line,.sitedir-ltr .mw-content-rtl .cd-comment-overlay-marker,.sitedir-rtl .cd-comment-overlay-line,.sitedir-rtl .cd-comment-overlay-marker{right:-1px}.ltr .cd-comment-button-ooui.cd-comment-button-ooui{margin-right:0}.ltr .cd-comment-button-ooui.cd-comment-button-ooui:not(:first-child){margin-left:1em}.ltr .cd-comment-button-ooui.cd-comment-button-ooui.oo-ui-iconElement:first-child,.rtl .cd-comment-button-ooui.cd-comment-button-ooui{margin-left:0}.rtl .cd-comment-button-ooui.cd-comment-button-ooui:not(:first-child){margin-right:1em}.rtl .cd-comment-button-ooui.cd-comment-button-ooui.oo-ui-iconElement:first-child{margin-right:0}body:not(.skin-monobook) .cd-comment-button-ooui-icon.cd-comment-button-ooui-icon>.oo-ui-buttonElement-button{padding-top:1.4285714em;min-width:unset}.ltr:not(.skin-monobook) .cd-comment-button-ooui-icon.cd-comment-button-ooui-icon>.oo-ui-buttonElement-button{padding-left:1.4285714em}.ltr:not(.skin-monobook) .cd-comment-button-ooui-icon.cd-comment-button-ooui-icon>.oo-ui-buttonElement-button>.oo-ui-iconElement-icon{left:0}.rtl:not(.skin-monobook) .cd-comment-button-ooui-icon.cd-comment-button-ooui-icon>.oo-ui-buttonElement-button{padding-right:1.4285714em}.rtl:not(.skin-monobook) .cd-comment-button-ooui-icon.cd-comment-button-ooui-icon>.oo-ui-buttonElement-button>.oo-ui-iconElement-icon{right:0}.cd-commentLayersContainer{position:relative;pointer-events:none}.sitedir-ltr .cd-commentLayersContainer,.sitedir-rtl .mw-content-ltr .cd-commentLayersContainer{direction:ltr}.sitedir-ltr .mw-content-rtl .cd-commentLayersContainer,.sitedir-rtl .cd-commentLayersContainer{direction:rtl}.cd-commentLayersContainer-parent-relative{position:relative;z-index:0}.mw-parser-output .cd-commentLayersContainer-parent-relative{display:flow-root;overflow:unset!important}",""]);e.exports=t},function(e,t,i){var n=i(24),o=i(68);if("string"==typeof(o=o.__esModule?o.default:o))o=[[e.i,o,""]];var s={insert:"head",singleton:!1};n(o,s);e.exports=o.locals||{}},function(e,t,i){(t=i(25)(!1)).push([e.i,"#cd-navPanel{position:fixed;top:41.5%;z-index:3;width:2.1875rem;background-color:#fff;border:1px solid #a2a9b1;opacity:.695;font-size:.875rem;line-height:1.2;color:#000;-moz-user-select:none;-webkit-user-select:none;user-select:none}#cd-navPanel:hover{opacity:1}#cd-navPanel-refreshButton{padding:.25rem;height:1.625rem;background-image:url(\"data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20'%3E%3Cpath d='M15.65 4.35A8 8 0 1017.4 13h-2.22a6 6 0 11-1-7.22L11 9h7V2z'/%3E%3C/svg%3E\");background-size:1.25rem 1.25rem}#cd-navPanel-refreshButton:not(:empty){background-image:none;display:flex;justify-content:center;align-items:center;font-weight:700}#cd-navPanel-previousButton{background-image:url(\"data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20'%3E%3Cpath d='M1 13.75l1.5 1.5 7.5-7.5 7.5 7.5 1.5-1.5-9-9-9 9z'/%3E%3C/svg%3E\");background-size:1rem 1rem}#cd-navPanel-nextButton{background-image:url(\"data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20'%3E%3Cpath d='M19 6.25l-1.5-1.5-7.5 7.5-7.5-7.5L1 6.25l9 9 9-9z'/%3E%3C/svg%3E\");background-size:1rem 1rem}#cd-navPanel-firstUnseenButton{height:1.0625rem;padding:.4375rem 0}#cd-navPanel-commentFormButton{background-size:1rem 1rem;background-position-y:54%}.sitedir-ltr #cd-navPanel-commentFormButton{background-image:url(\"data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20'%3E%3Cpath d='M18 0H2a2 2 0 00-2 2v18l4-4h14a2 2 0 002-2V2a2 2 0 00-2-2zM5 9.06a1.39 1.39 0 111.37-1.39A1.39 1.39 0 015 9.06zm5.16 0a1.39 1.39 0 111.39-1.39 1.39 1.39 0 01-1.42 1.39zm5.16 0a1.39 1.39 0 111.39-1.39 1.39 1.39 0 01-1.42 1.39z'/%3E%3C/svg%3E\")}.sitedir-rtl #cd-navPanel-commentFormButton{background-image:url(\"data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20'%3E%3Cpath d='M0 2v12c0 1.1.9 2 2 2h14l4 4V2c0-1.1-.9-2-2-2H2C.9 0 0 .9 0 2zm13.6 5.7c0-.8.6-1.4 1.4-1.4.8 0 1.4.6 1.4 1.4s-.6 1.4-1.4 1.4c-.8-.1-1.4-.7-1.4-1.4zM9.9 9.1s-.1 0 0 0c-.8 0-1.4-.6-1.4-1.4 0-.8.6-1.4 1.4-1.4.8 0 1.4.6 1.4 1.4s-.7 1.4-1.4 1.4zm-5.2 0c-.8 0-1.4-.6-1.4-1.4 0-.8.6-1.4 1.4-1.4.8 0 1.4.6 1.4 1.4 0 .7-.7 1.4-1.4 1.4z'/%3E%3C/svg%3E\")}.ltr #cd-navPanel{left:0;border-left-width:0}.rtl #cd-navPanel{right:0;border-right-width:0}@media screen and (max-width:999px){.skin-vector-2022.ltr #cd-navPanel{left:auto;right:0;border-left-width:1px;border-right-width:0}.skin-vector-2022.rtl #cd-navPanel{left:0;right:auto;border-left-width:0;border-right-width:1px}}.cd-navPanel-button{display:block;text-align:center;background-position:50%;background-repeat:no-repeat;cursor:pointer;height:1.9375rem}.cd-navPanel-button:hover{background-color:#eaecf0}.cd-navPanel-button:not(:first-child){position:relative;margin-top:1px}.cd-navPanel-button:not(:first-child):before{position:absolute;top:-1px;left:.25rem;margin:0 auto 1px;width:1.625rem;height:0;border-top:1px solid #a2a9b1;content:\"\"}.cd-navPanel-refreshButton-relevant{color:#7d00cc}",""]);e.exports=t},function(e,t,i){var n=i(24),o=i(70);if("string"==typeof(o=o.__esModule?o.default:o))o=[[e.i,o,""]];var s={insert:"head",singleton:!1};n(o,s);e.exports=o.locals||{}},function(e,t,i){(t=i(25)(!1)).push([e.i,".cd-pageNav{position:fixed;z-index:2;font-size:12px;color:#202122;overflow-wrap:break-word;background-repeat:no-repeat}.ltr .cd-pageNav{left:0;direction:ltr}.rtl .cd-pageNav{right:0;direction:rtl}.cd-pageNav,.cd-pageNav-list{line-height:1.2}#cd-pageNav-top{top:0;padding:7px 9px 9px;background-image:linear-gradient(180deg,var(--cd-sidebar-color),var(--cd-sidebar-color)),linear-gradient(180deg,var(--cd-sidebar-color),var(--cd-sidebar-transparent-color));background-size:100% calc(100% - 5px),100% 5px;background-position:0 0,0 100%}#cd-pageNav-top:empty{padding:0}#cd-pageNav-bottom{bottom:0;padding:12px 9px 4px;background-image:linear-gradient(0deg,var(--cd-sidebar-color),var(--cd-sidebar-color)),linear-gradient(0deg,var(--cd-sidebar-color),var(--cd-sidebar-transparent-color));background-size:100% calc(100% - 5px),100% 5px;background-position:0 100%,0 0}#cd-pageNav-bottom:empty{padding:0}.cd-pageNav-list{list-style-type:none;list-style-image:none;margin:0}.cd-pageNav-item.cd-pageNav-item{margin:0 0 .25em}.cd-pageNav-item.cd-pageNav-item a{color:inherit;text-decoration:inherit}.cd-pageNav-item.cd-pageNav-item a:hover{color:var(--cd-link-hover-color)}.cd-pageNav-item.cd-pageNav-item a:active{color:var(--cd-link-active-color)}.cd-pageNav-link{display:block}.cd-pageNav-link.cd-pageNav-link-inline{display:inline}.ltr .cd-pageNav-item-level-1{margin-left:1em}.ltr .cd-pageNav-item-level-2{margin-left:2em}.ltr .cd-pageNav-item-level-3{margin-left:3em}.ltr .cd-pageNav-item-level-4{margin-left:4em}.ltr .cd-pageNav-item-level-5{margin-left:5em}.rtl .cd-pageNav-item-level-1{margin-right:1em}.rtl .cd-pageNav-item-level-2{margin-right:2em}.rtl .cd-pageNav-item-level-3{margin-right:3em}.rtl .cd-pageNav-item-level-4{margin-right:4em}.rtl .cd-pageNav-item-level-5{margin-right:5em}",""]);e.exports=t},function(e,t,i){var n=i(24),o=i(72);if("string"==typeof(o=o.__esModule?o.default:o))o=[[e.i,o,""]];var s={insert:"head",singleton:!1};n(o,s);e.exports=o.locals||{}},function(e,t,i){(t=i(25)(!1)).push([e.i,":root{--cd-link-color:#0645ad;--cd-link-hover-color:#0645ad;--cd-link-active-color:#faa700}.skin-vector-2022 .mw-header{z-index:2}.skin-monobook{--cd-link-color:#002bb8}.skin-monobook .cd-comment-underlay{z-index:-1}.skin-monobook .cd-comment-overlay-innerWrapper{z-index:2}.skin-monobook .cd-comment-button-ooui.oo-ui-labelElement .oo-ui-labelElement-label{line-height:1.14285714em}.skin-monobook .cd-comment-button-ooui-icon.cd-comment-button-ooui-icon.cd-comment-button-ooui-icon>.oo-ui-buttonElement-button{padding:0}.skin-monobook .cd-comment-button-ooui-icon.cd-comment-button-ooui-icon.cd-comment-button-ooui-icon>.oo-ui-buttonElement-button>.oo-ui-iconElement-icon{margin:0;width:20px;height:20px}.skin-monobook .cd-commentForm-commentInput .wikiEditor-ui-top{border:1px solid #ccc}.skin-monobook .cd-commentForm-commentInput .wikiEditor-ui-toolbar{z-index:auto}.skin-monobook .cd-commentForm-commentInput.oo-ui-textInputWidget.oo-ui-widget-disabled+.cd-insertButtons,.skin-monobook .cd-commentForm-commentInput.oo-ui-textInputWidget.oo-ui-widget-disabled .wikiEditor-ui-top{border-color:#ddd}.skin-monobook .cd-commentForm .tool-button{width:24px;height:24px}.skin-monobook .cd-toolbarPlaceholder{height:33px}.skin-monobook .cd-insertButtons,.skin-monobook .cd-toolbarPlaceholder{border-color:#ccc}.skin-monobook .cd-loadingPopup{width:15.5em}.skin-monobook.sitedir-ltr .cd-section-button.cd-section-button.cd-section-button,.skin-monobook.sitedir-ltr .cd-thread-button.cd-thread-button.cd-thread-button.cd-thread-button,.skin-monobook.sitedir-rtl .mw-content-ltr .cd-section-button.cd-section-button.cd-section-button,.skin-monobook.sitedir-rtl .mw-content-ltr .cd-thread-button.cd-thread-button.cd-thread-button.cd-thread-button{margin-left:0}.skin-monobook.sitedir-ltr .mw-content-rtl .cd-section-button.cd-section-button.cd-section-button,.skin-monobook.sitedir-ltr .mw-content-rtl .cd-thread-button.cd-thread-button.cd-thread-button.cd-thread-button,.skin-monobook.sitedir-rtl .cd-section-button.cd-section-button.cd-section-button,.skin-monobook.sitedir-rtl .cd-thread-button.cd-thread-button.cd-thread-button.cd-thread-button{margin-right:0}.skin-monobook.sitedir-ltr .cd-button-expandNote.cd-button-expandNote>.oo-ui-buttonElement-button>.oo-ui-iconElement-icon,.skin-monobook.sitedir-ltr .mw-content-rtl .cd-button-expandNote.cd-button-expandNote>.oo-ui-buttonElement-button>.oo-ui-iconElement-icon,.skin-monobook.sitedir-rtl .cd-button-expandNote.cd-button-expandNote>.oo-ui-buttonElement-button>.oo-ui-iconElement-icon,.skin-monobook.sitedir-rtl .mw-content-ltr .cd-button-expandNote.cd-button-expandNote>.oo-ui-buttonElement-button>.oo-ui-iconElement-icon{background-position:0 3px}.skin-monobook .cd-button-expandNote.cd-button-expandNote.cd-button-expandNote.cd-button-expandNote>.oo-ui-buttonElement-button{padding:0;text-decoration:none}.skin-monobook .cd-button-expandNote.cd-button-expandNote.cd-button-expandNote.cd-button-expandNote>.oo-ui-buttonElement-button>.oo-ui-iconElement-icon{min-width:unset;min-height:unset;width:10px;margin:0}.skin-monobook .cd-button-expandNote.cd-button-expandNote.cd-button-expandNote.cd-button-expandNote>.oo-ui-buttonElement-button>.oo-ui-labelElement-label{display:inline}.skin-monobook .cd-pageNav{z-index:5}.skin-monobook #cd-navPanel,.skin-monobook .cd-thread-clickArea{z-index:6}.skin-monobook .cd-section-bar{margin-top:-.5em}.skin-monobook .cd-section-bar-nometadata+.cd-subsection-heading{margin-top:2.65rem}.skin-timeless{--cd-link-color:#36c;--cd-link-hover-color:#2952a3}.skin-timeless .mw-body-content{position:relative}.skin-timeless .cd-loadingPopup{width:15em}.skin-timeless .cd-pageNav{font-size:.8125rem}.skin-timeless .mw-body h2{margin-bottom:.25em}.skin-modern{--cd-link-color:#036}.skin-modern #mw-content-text{position:relative}.skin-modern .cd-loadingPopup{width:18.2em}.skin-minerva{--cd-link-color:#36c}",""]);e.exports=t},function(e,t,i){var n=i(24),o=i(74);if("string"==typeof(o=o.__esModule?o.default:o))o=[[e.i,o,""]];var s={insert:"head",singleton:!1};n(o,s);e.exports=o.locals||{}},function(e,t,i){(t=i(25)(!1)).push([e.i,".cd-comment-button-ooui.cd-comment-button-ooui.cd-comment-button-ooui:first-child,.cd-section-button.cd-section-button.cd-section-button:first-child,.cd-thread-button.cd-thread-button.cd-thread-button.cd-thread-button:first-child{margin-left:0;margin-right:0}.cd-comment-button-ooui.cd-comment-button-ooui.cd-comment-button-ooui>.oo-ui-buttonElement-button,.cd-section-button.cd-section-button.cd-section-button>.oo-ui-buttonElement-button,.cd-thread-button.cd-thread-button.cd-thread-button.cd-thread-button>.oo-ui-buttonElement-button{padding:0}.cd-section-button.cd-section-button,.cd-thread-button.cd-thread-button{vertical-align:initial}.cd-section-button.cd-section-button>.oo-ui-buttonElement-button,.cd-thread-button.cd-thread-button>.oo-ui-buttonElement-button{white-space:normal;vertical-align:initial}ol>.cd-thread-button-container>.cd-thread-button,ol>.cd-thread-button-container>.cd-thread-button>.oo-ui-buttonElement-button{vertical-align:top}.cd-thread-button-container.cd-thread-button-container.cd-thread-button-container{margin-top:.5em;margin-bottom:.5em}.cd-reformattedComments .cd-thread-button-container.cd-thread-button-container.cd-thread-button-container{margin-top:.75em;margin-bottom:.75em}.skin-vector ol>li.cd-thread-button-container.cd-thread-button-container.cd-thread-button-container{margin-top:.14285714em;margin-bottom:.14285714em}.sitedir-ltr .cd-section-button.cd-section-button.cd-section-button,.sitedir-ltr .cd-thread-button.cd-thread-button.cd-thread-button.cd-thread-button,.sitedir-rtl .mw-content-ltr .cd-section-button.cd-section-button.cd-section-button,.sitedir-rtl .mw-content-ltr .cd-thread-button.cd-thread-button.cd-thread-button.cd-thread-button{margin-left:-1px}.sitedir-ltr .mw-content-rtl .cd-section-button.cd-section-button.cd-section-button,.sitedir-ltr .mw-content-rtl .cd-thread-button.cd-thread-button.cd-thread-button.cd-thread-button,.sitedir-rtl .cd-section-button.cd-section-button.cd-section-button,.sitedir-rtl .cd-thread-button.cd-thread-button.cd-thread-button.cd-thread-button{margin-right:-1px}.cd-thread-button-invisible{visibility:hidden}.cd-button-expandNote.cd-button-expandNote.cd-button-expandNote>.oo-ui-buttonElement-button>.oo-ui-iconElement-icon{background-image:url(\"data:image/svg+xml;charset=utf-8,%3Csvg width='7' height='12' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1.273 0L0 1.333 4.455 6 0 10.667 1.273 12 7 6 1.273 0z' fill='%23000'/%3E%3C/svg%3E\");background-size:7px 12px;background-position:0 4px}.sitedir-ltr .cd-button-expandNote.cd-button-expandNote.cd-button-expandNote>.oo-ui-buttonElement-button,.sitedir-rtl .mw-content-ltr .cd-button-expandNote.cd-button-expandNote.cd-button-expandNote>.oo-ui-buttonElement-button{padding-left:1em;padding-right:0}.sitedir-ltr .cd-button-expandNote.cd-button-expandNote.cd-button-expandNote>.oo-ui-buttonElement-button>.oo-ui-iconElement-icon,.sitedir-rtl .mw-content-ltr .cd-button-expandNote.cd-button-expandNote.cd-button-expandNote>.oo-ui-buttonElement-button>.oo-ui-iconElement-icon{transform:none;left:0;right:auto}.sitedir-ltr .mw-content-rtl .cd-button-expandNote.cd-button-expandNote.cd-button-expandNote>.oo-ui-buttonElement-button,.sitedir-rtl .cd-button-expandNote.cd-button-expandNote.cd-button-expandNote>.oo-ui-buttonElement-button{padding-left:0;padding-right:1em}.sitedir-ltr .mw-content-rtl .cd-button-expandNote.cd-button-expandNote.cd-button-expandNote>.oo-ui-buttonElement-button>.oo-ui-iconElement-icon,.sitedir-rtl .cd-button-expandNote.cd-button-expandNote.cd-button-expandNote>.oo-ui-buttonElement-button>.oo-ui-iconElement-icon{transform:scaleX(-1);left:auto;right:0}.rtl .cd-button-expandNote.cd-button-expandNote.cd-button-expandNote{direction:rtl}.cd-button-ooui.cd-button-ooui.oo-ui-buttonElement>.oo-ui-buttonElement-button{min-height:unset}ol>.cd-replyButtonWrapper:not(.cd-replyButtonWrapper-hasCommentForm){list-style-type:none}.action-view .cd-hide,.cd-hidden:not(#cd-notExistingClass){display:none!important}div.cd-show,p.cd-show{display:block!important}span.cd-show{display:inline!important}.cd-destructiveText{color:#d33}.cd-loadingPopup{position:fixed;bottom:0;width:10em;z-index:111}.sitedir-ltr.ltr .cd-loadingPopup{left:0;direction:ltr}.sitedir-ltr.rtl .cd-loadingPopup,.sitedir-rtl .cd-loadingPopup{right:0;direction:rtl}.skin-vector-2022 .cd-loadingPopup{width:0}.sitedir-ltr.skin-vector-2022 .cd-loadingPopup{margin-left:2em}.sitedir-rtl.skin-vector-2022 .cd-loadingPopup{margin-right:2em}.cd-loadingPopup-logo{display:block;margin:0 auto 2em;width:3.4375rem;position:relative}.cd-loadingPopup-logo-partBackground{position:absolute;left:.5rem;top:.375rem;width:1.6875rem;height:1.3125rem;z-index:-1;background-color:var(--cd-sidebar-color)}@media screen and (min-width:982px){.cd-loadingPopup{width:11em}}.cd-button-disabled.cd-button-disabled{cursor:default}.cd-button-pending.cd-button-pending,.cd-button-pending.cd-button-pending.cd-button-pending .oo-ui-buttonElement-button{cursor:wait}.cd-dialog-copyLink .oo-ui-actionFieldLayout.oo-ui-fieldLayout-align-top,.cd-dialog-copyLink .oo-ui-fieldLayout.oo-ui-labelElement.oo-ui-fieldLayout-align-top>.oo-ui-fieldLayout-body>.oo-ui-fieldLayout-header,.cd-dialog-copyLink .oo-ui-textInputWidget{max-width:60em}.cd-dialog-copyLink-linkTypeSelect{display:flex;justify-content:center;margin:.5em 0}.cd-diffView-diff{margin:1em 0}.ltr .cd-diffView-nextDiffLink{float:right;margin-left:1em}.rtl .cd-diffView-nextDiffLink{float:left;margin-right:1em}.cd-commentDiffView-below{margin:.5em 0 0;text-align:center}.cd-currentUserLink{background-color:#f0def7}.cd-rcnotice-text,.cd-tsnotice-text{margin-top:1em}.cd-rcnotice-img,.cd-tsnotice-img{display:block;margin:0 auto}.cd-rcnotice-arrow{margin:.5em auto}.mw-content-ltr li .mw-collapsible-toggle,.mw-content-rtl .mw-content-ltr li .mw-collapsible-toggle,li .mw-collapsible-toggle{float:right}.mw-content-ltr .mw-content-rtl li .mw-collapsible-toggle,.mw-content-rtl li .mw-collapsible-toggle{float:left}.cd-skip{list-style-type:none}.oo-ui-buttonSelectWidget.oo-ui-widget-enabled .oo-ui-buttonElement.oo-ui-widget-disabled.cd-dialog-copyLink-diffButton>.oo-ui-buttonElement-button{z-index:0}.cd-popupOverlay .oo-ui-popupWidget-body{margin-top:7px;margin-bottom:7px}.oo-ui-textInputWidget input{height:auto}.mw-notification a{padding:.125rem 0;position:relative}",""]);e.exports=t},function(e,t,i){var n=i(24),o=i(76);if("string"==typeof(o=o.__esModule?o.default:o))o=[[e.i,o,""]];var s={insert:"head",singleton:!1};n(o,s);e.exports=o.locals||{}},function(e,t,i){(t=i(25)(!1)).push([e.i,".cd-toc-commentCount{color:#72777d;text-decoration:inherit;user-select:none}.sitedir-ltr .cd-toc-commentCount{padding-left:.75em}.sitedir-rtl .cd-toc-commentCount{padding-right:.75em}.sidebar-toc-text{text-decoration:inherit}.cd-toc-subscriptionIcon{display:inline-block;vertical-align:middle;position:relative;top:-.0625rem;width:14px;height:14px;background-image:url(\"data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20'%3E%3Cpath d='M16 7a5.38 5.38 0 00-4.46-4.85C11.6 1.46 11.53 0 10 0S8.4 1.46 8.46 2.15A5.38 5.38 0 004 7v6l-2 2v1h16v-1l-2-2zm-6 13a3 3 0 003-3H7a3 3 0 003 3z' fill='%2372777d'/%3E%3C/svg%3E\");background-size:14px 14px}.cd-toc-subscriptionIcon-before{margin-right:.75em}.sidebar-toc .cd-toc-more{font-size:.875em}.sidebar-toc .cd-toc-addedCommentList,.sidebar-toc .cd-toc-newCommentList{margin-top:0;margin-left:20px}.sidebar-toc .cd-toc-addedCommentList{list-style-image:url(\"data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='5' height='13'%3E%3Ccircle cx='2.5' cy='9' r='2.5' fill='%2372777d'/%3E%3C/svg%3E\")}.cd-toc-addedCommentList.cd-toc-addedCommentList a,.cd-toc-addedCommentList .cd-toc-bullet,.cd-toc-addedCommentList .cd-toc-more,.cd-toc-addedSection.cd-toc-addedSection a{color:#72777d}.cd-toc-more{cursor:help}.cd-toc-hiddenTocNumber{visibility:hidden}.cd-toc-bullet.sidebar-toc-numb{display:inline}.ltr .cd-toc-bullet{padding-right:.5em}.rtl .cd-toc-bullet{padding-left:.5em}.cd-toc-commentLinkText-sidebar.cd-toc-commentLinkText-sidebar{padding:0}.cd-toc-link-sidebar{display:block}",""]);e.exports=t},function(e,t,i){var n=i(24),o=i(78);if("string"==typeof(o=o.__esModule?o.default:o))o=[[e.i,o,""]];var s={insert:"head",singleton:!1};n(o,s);e.exports=o.locals||{}},function(e,t,i){(t=i(25)(!1)).push([e.i,".cd-comment-underlay-new{background-color:var(--cd-comment-new-background-color)}.cd-comment-overlay-new .cd-comment-overlay-content,.cd-comment-underlay-new.cd-comment-underlay-hovered{background-color:var(--cd-comment-new-hovered-background-color)}.ltr .cd-comment-overlay-new .cd-comment-overlay-gradient{background-image:linear-gradient(270deg,var(--cd-comment-new-hovered-background-color),hsla(0,0%,100%,0))}.rtl .cd-comment-overlay-new .cd-comment-overlay-gradient{background-image:linear-gradient(90deg,var(--cd-comment-new-hovered-background-color),hsla(0,0%,100%,0))}.cd-comment-underlay-own{background-color:var(--cd-comment-own-background-color)}.cd-comment-overlay-own .cd-comment-overlay-content,.cd-comment-underlay-own.cd-comment-underlay-hovered{background-color:var(--cd-comment-own-hovered-background-color)}.ltr .cd-comment-overlay-own .cd-comment-overlay-gradient{background-image:linear-gradient(270deg,var(--cd-comment-own-hovered-background-color),hsla(0,0%,100%,0))}.rtl .cd-comment-overlay-own .cd-comment-overlay-gradient{background-image:linear-gradient(90deg,var(--cd-comment-own-hovered-background-color),hsla(0,0%,100%,0))}",""]);e.exports=t},function(e,t,i){var n=i(24),o=i(80);if("string"==typeof(o=o.__esModule?o.default:o))o=[[e.i,o,""]];var s={insert:"head",singleton:!1};n(o,s);e.exports=o.locals||{}},function(e,t,i){(t=i(25)(!1)).push([e.i,".cd-commentLink-innerWrapper:before{content:var(--cd-parentheses-start)}.cd-commentLink-innerWrapper:after{content:var(--cd-parentheses-end)}.cd-commentLink-relevant a{font-weight:700}.cd-watchlistMenu{display:inline-block;border:1px solid #a2a9b1;border-radius:2px;padding:0 .5em;vertical-align:top}.ltr .cd-watchlistMenu{margin:0 1em 0 .5em}.rtl .cd-watchlistMenu{margin:0 .5em 0 1em}#mw-watchlist-options .cd-watchlistMenu{float:right}.cd-watchlistMenu-scriptPageLink{vertical-align:middle;margin:0 .25em}.cd-watchlistMenu-button{margin:-1px 0}.cd-watchlistMenu-button-switchRelevant .oo-ui-iconElement-icon .skin-monobook{margin-top:4px;margin-bottom:0}body:not(.skin-monobook) .cd-watchlistMenu-button-switchRelevant .oo-ui-iconElement-icon{background-position-y:7px}.cd-editSubscriptions-input{padding:1px 0}.cd-editSubscriptions-input .oo-ui-inputWidget-input{resize:none;border-radius:0}",""]);e.exports=t},function(e,t,i){"use strict";i.r(t);var n=i(4),o=i.n(n),s=i(21),a=i.n(s),r=i(0),c=i(2),l=i(3),d=i(1),u=i(11),m=i(7);class SettingsDialog extends OO.ui.ProcessDialog{constructor(e){super({classes:["cd-dialog-settings"]});this.initialPageName=e}getBodyHeight(){return 600}initialize(...e){super.initialize(...e);this.pushPending();this.preparatoryRequests=[l.a.load({omitLocal:!0})];this.loadingPanel=new OO.ui.PanelLayout({padded:!0,expanded:!1});this.loadingPanel.$element.append($("<div>").text(r.a.s("loading-ellipsis")));this.settingsPanel=new OO.ui.PanelLayout({padded:!1,expanded:!0});const t=$("<p>").text(r.a.s("sd-saved"));this.reloadPanel=new OO.ui.PanelLayout({padded:!0,expanded:!1});this.reloadPanel.$element.append(t);const i=$("<p>").text(r.a.s("sd-dataremoved"));this.dataRemovedPanel=new OO.ui.PanelLayout({padded:!0,expanded:!1});this.dataRemovedPanel.$element.append(i);this.stackLayout=new OO.ui.StackLayout({items:[this.loadingPanel,this.settingsPanel,this.reloadPanel,this.dataRemovedPanel]});this.$body.append(this.stackLayout.$element)}getSetupProcess(e){return super.getSetupProcess(e).next(()=>{this.stackLayout.setItem(this.loadingPanel);this.actions.setMode("settings")})}getReadyProcess(e){var t=this;return super.getReadyProcess(e).next(o()((function*(){try{[t.settings]=yield Promise.all(t.preparatoryRequests)}catch(e){Object(u.g)(t,e,"error-settings-load",!1);return}if(!Object.keys(t.settings).length)t.settings=l.a.get();t.renderControls(t.settings);t.stackLayout.setItem(t.settingsPanel);t.bookletLayout.setPage(t.initialPageName||l.a.scheme.ui[0].name);t.actions.setAbilities({close:!0});t.popPending();c.a.addPreventUnloadCondition("dialog",()=>Object(u.h)(t))})))}getActionProcess(e){var t=this;if("save"===e)return new OO.ui.Process(o()((function*(){t.pushPending();try{yield l.a.save(t.collectSettings())}catch(e){Object(u.g)(t,e,"error-settings-save",!0);return}c.a.removePreventUnloadCondition("dialog");t.stackLayout.setItem(t.reloadPanel);t.actions.setMode("reload");t.popPending()})));else if("reload"===e)return new OO.ui.Process(()=>{this.close();location.reload()});else if("close"===e)return new OO.ui.Process(()=>{Object(u.a)(this,"sd")});else if("reset"===e)return new OO.ui.Process(()=>{if(confirm(r.a.s("sd-reset-confirm"))){const e=this.bookletLayout.getCurrentPageName();this.renderControls(l.a.scheme.default);this.bookletLayout.setPage(e)}});return super.getActionProcess(e)}createPages(e){const t={},i=l.a.scheme.ui.map(i=>{const n=i.controls.map(i=>{const n=i.name;switch(i.type){case"checkbox":t[n]=Object(u.b)({value:n,selected:e[n],label:i.label,help:i.help,classes:i.classes});t[n].input.connect(this,{change:"updateStates"});break;case"radio":t[n]=Object(u.e)({options:i.options,selected:e[n],label:i.label,help:i.help});t[n].select.connect(this,{select:"updateStates"});break;case"text":t[n]=Object(u.f)({value:e[n],maxLength:100,label:i.label,help:i.help});t[n].input.connect(this,{change:"updateStates"});break;case"number":t[n]=Object(u.d)({value:e[n],min:i.min,max:i.max,buttonStep:i.buttonStep,label:i.label,help:i.help,classes:i.classes});t[n].input.connect(this,{change:"updateStates"});break;case"multicheckbox":t[n]={};t[n].multiselect=new OO.ui.CheckboxMultiselectWidget({items:i.options.map(t=>new OO.ui.CheckboxMultioptionWidget({data:t.data,selected:e[n].includes(t.data),label:t.label})),classes:i.classes});t[n].multiselect.connect(this,{select:"updateStates"});t[n].field=new OO.ui.FieldLayout(t[n].multiselect,{label:i.label,align:"top"});break;case"multitag":t[n]={};t[n].multiselect=new OO.ui.TagMultiselectWidget({placeholder:i.placeholder,allowArbitrary:!0,inputPosition:"outline",tagLimit:i.tagLimit,selected:(i.dataToUi||(e=>e)).call(null,e[n])});t[n].multiselect.connect(this,{change:"updateStates"});t[n].field=new OO.ui.FieldLayout(t[n].multiselect,{label:i.label,align:"top",help:i.help,helpInline:!0});break;case"button":t[n]={};t[n].button=new OO.ui.ButtonWidget({label:i.label,flags:i.flags});t[n].field=new OO.ui.FieldLayout(t[n].button,{label:i.fieldLabel,align:"top",help:i.help,helpInline:!0})}return t[n].field.$element}),o=class extends OO.ui.PageLayout{constructor(){super(i.name);this.$element.append(n)}setupOutlineItem(){this.outlineItem.setLabel(i.label)}};Object(u.j)(o,OO.ui.PageLayout);return new o(this)});t.removeData.button.connect(this,{click:"removeData"});t.desktopNotifications.select.connect(this,{choose:"onDesktopNotificationsSelectChange"});this.controls=t;return i}renderControls(e){l.a.initUi();this.bookletLayout=new OO.ui.BookletLayout({outlined:!0});this.bookletLayout.addPages(this.createPages(e));this.settingsPanel.$element.empty().append(this.bookletLayout.$element);this.updateStates()}getStatesSettings(){return l.a.scheme.states.reduce((e,t)=>{e[t]=this.settings[t];return e},{})}collectSettings(){const e={},t=this.controls;l.a.scheme.ui.forEach(i=>{i.controls.forEach(i=>{var n;const o=i.name;switch(i.type){case"checkbox":e[o]=t[o].input.isSelected();break;case"radio":e[o]=(null===(n=t[o].select.findSelectedItem())||void 0===n?void 0:n.getData())||l.a.scheme.default[o];break;case"text":e[o]=t[o].input.getValue();break;case"number":e[o]=Number(t[o].input.getValue());break;case"multicheckbox":e[o]=t[o].multiselect.findSelectedItemsData();break;case"multitag":e[o]=(i.uiToData||(e=>e)).call(null,t[o].multiselect.getValue())}})});return Object.assign({},l.a.scheme.default,e,this.getStatesSettings(),{"insertButtons-altered":JSON.stringify(e.insertButtons)!==JSON.stringify(l.a.scheme.default.insertButtons)})}updateStates(){var e=this;return o()((function*(){var t,i,n;const o=e.controls;o.collapseThreadsLevel.input.setDisabled(!o.enableThreads.input.isSelected());o.hideTimezone.input.setDisabled("relative"===(null===(t=o.timestampFormat.select.findSelectedItem())||void 0===t?void 0:t.getData()));o.notifyCollapsedThreads.input.setDisabled("none"===(null===(i=o.desktopNotifications.select.findSelectedItem())||void 0===i?void 0:i.getData())&&"none"===(null===(n=o.notifications.select.findSelectedItem())||void 0===n?void 0:n.getData()));o.showContribsLink.input.setDisabled(!o.reformatComments.input.isSelected());o.useTemplateData.input.setDisabled(!o.autocompleteTypes.multiselect.findItemFromData("templates").isSelected());let s=!0;const a=[].concat(...l.a.scheme.ui.map(e=>e.controls.filter(e=>"number"===e.type).map(e=>e.name)));yield Promise.all(a.map(e=>o[e].input.getValidity())).catch(()=>{s=!1});const r=e.collectSettings();e.actions.setAbilities({save:!Object(d.b)(r,e.settings)&&s,reset:!Object(d.b)(Object.assign({},r),Object.assign({},l.a.scheme.default,l.a.scheme.resetsTo,e.getStatesSettings()))})}))()}onDesktopNotificationsSelectChange(e){if("undefined"!=typeof Notification)if("none"!==e.data&&"granted"!==Notification.permission){OO.ui.alert(r.a.s("dn-grantpermission"));Notification.requestPermission(e=>{if("granted"!==e)this.controls.desktopNotifications.select.selectItemByData("none")})}}removeData(){var e=this;return o()((function*(){if(confirm(r.a.s("sd-removedata-confirm"))){e.pushPending();try{yield Promise.all([Object(m.t)(r.a.g.localSettingsOptionName,null),Object(m.t)(r.a.g.visitsOptionName,null),Object(m.t)(r.a.g.subscriptionsOptionName,null),Object(m.r)(r.a.g.settingsOptionName,null)])}catch(t){Object(u.g)(e,t,"sd-error-removedata",!1);return}mw.storage.remove("convenientDiscussions-commentForms");mw.storage.remove("convenientDiscussions-thanks");mw.storage.remove("convenientDiscussions-seenRenderedChanges");mw.storage.remove("convenientDiscussions-collapsedThreads");mw.storage.remove("convenientDiscussions-mutedUsers");e.stackLayout.setItem(e.dataRemovedPanel);e.actions.setMode("dataRemoved");e.popPending()}}))()}}a()(SettingsDialog,"name","settingsDialog");a()(SettingsDialog,"title",r.a.s("sd-title"));a()(SettingsDialog,"actions",[{action:"close",modes:["settings","reload","dataRemoved"],flags:["safe","close"],disabled:!0},{action:"save",modes:["settings"],label:r.a.s("sd-save"),flags:["primary","progressive"],disabled:!0},{action:"reset",modes:["settings"],label:r.a.s("sd-reset"),flags:["destructive"],disabled:!0},{action:"reload",modes:["reload"],label:r.a.s("sd-reload"),flags:["primary","progressive"]}]);a()(SettingsDialog,"size","large");Object(u.j)(SettingsDialog,OO.ui.ProcessDialog);t.default=SettingsDialog},function(e,t,i){"use strict";i.r(t);var n=i(4),o=i.n(n),s=i(21),a=i.n(s),r=i(6),c=i(0),l=i(2),d=i(3),u=i(16),m=i(11),h=i(1),g=i(7);class EditSubscriptionsDialog extends OO.ui.ProcessDialog{constructor(){super();if(!d.a.get("useTopicSubscription"))this.save=this.save.bind(this)}getBodyHeight(){return(this.$errorItems?this.$errors.prop("scrollHeight"):this.$body.prop("scrollHeight"))+1}initialize(...e){super.initialize(...e);this.pushPending();u.a.load();this.loadingPanel=new OO.ui.PanelLayout({padded:!0,expanded:!1});this.loadingPanel.$element.append($("<div>").text(c.a.s("loading-ellipsis")));this.sectionsPanel=new OO.ui.PanelLayout({padded:!1,expanded:!1});this.stackLayout=new OO.ui.StackLayout({items:[this.loadingPanel,this.sectionsPanel]});this.$body.append(this.stackLayout.$element)}getSetupProcess(e){return super.getSetupProcess(e).next(()=>{this.stackLayout.setItem(this.loadingPanel);this.actions.setMode("edit")})}getReadyProcess(e){var t=this;return super.getReadyProcess(e).next(o()((function*(){let e;try{yield u.a.getLoadRequest();e=yield Object(g.e)(u.a.getPageIds())}catch(e){Object(m.g)(t,e,"ewsd-error-processing",!1);return}e.sort((e,t)=>e.title>t.title?1:-1);const i=e.filter(e=>e.title).map(e=>u.a.getForPageId(e.pageid).map(t=>`${e.title}#${t}`).join("\n")).join("\n");t.input=new OO.ui.MultilineTextInputWidget({value:i,rows:30,classes:["cd-editSubscriptions-input"]});t.input.on("change",e=>{t.actions.setAbilities({save:e!==i})});t.sectionsPanel.$element.append(t.input.$element);t.stackLayout.setItem(t.sectionsPanel);Object(h.m)(t.input);t.actions.setAbilities({close:!0});t.$body.css("overflow","hidden");Object(h.S)(500).then(()=>{t.$body.css("overflow","")});t.updateSize();t.popPending();l.a.addPreventUnloadCondition("dialog",()=>Object(m.h)(t))})))}getActionProcess(e){var t=this;if("save"===e)return new OO.ui.Process(this.save);else if("close"===e)return new OO.ui.Process(o()((function*(){yield Object(m.a)(t,"ewsd")})));return super.getActionProcess(e)}save(){var e=this;return o()((function*(){e.updateSize();e.pushPending();const t={},i=[];e.input.getValue().split("\n").forEach(e=>{const n=e.match(/^(.+?)#(.+)$/);if(n){const e=n[1].trim(),o=n[2].trim();if(!t[e]){t[e]=[];i.push(e)}t[e].push(o)}});let n,o,s;try{({normalized:n,redirects:o,pages:s}=(yield Object(g.d)(i))||{})}catch(t){Object(m.g)(e,t,"ewsd-error-processing",!0);return}n.concat(o).filter(e=>t[e.from]).forEach(e=>{if(!t[e.to])t[e.to]=[];t[e.to].push(...t[e.from]);delete t[e.from]});const a={};s.filter(e=>void 0!==e.pageid).forEach(e=>{a[e.title]=e.pageid});const l={};Object.keys(t).filter(e=>a[e]).forEach(e=>{l[a[e]]=u.a.itemsToKeys(t[e].filter(h.Y))});try{u.a.saveLegacy(l)}catch(t){if(t instanceof r.a){const{type:i,code:n}=t.data;if("internal"===i&&"sizeLimit"===n)Object(m.g)(e,t,"ewsd-error-maxsize",!1);else Object(m.g)(e,t,"ewsd-error-processing",!0)}else Object(m.g)(e,t);e.actions.setAbilities({save:!0});return}e.popPending();e.close();mw.notify(c.a.s("ewsd-saved"))}))()}}a()(EditSubscriptionsDialog,"name","editSubscriptionsDialog");a()(EditSubscriptionsDialog,"title",c.a.s("ewsd-title"));a()(EditSubscriptionsDialog,"actions",[{action:"close",modes:["edit"],flags:["safe","close"],disabled:!0},{action:"save",modes:["edit"],label:c.a.s("ewsd-save"),flags:["primary","progressive"],disabled:!0}]);a()(EditSubscriptionsDialog,"size","large");Object(m.j)(EditSubscriptionsDialog,OO.ui.ProcessDialog);t.default=EditSubscriptionsDialog},function(e,t,i){"use strict";i.r(t);var n=i(4),o=i.n(n),s=i(21),a=i.n(s),r=i(6),c=i(22),l=i(0),d=i(1),u=i(11);class CopyLinkDialog extends OO.ui.MessageDialog{constructor(e,t){super({classes:["cd-dialog-copyLink"]});this.copyCallback=this.copyCallback.bind(this);this.object=e;this.content=t;this.isComment=this.object instanceof c.a}initialize(...e){super.initialize(...e);if(this.isComment){this.anchorOptionWidget=new OO.ui.ButtonOptionWidget({data:"anchor",label:l.a.s("cld-select-anchor"),selected:!0});this.diffOptionWidget=new OO.ui.ButtonOptionWidget({data:"diff",label:l.a.s("cld-select-diff"),disabled:!0,title:l.a.s("loading-ellipsis"),classes:["cd-dialog-copyLink-diffButton"]});this.buttonSelectWidget=new OO.ui.ButtonSelectWidget({items:[this.anchorOptionWidget,this.diffOptionWidget],classes:["cd-dialog-copyLink-linkTypeSelect"]}).on("choose",e=>{const t=e===this.anchorOptionWidget?this.anchorPanel:this.diffPanel;this.stackLayout.setItem(t);this.updateSize()})}this.anchorPanel=new OO.ui.PanelLayout({$content:this.createAnchorPanelContent(),padded:!1,expanded:!1,scrollable:!0});this.stackLayout=new OO.ui.StackLayout({items:[this.anchorPanel],expanded:!1});if(this.isComment)this.createDiffPanel()}getSetupProcess(e){return super.getSetupProcess(e).next(()=>{var e;this.title.setLabel(this.isComment?l.a.s("cld-title-comment"):l.a.s("cld-title-section"));this.message.setLabel($("<div>").append(null===(e=this.buttonSelectWidget)||void 0===e?void 0:e.$element,this.stackLayout.$element).children());this.size=this.isComment?"larger":"large";this.stackLayout.setItem(this.anchorPanel)})}copyCallback(e){Object(d.e)(e,this.content.copyMessages);this.close()}createDiffPanel(){var e=this;return o()((function*(){let t;try{Object.assign(e.content,{diffStandard:yield e.object.getDiffLink("standard"),diffShort:yield e.object.getDiffLink("short"),diffWikilink:yield e.object.getDiffLink("wikilink"),$diffView:yield e.object.generateDiffView()});mw.hook("wikipage.content").fire(e.content.$diffView);if(Object(d.g)("mediawiki.diff.styles"))return;yield mw.loader.using(["mediawiki.diff","mediawiki.diff.styles"])}catch(e){if(e instanceof r.a){const{type:i}=e.data;t="network"===i?l.a.s("cld-diff-error-network"):l.a.s("cld-diff-error")}else{t=l.a.s("cld-diff-error-unknown");console.warn(e)}}e.diffPanel=new OO.ui.PanelLayout({$content:e.createDiffPanelContent(),padded:!1,expanded:!1,scrollable:!0});e.stackLayout.addItems([e.diffPanel]);e.diffOptionWidget.setDisabled(t);e.diffOptionWidget.setTitle(t||"")}))()}createAnchorPanelContent(){let e,t;if(this.isComment&&this.content.fragment===this.object.id){e=l.a.s("cld-help-onlycd");t=Object(d.Z)(l.a.sParse("cld-help-notonlycd"))}const i=this.copyCallback,n=Object(u.c)({value:this.content.wikilink,disabled:!this.content.wikilink,label:l.a.s("cld-wikilink"),copyCallback:i,help:e}),o=Object(u.c)({value:this.content.currentPageWikilink,label:l.a.s("cld-currentpagewikilink"),copyCallback:i,help:t}),s=Object(u.c)({value:this.content.permanentWikilink,label:l.a.s("cld-permanentwikilink"),copyCallback:i,help:e}),a=Object(u.c)({value:this.content.link,label:l.a.s("cld-link"),copyCallback:i,help:e}),r=Object(u.c)({value:this.content.permanentLink,label:l.a.s("cld-permanentlink"),copyCallback:i,help:e}),c=$("<div>").append(n.$element,o.$element,s.$element,a.$element,r.$element).children();$("<input>").addClass("cd-hidden").prependTo(c.first());return c}createDiffPanelContent(){const e=this.copyCallback,t=Object(u.c)({value:this.content.diffStandard,disabled:!this.content.diffStandard,label:l.a.s("cld-diff"),copyCallback:e}),i=Object(u.c)({value:this.content.diffShort,disabled:!this.content.diffShort,label:l.a.s("cld-shortdiff"),copyCallback:e}),n=Object(u.c)({value:this.content.diffWikilink,disabled:!this.content.diffWikilink,label:l.a.s("cld-diffwikilink"),copyCallback:e});return $("<div>").append(t.$element,i.$element,n.$element,this.content.$diffView).children()}}a()(CopyLinkDialog,"name","copyLinkDialog");a()(CopyLinkDialog,"actions",[{label:l.a.s("cld-close"),action:"close"}]);Object(u.j)(CopyLinkDialog,OO.ui.MessageDialog);t.default=CopyLinkDialog},function(e,t,i){"use strict";i.r(t);var n=i(5),o=i(0),s=i(2),a=i(15),r=i(8),c=i(1);const l={};let d;const u="ru.wikipedia.org"===location.hostname?"cd":"convenientDiscussions",m="ru.wikipedia.org"===location.hostname?"watchedTopics":"watchedSections",h=mw.config.get("wgServer"),g=document.body.classList;Object.assign(o.a,{s(e,...t){var i;if(!e)return null;const n="convenient-discussions-"+e;let o={},s=t[t.length-1];if("object"==typeof s&&!s.options){o=s;t.splice(t.length-1)}null!==(i=d)&&void 0!==i||(d=/[?&]uselang=qqx(?=&|$)/.test(location.search));if(!d&&null!==mw.messages.get(n))return mw.message(n,...t)[o.parse?"parse":"text"]();else{return`(${n}${t.length?": "+t.join(", "):""})`}},sParse(e,...t){if(t.some(e=>/[<>]/.test(e))){mw.messages.set("convenient-discussions-parsehack",o.a.s(e,...t));return mw.message("convenient-discussions-parsehack").parse()}return o.a.s(e,...t,{parse:!0})},mws(e,...t){let i,n=t[t.length-1];if("object"==typeof n){i=n;t.splice(t.length-1)}if(i&&"content"===i.language)e="(content)"+e;if(!t.length&&l[e])return l[e];const o=mw.message(e,...t).parse();if(!t.length)l[e]=o;return o},debug:a.a,tests:{controller:s.a},api:{pageRegistry:r.b,generateCommentId:n.a.generateId.bind(n.a),parseCommentId:n.a.parseId.bind(n.a),buildEditSummary:c.c,isPageOverlayOn:s.a.isPageOverlayOn.bind(s.a),wrap:c.Z,wrapDiffBody:c.ab},isWorker:!1});Object.assign(o.a.g,{letterPattern:"A-Za-z\\u00aa\\u00b5\\u00ba\\u00c0-\\u00d6\\u00d8-\\u00f6\\u00f8-\\u02c1\\u02c6-\\u02d1\\u02e0-\\u02e4\\u02ec\\u02ee\\u0370-\\u0374\\u0376\\u0377\\u037a-\\u037d\\u037f\\u0386\\u0388-\\u038a\\u038c\\u038e-\\u03a1\\u03a3-\\u03f5\\u03f7-\\u0481\\u048a-\\u052f\\u0531-\\u0556\\u0559\\u0561-\\u0587\\u05d0-\\u05ea\\u05f0-\\u05f2\\u0620-\\u064a\\u066e\\u066f\\u0671-\\u06d3\\u06d5\\u06e5\\u06e6\\u06ee\\u06ef\\u06fa-\\u06fc\\u06ff\\u0710\\u0712-\\u072f\\u074d-\\u07a5\\u07b1\\u07ca-\\u07ea\\u07f4\\u07f5\\u07fa\\u0800-\\u0815\\u081a\\u0824\\u0828\\u0840-\\u0858\\u08a0-\\u08b4\\u0904-\\u0939\\u093d\\u0950\\u0958-\\u0961\\u0971-\\u0980\\u0985-\\u098c\\u098f\\u0990\\u0993-\\u09a8\\u09aa-\\u09b0\\u09b2\\u09b6-\\u09b9\\u09bd\\u09ce\\u09dc\\u09dd\\u09df-\\u09e1\\u09f0\\u09f1\\u0a05-\\u0a0a\\u0a0f\\u0a10\\u0a13-\\u0a28\\u0a2a-\\u0a30\\u0a32\\u0a33\\u0a35\\u0a36\\u0a38\\u0a39\\u0a59-\\u0a5c\\u0a5e\\u0a72-\\u0a74\\u0a85-\\u0a8d\\u0a8f-\\u0a91\\u0a93-\\u0aa8\\u0aaa-\\u0ab0\\u0ab2\\u0ab3\\u0ab5-\\u0ab9\\u0abd\\u0ad0\\u0ae0\\u0ae1\\u0af9\\u0b05-\\u0b0c\\u0b0f\\u0b10\\u0b13-\\u0b28\\u0b2a-\\u0b30\\u0b32\\u0b33\\u0b35-\\u0b39\\u0b3d\\u0b5c\\u0b5d\\u0b5f-\\u0b61\\u0b71\\u0b83\\u0b85-\\u0b8a\\u0b8e-\\u0b90\\u0b92-\\u0b95\\u0b99\\u0b9a\\u0b9c\\u0b9e\\u0b9f\\u0ba3\\u0ba4\\u0ba8-\\u0baa\\u0bae-\\u0bb9\\u0bd0\\u0c05-\\u0c0c\\u0c0e-\\u0c10\\u0c12-\\u0c28\\u0c2a-\\u0c39\\u0c3d\\u0c58-\\u0c5a\\u0c60\\u0c61\\u0c85-\\u0c8c\\u0c8e-\\u0c90\\u0c92-\\u0ca8\\u0caa-\\u0cb3\\u0cb5-\\u0cb9\\u0cbd\\u0cde\\u0ce0\\u0ce1\\u0cf1\\u0cf2\\u0d05-\\u0d0c\\u0d0e-\\u0d10\\u0d12-\\u0d3a\\u0d3d\\u0d4e\\u0d5f-\\u0d61\\u0d7a-\\u0d7f\\u0d85-\\u0d96\\u0d9a-\\u0db1\\u0db3-\\u0dbb\\u0dbd\\u0dc0-\\u0dc6\\u0e01-\\u0e30\\u0e32\\u0e33\\u0e40-\\u0e46\\u0e81\\u0e82\\u0e84\\u0e87\\u0e88\\u0e8a\\u0e8d\\u0e94-\\u0e97\\u0e99-\\u0e9f\\u0ea1-\\u0ea3\\u0ea5\\u0ea7\\u0eaa\\u0eab\\u0ead-\\u0eb0\\u0eb2\\u0eb3\\u0ebd\\u0ec0-\\u0ec4\\u0ec6\\u0edc-\\u0edf\\u0f00\\u0f40-\\u0f47\\u0f49-\\u0f6c\\u0f88-\\u0f8c\\u1000-\\u102a\\u103f\\u1050-\\u1055\\u105a-\\u105d\\u1061\\u1065\\u1066\\u106e-\\u1070\\u1075-\\u1081\\u108e\\u10a0-\\u10c5\\u10c7\\u10cd\\u10d0-\\u10fa\\u10fc-\\u1248\\u124a-\\u124d\\u1250-\\u1256\\u1258\\u125a-\\u125d\\u1260-\\u1288\\u128a-\\u128d\\u1290-\\u12b0\\u12b2-\\u12b5\\u12b8-\\u12be\\u12c0\\u12c2-\\u12c5\\u12c8-\\u12d6\\u12d8-\\u1310\\u1312-\\u1315\\u1318-\\u135a\\u1380-\\u138f\\u13a0-\\u13f5\\u13f8-\\u13fd\\u1401-\\u166c\\u166f-\\u167f\\u1681-\\u169a\\u16a0-\\u16ea\\u16f1-\\u16f8\\u1700-\\u170c\\u170e-\\u1711\\u1720-\\u1731\\u1740-\\u1751\\u1760-\\u176c\\u176e-\\u1770\\u1780-\\u17b3\\u17d7\\u17dc\\u1820-\\u1877\\u1880-\\u18a8\\u18aa\\u18b0-\\u18f5\\u1900-\\u191e\\u1950-\\u196d\\u1970-\\u1974\\u1980-\\u19ab\\u19b0-\\u19c9\\u1a00-\\u1a16\\u1a20-\\u1a54\\u1aa7\\u1b05-\\u1b33\\u1b45-\\u1b4b\\u1b83-\\u1ba0\\u1bae\\u1baf\\u1bba-\\u1be5\\u1c00-\\u1c23\\u1c4d-\\u1c4f\\u1c5a-\\u1c7d\\u1ce9-\\u1cec\\u1cee-\\u1cf1\\u1cf5\\u1cf6\\u1d00-\\u1dbf\\u1e00-\\u1f15\\u1f18-\\u1f1d\\u1f20-\\u1f45\\u1f48-\\u1f4d\\u1f50-\\u1f57\\u1f59\\u1f5b\\u1f5d\\u1f5f-\\u1f7d\\u1f80-\\u1fb4\\u1fb6-\\u1fbc\\u1fbe\\u1fc2-\\u1fc4\\u1fc6-\\u1fcc\\u1fd0-\\u1fd3\\u1fd6-\\u1fdb\\u1fe0-\\u1fec\\u1ff2-\\u1ff4\\u1ff6-\\u1ffc\\u2071\\u207f\\u2090-\\u209c\\u2102\\u2107\\u210a-\\u2113\\u2115\\u2119-\\u211d\\u2124\\u2126\\u2128\\u212a-\\u212d\\u212f-\\u2139\\u213c-\\u213f\\u2145-\\u2149\\u214e\\u2183\\u2184\\u2c00-\\u2c2e\\u2c30-\\u2c5e\\u2c60-\\u2ce4\\u2ceb-\\u2cee\\u2cf2\\u2cf3\\u2d00-\\u2d25\\u2d27\\u2d2d\\u2d30-\\u2d67\\u2d6f\\u2d80-\\u2d96\\u2da0-\\u2da6\\u2da8-\\u2dae\\u2db0-\\u2db6\\u2db8-\\u2dbe\\u2dc0-\\u2dc6\\u2dc8-\\u2dce\\u2dd0-\\u2dd6\\u2dd8-\\u2dde\\u2e2f\\u3005\\u3006\\u3031-\\u3035\\u303b\\u303c\\u3041-\\u3096\\u309d-\\u309f\\u30a1-\\u30fa\\u30fc-\\u30ff\\u3105-\\u312d\\u3131-\\u318e\\u31a0-\\u31ba\\u31f0-\\u31ff\\u3400-\\u4db5\\u4e00-\\u9fd5\\ua000-\\ua48c\\ua4d0-\\ua4fd\\ua500-\\ua60c\\ua610-\\ua61f\\ua62a\\ua62b\\ua640-\\ua66e\\ua67f-\\ua69d\\ua6a0-\\ua6e5\\ua717-\\ua71f\\ua722-\\ua788\\ua78b-\\ua7ad\\ua7b0-\\ua7b7\\ua7f7-\\ua801\\ua803-\\ua805\\ua807-\\ua80a\\ua80c-\\ua822\\ua840-\\ua873\\ua882-\\ua8b3\\ua8f2-\\ua8f7\\ua8fb\\ua8fd\\ua90a-\\ua925\\ua930-\\ua946\\ua960-\\ua97c\\ua984-\\ua9b2\\ua9cf\\ua9e0-\\ua9e4\\ua9e6-\\ua9ef\\ua9fa-\\ua9fe\\uaa00-\\uaa28\\uaa40-\\uaa42\\uaa44-\\uaa4b\\uaa60-\\uaa76\\uaa7a\\uaa7e-\\uaaaf\\uaab1\\uaab5\\uaab6\\uaab9-\\uaabd\\uaac0\\uaac2\\uaadb-\\uaadd\\uaae0-\\uaaea\\uaaf2-\\uaaf4\\uab01-\\uab06\\uab09-\\uab0e\\uab11-\\uab16\\uab20-\\uab26\\uab28-\\uab2e\\uab30-\\uab5a\\uab5c-\\uab65\\uab70-\\uabe2\\uac00-\\ud7a3\\ud7b0-\\ud7c6\\ud7cb-\\ud7fb\\uf900-\\ufa6d\\ufa70-\\ufad9\\ufb00-\\ufb06\\ufb13-\\ufb17\\ufb1d\\ufb1f-\\ufb28\\ufb2a-\\ufb36\\ufb38-\\ufb3c\\ufb3e\\ufb40\\ufb41\\ufb43\\ufb44\\ufb46-\\ufbb1\\ufbd3-\\ufd3d\\ufd50-\\ufd8f\\ufd92-\\ufdc7\\ufdf0-\\ufdfb\\ufe70-\\ufe74\\ufe76-\\ufefc\\uff21-\\uff3a\\uff41-\\uff5a\\uff66-\\uffbe\\uffc2-\\uffc7\\uffca-\\uffcf\\uffd2-\\uffd7\\uffda-\\uffdc",commentHoveredBackgroundColor:"#f8f9fa",commentTargetMarkerColor:"#fc3",commentTargetBackgroundColor:"#fef6e7",commentTargetHoverBackgroundColor:"#fef2db",commentNewMarkerColor:"#00af89",commentNewBackgroundColor:"#edffed",commentNewHoveredBackgroundColor:"#e4ffe4",commentOwnMarkerColor:"#9f33cc",commentOwnBackgroundColor:"#faf3fc",commentOwnHoveredBackgroundColor:"#f7edfb",commentDeletedMarkerColor:"#d33",commentDeletedBackgroundColor:"#fee7e6",commentDeletedHoveredBackgroundColor:"#fddbd9",commentFallbackSideMargin:10,threadLineSideMargin:3,updateCheckInterval:15,backgroundUpdateCheckInterval:60,msInMin:6e4,msInDay:864e5,popularNotInlineElements:["BLOCKQUOTE","DD","DIV","DL","DT","FIGURE","FIGCAPTION","FORM","H1","H2","H3","H4","H5","H6","HR","INPUT","LI","LINK","OL","P","PRE","STYLE","TABLE","TBODY","TR","TH","TD","UL"],popularInlineElements:["A","ABBR","B","BIG","BR","CENTER","CITE","CODE","DEL","EM","FONT","I","IMG","INS","KBD","Q","S","SAMP","SMALL","SPAN","STRIKE","STRONG","SUB","SUP","TIME","TT","U","VAR"],badHighlightableElements:["BLOCKQUOTE","DL","FORM","HR","OL","PRE","TABLE","UL"],unhighlightableElementClasses:["mw-empty-elt","tleft","tright","floatleft","floatright","cd-moveMark"],badCommentBeginnings:[/^<!--[^]*?--> *\n+/,/^(?:----+|<hr>) *\n+/i,/^\{\|.*?\|\} *\n+(?=[*:#])/],signCode:"~~".concat("~~"),allowedTags:["abbr","b","bdi","bdo","blockquote","br","caption","cite","code","data","dd","del","dfn","div","dl","dt","em","h1","h2","h3","h4","h5","h6","hr","i","ins","kbd","li","link","mark","meta","ol","p","pre","q","rp","rt","rtc","ruby","s","samp","small","span","strong","sub","sup","table","td","th","time","tr","translate","tvar","u","ul","var","wbr","gallery","includeonly","noinclude","nowiki","onlyinclude","categorytree","charinsert","chem","ce","graph","hiero","imagemap","indicator","inputbox","mapframe","maplink","math","poem","ref","references","score","section","syntaxhighlight","templatedata","templatestyles","timeline"],inputPropsAffectingCoords:["borderBottomStyle","borderBottomWidth","borderLeftStyle","borderLeftWidth","borderRightStyle","borderRightWidth","borderTopStyle","borderTopWidth","boxSizing","direction","fontFamily","fontSize","fontSizeAdjust","fontStretch","fontStyle","fontVariant","fontWeight","height","letterSpacing","lineHeight","overflowX","overflowY","paddingBottom","paddingLeft","paddingRight","paddingTop","tabSize","textAlign","textDecoration","textIndent","textTransform","width","wordSpacing"],settingsOptionName:"userjs-convenientDiscussions-settings",localSettingsOptionName:`userjs-${u}-localSettings`,visitsOptionName:`userjs-${u}-visits`,subscriptionsOptionName:`userjs-${u}-${m}`,server:h.startsWith("//")?location.protocol+h:h,hostname:location.hostname,pageName:Object(c.W)(mw.config.get("wgPageName")),pageTitle:Object(c.W)(mw.config.get("wgTitle")),namespaceNumber:mw.config.get("wgNamespaceNumber"),userName:mw.config.get("wgUserName")||"<unregistered>",contentTextDirection:g.contains("sitedir-rtl")?"rtl":"ltr",skin:mw.config.get("skin"),isMobile:/Mobi|Android/i.test(navigator.userAgent)||void 0!==window.orientation,isDtReplyToolEnabled:g.contains("ext-discussiontools-replytool-enabled"),isDtNewTopicToolEnabled:g.contains("ext-discussiontools-newtopictool-enabled"),isDtTopicSubscriptionEnabled:g.contains("ext-discussiontools-topicsubscription-enabled"),isDtVisualEnhancementsEnabled:g.contains("ext-discussiontools-visualenhancements-enabled")})},function(e,t,i){"use strict";i.r(t);var n=i(4),o=i.n(n),s=i(42),a=i(41),r=i(38),cd=i(0),c=i(2),l=i(15),d={messages:{},specialPageAliases:{},substAliases:[],timezone:null,useGlobalPreferences:!0,customTalkNamespaces:mw.config.get("wgExtraSignatureNamespaces"),pageWhitelist:[],pageBlacklist:[],userNamespacesByGender:null,genderNeutralUserNamespaceAlias:null,archivePaths:[],pagesWithoutArchives:[],idleFragments:[],defaultIndentationChar:":",spaceAfterIndentationChars:!0,indentationCharMode:"mimic",defaultSignaturePrefix:" ",signaturePrefixRegexp:/(?:\s[-\u2013\u2212\u2014\u2015]+\xa0?[A-Z][A-Za-z-_]*)?(?:\s+>+)?(?:[\xb7\u2022\-\u2011\u2013\u2212\u2014\u2015\u2500~\u2053/\u2192\u21d2\s\u200e\u200f]|&\w+;|&#\d+;)*(?:\s+\()?$/,signatureEndingRegexp:null,tagName:null,scriptCodeName:"convenient-discussions",scriptPageWikilink:"c:Special:MyLanguage/User:JWBTH/CD",hookToFireWithAuthorWrappers:"wikipage.content",unsignedTemplates:["unsigned","unsignedIP","unsigned2","unsignedIP2"],unsignedClass:"autosigned",pairQuoteTemplates:[[],[]],smallDivTemplates:[],paragraphTemplates:[],outdentTemplates:[],outdentClass:"outdent-template",clearTemplates:[],mentionCharacter:"@",mentionRequiresLeadingSpace:!0,quoteFormatting:["> ''","''"],elementsToExcludeClasses:["cd-moveMark"],templatesToExclude:[],commentAntipatterns:[],customBadCommentBeginnings:[],keepInSectionEnding:[/\n{2,}(?:<!--[^]*?-->\s*)+$/,/\n+(?:<!--[^]*?-->\s*)*<\/?(?:section|onlyinclude)(?: [\w ]+(?:=[^<>]+?)?)? *\/?>\s*(?:<!--[^]*?-->\s*)*$/i,/\n+<noinclude>([^]*?)<\/noinclude>\s*$/i],signatureScanLimit:100,foreignElementInHeadlineClasses:[],closedDiscussionTemplates:[[],[]],closedDiscussionClasses:[],customUnhighlightableElementClasses:[],customAddTopicLinkSelectors:[],defaultInsertButtons:[],longCommentThreshold:1e4,bytesToDeemComment:50,summaryCommentTextLengthLimit:50,noConfirmPostEmptyCommentPageRegexp:null,indentationCharsPattern:"([:*#]+)( *)",undoTexts:[],customTextReactions:[],customCommentFormModules:[],transformSummary:null,preTransformCode:null,postTransformCode:null,checkForCustomForeignComponents:null,beforeAuthorLinkParse:null,afterAuthorLinkParse:null,areNewTopicsOnTop:null,getMoveSourcePageCode:function(e,t,i){return'<div class="cd-moveMark">'+convenientDiscussions.s("move-sourcepagecode",e,t,i)+"</div>\n"},getMoveTargetPageCode:function(e,t){return'<div class="cd-moveMark">'+convenientDiscussions.s("move-targetpagecode",e,t)+"</div>\n"},getAnchorCode:function(e){return'<span id="'+e+'"></span>'}},u=i(39),m=i(1);if(0);function h(){const e=["es-","cf-autocomplete-commentlinktext","move-"];if(1)i(53);const t={};Object.keys(cd.a.i18n.en).forEach(i=>{var n;const o=e.some(e=>i===e||e.endsWith("-")&&i.startsWith(e))?cd.a.g.contentLanguage:cd.a.g.userLanguage;t[i]=(null===(n=cd.a.i18n[o])||void 0===n?void 0:n[i])||cd.a.i18n.en[i]});Object.keys(t).forEach(e=>{mw.messages.set("convenient-discussions-"+e,t[e])})}function g(){if(!mw.config.get("wgIsArticle"))return;const e=!c.a.isTalkPage(),t=new URL(location.href);t.searchParams.set("cdtalkpage",e?"1":"0");const i=$("<li>").attr("id","footer-places-togglecd"),n=$("<a>").attr("href",t.toString()).addClass("noprint").text(cd.a.s(e?"footer-runcd":"footer-dontruncd")).appendTo(i);if(e)n.on("click",e=>{if(!(e.ctrlKey||e.shiftKey||e.metaKey)){e.preventDefault();history.pushState(history.state,"",t.toString());i.remove();p()}});Object(m.t)().append(i)}function f(){const e=mw.user.options.get("discussiontools-newtopictool-createpage");if(!c.a.isArticlePageTalkPage()||"view"===mw.config.get("wgAction")&&!e)return;const t=$("#ca-addsection a"),i=t.prop("href");if(i){const n=new URL(i);if(e)n.searchParams.set("dtenable",0);else{n.searchParams.delete("action");n.searchParams.delete("section");n.searchParams.set("cdaddtopic",1)}t.attr("href",n)}}function p(){return b.apply(this,arguments)}function b(){return(b=o()((function*(){l.a.startTimer("start");i(84);if(void 0===cd.a.g.pageWhitelistRegexp){cd.a.config=Object.assign(d,cd.a.config);cd.a.g.pageWhitelistRegexp=Object(m.L)(cd.a.config.pageWhitelist);cd.a.g.pageBlacklistRegexp=Object(m.L)(cd.a.config.pageBlacklist);h()}c.a.init();c.a.loadToTalkPage();g();f();c.a.loadToCommentLinksPage();Object(u.a)();if(!c.a.isBooting())l.a.stopTimer("start");mw.hook("convenientDiscussions.preprocessed").fire(cd.a)}))).apply(this,arguments)}function v(){const e=e=>a.includes(e)?e:(r[e]||[]).find(e=>a.includes(e))||"en";cd.a.g.userLanguage=e(mw.config.get("wgUserLanguage"));cd.a.g.contentLanguage=e(mw.config.get("wgContentLanguage"));return!(cd.a.g.userLanguage===mw.config.get("wgUserLanguage")&&cd.a.g.contentLanguage===mw.config.get("wgContentLanguage"))}function y(){return new Promise((e,t)=>{let i=location.hostname;if(0);const n=s[i]||s[location.hostname];if(n){const i=e=>{t(["Convenient Discussions can't run: couldn't load the configuration.",e])},[,o]=n.match(/modules=ext.gadget.([^?&]+)/)||[];if(o&&mw.user.options.get("gadget-"+o)){mw.loader.using("ext.gadget."+o).then(()=>{e()});return}mw.loader.getScript(n).then(()=>{e()},i)}else e()})}function w(){const e=[cd.a.g.userLanguage,cd.a.g.contentLanguage].filter(m.Y).filter(e=>{var t;return"en"!==e&&!(null!==(t=cd.a.i18n)&&void 0!==t&&t[e])}).map(e=>{const t=`https://commons.wikimedia.org/w/index.php?title=User:Jack_who_built_the_house/convenientDiscussions-i18n/${e}.js&action=raw&ctype=text/javascript`;return mw.loader.getScript(t)});return Promise.all(e).catch(()=>{})}function x(){return(x=o()((function*(){if(cd.a.isRunning){console.warn("One instance of Convenient Discussions is already running.");return}cd.a.isRunning=!0;if(/(^|\.)m\./.test(location.hostname)||/[?&]cdenable=(0|false|no|n)(?=&|$)/.test(location.search)||"wikitext"!==mw.config.get("wgPageContentModel")||$(".lqt-talkpage").length||mw.config.get("wgIsMainPage"))return;if(0);cd.a.g={};l.a.init();l.a.startTimer("total time");l.a.startTimer("loading config and strings");mw.hook("convenientDiscussions.launched").fire(cd.a);const e=v()?w():!cd.a.i18n&&(cd.a.getStringsPromise||w());try{yield Promise.all([!cd.a.config&&y(),e])}catch(e){console.error(e);return}l.a.stopTimer("loading config and strings");$(p)}))).apply(this,arguments)}!function(){x.apply(this,arguments)}()}]);
//# sourceMappingURL=https://tools-static.wmflabs.org/convenient-discussions/source-maps/convenientDiscussions.js.map.json
/*! </nowiki> */