User:Jack who built the house/convenientDiscussions.js

From Wikimedia Commons, the free media repository
Jump to navigation Jump to search
Note: After saving, you have to bypass your browser's cache to see the changes. Internet Explorer: press Ctrl-F5, Mozilla: hold down Shift while clicking Reload (or press Ctrl-Shift-R), Opera/Konqueror: press F5, Safari: hold down Shift + Alt while clicking Reload, Chrome: hold down Shift while clicking Reload.
/*! 
 * For documentation and feedback, see the script's homepage:
 * https://commons.wikimedia.org/wiki/User:Jack_who_built_the_house/Convenient_Discussions
 *
 * For license information, see
 * https://commons.wikimedia.org/wiki/User:Jack_who_built_the_house/convenientDiscussions.js.LICENSE.js
 */
/*! <nowiki> */!function(e){var t={};function i(n){if(t[n])return t[n].exports;var s=t[n]={i:n,l:!1,exports:{}};e[n].call(s.exports,s,s.exports,i);s.l=!0;return s.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 s in e)i.d(n,s,function(t){return e[t]}.bind(null,s));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=98)}([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,"c",(function(){return r}));i.d(t,"K",(function(){return c}));i.d(t,"v",(function(){return l}));i.d(t,"l",(function(){return d}));i.d(t,"x",(function(){return u}));i.d(t,"t",(function(){return h}));i.d(t,"y",(function(){return m}));i.d(t,"h",(function(){return p}));i.d(t,"i",(function(){return g}));i.d(t,"F",(function(){return f}));i.d(t,"j",(function(){return b}));i.d(t,"J",(function(){return v}));i.d(t,"H",(function(){return y}));i.d(t,"D",(function(){return w}));i.d(t,"I",(function(){return x}));i.d(t,"n",(function(){return k}));i.d(t,"A",(function(){return C}));i.d(t,"b",(function(){return T}));i.d(t,"C",(function(){return S}));i.d(t,"z",(function(){return E}));i.d(t,"d",(function(){return O}));i.d(t,"a",(function(){return N}));i.d(t,"E",(function(){return P}));i.d(t,"m",(function(){return L}));i.d(t,"L",(function(){return $}));i.d(t,"r",(function(){return I}));i.d(t,"u",(function(){return D}));i.d(t,"q",(function(){return j}));i.d(t,"w",(function(){return A}));i.d(t,"g",(function(){return M}));i.d(t,"o",(function(){return _}));i.d(t,"k",(function(){return F}));i.d(t,"f",(function(){return B}));i.d(t,"G",(function(){return H}));i.d(t,"p",(function(){return R}));i.d(t,"B",(function(){return U}));i.d(t,"e",(function(){return W}));i.d(t,"s",(function(){return Y}));i(3);var n=i(54),s=i.n(n),o=i(6),a=i(0);function r({text:e,optionalText:t,section:i,addPostfix:n=!0}){let s,o=(i?`/* ${i} */ `:"")+e.trim();if(t){let e=o+t;if(a.a.config.transformSummary)e=a.a.config.transformSummary(e);if(e.length<=a.a.g.summaryLengthLimit){o=e;s=!0}}if(!s){if(a.a.config.transformSummary)o=a.a.config.transformSummary(o);if(o.length>a.a.g.summaryLengthLimit)o=o.slice(0,a.a.g.summaryLengthLimit-1)+"\u2026"}if(n)o+=a.a.g.summaryPostfix;return o}function c(e,t,i){return i.indexOf(e)===t}function l(e,t=!1){if(t&&e.nodeType===Node.TEXT_NODE)return!0;if(e.nodeType!==Node.ELEMENT_NODE)return null;if(a.a.g.popularInlineElements.includes(e.tagName)||"META"===e.tagName&&"mw:PageProp/toc"===e.getAttribute("property"))return!0;else if(a.a.g.popularNotInlineElements.includes(e.tagName))return!1;else if("undefined"!=typeof window){console.warn("Convenient Discussions: Expensive operation: isInline() called for:",e);return window.getComputedStyle(e).display.startsWith("inline")}else return null}function d(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 u(e,t){var i,n;return(t%2==1||(null===(i=a.a.g.pageWhitelistRegexp)||void 0===i?void 0:i.test(e))||!a.a.g.pageWhitelistRegexp&&a.a.config.customTalkNamespaces.includes(t))&&!(null!==(n=a.a.g.pageBlacklistRegexp)&&void 0!==n&&n.test(e))}function h(e){return e&&(e.includes(`${a.a.s("es-edit")} ${a.a.s("es-reply-genitive")}`)||e.includes(`${a.a.s("es-edit")} ${a.a.s("es-addition-genitive")}`))}function m(e){return e&&a.a.config.undoTexts.some(t=>e.includes(t))}function p(e){return void 0!==e}function g(e){return null!=e}function f(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 b(e){return[].concat(...e)}function v(e){return e.replace(/_/g," ")}function y(e){return e.replace(/ /g,"_")}function w(e){return e.replace(/ {2,}/g," ")}function x(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===a.a.g.phpCharToUpper[e])return e;else return a.a.g.phpCharToUpper[e]||e.toUpperCase()}(t)+e.slice(t.length)}function k(e){return e.map(e=>a.a.g.contentLanguageMessages[e])}function C(e){const t=(e||[]).map(e=>e.source||e).join("|");return t?new RegExp(`(${t})`):null}function T(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 s=Object.keys(e).filter(t=>void 0!==e[t]),o=Object.keys(t).filter(e=>void 0!==t[e]);return s.length===o.length&&s.every(i=>T(e[i],t[i]))}function S(e,t){return e.replace(/[\u200e\u200f]/g,t?" ":"")}function E(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(!T(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 O(e,t,i){const n=new RegExp(`[${a.a.g.letterPattern}]{2,}`,"g"),s=e=>((i?e.toLowerCase():e).match(n)||[]).filter(c);return function(e,t){if(!e.length||!t.length)return 0;let i=t.length,n=0;e.forEach(e=>{if(t.includes(e))n++;else i++});return n/i}(s(e),s(t))}function N(e,t){if(void 0!==t&&!e.includes(t))e.push(t)}function P(e,t){if(void 0!==t&&e.includes(t))e.splice(e.indexOf(t),1)}function L(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 $(e,t){return("0000"+e).slice(-t)}function I(e){return Array.isArray(e)?e[e.length-1]:e}function D(e,t=!1){var i;return!t&&(null===(i=e.classList)||void 0===i?void 0:i.contains("mw-heading"))||["H1","H2","H3","H4","H5","H6"].includes(e.tagName)}function j(e){if(!e.tagName||void 0===e.className)return null;else return Number((e.tagName.match(/^H([1-6])$/)||e.className.match(/\bmw-heading([1-6])\b/)||[])[1])||null}function A(e){return["STYLE","LINK"].includes(e.tagName)}function M(e){if(-1===e.indexOf("&"))return e;else{let t=e;if(-1!==t.indexOf("&#38;amp;"))t=t.replace(/&#38;amp;/g,"&amp;amp;");if(-1!==t.indexOf("&#"))t=t.replace(/&#(\d+);/g,(e,t)=>String.fromCharCode(t));if(-1!==t.indexOf("&"))t=s()(t);return t}}function _(){return Math.floor(Date.now()/a.a.g.msInDay)}function F(e,t){return $(e.getUTCFullYear(),4)+$(e.getUTCMonth()+1,2)+$(e.getUTCDate(),2)+$(e.getUTCHours(),2)+$(e.getUTCMinutes(),2)+(t||"")}function B(e,t){if(!t.global)throw new o.a('The regexp supplied to countOccurrences() must have the "g" flag.');return(e.match(t)||[]).length}function H(e){return new Promise(t=>setTimeout(t,e))}function R(e){const t={"api.wikimedia.org":"apiportalwiki","be-tarask.wikipedia.org":"be_x_oldwiki","ee.wikimedia.org":"etwikimedia","wikitech.wikimedia.org":"labswiki","www.mediawiki.org":"mediawikiwiki","wikisource.org":"sourceswiki","test-commons.wikimedia.org":"testcommonswiki","test.wikidata.org":"testwikidatawiki","www.wikidata.org":"wikidatawiki","www.wikifunctions.org":"wikifunctionswiki"};if(t[e])return t[e];let[,i,n]=e.match(/^([^.]+)\.(wikibooks|wikinews|wikiquote|wikisource|wikiversity|wikivoyage|wiktionary|wikimedia|wikipedia)\./)||[];i=i.replace(/-/g,"_");if("wikipedia"===n||"wikimedia"===n&&/^(advisory|commons|donate|foundation|incubator|login|meta|outreach|quality|species|strategy|usability|vote)$|^wikimania/.test(i))n="wiki";return i+n}function U(e){let t,i=a.a.g.serverName,n=e.replace(/^(?:https?:)?\/\/([^/]+)/,(e,t)=>{i=t;return""}).replace(a.a.g.articlePathRegexp,"$1").replace(a.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,hostname:i,fragment:t}}function W(e){return decodeURIComponent(e.slice(e.indexOf("/wiki/")+6)).replace(/_/g," ")}function Y(e){const t=location.search.match(new RegExp("[?&]"+e+"=([^&]+)"))||[];if(/1|true|yes|y/.test(t))return!0;else if(/0|false|no|n/.test(t))return!1;return null}},function(e,t,i){"use strict";var n=i(3),s=i.n(n),o=i(33),a=i(6),r=i(13),c=i(32),l=i(40),d=i(31),u=i(47),h=i(45),cd=i(0),m=i(17),p=i(7),g=i(15),f=i(25),b=i(16),v=i(29),y=i(5),w=i(1),x=i(14),k=i(11),C=i(4),T=i(22),S={setup(){this.timestampFormat=y.a.get("timestampFormat");this.modifyToc=y.a.get("modifyToc");this.highlightNewInterval=y.a.get("highlightNewInterval");if(cd.a.page.isActive())if(!this.isMounted()){this.mount();ye.on("scroll",this.updateCommentFormButton.bind(this)).on("keydown",e=>{if(!Object(C.l)()){if(Object(C.m)(e,82))this.refreshClick();if(Object(C.m)(e,87))this.goToPreviousNewComment();if(Object(C.m)(e,83))this.goToNextNewComment();if(Object(C.m)(e,70))this.goToFirstUnseenComment();if(Object(C.m)(e,67)){e.preventDefault();this.goToNextCommentForm(!0)}}}).on("addedCommentsUpdate",({all:e,relevant:t,bySection:i})=>{this.updateRefreshButton(e.length,i,Boolean(t.length))});m.a.on("add",this.updateCommentFormButton.bind(this)).on("remove",this.updateCommentFormButton.bind(this));v.a.on("updateimproved",this.updateTimestampsInRefreshButtonTooltip.bind(this));T.a.on("process",this.fill.bind(this));p.a.on("registerSeen",this.updateFirstUnseenButton.bind(this))}else this.reset();else if(this.isMounted())this.unmount()},mount(){this.$element=$("<div>").attr("id","cd-navPanel").appendTo(document.body);this.refreshButton=new b.a({tagName:"div",classes:["cd-navPanel-button"],id:"cd-navPanel-refreshButton",action:e=>{this.refreshClick(Object(C.i)(e))}});this.updateRefreshButtonTooltip(0);this.previousButton=new b.a({tagName:"div",classes:["cd-navPanel-button"],id:"cd-navPanel-previousButton",tooltip:`${cd.a.s("navpanel-previous")} ${cd.a.mws("parentheses","W")}`,action:()=>{this.goToPreviousNewComment()}}).hide();this.nextButton=new b.a({tagName:"div",classes:["cd-navPanel-button"],id:"cd-navPanel-nextButton",tooltip:`${cd.a.s("navpanel-next")} ${cd.a.mws("parentheses","S")}`,action:()=>{this.goToNextNewComment()}}).hide();this.firstUnseenButton=new b.a({tagName:"div",classes:["cd-navPanel-button"],id:"cd-navPanel-firstUnseenButton",tooltip:`${cd.a.s("navpanel-firstunseen")} ${cd.a.mws("parentheses","F")}`,action:()=>{this.goToFirstUnseenComment()}}).hide();this.commentFormButton=new b.a({tagName:"div",classes:["cd-navPanel-button"],id:"cd-navPanel-commentFormButton",tooltip:`${cd.a.s("navpanel-commentform")} ${cd.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(this.utirbtTimeout)},fill(){if(p.a.getAll().some(e=>e.isNew)){this.updateRefreshButtonTooltip(0);this.previousButton.show();this.nextButton.show();this.updateFirstUnseenButton()}},refreshClick(e){ye.reload({commentIds:ye.getRelevantAddedCommentIds(),markAsRead:e})},goToNewCommentInDirection(e){if(ye.isAutoScrolling())return;const t=p.a.findInViewport(e);if(!t)return;const i=Object(w.F)(p.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(ye.isAutoScrolling())return;const e=p.a.query(e=>!1===e.isSeen),t=e.find(e=>!1===e.isInViewport())||e[0];null==t||t.scrollTo({flash:null,callback:()=>{t.registerSeen("forward",!0)}})},goToNextCommentForm(e){var t;null===(t=m.a.query(t=>e||!t.$element.cdIsInViewport(!0)).map(e=>{let t=e.$element[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)},updateRefreshButtonTooltip(e,t){clearTimeout(this.utirbtTimeout);this.cachedCommentCount=e;this.cachedCommentsBySection=t;let i=null;const n=p.a.getAll().some(e=>e.isNew);if(e){i=cd.a.s("navpanel-newcomments-count",e)+" "+cd.a.s("navpanel-newcomments-refresh")+" "+cd.a.mws("parentheses","R");if(n&&this.highlightNewInterval)i+="\n"+cd.a.s("navpanel-markasread",cd.a.g.cmdModifier);const s=Object(k.k)(cd.a.s("bullet")),o="rtl"===cd.a.g.contentDirection?"\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?cd.a.s("navpanel-newcomments-names",e.author.getName(),e.parent.author.getName()):e.author.getName(),a=e.date?Object(x.b)(e.date):cd.a.s("navpanel-newcomments-unknowndate");i+=s+" "+n+o+cd.a.mws("comma-separator")+a})});if("relative"===this.timestampFormat)this.utirbtTimeout=setTimeout(this.updateTimestampsInRefreshButtonTooltip.bind(this),cd.a.g.msInMin)}else{i=cd.a.s("navpanel-refresh")+" "+cd.a.mws("parentheses","R");if(n&&this.highlightNewInterval)i+="\n"+cd.a.s("navpanel-markasread",cd.a.g.cmdModifier)}this.refreshButton.setTooltip(i)},updateTimestampsInRefreshButtonTooltip(){this.updateRefreshButtonTooltip(this.cachedCommentCount,this.cachedCommentsBySection)},updateFirstUnseenButton(){if(!this.isMounted())return;const e=p.a.query(e=>!1===e.isSeen).length;this.firstUnseenButton.toggle(e).setLabel(e)},updateCommentFormButton(){if(this.isMounted()&&!ye.isAutoScrolling())this.commentFormButton.toggle(m.a.getAll().some(e=>!e.$element.cdIsInViewport(!0)))}},E=i(38),O=i(10),N=i(19);const P=document.documentElement;let L,I,D,j;var A={setup(){if(!this.isMounted())this.mount();else this.update()},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();ye.on("scroll",this.update.bind(this)).on("horizontalScroll",this.updateWidth.bind(this)).on("resize",this.updateWidth.bind(this))}},isMounted(){return Boolean(this.$topElement)},updateWidth(){if(!this.isMounted()||!ye.$contentColumn.length)return;const e=ye.$contentColumn.offset().left-$(window).scrollLeft(),t=18+(cd.a.g.commentMarkerWidth-1)/2;let i="ltr"===cd.a.g.userDirection?e-t:$(window).width()-(e+ye.$contentColumn.outerWidth())-t;if("minerva"===cd.a.g.skin)i-=ye.getContentColumnOffsets().startMargin;if(i<=100){this.$topElement.hide();this.$bottomElement.hide()}else{this.$topElement.show();this.$bottomElement.show()}this.$topElement.css("width",i+"px");this.$bottomElement.css("width",i+"px")},getRelativeOffsets(e){var t;let i;if(N.a.isPresent()){const e=N.a.$element[0].getBoundingClientRect();if(Object(C.h)(e))i=e.top}const n=O.a.getFirstSectionRelativeTopOffset(e,i);null!==(t=i)&&void 0!==t||(i=n);return{afterLeadOffset:i,firstSectionTop:n}},createOrUpdateSkeleton(e,t){if(null!==e&&e<cd.a.g.bodyScrollPaddingTop+1||"top"===j){if(!this.$linksOnTop){this.$linksOnTop=$("<ul>").attr("id","cd-pageNav-linksOnTop").addClass("cd-pageNav-list").appendTo(this.$topElement);this.$topLink=$("<li>").attr("id","cd-pageNav-topLink").addClass("cd-pageNav-item").append(new b.a({href:"#",classes:["cd-pageNav-link"],label:cd.a.s("pagenav-pagetop"),action:()=>{this.jump(0,this.$topLink)}}).element).appendTo(this.$linksOnTop)}}else if(this.$linksOnTop)this.reset("top");if(this.$linksOnTop){if(N.a.isPresent()&&!this.$tocLink){const e=new b.a({href:"#toc",classes:["cd-pageNav-link"],label:cd.a.s("pagenav-toc"),action:()=>{this.jump(N.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(O.a.getCount()&&t+window.innerHeight<P.scrollHeight||"bottom"===j){if(!this.$bottomLink){const e=new b.a({href:"#footer",classes:["cd-pageNav-link"],label:cd.a.s("pagenav-pagebottom"),action:()=>{this.jump(P.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(null===e||e>=cd.a.g.bodyScrollPaddingTop+1){if(L)this.resetSections();return}const i=O.a.getCurrentSection();if(i&&i!==L){L=i;null===(t=I)||void 0===t||t.detach();this.$currentSection.empty();[L,...L.getAncestors()].reverse().forEach((e,t)=>{let i;if(I&&I.data("section")===e)i=I;else{const n=new b.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(P.scrollHeight===P.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=I)||void 0===t||t.detach();this.$topElement.empty();this.$linksOnTop=this.$topLink=this.$tocLink=this.$currentSection=null;L=null}if(!e||"bottom"===e){this.$bottomElement.empty();this.$bottomLink=null}},resetSections(){var e;null===(e=I)||void 0===e||e.detach();this.$currentSection.empty();L=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(j){j=null;D.prev().removeClass("cd-pageNav-link-inline");D.remove();D=I=null}if(!i){const e=window.scrollY,i=new b.a({classes:["cd-pageNav-backLink"],label:cd.a.s("pagenav-back"),action:i=>{i.stopPropagation();this.jump(e,t,!0)}});D=$("<span>").addClass("cd-pageNav-backLinkContainer").append(cd.a.sParse("dot-separator"),i.element).appendTo(t);D.prev().addClass("cd-pageNav-link-inline");if(t.parent().is("#cd-pageNav-currentSection"))I=t;if(t===this.$topLink||t===this.$tocLink)j="top";else if(t===this.$bottomLink)j="bottom";else j="section"}ye.toggleAutoScrolling(!0);ye.scrollToY(n)}}};let M,_,F,B,H,R,U,W,Y,q;function z(){return(z=s()((function*(){const e=location.hash.slice(1);let t,i;try{M=decodeURIComponent(e);if(r.a.isId(e))t=M}catch(e){console.error(e)}if(t){({date:_,author:F}=r.a.parseId(t)||{});i=p.a.getById(t,!0)}else if(M)({comment:i,date:_,author:F}=p.a.getByDtId(M,!0)||{});if(i)Object(w.G)().then(()=>{i.scrollTo({smooth:!1,expandThreads:!0});history.replaceState(Object.assign({},history.state,{cdJumpedToComment:!0}),"",i.dtId?"#"+i.dtId:void 0)});if(M&&!cd.a.page.isArchive()){const t=$.escapeSelector(e),n=M&&$.escapeSelector(M);if(!(i||cd.a.config.idleFragments.some(e=>M.match(e))||/^\/media\/|^noticeApplied-|^h-/.test(M)||$(":target").length||$(`*[id="${n}"], a[name="${n}"], *[id="${t}"], a[name="${t}"]`).length))yield V()}}))).apply(this,arguments)}function V(){return G.apply(this,arguments)}function G(){return(G=s()((function*(){let e;B="";H="";if(_){e=cd.a.sParse("deadanchor-comment-lead");const t=p.a.findPriorComment(_,F);if(t){B=(" "+cd.a.sParse("deadanchor-comment-previous","#"+t.id)).replace(cd.a.g.articlePathRegexp,"$1");e+=B}}else{R=Object(w.J)(M);e=cd.a.sParse("deadanchor-section-lead",R)+" "+cd.a.sParse("deadanchor-section-reason");const t=O.a.findByHeadlineParts(R);if(t){H=(" "+cd.a.sParse("deadanchor-section-similar","#"+t.id,t.getHeadline())).replace(cd.a.g.articlePathRegexp,"$1");e+=H}}if(cd.a.page.canHaveArchives())K();else mw.notify(Object(C.q)(e),{type:"warn",autoHideSeconds:"long"})}))).apply(this,arguments)}function K(){return J.apply(this,arguments)}function J(){return(J=s()((function*(){var e;W=_?Object(x.d)(_,!1,cd.a.g.contentTimezone):R.replace(/"/g,"");Y=`"${W}"`;if(!_)try{U=decodeURIComponent(R.replace(/\.([0-9A-F]{2})/g,"%$1"))}catch(e){}if(R&&R!==U){const e=U.replace(/"/g,"");Y+=` OR "${e}"`}if(_)for(let e=1;e<=3;e++){const t=Object(x.d)(new Date(_.getTime()-cd.a.g.msInMin*e),!1,cd.a.g.contentTimezone);Y+=` OR "${t}"`}const t=cd.a.page.getArchivePrefix();Y+=" prefix:"+t;const i=yield ye.getApi().get({action:"query",list:"search",srsearch:Y,srprop:_?void 0:"sectiontitle",srsort:"create_timestamp_desc",srlimit:20});q=null==i?void 0:null===(e=i.query)||void 0===e?void 0:e.search;X()}))).apply(this,arguments)}function X(){const e=cd.a.g.server+mw.util.getUrl("Special:Search",{search:Y,sort:"create_timestamp_desc",cdcomment:_&&M});if(0===q.length){let t;if(_)t=cd.a.sParse("deadanchor-comment-lead")+" "+cd.a.sParse("deadanchor-comment-notfound",e)+B;else t=cd.a.sParse("deadanchor-section-lead",R)+(H&&R.includes("{{")?"":" "+cd.a.sParse("deadanchor-section-notfound",e)+" "+cd.a.sParse("deadanchor-section-reason",e))+H;mw.notify(Object(C.q)(t),{type:"warn",autoHideSeconds:"long"})}else{let t,i,n=R;if(_){const e=Object.entries(q).map(([,e])=>e).filter(e=>{var t;return null===(t=Object(k.k)(e.snippet))||void 0===t?void 0:t.includes(W)});if(1===e.length)t=e[0].title}else{const e=Object.entries(q).map(([,e])=>e).find(e=>e.sectiontitle&&[R,U].filter(w.h).includes(e.sectiontitle));if(e){t=e.title;n=Object(w.J)(e.sectiontitle)}}if(t){const s=`${t}#${_?M:n}`;i=_?cd.a.sParse("deadanchor-comment-exactmatch",s,e)+B:cd.a.sParse("deadanchor-section-exactmatch",n,s,e)}else i=_?cd.a.sParse("deadanchor-comment-inexactmatch",e)+B:cd.a.sParse("deadanchor-section-inexactmatch",n,e);mw.notify(Object(C.q)(i),{type:"warn",autoHideSeconds:"long"})}}var Z=i(28),Q=i(21),ee=i(8);function te(){const e=document.createNodeIterator(ye.rootElement,NodeFilter.SHOW_TEXT),t=[];let i;for(;i=e.nextNode();)t.push(i);return t}function ie(){const e=document.createNodeIterator(ye.rootElement,NodeFilter.SHOW_COMMENT);let t;for(;t=e.nextNode();)if(t.textContent.startsWith("__DTREPLYBUTTONS__"))t.remove()}function ne(e,t){const i=cd.a.g.isDtTopicSubscriptionEnabled||!["registered",null].includes(mw.loader.getState("ext.discussionTools.init"));let n;if(i){if(!t.isFirstRun())n=ye.$content.children(".cd-dtMarkupHaven")[0];if(n)n.innerHTML="";else{n=document.createElement("span");n.className="cd-dtMarkupHaven cd-hidden";ye.$content.append(n)}}e.concat([...ye.rootElement.getElementsByClassName("ext-discussiontools-init-highlight")]).forEach((e,s)=>{if(e.hasAttribute("data-mw-comment-start")&&r.a.isDtId(e.id))t.addDtCommentId(e.id);if(i){if(s%10==0)n.appendChild(document.createElement("span"));n.lastChild.appendChild(e)}else e.remove()});if(!i)[...ye.rootElement.getElementsByTagName("span[data-mw-comment]")].forEach(e=>{e.removeAttribute("data-mw-comment")})}var se=class{constructor(e={}){this.passedData=e;this.dtCommentIds=[]}addDtCommentId(e){this.dtCommentIds.push(e)}isFirstRun(){return this.firstRun}disableDt(e,t,i){return s()((function*(){t.setPending(!0);try{const i={"discussiontools-replytool":0,"discussiontools-newtopictool":0,"discussiontools-topicsubscription":0,"discussiontools-visualenhancements":0};if(e)yield Object(ee.l)(i,!0).catch(ee.f);else yield ye.getApi().saveOptions({"discussiontools-topicsubscription":1}).catch(ee.f)}catch(e){mw.notify(Object(C.q)(cd.a.sParse("error-settings-save")));return}finally{t.setPending(!1)}i.$notification.hide();mw.notify(Object(C.q)(cd.a.sParse("discussiontools-disabled"),{callbacks:{"cd-notification-refresh":()=>{location.reload()}}}))}))()}maybeSuggestDisableDt(){if(!cd.a.g.isDtReplyToolEnabled)return;const e=Object(C.q)(cd.a.sParse("discussiontools-incompatible","Special:Preferences#mw-prefsection-editing-discussion","Special:GlobalPreferences#mw-prefsection-editing-discussion"),{callbacks:{"cd-notification-disabledt":(e,i)=>{this.disableDt(!1,i,t)},"cd-notification-disableDtGlobally":(e,i)=>{this.disableDt(!0,i,t)}}});if(!cd.a.config.useGlobalPreferences)e.find(".cd-notification-disableDtGlobally-wrapper").remove();const t=mw.notification.notify(e,{type:"warn",autoHide:!1})}setup(){var e=this;return s()((function*(){var t,i,n;if(e.firstRun)yield f.a.talkPage();e.subscriptions=ye.getSubscriptionsInstance();if(e.firstRun){O.a.init(e.subscriptions);Z.a.init();N.a.init(e.subscriptions);m.a.init();p.a.init();c.a.init();l.a.init();E.a.init();d.a.init()}ye.setup(null===(t=e.passedData.parseData)||void 0===t?void 0:t.text);N.a.setup(null===(i=e.passedData.parseData)||void 0===i?void 0:i.sections,null===(n=e.passedData.parseData)||void 0===n?void 0:n.hidetoc);cd.a.comments=p.a.getAll();cd.a.sections=O.a.getAll()}))()}findTargets(){this.parser=new d.a({CommentClass:r.a,SectionClass:u.a,childElementsProp:"children",follows:(e,t)=>Boolean(t.compareDocumentPosition(e)&Node.DOCUMENT_POSITION_FOLLOWING),getAllTextNodes:te,getElementByClassName:(e,t)=>e.querySelector("."+t),rootElement:ye.rootElement,areThereOutdents:ye.areThereOutdents.bind(ye),processAndRemoveDtElements:ne,removeDtButtonHtmlComments:ie});this.parser.init();this.parser.processAndRemoveDtMarkup(this);this.targets=this.parser.findHeadings().concat(this.parser.findSignatures()).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{p.a.add(this.parser.createComment(e,this.targets))}catch(e){if(!(e instanceof a.a))console.error(e)}});p.a.setup()}catch(e){console.error(e)}mw.hook("convenientDiscussions.commentsReady").fire(p.a.getAll(),cd.a)}processSections(){this.targets.filter(e=>"heading"===e.type).forEach(e=>{try{O.a.add(this.parser.createSection(e,this.targets,this.subscriptions))}catch(e){if(!(e instanceof a.a))console.error(e)}});if("dt"===this.subscriptions.getType())this.subscriptions.loadToTalkPage(this);O.a.setup();r.a.processOutdents(this.parser);p.a.connectBrokenThreads();p.a.setDtIds(this.dtCommentIds);O.a.addMetadataAndActions();mw.hook("convenientDiscussions.sectionsReady").fire(O.a.getAll(),cd.a)}retractTalkPageness(){g.a.stopTimer("main code");ye.setTalkPageness(!1);const e=$("#footer-places-togglecd a");e.attr("href",e.attr("href").replace(/0$/,"1")).text(cd.a.s("footer-runcd"));ye.hideLoadingOverlay();this.debugLog()}deactivateDtHighlight(){var e;const t=null===(e=mw.loader.moduleRegistry["ext.discussionTools.init"])||void 0===e?void 0:e.packageExports["highlighter.js"];if(t){t.highlightTargetComment=()=>{};t.clearHighlightTargetComment=()=>{}}}hideDtNewTopicForm(){if(!cd.a.g.isDtNewTopicToolEnabled)return null;const e=$(".ext-discussiontools-ui-newTopic:visible");if(!e.length)return null;const t=e.find('.ext-discussiontools-ui-newTopic-sectionTitle input[type="text"]'),i=t.val();t.val("");const n=e.find("textarea"),s=n.textSelection("getContents");n.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(ye.$content[0],{childList:!0,subtree:!0})}e.hide();mw.config.set("wgDiscussionToolsStartNewTopicTool",!1);return{headline:i,comment:s,focus:!0}}processPassedTargets(){const e=this.passedData.commentIds;if(e){const t=e.map(e=>p.a.getById(e)).filter(w.i);if(t.length)Object(w.G)().then(()=>{const e=this.passedData.wasCommentFormSubmitted||this.passedData.pushState;t[0].scrollTo({smooth:!1,pushState:this.passedData.pushState,flash:e});if(!e)t.forEach(e=>e.flashTarget())})}else if(this.passedData.sectionId){const e=O.a.getById(this.passedData.sectionId);if(e){if(this.passedData.pushState)history.pushState(history.state,"","#"+e.id);Object(w.G)().then(()=>{e.$heading.cdScrollTo("top",!1)})}}}debugLog(){g.a.stopTimer("total time");const e=(g.a.getTimerTotal("main code")+g.a.getTimerTotal("final code and rendering"))/p.a.getCount();g.a.logAndResetTimer("total time");console.debug("number of comments: "+p.a.getCount());console.debug("per comment: "+e.toFixed(2));g.a.logAndResetEverything()}showPopups(){var e=this;return s()((function*(){e.maybeSuggestDisableDt();const t=yield y.a.maybeSuggestEnableCommentReformatting();yield y.a.maybeConfirmDesktopNotifications();if(t)ye.reload()}))()}execute(e){var t=this;return s()((function*(){var i;t.firstRun=!e;if(t.firstRun)g.a.stopTimer("load data");g.a.startTimer("preparations");yield t.setup();g.a.stopTimer("preparations");g.a.startTimer("main code");if(t.firstRun){ye.saveRelativeScrollPosition(void 0,t.passedData.scrollY);Q.default.loadMuted()}if(cd.a.page.exists()){if(cd.a.page.isActive())T.a.load(t,!0);if("legacy"===t.subscriptions.getType())t.subscriptions.loadToTalkPage(t,!0);mw.hook("convenientDiscussions.beforeParse").fire(cd.a);g.a.startTimer("process comments");t.findTargets();t.processComments();g.a.stopTimer("process comments")}if(!t.firstRun||ye.isDefinitelyTalkPage()||p.a.getCount()){if(cd.a.page.exists()){g.a.startTimer("process sections");t.processSections();g.a.stopTimer("process sections")}else if("dt"===t.subscriptions.getType())t.subscriptions.loadToTalkPage(t);if(null!==(i=t.passedData.parseData)&&void 0!==i&&i.text){g.a.startTimer("update page contents");ye.updatePageContents(t.passedData.parseData);g.a.stopTimer("update page contents")}S.setup();g.a.stopTimer("main code");g.a.startTimer("final code and rendering");p.a.reviewHighlightables();p.a.reformatComments();ye.$root.addClass("cd-parsed");if(cd.a.page.isCommentable()){if(t.firstRun)cd.a.page.addAddTopicButton();ye.connectToAddTopicButtons();m.a.restoreSession(t.firstRun||t.passedData.isPageReloadedExternally);cd.a.page.autoAddSection(t.hideDtNewTopicForm())}if(cd.a.page.exists()){h.a.init();p.a.configureAndAddLayers(e=>e.isOwn||e.isLineGapped);if(t.firstRun){t.deactivateDtHighlight();!function(){z.apply(this,arguments)}()}t.processPassedTargets();if(!cd.a.page.isActive())N.a.addCommentCount();A.setup(t);if(t.firstRun)ye.addEventListeners();ye.setupMutationObserver();if(y.a.get("reformatComments")&&p.a.getCount())mw.hook(cd.a.config.hookToFireWithAuthorWrappers).fire($(".cd-comment-author-wrapper"))}if(t.firstRun){ye.restoreRelativeScrollPosition();y.a.addLinkToFooter()}mw.hook("convenientDiscussions.pageReady").fire(cd.a);if(t.firstRun)mw.hook("convenientDiscussions.pageReadyFirstTime").fire(cd.a);ye.hideLoadingOverlay();ye.rootElement.getBoundingClientRect();g.a.stopTimer("final code and rendering");t.debugLog();if(t.firstRun&&cd.a.page.isActive()&&cd.a.user.isRegistered())t.showPopups()}else t.retractTalkPageness()}))()}},oe=i(12),ae=i.n(oe);class Subscriptions_Subscriptions{constructor(){OO.mixinClass(Subscriptions_Subscriptions,OO.EventEmitter);OO.EventEmitter.call(this)}loadToTalkPage(e,...t){var i=this;return s()((function*(){yield i.load(e,...t);i.processOnTalkPage(e)}))()}processOnTalkPage(){this.emit("process")}updateLocally(e,t){if(void 0!==e){this.data||(this.data={});this.data[e]=Boolean(t)}}subscribe(e,t,i,n=!1){var o=this;return s()((function*(){yield o.actuallySubscribe(e,t,i);if(!n){let t,i=e.startsWith("p-")?cd.a.mws("discussiontools-newtopicssubscription-notify-subscribed-body"):cd.a.mws("discussiontools-topicsubscription-notify-subscribed-body");if(!y.a.get("useTopicSubscription")){i+=" "+cd.a.sParse("section-watch-openpages");if($("#ca-watch").length){i+=" "+cd.a.sParse("section-watch-pagenotwatched");t="long"}}mw.notify(Object(C.q)(i),{title:e.startsWith("p-")?cd.a.mws("discussiontools-newtopicssubscription-notify-subscribed-title"):cd.a.mws("discussiontools-topicsubscription-notify-subscribed-title"),autoHideSeconds:t})}}))()}unsubscribe(e,t,i=!1,n){var o=this;return s()((function*(){yield o.actuallyUnsubscribe(e,t);const s=null==n?void 0:n.getClosestSectionSubscribedTo();if(!i||s){const t=e.startsWith("p-")?cd.a.mws("discussiontools-newtopicssubscription-notify-unsubscribed-title"):cd.a.mws("discussiontools-topicsubscription-notify-unsubscribed-title");let i,n=e.startsWith("p-")?cd.a.mws("discussiontools-newtopicssubscription-notify-unsubscribed-body"):cd.a.mws("discussiontools-topicsubscription-notify-unsubscribed-body");if(s){n+=" "+cd.a.sParse("section-unwatch-stillwatched",s.headline);i="long"}mw.notify(Object(C.q)(n),{title:t,autoHideSeconds:i})}}))()}getState(e){if(!cd.a.user.isRegistered())return null;if(!this.areLoaded())throw new a.a;if(void 0===this.data[e])return null;else return this.data[e]}updatePageSubscribeButton(){this.pageSubscribeButton.setLabel(this.getState(this.pageSubscribeId)?cd.a.mws("discussiontools-newtopicssubscription-button-unsubscribe-label"):cd.a.mws("discussiontools-newtopicssubscription-button-subscribe-label")).setTooltip(this.getState(this.pageSubscribeId)?cd.a.mws("discussiontools-newtopicssubscription-button-unsubscribe-tooltip"):cd.a.mws("discussiontools-newtopicssubscription-button-subscribe-tooltip"))}itemsToKeys(e){return Object.assign({},...e.map(e=>({[e]:!0})))}getType(){return this.type}}var re=Subscriptions_Subscriptions;var ce=class extends re{constructor(...e){super(...e);ae()(this,"type","dt")}load(){var e=this;return s()((function*(){if(!cd.a.user.isRegistered())return;const t=Object(w.H)(mw.config.get("wgTitle"));e.pageSubscribeId||(e.pageSubscribeId=`p-topics-${cd.a.g.namespaceNumber}:${t}`);e.data=yield e.getSubscriptions(O.a.query(e=>e.subscribeId).map(e=>e.subscribeId).filter(w.K).concat(e.pageSubscribeId||[]))}))()}processOnTalkPage(e){if(null!=e&&e.isFirstRun())this.addPageSubscribeButton();super.processOnTalkPage(e)}areLoaded(){return Boolean(this.data)}getSubscriptions(e){return s()((function*(){const t={};for(const i of Object(ee.m)(e))Object.assign(t,(yield ye.getApi().post({action:"discussiontoolsgetsubscriptions",commentname:i}).catch(ee.f)).subscriptions);return t}))()}addPageSubscribeButton(){var e=this;return s()((function*(){var t;if(cd.a.user.isRegistered()&&!cd.a.page.isArchive()){e.pageSubscribeButton=new b.a({element:null===(t=mw.util.addPortletLink("p-cactions",mw.util.getUrl(cd.a.g.pageName,{action:e.getState(e.pageSubscribeId)?"dtunsubscribe":"dtsubscribe",commentname:e.pageSubscribeId}),"","ca-cd-page-subscribe"))||void 0===t?void 0:t.firstElementChild,action:(i=s()((function*(){e.pageSubscribeButton.setPending(!0);try{yield e[e.getState(e.pageSubscribeId)?"unsubscribe":"subscribe"](e.pageSubscribeId,null);e.updatePageSubscribeButton()}finally{e.pageSubscribeButton.setPending(!1)}})),function(){return i.apply(this,arguments)})});var i;e.updatePageSubscribeButton();e.onboardOntoPageSubscription()}}))()}changeSubscription(e,t,i){var n=this;return s()((function*(){if(void 0===e)throw new a.a;try{yield ye.getApi().postWithEditToken({action:"discussiontoolssubscribe",page:cd.a.page.name+(t?"#"+t:""),commentname:e,subscribe:i}).catch(ee.f)}catch(e){mw.notify(cd.a.s("error-settings-save"),{type:"error"});throw e}n.updateLocally(e,i)}))()}actuallySubscribe(e,t){return this.changeSubscription(e,t,!0)}actuallyUnsubscribe(e,t){return this.changeSubscription(e,t,!1)}onboardOntoPageSubscription(){if(y.a.get("newTopicsSubscription-onboarded")||!this.pageSubscribeButton.element||cd.a.g.skin.startsWith("vector")&&window.scrollY>70||"timeless"===cd.a.g.skin&&window.innerWidth<1100)return;const e=new OO.ui.ButtonWidget({label:cd.a.mws("visualeditor-educationpopup-dismiss"),flags:["progressive","primary"]});e.on("click",()=>{n.toggle(!1)});let t;const i=$(".vector-page-tools-dropdown");if("vector"===cd.a.g.skin)t=$("#p-cactions");else if(i.is(":visible"))t=i;else t=$(this.pageSubscribeButton.element);const n=new OO.ui.PopupWidget({icon:"newspaper",label:cd.a.s("newtopicssubscription-popup-title"),$content:$.cdMerge($("<p>").text(cd.a.s("newtopicssubscription-popup-text")),$("<p>").append(e.$element)),head:!0,$floatableContainer:t,$container:$(document.body),position:"vector-2022"===cd.a.g.skin?"before":"below",padded:!0,classes:["cd-popup-onboarding","cd-popup-onboarding-newTopicsSubscription"]});$(document.body).append(n.$element);n.toggle(!0);n.on("closing",()=>{y.a.saveSettingOnTheFly("newTopicsSubscription-onboarded",!0)})}},le=i(24),de=i(39),ue=i.n(de);var he=class extends re{constructor(...e){super(...e);ae()(this,"type","legacy");ae()(this,"subscribePromise",Promise.resolve())}load(e,t=!1){var i=this;return s()((function*(){if(!cd.a.user.isRegistered())return;try{i.unpack(yield Object(ee.e)(t).then(({subscriptions:e})=>e))}catch(e){console.warn("Convenient Discussions: Couldn't load the settings from the server.",e);return}const n=mw.config.get("wgArticleId");if(n){var s;(s=i.allPagesData)[n]||(s[n]={});i.data=i.allPagesData[n];if(e){i.updateLocally(e.passedData.justSubscribedToSection,!0);i.updateLocally(e.passedData.justUnsubscribedFromSection,!1);delete e.passedData.justSubscribedToSection;delete e.passedData.justUnsubscribedFromSection}}}))()}processOnTalkPage(...e){if(cd.a.page.exists())this.cleanUp();super.processOnTalkPage(...e)}areLoaded(){return Boolean(this.allPagesData)}actuallySubscribe(e,t,i){var n=this;const o=function(){var t=s()((function*(){try{yield n.load()}catch(e){mw.notify(cd.a.s("error-settings-load"),{type:"error"});throw e}const t=Object.assign({},n.data);n.updateLocally(e,!0);n.updateLocally(i,!1);try{yield n.save()}catch(e){n.data=t;if(e instanceof a.a){const{type:t,code:i}=e.data;if("internal"===t&&"sizeLimit"===i){const e=Object(C.q)(cd.a.sParse("section-watch-error-maxsize"),{callbacks:{"cd-notification-editWatchedSections":()=>{ye.showEditSubscriptionsDialog()}}});mw.notify(e,{type:"error",autoHideSeconds:"long"})}else mw.notify(cd.a.s("error-settings-save"),{type:"error"})}else mw.notify(cd.a.s("error-settings-save"),{type:"error"});throw e}}));return function(){return t.apply(this,arguments)}}();this.subscribePromise=this.subscribePromise.then(o,o);return this.subscribePromise}actuallyUnsubscribe(e){var t=this;const i=function(){var i=s()((function*(){try{yield t.load()}catch(e){mw.notify(cd.a.s("error-settings-load"),{type:"error"});throw e}const i=Object.assign({},t.data);t.updateLocally(e,!1);try{yield t.save()}catch(e){t.data=i;mw.notify(cd.a.s("error-settings-save"),{type:"error"});throw e}}));return function(){return i.apply(this,arguments)}}();this.subscribePromise=this.subscribePromise.then(i,i);return this.subscribePromise}save(e){var t=this;return s()((function*(){yield Object(ee.k)(cd.a.g.subscriptionsOptionName,t.pack(e||t.allPagesData))}))()}pack(e){return ue.a.compressToEncodedURIComponent(Object.keys(e).filter(t=>Object.keys(e[t]).length).map(t=>` ${t} ${Object.keys(e[t]).join("\n")}\n`).join("").trim())}unpack(e){this.allPagesData={};if(!e)return;const t=ue.a.decompressFromEncodedURIComponent(e).split(/(?:^|\n )(\d+) /).slice(1);for(let e=1;e<t.length;e+=2)this.allPagesData[t[e-1]]=this.itemsToKeys(t[e].split("\n"))}getPageIds(){return Object.keys(this.allPagesData)}getForPageId(e){return Object.keys(this.allPagesData[e]||{})}getForCurrentPage(){return this.getForPageId(mw.config.get("wgArticleId"))}getOriginalState(e){var t;return null===(t=this.originalList)||void 0===t?void 0:t.includes(e)}cleanUp(){this.originalList=Object.keys(this.data);let e=!1;Object.keys(this.data).filter(e=>O.a.getAll().every(t=>t.headline!==e)).forEach(t=>{delete this.data[t];e=!0});if(e)this.save()}updateLocally(e,t){super.updateLocally(e,t);if(!t)delete this.data[e]}},me=i(46),pe=i(20),ge=i(9),fe=i(57),be=i.n(fe);function ve(){return be()('/*! */\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=38)}([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,"o",(function(){return a}));i.d(t,"h",(function(){return o}));i.d(t,"b",(function(){return l}));i.d(t,"c",(function(){return c}));i.d(t,"n",(function(){return u}));i.d(t,"l",(function(){return h}));i.d(t,"m",(function(){return d}));i.d(t,"e",(function(){return f}));i.d(t,"k",(function(){return p}));i.d(t,"p",(function(){return m}));i.d(t,"g",(function(){return g}));i.d(t,"f",(function(){return b}));i.d(t,"i",(function(){return v}));i.d(t,"a",(function(){return _}));i.d(t,"d",(function(){return y}));i.d(t,"j",(function(){return E}));i(28);var n=i(29),r=i.n(n),s=(i(4),i(0));function a(e,t,i){return i.indexOf(e)===t}function o(e,t=!1){if(t&&e.nodeType===Node.TEXT_NODE)return!0;if(e.nodeType!==Node.ELEMENT_NODE)return null;if(s.a.g.popularInlineElements.includes(e.tagName)||"META"===e.tagName&&"mw:PageProp/toc"===e.getAttribute("property"))return!0;else if(s.a.g.popularNotInlineElements.includes(e.tagName))return!1;else if("undefined"!=typeof window){console.warn("Convenient Discussions: Expensive operation: isInline() called for:",e);return window.getComputedStyle(e).display.startsWith("inline")}else return null}function l(e){return void 0!==e}function c(e){return null!=e}function u(e){return e.replace(/_/g," ")}function h(e){return e.replace(/ /g,"_")}function d(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===s.a.g.phpCharToUpper[e])return e;else return s.a.g.phpCharToUpper[e]||e.toUpperCase()}(t)+e.slice(t.length)}function f(e){return e.map(e=>s.a.g.contentLanguageMessages[e])}function p(e,t){return e.replace(/[\\u200e\\u200f]/g,t?" ":"")}function m(e,t){return("0000"+e).slice(-t)}function g(e,t=!1){var i;return!t&&(null===(i=e.classList)||void 0===i?void 0:i.contains("mw-heading"))||["H1","H2","H3","H4","H5","H6"].includes(e.tagName)}function b(e){if(!e.tagName||void 0===e.className)return null;else return Number((e.tagName.match(/^H([1-6])$/)||e.className.match(/\\bmw-heading([1-6])\\b/)||[])[1])||null}function v(e){return["STYLE","LINK"].includes(e.tagName)}function _(e){if(-1===e.indexOf("&"))return e;else{let t=e;if(-1!==t.indexOf("&#38;amp;"))t=t.replace(/&#38;amp;/g,"&amp;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 y(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||"")}function E(e){let t,i=s.a.g.serverName,n=e.replace(/^(?:https?:)?\\/\\/([^/]+)/,(e,t)=>{i=t;return""}).replace(s.a.g.articlePathRegexp,"$1").replace(s.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,hostname:i,fragment:t}}},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(15);Object.defineProperty(t,"Parser",{enumerable:!0,get:function(){return l.Parser}});var c=i(5);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(16);Object.defineProperty(t,"Tokenizer",{enumerable:!0,get:function(){return o(h).default}});var d=s(i(9));t.ElementType=d;a(i(20),t);t.DomUtils=s(i(21));var f=i(20);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!==(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";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(9),a=i(19);r(i(19),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 N},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},x=function(e,t){if(y(e))return e.clone();var i="object"==typeof t?t:{};return i.date=e,i.args=arguments,new N(i)},T=b;T.l=E,T.i=y,T.w=function(e,t){return x(e,{locale:t.$L,utc:t.$u,x:t.$x,$offset:t.$offset})};var N=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(T.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 T},g.isValid=function(){return!(this.$d.toString()===d)},g.isSame=function(e,t){var i=x(e);return this.startOf(t)<=i&&i<=this.endOf(t)},g.isAfter=function(e,t){return x(e)<this.startOf(t)},g.isBefore=function(e,t){return this.endOf(t)<x(e)},g.$g=function(e,t,i){return T.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=!!T.u(t)||t,d=T.p(e),f=function(e,t){var n=T.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 T.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=T.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[T.p(e)]()},g.add=function(i,c){var h,d=this;i=Number(i);var f=T.p(c),p=function(e){var t=x(d);return T.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 T.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=T.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 T.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:T.s(o+1,2,"0"),MMM:u(i.monthsShort,o,c,3),MMMM:u(c,o),D:this.$D,DD:T.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:T.s(s,2,"0"),h:h(1),hh:h(2),a:f(s,a,!0),A:f(s,a,!1),m:String(a),mm:T.s(a,2,"0"),s:String(this.$s),ss:T.s(this.$s,2,"0"),SSS:T.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=T.p(h),m=x(i),g=(m.utcOffset()-this.utcOffset())*e,b=this-m,v=T.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:T.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 T.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}(),C=N.prototype;return x.prototype=C,[["$ms",i],["$s",n],["$m",r],["$H",s],["$W",a],["$M",l],["$y",u],["$D",h]].forEach((function(e){C[e[1]]=function(t){return this.$g(t,e[0],e[1])}})),x.extend=function(e,t){return e.$i||(e(t,N,x),e.$i=!0),x},x.locale=E,x.isDayjs=y,x.unix=function(e){return x(1e3*e)},x.en=_[v],x.Ls=_,x.p={},x}()},function(e,t,i){"use strict";t.a=class{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;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)return null;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}}},function(e,t,i){"use strict";var n=i(7);class ElementsTreeWalker extends n.a{constructor(e,t){super(t,null,!0);if(e)this.currentNode=e}}t.a=ElementsTreeWalker},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(11),s=i(8),a=i(0),o=i(1);class CommentSkeleton{constructor(e,t,i){var n,r;this.parser=e;const s=i.indexOf(t);this.followsHeading="heading"===(null===(n=i[s-1])||void 0===n?void 0:n.type);const o=this.followsHeading?i[s-1].element:void 0;this.signatureElement=t.element;this.signatureText=t.element.textContent;this.date=t.date||null;this.authorName=t.authorName;this.id=CommentSkeleton.generateId(this.date,this.authorName,e.existingCommentIds);this.collectParts(o);this.removeNestedParts();this.wrapInlineParts();this.filterParts();this.parts.reverse();this.replaceListsWithItems();this.wrapNumberedList();this.index=a.a.comments.length;this.timestamp=null===(r=t.timestampText)||void 0===r?void 0:r.replace(/ {2,}/g," ");this.timestampElement=t.timestampElement;this.extraSignatures=t.extraSignatures;this.authorLink=t.authorLink;this.authorTalkLink=t.authorTalkLink;this.isOwn=this.authorName===a.a.g.userName;this.isUnsigned=t.isUnsigned;this.elements=this.parts.map(e=>e.node);this.updateHighlightables();this.updateLevels();if(this.parts[0].isHeading&&0!==this.level){this.parts.shift();this.elements.shift()}if(this.parts[0].isHeading)this.isOpeningSection=!0;else this.isOpeningSection=!1;this.addAttributes();this.section=null;this.isOutdented=!1;t.comment=this}getStartNodes(e){for(;Object(o.h)(e.currentNode.parentNode);)e.parentNode();const t=e.currentNode;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(o.h)(e.currentNode,!0)&&!Object(o.i)(e.currentNode))i=e.currentNode}const n=[];if(i&&t.parentNode.contains(i)||t.parentNode.getElementsByClassName("cd-signature",2).length>1||!this.isElementEligible(t.parentNode,e,"start")||[...t.parentNode[this.parser.context.childElementsProp]].some(e=>this.parser.rejectClasses.some(t=>e.classList.contains(t)))){e.currentNode=t;for(;e.nextSibling()&&(Object(o.h)(e.currentNode,!0)||Object(o.i)(e.currentNode));)n.push({node:e.currentNode,isTextNode:e.currentNode.nodeType===Node.TEXT_NODE,isHeading:!1,hasCurrentSignature:!1,hasForeignComponents:!1,step:"start"});n.reverse();e.currentNode=t}else e.currentNode=t.parentNode;n.push({node:e.currentNode,isTextNode:!1,isHeading:!1,hasCurrentSignature:!0,hasForeignComponents:!1,step:"start"});return[n,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,r;return!(e===t.root||"up"!==i&&(this.parser.rejectClasses.some(t=>e.classList.contains(t))||a.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")||null!==(n=(r=a.a.config).rejectNode)&&void 0!==n&&n.call(r,e,this.context))}isOtherKindOfList(e){return"UL"===e.tagName&&(e.classList.contains("gallery")||"navigation"===e.getAttribute("role"))}isIntroList(e,t,i){const n=e.tagName;if(!["DL","UL","OL"].includes(n))return!1;const r=e.previousElementSibling,s=e.nextElementSibling;let a="DL"===n&&e.firstChild&&"DT"===e.firstChild.tagName||["DL","UL"].includes(n)&&r&&Object(o.g)(r)&&s&&!["DL","OL"].includes(s.tagName)&&!this.isPartOfList(i,!0)&&!this.parser.context.getElementByClassName(e,"cd-signature")||this.isOtherKindOfList(e);if(t&&!a&&s&&"OL"!==n){const t=this.parser.getTopElementsWithText(e).levelsPassed,i=this.parser.getTopElementsWithText(s).levelsPassed;a=i>t||1===t&&i===t&&e[this.parser.context.childElementsProp].length>1&&n!==s.tagName}return a}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)||"OL"===n.tagName&&n[this.parser.context.childElementsProp][0].contains(this.signatureElement))&&(["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))}isUnsignedItem(e){var t;if("back"!==e.step||"LI"!==e.node.tagName||"ru.wikipedia.org"===a.a.g.serverName)return!1;const i=e.node.querySelectorAll("a")[0];if(!i)return!1;else return Boolean(null===(t=this.parser.constructor.processLink(i))||void 0===t?void 0:t.userName)}traverseDom(e,t,i,r){for(let l=0;l<500;l++){let l;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(o.h)(t.currentNode,!0)){t.currentNode=e;break}l="dive"}if("dive"!==l)break}else if(t.previousSibling())l="back";else{if(!t.parentNode())break;l="up"}const u=t.currentNode;if(this.isIntro({step:l,stage:1,node:u,nextNode:c.node,previousPart:c}))break;const h=u.nodeType===Node.TEXT_NODE;let d=null,f=null,p=null;if(!h){var s;if(!this.isElementEligible(u,t,l))break;if("up"===l&&u.classList.contains("cd-comment-part"))throw new n.a;d=Object(o.g)(u);f=u.contains(this.signatureElement);const e=u.getElementsByClassName("cd-signature",Number(f)+1).length;p=Boolean(!Object(o.h)(u)&&(e-Number(f)>0||i&&u.contains(i)&&"TABLE"!==u.tagName||r&&u!==r&&u.contains(r)));if(!f&&!Object(o.h)(u)&&null!==(s=a.a.g.signatureEndingRegexp)&&void 0!==s&&s.test(u.textContent)&&!this.parser.noSignatureElements.some(e=>e.contains(u)))break}e.push({node:u,isTextNode:h,isHeading:d,hasCurrentSignature:f,hasForeignComponents:p,step:l});if(d)break}return e}collectParts(e){const t=new r.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}}}wrapInlineParts(){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(o.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(o.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>=1;e--){var t,i;const n=this.parts[e].node;if("P"===n.tagName&&!n.textContent.trim()&&[...n[this.parser.context.childElementsProp]].every(e=>"BR"===e.tagName)||Object(o.i)(n)||Array.from(n.classList).some(e=>["references","reflist-talk"].includes(e))||"DL"===n.tagName&&this.parts[e-1]&&(null===(t=n.nextElementSibling)||void 0===t?void 0:null===(i=t.firstElementChild)||void 0===i?void 0:i.firstElementChild)===this.parts[e-1].node||this.parser.noSignatureElements.some(e=>e.contains(n))||"up"!==this.parts[e].step&&this.parser.context.areThereOutdents()&&this.parser.context.getElementByClassName(n,a.a.config.outdentClass))this.parts.splice(e,1);else break}const n=null===(e=this.parts[this.parts.length-1])||void 0===e?void 0:e.node;if("P"===n.tagName){var r;if("BR"===(null===(r=n.firstChild)||void 0===r?void 0:r.tagName))n.parentNode.insertBefore(n.firstChild,n)}for(let e,t=this.parts.length-1;t>=1;t--){const i=this.parts[t];if(i.isHeading)continue;if(this.isUnsignedItem(i)){this.parts.splice(t);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.isOtherKindOfList(n.node)&&!("up"===n.step&&this.parts[e+1]&&("UL"!==n.node.tagName&&this.isPartOfList(this.parts[e+1].node,!1)&&"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)}}}}updateHighlightables(){this.highlightables=this.elements.filter(e=>!(Object(o.g)(e)||Object(o.i)(e)||a.a.g.noHighlightClasses.some(t=>e.classList.contains(t))||"FIGURE"===e.tagName&&/\\b(mw:File\\/(Thumb|Frame))/.test(e.getAttribute("typeof"))||/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(o.o).filter(e=>a.a.g.badHighlightableElements.includes(e.tagName)||this.highlightables.length>1&&"LI"===e.tagName&&"OL"===e.parentNode.tagName||e.className&&"cd-comment-replacedPart"!==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.signatureElement,...this.extraSignatures.map(e=>e.element)].forEach(e=>{e.classList.add("cd-signature-timestamp")});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.a(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.updateHighlightables();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.updateHighlightables()}}updateLevels(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=a.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=[],r=t?"level":"logicalLevel";a.a.comments.slice(this.index+1).some(t=>{if(t.section===this.section&&(t[r]>this[r]||"level"===r&&i&&t[r]===this[r]&&t.isOutdented)){if(t[r]===this[r]+1||e||t.getParent()===this)n.push(t);return!1}else{if("logicalLevel"===r&&this.parser.context.areThereOutdents())a.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(o.d)(e)+"_"+Object(o.l)(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(!a.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(a.a.config.outdentClass)].reverse().forEach(t=>{let i,n;const r=new s.a(t,e.context.rootElement);for(;r.nextNode()&&!i;){let s=r.currentNode.getAttribute("data-cd-comment-index");if("0"===s)break;if(null!==s){s=Number(s);i=a.a.comments[s];for(let e=s-1;e>=0;e--){const t=a.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");a.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";var n=i(7);class ElementsAndTextTreeWalker extends n.a{constructor(e,t){super(t,e=>e.nodeType===Node.TEXT_NODE||e.nodeType===Node.ELEMENT_NODE);if(e)this.currentNode=e}}t.a=ElementsAndTextTreeWalker},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=i(10),r=i(11),s=i(8),cd=i(0),a=i(1);var o={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"}},l=function(e,t,i){var n,r=o[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 c(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 u={date:c({formats:{full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},defaultWidth:"full"}),time:c({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:c({formats:{full:"{{date}} \'at\' {{time}}",long:"{{date}} \'at\' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},defaultWidth:"full"})},h={lastWeek:"\'last\' eeee \'at\' p",yesterday:"\'yesterday at\' p",today:"\'today at\' p",tomorrow:"\'tomorrow at\' p",nextWeek:"eeee \'at\' p",other:"P"};function d(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 f(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)?m(l,(function(e){return e.test(o)})):p(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 p(e,t){for(var i in e)if(e.hasOwnProperty(i)&&t(e[i]))return i}function m(e,t){for(var i=0;i<e.length;i++)if(t(e[i]))return i}var g;d({values:{narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},defaultWidth:"wide"}),d({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}}),d({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"}),d({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"}),d({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"}),g={matchPattern:/^(\\d+)(th|st|nd|rd)?/i,parsePattern:/\\d+/i,valueCallback:function(e){return parseInt(e,10)}},f({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"}),f({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}}),f({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"}),f({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"}),f({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 b(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=[],r=0;r<i.length;r++){var s=v[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 v={year:0,month:1,day:2,hour:3,minute:4,second:5};var _={};function y(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 E={timezone:/([Z+-].*)$/,timezoneZ:/^(Z)$/,timezoneHH:/^([+-]\\d{2})$/,timezoneHHMM:/^([+-]\\d{2}):?(\\d{2})$/};function x(e,t,i){var n,r,s;if(""===e)return 0;if(n=E.timezoneZ.exec(e))return 0;if(n=E.timezoneHH.exec(e))if(!N(s=parseInt(n[1],10)))return NaN;else return-36e5*s;if(n=E.timezoneHHMM.exec(e)){s=parseInt(n[1],10);var a=parseInt(n[2],10);if(!N(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 y(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=b(e,t),n=y(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 N(e,t){return-23<=e&&e<=23&&(null==t||0<=t&&t<=59)}var C={};function S(e,t){return-x(e,t)}i(6),i(30),i(31);const O={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 w(e,t){const i=Object(a.k)(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,s=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(a.e)(O[n]):O[n].map(mw.msg)).indexOf(d);break;case"d":case"j":c=Number(s(d));break;case"D":case"l":break;case"n":l=Number(s(d))-1;break;case"Y":o=Number(s(d));break;case"xkY":o=Number(s(d))-543;break;case"G":case"H":u=Number(s(d));break;case"i":h=Number(s(d));break;default:throw"Not implemented"}}const d=Date.UTC(o,l,c,u,h),f="number"==typeof t?t*cd.a.g.msInMin:"UTC"===t?0:S(t,d);return new Date(d-f)}(r,t),match:r}}t.a=class{constructor(e){this.context=e;this.existingCommentIds=[]}init(){this.rejectClasses=["cd-comment-part","mw-pt-languages","mw-archivedtalk","ombox",...cd.a.config.closedDiscussionClasses,cd.a.config.outdentClass];const e=["blockquote","q","cite","figure"].join(", "),t=cd.a.g.noSignatureClasses.map(e=>"."+e).join(", ");this.noSignatureElements=[...this.context.rootElement.querySelectorAll(`${e}, ${t}`)]}createComment(e,t){return new this.context.CommentClass(this,e,t)}createSection(e,t,i){return new this.context.SectionClass(this,e,t,i)}processAndRemoveDtMarkup(e){const t=[...this.context.rootElement.getElementsByTagName("span")].filter(e=>e.hasAttribute("data-mw-comment-start")||e.hasAttribute("data-mw-comment-end")||"SPAN"===e.tagName&&e.hasAttribute("data-mw-thread-id")&&!e.classList.length&&!e.textContent).concat([...this.context.rootElement.getElementsByClassName("ext-discussiontools-init-replylink-buttons")]).filter(a.o);this.context.processAndRemoveDtElements(t,e);this.context.removeDtButtonHtmlComments();this.replaceTimestampLinksWithSpans()}replaceTimestampLinksWithSpans(){[...this.context.rootElement.getElementsByClassName("ext-discussiontools-init-timestamplink")].forEach(e=>{e.parentNode.insertBefore(document.createTextNode(e.textContent),e);e.remove()})}handleFactotumOutdents(e,t){var i;if(!/^\\u250c\\u2500*\\u2518$/.test(e)||t.parentNode.classList.contains(cd.a.config.outdentClass)||t.parentNode.parentNode.classList.contains(cd.a.config.outdentClass))return;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()}findTimestamp(e){const t=e.textContent;this.handleFactotumOutdents(t,e);const{date:i,match:n}=w(t)||{};if(!i||this.noSignatureElements.some(t=>t.contains(e)))return null;const r=document.createElement("span");r.classList.add("cd-timestamp");r.appendChild(document.createTextNode(n[2]));const s=e.textContent.slice(n.index+n[0].length),a=s?document.createTextNode(s):void 0;e.textContent=n[1];e.parentNode.insertBefore(r,e.nextSibling);if(a)e.parentNode.insertBefore(a,r.nextSibling);return{element:r,date:i}}convertTimestampToSignature(e){let t,i=e.element;for(;!t&&(i=i.parentNode)&&Object(a.h)(i);)if(i.classList.contains(cd.a.config.unsignedClass))t=i;let n=!1;const o=new s.a(e.element,this.context.rootElement);for(;o.previousNode()&&(Object(a.h)(o.currentNode)||Object(a.i)(o.currentNode));)if(o.currentNode.classList.contains("cd-signature")){n=!0;break}const l=t||e.element,c=new r.a(l,this.context.rootElement),u={};let h,d=0,f=[];if(t)h=l;else{f.push(l);c.previousSibling()}let p=c.currentNode;do{d+=p.textContent.length;if(p.tagName){u.isLastLinkAuthorLink=!1;if("A"===p.tagName){if(!this.constructor.processLinkData(p,u))break}else{const e=[...p.getElementsByTagName("a")].reverse();for(const t of e)if(!t.classList.contains("external"))this.constructor.processLinkData(t,u)}if(u.isLastLinkAuthorLink)h=p}f.push(p);p=c.previousSibling();if(!p&&!h){p=c.parentNode();if(!p||!Object(a.h)(p))break;d=0;f=[]}}while(p&&Object(a.h)(p,!0)&&d<cd.a.config.signatureScanLimit&&!(u.name&&(p.tagName&&["S","STRIKE","DEL"].includes(p.tagName)||!p.tagName&&this.constructor.punctuationRegexp.test(p.textContent))||p.tagName&&(p.classList.contains("cd-timestamp")||["S","STRIKE","DEL"].includes(p.tagName)&&d>=30)));if(!u.name)return null;if(!f.length)f=[l];const m=f.indexOf(h);f.splice(-1===m?1:m+1);const g=f[0].parentNode,b=f[0].nextSibling,v=document.createElement("span");v.classList.add("cd-signature");f.reverse().forEach(v.appendChild.bind(v));g.insertBefore(v,b);return{element:v,timestampElement:e.element,timestampText:e.element.textContent,date:e.date,authorLink:u.link,authorTalkLink:u.talkLink,authorName:u.name,isUnsigned:Boolean(t),isExtraSignature:n}}findUnsigneds(){if(!cd.a.config.unsignedClass)return[];const e=[];[...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}=this.constructor.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(){const e=this.context.getAllTextNodes().map(this.findTimestamp.bind(this)).filter(a.c).map(this.convertTimestampToSignature.bind(this)).filter(a.c).concat(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],s=0;do{n=r;r=n.reduce((e,t)=>e.concat([...t[this.context.childElementsProp]]),[]);if(["DL","UL","OL"].includes(n[0].tagName))s++}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(a.h)(e))&&r.map(e=>e.textContent).join("").replace(/\\s+/g,"")===i);return{nodes:n,levelsPassed:s}}findHeadings(){return[...this.context.rootElement.querySelectorAll("h1, h2, h3, h4, h5, h6")].map(e=>{for(let t=e;t&&t!==this.context.rootElement;t=t.parentNode)if(t.classList.contains("mw-heading"))return t;return e}).filter(e=>"mw-toc-heading"!==e.getAttribute("id")&&!this.noSignatureElements.some(t=>t.contains(e))).map(e=>({type:"heading",isWrapper:!Object(a.g)(e,!0),level:Object(a.f)(e),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,hostname:s,fragment:o}=Object(a.j)(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(cd.a.g.contribsPageLinkRegexp.test(e)){i=e.replace(cd.a.g.contribsPageLinkRegexp,"");if(cd.a.g.isIPv6Address(i))i=i.toUpperCase();r="contribs"}if(s!==cd.a.g.serverName)r+="Foreign";i&&(i=Object(a.m)(Object(a.n)(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}}static processLinkData(e,t){const{userName:i,linkType:n}=this.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}getNestingLevel(e){const t=new s.a(e,this.context.rootElement);let i=0;for(;t.parentNode();)i++;return i}static init(){this.punctuationRegexp=new RegExp(`(?:^|[${cd.a.g.letterPattern}])[)\\\\]]*(?:[.!?\\u2026\\u0964\\u0589\\u104b\\u06d4]+ |[\\u3002\\uff01\\uff1f]+)`)}}},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(16)),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(17)),s=n(i(12)),a=n(i(18)),o=n(i(13));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),x=u("I",41,1),T=u("P",42,1),N=u("T",43,1),C=h("Y",45),S=h("L",46),O=h("E",47),w=u("Y",49,1),L=u("L",50,1),D=u("E",51,1),M=h("I",54),P=h("T",55),A=h("L",56),k=h("E",57),I=u("I",58,1),q=u("T",59,1),j=u("L",60,1),U=u("E",61,1),B=u("#",63,64),R=u("X",66,65),H=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)x(this,e);else if(41===this._state)T(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)N(this,e);else if(43===this._state)this.stateAfterSpecialLast(e,6);else if(44===this._state)C(this,e);else if(29===this._state)this.stateInCdata(e);else if(45===this._state)S(this,e);else if(46===this._state)O(this,e);else if(47===this._state)this.stateBeforeSpecialLast(e,3);else if(48===this._state)w(this,e);else if(49===this._state)L(this,e);else if(50===this._state)D(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)A(this,e);else if(56===this._state)k(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)U(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)B(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)R(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=H},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(40)),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(9),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 x(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 x(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?T(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?T(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?T(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=x;function T(e){for(var t=e.map((function(e){return x(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(5)),d=o(i(21)),f=i(15);!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(22),t);r(i(44),t);r(i(45),t);r(i(25),t);r(i(26),t);r(i(46),t);r(i(47),t);var s=i(5);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(5),s=n(i(41)),a=i(9);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(12)),s=n(i(18)),a=n(i(13)),o=n(i(17)),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(13)).default),s=h(r);t.encodeXML=g(r);var a,o,l=u(n(i(12)).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(5);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(5),r=i(25),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;return!1}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(/&amp;/g,"&").replace(/&quot;/g,\'"\');return t};c.prototype.setAttribute=function(e,t){if(t&&"string"==typeof t){if(-1!==t.indexOf("&"))t=t.replace(/&/g,"&amp;");if(-1!==t.indexOf(\'"\'))t=t.replace(/"/g,"&quot;")}this.attribs[e]=String(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=[];this._classList.movedFromClassAttr=!1;this._classList.moveFromClassAttr=e=>{this._classList.push(...(e||"").split(" "));this._classList.movedFromClassAttr=!0};this._classList.add=(...e)=>{e.forEach(e=>{let t=this.getAttribute("class")||"";if(t)t+=" ";t+=e;this.setAttribute("class",t);if(this._classList.movedFromClassAttr)this._classList.push(e);else this._classList.moveFromClassAttr(t)})};this._classList.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)).trim();this.setAttribute("class",t);if(this._classList.movedFromClassAttr)this._classList.splice(e,this._classList.indexOf(e),1);else this._classList.moveFromClassAttr(t)}})};this._classList.contains=e=>{const t=this.getAttribute("class");if(!t)return!1;if(!this._classList.movedFromClassAttr)this._classList.moveFromClassAttr(t);return Boolean(this._classList.length)&&-1!==this._classList.indexOf(e)};return this._classList}}});Object.defineProperty(c.prototype,"className",{get:function(){return this.getAttribute("class")},set:function(e){this.setAttribute("class",e)}});c.prototype.filterRecursively=function(e,t){const i=[];s(this,n=>{if(e(n)){i.push(n);if(t&&i.length===t)return!0}});return i};c.prototype.getElementsByClassName=function(e,t){return this.filterRecursively(t=>t.tagName&&t.classList.contains(e),t)};c.prototype.getElementsByAttribute=function(e){return this.filterRecursively(t=>t.tagName&&Object.keys(t.attribs).some(t=>e.test(t)))};c.prototype.querySelectorAll=function(e){const t=e.split(/ *, */),i=t.filter(e=>!e.startsWith(".")).map(e=>e.toUpperCase()),n=t.filter(e=>e.startsWith(".")).map(e=>e.slice(1));return this.filterRecursively(e=>e.tagName&&(i.includes(e.tagName)||n.some(t=>e.classList.contains(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;o.prototype.querySelectorAll=c.prototype.querySelectorAll;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(48),r="",s="",a="";r=e.toString();var o=n("HTML_ENTITIES",t);if(!1===o)return!1;delete o["&"];o["&"]="&amp;";for(a in o){s=o[a];r=r.split(s).join(a)}return r=r.split("&#039;").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(7),s=i(0),a=i(1);t.a=class{constructor(e,t,i){var r;this.parser=e;this.headingElement=t.element;const o=e=>Object(a.g)(e,!0)?e:null;this.hElement=o(this.headingElement)||o(this.headingElement.firstElementChild)||this.headingElement.querySelectorAll("h1, h2, h3, h4, h5, h6")[0];this.headlineElement=s.a.g.isParsoidUsed?this.hElement:this.parser.context.getElementByClassName(this.hElement,"mw-headline")||this.hElement;if(!this.headlineElement)throw new n.a;this.id=this.headlineElement.getAttribute("id");this.parseHeadline();const l=this.hElement.tagName.match(/^H([1-6])$/);this.level=l&&Number(l[1]);this.sectionNumber=null;const c=[...(null===(r=this.parser.context.getElementByClassName(this.headingElement,"mw-editsection"))||void 0===r?void 0:r.getElementsByTagName("a"))||[]].find(e=>{var t;return null===(t=e.getAttribute("href"))||void 0===t?void 0:t.includes("action=edit")});if(c){this.editUrl=new URL(s.a.g.server+c.getAttribute("href"));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.initContent(t,i);this.index=s.a.sections.length}initContent(e,t){var i,n;this.headingNestingLevel=this.parser.getNestingLevel(this.headingElement);const s=t.indexOf(e);let o=t.findIndex((e,t)=>t>s&&"heading"===e.type);if(-1===o)o=void 0;const l=null===(i=t[o])||void 0===i?void 0:i.element;let c=t.findIndex((e,t)=>t>s&&"heading"===e.type&&e.level<=this.level);if(-1===c)c=void 0;const u=null===(n=t[c])||void 0===n?void 0:n.element,h=new r.a(this.parser.context.rootElement,e=>!Object(a.i)(e)&&!e.classList.contains("cd-section-button-container"),!0);this.lastElement=this.getLastElement(u,h);this.lastElementInFirstChunk=l===u?this.lastElement:this.getLastElement(l,h);const d=e=>e.filter(e=>"signature"===e.type).map(e=>e.comment).filter(a.b);this.comments=d(t.slice(s,c));this.commentsInFirstChunk=d(t.slice(s,o));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","mw-editsection-like",...s.a.config.excludeFromHeadlineClasses];this.headline=[...this.headlineElement.childNodes].filter(t=>t.nodeType===Node.TEXT_NODE||t.nodeType===Node.ELEMENT_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 s.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";i.r(t);i(39)},function(module,__webpack_exports__,__webpack_require__){"use strict";var _CdError__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__(4),_CommentSkeleton__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__(10),_Parser__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__(14),_SectionSkeleton__WEBPACK_IMPORTED_MODULE_3__=__webpack_require__(32),_cd__WEBPACK_IMPORTED_MODULE_4__=__webpack_require__(0),_debug__WEBPACK_IMPORTED_MODULE_5__=__webpack_require__(2),_htmlparser2Extended__WEBPACK_IMPORTED_MODULE_6__=__webpack_require__(27),_htmlparser2Extended__WEBPACK_IMPORTED_MODULE_7__=__webpack_require__(3),_htmlparser2Extended__WEBPACK_IMPORTED_MODULE_7___default=__webpack_require__.n(_htmlparser2Extended__WEBPACK_IMPORTED_MODULE_7__),_utils_general__WEBPACK_IMPORTED_MODULE_8__=__webpack_require__(1);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_6__.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.init();e.processAndRemoveDtMarkup();return e.findHeadings().concat(e.findSignatures()).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}return null}function filterCommentContent(e){e.hiddenElementsData=[];e.elementHtmls=e.elements.map(t=>{if(Object(_utils_general__WEBPACK_IMPORTED_MODULE_8__.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_general__WEBPACK_IMPORTED_MODULE_8__.i)(t))return hideElement(t,e).textContent;else{t.filterRecursively(e=>e.tagName&&(["autonumber","reference","references"].some(t=>e.classList.contains(t))||Object(_utils_general__WEBPACK_IMPORTED_MODULE_8__.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.contains("mw-heading")){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_general__WEBPACK_IMPORTED_MODULE_8__.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);e.elementClassNames=e.elements.map(e=>e.className)}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)});_cd__WEBPACK_IMPORTED_MODULE_4__.a.comments.forEach((e,t)=>{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,t-2),t).reverse();keepSafeValues(e,["authorLink","authorTalkLink","cachedParent","elements","extraSignatures","highlightables","parser","parts","signatureElement","timestampElement"])});_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,["cachedAncestors","headingElement","hElement","headlineElement","lastElement","lastElementInFirstChunk","parser"])})}function parse(){_cd__WEBPACK_IMPORTED_MODULE_4__.a.comments=[];_cd__WEBPACK_IMPORTED_MODULE_4__.a.sections=[];_Parser__WEBPACK_IMPORTED_MODULE_2__.a.init();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},processAndRemoveDtElements: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.rejectNode=restoreFunc(_cd__WEBPACK_IMPORTED_MODULE_4__.a.config.rejectNode);_cd__WEBPACK_IMPORTED_MODULE_4__.a.g.isIPv6Address=restoreFunc(_cd__WEBPACK_IMPORTED_MODULE_4__.a.g.isIPv6Address);self.document=Object(_htmlparser2Extended__WEBPACK_IMPORTED_MODULE_7__.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(9)),l=i(42),c=i(43),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,"&quot;"))+\'"\'})).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(23),r=i(24);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(24);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(23);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(5),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(5);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(22),r=i(26);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]="&amp;";if("HTML_ENTITIES"===i){r[160]="&nbsp;";r[161]="&iexcl;";r[162]="&cent;";r[163]="&pound;";r[164]="&curren;";r[165]="&yen;";r[166]="&brvbar;";r[167]="&sect;";r[168]="&uml;";r[169]="&copy;";r[170]="&ordf;";r[171]="&laquo;";r[172]="&not;";r[173]="&shy;";r[174]="&reg;";r[175]="&macr;";r[176]="&deg;";r[177]="&plusmn;";r[178]="&sup2;";r[179]="&sup3;";r[180]="&acute;";r[181]="&micro;";r[182]="&para;";r[183]="&middot;";r[184]="&cedil;";r[185]="&sup1;";r[186]="&ordm;";r[187]="&raquo;";r[188]="&frac14;";r[189]="&frac12;";r[190]="&frac34;";r[191]="&iquest;";r[192]="&Agrave;";r[193]="&Aacute;";r[194]="&Acirc;";r[195]="&Atilde;";r[196]="&Auml;";r[197]="&Aring;";r[198]="&AElig;";r[199]="&Ccedil;";r[200]="&Egrave;";r[201]="&Eacute;";r[202]="&Ecirc;";r[203]="&Euml;";r[204]="&Igrave;";r[205]="&Iacute;";r[206]="&Icirc;";r[207]="&Iuml;";r[208]="&ETH;";r[209]="&Ntilde;";r[210]="&Ograve;";r[211]="&Oacute;";r[212]="&Ocirc;";r[213]="&Otilde;";r[214]="&Ouml;";r[215]="&times;";r[216]="&Oslash;";r[217]="&Ugrave;";r[218]="&Uacute;";r[219]="&Ucirc;";r[220]="&Uuml;";r[221]="&Yacute;";r[222]="&THORN;";r[223]="&szlig;";r[224]="&agrave;";r[225]="&aacute;";r[226]="&acirc;";r[227]="&atilde;";r[228]="&auml;";r[229]="&aring;";r[230]="&aelig;";r[231]="&ccedil;";r[232]="&egrave;";r[233]="&eacute;";r[234]="&ecirc;";r[235]="&euml;";r[236]="&igrave;";r[237]="&iacute;";r[238]="&icirc;";r[239]="&iuml;";r[240]="&eth;";r[241]="&ntilde;";r[242]="&ograve;";r[243]="&oacute;";r[244]="&ocirc;";r[245]="&otilde;";r[246]="&ouml;";r[247]="&divide;";r[248]="&oslash;";r[249]="&ugrave;";r[250]="&uacute;";r[251]="&ucirc;";r[252]="&uuml;";r[253]="&yacute;";r[254]="&thorn;";r[255]="&yuml;"}if("ENT_NOQUOTES"!==n)r[34]="&quot;";if("ENT_QUOTES"===n)r[39]="&#39;";r[60]="&lt;";r[62]="&gt;";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 ye=t.a={content:{},scrollData:{offset:null},autoScrolling:!1,isUpdateThreadLinesHandlerAttached:!1,lastScrollX:0,originalPageTitle:document.title,lastCheckedRevisionId:null,addedCommentCount:0,areRelevantCommentsAdded:!1,relevantAddedCommentIds:null,commentsNotifiedAbout:[],isObstructingElementHoveredCached:!1,init(){var e,t;this.$content||(this.$content=$("#mw-content-text"));if(cd.a.g.isMobile)$(document.body).addClass("cd-mobile");const i=!0===Object(w.s)("cdtalkpage"),n=!1===Object(w.s)("cdtalkpage");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(w.x)(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));this.bootOnTalkPage();this.bootOnCommentLinksPage()},setup(e){var t;if(null===(t=this.$content[0])||void 0===t||!t.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").first();if(!this.$root.length)this.$root=this.$content;this.rootElement=this.$root[0]}this.$root.addClass("cd-parse-started")},reset(){var e,t;this.cleanUpUrlAndDom();null===(e=this.mutationObserver)||void 0===e||e.disconnect();p.a.reset();O.a.reset();c.a.forgetOnTarget(cd.a.page,"addSection");null===(t=this.$emulatedAddTopicButton)||void 0===t||t.remove();delete this.$addTopicButtons;this.content={};this.addedCommentCount=0;this.areRelevantCommentsAdded=!1;this.relevantAddedCommentIds=null;delete this.dtSubscribableThreads;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"===cd.a.g.pageAction&&Object(w.x)(cd.a.g.pageName,cd.a.g.namespaceNumber),isDiffPage(){return this.diffPage},isDefinitelyTalkPage(){return this.definitelyTalkPage},isArticlePageTalkPage(){return this.articlePageTalkPage},toggleAutoScrolling(e){this.autoScrolling=Boolean(e)},isAutoScrolling(){return this.autoScrolling},getWindowManager(e="default"){var t=this;this.windowManagers||(this.windowManagers={});if(!this.windowManagers[e]){var i,n;this.windowManagers[e]=new OO.ui.WindowManager;this.windowManagers[e].on("closing",function(){var i=s()((function*(i,n){yield n;t.windowManagers[e].clearWindows()}));return function(e,t){return i.apply(this,arguments)}}());$((null===(i=(n=OO.ui).getTeleportTarget)||void 0===i?void 0:i.call(n))||document.body).append(this.windowManagers[e].$element)}return this.windowManagers[e]},getApi(){this.api||(this.api=new mw.Api(cd.a.getApiConfig()));return this.api},getWorker(){this.worker||(this.worker=new ve);return this.worker},getContentColumnOffsets(e){if(!this.contentColumnOffsets||e){const t="ltr"===cd.a.g.contentDirection?"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,s=this.$contentColumn.outerWidth();this.contentColumnOffsets={startMargin:i,start:"ltr"===cd.a.g.contentDirection?n:n+s,end:"ltr"===cd.a.g.contentDirection?n+s:n};if(e)$(document.documentElement).css("--cd-content-start-margin",i+"px")}return this.contentColumnOffsets},isCurrentRevision:()=>mw.config.get("wgRevisionId")>=mw.config.get("wgCurRevisionId"),saveRelativeScrollPosition(e=null,t=window.scrollY){if(null!==e&&!N.a.isInSidebar()&&N.a.isPresent()&&t<N.a.getBottomOffset())this.saveScrollPosition(e);else{this.scrollData.element=null;this.scrollData.elementTop=null;this.scrollData.touchesBottom=!1;this.scrollData.offsetBottom=document.documentElement.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 le.a(this.rootElement.firstElementChild,this.rootElement);for(;;){const t=e.currentNode;if(!Object(w.v)(t)&&!this.getFloatingElements().includes(t)){const i=t.getBoundingClientRect();if(i.top>cd.a.g.bodyScrollPaddingTop+cd.a.g.contentFontSize&&this.scrollData.element&&!Object(w.u)(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,document.documentElement.scrollHeight-window.innerHeight-this.scrollData.offsetBottom);else if(this.scrollData.element){const e=this.scrollData.element.getBoundingClientRect();if(Object(C.h)(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=p.a.getAll().map(e=>e.thread).filter(w.h).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)&&!N.a.isInSidebar()&&N.a.isPresent()&&!N.a.isFloating()&&0!==window.scrollY&&N.a.getBottomOffset()<window.scrollY+window.innerHeight?N.a.$element.outerHeight():null},restoreScrollPosition(e=!0){if(null!==this.scrollData.offset){if(this.scrollData.tocHeight)this.scrollData.offset+=(N.a.$element.outerHeight()||0)-this.scrollData.tocHeight;window.scrollTo(0,this.scrollData.offset);this.scrollData.offset=null;if(e)this.scrollData.tocHeight=null}},getClosedDiscussions(){var e;(e=this.content).closedDiscussions||(e.closedDiscussions=this.$root.find(cd.a.config.closedDiscussionClasses.concat("mw-archivedtalk").map(e=>"."+e).join(", ")).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=>{try{[...t.cssRules].forEach(e)}catch(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",".tleft",".floatright",".floatleft",".mw-halign-right",".mw-halign-left",'*[style*="float:right"]','*[style*="float: right"]','*[style*="float:left"]','*[style*="float: left"]','figure[typeof~="mw:File/Thumb"]','figure[typeof~="mw:File/Frame"]',...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(!(this.mouseMoveBlocked||this.isAutoScrolling()||this.isPageOverlayOn()))this.emit("mouseMove",e)},isObstructingElementHovered(){if(void 0===this.notificationArea){this.notificationArea=$(".mw-notification-area")[0];this.tocButton=$("#vector-page-titlebar-toc")[0];this.stickyHeader=$("#vector-sticky-header")[0];this.tocContent=$(".vector-dropdown-content")[0]}OO.ui.throttle(()=>{var e,t,i;this.isObstructingElementHoveredCached=Boolean([...(null===(e=this.notificationArea)||void 0===e?void 0:e.querySelectorAll(".mw-notification"))||[],o.a.getActiveMenu(),null===(t=S.$element)||void 0===t?void 0:t[0],...document.body.querySelectorAll(".oo-ui-popupWidget:not(.oo-ui-element-hidden)"),$(document.body).children("dialog")[0],this.stickyHeader,null===(i=O.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===i?void 0:i.$element[0],this.tocButton,this.tocContent].filter(w.i).some(e=>e.matches(":hover"))||$(document.body).children(".ui-dialog").not('[style*="display: none"]').length)},100)();return this.isObstructingElementHoveredCached},handleWindowResize(){var e=this;return s()((function*(){yield Object(w.G)("vector-2022"===cd.a.g.skin?100:0);e.getContentColumnOffsets(!0);e.emit("resize");e.handleScroll()}))()},handleGlobalKeyDown(e){if(!this.isPageOverlayOn())this.emit("keydown",e)},handleScroll(){if(!this.isAutoScrolling()){this.mouseMoveBlocked=!0;this.throttledHandleScroll||(this.throttledHandleScroll=OO.ui.throttle(()=>{this.mouseMoveBlocked=!1;if(!this.isAutoScrolling())this.emit("scroll")},300));this.throttledHandleScroll();if(window.scrollX!==this.lastScrollX)$(document).trigger("horizontalscroll.cd");this.lastScrollX=window.scrollX}},handleHorizontalScroll(){this.emit("horizontalScroll")},handlePopState(){try{this.emit("popState",decodeURIComponent(location.hash.slice(1)))}catch(e){console.error(e)}this.updatePageTitle()},handleSelectionChange(){this.throttledHandleSelectionChange||(this.throttledHandleSelectionChange=OO.ui.throttle(()=>{this.emit("selectionChange")},200));this.throttledHandleSelectionChange()},handlePageMutate(){if(!this.booting)this.emit("mutate")},handleAddTopicButtonClick(e){if(e.ctrlKey||e.shiftKey||e.metaKey)return;const t=$(e.currentTarget);let i,n=!1;if(t.is("a")){var s;const{searchParams:e}=new URL(t.prop("href"));i={editIntro:Object(w.r)(e.getAll("editintro")),commentTemplate:Object(w.r)(e.getAll("preload")),headline:Object(w.r)(e.getAll("preloadtitle")),params:e.getAll("preloadparams[]"),summary:null===(s=Object(w.r)(e.getAll("summary")))||void 0===s?void 0:s.replace(/^.+?\*\/ */,""),noHeadline:Boolean(Object(w.r)(e.getAll("nosummary"))),omitSignature:Boolean(e.get("cdomitsignature"))};n="0"===Object(w.r)(e.getAll("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(),params:e.find('input[name="preloadparams[]"]').get().map(e=>e.value),summary:e.find('input[name="summary"]').val(),noHeadline:Boolean(e.find('input[name="nosummary"]').val()),omitSignature:!1}}e.preventDefault();cd.a.page.addSection(void 0,void 0,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 s()((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||null},bootOnTalkPage(){var e=this;if(!this.talkPage)return;g.a.stopTimer("start");g.a.startTimer("load data");this.bootProcess=new se;let t=[];if("ready"===mw.loader.getState("mediawiki.api"))t=f.a.getSiteData();const i=["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-citation","oojs-ui.styles.icons-editing-core","oojs-ui.styles.icons-interactions","oojs-ui.styles.icons-movement","user.options",mw.loader.getState("ext.confirmEdit.CaptchaInputWidget")?"ext.confirmEdit.CaptchaInputWidget":void 0].filter(w.h);let n;if(i.every(e=>"ready"===mw.loader.getState(e))){if(t.every(e=>"resolved"===e.state()))this.bootProcess.passedData={scrollY:window.scrollY}}else n=mw.loader.using(i);this.showLoadingOverlay();Promise.all([n,...t]).then(s()((function*(){Object(ge.mixEventEmitterIntoObject)(e);Object(ge.mixEventEmitterIntoObject)(T.a);Object(ge.mixEventEmitterIntoObject)(Z.a);Object(ge.mixEventEmitterIntoObject)(v.a);Object(ge.mixEventEmitterIntoObject)(m.a);Object(ge.mixEventEmitterIntoObject)(p.a);yield e.tryExecuteBootProcess();Z.a.on("check",t=>{e.lastCheckedRevisionId=t}).on("commentsUpdate",e.updateAddedComments.bind(e))})),e=>{mw.notify(cd.a.s("error-loaddata"),{type:"error"});console.error(e);this.hideLoadingOverlay()});Object(w.G)(15e3).then(()=>{if(this.booting){this.hideLoadingOverlay();console.warn("The loading overlay stays for more than 15 seconds; removing it.")}});this.$contentColumn=Object(C.n)({timeless:"#mw-content",minerva:"#bodyContent",default:"#content"});f.a.memorizeCssValues();f.a.addTalkPageCss()},reload(e={}){var t=this;return s()((function*(){var i,n;if(t.booting)return;e.isRevisionSliderRunning=Boolean(null===(i=history.state)||void 0===i?void 0:i.sliderPos);const s=new se(e);t.emit("beforeReload",s.passedData);if(!s.passedData.commentIds&&!s.passedData.sectionId)t.saveScrollPosition();g.a.init();g.a.startTimer("total time");g.a.startTimer("get HTML");t.showLoadingOverlay();Object(ee.e)().catch(e=>{console.warn(e)});try{s.passedData.parseData=yield cd.a.page.parse(null,!1,!0)}catch(e){t.hideLoadingOverlay();if(s.passedData.wasCommentFormSubmitted)throw e;else{mw.notify(cd.a.s("error-reloadpage"),{type:"error"});console.warn(e);return}}s.passedData.unseenCommentIds=p.a.query(e=>!1===e.isSeen).map(e=>e.id);t.bootProcess=s;t.emit("startReload");null===(n=t.$addSectionButtonContainer)||void 0===n||n.remove();$(".cd-commentForm-addSection").remove();t.reset();g.a.stopTimer("get HTML");yield t.tryExecuteBootProcess(!0);t.emit("reload");if(!s.passedData.commentIds&&!s.passedData.sectionId)t.restoreScrollPosition(!1)}))()},updatePageContents(e){var t,i,n,s;this.$content.children(".mw-parser-output").first().replaceWith(this.$root);null===(t=(i=mw.util).clearSubtitle)||void 0===t||t.call(i);null===(n=(s=mw.util).addSubtitle)||void 0===n||n.call(s,e.subtitle);if($("#catlinks").length){const t=$($.parseHTML(e.categorieshtml));mw.hook("wikipage.categories").fire(t);$("#catlinks").replaceWith(t)}mw.config.set({wgRevisionId:e.revid,wgCurRevisionId:e.revid});mw.loader.load(e.modules);mw.loader.load(e.modulestyles);mw.config.set(e.jsconfigvars)},highlightMentions(e){if(!e.is("#mw-content-text, .cd-comment-part"))return;const t=cd.a.user.getName(),i=[y.a.get("reformatComments")?"cd-comment-author":"cd-signature"].concat(cd.a.config.noSignatureClasses).map(e=>"."+e).join(", ");e.find(e.hasClass("cd-comment-part")?`a[title$=":${t}"], a[title*=":${t} ("]`:`.cd-comment-part a[title$=":${t}"], .cd-comment-part a[title*=":${t} ("]`).filter((function(){var e;return cd.a.g.userLinkRegexp.test(this.title)&&!this.closest(i)&&(null===(e=d.a.processLink(this))||void 0===e?void 0:e.userName)===cd.a.user.getName()})).each((e,t)=>{t.classList.add("cd-currentUserLink")})},addEventListeners(){if(!y.a.get("reformatComments"))$(document).on("mousemove mouseover",this.handleMouseMove.bind(this));$(document).on("scroll visibilitychange",this.handleScroll.bind(this)).on("horizontalscroll.cd visibilitychange",this.handleHorizontalScroll.bind(this)).on("selectionchange",this.handleSelectionChange.bind(this));$(window).on("resize orientationchange",this.handleWindowResize.bind(this)).on("popstate",this.handlePopState.bind(this));mw.hook("wikipage.content").add(this.connectToCommentLinks.bind(this),this.highlightMentions.bind(this));mw.hook("convenientDiscussions.previewReady").add(this.connectToCommentLinks.bind(this));setInterval(this.handlePageMutate.bind(this),1e3);if(cd.a.page.isCommentable())$(document).on("keydown",this.handleGlobalKeyDown.bind(this));mw.hook("wikipage.content").add(this.handleWikipageContentHookFirings.bind(this))},connectToCommentLinks(e){if(e.is("#mw-content-text, .cd-commentForm-preview"))e.find('a[href^="#"]').filter((function(){return!this.onclick&&r.a.isAnyId($(this).attr("href").slice(1))})).on("click",(function(e){var t;e.preventDefault();null===(t=p.a.getByAnyId($(this).attr("href").slice(1),!0))||void 0===t||t.scrollTo({expandThreads:!0,pushState:!0})}))},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.has("diff")||e.has("oldid")){this.$content.children(".mw-revslider-container, .mw-diff-table-prefix, .diff, .oo-ui-element-hidden, .diff-hr, .diff-currentversion-title").remove();$(".mw-revision").remove();$("#firstHeading").text(cd.a.page.name);document.title=cd.a.mws("pagetitle",cd.a.page.name);this.originalPageTitle=document.title}},cleanUpUrl(e){const t=Object.fromEntries(e.entries());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{searchParams:e}=new URL(location.href);if(e.has("diff")||e.has("oldid"))location.reload()});this.diffPage=!1}else if(!this.bootProcess.passedData.pushState)i="replaceState";if(i)history[i](history.state,"",cd.a.page.getUrl(t))},cleanUpUrlAndDom(){if(this.bootProcess.passedData.isRevisionSliderRunning)return;const{searchParams:e}=new URL(location.href);this.cleanUpDom(e);this.cleanUpUrl(e)},bootOnCommentLinksPage(){if(this.isWatchlistPage()||this.isContributionsPage()||this.isHistoryPage()||this.diffPage&&this.articlePageTalkPage||this.talkPage){if("ready"===mw.loader.getState("mediawiki.api")){f.a.getSiteData();if(!this.talkPage)Object(ee.e)(!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(me.b)();i(53);i(93)},e=>{mw.notify(cd.a.s("error-loaddata"),{type:"error"});console.error(e)})}},isLongPage(){var e,t;null!==(t=(e=this.content).longPage)&&void 0!==t||(e.longPage=$(document).height()>15e3);return this.content.longPage},getRootElement(){return this.rootElement},showEditSubscriptionsDialog(){if(this.isPageOverlayOn())return;const e=new(i(95).default);this.getWindowManager().addWindows([e]);this.getWindowManager().openWindow(e)},showCopyLinkDialog(e,t){if(this.isPageOverlayOn())return;t.preventDefault();const n=e.getWikilinkFragment(),s=mw.config.get("wgFormattedNamespaces")[-1]+":"+cd.a.g.specialPageAliases.PermanentLink[0]+"/"+mw.config.get("wgRevisionId"),o=e instanceof r.a?"comment":"section",a={fragment:n,wikilink:`[[${cd.a.page.name}#${n}]]`,currentPageWikilink:`[[#${n}]]`,permanentWikilink:`[[${s}#${n}]]`,link:e.getUrl(),permanentLink:e.getUrl(!0),copyMessages:{success:cd.a.s("copylink-copied"),fail:cd.a.s("copylink-error")},jsCall:"comment"===o?`let c = convenientDiscussions.api.getCommentById('${e.id}');`:`let s = convenientDiscussions.api.getSectionById('${e.id}');`,jsBreakpoint:`this.id === '${e.id}'`},c="comment"===o?y.a.get("defaultCommentLinkType"):y.a.get("defaultSectionLinkType");if(!t.shiftKey&&c){switch(c){case"wikilink":Object(C.b)(a.wikilink,a.copyMessages);break;case"link":Object(C.b)(a.link,a.copyMessages)}return}const l=new(i(96).default)(e,o,a);this.getWindowManager().addWindows([l]);this.getWindowManager().openWindow(l)},scrollToY(e,t=!0,i){const n=()=>{this.toggleAutoScrolling(!1);this.handleScroll();null==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 s()((function*(){yield Object(w.G)();e.mutationObserver=new MutationObserver(t=>{const i=/^cd-comment(-underlay|-overlay|Layers)/;if(!t.every(e=>i.test(e.target.className)))e.handlePageMutate()});e.mutationObserver.observe(e.$content[0],{attributes:!0,childList:!0,subtree:!0})}))()},showRegularNotification(e){let t=[];if("all"===y.a.get("notifications"))t=e;else if("toMe"===y.a.get("notifications"))t=e.filter(e=>e.isToMe);if("none"!==y.a.get("notifications")&&t.length){const e=E.a.get().find(e=>e.comments&&e.notification.isOpen);if(e)t.push(...e.comments)}if(t.length){let e;const i=cd.a.sParse("notification-reload",m.a.getAll().some(e=>e.isAltered())?" "+cd.a.mws("parentheses",cd.a.s("notification-formdata")):"");if(1===t.length){const n=t[0];if(n.isToMe){const t=n.sectionSubscribedTo?cd.a.mws("word-separator")+cd.a.s("notification-part-insection",n.sectionSubscribedTo.headline):cd.a.mws("word-separator")+cd.a.s("notification-part-onthispage");e=cd.a.sParse("notification-toyou",n.author.getName(),n.author,t)+" "+i}else e=cd.a.sParse("notification-insection",n.author.getName(),n.author,n.sectionSubscribedTo.headline)+" "+i}else{const n=t.every(e=>e.sectionSubscribedTo===t[0].sectionSubscribedTo)?t[0].sectionSubscribedTo:void 0,s=cd.a.mws("word-separator")+(n?cd.a.s("notification-part-insection",n.headline):cd.a.s("notification-part-onthispage"));let o=cd.a.s("notification-newcomments-mayberelevant");if(!o.startsWith(cd.a.mws("comma-separator")))o=cd.a.mws("word-separator")+o;const a=n?"":o;e=cd.a.sParse("notification-newcomments",t.length,s,a)+" "+i}E.a.add(Object(C.q)(e),{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"===y.a.get("desktopNotifications"))i=e;else if("toMe"===y.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],s=cd.a.page.name;if(1===i.length)if(n.isToMe){var o;const e=null!==(o=n.section)&&void 0!==o&&o.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,s)}else t=cd.a.s("notification-insection-desktop",n.author.getName(),n.author,n.section.headline,s);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 o=cd.a.s("notification-newcomments-mayberelevant");if(!o.startsWith(cd.a.mws("comma-separator")))o=cd.a.mws("word-separator")+o;const a=e?"":o;t=cd.a.s("notification-newcomments-desktop",i.length,n,s,a)}new Notification(mw.config.get("wgSiteName"),{body:t,tag:"convenient-discussions-"+i[i.length-1].id}).onclick=()=>{parent.focus();window.focus();this.emit("desktopNotificationClick");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);this.emit("addedCommentsUpdate",{all:e,relevant:t,bySection:r.a.groupBySection(e)});this.updatePageTitle();const i=t.filter(e=>!this.commentsNotifiedAbout.some(t=>t.id===e.id));this.showRegularNotification(i);this.showDesktopNotification(i);this.commentsNotifiedAbout.push(...i)},updatePageTitle(){let e=this.originalPageTitle;const t=m.a.getLastActive();if(t){const i=t.getTarget().getCommentFormMethodName(t.getMode()).toLowerCase();e=cd.a.s("page-title-"+i,e)}if(0===this.addedCommentCount)document.title="";const i=this.areRelevantCommentsAdded?"*":"";document.title=e.replace(/^(?:\(\d+\*?\) )?/,this.addedCommentCount?`(${this.addedCommentCount}${i}) `:"")},getRelevantAddedCommentIds(){return this.relevantAddedCommentIds},maybeMarkPageAsRead(){if(!this.addedCommentCount&&p.a.getAll().every(e=>!e.willFlashChangedOnSight)&&this.lastCheckedRevisionId)cd.a.page.markAsRead(this.lastCheckedRevisionId)},getSubscriptionsInstance(){this.subscriptionsInstance||(this.subscriptionsInstance=new(y.a.get("useTopicSubscription")?ce:he));return this.subscriptionsInstance},connectToAddTopicButtons(){var e,t,i;this.$addTopicButtons=$(["#ca-addsection a",".cd-addTopicButton a","a.cd-addTopicButton",'a[href*="section=new"]','a[href*="Special:NewSection/"]','a[href*="Special:Newsection/"]','a[href*="special:newsection/"]','.commentbox input[type="submit"]','.createbox input[type="submit"]'].concat(cd.a.config.addTopicButtonSelectors).join(", ")).filter((function(){const e=$(this);if("new"===mw.util.getParamValue("section")&&"ca-addsection"!==e.parent().attr("id")&&!e.closest(this.$root).length)return!1;let t,i,n;if(e.is("a")){var s;i=new URL(e.prop("href"));t=null===(s=Object(w.r)(i.searchParams.getAll("title")))||void 0===s?void 0:s.replace(/^Special:NewSection\//i,"")}else if(e.is("input"))t=e.closest("form").find('input[name="title"][type="hidden"]').val();else return!1;try{n=pe.a.get(t)}catch(e){return!1}if(n!==cd.a.page)return!1;if(e.is("a")){i.searchParams.set("dtenable",0);e.attr("href",i)}return!0}));if(!$("#ca-addsection a").length&&1===this.$addTopicButtons.length){this.$emulatedAddTopicButton=$(mw.util.addPortletLink("p-views",this.$addTopicButtons.attr("href"),cd.a.s("addtopic"),"ca-addsection",cd.a.s("addtopicbutton-tooltip"),"+","#ca-history"));this.$addTopicButtons=this.$addTopicButtons.add(this.$emulatedAddTopicButton.children())}this.$addTopicButtons.off("click").on("click.cd",this.handleAddTopicButtonClick.bind(this)).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"));$("#ca-addsection a").updateTooltipAccessKeys();const n=null===(e=$._data(document.body).events)||void 0===e?void 0:null===(t=e.click)||void 0===t?void 0:null===(i=t.find(e=>{var t;return null===(t=e.selector)||void 0===t?void 0:t.includes("data-mw-comment")}))||void 0===i?void 0:i.handler;if(n)$(document.body).off("click",n)},getDtSubscribableThreads(){var e;this.dtSubscribableThreads||(this.dtSubscribableThreads=null===(e=mw.config.get("wgDiscussionToolsPageThreads"))||void 0===e?void 0:e.concat(Object(w.j)(mw.config.get("wgDiscussionToolsPageThreads").filter(e=>1===e.headingLevel).map(e=>e.replies))).filter(e=>2===e.headingLevel));return this.dtSubscribableThreads},isSubscribingDisabled:()=>cd.a.page.isOwnTalkPage()&&!["all","toMe"].includes(y.a.get("desktopNotifications"))}},function(e,t){function i(e,t,i,n,s,o,a){try{var r=e[o](a),c=r.value}catch(e){i(e);return}if(r.done)t(c);else Promise.resolve(c).then(n,s)}e.exports=function(e){return function(){var t=this,n=arguments;return new Promise((function(s,o){var a=e.apply(t,n);function r(e){i(a,s,o,r,c,"next",e)}function c(e){i(a,s,o,r,c,"throw",e)}r(void 0)}))}},e.exports.__esModule=!0,e.exports.default=e.exports},function(e,t,i){"use strict";i.d(t,"q",(function(){return l}));i.d(t,"p",(function(){return d}));i.d(t,"o",(function(){return u}));i.d(t,"l",(function(){return h}));i.d(t,"d",(function(){return m}));i.d(t,"h",(function(){return p}));i.d(t,"m",(function(){return g}));i.d(t,"i",(function(){return f}));i.d(t,"n",(function(){return b}));i.d(t,"e",(function(){return v}));i.d(t,"f",(function(){return y}));i.d(t,"b",(function(){return w}));i.d(t,"k",(function(){return x}));i.d(t,"j",(function(){return k}));i.d(t,"a",(function(){return C}));i.d(t,"c",(function(){return T}));i.d(t,"g",(function(){return S}));var n=i(16),s=i(24),o=i(31),a=i(0),r=i(1),c=i(11);function l(e,t={}){const i=t.tagName||"span",s=$($.parseHTML(e)).wrapAll(`<${i}>`).parent();if(t.callbacks)Object.keys(t.callbacks).forEach(e=>{const i=s.find("."+e);let o=i.find("a");if(/\$\d$/.test(o.attr("href")))o.attr("href","").removeAttr("title");else if(!o.length)o=i.wrapInner("<a>").children().first();new n.a({element:o[0],action:t.callbacks[e]})});if(t.targetBlank)s.find("a[href]").attr("target","_blank");return s}function d(e){return`<table class="${["diff","monospace"===mw.user.options.get("editfont")?"diff-editfont-monospace":void 0,"diff-contentalign-"+("ltr"===a.a.g.contentDirection?"left":"right")].filter(r.h).join(" ")}"><col class="diff-marker"><col class="diff-content"><col class="diff-marker"><col class="diff-content">`+e+"</table>"}function u(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 h(){const e=$(document.activeElement);return e.is(":input")||e.prop("isContentEditable")}function m(e){if(void 0===e.cdMarginTop){const t=window.getComputedStyle(e);e.cdMarginTop=parseFloat(t.marginTop);e.cdMarginBottom=parseFloat(t.marginBottom);e.cdMarginLeft=parseFloat(t.marginLeft);e.cdMarginRight=parseFloat(t.marginRight)}const t=e.getBoundingClientRect(),i=p(t);return $.extend({outerTop:t.top-(i?e.cdMarginTop:0),outerBottom:t.bottom+(i?e.cdMarginBottom:0),outerLeft:t.left-(i?e.cdMarginLeft:0),outerRight:t.right+(i?e.cdMarginRight:0)},t)}function p(...e){return!e.some(e=>0===e.left&&0===e.height)}function g(e,t,i=[]){if(i.includes("cmd")){Object(r.E)(i,"cmd");i.push("mac"===a.a.g.clientProfile.platform?"meta":"ctrl")}return e.keyCode===t&&["ctrl","shift","alt","meta"].every(t=>i.includes(t)===e[t+"Key"])}function f(e){return"mac"===a.a.g.clientProfile.platform?e.metaKey:e.ctrlKey}function b(e){return $(e[a.a.g.skin]||e.default||e.vector)}function v(){return b({monobook:"#f-list",modern:"#footer-info",default:"#footer-places"})}function y(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 w(e,{success:t,fail:i}){const n=$("<textarea>").val(e).appendTo(document.body).select(),s=document.execCommand("copy");n.remove();if(e&&s)mw.notify(t);else mw.notify(i,{type:"error"})}function x(e,t){return k(C(T(e),t).element)}function k(e){return Boolean(e.childElementCount&&!(1===[...e.querySelectorAll("*")].length&&1===e.childNodes.length&&["P","LI","DD"].includes(e.children[0].tagName))&&![...e.querySelectorAll("*")].every(e=>"BR"===e.tagName)||Object(c.h)(e.textContent))}function C(e,t){e.className="cd-commentForm-dummyElement";t.appendChild(e);[...e.querySelectorAll("[style]:not(pre [style])")].forEach(e=>{if("underline"===e.style.textDecoration&&!["U","INS","A"].includes(e.tagName))$(e).wrapInner("<u>");if("line-through"===e.style.textDecoration&&!["STRIKE","S","DEL"].includes(e.tagName))$(e).wrapInner("<s>");if("italic"===e.style.fontStyle&&!["I","EM"].includes(e.tagName))$(e).wrapInner("<i>");if(["bold","700"].includes(e.style.fontWeight)&&!["B","STRONG"].includes(e.tagName))$(e).wrapInner("<b>");e.removeAttribute("style")});const i=e=>e.remove(),n=e=>{var t,i;if(["DIV","H1","H2","H3","H4","H5","H6","DD"].includes(e.tagName)&&(e.nextElementSibling||null!==(t=e.nextSibling)&&void 0!==t&&null!==(i=t.textContent)&&void 0!==i&&i.trim()))e.after("\n");e.replaceWith(...e.childNodes)};[...e.querySelectorAll("*")].filter(e=>"none"===window.getComputedStyle(e).userSelect).forEach(i);[...e.querySelectorAll("*")].filter(e=>(!["BR","HR"].includes(e.tagName)||e.classList.contains("Apple-interchange-newline"))&&!Object(r.v)(e)&&!e.textContent.replace(/[ \n]+/g,"")).forEach(i);[...e.querySelectorAll("style")].forEach(i);const s=new o.a({childElementsProp:"children"}).getTopElementsWithText(e,!0).nodes;if(s[0]!==e){e.innerHTML="";e.append(...s)}const c=[...e.querySelectorAll("pre")].map(e=>(e.parentNode.className.match("mw-highlight-lang-([0-9a-z_-]+)")||[])[1]);[...e.querySelectorAll("div, span, h1, h2, h3, h4, h5, h6")].forEach(n);[...e.querySelectorAll("p > br")].forEach(e=>{e.after("\n");e.remove()});[...e.querySelectorAll("a")].filter(e=>e.classList.contains("new")).forEach(e=>{const t=Object(r.B)(e.getAttribute("href"));if(t&&t.hostname===location.hostname)e.setAttribute("href",mw.util.getUrl(t.pageName))});const l=a.a.g.allowedTags.concat("a","center","big","strike","tt");[...e.querySelectorAll("*")].forEach(e=>{if(l.includes(e.tagName.toLowerCase()))[...e.attributes].filter(e=>"class"===e.name||/^data-/.test(e.name)).forEach(t=>{e.removeAttribute(t.name)});else n(e)});[...e.children].filter(e=>"DD"===e.tagName).forEach(n);const d=e.innerText;e.remove();return{element:e,text:d,syntaxHighlightLanguages:c}}function T(e){const t=document.createElement("div");t.innerHTML=e.replace(/^[^]*<!-- *StartFragment *-->/,"").replace(/<!-- *EndFragment *-->[^]*$/,"");return t}function S(e,t,i){if(e.compareDocumentPosition(t)&Node.DOCUMENT_POSITION_PRECEDING)return null;let n;for(let i=e;i;i=i.parentNode)if(i.contains(t)){n=i;break}const o=[e];if(!e.contains(t)){const a=new s.a(e,i);for(;a.currentNode.parentNode!==n;){for(;a.nextSibling();)o.push(a.currentNode);a.parentNode()}a.nextSibling();for(;!a.currentNode.contains(t);){o.push(a.currentNode);a.nextSibling()}for(;t.parentNode.lastChild===t&&a.currentNode.contains(t.parentNode);)t=t.parentNode;for(;a.currentNode!==t;){a.firstChild();for(;!a.currentNode.contains(t);){o.push(a.currentNode);a.nextSibling()}}o.push(t)}return o}},function(e,t,i){"use strict";var n=i(3),s=i.n(n),o=i(23),a=i(0),r=i(2),c=i(20),l=i(8),d=i(1),u=i(9),h=i(14),m=i(4);t.a={scheme:{local:["insertButtons-altered","insertButtons","signaturePrefix"],undocumented:{defaultCommentLinkType:null,defaultSectionLinkType:null,showLoadingOverlay:!0},aliases:{"insertButtons-altered":["haveInsertButtonsBeenAltered"],"improvePerformance-lastSuggested":["improvePerformanceLastSuggested"],subscribeOnReply:["watchSectionOnReply"]},states:["insertButtons-altered","improvePerformance-lastSuggested","manyForms-onboarded","newTopicsSubscription-onboarded","notificationsBlacklist","upload-onboarded"],resetsTo:{reformatComments:!1}},initDefaults(){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:a.a.config.defaultInsertButtons||[],"insertButtons-altered":!1,"manyForms-onboarded":!1,modifyToc:!0,"newTopicsSubscription-onboarded":!1,notifications:"all",notifyCollapsedThreads:!1,notificationsBlacklist:[],outdentLevel:15,reformatComments:null,showContribsLink:!1,showToolbar:!0,signaturePrefix:a.a.config.defaultSignaturePrefix,subscribeOnReply:!0,timestampFormat:"default","upload-onboarded":!1,useBackgroundHighlighting:!0,useTemplateData:!0,useTopicSubscription:Boolean(mw.loader.getState("ext.discussionTools.init")),useUiTime:!0,watchOnReply:!mw.loader.getState("ext.discussionTools.init")}},initUi(){const e=a.a.config.outdentTemplates.length?c.a.get("Template:"+a.a.config.outdentTemplates[0]).getUrl():"https://en.wikipedia.org/wiki/Template:Outdent",t=a.a.config.outdentTemplates.length?"":" "+a.a.sParse("sd-outdentlevel-help-notemplate"),i=new Date(Date.now()-43*a.a.g.msInMin),n=new Date(Date.now()-3.3*a.a.g.msInDay),s=Object(h.d)(i),r=Object(h.c)(i),l=Object(h.c)(n),u=Object(h.e)(i),p=Object(h.e)(n);this.scheme.ui=[{name:"talkPage",label:a.a.s("sd-page-talkpage"),controls:[{name:"reformatComments",type:"checkbox",label:a.a.s("sd-reformatcomments")},{name:"showContribsLink",type:"checkbox",label:a.a.s("sd-showcontribslink"),classes:["cd-setting-indented"]},{name:"allowEditOthersComments",type:"checkbox",label:a.a.s("sd-alloweditotherscomments")},{name:"enableThreads",type:"checkbox",label:a.a.s("sd-enablethreads")},{name:"collapseThreadsLevel",type:"number",min:0,max:999,label:a.a.s("sd-collapsethreadslevel"),help:a.a.s("sd-collapsethreadslevel-help"),classes:["cd-setting-indented"]},{name:"modifyToc",type:"checkbox",label:a.a.s("sd-modifytoc")},{name:"useBackgroundHighlighting",type:"checkbox",label:a.a.s("sd-usebackgroundhighlighting")},{name:"highlightNewInterval",type:"number",min:0,max:99999999,buttonStep:5,label:a.a.s("sd-highlightnewinterval"),help:a.a.s("sd-highlightnewinterval-help")},{name:"improvePerformance",type:"checkbox",label:a.a.s("sd-improveperformance"),help:a.a.s("sd-improveperformance-help")}]},{name:"commentForm",label:a.a.s("sd-page-commentform"),controls:[{name:"autopreview",type:"checkbox",label:a.a.s("sd-autopreview")},{name:"watchOnReply",type:"checkbox",label:a.a.s("sd-watchonreply",mw.user)},{name:"subscribeOnReply",type:"checkbox",label:a.a.s("sd-watchsectiononreply",mw.user),help:a.a.s("sd-watchsectiononreply-help")},{name:"showToolbar",type:"checkbox",label:a.a.s("sd-showtoolbar")},{name:"alwaysExpandAdvanced",type:"checkbox",label:a.a.s("sd-alwaysexpandadvanced")},{name:"outdentLevel",type:"number",min:0,max:999,label:Object(m.q)(a.a.sParse("sd-outdentlevel",e),{targetBlank:!0}),help:Object(m.q)(a.a.sParse("sd-outdentlevel-help")+t)},{name:"autocompleteTypes",type:"multicheckbox",label:a.a.s("sd-autocompletetypes"),options:[{data:"mentions",label:a.a.s("sd-autocompletetypes-mentions")},{data:"commentLinks",label:a.a.s("sd-autocompletetypes-commentlinks")},{data:"wikilinks",label:a.a.s("sd-autocompletetypes-wikilinks")},{data:"templates",label:a.a.s("sd-autocompletetypes-templates")},{data:"tags",label:a.a.s("sd-autocompletetypes-tags")}],classes:["cd-autocompleteTypesMultiselect"]},{name:"useTemplateData",type:"checkbox",label:a.a.s("sd-usetemplatedata"),help:a.a.s("sd-usetemplatedata-help")},{name:"insertButtons",type:"multitag",placeholder:a.a.s("sd-insertbuttons-multiselect-placeholder"),tagLimit:100,label:a.a.s("sd-insertbuttons"),help:Object(m.q)(a.a.sParse("sd-insertbuttons-help")+" "+a.a.sParse("sd-localsetting")),dataToUi:e=>e.map(e=>Array.isArray(e)?e.join(";"):e),uiToData:e=>e.map(e=>{var t;const i=new o.a(e).mask(/\\[+;\\]/g);let[,n,s]=i.getText().match(/^(.*?)(?:;(.+))?$/)||[];if(null!==(t=n)&&void 0!==t&&t.replace(/^ +$/,"")){n=i.unmaskText(n);s&&(s=i.unmaskText(s));return[n,s].filter(d.h)}}).filter(d.h)},{name:"signaturePrefix",type:"text",maxLength:100,label:a.a.s("sd-signatureprefix"),help:Object(m.q)(a.a.sParse("sd-signatureprefix-help")+" "+a.a.sParse("sd-localsetting"))}]},{name:"timestamps",label:a.a.s("sd-page-timestamps"),controls:[{name:"useUiTime",type:"checkbox",label:Object(m.q)(a.a.sParse("sd-useuitime","Special:Preferences#mw-prefsection-rendering-timeoffset"),{targetBlank:!0})},{name:"hideTimezone",type:"checkbox",label:a.a.s("sd-hidetimezone")},{name:"timestampFormat",type:"radio",label:a.a.s("sd-timestampformat"),options:[{data:"default",label:a.a.s("sd-timestampformat-radio-default",s)},{data:"improved",label:a.a.s("sd-timestampformat-radio-improved",r,l)},{data:"relative",label:a.a.s("sd-timestampformat-radio-relative",u,p)}],help:a.a.s("sd-timestampformat-help")}]},{name:"notifications",label:a.a.s("sd-page-notifications"),controls:[{name:"useTopicSubscription",type:"checkbox",label:Object(m.q)(a.a.sParse("sd-usetopicsubscription",mw.user),{targetBlank:!0}),help:Object(m.q)(a.a.sParse("sd-usetopicsubscription-help"),{targetBlank:!0})},{name:"notifications",type:"radio",label:a.a.s("sd-notifications"),options:[{data:"all",label:a.a.s("sd-notifications-radio-all",mw.user)},{data:"toMe",label:a.a.s("sd-notifications-radio-tome")},{data:"none",label:a.a.s("sd-notifications-radio-none")}],help:a.a.s("sd-notifications-help")},{name:"desktopNotifications",type:"radio",label:a.a.s("sd-desktopnotifications"),options:[{data:"all",label:a.a.s("sd-desktopnotifications-radio-all",mw.user)},{data:"toMe",label:a.a.s("sd-desktopnotifications-radio-tome")},{data:"none",label:a.a.s("sd-desktopnotifications-radio-none")}],help:a.a.s("sd-desktopnotifications-help",a.a.g.serverName)},{name:"notifyCollapsedThreads",type:"checkbox",label:a.a.s("sd-notifycollapsedthreads")}]},{name:"dataRemoval",label:a.a.s("sd-page-dataremoval"),controls:[{name:"removeData",type:"button",label:a.a.s("sd-removedata"),flags:["destructive"],fieldLabel:a.a.s("sd-removedata-description"),help:Object(m.q)(a.a.sParse("sd-removedata-help"),{targetBlank:!0})}]}]},init(){var e=this;this.initPromise||(this.initPromise=s()((function*(){e.initDefaults();const t={[a.a.g.settingsOptionName]:mw.user.options.get(a.a.g.settingsOptionName),[a.a.g.localSettingsOptionName]:mw.user.options.get(a.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(a.a.config.defaultInsertButtons))e.values.insertButtons=a.a.config.defaultInsertButtons;if(!Object(d.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()))}))());return this.initPromise},load({options:e,omitLocal:t=!1,reuse:i=!1}={}){var n=this;return s()((function*(){var s;if(null===(s=e)||void 0===s||!s[a.a.g.settingsOptionName])({options:e}=yield Object(l.e)(i));let o,r;try{o=JSON.parse(e[a.a.g.settingsOptionName])||{}}catch(e){o={}}try{r=JSON.parse(e[a.a.g.localSettingsOptionName])||{}}catch(e){r={}}return Object.assign({},n.getSettingPropertiesOfObject(o),n.getSettingPropertiesOfObject(r),t?n.getLocalOverrides():{})}))()},getSettingPropertiesOfObject(e,t,i=this.scheme.default){return Object.keys(i).reduce((n,s)=>{(this.scheme.aliases[s]||[]).concat(s).map(e=>t?t+Object(d.I)(e):e).filter(t=>void 0!==e[t]&&(typeof e[t]==typeof i[s]||null===i[s])).forEach(t=>{n[s]=e[t]});return n},{})},getLocalOverrides(){return this.getSettingPropertiesOfObject(window,"cdLocal")},set(e,t){this.values||(this.values={});Object.assign(this.values,"string"==typeof e?{[e]:t}:e)},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 s()((function*(){if(a.a.user.isRegistered())if(a.a.config.useGlobalPreferences){const i={},n={};Object.keys(e).forEach(s=>{if(t.scheme.local.includes(s))n[s]=e[s];else i[s]=e[s]});yield Promise.all([Object(l.k)(a.a.g.localSettingsOptionName,JSON.stringify(n)),Object(l.j)(a.a.g.settingsOptionName,JSON.stringify(i))])}else yield Object(l.k)(a.a.g.localSettingsOptionName,JSON.stringify(e))}))()},saveSettingOnTheFly(e,t){var i=this;return s()((function*(){i.set(e,t);const n=yield i.load();n[e]=t;return i.save(n)}))()},showDialog(e){if($(".cd-dialog-settings").length)return;const t=new(i(70).default)(e);r.a.getWindowManager("settings").addWindows([t]);r.a.getWindowManager("settings").openWindow(t);a.a.tests.settingsDialog=t},maybeSuggestEnableCommentReformatting(){var e=this;return s()((function*(){if(null!==e.get("reformatComments"))return!1;const{reformatComments:t}=yield e.load({reuse:!0});if(Object(d.i)(t))return!1;const i=[{label:a.a.s("rc-suggestion-yes"),action:"accept",flags:"primary"},{label:a.a.s("rc-suggestion-no"),action:"reject"}],n=yield Object(u.showConfirmDialog)($("<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(m.q)(a.a.sParse("rc-suggestion"),{callbacks:{"cd-notification-settings":()=>{e.showDialog()}}}).children())).children(),{size:"large",actions:i});if(!n)return!1;try{const t="accept"===n;yield e.saveSettingOnTheFly("reformatComments",t);return t}catch(e){mw.notify(a.a.s("error-settings-save"),{type:"error"});console.warn(e)}}))()},maybeConfirmDesktopNotifications(){var e=this;return s()((function*(){if("undefined"!=typeof Notification){if("unknown"===e.get("desktopNotifications")&&"denied"!==Notification.permission){const{desktopNotifications:t}=yield e.load();if(["unknown",void 0].includes(t)){const t=[{label:a.a.s("dn-confirm-yes"),action:"accept",flags:"primary"},{label:a.a.s("dn-confirm-no"),action:"reject"}],i=yield Object(u.showConfirmDialog)(a.a.s("dn-confirm"),{size:"medium",actions:t});let n;if("accept"===i){if("default"===Notification.permission){OO.ui.alert(a.a.s("dn-grantpermission"));Notification.requestPermission(t=>{if("granted"===t)n=e.saveSettingOnTheFly("desktopNotifications","all");else if("denied"===t)n=e.saveSettingOnTheFly("desktopNotifications","none")})}else if("granted"===Notification.permission)n=e.saveSettingOnTheFly("desktopNotifications","all")}else if("reject"===i)n=e.saveSettingOnTheFly("desktopNotifications","none");if(n)try{yield n}catch(e){mw.notify(a.a.s("error-settings-save"),{type:"error"});console.warn(e)}}}if(!["unknown","none"].includes(e.get("desktopNotifications"))&&"default"===Notification.permission){yield OO.ui.alert(a.a.s("dn-grantpermission-again"),{title:a.a.s("script-name")});Notification.requestPermission()}}}))()},addLinkToFooter(){Object(m.e)().append($("<li>").append($("<a>").text(a.a.s("footer-settings")).on("click",()=>{this.showDialog()})))}}},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!==(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";var n=i(3),s=i.n(n),o=i(13),a=i(30),r=i(0),c=i(17),l=i(2),d=i(5),u=i(28),h=i(8),m=i(1),p=i(4),g=i(22);t.a={items:[],underlays:[],layersContainers:[],init(){this.reformatCommentsSetting=d.a.get("reformatComments");l.a.on("scroll",this.registerSeen.bind(this)).on("mutate",this.maybeRedrawLayers.bind(this)).on("resize",this.maybeRedrawLayers.bind(this)).on("mouseMove",this.maybeHighlightHovered.bind(this)).on("popState",e=>{var t,i;if(o.a.isAnyId(e)&&(null===(t=history.state)||void 0===t||!t.cdJumpedToComment))null===(i=this.getByAnyId(e,!0))||void 0===i||i.scrollTo()}).on("selectionChange",this.getSelectedComment.bind(this)).on("beforeReload",e=>{this.items.forEach(e=>{e.stopAnimations()});if(e.isPageReloadedExternally)this.resetLayers()}).on("startReload",this.resetLayers.bind(this)).on("addedCommentsUpdate",({all:e})=>{this.addNewCommentsNotes(e)}).on("desktopNotificationClick",this.maybeRedrawLayers.bind(this,!0));g.a.on("process",this.registerSeen.bind(this));u.a.on("newChanges",this.maybeRedrawLayers.bind(this,!0));c.a.on("teardown",this.registerSeen.bind(this))},setup(){this.reformatCommentsSetting=d.a.get("reformatComments");this.reformatTimestamps();this.findAndUpdateTableComments();this.adjustDom()},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},query(e){return this.items.filter(e)},reset(){this.items=[]},initNewAndSeen(e,t){let i=!1;const n=l.a.getBootProcess().passedData.unseenCommentIds;this.items.forEach(s=>{const o=s.initNewAndSeen(e,t,(null==n?void 0:n.some(e=>e===s.id))||!1);i||(i=o)});this.configureAndAddLayers(e=>e.isNew);return i},configureAndAddLayers(e){const t=this.items.filter(e),i=t.length?l.a.getFloatingElements().map(p.d):void 0;t.forEach(e=>{e.configureLayers({add:!1,update:!1,floatingRects:i})});t.forEach(e=>{e.addLayers()})},maybeRedrawLayers(e=!1){if(l.a.isBooting()||document.hidden&&!e)return;this.layersContainers.forEach(e=>{e.cdCouldHaveMoved=!0});let t;const i=[],n=l.a.$root[0].getBoundingClientRect().bottom+window.scrollY;let s=0;this.items.slice().reverse().some(o=>{const a=!o.isCollapsed&&(o.isNew||o.isOwn||o.isTarget||o.isHovered||o.isDeleted||o.isLineGapped),r=o.offset&&o.offset.bottom>n;if(o.underlay&&!a&&r)o.removeLayers();else if(a){t||(t=l.a.getFloatingElements().map(p.d));const n=o.configureLayers({add:!0,update:!1,floatingRects:t});if(n||e){s=0;i.push(o)}else if(null===n)o.removeLayers();else if(o.getLayersContainer().cdIsTopLayersContainer){s++;if(2===s)return!0}}return!1});i.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);this.emit("registerSeen")},findInViewport(e){this.items.forEach(e=>{delete e.roughOffset});const t=window.scrollY+r.a.g.bodyScrollPaddingTop,i=window.scrollY+window.innerHeight,n=e=>{e.getOffset({set:!0});return Boolean(e.roughOffset)},s=(e,t=0,i)=>{let s=Object(m.F)(this.items,t,"backward"===e);if(void 0!==i)s=s.filter(n=>"forward"===e?n.index>=t&&n.index<i:n.index<=t&&n.index>i);return s.find(n)||null},o=s("forward"),a=s("backward",this.items.length-1);if(!o)return null;let c,l={top:o,bottom:a},d=l.top;const u=(e,t,i=!1)=>e?s(e,t[("forward"===e?i:!i)?"top":"bottom"].index):null;for(let n=0;n<this.items.length;n++){if(!d.roughOffset){d.getOffset({set:!0});if(!d.roughOffset){d=s("forward",d.index,l.bottom.index)||s("backward",d.index,l.top.index);if(!d){c=u(e,l);break}}}if(d.isInViewport(!1)){c=d;break}if(d.roughOffset&&(d===o&&i<d.roughOffset.bottomForVisibility||d===a&&t>d.roughOffset.top)){c=u(e,l,!0);break}if(l.top===l.bottom){c=u(e,l);break}if(d===o)d=l.bottom;else{l[t>d.roughOffset.top?"top":"bottom"]=d;if(l.bottom.index-l.top.index<=1){c=u(e,l);break}const n=l.top.roughOffset.top,s=(t-n)/(l.bottom.roughOffset.bottomForVisibility-i+(t-n));if(s<0||s>=1)console.warn("The proportion shouldn't be less than 0 or greater or equal to 1.","proportion",s,"searchArea",l);const o=Math.round((l.bottom.index-l.top.index-1)*s+l.top.index+.5);d=this.items[o]}}return c||null},maybeHighlightHovered(e){if(this.reformatCommentsSetting)return;const t=l.a.isObstructingElementHovered();this.items.filter(e=>e.underlay).forEach(i=>{i.updateHoverState(e,t)})},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:s}=o.a.parseId(e)||{};for(let e=1;!n&&e<=3;e++)n=i(o.a.generateId(new Date(t.getTime()-r.a.g.msInMin*e),s))}return n||null},getByDtId(e,t=!1){const i=o.a.parseDtId(e);if(!i)return null;let n,s=this.items.filter(e=>e.date&&e.date.getTime()===i.date.getTime()&&e.author.getName()===i.author);if(1===s.length)n=s[0];else if(s.length>1){s=s.filter(e=>{var t,n,s,o,a;return(null===(t=e.getParent())||void 0===t?void 0:null===(n=t.date)||void 0===n?void 0:n.getTime())===(null===(s=i.parentDate)||void 0===s?void 0:s.getTime())&&(null===(o=e.getParent())||void 0===o?void 0:o.author.getName())===i.parentAuthor&&(!i.sectionIdBeginning||(null===(a=e.section)||void 0===a?void 0:a.id.startsWith(i.sectionIdBeginning)))});n=1===s.length?s[0]:s[i.index||0]}if(t){i.comment=n;return i}return n},getByAnyId(e,t=!1){return o.a.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 o.a)this.addNewCommentsNote(t,e,"thread",i);else{const n=e.filter(e=>0===e.logicalLevel).reduce((e,t)=>this.searchForNewCommentsInSubtree(t,e,i),[]),s=e.filter(e=>!n.includes(e));this.addNewCommentsNote(t,n,"section",i);this.addNewCommentsNote(t,s,"thread",i)}});l.a.restoreRelativeScrollPosition()},addNewCommentsNote(e,t,i,n){if(!t.length)return;const s=e instanceof o.a?t.reduce((e,t)=>this.searchForNewCommentsInSubtree(t,e,n),[]):t,a=s.map(e=>e.author).filter(m.K),c=new OO.ui.ButtonWidget({label:r.a.s("thread"===i?"thread-newcomments":"section-newcomments",s.length,a.length,a.map(e=>e.getName()).join(r.a.mws("comma-separator")),Object(m.m)(a)),framed:!1,classes:["cd-button-ooui"]});c.on("click",()=>{l.a.reload({commentIds:s.map(e=>e.id),pushState:!0})});if(e instanceof o.a){var d;c.$element.addClass("cd-thread-button");const{$wrappingItem:t}=e.addSubitem("newCommentsNote","bottom");t.addClass("cd-thread-button-container cd-thread-newCommentsNote").append(c.$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){c.$element.addClass("cd-thread-button");const t="DL"===e.$replyButtonContainer.prop("tagName")?"dd":"li";$(`<${t}>`).addClass("cd-thread-button-container cd-thread-newCommentsNote").append(c.$element).insertBefore(e.$replyButtonWrapper)}else{c.$element.addClass("cd-section-button");("section"===i?$("<div>").append(c.$element):$("<dl>").append($("<dd>").append(c.$element))).addClass("cd-thread-button-container cd-thread-newCommentsNote").insertAfter(e.$addSubsectionButtonContainer&&!e.getChildren().length?e.$addSubsectionButtonContainer:e.$replyButtonContainer||e.lastElementInFirstChunk)}},reformatComments(){var e=this;return s()((function*(){if(!e.reformatCommentsSetting)return;$(document.body).addClass("cd-reformattedComments");if(!r.a.page.exists())return;const t=[];e.items.forEach(e=>{t.push(...e.replaceSignatureWithHeader());e.addMenu()});const i={};t.forEach(e=>{var t;i[t=e.pageName]||(i[t]=[]);i[e.pageName].push(e.link)});const n=yield Object(h.d)(Object.keys(i));Object.keys(n).forEach(e=>{i[e].forEach(t=>{t.title=n[e].normalized;if(!n[e].exists){t.classList.add("new");t.href=mw.util.getUrl(e,{action:"edit",redlink:1})}})})}))()},reformatTimestamps(){if(r.a.g.areTimestampsAltered)this.items.forEach(e=>{e.reformatTimestamp()})},resetSelectedComment(){const e=this.items.find(e=>e.isSelected);if(e){e.setSelected(!1);this.emit("unselected",e)}},getSelectedComment(){const e=window.getSelection();let t;if(e.toString().trim()){const{higherNode:n}=Object(p.f)(e),s=new a.a(l.a.rootElement,null,!1,n);let o;do{var i;o=null===(i=s.currentNode.dataset)||void 0===i?void 0:i.cdCommentIndex}while(void 0===o&&s.parentNode());if(void 0!==o){t=this.items[o];if(t){if(!t.isSelected){this.resetSelectedComment();t.setSelected(!0);this.emit("selected",t)}}else this.resetSelectedComment()}else this.resetSelectedComment()}else this.resetSelectedComment();return t||null},findPriorComment(e,t){return this.items.filter(i=>i.author.getName()===t&&i.date&&i.date<e&&i.date.getTime()>e.getTime()-r.a.g.msInDay).sort((e,t)=>e.date.getTime()-t.date.getTime()).slice(-1)[0]},setDtIds(e){e.forEach(e=>{const t=this.getByDtId(e);if(t)t.dtId=e})},findAndUpdateTableComments(){l.a.rootElement.querySelectorAll("table.cd-comment-part .cd-signature, .cd-comment-part > table .cd-signature").forEach(e=>{const t=e.closest(".cd-comment-part").dataset.cdCommentIndex;if(void 0!==t)this.items[t].isTableComment=!0})},searchForNewCommentsInSubtree(e,t,i){if(i.includes(e.index))t.push(e);e.children.forEach(e=>{this.searchForNewCommentsInSubtree(e,t,i)});return t},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()})},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,s=e;do{var o;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=s.firstElementChild;if(["DL","DD","UL","LI"].includes(e.tagName)){for(;s.childNodes.length;){let e=s.firstChild;if(e.tagName){var a;if(i[e.tagName])e=this.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)}s.remove()}}s=r;n=null===(o=r)||void 0===o?void 0:o.previousElementSibling}while(n&&s&&t(s))})},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)});const n=e.getAttribute("data-cd-comment-index");if(null!==n)this.items[Number(n)].replaceElement(e,i);else e.parentNode.replaceChild(i,e);l.a.replaceScrollAnchorElement(e,i);return i},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("dd.cd-comment-part:not(.cd-comment-part-last) + dd > .cd-comment-part:first-child, li.cd-comment-part:not(.cd-comment-part-last) + li > .cd-comment-part:first-child").forEach(t=>{e.push(t.parentNode)});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 > .${r.a.config.outdentClass}, .cd-commentLevel > dd + dd > .${r.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")})}}},function(e,t,i){"use strict";i.d(t,"f",(function(){return m}));i.d(t,"m",(function(){return p}));i.d(t,"i",(function(){return g}));i.d(t,"h",(function(){return f}));i.d(t,"e",(function(){return b}));i.d(t,"c",(function(){return v}));i.d(t,"b",(function(){return w}));i.d(t,"l",(function(){return k}));i.d(t,"k",(function(){return T}));i.d(t,"j",(function(){return E}));i.d(t,"g",(function(){return N}));i.d(t,"d",(function(){return L}));i.d(t,"a",(function(){return j}));var n=i(3),s=i.n(n),o=i(6),a=i(23),r=i(0),c=i(2),l=i(21),d=i(1),u=i(11);let h;function m(e,t){if(Array.isArray(e))[e,t]=e;throw"http"===e?new o.a({type:"network"}):new o.a({type:"api",code:"error",apiResp:t})}function p(e){let t;try{t=r.a.user.getRights()}catch(e){}const i=(t?t.includes("apihighlimits"):mw.config.get("wgUserGroups").includes("sysop"))?500:50;return e.reduce((e,t,n)=>{const s=Math.floor(n/i);e[s]||(e[s]=[]);e[s].push(t);return e},[])}function g(e,t="post"){return new Promise((i,n)=>{c.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 f(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 c.a.getApi().post(n).then(e=>{mw.loader.load(e.parse.modules);mw.loader.load(e.parse.modulestyles);return{html:e.parse.text,parsedSummary:e.parse.parsedsummary}},m)}function b(e=!1){if(e&&h)return h;h=c.a.getApi().post({action:"query",meta:"userinfo",uiprop:["options","rights"]}).then(e=>{const{options:t,rights:i}=e.query.userinfo,n=t[r.a.g.visitsOptionName],s=t[r.a.g.subscriptionsOptionName];try{r.a.user.setRights(i)}catch(e){}return{options:t,visits:n,subscriptions:s}},m);return h}function v(e){return y.apply(this,arguments)}function y(){return(y=s()((function*(e){const t=[];for(const i of p(e))t.push(...(yield c.a.getApi().post({action:"query",pageids:i}).catch(m)).query.pages);return t}))).apply(this,arguments)}function w(e){return x.apply(this,arguments)}function x(){return(x=s()((function*(e){const t=[],i=[],n=[];for(const s of p(e)){const{query:e}=yield c.a.getApi().post({action:"query",titles:s,redirects:!0}).catch(m);t.push(...e.normalized||[]);i.push(...e.redirects||[]);n.push(...e.pages)}return{normalized:t,redirects:i,pages:n}}))).apply(this,arguments)}function k(e){return C.apply(this,arguments)}function C(){return(C=s()((function*(e,t=!1){const i=t?"globalpreferences":"options";if(Object.entries(e).some(([,e])=>e&&e.length>65535))throw new o.a({type:"internal",code:"sizeLimit",details:{action:i}});const n=yield g(c.a.getApi().assertCurrentUser({action:i,change:"\x1f"+Object.entries(e).map(([e,t])=>e+(null===t?"":"="+t)).join("\x1f")}),"postWithEditToken").catch(m);if("success"!==(null==n?void 0:n[i]))throw new o.a({type:"api",code:"noSuccess",details:{action:i}})}))).apply(this,arguments)}function T(e,t){return S.apply(this,arguments)}function S(){return(S=s()((function*(e,t){yield k({[e]:t})}))).apply(this,arguments)}function E(e,t){return O.apply(this,arguments)}function O(){return(O=s()((function*(e,t){if(r.a.config.useGlobalPreferences)try{yield k({[e]:t},!0)}catch(n){var i;if(n instanceof o.a&&"badvalue"===(null===(i=n.data.apiResp)||void 0===i?void 0:i.error.code))yield T(e,t);else throw n}else yield T(e,t)}))).apply(this,arguments)}function N(e){return P.apply(this,arguments)}function P(){return(P=s()((function*(e,t=!1){const i=e.filter(e=>!e.getGender()&&e.isRegistered()).filter(d.K).map(e=>e.getName());for(const e of p(i)){const i={action:"query",list:"users",ususers:e,usprop:"gender"},n=t?g(i):c.a.getApi().post(i);(yield n.catch(m)).query.users.filter(e=>e.gender).forEach(e=>{l.default.get(e.name).setGender(e.gender)})}}))).apply(this,arguments)}function L(e){return I.apply(this,arguments)}function I(){return(I=s()((function*(e){const t={},i=[],n=[];for(const t of p(e)){const e=(yield c.a.getApi().post({action:"query",titles:t}).catch(m)).query;i.push(...e.normalized||[]);n.push(...e.pages)}const s={};i.forEach(e=>{s[e.to]=e.from});n.forEach(e=>{t[s[e.title]||e.title]={exists:!e.missing,normalized:e.title}});return t}))).apply(this,arguments)}function D(e,t){return $.post(e,{html:t,scrub_wikitext:!0})}function j(e,t){return A.apply(this,arguments)}function A(){return(A=s()((function*(e,t){let i;try{try{if(!r.a.g.isProbablyWmfSulWiki)throw void 0;i=yield D("/api/rest_v1/transform/html/to/wikitext",e)}catch(t){i=yield D("https://en.wikipedia.org/api/rest_v1/transform/html/to/wikitext",e)}i=i.replace(/(?:^ .*(?:\n|$))+/gm,e=>`<syntaxhighlight lang="${t.shift()||"wikitext"}">\n`+e.replace(/^ /gm,"").replace(/[^\n]$/,"$0\n").replace(/<nowiki>(.*?)<\/nowiki>/g,"$1")+"</syntaxhighlight>").replace(/<br \/>/g,"<br>").trim();i=new a.a(i).maskSensitiveCode().withText(u.a).unmask().getText()}catch(e){}return i}))).apply(this,arguments)}},function(e,t,i){"use strict";i.r(t);i.d(t,"showConfirmDialog",(function(){return r}));i.d(t,"createTextField",(function(){return l}));i.d(t,"createNumberField",(function(){return d}));i.d(t,"createCheckboxField",(function(){return u}));i.d(t,"createRadioField",(function(){return h}));i.d(t,"createCopyTextField",(function(){return m}));i.d(t,"tweakUserOoUiClass",(function(){return p}));i.d(t,"mixinUserOoUiClass",(function(){return g}));i.d(t,"mixEventEmitterIntoObject",(function(){return f}));var n=i(3),s=i.n(n),o=i(0),a=i(2);function r(e){return c.apply(this,arguments)}function c(){return(c=s()((function*(e,t={}){var i;const n=new OO.ui.MessageDialog({classes:["cd-dialog-confirm"]});a.a.getWindowManager().addWindows([n]);const s=a.a.getWindowManager().openWindow(n,Object.assign({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"}]},t));s.opened.then(()=>{if(e instanceof $)mw.hook("wikipage.content").fire(e)});return null===(i=yield s.closed)||void 0===i?void 0:i.action}))).apply(this,arguments)}function l({value:e,maxLength:t,required:n,classes:s,label:o,help:a}){const r=new(i(37).default)({value:e,maxLength:t,required:n,classes:s});return{field:new OO.ui.FieldLayout(r,{label:o,align:"top",help:a,helpInline:!0}),input:r}}function d({value:e,label:t,min:i,max:n,buttonStep:s=1,help:o,classes:a}){const r=new OO.ui.NumberInputWidget({input:{value:e},step:1,buttonStep:s,min:i,max:n,classes:["cd-numberInput"]});return{field:new OO.ui.FieldLayout(r,{label:t,align:"top",help:o,helpInline:!0,classes:a}),input:r}}function u({value:e,selected:t,disabled:n,label:s,help:o,tabIndex:a,classes:r}){const c=new(i(65).default)({value:e,selected:t,disabled:n,tabIndex:a});return{field:new OO.ui.FieldLayout(c,{label:s,align:"inline",help:o,helpInline:!0,classes:r}),input:c}}function h({label:e,selected:t,help:n,options:s}){const o=s.map(e=>new(i(66).default)(e)),a=new OO.ui.RadioSelectWidget({items:o});a.$element.off("mousedown");a.$focusOwner=$();const r=new OO.ui.FieldLayout(a,{label:e,align:"top",help:n,helpInline:!0});if(void 0!==t)a.selectItemByData(t);return{field:r,select:a,items:o}}function m({label:e,value:t,disabled:i=!1,help:n,copyCallback:s}){let a;if(OO.ui.CopyTextLayout){a=new OO.ui.CopyTextLayout({align:"top",label:e,copyText:t,button:{disabled:i},textInput:{disabled:i},help:n,helpInline:Boolean(n)});a.on("copy",e=>{s(e,a)})}else{const r=new OO.ui.TextInputWidget({value:t,disabled:i}),c=new OO.ui.ButtonWidget({label:o.a.s("copy"),icon:"copy",disabled:i});c.on("click",()=>{s(r.getValue())});a=new OO.ui.ActionFieldLayout(r,c,{align:"top",label:e,help:n,helpInline:Boolean(n)})}return a}function p(e){const t=Object.getPrototypeOf(e);OO.initClass(t);e.static=Object.create(t.static);Object.keys(e).filter(e=>"static"!==e).forEach(t=>{e.static[t]=e[t]});e.parent=e.super=t;return e}function g(e,t){OO.mixinClass(e,t);Object.getOwnPropertyNames(t.prototype).filter(e=>"constructor"!==e).forEach(i=>{e.prototype[i]=t.prototype[i]})}function f(e){const t={prototype:{}};OO.mixinClass(t,OO.EventEmitter);Object.assign(e,t.prototype);OO.EventEmitter.call(e)}},function(e,t,i){"use strict";var n=i(0),s=i(2),o=i(5),a=i(1),r=i(4),c=i(22);t.a={items:[],init(e){this.improvePerformance=o.a.get("improvePerformance");s.a.on("scroll",this.maybeUpdateVisibility.bind(this));e.on("process",this.addSubscribeButtons.bind(this));c.a.on("process",this.updateNewCommentsData.bind(this));if(this.improvePerformance)$(window).on("focus",this.maybeUpdateVisibility.bind(this)).on("blur",this.maybeUnhideAll.bind(this))},setup(){this.items.forEach(e=>{e.isLastSection=e.index===this.items.length-1;e.maybeAddAddSubsectionButton();e.maybeAddReplyButton()});this.items.filter(e=>e.addSubsectionButton).forEach(e=>{(e.getChildren(!0).slice(-1)[0]||e).showAddSubsectionButtonOnReplyButtonHover(e)})},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},query(e){return this.items.filter(e)},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){var t;return(null===(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])||void 0===t?void 0:t.section)||null},search({index:e,headline:t,id:i,ancestors:n,oldestCommentId:s}){const o=[];this.items.some(r=>{var c;const l=r.index===e,d=r.headline===t,u=r.id===i,h=1*d+1*(n?Object(a.b)(r.getAncestors().map(e=>e.headline),n):!1)+1*((null===(c=r.oldestComment)||void 0===c?void 0:c.id)===s)+.5*u+.001*l;if(h>=2)o.push({section:r,score:h});return h>=3.5});let r;o.forEach(e=>{if(!r||e.score>r.score)r=e});return r||null},addSubscribeButtons(){if(n.a.user.isRegistered()){s.a.saveRelativeScrollPosition();this.items.forEach(e=>{e.addSubscribeButton()});s.a.restoreRelativeScrollPosition()}},generateDtSubscriptionId(e,t){const i=new Date(t);i.setSeconds(0);return`h-${Object(a.H)(e)}-${Object(a.k)(i,"00")}`},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 null;let i;this.items.some(e=>{const n=Object(r.d)(e.headingElement);if(Object(r.h)(n)&&(!t||n.outerTop>t))i=n.outerTop;return void 0!==i});return i},getCurrentSection(){const e=this.getFirstSectionRelativeTopOffset();return null!==e&&e<n.a.g.bodyScrollPaddingTop+1&&this.items.slice().reverse().find(e=>{const t=Object(r.d)(e.headingElement);return Object(r.h)(t)&&t.outerTop<n.a.g.bodyScrollPaddingTop+1})||null},maybeUpdateVisibility(){if(!(this.improvePerformance&&this.items.length&&s.a.isLongPage()&&document.hasFocus()))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(r.h)(n)&&n.top>=i&&Math.floor(e/1e4)!==Math.floor((e+n.top-i)/1e4)})}const o=[];if(n)this.items.slice(n.index).some(e=>{if(2===e.level)return!0;o.push(e);return!1});this.items.filter(e=>2===e.level||e.isHidden||o.includes(e)).forEach(e=>{e.updateVisibility(!(n&&e.index>=n.index))})},maybeUnhideAll(){if(s.a.isLongPage())this.items.forEach(e=>{e.updateVisibility(!0)})}}},function(e,t,i){"use strict";i.d(t,"g",(function(){return r}));i.d(t,"i",(function(){return c}));i.d(t,"f",(function(){return l}));i.d(t,"k",(function(){return d}));i.d(t,"h",(function(){return u}));i.d(t,"j",(function(){return h}));i.d(t,"b",(function(){return m}));i.d(t,"e",(function(){return p}));i.d(t,"c",(function(){return g}));i.d(t,"a",(function(){return f}));i.d(t,"d",(function(){return b}));var n=i(23),s=i(0),o=i(1),a=i(14);function r(e){const t=e.join("|");return new RegExp(`(<(${t})(?: [\\w ]+(?:=[^<>]+?)?| *)>)([^]*?)(</\\2>)`,"ig")}function c(e){return e.replace(r(["nowiki","syntaxhighlight","source","pre"]),(e,t,i,n,s)=>t+" ".repeat(n.length)+s).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 l(e){var t;return(null===(t=p(e)[0])||void 0===t?void 0:t.timestamp)||null}function d(e){const t=new RegExp(`\\[\\[${s.a.g.filePrefixPattern}[^\\]]+?(?:\\|[^\\]]+?\\| *((?:\\[\\[[^\\]]+?\\]\\]|[^|\\]])+))? *\\]\\]`,"ig");return e.replace(/<!--[^]*?-->/g,"").replace(/\x01 *\x02/g,"").replace(s.a.g.pipeTrickRegexp,"$1$2$3").replace(t,(e,t)=>s.a.g.isThumbRegexp.test(e)?t:"").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 u(e){return d(e)!==e.trim()}function h(e){return Object(o.g)(e).replace(/\s+/g," ").trim()}function m(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){const t=[`class=(['"])[^'"\\n]*(?:\\b${s.a.g.noSignatureClasses.join("\\b|\\b")}\\b)[^'"\\n]*\\1`];if(s.a.config.noSignatureTemplates.length){const e=s.a.config.noSignatureTemplates.map(o.l).join("|");t.push(`\\{\\{ *(?:${e}) *(?:\\||\\}\\})`)}t.push(...s.a.config.commentAntipatterns.map(e=>e.source));const n=t.join("|"),r=new RegExp(`^.*(?:${n}).*$`,"mg"),l=c(e).replace(s.a.g.quoteRegexp,(e,t,i,n)=>t+" ".repeat(i.length)+n).replace(r,e=>" ".repeat(e.length));let d=function(e,t){const n=new RegExp(`^((.*?(?:^|[^=]))(${s.a.g.contentTimestampRegexp.source})(?!["\xbb])(?:\\}\\}|</small>)?).*(?:\\n*|$)`,"igm"),a=new RegExp(`^(((.*?)${s.a.g.captureUserNamePattern}.{1,250}?[^=])(${s.a.g.contentTimestampRegexp.source})(?!["\xbb])(?:\\}\\}|</small>)?.*)(?:\\n*|$)`,"im"),r=new RegExp("^.*"+s.a.g.captureUserNamePattern,"i"),c=new RegExp(s.a.g.captureUserNamePattern,"ig");let l,d=[];for(;l=n.exec(e);){const e=l[0],n=l.index,s=e.match(a);let u,h,m,p,g,f;if(s){const e=n+s[2].length,a=e+s[6].length;h=Object(o.C)(t.slice(e,a));m=n+s[3].length;p=n+s[1].length;f=t.slice(m,p);g=n+s[0].length;let l;c.lastIndex=0;const d=Math.max(0,e-n-255),b=s[0].slice(d),[,v]=b.match(r)||[];if(!v)continue;const y=i(21).default;u=y.get(Object(o.g)(v));for(;l=c.exec(b);){if(l[2])continue;if(y.get(Object(o.g)(l[1]))===u){m=n+d+l.index;f=t.slice(m,p);break}}}else{m=n+l[2].length;p=n+l[1].length;f=t.slice(m,p);const e=m+l[3].length;h=Object(o.C)(t.slice(m,e));g=n+l[0].length}d.push({author:u,timestamp:h,startIndex:m,endIndex:p,dirtyCode:f,nextCommentStartIndex:g})}return d}(l,e);const u=function(e,t,n){if(!s.a.config.unsignedTemplates.length)return[];const a=i(21).default,r=[],c=new RegExp(s.a.g.unsignedTemplatesPattern+".*\\n","g");let l;for(;l=c.exec(e);){var d;let e,i;if(s.a.g.contentTimestampNoTzRegexp.test(l[2])){i=l[2];e=l[3]}else if(s.a.g.contentTimestampNoTzRegexp.test(l[3])){i=l[3];e=l[2]}else e=l[2];e&&(e=a.get(Object(o.g)(e)));if(i&&!s.a.g.contentTimestampRegexp.test(i)){i+=" (UTC)";e||(e="<undated>")}i=null===(d=i)||void 0===d?void 0:d.replace(/ +/g," ");let c=l.index;const u=l.index+l[1].length;let h=t.slice(c,u);const m=l.index+l[0].length,p=n.findIndex(e=>e.nextCommentStartIndex===m);if(-1!==p)n.splice(p,1);r.push({author:e,timestamp:i,startIndex:c,endIndex:u,dirtyCode:h,nextCommentStartIndex:m})}return r}(l,e,d);d.push(...u);const h=l.indexOf(s.a.g.signCode);if(-1!==h)d.push({author:s.a.user.getName(),startIndex:h,nextCommentStartIndex:h+l.slice(h).indexOf("\n")+1});if(u.length||-1!==h)d.sort((e,t)=>e.startIndex>t.startIndex?1:-1);d=d.filter(e=>e.author);d.forEach((e,t)=>{e.commentStartIndex=0===t?0:d[t-1].nextCommentStartIndex});d.forEach((e,t)=>{const{date:i}=e.timestamp&&Object(a.g)(e.timestamp)||{};e.index=t;e.date=i;delete e.nextCommentStartIndex});return d}function g(e){return e.replace(/([^\n])\n?$/,"$1\n\n")}function f(e,t="\n"){return e.replace(/^(?![:*# ]).*<br[ \n]*\/?>.*$/gim,e=>e.replace(/<br[ \n]*\/?>(?![:*#;])\n? */gi,()=>t))}function b(e,t){const i=new n.a(e,t);if(!t)i.maskSensitiveCode();return i.mask(/\[\[[^\]|]+\|/g,"link").withText(e=>e.replace(/\{/g,"&#123;").replace(/\}/g,"&#125;").replace(/\|/g,"{{!}}")).unmask(t?"link":void 0).getText()}},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(3),s=i.n(n),o=i(16),a=i(6);function r(e){e.stopPropagation()}class CommentButton_CommentButton extends o.a{constructor(e){if(e.element)e.buttonElement=e.element.firstChild;super(e);if(e.href)this.buttonElement.oncontextmenu=r;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[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=r}}setDisabled(e){e=Boolean(e);if(!this.widgetConstructor)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(!this.widgetConstructor)super.setLabel(e);else{if(!this.buttonWidget)this.createWidget();this.buttonWidget.setLabel(e)}return this}setTooltip(e){if(!this.widgetConstructor)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!this.widgetConstructor?super.isDisabled():Boolean(null===(e=this.buttonWidget)||void 0===e?void 0:e.isDisabled())}isPending(){var e;return!this.widgetConstructor?super.isPending():Boolean(null===(e=this.buttonWidget)||void 0===e?void 0:e.isPending())}}var c=CommentButton_CommentButton,l=i(43),d=i(23),cd=i(0),u=i(5),h=i(1),m=i(11);var p=class{constructor(e,t,i,n){this.comment=e;this.index=t.index;this.author=t.author;this.timestamp=t.timestamp;this.date=t.date;this.signatureDirtyCode=t.dirtyCode;this.startIndex=t.commentStartIndex;this.endIndex=t.startIndex;this.signatureEndIndex=t.startIndex+t.dirtyCode.length;this.code=i.slice(t.commentStartIndex,t.startIndex);this.isInSectionContext=n;this.adjust()}toInput(){const e=this.originalIndentation.length;let t=new d.a(this.code).maskSensitiveCode().withText(t=>{if(0===this.comment.level){const e=/^(?:\x01\d+_(block|template)\x02) *$/,i=new RegExp(`^\\[\\[${cd.a.g.filePrefixPattern}.+\\]\\]$`,"i"),n=new RegExp(`(?:<${cd.a.g.pniePattern}(?: [\\w ]+?=[^<>]+?| ?\\/?)>|<\\/${cd.a.g.pniePattern}>|\\x04) *$`,"i"),s=new RegExp(`^(?:<\\/${cd.a.g.pniePattern}>|<${cd.a.g.pniePattern}|\\||!)`,"i"),o=/^(=+).*\1[ \t]*$|^----/;t=t.replace(/^((?![:*#; ]).+)\n(?![\n:*#; \x03])(?=(.*))/gm,(t,a,r)=>a+(e.test(a)||e.test(r)||i.test(a)||i.test(r)||o.test(a)||o.test(r)||n.test(a)||s.test(r)?"\n":" "))}return t=Object(m.a)(t,"\x01\n").replace(/^((?:\x01\d+_template.*\x02) *)\x01$/gm,(e,t)=>t+"<br>").replace(/((?:\x01\d+_template.*\x02){2} *)\x01/g,(e,t)=>cd.a.config.paragraphTemplates.length?t+"<br>":e).replace(/\x01\n/g,"\n").replace(/\n([:*#]*)([ \t]*)/g,(t,i,n)=>{let s;if(i.length>=e){s=i.slice(e);if(i.length>e)s+=n}else s=i+n;return"\n"+s})}).unmask().getText();if(cd.a.config.paragraphTemplates.length){const e=`\\{\\{(?:${cd.a.config.paragraphTemplates.map(h.l).join("|")})\\}\\}`,i=new RegExp(e,"g"),n=new RegExp("^(?![:*#]).*"+e,"gm");t=t.replace(n,e=>e.replace(i,"\n\n"))}if(0!==this.comment.level)t=t.replace(/\n\n+/g,"\n\n");return t.trim()}excludeBadBeginnings(){if(this.headingMatch){this.headingCode=this.headingMatch[2];this.headingStartIndex=this.startIndex+this.headingMatch[1].length;this.headingLevel=this.headingMatch[3].length;this.headlineCode=this.headingMatch[4].trim();this.startIndex+=this.headingMatch[0].length;this.code=this.code.slice(this.headingMatch[0].length);this.lineStartIndex=this.comment.isOpeningSection?this.headingStartIndex:this.startIndex}else{const e=this.comment.elements.some(e=>{const t=e.querySelector(".cd-timestamp");return t&&!t.closest(".cd-signature")});[cd.a.g.signatureEndingRegexp,e?null:cd.a.g.timezoneRegexp].filter(h.i).forEach(e=>{const t=new RegExp(e.source+"$","m"),i=/^(.+)\n/gm;let n,s;for(;n=i.exec(this.code);){const e=n[1].replace(/\[\[:?(?:[^|[\]<>\n]+\|)?(.+?)\]\]/g,"$1");if(t.test(e)){const e=n.index+n[0].length;if(e===this.code.length)break;else s=e}}if(s){this.code=this.code.slice(s);this.startIndex+=s;this.lineStartIndex+=s}});cd.a.g.badCommentBeginnings.forEach(e=>{if("^"!==e.source[0])console.debug('Regexps in cd.config.badCommentBeginnings should have "^" as the first character.');let t;for(;t=this.code.match(e);){this.code=this.code.slice(t[0].length);this.lineStartIndex=this.startIndex+t[0].lastIndexOf("\n")+1;this.startIndex+=t[0].length}})}}excludeIndentationAndIntro(){if(0===this.comment.level)return;const e=(e,t,i,n="")=>{if("number"==typeof n)n="";let s="",o=i,a=e.length;if(!t&&Object(h.f)(this.code,/(^|\n)[:*#]/g)>=2&&o.endsWith("#")){o=o.slice(0,-1);this.originalIndentation=o;if(o.length<this.comment.level)o+=":";a-=1+n.length;s="#"+n}else this.originalIndentation=i;this.indentation=o;this.lineStartIndex=this.startIndex+t.length;this.startIndex+=a;return s},t="\\n*"+cd.a.config.indentationCharsPattern;this.code=this.code.replace(new RegExp("^()"+t),e);if(""===this.indentation)this.code=this.code.replace(new RegExp(`(^[^]*?\\n)${t}(?![^]*\\n[^:*#])`),e);if(this.indentation.length<this.comment.level&&Object(h.f)(this.code,/\n/g))this.code=this.code.replace(new RegExp(`^([^]+?\\n)([:*#]{${this.comment.level}})( *)`),e)}adjust(){this.lineStartIndex=this.startIndex;this.code=new d.a(this.code).maskSensitiveCode().withText((e,t)=>{this.headingMatch=e.match(/(^[^]*(?:^|\n))((=+)(.*)\3[ \t\x01\x02]*\n)/);if(this.headingMatch)this.headingMatch.forEach((e,i)=>{this.headingMatch[i]=t.unmaskText(e)});return e}).unmask().getText();this.originalIndentation="";this.indentation="";this.excludeBadBeginnings();this.excludeIndentationAndIntro();this.adjustSignature();this.adjustIndentation()}adjustSignature(){const e=e=>{this.signatureDirtyCode=e+this.signatureDirtyCode;this.endIndex-=e.length;return""},t=new RegExp(`(<${cd.a.g.piePattern}(?: [\\w ]+?=[^<>]+?)?> *)+$`,"i");(t=>{t.forEach(t=>{this.code=this.code.replace(t,e)})})([this.comment.isOwn?cd.a.g.userSignaturePrefixRegexp:void 0,/'+$/,cd.a.config.signaturePrefixRegexp,t,cd.a.config.signaturePrefixRegexp,t,/\s+'+$/,new RegExp(`<small class="${cd.a.config.unsignedClass}">.*$`),/<!-- *Template:Unsigned.*$/,cd.a.config.signaturePrefixRegexp].filter(h.h));const i=[{start:/^<small>/,end:/<\/small>[ \xa0\t]*$/}];if(cd.a.config.smallDivTemplates.length)i.push({start:new RegExp(`^(?:\\{\\{(${cd.a.config.smallDivTemplates.join("|")})\\|(?: *1 *= *|(?![^{]*=)))`,"i"),end:/\}\}[ \xa0\t]*$/});this.signatureCode=this.signatureDirtyCode;this.inSmallFont=!1;i.some(e=>{if(e.start.test(this.code)&&e.end.test(this.signatureCode)){this.inSmallFont=!0;this.code=this.code.replace(e.start,"");this.signatureCode=this.signatureCode.replace(e.end,"");return!0}})}adjustIndentation(){let e=this.indentation;if(!this.comment.isOpeningSection){const t=(this.code+this.signatureDirtyCode).match(/\n([:*#]*[:*])(?!:*#).*$/);if(t){e=t[1];if(e.length<this.originalIndentation.length){const t=cd.a.config.spaceAfterIndentationChars?" ":"",i=this.originalIndentation.slice(e.length)+t;this.code=i+this.code;this.indentation=this.originalIndentation=this.originalIndentation.slice(0,e.length);this.startIndex-=i.length}}}e+=cd.a.config.defaultIndentationChar;this.replyIndentation=e}calculateMatchScore(e,t,i){const n=e.index===this.index;let s,o,a=!1;if(e.previousComments.length)for(let t=0;t<e.previousComments.length;t++){const n=i[this.index-1-t];if(!n)break;a=n.timestamp===e.previousComments[t].timestamp&&n.author.getName()===e.previousComments[t].authorName;if(!1!==s)s=this.timestamp===n.timestamp&&this.author===n.author;if(!a)break}else a=0===this.index;s=Boolean(s);if(e.followsHeading)o=this.headingMatch?Object(m.j)(Object(m.k)(this.headlineCode))===Object(m.j)(e.sectionHeadline):-.4999;else o=!this.headingMatch;const r=Object(h.d)(e.commentText,Object(m.k)(this.code));this.score=2*(1===t.length||r>.5||0===e.index&&a&&o||0!==e.index&&a&&!s)+r+1*o+.5*a+1e-4*n}matchProperPlaceRegexps(e){var t;const i="^("+(this.comment.isTableComment?"[^]*?(?:(?:\\s*\\n\\|\\})+|</table>).*\\n":"")+"[^]*?(?:"+mw.util.escapeRegExp(this.signatureCode)+"|"+cd.a.g.contentTimestampRegexp.source+".*"+(cd.a.g.unsignedTemplatesPattern?`|${cd.a.g.unsignedTemplatesPattern}.*`:"")+"|(?:^|\\n)\\x01.+)\\n)\\n*",n=this.replyIndentation.length-1,s=new RegExp(i+("((?![:*#\\x01\\n])"+(n>0?`|[:*#\\x01]{1,${n}}(?![:*\\x01])`:"")+")")),o=e.match(s)||[];let r=null!==(t=o[1])&&void 0!==t?t:e,c=o[o.length-1],l=1===Object(h.f)(r,/\n/g);if(cd.a.config.outdentTemplates.length){const t=cd.a.config.outdentTemplates.map(h.l).join("|"),n=new RegExp(`^\\s*([:*#]*)[ \t]*\\{\\{ *(?:${t}) *(?:\\||\\}\\})`),[,s]=e.slice(r.length).match(n)||[];if(void 0!==s)if(l)throw new a.a({type:"parse",code:"findPlace"});else if((s||"").length<=this.replyIndentation.length){const t=new RegExp(i);[,r]=e.match(t)||[]}}return{adjustedCodeBetween:r,indentationAfter:c,isNextLine:l}}findProperPlaceForReply(e){let t=this.endIndex;const i=this.constructor.getAdjustedChunkCodeAfter(t,e);if(/^ +\x02/.test(i))throw new a.a({type:"parse",code:"closed"});const{adjustedCodeBetween:n,indentationAfter:s,isNextLine:o}=this.matchProperPlaceRegexps(i);if(cd.a.config.outdentTemplates.length&&u.a.get("outdentLevel")&&this.replyIndentation.length>=u.a.get("outdentLevel")&&this.indentation.length>s.length&&o){this.isReplyOutdented=!0;this.replyIndentation=this.replyIndentation.slice(0,Math.max(s.length,1))+cd.a.config.defaultIndentationChar}const r=1===this.replyIndentation.length&&"unify"===cd.a.config.indentationCharMode?"":"[:*#]{2,}|",c="mimic"===cd.a.config.indentationCharMode?"[#*:]":"#",[,l]=n.match(new RegExp(`\\n(${r}${c}[:*#]*).*\\n$`))||[];if(l)this.replyIndentation=l.slice(0,this.replyIndentation.length).replace(/:$/,cd.a.config.defaultIndentationChar);t+=n.length;return t}modifyContext({action:e,formAction:t,commentCode:i,contextCode:n=(this.isInSectionContext?this.comment.section.presumedCode:this.comment.getSourcePage().code),doDelete:s,commentForm:o}){let r;switch(e){case"reply":{var c;const e=this.findProperPlaceForReply(n);null!==(c=i)&&void 0!==c||(i=o.inputToCode(t));r=n.slice(0,e)+i+n.slice(e);break}case"edit":if(s){let e,t;if(this.comment.isOpeningSection&&void 0!==this.headingStartIndex){if(!this.comment.section.source)this.comment.section.locateInCode();if(Object(m.e)(this.comment.section.source.code).length>1)throw new a.a({type:"parse",code:"delete-repliesInSection"});else({startIndex:e,contentEndIndex:t}=this.comment.section.source)}else{t=this.signatureEndIndex+1;if(n.slice(this.endIndex).match(new RegExp(`^.+\\n+[:*#]{${this.indentation.length+1},}`)))throw new a.a({type:"parse",code:"delete-repliesToComment"});else e=this.lineStartIndex}r=n.slice(0,e)+n.slice(t)}else r=n.slice(0,this.lineStartIndex)+i+n.slice(this.signatureEndIndex)}return{contextCode:r,commentCode:i}}static getAdjustedChunkCodeAfter(e,t){let i=Object(m.i)(t);if(cd.a.config.closedDiscussionTemplates[0][0]){let e;const t=cd.a.config.closedDiscussionTemplates[0].map(h.l).join("|"),n=cd.a.config.closedDiscussionTemplates[1].map(h.l).join("|");if(n)e=new RegExp(`\\{\\{ *(?:${t}) *(?=[|}])[^}]*\\}\\}\\s*([:*#]*)[^]*?\\{\\{ *(?:${n}) *(?=[|}])[^}]*\\}\\}`,"g");const s=new RegExp(`\\{\\{ *(?:${t}) *\\|[^}]{0,50}?=\\s*([:*#]*)`,"g"),o=(e,t)=>"\x01".repeat(e)+" ".repeat(t-e-1)+"\x02";if(e)i=i.replace(e,(e,t)=>o(t.length,e.length));let a;for(;a=s.exec(i);)i=i.slice(0,a.index)+new d.a(i.slice(a.index)).maskTemplatesRecursively(void 0,!0).withText(e=>e.replace(/\x01\d+_template_(\d+)\x02/,(e,t)=>o(a[1].length,t.length))).unmask().getText()}let n=e+i.slice(e).match(/\n+(=+).*\1[ \t\x01\x02]*\n|$/).index+1;const s=t.slice(e,n);cd.a.g.keepInSectionEnding.forEach(e=>{const t=s.match(e);if(t)n-=t[0].length-1});return i.slice(e,n)}};var g=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}},f=i(24),b=i(29),v=i(36),y=i(18),w=i(30),x=i(17),k=i(7),C=i(2),T=i(21),S=i(8),E=i(9),O=i(14),N=i(4);class Comment_Comment extends l.a{constructor(e,t,i){super(e,t,i);this.isReformatted=u.a.get("reformatComments");this.showContribsLink=u.a.get("showContribsLink");this.hideTimezone=u.a.get("hideTimezone");this.timestampFormat=u.a.get("timestampFormat");this.useUiTime=u.a.get("useUiTime");this.author=T.default.get(this.authorName);this.$signature=$(this.signatureElement);this.isActionable=cd.a.page.isActive()&&!C.a.getClosedDiscussions().some(e=>e.contains(this.elements[0]));this.isEditable=this.isActionable&&(this.isOwn||u.a.get("allowEditOthersComments"));this.highlightables.forEach(this.bindEvents.bind(this));this.updateAnchorHighlightable();const n=e=>{const t=new f.a(e,C.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.isTableComment=!1;this.isCollapsed=!1;this.collapsedThread=null;this.subitemList=new g;this.wasMenuHidden=!1;this.genderRequestCallbacks=[]}updateAnchorHighlightable(){if(this.highlightables.length>1){const e=[],t=[],i=[this.highlightables[0],this.highlightables[this.highlightables.length-1]];i.forEach((i,n)=>{const s=new f.a(i,C.a.rootElement);e[n]=0;for(;s.parentNode();){e[n]++;if(!t[n]&&["DL","UL","OL"].includes(s.currentNode.tagName))t[n]=s.currentNode.tagName.toLowerCase()}});const n=Math.min(...e);let s;for(let i=0;i<2;i++)if(e[i]===n&&void 0===s||"ol"===t[s]&&"ol"!==t[i])s=i;this.anchorHighlightable=i[s]}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.textContent.length<30&&(["SUP","SUB"].includes(e.tagName)&&!e.classList.length||(e.getAttribute("style")||["B","STRONG"].includes(e.tagName))&&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(h.v)(i,!0)){const n=e.previousElementSibling;if(!n||Object(h.v)(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(h.K).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=[],t=this.constructor.prototypes.get("headerWrapperElement");this.headerElement=t.firstChild;const i=this.headerElement.firstChild.firstChild,n=i.nextElementSibling,s=i.firstChild,o=n.firstElementChild;let a;if(this.showContribsLink){a=n.lastElementChild;if(!this.author.isRegistered()){a.previousSibling.remove();a.remove()}}if(this.authorLink){var r,l,d,u;if(this.extraSignatures.length)this.authorLink=this.authorLink.cloneNode(!0);const e=null===(r=(l=cd.a.config).beforeAuthorLinkParse)||void 0===r?void 0:r.call(l,this.authorLink,i);i.parentNode.replaceChild(this.authorLink,i);this.authorLink.classList.add("cd-comment-author");this.authorLink.innerHTML="";this.authorLink.appendChild(s);null===(d=(u=cd.a.config).afterAuthorLinkParse)||void 0===d||d.call(u,this.authorLink,e)}else{this.authorLink=i;let t;if(this.author.isRegistered()){t="User:"+this.author.getName();e.push({pageName:t,link:this.authorLink})}else t=`${cd.a.g.contribsPages[0]}/${this.author.getName()}`;this.authorLink.title=t;this.authorLink.href=mw.util.getUrl(t)}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)}s.textContent=this.author.getName();if(this.showContribsLink&&this.author.isRegistered()){const e=`${cd.a.g.contribsPages[0]}/${this.author.getName()}`;a.title=e;a.href=mw.util.getUrl(e)}if(this.timestamp){this.copyLinkButton=new c({label:this.reformattedTimestamp||this.timestamp,tooltip:this.timestampTitle,classes:["cd-comment-button-label","cd-comment-timestamp","mw-selflink-fragment"],action:this.copyLink.bind(this),href:this.dtId&&"#"+this.dtId});this.headerElement.appendChild(this.copyLinkButton.element);this.timestampElement=this.copyLinkButton.labelElement;new b.a(this.timestampElement,this.date,!this.hideTimezone).init()}this.$header=$(this.headerElement);this.rewrapHighlightables();this.highlightables[0].insertBefore(t,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();const t=document.createElement("div");t.className="cd-comment-menu-wrapper";t.appendChild(this.menuElement);this.highlightables[this.highlightables.length-1].appendChild(t)}addReplyButton(){var e;if(!this.isActionable)return;const t=this.replyButtonClick.bind(this);if(this.isReformatted){this.replyButton=new c({label:cd.a.s("cm-reply"),classes:["cd-comment-button-label"],action:t});this.menuElement.appendChild(this.replyButton.element)}else{this.replyButton=new c({element:this.constructor.prototypes.get("replyButton"),action:t,widgetConstructor:this.constructor.prototypes.getWidget("replyButton")});this.overlayMenu.appendChild(this.replyButton.element)}if(null!==(e=k.a.getByIndex(this.index+1))&&void 0!==e&&e.isOutdented&&(!this.section||this.elements[0].matches("ol *"))){this.replyButton.setDisabled(!0);this.replyButton.setTooltip(cd.a.s("cm-reply-outdented-tooltip"))}}canBeEdited(){return this.isEditable}addEditButton(){if(!this.isEditable)return;const e=this.editButtonClick.bind(this);if(this.isReformatted){this.editButton=new c({label:cd.a.s("cm-edit"),classes:["cd-comment-button-label"],action:e});this.menuElement.appendChild(this.editButton.element)}else{this.editButton=new c({element:this.constructor.prototypes.get("editButton"),action:e,widgetConstructor:this.constructor.prototypes.getWidget("editButton")});this.overlayMenu.appendChild(this.editButton.element)}}addThankButton(){var e;if(!cd.a.user.isRegistered()||!this.author.isRegistered()||!this.date||this.isOwn)return;(e=this.constructor).thanksStorage||(e.thanksStorage=new y.a("thanks").cleanUp(e=>(e.thankTime||e.thankUnixTime||0)<Date.now()-60*cd.a.g.msInDay).save());const t=Object.values(this.constructor.thanksStorage.getAll()).some(e=>this.dtId===e.id||this.id===e.id),i=this.thankButtonClick.bind(this);if(this.isReformatted){this.thankButton=new c({label:cd.a.s(t?"cm-thanked":"cm-thank"),tooltip:cd.a.s(t?"cm-thanked-tooltip":"cm-thank-tooltip"),classes:["cd-comment-button-label"],action:i});this.menuElement.appendChild(this.thankButton.element)}else{this.thankButton=new c({element:this.constructor.prototypes.get("thankButton"),action:i,widgetConstructor:this.constructor.prototypes.getWidget("thankButton")});this.overlayMenu.appendChild(this.thankButton.element)}if(t)this.setThanked()}addCopyLinkButton(){if(this.id&&!this.isReformatted){this.copyLinkButton=new c({element:this.constructor.prototypes.get("copyLinkButton"),action:this.copyLink.bind(this),widgetConstructor:this.constructor.prototypes.getWidget("copyLinkButton"),href:this.dtId?"#"+this.dtId:void 0});this.overlayMenu.appendChild(this.copyLinkButton.element)}}addGoToParentButton(){if(!this.getParent())return;const e=this.goToParentButtonClick.bind(this);if(this.isReformatted){this.goToParentButton=new c({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{this.goToParentButton=new c({element:this.constructor.prototypes.get("goToParentButton"),action:e,widgetConstructor:this.constructor.prototypes.getWidget("goToParentButton")});this.overlayMenu.appendChild(this.goToParentButton.element)}}addGoToChildButton(){if(this.isReformatted){this.goToChildButton=new c({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 if(this.$overlayMenu){const e=this.constructor.prototypes.get("goToChildButton");this.goToChildButton=new c({element:e,widgetConstructor:this.constructor.prototypes.getWidget("goToChildButton")});this.$overlayMenu.prepend(e)}}formatTimestamp(e,t){let i,n="";if(cd.a.g.areTimestampsAltered)i=Object(O.b)(e,!this.hideTimezone);if("relative"===this.timestampFormat&&this.useUiTime&&cd.a.g.contentTimezone!==cd.a.g.uiTimezone)n=Object(O.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(!this.isReformatted||this.extraSignatures.length){this.timestampElement.textContent=e;this.timestampElement.title=t;new b.a(this.timestampElement,this.date,!this.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 b.a(e.timestampElement,e.date,!this.hideTimezone).init()})}}}bindEvents(e){if(!this.isReformatted){e.onmouseenter=this.highlightHovered.bind(this);e.onmouseleave=this.unhighlightHovered.bind(this);e.ontouchstart=this.highlightHovered.bind(this)}}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&&(C.a.getFloatingElements().includes(i)||C.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.updateLevels(!1);this.updateAnchorHighlightable()}}}}replyButtonClick(){if(this.replyForm&&this.isSelected){this.fixSelection();this.replyForm.quote(!0,this)}else if(this.replyForm)this.replyForm.cancel();else this.reply()}editButtonClick(){this.edit()}thankButtonClick(){this.thank()}goToParentButtonClick(){this.goToParent()}setOffset(e,t){if(t.set)if(t.considerFloating){this.offset=e;this.firstHighlightableWidth=t.firstElement.offsetWidth}else this.roughOffset=e}getAdjustedRects(e,t,i,n=C.a.getFloatingElements().map(N.d)){let s=0,o=!1;n.forEach(e=>{const t=scrollY+e.outerTop,n=scrollY+e.outerBottom;if(i>t&&i<n+cd.a.g.contentLineHeight)o=!0;if(i>t&&top<n+cd.a.g.contentLineHeight)s++});if(o){const i=[];this.highlightables.forEach((e,t)=>{i[t]=e.style.overflow;e.style.overflow="hidden"});e=this.constructor.getCommentPartRect(this.highlightables[0]);t=1===this.elements.length?e:this.constructor.getCommentPartRect(this.highlightables[this.highlightables.length-1]);if(s<=1)this.highlightables.forEach((e,t)=>{e.style.overflow=i[t]});else this.highlightables.forEach((e,t)=>{if(C.a.getFloatingElements().some(t=>e.contains(t)))e.style.overflow=i[t]})}return[e,t]}updateStretched(e,t){this.isStartStretched=!1;this.isEndStretched=!1;if(this.getLayersContainer().cdIsTopLayersContainer)if(0===this.level){const i=C.a.getContentColumnOffsets(),n=e-i.startMargin-2,s=t+i.startMargin+2;this.isStartStretched="ltr"===this.getDirection()?n<=i.start:s>=i.start;this.isEndStretched="ltr"===this.getDirection()?s>=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);if(this.editForm)e.firstElement=e.lastElement=this.editForm.getOutermostElement();else{e.firstElement=this.highlightables[0];e.lastElement=this.highlightables[this.highlightables.length-1]}let n=this.constructor.getCommentPartRect(e.firstElement),s=1===this.elements.length?n:this.constructor.getCommentPartRect(e.lastElement);if(!Object(N.h)(n,s)){this.setOffset(null,e);return null}const o=window.scrollY;if(!(this.offset?!(Math.abs(o+n.top-this.offset.top)<.01&&Math.abs(s.bottom-n.top-(this.offset.bottom-this.offset.top))<.01&&Math.abs(this.highlightables[0].offsetWidth-this.firstHighlightableWidth)<.01):!0)){if(e.set&&!e.considerFloating)this.roughOffset=this.offset;return e.set?!1:this.offset}const a=o+n.top,r=o+s.bottom;if(e.considerFloating)[n,s]=this.getAdjustedRects(n,s,r,e.floatingRects);const c=window.scrollX,l=c+Math.min(n.left,s.left),d=c+Math.max(n.right,s.right);if(e.considerFloating)this.updateStretched(l,d);const u={top:a,bottom:r,left:l,right:d,bottomForVisibility:r-a>window.innerHeight-250?a+(window.innerHeight-250):r};this.setOffset(u,e);return e.set?!0:u}getDirection(){if(!this.direction)if(C.a.areThereLtrRtlMixes()){const e=this.elements.slice(-1)[0].closest(".mw-content-ltr, .mw-content-rtl").classList.contains("mw-content-ltr");this.direction=e?"ltr":"rtl"}else this.direction=cd.a.g.contentDirection;return this.direction}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=C.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.getDirection()?"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?C.a.getContentColumnOffsets().startMargin:cd.a.g.commentFallbackSideMargin;return{left:"ltr"===this.getDirection()?e:t,right:"ltr"===this.getDirection()?t:e}}computeLayersOffset(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){null==e||e.preventDefault();this.overlayInnerWrapper.style.display="none";this.wasMenuHidden=!0}deferHideMenu(e){if(1===e.which)this.hideMenuTimeout=setTimeout(this.hideMenu.bind(this),1200)}dontHideMenu(){clearTimeout(this.hideMenuTimeout)}createLayers(){this.underlay=this.constructor.prototypes.get("underlay");k.a.underlays.push(this.underlay);this.overlay=this.constructor.prototypes.get("overlay");this.line=this.overlay.firstChild;this.marker=this.overlay.firstChild.nextSibling;if(!this.isReformatted){this.overlayInnerWrapper=this.overlay.lastChild;this.overlayGradient=this.overlayInnerWrapper.firstChild;this.overlayMenu=this.overlayInnerWrapper.lastChild;this.overlayInnerWrapper.oncontextmenu=this.hideMenu.bind(this);this.overlayInnerWrapper.onmousedown=this.deferHideMenu.bind(this);this.overlayInnerWrapper.onmouseup=this.dontHideMenu.bind(this);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(!this.isReformatted){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-gapCloser")}}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.computeLayersOffset(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.layersOffset){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);Object(h.E)(k.a.underlays,this.underlay);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=new w.a(document.body,null,!0,1===this.elements.length||this.parser.getNestingLevel(this.elements[0])<=this.parser.getNestingLevel(this.elements.slice(-1)[0])?this.elements[0]:this.elements.slice(-1)[0]);for(;t.parentNode();){const i=t.currentNode;if(i.classList.contains("cd-connectToPreviousItem"))continue;let n=i.cdStyle;if(!n){n=window.getComputedStyle(i);i.cdStyle=n}const s=Array.from(i.classList);if(["absolute","relative"].includes(n.position)||i!==C.a.$content[0]&&(s.includes("mw-content-ltr")||s.includes("mw-content-rtl")))e=i;if(n.backgroundColor.includes("rgb(")||"none"!==n.backgroundImage&&!e){e=i;e.classList.add("cd-commentLayersContainer-parent-relative")}if(e)break}e||(e=document.body);e.classList.add("cd-commentLayersContainer-parent");let i=e.firstElementChild;if(!i.classList.contains("cd-commentLayersContainer")){i=document.createElement("div");i.classList.add("cd-commentLayersContainer");e.insertBefore(i,e.firstChild);i.cdIsTopLayersContainer=!i.parentNode.parentNode.closest(".cd-commentLayersContainer-parent")}this.layersContainer=i;Object(h.a)(k.a.layersContainers,i)}return this.layersContainer}getLayersContainerOffset(){const e=this.getLayersContainer();let t=e.cdCachedLayersContainerTop,i=e.cdCachedLayersContainerLeft;if(void 0===t||e.cdCouldHaveMoved){const n=e.getBoundingClientRect();if(!Object(N.h)(n))return null;t=n.top+window.scrollY;i=n.left+window.scrollX;e.cdCouldHaveMoved=!1;e.cdCachedLayersContainerTop=t;e.cdCachedLayersContainerLeft=i}return{top:t,left:i}}updateHoverState(e,t){const i=this.layersOffset,n=this.getLayersContainerOffset();if(i&&n)if(!t&&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)this.highlightHovered();else this.unhighlightHovered();else this.removeLayers()}highlightHovered(e){var t;if(this.isHovered||C.a.isPageOverlayOn()||this.isReformatted)return;if(e&&"touchstart"===e.type){if(this.wasMenuHidden){this.wasMenuHidden=!1;return}k.a.query(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&&!this.isReformatted){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},s={backgroundColor:"",backgroundImage:"",opacity:""};this.$marker.animate(n(e),400,"swing",()=>{this.$marker.css(s)});const o=this;this.$animatedBackground.animate(n(t),400,"swing",(function(){if(this===o.$animatedBackground.get(-1)){null==i||i();o.$animatedBackground.add(o.$overlayGradient).css(s)}}))}animateBack(e,t){var i,n;this.animateBackBound=null;if(null===(i=this.$underlay)||void 0===i||!i.parent().length){null==t||t();return}const s=this.$marker.css("background-color"),o=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===o)r="rgba(0, 0, 0, 0)";this.$marker.css({backgroundColor:s,opacity:1});this.$animatedBackground.css({backgroundColor:o});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 null==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=new y.a("seenRenderedChanges"),t=e.get(mw.config.get("wgArticleId"))||{};t[this.id]={htmlToCompare:this.htmlToCompare,seenTime:Date.now()};e.set(mw.config.get("wgArticleId"),t).save()}C.a.maybeMarkPageAsRead()}flashChangedOnSight(){this.willFlashChangedOnSight=!0;if(!document.hidden&&this.isInViewport())this.flashChanged()}stopAnimations(){var e;null===(e=this.$animatedBackground)||void 0===e||e.add(this.$marker).stop(!0,!0)}scrubDiff(e,t,i){const n=[[],[]];t.forEach((e,t)=>{const s=e.slots.main.content,o=this.locateInCode(!1,s,i[t]),a=Object(h.f)(s.slice(0,o.lineStartIndex),/\n/g)+1,r=a+Object(h.f)(s.slice(o.lineStartIndex,o.signatureEndIndex),/\n/g);for(let e=a;e<=r;e++)n[t].push(e)});const s=[];let o="";$(Object(N.p)(e)).find("tr").each((e,t)=>{const i=$(t),r=i.children(".diff-lineno");for(let e=0;e<r.length;e++){const t=r.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)o+=i.prop("outerHTML")});return $(Object(N.p)(o))}showDiff(e,t){var i=this;return s()((function*(){var n,s,o,r;let c=Math.min(mw.config.get("wgRevisionId"),e),l=Math.max(mw.config.get("wgRevisionId"),e);const d=C.a.getApi().post({action:"query",revids:[c,l],prop:"revisions",rvslots:"main",rvprop:["ids","content"],redirects:!mw.config.get("wgIsRedirect")}).catch(S.f),u=C.a.getApi().post({action:"compare",fromtitle:i.getSourcePage().name,fromrev:c,torev:l,prop:["diff"]}).catch(S.f);let[h,m]=yield Promise.all([d,u,mw.loader.using(["mediawiki.diff","mediawiki.diff.styles"])]);const p=null===(n=h.query)||void 0===n?void 0:null===(s=n.pages)||void 0===s?void 0:null===(o=s[0])||void 0===o?void 0:o.revisions,g=null==m?void 0:null===(r=m.compare)||void 0===r?void 0:r.body;if(!p||void 0===g)throw new a.a({type:"api",code:"noData"});const f=i.scrubDiff(g,p,t);if(!f.find(".diff-deletedline, .diff-addedline").length)throw new a.a({type:"parse",code:"emptyDiff",message:cd.a.sParse("comment-diff-empty")});const b=$("<div>").append(f,$("<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(b);OO.ui.alert(b,{title:cd.a.s("comment-diff-title"),size:"larger"})}))()}markAsChanged(e,t,i,n){var r=this;let c;switch(e){case"changed":default:this.isChanged=!0;c="comment-changed";break;case"changedSince":this.isChangedSincePreviousVisit=!0;c="comment-changedsince";break;case"deleted":this.isDeleted=!0;c="comment-deleted"}const l=t?void 0:new o.a({label:cd.a.s("comment-changed-refresh"),action:()=>{C.a.reload("deleted"===e?{}:{commentIds:[this.id]})}}),d="deleted"===e||this.getSourcePage()!==cd.a.page?void 0:new o.a({label:cd.a.s("comment-diff"),action:(u=s()((function*(){d.setPending(!0);try{yield r.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(N.q)(i),{type:"emptyDiff"===(null===(e=t.data)||void 0===e?void 0:e.code)?"info":"error"})}d.setPending(!1)})),function(){return u.apply(this,arguments)})});var u;let m,p;if(this.isReformatted){c+="-short";m=p=cd.a.sParse("dot-separator")}else{m=" ";p=l?cd.a.sParse("dot-separator"):" "}$(this.highlightables).find(".cd-changeMark").remove();const g=$("<span>").addClass("cd-changeMark").text(cd.a.s(c));if(l)g.append(m,l.element);else g.addClass("cd-changeMark-newVersionRendered");if(d)g.append(p,d.element);if(this.isReformatted)this.$header.append(g);else{let e,t=$(this.highlightables).last();do{e=t;t=e.children().last()}while(t.length&&!Object(h.v)(t[0]));if(!e.find(".cd-changeMark-before").length)e.append(" ",$("<span>").addClass("cd-changeMark-before"));e.append(g)}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;C.a.maybeMarkPageAsRead()}else{const e=new y.a("seenRenderedChanges"),t=e.get(mw.config.get("wgArticleId"))||{};delete t[this.id];e.set(mw.config.get("wgArticleId"),t).save();this.flashChangedOnSight()}}update(e,t){const i=[...this.$elements].map(e=>e.tagName),n=[...this.$elements].map(e=>e.className),s=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(!s&&o&&Object(h.b)(i,t.elementNames)){const e=this.$elements.find(".autonumber").text().match(/\d+/);let s=e?e[0]:1;t.elementHtmls.forEach((e,s)=>{e=e.replace(/\x01(\d+)_\w+\x02/g,(e,i)=>t.hiddenElementsData[i-1].html);if(Object(h.q)({tagName:i[s],className:n[s]})){const t=this.$elements.eq(s).find(".mw-headline");if(t.length){var o;const i=t.find(".mw-headline-number"),n=$(e);t.html(n.html()).prepend(i);null===(o=this.section)||void 0===o||o.update(n)}}else{const t=this.$elements.eq(s),i=t.hasClass("cd-hidden"),n=this.replaceElement(t,e);if(i)$(n).addClass("cd-hidden")}});this.$elements.find(".autonumber").each((e,t)=>{$(t).text(`[${s}]`);s++});this.$elements.attr("data-cd-comment-index",this.index);if(this.isReformatted){this.signatureElement=this.$elements.find(".cd-signature")[0];this.replaceSignatureWithHeader();this.addMenu()}else{this.timestampElement=this.$elements.find(".cd-signature .cd-timestamp")[0];this.reformatTimestamp()}mw.hook("wikipage.content").fire(this.$elements);delete this.cachedText;return!0}else return!1}scrollIntoView(e){var t;((null===(t=this.editForm)||void 0===t?void 0:t.$element)||this.$elements).cdScrollIntoView(e)}scrollTo({smooth:e=!0,expandThreads:t=!1,flash:i=!0,pushState:n=!1,callback:s}={}){if(t)this.expandAllThreadsDownTo();const o=this.dtId||this.id;if(n&&o){const e=Object.assign({},history.state,{cdJumpedToComment:!0});history.pushState(e,"","#"+o)}if(this.isCollapsed){this.getVisibleExpandNote().cdScrollTo("top",e,s);const t=mw.notification.notify(Object(N.q)(cd.a.sParse("navpanel-firstunseen-hidden"),{callbacks:{"cd-notification-expandThread":()=>{this.scrollTo({smooth:e,expandThreads:!0,flash:i,pushState:n,callback:s});t.close()}}}),{title:cd.a.s("navpanel-firstunseen-hidden-title")})}else{var a;const t=this.getOffset({considerFloating:!0});((null===(a=this.editForm)||void 0===a?void 0:a.$element)||this.$elements).cdScrollIntoView(this.isOpeningSection||this.editForm||t&&t.bottom!==t.bottomForVisibility?"top":"center",e,s);if(i)this.flashTarget()}}goToParent(){var e;const t=this.getParent();if(t){t.scrollTo({pushState:!0});t.configureLayers();if(!t.goToChildButton)t.addGoToChildButton();null===(e=t.goToChildButton)||void 0===e||e.setAction(()=>{this.scrollTo({pushState:!0})})}else console.error("This comment has no parent.")}generateDiffView(){var e=this;return s()((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(N.q)(t.parsedcomment,{targetBlank:!0}).addClass("comment")),Object(N.p)(t.diffBody))}))()}copyLink(e){var t=this;return s()((function*(){C.a.showCopyLinkDialog(t,e)}))()}findDiffMatches(e,t){var i=this;return s()((function*(){const n=/<td [^>]*colspan="2" class="[^"]*\bdiff-side-deleted\b[^"]*"[^>]*>\s*<\/td>\s*<td [^>]*class="[^"]*\bdiff-marker\b[^"]*"[^>]*>\s*<\/td>\s*<td [^>]*class="[^"]*\bdiff-addedline\b[^"]*"[^>]*>\s*<div[^>]*>(?!=)(.+?)<\/div>\s*<\/td>/g,s=i.getText(!1)+" "+i.signatureText,o=[];for(let r=0;r<e.length;r++){const c=e[r];if(!c)continue;const l=t[r];let d,u="",p="",g=0;for(;d=n.exec(c);){const e=Object(m.k)(Object(h.g)(d[1])),t=Object(h.d)(e,s);if(t>g)g=t;p+=e+"\n";u+=d[1]+"\n"}if(!u.trim())continue;l.diffBody=c;const f=new Date(l.timestamp).setSeconds(0),b=Math.abs(i.date.getTime()-f);let v=Math.max(Object(h.d)(p,s),g);if(v<1&&u.includes("{{")){try{u=$("<div>").append((yield Object(S.h)(u,{title:cd.a.page.name})).html).cdGetText()}catch(e){throw new a.a({type:"parse"})}v=Object(h.d)(u,s)}o.push({revision:l,wordOverlap:v,dateProximity:b})}return o}))()}findEdit(){var e=this;return s()((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=>C.a.getApi().post({action:"compare",fromtitle:e.getSourcePage().getArchivedPage().name,fromrev:t.revid,torelative:"prev",prop:["diff"]}).catch(S.f)),n=(yield Promise.all(i)).map(e=>e.compare.body),s=(yield e.findDiffMatches(n,t)).sort((e,t)=>e.wordOverlap===t.wordOverlap?e.dateProximity-t.dateProximity:t.wordOverlap-e.wordOverlap);if(!s.length||s[1]&&s[0].wordOverlap===s[1].wordOverlap&&s[0].dateProximity===s[1].dateProximity)throw new a.a({type:"parse"});e.addingEdit=s[0].revision}return e.addingEdit}))()}getDiffLink(e="standard"){var t=this;return s()((function*(){const i=yield t.findEdit();if("standard"===e){const e=decodeURI(cd.a.page.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[0]}/${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(N.q)(n,{targetBlank:!0}),{type:"error"});this.thankButton.setPending(!1)}thank(){var e=this;return s()((function*(){e.thankButton.setPending(!0);const t=cd.a.g.genderAffectsUserString&&e.author.isRegistered()?Object(S.g)([e.author]):void 0;let i;try{[i]=yield Promise.all([e.findEdit(),t,mw.loader.using(["mediawiki.diff","mediawiki.diff.styles"])].filter(h.h))}catch(t){e.thankFail(t);return}const n=Object(N.q)(cd.a.sParse("thank-confirm",e.author.getName(),e.author,e.getSourcePage().getArchivedPage().getUrl({diff:i.revid})),{tagName:"div",targetBlank:!0});n.find("a").attr("data-instantdiffs-link","link");const s=$.cdMerge(n,yield e.generateDiffView());if("accept"===(yield Object(E.showConfirmDialog)(s,{size:"larger"}))){try{yield C.a.getApi().postWithEditToken(C.a.getApi().assertCurrentUser({action:"thank",rev:i.revid,source:cd.a.config.scriptCodeName})).catch(S.f)}catch(t){e.thankFail(t);return}mw.notify(cd.a.s("thank-success"));e.setThanked();e.constructor.thanksStorage.init().set(i.revid,{id:e.dtId||e.id,thankTime:Date.now()}).save();try{yield mw.loader.using("ext.thanks");mw.thanks.thanked.push(i.revid)}catch(e){}}else e.thankButton.setPending(!1)}))()}reply(e,t){var i;if(this.replyForm)return;let n=!1;if(!e&&!t){n=k.a.getSelectedComment()===this;if(n){e={focus:!1};this.fixSelection()}}if(null===(i=k.a.getByIndex(this.index+1))||void 0===i||!i.isOutdented||!this.section){this.replyForm=x.a.setupCommentForm(this,{mode:"reply"},e,t);if(n)this.replyForm.quote(!0,this)}else{this.section.reply({outdentNotice:!0});let e=window.getSelection();if("Range"!==e.type){const t=document.createRange();if(this.isReformatted)t.setStart(this.headerElement,this.headerElement.childNodes.length);else t.setStart(this.elements[0],0);if(this.isReformatted)t.setEnd(this.menuElement,0);else t.setEnd(this.signatureElement,0);e=window.getSelection();e.removeAllRanges();e.addRange(t)}this.section.replyForm.quote(!0,this,!0)}}fixSelection(){let e;if(this.isReformatted)e=this.$menu[0];else{e=document.createElement("span");this.$elements.last().append(e)}const t=window.getSelection();if(t.containsNode(e,!0)){const{higherNode:i,higherOffset:n}=Object(N.f)(t);t.setBaseAndExtent(i,n,e,0)}if(!this.isReformatted)e.remove()}edit(e,t){if(!this.editForm)this.editForm=x.a.setupCommentForm(this,{mode:"edit"},e,t)}loadCode(e){var t=this;return s()((function*(){null==e||e.setSectionSubmitted(!1);try{if(e&&t.section&&null!==t.section.liveSectionNumber)try{yield t.section.requestCode();t.section.locateInCode(!0);t.locateInCode(!0);null==e||e.setSectionSubmitted(!0)}catch(e){if(!(e instanceof a.a&&["noSuchSection","locateSection","locateComment"].includes(e.data.code)))throw e}if(null==e||!e.isSectionSubmitted()){yield t.getSourcePage().loadCode();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}}))()}addCommentFormToPage(e,t){if("reply"===e){const{$wrappingItem:e,$outerWrapper:i}=this.addSubitem("replyForm","top");(e||i).append(t.$element)}else if("edit"===e){this.$elements.addClass("cd-hidden").data("cd-comment-form",t);this.unhighlightHovered();if(this.isOpeningSection)$(this.section.barElement).addClass("cd-hidden");t.$element.toggleClass("cd-commentForm-highlighted",this.isNew||this.isOwn);let e;const i=this.$elements.first();if(i.is("dd, li")){const n=i.prop("tagName").toLowerCase();e=$(`<${n}>`).addClass("cd-commentForm-outerWrapper");e.append(t.$element)}else e=t.$element;if(this.isOpeningSection)this.$elements.last().after(e);else this.$elements.first().before(e)}}removeCommentFormFromPage(e,t){if("reply"===e){this.subitemList.remove("replyForm");this.scrollIntoView("top")}else if("edit"===e){t.$element.parent(".cd-commentForm-outerWrapper").remove();this.$elements.removeClass("cd-hidden").removeData("cd-comment-form");if(this.isOpeningSection)$(this.section.barElement).removeClass("cd-hidden");setTimeout(this.configureLayers.bind(this));setTimeout(this.scrollIntoView.bind(this,"top"))}}isInViewport(e=!1,t=this.getOffset()){if(!t)return null;const i=window.scrollY,n=i+cd.a.g.bodyScrollPaddingTop,s=i+window.innerHeight;return e?t.bottomForVisibility>n&&t.top<s:t.top>=n&&t.bottomForVisibility<=s}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=k.a.getAll().some(e=>e.isSeen||e.willFlashChangedOnSight);if(e&&n){const i="backward"===e?-1:1,n=k.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[0]:e;let n;if("string"==typeof t){const e=[...i.parentNode.children].indexOf(i),s=i.parentNode;i.outerHTML=t;n=s.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;return n}getText(e=!0){if(void 0===this.cachedText){const t=this.$elements.not(":header, .mw-heading").clone().removeClass("cd-hidden"),i=$("<div>").append(t),n=[".cd-signature",".cd-changeMark",".noprint",".cd-comment-header",".cd-comment-menu"];if(cd.a.config.unsignedClass)n.push("."+cd.a.config.unsignedClass);const s=n.join(", ");i.find(s).remove();let o=i.cdGetText();if(e){if(cd.a.g.signatureEndingRegexp)o=o.replace(cd.a.g.signatureEndingRegexp,"");if(cd.a.config.signaturePrefixRegexp)o=o.replace(cd.a.config.signaturePrefixRegexp,"")}this.cachedText=o}return this.cachedText}searchInCode(e,t,i){let n;if(t){var s;n={index:t.index,previousComments:t.previousComments,followsHeading:t.followsHeading,sectionHeadline:null===(s=t.section)||void 0===s?void 0:s.headline,commentText:t.text}}else{var o;const e=i?this.section.comments:k.a.getAll(),t=e.indexOf(this);n={index:t,previousComments:e.slice(Math.max(0,t-2),t).reverse(),followsHeading:this.followsHeading,sectionHeadline:null===(o=this.section)||void 0===o?void 0:o.headline,commentText:this.getText()}}const a=Object(m.e)(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=>new p(this,t,e,i)).map((e,t,i)=>{e.calculateMatchScore(n,i,a);return e}).filter(e=>e.score>2.5).sort((e,t)=>t.score-e.score)[0]}locateInCode(e,t,i){const n="string"==typeof t;if(!n){t=e?this.section.presumedCode:this.getSourcePage().code;this.source=null}if(void 0===t)throw new a.a({type:"parse",code:"noCode"});const s=this.searchInCode(t,i,e);if(!s)throw new a.a({type:"parse",code:"locateComment"});if(n)return s;else this.source=s}maybeRequestAuthorGender(e,t=!1){var i=this;return s()((function*(){if(cd.a.g.genderAffectsUserString&&i.author.isRegistered()&&!i.author.getGender()){let t;if(!i.genderRequest){i.genderRequest=Object(S.g)([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(h.G)();e()}}))()}getSourcePage(){return this.section?this.section.getSourcePage():cd.a.page}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 cd.a.page.getDecodedUrlWithFragment(this.dtId||this.id,e)}addSubitem(e,t){let i,n,s="dd",o=!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")){o=!1;s=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=$(`<${s}>`),d=o?$("<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[0]);e.attr("value",t+1)}}else if(d)d.insertAfter(a);else if("top"===t)l.addClass("cd-skip").attr("value",0).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}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()})}initNewAndSeen(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 s=Math.floor(this.date.getTime()/1e3);this.isNew=Boolean(s+60>e[0]||i);this.isSeen=Boolean((s+60<=e[e.length-1]||this.isOwn)&&!i);return s<=t&&t<s+60}maybeSplitParent(){const e=k.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)}getCommentAboveReply(){return this.getChildren(!0).slice(-1)[0]||this}findNewSelf(){if(!this.id)return null;else return k.a.getById(this.id)}getCommentFormMethodName(e){return e}collapse(e){var t;if(null!==(t=this.thread)&&void 0!==t&&t.isCollapsed&&this.thread!==e)return this.thread.lastComment.index;this.isCollapsed=!0;this.collapsedThread=e;this.removeLayers();return null}expand(){var e;if(null!==(e=this.thread)&&void 0!==e&&e.isCollapsed)return this.thread.lastComment.index;this.isCollapsed=!1;this.collapsedThread=null;this.configureLayers();return null}setSelected(e){if(e){if(this.isActionable){this.isSelected=!0;this.configureLayers();this.replyButton.setLabel(cd.a.s("cm-quote"))}}else{this.isSelected=!1;this.replyButton.setLabel(cd.a.s("cm-reply"))}}static initPrototypes(){this.prototypes=new v.a;if(!1!==this.isReformatted){const e=document.createElement("div");e.className="cd-comment-header";const t=document.createElement("div");t.className="cd-comment-author-wrapper";e.append(t);const i=document.createElement("a");i.className="cd-comment-author mw-userlink";t.append(i);const n=document.createElement("bdi");i.append(n);const s=document.createElement("span");s.className="cd-comment-author-links";const o=document.createElement("a");o.textContent=cd.a.s("comment-author-talk");s.append(cd.a.mws("parentheses-start"),o);if(u.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"));t.append(" ",s);const a=document.createElement("div");a.className="cd-comment-header-wrapper";a.appendChild(e);this.prototypes.add("headerWrapperElement",a)}if(!0!==this.isReformatted){this.prototypes.addWidget("replyButton",()=>new OO.ui.ButtonWidget({label:cd.a.s("cm-reply"),framed:!1,classes:["cd-button-ooui","cd-comment-button-ooui"]}));this.prototypes.addWidget("editButton",()=>new OO.ui.ButtonWidget({label:cd.a.s("cm-edit"),framed:!1,classes:["cd-button-ooui","cd-comment-button-ooui"]}));this.prototypes.addWidget("thankButton",()=>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"]}));this.prototypes.addWidget("copyLinkButton",()=>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"]}));this.prototypes.addWidget("goToParentButton",()=>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"]}));this.prototypes.addWidget("goToChildButton",()=>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"]}))}const e=document.createElement("div");e.className="cd-comment-underlay";const t=document.createElement("div");t.className="cd-comment-overlay";const i=document.createElement("div");i.className="cd-comment-overlay-line";t.appendChild(i);const n=document.createElement("div");n.className="cd-comment-overlay-marker";t.appendChild(n);if(!this.isReformatted){const e=document.createElement("div");e.className="cd-comment-overlay-innerWrapper";t.appendChild(e);const i=document.createElement("div");i.textContent="\xa0";i.className="cd-comment-overlay-gradient";e.appendChild(i);const n=document.createElement("div");n.className="cd-comment-overlay-content";e.appendChild(n)}this.prototypes.add("underlay",e);this.prototypes.add("overlay",t)}static getCommentPartRect(e){let t;if(["UL","OL"].includes(e.tagName)){t=Object(N.d)(e);t.left=t.outerLeft;t.right=t.outerRight}else t=e.getBoundingClientRect();return t}static groupBySection(e){return e.reduce((e,t)=>{if(!e.get(t.section))e.set(t.section,[]);e.get(t.section).push(t);return e},new Map)}static getLatest(e){return e.reduce((e,t)=>t.date&&(!e||!e.date||e.date<t.date)?t:e,null)}static 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,s=Number(t[3]),o=Number(t[4]),a=Number(t[5]),r=Object(h.J)(t[6]);return{date:new Date(Date.UTC(i,n,s,o,a)),author:r}}static parseDtId(e){const t=e.match(this.dtIdRegexp);if(!t)return null;const i=e=>{const i=Object(h.J)(t[e]);let n;if(t[e+1]){const i=Number(t[e+1]),s=Number(t[e+2])-1,o=Number(t[e+3]),a=Number(t[e+4]),r=Number(t[e+5]);n=new Date(Date.UTC(i,s,o,a,r))}else n=new Date(t[e+6]);return[i,n]},[n,s]=i(1),[o,a]=t[8]?i(8):[];return{author:n,date:s,parentAuthor:o,parentDate:a,sectionIdBeginning:t[15],index:t[16]?Number(t[16]):void 0}}static scrollToFirstHighlightAll(e){e[0].scrollTo({flash:!1,pushState:!0,callback:()=>{e.forEach(e=>e.flashTarget())}})}}Comment_Comment.dtIdRegexp=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+))?)?$");t.a=Comment_Comment},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 W}));i.d(t,"g",(function(){return Y}));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={};function s(){return n}function o(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 a(e,t){if(t.length<e)throw new TypeError(e+" argument"+(e>1?"s":"")+" required, but only "+t.length+" present")}function r(e){a(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 c(e,t){a(2,arguments);var i=r(e),n=r(t),s=i.getTime()-n.getTime();if(s<0)return-1;else if(s>0)return 1;else return s}function l(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 d(e){return l({},e)}var u={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"}},h=function(e,t,i){var n,s=u[e];if("string"==typeof s)n=s;else if(1===t)n=s.one;else n=s.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 m(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 p={date:m({formats:{full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},defaultWidth:"full"}),time:m({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:m({formats:{full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},defaultWidth:"full"})},g={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"};function f(e){return function(t,i){var n;if("formatting"===(null!=i&&i.context?String(i.context):"standalone")&&e.formattingValues){var s=e.defaultFormattingWidth||e.defaultWidth,o=null!=i&&i.width?String(i.width):s;n=e.formattingValues[o]||e.formattingValues[s]}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 b(e){return function(t){var i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=i.width,s=n&&e.matchPatterns[n]||e.matchPatterns[e.defaultMatchWidth],o=t.match(s);if(!o)return null;var a,r=o[0],c=n&&e.parsePatterns[n]||e.parsePatterns[e.defaultParseWidth],l=Array.isArray(c)?y(c,(function(e){return e.test(r)})):v(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 v(e,t){for(var i in e)if(e.hasOwnProperty(i)&&t(e[i]))return i}function y(e,t){for(var i=0;i<e.length;i++)if(t(e[i]))return i}var w,x={code:"en-US",formatDistance:h,formatLong:p,formatRelative:function(e,t,i,n){return g[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:f({values:{narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},defaultWidth:"wide"}),quarter:f({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:f({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:f({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:f({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:(w={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(w.matchPattern);if(!i)return null;var n=i[0],s=e.match(w.parsePattern);if(!s)return null;var o=w.valueCallback?w.valueCallback(s[0]):s[0];o=t.valueCallback?t.valueCallback(o):o;var a=e.slice(n.length);return{value:o,rest:a}}),era:b({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:b({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:b({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:b({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:b({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 k(e,t,i){var n,u,h;a(2,arguments);var m=s(),p=null!==(n=null!==(u=null==i?void 0:i.locale)&&void 0!==u?u:m.locale)&&void 0!==n?n:x;if(!p.formatDistance)throw new RangeError("locale must contain localize.formatDistance property");var g=c(e,t);if(isNaN(g))throw new RangeError("Invalid time value");var f,b,v=l(d(i),{addSuffix:Boolean(null==i?void 0:i.addSuffix),comparison:g});if(g>0){f=r(t);b=r(e)}else{f=r(e);b=r(t)}var y,w=String(null!==(h=null==i?void 0:i.roundingMethod)&&void 0!==h?h:"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 k,C=b.getTime()-f.getTime(),T=C/6e4,S=o(b)-o(f),E=(C-S)/6e4,O=null==i?void 0:i.unit;if(!O)if(T<1)k="second";else if(T<60)k="minute";else if(T<1440)k="hour";else if(E<43200)k="day";else if(E<525600)k="month";else k="year";else k=String(O);if("second"===k){var N=y(C/1e3);return p.formatDistance("xSeconds",N,v)}else if("minute"===k){var P=y(T);return p.formatDistance("xMinutes",P,v)}else if("hour"===k){var L=y(T/60);return p.formatDistance("xHours",L,v)}else if("day"===k){var $=y(E/1440);return p.formatDistance("xDays",$,v)}else if("month"===k){var I=y(E/43200);return 12===I&&"month"!==O?p.formatDistance("xYears",1,v):p.formatDistance("xMonths",I,v)}else if("year"===k){var D=y(E/525600);return p.formatDistance("xYears",D,v)}throw new RangeError("unit must be 'second', 'minute', 'hour', 'day', 'month' or 'year'")}function C(e,t){var i=function(e){if(!S[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;S[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 S[e]}(t);return i.formatToParts?function(e,t){try{for(var i=e.formatToParts(t),n=[],s=0;s<i.length;s++){var o=T[i[s].type];if(o>=0)n[o]=parseInt(i[s].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 T={year:0,month:1,day:2,hour:3,minute:4,second:5};var S={};function E(e,t,i,n,s,o,a){var r=new Date(0);r.setUTCFullYear(e,t,i);r.setUTCHours(n,s,o,a);return r}var O={timezone:/([Z+-].*)$/,timezoneZ:/^(Z)$/,timezoneHH:/^([+-]\d{2})$/,timezoneHHMM:/^([+-]\d{2}):?(\d{2})$/};function N(e,t,i){var n,s,o;if(""===e)return 0;if(n=O.timezoneZ.exec(e))return 0;if(n=O.timezoneHH.exec(e))if(!L(o=parseInt(n[1],10)))return NaN;else return-36e5*o;if(n=O.timezoneHHMM.exec(e)){o=parseInt(n[1],10);var a=parseInt(n[2],10);if(!L(o,a))return NaN;s=36e5*Math.abs(o)+6e4*a;return o>0?-s:s}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=P(i?t:function(e){return E(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,s=P(new Date(n),i);if(t===s)return t;n-=s-t;var o=P(new Date(n),i);if(s===o)return s;return Math.max(s,o)}(t,r,e))}return NaN}function P(e,t){var i=C(e,t),n=E(i[0],i[1]-1,i[2],i[3]%24,i[4],i[5],0).getTime(),s=e.getTime(),o=s%1e3;return n-(s-=o>=0?o:1e3+o)}function L(e,t){return-23<=e&&e<=23&&(null==t||0<=t&&t<=59)}var $={};function I(e,t){return-N(e,t)}var D=i(34),j=i.n(D),A=i(55),M=i.n(A),_=i(56),F=i.n(_),cd=i(0),B=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 W(){var e;if(j.a.utc)return;const t=null===(e=cd.a.i18n[cd.a.g.userLanguage])||void 0===e?void 0:e.dayjsLocale;if(t)j.a.locale(t);j.a.extend(F.a);j.a.extend(M.a)}function Y(e,t){const i=Object(B.C)(e,!0),n=void 0===t?cd.a.g.parseTimestampContentRegexp:cd.a.g.parseTimestampUiRegexp,s=i.match(n);if(!s)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,s=i?cd.a.g.contentTimestampMatchingGroups:cd.a.g.uiTimestampMatchingGroups,o=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<s.length;t++){const n=s[t],u=e[t+3];switch(n){case"xg":case"F":case"M":r=(i?Object(B.n)(R[n]):R[n].map(mw.msg)).indexOf(u);break;case"d":case"j":c=Number(o(u));break;case"D":case"l":break;case"n":r=Number(o(u))-1;break;case"Y":a=Number(o(u));break;case"xkY":a=Number(o(u))-543;break;case"G":case"H":l=Number(o(u));break;case"i":d=Number(o(u));break;default:throw"Not implemented"}}const u=Date.UTC(a,r,c,l,d),h="number"==typeof t?t*cd.a.g.msInMin:"UTC"===t?0:I(t,u);return new Date(u-h)}(s,t),match:s}}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,o,a,r,c,l;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:I(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=j()(e).tz(i);n=t.utcOffset();s=t.year();o=t.month();a=t.date();r=t.hour();c=t.minute();l=t.day()}if(void 0===s){s=e.getUTCFullYear();o=e.getUTCMonth();a=e.getUTCDate();r=e.getUTCHours();c=e.getUTCMinutes();l=e.getUTCDay()}let d="";const u=cd.a.g.uiDateFormat;for(let e=0;e<u.length;e++){let t=u[e];if("x"===t&&e<u.length-1||"xk"===t&&e<u.length-1)t+=u[++e];switch(t){case"xx":d+="x";break;case"xg":case"F":case"M":d+=R[t].map(mw.msg)[o];break;case"d":d+=Object(B.L)(a,2);break;case"D":case"l":d+=R[t].map(mw.msg)[l];break;case"j":d+=a;break;case"n":d+=o+1;break;case"Y":d+=s;break;case"xkY":d+=s+543;break;case"G":d+=r;break;case"H":d+=Object(B.L)(r,2);break;case"i":d+=Object(B.L)(c,2);break;case"\\":if(e<u.length-1)d+=u[++e];else d+="\\";break;case'"':if(e<u.length-1){const t=u.indexOf('"',e+1);if(-1===t)d+='"';else{d+=u.substr(e+1,t-e-1);e=t}}else d+='"';break;default:d+=u[e]}}if(t)d+=q(n);return d}function G(e,t=!1){let i,n=new Date,s=j()(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:I(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 o=s.date(),a=s.month(),r=s.year(),c=n.getUTCDate(),l=n.getUTCMonth(),d=n.getUTCFullYear(),u=new Date(n.getTime());u.setDate(u.getDate()-1);const h=u.getUTCDate(),m=u.getUTCMonth(),p=u.getUTCFullYear();let g;if(o===c&&a===l&&r===d)g=s.format(cd.a.s("comment-timestamp-today"));else if(o===h&&a===m&&r===p)g=s.format(cd.a.s("comment-timestamp-yesterday"));else if(r===d)g=s.format(cd.a.s("comment-timestamp-currentyear"));else g=s.format(cd.a.s("comment-timestamp-other"));if(t)g+=q(i);return g}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){a(1,arguments);return k(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,s;if(void 0===this.timerStartTimestamps[e])return;const o=performance.now()-this.timerStartTimestamps[e];this.timerTotal[e]+=o;delete this.timerStartTimestamps[e];null!==(i=(t=this.timerAllRunsTotal)[e])&&void 0!==i||(t[e]=0);this.timerAllRunsTotal[e]+=o;null!==(s=(n=this.timerRunCount)[e])&&void 0!==s||(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);const s={};t.a=class{constructor({element:e,buttonElement:t,labelElement:i,iconElement:n,tagName:o="a",classes:a=[],id:r,href:c,label:l,tooltip:d,flags:u,action:h}={}){e||(e=function(e){if(!s[e]){const t=document.createElement(e);t.tabIndex=0;t.setAttribute("role","button");s[e]=t}return s[e].cloneNode(!0)}(o));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!==h)this.setAction(h)}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}maybeExecuteAction(e,t){if(!(this.isDisabled()||(Object(n.i)(t)||t.shiftKey)&&this.buttonElement.href)){t.preventDefault();e(t,this)}}setAction(e){this.buttonElement.onclick=e?t=>{this.maybeExecuteAction(e,t)}:e;this.buttonElement.onkeydown=e?t=>{if([13,32].includes(t.keyCode))this.maybeExecuteAction(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}toggle(e){if(e)this.show();else this.hide();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(32),s=i(18),o=i(0),a=i(7),r=i(2),c=i(10),l=i(1),d=i(4);t.a={items:[],init(){this.configureClosePageConfirmation();r.a.on("beforeReload",()=>{this.saveSession()}).on("startReload",this.detach.bind(this)).on("keydown",e=>{if(Object(d.m)(e,81,["cmd","alt"])||Object(d.m)(e,81)&&!Object(d.l)()){const t=this.getLastActive(),i=a.a.getSelectedComment();if(t){e.preventDefault();t.quote(Object(d.i)(e),i)}else if(null!=i&&i.isActionable){e.preventDefault();i.reply()}}}).on("resize",this.adjustLabels.bind(this));a.a.on("selected",this.toggleQuoteButtonsHighlighting.bind(this,!0)).on("unselected",this.toggleQuoteButtonsHighlighting.bind(this,!1))},setupCommentForm(e,t,i,s){if(s){s.setTargets(e);e.addCommentFormToPage(t.mode,s)}else{s=new n.a(Object.assign({target:e,initialState:i},t));e.addCommentFormToPage(t.mode,s);s.setup(i);this.items.push(s);s.on("change",this.saveSession.bind(this)).on("unregister",()=>{this.remove(s)}).on("teardown",()=>{r.a.updatePageTitle();this.emit("teardown",s)});this.emit("add",s)}r.a.updatePageTitle();this.saveSession();mw.hook("convenientDiscussions.commentFormCreated").fire(s,o.a);return s},remove(e){Object(l.E)(this.items,e);this.saveSession(!0);this.emit("remove",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},query(e){return this.items.filter(e)},reset(){this.items.length=0},getLastActive(){return this.items.slice().sort(this.lastFocused)[0]||null},getLastActiveAltered(){return this.items.slice().sort(this.lastFocused).find(e=>e.isAltered())||null},lastFocused:(e,t)=>(t.lastFocused||new Date(0))-(e.lastFocused||new Date(0)),adjustLabels(){this.items.forEach(e=>{e.adjustLabels()})},detach(){this.items.forEach(e=>{e.$element.detach();e.checkCodeRequest=null})},actuallySaveSession(){new s.a("commentForms").setWithTime(mw.config.get("wgPageName"),this.items.filter(e=>e.isAltered()).map(e=>{var t,i,n,s,o,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===(s=e.subscribeCheckbox)||void 0===s?void 0:s.isSelected(),omitSignature:null===(o=e.omitSignatureCheckbox)||void 0===o?void 0:o.isSelected(),delete:null===(a=e.deleteCheckbox)||void 0===a?void 0:a.isSelected(),originalHeadline:e.getOriginalHeadline(),originalComment:e.getOriginalComment(),summaryAltered:e.isSummaryAltered(),omitSignatureCheckboxAltered:e.isOmitSignatureCheckboxAltered(),lastFocused:e.getLastFocused()}})).save()},saveSession(e){if(r.a.isCurrentRevision())if(e)this.actuallySaveSession();else{this.throttledSaveSession||(this.throttledSaveSession=OO.ui.throttle(this.actuallySaveSession.bind(this),500));this.throttledSaveSession()}},restoreSessionFromStorage(){var e;let t=!1;this.maybeShowRescueDialog(null===(e=new s.a("commentForms").cleanUp(e=>{var t;return!(null!==(t=e.commentForms)&&void 0!==t&&t.length)||(e.saveTime||e.saveUnixTime)<Date.now()-60*o.a.g.msInDay}).save().get(mw.config.get("wgPageName")))||void 0===e?void 0:e.commentForms.map(e=>{const i=this.getTargetByData(e.targetData);if(null!=i&&i.isActionable&&(!i.canBeReplied||i.canBeReplied())&&!i[n.a.getPropertyNameOnTarget(i,e.mode)])try{i[i.getCommentFormMethodName(e.mode)](e,void 0,e.preloadConfig,e.newTopicOnTop);t=!0}catch(t){console.warn(t);return e}else return e}).filter(l.h));if(t)mw.notification.notify(o.a.s("restore-restored-text"),{title:o.a.s("restore-restored-title")}).$notification.on("click",()=>{this.items[0].goTo()})},getTargetByData(e){if(null!=e&&e.headline){var t;return null===(t=c.a.search({headline:e.headline,oldestCommentId:e.oldestCommentId,index:e.index,id:e.id,ancestors:e.ancestors}))||void 0===t?void 0:t.section}else if(null!=e&&e.id)return a.a.getById(e.id);else return o.a.page},restoreSessionDirectly(){this.maybeShowRescueDialog(this.items.map(e=>e.restore()).filter(l.h))},maybeShowRescueDialog(e){if(null==e||!e.length)return;const t=e.map(e=>(void 0===e.headline?"":`${o.a.s("rd-headline")}: ${e.headline}\n\n`)+`${o.a.s("rd-comment")}: ${e.comment}\n\n${o.a.s("rd-summary")}: ${e.summary}`).join("\n\n----\n"),i=new OO.ui.MessageDialog;r.a.getWindowManager().addWindows([i]);r.a.getWindowManager().openWindow(i,{message:new OO.ui.FieldLayout(new OO.ui.MultilineTextInputWidget({value:t,rows:20}),{align:"top",label:o.a.s("rd-intro")}).$element,actions:[{label:o.a.s("rd-close"),action:"close"}],size:"large"})},restoreSession(e){if(e){this.reset();this.restoreSessionFromStorage()}else this.restoreSessionDirectly()},configureClosePageConfirmation(){r.a.addPreventUnloadCondition("commentForms",()=>{if(this.getLastActiveAltered())this.saveSession(!0);return mw.user.options.get("useeditwarning")&&(this.getLastActiveAltered()||(mw.user.options.get("editondblclick")||mw.user.options.get("editsectiononrightclick"))&&this.getCount())})},toggleQuoteButtonsHighlighting(e){this.items.forEach(t=>{t.highlightQuoteButton(e)})}}},function(e,t,i){"use strict";var n=i(12),s=i.n(n);class StorageItem{constructor(e){this.key=e;this.reload()}reload(){const e=mw.storage.getObject(`${this.constructor.prefix}-${this.key}`);if(!1===e)console.error("Storage is unavailable.");this.data=e||{};return this}removeItem(){mw.storage.remove(`${this.constructor.prefix}-${this.key}`);return this}get(e){return this.data[e]}getAll(){return this.data}set(e,t){this.data[e]=t;return this}remove(e){delete this.data[e];return this}save(){mw.storage.setObject(`${this.constructor.prefix}-${this.key}`,this.data);return this}cleanUp(e){Object.keys(this.data).forEach(t=>{if(e(this.data[t]))this.remove(t)});return this}setWithTime(e,t){const i=!(Array.isArray(t)?t.length:$.isPlainObject(t)?Object.keys(t).length:t);this.set(e,i?void 0:{[this.key]:t,saveTime:Date.now()});return this}}s()(StorageItem,"prefix","convenientDiscussions");t.a=StorageItem},function(e,t,i){"use strict";var n=i(3),s=i.n(n),o=i(13),a=i(29),r=i(0),c=i(7),l=i(2),d=i(10),u=i(5),h=i(28),m=i(14),p=i(22);t.a={init(e){mw.hook("wikipage.tableOfContents.vector").add(()=>{var e;null===(e=this.resolveUpdateTocSectionsPromise)||void 0===e||e.call(this)});this.canBeModified=u.a.get("modifyToc");p.a.on("process",()=>{if(c.a.query(e=>!1===e.isSeen||!e.date).length!==c.a.getCount())this.addNewComments(o.a.groupBySection(c.a.query(e=>!1===e.isSeen)),l.a.getBootProcess());this.addCommentCount()});e.on("process",this.markSubscriptions.bind(this));l.a.on("addedCommentsUpdate",({bySection:e})=>{this.addNewComments(e)}).on("reload",this.maybeHide.bind(this));h.a.on("sectionsUpdate",this.addNewSections.bind(this))},maybeHide(){if(!this.isInSidebar()&&this.isPresent())if("1"===mw.cookie.get("hidetoc"))this.$element.find(".toctogglecheckbox").prop("checked",!0)},setup(e,t){this.$element=this.isInSidebar()?$(".vector-toc"):l.a.$root.find(".toc");this.items=null;this.floating=null;this.visitsPromise=new Promise(e=>{p.a.once("process",e)});if(this.isInSidebar()&&e){mw.hook("wikipage.tableOfContents").fire(t?[]:e);this.updateTocSectionsPromise=new Promise(e=>{this.resolveUpdateTocSectionsPromise=e})}},getItem(e){if(!this.isPresent())return null;if(!this.items){const e=[...this.$element[0].querySelectorAll("li > a")].filter(e=>"#"!==e.getAttribute("href"));try{this.items=e.map(e=>new TocItem(e,this))}catch(e){console.error("Couldn't find an element of a table of contents item.",...e);this.items=[];this.canBeModified=!1}}return this.items.find(t=>t.id===e)||null},markSubscriptions(){var e=this;return s()((function*(){if(e.isPresent()){yield Promise.all([e.visitsPromise,e.updateTocSectionsPromise]);d.a.query(t=>t.subscriptionState||e.isInSidebar()).forEach(e=>{e.updateTocLink()})}}))()},addCommentCount(){var e=this;return s()((function*(){if(!e.isPresent())return;yield e.updateTocSectionsPromise;let t=!1;d.a.getAll().forEach(e=>{var i;const n=e.getTocItem();if(!n)return;const s=e.comments.length;if(!s)return;const o=document.createElement("span");o.className="cd-toc-commentCount-before";const a=document.createElement("span");a.className="cd-toc-commentCount";const c=document.createElement("bdi"),l=null===(i=e.newComments)||void 0===i?void 0:i.length;if(l)c.textContent=r.a.s(t?"toc-commentcount-new":"toc-commentcount-new-full",s,l);else c.textContent=t?s:r.a.s("toc-commentcount-full",s);a.appendChild(c);n.$text.append(o,a);t=!0});if(r.a.g.isDtVisualEnhancementsEnabled)e.$element.find(".ext-discussiontools-init-sidebar-meta").remove()}))()},handleSectionClick(e){e.preventDefault();l.a.reload({sectionId:e.currentTarget.getAttribute("href").slice(1),pushState:!0})},addToggleToSidebarToc(e,t,i){const n=document.createElement("button");n.className="cdx-button cdx-button--weight-quiet cdx-button--icon-only vector-toc-toggle";n.setAttribute("ariaExpanded","true");n.setAttribute("ariaControls",e.id);const s=document.createElement("span");s.className="vector-icon vector-icon--x-small mw-ui-icon-wikimedia-expand";n.appendChild(s);t.$element.append(n);n.click();if(i.includes(t.$element.attr("id")))n.click()},addSection(e,t,i,n){var s;let o=null===(s=e.match)||void 0===s?void 0:s.getTocItem();if(!o){const s=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()?"vector-toc-list-item vector-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="vector-toc-link cd-toc-link-sidebar";u.onclick=this.handleSectionClick.bind(this);let h;if(r)h=r.number;else if(c)h=c.number+".1";else h="1";const m=document.createElement("span"),p=this.isInSidebar()?"vector-toc-numb":"tocnumber";m.className=p+" cd-toc-hiddenTocNumber";m.textContent=h;u.appendChild(m);if(this.isInSidebar()){const e=document.createElement("div");e.className="vector-toc-text";e.appendChild(document.createTextNode(s));u.appendChild(e);l.appendChild(u)}else{const e=document.createElement("span");e.className="toctext";e.textContent=s;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="vector-toc-list";t.appendChild(l);if(this.isInSidebar()&&2===a&&!c.$element.find(".vector-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);o={headline:s,level:a,number:h,$element:$(l)}}t[e.tocLevel-1]=o;t.splice(e.tocLevel)},addNewSections(e){if(!this.canBeModified||!this.isPresent())return;if(!this.isInSidebar())l.a.saveRelativeScrollPosition(!0);const t=this.$element.find(".cd-toc-addedSection"),i=this.isInSidebar()?t.filter(".vector-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=[],s=this.$element.children("ul");e.forEach(e=>{this.addSection(e,n,s,i)});if(!this.isInSidebar())l.a.restoreRelativeScrollPosition(!0)},getTargetElementForSection(e,t){var i;let n,s;if(t){const t=e.getTocItem();if(t)s=n=t.$link}else{var o;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!==(o=n)&&void 0!==o&&o.length){s=n;const e=n.next(".cd-toc-newCommentList");if(e.length)s=e}}return(null===(i=s)||void 0===i?void 0:i[0])||null},handleCommentClick(e){e.preventDefault();const t=e.currentTarget.getAttribute("href").slice(1),i=c.a.getByAnyId(t);if(i)i.scrollTo({smooth:!1,pushState:!0});else l.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 s="";e.forEach((t,o)=>{const c=i?t.getParent():t.parent,l=null!=c&&c.author&&t.level>1?r.a.s("navpanel-newcomments-names",t.author.getName(),c.author.getName()):t.author.getName(),d=o<3||4===e.length;let h,p;if(t.date){p=Object(m.d)(t.date);h=d&&"default"!==u.a.get("timestampFormat")?Object(m.b)(t.date):p}else h=r.a.s("navpanel-newcomments-unknowndate");const g="rtl"===r.a.g.contentDirection?"\u200f":"",f="default"===u.a.get("timestampFormat")?h:"",b=l+g+r.a.mws("comma-separator")+f;if(d){const e=document.createElement("li");n.appendChild(e);const i=document.createElement("a");i.href="#"+(t.dtId||t.id);if(this.isInSidebar())i.className="vector-toc-link cd-toc-link-sidebar";i.onclick=this.handleCommentClick.bind(this);let s;if("default"!==u.a.get("timestampFormat")){s=document.createElement("span");s.textContent=h;s.title=p;new a.a(s,t.date,!1).init()}if(this.isInSidebar()){const t=document.createElement("div");t.className="vector-toc-text cd-toc-commentLinkText-sidebar";t.textContent=b;if(s)t.appendChild(s);i.appendChild(t);e.appendChild(i)}else{const t=document.createElement("span"),n=this.isInSidebar()?"vector-toc-numb":"tocnumber";t.className=n+" cd-toc-bullet";t.innerHTML=r.a.sParse("bullet");e.appendChild(t);const o=document.createElement("span");o.className="toctext";i.textContent=b;if(s)i.appendChild(s);o.appendChild(i);e.appendChild(o)}}else s+=b+(f?"":p)+"\n"});if(e.length>4){const t=document.createElement("span");t.className="cd-toc-more";t.title=s.trim();t.textContent=r.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,t){var i=this;return s()((function*(){var n;if(!i.canBeModified||!i.isPresent())return;yield i.updateTocSectionsPromise;i.$element.find(".cd-toc-addedCommentList").remove();const s=null===(n=e.values().next().value)||void 0===n?void 0:n[0];if(!s)return;const o=!$.isPlainObject(s);if(!i.isInSidebar())l.a.saveRelativeScrollPosition(!o||t.isFirstRun()||t.passedData.commentIds||t.passedData.sectionId);e.forEach((e,t)=>{if(t)i.addCommentList(e,i.getTargetElementForSection(t,o),o)});if(!i.isInSidebar())l.a.restoreRelativeScrollPosition(!0)}))()},isInSidebar:()=>"vector-2022"===r.a.g.skin,isFloating(){if(null===this.floating)this.floating=Boolean(!this.isInSidebar()&&this.$element.closest($(l.a.getFloatingElements())).length);return this.floating},isPresent(){return Boolean(this.$element.length)},getBottomOffset(){return this.$element.offset().top+this.$element.outerHeight()}};class TocItem{constructor(e,t){this.toc=t;this.canBeModified=this.toc.canBeModified;const i=e.querySelector(this.toc.isInSidebar()?".vector-toc-text":".toctext");if(!i)throw["Couldn't find text for a link",e];const n=i.textContent,s=e.getAttribute("href").slice(1),o=e.parentNode,a=Number(o.className.match(this.toc.isInSidebar()?/vector-toc-level-(\d+)/:/\btoclevel-(\d+)/)[1]),r=e.querySelector(this.toc.isInSidebar()?".vector-toc-numb":".tocnumber");let c;if(r)c=r.textContent;else{console.error(["Couldn't find a number for a link",e]);c="?"}Object.assign(this,{headline:n,id:s,level:a,number:c,$element:$(o),$link:$(e),$text:$(i)})}replaceText(e){if(!this.canBeModified)return;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()}updateSubscriptionState(e){if(this.canBeModified)if(e)this.$link.find(this.toc.isInSidebar()?".vector-toc-text":".toctext").append($("<span>").addClass("cd-toc-subscriptionIcon-before"),$("<span>").addClass("cd-toc-subscriptionIcon").attr("title",r.a.s("toc-watched")));else this.$link.removeAttr("title").find(".cd-toc-subscriptionIcon, .cd-toc-subscriptionIcon-before").remove()}}},function(e,t,i){"use strict";var n=i(3),s=i.n(n),o=i(6),a=i(32),r=i(23),c=i(0),l=i(17),d=i(7),u=i(2),h=i(10),m=i(8),p=i(1),g=i(14),f=i(11);class Page{constructor(e,t){if(!(e instanceof mw.Title))e=new mw.Title(e);this.mwTitle=e;this.name=t||e.getPrefixedText();this.title=e.getMainText();this.namespaceId=e.getNamespaceId();this.source=new PageSource(this);this.isActionable=this.isCurrent()?this.isCommentable():!1}isCurrent(){return this.name===c.a.g.pageName}isOwnTalkPage(){return 3===mw.config.get("wgNamespaceNumber")&&this.title===c.a.user.getName()}isCommentable(){if(!this.isCurrent())return null;else return u.a.isTalkPage()&&(this.isActive()||!this.exists())}exists(){if(!this.isCurrent())return null;else return Boolean(mw.config.get("wgArticleId"))}isActive(){if(!this.isCurrent())return null;else return u.a.isTalkPage()&&this.exists()&&u.a.isCurrentRevision()&&!this.isArchive()}isCurrentArchive(){return u.a.isCurrentRevision()&&this.isArchive()}getUrl(e){return mw.util.getUrl(this.name,e)}getDecodedUrlWithFragment(e,t){const i=decodeURI(this.getUrl({...t?{oldid:mw.config.get("wgRevisionId")}:{}}));return`${c.a.g.server}${i}#${e}`}findArchivingInfoElement(){var e;if(!this.isCurrent())return null;this.$archivingInfo||(this.$archivingInfo=null===(e=u.a.$root)||void 0===e?void 0:e.find(".cd-archivingInfo"));return this.$archivingInfo}isProbablyTalkPage(){return Object(p.x)(this.realName||this.name,this.namespaceId)}isArchive(){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;for(const i of this.constructor.getSourcePagesMap().keys())if(i.test(e)){t=!0;break}}return Boolean(t)}canHaveArchives(){var e;if(this.isArchive())return!1;let t=null===(e=this.findArchivingInfoElement())||void 0===e?void 0:e.data("canHaveArchives");if(null==t){var i;t=!(null!==(i=Object(p.A)(c.a.config.pagesWithoutArchives))&&void 0!==i&&i.test(this.realName||this.name))}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)for(const[e,n]of this.constructor.getArchivePagesMap().entries())if(e.test(i)){t=i.replace(e,n);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;for(const[i,n]of this.constructor.getSourcePagesMap().entries())if(i.test(e)){t=e.replace(i,n);break}}return t?b.get(String(t)):this}loadCode(e=!0){var t=this;return s()((function*(){var i,n,s,a,r,c;const{query:l,curtimestamp:d}=yield u.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(m.f),h=null==l?void 0:null===(i=l.pages)||void 0===i?void 0:i[0],p=null==h?void 0:null===(n=h.revisions)||void 0===n?void 0:n[0],g=null==p?void 0:null===(s=p.slots)||void 0===s?void 0:null===(a=s.main)||void 0===a?void 0:a.content;if(!l||!h)throw new o.a({type:"api",code:"noData"});if(h.missing){Object.assign(t,{code:"",revisionId:void 0,redirectTarget:void 0,realName:t.name,queryTimestamp:d});if(e)return;else throw new o.a({type:"api",code:"missing"})}if(h.invalid)throw new o.a({type:"api",code:"invalid"});if(!p||void 0===g)throw new o.a({type:"api",code:"noData"});const f=(null===(r=l.redirects)||void 0===r?void 0:null===(c=r[0])||void 0===c?void 0:c.to)||null;Object.assign(t,{code:g+"\n",revisionId:p.revid,redirectTarget:f,realName:f||t.name,queryTimestamp:d})}))()}parse(e,t=!1,i=!1){var n=this;return s()((function*(){const s={action:"parse",page:n.realName||n.name,disabletoc:"vector-2022"===c.a.g.skin,useskin:c.a.g.skin,redirects:!0,prop:["text","revid","modules","jsconfigvars","sections","subtitle","categorieshtml"],parsoid:c.a.g.isParsoidUsed,...c.a.g.apiErrorFormatHtml},a=Object.assign({},s,e);if(null!=e&&e.oldid)delete a.page;const{parse:r}=yield(t?Object(m.i)(a):u.a.getApi().post(a)).catch(m.f);if(void 0===(null==r?void 0:r.text))throw new o.a({type:"api",code:"noData"});if(i)n.markAsRead(r.revid);return r}))()}getRevisions(e={},t=!1){var i=this;return s()((function*(){var n,s,a;const r=Object.assign({},{action:"query",titles:i.name,rvslots:"main",prop:"revisions",redirects:!(i.isCurrent()&&mw.config.get("wgIsRedirect"))},e),c=null===(n=(yield(t?Object(m.i)(r):u.a.getApi().post(r)).catch(m.f)).query)||void 0===n?void 0:null===(s=n.pages)||void 0===s?void 0:null===(a=s[0])||void 0===a?void 0:a.revisions;if(!c)throw new o.a({type:"api",code:"noData"});return c}))()}edit(e){var t=this;return s()((function*(){const i=u.a.getApi().assertCurrentUser(Object.assign({},{action:"edit",title:t.realName||t.name,notminor:!e.minor,tags:c.a.user.isRegistered()&&c.a.config.tagName||void 0,...c.a.g.apiErrorFormatHtml},e));let n;try{n=yield u.a.getApi().postWithEditToken(i,{contentType:"multipart/form-data"}).catch(m.f)}catch(e){if(e instanceof o.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,s,a,r=!1;if(e){a=e.code;switch(a){case"editconflict":t=c.a.sParse("error-editconflict");break;case"missingtitle":t=c.a.sParse("error-pagedeleted");break;default:t=e.html;r=t.includes("<table")||t.includes("<div")}s=[a,i]}else s=i;throw new o.a({type:"api",code:"error",apiResp:n,details:{code:a,message:t,isRawMessage:r,logMessage:s}})}}else throw e}if("Success"!==n.edit.result){const e=n.edit.captcha?"captcha":void 0;throw new o.a({type:"api",code:"error",apiResp:n,details:{code:e,isRawMessage:!0,logMessage:[e,n]}})}return n.edit.newtimestamp||"nochange"}))()}guessNewTopicPlacement(){var e,t;if(void 0===this.code)throw new o.a("Can't analyze the new topics placement: Page#code is undefined.");let i=(null===(e=(t=c.a.config).areNewTopicsOnTop)||void 0===e?void 0:e.call(t,this.name,this.code))||null;const n=Object(f.i)(this.code),s=/^==[^=].*?==[ \t\x01\x02]*\n/gm;let a,r;if(!1!==i){var l;r=s.exec(n);a=null===(l=r)||void 0===l?void 0:l.index;s.lastIndex=0}if(null===i){let e,t=0;for(;r=s.exec(n);){const i=Object(f.f)(this.code.slice(r.index)),{date:n}=i&&Object(g.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:a})}purge(){var e=this;return s()((function*(){yield u.a.getApi().post({action:"purge",titles:e.name}).catch(()=>{mw.notify(c.a.s("error-purgecache"),{type:"warn"})})}))()}markAsRead(e){var t=this;return s()((function*(){yield u.a.getApi().postWithEditToken({action:"setnotificationtimestamp",titles:t.name,newerthanrevid:e})}))()}addAddTopicButton(){if($("#ca-addsection").length&&(!c.a.g.isDtNewTopicToolEnabled||this.exists()))this.$addSectionButtonContainer=$("<div>").addClass("cd-section-button-container cd-addTopicButton-container").append(new OO.ui.ButtonWidget({label:c.a.s("addtopic"),framed:!1,classes:["cd-button-ooui","cd-section-button"]}).on("click",()=>{this.addSection()}).$element).insertAfter(u.a.$root)}autoAddSection(e){const{searchParams:t}=new URL(location.href);if("new"===t.get("section")||Number(t.get("cdaddtopic"))||e)this.addSection(e)}addSection(e,t,i=a.a.getDefaultPreloadConfig(),n=!1){if(this.addSectionForm){if(!Object(p.b)(i,this.addSectionForm.getPreloadConfig())){mw.notify(c.a.s("cf-error-formconflict"),{type:"error"});return}this.addSectionForm.$element.cdScrollIntoView("center");(this.addSectionForm.headlineInput||this.addSectionForm.commentInput).focus()}else{var s;this.addSectionForm=l.a.setupCommentForm(this,{mode:"addSection",preloadConfig:i,newTopicOnTop:n},e,t);null===(s=this.$addSectionButtonContainer)||void 0===s||s.hide();if(!this.exists())u.a.$content.children(".noarticletext, .warningbox").hide();$("#ca-addsection").addClass("selected");$("#ca-view").removeClass("selected");this.addSectionForm.on("unregister",()=>{$("#ca-addsection").removeClass("selected");$("#ca-view").addClass("selected")})}}addCommentFormToPage(e,t){if(t.isNewTopicOnTop()&&h.a.getByIndex(0))h.a.getByIndex(0).$heading.before(t.$element);else u.a.$root.after(t.$element)}removeCommentFormFromPage(){var e;if(!this.exists())u.a.$content.removeClass("ext-discussiontools-init-replylink-open").children(".noarticletext, .warningbox").show();null===(e=this.$addSectionButtonContainer)||void 0===e||e.show()}getCommentFormMethodName(e){return e}getRelevantSection(){return null}getRelevantComment(){return null}getIdentifyingData(){return null}getCommentAboveReply(e){return e.isNewTopicOnTop()?null:d.a.getByIndex(-1)}findNewSelf(){return this}static initArchivePagesMaps(){this.archivePagesMap=new Map;this.sourcePagesMap=new Map;const e=(e,t,i)=>new RegExp(new r.a(e).mask(/\\[$\\]/g).withText(e=>{e=mw.util.escapeRegExp(e);if(t)e=e.replace(/\\\$/,"$").replace(/\$(\d+)/,(e,i)=>{const n=t[i-1];return n?`(${n.source})`:e});return e="^"+e+(i?".*":"")+"$"}).unmask().getText());c.a.config.archivePaths.forEach(t=>{if(t instanceof RegExp)this.sourcePagesMap.set(new RegExp(t.source+".*"),"");else{this.archivePagesMap.set(e(t.source,t.replacements),t.archive);this.sourcePagesMap.set(e(t.archive,t.replacements,!0),t.source)}})}static getArchivePagesMap(){if(!this.archivePagesMap)this.initArchivePagesMaps();return this.archivePagesMap}static getSourcePagesMap(){if(!this.sourcePagesMap)this.initArchivePagesMaps();return this.sourcePagesMap}}class PageSource{constructor(e){this.page=e}modifyContext({commentCode:e,commentForm:t}){const i=this.page.code;let n;if(t.isNewTopicOnTop()){const t=Object(f.i)(i).search(/^(=+).*\1[ \t\x01\x02]*$/m);n=(-1===t?i?i+"\n":"":i.slice(0,t))+e+"\n"+i.slice(t)}else n=(t.isNewSectionApi()?"":(i+"\n").trimLeft())+e;return{contextCode:n,commentCode:e}}}const b={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(c.a.g.pageName,!0)}};t.a=b},function(e,t,i){"use strict";i.r(t);i.d(t,"User",(function(){return User}));var n=i(3),s=i.n(n),o=i(12),a=i.n(o),r=i(18),c=i(0),l=i(2),d=i(8),u=i(1);class User{constructor(e,t={}){a()(this,"options",new mw.Map);this.name=e;this.muted=!1;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")}setRights(e){this.rights=e}getRights(){var e;return(null===(e=this.rights)||void 0===e?void 0:e.slice())||null}getNamespaceAlias(){var e;return c.a.config.genderNeutralUserNamespaceAlias||(null===(e=c.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.default={items:{},get(e){var t,i;if(e.includes("#"))e=e.slice(0,e.indexOf("#"));e=(mw.util.isIPv6Address(e)?e.toUpperCase():Object(u.J)(Object(u.I)(e))).trim();(t=this.items)[i=e]||(t[i]=new User(e,e===c.a.g.userName?{gender:mw.user.options.get("gender")}:{}));return this.items[e]},getCurrent(){return this.get(c.a.g.userName)},loadMuted(){const e=mw.user.options.get("echo-notifications-blacklist");if(!e||!c.a.g.useGlobalPreferences)return;const t=e.split("\n"),i=new r.a("mutedUsers"),n=i.getAll();if(!n.users||t.some(e=>!n.users[e])||(n.saveTime||n.saveUnixTime)<Date.now()-7*c.a.g.msInDay)this.getUsersByGlobalId(t).then(e=>{e.forEach(e=>{e.setMuted(!0)});i.set("mutedUsers",{users:Object.assign({},...e.map(e=>({[e.getGlobalId()]:e.getName()}),{})),saveTime:Date.now()}).save();mw.hook("convenientDiscussions.mutedUsers").fire(e)},e=>{console.error("Couldn't load the names of the muted users.",e)});else{const e=Object.entries(n.users).map(([,e])=>this.get(e));e.forEach(e=>e.setMuted(!0));mw.hook("convenientDiscussions.mutedUsers").fire(e)}},getUsersByGlobalId(e){var t=this;return s()((function*(){const i=e.map(e=>l.a.getApi().post({action:"query",meta:"globaluserinfo",guiid:e}).catch(d.f));return(yield Promise.all(i)).map(e=>{const i=e.query.globaluserinfo,n=t.get(i.name);n.setGlobalId(i.id);return n})}))()}}},function(e,t,i){"use strict";var n=i(3),s=i.n(n),o=i(39),a=i.n(o),r=i(6),c=i(0),l=i(7),d=i(5),u=i(8);t.a={load(e,t=!1){var i=this;return s()((function*(){var n;if(!c.a.user.isRegistered())return;try{i.unpack(yield Object(u.e)(t).then(({visits:e})=>e))}catch(e){console.warn("Convenient Discussions: Couldn't load the settings from the server.",e);return}const s=mw.config.get("wgArticleId");i.data||(i.data={});(n=i.data)[s]||(n[s]=[]);i.currentPageData=i.data[s];i.process(e.passedData.markAsRead)}))()},process(e){var t=this;return s()((function*(){const i=Math.floor(Date.now()/1e3);t.update(i,e);const n=t.currentPageData.length?l.a.initNewAndSeen(t.currentPageData,i):!1;t.currentPageData.push(String(i+60*n));t.save();t.emit("process",t.currentPageData);mw.hook("convenientDiscussions.newCommentsHighlighted").fire(c.a)}))()},update(e,t){for(let i=this.currentPageData.length-1;i>=0;i--)if(this.currentPageData[i]<e-60*d.a.get("highlightNewInterval")||!d.a.get("highlightNewInterval")||t){this.currentPageData.splice(0,i);break}},pack(){return a.a.compressToEncodedURIComponent(Object.keys(this.data).map(e=>`${e},${this.data[e].join(",")}\n`).join("").trim())},unpack(e){this.data={};if(!e)return;const t=a.a.decompressFromEncodedURIComponent(e),i=/^(\d+),(.+)$/gm;let n;for(;n=i.exec(t);)this.data[n[1]]=n[2].split(",")},save(){var e=this;return s()((function*(){let t=e.pack();if(t.length>20480){e.cleanUp((t.length-20480)/t.length+.05);t=e.pack()}try{yield Object(u.k)(c.a.g.visitsOptionName,t)}catch(t){if(t instanceof r.a){const{type:i,code:n}=t.data;if("internal"===i&&"sizeLimit"===n){e.cleanUp(.1);e.save()}else console.error(t)}else console.error(t)}}))()},cleanUp(e=.1){const t=Object.assign({},this.data),i=Object.keys(t).reduce((e,i)=>e.concat(t[i]),[]).sort((e,t)=>e-t),n=i[Math.floor(i.length*e)];Object.keys(t).forEach(e=>{t[e]=t[e].filter(e=>e>=n);if(!t[e].length)delete t[e]});this.data=t}}},function(e,t,i){"use strict";var n=i(11);t.a=class{constructor(e,t){this.text=e;this.maskedTexts=t||[]}mask(e,t,i=!1){if(t&&!t.match(/^\w+$/))console.warn("TextMasker.mask: the `type` argument should match `^\\w+$/`. Proceeding nevertheless.");this.text=this.text.replace(e,(e,n,s)=>{if(!i){n=null;s=null}return(n||"")+("table"===t?"\x03":"\x01")+this.maskedTexts.push(s||e)+(t?"_"+t:"")+("table"===t?"\x04":"\x02")});return this}unmaskText(e,t){const i=t?new RegExp(`(?:\\x01|\\x03)(\\d+)(?:_${t}(?:_\\d+)?)?(?:\\x02|\\x04)`,"g"):/(?:\x01|\x03)(\d+)(?:_\w+)?(?:\x02|\x04)/g;for(;i.test(e);)e=e.replace(i,(e,t)=>this.maskedTexts[t-1]);return e}unmask(e){this.text=this.unmaskText(this.text,e);return this}maskTemplatesRecursively(e,t=!1){let i=0;const n=[];for(;;){let s=this.text.indexOf("{{",i),o=this.text.indexOf("}}",i);if(-1!==s&&s<o){n.push(s);i=s+2}else{if(!n.length)break;s=n.pop();o+=2;let a=this.text.substring(s,o);if(e)a=e(a);const r=t?"_"+a.replace(/\x01\d+_template_(\d+)\x02/g,(e,t)=>" ".repeat(t)).length:"";this.text=this.text.substring(0,s)+"\x01"+this.maskedTexts.push(a)+"_template"+r+"\x02"+this.text.substr(o);i=o-a.length}}return this}maskTags(e,t){return this.mask(Object(n.g)(e,!1),t)}maskSensitiveCode(e){return this.maskTags(["pre","source","syntaxhighlight"],"block").maskTags(["gallery","poem"],"gallery").maskTags(["nowiki"],"inline").maskTemplatesRecursively(e).mask(/^(:* *)(\{\|[^]*?\n\|\})/gm,"table",!0).mask(/^(:* *)(\{\|[^]*\n\|)/gm,"table",!0)}withText(e){this.text=e(this.text,this);return this}getText(){return this.text}getMaskedTexts(){return this.maskedTexts}}},function(e,t,i){"use strict";var n=i(30);class ElementsTreeWalker extends n.a{constructor(e,t){super(t,null,!0);if(e)this.currentNode=e}}t.a=ElementsTreeWalker},function(e,t,i){"use strict";var n=i(3),s=i.n(n),o=i(41),a=i(50),r=i(44),c=i(13),l=i(47),d=i(45),cd=i(0),u=i(17),h=i(7),m=i(2),p=i(1);$.cdMerge=function(...e){return $($.map(e.filter(p.h),e=>e.get()))};var g={cdRemoveNonElementNodes:function(){return this.filter((function(){return this.tagName&&!Object(p.w)(this)}))},cdScrollTo(e="top",t=!0,i){let n=this.cdRemoveNonElementNodes();const s=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};let o=s(),a=s("backward");if(!o||!a){const e=n.first().closest(":visible");if(e.length&&!e.is(m.a.$root)){n=e;o=s();a=s("backward");mw.notify(cd.a.s("error-elementhidden-container"),{tag:"cd-elementhidden-container"})}else{mw.notify(cd.a.s("error-elementhidden"),{type:"error",tag:"cd-elementhidden"});return this}}const r=a.top+n.last().outerHeight();let c;if("center"===e)c=Math.min(o.top,o.top+.5*(r-o.top)-.5*$(window).height());else if("bottom"===e)c=r-$(window).height();else c=o.top-cd.a.g.bodyScrollPaddingTop;m.a.toggleAutoScrolling(!0);m.a.scrollToY(c,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,s=t.last().offset().top+t.last().height();if(0===n&&0===s)return!1;if(i)t.hide();const o=$(window).scrollTop(),a=o+cd.a.g.bodyScrollPaddingTop,r=o+$(window).height();return e?s>a&&n<r:n>=a&&s<=r},cdScrollIntoView(e="top",t=!0,i){if(this.cdIsInViewport())null==i||i();else if(i)Object(p.G)().then(()=>{this.cdScrollTo(e,t,i)});else this.cdScrollTo(e,t,i);return this},cdGetText(){let e;const t=document.createElement("div");[...this[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},cdRemoveCloseButton(){this.find(".cd-closeButton").remove();return this}},f=i(20),b=i(10),v=i(5),y=i(28),w=i(21),x=i(8),k=i(14),C=i(4),T=i(22);let S;function E(){const e=e=>o[e]?e:(e=>(r[e]||["en"]).find(e=>o[e]))(e),t=e(mw.config.get("wgContentLanguage")),i=e(mw.config.get("wgUserLanguage"));cd.a.g.contentDateFormat=o[t];cd.a.g.uiDateFormat=o[i];cd.a.g.contentDigits=mw.config.get("wgTranslateNumerals")?a[t]:null;cd.a.g.uiDigits=mw.config.get("wgTranslateNumerals")?a[i]:null}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];if(["xg","D","l","F","M"].includes(n))t.push(n);else if("\\"===n&&i<e.length-1)++i}return t}function N(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,s=n?`[${n}]`:"\\d";let o="";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":o+="x";break;case"xg":case"D":case"l":case"F":case"M":{const e=t?Object(p.n)(k.a[a]):k.a[a].map(mw.msg);o+="("+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)o+=i[++e];else o+="\\";break;case'"':if(e<i.length-1){const t=i.indexOf('"',e+1);if(-1===t)o+='"';else{o+=i.substr(e+1,t-e-1);e=t}}else o+='"';break;default:o+=mw.util.escapeRegExp(i[e])}if(!1!==n)o+="("+(s+"{"+n+"}")+")"}return o}function P(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(){E();const e=O(cd.a.g.contentDateFormat).map(e=>k.a[e]),t=["word-separator","comma-separator","colon-separator","timezone-utc"].concat(...e),i=O(cd.a.g.uiDateFormat).map(e=>k.a[e]),n=["parentheses","parentheses-start","parentheses-end","word-separator","comma-separator","colon-separator","nextdiff","timezone-utc","pagetitle"].concat(mw.loader.getState("ext.discussionTools.init")?["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","discussiontools-newtopicssubscription-button-subscribe-label","discussiontools-newtopicssubscription-button-subscribe-tooltip","discussiontools-newtopicssubscription-button-unsubscribe-label","discussiontools-newtopicssubscription-button-unsubscribe-tooltip","discussiontools-newtopicssubscription-notify-subscribed-title","discussiontools-newtopicssubscription-notify-subscribed-body","discussiontools-newtopicssubscription-notify-unsubscribed-title","discussiontools-newtopicssubscription-notify-unsubscribed-body"]:[]).concat(mw.loader.getState("ext.visualEditor.core")?["visualeditor-educationpopup-dismiss"]:[]).concat(...i),s=mw.config.get("wgContentLanguage")===mw.config.get("wgUserLanguage");if(s){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 o=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]});o(i)};a(cd.a.config.messages);const r=[];if(s){const e=t.concat(n).filter(p.K);for(const t of Object(x.m)(e)){const e=m.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(x.m)(e)){const e=m.a.getApi().getMessages(t,{amlang:mw.config.get("wgContentLanguage")}).then(o);r.push(e)}const i=m.a.getApi().loadMessagesIfMissing(n);r.push(i)}cd.a.g.specialPageAliases=Object.assign({},cd.a.config.specialPageAliases);Object.entries(cd.a.g.specialPageAliases).forEach(([e,t])=>{if("string"==typeof t)cd.a.g.specialPageAliases[e]=[t]});cd.a.g.contentTimezone=cd.a.config.timezone;const c=["Contributions","Diff","PermanentLink"];if(c.some(e=>{var t;return!(null!==(t=cd.a.g.specialPageAliases[e])&&void 0!==t&&t.length)})||!cd.a.g.contentTimezone){const e=m.a.getApi().get({action:"query",meta:"siteinfo",siprop:["specialpagealiases","general"]}).then(e=>{e.query.specialpagealiases.filter(e=>c.includes(e.realname)).forEach(e=>{cd.a.g.specialPageAliases[e.realname]=e.aliases.slice(0,e.aliases.indexOf(e.realname)+1)});cd.a.g.contentTimezone=e.query.general.timezone});r.push(e)}return r}());return this.siteDataRequests},memorizeCssValues(){cd.a.g.contentLineHeight=parseFloat(m.a.$content.css("line-height"));cd.a.g.contentFontSize=parseFloat(m.a.$content.css("font-size"));S=parseFloat($(document.documentElement).css("font-size"));cd.a.g.bodyScrollPaddingTop=parseFloat($("html, body").css("scroll-padding-top"))||0;if("timeless"===cd.a.g.skin)cd.a.g.bodyScrollPaddingTop-=5;if("vector-2022"===cd.a.g.skin)cd.a.g.bodyScrollPaddingTop-=1},addTalkPageCss(){const e=$("#content").css("background-color")||"rgba(0, 0, 0, 0)",t=Object(C.n)({timeless:"#mw-content-container","vector-2022":".mw-page-container",default:"body"}).css("background-color"),n=parseFloat((cd.a.g.contentFontSize/S).toFixed(7)),s=m.a.getContentColumnOffsets().startMargin,o=Object(C.o)(t),a="ltr"===cd.a.g.contentDirection?"left":"right",r="ltr"===cd.a.g.contentDirection?"right":"left",c="ltr"===cd.a.g.userDirection?"left":"right",l="ltr"===cd.a.g.userDirection?"right":"left",d="ltr"===cd.a.g.userDirection?"to left":"to right";mw.loader.addStyleTag(`:root {\n  --cd-comment-hovered-background-color: #f8f9fa;\n  --cd-comment-target-marker-color: #fc3;\n  --cd-comment-target-background-color: #fef6e7;\n  --cd-comment-target-hovered-background-color: #fef2db;\n  --cd-comment-new-marker-color: #00af89;\n  --cd-comment-new-background-color: #edffed;\n  --cd-comment-new-hovered-background-color: #e4ffe4;\n  --cd-comment-own-marker-color: #9f33cc;\n  --cd-comment-own-background-color: #faf3fc;\n  --cd-comment-own-hovered-background-color: #f7edfb;\n  --cd-comment-deleted-marker-color: #d33;\n  --cd-comment-deleted-background-color: #fee7e6;\n  --cd-comment-deleted-hovered-background-color: #fddbd9;\n  --cd-comment-fallback-side-margin: ${cd.a.g.commentFallbackSideMargin}px;\n  --cd-comment-marker-width: ${cd.a.g.commentMarkerWidth}px;\n  --cd-thread-line-side-padding: ${cd.a.g.threadLineSidePadding}px;\n  --cd-content-background-color: ${e};\n  --cd-content-start-margin: ${s}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: ${o};\n  --cd-direction-user: ${cd.a.g.userDirection};\n  --cd-direction-content: ${cd.a.g.contentDirection};\n  --cd-float-user-start: ${c};\n  --cd-float-user-end: ${l};\n  --cd-float-content-start: ${a};\n  --cd-float-content-end: ${r};\n  --cd-gradient-user-start: ${d};\n  --cd-pixel-deviation-ratio: ${cd.a.g.pixelDeviationRatio};\n  --cd-pixel-deviation-ratio-for-1px: ${cd.a.g.pixelDeviationRatioFor1px};\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(53);i(73);i(75);i(77);i(79);i(81);i(83);i(85);i(87);i(89)},globals(){if(!cd.a.page){cd.a.g.phpCharToUpper=mw.loader.moduleRegistry["mediawiki.Title"].script.files["phpCharToUpper.json"]||{};cd.a.page=f.a.getCurrent();cd.a.user=w.default.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&&cd.a.user.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.apiErrorFormatHtml={errorformat:"html",errorlang:cd.a.g.userLanguage,errorsuselocal:!0};cd.a.settings=v.a;cd.a.tests.processPageInBackground=y.b;cd.a.tests.showSettingsDialog=v.a.showDialog.bind(v.a);cd.a.tests.editSubscriptions=m.a.showEditSubscriptionsDialog.bind(m.a);cd.a.tests.visits=T.a;cd.a.api.getCommentById=h.a.getById.bind(h.a);cd.a.api.getCommentByDtId=h.a.getByDtId.bind(h.a);cd.a.api.getSectionById=b.a.getById.bind(b.a);cd.a.api.getSectionsByHeadline=b.a.getByHeadline.bind(b.a);cd.a.api.getLastActiveCommentForm=u.a.getLastActive.bind(u.a);cd.a.api.getLastActiveAlteredCommentForm=u.a.getLastActiveAltered.bind(u.a);cd.a.api.reloadPage=m.a.reload.bind(m.a);cd.a.api.getRootElement=m.a.getRootElement.bind(m.a)}},timestampParsingTools(e){var t,i;if("content"===e){const e=N("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(`^([^]*(?:^|[^=])(?:\\b| ))(${cd.a.g.contentTimestampRegexp.source})(?!["\xbb])`);cd.a.g.contentTimestampNoTzRegexp=new RegExp(e);cd.a.g.contentTimestampMatchingGroups=P(cd.a.g.contentDateFormat);cd.a.g.timezoneRegexp=new RegExp(t,"g")}else{cd.a.g.uiTimestampRegexp=new RegExp(N("user"));cd.a.g.parseTimestampUiRegexp=new RegExp(`^([^]*)(${cd.a.g.uiTimestampRegexp.source})`);cd.a.g.uiTimestampMatchingGroups=P(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=v.a.get("useUiTime")&&cd.a.g.contentTimezone!==cd.a.g.uiTimezone||"default"!==v.a.get("timestampFormat")||mw.config.get("wgContentLanguage")!==cd.a.g.userLanguage||v.a.get("hideTimezone")},talkPage(){var e=this;return s()((function*(){yield Promise.all(e.getSiteData());e.globals();yield v.a.init();e.timestampParsingTools("content");!function(){var e,t;const i=cd.a.config.signatureEndingRegexp;cd.a.g.signatureEndingRegexp=i?new RegExp(i.source+("$"===i.source.slice(-1)?"":"$"),i.flags):null;const n=mw.config.get("wgFormattedNamespaces"),s=mw.config.get("wgNamespaceIds"),o=e=>e.replace(/[ _]/g,"[ _]+").replace(/:/g,"[ _]*:[ _]*"),a=(...e)=>Object.keys(s).filter(t=>e.includes(s[t])).concat(e.map(e=>n[e])).map(o).join("|"),r=a(2,3);cd.a.g.userNamespacesRegexp=new RegExp(`(?:^|:)(?:${r}):(.+)`,"i");const c=a(2);cd.a.g.userLinkRegexp=new RegExp(`^:?(?:${c}):([^/]+)$`,"i");cd.a.g.userSubpageLinkRegexp=new RegExp(`^:?(?:${c}):.+?/`,"i");const l=a(3);cd.a.g.userTalkLinkRegexp=new RegExp(`^:?(?:${l}):([^/]+)$`,"i");cd.a.g.userTalkSubpageLinkRegexp=new RegExp(`^:?(?:${l}):.+?/`,"i");cd.a.g.contribsPages=cd.a.g.specialPageAliases.Contributions.map(e=>`${n[-1]}:${e}`);const d=cd.a.g.contribsPages.join("|");cd.a.g.contribsPageLinkRegexp=new RegExp(`^(?:${d})/`);const u=o(d);cd.a.g.captureUserNamePattern=`\\[\\[[ _]*:?(?:\\w*:){0,2}(?:(?:${r})[ _]*:[ _]*|(?:Special[ _]*:[ _]*Contributions|${u})\\/[ _]*)([^|\\]/]+)(/)?`;cd.a.g.isThumbRegexp=new RegExp(["thumb","thumbnail"].concat(cd.a.config.thumbAliases).map(e=>`\\| *${e} *[|\\]]`).join("|"));if(cd.a.config.unsignedTemplates.length){const e=cd.a.config.unsignedTemplates.map(p.l).join("|");cd.a.g.unsignedTemplatesPattern=`(\\{\\{ *(?:${e}) *\\| *([^}|]+?) *(?:\\| *([^}]+?) *)?\\}\\})`}const h=cd.a.config.clearTemplates.length?cd.a.config.clearTemplates.map(p.l).join("|"):void 0;cd.a.g.keepInSectionEnding=cd.a.config.keepInSectionEnding.slice().concat(h?new RegExp(`\\n+\\{\\{ *(?:${h}) *\\}\\}\\s*$`):[]);cd.a.g.userSignature=v.a.get("signaturePrefix")+cd.a.g.signCode;const m=mw.user.options.get("nickname"),g=m.match(new RegExp(cd.a.g.captureUserNamePattern,"i"));if(g)cd.a.g.userSignaturePrefixRegexp=new RegExp((" "===v.a.get("signaturePrefix")?"":mw.util.escapeRegExp(v.a.get("signaturePrefix")))+mw.util.escapeRegExp(m.slice(0,g.index))+"$");const f=cd.a.g.popularInlineElements.join("|");cd.a.g.piePattern=`(?:${f})`;const b=cd.a.g.popularNotInlineElements.join("|");cd.a.g.pniePattern=`(?:${b})`;cd.a.g.articlePathRegexp=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 y=e=>"\\{\\{ *"+o(mw.util.escapeRegExp(e)),w=["<blockquote","<q"].concat((null===(e=cd.a.config.pairQuoteTemplates)||void 0===e?void 0:e[0].map(y))||[]).join("|"),x=["</blockquote>","</q>"].concat((null===(t=cd.a.config.pairQuoteTemplates)||void 0===t?void 0:t[1].map(y))||[]).join("|");cd.a.g.quoteRegexp=new RegExp(`(${w})([^]*?)(${x})`,"ig");cd.a.g.noSignatureClasses.push(...cd.a.config.noSignatureClasses);cd.a.g.noHighlightClasses.push(...cd.a.config.noHighlightClasses);const k=a(6);cd.a.g.filePrefixPattern=`(?:${k}):`;const C=a(6,14);cd.a.g.colonNamespacesPrefixRegexp=new RegExp(`^:(?:${C}):`,"i");cd.a.g.badCommentBeginnings=cd.a.g.badCommentBeginnings.concat(new RegExp(`^\\[\\[${cd.a.g.filePrefixPattern}.+\\n+(?=[*:#])`,"i")).concat(cd.a.config.badCommentBeginnings).concat(h?new RegExp(`^\\{\\{ *(?:${h}) *\\}\\} *\\n+`,"i"):[]);cd.a.g.pipeTrickRegexp=/(\[\[:?(?:[^|[\]<>\n:]+:)?([^|[\]<>\n]+)\|)(\]\])/g;cd.a.g.isProbablyWmfSulWiki="//meta.wikimedia.org"===$('link[rel="dns-prefetch"]').attr("href")||["mediawiki.org","wikibooks.org","wikidata.org","wikifunctions.org","wikimedia.org","wikinews.org","wikipedia.org","wikiquote.org","wikisource.org","wikiversity.org","wikivoyage.org","wiktionary.org"].includes(mw.config.get("wgServerName").split(".").slice(-2).join("."))}();!function(){c.a.initPrototypes();l.a.initPrototypes();d.a.initPrototypes()}();if(v.a.get("useBackgroundHighlighting"))i(91);$.fn.extend(g);Object(k.f)();cd.a.commentForms=u.a.getAll()}))()}}},function(e,t,i){"use strict";var n,s=function(){if(void 0===n)n=Boolean(window&&document&&document.all&&!window.atob);return n},o=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=[],s=0;s<e.length;s++){var o=e[s],c=t.base?o[0]+t.base:o[0],l=i[c]||0,d="".concat(c," ").concat(l);i[c]=l+1;var u=r(d),h={css:o[1],media:o[2],sourceMap:o[3]};if(-1!==u){a[u].references++;a[u].updater(h)}else a.push({identifier:d,updater:f(h,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 s=1?i.nc:void 0;if(s)n.nonce=s}Object.keys(n).forEach((function(e){t.setAttribute(e,n[e])}));if("function"==typeof e.insert)e.insert(t);else{var a=o(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 h(e,t,i,n){var s=i?"":n.media?"@media ".concat(n.media," {").concat(n.css,"}"):n.css;if(e.styleSheet)e.styleSheet.cssText=u(t,s);else{var o=document.createTextNode(s),a=e.childNodes;if(a[t])e.removeChild(a[t]);if(a.length)e.insertBefore(o,a[t]);else e.appendChild(o)}}function m(e,t,i){var n=i.css,s=i.media,o=i.sourceMap;if(s)e.setAttribute("media",s);else e.removeAttribute("media");if(o&&"undefined"!=typeof btoa)n+="\n/*# sourceMappingURL=data:application/json;base64,".concat(btoa(unescape(encodeURIComponent(JSON.stringify(o))))," */");if(e.styleSheet)e.styleSheet.cssText=n;else{for(;e.firstChild;)e.removeChild(e.firstChild);e.appendChild(document.createTextNode(n))}}var p=null,g=0;function f(e,t){var i,n,s;if(t.singleton){var o=g++;i=p||(p=l(t));n=h.bind(null,i,o,!1);s=h.bind(null,i,o,!0)}else{i=l(t);n=m.bind(null,i,t);s=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 s()}}e.exports=function(e,t){if(!(t=t||{}).singleton&&"boolean"!=typeof t.singleton)t.singleton=s();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 s=r(i[n]);a[s].references--}for(var o=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=o}}}},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 s=(a=n,r=btoa(unescape(encodeURIComponent(JSON.stringify(a)))),c="sourceMappingURL=data:application/json;charset=utf-8;base64,".concat(r),"/*# ".concat(c," */")),o=n.sources.map((function(e){return"/*# sourceURL=".concat(n.sourceRoot||"").concat(e," */")}));return[i].concat(o).concat([s]).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 s={};if(n)for(var o=0;o<this.length;o++){var a=this[o][0];if(null!=a)s[a]=!0}for(var r=0;r<e.length;r++){var c=[].concat(e[r]);if(!n||!s[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";i.d(t,"b",(function(){return E}));var n=i(3),s=i.n(n),o=i(6),a=i(18),r=i(0),c=i(17),l=i(7),d=i(2),u=i(10),h=i(5),m=i(21),p=i(8),g=i(1),f=i(22);const b={},v={};let y,w,x,k=0;function C(e){if(!Number.isNaN(Number(e)))d.a.getWorker().postMessage({type:"setAlarm",interval:e})}function T(){d.a.getWorker().postMessage({type:"removeAlarm"})}function S(e){return new Promise(t=>{const i=k++;Object.assign(e,{resolverId:i});d.a.getWorker().postMessage(e);v[i]=t})}function E(e){return O.apply(this,arguments)}function O(){return(O=s()((function*(e){var t,i;if(b[e])return b[e];const{text:n,revid:s}=(yield r.a.page.parse({oldid:e},!0))||{},o=yield S({type:"parse",revisionId:s,text:n,g:Object(g.z)(r.a.g,["isIPv6Address"]),config:Object(g.z)(r.a.config,["rejectNode"])});null!==(i=b[t=o.revisionId])&&void 0!==i||(b[t]=o);Object.keys(b).forEach(e=>{const t=Number(e);if(t!==o.revisionId&&t!==x&&t!==w&&t!==mw.config.get("wgRevisionId"))delete b[e]});return o}))).apply(this,arguments)}function N(){return(N=s()((function*(e,t){var i;w=null===(i=(yield r.a.page.getRevisions({rvprop:["ids"],rvstart:new Date(1e3*e).toISOString(),rvlimit:1},!0))[0])||void 0===i?void 0:i.revid;const n=mw.config.get("wgRevisionId");if(w&&w<n){const{comments:e}=yield E(w),{comments:i}=yield E(n);if(F(n)){I(i,e);M(i,t)}}}))).apply(this,arguments)}function P(e){u.a.getAll().forEach(e=>{delete e.match;delete e.matchScore});e.forEach(e=>{delete e.match});e.forEach(e=>{const{section:t,score:i}=u.a.search(e)||{};if(t&&(!t.match||i>t.matchScore)){if(t.match)delete t.match.match;t.match=e;t.matchScore=i;e.match=t}});u.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=x;delete e.presumedCode;delete e.revisionId;delete e.queryTimestamp})}function L(e,t,i){return e.map(e=>{var n,s,o,a,r;const c=(null===(n=e.parent)||void 0===n?void 0:n.id)===(null===(s=t.parent)||void 0===s?void 0:s.id),l=(null===(o=e.section)||void 0===o?void 0:o.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),h=1===u?1:Object(g.d)(e.text,t.text);return{comment:e,score:c*(null!==(r=e.parent)&&void 0!==r&&r.id?1:.75)+1*l+u+h+.25*d}}).filter(e=>e.score>1.66).sort((e,t)=>t.score-e.score)}function I(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()),s=e.length===t.length;if(1===n.length)n[0].match=n[0].match?L([n[0].match,i],n[0],s)[0].comment:i;else if(n.length>1){let e;L(n,i,s).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 D(){return j.apply(this,arguments)}function j(){return(j=s()((function*(){if(!r.a.page.isActive()||d.a.isBooting())return;const e=document.hidden;if(!e||y){try{const e=yield r.a.page.getRevisions({rvprop:["ids"],rvlimit:1},!0),t=mw.config.get("wgRevisionId");if(e.length&&e[0].revid>(x||t)){const{revisionId:e,comments:i,sections:n}=yield E();if(F(t)){const{comments:s}=yield E(t);x=e;W.emit("check",x);if(F(t)){P(n);I(s,i);W.emit("sectionsUpdate",n);_(s);yield B(i,s,t)}}}}catch(e){if(!(e instanceof o.a)||e.data&&"network"!==e.data.type)console.warn(e)}if(e){C(1e3*r.a.g.backgroundUpdateCheckInterval);y=!0}else C(1e3*r.a.g.updateCheckInterval)}else{$(document).one("visibilitychange",()=>{y=!1;T();D()});C(1e3*Math.abs(r.a.g.backgroundUpdateCheckInterval-r.a.g.updateCheckInterval));y=!0}}))).apply(this,arguments)}function A(e,t){return t.textHtmlToCompare!==e.textHtmlToCompare||t.headingHtmlToCompare&&t.headingHtmlToCompare!==e.headingHtmlToCompare}function M(e,t){const i=new a.a("seenRenderedChanges").cleanUp(e=>(Math.min(...Object.values(e).map(e=>e.seenTime||e.seenUnixTime))||0)<Date.now()-60*r.a.g.msInDay),n=i.get(mw.config.get("wgArticleId")),s=[];e.forEach(e=>{if(e.id===t)return;const i=e.match;if(i){var o;const t=null==n?void 0:null===(o=n[e.id])||void 0===o?void 0:o.htmlToCompare;if(A(i,e)&&t!==e.htmlToCompare){const t=l.a.getById(e.id);if(!t)return;const n={old:i,current:e,0:i,1:e};t.markAsChanged("changedSince",!0,w,n);if(t.isOpeningSection){var a;null===(a=t.section)||void 0===a||a.resubscribeIfRenamed(e,i)}s.push({comment:t,commentsData:n})}}});if(s.length)mw.hook("convenientDiscussions.changesSincePreviousVisit").fire(s);i.remove(mw.config.get("wgArticleId")).save()}function _(e){const t=[];e.forEach(e=>{const i=e.match;let n;const s={},o={current:e,new:i,0:e,1:i};if(i){n=l.a.getById(e.id);if(!n)return;if(n.isDeleted){n.unmarkAsChanged("deleted");s.undeleted=!0}if(A(e,i)){if(!n.htmlToCompare||n.htmlToCompare!==i.htmlToCompare){const t=n.update(e,i);n.htmlToCompare=i.htmlToCompare;n.markAsChanged("changed",t,x,o);s.changed={updateSuccess:t}}}else if(n.isChanged){n.update(e,i);n.unmarkAsChanged("changed");s.unchanged=!0}}else if(!e.hasPoorMatch){n=l.a.getById(e.id);if(!n||n.isDeleted)return;n.markAsChanged("deleted");s.deleted=!0}if(Object.keys(s).length)t.push({comment:n,events:s,commentsData:o})});if(t.length){W.emit("newChanges",t);mw.hook("convenientDiscussions.newChanges").fire(t)}}function F(e){return e===mw.config.get("wgRevisionId")&&!d.a.isBooting()&&!c.a.getAll().some(e=>e.isBeingSubmitted())}function B(e,t,i){return H.apply(this,arguments)}function H(){return(H=s()((function*(e,t,i){e.forEach(e=>{var t;e.author=m.default.get(e.authorName);if(null!==(t=e.parent)&&void 0!==t&&t.authorName)e.parent.author=m.default.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=l.a.getById(n.id)}return i}),s=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(r.a.g.genderAffectsUserString)yield Object(p.g)(n.map(e=>e.author),!0);if(F(i))W.emit("commentsUpdate",n,s)}))).apply(this,arguments)}function R(e){return U.apply(this,arguments)}function U(){return(U=s()((function*(e){const t=e.data;if("wakeUp"===t.type)D();else{const e=t.resolverId;delete t.resolverId;delete t.type;v[e](t);delete v[e]}}))).apply(this,arguments)}const W={init(){f.a.on("process",e=>{var t;const i=d.a.getBootProcess();this.setup(e.length>=1?Number(e[e.length-1]):void 0,i.passedData.wasCommentFormSubmitted&&(null===(t=i.passedData.commentIds)||void 0===t?void 0:t[0])||void 0)})},setup:(e,t)=>s()((function*(){y=!1;w=null;const i=d.a.getWorker();if(i.onmessage)T();else i.onmessage=R;C(1e3*r.a.g.updateCheckInterval);if(e)!function(e,t){N.apply(this,arguments)}(e,t)}))()};t.a=W},function(e,t,i){"use strict";var n=i(12),s=i.n(n),o=i(34),a=i.n(o),r=i(0),c=i(5),l=i(1),d=i(14);class LiveTimestamp{constructor(e,t,i){this.element=e;this.date=t;this.addTimezone=i;this.format=c.a.get("timestampFormat");this.useUiTime=c.a.get("useUiTime")}init(){if("improved"===this.format){if(!this.constructor.improvedTimestampsInited)this.constructor.initImproved();if(this.date.getTime()>this.constructor.yesterdayStart)this.constructor.improvedTimestamps.push(this)}else if("relative"===this.format)this.setUpdateTimeout()}setUpdateTimeout(e=!1){if(e)this.update();const t=Date.now()-this.date.getTime(),i=d.h.find(e=>t<e.interval*r.a.g.msInMin);if(i){const e=Math.floor(t/r.a.g.msInMin/i.step);for(let n=(i.start+e*i.step)*r.a.g.msInMin;n<=i.interval*r.a.g.msInMin;n+=i.step*r.a.g.msInMin)if(t<n){Object(l.E)(this.constructor.updateTimeouts,this.updateTimeout);this.updateTimeout=setTimeout(()=>{this.setUpdateTimeout(!0)},n-t);this.constructor.updateTimeouts.push(this.updateTimeout);break}}}update(){this.element.textContent=Object(d.b)(this.date,this.addTimezone)}static initImproved(){let e=a()();if(this.useUiTime&&!["UTC",0].includes(r.a.g.uiTimezone))e="number"==typeof r.a.g.uiTimezone?e.utcOffset(r.a.g.uiTimezone):e.tz(r.a.g.uiTimezone);else e=e.utc();e=e.startOf("day");this.yesterdayStart=e.subtract(1,"day").valueOf();const t=e.add(1,"day").valueOf(),i=e.add(2,"day").valueOf(),n=t-Date.now(),s=setTimeout(this.updateImproved.bind(this),n),o=i-Date.now(),c=setTimeout(this.updateImproved.bind(this),o);this.updateTimeouts.push(s,c);this.improvedTimestampsInited=!0}static updateImproved(){this.improvedTimestamps.forEach(e=>{e.update()});this.emit("updateimproved")}static reset(){this.updateTimeouts.forEach(clearTimeout);this.updateTimeouts=[];this.improvedTimestampsInited=!1;this.improvedTimestamps=[]}}s()(LiveTimestamp,"updateTimeouts",[]);s()(LiveTimestamp,"improvedTimestampsInited",!1);s()(LiveTimestamp,"improvedTimestamps",[]);t.a=LiveTimestamp},function(e,t,i){"use strict";t.a=class{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;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)return null;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}}},function(e,t,i){"use strict";var n=i(43),s=i(42),o=i(24),a=i(0),r=i(1),c=i(14);t.a=class{constructor(e){this.context=e;this.existingCommentIds=[]}init(){this.rejectClasses=["cd-comment-part","mw-pt-languages","mw-archivedtalk","ombox",...a.a.config.closedDiscussionClasses,a.a.config.outdentClass];const e=["blockquote","q","cite","figure"].join(", "),t=a.a.g.noSignatureClasses.map(e=>"."+e).join(", ");this.noSignatureElements=[...this.context.rootElement.querySelectorAll(`${e}, ${t}`)]}createComment(e,t){return new this.context.CommentClass(this,e,t)}createSection(e,t,i){return new this.context.SectionClass(this,e,t,i)}processAndRemoveDtMarkup(e){const t=[...this.context.rootElement.getElementsByTagName("span")].filter(e=>e.hasAttribute("data-mw-comment-start")||e.hasAttribute("data-mw-comment-end")||"SPAN"===e.tagName&&e.hasAttribute("data-mw-thread-id")&&!e.classList.length&&!e.textContent).concat([...this.context.rootElement.getElementsByClassName("ext-discussiontools-init-replylink-buttons")]).filter(r.K);this.context.processAndRemoveDtElements(t,e);this.context.removeDtButtonHtmlComments();this.replaceTimestampLinksWithSpans()}replaceTimestampLinksWithSpans(){[...this.context.rootElement.getElementsByClassName("ext-discussiontools-init-timestamplink")].forEach(e=>{e.parentNode.insertBefore(document.createTextNode(e.textContent),e);e.remove()})}handleFactotumOutdents(e,t){var i;if(!/^\u250c\u2500*\u2518$/.test(e)||t.parentNode.classList.contains(a.a.config.outdentClass)||t.parentNode.parentNode.classList.contains(a.a.config.outdentClass))return;const n=document.createElement("span");n.className=a.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()}findTimestamp(e){const t=e.textContent;this.handleFactotumOutdents(t,e);const{date:i,match:n}=Object(c.g)(t)||{};if(!i||this.noSignatureElements.some(t=>t.contains(e)))return null;const s=document.createElement("span");s.classList.add("cd-timestamp");s.appendChild(document.createTextNode(n[2]));const o=e.textContent.slice(n.index+n[0].length),a=o?document.createTextNode(o):void 0;e.textContent=n[1];e.parentNode.insertBefore(s,e.nextSibling);if(a)e.parentNode.insertBefore(a,s.nextSibling);return{element:s,date:i}}convertTimestampToSignature(e){let t,i=e.element;for(;!t&&(i=i.parentNode)&&Object(r.v)(i);)if(i.classList.contains(a.a.config.unsignedClass))t=i;let n=!1;const c=new o.a(e.element,this.context.rootElement);for(;c.previousNode()&&(Object(r.v)(c.currentNode)||Object(r.w)(c.currentNode));)if(c.currentNode.classList.contains("cd-signature")){n=!0;break}const l=t||e.element,d=new s.a(l,this.context.rootElement),u={};let h,m=0,p=[];if(t)h=l;else{p.push(l);d.previousSibling()}let g=d.currentNode;do{m+=g.textContent.length;if(g.tagName){u.isLastLinkAuthorLink=!1;if("A"===g.tagName){if(!this.constructor.processLinkData(g,u))break}else{const e=[...g.getElementsByTagName("a")].reverse();for(const t of e)if(!t.classList.contains("external"))this.constructor.processLinkData(t,u)}if(u.isLastLinkAuthorLink)h=g}p.push(g);g=d.previousSibling();if(!g&&!h){g=d.parentNode();if(!g||!Object(r.v)(g))break;m=0;p=[]}}while(g&&Object(r.v)(g,!0)&&m<a.a.config.signatureScanLimit&&!(u.name&&(g.tagName&&["S","STRIKE","DEL"].includes(g.tagName)||!g.tagName&&this.constructor.punctuationRegexp.test(g.textContent))||g.tagName&&(g.classList.contains("cd-timestamp")||["S","STRIKE","DEL"].includes(g.tagName)&&m>=30)));if(!u.name)return null;if(!p.length)p=[l];const f=p.indexOf(h);p.splice(-1===f?1:f+1);const b=p[0].parentNode,v=p[0].nextSibling,y=document.createElement("span");y.classList.add("cd-signature");p.reverse().forEach(y.appendChild.bind(y));b.insertBefore(y,v);return{element:y,timestampElement:e.element,timestampText:e.element.textContent,date:e.date,authorLink:u.link,authorTalkLink:u.talkLink,authorName:u.name,isUnsigned:Boolean(t),isExtraSignature:n}}findUnsigneds(){if(!a.a.config.unsignedClass)return[];const e=[];[...this.context.rootElement.getElementsByClassName(a.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:s}=this.constructor.processLink(i)||{};if(n){let o,a;if("user"===s)o=i;else if("userTalk"===s)a=i;t.classList.add("cd-signature");const r=!0;e.push({element:t,authorName:n,isUnsigned:r,authorLink:o,authorTalkLink:a});return!0}})});return e}findSignatures(){const e=this.context.getAllTextNodes().map(this.findTimestamp.bind(this)).filter(r.i).map(this.convertTimestampToSignature.bind(this)).filter(r.i).concat(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,s=[e],o=0;do{n=s;s=n.reduce((e,t)=>e.concat([...t[this.context.childElementsProp]]),[]);if(["DL","UL","OL"].includes(n[0].tagName))o++}while(s.length&&s.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(r.v)(e))&&s.map(e=>e.textContent).join("").replace(/\s+/g,"")===i);return{nodes:n,levelsPassed:o}}findHeadings(){return[...this.context.rootElement.querySelectorAll("h1, h2, h3, h4, h5, h6")].map(e=>{for(let t=e;t&&t!==this.context.rootElement;t=t.parentNode)if(t.classList.contains("mw-heading"))return t;return e}).filter(e=>"mw-toc-heading"!==e.getAttribute("id")&&!this.noSignatureElements.some(t=>t.contains(e))).map(e=>({type:"heading",isWrapper:!Object(r.u)(e,!0),level:Object(r.q)(e),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,s=null;if(t){const{pageName:e,hostname:o,fragment:c}=Object(r.B)(t)||{};if(!e||n.a.isAnyId(c))return null;const l=e.match(a.a.g.userNamespacesRegexp);if(l){i=l[1];if(a.a.g.userLinkRegexp.test(e))s="user";else if(a.a.g.userTalkLinkRegexp.test(e))s="userTalk";else if(a.a.g.userSubpageLinkRegexp.test(e))s="userSubpage";else if(a.a.g.userTalkSubpageLinkRegexp.test(e))s="userTalkSubpage"}else if(a.a.g.contribsPageLinkRegexp.test(e)){i=e.replace(a.a.g.contribsPageLinkRegexp,"");if(a.a.g.isIPv6Address(i))i=i.toUpperCase();s="contribs"}if(o!==a.a.g.serverName)s+="Foreign";i&&(i=Object(r.I)(Object(r.J)(i.replace(/\/.*/,""))).trim())}else if(e.classList.contains("mw-selflink")&&3===a.a.g.namespaceNumber&&!a.a.g.pageName.includes("/"))i=a.a.g.pageTitle;else return null;return{userName:i,linkType:s}}static processLinkData(e,t){const{userName:i,linkType:n}=this.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}getNestingLevel(e){const t=new o.a(e,this.context.rootElement);let i=0;for(;t.parentNode();)i++;return i}static init(){this.punctuationRegexp=new RegExp(`(?:^|[${a.a.g.letterPattern}])[)\\]]*(?:[.!?\u2026\u0964\u0589\u104b\u06d4]+ |[\u3002\uff01\uff1f]+)`)}}},function(e,t,i){"use strict";var n=i(3),s=i.n(n),o=i(12),a=i.n(o),r=i(33),c=i(16),l=i(6),d=i(13),u=i(40),h=i(1);class CommentFormOperation{constructor(e,t,i){this.registry=e;this.commentForm=e.commentForm;this.type=t;this.options=i}open(e){this.date=new Date;this.closed=!1;this.delayed=!1;if("preview"!==this.type||!this.options.isAuto){if(e&&!this.commentForm.captchaInput)this.commentForm.$messageArea.empty();this.commentForm.pushPending(["load","submit"].includes(this.type),this.options.affectsHeadline)}}close(){if(!this.closed){if("preview"!==this.type||!this.options.isAuto)this.commentForm.popPending(["load","submit"].includes(this.type),this.options.affectsHeadline);this.registry.remove(this);this.closed=!0}}delay(){this.delayed=!0}undelay(){this.delayed=!1}maybeClose(){if(this.closed)return!0;const e=this.registry.filter(e=>["preview","viewChanges"].includes(e.getType())&&!e.isDelayed()).slice(-1)[0];if(e&&e.getDate()>this.date){this.close();return!0}return!1}getType(){return this.type}getOption(e){return this.options[e]}getDate(){return this.date}isClosed(){return this.closed}isDelayed(){return this.delayed}}var m=class{constructor(e){this.commentForm=e;this.items=[]}add(e,t={},i=!0){const n=new CommentFormOperation(this,e,t);this.items.push(n);n.open(i);return n}remove(e){Object(h.E)(this.items,e)}closeAll(){this.items.slice().forEach(e=>e.close())}filterByType(e){return this.items.filter(t=>t.getType()===e)}areThere(e){return Boolean(this.filterByType(e).length)}filter(e){return this.items.filter(e)}},p=i(31),g=i(23),cd=i(0),f=i(17),b=i(7),v=i(2),y=i(38),w=i(20),x=i(10),k=i(5),C=i(21),T=i(8),S=i(9),E=i(11),O=i(4);class CommentForm_CommentForm{constructor({mode:e,target:t,initialState:i,preloadConfig:n,newTopicOnTop:s}){var o,a;OO.mixinClass(CommentForm_CommentForm,OO.EventEmitter);OO.EventEmitter.call(this);this.watchOnReply=k.a.get("watchOnReply");this.subscribeOnReply=k.a.get("subscribeOnReply");this.useTopicSubscription=k.a.get("useTopicSubscription");this.autopreview=k.a.get("autopreview");this.alwaysExpandAdvanced=k.a.get("alwaysExpandAdvanced");this.showToolbar=k.a.get("showToolbar");this.insertButtons=k.a.get("insertButtons");this.improvePerformance=k.a.get("improvePerformance");this.manyFormsOnboarded=k.a.get("manyForms-onboarded");this.uploadOnboarded=k.a.get("upload-onboarded");this.uploadToCommons=convenientDiscussions.g.isProbablyWmfSulWiki;this.mode=e;this.setTargets(t);this.preloadConfig=n;this.newTopicOnTop=s;this.index=this.constructor.counter++;this.registered=!0;this.torndown=!1;this.summaryAltered=null!==(o=null==i?void 0:i.summaryAltered)&&void 0!==o?o:!1;this.omitSignatureCheckboxAltered=null!==(a=null==i?void 0:i.omitSignatureCheckboxAltered)&&void 0!==a?a:!1;this.sectionOpeningCommentEdited="edit"===this.mode&&this.target.isOpeningSection;this.newSectionApi=null;this.sectionSubmitted=null;this.operations=new m(this);this.lastKeyPresses=[];if("addSection"===this.mode)this.addEditNotices();const r=cd.a.config.customCommentFormModules.filter(e=>!e.checkFunc||e.checkFunc()).map(e=>e.name);mw.loader.using(r).then(()=>{mw.hook("convenientDiscussions.commentFormCustomModulesReady").fire(this,cd.a)});this.createContents(i,r);this.addEventListeners();this.initAutocomplete()}setup(e){var t,i;this.adjustLabels();if(!(cd.a.user.isRegistered()||null!==(t=(i=mw.user).isTemp)&&void 0!==t&&t.call(i)))this.showMessage(cd.a.sParse("error-anoneditwatning"),{type:"warning",name:"anonEditWarning"});if(e){this.originalComment=e.originalComment||"";this.originalHeadline=e.originalHeadline||"";if(e.lastFocused)this.lastFocused=new Date(e.lastFocused);if(e.outdentNotice)this.showMessage(Object(O.q)(cd.a.sParse("cf-notice-outdent",new mw.Title(cd.a.config.outdentTemplates[0],10).toString()),{targetBlank:!0}),{type:"notice",name:"outdent"})}else if("edit"===this.mode)this.loadComment();else{var n;if(null!==(n=this.preloadConfig)&&void 0!==n&&n.commentTemplate)this.preloadTemplate();else this.originalComment="";if(this.headlineInput){var s,o;this.headlineInput.setValue((null===(s=this.preloadConfig)||void 0===s?void 0:s.headline)||"");this.originalHeadline=(null===(o=this.preloadConfig)||void 0===o?void 0:o.headline)||""}}if("addSection"!==this.mode&&"edit"!==this.mode)this.checkCode();if(!e||e.focus)this.$element.cdScrollIntoView("center",!0,()=>{if("edit"!==this.mode)(this.headlineInput||this.commentInput).focus()});this.onboardOntoMultipleForms();this.onboardOntoUpload()}setTargets(e){this.target=e;this.targetSection=this.target.getRelevantSection();this.parentComment=["reply","replyInSection"].includes(this.mode)?this.target.getRelevantComment():null;this.targetPage=this.targetSection?this.targetSection.getSourcePage():cd.a.page}getTabIndex(e){return String(this.index)+String(e)}createTextInputs(e){var t,n,s;if(["addSection","addSubsection"].includes(this.mode)&&(null===(t=this.preloadConfig)||void 0===t||!t.noHeadline)||this.sectionOpeningCommentEdited){var o,a;const t=null===(o=this.targetSection)||void 0===o?void 0:o.getParent();this.headlineInputPlaceholder="addSubsection"===this.mode?cd.a.s("cf-headline-subsection",this.targetSection.headline):"edit"===this.mode&&t?cd.a.s("cf-headline-subsection",t.headline):cd.a.s("cf-headline-topic");this.headlineInput=new(i(37).default)({value:null!==(a=null==e?void 0:e.headline)&&void 0!==a?a:"",placeholder:this.headlineInputPlaceholder,classes:["cd-commentForm-headlineInput"],tabIndex:this.getTabIndex(11)})}let r;if("replyInSection"===this.mode||"reply"===this.mode&&this.target.isOpeningSection)r=cd.a.s("cf-comment-placeholder-replytosection",this.targetSection.headline);else if("reply"===this.mode)this.target.maybeRequestAuthorGender(()=>{this.commentInput.$input.attr("placeholder",Object(h.D)(cd.a.s("cf-comment-placeholder-replytocomment",this.target.author.getName(),this.target.author)))},!0);else if("addSection"===this.mode||"addSubsection"===this.mode)r=cd.a.s("cf-comment-placeholder");this.commentInput=new(i(49).default)({value:null!==(n=null==e?void 0:e.comment)&&void 0!==n?n:"",placeholder:r,rows:this.headlineInput?5:3,autosize:!0,maxRows:9999,classes:["cd-commentForm-commentInput"],tabIndex:this.getTabIndex(12)});this.commentInput.$input.addClass("ime-position-inside");this.summaryInput=new(i(37).default)({value:null!==(s=null==e?void 0:e.summary)&&void 0!==s?s:"",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){var t;if(cd.a.user.isRegistered()){var i,n;if("edit"===this.mode){var s;({field:this.minorField,input:this.minorCheckbox}=Object(S.createCheckboxField)({value:"minor",selected:null!==(s=null==e?void 0:e.minor)&&void 0!==s?s:!0,label:cd.a.s("cf-minor"),tabIndex:this.getTabIndex(20)}))}({field:this.watchField,input:this.watchCheckbox}=Object(S.createCheckboxField)({value:"watch",selected:null!==(i=null==e?void 0:e.watch)&&void 0!==i?i:this.watchOnReply&&"edit"!==this.mode||$('.mw-watchlink a[href*="action=unwatch"]').length||mw.user.options.get(cd.a.page.exists()?"watchdefault":"watchcreations"),label:cd.a.s("cf-watch"),tabIndex:this.getTabIndex(21)}));const t=this.useTopicSubscription?null===(n=this.targetSection)||void 0===n?void 0:n.getBase(!0):this.targetSection;if((null!=t&&t.subscribeId||"addSection"===this.mode)&&(!v.a.isSubscribingDisabled()||null!=t&&t.subscriptionState)){var o;({field:this.subscribeField,input:this.subscribeCheckbox}=Object(S.createCheckboxField)({value:"subscribe",selected:null!==(o=null==e?void 0:e.subscribe)&&void 0!==o?o:this.subscribeOnReply&&"edit"!==this.mode||(null==t?void 0:t.subscriptionState),label:this.useTopicSubscription||"addSection"===this.mode||"addSubsection"!==this.mode&&this.targetSection&&this.targetSection.level<=2?cd.a.s("cf-watchsection-topic"):cd.a.s("cf-watchsection-subsection"),tabIndex:this.getTabIndex(22),title:cd.a.s("cf-watchsection-tooltip")}))}}({field:this.omitSignatureField,input:this.omitSignatureCheckbox}=Object(S.createCheckboxField)({value:"omitSignature",selected:null!==(t=null==e?void 0:e.omitSignature)&&void 0!==t?t:!1,label:cd.a.s("cf-omitsignature"),title:cd.a.s("cf-omitsignature-tooltip"),tabIndex:this.getTabIndex(25)}));if(!["addSection","addSubsection"].includes(this.mode))this.omitSignatureField.toggle(!1);if("edit"===this.mode&&(this.target.isOpeningSection?1===this.targetSection.comments.length:!this.target.getChildren().length)){var a;({field:this.deleteField,input:this.deleteCheckbox}=Object(S.createCheckboxField)({value:"delete",selected:null!==(a=null==e?void 0:e.delete)&&void 0!==a?a:!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(h.h)})}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(O.q)(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,classes:["cd-helpPopup"]},$overlay:v.a.getPopupOverlay(),tabIndex:this.getTabIndex(31)});if(cd.a.user.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.viewChangesButton.on("toggle",this.adjustLabels.bind(this));this.previewButton=new OO.ui.ButtonWidget({label:cd.a.s("cf-preview"),classes:["cd-commentForm-previewButton"],tabIndex:this.getTabIndex(35)});if(this.autopreview)this.previewButton.toggle(!1);this.previewButton.on("toggle",this.adjustLabels.bind(this));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("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,"ol"===this.containerListType?"cd-commentForm-inNumberedList":void 0,this.sectionOpeningCommentEdited?"cd-commentForm-sectionOpeningComment":void 0,"addSubsection"===this.mode?"cd-commentForm-addSubsection-"+this.target.level:void 0].filter(h.h));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&&!this.alwaysExpandAdvanced)this.$advanced.hide();this.$previewArea=$("<div>").addClass("cd-commentForm-previewArea mw-body-content");if(this.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("&nbsp;").addClass("cd-commentForm-dummyElement").prependTo(this.$element)}addToolbar(e){var t=this;return s()((function*(){if(!t.showToolbar||!mw.loader.getState("ext.wikiEditor"))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,s=mw.loader.moduleRegistry["ext.wikiEditor"],o=s.packageExports["jquery.wikiEditor.toolbar.config.js"];n.wikiEditor("addModule",o);const a=s.packageExports["jquery.wikiEditor.dialogs.config.js"];a.replaceIcons(n);const r=a.getDefaultConfig();if(t.uploadToCommons){const e=t;r.dialogs["insert-file"].dialog.buttons["wikieditor-toolbar-tool-file-upload"]=function(){$(this).dialog("close");e.uploadImage(void 0,!0)}}n.wikiEditor("addModule",r);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();const c=mw.config.get("wgScriptPath"),l=cd.a.g.userLanguage;n.wikiEditor("addToToolbar",{section:"main",group:"format",tools:{smaller:{label:cd.a.mws("wikieditor-toolbar-tool-small"),type:"button",icon:`${c}/load.php?modules=oojs-ui.styles.icons-editing-styling&image=smaller&lang=${l}&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")}${cd.a.g.cmdModifier}+Alt+Q`)}`,type:"button",icon:`${c}/load.php?modules=oojs-ui.styles.icons-editing-advanced&image=quotes&lang=${l}&skin=vector`,action:{type:"callback",execute:()=>{t.quote(!0,b.a.getSelectedComment())}}},mention:{label:cd.a.s("cf-mention-tooltip",cd.a.g.cmdModifier),type:"button",icon:`${c}/load.php?modules=oojs-ui.styles.icons-user&image=userAvatar&lang=${l}&skin=vector`,action:{type:"callback",execute:()=>{}}}}});t.$element.find('.tool-button[rel="mention"]').off("click").on("click",e=>{t.mention(Object(O.i)(e))});n.wikiEditor("addToToolbar",{section:"advanced",group:"format",tools:{code:{label:`${cd.a.s("cf-code-tooltip")} ${cd.a.mws("parentheses",cd.a.g.cmdModifier+"+Shift+6")}`,type:"button",icon:`${c}/load.php?modules=oojs-ui.styles.icons-editing-advanced&image=code&lang=${l}&skin=vector`,action:{type:"encapsulate",options:t.constructor.encapsulateOptions.code}},codeBlock:{label:cd.a.s("cf-codeblock-tooltip"),type:"button",icon:`${c}/load.php?modules=oojs-ui.styles.icons-editing-advanced&image=markup&lang=${l}&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")} ${cd.a.mws("parentheses",cd.a.g.cmdModifier+"+U")}`,type:"button",icon:`${c}/load.php?modules=oojs-ui.styles.icons-editing-styling&image=underline&lang=${l}&skin=vector`,action:{type:"encapsulate",options:t.constructor.encapsulateOptions.underline}},strikethrough:{label:`${cd.a.s("cf-strikethrough-tooltip")} ${cd.a.mws("parentheses",cd.a.g.cmdModifier+"+Shift+5")}`,type:"button",icon:`${c}/load.php?modules=oojs-ui.styles.icons-editing-styling&image=strikethrough&lang=${l}&skin=vector`,action:{type:"encapsulate",options:t.constructor.encapsulateOptions.strikethrough}}}});t.$element.find('.tool[rel="bold"] a').attr("title",`${mw.msg("wikieditor-toolbar-tool-bold")} ${cd.a.mws("parentheses",cd.a.g.cmdModifier+"+B")}`);t.$element.find('.tool[rel="italic"] a').attr("title",`${mw.msg("wikieditor-toolbar-tool-italic")} ${cd.a.mws("parentheses",cd.a.g.cmdModifier+"+I")}`);t.$element.find('.tool[rel="link"] a').attr("title",`${mw.msg("wikieditor-toolbar-tool-link")} ${cd.a.mws("parentheses",cd.a.g.cmdModifier+"+K")}`);t.$element.find('.tool[rel="ulist"] a').attr("title",`${mw.msg("wikieditor-toolbar-tool-ulist")} ${cd.a.mws("parentheses",cd.a.g.cmdModifier+"+Shift+8")}`);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)}});n.data("wikiEditor-context").instance=5;$.wikiEditor.instances=Array(5);mw.hook("convenientDiscussions.commentFormToolbarReady").fire(t,cd.a)}))()}addInsertButton(e,t){const i=new g.a(e).mask(/\\[+;\\]/g);let[,n,s]=i.getText().match(/^(.*?)(?:\+(.*))?$/)||[];if(!n)return;n=n.replace(/\\n/g,"\n");s||(s="");s=s.replace(/\\n/g,"\n");const o=e=>e.replace(/\\([+;\\])/g,"$1");n=o(i.unmaskText(n));s=o(i.unmaskText(s));t=t?o(t):n+s;this.$insertButtons.append(new c.a({label:t,classes:["cd-insertButtons-button"],action:()=>{this.encapsulateSelection({pre:n,post:s})}}).element," ")}addInsertButtons(){if(this.insertButtons.length){this.$insertButtons=$("<div>").addClass("cd-insertButtons").insertAfter(this.commentInput.$element);this.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 s()((function*(){const t=e.operations.add("load");try{yield e.target.loadCode(e);let i=e.target.source.toInput();if(e.target.source.inSmallFont)i=`<small>${i}</small>`;const n=e.target.source.headlineCode;e.commentInput.setValue(i);e.originalComment=i;if(e.headlineInput){e.headlineInput.setValue(n);e.originalHeadline=n}t.close();e.commentInput.focus();e.preview()}catch(i){if(i instanceof l.a)e.handleError(Object.assign({},i.data,{cancel:!0,operation:t}));else e.handleError({type:"javascript",logMessage:i,cancel:!0,operation:t})}}))()}checkCode(){if(!this.checkCodeRequest)this.checkCodeRequest=this.target.loadCode(this).catch(e=>{this.$messageArea.empty();this.checkCodeRequest=null;if(e instanceof l.a)this.handleError(Object.assign({},e.data));else this.handleError({type:"javascript",logMessage:e})});return this.checkCodeRequest}addEditNotices(){var e=this;return s()((function*(){let t;try{var i;const n=cd.a.page.title.replace(/\//g,"-");t=yield Object(T.h)((null!==(i=e.preloadConfig)&&void 0!==i&&i.editIntro?`<div class="cd-editintro">{{${e.preloadConfig.editIntro}}}</div>\n`:"")+`<div class="cd-editnotice">{{MediaWiki:Editnotice-${cd.a.g.namespaceNumber}}}</div>`+`<div class="cd-editnotice">{{MediaWiki:Editnotice-${cd.a.g.namespaceNumber}-${n}}}</div>`,{title:cd.a.page.name})}catch(e){return}const n=$(t.html.replace(/<div class="cd-editnotice"><\/div>/g,"")).find(".mw-parser-output");if(!n.children().length&&!n.text())return;const s=mw.config.get("wgFormattedNamespaces")[8];e.$messageArea.append(n).cdAddCloseButton().find(`.cd-editnotice > a.new[title^="${s}:Editnotice-"]`).parent().remove();e.$messageArea.find(".mw-charinsert-item").each((t,i)=>{const n=$(i);n.on("click",()=>{e.encapsulateSelection({pre:n.data("mw-charinsert-start"),post:n.data("mw-charinsert-end")})}).data("mw-charinsert-done",!0)});mw.hook("wikipage.content").fire(e.$messageArea)}))()}preloadTemplate(){var e=this;return s()((function*(){const t=e.operations.add("load",{affectsHeadline:!1}),i=w.a.get(e.preloadConfig.commentTemplate);try{yield i.loadCode();let s=i.code;const o=Object(E.g)(["onlyinclude"]);let a,r;for(;a=o.exec(s);){var n;null!==(n=r)&&void 0!==n||(r="");r+=a[3]}if(void 0!==r)s=r;s=s.replace(Object(E.g)(["includeonly"]),"$3").replace(Object(E.g)(["noinclude"]),"").replace(/\$(\d+)/g,(t,i)=>{var n;return null!==(n=e.preloadConfig.params[i-1])&&void 0!==n?n:t});s=s.trim();if(s.includes(cd.a.g.signCode)||e.preloadConfig.omitSignature){e.omitSignatureCheckbox.setSelected(!0);e.omitSignatureCheckboxAltered=!0}e.commentInput.setValue(s);e.originalComment=s;t.close();(e.headlineInput||e.commentInput).focus();e.preview()}catch(i){if(i instanceof l.a)e.handleError(Object.assign({},i.data,{cancel:!0,operation:t}));else e.handleError({type:"javascript",logMessage:i,cancel:!0,operation:t})}}))()}haveSuggestedToImprovePerformanceRecently(){return Object(h.o)()-k.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(O.q)(cd.a.sParse("warning-performance"),{callbacks:{"cd-notification-talkPageSettings":()=>{k.a.showDialog("talkPage")}}});mw.notify(e,{title:cd.a.s("warning-performance-title"),type:"warn",autoHideSeconds:"long"});k.a.saveSettingOnTheFly("improvePerformance-lastSuggested",Object(h.o)())}}}getCommentInputDummyFloatableContainer(){const e=this.commentInput.$input[0],t=window.getComputedStyle(e),i=$("<span>"),n=$("<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);i.css({top:i[0].offsetTop,left:i[0].offsetLeft,width:0,height:parseFloat(i.css("line-height"))-3}).addClass("cd-dummyFloatableContainer");n.remove();return i}teardownInputPopups(){var e,t,i,n;null===(e=this.richFormattingPopup)||void 0===e||e.toggle(!1).$element.remove();null===(t=this.$commentInputPopupFloatableContainer)||void 0===t||t.remove();null===(i=this.manyFormsPopup)||void 0===i||i.$element.remove();null===(n=this.uploadPopup)||void 0===n||n.$element.remove()}suggestConvertToWikitext(e,t){var i=this;return s()((function*(){yield Object(h.G)();const n=new OO.ui.ButtonWidget({label:cd.a.s("cf-popup-richformatting-convert"),flags:["progressive"]}),o=i.commentInput.getRange().to;n.on("click",s()((function*(){const n=yield i.commentInput.getWikitextFromPaste(e,v.a.rootElement);i.commentInput.selectRange(o-t.length,o).cdInsertContent(n);i.teardownInputPopups()})));i.teardownInputPopups();const a=i.showToolbar?i.$element.find(".wikiEditor-ui-text"):i.commentInput.$element;i.$commentInputPopupFloatableContainer=i.getCommentInputDummyFloatableContainer();a.append(i.$commentInputPopupFloatableContainer);i.richFormattingPopup=new OO.ui.PopupWidget({icon:"wikiText",label:Object(O.q)(cd.a.sParse("cf-popup-richformatting")),$content:n.$element,head:!0,autoClose:!0,$autoCloseIgnore:i.commentInput.$input,hideCloseButton:!0,$floatableContainer:i.$commentInputPopupFloatableContainer,$container:a,containerPadding:-10,padded:!0,classes:["cd-popup-richFormatting"]});a.append(i.richFormattingPopup.$element);i.richFormattingPopup.toggle(!0)}))()}uploadImage(e,t){var n=this;return s()((function*(){if(n.uploadDialog||n.commentInput.isPending()||!n.uploadToCommons)return;n.pushPending();try{yield mw.loader.using(["mediawiki.Upload.Dialog","mediawiki.ForeignStructuredUpload.BookletLayout","mediawiki.widgets"])}catch(e){mw.notify(cd.a.s("cf-error-uploadimage"),{type:"error"});n.popPending();return}n.uploadDialog=new(i(67).default);const s=v.a.getWindowManager();s.addWindows([n.uploadDialog]);const o=s.openWindow(n.uploadDialog,{file:e,commentForm:n});o.closed.then(()=>{delete n.uploadDialog});n.uploadDialog.uploadBooklet.on("fileSaved",e=>{n.uploadDialog.close();o.closed.then(()=>{if(t){$.wikiEditor.modules.dialogs.api.openDialog(n,"insert-file");$("#wikieditor-toolbar-file-target").val(e.canonicaltitle)}else if(n.commentInput.getRange().from===n.commentInput.getRange().to){const t=new mw.Title(e.canonicaltitle).getPrefixedText();n.preview(!0);n.encapsulateSelection({pre:`[[${t}|frameless|none]]`})}else n.encapsulateSelection({pre:`[${e.url} `,post:"]"})})})}))()}handlePasteDrop(e){const t=e.originalEvent.clipboardData||e.originalEvent.dataTransfer,i=t.getData("text/plain"),n=[...t.items].find(e=>this.constructor.allowedFileTypes.includes(e.type));if(n){e.preventDefault();this.uploadImage(n.getAsFile())}else if(t.types.includes("text/html")||i&&Object(E.h)(i)){var s;const e=t.getData("text/html")||i;if(!Object(O.k)(e,this.commentInput.$element[0]))return;this.suggestConvertToWikitext(e,null===(s=t.getData("text/plain"))||void 0===s?void 0:s.replace(/\r/g,""))}}addEventListenersToTextInputs(e,t){const i=["subst:"].concat(cd.a.config.substAliases).join("|"),n=[{regexp: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())}},{regexp:/<pre[ >]/,message:cd.a.sParse("cf-reaction-pre","<code><nowiki><pre></".concat("nowiki></code>"),'<code><nowiki><syntaxhighlight lang="wikitext"></'.concat("nowiki></code>")),name:"dontUsePre",type:"warning"},{regexp:new RegExp(`\\{\\{(?! *(${i}))`,"i"),message:cd.a.sParse("cf-reaction-templateinheadline"),type:"warning",name:"templateInHeadline",target:"headline",checkFunc:()=>{var e;return!(null!==(e=this.preloadConfig)&&void 0!==e&&e.headline)}}].concat(cd.a.config.textReactions);if(this.headlineInput){this.headlineInput.on("change",e=>{this.updateAutoSummary(!0,!0);n.filter(({target:e})=>"headline"===e||"all"===e).forEach(t=>{this.reactToText(e,t)})}).on("change",t).on("change",e);this.headlineInput.on("enter",this.submit.bind(this))}this.commentInput.on("change",e=>{if(this.richFormattingPopup)this.teardownInputPopups();this.updateAutoSummary(!0,!0);n.filter(({target:e})=>!e||"comment"===e||"all"===e).forEach(t=>{this.reactToText(e,t)})}).on("change",t).on("change",e);this.commentInput.$input.on("dragover",e=>{if([...e.originalEvent.dataTransfer.items].some(e=>this.constructor.allowedFileTypes.includes(e.type))){this.commentInput.$element.addClass("cd-input-acceptFile");e.preventDefault()}}).on("dragleave dragend drop blur",()=>{this.commentInput.$element.removeClass("cd-input-acceptFile")}).on("paste drop",this.handlePasteDrop.bind(this)).on("tribute-replaced",e=>{if(e.originalEvent.detail.instance.trigger===cd.a.config.mentionCharacter){var t;if("edit"===this.mode)this.showMessage(Object(O.q)(cd.a.sParse("cf-reaction-mention-edit"),{targetBlank:!0}),{type:"notice",name:"mentionEdit"});if(null!==(t=this.omitSignatureCheckbox)&&void 0!==t&&t.isSelected()&&!this.commentInput.getValue().includes(cd.a.g.signCode))this.showMessage(Object(O.q)(cd.a.sParse("cf-reaction-mention-nosignature"),{targetBlank:!0}),{type:"notice",name:"mentionNoSignature"})}});if(v.a.isLongPage()&&"webkit"===cd.a.g.clientProfile.layout&&!this.improvePerformance&&!this.haveSuggestedToImprovePerformanceRecently()){var s;const e=10,t=50,i=i=>{this.checkForPerformanceIssues(i,e,t)};this.commentInput.$input.on("input",i);null===(s=this.headlineInput)||void 0===s||s.$input.on("input",i)}this.summaryInput.on("manualChange",()=>{this.summaryAltered=!0;this.summaryAutopreviewBlocked=!1}).on("change",()=>{if(!this.summaryAutopreviewBlocked)t()}).on("change",e);this.summaryInput.on("enter",this.submit.bind(this))}addEventListenersToCheckboxes(e,t){var i,n,s,o,a;null===(i=this.minorCheckbox)||void 0===i||i.on("change",e);null===(n=this.watchCheckbox)||void 0===n||n.on("change",e);null===(s=this.subscribeCheckbox)||void 0===s||s.on("change",e);null===(o=this.omitSignatureCheckbox)||void 0===o||o.on("change",t).on("manualChange",()=>{this.omitSignatureCheckboxAltered=!0}).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",()=>{k.a.showDialog()});this.cancelButton.on("click",()=>{this.cancel()});this.viewChangesButton.on("click",()=>{this.viewChanges()});this.previewButton.on("click",()=>{this.preview(!1)});this.submitButton.on("click",()=>{this.submit()})}addEventListeners(){const e=()=>{this.emit("change")},t=()=>{this.preview()};this.$element.on("keydown",e=>{if(Object(O.m)(e,13,["cmd"]))this.submit();if(Object(O.m)(e,27))this.cancel();if(Object(O.m)(e,66,["cmd"])){this.encapsulateSelection({pre:"'''",peri:mw.msg("wikieditor-toolbar-tool-bold-example"),post:"'''"});e.preventDefault()}if(Object(O.m)(e,73,["cmd"])){this.encapsulateSelection({pre:"''",peri:mw.msg("wikieditor-toolbar-tool-italic-example"),post:"''"});e.preventDefault()}if(Object(O.m)(e,85,["cmd"])){this.encapsulateSelection(this.constructor.encapsulateOptions.underline);e.preventDefault()}if(Object(O.m)(e,75,["cmd"])){var t;null===(t=this.commentInput.$element.find('.tool[rel="link"] a')[0])||void 0===t||t.click();e.preventDefault()}if(Object(O.m)(e,53,["cmd","shift"])){this.encapsulateSelection(this.constructor.encapsulateOptions.strikethrough);e.preventDefault()}if(Object(O.m)(e,54,["cmd","shift"])){this.encapsulateSelection(this.constructor.encapsulateOptions.code);e.preventDefault()}if(Object(O.m)(e,56,["cmd","shift"])){var i;null===(i=this.commentInput.$element.find('.tool[rel="ulist"] a')[0])||void 0===i||i.click();e.preventDefault()}}).on("focusin",()=>{this.lastFocused=new Date;v.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=b.a.query(e=>!e.section);if("edit"===this.mode)t=t.filter(e=>e!==this.target);if(3===cd.a.g.namespaceNumber){const t=(cd.a.page.title.match(/^([^/]+)/)||[])[0];if(t)e=C.default.get(t)}let i=t.map(e=>e.author).concat(e).filter(h.h).sort((e,t)=>t.isRegistered()-e.isRegistered()||(t.name>e.name?-1:1)).filter(e=>e!==cd.a.user).map(e=>e.name);if(this.parentComment)for(let e=this.parentComment;e;e=e.getParent())if(e.author!==cd.a.user){if(!e.author.isRegistered())break;i.unshift(e.author.getName());break}i=i.filter(h.K);this.autocomplete=new r.a({types:["mentions","wikilinks","templates","tags","commentLinks"],inputs:[this.commentInput],comments:t,defaultUserNames:i});this.autocomplete.init();if(this.headlineInput){this.headlineAutocomplete=new r.a({types:["mentions","wikilinks","tags"],inputs:[this.headlineInput],comments:t,defaultUserNames:i});this.headlineAutocomplete.init()}this.summaryAutocomplete=new r.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(/^.+?\*\/ */);this.summaryInput.focus().selectRange(t?t[0].length:0,e.length)}else{this.$advanced.hide();this.commentInput.focus()}}adjustLabels(){const 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(h.h).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,s,o,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===(s=this.watchCheckbox)||void 0===s||s.setDisabled(!0);null===(o=this.subscribeCheckbox)||void 0===o||o.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,s,o,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===(s=this.watchCheckbox)||void 0===s||s.setDisabled(!1);null===(o=this.subscribeCheckbox)||void 0===o||o.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.torndown||i&&this.$messageArea.children(".cd-message-"+i).length))this.$messageArea.append(n?e:new OO.ui.MessageWidget({type:t,inline:!0,label:e instanceof $?e:Object(O.q)(e),classes:["cd-message",i?"cd-message-"+i:void 0].filter(h.h)}).$element).cdAddCloseButton().cdScrollIntoView("top")}hideMessage(e){const t=this.$messageArea.children(".cd-message-"+e);if(t.length)t.remove();if(1===this.$messageArea.children().length)this.$messageArea.cdRemoveCloseButton()}abort({message:e,messageType:t="error",isRawMessage:i=!1,logMessage:n,cancel:s=!1,operation:o}){null==o||o.close();if(!this.torndown){if(n)console.warn(n);if(s){y.a.add(e instanceof $?e:Object(O.q)(e),{type:"error",autoHideSeconds:"long"});this.cancel(!1)}else{var a;if(!this.registered)return;if(!o||"preview"!==o.getType()||!o.getOption("isAuto"))this.showMessage(e,{type:t,isRaw:i});this.$messageArea.cdScrollIntoView("top");null===(a=this.captchaInput)||void 0===a||a.focus()}}}handleError({type:e,code:t,details:i,apiResp:n,message:o,messageType:a="error",logMessage:r,cancel:c=!1,isRawMessage:l=!1,operation:d}){var u,h=this;switch(e){case"parse":{const e=cd.a.g.server+cd.a.page.getUrl({action:"edit"});switch(t){case"locateComment":o=cd.a.sParse("error-locatecomment",e,cd.a.page.name);break;case"locateSection":o=cd.a.sParse("error-locatesection",e,cd.a.page.name);break;case"numberedList":o=cd.a.sParse("cf-error-numberedlist");break;case"numberedList-table":o=cd.a.sParse("cf-error-numberedlist")+" "+cd.a.sParse("cf-error-numberedlist-table");break;case"closed":o=cd.a.sParse("cf-error-closed");break;case"findPlace":o=cd.a.sParse("cf-error-findplace",e);break;case"delete-repliesToComment":o=cd.a.sParse("cf-error-delete-repliestocomment");break;case"delete-repliesInSection":o=cd.a.sParse("cf-error-delete-repliesinsection");break;case"commentLinks-commentNotFound":o=cd.a.sParse("cf-error-commentlinks-commentnotfound",i.id)}o=Object(O.q)(o,{callbacks:{"cd-message-reloadPage":(u=s()((function*(){if(h.confirmClose())h.reloadPage()})),function(){return u.apply(this,arguments)})}});break}case"api":switch(t){case"missing":o=cd.a.sParse("cf-error-pagedoesntexist");break;case"error":{const e=n.errors[0];switch(e.code){case"missingtitle":o=cd.a.sParse("cf-error-pagedoesntexist");break;default:o=e.html}break}}(o=Object(O.q)(o)).find(".mw-parser-output").css("display","inline");r||(r=[t,n]);break;case"network":case"javascript":o=(o?o+" ":"")+cd.a.sParse("error-"+e)}this.abort({message:o,messageType:a,isRawMessage:l,logMessage:r,cancel:c,operation:d})}inputToCode(e){var t,i,n,s;let o=this.commentInput.getValue();o=(null===(t=(i=cd.a.config).preTransformCode)||void 0===t?void 0:t.call(i,o,this))||o;const a=new u.a(o,this,e);this.willCommentBeIndented=a.isIndented();o=a.transform();o=(null===(n=(s=cd.a.config).postTransformCode)||void 0===n?void 0:n.call(s,o,this))||o;return o}addAnchorsToComments(e,t){let i=e;t.forEach(e=>{const t=b.a.getById(e);if(t){const n=t.locateInCode(!1,i),s=cd.a.config.getAnchorCode(e);if(n.code.includes(s))return;const o=u.a.prependIndentationToLine(n.indentation,n.code),a=o.match(/^[:*#]* */)[0].length;({contextCode:i}=n.modifyContext({action:"edit",commentCode:(n.headingCode||"")+o.slice(0,a)+s+o.slice(a)+n.signatureDirtyCode,contextCode:i}))}else if(!$("#"+e).length)throw new l.a({type:"parse",code:"commentLinks-commentNotFound",details:{id:e}})});return i}buildSource(e,t){var i=this;return s()((function*(){var n;const s=i.constructor.extractCommentIds(i.commentInput.getValue());i.newSectionApi=Boolean("addSection"===i.mode&&!i.newTopicOnTop&&(null===(n=i.headlineInput)||void 0===n?void 0:n.getValue().trim())&&!s.length);if(!i.newSectionApi)try{yield i.target.loadCode("addSection"===i.mode?!cd.a.page.exists():i)}catch(e){if(e instanceof l.a)i.handleError(Object.assign({message:cd.a.sParse("cf-error-getpagecode"),operation:t},e.data));else i.handleError({type:"javascript",logMessage:e,operation:t});return}let o,a;try{var r;({contextCode:o,commentCode:a}=i.target.source.modifyContext({commentCode:"reply"===i.mode?void 0:i.inputToCode(e),action:i.mode,formAction:e,doDelete:null===(r=i.deleteCheckbox)||void 0===r?void 0:r.isSelected(),commentForm:i}));o=i.addAnchorsToComments(o,s)}catch(e){if(e instanceof l.a)i.handleError(Object.assign(e.data,{operation:t}));else i.handleError({type:"javascript",logMessage:e,operation:t});return}return{contextCode:o,commentCode:a}}))()}isBeingSubmitted(){return this.operations.areThere("submit")}isContentBeingLoaded(){return this.operations.areThere("load")}updatePreview(e){this.$previewArea.html(e).prepend($("<div>").addClass("cd-commentForm-previewArea-label").text(cd.a.s("cf-block-preview"))).cdAddCloseButton().toggleClass("cd-commentForm-previewArea-indentedComment",this.willCommentBeIndented);p.a.prototype.replaceTimestampLinksWithSpans.apply({context:{rootElement:this.$previewArea[0]}});mw.hook("convenientDiscussions.previewReady").fire(this.$previewArea,cd.a);mw.hook("wikipage.content").fire(this.$previewArea)}preview(e=!0,t){var i=this;return s()((function*(){var n;if(i.isContentBeingLoaded()||e&&!i.autopreview||!i.autopreview&&i.isBeingSubmitted()){var s;null===(s=t)||void 0===s||s.close();return}t||(t=i.operations.add("preview",{isAuto:e}));if(e){const e=Date.now()-i.lastPreviewTimestamp<1e3;if(e||i.operations.filterByType("preview").some(e=>e!==t)){if(i.previewTimeout)t.close();else{t.delay();i.previewTimeout=setTimeout(()=>{i.previewTimeout=null;i.preview(!0,t)},e?1e3-(Date.now()-i.lastPreviewTimestamp):100)}return}t.undelay();i.lastPreviewTimestamp=Date.now()}if(t.maybeClose())return;if("addSection"!==i.mode&&!i.target.source){yield i.checkCode();if(!i.target.source)t.close();if(t.isClosed())return}const o=i.commentInput.getValue(),a=!(o.trim()||null!==(n=i.headlineInput)&&void 0!==n&&n.getValue().trim());let r,c;try{({html:r,parsedSummary:c}=yield Object(T.h)(i.inputToCode("preview"),{title:i.targetPage.name,summary:Object(h.c)({text:i.summaryInput.getValue()})}))}catch(e){if(e instanceof l.a)i.handleError(Object.assign({},e.data,{message:cd.a.sParse("cf-error-preview"),operation:t}));else i.handleError({type:"javascript",logMessage:e,operation:t});return}if(!t.maybeClose()){if(r){var d;if(e&&a||null!==(d=i.deleteCheckbox)&&void 0!==d&&d.isSelected())i.$previewArea.empty();else i.updatePreview(r);if(i.omitSignatureCheckbox&&!i.omitSignatureCheckboxAltered){const e=["subst:"].concat(cd.a.config.substAliases).join("|");if(new RegExp(`{{ *(${e})`,"i").test(o)){const e=i.$previewArea.find(".cd-commentForm-signature").text(),t=i.$previewArea.text();if(e&&t.indexOf(e)!==t.lastIndexOf(e))i.omitSignatureCheckbox.setSelected(!0)}else i.omitSignatureCheckbox.setSelected(!1)}i.$summaryPreview.empty();if(c)i.$summaryPreview.append(document.createTextNode(cd.a.sParse("cf-summary-preview")),document.createTextNode(cd.a.mws("colon-separator")),$("<span>").addClass("comment").append(c))}if(i.autopreview&&i.previewButton.$element.is(":visible")){i.previewButton.toggle(!1);i.viewChangesButton.toggle(!0)}t.close();if(!e){i.$previewArea.cdScrollIntoView(i.$previewArea.hasClass("cd-commentForm-previewArea-above")?"top":"bottom");i.commentInput.focus()}}}))()}viewChanges(){var e=this;return s()((function*(){var t;if(e.isBeingSubmitted())return;const i=e.operations.add("viewChanges"),{contextCode:n}=(yield e.buildSource("viewChanges",i))||{};if(i.isClosed())return;mw.loader.load("mediawiki.diff.styles");let s;try{const t={action:"compare",totitle:e.targetPage.name,toslots:"main","totext-main":n,topst:!0,prop:"diff",...cd.a.g.apiErrorFormatHtml};if(e.sectionSubmitted||e.newSectionApi||!e.targetPage.revisionId){t.fromslots="main";t["fromtext-main"]=e.sectionSubmitted?e.targetSection.presumedCode:""}else t.fromrev=e.targetPage.revisionId;s=yield v.a.getApi().post(t,{contentType:"multipart/form-data"}).catch(T.f)}catch(t){if(t instanceof l.a)e.handleError(Object.assign({},t.data,{message:cd.a.sParse("cf-error-viewchanges"),operation:i}));else e.handleError({type:"javascript",logMessage:t,operation:i});return}if(i.maybeClose())return;let o=null===(t=s.compare)||void 0===t?void 0:t.body;if(o)e.$previewArea.html(Object(O.p)(o)).prepend($("<div>").addClass("cd-commentForm-previewArea-label").text(cd.a.s("cf-block-viewchanges"))).cdAddCloseButton();else{e.$previewArea.empty();if(void 0!==o)e.showMessage(cd.a.sParse("cf-notice-nochanges"))}if(e.autopreview){e.viewChangesButton.toggle(!1);e.previewButton.toggle(!0)}i.close();e.$previewArea.cdScrollIntoView(e.$previewArea.hasClass("cd-commentForm-previewArea-above")?"top":"bottom");e.commentInput.focus()}))()}reloadPage(e,t){var i=this;return s()((function*(){i.unregister();if(cd.a.page.exists())try{yield v.a.reload(e)}catch(e){if(e instanceof l.a)i.handleError(Object.assign({},e.data,{message:cd.a.sParse("error-reloadpage-saved"),cancel:!0,operation:t}));else i.handleError({type:"javascript",logMessage:e,cancel:!0,operation:t});v.a.hideLoadingOverlay()}else{const t=new URL(location.href);t.searchParams.delete("cdaddtopic");t.searchParams.delete("section");t.searchParams.delete("action");t.hash=e.commentIds[0];const i=location.pathname+location.search;location.href=t.toString();if(i===t.pathname+t.search)location.reload()}}))()}runChecks({doDelete:e}){var t,i;const n=[{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()&&!cd.a.config.dontConfirmEmptyCommentPages.some(e=>cd.a.page.name.match(e)),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!==(i=this.preloadConfig)&&void 0!==i&&i.commentTemplate),confirmation:()=>confirm(cd.a.s("cf-confirm-secondlevelheading"))},{condition:e,confirmation:()=>confirm(cd.a.s("cf-confirm-delete"))}];for(const e of n)if(e.condition&&!e.confirmation()){this.commentInput.focus();return!1}return!0}editPage(e,t,i){var n=this;return s()((function*(){let s;try{var o,a,r,c,d,u;const t={text:e,summary:Object(h.c)({text:n.summaryInput.getValue()}),minor:null===(o=n.minorCheckbox)||void 0===o?void 0:o.isSelected(),watchlist:null!==(a=n.watchCheckbox)&&void 0!==a&&a.isSelected()?"watch":"unwatch",captchaid:null===(r=n.captchaInput)||void 0===r?void 0:r.getCaptchaId(),captchaword:null===(c=n.captchaInput)||void 0===c?void 0:c.getCaptchaWord()};let l;if(n.newSectionApi){t.sectiontitle=n.headlineInput.getValue().trim();t.section="new"}else if(n.sectionSubmitted){t.section=n.targetSection.liveSectionNumber;l=n.targetSection}else l=n.targetPage;t.baserevid=null===(d=l)||void 0===d?void 0:d.revisionId;t.starttimestamp=null===(u=l)||void 0===u?void 0:u.queryTimestamp;if(i)t.tag=void 0;s=yield n.targetPage.edit(t)}catch(e){delete n.captchaInput;if(e instanceof l.a){const{type:i,details:s,apiResp:o}=e.data;if("network"===i)n.handleError({type:i,message:cd.a.sParse("cf-error-couldntedit"),operation:t});else{let e,{code:a,message:r,isRawMessage:c,logMessage:l}=s;if("editconflict"===a){r+=" "+cd.a.sParse("cf-notice-editconflict-retrying");e="notice"}else if("captcha"===a&&mw.libs.confirmEdit){n.captchaInput=new mw.libs.confirmEdit.CaptchaInputWidget(o.edit.captcha);n.captchaInput.on("enter",()=>{n.submit()});r=new OO.ui.MessageWidget({type:"notice",label:n.captchaInput.$element}).$element}n.handleError({type:i,message:r,messageType:e,isRawMessage:c,logMessage:l,operation:t});if("editconflict"===a)n.submit(!1);if("tags-apply-blocked"===a)n.submit(!1,!0)}}else n.handleError({type:"javascript",logMessage:e,operation:t});return null}return s}))()}updateSubscriptionStatus(e,t,i){if(this.subscribeCheckbox.isSelected())if("addSection"===this.mode||!this.useTopicSubscription&&("addSubsection"===this.mode||this.sectionOpeningCommentEdited)){let n,s,o,a,r;if(this.headlineInput)n=this.headlineInput.getValue().trim();if(!this.sectionOpeningCommentEdited&&!n)[,n]=t.match(/^==(.*?)==[ \t]*$/m)||[];s=n&&Object(E.k)(n);if(this.useTopicSubscription)o=x.a.generateDtSubscriptionId(cd.a.user.getName(),e);else{o=s;if(this.sectionOpeningCommentEdited){a=Object(E.k)(this.originalHeadline);r=o!==a}}if(void 0!==o){i.justSubscribedToSection=o;if(r)i.justUnsubscribedFromSection=a;v.a.getSubscriptionsInstance().subscribe(o,s,a,!0)}}else{var n;const t=null===(n=this.targetSection)||void 0===n?void 0:n.getSectionSubscribedTo();if(t&&!t.subscriptionState){t.ensureSubscribeIdPresent(e);t.subscribe("silent");i.justSubscribedToSection=t.subscribeId}}else{var s;const t=null===(s=this.targetSection)||void 0===s?void 0:s.getSectionSubscribedTo();if(null!=t&&t.subscriptionState){t.ensureSubscribeIdPresent(e);t.unsubscribe("silent");i.justUnsubscribedFromSection=t.subscribeId}}}generateFutureCommentId(e){var t,i;const n=new Date(e);n.setSeconds(0);return d.a.generateId(n,cd.a.user.getName(),b.a.getAll().slice(0,null!==(t=(null===(i=this.target.getCommentAboveReply(this))||void 0===i?void 0:i.index)+1)&&void 0!==t?t:0).filter(e=>{var t;return e.author===cd.a.user&&(null===(t=e.date)||void 0===t?void 0:t.getTime())===n.getTime()}).map(e=>e.id))}submit(e=!0,t=!1){var i=this;return s()((function*(){var n,s,o;const a=null===(n=i.deleteCheckbox)||void 0===n?void 0:n.isSelected();if(i.isBeingSubmitted()||i.isContentBeingLoaded()||!i.runChecks({doDelete:a}))return;if(f.a.getAll().some(e=>e.isBeingSubmitted())){i.handleError({type:"ui",message:cd.a.sParse("cf-error-othersubmitted")});return}const r=i.operations.add("submit",void 0,e),{contextCode:c,commentCode:l}=(yield i.buildSource("submit",r))||{};if(r.isClosed())return;const d=yield i.editPage(c,r,t);if(!d)return;const u={wasCommentFormSubmitted:!0};if(i.subscribeCheckbox)i.updateSubscriptionStatus(d,l,u);if(null!==(s=i.watchCheckbox)&&void 0!==s&&s.isSelected()&&$("#ca-watch").length)$("#ca-watch").attr("id","ca-unwatch").find("a").attr("href",cd.a.page.getUrl({action:"unwatch"}));if((null===(o=i.watchCheckbox)||void 0===o||!o.isSelected())&&$("#ca-unwatch").length)$("#ca-unwatch").attr("id","ca-watch").find("a").attr("href",cd.a.page.getUrl({action:"watch"}));if(!a)u.commentIds=["edit"===i.mode?i.target.id:i.generateFutureCommentId(d)];if(i.targetPage!==cd.a.page)yield cd.a.page.purge();i.reloadPage(u,r)}))()}confirmClose(){return!this.isAltered()||confirm(cd.a.s("cf-confirm-close"))}cancel(e=!0){var t=this;return s()((function*(){if(!v.a.isPageOverlayOn()&&!t.isBeingSubmitted())if(!e||t.confirmClose())t.teardown();else t.commentInput.focus()}))()}teardown(){this.operations.closeAll();this.target.removeCommentFormFromPage(this.mode,this);this.$element.remove();this.unregister();this.emit("teardown");this.torndown=!0}unregister(){var e;this.constructor.forgetOnTarget(this.target,this.mode);this.teardownInputPopups();this.autocomplete.cleanUp();null===(e=this.headlineAutocomplete)||void 0===e||e.cleanUp();this.summaryAutocomplete.cleanUp();this.registered=!1;this.emit("unregister")}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()}reactToText(e,{regexp:t,checkFunc:i,message:n,type:s,name:o}){if(null!=t&&t.test(e)&&("function"!=typeof i||i(this)))this.showMessage(n,{type:s,name:o});else this.hideMessage(o)}updateAutoSummary(e=!0,t=!1){var i;if(this.summaryAltered)return;this.summaryAutopreviewBlocked=t;const n=this.generateStaticSummaryText(),s=this.headlineInput&&"addSubsection"!==this.mode?Object(E.k)(this.headlineInput.getValue()):null===(i=this.target.getRelevantSection())||void 0===i?void 0:i.headline;let o;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.commentToSummaryLengthLimit)o=`: ${e} (-)`}else if("addSubsection"===this.mode){const e=Object(E.k)(this.headlineInput.getValue());if(e)o=`: /* ${e} */`}this.autoSummary=Object(h.c)({text:n,section:s,optionalText:o,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.bind(this));return this.target.isOwn?cd.a.s("es-addition"):Object(h.D)(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.bind(this));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.bind(this));t="comment-by"}const n=i.author.getName();return Object(h.D)(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,s,o;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===(s=this.minorCheckbox)||void 0===s||s.setDisabled(!0);null===(o=this.omitSignatureCheckbox)||void 0===o||o.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.parentComment){const e=r.a.getConfig("mentions").transform(this.parentComment.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).cdInsertContent(t).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);if(t&&!/\s/.test(this.commentInput.getValue().substr(t-1,1)))this.commentInput.cdInsertContent(" ");this.autocomplete.tribute.showMenuForCollection(this.commentInput.$input[0],this.autocomplete.tribute.collection.findIndex(e=>e.trigger===cd.a.config.mentionCharacter))}quote(e,t,i){var n=this;return s()((function*(){let s;if(Object(O.l)()){const e=document.activeElement;s=e.value.substring(e.selectionStart,e.selectionEnd)}else s=yield n.commentInput.getWikitextFromSelection(v.a.rootElement);s=s.trim();if(s||e){const e=n.commentInput.$input.is(":focus"),o=n.commentInput.getRange(),a=o.to;let r=Math.min(o.to,o.from),c=Math.max(o.to,o.from);if(!e&&r!==c){n.commentInput.selectRange(a);r=c=a}const[l,d]="function"==typeof cd.a.config.quoteFormatting?cd.a.config.quoteFormatting(null!=i?i:t&&t!==n.parentComment,null==t?void 0:t.author.getName(),null==t?void 0:t.timestamp,null==t?void 0:t.dtId):cd.a.config.quoteFormatting;if(l.includes("{{"))s=Object(E.d)(s);n.encapsulateSelection({pre:l,peri:cd.a.s("cf-quote-placeholder"),post:d,selection:s,ownline:!0})}}))()}encapsulateSelection({pre:e="",peri:t="",post:i="",selection:n,replace:s=!1,ownline:o=!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=o&&!/(^|\n)$/.test(l.slice(0,r))&&!/^\n/.test(t)?"\n":"",u=o&&!/^\n/.test(l.slice(c))&&!/\n$/.test(i)?"\n":"";let h;if(!n&&!s){h=r+d.length+e.length;n=l.substring(a.from,a.to)}else n||(n="");const[m]=n.match(/^ */),[p]=n.match(/ *$/),g=n||t,f=d+m+e+g.slice(m.length,g.length-p.length)+i+p+u;this.commentInput.cdInsertContent(f);if(!n&&!s)this.commentInput.selectRange(h,h+t.length)}getMode(){return this.mode}getModeTargetProperty(){return"replyInSection"===this.mode?"reply":this.mode}getPreloadConfig(){return this.preloadConfig}isNewTopicOnTop(){return this.newTopicOnTop}getOriginalHeadline(){return this.originalHeadline}getOriginalComment(){return this.originalComment}isSummaryAltered(){return this.summaryAltered}isOmitSignatureCheckboxAltered(){return this.omitSignatureCheckboxAltered}getLastFocused(){return this.lastFocused}getTarget(){return this.target}getParentComment(){return this.parentComment}setNewSectionApi(e){this.newSectionApi=Boolean(e)}isNewSectionApi(){return this.newSectionApi}setSectionSubmitted(e){this.sectionSubmitted=Boolean(e)}isSectionSubmitted(){return this.sectionSubmitted}getContainerListType(){return this.containerListType}restore(){const e=this.target.findNewSelf();if(null!=e&&e.isActionable)try{e[this.getModeTargetProperty()](void 0,this)}catch(e){console.warn(e);return this.rescue()}else return this.rescue()}rescue(){var e;this.unregister();return{headline:null===(e=this.headlineInput)||void 0===e?void 0:e.getValue(),comment:this.commentInput.getValue(),summary:this.summaryInput.getValue()}}goTo(){var e;let t;if(["reply","edit"].includes(this.mode))t=this.target;else if("replyInSection"===this.mode)t=this.targetSection.commentsInFirstChunk.slice().reverse().find(e=>0===e.level);null===(e=t)||void 0===e||e.expandAllThreadsDownTo();this.$element.cdScrollIntoView("center");this.commentInput.focus()}onboardOntoMultipleForms(){if(this.manyFormsOnboarded||!cd.a.user.isRegistered()||1!==f.a.getCount()||"timeless"===cd.a.g.skin&&window.innerWidth<1100||"vector-2022"===cd.a.g.skin&&window.innerWidth<1e3)return;const e=new OO.ui.ButtonWidget({label:cd.a.mws("visualeditor-educationpopup-dismiss"),flags:["progressive","primary"]});e.on("click",()=>{this.manyFormsPopup.toggle(!1)});this.manyFormsPopup=new OO.ui.PopupWidget({icon:"lightbulb",label:cd.a.s("popup-manyForms-title"),$content:$.cdMerge($("<p>").text(cd.a.s("popup-manyForms-text")),$("<p>").append(e.$element)),head:!0,$floatableContainer:this.commentInput.$element,$container:v.a.$root.parent(),position:$("#vector-main-menu-pinned-container, #vector-toc-pinned-container").is(":visible")?"before":"below",padded:!0,classes:["cd-popup-onboarding"]});$(document.body).append(this.manyFormsPopup.$element);this.manyFormsPopup.toggle(!0);this.manyFormsPopup.on("closing",()=>{k.a.saveSettingOnTheFly("manyForms-onboarded",!0)})}onboardOntoUpload(){if(!this.uploadToCommons||this.uploadOnboarded||!cd.a.user.isRegistered()||"timeless"===cd.a.g.skin&&window.innerWidth<1100||"vector-2022"===cd.a.g.skin&&window.innerWidth<1e3)return;const e=new OO.ui.ButtonWidget({label:cd.a.mws("visualeditor-educationpopup-dismiss"),flags:["progressive","primary"]});e.on("click",()=>{this.uploadPopup.toggle(!1)});this.uploadPopup=new OO.ui.PopupWidget({icon:"lightbulb",label:cd.a.s("popup-upload-title"),$content:$.cdMerge($("<p>").text(cd.a.s("popup-upload-text")),$("<p>").append(e.$element)),head:!0,$floatableContainer:this.commentInput.$element,$container:v.a.$root.parent(),position:$("#vector-main-menu-pinned-container, #vector-toc-pinned-container").is(":visible")?"before":"below",padded:!0,classes:["cd-popup-onboarding"]});$(document.body).append(this.uploadPopup.$element);this.uploadPopup.toggle(!0);this.uploadPopup.on("closing",()=>{k.a.saveSettingOnTheFly("upload-onboarded",!0)})}getOutermostElement(){const e=this.$element[0];return e.parentNode.classList.contains("cd-commentForm-outerWrapper")?e.parentNode:e}highlightQuoteButton(e){if(this.showToolbar)this.$element.find('.tool-button[rel="quote"]').toggleClass("highlight",e)}static init(){this.encapsulateOptions={code:{pre:"<code><nowiki>",peri:cd.a.s("cf-code-placeholder"),post:"</".concat("nowiki></code>")},underline:{pre:"<u>",peri:cd.a.s("cf-underline-placeholder"),post:"</u>"},strikethrough:{pre:"<s>",peri:cd.a.s("cf-strikethrough-placeholder"),post:"</s>"}}}static extractCommentIds(e){const t=/\[\[#(\d{12}[_ ][^|\]]+)/g,i=[];let n;for(;n=t.exec(e);)i.push(n[1]);return i}static getDefaultPreloadConfig(){return{editIntro:void 0,commentTemplate:void 0,headline:void 0,params:[],summary:void 0,noHeadline:!1,omitSignature:!1}}static getPropertyNameOnTarget(e,t){return e.getCommentFormMethodName(t)+"Form"}static forgetOnTarget(e,t){delete e[this.getPropertyNameOnTarget(e,t)]}}a()(CommentForm_CommentForm,"counter",0);a()(CommentForm_CommentForm,"allowedFileTypes",["image/jpeg","image/png","image/gif","image/svg+xml"]);t.a=CommentForm_CommentForm},function(e,t,i){"use strict";var n=i(3),s=i.n(n),o=i(12),a=i.n(o),r=i(6),cd=i(0),c=i(2),l=i(10),d=i(5);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 s=n.collection.find(e=>e.trigger===i);n.current.collection=s;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 u=TributeEvents;var h=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 s=this,o=arguments,a=i&&!n;clearTimeout(n);n=setTimeout(()=>{n=null;if(!i)e.apply(s,o)},t);if(a)e.apply(s,o)}}};const m=/[\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 p=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,s=e;if(t)for(var o=0;o<t.length;o++){s=s.childNodes[t[o]];if(void 0===s)return;for(;s.length<i;){i-=s.length;s=s.nextSibling}if(0===s.childNodes.length&&!s.length)s=s.previousSibling}let a=window.getSelection();n=document.createRange();n.setStart(s,i);n.setEnd(s,i);n.collapse(!0);try{a.removeAllRanges()}catch(e){console.warn(e)}a.addRange(n);e.focus()}replaceTriggerText(e,t,i,n,s){let o=this.getTriggerInfo(!0,i,t,this.tribute.allowSpaces);if(void 0!==o){var a,r;let t=this.tribute.current,i=new CustomEvent("tribute-replaced",{detail:{item:s,instance:t,context:o,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=o.mentionPosition+o.mentionText.length+o.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 h=o.mentionPosition;l.selectionStart=h;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 m=e.start+e.content+e.end;m+="string"==typeof this.tribute.replaceTextSuffix?this.tribute.replaceTextSuffix:" ";l.focus();if(!document.execCommand("insertText",!1,m))l.value=l.value.substring(0,h)+m+u;if(n.shiftKey||e.typeContent&&!e.content){l.selectionEnd=h+m.length-e.end.length;l.selectionStart=h+e.start.length}else{l.selectionEnd=h+m.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 s;s=this.tribute.current.element;let o=this.getTextPrecedingCurrentSelection();if(null!=o){let a,r,c,l,d,u=-1,h=0;this.tribute.collection.forEach(e=>{let t=e.trigger,n=e.requireLeadingSpace?this.lastIndexWithLeadingSpace(o,t):o.lastIndexOf(t);if(n>u||n>-1&&n===u&&t.length>h){u=n;h=t.length;a=t;i=e.requireLeadingSpace}});let p=u>=0&&(0===u||!i||m.test(o[u-1]));if(p){r=o.substring(u+a.length,o.length);c=r;a=o.substring(u,u+a.length);let e=r.substring(0,1);l=r.length>0&&(" "===e||"\xa0"===e);if(t)r=r.trim();d=n?/[^\S ]/g:/\s/g;this.tribute.hasTrailingSpace=d.test(r)}if(-1===u||c&&!c[0].trim()||c.includes("\n")||s.selectionStart!==s.selectionEnd||this.tribute.current.trigger&&a!==this.tribute.current.trigger){this.tribute.dropMenu=!0;return}else this.tribute.dropMenu=!1;if(p&&!l&&(e||!d.test(r)))return{mentionPosition:u,mentionText:r,mentionSelectedElement:s,mentionSelectedPath:void 0,mentionSelectedOffset:void 0,mentionTriggerChar:a}}}lastIndexWithLeadingSpace(e,t){let i=e.split("").reverse().join(""),n=-1;for(let s=0,o=e.length;s<o;s++){let o=s===e.length-1,a=m.test(i[s+1]),r=!0;for(let e=t.length-1;e>=0;e--)if(t[e]!==i[s-e]){r=!1;break}if(r&&(o||a)){n=e.length-1-s;break}}return n}isMenuOffScreen(e,t){let i=document.documentElement,n=window.scrollX-(i.clientLeft||0),s=window.scrollY-(i.clientTop||0),o="number"==typeof e.top?e.top:s+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:o<Math.floor(s),right:a>Math.ceil(n+i.clientWidth),bottom:r>Math.ceil(s+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 s=n.style,o=window.getComputedStyle?getComputedStyle(e):e.currentStyle;s.whiteSpace="pre-wrap";if("INPUT"!==e.nodeName)s.wordWrap="break-word";s.position="absolute";s.visibility="hidden";i.forEach(e=>{s[e]=o[e]});s.width=parseFloat(o.width)+"px";if(e.scrollHeight>parseFloat(o.height))s.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(),h=(window.pageXOffset||c.scrollLeft)-(c.clientLeft||0),m=(window.pageYOffset||c.scrollTop)-(c.clientTop||0),p=0,g=0,f=0;if(this.menuContainerIsBody){p=u.top;g=u.left;f=u.right}let b={top:p+m+r.offsetTop+parseInt(o.borderTopWidth)+parseInt(o.fontSize)-e.scrollTop};if("rtl"===this.tribute.direction){const e="rtl"===c.dir?l:n.getBoundingClientRect().right;b.right=l-f+(e-r.getBoundingClientRect().right)+a.offsetWidth}else b.left=h+g+r.offsetLeft+a.offsetWidth+1;let v=this.getMenuDimensions(),y=this.isMenuOffScreen(b,v);if("rtl"===this.tribute.direction){if(y.left){b.left=0;b.right="auto"}}else if(y.right){b.right=0;b.left="auto"}if(y.bottom){const t=m+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 g=class{constructor(e){this.tribute=e;this.tribute.search=this}match(e,t,i){let n=(i=i||{}).pre||"",s=i.post||"",o=i.caseSensitive&&t||t.toLowerCase();if(i.skip)return{rendered:t,score:0};e=i.caseSensitive&&e||e.toLowerCase();let a=this.traverse(o,e,0,0,[]);if(!a)return null;else return{rendered:this.render(t,a.cache,n,s),score:a.score}}traverse(e,t,i,n,s){if(t.length===n)return{score:this.calculateScore(s),cache:s.slice()};if(e.length===i||t.length-n>e.length-i)return;let o,a,r=t[n],c=e.indexOf(r,i);for(;c>-1;){s.push(c);a=this.traverse(e,t,c+1,n+1,s);s.pop();if(!a)return o;if(!o||o.score<a.score)o=a;c=e.indexOf(r,c+1)}return o}calculateScore(e){let t=0,i=1;e.forEach((n,s)=>{if(s>0)if(e[s-1]+1===n)i+=i+1;else i=1;t+=i});return t}render(e,t,i,n){var s=e.substring(0,t[0]);t.forEach((o,a)=>{s+=i+e[o]+n+e.substring(o+1,t[a+1]?t[a+1]:e.length)});return s}filter(e,t,i){i=i||{};return t.reduce((t,n,s)=>{let o=n;if(i.extract){o=i.extract(n);if(!o)o=""}let a=this.match(e,o,i);if(null!=a)t[t.length]={string:a.rendered,score:a.score,index:s,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:s="key",fillAttr:o="value",collection:a=null,menuContainer:r=null,noMatchTemplate:c=null,allowSpaces:l=!1,replaceTextSuffix:d=null,positionMenu:m=!0,searchOpts:f={},menuItemLimit:b=null,menuShowMinLength:v=0,direction:y="ltr"}){this.menuSelected=0;this.current={};this.inputEvent=!1;this.isActive=!1;this.menuContainer=r;this.allowSpaces=l;this.replaceTextSuffix=d;this.positionMenu=m;this.hasTrailingSpace=!1;this.direction=y;if(!a)throw new Error("[Tribute] No collection specified.");this.collection=a.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 c||function(){return"<li>No Match Found!</li>"}.bind(this)})(c),lookup:a.lookup||s,fillAttr:a.fillAttr||o,values:a.values,requireLeadingSpace:a.requireLeadingSpace,searchOpts:a.searchOpts||f,menuItemLimit:a.menuItemLimit||b,menuShowMinLength:a.menuShowMinLength||v,label:a.label}));new p(this);new u(this);new h(this);new g(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.direction)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 s=document.createDocumentFragment();if(this.current.collection.label){let e=document.createElement("li");e.classList.add("tribute-label");e.textContent=this.current.collection.label;s.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);s.appendChild(i)});n.appendChild(s);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 s=document.execCommand("insertText",!1,t);if(!s){var o=e.value.substring(0,n),a=e.value.substring(e.selectionEnd,e.value.length);e.value=o+t+a;n+=t.length;e.selectionStart=n;e.selectionEnd=n}e.scrollTop=i;return s}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 s=this.collection[n];this._append(s,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 f=Tribute_Tribute,b=i(21),v=i(8),y=i(1);class Autocomplete_Autocomplete{constructor({types:e,inputs:t,comments:i,defaultUserNames:n}){this.types=d.a.get("autocompleteTypes");this.useTemplateData=d.a.get("useTemplateData");e=e.filter(e=>this.types.includes(e)||"mentions"===e);const s=this.getCollections(e,i,n);this.tribute=new f({collection:s,allowSpaces:!0,menuItemLimit:10,noMatchTemplate:()=>null,containerClass:"tribute-container cd-autocompleteContainer",replaceTextSuffix:"",direction:cd.a.g.contentDirection});this.inputs=t}init(){i(68);this.inputs.forEach(e=>{const t=e.$input[0];this.tribute.attach(t);t.cdInput=e;t.addEventListener("tribute-active-true",()=>{this.constructor.activeMenu=this.tribute.menu});t.addEventListener("tribute-active-false",()=>{delete this.constructor.activeMenu});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[0])})}getCollections(e,t,i){var n=this;const o=e=>e?e.original.transform(e.original.item):"",a=(e,t)=>e.filter(y.h).filter(y.K).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}}),r=new RegExp(cd.a.mws("word-separator",{language:"content"}),"g"),d=Object.keys(mw.config.get("wgNamespaceIds")).filter(e=>e).join("|"),u=new RegExp(`^:?(?:${d}):`,"i"),h={mentions:{label:cd.a.s("cf-autocomplete-mentions-label"),trigger:cd.a.config.mentionCharacter,searchOpts:{skip:!0},requireLeadingSpace:cd.a.config.mentionRequiresLeadingSpace,selectTemplate:o,values:(f=s()((function*(e,t){if(n.types.includes("mentions")||n.tribute.current.externalTrigger){if(!(e=Object(y.D)(e)).startsWith(n.mentions.snapshot))n.mentions.cache=[];n.mentions.snapshot=e;if(n.mentions.byText[e])t(a(n.mentions.byText[e],n.mentions));else{const i=n.constructor.search(e,n.mentions.default);let s=i.slice();const o=e&&e.length<=85&&!/[#<>[\]|{}/@:]/.test(e)&&(e.match(r)||[]).length<=4;if(o){if(!i.length)s.push(...n.mentions.cache);s=n.constructor.search(e,s);s[9]=e.trim()}t(a(s,n.mentions));if(o&&!i.length){let i;try{i=yield n.constructor.getRelevantUserNames(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(a(i,n.mentions))}}}})),function(e,t){return f.apply(this,arguments)})},commentLinks:{label:cd.a.s("cf-autocomplete-commentlinks-label"),trigger:"[[#",keepAsEnd:/^\]\]/,selectTemplate:o,values:(g=s()((function*(e,t){if(!n.commentLinks.default){n.commentLinks.default=[];n.commentLinks.comments.forEach(e=>{let t,{id:i,dtId:s,author:o,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=o.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:s||i,author:o.getName(),timestamp:a})});l.a.getAll().forEach(e=>{n.commentLinks.default.push({key:Object(y.J)(e.id),id:Object(y.J)(e.id),headline:e.headline})})}e=Object(y.D)(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(a(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:o,values:(p=s()((function*(e,t){if(!(e=Object(y.D)(e)).startsWith(n.wikilinks.snapshot))n.wikilinks.cache=[];n.wikilinks.snapshot=e;if(n.wikilinks.byText[e])t(a(n.wikilinks.byText[e],n.wikilinks));else{let i=[];const s=e&&":"!==e&&e.length<=255&&(e.match(r)||[]).length<=9&&!/[#<>[\]|{}]/.test(e)&&!((/^:/.test(e)||/^[a-z-]\w*:/.test(e))&&!u.test(e));if(s){i.push(...n.wikilinks.cache);i=n.constructor.search(e,i);i[9]=e.trim()}t(a(i,n.wikilinks));if(s){let i;try{i=yield n.constructor.getRelevantPageNames(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(a(i,n.wikilinks))}}})),function(e,t){return p.apply(this,arguments)})},templates:{label:cd.a.s("cf-autocomplete-templates-label"),trigger:"{{",keepAsEnd:/^(?:\||\}\})/,searchOpts:{skip:!0},selectTemplate:(e,t)=>{if(e){if(this.useTemplateData&&t.shiftKey&&!t.altKey){const t=this.tribute.current.element.cdInput;setTimeout(()=>{t.setDisabled(!0).pushPending();c.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},v.f).then(e=>{const i=e.pages;let n="",s=0;Object.keys(i).forEach(e=>{const t=i[e],o=t.params||[];(t.paramOrder||Object.keys(o)).filter(e=>o[e].required||o[e].suggested).forEach(e=>{if("block"===t.format)n+=`\n| ${e} = `;else if(isNaN(e))n+=`|${e}=`;else n+="|";s||(s=n.length)});if("block"===t.format&&n)n+="\n"});n=n.slice(1);const o=t.getRange().to;t.setDisabled(!1).cdInsertContent(n).selectRange(o+s-1)},()=>{t.setDisabled(!1).focus()}).always(()=>{t.popPending()})})}return e.original.transform(e.original.item)}else return""},values:(m=s()((function*(e,t){if(!(e=Object(y.D)(e)).startsWith(n.templates.snapshot))n.templates.cache=[];n.templates.snapshot=e;if(!e.includes("{{"))if(n.templates.byText[e])t(a(n.templates.byText[e],n.templates));else{let i=[];const s=e&&e.length<=255&&!/[#<>[\]|{}]/.test(e)&&(e.match(r)||[]).length<=9;if(s){i.push(...n.templates.cache);i=n.constructor.search(e,i);i[9]=e.trim()}t(a(i,n.templates));if(s){let i;try{i=yield n.constructor.getRelevantTemplateNames(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(a(i,n.templates))}}else t([])})),function(e,t){return m.apply(this,arguments)})},tags:{label:cd.a.s("cf-autocomplete-tags-label"),trigger:"<",keepAsEnd:/^>/,replaceEnd:!1,searchOpts:{skip:!0},selectTemplate:o,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(a(n,this.tags))}}};var m,p,g,f;const b={mentions:i,commentLinks:t};return e.map(e=>{this[e]=this.constructor.getConfig(e,b[e]);return h[e]})}static getConfig(e,...t){let i;switch(e){case"mentions":i={byText:{},cache:[],default:t[0],transform:e=>{const t=e.trim(),i=b.default.get(t),n=i.getNamespaceAlias();return{start:`@[[${i.isRegistered()?`${n}:${t}`:`${cd.a.g.contribsPages[0]}/${t}`}|`,end:t.match(/[(,]/)?t+"]]":"]]",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 lang=""','<syntaxhighlight lang="','">\n\n</syntaxhighlight>'],['syntaxhighlight inline lang=""','<syntaxhighlight inline lang="','"></syntaxhighlight>'],["syntaxhighlight","<syntaxhighlight>\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}static getActiveMenu(){return this.activeMenu}static getRelevantUserNames(e){var t=this;e=Object(y.I)(e);const i=new Promise(function(){var n=s()((function*(n,s){yield Object(y.G)(t.delay);try{var o;if(i!==t.currentPromise)throw new r.a;const s=null===(o=(yield c.a.getApi().get({action:"opensearch",search:e,namespace:3,redirects:"resolve",limit:10}).catch(v.f))[1])||void 0===o?void 0:o.map(e=>(e.match(cd.a.g.userNamespacesRegexp)||[])[1]).filter(y.h).filter(e=>!e.includes("/"));if(s.length)n(s);else{const t=yield c.a.getApi().get({action:"query",list:"allusers",auprefix:e}).catch(v.f);n(t.query.allusers.map(e=>e.name))}}catch(e){s(e)}}));return function(e,t){return n.apply(this,arguments)}}());this.currentPromise=i;return i}static getRelevantPageNames(e){var t=this;let i=!1;if(cd.a.g.colonNamespacesPrefixRegexp.test(e)){e=e.slice(1);i=!0}const n=new Promise(function(){var o=s()((function*(s,o){yield Object(y.G)(t.delay);try{if(n!==t.currentPromise)throw new r.a;c.a.getApi().get({action:"opensearch",search:e,redirects:"return",limit:10}).then(t=>{var n;const o=new RegExp("^"+mw.util.escapeRegExp(e[0]),"i"),a=null===(n=t[1])||void 0===n?void 0:n.map(t=>t.replace(o,()=>e[0]).replace(/^/,i?":":""));s(a)},e=>{Object(v.f)(e)})}catch(e){o(e)}}));return function(e,t){return o.apply(this,arguments)}}());this.currentPromise=n;return n}static getRelevantTemplateNames(e){var t=this;const i=new Promise(function(){var n=s()((function*(n,s){yield Object(y.G)(t.delay);try{if(i!==t.currentPromise)throw new r.a;c.a.getApi().get({action:"opensearch",search:e.startsWith(":")?e.slice(1):"Template:"+e,redirects:"return",limit:10}).then(t=>{var i;const s=new RegExp("^"+mw.util.escapeRegExp(e[0]),"i"),o=null===(i=t[1])||void 0===i?void 0:i.filter(e=>!/(\/doc|\.css)$/.test(e)).map(t=>e.startsWith(":")?t:t.slice(t.indexOf(":")+1)).map(t=>t.replace(s,()=>e[0]));n(o)},e=>{Object(v.f)(e)})}catch(e){s(e)}}));return function(e,t){return n.apply(this,arguments)}}());this.currentPromise=i;return i}static search(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)=>n.test(t)-n.test(e))}}a()(Autocomplete_Autocomplete,"delay",100);t.a=Autocomplete_Autocomplete},function(e,t,i){e.exports=function(){"use strict";var e=6e4,t=36e5,i="millisecond",n="second",s="minute",o="hour",a="day",r="week",c="month",l="quarter",d="year",u="date",h="Invalid Date",m=/^(\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,g={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("_")},f=function(e,t,i){var n=String(e);return!n||n.length>=t?e:""+Array(t+1-n.length).join(i)+e},b={s:f,z:function(e){var t=-e.utcOffset(),i=Math.abs(t),n=Math.floor(i/60),s=i%60;return(t<=0?"+":"-")+f(n,2,"0")+":"+f(s,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()),s=t.clone().add(n,c),o=i-s<0,a=t.clone().add(n+(o?-1:1),c);return+(-(n+(i-s)/(o?s-a:a-s))||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:o,m:s,s:n,ms:i,Q:l}[e]||String(e||"").toLowerCase().replace(/s$/,"")},u:function(e){return void 0===e}},v="en",y={};y[v]=g;var w=function(e){return e instanceof T},x=function e(t,i,n){var s;if(!t)return v;if("string"==typeof t){var o=t.toLowerCase();y[o]&&(s=o),i&&(y[o]=i,s=o);var a=t.split("-");if(!s&&a.length>1)return e(a[0])}else{var r=t.name;y[r]=t,s=r}return!n&&s&&(v=s),s||!n&&v},k=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)},C=b;C.l=x,C.i=w,C.w=function(e,t){return k(e,{locale:t.$L,utc:t.$u,x:t.$x,$offset:t.$offset})};var T=function(){function g(e){this.$L=x(e.locale,null,!0),this.parse(e)}var f=g.prototype;return f.parse=function(e){this.$d=function(e){var t=e.date,i=e.utc;if(null===t)return new Date(NaN);if(C.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(m);if(n){var s=n[2]-1||0,o=(n[7]||"0").substring(0,3);return i?new Date(Date.UTC(n[1],s,n[3]||1,n[4]||0,n[5]||0,n[6]||0,o)):new Date(n[1],s,n[3]||1,n[4]||0,n[5]||0,n[6]||0,o)}}return new Date(t)}(e),this.$x=e.x||{},this.init()},f.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()},f.$utils=function(){return C},f.isValid=function(){return!(this.$d.toString()===h)},f.isSame=function(e,t){var i=k(e);return this.startOf(t)<=i&&i<=this.endOf(t)},f.isAfter=function(e,t){return k(e)<this.startOf(t)},f.isBefore=function(e,t){return this.endOf(t)<k(e)},f.$g=function(e,t,i){return C.u(e)?this[t]:this.set(i,e)},f.unix=function(){return Math.floor(this.valueOf()/1e3)},f.valueOf=function(){return this.$d.getTime()},f.startOf=function(e,t){var i=this,l=!!C.u(t)||t,h=C.p(e),m=function(e,t){var n=C.w(i.$u?Date.UTC(i.$y,t,e):new Date(i.$y,t,e),i);return l?n:n.endOf(a)},p=function(e,t){return C.w(i.toDate()[e].apply(i.toDate("s"),(l?[0,0,0,0]:[23,59,59,999]).slice(t)),i)},g=this.$W,f=this.$M,b=this.$D,v="set"+(this.$u?"UTC":"");switch(h){case d:return l?m(1,0):m(31,11);case c:return l?m(1,f):m(0,f+1);case r:var y=this.$locale().weekStart||0,w=(g<y?g+7:g)-y;return m(l?b-w:b+(6-w),f);case a:case u:return p(v+"Hours",0);case o:return p(v+"Minutes",1);case s:return p(v+"Seconds",2);case n:return p(v+"Milliseconds",3);default:return this.clone()}},f.endOf=function(e){return this.startOf(e,!1)},f.$set=function(e,t){var r,l=C.p(e),h="set"+(this.$u?"UTC":""),m=(r={},r[a]=h+"Date",r[u]=h+"Date",r[c]=h+"Month",r[d]=h+"FullYear",r[o]=h+"Hours",r[s]=h+"Minutes",r[n]=h+"Seconds",r[i]=h+"Milliseconds",r)[l],p=l===a?this.$D+(t-this.$W):t;if(l===c||l===d){var g=this.clone().set(u,1);g.$d[m](p),g.init(),this.$d=g.set(u,Math.min(this.$D,g.daysInMonth())).$d}else m&&this.$d[m](p);return this.init(),this},f.set=function(e,t){return this.clone().$set(e,t)},f.get=function(e){return this[C.p(e)]()},f.add=function(i,l){var u,h=this;i=Number(i);var m=C.p(l),p=function(e){var t=k(h);return C.w(t.date(t.date()+Math.round(e*i)),h)};if(m===c)return this.set(c,this.$M+i);if(m===d)return this.set(d,this.$y+i);if(m===a)return p(1);if(m===r)return p(7);var g=(u={},u[s]=e,u[o]=t,u[n]=1e3,u)[m]||1,f=this.$d.getTime()+i*g;return C.w(f,this)},f.subtract=function(e,t){return this.add(-1*e,t)},f.format=function(e){var t=this,i=this.$locale();if(!this.isValid())return i.invalidDate||h;var n=e||"YYYY-MM-DDTHH:mm:ssZ",s=C.z(this),o=this.$H,a=this.$m,r=this.$M,c=i.weekdays,l=i.months,d=function(e,i,s,o){return e&&(e[i]||e(t,n))||s[i].slice(0,o)},u=function(e){return C.s(o%12||12,e,"0")},m=i.meridiem||function(e,t,i){var n=e<12?"AM":"PM";return i?n.toLowerCase():n},g={YY:String(this.$y).slice(-2),YYYY:this.$y,M:r+1,MM:C.s(r+1,2,"0"),MMM:d(i.monthsShort,r,l,3),MMMM:d(l,r),D:this.$D,DD:C.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(o),HH:C.s(o,2,"0"),h:u(1),hh:u(2),a:m(o,a,!0),A:m(o,a,!1),m:String(a),mm:C.s(a,2,"0"),s:String(this.$s),ss:C.s(this.$s,2,"0"),SSS:C.s(this.$ms,3,"0"),Z:s};return n.replace(p,(function(e,t){return t||g[e]||s.replace(":","")}))},f.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},f.diff=function(i,u,h){var m,p=C.p(u),g=k(i),f=(g.utcOffset()-this.utcOffset())*e,b=this-g,v=C.m(this,g);return v=(m={},m[d]=v/12,m[c]=v,m[l]=v/3,m[r]=(b-f)/6048e5,m[a]=(b-f)/864e5,m[o]=b/t,m[s]=b/e,m[n]=b/1e3,m)[p]||b,h?v:C.a(v)},f.daysInMonth=function(){return this.endOf(c).$D},f.$locale=function(){return y[this.$L]},f.locale=function(e,t){if(!e)return this.$L;var i=this.clone(),n=x(e,t,!0);return n&&(i.$L=n),i},f.clone=function(){return C.w(this.$d,this)},f.toDate=function(){return new Date(this.valueOf())},f.toJSON=function(){return this.isValid()?this.toISOString():null},f.toISOString=function(){return this.$d.toISOString()},f.toString=function(){return this.$d.toUTCString()},g}(),S=T.prototype;return k.prototype=S,[["$ms",i],["$s",n],["$m",s],["$H",o],["$W",a],["$M",c],["$y",d],["$D",u]].forEach((function(e){S[e[1]]=function(t){return this.$g(t,e[0],e[1])}})),k.extend=function(e,t){return e.$i||(e(t,T,k),e.$i=!0),k},k.locale=x,k.isDayjs=w,k.unix=function(e){return k(1e3*e)},k.en=y[v],k.Ls=y,k.p={},k}()},function(e,t,i){"use strict";var n=i(6),s=i(0),o=i(2),a=i(9);class ProcessDialog extends OO.ui.ProcessDialog{isUnsaved(){const e=this.actions.get({actions:"save"})[0];return(null==e?void 0:e.isVisible())&&!e.isDisabled()}confirmClose(){if(!this.isUnsaved(this)||confirm(s.a.s(this.constructor.cdKey+"-close-confirm"))){this.close({action:"close"});o.a.removePreventUnloadCondition("dialog")}}handleError(e,t,i){let o;if(e instanceof n.a){const{type:n}=e.data;let a=s.a.s(t);if("network"===n)a+=" "+s.a.s("error-network");o=new OO.ui.Error(a,{recoverable:i})}else o=new OO.ui.Error(s.a.s("error-javascript"),{recoverable:!1});this.showErrors(o);console.warn(e);this.$errors.find(".oo-ui-buttonElement:not(.oo-ui-flaggedElement-primary) > .oo-ui-buttonElement-button").on("click",()=>{if(i)this.updateSize();else this.close()});this.actions.setAbilities({close:!0});this.updateSize();this.popPending()}}Object(a.tweakUserOoUiClass)(ProcessDialog);t.a=ProcessDialog},function(e,t,i){"use strict";var n=i(12),s=i.n(n);t.a=class{constructor(){s()(this,"elements",{});s()(this,"widgets",{})}add(e,t){this.elements[e]=t}addWidget(e,t){this.widgets[e]=t}get(e){var t,i,n;return(null===(t=this.elements[e])||void 0===t?void 0:t.cloneNode(!0))||(null===(i=(n=this.widgets)[e])||void 0===i?void 0:i.call(n).$element[0])||null}getWidget(e){return this.widgets[e]||null}}},function(e,t,i){"use strict";i.r(t);var n=i(3),s=i.n(n),o=i(8),a=i(9),r=i(4);class TextInputWidget extends OO.ui.TextInputWidget{constructor(...e){super(...e);this.$input.on("input",()=>{this.emit("manualChange",this.getValue())})}cdInsertContent(e){this.focus();if(!document.execCommand("insertText",!1,e))this.insertContent(e);return this}getWikitextFromSelection(){const e=document.createElement("div");if("Range"===window.getSelection().type){e.appendChild(window.getSelection().getRangeAt(0).cloneContents());return this.maybeConvertElementToWikitext(Object(r.a)(e,this.$element[0]))}return""}getWikitextFromPaste(e){return this.maybeConvertElementToWikitext(Object(r.a)(Object(r.c)(e),this.$element[0]))}maybeConvertElementToWikitext({element:e,text:t,syntaxHighlightLanguages:i}){var n=this;return s()((function*(){if(!Object(r.j)(e))return t;n.pushPending().setDisabled(!0);const s=yield Object(o.a)(e.innerHTML,i);n.popPending().setDisabled(!1);return s}))()}}Object(a.tweakUserOoUiClass)(TextInputWidget);t.default=TextInputWidget},function(e,t,i){"use strict";var n=i(2);t.a={data:[],init(){n.a.on("beforeReload",e=>{var t;this.close(null!==(t=e.closeNotificationsSmoothly)&&void 0!==t?t:!0)})},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){var n,s=function(){var e=String.fromCharCode,t="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",i="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+-$",n={};function s(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 o={compressToBase64:function(e){if(null==e)return"";var i=o._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 o._decompress(e.length,32,(function(i){return s(t,e.charAt(i))}))},compressToUTF16:function(t){if(null==t)return"";else return o._compress(t,15,(function(t){return e(t+32)}))+" "},decompressFromUTF16:function(e){if(null==e)return"";if(""==e)return null;else return o._decompress(e.length,16384,(function(t){return e.charCodeAt(t)-32}))},compressToUint8Array:function(e){for(var t=o.compress(e),i=new Uint8Array(2*t.length),n=0,s=t.length;n<s;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 o.decompress(t);else{for(var i=new Array(t.length/2),n=0,s=i.length;n<s;n++)i[n]=256*t[2*n]+t[2*n+1];var a=[];i.forEach((function(t){a.push(e(t))}));return o.decompress(a.join(""))}},compressToEncodedURIComponent:function(e){if(null==e)return"";else return o._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 o._decompress(e.length,32,(function(t){return s(i,e.charAt(t))}))},compress:function(t){return o._compress(t,16,(function(t){return e(t)}))},_compress:function(e,t,i){if(null==e)return"";var n,s,o,a={},r={},c="",l="",d="",u=2,h=3,m=2,p=[],g=0,f=0;for(o=0;o<e.length;o+=1){c=e.charAt(o);if(!Object.prototype.hasOwnProperty.call(a,c)){a[c]=h++;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<m;n++){g<<=1;if(f==t-1){f=0;p.push(i(g));g=0}else f++}s=d.charCodeAt(0);for(n=0;n<8;n++){g=g<<1|1&s;if(f==t-1){f=0;p.push(i(g));g=0}else f++;s>>=1}}else{s=1;for(n=0;n<m;n++){g=g<<1|s;if(f==t-1){f=0;p.push(i(g));g=0}else f++;s=0}s=d.charCodeAt(0);for(n=0;n<16;n++){g=g<<1|1&s;if(f==t-1){f=0;p.push(i(g));g=0}else f++;s>>=1}}if(0==--u){u=Math.pow(2,m);m++}delete r[d]}else{s=a[d];for(n=0;n<m;n++){g=g<<1|1&s;if(f==t-1){f=0;p.push(i(g));g=0}else f++;s>>=1}}if(0==--u){u=Math.pow(2,m);m++}a[l]=h++;d=String(c)}}if(""!==d){if(Object.prototype.hasOwnProperty.call(r,d)){if(d.charCodeAt(0)<256){for(n=0;n<m;n++){g<<=1;if(f==t-1){f=0;p.push(i(g));g=0}else f++}s=d.charCodeAt(0);for(n=0;n<8;n++){g=g<<1|1&s;if(f==t-1){f=0;p.push(i(g));g=0}else f++;s>>=1}}else{s=1;for(n=0;n<m;n++){g=g<<1|s;if(f==t-1){f=0;p.push(i(g));g=0}else f++;s=0}s=d.charCodeAt(0);for(n=0;n<16;n++){g=g<<1|1&s;if(f==t-1){f=0;p.push(i(g));g=0}else f++;s>>=1}}if(0==--u){u=Math.pow(2,m);m++}delete r[d]}else{s=a[d];for(n=0;n<m;n++){g=g<<1|1&s;if(f==t-1){f=0;p.push(i(g));g=0}else f++;s>>=1}}if(0==--u){u=Math.pow(2,m);m++}}s=2;for(n=0;n<m;n++){g=g<<1|1&s;if(f==t-1){f=0;p.push(i(g));g=0}else f++;s>>=1}for(;;){g<<=1;if(f==t-1){p.push(i(g));break}else f++}return p.join("")},decompress:function(e){if(null==e)return"";if(""==e)return null;else return o._decompress(e.length,32768,(function(t){return e.charCodeAt(t)}))},_decompress:function(t,i,n){var s,o,a,r,c,l,d,u=[],h=4,m=4,p=3,g="",f=[],b={val:n(0),position:i,index:1};for(s=0;s<3;s+=1)u[s]=s;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;o=d;f.push(d);for(;;){if(b.index>t)return"";a=0;c=Math.pow(2,p);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[m++]=e(a);d=m-1;h--;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[m++]=e(a);d=m-1;h--;break;case 2:return f.join("")}if(0==h){h=Math.pow(2,p);p++}if(u[d])g=u[d];else if(d===m)g=o+o.charAt(0);else return null;f.push(g);u[m++]=o+g.charAt(0);o=g;if(0==--h){h=Math.pow(2,p);p++}}}};return o}();if(1)void 0!==(n=function(){return s}.call(t,i,t,e))&&(e.exports=n)},function(e,t,i){"use strict";var n=i(12),s=i.n(n),o=i(6),a=i(23),r=i(0),c=i(11);class CommentFormInputTransformer extends a.a{constructor(e,t,i){super(e.trim());this.initialText=this.text;this.commentForm=t;this.target=t.getTarget();this.action=i;this.initIndentationData()}initIndentationData(){const e=this.target.source;switch(this.commentForm.getMode()){case"reply":this.indentation=e.replyIndentation;break;case"edit":this.indentation=e.indentation;break;case"replyInSection":{const t=e.extractLastCommentIndentation(this.commentForm);this.indentation=t&&("#"===t[0]||"mimic"===r.a.config.indentationCharMode)?t[0]:r.a.config.defaultIndentationChar;break}default:this.indentation=""}if(this.indentation)this.restLinesIndentation="preview"===this.action?":":this.indentation.replace(/\*/g,":")}isIndented(){return Boolean(this.indentation)}transform(){return this.processAndMaskSensitiveCode().findWrappers().initSignatureAndFixCode().processAllCode().addHeadline().addSignature().addOutdent().addTrailingNewline().addIntentationChars().unmask().getText()}processAndMaskSensitiveCode(){return this.maskSensitiveCode(e=>this.processCode(e,!0))}findWrappers(){if(this.indentation){const e=this.text.match(Object(c.g)(["[a-z]+"]))||[],t=this.text.match(r.a.g.quoteRegexp)||[],i=e.concat(t);this.areThereTagsAroundListMarkup=i.some(e=>/\n[:*#;]/.test(e))}this.wrapInSmall=!1;if(!this.commentForm.headlineInput)this.text=this.text.replace(/^<small>([^]*)<\/small>$/i,(e,t)=>{if(/<\/small>/i.test(t))return e;this.wrapInSmall=!0;return t});return this}initSignatureAndFixCode(){var e;if(null!==(e=this.commentForm.omitSignatureCheckbox)&&void 0!==e&&e.isSelected())this.signature="";else this.signature="edit"===this.commentForm.getMode()?this.target.source.signatureCode:r.a.g.userSignature;if(this.signature&&("edit"!=this.commentForm.getMode()||!/^[ \t]*\n/.test(this.signature))&&/(^|\n)[:*#;].*$/.test(this.text))this.text+="\n";return this}listMarkupToTags(e){return this.constructor.listToTags(this.constructor.linesToLists(e.split("\n").map(e=>({type:"",text:e}))))}handleIndentedComment(e,t){if(!this.indentation)return e;e=e.replace(/^ +/gm,"");if(!r.a.config.paragraphTemplates.length)e=e.replace(/\n\n+/g,"\n");if(/^[:*#;]/m.test(e)&&(t||"#"===this.restLinesIndentation))e=this.listMarkupToTags(e);e=(e=e.replace(new RegExp(`(\\n+)([:*#;\\x03]|${this.constructor.filePatternEnd})`,"gmi"),(e,t,i)=>(t.length>1?"\n\n\n":"\n")+this.constructor.prependIndentationToLine(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 o.a({type:"parse",code:"numberedList-table"});if("#"===this.restLinesIndentation)if(this.constructor.galleryRegexp.test(e))throw new o.a({type:"parse",code:"numberedList"});e=e.replace(/^((?:[:*#;\x03].+|\x01\d+_gallery\x02))(\n+)(?![:#])/gm,(e,t,i)=>t+"\n"+this.constructor.prependIndentationToLine(this.restLinesIndentation,i.length>1?"\n\n":""));const i=r.a.config.paragraphTemplates.length?`$1{{${r.a.config.paragraphTemplates[0]}}}\n`:"$1<br>\n";return e=e.replace(/^(.*)\n\n+(?!:)/gm,i)}processNewlines(e,t=!1){const i=new RegExp(/^\x01\d+_(block|template)\x02 *$/),n=/^(=+).*\1[ \t]*$|^----/,s=new RegExp("^"+this.constructor.filePatternEnd,"i");let o="",a="";if(t){o="|=";a="|\\||}}"}const c=mw.util.escapeRegExp(`{{${r.a.config.paragraphTemplates[0]}}}`),l=new RegExp(`(?:<${r.a.g.pniePattern}(?: [\\w ]+?=[^<>]+?| ?\\/?)>|<\\/${r.a.g.pniePattern}>|\\x01\\d+_block\\x02|\\x04|<br[ \\n]*\\/?>|${c}${o}) *$`,"i"),d=new RegExp(`^(?:<\\/${r.a.g.pniePattern}>|<${r.a.g.pniePattern}${a})`,"i"),u=this.indentation?/^(.+)\n(?![:#])(?=(.*))/gm:/^((?![:*#; ]).+)\n(?![\n:*#; \x03])(?=(.*))/gm;return e=e.replace(u,(e,t,o)=>t+(i.test(t)||i.test(o)||!this.indentation&&(n.test(t)||n.test(o))||s.test(t)||s.test(o)||this.constructor.galleryRegexp.test(t)||this.constructor.galleryRegexp.test(o)||l.test(t)||d.test(o)?"":"<br>")+(this.indentation&&!this.constructor.galleryRegexp.test(o)?"":"\n"))}processCode(e,t){e=this.handleIndentedComment(e,t||this.areThereTagsAroundListMarkup);return e=this.processNewlines(e,t)}processAllCode(){this.text=this.processCode(this.text);return this}addHeadline(){var e;const t=null===(e=this.commentForm.headlineInput)||void 0===e?void 0:e.getValue().trim();if(!t||this.commentForm.isNewSectionApi()&&"submit"===this.action)return this;let i;if("addSection"===this.commentForm.getMode())i=2;else if("addSubsection"===this.commentForm.getMode())i=this.target.level+1;else i=this.target.source.headingLevel;const n="=".repeat(i);if("addSection"===this.commentForm.getMode()||"edit"===this.commentForm.getMode()&&this.commentForm.getTarget().isOpeningSection&&/^\n/.test(this.target.source.code))this.text="\n"+this.text;this.text=`${n} ${t} ${n}\n${this.text}`;return this}addSignature(){var e;if(null===(e=this.commentForm.omitSignatureCheckbox)||void 0===e||!e.isSelected())this.text=this.text.replace(/\s*~{3,}$/,"");if("preview"===this.action&&this.signature)this.signature=`<span class="cd-commentForm-signature">${this.signature}</span>`;if(!this.indentation&&/(^|\n)[ =].*$/.test(this.text))this.text+="\n";if(!this.text||this.text.endsWith("\n")||this.text.endsWith(" "))this.signature=this.signature.trimLeft();if(this.wrapInSmall){const e=/^[:*#; ]/.test(this.text)?"\n"+(this.indentation?this.restLinesIndentation:""):"";if(r.a.config.smallDivTemplates.length&&!/^[:*#;]/m.test(this.text)){const e=Object(c.d)(this.text.trim(),this.maskedTexts)+this.signature;this.text=`{{${r.a.config.smallDivTemplates[0]}|1=${e}}}`}else this.text=`<small>${e}${this.text}${this.signature}</small>`}else this.text+=this.signature;return this}addOutdent(){var e;if("preview"===this.action||null===(e=this.target.source)||void 0===e||!e.isReplyOutdented)return this;const t=this.target.level-this.target.source.replyIndentation.length;this.text=`{{${r.a.config.outdentTemplates[0]}|${t}}}`+(/^[:*#]+/.test(this.text)?"\n":" ")+this.text;return this}addTrailingNewline(){if("edit"!==this.commentForm.getMode())this.text+="\n";return this}addIntentationChars(){if(this.indentation&&"preview"!==this.action&&/^[*#;\x03]/.test(this.text))this.indentation=this.restLinesIndentation;if("preview"!==this.action){this.text=this.constructor.prependIndentationToLine(this.indentation,this.text);if("addSubsection"===this.mode)this.text+="\n"}else if("preview"===this.action&&this.indentation&&this.initialText)this.text=this.constructor.prependIndentationToLine(":",this.text);return this}static init(){this.filePatternEnd=`\\[\\[${r.a.g.filePrefixPattern}.+\\]\\]$`}static linesToLists(e,t=!1){let i={items:[]};for(let n=0;n<=e.length;n++)if(n===e.length){if(i.type)this.lineToList(e,n,i,t)}else{const s=e[n].text,o=s[0]||"",a=this.listTags[o];if(i.type&&a!==i.type){const s=i.items.length;this.lineToList(e,n,i,t);n-=s-1;i={items:[]}}if(a){i.type=a;i.items.push({type:this.itemTags[o],text:s.slice(1)})}}return e}static lineToList(e,t,i,n=!1){if(n){const n=t-i.items.length-1;if(n>=0){const t={type:e[n].type,items:[e[n],i]};e.splice(n,i.items.length+1,t)}else{const n={type:e[0].type,items:[i]};e.splice(t-i.items.length,i.items.length,n)}}else e.splice(t-i.items.length,i.items.length,i);this.linesToLists(i.items,!0)}static listToTags(e,t=!1){let i="";e.forEach((n,s)=>{if(void 0===n.text){const e=n.items.map(e=>{const t=void 0===e.text?this.listToTags(e.items,!0):e.text.trim();return e.type?`<${e.type}>${t}</${e.type}>`:t}).join("");i+=`<${n.type}>${e}</${n.type}>`}else i+=t?n.text.trim():n.text;if(s!==e.length-1)i+="\n"});return i}static prependIndentationToLine(e,t){return e+(e&&r.a.config.spaceAfterIndentationChars&&!/^[:*#;]/.test(t)?" ":"")+t}}s()(CommentFormInputTransformer,"galleryRegexp",/^\x01\d+_gallery\x02$/m);s()(CommentFormInputTransformer,"listTags",{":":"dl",";":"dl","*":"ul","#":"ol"});s()(CommentFormInputTransformer,"itemTags",{":":"dd",";":"dt","*":"li","#":"li"});t.a=CommentFormInputTransformer},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","ko":"Y\ub144 M\uc6d4 j\uc77c (D) H:i","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,t,i){"use strict";var n=i(30);class ElementsAndTextTreeWalker extends n.a{constructor(e,t){super(t,e=>e.nodeType===Node.TEXT_NODE||e.nodeType===Node.ELEMENT_NODE);if(e)this.currentNode=e}}t.a=ElementsAndTextTreeWalker},function(e,t,i){"use strict";var n=i(6),s=i(42),o=i(24),a=i(0),r=i(1);class CommentSkeleton{constructor(e,t,i){var n,s;this.parser=e;const o=i.indexOf(t);this.followsHeading="heading"===(null===(n=i[o-1])||void 0===n?void 0:n.type);const r=this.followsHeading?i[o-1].element:void 0;this.signatureElement=t.element;this.signatureText=t.element.textContent;this.date=t.date||null;this.authorName=t.authorName;this.id=CommentSkeleton.generateId(this.date,this.authorName,e.existingCommentIds);this.collectParts(r);this.removeNestedParts();this.wrapInlineParts();this.filterParts();this.parts.reverse();this.replaceListsWithItems();this.wrapNumberedList();this.index=a.a.comments.length;this.timestamp=null===(s=t.timestampText)||void 0===s?void 0:s.replace(/ {2,}/g," ");this.timestampElement=t.timestampElement;this.extraSignatures=t.extraSignatures;this.authorLink=t.authorLink;this.authorTalkLink=t.authorTalkLink;this.isOwn=this.authorName===a.a.g.userName;this.isUnsigned=t.isUnsigned;this.elements=this.parts.map(e=>e.node);this.updateHighlightables();this.updateLevels();if(this.parts[0].isHeading&&0!==this.level){this.parts.shift();this.elements.shift()}if(this.parts[0].isHeading)this.isOpeningSection=!0;else this.isOpeningSection=!1;this.addAttributes();this.section=null;this.isOutdented=!1;t.comment=this}getStartNodes(e){for(;Object(r.v)(e.currentNode.parentNode);)e.parentNode();const t=e.currentNode;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(r.v)(e.currentNode,!0)&&!Object(r.w)(e.currentNode))i=e.currentNode}const n=[];if(i&&t.parentNode.contains(i)||t.parentNode.getElementsByClassName("cd-signature",2).length>1||!this.isElementEligible(t.parentNode,e,"start")||[...t.parentNode[this.parser.context.childElementsProp]].some(e=>this.parser.rejectClasses.some(t=>e.classList.contains(t)))){e.currentNode=t;for(;e.nextSibling()&&(Object(r.v)(e.currentNode,!0)||Object(r.w)(e.currentNode));)n.push({node:e.currentNode,isTextNode:e.currentNode.nodeType===Node.TEXT_NODE,isHeading:!1,hasCurrentSignature:!1,hasForeignComponents:!1,step:"start"});n.reverse();e.currentNode=t}else e.currentNode=t.parentNode;n.push({node:e.currentNode,isTextNode:!1,isHeading:!1,hasCurrentSignature:!0,hasForeignComponents:!1,step:"start"});return[n,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.rejectClasses.some(t=>e.classList.contains(t))||a.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")||null!==(n=(s=a.a.config).rejectNode)&&void 0!==n&&n.call(s,e,this.context))}isOtherKindOfList(e){return"UL"===e.tagName&&(e.classList.contains("gallery")||"navigation"===e.getAttribute("role"))}isIntroList(e,t,i){const n=e.tagName;if(!["DL","UL","OL"].includes(n))return!1;const s=e.previousElementSibling,o=e.nextElementSibling;let a="DL"===n&&e.firstChild&&"DT"===e.firstChild.tagName||["DL","UL"].includes(n)&&s&&Object(r.u)(s)&&o&&!["DL","OL"].includes(o.tagName)&&!this.isPartOfList(i,!0)&&!this.parser.context.getElementByClassName(e,"cd-signature")||this.isOtherKindOfList(e);if(t&&!a&&o&&"OL"!==n){const t=this.parser.getTopElementsWithText(e).levelsPassed,i=this.parser.getTopElementsWithText(o).levelsPassed;a=i>t||1===t&&i===t&&e[this.parser.context.childElementsProp].length>1&&n!==o.tagName}return a}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:s,previousPart:o}){return"back"===e&&(!o||"up"===o.step)&&(!["DD","LI"].includes(i.parentNode.tagName)||"OL"===n.tagName&&n[this.parser.context.childElementsProp][0].contains(this.signatureElement))&&(["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,s)||i.nodeType===Node.TEXT_NODE&&i.previousSibling&&["DL","UL","OL"].includes(i.previousSibling.tagName)&&!this.isIntroList(i.previousSibling,!1,s)||s&&!this.isPartOfList(s,!1))&&!(["UL","OL"].includes(n.tagName)&&n[this.parser.context.childElementsProp].length>1&&!n[this.parser.context.childElementsProp][0].contains(this.signatureElement))}isUnsignedItem(e){var t;if("back"!==e.step||"LI"!==e.node.tagName||"ru.wikipedia.org"===a.a.g.serverName)return!1;const i=e.node.querySelectorAll("a")[0];if(!i)return!1;else return Boolean(null===(t=this.parser.constructor.processLink(i))||void 0===t?void 0:t.userName)}traverseDom(e,t,i,s){for(let c=0;c<500;c++){let c;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(r.v)(t.currentNode,!0)){t.currentNode=e;break}c="dive"}if("dive"!==c)break}else if(t.previousSibling())c="back";else{if(!t.parentNode())break;c="up"}const d=t.currentNode;if(this.isIntro({step:c,stage:1,node:d,nextNode:l.node,previousPart:l}))break;const u=d.nodeType===Node.TEXT_NODE;let h=null,m=null,p=null;if(!u){var o;if(!this.isElementEligible(d,t,c))break;if("up"===c&&d.classList.contains("cd-comment-part"))throw new n.a;h=Object(r.u)(d);m=d.contains(this.signatureElement);const e=d.getElementsByClassName("cd-signature",Number(m)+1).length;p=Boolean(!Object(r.v)(d)&&(e-Number(m)>0||i&&d.contains(i)&&"TABLE"!==d.tagName||s&&d!==s&&d.contains(s)));if(!m&&!Object(r.v)(d)&&null!==(o=a.a.g.signatureEndingRegexp)&&void 0!==o&&o.test(d.textContent)&&!this.parser.noSignatureElements.some(e=>e.contains(d)))break}e.push({node:d,isTextNode:u,isHeading:h,hasCurrentSignature:m,hasForeignComponents:p,step:c});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}}}wrapInlineParts(){const e=[];let t=null,i=!1;for(let n=0;n<=this.parts.length;n++){const s=this.parts[n];if(s&&(null===t||["back","start"].includes(s.step))&&!s.hasForeignComponents&&!s.isHeading){if(null===t)if(Object(r.v)(s.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&&(s.isTextNode&&s.node.textContent.trim()||Object(r.v)(s.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"),s=this.parts[i.start].node.nextSibling,o=this.parts[i.start].node.parentNode;for(let e=i.end;e>=i.start;e--)n.appendChild(this.parts[e].node);o.insertBefore(n,s);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>=1;e--){var t,i;const n=this.parts[e].node;if("P"===n.tagName&&!n.textContent.trim()&&[...n[this.parser.context.childElementsProp]].every(e=>"BR"===e.tagName)||Object(r.w)(n)||Array.from(n.classList).some(e=>["references","reflist-talk"].includes(e))||"DL"===n.tagName&&this.parts[e-1]&&(null===(t=n.nextElementSibling)||void 0===t?void 0:null===(i=t.firstElementChild)||void 0===i?void 0:i.firstElementChild)===this.parts[e-1].node||this.parser.noSignatureElements.some(e=>e.contains(n))||"up"!==this.parts[e].step&&this.parser.context.areThereOutdents()&&this.parser.context.getElementByClassName(n,a.a.config.outdentClass))this.parts.splice(e,1);else break}const n=null===(e=this.parts[this.parts.length-1])||void 0===e?void 0:e.node;if("P"===n.tagName){var s;if("BR"===(null===(s=n.firstChild)||void 0===s?void 0:s.tagName))n.parentNode.insertBefore(n.firstChild,n)}for(let e,t=this.parts.length-1;t>=1;t--){const i=this.parts[t];if(i.isHeading)continue;if(this.isUnsignedItem(i)){this.parts.splice(t);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.isOtherKindOfList(n.node)&&!("up"===n.step&&this.parts[e+1]&&("UL"!==n.node.tagName&&this.isPartOfList(this.parts[e+1].node,!1)&&"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,s;const o=e.nextSibling,a=e.parentNode;if(i){s=document.createElement("dd");n=document.createElement("dl");n.appendChild(s)}else{s=document.createElement("div");n=s}s.appendChild(e);a.insertBefore(n,o);const r={node:s,isTextNode:!1,isHeading:!1,hasCurrentSignature:!0,hasForeignComponents:!1,step:"replaced"};this.parts.splice(0,t.length,r)}}}}updateHighlightables(){this.highlightables=this.elements.filter(e=>!(Object(r.u)(e)||Object(r.w)(e)||a.a.g.noHighlightClasses.some(t=>e.classList.contains(t))||"FIGURE"===e.tagName&&/\b(mw:File\/(Thumb|Frame))/.test(e.getAttribute("typeof"))||/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(r.K).filter(e=>a.a.g.badHighlightableElements.includes(e.tagName)||this.highlightables.length>1&&"LI"===e.tagName&&"OL"===e.parentNode.tagName||e.className&&"cd-comment-replacedPart"!==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.signatureElement,...this.extraSignatures.map(e=>e.element)].forEach(e=>{e.classList.add("cd-signature-timestamp")});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 o.a(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 s=Array(Number(n[1]));if(t)s[s.length-1]=e;i.unshift(...s)}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 s,o;for(let e=i.length-2;e>=0;e--)if(i[e].length>n.length){s=e;o=this.elements[e];break}if(n.length>0||null!==(t=o.lastElementChild)&&void 0!==t&&t.classList.contains("cd-timestamp")){this.elements.splice(0,s+1);this.updateHighlightables();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.updateHighlightables()}}updateLevels(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=a.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";a.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())a.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(r.k)(e)+"_"+Object(r.H)(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(!a.a.isWorker)[...e.childNodes].forEach(e=>{var i,n;const s=null===(i=e.style)||void 0===i?void 0:i.width;if(s){const[,t,i]=s.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(a.a.config.outdentClass)].reverse().forEach(t=>{let i,n;const s=new o.a(t,e.context.rootElement);for(;s.nextNode()&&!i;){let o=s.currentNode.getAttribute("data-cd-comment-index");if("0"===o)break;if(null!==o){o=Number(o);i=a.a.comments[o];for(let e=o-1;e>=0;e--){const t=a.a.comments[e];if(t.section!==i.section)break;if(i.date>=t.date){n=t;break}}if(!n)break;if(n.index!==o-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");a.a.comments.slice(o).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('{"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";var n=i(12),s=i.n(n),o=i(16),a=i(6),r=i(24),c=i(36),l=i(18),d=i(0),u=i(7),h=i(2),m=i(5),p=i(28),g=i(8),f=i(1),b=i(4);class Thread{constructor(e){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=h.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.initBoundingElements();this.isCollapsed=!1}initBoundingElements(){var e;let t,i,n,s;const o=this.rootComment.elements.find(e=>!Object(f.u)(e)),r=this.lastComment.highlightables,c=this.visualLastComment.highlightables,l=this.visualLastCommentFallback.highlightables,d=null===(e=u.a.getByIndex(this.lastComment.index+1))||void 0===e?void 0:e.elements[0];if(0===this.rootComment.level){t=o;n=this.constructor.findEndElement(t,c,d);s=this.visualLastComment===this.visualLastCommentFallback?n:this.constructor.findEndElement(t,l,d);i=this.hasOutdents?this.constructor.findEndElement(t,r,d):n}else{t=this.constructor.findItemElement(o,this.rootComment.level,d)||o;const e=r[r.length-1];if(this.hasOutdents){const o=u.a.getAll().slice(0,this.lastComment.index+1).reverse().find(e=>e.isOutdented);i=0===o.level?this.constructor.findEndElement(t,r,d):this.constructor.findItemElement(e,Math.min(o.level,this.rootComment.level),d);n=this.constructor.findItemElement(c[c.length-1],this.rootComment.level,d);s=this.visualLastComment===this.visualLastCommentFallback?n:this.constructor.findItemElement(l[l.length-1],this.rootComment.level,d)}else{i=this.constructor.findItemElement(e,this.rootComment.level,d)||e;s=n=i}}if(!(t&&i&&n&&s))throw new a.a;this.startElement=t;this.endElement=i;this.visualEndElement=n;this.visualEndElementFallback=s}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=this.constructor.prototypes.get("clickArea");this.clickArea.title=d.a.s("thread-tooltip");this.clickArea.onmouseenter=this.handleClickAreaHover.bind(this);this.clickArea.onmouseleave=this.handleClickAreaUnhover.bind(this);this.clickArea.onclick=this.handleToggleClick.bind(this);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=u.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(b.h)(i.getBoundingClientRect())){i=this.visualEndElementFallback;if(!Object(b.h)(i.getBoundingClientRect())&&this.rootComment.editForm)i=this.rootComment.editForm.getOutermostElement()}}else{t=this.lastComment;i=this.endElement}const s=(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!=s&&s.is(":visible")?this.constructor.findItemElement(s[0],this.rootComment.level):i}getAdjustedStartElement(){if(this.isCollapsed)return this.expandNote;if(this.startElement.classList.contains("cd-hidden")&&this.rootComment.editForm)return this.rootComment.editForm.getOutermostElement();else return this.startElement}getUsersInThread(){return[this.rootComment,...this.rootComment.getChildren(!0)].map(e=>e.author).filter(f.K)}addExpandNode(e){const t=this.constructor.prototypes.get("expandButton"),i=new o.a({tooltip:d.a.s("thread-expand-tooltip",d.a.g.cmdModifier),action:this.onExpandNoteClick.bind(this),element:t,buttonElement:t.firstChild,labelElement:t.querySelector(".oo-ui-labelElement-label")}),n=this.getUsersInThread(),s=n.map(e=>e.getName()).join(d.a.mws("comma-separator")),a=e=>{i.setLabel(d.a.s(e?"thread-expand-label-genderless":"thread-expand-label",this.commentCount,n.length,s,Object(f.m)(n)));i.element.classList.remove("cd-thread-button-invisible")};if(d.a.g.genderAffectsUserString)(e||Object(g.g)(n)).then(a,()=>{a(!0)});else a();const r=this.collapsedRange[0],c=["LI","DD"].includes(r.tagName)?r.tagName:"DIV",l=document.createElement(c);l.className="cd-thread-button-container cd-thread-expandNote";if(r.classList.contains("cd-connectToPreviousItem"))l.className+=" cd-connectToPreviousItem";l.appendChild(i.element);if("OL"===r.parentNode.tagName&&"ol"!==this.rootComment.ahContainerListType){const e=document.createElement("ul");e.className="cd-commentLevel";e.appendChild(l);r.parentNode.parentNode.insertBefore(e,r.parentNode);this.expandNoteContainer=e}else r.parentNode.insertBefore(l,r);this.expandNote=l;this.$expandNote=$(l)}onExpandNoteClick(e){if(Object(b.i)(e)){u.a.getAll().slice().reverse().forEach(e=>{var t;if(null!==(t=e.thread)&&void 0!==t&&t.isCollapsed)e.thread.expand()});this.comments[0].scrollTo()}else this.expand()}collapse(e,t=!1){if(!this.isCollapsed){this.collapsedRange=Object(b.g)(this.getAdjustedStartElement(),this.getAdjustedEndElement(),h.a.rootElement);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;e=null!==(i=u.a.getByIndex(e).collapse(this))&&void 0!==i?i:e}this.addExpandNode(e);if(!t)this.$expandNote.cdScrollIntoView();if(this.rootComment.isOpeningSection){var n,s;null===(n=this.rootComment.section.actions.moreMenuSelect)||void 0===n||null===(s=n.getMenu().findItemFromData("editOpeningComment"))||void 0===s||s.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 o;null===(o=t.line)||void 0===o||o.classList.remove("cd-thread-line-extended")}}if(!t)this.constructor.saveCollapsedThreads();this.constructor.updateLines();h.a.handleScroll()}}expand(e=!1){var t;if(!this.isCollapsed)return;this.collapsedRange.forEach(e=>{const t=$(e),i=t.data("cd-collapsed-thread-root-comments")||[];Object(f.E)(i,this.rootComment);t.data("cd-collapsed-thread-root-comments",i);if(!i.length&&!t.data("cd-comment-form"))e.classList.remove("cd-hidden")});this.expandNote.remove();this.expandNote=null;null===(t=this.expandNoteContainer)||void 0===t||t.remove();this.expandNoteContainer=null;if(this.rootComment.isOpeningSection){var i,n;null===(i=this.rootComment.section.actions.moreMenuSelect)||void 0===i||null===(n=i.getMenu().findItemFromData("editOpeningComment"))||void 0===n||n.setDisabled(!1)}this.isCollapsed=!1;let s=!1;for(let e=this.rootComment.index;e<=this.lastComment.index;e++){var o;const t=u.a.getByIndex(e);e=null!==(o=t.expand())&&void 0!==o?o:e;if(t.isOutdented)s=!0}if(this.endElement!==this.visualEndElement&&s)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")}}if(!e)this.constructor.saveCollapsedThreads();this.constructor.updateLines();h.a.handleScroll()}toggle(){if(this.isCollapsed)this.expand();else this.collapse()}updateLine({elementsToAdd:e,threadsToUpdate:t,scrollX:i,scrollY:n,floatingRects:s}){var o;const a=(e,t,n)=>{let s;const o=(d.a.g.commentMarkerWidth-1)/2/d.a.g.pixelDeviationRatio;if("ltr"===n){s=e.left-o;if(t)s-=t.left+1}else{s=e.right-d.a.g.commentMarkerWidth/d.a.g.pixelDeviationRatio+o;if(t)s+=t.right+1}if(e instanceof DOMRect)s+=i;return s-d.a.g.threadLineSidePadding},r=this.rootComment;if(r.isCollapsed&&!this.isCollapsed){this.removeLine();return!1}const c=0===r.level||"ol"===r.containerListType||"DIV"===this.startElement.tagName,l=this.isCollapsed||!c?this.getAdjustedStartElement().getBoundingClientRect():void 0,u=l||r.getOffset({floatingRects:s}),h=c?r.getMargins():void 0;let m,p;const g=r.getDirection();if(u){m=(e=>e instanceof DOMRect?n+e.top:e.top)(u);p=a(u,h,g)}const v=this.isCollapsed?l:null===(o=this.getAdjustedEndElement(!0))||void 0===o?void 0:o.getBoundingClientRect();if(void 0===m||!v||!Object(b.h)(...[l,v].filter(f.h))||!(()=>{const e=a(v,h,g);return"ltr"===g?e>=p:e<=p})()){this.removeLine();return!1}const y=v.bottom-(m-n);if(this.clickAreaOffset&&m===this.clickAreaOffset.top&&p===this.clickAreaOffset.left&&y===this.clickAreaOffset.height)return!r.getParent();this.clickAreaOffset={top:m,left:p,height:y};if(!this.line)this.createLine();t.push(this);if(!this.clickArea.parentNode)e.push(this.clickArea);return!1}updateClickAreaOffset(){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 initPrototypes(){this.prototypes=new c.a;this.prototypes.add("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[0]);const e=document.createElement("div");e.className="cd-thread-clickArea";const t=document.createElement("div");t.className="cd-thread-line";e.appendChild(t);this.prototypes.add("clickArea",e)}static init(e=!0){this.enabled=m.a.get("enableThreads");if(this.enabled){if(!this.isInited){h.a.on("resize",this.updateLines.bind(this)).on("mutate",()=>{$(document).off("mousemove.cd").one("mousemove.cd",this.updateLines.bind(this))});$(document).on("visibilitychange",this.updateLines.bind(this));p.a.on("newChanges",this.init.bind(this,!1))}this.collapseThreadsLevel=m.a.get("collapseThreadsLevel");this.treeWalker=new r.a(void 0,h.a.rootElement);u.a.getAll().forEach(e=>{try{var t;null===(t=e.thread)||void 0===t||t.expand(!0);e.thread=new Thread(e)}catch(e){}});if(!this.threadLinesContainer){this.threadLinesContainer=document.createElement("div");this.threadLinesContainer.className="cd-threadLinesContainer"}else this.threadLinesContainer.innerHTML="";this.updateLines();if(!this.threadLinesContainer.parentNode)document.body.appendChild(this.threadLinesContainer);if(e)this.autocollapseThreads();this.isInited=!0}else new l.a("collapsedThreads").removeItem()}static autocollapseThreads(){var e;const t=new l.a("collapsedThreads").cleanUp(e=>{var t;return!(null!==(t=e.collapsedThreads||e.threads)&&void 0!==t&&t.length)||(e.saveTime||e.saveUnixTime)<Date.now()-60*d.a.g.msInDay}),i=t.get(mw.config.get("wgArticleId"))||{},n=[];null===(e=i.collapsedThreads||i.threads)||void 0===e||e.forEach(e=>{const t=u.a.getById(e.id);if(null!=t&&t.thread)if(e.collapsed)n.push(t);else t.thread.wasManuallyExpanded=!0;else Object(f.E)(i.collapsedThreads||i.threads,e)});if(0!==this.collapseThreadsLevel)for(let e=0;e<u.a.getCount();e++){const t=u.a.getByIndex(e);if(t.thread)if(t.level>=this.collapseThreadsLevel){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 s=d.a.g.genderAffectsUserString?Object(g.g)(Object(f.j)(n.map(e=>e.thread.getUsersInThread()))):void 0;n.sort((e,t)=>e.index-t.index).forEach(e=>{e.thread.collapse(s,!0)});if(h.a.isCurrentRevision())t.setWithTime(mw.config.get("wgArticleId"),i.collapsedThreads).save()}static findItemElement(e,t,i){this.treeWalker.currentNode=e;let n,s=e;do{if(this.treeWalker.currentNode.classList.contains("cd-commentLevel")){const e=this.treeWalker.currentNode.getAttribute("class").match(/cd-commentLevel-(\d+)/);if(e&&Number(e[1])===(t||1)){n=0===t?this.treeWalker.currentNode:s;if(i&&n.contains(i))return null;break}}s=this.treeWalker.currentNode}while(this.treeWalker.parentNode());return n||null}static findEndElement(e,t,i){let n=e;const s=t[t.length-1];do{n=n.parentNode}while(!n.contains(s));let o=s;for(let e=o.parentNode;!(e===n||i&&e.contains(i));e=e.parentNode)o=e;for(let e=o.nextElementSibling;e&&"DL"===e.tagName&&e.classList.contains("cd-section-button-container");e=e.nextElementSibling)o=e;return o}static updateLines(){if(!this.enabled||document.hidden)return;const e=[],t=[],i=window.scrollX,n=window.scrollY,s=h.a.getFloatingElements().map(b.d);u.a.getAll().slice().reverse().some(o=>{var a;return(null===(a=o.thread)||void 0===a?void 0:a.updateLine({elementsToAdd:e,threadsToUpdate:t,scrollX:i,scrollY:n,floatingRects:s}))||!1});t.forEach(e=>{e.updateClickAreaOffset()});if(e.length)this.threadLinesContainer.append(...e)}static saveCollapsedThreads(){if(h.a.isCurrentRevision())new l.a("collapsedThreads").setWithTime(mw.config.get("wgArticleId"),u.a.query(e=>e.thread&&e.thread.isCollapsed!==Boolean(e.thread.isAutocollapseTarget)).map(e=>({id:e.id,collapsed:e.thread.isCollapsed}))).save()}}s()(Thread,"isInited",!1);t.a=Thread},function(e,t,i){"use strict";i.d(t,"b",(function(){return j}));i.d(t,"a",(function(){return M}));var n=i(3),s=i.n(n),o=i(13),a=i(36),r=i(0),c=i(7),l=i(2),d=i(25),u=i(20),h=i(5),m=i(1),p=i(14);let g,f,b,v,y,w,x,k;const C=new a.a;function T(){return S.apply(this,arguments)}function S(){return(S=s()((function*(){d.a.globals();yield h.a.init();const e=[...d.a.getSiteData()];if(r.a.user.isRegistered()&&!h.a.get("useTopicSubscription")){k=l.a.getSubscriptionsInstance();e.push(k.load(void 0,!0).catch(()=>{}))}try{yield Promise.all(e)}catch(e){throw["Couldn't load the data required for the script.",e]}mw.loader.addStyleTag(`:root {\n    --cd-parentheses-start: '${r.a.mws("parentheses-start")}';\n    --cd-parentheses-end: '${r.a.mws("parentheses-end")}';\n  }`);g=r.a.mws("colon-separator",{language:"content"}).trim();[f]=r.a.s("es-move-from").match(/^[^[$]+/)||[];[b]=r.a.s("es-move-to").match(/^[^[$]+/)||[];v=y=r.a.s("lp-comment-tooltip")+" ";v+=r.a.mws("parentheses",r.a.s("lp-comment-toyou"));y+=r.a.mws("parentheses",r.a.s("lp-comment-watchedsection"));const t=$("<a>").text(r.a.s("lp-comment")).attr("title",r.a.s("lp-comment-tooltip")),i=$("<span>").addClass("cd-commentLink-innerWrapper").append(t),n=$("<span>").addClass("cd-commentLink").append(i).prepend(" ");C.add("wrapperRegular",n[0]);C.add("wrapperRelevant",n.clone().addClass("cd-commentLink-relevant")[0]);const s=Object(m.l)(r.a.g.userName);w=new RegExp(`(?:^|[^${r.a.g.letterPattern}])${s}(?![${r.a.g.letterPattern}])`)}))).apply(this,arguments)}function E(){if(!k)return;mw.hook("wikipage.content").add(()=>{var e;null===(e=x)||void 0===e||e.setFlags({progressive:!1})});const e=$("<div>").addClass("cd-watchlistMenu");$("<a>").attr("href",mw.util.getUrl(r.a.config.scriptPageWikilink)).attr("target","_blank").addClass("cd-watchlistMenu-scriptPageLink").text(r.a.s("script-name-short")).appendTo(e);x=new OO.ui.ButtonWidget({framed:!1,icon:"speechBubble",label:r.a.s("wl-button-switchrelevant-tooltip",mw.user),invisibleLabel:!0,title:r.a.s("wl-button-switchrelevant-tooltip",mw.user),classes:["cd-watchlistMenu-button","cd-watchlistMenu-button-switchRelevant"],disabled:!k.areLoaded()});x.on("click",()=>{!function(){const e=!$(".mw-changeslist").find("ul.special").length,t=l.a.$content.find(".mw-changeslist .mw-collapsible:not(.mw-changeslist-legend)"),i=l.a.$content.find(".mw-changeslist-line:not(table)");if(x.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()}x.setFlags({progressive:!x.hasFlag("progressive")})}()});x.$element.appendTo(e);const t={framed:!1,icon:"listBullet",label:r.a.s("wl-button-editwatchedsections-tooltip",mw.user),invisibleLabel:!0,title:r.a.s("wl-button-editwatchedsections-tooltip",mw.user),classes:["cd-watchlistMenu-button","cd-watchlistMenu-button-editSubscriptions"]},i=new OO.ui.ButtonWidget(t);i.on("click",()=>{l.a.showEditSubscriptionsDialog()});i.$element.appendTo(e);const n=new OO.ui.ButtonWidget({framed:!1,icon:"settings",label:r.a.s("wl-button-settings-tooltip"),invisibleLabel:!0,title:r.a.s("wl-button-settings-tooltip"),classes:["cd-watchlistMenu-button","cd-watchlistMenu-button-scriptSettings"]});n.on("click",()=>{Object(p.f)();h.a.showDialog()});n.$element.appendTo(e);l.a.$content.find(".mw-rcfilters-ui-changesLimitAndDateButtonWidget").prepend(e);l.a.$content.find("#mw-watchlist-options .mw-changeslist-legend").after(e)}function O(e){var t;return"www.wikidata.org"===r.a.g.serverName&&(null===(t=e.firstElementChild)||void 0===t?void 0:t.classList.contains("wb-itemlink"))}function N(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 P(e){return f&&e.includes(": "+f)||b&&e.includes(": "+b)}function L(e,t){if(!t)return!1;else return"ltr"===r.a.g.contentDirection?e.includes(`\u2192${t}${g}`)||e.endsWith("\u2192"+t):e.includes(`\u2190${t}${g}`)||e.endsWith("\u2190"+t)}function I(e){if(null!=e&&e.parent().is(l.a.$content)&&l.a.$root)return;if(!r.a.g.uiTimestampRegexp)d.a.timestampParsingTools("user");if(null===r.a.g.uiTimezone)return;const t=e||l.a.$content,i=t[0];[i.querySelector(".diff-otitle"),i.querySelector(".diff-ntitle")].filter(m.i).forEach(t=>{var i,n;if(t.querySelector(".minoredit"))return;null===(i=t.querySelector(".cd-commentLink"))||void 0===i||i.remove();let s=null===(n=t.querySelector(".comment"))||void 0===n?void 0:n.textContent;s&&(s=Object(m.C)(s));if(s&&(Object(m.t)(s)||Object(m.y)(s)||P(s)||function(e){return e.includes("Archiving")}(s)))return;const a=t.querySelector("#mw-diff-otitle1 a, #mw-diff-ntitle1 a");if(!a)return;const{date:d}=Object(p.g)(a.textContent,r.a.g.uiTimezone)||{};if(!d)return;const h=N(t);if(!h)return;const g=o.a.generateId(d,h);let f,b;if(e)b=u.a.get(new URL(a.href).searchParams.get("title"));else f=c.a.getById(g,!0);if(f||e&&b.isProbablyTalkPage()){let i;if(s&&w.test(` ${s} `)){i=C.get("wrapperRelevant");i.lastChild.lastChild.title=v}else{var x;let t=!1;const n=(null===(x=k)||void 0===x?void 0:x.getForCurrentPage())||[];if(!e&&s&&n.length){t=n.find(e=>L(s,e));if(t){i=C.get("wrapperRelevant");i.lastChild.lastChild.title=y}}if(!t)i=C.get("wrapperRegular")}const n=i.lastChild.lastChild;if(e){n.href=b.getUrl()+"#"+g;if(l.a.isTalkPage())n.target="_blank"}else{n.href="#"+g;n.onclick=e=>{e.preventDefault();f.scrollTo({smooth:!1,pushState:!0})}}const o=t.querySelector("#mw-diff-otitle3, #mw-diff-ntitle3");if(!o)return;o.appendChild(i)}});mw.hook("convenientDiscussions.commentLinksAdded").fire(t,r.a)}function D(e){if(e.parent().length){if(l.a.isWatchlistPage())!function(e){if("Watchlist"===mw.config.get("wgCanonicalSpecialPageName")&&!l.a.$content.find(".cd-watchlistMenu").length){if(mw.user.options.get("wlenhancedfilters-disable"))E();else mw.hook("structuredChangeFilters.ui.initialized").add(()=>{E()});if(k)$(".mw-rcfilters-ui-filterWrapperWidget-showNewChanges a").on("click",s()((function*(){yield k.load()})))}e[0].querySelectorAll(".mw-changeslist-line[data-mw-revid]").forEach(e=>{var t,i;const n=e.className?e:e.parentNode.parentNode,s=n.className.match(/mw-changeslist-ns(\d+)/),o=s&&Number(s[1]);if(null===o)return;const a=("TR"===n.tagName?n.parentNode:n).querySelector(".mw-changeslist-title");if(!a||O(a))return;const c=a.textContent;if(!Object(m.x)(c,o))return;if(n.querySelector(".minoredit"))return;let l=null===(t=n.querySelector(".comment"))||void 0===t?void 0:t.textContent;l&&(l=Object(m.C)(l));if(l&&(Object(m.t)(l)||Object(m.y)(l)||P(l)))return;const d=n.querySelector(".mw-plusminus-pos");if(!d)return;if("STRONG"!==d.tagName){const e=d.textContent.match(/\d+/),t=e&&Number(e[0]);if(!t||t<r.a.config.bytesToDeemComment)return}const u=null===(i=n.getAttribute("data-mw-ts"))||void 0===i?void 0:i.slice(0,12);if(!u)return;const h=N(n);if(!h)return;const p=u+"_"+Object(m.H)(h),g=a.href;if(!g)return;let f;if(l&&w.test(` ${l} `)){f=C.get("wrapperRelevant");f.lastChild.lastChild.title=v}else{let e=!1;if(l){var b;const t=n.querySelector(".mw-changeslist-diff-cur")||n.querySelector(".mw-changeslist-history"),i=null==t?void 0:null===(b=t.href)||void 0===b?void 0:b.match(/[&?]curid=(\d+)/),s=i&&Number(i[1]);if(s){var x;const t=(null===(x=k)||void 0===x?void 0:x.getForPageId(s))||[];if(t.length){e=t.find(e=>L(l,e));if(e){f=C.get("wrapperRelevant");f.lastChild.lastChild.title=y}}}}if(!e)f=C.get("wrapperRegular")}f.lastChild.lastChild.href=`${g}#${p}`;const T=n.querySelector(".comment")||n.querySelector(".mw-usertoollinks");if(T)T.parentNode.insertBefore(f,T.nextSibling)})}(e);else if(l.a.isContributionsPage())!function(e){d.a.timestampParsingTools("user");if(null!==r.a.g.uiTimezone)[...e[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||O(i))return;const n=i.textContent;if(!u.a.get(n).isProbablyTalkPage())return;const s=i.href;if(!s)return;if(e.querySelector(".minoredit"))return;let a=null===(t=e.querySelector(".comment"))||void 0===t?void 0:t.textContent;a&&(a=Object(m.C)(a));if(a&&(Object(m.t)(a)||Object(m.y)(a)||P(a)))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<r.a.config.bytesToDeemComment)return}const l=e.querySelector(".mw-changeslist-date");if(!l)return;const{date:d}=Object(p.g)(l.textContent,r.a.g.uiTimezone)||{};if(!d)return;const h=o.a.generateId(d,mw.config.get("wgRelevantUserName"));let g;if(a&&w.test(` ${a} `)){g=C.get("wrapperRelevant");g.lastChild.lastChild.title=v}else g=C.get("wrapperRegular");g.lastChild.lastChild.href=`${s}#${h}`;let f=e.querySelector(".comment");if(!f){f=i;f.nextSibling.textContent=f.nextSibling.textContent.replace(/^\s/,"")}f.parentNode.insertBefore(g,f.nextSibling)})}(e);else if(l.a.isHistoryPage())!function(e){d.a.timestampParsingTools("user");if(null===r.a.g.uiTimezone)return;const t=r.a.page.getUrl();[...e[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.C)(n));if(n&&(Object(m.t)(n)||Object(m.y)(n)||P(n)))return;const s=e.querySelector(".mw-plusminus-pos");if(!s)return;if("STRONG"!==s.tagName){const e=s.textContent.match(/\d+/),t=e&&Number(e[0]);if(!t||t<r.a.config.bytesToDeemComment)return}const a=e.querySelector(".mw-changeslist-date");if(!a)return;const{date:c}=Object(p.g)(a.textContent,r.a.g.uiTimezone)||{};if(!c)return;const l=N(e);if(!l)return;const d=o.a.generateId(c,l);let u;if(n&&w.test(` ${n} `)){u=C.get("wrapperRelevant");u.lastChild.lastChild.title=v}else{let e=!1;if(n){var h;const t=(null===(h=k)||void 0===h?void 0:h.getForCurrentPage())||[];if(t.length){e=t.find(e=>L(n,e));if(e){u=C.get("wrapperRelevant");u.lastChild.lastChild.title=y}}}if(!e)u=C.get("wrapperRegular")}u.lastChild.lastChild.href=`${t}#${d}`;let g=e.querySelector(".comment");if(!g){const t=e.querySelectorAll(".mw-changeslist-separator");g=null==t?void 0:t[t.length-1]}if(g)g.parentNode.insertBefore(u,g.nextSibling)})}(e);mw.hook("convenientDiscussions.commentLinksAdded").fire(e,r.a)}}function j(){return A.apply(this,arguments)}function A(){return(A=s()((function*(){try{yield T()}catch(e){console.warn(e);return}if(l.a.isDiffPage())mw.hook("convenientDiscussions.pageReady").add(()=>{I()});else mw.hook("wikipage.content").add(D);mw.hook("wikipage.diff").add(I)}))).apply(this,arguments)}function M(){if("Search"!==mw.config.get("wgCanonicalSpecialPageName"))return;const[,e]=location.search.match(/[?&]cdcomment=([^&]+)(?:&|$)/)||[];if(e)mw.loader.using("mediawiki.api").then(s()((function*(){yield Promise.all(d.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(r.a.mws("parentheses-start")),$("<a>").attr("href",`${n}#${e}`).text(r.a.s("deadanchor-search-gotocomment")),document.createTextNode(r.a.mws("parentheses-end"))))})})),console.error)}},function(e,t,i){"use strict";var n=i(3),s=i.n(n),o=i(16),a=i(6),r=i(13),c=i(29),l=i(36),d=i(30),cd=i(0),u=i(1);var h=class{constructor(e,t,i){var n;this.parser=e;this.headingElement=t.element;const s=e=>Object(u.u)(e,!0)?e:null;this.hElement=s(this.headingElement)||s(this.headingElement.firstElementChild)||this.headingElement.querySelectorAll("h1, h2, h3, h4, h5, h6")[0];this.headlineElement=cd.a.g.isParsoidUsed?this.hElement:this.parser.context.getElementByClassName(this.hElement,"mw-headline")||this.hElement;if(!this.headlineElement)throw new a.a;this.id=this.headlineElement.getAttribute("id");this.parseHeadline();const o=this.hElement.tagName.match(/^H([1-6])$/);this.level=o&&Number(o[1]);this.sectionNumber=null;const r=[...(null===(n=this.parser.context.getElementByClassName(this.headingElement,"mw-editsection"))||void 0===n?void 0:n.getElementsByTagName("a"))||[]].find(e=>{var t;return null===(t=e.getAttribute("href"))||void 0===t?void 0:t.includes("action=edit")});if(r){this.editUrl=new URL(cd.a.g.server+r.getAttribute("href"));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.initContent(t,i);this.index=cd.a.sections.length}initContent(e,t){var i,n;this.headingNestingLevel=this.parser.getNestingLevel(this.headingElement);const s=t.indexOf(e);let o=t.findIndex((e,t)=>t>s&&"heading"===e.type);if(-1===o)o=void 0;const a=null===(i=t[o])||void 0===i?void 0:i.element;let r=t.findIndex((e,t)=>t>s&&"heading"===e.type&&e.level<=this.level);if(-1===r)r=void 0;const c=null===(n=t[r])||void 0===n?void 0:n.element,l=new d.a(this.parser.context.rootElement,e=>!Object(u.w)(e)&&!e.classList.contains("cd-section-button-container"),!0);this.lastElement=this.getLastElement(c,l);this.lastElementInFirstChunk=a===c?this.lastElement:this.getLastElement(a,l);const h=e=>e.filter(e=>"signature"===e.type).map(e=>e.comment).filter(u.h);this.comments=h(t.slice(s,r));this.commentsInFirstChunk=h(t.slice(s,o));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","mw-editsection-like",...cd.a.config.excludeFromHeadlineClasses];this.headline=[...this.headlineElement.childNodes].filter(t=>t.nodeType===Node.TEXT_NODE||t.nodeType===Node.ELEMENT_NODE&&!(Object(u.w)(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}},m=i(10),p=i(11);var g=class{constructor({section:e,sectionHeadingMatch:t,contextCode:i,adjustedContextCode:n,isInSectionContext:s}){this.section=e;this.isInSectionContext=s;this.collectMatchData(t,i,n);if(this.code&&this.firstChunkCode);else console.warn(`Couldn't read the "${this.headline}" section contents.`)}extractLastCommentIndentation(e){if(void 0===this.lastCommentIndentation){const[,t]=this.firstChunkCode.match(/\n([#*]) *\n+$/)||[];if(t)this.lastCommentIndentation=t;else{this.lastCommentIndentation=null;const t=this.section.commentsInFirstChunk.slice(-1)[0];if(t&&("ol"===e.getContainerListType()||"mimic"===cd.a.config.indentationCharMode))try{t.locateInCode(e.isSectionSubmitted());if(!t.source.indentation.startsWith("#")||"ol"===e.getContainerListType())this.lastCommentIndentation=t.source.indentation}catch(e){}}}return this.lastCommentIndentation}modifyContext({action:e,commentCode:t}){const i=this.isInSectionContext?this.section.presumedCode:this.section.getSourcePage().code;let n;switch(e){case"replyInSection":n=i.slice(0,this.firstChunkContentEndIndex)+t+i.slice(this.firstChunkContentEndIndex);break;case"addSubsection":n=Object(p.c)(i.slice(0,this.contentEndIndex))+t+i.slice(this.contentEndIndex).trim()}return{contextCode:n,commentCode:t}}collectMatchData(e,t,i){const n=e[1],s=`={1,${e[2].length}}`,o=t.slice(e.index),a=i.slice(e.index),r=a.match(new RegExp("("+mw.util.escapeRegExp(n)+"[^]*?\\n)"+s+"[^=].*=+[ \\t\\x01\\x02]*\\n"))||a.match(new RegExp("("+mw.util.escapeRegExp(n)+"[^]*$)")),c=a.match(new RegExp("("+mw.util.escapeRegExp(n)+"[^]*?\\n)\\n*={1,6}[^=].*=+[ \\t\\x01\\x02]*\n"))||a.match(new RegExp("("+mw.util.escapeRegExp(n)+"[^]*$)")),l=r&&o.substr(r.index,r[1].length),d=c&&o.substr(c.index,c[1].length),u=e.index,h=u+l.length,m=e.index+e[0].length,g=u+d.length;let f=g,b=h;cd.a.g.keepInSectionEnding.forEach(e=>{const t=d.match(e);if(t)f-=t[0].length-1;const i=l.match(e);if(i)b-=i[0].length-1});const v=d.match(/\n([#*] *\n+)$/);if(v)f-=v[1].length;Object.assign(this,{startIndex:u,endIndex:h,code:l,contentStartIndex:m,contentEndIndex:b,relativeContentStartIndex:m-u,firstChunkEndIndex:g,firstChunkContentEndIndex:f,firstChunkCode:d,headline:Object(p.j)(Object(p.k)(e[3]))})}calculateMatchScore(e,t,i){const n=t.includes("{{")?.5:this.headline===t;let s,o,a;if(this.isInSectionContext){s=0;o=0}else{s=this.section.index===e;const t=3,n=i.slice(-t).reverse();o=m.a.getAll().slice(Math.max(0,this.section.index-t),this.section.index).reverse().map(e=>e.headline).every((e,t)=>Object(p.j)(e)===n[t])}i.push(this.headline);Object(p.e)(this.code).forEach(e=>{if(!a||!a.date&&e.date||a.date>e.date)a=e});const r=this.section.oldestComment,c=a?Boolean(r&&a.timestamp===r.timestamp&&a.author===r.author):!r;let l=Number(!this.section.oldestComment&&!a);if(this.section.oldestComment&&a)l=Object(u.d)(this.section.oldestComment.getText(),Object(p.k)(this.code.slice(a.commentStartIndex,a.startIndex)));this.score=1*c+l+1*n+.5*s+.25*o}},f=i(17),b=i(2),v=i(20),y=i(5),w=i(19),x=i(8),k=i(14),C=i(4);t.a=class extends h{constructor(e,t,i,n){var s;super(e,t,i,n);this.subscriptions=n;this.useTopicSubscription=y.a.get("useTopicSubscription");this.liveSectionNumber=this.sectionNumber;this.liveSectionNumberRevisionId=mw.config.get("wgRevisionId");this.sourcePage=this.sourcePageName?v.a.get(this.sourcePageName):cd.a.page;delete this.sourcePageName;this.isTranscludedFromTemplate=10===(null===(s=this.sourcePage)||void 0===s?void 0:s.namespaceId);this.isActionable=cd.a.page.isActive()&&!b.a.getClosedDiscussions().some(e=>e.contains(this.headingElement))&&!this.isTranscludedFromTemplate;if(this.isTranscludedFromTemplate)this.comments.forEach(e=>{e.isActionable=!1});this.extractSubscribeId();this.$headline=$(this.headlineElement);this.$heading=$(this.headingElement);this.isHidden=!1}maybeAddReplyButton(){if(!this.canBeReplied())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 s=e.tagName,a=this.commentsInFirstChunk[this.commentsInFirstChunk.length-1];if(e.classList.contains("cd-commentLevel")||t)if("UL"===s||"OL"===s&&(t||e!==(null==a?void 0:a.elements[a.elements.length-1])))i="li";else if("DL"===s)i="dd";else{i="li";n=!0}else{i="dd";if(!t)n=!0}const r=this.constructor.prototypes.get("replyButton"),c=new o.a({element:r,buttonElement:r.firstChild,action:()=>{this.reply()}}),l=document.createElement(i);l.className="cd-replyButtonWrapper";l.append(c.element);let d;if(n){d=document.createElement("dl");d.className="cd-commentLevel cd-commentLevel-1 cd-section-button-container";e.parentNode.insertBefore(d,e.nextElementSibling)}else{d=e;d.classList.add("cd-section-button-container")}d.append(l);this.replyButton=c;this.$replyButtonWrapper=$(l);this.$replyButtonContainer=$(d)}maybeAddAddSubsectionButton(){if(2!==this.level||!this.canBeSubsectioned())return;const e=this.constructor.prototypes.get("addSubsectionButton"),t=new o.a({element:e,buttonElement:e.firstChild,labelElement:e.querySelector(".oo-ui-labelElement-label"),label:cd.a.s("section-addsubsection-to",this.headline),action:()=>{this.addSubsection()}});t.buttonElement.onmouseenter=this.resetHideAddSubsectionButtonTimeout.bind(this);t.buttonElement.onmouseleave=this.deferAddSubsectionButtonHide.bind(this);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.bind(e);this.replyButton.buttonElement.onmouseleave=e.handleReplyButtonUnhover.bind(e)}}addSubscribeButton(){if(this.subscribeId){this.subscriptionState=this.subscriptions.getState(this.subscribeId);if(!b.a.isSubscribingDisabled()||this.subscriptionState){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[0]);mw.hook("convenientDiscussions.subscribeButtonAdded").fire(this)}}}canFirstCommentBeEdited(){return Boolean(this.isActionable&&this.commentsInFirstChunk.length&&this.comments[0].isOpeningSection&&this.comments[0].canBeEdited()&&!this.comments[0].isCollapsed)}canBeMoved(){return 2===this.level&&!this.isTranscludedFromTemplate&&(cd.a.page.isActive()||cd.a.page.isCurrentArchive())}canBeReplied(){return Boolean(this.isActionable&&!(this.commentsInFirstChunk[0]&&0===this.commentsInFirstChunk[0].level&&this.commentsInFirstChunk.every(e=>!e.isActionable))&&!(this.lastElementInFirstChunk!==this.lastElement&&this.lastElementInFirstChunk===this.headingElement)&&(!m.a.getByIndex(this.index+1)||m.a.getByIndex(this.index+1).headingNestingLevel===this.headingNestingLevel)&&!["TR","TD","TH"].includes(this.lastElementInFirstChunk.tagName))}canBeSubsectioned(){const e=m.a.getAll().slice(this.index+1).find(e=>e.level===this.level);return Boolean(this.isActionable&&this.level>=2&&this.level<=5&&!(this.comments[0]&&0===this.comments[0].level&&this.comments.every(e=>!e.isActionable))&&(!e||e.headingNestingLevel===this.headingNestingLevel))}toggleAuthors(e){e.preventDefault();if(!this.authorsPopup){this.authorsPopup=new OO.ui.PopupWidget({$content:$(Object(u.j)(this.comments.map(e=>e.author).filter(u.K).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",r.a.scrollToFirstHighlightAll.bind(r.a,t))[0],i===n.length-1?void 0:document.createTextNode(cd.a.mws("comma-separator"))]))),head:!1,padded:!0,autoClose:!0,$autoCloseIgnore:$(this.authorCountWrapper),position:"above",$floatableContainer:$(this.authorCountWrapper),classes:["cd-section-metadata-authorsPopup"]});$(b.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.K).length,t=r.a.getLatest(this.comments);let i,n,s,o;if(2===this.level&&this.comments.length){if(t){const e=document.createElement("a");e.href="#"+(t.dtId||t.id);e.onclick=this.scrollToLatestComment.bind(this);e.textContent=Object(k.b)(t.date);new c.a(e,t.date,!1).init();i=document.createElement("span");i.className="cd-section-bar-item";i.append(cd.a.s("section-metadata-lastcomment")," ",e)}n=document.createElement("span");n.className="cd-section-bar-item";n.innerHTML=cd.a.sParse("section-metadata-commentcount-authorcount",this.comments.length,e);if(1===this.comments.length){var a;null===(a=n.querySelector(".cd-section-metadata-authorcount"))||void 0===a||a.remove()}const r=n.querySelector(".cd-section-metadata-authorcount-link");if(r){s=document.createElement("a");s.textContent=r.textContent;s.onclick=this.toggleAuthors.bind(this);r.firstChild.replaceWith(s)}o=document.createElement("div");o.className="cd-section-metadata";o.append(...[n,i].filter(u.h))}this.latestComment=t;this.metadataElement=o;this.commentCountWrapper=n;this.authorCountWrapper=s;this.latestCommentWrapper=i;this.$metadata=$(o);this.$commentCountWrapper=$(n);this.$authorCountWrapper=$(s);this.$latestCommentWrapper=$(i)}createMoreMenuSelect(){const e=this.constructor.prototypes.getWidget("moreMenuSelect")(),t=this.canFirstCommentBeEdited()?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.canBeSubsectioned()?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[0]);const s=[t,i,n].filter(u.h);e.getMenu().addItems(s).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.canFirstCommentBeEdited()||this.canBeMoved()||this.canBeSubsectioned()){const t=this.constructor.prototypes.get("moreMenuSelect");e=new o.a({element:t,action:()=>{this.createAndClickMoreMenuSelect()}});e.buttonElement.onmouseenter=this.createMoreMenuSelect.bind(this)}if(this.headline){const e=this.constructor.prototypes.get("copyLinkButton");t=new o.a({element:e,buttonElement:e.firstChild,iconElement:e.querySelector(".oo-ui-iconElement-icon"),href:`${cd.a.page.getUrl()}#${this.id}`,action:e=>{this.copyLink(e)},flags:["progressive"]});t.buttonElement.classList.add("mw-selflink-fragment")}const i=document.createElement(2===this.level?"div":"span");i.className=["cd-section-actions",2===this.level?"cd-topic-actions":"cd-subsection-actions"].filter(u.h).join(" ");i.append(...[t,e].filter(u.h).map(e=>e.element));this.actionsElement=i;this.$actions=$(i);this.actions={copyLinkButton:t,moreMenuSelectDummy:e}}addBarElement(){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.h));if(cd.a.g.isDtVisualEnhancementsEnabled){var t;null===(t=this.headingElement.querySelector(".ext-discussiontools-init-section-bar"))||void 0===t||t.remove()}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.addBarElement()}else this.addActionsElement()}scrollToNewComments(e){e.preventDefault();r.a.scrollToFirstHighlightAll(this.newComments)}addNewCommentCountMetadata(){if(2!==this.level||!this.newComments.length||this.newComments.length===this.comments.length)return;const e=cd.a.s("section-metadata-newcommentcount",this.newComments.length);let t=document.createElement("a");t.textContent=e;t.href="#"+this.newComments[0].dtId;t.onclick=this.scrollToNewComments.bind(this);const i=document.createElement("span");i.className="cd-section-bar-item";i.append(t||e);this.metadataElement.insertBefore(i,this.commentCountWrapper.nextSibling||null);this.newCommentCountWrapper=i;this.$newCommentCountWrapper=$(i)}updateNewCommentsData(){this.newComments=this.comments.filter(e=>!1===e.isSeen);this.addNewCommentCountMetadata()}extractSubscribeId(){var e,t;if(!this.useTopicSubscription){this.subscribeId=this.headline;return}if(2!==this.level)return;let i=null===(e=b.a.getDtSubscribableThreads())||void 0===e?void 0:null===(t=e.find(e=>e.id===this.hElement.dataset.mwThreadId||e.id===this.headlineElement.dataset.mwThreadId))||void 0===t?void 0:t.name;if(!i)if(cd.a.g.isDtTopicSubscriptionEnabled){if(this.headingElement.querySelector(".ext-discussiontools-init-section-subscribe-link")){const e=this.headlineElement.dataset.mwComment;try{i=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__")){[,i]=e.textContent.match("__DTSUBSCRIBELINK__(.+)")||[];break}this.subscribeId="h-"===i?void 0:i}reply(e,t){if(!this.replyForm){this.replyForm=f.a.setupCommentForm(this,{mode:"replyInSection"},e,t);this.replyButton.hide()}const i=this.getBase();if(i.$addSubsectionButtonContainer){i.$addSubsectionButtonContainer.hide();clearTimeout(i.showAddSubsectionButtonTimeout);i.showAddSubsectionButtonTimeout=null}}addSubsection(e,t){if(!this.canBeSubsectioned())throw new a.a;if(this.addSubsectionForm){this.addSubsectionForm.$element.cdScrollIntoView("center");this.addSubsectionForm.headlineInput.focus()}else{var i;this.addSubsectionForm=f.a.setupCommentForm(this,{mode:"addSubsection"},e,t);null===(i=this.$addSubsectionButtonContainer)||void 0===i||i.hide()}}addCommentFormToPage(e,t){if("replyInSection"===e)this.$replyButtonWrapper.append(t.$element).addClass("cd-replyButtonWrapper-hasCommentForm");else if("addSubsection"===e)$(this.findRealLastElement(e=>[...e.classList].some(e=>e.match(new RegExp(`^cd-commentForm-addSubsection-[${this.level}-6]$`))))).after(t.$element)}removeCommentFormFromPage(e){if("replyInSection"===e){this.replyButton.show();this.$replyButtonWrapper.removeClass("cd-replyButtonWrapper-hasCommentForm")}}move(){if(b.a.isPageOverlayOn())return;const e=new(0,i(71).default)(this);b.a.getWindowManager().addWindows([e]);b.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=m.a.getBySubscribeId(this.subscribeId);let n;if("silent"!==e){const e=i.map(e=>e.actions.subscribeButton).filter(u.h);e.forEach(e=>{e.setDisabled(!0)});n=()=>{e.forEach(e=>{e.setDisabled(!1)})}}this.subscriptions.subscribe(this.subscribeId,this.id,t&&!m.a.getBySubscribeId(t).length?t:void 0,!!e).then(()=>{if("silent"!==e)i.forEach(e=>{e.changeSubscriptionState(!0)})}).then(n,n)}unsubscribe(e){const t=m.a.getBySubscribeId(this.subscribeId);let i;if("silent"!==e){const e=t.map(e=>e.actions.subscribeButton).filter(u.h);e.forEach(e=>{e.setDisabled(!0)});i=()=>{e.forEach(e=>{e.setDisabled(!1)})}}this.subscriptions.unsubscribe(this.subscribeId,this.id,!!e).then(()=>{if("silent"!==e)t.forEach(e=>{e.changeSubscriptionState(!1)})}).then(i,i)}changeSubscriptionState(e){this.subscriptionState=e;this.updateSubscribeButtonState();this.updateTocLink()}resubscribeIfRenamed(e,t){if(this.useTopicSubscription||this.subscriptionState||Object(u.q)({tagName:e.elementNames[0],className:e.elementClassNames[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())[0]};m.a.prototype.parseHeadline.call(n);if(this.headline&&n.headline!==this.headline&&this.subscriptions.getOriginalState(n.headline))this.subscribe("quiet",n.headline)}update(e){const t=this.headline;this.parseHeadline();if(this.headline!==t){var i;if(this.headline&&this.subscriptionState&&!this.useTopicSubscription)this.subscribe("quiet",t);null===(i=this.getTocItem())||void 0===i||i.replaceText(e)}}copyLink(e){b.a.showCopyLinkDialog(this,e)}requestCode(){var e=this;return s()((function*(){var t,i,n,s,o;const{query:r,curtimestamp:c}=yield b.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(x.f),l=null==r?void 0:null===(t=r.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,h=null==u?void 0:u.content;if(!r||!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===h)throw new a.a({type:"api",code:"noData"});const m=(null===(s=r.redirects)||void 0===s?void 0:null===(o=s[0])||void 0===o?void 0:o.to)||null;Object.assign(e,{presumedCode:h+"\n",revisionId:d.revid,queryTimestamp:c});Object.assign(cd.a.page,{redirectTarget:m,realName:m||e.name})}))()}loadCode(e){var t=this;return s()((function*(){null==e||e.setSectionSubmitted(!1);try{if(e&&null!==t.liveSectionNumber)try{yield t.requestCode();t.locateInCode(!0);null==e||e.setSectionSubmitted(!0)}catch(e){if(!(e instanceof a.a&&["noSuchSection","locateSection"].includes(e.data.code)))throw e}if(null==e||!e.isSectionSubmitted()){yield t.getSourcePage().loadCode();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}}))()}searchInCode(e,t){const i=Object(p.j)(this.headline),n=Object(p.i)(e),s=/^((=+)(.*)\2[ \t\x01\x02]*)\n/gm,o=[],a=[];let r,c=-1;for(;r=s.exec(n);){c++;const s=new g({section:this,sectionHeadingMatch:r,contextCode:e,adjustedContextCode:n,isInSectionContext:t});s.calculateMatchScore(c,i,a);if(s.code&&s.firstChunkCode&&!(s.score<=1)){o.push(s);if(3.75===s.score)break}}return o.sort((e,t)=>t.score-e.score)[0]}locateInCode(e){this.source=null;const t=e?this.presumedCode:this.getSourcePage().code;if(void 0===t)throw new a.a({type:"parse",code:"noCode"});const i=this.searchInCode(t,e);if(!i)throw new a.a({type:"parse",code:"locateSection"});this.source=i}getSourcePage(){return this.sourcePage}getBase(e=!1){const t=e&&2!==this.level?null:this;return this.level<=2?t:m.a.getAll().slice(0,this.index).reverse().find(e=>2===e.level)||t}getChildren(e=!1){const t=[];let i=!1;m.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 w.a.getItem(this.id)}updateTocLink(){var e;null===(e=this.getTocItem())||void 0===e||e.updateSubscriptionState(this.subscriptionState)}getUrl(e){return cd.a.page.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(p.b)(Object(u.J)(this.id))}ensureSubscribeIdPresent(e){if(this.useTopicSubscription&&!this.subscribeId)this.subscribeId=m.a.generateDtSubscriptionId(cd.a.user.getName(),this.oldestComment||e)}getSectionSubscribedTo(){return this.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=Object(C.g)(this.headingElement,this.findRealLastElement(),b.a.rootElement));this.isHidden=!e;this.elements.forEach(t=>{t.classList.toggle("cd-section-hidden",!e)})}}getCommentAboveReply(e){return m.a.getAll().slice(0,("addSubsection"===e.getMode()&&this.getChildren(!0).slice(-1)[0]||this).index+1).reverse().reduce((e,t)=>e||t.commentsInFirstChunk[t.commentsInFirstChunk.length-1])}findNewSelf(){var e,t;return(null===(e=m.a.search({headline:this.headline,oldestCommentId:null===(t=this.oldestComment)||void 0===t?void 0:t.id,index:this.index,id:this.id,ancestors:this.getAncestors().map(e=>e.headline)}))||void 0===e?void 0:e.section)||null}getCommentFormMethodName(e){return"replyInSection"===e?"reply":e}static initPrototypes(){this.prototypes=new l.a;this.prototypes.add("replyButton",new OO.ui.ButtonWidget({label:cd.a.s("section-reply"),framed:!1,classes:["cd-button-ooui","cd-section-button","cd-thread-button"]}).$element[0]);this.prototypes.add("addSubsectionButton",new OO.ui.ButtonWidget({label:" ",framed:!1,classes:["cd-button-ooui","cd-section-button"]}).$element[0]);this.prototypes.add("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[0]);this.prototypes.addWidget("moreMenuSelect",()=>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"]}))}}},function(e,t,i){"use strict";i.r(t);var n=i(12),s=i.n(n),o=i(9);class DivLabelWidget extends OO.ui.LabelWidget{}s()(DivLabelWidget,"tagName","div");Object(o.tweakUserOoUiClass)(DivLabelWidget);t.default=DivLabelWidget},function(e,t,i){"use strict";i.r(t);var n=i(37),s=i(9);class MultilineTextInputWidget extends OO.ui.MultilineTextInputWidget{}Object(s.mixinUserOoUiClass)(MultilineTextInputWidget,n.default);t.default=MultilineTextInputWidget},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('["ar","az","bn","de","diq","el","en","es","fa","fi","fr","he","hi","ia","id","it","ja","ko","lb","lt","mk","nl","pl","pms","pt-br","ru","sk","skr-arab","sl","sv","te","th","tr","uk","vi","zh-hans","zh-hant"]')},function(e){e.exports=JSON.parse('{"az.wikipedia.org":"https://az.wikipedia.org/w/load.php?modules=ext.gadget.convenientDiscussions&only=scripts","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","ja.wikipedia.org":"https://ja.wikipedia.org/w/index.php?title=User:Jack_who_built_the_house/convenientDiscussions.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","ru.wikisource.org":"https://ru.wikisource.org/w/load.php?modules=ext.gadget.convenientDiscussions&only=scripts","www.mediawiki.org":"https://www.mediawiki.org/w/index.php?title=User:Jack_who_built_the_house/convenientDiscussions-mwConfig.js&action=raw&ctype=text/javascript","zh.wikipedia.org":"https://zh.wikipedia.org/w/index.php?title=User:BlackShadowG/convenientDiscussions.js&action=raw&ctype=text/javascript"}')},function(e,t,i){var n=i(26),s=i(72);if("string"==typeof(s=s.__esModule?s.default:s))s=[[e.i,s,""]];var o={insert:"head",singleton:!1};n(s,o);e.exports=s.locals||{}},function(e,t,i){"use strict";e.exports=function(e,t){var n=i(64),s="",o="",a="";s=e.toString();var r=n("HTML_ENTITIES",t);if(!1===r)return!1;delete r["&"];r["&"]="&amp;";for(a in r){o=r[a];s=s.split(o).join(a)}return s=s.split("&#039;").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,s){var o,a=function(e,i,n){void 0===n&&(n={});var s=new Date(e);return function(e,i){void 0===i&&(i={});var n=i.timeZoneName||"short",s=e+"|"+n,o=t[s];return o||(o=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[s]=o),o}(i,n).formatToParts(s)},r=function(t,i){for(var n=a(t,i),o=[],r=0;r<n.length;r+=1){var c=n[r],l=c.type,d=c.value,u=e[l];u>=0&&(o[u]=parseInt(d,10))}var h=o[3],m=24===h?0:h,p=o[0]+"-"+o[1]+"-"+o[2]+" "+m+":"+o[4]+":"+o[5]+":000",g=+t;return(s.utc(p).valueOf()-(g-=g%1e3))/6e4},c=n.prototype;c.tz=function(e,t){void 0===e&&(e=o);var i=this.utcOffset(),n=this.toDate(),a=n.toLocaleString("en-US",{timeZone:e}),r=Math.round((n-new Date(a))/1e3/60),c=s(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||s.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=s(this.format("YYYY-MM-DD HH:mm:ss:SSS"));return l.call(i,e,t).tz(this.$x.$timezone,!0)},s.tz=function(e,t,i){var n=i&&t,a=i||t||o,c=r(+s(),a);if("string"!=typeof e)return s(e).tz(a);var l=function(e,t,i){var n=e-60*t*1e3,s=r(n,i);if(t===s)return[n,t];var o=r(n-=60*(s-t)*1e3,i);return s===o?[n,s]:[e-60*Math.min(s,o)*1e3,Math.max(s,o)]}(s.utc(e,n).valueOf(),c,a),d=l[0],u=l[1],h=s(d).utcOffset(u);return h.$x.$timezone=a,h},s.tz.guess=function(){return Intl.DateTimeFormat().resolvedOptions().timeZone},s.tz.setDefault=function(e){o=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,s,o){var a=s.prototype;o.utc=function(e){var t={date:e,utc:!0,args:arguments};return new s(t)},a.utc=function(t){var i=o(this.toDate(),{locale:this.$L,utc:!0});return t?i.add(this.utcOffset(),e):i},a.local=function(){return o(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,s){var o=this.$utils().u;if(o(n))return this.$u?0:o(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 s=(""+n[0]).match(i)||["-",0,0],o=s[0],a=60*+s[1]+ +s[2];return 0===a?0:"+"===o?a:-a}(n)))return this;var a=Math.abs(n)<=16?60*n:n,r=this;if(s)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?o(this.format("YYYY-MM-DD HH:mm:ss:SSS")).toDate():u.call(this)};var h=a.diff;a.diff=function(e,t,i){if(e&&this.$u===e.$u)return h.call(this,e,t,i);var n=this.local(),s=o(e).local();return h.call(n,s,t,i)}}}()},function(e,t,i){"use strict";e.exports=function(e,t,i,n){var s=self||window;try{try{var o;try{o=new s.Blob([e])}catch(t){(o=new(s.BlobBuilder||s.WebKitBlobBuilder||s.MozBlobBuilder||s.MSBlobBuilder)).append(e);o=o.getBlob()}var a=s.URL||s.webkitURL,r=a.createObjectURL(o),c=new s[t](r,i);a.revokeObjectURL(r);return c}catch(n){return new s[t]("data:application/javascript,".concat(encodeURIComponent(e)),i)}}catch(e){if(!n)throw Error("Inline worker is not supported");return new s[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-authorcount":'$1 {{plural:$1|comment|comments}}<span class="cd-section-metadata-authorcount"> from <span class="cd-section-metadata-authorcount-link">$2 {{plural:$2|person|people}}</span></span>',"section-metadata-newcommentcount":"+$1 {{plural:$1|new}}","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":"Text","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>To see the hotkeys of toolbar buttons, hover over them.</li>\n</ul>\n<p>[[mw:c:Special:MyLanguage/User:Jack who built the house/Convenient Discussions|Script documentation]] <b>\xb7</b> [[mw:c:User talk:Jack who built the house/Convenient Discussions|Feedback]]</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-notice-outdent":"The comment you are replying to has [[$1|outdented]] replies. You can only reply to such a comment by replying to the section.","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-error-uploadimage":"Couldn't upload the image.","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 in the popup that will appear, or deny to prevent this message from showing up again.","deadanchor-section-lead":'Couldn\'t find the section "$1" on the page.',"deadanchor-section-exactmatch":'Looks like the section "$1" has been archived. <b>[[$2|See archived section]]</b> (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 "<b>[[$1|$2]]</b>" 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. <b>[[$1|See archived comment]]</b> (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 regular formatting","topicsubscription-button-subscribe":"subscribe","topicsubscription-button-subscribe-tooltip":"{{GENDER:|Subscribe}} to receive notifications about new comments.","topicsubscription-button-unsubscribe":"unsubscribe","topicsubscription-button-unsubscribe-tooltip":"{{GENDER:|Unsubscribe}} to stop receiving notifications about new comments.","topicsubscription-notify-subscribed-title":"{{GENDER:|You}} have subscribed!","topicsubscription-notify-subscribed-body":"{{GENDER:|You}} will receive notifications about new comments in this topic.","topicsubscription-notify-unsubscribed-title":"{{GENDER:|You}} have unsubscribed.","topicsubscription-notify-unsubscribed-body":"{{GENDER:|You}} will no longer receive notifications about new comments in this topic.","newtopicssubscription-button-subscribe-label":"Subscribe","newtopicssubscription-button-subscribe-tooltip":"Subscribe to receive notifications when new topics are started on this page.","newtopicssubscription-button-unsubscribe-label":"Unsubscribe","newtopicssubscription-button-unsubscribe-tooltip":"Unsubscribe to stop receiving notifications when new topics are started on this page.","newtopicssubscription-notify-subscribed-title":"{{GENDER:|You}} have subscribed!","newtopicssubscription-notify-subscribed-body":"{{GENDER:|You}} will receive notifications when new topics are started on this page.","newtopicssubscription-notify-unsubscribed-title":"{{GENDER:|You}} have unsubscribed.","newtopicssubscription-notify-unsubscribed-body":"{{GENDER:|You}} will no longer receive notifications when new topics are started on","newtopicssubscription-popup-title":"New feature","newtopicssubscription-popup-text":'You can now subscribe to talk pages. If you subscribe to a page, you will receive notifications when new topics are started on the page. To subscribe to a page, click "{{int:discussiontools-newtopicssubscription-button-subscribe-label}}" in the page actions menu.',"popup-manyForms-title":"Did you know?","popup-manyForms-text":"In Convenient Discussions, you can type many comments simultaneously in separate forms and then send them one by one. The text in other forms won't be lost when you submit one of the forms. Give it a try!","popup-upload-title":"New feature","popup-upload-text":'You can now upload screenshots to Commons in three clicks! Just paste or drag the image into the comment input, choose the preset, and click "{{int:convenient-discussions-ud-uploadandsave}}".',"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 deletion","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":"Delete all script data","sd-removedata-description":"Delete the data that Convenient Discussions has collected: your settings, talk page last visits, legacy subscriptions, and drafts of unsent comments","sd-removedata-help":"Note that everything except the global settings is deleted for the current wiki only. If you have used Convenient Discussions on other wikis and you want to delete data for them, you will have to delete 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 deleted 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 deleted. 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 delete 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 at 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.","sd-insertbuttons":"Text insert buttons","sd-insertbuttons-multiselect-placeholder":"Add a button","sd-insertbuttons-help":"<ul>\n<li>Use <code>+</code> to specify a place where the caret should be put after inserting the text; for example, <code><nowiki>{{+}}</"+String("")+"nowiki></code>.</li>\n<li>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>.</li>\n<li>Use <code>\\\\n</code> before <code>;</code> to mean a newline.</li>\n<li>Use <code><nowiki>\\</"+String("")+"nowiki></code> before the aforementioned characters to insert them as is; for example, <code><nowiki>2\\+2</"+String("")+"nowiki></code>.</li>\n</ul>\n\nButtons can be dragged and dropped.","sd-modifytoc":"Show new comments and sections in the table of contents","sd-outdentlevel":"[$1 Outdent] my replies starting at 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. When there are relevant new comments, 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 [[$1|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''","ud-preset":"Choose a preset","ud-preset-projectscreenshot":"This is a screenshot of $1 or other Wikimedia project","ud-preset-projectscreenshot-help":"It shouldn't contain non-free pictures. Free pictures should be credited by linking their authors.","ud-preset-projectscreenshot-title":"Screenshotted page","ud-preset-projectscreenshot-title-help":"If this is a screenshot of another project, use a full interwiki prefix, e.g. <code>wikt:fr:mot</code>.","ud-preset-mediawikiscreenshot":"This is a screenshot of the MediaWiki software (e.g. user interface)","ud-preset-ownwork":"This is my own work","ud-preset-no":"No preset","ud-configure":"Configure the contents of all the input fields","ud-source":"Source","ud-author":"Author","ud-license":"License, in wikitext format","ud-uploadandsave":"Upload and save","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 source code. This may be caused by complexity of the comment code, a 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">[[$2|reload the page]]</span>.',"error-locatesection":'Couldn\'t find the section in the source code. This may be caused by complexity of the section\'s first comment code, a 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">[[$2|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-elementhidden-container":"The element is hidden. Scrolled to its visible container.","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 mostly incompatible with DiscussionTools. Please <b><span class="cd-notification-disabledt">[[$1|disable]]</span></b> <span class="cd-notification-disableDtGlobally-wrapper">(or <b><span class="cd-notification-disableDtGlobally">[[$2|globally disable]]</span></b>)</span> 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","educationpopup-dismiss":"Okay, got it",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 using the standard page, not Convenient Discussions","pseudolink-tooltip":"Click to insert",copy:"Copy"}},function(e,t,i){"use strict";e.exports=function(e,t){var i,n,s={},o={},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");s[38]="&amp;";if("HTML_ENTITIES"===i){s[160]="&nbsp;";s[161]="&iexcl;";s[162]="&cent;";s[163]="&pound;";s[164]="&curren;";s[165]="&yen;";s[166]="&brvbar;";s[167]="&sect;";s[168]="&uml;";s[169]="&copy;";s[170]="&ordf;";s[171]="&laquo;";s[172]="&not;";s[173]="&shy;";s[174]="&reg;";s[175]="&macr;";s[176]="&deg;";s[177]="&plusmn;";s[178]="&sup2;";s[179]="&sup3;";s[180]="&acute;";s[181]="&micro;";s[182]="&para;";s[183]="&middot;";s[184]="&cedil;";s[185]="&sup1;";s[186]="&ordm;";s[187]="&raquo;";s[188]="&frac14;";s[189]="&frac12;";s[190]="&frac34;";s[191]="&iquest;";s[192]="&Agrave;";s[193]="&Aacute;";s[194]="&Acirc;";s[195]="&Atilde;";s[196]="&Auml;";s[197]="&Aring;";s[198]="&AElig;";s[199]="&Ccedil;";s[200]="&Egrave;";s[201]="&Eacute;";s[202]="&Ecirc;";s[203]="&Euml;";s[204]="&Igrave;";s[205]="&Iacute;";s[206]="&Icirc;";s[207]="&Iuml;";s[208]="&ETH;";s[209]="&Ntilde;";s[210]="&Ograve;";s[211]="&Oacute;";s[212]="&Ocirc;";s[213]="&Otilde;";s[214]="&Ouml;";s[215]="&times;";s[216]="&Oslash;";s[217]="&Ugrave;";s[218]="&Uacute;";s[219]="&Ucirc;";s[220]="&Uuml;";s[221]="&Yacute;";s[222]="&THORN;";s[223]="&szlig;";s[224]="&agrave;";s[225]="&aacute;";s[226]="&acirc;";s[227]="&atilde;";s[228]="&auml;";s[229]="&aring;";s[230]="&aelig;";s[231]="&ccedil;";s[232]="&egrave;";s[233]="&eacute;";s[234]="&ecirc;";s[235]="&euml;";s[236]="&igrave;";s[237]="&iacute;";s[238]="&icirc;";s[239]="&iuml;";s[240]="&eth;";s[241]="&ntilde;";s[242]="&ograve;";s[243]="&oacute;";s[244]="&ocirc;";s[245]="&otilde;";s[246]="&ouml;";s[247]="&divide;";s[248]="&oslash;";s[249]="&ugrave;";s[250]="&uacute;";s[251]="&ucirc;";s[252]="&uuml;";s[253]="&yacute;";s[254]="&thorn;";s[255]="&yuml;"}if("ENT_NOQUOTES"!==n)s[34]="&quot;";if("ENT_QUOTES"===n)s[39]="&#39;";s[60]="&lt;";s[62]="&gt;";for(a in s)if(s.hasOwnProperty(a))o[String.fromCharCode(a)]=s[a];return o}},function(e,t,i){"use strict";i.r(t);class CheckboxInputWidget extends OO.ui.CheckboxInputWidget{constructor(...e){super(...e);this.$input.on("change",()=>{this.emit("manualChange",this.$input.prop("checked"))})}}t.default=CheckboxInputWidget},function(e,t,i){"use strict";i.r(t);const{tweakUserOoUiClass:n}=i(9);class RadioOptionWidget extends OO.ui.RadioOptionWidget{constructor(e){super(e);this.$help=e.help?this.createHelpElement(e.help):$();this.$label.append(this.$help)}createHelpElement(e){const t=new(i(48).default)({label:e,classes:["oo-ui-inline-help"]});this.radio.$input.attr("aria-describedby",t.getElementId());return t.$element}}n(RadioOptionWidget);t.default=RadioOptionWidget},function(e,t,i){"use strict";i.r(t);var n=i(3),s=i.n(n),o=i(16),a=i(6),r=i(35),c=i(0),l=i(2),d=i(1),u=i(9),h=i(4);class PseudoLink extends o.a{constructor(e){super({classes:["cd-pseudolink"],tooltip:c.a.s("pseudolink-tooltip"),label:e.label,action:()=>{e.input.setValue(e.text||e.label).focus()}})}}class UploadDialog extends mw.Upload.Dialog{constructor(e={}){super(Object.assign({bookletClass:ForeignStructuredUploadBookletLayout,booklet:{target:"commons.wikimedia.org"===mw.config.get("wgServerName")?"local":"shared"},classes:["cd-uploadDialog"]},e))}getSetupProcess(e){var t=this;mw.loader.load("https://en.wikipedia.org/w/index.php?title=User:Jack_who_built_the_house/getUrlFromInterwikiLink.js&action=raw&ctype=text/javascript");const i="project-localized-name-"+mw.config.get("wgDBname"),n=l.a.getApi().loadMessagesIfMissing([i,"upload-form-label-own-work-message-commons","mwe-upwiz-license-custom-explain","mwe-upwiz-license-custom-url"]),o="en"===c.a.g.userLanguage?void 0:l.a.getApi().getMessages(i,{amlang:"en"});return super.getSetupProcess(e).next(s()((function*(){var s;let r;try{var l;yield n;r=(null===(l=yield o)||void 0===l?void 0:l[i])||c.a.mws(i)}catch(e){}null===(s=e.commentForm)||void 0===s||s.popPending();if("rejected"!==n.state()&&"rejected"!==t.uploadBooklet.upload.getApi().state()){t.uploadBooklet.on("changeSteps",t.updateActionLabels.bind(t)).on("submitUpload",t.executeAction.bind(t,"upload"));t.uploadBooklet.setup(e.file,r)}else t.handleError(new a.a,"cf-error-uploadimage",!1)})))}getReadyProcess(){return super.getReadyProcess().next(()=>{var e;null===(e=this.uploadBooklet.controls)||void 0===e||e.title.input.focus()})}getActionProcess(e){if("upload"===e){let e=new OO.ui.Process(this.uploadBooklet.uploadFile());if(this.autosave)e=e.next(()=>{this.actions.setAbilities({save:!1});return this.executeAction("save").fail(()=>{this.uploadBooklet.onInfoFormChange()})});return e}else if("cancelupload"===e)return new OO.ui.Process(this.uploadBooklet.cancelUpload());return super.getActionProcess(e)}getBodyHeight(){return 620}updateActionLabels(e){this.autosave=e;if(this.autosave)this.actions.get({actions:["upload","save"]}).forEach(e=>{e.setLabel(c.a.s("ud-uploadandsave"))});else this.actions.get({actions:["upload","save"]}).forEach(e=>{e.setLabel(c.a.mws("upload-dialog-button-"+e.getAction()))})}showErrors(e){this.hideErrors();super.showErrors(e)}}class ForeignStructuredUploadBookletLayout extends mw.ForeignStructuredUpload.BookletLayout{constructor(...e){super(...e)}setup(e,t){this.modifyUploadForm();this.modifyInfoForm();if(e)this.setFile(e);this.enProjectName=t;this.on("fileSaved",()=>{this.setPage("info")});this.onPresetChange()}modifyUploadForm(){this.ownWorkCheckbox.setSelected(!0);this.controls={};const e=this.uploadForm.items[0];e.items.slice(1).forEach(e=>{e.toggle(!1)});this.controls.preset=Object(u.createRadioField)({label:c.a.s("ud-preset"),options:[{data:"projectScreenshot",label:c.a.s("ud-preset-projectscreenshot",c.a.mws("project-localized-name-"+mw.config.get("wgDBname"))),help:c.a.s("ud-preset-projectscreenshot-help"),selected:!0},{data:"mediawikiScreenshot",label:c.a.s("ud-preset-mediawikiscreenshot")},{data:"ownWork",label:c.a.s("ud-preset-ownwork"),help:Object(h.q)(c.a.mws("upload-form-label-own-work-message-commons"))},{data:"no",label:c.a.s("ud-preset-no")}]});this.controls.title={};this.controls.title.input=new mw.widgets.TitleInputWidget({$overlay:this.$overlay,showMissing:!1,showSuggestionsOnFocus:!1,value:""});this.insertSubjectPageButton=new PseudoLink({label:c.a.page.mwTitle.getSubjectPage().getPrefixedText(),input:this.controls.title.input});if(c.a.page.mwTitle.isTalkPage())this.insertTalkPageButton=new PseudoLink({label:c.a.page.name,input:this.controls.title.input});this.controls.title.field=new OO.ui.FieldLayout(this.controls.title.input,{label:c.a.s("ud-preset-projectscreenshot-title"),help:$.cdMerge($("<div>").append(this.insertSubjectPageButton.element),this.insertTalkPageButton?$("<div>").append(this.insertTalkPageButton.element):void 0,$("<div>").html(c.a.sParse("ud-preset-projectscreenshot-title-help"))),align:"top",helpInline:!0,classes:["cd-uploadDialog-fieldLayout-internal"]});const t=this.controls.preset.select.findItemFromData("projectScreenshot");t.$label.append(this.controls.title.field.$element);this.controls.configure=Object(u.createCheckboxField)({value:"configure",label:c.a.s("ud-configure")});e.addItems([this.controls.preset.field,this.controls.configure.field]);this.controls.preset.select.on("select",this.onPresetChange.bind(this));t.radio.$input.on("focus",()=>{this.controls.title.input.focus()});this.configureManuallySelected=!1;this.controls.configure.input.on("change",this.onPresetChange.bind(this)).on("manualChange",e=>{this.configureManuallySelected=e});this.controls.title.input.on("change",this.onUploadFormChange.bind(this)).on("enter",this.emit.bind(this,"submitUpload"))}onUploadFormChange(){var e=this;return s()((function*(){let t=!0;if(e.controls)yield e.controls.title.input.getValidity().catch(()=>{t=!1});e.emit("uploadValid",e.selectFileWidget.getValue()&&t)}))()}onPresetChange(e){var t;const i=this.controls.preset.select.findSelectedItem().getData(),n="projectScreenshot"!==i;this.controls.title.input.setDisabled(n);this.insertSubjectPageButton.setDisabled(n);null===(t=this.insertTalkPageButton)||void 0===t||t.setDisabled(n);if("boolean"!=typeof e)if("no"===i){this.configureManuallySelected=this.controls.configure.input.isSelected();this.controls.configure.input.setDisabled(!0).setSelected(!0)}else this.controls.configure.input.setDisabled(!1).setSelected(this.configureManuallySelected);this.emit("changeSteps",this.isInfoFormOmitted())}isInfoFormOmitted(){const e=this.controls.preset.select.findSelectedItem().getData();return("projectScreenshot"===e||"mediawikiScreenshot"===e)&&!this.controls.configure.input.isSelected()}areAddedInputsDisabled(){return"ownWork"===this.controls.preset.select.findSelectedItem().getData()&&!this.controls.configure.input.isSelected()}modifyInfoForm(){this.controls.source=Object(u.createTextField)({label:c.a.s("ud-source"),required:!0});this.controls.author=Object(u.createTextField)({label:c.a.s("ud-author"),required:!0});this.controls.license=Object(u.createTextField)({label:c.a.s("ud-license"),required:!0,classes:["cd-input-monospace"],help:Object(h.q)(c.a.mws("mwe-upwiz-license-custom-explain",null,c.a.mws("mwe-upwiz-license-custom-url")),{targetBlank:!0})});this.controls.source.input.on("change",this.onInfoFormChange.bind(this));this.controls.author.input.on("change",this.onInfoFormChange.bind(this));this.controls.license.input.on("change",this.onInfoFormChange.bind(this));this.infoForm.items[1].addItems([this.controls.source.field,this.controls.author.field,this.controls.license.field],2)}onInfoFormChange(){var e=this;return s()((function*(){var t,i,n;let s=!0;yield Promise.all([e.uploadPromise,e.filenameWidget.getValidity(),e.descriptionWidget.getValidity(),null===(t=e.controls)||void 0===t?void 0:t.source.input.getValidity(),null===(i=e.controls)||void 0===i?void 0:i.author.input.getValidity(),null===(n=e.controls)||void 0===n?void 0:n.license.input.getValidity()].filter(d.h)).catch(()=>{s=!1});e.emit("infoValid",s)}))()}createUpload(){return new ForeignStructuredUpload(this.target)}uploadFile(){const e=this.controls.preset.select.findSelectedItem().getData();if(this.preset&&e!==this.preset)this.clear();this.preset=e;let t=super.uploadFile();const i=moment().utc().locale("en");this.dateWidget.mustBeBefore=moment(i.clone().add(2,"day").format("YYYY-MM-DD"));let n,s,o="",a="";if("projectScreenshot"===this.preset||"mediawikiScreenshot"===this.preset){s=this.getExactDateFromLastModified(this.getFile())||i.format("YYYY-MM-DD HH-mm-ss");const e=this.controls.title.input.getMWTitle();if(e){o=e.getPrefixedText();n=/:[^ ]/.test(e.getMainText());if(n)o=this.controls.title.input.getValue();a=this.constructor.generateHistoryText(c.a.g.serverName,o)}}switch(this.preset){case"projectScreenshot":{const e=n?"":this.enProjectName,i=`${e} ${o}`.trim().replace(new RegExp("["+mw.config.get("wgIllegalFileChars","")+"]","g"),"-"),r=e||`[[${o}]]`;let u;if(!n&&o&&getInterwikiPrefixForHostnameSync){u=`[[:${getInterwikiPrefixForHostnameSync(c.a.g.serverName,"commons.wikimedia.org")}${o}]]`}else u=r;this.filenameWidget.setValue(`${i} ${s}`);this.descriptionWidget.setValue("Screenshot of "+u);this.controls.source.input.setValue("Screenshot");this.controls.author.input.setValue(`${r} authors${a}`);this.controls.license.input.setValue(n?"{{Wikimedia-screenshot}}":this.constructor.getTemplateForHostname(c.a.g.serverName));if(n)t=t.then(()=>{var e;return null===(e=getUrlFromInterwikiLink)||void 0===e?void 0:e(o)},e=>{throw["badUpload",e]}).then(e=>{if(!e)throw[];const t=new URL(e,c.a.g.server).hostname;this.controls.license.input.setValue(this.constructor.getTemplateForHostname(t));const i=Object(d.p)(t);return Promise.all([l.a.getApi().getMessages("project-localized-name-"+i,{amlang:"en"}),Object(d.e)(e),t])}).then(([e,t,i])=>{if(!e)return;const n=Object.values(e)[0],o=this.constructor.generateHistoryText(i,t);this.filenameWidget.setValue(`${n} ${t} ${s}`);this.controls.author.input.setValue(`${n} authors${o}`)},e=>{if("badUpload"===e[0])throw e[1]});break}case"mediawikiScreenshot":this.filenameWidget.setValue("MediaWiki "+s);this.descriptionWidget.setValue("Screenshot of MediaWiki");this.controls.source.input.setValue("Screenshot");this.controls.author.input.setValue("[[Special:Version|MediaWiki contributors]]");this.controls.license.input.setValue("{{MediaWiki-screenshot}}");this.categoriesWidget.addTag("MediaWiki screenshots");break;case"ownWork":this.controls.source.input.setValue(this.upload.config.format.ownwork);this.controls.author.input.setValue(this.upload.getDefaultUser());this.controls.license.input.setValue(this.upload.config.format.license)}const r=this.isInfoFormOmitted(),u=this.areAddedInputsDisabled();this.filenameWidget.setDisabled(r);this.descriptionWidget.setDisabled(r);this.categoriesWidget.setDisabled(r);this.dateWidget.setDisabled(r);this.controls.source.input.setDisabled(r||u);this.controls.author.input.setDisabled(r||u);this.controls.license.input.setDisabled(r||u);t.catch(()=>{this.onUploadFormChange()});return t}getDateFromLastModified(e){if(null!=e&&e.lastModified)return moment(e.lastModified).utc().format("YYYY-MM-DD")}getExactDateFromLastModified(e){if(e.lastModified)return moment(e.lastModified).utc().format("YYYY-MM-DD HH-mm-ss")}getText(){this.upload.setSource(this.controls.source.input.getValue());this.upload.setUser(this.controls.author.input.getValue());this.upload.setLicense(this.controls.license.input.getValue());return super.getText()}saveFile(){this.categoriesWidget.addTag("Uploaded with Convenient Discussions");const e=super.saveFile();e.catch(()=>{if(this.isInfoFormOmitted())this.cancelUpload()});return e}cancelUpload(){this.onUploadFormChange();this.setPage("upload")}clear(){var e,t,i;this.progressBarWidget.setProgress(0);this.filenameWidget.setValue(null).setValidityFlag(!0);this.descriptionWidget.setValue(null).setValidityFlag(!0);this.categoriesWidget.setValue([]);if(!this.dateWidget.getValue())this.dateWidget.setValidityFlag(!0);null===(e=this.controls)||void 0===e||e.source.input.setValue(null).setValidityFlag(!0);null===(t=this.controls)||void 0===t||t.author.input.setValue(null).setValidityFlag(!0);null===(i=this.controls)||void 0===i||i.license.input.setValue(null).setValidityFlag(!0)}static generateHistoryText(e,t){if(!t)return"";return`, see the [${`https://${e}${mw.util.getUrl(t,{action:"history",offset:Object(d.k)(new Date,Object(d.L)((new Date).getUTCSeconds(),2))})}`} page history]`}static getTemplateForHostname(e){let t;[[/^(.+)\.wikipedia.org$/,"{{Wikipedia-screenshot%s}}"],[/^(.+)\.wiktionary.org$/,"{{Wiktionary-screenshot%s}}"],[/^(.+)\.wikiquote.org$/,"{{Wikiquote-screenshot%s}}"],[/^(.+)\.wikiversity.org$/,"{{Wikiversity-screenshot%s}}"],[/^(?:(.+)\.)?wikisource.org$/,"{{Wikisource-screenshot%s}}"],[/^(.+)\.wikivoyage.org$/,"{{Wikivoyage-screenshot%s}}"]].some(([i,n])=>{const s=e.match(i);if(s){t=n.replace("%s",s[1]?"|"+s[1]:"");return!0}return!1});return t||"{{Wikimedia-screenshot}}"}}class ForeignStructuredUpload extends mw.ForeignStructuredUpload{constructor(e){super(e,{...c.a.getApiConfig(),...c.a.g.apiErrorFormatHtml})}setSource(e){this.source=e}setUser(e){this.user=e}setLicense(e){this.license=e}getSource(){return this.source}getUser(){return this.user||this.getDefaultUser()}getDefaultUser(){return super.getUser()}getLicense(){return this.license}}Object(u.tweakUserOoUiClass)(UploadDialog);Object(u.tweakUserOoUiClass)(ForeignStructuredUploadBookletLayout);Object(u.tweakUserOoUiClass)(ForeignStructuredUpload);Object(u.mixinUserOoUiClass)(UploadDialog,r.a);t.default=UploadDialog},function(e,t,i){var n=i(26),s=i(69);if("string"==typeof(s=s.__esModule?s.default:s))s=[[e.i,s,""]];var o={insert:"head",singleton:!1};n(s,o);e.exports=s.locals||{}},function(e,t,i){(t=i(27)(!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(3),s=i.n(n),o=i(12),a=i.n(o),r=i(35),c=i(18),l=i(0),d=i(2),u=i(5),h=i(8),m=i(1),p=i(9);class SettingsDialog extends r.a{constructor(e){super({classes:["cd-dialog-settings"]});this.initialPageName=e}getBodyHeight(){return 600}initialize(...e){super.initialize(...e);this.pushPending();this.initPromise=Promise.all([u.a.load({omitLocal:!0})]);this.loadingPanel=new OO.ui.PanelLayout({padded:!0,expanded:!1});this.loadingPanel.$element.append($("<div>").text(l.a.s("loading-ellipsis")));this.settingsPanel=new OO.ui.PanelLayout({padded:!1,expanded:!0});this.reloadPanel=new OO.ui.PanelLayout({padded:!0,expanded:!1});this.reloadPanel.$element.append($("<p>").text(l.a.s("sd-saved")));this.dataDeletedPanel=new OO.ui.PanelLayout({padded:!0,expanded:!1});this.dataDeletedPanel.$element.append($("<p>").text(l.a.s("sd-dataremoved")));this.stackLayout=new OO.ui.StackLayout({items:[this.loadingPanel,this.settingsPanel,this.reloadPanel,this.dataDeletedPanel]});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(s()((function*(){try{[t.settings]=yield t.initPromise}catch(e){t.handleError(e,"error-settings-load",!1);return}if(!Object.keys(t.settings).length)t.settings=u.a.get();t.renderControls(t.settings);t.stackLayout.setItem(t.settingsPanel);t.bookletLayout.setPage(t.initialPageName||u.a.scheme.ui[0].name);t.actions.setAbilities({close:!0});t.popPending();d.a.addPreventUnloadCondition("dialog",()=>t.isUnsaved())})))}getActionProcess(e){var t=this;if("save"===e)return new OO.ui.Process(s()((function*(){t.pushPending();try{yield u.a.save(t.collectSettings())}catch(e){t.handleError(e,"error-settings-save",!0);return}d.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(()=>{this.confirmClose()});else if("reset"===e)return new OO.ui.Process(()=>{if(confirm(l.a.s("sd-reset-confirm"))){const e=this.bookletLayout.getCurrentPageName();this.renderControls(u.a.scheme.default);this.bookletLayout.setPage(e)}});return super.getActionProcess(e)}createPages(e){const t={},i=u.a.scheme.ui.map(i=>{const n=i.controls.map(i=>{const n=i.name;switch(i.type){case"checkbox":t[n]=Object(p.createCheckboxField)(Object.assign({value:n,selected:e[n]},i));t[n].input.on("change",this.updateAbilities.bind(this));break;case"radio":t[n]=Object(p.createRadioField)(Object.assign({selected:e[n]},i));t[n].select.on("select",this.updateAbilities.bind(this));break;case"text":t[n]=Object(p.createTextField)(Object.assign({value:e[n]},i));t[n].input.on("change",this.updateAbilities.bind(this));break;case"number":t[n]=Object(p.createNumberField)(Object.assign({value:e[n]},i));t[n].input.on("change",this.updateAbilities.bind(this));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.on("select",this.updateAbilities.bind(this));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.on("change",this.updateAbilities.bind(this));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});return new(Object(p.tweakUserOoUiClass)(class extends OO.ui.PageLayout{constructor(){super(i.name);this.$element.append(n)}setupOutlineItem(){this.outlineItem.setLabel(i.label)}}))});t.removeData.button.connect(this,{click:"removeData"});t.desktopNotifications.select.connect(this,{choose:"onDesktopNotificationsSelectChange"});this.controls=t;return i}renderControls(e){u.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.updateAbilities()}getStateSettings(){return u.a.scheme.states.reduce((e,t)=>{e[t]=this.settings[t];return e},{})}collectSettings(){const e={},t=this.controls;u.a.scheme.ui.forEach(i=>{i.controls.forEach(i=>{var n;const s=i.name;switch(i.type){case"checkbox":e[s]=t[s].input.isSelected();break;case"radio":e[s]=(null===(n=t[s].select.findSelectedItem())||void 0===n?void 0:n.getData())||u.a.scheme.default[s];break;case"text":e[s]=t[s].input.getValue();break;case"number":e[s]=Number(t[s].input.getValue());break;case"multicheckbox":e[s]=t[s].multiselect.findSelectedItemsData();break;case"multitag":e[s]=(i.uiToData||(e=>e)).call(null,t[s].multiselect.getValue())}})});return Object.assign({},u.a.scheme.default,e,this.getStateSettings(),{"insertButtons-altered":JSON.stringify(e.insertButtons)!==JSON.stringify(u.a.scheme.default.insertButtons)})}updateAbilities(){var e=this;return s()((function*(){var t,i,n;const s=e.controls;s.collapseThreadsLevel.input.setDisabled(!s.enableThreads.input.isSelected());s.hideTimezone.input.setDisabled("relative"===(null===(t=s.timestampFormat.select.findSelectedItem())||void 0===t?void 0:t.getData()));s.notifyCollapsedThreads.input.setDisabled("none"===(null===(i=s.desktopNotifications.select.findSelectedItem())||void 0===i?void 0:i.getData())&&"none"===(null===(n=s.notifications.select.findSelectedItem())||void 0===n?void 0:n.getData()));s.showContribsLink.input.setDisabled(!s.reformatComments.input.isSelected());s.useTemplateData.input.setDisabled(!s.autocompleteTypes.multiselect.findItemFromData("templates").isSelected());let o=!0;yield Promise.all([].concat(...u.a.scheme.ui.map(e=>e.controls.filter(e=>"number"===e.type).map(e=>e.name))).map(e=>s[e].input.getValidity())).catch(()=>{o=!1});const a=e.collectSettings();e.actions.setAbilities({save:!Object(m.b)(a,e.settings)&&o,reset:!Object(m.b)(Object.assign({},a),Object.assign({},u.a.scheme.default,u.a.scheme.resetsTo,e.getStateSettings()))})}))()}onDesktopNotificationsSelectChange(e){if("undefined"!=typeof Notification)if("none"!==e.data&&"granted"!==Notification.permission){OO.ui.alert(l.a.s("dn-grantpermission"));Notification.requestPermission(e=>{if("granted"!==e)this.controls.desktopNotifications.select.selectItemByData("none")})}}removeData(){var e=this;return s()((function*(){if(confirm(l.a.s("sd-removedata-confirm"))){e.pushPending();try{yield Promise.all([Object(h.k)(l.a.g.localSettingsOptionName,null),Object(h.k)(l.a.g.visitsOptionName,null),Object(h.k)(l.a.g.subscriptionsOptionName,null),Object(h.j)(l.a.g.settingsOptionName,null)])}catch(t){e.handleError(t,"sd-error-removedata",!1);return}new c.a("commentForms").removeItem();new c.a("thanks").removeItem();new c.a("seenRenderedChanges").removeItem();new c.a("collapsedThreads").removeItem();new c.a("mutedUsers").removeItem();e.stackLayout.setItem(e.dataDeletedPanel);e.actions.setMode("dataRemoved");e.popPending()}}))()}}a()(SettingsDialog,"name","settingsDialog");a()(SettingsDialog,"title",l.a.s("sd-title"));a()(SettingsDialog,"actions",[{action:"close",modes:["settings","reload","dataRemoved"],flags:["safe","close"],disabled:!0},{action:"save",modes:["settings"],label:l.a.s("sd-save"),flags:["primary","progressive"],disabled:!0},{action:"reset",modes:["settings"],label:l.a.s("sd-reset"),flags:["destructive"],disabled:!0},{action:"reload",modes:["reload"],label:l.a.s("sd-reload"),flags:["primary","progressive"]}]);a()(SettingsDialog,"size","large");a()(SettingsDialog,"cdKey","sd");Object(p.tweakUserOoUiClass)(SettingsDialog);t.default=SettingsDialog},function(e,t,i){"use strict";i.r(t);var n=i(3),s=i.n(n),o=i(12),a=i.n(o),r=i(33),c=i(6),l=i(35),d=i(37),u=i(0),h=i(2),m=i(20),p=i(1),g=i(9),f=i(11),b=i(4);class MoveSectionDialog extends l.a{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.initRequests=[this.section.getSourcePage().loadCode(),mw.loader.using("mediawiki.widgets")];this.loadingPanel=new OO.ui.PanelLayout({padded:!0,expanded:!1});this.loadingPanel.$element.append($("<div>").text(u.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(s()((function*(){var e;try{yield Promise.all(t.initRequests)}catch(e){t.abort(u.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",s=u.a.sParse(n);t.abort(s,!1)}else{console.warn(e);t.abort(u.a.sParse("error-javascript"),!1)}return}const i=t.section.source.code;t.controls={};t.controls.title={},t.controls.title.input=new mw.widgets.TitleInputWidget({$overlay:t.$overlay,excludeCurrentPage:!0,showMissing:!1,showSuggestionsOnFocus:!1,value:u.a.page.isArchive()?u.a.page.getArchivedPage().name:"",validate:()=>{const e=t.controls.title.input.getMWTitle(),i=e&&m.a.get(e);return i&&i!==t.section.getSourcePage()}});t.controls.title.field=new OO.ui.FieldLayout(t.controls.title.input,{label:u.a.s("msd-targetpage"),align:"top"});t.controls.title.input.on("change",t.onTitleInputChange.bind(t)).on("enter",()=>{if(!t.actions.get({actions:"move"})[0].isDisabled())t.executeAction("move")});if(u.a.config.getMoveSourcePageCode||u.a.config.getMoveTargetPageCode)t.controls.keepLink=Object(g.createCheckboxField)({value:"keepLink",selected:!u.a.page.isArchive(),label:u.a.s("msd-keeplink")});t.controls.summaryEnding={};t.controls.summaryEnding.input=new d.default({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:u.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(u.a.s("msd-bottom")),t.controls.summaryEnding.field.$element);t.stackLayout.setItem(t.movePanel);t.controls.title.input.focus();t.onTitleInputChange();t.actions.setAbilities({close:!0});t.$body.css("overflow","hidden");Object(p.G)(500).then(()=>{t.$body.css("overflow","")});t.updateSize();t.popPending()})))}getActionProcess(e){var t=this;if("move"===e)return new OO.ui.Process(s()((function*(){t.pushPending();t.controls.title.input.$input.blur();let e,i,n=m.a.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(b.q)(u.a.sParse("msd-moved",i.sectionWikilink),{tagName:"div"}));h.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(u.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 s()((function*(){let t=!0;yield e.controls.title.input.getValidity().catch(()=>{t=!1});e.actions.setAbilities({move:t})}))()}loadSourcePage(){var e=this;return s()((function*(){try{yield e.section.getSourcePage().loadCode(!1)}catch(e){if(e instanceof c.a){const{type:t,code:i}=e.data;if("api"===t)if("missing"===i)throw[u.a.sParse("msd-error-sourcepagedeleted"),!0];else throw[u.a.sParse("error-api",i),!0];else if("network"===t)throw[u.a.sParse("error-network"),!0]}else{console.warn(e);throw[u.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[u.a.sParse(i),!0]}else{console.warn(e);throw[u.a.sParse("error-javascript"),!1]}}const t=e.section.getSourcePage().name,i=Object(f.b)(e.section.headline);return{page:e.section.getSourcePage(),sectionSource:e.section.source,sectionWikilink:e.controls.keepLink.input.isSelected()?`${t}#${i}`:t}}))()}loadTargetPage(e){var t=this;return s()((function*(){try{yield e.loadCode()}catch(e){if(e instanceof c.a){const{type:t,code:i}=e.data;if("api"===t)if("invalid"===i)throw[u.a.sParse("msd-error-invalidpagename"),!1];else throw[u.a.sParse("error-api",i),!0];else if("network"===t)throw[u.a.sParse("error-network"),!0]}else{console.warn(e);throw[u.a.sParse("error-javascript"),!1]}}e.guessNewTopicPlacement();return{page:e,sectionWikilink:`${e.realName}#${Object(f.b)(t.section.headline)}`}}))()}editTargetPage(e,t){var i=this;return s()((function*(){let n,s;if(u.a.config.getMoveTargetPageCode&&i.controls.keepLink.input.isSelected()){const t=u.a.config.getMoveTargetPageCode(e.sectionWikilink.replace(/=/g,"{{=}}"),u.a.g.userSignature.replace(/=/g,"{{=}}"));if(Array.isArray(t)){n=t[0]+"\n";s="\n"+t[1]}else{n=t;s=""}}else{n="";s=""}const o=e.sectionSource.code,a=e.sectionSource.relativeContentStartIndex,r=Object(f.c)(o.slice(0,a)+n+o.slice(a)+s);let l;const d=t.page.code;if(t.page.areNewTopicsOnTop){var h;const e=null!==(h=t.page.firstSectionStartIndex)&&void 0!==h?h:d.length;l=Object(f.c)(d.slice(0,e))+r+d.slice(e)}else l=d+(d?"\n":"")+r;let m=i.controls.summaryEnding.input.getValue();m&&(m=u.a.mws("colon-separator",{language:"content"})+m);try{yield t.page.edit({text:l,summary:Object(p.c)({text:u.a.s("es-move-from",e.sectionWikilink)+m,section:i.section.headline}),baserevid:t.page.revisionId,starttimestamp:t.page.queryTimestamp})}catch(e){const t=u.a.sParse("msd-error-editingtargetpage");if(e instanceof c.a){const{type:i,details:n}=e.data;if("network"===i)throw[t+" "+u.a.sParse("error-network"),!0];else{let{code:e,message:i,logMessage:s}=n;if("editconflict"===e)i+=" "+u.a.sParse("msd-error-editconflict-retry");console.warn(s);throw[t+" "+i,!0]}}else{console.warn(e);throw[t+" "+u.a.sParse("error-javascript"),!1]}}}))()}editSourcePage(e,t){var i=this;return s()((function*(){const n=e.sectionSource.code;let s=i.controls.summaryEnding.input.getValue();s&&(s=u.a.mws("colon-separator",{language:"content"})+s);try{yield e.page.edit({text:e.page.code.slice(0,e.sectionSource.startIndex)+(u.a.config.getMoveSourcePageCode&&i.controls.keepLink.input.isSelected()?n.slice(0,e.sectionSource.relativeContentStartIndex)+u.a.config.getMoveSourcePageCode(t.sectionWikilink,u.a.g.userSignature,Object(f.f)(n)||u.a.g.signCode+"~")+"\n":"")+e.page.code.slice(e.sectionSource.endIndex),summary:Object(p.c)({text:u.a.s("es-move-to",t.sectionWikilink)+s,section:i.section.headline}),baserevid:e.page.revisionId,starttimestamp:e.page.queryTimestamp})}catch(e){const t=u.a.sParse("msd-error-editingsourcepage");if(e instanceof c.a){const{type:i,details:n}=e.data;if("network"===i)throw[t+" "+u.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+" "+u.a.sParse("error-javascript"),!1,!0]}}}))()}abort(e,t,i=!1){const n=Object(b.q)(e,{callbacks:{"cd-message-reloadPage":()=>{this.close();h.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",u.a.s("msd-title"));a()(MoveSectionDialog,"actions",[{action:"close",modes:["move","success"],flags:["safe","close"],disabled:!0},{action:"move",modes:["move"],label:u.a.s("msd-move"),flags:["primary","progressive"],disabled:!0}]);Object(g.tweakUserOoUiClass)(MoveSectionDialog);t.default=MoveSectionDialog},function(e,t,i){(t=i(27)(!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}.cd-autocompleteTypesMultiselect .oo-ui-checkboxMultioptionWidget:not(:last-child){margin-inline-end:1em}.cd-setting-indented{margin-inline-start: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.cd-dialog-settings{z-index:102}.cd-numberInput.cd-numberInput{width:10em}.cd-dialog-settings .oo-ui-fieldLayout-header>.oo-ui-labelElement-label:first-child{display:inline-block}.cd-input-monospace{font-family:monospace,monospace}.cd-pseudolink{border-bottom-width:1px;border-bottom-style:dashed}.cd-pseudolink:focus,.cd-pseudolink:hover{text-decoration:none}",""]);e.exports=t},function(e,t,i){var n=i(26),s=i(74);if("string"==typeof(s=s.__esModule?s.default:s))s=[[e.i,s,""]];var o={insert:"head",singleton:!1};n(s,o);e.exports=s.locals||{}},function(e,t,i){(t=i(27)(!1)).push([e.i,".cd-comment-header,.cd-comment-menu{font-size:.9285714em;line-height:1.6153846;display:flex;flex-wrap:wrap;column-gap:1em;align-items:baseline;direction:var(--cd-direction-user)}.cd-comment-header{margin-bottom:.2307692em}.cd-comment-menu{margin-top:.3076923em;-webkit-user-select:none;user-select:none}.cd-comment-menu:empty{margin-top:0}.cd-comment-author{font-weight:700;font-size:1.0769231em}.cd-comment-author-links{-webkit-user-select:none;user-select:none}.cd-comment-author-wrapper{display:inline}.cd-comment-button-label.cd-comment-button-label.cd-comment-button-label{color:#54595d;text-decoration:none}.cd-comment-button-label.cd-comment-button-label.cd-comment-button-label:hover{color:var(--color-progressive,#36c)}.cd-comment-button-label.cd-comment-button-label.cd-comment-button-label:active{color:var(--cd-link-active-color)}.cd-comment-button-icon{display:inline-block;align-self:center;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\")}.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;padding-bottom:0}.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}.cd-commentLevel:not(ol)>dd,.cd-commentLevel:not(ol)>li{padding-inline:1em 0;margin-inline:1em 0;border-inline-start:1px solid #c8ccd1;border-inline-end:0}.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>.cd-hidden:first-child+*,.cd-connectToPreviousItem.cd-connectToPreviousItem.cd-connectToPreviousItem.cd-connectToPreviousItem>.cd-hidden:first-child+*>:first-child,.cd-connectToPreviousItem.cd-connectToPreviousItem.cd-connectToPreviousItem.cd-connectToPreviousItem>.cd-hidden:first-child+*>:first-child>:first-child,.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:2;width:calc(var(--cd-comment-marker-width)/var(--cd-pixel-deviation-ratio));padding-left:var(--cd-thread-line-side-padding);padding-right:var(--cd-thread-line-side-padding)}.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%;margin-inline:1em auto}.cd-changeMark-before{margin-inline:auto .75em}.cd-commentLevel .mw-collapsible-toggle{float:var(--cd-float-content-end)}.cd-signature-timestamp{color:#54595d}",""]);e.exports=t},function(e,t,i){var n=i(26),s=i(76);if("string"==typeof(s=s.__esModule?s.default:s))s=[[e.i,s,""]];var o={insert:"head",singleton:!1};n(s,o);e.exports=s.locals||{}},function(e,t,i){(t=i(27)(!1)).push([e.i,".cd-commentForm{display:flow-root;font-weight:400;text-align:start;direction:var(--cd-direction-user);margin:.5em 0}.cd-reformattedComments .cd-commentForm{margin-block:.75em}.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;direction:var(--cd-direction-content)}.cd-commentForm .tool-button,.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}.cd-commentForm-checkboxes{text-align:start;direction:var(--cd-direction-user)}.cd-commentForm-checkboxes .oo-ui-fieldLayout{margin-inline:0 1em}.cd-commentForm-checkboxes .oo-ui-fieldLayout:last-child{margin-inline-end:0}.cd-commentForm-buttons{direction:var(--cd-direction-user)}.cd-commentForm-buttons-start{float:var(--cd-float-user-start)}.cd-commentForm-buttons-end{float:var(--cd-float-user-end)}.cd-commentForm-signature{opacity:.67}.cd-commentForm-dummyElement{height:0;overflow:hidden}.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-addSection,.cd-commentForm-addSubsection.cd-commentForm-addSubsection{margin-top:1.5em}.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;padding-top:0}.cd-commentForm-previewArea>.mw-parser-output>:last-child,.cd-commentForm-previewArea>.mw-parser-output>:last-child>:last-child{margin-bottom:0;padding-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}.cd-commentForm-previewArea-indentedComment>.mw-parser-output>dl,.cd-commentForm-previewArea-indentedComment>.mw-parser-output>dl>dd{margin-inline-start:0}.cd-commentForm-previewArea .ext-discussiontools-init-section-bar.ext-discussiontools-init-section-bar{display:none}.cd-commentForm-messageArea{width:100%;margin-bottom:.214286em}.cd-commentForm-messageArea:empty{margin-bottom:0}.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;inset-inline-end: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}.cd-commentForm-previewArea .cd-closeButton{inset-inline-end:1px;inset-inline-start:unset}.cd-mobile.cd-commentForm-previewArea .cd-closeButton{inset-inline-end:.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;direction:var(--cd-direction-content)}.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;float:var(--cd-float-user-start)}.cd-insertButtons-button:focus,.cd-insertButtons-button:hover{text-decoration:none;color:#222;background-color:rgba(0,23,70,.086)}.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;z-index:2}.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}.cd-input-acceptFile.cd-input-acceptFile textarea{background-color:#eaf3ff}.cd-uploadDialog-typeFieldset{margin:16px 0 24px}.cd-uploadDialog-fieldLayout-internal{cursor:default}.cd-uploadDialog-fieldLayout-internal.oo-ui-fieldLayout.oo-ui-labelElement>.oo-ui-fieldLayout-body>.oo-ui-fieldLayout-header{padding-bottom:0}.tool-button.highlight:not(:hover){background-color:#eaf3ff}",""]);e.exports=t},function(e,t,i){var n=i(26),s=i(78);if("string"==typeof(s=s.__esModule?s.default:s))s=[[e.i,s,""]];var o={insert:"head",singleton:!1};n(s,o);e.exports=s.locals||{}},function(e,t,i){(t=i(27)(!1)).push([e.i,'.cd-section-button-container{margin-top:.5em;margin-bottom:.5em}ol .cd-section-button{margin-top:-2px}.ltr.sitedir-rtl .mw-editsection:before{content:"\\200B\\200E"}.rtl.sitedir-ltr .mw-editsection:before{content:"\\200B\\200F"}.ltr.sitedir-rtl .mw-editsection-bracket:first-of-type,.rtl.sitedir-ltr .mw-editsection-bracket:first-of-type{margin-right:.25em;margin-left:0}.ltr.sitedir-rtl .mw-editsection-bracket:last-of-type,.rtl.sitedir-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 .75em;display:flex;flex-wrap:wrap;direction:var(--cd-direction-user)}.ext-discussiontools-visualenhancements-enabled .ext-discussiontools-init-section+.cd-section-bar{margin-top:-10px}.cd-section-bar-item{display:block;box-sizing:border-box;min-height:30px;border-top:1px solid transparent;border-bottom:1px solid transparent;color:#54595d;padding:5px 0;line-height:1.42857143em;white-space:nowrap;unicode-bidi:plaintext;margin-inline:0 2em}.cd-section-bar-item-authorCount-innerWrapper{cursor:default}.cd-section-bar-item:last-child{margin-inline-end: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.cd-section-bar-button>.oo-ui-buttonElement-button{min-width:30px;min-height:30px;font-weight:400}.skin-vector h1 .cd-section-bar-button.cd-section-bar-button>.oo-ui-buttonElement-button{font-family:sans-serif}.cd-section-bar-moremenu>.oo-ui-buttonElement-button>.oo-ui-iconElement-icon.oo-ui-iconElement-icon{background-size:16px 16px}.cd-section-metadata{display:flex;flex-wrap:wrap;direction:var(--cd-direction-user)}.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{white-space:nowrap}.cd-topic-actions{margin-inline-start:auto;margin-inline-end:-.4615385em;padding-inline-start:1.5em}.cd-subsection-actions{font-weight:400}.sitedir-ltr .cd-subsection-actions,.sitedir-rtl .mw-content-ltr .cd-subsection-actions{margin-left:auto;margin-right:-.4615385em;padding-left:1.5em}.sitedir-ltr .mw-content-rtl .cd-subsection-actions,.sitedir-rtl .cd-subsection-actions{margin-left:-.4615385em;margin-right:auto;padding-right:1.5em}.cd-subsection-heading{display:flex;align-items:baseline;overflow:unset}.cd-section-hidden{visibility:hidden}.ext-discussiontools-visualenhancements-enabled .cd-commentLayersContainer+.ext-discussiontools-init-section{margin-top:0;border-top:0}',""]);e.exports=t},function(e,t,i){var n=i(26),s=i(80);if("string"==typeof(s=s.__esModule?s.default:s))s=[[e.i,s,""]];var o={insert:"head",singleton:!1};n(s,o);e.exports=s.locals||{}},function(e,t,i){(t=i(27)(!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:calc(var(--cd-comment-marker-width)/var(--cd-pixel-deviation-ratio));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-innerWrapper{position:absolute;z-index:1;bottom:0;font-size:.875rem;display:none;flex-direction:row;direction:var(--cd-direction-user);inset-inline-end:0}.cd-comment-overlay-hovered .cd-comment-overlay-innerWrapper{display:flex}.cd-comment-overlay-gradient{width:1.5em;display:inline-block;-moz-user-select:none;-webkit-user-select:none;user-select:none;background-image:linear-gradient(var(--cd-gradient-user-start),var(--cd-comment-hovered-background-color),hsla(0,0%,100%,0))}.cd-comment-overlay-deleted.cd-comment-overlay-deleted .cd-comment-overlay-gradient{background-image:linear-gradient(var(--cd-gradient-user-start),var(--cd-comment-deleted-hovered-background-color),hsla(0,0%,100%,0))}.cd-comment-overlay-changed.cd-comment-overlay-changed .cd-comment-overlay-gradient{background-image:linear-gradient(var(--cd-gradient-user-start),var(--cd-comment-new-hovered-background-color),hsla(0,0%,100%,0))}.cd-comment-overlay-target.cd-comment-overlay-target .cd-comment-overlay-gradient{background-image:none}.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}.ltr.sitedir-rtl .cd-comment-overlay-content,.rtl.sitedir-ltr .cd-comment-overlay-content{margin-inline:0 .5em}.cd-comment-overlay-line,.cd-comment-overlay-marker{inset-inline-start:calc(-1px - (var(--cd-comment-marker-width)/2 - .5px)/var(--cd-pixel-deviation-ratio))}.cd-comment-overlay-line-gapCloser{position:absolute;top:0;inset-inline-start:-1px;width:calc(1px/var(--cd-pixel-deviation-ratio-for-1px));height:100%;background-color:#c8ccd1}.cd-comment-button-ooui.cd-comment-button-ooui{margin-inline-end:0}.cd-comment-button-ooui.cd-comment-button-ooui:not(:first-child){margin-inline-start:1em}.cd-comment-button-ooui.cd-comment-button-ooui.oo-ui-iconElement:first-child{margin-inline-start: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;padding-inline-start:1.4285714em}body:not(.skin-monobook) .cd-comment-button-ooui-icon.cd-comment-button-ooui-icon>.oo-ui-buttonElement-button>.oo-ui-iconElement-icon{inset-inline-start:0}.cd-commentLayersContainer{position:relative;pointer-events:none;direction:var(--cd-direction-content)}.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(26),s=i(82);if("string"==typeof(s=s.__esModule?s.default:s))s=[[e.i,s,""]];var o={insert:"head",singleton:!1};n(s,o);e.exports=s.locals||{}},function(e,t,i){(t=i(27)(!1)).push([e.i,"#cd-navPanel{position:fixed;top:41.5%;z-index:3;width:2.1875rem;background-color:#fff;border:1px solid #a2a9b1;inset-inline-start:0;border-inline-start-width:0;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\")}@media screen and (max-width:999px){.skin-vector-2022 #cd-navPanel{inset-inline-start:auto;inset-inline-end:0;border-inline-start-width:1px;border-inline-end-width:0}}.cd-navPanel-button{display:block;text-align:center;background-position:50%;background-repeat:no-repeat;cursor:pointer;height:1.9375rem;box-sizing:initial}.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(26),s=i(84);if("string"==typeof(s=s.__esModule?s.default:s))s=[[e.i,s,""]];var o={insert:"head",singleton:!1};n(s,o);e.exports=s.locals||{}},function(e,t,i){(t=i(27)(!1)).push([e.i,".cd-pageNav{position:fixed;z-index:1;font-size:12px;color:#202122;overflow-wrap:break-word;background-repeat:no-repeat;direction:var(--cd-direction-user);inset-inline-start:0}.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(--color-progressive,#36c)}.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}.cd-pageNav-item.cd-pageNav-item-level-1{margin-inline-start:1em}.cd-pageNav-item.cd-pageNav-item-level-2{margin-inline-start:2em}.cd-pageNav-item.cd-pageNav-item-level-3{margin-inline-start:3em}.cd-pageNav-item.cd-pageNav-item-level-4{margin-inline-start:4em}.cd-pageNav-item.cd-pageNav-item-level-5{margin-inline-start:5em}",""]);e.exports=t},function(e,t,i){var n=i(26),s=i(86);if("string"==typeof(s=s.__esModule?s.default:s))s=[[e.i,s,""]];var o={insert:"head",singleton:!1};n(s,o);e.exports=s.locals||{}},function(e,t,i){(t=i(27)(!1)).push([e.i,":root{--cd-link-active-color:#faa700}.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 .cd-section-button.cd-section-button.cd-section-button,.skin-monobook .cd-thread-button.cd-thread-button.cd-thread-button.cd-thread-button{margin-inline-start:0}.skin-monobook.sitedir-ltr .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.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{background-position:3px 0}.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}.monobook-body{position:relative;z-index:0}.skin-timeless{--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-timeless .cd-commentLevel:not(ol)>dd{margin-bottom:.5em}.skin-timeless.cd-reformattedComments .cd-commentLevel:not(ol)>dd{margin-bottom:.75em}.skin-modern #mw-content-text{position:relative}.skin-modern .cd-loadingPopup{width:18.2em}.skin-vector-2022 p+.cd-comment-menu{margin-top:-.5em}",""]);e.exports=t},function(e,t,i){var n=i(26),s=i(88);if("string"==typeof(s=s.__esModule?s.default:s))s=[[e.i,s,""]];var o={insert:"head",singleton:!1};n(s,o);e.exports=s.locals||{}},function(e,t,i){(t=i(27)(!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-inline: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-section-button,.cd-thread-button.cd-thread-button.cd-thread-button.cd-thread-button{direction:var(--cd-direction-user);display:block;margin-inline-start:-1px}.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{white-space:normal}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-block:.5em}.cd-reformattedComments .cd-thread-button-container.cd-thread-button-container.cd-thread-button-container{margin-block:.75em}.skin-vector ol>li.cd-thread-button-container.cd-thread-button-container.cd-thread-button-container{margin-block:.14285714em}.cd-thread-button-container{overflow:hidden}div.cd-thread-button-container{margin-inline-start:-1px;padding-inline-start:1px}.cd-thread-button-invisible{visibility:hidden}.cd-button-expandNote.cd-button-expandNote.cd-button-expandNote.cd-button-expandNote>.oo-ui-buttonElement-button{padding-inline:1em 0}.cd-button-expandNote.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 .285714em;inset-inline:0 auto}.ltr .cd-button-expandNote.cd-button-expandNote.cd-button-expandNote.cd-button-expandNote>.oo-ui-buttonElement-button>.oo-ui-iconElement-icon{transform:none}.rtl .cd-button-expandNote.cd-button-expandNote.cd-button-expandNote.cd-button-expandNote>.oo-ui-buttonElement-button>.oo-ui-iconElement-icon{transform:scaleX(-1)}.cd-button-expandNote.cd-button-expandNote.cd-button-expandNote.cd-button-expandNote>.oo-ui-buttonElement-button>.oo-ui-labelElement-label{direction:var(--cd-direction-user);unicode-bidi:embed}.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-dummyId){display:none!important}.mw-heading.cd-hidden:not(#cd-dummyId){display:block!important;height:0}.mw-heading.cd-hidden:not(#cd-dummyId)>*{visibility:hidden}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;inset-inline-start:0;z-index:111}.sitedir-ltr.ltr .cd-loadingPopup{direction:ltr}.sitedir-ltr.rtl .cd-loadingPopup,.sitedir-rtl .cd-loadingPopup{direction:rtl}.skin-vector-2022 .cd-loadingPopup{width:0;margin-inline-start: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-disabled.cd-button-disabled.cd-button-disabled.cd-button-disabled.cd-button-disabled{color:#72777d}.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-copyTextLayout>.oo-ui-fieldLayout-body>.oo-ui-fieldLayout-field,.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.cd-dialog-copyLink-linkTypeSelect{display:flex;justify-content:center;margin:.5em 0}.cd-diffView-diff{margin:1em 0}.cd-diffView-nextDiffLink{margin-inline-start:1em;float:var(--cd-float-user-end)}.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}.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}.cd-popup-onboarding{font-size:.875rem;z-index:10}.cd-popup-onboarding .oo-ui-labelElement-label{font-weight:700}.skin-vector-2022 .cd-popup-onboarding-newTopicsSubscription{margin-inline-end:12px}.cd-helpPopup var{background-color:#444;color:#fff;font-style:normal}.cd-dialog-copyLink .oo-ui-textInputWidget input{height:auto}.mw-notification a{padding:.125rem 0;position:relative}",""]);e.exports=t},function(e,t,i){var n=i(26),s=i(90);if("string"==typeof(s=s.__esModule?s.default:s))s=[[e.i,s,""]];var o={insert:"head",singleton:!1};n(s,o);e.exports=s.locals||{}},function(e,t,i){(t=i(27)(!1)).push([e.i,".cd-toc-commentCount{color:#72777d;text-decoration:inherit;user-select:none;display:inline-block}.cd-toc-commentCount-before{margin-inline-end:.75em}.vector-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-inline-end:.75em}.vector-toc .cd-toc-addedCommentList,.vector-toc .cd-toc-newCommentList{margin-top:0;margin-inline-start:20px}.vector-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.cd-toc-addedCommentList a,.cd-toc-addedCommentList .cd-toc-bullet,.cd-toc-addedCommentList .cd-toc-more,.cd-toc-addedSection.cd-toc-addedSection.cd-toc-addedSection a{color:#72777d}.cd-toc-more{cursor:help}.cd-toc-hiddenTocNumber{visibility:hidden}.cd-toc-bullet{padding-inline-end:.5em}.cd-toc-bullet.vector-toc-numb{display:inline}.cd-toc-commentLinkText-sidebar.cd-toc-commentLinkText-sidebar.cd-toc-commentLinkText-sidebar{padding:2px 0}",""]);e.exports=t},function(e,t,i){var n=i(26),s=i(92);if("string"==typeof(s=s.__esModule?s.default:s))s=[[e.i,s,""]];var o={insert:"head",singleton:!1};n(s,o);e.exports=s.locals||{}},function(e,t,i){(t=i(27)(!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)}.cd-comment-overlay-new .cd-comment-overlay-gradient{background-image:linear-gradient(var(--cd-gradient-user-start),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)}.cd-comment-overlay-own .cd-comment-overlay-gradient{background-image:linear-gradient(var(--cd-gradient-user-start),var(--cd-comment-own-hovered-background-color),hsla(0,0%,100%,0))}.cd-commentForm-highlighted .cd-message{margin-top:.5em}",""]);e.exports=t},function(e,t,i){var n=i(26),s=i(94);if("string"==typeof(s=s.__esModule?s.default:s))s=[[e.i,s,""]];var o={insert:"head",singleton:!1};n(s,o);e.exports=s.locals||{}},function(e,t,i){(t=i(27)(!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;box-sizing:border-box;min-height:32px;margin-block:0;margin-inline:.5em 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(3),s=i.n(n),o=i(12),a=i.n(o),r=i(6),c=i(49),l=i(35),d=i(0),u=i(2),h=i(8),m=i(1),p=i(9);class EditSubscriptionsDialog extends l.a{constructor(){super();this.subscriptions=u.a.getSubscriptionsInstance()}getBodyHeight(){return(this.$errorItems?this.$errors.prop("scrollHeight"):this.$body.prop("scrollHeight"))+1}initialize(...e){super.initialize(...e);this.pushPending();this.initPromise=this.subscriptions.load();this.loadingPanel=new OO.ui.PanelLayout({padded:!0,expanded:!1});this.loadingPanel.$element.append($("<div>").text(d.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(s()((function*(){let e;try{yield t.initPromise;e=yield Object(h.c)(t.subscriptions.getPageIds())}catch(e){t.handleError(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=>t.subscriptions.getForPageId(e.pageid).map(t=>`${e.title}#${t}`).join("\n")).join("\n");t.input=new c.default({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);t.input.focus();t.actions.setAbilities({close:!0});t.$body.css("overflow","hidden");Object(m.G)(500).then(()=>{t.$body.css("overflow","")});t.updateSize();t.popPending();u.a.addPreventUnloadCondition("dialog",()=>t.isUnsaved())})))}getActionProcess(e){var t=this;if("save"===e)return new OO.ui.Process(this.save.bind(this));else if("close"===e)return new OO.ui.Process(s()((function*(){yield t.confirmClose()})));return super.getActionProcess(e)}save(){var e=this;return s()((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(),s=n[2].trim();if(!t[e]){t[e]=[];i.push(e)}t[e].push(s)}});let n,s,o;try{({normalized:n,redirects:s,pages:o}=(yield Object(h.b)(i))||{})}catch(t){e.handleError(t,"ewsd-error-processing",!0);return}n.concat(s).filter(e=>t[e.from]).forEach(e=>{var i;t[i=e.to]||(t[i]=[]);t[e.to].push(...t[e.from]);delete t[e.from]});const a={};o.filter(e=>void 0!==e.pageid).forEach(e=>{a[e.title]=e.pageid});const c={};Object.keys(t).filter(e=>a[e]).forEach(i=>{c[a[i]]=e.subscriptions.itemsToKeys(t[i].filter(m.K))});try{e.subscriptions.save(c)}catch(t){if(t instanceof r.a){const{type:i,code:n}=t.data;if("internal"===i&&"sizeLimit"===n)e.handleError(t,"ewsd-error-maxsize",!1);else e.handleError(t,"ewsd-error-processing",!0)}else e.handleError(t);e.actions.setAbilities({save:!0});return}e.popPending();e.close();mw.notify(d.a.s("ewsd-saved"))}))()}}a()(EditSubscriptionsDialog,"name","editSubscriptionsDialog");a()(EditSubscriptionsDialog,"title",d.a.s("ewsd-title"));a()(EditSubscriptionsDialog,"actions",[{action:"close",modes:["edit"],flags:["safe","close"],disabled:!0},{action:"save",modes:["edit"],label:d.a.s("ewsd-save"),flags:["primary","progressive"],disabled:!0}]);a()(EditSubscriptionsDialog,"size","large");a()(EditSubscriptionsDialog,"cdKey","ewsd");Object(p.tweakUserOoUiClass)(EditSubscriptionsDialog);t.default=EditSubscriptionsDialog},function(e,t,i){"use strict";i.r(t);var n=i(3),s=i.n(n),o=i(12),a=i.n(o),r=i(6),c=i(48),l=i(0),d=i(9),u=i(4);class CopyLinkDialog extends OO.ui.MessageDialog{constructor(e,t,i){super({classes:["cd-dialog-copyLink"]});this.object=e;this.type=t;this.content=i;this.readyDeferred=$.Deferred()}initialize(...e){super.initialize(...e);this.message.$element.remove();this.message=new c.default({classes:["oo-ui-messageDialog-message"]});this.text.$element.append(this.message.$element);if("comment"===this.type){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("comment"===this.type)this.createDiffPanel()}getSetupProcess(e){return super.getSetupProcess(e).next(()=>{var e;this.title.setLabel("comment"===this.type?l.a.s("cld-title-comment"):l.a.s("cld-title-section"));this.message.setLabel($.cdMerge(null===(e=this.buttonSelectWidget)||void 0===e?void 0:e.$element,this.stackLayout.$element));this.size="comment"===this.type?"larger":"large";this.stackLayout.setItem(this.anchorPanel)})}getReadyProcess(e){return super.getReadyProcess(e).next(()=>{this.readyDeferred.resolve()})}copyCallback(e,t){var i=this;return s()((function*(){if(e)mw.notify(i.content.copyMessages.success);else mw.notify(i.content.copyMessages.fail,{type:"error"});t.textInput.selectRange(0);i.close()}))()}createDiffPanel(){var e=this;return s()((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()});yield mw.loader.using(["mediawiki.diff","mediawiki.diff.styles"]);e.diffPanel=new OO.ui.PanelLayout({$content:e.createDiffPanelContent(),padded:!1,expanded:!1,scrollable:!0});e.stackLayout.addItems([e.diffPanel]);e.readyDeferred.then(()=>{mw.hook("wikipage.content").fire(e.content.$diffView)})}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.diffOptionWidget.setDisabled(t);e.diffOptionWidget.setTitle(t||"")}))()}createAnchorPanelContent(){var e,t;let i,n;if("comment"===this.type&&this.content.fragment===this.object.id){i=l.a.s("cld-help-onlycd");n=Object(u.q)(l.a.sParse("cld-help-notonlycd"))}const s=this.copyCallback.bind(this),o=Object(d.createCopyTextField)({value:this.content.wikilink,disabled:!this.content.wikilink,label:l.a.s("cld-wikilink"),copyCallback:s,help:i}),a=Object(d.createCopyTextField)({value:this.content.currentPageWikilink,label:l.a.s("cld-currentpagewikilink"),copyCallback:s,help:n}),r=Object(d.createCopyTextField)({value:this.content.permanentWikilink,label:l.a.s("cld-permanentwikilink"),copyCallback:s,help:i}),c=Object(d.createCopyTextField)({value:this.content.link,label:l.a.s("cld-link"),copyCallback:s,help:i}),h=Object(d.createCopyTextField)({value:this.content.permanentLink,label:l.a.s("cld-permanentlink"),copyCallback:s,help:i});let m,p;if(l.a.g.debug){m=Object(d.createCopyTextField)({value:this.content.jsCall,label:"JS call",copyCallback:s});p=Object(d.createCopyTextField)({value:this.content.jsBreakpoint,label:"JS conditional breakpoint",copyCallback:s})}return $.cdMerge(o.$element,a.$element,r.$element,c.$element,h.$element,null===(e=m)||void 0===e?void 0:e.$element,null===(t=p)||void 0===t?void 0:t.$element)}createDiffPanelContent(){const e=this.copyCallback.bind(this),t=Object(d.createCopyTextField)({value:this.content.diffStandard,disabled:!this.content.diffStandard,label:l.a.s("cld-diff"),copyCallback:e}),i=Object(d.createCopyTextField)({value:this.content.diffShort,disabled:!this.content.diffShort,label:l.a.s("cld-shortdiff"),copyCallback:e}),n=Object(d.createCopyTextField)({value:this.content.diffWikilink,disabled:!this.content.diffWikilink,label:l.a.s("cld-diffwikilink"),copyCallback:e});return $.cdMerge(t.$element,i.$element,n.$element,this.content.$diffView)}}a()(CopyLinkDialog,"name","copyLinkDialog");a()(CopyLinkDialog,"actions",[{label:l.a.s("cld-close"),action:"close"}]);Object(d.tweakUserOoUiClass)(CopyLinkDialog);t.default=CopyLinkDialog},function(e,t,i){"use strict";i.r(t);var n,s=i(13),o=i(0),a=i(2),r=i(15),c=i(20),l=i(1),d=i(4);const u={};let h;const m=mw.config.get("wgServerName"),p="ru.wikipedia.org"===m?"cd":"convenientDiscussions",g="ru.wikipedia.org"===m?"watchedTopics":"watchedSections";let f=mw.config.get("wgServer");if(f.startsWith("//"))f=location.protocol+f;const b=document.body.classList,v=[[4,4],[3.6666666,3.6666666],[3,3],[2.6666666,2.6666666],[2,2],[1.6666666,1.6666666],[0,1]].reduce((e,[t,i])=>e||(window.devicePixelRatio>=t?window.devicePixelRatio/i:e),void 0);Object.assign(o.a,{s(e,...t){var i;if(!e)return null;const n="convenient-discussions-"+e;let s={},o=t[t.length-1];if("object"==typeof o&&!o.options){s=o;t.splice(t.length-1)}null!==(i=h)&&void 0!==i||(h=/[?&]uselang=qqx(?=&|$)/.test(location.search));if(!h&&null!==mw.messages.get(n))return mw.message(n,...t)[s.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,s=t[t.length-1];if("object"==typeof s){i=s;t.splice(t.length-1)}if(i&&"content"===i.language)e="(content)"+e;if(!t.length&&u[e])return u[e];if(/^(discussiontools|visualeditor)-/.test(e))n=mw.messages.exists(e)?mw.message(e,...t).parse():o.a.sParse(e.slice(e.indexOf("-")+1));else n=mw.message(e,...t).parse();if(!t.length&&!n.startsWith("\u29fc"))u[e]=n;return n},getApiConfig:()=>({parameters:{formatversion:2,uselang:o.a.g.userLanguage},ajax:{headers:{"Api-User-Agent":"c:User:Jack who built the house/Convenient Discussions"}}}),debug:r.a,tests:{controller:a.a},api:{pageRegistry:c.a,generateCommentId:s.a.generateId.bind(s.a),parseCommentId:s.a.parseId.bind(s.a),buildEditSummary:l.c,isPageOverlayOn:a.a.isPageOverlayOn.bind(a.a),wrapHtml:d.q,wrap:d.q,wrapDiffBody:d.p},isWorker:!1});Object.assign(o.a.g,{debug:null!==(n=Object(l.s)("cddebug"))&&void 0!==n?n:Boolean(!1),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",commentFallbackSideMargin:10,threadLineSidePadding:3,commentMarkerWidth:3,pixelDeviationRatio:v,pixelDeviationRatioFor1px:window.devicePixelRatio/Math.min(Math.floor(window.devicePixelRatio),1),updateCheckInterval:15,backgroundUpdateCheckInterval:60,msInMin:6e4,msInDay:864e5,popularNotInlineElements:["BLOCKQUOTE","CAPTION","CENTER","DD","DIV","DL","DT","FIGURE","FIGCAPTION","FORM","H1","H2","H3","H4","H5","H6","HR","INPUT","LI","LINK","OL","P","PRE","SECTION","STYLE","TABLE","TBODY","TD","TFOOT","TH","THEAD","TR","UL"],popularInlineElements:["A","ABBR","B","BDI","BIG","BR","BUTTON","CITE","CODE","DEL","EM","FONT","I","IMG","INS","KBD","META","Q","S","SAMP","SMALL","SPAN","STRIKE","STRONG","SUB","SUP","TIME","TT","U","VAR"],noSignatureClasses:["mw-notalk","cd-moveMark"],badHighlightableElements:["BLOCKQUOTE","DL","FORM","HR","OL","PRE","TABLE","UL"],noHighlightClasses:["mw-empty-elt","tleft","tright","floatleft","floatright","cd-moveMark","cd-noHighlight"],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-${p}-localSettings`,visitsOptionName:`userjs-${p}-visits`,subscriptionsOptionName:`userjs-${p}-${g}`,server:f,serverName:m,pageName:Object(l.J)(mw.config.get("wgPageName")),pageTitle:mw.config.get("wgTitle"),namespaceNumber:mw.config.get("wgNamespaceNumber"),pageAction:mw.config.get("wgAction"),userName:(!mw.user.isNamed||mw.user.isNamed())&&mw.config.get("wgUserName")||"<unregistered>",contentDirection:b.contains("sitedir-rtl")?"rtl":"ltr",userDirection:b.contains("rtl")?"rtl":"ltr",skin:mw.config.get("skin"),isMobile:/Mobi|Android/i.test(navigator.userAgent)||void 0!==window.orientation,isDtReplyToolEnabled:b.contains("ext-discussiontools-replytool-enabled"),isDtNewTopicToolEnabled:b.contains("ext-discussiontools-newtopictool-enabled"),isDtTopicSubscriptionEnabled:b.contains("ext-discussiontools-topicsubscription-enabled"),isDtVisualEnhancementsEnabled:b.contains("ext-discussiontools-visualenhancements-enabled"),isParsoidUsed:$("#mw-content-text > .mw-parser-output").contents().get().filter(e=>e.nodeType===Node.COMMENT_NODE).some(e=>e.textContent.startsWith("Parsoid"))});if(o.a.g.debug)window.cd=o.a},function(e,t,i){"use strict";i.r(t);var n=i(3),s=i.n(n),o={messages:{},specialPageAliases:{},substAliases:[],thumbAliases:[],timezone:null,useGlobalPreferences:Boolean(mw.loader.getState("ext.globalCssJs.user")),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\u200d\u200e\u200f\u2060]|&\w+;|&#\d+;)*(?:\s+\()?$/,signatureEndingRegexp:null,tagName:null,scriptCodeName:"convenient-discussions",scriptPageWikilink:"mw: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:["> ''","''"],noSignatureClasses:[],noSignatureTemplates:[],commentAntipatterns:[],badCommentBeginnings:[],keepInSectionEnding:[/\n{2,}(?:<!--[^]*?-->\s*)+$/,/\n+(?:<!--[^]*?-->\s*)*<\/?(?:section|onlyinclude)(?: [\w ]+(?:=[^<>]+?)?)? *\/?>\s*(?:<!--[^]*?-->\s*)*$/i,/\n+<noinclude>([^]*?)<\/noinclude>\s*$/i],signatureScanLimit:100,excludeFromHeadlineClasses:[],closedDiscussionTemplates:[[],[]],closedDiscussionClasses:[],noHighlightClasses:[],addTopicButtonSelectors:[],defaultInsertButtons:[],longCommentThreshold:1e4,bytesToDeemComment:50,commentToSummaryLengthLimit:50,dontConfirmEmptyCommentPages:[],indentationCharsPattern:"([:*#]+)( *)",undoTexts:[],textReactions:[],customCommentFormModules:[],transformSummary:null,preTransformCode:null,postTransformCode:null,rejectNode: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>'}},a=i(52),r=i(51),c=i(44),l=i(46),cd=i(0),d=i(2),u=i(15),h=i(1),m=i(4);if(0);function p(){const e=["es-","cf-autocomplete-commentlinktext","move-"];if(1)i(63);const t={};Object.keys(cd.a.i18n.en).forEach(i=>{var n;const s=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[s])||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=!d.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();b()}});Object(m.e)().append(i)}function f(){const e=cd.a.g.isDtNewTopicToolEnabled&&mw.user.options.get("discussiontools-newtopictool-createpage");if(!d.a.isArticlePageTalkPage()||"view"===cd.a.g.pageAction&&!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);if(!e||"view"!==cd.a.g.pageAction){n.searchParams.delete("action");n.searchParams.delete("section");n.searchParams.set("cdaddtopic",1)}t.attr("href",n)}}function b(){return v.apply(this,arguments)}function v(){return(v=s()((function*(){u.a.startTimer("start");i(97);if(void 0===cd.a.g.pageWhitelistRegexp){cd.a.config=Object.assign(o,cd.a.config);cd.a.g.pageWhitelistRegexp=Object(h.A)(cd.a.config.pageWhitelist);cd.a.g.pageBlacklistRegexp=Object(h.A)(cd.a.config.pageBlacklist);p()}d.a.init();g();f();Object(l.a)();if(!d.a.isBooting())u.a.stopTimer("start");mw.hook("convenientDiscussions.preprocessed").fire(cd.a)}))).apply(this,arguments)}function y(){const e=e=>r.includes(e)?e:(c[e]||[]).find(e=>r.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 w(){return new Promise((e,t)=>{let i=mw.config.get("wgServerName");if(0);const n=a[i]||a[mw.config.get("wgServerName")];if(n){const i=e=>{t(["Convenient Discussions can't run: couldn't load the configuration.",e])},[,s]=n.match(/modules=ext.gadget.([^?&]+)/)||[];if(s&&mw.user.options.get("gadget-"+s)){mw.loader.using("ext.gadget."+s).then(()=>{e()});return}mw.loader.getScript(n).then(()=>{e()},i)}else e()})}function x(){const e=[cd.a.g.userLanguage,cd.a.g.contentLanguage].filter(h.K).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 k(){return(k=s()((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={};u.a.init();u.a.startTimer("total time");u.a.startTimer("load config and strings");mw.hook("convenientDiscussions.launched").fire(cd.a);const e=y()?x():!cd.a.i18n&&(cd.a.getStringsPromise||x());try{yield Promise.all([!cd.a.config&&w(),e])}catch(e){console.error(e);return}u.a.stopTimer("load config and strings");$(b)}))).apply(this,arguments)}!function(){k.apply(this,arguments)}()}]);
//# sourceMappingURL=https://tools-static.wmflabs.org/convenient-discussions/source-maps/convenientDiscussions.js.map.json
/*! </nowiki> */