User:Jack who built the house/convenientDiscussions-test.js

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-test.js.LICENSE.js
 */
/*! <nowiki> */!function(e){var t={};function n(i){if(t[i])return t[i].exports;var o=t[i]={i:i,l:!1,exports:{}};e[i].call(o.exports,o,o.exports,n);o.l=!0;return o.exports}n.m=e;n.c=t;n.d=function(e,t,i){if(!n.o(e,t))Object.defineProperty(e,t,{enumerable:!0,get:i})};n.r=function(e){if("undefined"!=typeof Symbol&&Symbol.toStringTag)Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});Object.defineProperty(e,"__esModule",{value:!0})};n.t=function(e,t){if(1&t)e=n(e);if(8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var i=Object.create(null);n.r(i);Object.defineProperty(i,"default",{enumerable:!0,value:e});if(2&t&&"string"!=typeof e)for(var o in e)n.d(i,o,function(t){return e[t]}.bind(null,o));return i};n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};n.d(t,"a",t);return t};n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)};n.p="";n(n.s=72)}([function(e,t,n){"use strict";const i="undefined"==typeof window?self:window;i.convenientDiscussions=i.convenientDiscussions||{};if("object"!=typeof i.convenientDiscussions)i.convenientDiscussions={};t.a=i.convenientDiscussions},function(e,t,n){"use strict";n.d(t,"Y",(function(){return d}));n.d(t,"d",(function(){return h}));n.d(t,"C",(function(){return m}));n.d(t,"Z",(function(){return f}));n.d(t,"X",(function(){return g}));n.d(t,"U",(function(){return p}));n.d(t,"A",(function(){return b}));n.d(t,"m",(function(){return v}));n.d(t,"D",(function(){return y}));n.d(t,"z",(function(){return w}));n.d(t,"E",(function(){return E}));n.d(t,"h",(function(){return C}));n.d(t,"L",(function(){return T}));n.d(t,"k",(function(){return x}));n.d(t,"w",(function(){return k}));n.d(t,"V",(function(){return S}));n.d(t,"T",(function(){return O}));n.d(t,"J",(function(){return N}));n.d(t,"j",(function(){return _}));n.d(t,"o",(function(){return A}));n.d(t,"i",(function(){return P}));n.d(t,"B",(function(){return I}));n.d(t,"H",(function(){return L}));n.d(t,"x",(function(){return M}));n.d(t,"W",(function(){return j}));n.d(t,"P",(function(){return D}));n.d(t,"N",(function(){return R}));n.d(t,"M",(function(){return H}));n.d(t,"Q",(function(){return B}));n.d(t,"O",(function(){return F}));n.d(t,"s",(function(){return U}));n.d(t,"g",(function(){return W}));n.d(t,"q",(function(){return q}));n.d(t,"c",(function(){return G}));n.d(t,"r",(function(){return z}));n.d(t,"R",(function(){return V}));n.d(t,"I",(function(){return K}));n.d(t,"y",(function(){return X}));n.d(t,"F",(function(){return Z}));n.d(t,"e",(function(){return J}));n.d(t,"G",(function(){return Q}));n.d(t,"l",(function(){return ee}));n.d(t,"S",(function(){return te}));n.d(t,"b",(function(){return ne}));n.d(t,"K",(function(){return ie}));n.d(t,"v",(function(){return oe}));n.d(t,"u",(function(){return ae}));n.d(t,"n",(function(){return se}));n.d(t,"p",(function(){return re}));n.d(t,"a",(function(){return ce}));n.d(t,"t",(function(){return le}));n.d(t,"f",(function(){return ue}));var i=n(2),o=n.n(i),a=n(12),s=n(3),r=n(0),c=n(16);const l={offset:null};let u=[];function d(e,t={}){const n=(e instanceof $?e:$($.parseHTML(e))).wrapAll(`<${t.tagName||"span"}>`).parent(),i=[];if(t.callbacks)Object.keys(t.callbacks).forEach(e=>{const o=n.find("."+e);if(!o.find("a").length)o.wrapInner("<a>");const s=new a.a({element:o.find("a").get(0),action:t.callbacks[e]});i.push(s)});if(t.targetBlank)n.find("a[href]").attr("target","_blank");return i.length?{$wrapper:n,buttons:i}:n}function h(e){if(void 0===e.addPostfix)e.addPostfix=!0;let t,n=(e.section?`/* ${e.section} */ `:"")+e.text.trim();if(e.optionalText){let i=n+e.optionalText;if(r.a.config.transformSummary)i=r.a.config.transformSummary(i);if(i.length<=r.a.g.SUMMARY_LENGTH_LIMIT){n=i;t=!0}}if(!t){if(r.a.config.transformSummary)n=r.a.config.transformSummary(n);if(n.length>r.a.g.SUMMARY_LENGTH_LIMIT)n=n.slice(0,r.a.g.SUMMARY_LENGTH_LIMIT-1)+"\u2026"}if(e.addPostfix)n+=r.a.g.SUMMARY_POSTFIX;return n}function m(){return document.body.classList.contains("oo-ui-windowManager-modal-active")||r.a.state.isFirstRun||r.a.state.isPageBeingReloaded}function f(e){return'<table class="diff"><col class="diff-marker"><col class="diff-content"><col class="diff-marker"><col class="diff-content">'+e+"</table>"}function g(e,t,n){return n.indexOf(e)===t}function p(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 b(e,t){if(t&&e.nodeType===Node.TEXT_NODE)return!0;if(e.nodeType!==Node.ELEMENT_NODE)return null;if(r.a.g.POPULAR_INLINE_ELEMENTS.includes(e.tagName))return!0;else if(r.a.g.POPULAR_NOT_INLINE_ELEMENTS.includes(e.tagName))return!1;else if("undefined"!=typeof window){console.warn("Expensive operation: isInline() called for:",e);return window.getComputedStyle(e).display.startsWith("inline")}else return null}function v(e){const t=e[0];if(!t)return"";const n=t.toUpperCase(),i=t.toLowerCase();return(n!==i?"["+n+i+"]":mw.util.escapeRegExp(t))+mw.util.escapeRegExp(e.slice(1)).replace(/[ _]+/g,"[ _]+")}function y(e,t){var n,i;return(t%2==1||(null===(n=r.a.g.PAGE_WHITELIST_REGEXP)||void 0===n?void 0:n.test(e))||!r.a.g.PAGE_WHITELIST_REGEXP&&r.a.config.customTalkNamespaces.includes(t))&&!(null!==(i=r.a.g.PAGE_BLACKLIST_REGEXP)&&void 0!==i&&i.test(e))}function w(e){return e&&(e.includes(`${r.a.s("es-edit")} ${r.a.s("es-reply-genitive")}`)||e.includes(`${r.a.s("es-edit")} ${r.a.s("es-addition-genitive")}`))}function E(e){return e&&r.a.config.undoTexts.some(t=>e.includes(t))}function C(e){return void 0!==e}function T(e,t,n=!1){return n?e.slice(t+1).concat(e.slice(0,t+1)).reverse():e.slice(t).concat(e.slice(0,t))}function x(e){return[].concat(...e)}function k(e,t){if(Array.isArray(e))[e,t]=e;throw"http"===e?new s.a({type:"network"}):new s.a({type:"api",code:"error",apiData:t})}function S(e){return e.replace(/_/g," ")}function O(e){return e.replace(/ /g,"_")}function N(e){return e.replace(/ {2,}/g," ")}function _(e){return e.length?function(e){if(""===r.a.g.PHP_CHAR_TO_UPPER_JSON[e])return e;else return r.a.g.PHP_CHAR_TO_UPPER_JSON[e]||e.toUpperCase()}(e[0])+e.slice(1):""}function A(e){return e.map(e=>r.a.g.contentLanguageMessages[e])}function P(e,t){for(let n=e.length-1;n>=0;n--)if(t(e[n]))return n;return null}function I(){return $(":focus:input").length||$(":focus").prop("isContentEditable")}function L(e){if(!e)return null;const t=e.map(e=>e.source||e).join("|");return t?new RegExp(`(${t})`):null}function M(e,t,n,i){return e.replace(t,(e,t,o)=>{if("number"==typeof t){t=null;o=null}return(t||"")+("table"===i?"\x03":"\x01")+n.push(o||e)+(i?"_"+i:"")+("table"===i?"\x04":"\x02")})}function j(e,t,n){const i=n?new RegExp(`(?:\\x01|\\x03)(\\d+)(?:_${n})?(?:\\x02|\\x04)`,"g"):/(?:\x01|\x03)(\d+)(?:_\w+)?(?:\x02|\x04)/g;for(;i.test(e);)e=e.replace(i,(e,n)=>t[n-1]);return e}function D(e=null,t=window.scrollY){if(e&&r.a.g.$toc.length&&r.a.g.$toc.offset().top+r.a.g.$toc.outerHeight()>t)B(e.saveTocHeight);else{l.element=null;l.elementTop=null;l.touchesBottom=!1;l.offsetBottom=document.documentElement.scrollHeight-(t+window.innerHeight);if(l.offsetBottom<100)l.touchesBottom=!0;else if(0!==t&&r.a.g.rootElement.getBoundingClientRect().top<=0){const e=new c.b(r.a.g.rootElement.firstElementChild);for(;;){if(!b(e.currentNode)){const t=e.currentNode.getBoundingClientRect();if(t.bottom>=0&&0!==t.height){l.element=e.currentNode;l.elementTop=t.top;if(e.firstChild())continue;else break}}if(!e.nextSibling())break}}}}function R(e=!1){if(e&&null!==l.offset)F();else if(l.touchesBottom&&0!==window.scrollY){const e=document.documentElement.scrollHeight-window.innerHeight-l.offsetBottom;window.scrollTo(0,e)}else if(l.element){const e=l.element.getBoundingClientRect();if(oe(e))window.scrollTo(0,window.scrollY+e.top-l.elementTop)}}function H(e,t){if(l.element&&e===l.element)l.element=t}function B(e=!0){l.offset=window.scrollY;l.tocHeight=(e||l.tocHeight)&&r.a.g.$toc.length&&!r.a.g.isTocFloating&&0!==window.scrollY&&window.scrollY+window.innerHeight>r.a.g.$toc.offset().top+r.a.g.$toc.outerHeight()?r.a.g.$toc.outerHeight():null}function F(e=!0){if(null!==l.offset){if(l.tocHeight)l.offset+=(r.a.g.$toc.outerHeight()||0)-l.tocHeight;window.scrollTo(0,l.offset);l.offset=null;if(e)l.tocHeight=null}}function U(e){return Y.apply(this,arguments)}function Y(){return(Y=o()((function*(e){const t={};return Promise.race([e,t]).then(e=>e===t?"pending":"resolved",()=>"rejected")}))).apply(this,arguments)}function W(e){if("loading"===mw.loader.getState(e)){const e=d(r.a.sParse("error-needreloadpage"),{callbacks:{"cd-notification-reloadPage":()=>{location.reload()}}}).$wrapper;mw.notify(e,{type:"error"});return!0}return!1}function q(e){if(void 0===e.convenientDiscussionsMarginTop){const t=window.getComputedStyle(e);e.convenientDiscussionsMarginTop=parseFloat(t.marginTop);e.convenientDiscussionsMarginBottom=parseFloat(t.marginBottom);e.convenientDiscussionsMarginLeft=parseFloat(t.marginLeft);e.convenientDiscussionsMarginRight=parseFloat(t.marginRight)}const t=e.getBoundingClientRect(),n=oe(t);return{top:t.top,bottom:t.bottom,left:t.left,right:t.right,width:t.width,height:t.height,outerTop:t.top-(n?e.convenientDiscussionsMarginTop:0),outerBottom:t.bottom+(n?e.convenientDiscussionsMarginBottom:0),outerLeft:t.left-(n?e.convenientDiscussionsMarginLeft:0),outerRight:t.right+(n?e.convenientDiscussionsMarginRight:0)}}function G(e,t,n=!1){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),o=e=>e instanceof RegExp||e instanceof Date?e.toString():e;if(!i(e)||!i(t))return o(e)===o(t);const a=Object.keys(e).filter(t=>void 0!==e[t]),s=Object.keys(t).filter(e=>void 0!==t[e]);return(a.length===s.length||n)&&a.every(n=>G(e[n],t[n]))}function z(e){const t=mw.storage.getObject("convenientDiscussions-"+e);if(!1===t)console.error("Storage is unavailable.");return t||{}}function V(e,t){mw.storage.setObject("convenientDiscussions-"+e,t)}function K(e,t){return e.replace(/[\u200e\u200f]/g,t?" ":"")}function X(e,t){ee(e);if(!document.execCommand("insertText",!1,t))e.insertContent(t)}function Z(e,t=[],n=[]){const i=Object.assign({},e);Object.keys(i).forEach(e=>{if(n.includes(e)){delete i[e];return}const o=i[e];if("object"==typeof o&&null!==o&&!(o instanceof RegExp||o instanceof Date))try{if(!G(o,JSON.parse(JSON.stringify(o))))delete i[e]}catch(t){delete i[e]}else if("function"==typeof o)if(t.includes(e))i[e]=o.toString();else delete i[e]});return i}function J(e,t){const n=new RegExp(`[${r.a.g.LETTER_PATTERN}]{2,}`,"g"),i=(e.match(n)||[]).filter(g),o=(t.match(n)||[]).filter(g);if(!i.length||!o.length)return 0;let a=o.length,s=0;i.forEach(e=>{if(o.some(t=>t===e))s++;else a++});return s/a}function Q(e,t,n=[]){return e.keyCode===t&&["ctrl","shift","alt","meta"].every(t=>n.includes(t)===e[t+"Key"])}function ee(e){e.$input.get(0).focus()}function te(e){return $(e[r.a.g.SKIN]||e.default||e.vector)}function ne(e,t){if(void 0!==t&&!e.includes(t))e.push(t)}function ie(e,t){if(void 0!==t&&e.includes(t))e.splice(e.indexOf(t),1)}function oe(...e){return!e.some(e=>0===e.left&&0===e.height)}function ae(e,t){let n={};if(t)n.oldid=mw.config.get("wgRevisionId");const i=decodeURI(r.a.page.getUrl(n));return`${r.a.g.SERVER}${i}#${e}`}function se(e){const t=e.map(e=>e.getGender());let n;if(t.every(e=>"female"===e))n="female";else if(t.every(e=>"female"!==e))n="male";else n="unknown";return n}function re(e,t){let n;for(let i=e;i;i=i.parentNode)if(i.contains(t)){n=i;break}const i=[e];if(!e.contains(t)){const o=new c.b(e);for(;o.currentNode.parentNode!==n;){for(;o.nextSibling();)i.push(o.currentNode);o.parentNode()}o.nextSibling();for(;!o.currentNode.contains(t);){i.push(o.currentNode);o.nextSibling()}for(;o.currentNode!==t;){o.firstChild();for(;!o.currentNode.contains(t);){i.push(o.currentNode);o.nextSibling()}}i.push(t)}return i}function ce(e,t,n={}){const i=mw.notification.notify(e,t);u.push(Object.assign(n,{notification:i}));return i}function le(){return u}function ue(e=!0){u.forEach(t=>{if(!e)t.notification.$notification.hide();t.notification.close()});u=[]}},function(e,t){function n(e,t,n,i,o,a,s){try{var r=e[a](s),c=r.value}catch(e){n(e);return}if(r.done)t(c);else Promise.resolve(c).then(i,o)}e.exports=function(e){return function(){var t=this,i=arguments;return new Promise((function(o,a){var s=e.apply(t,i);function r(e){n(s,o,a,r,c,"next",e)}function c(e){n(s,o,a,r,c,"throw",e)}r(void 0)}))}};e.exports.default=e.exports,e.exports.__esModule=!0},function(e,t,n){"use strict";class CdError extends Error{constructor(e){let t;if(e){var n,i;t=e.type;if(e.code)t+="/"+e.code;if(null!=e&&null!==(n=e.apiData)&&void 0!==n&&null!==(i=n.error)&&void 0!==i&&i.code)t+="/"+e.apiData.error.code}else t="";super(t);this.name="CdError";this.data=e}}t.a=CdError},function(e,t,n){"use strict";n.d(t,"p",(function(){return _}));n.d(t,"g",(function(){return A}));n.d(t,"n",(function(){return I}));n.d(t,"j",(function(){return L}));n.d(t,"o",(function(){return M}));n.d(t,"c",(function(){return j}));n.d(t,"f",(function(){return B}));n.d(t,"q",(function(){return z}));n.d(t,"d",(function(){return V}));n.d(t,"i",(function(){return K}));n.d(t,"h",(function(){return X}));n.d(t,"k",(function(){return J}));n.d(t,"e",(function(){return ee}));n.d(t,"m",(function(){return te}));n.d(t,"l",(function(){return ne}));n.d(t,"s",(function(){return ie}));n.d(t,"b",(function(){return ae}));n.d(t,"a",(function(){return le}));n.d(t,"r",(function(){return de}));var i=n(2),o=n.n(i),a=n(7),s=n(13),r=n(27),c=n(14),l=n(15),u=n(43),d=n.n(u);function h(){return d()('/*! \n * For documentation and feedback, see the script\'s homepage:\n *   https://commons.wikimedia.org/wiki/User:Jack_who_built_the_house/Convenient_Discussions\n * For license information, see\n *   https://commons.wikimedia.org/wiki/User:Jack_who_built_the_house/convenientDiscussions-worker-test.js.LICENSE.js\n */\n!function(e){var t={};function i(r){if(t[r])return t[r].exports;var n=t[r]={i:r,l:!1,exports:{}};e[r].call(n.exports,n,n.exports,i);n.l=!0;return n.exports}i.m=e;i.c=t;i.d=function(e,t,r){if(!i.o(e,t))Object.defineProperty(e,t,{enumerable:!0,get:r})};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 r=Object.create(null);i.r(r);Object.defineProperty(r,"default",{enumerable:!0,value:e});if(2&t&&"string"!=typeof e)for(var n in e)i.d(r,n,function(t){return e[t]}.bind(null,n));return r};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=30)}([function(e,t,i){"use strict";const r="undefined"==typeof window?self:window;r.convenientDiscussions=r.convenientDiscussions||{};if("object"!=typeof r.convenientDiscussions)r.convenientDiscussions={};t.a=r.convenientDiscussions},function(e,t,i){"use strict";i.d(t,"k",(function(){return n}));i.d(t,"g",(function(){return s}));i.d(t,"a",(function(){return a}));i.d(t,"c",(function(){return o}));i.d(t,"j",(function(){return l}));i.d(t,"i",(function(){return c}));i.d(t,"b",(function(){return u}));i.d(t,"d",(function(){return d}));i.d(t,"f",(function(){return h}));i.d(t,"h",(function(){return f}));i.d(t,"e",(function(){return p}));i(22);i(4);var cd=i(0),r=i(2);function n(e,t,i){return i.indexOf(e)===t}function s(e,t){if(t&&e.nodeType===Node.TEXT_NODE)return!0;if(e.nodeType!==Node.ELEMENT_NODE)return null;if(cd.a.g.POPULAR_INLINE_ELEMENTS.includes(e.tagName))return!0;else if(cd.a.g.POPULAR_NOT_INLINE_ELEMENTS.includes(e.tagName))return!1;else if("undefined"!=typeof window){console.warn("Expensive operation: isInline() called for:",e);return window.getComputedStyle(e).display.startsWith("inline")}else return null}function a(e){return void 0!==e}function o(e){return[].concat(...e)}function l(e){return e.replace(/_/g," ")}function c(e){return e.replace(/ /g,"_")}function u(e){return e.length?function(e){if(""===cd.a.g.PHP_CHAR_TO_UPPER_JSON[e])return e;else return cd.a.g.PHP_CHAR_TO_UPPER_JSON[e]||e.toUpperCase()}(e[0])+e.slice(1):""}function d(e){return e.map(e=>cd.a.g.contentLanguageMessages[e])}function h(e,t,i,r){return e.replace(t,(e,t,n)=>{if("number"==typeof t){t=null;n=null}return(t||"")+("table"===r?"\\x03":"\\x01")+i.push(n||e)+(r?"_"+r:"")+("table"===r?"\\x04":"\\x02")})}function f(e,t){return e.replace(/[\\u200e\\u200f]/g,t?" ":"")}function p(e,t){let i;for(let r=e;r;r=r.parentNode)if(r.contains(t)){i=r;break}const n=[e];if(!e.contains(t)){const s=new r.b(e);for(;s.currentNode.parentNode!==i;){for(;s.nextSibling();)n.push(s.currentNode);s.parentNode()}s.nextSibling();for(;!s.currentNode.contains(t);){n.push(s.currentNode);s.nextSibling()}for(;s.currentNode!==t;){s.firstChild();for(;!s.currentNode.contains(t);){n.push(s.currentNode);s.nextSibling()}}n.push(t)}return n}},function(e,t,i){"use strict";i.d(t,"c",(function(){return TreeWalker}));i.d(t,"b",(function(){return ElementsTreeWalker}));i.d(t,"a",(function(){return ElementsAndTextTreeWalker}));var r=i(0);class TreeWalker{constructor(e,t,i=!1,r=e){this.acceptNode=t;this.root=e;this.currentNode=r;if(i){this.firstChildProp="firstElementChild";this.lastChildProp="lastElementChild";this.previousSiblingProp="previousElementSibling";this.nextSiblingProp="nextElementSibling"}else{this.firstChildProp="firstChild";this.lastChildProp="lastChild";this.previousSiblingProp="previousSibling";this.nextSiblingProp="nextSibling"}}tryMove(e){let t=this.currentNode;if(t===this.root&&!e.includes("Child"))return null;do{t=t[e]}while(t&&this.acceptNode&&!this.acceptNode(t));if(t)this.currentNode=t;return t||null}parentNode(){return this.tryMove("parentNode")}firstChild(){return this.tryMove(this.firstChildProp)}lastChild(){return this.tryMove(this.lastChildProp)}previousSibling(){return this.tryMove(this.previousSiblingProp)}nextSibling(){return this.tryMove(this.nextSiblingProp)}nextNode(){let e=this.currentNode;do{if(e[this.firstChildProp])e=e[this.firstChildProp];else{for(;e&&!e[this.nextSiblingProp]&&e.parentNode!==this.root;)e=e.parentNode;if(e)e=e[this.nextSiblingProp]}}while(e&&this.acceptNode&&!this.acceptNode(e));if(e)this.currentNode=e;return e}previousNode(){let e=this.currentNode;if(e!==this.root){do{if(e[this.previousSiblingProp]){e=e[this.previousSiblingProp];for(;e[this.lastChildProp];)e=e[this.lastChildProp]}else e=e.parentNode}while(e&&this.acceptNode&&!this.acceptNode(e));if(e)this.currentNode=e;return e}}}class ElementsTreeWalker extends TreeWalker{constructor(e,t=r.a.g.rootElement){super(t,null,!0);if(e)this.currentNode=e}}class ElementsAndTextTreeWalker extends TreeWalker{constructor(e,t=r.a.g.rootElement){super(t,e=>e.nodeType===Node.TEXT_NODE||e.nodeType===Node.ELEMENT_NODE);if(e)this.currentNode=e}}},function(e,t,i){"use strict";var r=this&&this.__createBinding||(Object.create?function(e,t,i,r){if(void 0===r)r=i;Object.defineProperty(e,r,{enumerable:!0,get:function(){return t[i]}})}:function(e,t,i,r){if(void 0===r)r=i;e[r]=t[i]}),n=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))r(t,e,i);n(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))r(t,e,i)},o=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});t.RssHandler=t.DefaultHandler=t.DomUtils=t.ElementType=t.Tokenizer=t.createDomStream=t.parseDOM=t.parseDocument=t.DomHandler=t.Parser=void 0;var l=i(12);Object.defineProperty(t,"Parser",{enumerable:!0,get:function(){return l.Parser}});var c=i(6);Object.defineProperty(t,"DomHandler",{enumerable:!0,get:function(){return c.DomHandler}});Object.defineProperty(t,"DefaultHandler",{enumerable:!0,get:function(){return c.DomHandler}});function u(e,t){var i=new c.DomHandler(void 0,t);new l.Parser(i,t).end(e);return i.root}t.parseDocument=u;t.parseDOM=function(e,t){return u(e,t).children};t.createDomStream=function(e,t,i){var r=new c.DomHandler(e,t,i);return new l.Parser(r,t)};var d=i(13);Object.defineProperty(t,"Tokenizer",{enumerable:!0,get:function(){return o(d).default}});var h=s(i(8));t.ElementType=h;a(i(17),t);t.DomUtils=s(i(18));var f=i(17);Object.defineProperty(t,"RssHandler",{enumerable:!0,get:function(){return f.FeedHandler}})},function(e,t,i){"use strict";class CdError extends Error{constructor(e){let t;if(e){var i,r;t=e.type;if(e.code)t+="/"+e.code;if(null!=e&&null!==(i=e.apiData)&&void 0!==i&&null!==(r=i.error)&&void 0!==r&&r.code)t+="/"+e.apiData.error.code}else t="";super(t);this.name="CdError";this.data=e}}t.a=CdError},function(e,t,i){"use strict";i.d(t,"b",(function(){return x}));i.d(t,"c",(function(){return N}));i.d(t,"a",(function(){return C}));i.d(t,"d",(function(){return w}));i.d(t,"e",(function(){return D}));i(7),i(25),i(26);var r={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"}};function n(e){return function(t){var i=t||{},r=i.width?String(i.width):e.defaultWidth;return e.formats[r]||e.formats[e.defaultWidth]}}var s={date:n({formats:{full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},defaultWidth:"full"}),time:n({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:n({formats:{full:"{{date}} \'at\' {{time}}",long:"{{date}} \'at\' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},defaultWidth:"full"})},a={lastWeek:"\'last\' eeee \'at\' p",yesterday:"\'yesterday at\' p",today:"\'today at\' p",tomorrow:"\'tomorrow at\' p",nextWeek:"eeee \'at\' p",other:"P"};function o(e){return function(t,i){var r,n=i||{};if("formatting"===(n.context?String(n.context):"standalone")&&e.formattingValues){var s=e.defaultFormattingWidth||e.defaultWidth,a=n.width?String(n.width):s;r=e.formattingValues[a]||e.formattingValues[s]}else{var o=e.defaultWidth,l=n.width?String(n.width):e.defaultWidth;r=e.values[l]||e.values[o]}return r[e.argumentCallback?e.argumentCallback(t):t]}}function l(e){return function(t,i){var r=String(t),n=i||{},s=n.width,a=s&&e.matchPatterns[s]||e.matchPatterns[e.defaultMatchWidth],o=r.match(a);if(!o)return null;var l,c=o[0],u=s&&e.parsePatterns[s]||e.parsePatterns[e.defaultParseWidth];if("[object Array]"===Object.prototype.toString.call(u))l=function(e,t){for(var i=0;i<e.length;i++)if(t(e[i]))return i}(u,(function(e){return e.test(c)}));else l=function(e,t){for(var i in e)if(e.hasOwnProperty(i)&&t(e[i]))return i}(u,(function(e){return e.test(c)}));l=e.valueCallback?e.valueCallback(l):l;return{value:l=n.valueCallback?n.valueCallback(l):l,rest:r.slice(c.length)}}}var c;o({values:{narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},defaultWidth:"wide"}),o({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 Number(e)-1}}),o({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"}),o({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"}),o({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"}),c={matchPattern:/^(\\d+)(th|st|nd|rd)?/i,parsePattern:/\\d+/i,valueCallback:function(e){return parseInt(e,10)}},l({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"}),l({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}}),l({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"}),l({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"}),l({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 u(e,t){var i=function(e){if(!h[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;h[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 h[e]}(t);return i.formatToParts?function(e,t){for(var i=e.formatToParts(t),r=[],n=0;n<i.length;n++){var s=d[i[n].type];if(s>=0)r[s]=parseInt(i[n].value,10)}return r}(i,e):function(e,t){var i=e.format(t).replace(/\\u200E/g,""),r=/(\\d+)\\/(\\d+)\\/(\\d+),? (\\d+):(\\d+):(\\d+)/.exec(i);return[r[3],r[1],r[2],r[4],r[5],r[6]]}(i,e)}var d={year:0,month:1,day:2,hour:3,minute:4,second:5};var h={};var f={timezone:/([Z+-].*)$/,timezoneZ:/^(Z)$/,timezoneHH:/^([+-])(\\d{2})$/,timezoneHHMM:/^([+-])(\\d{2}):?(\\d{2})$/,timezoneIANA:/(UTC|(?:[a-zA-Z]+\\/[a-zA-Z_-]+(?:\\/[a-zA-Z_]+)?))$/};function p(e,t,i){var r,n,s;if(r=f.timezoneZ.exec(e))return 0;if(r=f.timezoneHH.exec(e)){if(!g(s=parseInt(r[2],10)))return NaN;n=36e5*s;return"+"===r[1]?-n:n}if(r=f.timezoneHHMM.exec(e)){s=parseInt(r[2],10);var a=parseInt(r[3],10);if(!g(s,a))return NaN;n=36e5*s+6e4*a;return"+"===r[1]?-n:n}if(r=f.timezoneIANA.exec(e)){t=new Date(t||Date.now());var o=m(i?t:function(e){return new Date(Date.UTC(e.getFullYear(),e.getMonth(),e.getDate(),e.getHours(),e.getMinutes(),e.getSeconds(),e.getMilliseconds()))}(t),e);return-(i?o:function(e,t,i){var r=e.getTime()-t,n=m(new Date(r),i);if(t===n)return t;r-=n-t;var s=m(new Date(r),i);if(n===s)return n;return Math.max(n,s)}(t,o,e))}return 0}function m(e,t){var i=u(e,t),r=Date.UTC(i[0],i[1]-1,i[2],i[3]%24,i[4],i[5]),n=e.getTime(),s=n%1e3;return r-(n-=s>=0?s:1e3+s)}function g(e,t){if(null!=t&&(t<0||t>59))return!1;else return!0}function b(e,t){return-p(e,t)}var cd=i(0),_=i(1);let v,y;const E={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"]};let T=[];function x(e){return/^\\d{12}_.+$/.test(e)}function N(e,t){e=Object(_.h)(e,!0);let i;if(void 0===t){v=v||new RegExp(`^([^]*)(${cd.a.g.CONTENT_TIMESTAMP_REGEXP.source})(?!["\\xbb])`);i=v}else{y=y||new RegExp(`^([^]*)(${cd.a.g.UI_TIMESTAMP_REGEXP.source})`);i=y}const r=e.match(i);if(!r)return null;return{date:function(e,t){let i=void 0===t;if(i)t=cd.a.g.CONTENT_TIMEZONE;const r=i?cd.a.g.CONTENT_DIGITS:cd.a.g.UI_DIGITS,n=i?cd.a.g.CONTENT_TIMESTAMP_MATCHING_GROUPS:cd.a.g.UI_TIMESTAMP_MATCHING_GROUPS,s=e=>{if(!r)return e;const t=new RegExp("["+r+"]","g");return e.replace(t,e=>r.indexOf(e))};let a=0,o=0,l=0,c=0,u=0;for(let t=0;t<n.length;t++){const r=n[t],d=e[t+3];switch(r){case"xg":case"F":case"M":o=(i?Object(_.d)(E[r]):E[r].map(mw.msg)).indexOf(d);break;case"d":case"j":l=Number(s(d));break;case"D":case"l":break;case"n":o=Number(s(d))-1;break;case"Y":a=Number(s(d));break;case"xkY":a=Number(s(d))-543;break;case"G":case"H":c=Number(s(d));break;case"i":u=Number(s(d));break;default:throw"Not implemented"}}const d=Date.UTC(a,o,l,c,u);let h;if("number"==typeof t)h=t*cd.a.g.MILLISECONDS_IN_MINUTE;else h="UTC"===t?0:b(t,d);return new Date(d-h)}(r,t),match:r}}function S(e,t){return("0000"+e).slice(-t)}function C(e,t,i=!1){let r=e.getUTCFullYear(),n=e.getUTCMonth(),s=e.getUTCDate(),a=e.getUTCHours(),o=e.getUTCMinutes(),l=S(r,4)+S(n+1,2)+S(s,2)+S(a,2)+S(o,2)+"_"+Object(_.i)(t);if(i&&T.includes(l)){let e=2;const t=l;do{l=`${t}_${e}`;e++}while(T.includes(l))}return l}function w(e){if(e)T.push(e)}function D(){T=[]}},function(e,t,i){"use strict";var r=this&&this.__createBinding||(Object.create?function(e,t,i,r){if(void 0===r)r=i;Object.defineProperty(e,r,{enumerable:!0,get:function(){return t[i]}})}:function(e,t,i,r){if(void 0===r)r=i;e[r]=t[i]}),n=this&&this.__exportStar||function(e,t){for(var i in e)if("default"!==i&&!Object.prototype.hasOwnProperty.call(t,i))r(t,e,i)};Object.defineProperty(t,"__esModule",{value:!0});t.DomHandler=void 0;var s=i(8),a=i(16);n(i(16),t);var o=/\\s+/g,l={normalizeWhitespace:!1,withStartIndices:!1,withEndIndices:!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(){var e;this.dom=[];this.root=new a.Document(this.dom);this.done=!1;this.tagStack=[this.root];this.lastNode=null;this.parser=null!==(e=this.parser)&&void 0!==e?e: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,r=new a.Element(e,t,void 0,i);this.addNode(r);this.tagStack.push(r)};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;else{if(t)e=e.replace(o," ");var r=new a.Text(e);this.addNode(r);this.lastNode=r}};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",r="second",n="minute",s="hour",a="day",o="week",l="month",c="quarter",u="year",d="date",h="Invalid Date",f=/^(\\d{4})[-/]?(\\d{1,2})?[-/]?(\\d{0,2})[^0-9]*(\\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 r=String(e);return!r||r.length>=t?e:""+Array(t+1-r.length).join(i)+e},b={s:g,z:function(e){var t=-e.utcOffset(),i=Math.abs(t),r=Math.floor(i/60),n=i%60;return(t<=0?"+":"-")+g(r,2,"0")+":"+g(n,2,"0")},m:function e(t,i){if(t.date()<i.date())return-e(i,t);var r=12*(i.year()-t.year())+(i.month()-t.month()),n=t.clone().add(r,l),s=i-n<0,a=t.clone().add(r+(s?-1:1),l);return+(-(r+(i-n)/(s?n-a:a-n))||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:d,h:s,m:n,s:r,ms:i,Q:c}[e]||String(e||"").toLowerCase().replace(/s$/,"")},u:function(e){return void 0===e}},_="en",v={};v[_]=m;var y=function(e){return e instanceof N},E=function(e,t,i){var r;if(!e)return _;if("string"==typeof e)v[e]&&(r=e),t&&(v[e]=t,r=e);else{var n=e.name;v[n]=e,r=n}return!i&&r&&(_=r),r||!i&&_},T=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)},x=b;x.l=E,x.i=y,x.w=function(e,t){return T(e,{locale:t.$L,utc:t.$u,x:t.$x,$offset:t.$offset})};var 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(x.u(t))return new Date;if(t instanceof Date)return new Date(t);if("string"==typeof t&&!/Z$/i.test(t)){var r=t.match(f);if(r){var n=r[2]-1||0,s=(r[7]||"0").substring(0,3);return i?new Date(Date.UTC(r[1],n,r[3]||1,r[4]||0,r[5]||0,r[6]||0,s)):new Date(r[1],n,r[3]||1,r[4]||0,r[5]||0,r[6]||0,s)}}return new Date(t)}(e),this.$x=e.x||{},this.init()},g.init=function(){var e=this.$d;this.$y=e.getFullYear(),this.$M=e.getMonth(),this.$D=e.getDate(),this.$W=e.getDay(),this.$H=e.getHours(),this.$m=e.getMinutes(),this.$s=e.getSeconds(),this.$ms=e.getMilliseconds()},g.$utils=function(){return x},g.isValid=function(){return!(this.$d.toString()===h)},g.isSame=function(e,t){var i=T(e);return this.startOf(t)<=i&&i<=this.endOf(t)},g.isAfter=function(e,t){return T(e)<this.startOf(t)},g.isBefore=function(e,t){return this.endOf(t)<T(e)},g.$g=function(e,t,i){return x.u(e)?this[t]:this.set(i,e)},g.unix=function(){return Math.floor(this.valueOf()/1e3)},g.valueOf=function(){return this.$d.getTime()},g.startOf=function(e,t){var i=this,c=!!x.u(t)||t,h=x.p(e),f=function(e,t){var r=x.w(i.$u?Date.UTC(i.$y,t,e):new Date(i.$y,t,e),i);return c?r:r.endOf(a)},p=function(e,t){return x.w(i.toDate()[e].apply(i.toDate("s"),(c?[0,0,0,0]:[23,59,59,999]).slice(t)),i)},m=this.$W,g=this.$M,b=this.$D,_="set"+(this.$u?"UTC":"");switch(h){case u:return c?f(1,0):f(31,11);case l:return c?f(1,g):f(0,g+1);case o:var v=this.$locale().weekStart||0,y=(m<v?m+7:m)-v;return f(c?b-y:b+(6-y),g);case a:case d:return p(_+"Hours",0);case s:return p(_+"Minutes",1);case n:return p(_+"Seconds",2);case r:return p(_+"Milliseconds",3);default:return this.clone()}},g.endOf=function(e){return this.startOf(e,!1)},g.$set=function(e,t){var o,c=x.p(e),h="set"+(this.$u?"UTC":""),f=(o={},o[a]=h+"Date",o[d]=h+"Date",o[l]=h+"Month",o[u]=h+"FullYear",o[s]=h+"Hours",o[n]=h+"Minutes",o[r]=h+"Seconds",o[i]=h+"Milliseconds",o)[c],p=c===a?this.$D+(t-this.$W):t;if(c===l||c===u){var m=this.clone().set(d,1);m.$d[f](p),m.init(),this.$d=m.set(d,Math.min(this.$D,m.daysInMonth())).$d}else f&&this.$d[f](p);return this.init(),this},g.set=function(e,t){return this.clone().$set(e,t)},g.get=function(e){return this[x.p(e)]()},g.add=function(i,c){var d,h=this;i=Number(i);var f=x.p(c),p=function(e){var t=T(h);return x.w(t.date(t.date()+Math.round(e*i)),h)};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=(d={},d[n]=e,d[s]=t,d[r]=1e3,d)[f]||1,g=this.$d.getTime()+i*m;return x.w(g,this)},g.subtract=function(e,t){return this.add(-1*e,t)},g.format=function(e){var t=this;if(!this.isValid())return h;var i=e||"YYYY-MM-DDTHH:mm:ssZ",r=x.z(this),n=this.$locale(),s=this.$H,a=this.$m,o=this.$M,l=n.weekdays,c=n.months,u=function(e,r,n,s){return e&&(e[r]||e(t,i))||n[r].substr(0,s)},d=function(e){return x.s(s%12||12,e,"0")},f=n.meridiem||function(e,t,i){var r=e<12?"AM":"PM";return i?r.toLowerCase():r},m={YY:String(this.$y).slice(-2),YYYY:this.$y,M:o+1,MM:x.s(o+1,2,"0"),MMM:u(n.monthsShort,o,c,3),MMMM:u(c,o),D:this.$D,DD:x.s(this.$D,2,"0"),d:String(this.$W),dd:u(n.weekdaysMin,this.$W,l,2),ddd:u(n.weekdaysShort,this.$W,l,3),dddd:l[this.$W],H:String(s),HH:x.s(s,2,"0"),h:d(1),hh:d(2),a:f(s,a,!0),A:f(s,a,!1),m:String(a),mm:x.s(a,2,"0"),s:String(this.$s),ss:x.s(this.$s,2,"0"),SSS:x.s(this.$ms,3,"0"),Z:r};return i.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,d,h){var f,p=x.p(d),m=T(i),g=(m.utcOffset()-this.utcOffset())*e,b=this-m,_=x.m(this,m);return _=(f={},f[u]=_/12,f[l]=_,f[c]=_/3,f[o]=(b-g)/6048e5,f[a]=(b-g)/864e5,f[s]=b/t,f[n]=b/e,f[r]=b/1e3,f)[p]||b,h?_:x.a(_)},g.daysInMonth=function(){return this.endOf(l).$D},g.$locale=function(){return v[this.$L]},g.locale=function(e,t){if(!e)return this.$L;var i=this.clone(),r=E(e,t,!0);return r&&(i.$L=r),i},g.clone=function(){return x.w(this.$d,this)},g.toDate=function(){return new Date(this.valueOf())},g.toJSON=function(){return this.isValid()?this.toISOString():null},g.toISOString=function(){return this.$d.toISOString()},g.toString=function(){return this.$d.toUTCString()},m}(),S=N.prototype;return T.prototype=S,[["$ms",i],["$s",r],["$m",n],["$H",s],["$W",a],["$M",l],["$y",u],["$D",d]].forEach((function(e){S[e[1]]=function(t){return this.$g(t,e[0],e[1])}})),T.extend=function(e,t){return e.$i||(e(t,N,T),e.$i=!0),T},T.locale=E,T.isDayjs=y,T.unix=function(e){return T(1e3*e)},T.en=v[_],T.Ls=v,T.p={},T}()},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});t.Doctype=t.CDATA=t.Tag=t.Style=t.Script=t.Comment=t.Directive=t.Text=t.Root=t.isTag=t.ElementType=void 0;var r;!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"}(r=t.ElementType||(t.ElementType={}));t.isTag=function(e){return e.type===r.Tag||e.type===r.Script||e.type===r.Style};t.Root=r.Root;t.Text=r.Text;t.Directive=r.Directive;t.Comment=r.Comment;t.Script=r.Script;t.Style=r.Style;t.Tag=r.Tag;t.CDATA=r.CDATA;t.Doctype=r.Doctype},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 r=i(4),n=i(0),s=i(2),a=i(1);t.a=class{constructor(e,t){this.parser=e;let i=this.parser.collectParts(t.element);i=this.parser.removeNestedParts(i);i=this.parser.encloseInlineParts(i,t.element);i=this.parser.filterParts(i,t.element);i.reverse();i=this.parser.replaceListsWithItems(i,t.element);i=this.parser.wrapNumberedList(i,t.element);this.id=n.a.comments.length;this.date=t.date||null;this.timestamp=t.timestampText;this.authorName=t.authorName;this.signatureElement=t.element;this.timestampElement=t.timestampElement;this.authorLink=t.authorLink;this.authorTalkLink=t.authorTalkLink;this.isOwn=this.authorName===n.a.g.USER_NAME;this.anchor=t.anchor;this.isUnsigned=t.isUnsigned;this.parts=i;this.elements=this.parts.map(e=>e.node);this.highlightables=this.elements.filter(e=>!/^(H[1-6]|STYLE|LINK)$/.test(e.tagName)&&!n.a.g.UNHIGHLIGHTABLE_ELEMENT_CLASSES.some(t=>e.classList.contains(t))&&!/float: *(?:left|right)|display: *none/.test(e.getAttribute("style")));if(!this.highlightables.length)throw new r.a;this.wrapHighlightables();this.setLevels();this.followsHeading=!1;if(this.parts[0].isHeading&&0!==this.level){this.parts.shift();this.elements.shift()}if(this.parts[0].isHeading){this.isOpeningSection=!0;const e=this.parts[0].node.tagName.match(/^H([1-6])$/);this.openingSectionOfLevel=e&&Number(e[1])}else this.isOpeningSection=!1;this.addAttributes();this.section=null;this.isOutdented=!1}wrapHighlightables(){[this.highlightables[0],this.highlightables[this.highlightables.length-1]].filter(a.k).filter(e=>n.a.g.BAD_HIGHLIGHTABLE_ELEMENTS.includes(e.tagName)||this.highlightables.length>1&&"LI"===e.tagName&&"OL"===e.parentNode.tagName||e.className||e.getAttribute("style")).forEach(e=>{const t=this.parser.context.document.createElement("div");t.className="cd-comment-replacedPart";e.parentNode.insertBefore(t,e);this.elements.splice(this.elements.indexOf(e),1,t);this.highlightables.splice(this.highlightables.indexOf(e),1,t);t.appendChild(e)})}addAttributes(){this.elements.forEach(e=>{e.classList.add("cd-comment-part");e.setAttribute("data-comment-id",String(this.id))});this.highlightables[0].classList.add("cd-comment-part-first");this.highlightables[this.highlightables.length-1].classList.add("cd-comment-part-last")}setLevels(){const e=this.highlightables.map(this.parser.getListsUpTree.bind(this.parser));this.level=Math.min(e[0].length,e[e.length-1].length);this.logicalLevel=this.level;if(this.level&&this.elements.length>2){const e=this.elements.map(this.parser.getListsUpTree.bind(this.parser)),t=[];e.forEach((e,i)=>{if(!e.length)t.push(i)});t.forEach(t=>{const i=e.slice(0,t).reverse().find(e=>e.length).slice(-1)[0];if(i){const e="DL"===i.tagName?"dd":"li",r=this.parser.context.document.createElement(e);r.appendChild(this.elements[t]);i.appendChild(r)}})}for(let t=0;t<this.level;t++)e.forEach(e=>{var i;null===(i=e[t])||void 0===i||i.classList.add("cd-commentLevel","cd-commentLevel-"+(t+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.id-1;e>=0;e--){const i=n.a.comments[e];if(i.section===this.section&&i[t]<this[t]){this.cachedParent[t]=i;break}}}return this.cachedParent[t]}getChildren(e=!1,t=!1){if(this.id===n.a.comments.length-1)return[];const i=[],r=t?"level":"logicalLevel";n.a.comments.slice(this.id+1).some(t=>{if(t.section===this.section&&t[r]>this[r]){if(t[r]===this[r]+1||t.getParent()===this||e)i.push(t);return!1}else return!0});return i}static processOutdents(){if(n.a.g.pageHasOutdents)Array.from(n.a.g.rootElement.getElementsByClassName(n.a.config.outdentClass)).reverse().forEach(e=>{const t=new s.b(e);for(;t.nextNode();){let i=Number(t.currentNode.getAttribute("data-comment-id"));if(0!==i){const t=n.a.comments[i];Array.from(e.childNodes).forEach(e=>{var i,r;const n=null===(i=e.style)||void 0===i?void 0:i.width;if(n){const[,i,r]=n.match(/^(\\d+)(.+)$/);if(i){const n=1.25*i+r;e.style.width=`calc(${n} + ${t.level}px)`}}else if((null===(r=e.children)||void 0===r||!r.length)&&e.textContent.includes("\\u2500"))e.textContent=e.textContent.replace(/(\\u2500+)/,(e,t)=>"\\u2500".repeat(Math.round(1.25*t.length)))});let r;for(let e=i-1;e>=0;e--){const i=n.a.comments[e];if(i.section!==t.section)break;if(t.date>=i.date){r=i;break}}if(!r)break;if(r.id!==i-1){t.cachedParent=t.cachedParent||{};t.cachedParent.logicalLevel=r}const s=t.level;t.isOutdented=!0;n.a.comments.slice(i).some(e=>{if(e.section!==r.section||e.logicalLevel<s||e.id===t.id+1&&t.level<2&&e.level===t.level||e.date<t.date)return!0;e.logicalLevel=r.level+1+(e.logicalLevel-s);return!1});break}}})}}},function(e,t,i){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});t.Parser=void 0;var n=r(i(13)),s=new Set(["input","option","optgroup","select","button","datalist","textarea"]),a=new Set(["p"]),o={tr:new Set(["tr","th","td"]),th:new Set(["th"]),td:new Set(["thead","th","td"]),body:new Set(["head","link","script"]),li:new Set(["li"]),p:a,h1:a,h2:a,h3:a,h4:a,h5:a,h6:a,select:s,input:s,output:s,button:s,datalist:s,textarea:s,option:new Set(["option"]),optgroup:new Set(["optgroup","option"]),dd:new Set(["dt","dd"]),dt:new Set(["dt","dd"]),address:a,article:a,aside:a,blockquote:a,details:a,div:a,dl:a,fieldset:a,figcaption:a,figure:a,footer:a,form:a,header:a,hr:a,main:a,nav:a,ol:a,pre:a,section:a,table:a,ul:a,rt:new Set(["rt","rp"]),rp:new Set(["rt","rp"]),tbody:new Set(["thead","tbody"]),tfoot:new Set(["thead","tbody"])},l=new Set(["area","base","basefont","br","col","command","embed","frame","hr","img","input","isindex","keygen","link","meta","param","source","track","wbr"]),c=new Set(["math","svg"]),u=new Set(["mi","mo","mn","ms","mtext","annotation-xml","foreignObject","desc","title"]),d=/\\s|\\//,h=function(){function e(e,t){if(void 0===t)t={};var i,r,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!==(r=t.lowerCaseAttributeNames)&&void 0!==r?r:!t.xmlMode;this.tokenizer=new(null!==(s=t.Tokenizer)&&void 0!==s?s:n.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 r=void 0;this.stack.length>0&&o[e].has(r=this.stack[this.stack.length-1]);)this.onclosetag(r);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(d),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,r,n;this.updatePosition(4);null===(i=(t=this.cbs).oncomment)||void 0===i||i.call(t,e);null===(n=(r=this.cbs).oncommentend)||void 0===n||n.call(r)};e.prototype.oncdata=function(e){var t,i,r,n,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===(n=(r=this.cbs).ontext)||void 0===n||n.call(r,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,r;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===(r=(i=this.cbs).onparserinit)||void 0===r||r.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=h},function(e,t,i){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var n=r(i(14)),s=r(i(9)),a=r(i(15)),o=r(i(10));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 r=e.toLowerCase();if(e===r)return function(e,n){if(n===r)e._state=t;else{e._state=i;e._index--}};else return function(n,s){if(s===r||s===e)n._state=t;else{n._state=i;n._index--}}}function d(e,t){var i=e.toLowerCase();return function(r,n){if(n===i||n===e)r._state=t;else{r._state=3;r._index--}}}var h=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=d("R",35),_=d("I",36),v=d("P",37),y=d("T",38),E=u("R",40,1),T=u("I",41,1),x=u("P",42,1),N=u("T",43,1),S=d("Y",45),C=d("L",46),w=d("E",47),D=u("Y",49,1),O=u("L",50,1),L=u("E",51,1),M=d("I",54),A=d("T",55),P=d("L",56),k=d("E",57),I=u("I",58,1),q=u("T",59,1),U=u("L",60,1),j=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 r=this.sectionStart+e;if(r!==this._index){var s=this.buffer.substring(r,this._index),a=parseInt(s,t);this.emitPartial(n.default(a));this.sectionStart=i?this._index+1:this._index}this._state=this.baseState};e.prototype.stateInNumericEntity=function(e){if(";"===e)this.decodeNumericEntity(2,10,!0);else if(e<"0"||e>"9"){if(!this.xmlMode)this.decodeNumericEntity(2,10,!1);else this._state=this.baseState;this._index--}};e.prototype.stateInHexEntity=function(e){if(";"===e)this.decodeNumericEntity(3,16,!0);else if((e<"a"||e>"f")&&(e<"A"||e>"F")&&(e<"0"||e>"9")){if(!this.xmlMode)this.decodeNumericEntity(3,16,!1);else this._state=this.baseState;this._index--}};e.prototype.cleanup=function(){if(this.sectionStart<0){this.buffer="";this.bufferOffset+=this._index;this._index=0}else if(this.running){if(1===this._state){if(this.sectionStart!==this._index)this.cbs.ontext(this.buffer.substr(this.sectionStart));this.buffer="";this.bufferOffset+=this._index;this._index=0}else if(this.sectionStart===this._index){this.buffer="";this.bufferOffset+=this._index;this._index=0}else{this.buffer=this.buffer.substr(this.sectionStart);this._index-=this.sectionStart;this.bufferOffset+=this.sectionStart}this.sectionStart=0}};e.prototype.parse=function(){for(;this._index<this.buffer.length&&this.running;){var e=this.buffer.charAt(this._index);if(1===this._state)this.stateText(e);else if(12===this._state)this.stateInAttributeValueDoubleQuotes(e);else if(9===this._state)this.stateInAttributeName(e);else if(19===this._state)this.stateInComment(e);else if(20===this._state)this.stateInSpecialComment(e);else if(8===this._state)this.stateBeforeAttributeName(e);else if(3===this._state)this.stateInTagName(e);else if(6===this._state)this.stateInClosingTagName(e);else if(2===this._state)this.stateBeforeTagName(e);else if(10===this._state)this.stateAfterAttributeName(e);else if(13===this._state)this.stateInAttributeValueSingleQuotes(e);else if(11===this._state)this.stateBeforeAttributeValue(e);else if(5===this._state)this.stateBeforeClosingTagName(e);else if(7===this._state)this.stateAfterClosingTagName(e);else if(32===this._state)this.stateBeforeSpecialS(e);else if(21===this._state)this.stateAfterComment1(e);else if(14===this._state)this.stateInAttributeValueNoQuotes(e);else if(4===this._state)this.stateInSelfClosingTag(e);else if(16===this._state)this.stateInDeclaration(e);else if(15===this._state)this.stateBeforeDeclaration(e);else if(22===this._state)this.stateAfterComment2(e);else if(18===this._state)this.stateBeforeComment(e);else if(33===this._state)this.stateBeforeSpecialSEnd(e);else if(53===this._state)I(this,e);else if(39===this._state)E(this,e);else if(40===this._state)T(this,e);else if(41===this._state)x(this,e);else if(34===this._state)b(this,e);else if(35===this._state)_(this,e);else if(36===this._state)v(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)S(this,e);else if(29===this._state)this.stateInCdata(e);else if(45===this._state)C(this,e);else if(46===this._state)w(this,e);else if(47===this._state)this.stateBeforeSpecialLast(e,3);else if(48===this._state)D(this,e);else if(49===this._state)O(this,e);else if(50===this._state)L(this,e);else if(51===this._state)this.stateAfterSpecialLast(e,5);else if(52===this._state)M(this,e);else if(54===this._state)A(this,e);else if(55===this._state)P(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)U(this,e);else if(60===this._state)j(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)h(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 r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var n=r(i(32)),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 n.default)e=n.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 r,n=this&&this.__extends||(r=function(e,t){return(r=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");r(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,r=arguments.length;i<r;i++){t=arguments[i];for(var n in t)if(Object.prototype.hasOwnProperty.call(t,n))e[n]=t[n]}return e}).apply(this,arguments)};Object.defineProperty(t,"__esModule",{value:!0});t.cloneNode=t.hasChildren=t.isDocument=t.isDirective=t.isComment=t.isText=t.isCDATA=t.isTag=t.Element=t.Document=t.NodeWithChildren=t.ProcessingInstruction=t.Comment=t.Text=t.DataNode=t.Node=void 0;var a=i(8),o=new Map([[a.ElementType.Tag,1],[a.ElementType.Script,1],[a.ElementType.Style,1],[a.ElementType.Directive,1],[a.ElementType.Text,3],[a.ElementType.CDATA,4],[a.ElementType.Comment,8],[a.ElementType.Root,9]]),l=function(){function e(e){this.type=e;this.parent=null;this.prev=null;this.next=null;this.startIndex=null;this.endIndex=null}Object.defineProperty(e.prototype,"nodeType",{get:function(){var e;return null!==(e=o.get(this.type))&&void 0!==e?e:1},enumerable:!1,configurable:!0});Object.defineProperty(e.prototype,"parentNode",{get:function(){return this.parent},set:function(e){this.parent=e},enumerable:!1,configurable:!0});Object.defineProperty(e.prototype,"previousSibling",{get:function(){return this.prev},set:function(e){this.prev=e},enumerable:!1,configurable:!0});Object.defineProperty(e.prototype,"nextSibling",{get:function(){return this.next},set:function(e){this.next=e},enumerable:!1,configurable:!0});e.prototype.cloneNode=function(e){if(void 0===e)e=!1;return T(this,e)};return e}();t.Node=l;var c=function(e){n(t,e);function t(t,i){var r=e.call(this,t)||this;r.data=i;return r}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){n(t,e);function t(t){return e.call(this,a.ElementType.Text,t)||this}return t}(c);t.Text=u;var d=function(e){n(t,e);function t(t){return e.call(this,a.ElementType.Comment,t)||this}return t}(c);t.Comment=d;var h=function(e){n(t,e);function t(t,i){var r=e.call(this,a.ElementType.Directive,i)||this;r.name=t;return r}return t}(c);t.ProcessingInstruction=h;var f=function(e){n(t,e);function t(t,i){var r=e.call(this,t)||this;r.children=i;return r}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){n(t,e);function t(t){return e.call(this,a.ElementType.Root,t)||this}return t}(f);t.Document=p;var m=function(e){n(t,e);function t(t,i,r,n){if(void 0===r)r=[];if(void 0===n)n="script"===t?a.ElementType.Script:"style"===t?a.ElementType.Style:a.ElementType.Tag;var s=e.call(this,n,r)||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,r;return{name:t,value:e.attribs[t],namespace:null===(i=e["x-attribsNamespace"])||void 0===i?void 0:i[t],prefix:null===(r=e["x-attribsPrefix"])||void 0===r?void 0:r[t]}}))},enumerable:!1,configurable:!0});return t}(f);t.Element=m;function g(e){return a.isTag(e)}t.isTag=g;function b(e){return e.type===a.ElementType.CDATA}t.isCDATA=b;function _(e){return e.type===a.ElementType.Text}t.isText=_;function v(e){return e.type===a.ElementType.Comment}t.isComment=v;function y(e){return e.type===a.ElementType.Directive}t.isDirective=y;function E(e){return e.type===a.ElementType.Root}t.isDocument=E;t.hasChildren=function(e){return Object.prototype.hasOwnProperty.call(e,"children")};function T(e,t){if(void 0===t)t=!1;var i;if(_(e))i=new u(e.data);else if(v(e))i=new d(e.data);else if(g(e)){var r=t?x(e.children):[],n=new m(e.name,s({},e.attribs),r);r.forEach((function(e){return e.parent=n}));if(e["x-attribsNamespace"])n["x-attribsNamespace"]=s({},e["x-attribsNamespace"]);if(e["x-attribsPrefix"])n["x-attribsPrefix"]=s({},e["x-attribsPrefix"]);i=n}else if(b(e)){r=t?x(e.children):[];var o=new f(a.ElementType.CDATA,r);r.forEach((function(e){return e.parent=o}));i=o}else if(E(e)){r=t?x(e.children):[];var l=new p(r);r.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 h(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: "+e.type);i.startIndex=e.startIndex;i.endIndex=e.endIndex;return i}t.cloneNode=T;function x(e){for(var t=e.map((function(e){return T(e,!0)})),i=1;i<t.length;i++){t[i].prev=t[i-1];t[i-1].next=t[i]}return t}},function(e,t,i){"use strict";var r,n=this&&this.__extends||(r=function(e,t){return(r=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");r(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,r){if(void 0===r)r=i;Object.defineProperty(e,r,{enumerable:!0,get:function(){return t[i]}})}:function(e,t,i,r){if(void 0===r)r=i;e[r]=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,d=l(i(6)),h=o(i(18)),f=i(12);!function(e){e[e.image=0]="image";e[e.audio=1]="audio";e[e.video=2]="video";e[e.document=3]="document";e[e.executable=4]="executable"}(c||(c={}));!function(e){e[e.sample=0]="sample";e[e.full=1]="full";e[e.nonstop=2]="nonstop"}(u||(u={}));var p=function(e){n(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 r={};if("feed"===i.name){var n=i.children;r.type="atom";y(r,"id","id",n);y(r,"title","title",n);var s=v("href",b("link",n));if(s)r.link=s;y(r,"description","subtitle",n);if(a=_("updated",n))r.updated=new Date(a);y(r,"author","email",n,!0);r.items=g("entry",n).map((function(e){var t={},i=e.children;y(t,"id","id",i);y(t,"title","title",i);var r=v("href",b("link",i));if(r)t.link=r;var n=_("summary",i)||_("content",i);if(n)t.description=n;var s=_("updated",i);if(s)t.pubDate=new Date(s);t.media=m(i);return t}))}else{var a;n=null!==(t=null===(e=b("channel",i.children))||void 0===e?void 0:e.children)&&void 0!==t?t:[];r.type=i.name.substr(0,3);r.id="";y(r,"title","title",n);y(r,"link","link",n);y(r,"description","description",n);if(a=_("lastBuildDate",n))r.updated=new Date(a);y(r,"author","managingEditor",n,!0);r.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 r=_("pubDate",i);if(r)t.pubDate=new Date(r);t.media=m(i);return t}))}this.feed=r;this.handleCallback(null)}else this.handleCallback(new Error("couldn\'t find root of feed"))};return t}(d.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 h.getElementsByTagName(e,t,!0)}function b(e,t){return h.getElementsByTagName(e,t,!0,1)[0]}function _(e,t,i){if(void 0===i)i=!1;return h.getText(h.getElementsByTagName(e,t,i,1)).trim()}function v(e,t){if(!t)return null;else return t.attribs[e]}function y(e,t,i,r,n){if(void 0===n)n=!1;var s=_(i,r,n);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 r=this&&this.__createBinding||(Object.create?function(e,t,i,r){if(void 0===r)r=i;Object.defineProperty(e,r,{enumerable:!0,get:function(){return t[i]}})}:function(e,t,i,r){if(void 0===r)r=i;e[r]=t[i]}),n=this&&this.__exportStar||function(e,t){for(var i in e)if("default"!==i&&!Object.prototype.hasOwnProperty.call(t,i))r(t,e,i)};Object.defineProperty(t,"__esModule",{value:!0});t.hasChildren=t.isDocument=t.isComment=t.isText=t.isCDATA=t.isTag=void 0;n(i(33),t);n(i(37),t);n(i(38),t);n(i(21),t);n(i(39),t);n(i(40),t);var s=i(6);Object.defineProperty(t,"isTag",{enumerable:!0,get:function(){return s.isTag}});Object.defineProperty(t,"isCDATA",{enumerable:!0,get:function(){return s.isCDATA}});Object.defineProperty(t,"isText",{enumerable:!0,get:function(){return s.isText}});Object.defineProperty(t,"isComment",{enumerable:!0,get:function(){return s.isComment}});Object.defineProperty(t,"isDocument",{enumerable:!0,get:function(){return s.isDocument}});Object.defineProperty(t,"hasChildren",{enumerable:!0,get:function(){return s.hasChildren}})},function(e,t,i){"use strict";var r=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 n=r(i(9)),s=r(i(15)),a=r(i(10)),o=r(i(14)),l=/&(?:[a-zA-Z0-9]+|#[xX][\\da-fA-F]+|#\\d+);/g;t.decodeXML=c(a.default);t.decodeHTMLStrict=c(n.default);function c(e){var t=d(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(n.default).sort(u),i=0,r=0;i<t.length;i++)if(e[r]===t[i]){t[i]+=";?";r++}else t[i]+=";";var a=new RegExp("&(?:"+t.join("|")+"|#[xX][\\\\da-fA-F]+;?|#\\\\d+;?)","g"),o=d(n.default);function l(e){if(";"!==e.substr(-1))e+=";";return o(e)}return function(e){return String(e).replace(a,l)}}();function d(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 r=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 n=u(r(i(10)).default),s=d(n);t.encodeXML=g(n);var a,o,l=u(r(i(9)).default),c=d(l);t.encodeHTML=(a=l,o=c,function(e){return e.replace(o,(function(e){return a[e]})).replace(h,p)});t.encodeNonAsciiHTML=g(l);function u(e){return Object.keys(e).sort().reduce((function(t,i){t[e[i]]="&"+i+";";return t}),{})}function d(e){for(var t=[],i=[],r=0,n=Object.keys(e);r<n.length;r++){var s=n[r];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 h=/(?:[\\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+"|"+h.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 r=i(6);t.filter=function(e,t,i,r){if(void 0===i)i=!0;if(void 0===r)r=1/0;if(!Array.isArray(t))t=[t];return n(e,t,i,r)};function n(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&&r.hasChildren(c)&&c.children.length>0){var u=n(e,c.children,i,s);a.push.apply(a,u);if((s-=u.length)<=0)break}}return a}t.find=n;t.findOneChild=function(e,t){return t.find(e)};t.findOne=function e(t,i,n){if(void 0===n)n=!0;for(var s=null,a=0;a<i.length&&!s;a++){var o=i[a];if(r.isTag(o))if(t(o))s=o;else if(n&&o.children.length>0)s=e(t,o.children)}return s};t.existsOne=function e(t,i){return i.some((function(i){return r.isTag(i)&&(t(i)||i.children.length>0&&e(t,i.children))}))};t.findAll=function(e,t){for(var i,n,s=[],a=t.filter(r.isTag);n=a.shift();){var o=null===(i=n.children)||void 0===i?void 0:i.filter(r.isTag);if(o&&o.length>0)a.unshift.apply(a,o);if(e(n))s.push(n)}return s}},function(e,t){function i(e,t,i,r,n,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(r,n)}e.exports=function(e){return function(){var t=this,r=arguments;return new Promise((function(n,s){var a=e.apply(t,r);function o(e){i(a,n,s,o,l,"next",e)}function l(e){i(a,n,s,o,l,"throw",e)}o(void 0)}))}};e.exports.default=e.exports,e.exports.__esModule=!0},function(e,t,i){"use strict";var r=i(4),n=i(0),s=i(2),a=i(1);t.a=class{constructor(e,t,i){this.parser=e;this.headingElement=t;this.headlineElement=this.parser.context.getElementByClassName(t,"mw-headline");if(!this.headlineElement)throw new r.a;this.anchor=this.headlineElement.getAttribute("id");this.parseHeadline();const s=t.tagName.match(/^H([1-6])$/);this.level=s&&Number(s[1]);this.sectionNumber=null;let a=this.parser.context.getElementByClassName(t,"mw-editsection");if(!a)a=this.createSectionMenu();const o=Array.from(a.getElementsByTagName("a")).find(e=>{var t;return null===(t=e.getAttribute("href"))||void 0===t?void 0:t.includes("action=edit")});if(o){const e=n.a.g.SERVER+o.getAttribute("href");this.editUrl=new URL(e);if(this.editUrl){const e=this.editUrl.searchParams.get("section");if(e.startsWith("T-")){this.sourcePageName=this.editUrl.searchParams.get("title");this.sectionNumber=Number(e.match(/\\d+/)[0])}else this.sectionNumber=Number(e);this.editUrl=this.editUrl.href}}this.setContentProperties(i);this.id=n.a.sections.length}createSectionMenu(){const e=this.parser.context.document.createElement("span");e.setAttribute("class","mw-editsection-bracket");e.textContent="[";const t=this.parser.context.document.createElement("span");t.setAttribute("class","mw-editsection-bracket");t.textContent="]";const i=this.parser.context.document.createElement("span");i.setAttribute("class","mw-editsection");i.appendChild(e);i.appendChild(t);this.headingElement.appendChild(i);return i}setContentProperties(e){const t=new s.c(n.a.g.rootElement,e=>!["STYLE","LINK"].includes(e.tagName)&&!e.classList.contains("cd-section-button-container"),!0,this.headingElement);this.headingNestingLevel=0;for(;t.parentNode();)this.headingNestingLevel++;let i;if(e){i=Object(a.e)(this.headingElement,e);i.pop()}else{let e=n.a.g.rootElement.lastElementChild;for(;e.contains(this.headingElement)&&e!==this.headingElement;)e=e.lastElementChild;i=Object(a.e)(this.headingElement,e)}let r,o,l=!1;i.slice(1).some((e,t)=>{if(void 0===this.lastElementInFirstChunk&&/^H[2-6]$/.test(e.tagName)){l=!0;this.lastElementInFirstChunk=i[t];return!0}else return!1});this.lastElementInFirstChunk=this.lastElementInFirstChunk||i[i.length-1];if(i[1]){t.currentNode=i[i.length-1];for(;t.lastChild(););const e=t.currentNode;t.currentNode=i[1];do{if(t.currentNode.classList.contains("cd-comment-part"))r=t.currentNode}while(!r&&t.currentNode!==e&&t.nextNode());t.currentNode=e;do{if(t.currentNode.classList.contains("cd-comment-part"))o=t.currentNode}while(!o&&t.currentNode!==i[1]&&t.previousNode())}if(r){const e=Number(r.getAttribute("data-comment-id")),t=Number(o.getAttribute("data-comment-id"));this.comments=n.a.comments.slice(e,t+1);if(l){const e=this.comments.findIndex(e=>!(this.parser.context.follows(this.lastElementInFirstChunk,e.elements[0])||this.lastElementInFirstChunk.contains(e.elements[0])));this.commentsInFirstChunk=this.comments.slice(0,e||0)}this.comments.forEach(e=>{if(!this.oldestComment||e.date&&(!this.oldestComment.date||this.oldestComment.date>e.date))this.oldestComment=e});this.comments[0].followsHeading=!0}this.comments=this.comments||[];this.commentsInFirstChunk=this.commentsInFirstChunk||this.comments;this.commentsInFirstChunk.forEach(e=>{e.section=this});this.elements=i}parseHeadline(){const e=["mw-headline-number",...n.a.config.foreignElementInHeadlineClasses],t=Array.from(this.headlineElement.childNodes).filter(t=>t.nodeType!==Node.ELEMENT_NODE||!e.some(e=>t.classList.contains(e)));this.headline=t.map(e=>e.textContent).join("").trim()}getParent(e=!0){if(e&&this.level<=2)return null;else return n.a.sections.slice(0,this.id).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";e.exports=function(e,t){var r=i(41),n="",s="",a="";n=e.toString();var o=r("HTML_ENTITIES",t);if(!1===o)return!1;delete o["&"];o["&"]="&amp;";for(a in o){s=o[a];n=n.split(s).join(a)}return n=n.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,r,n){var s,a=function(e,i,r){void 0===r&&(r={});var n=new Date(e);return function(e,i){void 0===i&&(i={});var r=i.timeZoneName||"short",n=e+"|"+r,s=t[n];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:r}),t[n]=s),s}(i,r).formatToParts(n)},o=function(t,i){for(var r=a(t,i),s=[],o=0;o<r.length;o+=1){var l=r[o],c=l.type,u=l.value,d=e[c];d>=0&&(s[d]=parseInt(u,10))}var h=s[3],f=24===h?0:h,p=s[0]+"-"+s[1]+"-"+s[2]+" "+f+":"+s[4]+":"+s[5]+":000",m=+t;return(n.utc(p).valueOf()-(m-=m%1e3))/6e4},l=r.prototype;l.tz=function(e,t){void 0===e&&(e=s);var i=this.utcOffset(),r=this.toDate(),a=r.toLocaleString("en-US",{timeZone:e}),o=Math.round((r-new Date(a))/1e3/60),l=n(a).$set("millisecond",this.$ms).utcOffset(15*-Math.round(r.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||n.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=n(this.format("YYYY-MM-DD HH:mm:ss:SSS"));return c.call(i,e,t).tz(this.$x.$timezone,!0)},n.tz=function(e,t,i){var r=i&&t,a=i||t||s,l=o(+n(),a);if("string"!=typeof e)return n(e).tz(a);var c=function(e,t,i){var r=e-60*t*1e3,n=o(r,i);if(t===n)return[r,t];var s=o(r-=60*(n-t)*1e3,i);return n===s?[r,n]:[e-60*Math.min(n,s)*1e3,Math.max(n,s)]}(n.utc(e,r).valueOf(),l,a),u=c[0],d=c[1],h=n(u).utcOffset(d);return h.$x.$timezone=a,h},n.tz.guess=function(){return Intl.DateTimeFormat().resolvedOptions().timeZone},n.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(r,n,s){var a=n.prototype;s.utc=function(e){var t={date:e,utc:!0,args:arguments};return new n(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(r,n){var s=this.$utils().u;if(s(r))return this.$u?0:s(this.$offset)?c.call(this):this.$offset;if("string"==typeof r&&null===(r=function(e){void 0===e&&(e="");var r=e.match(t);if(!r)return null;var n=(""+r[0]).match(i)||["-",0,0],s=n[0],a=60*+n[1]+ +n[2];return 0===a?0:"+"===s?a:-a}(r)))return this;var a=Math.abs(r)<=16?60*r:r,o=this;if(n)return o.$offset=a,o.$u=0===r,o;if(0!==r){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||(new Date).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 d=a.toDate;a.toDate=function(e){return"s"===e&&this.$offset?s(this.format("YYYY-MM-DD HH:mm:ss:SSS")).toDate():d.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 r=this.local(),n=s(e).local();return h.call(r,n,t,i)}}}()},function(e,t,i){"use strict";const r={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){if(void 0===this.timerTotal[e])this.timerTotal[e]=0;this.timerStartTimestamps[e]=Date.now()},stopTimer(e){if(void 0===this.timerStartTimestamps[e])return;const t=Date.now()-this.timerStartTimestamps[e];this.timerTotal[e]+=t;delete this.timerStartTimestamps[e];if(void 0===this.timerAllRunsTotal[e]){this.timerAllRunsTotal[e]=0;this.timerRunCount[e]=0}this.timerAllRunsTotal[e]+=t;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]}`);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={}}},averageTimerTime(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(1)} average for ${this.timerRunCount[e]} runs`)},incrementCounter(e){this.counters[e]++}};t.a=r},function(e,t,i){"use strict";var r=i(0),n=i(2),s=i(1),a=i(5);let o,l;class Parser{constructor(e){this.context=e;if(!o){o=["cd-comment-part",...r.a.config.closedDiscussionClasses];if(r.a.g.pageHasOutdents)o.push(r.a.config.outdentClass)}}createComment(e){return new this.context.CommentClass(this,e)}createSection(e,t,i){return new this.context.SectionClass(this,e,t,i)}removeDtMarkup(){const e="undefined"!=typeof mw&&r.a.g.isDtTopicSubscriptionEnabled;let t;if(e)if(r.a.state.isPageFirstParsed){t=this.context.document.createElement("span");t.className="cd-dtMarkupHaven cd-hidden";r.a.g.$content.append(t)}else t=r.a.g.$content.children(".cd-dtMarkupHaven").get(0);let i=Array.from(r.a.g.rootElement.getElementsByTagName("span")).filter(e=>e.hasAttribute("data-mw-comment-start")||e.hasAttribute("data-mw-comment-end")).concat(Array.from(r.a.g.rootElement.getElementsByClassName("ext-discussiontools-init-replylink-buttons")));if("undefined"!=typeof mw)i=i.concat(Array.from(r.a.g.rootElement.getElementsByClassName("ext-discussiontools-init-highlight")));i.forEach((i,r)=>{if(e){if(r%10==0)t.appendChild(this.context.document.createElement("span"));t.lastChild.appendChild(i)}else i.remove()})}findTimestamps(){const e=Array.from(r.a.g.rootElement.getElementsByTagName("blockquote")),t=r.a.config.elementsToExcludeClasses.map(e=>Array.from(r.a.g.rootElement.getElementsByClassName(e)));l=[...e,...Object(s.c)(t)];return this.context.getAllTextNodes().map(e=>{const{date:t,match:i}=Object(a.c)(e.textContent)||{};if(t&&!l.some(t=>t.contains(e)))return{node:e,date:t,match:i}}).filter(s.a).map(e=>{const{node:t,match:i,date:r}=e,n=this.context.document.createElement("span");n.classList.add("cd-timestamp");n.appendChild(this.context.document.createTextNode(i[2]));const s=t.textContent.slice(i.index+i[0].length);let a;if(s)a=this.context.document.createTextNode(s);t.textContent=i[1];t.parentNode.insertBefore(n,t.nextSibling);if(a)t.parentNode.insertBefore(a,n.nextSibling);return{element:n,date:r}})}timestampsToSignatures(e){return e.map(e=>{const t=e.date,i=e.element,o=e.element.textContent;let l,c;for(let t=e.element;!c;t=t.parentNode)if(Object(s.g)(t)){if(t.classList.contains(r.a.config.unsignedClass))l=t}else c=t;const u=Boolean(l),d=Array.from(c[this.context.childElementsProp]),h=new n.b(e.element,c);let f=!1;for(;h.nextNode()&&(!d.includes(h.currentNode)||Object(s.g)(h.currentNode));){if("A"===h.currentNode.tagName)f=!0;if(h.currentNode.classList.contains("cd-timestamp")&&f)return}const p=l||e.element,m=new n.a(p);let g,b,_,v,y,E,T,x,N=0,S=[];if(l)T=p;else{S.push(p);m.previousSibling()}do{var C;const e=m.currentNode;N+=e.textContent.length;if(e.tagName){if(e.classList.contains("cd-timestamp")||["S","STRIKE","DEL"].includes(e.tagName)&&N>=30)break;let t=!1;const i=({userName:e,linkType:i},r)=>{if(e){if(!g)g=e;if(g===e){if(["user","userForeign"].includes(i)){if(_)return!1;if("userForeign"!==i)_=r;b=r}else if(["userTalk","userTalkForeign"].includes(i)){if(y)return!1;if("userTalkForeign"!==i)y=r;v=r}else if(["contribs","contribsForeign"].includes(i)){if(E&&(b||v))return!1;if("contribsForeign"!==i)E=r}else if(["userSubpage","userSubpageForeign"].includes(i)){if(b||v)return!1}else if(["userTalkSubpage","userTalkSubpageForeign"].includes(i)){if(b||v)return!1}else if(b||v)return!1;t=!0}}return!0};if("A"===e.tagName){if(!i(Parser.processLink(e)||{},e))break}else{const t=Array.from(e.getElementsByTagName("a")).reverse();for(const e of t){if(e.classList.contains("external"))continue;i(Parser.processLink(e)||{},e)}}if(t)T=e}S.push(e);x=m.previousSibling();if(!x&&!T){x=m.parentNode();if(!x||!Object(s.g)(x))break;N=0;S=[]}if(g&&null!==(C=x)&&void 0!==C&&C.tagName&&["S","STRIKE","DEL"].includes(x.tagName))break}while(x&&N<r.a.config.signatureScanLimit);if(!g)return;if(!S.length)S=[p];const w=S.indexOf(T);S.splice(-1===w?1:w+1);const D=Object(a.a)(e.date,g,!0);Object(a.d)(D);const O=S[0].parentNode,L=S[0].nextSibling,M=this.context.document.createElement("span");M.classList.add("cd-signature");S.reverse().forEach(M.appendChild.bind(M));O.insertBefore(M,L);return{element:M,timestampElement:i,timestampText:o,date:t,authorLink:b,authorTalkLink:v,authorName:g,anchor:D,isUnsigned:u}}).filter(s.a)}findUnsigneds(){const e=[];if(r.a.config.unsignedClass)Array.from(r.a.g.rootElement.getElementsByClassName(r.a.config.unsignedClass)).filter(e=>{if(this.context.getElementByClassName(e,"cd-timestamp"))return!1;for(let t=e;t&&t!==r.a.g.rootElement;t=t.parentNode)if(t.classList.contains("cd-signature"))return!1;return!0}).forEach(t=>{Array.from(t.getElementsByTagName("a")).some(i=>{const{userName:r,linkType:n}=Parser.processLink(i)||{};if(r){let s,a;if("user"===n)s=i;else if("userTalk"===n)a=i;t.classList.add("cd-signature");const o=!0;e.push({element:t,authorName:r,isUnsigned:o,authorLink:s,authorTalkLink:a});return!0}})});return e}findSignatures(e){let t=this.timestampsToSignatures(e);const i=this.findUnsigneds();t.push(...i);t.sort((e,t)=>this.context.follows(e.element,t.element)?1:-1);return t}getStartNodes(e,t){const i=[];let r;for(;!r;){for(;!t.currentNode.nextSibling&&t.parentNode(););if(!t.nextSibling())break;if(!Object(s.g)(t.currentNode,!0))r=t.currentNode}if(r&&e.parentNode.contains(r)||e.parentNode.getElementsByClassName("cd-signature",2).length>1||!this.isElementEligible(e.parentNode,t,"start")){t.currentNode=e;for(;t.nextSibling()&&Object(s.g)(t.currentNode,!0);)i.push({node:t.currentNode,isTextNode:t.currentNode.nodeType===Node.TEXT_NODE,isHeading:!1,hasCurrentSignature:!1,hasForeignComponents:!1,lastStep:"start"});i.reverse();t.currentNode=e}else t.currentNode=e.parentNode;i.push({node:t.currentNode,isTextNode:!1,isHeading:!1,hasCurrentSignature:!0,hasForeignComponents:!1,lastStep:"start"});return[i,r]}isElementEligible(e,t,i){var n,s;return!(e===t.root||o.some(t=>e.classList.contains(t))||"toc"===e.getAttribute("id")||"DT"===e.tagName||function(e){if(!["TD","TH"].includes(e.tagName))return!1;let t;for(let i=e;!t&&i!==r.a.g.rootElement;i=i.parentNode)if("TABLE"===i.tagName)t=i;return!t||t.getElementsByClassName("cd-signature",2).length>1}(e)||"HR"===e.tagName&&e.previousElementSibling&&this.context.getElementByClassName(e.previousElementSibling,"cd-signature")||r.a.g.pageHasOutdents&&this.context.getElementByClassName(e,r.a.config.outdentClass)||r.a.g.NAMESPACE_NUMBER%2==1&&e.classList.contains("tmbox")||e.classList.contains("ombox")&&"up"!==i||null!==(n=(s=r.a.config).checkForCustomForeignComponents)&&void 0!==n&&n.call(s,e,this.context))}isIntroList(e,t=!1){var i;const r=e.tagName;if(!["DL","UL","OL"].includes(r))return!1;const n=null===(i=e.previousElementSibling)||void 0===i?void 0:i.tagName;let s="DL"===r&&e.firstChild&&"DT"===e.firstChild.tagName||["DL","UL"].includes(r)&&n&&/^H[1-6]$/.test(n)||"UL"===r&&e.classList.contains("gallery");if(t&&!s){const t=e.nextElementSibling;if(t)s=this.getClosestElementsWithText(t).levelsPassed>1}return s}traverseDom(e,t,i,n){for(let c=0;c<500;c++){var a;let c;const u=e[e.length-1];if(!u.hasCurrentSignature&&u.hasForeignComponents){let e,t=!1;for(;(e=i.currentNode)&&i.lastChild();){if(Object(s.g)(i.currentNode,!0)){i.currentNode=e;break}t=!0}if(t)c="dive";else break}else if(i.previousSibling())c="back";else{if(!i.parentNode())break;c="up"}const d=i.currentNode,h=d.nodeType===Node.TEXT_NODE;if("back"===c&&(["OL","UL"].includes(u.node.tagName)||"DL"===u.node.tagName&&u.node.parentNode!==r.a.g.rootElement&&u.node.parentNode.parentNode!==r.a.g.rootElement)&&!(["DL","OL","UL"].includes(d.tagName)&&!this.isIntroList(d)||h&&d.previousSibling&&["DL","OL","UL"].includes(d.previousSibling.tagName)&&!this.isIntroList(d.previousSibling))&&(null===(a=u.node[this.context.childElementsProp][0])||void 0===a?void 0:a.contains(t)))break;let f=null,p=null,m=null;if(!h){if(!this.isElementEligible(d,i,c))break;f=/^H[1-6]$/.test(d.tagName);p=d.contains(t);m=d.getElementsByClassName("cd-signature",Number(p)+1).length-Number(p)>0||n&&d.contains(n)&&"TABLE"!==d.tagName;if(!p){var o;if(!Object(s.g)(d,!0)&&null!==(o=r.a.config.signatureEndingRegexp)&&void 0!==o&&o.test(d.textContent)&&!l.some(e=>e.contains(d)))break}}e.push({node:d,isTextNode:h,isHeading:f,hasCurrentSignature:p,hasForeignComponents:m,lastStep:c});if(f)break}return e}collectParts(e){const t=new n.a(e);let[i,r]=this.getStartNodes(e,t);i=this.traverseDom(i,e,t,r);return i}removeNestedParts(e){for(let t=e.length-1;t>=0;t--){const i=e[t];if("up"===i.lastStep&&!i.hasForeignComponents){let i=0;for(let r=t-1;r>0;r--)if("dive"===e[r].lastStep){i=r;break}e.splice(i,t-i);t=i}}return e}encloseInlineParts(e,t){const i=[];let r=null,n=!1;for(let t=0;t<=e.length;t++){const a=e[t];if(a&&(null===r||["back","start"].includes(a.lastStep))&&!a.hasForeignComponents&&!a.isHeading){if(null===r)if(Object(s.g)(a.node.parentNode)){for(let i=t+1;i<e.length;i++)if("up"!==e[i].lastStep);else t=i-1;break}else r=t;if(!n&&(a.isTextNode&&a.node.textContent.trim()||Object(s.g)(a.node)))n=!0}else if(null!==r){if(n){const e=t-1;i.push({start:r,end:e})}r=null;n=!1}}for(let r=i.length-1;r>=0;r--){const n=i[r],s=this.context.document.createElement("div"),a=e[n.start].node.nextSibling,o=e[n.start].node.parentNode;for(let t=n.end;t>=n.start;t--)s.appendChild(e[t].node);o.insertBefore(s,a);const l={node:s,isTextNode:!1,isHeading:!1,hasCurrentSignature:s.contains(t),hasForeignComponents:!1,lastStep:"replaced"};e.splice(n.start,n.end-n.start+1,l)}return e}filterParts(e,t){var i;for(let t=(e=e.filter(e=>!e.hasForeignComponents&&!e.isTextNode)).length-1;t>0;t--){const i=e[t].node;if("STYLE"===i.tagName||"LINK"===i.tagName||i.classList.contains("reflist-talk"))e.splice(t,1);else break}const r=null===(i=e[e.length-1])||void 0===i?void 0:i.node;if("P"===r.tagName){var n;if("BR"===(null===(n=r.firstChild)||void 0===n?void 0:n.tagName))r.parentNode.insertBefore(r.firstChild,r)}if(e.length>1){const i=e[e.length-1].node;if(!["DL","OL","UL","DD","LI"].includes(i.tagName)||this.isIntroList(i,!0))for(let i=e.length-1;i>=1;i--){var s;const r=e[i],n=r.node,a=n.nextElementSibling;if(!a)continue;if("back"===r.lastStep&&["DL","OL","UL"].includes(a.tagName)&&(!["DL","OL","UL"].includes(n.tagName)||this.isIntroList(n,!0))&&(null===(s=a[this.context.childElementsProp][0])||void 0===s?void 0:s.contains(t)))e.splice(i)}}return e}getClosestElementsWithText(e){const t=e.textContent.replace(/\\s+/g,"");let i,r=[e],n=0;do{i=r;r=i.reduce((e,t)=>e.concat(Array.from(t[this.context.childElementsProp])),[]);if(["DL","UL","OL"].includes(i[0].tagName))n++}while(r.length&&r.every(e=>["DL","UL","OL","DD","LI"].includes(e.tagName)||!e.textContent.trim()&&Object(s.g)(e))&&r.map(e=>e.textContent).join("").replace(/\\s+/g,"")===t);return{nodes:i,levelsPassed:n}}replaceListsWithItems(e,t){const i=e[e.length-1];for(let r=e.length-1;r>=0;r--){const n=e[r];if(["DL","UL","OL","DD","LI"].includes(n.node.tagName)&&("UL"!==n.node.tagName||!n.node.classList.contains("gallery"))&&("up"===n.lastStep&&(!e[r-1]||"back"!==e[r-1].lastStep)||("DD"===i.node.tagName||"DD"===i.node.parentNode.tagName||"DL"===i.node.tagName)&&!e.slice(r+1).some(e=>"P"===e.node.tagName)&&("back"!==n.lastStep||!["LI","DD"].includes(n.node.tagName)))){const i=this.getClosestElementsWithText(n.node).nodes;if(i.length>1){const n=i.map(e=>({node:e,isTextNode:!1,hasCurrentSignature:e.contains(t),hasForeignComponents:!1,lastStep:"replaced"}));e.splice(r,1,...n)}else if(i[0]!==n.node)Object.assign(n,{node:i[0],lastStep:"replaced"})}}return e}wrapNumberedList(e,t){if(e.length>1){const i=e[0].node.parentNode;if("OL"===i.tagName){const r=Number(i.contains(t));if(i.getElementsByClassName("cd-signature").length-r==0){const t=e.filter(e=>e.node.parentNode===i),r=!e.some(e=>e.node.parentNode!==i&&e.node.parentNode.contains(i));let n,s;const a=i.nextSibling,o=i.parentNode;if(r){s=this.context.document.createElement("dd");n=this.context.document.createElement("dl");n.appendChild(s)}else{s=this.context.document.createElement("div");n=s}s.appendChild(i);o.insertBefore(n,a);const l={node:s,isTextNode:!1,isHeading:!1,hasCurrentSignature:!0,hasForeignComponents:!1,lastStep:"replaced"};e.splice(0,t.length,l)}}}return e}getListsUpTree(e){const t=[],i=new n.b(e);for(;i.parentNode();){const e=i.currentNode;if(["DL","UL","OL"].includes(e.tagName))if(e.classList.contains("cd-commentLevel")){const i=e.getAttribute("class").match(/cd-commentLevel-(\\d+)/);if(i)t.unshift(...Array(Number(i[1])));return t}else t.unshift(e)}return t}findHeadings(){const e=[...r.a.g.rootElement.getElementsByTagName("h1"),...r.a.g.rootElement.getElementsByTagName("h2"),...r.a.g.rootElement.getElementsByTagName("h3"),...r.a.g.rootElement.getElementsByTagName("h4"),...r.a.g.rootElement.getElementsByTagName("h5"),...r.a.g.rootElement.getElementsByTagName("h6")];e.sort((e,t)=>this.context.follows(e,t)?1:-1);return e}static processLink(e){const t=e.getAttribute("href");let i,n=null;if(t){const{pageName:e,domain:o,fragment:l}=function(e){let t,i=r.a.g.HOSTNAME,n=e.replace(/^(?:https?:)?\\/\\/([^/]+)/,(e,t)=>{i=t;return""}).replace(r.a.g.STARTS_WITH_ARTICLE_PATH_REGEXP,"").replace(r.a.g.STARTS_WITH_SCRIPT_TITLE,"").replace(/&action=edit.*/,"").replace(/#(.*)/,(e,i)=>{t=i;return""}).replace(/_/g," ");try{n=decodeURIComponent(n)}catch(e){return null}return{pageName:n,domain:i,fragment:t}}(t)||{};if(!e||Object(a.b)(l))return null;const c=e.match(r.a.g.USER_NAMESPACES_REGEXP);if(c){i=c[1];if(r.a.g.USER_LINK_REGEXP.test(e))n="user";else if(r.a.g.USER_TALK_LINK_REGEXP.test(e))n="userTalk";else if(r.a.g.USER_SUBPAGE_LINK_REGEXP.test(e))n="userSubpage";else if(r.a.g.USER_TALK_SUBPAGE_LINK_REGEXP.test(e))n="userTalkSubpage"}else if(e.startsWith(r.a.g.CONTRIBS_PAGE+"/")){i=e.replace(r.a.g.CONTRIBS_PAGE_LINK_REGEXP,"");if(r.a.g.isIPv6Address(i))i=i.toUpperCase();n="contribs"}if(o!==r.a.g.HOSTNAME)n+="Foreign";if(i)i=Object(s.b)(Object(s.j)(i.replace(/\\/.*/,""))).trim()}else if(e.classList.contains("mw-selflink")&&3===r.a.g.NAMESPACE_NUMBER&&!r.a.g.PAGE_NAME.includes("/"))i=r.a.g.PAGE_TITLE;else return null;return{userName:i,linkType:n}}}t.a=Parser},function(e,t,i){"use strict";i.d(t,"a",(function(){return l}));var r=i(3),cd=i(0),n=i(24),s=i.n(n);i(1);i(5);function a(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}}self.Node={ELEMENT_NODE:1,TEXT_NODE:3};function o(e,t,i){if(i&&t(e))return!0;for(let i=e.firstChild;i;i=i.nextSibling)if(o(i,t,!0))return!0}function l(){let e=[];o(cd.a.g.rootElement,t=>{if(t.nodeType===Node.TEXT_NODE)e.push(t)});return e}const c=Object(r.parseDocument)("<a>a</a>"),u=c.constructor,d=c.childNodes[0],h=d.constructor,f=d.childNodes[0].constructor,p=Object.getPrototypeOf(Object.getPrototypeOf(f));Object.defineProperty(h.prototype,"childElements",{get:function(){return this.childNodes.filter(e=>e.tagName)}});Object.defineProperty(h.prototype,"previousElementSibling",{get:function(){for(let e=this.previousSibling;e;e=e.previousSibling)if(e.tagName)return e;return null}});Object.defineProperty(h.prototype,"nextElementSibling",{get:function(){for(let e=this.nextSibling;e;e=e.nextSibling)if(e.tagName)return e;return null}});Object.defineProperty(h.prototype,"firstElementChild",{get:function(){let e;for(e=this.firstChild;e&&e.nodeType!==Node.ELEMENT_NODE;e=e.nextSibling);return e||null}});Object.defineProperty(h.prototype,"lastElementChild",{get:function(){let e;for(e=this.lastChild;e&&e.nodeType!==Node.ELEMENT_NODE;e=e.previousSibling);return e||null}});Object.defineProperty(h.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 f(e||""))}});Object.defineProperty(h.prototype,"innerHTML",{get:function(){return r.DomUtils.getInnerHTML(this,{decodeEntities:!1})}});Object.defineProperty(h.prototype,"outerHTML",{get:function(){return r.DomUtils.getOuterHTML(this,{decodeEntities:!1})}});h.prototype.hasAttribute=function(e){return void 0!==this.attribs[e]};h.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};h.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]=t||""};h.prototype.removeAttribute=function(e){delete this.attribs[e]};h.prototype.appendChild=function(e){r.DomUtils.appendChild(this,e)};h.prototype.insertBefore=function(e,t){if(t)r.DomUtils.prepend(t,e);else this.appendChild(e)};h.prototype.removeChild=function(e){if(e.parentNode===this)r.DomUtils.removeElement(e)};h.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};h.prototype.follows=function(e){if(this.startIndex&&e.startIndex)return this.startIndex>e.startIndex;if(this===e)return!1;const t=[],i=[];let r,n,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)){r=a;n=t[t.indexOf(a)+1];s=i[1];break}}return!r||r.childNodes.indexOf(n)>r.childNodes.indexOf(s)};Object.defineProperty(h.prototype,"tagName",{get:function(){return this.name.toUpperCase()}});Object.defineProperty(h.prototype,"classList",{get:function(){if(this._classList)return this._classList;else{this._classList={list:[],isMovedFromClassAttr:!1,moveFromClassAttr(e){this.list=(e||"").split(" ");this.isMovedFromClassAttr=!0},add:(...e)=>{e.forEach(e=>{let t=this.getAttribute("class")||"";if(t)t+=" ";t+=e;this.setAttribute("class",t);if(this._classList.isMovedFromClassAttr)this._classList.list.push(e);else this._classList.moveFromClassAttr(t)})},remove:(...e)=>{e.forEach(e=>{let t=this.getAttribute("class")||"";const i=` ${t} `.indexOf(` ${e} `);if(-1!==i){t=t.slice(0,i)+t.slice(i+e.length+1);t=t.trim();this.setAttribute("class",t);if(this._classList.isMovedFromClassAttr)this._classList.list.splice(e,this._classList.list.indexOf(e),1);else this._classList.moveFromClassAttr(t)}})},contains:e=>{const t=this.getAttribute("class");if(!t)return!1;if(!this._classList.isMovedFromClassAttr)this._classList.moveFromClassAttr(t);return Boolean(this._classList.list.length)&&-1!==this._classList.list.indexOf(e)}};return this._classList}}});h.prototype.getElementsByClassName=function(e,t){let i=[];o(this,r=>{if(r.tagName&&r.classList.contains(e)){i.push(r);if(t&&i.length===t)return!0}});return i};h.prototype.getElementsByAttribute=function(e){let t=[];o(this,i=>{if(i.tagName){Object.keys(i.attribs).some(t=>e.test(t));t.push(i)}});return t};h.prototype.getElementsByTagName=function(e){return r.DomUtils.getElementsByTagName(e,this)};Object.defineProperty(f.prototype,"textContent",{get:function(){return a(this.data)},set:function(e){this.data=e}});p.prototype.remove=function(){r.DomUtils.removeElement(this)};u.prototype.createElement=e=>new h(e,{});u.prototype.createTextNode=e=>new f(e||"");u.prototype.getElementsByClassName=h.prototype.getElementsByClassName;self.Document=u},function(e,t,i){"use strict";i.r(t);i(31)},function(module,__webpack_exports__,__webpack_require__){"use strict";var _util__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__(1),_CdError__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__(4),_CommentSkeleton__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__(11),_Parser__WEBPACK_IMPORTED_MODULE_3__=__webpack_require__(28),_SectionSkeleton__WEBPACK_IMPORTED_MODULE_4__=__webpack_require__(23),_cd__WEBPACK_IMPORTED_MODULE_5__=__webpack_require__(0),_debug__WEBPACK_IMPORTED_MODULE_6__=__webpack_require__(27),_htmlparser2Extended__WEBPACK_IMPORTED_MODULE_7__=__webpack_require__(29),_htmlparser2Extended__WEBPACK_IMPORTED_MODULE_8__=__webpack_require__(3),_htmlparser2Extended__WEBPACK_IMPORTED_MODULE_8___default=__webpack_require__.n(_htmlparser2Extended__WEBPACK_IMPORTED_MODULE_8__),_timestamp__WEBPACK_IMPORTED_MODULE_9__=__webpack_require__(5);_util__WEBPACK_IMPORTED_MODULE_0__.k;let firstRun=!0;const context={CommentClass:_CommentSkeleton__WEBPACK_IMPORTED_MODULE_2__.a,SectionClass:_SectionSkeleton__WEBPACK_IMPORTED_MODULE_4__.a,childElementsProp:"childElements",follows:(e,t)=>e.follows(t),getAllTextNodes:_htmlparser2Extended__WEBPACK_IMPORTED_MODULE_7__.a,getElementByClassName:(e,t)=>e.getElementsByClassName(t,1)[0]||null};let alarmTimeout;self.cd=_cd__WEBPACK_IMPORTED_MODULE_5__.a;_cd__WEBPACK_IMPORTED_MODULE_5__.a.debug=_debug__WEBPACK_IMPORTED_MODULE_6__.a;_cd__WEBPACK_IMPORTED_MODULE_5__.a.debug.init();function setAlarm(e){clearTimeout(alarmTimeout);alarmTimeout=setTimeout(()=>{postMessage({type:"wakeUp"})},e)}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 r=t.hiddenElementsData.push({type:i,tagName:e.tagName,html:e.outerHTML}),n=context.document.createTextNode(`\\x01${r}_${i}\\x02`);e.parentNode.insertBefore(n,e);e.remove();if(t.elements.includes(e)){t.elements[t.elements.indexOf(e)]=n;return n}}function keepSafeValues(e,t){Object.keys(e).forEach(i=>{if(t.includes(i))delete e[i]})}function removeDataAttributes(e){Object.keys(e.attribs).forEach(t=>{if(/^data-/.test(t))e.removeAttribute(t)})}function parse(){_cd__WEBPACK_IMPORTED_MODULE_5__.a.comments=[];_cd__WEBPACK_IMPORTED_MODULE_5__.a.sections=[];Object(_timestamp__WEBPACK_IMPORTED_MODULE_9__.e)();_cd__WEBPACK_IMPORTED_MODULE_5__.a.debug.startTimer("worker: parse comments");const e=new _Parser__WEBPACK_IMPORTED_MODULE_3__.a(context);_cd__WEBPACK_IMPORTED_MODULE_5__.a.debug.startTimer("removeDtMarkup");e.removeDtMarkup();_cd__WEBPACK_IMPORTED_MODULE_5__.a.debug.stopTimer("removeDtMarkup");const t=e.findTimestamps();e.findSignatures(t).forEach(t=>{try{_cd__WEBPACK_IMPORTED_MODULE_5__.a.comments.push(e.createComment(t))}catch(e){if(!(e instanceof _CdError__WEBPACK_IMPORTED_MODULE_1__.a))console.error(e)}});_cd__WEBPACK_IMPORTED_MODULE_5__.a.debug.stopTimer("worker: parse comments");_cd__WEBPACK_IMPORTED_MODULE_5__.a.debug.startTimer("worker: parse sections");e.findHeadings().forEach(t=>{try{_cd__WEBPACK_IMPORTED_MODULE_5__.a.sections.push(e.createSection(t))}catch(e){if(!(e instanceof _CdError__WEBPACK_IMPORTED_MODULE_1__.a))console.error(e)}});_cd__WEBPACK_IMPORTED_MODULE_5__.a.debug.stopTimer("worker: parse sections");_cd__WEBPACK_IMPORTED_MODULE_5__.a.debug.startTimer("worker: prepare comments and sections");_CommentSkeleton__WEBPACK_IMPORTED_MODULE_2__.a.processOutdents();_cd__WEBPACK_IMPORTED_MODULE_5__.a.comments.forEach(e=>{e.hiddenElementsData=[];e.elementHtmls=e.elements.map(t=>{if(/^H[1-6]$/.test(t.tagName)){const e=t.getElementsByClassName("mw-headline")[0];if(e){var i;null===(i=e.getElementsByClassName("mw-headline-number")[0])||void 0===i||i.remove();Array.from(t.childNodes).forEach(e=>{e.remove()});Array.from(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()});if(t.classList.contains("references")||["STYLE","LINK"].includes(t.tagName)){return hideElement(t,e).textContent}else{[...t.getElementsByClassName("autonumber"),...t.getElementsByClassName("reference"),...t.getElementsByClassName("references"),...t.getElementsByTagName("style"),...t.getElementsByTagName("link")].forEach(t=>{hideElement(t,e)});return t.outerHTML}});e.comparedHtml="";e.textComparedHtml="";e.headingComparedHtml="";e.elements.forEach(t=>{let i;if("DIV"===t.tagName){t.classList.remove("cd-comment-part","cd-comment-part-first","cd-comment-part-last");if(!t.getAttribute("class"))t.removeAttribute("class");i=Object.keys(t.attribs).length?t.outerHTML:t.innerHTML}else i=t.innerHTML||t.textContent;e.comparedHtml+=i+"\\n";if(/^H[1-6]$/.test(t.tagName))e.headingComparedHtml+=i;else e.textComparedHtml+=i+"\\n"});e.comparedHtml=e.comparedHtml.trim();e.textComparedHtml=e.textComparedHtml.trim();e.headingComparedHtml=e.headingComparedHtml.trim();e.signatureElement.remove();e.text=e.elements.map(e=>e.textContent).join("\\n").trim();e.elementNames=e.elements.map(e=>e.tagName)});let i=["authorLink","authorTalkLink","cachedParent","elements","highlightables","parser","parts","signatureElement","timestampElement"],r=["cachedAncestors","elements","headingElement","headlineElement","lastElementInFirstChunk","parser"];_cd__WEBPACK_IMPORTED_MODULE_5__.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_5__.a.comments.slice(Math.max(0,t-2),t).reverse();keepSafeValues(e,i)});_cd__WEBPACK_IMPORTED_MODULE_5__.a.sections.forEach(e=>{var t;e.parent=e.getParent();e.ancestors=e.getAncestors().map(e=>e.headline);e.oldestCommentAnchor=null===(t=e.oldestComment)||void 0===t?void 0:t.anchor;keepSafeValues(e,r)});_cd__WEBPACK_IMPORTED_MODULE_5__.a.debug.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(firstRun){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.");firstRun=!1}if("setAlarm"===t.type)setAlarm(t.interval);if("removeAlarm"===t.type)clearTimeout(alarmTimeout);if("parse"===t.type){_cd__WEBPACK_IMPORTED_MODULE_5__.a.debug.startTimer("worker");_cd__WEBPACK_IMPORTED_MODULE_5__.a.g=t.g;_cd__WEBPACK_IMPORTED_MODULE_5__.a.config=t.config;_cd__WEBPACK_IMPORTED_MODULE_5__.a.config.checkForCustomForeignComponents=restoreFunc(_cd__WEBPACK_IMPORTED_MODULE_5__.a.config.checkForCustomForeignComponents);_cd__WEBPACK_IMPORTED_MODULE_5__.a.g.isIPv6Address=restoreFunc(_cd__WEBPACK_IMPORTED_MODULE_5__.a.g.isIPv6Address);context.document=Object(_htmlparser2Extended__WEBPACK_IMPORTED_MODULE_8__.parseDocument)(t.text,{withStartIndices:!0,withEndIndices:!0,decodeEntities:!1});_cd__WEBPACK_IMPORTED_MODULE_5__.a.g.rootElement=context.document.childNodes[0];_cd__WEBPACK_IMPORTED_MODULE_5__.a.g.pageHasOutdents=Boolean(_cd__WEBPACK_IMPORTED_MODULE_5__.a.g.rootElement.getElementsByClassName(_cd__WEBPACK_IMPORTED_MODULE_5__.a.config.outdentClass,1).length);parse();postMessage({type:t.type,revisionId:t.revisionId,resolverId:t.resolverId,comments:_cd__WEBPACK_IMPORTED_MODULE_5__.a.comments,sections:_cd__WEBPACK_IMPORTED_MODULE_5__.a.sections});_cd__WEBPACK_IMPORTED_MODULE_5__.a.debug.stopTimer("worker");_cd__WEBPACK_IMPORTED_MODULE_5__.a.debug.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 r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});t.getText=t.getInnerHTML=t.getOuterHTML=void 0;var n=i(6),s=r(i(34));function a(e,t){return s.default(e,t)}t.getOuterHTML=a;t.getInnerHTML=function(e,t){return n.hasChildren(e)?e.children.map((function(e){return a(e,t)})).join(""):""};t.getText=function e(t){if(Array.isArray(t))return t.map(e).join("");if(n.isTag(t))return"br"===t.name?"\\n":e(t.children);if(n.isCDATA(t))return e(t.children);if(n.isText(t))return t.data;else return""}},function(e,t,i){"use strict";var r=this&&this.__assign||function(){return(r=Object.assign||function(e){for(var t,i=1,r=arguments.length;i<r;i++){t=arguments[i];for(var n in t)if(Object.prototype.hasOwnProperty.call(t,n))e[n]=t[n]}return e}).apply(this,arguments)},n=this&&this.__createBinding||(Object.create?function(e,t,i,r){if(void 0===r)r=i;Object.defineProperty(e,r,{enumerable:!0,get:function(){return t[i]}})}:function(e,t,i,r){if(void 0===r)r=i;e[r]=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))n(t,e,i);s(t,e);return t};Object.defineProperty(t,"__esModule",{value:!0});var o=a(i(8)),l=i(35),c=i(36),u=new Set(["style","script","xmp","iframe","noembed","noframes","plaintext","noscript"]);var d=new Set(["area","base","basefont","br","col","command","embed","frame","hr","img","input","isindex","keygen","link","meta","param","source","track","wbr"]);function h(e,t){if(void 0===t)t={};for(var i=Array.isArray(e)||e.cheerio?e:[e],r="",n=0;n<i.length;n++)r+=f(i[n],t);return r}t.default=h;function f(e,t){switch(e.type){case o.Root:return h(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=r(r({},t),{xmlMode:!1})}if(!t.xmlMode&&m.has(e.name))t=r(r({},t),{xmlMode:"foreign"});var n="<"+e.name,s=function(e,t){if(e)return Object.keys(e).map((function(i){var r,n,s=null!==(r=e[i])&&void 0!==r?r:"";if("foreign"===t.xmlMode)i=null!==(n=c.attributeNames.get(i))&&void 0!==n?n: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)n+=" "+s;if(0===e.children.length&&(t.xmlMode?!1!==t.selfClosingTags:t.selfClosingTags&&d.has(e.name))){if(!t.xmlMode)n+=" ";n+="/>"}else{n+=">";if(e.children.length>0)n+=h(e.children,t);if(t.xmlMode||!d.has(e.name))n+="</"+e.name+">"}return n}(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 r=i(19),n=i(20);t.decode=function(e,t){return(!t||t<=0?r.decodeXML:r.decodeHTML)(e)};t.decodeStrict=function(e,t){return(!t||t<=0?r.decodeXML:r.decodeHTMLStrict)(e)};t.encode=function(e,t){return(!t||t<=0?n.encodeXML:n.encodeHTML)(e)};var s=i(20);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(19);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 r=i(6),n=[];function s(e){var t;return null!==(t=e.children)&&void 0!==t?t:n}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],r=e.prev,n=e.next;null!=r;){i.unshift(r);r=r.prev}for(;null!=n;){i.push(n);n=n.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&&!r.isTag(t);)t=t.next;return t};t.prevElementSibling=function(e){for(var t=e.prev;null!==t&&!r.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 r(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=r;t.replaceElement=function(e,t){var i=t.prev=e.prev;if(i)i.next=t;var r=t.next=e.next;if(r)r.prev=t;var n=t.parent=e.parent;if(n){var s=n.children;s[s.lastIndexOf(e)]=t}};t.appendChild=function(e,t){r(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){r(t);var i=e.parent,n=e.next;t.next=n;t.prev=e;e.next=t;t.parent=i;if(n){n.prev=t;if(i){var s=i.children;s.splice(s.lastIndexOf(n),0,t)}}else if(i)i.children.push(t)};t.prependChild=function(e,t){r(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){r(t);var i=e.parent;if(i){var n=i.children;n.splice(n.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.getElementsByTagType=t.getElementsByTagName=t.getElementById=t.getElements=t.testElement=void 0;var r=i(6),n=i(21),s={tag_name:function(e){if("function"==typeof e)return function(t){return r.isTag(t)&&e(t.name)};else if("*"===e)return r.isTag;return function(t){return r.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 r.isText(t)&&e(t.data)};else return function(t){return r.isText(t)&&t.data===e}}};function a(e,t){if("function"==typeof t)return function(i){return r.isTag(i)&&t(i.attribs[e])};else return function(i){return r.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 t in s?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,r){if(void 0===r)r=1/0;var s=l(e);return s?n.filter(s,t,i,r):[]};t.getElementById=function(e,t,i){if(void 0===i)i=!0;if(!Array.isArray(t))t=[t];return n.findOne(a("id",e),t,i)};t.getElementsByTagName=function(e,t,i,r){if(void 0===i)i=!0;if(void 0===r)r=1/0;return n.filter(s.tag_name(e),t,i,r)};t.getElementsByTagType=function(e,t,i,r){if(void 0===i)i=!0;if(void 0===r)r=1/0;return n.filter(s.tag_type(e),t,i,r)}},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});t.uniqueSort=t.compareDocumentPosition=t.removeSubsets=void 0;var r=i(6);t.removeSubsets=function(e){for(var t=e.length;--t>=0;){var i=e[t];if(!(t>0&&e.lastIndexOf(i,t-1)>=0)){for(var r=i.parent;r;r=r.parent)if(e.includes(r)){e.splice(t,1);break}}else e.splice(t,1)}return e};function n(e,t){var i=[],n=[];if(e===t)return 0;for(var s=r.hasChildren(e)?e:e.parent;s;){i.unshift(s);s=s.parent}s=r.hasChildren(t)?t:t.parent;for(;s;){n.unshift(s);s=s.parent}for(var a=Math.min(i.length,n.length),o=0;o<a&&i[o]===n[o];)o++;if(0===o)return 1;var l=i[o-1],c=l.children,u=i[o],d=n[o];if(c.indexOf(u)>c.indexOf(d))if(l===t)return 20;else return 4;if(l===e)return 10;else return 2}t.compareDocumentPosition=n;t.uniqueSort=function(e){(e=e.filter((function(e,t,i){return!i.includes(e,t+1)}))).sort((function(e,t){var i=n(e,t);if(2&i)return-1;else if(4&i)return 1;return 0}));return e}},function(e,t,i){"use strict";e.exports=function(e,t){var i,r,n,s={},a={},o={},l={};o[0]="HTML_SPECIALCHARS";o[1]="HTML_ENTITIES";l[0]="ENT_NOQUOTES";l[2]="ENT_COMPAT";l[3]="ENT_QUOTES";r=!isNaN(e)?o[e]:e?e.toUpperCase():"HTML_SPECIALCHARS";n=!isNaN(t)?l[t]:t?t.toUpperCase():"ENT_COMPAT";if("HTML_SPECIALCHARS"!==r&&"HTML_ENTITIES"!==r)throw new Error("Table: "+r+" not supported");s[38]="&amp;";if("HTML_ENTITIES"===r){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(i in s)if(s.hasOwnProperty(i))a[String.fromCharCode(i)]=s[i];return a}}]);\n',"Worker",void 0,void 0)}var cd=n(0),m=n(33),f=n(11),g=n(35),p=n(23),b=n(26),v=n(18),y=n(1),w=n(6),E=n(19),C=n(5),T=n(10),x=n(9),k=n(25),S=n(8);let O,N;const _={local:["haveInsertButtonsBeenAltered","insertButtons","signaturePrefix"],undocumented:["defaultCommentLinkType","defaultSectionLinkType","showLoadingOverlay"],aliases:{allowEditOthersComments:["allowEditOthersMsgs"],alwaysExpandAdvanced:["alwaysExpandSettings"],haveInsertButtonsBeenAltered:["areInsertButtonsAltered","insertButtonsChanged"],desktopNotifications:["browserNotifications"],signaturePrefix:["mySig","mySignature"]}};function A(){return P.apply(this,arguments)}function P(){return(P=o()((function*(){_.default={allowEditOthersComments:!1,alwaysExpandAdvanced:!1,haveInsertButtonsBeenAltered:!1,autocompleteTypes:["mentions","commentLinks","wikilinks","templates","tags"],autopreview:!0,desktopNotifications:"unknown",defaultCommentLinkType:null,defaultSectionLinkType:null,enableThreads:!0,hideTimezone:!1,insertButtons:cd.a.config.defaultInsertButtons||[],notifications:"all",notifyCollapsedThreads:!1,notificationsBlacklist:[],reformatComments:null,showContribsLink:!1,showLoadingOverlay:!0,showToolbar:!0,signaturePrefix:cd.a.config.defaultSignaturePrefix,timestampFormat:"default",topicSubscriptionsSeenNotice:!1,modifyToc:!0,useBackgroundHighlighting:!0,useTemplateData:!0,useTopicSubscriptions:!1,useUiTime:!0,watchOnReply:!0,watchSectionOnReply:!0};cd.a.settings=cd.a.settings||{};const e={[cd.a.g.SETTINGS_OPTION_NAME]:mw.user.options.get(cd.a.g.SETTINGS_OPTION_NAME),[cd.a.g.LOCAL_SETTINGS_OPTION_NAME]:mw.user.options.get(cd.a.g.LOCAL_SETTINGS_OPTION_NAME)};Object.keys(_.default).forEach(e=>{(_.aliases[e]||[]).concat(e).forEach(t=>{const n="cd"+Object(y.j)(t);if(n in window&&(typeof window[n]==typeof _.default[e]||null===_.default[e]))cd.a.settings[e]=window[n]})});const t=yield Object(T.b)({options:e,omitLocal:!0});Object.keys(t).forEach(e=>{if(!_.undocumented.includes(e))cd.a.settings[e]=t[e]});if(void 0!==cd.a.settings.signaturePrefix)cd.a.settings.signaturePrefix=cd.a.settings.signaturePrefix.replace(cd.a.g.SIGN_CODE,"");if(!cd.a.settings.haveInsertButtonsBeenAltered&&JSON.stringify(cd.a.settings.insertButtons)!==JSON.stringify(cd.a.config.defaultInsertButtons))cd.a.settings.insertButtons=cd.a.config.defaultInsertButtons;cd.a.settings=Object.assign({},_.default,cd.a.settings);if(!Object(y.c)(cd.a.settings,t))Object(T.e)().catch(e=>{console.warn("Couldn't save the settings to the server.",e)});Object.assign(cd.a.settings,Object(T.a)())}))).apply(this,arguments)}function I(e){const t="ltr"===cd.a.g.CONTENT_DIR?"padding-left":"padding-right";cd.a.g.CONTENT_START_MARGIN=parseFloat(cd.a.g.$contentColumn.css(t));if(cd.a.g.CONTENT_START_MARGIN<cd.a.g.CONTENT_FONT_SIZE)cd.a.g.CONTENT_START_MARGIN=cd.a.g.CONTENT_FONT_SIZE;if("timeless"===cd.a.g.SKIN)cd.a.g.CONTENT_START_MARGIN--;if(e)$(document.documentElement).css("--cd-content-start-margin",cd.a.g.CONTENT_START_MARGIN+"px");const n=cd.a.g.$contentColumn.offset().left,i=cd.a.g.$contentColumn.outerWidth();cd.a.g.CONTENT_COLUMN_START="ltr"===cd.a.g.CONTENT_DIR?n:n+i;cd.a.g.CONTENT_COLUMN_END="ltr"===cd.a.g.CONTENT_DIR?n+i:n}function L(){cd.a.g.CONTENT_LINE_HEIGHT=parseFloat(cd.a.g.$content.css("line-height"));cd.a.g.CONTENT_FONT_SIZE=parseFloat(cd.a.g.$content.css("font-size"));cd.a.g.BODY_SCROLL_PADDING_TOP=parseFloat($(document.body).css("scroll-padding-top"))||0;I()}function M(){const e=$("#content").css("background-color")||"#fff",t=Object(y.S)({timeless:"#mw-content-container",vector:".mw-page-container",default:"body"}).css("background-color");mw.loader.addStyleTag(`:root {\n  --cd-comment-hovered-background-color: ${cd.a.g.COMMENT_HOVERED_BACKGROUND_COLOR};\n  --cd-comment-target-marker-color: ${cd.a.g.COMMENT_TARGET_MARKER_COLOR};\n  --cd-comment-target-background-color: ${cd.a.g.COMMENT_TARGET_BACKGROUND_COLOR};\n  --cd-comment-target-hovered-background-color: ${cd.a.g.COMMENT_TARGET_HOVERED_BACKGROUND_COLOR};\n  --cd-comment-new-marker-color: ${cd.a.g.COMMENT_NEW_MARKER_COLOR};\n  --cd-comment-new-background-color: ${cd.a.g.COMMENT_NEW_BACKGROUND_COLOR};\n  --cd-comment-new-hovered-background-color: ${cd.a.g.COMMENT_NEW_HOVERED_BACKGROUND_COLOR};\n  --cd-comment-own-marker-color: ${cd.a.g.COMMENT_OWN_MARKER_COLOR};\n  --cd-comment-own-background-color: ${cd.a.g.COMMENT_OWN_BACKGROUND_COLOR};\n  --cd-comment-own-hovered-background-color: ${cd.a.g.COMMENT_OWN_HOVERED_BACKGROUND_COLOR};\n  --cd-comment-deleted-marker-color: ${cd.a.g.COMMENT_DELETED_MARKER_COLOR};\n  --cd-comment-deleted-background-color: ${cd.a.g.COMMENT_DELETED_BACKGROUND_COLOR};\n  --cd-comment-deleted-hovered-background-color: ${cd.a.g.COMMENT_DELETED_HOVERED_BACKGROUND_COLOR};\n  --cd-comment-fallback-side-margin: ${cd.a.g.COMMENT_FALLBACK_SIDE_MARGIN}px;\n  --cd-thread-line-side-margin: ${cd.a.g.THREAD_LINE_SIDE_MARGIN}px;\n  --cd-content-background-color: ${e};\n  --cd-content-start-margin: ${cd.a.g.CONTENT_START_MARGIN}px;\n  --cd-content-font-size: ${cd.a.g.CONTENT_FONT_SIZE}px;\n  --cd-sidebar-color: ${t};\n  --cd-sidebar-transparent-color: ${Object(y.U)(t)};\n}`)}function j(){cd.a.g.mwApi=cd.a.g.mwApi||new mw.Api({parameters:{formatversion:2,uselang:cd.a.g.USER_LANGUAGE},ajax:{headers:{"Api-User-Agent":"c:User:Jack who built the house/Convenient Discussions"}}})}function D(){cd.a.g.PHP_CHAR_TO_UPPER_JSON=mw.loader.moduleRegistry["mediawiki.Title"].script.files["phpCharToUpper.json"];cd.a.page=new c.a(cd.a.g.PAGE_NAME,!1);cd.a.g.PAGE=cd.a.page;cd.a.user=v.a.getUser(cd.a.g.USER_NAME);cd.a.g.GENDER_AFFECTS_USER_STRING=/\{\{ *gender *:[^}]+?\|[^}]+?\|/i.test(cd.a.sPlain("es-reply-to")+cd.a.sPlain("es-edit-comment-by")+cd.a.sPlain("thank-confirm")+cd.a.sPlain("thread-expand"));if(cd.a.config.tagName&&cd.a.user.isRegistered()){cd.a.g.SUMMARY_POSTFIX="";cd.a.g.SUMMARY_LENGTH_LIMIT=mw.config.get("wgCommentCodePointLimit")}else{cd.a.g.SUMMARY_POSTFIX=` ([[${cd.a.config.scriptPageWikilink}|${cd.a.s("script-name-short")}]])`;cd.a.g.SUMMARY_LENGTH_LIMIT=mw.config.get("wgCommentCodePointLimit")-cd.a.g.SUMMARY_POSTFIX.length}cd.a.g.isIPv6Address=mw.util.isIPv6Address;cd.a.g.notificationArea=document.querySelector(".mw-notification-area");cd.a.state.isScrollHandlingPrevented=!1;cd.a.state.isAutoScrollInProgress=!1;cd.a.state.isPageBeingReloaded=!1;cd.a.state.hasPageBeenReloaded=!1;cd.a.g.processPageInBackground=b.a.processPage;cd.a.g.editWatchedSections=E.a;cd.a.g.showSettingsDialog=E.d;cd.a.g.setVisits=T.f;cd.a.api.getCommentByAnchor=a.a.getByAnchor;cd.a.api.getSectionByAnchor=l.a.getByAnchor;cd.a.api.getSectionsByHeadline=l.a.getByHeadline;cd.a.api.getLastActiveCommentForm=s.a.getLastActive;cd.a.api.getLastActiveAlteredCommentForm=s.a.getLastActiveAltered;cd.a.api.reloadPage=J}function R(){var e,t,n,i,o,a;cd.a.config.customTalkNamespaces=cd.a.config.customTalkNamespaces||[];const s=null===(e=cd.a.config.signatureEndingRegexp)||void 0===e?void 0:null===(t=e.source)||void 0===t?void 0:t.slice(-1);if(s&&"$"!==s)cd.a.config.signatureEndingRegexp=new RegExp(cd.a.config.signatureEndingRegexp.source+"$");cd.a.g.CONTRIBS_PAGE_LINK_REGEXP=new RegExp(`^${cd.a.g.CONTRIBS_PAGE}/`);const r=e=>e.replace(/[ _]/g,"[ _]+").replace(/:/g,"[ _]*:[ _]*"),c=mw.config.get("wgNamespaceIds"),l=Object.keys(c).filter(e=>2===c[e]||3===c[e]).map(r).join("|");cd.a.g.USER_NAMESPACES_REGEXP=new RegExp(`(?:^|:)(?:${l}):(.+)`,"i");const u=Object.keys(c).filter(e=>2===c[e]).map(r).join("|");cd.a.g.USER_LINK_REGEXP=new RegExp(`^:?(?:${u}):([^/]+)$`,"i");cd.a.g.USER_SUBPAGE_LINK_REGEXP=new RegExp(`^:?(?:${u}):.+?/`,"i");const d=Object.keys(c).filter(e=>3===c[e]).map(r).join("|");cd.a.g.USER_TALK_LINK_REGEXP=new RegExp(`^:?(?:${d}):([^/]+)$`,"i");cd.a.g.USER_TALK_SUBPAGE_LINK_REGEXP=new RegExp(`^:?(?:${d}):.+?/`,"i");const h=Object.keys(c).filter(e=>e).join("|");cd.a.g.ALL_NAMESPACES_REGEXP=new RegExp(`^:?(?:${h}):`,"i");const m=r(cd.a.g.CONTRIBS_PAGE);cd.a.g.CAPTURE_USER_NAME_PATTERN=`\\[\\[[ _]*:?(?:\\w*:){0,2}(?:(?:${l})[ _]*:[ _]*|(?:Special[ _]*:[ _]*Contributions|${m})\\/[ _]*)([^|\\]/]+)(/)?`;if(cd.a.config.unsignedTemplates.length){const e=cd.a.config.unsignedTemplates.map(y.m).join("|");cd.a.g.UNSIGNED_TEMPLATES_PATTERN=`(\\{\\{ *(?:${e}) *\\| *([^}|]+?) *(?:\\| *([^}]+?) *)?\\}\\})`;cd.a.g.UNSIGNED_TEMPLATES_REGEXP=new RegExp(cd.a.g.UNSIGNED_TEMPLATES_PATTERN+".*\\n","g")}let f;if(cd.a.config.clearTemplates.length)f=cd.a.config.clearTemplates.map(y.m).join("|");cd.a.g.KEEP_IN_SECTION_ENDING=cd.a.config.keepInSectionEnding.slice();if(f){const e=new RegExp(`\\n+\\{\\{ *(?:${f}) *\\}\\}\\s*$`);cd.a.g.KEEP_IN_SECTION_ENDING.push(e)}cd.a.g.USER_SIGNATURE=cd.a.settings.signaturePrefix+cd.a.g.SIGN_CODE;const g=mw.user.options.get("nickname"),p=new RegExp(cd.a.g.CAPTURE_USER_NAME_PATTERN,"i"),b=g.match(p);if(b){const e=" "===cd.a.settings.signaturePrefix?"[ \n]":mw.util.escapeRegExp(cd.a.settings.signaturePrefix),t=mw.util.escapeRegExp(g.slice(0,b.index));cd.a.g.USER_SIGNATURE_PREFIX_REGEXP=new RegExp(e+t+"$")}const v=cd.a.g.POPULAR_INLINE_ELEMENTS.join("|");cd.a.g.PIE_PATTERN=`(?:${v})`;const w=cd.a.g.POPULAR_NOT_INLINE_ELEMENTS.join("|");cd.a.g.PNIE_PATTERN=`(?:${w})`;const E=[];if(cd.a.config.elementsToExcludeClasses.length||cd.a.config.templatesToExclude.length||cd.a.config.commentAntipatterns.length){if(cd.a.config.elementsToExcludeClasses){const e=cd.a.config.elementsToExcludeClasses.join("\\b|\\b");E.push(`class=(['"])[^'"\\n]*(?:\\b${e}\\b)[^'"\\n]*\\1`)}if(cd.a.config.templatesToExclude.length){const e=cd.a.config.templatesToExclude.map(y.m).join("|");E.push(`\\{\\{ *(?:${e}) *(?:\\||\\}\\})`)}if(cd.a.config.commentAntipatterns){const e=cd.a.config.commentAntipatterns.map(e=>e.source);E.push(...e)}const e=E.join("|");cd.a.g.COMMENT_ANTIPATTERNS_REGEXP=new RegExp(`^.*(?:${e}).*$`,"mg")}const C=mw.util.escapeRegExp(mw.config.get("wgArticlePath")).replace("\\$1","(.*)");cd.a.g.ARTICLE_PATH_REGEXP=new RegExp(C);const T="^"+mw.util.escapeRegExp(mw.config.get("wgArticlePath")).replace("\\$1","");cd.a.g.STARTS_WITH_ARTICLE_PATH_REGEXP=new RegExp(T);const x="^"+mw.util.escapeRegExp(mw.config.get("wgScript")+"?title=");cd.a.g.STARTS_WITH_SCRIPT_TITLE=new RegExp(x);cd.a.g.HOSTNAME=location.hostname;const k=e=>"\\{\\{ *"+r(mw.util.escapeRegExp(e)),S=["<blockquote","<q"].concat((null===(n=cd.a.config.pairQuoteTemplates)||void 0===n?void 0:n[0].map(k))||[]).join("|"),O=["</blockquote>","</q>"].concat((null===(i=cd.a.config.pairQuoteTemplates)||void 0===i?void 0:i[1].map(k))||[]).join("|");cd.a.g.QUOTE_REGEXP=new RegExp(`(${S})([^]*?)(${O})`,"ig");const N=cd.a.config.outdentTemplates.map(y.m).join("|");if(N){const e=`^([:*]*) *\\{\\{ *(?:${N}) *(?:\\||\\}\\})`;cd.a.g.OUTDENT_TEMPLATES_REGEXP=new RegExp(e,"g")}const _=((null===(o=cd.a.config.closedDiscussionTemplates)||void 0===o?void 0:o[0])||[]).map(y.m).join("|"),A=((null===(a=cd.a.config.closedDiscussionTemplates)||void 0===a?void 0:a[1])||[]).map(y.m).join("|");if(_){if(A)cd.a.g.CLOSED_DISCUSSION_PAIR_REGEXP=new RegExp(`\\{\\{ *(?:${_}) *(?=[|}])[^}]*\\}\\}\\s*([:*#]*)[^]*?\\{\\{ *(?:${A}) *(?=[|}])[^}]*\\}\\}`,"g");cd.a.g.CLOSED_DISCUSSION_SINGLE_REGEXP=new RegExp(`\\{\\{ *(?:${_}) *\\|[^}]{0,50}?=\\s*([:*#]*)`,"g")}cd.a.g.UNHIGHLIGHTABLE_ELEMENT_CLASSES=cd.a.g.UNHIGHLIGHTABLE_ELEMENT_CLASSES.concat(cd.a.config.customUnhighlightableElementClasses);const P=Object.keys(c).filter(e=>6===c[e]).map(r).join("|");cd.a.g.FILE_PREFIX_PATTERN=`(?:${P}):`;cd.a.g.FILE_EMBED_REGEXP=new RegExp(`\\[\\[${cd.a.g.FILE_PREFIX_PATTERN}[^\\]]+?(?:\\|[^\\]]+?\\|((?:\\[\\[[^\\]]+?\\]\\]|[^|\\]])+))?\\]\\]`,"ig");const I=Object.keys(c).filter(e=>6===c[e]||14===c[e]).map(r).join("|");cd.a.g.COLON_NAMESPACES_PREFIX_REGEXP=new RegExp(`^:(?:${I}):`,"i");cd.a.g.BAD_COMMENT_BEGINNINGS=cd.a.g.BAD_COMMENT_BEGINNINGS.concat(new RegExp(`^\\[\\[${cd.a.g.FILE_PREFIX_PATTERN}.+\\n*(?=[*:#])`,"i")).concat(cd.a.config.customBadCommentBeginnings);if(f){const e=new RegExp(`^\\{\\{ *(?:${f}) *\\}\\} *\\n+`,"i");cd.a.g.BAD_COMMENT_BEGINNINGS.push(e)}cd.a.g.ADD_TOPIC_SELECTOR=["#ca-addsection a",'a[href*="section=new"]','.commentbox input[type="submit"]','.createbox input[type="submit"]'].concat(cd.a.config.customAddTopicLinkSelectors).join(", ");cd.a.g.PAGES_WITHOUT_ARCHIVES_REGEXP=Object(y.H)(cd.a.config.pagesWithoutArchives);cd.a.g.ARCHIVE_PAGES_MAP=new Map;cd.a.g.SOURCE_PAGES_MAP=new Map;const L=(e,t,n)=>{let i=[],o=Object(y.x)(e,/\\[$\\]/g,i);o=mw.util.escapeRegExp(o);if(t)o=o.replace(/\\\$/,"$").replace(/\$(\d+)/,(e,n)=>{const i=t[n-1];return i?`(${i.source})`:e});o="^"+o+(n?".*":"")+"$";o=Object(y.W)(o,i);return new RegExp(o)};cd.a.config.archivePaths.forEach(e=>{if(e instanceof RegExp){let t=new RegExp(e.source+".*");cd.a.g.SOURCE_PAGES_MAP.set(t,"")}else{const t=L(e.source,e.replacements),n=L(e.archive,e.replacements,!0);cd.a.g.ARCHIVE_PAGES_MAP.set(t,e.archive);cd.a.g.SOURCE_PAGES_MAP.set(n,e.source)}})}function H(){Object(w.e)();let e={};const t=document.createElement("span");t.innerHTML=cd.a.sParse("dot-separator");e.separator=t;if(!1!==cd.a.settings.reformatComments){const t=document.createElement("div");t.className="cd-comment-header";const n=document.createElement("span");n.className="cd-comment-author-wrapper";t.appendChild(n);const i=document.createElement("a");i.className="cd-comment-author mw-userlink";n.appendChild(i);const o=document.createElement("bdi");i.appendChild(o);const a=document.createTextNode(" "+cd.a.mws("parentheses-start")),s=document.createTextNode(cd.a.mws("parentheses-end")),r=document.createElement("a");r.textContent=cd.a.s("comment-author-talk");n.appendChild(a);n.appendChild(r);if(cd.a.settings.showContribsLink){const t=document.createElement("a");t.textContent=cd.a.s("comment-author-contribs");const i=e.separator.cloneNode(!0);n.appendChild(i);n.appendChild(t)}n.appendChild(s);e.headerElement=t}if(!0!==cd.a.settings.reformatComments){e.getReplyButton=()=>new OO.ui.ButtonWidget({label:cd.a.s("cm-reply"),framed:!1,classes:["cd-button-ooui","cd-comment-button-ooui"]});e.replyButton=e.getReplyButton().$element.get(0);e.getEditButton=()=>new OO.ui.ButtonWidget({label:cd.a.s("cm-edit"),framed:!1,classes:["cd-button-ooui","cd-comment-button-ooui"]});e.editButton=e.getEditButton().$element.get(0);e.getThankButton=()=>new OO.ui.ButtonWidget({label:cd.a.s("cm-thank"),title:cd.a.s("cm-thank-tooltip"),framed:!1,classes:["cd-button-ooui","cd-comment-button-ooui"]});e.thankButton=e.getThankButton().$element.get(0);e.getCopyLinkButton=()=>new OO.ui.ButtonWidget({label:cd.a.s("cm-copylink"),icon:"link",title:cd.a.s("cm-copylink-tooltip"),framed:!1,invisibleLabel:!0,classes:["cd-button-ooui","cd-comment-button-ooui","cd-comment-button-ooui-icon"]});e.copyLinkButton=e.getCopyLinkButton().$element.get(0);e.getGoToParentButton=()=>new OO.ui.ButtonWidget({label:cd.a.s("cm-gotoparent"),icon:"upTriangle",title:cd.a.s("cm-gotoparent-tooltip"),framed:!1,invisibleLabel:!0,classes:["cd-button-ooui","cd-comment-button-ooui","cd-comment-button-ooui-icon"]});e.goToParentButton=e.getGoToParentButton().$element.get(0);e.getGoToChildButton=()=>new OO.ui.ButtonWidget({label:cd.a.s("cm-gotochild"),icon:"downTriangle",title:cd.a.s("cm-gotochild-tooltip"),framed:!1,invisibleLabel:!0,classes:["cd-button-ooui","cd-comment-button-ooui","cd-comment-button-ooui-icon"]});e.goToChildButton=e.getGoToChildButton().$element.get(0)}const n=document.createElement("div");n.className="cd-comment-underlay";e.underlay=n;const i=document.createElement("div");i.className="cd-comment-overlay";e.overlay=i;const o=document.createElement("div");o.className="cd-comment-overlay-line";i.appendChild(o);const a=document.createElement("div");a.className="cd-comment-overlay-marker";i.appendChild(a);if(!cd.a.settings.reformatComments){const e=document.createElement("div");e.className="cd-comment-overlay-innerWrapper";i.appendChild(e);const t=document.createElement("div");t.textContent="\xa0";t.className="cd-comment-overlay-gradient";e.appendChild(t);const n=document.createElement("div");n.className="cd-comment-overlay-content";e.appendChild(n)}cd.a.g.COMMENT_ELEMENT_PROTOTYPES=e;let s={};s.replyButton=new OO.ui.ButtonWidget({label:cd.a.s("section-reply"),framed:!1,classes:["cd-button-ooui","cd-section-button","cd-thread-button"]}).$element.get(0);s.addSubsectionButton=new OO.ui.ButtonWidget({label:" ",framed:!1,classes:["cd-button-ooui","cd-section-button"]}).$element.get(0);cd.a.g.SECTION_ELEMENT_PROTOTYPES=s;let r={};r.expandButton=new OO.ui.ButtonWidget({label:"Expand the thread",icon:"expand",framed:!1,classes:["cd-button-ooui","cd-button-expandNote","cd-thread-button","cd-thread-button-invisible"]}).$element.get(0);const c=document.createElement("div");c.className="cd-thread-clickArea";c.title=cd.a.s("thread-tooltip");const l=document.createElement("div");l.className="cd-thread-line";c.appendChild(l);r.clickArea=c;cd.a.g.THREAD_ELEMENT_PROTOTYPES=r}function B(e){return F.apply(this,arguments)}function F(){return(F=o()((function*(e){cd.a.g.worker=new h;j();yield Promise.all(e.length?e:Object(k.a)());D();yield A();Object(C.h)("content");R();H();if(cd.a.settings.useBackgroundHighlighting)n(51);$.fn.extend(m.a);Object(C.g)();cd.a.commentForms=[]}))).apply(this,arguments)}function U(){return cd.a.comments.filter(e=>!1===e.isSeen).map(e=>e.anchor)}function Y(e){return W.apply(this,arguments)}function W(){return(W=o()((function*(e){cd.a.debug.stopTimer("getting HTML");try{yield Object(g.a)(e);mw.hook("wikipage.content").fire(cd.a.g.$content)}catch(e){mw.notify(cd.a.s("error-processpage"),{type:"error"});console.error(e);V()}}))).apply(this,arguments)}let q;function G(){return cd.a.settings&&!1===cd.a.settings.showLoadingOverlay||!cd.a.settings&&void 0!==window.cdShowLoadingOverlay&&!1===window.cdShowLoadingOverlay}function z(e=!1){if(e)cd.a.state.isPageBeingReloaded=!0;else cd.a.state.isFirstRun=!0;if(!G())if(!q){q=$("<div>").addClass("cd-loadingPopup");const e=$("<div>").addClass("cd-loadingPopup-logo").appendTo(q);$("<div>").addClass("cd-loadingPopup-logo-partBackground").appendTo(e);$("<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=").appendTo(e);$(document.body).append(q)}else q.show()}function V(e=!0){if(e){cd.a.state.isFirstRun=!1;cd.a.state.isPageFirstParsed=!1;cd.a.state.isPageBeingReloaded=!1}if(q&&!G())q.hide()}function K(){return cd.a.state.isFirstRun||cd.a.state.isPageBeingReloaded}function X(){return mw.config.get("wgRevisionId")>=mw.config.get("wgCurRevisionId")}function Z(e){const t=new mw.Uri,n=t.query;if((t.fragment||n.diff||n.oldid)&&!e.isPageReloadedExternally){delete n.title;delete n.curid;let e;if(n.diff||n.oldid){e="pushState";delete n.diff;delete n.oldid;delete n.diffmode;delete n.type;cd.a.g.$content.children(".mw-revslider-container, .ve-init-mw-diffPage-diffMode, .diff, .oo-ui-element-hidden, .diff-hr, .diff-currentversion-title").remove();$(".mw-revision").remove();$("#firstHeading").text(cd.a.page.name);$(window).on("popstate",()=>{if(mw.util.getParamValue("diff")||mw.util.getParamValue("oldid"))location.reload()});cd.a.g.isDiffPage=!1}else e="replaceState";history[e](history.state,"",cd.a.page.getUrl(n))}}function J(){return Q.apply(this,arguments)}function Q(){return(Q=o()((function*(e={}){var t;if(!cd.a.state.isPageBeingReloaded){cd.a.comments.forEach(e=>{var t;null===(t=e.$animatedBackground)||void 0===t||t.add(e.$marker).stop(!0,!0)});if(e.isPageReloadedExternally)a.a.resetLayers();if(X())te();if(!e.commentAnchor&&!e.sectionAnchor)Object(y.Q)();Object(y.f)(null!==(t=e.closeNotificationsSmoothly)&&void 0!==t?t:!0);cd.a.debug.init();cd.a.debug.startTimer("total time");cd.a.debug.startTimer("getting HTML");z(!0);Object(x.h)().catch(e=>{console.warn(e)});if(!e.isPageReloadedExternally){let t;try{t=yield cd.a.page.parse(null,!1,!0)}catch(t){V();if(e.wasCommentFormSubmitted)throw t;else{mw.notify(cd.a.s("error-reloadpage"),{type:"error"});console.warn(t);return}}e.html=t.text;mw.config.set({wgRevisionId:t.revid,wgCurRevisionId:t.revid});mw.loader.load(t.modules);mw.loader.load(t.modulestyles);mw.config.set(t.jsconfigvars)}r.a.reset();cd.a.commentForms.forEach(e=>{e.$outermostElement.detach()});e.unseenCommentAnchors=U();Z(e);cd.a.state.hasPageBeenReloaded=!0;b.a.updatePageTitle(0,!1);yield Y(e);p.a.possiblyHide();if(!e.commentAnchor&&!e.sectionAnchor)Object(y.O)(!1)}}))).apply(this,arguments)}function ee(e){if(e.is("#mw-content-text")){const t=e.children(".mw-parser-output");if(t.length&&!t.data("cd-parsed"))J({isPageReloadedExternally:!0})}}function te(e){const t=()=>{const e=cd.a.commentForms.filter(e=>e.isAltered()).map(e=>{var t,n,i,o,s,r;let c;const u=e.target;if(e.target instanceof a.a)c={anchor:u.anchor};else if(u instanceof l.a){var d;c={headline:u.headline,oldestCommentAnchor:null===(d=u.oldestComment)||void 0===d?void 0:d.anchor,id:u.id,anchor:u.anchor,ancestors:u.getAncestors().map(e=>e.headline)}}return{mode:e.mode,targetData:c,preloadConfig:e.preloadConfig,isNewTopicOnTop:e.isNewTopicOnTop,headline:null===(t=e.headlineInput)||void 0===t?void 0:t.getValue(),comment:e.commentInput.getValue(),summary:e.summaryInput.getValue(),minor:null===(n=e.minorCheckbox)||void 0===n?void 0:n.isSelected(),watch:null===(i=e.watchCheckbox)||void 0===i?void 0:i.isSelected(),watchSection:null===(o=e.watchSectionCheckbox)||void 0===o?void 0:o.isSelected(),omitSignature:null===(s=e.omitSignatureCheckbox)||void 0===s?void 0:s.isSelected(),delete:null===(r=e.deleteCheckbox)||void 0===r?void 0:r.isSelected(),originalHeadline:e.originalHeadline,originalComment:e.originalComment,isSummaryAltered:e.isSummaryAltered,lastFocused:e.lastFocused}}),t=Date.now(),n=e.length?{commentForms:e,saveUnixTime:t}:{},i=Object(y.r)("commentForms");i[mw.config.get("wgPageName")]=n;Object(y.R)("commentForms",i);N=Date.now()},n=Date.now()-(N||0);clearTimeout(O);if(e)t();else O=setTimeout(t,Math.max(0,5e3-n))}function ne(e){if(cd.a.state.isFirstRun||e){cd.a.commentForms=[];const e=function(e){const t=Object.assign({},e),n=60*cd.a.g.SECONDS_IN_DAY*1e3;Object.keys(t).forEach(e=>{var i;if(null===(i=t[e].commentForms)||void 0===i||!i.length||t[e].saveUnixTime<Date.now()-n)delete t[e]});return t}(Object(y.r)("commentForms"));Object(y.R)("commentForms",e);const t=e[mw.config.get("wgPageName")]||{};if(t.commentForms)!function(e){let t=!1;const n=[];e.commentForms.forEach(e=>{var i,o;const r=s.a.modeToProperty(e.mode);if(null!==(i=e.targetData)&&void 0!==i&&i.headline){const i=l.a.search({headline:e.targetData.headline,oldestCommentAnchor:e.targetData.oldestCommentAnchor,id:e.targetData.id,anchor:e.targetData.anchor,ancestors:e.targetData.ancestors});if(null!=i&&i.isActionable&&!i[r+"Form"])try{i[r](e);t=!0}catch(t){console.warn(t);n.push(e)}else n.push(e)}else if(null!==(o=e.targetData)&&void 0!==o&&o.anchor){const i=a.a.getByAnchor(e.targetData.anchor);if(null!=i&&i.isActionable&&!i[r+"Form"])try{i[r](e);t=!0}catch(t){console.warn(t);n.push(e)}else n.push(e)}else if("addSection"===e.mode)if(!cd.a.g.addSectionForm){cd.a.g.addSectionForm=new s.a({target:cd.a.page,mode:e.mode,dataToRestore:e,preloadConfig:e.preloadConfig,isNewTopicOnTop:e.isNewTopicOnTop});t=!0}else n.push(e)});if(t){mw.notification.notify(cd.a.s("restore-restored-text"),{title:cd.a.s("restore-restored-title")}).$notification.on("click",()=>{f.a.goToNextCommentForm(!0)})}if(n.length)Object(E.b)(n)}(t)}else{const e=[],t=t=>{var n;e.push({headline:null===(n=t.headlineInput)||void 0===n?void 0:n.getValue(),comment:t.commentInput.getValue(),summary:t.summaryInput.getValue()});cd.a.commentForms.splice(cd.a.commentForms.indexOf(t),1)};cd.a.commentForms.forEach(e=>{e.checkCodeRequest=null;const n=e.target;if(n instanceof a.a)if(n.anchor){const i=a.a.getByAnchor(n.anchor);if(null!=i&&i.isActionable)try{e.setTargets(i);i[s.a.modeToProperty(e.mode)](e);e.addToPage()}catch(n){console.warn(n);t(e)}else t(e)}else t(e);else if(n instanceof l.a){var i;const o=l.a.search({headline:n.headline,oldestCommentAnchor:null===(i=n.oldestComment)||void 0===i?void 0:i.anchor,id:n.id,anchor:n.anchor,ancestors:n.getAncestors().map(e=>e.headline)});if(null!=o&&o.isActionable)try{e.setTargets(o);o[s.a.modeToProperty(e.mode)](e);e.addToPage()}catch(n){console.warn(n);t(e)}else t(e)}else if("addSection"===e.mode){e.addToPage();cd.a.g.addSectionForm=e}});if(e.length)Object(E.b)(e)}te();f.a.updateCommentFormButton()}function ie(){return oe.apply(this,arguments)}function oe(){return(oe=o()((function*(){if(null===cd.a.settings.reformatComments){const e=yield Object(T.b)({reuse:!0});if([null,void 0].includes(e.reformatComments)){const t=[{label:cd.a.s("rc-suggestion-yes"),action:"accept",flags:"primary"},{label:cd.a.s("rc-suggestion-no"),action:"reject"}],n=$("<div>"),i=$("<img>").attr("width",626).attr("height",67).attr("src","//upload.wikimedia.org/wikipedia/commons/0/08/Convenient_Discussions_comment_-_old_format.png").addClass("cd-rc-img"),o=$("<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-rc-img cd-rc-arrow"),a=$("<img>").attr("width",626).attr("height",118).attr("src","//upload.wikimedia.org/wikipedia/commons/d/da/Convenient_Discussions_comment_-_new_format.png").addClass("cd-rc-img"),s=$("<div>").addClass("cd-rc-text").html(cd.a.sParse("rc-suggestion"));n.append(i,o,a,s);const r=yield Object(w.h)(n,{size:"large",actions:t});let c;if("accept"===r){cd.a.settings.reformatComments=e.reformatComments=!0;c=Object(T.e)(e)}else if("reject"===r){cd.a.settings.reformatComments=e.reformatComments=!1;c=Object(T.e)(e)}if(c)try{yield c;return e.reformatComments}catch(e){mw.notify(cd.a.s("error-settings-save"),{type:"error"});console.warn(e)}}}return!1}))).apply(this,arguments)}function ae(){return se.apply(this,arguments)}function se(){return(se=o()((function*(){if("undefined"!=typeof Notification){if("unknown"===cd.a.settings.desktopNotifications&&"denied"!==Notification.permission){const e=Object(T.b)({reuse:!0});if(["unknown",void 0].includes(e.reformatComments)){const t=[{label:cd.a.s("dn-confirm-yes"),action:"accept",flags:"primary"},{label:cd.a.s("dn-confirm-no"),action:"reject"}],n=yield Object(w.h)(cd.a.s("dn-confirm"),{size:"medium",actions:t});let i;if("accept"===n){if("default"===Notification.permission){OO.ui.alert(cd.a.s("dn-grantpermission"));Notification.requestPermission(t=>{if("granted"===t){cd.a.settings.desktopNotifications=e.desktopNotifications="all";i=Object(T.e)(e)}else if("denied"===t){cd.a.settings.desktopNotifications=e.desktopNotifications="none";i=Object(T.e)(e)}})}else if("granted"===Notification.permission){cd.a.settings.desktopNotifications=e.desktopNotifications="all";i=Object(T.e)(e)}}else if("reject"===n){cd.a.settings.desktopNotifications=e.desktopNotifications="none";i=Object(T.e)(e)}if(i)try{yield i}catch(e){mw.notify(cd.a.s("error-settings-save"),{type:"error"});console.warn(e)}}}if(!["unknown","none"].includes(cd.a.settings.desktopNotifications)&&"default"===Notification.permission){yield OO.ui.alert(cd.a.s("dn-grantpermission-again"),{title:cd.a.s("script-name")});Notification.requestPermission()}}}))).apply(this,arguments)}function re(e,t,n){return cd.a.comments.filter(e=>e.author.name===n&&e.date&&e.date<t&&e.date.getTime()>t.getTime()-60*cd.a.g.MILLISECONDS_IN_MINUTE*24).sort((e,t)=>e.date.getTime()-t.date.getTime()).slice(-1)[0]}function ce(e){const t=cd.a.sections.map(t=>({section:t,score:Object(y.e)(e,t.headline)})).filter(e=>e.score>.66).sort((e,t)=>t.score-e.score)[0];return t?t.section:null}function le(e,t,n){return ue.apply(this,arguments)}function ue(){return(ue=o()((function*(e,t,n){let i,o,a="",s="";if(t){i=cd.a.sParse("deadanchor-comment-lead");const e=re(0,t,n);if(e){a=(" "+cd.a.sParse("deadanchor-comment-previous","#"+e.anchor)).replace(cd.a.g.ARTICLE_PATH_REGEXP,"$1");i+=a}}else{o=Object(y.V)(e);i=cd.a.sParse("deadanchor-section-lead",o);const t=ce(o);if(t){s=(" "+cd.a.sParse("deadanchor-section-similar","#"+t.anchor,t.headline)).replace(cd.a.g.ARTICLE_PATH_REGEXP,"$1");if(o.includes("{{"))i+=s}}if(cd.a.page.canHaveArchives()){i+=" ";let n;if(t)i+=cd.a.sParse("deadanchor-comment-finding");else{i+=cd.a.sParse("deadanchor-section-finding");try{n=decodeURIComponent(o.replace(/\.([0-9A-F]{2})/g,"%$1"))}catch(e){n=o}}const c=t?Object(C.d)(t,!1,cd.a.g.CONTENT_TIMEZONE):o.replace(/"/g,"");let l=`"${c}"`;if(o&&o!==n){const e=n.replace(/"/g,"");l+=` OR "${e}"`}if(t)for(let e=1;e<=3;e++){const n=new Date(t.getTime()-cd.a.g.MILLISECONDS_IN_MINUTE*e),i=Object(C.d)(n,!1,cd.a.g.CONTENT_TIMEZONE);l+=` OR "${i}"`}const u=cd.a.page.getArchivePrefix();l+=" prefix:"+u;cd.a.g.mwApi.get({action:"query",list:"search",srsearch:l,srprop:o?"sectiontitle":void 0,srsort:"create_timestamp_desc",srlimit:"20"}).then(i=>{var u;const d=null==i?void 0:null===(u=i.query)||void 0===u?void 0:u.search;let h=mw.util.getUrl("Special:Search",{search:l,sort:"create_timestamp_desc",cdcomment:t&&e});h=cd.a.g.SERVER+h;if(0===d.length){let e;if(t)e=cd.a.sParse("deadanchor-comment-lead")+" "+cd.a.sParse("deadanchor-comment-notfound",h)+a;else{let t="";if(!s||!o.includes("{{"))t=" "+cd.a.sParse("deadanchor-section-notfound",h);e=cd.a.sParse("deadanchor-section-lead",o)+t+s}r.setLabel(Object(y.Y)(e))}else{let i,s,l=o;if(o){for(const[,e]of Object.entries(d))if(e.sectiontitle&&[o,n].includes(e.sectiontitle)){i=e.title;l=Object(y.V)(e.sectiontitle);break}}else{const e=[];for(const[,t]of Object.entries(d)){const n=Object(S.k)(t.snippet);if(n&&n.includes(c))e.push(t.title)}if(1===e.length)i=e[0]}if(i){const n=i+"#"+(t?e:l);s=t?cd.a.sParse("deadanchor-comment-exactmatch",n,h)+a:cd.a.sParse("deadanchor-section-exactmatch",l,n,h)}else s=t?cd.a.sParse("deadanchor-comment-inexactmatch",h)+a:cd.a.sParse("deadanchor-section-inexactmatch",l,h);r.setLabel(Object(y.Y)(s))}})}const r=new OO.ui.MessageWidget({type:"warning",inline:!0,label:Object(y.Y)(i),classes:["cd-message-notFound"]});cd.a.g.$root.prepend(r.$element)}))).apply(this,arguments)}function de(){const e=cd.a.sParse("discussiontools-incompatible"),{$wrapper:t,buttons:[n]}=Object(y.Y)(e,{callbacks:{"cd-notification-disabledt":(i=o()((function*(){n.setPending(!0);try{yield cd.a.g.mwApi.saveOption("discussiontools-betaenable",0).catch(y.w)}catch(e){mw.notify(Object(y.Y)(cd.a.sParse("error-settings-save")));return}finally{n.setPending(!1)}a.$notification.hide();const e=Object(y.Y)(cd.a.sParse("discussiontools-disabled"),{callbacks:{"cd-notification-refresh":()=>{location.reload()}}}).$wrapper;mw.notify(e)})),function(){return i.apply(this,arguments)})}});var i;const a=mw.notification.notify(t,{type:"warn",autoHide:!1})}},function(e,t,n){"use strict";n.d(t,"a",(function(){return $}));n.d(t,"n",(function(){return D}));n.d(t,"g",(function(){return H}));n.d(t,"h",(function(){return U}));n.d(t,"i",(function(){return Y}));n.d(t,"l",(function(){return W}));n.d(t,"b",(function(){return G}));n.d(t,"d",(function(){return V}));n.d(t,"c",(function(){return K}));n.d(t,"e",(function(){return X}));n.d(t,"f",(function(){return Z}));n.d(t,"m",(function(){return J}));n.d(t,"o",(function(){return Q}));n.d(t,"j",(function(){return ee}));n.d(t,"k",(function(){return te}));var i=n(24),o=n.n(i),a=n(41),s=n.n(a),r=n(42),c=n.n(r);function l(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 u(e,t){if(t.length<e)throw new TypeError(e+" argument"+(e>1?"s":"")+" required, but only "+t.length+" present")}function d(e){u(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://git.io/fjule");console.warn((new Error).stack)}return new Date(NaN)}}function h(e,t){u(2,arguments);var n=d(e),i=d(t),o=n.getTime()-i.getTime();if(o<0)return-1;else if(o>0)return 1;else return o}function m(e){return function(e,t){if(null==e)throw new TypeError("assign requires that input parameter not be null or undefined");t=t||{};for(var n in t)if(t.hasOwnProperty(n))e[n]=t[n];return e}({},e)}var f={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"}};function g(e){return function(t){var n=t||{},i=n.width?String(n.width):e.defaultWidth;return e.formats[i]||e.formats[e.defaultWidth]}}var p={date:g({formats:{full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},defaultWidth:"full"}),time:g({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:g({formats:{full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},defaultWidth:"full"})},b={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"};function v(e){return function(t,n){var i,o=n||{};if("formatting"===(o.context?String(o.context):"standalone")&&e.formattingValues){var a=e.defaultFormattingWidth||e.defaultWidth,s=o.width?String(o.width):a;i=e.formattingValues[s]||e.formattingValues[a]}else{var r=e.defaultWidth,c=o.width?String(o.width):e.defaultWidth;i=e.values[c]||e.values[r]}return i[e.argumentCallback?e.argumentCallback(t):t]}}function y(e){return function(t,n){var i=String(t),o=n||{},a=o.width,s=a&&e.matchPatterns[a]||e.matchPatterns[e.defaultMatchWidth],r=i.match(s);if(!r)return null;var c,l=r[0],u=a&&e.parsePatterns[a]||e.parsePatterns[e.defaultParseWidth];if("[object Array]"===Object.prototype.toString.call(u))c=function(e,t){for(var n=0;n<e.length;n++)if(t(e[n]))return n}(u,(function(e){return e.test(l)}));else c=function(e,t){for(var n in e)if(e.hasOwnProperty(n)&&t(e[n]))return n}(u,(function(e){return e.test(l)}));c=e.valueCallback?e.valueCallback(c):c;return{value:c=o.valueCallback?o.valueCallback(c):c,rest:i.slice(l.length)}}}var w,E={code:"en-US",formatDistance:function(e,t,n){n=n||{};var i;if("string"==typeof f[e])i=f[e];else if(1===t)i=f[e].one;else i=f[e].other.replace("{{count}}",t);if(n.addSuffix)if(n.comparison>0)return"in "+i;else return i+" ago";return i},formatLong:p,formatRelative:function(e,t,n,i){return b[e]},localize:{ordinalNumber:function(e,t){var n=Number(e),i=n%100;if(i>20||i<10)switch(i%10){case 1:return n+"st";case 2:return n+"nd";case 3:return n+"rd"}return n+"th"},era:v({values:{narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},defaultWidth:"wide"}),quarter:v({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 Number(e)-1}}),month:v({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:v({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:v({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,t){var n=String(e),i=t||{},o=n.match(w.matchPattern);if(!o)return null;var a=o[0],s=n.match(w.parsePattern);if(!s)return null;var r=w.valueCallback?w.valueCallback(s[0]):s[0];return{value:r=i.valueCallback?i.valueCallback(r):r,rest:n.slice(a.length)}}),era:y({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:y({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:y({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:y({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:y({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 C(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};u(2,arguments);var i=n.locale||E;if(!i.formatDistance)throw new RangeError("locale must contain localize.formatDistance property");var o=h(e,t);if(isNaN(o))throw new RangeError("Invalid time value");var a,s,r=m(n);r.addSuffix=Boolean(n.addSuffix);r.comparison=o;if(o>0){a=d(t);s=d(e)}else{a=d(e);s=d(t)}var c,f=null==n.roundingMethod?"round":String(n.roundingMethod);if("floor"===f)c=Math.floor;else if("ceil"===f)c=Math.ceil;else if("round"===f)c=Math.round;else throw new RangeError("roundingMethod must be 'floor', 'ceil' or 'round'");var g,p=s.getTime()-a.getTime(),b=p/6e4,v=l(s)-l(a),y=(p-v)/6e4;if(null==n.unit)if(b<1)g="second";else if(b<60)g="minute";else if(b<1440)g="hour";else if(y<43200)g="day";else if(y<525600)g="month";else g="year";else g=String(n.unit);if("second"===g){var w=c(p/1e3);return i.formatDistance("xSeconds",w,r)}else if("minute"===g){var C=c(b);return i.formatDistance("xMinutes",C,r)}else if("hour"===g){var T=c(b/60);return i.formatDistance("xHours",T,r)}else if("day"===g){var x=c(y/1440);return i.formatDistance("xDays",x,r)}else if("month"===g){var k=c(y/43200);return 12===k&&"month"!==n.unit?i.formatDistance("xYears",1,r):i.formatDistance("xMonths",k,r)}else if("year"===g){var S=c(y/525600);return i.formatDistance("xYears",S,r)}throw new RangeError("unit must be 'second', 'minute', 'hour', 'day', 'month' or 'year'")}function T(e,t){var n=function(e){if(!k[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")),n="06/25/2014, 00:00:00"===t||"\u200e06\u200e/\u200e25\u200e/\u200e2014\u200e \u200e00\u200e:\u200e00\u200e:\u200e00"===t;k[e]=n?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 k[e]}(t);return n.formatToParts?function(e,t){for(var n=e.formatToParts(t),i=[],o=0;o<n.length;o++){var a=x[n[o].type];if(a>=0)i[a]=parseInt(n[o].value,10)}return i}(n,e):function(e,t){var n=e.format(t).replace(/\u200E/g,""),i=/(\d+)\/(\d+)\/(\d+),? (\d+):(\d+):(\d+)/.exec(n);return[i[3],i[1],i[2],i[4],i[5],i[6]]}(n,e)}var x={year:0,month:1,day:2,hour:3,minute:4,second:5};var k={};var S={timezone:/([Z+-].*)$/,timezoneZ:/^(Z)$/,timezoneHH:/^([+-])(\d{2})$/,timezoneHHMM:/^([+-])(\d{2}):?(\d{2})$/,timezoneIANA:/(UTC|(?:[a-zA-Z]+\/[a-zA-Z_-]+(?:\/[a-zA-Z_]+)?))$/};function O(e,t,n){var i,o,a;if(i=S.timezoneZ.exec(e))return 0;if(i=S.timezoneHH.exec(e)){if(!_(a=parseInt(i[2],10)))return NaN;o=36e5*a;return"+"===i[1]?-o:o}if(i=S.timezoneHHMM.exec(e)){a=parseInt(i[2],10);var s=parseInt(i[3],10);if(!_(a,s))return NaN;o=36e5*a+6e4*s;return"+"===i[1]?-o:o}if(i=S.timezoneIANA.exec(e)){t=new Date(t||Date.now());var r=N(n?t:function(e){return new Date(Date.UTC(e.getFullYear(),e.getMonth(),e.getDate(),e.getHours(),e.getMinutes(),e.getSeconds(),e.getMilliseconds()))}(t),e);return-(n?r:function(e,t,n){var i=e.getTime()-t,o=N(new Date(i),n);if(t===o)return t;i-=o-t;var a=N(new Date(i),n);if(o===a)return o;return Math.max(o,a)}(t,r,e))}return 0}function N(e,t){var n=T(e,t),i=Date.UTC(n[0],n[1]-1,n[2],n[3]%24,n[4],n[5]),o=e.getTime(),a=o%1e3;return i-(o-=a>=0?a:1e3+a)}function _(e,t){if(null!=t&&(t<0||t>59))return!1;else return!0}function A(e,t){return-O(e,t)}var cd=n(0),P=n(1);let I,L,M,j;const $={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"]},D=[{interval:1,start:0,step:1},{interval:60,start:1,step:1},{interval:1440,start:60,step:60},{interval:44640,start:1440,step:1440}];let R=[];function H(){var e;if(o.a.utc)return;const t=null===(e=cd.a.i18n[cd.a.g.USER_LANGUAGE])||void 0===e?void 0:e.dayjsLocale;if(t)o.a.locale(t);o.a.extend(c.a);o.a.extend(s.a);cd.a.g.dayjs=o.a}function B(e){const t="content"===e,n=t?cd.a.g.CONTENT_DATE_FORMAT:cd.a.g.UI_DATE_FORMAT,i=t?cd.a.g.CONTENT_DIGITS:cd.a.g.UI_DIGITS,o=i?`[${i}]`:"\\d";let a="\\b";for(let e=0;e<n.length;e++){let i=!1,s=n[e];if("x"===s&&e<n.length-1||"xk"===s&&e<n.length-1)s+=n[++e];switch(s){case"xx":a+="x";break;case"xg":case"D":case"l":case"F":case"M":{const e=t?Object(P.o)($[s]):$[s].map(mw.msg);a+="("+e.map(mw.util.escapeRegExp).join("|")+")";break}case"d":case"H":case"i":i="2";break;case"j":case"n":case"G":i="1,2";break;case"Y":case"xkY":i="4";break;case"\\":if(e<n.length-1)a+=n[++e];else a+="\\";break;case'"':if(e<n.length-1){const t=n.indexOf('"',e+1);if(-1===t)a+='"';else{a+=n.substr(e+1,t-e-1);e=t}}else a+='"';break;default:a+=mw.util.escapeRegExp(n[e])}if(!1!==i)a+="("+(o+"{"+i+"}")+")"}return a}function F(e){const t=[];for(let n=0;n<e.length;n++){let i=e[n];if("x"===i&&n<e.length-1||"xk"===i&&n<e.length-1)i+=e[++n];switch(i){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(i);break;case"\\":if(n<e.length-1)++n;break;case'"':if(n<e.length-1){const t=e.indexOf('"',n+1);if(-1!==t)n=t}}}return t}function U(e){var t,n,i;if("content"===e){const e=B("content"),t="\\((?:"+mw.util.escapeRegExp(mw.message("(content)timezone-utc").parse())+"|[A-Z]{1,5}|[+-]\\d{0,4})\\)";cd.a.g.CONTENT_TIMESTAMP_REGEXP=new RegExp(e+" +"+t);cd.a.g.CONTENT_TIMESTAMP_NO_TZ_REGEXP=new RegExp(e);cd.a.g.CONTENT_TIMESTAMP_MATCHING_GROUPS=F(cd.a.g.CONTENT_DATE_FORMAT);cd.a.g.TIMEZONE_REGEXP=new RegExp(t,"g")}else{cd.a.g.UI_TIMESTAMP_REGEXP=new RegExp(B("user"));cd.a.g.UI_TIMESTAMP_MATCHING_GROUPS=F(cd.a.g.UI_DATE_FORMAT)}const o=null===(t=mw.user.options.get("timecorrection"))||void 0===t?void 0:t.split("|");cd.a.g.UI_TIMEZONE=null!==(n=o&&o[2]||Number(o[1]))&&void 0!==n?n:null;if(0===cd.a.g.UI_TIMEZONE)cd.a.g.UI_TIMEZONE="UTC";cd.a.g.UI_TIMEZONE_OFFSET=null!==(i=Number(o[1]))&&void 0!==i?i:null;j=cd.a.g.UI_TIMEZONE===Intl.DateTimeFormat().resolvedOptions().timeZone;if("content"===e)cd.a.g.ARE_TIMESTAMPS_ALTERED=cd.a.settings.useUiTime&&cd.a.g.CONTENT_TIMEZONE!==cd.a.g.UI_TIMEZONE||"default"!==cd.a.settings.timestampFormat||mw.config.get("wgContentLanguage")!==cd.a.g.USER_LANGUAGE||cd.a.settings.hideTimezone}function Y(e){return/^\d{12}_.+$/.test(e)}function W(e,t){e=Object(P.I)(e,!0);let n;if(void 0===t){I=I||new RegExp(`^([^]*)(${cd.a.g.CONTENT_TIMESTAMP_REGEXP.source})(?!["\xbb])`);n=I}else{L=L||new RegExp(`^([^]*)(${cd.a.g.UI_TIMESTAMP_REGEXP.source})`);n=L}const i=e.match(n);if(!i)return null;return{date:function(e,t){let n=void 0===t;if(n)t=cd.a.g.CONTENT_TIMEZONE;const i=n?cd.a.g.CONTENT_DIGITS:cd.a.g.UI_DIGITS,o=n?cd.a.g.CONTENT_TIMESTAMP_MATCHING_GROUPS:cd.a.g.UI_TIMESTAMP_MATCHING_GROUPS,a=e=>{if(!i)return e;const t=new RegExp("["+i+"]","g");return e.replace(t,e=>i.indexOf(e))};let s=0,r=0,c=0,l=0,u=0;for(let t=0;t<o.length;t++){const i=o[t],d=e[t+3];switch(i){case"xg":case"F":case"M":r=(n?Object(P.o)($[i]):$[i].map(mw.msg)).indexOf(d);break;case"d":case"j":c=Number(a(d));break;case"D":case"l":break;case"n":r=Number(a(d))-1;break;case"Y":s=Number(a(d));break;case"xkY":s=Number(a(d))-543;break;case"G":case"H":l=Number(a(d));break;case"i":u=Number(a(d));break;default:throw"Not implemented"}}const d=Date.UTC(s,r,c,l,u);let h;if("number"==typeof t)h=t*cd.a.g.MILLISECONDS_IN_MINUTE;else h="UTC"===t?0:A(t,d);return new Date(d-h)}(i,t),match:i}}function q(e){let t="";if(!M)M=cd.a.mws("timezone-utc");t=" ("+M;if(0!==(e/=60))t+=(e>0?"+":"-")+Math.abs(e);t+=")";return t}function G(e,t=!1){let n;if("default"===cd.a.settings.timestampFormat)n=V(e,t);else if("improved"===cd.a.settings.timestampFormat)n=K(e,t);else if("relative"===cd.a.settings.timestampFormat)n=X(e);return n}function z(e,t){return("0000"+e).slice(-t)}function V(e,t=!1,n){let i,a,s,r,c,l,u;if(cd.a.settings.useUiTime&&!["UTC",0].includes(cd.a.g.UI_TIMEZONE)&&!n){if(j)i=-e.getTimezoneOffset();else i="number"==typeof cd.a.g.UI_TIMEZONE?cd.a.g.UI_TIMEZONE:A(cd.a.g.UI_TIMEZONE,e.getTime())/cd.a.g.MILLISECONDS_IN_MINUTE;e=new Date(e.getTime()+i*cd.a.g.MILLISECONDS_IN_MINUTE)}else if(!n||"UTC"===n)i=0;else{const t=o()(e).tz(n);i=t.utcOffset();a=t.year();s=t.month();r=t.date();c=t.hour();l=t.minute();u=t.day()}if(void 0===a){a=e.getUTCFullYear();s=e.getUTCMonth();r=e.getUTCDate();c=e.getUTCHours();l=e.getUTCMinutes();u=e.getUTCDay()}let d="";const h=cd.a.g.UI_DATE_FORMAT;for(let e=0;e<h.length;e++){let t=h[e];if("x"===t&&e<h.length-1||"xk"===t&&e<h.length-1)t+=h[++e];switch(t){case"xx":d+="x";break;case"xg":case"F":case"M":d+=$[t].map(mw.msg)[s];break;case"d":d+=z(r,2);break;case"D":case"l":d+=$[t].map(mw.msg)[u];break;case"j":d+=r;break;case"n":d+=s+1;break;case"Y":d+=a;break;case"xkY":d+=a+543;break;case"G":d+=c;break;case"H":d+=z(c,2);break;case"i":d+=z(l,2);break;case"\\":if(e<h.length-1)d+=h[++e];else d+="\\";break;case'"':if(e<h.length-1){const t=h.indexOf('"',e+1);if(-1===t)d+='"';else{d+=h.substr(e+1,t-e-1);e=t}}else d+='"';break;default:d+=h[e]}}if(t)d+=q(i);return d}function K(e,t=!1){let n,i=new Date,a=o()(e);if(cd.a.settings.useUiTime&&!["UTC",0].includes(cd.a.g.UI_TIMEZONE)){if(j)n=-e.getTimezoneOffset();else{n="number"==typeof cd.a.g.UI_TIMEZONE?cd.a.g.UI_TIMEZONE:A(cd.a.g.UI_TIMEZONE,i.getTime())/cd.a.g.MILLISECONDS_IN_MINUTE;a=a.utcOffset(n)}i=new Date(i.getTime()+n*cd.a.g.MILLISECONDS_IN_MINUTE)}else{n=0;a=a.utc()}const s=a.date(),r=a.month(),c=a.year(),l=i.getUTCDate(),u=i.getUTCMonth(),d=i.getUTCFullYear(),h=new Date(i.getTime());h.setDate(h.getDate()-1);const m=h.getUTCDate(),f=h.getUTCMonth(),g=h.getUTCFullYear();let p;if(s===l&&r===u&&c===d)p=a.format(cd.a.s("comment-timestamp-today"));else if(s===m&&r===f&&c===g)p=a.format(cd.a.s("comment-timestamp-yesterday"));else if(c===d)p=a.format(cd.a.s("comment-timestamp-currentyear"));else p=a.format(cd.a.s("comment-timestamp-other"));if(t)p+=q(n);return p}function X(e){const t=Date.now(),n=e.getTime();if(n<t&&n>t-cd.a.g.MILLISECONDS_IN_MINUTE)return cd.a.s("comment-timestamp-lessthanminute");else return function(e,t){u(1,arguments);return C(e,Date.now(),t)}(e,{addSuffix:!0,roundingMethod:"floor",locale:cd.a.i18n[cd.a.g.USER_LANGUAGE].dateFnsLocale})}function Z(e,t,n=!1){let i=e.getUTCFullYear(),o=e.getUTCMonth(),a=e.getUTCDate(),s=e.getUTCHours(),r=e.getUTCMinutes(),c=z(i,4)+z(o+1,2)+z(a,2)+z(s,2)+z(r,2)+"_"+Object(P.T)(t);if(n&&R.includes(c)){let e=2;const t=c;do{c=`${t}_${e}`;e++}while(R.includes(c))}return c}function J(e){if(e)R.push(e)}function Q(){R=[]}function ee(e){const t=e.match(/^(\d{4})(\d{2})(\d{2})(\d{2})(\d{2})_(.+)$/);if(!t)return null;const n=Number(t[1]),i=Number(t[2])-1,o=Number(t[3]),a=Number(t[4]),s=Number(t[5]),r=Object(P.V)(t[6]);return{date:new Date(Date.UTC(n,i,o,a,s)),author:r}}function te(e){if(!e.startsWith("c-"))return null;let[,t,n,i]=e.match(/^c-(.+?)-(\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}.\d{3}Z)(?:-(.+))?$/)||[];if(!t)return null;t=Object(P.V)(t);const o=new Date(n);let a,s,r,c;if(i){[a,s]=i.match(/(.+)-(\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}.\d{3}Z)$/)||[];if(a){a=Object(P.V)(a);r=new Date(s)}else c=i}return{author:t,date:o,parentAuthor:a,parentDate:r,sectionAnchorBeginning:c}}},function(e,t,n){"use strict";n.d(t,"e",(function(){return c}));n.d(t,"h",(function(){return l}));n.d(t,"g",(function(){return d}));n.d(t,"a",(function(){return h}));n.d(t,"f",(function(){return f}));n.d(t,"b",(function(){return g}));n.d(t,"d",(function(){return p}));n.d(t,"c",(function(){return b}));n.d(t,"i",(function(){return v}));var i=n(2),o=n.n(i),a=n(3),s=n(0),r=n(17);function c(){if(!s.a.g.windowManager){s.a.g.windowManager=(new OO.ui.WindowManager).on("closing",function(){var e=o()((function*(e,t){yield t;s.a.g.windowManager.clearWindows()}));return function(t,n){return e.apply(this,arguments)}}());$(document.body).append(s.a.g.windowManager.$element)}}function l(e){return u.apply(this,arguments)}function u(){return(u=o()((function*(e,t={}){var n;const i={message:e,actions:[{action:"accept",label:OO.ui.deferMsg("ooui-dialog-message-accept"),flags:"primary"},{action:"reject",label:OO.ui.deferMsg("ooui-dialog-message-reject"),flags:"safe"}]},o=new OO.ui.MessageDialog;s.a.g.windowManager.addWindows([o]);const a=s.a.g.windowManager.openWindow(o,Object.assign({},i,t));return null===(n=yield a.closed)||void 0===n?void 0:n.action}))).apply(this,arguments)}function d(e){const t=e.actions.get({actions:"save"})[0];return t&&!t.isDisabled()}function h(e,t){return m.apply(this,arguments)}function m(){return(m=o()((function*(e,t){if(!d(e)||confirm(s.a.s(t+"-close-confirm"))){e.close({action:"close"});Object(r.f)("dialog")}}))).apply(this,arguments)}function f(e,t,n,i){const o=t instanceof a.a?new OO.ui.Error(s.a.s(n),{recoverable:i}):new OO.ui.Error(s.a.s("error-javascript"),{recoverable:!1});e.showErrors(o);console.warn(t);if(!i)e.$errors.find(".oo-ui-buttonElement-button").on("click",()=>{e.close()});e.actions.setAbilities({close:!0});s.a.g.windowManager.updateWindowSize(e);e.popPending()}function g({value:e,selected:t,disabled:n,label:i,help:o,tabIndex:a,title:s,classes:r}){const c=new OO.ui.CheckboxInputWidget({value:e,selected:t,disabled:n,tabIndex:a});return[new OO.ui.FieldLayout(c,{label:i,align:"inline",help:o,helpInline:!0,title:s,classes:r}),c]}function p({label:e,selected:t,help:n,options:i}){const o=i.map(e=>new OO.ui.RadioOptionWidget(e)),a=new OO.ui.RadioSelectWidget({items:o}),s=new OO.ui.FieldLayout(a,{label:e,align:"top",help:n,helpInline:!0});a.selectItemByData(t);return[s,a,...o]}function b({label:e,value:t,disabled:n=!1,help:i,copyCallback:o}){const a=new OO.ui.TextInputWidget({value:t,disabled:n}),r=new OO.ui.ButtonWidget({label:s.a.s("copy"),icon:"articles",disabled:n});r.on("click",()=>{o(a.getValue())});return new OO.ui.ActionFieldLayout(a,r,{align:"top",label:e,help:i,helpInline:Boolean(i)})}function v(e,t){e.parent=e.super=t;OO.initClass(t);e.static=Object.create(t.static);Object.keys(e).forEach(t=>{e.static[t]=e[t]})}},function(e,t,n){"use strict";var i=n(2),o=n.n(i),a=n(12),s=n(3),cd=n(0);class CommentButton_CommentButton extends a.a{constructor(e){if(e.element)e.buttonElement=e.element.firstChild;super(e);if(e.element)delete this.labelElement;this.element.classList.add("cd-comment-button");this.widgetConstructor=e.widgetConstructor}createWidget(){this.buttonWidget=this.widgetConstructor();const e=this.buttonWidget.$element.get(0);this.element.parentNode.replaceChild(e,this.element);this.element=e;this.buttonElement=e.firstChild;if(this.action)this.setAction(this.action)}setDisabled(e){e=Boolean(e);if(cd.a.settings.reformatComments)super.setDisabled(e);else{if(!this.buttonWidget)this.createWidget();this.buttonWidget.setDisabled(e)}return this}setPending(e){super.setPending(e);return this}setLabel(e){if(cd.a.settings.reformatComments)super.setLabel(e);else{if(!this.buttonWidget)this.createWidget();this.buttonWidget.setLabel(e)}return this}setTooltip(e){if(cd.a.settings.reformatComments)super.setTooltip(e);else{if(!this.buttonWidget)this.createWidget();this.buttonWidget.setTitle(e)}return this}setAction(e){super.setAction(e);this.action=e;return this}isDisabled(){var e;return cd.a.settings.reformatComments?super.isDisabled():Boolean(null===(e=this.buttonWidget)||void 0===e?void 0:e.isDisabled())}isPending(){var e;return cd.a.settings.reformatComments?super.isPending():Boolean(null===(e=this.buttonWidget)||void 0===e?void 0:e.isPending())}}var r=CommentButton_CommentButton,c=n(13),l=n(16),u=n(1);var d=class{constructor(e,t){this.parser=e;let n=this.parser.collectParts(t.element);n=this.parser.removeNestedParts(n);n=this.parser.encloseInlineParts(n,t.element);n=this.parser.filterParts(n,t.element);n.reverse();n=this.parser.replaceListsWithItems(n,t.element);n=this.parser.wrapNumberedList(n,t.element);this.id=cd.a.comments.length;this.date=t.date||null;this.timestamp=t.timestampText;this.authorName=t.authorName;this.signatureElement=t.element;this.timestampElement=t.timestampElement;this.authorLink=t.authorLink;this.authorTalkLink=t.authorTalkLink;this.isOwn=this.authorName===cd.a.g.USER_NAME;this.anchor=t.anchor;this.isUnsigned=t.isUnsigned;this.parts=n;this.elements=this.parts.map(e=>e.node);this.highlightables=this.elements.filter(e=>!/^(H[1-6]|STYLE|LINK)$/.test(e.tagName)&&!cd.a.g.UNHIGHLIGHTABLE_ELEMENT_CLASSES.some(t=>e.classList.contains(t))&&!/float: *(?:left|right)|display: *none/.test(e.getAttribute("style")));if(!this.highlightables.length)throw new s.a;this.wrapHighlightables();this.setLevels();this.followsHeading=!1;if(this.parts[0].isHeading&&0!==this.level){this.parts.shift();this.elements.shift()}if(this.parts[0].isHeading){this.isOpeningSection=!0;const e=this.parts[0].node.tagName.match(/^H([1-6])$/);this.openingSectionOfLevel=e&&Number(e[1])}else this.isOpeningSection=!1;this.addAttributes();this.section=null;this.isOutdented=!1}wrapHighlightables(){[this.highlightables[0],this.highlightables[this.highlightables.length-1]].filter(u.X).filter(e=>cd.a.g.BAD_HIGHLIGHTABLE_ELEMENTS.includes(e.tagName)||this.highlightables.length>1&&"LI"===e.tagName&&"OL"===e.parentNode.tagName||e.className||e.getAttribute("style")).forEach(e=>{const t=this.parser.context.document.createElement("div");t.className="cd-comment-replacedPart";e.parentNode.insertBefore(t,e);this.elements.splice(this.elements.indexOf(e),1,t);this.highlightables.splice(this.highlightables.indexOf(e),1,t);t.appendChild(e)})}addAttributes(){this.elements.forEach(e=>{e.classList.add("cd-comment-part");e.setAttribute("data-comment-id",String(this.id))});this.highlightables[0].classList.add("cd-comment-part-first");this.highlightables[this.highlightables.length-1].classList.add("cd-comment-part-last")}setLevels(){const e=this.highlightables.map(this.parser.getListsUpTree.bind(this.parser));this.level=Math.min(e[0].length,e[e.length-1].length);this.logicalLevel=this.level;if(this.level&&this.elements.length>2){const e=this.elements.map(this.parser.getListsUpTree.bind(this.parser)),t=[];e.forEach((e,n)=>{if(!e.length)t.push(n)});t.forEach(t=>{const n=e.slice(0,t).reverse().find(e=>e.length).slice(-1)[0];if(n){const e="DL"===n.tagName?"dd":"li",i=this.parser.context.document.createElement(e);i.appendChild(this.elements[t]);n.appendChild(i)}})}for(let t=0;t<this.level;t++)e.forEach(e=>{var n;null===(n=e[t])||void 0===n||n.classList.add("cd-commentLevel","cd-commentLevel-"+(t+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.id-1;e>=0;e--){const n=cd.a.comments[e];if(n.section===this.section&&n[t]<this[t]){this.cachedParent[t]=n;break}}}return this.cachedParent[t]}getChildren(e=!1,t=!1){if(this.id===cd.a.comments.length-1)return[];const n=[],i=t?"level":"logicalLevel";cd.a.comments.slice(this.id+1).some(t=>{if(t.section===this.section&&t[i]>this[i]){if(t[i]===this[i]+1||t.getParent()===this||e)n.push(t);return!1}else return!0});return n}static processOutdents(){if(cd.a.g.pageHasOutdents)Array.from(cd.a.g.rootElement.getElementsByClassName(cd.a.config.outdentClass)).reverse().forEach(e=>{const t=new l.b(e);for(;t.nextNode();){let n=Number(t.currentNode.getAttribute("data-comment-id"));if(0!==n){const t=cd.a.comments[n];Array.from(e.childNodes).forEach(e=>{var n,i;const o=null===(n=e.style)||void 0===n?void 0:n.width;if(o){const[,n,i]=o.match(/^(\d+)(.+)$/);if(n){const o=1.25*n+i;e.style.width=`calc(${o} + ${t.level}px)`}}else if((null===(i=e.children)||void 0===i||!i.length)&&e.textContent.includes("\u2500"))e.textContent=e.textContent.replace(/(\u2500+)/,(e,t)=>"\u2500".repeat(Math.round(1.25*t.length)))});let i;for(let e=n-1;e>=0;e--){const n=cd.a.comments[e];if(n.section!==t.section)break;if(t.date>=n.date){i=n;break}}if(!i)break;if(i.id!==n-1){t.cachedParent=t.cachedParent||{};t.cachedParent.logicalLevel=i}const o=t.level;t.isOutdented=!0;cd.a.comments.slice(n).some(e=>{if(e.section!==i.section||e.logicalLevel<o||e.id===t.id+1&&t.level<2&&e.level===t.level||e.date<t.date)return!0;e.logicalLevel=i.level+1+(e.logicalLevel-o);return!1});break}}})}},h=n(11),m=n(5),f=n(9),g=n(4);function p(e,t,n){if(n.includes(e.id))t.push(e);e.children.forEach(e=>{p(e,t,n)})}function b(e,t,n,i){if(!e.length)return;let o;if(t instanceof O){o=[];e.forEach(e=>{p(e,o,i)})}else o=e;const a=o.map(e=>e.author).filter(u.X),s=a.map(e=>e.name).join(cd.a.mws("comma-separator")),r=Object(u.n)(a),c="thread"===n?"thread-newcomments":"section-newcomments",l=new OO.ui.ButtonWidget({label:cd.a.s(c,o.length,a.length,s,r),framed:!1,classes:["cd-button-ooui","cd-thread-button"]});l.on("click",()=>{const e=o[0].anchor;Object(g.k)({commentAnchor:e})});if(t instanceof O){var d;const{$wrappingItem:e}=t.addSublevelItem("newCommentsNote","bottom");e.addClass("cd-thread-button-container cd-thread-newCommentsNote").append(l.$element);if(null!==(d=t.thread)&&void 0!==d&&d.isCollapsed){t.thread.expand();t.thread.collapse()}}else if("thread"===n&&t.$replyWrapper){const e="DL"===t.$replyContainer.prop("tagName")?"dd":"li";$(`<${e}>`).addClass("cd-thread-button-container cd-thread-newCommentsNote").append(l.$element).insertBefore(t.$replyWrapper)}else{let e,i;if(t.$addSubsectionButtonContainer&&!t.getChildren().length)e=t.$addSubsectionButtonContainer;else if(t.$replyContainer)e=t.$replyContainer;else e=$(t.lastElementInFirstChunk);l.$element.removeClass("cd-thread-button").addClass("cd-section-button");if("section"===n)i=$("<div>").append(l.$element);else{const e=$("<dd>").append(l.$element);i=$("<dl>").append(e)}i.addClass("cd-section-button-container cd-thread-newCommentsNote").insertAfter(e)}}var v={underlays:[],layersContainers:[],configureAndAddLayers(e){let t;if(e.length)t=cd.a.g.floatingElements.map(u.q);e.forEach(e=>{e.configureLayers({add:!1,update:!1,floatingRects:t})});e.forEach(e=>{e.addLayers()})},redrawLayersIfNecessary(e=!1,t=!1,n){if(Object(g.i)()||document.hidden&&!t)return;this.layersContainers.forEach(e=>{e.cdCouldHaveMoved=!0});const i=[],o=cd.a.g.$root.get(0).getBoundingClientRect().bottom+window.scrollY;let a=0;cd.a.comments.slice().reverse().some(s=>{const r=!s.isCollapsed&&(s.isNew||s.isOwn||s.isTarget||s.isHovered||s.isDeleted||s.isLineGapped),c=s.offset&&s.offset.bottom>o;if(s.underlay&&!r&&(e||c))s.removeLayers();else if(r&&!s.editForm){n=n||cd.a.g.floatingElements.map(u.q);const e=s.configureLayers({add:!0,update:!1,floatingRects:n});if(e||t){a=0;i.push(s)}else if(null===e)s.removeLayers();else if(!s.getLayersContainer().parentNode.parentNode.closest(".cd-commentLayersContainer-parent")){a++;if(3===a)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=O.findInViewport();if(!e)return;const t=e=>{const t=e.isInViewport();if(t){e.registerSeen();return!1}else if(!1===t)return!0};cd.a.comments.slice(0,e.id).reverse().some(t);cd.a.comments.slice(e.id).some(t);h.a.updateFirstUnseenButton()},groupBySection(e){const t=new Map;e.forEach(e=>{let n;if(e instanceof O)n=e.section;else if(e.section)n=e.section.match||e.section.anchor;else n=null;if(!t.get(n))t.set(n,[]);t.get(n).push(e)});return t},findInViewport(e){cd.a.comments.forEach(e=>{delete e.roughOffset});const t=window.scrollY+cd.a.g.BODY_SCROLL_PADDING_TOP,n=t+window.innerHeight,i=e=>{e.getOffset({set:!0});return Boolean(e.roughOffset)},o=(e,t=0)=>Object(u.L)(cd.a.comments,t,"backward"===e).find(i)||null,a=o("forward"),s=o("backward",cd.a.comments.length-1);if(!a)return null;let r,c={top:a,bottom:s},l=c.top;const d=(e,t,n=!1)=>{if(e){const i="forward"===e&&n||"backward"===e&&!n?t.top.id:t.bottom.id;return o(e,i)}return null};for(let i=0;i<cd.a.comments.length;i++){if(!l.roughOffset)l.getOffset({set:!0});if(l.isInViewport(!1)){r=l;break}if(l.roughOffset&&(l===a&&n<l.roughOffset.downplayedBottom||l===s&&t>l.roughOffset.top)){r=d(e,c,!0);break}if(c.top===c.bottom){r=d(e,c);break}if(l.roughOffset)if(l===a)l=c.bottom;else{c[t>l.roughOffset.top?"top":"bottom"]=l;if(c.bottom.id-c.top.id<=1){r=d(e,c);break}const i=c.top.roughOffset.top,o=(t-i)/(c.bottom.roughOffset.downplayedBottom-n+(t-i));if(o<0||o>=1)console.warn("The proportion shouldn't be more than 0 or less or equal to 1.","proportion",o,"searchArea",c);const a=Math.round((c.bottom.id-c.top.id-1)*o+c.top.id+.5);l=cd.a.comments[a]}else{l=o("forward",c.top.id+1);c.top=l}}return r||null},highlightHovered(e){var t,n,i,o,a;if(cd.a.state.isScrollHandlingPrevented||cd.a.state.isAutoScrollInProgress||Object(u.C)())return;const s=Array.from(null===(t=cd.a.g.notificationArea)||void 0===t?void 0:t.querySelectorAll(".mw-notification")).some(e=>e.matches(":hover"))||(null===(n=cd.a.g.activeAutocompleteMenu)||void 0===n?void 0:n.matches(":hover"))||(null===(i=h.a.$element)||void 0===i?void 0:i.get(0).matches(":hover"))||$(document.body).children(".ui-widget-overlay").length||(null===(o=cd.a.g.$popupsOverlay)||void 0===o?void 0:null===(a=o.get(0).querySelector(".oo-ui-popupWidget:not(.oo-ui-element-hidden)"))||void 0===a?void 0:a.matches(":hover"));cd.a.comments.filter(e=>e.underlay).forEach(t=>{const n=t.getLayersContainerOffset(),i=t.layersOffset;if(i)if(!s&&e.pageY>=i.top+n.top&&e.pageY<=i.top+i.height+n.top&&e.pageX>=i.left+n.left&&e.pageX<=i.left+i.width+n.left)t.highlightHovered();else t.unhighlightHovered();else t.removeLayers()})},getByAnchor(e,t){if(!cd.a.comments||!e)return null;const n=e=>cd.a.comments.find(t=>t.anchor===e);let i=n(e);if(!i&&t){const{date:t,author:o}=Object(m.j)(e)||{};for(let e=1;!i&&e<=3;e++){const a=new Date(t.getTime()-cd.a.g.MILLISECONDS_IN_MINUTE*e);i=n(Object(m.f)(a,o))}}return i||null},reviewHighlightables(){cd.a.comments.forEach(e=>{e.reviewHighlightables();e.isLineGapped=e.highlightables.length>1&&e.level>0})},addNewCommentsNotes(e){Object(u.P)();cd.a.comments.forEach(e=>{e.subitemList.remove("newCommentsNote")});$(".cd-thread-newCommentsNote").remove();const t=new Map;e.forEach(e=>{let n;if(e.parent)n=e.parentMatch;else for(let t=e.section;t&&!n;t=t.parent)n=t.match;if(n){if(!t.get(n))t.set(n,[]);t.get(n).push(e)}});const n=e.map(e=>e.id);t.forEach((e,t)=>{if(t instanceof O)b(e,t,"thread",n);else{const i=e.filter(e=>0===e.logicalLevel);let o=[];i.forEach(e=>{p(e,o,n)});const a=e.filter(e=>!o.includes(e));b(o,t,"section",n);b(a,t,"thread",n)}});Object(u.N)()},reformatComments:()=>o()((function*(){if(cd.a.settings.reformatComments){const e=[];$(document.body).addClass("cd-reformattedComments");cd.a.comments.forEach(t=>{e.push(...t.replaceSignatureWithHeader());t.addMenu()});const t={};e.forEach(e=>{const n=e.pageName;if(!t[n])t[n]=[];t[n].push(e.link)});const n=Object.keys(t),i=yield Object(f.c)(n);Object.keys(i).forEach(e=>{t[e].forEach(t=>{t.title=i[e].normalized;if(!i[e].exists){t.classList.add("new");t.href=mw.util.getUrl(e,{action:"edit",redlink:1})}})})}}))(),reformatTimestamps(){if(cd.a.g.ARE_TIMESTAMPS_ALTERED)cd.a.comments.forEach(e=>{e.reformatTimestamp()})}};var y=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 n=t.parent("dl, ul, ol");t.remove();if(n.is(":empty")){const e=n.parent("dd, li");if(e.length&&1===e.children().length)e.remove();else n.remove()}}}get(e){return this.content[e]||null}},w=n(27),E=n(18),C=n(8),T=n(19);let x,k;function S(e){let t;if(["UL","OL"].includes(e.tagName)){t=Object(u.q)(e);t.left=t.outerLeft;t.right=t.outerRight}else t=e.getBoundingClientRect();return t}class Comment_Comment extends d{constructor(e,t){super(e,t);if(!x)x=cd.a.g.COMMENT_ELEMENT_PROTOTYPES;this.author=E.a.getUser(this.authorName);this.$signature=$(this.signatureElement);this.isActionable=cd.a.state.isPageActive&&!cd.a.g.closedDiscussionElements.some(e=>e.contains(this.elements[0]));this.highlightables.forEach(this.bindEvents.bind(this));this.setAnchorHighlightable();const n=e=>{const t=new l.b(e);for(;t.parentNode();)if(t.currentNode.classList.contains("cd-commentLevel"))return t.currentNode.tagName.toLowerCase()};if(0!==this.level){this.containerListType=n(this.highlightables[0]);this.ahContainerListType=n(this.anchorHighlightable)}this.isNew=null;this.isSeen=null;this.isTarget=!1;this.isHovered=!1;this.isChangedSincePreviousVisit=null;this.isChanged=null;this.isDeleted=null;this.willFlashChangedOnSight=!1;this.isInSingleCommentTable=!1;this.isCollapsed=!1;this.subitemList=new y}setAnchorHighlightable(){if(this.highlightables.length>1){const e=[],t=[],n=[this.highlightables[0],this.highlightables[this.highlightables.length-1]];n.forEach((n,i)=>{const o=new l.b(n);e[i]=0;for(;o.parentNode();){e[i]++;if(!t[i]&&["DL","UL","OL"].includes(o.currentNode.tagName))t[i]=o.currentNode.tagName.toLowerCase()}});const i=Math.min(...e);let o;for(let n=0;n<2;n++)if(e[n]===i&&void 0===o||"ol"===t[o]&&"ol"!==t[n])o=n;this.anchorHighlightable=n[o]}else this.anchorHighlightable=this.highlightables[0]}cleanUpSignature(){const e=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&&!["B","STRONG"].includes(e.tagName)&&(e.getAttribute("style")||["SUP","SUB"].includes(e.tagName))&&e.textContent.length<30&&!e.classList.length)e.remove()}},t=this.signatureElement.previousSibling,n=null==t?void 0:t.previousSibling;e(t);if(t&&n&&(!t.parentNode||!t.textContent.trim())){const t=n.previousSibling;e(n);if(!n.parentNode)e(t)}}replaceSignatureWithHeader(){const e=[],t=x.headerElement.cloneNode(!0);let n=t.firstChild.firstChild;const i=n.firstChild;let o,a=n.nextElementSibling;if(cd.a.settings.showContribsLink){o=a.nextElementSibling.nextElementSibling;if(!this.author.isRegistered()){o.previousSibling.remove();o.remove()}}if(this.authorLink){const e=this.authorLink.nextElementSibling;if(e&&Array.from(e.classList).includes("userflags-wrapper"))n.parentNode.insertBefore(e,n.nextSibling);n.parentNode.replaceChild(this.authorLink,n);n=this.authorLink;n.classList.add("cd-comment-author");n.innerHTML="";n.appendChild(i)}else{let t;if(this.author.isRegistered()){t="User:"+this.author.name;e.push({pageName:t,link:n})}else t=`${cd.a.g.CONTRIBS_PAGE}/${this.author.name}`;n.title=t;n.href=mw.util.getUrl(t)}if(this.authorTalkLink){a.parentNode.replaceChild(this.authorTalkLink,a);a=this.authorTalkLink;a.textContent=cd.a.s("comment-author-talk")}else{const t="User talk:"+this.author.name;e.push({pageName:t,link:a});a.title=t;a.href=mw.util.getUrl(t)}i.textContent=this.author.name;if(cd.a.settings.showContribsLink&&this.author.isRegistered()){const e=`${cd.a.g.CONTRIBS_PAGE}/${this.author.name}`;o.title=e;o.href=mw.util.getUrl(e)}if(this.timestamp){this.copyLinkButton=new r({label:this.reformattedTimestamp||this.timestamp,tooltip:this.timestampTitle,classes:["cd-comment-button-label","cd-comment-timestamp"],action:this.copyLink.bind(this)});t.appendChild(this.copyLinkButton.element);this.timestampElement=this.copyLinkButton.labelElement;new w.a(this.timestampElement,this.date,!cd.a.settings.hideTimezone)}this.headerElement=t;this.$header=$(this.headerElement);[this.highlightables[0],this.highlightables[this.highlightables.length-1]].filter(u.X).filter(e=>cd.a.g.BAD_HIGHLIGHTABLE_ELEMENTS.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"),n=e;this.replaceElement(e,t);t.appendChild(n);this.addAttributes();n.classList.remove("cd-comment-part","cd-comment-part-first","cd-comment-part-last");delete n.dataset.commentId});this.highlightables[0].insertBefore(t,this.highlightables[0].firstChild);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.createReplyButton();this.createEditButton();this.createThankButton();this.createGoToParentButton();this.highlightables[this.highlightables.length-1].appendChild(this.menuElement)}createReplyButton(){if(this.isActionable){const e=this.replyButtonClick.bind(this);if(cd.a.settings.reformatComments){this.replyButton=new r({label:cd.a.s("cm-reply"),classes:["cd-comment-button-label"],action:e});this.menuElement.appendChild(this.replyButton.element)}else{const t=x.replyButton.cloneNode(!0),n=x.getReplyButton;this.replyButton=new r({element:t,action:e,widgetConstructor:n});this.overlayMenu.appendChild(this.replyButton.element)}}}createEditButton(){if(this.isActionable&&(this.isOwn||cd.a.settings.allowEditOthersComments)){const e=this.editButtonClick.bind(this);if(cd.a.settings.reformatComments){this.editButton=new r({label:cd.a.s("cm-edit"),classes:["cd-comment-button-label"],action:e});this.menuElement.appendChild(this.editButton.element)}else{const t=x.editButton.cloneNode(!0),n=x.getEditButton;this.editButton=new r({element:t,action:e,widgetConstructor:n});this.overlayMenu.appendChild(this.editButton.element)}}}createThankButton(){if(this.author.isRegistered()&&this.date&&!this.isOwn){if(!k){k=function(e){const t=Object.assign({},e);Object.keys(t).forEach(e=>{if(!t[e].thankUnixTime||t[e].thankUnixTime<Date.now()-60*cd.a.g.SECONDS_IN_DAY*1e3)delete t[e]});return t}(Object(u.r)("thanks"));Object(u.R)("thanks",k)}const e=Object.keys(k).some(e=>this.anchor===k[e].anchor&&Object(u.e)(this.getText(),k[e].text)>.66),t=this.thankButtonClick.bind(this);if(cd.a.settings.reformatComments){this.thankButton=new r({label:cd.a.s(e?"cm-thanked":"cm-thank"),tooltip:cd.a.s(e?"cm-thanked-tooltip":"cm-thank-tooltip"),classes:["cd-comment-button-label"],action:t});this.menuElement.appendChild(this.thankButton.element)}else{const e=x.thankButton.cloneNode(!0),n=x.getThankButton;this.thankButton=new r({element:e,action:t,widgetConstructor:n});this.overlayMenu.appendChild(this.thankButton.element)}if(e)this.setThanked()}}createCopyLinkButton(){if(this.anchor&&!cd.a.settings.reformatComments){const e=x.copyLinkButton.cloneNode(!0),t=x.getCopyLinkButton;this.copyLinkButton=new r({element:e,action:this.copyLink.bind(this),widgetConstructor:t});this.overlayMenu.appendChild(this.copyLinkButton.element)}}createGoToParentButton(){if(this.getParent()){const e=this.goToParentButtonClick.bind(this);if(cd.a.settings.reformatComments){this.goToParentButton=new r({tooltip:cd.a.s("cm-gotoparent-tooltip"),classes:["cd-comment-button-icon","cd-comment-button-goToParent"],action:e});this.headerElement.appendChild(this.goToParentButton.element)}else{const t=x.goToParentButton.cloneNode(!0),n=x.getGoToParentButton;this.goToParentButton=new r({element:t,action:e,widgetConstructor:n});this.overlayMenu.appendChild(this.goToParentButton.element)}}}createGoToChildButton(){if(cd.a.settings.reformatComments){this.goToChildButton=new r({tooltip:cd.a.s("cm-gotochild-tooltip"),classes:["cd-comment-button-icon","cd-comment-button-goToChild"]});const e=this.goToParentButton||this.copyLinkButton||this.authorLink;this.headerElement.insertBefore(this.goToChildButton.element,null==e?void 0:e.nextSibling)}else{const e=x.goToChildButton,t=x.getGoToChildButton;this.goToChildButton=new r({element:e,widgetConstructor:t});this.$overlayMenu.prepend(e)}}reformatTimestamp(){if(!this.date)return;let e,t="";if(cd.a.g.ARE_TIMESTAMPS_ALTERED)e=Object(m.b)(this.date,!cd.a.settings.hideTimezone);if("relative"===cd.a.settings.timestampFormat&&cd.a.settings.useUiTime&&cd.a.g.CONTENT_TIMEZONE!==cd.a.g.UI_TIMEZONE)t=Object(m.d)(this.date,!0)+"\n";if(e){t+=this.timestampElement.textContent;this.reformattedTimestamp=e;this.timestampTitle=t;if(!cd.a.settings.reformatComments){this.timestampElement.textContent=this.reformattedTimestamp;this.timestampElement.title=this.timestampTitle;new w.a(this.timestampElement,this.date,!cd.a.settings.hideTimezone)}}}bindEvents(e){if(!cd.a.settings.reformatComments){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 n=0===e&&t.classList.contains("cd-comment-replacedPart")?t.firstChild:t;if(this.highlightables.length>1&&(cd.a.g.floatingElements.includes(n)||cd.a.g.hiddenElements.includes(n))){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.commentId;this.highlightables.splice(e,1);e--;this.setLevels();this.setAnchorHighlightable()}}}}hideMenu(e){if(e)e.preventDefault();this.overlayInnerWrapper.style.display="none"}replyButtonClick(){if(this.replyForm)this.replyForm.cancel();else this.reply()}editButtonClick(){this.edit()}thankButtonClick(){this.thank()}goToParentButtonClick(){this.goToParent()}setOffsetProperty(e,t){if(t.set)if(t.considerFloating)this.offset=e;else this.roughOffset=e}getAdjustedRects(e,t,n,i=cd.a.g.floatingElements.map(u.q)){let o=0,a=!1;i.forEach(e=>{const t=scrollY+e.outerTop,i=scrollY+e.outerBottom;if(n>t&&n<i+cd.a.g.CONTENT_LINE_HEIGHT)a=!0;if(n>t&&top<i+cd.a.g.CONTENT_LINE_HEIGHT)o++});if(a){const n=[];this.highlightables.forEach((e,t)=>{n[t]=e.style.overflow;e.style.overflow="hidden"});e=S(this.highlightables[0]);t=1===this.elements.length?e:S(this.highlightables[this.highlightables.length-1]);if(o<=1)this.highlightables.forEach((e,t)=>{e.style.overflow=n[t]});else this.highlightables.forEach((e,t)=>{if(cd.a.g.floatingElements.some(t=>e.contains(t)))e.style.overflow=n[t]})}return[e,t]}setStretchedProperties(e,t){this.isStartStretched=!1;this.isEndStretched=!1;if(0===this.level){const n=e-cd.a.g.CONTENT_START_MARGIN-2,i=t+cd.a.g.CONTENT_START_MARGIN+2;this.isStartStretched="ltr"===this.getDir()?n<=cd.a.g.CONTENT_COLUMN_START:i>=cd.a.g.CONTENT_COLUMN_START;this.isEndStretched="ltr"===this.getDir()?i>=cd.a.g.CONTENT_COLUMN_END:n<=cd.a.g.CONTENT_COLUMN_END}}getOffset(e={}){if(void 0===e.considerFloating)e.considerFloating=Boolean(e.floatingRects);if(void 0===e.set)e.set=!1;if(this.editForm){this.setOffsetProperty(null,e);return null}let t=S(this.highlightables[0]),n=1===this.elements.length?t:S(this.highlightables[this.highlightables.length-1]);if(!Object(u.v)(t,n)){this.setOffsetProperty(null,e);return null}const i=window.scrollY;let o;if(this.offset){const e=i+t.top===this.offset.top,a=n.bottom-t.top==this.offset.bottom-this.offset.top,s=this.highlightables[0].offsetWidth===this.firstHighlightableWidth;o=!e||!a||!s}else o=!0;if(!o){if(e.set&&!e.considerFloating)this.roughOffset=this.offset;return e.set?!1:this.offset}this.firstHighlightableWidth=this.highlightables[0].offsetWidth;const a=i+t.top,s=i+n.bottom;if(e.considerFloating)[t,n]=this.getAdjustedRects(t,n,s,e.floatingRects);const r=window.scrollX,c=r+Math.min(t.left,n.left),l=r+Math.max(t.right,n.right);if(e.considerFloating)this.setStretchedProperties(c,l);const d={top:a,bottom:s,left:c,right:l,downplayedBottom:s-a>window.innerHeight-200?a+(window.innerHeight-200):s};this.setOffsetProperty(d,e);return e.set?!0:d}getDir(){if(!this.cachedDir)if(cd.a.g.areThereLtrRtlMixes){const e=this.elements[0].closest(".mw-content-ltr, .mw-content-rtl").classList.contains("mw-content-ltr");this.cachedDir=e?"ltr":"rtl"}else this.cachedDir=cd.a.g.CONTENT_DIR;return this.cachedDir}getMargins(){let e;if("ol"===this.ahContainerListType)e=1===this.highlightables.length?3.2*cd.a.g.CONTENT_FONT_SIZE:2.2*cd.a.g.CONTENT_FONT_SIZE-1;else if(this.isStartStretched)e=cd.a.g.CONTENT_START_MARGIN;else{const t=this.isCollapsed?this.thread.expandNote:this.anchorHighlightable;if(["DD","LI"].includes(t.tagName)&&t.parentNode.classList.contains("cd-commentLevel"))e=-1;else e=0===this.level?cd.a.g.COMMENT_FALLBACK_SIDE_MARGIN:cd.a.g.CONTENT_FONT_SIZE}const t=this.isEndStretched?cd.a.g.CONTENT_START_MARGIN:cd.a.g.COMMENT_FALLBACK_SIDE_MARGIN;return{left:"ltr"===this.getDir()?e:t,right:"ltr"===this.getDir()?t:e}}setLayersOffsetProperty(e={}){const t=this.getOffset(Object.assign({},e,{considerFloating:!0,set:!0}));if(this.offset){const e=this.getLayersContainerOffset(),t=this.getMargins();this.layersOffset={top:this.offset.top-e.top,left:this.offset.left-t.left-e.left,width:this.offset.right+t.right-(this.offset.left-t.left),height:this.offset.bottom-this.offset.top}}else this.layersOffset=null;return t}createLayers(){this.underlay=x.underlay.cloneNode(!0);Comment_Comment.underlays.push(this.underlay);this.overlay=x.overlay.cloneNode(!0);this.line=this.overlay.firstChild;this.marker=this.overlay.firstChild.nextSibling;if(!cd.a.settings.reformatComments){this.overlayInnerWrapper=this.overlay.lastChild;this.overlayGradient=this.overlayInnerWrapper.firstChild;this.overlayMenu=this.overlayInnerWrapper.lastChild;this.overlayInnerWrapper.oncontextmenu=this.hideMenu.bind(this);let e;const t=t=>{if(1===t.which)e=setTimeout(this.hideMenu.bind(this),1500)},n=()=>{clearTimeout(e)};this.overlayInnerWrapper.onmousedown=t;this.overlayInnerWrapper.onmouseup=n;this.createGoToParentButton();this.createCopyLinkButton();this.createThankButton();this.createEditButton();this.createReplyButton()}this.updateLayersStyles(!0);this.$underlay=$(this.underlay);this.$overlay=$(this.overlay);this.$marker=$(this.marker);if(!cd.a.settings.reformatComments){this.$overlayMenu=$(this.overlayMenu);this.$overlayGradient=$(this.overlayGradient)}mw.hook("convenientDiscussions.commentLayersCreated").fire(this,cd.a)}updateClassesForType(e,t){t=Boolean(t);if(this.underlay.classList.contains("cd-comment-underlay-"+e)!==t){this.underlay.classList.toggle("cd-comment-underlay-"+e,t);this.overlay.classList.toggle("cd-comment-overlay-"+e,t);if("deleted"===e){var n,i;null===(n=this.replyButton)||void 0===n||n.setDisabled(t);null===(i=this.editButton)||void 0===i||i.setDisabled(t)}else if("hovered"===e&&!t)this.overlayInnerWrapper.style.display=""}}updateLayersStyles(e=!1){if(this.underlay){this.updateClassesForType("new",this.isNew);this.updateClassesForType("own",this.isOwn);this.updateClassesForType("deleted",this.isDeleted);if(e){if(this.isLineGapped)this.line.classList.add("cd-comment-overlay-line-closingGap");if(this.isStartStretched)this.overlay.classList.add("cd-comment-overlay-stretchedStart");if(this.isEndStretched)this.overlay.classList.add("cd-comment-overlay-stretchedEnd")}}}configureLayers(e={}){if(void 0===e.add)e.add=!0;if(void 0===e.update)e.update=!0;const t=this.setLayersOffsetProperty(e);if(null===t)return null;if(this.underlay){this.updateLayersStyles();if(t&&e.update)this.updateLayersOffset();return t}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(){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);Comment_Comment.underlays.splice(Comment_Comment.underlays.indexOf(this.underlay),1);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.cachedLayersContainer){let e;const t=new l.c(document.body,null,!0,this.elements[0]);for(;t.parentNode();){const n=t.currentNode;if(n.classList.contains("cd-connectToPreviousItem"))continue;let i=n.conveneintDiscussionsStyle;if(!i){i=window.getComputedStyle(n);n.conveneintDiscussionsStyle=i}const o=Array.from(n.classList);if(["absolute","relative"].includes(i.position)||n!==cd.a.g.$content.get(0)&&(o.includes("mw-content-ltr")||o.includes("mw-content-rtl")))e=n;if(i.backgroundColor.includes("rgb(")||"none"!==i.backgroundImage&&!e){e=n;e.classList.add("cd-commentLayersContainer-parent-relative")}if(e)break}if(!e)e=document.body;e.classList.add("cd-commentLayersContainer-parent");let n=e.firstElementChild;if(!n.classList.contains("cd-commentLayersContainer")){n=document.createElement("div");n.classList.add("cd-commentLayersContainer");e.insertBefore(n,e.firstChild)}this.cachedLayersContainer=n;Object(u.b)(Comment_Comment.layersContainers,n)}return this.cachedLayersContainer}getLayersContainerOffset(){const e=this.getLayersContainer();let t=e.cdCachedLayersContainerTop,n=e.cdCachedLayersContainerLeft;if(void 0===t||e.cdCouldHaveMoved){const i=e.getBoundingClientRect();t=i.top+window.scrollY;n=i.left+window.scrollX;e.cdCouldHaveMoved=!1;e.cdCachedLayersContainerTop=t;e.cdCachedLayersContainerLeft=n}return{top:t,left:n}}highlightHovered(e){var t;if(this.isHovered||Object(u.C)()||cd.a.settings.reformatComments)return;if(e&&"touchstart"===e.type)cd.a.comments.filter(e=>e.isHovered).forEach(e=>{e.unhighlightHovered()});null===(t=this.$animatedBackground)||void 0===t||t.stop(!0,!0);if(!this.configureLayers()&&this.underlay){this.updateClassesForType("hovered",!0);this.isHovered=!0}}unhighlightHovered(){var e;if(this.isHovered&&!cd.a.settings.reformatComments){null===(e=this.$animatedBackground)||void 0===e||e.stop(!0,!0);this.updateClassesForType("hovered",!1);this.isHovered=!1}}animateToColors(e,t,n){const i=e=>{const t={backgroundColor:e};if("rgba(0, 0, 0, 0)"===t.backgroundColor)t.opacity=0;return t},o={backgroundColor:"",backgroundImage:"",opacity:""},a=i(e);this.$marker.animate(a,400,"swing",()=>{this.$marker.css(o)});const s=this,r=i(t);this.$animatedBackground.animate(r,400,"swing",(function(){if(this===s.$animatedBackground.get(-1)){if(n)n();s.$animatedBackground.add(s.$overlayGradient).css(o)}}))}animateBack(e,t){var n,i;this.animateBackBound=null;if(null===(n=this.$underlay)||void 0===n||!n.parent().length){if(t)t();return}const o=this.$marker.css("background-color"),a=this.$underlay.css("background-color");this.updateClassesForType(e,!1);const s=this.$marker.css("background-color");let r=this.$underlay.css("background-color");if(r===a)r="rgba(0, 0, 0, 0)";this.$marker.css({backgroundColor:o,opacity:1});this.$animatedBackground.css({backgroundColor:a});null===(i=this.$overlayGradient)||void 0===i||i.css({backgroundImage:"none"});this.animateToColors(s,r,t)}flash(e,t,n){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,n);this.unhighlightTimeout=setTimeout(this.animateBackBound,t)}else if(n)n()}flashTarget(){this.isTarget=!0;this.flash("target",2e3,()=>{this.isTarget=!1})}flashChanged(){this.flash("changed",1e3);if(this.isChanged){const e=Object(u.r)("seenRenderedChanges"),t=mw.config.get("wgArticleId");e[t]=e[t]||{};e[t][this.anchor]={comparedHtml:this.comparedHtml,seenUnixTime:Date.now()};Object(u.R)("seenRenderedChanges",e)}}flashChangedOnSight(){if(!document.hidden&&this.isInViewport())this.flashChanged();else this.willFlashChangedOnSight=!0}showDiff(e,t){var n=this;return o()((function*(){var i,o,a,r;if(Object(u.g)("mediawiki.diff.styles"))return;let c=Math.min(mw.config.get("wgRevisionId"),e),l=Math.max(mw.config.get("wgRevisionId"),e);const d=cd.a.g.mwApi.post({action:"query",revids:[c,l],prop:"revisions",rvslots:"main",rvprop:["ids","content"],redirects:!mw.config.get("wgIsRedirect")}).catch(u.w),h=cd.a.g.mwApi.post({action:"compare",fromtitle:n.getSourcePage().name,fromrev:c,torev:l,prop:["diff"]}).catch(u.w);let[m,f]=yield Promise.all([d,h,mw.loader.using("mediawiki.diff.styles")]);const g=null===(i=m.query)||void 0===i?void 0:null===(o=i.pages)||void 0===o?void 0:null===(a=o[0])||void 0===a?void 0:a.revisions;if(!g)throw new s.a({type:"api",code:"noData"});const p=[[],[]];g.forEach((e,i)=>{const o=e.slots.main.content,a=n.locateInCode(o,t[i]),s=o.slice(0,a.lineStartIndex).match(/\n/g)||[],r=o.slice(a.lineStartIndex,a.signatureEndIndex).match(/\n/g)||[],c=s.length+1,l=c+r.length;for(let e=c;e<=l;e++)p[i].push(e)});const b=null==f?void 0:null===(r=f.compare)||void 0===r?void 0:r.body;if(void 0===b)throw new s.a({type:"api",code:"noData"});const v=$(Object(u.Z)(b)),y=[];let w="";v.find("tr").each((e,t)=>{const n=$(t),i=n.children(".diff-lineno");for(let e=0;e<i.length;e++){const t=i.eq(e).text().match(/\d+/);y[e]=Number((t||[])[0]);if(!y[e])throw new s.a({type:"parse"});if(1===e)return}if(!n.children(".diff-marker").length)return;let o=!1;for(let e=0;e<2;e++)if(!n.children().eq(2*e).hasClass("diff-empty")){if(p[e].includes(y[e]))o=!0;y[e]++}if(o)w+=n.prop("outerHTML")});const E=$(Object(u.Z)(w));if(!E.find(".diff-deletedline, .diff-addedline").length)throw new s.a({type:"parse",message:cd.a.sParse("comment-diff-empty")});const C=$("<a>").attr("href",n.getSourcePage().getUrl({oldid:c,diff:l})).attr("target","_blank").text(cd.a.s("comment-diff-full")),T=$("<a>").attr("href",n.getSourcePage().getUrl({action:"history"})).attr("target","_blank").text(cd.a.s("comment-diff-history")),x=$("<div>").addClass("cd-commentDiffView-below").append(C,cd.a.sParse("dot-separator"),T),k=$("<div>").append(E,x);OO.ui.alert(k,{title:cd.a.s("comment-diff-title"),size:"larger"})}))()}markAsChanged(e,t,n,i){var r=this;let c,l,d;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"}if(!t){const t="deleted"===e?{}:{commentAnchor:this.anchor};l=new a.a({label:cd.a.s("comment-changed-refresh"),action:()=>{Object(g.k)(t)}})}if("deleted"!==e&&this.getSourcePage().name===cd.a.page.name)d=new a.a({label:cd.a.s("comment-diff"),action:(h=o()((function*(){d.setPending(!0);try{yield r.showDiff(n,i)}catch(e){let t=cd.a.sParse("comment-diff-error");if(e instanceof s.a){const{type:n,message:i}=e.data;if(i)t=i;else if("network"===n)t+=" "+cd.a.sParse("error-network")}mw.notify(Object(u.Y)(t),{type:"error"})}d.setPending(!1)})),function(){return h.apply(this,arguments)})});var h;let m,f;if(cd.a.settings.reformatComments){c+="-short";m=f=cd.a.sParse("dot-separator")}else{m=" ";f=l?cd.a.sParse("dot-separator"):" "}$(this.highlightables).find(".cd-changeMark").remove();const p=$("<span>").addClass("cd-changeMark").text(cd.a.s(c));if(l)p.append(m,l.element);else p.addClass("cd-changeMark-newVersionRendered");if(d)p.append(f,d.element);if(cd.a.settings.reformatComments)this.$header.append(p);else{let e,t=$(this.highlightables).last();do{e=t;t=e.children().last()}while(t.length&&!Object(u.A)(t.get(0)));if(!e.find(".cd-beforeChangeMark").length){const t=$("<span>").addClass("cd-beforeChangeMark");e.append(" ",t)}e.append(p)}if(t)this.flashChangedOnSight()}unmarkAsChanged(e){switch(e){case"changed":default:this.isChanged=!1;break;case"deleted":this.isDeleted=!1;this.updateLayersStyles()}this.$elements.last().find(".cd-changeMark").remove();if("changed"===e)if(this.willFlashChangedOnSight)this.willFlashChangedOnSight=!1;else{const e=Object(u.r)("seenRenderedChanges"),t=mw.config.get("wgArticleId");e[t]=e[t]||{};delete e[t][this.anchor];Object(u.R)("seenRenderedChanges",e);this.flashChangedOnSight()}}update(e,t){const n=Array.from(this.$elements).map(e=>e.tagName),i=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(!i&&o&&Object(u.c)(n,t.elementNames)){const e=this.$elements.find(".autonumber").text().match(/\d+/);let i=e?e[0]:1;t.elementHtmls.forEach((e,i)=>{e=e.replace(/\x01(\d+)_\w+\x02/g,(e,n)=>t.hiddenElementsData[n-1].html);if(/^H[1-6]$/.test(n[i])){const t=this.$elements.eq(i).find(".mw-headline");if(t.length){const n=t.find(".mw-headline-number"),i=$(e);t.html(i.html()).prepend(n);const a=this.section;if(a){const e=a.headline;a.parseHeadline();if(a.isWatched&&a.headline!==e)a.watch(!0,e);if(cd.a.settings.modifyToc){var o;null===(o=a.getTocItem())||void 0===o||o.replaceText(i)}}}}else this.replaceElement(this.$elements.eq(i),e)});this.$elements.find(".autonumber").each((e,t)=>{$(t).text(`[${i}]`);i++});this.$elements.attr("data-comment-id",this.id);if(cd.a.settings.reformatComments){this.signatureElement=this.$elements.find(".cd-signature").get(0);this.replaceSignatureWithHeader();this.addMenu()}else{this.timestampElement=this.$elements.find(".cd-timestamp").get(-1);this.reformatTimestamp()}mw.hook("wikipage.content").fire(this.$elements);delete this.cachedText;return!0}else return!1}scrollIntoView(e){(this.editForm?this.editForm.$element:this.$elements).cdScrollIntoView(e)}scrollTo(e=!0,t=!1,n=!0,i){if(t)history.pushState(history.state,"","#"+this.anchor);if(this.isCollapsed){this.getVisibleExpandNote().cdScrollTo("top",e,i);mw.notify(cd.a.s("navpanel-firstunseen-hidden"),{title:cd.a.s("navpanel-firstunseen-hidden-title")})}else{const t=this.editForm?this.editForm.$element:this.$elements,o=this.isOpeningSection||this.editForm?"top":"center";if(i)i();t.cdScrollIntoView(o,e,i);if(n)this.flashTarget()}}goToParent(){const e=this.getParent();if(e){e.scrollTo();e.configureLayers();if(!e.goToChildButton)e.createGoToChildButton();e.goToChildButton.setAction(()=>{this.scrollTo()})}else console.error("This comment has no parent.")}generateDiffView(){var e=this;return o()((function*(){const t=yield e.findEditThatAdded(),n=yield e.getDiffLink(),i=$("<a>").addClass("cd-diffView-nextDiffLink").attr("href",n.replace(/&diff=(\d+)/,"&oldid=$1&diff=next")).attr("target","_blank").text(cd.a.mws("nextdiff")),o=$("<div>").append(i);if(t.parsedcomment){const e=Object(u.Y)(t.parsedcomment,{targetBlank:!0}).addClass("comment");o.append(cd.a.sParse("cld-summary"),cd.a.mws("colon-separator"),e)}const a=Object(u.Z)(t.diffBody);return $("<div>").addClass("cd-diffView-diff").append(o,a)}))()}copyLink(e){var t=this;return o()((function*(){if(!t.isLinkBeingCopied){t.copyLinkButton.setPending(!0);yield Object(T.c)(t,e);t.copyLinkButton.setPending(!1)}}))()}findEditThatAdded(){var e=this;return o()((function*(){if(e.editThatAdded)return e.editThatAdded;const t=new Date(e.date.getTime()-10*cd.a.g.MILLISECONDS_IN_MINUTE).toISOString(),n=new Date(e.date.getTime()+3*cd.a.g.MILLISECONDS_IN_MINUTE).toISOString(),i=yield e.getSourcePage().getArchivedPage().getRevisions({rvprop:["ids","comment","parsedcomment","timestamp"],rvdir:"newer",rvstart:t,rvend:n,rvuser:e.author.name,rvlimit:500}),o=i.map(t=>cd.a.g.mwApi.post({action:"compare",fromtitle:e.getSourcePage().getArchivedPage().name,fromrev:t.revid,torelative:"prev",prop:["diff"]}).catch(u.w)),a=yield Promise.all(o),r=/<td colspan="2" class="diff-empty">&#160;<\/td>\s*<td class="diff-marker">\+<\/td>\s*<td class="diff-addedline"><div>(?!=)(.+?)<\/div><\/td>\s*<\/tr>/g,c=cd.a.g.ARE_TIMESTAMPS_ALTERED?e.timestamp:e.$signature.get(0).innerText,l=e.getText(!1)+" "+c,d=[];for(let t=0;t<a.length;t++){var h,m;const n=null===(h=a[t])||void 0===h?void 0:null===(m=h.compare)||void 0===m?void 0:m.body;if(!n)continue;const o=i[t];let c,g="",p="",b=0;for(;c=r.exec(n);){const e=Object(C.k)(Object(C.a)(c[1])),t=Object(u.e)(e,l);if(t>b)b=t;p+=e+"\n";g+=c[1]+"\n"}if(!g.trim())continue;o.diffBody=n;const v=new Date(o.timestamp).getTime(),y=e.date.getTime()+3e4,w=Math.abs(y-v),E=Object(u.e)(p,l);let T=Math.max(E,b);if(T<1&&g.includes("{{")){try{const e=(yield Object(f.j)(g,{title:cd.a.page.name})).html;g=$("<div>").append(e).cdGetText()}catch(e){throw new s.a({type:"parse"})}T=Object(u.e)(g,l)}d.push({revision:o,wordOverlap:T,dateProximity:w})}const g=d.sort((e,t)=>e.wordOverlap===t.wordOverlap?t.dateProximity-e.dateProximity:t.wordOverlap-e.wordOverlap)[0];if(!g)throw new s.a({type:"parse"});e.editThatAdded=g.revision;return e.editThatAdded}))()}getDiffLink(e){var t=this;return o()((function*(){const n=yield t.findEditThatAdded();if(e)return`${cd.a.g.SERVER}/?diff=${n.revid}`;else{const e=decodeURI(cd.a.page.getArchivedPage().getUrl({diff:n.revid}));return`${cd.a.g.SERVER}${e}`}}))()}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:n}=e.data;let i;switch(t){case"parse":{const e=this.getSourcePage().getArchivedPage().getUrl({action:"history"});i=cd.a.sParse("error-diffnotfound")+" "+cd.a.sParse("error-diffnotfound-history",e);break}case"api":default:if("noData"===n){const e=this.getSourcePage().getArchivedPage().getUrl({action:"history"});i=cd.a.sParse("error-diffnotfound")+" "+cd.a.sParse("error-diffnotfound-history",e)}else{i=cd.a.sParse("thank-error");console.warn(e)}break;case"network":i=cd.a.sParse("error-diffnotfound")+" "+cd.a.sParse("error-network")}mw.notify(Object(u.Y)(i,{targetBlank:!0}),{type:"error"});this.thankButton.setPending(!1)}thank(){var e=this;return o()((function*(){if(Object(u.g)("mediawiki.diff.styles"))return;e.thankButton.setPending(!0);let t,n;if(cd.a.g.GENDER_AFFECTS_USER_STRING&&e.author.isRegistered())t=Object(f.g)([e.author]);try{[n]=yield Promise.all([e.findEditThatAdded(),t,mw.loader.using("mediawiki.diff.styles")].filter(u.h))}catch(t){e.thankFail(t);return}const i=e.getSourcePage().getArchivedPage().getUrl({diff:n.revid}),o=cd.a.sParse("thank-confirm",e.author.name,e.author,i),a=Object(u.Y)(o,{tagName:"div",targetBlank:!0}),s=yield e.generateDiffView(),r=$("<div>").append(a,s);if(yield OO.ui.confirm(r,{size:"larger"})){try{yield cd.a.g.mwApi.postWithEditToken(cd.a.g.mwApi.assertCurrentUser({action:"thank",rev:n.revid,source:cd.a.config.scriptCodeName})).catch(u.w)}catch(t){e.thankFail(t);return}mw.notify(cd.a.s("thank-success"));e.setThanked();k[n.revid]={anchor:e.anchor,text:e.getText(),thankUnixTime:Date.now()};Object(u.R)("thanks",k)}else e.thankButton.setPending(!1)}))()}reply(e){if(!this.replyForm)this.replyForm=e instanceof c.a?e:new c.a({mode:"reply",target:this,dataToRestore:e})}edit(e){this.$elements.addClass("cd-hidden");this.removeLayers();if(!this.editForm)this.editForm=e instanceof c.a?e:new c.a({mode:"edit",target:this,dataToRestore:e})}getCode(){var e=this;return o()((function*(){try{let t=!1;if(e.section&&null!==e.section.liveSectionNumber)try{yield e.section.requestCode();t=!0}catch(t){if(t instanceof s.a&&"noSuchSection"===t.data.code)yield e.getSourcePage().getCode();else throw t}else yield e.getSourcePage().getCode();e.locateInCode(t)}catch(e){if(e instanceof s.a)throw new s.a(Object.assign({},{message:cd.a.sParse("cf-error-getpagecode")},e.data));else throw e}}))()}isInViewport(e=!1,t=this.getOffset()){if(!t)return null;const n=window.scrollY+cd.a.g.BODY_SCROLL_PADDING_TOP,i=n+window.innerHeight;return e?t.downplayedBottom>n&&t.top<i:t.top>=n&&t.downplayedBottom<=i}registerSeen(e,t=!1){const n=!e||this.isInViewport();if(!1===this.isSeen&&n){this.isSeen=!0;if(t)this.flashTarget()}if(this.willFlashChangedOnSight&&n){this.willFlashChangedOnSight=!1;this.flashChanged()}const i=cd.a.comments.some(e=>e.isSeen||e.willFlashChangedOnSight);if(e&&i){const n="backward"===e?-1:1,i=cd.a.comments[this.id+n];if(i&&!1!==i.isInViewport())i.registerSeen(e,t)}}get $elements(){if(void 0===this.cached$elements)this.cached$elements=$(this.elements);return this.cached$elements}set $elements(e){this.cached$elements=e;this.elements=e.get()}replaceElement(e,t){const n=e instanceof $?e.get(0):e;let i;if("string"==typeof t){const e=Array.from(n.parentNode.children).indexOf(n),o=n.parentNode;n.outerHTML=t;i=o.children[e]}else{i=t;n.parentNode.replaceChild(i,e)}if(e instanceof $)this.$elements=this.$elements.not(n).add(i);else this.elements.splice(this.elements.indexOf(e),1,t);if(this.highlightables.includes(n)){this.highlightables.splice(this.highlightables.indexOf(n),1,i);this.bindEvents(i)}if(this.anchorHighlightable===n)this.anchorHighlightable=i}getText(e=!0){if(void 0===this.cachedText){const t=this.$elements.not("h1, h2, h3, h4, h5, h6").clone().removeClass("cd-hidden"),n=$("<div>").append(t),i=[".cd-signature",".cd-changeMark"];if(cd.a.settings.reformatComments)i.push(".cd-comment-header",".cd-comment-menu");if(cd.a.config.unsignedClass)i.push("."+cd.a.config.unsignedClass);const o=i.join(", ");n.find(o).remove();let a=n.cdGetText();if(e){if(cd.a.config.signatureEndingRegexp)a=a.replace(cd.a.config.signatureEndingRegexp,"");if(cd.a.config.signaturePrefixRegexp)a=a.replace(cd.a.config.signaturePrefixRegexp,"")}this.cachedText=a}return this.cachedText}codeToText(){if(!this.inCode){console.error("The Comment#inCode property should contain an object with the comment code data.");return}let e,{code:t,originalIndentationChars:n}=this.inCode;({code:t,hidden:e}=Object(C.h)(t));let i=t;if(0===this.level){const e=new RegExp("^(?:\\x01\\d+_(block|template).*\\x02) *$","i"),t=new RegExp(`^\\[\\[${cd.a.g.FILE_PREFIX_PATTERN}.+\\]\\]$`,"i"),n=new RegExp(`(?:<${cd.a.g.PNIE_PATTERN}(?: [\\w ]+?=[^<>]+?| ?\\/?)>|<\\/${cd.a.g.PNIE_PATTERN}>|\\x04) *$`,"i"),o=new RegExp(`^(?:<\\/${cd.a.g.PNIE_PATTERN}>|<${cd.a.g.PNIE_PATTERN}|\\|)`,"i"),a=/^(=+).*\1[ \t]*$|^----/;i=i.replace(/^((?![:*#; ]).+)\n(?![\n:*#; \x03])(?=(.*))/gm,(i,s,r)=>s+(e.test(s)||e.test(r)||t.test(s)||t.test(r)||a.test(s)||a.test(r)||n.test(s)||o.test(r)?"\n":" "))}i=i.replace(/^(?![:*# ]).*<br[ \n]*\/?>.*$/gim,e=>e.replace(/<br[ \n]*\/?>(?![:*#;])\n? */gi,()=>"\n")).replace(/\n([:*#]*[:*])([ \t]*)/g,(e,t,i)=>{let o;if(t.length>=n.length){o=t.slice(n.length);if(t.length>n.length)o+=i}else o=t+i;return"\n"+o});i=Object(u.W)(i,e);if(cd.a.config.paragraphTemplates.length){const e=`\\{\\{(?:${cd.a.config.paragraphTemplates.map(u.m).join("|")})\\}\\}`,t=new RegExp(e,"g"),n=new RegExp("^(?![:*#]).*"+e,"gm");i=i.replace(n,e=>e.replace(t,"\n\n"))}if(0!==this.level)i=i.replace(/\n\n+/g,"\n\n");return i.trim()}adjustCommentBeginning({code:e,startIndex:t}){let n="",i="",o=t;const a=e.match(/(^[^]*(?:^|\n))((=+)(.*?)\3[ \t\x01\x02]*\n)/);let s,r,c,l;if(a){s=a[2];r=t+a[1].length;c=a[3].length;l=a[4].trim();t+=a[0].length;e=e.slice(a[0].length);o=this.isOpeningSection?r:t}else{[cd.a.config.signatureEndingRegexp,cd.a.g.TIMEZONE_REGEXP].filter(e=>null!==e).forEach(n=>{const i=new RegExp(n.source+"$","m"),a=/^(.+)\n/gm;let s,r;for(;s=a.exec(e);){const t=s[1].replace(/\[\[:?(?:[^|[\]<>\n]+\|)?(.+?)\]\]/g,"$1");if(i.test(t)){const t=s.index+s[0].length;if(t===e.length)break;else r=t}}if(r){e=e.slice(r);t+=r;o+=r}});cd.a.g.BAD_COMMENT_BEGINNINGS.forEach(n=>{if("^"!==n.source[0])console.debug('Regexps in cd.config.customBadCommentBeginnings should have "^" as the first character.');const i=e.match(n);if(i){e=e.slice(i[0].length);o=t+i[0].lastIndexOf("\n")+1;t+=i[0].length}})}if(this.level>0){const a=(a,s,r,c="")=>{if("number"==typeof c)c="";let l="",u=r,d=a.length;if(!s&&e.includes("\n")&&u.endsWith("#")){u=u.slice(0,-1);n=u;if(u.length<this.level)u+=":";d-=1+c.length;l="#"+c}else n=r;i=u;o=t+s.length;t+=d;return l};e=e.replace(new RegExp("^()"+cd.a.config.indentationCharsPattern),a);if(""===i)e=e.replace(new RegExp(`(^[^]*?\\n)${cd.a.config.indentationCharsPattern}(?![^]*\\n[^:*#])`),a)}return{code:e,startIndex:t,lineStartIndex:o,headingMatch:a,headingCode:s,headingStartIndex:r,headingLevel:c,headlineCode:l,originalIndentationChars:n,indentationChars:i}}adjustCommentCodeData(e){const t=Object.assign({},e),n=e=>{t.signatureDirtyCode=e+t.signatureDirtyCode;t.endIndex-=e.length;return""};if(this.isOwn&&cd.a.g.USER_SIGNATURE_PREFIX_REGEXP)t.code=t.code.replace(cd.a.g.USER_SIGNATURE_PREFIX_REGEXP,n);const i=new RegExp(`(<${cd.a.g.PIE_PATTERN}(?: [\\w ]+?=[^<>]+?)?> *)+$`,"i");t.code=((e,t)=>{t.forEach(t=>{e=e.replace(t,n)});return e})(t.code,[/'+$/,cd.a.config.signaturePrefixRegexp,i,cd.a.config.signaturePrefixRegexp,i,new RegExp(`<small class="${cd.a.config.unsignedClass}">.*$`),/<!-- *Template:Unsigned.*$/,cd.a.config.signaturePrefixRegexp]);const o=[{start:/^<small>/,end:/<\/small>[ \xa0\t]*$/}];if(cd.a.config.smallDivTemplates.length)o.push({start:new RegExp(`^(?:\\{\\{(${cd.a.config.smallDivTemplates.join("|")})\\|(?: *1 *= *|(?![^{]*=)))`,"i"),end:/\}\}[ \xa0\t]*$/});t.signatureCode=t.signatureDirtyCode;t.inSmallFont=!1;o.some(e=>{if(e.start.test(t.code)&&e.end.test(t.signatureCode)){t.inSmallFont=!0;t.code=t.code.replace(e.start,"");t.signatureCode=t.signatureCode.replace(e.end,"");return!0}});let a=t.originalIndentationChars;if(!this.isOpeningSection){const e=(t.code+t.signatureDirtyCode).match(/\n([:*#]*[:*]).*$/);if(e){a=e[1];if(a.length<t.originalIndentationChars.length){const e=cd.a.config.spaceAfterIndentationChars?" ":"",n=t.originalIndentationChars.slice(a.length)+e;t.code=n+t.code;t.originalIndentationChars=t.originalIndentationChars.slice(0,a.length);t.startIndex-=n.length}}}a+=cd.a.config.defaultIndentationChar;t.replyIndentationChars=a;return t}searchInCode(e,t,n){const i=Object(C.d)(e);let o,a,s,r,c=i.filter(e=>(e.author===this.author||"<undated>"===e.author)&&(this.timestamp===e.timestamp||this.timestamp&&this.timestamp.startsWith(e.timestamp))).map(e=>({id:e.id,author:e.author,timestamp:e.timestamp,date:e.date,anchor:e.anchor,signatureDirtyCode:e.dirtyCode,startIndex:e.commentStartIndex,endIndex:e.startIndex,signatureEndIndex:e.startIndex+e.dirtyCode.length}));if(t){o=t.id;a=t.previousComments}else{const e=n?this.section.comments:cd.a.comments;o=e.indexOf(this);a=e.slice(Math.max(0,o-2),o).reverse()}if(t){var l;s=t.followsHeading;r=null===(l=t.section)||void 0===l?void 0:l.headline}else{var d;s=this.followsHeading;r=null===(d=this.section)||void 0===d?void 0:d.headline}c.forEach(n=>{n.code=e.slice(n.startIndex,n.endIndex);n.doesIdMatch=o===n.id;if(a.length){n.doesPreviousCommentsDataMatch=!1;n.doesPreviousCommentDataMatch=!1;for(let e=0;e<a.length;e++){const t=i[n.id-1-e];if(!t)break;n.doesPreviousCommentsDataMatch=t.timestamp===a[e].timestamp&&t.author.name===a[e].authorName;if(!1!==n.isPreviousCommentsDataEqual)n.isPreviousCommentsDataEqual=n.timestamp===t.timestamp&&n.author===t.author;if(0===e)n.doesPreviousCommentDataMatch=n.doesPreviousCommentsDataMatch;if(!n.doesPreviousCommentsDataMatch)break}}else{n.doesPreviousCommentsDataMatch=0===n.id;n.doesPreviousCommentDataMatch=0===n.id}n.isPreviousCommentsDataEqual=Boolean(n.isPreviousCommentsDataEqual);Object.assign(n,this.adjustCommentBeginning(n));if(s)n.doesHeadlineMatch=n.headingMatch?Object(C.j)(Object(C.k)(n.headlineCode))===Object(C.j)(r):-5;else n.doesHeadlineMatch=!n.headingMatch;const l=t?t.text:this.getText();n.wordOverlap=Object(u.e)(l,Object(C.k)(n.code));n.score=2*(1===c.length||n.wordOverlap>.5||0!==o&&n.doesPreviousCommentsDataMatch&&!n.isPreviousCommentsDataEqual||0===o&&n.doesPreviousCommentsDataMatch&&n.doesHeadlineMatch)+n.wordOverlap+1*n.doesHeadlineMatch+.5*n.doesPreviousCommentsDataMatch+1e-4*n.doesIdMatch});c=c.filter(e=>e.score>2.5);return c}locateInCode(e,t){let n;if("string"==typeof e)n=e;else if(!0===e){n=this.section.code;this.inCode=null}else{n=this.getSourcePage().code;this.inCode=null}if(void 0===n)throw new s.a({type:"parse",code:"noCode"});const i=!0===e,o=this.searchInCode(n,t,i).sort((e,t)=>t.score-e.score)[0];if(!o)throw new s.a({type:"parse",code:"locateComment"});o.isSectionCodeUsed=i;const a=this.adjustCommentCodeData(o);if("string"==typeof e)return a;else this.inCode=a}modifyWholeCode({action:e,commentCode:t,wholeCode:n,doDelete:i,thisInCode:o}){o=o||this.inCode;if(!n)n=o.isSectionCodeUsed?this.section.code:this.getSourcePage().code;let a,r;if("reply"===e){a=o.endIndex;let e=Object(C.g)(n);if(cd.a.g.CLOSED_DISCUSSION_PAIR_REGEXP)e=e.replace(cd.a.g.CLOSED_DISCUSSION_PAIR_REGEXP,(e,t)=>"\x01".repeat(t.length)+" ".repeat(e.length-t.length-1)+"\x02");if(cd.a.g.CLOSED_DISCUSSION_SINGLE_REGEXP){let t;for(;t=cd.a.g.CLOSED_DISCUSSION_SINGLE_REGEXP.exec(e);){const n=e.slice(0,t.index),i=e.slice(t.index);e=n+Object(C.i)(i,null,t[1].length).code}}let t=a+e.slice(a).match(/\n+(=+).*?\1[ \t\x01\x02]*\n|$/).index+1,i=n.slice(a,t);cd.a.g.KEEP_IN_SECTION_ENDING.forEach(e=>{const n=i.match(e);if(n)t-=n[0].length-1});const r=e.slice(a,t);if(/^ +\x02/.test(r))throw new s.a({type:"parse",code:"closed"});const c="^([^]*?(?:"+mw.util.escapeRegExp(o.signatureCode)+"|"+cd.a.g.CONTENT_TIMESTAMP_REGEXP.source+".*"+(cd.a.g.UNSIGNED_TEMPLATES_PATTERN?`|${cd.a.g.UNSIGNED_TEMPLATES_PATTERN}.*`:"")+"|(?:^|\\n)\\x01.+)\\n)\\n*",l=o.replyIndentationChars.length-1,u=new RegExp(c+(`(?:[:*#\\x01]{0,${l}}(?![:*#\\n\\x01])`+(l>0?`|[:*#\\x01]{1,${l}}(?![:*\\n\\x01])`:"")+")"));let[,d]=r.match(u)||[];if(void 0===d)d=r;if(cd.a.g.OUTDENT_TEMPLATES_REGEXP){const e=r.slice(d.length).match(cd.a.g.OUTDENT_TEMPLATES_REGEXP);if(e){const[,t]=e;if(!t||t.length<=o.replyIndentationChars.length){const e=new RegExp(c),[,t]=r.match(e)||[];if(t===d)throw new s.a({type:"parse",code:"findPlace"});else d=t}}}if(this.isInSingleCommentTable&&r.slice(d.length).startsWith("|}\n"))d+="|}\n";const h=d.match(/\n([:*#]{2,}|#[:*#]*).*\n$/),[,m]=h||[];if(m)o.replyIndentationChars=m.slice(0,o.replyIndentationChars.length).replace(/:$/,cd.a.config.defaultIndentationChar);a+=d.length}switch(e){case"reply":r=n.slice(0,a)+t+n.slice(a);break;case"edit":if(i){let e,t;if(this.isOpeningSection&&void 0!==o.headingStartIndex){if(!this.section.inCode)this.section.locateInCode();if(Object(C.d)(this.section.inCode.code).length>1)throw new s.a({type:"parse",code:"delete-repliesInSection"});else({startIndex:e,contentEndIndex:t}=this.section.inCode)}else{t=o.signatureEndIndex+1;const i=n.slice(o.endIndex);if(new RegExp(`^.+\\n+[:*#]{${o.indentationChars.length+1},}`).exec(i))throw new s.a({type:"parse",code:"delete-repliesToComment"});else e=o.lineStartIndex}r=n.slice(0,e)+n.slice(t)}else{const e=o.lineStartIndex;r=n.slice(0,e)+t+n.slice(o.signatureEndIndex)}}return r}requestAuthorGenderIfNeeded(e,t=!1){if(cd.a.g.GENDER_AFFECTS_USER_STRING&&this.author.isRegistered()&&!this.author.getGender()){this.genderRequestCallbacks=this.genderRequestCallbacks||[];let t;if(!this.genderRequest){this.genderRequest=Object(f.g)([this.author]);t=e=>{console.warn(`Couldn't get the gender of user ${this.author.name}.`,e)}}if(!this.genderRequestCallbacks.includes(e)){this.genderRequest.then(e,t);this.genderRequestCallbacks.push(e)}}else if(t)setTimeout(e)}getSourcePage(){return this.section?this.section.getSourcePage():cd.a.page}getVisibleExpandNote(){if(!this.isCollapsed)return null;let e;for(let n=this.collapsedThread;n;n=null===(t=n.rootComment.getParent())||void 0===t?void 0:t.collapsedThread){var t;e=n.$expandNote;if(e.is(":visible"))break}return e}getUrl(e){if(e)return Object(u.u)(this.anchor,!0);else{if(!this.cachedUrl)this.cachedUrl=Object(u.u)(this.anchor);return this.cachedUrl}}addSublevelItem(e,t){let n,i,o="dd",a=!0,s=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){i=t;s=t.prev()}}}let r=i||s.next();const c=r.children().first();if(r.is("dd, li")&&c.hasClass("cd-commentLevel"))r=c;if(r.is("dl, ul")){a=!1;o=r.is("ul")?"li":"dd";r.addClass("cd-commentLevel cd-commentLevel-"+(this.level+1))}else if(s.is("li")){n="ol"===s.cdGetContainerListType()?"div":"li"}else if(s.is("dd"))n="dd";const l=$(`<${o}>`);let u,d;if(a)u=$("<dl>").append(l).addClass("cd-commentLevel cd-commentLevel-"+(this.level+1));if(n){d=$(`<${n}>`);if(s.is(".cd-commentLevel:not(ol) > li, .cd-commentLevel > dd"))d.addClass("cd-connectToPreviousItem");u.appendTo(d)}if(d)d.insertAfter(s);else if(u)u.insertAfter(s);else if("top"===t)l.prependTo(r);else{const e=r.children().last();l[e.hasClass("cd-replyWrapper")?"insertBefore":"insertAfter"](e)}this.subitemList.add(e,l);return{$wrappingItem:l,$wrappingList:u,$outerWrapper:d}}}Object.assign(Comment_Comment,v);var O=t.a=Comment_Comment},function(e,t,n){"use strict";n.d(t,"f",(function(){return l}));n.d(t,"g",(function(){return u}));n.d(t,"e",(function(){return d}));n.d(t,"k",(function(){return h}));n.d(t,"j",(function(){return m}));n.d(t,"b",(function(){return f}));n.d(t,"d",(function(){return g}));n.d(t,"a",(function(){return p}));n.d(t,"i",(function(){return b}));n.d(t,"h",(function(){return v}));n.d(t,"c",(function(){return y}));var i=n(40),o=n.n(i),a=n(0),s=n(18),r=n(1),c=n(5);function l(e){const t=e.join("|");return new RegExp(`(<(?:${t})(?: [\\w ]+(?:=[^<>]+?)?| *)>)([^]*?)(<\\/(?:${t})(?: [\\w ]+)? *>)`,"g")}function u(e){return e.replace(l(["nowiki","syntaxhighlight","source","pre"]),(e,t,n,i)=>t+" ".repeat(n.length)+i).replace(/<!--([^]*?)-->/g,(e,t)=>"\x01"+" ".repeat(t.length+5)+"\x02").replace(/[\u200e\u200f]/g,e=>" ".repeat(e.length)).replace(/(<\/?(?:br|p)\b.*)(\n+)(>)/g,(e,t,n,i)=>t+" ".repeat(n.length)+i)}function d(e){const t=g(e);return t.length?t[0].timestamp:null}function h(e){return e.replace(/<!--[^]*?-->/g,"").replace(/\x01 *\x02/g,"").replace(/(\[\[:?(?:[^|[\]<>\n:]+:)?([^|[\]<>\n]+)\|)(\]\])/g,"$1$2$3").replace(a.a.g.FILE_EMBED_REGEXP,"$1").replace(/\[\[:?(?:[^|[\]<>\n]+\|)?(.+?)\]\]/g,"$1").replace(/\{\{:?(?:[^|{}<>\n]+)(?:\|(.+?))?\}\}/g,"$1").replace(/\[https?:\/\/[^[\]<>"\n ]+ *([^\]]*)\]/g,"$1").replace(/'''(.+?)'''/g,"$1").replace(/''(.+?)''/g,"$1").replace(/<br ?\/?>/g," ").replace(/<\w+(?: [\w ]+(?:=[^<>]+?)?| *\/?)>/g,"").replace(/<\/\w+(?: [\w ]+)? *>/g,"").replace(/ {2,}/g," ").trim()}function m(e){return p(e).replace(/\s+/g," ").trim()}function f(e){return e.replace(/<(\w+(?: [\w ]+(?:=[^<>]+?)?| *\/?)|\/\w+(?: [\w ]+)? *)>/g,"%3C$1%3E").replace(/\[/g,"%5B").replace(/\]/g,"%5D").replace(/\{/g,"%7B").replace(/\|/g,"%7C").replace(/\}/g,"%7D").replace(/\s+/g," ")}function g(e){const t=u(e).replace(a.a.g.QUOTE_REGEXP,(e,t,n,i)=>t+" ".repeat(n.length)+i).replace(a.a.g.COMMENT_ANTIPATTERNS_REGEXP,e=>" ".repeat(e.length));let n=function(e,t){const n=new RegExp(`^((.*)(${a.a.g.CONTENT_TIMESTAMP_REGEXP.source})(?!["\xbb])(?:\\}\\}|</small>)?).*(?:\n*|$)`,"igm"),i=new RegExp(`^(((.*)${a.a.g.CAPTURE_USER_NAME_PATTERN}.{1,251})(${a.a.g.CONTENT_TIMESTAMP_REGEXP.source})(?:\\}\\}|</small>)?.*)(?:\n*|$)`,"igm"),o=new RegExp(a.a.g.CAPTURE_USER_NAME_PATTERN,"ig");let r,c=[];for(;r=n.exec(e);){const e=r[0];i.lastIndex=0;const n=i.exec(e);let a,l,u,d,h,m;if(n){a=s.a.getUser(p(n[4]));const e=r.index+n[2].length,i=e+n[6].length;l=t.slice(e,i);u=r.index+n[3].length;d=r.index+n[1].length;m=t.slice(u,d);h=r.index+n[0].length;let c;o.lastIndex=0;let f=e-r.index-251;f=Math.max(0,f);const g=n[0].slice(f);for(;c=o.exec(g);){if(c[2])continue;if(s.a.getUser(p(c[1]))===a){u=r.index+f+c.index;m=t.slice(u,d);break}}}else{u=r.index+r[2].length;d=r.index+r[1].length;m=t.slice(u,d);const e=u+r[3].length;l=t.slice(u,e);h=r.index+r[0].length}c.push({author:a,timestamp:l,startIndex:u,endIndex:d,dirtyCode:m,nextCommentStartIndex:h})}return c}(t,e);const i=function(e,t,n){const i=[];if(a.a.g.UNSIGNED_TEMPLATES_REGEXP){let o;for(;o=a.a.g.UNSIGNED_TEMPLATES_REGEXP.exec(e);){let e,r;if(a.a.g.CONTENT_TIMESTAMP_NO_TZ_REGEXP.test(o[2])){r=o[2];e=o[3]}else if(a.a.g.CONTENT_TIMESTAMP_NO_TZ_REGEXP.test(o[3])){r=o[3];e=o[2]}else e=o[2];e=e&&s.a.getUser(p(e));if(r&&!a.a.g.CONTENT_TIMESTAMP_REGEXP.test(r)){r+=" (UTC)";if(!e)e="<undated>"}let c=o.index;const l=o.index+o[1].length;let u=t.slice(c,l);const d=o.index+o[0].length,h=n.findIndex(e=>e.nextCommentStartIndex===d);if(-1!==h)n.splice(h,1);i.push({author:e,timestamp:r,startIndex:c,endIndex:l,dirtyCode:u,nextCommentStartIndex:d})}}return i}(t,e,n);n.push(...i);const o=t.indexOf(a.a.g.SIGN_CODE);if(-1!==o){const e=o,i=t.slice(e).indexOf("\n")+1;n.push({author:a.a.user.name,startIndex:e,nextCommentStartIndex:e+i})}if(i.length||-1!==o)n.sort((e,t)=>e.startIndex>t.startIndex?1:-1);n=n.filter(e=>e.author);n.forEach((e,t)=>{e.commentStartIndex=0===t?0:n[t-1].nextCommentStartIndex});n.forEach((e,t)=>{const{date:n}=e.timestamp&&Object(c.l)(e.timestamp)||{};e.id=t;e.date=n;delete e.nextCommentStartIndex});return n}function p(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=o()(t);return t}}function b(e,t,n){let i=0;const o=[];do{let a=e.indexOf("{{",i),s=e.indexOf("}}",i);if(-1===a&&-1===s&&!o.length)break;if(-1!==a&&(a<s||-1===s)){o.push(a);i=a+2}else{a=o.pop();if(void 0===a)if(-1===s){i+=2;continue}else a=0;if(-1===s)s=e.length;s+=2;const r=e.substring(a,s),c=void 0===n?"\x01"+t.push(r)+"_template\x02":"\x01".repeat(n)+" ".repeat(r.length-n-1)+"\x02";e=e.substring(0,a)+c+e.substr(s);i=s-r.length}}while(void 0===n||o.length);return{code:e,hidden:t}}function v(e){let t=[];const n=(n,i)=>{e=Object(r.x)(e,n,t,i)},i=(e,t)=>{e.forEach(e=>{n(new RegExp(`<${e}(?: [^>]+)?>[\\s\\S]+?<\\/${e}>`,"gi"),t)})};i(["pre","source","syntaxhighlight"],"block");i(["gallery"],"table");i(["nowiki"],"inline");(()=>{n(/\{\{(?:[^{]\{?)+?\}\}/g,"template");({code:e,hidden:t}=b(e,t))})();n(/^(:* *)(\{\|[^]*?\n\|\})/gm,"table");return{code:e,hidden:t}}function y(e){return e.replace(/([^\n])\n?$/,"$1\n\n")}},function(e,t,n){"use strict";n.d(t,"i",(function(){return g}));n.d(t,"j",(function(){return p}));n.d(t,"h",(function(){return b}));n.d(t,"b",(function(){return v}));n.d(t,"a",(function(){return w}));n.d(t,"l",(function(){return x}));n.d(t,"k",(function(){return S}));n.d(t,"g",(function(){return N}));n.d(t,"f",(function(){return A}));n.d(t,"d",(function(){return P}));n.d(t,"e",(function(){return I}));n.d(t,"c",(function(){return L}));var i=n(2),o=n.n(i),a=n(30),s=n.n(a),r=n(3),c=n(0),l=n(18),u=n(4),d=n(1),h=n(10);let m,f;function g(e,t="post"){return new Promise((n,i)=>{c.a.g.mwApi[t](e,{success:e=>{if(e.error)i(["api",e]);else n(e)},error:(e,t)=>{i(["http",t])}})})}function p(e,t){const n={action:"parse",text:e,contentmodel:"wikitext",prop:["text","modules","jsconfigvars"],pst:!0,disabletoc:!0,disablelimitreport:!0,disableeditsection:!0},i=Object.assign({},n,t);return c.a.g.mwApi.post(i).then(e=>{var n;const i=null===(n=e.parse)||void 0===n?void 0:n.text;if(i){mw.loader.load(e.parse.modules);mw.loader.load(e.parse.modulestyles)}else throw new r.a({type:"api",code:"noData"});const o=e.parse.parsedsummary;if(null!=t&&t.summary&&!o)throw new r.a({type:"api",code:"noData"});return{html:i,parsedSummary:o}},d.w)}function b(e=!1){if(e&&m)return m;Object(u.c)();m=c.a.g.mwApi.post({action:"query",meta:"userinfo",uiprop:["options","rights"]}).then(e=>{var t;const n=null===(t=e.query)||void 0===t?void 0:t.userinfo,i=null==n?void 0:n.options,o=null==n?void 0:n.rights;if(!i||!o)throw new r.a({type:"api",code:"noData"});const a=i[c.a.g.VISITS_OPTION_NAME],l=a?s.a.decompressFromEncodedURIComponent(a):"",u=Object(h.h)(l),d=i[c.a.g.WATCHED_SECTIONS_OPTION_NAME],m=d?s.a.decompressFromEncodedURIComponent(d):"",f=Object(h.i)(m);c.a.g.USER_RIGHTS=o;return{options:i,visits:u,watchedSections:f,rights:o}},d.w);return m}function v(e){return y.apply(this,arguments)}function y(){return(y=o()((function*(e){var t;const n=[],i=null!==(t=c.a.g.USER_RIGHTS)&&void 0!==t&&t.includes("apihighlimits")?500:50;let o;for(;o=e.splice(0,i).join("|");){const e=yield c.a.g.mwApi.post({action:"query",pageids:o}).catch(d.w);if(e.error)throw new r.a({type:"api",code:"error",apiData:e});const t=e.query,i=null==t?void 0:t.pages;if(!i)throw new r.a({type:"api",code:"noData"});n.push(...i)}return n}))).apply(this,arguments)}function w(e){return E.apply(this,arguments)}function E(){return(E=o()((function*(e){var t;const n=[],i=[],o=[],a=null!==(t=c.a.g.USER_RIGHTS)&&void 0!==t&&t.includes("apihighlimits")?500:50;let s;for(;s=e.splice(0,a).join("|");){const e=yield c.a.g.mwApi.post({action:"query",titles:s,redirects:!0}).catch(d.w);if(e.error)throw new r.a({type:"api",code:"error",apiData:e});const t=e.query,a=null==t?void 0:t.pages;if(!a)throw new r.a({type:"api",code:"noData"});n.push(...t.normalized||[]);i.push(...t.redirects||[]);o.push(...a)}return{normalized:n,redirects:i,pages:o}}))).apply(this,arguments)}function C(e,t,n){return T.apply(this,arguments)}function T(){return(T=o()((function*(e,t,n){if(t&&t.length>65535)throw new r.a({type:"internal",code:"sizeLimit",details:{action:n}});const i=yield g(c.a.g.mwApi.assertCurrentUser({action:n,optionname:e,optionvalue:void 0===t&&"globalpreferences"===n?"":t}),"postWithEditToken").catch(d.w);if(!i||"success"!==i[n])throw new r.a({type:"api",code:"noSuccess",details:{action:n}})}))).apply(this,arguments)}function x(e,t){return k.apply(this,arguments)}function k(){return(k=o()((function*(e,t){yield C(e,t,"options")}))).apply(this,arguments)}function S(e,t){return O.apply(this,arguments)}function O(){return(O=o()((function*(e,t){if(c.a.config.useGlobalPreferences)try{yield C(e,t,"globalpreferences")}catch(n){if(n instanceof r.a&&n.data.apiData&&"badvalue"===n.data.apiData.error.code)yield x(e,t);else throw n}else yield x(e,t)}))).apply(this,arguments)}function N(e){return _.apply(this,arguments)}function _(){return(_=o()((function*(e,t=!1){var n;const i=e.filter(e=>!e.getGender()&&e.isRegistered()).filter(d.X).map(e=>e.name),o=null!==(n=c.a.g.USER_RIGHTS)&&void 0!==n&&n.includes("apihighlimits")?500:50;let a;for(;a=i.splice(0,o).join("|");){var s;const e={action:"query",list:"users",ususers:a,usprop:"gender"},n=t?g(e):c.a.g.mwApi.post(e),i=null===(s=(yield n.catch(d.w)).query)||void 0===s?void 0:s.users;if(!i)throw new r.a({type:"api",code:"noData"});i.filter(e=>e.gender).forEach(e=>{l.a.getUser(e.name).setGender(e.gender)})}}))).apply(this,arguments)}function A(e){e=Object(d.j)(e);const t=new Promise((n,i)=>{setTimeout(o()((function*(){try{var o;if(t!==f)throw new r.a;const i=null===(o=(yield c.a.g.mwApi.get({action:"opensearch",search:e,namespace:3,redirects:"resolve",limit:10}).catch(d.w))[1])||void 0===o?void 0:o.map(e=>(e.match(c.a.g.USER_NAMESPACES_REGEXP)||[])[1]).filter(d.h).filter(e=>!e.includes("/"));if(!i)throw new r.a({type:"api",code:"noData"});if(i.length)n(i);else{var a,s;const t=yield c.a.g.mwApi.get({action:"query",list:"allusers",auprefix:e}).catch(d.w),i=null==t?void 0:null===(a=t.query)||void 0===a?void 0:null===(s=a.allusers)||void 0===s?void 0:s.map(e=>e.name);if(!i)throw new r.a({type:"api",code:"noData"});n(i)}}catch(e){i(e)}})),100)});f=t;return t}function P(e){let t=!1;if(c.a.g.COLON_NAMESPACES_PREFIX_REGEXP.test(e)){e=e.slice(1);t=!0}const n=new Promise((i,o)=>{setTimeout(()=>{try{if(n!==f)throw new r.a;c.a.g.mwApi.get({action:"opensearch",search:e,redirects:"return",limit:10}).then(n=>{var o;const a=new RegExp("^"+mw.util.escapeRegExp(e[0]),"i"),s=null===(o=n[1])||void 0===o?void 0:o.map(n=>n.replace(a,()=>e[0]).replace(/^/,t?":":""));if(!s)throw new r.a({type:"api",code:"noData"});i(s)},e=>{Object(d.w)(e)})}catch(e){o(e)}},100)});f=n;return n}function I(e){const t=new Promise((n,i)=>{setTimeout(()=>{try{if(t!==f)throw new r.a;c.a.g.mwApi.get({action:"opensearch",search:e.startsWith(":")?e.slice(1):"Template:"+e,redirects:"return",limit:10}).then(t=>{var i;const o=new RegExp("^"+mw.util.escapeRegExp(e[0]),"i"),a=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(o,()=>e[0]));if(!a)throw new r.a({type:"api",code:"noData"});n(a)},e=>{Object(d.w)(e)})}catch(e){i(e)}},100)});f=t;return t}function L(e){return M.apply(this,arguments)}function M(){return(M=o()((function*(e){var t;const n={},i=[],o=[],a=e.slice(),s=null!==(t=c.a.g.USER_RIGHTS)&&void 0!==t&&t.includes("apihighlimits")?500:50;let l;for(;l=a.splice(0,s).join("|");){const e=yield c.a.g.mwApi.post({action:"query",titles:l}).catch(d.w);if(e.error)throw new r.a({type:"api",code:"error",apiData:e});const t=e.query,n=null==t?void 0:t.pages;if(!n)throw new r.a({type:"api",code:"noData"});i.push(...t.normalized||[]);o.push(...n)}const u={};i.forEach(e=>{u[e.to]=e.from});o.forEach(e=>{n[u[e.title]||e.title]={exists:!e.missing,normalized:e.title}});return n}))).apply(this,arguments)}},function(e,t,n){"use strict";n.d(t,"h",(function(){return m}));n.d(t,"i",(function(){return g}));n.d(t,"b",(function(){return p}));n.d(t,"a",(function(){return v}));n.d(t,"e",(function(){return y}));n.d(t,"c",(function(){return E}));n.d(t,"f",(function(){return x}));n.d(t,"d",(function(){return S}));n.d(t,"g",(function(){return N}));var i=n(2),o=n.n(i),a=n(30),s=n.n(a),r=n(3),c=n(0),l=n(1),u=n(9),d=n(4);function h(e){return Object.keys(e).map(t=>`${t},${e[t].join(",")}\n`).join("").trim()}function m(e){const t={},n=/^(\d+), *(.+)$/gm;let i;for(;i=n.exec(e);)t[i[1]]=i[2].split(",");return t}function f(e){return Object.keys(e).filter(t=>e[t].length).map(t=>` ${t} ${e[t].join("\n")}\n`).join("").trim()}function g(e){const t={},n=e.split(/(?:^|\n )(\d+) /).slice(1);let i;for(let e=0,o=!0;e<n.length;e++,o=!o)if(o)i=n[e];else t[i]=n[e].split("\n");return t}function p(){return b.apply(this,arguments)}function b(){return(b=o()((function*({options:e,omitLocal:t=!1,reuse:n=!1}={}){if(!e)({options:e}=yield Object(u.h)(n));let i,o;try{i=JSON.parse(e[c.a.g.SETTINGS_OPTION_NAME])||{}}catch(e){i={}}try{o=JSON.parse(e[c.a.g.LOCAL_SETTINGS_OPTION_NAME])||{}}catch(e){o={}}let a={};Object.keys(d.p.default).forEach(e=>{(d.p.aliases[e]||[]).concat(e).forEach(t=>{if(void 0!==i[t]&&(typeof i[t]==typeof d.p.default[e]||null===d.p.default[e]))a[e]=i[t];if(void 0!==o[t]&&(typeof o[t]==typeof d.p.default[e]||null===d.p.default[e]))a[e]=o[t]})});if(!t)Object.assign(a,v());return a}))).apply(this,arguments)}function v(){const e={};Object.keys(d.p.default).forEach(t=>{(d.p.aliases[t]||[]).concat(t).forEach(n=>{const i="cdLocal"+Object(l.j)(n);if(i in window&&(typeof window[i]==typeof d.p.default[t]||null===d.p.default[t]))e[t]=window[i]})});return e}function y(){return w.apply(this,arguments)}function w(){return(w=o()((function*(e=c.a.settings){if("<unregistered>"!==c.a.user.name)if(c.a.config.useGlobalPreferences){const t={},n={};Object.keys(e).forEach(i=>{if(d.p.local.includes(i))n[i]=e[i];else t[i]=e[i]});yield Promise.all([Object(u.l)(c.a.g.LOCAL_SETTINGS_OPTION_NAME,JSON.stringify(n)),Object(u.k)(c.a.g.SETTINGS_OPTION_NAME,JSON.stringify(t))])}else yield Object(u.l)(c.a.g.LOCAL_SETTINGS_OPTION_NAME,JSON.stringify(e))}))).apply(this,arguments)}function E(){return C.apply(this,arguments)}function C(){return(C=o()((function*(e=!1){let t,n;if("<unregistered>"===c.a.user.name){t=[];n=[]}else{const i=null!==mw.user.options.get(c.a.g.VISITS_OPTION_NAME),o=c.a.state.isPageFirstParsed&&!i?Promise.resolve({}):Object(u.h)(e).then(e=>e.visits);t=yield o;const a=mw.config.get("wgArticleId");if(a){t[a]=t[a]||[];n=t[a]}}c.a.g.visits=t;c.a.g.currentPageVisits=n;return{visits:t,currentPageVisits:n}}))).apply(this,arguments)}function T(e){const t=Object.assign({},e),n=Object.keys(t).reduce((e,n)=>e.concat(t[n]),[]);n.sort();const i=n[Math.floor(n.length/10)];Object.keys(t).forEach(e=>{t[e]=t[e].filter(e=>e>=i);if(!t[e].length)delete t[e]});return t}function x(e){return k.apply(this,arguments)}function k(){return(k=o()((function*(e){if(!e||"<unregistered>"===c.a.user.name)return;const t=h(e),n=s.a.compressToEncodedURIComponent(t);try{yield Object(u.l)(c.a.g.VISITS_OPTION_NAME,n)}catch(t){if(t instanceof r.a){const{type:n,code:i}=t.data;if("internal"===n&&"sizeLimit"===i)x(T(e));else console.error(t)}else console.error(t)}}))).apply(this,arguments)}function S(){return O.apply(this,arguments)}function O(){return(O=o()((function*(e=!1,t={}){const n=null!==mw.user.options.get(c.a.g.WATCHED_SECTIONS_OPTION_NAME),i=c.a.state.isPageFirstParsed&&!n?Promise.resolve({}):Object(u.h)(e).then(e=>e.watchedSections),o=yield i,a=mw.config.get("wgArticleId");let s;if(a){o[a]=o[a]||[];s=o[a];Object(l.b)(s,t.justWatchedSection);Object(l.K)(s,t.justUnwatchedSection)}c.a.g.watchedSections=o;c.a.g.currentPageWatchedSections=s}))).apply(this,arguments)}function N(){return _.apply(this,arguments)}function _(){return(_=o()((function*(){const e=f(c.a.g.watchedSections),t=s.a.compressToEncodedURIComponent(e);yield Object(u.l)(c.a.g.WATCHED_SECTIONS_OPTION_NAME,t)}))).apply(this,arguments)}},function(e,t,n){"use strict";var i=n(12),o=n(7),a=n(0),s=n(26),r=n(1),c=n(5),l=n(4),u=n(8);let d,h,m;t.a={unseenCommentCount:null,hiddenNewCommentCount:0,mount(){this.$element=$("<div>").attr("id","cd-navPanel").appendTo(document.body);this.refreshButton=new i.a({tagName:"div",classes:["cd-navPanel-button"],id:"cd-navPanel-refreshButton",action:e=>{this.refreshClick(e.ctrlKey)}});this.updateRefreshButtonTooltip(0);this.previousButton=new i.a({tagName:"div",classes:["cd-navPanel-button"],id:"cd-navPanel-previousButton",tooltip:`${a.a.s("navpanel-previous")} ${a.a.mws("parentheses","W")}`,action:()=>{this.goToPreviousNewComment()}}).hide();this.nextButton=new i.a({tagName:"div",classes:["cd-navPanel-button"],id:"cd-navPanel-nextButton",tooltip:`${a.a.s("navpanel-next")} ${a.a.mws("parentheses","S")}`,action:()=>{this.goToNextNewComment()}}).hide();this.firstUnseenButton=new i.a({tagName:"div",classes:["cd-navPanel-button"],id:"cd-navPanel-firstUnseenButton",tooltip:`${a.a.s("navpanel-firstunseen")} ${a.a.mws("parentheses","F")}`,action:()=>{this.goToFirstUnseenComment()}}).hide();this.commentFormButton=new i.a({tagName:"div",classes:["cd-navPanel-button"],id:"cd-navPanel-commentFormButton",tooltip:`${a.a.s("navpanel-commentform")} ${a.a.mws("parentheses","C")}`,action:()=>{this.goToNextCommentForm()}}).hide();this.$element.append([this.refreshButton.element,this.previousButton.element,this.nextButton.element,this.firstUnseenButton.element,this.commentFormButton.element])},unmount(){this.$element.remove();this.$element=null},isMounted(){return Boolean(this.$element)},reset(){this.refreshButton.setLabel("");this.updateRefreshButtonTooltip(0);this.previousButton.hide();this.nextButton.hide();this.firstUnseenButton.hide();this.commentFormButton.hide();clearTimeout(d)},fill(){if(a.a.comments.some(e=>e.isNew)){this.updateRefreshButtonTooltip(0);this.previousButton.show();this.nextButton.show();this.updateFirstUnseenButton()}},refreshClick(e){Object(l.k)({commentAnchor:s.a.relevantNewCommentAnchor,markAsRead:e})},goToNewCommentInDirection(e){if(a.a.state.isAutoScrollInProgress)return;const t=o.a.findInViewport(e);if(!t)return;const n="backward"===e,i=Object(r.L)(a.a.comments,t.id,n).filter(e=>e.isNew&&!e.isInViewport()),s=i.find(e=>!1===e.isInViewport())||i[0];if(s)s.scrollTo(!0,!1,!1,()=>{s.registerSeen(e,!0);this.updateFirstUnseenButton()})},goToPreviousNewComment(){this.goToNewCommentInDirection("backward")},goToNextNewComment(){this.goToNewCommentInDirection("forward")},goToFirstUnseenComment(){if(a.a.state.isAutoScrollInProgress)return;const e=a.a.comments.filter(e=>!1===e.isSeen),t=e.find(e=>!1===e.isInViewport())||e[0];if(t)t.scrollTo(!0,!1,!1,()=>{t.registerSeen("forward",!0);this.updateFirstUnseenButton()})},goToNextCommentForm(e=!1){const t=a.a.commentForms.filter(t=>e||!t.$element.cdIsInViewport(!0)).sort((e,t)=>{let n=e.$element.get(0).getBoundingClientRect().top;if(n<0)n+=2*$(document).height();let i=t.$element.get(0).getBoundingClientRect().top;if(i<0)i+=2*$(document).height();return n-i})[0];if(t){t.$element.cdScrollIntoView("center");Object(r.l)(t.commentInput)}},updateRefreshButton(e,t,n){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",n);this.hiddenNewCommentCount=e},updateRefreshButtonTooltip(e,t){clearTimeout(d);h=e;m=t;let n=null;const i=a.a.comments.some(e=>e.isNew);if(e){n=a.a.s("navpanel-newcomments-count",e)+" "+a.a.s("navpanel-newcomments-refresh")+" "+a.a.mws("parentheses","R");if(i)n+="\n"+a.a.s("navpanel-markasread");const o=Object(u.k)(a.a.s("bullet")),s=a.a.mws("comma-separator"),r="rtl"===a.a.g.CONTENT_DIR?"\u200f":"";t.forEach((e,t)=>{let i;if("string"==typeof t)i=e[0].section.headline;else if(null!==t)i=t.headline;n+=i?"\n\n"+i:"\n";e.forEach(e=>{var t;n+="\n";const i=null!==(t=e.parent)&&void 0!==t&&t.author&&e.level>1?a.a.s("navpanel-newcomments-names",e.author.name,e.parent.author.name):e.author.name,l=e.date?Object(c.b)(e.date):a.a.s("navpanel-newcomments-unknowndate");n+=o+" "+i+r+s+l})});if("relative"===a.a.settings.timestampFormat&&!a.a.settings.modifyToc)d=setTimeout(()=>{this.updateTimestampsInRefreshButtonTooltip()},a.a.g.MILLISECONDS_IN_MINUTE)}else{n=a.a.s("navpanel-refresh")+" "+a.a.mws("parentheses","R");if(i)n+="\n"+a.a.s("navpanel-markasread")}this.refreshButton.setTooltip(n)},updateTimestampsInRefreshButtonTooltip(){this.updateRefreshButtonTooltip(h,m)},updateFirstUnseenButton(){if(this.isMounted()){this.unseenCommentCount=a.a.comments.filter(e=>!1===e.isSeen).length;if(this.unseenCommentCount)this.firstUnseenButton.show().setLabel(this.unseenCommentCount);else this.firstUnseenButton.hide()}},updateCommentFormButton(){if(a.a.state.isAutoScrollInProgress||!this.isMounted())return;const e=a.a.commentForms.some(e=>!e.$element.cdIsInViewport(!0));this.commentFormButton[e?"show":"hide"]()}}},function(e,t,n){"use strict";let i={};t.a=class{constructor({element:e,buttonElement:t,labelElement:n,tagName:o="a",classes:a=[],id:s,href:r,label:c,tooltip:l,action:u}={}){if(!e)e=function(e){if(!i[e]){const t=document.createElement(e);t.tabIndex=0;t.setAttribute("role","button");i[e]=t}return i[e]}(o).cloneNode(!0);if(s)e.id=s;if(a.length)e.classList.add(...a);this.element=e;this.buttonElement=t||e;this.labelElement=n||e;if(void 0!==r)this.setHref(r);if(void 0!==c)this.setLabel(c);if(void 0!==l)this.setTooltip(l);if(void 0!==u)this.setAction(u)}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}setAction(e){this.buttonElement.onclick=e?t=>{if(!this.isDisabled()){t.preventDefault();e(t)}}:e;this.buttonElement.onkeydown=e?t=>{if(!this.isDisabled()&&[13,32].includes(t.keyCode)){t.preventDefault();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}}},function(e,t,n){"use strict";var i=n(2),o=n.n(i),a=n(29),s=n(12),r=n(3),c=n(7),cd=n(0),l=n(1);function u(e,t){const n=e.lastFocused||new Date(0),i=t.lastFocused||new Date(0);if(i>n)return 1;else if(i<n)return-1;else return 0}var d={getDefaultPreloadConfig:()=>({editIntro:void 0,commentTemplate:void 0,headline:void 0,summary:void 0,noHeadline:!1,omitSignature:!1}),modeToProperty:e=>"replyInSection"===e?"reply":e,getLastActive:()=>cd.a.commentForms.slice().sort(u)[0]||null,getLastActiveAltered:()=>cd.a.commentForms.slice().sort(u).find(e=>e.isAltered())||null,createAddSectionForm(e=T.getDefaultPreloadConfig(),t=!1,n){const i=cd.a.g.addSectionForm;if(i){if(!Object(l.c)(e,i.preloadConfig)){mw.notify(cd.a.s("cf-error-formconflict"),{type:"error"});return}i.$element.cdScrollIntoView("center");Object(l.l)(i.headlineInput||i.commentInput)}else cd.a.g.addSectionForm=new T({mode:"addSection",target:cd.a.page,preloadConfig:e,isNewTopicOnTop:t,dataToRestore:n})}},h=n(14),m=n(15),f=n(11),g=n(18),p=n(6),b=n(4),v=n(5),y=n(8),w=n(9),E=n(19);let C=0;class CommentForm_CommentForm{constructor({mode:e,target:t,dataToRestore:n,preloadConfig:i,isNewTopicOnTop:o}){var a,s;this.mode=e;this.setTargets(t);this.preloadConfig=i;this.didReplaceDtForm=null!==(a=null==n?void 0:n.didReplaceDtForm)&&void 0!==a?a:!1;this.isNewTopicOnTop=o;if(this.target instanceof c.a){var r;this.sectionHeadline=null===(r=this.target.section)||void 0===r?void 0:r.headline}else if(this.target instanceof m.a)this.sectionHeadline=this.target.headline;this.id=C++;this.isSummaryAltered=null!==(s=null==n?void 0:n.isSummaryAltered)&&void 0!==s?s:!1;this.isSectionOpeningCommentEdited="edit"===this.mode&&this.target.isOpeningSection;this.operations=[];if("addSection"===this.mode)this.addEditNotices();const u=cd.a.config.customCommentFormModules.filter(e=>!e.checkFunc||e.checkFunc()).map(e=>e.name);mw.loader.using(u).then(()=>{mw.hook("convenientDiscussions.commentFormModulesReady").fire(this,cd.a)});this.createContents(n,u);this.addEvents();this.initAutocomplete();this.addToPage();if("addSection"===this.mode){$("#ca-addsection").addClass("selected");$("#ca-view").removeClass("selected")}if(!cd.a.user.isRegistered())this.showMessage(cd.a.sParse("error-anoneditwatning"),{type:"warning",name:"anonEditWarning"});cd.a.commentForms.push(this);if(n){this.originalComment=n.originalComment;this.originalHeadline=n.originalHeadline;if(n.lastFocused)this.lastFocused=new Date(n.lastFocused);if(n.didReplaceDtForm)Object(l.l)(this.headlineInput||this.commentInput)}else{this.$element.cdScrollIntoView("center",!0,()=>{if("edit"!==this.mode)Object(l.l)(this.headlineInput||this.commentInput);f.a.updateCommentFormButton()});if("edit"===this.mode)this.loadComment();else{var d;if(null!==(d=this.preloadConfig)&&void 0!==d&&d.commentTemplate)this.preloadTemplate();else this.originalComment="";if(this.headlineInput){var g,p;this.headlineInput.setValue((null===(g=this.preloadConfig)||void 0===g?void 0:g.headline)||"");this.originalHeadline=(null===(p=this.preloadConfig)||void 0===p?void 0:p.headline)||""}if(!(this.target instanceof h.a))this.checkCode()}}mw.hook("convenientDiscussions.commentFormCreated").fire(this,cd.a)}setTargets(e){this.target=e;if(this.target instanceof c.a){this.targetSection=this.target.section;this.targetComment=this.target}else if(this.target instanceof m.a){var t;this.targetSection=this.target;if("replyInSection"===this.mode&&!this.target.replyButton)throw new r.a;if(null!==(t=this.target.comments[0])&&void 0!==t&&t.isOpeningSection)this.targetComment=this.target.comments[0]}this.targetPage=this.targetSection?this.targetSection.getSourcePage():cd.a.page}createInputs(e){var t,n,i;if(["addSection","addSubsection"].includes(this.mode)&&(null===(t=this.preloadConfig)||void 0===t||!t.noHeadline)||this.isSectionOpeningCommentEdited){var o,a;const t=null===(o=this.targetSection)||void 0===o?void 0:o.getParent();if("addSubsection"===this.mode)this.headlineInputPlaceholder=cd.a.s("cf-headline-subsection",this.targetSection.headline);else if("edit"===this.mode&&t)this.headlineInputPlaceholder=cd.a.s("cf-headline-subsection",t.headline);else this.headlineInputPlaceholder=cd.a.s("cf-headline-topic");this.headlineInput=new OO.ui.TextInputWidget({value:null!==(a=null==e?void 0:e.headline)&&void 0!==a?a:"",placeholder:this.headlineInputPlaceholder,classes:["cd-commentForm-headlineInput"],tabIndex:String(this.id)+"11"})}let s,r=this.headlineInput?5:3;if("firefox"===$.client.profile().name)r-=1;if("replyInSection"===this.mode||"reply"===this.mode&&this.target.isOpeningSection)s=cd.a.s("cf-comment-placeholder-replytosection",this.targetSection.headline);else if("reply"===this.mode)this.target.requestAuthorGenderIfNeeded(()=>{this.commentInput.$input.attr("placeholder",Object(l.J)(cd.a.s("cf-comment-placeholder-replytocomment",this.target.author.name,this.target.author)))},!0);this.commentInput=new OO.ui.MultilineTextInputWidget({value:null!==(n=null==e?void 0:e.comment)&&void 0!==n?n:"",placeholder:s,autosize:!0,rows:r,maxRows:30,classes:["cd-commentForm-commentInput"],tabIndex:String(this.id)+"12"});this.commentInput.$input.addClass("ime-position-inside");this.summaryInput=new OO.ui.TextInputWidget({value:null!==(i=null==e?void 0:e.summary)&&void 0!==i?i:"",maxLength:cd.a.g.SUMMARY_LENGTH_LIMIT,placeholder:cd.a.s("cf-summary-placeholder"),classes:["cd-commentForm-summaryInput"],tabIndex:String(this.id)+"13"});this.summaryInput.$input.codePointLimit(cd.a.g.SUMMARY_LENGTH_LIMIT);mw.widgets.visibleCodePointLimit(this.summaryInput,cd.a.g.SUMMARY_LENGTH_LIMIT);this.updateAutoSummary(!(null!=e&&e.summary))}createCheckboxes(e){var t;if("edit"===this.mode){var n;[this.minorField,this.minorCheckbox]=Object(p.b)({value:"minor",selected:null!==(n=null==e?void 0:e.minor)&&void 0!==n?n:!0,label:cd.a.s("cf-minor"),tabIndex:String(this.id)+"20"})}const i=cd.a.settings.watchOnReply&&"edit"!==this.mode||$("#ca-unwatch").length||mw.user.options.get(mw.config.get("wgArticleId")?"watchdefault":"watchcreations");[this.watchField,this.watchCheckbox]=Object(p.b)({value:"watch",selected:null!==(t=null==e?void 0:e.watch)&&void 0!==t?t:i,label:cd.a.s("cf-watch"),tabIndex:String(this.id)+"21"});if(this.targetSection||"addSection"===this.mode){var o,a;const t="addSubsection"!==this.mode&&(this.targetSection&&this.targetSection.level<=2||"addSection"===this.mode),n=cd.a.s("cf-watchsection-"+(t?"topic":"subsection")),i=cd.a.settings.watchSectionOnReply&&"edit"!==this.mode||(null===(o=this.targetSection)||void 0===o?void 0:o.isWatched);[this.watchSectionField,this.watchSectionCheckbox]=Object(p.b)({value:"watchSection",selected:null!==(a=null==e?void 0:e.watchSection)&&void 0!==a?a:i,label:n,tabIndex:String(this.id)+"22",title:cd.a.s("cf-watchsection-tooltip")})}if(["addSection","addSubsection"].includes(this.mode)){var s;[this.omitSignatureField,this.omitSignatureCheckbox]=Object(p.b)({value:"omitSignature",selected:null!==(s=null==e?void 0:e.omitSignature)&&void 0!==s?s:!1,label:cd.a.s("cf-omitsignature"),tabIndex:String(this.id)+"25"})}if("edit"===this.mode&&(this.target.isOpeningSection?1===this.targetSection.comments.length:!this.target.getChildren().length)){var r;const t=null!==(r=null==e?void 0:e.delete)&&void 0!==r?r:!1;[this.deleteField,this.deleteCheckbox]=Object(p.b)({value:"delete",selected:t,label:cd.a.s("cf-delete"),tabIndex:String(this.id)+"26"})}this.checkboxesLayout=new OO.ui.HorizontalLayout({classes:["cd-commentForm-checkboxes"],items:[this.minorField,this.watchField,this.watchSectionField,this.omitSignatureField,this.deleteField].filter(l.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:String(this.id)+"30"});if(!cd.a.g.$popupsOverlay)cd.a.g.$popupsOverlay=$("<div>").addClass("cd-popupsOverlay").appendTo(document.body);this.helpPopupButton=new OO.ui.PopupButtonWidget({label:cd.a.s("cf-help"),framed:!1,classes:["cd-button-ooui"],popup:{head:!1,$content:Object(l.Y)(cd.a.sParse("cf-help-content",cd.a.config.mentionCharacter),{tagName:"div",targetBlank:!0}),padded:!0,align:"center",width:400},$overlay:cd.a.g.$popupsOverlay,tabIndex:String(this.id)+"31"});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:String(this.id)+"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:String(this.id)+"33"});this.viewChangesButton=new OO.ui.ButtonWidget({label:cd.a.s("cf-viewchanges"),classes:["cd-commentForm-viewChangesButton"],tabIndex:String(this.id)+"34"});this.previewButton=new OO.ui.ButtonWidget({label:cd.a.s("cf-preview"),classes:["cd-commentForm-previewButton"],tabIndex:String(this.id)+"35"});if(cd.a.settings.autopreview)this.previewButton.$element.hide();this.submitButton=new OO.ui.ButtonWidget({label:this.submitButtonLabelStandard,flags:["progressive","primary"],classes:["cd-commentForm-submitButton"],tabIndex:String(this.id)+"36"})}createElements(){var e;if(!["addSection","addSubsection"].includes(this.mode))if("reply"===this.mode)this.containerListType="dl";else if("edit"===this.mode)this.containerListType=this.target.containerListType;else if("replyInSection"===this.mode)this.containerListType=this.target.$replyContainer.prop("tagName").toLowerCase();this.$element=$("<div>").addClass("cd-commentForm cd-commentForm-"+this.mode);if("ol"===this.containerListType)this.$element.addClass("cd-commentForm-inNumberedList");if(this.isSectionOpeningCommentEdited)this.$element.addClass("cd-commentForm-sectionOpeningComment");if("addSubsection"===this.mode)this.$element.addClass("cd-commentForm-addSubsection-"+this.target.level);this.$messageArea=$("<div>").addClass("cd-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,this.settingsButton.$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===(e=this.headlineInput)||void 0===e?void 0:e.$element,this.commentInput.$element,this.$advanced,this.$buttons]);if("edit"!==this.mode&&!cd.a.settings.alwaysExpandAdvanced)this.$advanced.hide();this.$previewArea=$("<div>").addClass("cd-previewArea");if(cd.a.settings.autopreview)this.$previewArea.addClass("cd-previewArea-below").appendTo(this.$element);else this.$previewArea.addClass("cd-previewArea-above").prependTo(this.$element);if("ol"===this.containerListType&&"webkit"!==$.client.profile().layout)$("<div>").html("&nbsp;").addClass("cd-commentForm-dummyElement").prependTo(this.$element)}addToolbar(e){if(!cd.a.settings.showToolbar)return;const t=$("<div>").addClass("cd-toolbarPlaceholder").insertBefore(this.commentInput.$element);mw.loader.using(["ext.wikiEditor",...e]).then(()=>{t.remove();const e=this.commentInput.$input,n=mw.loader.moduleRegistry["ext.wikiEditor"],i=n.packageExports["jquery.wikiEditor.toolbar.config.js"];e.wikiEditor("addModule",i);const o=n.packageExports["jquery.wikiEditor.dialogs.config.js"];o.replaceIcons(e);e.wikiEditor("addModule",o.getDefaultConfig());this.commentInput.$element.find('.tool[rel="redirect"], .tool[rel="signature"], .tool[rel="newline"], .tool[rel="gallery"], .tool[rel="reference"], .option[rel="heading-2"]').remove();if(!["addSection","addSubsection"].includes(this.mode))this.commentInput.$element.find(".group-heading").remove();e.textSelection("register",{encapsulateSelection:e=>{CommentForm_CommentForm.getLastActive().encapsulateSelection(e)},setContents:e=>{const t=CommentForm_CommentForm.getLastActive();t.commentInput.select();Object(l.y)(t.commentInput,e)}});const a=cd.a.g.USER_LANGUAGE;e.wikiEditor("addToToolbar",{section:"main",group:"format",tools:{smaller:{label:cd.a.mws("wikieditor-toolbar-tool-small"),type:"button",icon:`/w/load.php?modules=oojs-ui.styles.icons-editing-styling&image=smaller&lang=${a}&skin=vector`,action:{type:"encapsulate",options:{pre:"<small>",peri:cd.a.mws("wikieditor-toolbar-tool-small-example"),post:"</small>"}}},quote:{label:`${cd.a.s("cf-quote-tooltip")} ${cd.a.mws("parentheses",`Q${cd.a.mws("comma-separator")}Ctrl+Alt+Q`)}`,type:"button",icon:`/w/load.php?modules=oojs-ui.styles.icons-editing-advanced&image=quotes&lang=${a}&skin=vector`,action:{type:"callback",execute:()=>{this.quote()}}}}});e.wikiEditor("addToToolbar",{section:"advanced",group:"format",tools:{code:{label:cd.a.s("cf-code-tooltip"),type:"button",icon:`/w/load.php?modules=oojs-ui.styles.icons-editing-advanced&image=code&lang=${a}&skin=vector`,action:{type:"encapsulate",options:{pre:"<code><nowiki>",peri:cd.a.s("cf-code-placeholder"),post:"</".concat("nowiki></code>")}}},codeBlock:{label:cd.a.s("cf-codeblock-tooltip"),type:"button",icon:`/w/load.php?modules=oojs-ui.styles.icons-editing-advanced&image=markup&lang=${a}&skin=vector`,action:{type:"encapsulate",options:{pre:'<syntaxhighlight lang="">\n',peri:cd.a.s("cf-codeblock-placeholder"),post:"\n</syntaxhighlight>"}}},underline:{label:cd.a.s("cf-underline-tooltip"),type:"button",icon:`/w/load.php?modules=oojs-ui.styles.icons-editing-styling&image=underline&lang=${a}&skin=vector`,action:{type:"encapsulate",options:{pre:"<u>",peri:cd.a.s("cf-underline-placeholder"),post:"</u>"}}},strikethrough:{label:cd.a.s("cf-strikethrough-tooltip"),type:"button",icon:`/w/load.php?modules=oojs-ui.styles.icons-editing-styling&image=strikethrough&lang=${a}&skin=vector`,action:{type:"encapsulate",options:{pre:"<s>",peri:cd.a.s("cf-strikethrough-placeholder"),post:"</s>"}}}}});e.wikiEditor("addToToolbar",{section:"main",groups:{"convenient-discussions":{tools:{mention:{label:cd.a.s("cf-mention-tooltip"),type:"button",icon:`/w/load.php?modules=oojs-ui.styles.icons-user&image=userAvatar&lang=${a}&skin=vector`,action:{type:"callback",execute:()=>{}}}}}}});this.$element.find('.tool-button[rel="mention"]').off("click").on("click",e=>{this.mention(e.ctrlKey)});this.$element.find('.tool[rel="link"] a, .tool[rel="file"] a').on("click",e=>{const t=e.currentTarget.parentNode.getAttribute("rel"),n=$(`#wikieditor-toolbar-${t}-dialog`);if(n.length){const e=n.data("context");if(e)e.$textarea=e.$focusedElem=this.commentInput.$input;n.parent().data("dialogaction",!1)}});if(e.is(":focus")){e.blur();Object(l.l)(this.commentInput)}e.data("wikiEditor-context").instance=5;$.wikiEditor.instances=Array(5);mw.hook("convenientDiscussions.commentFormToolbarReady").fire(this,cd.a)})}addInsertButton(e,t){const n=[];e=Object(l.x)(e,/\\[+;\\]/g,n);let[,i,o]=e.match(/^(.*?)(?:\+(.*))?$/)||[];if(!i)return;o=o||"";const a=e=>e.replace(/\\([+;\\])/g,"$1");i=a(Object(l.W)(i,n));o=a(Object(l.W)(o,n));t=t?a(t):i+o;const r=new s.a({label:t,classes:["cd-insertButtons-button"],action:()=>{this.encapsulateSelection({pre:i,post:o})}});this.$insertButtons.append(r.element," ")}addInsertButtons(){if(cd.a.settings.insertButtons.length){this.$insertButtons=$("<div>").addClass("cd-insertButtons").insertAfter(this.commentInput.$element);cd.a.settings.insertButtons.forEach(e=>{let t,n;if(Array.isArray(e)){t=e[0];n=e[1]}else t=e;this.addInsertButton(t,n)})}}createContents(e,t){var n;this.createInputs(e);this.createCheckboxes(e);this.createButtons();if(null!==(n=this.deleteCheckbox)&&void 0!==n&&n.isSelected())this.updateFormOnDeleteCheckboxChange(!0);this.createElements();this.addToolbar(t);this.addInsertButtons()}loadComment(){const e=this.registerOperation("load");this.target.getCode(!0).then(()=>{let t=this.target.codeToText();if(this.target.inCode.inSmallFont)t=`<small>${t}</small>`;const n=this.target.inCode.headlineCode;this.commentInput.setValue(t);this.originalComment=t;if(this.headlineInput){this.headlineInput.setValue(n);this.originalHeadline=n}this.closeOperation(e);Object(l.l)(this.commentInput);this.preview()},t=>{if(t instanceof r.a){const n=Object.assign({},t.data,{cancel:!0,currentOperation:e});this.handleError(n)}else this.handleError({type:"javascript",logMessage:t,cancel:!0,currentOperation:e})})}checkCode(){if(!this.checkCodeRequest)this.checkCodeRequest=this.target.getCode(this).catch(e=>{if(e instanceof r.a){const t=Object.assign({},e.data);this.handleError(t)}else this.handleError({type:"javascript",logMessage:e})});return this.checkCodeRequest}addEditNotices(){var e=this;return o()((function*(){var t;const n=cd.a.page.title.replace(/\//g,"-");let i,o=`<div class="cd-editnotice">{{MediaWiki:Editnotice-${cd.a.g.NAMESPACE_NUMBER}}}</div>\n<div class="cd-editnotice">{{MediaWiki:Editnotice-${cd.a.g.NAMESPACE_NUMBER}-${n}}}</div>\n`;if(null!==(t=e.preloadConfig)&&void 0!==t&&t.editIntro)o=`<div class="cd-editintro">{{${e.preloadConfig.editIntro}}}</div>\n`+o;try{i=yield Object(w.j)(o,{title:cd.a.page.name})}catch(e){return}const a=mw.config.get("wgFormattedNamespaces")[8];e.$messageArea.append(i.html).cdAddCloseButton().find(`.cd-editnotice > a.new[title^="${a}:Editnotice-"]`).parent().remove();e.$messageArea.find(".mw-charinsert-item").each((t,n)=>{const i=$(n),o=i.data("mw-charinsert-start"),a=i.data("mw-charinsert-end");i.on("click",()=>{e.encapsulateSelection({pre:o,post:a})}).data("mw-charinsert-done",!0)});mw.hook("wikipage.content").fire(e.$messageArea)}))()}preloadTemplate(){const e=this.registerOperation("load",{affectHeadline:!1}),t=new h.a(this.preloadConfig.commentTemplate);t.getCode().then(()=>{let n=t.code;const i=Object(y.f)(["onlyinclude"]);let o,a;for(;o=i.exec(n);){if(void 0===a)a="";a+=o[2]}if(void 0!==a)n=a;n=n.replace(Object(y.f)(["includeonly"]),"$2").replace(Object(y.f)(["noinclude"]),"");n=n.trim();if(n.includes(cd.a.g.SIGN_CODE)||this.preloadConfig.omitSignature)this.omitSignatureCheckbox.setSelected(!0);this.commentInput.setValue(n);this.originalComment=n;this.closeOperation(e);Object(l.l)(this.headlineInput||this.commentInput);this.preview()},t=>{if(t instanceof r.a){const n=Object.assign({},t.data,{cancel:!0,currentOperation:e});this.handleError(n)}else this.handleError({type:"javascript",logMessage:t,cancel:!0,currentOperation:e})})}addToPage(){if("replyInSection"===this.mode)this.target.replyButton.hide();else if("addSubsection"===this.mode&&this.target.$addSubsectionButtonContainer)this.target.$addSubsectionButtonContainer.hide();else if("addSection"===this.mode&&cd.a.g.$addSectionButtonContainer)cd.a.g.$addSectionButtonContainer.hide();if(!mw.config.get("wgArticleId"))cd.a.g.$content.children(".noarticletext, .warningbox").hide();let e,t,n;if("reply"===this.mode)({$wrappingItem:e,$wrappingList:t,$outerWrapper:n}=this.target.addSublevelItem("replyForm","top"));else if("edit"===this.mode){const e=this.target.$elements.last();if(e.is("dd, li")){const t=e.prop("tagName").toLowerCase();n=$(`<${t}>`);this.$element.appendTo(n)}}this.$outermostElement=n||t||e||this.$element;switch(this.mode){case"reply":this.$element.appendTo(e||n);break;case"edit":if(this.target.isOpeningSection)this.$outermostElement.insertAfter(this.target.$elements.last());else this.$outermostElement.insertBefore(this.target.$elements.first());break;case"replyInSection":this.$element.appendTo(this.target.$replyWrapper);this.target.$replyWrapper.addClass("cd-replyWrapper-hasCommentForm");break;case"addSection":if(this.isNewTopicOnTop&&cd.a.sections[0])this.$element.insertBefore(cd.a.sections[0].$heading);else this.$element.appendTo(cd.a.g.$content);break;case"addSubsection":{const e=this.target.level,t=new RegExp(`\\bcd-commentForm-addSubsection-[${e}-6]\\b`);let n,o=this.target.$elements.last();const a=".cd-section-button-container, .cd-commentForm-reply";do{var i;n=o;o=o.next()}while(o.is(a)||null!==(i=o.get(0))&&void 0!==i&&i.className.match(t));this.$element.insertAfter(n);break}}this.adjustLabels()}addEvents(){const e=()=>{Object(b.m)()},t=()=>{this.preview()},n=[{pattern:new RegExp(cd.a.g.SIGN_CODE+"\\s*$"),message:cd.a.sParse("cf-reaction-signature",cd.a.g.SIGN_CODE),name:"signatureNotNeeded",type:"notice",checkFunc:()=>{var e;return!(null!==(e=this.omitSignatureCheckbox)&&void 0!==e&&e.isSelected())}},{pattern:/<pre/,message:cd.a.sParse("cf-reaction-pre"),name:"dontUsePre",type:"warning"}].concat(cd.a.config.customTextReactions);this.$element.on("keydown",e=>{if(Object(l.G)(e,13,["ctrl"]))this.submit();if(Object(l.G)(e,27))this.cancel()}).on("focusin",()=>{this.lastFocused=new Date});if(this.headlineInput){this.headlineInput.on("change",e=>{var t;this.updateAutoSummary(!0,!0);if(e.includes("{{")&&(null===(t=this.preloadConfig)||void 0===t||!t.headline))this.showMessage(cd.a.sParse("cf-reaction-templateinheadline"),{type:"warning",name:"templateInHeadline"});else this.hideMessage("templateInHeadline")}).on("change",t).on("change",e);this.headlineInput.$input.on("keydown",e=>{if(13===e.keyCode&&!cd.a.g.activeAutocompleteMenu)this.submit()})}this.commentInput.on("change",e=>{this.updateAutoSummary(!0,!0);n.forEach(({pattern:t,checkFunc:n,message:i,type:o,name:a})=>{if(t.test(e)&&("function"!=typeof n||n(this)))this.showMessage(i,{type:o,name:a});else this.hideMessage(a)})}).on("change",t).on("change",e);this.commentInput.$input.get(0).addEventListener("tribute-replaced",e=>{if(e.detail.instance.trigger===cd.a.config.mentionCharacter){var t;if("edit"===this.mode){const e=Object(l.Y)(cd.a.sParse("cf-reaction-mention-edit"),{targetBlank:!0});this.showMessage(e,{type:"notice",name:"mentionEdit"})}if(null!==(t=this.omitSignatureCheckbox)&&void 0!==t&&t.isSelected()){const e=Object(l.Y)(cd.a.sParse("cf-reaction-mention-nosignature"),{targetBlank:!0});this.showMessage(e,{type:"notice",name:"mentionNoSignature"})}}});this.summaryInput.on("change",()=>{if(this.summaryInput.$input.is(":focus")){this.isSummaryAltered=!0;this.dontAutopreviewOnSummaryChange=!1}if(!this.dontAutopreviewOnSummaryChange)t()}).on("change",e);this.summaryInput.$input.on("keydown",e=>{if(13===e.keyCode&&!cd.a.g.activeAutocompleteMenu)this.submit()});if(this.minorCheckbox)this.minorCheckbox.on("change",e);this.watchCheckbox.on("change",e);if(this.watchSectionCheckbox)this.watchSectionCheckbox.on("change",e);if(this.omitSignatureCheckbox)this.omitSignatureCheckbox.on("change",()=>{this.preview(!1)}).on("change",e);if(this.deleteCheckbox)this.deleteCheckbox.on("change",e=>{this.updateAutoSummary(!0,!0);this.updateFormOnDeleteCheckboxChange(e)}).on("change",t).on("change",e);this.advancedButton.on("click",()=>{this.toggleAdvanced()});this.settingsButton.on("click",()=>{Object(E.d)()});this.cancelButton.on("click",()=>{this.cancel()});this.viewChangesButton.on("click",()=>{this.viewChanges()});this.previewButton.on("click",()=>{this.preview(!0,!1)});this.submitButton.on("click",()=>{this.submit()})}initAutocomplete(){let e,t=[];if(this.targetSection)t=this.targetSection.getBase().comments;else if("addSection"!==this.mode)cd.a.comments.some(e=>{if(e.section)return!0;else{t.push(e);return!1}});if("edit"===this.mode)t=t.filter(e=>e!==this.target);if(3===cd.a.g.NAMESPACE_NUMBER){const t=(cd.a.page.title.match(/^([^/]+)/)||[])[0];if(t)e=g.a.getUser(t)}let n=t.map(e=>e.author).concat(e).filter(l.h).sort((e,t)=>t.isRegistered()-e.isRegistered()||(t.name>e.name?-1:1)).map(e=>e.name);if(this.targetComment&&"edit"!==this.mode)for(let e=this.targetComment;e;e=e.getParent())if(e.author!==cd.a.user){if(!e.author.isRegistered())break;n.unshift(e.author.name);break}n=n.filter(l.X);this.autocomplete=new a.a({types:["mentions","wikilinks","templates","tags","commentLinks"],inputs:[this.commentInput],comments:t,defaultUserNames:n});if(this.headlineInput)this.headlineAutocomplete=new a.a({types:["mentions","wikilinks","tags"],inputs:[this.headlineInput],comments:t,defaultUserNames:n});this.summaryAutocomplete=new a.a({types:["mentions","wikilinks"],inputs:[this.summaryInput],comments:t,defaultUserNames:n})}toggleAdvanced(){if(this.$advanced.is(":hidden")){this.$advanced.show();const e=this.summaryInput.getValue(),t=e.match(/^.+?\*\/ */);Object(l.l)(this.summaryInput);this.summaryInput.selectRange(t?t[0].length:0,e.length)}else{this.$advanced.hide();Object(l.l)(this.commentInput)}}adjustLabels(){let e=this.$element.width();if(this.$element.hasClass("cd-commentForm-short")){if(e>=this.buttonsTotalWidthStandard+7){this.$element.removeClass("cd-commentForm-short");this.submitButton.setLabel(this.submitButtonLabelStandard);this.previewButton.setLabel(cd.a.s("cf-preview"));this.viewChangesButton.setLabel(cd.a.s("cf-viewchanges"));this.cancelButton.setLabel(cd.a.s("cf-cancel"))}}else{this.buttonsTotalWidthStandard=this.submitButton.$element.outerWidth(!0)+(this.previewButton.$element.is(":visible")?this.previewButton.$element.outerWidth(!0):0)+(this.viewChangesButton.$element.is(":visible")?this.viewChangesButton.$element.outerWidth(!0):0)+this.advancedButton.$element.outerWidth(!0)+this.helpPopupButton.$element.outerWidth(!0)+this.cancelButton.$element.outerWidth(!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 n;null===(n=this.headlineInput)||void 0===n||n.pushPending()}if(e){var i,o,a,s;this.commentInput.setDisabled(!0);this.summaryInput.setDisabled(!0);if(t){var r;null===(r=this.headlineInput)||void 0===r||r.setDisabled(!0)}this.submitButton.setDisabled(!0);this.previewButton.setDisabled(!0);this.viewChangesButton.setDisabled(!0);this.cancelButton.setDisabled(!0);null===(i=this.minorCheckbox)||void 0===i||i.setDisabled(!0);this.watchCheckbox.setDisabled(!0);null===(o=this.watchSectionCheckbox)||void 0===o||o.setDisabled(!0);null===(a=this.omitSignatureCheckbox)||void 0===a||a.setDisabled(!0);null===(s=this.deleteCheckbox)||void 0===s||s.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 n;null===(n=this.headlineInput)||void 0===n||n.popPending()}if(e){var i,o,a,s,r;this.commentInput.setDisabled(!1);this.summaryInput.setDisabled(!1);if(t){var c;null===(c=this.headlineInput)||void 0===c||c.setDisabled(!1)}this.submitButton.setDisabled(!1);this.previewButton.setDisabled(!1);this.viewChangesButton.setDisabled(!1);this.cancelButton.setDisabled(!1);null===(i=this.minorCheckbox)||void 0===i||i.setDisabled(!1);this.watchCheckbox.setDisabled(!1);null===(o=this.watchSectionCheckbox)||void 0===o||o.setDisabled(!1);null===(a=this.omitSignatureCheckbox)||void 0===a||a.setDisabled(!1);null===(s=this.deleteCheckbox)||void 0===s||s.setDisabled(!1);if(null!==(r=this.deleteCheckbox)&&void 0!==r&&r.isSelected())this.updateFormOnDeleteCheckboxChange(!0)}if(!this.commentInput.isPending())this.$element.removeClass("cd-commentForm-pending")}showMessage(e,{type:t="notice",name:n,isRaw:i=!1}={}){if(this.isDestroyed||n&&this.$messageArea.children(".cd-message-"+n).length)return;let o;if(i)o=e;else{const i=e instanceof $?e:Object(l.Y)(e),a=["cd-message"];if(n)a.push("cd-message-"+n);o=new OO.ui.MessageWidget({type:t,inline:!0,label:i,classes:a}).$element}this.$messageArea.append(o).cdAddCloseButton().cdScrollIntoView("top")}hideMessage(e){const t=this.$messageArea.children(".cd-message-"+e);if(t.length)t.remove()}abort({message:e,messageType:t="error",isRawMessage:n=!1,logMessage:i,cancel:o=!1,currentOperation:a}){if(a)this.closeOperation(a);if(!this.isDestroyed){if(i)console.warn(i);if(o){Object(l.a)(e instanceof $?e:Object(l.Y)(e),{type:"error",autoHideSeconds:"long"});this.cancel(!1)}else{if(!a||"preview"!==a.type||!a.isAuto)this.showMessage(e,{type:t,isRaw:n});this.$messageArea.cdScrollIntoView("top")}}}handleError({type:e,code:t,details:n,apiData:i,message:a,messageType:s="error",logMessage:r,cancel:c=!1,isRawMessage:u=!1,currentOperation:d}){var h,m=this;switch(e){case"parse":{let e;switch(t){case"locateComment":if(this.targetSection)e=this.targetSection.editUrl||cd.a.page.getUrl({action:"edit"});else e=cd.a.page.getUrl({action:"edit",section:0});a=cd.a.sParse("error-locatecomment",e);break;case"locateSection":e=cd.a.page.getUrl({action:"edit"});a=cd.a.sParse("error-locatesection",e);break;case"numberedList-list":a=cd.a.sParse("cf-error-numberedlist")+" "+cd.a.sParse("cf-error-numberedlist-list");break;case"numberedList-table":a=cd.a.sParse("cf-error-numberedlist")+" "+cd.a.sParse("cf-error-numberedlist-table");break;case"closed":a=cd.a.sParse("cf-error-closed");break;case"findPlace":a=cd.a.sParse("cf-error-findplace");break;case"delete-repliesToComment":a=cd.a.sParse("cf-error-delete-repliestocomment");break;case"delete-repliesInSection":a=cd.a.sParse("cf-error-delete-repliesinsection");break;case"commentLinks-commentNotFound":a=cd.a.sParse("cf-error-commentlinks-commentnotfound",n.anchor)}const i=function(){var t=o()((function*(t){if(!(t.ctrlKey||t.shiftKey||t.metaKey)){t.preventDefault();if(m.confirmClose()){m.forget();location.assign(e)}}}));return function(e){return t.apply(this,arguments)}}();a=Object(l.Y)(a,{callbacks:{"cd-message-reloadPage":(h=o()((function*(){if(m.confirmClose())m.reloadPage()})),function(){return h.apply(this,arguments)}),"cd-message-editSection":i,"cd-message-editPage":i}}).$wrapper;break}case"api":switch(t){case"missing":a=cd.a.sParse("cf-error-pagedoesntexist");break;case"error":{const e=i.errors[0];switch(e.code){case"missingtitle":a=cd.a.sParse("cf-error-pagedoesntexist");break;default:a=e.html}break}}(a=Object(l.Y)(a)).find(".mw-parser-output").css("display","inline");r=r||[t,i];break;case"network":case"javascript":a=(a?a+" ":"")+cd.a.sParse("error-"+e)}this.abort({message:a,messageType:s,isRawMessage:u,logMessage:r,cancel:c,currentOperation:d})}addIndentationChars(e,t){return t+(t&&!/^[:*#;]/.test(e)&&cd.a.config.spaceAfterIndentationChars?" ":"")+e}commentTextToCode(e){var t,n;let i,o;switch(this.mode){case"reply":i=this.target.inCode.replyIndentationChars;break;case"edit":i=this.target.inCode.indentationChars;break;case"replyInSection":i=cd.a.config.defaultIndentationChar;if(this.target.inCode.lastCommentIndentationChars)if("#"===this.target.inCode.lastCommentIndentationChars[0])i="#";else if("mimic"===cd.a.config.indentationCharMode)i=this.target.inCode.lastCommentIndentationChars[0];break;default:i=""}this.willCommentBeIndented=["reply","replyInSection"].includes(this.mode)||"edit"===this.mode&&Boolean(i);if(this.willCommentBeIndented)o="preview"===e?":":i.replace(/\*/g,":");let a,s,c=this.commentInput.getValue();if(cd.a.config.preTransformCode)c=cd.a.config.preTransformCode(c,this);c=c.trim();if(this.willCommentBeIndented)[a,s]=(()=>{const e=c.match(new RegExp("<([a-z]+)>[^]*?</\\1>","ig"))||[],t=c.match(cd.a.g.QUOTE_REGEXP)||[],n=e.concat(t);return[n.some(e=>e.includes("\n")),n.some(e=>/\n[:*#;]/.test(e))]})();let u;({code:c,hidden:u}=Object(y.h)(c));let d,h=!1;if(!this.headlineInput)c=c.replace(/^<small>([^]*)<\/small>$/i,(e,t)=>{h=!0;return t});c=c.replace(/^(?:[ \t\xa0\ufeff]*\n)+(?! )/gm,e=>e.replace(/^[ \t\ufeff\xa0]+/gm,""));if(null!==(t=this.omitSignatureCheckbox)&&void 0!==t&&t.isSelected())d="";else d="edit"===this.mode?this.target.inCode.signatureCode:cd.a.g.USER_SIGNATURE;if(d&&("edit"!==this.mode||!/^[ \t]*\n/.test(d))&&/(^|\n)[:*#;].*$/.test(c))c+="\n";if(this.willCommentBeIndented){c=c.replace(/^ +/gm,"");if(!cd.a.config.paragraphTemplates.length)c=c.replace(/^\n/gm,"");if(/^[:*#;]/m.test(c)&&s)c=function(e){const t=(e,t,i,o=!1)=>{if(o){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);n(i.items,!0)},n=(e,n=!1)=>{let i={items:[]};for(let s=0;s<=e.length;s++)if(s===e.length){if(i.type)t(e,s,i,n)}else{const r=e[s].text,c=r[0]||"",l=o[c];if(i.type&&l!==i.type){const o=i.items.length;t(e,s,i,n);s-=o-1;i={items:[]}}if(l){i.type=l;i.items.push({type:a[c],text:r.slice(1)})}}return e},i=(e,t=!1)=>{let n="";e.forEach((o,a)=>{if(void 0===o.text){const e=o.items.map(e=>{const t=void 0===e.text?i(e.items,!0):e.text.trim();return e.type?`<${e.type}>${t}</${e.type}>`:t}).join("");n+=`<${o.type}>${e}</${o.type}>`}else n+=t?o.text.trim():o.text;if(a!==e.length-1)n+="\n"});return n},o={":":"dl",";":"dl","*":"ul","#":"ol"},a={":":"dd",";":"dt","*":"li","#":"li"};let s=e.split("\n").map(e=>({type:"",text:e}));n(s);return i(s)}(c);c=c.replace(/(\n+)([:*#;\x03])/g,(e,t,n)=>(t.length>1?"\n\n\n":"\n")+o+n);if(/^[:*#;]/m.test(c)||c.includes("\x03")){if("#"===o)throw new r.a({type:"parse",code:"numberedList-list"});if(o.includes("#")&&c.includes("\x03"))throw new r.a({type:"parse",code:"numberedList-table"});const e=cd.a.config.spaceAfterIndentationChars?" ":"";c=c.replace(/^([:*#;\x03].+)(\n+)(?!:)/gm,(t,n,i)=>{const a=i.length>1?"\n\n":"";return n+"\n"+o+e+a})}let e;if(cd.a.config.paragraphTemplates.length)e=`$1{{${cd.a.config.paragraphTemplates[0]}}}`;else if(a)e="$1<br>";else{const t=cd.a.config.spaceAfterIndentationChars?" ":"";e=`$1\n${o}${t}`}c=c.replace(/^(.*)\n\n+(?!:)/gm,e)}const m=new RegExp("^(?:\\x01\\d+_(block|template).*\\x02) *$","i"),f=new RegExp(`^\\[\\[${cd.a.g.FILE_PREFIX_PATTERN}.+\\]\\]$`,"i"),g=new RegExp(`(?:<${cd.a.g.PNIE_PATTERN}(?: [\\w ]+?=[^<>]+?| ?\\/?)>|<\\/${cd.a.g.PNIE_PATTERN}>|\\x04) *$`,"i"),p=new RegExp(`^(?:<\\/${cd.a.g.PNIE_PATTERN}>|<${cd.a.g.PNIE_PATTERN}|\\|)`,"i"),b=/^(=+).*\1[ \t]*$|^----/,v=this.willCommentBeIndented?/^(.+)\n(?!:)(?=(.*))/gm:/^((?![:*#; ]).+)\n(?![\n:*#; \x03])(?=(.*))/gm;c=c.replace(v,(e,t,n)=>{const i=cd.a.config.spaceAfterIndentationChars&&!/^[:*#;]/.test(n)?" ":"",s=this.willCommentBeIndented&&!cd.a.config.paragraphTemplates.length&&!a?`\n${o}${i}`:"<br>";return t+(m.test(t)||m.test(n)||!this.willCommentBeIndented&&(b.test(t)||b.test(n))||f.test(t)||!this.willCommentBeIndented&&f.test(n)||g.test(t)||p.test(n)?"":s)+(this.willCommentBeIndented?"":"\n")});if(null===(n=this.omitSignatureCheckbox)||void 0===n||!n.isSelected())c=c.replace(/\s*~{3,}$/,"");if(this.willCommentBeIndented&&"preview"!==e&&/^[*#;\x03]/.test(c))i=o;if(this.headlineInput&&("addSection"!==this.mode||!this.submitSection||"submit"!==e)){const e=this.headlineInput.getValue().trim();if(e){let t;if("addSection"===this.mode)t=2;else if("addSubsection"===this.mode)t=this.target.level+1;else t=this.target.inCode.headingLevel;const n="=".repeat(t);if(this.isSectionOpeningCommentEdited&&/^\n/.test(this.target.inCode.code))c="\n"+c;c=`${n} ${e} ${n}\n${c}`}}if("preview"===e&&d)d=`<span class="cd-commentForm-signature">${d}</span>`;if(!this.willCommentBeIndented&&/(^|\n)[ =].*$/.test(c))c+="\n";if(!c||c.endsWith("\n")||c.endsWith(" "))d=d.trimLeft();if(h){let e;if(/^[:*#; ]/.test(c)){e="\n"+(this.willCommentBeIndented?o:"")}else e="";if(cd.a.config.smallDivTemplates.length&&!/^[:*#;]/m.test(c)){const e=[];c=Object(l.x)(c.trim(),/\[\[[^\]|]+\|/g,e,"link");c=c.replace(/\|/g,"{{!}}")+d;c=Object(l.W)(c,e,"link");c=`{{${cd.a.config.smallDivTemplates[0]}|1=${c}}}`}else c=`<small>${e}${c}${d}</small>`}else c+=d;if("edit"!==this.mode)c+="\n";if("preview"!==e){c=this.addIndentationChars(c,i);if("addSubsection"===this.mode)c+="\n"}else if("preview"===e&&this.willCommentBeIndented&&this.commentInput.getValue().trim())c=this.addIndentationChars(c,":");c=Object(l.W)(c,u);if(cd.a.config.postTransformCode)c=cd.a.config.postTransformCode(c,this);return c}addAnchorsToComments(e,t){t.forEach(t=>{const n=c.a.getByAnchor(t);if(n){const i=n.locateInCode(e),o=cd.a.config.getAnchorCode(t);if(i.code.includes(o))return;let a=this.addIndentationChars(i.code,i.indentationChars);const s=a.match(/^[:*#]* */)[0].length,r=a.slice(0,s),c=a.slice(s);a=r+o+c;const l=(i.headingCode||"")+a+i.signatureDirtyCode;e=n.modifyWholeCode({action:"edit",commentCode:l,wholeCode:e,thisInCode:i})}else if(!$("#"+t).length)throw new r.a({type:"parse",code:"commentLinks-commentNotFound",details:{anchor:t}})});return e}prepareWholeCode(e){var t=this;return o()((function*(){var n;const i=function(e){const t=/\[\[#(\d{12}_[^|\]]+)/g,n=[];let i;for(;i=t.exec(e);)n.push(i[1]);return n}(t.commentInput.getValue());t.submitSection=Boolean("addSection"===t.mode&&!t.isNewTopicOnTop&&(null===(n=t.headlineInput)||void 0===n?void 0:n.getValue().trim()));try{if(t.targetSection&&null!==t.targetSection.liveSectionNumber&&!i.length)yield t.targetSection.getCode(t);else yield t.targetPage.getCode(0===mw.config.get("wgArticleId"))}catch(e){if(e instanceof r.a){const n=Object.assign({},{message:cd.a.sParse("cf-error-getpagecode")},e.data);t.handleError(n)}else t.handleError({type:"javascript",logMessage:e});return}let o;try{var a;if(!(t.target instanceof h.a||t.target instanceof m.a&&t.submitSection))t.target.locateInCode(t.submitSection);if("replyInSection"===t.mode)t.target.setLastCommentIndentationChars(t);o=t.target.modifyWholeCode({commentCode:t.commentTextToCode(e),action:t.mode,doDelete:null===(a=t.deleteCheckbox)||void 0===a?void 0:a.isSelected(),commentForm:t});o=t.addAnchorsToComments(o,i)}catch(e){if(e instanceof r.a)t.handleError(e.data);else t.handleError({type:"javascript",logMessage:e});return}return o}))()}registerOperation(e,t={},n=!0){const i=Object.assign(t,{type:e});this.operations.push(i);i.isClosed=!1;if("preview"!==i.type||!i.isAuto){if(n)this.$messageArea.empty();this.pushPending(["load","submit"].includes(i.type),i.affectHeadline)}return i}closeOperation(e){if(!e.isClosed){e.isClosed=!0;if("preview"!==e.type||!e.isAuto)this.popPending(["load","submit"].includes(e.type),e.affectHeadline)}}closeOperationIfNecessary(e){if(e.isClosed)return!0;const t=Object(l.i)(this.operations,t=>e!==t&&["preview","viewChanges"].includes(t.type)&&!t.isDelayed);if(null!==t&&t>this.operations.indexOf(e)){this.closeOperation(e);return!0}else return!1}unregisterOperation(e){Object(l.K)(this.operations,e);if("preview"!==e.type||!e.isAuto)this.popPending("submit"===e.type,e.affectHeadline)}isBeingSubmitted(){return this.operations.some(e=>"submit"===e.type&&!e.isClosed)}isContentBeingLoaded(){return this.operations.some(e=>"load"===e.type&&!e.isClosed)}preview(e=!0,t=!0,n){var i=this;return o()((function*(){var o;if(i.isContentBeingLoaded()||!(i.target instanceof h.a)&&!i.target.inCode&&i.checkCodeRequest&&"resolved"===(yield Object(l.s)(i.checkCodeRequest))||i.isBeingSubmitted()||t&&!cd.a.settings.autopreview){if(n)i.closeOperation(n);return}const a=n||i.registerOperation("preview",{isAuto:t});if(t){const t=Date.now()-i.lastPreviewTimestamp<1e3;if(t||i.operations.some(e=>!e.isClosed&&"preview"===e.type&&e!==a)){if(i.previewTimeout)i.unregisterOperation(a);else{a.isDelayed=!0;i.previewTimeout=setTimeout(()=>{i.previewTimeout=null;i.preview(e,!0,a)},t?1e3-(Date.now()-i.lastPreviewTimestamp):100)}return}i.lastPreviewTimestamp=Date.now()}if(i.closeOperationIfNecessary(a))return;if(!(i.target instanceof h.a||i.target.inCode)){yield i.checkCode();if(!i.target.inCode)i.closeOperation(a);if(a.isClosed)return}const s=!(i.commentInput.getValue().trim()||null!==(o=i.headlineInput)&&void 0!==o&&o.getValue().trim());if(s&&!e){i.closeOperation(a);return}const c=i.commentTextToCode("preview");let u,d;try{({html:u,parsedSummary:d}=yield Object(w.j)(c,{title:i.targetPage.name,summary:Object(l.d)({text:i.summaryInput.getValue()})}))}catch(e){if(e instanceof r.a){const t=Object.assign({},e.data,{message:cd.a.sParse("cf-error-preview"),currentOperation:a});i.handleError(t)}else i.handleError({type:"javascript",logMessage:e,currentOperation:a});return}if(!i.closeOperationIfNecessary(a)){if(u){var m;if(t&&s||null!==(m=i.deleteCheckbox)&&void 0!==m&&m.isSelected())i.$previewArea.empty();else{const e=$("<div>").addClass("cd-previewArea-label").text(cd.a.s("cf-block-preview"));i.$previewArea.html(u).prepend(e).cdAddCloseButton();i.$previewArea.toggleClass("cd-previewArea-indentedComment",i.willCommentBeIndented);mw.hook("convenientDiscussions.previewReady").fire(i.$previewArea,cd.a);if(!t)mw.hook("wikipage.content").fire(i.$previewArea)}const e=$("<span>").addClass("comment").append(d);i.$summaryPreview.empty();if(d){const t=$("<span>").text(cd.a.mws("colon-separator")),n=$("<span>").text(cd.a.s("cf-summary-preview"));i.$summaryPreview.append(n,t,e)}}if(cd.a.settings.autopreview&&i.previewButton.$element.is(":visible")){i.previewButton.$element.hide();i.viewChangesButton.$element.show();i.adjustLabels()}i.closeOperation(a);if(!t){const e=i.$previewArea.hasClass("cd-previewArea-above")?"top":"bottom";i.$previewArea.cdScrollIntoView(e);Object(l.l)(i.commentInput)}}}))()}viewChanges(){var e=this;return o()((function*(){var t;if(e.isBeingSubmitted())return;const n=e.registerOperation("viewChanges"),i=yield e.prepareWholeCode("viewChanges");if(void 0===i)e.closeOperation(n);if(n.isClosed)return;mw.loader.load("mediawiki.diff.styles");let o;try{const t={action:"compare",totitle:e.targetPage.name,toslots:"main","totext-main":i,topst:!0,prop:"diff",errorformat:"html",errorlang:cd.a.g.USER_LANGUAGE,errorsuselocal:!0};if(e.submitSection||!mw.config.get("wgArticleId")){t.fromslots="main";t["fromtext-main"]="addSection"===e.mode?"":e.targetSection.code}else t.fromrev=e.targetPage.revisionId;o=yield cd.a.g.mwApi.post(t,{contentType:"multipart/form-data"}).catch(l.w)}catch(t){if(t instanceof r.a){const i=Object.assign({},t.data,{message:cd.a.sParse("cf-error-viewchanges"),currentOperation:n});e.handleError(i)}else e.handleError({type:"javascript",logMessage:t,currentOperation:n});return}if(e.closeOperationIfNecessary(n))return;let a=null===(t=o.compare)||void 0===t?void 0:t.body;if(a){a=Object(l.Z)(a);const t=$("<div>").addClass("cd-previewArea-label").text(cd.a.s("cf-block-viewchanges"));e.$previewArea.html(a).prepend(t).cdAddCloseButton()}else{e.$previewArea.empty();if(void 0!==a)e.showMessage(cd.a.sParse("cf-notice-nochanges"))}if(cd.a.settings.autopreview){e.viewChangesButton.$element.hide();e.previewButton.$element.show();e.adjustLabels()}e.closeOperation(n);const s=e.$previewArea.hasClass("cd-previewArea-above")?"top":"bottom";e.$previewArea.cdScrollIntoView(s);Object(l.l)(e.commentInput)}))()}reloadPage(e,t){var n=this;return o()((function*(){n.forget();try{yield Object(b.k)(e)}catch(e){if(e instanceof r.a){const i=Object.assign({},e.data,{message:cd.a.sParse("error-reloadpage-saved"),cancel:!0,currentOperation:t});n.handleError(i)}else n.handleError({type:"javascript",logMessage:e,cancel:!0,currentOperation:t});Object(b.d)()}}))()}runChecks({doDelete:e}){var t,n,i;const o=[{condition:!e&&""===(null===(t=this.headlineInput)||void 0===t?void 0:t.getValue()),confirmation:()=>{const e=this.headlineInputPlaceholder===cd.a.s("cf-headline-topic")?"topic":"subsection";return confirm(cd.a.s("cf-confirm-noheadline-"+e)+" "+cd.a.s("cf-confirm-noheadline-question"))}},{condition:!(e||this.commentInput.getValue().trim()||null!==(n=cd.a.config.noConfirmPostEmptyCommentPageRegexp)&&void 0!==n&&n.test(cd.a.page.name)),confirmation:()=>confirm(cd.a.s("cf-confirm-empty"))},{condition:!e&&this.commentInput.getValue().trim().length>cd.a.config.longCommentThreshold,confirmation:()=>confirm(cd.a.s("cf-confirm-long",cd.a.config.longCommentThreshold))},{condition:!e&&/^==[^=]/m.test(this.commentInput.getValue())&&"edit"!==this.mode&&!(null!==(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 o)if(e.condition&&!e.confirmation()){Object(l.l)(this.commentInput);return!1}return!0}editPage(e,t){var n=this;return o()((function*(){let i;try{var o,a,s;let t,r,c;if(n.submitSection){if("addSection"===n.mode){c=n.headlineInput.getValue().trim();t="new"}else t=n.targetSection.liveSectionNumber;r=n.targetSection}else r=n.targetPage;i=yield n.targetPage.edit({section:t,sectiontitle:c,text:e,summary:Object(l.d)({text:n.summaryInput.getValue()}),minor:null===(o=n.minorCheckbox)||void 0===o?void 0:o.isSelected(),baserevid:null===(a=r)||void 0===a?void 0:a.revisionId,starttimestamp:null===(s=r)||void 0===s?void 0:s.queryTimestamp,watchlist:n.watchCheckbox.isSelected()?"watch":"unwatch"})}catch(e){if(e instanceof r.a){const{type:i,details:o}=e.data;if("network"===i)n.handleError({type:i,message:cd.a.sParse("cf-error-couldntedit"),currentOperation:t});else{let e,{code:a,message:s,isRawMessage:r,logMessage:c}=o;if("editconflict"===a){s+=" "+cd.a.sParse("cf-notice-editconflict-retrying");e="notice"}n.handleError({type:i,message:s,messageType:e,isRawMessage:r,logMessage:c,currentOperation:t});if("editconflict"===a)n.submit(!0)}}else n.handleError({type:"javascript",logMessage:e,currentOperation:t});return null}return i}))()}generateFutureCommentAnchor(e){const t=new Date(e);t.setSeconds(0);let n;if(this.target instanceof c.a){const e=this.target.getChildren(!0);n=e[e.length-1]||this.target}else if(this.target instanceof m.a){const e="addSubsection"===this.mode&&this.target.getChildren(!0).slice(-1)[0]||this.target;cd.a.sections.slice(0,e.id+1).reverse().some(e=>{if(e.commentsInFirstChunk.length)n=e.commentsInFirstChunk[e.commentsInFirstChunk.length-1];return n})}else n=this.isNewTopicOnTop?null:cd.a.comments[cd.a.comments.length-1];Object(v.o)();if(n)cd.a.comments.slice(0,n.id+1).filter(e=>{var n;return e.author===cd.a.user&&(null===(n=e.date)||void 0===n?void 0:n.getTime())===t.getTime()}).map(e=>e.anchor).forEach(v.m);return Object(v.f)(t,cd.a.user.name,!0)}submit(e=!1){var t=this;return o()((function*(){var n;if(t.isBeingSubmitted()||t.isContentBeingLoaded())return;const i=null===(n=t.deleteCheckbox)||void 0===n?void 0:n.isSelected();if(!t.runChecks({doDelete:i}))return;const o=t.registerOperation("submit",void 0,!e);if(cd.a.commentForms.some(e=>e!==t&&e.isBeingSubmitted())){t.handleError({type:"ui",message:cd.a.sParse("cf-error-othersubmitted"),currentOperation:o});return}const a=yield t.prepareWholeCode("submit");if(void 0===a){t.closeOperation(o);return}const s=yield t.editPage(a,o);if(!s)return;const r={wasCommentFormSubmitted:!0};if(!mw.config.get("wgArticleId")){mw.config.set("wgArticleId",t.targetPage.pageId);r.wasPageCreated=!0}if(t.watchSectionCheckbox)if(t.watchSectionCheckbox.isSelected()){const e=t.isSectionOpeningCommentEdited&&t.headlineInput.getValue()!==t.originalHeadline;if("addSection"===t.mode&&t.headlineinput||"addSubsection"===t.mode||e){const n=Object(y.k)(t.headlineInput.getValue());r.justWatchedSection=n;let i;if(e){i=Object(y.k)(t.originalHeadline);r.justUnwatchedSection=i}m.a.watch(n,i).catch(()=>{})}else{const e=t.targetSection;if(e&&!e.isWatched){e.watch(!0);r.justWatchedSection=e.headline}}}else{const e=t.targetSection;if(null!=e&&e.isWatched){e.unwatch(!0);r.justUnwatchedSection=e.headline}}if(t.watchCheckbox.isSelected()&&$("#ca-watch").length)$("#ca-watch").attr("id","ca-unwatch").find("a").attr("href",cd.a.page.getUrl({action:"unwatch"}));if(!t.watchCheckbox.isSelected()&&$("#ca-unwatch").length)$("#ca-unwatch").attr("id","ca-watch").find("a").attr("href",cd.a.page.getUrl({action:"watch"}));if(!i)r.commentAnchor="edit"===t.mode?t.target.anchor:t.generateFutureCommentAnchor(s);if(t.targetPage!==cd.a.page)yield cd.a.page.purge();t.reloadPage(r,o)}))()}confirmClose(){return!this.isAltered()||confirm(cd.a.s("cf-confirm-close"))}cancel(e=!0){var t=this;return o()((function*(){if(!Object(l.C)()&&!t.isBeingSubmitted())if(!e||t.confirmClose()){t.destroy();if("reply"===t.mode)t.target.scrollIntoView("top");else if("replyInSection"===t.mode){t.target.replyButton.show();t.target.$replyWrapper.removeClass("cd-replyWrapper-hasCommentForm")}else if("edit"===t.mode){t.target.$elements.removeClass("cd-hidden");t.target.scrollIntoView("top");t.target.configureLayers()}else if("addSection"===t.mode&&cd.a.g.$addSectionButtonContainer)cd.a.g.$addSectionButtonContainer.show()}else Object(l.l)(t.commentInput)}))()}destroy(){if("reply"===this.mode)this.target.subitemList.remove("replyForm");else{this.$outermostElement.remove();if("addSection"===this.mode)if(!mw.config.get("wgArticleId"))cd.a.g.$content.removeClass("ext-discussiontools-init-replylink-open").children(".noarticletext, .warningbox").show()}this.operations.filter(e=>!e.isClosed).forEach(this.closeOperation.bind(this));this.forget();this.isDestroyed=!0}forget(){if("addSection"===this.mode){delete cd.a.g.addSectionForm;$("#ca-addsection").removeClass("selected");$("#ca-view").addClass("selected")}else delete this.target[CommentForm_CommentForm.modeToProperty(this.mode)+"Form"];Object(l.K)(cd.a.commentForms,this);Object(b.m)();f.a.updateCommentFormButton();this.autocomplete.cleanUp()}isAltered(){return void 0!==this.originalComment&&this.originalComment!==this.commentInput.getValue()||this.autoSummary!==this.summaryInput.getValue()||this.headlineInput&&void 0!==this.originalHeadline&&this.originalHeadline!==this.headlineInput.getValue()}updateAutoSummary(e=!0,t=!1){if(this.isSummaryAltered)return;this.dontAutopreviewOnSummaryChange=t;const n=this.autoText(),i=this.headlineInput&&"addSubsection"!==this.mode?Object(y.k)(this.headlineInput.getValue()):this.sectionHeadline;let o;if(["reply","replyInSection"].includes(this.mode)){const e=this.commentInput.getValue().trim().replace(/\s+/g," ").replace(/\[\[:?(?:([^|[\]<>\n]+)\|)?(.+?)\]\]/g,(e,t,n)=>cd.a.g.USER_LINK_REGEXP.test(t)?n:e);if(e&&e.length<=cd.a.config.summaryCommentTextLengthLimit)o=`: ${e} (-)`}else if("addSubsection"===this.mode){const e=Object(y.k)(this.headlineInput.getValue());if(e)o=`: /* ${e} */`}this.autoSummary=Object(l.d)({text:n,section:i,optionalText:o,addPostfix:!1});if(e)this.summaryInput.setValue(this.autoSummary)}autoText(){this.updateAutoSummaryBound=this.updateAutoSummaryBound||this.updateAutoSummary.bind(this);switch(this.mode){case"reply":if(this.target.isOpeningSection)return cd.a.s("es-reply");else{this.target.requestAuthorGenderIfNeeded(this.updateAutoSummaryBound);return this.target.isOwn?cd.a.s("es-addition"):Object(l.J)(cd.a.s("es-reply-to",this.target.author.name,this.target.author))}case"edit":var e;return(e=>{let t,n=this.target;if(this.target.isOwn){const e=this.target.getParent();if(e)if(0===e.level)t="reply";else{e.requestAuthorGenderIfNeeded(this.updateAutoSummaryBound);t=e.isOwn?"addition":"reply-to";n=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.requestAuthorGenderIfNeeded(this.updateAutoSummaryBound);t="comment-by"}return Object(l.J)(cd.a.s(`es-${e}-${t}`,n.author.name,n.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,n;this.initialMinorCheckboxSelected=this.minorCheckbox.isSelected();this.minorCheckbox.setSelected(!1);this.commentInput.setDisabled(!0);null===(t=this.headlineInput)||void 0===t||t.setDisabled(!0);this.minorCheckbox.setDisabled(!0);null===(n=this.omitSignatureCheckbox)||void 0===n||n.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 i,o;this.minorCheckbox.setSelected(this.initialMinorCheckboxSelected);this.commentInput.setDisabled(!1);null===(i=this.headlineInput)||void 0===i||i.setDisabled(!1);this.minorCheckbox.setDisabled(!1);null===(o=this.omitSignatureCheckbox)||void 0===o||o.setDisabled(!1);this.submitButtonLabelStandard=cd.a.s("cf-save");this.submitButtonLabelShort=cd.a.s("cf-save-short");this.submitButton.clearFlags().setFlags(["progressive","primary"]).setLabel(this.$element.hasClass("cd-commentForm-short")?this.submitButtonLabelStandard:this.submitButtonLabelShort)}}mention(e){if(e&&this.targetComment){let e=a.a.getConfig("mentions").transform(this.targetComment.author.name);e=e.ctrlModify(e);const t=e.start+e.content+e.end,n=this.commentInput.getRange();this.commentInput.selectRange(0);Object(l.y)(this.commentInput,t);this.commentInput.selectRange(n.from+t.length,n.to+t.length);return}const t=this.commentInput.getRange().to;if(this.commentInput.getRange().from!==t)this.commentInput.selectRange(t);const n=t&&this.commentInput.getValue().substr(t-1,1);if(t&&!/\s/.test(n))Object(l.y)(this.commentInput," ");this.autocomplete.tribute.showMenuForCollection(this.commentInput.$input.get(0),this.autocomplete.tribute.collection.findIndex(e=>e.trigger===cd.a.config.mentionCharacter))}quote(e=!0){let t=Object(l.B)()?document.activeElement.value.substring(document.activeElement.selectionStart,document.activeElement.selectionEnd):window.getSelection().toString();t=t.trim();if(t||e){const e=this.commentInput.$input.is(":focus"),n=this.commentInput.getRange(),i=n.to;let o=Math.min(n.to,n.from),a=Math.max(n.to,n.from);if(!e&&o!==a){this.commentInput.selectRange(i);o=a=i}this.encapsulateSelection({pre:cd.a.config.quoteFormatting[0],peri:cd.a.s("cf-quote-placeholder"),post:cd.a.config.quoteFormatting[1],selection:t,ownline:!0})}}encapsulateSelection({pre:e="",peri:t="",post:n="",selection:i,replace:o=!1,ownline:a=!1}){const s=this.commentInput.getRange(),r=Math.min(s.from,s.to),c=Math.max(s.from,s.to),u=this.commentInput.getValue(),d=a&&!/(^|\n)$/.test(u.slice(0,r))&&!/^\n/.test(t)?"\n":"",h=a&&!/^\n/.test(u.slice(c))&&!/\n$/.test(n)?"\n":"";let m;if(!i&&!o){m=r+d.length+e.length;i=u.substring(s.from,s.to)}else i=i||"";const[f]=i.match(/^ */),[g]=i.match(/ *$/),p=i||t,b=d+f+e+p.slice(f.length,p.length-g.length)+n+g+h;Object(l.y)(this.commentInput,b);if(!i&&!o)this.commentInput.selectRange(m,m+t.length)}}Object.assign(CommentForm_CommentForm,d);var T=t.a=CommentForm_CommentForm},function(e,t,n){"use strict";var i=n(2),o=n.n(i),a=n(3),s=n(0),r=n(8),c=n(1),l=n(9),u=n(5);class Page{constructor(e,t=!0){const n=e instanceof mw.Title?e:new mw.Title(e);this.title=n.getMainText();this.canonicalName=n.getPrefixedText();this.name=e instanceof mw.Title||t?this.canonicalName:e;this.namespaceId=n.getNamespaceId()}getUrl(e){return mw.util.getUrl(this.name,e)}isProbablyTalkPage(){return Object(c.D)(this.realName||this.name,this.namespaceId)}isArchivePage(){let e;if(this===s.a.page)e=s.a.g.$root.find(".cd-archivingInfo").data("isArchivePage");if(void 0===e){e=!1;const t=this.realName||this.name,n=s.a.g.SOURCE_PAGES_MAP.keys();for(const i of n)if(i.test(t)){e=!0;break}}return Boolean(e)}canHaveArchives(){if(this.isArchivePage())return!1;let e;if(this===s.a.page)e=s.a.g.$root.find(".cd-archivingInfo").data("canHaveArchives");if(void 0===e){var t;const n=this.realName||this.name;e=!(null!==(t=s.a.g.PAGES_WITHOUT_ARCHIVES_REGEXP)&&void 0!==t&&t.test(n))}return Boolean(e)}getArchivePrefix(){if(!this.canHaveArchives())return null;let e;if(this===s.a.page)e=s.a.g.$root.find(".cd-archivingInfo").data("archivePrefix");const t=this.realName||this.name;if(!e){const n=s.a.g.ARCHIVE_PAGES_MAP.entries();for(const[i,o]of n)if(i.test(t)){e=t.replace(i,o);break}}return e?String(e):t+"/"}getArchivedPage(){let e;if(this===s.a.page)e=s.a.g.$root.find(".cd-archivingInfo").data("archivedPage");if(!e){const t=this.realName||this.name,n=s.a.g.SOURCE_PAGES_MAP.entries();for(const[i,o]of n)if(i.test(t)){e=t.replace(i,o);break}}return e?new Page(String(e)):this}getCode(e=!0){var t=this;return o()((function*(){var n,i,o,r,l,u;const d=yield s.a.g.mwApi.post({action:"query",titles:t.name,prop:"revisions",rvslots:"main",rvprop:["ids","content"],redirects:!(t===s.a.page&&mw.config.get("wgIsRedirect")),curtimestamp:!0}).catch(c.w),h=d.query,m=null==h?void 0:null===(n=h.pages)||void 0===n?void 0:n[0],f=null==m?void 0:null===(i=m.revisions)||void 0===i?void 0:i[0],g=null==f?void 0:null===(o=f.slots)||void 0===o?void 0:null===(r=o.main)||void 0===r?void 0:r.content;if(!h||!m)throw new a.a({type:"api",code:"noData"});if(m.missing)if(e){Object.assign(t,{code:"",realName:t.name,queryTimestamp:d.curtimestamp});return}else throw new a.a({type:"api",code:"missing"});if(m.invalid)throw new a.a({type:"api",code:"invalid"});if(!f||void 0===g)throw new a.a({type:"api",code:"noData"});const p=(null===(l=h.redirects)||void 0===l?void 0:null===(u=l[0])||void 0===u?void 0:u.to)||null;Object.assign(t,{pageId:m.pageid,code:g+"\n",revisionId:f.revid,redirectTarget:p,realName:p||t.name,queryTimestamp:d.curtimestamp})}))()}parse(e,t=!1,n=!1){var i=this;return o()((function*(){const o={action:"parse",page:i.realName||i.name,redirects:!0,prop:["text","revid","modules","jsconfigvars"]};if(s.a.g.isDtTopicSubscriptionEnabled)o.useskin=mw.config.get("skin");const r=Object.assign({},o,e);if(null!=e&&e.oldid)delete r.page;let u=t?Object(l.i)(r):s.a.g.mwApi.post(r);u=u.catch(c.w);const d=(yield u).parse;if(void 0===(null==d?void 0:d.text))throw new a.a({type:"api",code:"noData"});if(n)i.markAsRead(d.revid);return d}))()}getRevisions(e={},t=!1){var n=this;return o()((function*(){var i,o,r;const u={action:"query",titles:n.name,rvslots:"main",prop:"revisions",redirects:!(n===s.a.page&&mw.config.get("wgIsRedirect"))},d=Object.assign({},u,e);let h=t?Object(l.i)(d):s.a.g.mwApi.post(d);h=h.catch(c.w);const m=null===(i=(yield h).query)||void 0===i?void 0:null===(o=i.pages)||void 0===o?void 0:null===(r=o[0])||void 0===r?void 0:r.revisions;if(!m)throw new a.a({type:"api",code:"noData"});return m}))()}modifyWholeCode({commentCode:e,commentForm:t}){const n=this.code;let i;if(t.isNewTopicOnTop){const t=Object(r.g)(n).search(/^(=+).*\1[ \t\x01\x02]*$/m);let o;if(-1===t)o=n?n+"\n":"";else o=n.slice(0,t);i=o+e+"\n"+n.slice(t)}else{i=(t.submitSection?"":(n+"\n").trimLeft())+e}return i}edit(e){var t=this;return o()((function*(){const n={action:"edit",title:t.realName||t.name,notminor:!e.minor,tags:s.a.user.isRegistered()?s.a.config.tagName||void 0:void 0,errorformat:"html",errorlang:s.a.g.USER_LANGUAGE,errorsuselocal:!0},i=s.a.g.mwApi.assertCurrentUser(Object.assign({},n,e));let o;try{o=yield s.a.g.mwApi.postWithEditToken(i,{contentType:"multipart/form-data"}).catch(c.w)}catch(e){if(e instanceof a.a){const{type:t,apiData:n}=e.data;if("network"===t)throw e;else{const e=null==n?void 0:n.errors[0];let t,i,r,c=!1;if(e){r=e.code;switch(r){case"editconflict":t=s.a.sParse("error-editconflict");break;case"missingtitle":t=s.a.sParse("error-pagedeleted");break;default:t=e.html;c=t.includes("<table")||t.includes("<div")}i=[r,n]}else i=n;throw new a.a({type:"api",code:"error",apiData:o,details:{code:r,message:t,isRawMessage:c,logMessage:i}})}}else throw e}t.pageId=o.edit.pageid;return o.edit.newtimestamp||"nochange"}))()}analyzeNewTopicPlacement(){var e,t;if(void 0===this.code)throw new a.a("Can't analyze the new topics placement: Page#code is undefined.");let n=null===(e=(t=s.a.config).areNewTopicsOnTop)||void 0===e?void 0:e.call(t,this.name,this.code);const i=Object(r.g)(this.code),o=/^==[^=].*?==[ \t\x01\x02]*\n/gm;let c,l;if(!1!==n){var d;l=o.exec(i);c=null===(d=l)||void 0===d?void 0:d.index;o.lastIndex=0}if(void 0===n){let e,t=0;for(;l=o.exec(i);){const n=Object(r.e)(this.code.slice(l.index)),{date:i}=n&&Object(u.l)(n)||{};if(i){if(e)t+=i>e?-1:1;e=i}}n=0===t?this.namespaceId%2==0:t>0}Object.assign(this,{areNewTopicsOnTop:n,firstSectionStartIndex:c})}purge(){var e=this;return o()((function*(){yield s.a.g.mwApi.post({action:"purge",titles:e.name}).catch(()=>{mw.notify(s.a.s("error-purgecache"),{type:"warn"})})}))()}markAsRead(e){var t=this;return o()((function*(){yield s.a.g.mwApi.postWithEditToken({action:"setnotificationtimestamp",titles:t.name,newerthanrevid:e})}))()}}t.a=Page},function(e,t,n){"use strict";var i=n(2),o=n.n(i),a=n(12),s=n(3),r=n(13),c=n(14);class SectionMenuButton_SectionMenuButton extends a.a{constructor(e){super(e);const t=document.createElement("span");t.className="cd-section-menu-button-wrapper cd-section-menu-button-wrapper-"+e.name;t.appendChild(this.element);this.wrapperElement=t;if(!e.visible)this.hide()}hide(){this.wrapperElement.style.display="none";return this}show(){this.wrapperElement.style.display="";return this}}var l=SectionMenuButton_SectionMenuButton,cd=n(0),u=n(16),d=n(1);var h=class{constructor(e,t,n){this.parser=e;this.headingElement=t;this.headlineElement=this.parser.context.getElementByClassName(t,"mw-headline");if(!this.headlineElement)throw new s.a;this.anchor=this.headlineElement.getAttribute("id");this.parseHeadline();const i=t.tagName.match(/^H([1-6])$/);this.level=i&&Number(i[1]);this.sectionNumber=null;let o=this.parser.context.getElementByClassName(t,"mw-editsection");if(!o)o=this.createSectionMenu();const a=Array.from(o.getElementsByTagName("a")).find(e=>{var t;return null===(t=e.getAttribute("href"))||void 0===t?void 0:t.includes("action=edit")});if(a){const e=cd.a.g.SERVER+a.getAttribute("href");this.editUrl=new URL(e);if(this.editUrl){const e=this.editUrl.searchParams.get("section");if(e.startsWith("T-")){this.sourcePageName=this.editUrl.searchParams.get("title");this.sectionNumber=Number(e.match(/\d+/)[0])}else this.sectionNumber=Number(e);this.editUrl=this.editUrl.href}}this.setContentProperties(n);this.id=cd.a.sections.length}createSectionMenu(){const e=this.parser.context.document.createElement("span");e.setAttribute("class","mw-editsection-bracket");e.textContent="[";const t=this.parser.context.document.createElement("span");t.setAttribute("class","mw-editsection-bracket");t.textContent="]";const n=this.parser.context.document.createElement("span");n.setAttribute("class","mw-editsection");n.appendChild(e);n.appendChild(t);this.headingElement.appendChild(n);return n}setContentProperties(e){const t=new u.c(cd.a.g.rootElement,e=>!["STYLE","LINK"].includes(e.tagName)&&!e.classList.contains("cd-section-button-container"),!0,this.headingElement);this.headingNestingLevel=0;for(;t.parentNode();)this.headingNestingLevel++;let n;if(e){n=Object(d.p)(this.headingElement,e);n.pop()}else{let e=cd.a.g.rootElement.lastElementChild;for(;e.contains(this.headingElement)&&e!==this.headingElement;)e=e.lastElementChild;n=Object(d.p)(this.headingElement,e)}let i,o,a=!1;n.slice(1).some((e,t)=>{if(void 0===this.lastElementInFirstChunk&&/^H[2-6]$/.test(e.tagName)){a=!0;this.lastElementInFirstChunk=n[t];return!0}else return!1});this.lastElementInFirstChunk=this.lastElementInFirstChunk||n[n.length-1];if(n[1]){t.currentNode=n[n.length-1];for(;t.lastChild(););const e=t.currentNode;t.currentNode=n[1];do{if(t.currentNode.classList.contains("cd-comment-part"))i=t.currentNode}while(!i&&t.currentNode!==e&&t.nextNode());t.currentNode=e;do{if(t.currentNode.classList.contains("cd-comment-part"))o=t.currentNode}while(!o&&t.currentNode!==n[1]&&t.previousNode())}if(i){const e=Number(i.getAttribute("data-comment-id")),t=Number(o.getAttribute("data-comment-id"));this.comments=cd.a.comments.slice(e,t+1);if(a){const e=this.comments.findIndex(e=>!(this.parser.context.follows(this.lastElementInFirstChunk,e.elements[0])||this.lastElementInFirstChunk.contains(e.elements[0])));this.commentsInFirstChunk=this.comments.slice(0,e||0)}this.comments.forEach(e=>{if(!this.oldestComment||e.date&&(!this.oldestComment.date||this.oldestComment.date>e.date))this.oldestComment=e});this.comments[0].followsHeading=!0}this.comments=this.comments||[];this.commentsInFirstChunk=this.commentsInFirstChunk||this.comments;this.commentsInFirstChunk.forEach(e=>{e.section=this});this.elements=n}parseHeadline(){const e=["mw-headline-number",...cd.a.config.foreignElementInHeadlineClasses],t=Array.from(this.headlineElement.childNodes).filter(t=>t.nodeType!==Node.ELEMENT_NODE||!e.some(e=>t.classList.contains(e)));this.headline=t.map(e=>e.textContent).join("").trim()}getParent(e=!0){if(e&&this.level<=2)return null;else return cd.a.sections.slice(0,this.id).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=n(19),f=n(10);let g=Promise.resolve();var p={watch(e,t){const n=function(){var n=o()((function*(){try{yield Object(f.d)()}catch(e){mw.notify(cd.a.s("error-settings-load"),{type:"error"});throw e}Object(d.b)(cd.a.g.currentPageWatchedSections,e);Object(d.K)(cd.a.g.currentPageWatchedSections,t);try{yield Object(f.g)()}catch(e){if(e instanceof s.a){const{type:t,code:n}=e.data;if("internal"===t&&"sizeLimit"===n){const e=Object(d.Y)(cd.a.sParse("section-watch-error-maxsize"),{callbacks:{"cd-notification-editWatchedSections":()=>{Object(m.a)()}}}).$wrapper;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 n.apply(this,arguments)}}();g=g.then(n,n);return g},unwatch(e){const t=function(){var t=o()((function*(){try{yield Object(f.d)()}catch(e){mw.notify(cd.a.s("error-settings-load"),{type:"error"});throw e}Object(d.K)(cd.a.g.currentPageWatchedSections,e);if(!cd.a.g.currentPageWatchedSections.length)delete cd.a.g.watchedSections[mw.config.get("wgArticleId")];try{yield Object(f.g)()}catch(e){mw.notify(cd.a.s("error-settings-save"),{type:"error"});throw e}}));return function(){return t.apply(this,arguments)}}();g=g.then(t,t);return g},getByAnchor(e){if(!cd.a.sections||!e)return null;else return cd.a.sections.find(t=>t.anchor===e)||null},getByHeadline:e=>cd.a.sections.filter(t=>t.headline===e),search({id:e,headline:t,anchor:n,ancestors:i,oldestCommentAnchor:o},a){const s=[];cd.a.sections.some(a=>{var r;const c=a.id===e,l=a.headline===t,u=a.anchor===n;let h;if(i){const e=a.getAncestors().map(e=>e.headline);h=Object(d.c)(e,i)}else h=!1;const m=1*l+1*h+1*((null===(r=a.oldestComment)||void 0===r?void 0:r.anchor)===o)+.5*u+.001*c;if(m>=2)s.push({section:a,score:m});return m>=3.5});let r;s.forEach(e=>{if(!r||e.score>r.score)r=e});if(a)return r||null;else return r?r.section:null},adjust(){cd.a.sections.forEach((e,t)=>{e.isLastSection=t===cd.a.sections.length-1;if(e.isActionable){var n,i;const a=cd.a.sections.slice(t+1).find(t=>t.level===e.level);if(2===e.elements.length&&(null===(n=cd.a.config.closedDiscussionClasses)||void 0===n?void 0:n.some(t=>{var n;return null===(n=e.elements[1].classList)||void 0===n?void 0:n.contains(t)}))||a&&a.headingNestingLevel!==e.headingNestingLevel){const t=e.menu;if(t){var o;null===(o=t.addSubsection)||void 0===o||o.wrapperElement.remove();delete t.addSubsection}}else e.addAddSubsectionButton();const s=e.elements[1]===e.lastElementInFirstChunk&&(null===(i=cd.a.config.closedDiscussionClasses)||void 0===i?void 0:i.some(t=>{var n;return null===(n=e.lastElementInFirstChunk.classList)||void 0===n?void 0:n.contains(t)})),r=e.$elements.get(1);if(!(r&&/^H[1-6]$/.test(r.tagName)||s||cd.a.sections[t+1]&&cd.a.sections[t+1].headingNestingLevel!==e.headingNestingLevel))e.addReplyButton()}});cd.a.sections.filter(e=>e.isActionable&&2===e.level).forEach(e=>{const t=e.getChildren(!0),n=t.length?t[t.length-1]:e;if(n.replyButton)$(n.replyButton.buttonElement).on("mouseenter",e.replyButtonHoverHandler).on("mouseleave",e.replyButtonUnhoverHandler)})},cleanUpWatched(){if(!cd.a.sections)return;const e=cd.a.g.currentPageWatchedSections.length;cd.a.g.originalThisPageWatchedSections=cd.a.g.currentPageWatchedSections.slice();cd.a.g.currentPageWatchedSections=cd.a.g.currentPageWatchedSections.filter(e=>cd.a.sections.some(t=>t.headline===e));cd.a.g.watchedSections[mw.config.get("wgArticleId")]=cd.a.g.currentPageWatchedSections;if(cd.a.g.currentPageWatchedSections.length!==e)Object(f.g)()}},b=n(23),v=n(8);let y;class Section_Section extends h{constructor(e,t,n,i){super(e,t,i);y=cd.a.g.SECTION_ELEMENT_PROTOTYPES;this.editSectionElement=t.querySelector(".mw-editsection");if(this.editSectionElement)this.closingBracketElement=this.editSectionElement.getElementsByClassName("mw-editsection-bracket")[1];this.liveSectionNumber=this.sectionNumber;this.liveSectionNumberRevisionId=mw.config.get("wgRevisionId");this.sourcePage=this.sourcePageName?new c.a(this.sourcePageName):cd.a.page;this.isActionable=cd.a.state.isPageActive&&!cd.a.g.closedDiscussionElements.some(e=>e.contains(t))&&!(this.sourcePageName&&10===this.sourcePage.namespaceId);if(!this.isActionable)this.comments.forEach(e=>{e.isActionable=!1});delete this.sourcePageName;this.extendSectionMenu(n);this.$headline=$(this.headlineElement);this.$heading=$(t)}addMenuItem({name:e,label:t,href:n,tooltip:i,action:o,visible:a=!0}){if(this.closingBracketElement){this.menu[e]=new l({name:e,label:t,href:n,tooltip:i,visible:a,classes:["cd-section-menu-button"],action:o});this.editSectionElement.insertBefore(this.menu[e].wrapperElement,this.closingBracketElement)}}addReplyButton(){const e=y.replyButton.cloneNode(!0),t=new a.a({element:e,action:()=>{this.reply()}}),n=this.lastElementInFirstChunk,i="OL"===n.tagName&&1===n.childElementCount&&n.children[0].classList.contains("mw-empty-elt");let o,s=!1;const r=n.tagName;if(n.classList.contains("cd-commentLevel")||i)if("UL"===r||"OL"===r&&(i||1===n.querySelectorAll("ol > li").length||n.querySelectorAll("ol > li > .cd-signature").length>1))o="li";else if("DL"===r)o="dd";else{o="li";s=!0}else{o="dd";if(!i)s=!0}const c=document.createElement(o);c.className="cd-replyWrapper";c.appendChild(t.element);let l;if(s){l=document.createElement("dl");l.className="cd-commentLevel cd-commentLevel-1 cd-section-button-container";n.parentNode.insertBefore(l,n.nextElementSibling)}else{l=n;l.classList.add("cd-section-button-container")}l.appendChild(c);this.replyButton=t;this.$replyWrapper=$(c);this.$replyContainer=$(l)}addAddSubsectionButton(){if(2!==this.level)return;const e=y.addSubsectionButton.cloneNode(!0),t=new a.a({element:e,labelElement:e.querySelector(".oo-ui-labelElement-label"),label:cd.a.s("section-addsubsection-to",this.headline),action:()=>{this.addSubsection()}}),n=document.createElement("div");n.className="cd-section-button-container cd-addSubsectionButton-container";n.style.display="none";n.appendChild(t.element);const i=this.elements[this.elements.length-1];i.parentNode.insertBefore(n,i.nextElementSibling);let o;const s=()=>{if(!o)o=setTimeout(()=>{this.$addSubsectionButtonContainer.hide()},1e3)};t.buttonElement.firstChild.onmouseenter=()=>{clearTimeout(o);o=null};t.buttonElement.firstChild.onmouseleave=()=>{s()};this.replyButtonHoverHandler=()=>{if(!this.addSubsectionForm){clearTimeout(o);o=null;if(!this.showAddSubsectionButtonTimeout)this.showAddSubsectionButtonTimeout=setTimeout(()=>{this.$addSubsectionButtonContainer.show()},1e3)}};this.replyButtonUnhoverHandler=()=>{if(!this.addSubsectionForm){clearTimeout(this.showAddSubsectionButtonTimeout);this.showAddSubsectionButtonTimeout=null;s()}};this.addSubsectionButton=t;this.$addSubsectionButtonContainer=$(n)}extendSectionMenu(e){if(!this.closingBracketElement)return;this.menu={};if(this.isActionable){if(this.comments.length&&this.comments[0].isOpeningSection&&this.comments[0].openingSectionOfLevel===this.level&&(this.comments[0].isOwn||cd.a.settings.allowEditOthersComments)&&this.comments[0].isActionable)this.addMenuItem({name:"editOpeningComment",label:cd.a.s("sm-editopeningcomment"),tooltip:cd.a.s("sm-editopeningcomment-tooltip"),action:()=>{this.comments[0].edit()}});if(this.level>=2&&6!==this.level)this.addMenuItem({name:"addSubsection",label:cd.a.s("sm-addsubsection"),tooltip:cd.a.s("sm-addsubsection-tooltip"),action:()=>{this.addSubsection()}});if(2===this.level)this.addMenuItem({name:"moveSection",label:cd.a.s("sm-move"),tooltip:cd.a.s("sm-move-tooltip"),action:()=>{this.move()}})}const t=()=>{if(this.headline)this.addMenuItem({name:"copyLink",label:cd.a.s("sm-copylink"),action:this.copyLink.bind(this),tooltip:cd.a.s("sm-copylink-tooltip"),href:`${cd.a.page.getUrl()}#${this.anchor}`});mw.hook("convenientDiscussions.sectionMenuExtended").fire(this)};if(this.isActionable)e.then(()=>{this.isWatched=cd.a.g.currentPageWatchedSections.includes(this.headline);this.addMenuItem({name:"unwatch",label:cd.a.s("sm-unwatch"),tooltip:cd.a.s("sm-unwatch-tooltip"),action:()=>{this.unwatch()},visible:this.isWatched});this.addMenuItem({name:"watch",label:cd.a.s("sm-watch"),tooltip:cd.a.s("sm-watch-tooltip"),action:()=>{this.watch()},visible:!this.isWatched})},()=>{}).then(t,t);else t()}reply(e){if(!this.replyForm)this.replyForm=e instanceof r.a?e:new r.a({mode:"replyInSection",target:this,dataToRestore:e});const t=this.getBase();if(t.$addSubsectionButtonContainer){t.$addSubsectionButtonContainer.hide();clearTimeout(t.showAddSubsectionButtonTimeout);t.showAddSubsectionButtonTimeout=null}}addSubsection(e){if(!this.menu.addSubsection)throw new s.a;if(this.addSubsectionForm){this.addSubsectionForm.$element.cdScrollIntoView("center");Object(d.l)(this.addSubsectionForm.headlineInput)}else this.addSubsectionForm=e instanceof r.a?e:new r.a({mode:"addSubsection",target:this,dataToRestore:e})}move(){if(Object(d.g)("mediawiki.widgets"))return;const e=new(0,n(47).default)(this);cd.a.g.windowManager.addWindows([e]);cd.a.g.windowManager.openWindow(e)}updateWatchMenuItems(){if(this.menu){this.menu.unwatch[this.isWatched?"show":"hide"]();this.menu.watch[this.isWatched?"hide":"show"]()}}watch(e=!1,t){const n=Section_Section.getByHeadline(this.headline);let i,o;if(!e){const e=n.map(e=>{var t;return null===(t=e.menu)||void 0===t?void 0:t.watch}).filter(d.h);e.forEach(e=>{e.setPending(!0)});i=()=>{e.forEach(e=>{e.setPending(!1)})}}if(t&&!Section_Section.getByHeadline(t).length)o=t;Section_Section.watch(this.headline,o).then(i,i).then(()=>{n.forEach(e=>{e.isWatched=!0;e.updateWatchMenuItems();e.updateTocLink()});if(!e){let e,t=cd.a.sParse("section-watch-success",this.headline);if($("#ca-watch").length){t+=" "+cd.a.sParse("section-watch-pagenotwatched");e="long"}mw.notify(Object(d.Y)(t),{autoHideSeconds:e})}},()=>{})}unwatch(e=!1){const t=Section_Section.getByHeadline(this.headline);let n;if(!e){const e=t.map(e=>{var t;return null===(t=e.menu)||void 0===t?void 0:t.unwatch}).filter(d.h);e.forEach(e=>{e.setPending(!0)});n=()=>{e.forEach(e=>{e.setPending(!1)})}}Section_Section.unwatch(this.headline).then(n,n).then(()=>{var n;t.forEach(e=>{e.isWatched=!1;e.updateWatchMenuItems();e.updateTocLink()});const i=null===(n=this.getClosestWatchedSection())||void 0===n?void 0:n.headline;if(!e||i){let e,t=cd.a.sParse("section-unwatch-success",this.headline);if(i){t+=" "+cd.a.sParse("section-unwatch-stillwatched",i);e="long"}mw.notify(Object(d.Y)(t),{autoHideSeconds:e})}},()=>{})}copyLink(e){e.preventDefault();Object(m.c)(this,e)}get $elements(){if(void 0===this.cached$elements)this.cached$elements=$(this.elements);return this.cached$elements}set $elements(e){this.cached$elements=e;this.elements=e.get()}setLastCommentIndentationChars(e){const[,t]=this.inCode.firstChunkCode.match(/\n([#*]) *\n+$/)||[];if(t)this.inCode.lastCommentIndentationChars=t;else{const t=this.commentsInFirstChunk[this.commentsInFirstChunk.length-1];if(t&&("ol"===e.containerListType||"mimic"===cd.a.config.indentationCharMode)){try{t.locateInCode(e.submitSection)}catch(e){return}if(!t.inCode.indentationChars.startsWith("#")||"ol"===e.containerListType)this.inCode.lastCommentIndentationChars=t.inCode.indentationChars}}}modifyWholeCode({action:e,commentCode:t}){const n=this.inCode.isSectionCodeUsed?this.code:this.getSourcePage().code;let i;switch(e){case"replyInSection":i=n.slice(0,this.inCode.firstChunkContentEndIndex)+t+n.slice(this.inCode.firstChunkContentEndIndex);break;case"addSubsection":i=Object(v.c)(n.slice(0,this.inCode.contentEndIndex))+t+n.slice(this.inCode.contentEndIndex).trim();break}return i}requestCode(){var e=this;return o()((function*(){var t,n,i,o,a;const r=yield cd.a.g.mwApi.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(d.w),c=r.query,l=null==c?void 0:null===(t=c.pages)||void 0===t?void 0:t[0],u=null==l?void 0:null===(n=l.revisions)||void 0===n?void 0:n[0],h=null==u?void 0:null===(i=u.slots)||void 0===i?void 0:i.main,m=null==h?void 0:h.content;if(!c||!l)throw new s.a({type:"api",code:"noData"});if(l.missing)throw new s.a({type:"api",code:"missing"});if(l.invalid)throw new s.a({type:"api",code:"invalid"});if(h.nosuchsection)throw new s.a({type:"api",code:"noSuchSection"});if(!u||void 0===m)throw new s.a({type:"api",code:"noData"});const f=(null===(o=c.redirects)||void 0===o?void 0:null===(a=o[0])||void 0===a?void 0:a.to)||null;Object.assign(e,{code:m+"\n",revisionId:u.revid,queryTimestamp:r.curtimestamp});Object.assign(cd.a.page,{pageId:l.pageid,redirectTarget:f,realName:f||e.name})}))()}getCode(e){var t=this;return o()((function*(){try{if(null!==t.liveSectionNumber)try{yield t.requestCode();t.locateInCode(!0);if(e)e.submitSection=!0}catch(e){if(e instanceof s.a&&["noSuchSection","locateSection"].includes(e.data.code)){yield t.getSourcePage().getCode();t.locateInCode(!1)}else throw e}else{yield t.getSourcePage().getCode();t.locateInCode(!1)}}catch(e){if(e instanceof s.a)throw new s.a(Object.assign({},{message:cd.a.sParse("cf-error-getpagecode")},e.data));else throw e}}))()}searchInCode(e){const t=Object(v.j)(this.headline),n=Object(v.g)(e),i=/^((=+)(.*)\2[ \t\x01\x02]*)\n/gm,o=[],a=[];let s,r=0;for(;s=i.exec(n);){const i=Object(v.j)(Object(v.k)(s[3])),c=i===t;let l=3;const u=a.slice(-l).reverse(),h=cd.a.sections.slice(Math.max(0,this.id-l),this.id).reverse().map(e=>e.headline).every((e,t)=>Object(v.j)(e)===u[t]);a.push(i);const m=this.id===r;r++;const f=s[1],g=`={1,${s[2].length}}`,p=e.slice(s.index),b=n.slice(s.index),y=b.match(new RegExp("("+mw.util.escapeRegExp(f)+"[^]*?\\n)"+g+"[^=].*=+[ \\t\\x01\\x02]*\\n"))||p.match(new RegExp("("+mw.util.escapeRegExp(f)+"[^]*$)")),w=b.match(new RegExp("("+mw.util.escapeRegExp(f)+"[^]*?\\n)\\n*={1,6}[^=].*=+[ \\t\\x01\\x02]*\n"))||p.match(new RegExp("("+mw.util.escapeRegExp(f)+"[^]*$)")),E=y&&p.substr(y.index,y[1].length),C=w&&p.substr(w.index,w[1].length);if(!E||!C){console.log(`Couldn't read the "${i}" section contents.`);continue}let T;Object(v.d)(E).forEach(e=>{if(!T||!T.date&&e.date||T.date>e.date)T=e});const x=T?Boolean(this.oldestComment&&(T.timestamp===this.oldestComment.timestamp||T.author===this.oldestComment.author)):!this.oldestComment;let k=Number(!this.oldestComment&&!T);if(this.oldestComment&&T){const e=E.slice(T.commentStartIndex,T.startIndex);k=Object(d.e)(this.oldestComment.getText(),Object(v.k)(e))}const S=1*x+k+1*c+.5*m+.25*h;if(S<=1)continue;const O=s.index,N=O+E.length,_=s.index+s[0].length,A=O+C.length,P=_-O;let I=A,L=N;cd.a.g.KEEP_IN_SECTION_ENDING.forEach(e=>{const t=C.match(e);if(t)I-=t[0].length-1;const n=E.match(e);if(n)L-=n[0].length-1});const M=C.match(/\n([#*] *\n+)$/);if(M)I-=M[1].length;o.push({doesHeadlineMatch:c,doesOldestCommentMatch:x,doesSectionIndexMatch:m,doPreviousHeadlinesMatch:h,score:S,startIndex:O,endIndex:N,code:E,contentStartIndex:_,contentEndIndex:L,relativeContentStartIndex:P,firstChunkEndIndex:A,firstChunkContentEndIndex:I,firstChunkCode:C});if(2.75===S)break}return o}locateInCode(e){this.inCode=null;const t=e?this.code:this.getSourcePage().code;if(void 0===t)throw new s.a({type:"parse",code:"noCode"});const n=this.searchInCode(t).sort((e,t)=>t.score-e.score)[0];if(!n)throw new s.a({type:"parse",code:"locateSection"});n.isSectionCodeUsed=e;this.inCode=n}getSourcePage(){return this.sourcePage}getBase(){if(this.level<=2)return this;else return cd.a.sections.slice(0,this.id).reverse().find(e=>2===e.level)||this}getChildren(e=!1){const t=[];let n=!1;cd.a.sections.slice(this.id+1).some(i=>{if(i.level>this.level){if(i.level===this.level+1)n=!0;if(e||i.level===this.level+1||!n)t.push(i)}else return!0});return t}getClosestWatchedSection(e=!1){for(let t=e?this:this.getParent();t;t=t.getParent())if(t.isWatched)return t;return null}getTocItem(){return b.a.getItem(this.anchor)||null}updateTocLink(){if(!cd.a.settings.modifyToc)return;const e=this.getTocItem();if(e)if(this.isWatched)e.$link.addClass("cd-toc-watched").attr("title",cd.a.s("toc-watched"));else e.$link.removeClass("cd-toc-watched").removeAttr("title")}getUrl(e){if(e)return Object(d.u)(this.anchor,!0);else{if(!this.cachedUrl)this.cachedUrl=Object(d.u)(this.anchor);return this.cachedUrl}}}Object.assign(Section_Section,p);t.a=Section_Section},function(e,t,n){"use strict";n.d(t,"c",(function(){return TreeWalker}));n.d(t,"b",(function(){return ElementsTreeWalker}));n.d(t,"a",(function(){return ElementsAndTextTreeWalker}));var i=n(0);class TreeWalker{constructor(e,t,n=!1,i=e){this.acceptNode=t;this.root=e;this.currentNode=i;if(n){this.firstChildProp="firstElementChild";this.lastChildProp="lastElementChild";this.previousSiblingProp="previousElementSibling";this.nextSiblingProp="nextElementSibling"}else{this.firstChildProp="firstChild";this.lastChildProp="lastChild";this.previousSiblingProp="previousSibling";this.nextSiblingProp="nextSibling"}}tryMove(e){let t=this.currentNode;if(t===this.root&&!e.includes("Child"))return null;do{t=t[e]}while(t&&this.acceptNode&&!this.acceptNode(t));if(t)this.currentNode=t;return t||null}parentNode(){return this.tryMove("parentNode")}firstChild(){return this.tryMove(this.firstChildProp)}lastChild(){return this.tryMove(this.lastChildProp)}previousSibling(){return this.tryMove(this.previousSiblingProp)}nextSibling(){return this.tryMove(this.nextSiblingProp)}nextNode(){let e=this.currentNode;do{if(e[this.firstChildProp])e=e[this.firstChildProp];else{for(;e&&!e[this.nextSiblingProp]&&e.parentNode!==this.root;)e=e.parentNode;if(e)e=e[this.nextSiblingProp]}}while(e&&this.acceptNode&&!this.acceptNode(e));if(e)this.currentNode=e;return e}previousNode(){let e=this.currentNode;if(e!==this.root){do{if(e[this.previousSiblingProp]){e=e[this.previousSiblingProp];for(;e[this.lastChildProp];)e=e[this.lastChildProp]}else e=e.parentNode}while(e&&this.acceptNode&&!this.acceptNode(e));if(e)this.currentNode=e;return e}}}class ElementsTreeWalker extends TreeWalker{constructor(e,t=i.a.g.rootElement){super(t,null,!0);if(e)this.currentNode=e}}class ElementsAndTextTreeWalker extends TreeWalker{constructor(e,t=i.a.g.rootElement){super(t,e=>e.nodeType===Node.TEXT_NODE||e.nodeType===Node.ELEMENT_NODE);if(e)this.currentNode=e}}},function(e,t,n){"use strict";n.d(t,"e",(function(){return m}));n.d(t,"a",(function(){return f}));n.d(t,"f",(function(){return g}));n.d(t,"b",(function(){return p}));n.d(t,"d",(function(){return b}));n.d(t,"c",(function(){return v}));var i=n(7),o=n(13),a=n(28),s=n(0),r=n(11),c=n(31),l=n(5),u=n(1),d=n(4);const h={};function m(){setTimeout(()=>{Object(d.n)(!0);i.a.redrawLayersIfNecessary(!0);a.a.updateLines();c.a.updateWidth()});r.a.updateCommentFormButton();s.a.commentForms.forEach(e=>{e.adjustLabels()});b()}function f(e,t){h[e]=e=>{if(t()){e.preventDefault();e.returnValue="";return""}};$(window).on("beforeunload",h[e])}function g(e){if(h[e]){$(window).off("beforeunload",h[e]);delete h[e]}}function p(e){if(!Object(u.C)()){if(Object(u.G)(e,81,["ctrl","alt"])||Object(u.G)(e,81)&&!Object(u.B)()){const t=o.a.getLastActive();if(t){e.preventDefault();t.quote(e.ctrlKey)}}if(r.a.isMounted()){if(Object(u.G)(e,82)&&!Object(u.B)())r.a.refreshClick();if(Object(u.G)(e,87)&&!Object(u.B)())r.a.goToPreviousNewComment();if(Object(u.G)(e,83)&&!Object(u.B)())r.a.goToNextNewComment();if(Object(u.G)(e,70)&&!Object(u.B)())r.a.goToFirstUnseenComment();if(Object(u.G)(e,67)&&!Object(u.B)()){e.preventDefault();r.a.goToNextCommentForm()}}}}function b(){if(!s.a.state.isScrollHandlingPrevented&&!s.a.state.isAutoScrollInProgress){s.a.state.isScrollHandlingPrevented=!0;setTimeout(()=>{s.a.state.isScrollHandlingPrevented=!1;if(!s.a.state.isAutoScrollInProgress){if(s.a.state.isPageActive){i.a.registerSeen();r.a.updateCommentFormButton()}c.a.update()}},300)}}function v(){let e=location.hash.slice(1);if(Object(l.i)(e)){var t;try{e=decodeURIComponent(e)}catch(e){console.error(e)}null===(t=i.a.getByAnchor(e,!0))||void 0===t||t.scrollTo(!0)}}},function(e,t,n){"use strict";var i=n(0),o=n(1);t.a={users:{},getUser(e){if(e.includes("#"))e=e.slice(0,e.indexOf("#"));if(mw.util.isIPv6Address(e))e=e.toUpperCase().trim();else e=Object(o.V)(Object(o.j)(e)).trim();if(!this.users[e]){const t=e===i.a.g.USER_NAME?{gender:mw.user.options.get("gender")}:{};this.users[e]=new User(e,t)}return this.users[e]}};class User{constructor(e,t={}){this.name=e;this.options=new mw.Map;Object.keys(t).forEach(e=>{this.options.set(e,t[e])})}isRegistered(){if("<unregistered>"===this.name)return!1;if(void 0===this.cachedIsRegistered)this.cachedIsRegistered=!mw.util.isIPAddress(this.name);return this.cachedIsRegistered}setGender(e){this.options.set("gender",e)}getGender(){return this.options.get("gender")}}},function(e,t,n){"use strict";n.d(t,"d",(function(){return d}));n.d(t,"a",(function(){return m}));n.d(t,"c",(function(){return p}));n.d(t,"b",(function(){return v}));var i=n(2),o=n.n(i),a=n(3),s=n(7),r=n(0),c=n(6),l=n(1),u=n(8);function d(){return h.apply(this,arguments)}function h(){return(h=o()((function*(){if(Object(l.C)()||Object(l.g)("mediawiki.widgets.UsersMultiselectWidget"))return;const e=n(46).default;Object(c.e)();const t=new e;r.a.g.windowManager.addWindows([t]);r.a.g.windowManager.openWindow(t);r.a.g.settingsDialog=t}))).apply(this,arguments)}function m(){return f.apply(this,arguments)}function f(){return(f=o()((function*(){if(Object(l.C)())return;const e=n(50).default;Object(c.e)();const t=new e;r.a.g.windowManager.addWindows([t]);r.a.g.windowManager.openWindow(t)}))).apply(this,arguments)}function g(e){const t=$("<textarea>").val(e).appendTo(document.body).select(),n=document.execCommand("copy");t.remove();if(e&&n)mw.notify(r.a.s("copylink-copied"));else mw.notify(r.a.s("copylink-error"),{type:"error"})}function p(e,t){return b.apply(this,arguments)}function b(){return(b=o()((function*(e,t){var n,i;if(e.isLinkBeingCopied)return;const o=e instanceof s.a,d=Object(u.b)(o?e.anchor:Object(l.V)(e.anchor)),h=`[[${r.a.page.name}#${d}]]`,m=e.getUrl(),f=e.getUrl(!0);e.isLinkBeingCopied=!0;const p=e=>{g(e);I.close()};let b,v,y,w,E,C;if(o){let n;try{w=yield e.getDiffLink();E=yield e.getDiffLink(!0);y=yield e.generateDiffView()}catch(t){if(t instanceof a.a){const{type:i}=t.data;if("network"===i)n=r.a.s("cld-diff-error-network");else{n=r.a.s("cld-diff-error");const t=$("<a>").attr("href",e.getSourcePage().getUrl({action:"history"})).attr("target","_blank").text(r.a.s("cld-diff-history"));C=$("<div>").addClass("cd-copyLinkDialog-historyLinkBlock").append(t)}}else{n=r.a.s("cld-diff-error-unknown");console.warn(t)}}b=Object(c.c)({value:w||n,disabled:!w,label:r.a.s("cld-diff"),copyCallback:p});v=Object(c.c)({value:E||n,disabled:!E,label:r.a.s("cld-shortdiff"),copyCallback:p});if(Object(l.g)("mediawiki.diff.styles")){e.isLinkBeingCopied=!1;return}yield mw.loader.using("mediawiki.diff.styles")}const T=o?r.a.settings.defaultCommentLinkType:r.a.settings.defaultSectionLinkType;if(!t.shiftKey&&T){switch(T){case"wikilink":g(h);break;case"link":g(m);break;case"diff":g(w)}e.isLinkBeingCopied=!1;return}let x,k;if(o){x=r.a.s("cld-help-onlycd");k=Object(l.Y)(r.a.sParse("cld-help-notonlycd"))}const S=Object(c.c)({value:h,disabled:!h,label:r.a.s("cld-wikilink"),copyCallback:p,help:x}),O=Object(c.c)({value:`[[#${d}]]`,label:r.a.s("cld-currentpagewikilink"),copyCallback:p,help:k}),N=Object(c.c)({value:m,label:r.a.s("cld-link"),copyCallback:p,help:x}),_=Object(c.c)({value:f,label:r.a.s("cld-permanentlink"),copyCallback:p,help:x}),A=$("<input>").addClass("cd-hidden"),P=$("<div>").append([null===(n=b)||void 0===n?void 0:n.$element,null===(i=v)||void 0===i?void 0:i.$element,y,C,S.$element,O.$element,N.$element,_.$element]);P.children().first().prepend(A);const I=new OO.ui.MessageDialog({classes:["cd-copyLinkDialog"]});r.a.g.windowManager.addWindows([I]);r.a.g.windowManager.openWindow(I,{title:o?r.a.s("cld-title-comment"):r.a.s("cld-title-section"),message:P,actions:[{label:r.a.s("cld-close"),action:"close"}],size:o?"larger":"large"}).closed.then(()=>{e.isLinkBeingCopied=!1})}))).apply(this,arguments)}function v(e){const t=e.map(e=>{let t=void 0!==e.headline?`${r.a.s("rd-headline")}: ${e.headline}\n\n`:"";t+=`${r.a.s("rd-comment")}: ${e.comment}\n\n${r.a.s("rd-summary")}: ${e.summary}`;return t}).join("\n\n----\n"),n=new OO.ui.MultilineTextInputWidget({value:t,rows:20}),i=new OO.ui.FieldLayout(n,{align:"top",label:r.a.s("rd-intro")}),o=new OO.ui.MessageDialog;r.a.g.windowManager.addWindows([o]);r.a.g.windowManager.openWindow(o,{message:i.$element,actions:[{label:r.a.s("rd-close"),action:"close"}],size:"large"})}},function(e,t){e.exports=function(e,t,n){if(t in e)Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0});else e[t]=n;return e};e.exports.default=e.exports,e.exports.__esModule=!0},function(e,t,n){"use strict";var i,o=function(){if(void 0===i)i=Boolean(window&&document&&document.all&&!window.atob);return i},a=function(){var e={};return function(t){if(void 0===e[t]){var n=document.querySelector(t);if(window.HTMLIFrameElement&&n instanceof window.HTMLIFrameElement)try{n=n.contentDocument.head}catch(e){n=null}e[t]=n}return e[t]}}(),s=[];function r(e){for(var t=-1,n=0;n<s.length;n++)if(s[n].identifier===e){t=n;break}return t}function c(e,t){for(var n={},i=[],o=0;o<e.length;o++){var a=e[o],c=t.base?a[0]+t.base:a[0],l=n[c]||0,u="".concat(c," ").concat(l);n[c]=l+1;var d=r(u),h={css:a[1],media:a[2],sourceMap:a[3]};if(-1!==d){s[d].references++;s[d].updater(h)}else s.push({identifier:u,updater:p(h,t),references:1});i.push(u)}return i}function l(e){var t=document.createElement("style"),i=e.attributes||{};if(void 0===i.nonce){var o=1?n.nc:void 0;if(o)i.nonce=o}Object.keys(i).forEach((function(e){t.setAttribute(e,i[e])}));if("function"==typeof e.insert)e.insert(t);else{var s=a(e.insert||"head");if(!s)throw new Error("Couldn't find a style target. This probably means that the value for the 'insert' parameter is invalid.");s.appendChild(t)}return t}var u,d=(u=[],function(e,t){u[e]=t;return u.filter(Boolean).join("\n")});function h(e,t,n,i){var o=n?"":i.media?"@media ".concat(i.media," {").concat(i.css,"}"):i.css;if(e.styleSheet)e.styleSheet.cssText=d(t,o);else{var a=document.createTextNode(o),s=e.childNodes;if(s[t])e.removeChild(s[t]);if(s.length)e.insertBefore(a,s[t]);else e.appendChild(a)}}function m(e,t,n){var i=n.css,o=n.media,a=n.sourceMap;if(o)e.setAttribute("media",o);else e.removeAttribute("media");if(a&&"undefined"!=typeof btoa)i+="\n/*# sourceMappingURL=data:application/json;base64,".concat(btoa(unescape(encodeURIComponent(JSON.stringify(a))))," */");if(e.styleSheet)e.styleSheet.cssText=i;else{for(;e.firstChild;)e.removeChild(e.firstChild);e.appendChild(document.createTextNode(i))}}var f=null,g=0;function p(e,t){var n,i,o;if(t.singleton){var a=g++;n=f||(f=l(t));i=h.bind(null,n,a,!1);o=h.bind(null,n,a,!0)}else{n=l(t);i=m.bind(null,n,t);o=function(){!function(e){if(null===e.parentNode)return!1;e.parentNode.removeChild(e)}(n)}}i(e);return function(t){if(t){if(t.css===e.css&&t.media===e.media&&t.sourceMap===e.sourceMap)return;i(e=t)}else o()}}e.exports=function(e,t){if(!(t=t||{}).singleton&&"boolean"!=typeof t.singleton)t.singleton=o();var n=c(e=e||[],t);return function(e){e=e||[];if("[object Array]"===Object.prototype.toString.call(e)){for(var i=0;i<n.length;i++){var o=r(n[i]);s[o].references--}for(var a=c(e,t),l=0;l<n.length;l++){var u=r(n[l]);if(0===s[u].references){s[u].updater();s.splice(u,1)}}n=a}}}},function(e,t,n){"use strict";e.exports=function(e){var t=[];t.toString=function(){return this.map((function(t){var n=function(e,t){var n=e[1]||"",i=e[3];if(!i)return n;if(t&&"function"==typeof btoa){var o=(s=i,r=btoa(unescape(encodeURIComponent(JSON.stringify(s)))),c="sourceMappingURL=data:application/json;charset=utf-8;base64,".concat(r),"/*# ".concat(c," */")),a=i.sources.map((function(e){return"/*# sourceURL=".concat(i.sourceRoot||"").concat(e," */")}));return[n].concat(a).concat([o]).join("\n")}var s,r,c;return[n].join("\n")}(t,e);if(t[2])return"@media ".concat(t[2]," {").concat(n,"}");else return n})).join("")};t.i=function(e,n,i){if("string"==typeof e)e=[[null,e,""]];var o={};if(i)for(var a=0;a<this.length;a++){var s=this[a][0];if(null!=s)o[s]=!0}for(var r=0;r<e.length;r++){var c=[].concat(e[r]);if(!i||!o[c[0]]){if(n)if(!c[2])c[2]=n;else c[2]="".concat(n," and ").concat(c[2]);t.push(c)}}};return t}},function(e,t,n){"use strict";var i=n(3),o=n(7),a=n(27),s=n(0),r=n(11),c=n(5),l=n(4),u=n(1);let d;class TocItem{constructor(e){const t=e.querySelector(".toctext");if(!t)throw new i.a;const n=t.textContent,o=e.getAttribute("href").slice(1),a=e.parentNode;let[,s]=a.className.match(/\btoclevel-(\d+)/);s=Number(s);const r=e.querySelector(".tocnumber");if(!r)throw new i.a;const c=r.textContent;Object.assign(this,{headline:n,anchor:o,level:s,number:c,$element:$(a),$link:$(e),$text:$(t)})}replaceText(e){const t=e.clone().find("*").each((e,t)=>{if(["B","EM","I","S","STRIKE","STRONG","SUB","SUP"].includes(t.tagName))Array.from(t.attributes).forEach(e=>{t.removeAttribute(e.name)});else{Array.from(t.childNodes).forEach(e=>{t.parentNode.insertBefore(e,t)});t.remove()}}).end().html();this.$text.html(t);this.headline=this.$text.text().trim()}}t.a={possiblyHide(){if(s.a.g.$toc.length)if("1"===mw.cookie.get("hidetoc"))s.a.g.$toc.find(".toctogglecheckbox").prop("checked",!0)},reset(){d=null;s.a.g.$toc=s.a.g.$root.find(".toc");const e=s.a.g.$toc.closest('[style*="float: right"], [style*="float:right"], [style*="float: left"], [style*="float:left"]');s.a.g.isTocFloating=Boolean(e.length&&s.a.g.$root.has(e).length)},getItem(e){if(!s.a.g.$toc.length)return null;if(!d){const e=Array.from(s.a.g.$toc.get(0).querySelectorAll("li > a"));try{d=e.map(e=>new TocItem(e))}catch(e){console.error("Couldn't find an element of a table of contents item.");d=[];s.a.settings.modifyToc=!1}}return d.find(t=>t.anchor===e)||null},highlightWatchedSections(){if(s.a.settings.modifyToc&&s.a.g.$toc.length)s.a.sections.filter(e=>e.isWatched).forEach(e=>{e.updateTocLink()})},addCommentCount(){if(s.a.settings.modifyToc&&s.a.g.$toc.length)s.a.sections.forEach((e,t)=>{const n=e.getTocItem();if(!n)return;const i=e.comments.length;if(!i)return;const o=e.comments.filter(e=>!1===e.isSeen).length,a=0===t?s.a.s("toc-commentcount-full",i):i;let r;if(o){const e=0===t?s.a.s("toc-commentcount-new-full",o):o;r=" "+s.a.mws("parentheses",e)}else r="";const c=document.createElement("span");c.className="cd-toc-commentCount";const l=document.createElement("bdi");l.textContent=a+r;c.appendChild(l);n.$link.append(c)})},addNewSections(e){if(!s.a.settings.modifyToc||!s.a.g.$toc.length)return;Object(u.P)({saveTocHeight:!0});s.a.g.$toc.find(".cd-toc-notRenderedSectionList, .cd-toc-notRenderedSection").remove();e.forEach((t,n)=>{t.parent=e.slice(0,n).reverse().find(e=>e.level<t.level)});e.forEach(e=>{e.tocLevel=e.parent?e.parent.tocLevel+1:1});let t=[];const n=s.a.g.$toc.children("ul");e.forEach(e=>{var i;let o=null===(i=e.match)||void 0===i?void 0:i.getTocItem();if(!o){var a;const i=e.headline,r=e.tocLevel,c=t[r-1];let u;if(!c)u=t[t.length-1];const d=document.createElement("li");d.className="cd-toc-notRenderedSection toclevel-"+r;const h=document.createElement("a");h.href="#"+e.anchor;h.onclick=t=>{t.preventDefault();Object(l.k)({sectionAnchor:e.anchor,pushState:!0})};d.appendChild(h);if(null!==(a=s.a.g.currentPageWatchedSections)&&void 0!==a&&a.includes(i)){h.className="cd-toc-watched";h.title=s.a.s("toc-watched")}let m;if(c)m=c.number;else if(u)m=u.number+".1";else m="1";const f=document.createElement("span");f.className="tocnumber cd-toc-hiddenTocNumber";f.textContent=m;h.appendChild(f);const g=document.createElement("span");g.className="toctext";g.textContent=e.headline;h.appendChild(g);if(c)c.$element.after(d);else if(u){const e=document.createElement("ul");e.className="cd-toc-notRenderedSectionList toclevel-"+r;e.appendChild(d);u.$element.append(e)}else n.prepend(d);o={headline:i,level:r,number:m,$element:$(d)}}t[e.tocLevel-1]=o;t.splice(e.tocLevel)});Object(u.N)(!0)},addNewComments(e,t){var n;const i=null===(n=e.values().next().value)||void 0===n?void 0:n[0];if(!s.a.settings.modifyToc||!s.a.g.$toc.length||!i)return;const d=i instanceof o.a,h=Boolean(!s.a.state.hasPageBeenReloaded||!d||t.commentAnchor||t.sectionAnchor);Object(u.P)({saveTocHeight:h});s.a.g.$toc.find(".cd-toc-notRenderedCommentList").remove();const m="rtl"===s.a.g.CONTENT_DIR?"\u200f":"",f=s.a.mws("comma-separator");e.forEach((e,t)=>{var n;if(!t)return;const i="string"==typeof t?s.a.g.$toc.find(`.cd-toc-notRenderedSection a[href="#${$.escapeSelector(t)}"]`):null===(n=t.getTocItem())||void 0===n?void 0:n.$link;if(null==i||!i.length)return;let u=i;const h=i.next(".cd-toc-newCommentList");if(h.length)u=h;const g=u.get(0),p=document.createElement("ul");p.className=d?"cd-toc-newCommentList":"cd-toc-notRenderedCommentList";let b="";e.forEach((t,n)=>{const i=d?t.getParent():t.parent,u=null!=i&&i.author&&t.level>1?s.a.s("navpanel-newcomments-names",t.author.name,i.author.name):t.author.name,h=n<3||4===e.length;let g,v;if(t.date){v=Object(c.d)(t.date);g=h&&"default"!==s.a.settings.timestampFormat?Object(c.b)(t.date):v}else g=s.a.s("navpanel-newcomments-unknowndate");let y=u+m+f;if(h){const e=document.createElement("li");p.appendChild(e);const n=document.createElement("span");n.className="tocnumber cd-toc-bullet";n.innerHTML=s.a.sParse("bullet");e.appendChild(n);const i=document.createElement("span");i.className="toctext";e.appendChild(i);if("default"===s.a.settings.timestampFormat)y+=g;const c=document.createElement("a");c.href="#"+t.anchor;c.textContent=y;i.appendChild(c);if("default"!==s.a.settings.timestampFormat){const e=document.createElement("span");e.textContent=g;e.title=v;c.appendChild(e);let n;if(!d)n=()=>{r.a.updateTimestampsInRefreshButtonTooltip()};new a.a(e,t.date,!1,n)}if(t instanceof o.a)c.onclick=e=>{e.preventDefault();t.scrollTo(!1,!0)};else c.onclick=e=>{e.preventDefault();Object(l.k)({commentAnchor:t.anchor,pushState:!0})}}else b+=y+v+"\n"});if(e.length>4){const t=document.createElement("span");t.className="cd-toc-more";t.title=b.trim();t.textContent=s.a.s("toc-more",e.length-3);const n=document.createElement("li");n.appendChild(t);p.appendChild(n)}g.parentNode.insertBefore(p,g.nextSibling)});Object(u.N)(!0)}}},function(e,t,n){e.exports=function(){"use strict";var e=6e4,t=36e5,n="millisecond",i="second",o="minute",a="hour",s="day",r="week",c="month",l="quarter",u="year",d="date",h="Invalid Date",m=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[^0-9]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,f=/\[([^\]]+)]|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("_")},p=function(e,t,n){var i=String(e);return!i||i.length>=t?e:""+Array(t+1-i.length).join(n)+e},b={s:p,z:function(e){var t=-e.utcOffset(),n=Math.abs(t),i=Math.floor(n/60),o=n%60;return(t<=0?"+":"-")+p(i,2,"0")+":"+p(o,2,"0")},m:function e(t,n){if(t.date()<n.date())return-e(n,t);var i=12*(n.year()-t.year())+(n.month()-t.month()),o=t.clone().add(i,c),a=n-o<0,s=t.clone().add(i+(a?-1:1),c);return+(-(i+(n-o)/(a?o-s:s-o))||0)},a:function(e){return e<0?Math.ceil(e)||0:Math.floor(e)},p:function(e){return{M:c,y:u,w:r,d:s,D:d,h:a,m:o,s:i,ms:n,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 x},E=function(e,t,n){var i;if(!e)return v;if("string"==typeof e)y[e]&&(i=e),t&&(y[e]=t,i=e);else{var o=e.name;y[o]=e,i=o}return!n&&i&&(v=i),i||!n&&v},C=function(e,t){if(w(e))return e.clone();var n="object"==typeof t?t:{};return n.date=e,n.args=arguments,new x(n)},T=b;T.l=E,T.i=w,T.w=function(e,t){return C(e,{locale:t.$L,utc:t.$u,x:t.$x,$offset:t.$offset})};var x=function(){function g(e){this.$L=E(e.locale,null,!0),this.parse(e)}var p=g.prototype;return p.parse=function(e){this.$d=function(e){var t=e.date,n=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 i=t.match(m);if(i){var o=i[2]-1||0,a=(i[7]||"0").substring(0,3);return n?new Date(Date.UTC(i[1],o,i[3]||1,i[4]||0,i[5]||0,i[6]||0,a)):new Date(i[1],o,i[3]||1,i[4]||0,i[5]||0,i[6]||0,a)}}return new Date(t)}(e),this.$x=e.x||{},this.init()},p.init=function(){var e=this.$d;this.$y=e.getFullYear(),this.$M=e.getMonth(),this.$D=e.getDate(),this.$W=e.getDay(),this.$H=e.getHours(),this.$m=e.getMinutes(),this.$s=e.getSeconds(),this.$ms=e.getMilliseconds()},p.$utils=function(){return T},p.isValid=function(){return!(this.$d.toString()===h)},p.isSame=function(e,t){var n=C(e);return this.startOf(t)<=n&&n<=this.endOf(t)},p.isAfter=function(e,t){return C(e)<this.startOf(t)},p.isBefore=function(e,t){return this.endOf(t)<C(e)},p.$g=function(e,t,n){return T.u(e)?this[t]:this.set(n,e)},p.unix=function(){return Math.floor(this.valueOf()/1e3)},p.valueOf=function(){return this.$d.getTime()},p.startOf=function(e,t){var n=this,l=!!T.u(t)||t,h=T.p(e),m=function(e,t){var i=T.w(n.$u?Date.UTC(n.$y,t,e):new Date(n.$y,t,e),n);return l?i:i.endOf(s)},f=function(e,t){return T.w(n.toDate()[e].apply(n.toDate("s"),(l?[0,0,0,0]:[23,59,59,999]).slice(t)),n)},g=this.$W,p=this.$M,b=this.$D,v="set"+(this.$u?"UTC":"");switch(h){case u:return l?m(1,0):m(31,11);case c:return l?m(1,p):m(0,p+1);case r:var y=this.$locale().weekStart||0,w=(g<y?g+7:g)-y;return m(l?b-w:b+(6-w),p);case s:case d:return f(v+"Hours",0);case a:return f(v+"Minutes",1);case o:return f(v+"Seconds",2);case i:return f(v+"Milliseconds",3);default:return this.clone()}},p.endOf=function(e){return this.startOf(e,!1)},p.$set=function(e,t){var r,l=T.p(e),h="set"+(this.$u?"UTC":""),m=(r={},r[s]=h+"Date",r[d]=h+"Date",r[c]=h+"Month",r[u]=h+"FullYear",r[a]=h+"Hours",r[o]=h+"Minutes",r[i]=h+"Seconds",r[n]=h+"Milliseconds",r)[l],f=l===s?this.$D+(t-this.$W):t;if(l===c||l===u){var g=this.clone().set(d,1);g.$d[m](f),g.init(),this.$d=g.set(d,Math.min(this.$D,g.daysInMonth())).$d}else m&&this.$d[m](f);return this.init(),this},p.set=function(e,t){return this.clone().$set(e,t)},p.get=function(e){return this[T.p(e)]()},p.add=function(n,l){var d,h=this;n=Number(n);var m=T.p(l),f=function(e){var t=C(h);return T.w(t.date(t.date()+Math.round(e*n)),h)};if(m===c)return this.set(c,this.$M+n);if(m===u)return this.set(u,this.$y+n);if(m===s)return f(1);if(m===r)return f(7);var g=(d={},d[o]=e,d[a]=t,d[i]=1e3,d)[m]||1,p=this.$d.getTime()+n*g;return T.w(p,this)},p.subtract=function(e,t){return this.add(-1*e,t)},p.format=function(e){var t=this;if(!this.isValid())return h;var n=e||"YYYY-MM-DDTHH:mm:ssZ",i=T.z(this),o=this.$locale(),a=this.$H,s=this.$m,r=this.$M,c=o.weekdays,l=o.months,u=function(e,i,o,a){return e&&(e[i]||e(t,n))||o[i].substr(0,a)},d=function(e){return T.s(a%12||12,e,"0")},m=o.meridiem||function(e,t,n){var i=e<12?"AM":"PM";return n?i.toLowerCase():i},g={YY:String(this.$y).slice(-2),YYYY:this.$y,M:r+1,MM:T.s(r+1,2,"0"),MMM:u(o.monthsShort,r,l,3),MMMM:u(l,r),D:this.$D,DD:T.s(this.$D,2,"0"),d:String(this.$W),dd:u(o.weekdaysMin,this.$W,c,2),ddd:u(o.weekdaysShort,this.$W,c,3),dddd:c[this.$W],H:String(a),HH:T.s(a,2,"0"),h:d(1),hh:d(2),a:m(a,s,!0),A:m(a,s,!1),m:String(s),mm:T.s(s,2,"0"),s:String(this.$s),ss:T.s(this.$s,2,"0"),SSS:T.s(this.$ms,3,"0"),Z:i};return n.replace(f,(function(e,t){return t||g[e]||i.replace(":","")}))},p.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},p.diff=function(n,d,h){var m,f=T.p(d),g=C(n),p=(g.utcOffset()-this.utcOffset())*e,b=this-g,v=T.m(this,g);return v=(m={},m[u]=v/12,m[c]=v,m[l]=v/3,m[r]=(b-p)/6048e5,m[s]=(b-p)/864e5,m[a]=b/t,m[o]=b/e,m[i]=b/1e3,m)[f]||b,h?v:T.a(v)},p.daysInMonth=function(){return this.endOf(c).$D},p.$locale=function(){return y[this.$L]},p.locale=function(e,t){if(!e)return this.$L;var n=this.clone(),i=E(e,t,!0);return i&&(n.$L=i),n},p.clone=function(){return T.w(this.$d,this)},p.toDate=function(){return new Date(this.valueOf())},p.toJSON=function(){return this.isValid()?this.toISOString():null},p.toISOString=function(){return this.$d.toISOString()},p.toString=function(){return this.$d.toUTCString()},g}(),k=x.prototype;return C.prototype=k,[["$ms",n],["$s",i],["$m",o],["$H",a],["$W",s],["$M",c],["$y",u],["$D",d]].forEach((function(e){k[e[1]]=function(t){return this.$g(t,e[0],e[1])}})),C.extend=function(e,t){return e.$i||(e(t,x,C),e.$i=!0),C},C.locale=E,C.isDayjs=w,C.unix=function(e){return C(1e3*e)},C.en=y[v],C.Ls=y,C.p={},C}()},function(e,t,n){"use strict";n.d(t,"a",(function(){return d}));var i=n(32),o=n(36),a=n(34),s=n(0),r=n(4),c=n(5);function l(){const e=e=>i[e]?e:(e=>(a[e]||[]).find(e=>i[e]))(e),t=e(mw.config.get("wgContentLanguage")),n=e(mw.config.get("wgUserLanguage"));s.a.g.CONTENT_DATE_FORMAT=i[t];s.a.g.UI_DATE_FORMAT=i[n];s.a.g.CONTENT_DIGITS=mw.config.get("wgTranslateNumerals")?o[t]:null;s.a.g.UI_DIGITS=mw.config.get("wgTranslateNumerals")?o[n]:null}function u(e){const t=[];for(let n=0;n<e.length;n++){let i=e[n];if("x"===i&&n<e.length-1||"xk"===i&&n<e.length-1)i+=e[++n];if(["xg","D","l","F","M"].includes(i))t.push(i);else if("\\"===i&&n<e.length-1)++n}return t}function d(){l();const e=u(s.a.g.CONTENT_DATE_FORMAT).map(e=>c.a[e]),t=["word-separator","comma-separator","colon-separator","timezone-utc"].concat(...e),n=u(s.a.g.UI_DATE_FORMAT).map(e=>c.a[e]),i=["parentheses","parentheses-start","parentheses-end","word-separator","comma-separator","colon-separator","nextdiff","timezone-utc"].concat(...n),o=mw.config.get("wgContentLanguage")===mw.config.get("wgUserLanguage");if(o){const e={};Object.keys(s.a.config.messages).filter(e=>i.includes(e)).forEach(t=>{e[t]=s.a.config.messages[t]});mw.messages.set(e)}s.a.g.contentLanguageMessages={};const a=e=>{Object.keys(e).forEach(t=>{mw.messages.set("(content)"+t,e[t]);s.a.g.contentLanguageMessages[t]=e[t]})},d=e=>{const n={};Object.keys(e).filter(e=>t.includes(e)).forEach(t=>{n[t]=e[t]});a(n)};d(s.a.config.messages);Object(r.c)();const h=[];if(o){const e=t.concat(i);let n;for(;(n=e.splice(0,50)).length;){const e=s.a.g.mwApi.loadMessagesIfMissing(n).then(()=>{d(mw.messages.get())});h.push(e)}}else{let e;const n=t.filter(e=>!s.a.g.contentLanguageMessages[e]);for(;(e=n.splice(0,50)).length;){const t=s.a.g.mwApi.getMessages(e,{amlang:mw.config.get("wgContentLanguage")}).then(a);h.push(t)}const o=s.a.g.mwApi.loadMessagesIfMissing(i);h.push(o)}s.a.g.CONTRIBS_PAGE=s.a.config.contribsPage;s.a.g.CONTENT_TIMEZONE=s.a.config.timezone;if(!s.a.g.CONTRIBS_PAGE||!s.a.g.CONTENT_TIMEZONE){const e=s.a.g.mwApi.get({action:"query",meta:"siteinfo",siprop:["specialpagealiases","general"]}).then(e=>{e.query.specialpagealiases.some(e=>{if("Contributions"===e.realname){s.a.g.CONTRIBS_PAGE=mw.config.get("wgFormattedNamespaces")[-1]+":"+e.aliases[0];return!0}});s.a.g.CONTENT_TIMEZONE=e.query.general.timezone});h.push(e)}return h}},function(e,t,n){"use strict";var i=n(2),o=n.n(i),a=n(3),s=n(7),r=n(15),c=n(28),l=n(0),u=n(11),d=n(23),h=n(18),m=n(1),f=n(9),g=n(4);let p,b,v,y,w,E=0;const C={},T={};function x(e){if(!Number.isNaN(Number(e)))l.a.g.worker.postMessage({type:"setAlarm",interval:e})}function k(){l.a.g.worker.postMessage({type:"removeAlarm"})}function S(){return O.apply(this,arguments)}function O(){return(O=o()((function*(){if(!l.a.state.isPageActive||l.a.state.isPageBeingReloaded)return;const e=document.hidden;if(!e||v){try{const e=yield l.a.page.getRevisions({rvprop:["ids"],rvlimit:1},!0),t=mw.config.get("wgRevisionId");if(e.length&&e[0].revid>(p||t)){const{revisionId:e,comments:n,sections:i}=yield U.processPage();p=e;if(D(t)){const{comments:e}=yield U.processPage(t);if(D(t)){_(i);d.a.addNewSections(i);A(e,n);L(e);yield R(n,e,t)}}}}catch(e){if(!(e instanceof a.a)||e.data&&"network"!==e.data.type)console.warn(e)}if(e){x(1e3*l.a.g.BACKGROUND_UPDATE_CHECK_INTERVAL);v=!0}else x(1e3*l.a.g.UPDATE_CHECK_INTERVAL)}else{const e=()=>{$(document).off("visibilitychange",e);v=!1;k();S()};$(document).on("visibilitychange",e);x(1e3*Math.abs(l.a.g.BACKGROUND_UPDATE_CHECK_INTERVAL-l.a.g.UPDATE_CHECK_INTERVAL));v=!0}}))).apply(this,arguments)}function N(){return(N=o()((function*(){var e;const t=yield l.a.page.getRevisions({rvprop:["ids"],rvstart:new Date(1e3*l.a.g.previousVisitUnixTime).toISOString(),rvlimit:1},!0);y=null===(e=t[0])||void 0===e?void 0:e.revid;const n=mw.config.get("wgRevisionId");if(y&&y<n){const{comments:e}=yield U.processPage(y),{comments:t}=yield U.processPage(n);if(D(n)){A(t,e);I(t)}}}))).apply(this,arguments)}function _(e){l.a.sections.forEach(e=>{delete e.match;delete e.matchScore});e.forEach(e=>{delete e.match});e.forEach(e=>{const{section:t,score:n}=r.a.search(e,!0)||{};if(t&&(!t.match||n>t.matchScore)){if(t.match)delete t.match.match;t.match=e;t.matchScore=n;e.match=t}});l.a.sections.forEach(e=>{var t,n;e.liveSectionNumber=null!==(t=null===(n=e.match)||void 0===n?void 0:n.sectionNumber)&&void 0!==t?t:null;e.liveSectionNumberRevisionId=p;delete e.code;delete e.revisionId;delete e.queryTimestamp})}function A(e,t){e.forEach(e=>{delete e.match;delete e.matchScore;delete e.hasPoorMatch;delete e.parentMatch});const n=(n,i)=>i.map(i=>{var o,a,s,r,c;const l=(null===(o=i.parent)||void 0===o?void 0:o.anchor)===(null===(a=n.parent)||void 0===a?void 0:a.anchor),u=(null===(s=i.section)||void 0===s?void 0:s.headline)===(null===(r=n.section)||void 0===r?void 0:r.headline),d=i.id===n.id&&e.length===t.length,h=i.elementHtmls.filter((e,t)=>e===n.elementHtmls[t]).length/i.elementHtmls.length,f=1===h?1:Object(m.e)(i.text,n.text);return{comment:i,score:l*(null!==(c=i.parent)&&void 0!==c&&c.anchor?1:.75)+1*u+h+f+.25*d}}).filter(e=>e.score>1.66).sort((e,t)=>{if(t.score>e.score)return 1;else if(t.score<e.score)return-1;else return 0});t.forEach(t=>{const i=e.filter(e=>e.authorName===t.authorName&&e.date&&t.date&&e.date.getTime()===t.date.getTime());if(1===i.length)if(i[0].match){const e=[t,i[0].match];i[0].match=n(i[0],e)[0].comment}else i[0].match=t;else if(i.length>1){let e;n(t,i).forEach(n=>{if(!e&&(!n.comment.match||n.comment.matchScore<n.score)){n.comment.match=t;n.comment.matchScore=n.score;delete n.comment.hasPoorMatch;e=!0}else if(!n.comment.match)n.comment.hasPoorMatch=!0})}})}function P(e,t){return t.textComparedHtml!==e.textComparedHtml||t.headingComparedHtml&&t.headingComparedHtml!==e.headingComparedHtml}function I(e){const t=function(e){const t=Object.assign({},e);Object.keys(t).forEach(e=>{var n;const i=t[e],o=null===(n=i[Object.keys(i)[0]])||void 0===n?void 0:n.seenUnixTime;if(!o||o<Date.now()-60*l.a.g.SECONDS_IN_DAY*1e3)delete t[e]});return t}(Object(m.r)("seenRenderedChanges")),n=mw.config.get("wgArticleId"),i=[];e.forEach(e=>{if(e.anchor===w)return;const o=e.match;if(o){var a,c;const d=null===(a=t[n])||void 0===a?void 0:null===(c=a[e.anchor])||void 0===c?void 0:c.comparedHtml;if(P(o,e)&&d!==e.comparedHtml){const t=s.a.getByAnchor(e.anchor);if(!t)return;const n=[o,e];t.markAsChanged("changedSince",!0,y,n);if(t.isOpeningSection){const n=t.section;if(n&&!n.isWatched&&/^H[1-6]$/.test(e.elementNames[0])&&o.elementNames[0]===e.elementNames[0]){var u;const t=o.elementHtmls[0].replace(/\x01(\d+)_\w+\x02/g,(t,n)=>e.hiddenElementsData[n-1].html),i={headlineElement:$("<span>").html($(t).html()).get(0)};r.a.prototype.parseHeadline.call(i);const a=n.headline;if(a&&i.headline!==a&&null!==(u=l.a.g.originalThisPageWatchedSections)&&void 0!==u&&u.includes(i.headline))n.watch(!0,i.headline)}}const a={old:o,current:e};i.push({comment:t,commentData:a})}}});if(i.length)mw.hook("convenientDiscussions.changesSincePreviousVisit").fire(i);delete t[n];Object(m.R)("seenRenderedChanges",t);mw.storage.remove("convenientDiscussions-seenRenderedEdits")}function L(e){let t=!1;const n=[];e.forEach(e=>{const i=e.match;let o;const a={};if(i){o=s.a.getByAnchor(e.anchor);if(!o)return;if(o.isDeleted){o.unmarkAsChanged("deleted");t=!0;a.undeleted=!0}if(P(e,i)){if(!o.comparedHtml||o.comparedHtml!==i.comparedHtml){const n=o.update(e,i);o.comparedHtml=i.comparedHtml;const s=[e,i];o.markAsChanged("changed",n,p,s);t=!0;a.changed={updateSuccess:n}}}else if(o.isChanged){o.update(e,i);o.unmarkAsChanged("changed");t=!0;a.unchanged=!0}}else if(!e.hasPoorMatch){o=s.a.getByAnchor(e.anchor);if(!o||o.isDeleted)return;o.markAsChanged("deleted");t=!0;a.deleted=!0}if(Object.keys(a).length){const t={current:e,new:i};n.push({comment:o,events:a,commentData:t})}});if(t){s.a.redrawLayersIfNecessary(!1,!0);c.a.init(!1)}if(n.length)mw.hook("convenientDiscussions.newChanges").fire(n)}function M(e){let t=[];if("all"===l.a.settings.notifications)t=e;else if("toMe"===l.a.settings.notifications)t=e.filter(e=>e.isToMe);if("none"!==l.a.settings.notifications&&t.length){const e=Object(m.t)().find(e=>e.comments&&e.notification.isOpen);if(e)t.push(...e.comments)}if(t.length){let e;const i=l.a.commentForms.some(e=>e.isAltered())?" "+l.a.mws("parentheses",l.a.s("notification-formdata")):"",o=l.a.sParse("notification-reload",i);if(1===t.length){const n=t[0];if(n.isToMe){const t=n.watchedSectionHeadline?l.a.mws("word-separator")+l.a.s("notification-part-insection",n.watchedSectionHeadline):l.a.mws("word-separator")+l.a.s("notification-part-onthispage");e=l.a.sParse("notification-toyou",n.author.name,n.author,t)+" "+o}else e=l.a.sParse("notification-insection",n.author.name,n.author,n.watchedSectionHeadline)+" "+o}else{var n;let i;if(t.every(e=>e.watchedSectionHeadline===t[0].watchedSectionHeadline))i=t[0].watchedSectionHeadline;const a=l.a.mws("word-separator")+(i?l.a.s("notification-part-insection",i):l.a.s("notification-part-onthispage"));let s=l.a.s("notification-newcomments-mayberelevant");if(!s.startsWith(","))s=l.a.mws("word-separator")+s;const r=i&&null!==(n=l.a.g.currentPageWatchedSections)&&void 0!==n&&n.includes(i)?"":s;e=l.a.sParse("notification-newcomments",t.length,a,r)+" "+o}const a=Object(m.Y)(e);Object(m.a)(a,{tag:"convenient-discussions-new-comments"},{comments:t}).$notification.on("click",()=>{Object(g.k)({commentAnchor:t[0].anchor})})}}function j(e){let t,n=[];if("all"===l.a.settings.desktopNotifications)n=e;else if("toMe"===l.a.settings.desktopNotifications)n=e.filter(e=>e.isToMe);if("undefined"==typeof Notification||"granted"!==Notification.permission||!n.length||document.hasFocus())return;const i=n[0];if(1===n.length)if(i.isToMe){var o;const e=null!==(o=i.section)&&void 0!==o&&o.headline?l.a.mws("word-separator")+l.a.s("notification-part-insection",i.section.headline):"";t=l.a.s("notification-toyou-desktop",i.author.name,i.author,e,l.a.page.name)}else t=l.a.s("notification-insection-desktop",i.author.name,i.author,i.section.headline,l.a.page.name);else{var a;let e;if(n.every(e=>e.watchedSectionHeadline===n[0].watchedSectionHeadline))e=n[0].watchedSectionHeadline;const i=e?l.a.mws("word-separator")+l.a.s("notification-part-insection",e):"";let o=l.a.s("notification-newcomments-mayberelevant");if(!o.startsWith(l.a.mws("comma-separator")))o=l.a.mws("word-separator")+o;const s=e&&null!==(a=l.a.g.currentPageWatchedSections)&&void 0!==a&&a.includes(e)?"":o;t=l.a.s("notification-newcomments-desktop",n.length,i,l.a.page.name,s)}new Notification(mw.config.get("wgSiteName"),{body:t,tag:"convenient-discussions-"+n[n.length-1].anchor}).onclick=()=>{parent.focus();window.focus();s.a.redrawLayersIfNecessary(!1,!0);Object(g.k)({commentAnchor:i.anchor,closeNotificationsSmoothly:!1})}}function D(e){return e===mw.config.get("wgRevisionId")&&!Object(g.i)()&&!l.a.commentForms.some(e=>e.isBeingSubmitted())}function R(e,t,n){return H.apply(this,arguments)}function H(){return(H=o()((function*(e,t,n){e.forEach(e=>{var t;e.author=h.a.getUser(e.authorName);if(null!==(t=e.parent)&&void 0!==t&&t.authorName)e.parent.author=h.a.getUser(e.parent.authorName)});const i=e.filter(e=>e.anchor&&!t.some(t=>t.match===e)).map(e=>{const n=Object.assign({},e);if(e.parent){const i=t.find(t=>t.match===e.parent);if(null!=i&&i.anchor)n.parentMatch=s.a.getByAnchor(i.anchor)}return n}),o=i.filter(e=>{if(!l.a.settings.notifyCollapsedThreads&&0!==e.logicalLevel){var t;let n;for(let t=e;t&&!n;t=t.parent)n=t.parentMatch;if(null!==(t=n)&&void 0!==t&&t.isCollapsed)return!1}if(e.isOwn||l.a.settings.notificationsBlacklist.includes(e.author.name))return!1;if(e.isToMe)return!0;if(!l.a.g.currentPageWatchedSections)return!1;if(e.section){const t=e.section.match;if(t){const n=t.getClosestWatchedSection(!0);if(n){e.watchedSectionHeadline=n.headline;return!0}}}return!1});if(l.a.g.GENDER_AFFECTS_USER_STRING)yield Object(f.g)(i.map(e=>e.author),!0);if(!D(n))return;if(o[0])U.relevantNewCommentAnchor=o[0].anchor;else if(i[0])U.relevantNewCommentAnchor=i[0].anchor;const a=s.a.groupBySection(i),r=Boolean(o.length);u.a.updateRefreshButton(i.length,a,r);U.updatePageTitle(i.length,r);d.a.addNewComments(a);s.a.addNewCommentsNotes(i);const c=o.filter(e=>!b.some(t=>t.anchor===e.anchor));M(c);j(c);b.push(...c)}))).apply(this,arguments)}function B(e){return F.apply(this,arguments)}function F(){return(F=o()((function*(e){const t=e.data;if("wakeUp"===t.type)S();else{const e=t.resolverId;delete t.resolverId;delete t.type;T[e](t);delete T[e]}}))).apply(this,arguments)}const U={relevantNewCommentAnchor:null,init(e,t){var n=this;return o()((function*(){if(l.a.g.worker){b=[];n.relevantNewCommentAnchor=null;v=!1;y=null;if(l.a.g.worker.onmessage)k();else l.a.g.worker.onmessage=B;x(1e3*l.a.g.UPDATE_CHECK_INTERVAL);yield e;if(l.a.g.previousVisitUnixTime){!function(){N.apply(this,arguments)}();if(t.wasCommentFormSubmitted&&t.commentAnchor)w=t.commentAnchor}}}))()},processPage:e=>o()((function*(){if(C[e])return C[e];const{text:t,revid:n}=(yield l.a.page.parse({oldid:e},!0))||{},i=["$content","$root","$toc","rootElement","visits","watchedSections"],o=yield(a={type:"parse",revisionId:n,text:t,g:Object(m.F)(l.a.g,["isIPv6Address"],i),config:Object(m.F)(l.a.config,["checkForCustomForeignComponents"],i)},new Promise(e=>{const t=E++;Object.assign(a,{resolverId:t});l.a.g.worker.postMessage(a);T[t]=e}));var a;if(!C[o.revisionId])C[o.revisionId]=o;Object.keys(C).forEach(e=>{const t=Number(e);if(t!==o.revisionId&&t!==p&&t!==y&&t!==mw.config.get("wgRevisionId"))delete C[e]});return o}))(),updatePageTitle(e,t){const n=e?`(${e}${t?"*":""}) `:"";document.title=document.title.replace(/^(?:\(\d+\*?\) )?/,n)}};t.a=U},function(e,t,n){"use strict";var i=n(24),o=n.n(i),a=n(0),s=n(11),r=n(5),c=n(1);let l,u=[],d=!1,h=[];class LiveTimestamp{constructor(e,t,n,i){this.element=e;this.date=t;this.addTimezone=n;this.callback=i;if("improved"===a.a.settings.timestampFormat){if(!d)LiveTimestamp.initImproved();if(t.getTime()>l)h.push(this)}else if("relative"===a.a.settings.timestampFormat)this.setUpdateTimeout()}setUpdateTimeout(e=!1){if(e)this.update();const t=Date.now()-this.date.getTime(),n=a.a.g.MILLISECONDS_IN_MINUTE,i=r.n.find(e=>t<e.interval*n);if(i){const e=Math.floor(t/n/i.step);for(let o=(i.start+e*i.step)*n;o<=i.interval*n;o+=i.step*n)if(t<o){Object(c.K)(u,this.updateTimeout);this.updateTimeout=setTimeout(()=>{this.setUpdateTimeout(!0)},o-t);u.push(this.updateTimeout);break}}}update(){this.element.textContent=Object(r.b)(this.date,this.addTimezone);if(this.callback)this.callback()}static initImproved(){d=!0;let e=o()();if(a.a.settings.useUiTime&&!["UTC",0].includes(a.a.g.UI_TIMEZONE))e="number"==typeof a.a.g.UI_TIMEZONE?e.utcOffset(a.a.g.UI_TIMEZONE):e.tz(a.a.g.UI_TIMEZONE);else e=e.utc();e=e.startOf("day");l=e.subtract(1,"day").valueOf();const t=e.add(1,"day").valueOf(),n=e.add(2,"day").valueOf(),i=t-Date.now(),s=setTimeout(LiveTimestamp.updateImproved,i),r=n-Date.now(),c=setTimeout(LiveTimestamp.updateImproved,r);u.push(s,c);a.a.g.delays=[i,r]}static updateImproved(){h.forEach(e=>{e.update()});if(s.a.isMounted())s.a.updateTimestampsInRefreshButtonTooltip()}static reset(){u.forEach(clearTimeout);u=[];d=!1;h=[]}}t.a=LiveTimestamp},function(e,t,n){"use strict";var i=n(12),o=n(3),a=n(7),s=n(0),r=n(16),c=n(1),l=n(9),u=n(17),d=n(4);let h,m,f,g;function p(e,t,n){g.currentNode=e;let i,o=e;do{if(g.currentNode.classList.contains("cd-commentLevel")){const e=g.currentNode.getAttribute("class").match(/cd-commentLevel-(\d+)/);if(e&&Number(e[1])===(t||1)){i=0===t?g.currentNode:o;if(n&&i.contains(n))return null;break}}o=g.currentNode}while(g.parentNode());return i||null}function b(e,t,n){let i=e;const o=t[t.length-1];do{i=i.parentNode}while(!i.contains(o));let a=o;for(let e=a.parentNode;!(e===i||n&&e.contains(n));e=e.parentNode)a=e;for(let e=a.nextElementSibling;e&&"DL"===e.tagName&&e.classList.contains("cd-section-button-container");e=e.nextElementSibling)a=e;return a}function v(){if(!Object(d.h)())return;const e=s.a.comments.filter(e=>{var t;return null===(t=e.thread)||void 0===t?void 0:t.isCollapsed}).map(e=>e.anchor),t=Date.now(),n=e.length?{collapsedThreads:e,saveUnixTime:t}:{},i=Object(c.r)("collapsedThreads");i[mw.config.get("wgArticleId")]=n;Object(c.R)("collapsedThreads",i)}function y(){var e;const t=function(e){const t=Object.assign({},e),n=60*s.a.g.SECONDS_IN_DAY*1e3;Object.keys(t).forEach(e=>{var i;const o=t[e];if(null===(i=o.collapsedThreads)||void 0===i||!i.length||o.saveUnixTime<Date.now()-n)delete t[e]});return t}(Object(c.r)("collapsedThreads")),n=t[mw.config.get("wgArticleId")]||{},i=[];null===(e=n.collapsedThreads)||void 0===e||e.reverse().forEach(e=>{const t=a.a.getByAnchor(e);if(null!=t&&t.thread)i.push(t);else n.collapsedThreads.splice(n.collapsedThreads.indexOf(e),1)});let o;if(s.a.g.GENDER_AFFECTS_USER_STRING){const e=Object(c.k)(i.map(e=>e.thread.getUsersInThread()));o=Object(l.g)(e)}i.forEach(e=>{e.thread.collapse(o)});if(Object(d.h)())Object(c.R)("collapsedThreads",t)}class Thread{constructor(e){var t;if(!h)h=s.a.g.THREAD_ELEMENT_PROTOTYPES;this.rootComment=e;this.lastComment=e.getChildren(!0).slice(-1)[0]||e;this.commentCount=this.lastComment.id-this.rootComment.id+1;this.visualLastComment=s.a.g.pageHasOutdents?e.getChildren(!0,!0).slice(-1)[0]||e:this.lastComment;let n,i,a;const r=this.lastComment.highlightables,c=this.visualLastComment.highlightables,l=null===(t=s.a.comments[this.lastComment.id+1])||void 0===t?void 0:t.elements[0];if(0===this.rootComment.level){n=this.rootComment.highlightables[0];i=b(n,c,l);a=this.lastComment===this.visualLastComment?i:b(n,r,l)}else{n=p(e.highlightables[0],e.level,l)||e.highlightables[0];const t=r[r.length-1];if(this.lastComment===this.visualLastComment){a=p(t,e.level,l)||t;i=a}else{const o=s.a.comments.slice(0,this.lastComment.id+1).reverse().find(e=>e.isOutdented);a=0===o.level?b(n,r,l):p(t,o.level,l);i=p(c[c.length-1],e.level,l)}}if(!n||!a||!i)throw new o.a;this.startElement=n;this.endElement=a;this.visualEndElement=i}createLine(){this.clickArea=h.clickArea.cloneNode(!0);if(this.rootComment.isStartStretched)this.clickArea.classList.add("cd-thread-clickArea-stretchedStart");this.clickArea.onmouseenter=()=>{this.highlightTimeout=setTimeout(()=>{this.clickArea.classList.add("cd-thread-clickArea-hovered")},75)};this.clickArea.onmouseleave=()=>{clearTimeout(this.highlightTimeout);this.clickArea.classList.remove("cd-thread-clickArea-hovered")};this.clickArea.onclick=()=>{if(this.clickArea.classList.contains("cd-thread-clickArea-hovered"))this.toggle()};this.line=this.clickArea.firstChild;if(this.endElement!==this.visualEndElement){let t=!1;for(let n=this.rootComment.id;n<=this.lastComment.id;n++){var e;const i=s.a.comments[n];if(i.isOutdented)t=!0;if(null===(e=i.thread)||void 0===e||!e.isCollapsed);else n=i.thread.lastComment.id}if(t)this.line.classList.add("cd-thread-line-extended")}}getAdjustedEndElement(e){var t;const n=e?this.visualLastComment:this.lastComment,i=e?this.visualEndElement:this.endElement;let o,a=i.classList.contains("cd-section-button-container");if(this.rootComment.level>=1||!a){const e=this.rootComment.subitemList,t=e.get("newCommentsNote")||this.rootComment===n&&e.get("replyForm");if(t)o=t}return null!==(t=o)&&void 0!==t&&t.is(":visible")?p(o.get(0),this.rootComment.level):i}getUsersInThread(){return[this.rootComment,...this.rootComment.getChildren(!0)].map(e=>e.author).filter(c.X)}collapse(e){this.collapsedRange=Object(c.p)(this.startElement,this.getAdjustedEndElement());this.collapsedRange.forEach(e=>{e.classList.add("cd-hidden");const t=$(e),n=t.data("cd-collapsed-thread-root-comments")||[];n.push(this.rootComment);t.data("cd-collapsed-thread-root-comments",n)});this.isCollapsed=!0;for(let e=this.rootComment.id;e<=this.lastComment.id;e++){var t;const n=s.a.comments[e];if(null===(t=n.thread)||void 0===t||!t.isCollapsed||n.thread===this){n.isCollapsed=!0;n.collapsedThread=this;n.removeLayers()}else e=n.thread.lastComment.id}const n=h.expandButton.cloneNode(!0),o=new i.a({tooltip:s.a.s("thread-expand-tooltip"),action:e=>{if(e.ctrlKey)s.a.comments.slice().reverse().forEach(e=>{var t;if(null!==(t=e.thread)&&void 0!==t&&t.isCollapsed)e.thread.expand()});else this.expand()},element:n,labelElement:n.querySelector(".oo-ui-labelElement-label")}),a=this.getUsersInThread(),r=a.map(e=>e.name).join(s.a.mws("comma-separator")),d=e=>{let t;if(e)t=s.a.s("thread-expand-label-genderless",this.commentCount,a.length,r);else{const e=Object(c.n)(a);t=s.a.s("thread-expand-label",this.commentCount,a.length,r,e)}o.setLabel(t);o.element.classList.remove("cd-thread-button-invisible")};if(s.a.g.GENDER_AFFECTS_USER_STRING)(e||Object(l.g)(a)).then(d,()=>{d(!0)});else d();const f=this.collapsedRange[0];let g=f.tagName;if(!["LI","DD"].includes(g))g="DIV";const p=document.createElement(g);p.className="cd-thread-button-container cd-thread-expandNote";p.appendChild(o.element);if("OL"===f.parentNode.tagName&&"ol"!==this.rootComment.ahContainerListType){const e=document.createElement("ul");e.className="cd-commentLevel";e.appendChild(p);f.parentNode.parentNode.insertBefore(e,f.parentNode);this.expandNoteContainer=e}else f.parentNode.insertBefore(p,f);this.expandNote=p;this.$expandNote=$(this.expandNote);if(m)this.$expandNote.cdScrollIntoView();if(this.rootComment.isOpeningSection){const e=this.rootComment.section.menu;if(e){var b;null===(b=e.editOpeningComment)||void 0===b||b.setDisabled(!0)}}if(this.endElement!==this.visualEndElement)for(let e=this.rootComment;e;e=e.getParent(!0)){var y;null===(y=e.thread)||void 0===y||y.line.classList.remove("cd-thread-line-extended")}v();Object(u.d)();Thread.updateLines()}expand(){var e;this.collapsedRange.forEach(e=>{const t=$(e),n=t.data("cd-collapsed-thread-root-comments")||[];Object(c.K)(n,this.rootComment);t.data("cd-collapsed-thread-root-comments",n);if(!n.length)e.classList.remove("cd-hidden")});this.expandNote.remove();this.expandNote=null;null===(e=this.expandNoteContainer)||void 0===e||e.remove();this.expandNoteContainer=null;if(this.rootComment.isOpeningSection){const e=this.rootComment.section.menu;if(e){var t;null===(t=e.editOpeningComment)||void 0===t||t.setDisabled(!1)}}this.isCollapsed=!1;let n=!1;for(let e=this.rootComment.id;e<=this.lastComment.id;e++){var i;const t=s.a.comments[e];if(t.isOutdented)n=!0;if(null===(i=t.thread)||void 0===i||!i.isCollapsed){t.isCollapsed=!1;delete t.collapsedThread;t.configureLayers()}else e=t.thread.lastComment.id}if(this.endElement!==this.visualEndElement&&n)for(let e=this.rootComment;e;e=e.getParent()){var o;null===(o=e.thread)||void 0===o||o.line.classList.add("cd-thread-line-extended")}v();Object(u.d)();Thread.updateLines()}toggle(){this[this.isCollapsed?"expand":"collapse"]()}removeLine(){if(this.line){this.clickArea.remove();this.clickArea=this.clickAreaOffset=this.line=null}}static init(e=!0){if(s.a.settings.enableThreads){m=!1;g=new r.b;s.a.comments.forEach(e=>{try{e.thread=new Thread(e)}catch(e){}});if(s.a.state.isPageFirstParsed){f=document.createElement("div");f.className="cd-thread-linesContainer"}else f.innerHTML="";Thread.updateLines();if(s.a.state.isPageFirstParsed)document.body.appendChild(f);if(e)y();m=!0}}static updateLines(e){if(!s.a.settings.enableThreads||(Object(d.i)()||document.hidden)&&m)return;const t=(e,t,n)=>{let i;if("ltr"===n){i=e.left;if(t)i-=t.left+1}else{i=e.right-a;if(t)i+=t.right+1}if(e instanceof DOMRect)i+=l;return i-o},n=[],i=[],o=s.a.g.THREAD_LINE_SIDE_MARGIN,a=3,r=window.scrollY,l=window.scrollX;s.a.comments.slice().reverse().some(o=>{var a;const l=o.thread;if(!l)return!1;if(o.isCollapsed&&!l.isCollapsed){l.removeLine();return!1}const u=0===o.level||"ol"===o.containerListType||"DIV"===l.startElement.tagName;let d,h,m,f;if(!u||l.isCollapsed){m=l[l.isCollapsed?"expandNote":"startElement"].getBoundingClientRect()}e=e||s.a.g.floatingElements.map(c.q);const g=m||o.getOffset({floatingRects:e});if(u)f=o.getMargins();const p=o.getDir();if(g){d=(e=>e instanceof DOMRect?r+e.top:e.top)(g);h=t(g,f,p)}const b=l.isCollapsed?m:null===(a=l.getAdjustedEndElement(!0))||void 0===a?void 0:a.getBoundingClientRect();if(void 0===d||!b||!Object(c.v)(...[m,b].filter(c.h))||(()=>{const e=t(b,f,p);return"ltr"===p?e<h:e>h})()){l.removeLine();return!1}const v=b.bottom-(d-r);if(l.clickAreaOffset&&d===l.clickAreaOffset.top&&v===l.clickAreaOffset.height)return!o.getParent();l.clickAreaOffset={top:d,left:h,height:v};if(!l.line)l.createLine();i.push(l);if(!l.clickArea.parentNode)n.push(l.clickArea);return!1});i.forEach(e=>{e.clickArea.style.left=e.clickAreaOffset.left+"px";e.clickArea.style.top=e.clickAreaOffset.top+"px";e.clickArea.style.height=e.clickAreaOffset.height+"px"});if(n.length)f.append(...n)}}t.a=Thread},function(e,t,n){"use strict";var i=n(2),o=n.n(i);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 n=this;e.commandEvent=!1;TributeEvents.keys().forEach(i=>{if(i.key===t.keyCode){e.commandEvent=!0;e.callbacks()[i.value.toLowerCase()](t,n)}})}input(e,t){e.inputEvent=!0;e.keyup.call(this,e,t)}click(e,t){if(1!==t.which)return;let n=e.tribute;if(n.menu&&n.menu.contains(t.target)){let e=t.target;t.preventDefault();t.stopPropagation();for(;"li"!==e.nodeName.toLowerCase();){e=e.parentNode;if(!e||e===n.menu)return}if(e.classList.contains("tribute-label"))return;n.selectItemAtIndex(e.getAttribute("data-index"),t);n.hideMenu()}else if(n.current.element&&!n.current.externalTrigger){n.current.externalTrigger=!1;setTimeout(()=>n.hideMenu())}}keyup(e,t){const n=e.tribute;if(e.inputEvent||n.isActive){if(e.inputEvent)e.inputEvent=!1;e.updateSelection(this);if(27!==t.keyCode)if(!n.lastCanceledTriggerChar||n.current.triggerPos!==n.lastCanceledTriggerPos||n.current.triggerChar!==n.lastCanceledTriggerChar){n.lastCanceledTriggerPos=null;n.lastCanceledTriggerChar=null;if(n.allowSpaces||!n.hasTrailingSpace)if(!n.dropMenu&&void 0!==n.current.mentionText){if(!n.isActive){let i=n.current.triggerChar;if(void 0!==i)e.callbacks().triggerChar(t,this,i)}if(!(n.current.mentionText.length<n.current.collection.menuShowMinLength))if(n.current.trigger&&!0!==e.commandEvent||n.isActive&&8===t.keyCode)n.showMenuFor(this,!0)}else{n.isActive=!1;n.hideMenu();n.dropMenu=!1}else{n.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(n=>{if(e.keyCode===n.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,n=e.element.value.slice(0,e.element.selectionStart);e.triggerPos=n.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,n)=>{let i=this.tribute;i.current.trigger=n;let o=i.collection.find(e=>e.trigger===n);i.current.collection=o;if(i.current.mentionText.length>=i.current.collection.menuShowMinLength&&i.inputEvent)i.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,n=this.tribute.menuSelected;if(t>n&&n>0){this.tribute.menuSelected--;this.setActiveLi()}else if(0===n){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,n=this.tribute.menuSelected;if(t>n){this.tribute.menuSelected++;this.setActiveLi()}else if(t===n){this.tribute.menuSelected=0;this.setActiveLi();this.tribute.menu.scrollTop=0}}}}}setActiveLi(e){let t=this.tribute.menu.getElementsByClassName("tribute-item"),n=t.length>>>0;if(e)this.tribute.menuSelected=parseInt(e);for(let e=0;e<n;e++){let n=t[e];if(e===this.tribute.menuSelected){n.classList.add(this.tribute.current.collection.selectClass);let e=n.getBoundingClientRect(),t=this.tribute.menu.getBoundingClientRect();if(e.bottom>t.bottom){let n=e.bottom-t.bottom;this.tribute.menu.scrollTop+=n}else if(e.top<t.top){let n=t.top-e.top;this.tribute.menu.scrollTop-=n}}else n.classList.remove(this.tribute.current.collection.selectClass)}}getFullHeight(e,t){let n=e.getBoundingClientRect().height;if(t){let t=e.currentStyle||window.getComputedStyle(e);return n+parseFloat(t.marginTop)+parseFloat(t.marginBottom)}return n}}var a=TributeEvents;var s=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,n){var i;return()=>{var o=this,a=arguments,s=n&&!i;clearTimeout(i);i=setTimeout(()=>{i=null;if(!n)e.apply(o,a)},t);if(s)e.apply(o,a)}}};const r=/[\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 c=class{constructor(e){this.tribute=e;this.tribute.range=this}positionMenuAtCaret(e){let t,n=this.getTriggerInfo(!1,this.tribute.hasTrailingSpace,!0,this.tribute.allowSpaces);if(void 0!==n){if(!this.tribute.positionMenu){this.tribute.menu.style.cssText="display: block;";return}t=this.getTextAreaOrInputUnderlinePosition(this.tribute.current.element,n.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,n){let i,o=e;if(t)for(var a=0;a<t.length;a++){o=o.childNodes[t[a]];if(void 0===o)return;for(;o.length<n;){n-=o.length;o=o.nextSibling}if(0===o.childNodes.length&&!o.length)o=o.previousSibling}let s=window.getSelection();i=document.createRange();i.setStart(o,n);i.setEnd(o,n);i.collapse(!0);try{s.removeAllRanges()}catch(e){console.warn(e)}s.addRange(i);e.focus()}replaceTriggerText(e,t,n,i,o){let a=this.getTriggerInfo(!0,n,t,this.tribute.allowSpaces);if(void 0!==a){let t=this.tribute.current,n=new CustomEvent("tribute-replaced",{detail:{item:o,instance:t,context:a,event:i}});if("object"!=typeof e)e={start:e};e.content=e.content||"";e.end=e.end||"";if(i.ctrlKey&&e.ctrlModify)e=e.ctrlModify(e);let s=this.tribute.current.element,r=a.mentionPosition+a.mentionText.length+a.mentionTriggerChar.length,c=s.value.substring(r,s.value.length);if((i.shiftKey||i.altKey)&&e.shiftModify)e=e.shiftModify(e);if(i.altKey){e.content=c;r+=c.length;c=""}let l=a.mentionPosition;s.selectionStart=l;s.selectionEnd=r;if(t.collection.keepAsEnd&&!i.shiftKey){const[n]=c.match(t.collection.keepAsEnd)||[];if(n){c=c.slice(n.length);s.selectionEnd+=n.length;if(t.collection.replaceEnd)e.end=n}}let u=e.start+e.content+e.end;u+="string"==typeof this.tribute.replaceTextSuffix?this.tribute.replaceTextSuffix:" ";s.focus();if(!document.execCommand("insertText",!1,u))s.value=s.value.substring(0,l)+u+c;if(i.shiftKey||e.typeContent&&!e.content){s.selectionEnd=l+u.length-e.end.length;s.selectionStart=l+e.start.length}else{s.selectionEnd=l+u.length;s.selectionStart=s.selectionEnd}t.element.dispatchEvent(new CustomEvent("input",{bubbles:!0}));t.element.dispatchEvent(n)}}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 n=t.selectionStart;if(t.value&&n>=0)e=t.value.substring(0,n)}return e}getTriggerInfo(e,t,n,i){let o;o=this.tribute.current.element;let a=this.getTextPrecedingCurrentSelection();if(null!=a){let s,c,l,u,d,h=-1,m=0;this.tribute.collection.forEach(e=>{let t=e.trigger,i=e.requireLeadingSpace?this.lastIndexWithLeadingSpace(a,t):a.lastIndexOf(t);if(i>h||i>-1&&i===h&&t.length>m){h=i;m=t.length;s=t;n=e.requireLeadingSpace}});let f=h>=0&&(0===h||!n||r.test(a[h-1]));if(f){c=a.substring(h+s.length,a.length);l=c;s=a.substring(h,h+s.length);let e=c.substring(0,1);u=c.length>0&&(" "===e||"\xa0"===e);if(t)c=c.trim();d=i?/[^\S ]/g:/\s/g;this.tribute.hasTrailingSpace=d.test(c)}if(-1===h||l&&!l[0].trim()||l.includes("\n")||o.selectionStart!==o.selectionEnd||this.tribute.current.trigger&&s!==this.tribute.current.trigger){this.tribute.dropMenu=!0;return}else this.tribute.dropMenu=!1;if(f&&!u&&(e||!d.test(c)))return{mentionPosition:h,mentionText:c,mentionSelectedElement:o,mentionSelectedPath:void 0,mentionSelectedOffset:void 0,mentionTriggerChar:s}}}lastIndexWithLeadingSpace(e,t){let n=e.split("").reverse().join(""),i=-1;for(let o=0,a=e.length;o<a;o++){let a=o===e.length-1,s=r.test(n[o+1]),c=!0;for(let e=t.length-1;e>=0;e--)if(t[e]!==n[o-e]){c=!1;break}if(c&&(a||s)){i=e.length-1-o;break}}return i}isMenuOffScreen(e,t){let n=document.documentElement,i=window.scrollX-(n.clientLeft||0),o=window.scrollY-(n.clientTop||0),a="number"==typeof e.top?e.top:o+n.clientHeight-e.bottom-t.height,s="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:i+n.clientWidth-e.right-t.width;return{top:a<Math.floor(o),right:s>Math.ceil(i+n.clientWidth),bottom:r>Math.ceil(o+n.clientHeight)-3,left:c<Math.floor(i)}}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 n=null!==window.mozInnerScreenX,i=document.createElement("div");i.id="input-textarea-caret-position-mirror-div";document.body.appendChild(i);let o=i.style,a=window.getComputedStyle?getComputedStyle(e):e.currentStyle;o.whiteSpace="pre-wrap";if("INPUT"!==e.nodeName)o.wordWrap="break-word";o.position="absolute";o.visibility="hidden";["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"].forEach(e=>{o[e]=a[e]});if(n){o.width=parseFloat(a.width)+"px";if(e.scrollHeight>parseFloat(a.height))o.overflowY="scroll"}else o.overflow="hidden";i.textContent=e.value.substring(0,t);let s=document.createElement("span");s.textContent=this.tribute.current.trigger;let r=document.createElement("span");r.append(s,e.value.substring(t+this.tribute.current.trigger.length)||".");i.appendChild(r);let c=document.documentElement,l=c.clientWidth,u=c.clientHeight,d=e.getBoundingClientRect(),h=(window.pageXOffset||c.scrollLeft)-(c.clientLeft||0),m=(window.pageYOffset||c.scrollTop)-(c.clientTop||0),f=0,g=0,p=0;if(this.menuContainerIsBody){f=d.top;g=d.left;p=d.right}let b={top:f+m+r.offsetTop+parseInt(a.borderTopWidth)+parseInt(a.fontSize)-e.scrollTop};if("rtl"===this.tribute.dir){const e="rtl"===c.dir?l:i.getBoundingClientRect().right;b.right=l-p+(e-r.getBoundingClientRect().right)+s.offsetWidth}else b.left=h+g+r.offsetLeft+s.offsetWidth+1;let v=this.getMenuDimensions(),y=this.isMenuOffScreen(b,v);if("rtl"===this.tribute.dir){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+u-b.top-parseFloat(getComputedStyle(e).paddingTop)-3;b.additionalStyles=`height: ${t}px; overflow-y: scroll;`}document.body.removeChild(i);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 n=e.top,i=n+e.height;if(n<0)window.scrollTo(0,window.pageYOffset+e.top-20);else if(i>window.innerHeight){let t=window.pageYOffset+e.top-20;if(t-window.pageYOffset>100)t=window.pageYOffset+100;let n=window.pageYOffset-(window.innerHeight-i);if(n>t)n=t;window.scrollTo(0,n)}}};var l=class{constructor(e){this.tribute=e;this.tribute.search=this}match(e,t,n){let i=(n=n||{}).pre||"",o=n.post||"",a=n.caseSensitive&&t||t.toLowerCase();if(n.skip)return{rendered:t,score:0};e=n.caseSensitive&&e||e.toLowerCase();let s=this.traverse(a,e,0,0,[]);if(!s)return null;else return{rendered:this.render(t,s.cache,i,o),score:s.score}}traverse(e,t,n,i,o){if(t.length===i)return{score:this.calculateScore(o),cache:o.slice()};if(e.length===n||t.length-i>e.length-n)return;let a,s,r=t[i],c=e.indexOf(r,n);for(;c>-1;){o.push(c);s=this.traverse(e,t,c+1,i+1,o);o.pop();if(!s)return a;if(!a||a.score<s.score)a=s;c=e.indexOf(r,c+1)}return a}calculateScore(e){let t=0,n=1;e.forEach((i,o)=>{if(o>0)if(e[o-1]+1===i)n+=n+1;else n=1;t+=n});return t}render(e,t,n,i){var o=e.substring(0,t[0]);t.forEach((a,s)=>{o+=n+e[a]+i+e.substring(a+1,t[s+1]?t[s+1]:e.length)});return o}filter(e,t,n){n=n||{};return t.reduce((t,i,o)=>{let a=i;if(n.extract){a=n.extract(i);if(!a)a=""}let s=this.match(e,a,n);if(null!=s)t[t.length]={string:s.rendered,score:s.score,index:o,original:i};return t},[]).sort((e,t)=>{let n=t.score-e.score;if(n)return n;else return e.index-t.index})}};class Tribute_Tribute{constructor({selectClass:e="highlight",containerClass:t="tribute-container",itemClass:n="",trigger:i="@",lookup:o="key",fillAttr:r="value",collection:u=null,menuContainer:d=null,noMatchTemplate:h=null,allowSpaces:m=!1,replaceTextSuffix:f=null,positionMenu:g=!0,searchOpts:p={},menuItemLimit:b=null,menuShowMinLength:v=0,dir:y="ltr"}){this.menuSelected=0;this.current={};this.inputEvent=!1;this.isActive=!1;this.menuContainer=d;this.allowSpaces=m;this.replaceTextSuffix=f;this.positionMenu=g;this.hasTrailingSpace=!1;this.dir=y;if(!u)throw new Error("[Tribute] No collection specified.");this.collection=u.map(a=>({trigger:a.trigger||i,keepAsEnd:a.keepAsEnd||null,replaceEnd:void 0===a.replaceEnd?!0:a.replaceEnd,selectClass:a.selectClass||e,containerClass:a.containerClass||t,itemClass:a.itemClass||n,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 h||function(){return"<li>No Match Found!</li>"}.bind(this)})(h),lookup:a.lookup||o,fillAttr:a.fillAttr||r,values:a.values,requireLeadingSpace:a.requireLeadingSpace,searchOpts:a.searchOpts||p,menuItemLimit:a.menuItemLimit||b,menuShowMinLength:a.menuShowMinLength||v,label:a.label}));new c(this);new a(this);new s(this);new l(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 n=e.length;for(var t=0;t<n;++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"),n=document.createElement("ul");t.className=e;if("rtl"===this.dir)t.className+=" tribute-rtl";t.appendChild(n);if(this.menuContainer)return this.menuContainer.appendChild(t);else return document.body.appendChild(t)}showMenuFor(e,t){var n;const i=e=>{if(!this.isActive)return;let n=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)n=n.slice(0,this.current.collection.menuItemLimit);this.current.filteredItems=n;let i=this.menu.querySelector("ul");this.range.positionMenuAtCaret(t);if(!n.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?i.innerHTML=this.current.collection.noMatchTemplate():i.innerHTML=this.current.collection.noMatchTemplate;return}i.innerHTML="";let o=document.createDocumentFragment();if(this.current.collection.label){let e=document.createElement("li");e.classList.add("tribute-label");e.textContent=this.current.collection.label;o.appendChild(e)}n.forEach((e,t)=>{let n=document.createElement("li");n.setAttribute("data-index",t);n.classList.add("tribute-item");if(this.current.collection.itemClass)n.classList.add(this.current.collection.itemClass);n.addEventListener("mousemove",e=>{let[,t]=this._findLiTarget(e.target);if(0!==e.movementY)this.events.setActiveLi(t)});if(this.menuSelected===t)n.classList.add(this.current.collection.selectClass);n.textContent=this.current.collection.menuItemTemplate(e);o.appendChild(n)});i.appendChild(o);this.range.positionMenuAtCaret(t)};if(!this.isActive||this.current.element!==e||this.current.mentionText!==this.snapshot.mentionText){this.snapshot={mentionText:this.current.mentionText,selectionStart:null===(n=this.current.element)||void 0===n?void 0:n.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,i);else i(this.current.collection.values)}else if(this.current.element.selectionStart!==this.snapshot.selectionStart)i([])}_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 n=window.getSelection();n.removeAllRanges();n.addRange(t)}else if(void 0!==document.body.createTextRange){var i=document.body.createTextRange();i.moveToElementText(e);i.collapse(!1);i.select()}}insertAtCaret(e,t){var n=e.scrollTop,i=e.selectionStart;e.focus();const o=document.execCommand("insertText",!1,t);if(!o){var a=e.value.substring(0,i),s=e.value.substring(e.selectionEnd,e.value.length);e.value=a+t+s;i+=t.length;e.selectionStart=i;e.selectionEnd=i}e.scrollTop=n;return o}hideMenu(){if(this.menu){this.menu.style.cssText="display: none;";this.isActive=!1;this.menuSelected=0;this.current={}}}selectItemAtIndex(e,t){if("number"!=typeof(e=parseInt(e))||isNaN(e))return;let n=this.current.filteredItems[e],i=this.current.collection.selectTemplate(n,t);if(null!==i)this.replaceText(i,t,n)}replaceText(e,t,n){this.range.replaceTriggerText(e,!0,!0,t,n)}_append(e,t,n){if("function"==typeof e.values)throw new Error("Unable to append to values, as it is a function.");else if(!n)e.values=e.values.concat(t);else e.values=t}append(e,t,n){let i=parseInt(e);if("number"!=typeof i)throw new Error("please provide an index for the collection to update.");let o=this.collection[i];this._append(o,t,n)}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 n=e.length;for(var t=0;t<n;++t)this._detach(e[t])}else this._detach(e)}_detach(e){this.events.unbind(e);if(e.tributeMenu)this.menuEvents.unbind(e.tributeMenu);setTimeout(()=>{e.removeAttribute("data-tribute");this.isActive=!1;if(e.tributeMenu)e.tributeMenu.remove()})}}var u=Tribute_Tribute,cd=n(0),d=n(18),h=n(1),m=n(9);function f(e,t){const n=new RegExp(mw.util.escapeRegExp(e),"i"),i=new RegExp("^"+mw.util.escapeRegExp(e),"i");return t.filter(e=>n.test(e)).sort((e,t)=>{const n=i.test(e),o=i.test(t);if(n&&!o)return-1;else if(o&&!n)return 1;else return 0})}class Autocomplete_Autocomplete{constructor({types:e,inputs:t,comments:i,defaultUserNames:o}){e=e.filter(e=>cd.a.settings.autocompleteTypes.includes(e)||"mentions"===e);const a=this.getCollections(e,i,o);n(48);this.tribute=new u({collection:a,allowSpaces:!0,menuItemLimit:10,noMatchTemplate:()=>null,containerClass:"tribute-container cd-autocompleteContainer",replaceTextSuffix:"",dir:cd.a.g.CONTENT_DIR});this.inputs=t;this.inputs.forEach(e=>{const t=e.$input.get(0);this.tribute.attach(t);t.cdInput=e;t.addEventListener("tribute-active-true",()=>{cd.a.g.activeAutocompleteMenu=this.tribute.menu});t.addEventListener("tribute-active-false",()=>{cd.a.g.activeAutocompleteMenu=null});if(e instanceof OO.ui.MultilineTextInputWidget)e.on("resize",()=>{var e,t;null===(e=(t=this.tribute.menuEvents).windowResizeEvent)||void 0===e||e.call(t)})})}cleanUp(){this.inputs.forEach(e=>{this.tribute.detach(e.$input.get(0))})}getCollections(e,t,n){var i=this;const a=e=>{if(e)return e.original.transform(e.original.item);else return""},s=(e,t)=>e.filter(h.h).filter(h.X).map(e=>{let n;if(Array.isArray(e))n=e[0];else if(e.key)n=e.key;else n=e;return{key:n,item:e,transform:t.transform}}),r=new RegExp(cd.a.mws("word-separator",{language:"content"}),"g"),c={mentions:{label:cd.a.s("cf-autocomplete-mentions-label"),trigger:cd.a.config.mentionCharacter,searchOpts:{skip:!0},requireLeadingSpace:cd.a.config.mentionRequiresLeadingSpace,selectTemplate:a,values:(g=o()((function*(e,t){if(cd.a.settings.autocompleteTypes.includes("mentions")||i.tribute.current.externalTrigger){if(!(e=Object(h.J)(e)).startsWith(i.mentions.snapshot))i.mentions.cache=[];i.mentions.snapshot=e;if(i.mentions.byText[e])t(s(i.mentions.byText[e],i.mentions));else{const n=f(e,i.mentions.default);let o=n.slice();const a=e&&e.length<=85&&!/[#<>[\]|{}/@:]/.test(e)&&(e.match(r)||[]).length<=4;if(a){if(!n.length)o.push(...i.mentions.cache);o=f(e,o);o[9]=e.trim()}t(s(o,i.mentions));if(a&&!n.length){let n;try{n=yield Object(m.f)(e)}catch(e){return}if(!i.tribute.current||"@"!==i.tribute.current.trigger)return;n=i.mentions.removeSelf(n);i.mentions.cache=n.slice();n[9]=e.trim();i.mentions.byText[e]=n;if(i.mentions.snapshot!==e)return;t(s(n,i.mentions))}}}})),function(e,t){return g.apply(this,arguments)})},commentLinks:{label:cd.a.s("cf-autocomplete-commentlinks-label"),trigger:"[[#",keepAsEnd:/^\]\]/,selectTemplate:a,values:(d=o()((function*(e,t){if(!i.commentLinks.default){i.commentLinks.default=[];i.commentLinks.comments.forEach(e=>{let t,{anchor:n,author:o,timestamp:a,getText:s}=e;s=s.bind(e);if(s().length>80){t=s().slice(0,80);const e=cd.a.mws("word-separator",{language:"content"}),n=t.lastIndexOf(e);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=s();let r=o.name;if(a)r+=cd.a.mws("comma-separator",{language:"content"})+a;const c=r+cd.a.mws("colon-separator",{language:"content"})+t;i.commentLinks.default.push({key:c,anchor:n,author:o.name,timestamp:a})});cd.a.sections.forEach(e=>{i.commentLinks.default.push({key:Object(h.V)(e.anchor),anchor:Object(h.V)(e.anchor),headline:e.headline})})}e=Object(h.J)(e);if(/[#<>[\]|{}]/.test(e)){t([]);return}const n=i.tribute.search.filter(e,i.commentLinks.default,{extract:e=>e.key}).map(e=>e.original);t(s(n,i.commentLinks))})),function(e,t){return d.apply(this,arguments)})},wikilinks:{label:cd.a.s("cf-autocomplete-wikilinks-label"),trigger:"[[",keepAsEnd:/^(?:\||\]\])/,searchOpts:{skip:!0},selectTemplate:a,values:(u=o()((function*(e,t){if(!(e=Object(h.J)(e)).startsWith(i.wikilinks.snapshot))i.wikilinks.cache=[];i.wikilinks.snapshot=e;if(i.wikilinks.byText[e])t(s(i.wikilinks.byText[e],i.wikilinks));else{let n=[];const o=e&&":"!==e&&e.length<=255&&(e.match(r)||[]).length<=9&&!/[#<>[\]|{}]/.test(e),a=o&&!((/^:/.test(e)||/^[a-z]\w*:/.test(e))&&!cd.a.g.ALL_NAMESPACES_REGEXP.test(e));if(a){n.push(...i.wikilinks.cache);n=f(e,n)}if(o)n[9]=e.trim();t(s(n,i.wikilinks));if(a){let n;try{n=yield Object(m.d)(e)}catch(e){return}if(!i.tribute.current||"[["!==i.tribute.current.trigger)return;i.wikilinks.cache=n.slice();n[9]=e.trim();i.wikilinks.byText[e]=n;if(i.wikilinks.snapshot!==e)return;t(s(n,i.wikilinks))}}})),function(e,t){return u.apply(this,arguments)})},templates:{label:cd.a.s("cf-autocomplete-templates-label"),trigger:"{{",keepAsEnd:/^(?:\||\}\})/,searchOpts:{skip:!0},selectTemplate:(e,t)=>{if(e){if(cd.a.settings.useTemplateData&&t.shiftKey&&!t.altKey){const t=this.tribute.current.element.cdInput;setTimeout(()=>{t.setDisabled(!0);t.pushPending();cd.a.g.mwApi.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},h.w).then(e=>{const n=e.pages;let i="",o=0;Object.keys(n).forEach(e=>{const t=n[e],a=t.params||[];(t.paramOrder||Object.keys(a)).filter(e=>a[e].required||a[e].suggested).forEach(e=>{if("block"===t.format)i+=`\n| ${e} = `;else if(isNaN(e))i+=`|${e}=`;else i+="|";if(!o)o=i.length});if("block"===t.format&&i)i+="\n"});i=i.slice(1);t.setDisabled(!1);const a=t.getRange().to;Object(h.y)(t,i);t.selectRange(a+o-1)},()=>{t.setDisabled(!1);Object(h.l)(t)}).always(()=>{t.popPending()})})}return e.original.transform(e.original.item)}else return""},values:(l=o()((function*(e,t){if(!(e=Object(h.J)(e)).startsWith(i.templates.snapshot))i.templates.cache=[];i.templates.snapshot=e;if(!e.includes("{{"))if(i.templates.byText[e])t(s(i.templates.byText[e],i.templates));else{let n=[];const o=e&&e.length<=255&&!/[#<>[\]|{}]/.test(e)&&(e.match(r)||[]).length<=9;if(o){n.push(...i.templates.cache);n=f(e,n);n[9]=e.trim()}t(s(n,i.templates));if(o){let n;try{n=yield Object(m.e)(e)}catch(e){return}if(!i.tribute.current||"{{"!==i.tribute.current.trigger)return;i.templates.cache=n.slice();n[9]=e.trim();i.templates.byText[e]=n;if(i.templates.snapshot!==e)return;t(s(n,i.templates))}}else t([])})),function(e,t){return l.apply(this,arguments)})},tags:{label:cd.a.s("cf-autocomplete-tags-label"),trigger:"<",keepAsEnd:/^>/,replaceEnd:!1,searchOpts:{skip:!0},selectTemplate:a,values:(e,t)=>{const n=new RegExp("^"+mw.util.escapeRegExp(e),"i");if(!e||!/^[a-z]+$/i.test(e)){t([]);return}const i=this.tags.default.filter(e=>n.test(e));t(s(i,this.tags))}}};var l,u,d,g;const p={mentions:n,commentLinks:t},b=[];e.forEach(e=>{this[e]=Autocomplete_Autocomplete.getConfig(e,p[e]);b.push(c[e])});return b}static getConfig(e){let t;switch(e){case"mentions":t={byText:{},cache:[],transform:e=>{var t;const n=e.trim(),i=d.a.getUser(n),o=cd.a.config.genderNeutralUserNamespaceAlias||(null===(t=cd.a.config.userNamespacesByGender)||void 0===t?void 0:t[i.getGender()])||mw.config.get("wgFormattedNamespaces")[2];return{start:`@[[${i.isRegistered()?`${o}:${n}`:`${cd.a.g.CONTRIBS_PAGE}/${n}`}|`,end:"]]",content:n,ctrlModify:e=>{e.end+=cd.a.mws("colon-separator");return e}}},removeSelf:e=>e.filter(e=>e!==cd.a.user.name)};t.default=t.removeSelf(arguments[1]||[]);break;case"commentLinks":t={comments:arguments[1]||[],transform:({anchor:e,author:t,timestamp:n,headline:i})=>({start:`[[#${e}|`,end:"]]",content:n?cd.a.s("cf-autocomplete-commentlinks-text",t,n):i})};break;case"wikilinks":t={byText:{},cache:[],transform:e=>({start:"[["+(e=e.trim()),end:"]]",name:e,shiftModify:e=>{e.start+="|";e.content=e.name;return e}})};break;case"templates":t={byText:{},cache:[],transform:e=>({start:"{{"+(e=e.trim()),end:"}}",name:e,shiftModify:e=>{e.start+="|";return e}})};break;case"tags":t={default:["abbr","b","bdi","bdo","blockquote",["br","<br>"],"caption","cite","code",["codenowiki","<code><nowiki>","</".concat("nowiki></code>")],"data","dd","del","dfn","div","dl","dt","em","h1","h2","h3","h4","h5","h6",["hr","<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","u","ul","var",["wbr","<wbr>"],["gallery","<gallery>\n","\n</gallery>"],"includeonly","noinclude","nowiki","onlyinclude","categorytree","charinsert","chem","ce","graph","hiero","imagemap","indicator","inputbox","mapframe","maplink","math","poem","ref",["references","<references />"],"score",["section","<section />"],["syntaxhighlight","<syntaxhighlight>\n","\n</syntaxhighlight>"],['syntaxhighlight inline lang=""','<syntaxhighlight inline lang="','"></syntaxhighlight>'],['syntaxhighlight lang=""','<syntaxhighlight lang="','">\n\n</syntaxhighlight>'],"templatedata",["templatestyles",'<templatestyles src="','" />'],"timeline"],transform:e=>({start:Array.isArray(e)?e[1]:`<${e}>`,end:Array.isArray(e)?e[2]:`</${e}>`,typeContent:!0})};t.default.sort((e,t)=>("string"==typeof e?e:e[0])>("string"==typeof t?t:t[0]))}return t}}t.a=Autocomplete_Autocomplete},function(e,t,n){var i,o=function(){var e=String.fromCharCode,t="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",n="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+-$",i={};function o(e,t){if(!i[e]){i[e]={};for(var n=0;n<e.length;n++)i[e][e.charAt(n)]=n}return i[e][t]}var a={compressToBase64:function(e){if(null==e)return"";var n=a._compress(e,6,(function(e){return t.charAt(e)}));switch(n.length%4){default:case 0:return n;case 1:return n+"===";case 2:return n+"==";case 3:return n+"="}},decompressFromBase64:function(e){if(null==e)return"";if(""==e)return null;else return a._decompress(e.length,32,(function(n){return o(t,e.charAt(n))}))},compressToUTF16:function(t){if(null==t)return"";else return a._compress(t,15,(function(t){return e(t+32)}))+" "},decompressFromUTF16:function(e){if(null==e)return"";if(""==e)return null;else return a._decompress(e.length,16384,(function(t){return e.charCodeAt(t)-32}))},compressToUint8Array:function(e){for(var t=a.compress(e),n=new Uint8Array(2*t.length),i=0,o=t.length;i<o;i++){var s=t.charCodeAt(i);n[2*i]=s>>>8;n[2*i+1]=s%256}return n},decompressFromUint8Array:function(t){if(null==t)return a.decompress(t);else{for(var n=new Array(t.length/2),i=0,o=n.length;i<o;i++)n[i]=256*t[2*i]+t[2*i+1];var s=[];n.forEach((function(t){s.push(e(t))}));return a.decompress(s.join(""))}},compressToEncodedURIComponent:function(e){if(null==e)return"";else return a._compress(e,6,(function(e){return n.charAt(e)}))},decompressFromEncodedURIComponent:function(e){if(null==e)return"";if(""==e)return null;e=e.replace(/ /g,"+");return a._decompress(e.length,32,(function(t){return o(n,e.charAt(t))}))},compress:function(t){return a._compress(t,16,(function(t){return e(t)}))},_compress:function(e,t,n){if(null==e)return"";var i,o,a,s={},r={},c="",l="",u="",d=2,h=3,m=2,f=[],g=0,p=0;for(a=0;a<e.length;a+=1){c=e.charAt(a);if(!Object.prototype.hasOwnProperty.call(s,c)){s[c]=h++;r[c]=!0}l=u+c;if(Object.prototype.hasOwnProperty.call(s,l))u=l;else{if(Object.prototype.hasOwnProperty.call(r,u)){if(u.charCodeAt(0)<256){for(i=0;i<m;i++){g<<=1;if(p==t-1){p=0;f.push(n(g));g=0}else p++}o=u.charCodeAt(0);for(i=0;i<8;i++){g=g<<1|1&o;if(p==t-1){p=0;f.push(n(g));g=0}else p++;o>>=1}}else{o=1;for(i=0;i<m;i++){g=g<<1|o;if(p==t-1){p=0;f.push(n(g));g=0}else p++;o=0}o=u.charCodeAt(0);for(i=0;i<16;i++){g=g<<1|1&o;if(p==t-1){p=0;f.push(n(g));g=0}else p++;o>>=1}}if(0==--d){d=Math.pow(2,m);m++}delete r[u]}else{o=s[u];for(i=0;i<m;i++){g=g<<1|1&o;if(p==t-1){p=0;f.push(n(g));g=0}else p++;o>>=1}}if(0==--d){d=Math.pow(2,m);m++}s[l]=h++;u=String(c)}}if(""!==u){if(Object.prototype.hasOwnProperty.call(r,u)){if(u.charCodeAt(0)<256){for(i=0;i<m;i++){g<<=1;if(p==t-1){p=0;f.push(n(g));g=0}else p++}o=u.charCodeAt(0);for(i=0;i<8;i++){g=g<<1|1&o;if(p==t-1){p=0;f.push(n(g));g=0}else p++;o>>=1}}else{o=1;for(i=0;i<m;i++){g=g<<1|o;if(p==t-1){p=0;f.push(n(g));g=0}else p++;o=0}o=u.charCodeAt(0);for(i=0;i<16;i++){g=g<<1|1&o;if(p==t-1){p=0;f.push(n(g));g=0}else p++;o>>=1}}if(0==--d){d=Math.pow(2,m);m++}delete r[u]}else{o=s[u];for(i=0;i<m;i++){g=g<<1|1&o;if(p==t-1){p=0;f.push(n(g));g=0}else p++;o>>=1}}if(0==--d){d=Math.pow(2,m);m++}}o=2;for(i=0;i<m;i++){g=g<<1|1&o;if(p==t-1){p=0;f.push(n(g));g=0}else p++;o>>=1}for(;;){g<<=1;if(p==t-1){f.push(n(g));break}else p++}return f.join("")},decompress:function(e){if(null==e)return"";if(""==e)return null;else return a._decompress(e.length,32768,(function(t){return e.charCodeAt(t)}))},_decompress:function(t,n,i){var o,a,s,r,c,l,u,d=[],h=4,m=4,f=3,g="",p=[],b={val:i(0),position:n,index:1};for(o=0;o<3;o+=1)d[o]=o;s=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=n;b.val=i(b.index++)}s|=(r>0?1:0)*l;l<<=1}switch(s){case 0:s=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=n;b.val=i(b.index++)}s|=(r>0?1:0)*l;l<<=1}u=e(s);break;case 1:s=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=n;b.val=i(b.index++)}s|=(r>0?1:0)*l;l<<=1}u=e(s);break;case 2:return""}d[3]=u;a=u;p.push(u);for(;;){if(b.index>t)return"";s=0;c=Math.pow(2,f);l=1;for(;l!=c;){r=b.val&b.position;b.position>>=1;if(0==b.position){b.position=n;b.val=i(b.index++)}s|=(r>0?1:0)*l;l<<=1}switch(u=s){case 0:s=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=n;b.val=i(b.index++)}s|=(r>0?1:0)*l;l<<=1}d[m++]=e(s);u=m-1;h--;break;case 1:s=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=n;b.val=i(b.index++)}s|=(r>0?1:0)*l;l<<=1}d[m++]=e(s);u=m-1;h--;break;case 2:return p.join("")}if(0==h){h=Math.pow(2,f);f++}if(d[u])g=d[u];else if(u===m)g=a+a.charAt(0);else return null;p.push(g);d[m++]=a+g.charAt(0);a=g;if(0==--h){h=Math.pow(2,f);f++}}}};return a}();if(1)void 0!==(i=function(){return o}.call(t,n,t,e))&&(e.exports=i)},function(e,t,n){"use strict";var i=n(12),o=n(0),a=n(1),s=n(33);let r,c,l,u;t.a={mount(){this.$topElement=$("<div>").attr("id","cd-pageNav-top").addClass("cd-pageNav").appendTo(document.body);this.$bottomElement=$("<ul>").attr("id","cd-pageNav-bottom").addClass("cd-pageNav cd-pageNav-list").appendTo(document.body);this.updateWidth();this.update()},updateWidth(){if(o.a.g.$contentColumn.length){const e=o.a.g.$contentColumn.offset().left;let t=$(document.body).hasClass("ltr")?e-18:$(window).width()-(e+o.a.g.$contentColumn.outerWidth())-18;if(["vector","minerva"].includes(o.a.g.SKIN))t-=o.a.g.CONTENT_START_MARGIN;if(t<=100){this.$topElement.hide();this.$bottomElement.hide()}else{this.$topElement.show();this.$bottomElement.show()}this.$topElement.css("width",t+"px");this.$bottomElement.css("width",t+"px")}},update(){const e=document.documentElement;if(e.scrollHeight===e.clientHeight){this.reset();return}let t,n;if(o.a.g.$toc.length){const e=o.a.g.$toc.get(0).getBoundingClientRect();if(Object(a.v)(e))t=e.top}const s=window.scrollY;if(s>o.a.g.BODY_SCROLL_PADDING_TOP)o.a.sections.some(e=>{const i=Object(a.q)(e.$heading.get(0));if(!Object(a.v)(i))return!1;else if(!t||i.outerTop>t){n=i.outerTop;if(!t)t=i.outerTop;return!0}else return!1});if(t<o.a.g.BODY_SCROLL_PADDING_TOP+1||"top"===u){if(!this.$linksOnTop){this.$linksOnTop=$("<ul>").attr("id","cd-pageNav-linksOnTop").addClass("cd-pageNav-list").appendTo(this.$topElement);const e=new i.a({href:"#",classes:["cd-pageNav-link"],label:o.a.s("pagenav-pagetop"),action:()=>{this.jump(0,this.$topLink)}});this.$topLink=$("<li>").attr("id","cd-pageNav-topLink").addClass("cd-pageNav-item").append(e.element).appendTo(this.$linksOnTop)}}else if(this.$linksOnTop)this.reset("top");if(this.$linksOnTop){if(o.a.g.$toc.length&&!this.$tocLink){const e=new i.a({href:"#toc",classes:["cd-pageNav-link"],label:o.a.s("pagenav-toc"),action:()=>{this.jump(o.a.g.$toc,this.$tocLink)}});this.$tocLink=$("<li>").attr("id","cd-pageNav-tocLink").addClass("cd-pageNav-item").append(e.element).appendTo(this.$linksOnTop)}if(!this.$currentSection)this.$currentSection=$("<ul>").attr("id","cd-pageNav-currentSection").addClass("cd-pageNav-list").appendTo(this.$topElement)}if(o.a.sections.length&&s+window.innerHeight<e.scrollHeight||"bottom"===u){if(!this.$bottomLink){const t=new i.a({href:"#footer",classes:["cd-pageNav-link"],label:o.a.s("pagenav-pagebottom"),action:()=>{this.jump(e.scrollHeight-window.innerHeight,this.$bottomLink)}});this.$bottomLink=$("<li>").attr("id","cd-pageNav-bottomLink").addClass("cd-pageNav-item").append(t.element).appendTo(this.$bottomElement)}}else if(this.$bottomLink)this.reset("bottom");if(!(void 0===n||n>=o.a.g.BODY_SCROLL_PADDING_TOP+1))o.a.sections.slice().reverse().some(e=>{const t=Object(a.q)(e.$heading.get(0));if(!Object(a.v)(t))return!1;if(t.outerTop<o.a.g.BODY_SCROLL_PADDING_TOP+1){var n;if(r===e)return!0;r=e;null===(n=c)||void 0===n||n.detach();this.$currentSection.empty();[e,...e.getAncestors()].reverse().forEach((e,t)=>{let n;if(c&&c.data("section")===e)n=c;else{const o=new i.a({href:e.getUrl(),classes:["cd-pageNav-link"],label:e.headline,action:()=>{this.jump(e.$heading,n)}});n=$("<li>").addClass("cd-pageNav-item cd-pageNav-item-level-"+t).data("section",e).append(o.element)}n.appendTo(this.$currentSection)});return!0}return!1});else if(r)this.resetSections()},reset(e){if(!e||"top"===e){var t;null===(t=c)||void 0===t||t.detach();this.$topElement.empty();this.$linksOnTop=this.$topLink=this.$tocLink=this.$currentSection=null;r=null}if(!e||"bottom"===e){this.$bottomElement.empty();this.$bottomLink=null}},resetSections(){var e;null===(e=c)||void 0===e||e.detach();this.$currentSection.empty();r=null},jump(e,t,n){const a=e instanceof $?e.offset().top-o.a.g.BODY_SCROLL_PADDING_TOP:e;if(n||!(Math.abs(a-window.scrollY)<1)){if(u){u=null;l.prev().removeClass("cd-pageNav-link-inline");l.remove();l=c=null}if(!n){const e=window.scrollY,n=new i.a({classes:["cd-pageNav-backLink"],label:o.a.s("pagenav-back"),action:n=>{n.stopPropagation();this.jump(e,t,!0)}});l=$("<span>").addClass("cd-pageNav-backLinkContainer").append(o.a.sParse("dot-separator"),n.element).appendTo(t);l.prev().addClass("cd-pageNav-link-inline");if(t.parent().is("#cd-pageNav-currentSection"))c=t;if(t===this.$topLink||t===this.$tocLink)u="top";else if(t===this.$bottomLink)u="bottom";else u="section"}o.a.state.isAutoScrollInProgress=!0;Object(s.b)(a)}}}},function(e){e.exports=JSON.parse('{"ab":"H:i, j xg Y","abs":"j F Y H.i","ace":"j F Y H.i","ady-cyrl":"H:i, j F Y","aeb-arab":"H:i\u060c j xg Y","aeb-latn":"H:i, j F Y","af":"H:i, j F Y","ais":"H:i, j F Y","ak":"H:i, j F Y","aln":"j F Y H:i","ami":"H:i, j F Y","am":"H:i, j F Y","ang":"H:i, j F Y","an":"H:i j M Y","anp":"H:i, j F Y","arc":"H:i, j F Y","ar":"H:i\u060c j xg Y","arn":"H:i j M Y","arq":"H:i\u060c j xg Y","ary":"H:i, j F Y","arz":"H:i\u060c j xg Y","ase":"H:i, j F Y","as":"H:i, j F Y","ast":"H:i j M Y","atj":"j F Y \xe0 H:i","av":"H:i, j xg Y","avk":"H:i, j F Y","awa":"H:i, j F Y","ay":"H:i j M Y","azb":"j xg Y\u060c \u0633\u0627\u0639\u062a H:i","az":"H:i, j F Y","ba":"H:i, j xg Y","ban":"j F Y H.i","bar":"H:i, j. M Y","bbc-latn":"j F Y H.i","bcc":"j xg Y\u060c \u0633\u0627\u0639\u062a H:i","bcl":"H:i, j F Y","be":"H:i, j xg Y","be-tarask":"H:i, j xg Y","bg":"H:i, j F Y","bgn":"j xg Y\u060c \u0633\u0627\u0639\u062a H:i","bho":"H:i, j F Y","bi":"H:i, j F Y","bjn":"j F Y H.i","bm":"j F Y \xe0 H:i","bn":"H:i, j F Y","bo":"H:i, j F Y","bpy":"H:i, j F Y","bqi":"j xg Y\u060c \u0633\u0627\u0639\u062a H:i","brh":"H:i, j F Y","br":"j M Y \\"da\\" H:i","bs":"H:i, j F Y","btm":"j F Y H.i","bto":"H:i, j F Y","bug":"j F Y H.i","bxr":"H:i, j xg Y","ca":"H:i, j M Y","cbk-zam":"H:i j M Y","cdo":"Y \\"ni\xe8ng\\" n \\"ngu\u014fk\\" j \\"h\xf4\u0324\\" (D) H:i","ceb":"H:i, j F Y","ce":"Y, j F, H:i","ch":"H:i, j F Y","chr":"H:i, j F Y","chy":"H:i, j F Y","ckb":"H:i\u060c j\u06cc xg Y","co":"H:i, j M Y","cps":"H:i, j F Y","crh-cyrl":"H:i, Y \\"\u0441.\\" xg j","crh-latn":"H:i, Y \\"s.\\" xg j","cr":"H:i, j F Y","csb":"H:i, j M Y","cs":"j. n. Y, H:i","cu":"H:i, xg j \u0447\u0438\u0441\u043b\u0430, Y","cv":"H:i, j xg Y","cy":"H:i, j F Y","da":"j. M Y, H:i","de-at":"H:i, j. M Y","de-ch":"H:i, j. M Y","de-formal":"H:i, j. M Y","de":"H:i, j. M Y","din":"H:i, j F Y","diq":"H:i, j F Y","dsb":"j. xg Y, H:i","dtp":"H:i, j F Y","dty":"H:i, j F Y","dv":"H:i, j F Y","dz":"H:i, j F Y","ee":"H:i, j F Y","egl":"H:i, j M Y","el":"H:i, j xg Y","eml":"H:i, j M Y","en-ca":"H:i, j F Y","en-gb":"H:i, j F Y","en":"H:i, j F Y","eo":"H:i, j M. Y","es-formal":"H:i j M Y","es":"H:i j M Y","et":"j. F Y, \\"kell\\" H:i","eu":"H:i, j F Y","exif":"H:i, j F Y","ext":"H:i j M Y","fa":"j xg Y\u060c \u0633\u0627\u0639\u062a H:i","ff":"j F Y \xe0 H:i","fi":"j. F\\"ta\\" Y \\"kello\\" H.i","fit":"j. F\\"ta\\" Y \\"kello\\" H.i","fj":"H:i, j F Y","fo":"j. M Y \\"kl.\\" H:i","frc":"j F Y \xe0 H:i","fr":"j F Y \xe0 H:i","frp":"j F Y \\"a\\" H:i","frr":"H:i, j. M Y","fur":"j \\"di\\" M Y \\"a lis\\" H:i","fy":"j M Y, H.i","gag":"H.i, j F Y","ga":"H:i, j F Y","gan-hans":"Y\u5e74n\u6708j\u65e5 (D) H:i","gan-hant":"Y\u5e74n\u6708j\u65e5 (D) H:i","gan":"Y\u5e74n\u6708j\u65e5 (D) H:i","gcr":"j F Y \xe0 H:i","gd":"H:i, j F Y","gl":"j \\\\d\\\\e F \\\\d\\\\e Y \\"\xe1s\\" H:i","glk":"j xg Y\u060c \u0633\u0627\u0639\u062a H:i","gn":"H:i j M Y","gom-deva":"H:i, j F Y","gom-latn":"H:i, j F Y","gor":"j F Y H.i","got":"H:i, j F Y","grc":"H:i, j xg Y","gsw":"H:i, j. M Y","gu":"H:i, j F Y","gv":"H:i, j F Y","ha":"H:i, j F Y","hak":"H:i, j F Y","haw":"H:i, j F Y","he":"H:i, j xg Y","hif-latn":"H:i, j F Y","hi":"H:i, j F Y","hil":"H:i, j F Y","hr":"H:i, j. F Y.","hrx":"H:i, j. M Y","hsb":"j. xg Y, H:i","ht":"j F Y \xe0 H:i","hu-formal":"Y. F j., H:i","hu":"Y. F j., H:i","hy":"H:i, j xg Y","hyw":"H:i, j xg Y","ia":"H:i, j F Y","id":"j F Y H.i","ie":"H:i, j F Y","ig":"H:i, j F Y","ii":"Y\u5e74n\u6708j\u65e5 (D) H:i","ike-cans":"H:i, j F Y","ike-latn":"H:i, j F Y","ik":"H:i, j F Y","ilo":"H:i, j F Y","inh":"H:i, j xg Y","io":"H:i, j M. Y","is":"j. F Y \\"kl.\\" H:i","it":"H:i, j M Y","ja":"Y\u5e74n\u6708j\u65e5 (D) H:i","jam":"H:i, j F Y","jbo":"H:i, j F Y","jut":"j. M Y, H:i","jv":"j F Y H.i","kaa":"H:i, Y \\"j.\\" xg j","kab":"H:i, j F Y","ka":"H:i, j F Y","kbd-cyrl":"H:i, j F Y","kbp":"j F Y \xe0 H:i","kg":"H:i, j F Y","khw":"H:i\u060c j xg Y\u0621","ki":"H:i, j F Y","kiu":"H.i, j F Y","kjp":" H:i\\"\u104a\\" j F Y","kk-arab":"H:i\u060c Y \\"\u062c.\\" xg j","kk-cyrl":"H:i, Y \\"\u0436.\\" xg j","kk":"H:i, Y \\"\u0436.\\" xg j","kk-latn":"H:i, Y \\"j.\\" xg j","kl":"j. M Y, H:i","km":"\u1798\u17c4\u1784H:i l \u1791d F \u1786\u17d2\u1793\u17b6Y","kn":"H:i, j F Y","krc":"H:i, j xg Y","kri":"H:i, j F Y","krj":"H:i, j F Y","krl":"j. F\\"ta\\" Y \\"kello\\" H.i","ks-arab":"H:i, j F Y","ks-deva":"H:i, j F Y","ksh":"H:i, j. M Y","ks":"H:i, j F Y","ku-arab":"H:i\u060c j\u06cc xg Y","ku-latn":"H:i, j F Y","kum":"H:i, j xg Y","kv":"H:i, j xg Y","kw":"H:i, j F Y","ky":"H:i, j F Y","lad":"H:i j M Y","la":"H:i, j xg Y","lbe":"H:i, j xg Y","lb":"H:i, j. M Y","lez":"H:i, j xg Y","lfn":"H:i, j F Y","lg":"H:i, j F Y","lij":"H:i, j M Y","li":"j M Y H:i","liv":"j. F Y, \\"kell\\" H:i","lki":"j xg Y\u060c \u0633\u0627\u0639\u062a H:i","lmo":"H:i, j M Y","ln":"j F Y \xe0 H:i","lo":"H:i, j F Y","loz":"H:i, j F Y","lrc":"j xg Y\u060c \u0633\u0627\u0639\u062a H:i","ltg":"Y\\". gada\\" j. F\\", plkst.\\" H.i","lt":"H:i, j F Y","lus":"H:i, j F Y","luz":"j xg Y\u060c \u0633\u0627\u0639\u062a H:i","lv":"Y\\". gada\\" j. F\\", plkst.\\" H.i","lzh":"Y\u5e74n\u6708j\u65e5 \uff08D\uff09 H\u6642i\u5206","lzz":"H.i, j F Y","mai":"H:i, j F Y","map-bms":"j F Y H.i","mdf":"H:i, j xg Y","mg":"j F Y \xe0 H:i","mhr":"H:i, j xg Y","mi":"H:i, j F Y","min":"j F Y H.i","mk":"H:i, j F Y","ml":"H:i, j F Y","mni":"H:i, j F Y","mn":"H:i, j F Y","mnw":" H:i\\"\u104a\\" j F Y","mo":"j F Y H:i","mrj":"H:i, j xg Y","mr":"H:i, j F Y","ms":"H:i, j F Y","mt":"H:i, j F Y","mwl":"H\\\\hi\\\\m\\\\i\\\\n \\\\d\\\\e j \\\\d\\\\e F \\\\d\\\\e Y","my":" H:i\\"\u104a\\" j F Y","myv":"H:i, j xg Y","mzn":"j xg Y\u060c \u0633\u0627\u0639\u062a H:i","nah":"H:i j M Y","na":"H:i, j F Y","nan":"Y-\\"n\xee\\" n-\\"goe\u030dh\\" j-\\"ji\u030dt\\" (D) H:i","nap":"H:i, j M Y","nb":"j. M Y \\"kl.\\" H:i","nds":"H:i, j. M Y","nds-nl":"H:i, j M Y","ne":"H:i, j F Y","new":"H:i, j F Y","niu":"H:i, j F Y","nl-informal":"j M Y H:i","nl":"j M Y H:i","nn":"j. F Y \\"kl.\\" H:i","nov":"H:i, j F Y","nqo":"H:i, j F Y","nrm":"j F Y \xe0 H:i","nso":"H:i, j F Y","nv":"H:i, j F Y","ny":"H:i, j F Y","nys":"H:i, j F Y","oc":"j F \\"de\\" Y \\"a\\" H.i","olo":"j. F\\"ta\\" Y \\"kello\\" H.i","om":"H:i, j F Y","or":"H:i, j F Y","os":"H:i, j xg Y","pag":"H:i, j F Y","pa":"H:i, j F Y","pam":"H:i, j F Y","pap":"H:i, j F Y","pcd":"j F Y \xe0 H:i","pdc":"H:i, j. M Y","pdt":"H:i, j. M Y","pfl":"H:i, j. M Y","pih":"H:i, j F Y","pi":"H:i, j F Y","pl":"H:i, j M Y","pms":"H:i, j M Y","pnb":"H:i, j F Y","pnt":"H:i, j xg Y","prg":"H:i, j F Y","ps":"H:i, j F Y","pt-br":"H\\"h\\"i\\"min\\" \\"de\\" j \\"de\\" F \\"de\\" Y","pt":"H\\\\hi\\\\m\\\\i\\\\n \\\\d\\\\e j \\\\d\\\\e F \\\\d\\\\e Y","qqq":"H:i, j F Y","qug":"H:i j M Y","qu":"H:i j M Y","rgn":"H:i, j M Y","rif":"H:i, j F Y","rm":"H:i, j F Y","rmy":"j F Y H:i","roa-tara":"H:i, j M Y","ro":"j F Y H:i","rue":"H:i, j xg Y","ru":"H:i, j xg Y","rup":"j F Y H:i","ruq-cyrl":"H:i, j F Y","ruq-latn":"j F Y H:i","rw":"H:i, j F Y","sah":"H:i, j xg Y","sa":"H:i, j F Y","sat":"H:i, j F Y","sc":"H:i, j M Y","scn":"H:i, j M Y","sco":"H:i, j F Y","sdc":"H:i, j F Y","sdh":"j xg Y\u060c \u0633\u0627\u0639\u062a H:i","sd":"H:i, j F Y","sei":"H:i, j F Y","se":"xg j \\"b.\\" Y \\"dii.\\" G.i","ses":"j F Y \xe0 H:i","sg":"j F Y \xe0 H:i","sgs":"H:i, j F Y","shi":"H:i, j F Y","sh":"H:i, j F Y","shn":"H:i, j F Y","shy-latn":"H:i, j F Y","si":"H:i, j F Y","sk":"H:i, j. F Y","skr-arab":"H:i\u060c j xg Y\u0621","sli":"H:i, j. M Y","sl":"H:i, j. F Y","sma":"H:i, j F Y","sm":"H:i, j F Y","sn":"H:i, j F Y","so":"H:i, j F Y","sq":"j F Y H:i","sr-ec":"H:i, j. F Y.","sr-el":"H:i, j. F Y.","srn":"j M Y H:i","ss":"H:i, j F Y","st":"H:i, j F Y","stq":"H:i, j. M Y","sty":"H:i, j xg Y","su":"j F Y H.i","sv":"j F Y \\"kl.\\" H.i","sw":"H:i, j F Y","szl":"H:i, j M Y","ta":"H:i, j F Y","tay":"H:i, j F Y","tcy":"H:i, j F Y","te":"H:i, j F Y","tet":"H\\\\hi\\\\m\\\\i\\\\n \\\\d\\\\e j \\\\d\\\\e F \\\\d\\\\e Y","tg-cyrl":"H:i, j xg Y","tg-latn":"H:i, j F Y","th":"H:i, j F xkY","ti":"H:i, j F Y","tk":"H:i, j F Y","tl":"H:i, j F Y","tly":"H:i, j F Y","tn":"H:i, j F Y","to":"H:i, j F Y","tpi":"H:i, j F Y","tr":"H.i, j F Y","tru":"H:i, j F Y","trv":"H:i, j F Y","ts":"H:i, j F Y","tt-cyrl":"j M Y, H:i","tt-latn":"j M Y, H:i","tw":"H:i, j F Y","ty":"j F Y \xe0 H:i","tyv":"H:i, j xg Y","tzm":"H:i, j F Y","udm":"H:i, j xg Y","ug-arab":"H:i, j F Y","ug-latn":"H:i, j F Y","uk":"H:i, j xg Y","ur":"H:i\u060c j xg Y\u0621","uz":"H:i, j-F Y","vec":"H:i, j M Y","ve":"H:i, j F Y","vep":"j. F Y, \\"kell\\" H:i","vi":"H:i, \\"ng\xe0y\\" j \\"th\xe1ng\\" n \\"n\u0103m\\" Y","vls":"j M Y H:i","vmf":"H:i, j. M Y","vo":"H:i, Y F j\\"id\\"","vot":"j. F\\"ta\\" Y \\"kello\\" H.i","vro":"j. F Y, \\"kell\\" H:i","wa":"j F Y \xe0 H:i","war":"H:i, j F Y","wo":"j F Y \xe0 H:i","wuu":"Y\u5e74n\u6708j\u53f7 (D) H:i","xal":"H:i, j xg Y","xh":"H:i, j F Y","xmf":"H:i, j F Y","xsy":"H:i, j F Y","yi":"H:i, j xg Y","yo":"H:i, j F Y","yue":"Y\u5e74n\u6708j\u865f (D) H:i","za":"Y\u5e74n\u6708j\u65e5 (D) H:i","zea":"j M Y H:i","zgh":"H:i, j F Y","zh-hans":"Y\u5e74n\u6708j\u65e5 (D) H:i","zh-hant":"Y\u5e74n\u6708j\u65e5 (D) H:i","zh-hk":"Y\u5e74n\u6708j\u65e5 (D) H:i","zh":"Y\u5e74n\u6708j\u65e5 (D) H:i","zh-sg":"Y\u5e74n\u6708j\u65e5 (D) H:i","zh-tw":"Y\u5e74n\u6708j\u65e5 (D) H:i","zu":"H:i, j F Y"}')},function(e,t,n){"use strict";n.d(t,"b",(function(){return a}));var i=n(0),o=n(17);function a(e,t=!0,n){const a=()=>{i.a.state.isAutoScrollInProgress=!1;Object(o.d)();if(n)n()};if(t)$("body, html").animate({scrollTop:e},{complete:function(){if(this===document.documentElement)a()}});else{window.scrollTo(window.scrollX,e);a()}}t.a={cdRemoveNonElementNodes:function(){return this.filter((function(){return this.tagName&&!["STYLE","LINK"].includes(this.tagName)}))},cdScrollTo(e="top",t=!0,n){let o=this.cdRemoveNonElementNodes();const s=o.first().offset(),r=o.last().offset();if((0===s.top||0===r.top)&&0===s.left){mw.notify(i.a.s("error-elementhidden"),{type:"error"});return this}const c=r.top+o.last().outerHeight();let l;if("center"===e)l=Math.min(s.top,s.top+.5*(c-s.top)-.5*$(window).height());else if("bottom"===e)l=c-$(window).height();else l=s.top-i.a.g.BODY_SCROLL_PADDING_TOP;i.a.state.isAutoScrollInProgress=!0;a(l,t,n);return this},cdIsInViewport(e=!1){const t=this.cdRemoveNonElementNodes(),n=t.get().every(e=>"none"===e.style.display);if(n)t.show();const o=t.first().offset().top,a=t.last().offset().top+t.last().height();if(0===o&&0===a)return!1;if(n)t.hide();const s=$(window).scrollTop()+i.a.g.BODY_SCROLL_PADDING_TOP,r=s+$(window).height();return e?a>s&&o<r:o>=s&&a<=r},cdScrollIntoView(e="top",t=!0,n){if(this.cdIsInViewport()){if(n)n()}else if(n)setTimeout(()=>{this.cdScrollTo(e,t,n)});else this.cdScrollTo(e,t,n);return this},cdGetText(){let e;const t=document.createElement("div");Array.from(this.get(0).childNodes).forEach(e=>{t.appendChild(e.cloneNode(!0))});document.body.appendChild(t);e=t.innerText;t.remove();return e},cdAddCloseButton(){if(this.find(".cd-closeButton").length)return this;const e=$("<a>").attr("title",i.a.s("cf-block-close")).addClass("cd-closeButton").on("click",()=>{this.empty()});this.prepend(e);return this},cdGetContainerListType(){var e;return null===(e=this.closest("dl, ul, ol").prop("tagName"))||void 0===e?void 0:e.toLowerCase()}}},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,n){"use strict";n.d(t,"a",(function(){return q}));var i=n(2),o=n.n(i),a=n(3),s=n(7),r=n(13),c=n(14),cd=n(0),l=n(16),u=n(1),d=n(5);let h,m;class Parser_Parser{constructor(e){this.context=e;if(!h){h=["cd-comment-part",...cd.a.config.closedDiscussionClasses];if(cd.a.g.pageHasOutdents)h.push(cd.a.config.outdentClass)}}createComment(e){return new this.context.CommentClass(this,e)}createSection(e,t,n){return new this.context.SectionClass(this,e,t,n)}removeDtMarkup(){const e="undefined"!=typeof mw&&cd.a.g.isDtTopicSubscriptionEnabled;let t;if(e)if(cd.a.state.isPageFirstParsed){t=this.context.document.createElement("span");t.className="cd-dtMarkupHaven cd-hidden";cd.a.g.$content.append(t)}else t=cd.a.g.$content.children(".cd-dtMarkupHaven").get(0);let n=Array.from(cd.a.g.rootElement.getElementsByTagName("span")).filter(e=>e.hasAttribute("data-mw-comment-start")||e.hasAttribute("data-mw-comment-end")).concat(Array.from(cd.a.g.rootElement.getElementsByClassName("ext-discussiontools-init-replylink-buttons")));if("undefined"!=typeof mw)n=n.concat(Array.from(cd.a.g.rootElement.getElementsByClassName("ext-discussiontools-init-highlight")));n.forEach((n,i)=>{if(e){if(i%10==0)t.appendChild(this.context.document.createElement("span"));t.lastChild.appendChild(n)}else n.remove()})}findTimestamps(){const e=Array.from(cd.a.g.rootElement.getElementsByTagName("blockquote")),t=cd.a.config.elementsToExcludeClasses.map(e=>Array.from(cd.a.g.rootElement.getElementsByClassName(e)));m=[...e,...Object(u.k)(t)];return this.context.getAllTextNodes().map(e=>{const{date:t,match:n}=Object(d.l)(e.textContent)||{};if(t&&!m.some(t=>t.contains(e)))return{node:e,date:t,match:n}}).filter(u.h).map(e=>{const{node:t,match:n,date:i}=e,o=this.context.document.createElement("span");o.classList.add("cd-timestamp");o.appendChild(this.context.document.createTextNode(n[2]));const a=t.textContent.slice(n.index+n[0].length);let s;if(a)s=this.context.document.createTextNode(a);t.textContent=n[1];t.parentNode.insertBefore(o,t.nextSibling);if(s)t.parentNode.insertBefore(s,o.nextSibling);return{element:o,date:i}})}timestampsToSignatures(e){return e.map(e=>{const t=e.date,n=e.element,i=e.element.textContent;let o,a;for(let t=e.element;!a;t=t.parentNode)if(Object(u.A)(t)){if(t.classList.contains(cd.a.config.unsignedClass))o=t}else a=t;const s=Boolean(o),r=Array.from(a[this.context.childElementsProp]),c=new l.b(e.element,a);let h=!1;for(;c.nextNode()&&(!r.includes(c.currentNode)||Object(u.A)(c.currentNode));){if("A"===c.currentNode.tagName)h=!0;if(c.currentNode.classList.contains("cd-timestamp")&&h)return}const m=o||e.element,f=new l.a(m);let g,p,b,v,y,w,E,C,T=0,x=[];if(o)E=m;else{x.push(m);f.previousSibling()}do{var k;const e=f.currentNode;T+=e.textContent.length;if(e.tagName){if(e.classList.contains("cd-timestamp")||["S","STRIKE","DEL"].includes(e.tagName)&&T>=30)break;let t=!1;const n=({userName:e,linkType:n},i)=>{if(e){if(!g)g=e;if(g===e){if(["user","userForeign"].includes(n)){if(b)return!1;if("userForeign"!==n)b=i;p=i}else if(["userTalk","userTalkForeign"].includes(n)){if(y)return!1;if("userTalkForeign"!==n)y=i;v=i}else if(["contribs","contribsForeign"].includes(n)){if(w&&(p||v))return!1;if("contribsForeign"!==n)w=i}else if(["userSubpage","userSubpageForeign"].includes(n)){if(p||v)return!1}else if(["userTalkSubpage","userTalkSubpageForeign"].includes(n)){if(p||v)return!1}else if(p||v)return!1;t=!0}}return!0};if("A"===e.tagName){if(!n(Parser_Parser.processLink(e)||{},e))break}else{const t=Array.from(e.getElementsByTagName("a")).reverse();for(const e of t){if(e.classList.contains("external"))continue;n(Parser_Parser.processLink(e)||{},e)}}if(t)E=e}x.push(e);C=f.previousSibling();if(!C&&!E){C=f.parentNode();if(!C||!Object(u.A)(C))break;T=0;x=[]}if(g&&null!==(k=C)&&void 0!==k&&k.tagName&&["S","STRIKE","DEL"].includes(C.tagName))break}while(C&&T<cd.a.config.signatureScanLimit);if(!g)return;if(!x.length)x=[m];const S=x.indexOf(E);x.splice(-1===S?1:S+1);const O=Object(d.f)(e.date,g,!0);Object(d.m)(O);const N=x[0].parentNode,_=x[0].nextSibling,A=this.context.document.createElement("span");A.classList.add("cd-signature");x.reverse().forEach(A.appendChild.bind(A));N.insertBefore(A,_);return{element:A,timestampElement:n,timestampText:i,date:t,authorLink:p,authorTalkLink:v,authorName:g,anchor:O,isUnsigned:s}}).filter(u.h)}findUnsigneds(){const e=[];if(cd.a.config.unsignedClass)Array.from(cd.a.g.rootElement.getElementsByClassName(cd.a.config.unsignedClass)).filter(e=>{if(this.context.getElementByClassName(e,"cd-timestamp"))return!1;for(let t=e;t&&t!==cd.a.g.rootElement;t=t.parentNode)if(t.classList.contains("cd-signature"))return!1;return!0}).forEach(t=>{Array.from(t.getElementsByTagName("a")).some(n=>{const{userName:i,linkType:o}=Parser_Parser.processLink(n)||{};if(i){let a,s;if("user"===o)a=n;else if("userTalk"===o)s=n;t.classList.add("cd-signature");const r=!0;e.push({element:t,authorName:i,isUnsigned:r,authorLink:a,authorTalkLink:s});return!0}})});return e}findSignatures(e){let t=this.timestampsToSignatures(e);const n=this.findUnsigneds();t.push(...n);t.sort((e,t)=>this.context.follows(e.element,t.element)?1:-1);return t}getStartNodes(e,t){const n=[];let i;for(;!i;){for(;!t.currentNode.nextSibling&&t.parentNode(););if(!t.nextSibling())break;if(!Object(u.A)(t.currentNode,!0))i=t.currentNode}if(i&&e.parentNode.contains(i)||e.parentNode.getElementsByClassName("cd-signature",2).length>1||!this.isElementEligible(e.parentNode,t,"start")){t.currentNode=e;for(;t.nextSibling()&&Object(u.A)(t.currentNode,!0);)n.push({node:t.currentNode,isTextNode:t.currentNode.nodeType===Node.TEXT_NODE,isHeading:!1,hasCurrentSignature:!1,hasForeignComponents:!1,lastStep:"start"});n.reverse();t.currentNode=e}else t.currentNode=e.parentNode;n.push({node:t.currentNode,isTextNode:!1,isHeading:!1,hasCurrentSignature:!0,hasForeignComponents:!1,lastStep:"start"});return[n,i]}isElementEligible(e,t,n){var i,o;return!(e===t.root||h.some(t=>e.classList.contains(t))||"toc"===e.getAttribute("id")||"DT"===e.tagName||function(e){if(!["TD","TH"].includes(e.tagName))return!1;let t;for(let n=e;!t&&n!==cd.a.g.rootElement;n=n.parentNode)if("TABLE"===n.tagName)t=n;return!t||t.getElementsByClassName("cd-signature",2).length>1}(e)||"HR"===e.tagName&&e.previousElementSibling&&this.context.getElementByClassName(e.previousElementSibling,"cd-signature")||cd.a.g.pageHasOutdents&&this.context.getElementByClassName(e,cd.a.config.outdentClass)||cd.a.g.NAMESPACE_NUMBER%2==1&&e.classList.contains("tmbox")||e.classList.contains("ombox")&&"up"!==n||null!==(i=(o=cd.a.config).checkForCustomForeignComponents)&&void 0!==i&&i.call(o,e,this.context))}isIntroList(e,t=!1){var n;const i=e.tagName;if(!["DL","UL","OL"].includes(i))return!1;const o=null===(n=e.previousElementSibling)||void 0===n?void 0:n.tagName;let a="DL"===i&&e.firstChild&&"DT"===e.firstChild.tagName||["DL","UL"].includes(i)&&o&&/^H[1-6]$/.test(o)||"UL"===i&&e.classList.contains("gallery");if(t&&!a){const t=e.nextElementSibling;if(t)a=this.getClosestElementsWithText(t).levelsPassed>1}return a}traverseDom(e,t,n,i){for(let s=0;s<500;s++){var o;let s;const r=e[e.length-1];if(!r.hasCurrentSignature&&r.hasForeignComponents){let e,t=!1;for(;(e=n.currentNode)&&n.lastChild();){if(Object(u.A)(n.currentNode,!0)){n.currentNode=e;break}t=!0}if(t)s="dive";else break}else if(n.previousSibling())s="back";else{if(!n.parentNode())break;s="up"}const c=n.currentNode,l=c.nodeType===Node.TEXT_NODE;if("back"===s&&(["OL","UL"].includes(r.node.tagName)||"DL"===r.node.tagName&&r.node.parentNode!==cd.a.g.rootElement&&r.node.parentNode.parentNode!==cd.a.g.rootElement)&&!(["DL","OL","UL"].includes(c.tagName)&&!this.isIntroList(c)||l&&c.previousSibling&&["DL","OL","UL"].includes(c.previousSibling.tagName)&&!this.isIntroList(c.previousSibling))&&(null===(o=r.node[this.context.childElementsProp][0])||void 0===o?void 0:o.contains(t)))break;let d=null,h=null,f=null;if(!l){if(!this.isElementEligible(c,n,s))break;d=/^H[1-6]$/.test(c.tagName);h=c.contains(t);f=c.getElementsByClassName("cd-signature",Number(h)+1).length-Number(h)>0||i&&c.contains(i)&&"TABLE"!==c.tagName;if(!h){var a;if(!Object(u.A)(c,!0)&&null!==(a=cd.a.config.signatureEndingRegexp)&&void 0!==a&&a.test(c.textContent)&&!m.some(e=>e.contains(c)))break}}e.push({node:c,isTextNode:l,isHeading:d,hasCurrentSignature:h,hasForeignComponents:f,lastStep:s});if(d)break}return e}collectParts(e){const t=new l.a(e);let[n,i]=this.getStartNodes(e,t);n=this.traverseDom(n,e,t,i);return n}removeNestedParts(e){for(let t=e.length-1;t>=0;t--){const n=e[t];if("up"===n.lastStep&&!n.hasForeignComponents){let n=0;for(let i=t-1;i>0;i--)if("dive"===e[i].lastStep){n=i;break}e.splice(n,t-n);t=n}}return e}encloseInlineParts(e,t){const n=[];let i=null,o=!1;for(let t=0;t<=e.length;t++){const a=e[t];if(a&&(null===i||["back","start"].includes(a.lastStep))&&!a.hasForeignComponents&&!a.isHeading){if(null===i)if(Object(u.A)(a.node.parentNode)){for(let n=t+1;n<e.length;n++)if("up"!==e[n].lastStep);else t=n-1;break}else i=t;if(!o&&(a.isTextNode&&a.node.textContent.trim()||Object(u.A)(a.node)))o=!0}else if(null!==i){if(o){const e=t-1;n.push({start:i,end:e})}i=null;o=!1}}for(let i=n.length-1;i>=0;i--){const o=n[i],a=this.context.document.createElement("div"),s=e[o.start].node.nextSibling,r=e[o.start].node.parentNode;for(let t=o.end;t>=o.start;t--)a.appendChild(e[t].node);r.insertBefore(a,s);const c={node:a,isTextNode:!1,isHeading:!1,hasCurrentSignature:a.contains(t),hasForeignComponents:!1,lastStep:"replaced"};e.splice(o.start,o.end-o.start+1,c)}return e}filterParts(e,t){var n;for(let t=(e=e.filter(e=>!e.hasForeignComponents&&!e.isTextNode)).length-1;t>0;t--){const n=e[t].node;if("STYLE"===n.tagName||"LINK"===n.tagName||n.classList.contains("reflist-talk"))e.splice(t,1);else break}const i=null===(n=e[e.length-1])||void 0===n?void 0:n.node;if("P"===i.tagName){var o;if("BR"===(null===(o=i.firstChild)||void 0===o?void 0:o.tagName))i.parentNode.insertBefore(i.firstChild,i)}if(e.length>1){const n=e[e.length-1].node;if(!["DL","OL","UL","DD","LI"].includes(n.tagName)||this.isIntroList(n,!0))for(let n=e.length-1;n>=1;n--){var a;const i=e[n],o=i.node,s=o.nextElementSibling;if(!s)continue;if("back"===i.lastStep&&["DL","OL","UL"].includes(s.tagName)&&(!["DL","OL","UL"].includes(o.tagName)||this.isIntroList(o,!0))&&(null===(a=s[this.context.childElementsProp][0])||void 0===a?void 0:a.contains(t)))e.splice(n)}}return e}getClosestElementsWithText(e){const t=e.textContent.replace(/\s+/g,"");let n,i=[e],o=0;do{n=i;i=n.reduce((e,t)=>e.concat(Array.from(t[this.context.childElementsProp])),[]);if(["DL","UL","OL"].includes(n[0].tagName))o++}while(i.length&&i.every(e=>["DL","UL","OL","DD","LI"].includes(e.tagName)||!e.textContent.trim()&&Object(u.A)(e))&&i.map(e=>e.textContent).join("").replace(/\s+/g,"")===t);return{nodes:n,levelsPassed:o}}replaceListsWithItems(e,t){const n=e[e.length-1];for(let i=e.length-1;i>=0;i--){const o=e[i];if(["DL","UL","OL","DD","LI"].includes(o.node.tagName)&&("UL"!==o.node.tagName||!o.node.classList.contains("gallery"))&&("up"===o.lastStep&&(!e[i-1]||"back"!==e[i-1].lastStep)||("DD"===n.node.tagName||"DD"===n.node.parentNode.tagName||"DL"===n.node.tagName)&&!e.slice(i+1).some(e=>"P"===e.node.tagName)&&("back"!==o.lastStep||!["LI","DD"].includes(o.node.tagName)))){const n=this.getClosestElementsWithText(o.node).nodes;if(n.length>1){const o=n.map(e=>({node:e,isTextNode:!1,hasCurrentSignature:e.contains(t),hasForeignComponents:!1,lastStep:"replaced"}));e.splice(i,1,...o)}else if(n[0]!==o.node)Object.assign(o,{node:n[0],lastStep:"replaced"})}}return e}wrapNumberedList(e,t){if(e.length>1){const n=e[0].node.parentNode;if("OL"===n.tagName){const i=Number(n.contains(t));if(n.getElementsByClassName("cd-signature").length-i==0){const t=e.filter(e=>e.node.parentNode===n),i=!e.some(e=>e.node.parentNode!==n&&e.node.parentNode.contains(n));let o,a;const s=n.nextSibling,r=n.parentNode;if(i){a=this.context.document.createElement("dd");o=this.context.document.createElement("dl");o.appendChild(a)}else{a=this.context.document.createElement("div");o=a}a.appendChild(n);r.insertBefore(o,s);const c={node:a,isTextNode:!1,isHeading:!1,hasCurrentSignature:!0,hasForeignComponents:!1,lastStep:"replaced"};e.splice(0,t.length,c)}}}return e}getListsUpTree(e){const t=[],n=new l.b(e);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)t.unshift(...Array(Number(n[1])));return t}else t.unshift(e)}return t}findHeadings(){const e=[...cd.a.g.rootElement.getElementsByTagName("h1"),...cd.a.g.rootElement.getElementsByTagName("h2"),...cd.a.g.rootElement.getElementsByTagName("h3"),...cd.a.g.rootElement.getElementsByTagName("h4"),...cd.a.g.rootElement.getElementsByTagName("h5"),...cd.a.g.rootElement.getElementsByTagName("h6")];e.sort((e,t)=>this.context.follows(e,t)?1:-1);return e}static processLink(e){const t=e.getAttribute("href");let n,i=null;if(t){const{pageName:e,domain:o,fragment:a}=function(e){let t,n=cd.a.g.HOSTNAME,i=e.replace(/^(?:https?:)?\/\/([^/]+)/,(e,t)=>{n=t;return""}).replace(cd.a.g.STARTS_WITH_ARTICLE_PATH_REGEXP,"").replace(cd.a.g.STARTS_WITH_SCRIPT_TITLE,"").replace(/&action=edit.*/,"").replace(/#(.*)/,(e,n)=>{t=n;return""}).replace(/_/g," ");try{i=decodeURIComponent(i)}catch(e){return null}return{pageName:i,domain:n,fragment:t}}(t)||{};if(!e||Object(d.i)(a))return null;const s=e.match(cd.a.g.USER_NAMESPACES_REGEXP);if(s){n=s[1];if(cd.a.g.USER_LINK_REGEXP.test(e))i="user";else if(cd.a.g.USER_TALK_LINK_REGEXP.test(e))i="userTalk";else if(cd.a.g.USER_SUBPAGE_LINK_REGEXP.test(e))i="userSubpage";else if(cd.a.g.USER_TALK_SUBPAGE_LINK_REGEXP.test(e))i="userTalkSubpage"}else if(e.startsWith(cd.a.g.CONTRIBS_PAGE+"/")){n=e.replace(cd.a.g.CONTRIBS_PAGE_LINK_REGEXP,"");if(cd.a.g.isIPv6Address(n))n=n.toUpperCase();i="contribs"}if(o!==cd.a.g.HOSTNAME)i+="Foreign";if(n)n=Object(u.j)(Object(u.V)(n.replace(/\/.*/,""))).trim()}else if(e.classList.contains("mw-selflink")&&3===cd.a.g.NAMESPACE_NUMBER&&!cd.a.g.PAGE_NAME.includes("/"))n=cd.a.g.PAGE_TITLE;else return null;return{userName:n,linkType:i}}}var f=Parser_Parser,g=n(15),p=n(28),b=n(11),v=n(31),y=n(23),w=n(26),E=n(4),C=n(17),T=n(10);function x(e,t){return k.apply(this,arguments)}function k(){return(k=o()((function*(e,t){if(!cd.a.g.$content.get(0).parentNode)cd.a.g.$content=$("#mw-content-text");if(e.html){const t=document.createElement("div");t.innerHTML=e.html;cd.a.g.rootElement=t.firstChild;cd.a.g.$root=$(cd.a.g.rootElement)}else{cd.a.g.$root=cd.a.g.$content.children(".mw-parser-output");if(!cd.a.g.$root.length)cd.a.g.$root=cd.a.g.$content;cd.a.g.rootElement=cd.a.g.$root.get(0)}cd.a.g.$root.data("cd-parsed",!0);y.a.reset();cd.a.comments=[];cd.a.sections=[];if(cd.a.state.isFirstRun)yield Object(E.f)(t);else{var n;null===(n=cd.a.g.$addSectionButtonContainer)||void 0===n||n.remove();$(".cd-commentForm-addSection").remove();Object(d.o)();s.a.resetLayers()}}))).apply(this,arguments)}function S(){const e=document.createTreeWalker(cd.a.g.rootElement,NodeFilter.SHOW_TEXT);let t;const n=[];for(;t=e.nextNode();)n.push(t);return n}function O(){const e=cd.a.config.closedDiscussionClasses.map(e=>"."+e).join(", ");cd.a.g.closedDiscussionElements=cd.a.g.$root.find(e).get()}function N(){cd.a.g.pageHasOutdents=Boolean(cd.a.g.$root.find("."+cd.a.config.outdentClass).length)}function _(){const e=[],t=[],n=i=>{if(i instanceof CSSStyleRule){const n=i.style;if("left"===n.float||"right"===n.float)e.push(i.selectorText);if("none"===n.display)t.push(i.selectorText)}else if(i instanceof CSSMediaRule)Array.from(i.cssRules).forEach(n)};Array.from(document.styleSheets).filter(e=>{var t;return null===(t=e.href)||void 0===t?void 0:t.includes("site.styles")}).forEach(e=>{Array.from(e.cssRules).forEach(n)});Array.from(cd.a.g.rootElement.querySelectorAll("style")).forEach(e=>{Array.from(e.sheet.cssRules).forEach(n)});const i=[...cd.a.g.FLOATING_ELEMENT_SELECTORS,...e].join(", ");cd.a.g.floatingElements=Array.from(cd.a.g.rootElement.querySelectorAll(i)).filter(e=>!e.classList.contains("cd-ignoreFloating"));const o=[...t].join(", ");cd.a.g.hiddenElements=o?Array.from(cd.a.g.rootElement.querySelectorAll(o)):[]}function A(e,t){const n=document.createElement(t);for(;e.firstChild;)n.appendChild(e.firstChild);Array.from(e.attributes).forEach(e=>{n.setAttribute(e.name,e.value)});let i=e.getAttribute("data-comment-id");if(null!==i){i=Number(i);cd.a.comments[i].replaceElement(e,n)}else e.parentNode.replaceChild(n,e);Object(u.M)(e,n);return n}function P(){const e=cd.a.g.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)");Array.from(e).forEach(e=>{const n=e.previousElementSibling;if(!n)return;let i=n,o=e;do{var a;const e=i.tagName,n={};if("UL"===e)n.DD="LI";else if("DL"===e)n.LI="DD";let s;if(t(i)){const e=o.firstElementChild;if(["DL","DD","UL","LI"].includes(e.tagName)){for(;o.childNodes.length;){let e=o.firstChild;if(e.tagName){if(n[e.tagName])e=A(e,n[e.tagName]);if(void 0===s)s=e}else if(void 0===s&&e.textContent.trim()){s=null;const t=document.createElement("span");t.appendChild(e);e=t}i.appendChild(e)}o.remove()}}o=s;i=null===(a=s)||void 0===a?void 0:a.previousElementSibling}while(i&&o&&t(o))})}function I(e){const t=e.findTimestamps();e.findSignatures(t).forEach(t=>{try{cd.a.comments.push(e.createComment(t))}catch(e){if(!(e instanceof a.a))console.error(e)}});s.a.reformatTimestamps();cd.a.g.rootElement.querySelectorAll("table.cd-comment-part .cd-signature").forEach(e=>{const t=e.closest(".cd-comment-part").dataset.commentId;cd.a.comments[t].isInSingleCommentTable=!0});!function(){P();P();if(cd.a.g.rootElement.querySelector(".cd-commentLevel:not(ol) + .cd-commentLevel:not(ol)"))console.warn(".cd-commentLevel adjacencies have left.");cd.a.g.rootElement.querySelectorAll("dd.cd-comment-part-last + dd, li.cd-comment-part-last + li").forEach(e=>{var t;if(null!==(t=e.firstElementChild)&&void 0!==t&&t.classList.contains("cd-commentLevel"))e.classList.add("cd-connectToPreviousItem")});cd.a.comments.slice(1).forEach((e,t)=>{var n;const i=cd.a.comments[t],o=i.elements[i.elements.length-1],a=null===(n=o.nextElementSibling)||void 0===n?void 0:n.firstElementChild;if(["DD","LI"].includes(o.parentNode.tagName)&&e.level===i.level&&"DIV"===o.tagName&&a===e.elements[0]&&"LI"===a.tagName){const e=o.parentNode,t=document.createElement(e.tagName);t.appendChild(o.nextElementSibling);e.parentNode.insertBefore(t,e.nextElementSibling);console.debug("Separated a list from a part of the previous comment.")}})}();mw.hook("convenientDiscussions.commentsReady").fire(cd.a.comments,cd.a)}function L(e,t){e.findHeadings().forEach((n,i,o)=>{try{const[,a]=n.tagName.match(/^H([1-6])$/),s=new RegExp(`^H[1-${a}]$`),r=o.slice(i+1).find(e=>s.test(e.tagName)),c=e.createSection(n,t,r);cd.a.sections.push(c)}catch(e){if(!(e instanceof a.a))console.error(e)}});g.a.adjust();s.a.processOutdents();t.then(()=>{g.a.cleanUpWatched();y.a.highlightWatchedSections()});mw.hook("convenientDiscussions.sectionsReady").fire(cd.a.sections,cd.a)}function M(){if(!cd.a.g.isDtNewTopicToolEnabled)return null;let e,t;const n=$(".ext-discussiontools-ui-newTopic");if(n.length){const i=n.find('.ext-discussiontools-ui-newTopic-sectionTitle input[type="text"]');e=i.val();i.val("");const o=n.find("textarea");t=o.textSelection("getContents");o.textSelection("setContents","");if($("#wpTextbox1").length)$("#wpTextbox1").remove();else{const e=new MutationObserver(t=>{if(t.some(e=>Array.from(e.addedNodes).some(e=>e.classList.contains("ext-discussiontools-ui-replyWidget")))){$("#wpTextbox1").remove();e.disconnect()}});e.observe(cd.a.g.$content.get(0),{childList:!0,subtree:!0})}n.hide();mw.config.set("wgDiscussionToolsStartNewTopicTool",!1);return{headline:e,comment:t,didReplaceDtForm:!0}}else return null}function j(){if($("#ca-addsection").length&&(!cd.a.g.isDtNewTopicToolEnabled||mw.config.get("wgArticleId"))){cd.a.g.addSectionButton=new OO.ui.ButtonWidget({label:cd.a.s("addtopic"),framed:!1,classes:["cd-button-ooui","cd-section-button"]});cd.a.g.addSectionButton.on("click",()=>{r.a.createAddSectionForm()});cd.a.g.$addSectionButtonContainer=$("<div>").addClass("cd-section-button-container cd-addTopicButton-container").append(cd.a.g.addSectionButton.$element).appendTo(cd.a.g.$content)}}function D(e){return Array.isArray(e)?e[e.length-1]:e}function R(){var e,t;$(cd.a.g.ADD_TOPIC_SELECTOR).filter((function(){const e=$(this);if("new"===mw.util.getParamValue("section")&&"ca-addsection"!==e.parent().attr("id")&&!e.closest(cd.a.g.$root).length)return!1;let t,n;if(e.is("a")){const n=e.attr("href");let i;try{i=new mw.Uri(n).query}catch(e){return}t=D(i.title)}else if(e.is("input"))t=e.closest("form").find('input[name="title"][type="hidden"]').val();else return!1;try{n=new c.a(t)}catch(e){return!1}if(n.name!==cd.a.page.name)return!1;else return!0})).off("click").on("click.cd",(function(e){if(e.ctrlKey||e.shiftKey||e.metaKey)return;const t=$(this);let n,i=!1;if(t.is("a")){var o;const e=t.attr("href");let a;try{a=new mw.Uri(e).query}catch(e){return}n={editIntro:D(a.editintro),commentTemplate:D(a.preload),headline:D(a.preloadtitle),summary:null===(o=D(a.summary))||void 0===o?void 0:o.replace(/^.+?\*\/ */,""),noHeadline:Boolean(D(a.nosummary)),omitSignature:Boolean(a.cdomitsignature)};i="0"===a.section}else{const e=t.closest("form");n={editIntro:e.find('input[name="editintro"]').val(),commentTemplate:e.find('input[name="preload"]').val(),headline:e.find('input[name="preloadtitle"]').val(),summary:e.find('input[name="summary"]').val(),noHeadline:Boolean(e.find('input[name="nosummary"]').val()),omitSignature:!1}}e.preventDefault();r.a.createAddSectionForm(n,i)})).filter((function(){const e=$(this);return!(cd.a.g.isDtNewTopicToolEnabled||e.is("a")&&Number(mw.util.getParamValue("cdaddtopic",e.attr("href"))))})).attr("title",cd.a.s("addtopicbutton-tooltip"));const n=null===(e=$._data(document.body).events.click)||void 0===e?void 0:null===(t=e.find(e=>{var t;return null===(t=e.selector)||void 0===t?void 0:t.includes("data-mw-comment")}))||void 0===t?void 0:t.handler;if(n)$(document.body).off("click",n)}function H(e){if(!e.is("#mw-content-text, .cd-comment-part"))return;const t=e.hasClass("cd-comment-part")?`a[title$=":${cd.a.user.name}"], a[title*=":${cd.a.user.name} ("]`:`.cd-comment-part a[title$=":${cd.a.user.name}"], .cd-comment-part a[title*=":${cd.a.user.name} ("]`,n=[cd.a.settings.reformatComments?"cd-comment-author":"cd-signature"].concat(cd.a.config.elementsToExcludeClasses).map(e=>"."+e).join(", ");e.find(t).filter((function(){var e;return cd.a.g.USER_LINK_REGEXP.test(this.title)&&!this.closest(n)&&(null===(e=f.processLink(this))||void 0===e?void 0:e.userName)===cd.a.user.name})).each((e,t)=>{t.classList.add("cd-currentUserLink")})}function B(e){return F.apply(this,arguments)}function F(){return(F=o()((function*(e){let t,n,i,o,a,r,c,l,u,h,m;if(cd.a.state.isFirstRun){t=location.hash.slice(1);i=$.escapeSelector(t);try{n=decodeURIComponent(t);o=n&&$.escapeSelector(n);if(Object(d.i)(t))a=n;else({date:r,author:c,parentDate:l,parentAuthor:u,sectionAnchorBeginning:h}=Object(d.k)(n)||{})}catch(e){console.error(e)}}else a=e.commentAnchor;if(a){({date:r,author:c}=Object(d.j)(a)||{});m=s.a.getByAnchor(a,!e.commentAnchor)}else if(r){const e=cd.a.comments.filter(e=>e.date&&e.date.getTime()===r.getTime()&&e.author.name===c);m=1===e.length?e[0]:e.find(e=>{var t,n,i,o;return(null===(t=e.getParent())||void 0===t?void 0:t.date.getTime())===(null===(n=l)||void 0===n?void 0:n.getTime())&&(null===(i=e.getParent())||void 0===i?void 0:i.author.name)===u&&(!h||(null===(o=e.section)||void 0===o?void 0:o.anchor.startsWith(h)))});if(!m)a=Object(d.f)(r,c)}if(m)setTimeout(()=>{m.scrollTo(!1,e.pushState)});if(e.sectionAnchor){const t=g.a.getByAnchor(e.sectionAnchor);if(t){if(e.pushState)history.pushState(history.state,"","#"+t.anchor);setTimeout(()=>{t.$elements.first().cdScrollTo("top",!1)})}}if(cd.a.state.isFirstRun&&cd.a.state.isPageActive&&n){if(!(m||cd.a.config.idleFragments.includes(n)||n.startsWith("/media/")||$(":target").length||$(`a[name="${o}"]`).length||$(`*[id="${o}"]`).length||$(`a[name="${i}"]`).length||$(`*[id="${i}"]`).length))yield Object(E.a)(n,r,c)}}))).apply(this,arguments)}function U(e,t){return Y.apply(this,arguments)}function Y(){return(Y=o()((function*(e,t){let n,i;try{({visits:n,currentPageVisits:i}=yield e)}catch(e){console.warn("Couldn't load the settings from the server.",e);return}if(i.length>=1)cd.a.g.previousVisitUnixTime=Number(i[i.length-1]);const o=Math.floor(Date.now()/1e3);for(let e=i.length-1;e>=0;e--)if(i[e]<o-60*cd.a.g.HIGHLIGHT_NEW_COMMENTS_INTERVAL||t.markAsRead){i.splice(0,e);break}let a=!1;if(i.length){cd.a.comments.forEach(e=>{e.isNew=!1;e.isSeen=!0;if(!e.date)return;const n=Math.floor(e.date.getTime()/1e3);if(n<=o&&o<n+60)a=!0;if(n+60>i[0]){var s;e.isNew=!0;e.isSeen=(n+60<=i[i.length-1]||e.isOwn)&&!(null!==(s=t.unseenCommentAnchors)&&void 0!==s&&s.some(t=>t===e.anchor))}});s.a.configureAndAddLayers(cd.a.comments.filter(e=>e.isNew));y.a.addCommentCount();const e=cd.a.comments.filter(e=>!1===e.isSeen);y.a.addNewComments(s.a.groupBySection(e),t)}i.push(String(o+60*a));Object(T.f)(n);s.a.registerSeen();b.a.fill();mw.hook("convenientDiscussions.newCommentsHighlighted").fire(cd.a)}))).apply(this,arguments)}function W(){const e=(cd.a.debug.timerTotal["main code"]+cd.a.debug.timerTotal["final code and rendering"])/cd.a.comments.length;cd.a.debug.logAndResetTimer("total time");console.debug("number of comments: "+cd.a.comments.length);console.debug("per comment: "+e.toFixed(2));cd.a.debug.logAndResetEverything()}function q(){return G.apply(this,arguments)}function G(){return(G=o()((function*(e={},t,n){var i;if(cd.a.state.isFirstRun)cd.a.debug.stopTimer("loading data");cd.a.debug.startTimer("preparations");yield x(e,t);if(cd.a.state.isFirstRun)Object(u.P)(null,n);cd.a.debug.stopTimer("preparations");cd.a.debug.startTimer("main code");const o=mw.config.get("wgArticleId");cd.a.state.isPageActive=Boolean(o&&!cd.a.page.isArchivePage()&&Object(E.h)());const a=cd.a.state.isPageActive||!o;cd.a.state.isPageFirstParsed=cd.a.state.isFirstRun||e.wasPageCreated;let c,l,d;if(o){c=Object(T.d)(!0,e);c.catch(e=>{console.warn("Couldn't load the settings from the server.",e)});if(cd.a.state.isPageActive)l=Object(T.c)(!0);mw.hook("convenientDiscussions.beforeParse").fire(cd.a);O();N();cd.a.g.areThereLtrRtlMixes=Boolean(document.querySelector(".sitedir-ltr .mw-content-rtl, .sitedir-rtl .mw-content-ltr"));cd.a.debug.startTimer("process comments");d=new f({CommentClass:s.a,SectionClass:g.a,childElementsProp:"children",document:document,follows:(e,t)=>Boolean(t.compareDocumentPosition(e)&Node.DOCUMENT_POSITION_FOLLOWING),getAllTextNodes:S,getElementByClassName:(e,t)=>e.querySelector("."+t)});d.removeDtMarkup();try{I(d)}catch(e){console.error(e)}cd.a.debug.stopTimer("process comments")}let h;if(cd.a.g.isEnabledInQuery||!cd.a.state.isFirstRun||cd.a.comments.length||(null===(i=cd.a.g.PAGE_WHITELIST_REGEXP)||void 0===i?void 0:i.test(cd.a.page.name))||$("#ca-addsection").length){if(o){cd.a.debug.startTimer("process sections");L(d,c);cd.a.debug.stopTimer("process sections")}if(e.html){cd.a.debug.startTimer("laying out HTML");cd.a.g.$content.children(e.wasPageCreated?".noarticletext, .warningbox":".mw-parser-output").remove();cd.a.g.$content.prepend(cd.a.g.$root);cd.a.debug.stopTimer("laying out HTML")}const t=M();if(a){j();R()}if(cd.a.state.isPageActive)if(!b.a.isMounted())b.a.mount();else b.a.reset();else if(b.a.isMounted())b.a.unmount();cd.a.debug.stopTimer("main code");cd.a.debug.startTimer("final code and rendering");if(o){_();s.a.reviewHighlightables();s.a.reformatComments();Object(u.N)()}if(a){Object(E.l)(e.isPageReloadedExternally);try{const e=new mw.Uri,n=e.query;if("new"===n.section||Number(n.cdaddtopic)||t){r.a.createAddSectionForm(void 0,void 0,t);delete n.action;delete n.section;delete n.cdaddtopic;history.replaceState(history.state,"",e.toString())}}catch(e){}if(cd.a.state.isPageFirstParsed){const e=mw.user.options.get("editondblclick")||mw.user.options.get("editsectiononrightclick");Object(C.a)("commentForms",()=>{Object(E.m)(!0);return mw.user.options.get("useeditwarning")&&(r.a.getLastActiveAltered()||e&&cd.a.commentForms.length)})}}if(o){const t=cd.a.comments.filter(e=>e.isOwn||e.isLineGapped);s.a.configureAndAddLayers(t);p.a.init();B(e);if(cd.a.state.isPageActive){U(l,e);w.a.init(l,e)}if(cd.a.state.isPageFirstParsed){v.a.mount();if(!cd.a.settings.reformatComments)$(document).on("mousemove mouseover",s.a.highlightHovered);$(document).on("scroll visibilitychange",C.d);$(window).on("resize orientationchange",C.e).on("hashchange",C.c);mw.hook("wikipage.content").add(H);let e=!1;const t=()=>{const t=cd.a.g.floatingElements.map(u.q);s.a.redrawLayersIfNecessary(!1,!1,t);const n=()=>{p.a.updateLines(t);$(document).off("mousemove",n);e=!1};if(!e&&cd.a.settings.enableThreads){$(document).on("mousemove",n);e=!0}};setInterval(()=>{t()},1e3);new MutationObserver(e=>{const n=/^cd-comment(-underlay|-overlay|Layers)/;if(!e.every(e=>n.test(e.target.className)))t()}).observe(cd.a.g.$content.get(0),{attributes:!0,childList:!0,subtree:!0})}else v.a.update();if(cd.a.settings.reformatComments&&cd.a.comments.length){const e="ru.wikipedia.org"===location.hostname?"global.userlinks":"wikipage.content";mw.hook(e).fire($(".cd-comment-author-wrapper"))}}if(a)$(document).on("keydown",C.b);h=cd.a.state.isFirstRun&&cd.a.state.isPageActive&&"<unregistered>"!==cd.a.user.name;mw.hook("convenientDiscussions.pageReady").fire(cd.a);if(cd.a.state.isFirstRun)mw.hook("convenientDiscussions.pageReadyFirstTime").fire(cd.a);if(cd.a.state.isPageFirstParsed)mw.hook("wikipage.content").add(E.e);Object(E.d)();cd.a.g.rootElement.getBoundingClientRect();cd.a.debug.stopTimer("final code and rendering")}else{cd.a.debug.stopTimer("main code");cd.a.state.isPageActive=!1;const e=$("#footer-places-togglecd a");if(e.length)e.attr("href",e.attr("href").replace(/0$/,"1")).text(cd.a.s("footer-runcd"));Object(E.d)()}cd.a.debug.stopTimer("total time");W();if(h){if(cd.a.g.isDtReplyToolEnabled)Object(E.r)();const e=yield Object(E.s)();yield Object(E.b)();if(e){Object(E.k)();return}}}))).apply(this,arguments)}},function(e){e.exports=JSON.parse('{"aeb-arab":"\u0660\u0661\u0662\u0663\u0664\u0665\u0666\u0667\u0668\u0669","anp":"\u0966\u0967\u0968\u0969\u096a\u096b\u096c\u096d\u096e\u096f","ar":"\u0660\u0661\u0662\u0663\u0664\u0665\u0666\u0667\u0668\u0669","as":"\u09e6\u09e7\u09e8\u09e9\u09ea\u09eb\u09ec\u09ed\u09ee\u09ef","azb":"\u06f0\u06f1\u06f2\u06f3\u06f4\u06f5\u06f6\u06f7\u06f8\u06f9","bcc":"\u06f0\u06f1\u06f2\u06f3\u06f4\u06f5\u06f6\u06f7\u06f8\u06f9","bgn":"\u06f0\u06f1\u06f2\u06f3\u06f4\u06f5\u06f6\u06f7\u06f8\u06f9","bho":"\u0966\u0967\u0968\u0969\u096a\u096b\u096c\u096d\u096e\u096f","bn":"\u09e6\u09e7\u09e8\u09e9\u09ea\u09eb\u09ec\u09ed\u09ee\u09ef","bo":"\u0f20\u0f21\u0f22\u0f23\u0f24\u0f25\u0f26\u0f27\u0f28\u0f29","bpy":"\u09e6\u09e7\u09e8\u09e9\u09ea\u09eb\u09ec\u09ed\u09ee\u09ef","bqi":"\u06f0\u06f1\u06f2\u06f3\u06f4\u06f5\u06f6\u06f7\u06f8\u06f9","ckb":"\u0660\u0661\u0662\u0663\u0664\u0665\u0666\u0667\u0668\u0669","dty":"\u0966\u0967\u0968\u0969\u096a\u096b\u096c\u096d\u096e\u096f","dz":"\u0f20\u0f21\u0f22\u0f23\u0f24\u0f25\u0f26\u0f27\u0f28\u0f29","fa":"\u06f0\u06f1\u06f2\u06f3\u06f4\u06f5\u06f6\u06f7\u06f8\u06f9","glk":"\u06f0\u06f1\u06f2\u06f3\u06f4\u06f5\u06f6\u06f7\u06f8\u06f9","gom-deva":"\u0966\u0967\u0968\u0969\u096a\u096b\u096c\u096d\u096e\u096f","gu":"\u0ae6\u0ae7\u0ae8\u0ae9\u0aea\u0aeb\u0aec\u0aed\u0aee\u0aef","hi":"\u0966\u0967\u0968\u0969\u096a\u096b\u096c\u096d\u096e\u096f","kjp":"\u1040\u1041\u1042\u1043\u1044\u1045\u1046\u1047\u1048\u1049","kk-arab":"\u06f0\u06f1\u06f2\u06f3\u06f4\u06f5\u06f6\u06f7\u06f8\u06f9","km":"\u17e0\u17e1\u17e2\u17e3\u17e4\u17e5\u17e6\u17e7\u17e8\u17e9","kn":"\u0ce6\u0ce7\u0ce8\u0ce9\u0cea\u0ceb\u0cec\u0ced\u0cee\u0cef","ks-arab":"\u0660\u0661\u0662\u0663\u0664\u0665\u0666\u0667\u0668\u0669","ks-deva":"\u0966\u0967\u0968\u0969\u096a\u096b\u096c\u096d\u096e\u096f","ks":"\u0660\u0661\u0662\u0663\u0664\u0665\u0666\u0667\u0668\u0669","ku-arab":"\u0660\u0661\u0662\u0663\u0664\u0665\u0666\u0667\u0668\u0669","lki":"\u06f0\u06f1\u06f2\u06f3\u06f4\u06f5\u06f6\u06f7\u06f8\u06f9","lo":"\u0ed0\u0ed1\u0ed2\u0ed3\u0ed4\u0ed5\u0ed6\u0ed7\u0ed8\u0ed9","lrc":"\u06f0\u06f1\u06f2\u06f3\u06f4\u06f5\u06f6\u06f7\u06f8\u06f9","luz":"\u06f0\u06f1\u06f2\u06f3\u06f4\u06f5\u06f6\u06f7\u06f8\u06f9","lzh":"\u3007\u4e00\u4e8c\u4e09\u56db\u4e94\u516d\u4e03\u516b\u4e5d","mai":"\u0966\u0967\u0968\u0969\u096a\u096b\u096c\u096d\u096e\u096f","mnw":"\u1040\u1041\u1042\u1043\u1044\u1045\u1046\u1047\u1048\u1049","mr":"\u0966\u0967\u0968\u0969\u096a\u096b\u096c\u096d\u096e\u096f","my":"\u1040\u1041\u1042\u1043\u1044\u1045\u1046\u1047\u1048\u1049","mzn":"\u06f0\u06f1\u06f2\u06f3\u06f4\u06f5\u06f6\u06f7\u06f8\u06f9","ne":"\u0966\u0967\u0968\u0969\u096a\u096b\u096c\u096d\u096e\u096f","new":"\u0966\u0967\u0968\u0969\u096a\u096b\u096c\u096d\u096e\u096f","nqo":"\u07c0\u07c1\u07c2\u07c3\u07c4\u07c5\u07c6\u07c7\u07c8\u07c9","or":"\u0b66\u0b67\u0b68\u0b69\u0b6a\u0b6b\u0b6c\u0b6d\u0b6e\u0b6f","pi":"\u0966\u0967\u0968\u0969\u096a\u096b\u096c\u096d\u096e\u096f","ps":"\u06f0\u06f1\u06f2\u06f3\u06f4\u06f5\u06f6\u06f7\u06f8\u06f9","sa":"\u0966\u0967\u0968\u0969\u096a\u096b\u096c\u096d\u096e\u096f","sat":"\u1c50\u1c51\u1c52\u1c53\u1c54\u1c55\u1c56\u1c57\u1c58\u1c59","sdh":"\u06f0\u06f1\u06f2\u06f3\u06f4\u06f5\u06f6\u06f7\u06f8\u06f9","skr-arab":"\u0660\u0661\u0662\u0663\u0664\u0665\u0666\u0667\u0668\u0669","tcy":"\u0ce6\u0ce7\u0ce8\u0ce9\u0cea\u0ceb\u0cec\u0ced\u0cee\u0cef"}')},function(e){e.exports=JSON.parse('["az","bn","de","diq","el","en","es","fa","fr","he","ia","it","ja","ko","lb","mk","nl","pms","pt-br","ru","sk","sv","th","tr","uk","zh-hans","zh-hant"]')},function(e){e.exports=JSON.parse('{"commons.wikimedia.org":"https://commons.wikimedia.org/w/index.php?title=User:Jack_who_built_the_house/convenientDiscussions-commonsConfig.js&action=raw&ctype=text/javascript","en.wikipedia.org":"http://localhost:9000/convenientDiscussions-config/w-en.js","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","ru.wikipedia.org":"http://localhost:9000/convenientDiscussions-config/w-ru.js","ru.wikipedia.org-test":"https://ru.wikipedia.org/w/index.php?title=%D0%A3%D1%87%D0%B0%D1%81%D1%82%D0%BD%D0%B8%D0%BA:Jack_who_built_the_house/convenientDiscussions-test.js&action=raw&ctype=text/javascript"}')},function(e,t,n){var i=n(21),o=n(53);if("string"==typeof(o=o.__esModule?o.default:o))o=[[e.i,o,""]];var a={insert:"head",singleton:!1};i(o,a);e.exports=o.locals||{}},function(e,t,n){"use strict";e.exports=function(e,t){var i=n(45),o="",a="",s="";o=e.toString();var r=i("HTML_ENTITIES",t);if(!1===r)return!1;delete r["&"];r["&"]="&amp;";for(s in r){a=r[s];o=o.split(a).join(s)}return o=o.split("&#039;").join("'")}},function(e,t,n){e.exports=function(){"use strict";var e={year:0,month:1,day:2,hour:3,minute:4,second:5},t={};return function(n,i,o){var a,s=function(e,n,i){void 0===i&&(i={});var o=new Date(e);return function(e,n){void 0===n&&(n={});var i=n.timeZoneName||"short",o=e+"|"+i,a=t[o];return a||(a=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:i}),t[o]=a),a}(n,i).formatToParts(o)},r=function(t,n){for(var i=s(t,n),a=[],r=0;r<i.length;r+=1){var c=i[r],l=c.type,u=c.value,d=e[l];d>=0&&(a[d]=parseInt(u,10))}var h=a[3],m=24===h?0:h,f=a[0]+"-"+a[1]+"-"+a[2]+" "+m+":"+a[4]+":"+a[5]+":000",g=+t;return(o.utc(f).valueOf()-(g-=g%1e3))/6e4},c=i.prototype;c.tz=function(e,t){void 0===e&&(e=a);var n=this.utcOffset(),i=this.toDate(),s=i.toLocaleString("en-US",{timeZone:e}),r=Math.round((i-new Date(s))/1e3/60),c=o(s).$set("millisecond",this.$ms).utcOffset(15*-Math.round(i.getTimezoneOffset()/15)-r,!0);if(t){var l=c.utcOffset();c=c.add(n-l,"minute")}return c.$x.$timezone=e,c},c.offsetName=function(e){var t=this.$x.$timezone||o.tz.guess(),n=s(this.valueOf(),t,{timeZoneName:e}).find((function(e){return"timezonename"===e.type.toLowerCase()}));return n&&n.value};var l=c.startOf;c.startOf=function(e,t){if(!this.$x||!this.$x.$timezone)return l.call(this,e,t);var n=o(this.format("YYYY-MM-DD HH:mm:ss:SSS"));return l.call(n,e,t).tz(this.$x.$timezone,!0)},o.tz=function(e,t,n){var i=n&&t,s=n||t||a,c=r(+o(),s);if("string"!=typeof e)return o(e).tz(s);var l=function(e,t,n){var i=e-60*t*1e3,o=r(i,n);if(t===o)return[i,t];var a=r(i-=60*(o-t)*1e3,n);return o===a?[i,o]:[e-60*Math.min(o,a)*1e3,Math.max(o,a)]}(o.utc(e,i).valueOf(),c,s),u=l[0],d=l[1],h=o(u).utcOffset(d);return h.$x.$timezone=s,h},o.tz.guess=function(){return Intl.DateTimeFormat().resolvedOptions().timeZone},o.tz.setDefault=function(e){a=e}}}()},function(e,t,n){e.exports=function(){"use strict";var e="minute",t=/[+-]\d\d(?::?\d\d)?/g,n=/([+-]|\d\d)/g;return function(i,o,a){var s=o.prototype;a.utc=function(e){var t={date:e,utc:!0,args:arguments};return new o(t)},s.utc=function(t){var n=a(this.toDate(),{locale:this.$L,utc:!0});return t?n.add(this.utcOffset(),e):n},s.local=function(){return a(this.toDate(),{locale:this.$L,utc:!1})};var r=s.parse;s.parse=function(e){e.utc&&(this.$u=!0),this.$utils().u(e.$offset)||(this.$offset=e.$offset),r.call(this,e)};var c=s.init;s.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=s.utcOffset;s.utcOffset=function(i,o){var a=this.$utils().u;if(a(i))return this.$u?0:a(this.$offset)?l.call(this):this.$offset;if("string"==typeof i&&null===(i=function(e){void 0===e&&(e="");var i=e.match(t);if(!i)return null;var o=(""+i[0]).match(n)||["-",0,0],a=o[0],s=60*+o[1]+ +o[2];return 0===s?0:"+"===a?s:-s}(i)))return this;var s=Math.abs(i)<=16?60*i:i,r=this;if(o)return r.$offset=s,r.$u=0===i,r;if(0!==i){var c=this.$u?this.toDate().getTimezoneOffset():-1*this.utcOffset();(r=this.local().add(s+c,e)).$offset=s,r.$x.$localOffset=c}else r=this.utc();return r};var u=s.format;s.format=function(e){var t=e||(this.$u?"YYYY-MM-DDTHH:mm:ss[Z]":"");return u.call(this,t)},s.valueOf=function(){var e=this.$utils().u(this.$offset)?0:this.$offset+(this.$x.$localOffset||(new Date).getTimezoneOffset());return this.$d.valueOf()-6e4*e},s.isUTC=function(){return!!this.$u},s.toISOString=function(){return this.toDate().toISOString()},s.toString=function(){return this.toDate().toUTCString()};var d=s.toDate;s.toDate=function(e){return"s"===e&&this.$offset?a(this.format("YYYY-MM-DD HH:mm:ss:SSS")).toDate():d.call(this)};var h=s.diff;s.diff=function(e,t,n){if(e&&this.$u===e.$u)return h.call(this,e,t,n);var i=this.local(),o=a(e).local();return h.call(i,o,t,n)}}}()},function(e,t,n){"use strict";e.exports=function(e,t,n,i){var o=self||window;try{try{var a;try{a=new o.Blob([e])}catch(t){(a=new(o.BlobBuilder||o.WebKitBlobBuilder||o.MozBlobBuilder||o.MSBlobBuilder)).append(e);a=a.getBlob()}var s=o.URL||o.webkitURL,r=s.createObjectURL(a),c=new o[t](r,n);s.revokeObjectURL(r);return c}catch(i){return new o[t]("data:application/javascript,".concat(encodeURIComponent(e)),n)}}catch(e){if(!i)throw Error("Inline worker is not supported");return new o[t](i,n)}}},function(e,t){window.convenientDiscussions=window.convenientDiscussions||{};convenientDiscussions.i18n=convenientDiscussions.i18n||{};convenientDiscussions.i18n.en={"script-name":"Convenient Discussions","script-name-short":"CD","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","thread-tooltip":"Collapse/expand the thread","thread-expand-label-genderless":"Expand the thread ($1 {{plural:$1|comment|comments}} by {{plural:$2|}} $3)","thread-expand-label":"Expand the thread ($1 {{plural:$1|comment|comments}} by {{plural:$2|{{gender:$4|}}|{{gender:$4|}}}} $3)","thread-expand-tooltip":"Hold Ctrl 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|{{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-watch":"watch","sm-watch-tooltip":"Add the section to the watchlist. This affects notifications and bolding in the watchlist and the table of contents","sm-unwatch":"unwatch","sm-unwatch-tooltip":"Remove the section from the watchlist","sm-copylink":"#","sm-copylink-tooltip":"Copy a link","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 or re-signed.","comment-deleted-short":"Deleted or re-signed","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|{{gender:$4|}}|{{gender:$4|}}}} $3. Click to refresh the page.","section-watch-success":'Section "$1" has been added to your watchlist.',"section-unwatch-success":'Section "$1" has been removed from your watchlist.',"section-unwatch-stillwatched":'<strong>Note:</strong> you are still watching this section as it is included in the section "$1" that you watch.',"section-watch-pagenotwatched":"<strong>Note:</strong> you watch the section but not 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 watched sections list exceeds the maximum size. <span class="cd-notification-editWatchedSections">Edit the sections list</span> to fix this.',"cld-title-comment":"Copy comment link","cld-title-section":"Copy section 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-diff-history":"Edit history","cld-shortdiff":"Short diff link","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-close":"Close","copylink-copied":"The link has been copied to the clipboard.","copylink-error":"Couldn't copy the link.","thank-confirm":"Thank {{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 the topic","es-delete-subsection":"delete the subsection","es-delete-comment":"delete comment","es-delete-comment-by":"delete comment by {{gender:$2|}} $1","es-new-topic":"new topic","es-new-subsection":"new subsection","es-move-from":"move from [[$1]]","es-move-to":"move to [[$1]]","cf-headline-topic":"Subject","cf-headline-subsection":'Subject for the subsection of "$1"',"cf-comment-placeholder-replytosection":'Reply to "$1"',"cf-comment-placeholder-replytocomment":"Reply to {{gender:$2|}} $1","cf-summary-placeholder":"Edit summary","cf-summary-preview":"Edit summary preview","cf-save":"Save","cf-save-short":"Save","cf-delete-button":"Delete","cf-delete-button-short":"Delete","cf-addtopic":"Add topic","cf-addtopic-short":"Add","cf-addsubsection":"Add subsection","cf-addsubsection-short":"Add","cf-reply":"Reply","cf-reply-short":"Reply","cf-preview":"Preview","cf-preview-short":"Preview","cf-viewchanges":"View changes","cf-viewchanges-short":"Changes","cf-cancel":"Cancel","cf-cancel-short":"Cancel","cf-advanced":"Advanced","cf-settings-tooltip":"Convenient Discussions settings","cf-help":"?","cf-help-short":"?","cf-help-content":"<ul>\n<li>Type <code>$1</code> and choose a user to [[mw:Special:MyLanguage/Help:Notifications/Mention|mention]] them.</li>\n<li>Hold <b>Ctrl</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>Ctrl+Enter</b> \u2014 post</li>\n<li><b>Esc</b> \u2014 cancel</li>\n<li><b>Q</b> (<b>Ctrl+Alt+Q</b>) \u2014 quote the selected text</li>\n</ul>\n<p>[[c:Special:MyLanguage/User:Jack who built the house/Convenient Discussions|Script documentation]]</p>',"cf-strikethrough-tooltip":"Strikethrough","cf-strikethrough-placeholder":"Struckthrough text","cf-code-tooltip":"Code","cf-code-placeholder":"Code","cf-codeblock-tooltip":"Code block","cf-codeblock-placeholder":"Code block","cf-quote-tooltip":"Quote the selected text","cf-quote-placeholder":"Quoted text","cf-mention-tooltip":"Mention a user. Hold Ctrl 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":"Watch this topic","cf-watchsection-subsection":"Watch this subsection","cf-watchsection-tooltip":"Add this section to the watchlist. This affects notifications and bolding in the watchlist and the table of contents","cf-omitsignature":"Omit signature","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":"<code><nowiki><pre></"+String("")+"nowiki></code> tags can break the layout\u2014better use <code><nowiki><syntaxhighlight></"+String("")+"nowiki></code>.","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 send a notification, you may link the user in the edit summary.","cf-reaction-mention-nosignature":"Since you've opted not to include a signature in your comment, a [[mw:Special:MyLanguage/Help:Notifications/Mention#How to mention another editor and trigger a notification|mention notification]] will not be sent. To send a notification, you may link the user in the edit summary.","cf-notice-nochanges":"No changes.","cf-notice-editconflict-retrying":"Trying again\u2026","cf-error-getpagecode":"Couldn't get the page code.","cf-error-closed":"The discussion is closed.","cf-error-findplace":"Couldn't find the proper place in the code to insert the comment into.","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-list":"Remove lists from the comment.","cf-error-numberedlist-table":"Remove tables from the comment.","cf-error-delete-repliestocomment":"Can't delete the comment because it has replies.","cf-error-delete-repliesinsection":"Can't delete the section because it has replies.","cf-error-preview":"Couldn't preview the comment.","cf-error-viewchanges":"Couldn't get the changes.","cf-error-couldntedit":"The page may not have been edited.","cf-error-pagedoesntexist":"The page doesn't exist.","cf-error-formconflict":'There already is an "Add topic" form of a different type open on the page. Close that form to open this one.',"cf-error-othersubmitted":"Can't submit the form because another form is being submitted right now.","cf-confirm-noheadline-topic":"You didn't enter the topic subject/headline.","cf-confirm-noheadline-subsection":"You didn't enter the section subject/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","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 watch? 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 switched on, but the site is not allowed to send them. Grant a permission to the site to receive notifications or deny to prevent this message from showing up again.","deadanchor-section-lead":'Couldn\'t find the section "$1" on the page.',"deadanchor-section-finding":"Finding archived section\u2026","deadanchor-section-exactmatch":'Looks like the section "$1" has been archived. [[$2|See archived section]] (or [$3 search in the archive]).',"deadanchor-section-inexactmatch":'Looks like the section "$1" has been archived. [$2 Search in the archive].',"deadanchor-section-notfound":"[$1 Searching for it in the archive] also did not return any results. It may have been removed or renamed, or you may have followed a malformed link.","deadanchor-section-similar":'However, a section with the similar name "[[$1|$2]]" was found on this page.',"deadanchor-comment-lead":"Couldn't find the comment on the page.","deadanchor-comment-finding":"Finding archived comment\u2026","deadanchor-comment-exactmatch":"Looks like the comment has been archived. [[$1|See archived comment]] (or [$2 search in the archive]).","deadanchor-comment-inexactmatch":"Looks like the comment has been archived. [$1 Search in the archive].","deadanchor-comment-notfound":"[$1 Searching for it in the archive] also did not return any results. It may be signed with other date or may have been removed.","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/headline","rd-comment":"Comment","rd-summary":"Edit summary","rd-close":"Close","rc-suggestion":"<p>The new version of 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>Also, see the settings for various new features, such as customizable formatting of timestamps (which, by the way, are now displayed in the timezone set in your wiki preferences by default).</p>","rc-suggestion-yes":"Enable the new formatting","rc-suggestion-no":"Keep the usual formatting","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":"Can't scroll to it; scrolled to the thread instead.","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 Ctrl to mark all shown comments as read","toc-commentcount-full":"$1 {{plural:$1|comment|comments}}","toc-commentcount-new-full":"$1 {{plural:$1|new}}","toc-more":"\u2026$1 more","toc-watched":"You watch this section","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","sd-title":"Convenient Discussions settings","sd-save":"Save","sd-reload":"Reload","sd-page-talkpage":"Talk page","sd-page-commentform":"Comment form","sd-page-timestamps":"Timestamps","sd-page-notifications":"Notifications","sd-page-dataremoval":"Data removal","sd-close-confirm":"The settings were not saved. Are you sure you want to close the window?","sd-saved":"The settings have been saved successfully. Reload the page to apply them.","sd-reset":"Reset settings (in all sections)","sd-reset-confirm":'Are you sure you want to reset the settings? (Click "{{int:convenient-discussions-sd-save}}" after resetting.)',"sd-removedata":"Remove all script data","sd-removedata-description":"Delete the data that Convenient Discussions has collected: your settings, talk page last visits, watched sections, and drafts of unsent comments","sd-removedata-help":"Note that everything except the global settings is removed for the current wiki only. If you have used Convenient Discussions on other wikis and you want to remove data on them, you will have to remove it on those wikis. See [[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.","sd-removedata-confirm":"This will permanently delete your settings, talk page last visits, watched sections, and drafts of unsent comments. Do you want to proceed?","sd-dataremoved":"Your data has been successfully removed.","sd-error-removedata":"Couldn't remove the data on the server.","sd-localsetting":"<i>This setting is individual for each wiki.</i>","sd-alloweditotherscomments":"Show a link to edit other users' comments","sd-alwaysexpandadvanced":'Expand the "{{int:convenient-discussions-cf-advanced}}" section when replying',"sd-autocompletetypes":"Enable autocomplete for","sd-autocompletetypes-mentions":"mentions","sd-autocompletetypes-commentlinks":"comment links","sd-autocompletetypes-wikilinks":"wikilinks","sd-autocompletetypes-templates":"templates","sd-autocompletetypes-tags":"tags","sd-autopreview":"Preview the comment as I type","sd-desktopnotifications":"Desktop notifications","sd-desktopnotifications-radio-all":"Notify me about replies to my comments and comments in sections that I watch","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. To receive them, you must grant a premission to $1.","sd-enablethreads":"Enable collapsible threads","sd-hidetimezone":"Hide the time zone","sd-insertbuttons":"Text insert buttons","sd-insertbuttons-multiselect-placeholder":"Add a button","sd-insertbuttons-help":"Use <code>+</code> to specify a place where the caret should be put after inserting the text; for example, <code><nowiki>{{+}}</"+String("")+"nowiki></code>. Use <code>;</code> to specify displayed text if you want it to be different from the one inserted; for example, <code><nowiki><code>+</code>;<code /></"+String("")+"nowiki></code>. Use <code><nowiki>\\</"+String("")+"nowiki></code> before the aforementioned characters to insert them as is; for example, <code><nowiki>2\\+2</"+String("")+"nowiki></code>. The buttons can be dragged and dropped.","sd-notifications":"Ordinary notifications","sd-notifications-radio-all":"Notify me about replies to my comments and comments in sections that I watch","sd-notifications-radio-tome":"Notify me about replies to my comments only","sd-notifications-radio-none":"Don't notify me","sd-notifications-help":"Notifications are small popups in the top right corner of the page.","sd-notificationsblacklist":"Don't notify about comments of these users","sd-notificationsblacklist-multiselect-placeholder":"Add a user","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-modifytoc":"Modify the table of contents","sd-modifytoc-help":"Show new comments and sections and highlight watched sections.","sd-usebackgroundhighlighting":"Use background highlighting (not just a colored marker) for new and own comments","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-useuitime":"Show comment timestamps in the timezone set in my wiki preferences","sd-usetemplatedata":"Use TemplateData in templates autocomplete","sd-usetemplatedata-help":"Hold Shift while choosing a template from the autocomplete menu to insert the template's required and suggested parameters as well.","sd-usetopicsubscriptions":"Notify me about comments in watched sections using [[:en:Help:Notifications|the standard notifications interface]]","sd-usetopicsubscriptions-help":"Note: This works only for 2-level sections (<code>==</code>). If you enable this, you won't be able to watch subsections.","sd-watchonreply":"Watch pages that I comment on","sd-watchsectiononreply":"Watch sections that I comment in","sd-watchsectiononreply-help":"This affects notifications and bolding in the watchlist and the table of contents.","ewsd-title":"Edit watched sections list","ewsd-save":"Save","ewsd-saved":"The watched sections list has been successfully saved.","ewsd-error-maxsize":"Couldn't update the settings: the size of the watched sections list exceeds the maximum size. Reduce the size of the list to fix this.","ewsd-error-processing":"An error occurred while processing the watched sections list.","ewsd-close-confirm":"The watched sections list wasn't saved. Are you sure you want to close the window?","msd-title":"Move topic","msd-move":"Move","msd-targetpage":"Enter the name of the discussion page to move the topic to:","msd-keeplink":"Keep a link to the new location","msd-summaryending":"Edit summary (will be added to the standard one)","msd-error-wrongpage":"Wrong page.","msd-error-sourcepagedeleted":"The current page was deleted.","msd-error-invalidpagename":"Invalid page name.","msd-error-editconflict-retry":'Just click "{{int:ooui-dialog-process-retry}}".',"msd-error-editingtargetpage":"Couldn't edit the target page.","msd-error-editingsourcepage":"Couldn't edit the source page. You will have to edit it manually.","msd-moved":"The topic has been successfully moved. You may go to [[$1|the page where the topic was moved to]].","msd-bottom":"The code may be different if the page would be updated while the window is idle.","move-sourcepagecode":"''Moved to [[$1]]. $2''","move-targetpagecode":"''Moved from [[$1]]. $2''","error-loaddata":"{{int:convenient-discussions-script-name}}: Couldn't load the data required by the script.","error-needreloadpage":'API error. Please <span class="cd-notification-reloadPage">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":"Couldn't load the settings from the server.","error-settings-save":"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":"Network error.","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 locate the comment in the code. This may be caused by the complexity of the comment code, the script flaw, or the fact that the comment was deleted or heavily edited. You can try to <span class="cd-message-editSection">[$1 edit the source the standard way]</span> or <span class="cd-message-reloadPage">reload the page</span>.',"error-locatesection":'Couldn\'t locate the section in the code. This may be caused by the complexity of the section\'s first comment code, the script flaw, or the fact that the section was deleted. You can try to <span class="cd-message-editPage">[$1 edit the page source the standard way]</span> or <span class="cd-message-reloadPage">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] for yourself.","error-elementhidden":"The element is hidden. Can't scroll to it.","error-purgecache":"Couldn't purge the cache of this page.","error-anoneditwatning":"<strong>You are not logged in.</strong> Your IP address will be publicly visible if you make any edits.","discussiontools-incompatible":'Convenient Discussions is incompatible with DiscussionTools. Please <b><span class="cd-notification-disabledt">[[Special:Preferences#mw-prefsection-betafeatures|disable]]</span></b> DiscussionTools to make Convenient Discussions work correctly.',"discussiontools-disabled":'DiscussionTools has been successfully disabled. <span class="cd-notification-refresh">Click to refresh the page</span>.',"wl-button-switchrelevant-tooltip":"Show only comments in sections that I watch 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 sections that I watch","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 watching this section",bullet:"<b>\u2022</b>","dot-separator":"\xa0<b>\xb7</b> ",ellipsis:"\u2026","loading-ellipsis":"Loading\u2026",addtopic:"Add topic","addtopicbutton-tooltip":"Open in a new tab to create a new topic on the standard page, not in Convenient Discussions",copy:"Copy"}},function(e,t,n){"use strict";e.exports=function(e,t){var n,i,o,a={},s={},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";o=!isNaN(t)?c[t]:t?t.toUpperCase():"ENT_COMPAT";if("HTML_SPECIALCHARS"!==i&&"HTML_ENTITIES"!==i)throw new Error("Table: "+i+" not supported");a[38]="&amp;";if("HTML_ENTITIES"===i){a[160]="&nbsp;";a[161]="&iexcl;";a[162]="&cent;";a[163]="&pound;";a[164]="&curren;";a[165]="&yen;";a[166]="&brvbar;";a[167]="&sect;";a[168]="&uml;";a[169]="&copy;";a[170]="&ordf;";a[171]="&laquo;";a[172]="&not;";a[173]="&shy;";a[174]="&reg;";a[175]="&macr;";a[176]="&deg;";a[177]="&plusmn;";a[178]="&sup2;";a[179]="&sup3;";a[180]="&acute;";a[181]="&micro;";a[182]="&para;";a[183]="&middot;";a[184]="&cedil;";a[185]="&sup1;";a[186]="&ordm;";a[187]="&raquo;";a[188]="&frac14;";a[189]="&frac12;";a[190]="&frac34;";a[191]="&iquest;";a[192]="&Agrave;";a[193]="&Aacute;";a[194]="&Acirc;";a[195]="&Atilde;";a[196]="&Auml;";a[197]="&Aring;";a[198]="&AElig;";a[199]="&Ccedil;";a[200]="&Egrave;";a[201]="&Eacute;";a[202]="&Ecirc;";a[203]="&Euml;";a[204]="&Igrave;";a[205]="&Iacute;";a[206]="&Icirc;";a[207]="&Iuml;";a[208]="&ETH;";a[209]="&Ntilde;";a[210]="&Ograve;";a[211]="&Oacute;";a[212]="&Ocirc;";a[213]="&Otilde;";a[214]="&Ouml;";a[215]="&times;";a[216]="&Oslash;";a[217]="&Ugrave;";a[218]="&Uacute;";a[219]="&Ucirc;";a[220]="&Uuml;";a[221]="&Yacute;";a[222]="&THORN;";a[223]="&szlig;";a[224]="&agrave;";a[225]="&aacute;";a[226]="&acirc;";a[227]="&atilde;";a[228]="&auml;";a[229]="&aring;";a[230]="&aelig;";a[231]="&ccedil;";a[232]="&egrave;";a[233]="&eacute;";a[234]="&ecirc;";a[235]="&euml;";a[236]="&igrave;";a[237]="&iacute;";a[238]="&icirc;";a[239]="&iuml;";a[240]="&eth;";a[241]="&ntilde;";a[242]="&ograve;";a[243]="&oacute;";a[244]="&ocirc;";a[245]="&otilde;";a[246]="&ouml;";a[247]="&divide;";a[248]="&oslash;";a[249]="&ugrave;";a[250]="&uacute;";a[251]="&ucirc;";a[252]="&uuml;";a[253]="&yacute;";a[254]="&thorn;";a[255]="&yuml;"}if("ENT_NOQUOTES"!==o)a[34]="&quot;";if("ENT_QUOTES"===o)a[39]="&#39;";a[60]="&lt;";a[62]="&gt;";for(n in a)if(a.hasOwnProperty(n))s[String.fromCharCode(n)]=a[n];return s}},function(e,t,n){"use strict";n.r(t);var i=n(2),o=n.n(i),a=n(20),s=n.n(a),r=n(0),c=n(17),l=n(1),u=n(6),d=n(5),h=n(10),m=n(9),f=n(4);class SettingsDialog extends OO.ui.ProcessDialog{constructor(){super();this.preparatoryRequests=[Object(h.b)({omitLocal:!0}),mw.loader.using("mediawiki.widgets.UsersMultiselectWidget")]}getBodyHeight(){return 600}initialize(...e){super.initialize(...e);this.pushPending();const t=$("<div>").text(r.a.s("loading-ellipsis"));this.loadingPanel=new OO.ui.PanelLayout({padded:!0,expanded:!1});this.loadingPanel.$element.append(t);this.settingsPanel=new OO.ui.PanelLayout({padded:!1,expanded:!0});const n=$("<p>").text(r.a.s("sd-saved"));this.reloadPanel=new OO.ui.PanelLayout({padded:!0,expanded:!1});this.reloadPanel.$element.append(n);const i=$("<p>").text(r.a.s("sd-dataremoved"));this.dataRemovedPanel=new OO.ui.PanelLayout({padded:!0,expanded:!1});this.dataRemovedPanel.$element.append(i);this.stackLayout=new OO.ui.StackLayout({items:[this.loadingPanel,this.settingsPanel,this.reloadPanel,this.dataRemovedPanel]});this.$body.append(this.stackLayout.$element)}getSetupProcess(e){return super.getSetupProcess(e).next(()=>{this.stackLayout.setItem(this.loadingPanel);this.actions.setMode("settings")})}getReadyProcess(e){var t=this;return super.getReadyProcess(e).next(o()((function*(){let e;try{[e]=yield Promise.all(t.preparatoryRequests)}catch(e){Object(u.f)(t,e,"error-settings-load",!1);return}t.settings=Object.assign({},r.a.settings,e);t.renderControls(t.settings);t.stackLayout.setItem(t.settingsPanel);t.bookletLayout.setPage("talkPage");t.actions.setAbilities({close:!0});r.a.g.windowManager.updateWindowSize(t);t.popPending();Object(c.a)("dialog",()=>Object(u.g)(t))})))}getActionProcess(e){var t=this;if("save"===e)return new OO.ui.Process(o()((function*(){t.pushPending();const e=t.collectSettings();try{yield Object(h.e)(e)}catch(e){Object(u.f)(t,e,"error-settings-save",!0);return}Object(c.f)("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(o()((function*(){yield Object(u.a)(t,"sd")})));else if("reset"===e)return new OO.ui.Process(o()((function*(){if(confirm(r.a.s("sd-reset-confirm"))){const e=t.bookletLayout.getCurrentPageName();t.renderControls(f.p.default);t.bookletLayout.setPage(e)}})));return super.getActionProcess(e)}createFields(e){[this.allowEditOthersCommentsField,this.allowEditOthersCommentsCheckbox]=Object(u.b)({value:"allowEditOthersComments",selected:e.allowEditOthersComments,label:r.a.s("sd-alloweditotherscomments")});[this.alwaysExpandAdvancedField,this.alwaysExpandAdvancedCheckbox]=Object(u.b)({value:"alwaysExpandAdvanced",selected:e.alwaysExpandAdvanced,label:r.a.s("sd-alwaysexpandadvanced")});const t=new OO.ui.CheckboxMultioptionWidget({data:"mentions",selected:e.autocompleteTypes.includes("mentions"),label:r.a.s("sd-autocompletetypes-mentions")}),n=new OO.ui.CheckboxMultioptionWidget({data:"commentLinks",selected:e.autocompleteTypes.includes("commentLinks"),label:r.a.s("sd-autocompletetypes-commentlinks")}),i=new OO.ui.CheckboxMultioptionWidget({data:"wikilinks",selected:e.autocompleteTypes.includes("wikilinks"),label:r.a.s("sd-autocompletetypes-wikilinks")}),o=new OO.ui.CheckboxMultioptionWidget({data:"templates",selected:e.autocompleteTypes.includes("templates"),label:r.a.s("sd-autocompletetypes-templates")}),a=new OO.ui.CheckboxMultioptionWidget({data:"tags",selected:e.autocompleteTypes.includes("tags"),label:r.a.s("sd-autocompletetypes-tags")});this.autocompleteTypesMultiselect=new OO.ui.CheckboxMultiselectWidget({items:[t,n,i,o,a],classes:["cd-autocompleteTypesMultiselect"]});this.autocompleteTypesField=new OO.ui.FieldLayout(this.autocompleteTypesMultiselect,{label:r.a.s("sd-autocompletetypes"),align:"top"});[this.autopreviewField,this.autopreviewCheckbox]=Object(u.b)({value:"autopreview",selected:e.autopreview,label:r.a.s("sd-autopreview")});[this.desktopNotificationsField,this.desktopNotificationsSelect,this.desktopNotificationsRadioAll,this.desktopNotificationsRadioNone,this.desktopNotificationsRadioToMe]=Object(u.d)({options:[{label:r.a.s("sd-desktopnotifications-radio-all"),data:"all"},{label:r.a.s("sd-desktopnotifications-radio-tome"),data:"toMe"},{label:r.a.s("sd-desktopnotifications-radio-none"),data:"none"}],selected:e.desktopNotifications,label:r.a.s("sd-desktopnotifications"),help:r.a.s("sd-desktopnotifications-help",location.hostname)});[this.enableThreadsField,this.enableThreadsCheckbox]=Object(u.b)({value:"enableThreads",selected:e.enableThreads,label:r.a.s("sd-enablethreads")});[this.hideTimezoneField,this.hideTimezoneCheckbox]=Object(u.b)({value:"hideTimezone",selected:e.hideTimezone,label:r.a.s("sd-hidetimezone")});const s=e.insertButtons.map(e=>Array.isArray(e)?e.join(";"):e);this.insertButtonsMultiselect=new OO.ui.TagMultiselectWidget({placeholder:r.a.s("sd-insertbuttons-multiselect-placeholder"),allowArbitrary:!0,inputPosition:"outline",tagLimit:100,selected:s});this.insertButtonsField=new OO.ui.FieldLayout(this.insertButtonsMultiselect,{label:r.a.s("sd-insertbuttons"),align:"top",help:Object(l.Y)(r.a.sParse("sd-insertbuttons-help")+" "+r.a.sParse("sd-localsetting")),helpInline:!0});[this.modifyTocField,this.modifyTocCheckbox]=Object(u.b)({value:"modifyToc",selected:e.modifyToc,label:r.a.s("sd-modifytoc"),help:r.a.s("sd-modifytoc-help")});[this.notificationsField,this.notificationsSelect,this.notificationsRadioAll,this.notificationsRadioNone,this.notificationsRadioToMe]=Object(u.d)({options:[{label:r.a.s("sd-notifications-radio-all"),data:"all"},{label:r.a.s("sd-notifications-radio-tome"),data:"toMe"},{label:r.a.s("sd-notifications-radio-none"),data:"none"}],selected:e.notifications,label:r.a.s("sd-notifications"),help:r.a.s("sd-notifications-help")});this.notificationsBlacklistMultiselect=new mw.widgets.UsersMultiselectWidget({placeholder:r.a.s("sd-notificationsblacklist-multiselect-placeholder"),tagLimit:100,selected:e.notificationsBlacklist});this.notificationsBlacklistField=new OO.ui.FieldLayout(this.notificationsBlacklistMultiselect,{label:r.a.s("sd-notificationsblacklist"),align:"top"});[this.notifyCollapsedThreadsField,this.notifyCollapsedThreadsCheckbox]=Object(u.b)({value:"notifyCollapsedThreads",selected:e.notifyCollapsedThreads,label:r.a.s("sd-notifycollapsedthreads")});[this.reformatCommentsField,this.reformatCommentsCheckbox]=Object(u.b)({value:"reformatComments",selected:e.reformatComments,label:r.a.s("sd-reformatcomments")});this.removeDataButton=new OO.ui.ButtonWidget({label:r.a.s("sd-removedata"),flags:["destructive"]});this.removeDataButton.connect(this,{click:"removeData"});this.removeDataField=new OO.ui.FieldLayout(this.removeDataButton,{label:r.a.s("sd-removedata-description"),align:"top",help:Object(l.Y)(r.a.sParse("sd-removedata-help"),{targetBlank:!0}),helpInline:!0});[this.showContribsLinkField,this.showContribsLinkCheckbox]=Object(u.b)({value:"showContribsLink",selected:e.showContribsLink,label:r.a.s("sd-showcontribslink"),classes:["cd-setting-indented"]});[this.showToolbarField,this.showToolbarCheckbox]=Object(u.b)({value:"showToolbar",selected:e.showToolbar,label:r.a.s("sd-showtoolbar")});this.signaturePrefixInput=new OO.ui.TextInputWidget({value:e.signaturePrefix,maxlength:100});this.signaturePrefixField=new OO.ui.FieldLayout(this.signaturePrefixInput,{label:r.a.s("sd-signatureprefix"),align:"top",help:Object(l.Y)(r.a.sParse("sd-signatureprefix-help")+" "+r.a.sParse("sd-localsetting")),helpInline:!0});const c=new Date(Date.now()-43*r.a.g.MILLISECONDS_IN_MINUTE),h=new Date(Date.now()-60*r.a.g.MILLISECONDS_IN_MINUTE*24*3.3),m=Object(d.d)(c),f=Object(d.c)(c),g=Object(d.c)(h),p=Object(d.e)(c),b=Object(d.e)(h);[this.timestampFormatField,this.timestampFormatSelect,this.timestampFormatRadioDefault,this.timestampFormatRadioImproved,this.timestampFormatRadioRelative]=Object(u.d)({options:[{label:r.a.s("sd-timestampformat-radio-default",m),data:"default"},{label:r.a.s("sd-timestampformat-radio-improved",f,g),data:"improved"},{label:r.a.s("sd-timestampformat-radio-relative",p,b),data:"relative"}],selected:e.timestampFormat,label:r.a.s("sd-timestampformat"),help:r.a.s("sd-timestampformat-help")});[this.useBackgroundHighlightingField,this.useBackgroundHighlightingCheckbox]=Object(u.b)({value:"useBackgroundHighlighting",selected:e.useBackgroundHighlighting,label:r.a.s("sd-usebackgroundhighlighting")});[this.useUiTimeField,this.useUiTimeCheckbox]=Object(u.b)({value:"useUiTime",selected:e.useUiTime,label:r.a.s("sd-useuitime")});[this.useTemplateDataField,this.useTemplateDataCheckbox]=Object(u.b)({value:"useTemplateData",selected:e.useTemplateData,label:r.a.s("sd-usetemplatedata"),help:r.a.s("sd-usetemplatedata-help")});[this.useTopicSubscriptionsField,this.useTopicSubscriptionsCheckbox]=Object(u.b)({value:"useTopicSubscriptions",selected:e.useTopicSubscriptions,label:r.a.sParse("sd-usetopicsubscriptions"),help:r.a.sParse("sd-usetopicsubscriptions-help")});[this.watchOnReplyField,this.watchOnReplyCheckbox]=Object(u.b)({value:"watchOnReply",selected:e.watchOnReply,label:r.a.s("sd-watchonreply")});[this.watchSectionOnReplyField,this.watchSectionOnReplyCheckbox]=Object(u.b)({value:"watchSectionOnReply",selected:e.watchSectionOnReply,label:r.a.s("sd-watchsectiononreply"),help:r.a.s("sd-watchsectiononreply-help")})}connectHandlers(){this.insertButtonsMultiselect.connect(this,{change:"updateStates"});this.allowEditOthersCommentsCheckbox.connect(this,{change:"updateStates"});this.alwaysExpandAdvancedCheckbox.connect(this,{change:"updateStates"});this.autocompleteTypesMultiselect.connect(this,{select:"updateStates"});this.autopreviewCheckbox.connect(this,{change:"updateStates"});this.desktopNotificationsSelect.connect(this,{select:"updateStates",choose:"onDesktopNotificationsSelectChange"});this.enableThreadsCheckbox.connect(this,{change:"updateStates"});this.hideTimezoneCheckbox.connect(this,{change:"updateStates"});this.modifyTocCheckbox.connect(this,{change:"updateStates"});this.notificationsSelect.connect(this,{select:"updateStates"});this.notificationsBlacklistMultiselect.connect(this,{change:"updateStates"});this.notifyCollapsedThreadsCheckbox.connect(this,{change:"updateStates"});this.reformatCommentsCheckbox.connect(this,{change:"updateStates"});this.showContribsLinkCheckbox.connect(this,{change:"updateStates"});this.showToolbarCheckbox.connect(this,{change:"updateStates"});this.signaturePrefixInput.connect(this,{change:"updateStates"});this.timestampFormatSelect.connect(this,{select:"updateStates"});this.useBackgroundHighlightingCheckbox.connect(this,{change:"updateStates"});this.useUiTimeCheckbox.connect(this,{change:"updateStates"});this.useTemplateDataCheckbox.connect(this,{change:"updateStates"});this.useTopicSubscriptionsCheckbox.connect(this,{change:"updateStates"});this.watchSectionOnReplyCheckbox.connect(this,{change:"updateStates"});this.watchOnReplyCheckbox.connect(this,{change:"updateStates"})}renderControls(e){this.createFields(e);this.connectHandlers();const t=new TalkPagePageLayout(this),n=new CommentFormPageLayout(this),i=new TimestampsPageLayout(this),o=new NotificationsPageLayout(this),a=new RemoveDataPageLayout(this);this.bookletLayout=new OO.ui.BookletLayout({outlined:!0});this.bookletLayout.addPages([t,n,i,o,a]);this.settingsPanel.$element.empty().append(this.bookletLayout.$element);this.updateStates()}collectSettings(){var e,t,n;const i={allowEditOthersComments:this.allowEditOthersCommentsCheckbox.isSelected(),alwaysExpandAdvanced:this.alwaysExpandAdvancedCheckbox.isSelected(),autocompleteTypes:this.autocompleteTypesMultiselect.findSelectedItemsData(),autopreview:this.autopreviewCheckbox.isSelected(),desktopNotifications:(null===(e=this.desktopNotificationsSelect.findSelectedItem())||void 0===e?void 0:e.getData())||"unknown",enableThreads:this.enableThreadsCheckbox.isSelected(),hideTimezone:this.hideTimezoneCheckbox.isSelected(),insertButtons:this.getInsertButtons(),modifyToc:this.modifyTocCheckbox.isSelected(),notifications:null===(t=this.notificationsSelect.findSelectedItem())||void 0===t?void 0:t.getData(),notificationsBlacklist:this.notificationsBlacklistMultiselect.getValue(),notifyCollapsedThreads:this.notifyCollapsedThreadsCheckbox.isSelected(),reformatComments:this.reformatCommentsCheckbox.isSelected(),showContribsLink:this.showContribsLinkCheckbox.isSelected(),showToolbar:this.showToolbarCheckbox.isSelected(),signaturePrefix:this.signaturePrefixInput.getValue(),timestampFormat:null===(n=this.timestampFormatSelect.findSelectedItem())||void 0===n?void 0:n.getData(),useBackgroundHighlighting:this.useBackgroundHighlightingCheckbox.isSelected(),useUiTime:this.useUiTimeCheckbox.isSelected(),useTemplateData:this.useTemplateDataCheckbox.isSelected(),useTopicSubscriptions:this.useTopicSubscriptionsCheckbox.isSelected(),watchOnReply:this.watchOnReplyCheckbox.isSelected(),watchSectionOnReply:this.watchSectionOnReplyCheckbox.isSelected()};i.haveInsertButtonsBeenAltered=JSON.stringify(i.insertButtons)!==JSON.stringify(f.p.default.insertButtons);return i}getInsertButtons(){return this.insertButtonsMultiselect.getValue().map(e=>{var t;const n=[];e=Object(l.x)(e,/\\[+;\\]/g,n);let[,i,o]=e.match(/^(.*?)(?:;(.+))?$/)||[];if(null!==(t=i)&&void 0!==t&&t.replace(/^ +$/,"")){i=Object(l.W)(i,n);o=o&&Object(l.W)(o,n);return[i,o].filter(l.h)}}).filter(l.h)}updateStates(){var e;this.showContribsLinkCheckbox.setDisabled(!this.reformatCommentsCheckbox.isSelected());const t=!this.autocompleteTypesMultiselect.findItemFromData("templates").isSelected();this.useTemplateDataCheckbox.setDisabled(t);const n="relative"===(null===(e=this.timestampFormatSelect.findSelectedItem())||void 0===e?void 0:e.getData());this.hideTimezoneCheckbox.setDisabled(n);const i=this.collectSettings(),o=!Object(l.c)(i,this.settings,!0),a=!Object(l.c)(i,f.p.default,!0);this.actions.setAbilities({save:o,reset:a})}onDesktopNotificationsSelectChange(e){if("undefined"!=typeof Notification)if("none"!==e.data&&"granted"!==Notification.permission){OO.ui.alert(r.a.s("dn-grantpermission"));Notification.requestPermission(e=>{if("granted"!==e)this.desktopNotificationsSelect.selectItemByData("none")})}}removeData(){var e=this;return o()((function*(){if(confirm(r.a.s("sd-removedata-confirm"))){e.pushPending();try{yield Promise.all([Object(m.l)(r.a.g.LOCAL_SETTINGS_OPTION_NAME,void 0),Object(m.l)(r.a.g.VISITS_OPTION_NAME,void 0),Object(m.l)(r.a.g.WATCHED_SECTIONS_OPTION_NAME,void 0),Object(m.k)(r.a.g.SETTINGS_OPTION_NAME,void 0)])}catch(t){Object(u.f)(e,t,"sd-error-removedata",!1);return}mw.storage.remove("convenientDiscussions-commentForms");mw.storage.remove("convenientDiscussions-thanks");mw.storage.remove("convenientDiscussions-seenRenderedChanges");e.stackLayout.setItem(e.dataRemovedPanel);e.actions.setMode("dataRemoved");e.popPending()}}))()}}s()(SettingsDialog,"name","settingsDialog");s()(SettingsDialog,"title",r.a.s("sd-title"));s()(SettingsDialog,"actions",[{action:"close",modes:["settings","reload","dataRemoved"],flags:["safe","close"],disabled:!0},{action:"save",modes:["settings"],label:r.a.s("sd-save"),flags:["primary","progressive"],disabled:!0},{action:"reset",modes:["settings"],label:r.a.s("sd-reset"),flags:["destructive"],disabled:!0},{action:"reload",modes:["reload"],label:r.a.s("sd-reload"),flags:["primary","progressive"]}]);s()(SettingsDialog,"size","large");class TalkPagePageLayout extends OO.ui.PageLayout{constructor(e){super("talkPage");this.$element.append([e.reformatCommentsField.$element,e.showContribsLinkField.$element,e.allowEditOthersCommentsField.$element,e.enableThreadsField.$element,e.modifyTocField.$element,e.useBackgroundHighlightingField.$element])}setupOutlineItem(){this.outlineItem.setLabel(r.a.s("sd-page-talkpage"))}}class CommentFormPageLayout extends OO.ui.PageLayout{constructor(e){super("commentForm");this.$element.append([e.autopreviewField.$element,e.watchOnReplyField.$element,e.watchSectionOnReplyField.$element,e.showToolbarField.$element,e.alwaysExpandAdvancedField.$element,e.autocompleteTypesField.$element,e.useTemplateDataField.$element,e.insertButtonsField.$element,e.signaturePrefixField.$element])}setupOutlineItem(){this.outlineItem.setLabel(r.a.s("sd-page-commentform"))}}class TimestampsPageLayout extends OO.ui.PageLayout{constructor(e){super("timestamps");this.$element.append([e.useUiTimeField.$element,e.hideTimezoneField.$element,e.timestampFormatField.$element])}setupOutlineItem(){this.outlineItem.setLabel(r.a.s("sd-page-timestamps"))}}class NotificationsPageLayout extends OO.ui.PageLayout{constructor(e){super("notifications");this.$element.append([e.useTopicSubscriptionsField.$element,e.notificationsField.$element,e.desktopNotificationsField.$element,e.notifyCollapsedThreadsField.$element,e.notificationsBlacklistField.$element])}setupOutlineItem(){this.outlineItem.setLabel(r.a.s("sd-page-notifications"))}}class RemoveDataPageLayout extends OO.ui.PageLayout{constructor(e){super("removeData");this.$element.append(e.removeDataField.$element)}setupOutlineItem(){this.outlineItem.setLabel(r.a.s("sd-page-dataremoval"))}}Object(u.i)(SettingsDialog,OO.ui.ProcessDialog);Object(u.i)(TalkPagePageLayout,OO.ui.PageLayout);Object(u.i)(CommentFormPageLayout,OO.ui.PageLayout);Object(u.i)(TimestampsPageLayout,OO.ui.PageLayout);Object(u.i)(NotificationsPageLayout,OO.ui.PageLayout);Object(u.i)(RemoveDataPageLayout,OO.ui.PageLayout);t.default=SettingsDialog},function(e,t,n){"use strict";n.r(t);var i=n(2),o=n.n(i),a=n(20),s=n.n(a),r=n(29),c=n(3),l=n(14),u=n(0),d=n(1),h=n(6),m=n(8),f=n(4);class MoveSectionDialog extends OO.ui.ProcessDialog{constructor(e){super();this.section=e;this.preparatoryRequests=[e.getSourcePage().getCode(),mw.loader.using("mediawiki.widgets")]}getBodyHeight(){return this.$errorItems?this.$errors.get(0).scrollHeight:this.$body.get(0).scrollHeight}initialize(...e){super.initialize(...e);this.pushPending();const t=$("<div>").text(u.a.s("loading-ellipsis"));this.loadingPanel=new OO.ui.PanelLayout({padded:!0,expanded:!1});this.loadingPanel.$element.append(t);this.movePanel=new OO.ui.PanelLayout({padded:!0,expanded:!1});this.successPanel=new OO.ui.PanelLayout({padded:!0,expanded:!1});this.stackLayout=new OO.ui.StackLayout({items:[this.loadingPanel,this.movePanel,this.successPanel]});this.$body.append(this.stackLayout.$element)}getSetupProcess(e){return super.getSetupProcess(e).next(()=>{this.stackLayout.setItem(this.loadingPanel);this.actions.setMode("move")})}getReadyProcess(e){var t=this;return super.getReadyProcess(e).next(o()((function*(){var e;try{yield Promise.all(t.preparatoryRequests)}catch(e){t.abort(u.a.sParse("cf-error-getpagecode"),!1);return}try{t.section.locateInCode()}catch(e){if(e instanceof c.a){const{data:n}=e.data,i="locateSection"===n?"error-locatesection":"error-unknown",o=u.a.sParse(i);t.abort(o,!1)}else t.abort(u.a.sParse("error-javascript"),!1);return}const n=t.section.inCode.code;t.titleInput=new mw.widgets.TitleInputWidget({$overlay:t.$overlay,excludeCurrentPage:!0,showMissing:!1,validate:()=>{const e=t.titleInput.getMWTitle(),n=e&&new l.a(e);return n&&n.name!==t.section.getSourcePage().name}});t.titleField=new OO.ui.FieldLayout(t.titleInput,{label:u.a.s("msd-targetpage"),align:"top"});t.titleInput.connect(t,{change:"onTitleInputChange"});t.titleInput.connect(t,{enter:()=>{if(!t.actions.get({actions:"move"})[0].isDisabled())t.executeAction("move")}});if(u.a.config.getMoveSourcePageCode||u.a.config.getMoveTargetPageCode)[t.keepLinkField,t.keepLinkCheckbox]=Object(h.b)({value:"keepLink",selected:!0,label:u.a.s("msd-keeplink")});const i=$("<div>"),o=n.slice(0,300)+(n.length>=300?"...":"");$("<pre>").addClass("cd-moveSectionDialog-code").text(o).appendTo(i);$("<p>").addClass("cd-moveSectionDialog-codeNote").text(u.a.s("msd-bottom")).appendTo(i);t.summaryEndingInput=new OO.ui.TextInputWidget({maxLength:250});t.summaryEndingAutocomplete=new r.a({types:["mentions","wikilinks"],inputs:[t.summaryEndingInput]});t.summaryEndingField=new OO.ui.FieldLayout(t.summaryEndingInput,{label:u.a.s("msd-summaryending"),align:"top"});t.movePanel.$element.append([t.titleField.$element,null===(e=t.keepLinkField)||void 0===e?void 0:e.$element,i,t.summaryEndingField.$element]);t.stackLayout.setItem(t.movePanel);Object(d.l)(t.titleInput);t.actions.setAbilities({close:!0});t.$body.css("overflow","hidden");setTimeout(()=>{t.$body.css("overflow","")},500);u.a.g.windowManager.updateWindowSize(t);t.popPending()})))}getActionProcess(e){var t=this;if("move"===e)return new OO.ui.Process(o()((function*(){t.pushPending();t.titleInput.$input.blur();let e,n,i=new l.a(t.titleInput.getMWTitle());if(i.name===t.section.getSourcePage().name){t.abort(u.a.sParse("msd-error-wrongpage"),!1);return}try{[e,n]=yield Promise.all([t.loadSourcePage(),t.loadTargetPage(i)]);yield t.editTargetPage(e,n);yield t.editSourcePage(e,n)}catch(e){t.abort(...e);return}const o=Object(d.Y)(u.a.sParse("msd-moved",n.sectionWikilink),{tagName:"div"});t.successPanel.$element.append(o);Object(f.k)({sectionAnchor:t.section.anchor});t.stackLayout.setItem(t.successPanel);t.actions.setMode("success");t.popPending()})));else if("close"===e)return new OO.ui.Process(()=>{this.close()});return super.getActionProcess(e)}onTitleInputChange(){var e=this;return o()((function*(){let t=!0;try{yield e.titleInput.getValidity()}catch(e){t=!1}e.actions.setAbilities({move:t})}))()}loadSourcePage(){var e=this;return o()((function*(){try{yield e.section.getSourcePage().getCode(!1)}catch(e){if(e instanceof c.a){const{type:t,code:n}=e.data;if("api"===t)if("missing"===n)throw[u.a.sParse("msd-error-sourcepagedeleted"),!0];else throw[u.a.sParse("error-api",n),!0];else if("network"===t)throw[u.a.sParse("error-network"),!0]}else throw[u.a.sParse("error-javascript"),!1]}try{e.section.locateInCode()}catch(e){if(e instanceof c.a){const{code:t}=e.data,n="locateSection"===t?"error-locatesection":"error-unknown";throw[u.a.sParse(n),!0]}else throw[u.a.sParse("error-javascript"),!1]}const t=e.section.getSourcePage().name,n=Object(m.b)(e.section.headline);return{page:e.section.getSourcePage(),sectionInCode:e.section.inCode,sectionWikilink:`${t}#${n}`}}))()}loadTargetPage(e){var t=this;return o()((function*(){try{yield e.getCode()}catch(e){if(e instanceof c.a){const{type:t,code:n}=e.data;if("api"===t)if("invalid"===n)throw[u.a.sParse("msd-error-invalidpagename"),!1];else throw[u.a.sParse("error-api",n),!0];else if("network"===t)throw[u.a.sParse("error-network"),!0]}else throw[u.a.sParse("error-javascript"),!1]}e.analyzeNewTopicPlacement();return{page:e,sectionWikilink:`${e.realName}#${Object(m.b)(t.section.headline)}`}}))()}editTargetPage(e,t){var n=this;return o()((function*(){let i,o;if(u.a.config.getMoveTargetPageCode&&n.keepLinkCheckbox.isSelected()){const t=u.a.config.getMoveTargetPageCode(e.sectionWikilink,u.a.g.USER_SIGNATURE);if(Array.isArray(t)){i=t[0]+"\n";o="\n"+t[1]}else{i=t;o=""}}else{i="";o=""}const a=e.sectionInCode.code,s=a.slice(0,e.sectionInCode.relativeContentStartIndex),r=a.slice(e.sectionInCode.relativeContentStartIndex),l=Object(m.c)(s+i+r+o);let h;const f=t.page.code;if(t.page.areNewTopicsOnTop){if(void 0===t.page.firstSectionStartIndex)t.page.firstSectionStartIndex=f.length;h=Object(m.c)(f.slice(0,t.page.firstSectionStartIndex))+l+f.slice(t.page.firstSectionStartIndex)}else h=f+(f?"\n":"")+l;let g=n.summaryEndingInput.getValue();const p=u.a.mws("colon-separator",{language:"content"});g=g&&p+g;const b=u.a.s("es-move-from",e.sectionWikilink)+g;try{yield t.page.edit({text:h,summary:Object(d.d)({text:b,section:n.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:n,details:i}=e.data;if("network"===n)throw[t+" "+u.a.sParse("error-network"),!0];else{let{code:e,message:n,logMessage:o}=i;if("editconflict"===e)n+=" "+u.a.sParse("msd-error-editconflict-retry");console.warn(o);throw[t+" "+n,!0]}}else{console.warn(e);throw[t+" "+u.a.sParse("error-javascript"),!1]}}}))()}editSourcePage(e,t){var n=this;return o()((function*(){const i=e.sectionInCode.code,o=Object(m.e)(i)||u.a.g.SIGN_CODE+"~";let a;if(u.a.config.getMoveSourcePageCode&&n.keepLinkCheckbox.isSelected()){const n=u.a.config.getMoveSourcePageCode(t.sectionWikilink,u.a.g.USER_SIGNATURE,o);a=i.slice(0,e.sectionInCode.relativeContentStartIndex)+n+"\n"}else a="";const s=e.page.code.slice(0,e.sectionInCode.startIndex)+a+e.page.code.slice(e.sectionInCode.endIndex);let r=n.summaryEndingInput.getValue();const l=u.a.mws("colon-separator",{language:"content"});r=r&&l+r;const h=u.a.s("es-move-to",t.sectionWikilink)+r;try{yield e.page.edit({text:s,summary:Object(d.d)({text:h,section:n.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:n,details:i}=e.data;if("network"===n)throw[t+" "+u.a.sParse("error-network"),!1,!0];else{let{message:e,logMessage:n}=i;console.warn(n);throw[t+" "+e,!1,!0]}}else{console.warn(e);throw[t+" "+u.a.sParse("error-javascript"),!1,!0]}}}))()}abort(e,t,n=!1){const i=Object(d.Y)(e,{callbacks:{"cd-message-reloadPage":()=>{this.close();Object(f.k)()}}}).$wrapper;this.showErrors(new OO.ui.Error(i,{recoverable:t}));this.$errors.find(".oo-ui-buttonElement-button").on("click",()=>{if(n)this.close();else u.a.g.windowManager.updateWindowSize(this)});this.actions.setAbilities({close:!0,move:t});u.a.g.windowManager.updateWindowSize(this);this.popPending()}}s()(MoveSectionDialog,"name","moveSectionDialog");s()(MoveSectionDialog,"title",u.a.s("msd-title"));s()(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(h.i)(MoveSectionDialog,OO.ui.ProcessDialog);t.default=MoveSectionDialog},function(e,t,n){var i=n(21),o=n(49);if("string"==typeof(o=o.__esModule?o.default:o))o=[[e.i,o,""]];var a={insert:"head",singleton:!1};i(o,a);e.exports=o.locals||{}},function(e,t,n){(t=n(22)(!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:14px;margin-top:3px;line-height:20px;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:5px 7px;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,n){"use strict";n.r(t);var i=n(2),o=n.n(i),a=n(20),s=n.n(a),r=n(3),c=n(0),l=n(17),u=n(6),d=n(1),h=n(9),m=n(10);class EditWatchedSectionsDialog extends OO.ui.ProcessDialog{constructor(){super();this.watchedSectionsRequest=Object(m.d)()}getBodyHeight(){return this.$errorItems?this.$errors.get(0).scrollHeight:this.$body.get(0).scrollHeight}initialize(...e){super.initialize(...e);this.pushPending();const t=$("<div>").text(c.a.s("loading-ellipsis"));this.loadingPanel=new OO.ui.PanelLayout({padded:!0,expanded:!1});this.loadingPanel.$element.append(t);this.sectionsPanel=new OO.ui.PanelLayout({padded:!1,expanded:!1});this.stackLayout=new OO.ui.StackLayout({items:[this.loadingPanel,this.sectionsPanel]});this.$body.append(this.stackLayout.$element)}getSetupProcess(e){return super.getSetupProcess(e).next(()=>{this.stackLayout.setItem(this.loadingPanel);this.actions.setMode("edit")})}getReadyProcess(e){var t=this;return super.getReadyProcess(e).next(o()((function*(){let e;try{yield t.watchedSectionsRequest;const n=Object.keys(c.a.g.watchedSections).filter(e=>c.a.g.watchedSections[e].length);e=yield Object(h.b)(n)}catch(e){Object(u.f)(t,e,"ewsd-error-processing",!1);return}e.sort((e,t)=>e.title>t.title?1:-1);const n=e.filter(e=>e.title).map(e=>c.a.g.watchedSections[e.pageid].map(t=>`${e.title}#${t}`).join("\n")).join("\n");t.input=new OO.ui.MultilineTextInputWidget({value:n,rows:30,classes:["cd-editWatchedSections-input"]});t.input.on("change",e=>{t.actions.setAbilities({save:e!==n})});t.sectionsPanel.$element.append(t.input.$element);t.stackLayout.setItem(t.sectionsPanel);Object(d.l)(t.input);t.actions.setAbilities({close:!0});t.$body.css("overflow","hidden");setTimeout(()=>{t.$body.css("overflow","")},500);c.a.g.windowManager.updateWindowSize(t);t.popPending();Object(l.a)("dialog",()=>Object(u.g)(t))})))}getActionProcess(e){var t=this;if("save"===e)return new OO.ui.Process(o()((function*(){t.pushPending();const e={},n=[];t.input.getValue().split("\n").forEach(t=>{const i=t.match(/^(.+?)#(.+)$/);if(i){const t=i[1].trim(),o=i[2].trim();if(!e[t]){e[t]=[];n.push(t)}e[t].push(o)}});let i,o,a;try{({normalized:i,redirects:o,pages:a}=(yield Object(h.a)(n))||{})}catch(e){Object(u.f)(t,e,"ewsd-error-processing",!0);return}i.concat(o).filter(t=>e[t.from]).forEach(t=>{if(!e[t.to])e[t.to]=[];e[t.to].push(...e[t.from]);delete e[t.from]});const s={};a.filter(e=>void 0!==e.pageid).forEach(e=>{s[e.title]=e.pageid});c.a.g.watchedSections={};Object.keys(e).filter(e=>s[e]).forEach(t=>{c.a.g.watchedSections[s[t]]=e[t].filter(d.X)});try{yield Object(m.g)()}catch(e){if(e instanceof r.a){const{type:n,code:i,apiData:o}=e.data;if("internal"===n&&"sizeLimit"===i){const e=new OO.ui.Error(c.a.s("ewsd-error-maxsize"),{recoverable:!1});t.showErrors(e)}else{const e=new OO.ui.Error(c.a.s("ewsd-error-processing"),{recoverable:!0});t.showErrors(e)}console.warn(n,i,o)}else{const n=new OO.ui.Error(c.a.s("error-javascript"),{recoverable:!1});t.showErrors(n);console.warn(e)}t.popPending();return}t.popPending();t.close();mw.notify(c.a.s("ewsd-saved"))})));else if("close"===e)return new OO.ui.Process(o()((function*(){yield Object(u.a)(t,"ewsd")})));return super.getActionProcess(e)}}s()(EditWatchedSectionsDialog,"name","editWatchedSectionsDialog");s()(EditWatchedSectionsDialog,"title",c.a.s("ewsd-title"));s()(EditWatchedSectionsDialog,"actions",[{action:"close",modes:["edit"],flags:["safe","close"],disabled:!0},{action:"save",modes:["edit"],label:c.a.s("ewsd-save"),flags:["primary","progressive"],disabled:!0}]);s()(EditWatchedSectionsDialog,"size","large");Object(u.i)(EditWatchedSectionsDialog,OO.ui.ProcessDialog);t.default=EditWatchedSectionsDialog},function(e,t,n){var i=n(21),o=n(52);if("string"==typeof(o=o.__esModule?o.default:o))o=[[e.i,o,""]];var a={insert:"head",singleton:!1};i(o,a);e.exports=o.locals||{}},function(e,t,n){(t=n(22)(!1)).push([e.i,".cd-comment-underlay-new{background-color:var(--cd-comment-new-background-color)}.cd-comment-overlay-new .cd-comment-overlay-content,.cd-comment-underlay-new.cd-comment-underlay-hovered{background-color:var(--cd-comment-new-hovered-background-color)}.ltr .cd-comment-overlay-new .cd-comment-overlay-gradient{background-image:linear-gradient(270deg,var(--cd-comment-new-hovered-background-color),hsla(0,0%,100%,0))}.rtl .cd-comment-overlay-new .cd-comment-overlay-gradient{background-image:linear-gradient(90deg,var(--cd-comment-new-hovered-background-color),hsla(0,0%,100%,0))}.cd-comment-underlay-own{background-color:var(--cd-comment-own-background-color)}.cd-comment-overlay-own .cd-comment-overlay-content,.cd-comment-underlay-own.cd-comment-underlay-hovered{background-color:var(--cd-comment-own-hovered-background-color)}.ltr .cd-comment-overlay-own .cd-comment-overlay-gradient{background-image:linear-gradient(270deg,var(--cd-comment-own-hovered-background-color),hsla(0,0%,100%,0))}.rtl .cd-comment-overlay-own .cd-comment-overlay-gradient{background-image:linear-gradient(90deg,var(--cd-comment-own-hovered-background-color),hsla(0,0%,100%,0))}",""]);e.exports=t},function(e,t,n){(t=n(22)(!1)).push([e.i,"a:not([href]){cursor:pointer}.cd-autocompleteTypesMultiselect .oo-ui-multioptionWidget.oo-ui-widget-enabled{cursor:default}.cd-autocompleteTypesMultiselect .oo-ui-checkboxMultioptionWidget,.cd-autocompleteTypesMultiselect .oo-ui-checkboxMultioptionWidget .oo-ui-checkboxInputWidget,.cd-autocompleteTypesMultiselect .oo-ui-checkboxMultioptionWidget.oo-ui-labelElement>.oo-ui-labelElement-label{display:inline-block}.cd-autocompleteTypesMultiselect .oo-ui-checkboxMultioptionWidget .oo-ui-checkboxInputWidget{width:auto}.ltr .cd-autocompleteTypesMultiselect .oo-ui-checkboxMultioptionWidget:not(:last-child){margin-right:1em}.rtl .cd-autocompleteTypesMultiselect .oo-ui-checkboxMultioptionWidget:not(:last-child){margin-left:1em}.ltr .cd-setting-indented{margin-left:2em}.rtl .cd-setting-indented{margin-right:2em}",""]);e.exports=t},function(e,t,n){var i=n(21),o=n(55);if("string"==typeof(o=o.__esModule?o.default:o))o=[[e.i,o,""]];var a={insert:"head",singleton:!1};i(o,a);e.exports=o.locals||{}},function(e,t,n){(t=n(22)(!1)).push([e.i,".cd-comment-header{font-size:.9285714em;margin-bottom:.2307692em}.cd-comment-menu{font-size:.9285714em;margin-top:.3076923em}.cd-comment-header,.cd-comment-menu{line-height:1.6153846}.cd-comment-author{font-weight:700;font-size:1.0769231em}.cd-comment-button-label.cd-comment-button-label{color:#54595d;text-decoration:none}.cd-comment-button-label.cd-comment-button-label:hover{color:var(--cd-link-hover-color)}.cd-comment-button-label.cd-comment-button-label:active{color:var(--cd-link-active-color)}.cd-comment-button.cd-button-disabled.cd-button-disabled{color:#72777d}.cd-comment-button-icon{display:inline-block;vertical-align:bottom;margin-bottom:2px;width:16px;height:16px;background-size:16px 16px}.sitedir-ltr .cd-comment-button,.sitedir-rtl.ltr .cd-comment-menu .cd-comment-button.cd-comment-button,.sitedir-rtl .mw-content-ltr .cd-comment-button{margin-left:1em;margin-right:0}.sitedir-ltr .cd-comment-button:first-child,.sitedir-rtl.ltr .cd-comment-menu .cd-comment-button.cd-comment-button:first-child,.sitedir-rtl .mw-content-ltr .cd-comment-button:first-child{margin-left:0;margin-right:0}.sitedir-ltr .mw-content-rtl .cd-comment-button,.sitedir-ltr.rtl .cd-comment-menu .cd-comment-button.cd-comment-button,.sitedir-rtl .cd-comment-button{margin-right:1em;margin-left:0}.sitedir-ltr .mw-content-rtl .cd-comment-button:first-child,.sitedir-ltr.rtl .cd-comment-menu .cd-comment-button.cd-comment-button:first-child,.sitedir-rtl .cd-comment-button:first-child{margin-right:0;margin-left:0}.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-comment-part-last{margin-bottom:.5em}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}.cd-reformattedComments .cd-comment-part-first{margin-top:.75em}.cd-reformattedComments .cd-comment-part-last{margin-bottom:.75em}.cd-reformattedComments .cd-commentForm-signature,.cd-reformattedComments .cd-helpPopup-hideForReformattedComments{display:none}.skin-vector dd,.skin-vector li,.skin-vector ol>li.cd-comment-part-last.cd-comment-part-last{margin-bottom:.14285714em}.cd-commentLevel.cd-commentLevel:not(ol){list-style-type:none;list-style-image:none;margin:0}.sitedir-ltr .cd-commentLevel:not(ol)>dd,.sitedir-ltr .cd-commentLevel:not(ol)>li,.sitedir-rtl .mw-content-ltr .cd-commentLevel:not(ol)>dd,.sitedir-rtl .mw-content-ltr .cd-commentLevel:not(ol)>li{padding-left:1em;padding-right:0;margin-left:1em;margin-right:0;border-left:1px solid #c8ccd1;border-right:0}.sitedir-ltr .mw-content-rtl .cd-commentLevel:not(ol)>dd,.sitedir-ltr .mw-content-rtl .cd-commentLevel:not(ol)>li,.sitedir-rtl .cd-commentLevel:not(ol)>dd,.sitedir-rtl .cd-commentLevel:not(ol)>li{padding-left:0;padding-right:1em;margin-left:0;margin-right:1em;border-left:0;border-right:1px solid #c8ccd1}.cd-connectToPreviousItem{position:relative}.cd-connectToPreviousItem:before{content:\"\";position:absolute;display:block;top:-.5em;width:1px;background-color:#c8ccd1;height:.5em}.cd-reformattedComments .cd-connectToPreviousItem:before{top:-.75em;height:.75em}.sitedir-ltr .cd-connectToPreviousItem:before,.sitedir-rtl .mw-content-ltr .cd-connectToPreviousItem:before{left:-1px;right:auto}.sitedir-ltr .mw-content-rtl .cd-connectToPreviousItem:before,.sitedir-rtl .cd-connectToPreviousItem:before{left:auto;right:-1px}.cd-thread-clickArea{position:absolute;z-index:6;width:3px;padding-left:var(--cd-thread-line-side-margin);padding-right:var(--cd-thread-line-side-margin)}.cd-thread-clickArea-hovered{cursor:pointer}.cd-thread-clickArea-hovered .cd-thread-line{background-color:#72777d;opacity:1;transition:opacity .2s ease-in}.cd-thread-clickArea-hovered .cd-thread-line-extended:after{background-image:linear-gradient(180deg,#72777d,transparent)}.cd-thread-line{width:100%;height:100%;opacity:0}.cd-thread-line-extended:after{display:block;content:\"\";height:10px;top:100%;position:relative}.sitedir-ltr .cd-beforeChangeMark,.sitedir-rtl .mw-content-ltr .cd-beforeChangeMark{margin-left:auto;margin-right:.75em}.sitedir-ltr .mw-content-rtl .cd-beforeChangeMark,.sitedir-rtl .cd-beforeChangeMark{margin-left:.75em;margin-right:auto}.cd-changeMark{font-size:85%;color:#54595d}.cd-reformattedComments .cd-changeMark{font-size:100%}.cd-reformattedComments .mw-content-ltr .cd-changeMark,.cd-reformattedComments .mw-content-rtl .mw-content-ltr .cd-changeMark{margin-left:1em;margin-right:auto}.cd-reformattedComments .mw-content-ltr .mw-content-rtl .cd-changeMark,.cd-reformattedComments .mw-content-rtl .cd-changeMark{margin-left:auto;margin-right:1em}",""]);e.exports=t},function(e,t,n){var i=n(21),o=n(57);if("string"==typeof(o=o.__esModule?o.default:o))o=[[e.i,o,""]];var a={insert:"head",singleton:!1};i(o,a);e.exports=o.locals||{}},function(e,t,n){(t=n(22)(!1)).push([e.i,'.cd-commentForm{display:flow-root;-ms-display:grid;margin:.5em 0;font-size:14px;font-weight:400;text-align:start}.cd-commentForm .cd-commentForm-headlineInput{margin-bottom:.214286em}.cd-commentForm .oo-ui-textInputWidget{max-width:none}.cd-commentForm .cd-commentForm-summaryInput{margin-top:.214286em}.cd-commentForm .cd-commentForm-checkboxes{margin-top:.5em}.cd-commentForm .cd-commentForm-checkboxes .oo-ui-fieldLayout{margin-right:1em}.cd-commentForm .cd-commentForm-checkboxes .oo-ui-fieldLayout:last-child{margin-right:0}.cd-commentForm .cd-commentForm-buttons{display:flow-root;-ms-display:grid;margin-top:.5em}.cd-commentForm .cd-commentForm-buttons-start{float:left}.cd-commentForm .cd-commentForm-buttons-end{float:right}.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-signature{opacity:.67}.cd-commentForm-dummyElement{height:0}.cd-commentForm .oo-ui-textInputWidget .oo-ui-inputWidget-input{border-radius:0}.cd-commentForm-addSection,.cd-commentForm-addSubsection,.cd-commentForm-sectionOpeningComment{margin-top:1em}.ltr .cd-commentForm{direction:ltr}.ltr .cd-commentForm .cd-commentForm-checkboxes{direction:ltr;text-align:left}.ltr .cd-commentForm .cd-commentForm-checkboxes .oo-ui-fieldLayout{margin-right:1em;margin-left:0}.ltr .cd-commentForm .cd-commentForm-checkboxes .oo-ui-fieldLayout:last-child{margin-right:0}.ltr .cd-commentForm .cd-commentForm-buttons{direction:ltr}.ltr .cd-commentForm .cd-commentForm-buttons-start{float:left}.ltr .cd-commentForm .cd-commentForm-buttons-end{float:right}.rtl .cd-commentForm{direction:rtl}.rtl .cd-commentForm .cd-commentForm-checkboxes{direction:rtl;text-align:right}.rtl .cd-commentForm .cd-commentForm-checkboxes .oo-ui-fieldLayout{margin-left:1em;margin-right:0}.rtl .cd-commentForm .cd-commentForm-checkboxes .oo-ui-fieldLayout:last-child{margin-left:0}.rtl .cd-commentForm .cd-commentForm-buttons{direction:rtl}.rtl .cd-commentForm .cd-commentForm-buttons-start{float:right}.rtl .cd-commentForm .cd-commentForm-buttons-end{float:left}.sitedir-ltr .cd-commentForm .tool-button{direction:ltr}.sitedir-rtl .cd-commentForm .tool-button{direction:rtl}.cd-replyWrapper{margin-top:.5em}.cd-commentForm-commentInput{margin-top:1px;border:1px solid #a2a9b1}.cd-commentForm-commentInput .wikiEditor-ui .wikiEditor-ui-view{border:0}.cd-commentForm-commentInput .oo-ui-inputWidget-input.oo-ui-inputWidget-input{width:calc(100% + 2px);margin:-1px;position:relative}.cd-commentForm-commentInput.oo-ui-textInputWidget.oo-ui-widget-disabled{border-color:#c8ccd1}.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{pointer-events:none}.cd-commentForm-commentInput.oo-ui-textInputWidget.oo-ui-widget-disabled+.cd-insertButtons,.cd-commentForm-commentInput.oo-ui-textInputWidget.oo-ui-widget-disabled .oo-ui-inputWidget-input,.cd-commentForm-commentInput.oo-ui-textInputWidget.oo-ui-widget-disabled .wikiEditor-ui-top{border-color:#c8ccd1}.cd-previewArea{display:flow-root;-ms-display:grid;margin-top:.5em;padding:.5em .75em;background-color:#f8f9fa}.cd-previewArea>.mw-parser-output>:first-child,.cd-previewArea>.mw-parser-output>:first-child>:first-child{margin-top:0}.cd-previewArea>.mw-parser-output>:last-child,.cd-previewArea>.mw-parser-output>:last-child>:last-child{margin-bottom:0}.cd-previewArea .diff-lineno,.cd-previewArea .mw-headline-number{display:none}.cd-previewArea .cd-closeButton{background-color:#f8f9fa}.cd-previewArea:empty{margin:0;padding:0}.cd-previewArea-above{margin-top:0;margin-bottom:.5em;width:calc(100% - 1.5em)}.cd-previewArea-label{color:#72777d;margin-bottom:.5em}.sitedir-ltr .cd-previewArea{direction:ltr}.sitedir-ltr .cd-previewArea-indentedComment>.mw-parser-output>dl,.sitedir-ltr .cd-previewArea-indentedComment>.mw-parser-output>dl>dd{margin-left:0}.sitedir-rtl .cd-previewArea{direction:rtl}.sitedir-rtl .cd-previewArea-indentedComment>.mw-parser-output>dl,.sitedir-rtl .cd-previewArea-indentedComment>.mw-parser-output>dl>dd{margin-right:0}.cd-messageArea{width:100%}.cd-messageArea,.cd-previewArea{position:relative;clear:both}.cd-messageArea:hover .cd-closeButton,.cd-previewArea:hover .cd-closeButton{opacity:1}.cd-messageArea .cd-closeButton{background-color:var(--cd-content-background-color)}.cd-commentForm-inNumberedList .cd-messageArea,.cd-commentForm-inNumberedList .cd-previewArea-above{float:left}.cd-commentForm-inNumberedList .cd-messageArea+*,.cd-commentForm-inNumberedList .cd-previewArea-above+*{clear:both}.cd-closeButton{position:absolute;z-index:1;top:1px;width:20px;height:20px;background-image:url(https://upload.wikimedia.org/wikipedia/commons/1/18/OOjs_UI_icon_close-ltr.svg);background-position:50%;background-repeat:no-repeat;opacity:0;transition:opacity .2s ease-in}.ltr .cd-closeButton,.sitedir-ltr .cd-previewArea .cd-closeButton{right:1px;left:unset}.rtl .cd-closeButton,.sitedir-rtl .cd-previewArea .cd-closeButton{left:1px;right:unset}.cd-message{margin-bottom:.5em}.cd-popupsOverlay{position:absolute;top:0;left:0;z-index:5;font-size:14px}.cd-insertButtons{background-color:#f8f9fa;border:1px solid #a2a9b1;border-top:0 solid #a2a9b1;font-size:.928571em;line-height:1.384616em}.cd-insertButtons:after{display:block;content:"";clear:both}.cd-insertButtons:empty{border:0}.cd-insertButtons-button{color:#222;padding:2px .5em 3px;white-space:nowrap;display:block}.cd-insertButtons-button:focus,.cd-insertButtons-button:hover{text-decoration:none;color:#222;background-color:rgba(0,23,70,.086)}.sitedir-ltr .cd-insertButtons{direction:ltr}.sitedir-rtl .cd-insertButtons{direction:rtl}.ltr .cd-insertButtons-button{float:left}.rtl .cd-insertButtons-button{float:right}.cd-toolbarPlaceholder{background-color:#f8f9fa;border:solid #a2a9b1;border-width:1px 1px 0;height:32px;margin:1px 0 -1px}.cd-commentForm-pending .cd-toolbarPlaceholder{border-color:#c8ccd1}.cd-autocompleteContainer .highlight{font-weight:400}',""]);e.exports=t},function(e,t,n){var i=n(21),o=n(59);if("string"==typeof(o=o.__esModule?o.default:o))o=[[e.i,o,""]];var a={insert:"head",singleton:!1};i(o,a);e.exports=o.locals||{}},function(e,t,n){(t=n(22)(!1)).push([e.i,'.cd-section-menu-button-wrapper:before{content:" | ";color:#54595d}.mw-editsection-bracket+.cd-section-menu-button-wrapper:before{content:none}.cd-section-menu-button.cd-button-disabled{opacity:.5;text-decoration:none}.cd-section-menu-button.cd-button-disabled:active,.cd-section-menu-button.cd-button-disabled:focus,.cd-section-menu-button.cd-button-disabled:hover{color:var(--cd-link-color)}.cd-section-button-container{margin-top:.5em}ol .cd-section-button{margin-top:-2px}.sitedir-rtl.ltr .mw-editsection:before{content:"\\200B\\200E"}.sitedir-ltr.rtl .mw-editsection:before{content:"\\200B\\200F"}.sitedir-ltr.rtl .mw-editsection-bracket:last-of-type,.sitedir-rtl.ltr .mw-editsection-bracket:first-of-type{margin-right:.25em;margin-left:0}.sitedir-ltr.rtl .mw-editsection-bracket:first-of-type,.sitedir-rtl.ltr .mw-editsection-bracket:last-of-type{margin-left:.25em;margin-right:0}.cd-moveSectionDialog-code{margin:1em 0}.cd-moveSectionDialog-codeNote{font-size:95%}',""]);e.exports=t},function(e,t,n){var i=n(21),o=n(61);if("string"==typeof(o=o.__esModule?o.default:o))o=[[e.i,o,""]];var a={insert:"head",singleton:!1};i(o,a);e.exports=o.locals||{}},function(e,t,n){(t=n(22)(!1)).push([e.i,".cd-comment-underlay{position:absolute;z-index:-1}.cd-comment-overlay-content,.cd-comment-underlay-hovered{background-color:var(--cd-comment-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-deleted.cd-comment-underlay-deleted{background-color:var(--cd-comment-deleted-background-color)}.cd-comment-overlay-deleted .cd-comment-overlay-content,.cd-comment-underlay-deleted.cd-comment-underlay-hovered{background-color:var(--cd-comment-deleted-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;line-height:1.4285714em}.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-target.cd-comment-overlay-target.cd-comment-overlay-target .cd-comment-overlay-gradient{background-image:none}.cd-comment-overlay-marker{position:absolute;top:0;width:3px;height:100%}.cd-comment-overlay-line-closingGap{position:absolute;top:0;width:1px;height:100%;background-color:#c8ccd1}.cd-comment-overlay-hovered .cd-comment-overlay-innerWrapper{display:flex}.cd-comment-overlay-innerWrapper{position:absolute;z-index:1;bottom:0;font-size:14px;display:none;flex-direction:row}.cd-comment-overlay-gradient{width:1.5em;display:inline-block;-moz-user-select:none;-webkit-user-select:none;user-select:none}.cd-comment-overlay-content{display:inline-flex;padding:0 .5em;flex-direction:row;pointer-events:all}.sitedir-rtl.ltr .cd-comment-overlay-content .sitedir-ltr.ltr .mw-content-rtl .cd-comment-overlay-content{margin-left:0;margin-right:.5em}.sitedir-ltr.rtl .cd-comment-overlay-content,.sitedir-rtl.rtl .mw-content-ltr .cd-comment-overlay-content{margin-left:.5em;margin-right:0}.sitedir-ltr.ltr .cd-comment-overlay-stretchedEnd .cd-comment-overlay-content,.sitedir-rtl.ltr .mw-content-ltr .cd-comment-overlay-stretchedEnd .cd-comment-overlay-content{padding-right:calc(var(--cd-content-start-margin) - var(--cd-comment-fallback-side-margin) + .5em)}.sitedir-ltr.rtl .mw-content-rtl .cd-comment-overlay-stretchedEnd .cd-comment-overlay-content,.sitedir-rtl.rtl .cd-comment-overlay-stretchedEnd .cd-comment-overlay-content{padding-left:calc(var(--cd-content-start-margin) - var(--cd-comment-fallback-side-margin) + .5em)}.sitedir-ltr.ltr .mw-content-rtl .cd-comment-overlay-stretchedStart .cd-comment-overlay-content,.sitedir-rtl.ltr .cd-comment-overlay-stretchedStart .cd-comment-overlay-content{margin-right:calc(var(--cd-content-start-margin) - var(--cd-comment-fallback-side-margin))}.sitedir-ltr.rtl .cd-comment-overlay-stretchedStart .cd-comment-overlay-content,.sitedir-rtl.rtl .mw-content-ltr .cd-comment-overlay-stretchedStart .cd-comment-overlay-content{margin-left:calc(var(--cd-content-start-margin) - var(--cd-comment-fallback-side-margin))}.sitedir-ltr .cd-comment-overlay-line,.sitedir-ltr .cd-comment-overlay-marker,.sitedir-rtl .mw-content-ltr .cd-comment-overlay-line,.sitedir-rtl .mw-content-ltr .cd-comment-overlay-marker{left:-1px}.sitedir-ltr .mw-content-rtl .cd-comment-overlay-line,.sitedir-ltr .mw-content-rtl .cd-comment-overlay-marker,.sitedir-rtl .cd-comment-overlay-line,.sitedir-rtl .cd-comment-overlay-marker{right:-1px}.ltr .cd-comment-overlay-innerWrapper{direction:ltr;right:0}.ltr .cd-comment-overlay-gradient{background-image:linear-gradient(270deg,var(--cd-comment-hovered-background-color),hsla(0,0%,100%,0))}.ltr .cd-comment-overlay-deleted .cd-comment-overlay-gradient{background-image:linear-gradient(270deg,var(--cd-comment-deleted-hovered-background-color),hsla(0,0%,100%,0))}.ltr .cd-comment-overlay-changed.cd-comment-overlay-changed .cd-comment-overlay-gradient{background-image:linear-gradient(270deg,var(--cd-comment-new-hovered-background-color),hsla(0,0%,100%,0))}.ltr .cd-comment-button-ooui.cd-comment-button-ooui{margin-right:0}.ltr .cd-comment-button-ooui.cd-comment-button-ooui:not(:first-child){margin-left:1em}.ltr .cd-comment-button-ooui.cd-comment-button-ooui.oo-ui-iconElement:first-child{margin-left:0}.rtl .cd-comment-overlay-innerWrapper{direction:rtl;left:0}.rtl .cd-comment-overlay-gradient{background-image:linear-gradient(90deg,var(--cd-comment-hovered-background-color),hsla(0,0%,100%,0))}.rtl .cd-comment-overlay-deleted .cd-comment-overlay-gradient{background-image:linear-gradient(90deg,var(--cd-comment-deleted-hovered-background-color),hsla(0,0%,100%,0))}.rtl .cd-comment-overlay-changed.cd-comment-overlay-changed .cd-comment-overlay-gradient{background-image:linear-gradient(90deg,var(--cd-comment-new-hovered-background-color),hsla(0,0%,100%,0))}.rtl .cd-comment-button-ooui.cd-comment-button-ooui{margin-left:0}.rtl .cd-comment-button-ooui.cd-comment-button-ooui:not(:first-child){margin-right:1em}.rtl .cd-comment-button-ooui.cd-comment-button-ooui.oo-ui-iconElement:first-child{margin-right:0}body:not(.skin-monobook) .cd-comment-button-ooui-icon.cd-comment-button-ooui-icon>.oo-ui-buttonElement-button{padding-top:1.4285714em;min-width:unset}.ltr:not(.skin-monobook) .cd-comment-button-ooui-icon.cd-comment-button-ooui-icon>.oo-ui-buttonElement-button{padding-left:1.4285714em}.ltr:not(.skin-monobook) .cd-comment-button-ooui-icon.cd-comment-button-ooui-icon>.oo-ui-buttonElement-button>.oo-ui-iconElement-icon{left:0}.rtl:not(.skin-monobook) .cd-comment-button-ooui-icon.cd-comment-button-ooui-icon>.oo-ui-buttonElement-button{padding-right:1.4285714em}.rtl:not(.skin-monobook) .cd-comment-button-ooui-icon.cd-comment-button-ooui-icon>.oo-ui-buttonElement-button>.oo-ui-iconElement-icon{right:0}.cd-commentLayersContainer{position:relative;pointer-events:none}.sitedir-ltr .cd-commentLayersContainer,.sitedir-rtl .mw-content-ltr .cd-commentLayersContainer{direction:ltr}.sitedir-ltr .mw-content-rtl .cd-commentLayersContainer,.sitedir-rtl .cd-commentLayersContainer{direction:rtl}.cd-commentLayersContainer-parent-relative{position:relative;z-index:0}.mw-parser-output .cd-commentLayersContainer-parent-relative{display:flow-root;-ms-display:grid;overflow:unset!important}",""]);e.exports=t},function(e,t,n){var i=n(21),o=n(63);if("string"==typeof(o=o.__esModule?o.default:o))o=[[e.i,o,""]];var a={insert:"head",singleton:!1};i(o,a);e.exports=o.locals||{}},function(e,t,n){(t=n(22)(!1)).push([e.i,"#cd-navPanel{position:fixed;top:41.5%;z-index:6;width:34px;background-color:#fff;border:1px solid #a2a9b1;opacity:.695;font-size:14px;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:4px;width:26px;height:26px;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:20px 20px}#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:16px 16px}#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:16px 16px}#cd-navPanel-firstUnseenButton{height:17px;padding:7px 0}#cd-navPanel-commentFormButton{background-size:16px 16px;background-position-y:54%}.sitedir-ltr #cd-navPanel-commentFormButton{background-image:url(\"data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20'%3E%3Cpath d='M18 0H2a2 2 0 00-2 2v18l4-4h14a2 2 0 002-2V2a2 2 0 00-2-2zM5 9.06a1.39 1.39 0 111.37-1.39A1.39 1.39 0 015 9.06zm5.16 0a1.39 1.39 0 111.39-1.39 1.39 1.39 0 01-1.42 1.39zm5.16 0a1.39 1.39 0 111.39-1.39 1.39 1.39 0 01-1.42 1.39z'/%3E%3C/svg%3E\")}.sitedir-rtl #cd-navPanel-commentFormButton{background-image:url(\"data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20'%3E%3Cpath d='M0 2v12c0 1.1.9 2 2 2h14l4 4V2c0-1.1-.9-2-2-2H2C.9 0 0 .9 0 2zm13.6 5.7c0-.8.6-1.4 1.4-1.4.8 0 1.4.6 1.4 1.4s-.6 1.4-1.4 1.4c-.8-.1-1.4-.7-1.4-1.4zM9.9 9.1s-.1 0 0 0c-.8 0-1.4-.6-1.4-1.4 0-.8.6-1.4 1.4-1.4.8 0 1.4.6 1.4 1.4s-.7 1.4-1.4 1.4zm-5.2 0c-.8 0-1.4-.6-1.4-1.4 0-.8.6-1.4 1.4-1.4.8 0 1.4.6 1.4 1.4 0 .7-.7 1.4-1.4 1.4z'/%3E%3C/svg%3E\")}.ltr #cd-navPanel{left:0;border-left-width:0}.rtl #cd-navPanel{right:0;border-right-width:0}.cd-navPanel-button{display:block;text-align:center;background-position:50%;background-repeat:no-repeat;cursor:pointer;height:31px}.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:4px;margin:0 auto 1px;width:26px;height:0;border-top:1px solid #a2a9b1;content:\"\"}.cd-navPanel-refreshButton-relevant{color:#7d00cc}",""]);e.exports=t},function(e,t,n){var i=n(21),o=n(65);if("string"==typeof(o=o.__esModule?o.default:o))o=[[e.i,o,""]];var a={insert:"head",singleton:!1};i(o,a);e.exports=o.locals||{}},function(e,t,n){(t=n(22)(!1)).push([e.i,".cd-pageNav{position:fixed;z-index:5;font-size:12px;color:#202122;overflow-wrap:break-word;background-repeat:no-repeat}.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}.ltr .cd-pageNav{left:0;direction:ltr}.rtl .cd-pageNav{right:0;direction:rtl}.cd-pageNav-item.cd-pageNav-item{margin:0 0 .25em}.cd-pageNav-item.cd-pageNav-item a{color:inherit;text-decoration:inherit}.cd-pageNav-item.cd-pageNav-item a:hover{color:var(--cd-link-hover-color)}.cd-pageNav-item.cd-pageNav-item a:active{color:var(--cd-link-active-color)}.cd-pageNav-link{display:block}.cd-pageNav-link.cd-pageNav-link-inline{display:inline}.ltr .cd-pageNav-item-level-1{margin-left:1em}.ltr .cd-pageNav-item-level-2{margin-left:2em}.ltr .cd-pageNav-item-level-3{margin-left:3em}.ltr .cd-pageNav-item-level-4{margin-left:4em}.ltr .cd-pageNav-item-level-5{margin-left:5em}.rtl .cd-pageNav-item-level-1{margin-right:1em}.rtl .cd-pageNav-item-level-2{margin-right:2em}.rtl .cd-pageNav-item-level-3{margin-right:3em}.rtl .cd-pageNav-item-level-4{margin-right:4em}.rtl .cd-pageNav-item-level-5{margin-right:5em}",""]);e.exports=t},function(e,t,n){var i=n(21),o=n(67);if("string"==typeof(o=o.__esModule?o.default:o))o=[[e.i,o,""]];var a={insert:"head",singleton:!1};i(o,a);e.exports=o.locals||{}},function(e,t,n){(t=n(22)(!1)).push([e.i,":root{--cd-link-color:#0645ad;--cd-link-hover-color:#0645ad;--cd-link-active-color:#faa700}.skin-monobook{--cd-link-color:#002bb8}.skin-monobook .cd-comment-underlay{z-index:-1}.skin-monobook .cd-comment-overlay-innerWrapper{z-index:2}.skin-monobook .cd-comment-button-ooui.oo-ui-labelElement .oo-ui-labelElement-label{line-height:1.14285714em}.skin-monobook .cd-comment-button-ooui-icon.cd-comment-button-ooui-icon.cd-comment-button-ooui-icon>.oo-ui-buttonElement-button{padding:0}.skin-monobook .cd-comment-button-ooui-icon.cd-comment-button-ooui-icon.cd-comment-button-ooui-icon>.oo-ui-buttonElement-button>.oo-ui-iconElement-icon{margin:0;width:20px;height:20px}.skin-monobook .cd-commentForm-commentInput{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,.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 .oo-ui-inputWidget-input,.skin-monobook .cd-commentForm-commentInput.oo-ui-textInputWidget.oo-ui-widget-disabled .wikiEditor-ui-top{border-color:#ddd}.skin-monobook .cd-insertButtons,.skin-monobook .cd-toolbarPlaceholder{border-color:#ccc}.skin-monobook .cd-loadingPopup{width:15.5em}.skin-monobook .cd-copyLinkDialog .oo-ui-textInputWidget input{height:35px}.skin-monobook.sitedir-ltr .cd-button-expandNote.cd-button-expandNote>.oo-ui-buttonElement-button,.skin-monobook.sitedir-rtl .mw-content-ltr .cd-button-expandNote.cd-button-expandNote>.oo-ui-buttonElement-button{padding-left: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:1px 50%}.skin-monobook.sitedir-ltr .mw-content-rtl .cd-button-expandNote.cd-button-expandNote>.oo-ui-buttonElement-button,.skin-monobook.sitedir-rtl .cd-button-expandNote.cd-button-expandNote>.oo-ui-buttonElement-button{padding-right:0}.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 50%}.skin-monobook .cd-button-expandNote.cd-button-expandNote.cd-button-expandNote>.oo-ui-buttonElement-button>.oo-ui-iconElement-icon{min-width:unset;min-height:unset;width:14px;margin:0}.skin-timeless{--cd-link-color:#36c;--cd-link-hover-color:#2952a3}.skin-timeless .mw-body-content{position:relative}.skin-timeless .cd-loadingPopup{width:15em}.skin-timeless #cd-pageNav-top{margin-top:53px}.skin-timeless .cd-pageNav{font-size:13px}.skin-modern{--cd-link-color:#036}.skin-modern #mw-content-text{position:relative}.skin-modern .cd-loadingPopup{width:18.2em}.skin-minerva{--cd-link-color:#36c}",""]);e.exports=t},function(e,t,n){var i=n(21),o=n(69);if("string"==typeof(o=o.__esModule?o.default:o))o=[[e.i,o,""]];var a={insert:"head",singleton:!1};i(o,a);e.exports=o.locals||{}},function(e,t,n){(t=n(22)(!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:first-child{margin-left:0;margin-right:0}.cd-comment-button-ooui.cd-comment-button-ooui.cd-comment-button-ooui>.oo-ui-buttonElement-button,.cd-section-button.cd-section-button.cd-section-button>.oo-ui-buttonElement-button,.cd-thread-button.cd-thread-button.cd-thread-button>.oo-ui-buttonElement-button{padding:0}.cd-section-button.cd-section-button,.cd-thread-button.cd-thread-button{vertical-align:baseline}.cd-section-button.cd-section-button>.oo-ui-buttonElement-button,.cd-thread-button.cd-thread-button>.oo-ui-buttonElement-button{vertical-align:baseline;white-space:normal}.cd-thread-button-container.cd-thread-button-container{margin:.5em 0}.skin-vector ol>li.cd-thread-button-container{margin:.14285714em 0}.sitedir-ltr .cd-thread-button.cd-thread-button.cd-thread-button,.sitedir-rtl .mw-content-ltr .cd-thread-button.cd-thread-button.cd-thread-button{margin-left:-1px}.sitedir-ltr .mw-content-rtl .cd-thread-button.cd-thread-button.cd-thread-button,.sitedir-rtl .cd-thread-button.cd-thread-button.cd-thread-button{margin-right:-1px}.cd-thread-button-invisible{visibility:hidden}.sitedir-ltr .cd-button-expandNote.cd-button-expandNote>.oo-ui-buttonElement-button,.sitedir-rtl .mw-content-ltr .cd-button-expandNote.cd-button-expandNote>.oo-ui-buttonElement-button{padding-left:1.2142857em;padding-right:0}.sitedir-ltr .cd-button-expandNote.cd-button-expandNote>.oo-ui-buttonElement-button>.oo-ui-iconElement-icon,.sitedir-rtl .mw-content-ltr .cd-button-expandNote.cd-button-expandNote>.oo-ui-buttonElement-button>.oo-ui-iconElement-icon{left:0;right:auto;background-position:1px 8px}.sitedir-ltr .mw-content-rtl .cd-button-expandNote.cd-button-expandNote>.oo-ui-buttonElement-button,.sitedir-rtl .cd-button-expandNote.cd-button-expandNote>.oo-ui-buttonElement-button{padding-left:0;padding-right:1.2142857em}.sitedir-ltr .mw-content-rtl .cd-button-expandNote.cd-button-expandNote>.oo-ui-buttonElement-button>.oo-ui-iconElement-icon,.sitedir-rtl .cd-button-expandNote.cd-button-expandNote>.oo-ui-buttonElement-button>.oo-ui-iconElement-icon{left:auto;right:0;background-position:9px 8px}.cd-button-expandNote>.oo-ui-buttonElement-button .oo-ui-iconElement-icon{background-image:url(\"data:image/svg+xml;charset=utf-8,%3Csvg width='18' height='11' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M18 2l-2-2-7 7-7-7-2 2 9 9 9-9z' fill='%23000'/%3E%3C/svg%3E\");background-size:10px}.cd-button-ooui.oo-ui-buttonElement>.oo-ui-buttonElement-button{min-height:unset}ol>.cd-replyWrapper:not(.cd-replyWrapper-hasCommentForm){list-style-type:none}.action-view .cd-hide,.cd-hidden:not(#cd-notExistingClass){display:none!important}div.cd-show,p.cd-show{display:block!important}span.cd-show{display:inline!important}.cd-destructiveText{color:#d33}.cd-loadingPopup{position:fixed;bottom:0;width:10em;z-index:111}.cd-loadingPopup-logo{display:block;margin:0 auto 2em;width:55px;position:relative}.cd-loadingPopup-logo-partBackground{position:absolute;left:8px;top:6px;width:27px;height:21px;z-index:-1;background-color:var(--cd-sidebar-color)}.sitedir-ltr.ltr .cd-loadingPopup{left:0;direction:ltr}.sitedir-ltr.rtl .cd-loadingPopup,.sitedir-rtl .cd-loadingPopup{right:0;direction:rtl}@media screen and (min-width:982px){.cd-loadingPopup{width:11em}}.skin-vector:not(.skin-vector-legacy) .cd-loadingPopup{width:0}.sitedir-ltr.skin-vector:not(.skin-vector-legacy) .cd-loadingPopup{margin-left:2em}.sitedir-rtl.skin-vector:not(.skin-vector-legacy) .cd-loadingPopup{margin-right:2em}.cd-toc-commentCount{color:#72777d;text-decoration:inherit}.sitedir-ltr .cd-toc-commentCount{margin-left:.75em}.sitedir-rtl .cd-toc-commentCount{margin-right:.75em}.cd-toc-watched{font-weight:700}.cd-toc-notRenderedCommentList .cd-toc-bullet,.cd-toc-notRenderedCommentList .cd-toc-more,.cd-toc-notRenderedCommentList a,.cd-toc-notRenderedSection a{color:#72777d}.cd-toc-more{cursor:help}.cd-toc-hiddenTocNumber{visibility:hidden}.cd-button-disabled.cd-button-disabled{cursor:default}.cd-button-pending.cd-button-pending,.cd-button-pending.cd-button-pending.cd-button-pending .oo-ui-buttonElement-button{cursor:wait}.cd-copyLinkDialog .oo-ui-actionFieldLayout.oo-ui-fieldLayout-align-top,.cd-copyLinkDialog .oo-ui-fieldLayout.oo-ui-labelElement.oo-ui-fieldLayout-align-top>.oo-ui-fieldLayout-body>.oo-ui-fieldLayout-header,.cd-copyLinkDialog .oo-ui-textInputWidget{max-width:60em}.cd-copyLinkDialog .oo-ui-textInputWidget input{height:34px}.cd-diffView-diff{margin:1em 0}.ltr .cd-diffView-nextDiffLink{float:right;margin-left:1em}.rtl .cd-diffView-nextDiffLink{float:left;margin-right:1em}.cd-commentDiffView-below{margin:.5em 0 0;text-align:center}.cd-copyLinkDialog-historyLinkBlock{margin:.5em 0 0}.cd-currentUserLink{background-color:#f0def7}.cd-rc-text{margin-top:1em}.cd-rc-img{display:block;margin:0 auto}.cd-rc-arrow{margin:.5em auto}.cd-message-notFound{margin:.5em 0}",""]);e.exports=t},function(e,t,n){var i=n(21),o=n(71);if("string"==typeof(o=o.__esModule?o.default:o))o=[[e.i,o,""]];var a={insert:"head",singleton:!1};i(o,a);e.exports=o.locals||{}},function(e,t,n){(t=n(22)(!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}.cd-watchlistMenu-scriptPageLink{vertical-align:middle;margin:0 .25em}.ltr .cd-watchlistMenu{margin:0 1em 0 .5em}.rtl .cd-watchlistMenu{margin:0 .5em 0 1em}#mw-watchlist-options .cd-watchlistMenu{float:right}.cd-watchlistMenu-button{margin:-1px 0}.skin-monobook .cd-watchlistMenu-button-switchRelevant .oo-ui-iconElement-icon{margin-top:4px;margin-bottom:0}body:not(.skin-monobook) .cd-watchlistMenu-button-switchRelevant .oo-ui-iconElement-icon{background-position-y:7px}.cd-editWatchedSections-input{padding:1px 0}.cd-editWatchedSections-input .oo-ui-inputWidget-input{resize:none;border-radius:0}",""]);e.exports=t},function(e,t,n){"use strict";n.r(t);var i=n(2),o=n.n(i),a=n(38),s=n(37),r=n(34),c=n(14),l=n(7),cd=n(0),u=n(1),d=n(4),h=n(19),m=n(5),f=n(10),g=n(25);let p,b,v,y,w,E,C,T,x,k;function S(e){return O.apply(this,arguments)}function O(){return(O=o()((function*(e){Object(d.c)();const t=Object(f.d)(!0).catch(e=>{console.warn("Couldn't load the settings from the server.",e)});if(!e.length)e=Object(g.a)();try{yield Promise.all([t,...e])}catch(e){throw["Couldn't load the messages required for the script.",e]}mw.loader.addStyleTag(`:root {\n  --cd-parentheses-start: '${cd.a.mws("parentheses-start")}';\n  --cd-parentheses-end: '${cd.a.mws("parentheses-end")}';\n}`);cd.a.g.PHP_CHAR_TO_UPPER_JSON=mw.loader.moduleRegistry["mediawiki.Title"].script.files["phpCharToUpper.json"];cd.a.page=new c.a(cd.a.g.PAGE_NAME,!1);p=mw.config.get("wgServerName");b=cd.a.mws("colon-separator",{language:"content"}).trim();[v]=cd.a.s("es-move-from").match(/^[^[$]+/)||[];[y]=cd.a.s("es-move-to").match(/^[^[$]+/)||[];w=E=cd.a.s("lp-comment-tooltip")+" ";w+=cd.a.mws("parentheses",cd.a.s("lp-comment-toyou"));E+=cd.a.mws("parentheses",cd.a.s("lp-comment-watchedsection"));const n=$("<a>").text(cd.a.s("lp-comment")).attr("title",cd.a.s("lp-comment-tooltip")),i=$("<span>").addClass("cd-commentLink-innerWrapper").append(n),o=$("<span>").addClass("cd-commentLink").append(i).prepend(" ");T=o.get(0);x=o.clone().addClass("cd-commentLink-relevant").get(0);const a=Object(u.m)(cd.a.g.USER_NAME);C=new RegExp(`(?:^|[^${cd.a.g.LETTER_PATTERN}])${a}(?![${cd.a.g.LETTER_PATTERN}])`)}))).apply(this,arguments)}function N(){mw.hook("wikipage.content").add(()=>{if(k)k.setFlags({progressive:!1})});const e=$("<div>").addClass("cd-watchlistMenu");$("<a>").attr("href",mw.util.getUrl(cd.a.config.scriptPageWikilink)).attr("target","_blank").addClass("cd-watchlistMenu-scriptPageLink").text(cd.a.s("script-name-short")).appendTo(e);k=new OO.ui.ButtonWidget({framed:!1,icon:"speechBubble",label:cd.a.s("wl-button-switchrelevant-tooltip"),invisibleLabel:!0,title:cd.a.s("wl-button-switchrelevant-tooltip"),classes:["cd-watchlistMenu-button","cd-watchlistMenu-button-switchRelevant"],disabled:!cd.a.g.watchedSections});k.on("click",()=>{!function(){const e=!$(".mw-changeslist").find("ul.special").length,t=cd.a.g.$content.find(".mw-changeslist .mw-collapsible:not(.mw-changeslist-legend)"),n=cd.a.g.$content.find(".mw-changeslist-line:not(.mw-collapsible)");if(k.hasFlag("progressive")){if(e)n.filter("table").show();else n.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();n.not(":has(.cd-commentLink-relevant)").hide()}k.setFlags({progressive:!k.hasFlag("progressive")})}()});k.$element.appendTo(e);const t=new OO.ui.ButtonWidget({framed:!1,icon:"listBullet",label:cd.a.s("wl-button-editwatchedsections-tooltip"),invisibleLabel:!0,title:cd.a.s("wl-button-editwatchedsections-tooltip"),classes:["cd-watchlistMenu-button","cd-watchlistMenu-button-editWatchedSections"]});t.on("click",()=>{Object(h.a)()});t.$element.appendTo(e);const n=new OO.ui.ButtonWidget({framed:!1,icon:"settings",label:cd.a.s("wl-button-settings-tooltip"),invisibleLabel:!0,title:cd.a.s("wl-button-settings-tooltip"),classes:["cd-watchlistMenu-button","cd-watchlistMenu-button-scriptSettings"]});n.on("click",()=>{Object(m.g)();Object(h.d)()});n.$element.appendTo(e);cd.a.g.$content.find(".mw-rcfilters-ui-changesLimitAndDateButtonWidget").prepend(e);cd.a.g.$content.find("#mw-watchlist-options .mw-changeslist-legend").after(e)}function _(e){var t;return"www.wikidata.org"===p&&(null===(t=e.firstElementChild)||void 0===t?void 0:t.classList.contains("wb-itemlink"))}function A(e){const t=e.querySelector(".mw-userlink");if(!t)return null;let n=t.textContent;if("MediaWiki message delivery"===n)return null;if(mw.util.isIPv6Address(n))n=n.toUpperCase();return n}function P(e){return v&&e.includes(": "+v)||y&&e.includes(": "+y)}function I(e){return e.includes("Archiving")}function L(e,t){if(!t)return!1;else return"ltr"===cd.a.g.CONTENT_DIR?e.includes(`\u2192${t}${b}`)||e.endsWith("\u2192"+t):e.includes(`\u2190${t}${b}`)||e.endsWith("\u2190"+t)}function M(e){if("Watchlist"===mw.config.get("wgCanonicalSpecialPageName")&&!cd.a.g.$content.find(".cd-watchlistMenu").length){Object(d.g)();if(mw.user.options.get("wlenhancedfilters-disable"))N();else mw.hook("structuredChangeFilters.ui.initialized").add(()=>{N()});$(".mw-rcfilters-ui-filterWrapperWidget-showNewChanges a").on("click",o()((function*(){try{yield Object(f.d)()}catch(e){console.warn("Couldn't load the settings from the server.",e)}})))}e.get(0).querySelectorAll(".mw-changeslist-line:not(.mw-collapsible)").forEach(e=>{var t,n;const i=e.className.match(/mw-changeslist-ns(\d+)/),o=i&&Number(i[1]);if(null===o)return;const a=("TR"===e.tagName?e.parentNode:e).querySelector(".mw-changeslist-title");if(!a||_(a))return;const s=a.textContent;if(!Object(u.D)(s,o))return;if(e.querySelector(".minoredit"))return;let r=null===(t=e.querySelector(".comment"))||void 0===t?void 0:t.textContent;r=r&&Object(u.I)(r);if(r&&(Object(u.z)(r)||Object(u.E)(r)||P(r)))return;const c=e.querySelector(".mw-plusminus-pos");if(!c)return;if("STRONG"!==c.tagName){const e=c.textContent.match(/\d+/),t=e&&Number(e[0]);if(!t||t<cd.a.config.bytesToDeemComment)return}const l=null===(n=e.getAttribute("data-mw-ts"))||void 0===n?void 0:n.slice(0,12);if(!l)return;const d=A(e);if(!d)return;const h=l+"_"+Object(u.T)(d),m=a.href;if(!m)return;let f;if(r&&C.test(` ${r} `)){f=x.cloneNode(!0);f.lastChild.lastChild.title=w}else{let t=!1;if(r){var g;const n=e.querySelector(".mw-changeslist-diff-cur")||e.querySelector(".mw-changeslist-history"),i=null==n?void 0:null===(g=n.href)||void 0===g?void 0:g.match(/[&?]curid=(\d+)/),o=i&&Number(i[1]);if(o){var p;const e=(null===(p=cd.a.g.watchedSections)||void 0===p?void 0:p[o])||[];if(e.length){for(let n=0;n<e.length;n++)if(L(r,e[n])){t=!0;break}if(t){f=x.cloneNode(!0);f.lastChild.lastChild.title=E}}}}if(!t)f=T.cloneNode(!0)}f.lastChild.lastChild.href=`${m}#${h}`;const b=e.querySelector(".comment")||e.querySelector(".mw-usertoollinks");if(b)b.parentNode.insertBefore(f,b.nextSibling)})}function j(e){Object(m.h)("user");if(null===cd.a.g.UI_TIMEZONE)return;const t=e.get(0).querySelector(".mw-contributions-list");if(!t)return;Array.from(t.children).forEach(e=>{var t;const n=e.querySelector(".mw-contributions-title");if(!n||_(n))return;const i=n.textContent;if(!new c.a(i).isProbablyTalkPage())return;const o=n.href;if(!o)return;if(e.querySelector(".minoredit"))return;let a=null===(t=e.querySelector(".comment"))||void 0===t?void 0:t.textContent;a=a&&Object(u.I)(a);if(a&&(Object(u.z)(a)||Object(u.E)(a)||P(a)))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<cd.a.config.bytesToDeemComment)return}const r=e.querySelector(".mw-changeslist-date");if(!r)return;const{date:l}=Object(m.l)(r.textContent,cd.a.g.UI_TIMEZONE)||{};if(!l)return;const d=Object(m.f)(l,mw.config.get("wgRelevantUserName"));let h;if(a&&C.test(` ${a} `)){h=x.cloneNode(!0);h.lastChild.lastChild.title=w}else h=T.cloneNode(!0);h.lastChild.lastChild.href=`${o}#${d}`;let f=e.querySelector(".comment");if(!f){f=n;f.nextSibling.textContent=f.nextSibling.textContent.replace(/^\s/,"")}f.parentNode.insertBefore(h,f.nextSibling)})}function D(e){Object(m.h)("user");if(null===cd.a.g.UI_TIMEZONE)return;const t=e.get(0).querySelector("#pagehistory"),n=Array.from(t.children),i=cd.a.page.getUrl();n.forEach(e=>{var t;if(e.querySelector(".minoredit"))return;let n=null===(t=e.querySelector(".comment"))||void 0===t?void 0:t.textContent;n=n&&Object(u.I)(n);if(n&&(Object(u.z)(n)||Object(u.E)(n)||P(n)))return;const o=e.querySelector(".mw-plusminus-pos");if(!o)return;if("STRONG"!==o.tagName){const e=o.textContent.match(/\d+/),t=e&&Number(e[0]);if(!t||t<cd.a.config.bytesToDeemComment)return}const a=e.querySelector(".mw-changeslist-date");if(!a)return;const{date:s}=Object(m.l)(a.textContent,cd.a.g.UI_TIMEZONE)||{};if(!s)return;const r=A(e);if(!r)return;const c=Object(m.f)(s,r);let l;if(n&&C.test(` ${n} `)){l=x.cloneNode(!0);l.lastChild.lastChild.title=w}else{let e=!1;if(n){var d;if(null!==(d=cd.a.g.currentPageWatchedSections)&&void 0!==d&&d.length){for(let t=0;t<cd.a.g.currentPageWatchedSections.length;t++)if(L(n,cd.a.g.currentPageWatchedSections[t])){e=!0;break}if(e){l=x.cloneNode(!0);l.lastChild.lastChild.title=E}}}if(!e)l=T.cloneNode(!0)}l.lastChild.lastChild.href=`${i}#${c}`;let h=e.querySelector(".comment");if(!h){const t=e.querySelectorAll(".mw-changeslist-separator");h=null==t?void 0:t[t.length-1]}if(h)h.parentNode.insertBefore(l,h.nextSibling)})}function R(e){return H.apply(this,arguments)}function H(){return(H=o()((function*(e){if(cd.a.g.isPageProcessed&&null!=e&&e.parent().is(cd.a.g.$content))return;if(!cd.a.g.UI_TIMESTAMP_REGEXP)Object(m.h)("user");if(null===cd.a.g.UI_TIMEZONE)return;const t=e||cd.a.g.$content,n=t.get(0);[n.querySelector(".diff-otitle"),n.querySelector(".diff-ntitle")].filter(e=>null!==e).forEach(t=>{var n,i;if(t.querySelector(".minoredit"))return;null===(n=t.querySelector(".cd-commentLink"))||void 0===n||n.remove();let o=null===(i=t.querySelector(".comment"))||void 0===i?void 0:i.textContent;o=o&&Object(u.I)(o);if(o&&(Object(u.z)(o)||Object(u.E)(o)||P(o)||I(o)))return;const a=t.querySelector("#mw-diff-otitle1 a, #mw-diff-ntitle1 a");if(!a)return;const{date:s}=Object(m.l)(a.textContent,cd.a.g.UI_TIMEZONE)||{};if(!s)return;const r=A(t);if(!r)return;const d=Object(m.f)(s,r);let h,f;if(e){const e=new mw.Uri(a.href);f=new c.a(e.query.title)}else h=l.a.getByAnchor(d,!0);if(h||e&&f.isProbablyTalkPage()){let n;if(o&&C.test(` ${o} `)){n=x.cloneNode(!0);n.lastChild.lastChild.title=w}else{var g;let t=!1;if(!e&&o&&null!==(g=cd.a.g.currentPageWatchedSections)&&void 0!==g&&g.length){for(let e=0;e<cd.a.g.currentPageWatchedSections.length;e++)if(L(o,cd.a.g.currentPageWatchedSections[e])){t=!0;break}if(t){n=x.cloneNode(!0);n.lastChild.lastChild.title=E}}if(!t)n=T.cloneNode(!0)}const i=n.lastChild.lastChild;if(e){i.href=f.getUrl()+"#"+d;if(cd.a.g.isPageProcessed)i.target="_blank"}else{i.href="#"+d;i.onclick=function(e){e.preventDefault();h.scrollTo(!1,!0)}}const a=t.querySelector("#mw-diff-otitle3, #mw-diff-ntitle3");if(!a)return;a.appendChild(n)}});mw.hook("convenientDiscussions.commentLinksAdded").fire(t,cd.a)}))).apply(this,arguments)}function B(e){return F.apply(this,arguments)}function F(){return(F=o()((function*(e){if(e.parent().length){if(["Recentchanges","Watchlist"].includes(mw.config.get("wgCanonicalSpecialPageName")))M(e);else if("Contributions"===mw.config.get("wgCanonicalSpecialPageName"))j(e);else if("history"===mw.config.get("wgAction")&&cd.a.page.isProbablyTalkPage())D(e);mw.hook("convenientDiscussions.commentLinksAdded").fire(e,cd.a)}}))).apply(this,arguments)}function U(e){return Y.apply(this,arguments)}function Y(){return(Y=o()((function*(e){try{yield S(e)}catch(e){console.warn(...e);return}if(cd.a.g.isDiffPage)mw.hook("convenientDiscussions.pageReady").add(()=>{R()});else mw.hook("wikipage.content").add(B);mw.hook("wikipage.diff").add(R)}))).apply(this,arguments)}function W(){const[,e]=location.search.match(/[?&]cdcomment=([^&]+)(?:&|$)/)||[];if(e)mw.loader.using("mediawiki.api").then(o()((function*(){yield Promise.all(...Object(g.a)());$(".mw-search-result-heading").each((t,n)=>{const i=$(n).find("a").first().attr("href")+"#"+e,o=$("<a>").attr("href",i).text(cd.a.s("deadanchor-search-gotocomment")),a=$("<span>").text(cd.a.mws("parentheses-start")),s=$("<span>").text(cd.a.mws("parentheses-end")),r=$("<span>").addClass("cd-searchCommentLink").append(a,o,s);$(n).append(" ",r.clone())})})),console.error)}var q={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){if(void 0===this.timerTotal[e])this.timerTotal[e]=0;this.timerStartTimestamps[e]=Date.now()},stopTimer(e){if(void 0===this.timerStartTimestamps[e])return;const t=Date.now()-this.timerStartTimestamps[e];this.timerTotal[e]+=t;delete this.timerStartTimestamps[e];if(void 0===this.timerAllRunsTotal[e]){this.timerAllRunsTotal[e]=0;this.timerRunCount[e]=0}this.timerAllRunsTotal[e]+=t;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]}`);this.resetTimer(e)}},logAndResetEverything(e){const t=Object.keys(this.timerTotal);if(e)t.sort();t.forEach(e=>{this.logAndResetTimer(e)});const n=Object.keys(this.counters);if(e)n.sort();n.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={}}},averageTimerTime(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(1)} average for ${this.timerRunCount[e]} runs`)},incrementCounter(e){this.counters[e]++}},G={messages:{},contribsPage:null,substAliases:[],timezone:null,useGlobalPreferences:!0,customTalkNamespaces:mw.config.get("wgExtraSignatureNamespaces"),pageWhitelist:[],pageBlacklist:[],userNamespacesByGender:null,genderNeutralUserNamespaceAlias:null,archivePaths:[],pagesWithoutArchives:[],idleFragments:[],defaultIndentationChar:":",spaceAfterIndentationChars:!0,indentationCharMode:"mimic",defaultSignaturePrefix:" ",signaturePrefixRegexp:/(?:\s[-\u2013\u2212\u2014\u2015]+\xa0?[A-Z][A-Za-z-_]*)?(?:\s+>+)?(?:[\xb7\u2022\-\u2011\u2013\u2212\u2014\u2015\u2500~\u2053/\u2192\u21d2\s\u200e\u200f]|&\w+;|&#\d+;)*(?:\s+\()?$/,signatureEndingRegexp:null,tagName:null,scriptCodeName:"convenient-discussions",scriptPageWikilink:"c:Special:MyLanguage/User:JWBTH/CD",unsignedTemplates:["unsigned","unsignedIP","unsigned2","unsignedIP2"],unsignedClass:"autosigned",pairQuoteTemplates:[[],[]],smallDivTemplates:[],paragraphTemplates:[],outdentTemplates:[],outdentClass:"outdent-template",clearTemplates:[],mentionCharacter:"@",mentionRequiresLeadingSpace:!0,quoteFormatting:["> ''","''"],elementsToExcludeClasses:["cd-moveMark"],templatesToExclude:[],commentAntipatterns:[],customBadCommentBeginnings:[],keepInSectionEnding:[/\n{2,}(?:<!--[^]*?-->\s*)+$/,/\n+(?:<!--[^]*?-->\s*)*<\/?(?:section|onlyinclude)(?: [\w ]+(?:=[^<>]+?)?)? *\/?>\s*(?:<!--[^]*?-->\s*)*$/i,/\n+<noinclude>([^]*?)<\/noinclude>\s*$/i],signatureScanLimit:100,foreignElementInHeadlineClasses:[],closedDiscussionTemplates:[[],[]],closedDiscussionClasses:[],customUnhighlightableElementClasses:[],customAddTopicLinkSelectors:[],defaultInsertButtons:[],longCommentThreshold:1e4,bytesToDeemComment:50,summaryCommentTextLengthLimit:50,noConfirmPostEmptyCommentPageRegexp:null,indentationCharsPattern:"\\n*([:*#]*)( )*",undoTexts:[],customTextReactions:[],customCommentFormModules:[],transformSummary:null,preTransformCode:null,postTransformCode:null,checkForCustomForeignComponents:null,areNewTopicsOnTop:null,getMoveSourcePageCode:function(e,t,n){return'<div class="cd-moveMark">'+convenientDiscussions.s("move-sourcepagecode",e,t,n)+"</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>'}},z={LETTER_PATTERN:"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",COMMENT_HOVERED_BACKGROUND_COLOR:"#f8f9fa",COMMENT_TARGET_MARKER_COLOR:"#fc3",COMMENT_TARGET_BACKGROUND_COLOR:"#fef6e7",COMMENT_TARGET_HOVERED_BACKGROUND_COLOR:"#fef2db",COMMENT_NEW_MARKER_COLOR:"#00af89",COMMENT_NEW_BACKGROUND_COLOR:"#edffed",COMMENT_NEW_HOVERED_BACKGROUND_COLOR:"#e4ffe4",COMMENT_OWN_MARKER_COLOR:"#9f33cc",COMMENT_OWN_BACKGROUND_COLOR:"#faf3fc",COMMENT_OWN_HOVERED_BACKGROUND_COLOR:"#f7edfb",COMMENT_DELETED_MARKER_COLOR:"#d33",COMMENT_DELETED_BACKGROUND_COLOR:"#fee7e6",COMMENT_DELETED_HOVERED_BACKGROUND_COLOR:"#fddbd9",COMMENT_FALLBACK_SIDE_MARGIN:10,THREAD_LINE_SIDE_MARGIN:3,HIGHLIGHT_NEW_COMMENTS_INTERVAL:15,UPDATE_CHECK_INTERVAL:15,BACKGROUND_UPDATE_CHECK_INTERVAL:60,SECONDS_IN_DAY:86400,MILLISECONDS_IN_MINUTE:6e4,POPULAR_NOT_INLINE_ELEMENTS:["BLOCKQUOTE","DD","DIV","DL","DT","FORM","H1","H2","H3","H4","H5","H6","HR","INPUT","LI","LINK","OL","P","PRE","STYLE","TABLE","TBODY","TR","TH","TD","UL"],POPULAR_INLINE_ELEMENTS:["A","ABBR","B","BIG","BR","CENTER","CITE","CODE","DEL","EM","FONT","I","IMG","INS","KBD","Q","S","SAMP","SMALL","SPAN","STRIKE","STRONG","SUB","SUP","TT","U","VAR"],BAD_HIGHLIGHTABLE_ELEMENTS:["BLOCKQUOTE","DL","FORM","HR","OL","PRE","TABLE","UL"],UNHIGHLIGHTABLE_ELEMENT_CLASSES:["mw-empty-elt","tleft","tright","floatleft","floatright"],BAD_COMMENT_BEGINNINGS:[/^<!--[^]*?--> *\n+/,/^(?:----+|<hr>) *\n+/i,/^\{\|.*?\|\} *\n+(?=[*:#])/],FLOATING_ELEMENT_SELECTORS:[".cd-floating",".tright",".floatright",".tleft",".floatleft",'*[style*="float:right"]','*[style*="float: right"]','*[style*="float:left"]','*[style*="float: left"]'],SIGN_CODE:"~~".concat("~~")},V=n(35),K=n(9);if(0);function X(e,...t){if(!e)return null;const n="convenient-discussions-"+e;let i={},o=t[t.length-1];if("object"==typeof o&&!o.options){i=o;t.splice(t.length-1)}if(!cd.a.g.IS_QQX_MODE&&"string"==typeof mw.messages.get(n)){const e=mw.message(n,...t);if(i.plain)return e.plain();else if(i.parse)return e.parse();else return e.text()}else{return`(${n}${t.length?": "+t.join(", "):""})`}}function Z(e,...t){return X(e,...t,{parse:!0})}function J(e){return X(e,{plain:!0})}function Q(e,...t){let n,i=t[t.length-1];if("object"==typeof i){n=i;t.splice(t.length-1)}if(n&&"content"===n.language)e="(content)"+e;return mw.message(e,...t).parse()}function ee(e){const t=new URL(location.href);t.searchParams.set("cdtalkpage",e?"1":"0");const n=$("<li>").attr("id","footer-places-togglecd"),i=$("<a>").attr("href",t.toString()).addClass("noprint").text(cd.a.s(e?"footer-runcd":"footer-dontruncd")).appendTo(n);if(e)i.on("click",e=>{if(!e.ctrlKey&&!e.shiftKey&&!e.metaKey){e.preventDefault();history.pushState(history.state,"",t.toString());n.remove();ne()}});Object(u.S)({monobook:"#f-list",modern:"#footer-info",default:"#footer-places"}).append(n)}function te(){const e=["es-","cf-autocomplete-commentlinktext","move-"];if(1)n(44);const t={};Object.keys(cd.a.i18n.en).forEach(n=>{var i;const o=e.some(e=>n===e||e.endsWith("-")&&n.startsWith(e))?cd.a.g.CONTENT_LANGUAGE:cd.a.g.USER_LANGUAGE;t[n]=(null===(i=cd.a.i18n[o])||void 0===i?void 0:i[n])||cd.a.i18n.en[n]});Object.keys(t).forEach(e=>{mw.messages.set("convenient-discussions-"+e,t[e])})}function ne(){return ie.apply(this,arguments)}function ie(){return(ie=o()((function*(){cd.a.debug.startTimer("start");if(!cd.a.g.SETTINGS_OPTION_NAME){cd.a.config=Object.assign(G,cd.a.config);te();const e="ru.wikipedia.org"===location.hostname?"cd":"convenientDiscussions";cd.a.g.SETTINGS_OPTION_NAME="userjs-convenientDiscussions-settings";cd.a.g.LOCAL_SETTINGS_OPTION_NAME=`userjs-${e}-localSettings`;cd.a.g.VISITS_OPTION_NAME=`userjs-${e}-visits`;const t="ru.wikipedia.org"===location.hostname?"watchedTopics":"watchedSections";cd.a.g.WATCHED_SECTIONS_OPTION_NAME=`userjs-${e}-${t}`;const n=mw.config.get("wgServer");cd.a.g.SERVER=n.startsWith("//")?location.protocol+n:n;cd.a.g.PAGE_NAME=Object(u.V)(mw.config.get("wgPageName"));cd.a.g.PAGE_TITLE=Object(u.V)(mw.config.get("wgTitle"));cd.a.g.NAMESPACE_NUMBER=mw.config.get("wgNamespaceNumber");cd.a.g.USER_NAME=mw.config.get("wgUserName")||"<unregistered>";cd.a.g.PAGE_WHITELIST_REGEXP=Object(u.H)(cd.a.config.pageWhitelist);cd.a.g.PAGE_BLACKLIST_REGEXP=Object(u.H)(cd.a.config.pageBlacklist);cd.a.g.CONTENT_DIR=document.body.classList.contains("sitedir-rtl")?"rtl":"ltr";cd.a.g.SKIN=mw.config.get("skin");if("vector"===cd.a.g.SKIN&&document.body.classList.contains("skin-vector-legacy"))cd.a.g.SKIN="vector-legacy";cd.a.g.IS_QQX_MODE=/[?&]uselang=qqx(?=&|$)/.test(location.search);cd.a.g.IS_MOBILE=/Mobi|Android/i.test(navigator.userAgent)||void 0!==window.orientation;cd.a.g.$content=$("#mw-content-text")}cd.a.g.isDiffPage=/[?&]diff=[^&]/.test(location.search);cd.a.g.isDisabledInQuery=/[?&]cdtalkpage=(0|false|no|n)(?=&|$)/.test(location.search);cd.a.g.isEnabledInQuery=/[?&]cdtalkpage=(1|true|yes|y)(?=&|$)/.test(location.search);const e=mw.user.options.get("discussiontools-betaenable");cd.a.g.isDtReplyToolEnabled=Boolean(e&&mw.user.options.get("discussiontools-replytool"));cd.a.g.isDtNewTopicToolEnabled=Boolean(e&&mw.user.options.get("discussiontools-newtopictool"));cd.a.g.isDtTopicSubscriptionEnabled=Boolean(e&&mw.user.options.get("discussiontools-topicsubscription"));const t=!mw.config.get("wgIsRedirect")&&!cd.a.g.$content.find(".cd-notTalkPage").length&&(Object(u.D)(cd.a.g.PAGE_NAME,cd.a.g.NAMESPACE_NUMBER)||$("#ca-addsection").length||cd.a.g.$content.find(".cd-talkPage").length)&&!("undefined"!=typeof cdOnlyRunByFooterLink&&window.cdOnlyRunByFooterLink);cd.a.g.isPageProcessed=mw.config.get("wgIsArticle")&&!cd.a.g.isDisabledInQuery&&(cd.a.g.isEnabledInQuery||t);let i=[];if(mw.config.get("wgIsArticle"))if(cd.a.g.isPageProcessed){Object(d.q)();cd.a.debug.stopTimer("start");cd.a.debug.startTimer("loading data");if("ready"===mw.loader.getState("mediawiki.api"))i=Object(g.a)();const e=["jquery.client","jquery.color","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","oojs-ui.styles.icons-alerts","oojs-ui.styles.icons-content","oojs-ui.styles.icons-editing-core","oojs-ui.styles.icons-interactions","oojs-ui.styles.icons-movement","user.options"];let t,a;if(e.every(e=>"ready"===mw.loader.getState(e))){if(i.every(e=>"resolved"===e.state()))a=window.scrollY}else t=mw.loader.using(e);Promise.all([t,...i]).then(o()((function*(){try{yield Object(V.a)(void 0,i,a)}catch(e){mw.notify(cd.a.s("error-processpage"),{type:"error"});console.error(e);Object(d.d)()}})),e=>{mw.notify(cd.a.s("error-loaddata"),{type:"error"});console.error(e);Object(d.d)()});setTimeout(()=>{if(Object(d.i)()){Object(d.d)(!1);console.warn("The loading overlay stays for more than 10 seconds; removing it.")}},1e4);cd.a.g.$contentColumn=Object(u.S)({timeless:"#mw-content",minerva:"#bodyContent",default:"#content"});Object(d.j)();Object(d.o)();n(39);n(54);n(56);n(58);n(60);n(62);n(64);n(66);n(68);ee(!1)}else ee(!0);if(t&&("view"!==mw.config.get("wgAction")||cd.a.g.isDtNewTopicToolEnabled)){const e=$("#ca-addsection a"),t=e.prop("href");if(t){const n=new URL(t);n.searchParams.delete("action");n.searchParams.delete("section");n.searchParams.set("cdaddtopic",1);e.attr("href",n)}}const a=["Watchlist","Contributions","Recentchanges"].includes(mw.config.get("wgCanonicalSpecialPageName")),s="history"===mw.config.get("wgAction")&&Object(u.D)(cd.a.g.PAGE_NAME,cd.a.g.NAMESPACE_NUMBER);if(cd.a.g.isPageProcessed||cd.a.g.isDiffPage&&t||a||s){if("ready"===mw.loader.getState("mediawiki.api")){if(!i.length)i=Object(g.a)();if(!cd.a.g.isPageProcessed)Object(K.h)(!0).catch(e=>{console.warn(e)})}mw.loader.using(["mediawiki.Title","mediawiki.api","mediawiki.jqueryMsg","mediawiki.user","mediawiki.util","oojs","oojs-ui","oojs-ui.styles.icons-alerts","oojs-ui.styles.icons-editing-list","oojs-ui.styles.icons-interactions","user.options"]).then(()=>{U(i);n(39);n(70)},e=>{mw.notify(cd.a.s("error-loaddata"),{type:"error"});console.error(e)})}if("Search"===mw.config.get("wgCanonicalSpecialPageName"))W();if(!Object(d.i)())cd.a.debug.stopTimer("start");mw.hook("convenientDiscussions.preprocessed").fire(cd.a)}))).apply(this,arguments)}function oe(){const e=e=>s.includes(e)?e:(e=>(r[e]||[]).find(e=>s.includes(e))||"en")(e);cd.a.g.USER_LANGUAGE=e(mw.config.get("wgUserLanguage"));cd.a.g.CONTENT_LANGUAGE=e(mw.config.get("wgContentLanguage"));return!(cd.a.g.USER_LANGUAGE===mw.config.get("wgUserLanguage")&&cd.a.g.CONTENT_LANGUAGE===mw.config.get("wgContentLanguage"))}function ae(){return new Promise((e,t)=>{let n=location.hostname;if(1)n+="-test";const i=a[n]||a[location.hostname];if(i){const n=e=>{t(["Convenient Discussions can't run: couldn't load the configuration.",e])},[,o]=i.match(/modules=ext.gadget.([^?&]+)/)||[];if(o&&mw.user.options.get("gadget-"+o)){mw.loader.using("ext.gadget."+o).then(()=>{e()});return}mw.loader.getScript(i).then(()=>{e()},n)}else e()})}function se(){const e=[cd.a.g.USER_LANGUAGE,cd.a.g.CONTENT_LANGUAGE].filter(u.X).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 re(){return(re=o()((function*(){if(cd.a.isRunning){console.warn("One instance of Convenient Discussions is already running.");return}cd.a.isRunning=!0;if(/(^|\.)m\./.test(location.hostname)||"wikitext"!==mw.config.get("wgPageContentModel")||mw.config.get("wgIsMainPage"))return;if(0);cd.a.debug=q;cd.a.g=z;cd.a.s=X;cd.a.sParse=Z;cd.a.sPlain=J;cd.a.mws=Q;cd.a.state={};cd.a.api={};cd.a.api.Page=c.a;cd.a.api.generateCommentAnchor=m.f;cd.a.api.parseCommentAnchor=m.j;cd.a.api.buildEditSummary=u.d;cd.a.api.isPageOverlayOn=u.C;cd.a.api.wrap=u.Y;cd.a.api.wrapDiffBody=u.Z;cd.a.util=cd.a.api;cd.a.g.Page=cd.a.api.Page;cd.a.debug.init();cd.a.debug.startTimer("total time");cd.a.debug.startTimer("loading config and strings");mw.hook("convenientDiscussions.launched").fire(cd.a);const e=oe()?se():!cd.a.i18n&&(cd.a.getStringsPromise||se());try{yield Promise.all([!cd.a.config&&ae(),e])}catch(e){console.error(e);return}cd.a.debug.stopTimer("loading config and strings");$(ne)}))).apply(this,arguments)}!function(){re.apply(this,arguments)}()}]);
//# sourceMappingURL=https://commons.wikimedia.org/w/index.php?title=User%3AJack+who+built+the+house%2FconvenientDiscussions-test.js.map.json&action=raw&ctype=application%2Fjson
/*! </nowiki> */