MediaWiki:ConvenientDiscussions.js

From Fallen London Wiki

Note: After saving, you may have to bypass your browser's cache to see the changes.

  • Firefox / Safari: Hold Shift while clicking Reload, or press either Ctrl-F5 or Ctrl-R (⌘-R on a Mac)
  • Google Chrome: Press Ctrl-Shift-R (⌘-Shift-R on a Mac)
  • Internet Explorer / Edge: Hold Ctrl while clicking Refresh, or press Ctrl-F5
  • Opera: Go to Menu → Settings (Opera → Preferences on a Mac) and then to Privacy & security → Clear browsing data → Cached images and files.
/*! For license information please see https://commons.wikimedia.org/wiki/User:Jack_who_built_the_house/convenientDiscussions.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=32)}([function(e,t){function n(e,t,n,i,o,s,r){try{var a=e[s](r),c=a.value}catch(e){n(e);return}if(a.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,s){var r=e.apply(t,i);function a(e){n(r,o,s,a,c,"next",e)}function c(e){n(r,o,s,a,c,"throw",e)}a(void 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},s=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]}}(),r=[];function a(e){for(var t=-1,n=0;n<r.length;n++)if(r[n].identifier===e){t=n;break}return t}function c(e,t){for(var n={},i=[],o=0;o<e.length;o++){var s=e[o],c=t.base?s[0]+t.base:s[0],l=n[c]||0,u="".concat(c," ").concat(l);n[c]=l+1;var d=a(u),h={css:s[1],media:s[2],sourceMap:s[3]};if(-1!==d){r[d].references++;r[d].updater(h)}else r.push({identifier:u,updater:g(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 r=s(e.insert||"head");if(!r)throw new Error("Couldn't find a style target. This probably means that the value for the 'insert' parameter is invalid.");r.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 s=document.createTextNode(o),r=e.childNodes;if(r[t])e.removeChild(r[t]);if(r.length)e.insertBefore(s,r[t]);else e.appendChild(s)}}function m(e,t,n){var i=n.css,o=n.media,s=n.sourceMap;if(o)e.setAttribute("media",o);else e.removeAttribute("media");if(s&&btoa)i+="\n/*# sourceMappingURL=data:application/json;base64,".concat(btoa(unescape(encodeURIComponent(JSON.stringify(s))))," */");if(e.styleSheet)e.styleSheet.cssText=i;else{for(;e.firstChild;)e.removeChild(e.firstChild);e.appendChild(document.createTextNode(i))}}var f=null,p=0;function g(e,t){var n,i,o;if(t.singleton){var s=p++;n=f||(f=l(t));i=h.bind(null,n,s,!1);o=h.bind(null,n,s,!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=a(n[i]);r[o].references--}for(var s=c(e,t),l=0;l<n.length;l++){var u=a(n[l]);if(0===r[u].references){r[u].updater();r.splice(u,1)}}n=s}}}},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=(r=i,a=btoa(unescape(encodeURIComponent(JSON.stringify(r)))),c="sourceMappingURL=data:application/json;charset=utf-8;base64,".concat(a),"/*# ".concat(c," */")),s=i.sources.map((function(e){return"/*# sourceURL=".concat(i.sourceRoot||"").concat(e," */")}));return[n].concat(s).concat([o]).join("\n")}var r,a,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 s=0;s<this.length;s++){var r=this[s][0];if(null!=r)o[r]=!0}for(var a=0;a<e.length;a++){var c=[].concat(e[a]);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){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 s={compressToBase64:function(e){if(null==e)return"";var n=s._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 s._decompress(e.length,32,(function(n){return o(t,e.charAt(n))}))},compressToUTF16:function(t){if(null==t)return"";else return s._compress(t,15,(function(t){return e(t+32)}))+" "},decompressFromUTF16:function(e){if(null==e)return"";if(""==e)return null;else return s._decompress(e.length,16384,(function(t){return e.charCodeAt(t)-32}))},compressToUint8Array:function(e){for(var t=s.compress(e),n=new Uint8Array(2*t.length),i=0,o=t.length;i<o;i++){var r=t.charCodeAt(i);n[2*i]=r>>>8;n[2*i+1]=r%256}return n},decompressFromUint8Array:function(t){if(null==t)return s.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 r=[];n.forEach((function(t){r.push(e(t))}));return s.decompress(r.join(""))}},compressToEncodedURIComponent:function(e){if(null==e)return"";else return s._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 s._decompress(e.length,32,(function(t){return o(n,e.charAt(t))}))},compress:function(t){return s._compress(t,16,(function(t){return e(t)}))},_compress:function(e,t,n){if(null==e)return"";var i,o,s,r={},a={},c="",l="",u="",d=2,h=3,m=2,f=[],p=0,g=0;for(s=0;s<e.length;s+=1){c=e.charAt(s);if(!Object.prototype.hasOwnProperty.call(r,c)){r[c]=h++;a[c]=!0}l=u+c;if(Object.prototype.hasOwnProperty.call(r,l))u=l;else{if(Object.prototype.hasOwnProperty.call(a,u)){if(u.charCodeAt(0)<256){for(i=0;i<m;i++){p<<=1;if(g==t-1){g=0;f.push(n(p));p=0}else g++}o=u.charCodeAt(0);for(i=0;i<8;i++){p=p<<1|1&o;if(g==t-1){g=0;f.push(n(p));p=0}else g++;o>>=1}}else{o=1;for(i=0;i<m;i++){p=p<<1|o;if(g==t-1){g=0;f.push(n(p));p=0}else g++;o=0}o=u.charCodeAt(0);for(i=0;i<16;i++){p=p<<1|1&o;if(g==t-1){g=0;f.push(n(p));p=0}else g++;o>>=1}}if(0==--d){d=Math.pow(2,m);m++}delete a[u]}else{o=r[u];for(i=0;i<m;i++){p=p<<1|1&o;if(g==t-1){g=0;f.push(n(p));p=0}else g++;o>>=1}}if(0==--d){d=Math.pow(2,m);m++}r[l]=h++;u=String(c)}}if(""!==u){if(Object.prototype.hasOwnProperty.call(a,u)){if(u.charCodeAt(0)<256){for(i=0;i<m;i++){p<<=1;if(g==t-1){g=0;f.push(n(p));p=0}else g++}o=u.charCodeAt(0);for(i=0;i<8;i++){p=p<<1|1&o;if(g==t-1){g=0;f.push(n(p));p=0}else g++;o>>=1}}else{o=1;for(i=0;i<m;i++){p=p<<1|o;if(g==t-1){g=0;f.push(n(p));p=0}else g++;o=0}o=u.charCodeAt(0);for(i=0;i<16;i++){p=p<<1|1&o;if(g==t-1){g=0;f.push(n(p));p=0}else g++;o>>=1}}if(0==--d){d=Math.pow(2,m);m++}delete a[u]}else{o=r[u];for(i=0;i<m;i++){p=p<<1|1&o;if(g==t-1){g=0;f.push(n(p));p=0}else g++;o>>=1}}if(0==--d){d=Math.pow(2,m);m++}}o=2;for(i=0;i<m;i++){p=p<<1|1&o;if(g==t-1){g=0;f.push(n(p));p=0}else g++;o>>=1}for(;;){p<<=1;if(g==t-1){f.push(n(p));break}else g++}return f.join("")},decompress:function(e){if(null==e)return"";if(""==e)return null;else return s._decompress(e.length,32768,(function(t){return e.charCodeAt(t)}))},_decompress:function(t,n,i){var o,s,r,a,c,l,u,d=[],h=4,m=4,f=3,p="",g=[],b={val:i(0),position:n,index:1};for(o=0;o<3;o+=1)d[o]=o;r=0;c=Math.pow(2,2);l=1;for(;l!=c;){a=b.val&b.position;b.position>>=1;if(0==b.position){b.position=n;b.val=i(b.index++)}r|=(a>0?1:0)*l;l<<=1}switch(r){case 0:r=0;c=Math.pow(2,8);l=1;for(;l!=c;){a=b.val&b.position;b.position>>=1;if(0==b.position){b.position=n;b.val=i(b.index++)}r|=(a>0?1:0)*l;l<<=1}u=e(r);break;case 1:r=0;c=Math.pow(2,16);l=1;for(;l!=c;){a=b.val&b.position;b.position>>=1;if(0==b.position){b.position=n;b.val=i(b.index++)}r|=(a>0?1:0)*l;l<<=1}u=e(r);break;case 2:return""}d[3]=u;s=u;g.push(u);for(;;){if(b.index>t)return"";r=0;c=Math.pow(2,f);l=1;for(;l!=c;){a=b.val&b.position;b.position>>=1;if(0==b.position){b.position=n;b.val=i(b.index++)}r|=(a>0?1:0)*l;l<<=1}switch(u=r){case 0:r=0;c=Math.pow(2,8);l=1;for(;l!=c;){a=b.val&b.position;b.position>>=1;if(0==b.position){b.position=n;b.val=i(b.index++)}r|=(a>0?1:0)*l;l<<=1}d[m++]=e(r);u=m-1;h--;break;case 1:r=0;c=Math.pow(2,16);l=1;for(;l!=c;){a=b.val&b.position;b.position>>=1;if(0==b.position){b.position=n;b.val=i(b.index++)}r|=(a>0?1:0)*l;l<<=1}d[m++]=e(r);u=m-1;h--;break;case 2:return g.join("")}if(0==h){h=Math.pow(2,f);f++}if(d[u])p=d[u];else if(u===m)p=s+s.charAt(0);else return null;g.push(p);d[m++]=s+p.charAt(0);s=p;if(0==--h){h=Math.pow(2,f);f++}}}};return s}();if(1)void 0!==(i=function(){return o}.call(t,n,t,e))&&(e.exports=i)},function(e,t,n){"use strict";var i=/[A-Z]/g;t.create=function(e){var t=(e=e||{}).assign||Object.assign;if(0);var n=t({raw:"",pfx:"_",client:"object"==typeof window,assign:t,stringify:JSON.stringify,kebab:function(e){return e.replace(i,"-$&").toLowerCase()},decl:function(e,t){return(e=n.kebab(e))+":"+t+";"},hash:function(e){return function(e){for(var t=5381,n=e.length;n;)t=33*t^e.charCodeAt(--n);return"_"+(t>>>0).toString(36)}(n.stringify(e))},selector:function(e,t){return e+(":"===t[0]?"":" ")+t},putRaw:function(e){n.raw+=e}},e);if(n.client){if(!n.sh)document.head.appendChild(n.sh=document.createElement("style"));if(0);n.putRaw=function(e){if(1){var t=n.sh.sheet;try{t.insertRule(e,t.cssRules.length)}catch(e){}}}}n.put=function(e,t,i){var o,s,r="",a=[];for(o in t)if((s=t[o])instanceof Object&&!(s instanceof Array))a.push(o);else if(0);else r+=n.decl(o,s,e,i);if(r){if(0);else r=e+"{"+r+"}";n.putRaw(i?i+"{"+r+"}":r)}for(var c=0;c<a.length;c++)if("@"===(o=a[c])[0]&&"@font-face"!==o)n.putAt(e,t[o],o);else n.put(n.selector(e,o),t[o],i)};n.putAt=n.put;return n}},function(e){e.exports=JSON.parse('{"en.wikipedia.org":"https://en.wikipedia.org/w/index.php?title=User:Jack_who_built_the_house/convenientDiscussions.js&action=raw&ctype=text/javascript","he.wikipedia.org":"https://he.wikipedia.org/w/index.php?title=%D7%9E%D7%93%D7%99%D7%94_%D7%95%D7%99%D7%A7%D7%99:CD-config.js&action=raw&ctype=text/javascript","ru.wikipedia.org":"https://ru.wikipedia.org/w/index.php?title=\u0423\u0447\u0430\u0441\u0442\u043d\u0438\u043a:Jack_who_built_the_house/convenientDiscussions.js&action=raw&ctype=text/javascript"}')},function(e,t,n){var i=n(1),o=n(15);if("string"==typeof(o=o.__esModule?o.default:o))o=[[e.i,o,""]];var s={insert:"head",singleton:!1};i(o,s);e.exports=o.locals||{}},function(e,t,n){"use strict";e.exports=function(e,t){var i=n(11),o="",s="",r="";o=e.toString();var a=i("HTML_ENTITIES",t);if(!1===a)return!1;delete a["&"];a["&"]="&amp;";for(r in a){s=a[r];o=o.split(s).join(r)}return o=o.split("&#039;").join("'")}},function(e,t,n){e.exports=function(){return n(14)('!function(t){var e={};function r(i){if(e[i])return e[i].exports;var n=e[i]={i:i,l:!1,exports:{}};t[i].call(n.exports,n,n.exports,r);n.l=!0;return n.exports}r.m=t;r.c=e;r.d=function(t,e,i){if(!r.o(t,e))Object.defineProperty(t,e,{enumerable:!0,get:i})};r.r=function(t){if("undefined"!=typeof Symbol&&Symbol.toStringTag)Object.defineProperty(t,Symbol.toStringTag,{value:"Module"});Object.defineProperty(t,"__esModule",{value:!0})};r.t=function(t,e){if(1&e)t=r(t);if(8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var i=Object.create(null);r.r(i);Object.defineProperty(i,"default",{enumerable:!0,value:t});if(2&e&&"string"!=typeof t)for(var n in t)r.d(i,n,function(e){return t[e]}.bind(null,n));return i};r.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};r.d(e,"a",e);return e};r.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)};r.p="";r(r.s=28)}([function(t,e,r){"use strict";const i="undefined"==typeof window?self:window;i.convenientDiscussions=i.convenientDiscussions||{};if("object"!=typeof i.convenientDiscussions)i.convenientDiscussions={};e.a=i.convenientDiscussions},function(t,e,r){"use strict";r.d(e,"f",(function(){return n}));r.d(e,"a",(function(){return s}));r.d(e,"c",(function(){return o}));r.d(e,"i",(function(){return a}));r.d(e,"h",(function(){return u}));r.d(e,"b",(function(){return c}));r.d(e,"d",(function(){return l}));r.d(e,"e",(function(){return f}));r.d(e,"g",(function(){return h}));r(23),r(4);var i=r(0);function n(t,e){if(e&&t.nodeType===Node.TEXT_NODE)return!0;if(t.nodeType!==Node.ELEMENT_NODE)return null;if(i.a.g.POPULAR_INLINE_ELEMENTS.includes(t.tagName))return!0;else if(i.a.g.POPULAR_NOT_INLINE_ELEMENTS.includes(t.tagName))return!1;else if("undefined"!=typeof window){console.warn("Expensive operation: isInline() called for:",t);return window.getComputedStyle(t).display.startsWith("inline")}else return null}function s(t){return void 0!==t}function o(t){return[].concat(...t)}function a(t){return t.replace(/_/g," ")}function u(t){return t.replace(/ /g,"_")}function c(t){return t.length?function(t){if(""===i.a.g.PHP_CHAR_TO_UPPER_JSON[t])return t;else return i.a.g.PHP_CHAR_TO_UPPER_JSON[t]||t.toUpperCase()}(t[0])+t.slice(1):""}function l(t){return t.map(mw.msg)}function f(t,e,r,i){return t.replace(e,(t,e,n)=>{if("number"==typeof e){e=null;n=null}return(e||"")+(i?"\\x03":"\\x01")+r.push(n||t)+(i?"\\x04":"\\x02")})}function h(t){return t.replace(/[\\u200E\\u200F]/g,"")}},function(t,e,r){"use strict";r.d(e,"b",(function(){return a}));r.d(e,"a",(function(){return c}));r.d(e,"c",(function(){return f}));r.d(e,"d",(function(){return h}));var i=r(0),n=r(1);let s,o;function a(t,e){t=Object(n.g)(t);if(!s){s=new RegExp("^([^]*)(".concat(i.a.g.TIMESTAMP_REGEXP.source,")(?![\\"\'\\xbb])"));o=new RegExp("^([^]*)(".concat(i.a.g.TIMESTAMP_REGEXP_NO_TIMEZONE.source,")"))}const r=void 0===e?s:o,a=t.match(r);if(!a)return null;else return{date:i.a.g.TIMESTAMP_PARSER(a,i.a,e),match:a}}function u(t,e){return("0000"+t).slice(-e)}function c(t,e,r=!1){let i=t.getUTCFullYear(),s=t.getUTCMonth(),o=t.getUTCDate(),a=t.getUTCHours(),c=t.getUTCMinutes(),f=u(i,4)+u(s+1,2)+u(o,2)+u(a,2)+u(c,2)+(e?"_"+Object(n.h)(e):"");if(r&&l.includes(f)){let t=2;const e=f;do{f="".concat(e,"_").concat(t);t++}while(l.includes(f))}return f}let l=[];function f(t){if(t)l.push(t)}function h(){l=[]}},function(t,e,r){"use strict";function i(t){for(var r in t)if(!e.hasOwnProperty(r))e[r]=t[r]}var n=this&&this.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var r in t)if(Object.hasOwnProperty.call(t,r))e[r]=t[r];e.default=t;return e};Object.defineProperty(e,"__esModule",{value:!0});var s=r(10);e.Parser=s.Parser;var o=r(14);e.DomHandler=o.DomHandler;e.DefaultHandler=o.DomHandler;e.parseDOM=function(t,e){var r=new o.DomHandler(void 0,e);new s.Parser(r,e).end(t);return r.dom};e.createDomStream=function(t,e,r){var i=new o.DomHandler(t,e,r);return new s.Parser(i,e)};var a=r(11);e.Tokenizer=a.default;var u=n(r(9));e.ElementType=u;e.EVENTS={attribute:2,cdatastart:0,cdataend:0,text:1,processinginstruction:2,comment:1,commentend:0,closetag:1,opentag:2,opentagname:1,error:1,end:0};i(r(15));i(r(41));i(r(42));var c=n(r(16));e.DomUtils=c;var l=r(15);e.RssHandler=l.FeedHandler},function(t,e,r){"use strict";r.d(e,"a",(function(){return CdError}));class CdError extends Error{constructor(t){let e;if(t){var r,i;e=t.type;if(t.code)e+="/".concat(t.code);if(null==t?void 0:null===(r=t.apiData)||void 0===r?void 0:null===(i=r.error)||void 0===i?void 0:i.code)e+="/".concat(t.apiData.error.code)}else e="";super(e);this.name="CdError";this.data=t}}},function(t,e,r){"use strict";r.d(e,"c",(function(){return TreeWalker}));r.d(e,"b",(function(){return ElementsTreeWalker}));r.d(e,"a",(function(){return ElementsAndTextTreeWalker}));var i=r(0);class TreeWalker{constructor(t,e,r=!1,i=t){this.acceptNode=e;this.root=t;this.currentNode=i;if(r){this.firstChildProperty="firstElementChild";this.lastChildProperty="lastElementChild";this.previousSiblingProperty="previousElementSibling";this.nextSiblingProperty="nextElementSibling"}else{this.firstChildProperty="firstChild";this.lastChildProperty="lastChild";this.previousSiblingProperty="previousSibling";this.nextSiblingProperty="nextSibling"}}tryMove(t){let e=this.currentNode;if(e===this.root&&!t.includes("Child"))return null;do{e=e[t]}while(e&&this.acceptNode&&!this.acceptNode(e));if(e)this.currentNode=e;return e||null}parentNode(){return this.tryMove("parentNode")}firstChild(){return this.tryMove(this.firstChildProperty)}lastChild(){return this.tryMove(this.lastChildProperty)}previousSibling(){return this.tryMove(this.previousSiblingProperty)}nextSibling(){return this.tryMove(this.nextSiblingProperty)}nextNode(){let t=this.currentNode;do{if(t[this.firstChildProperty])t=t[this.firstChildProperty];else{for(;t&&!t[this.nextSiblingProperty]&&t.parentNode!==this.root;)t=t.parentNode;if(t)t=t[this.nextSiblingProperty]}}while(t&&this.acceptNode&&!this.acceptNode(t));if(t)this.currentNode=t;return t}previousNode(){let t=this.currentNode;if(t!==this.root){do{if(t[this.previousSiblingProperty]){t=t[this.previousSiblingProperty];for(;t[this.lastChildProperty];)t=t[this.lastChildProperty]}else t=t.parentNode}while(t&&this.acceptNode&&!this.acceptNode(t));if(t)this.currentNode=t;return t}}}class ElementsTreeWalker extends TreeWalker{constructor(t){super(i.a.g.rootElement,null,!0);if(t)this.currentNode=t}}class ElementsAndTextTreeWalker extends TreeWalker{constructor(t){super(i.a.g.rootElement,t=>t.nodeType===Node.TEXT_NODE||t.nodeType===Node.ELEMENT_NODE);if(t)this.currentNode=t}}},function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=r(9);e.isTag=function(t){return i.isTag(t)};e.isCDATA=function(t){return"cdata"===t.type};e.isText=function(t){return"text"===t.type};e.isComment=function(t){return"comment"===t.type};e.hasChildren=function(t){return Object.prototype.hasOwnProperty.call(t,"children")}},function(t){t.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(t){t.exports=JSON.parse(\'{"amp":"&","apos":"\\\'","gt":">","lt":"<","quot":"\\\\""}\')},function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0});e.isTag=function(t){return"tag"===t.type||"script"===t.type||"style"===t.type};e.Text="text";e.Directive="directive";e.Comment="comment";e.Script="script";e.Style="style";e.Tag="tag";e.CDATA="cdata";e.Doctype="doctype"},function(t,e,r){"use strict";var i,n=this&&this.__extends||(i=function(t,e){return(i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)if(e.hasOwnProperty(r))t[r]=e[r]})(t,e)},function(t,e){i(t,e);function r(){this.constructor=t}t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}),s=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var o=s(r(11)),a=r(31),u=new Set(["input","option","optgroup","select","button","datalist","textarea"]),c=new Set(["p"]),l={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:c,h1:c,h2:c,h3:c,h4:c,h5:c,h6:c,select:u,input:u,output:u,button:u,datalist:u,textarea:u,option:new Set(["option"]),optgroup:new Set(["optgroup","option"]),dd:new Set(["dt","dd"]),dt:new Set(["dt","dd"]),address:c,article:c,aside:c,blockquote:c,details:c,div:c,dl:c,fieldset:c,figcaption:c,figure:c,footer:c,form:c,header:c,hr:c,main:c,nav:c,ol:c,pre:c,section:c,table:c,ul:c,rt:new Set(["rt","rp"]),rp:new Set(["rt","rp"]),tbody:new Set(["thead","tbody"]),tfoot:new Set(["thead","tbody"])},f=new Set(["area","base","basefont","br","col","command","embed","frame","hr","img","input","isindex","keygen","link","meta","param","source","track","wbr"]),h=new Set(["math","svg"]),d=new Set(["mi","mo","mn","ms","mtext","annotation-xml","foreignObject","desc","title"]),p=/\\s|\\//,_=function(t){n(e,t);function e(r,i){var n=t.call(this)||this;n._tagname="";n._attribname="";n._attribvalue="";n._attribs=null;n._stack=[];n._foreignContext=[];n.startIndex=0;n.endIndex=null;n.parseChunk=e.prototype.write;n.done=e.prototype.end;n._options=i||{};n._cbs=r||{};n._tagname="";n._attribname="";n._attribvalue="";n._attribs=null;n._stack=[];n._foreignContext=[];n.startIndex=0;n.endIndex=null;n._lowerCaseTagNames="lowerCaseTags"in n._options?!!n._options.lowerCaseTags:!n._options.xmlMode;n._lowerCaseAttributeNames="lowerCaseAttributeNames"in n._options?!!n._options.lowerCaseAttributeNames:!n._options.xmlMode;n._tokenizer=new(n._options.Tokenizer||o.default)(n._options,n);if(n._cbs.onparserinit)n._cbs.onparserinit(n);return n}e.prototype._updatePosition=function(t){if(null===this.endIndex)if(this._tokenizer._sectionStart<=t)this.startIndex=0;else this.startIndex=this._tokenizer._sectionStart-t;else this.startIndex=this.endIndex+1;this.endIndex=this._tokenizer.getAbsoluteIndex()};e.prototype.ontext=function(t){this._updatePosition(1);this.endIndex--;if(this._cbs.ontext)this._cbs.ontext(t)};e.prototype.onopentagname=function(t){if(this._lowerCaseTagNames)t=t.toLowerCase();this._tagname=t;if(!this._options.xmlMode&&Object.prototype.hasOwnProperty.call(l,t))for(var e=void 0;l[t].has(e=this._stack[this._stack.length-1]);this.onclosetag(e));if(this._options.xmlMode||!f.has(t)){this._stack.push(t);if(h.has(t))this._foreignContext.push(!0);else if(d.has(t))this._foreignContext.push(!1)}if(this._cbs.onopentagname)this._cbs.onopentagname(t);if(this._cbs.onopentag)this._attribs={}};e.prototype.onopentagend=function(){this._updatePosition(1);if(this._attribs){if(this._cbs.onopentag)this._cbs.onopentag(this._tagname,this._attribs);this._attribs=null}if(!this._options.xmlMode&&this._cbs.onclosetag&&f.has(this._tagname))this._cbs.onclosetag(this._tagname);this._tagname=""};e.prototype.onclosetag=function(t){this._updatePosition(1);if(this._lowerCaseTagNames)t=t.toLowerCase();if(h.has(t)||d.has(t))this._foreignContext.pop();if(this._stack.length&&(this._options.xmlMode||!f.has(t))){var e=this._stack.lastIndexOf(t);if(-1!==e)if(this._cbs.onclosetag){e=this._stack.length-e;for(;e--;)this._cbs.onclosetag(this._stack.pop())}else this._stack.length=e;else if("p"===t&&!this._options.xmlMode){this.onopentagname(t);this._closeCurrentTag()}}else if(!this._options.xmlMode&&("br"===t||"p"===t)){this.onopentagname(t);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 t=this._tagname;this.onopentagend();if(this._stack[this._stack.length-1]===t){if(this._cbs.onclosetag)this._cbs.onclosetag(t);this._stack.pop()}};e.prototype.onattribname=function(t){if(this._lowerCaseAttributeNames)t=t.toLowerCase();this._attribname=t};e.prototype.onattribdata=function(t){this._attribvalue+=t};e.prototype.onattribend=function(){if(this._cbs.onattribute)this._cbs.onattribute(this._attribname,this._attribvalue);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(t){var e=t.search(p),r=e<0?t:t.substr(0,e);if(this._lowerCaseTagNames)r=r.toLowerCase();return r};e.prototype.ondeclaration=function(t){if(this._cbs.onprocessinginstruction){var e=this._getInstructionName(t);this._cbs.onprocessinginstruction("!"+e,"!"+t)}};e.prototype.onprocessinginstruction=function(t){if(this._cbs.onprocessinginstruction){var e=this._getInstructionName(t);this._cbs.onprocessinginstruction("?"+e,"?"+t)}};e.prototype.oncomment=function(t){this._updatePosition(4);if(this._cbs.oncomment)this._cbs.oncomment(t);if(this._cbs.oncommentend)this._cbs.oncommentend()};e.prototype.oncdata=function(t){this._updatePosition(1);if(this._options.xmlMode||this._options.recognizeCDATA){if(this._cbs.oncdatastart)this._cbs.oncdatastart();if(this._cbs.ontext)this._cbs.ontext(t);if(this._cbs.oncdataend)this._cbs.oncdataend()}else this.oncomment("[CDATA["+t+"]]")};e.prototype.onerror=function(t){if(this._cbs.onerror)this._cbs.onerror(t)};e.prototype.onend=function(){if(this._cbs.onclosetag)for(var t=this._stack.length;t>0;this._cbs.onclosetag(this._stack[--t]));if(this._cbs.onend)this._cbs.onend()};e.prototype.reset=function(){if(this._cbs.onreset)this._cbs.onreset();this._tokenizer.reset();this._tagname="";this._attribname="";this._attribs=null;this._stack=[];if(this._cbs.onparserinit)this._cbs.onparserinit(this)};e.prototype.parseComplete=function(t){this.reset();this.end(t)};e.prototype.write=function(t){this._tokenizer.write(t)};e.prototype.end=function(t){this._tokenizer.end(t)};e.prototype.pause=function(){this._tokenizer.pause()};e.prototype.resume=function(){this._tokenizer.resume()};return e}(a.EventEmitter);e.Parser=_},function(t,e,r){"use strict";var i=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var n=i(r(12)),s=i(r(7)),o=i(r(13)),a=i(r(8));function u(t){return" "===t||"\\n"===t||"\\t"===t||"\\f"===t||"\\r"===t}function c(t,e,r){var i=t.toLowerCase();if(t===i)return function(t,n){if(n===i)t._state=e;else{t._state=r;t._index--}};else return function(n,s){if(s===i||s===t)n._state=e;else{n._state=r;n._index--}}}function l(t,e){var r=t.toLowerCase();return function(i,n){if(n===r||n===t)i._state=e;else{i._state=3;i._index--}}}var f=c("C",23,16),h=c("D",24,16),d=c("A",25,16),p=c("T",26,16),_=c("A",27,16),m=l("R",34),g=l("I",35),b=l("P",36),E=l("T",37),y=c("R",39,1),v=c("I",40,1),A=c("P",41,1),C=c("T",42,1),T=l("Y",44),D=l("L",45),x=l("E",46),N=c("Y",48,1),S=c("L",49,1),O=c("E",50,1),L=c("#",52,53),w=c("X",55,54),P=function(){function t(t,e){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=e;this._xmlMode=!(!t||!t.xmlMode);this._decodeEntities=!(!t||!t.decodeEntities)}t.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};t.prototype._stateText=function(t){if("<"===t){if(this._index>this._sectionStart)this._cbs.ontext(this._getSection());this._state=2;this._sectionStart=this._index}else if(this._decodeEntities&&1===this._special&&"&"===t){if(this._index>this._sectionStart)this._cbs.ontext(this._getSection());this._baseState=1;this._state=51;this._sectionStart=this._index}};t.prototype._stateBeforeTagName=function(t){if("/"===t)this._state=5;else if("<"===t){this._cbs.ontext(this._getSection());this._sectionStart=this._index}else if(">"===t||1!==this._special||u(t))this._state=1;else if("!"===t){this._state=15;this._sectionStart=this._index+1}else if("?"===t){this._state=17;this._sectionStart=this._index+1}else{this._state=!this._xmlMode&&("s"===t||"S"===t)?31:3;this._sectionStart=this._index}};t.prototype._stateInTagName=function(t){if("/"===t||">"===t||u(t)){this._emitToken("onopentagname");this._state=8;this._index--}};t.prototype._stateBeforeClosingTagName=function(t){if(u(t));else if(">"===t)this._state=1;else if(1!==this._special)if("s"===t||"S"===t)this._state=32;else{this._state=1;this._index--}else{this._state=6;this._sectionStart=this._index}};t.prototype._stateInClosingTagName=function(t){if(">"===t||u(t)){this._emitToken("onclosetag");this._state=7;this._index--}};t.prototype._stateAfterClosingTagName=function(t){if(">"===t){this._state=1;this._sectionStart=this._index+1}};t.prototype._stateBeforeAttributeName=function(t){if(">"===t){this._cbs.onopentagend();this._state=1;this._sectionStart=this._index+1}else if("/"===t)this._state=4;else if(!u(t)){this._state=9;this._sectionStart=this._index}};t.prototype._stateInSelfClosingTag=function(t){if(">"===t){this._cbs.onselfclosingtag();this._state=1;this._sectionStart=this._index+1}else if(!u(t)){this._state=8;this._index--}};t.prototype._stateInAttributeName=function(t){if("="===t||"/"===t||">"===t||u(t)){this._cbs.onattribname(this._getSection());this._sectionStart=-1;this._state=10;this._index--}};t.prototype._stateAfterAttributeName=function(t){if("="===t)this._state=11;else if("/"===t||">"===t){this._cbs.onattribend();this._state=8;this._index--}else if(!u(t)){this._cbs.onattribend();this._state=9;this._sectionStart=this._index}};t.prototype._stateBeforeAttributeValue=function(t){if(\'"\'===t){this._state=12;this._sectionStart=this._index+1}else if("\'"===t){this._state=13;this._sectionStart=this._index+1}else if(!u(t)){this._state=14;this._sectionStart=this._index;this._index--}};t.prototype._stateInAttributeValueDoubleQuotes=function(t){if(\'"\'===t){this._emitToken("onattribdata");this._cbs.onattribend();this._state=8}else if(this._decodeEntities&&"&"===t){this._emitToken("onattribdata");this._baseState=this._state;this._state=51;this._sectionStart=this._index}};t.prototype._stateInAttributeValueSingleQuotes=function(t){if("\'"===t){this._emitToken("onattribdata");this._cbs.onattribend();this._state=8}else if(this._decodeEntities&&"&"===t){this._emitToken("onattribdata");this._baseState=this._state;this._state=51;this._sectionStart=this._index}};t.prototype._stateInAttributeValueNoQuotes=function(t){if(u(t)||">"===t){this._emitToken("onattribdata");this._cbs.onattribend();this._state=8;this._index--}else if(this._decodeEntities&&"&"===t){this._emitToken("onattribdata");this._baseState=this._state;this._state=51;this._sectionStart=this._index}};t.prototype._stateBeforeDeclaration=function(t){this._state="["===t?22:"-"===t?18:16};t.prototype._stateInDeclaration=function(t){if(">"===t){this._cbs.ondeclaration(this._getSection());this._state=1;this._sectionStart=this._index+1}};t.prototype._stateInProcessingInstruction=function(t){if(">"===t){this._cbs.onprocessinginstruction(this._getSection());this._state=1;this._sectionStart=this._index+1}};t.prototype._stateBeforeComment=function(t){if("-"===t){this._state=19;this._sectionStart=this._index+1}else this._state=16};t.prototype._stateInComment=function(t){if("-"===t)this._state=20};t.prototype._stateAfterComment1=function(t){if("-"===t)this._state=21;else this._state=19};t.prototype._stateAfterComment2=function(t){if(">"===t){this._cbs.oncomment(this._buffer.substring(this._sectionStart,this._index-2));this._state=1;this._sectionStart=this._index+1}else if("-"!==t)this._state=19};t.prototype._stateBeforeCdata6=function(t){if("["===t){this._state=28;this._sectionStart=this._index+1}else{this._state=16;this._index--}};t.prototype._stateInCdata=function(t){if("]"===t)this._state=29};t.prototype._stateAfterCdata1=function(t){if("]"===t)this._state=30;else this._state=28};t.prototype._stateAfterCdata2=function(t){if(">"===t){this._cbs.oncdata(this._buffer.substring(this._sectionStart,this._index-2));this._state=1;this._sectionStart=this._index+1}else if("]"!==t)this._state=28};t.prototype._stateBeforeSpecial=function(t){if("c"===t||"C"===t)this._state=33;else if("t"===t||"T"===t)this._state=43;else{this._state=3;this._index--}};t.prototype._stateBeforeSpecialEnd=function(t){if(2===this._special&&("c"===t||"C"===t))this._state=38;else if(3===this._special&&("t"===t||"T"===t))this._state=47;else this._state=1};t.prototype._stateBeforeScript5=function(t){if("/"===t||">"===t||u(t))this._special=2;this._state=3;this._index--};t.prototype._stateAfterScript5=function(t){if(">"===t||u(t)){this._special=1;this._state=6;this._sectionStart=this._index-6;this._index--}else this._state=1};t.prototype._stateBeforeStyle4=function(t){if("/"===t||">"===t||u(t))this._special=3;this._state=3;this._index--};t.prototype._stateAfterStyle4=function(t){if(">"===t||u(t)){this._special=1;this._state=6;this._sectionStart=this._index-5;this._index--}else this._state=1};t.prototype._parseNamedEntityStrict=function(){if(this._sectionStart+1<this._index){var t=this._buffer.substring(this._sectionStart+1,this._index),e=this._xmlMode?a.default:s.default;if(Object.prototype.hasOwnProperty.call(e,t)){this._emitPartial(e[t]);this._sectionStart=this._index+1}}};t.prototype._parseLegacyEntity=function(){var t=this._sectionStart+1,e=this._index-t;if(e>6)e=6;for(;e>=2;){var r=this._buffer.substr(t,e);if(Object.prototype.hasOwnProperty.call(o.default,r)){this._emitPartial(o.default[r]);this._sectionStart+=e+1;return}else e--}};t.prototype._stateInNamedEntity=function(t){if(";"===t){this._parseNamedEntityStrict();if(this._sectionStart+1<this._index&&!this._xmlMode)this._parseLegacyEntity();this._state=this._baseState}else if((t<"a"||t>"z")&&(t<"A"||t>"Z")&&(t<"0"||t>"9")){if(this._xmlMode||this._sectionStart+1===this._index);else if(1!==this._baseState){if("="!==t)this._parseNamedEntityStrict()}else this._parseLegacyEntity();this._state=this._baseState;this._index--}};t.prototype._decodeNumericEntity=function(t,e){var r=this._sectionStart+t;if(r!==this._index){var i=this._buffer.substring(r,this._index),s=parseInt(i,e);this._emitPartial(n.default(s));this._sectionStart=this._index}else this._sectionStart--;this._state=this._baseState};t.prototype._stateInNumericEntity=function(t){if(";"===t){this._decodeNumericEntity(2,10);this._sectionStart++}else if(t<"0"||t>"9"){if(!this._xmlMode)this._decodeNumericEntity(2,10);else this._state=this._baseState;this._index--}};t.prototype._stateInHexEntity=function(t){if(";"===t){this._decodeNumericEntity(3,16);this._sectionStart++}else if((t<"a"||t>"f")&&(t<"A"||t>"F")&&(t<"0"||t>"9")){if(!this._xmlMode)this._decodeNumericEntity(3,16);else this._state=this._baseState;this._index--}};t.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}};t.prototype.write=function(t){if(this._ended)this._cbs.onerror(Error(".write() after done!"));this._buffer+=t;this._parse()};t.prototype._parse=function(){for(;this._index<this._buffer.length&&this._running;){var t=this._buffer.charAt(this._index);if(1===this._state)this._stateText(t);else if(12===this._state)this._stateInAttributeValueDoubleQuotes(t);else if(9===this._state)this._stateInAttributeName(t);else if(19===this._state)this._stateInComment(t);else if(8===this._state)this._stateBeforeAttributeName(t);else if(3===this._state)this._stateInTagName(t);else if(6===this._state)this._stateInClosingTagName(t);else if(2===this._state)this._stateBeforeTagName(t);else if(10===this._state)this._stateAfterAttributeName(t);else if(13===this._state)this._stateInAttributeValueSingleQuotes(t);else if(11===this._state)this._stateBeforeAttributeValue(t);else if(5===this._state)this._stateBeforeClosingTagName(t);else if(7===this._state)this._stateAfterClosingTagName(t);else if(31===this._state)this._stateBeforeSpecial(t);else if(20===this._state)this._stateAfterComment1(t);else if(14===this._state)this._stateInAttributeValueNoQuotes(t);else if(4===this._state)this._stateInSelfClosingTag(t);else if(16===this._state)this._stateInDeclaration(t);else if(15===this._state)this._stateBeforeDeclaration(t);else if(21===this._state)this._stateAfterComment2(t);else if(18===this._state)this._stateBeforeComment(t);else if(32===this._state)this._stateBeforeSpecialEnd(t);else if(38===this._state)y(this,t);else if(39===this._state)v(this,t);else if(40===this._state)A(this,t);else if(33===this._state)m(this,t);else if(34===this._state)g(this,t);else if(35===this._state)b(this,t);else if(36===this._state)E(this,t);else if(37===this._state)this._stateBeforeScript5(t);else if(41===this._state)C(this,t);else if(42===this._state)this._stateAfterScript5(t);else if(43===this._state)T(this,t);else if(28===this._state)this._stateInCdata(t);else if(44===this._state)D(this,t);else if(45===this._state)x(this,t);else if(46===this._state)this._stateBeforeStyle4(t);else if(47===this._state)N(this,t);else if(48===this._state)S(this,t);else if(49===this._state)O(this,t);else if(50===this._state)this._stateAfterStyle4(t);else if(17===this._state)this._stateInProcessingInstruction(t);else if(53===this._state)this._stateInNamedEntity(t);else if(22===this._state)f(this,t);else if(51===this._state)L(this,t);else if(23===this._state)h(this,t);else if(24===this._state)d(this,t);else if(29===this._state)this._stateAfterCdata1(t);else if(30===this._state)this._stateAfterCdata2(t);else if(25===this._state)p(this,t);else if(26===this._state)_(this,t);else if(27===this._state)this._stateBeforeCdata6(t);else if(55===this._state)this._stateInHexEntity(t);else if(54===this._state)this._stateInNumericEntity(t);else if(52===this._state)w(this,t);else this._cbs.onerror(Error("unknown _state"),this._state);this._index++}this._cleanup()};t.prototype.pause=function(){this._running=!1};t.prototype.resume=function(){this._running=!0;if(this._index<this._buffer.length)this._parse();if(this._ended)this._finish()};t.prototype.end=function(t){if(this._ended)this._cbs.onerror(Error(".end() after done!"));if(t)this.write(t);this._ended=!0;if(this._running)this._finish()};t.prototype._finish=function(){if(this._sectionStart<this._index)this._handleTrailingData();this._cbs.onend()};t.prototype._handleTrailingData=function(){var t=this._buffer.substr(this._sectionStart);if(28===this._state||29===this._state||30===this._state)this._cbs.oncdata(t);else if(19===this._state||20===this._state||21===this._state)this._cbs.oncomment(t);else if(53===this._state&&!this._xmlMode){this._parseLegacyEntity();if(this._sectionStart<this._index){this._state=this._baseState;this._handleTrailingData()}}else if(54===this._state&&!this._xmlMode){this._decodeNumericEntity(2,10);if(this._sectionStart<this._index){this._state=this._baseState;this._handleTrailingData()}}else if(55===this._state&&!this._xmlMode){this._decodeNumericEntity(3,16);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(t)};t.prototype.getAbsoluteIndex=function(){return this._bufferOffset+this._index};t.prototype._getSection=function(){return this._buffer.substring(this._sectionStart,this._index)};t.prototype._emitToken=function(t){this._cbs[t](this._getSection());this._sectionStart=-1};t.prototype._emitPartial=function(t){if(1!==this._baseState)this._cbs.onattribdata(t);else this._cbs.ontext(t)};return t}();e.default=P},function(t,e,r){"use strict";var i=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var n=i(r(30));e.default=function(t){if(t>=55296&&t<=57343||t>1114111)return"\\ufffd";if(t in n.default)t=n.default[t];var e="";if(t>65535){t-=65536;e+=String.fromCharCode(t>>>10&1023|55296);t=56320|1023&t}return e+=String.fromCharCode(t)}},function(t){t.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(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=r(32);e.Node=i.Node;e.Element=i.Element;e.DataNode=i.DataNode;e.NodeWithChildren=i.NodeWithChildren;var n=/\\s+/g,s={normalizeWhitespace:!1,withStartIndices:!1,withEndIndices:!1},o=function(){function t(t,e,r){this.dom=[];this._done=!1;this._tagStack=[];this._lastNode=null;this._parser=null;if("function"==typeof e){r=e;e=s}if("object"==typeof t){e=t;t=void 0}this._callback=t||null;this._options=e||s;this._elementCB=r||null}t.prototype.onparserinit=function(t){this._parser=t};t.prototype.onreset=function(){this.dom=[];this._done=!1;this._tagStack=[];this._lastNode=null;this._parser=this._parser||null};t.prototype.onend=function(){if(!this._done){this._done=!0;this._parser=null;this.handleCallback(null)}};t.prototype.onerror=function(t){this.handleCallback(t)};t.prototype.onclosetag=function(){this._lastNode=null;var t=this._tagStack.pop();if(t&&this._parser){if(this._options.withEndIndices)t.endIndex=this._parser.endIndex;if(this._elementCB)this._elementCB(t)}};t.prototype.onopentag=function(t,e){var r=new i.Element(t,e);this.addNode(r);this._tagStack.push(r)};t.prototype.ontext=function(t){var e=this._options.normalizeWhitespace,r=this._lastNode;if(r&&"text"===r.type)if(e)r.data=(r.data+t).replace(n," ");else r.data+=t;else{if(e)t=t.replace(n," ");var s=new i.DataNode("text",t);this.addNode(s);this._lastNode=s}};t.prototype.oncomment=function(t){if(!this._lastNode||"comment"!==this._lastNode.type){var e=new i.DataNode("comment",t);this.addNode(e);this._lastNode=e}else this._lastNode.data+=t};t.prototype.oncommentend=function(){this._lastNode=null};t.prototype.oncdatastart=function(){var t=new i.DataNode("text",""),e=new i.NodeWithChildren("cdata",[t]);this.addNode(e);t.parent=e;this._lastNode=t};t.prototype.oncdataend=function(){this._lastNode=null};t.prototype.onprocessinginstruction=function(t,e){var r=new i.ProcessingInstruction(t,e);this.addNode(r)};t.prototype.handleCallback=function(t){if("function"==typeof this._callback)this._callback(t,this.dom);else if(t)throw t};t.prototype.addNode=function(t){var e=this._tagStack[this._tagStack.length-1],r=e?e.children:this.dom,i=r[r.length-1];if(this._parser){if(this._options.withStartIndices)t.startIndex=this._parser.startIndex;if(this._options.withEndIndices)t.endIndex=this._parser.endIndex}r.push(t);if(i){t.prev=i;i.next=t}if(e)t.parent=e;this._lastNode=null};t.prototype.addDataNode=function(t){this.addNode(t);this._lastNode=t};return t}();e.DomHandler=o;e.default=o},function(t,e,r){"use strict";var i,n=this&&this.__extends||(i=function(t,e){return(i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)if(e.hasOwnProperty(r))t[r]=e[r]})(t,e)},function(t,e){i(t,e);function r(){this.constructor=t}t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}),s=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}},o=this&&this.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var r in t)if(Object.hasOwnProperty.call(t,r))e[r]=t[r];e.default=t;return e};Object.defineProperty(e,"__esModule",{value:!0});var a=s(r(14)),u=o(r(16)),c=r(10),l=function(t){n(e,t);function e(e,r){if("object"==typeof e&&null!==e)r=e=void 0;return t.call(this,e,r)||this}e.prototype.onend=function(){var t={},e=h(m,this.dom);if(e)if("feed"===e.name){var r=e.children;t.type="atom";_(t,"id","id",r);_(t,"title","title",r);var i=p("href",h("link",r));if(i)t.link=i;_(t,"description","subtitle",r);if(n=d("updated",r))t.updated=new Date(n);_(t,"author","email",r,!0);t.items=f("entry",r).map((function(t){var e={},r=t.children;_(e,"id","id",r);_(e,"title","title",r);var i=p("href",h("link",r));if(i)e.link=i;var n=d("summary",r)||d("content",r);if(n)e.description=n;var s=d("updated",r);if(s)e.pubDate=new Date(s);return e}))}else{var n;r=h("channel",e.children).children;t.type=e.name.substr(0,3);t.id="";_(t,"title","title",r);_(t,"link","link",r);_(t,"description","description",r);if(n=d("lastBuildDate",r))t.updated=new Date(n);_(t,"author","managingEditor",r,!0);t.items=f("item",e.children).map((function(t){var e={},r=t.children;_(e,"id","guid",r);_(e,"title","title",r);_(e,"link","link",r);_(e,"description","description",r);var i=d("pubDate",r);if(i)e.pubDate=new Date(i);return e}))}this.feed=t;this.handleCallback(e?null:Error("couldn\'t find root of feed"))};return e}(a.default);e.FeedHandler=l;function f(t,e){return u.getElementsByTagName(t,e,!0)}function h(t,e){return u.getElementsByTagName(t,e,!0,1)[0]}function d(t,e,r){if(void 0===r)r=!1;return u.getText(u.getElementsByTagName(t,e,r,1)).trim()}function p(t,e){if(!e)return null;else return e.attribs[t]}function _(t,e,r,i,n){if(void 0===n)n=!1;var s=d(r,i,n);if(s)t[e]=s}function m(t){return"rss"===t||"feed"===t||"rdf:RDF"===t}var g={xmlMode:!0};e.parseFeed=function(t,e){if(void 0===e)e=g;var r=new l(e);new c.Parser(r,e).end(t);return r.feed}},function(t,e,r){"use strict";function i(t){for(var r in t)if(!e.hasOwnProperty(r))e[r]=t[r]}Object.defineProperty(e,"__esModule",{value:!0});i(r(33));i(r(37));i(r(38));i(r(19));i(r(39));i(r(40));i(r(6))},function(t,e,r){"use strict";var i=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var n=i(r(7)),s=i(r(13)),o=i(r(8)),a=i(r(12));e.decodeXML=u(o.default);e.decodeHTMLStrict=u(n.default);function u(t){var e=Object.keys(t).join("|"),r=l(t),i=new RegExp("&(?:"+(e+="|#[xX][\\\\da-fA-F]+|#\\\\d+")+");","g");return function(t){return String(t).replace(i,r)}}var c=function(t,e){return t<e?1:-1};e.decodeHTML=function(){for(var t=Object.keys(s.default).sort(c),e=Object.keys(n.default).sort(c),r=0,i=0;r<e.length;r++)if(t[i]===e[r]){e[r]+=";?";i++}else e[r]+=";";var o=new RegExp("&(?:"+e.join("|")+"|#[xX][\\\\da-fA-F]+;?|#\\\\d+;?)","g"),a=l(n.default);function u(t){if(";"!==t.substr(-1))t+=";";return a(t)}return function(t){return String(t).replace(o,u)}}();function l(t){return function(e){if("#"===e.charAt(1))if("X"===e.charAt(2)||"x"===e.charAt(2))return a.default(parseInt(e.substr(3),16));else return a.default(parseInt(e.substr(2),10));return t[e.slice(1,-1)]}}},function(t,e,r){"use strict";var i=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var n=u(i(r(8)).default),s=c(n);e.encodeXML=p(n,s);var o=u(i(r(7)).default),a=c(o);e.encodeHTML=p(o,a);function u(t){return Object.keys(t).sort().reduce((function(e,r){e[t[r]]="&"+r+";";return e}),{})}function c(t){var e=[],r=[];Object.keys(t).forEach((function(t){return 1===t.length?e.push("\\\\"+t):r.push(t)}));r.unshift("["+e.join("")+"]");return new RegExp(r.join("|"),"g")}var l=/[^\\0-\\x7F]/g,f=/[\\uD800-\\uDBFF][\\uDC00-\\uDFFF]/g;function h(t){return"&#x"+t.charCodeAt(0).toString(16).toUpperCase()+";"}function d(t,e){return"&#x"+(1024*(t.charCodeAt(0)-55296)+t.charCodeAt(1)-56320+65536).toString(16).toUpperCase()+";"}function p(t,e){return function(r){return r.replace(e,(function(e){return t[e]})).replace(f,d).replace(l,h)}}var _=c(n);e.escape=function(t){return t.replace(_,h).replace(f,d).replace(l,h)}},function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=r(6);e.filter=function(t,e,r,i){if(void 0===r)r=!0;if(void 0===i)i=1/0;if(!Array.isArray(e))e=[e];return n(t,e,r,i)};function n(t,e,r,s){for(var o=[],a=0;a<e.length;a++){var u=e[a];if(t(u)){o.push(u);if(--s<=0)break}if(r&&i.hasChildren(u)&&u.children.length>0){var c=n(t,u.children,r,s);o=o.concat(c);if((s-=c.length)<=0)break}}return o}e.find=n;e.findOneChild=function(t,e){for(var r=0;r<e.length;r++)if(t(e[r]))return e[r];return null};e.findOne=function t(e,r,n){if(void 0===n)n=!0;for(var s=null,o=0;o<r.length&&!s;o++){var a=r[o];if(i.isTag(a))if(e(a))s=a;else if(n&&a.children.length>0)s=t(e,a.children)}return s};e.existsOne=function t(e,r){for(var n=0;n<r.length;n++){var s=r[n];if(i.isTag(s)&&(e(s)||s.children.length>0&&t(e,s.children)))return!0}return!1};e.findAll=function(t,e){for(var r=[],n=e.slice();n.length;){var s=n.shift();if(s&&i.isTag(s)){if(s.children&&s.children.length>0)n.unshift.apply(n,s.children);if(t(s))r.push(s)}}return r}},function(t,e,r){"use strict";r.d(e,"a",(function(){return CommentSkeleton}));var i=r(4),n=r(0),s=r(5);class CommentSkeleton{constructor(t,e){this.parser=t;let r=this.parser.collectParts(e.element);r=this.parser.removeNestedParts(r);r=this.parser.encloseInlineParts(r,e.element);r=this.parser.filterParts(r);r.reverse();r=this.parser.replaceListsWithItems(r,e.element);this.id=n.a.comments.length;this.date=e.date||null;this.timestamp=e.timestampText;this.authorName=e.authorName;this.signatureElement=e.element;this.isOwn=this.authorName===n.a.g.CURRENT_USER_NAME;this.anchor=e.anchor;this.isUnsigned=e.isUnsigned;this.parts=r;this.elements=this.parts.map(t=>t.node);this.highlightables=this.elements.filter(t=>!/^(H[1-6]|STYLE|LINK)$/.test(t.tagName)&&!n.a.g.UNHIGHLIGHTABLE_ELEMENT_CLASSES.some(e=>t.classList.contains(e))&&!/float: *(?:left|right)|display: *none/.test(t.getAttribute("style")));if(!this.highlightables.length)throw new i.a;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 t=this.parts[0].node.tagName.match(/^H([1-6])$/);this.openingSectionOfLevel=t&&Number(t[1])}else this.isOpeningSection=!1;this.addAttributes()}addAttributes(){if(this.anchor&&!this.elements[0].getAttribute("id"))this.elements[0].setAttribute("id",this.anchor);this.highlightables[0].classList.add("cd-commentPart-first");this.highlightables[this.highlightables.length-1].classList.add("cd-commentPart-last");this.elements.forEach(t=>{t.classList.add("cd-commentPart");t.setAttribute("data-comment-id",String(this.id))})}setLevels(){const t={};t.top=this.parser.getLevelsUpTree(this.highlightables[0]);t.bottom=this.highlightables.length>1?this.parser.getLevelsUpTree(this.highlightables[this.highlightables.length-1]):t.top;this.level=Math.min(t.top.length,t.bottom.length);for(let e=0;e<this.level;e++){if(t.top[e])t.top[e].classList.add("cd-commentLevel","cd-commentLevel-".concat(e+1));if(t.bottom[e]&&t.bottom[e]!==t.top[e])t.bottom[e].classList.add("cd-commentLevel","cd-commentLevel-".concat(e+1))}}getSection(){if(void 0===this.cachedSection)this.cachedSection=n.a.sections.slice().reverse().find(t=>t.comments.includes(this))||null;return this.cachedSection}getChildren(){if(this.id===n.a.comments.length-1)return[];if(n.a.g.pageHasOutdents){const t=new s.b(this.elements[this.elements.length-1]);for(;t.nextNode()&&!t.currentNode.classList.contains("cd-commentPart");)if(t.currentNode.classList.contains("outdent-template"))return[n.a.comments[this.id+1]]}const t=[];n.a.comments.slice(this.id+1).some(e=>{if(e.getSection()===this.getSection()&&e.level>this.level){if(e.level===this.level+1||e.id===this.id+1)t.push(e)}else return!0});return t}}},function(t,e,r){"use strict";r.d(e,"a",(function(){return SectionSkeleton}));var i=r(4),n=r(0),s=r(5);class SectionSkeleton{constructor(t,e){this.parser=t;this.headlineElement=this.parser.context.getElementByClassName(e,"mw-headline");if(!this.headlineElement)throw new i.a;this.anchor=this.headlineElement.getAttribute("id");this.parseHeadline();const r=e.tagName.match(/^H([1-6])$/);this.level=r&&Number(r[1]);const o=new s.c(n.a.g.rootElement,t=>!["STYLE","LINK"].includes(t.tagName)&&!t.classList.contains("cd-sectionButtonContainer"),!0,e);this.headingNestingLevel=0;for(;o.parentNode();)this.headingNestingLevel++;o.currentNode=e;const a=[e],u=new RegExp("^H[1-".concat(this.level,"]$"));let c,l,f=!1;for(;o.nextSibling()&&!u.test(o.currentNode.tagName);){if(void 0===this.lastElementInFirstChunk&&/^H[2-6]$/.test(o.currentNode.tagName)){f=!0;this.lastElementInFirstChunk=a[a.length-1]}a.push(o.currentNode)}this.lastElementInFirstChunk=this.lastElementInFirstChunk||a[a.length-1];if(a[1]){o.currentNode=a[a.length-1];for(;o.lastChild(););const t=o.currentNode;o.currentNode=a[1];do{if(o.currentNode.classList.contains("cd-commentPart"))c=o.currentNode}while(!c&&o.currentNode!==t&&o.nextNode());o.currentNode=t;do{if(o.currentNode.classList.contains("cd-commentPart"))l=o.currentNode}while(!l&&o.currentNode!==a[1]&&o.previousNode())}if(c){const t=Number(c.getAttribute("data-comment-id")),e=Number(l.getAttribute("data-comment-id"));this.comments=n.a.comments.slice(t,e+1);if(f){const t=this.comments.findIndex(t=>!(this.parser.context.follows(this.lastElementInFirstChunk,t.elements[0])||this.lastElementInFirstChunk.contains(t.elements[0])));this.commentsInFirstChunk=this.comments.slice(0,t||0)}this.comments[0].followsHeading=!0}this.id=n.a.sections.length;this.comments=this.comments||[];this.commentsInFirstChunk=this.commentsInFirstChunk||this.comments;this.elements=a}parseHeadline(){const t=["mw-headline-number",...n.a.config.foreignElementsInHeadlinesClasses],e=Array.from(this.headlineElement.childNodes).filter(e=>e.nodeType!==Node.ELEMENT_NODE||!t.some(t=>e.classList.contains(t)));this.headline=e.map(t=>t.textContent).join("").trim()}getParent(t=!0){if(t&&this.level<=2)return null;else return n.a.sections.slice(0,this.id).reverse().find(t=>t.level<this.level)||null}getParentTree(){if(!this.cachedParentTree){this.cachedParentTree=[];let t=this;for(;t=t.getParent(!1);)this.cachedParentTree.push(t)}return this.cachedParentTree}}},function(t,e,r){"use strict";t.exports=function(t,e){var i=r(44),n="",s="",o="";n=t.toString();var a=i("HTML_ENTITIES",e);if(!1===a)return!1;delete a["&"];a["&"]="&amp;";for(o in a){s=a[o];n=n.split(s).join(o)}return n=n.split("&#039;").join("\'")}},function(t,e){function r(t,e,r,i,n,s,o){try{var a=t[s](o),u=a.value}catch(t){r(t);return}if(a.done)e(u);else Promise.resolve(u).then(i,n)}t.exports=function(t){return function(){var e=this,i=arguments;return new Promise((function(n,s){var o=t.apply(e,i);function a(t){r(o,n,s,a,u,"next",t)}function u(t){r(o,n,s,a,u,"throw",t)}a(void 0)}))}}},function(t,e,r){"use strict";e.a={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_FOCUSED_COLOR:"#eaf3ff",COMMENT_TARGET_COLOR:"#ffedb8",COMMENT_NEW_COLOR:"#e8ffd1",COMMENT_OWN_COLOR:"#f7ebff",COMMENT_DELETED_COLOR:"#fee7e6",COMMENT_UNDERLAY_SIDE_MARGIN:5,HIGHLIGHT_NEW_COMMENTS_INTERVAL:15,UPDATE_CHECK_INTERVAL:15,BACKGROUND_UPDATE_CHECK_INTERVAL:60,SECONDS_IN_A_DAY:86400,MILLISECONDS_IN_A_MINUTE:6e4,POPULAR_NOT_INLINE_ELEMENTS:["BLOCKQUOTE","DD","DIV","DL","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"],UNHIGHLIGHTABLE_ELEMENT_CLASSES:["mw-empty-elt","tleft","tright","floatleft","floatright"],BAD_COMMENT_BEGINNINGS:[/^\x3c!--[^]*?--\x3e *\\n+/,/^(?:----+|<hr>) *\\n+/,/^\\{\\|.*?\\|\\} *\\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("~~")}},function(t,e,r){"use strict";e.a={init(){this.timerTotal={};this.timerStartTimestamps={};this.timerRunCount={};this.timerAllRunsTotal={};this.initCounters();this.array=[];this.object={}},initCounters(){this.counters="undefined"==typeof Proxy?{}:new Proxy({},{get:(t,e)=>e in t?t[e]:0})},startTimer(t){if(void 0===this.timerTotal[t])this.timerTotal[t]=0;this.timerStartTimestamps[t]=Date.now()},stopTimer(t){if(void 0===this.timerStartTimestamps[t])return;const e=Date.now()-this.timerStartTimestamps[t];this.timerTotal[t]+=e;delete this.timerStartTimestamps[t];if(void 0===this.timerAllRunsTotal[t]){this.timerAllRunsTotal[t]=0;this.timerRunCount[t]=0}this.timerAllRunsTotal[t]+=e;this.timerRunCount[t]++},resetTimer(t){if(void 0!==this.timerStartTimestamps[t])this.stopTimer(t);delete this.timerTotal[t]},fullResetTimer(t){this.resetTimer(t);delete this.timerAllRunsTotal[t];delete this.timerRunCount[t]},logAndResetTimer(t){if(void 0!==this.timerStartTimestamps[t])this.stopTimer(t);if(void 0!==this.timerTotal[t]){console.debug("".concat(t,": ").concat(this.timerTotal[t]));this.resetTimer(t)}},logAndResetEverything(t){const e=Object.keys(this.timerTotal);if(t)e.sort();e.forEach(t=>{this.logAndResetTimer(t)});const r=Object.keys(this.counters);if(t)r.sort();r.forEach(t=>{console.debug("counter ".concat(t,": ").concat(this.counters[t]))});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(t){if(void 0===this.timerAllRunsTotal[t]){console.error("No data for timer ".concat(t));return}const e=this.timerAllRunsTotal[t]/this.timerRunCount[t];console.debug("".concat(t,": ").concat(e.toFixed(1)," average for ").concat(this.timerRunCount[t]," runs"))},incrementCounter(t){this.counters[t]++}}},function(t,e,r){"use strict";r.d(e,"a",(function(){return Parser}));var i=r(0),n=r(5),s=r(1),o=r(2);let a,u,c,l;function f(t){const e=t.getAttribute("href");let r;if(e){const t=function(t){if("undefined"==typeof mw||"/wiki/$1"===mw.config.get("wgArticlePath")&&"/w/index.php"===mw.config.get("wgScript")){let e=t.replace(/^(?:https?:)?\\/\\/[^/]+/,"").replace(/^\\/wiki\\//,"").replace(/^\\/w\\/index.php\\?title=/,"").replace(/&action=edit.*/,"").replace(/#.*/,"").replace(/_/g," ");try{e=decodeURIComponent(e)}catch(t){return null}return e}else{let e;try{e=new mw.Uri(t)}catch(t){return null}const r=e.path.match(i.a.g.ARTICLE_PATH_REGEXP);if(r)try{return decodeURIComponent(r[1])}catch(t){return null}return e.query.title||null}}(e);if(!t)return null;const n=t.match(i.a.g.USER_NAMESPACES_REGEXP);if(n)r=n[1];else if(t.startsWith(i.a.g.CONTRIBS_PAGE+"/")){r=t.replace(i.a.g.CONTRIBS_PAGE_LINK_REGEXP,"");if(i.a.g.IS_IPv6_ADDRESS(r))r=r.toUpperCase()}if(r)r=Object(s.b)(Object(s.i)(r.replace(/\\/.*/,""))).trim()}else if(t.classList.contains("mw-selflink")&&3===i.a.g.CURRENT_NAMESPACE_NUMBER)r=i.a.g.CURRENT_PAGE_TITLE;else return null;return r}function h(t){if("TD"!==t.tagName)return!1;let e;for(let r=t;!e&&r!==i.a.g.rootElement;r=r.parentNode)if("TABLE"===r.tagName)e=r;return!e||e.getElementsByClassName("cd-signature",2).length>1}class Parser{constructor(t){this.context=t;if(!a){a=["cd-commentPart",...i.a.config.closedDiscussionClasses];if(i.a.g.pageHasOutdents)a.push("outdent-template");u=new RegExp(i.a.g.TIMEZONE_REGEXP.source+"\\\\s*$");if(i.a.config.signatureEndingRegexp)c=new RegExp(i.a.config.signatureEndingRegexp.source+"$")}}createComment(t){return new this.context.CommentClass(this,t)}createSection(t,e){return new this.context.SectionClass(this,t,e)}findTimestamps(){l=[...Array.from(i.a.g.rootElement.getElementsByTagName("blockquote")),...Object(s.c)(i.a.config.elementsToExcludeClasses.map(t=>Array.from(i.a.g.rootElement.getElementsByClassName(t))))];return this.context.getAllTextNodes().map(t=>{const e=t.textContent,{date:r,match:i}=Object(o.b)(e)||{};if(r&&!l.some(e=>e.contains(t)))return{node:t,date:r,match:i}}).filter(s.a).map(t=>{const{node:e,match:r,date:i}=t,n=this.context.document.createElement("span");n.classList.add("cd-timestamp");const s=this.context.document.createTextNode(r[2]);n.appendChild(s);const o=e.textContent.slice(r.index+r[0].length);let a;if(o)a=this.context.document.createTextNode(o);e.textContent=e.textContent.slice(0,r.index+r[1].length);e.parentNode.insertBefore(n,e.nextSibling);if(a)e.parentNode.insertBefore(a,n.nextSibling);return{element:n,date:i}})}findSignatures(t){const e=t.map(t=>{const e=t.date,r=t.element,a=t.element.textContent;let u,c;for(let e=t.element;!c;e=e.parentNode)if(Object(s.f)(e)){if(e.classList.contains(i.a.config.unsignedClass))u=e}else c=e;const l=Boolean(u);if(c){const e=Array.from(c[this.context.childElementsProperty]),r=new n.b(t.element);for(;r.nextNode()&&c.contains(r.currentNode)&&(!e.includes(r.currentNode)||Object(s.f)(r.currentNode));)if(r.currentNode.classList.contains("cd-timestamp"))return}const h=u||t.element,d=new n.a(h);let p,_,m=0;const g=[];if(u)_=h;else{g.push(h);d.previousSibling()}do{const t=d.currentNode;m+=t.textContent.length;if(t.nodeType===Node.ELEMENT_NODE){if(t.classList.contains("cd-timestamp"))break;let e=!1;if("A"===t.tagName){const r=f(t);if(r){if(!p)p=r;if(p===r)e=!0}}else Array.from(t.getElementsByTagName("a")).reverse().some(t=>{const r=f(t);if(r){if(!p)p=r;if(p===r){e=!0;return!0}}});if(e)_=t}g.push(t)}while(d.previousSibling()&&m<i.a.config.signatureScanLimit);const b=g.indexOf(_);g.splice(-1===b?1:b+1);const E=Object(o.a)(t.date,p,!0);Object(o.c)(E);const y=h.parentNode,v=h.nextSibling,A=this.context.document.createElement("span");A.classList.add("cd-signature");g.reverse().forEach(A.appendChild.bind(A));y.insertBefore(A,v);if(p)return{element:A,timestampElement:r,timestampText:a,date:e,authorName:p,anchor:E,isUnsigned:l}}).filter(s.a);if(i.a.config.unsignedClass)Array.from(i.a.g.rootElement.getElementsByClassName(i.a.config.unsignedClass)).forEach(t=>{if(!this.context.getElementByClassName(t,"cd-timestamp"))Array.from(t.getElementsByTagName("a")).some(r=>{const i=f(r);if(i){t.classList.add("cd-signature");const r=!0;e.push({element:t,authorName:i,isUnsigned:r});return!0}})});e.sort((t,e)=>this.context.follows(t.element,e.element)?1:-1);return e}collectParts(t){const e=new n.a(t);let r,o=[];for(;!r;){for(;!e.currentNode.nextSibling&&e.parentNode(););if(!e.nextSibling())break;if(!Object(s.f)(e.currentNode,!0))r=e.currentNode}if(r&&t.parentNode.contains(r)||t.parentNode.getElementsByClassName("cd-signature",2).length>1||h(t.parentNode)){e.currentNode=t;for(;e.nextSibling()&&Object(s.f)(e.currentNode,!0);)o.push({node:e.currentNode,isTextNode:e.currentNode.nodeType===Node.TEXT_NODE,isHeading:!1,hasCurrentSignature:!1,hasForeignComponents:!1,lastStep:"start"});o.reverse();e.currentNode=t}else e.currentNode=t.parentNode;o.push({node:e.currentNode,isTextNode:!1,isHeading:!1,hasCurrentSignature:!0,hasForeignComponents:!1,lastStep:"start"});for(let n=0;n<500;n++){var f;let n;const m=o[o.length-1];if(!m.isTextNode&&!m.hasCurrentSignature){var d;const t=m.node.textContent;if(!Object(s.f)(m.node,!0)&&(u.test(t)||(null===(d=c)||void 0===d?void 0:d.test(t)))&&!l.some(t=>t.contains(m.node))){m.hasForeignComponents=!0;break}}if(!m.hasCurrentSignature&&m.hasForeignComponents){let t,r=!1;for(;(t=e.currentNode)&&e.lastChild();){if(Object(s.f)(e.currentNode,!0)){e.currentNode=t;break}r=!0}if(r)n="dive";else break}else if(e.previousSibling())n="back";else{if(!e.parentNode())break;n="up"}const g=e.currentNode,b=g.nodeType===Node.TEXT_NODE;if("back"===n&&["OL","UL"].includes(m.node.tagName)&&!(["DL","OL","UL"].includes(g.tagName)||b&&g.previousSibling&&["DL","OL","UL"].includes(g.previousSibling.tagName))&&(null===(f=m.node[this.context.childElementsProperty][0])||void 0===f?void 0:f.contains(t)))break;let E=null,y=null,v=null;if(!b){var p,_;if(g===e.root||a.some(t=>g.classList.contains(t))||"toc"===g.getAttribute("id")||h(g)||"HR"===g.tagName&&g.previousElementSibling&&this.context.getElementByClassName(g.previousElementSibling,"cd-signature")||i.a.g.pageHasOutdents&&this.context.getElementByClassName(g,"outdent-template")||(null===(p=(_=i.a.config).checkForCustomForeignComponents)||void 0===p?void 0:p.call(_,g,this.context)))break;E=/^H[1-6]$/.test(g.tagName);y=g.contains(t);v=g.getElementsByClassName("cd-signature",Number(y)+1).length-Number(y)>0||r&&g.contains(r)}o.push({node:g,isTextNode:b,isHeading:E,hasCurrentSignature:y,hasForeignComponents:v,lastStep:n});if(E)break}return o}removeNestedParts(t){for(let e=t.length-1;e>=0;e--){const r=t[e];if("up"===r.lastStep&&!r.hasForeignComponents){let r=0;for(let i=e-1;i>0;i--)if("dive"===t[i].lastStep){r=i;break}t.splice(r,e-r);e=r}}return t}encloseInlineParts(t,e){const r=[];let i=null,n=!1;for(let e=0;e<=t.length;e++){const o=t[e];if(o&&(null===i||["back","start"].includes(o.lastStep))&&!o.hasForeignComponents&&!o.isHeading){if(null===i)if(Object(s.f)(o.node.parentNode)){for(let r=e+1;r<t.length;r++)if("up"!==t[r].lastStep);else e=r-1;break}else i=e;if(!n&&(o.isTextNode&&o.node.textContent.trim()||Object(s.f)(o.node)))n=!0}else if(null!==i){if(n){const t=e-1;r.push({start:i,end:t})}i=null;n=!1}}for(let i=r.length-1;i>=0;i--){const n=r[i],s=this.context.document.createElement("div"),o=t[n.start].node.nextSibling,a=t[n.start].node.parentNode;for(let e=n.end;e>=n.start;e--)s.appendChild(t[e].node);a.insertBefore(s,o);const u={node:s,isTextNode:!1,isHeading:!1,hasCurrentSignature:s.contains(e),hasForeignComponents:!1,lastStep:"replaced"};t.splice(n.start,n.end-n.start+1,u)}return t}filterParts(t){for(let e=(t=t.filter(t=>!t.hasForeignComponents&&!t.isTextNode)).length-1;e>0;e--){const r=t[e];if("P"===r.node.tagName&&!r.node.textContent.trim())t.splice(e,1);else break}return t}replaceListsWithItems(t,e){const r=t[t.length-1];for(let i=t.length-1;i>=0;i--){const n=t[i];if(["UL","DL","OL","LI","DD"].includes(n.node.tagName)&&("up"===n.lastStep&&(!t[i-1]||"back"!==t[i-1].lastStep)||("DD"===r.node.tagName||"DD"===r.node.parentNode.tagName||"DL"===r.node.tagName)&&!t.slice(i+1).some(t=>"P"===t.node.tagName))){const r=n.node.textContent.replace(/\\s+/g,"");let s,o=[n.node];do{s=o.reduce((t,e)=>t.concat(Array.from(e[this.context.childElementsProperty])),[])}while(s.length&&s.every(t=>["UL","DL","OL","LI","DD"].includes(t.tagName))&&s.map(t=>t.textContent).join("").replace(/\\s+/g,"")===r&&(o=s));if(o.length>1){const r=o.map(t=>({node:t,isTextNode:!1,hasCurrentSignature:t.contains(e),hasForeignComponents:!1,lastStep:"replaced"}));t.splice(i,1,...r)}else if(o[0]!==n.node)Object.assign(n,{node:o[0],lastStep:"replaced"})}}return t}getLevelsUpTree(t){const e=[],r=new n.b(t);for(;r.parentNode();){const t=r.currentNode;if(["UL","DL","OL"].includes(t.tagName))if(t.classList.contains("cd-commentLevel")){const r=t.getAttribute("class").match(/cd-commentLevel-(\\d+)/);if(r)e.unshift(...Array(Number(r[1])));return e}else e.unshift(t)}return e}findHeadings(){const t=[...i.a.g.rootElement.getElementsByTagName("h1"),...i.a.g.rootElement.getElementsByTagName("h2"),...i.a.g.rootElement.getElementsByTagName("h3"),...i.a.g.rootElement.getElementsByTagName("h4"),...i.a.g.rootElement.getElementsByTagName("h5"),...i.a.g.rootElement.getElementsByTagName("h6")];t.sort((t,e)=>this.context.follows(t,e)?1:-1);return t}}},function(t,e,r){"use strict";r.d(e,"a",(function(){return u}));var i=r(3),cd=r(0),n=r(22),s=r.n(n);r(1);r(2);function o(t){if(-1===t.indexOf("&"))return t;else{let e=t;if(-1!==e.indexOf("&#38;amp;"))e=e.replace(/&#38;amp;/g,"&amp;amp;");if(-1!==e.indexOf("&#"))e=e.replace(/&#(\\d+);/g,(t,e)=>String.fromCharCode(e));if(-1!==e.indexOf("&"))e=s()(e);return e}}self.Node={TEXT_NODE:3,ELEMENT_NODE:1};function a(t,e,r){if(r&&e(t))return!0;for(let r=t.firstChild;r;r=r.nextSibling)if(a(r,e,!0))return!0}function u(){let t=[];a(cd.a.g.rootElement,e=>{if(e.nodeType===Node.TEXT_NODE)t.push(e)});return t}const c=Object(i.parseDOM)("<a>a</a>"),l=c[0].constructor,f=c[0].childNodes[0].constructor,h=Object.getPrototypeOf(f);Object.defineProperty(l.prototype,"childElements",{get:function(){return this.childNodes.filter(t=>t.nodeType===Node.ELEMENT_NODE)}});Object.defineProperty(l.prototype,"previousElementSibling",{get:function(){for(let t=this.previousSibling;t;t=t.previousSibling)if(t.nodeType===Node.ELEMENT_NODE)return t;return null}});Object.defineProperty(l.prototype,"nextElementSibling",{get:function(){for(let t=this.nextSibling;t;t=t.nextSibling)if(t.nodeType===Node.ELEMENT_NODE)return t;return null}});Object.defineProperty(l.prototype,"firstElementChild",{get:function(){let t;for(t=this.firstChild;t&&t.nodeType!==Node.ELEMENT_NODE;t=t.nextSibling);return t||null}});Object.defineProperty(l.prototype,"lastElementChild",{get:function(){let t;for(t=this.lastChild;t&&t.nodeType!==Node.ELEMENT_NODE;t=t.previousSibling);return t||null}});Object.defineProperty(l.prototype,"textContent",{get:function(){let t="";this.childNodes.forEach(e=>{t+=e.textContent});return t}});Object.defineProperty(l.prototype,"innerHTML",{get:function(){return i.DomUtils.getInnerHTML(this)}});Object.defineProperty(l.prototype,"outerHTML",{get:function(){return i.DomUtils.getOuterHTML(this)}});l.prototype.getAttribute=function(t){let e=this.attribs[t];if(e&&"string"==typeof e&&-1!==e.indexOf("&"))e=e.replace(/&amp;/g,"&").replace(/&quot;/g,\'"\');return e};l.prototype.setAttribute=function(t,e){if(e&&"string"==typeof e){if(-1!==e.indexOf("&"))e=e.replace(/&/g,"&amp;");if(-1!==e.indexOf(\'"\'))e=e.replace(/"/g,"&quot;")}this.attribs[t]=e||""};l.prototype.removeAttribute=function(t){delete this.attribs[t]};l.prototype.appendChild=function(t){if(t.parentNode)t.remove();i.DomUtils.appendChild(this,t)};l.prototype.insertBefore=function(t,e){if(e){if(t.parentNode)t.remove();i.DomUtils.prepend(e,t)}else this.appendChild(t)};l.prototype.removeChild=function(t){if(t.parentNode===this)i.DomUtils.removeElement(t)};l.prototype.contains=function(t){if(t===this)return!0;if(!this.childNodes.length)return!1;for(let e=t;e;e=e.parentNode)if(e===this)return!0;return!1};l.prototype.follows=function(t){if(this.startIndex&&t.startIndex)return this.startIndex>t.startIndex;if(this===t)return!1;const e=[],r=[];let i,n,s;for(let r=this;r;r=r.parentNode){if(r===t)return!0;e.unshift(r)}for(let o=t;o;o=o.parentNode){r.unshift(o);if(e.includes(o)){i=o;n=e[e.indexOf(o)+1];s=r[1];break}}return!i||i.childNodes.indexOf(n)>i.childNodes.indexOf(s)};Object.defineProperty(l.prototype,"tagName",{get:function(){return this.name.toUpperCase()}});Object.defineProperty(l.prototype,"classList",{get:function(){if(this._classList)return this._classList;else{this._classList={list:[],isMovedFromClassAttr:!1,moveFromClassAttr(t){this.list=(t||"").split(" ");this.isMovedFromClassAttr=!0},add:(...t)=>{t.forEach(t=>{let e=this.getAttribute("class")||"";if(e)e+=" ";e+=t;this.setAttribute("class",e);if(this._classList.isMovedFromClassAttr)this._classList.list.push(t);else this._classList.moveFromClassAttr(e)})},contains:t=>{const e=this.getAttribute("class");if(!e)return!1;if(!this._classList.isMovedFromClassAttr)this._classList.moveFromClassAttr(e);return Boolean(this._classList.list.length)&&-1!==this._classList.list.indexOf(t)}};return this._classList}}});l.prototype.getElementsByClassName=function(t,e,r){let i=[];a(this,n=>{if(n.nodeType===Node.ELEMENT_NODE)if(n.nodeType===Node.ELEMENT_NODE&&n.classList.contains(t,r)){i.push(n);if(e&&i.length===e)return!0}});return i};l.prototype.getElementsByTagName=function(t){return i.DomUtils.getElementsByTagName(t,this)};Object.defineProperty(f.prototype,"textContent",{get:function(){return o(this.data)},set:function(t){this.data=t}});h.prototype.remove=function(){i.DomUtils.removeElement(this);this.prev=null;this.next=null};class Document extends l{constructor(t){super("body",{});for(const e of t)this.appendChild(e)}createElement(t){return new l(t,{})}createTextNode(t){return new f("text",t)}}Document.prototype.getElementsByClassName=l.prototype.getElementsByClassName;self.Document=Document},function(t,e,r){"use strict";r.r(e);r(29)},function(module,__webpack_exports__,__webpack_require__){"use strict";var _CdError__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__(4),_CommentSkeleton__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__(20),_Parser__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__(26),_SectionSkeleton__WEBPACK_IMPORTED_MODULE_3__=__webpack_require__(21),_cd__WEBPACK_IMPORTED_MODULE_4__=__webpack_require__(0),_debug__WEBPACK_IMPORTED_MODULE_5__=__webpack_require__(25),_staticGlobals__WEBPACK_IMPORTED_MODULE_6__=__webpack_require__(24),_htmlparser2Extended__WEBPACK_IMPORTED_MODULE_7__=__webpack_require__(27),_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__(2);let firstRun=!0;const context={CommentClass:_CommentSkeleton__WEBPACK_IMPORTED_MODULE_1__.a,SectionClass:_SectionSkeleton__WEBPACK_IMPORTED_MODULE_3__.a,childElementsProperty:"childElements",follows:(t,e)=>t.follows(e),getAllTextNodes:_htmlparser2Extended__WEBPACK_IMPORTED_MODULE_7__.a,getElementByClassName:(t,e)=>t.getElementsByClassName(e,1)[0]||null};let alarmTimeout;self.cd=_cd__WEBPACK_IMPORTED_MODULE_4__.a;_cd__WEBPACK_IMPORTED_MODULE_4__.a.g=_staticGlobals__WEBPACK_IMPORTED_MODULE_6__.a;_cd__WEBPACK_IMPORTED_MODULE_4__.a.debug=_debug__WEBPACK_IMPORTED_MODULE_5__.a;_cd__WEBPACK_IMPORTED_MODULE_4__.a.debug.init();function setAlarm(t){clearTimeout(alarmTimeout);alarmTimeout=setTimeout(()=>{postMessage({type:"wakeUp"})},t)}function parse(){_cd__WEBPACK_IMPORTED_MODULE_4__.a.comments=[];_cd__WEBPACK_IMPORTED_MODULE_4__.a.sections=[];Object(_timestamp__WEBPACK_IMPORTED_MODULE_9__.d)();_cd__WEBPACK_IMPORTED_MODULE_4__.a.debug.startTimer("worker: parse comments");const t=new _Parser__WEBPACK_IMPORTED_MODULE_2__.a(context),e=t.findTimestamps();t.findSignatures(e).forEach(e=>{try{const r=t.createComment(e);if(void 0!==r.id)_cd__WEBPACK_IMPORTED_MODULE_4__.a.comments.push(r)}catch(t){if(!(t instanceof _CdError__WEBPACK_IMPORTED_MODULE_0__.a))console.error(t)}});_cd__WEBPACK_IMPORTED_MODULE_4__.a.debug.stopTimer("worker: parse comments");_cd__WEBPACK_IMPORTED_MODULE_4__.a.debug.startTimer("worker: parse sections");t.findHeadings().forEach(e=>{try{const r=t.createSection(e);if(void 0!==r.id)_cd__WEBPACK_IMPORTED_MODULE_4__.a.sections.push(r)}catch(t){if(!(t instanceof _CdError__WEBPACK_IMPORTED_MODULE_0__.a))console.error(t)}});_cd__WEBPACK_IMPORTED_MODULE_4__.a.debug.stopTimer("worker: parse sections");_cd__WEBPACK_IMPORTED_MODULE_4__.a.debug.startTimer("worker: prepare comments and sections");_cd__WEBPACK_IMPORTED_MODULE_4__.a.sections.forEach(t=>{var e;t.parentTree=t.getParentTree().map(t=>t.headline);t.firstCommentAnchor=null===(e=t.comments[0])||void 0===e?void 0:e.anchor});let r=["cachedSection","elements","highlightables","parent","parser","parts","signatureElement"],i=["cachedParentTree","commentsInFirstChunk","elements","headlineElement","lastElementInFirstChunk","parser"];const n=(t,e)=>{const r=Object.assign({},t);Object.keys(r).forEach(t=>{if(e.includes(t))delete r[t]});return r};_cd__WEBPACK_IMPORTED_MODULE_4__.a.sections=_cd__WEBPACK_IMPORTED_MODULE_4__.a.sections.map(t=>n(t,i));_cd__WEBPACK_IMPORTED_MODULE_4__.a.comments.forEach(t=>{t.getChildren().forEach(e=>{e.parent=t});const e=t.getSection();t.section=e||null;if(t.parent){t.parentAuthorName=t.parent.authorName;t.parentAnchor=t.parent.anchor;t.toMe=t.parent.isOwn}t.elements[0].removeAttribute("id");t.hiddenElementData=[];t.elementHtmls=t.elements.map(e=>{e.removeAttribute("data-comment-id");if(/^H[1-6]$/.test(e.tagName)){const t=e.getElementsByClassName("mw-headline")[0];if(t){var r;null===(r=t.getElementsByClassName("mw-headline-number")[0])||void 0===r||r.remove();Array.from(e.childNodes).forEach(t=>{t.remove()});Array.from(t.childNodes).forEach(e.appendChild.bind(e))}}[...e.getElementsByClassName("autonumber"),...e.getElementsByClassName("reference"),...e.getElementsByClassName("references"),...e.getElementsByTagName("style"),...e.getElementsByTagName("link")].forEach(e=>{let r;if(e.classList.contains("reference"))r="reference";else if(e.classList.contains("references"))r="references";else if(e.classList.contains("autonumber"))r="autonumber";else r="templateStyles";const i=t.hiddenElementData.push({type:r,tagName:e.tagName,html:e.outerHTML}),n=context.document.createTextNode("\\x01".concat(i,"_").concat(r,"\\x02"));e.parentNode.insertBefore(n,e);e.remove()});return e.outerHTML});t.innerHtml="";t.textInnerHtml="";t.headingInnerHtml="";t.elements.forEach(e=>{const r=e.innerHTML;t.innerHtml+=r+"\\n";if(/^H[1-6]$/.test(e.tagName))t.headingInnerHtml+=r;else t.textInnerHtml+=r+"\\n"});t.innerHtml=t.innerHtml.trim();t.textInnerHtml=t.textInnerHtml.trim();t.headingInnerHtml=t.headingInnerHtml.trim();t.signatureElement.remove();t.text=t.elements.map(t=>t.textContent).join("\\n");t.elementTagNames=t.elements.map(t=>t.tagName)});_cd__WEBPACK_IMPORTED_MODULE_4__.a.sections.forEach(t=>{delete t.comments});_cd__WEBPACK_IMPORTED_MODULE_4__.a.comments=_cd__WEBPACK_IMPORTED_MODULE_4__.a.comments.map(t=>n(t,r));_cd__WEBPACK_IMPORTED_MODULE_4__.a.comments.forEach((t,e)=>{t.previousComments=_cd__WEBPACK_IMPORTED_MODULE_4__.a.comments.slice(Math.max(0,e-2),e).reverse()});_cd__WEBPACK_IMPORTED_MODULE_4__.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(t){const e=t.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"===e.type)setAlarm(e.interval);if("removeAlarm"===e.type)clearTimeout(alarmTimeout);if("parse"===e.type){_cd__WEBPACK_IMPORTED_MODULE_4__.a.debug.startTimer("worker");Object.assign(_cd__WEBPACK_IMPORTED_MODULE_4__.a.g,e.g);_cd__WEBPACK_IMPORTED_MODULE_4__.a.config=e.config;_cd__WEBPACK_IMPORTED_MODULE_4__.a.config.checkForCustomForeignComponents=restoreFunc(_cd__WEBPACK_IMPORTED_MODULE_4__.a.config.checkForCustomForeignComponents);_cd__WEBPACK_IMPORTED_MODULE_4__.a.g.TIMESTAMP_PARSER=restoreFunc(_cd__WEBPACK_IMPORTED_MODULE_4__.a.g.TIMESTAMP_PARSER);_cd__WEBPACK_IMPORTED_MODULE_4__.a.g.IS_IPv6_ADDRESS=restoreFunc(_cd__WEBPACK_IMPORTED_MODULE_4__.a.g.IS_IPv6_ADDRESS);const t=Object(_htmlparser2Extended__WEBPACK_IMPORTED_MODULE_8__.parseDOM)(e.text,{withStartIndices:!0,withEndIndices:!0});context.document=new Document(t);_cd__WEBPACK_IMPORTED_MODULE_4__.a.g.rootElement=context.document.childNodes[0];_cd__WEBPACK_IMPORTED_MODULE_4__.a.g.pageHasOutdents=Boolean(_cd__WEBPACK_IMPORTED_MODULE_4__.a.g.rootElement.getElementsByClassName("outdent-template",1).length);parse();postMessage({type:e.type,revisionId:e.revisionId,resolverId:e.resolverId,comments:_cd__WEBPACK_IMPORTED_MODULE_4__.a.comments,sections:_cd__WEBPACK_IMPORTED_MODULE_4__.a.sections});_cd__WEBPACK_IMPORTED_MODULE_4__.a.debug.stopTimer("worker");_cd__WEBPACK_IMPORTED_MODULE_4__.a.debug.logAndResetEverything()}}onmessage=onMessageFromWindow},function(t){t.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(t,e,r){"use strict";var i,n="object"==typeof Reflect?Reflect:null,s=n&&"function"==typeof n.apply?n.apply:function(t,e,r){return Function.prototype.apply.call(t,e,r)};if(n&&"function"==typeof n.ownKeys)i=n.ownKeys;else if(Object.getOwnPropertySymbols)i=function(t){return Object.getOwnPropertyNames(t).concat(Object.getOwnPropertySymbols(t))};else i=function(t){return Object.getOwnPropertyNames(t)};var o=Number.isNaN||function(t){return t!=t};function a(){a.init.call(this)}t.exports=a;t.exports.once=function(t,e){return new Promise((function(r,i){function n(){if(void 0!==s)t.removeListener("error",s);r([].slice.call(arguments))}var s;if("error"!==e){s=function(r){t.removeListener(e,n);i(r)};t.once("error",s)}t.once(e,n)}))};a.EventEmitter=a;a.prototype._events=void 0;a.prototype._eventsCount=0;a.prototype._maxListeners=void 0;var u=10;function c(t){if("function"!=typeof t)throw new TypeError(\'The "listener" argument must be of type Function. Received type \'+typeof t)}Object.defineProperty(a,"defaultMaxListeners",{enumerable:!0,get:function(){return u},set:function(t){if("number"!=typeof t||t<0||o(t))throw new RangeError(\'The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received \'+t+".");u=t}});a.init=function(){if(void 0===this._events||this._events===Object.getPrototypeOf(this)._events){this._events=Object.create(null);this._eventsCount=0}this._maxListeners=this._maxListeners||void 0};a.prototype.setMaxListeners=function(t){if("number"!=typeof t||t<0||o(t))throw new RangeError(\'The value of "n" is out of range. It must be a non-negative number. Received \'+t+".");this._maxListeners=t;return this};function l(t){if(void 0===t._maxListeners)return a.defaultMaxListeners;else return t._maxListeners}a.prototype.getMaxListeners=function(){return l(this)};a.prototype.emit=function(t){for(var e=[],r=1;r<arguments.length;r++)e.push(arguments[r]);var i="error"===t,n=this._events;if(void 0!==n)i=i&&void 0===n.error;else if(!i)return!1;if(i){var o;if(e.length>0)o=e[0];if(o instanceof Error)throw o;var a=new Error("Unhandled error."+(o?" ("+o.message+")":""));a.context=o;throw a}var u=n[t];if(void 0===u)return!1;if("function"==typeof u)s(u,this,e);else{var c=u.length,l=m(u,c);for(r=0;r<c;++r)s(l[r],this,e)}return!0};function f(t,e,r,i){var n,s,o;c(r);if(void 0===(s=t._events)){s=t._events=Object.create(null);t._eventsCount=0}else{if(void 0!==s.newListener){t.emit("newListener",e,r.listener?r.listener:r);s=t._events}o=s[e]}if(void 0===o){o=s[e]=r;++t._eventsCount}else{if("function"==typeof o)o=s[e]=i?[r,o]:[o,r];else if(i)o.unshift(r);else o.push(r);if((n=l(t))>0&&o.length>n&&!o.warned){o.warned=!0;var a=new Error("Possible EventEmitter memory leak detected. "+o.length+" "+String(e)+" listeners added. Use emitter.setMaxListeners() to increase limit");a.name="MaxListenersExceededWarning";a.emitter=t;a.type=e;a.count=o.length;!function(t){if(console&&console.warn)console.warn(t)}(a)}}return t}a.prototype.addListener=function(t,e){return f(this,t,e,!1)};a.prototype.on=a.prototype.addListener;a.prototype.prependListener=function(t,e){return f(this,t,e,!0)};function h(){if(!this.fired){this.target.removeListener(this.type,this.wrapFn);this.fired=!0;if(0===arguments.length)return this.listener.call(this.target);else return this.listener.apply(this.target,arguments)}}function d(t,e,r){var i={fired:!1,wrapFn:void 0,target:t,type:e,listener:r},n=h.bind(i);n.listener=r;i.wrapFn=n;return n}a.prototype.once=function(t,e){c(e);this.on(t,d(this,t,e));return this};a.prototype.prependOnceListener=function(t,e){c(e);this.prependListener(t,d(this,t,e));return this};a.prototype.removeListener=function(t,e){var r,i,n,s,o;c(e);if(void 0===(i=this._events))return this;if(void 0===(r=i[t]))return this;if(r===e||r.listener===e)if(0==--this._eventsCount)this._events=Object.create(null);else{delete i[t];if(i.removeListener)this.emit("removeListener",t,r.listener||e)}else if("function"!=typeof r){n=-1;for(s=r.length-1;s>=0;s--)if(r[s]===e||r[s].listener===e){o=r[s].listener;n=s;break}if(n<0)return this;if(0===n)r.shift();else!function(t,e){for(;e+1<t.length;e++)t[e]=t[e+1];t.pop()}(r,n);if(1===r.length)i[t]=r[0];if(void 0!==i.removeListener)this.emit("removeListener",t,o||e)}return this};a.prototype.off=a.prototype.removeListener;a.prototype.removeAllListeners=function(t){var e,r,i;if(void 0===(r=this._events))return this;if(void 0===r.removeListener){if(0===arguments.length){this._events=Object.create(null);this._eventsCount=0}else if(void 0!==r[t])if(0==--this._eventsCount)this._events=Object.create(null);else delete r[t];return this}if(0===arguments.length){var n,s=Object.keys(r);for(i=0;i<s.length;++i)if("removeListener"!==(n=s[i]))this.removeAllListeners(n);this.removeAllListeners("removeListener");this._events=Object.create(null);this._eventsCount=0;return this}if("function"==typeof(e=r[t]))this.removeListener(t,e);else if(void 0!==e)for(i=e.length-1;i>=0;i--)this.removeListener(t,e[i]);return this};function p(t,e,r){var i=t._events;if(void 0===i)return[];var n=i[e];if(void 0===n)return[];if("function"==typeof n)return r?[n.listener||n]:[n];else return r?function(t){for(var e=new Array(t.length),r=0;r<e.length;++r)e[r]=t[r].listener||t[r];return e}(n):m(n,n.length)}a.prototype.listeners=function(t){return p(this,t,!0)};a.prototype.rawListeners=function(t){return p(this,t,!1)};a.listenerCount=function(t,e){if("function"==typeof t.listenerCount)return t.listenerCount(e);else return _.call(t,e)};a.prototype.listenerCount=_;function _(t){var e=this._events;if(void 0!==e){var r=e[t];if("function"==typeof r)return 1;else if(void 0!==r)return r.length}return 0}a.prototype.eventNames=function(){return this._eventsCount>0?i(this._events):[]};function m(t,e){for(var r=new Array(e),i=0;i<e;++i)r[i]=t[i];return r}},function(t,e,r){"use strict";var i,n=this&&this.__extends||(i=function(t,e){return(i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)if(e.hasOwnProperty(r))t[r]=e[r]})(t,e)},function(t,e){i(t,e);function r(){this.constructor=t}t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)});Object.defineProperty(e,"__esModule",{value:!0});var s=new Map([["tag",1],["script",1],["style",1],["directive",1],["text",3],["cdata",4],["comment",8]]),o=function(){function t(t){this.type=t;this.parent=null;this.prev=null;this.next=null;this.startIndex=null;this.endIndex=null}Object.defineProperty(t.prototype,"nodeType",{get:function(){return s.get(this.type)||1},enumerable:!0,configurable:!0});Object.defineProperty(t.prototype,"parentNode",{get:function(){return this.parent||null},set:function(t){this.parent=t},enumerable:!0,configurable:!0});Object.defineProperty(t.prototype,"previousSibling",{get:function(){return this.prev||null},set:function(t){this.prev=t},enumerable:!0,configurable:!0});Object.defineProperty(t.prototype,"nextSibling",{get:function(){return this.next||null},set:function(t){this.next=t},enumerable:!0,configurable:!0});return t}();e.Node=o;var a=function(t){n(e,t);function e(e,r){var i=t.call(this,e)||this;i.data=r;return i}Object.defineProperty(e.prototype,"nodeValue",{get:function(){return this.data},set:function(t){this.data=t},enumerable:!0,configurable:!0});return e}(o);e.DataNode=a;var u=function(t){n(e,t);function e(e,r){var i=t.call(this,"directive",r)||this;i.name=e;return i}return e}(a);e.ProcessingInstruction=u;var c=function(t){n(e,t);function e(e,r){var i=t.call(this,e)||this;i.children=r;return i}Object.defineProperty(e.prototype,"firstChild",{get:function(){return this.children[0]||null},enumerable:!0,configurable:!0});Object.defineProperty(e.prototype,"lastChild",{get:function(){return this.children[this.children.length-1]||null},enumerable:!0,configurable:!0});Object.defineProperty(e.prototype,"childNodes",{get:function(){return this.children},set:function(t){this.children=t},enumerable:!0,configurable:!0});return e}(o);e.NodeWithChildren=c;var l=function(t){n(e,t);function e(e,r){var i=t.call(this,"script"===e?"script":"style"===e?"style":"tag",[])||this;i.name=e;i.attribs=r;i.attribs=r;return i}Object.defineProperty(e.prototype,"tagName",{get:function(){return this.name},set:function(t){this.name=t},enumerable:!0,configurable:!0});return e}(c);e.Element=l},function(t,e,r){"use strict";var i=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var n=r(6),s=i(r(34));e.getOuterHTML=s.default;e.getInnerHTML=function(t,r){return n.hasChildren(t)?t.children.map((function(t){return e.getOuterHTML(t,r)})).join(""):""};e.getText=function t(e){if(Array.isArray(e))return e.map(t).join("");if(n.isTag(e))return"br"===e.name?"\\n":t(e.children);if(n.isCDATA(e))return t(e.children);if(n.isText(e))return e.data;else return""}},function(t,e,r){var i=r(9),n=r(35),s=r(36);s.elementNames.__proto__=null;s.attributeNames.__proto__=null;var o={__proto__:null,style:!0,script:!0,xmp:!0,iframe:!0,noembed:!0,noframes:!0,plaintext:!0,noscript:!0};var a={__proto__:null,area:!0,base:!0,basefont:!0,br:!0,col:!0,command:!0,embed:!0,frame:!0,hr:!0,img:!0,input:!0,isindex:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0},u=t.exports=function(t,e){if(!Array.isArray(t)&&!t.cheerio)t=[t];e=e||{};for(var r="",n=0;n<t.length;n++){var s=t[n];if("root"===s.type)r+=u(s.children,e);else if(i.isTag(s))r+=l(s,e);else if(s.type===i.Directive)r+=f(s);else if(s.type===i.Comment)r+=p(s);else if(s.type===i.CDATA)r+=d(s);else r+=h(s,e)}return r},c=["mi","mo","mn","ms","mtext","annotation-xml","foreignObject","desc","title"];function l(t,e){if("foreign"===e.xmlMode){t.name=s.elementNames[t.name]||t.name;if(t.parent&&c.indexOf(t.parent.name)>=0)e=Object.assign({},e,{xmlMode:!1})}if(!e.xmlMode&&["svg","math"].indexOf(t.name)>=0)e=Object.assign({},e,{xmlMode:"foreign"});var r="<"+t.name,i=function(t,e){if(t){var r,i="";for(var o in t){r=t[o];if(i)i+=" ";if("foreign"===e.xmlMode)o=s.attributeNames[o]||o;i+=o;if(null!==r&&""!==r||e.xmlMode)i+=\'="\'+(e.decodeEntities?n.encodeXML(r):r.replace(/\\"/g,"&quot;"))+\'"\'}return i}}(t.attribs,e);if(i)r+=" "+i;if(e.xmlMode&&(!t.children||0===t.children.length))r+="/>";else{r+=">";if(t.children)r+=u(t.children,e);if(!a[t.name]||e.xmlMode)r+="</"+t.name+">"}return r}function f(t){return"<"+t.data+">"}function h(t,e){var r=t.data||"";if(e.decodeEntities&&(!t.parent||!(t.parent.name in o)))r=n.encodeXML(r);return r}function d(t){return"<![CDATA["+t.children[0].data+"]]>"}function p(t){return"\\x3c!--"+t.data+"--\\x3e"}},function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=r(17),n=r(18);e.decode=function(t,e){return(!e||e<=0?i.decodeXML:i.decodeHTML)(t)};e.decodeStrict=function(t,e){return(!e||e<=0?i.decodeXML:i.decodeHTMLStrict)(t)};e.encode=function(t,e){return(!e||e<=0?n.encodeXML:n.encodeHTML)(t)};var s=r(18);e.encodeXML=s.encodeXML;e.encodeHTML=s.encodeHTML;e.escape=s.escape;e.encodeHTML4=s.encodeHTML;e.encodeHTML5=s.encodeHTML;var o=r(17);e.decodeXML=o.decodeXML;e.decodeHTML=o.decodeHTML;e.decodeHTMLStrict=o.decodeHTMLStrict;e.decodeHTML4=o.decodeHTML;e.decodeHTML5=o.decodeHTML;e.decodeHTML4Strict=o.decodeHTMLStrict;e.decodeHTML5Strict=o.decodeHTMLStrict;e.decodeXMLStrict=o.decodeXML},function(t){t.exports=JSON.parse(\'{"elementNames":{"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"},"attributeNames":{"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(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0});function i(t){return t.children||null}e.getChildren=i;function n(t){return t.parent||null}e.getParent=n;e.getSiblings=function(t){var e=n(t);return e?i(e):[t]};function s(t,e){return t.attribs&&t.attribs[e]}e.getAttributeValue=s;e.hasAttrib=function(t,e){return!!s(t,e)};e.getName=function(t){return t.name}},function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0});e.removeElement=function(t){if(t.prev)t.prev.next=t.next;if(t.next)t.next.prev=t.prev;if(t.parent){var e=t.parent.children;e.splice(e.lastIndexOf(t),1)}};e.replaceElement=function(t,e){var r=e.prev=t.prev;if(r)r.next=e;var i=e.next=t.next;if(i)i.prev=e;var n=e.parent=t.parent;if(n){var s=n.children;s[s.lastIndexOf(t)]=e}};e.appendChild=function(t,e){e.parent=t;if(1!==t.children.push(e)){var r=t.children[t.children.length-2];r.next=e;e.prev=r;e.next=null}};e.append=function(t,e){var r=t.parent,i=t.next;e.next=i;e.prev=t;t.next=e;e.parent=r;if(i){i.prev=e;if(r){var n=r.children;n.splice(n.lastIndexOf(i),0,e)}}else if(r)r.children.push(e)};e.prepend=function(t,e){var r=t.parent;if(r){var i=r.children;i.splice(i.lastIndexOf(t),0,e)}if(t.prev)t.prev.next=e;e.parent=r;e.prev=t.prev;e.next=t;t.prev=e}},function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=r(19),n=r(6);function s(t){return"text"===t.type}var o={tag_name:function(t){if("function"==typeof t)return function(e){return n.isTag(e)&&t(e.name)};else if("*"===t)return n.isTag;else return function(e){return n.isTag(e)&&e.name===t}},tag_type:function(t){if("function"==typeof t)return function(e){return t(e.type)};else return function(e){return e.type===t}},tag_contains:function(t){if("function"==typeof t)return function(e){return s(e)&&t(e.data)};else return function(e){return s(e)&&e.data===t}}};function a(t,e){if("function"==typeof e)return function(r){return n.isTag(r)&&e(r.attribs[t])};else return function(r){return n.isTag(r)&&r.attribs[t]===e}}function u(t,e){return function(r){return t(r)||e(r)}}function c(t){var e=Object.keys(t).map((function(e){var r=t[e];return e in o?o[e](r):a(e,r)}));return 0===e.length?null:e.reduce(u)}e.testElement=function(t,e){var r=c(t);return r?r(e):!0};e.getElements=function(t,e,r,n){if(void 0===n)n=1/0;var s=c(t);return s?i.filter(s,e,r,n):[]};e.getElementById=function(t,e,r){if(void 0===r)r=!0;if(!Array.isArray(e))e=[e];return i.findOne(a("id",t),e,r)};e.getElementsByTagName=function(t,e,r,n){if(void 0===n)n=1/0;return i.filter(o.tag_name(t),e,r,n)};e.getElementsByTagType=function(t,e,r,n){if(void 0===r)r=!0;if(void 0===n)n=1/0;return i.filter(o.tag_type(t),e,r,n)}},function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=r(6);e.removeSubsets=function(t){for(var e=t.length;--e>=0;){var r=t[e];if(!(e>0&&t.lastIndexOf(r,e-1)>=0)){for(var i=r.parent;i;i=i.parent)if(t.indexOf(i)>-1){t.splice(e,1);break}}else t.splice(e,1)}return t};function n(t,e){var r=[],n=[];if(t===e)return 0;for(var s=i.hasChildren(t)?t:t.parent;s;){r.unshift(s);s=s.parent}s=i.hasChildren(e)?e:e.parent;for(;s;){n.unshift(s);s=s.parent}for(var o=0;r[o]===n[o];)o++;if(0===o)return 1;var a=r[o-1],u=a.children,c=r[o],l=n[o];if(u.indexOf(c)>u.indexOf(l))if(a===e)return 20;else return 4;else if(a===t)return 10;else return 2}e.compareDocumentPosition=n;e.uniqueSort=function(t){(t=t.filter((function(t,e,r){return!r.includes(t,e+1)}))).sort((function(t,e){var r=n(t,e);if(2&r)return-1;else if(4&r)return 1;return 0}));return t}},function(t,e){},function(t,e,r){"use strict";var i,n=this&&this.__extends||(i=function(t,e){return(i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)if(e.hasOwnProperty(r))t[r]=e[r]})(t,e)},function(t,e){i(t,e);function r(){this.constructor=t}t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}),s=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var o=function(t){n(e,t);function e(e){if(void 0===e)e={};var r=t.call(this,(function(t){for(var e,i=[],n=1;n<arguments.length;n++)i[n-1]=arguments[n];r.events.push([t].concat(i));if(r._cbs[t])(e=r._cbs)[t].apply(e,i)}))||this;r._cbs=e;r.events=[];return r}e.prototype.onreset=function(){this.events=[];if(this._cbs.onreset)this._cbs.onreset()};e.prototype.restart=function(){var t;if(this._cbs.onreset)this._cbs.onreset();for(var e=0;e<this.events.length;e++){var r=this.events[e],i=r[0],n=r.slice(1);if(this._cbs[i])(t=this._cbs)[i].apply(t,n)}};return e}(s(r(43)).default);e.CollectingHandler=o},function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=function(){function t(t){this._func=t}t.prototype.onattribute=function(t,e){this._func("onattribute",t,e)};t.prototype.oncdatastart=function(){this._func("oncdatastart")};t.prototype.oncdataend=function(){this._func("oncdataend")};t.prototype.ontext=function(t){this._func("ontext",t)};t.prototype.onprocessinginstruction=function(t,e){this._func("onprocessinginstruction",t,e)};t.prototype.oncomment=function(t){this._func("oncomment",t)};t.prototype.oncommentend=function(){this._func("oncommentend")};t.prototype.onclosetag=function(t){this._func("onclosetag",t)};t.prototype.onopentag=function(t,e){this._func("onopentag",t,e)};t.prototype.onopentagname=function(t){this._func("onopentagname",t)};t.prototype.onerror=function(t){this._func("onerror",t)};t.prototype.onend=function(){this._func("onend")};t.prototype.onparserinit=function(t){this._func("onparserinit",t)};t.prototype.onreset=function(){this._func("onreset")};return t}();e.default=i},function(t,e,r){"use strict";t.exports=function(t,e){var r,i,n,s={},o={},a={},u={};a[0]="HTML_SPECIALCHARS";a[1]="HTML_ENTITIES";u[0]="ENT_NOQUOTES";u[2]="ENT_COMPAT";u[3]="ENT_QUOTES";i=!isNaN(t)?a[t]:t?t.toUpperCase():"HTML_SPECIALCHARS";n=!isNaN(e)?u[e]:e?e.toUpperCase():"ENT_COMPAT";if("HTML_SPECIALCHARS"!==i&&"HTML_ENTITIES"!==i)throw new Error("Table: "+i+" not supported");s[38]="&amp;";if("HTML_ENTITIES"===i){s[160]="&nbsp;";s[161]="&iexcl;";s[162]="&cent;";s[163]="&pound;";s[164]="&curren;";s[165]="&yen;";s[166]="&brvbar;";s[167]="&sect;";s[168]="&uml;";s[169]="&copy;";s[170]="&ordf;";s[171]="&laquo;";s[172]="&not;";s[173]="&shy;";s[174]="&reg;";s[175]="&macr;";s[176]="&deg;";s[177]="&plusmn;";s[178]="&sup2;";s[179]="&sup3;";s[180]="&acute;";s[181]="&micro;";s[182]="&para;";s[183]="&middot;";s[184]="&cedil;";s[185]="&sup1;";s[186]="&ordm;";s[187]="&raquo;";s[188]="&frac14;";s[189]="&frac12;";s[190]="&frac34;";s[191]="&iquest;";s[192]="&Agrave;";s[193]="&Aacute;";s[194]="&Acirc;";s[195]="&Atilde;";s[196]="&Auml;";s[197]="&Aring;";s[198]="&AElig;";s[199]="&Ccedil;";s[200]="&Egrave;";s[201]="&Eacute;";s[202]="&Ecirc;";s[203]="&Euml;";s[204]="&Igrave;";s[205]="&Iacute;";s[206]="&Icirc;";s[207]="&Iuml;";s[208]="&ETH;";s[209]="&Ntilde;";s[210]="&Ograve;";s[211]="&Oacute;";s[212]="&Ocirc;";s[213]="&Otilde;";s[214]="&Ouml;";s[215]="&times;";s[216]="&Oslash;";s[217]="&Ugrave;";s[218]="&Uacute;";s[219]="&Ucirc;";s[220]="&Uuml;";s[221]="&Yacute;";s[222]="&THORN;";s[223]="&szlig;";s[224]="&agrave;";s[225]="&aacute;";s[226]="&acirc;";s[227]="&atilde;";s[228]="&auml;";s[229]="&aring;";s[230]="&aelig;";s[231]="&ccedil;";s[232]="&egrave;";s[233]="&eacute;";s[234]="&ecirc;";s[235]="&euml;";s[236]="&igrave;";s[237]="&iacute;";s[238]="&icirc;";s[239]="&iuml;";s[240]="&eth;";s[241]="&ntilde;";s[242]="&ograve;";s[243]="&oacute;";s[244]="&ocirc;";s[245]="&otilde;";s[246]="&ouml;";s[247]="&divide;";s[248]="&oslash;";s[249]="&ugrave;";s[250]="&uacute;";s[251]="&ucirc;";s[252]="&uuml;";s[253]="&yacute;";s[254]="&thorn;";s[255]="&yuml;"}if("ENT_NOQUOTES"!==n)s[34]="&quot;";if("ENT_QUOTES"===n)s[39]="&#39;";s[60]="&lt;";s[62]="&gt;";for(r in s)if(s.hasOwnProperty(r))o[String.fromCharCode(r)]=s[r];return o}}]);\n//# sourceMappingURL=https://commons.wikimedia.org/w/index.php?title=User:Jack_who_built_the_house/convenientDiscussions-worker.js.map.json&action=raw&ctype=application/json',null)}},,function(e,t){convenientDiscussions.i18n=convenientDiscussions.i18n||{};convenientDiscussions.i18n.en={"script-name":"Convenient Discussions","script-name-short":"CD","cm-gotoparent":"\u25b2","cm-gotoparent-tooltip":"Go to the parent comment","cm-gotochild":"\u25bc","cm-gotochild-tooltip":"Go back to the child comment","cm-copylink":"#","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","sm-editopeningcomment":"edit opening comment","sm-editopeningcomment-tooltip":"Edit the comment opening 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","sm-unwatch":"unwatch","sm-unwatch-tooltip":"Remove the section from the watchlist","sm-copylink":"#","sm-copylink-tooltip":"Copy a link","comment-edited":"The comment has changed.","comment-edited-refresh":"Refresh","comment-edited-diff":"Diff","comment-edited-diff-error":"Couldn't render the diff.","comment-edited-diff-empty":"The diff is empty. Probably, the rendering of the comment has changed, but it wasn't edited.","comment-deleted":"The comment was deleted or re-signed.","comment-editedsince":"The comment has changed since your last visit.","comment-edited-history":"Edit history","section-reply":"Reply to section","section-addsubsection-to":'Add subsection to "$1"',"section-newcomments":"{{plural:$1|There is a new comment|There are new comments}} in this section 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-load":"Couldn't load the settings from the server.","section-watch-error-save":"Couldn't save the settings to the server.","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-summary":"Edit summary","cld-diff":"Diff link","cld-diff-error":"Couldn't find","cld-diff-error-network":"Couldn't find (network error)","cld-diff-error-unknown":"Couldn't find (unknown error)","cld-shortdiff":"Short diff link","cld-wikilink":"Wikilink","cld-help-onlycd":"This link will work only for users that have Convenient Discussions installed.","cld-currentpagewikilink":"Wikilink from the same page","cld-link":"Regular 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 the thank you.","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 the reply","es-edit-reply-to":"edit the reply to {{gender:$2|}} $1","es-edit-addition":"edit the addition","es-edit-topic":"edit the opening comment","es-edit-subsection":"edit the opening comment","es-edit-comment":"edit the comment","es-edit-comment-by":"edit the comment by {{gender:$2|}} $1","es-delete-reply":"delete the reply","es-delete-reply-to":"delete the reply to {{gender:$2|}} $1","es-delete-addition":"delete the addition","es-delete-topic":"delete the topic","es-delete-subsection":"delete the subsection","es-delete-comment":"delete the comment","es-delete-comment-by":"delete the 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":"Topic subject/headline","cf-headline-subsection":'Subject/headline of 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 <kbd>$1</kbd> and choose a user to [[mw:Special:MyLanguage/Help:Notifications/Mention|mention]] them.</li>\n<li>Type <kbd><nowiki>[[#</"+String("")+"nowiki></kbd> to link a comment in this section.</li>\n<li>Hold Shift 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 Alt while choosing an autocomplete item to use the text after the caret as displayed text.</li>\n<li>Hold Ctrl while choosing a user to add punctiation after the name.</li>\n<li>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","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: this breaks 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-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-delete-yes":"Delete","cf-confirm-delete-no":"Cancel","cf-confirm-close":"Are you sure you want to close the form? The input will be lost.","cf-confirm-close-yes":"Close","cf-confirm-close-no":"Cancel","cf-autocomplete-notemplatedata":"Couldn't load TemplateData for this template.","cf-autocomplete-commentlinktext":"$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-title":"Section not found","deadanchor-section-text":"It could be moved or archived.","deadanchor-comment-title":"Comment not found","deadanchor-comment-text":"It could be moved or archived.","deadanchor-searchinarchive":"Do you want to search in the archive?","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","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-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","toc-more":"\u2026$1 more","toc-watched":"You watch this section","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-maybeinteresting":"that may be interesting 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-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-close-confirm-yes":"Close","sd-close-confirm-no":"Cancel","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 the 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-removedata-confirm-yes":"Yes","sd-removedata-confirm-no":"No","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-highlightowncomments":"Highlight my comments","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-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-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-watchonreply":"Watch the page that I comment on","sd-watchsectiononreply":"Watch the section that I comment in","sd-watchsectiononreply-help":"This affects notifications and bolding in the watchlist.","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?","ewsd-close-confirm-yes":"Close","ewsd-close-confirm-no":"Cancel","msd-title":"Move topic","msd-move":"Move","msd-reload":"Reload","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 reload the page or 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.","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 the page.","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 of 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 of 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.","wl-button-switchinteresting-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>","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,s={},r={},a={},c={};a[0]="HTML_SPECIALCHARS";a[1]="HTML_ENTITIES";c[0]="ENT_NOQUOTES";c[2]="ENT_COMPAT";c[3]="ENT_QUOTES";i=!isNaN(e)?a[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");s[38]="&amp;";if("HTML_ENTITIES"===i){s[160]="&nbsp;";s[161]="&iexcl;";s[162]="&cent;";s[163]="&pound;";s[164]="&curren;";s[165]="&yen;";s[166]="&brvbar;";s[167]="&sect;";s[168]="&uml;";s[169]="&copy;";s[170]="&ordf;";s[171]="&laquo;";s[172]="&not;";s[173]="&shy;";s[174]="&reg;";s[175]="&macr;";s[176]="&deg;";s[177]="&plusmn;";s[178]="&sup2;";s[179]="&sup3;";s[180]="&acute;";s[181]="&micro;";s[182]="&para;";s[183]="&middot;";s[184]="&cedil;";s[185]="&sup1;";s[186]="&ordm;";s[187]="&raquo;";s[188]="&frac14;";s[189]="&frac12;";s[190]="&frac34;";s[191]="&iquest;";s[192]="&Agrave;";s[193]="&Aacute;";s[194]="&Acirc;";s[195]="&Atilde;";s[196]="&Auml;";s[197]="&Aring;";s[198]="&AElig;";s[199]="&Ccedil;";s[200]="&Egrave;";s[201]="&Eacute;";s[202]="&Ecirc;";s[203]="&Euml;";s[204]="&Igrave;";s[205]="&Iacute;";s[206]="&Icirc;";s[207]="&Iuml;";s[208]="&ETH;";s[209]="&Ntilde;";s[210]="&Ograve;";s[211]="&Oacute;";s[212]="&Ocirc;";s[213]="&Otilde;";s[214]="&Ouml;";s[215]="&times;";s[216]="&Oslash;";s[217]="&Ugrave;";s[218]="&Uacute;";s[219]="&Ucirc;";s[220]="&Uuml;";s[221]="&Yacute;";s[222]="&THORN;";s[223]="&szlig;";s[224]="&agrave;";s[225]="&aacute;";s[226]="&acirc;";s[227]="&atilde;";s[228]="&auml;";s[229]="&aring;";s[230]="&aelig;";s[231]="&ccedil;";s[232]="&egrave;";s[233]="&eacute;";s[234]="&ecirc;";s[235]="&euml;";s[236]="&igrave;";s[237]="&iacute;";s[238]="&icirc;";s[239]="&iuml;";s[240]="&eth;";s[241]="&ntilde;";s[242]="&ograve;";s[243]="&oacute;";s[244]="&ocirc;";s[245]="&otilde;";s[246]="&ouml;";s[247]="&divide;";s[248]="&oslash;";s[249]="&ugrave;";s[250]="&uacute;";s[251]="&ucirc;";s[252]="&uuml;";s[253]="&yacute;";s[254]="&thorn;";s[255]="&yuml;"}if("ENT_NOQUOTES"!==o)s[34]="&quot;";if("ENT_QUOTES"===o)s[39]="&#39;";s[60]="&lt;";s[62]="&gt;";for(n in s)if(s.hasOwnProperty(n))r[String.fromCharCode(n)]=s[n];return r}},function(e,t,n){var i=n(1),o=n(13);if("string"==typeof(o=o.__esModule?o.default:o))o=[[e.i,o,""]];var s={insert:"head",singleton:!1};i(o,s);e.exports=o.locals||{}},function(e,t,n){(t=n(2)(!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;cursor:pointer;margin:0}.tribute-container li.highlight{background-color:rgba(0,23,70,.086)}.tribute-container li.no-match{cursor:default}",""]);e.exports=t},function(e,t,n){"use strict";var i=window.URL||window.webkitURL;e.exports=function(e,t){try{try{var n;try{(n=new(window.BlobBuilder||window.WebKitBlobBuilder||window.MozBlobBuilder||window.MSBlobBuilder)).append(e);n=n.getBlob()}catch(t){n=new Blob([e])}return new Worker(i.createObjectURL(n))}catch(t){return new Worker("data:application/javascript,"+encodeURIComponent(e))}}catch(e){if(!t)throw Error("Inline worker is not supported");return new Worker(t)}}},function(e,t,n){(t=n(2)(!1)).push([e.i,"a:not([href]){cursor:pointer}.cd-autocompleteTypesMultiselect .oo-ui-multioptionWidget.oo-ui-widget-enabled{cursor:default}.cd-autocompleteTypesMultiselect .oo-ui-checkboxMultioptionWidget,.cd-autocompleteTypesMultiselect .oo-ui-checkboxMultioptionWidget .oo-ui-checkboxInputWidget,.cd-autocompleteTypesMultiselect .oo-ui-checkboxMultioptionWidget.oo-ui-labelElement>.oo-ui-labelElement-label{display:inline-block}.cd-autocompleteTypesMultiselect .oo-ui-checkboxMultioptionWidget .oo-ui-checkboxInputWidget{width:auto}.cd-autocompleteTypesMultiselect .oo-ui-checkboxMultioptionWidget:not(:last-child){margin-right:1em}",""]);e.exports=t},function(e,t,n){var i=n(1),o=n(17);if("string"==typeof(o=o.__esModule?o.default:o))o=[[e.i,o,""]];var s={insert:"head",singleton:!1};i(o,s);e.exports=o.locals||{}},function(e,t,n){(t=n(2)(!1)).push([e.i,".cd-commentPart-first{margin-top:.5em}.cd-commentPart-last{margin-bottom:.5em}ol>li.cd-commentPart-first{margin-top:0}ol>li.cd-commentPart-last{margin-bottom:.1em}.cd-commentLevel.cd-commentLevel:not(ol){list-style-type:none;list-style-image:none;margin:0}.mw-content-ltr .cd-commentLevel:not(ol),.mw-content-rtl .mw-content-ltr .cd-commentLevel:not(ol){padding-left:1em;padding-right:0;margin-left:1em;margin-right:0;border-left:1px solid #c8ccd1;border-right:0}.mw-content-ltr .mw-content-rtl .cd-commentLevel:not(ol),.mw-content-rtl .cd-commentLevel:not(ol){padding-left:0;padding-right:1em;margin-left:0;margin-right:1em;border-left:0;border-right:1px solid #c8ccd1}.mw-content-ltr dl.cd-commentLevel>dd,.mw-content-rtl .mw-content-ltr dl.cd-commentLevel>dd,dl.cd-commentLevel>dd{margin-left:0}.mw-content-ltr .mw-content-rtl dl.cd-commentLevel>dd,.mw-content-rtl dl.cd-commentLevel>dd{margin-right:0}.cd-button-pending.cd-button-pending.cd-button-pending .oo-ui-buttonElement-button{cursor:wait}",""]);e.exports=t},function(e,t,n){var i=n(1),o=n(19);if("string"==typeof(o=o.__esModule?o.default:o))o=[[e.i,o,""]];var s={insert:"head",singleton:!1};i(o,s);e.exports=o.locals||{}},function(e,t,n){(t=n(2)(!1)).push([e.i,'.cd-commentForm{display:flow-root;-ms-display:grid;margin:.5em 0;font-size:14px}.cd-commentForm .cd-headlineInput{margin-bottom:.214286em}.cd-commentForm .oo-ui-textInputWidget{max-width:none}.cd-commentForm .cd-summaryInput{margin-top:.214286em}.cd-commentForm .cd-checkboxesContainer{margin-top:.5em}.cd-commentForm .cd-checkboxesContainer .oo-ui-fieldLayout{margin-right:1em}.cd-commentForm .cd-checkboxesContainer .oo-ui-fieldLayout:last-child{margin-right:0}.cd-commentForm .cd-buttonsContainer{margin-top:.5em;display:flow-root;-ms-display:grid}.cd-commentForm .cd-leftButtonsContainer{float:left}.cd-commentForm .cd-rightButtonsContainer{float:right}.cd-commentForm .oo-ui-buttonElement-framed>.oo-ui-buttonElement-button{vertical-align:middle}.cd-commentForm .cd-settingsButton{margin:-1em 0 0}.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 .cd-checkboxesContainer{direction:ltr;text-align:left}.ltr .cd-commentForm .cd-checkboxesContainer .oo-ui-fieldLayout{margin-right:1em;margin-left:0}.ltr .cd-commentForm .cd-checkboxesContainer .oo-ui-fieldLayout:last-child{margin-right:0}.ltr .cd-commentForm .cd-buttonsContainer{direction:ltr}.ltr .cd-commentForm .cd-leftButtonsContainer{float:left}.ltr .cd-commentForm .cd-rightButtonsContainer{float:right}.rtl .cd-commentForm .cd-checkboxesContainer{direction:rtl;text-align:right}.rtl .cd-commentForm .cd-checkboxesContainer .oo-ui-fieldLayout{margin-left:1em;margin-right:0}.rtl .cd-commentForm .cd-checkboxesContainer .oo-ui-fieldLayout:last-child{margin-left:0}.rtl .cd-commentForm .cd-buttonsContainer{direction:rtl}.rtl .cd-commentForm .cd-leftButtonsContainer{float:right}.rtl .cd-commentForm .cd-rightButtonsContainer{float:left}ol>li.cd-commentForm{display:list-item;-ms-display:list-item}.cd-replyWrapper{margin-top:.5em}.cd-commentInput{margin-top:1px;border:1px solid #a2a9b1}.cd-commentInput .wikiEditor-ui .wikiEditor-ui-view{border:0}.cd-commentInput .oo-ui-inputWidget-input.oo-ui-inputWidget-input{width:calc(100% + 2px);margin:-1px;position:relative}.cd-commentInput.oo-ui-widget-disabled+.cd-insertButtons,.cd-commentInput.oo-ui-widget-disabled .wikiEditor-ui-top{pointer-events:none}body:not(.skin-monobook) .cd-commentInput.oo-ui-textInputWidget.oo-ui-widget-disabled,body:not(.skin-monobook) .cd-commentInput.oo-ui-textInputWidget.oo-ui-widget-disabled+.cd-insertButtons,body:not(.skin-monobook) .cd-commentInput.oo-ui-textInputWidget.oo-ui-widget-disabled .oo-ui-inputWidget-input,body:not(.skin-monobook) .cd-commentInput.oo-ui-textInputWidget.oo-ui-widget-disabled .wikiEditor-ui-top{border-color:#c8ccd1}.cd-previewArea{margin-top:.5em;padding:.5em .75em;background-color:#f8f9fa;display:flow-root;-ms-display:grid}.cd-previewArea>.mw-parser-output>:first-child{margin-top:0}.cd-previewArea>.mw-parser-output>:last-child{margin-bottom:0}.cd-previewArea .mw-editsection,.cd-previewArea .mw-headline-number{display:none}.cd-previewArea:empty{margin:0;padding:0}.cd-previewArea-above{margin-top:0;margin-bottom:.5em;width:calc(100% - 1.5em)}.cd-previewArea-indentedComment>.mw-parser-output>dl>dd{margin-left:0;margin-bottom:0}.cd-previewArea-label{color:#72777d;margin-bottom:.5em}.cd-messageArea{width:100%}.cd-messageArea,.cd-previewArea{position:relative;clear:both}.cd-messageArea .cd-closeButton,.cd-previewArea .cd-closeButton{background-color:#f8f9fa}.cd-messageArea:hover .cd-closeButton,.cd-previewArea:hover .cd-closeButton{opacity:1}.cd-messageArea,.cd-previewArea-above{float:left}.cd-messageArea+*,.cd-previewArea-above+*{clear:both}.cd-closeButton{position:absolute;z-index:1;top:0;right:0;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}.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-item{color:#222;padding:2px .5em 3px;white-space:nowrap;display:block}.cd-insertButtons-item:focus,.cd-insertButtons-item:hover{text-decoration:none;color:#222;background-color:rgba(0,23,70,.086)}.ltr .cd-insertButtons-item{float:left}.rtl .cd-insertButtons-item{float:right}.cd-toolbarPlaceholder{background-color:#f8f9fa;border:solid #a2a9b1;border-width:1px 1px 0;height:32px;margin:1px 0 -1px}.cd-commentForm-edit .cd-toolbarPlaceholder{border-color:#c8ccd1}.tribute-container.cd-autocompleteContainer li.highlight{font-weight:400}',""]);e.exports=t},function(e,t,n){var i=n(1),o=n(21);if("string"==typeof(o=o.__esModule?o.default:o))o=[[e.i,o,""]];var s={insert:"head",singleton:!1};i(o,s);e.exports=o.locals||{}},function(e,t,n){(t=n(2)(!1)).push([e.i,'.cd-sectionLinkWrapper:before{content:" | ";color:#54595d}.cd-sectionButtonContainer{margin-top:.5em}.cd-replyWrapper:not(.cd-commentForm){margin-left:-1px}.mw-content-ltr .cd-replyWrapper:not(.cd-commentForm){margin-left:-1px;margin-right:0}.mw-content-rtl .cd-replyWrapper:not(.cd-commentForm){margin-right:-1px;margin-left:0}ol .cd-sectionButton{margin-top:-2px}.cd-refreshButtonContainer .oo-ui-labelElement-label{white-space:normal}.ltr .mw-content-rtl .mw-editsection:before{content:"\\200B\\200E"}.rtl .mw-content-ltr .mw-editsection:before{content:"\\200B\\200F"}.client-js .ltr .mw-content-rtl .mw-editsection-bracket:first-of-type,.client-js .rtl .mw-content-ltr .mw-editsection-bracket:last-of-type{margin-right:.25em;margin-left:0}.client-js .ltr .mw-content-rtl .mw-editsection-bracket:last-of-type,.client-js .rtl .mw-content-ltr .mw-editsection-bracket:first-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(1),o=n(23);if("string"==typeof(o=o.__esModule?o.default:o))o=[[e.i,o,""]];var s={insert:"head",singleton:!1};i(o,s);e.exports=o.locals||{}},function(e,t,n){(t=n(2)(!1)).push([e.i,".cd-commentUnderlay{position:absolute;z-index:-1}.cd-commentUnderlay-new{background-color:var(--cd-comment-new-color)}.cd-commentUnderlay-own{background-color:var(--cd-comment-own-color)}.cd-commentUnderlay-deleted{background-color:var(--cd-comment-deleted-color)}.cd-commentUnderlay-focused{background-color:var(--cd-comment-focused-color)}.cd-commentOverlay{position:absolute;display:none;pointer-events:none;justify-content:flex-end;line-height:1.4285714em}.cd-commentOverlay-focused{display:flex}.cd-commentOverlay-innerWrapper{position:absolute;z-index:1;bottom:0;font-size:14px;pointer-events:all;display:flex;flex-direction:row}.cd-commentOverlay-gradient{width:1.4em;display:inline-block;padding:1px 1px 2px;-moz-user-select:none;-webkit-user-select:none;user-select:none}.cd-commentOverlay-content{display:inline-flex;padding:0 .5em 1px;background-color:var(--cd-comment-focused-color);flex-direction:row}.cd-commentOverlay .cd-button.oo-ui-buttonElement-frameless.oo-ui-widget-enabled>.oo-ui-buttonElement-button:active,.cd-commentOverlay .cd-button.oo-ui-buttonElement-frameless.oo-ui-widget-enabled>.oo-ui-buttonElement-button:hover{background-color:initial}.cd-commentOverlay .oo-ui-buttonElement-frameless.oo-ui-iconElement:first-child{margin-left:0}.ltr .cd-commentOverlay .oo-ui-buttonWidget{margin-right:0}.ltr .cd-commentOverlay .cd-commentButton:not(:first-child){margin-left:1em}.rtl .cd-commentOverlay .oo-ui-buttonWidget{margin-left:0}.rtl .cd-commentOverlay .cd-commentButton:not(:first-child){margin-right:1em}body:not(.skin-monobook) .cd-commentButton-icon.oo-ui-buttonElement-frameless.oo-ui-iconElement>.oo-ui-buttonElement-button{padding-top:1.4285714em;padding-left:1.4285714em;min-width:unset}body:not(.skin-monobook) .cd-commentButton-icon.oo-ui-buttonElement-frameless.oo-ui-iconElement>.oo-ui-buttonElement-button>.oo-ui-iconElement-icon{left:0}.cd-commentLayersContainerParent-relative{position:relative;z-index:0;overflow:hidden!important}",""]);e.exports=t},function(e,t,n){var i=n(1),o=n(25);if("string"==typeof(o=o.__esModule?o.default:o))o=[[e.i,o,""]];var s={insert:"head",singleton:!1};i(o,s);e.exports=o.locals||{}},function(e,t,n){(t=n(2)(!1)).push([e.i,'#cd-navPanel{position:fixed;top:41.5%;left:0;z-index:5;width:34px;background-color:#fff;border:1px solid #a2a9b1;border-left-width:0;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(https://upload.wikimedia.org/wikipedia/commons/1/17/OOjs_UI_icon_reload.svg);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(https://upload.wikimedia.org/wikipedia/commons/1/10/OOjs_UI_icon_collapse.svg);background-size:16px 16px}#cd-navPanel-nextButton{background-image:url(https://upload.wikimedia.org/wikipedia/commons/9/90/OOjs_UI_icon_expand.svg);background-size:16px 16px}#cd-navPanel-firstUnseenButton{height:17px;padding:7px 0}#cd-navPanel-commentFormButton{background-image:url(https://upload.wikimedia.org/wikipedia/commons/a/ac/OOjs_UI_icon_ongoingConversation-ltr.svg);background-size:16px 16px;background-position-y:54%}.sitedir-ltr #cd-navPanel{left:0;right:unset;border-left-width:0;border-right-width:1px}.sitedir-ltr.rtl #cd-navPanel,.sitedir-rtl #cd-navPanel{right:0;left:unset;border-left-width:1px;border-right-width:0}.cd-navPanel-button{display:block;text-align:center;background-position:50%;background-repeat:no-repeat;cursor:pointer}.cd-navPanel-button:hover{background-color:#eaecf0}.cd-navPanel-button:not(:first-child){position:relative;height:31px;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-interesting{color:#7d00cc}',""]);e.exports=t},function(e,t,n){var i=n(1),o=n(27);if("string"==typeof(o=o.__esModule?o.default:o))o=[[e.i,o,""]];var s={insert:"head",singleton:!1};i(o,s);e.exports=o.locals||{}},function(e,t,n){(t=n(2)(!1)).push([e.i,".skin-monobook .cd-commentUnderlay{z-index:-1}.skin-monobook .cd-commentOverlay-innerWrapper{z-index:2}.skin-monobook .cd-commentButton.oo-ui-buttonElement.oo-ui-labelElement>.oo-ui-buttonElement-button>.oo-ui-labelElement-label{line-height:1.172em}.skin-monobook .cd-commentButton-icon.oo-ui-buttonElement-frameless.oo-ui-iconElement>.oo-ui-buttonElement-button{padding:0}.skin-monobook .cd-commentButton-icon.oo-ui-buttonElement-frameless.oo-ui-iconElement>.oo-ui-buttonElement-button>.oo-ui-iconElement-icon{margin:0;width:20px;height:20px}.skin-monobook .cd-commentInput{border:1px solid #ccc}.skin-monobook .cd-commentInput .wikiEditor-ui-toolbar{z-index:auto}.skin-monobook .cd-commentInput.oo-ui-textInputWidget.oo-ui-widget-disabled,.skin-monobook .cd-commentInput.oo-ui-textInputWidget.oo-ui-widget-disabled .oo-ui-inputWidget-input,.skin-monobook .cd-commentInput.oo-ui-textInputWidget.oo-ui-widget-disabled .wikiEditor-ui-top,.skin-monobook .cd-insertButtons,.skin-monobook .cd-toolbarPlaceholder{border-color:#ccc}.skin-monobook .cd-loadingPopup{width:15.5em}.skin-timeless .mw-body-content{position:relative}.skin-timeless .cd-loadingPopup{width:15em}.skin-timeless .cd-loadingPopup-logo-partBackground{background-color:#eaecf0!important}.skin-modern #mw-content-text{position:relative}.skin-modern .cd-loadingPopup{width:18.2em}",""]);e.exports=t},function(e,t,n){var i=n(1),o=n(29);if("string"==typeof(o=o.__esModule?o.default:o))o=[[e.i,o,""]];var s={insert:"head",singleton:!1};i(o,s);e.exports=o.locals||{}},function(e,t,n){(t=n(2)(!1)).push([e.i,".cd-commentButton.oo-ui-buttonElement-frameless.oo-ui-labelElement>.oo-ui-buttonElement-button,.cd-sectionButton.oo-ui-buttonElement-frameless.oo-ui-labelElement>.oo-ui-buttonElement-button{padding:0}.cd-commentButton.oo-ui-buttonElement-frameless.oo-ui-labelElement:first-child,.cd-sectionButton.oo-ui-buttonElement-frameless.oo-ui-labelElement:first-child{margin-left:0;margin-right:0}.cd-button.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}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}.ltr .cd-loadingPopup{left:0}.rtl .cd-loadingPopup{right:0}@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-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-editMark{margin-left:1em;font-size:85%;color:#72777d}.cd-link-pending.cd-link-pending{opacity:.5;cursor:wait;text-decoration:none}.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:2.20779221em}.cd-diffView-diff{margin:1em 0}.cd-diffView-nextDiffLink{float:right;margin-left:1em}.cd-commentDiffView-below{margin:.5em 0 0}#cd-currentSection{position:fixed;top:0;left:0;z-index:5;font-size:12px;padding:7px 9px;line-height:1.2;list-style-type:none;list-style-image:none;margin:0;color:#202122;overflow-wrap:break-word}#cd-currentSection:empty{padding:0}.cd-currentSection-level{margin:0 0 .25em;cursor:pointer}.cd-currentSection-level:last-child{margin-bottom:0}.cd-currentSection-level-1{margin-left:.75em}.cd-currentSection-level-2{margin-left:1.5em}.cd-currentSection-level-3{margin-left:2.25em}.cd-currentSection-level-4{margin-left:3em}.cd-currentSection-level-5{margin-left:3.75em}.cd-currentUserLink{background-color:#efd7ff}",""]);e.exports=t},function(e,t,n){var i=n(1),o=n(31);if("string"==typeof(o=o.__esModule?o.default:o))o=[[e.i,o,""]];var s={insert:"head",singleton:!1};i(o,s);e.exports=o.locals||{}},function(e,t,n){(t=n(2)(!1)).push([e.i,".cd-commentLink-interesting 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}.cd-watchlistMenu-button-switchInteresting .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(0),o=n.n(i);const s="undefined"==typeof window?self:window;s.convenientDiscussions=s.convenientDiscussions||{};if("object"!=typeof s.convenientDiscussions)s.convenientDiscussions={};var cd=s.convenientDiscussions,r=n(4);class CdError extends Error{constructor(e){let t;if(e){var n,i;t=e.type;if(e.code)t+="/".concat(e.code);if(null==e?void 0:null===(n=e.apiData)||void 0===n?void 0:null===(i=n.error)||void 0===i?void 0:i.code)t+="/".concat(e.apiData.error.code)}else t="";super(t);this.name="CdError";this.data=e}}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}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.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();setTimeout(()=>{this.tribute.selectItemAtIndex(this.tribute.menuSelected,e);this.tribute.hideMenu()},0)}},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.querySelectorAll("li"),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 c=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("MSPointerDown",this.menuClickEvent,!1);document.addEventListener("mousedown",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("mousedown",this.menuClickEvent,!1);document.removeEventListener("MSPointerDown",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,s=arguments,r=n&&!i;clearTimeout(i);i=setTimeout(()=>{i=null;if(!n)e.apply(o,s)},t);if(r)e.apply(o,s)}}};const l=/[\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 u=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: ".concat(t.top).concat("number"==typeof t.top?"px":"","; ")+"left:".concat(t.left).concat("number"==typeof t.left?"px":"","; ")+"right: ".concat(t.right).concat("number"==typeof t.right?"px":"","; ")+"bottom: ".concat(t.bottom).concat("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 s=0;s<t.length;s++){o=o.childNodes[t[s]];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 r=window.getSelection();i=document.createRange();i.setStart(o,n);i.setEnd(o,n);i.collapse(!0);try{r.removeAllRanges()}catch(e){console.warn(e)}r.addRange(i);e.focus()}replaceTriggerText(e,t,n,i,o){let s=this.getTriggerInfo(!0,n,t,this.tribute.allowSpaces);if(void 0!==s){let t=this.tribute.current,n=new CustomEvent("tribute-replaced",{detail:{item:o,instance:t,context:s,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 r=this.tribute.current.element,a=s.mentionPosition+s.mentionText.length+s.mentionTriggerChar.length,c=r.value.substring(a,r.value.length);if((i.shiftKey||i.altKey)&&e.shiftModify)e=e.shiftModify(e);if(i.altKey){e.content=c;a+=c.length;c=""}let l=s.mentionPosition;r.selectionStart=l;r.selectionEnd=a;if(t.collection.keepAsEnd&&!i.shiftKey){const[n]=c.match(t.collection.keepAsEnd)||[];if(n){c=c.slice(n.length);r.selectionEnd+=n.length;e.end=n}}let u=e.start+e.content+e.end;u+="string"==typeof this.tribute.replaceTextSuffix?this.tribute.replaceTextSuffix:" ";r.focus();if(!document.execCommand("insertText",!1,u))r.value=r.value.substring(0,l)+u+c;if(i.shiftKey||e.typeContent&&!e.content){r.selectionEnd=l+u.length-e.end.length;r.selectionStart=l+e.start.length}else{r.selectionEnd=l+u.length;r.selectionStart=r.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 s=this.getTextPrecedingCurrentSelection();if(null!=s){let r,a,c,u,d,h=-1,m=0;this.tribute.collection.forEach(e=>{let t=e.trigger,i=e.requireLeadingSpace?this.lastIndexWithLeadingSpace(s,t):s.lastIndexOf(t);if(i>h||i>-1&&i===h&&t.length>m){h=i;m=t.length;r=t;n=e.requireLeadingSpace}});let f=h>=0&&(0===h||!n||l.test(s.substring(h-1,h)));if(f){a=s.substring(h+r.length,s.length);c=a;r=s.substring(h,h+r.length);let e=a.substring(0,1);u=a.length>0&&(" "===e||"\xa0"===e);if(t)a=a.trim();d=i?/[^\S ]/g:/[\xA0\s]/g;this.tribute.hasTrailingSpace=d.test(a)}if(-1===h||c&&!c[0].trim()||c.includes("\n")||o.selectionStart!==o.selectionEnd||this.tribute.current.trigger&&r!==this.tribute.current.trigger){this.tribute.dropMenu=!0;return}if(f&&!u&&(e||!d.test(a)))return{mentionPosition:h,mentionText:a,mentionSelectedElement:o,mentionSelectedPath:void 0,mentionSelectedOffset:void 0,mentionTriggerChar:r}}}lastIndexWithLeadingSpace(e,t){let n=e.split("").reverse().join(""),i=-1;for(let o=0,s=e.length;o<s;o++){let s=o===e.length-1,r=l.test(n[o+1]),a=!0;for(let e=t.length-1;e>=0;e--)if(t[e]!==n[o-e]){a=!1;break}if(a&&(s||r)){i=e.length-1-o;break}}return i}isMenuOffScreen(e,t){let n=window.innerWidth,i=window.innerHeight,o=document.documentElement,s=(window.pageXOffset||o.scrollLeft)-(o.clientLeft||0),r=(window.pageYOffset||o.scrollTop)-(o.clientTop||0),a="number"==typeof e.top?e.top:r+i-e.bottom-t.height,c="number"==typeof e.right?e.right:e.left+t.width,l="number"==typeof e.bottom?e.bottom:e.top+t.height,u="number"==typeof e.left?e.left:s+n-e.right-t.width;return{top:a<Math.floor(r),right:c>Math.ceil(s+n),bottom:l>Math.ceil(r+i)-3,left:u<Math.floor(s)}}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,s=window.getComputedStyle?getComputedStyle(e):e.currentStyle;o.whiteSpace="pre-wrap";if("INPUT"!==e.nodeName)o.wordWrap="break-word";o.position="absolute";o.visibility="hidden";["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]=s[e]});if(n){o.width="".concat(parseFloat(s.width)-2,"px");if(e.scrollHeight>parseFloat(s.height))o.overflowY="scroll"}else o.overflow="hidden";i.textContent=e.value.substring(0,t);let r=document.createElement("span");r.textContent=this.tribute.current.trigger;let a=document.createElement("span");a.append(r,e.value.substring(t+this.tribute.current.trigger.length)||".");i.appendChild(a);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,p=0,g=0;if(this.menuContainerIsBody){f=d.top;p=d.left;g=d.right}let b={top:f+m+a.offsetTop+parseInt(s.borderTopWidth)+parseInt(s.fontSize)-e.scrollTop};if(this.tribute.isRtl)b.right=l-g+(l-a.getBoundingClientRect().right)+r.offsetWidth;else b.left=h+p+a.offsetLeft+r.offsetWidth+1;let y=this.getMenuDimensions(),v=this.isMenuOffScreen(b,y);if(this.tribute.isRtl){if(v.left){b.left=0;b.right="auto"}}else if(v.right){b.right=0;b.left="auto"}if(v.bottom){const t=m+u-b.top-parseFloat(getComputedStyle(e).paddingTop)-3;b.additionalStyles="height: ".concat(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 d=class{constructor(e){this.tribute=e;this.tribute.search=this}match(e,t,n){let i=(n=n||{}).pre||"",o=n.post||"",s=n.caseSensitive&&t||t.toLowerCase();if(n.skip)return{rendered:t,score:0};e=n.caseSensitive&&e||e.toLowerCase();let r=this.traverse(s,e,0,0,[]);if(!r)return null;else return{rendered:this.render(t,r.cache,i,o),score:r.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 s,r,a=t[i],c=e.indexOf(a,n);for(;c>-1;){o.push(c);r=this.traverse(e,t,c+1,i+1,o);o.pop();if(!r)return s;if(!s||s.score<r.score)s=r;c=e.indexOf(a,c+1)}return s}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((s,r)=>{o+=n+e[s]+i+e.substring(s+1,t[r+1]?t[r+1]:e.length)});return o}filter(e,t,n){n=n||{};return t.reduce((t,i,o)=>{let s=i;if(n.extract){s=n.extract(i);if(!s)s=""}let r=this.match(e,s,n);if(null!=r)t[t.length]={string:r.rendered,score:r.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({values:e=null,selectClass:t="highlight",containerClass:n="tribute-container",itemClass:i="",trigger:o="@",selectTemplate:s=null,menuItemTemplate:r=null,lookup:l="key",fillAttr:h="value",collection:m=null,menuContainer:f=null,noMatchTemplate:p=null,requireLeadingSpace:g=!0,allowSpaces:b=!1,replaceTextSuffix:y=null,positionMenu:v=!0,searchOpts:w={},menuItemLimit:E=null,menuShowMinLength:C=0,isRtl:_=!1}){this.menuSelected=0;this.current={};this.inputEvent=!1;this.isActive=!1;this.menuContainer=f;this.allowSpaces=b;this.replaceTextSuffix=y;this.positionMenu=v;this.hasTrailingSpace=!1;this.isRtl=_;if(e)this.collection=[{trigger:o,selectClass:t,containerClass:n,itemClass:i,selectTemplate:(s||Tribute_Tribute.defaultSelectTemplate).bind(this),menuItemTemplate:(r||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 p||function(){return"<li>No Match Found!</li>"}.bind(this)})(p),lookup:l,fillAttr:h,values:e,requireLeadingSpace:g,searchOpts:w,menuItemLimit:E,menuShowMinLength:C}];else if(m)this.collection=m.map(e=>({trigger:e.trigger||o,keepAsEnd:e.keepAsEnd||null,selectClass:e.selectClass||t,containerClass:e.containerClass||n,itemClass:e.itemClass||i,selectTemplate:(e.selectTemplate||Tribute_Tribute.defaultSelectTemplate).bind(this),menuItemTemplate:(e.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 p||function(){return"<li>No Match Found!</li>"}.bind(this)})(p),lookup:e.lookup||l,fillAttr:e.fillAttr||h,values:e.values,requireLeadingSpace:e.requireLeadingSpace,searchOpts:e.searchOpts||w,menuItemLimit:e.menuItemLimit||E,menuShowMinLength:e.menuShowMinLength||C}));else throw new Error("[Tribute] No collection specified.");new u(this);new a(this);new c(this);new d(this)}get isActive(){return this._isActive}set isActive(e){if(this._isActive!=e){this._isActive=e;if(this.current.element){let t=new CustomEvent("tribute-active-".concat(e));this.current.element.dispatchEvent(t)}}}static defaultSelectTemplate(e){if(void 0===e)return"".concat(this.current.collection.trigger).concat(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 jQuery&&e instanceof jQuery)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(this.isRtl)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();n.forEach((e,t)=>{let n=document.createElement("li");n.setAttribute("data-index",t);n.className=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 s=e.value.substring(0,i),r=e.value.substring(e.selectionEnd,e.value.length);e.value=s+t+r;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 jQuery&&e instanceof jQuery)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 h=Tribute_Tribute;let m=null,f=null;function p(e,t,n){return n.indexOf(e)===t}function g(e){const t=document.createElement("span");t.style.color=e;return(e=t.style.color).includes("rgba")?e.replace(/\d+(?=\))/,"0"):e.replace("rgb","rgba").replace(")",", 0)")}function b(e,t){if(t&&e.nodeType===Node.TEXT_NODE)return!0;if(e.nodeType!==Node.ELEMENT_NODE)return null;if(cd.g.POPULAR_INLINE_ELEMENTS.includes(e.tagName))return!0;else if(cd.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 y(e){const t=e[0];return(t.toUpperCase()!==t.toLowerCase()?"["+t.toUpperCase()+t.toLowerCase()+"]":mw.util.escapeRegExp(t))+mw.util.escapeRegExp(e.slice(1))}function v(e,t){var n,i,o;return(t%2==1||(null===(n=cd.g.PAGE_WHITELIST_REGEXP)||void 0===n?void 0:n.test(e))||!cd.g.PAGE_WHITELIST_REGEXP&&(null===(i=cd.config.customTalkNamespaces)||void 0===i?void 0:i.includes(t)))&&!(null===(o=cd.g.PAGE_BLACKLIST_REGEXP)||void 0===o?void 0:o.test(e))}function w(e){return e&&(e.includes("".concat(cd.s("es-edit")," ").concat(cd.s("es-reply-genitive")))||e.includes("".concat(cd.s("es-edit")," ").concat(cd.s("es-addition-genitive"))))}function E(e){return e&&cd.config.undoTexts.some(t=>e.includes(t))}function C(e){return void 0!==e}function _(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 T(e,t){throw"http"===e?new CdError({type:"network"}):new CdError({type:"api",code:"error",apiData:t})}function A(e){return e.replace(/_/g," ")}function x(e){return e.replace(/ /g,"_")}function S(e){return e.replace(/ {2,}/g," ")}function k(e){return e.length?function(e){if(""===cd.g.PHP_CHAR_TO_UPPER_JSON[e])return e;else return cd.g.PHP_CHAR_TO_UPPER_JSON[e]||e.toUpperCase()}(e[0])+e.slice(1):""}function N(e){return e.map(mw.msg)}function P(){return $(":focus:input").length||$(":focus").prop("isContentEditable")}function O(e){if(!e)return null;const t=e.map(e=>e.source||e).join("|");return t?new RegExp("(".concat(t,")")):null}function I(e,t,n,i){return e.replace(t,(e,t,o)=>{if("number"==typeof t){t=null;o=null}return(t||"")+(i?"\x03":"\x01")+n.push(o||e)+(i?"\x04":"\x02")})}function F(e,t){for(;/(?:\x01|\x03)\d+(?:\x02|\x04)/.test(e);)e=e.replace(/(?:\x01|\x03)(\d+)(?:\x02|\x04)/g,(e,n)=>t[n-1]);return e}function D(e=!0){m=window.pageYOffset;f=(e||f)&&cd.g.$toc.length&&!cd.g.isTocFloating&&0!==window.pageYOffset&&window.pageYOffset+window.innerHeight>cd.g.$toc.offset().top+cd.g.$toc.outerHeight()?cd.g.$toc.outerHeight():null}function L(e=!0){if(null!==m){if(f)m+=(cd.g.$toc.outerHeight()||0)-f;window.scrollTo(0,m);m=null;if(e)f=null}}function B(){return(B=o()((function*(e){const t={};return Promise.race([e,t]).then(e=>e===t?"pending":"resolved",()=>"rejected")}))).apply(this,arguments)}function M(e){if("loading"===mw.loader.getState(e)){const e=cd.util.wrap(cd.sParse("error-needreloadpage"),{callbacks:{"cd-notification-reloadPage":()=>{location.reload()}}});mw.notify(e,{type:"error"});return!0}return!1}function R(e){if(void 0===e.convenientDiscussionsMarginTop){const t=window.getComputedStyle(e);e.convenientDiscussionsMarginTop=parseFloat(t.marginTop);e.convenientDiscussionsMarginBottom=parseFloat(t.marginBottom)}const t=e.getBoundingClientRect();return{outerTop:t.top-e.convenientDiscussionsMarginTop,outerBottom:t.bottom+e.convenientDiscussionsMarginBottom,top:t.top,bottom:t.top,left:t.left,right:t.right,width:t.width,height:t.height}}function j(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 s=Object.keys(e).filter(t=>void 0!==e[t]),r=Object.keys(t).filter(e=>void 0!==t[e]);return(s.length===r.length||n)&&s.every(n=>j(e[n],t[n]))}function H(e){const t=localStorage.getItem("convenientDiscussions-".concat(e));let n;if(t)try{n=JSON.parse(t)||{}}catch(e){console.error(e,t);return{}}return n||{}}function U(e,t){localStorage.setItem("convenientDiscussions-".concat(e),JSON.stringify(t))}function Y(e){return e.replace(/[\u200E\u200F]/g,"")}function q(e,t){e.focus();if(!document.execCommand("insertText",!1,t))e.insertContent(t)}function W(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(!j(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 G(e,t){const n=new RegExp("[".concat(cd.g.LETTER_PATTERN,"]{2,}"),"g"),i=(e.match(n)||[]).filter(p),o=(t.match(n)||[]).filter(p);if(!i.length||!o.length)return 0;let s=o.length,r=0;i.forEach(e=>{if(o.some(t=>t===e))r++;else s++});return r/s}var V={users:{},getUser(e){if(e.includes("#"))e=e.slice(0,e.indexOf("#"));if(mw.util.isIPv6Address(e))e=e.toUpperCase().trim();else e=A(k(e)).trim();if(!this.users[e]){const t=e===cd.g.CURRENT_USER_NAME?{gender:cd.g.CURRENT_USER_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[e]=t[e]})}isRegistered(){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")}}var z=n(3),K=n.n(z);function X(e){return Object.keys(e).map(t=>"".concat(t,",").concat(e[t].join(","),"\n")).join("").trim()}function J(e){return Object.keys(e).filter(t=>e[t].length).map(t=>" ".concat(t," ").concat(e[t].join("\n"),"\n")).join("").trim()}function Q(){return Z.apply(this,arguments)}function Z(){return(Z=o()((function*({options:e,omitLocal:t=!1,reuse:n=!1}={}){if(!e)({options:e}=yield be(n));let i,o;try{i=JSON.parse(e[cd.g.SETTINGS_OPTION_NAME])||{}}catch(e){i={}}try{o=JSON.parse(e[cd.g.LOCAL_SETTINGS_OPTION_NAME])||{}}catch(e){o={}}let s={};Object.keys(cd.defaultSettings).forEach(e=>{(cd.settingAliases[e]||[]).concat(e).forEach(t=>{if(void 0!==i[t]&&typeof i[t]==typeof cd.defaultSettings[e])s[e]=i[t];if(void 0!==o[t]&&typeof o[t]==typeof cd.defaultSettings[e])s[e]=o[t]})});if(!t)Object.assign(s,ee());return s}))).apply(this,arguments)}function ee(){const e={};Object.keys(cd.defaultSettings).forEach(t=>{(cd.settingAliases[t]||[]).concat(t).forEach(n=>{const i="cdLocal"+k(n);if(i in window&&typeof window[i]==typeof cd.defaultSettings[t])e[t]=window[i]})});return e}function te(e){return ne.apply(this,arguments)}function ne(){return(ne=o()((function*(e){e=e||cd.settings;const t={},n={};Object.keys(e).forEach(i=>{if(cd.localSettingNames.includes(i))n[i]=e[i];else t[i]=e[i]});try{yield Promise.all([xe(cd.g.LOCAL_SETTINGS_OPTION_NAME,JSON.stringify(n)),ke(cd.g.SETTINGS_OPTION_NAME,JSON.stringify(t))])}catch(e){if(e instanceof CdError&&e.data.apiData&&"badvalue"===e.data.apiData.error.code)xe(cd.g.SETTINGS_OPTION_NAME,JSON.stringify(t));else throw e}}))).apply(this,arguments)}function ie(){return oe.apply(this,arguments)}function oe(){return(oe=o()((function*(e=!1){const t=yield cd.g.isFirstRun&&null===mw.user.options.get(cd.g.VISITS_OPTION_NAME)?Promise.resolve({}):be(e).then(e=>e.visits),n=mw.config.get("wgArticleId");let i;if(n){t[n]=t[n]||[];i=t[n]}cd.g.visits=t;cd.g.thisPageVisits=i;return{visits:t,thisPageVisits:i}}))).apply(this,arguments)}function se(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 re(e){return ae.apply(this,arguments)}function ae(){return(ae=o()((function*(e){if(!e)return;const t=X(e),n=K.a.compressToEncodedURIComponent(t);try{yield xe(cd.g.VISITS_OPTION_NAME,n)}catch(t){if(t instanceof CdError){const{type:n,code:i}=t.data;if("internal"===n&&"sizeLimit"===i)re(se(e));else console.error(t)}else console.error(t)}}))).apply(this,arguments)}function ce(){return le.apply(this,arguments)}function le(){return(le=o()((function*(e=!1,t={}){const n=yield cd.g.isFirstRun&&null===mw.user.options.get(cd.g.WATCHED_SECTIONS_OPTION_NAME)?Promise.resolve({}):be(e).then(e=>e.watchedSections),i=mw.config.get("wgArticleId");let o;if(i){n[i]=n[i]||[];o=n[i];if(t.justWatchedSection)if(!o.includes(t.justWatchedSection))o.push(t.justWatchedSection);if(t.justUnwatchedSection)if(o.includes(t.justUnwatchedSection))o.splice(o.indexOf(t.justUnwatchedSection),1)}cd.g.watchedSections=n;cd.g.thisPageWatchedSections=o}))).apply(this,arguments)}function ue(){return de.apply(this,arguments)}function de(){return(de=o()((function*(){const e=J(cd.g.watchedSections),t=K.a.compressToEncodedURIComponent(e);yield xe(cd.g.WATCHED_SECTIONS_OPTION_NAME,t)}))).apply(this,arguments)}let he,me;function fe(e,t="post"){return new Promise((n,i)=>{cd.g.api[t](e,{success:e=>{if(e.error)i("api",e);else n(e)},error:(e,t)=>{i("http",t)}})})}function pe(e,t){return ge.apply(this,arguments)}function ge(){return(ge=o()((function*(e,t){const n={action:"parse",text:e,contentmodel:"wikitext",prop:["text","modules"],pst:!0,disablelimitreport:!0,formatversion:2},i=Object.assign({},n,t);return cd.g.api.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 CdError({type:"api",code:"noData"});const o=e.parse.parsedsummary;if((null==t?void 0:t.summary)&&!o)throw new CdError({type:"api",code:"noData"});return{html:i,parsedSummary:o}},T)}))).apply(this,arguments)}function be(e=!1){if(e&&he)return he;cd.g.api=cd.g.api||new mw.Api;he=cd.g.api.post({action:"query",meta:"userinfo",uiprop:["options","rights"],formatversion:2}).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 CdError({type:"api",code:"noData"});const s=i[cd.g.VISITS_OPTION_NAME],r=function(e){const t={},n=/^(\d+), *(.+)$/gm;let i;for(;i=n.exec(e);)t[i[1]]=i[2].split(",");return t}(s?K.a.decompressFromEncodedURIComponent(s):""),a=i[cd.g.WATCHED_SECTIONS_OPTION_NAME],c=function(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}(a?K.a.decompressFromEncodedURIComponent(a):"");cd.g.CURRENT_USER_RIGHTS=o;return{options:i,visits:r,watchedSections:c,rights:o}},T);return he}function ye(e,t){return ve.apply(this,arguments)}function ve(){return(ve=o()((function*(e,t){let n;if(e){n=cd.sParse("error-api",e)+" ";if(t)try{const{html:e}=yield pe(t);n+=e}catch(e){n+=t}}return n}))).apply(this,arguments)}function we(e){return Ee.apply(this,arguments)}function Ee(){return(Ee=o()((function*(e){var t;const n=[],i=(null===(t=cd.g.CURRENT_USER_RIGHTS)||void 0===t?void 0:t.includes("apihighlimits"))?500:50;let o;for(;o=e.splice(0,i).join("|");){const e=yield cd.g.api.post({action:"query",pageids:o,formatversion:2}).catch(T);if(e.error)throw new CdError({type:"api",code:"error",apiData:e});const t=e.query,i=null==t?void 0:t.pages;if(!i)throw new CdError({type:"api",code:"noData"});n.push(...i)}return n}))).apply(this,arguments)}function Ce(e){return _e.apply(this,arguments)}function _e(){return(_e=o()((function*(e){var t;const n=[],i=[],o=[],s=(null===(t=cd.g.CURRENT_USER_RIGHTS)||void 0===t?void 0:t.includes("apihighlimits"))?500:50;let r;for(;r=e.splice(0,s).join("|");){const e=yield cd.g.api.post({action:"query",titles:r,redirects:!0,formatversion:2}).catch(T);if(e.error)throw new CdError({type:"api",code:"error",apiData:e});const t=e.query,s=null==t?void 0:t.pages;if(!s)throw new CdError({type:"api",code:"noData"});i.push(...t.normalized||[]);o.push(...t.redirects||[]);n.push(...s)}return{pages:n,normalized:i,redirects:o}}))).apply(this,arguments)}function Te(e,t,n){return Ae.apply(this,arguments)}function Ae(){return(Ae=o()((function*(e,t,n){if(t&&t.length>65535)throw new CdError({type:"internal",code:"sizeLimit",details:{action:n}});const i=yield fe(cd.g.api.assertCurrentUser({action:n,optionname:e,optionvalue:void 0===t&&"globalpreferences"===n?"":t}),"postWithEditToken").catch(T);if(!i||"success"!==i[n])throw new CdError({type:"api",code:"noSuccess",details:{action:n}})}))).apply(this,arguments)}function xe(e,t){return Se.apply(this,arguments)}function Se(){return(Se=o()((function*(e,t){yield Te(e,t,"options")}))).apply(this,arguments)}function ke(e,t){return Ne.apply(this,arguments)}function Ne(){return(Ne=o()((function*(e,t){yield Te(e,t,"globalpreferences")}))).apply(this,arguments)}function Pe(e){return Oe.apply(this,arguments)}function Oe(){return(Oe=o()((function*(e,t=!1){var n;const i=e.filter(e=>!e.getGender()).map(e=>e.name),o=(null===(n=cd.g.CURRENT_USER_RIGHTS)||void 0===n?void 0:n.includes("apihighlimits"))?500:50;let s;for(;s=i.splice(0,o).join("|");){var r;const e={action:"query",list:"users",ususers:s,usprop:"gender",formatversion:2},n=null===(r=(yield(t?fe(e):cd.g.api.post(e)).catch(T)).query)||void 0===r?void 0:r.users;if(!n)throw new CdError({type:"api",code:"noData"});n.filter(e=>e.gender).forEach(e=>{V.getUser(e.name).setGender(e.gender)})}}))).apply(this,arguments)}class Autocomplete_Autocomplete{constructor({types:e,inputs:t,comments:i,defaultUserNames:o}){e=e.filter(e=>cd.settings.autocompleteTypes.includes(e)||"mentions"===e);const s=this.getCollections(e,i,o);n(12);this.tribute=new h({collection:s,allowSpaces:!0,menuItemLimit:10,noMatchTemplate:()=>null,containerClass:"tribute-container cd-autocompleteContainer",replaceTextSuffix:"",isRtl:"rtl"===cd.g.SITE_DIR});t.forEach(e=>{const t=e.$input.get(0);this.tribute.attach(t);t.cdInput=e;t.addEventListener("tribute-active-true",()=>{cd.g.activeAutocompleteMenu=this.tribute.menu});t.addEventListener("tribute-active-false",()=>{cd.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)})})}getCollections(e,t,n){var i=this;const s=e=>{if(e)return e.original.transform(e.original.item);else return""},r=(e,t)=>e.filter(C).filter(p).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}}),a=new RegExp(cd.mws("word-separator"),"g"),c={mentions:{trigger:cd.config.mentionCharacter,searchOpts:{skip:!0},requireLeadingSpace:cd.config.mentionRequiresLeadingSpace,selectTemplate:s,values:(h=o()((function*(e,t){if(cd.settings.autocompleteTypes.includes("mentions")||i.tribute.current.externalTrigger){if(!(e=S(e)).startsWith(i.mentions.snapshot))i.mentions.cache=[];i.mentions.snapshot=e;if(!e.includes("[["))if(i.mentions.byText[e])t(r(i.mentions.byText[e],i.mentions));else{const n=Autocomplete_Autocomplete.search(e,i.mentions.default);let o=n.slice();const s=e&&e.length<=85&&!/[#<>[\]|{}/@:]/.test(e)&&(e.match(a)||[]).length<=4;if(s){if(!n.length)o.push(...i.mentions.cache);o=Autocomplete_Autocomplete.search(e,o);o[9]=e.trim()}t(r(o,i.mentions));if(s&&!n.length){let n;try{n=yield function(e){const t=new Promise((n,i)=>{setTimeout(()=>{try{if(t!==me)throw new CdError;cd.g.api.get({action:"opensearch",search:e,namespace:3,redirects:"resolve",limit:10,formatversion:2}).then(e=>{var t;const i=null===(t=e[1])||void 0===t?void 0:t.map(e=>(e.match(cd.g.USER_NAMESPACES_REGEXP)||[])[1]).filter(C).filter(e=>!e.includes("/"));if(!i)throw new CdError({type:"api",code:"noData"});n(i)},e=>{T(e)})}catch(e){i(e)}},100)});me=t;return t}(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(r(n,i.mentions))}}else t([])}})),function(e,t){return h.apply(this,arguments)})},wikilinks:{trigger:"[[",keepAsEnd:/^(?:\||\]\])/,searchOpts:{skip:!0},selectTemplate:s,values:(d=o()((function*(e,t){if(!(e=S(e)).startsWith(i.wikilinks.snapshot))i.wikilinks.cache=[];i.wikilinks.snapshot=e;if(i.wikilinks.byText[e])t(r(i.wikilinks.byText[e],i.wikilinks));else{let n=[];const o=e&&":"!==e&&e.length<=255&&(e.match(a)||[]).length<=9&&!/[#<>[\]|{}]/.test(e),s=o&&!((/^:/.test(e)||/^[a-z]\w*:/.test(e))&&!cd.g.ALL_NAMESPACES_REGEXP.test(e));if(s){n.push(...i.wikilinks.cache);n=Autocomplete_Autocomplete.search(e,n)}if(o)n[9]=e.trim();t(r(n,i.wikilinks));if(s){let n;try{n=yield function(e){let t=!1;if(cd.g.COLON_NAMESPACES_PREFIX_REGEXP.test(e)){e=e.slice(1);t=!0}const n=new Promise((i,o)=>{setTimeout(()=>{try{if(n!==me)throw new CdError;cd.g.api.get({action:"opensearch",search:e,redirects:"return",limit:10,formatversion:2}).then(n=>{var o;const s=new RegExp("^"+mw.util.escapeRegExp(e[0]),"i"),r=null===(o=n[1])||void 0===o?void 0:o.map(n=>n.replace(s,()=>e[0]).replace(/^/,t?":":""));if(!r)throw new CdError({type:"api",code:"noData"});i(r)},e=>{T(e)})}catch(e){o(e)}},100)});me=n;return n}(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(r(n,i.wikilinks))}}})),function(e,t){return d.apply(this,arguments)})},templates:{trigger:"{{",keepAsEnd:/^(?:\||\}\})/,searchOpts:{skip:!0},selectTemplate:(e,t)=>{if(e){if(cd.settings.useTemplateData&&t.shiftKey&&!t.altKey){const t=this.tribute.current.element.cdInput;setTimeout(()=>{t.setDisabled(!0);t.pushPending();cd.g.api.get({action:"templatedata",titles:"Template:".concat(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},T).then(e=>{const n=e.pages;let i="",o=0;Object.keys(n).forEach(e=>{const t=n[e],s=t.params||[];(t.paramOrder||Object.keys(s)).filter(e=>s[e].required||s[e].suggested).forEach(e=>{if("block"===t.format)i+="\n| ".concat(e," = ");else if(isNaN(e))i+="|".concat(e,"=");else i+="|";if(!o)o=i.length});if("block"===t.format&&i)i+="\n"});i=i.slice(1);t.setDisabled(!1);const s=t.getRange().to;q(t,i);t.selectRange(s+o-1)},e=>{t.setDisabled(!1);t.focus();mw.notify(cd.s("cf-autocomplete-notemplatedata"),{type:"error"});console.warn(e)}).always(()=>{t.popPending()})})}return e.original.transform(e.original.item)}else return""},values:(u=o()((function*(e,t){if(!(e=S(e)).startsWith(i.templates.snapshot))i.templates.cache=[];i.templates.snapshot=e;if(!e.includes("{{"))if(i.templates.byText[e])t(r(i.templates.byText[e],i.templates));else{let n=[];const o=e&&e.length<=255&&!/[#<>[\]|{}]/.test(e)&&(e.match(a)||[]).length<=9;if(o){n.push(...i.templates.cache);n=Autocomplete_Autocomplete.search(e,n);n[9]=e.trim()}t(r(n,i.templates));if(o){let n;try{n=yield function(e){const t=new Promise((n,i)=>{setTimeout(()=>{try{if(t!==me)throw new CdError;cd.g.api.get({action:"opensearch",search:e.startsWith(":")?e.slice(1):"Template:"+e,redirects:"return",limit:10,formatversion:2}).then(t=>{var i;const o=new RegExp("^"+mw.util.escapeRegExp(e[0]),"i"),s=null===(i=t[1])||void 0===i?void 0:i.filter(e=>!e.endsWith("/doc")).map(t=>e.startsWith(":")?t:t.slice(t.indexOf(":")+1)).map(t=>t.replace(o,()=>e[0]));if(!s)throw new CdError({type:"api",code:"noData"});n(s)},e=>{T(e)})}catch(e){i(e)}},100)});me=t;return t}(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(r(n,i.templates))}}else t([])})),function(e,t){return u.apply(this,arguments)})},tags:{trigger:"<",keepAsEnd:/^>/,searchOpts:{skip:!0},selectTemplate:s,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(r(i,this.tags))}},commentLinks:{trigger:"[[#",keepAsEnd:/^\]\]/,selectTemplate:s,values:(l=o()((function*(e,t){if(!i.commentLinks.default){i.commentLinks.default=[];i.commentLinks.comments.forEach(e=>{let t,{anchor:n,author:o,timestamp:s,getText:r}=e;r=r.bind(e);if(r().length>80){t=r().slice(0,80);const e=t.lastIndexOf(cd.mws("word-separator"));if(-1!==e)t=t.slice(0,e)}else t=r();let a=o.name;if(s)a+=cd.mws("comma-separator")+s;const c=a+cd.mws("colon-separator")+t;i.commentLinks.default.push({key:c,anchor:n,author:o.name,timestamp:s})})}e=S(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(r(n,i.commentLinks))})),function(e,t){return l.apply(this,arguments)})}};var l,u,d,h;const m={mentions:n,commentLinks:t},f=[];e.forEach(e=>{this[e]=Autocomplete_Autocomplete.getConfig(e,m[e]);f.push(c[e])});return f}static getConfig(e){let t;switch(e){case"mentions":t={byText:{},cache:[],transform:e=>{var t;const n=e.trim(),i=(null===(t=cd.config.userNamespacesByGender)||void 0===t?void 0:t[V.getUser(n).getGender()])||mw.config.get("wgFormattedNamespaces")[2];return{start:"@[[".concat(i,":").concat(n,"|"),end:"]]",content:n,ctrlModify:e=>{e.end+=cd.mws("colon-separator");return e}}},removeSelf:e=>e.filter(e=>e!==cd.g.CURRENT_USER_NAME)};t.default=t.removeSelf(arguments[1]||[]);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","includeonly","noinclude","nowiki","onlyinclude","categorytree","charinsert","chem","ce","graph","hiero","imagemap","indicator","inputbox","mapframe","maplink","math","poem","ref",["references","<references />"],"score","section","syntaxhighlight",['syntaxhighlight lang=""','<syntaxhighlight lang="','"></syntaxhighlight>'],"templatedata",["templatestyles",'<templatestyles src="','" />'],"timeline"],transform:e=>({start:Array.isArray(e)?e[1]:"<".concat(e,">"),end:Array.isArray(e)?e[2]:"</".concat(e,">"),typeContent:!0})};t.default.sort();break;case"commentLinks":t={comments:arguments[1]||[],transform:({anchor:e,author:t,timestamp:n})=>({start:"[[#".concat(e,"|"),end:"]]",content:cd.s("cf-autocomplete-commentlinktext",t,n)})}}return t}static search(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})}}function Ie(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 Fe={getDefaultPreloadConfig:()=>({editIntro:void 0,commentTemplate:void 0,headline:void 0,summary:void 0,noHeadline:!1,omitSignature:!1}),modeToProperty:e=>"replyInSection"===e?"addReply":e,getLastActive:()=>cd.commentForms.slice().sort(Ie)[0]||null,getLastActiveAltered:()=>cd.commentForms.slice().sort(Ie).find(e=>e.isAltered())||null,createAddSectionForm(e=CommentForm_CommentForm.getDefaultPreloadConfig(),t=!1){const n=cd.g.addSectionForm;if(n){if(!j(e,n.preloadConfig)){mw.notify(cd.s("cf-error-formconflict"),{type:"error"});return}n.$element.cdScrollIntoView("center");n[n.headlineInput?"headlineInput":"commentInput"].focus()}else cd.g.addSectionForm=new CommentForm_CommentForm({mode:"addSection",target:cd.g.CURRENT_PAGE,preloadConfig:e,isNewTopicOnTop:t})}},De=n(7),Le=n.n(De);let Be,Me;function Re(e,t){e=Y(e);if(!Be){Be=new RegExp("^([^]*)(".concat(cd.g.TIMESTAMP_REGEXP.source,")(?![\"'\xbb])"));Me=new RegExp("^([^]*)(".concat(cd.g.TIMESTAMP_REGEXP_NO_TIMEZONE.source,")"))}const n=void 0===t?Be:Me,i=e.match(n);if(!i)return null;else return{date:cd.g.TIMESTAMP_PARSER(i,cd,t),match:i}}function je(e,t){return("0000"+e).slice(-t)}function He(e){const t=cd.g.DATE_FORMAT;let n="";for(let i=0;i<t.length;i++){let o=t[i];if("x"===o&&i<t.length-1)o+=t[++i];if("xk"===o&&i<t.length-1)o+=t[++i];switch(o){case"xx":n+="x";break;case"xg":n+=N(["january-gen","february-gen","march-gen","april-gen","may-gen","june-gen","july-gen","august-gen","september-gen","october-gen","november-gen","december-gen"])[e.getUTCMonth()];break;case"d":n+=je(e.getUTCDate(),2);break;case"D":n+=N(["sun","mon","tue","wed","thu","fri","sat"])[e.getUTCDay()];break;case"j":n+=e.getUTCDate();break;case"l":n+=N(["sunday","monday","tuesday","wednesday","thursday","friday","saturday"])[e.getDay()];break;case"F":n+=N(["january","february","march","april","may_long","june","july","august","september","october","november","december"])[e.getUTCMonth()];break;case"M":n+=N(["jan","feb","mar","apr","may","jun","jul","aug","sep","oct","nov","dec"])[e.getUTCMonth()];break;case"n":n+=e.getUTCMonth()+1;break;case"Y":n+=e.getUTCFullYear();break;case"xkY":n+=e.getUTCFullYear()+543;break;case"G":n+=e.getUTCHours();break;case"H":n+=je(e.getUTCHours(),2);break;case"i":n+=je(e.getUTCMinutes(),2);break;case"\\":if(i<t.length-1)n+=t[++i];else n+="\\";break;case'"':if(i<t.length-1){const e=t.indexOf('"',i+1);if(-1===e)n+='"';else{n+=t.substr(i+1,e-i-1);i=e}}else n+='"';break;default:n+=t[i]}}return n}function $e(e,t,n=!1){let i=e.getUTCFullYear(),o=e.getUTCMonth(),s=e.getUTCDate(),r=e.getUTCHours(),a=e.getUTCMinutes(),c=je(i,4)+je(o+1,2)+je(s,2)+je(r,2)+je(a,2)+(t?"_"+x(t):"");if(n&&Ue.includes(c)){let e=2;const t=c;do{c="".concat(t,"_").concat(e);e++}while(Ue.includes(c))}return c}let Ue=[];function Ye(e){if(e)Ue.push(e)}function qe(){Ue=[]}function We(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]),s=Number(t[4]),r=Number(t[5]),a=t[6];return{date:new Date(Date.UTC(n,i,o,s,r)),author:a}}function Ge(e,t=!0){let n=e.replace(/(<(?:nowiki|syntaxhighlight|source|pre)(?: [\w ]+(?:=[^<>]+?)?| ?)>)([^]*?)(<\/(?:nowiki|syntaxhighlight|source|pre)(?: \w+)? ?>)/g,(e,t,n,i)=>t+" ".repeat(n.length)+i).replace(/<!--([^]*?)-->/g,(e,t)=>"\x01"+" ".repeat(t.length+5)+"\x02").replace(/(<\/?(?:br|p)\b.*)(\n+)(>)/g,(e,t,n,i)=>t+" ".repeat(n.length)+i);if(t)n=n.replace(/[\u200E\u200F]/g,e=>" ".repeat(e.length));return n}function Ve(e){const t=Je(e);return t.length?t[0].timestamp:null}function ze(e){return e.replace(/<!--[^]*?-->/g,"").replace(/\x01 *\x02/g,"").replace(/(\[\[:?(?:[^|[\]<>\n:]+:)?([^|[\]<>\n]+)\|)(\]\])/g,"$1$2$3").replace(cd.g.FILE_LINK_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 Ke(e){return Qe(e).replace(/\s+/g," ").trim()}function Xe(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 Je(e,t){const n=Ge(e,!1).replace(cd.g.QUOTE_REGEXP,(e,t,n,i)=>t+" ".repeat(n.length)+i).replace(cd.g.COMMENT_ANTIPATTERNS_REGEXP,e=>" ".repeat(e.length)),i=n.replace(/[\u200E\u200F]/g,e=>" ".repeat(e.length));let o=function(e){const t=new RegExp("^((.*)(".concat(cd.g.TIMESTAMP_REGEXP.source,")(?![\"'\xbb])(?:\\}\\}|</small>)?).*(?:\n*|$)"),"igm"),n=new RegExp("^((.*)(".concat(cd.g.CAPTURE_USER_NAME_PATTERN,".{1,").concat(251,"}((").concat(cd.g.TIMESTAMP_REGEXP.source,")(?:\\}\\}|</small>)?)).*)(\n*|$)"),"igm"),i=new RegExp(cd.g.CAPTURE_USER_NAME_PATTERN,"ig");let o,s=[];for(;o=t.exec(e);){const t=o[0];n.lastIndex=0;const r=n.exec(t);let a,c,l,u,d,h;if(r){a=V.getUser(Qe(r[4]));c=r[7];l=o.index+r[2].length;u=o.index+r[1].length;d=o.index+r[0].length;h=r[3];let t;i.lastIndex=0;const n=Math.max(0,r[0].length-r[6].length-r[r.length-1].length-251),s=r[0].slice(n);for(;t=i.exec(s);){if(t[2])continue;if(V.getUser(Qe(t[1]))===a){l=o.index+n+t.index;h=e.slice(l,u);break}}}else{c=o[3];l=o.index+o[2].length;u=o.index+o[1].length;d=o.index+o[0].length;h=c}s.push({author:a,timestamp:c,startIndex:l,endIndex:u,dirtyCode:h,nextCommentStartIndex:d})}return s}(n);const s=function(e,t){const n=[];if(cd.g.UNSIGNED_TEMPLATES_REGEXP){let i;for(;i=cd.g.UNSIGNED_TEMPLATES_REGEXP.exec(e);){let e,o;if(cd.g.TIMESTAMP_REGEXP_NO_TIMEZONE.test(i[2])){o=i[2];e=i[3]}else if(cd.g.TIMESTAMP_REGEXP_NO_TIMEZONE.test(i[3])){o=i[3];e=i[2]}else e=i[2];e=e&&V.getUser(Qe(e));if(o&&!cd.g.TIMESTAMP_REGEXP.test(o)){o+=" (UTC)";if(!e)e="<undated>"}let s=i.index;const r=i.index+i[1].length;let a=i[1];const c=i.index+i[0].length,l=t.findIndex(e=>e.nextCommentStartIndex===c);if(-1!==l)t.splice(l,1);n.push({author:e,timestamp:o,startIndex:s,endIndex:r,dirtyCode:a,nextCommentStartIndex:c})}}return n}(i,o);o.push(...s);if(s.length)o.sort((e,t)=>e.startIndex>t.startIndex?1:-1);o=o.filter(e=>e.author);o.forEach((e,t)=>{e.commentStartIndex=0===t?0:o[t-1].nextCommentStartIndex});if(t)qe();o.forEach((e,n)=>{const{date:i}=e.timestamp&&Re(e.timestamp)||{};e.id=n;e.date=i;delete e.nextCommentStartIndex;if(t){const t=i&&$e(i,e.author.name,!0);e.anchor=t;Ye(t)}});return o}function Qe(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=Le()(t);return t}}function Ze(e,t,n){let i=0;const o=[];do{let s=e.indexOf("{{",i),r=e.indexOf("}}",i);if(-1===s&&-1===r&&!o.length)break;if(-1!==s&&(s<r||-1===r)){o.push(s);i=s+2}else{s=o.pop();if(void 0===s)if(-1===r){i+=2;continue}else s=0;if(-1===r)r=e.length;r+=2;const a=e.substring(s,r),c=void 0===n?"\x01"+t.push(a)+"\x02":"\x01".repeat(n)+" ".repeat(a.length-n-1)+"\x02";e=e.substring(0,s)+c+e.substr(r);i=r-a.length}}while(void 0===n||o.length);return{code:e,hidden:t}}function et(e){let t=[];const n=(n,i)=>{e=I(e,n,t,i)};((...e)=>{e.forEach(e=>{n(new RegExp("<".concat(e,"(?: [^>]+)?>[\\s\\S]+?<\\/").concat(e,">"),"gi"))})})("nowiki","pre","source","syntaxhighlight");(()=>{n(/\{\{(?:[^{]\{?)+?\}\}/g);({code:e,hidden:t}=Ze(e,t))})();n(/^(:* *)(\{\|[^]*?\n\|\})/gm,!0);return{code:e,hidden:t}}function tt(e){return e.replace(/([^\n])\n?$/,"$1\n\n")}class Page_Page{constructor(e){const t=e instanceof mw.Title?e:mw.Title.newFromText(e);if(!t)throw new CdError;this.title=t.getMainText();this.name=t.getPrefixedText();this.namespace=t.getNamespaceId()}getUrl(e){return mw.util.getUrl(this.name,e)}isProbablyTalkPage(){return v(this.realName||this.name,this.namespace)}isArchivePage(){if(void 0!==this.cachedIsArchivePage)return this.cachedIsArchivePage;let e;if(this===cd.g.CURRENT_PAGE)e=$(".cd-archivingInfo").data("isArchivePage");if(void 0===e){e=!1;const t=this.realName||this.name,n=cd.g.SOURCE_PAGES_MAP.keys();for(const i of n)if(i.test(t)){e=!0;break}}this.cachedIsArchivePage=Boolean(e);return e}canHaveArchives(){if(this.isArchivePage())return!1;let e;if(this===cd.g.CURRENT_PAGE)e=$(".cd-archivingInfo").data("canHaveArchives");if(void 0===e){var t;const n=this.realName||this.name;e=!(null===(t=cd.g.PAGES_WITHOUT_ARCHIVES_REGEXP)||void 0===t?void 0:t.test(n))}return Boolean(e)}getArchivePrefix(){if(!this.canHaveArchives())return null;let e;if(this===cd.g.CURRENT_PAGE)e=$(".cd-archivingInfo").data("archivePrefix");const t=this.realName||this.name;if(!e){const n=cd.g.ARCHIVE_PAGES_MAP.entries();for(const[i,o]of n)if(i.test(t)){e=t.replace(i,o);break}}return String(e||t)}getArchivedPage(){let e;if(this===cd.g.CURRENT_PAGE)e=$(".cd-archivingInfo").data("archivedPage");if(!e){const t=this.realName||this.name,n=cd.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_Page(String(e)):this}getCode(e=!0){var t=this;return o()((function*(){var n,i,o,s,r,a;const c=yield cd.g.api.post({action:"query",titles:t.name,prop:"revisions",rvslots:"main",rvprop:["ids","content"],redirects:!0,curtimestamp:!0,formatversion:2}).catch(T),l=c.query,u=null==l?void 0:null===(n=l.pages)||void 0===n?void 0:n[0],d=null==u?void 0:null===(i=u.revisions)||void 0===i?void 0:i[0],h=null==d?void 0:null===(o=d.slots)||void 0===o?void 0:null===(s=o.main)||void 0===s?void 0:s.content;if(!l||!u)throw new CdError({type:"api",code:"noData"});if(u.missing)if(e){Object.assign(t,{code:"",realName:t.name,queryTimestamp:c.curtimestamp});return}else throw new CdError({type:"api",code:"missing"});if(u.invalid)throw new CdError({type:"api",code:"invalid"});if(!d||void 0===h)throw new CdError({type:"api",code:"noData"});const m=(null===(r=l.redirects)||void 0===r?void 0:null===(a=r[0])||void 0===a?void 0:a.to)||null;Object.assign(t,{pageId:u.pageid,code:h+"\n",revisionId:d.revid,redirectTarget:m,realName:m||t.name,queryTimestamp:c.curtimestamp})}))()}parse(e,t=!1,n=!1){var i=this;return o()((function*(){const o={action:"parse",page:i.realName||i.name,prop:["text","revid","modules","jsconfigvars"],formatversion:2},s=Object.assign({},o,e);if(null==e?void 0:e.oldid)delete s.page;const r=t?fe(s).catch(T):cd.g.api.post(s).catch(T),a=(yield r).parse;if(void 0===(null==a?void 0:a.text))throw new CdError({type:"api",code:"noData"});if(n)i.markAsRead(a.revid);return a}))()}getRevisions(e={},t=!1){var n=this;return o()((function*(){var i,o,s;const r={action:"query",titles:n.name,rvslots:"main",prop:"revisions",redirects:!0,formatversion:2},a=Object.assign({},r,e),c=t?fe(a).catch(T):cd.g.api.post(a).catch(T),l=null===(i=(yield c).query)||void 0===i?void 0:null===(o=i.pages)||void 0===o?void 0:null===(s=o[0])||void 0===s?void 0:s.revisions;if(!l)throw new CdError({type:"api",code:"noData"});return l}))()}modifyCode({pageCode:e,commentForm:t}){const{commentCode:n}=t.commentTextToCode("submit");let i,o;if(t.isNewTopicOnTop){const t=Ge(e).search(/^(=+).*\1[ \t\x01\x02]*$/m);if(-1===t)o=e?e+"\n":"";else o=e.slice(0,t);i=o+n+"\n"+e.slice(t)}else{o=(e+"\n").trimLeft();i=o+n}return{newPageCode:i,codeBeforeInsertion:o,commentCode:n}}edit(e){var t=this;return o()((function*(){const n={title:t.realName||t.name,action:"edit",formatversion:2},i=cd.g.api.assertCurrentUser(Object.assign({},n,e));let o;try{o=yield cd.g.api.postWithEditToken(i).catch(T)}catch(e){if(e instanceof CdError){const{type:t,apiData:n}=e.data;if("network"===t)throw e;else{const e=null==n?void 0:n.error;let t,i,s,r=!1;if(e){s=e.code;switch(s){case"spamblacklist":t=cd.sParse("error-spamblacklist",e.spamblacklist.matches[0]);break;case"titleblacklist":t=cd.sParse("error-titleblacklist");break;case"abusefilter-warning":case"abusefilter-disallowed":{yield cd.g.api.loadMessagesIfMissing([s]);const n=mw.message(s,e.abusefilter.description).plain();try{t=(yield pe(n)).html}catch(e){console.warn("Couldn't parse the error code.")}if(t)r=!0;else t=cd.sParse("error-abusefilter",e.abusefilter.description);break}case"editconflict":t=cd.sParse("error-editconflict");break;case"blocked":t=cd.sParse("error-blocked");break;case"missingtitle":t=cd.sParse("error-pagedeleted");break;default:t=cd.sParse("error-pagenotedited")+" "+(yield ye(s,e.info))}i=[s,n]}else i=n;throw new CdError({type:"api",code:"error",apiData:o,details:{code:s,message:t,isRawMessage:r,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 CdError("Can't analyze the new topics placement: Page#code is undefined.");let n=null===(e=(t=cd.config).areNewTopicsOnTop)||void 0===e?void 0:e.call(t,this.name,this.code);const i=Ge(this.code),o=/^==[^=].*?==[ \t\x01\x02]*\n/gm;let s,r;if(!1!==n){var a;r=o.exec(i);s=null===(a=r)||void 0===a?void 0:a.index;o.lastIndex=0}if(void 0===n){let e,t=0;for(;r=o.exec(i);){const n=Ve(this.code.slice(r.index)),{date:i}=n&&Re(n)||{};if(i){if(e)t+=i>e?-1:1;e=i}}n=0===t?this.namespace%2==0:t>0}Object.assign(this,{areNewTopicsOnTop:n,firstSectionStartIndex:s})}purge(){var e=this;return o()((function*(){yield cd.g.api.post({action:"purge",titles:e.name}).catch(()=>{mw.notify(cd.s("error-purgecache"),{type:"error"})})}))()}markAsRead(e){var t=this;return o()((function*(){yield cd.g.api.postWithEditToken({action:"setnotificationtimestamp",titles:t.name,newerthanrevid:e,formatversion:2})}))()}}class TreeWalker{constructor(e,t,n=!1,i=e){this.acceptNode=t;this.root=e;this.currentNode=i;if(n){this.firstChildProperty="firstElementChild";this.lastChildProperty="lastElementChild";this.previousSiblingProperty="previousElementSibling";this.nextSiblingProperty="nextElementSibling"}else{this.firstChildProperty="firstChild";this.lastChildProperty="lastChild";this.previousSiblingProperty="previousSibling";this.nextSiblingProperty="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.firstChildProperty)}lastChild(){return this.tryMove(this.lastChildProperty)}previousSibling(){return this.tryMove(this.previousSiblingProperty)}nextSibling(){return this.tryMove(this.nextSiblingProperty)}nextNode(){let e=this.currentNode;do{if(e[this.firstChildProperty])e=e[this.firstChildProperty];else{for(;e&&!e[this.nextSiblingProperty]&&e.parentNode!==this.root;)e=e.parentNode;if(e)e=e[this.nextSiblingProperty]}}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.previousSiblingProperty]){e=e[this.previousSiblingProperty];for(;e[this.lastChildProperty];)e=e[this.lastChildProperty]}else e=e.parentNode}while(e&&this.acceptNode&&!this.acceptNode(e));if(e)this.currentNode=e;return e}}}class treeWalker_ElementsTreeWalker extends TreeWalker{constructor(e){super(cd.g.rootElement,null,!0);if(e)this.currentNode=e}}class treeWalker_ElementsAndTextTreeWalker extends TreeWalker{constructor(e){super(cd.g.rootElement,e=>e.nodeType===Node.TEXT_NODE||e.nodeType===Node.ELEMENT_NODE);if(e)this.currentNode=e}}var nt={underlays:[],layersContainers:[],redrawIfNecessary(e=!1,t=!1){if(!this.underlays.length||document.hidden&&!t)return;this.layersContainers.forEach(e=>{e.cdCouldHaveMoved=!0});const n=[],i=cd.g.$root.get(0).getBoundingClientRect().bottom+window.pageYOffset;let o,s=0;cd.comments.slice().reverse().some(r=>{const a=r.isNew||r.isOwn&&cd.settings.highlightOwnComments||r.isTarget||r.isFocused||r.isDeleted,c=r.positions&&r.positions.bottom>i;if((e||c)&&!a&&r.$underlay)r.removeLayers();else if(a&&!r.editForm){o=o||cd.g.floatingElements.map(R);const e=r.configureLayers({add:!0,update:!1,floatingRects:o});if(e||t){s=0;n.push(r)}else if(!1===e&&!r.getLayersContainer().parentNode.parentNode.closest(".cd-commentLayersContainerParent")){s++;if(3===s)return!0}}return!1});n.forEach(e=>{e.updateLayersPositions()})},reset(){this.underlays=[];this.layersContainers.forEach(e=>{e.innerHTML=""})}};let it;var ot={mount(){this.$element=$("<ul>").attr("id","cd-currentSection").appendTo(document.body)},update(){if(!it||document.documentElement.scrollHeight!==document.documentElement.clientHeight&&0!==window.pageYOffset&&cd.sections.length&&!(R(cd.sections[0].$heading.get(0)).outerTop>=0))cd.sections.slice().reverse().some(e=>{const t=R(e.$heading.get(0));if(0!==t.left||0!==t.height){if(t.outerTop<0){if(it===e)return!0;it=e;this.$element.empty();[e,...e.getParentTree()].reverse().forEach((e,t)=>{$("<li>").addClass("cd-currentSection-level").addClass("cd-currentSection-level-".concat(t)).text(e.headline).on("click",t=>{t.preventDefault();e.$heading.cdScrollTo("top")}).appendTo(this.$element)});return!0}return!1}});else this.reset()},reset(){it=null;this.$element.empty()}},st=n(8),rt=n.n(st),at={cdRemoveNonElementNodes:function(){return this.filter((function(){return this.nodeType===Node.ELEMENT_NODE}))},cdScrollTo(e="top",t=!0,n){cd.g.autoScrollInProgress=!0;let i=this.cdRemoveNonElementNodes();const o=i.first().offset().top,s=i.last().offset().top;let r,a=s+i.last().outerHeight();if(0===o||0===s){cd.g.autoScrollInProgress=!1;mw.notify(cd.s("error-elementhidden"),{type:"error"});return this}if("center"===e)r=Math.min(o,o+.5*(a-o)-.5*$(window).height());else if("bottom"===e)r=a-$(window).height();else r=o;const c=()=>{cd.g.autoScrollInProgress=!1;Zn();Vn.updateCommentFormButton()};if(t)$("body, html").animate({scrollTop:r},{complete:function(){if(this===document.documentElement){c();if(n)n()}}});else{window.scrollTo(0,r);c();if(n)n()}return this},cdIsInViewport(e=!1){const t=this.cdRemoveNonElementNodes(),n=t.get().every(e=>"none"===e.style.display);if(n)t.show();const i=t.first().offset().top,o=t.last().offset().top+t.last().height();if(n)t.hide();const s=$(window).scrollTop(),r=s+$(window).height();return e?o>s&&i<r:i>=s&&o<=r},cdScrollIntoView(e,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",cd.s("cf-block-close")).addClass("cd-closeButton").on("click",()=>{this.empty()});this.prepend(e);return this}};let ct,lt,ut,dt;function ht(e){const t=e.getAttribute("href");let n;if(t){const e=function(e){if("undefined"==typeof mw||"/wiki/$1"===mw.config.get("wgArticlePath")&&"/w/index.php"===mw.config.get("wgScript")){let t=e.replace(/^(?:https?:)?\/\/[^/]+/,"").replace(/^\/wiki\//,"").replace(/^\/w\/index.php\?title=/,"").replace(/&action=edit.*/,"").replace(/#.*/,"").replace(/_/g," ");try{t=decodeURIComponent(t)}catch(e){return null}return t}else{let t;try{t=new mw.Uri(e)}catch(e){return null}const n=t.path.match(cd.g.ARTICLE_PATH_REGEXP);if(n)try{return decodeURIComponent(n[1])}catch(e){return null}return t.query.title||null}}(t);if(!e)return null;const i=e.match(cd.g.USER_NAMESPACES_REGEXP);if(i)n=i[1];else if(e.startsWith(cd.g.CONTRIBS_PAGE+"/")){n=e.replace(cd.g.CONTRIBS_PAGE_LINK_REGEXP,"");if(cd.g.IS_IPv6_ADDRESS(n))n=n.toUpperCase()}if(n)n=k(A(n.replace(/\/.*/,""))).trim()}else if(e.classList.contains("mw-selflink")&&3===cd.g.CURRENT_NAMESPACE_NUMBER)n=cd.g.CURRENT_PAGE_TITLE;else return null;return n}function mt(e){if("TD"!==e.tagName)return!1;let t;for(let n=e;!t&&n!==cd.g.rootElement;n=n.parentNode)if("TABLE"===n.tagName)t=n;return!t||t.getElementsByClassName("cd-signature",2).length>1}class Parser_Parser{constructor(e){this.context=e;if(!ct){ct=["cd-commentPart",...cd.config.closedDiscussionClasses];if(cd.g.pageHasOutdents)ct.push("outdent-template");lt=new RegExp(cd.g.TIMEZONE_REGEXP.source+"\\s*$");if(cd.config.signatureEndingRegexp)ut=new RegExp(cd.config.signatureEndingRegexp.source+"$")}}createComment(e){return new this.context.CommentClass(this,e)}createSection(e,t){return new this.context.SectionClass(this,e,t)}findTimestamps(){dt=[...Array.from(cd.g.rootElement.getElementsByTagName("blockquote")),...(e=cd.config.elementsToExcludeClasses.map(e=>Array.from(cd.g.rootElement.getElementsByClassName(e))),[].concat(...e))];var e;return this.context.getAllTextNodes().map(e=>{const t=e.textContent,{date:n,match:i}=Re(t)||{};if(n&&!dt.some(t=>t.contains(e)))return{node:e,date:n,match:i}}).filter(C).map(e=>{const{node:t,match:n,date:i}=e,o=this.context.document.createElement("span");o.classList.add("cd-timestamp");const s=this.context.document.createTextNode(n[2]);o.appendChild(s);const r=t.textContent.slice(n.index+n[0].length);let a;if(r)a=this.context.document.createTextNode(r);t.textContent=t.textContent.slice(0,n.index+n[1].length);t.parentNode.insertBefore(o,t.nextSibling);if(a)t.parentNode.insertBefore(a,o.nextSibling);return{element:o,date:i}})}findSignatures(e){const t=e.map(e=>{const t=e.date,n=e.element,i=e.element.textContent;let o,s;for(let t=e.element;!s;t=t.parentNode)if(b(t)){if(t.classList.contains(cd.config.unsignedClass))o=t}else s=t;const r=Boolean(o);if(s){const t=Array.from(s[this.context.childElementsProperty]),n=new treeWalker_ElementsTreeWalker(e.element);for(;n.nextNode()&&s.contains(n.currentNode)&&(!t.includes(n.currentNode)||b(n.currentNode));)if(n.currentNode.classList.contains("cd-timestamp"))return}const a=o||e.element,c=new treeWalker_ElementsAndTextTreeWalker(a);let l,u,d=0;const h=[];if(o)u=a;else{h.push(a);c.previousSibling()}do{const e=c.currentNode;d+=e.textContent.length;if(e.nodeType===Node.ELEMENT_NODE){if(e.classList.contains("cd-timestamp"))break;let t=!1;if("A"===e.tagName){const n=ht(e);if(n){if(!l)l=n;if(l===n)t=!0}}else Array.from(e.getElementsByTagName("a")).reverse().some(e=>{const n=ht(e);if(n){if(!l)l=n;if(l===n){t=!0;return!0}}});if(t)u=e}h.push(e)}while(c.previousSibling()&&d<cd.config.signatureScanLimit);const m=h.indexOf(u);h.splice(-1===m?1:m+1);const f=$e(e.date,l,!0);Ye(f);const p=a.parentNode,g=a.nextSibling,y=this.context.document.createElement("span");y.classList.add("cd-signature");h.reverse().forEach(y.appendChild.bind(y));p.insertBefore(y,g);if(l)return{element:y,timestampElement:n,timestampText:i,date:t,authorName:l,anchor:f,isUnsigned:r}}).filter(C);if(cd.config.unsignedClass)Array.from(cd.g.rootElement.getElementsByClassName(cd.config.unsignedClass)).forEach(e=>{if(!this.context.getElementByClassName(e,"cd-timestamp"))Array.from(e.getElementsByTagName("a")).some(n=>{const i=ht(n);if(i){e.classList.add("cd-signature");const n=!0;t.push({element:e,authorName:i,isUnsigned:n});return!0}})});t.sort((e,t)=>this.context.follows(e.element,t.element)?1:-1);return t}collectParts(e){const t=new treeWalker_ElementsAndTextTreeWalker(e);let n,i=[];for(;!n;){for(;!t.currentNode.nextSibling&&t.parentNode(););if(!t.nextSibling())break;if(!b(t.currentNode,!0))n=t.currentNode}if(n&&e.parentNode.contains(n)||e.parentNode.getElementsByClassName("cd-signature",2).length>1||mt(e.parentNode)){t.currentNode=e;for(;t.nextSibling()&&b(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"});for(let c=0;c<500;c++){var o;let c;const l=i[i.length-1];if(!l.isTextNode&&!l.hasCurrentSignature){var s;const e=l.node.textContent;if(!b(l.node,!0)&&(lt.test(e)||(null===(s=ut)||void 0===s?void 0:s.test(e)))&&!dt.some(e=>e.contains(l.node))){l.hasForeignComponents=!0;break}}if(!l.hasCurrentSignature&&l.hasForeignComponents){let e,n=!1;for(;(e=t.currentNode)&&t.lastChild();){if(b(t.currentNode,!0)){t.currentNode=e;break}n=!0}if(n)c="dive";else break}else if(t.previousSibling())c="back";else{if(!t.parentNode())break;c="up"}const u=t.currentNode,d=u.nodeType===Node.TEXT_NODE;if("back"===c&&["OL","UL"].includes(l.node.tagName)&&!(["DL","OL","UL"].includes(u.tagName)||d&&u.previousSibling&&["DL","OL","UL"].includes(u.previousSibling.tagName))&&(null===(o=l.node[this.context.childElementsProperty][0])||void 0===o?void 0:o.contains(e)))break;let h=null,m=null,f=null;if(!d){var r,a;if(u===t.root||ct.some(e=>u.classList.contains(e))||"toc"===u.getAttribute("id")||mt(u)||"HR"===u.tagName&&u.previousElementSibling&&this.context.getElementByClassName(u.previousElementSibling,"cd-signature")||cd.g.pageHasOutdents&&this.context.getElementByClassName(u,"outdent-template")||(null===(r=(a=cd.config).checkForCustomForeignComponents)||void 0===r?void 0:r.call(a,u,this.context)))break;h=/^H[1-6]$/.test(u.tagName);m=u.contains(e);f=u.getElementsByClassName("cd-signature",Number(m)+1).length-Number(m)>0||n&&u.contains(n)}i.push({node:u,isTextNode:d,isHeading:h,hasCurrentSignature:m,hasForeignComponents:f,lastStep:c});if(h)break}return i}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 s=e[t];if(s&&(null===i||["back","start"].includes(s.lastStep))&&!s.hasForeignComponents&&!s.isHeading){if(null===i)if(b(s.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&&(s.isTextNode&&s.node.textContent.trim()||b(s.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],s=this.context.document.createElement("div"),r=e[o.start].node.nextSibling,a=e[o.start].node.parentNode;for(let t=o.end;t>=o.start;t--)s.appendChild(e[t].node);a.insertBefore(s,r);const c={node:s,isTextNode:!1,isHeading:!1,hasCurrentSignature:s.contains(t),hasForeignComponents:!1,lastStep:"replaced"};e.splice(o.start,o.end-o.start+1,c)}return e}filterParts(e){for(let t=(e=e.filter(e=>!e.hasForeignComponents&&!e.isTextNode)).length-1;t>0;t--){const n=e[t];if("P"===n.node.tagName&&!n.node.textContent.trim())e.splice(t,1);else break}return e}replaceListsWithItems(e,t){const n=e[e.length-1];for(let i=e.length-1;i>=0;i--){const o=e[i];if(["UL","DL","OL","LI","DD"].includes(o.node.tagName)&&("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))){const n=o.node.textContent.replace(/\s+/g,"");let s,r=[o.node];do{s=r.reduce((e,t)=>e.concat(Array.from(t[this.context.childElementsProperty])),[])}while(s.length&&s.every(e=>["UL","DL","OL","LI","DD"].includes(e.tagName))&&s.map(e=>e.textContent).join("").replace(/\s+/g,"")===n&&(r=s));if(r.length>1){const n=r.map(e=>({node:e,isTextNode:!1,hasCurrentSignature:e.contains(t),hasForeignComponents:!1,lastStep:"replaced"}));e.splice(i,1,...n)}else if(r[0]!==o.node)Object.assign(o,{node:r[0],lastStep:"replaced"})}}return e}getLevelsUpTree(e){const t=[],n=new treeWalker_ElementsTreeWalker(e);for(;n.parentNode();){const e=n.currentNode;if(["UL","DL","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.g.rootElement.getElementsByTagName("h1"),...cd.g.rootElement.getElementsByTagName("h2"),...cd.g.rootElement.getElementsByTagName("h3"),...cd.g.rootElement.getElementsByTagName("h4"),...cd.g.rootElement.getElementsByTagName("h5"),...cd.g.rootElement.getElementsByTagName("h6")];e.sort((e,t)=>this.context.follows(e,t)?1:-1);return e}}function ft(e){return pt.apply(this,arguments)}function pt(){return(pt=o()((function*({messagesRequest:e}){cd.g.$root=cd.g.$content.children(".mw-parser-output");if(!cd.g.$root.length)cd.g.$root=cd.g.$content;cd.g.rootElement=cd.g.$root.get(0);gn.reset();cd.comments=[];cd.sections=[];if(cd.g.isFirstRun)yield en({messagesRequest:e});else{qe();nt.reset()}}))).apply(this,arguments)}function gt(){let e,t;if(0!==window.pageYOffset&&cd.g.rootElement.getBoundingClientRect().top<=0){const n=new treeWalker_ElementsTreeWalker(cd.g.rootElement.firstElementChild);for(;;){if(!b(n.currentNode.tagName)){const i=n.currentNode.getBoundingClientRect();if(i.bottom>=0&&0!==i.height){e=n.currentNode;t=i.top;if(n.firstChild())continue;else break}}if(!n.nextSibling())break}}return e?{element:e,top:t}:null}function bt(){const e=document.evaluate(".//descendant::text()",cd.g.rootElement,null,XPathResult.ANY_TYPE,null),t=[];let n;for(;n=e.iterateNext();)t.push(n);return t}function yt(){const e=[...cd.g.FLOATING_ELEMENT_SELECTORS,...cd.config.customFloatingElementSelectors].join(", ");cd.g.floatingElements=cd.g.$root.find(e).get().filter(e=>!e.classList.contains("cd-ignoreFloating"));const t=cd.config.closedDiscussionClasses.map(e=>".".concat(e)).join(", ");cd.g.closedDiscussionElements=cd.g.$root.find(t).get();cd.g.pageHasOutdents=Boolean(cd.g.$root.find(".outdent-template").length)}function vt(e,t,n){const i=document.createElement(t);for(;e.firstChild;)i.appendChild(e.firstChild);Array.from(e.attributes).forEach(e=>{i.setAttribute(e.name,e.value)});let o=e.getAttribute("data-comment-id");if(null!==o){o=Number(o);cd.comments[o].replaceElement(e,i)}else e.parentNode.replaceChild(i,e);if(n&&e===n.element)n.element=i;return i}function wt(e){const t=cd.g.rootElement.querySelectorAll(".cd-commentLevel:not(ol) + .cd-commentLevel:not(ol)");if(!t.length)return;const n=e=>e.classList.contains("cd-commentLevel")&&"OL"!==e.tagName||e.querySelector(".cd-commentLevel:not(ol)");Array.from(t).forEach(t=>{const i=t.previousElementSibling;if(!i)return;let o=i,s=t;do{var r;const t=o.tagName,i={};if("UL"===t)i.DD="LI";else if("DL"===t)i.LI="DD";let a;if(n(o)){for(;s.childNodes.length;){let t=s.firstChild;if(t.nodeType===Node.ELEMENT_NODE){if(i[t.tagName])t=vt(t,i[t.tagName],e);if(void 0===a)a=t}else if(void 0===a&&t.textContent.trim()){a=null;const e=document.createElement("span");e.appendChild(t);t=e}o.appendChild(t)}s.remove()}s=a;o=null===(r=a)||void 0===r?void 0:r.previousElementSibling}while(o&&s&&n(s))})}function Et(e,t){const n=e.findTimestamps();e.findSignatures(n).forEach(t=>{try{const n=e.createComment(t);if(n.highlightables.length)cd.comments.push(n)}catch(e){if(!(e instanceof CdError))console.error(e)}});!function(e){wt(e);wt(e);if(cd.g.rootElement.querySelector(".cd-commentLevel:not(ol) + .cd-commentLevel:not(ol)"))console.warn(".cd-commentLevel adjacencies have left.");$("dl").has("dt").each((e,t)=>{Array.from(t.classList).filter(e=>e.startsWith("cd-commentLevel")).forEach(e=>t.classList.remove(e))})}(t);mw.hook("convenientDiscussions.commentsReady").fire(cd.comments)}function Ct(e,t){e.findHeadings().forEach(n=>{try{const i=e.createSection(n,t);if(void 0!==i.id)cd.sections.push(i)}catch(e){if(!(e instanceof CdError))console.error(e)}});Section_Section.adjust();if(t)t.then(()=>{Section_Section.cleanUpWatched();gn.highlightWatchedSections()});mw.hook("convenientDiscussions.sectionsReady").fire(cd.sections)}function _t(){if($("#ca-addsection").length){cd.g.addSectionButton=new OO.ui.ButtonWidget({label:cd.s("addtopic"),framed:!1,classes:["cd-button","cd-sectionButton"]});cd.g.addSectionButton.on("click",()=>{CommentForm_CommentForm.createAddSectionForm()});cd.g.$addSectionButtonContainer=$("<div>").addClass("cd-addTopicButtonContainer").addClass("cd-sectionButtonContainer").append(cd.g.addSectionButton.$element).appendTo(cd.g.rootElement)}}function Tt(){$(cd.g.ADD_TOPIC_SELECTORS).filter((function(){const e=$(this);if(e.is("a")){const t=e.attr("href"),n=new mw.Uri(t).path.split("/")[2];if(new Page_Page(n).name!==cd.g.CURRENT_PAGE.name)return!1}else if(e.is("input")){const t=e.closest("form").find('input[name="title"]').val();if(new Page_Page(t).name!==cd.g.CURRENT_PAGE.name)return!1}else return!1;return!0})).off("click.cd").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"),s=new mw.Uri(e).query;n={editIntro:s.editintro,commentTemplate:s.preload,headline:s.preloadtitle,summary:null===(o=s.summary)||void 0===o?void 0:o.replace(/^.+?\*\/ */,""),noHeadline:Boolean(s.nosummary),omitSignature:Boolean(s.cdomitsignature)};i="0"===s.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();CommentForm_CommentForm.createAddSectionForm(n,i)})).attr("title",cd.s("addtopicbutton-tooltip"))}function At(e){e.find('a[href^="#"]').filter((function(){return/^#\d{12}_.+$/.test($(this).attr("href"))})).on("click",(function(e){var t;e.preventDefault();const n=$(this).attr("href").slice(1);null===(t=Comment_Comment.getByAnchor(n))||void 0===t||t.scrollToAndHighlightTarget(!0,!0)}))}function xt(){if(cd.settings.highlightOwnComments)Comment_Comment.configureAndAddLayers(cd.comments.filter(e=>e.isOwn))}function St(e){Array.from(e.get(0).querySelectorAll('.cd-commentPart a[title*=":'.concat(cd.g.CURRENT_USER_NAME,'"]'))).filter(e=>cd.g.USER_NAMESPACE_ALIASES_REGEXP.test(e.title)&&!e.parentNode.closest(".cd-signature")&&ht(e)===cd.g.CURRENT_USER_NAME).forEach(e=>{e.classList.add("cd-currentUserLink")})}function kt(e){return Nt.apply(this,arguments)}function Nt(){return(Nt=o()((function*(e){let t,n,i,o,s,r,a,c;if(cd.g.isFirstRun){t=location.hash.slice(1);try{n=decodeURIComponent(t)}catch(e){console.error(e)}i=$.escapeSelector(t);o=n&&$.escapeSelector(n);if(/^\d{12}_.+$/.test(t))s=n}else s=e.commentAnchor;if(s){({date:r,author:a}=We(s)||{});c=Comment_Comment.getByAnchor(s);if(!e.commentAnchor&&!c){let e;for(let t=1;!c&&t<=5;t++){e=$e(new Date(r.getTime()-cd.g.MILLISECONDS_IN_A_MINUTE*t),a);c=Comment_Comment.getByAnchor(e)}}if(c)setTimeout(()=>{c.scrollToAndHighlightTarget(!1,e.pushState)})}if(e.sectionAnchor){const t=Section_Section.getByAnchor(e.sectionAnchor);if(t){if(e.pushState)history.pushState(history.state,"","#"+t.anchor);setTimeout(()=>{t.$elements.first().cdScrollTo("top",!1)})}}if(cd.g.isFirstRun){const e=n&&!c&&!cd.config.idleFragments.includes(n)&&!n.startsWith("/media/")&&!$(":target").length&&!$('a[name="'.concat(o,'"]')).length&&!$('*[id="'.concat(o,'"]')).length&&!$('a[name="'.concat(i,'"]')).length&&!$('*[id="'.concat(i,'"]')).length;if(n&&e&&cd.g.isPageActive)yield vi(n,r)}}))).apply(this,arguments)}function Pt(e,t){return Ot.apply(this,arguments)}function Ot(){return(Ot=o()((function*(e,t){let n,i;try{({visits:n,thisPageVisits:i}=yield e)}catch(e){console.warn("Couldn't load the settings from the server.",e);return}if(cd.g.thisPageVisits.length>=1)cd.g.previousVisitUnixTime=Number(cd.g.thisPageVisits[cd.g.thisPageVisits.length-1]);const o=Math.floor(Date.now()/1e3);for(let e=i.length-1;e>=0;e--)if(i[e]<o-60*cd.g.HIGHLIGHT_NEW_COMMENTS_INTERVAL){i.splice(0,e);break}let s=!1;if(i.length){cd.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)s=!0;if(n+60>i[0]){var r;e.isNew=!0;e.isSeen=(n+60<=i[i.length-1]||e.isOwn)&&!(null===(r=t.unseenCommentAnchors)||void 0===r?void 0:r.some(t=>t===e.anchor))}});Comment_Comment.configureAndAddLayers(cd.comments.filter(e=>e.isNew));const e=cd.comments.filter(e=>!1===e.isSeen);gn.addNewComments(Comment_Comment.groupBySection(e),t)}i.push(String(o+60*s));re(n);Vn.fill();Zn();mw.hook("convenientDiscussions.newCommentsHighlighted").fire(cd)}))).apply(this,arguments)}function It(){return Ft.apply(this,arguments)}function Ft(){return(Ft=o()((function*(){if("unknown"===cd.settings.desktopNotifications&&"denied"!==Notification.permission)Q({reuse:!0}).then(e=>{if("unknown"===e.desktopNotifications){const t=[{label:cd.s("dn-confirm-yes"),action:"accept",flags:"primary"},{label:cd.s("dn-confirm-no"),action:"reject"}];oi(cd.s("dn-confirm"),{size:"medium",actions:t}).then(t=>{let n;if("accept"===t){if("default"===Notification.permission){OO.ui.alert(cd.s("dn-grantpermission"));Notification.requestPermission(t=>{if("granted"===t){cd.settings.desktopNotifications=e.desktopNotifications="all";n=te(e)}else if("denied"===t){cd.settings.desktopNotifications=e.desktopNotifications="none";n=te(e)}})}else if("granted"===Notification.permission){cd.settings.desktopNotifications=e.desktopNotifications="all";n=te(e)}}else if("reject"===t){cd.settings.desktopNotifications=e.desktopNotifications="none";n=te(e)}if(n)n.catch(e=>{mw.notify(cd.s("error-settings-save"),{type:"error"});console.warn(e)})})}});if(!["unknown","none"].includes(cd.settings.desktopNotifications)&&"default"===Notification.permission){yield OO.ui.alert(cd.s("dn-grantpermission-again"),{title:cd.s("script-name")});Notification.requestPermission()}}))).apply(this,arguments)}function Dt(){const e=(cd.debug.timerTotal["main code"]+cd.debug.timerTotal["final code and rendering"])/cd.comments.length;cd.debug.logAndResetTimer("total time");console.debug("number of comments: ".concat(cd.comments.length));console.debug("per comment: ".concat(e.toFixed(2)));cd.debug.logAndResetEverything()}function Lt(){return Bt.apply(this,arguments)}function Bt(){return(Bt=o()((function*(e={}){var t;cd.debug.stopTimer(cd.g.isFirstRun?"loading data":"laying out HTML");cd.debug.startTimer("preparations");yield ft(e);let n,i,o;if(cd.g.isFirstRun)n=gt();cd.debug.stopTimer("preparations");cd.debug.startTimer("main code");cd.g.isPageActive=mw.config.get("wgArticleId")&&!cd.g.CURRENT_PAGE.isArchivePage()&&mw.config.get("wgRevisionId")===mw.config.get("wgCurRevisionId");cd.g.editWatchedSections=mi;cd.g.settingsDialog=di;if(mw.config.get("wgArticleId")){i=ce(!0,e);i.catch(e=>{console.warn("Couldn't load the settings from the server.",e)})}if(cd.g.isPageActive)o=ie(!0);mw.hook("convenientDiscussions.beforeParse").fire(cd);yt();cd.debug.startTimer("process comments");const s=new Parser_Parser({CommentClass:Comment_Comment,SectionClass:Section_Section,childElementsProperty:"children",document:document,follows:(e,t)=>e.compareDocumentPosition(t)&Node.DOCUMENT_POSITION_PRECEDING,getAllTextNodes:bt,getElementByClassName:(e,t)=>e.querySelector(".".concat(t))});try{Et(s,n)}catch(e){console.error(e)}cd.debug.stopTimer("process comments");if(cd.g.isPageActive&&!cd.comments.length&&!$("#ca-addsection").length&&!(null===(t=cd.g.PAGE_WHITELIST_REGEXP)||void 0===t?void 0:t.test(cd.g.CURRENT_PAGE.name)))cd.g.isPageActive=!1;cd.debug.startTimer("process sections");Ct(s,i);cd.debug.stopTimer("process sections");_t();Tt();cd.debug.stopTimer("main code");cd.debug.startTimer("final code and rendering");if(n){const e=window.pageYOffset+n.element.getBoundingClientRect().top-n.top;window.scrollTo(0,e)}xt();kt(e);if(cd.g.isPageActive){if(cd.g.isFirstRun||e.wasPageCreated)Vn.mount();else Vn.reset();Pt(o,e);Yn.init(o,e)}else if(Vn.isMounted())Vn.unmount();if(cd.g.isPageActive||!mw.config.get("wgArticleId"))mn();if(cd.g.isFirstRun){mw.hook("wikipage.content").add(St);ot.mount();$(document).on("mousemove mouseover",Comment_Comment.highlightFocused);$(window).on("resize orientationchange",Kn);Xn("commentForms",()=>{hn();return mw.user.options.get("useeditwarning")&&(CommentForm_CommentForm.getLastActiveAltered()||r&&cd.commentForms.length)});mw.hook("wikipage.content").add(At);mw.hook("convenientDiscussions.previewReady").add(At);setInterval(()=>{nt.redrawIfNecessary()},1e3);new MutationObserver(e=>{if(!e.every(e=>/^cd-comment(Underlay|Overlay|Layers)/.test(e.target.className)))nt.redrawIfNecessary()}).observe(cd.g.$content.get(0),{attributes:!0,childList:!0,subtree:!0});$(document).on("keydown",Qn).on("scroll resize orientationchange",Zn)}else ot.reset();let r=!1;if(mw.user.options.get("editondblclick"))mw.loader.using("mediawiki.action.view.dblClickEdit").then(()=>{$("#ca-edit").off("click");r=!0});if(mw.user.options.get("editsectiononrightclick"))mw.loader.using("mediawiki.action.view.rightClickEdit").then(()=>{$(".mw-editsection a").off("click");r=!0});if(cd.g.isFirstRun)It();mw.hook("convenientDiscussions.pageReady").fire(cd);cn();cd.g.isFirstRun=!1;cd.g.rootElement.getBoundingClientRect();cd.debug.stopTimer("final code and rendering");cd.debug.stopTimer("total time");Dt()}))).apply(this,arguments)}const Mt={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:"H:i, j F 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"},Rt={"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",mni:"\uabf0\uabf1\uabf2\uabf3\uabf4\uabf5\uabf6\uabf7\uabf8\uabf9",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"},jt=["acdt","acst","act","acwdt","acwst","addt","adt","aedt","aest","aft","ahdt","ahst","akdt","akst","amst","amt","ant","apt","arst","art","ast","awdt","awst","awt","azomt","azost","azot","bdst","bdt","beat","beaut","bmt","bnt","bortst","bort","bost","bot","brst","brt","bst","btt","burt","cant","capt","cast","cat","cawt","cct","cddt","cdt","cemt","cest","cet","cgst","cgt","chadt","chast","chdt","chost","chot","chut","ckhst","ckt","clst","clt","cmt","cost","cot","cpt","cst","cut","cvst","cvt","cwt","cxt","chst","dact","dmt","easst","east","eat","ect","eddt","edt","eest","eet","egst","egt","ehdt","emt","ept","est","ewt","ffmt","fjst","fjt","fkst","fkt","fmt","fnst","fnt","galt","gamt","gbgt","gft","ghst","gilt","gmt","gst","gyt","hdt","hkst","hkt","hmt","hovst","hovt","hst","ict","iddt","idt","ihst","imt","iot","irdt","irst","isst","ist","javt","jcst","jdt","jmt","jst","jwst","kart","kdt","kmt","kost","kst","kwat","lhdt","lhst","lint","lkt","lrt","lst","madmt","madst","madt","malst","malt","mart","mddt","mdst","mdt","mest","met","mht","mist","mmt","most","mot","mpt","msd","msk","mst","must","mut","mvt","mwt","myt","ncst","nct","nddt","ndt","negt","nest","net","nfst","nft","nmt","npt","nrt","nst","nut","nwt","nzdt","nzmt","nzst","pddt","pdt","pest","pet","pgt","phot","phst","pht","pkst","pkt","plmt","pmdt","pmmt","pmst","pmt","pnt","pont","ppmt","ppt","pst","pwt","pyst","pyt","qmt","ret","rmt","sast","sbt","sct","sdmt","sdt","set","sgt","sjmt","smt","srt","sst","swat","taht","tbmt","tkt","tlt","tmt","tost","tot","tvt","uct","ulast","ulat","utc","uyhst","uyst","uyt","vet","vust","vut","wakt","warst","wart","wast","wat","wemt","west","wet","wft","wgst","wgt","wib","wita","wit","wmt","wsdt","wsst","xjt","yddt","ydt","ypt","yst","ywt","a","b","c","d","e","f","g","h","i","k","l","m","n","o","p","q","r","s","t","u","v","w","x","y","z"];function Ht(){const e=[];mw.messages.set(cd.config.messages);cd.g.CONTRIBS_PAGE=cd.config.contribsPage;cd.g.LOCAL_TIMEZONE_OFFSET=cd.config.localTimezoneOffset;const t=["sun","mon","tue","wed","thu","fri","sat","sunday","monday","tuesday","wednesday","thursday","friday","saturday","jan","feb","mar","apr","may","jun","jul","aug","sep","oct","nov","dec","january","february","march","april","may_long","june","july","august","september","october","november","december","january-gen","february-gen","march-gen","april-gen","may-gen","june-gen","july-gen","august-gen","september-gen","october-gen","november-gen","december-gen","parentheses","parentheses-start","parentheses-end","word-separator","comma-separator","colon-separator","dot-separator","nextdiff"];cd.g.api=cd.g.api||new mw.Api;const n=[];for(let e=0;e<t.length;e+=50){const i=t.slice(e,e+50),o=cd.g.api.loadMessagesIfMissing(i,{amlang:mw.config.get("wgContentLanguage")});n.push(o)}if(!Object.keys(cd.config.messages).some(e=>e.startsWith("timezone-"))){const e=cd.g.api.loadMessages(void 0,{amlang:mw.config.get("wgContentLanguage"),amincludelocal:1,amfilter:"timezone-"});n.push(e)}Promise.all(n).then(()=>{cd.g.messages={};t.push(...Object.keys(mw.messages.get()).filter(e=>e.startsWith("timezone-")));t.forEach(e=>{cd.g.messages[e]=mw.messages.get(e)})});e.push(...n);if(!cd.g.CONTRIBS_PAGE||null===cd.g.LOCAL_TIMEZONE_OFFSET){const t=cd.g.api.get({action:"query",meta:"siteinfo",siprop:["specialpagealiases","general"]}).then(e=>{e.query.specialpagealiases.some(e=>{if("Contributions"===e.realname){cd.g.CONTRIBS_PAGE=mw.config.get("wgFormattedNamespaces")[-1]+":"+e.aliases[0];return!0}});cd.g.LOCAL_TIMEZONE_OFFSET=e.query.general.timeoffset});e.push(t)}return Promise.all(e)}function $t(){const e=function(e,t){const n=e=>"("+e.map(mw.util.escapeRegExp).join("|")+")";let i="\\b";for(let o=0;o<e.length;o++){let s=!1,r=e[o];if("x"===r&&o<e.length-1)r+=e[++o];if("xk"===r&&o<e.length-1)r+=e[++o];switch(r){case"xx":i+="x";break;case"xg":i+=n(N(["january-gen","february-gen","march-gen","april-gen","may-gen","june-gen","july-gen","august-gen","september-gen","october-gen","november-gen","december-gen"]));break;case"d":s="2";break;case"D":i+=n(N(["sun","mon","tue","wed","thu","fri","sat"]));break;case"j":s="1,2";break;case"l":i+=n(N(["sunday","monday","tuesday","wednesday","thursday","friday","saturday"]));break;case"F":i+=n(N(["january","february","march","april","may_long","june","july","august","september","october","november","december"]));break;case"M":i+=n(N(["jan","feb","mar","apr","may","jun","jul","aug","sep","oct","nov","dec"]));break;case"n":s="1,2";break;case"Y":case"xkY":s="4";break;case"G":s="1,2";break;case"H":case"i":s="2";break;case"\\":if(o<e.length-1)i+=e[++o];else i+="\\";break;case'"':if(o<e.length-1){const t=e.indexOf('"',o+1);if(-1===t)i+='"';else{i+=e.substr(o+1,t-o-1);o=t}}else i+='"';break;default:i+=e[o]}if(!1!==s)i+="("+(t+"{"+s+"}")+")"}return i}(cd.g.DATE_FORMAT,cd.g.DIGITS?"[".concat(cd.g.DIGITS,"]"):"\\d"),t=Object.keys(cd.g.messages).filter(e=>e.startsWith("timezone-")).map(e=>e.slice(9)).filter(e=>!["local","useoffset-placeholder"].includes(e)),n="\\((?:"+jt.concat(t).map(e=>{const t=mw.message("timezone-"+e);return t.exists()?t.parse():e}).map(mw.util.escapeRegExp).join("|").toUpperCase()+")\\)",i=e+" "+n;cd.g.TIMESTAMP_REGEXP=new RegExp(i);cd.g.TIMESTAMP_REGEXP_NO_TIMEZONE=new RegExp(e);cd.g.TIMEZONE_REGEXP=new RegExp(n,"g")}function Ut(){!function(){const e=mw.config.get("wgContentLanguage");cd.g.DATE_FORMAT=Mt[e];cd.g.DIGITS=mw.config.get("wgTranslateNumerals")?Rt[e]:null}();$t();!function(){const e=cd.g.DATE_FORMAT,t=[];for(let n=0;n<e.length;n++){let i=e[n];if("x"===i&&n<e.length-1)i+=e[++n];if("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}}}cd.g.TIMESTAMP_PARSER=(e,cd,t)=>{const n=e=>{if(!cd.g.DIGITS)return e;else return e.replace(new RegExp("["+cd.g.DIGITS+"]","g"),e=>cd.g.DIGITS.indexOf(e))},i=e=>e.map(e=>cd.g.messages[e]);let o=0,s=0,r=0,a=0,c=0;for(let t=0;t<cd.g.TIMESTAMP_MATCHING_GROUPS.length;t++){const l=cd.g.TIMESTAMP_MATCHING_GROUPS[t],u=e[t+3];switch(l){case"xg":s=i(["january-gen","february-gen","march-gen","april-gen","may-gen","june-gen","july-gen","august-gen","september-gen","october-gen","november-gen","december-gen"]).indexOf(u);break;case"d":case"j":r=Number(n(u));break;case"D":case"l":break;case"F":s=i(["january","february","march","april","may_long","june","july","august","september","october","november","december"]).indexOf(u);break;case"M":s=i(["jan","feb","mar","apr","may","jun","jul","aug","sep","oct","nov","dec"]).indexOf(u);break;case"n":s=Number(n(u))-1;break;case"Y":o=Number(n(u));break;case"xkY":o=Number(n(u))-543;break;case"G":case"H":a=Number(n(u));break;case"i":c=Number(n(u));break;default:throw"Not implemented"}}if(void 0===t)t=cd.g.LOCAL_TIMEZONE_OFFSET;return new Date(Date.UTC(o,s,r,a,c)-t*cd.g.MILLISECONDS_IN_A_MINUTE)};cd.g.TIMESTAMP_MATCHING_GROUPS=t}()}let Yt,qt,Wt,Gt,Vt=[],zt=!1;function Kt(){return Xt.apply(this,arguments)}function Xt(){return(Xt=o()((function*(){cd.settings=cd.settings||{};cd.defaultSettings={allowEditOthersComments:!1,alwaysExpandAdvanced:!1,haveInsertButtonsBeenAltered:!1,autocompleteTypes:["mentions","commentLinks","wikilinks","templates","tags"],autopreview:!0,desktopNotifications:"unknown",defaultCommentLinkType:"diff",defaultSectionLinkType:"wikilink",highlightOwnComments:!0,insertButtons:cd.config.defaultInsertButtons||[],notifications:"all",notificationsBlacklist:[],showLoadingOverlay:!0,showToolbar:!0,signaturePrefix:cd.config.defaultSignaturePrefix,modifyToc:!0,useTemplateData:!0,watchOnReply:!0,watchSectionOnReply:!0};cd.localSettingNames=["haveInsertButtonsBeenAltered","insertButtons","signaturePrefix"];const e={[cd.g.SETTINGS_OPTION_NAME]:mw.user.options.get(cd.g.SETTINGS_OPTION_NAME),[cd.g.LOCAL_SETTINGS_OPTION_NAME]:mw.user.options.get(cd.g.LOCAL_SETTINGS_OPTION_NAME)};cd.settingAliases={allowEditOthersComments:["allowEditOthersMsgs"],alwaysExpandAdvanced:["alwaysExpandSettings"],haveInsertButtonsBeenAltered:["areInsertButtonsAltered","insertButtonsChanged"],desktopNotifications:["browserNotifications"],signaturePrefix:["mySig","mySignature"]};Object.keys(cd.defaultSettings).forEach(e=>{(cd.settingAliases[e]||[]).concat(e).forEach(t=>{const n="cd"+k(t);if(n in window&&typeof window[n]==typeof cd.defaultSettings[e])cd.settings[e]=window[n]})});const t=yield Q({options:e,omitLocal:!0});cd.settings=Object.assign(cd.settings,t);if(void 0!==cd.settings.signaturePrefix)cd.settings.signaturePrefix=cd.settings.signaturePrefix.replace("~~~~","");if(!cd.settings.haveInsertButtonsBeenAltered&&JSON.stringify(cd.settings.insertButtons)!==JSON.stringify(cd.config.defaultInsertButtons))cd.settings.insertButtons=cd.config.defaultInsertButtons;cd.settings=Object.assign({},cd.defaultSettings,cd.settings);if(!j(cd.settings,t))te().catch(e=>{console.warn("Couldn't save the settings to the server.",e)});Object.assign(cd.settings,ee())}))).apply(this,arguments)}function Jt(){cd.g.PHP_CHAR_TO_UPPER_JSON=mw.loader.moduleRegistry["mediawiki.Title"].script.files["phpCharToUpper.json"];cd.g.CURRENT_PAGE=new Page_Page(cd.g.CURRENT_PAGE_NAME);cd.g.CURRENT_USER_GENDER=mw.user.options.get("gender");cd.g.GENDER_AFFECTS_USER_STRING=/\{\{ *gender *:[^}]+?\|[^}]+?\|/i.test(cd.sPlain("es-reply-to")+cd.sPlain("es-edit-comment-by")+cd.sPlain("thank-confirm"));cd.g.QQX_MODE="qqx"===mw.util.getParamValue("uselang");if(cd.config.tagName){cd.g.SUMMARY_POSTFIX="";cd.g.SUMMARY_LENGTH_LIMIT=mw.config.get("wgCommentCodePointLimit")}else{cd.g.SUMMARY_POSTFIX=" ([[".concat(cd.config.scriptPageWikilink,"|").concat(cd.s("script-name-short"),"]])");cd.g.SUMMARY_LENGTH_LIMIT=mw.config.get("wgCommentCodePointLimit")-cd.g.SUMMARY_POSTFIX.length}cd.g.IS_IPv6_ADDRESS=mw.util.isIPv6Address;cd.g.NOTIFICATION_AREA=document.querySelector(".mw-notification-area");cd.g.dontHandleScroll=!1;cd.g.autoScrollInProgress=!1;cd.g.activeAutocompleteMenu=null;cd.g.hasPageBeenReloaded=!1;cd.g.processPageInBackground=Yn.processPage;cd.getCommentByAnchor=Comment_Comment.getByAnchor;cd.getSectionByAnchor=Section_Section.getByAnchor;cd.getSectionsByHeadline=Section_Section.getByHeadline;cd.getLastActiveCommentForm=CommentForm_CommentForm.getLastActive;cd.getLastActiveAlteredCommentForm=CommentForm_CommentForm.getLastActiveAltered}function Qt(){var e,t,n,i;cd.g.CONTRIBS_PAGE_LINK_REGEXP=new RegExp("^".concat(cd.g.CONTRIBS_PAGE,"/"));const o=e=>e.replace(/[ _]/g,"[ _]+").replace(/:/g,"[ _]*:[ _]*"),s=mw.config.get("wgNamespaceIds"),r=Object.keys(s).filter(e=>[2,3].includes(s[e])).map(o).join("|");cd.g.USER_NAMESPACES_REGEXP=new RegExp("(?:^|:)(?:".concat(r,"):(.+)"),"i");const a=Object.keys(s).join("|");cd.g.ALL_NAMESPACES_REGEXP=new RegExp("(?:^|:)(?:".concat(a,"):"),"i");const c=o(cd.g.CONTRIBS_PAGE);cd.g.CAPTURE_USER_NAME_PATTERN="\\[\\[[ _]*:?(?:\\w*:){0,2}(?:(?:".concat(r,")[ _]*:[ _]*|")+"(?:Special[ _]*:[ _]*Contributions|".concat(c,")\\/[ _]*)([^|\\]/]+)(/)?");const l=Object.keys(s).filter(e=>2===s[e]).map(o).join("|");cd.g.USER_NAMESPACE_ALIASES_REGEXP=new RegExp("^:?(?:".concat(l,"):([^/]+)$"),"i");if(cd.config.unsignedTemplates.length){const e=cd.config.unsignedTemplates.join("|");cd.g.UNSIGNED_TEMPLATES_PATTERN="(\\{\\{ *(?:".concat(e,") *\\| *([^}|]+?) *(?:\\| *([^}]+?) *)?\\}\\})");cd.g.UNSIGNED_TEMPLATES_REGEXP=new RegExp(cd.g.UNSIGNED_TEMPLATES_PATTERN+".*\\n","ig")}cd.g.CURRENT_USER_SIGNATURE=cd.settings.signaturePrefix+cd.g.SIGN_CODE;const u=mw.user.options.get("nickname"),d=u.match(new RegExp(cd.g.CAPTURE_USER_NAME_PATTERN,"i"));if(d){const e=mw.util.escapeRegExp(cd.settings.signaturePrefix),t=mw.util.escapeRegExp(u.slice(0,d.index));cd.g.CURRENT_USER_SIGNATURE_PREFIX_REGEXP=new RegExp(e+t+"$")}const h=cd.g.POPULAR_INLINE_ELEMENTS.join("|");cd.g.PIE_PATTERN="(?:".concat(h,")");const m=cd.g.POPULAR_NOT_INLINE_ELEMENTS.join("|");cd.g.PNIE_PATTERN="(?:".concat(m,")");const f=[];if(cd.config.elementsToExcludeClasses.length||cd.config.templatesToExclude.length||cd.config.commentAntipatterns.length){if(cd.config.elementsToExcludeClasses){const e=cd.config.elementsToExcludeClasses.join("\\b|\\b");f.push("class=(['\"])[^'\"\\n]*(?:\\b".concat(e,"\\b)[^'\"\\n]*\\1"))}if(cd.config.templatesToExclude.length){const e=cd.config.templatesToExclude.map(y).join("|");f.push("\\{\\{ *(?:".concat(e,") *(?:\\||\\}\\})"))}if(cd.config.commentAntipatterns)f.push(...cd.config.commentAntipatterns.map(e=>e.source));const e=f.join("|");cd.g.COMMENT_ANTIPATTERNS_REGEXP=new RegExp("^.*(?:".concat(e,").*$"),"mg")}cd.g.ARTICLE_PATH_REGEXP=new RegExp(mw.util.escapeRegExp(mw.config.get("wgArticlePath")).replace("\\$1","(.*)"));const p=e=>"\\{\\{ *"+o(mw.util.escapeRegExp(e)),g=["<blockquote>","<q>"].concat((null===(e=cd.config.pairQuoteTemplates)||void 0===e?void 0:e[0].map(p))||[]).join("|"),b=["</blockquote>","</q>"].concat((null===(t=cd.config.pairQuoteTemplates)||void 0===t?void 0:t[1].map(p))||[]).join("|");cd.g.QUOTE_REGEXP=new RegExp("(".concat(g,")([^]*?)(").concat(b,")"),"ig");const v=((null===(n=cd.config.closedDiscussionTemplates)||void 0===n?void 0:n[0])||[]).map(mw.util.escapeRegExp).map(o).join("|"),w=((null===(i=cd.config.closedDiscussionTemplates)||void 0===i?void 0:i[1])||[]).map(mw.util.escapeRegExp).map(o).join("|");if(v){if(w)cd.g.CLOSED_DISCUSSION_PAIR_REGEXP=new RegExp("\\{\\{ *(?:".concat(v,")[^]*?\\}\\}\\s*([:*#]*)[^]*?\\{\\{ *(?:").concat(w,")[^}]*\\}\\}"),"ig");cd.g.CLOSED_DISCUSSION_SINGLE_REGEXP=new RegExp("\\{\\{ *(?:".concat(v,") *\\|[^}]{0,50}?=\\s*([:*#]*)"),"ig")}cd.g.UNHIGHLIGHTABLE_ELEMENT_CLASSES=cd.g.UNHIGHLIGHTABLE_ELEMENT_CLASSES.concat(cd.config.customUnhighlightableElementClasses);const E=Object.keys(s).filter(e=>6===s[e]).map(o).join("|");cd.g.FILE_PREFIX_PATTERN="(?:".concat(E,"):");cd.g.FILE_LINK_REGEXP=new RegExp("\\[\\[".concat(cd.g.FILE_PREFIX_PATTERN,"[^]+?(?:\\|[^]+?\\|((?:\\[\\[[^]+?\\]\\]|[^|])+?))?\\]\\]"),"ig");const C=Object.keys(s).filter(e=>[6,14].includes(s[e])).map(o).join("|");cd.g.COLON_NAMESPACES_PREFIX_REGEXP=new RegExp("^:(?:".concat(C,"):"),"i");cd.g.BAD_COMMENT_BEGINNINGS=cd.g.BAD_COMMENT_BEGINNINGS.concat(new RegExp("^\\[\\[".concat(cd.g.FILE_PREFIX_PATTERN,".+\\n*(?=[*:#])"))).concat(cd.config.customBadCommentBeginnings);cd.g.ADD_TOPIC_SELECTORS=["#ca-addsection a",'.commentbox input[type="submit"]','.createbox input[type="submit"]'].concat(cd.config.customAddTopicLinkSelectors).join(", ");cd.g.PAGES_WITHOUT_ARCHIVES_REGEXP=O(cd.config.pagesWithoutArchives);cd.g.ARCHIVE_PAGES_MAP=new Map;cd.g.SOURCE_PAGES_MAP=new Map;const _=(e,t,n)=>{let i=[],o=I(e,/\\[$\\]/g,i);o=mw.util.escapeRegExp(o);if(t)o=o.replace(/\\\$/,"$").replace(/\$(\d+)/,(e,n)=>{const i=t[n-1];return i?"(".concat(i.source,")"):e});o="^"+o+(n?".*":"")+"$";o=F(o,i);return new RegExp(o)};cd.config.archivePaths.forEach(e=>{if(e instanceof RegExp){let t=new RegExp(e.source+".*");cd.g.SOURCE_PAGES_MAP.set(t,"")}else{const t=_(e.source,e.replacements),n=_(e.archive,e.replacements,!0);cd.g.ARCHIVE_PAGES_MAP.set(t,e.archive);cd.g.SOURCE_PAGES_MAP.set(n,e.source)}})}function Zt(){ii();cd.g.COMMENT_ELEMENT_PROTOTYPES={};cd.g.COMMENT_ELEMENT_PROTOTYPES.goToParentButton=new OO.ui.ButtonWidget({label:cd.s("cm-gotoparent"),icon:"upTriangle",title:cd.s("cm-gotoparent-tooltip"),framed:!1,invisibleLabel:!0,classes:["cd-button","cd-commentButton","cd-commentButton-icon"]}).$element.get(0);cd.g.COMMENT_ELEMENT_PROTOTYPES.linkButton=new OO.ui.ButtonWidget({label:cd.s("cm-copylink"),icon:"link",title:cd.s("cm-copylink-tooltip"),framed:!1,invisibleLabel:!0,classes:["cd-button","cd-commentButton","cd-commentButton-icon"]}).$element.get(0);cd.g.COMMENT_ELEMENT_PROTOTYPES.pendingLinkButton=new OO.ui.ButtonWidget({label:cd.s("cm-copylink"),icon:"link",title:cd.s("cm-copylink-tooltip"),framed:!1,disabled:!0,invisibleLabel:!0,classes:["cd-button","cd-commentButton","cd-commentButton-icon","cd-button-pending"]}).$element.get(0);cd.g.COMMENT_ELEMENT_PROTOTYPES.thankButton=new OO.ui.ButtonWidget({label:cd.s("cm-thank"),title:cd.s("cm-thank-tooltip"),framed:!1,classes:["cd-button","cd-commentButton"]}).$element.get(0);cd.g.COMMENT_ELEMENT_PROTOTYPES.pendingThankButton=new OO.ui.ButtonWidget({label:cd.s("cm-thank"),title:cd.s("cm-thank-tooltip"),framed:!1,disabled:!0,classes:["cd-button","cd-commentButton","cd-button-pending"]}).$element.get(0);cd.g.COMMENT_ELEMENT_PROTOTYPES.thankedButton=new OO.ui.ButtonWidget({label:cd.s("cm-thanked"),title:cd.s("cm-thanked-tooltip"),framed:!1,disabled:!0,classes:["cd-button","cd-commentButton"]}).$element.get(0);cd.g.COMMENT_ELEMENT_PROTOTYPES.editButton=new OO.ui.ButtonWidget({label:cd.s("cm-edit"),framed:!1,classes:["cd-button","cd-commentButton"]}).$element.get(0);cd.g.COMMENT_ELEMENT_PROTOTYPES.replyButton=new OO.ui.ButtonWidget({label:cd.s("cm-reply"),framed:!1,classes:["cd-button","cd-commentButton"]}).$element.get(0);cd.g.COMMENT_ELEMENT_PROTOTYPES.underlay=document.createElement("div");cd.g.COMMENT_ELEMENT_PROTOTYPES.underlay.className="cd-commentUnderlay";cd.g.COMMENT_ELEMENT_PROTOTYPES.overlay=document.createElement("div");cd.g.COMMENT_ELEMENT_PROTOTYPES.overlay.className="cd-commentOverlay";const e=document.createElement("div");e.className="cd-commentOverlay-innerWrapper";cd.g.COMMENT_ELEMENT_PROTOTYPES.overlay.appendChild(e);const t=document.createElement("div");t.textContent="\xa0";t.className="cd-commentOverlay-gradient";e.appendChild(t);const n=document.createElement("div");n.className="cd-commentOverlay-content";e.appendChild(n);cd.g.SECTION_ELEMENT_PROTOTYPES={};cd.g.SECTION_ELEMENT_PROTOTYPES.replyButton=new OO.ui.ButtonWidget({label:cd.s("section-reply"),framed:!1,classes:["cd-button","cd-sectionButton"]}).$element.get(0);cd.g.SECTION_ELEMENT_PROTOTYPES.addSubsectionButton=new OO.ui.ButtonWidget({label:" ",framed:!1,classes:["cd-button","cd-sectionButton"]}).$element.get(0)}function en(e){return tn.apply(this,arguments)}function tn(){return(tn=o()((function*({messagesRequest:e}){cd.g.api=cd.g.api||new mw.Api;cd.g.worker=new rt.a;yield e||Ht();Jt();yield Kt();Ut();cd.commentForms=[];Qt();Zt();$.fn.extend(at)}))).apply(this,arguments)}function nn(){return cd.comments.filter(e=>!1===e.isSeen).map(e=>e.anchor)}function on(e,t){return sn.apply(this,arguments)}function sn(){return(sn=o()((function*(e,t){cd.debug.stopTimer("getting HTML");cd.debug.startTimer("laying out HTML");cd.g.$content.children(".mw-parser-output").remove();if(t.wasPageCreated)cd.g.$content.empty();cd.g.$content.append(e);t=Object.assign({},t,{unseenCommentAnchors:nn()});try{yield Lt(t)}catch(e){mw.notify(cd.s("error-processpage"),{type:"error"});console.error(e);cn()}mw.hook("wikipage.content").fire(cd.g.$content)}))).apply(this,arguments)}function rn(){return cd.settings&&!1===cd.settings.showLoadingOverlay||!cd.settings&&void 0!==window.cdShowLoadingOverlay&&!1===window.cdShowLoadingOverlay}function an(){if(!rn())if(!Wt){Wt=$("<div>").addClass("cd-loadingPopup");const e=$("<div>").addClass("cd-loadingPopup-logo").appendTo(Wt);$("<div>").addClass("cd-loadingPopup-logo-partBackground").css("background-color",$(document.body).css("background-color")).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(Wt)}else Wt.show()}function cn(){if(Wt&&!rn())Wt.hide()}function ln(){return Boolean(Wt&&Wt[0]&&"block"===Wt[0].style.display)}function un(){return dn.apply(this,arguments)}function dn(){return(dn=o()((function*(e={}){var t;if(zt)return;zt=!0;hn();D();pn(null!==(t=e.closeNotificationsSmoothly)&&void 0!==t?t:!0);cd.debug.init();cd.debug.startTimer("total time");cd.debug.startTimer("getting HTML");an();be().catch(e=>{console.warn(e)});let n;try{n=yield cd.g.CURRENT_PAGE.parse(null,!1,!0)}catch(t){cn();zt=!1;if(e.didSubmitCommentForm)throw t;else{mw.notify(cd.s("error-reloadpage"),{type:"error"});console.warn(t);return}}cd.commentForms.forEach(e=>{e.$outermostElement.detach()});mw.config.set({wgRevisionId:n.revid,wgCurRevisionId:n.revid});mw.loader.load(n.modules);mw.loader.load(n.modulestyles);mw.config.set(n.jsconfigvars);history.replaceState(history.state,"",location.pathname+location.search);cd.g.hasPageBeenReloaded=!0;Yn.updatePageTitle(0,!1);yield on(n.text,e);gn.possiblyHide();if(!e.commentAnchor&&!e.sectionAnchor)L(!1);zt=!1}))).apply(this,arguments)}function hn(){const e=Date.now()-qt;clearTimeout(Yt);Yt=setTimeout(()=>{const e=cd.commentForms.filter(e=>e.isAltered()).map(e=>{var t,n,i,o,s,r;let a;const c=e.target;if(e.target instanceof Comment_Comment)a={anchor:c.anchor};else if(c instanceof Section_Section){var l;a={headline:c.headline,firstCommentAnchor:null===(l=c.comments[0])||void 0===l?void 0:l.anchor,id:c.id}}return{mode:e.mode,targetData:a,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=H("commentForms");i[mw.config.get("wgPageName")]=n;U("commentForms",i);qt=Date.now()},Math.max(0,5e3-e))}function mn(){if(cd.g.isFirstRun){const e=function(e){const t=Object.assign({},e);Object.keys(t).forEach(e=>{var n;if(t[e].forms){t[e].commentForms=t[e].forms;delete t[e].forms}if(!(null===(n=t[e].commentForms)||void 0===n?void 0:n.length)||t[e].saveUnixTime<Date.now()-60*cd.g.SECONDS_IN_A_DAY*1e3)delete t[e]});return t}(H("commentForms"));U("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 s=CommentForm_CommentForm.modeToProperty(e.mode);if(null===(i=e.targetData)||void 0===i?void 0:i.anchor){const i=Comment_Comment.getByAnchor(e.targetData.anchor);if((null==i?void 0:i.isActionable)&&!i["".concat(s,"Form")])try{i[s](e);t=!0}catch(t){console.warn(t);n.push(e)}else n.push(e)}else if(null===(o=e.targetData)||void 0===o?void 0:o.headline){const i=Section_Section.search({headline:e.targetData.headline,firstCommentAnchor:e.targetData.firstCommentAnchor,id:e.targetData.index||e.targetData.id});if((null==i?void 0:i.isActionable)&&!i["".concat(s,"Form")])try{i[s](e);t=!0}catch(t){console.warn(t);n.push(e)}else n.push(e)}else if("addSection"===e.mode)if(!cd.g.addSectionForm){cd.g.addSectionForm=new CommentForm_CommentForm({target:cd.g.CURRENT_PAGE,mode:e.mode,dataToRestore:e,preloadConfig:e.preloadConfig,isNewTopicOnTop:e.isNewTopicOnTop});t=!0}else n.push(e)});if(t){hn();mw.notification.notify(cd.s("restore-restored-text"),{title:cd.s("restore-restored-title")}).$notification.on("click",()=>{Vn.goToNextCommentForm(!0)})}if(n.length)yi(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.commentForms.splice(cd.commentForms.indexOf(t),1)};cd.commentForms.forEach(e=>{e.checkCodeRequest=null;const n=e.target;if(n instanceof Comment_Comment)if(n.anchor){const i=Comment_Comment.getByAnchor(n.anchor);if(null==i?void 0:i.isActionable)try{e.setTargets(i);i[CommentForm_CommentForm.modeToProperty(e.mode)](e);e.addToPage()}catch(n){console.warn(n);t(e)}else t(e)}else t(e);else if(n instanceof Section_Section){var i;const o=Section_Section.search({headline:n.headline,firstCommentAnchor:null===(i=n.comments[0])||void 0===i?void 0:i.anchor,id:n.id});if(null==o?void 0:o.isActionable)try{e.setTargets(o);o[CommentForm_CommentForm.modeToProperty(e.mode)](e);e.addToPage()}catch(n){console.warn(n);t(e)}else t(e)}else if("addSection"===e.mode){e.addToPage();cd.g.addSectionForm=e}});if(e.length)yi(e)}hn();Vn.updateCommentFormButton()}function fn(e,t={}){const n=mw.notification.notify(...e);Vt.push(Object.assign(t,{notification:n}));return n}function pn(e=!0){Vt.forEach(t=>{if(!e)t.notification.$notification.hide();t.notification.close()});Vt=[]}class TocItem{constructor(e){const t=e.children[1],n=t.textContent,i=e.getAttribute("href").slice(1),o=e.parentNode;let[,s]=o.className.match(/\btoclevel-(\d+)/);s=Number(s);const r=e.children[0].textContent;Object.assign(this,{headline:n,anchor:i,level:s,number:r,$element:$(o),$link:$(e),$text:$(t)})}replaceText(e){const t=e.clone().find("*").each((e,t)=>{if(["B","EM","I","S","STRIKE","STRONG","SUB","SUP"].includes(t.tagName))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()}}var gn={possiblyHide(){if(cd.g.$toc.length)if("1"===mw.cookie.get("hidetoc"))cd.g.$toc.find(".toctogglecheckbox").prop("checked",!0)},reset(){Gt=null;cd.g.$toc=cd.g.$root.find(".toc");const e=cd.g.$toc.closest('[style*="float: right"], [style*="float:right"], [style*="float: left"], [style*="float:left"]');cd.g.isTocFloating=Boolean(e.length&&cd.g.$root.has(e).length)},getItem(e){if(!cd.g.$toc.length)return null;if(!Gt)Gt=Array.from(cd.g.$toc.get(0).querySelectorAll("li > a")).map(e=>new TocItem(e));return Gt.find(t=>t.anchor===e)||null},highlightWatchedSections(){if(cd.settings.modifyToc&&cd.g.$toc.length)cd.sections.filter(e=>e.isWatched).forEach(e=>{e.updateTocLink()})},addNewSections(e){if(!cd.settings.modifyToc||!cd.g.$toc.length)return;cd.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=cd.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 s;const i=e.headline,r=e.tocLevel,a=t[r-1];let c;if(!a)c=t[t.length-1];const l=document.createElement("li");l.className="cd-toc-notRenderedSection toclevel-".concat(r);const u=document.createElement("a");u.href="#"+e.anchor;u.onclick=t=>{t.preventDefault();un({sectionAnchor:e.anchor,pushState:!0})};l.appendChild(u);if(null===(s=cd.g.thisPageWatchedSections)||void 0===s?void 0:s.includes(i)){u.className="cd-toc-watched";u.title=cd.s("toc-watched")}let d;if(a)d=a.number;else if(c)d=c.number+".1";else d="1";const h=document.createElement("span");h.className="tocnumber cd-toc-hiddenTocNumber";h.textContent=d;u.appendChild(h);const m=document.createElement("span");m.className="toctext";m.textContent=e.headline;u.appendChild(m);if(a)a.$element.after(l);else if(c){const e=document.createElement("ul");e.className="cd-toc-notRenderedSectionList toclevel-".concat(r);e.appendChild(l);c.$element.append(e)}else n.prepend(l);o={headline:i,level:r,number:d,$element:$(l)}}t[e.tocLevel-1]=o;t.splice(e.tocLevel)})},addNewComments(e,t){var n;if(!cd.settings.modifyToc||!cd.g.$toc.length)return;const i=null===(n=e.values().next().value)||void 0===n?void 0:n[0];if(!i)return;const o=i instanceof Comment_Comment;D(Boolean(!(cd.g.hasPageBeenReloaded&&o)||t.commentAnchor||t.sectionAnchor));cd.g.$toc.find(".cd-toc-notRenderedCommentList").remove();e.forEach((e,t)=>{if(!t)return;const n="string"==typeof t?cd.g.$toc.find('.cd-toc-notRenderedSection a[href="#'.concat($.escapeSelector(t),'"]')):t.getTocItem().$link;if(!(null==n?void 0:n.length))return;let i=n;const s=n.next(".cd-toc-newCommentList");if(s.length)i=s;const r=i.get(0),a=document.createElement("ul");a.className=o?"cd-toc-newCommentList":"cd-toc-notRenderedCommentList";let c="";e.forEach((t,n)=>{const i=o?t.getParent():t.parent,s=(null==i?void 0:i.author)&&t.level>1?cd.s("navpanel-newcomments-names",t.author.name,i.author.name):t.author.name,r=t.date?cd.util.formatDate(t.date):cd.s("navpanel-newcomments-unknowndate"),l=s+("rtl"===cd.g.SITE_DIR?"\u200f":"")+cd.mws("comma-separator")+r;if(n<4||5===e.length){const e=document.createElement("li");a.appendChild(e);const n=document.createElement("span");n.className="tocnumber cd-toc-bullet";n.innerHTML=cd.sParse("bullet");e.appendChild(n);const i=document.createElement("span");i.className="toctext";e.appendChild(i);const o=document.createElement("a");o.href="#".concat(t.anchor);o.textContent=l;i.appendChild(o);if(t instanceof Comment_Comment)o.onclick=e=>{e.preventDefault();t.scrollToAndHighlightTarget(!1,!0)};else o.onclick=e=>{e.preventDefault();un({commentAnchor:t.anchor,pushState:!0})}}else c+=l+"\n"});if(e.length>5){const t=document.createElement("span");t.className="cd-toc-more";t.title=c.trim();t.textContent=cd.s("toc-more",e.length-4);const n=document.createElement("li");n.appendChild(t);a.appendChild(n)}r.parentNode.insertBefore(a,r.nextSibling)});L()}};let bn,yn,vn,wn,En,Cn=0;const _n={},Tn={};function An(e){if(!Number.isNaN(Number(e)))cd.g.worker.postMessage({type:"setAlarm",interval:e})}function xn(){cd.g.worker.postMessage({type:"removeAlarm"})}function Sn(){return kn.apply(this,arguments)}function kn(){return(kn=o()((function*(){const e=document.hidden;if(!e||vn){try{const e=yield cd.g.CURRENT_PAGE.getRevisions({rvprop:["ids"],rvlimit:1},!0),t=mw.config.get("wgRevisionId");if(e.length&&e[0].revid!==(bn||t)){const{revisionId:e,comments:n,sections:i}=yield Un.processPage();bn=e;if(Mn(t)){const{comments:e}=yield Un.processPage(t);if(Mn(t)){Pn(i);gn.addNewSections(i);const o=On(e,n);Dn(o);yield Rn(n,o,t)}}}}catch(e){if(!(e instanceof CdError)||e.data&&"network"!==e.data.type)console.warn(e)}if(e){An(1e3*cd.g.BACKGROUND_UPDATE_CHECK_INTERVAL);vn=!0}else An(1e3*cd.g.UPDATE_CHECK_INTERVAL)}else{const e=()=>{$(document).off("visibilitychange",e);vn=!1;xn();Sn()};$(document).on("visibilitychange",e);An(1e3*Math.abs(cd.g.BACKGROUND_UPDATE_CHECK_INTERVAL-cd.g.UPDATE_CHECK_INTERVAL));vn=!0}}))).apply(this,arguments)}function Nn(){return(Nn=o()((function*(){var e;const t=yield cd.g.CURRENT_PAGE.getRevisions({rvprop:["ids"],rvstart:new Date(1e3*cd.g.previousVisitUnixTime).toISOString(),rvlimit:1},!0);wn=null===(e=t[0])||void 0===e?void 0:e.revid;const n=mw.config.get("wgRevisionId");if(wn&&wn<n){const{comments:e}=yield Un.processPage(wn),{comments:t}=yield Un.processPage(n);if(Mn(n))Fn(On(t,e))}}))).apply(this,arguments)}function Pn(e){cd.sections.forEach(e=>{delete e.match});e.forEach(e=>{const{section:t,score:n}=Section_Section.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}})}function On(e,t){const n=e.map(e=>Object.assign({},e));t.forEach(e=>{let i=n.filter(t=>t.authorName===e.authorName&&t.date&&e.date&&t.date.getTime()===e.date.getTime());if(1===i.length)i[0].match=e;else if(i.length>1){let o;i.map(i=>{var o,s;const r=i.parentAnchor===e.parentAnchor,a=(null===(o=i.section)||void 0===o?void 0:o.headline)===(null===(s=e.section)||void 0===s?void 0:s.headline),c=i.id===e.id&&n.length===t.length,l=i.elementHtmls.filter((t,n)=>t===e.elementHtmls[n]).length/i.elementHtmls.length,u=1===l?1:G(i.text,e.text);return{comment:i,score:r*(i.parentAnchor?1:.75)+1*a+l+u+.25*c}}).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}).forEach(t=>{if(!o&&(!t.comment.match||t.comment.matchScore<t.score)){t.comment.match=e;t.comment.matchScore=t.score;delete t.comment.hasPoorMatch;o=!0}else if(!t.comment.match)t.comment.hasPoorMatch=!0})}});return n}function In(e,t){return t.textInnerHtml!==e.textInnerHtml||t.headingInnerHtml&&t.headingInnerHtml!==e.headingInnerHtml}function Fn(e){const t=function(e){const t=Object.assign({},e);Object.keys(t).forEach(e=>{var n;const i=null===(n=Object.keys(t[e])[0])||void 0===n?void 0:n.seenUnixTime;if(!i||i<Date.now()-60*cd.g.SECONDS_IN_A_DAY*1e3)delete t[e]});return t}(H("seenRenderedEdits")),n=mw.config.get("wgArticleId");e.forEach(e=>{if(e.anchor===En)return;const i=e.match;if(i){var o,s;const a=null===(o=t[n])||void 0===o?void 0:null===(s=o[e.anchor])||void 0===s?void 0:s.innerHtml;if(In(i,e)&&a!==e.innerHtml){const t=Comment_Comment.getByAnchor(e.anchor);if(!t)return;const n=[i,e];t.markAsEdited("editedSince",!0,wn,n);if(t.isOpeningSection){const n=t.getSection();if(n&&!n.isWatched&&/^H[1-6]$/.test(e.elementTagNames[0])&&i.elementTagNames[0]===e.elementTagNames[0]){var r;const t=i.elementHtmls[0].replace(/\x01(\d+)_\w+\x02/g,(t,n)=>e.hiddenElementData[n-1].html),o={headlineElement:$("<span>").html($(t).html()).get(0)};Section_Section.prototype.parseHeadline.call(o);const s=n.headline;if(s&&o.headline!==s&&(null===(r=cd.g.originalThisPageWatchedSections)||void 0===r?void 0:r.includes(o.headline)))n.watch(!0,o.headline)}}}}});delete t[n];U("seenRenderedEdits",t)}function Dn(e){let t=!1;e.forEach(e=>{const n=e.match;if(n){const i=Comment_Comment.getByAnchor(e.anchor);if(!i)return;if(i.isDeleted){i.unmarkAsEdited("deleted");t=!0}if(In(e,n)){if(!i.comparedHtml||i.comparedHtml!==n.innerHtml){const o=i.update(e,n),s=[e,n];i.markAsEdited("edited",o,bn,s);t=!0;i.comparedHtml=n.innerHtml}}else if(i.isEdited){i.update(e,n);i.unmarkAsEdited("edited");t=!0}}else if(!e.hasPoorMatch){const n=Comment_Comment.getByAnchor(e.anchor);if(!n||n.isDeleted)return;n.markAsEdited("deleted");t=!0}});if(t)nt.redrawIfNecessary(!1,!0)}function Ln(e){let t=[];if("all"===cd.settings.notifications)t=e;else if("toMe"===cd.settings.notifications)t=e.filter(e=>e.toMe);if("none"!==cd.settings.notifications&&t.length){const e=Vt.find(e=>e.comments&&e.notification.isOpen);if(e)t.push(...e.comments)}if(t.length){let e;const i=cd.commentForms.some(e=>e.isAltered())?" "+cd.mws("parentheses",cd.s("notification-formdata")):"",o=cd.sParse("notification-reload",i);if(1===t.length){const n=t[0];if(n.toMe){const t=n.watchedSectionHeadline?cd.mws("word-separator")+cd.s("notification-part-insection",n.watchedSectionHeadline):cd.mws("word-separator")+cd.s("notification-part-onthispage");e=cd.sParse("notification-toyou",n.author.name,n.author,t)+" "+o}else e=cd.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 s=cd.mws("word-separator")+(i?cd.s("notification-part-insection",i):cd.s("notification-part-onthispage"));let r=cd.s("notification-newcomments-maybeinteresting");if(!r.startsWith(","))r=cd.mws("word-separator")+r;const a=i&&(null===(n=cd.g.thisPageWatchedSections)||void 0===n?void 0:n.includes(i))?"":r;e=cd.sParse("notification-newcomments",t.length,s,a)+" "+o}pn(!1);fn([cd.util.wrap(e)],{comments:t}).$notification.on("click",()=>{un({commentAnchor:t[0].anchor})})}}function Bn(e){let t=[];if("all"===cd.settings.desktopNotifications)t=e;else if("toMe"===cd.settings.desktopNotifications)t=e.filter(e=>e.toMe);if(!document.hasFocus()&&"granted"===Notification.permission&&t.length){let e;const s=t[0];if(1===t.length)if(s.toMe){var n;const t=(null===(n=s.section)||void 0===n?void 0:n.headline)?cd.mws("word-separator")+cd.s("notification-part-insection",s.section.headline):"";e=cd.s("notification-toyou-desktop",s.author.name,s.author,t,cd.g.CURRENT_PAGE.name)}else{var i;e=cd.s("notification-insection-desktop",s.author.name,s.author,null===(i=s.section)||void 0===i?void 0:i.headline,cd.g.CURRENT_PAGE.name)}else{var o;let n;if(t.every(e=>e.watchedSectionHeadline===t[0].watchedSectionHeadline))n=t[0].watchedSectionHeadline;const i=n?cd.mws("word-separator")+cd.s("notification-part-insection",n):"";let s=cd.s("notification-newcomments-maybeinteresting");if(!s.startsWith(cd.mws("comma-separator")))s=cd.mws("word-separator")+s;const r=n&&(null===(o=cd.g.thisPageWatchedSections)||void 0===o?void 0:o.includes(n))?"":s;e=cd.s("notification-newcomments-desktop",t.length,i,cd.g.CURRENT_PAGE.name,r)}new Notification(mw.config.get("wgSiteName"),{body:e,tag:"convenient-discussions-"+t[t.length-1].anchor}).onclick=()=>{parent.focus();window.focus();un({commentAnchor:s.anchor,closeNotificationsSmoothly:!1})}}}function Mn(e){return e===mw.config.get("wgRevisionId")&&!ln()}function Rn(e,t,n){return jn.apply(this,arguments)}function jn(){return(jn=o()((function*(e,t,n){e.forEach(e=>{e.author=V.getUser(e.authorName);if(e.parentAuthorName)e.parent={author:V.getUser(e.parentAuthorName)}});const i=e.filter(e=>e.anchor&&!t.some(t=>t.match===e)),o=i.filter(e=>{if(e.isOwn||cd.settings.notificationsBlacklist.includes(e.author.name))return!1;if(e.toMe){e.interesting=!0;return!0}if(!cd.g.thisPageWatchedSections)return!1;if(e.section){const t=e.section.match;if(t){const n=t.getClosestWatchedSection(!0);if(n){e.watchedSectionHeadline=n.headline;e.interesting=!0;return!0}}}}),s=i.map(e=>e.author).filter(p);yield Pe(s,!0);if(!Mn(n))return;if(o[0])Un.relevantNewCommentAnchor=o[0].anchor;else if(i[0])Un.relevantNewCommentAnchor=i[0].anchor;const r=Comment_Comment.groupBySection(i),a=Boolean(o.length);Vn.updateRefreshButton(i.length,r,a);Un.updatePageTitle(i.length,a);gn.addNewComments(r);Section_Section.addNewCommentsNotifications(r);const c=o.filter(e=>!yn.some(t=>t.anchor===e.anchor));Ln(c);Bn(c);yn.push(...c)}))).apply(this,arguments)}function Hn(e){return $n.apply(this,arguments)}function $n(){return($n=o()((function*(e){const t=e.data;if("wakeUp"===t.type)Sn();else{const e=t.resolverId;delete t.resolverId;delete t.type;Tn[e](t);delete Tn[e]}}))).apply(this,arguments)}const Un={relevantNewCommentAnchor:null,init(e,t){var n=this;return o()((function*(){if(cd.g.worker){yn=[];n.relevantNewCommentAnchor=null;vn=!1;wn=null;if(cd.g.worker.onmessage)xn();else cd.g.worker.onmessage=Hn;An(1e3*cd.g.UPDATE_CHECK_INTERVAL);yield e;if(cd.g.previousVisitUnixTime){!function(){Nn.apply(this,arguments)}();if(t.didSubmitCommentForm&&t.commentAnchor)En=t.commentAnchor}}}))()},processPage:e=>o()((function*(){if(_n[e])return _n[e];const{text:t,revid:n}=(yield cd.g.CURRENT_PAGE.parse({oldid:e},!0))||{},i=["$content","$root","$toc","rootElement","visits","watchedSections"],o=yield(s={type:"parse",revisionId:n,text:t,g:W(cd.g,["IS_IPv6_ADDRESS","TIMESTAMP_PARSER"],i),config:W(cd.config,["checkForCustomForeignComponents"],i)},new Promise(e=>{const t=Cn++;Object.assign(s,{resolverId:t});cd.g.worker.postMessage(s);Tn[t]=e}));var s;if(!_n[o.revisionId])_n[o.revisionId]=o;Object.keys(_n).forEach(e=>{const t=Number(e);if(t!==o.revisionId&&t!==bn&&t!==wn&&t!==mw.config.get("wgRevisionId"))delete _n[e]});return o}))(),updatePageTitle(e,t){const n=t?"*":"",i=e?"(".concat(e).concat(n,") "):"";document.title=document.title.replace(/^(?:\(\d+\*?\) )?/,i)}};var Yn=Un;let qn,Wn;const Gn={mount(){this.$element=$("<div>").attr("id","cd-navPanel").appendTo(document.body);this.$refreshButton=$("<div>").addClass("cd-navPanel-button").attr("id","cd-navPanel-refreshButton").attr("title","".concat(cd.s("navpanel-refresh")," ").concat(cd.mws("parentheses","R"))).on("click",()=>{this.refreshClick()}).appendTo(this.$element);this.$previousButton=$("<div>").addClass("cd-navPanel-button").attr("id","cd-navPanel-previousButton").attr("title","".concat(cd.s("navpanel-previous")," ").concat(cd.mws("parentheses","W"))).on("click",()=>{this.goToPreviousNewComment()}).hide().appendTo(this.$element);this.$nextButton=$("<div>").addClass("cd-navPanel-button").attr("id","cd-navPanel-nextButton").attr("title","".concat(cd.s("navpanel-next")," ").concat(cd.mws("parentheses","S"))).on("click",()=>{this.goToNextNewComment()}).hide().appendTo(this.$element);this.$firstUnseenButton=$("<div>").addClass("cd-navPanel-button").attr("id","cd-navPanel-firstUnseenButton").attr("title","".concat(cd.s("navpanel-firstunseen")," ").concat(cd.mws("parentheses","F"))).on("click",()=>{this.goToFirstUnseenComment()}).hide().appendTo(this.$element);this.$commentFormButton=$("<div>").addClass("cd-navPanel-button").attr("id","cd-navPanel-commentFormButton").attr("title",cd.s("navpanel-commentform")).on("click",()=>{this.goToNextCommentForm()}).hide().appendTo(this.$element)},unmount(){this.$element.remove();this.$element=null},isMounted(){return Boolean(this.$element)},reset(){Wn=null;this.$refreshButton.empty().attr("title","".concat(cd.s("navpanel-refresh")," ").concat(cd.mws("parentheses","R")));this.$previousButton.hide();this.$nextButton.hide();this.$firstUnseenButton.hide();this.$commentFormButton.hide()},fill(){qn=cd.comments.filter(e=>e.isNew).length;if(qn){this.$nextButton.show();this.$previousButton.show();this.updateFirstUnseenButton()}},updateFirstUnseenButton(){if(!Gn.isMounted())return;const e=cd.comments.filter(e=>!1===e.isSeen).length;if(e)this.$firstUnseenButton.show().text(e);else this.$firstUnseenButton.hide()},refreshClick(){un({commentAnchor:Yn.relevantNewCommentAnchor})},goToPreviousNewComment(){if(cd.g.autoScrollInProgress)return;const e=Comment_Comment.findInViewport("backward");if(!e)return;const t=_(cd.comments,e.id,!0).find(e=>e.isNew&&!0!==e.isInViewport());if(t)t.$elements.cdScrollTo("center",!0,()=>{t.registerSeen("backward",!0);this.updateFirstUnseenButton()})},goToNextNewComment(){if(cd.g.autoScrollInProgress)return;const e=Comment_Comment.findInViewport("forward");if(!e)return;const t=_(cd.comments,e.id).find(e=>e.isNew&&!0!==e.isInViewport());if(t)t.$elements.cdScrollTo("center",!0,()=>{t.registerSeen("forward",!0);this.updateFirstUnseenButton()})},goToFirstUnseenComment(){if(cd.g.autoScrollInProgress)return;const e=cd.comments.slice(Wn||0).find(e=>!1===e.isSeen);if(e){e.$elements.cdScrollTo("center",!0,()=>{e.registerSeen("forward",!0);this.updateFirstUnseenButton()});Wn=e.id}},goToNextCommentForm(e=!1){const t=cd.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");t.commentInput.focus()}},updateRefreshButton(e,t,n){this.$refreshButton.empty().attr("title",function(e,t){let n=null;if(e){n=cd.s("navpanel-newcomments-count",e)+" "+cd.s("navpanel-newcomments-refresh")+" "+cd.mws("parentheses","R");const i=ze(cd.s("bullet"));t.forEach((e,t)=>{let o;if("string"==typeof t)o=e[0].section.headline;else if(null!==t)o=t.headline;n+=o?"\n\n".concat(o):"\n";e.forEach(e=>{var t;n+="\n";const o=(null===(t=e.parent)||void 0===t?void 0:t.author)&&e.level>1?cd.s("navpanel-newcomments-names",e.author.name,e.parent.author.name):e.author.name,s=e.date?cd.util.formatDate(e.date):cd.s("navpanel-newcomments-unknowndate");n+=i+" "+o+("rtl"===cd.g.SITE_DIR?"\u200f":"")+cd.mws("comma-separator")+s})})}else n="".concat(cd.s("navpanel-refresh")," ").concat(cd.mws("parentheses","R"));return n}(e,t));if(e)$("<span>").attr("dir","ltr").text("+".concat(e)).appendTo(this.$refreshButton);if(n)this.$refreshButton.addClass("cd-navPanel-refreshButton-interesting");else this.$refreshButton.removeClass("cd-navPanel-refreshButton-interesting")},updateCommentFormButton(){if(!cd.g.autoScrollInProgress&&Gn.isMounted())if(cd.commentForms.some(e=>!e.$element.cdIsInViewport(!0)))this.$commentFormButton.show();else this.$commentFormButton.hide()}};var Vn=Gn;const zn={};function Kn(){nt.redrawIfNecessary(!0);Vn.updateCommentFormButton();cd.commentForms.forEach(e=>{e.adjustLabels()})}function Xn(e,t){zn[e]=e=>{if(t()){e.preventDefault();e.returnValue="";return""}};$(window).on("beforeunload",zn[e])}function Jn(e){if(zn[e])$(window).off("beforeunload",zn[e])}function Qn(e){if(cd.g.isPageActive&&!cd.util.isPageOverlayOn()){if(81===e.keyCode&&e.ctrlKey&&!e.shiftKey&&e.altKey||81===e.keyCode&&!e.ctrlKey&&!e.shiftKey&&!e.altKey&&!P()){var t;e.preventDefault();null===(t=CommentForm_CommentForm.getLastActive())||void 0===t||t.quote(e.ctrlKey)}if(Vn.isMounted()){if(!(82!==e.keyCode||e.ctrlKey||e.shiftKey||e.altKey||P()))Vn.refreshClick();if(!(87!==e.keyCode||e.ctrlKey||e.shiftKey||e.altKey||P()))Vn.goToPreviousNewComment();if(!(83!==e.keyCode||e.ctrlKey||e.shiftKey||e.altKey||P()))Vn.goToNextNewComment();if(!(70!==e.keyCode||e.ctrlKey||e.shiftKey||e.altKey||P()))Vn.goToFirstUnseenComment()}}}function Zn(){if(!cd.g.dontHandleScroll&&!cd.g.autoScrollInProgress){cd.g.dontHandleScroll=!0;setTimeout(()=>{cd.g.dontHandleScroll=!1;if(cd.g.isPageActive){Comment_Comment.registerSeen();Vn.updateFirstUnseenButton();Vn.updateCommentFormButton()}ot.update()},300)}}function ei({value:e,selected:t,disabled:n,label:i,help:o,tabIndex:s,title:r}){const a=new OO.ui.CheckboxInputWidget({value:e,selected:t,disabled:n,tabIndex:s});return[new OO.ui.FieldLayout(a,{label:i,align:"inline",help:o,helpInline:!0,title:r}),a]}function ti({label:e,selected:t,help:n,options:i}){const o=i.map(e=>new OO.ui.RadioOptionWidget(e)),s=new OO.ui.RadioSelectWidget({items:o}),r=new OO.ui.FieldLayout(s,{label:e,align:"top",help:n,helpInline:!0});s.selectItemByData(t);return[r,s,...o]}function ni({label:e,value:t,disabled:n=!1,help:i,copyCallback:o}){const s=new OO.ui.TextInputWidget({value:t,disabled:n}),r=new OO.ui.ButtonWidget({label:cd.s("copy"),icon:"articles",disabled:n});r.on("click",()=>{o(s.getValue())});return new OO.ui.ActionFieldLayout(s,r,{align:"top",label:e,help:i,helpInline:Boolean(i)})}function ii(){if(!cd.g.windowManager){cd.g.windowManager=(new OO.ui.WindowManager).on("closing",function(){var e=o()((function*(e,t){yield t;cd.g.windowManager.clearWindows()}));return function(t,n){return e.apply(this,arguments)}}());$(document.body).append(cd.g.windowManager.$element)}}function oi(e){return si.apply(this,arguments)}function si(){return(si=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;cd.g.windowManager.addWindows([o]);const s=cd.g.windowManager.openWindow(o,Object.assign({},i,t));return null===(n=yield s.closed)||void 0===n?void 0:n.action}))).apply(this,arguments)}function ri(e,t={}){const n=[{label:cd.s("".concat(e,"-yes")),action:"accept",flags:["primary","destructive"]},{label:cd.s("".concat(e,"-no")),action:"reject",flags:"safe"}],i=Object.assign({},{actions:n},t);return OO.ui.confirm(cd.s(e),i)}function ai(e){const t=e.actions.get({actions:"save"})[0];return t&&!t.isDisabled()}function ci(e,t){return li.apply(this,arguments)}function li(){return(li=o()((function*(e,t){if(!ai(e)||(yield ri("".concat(t,"-close-confirm")))){e.close({action:"close"});Jn("dialog")}}))).apply(this,arguments)}function ui(e,t,n,i){if(t instanceof CdError){const t=new OO.ui.Error(cd.sParse(n),{recoverable:i});e.showErrors(t)}else{const t=new OO.ui.Error(cd.sParse("error-javascript"),{recoverable:!1});e.showErrors(t)}console.warn(t);if(!i)e.$errors.find(".oo-ui-buttonElement-button").on("click",()=>{e.close()});e.actions.setAbilities({close:!0});cd.g.windowManager.updateWindowSize(e);e.popPending()}function di(){return hi.apply(this,arguments)}function hi(){return(hi=o()((function*(){if(cd.util.isPageOverlayOn())return;function e(){e.parent.call(this)}OO.inheritClass(e,OO.ui.ProcessDialog);e.static.name="settingsDialog";e.static.title=cd.s("sd-title");e.static.actions=[{action:"close",modes:["settings","reload","dataRemoved"],flags:["safe","close"],disabled:!0},{action:"save",modes:["settings"],label:cd.s("sd-save"),flags:["primary","progressive"],disabled:!0},{action:"reset",modes:["settings"],label:cd.s("sd-reset"),flags:["destructive"],disabled:!0},{action:"reload",modes:["reload"],label:cd.s("sd-reload"),flags:["primary","progressive"]}];e.static.size="large";e.prototype.getBodyHeight=function(){return 600};e.prototype.initialize=o()((function*(){e.parent.prototype.initialize.apply(this,arguments);this.pushPending();const t=$("<div>").text(cd.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(cd.s("sd-saved"));this.reloadPanel=new OO.ui.PanelLayout({padded:!0,expanded:!1});this.reloadPanel.$element.append(n);const i=$("<p>").text(cd.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)}));e.prototype.getSetupProcess=function(t){return e.parent.prototype.getSetupProcess.call(this,t).next(()=>{this.stackLayout.setItem(this.loadingPanel);this.actions.setMode("settings")})};e.prototype.getReadyProcess=function(i){var s=this;return e.parent.prototype.getReadyProcess.call(this,i).next(o()((function*(){let e;try{[e]=yield Promise.all(t)}catch(e){ui(s,e,"error-settings-load",!1);return}s.settings=Object.assign({},cd.settings,e);cd.g.settingsForm=s;s.renderForm(s.settings);s.stackLayout.setItem(s.settingsPanel);s.bookletLayout.setPage("general");s.actions.setAbilities({close:!0});cd.g.windowManager.updateWindowSize(s);s.popPending();Xn("dialog",()=>ai(n))})))};e.prototype.getActionProcess=function(t){var n=this;if("save"===t)return new OO.ui.Process(o()((function*(){n.pushPending();const e=n.collectSettings();try{yield te(e)}catch(e){ui(n,e,"error-settings-save",!0);return}n.stackLayout.setItem(n.reloadPanel);n.actions.setMode("reload");n.popPending()})));else if("reload"===t)return new OO.ui.Process(()=>{this.close({action:t});location.reload()});else if("close"===t)return new OO.ui.Process(o()((function*(){yield ci(n,"sd")})));else if("reset"===t)return new OO.ui.Process(o()((function*(){if(yield OO.ui.confirm(cd.s("sd-reset-confirm"))){const e=n.bookletLayout.getCurrentPageName();n.renderForm(cd.defaultSettings);n.bookletLayout.setPage(e)}})));return e.parent.prototype.getActionProcess.call(this,t)};e.prototype.renderForm=function(e){[this.allowEditOthersCommentsField,this.allowEditOthersCommentsCheckbox]=ei({value:"allowEditOthersComments",selected:e.allowEditOthersComments,label:cd.s("sd-alloweditotherscomments")});[this.alwaysExpandAdvancedField,this.alwaysExpandAdvancedCheckbox]=ei({value:"alwaysExpandAdvanced",selected:e.alwaysExpandAdvanced,label:cd.s("sd-alwaysexpandadvanced")});const t=new OO.ui.CheckboxMultioptionWidget({data:"mentions",selected:e.autocompleteTypes.includes("mentions"),label:cd.s("sd-autocompletetypes-mentions")}),i=new OO.ui.CheckboxMultioptionWidget({data:"commentLinks",selected:e.autocompleteTypes.includes("commentLinks"),label:cd.s("sd-autocompletetypes-commentlinks")}),o=new OO.ui.CheckboxMultioptionWidget({data:"wikilinks",selected:e.autocompleteTypes.includes("wikilinks"),label:cd.s("sd-autocompletetypes-wikilinks")}),s=new OO.ui.CheckboxMultioptionWidget({data:"templates",selected:e.autocompleteTypes.includes("templates"),label:cd.s("sd-autocompletetypes-templates")}),r=new OO.ui.CheckboxMultioptionWidget({data:"tags",selected:e.autocompleteTypes.includes("tags"),label:cd.s("sd-autocompletetypes-tags")});this.autocompleteTypesMultiselect=new OO.ui.CheckboxMultiselectWidget({items:[t,i,o,s,r],classes:["cd-autocompleteTypesMultiselect"]});this.autocompleteTypesField=new OO.ui.FieldLayout(this.autocompleteTypesMultiselect,{label:cd.s("sd-autocompletetypes"),align:"top"});[this.autopreviewField,this.autopreviewCheckbox]=ei({value:"autopreview",selected:e.autopreview,label:cd.s("sd-autopreview")});[this.desktopNotificationsField,this.desktopNotificationsSelect,this.desktopNotificationsRadioAll,this.desktopNotificationsRadioNone,this.desktopNotificationsRadioToMe]=ti({options:[{label:cd.s("sd-desktopnotifications-radio-all"),data:"all"},{label:cd.s("sd-desktopnotifications-radio-tome"),data:"toMe"},{label:cd.s("sd-desktopnotifications-radio-none"),data:"none"}],selected:e.desktopNotifications,label:cd.s("sd-desktopnotifications"),help:cd.s("sd-desktopnotifications-help",location.hostname)});[this.highlightOwnCommentsField,this.highlightOwnCommentsCheckbox]=ei({value:"highlightOwnComments",selected:e.highlightOwnComments,label:cd.s("sd-highlightowncomments")});const a=e.insertButtons.map(e=>Array.isArray(e)?e.join(";"):e);this.insertButtonsMultiselect=new OO.ui.TagMultiselectWidget({placeholder:cd.s("sd-insertbuttons-multiselect-placeholder"),allowArbitrary:!0,inputPosition:"outline",tagLimit:100,selected:a});this.insertButtonsField=new OO.ui.FieldLayout(this.insertButtonsMultiselect,{label:cd.s("sd-insertbuttons"),align:"top",help:cd.util.wrap(cd.sParse("sd-insertbuttons-help")+" "+cd.sParse("sd-localsetting")),helpInline:!0});[this.modifyTocField,this.modifyTocCheckbox]=ei({value:"modifyToc",selected:e.modifyToc,label:cd.s("sd-modifytoc"),help:cd.s("sd-modifytoc-help")});[this.notificationsField,this.notificationsSelect,this.notificationsRadioAll,this.notificationsRadioNone,this.notificationsRadioToMe]=ti({options:[{label:cd.s("sd-notifications-radio-all"),data:"all"},{label:cd.s("sd-notifications-radio-tome"),data:"toMe"},{label:cd.s("sd-notifications-radio-none"),data:"none"}],selected:e.notifications,label:cd.s("sd-notifications"),help:cd.s("sd-notifications-help")});this.notificationsBlacklistMultiselect=new mw.widgets.UsersMultiselectWidget({placeholder:cd.s("sd-notificationsblacklist-multiselect-placeholder"),tagLimit:100,selected:e.notificationsBlacklist});this.notificationsBlacklistField=new OO.ui.FieldLayout(this.notificationsBlacklistMultiselect,{label:cd.s("sd-notificationsblacklist"),align:"top"});[this.showToolbarField,this.showToolbarCheckbox]=ei({value:"showToolbar",selected:e.showToolbar,label:cd.s("sd-showtoolbar")});this.signaturePrefixInput=new OO.ui.TextInputWidget({value:e.signaturePrefix,maxlength:100});this.signaturePrefixField=new OO.ui.FieldLayout(this.signaturePrefixInput,{label:cd.s("sd-signatureprefix"),align:"top",help:cd.util.wrap(cd.sParse("sd-signatureprefix-help")+" "+cd.sParse("sd-localsetting")),helpInline:!0});[this.useTemplateDataField,this.useTemplateDataCheckbox]=ei({value:"useTemplateData",selected:e.useTemplateData,disabled:!e.autocompleteTypes.includes("templates"),label:cd.s("sd-usetemplatedata"),help:cd.s("sd-usetemplatedata-help")});[this.watchOnReplyField,this.watchOnReplyCheckbox]=ei({value:"watchOnReply",selected:e.watchOnReply,label:cd.s("sd-watchonreply")});[this.watchSectionOnReplyField,this.watchSectionOnReplyCheckbox]=ei({value:"watchSectionOnReply",selected:e.watchSectionOnReply,label:cd.s("sd-watchsectiononreply"),help:cd.s("sd-watchsectiononreply-help")});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:"changeDesktopNotifications"});this.highlightOwnCommentsCheckbox.connect(this,{change:"updateStates"});this.modifyTocCheckbox.connect(this,{change:"updateStates"});this.notificationsSelect.connect(this,{select:"updateStates"});this.notificationsBlacklistMultiselect.connect(this,{change:"updateStates"});this.showToolbarCheckbox.connect(this,{change:"updateStates"});this.signaturePrefixInput.connect(this,{change:"updateStates"});this.useTemplateDataCheckbox.connect(this,{change:"updateStates"});this.watchSectionOnReplyCheckbox.connect(this,{change:"updateStates"});this.watchOnReplyCheckbox.connect(this,{change:"updateStates"});this.removeDataButton=new OO.ui.ButtonWidget({label:cd.s("sd-removedata"),flags:["destructive"]});this.removeDataButton.connect(this,{click:"removeData"});this.removeDataField=new OO.ui.FieldLayout(this.removeDataButton,{label:cd.s("sd-removedata-description"),align:"top",help:cd.util.wrap(cd.sParse("sd-removedata-help"),{targetBlank:!0}),helpInline:!0});function c(e,t){c.super.call(this,e,t);this.$element.append([n.highlightOwnCommentsField.$element,n.allowEditOthersCommentsField.$element,n.modifyTocField.$element])}OO.inheritClass(c,OO.ui.PageLayout);c.prototype.setupOutlineItem=function(e){c.super.prototype.setupOutlineItem.call(this,e);this.outlineItem.setLabel(cd.s("sd-page-talkpage"))};function l(e,t){l.super.call(this,e,t);this.$element.append([n.autopreviewField.$element,n.watchOnReplyField.$element,n.watchSectionOnReplyField.$element,n.showToolbarField.$element,n.alwaysExpandAdvancedField.$element,n.autocompleteTypesField.$element,n.useTemplateDataField.$element,n.insertButtonsField.$element,n.signaturePrefixField.$element])}OO.inheritClass(l,OO.ui.PageLayout);l.prototype.setupOutlineItem=function(){this.outlineItem.setLabel(cd.s("sd-page-commentform"))};function u(e,t){u.super.call(this,e,t);this.$element.append([n.notificationsField.$element,n.desktopNotificationsField.$element,n.notificationsBlacklistField.$element])}OO.inheritClass(u,OO.ui.PageLayout);u.prototype.setupOutlineItem=function(){this.outlineItem.setLabel(cd.s("sd-page-notifications"))};function d(e,t){d.super.call(this,e,t);this.$element.append(n.removeDataField.$element)}OO.inheritClass(d,OO.ui.PageLayout);d.prototype.setupOutlineItem=function(){this.outlineItem.setLabel(cd.s("sd-page-dataremoval"))};const h=new c("general"),m=new l("commentForm"),f=new u("notifications"),p=new d("removeData");this.bookletLayout=new OO.ui.BookletLayout({outlined:!0});this.bookletLayout.addPages([h,m,f,p]);this.settingsPanel.$element.empty().append(this.bookletLayout.$element);this.updateStates()};e.prototype.collectSettings=function(){var e,t;const n={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",highlightOwnComments:this.highlightOwnCommentsCheckbox.isSelected(),insertButtons:this.processInsertButtons(),modifyToc:this.modifyTocCheckbox.isSelected(),notifications:null===(t=this.notificationsSelect.findSelectedItem())||void 0===t?void 0:t.getData(),notificationsBlacklist:this.notificationsBlacklistMultiselect.getValue(),showToolbar:this.showToolbarCheckbox.isSelected(),signaturePrefix:this.signaturePrefixInput.getValue(),useTemplateData:this.useTemplateDataCheckbox.isSelected(),watchOnReply:this.watchOnReplyCheckbox.isSelected(),watchSectionOnReply:this.watchSectionOnReplyCheckbox.isSelected()};n.haveInsertButtonsBeenAltered=JSON.stringify(n.insertButtons)!==JSON.stringify(cd.defaultSettings.insertButtons);return n};e.prototype.processInsertButtons=function(){return this.insertButtonsMultiselect.getValue().map(e=>{var t;const n=[];e=I(e,/\\[+;\\]/g,n);let[,i,o]=e.match(/^(.*?)(?:;(.+))?$/)||[];if(null===(t=i)||void 0===t?void 0:t.replace(/^ +$/,"")){i=F(i,n);o=o&&F(o,n);return[i,o].filter(C)}}).filter(C)};e.prototype.updateStates=o()((function*(){this.useTemplateDataCheckbox.setDisabled(!this.autocompleteTypesMultiselect.findItemFromData("templates").isSelected());const e=this.collectSettings(),t=!j(e,this.settings,!0),n=!j(e,cd.defaultSettings,!0);this.actions.setAbilities({save:t,reset:n})}));e.prototype.changeDesktopNotifications=function(e){if("none"!==e.data&&"granted"!==Notification.permission){OO.ui.alert(cd.s("dn-grantpermission"));Notification.requestPermission(e=>{if("granted"!==e)this.desktopNotificationsSelect.selectItemByData("none")})}};e.prototype.removeData=o()((function*(){if(yield ri("sd-removedata-confirm",{size:"medium"})){this.pushPending();try{yield Promise.all([xe(cd.g.LOCAL_SETTINGS_OPTION_NAME,void 0),xe(cd.g.VISITS_OPTION_NAME,void 0),xe(cd.g.WATCHED_SECTIONS_OPTION_NAME,void 0),ke(cd.g.SETTINGS_OPTION_NAME,void 0)])}catch(e){ui(this,e,"sd-error-removedata",!1);return}localStorage.removeItem("convenientDiscussions-commentForms");localStorage.removeItem("convenientDiscussions-thanks");this.stackLayout.setItem(this.dataRemovedPanel);this.actions.setMode("dataRemoved");this.popPending()}}));if(M("mediawiki.widgets.UsersMultiselectWidget"))return;const t=[Q({omitLocal:!0}),mw.loader.using("mediawiki.widgets.UsersMultiselectWidget")];ii();const n=new e;cd.g.windowManager.addWindows([n]);cd.g.windowManager.openWindow(n)}))).apply(this,arguments)}function mi(){return fi.apply(this,arguments)}function fi(){return(fi=o()((function*(){if(cd.util.isPageOverlayOn())return;function e(){e.parent.call(this)}OO.inheritClass(e,OO.ui.ProcessDialog);e.static.name="editWatchedSectionsDialog";e.static.title=cd.s("ewsd-title");e.static.actions=[{action:"close",modes:["edit","saved"],flags:["safe","close"],disabled:!0},{action:"save",modes:["edit"],label:cd.s("ewsd-save"),flags:["primary","progressive"],disabled:!0}];e.static.size="large";e.prototype.getBodyHeight=function(){return this.$errorItems?this.$errors.get(0).scrollHeight:this.$body.get(0).scrollHeight};e.prototype.initialize=o()((function*(){e.parent.prototype.initialize.apply(this,arguments);this.pushPending();const t=$("<div>").text(cd.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});const n=$("<p>").text(cd.s("ewsd-saved"));this.savedPanel=new OO.ui.PanelLayout({padded:!0,expanded:!1});this.savedPanel.$element.append(n);this.stackLayout=new OO.ui.StackLayout({items:[this.loadingPanel,this.sectionsPanel,this.savedPanel]});this.$body.append(this.stackLayout.$element)}));e.prototype.getSetupProcess=function(t){return e.parent.prototype.getSetupProcess.call(this,t).next(()=>{this.stackLayout.setItem(this.loadingPanel);this.actions.setMode("edit")})};e.prototype.getReadyProcess=function(n){var i=this;return e.parent.prototype.getReadyProcess.call(this,n).next(o()((function*(){let e;try{yield t;e=yield we(Object.keys(cd.g.watchedSections).filter(e=>cd.g.watchedSections[e].length))}catch(e){ui(i,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=>cd.g.watchedSections[e.pageid].map(t=>"".concat(e.title,"#").concat(t)).join("\n")).join("\n");i.input=new OO.ui.MultilineTextInputWidget({value:n,rows:30,classes:["cd-editWatchedSections-input"]});i.input.on("change",e=>{i.actions.setAbilities({save:e!==n})});i.sectionsPanel.$element.append(i.input.$element);i.stackLayout.setItem(i.sectionsPanel);i.input.focus();i.actions.setAbilities({close:!0});i.$body.css("overflow","hidden");setTimeout(()=>{i.$body.css("overflow","")},500);cd.g.windowManager.updateWindowSize(i);i.popPending();Xn("dialog",()=>ai(i))})))};e.prototype.getActionProcess=function(t){var n=this;if("save"===t)return new OO.ui.Process(o()((function*(){n.pushPending();const e={},t=[];n.input.getValue().split("\n").forEach(n=>{const i=n.match(/^(.+?)#(.+)$/);if(i){const n=i[1].trim(),o=i[2].trim();if(!e[n]){e[n]=[];t.push(n)}e[n].push(o)}});let i,o,s;try{({normalized:i,redirects:o,pages:s}=(yield Ce(t))||{})}catch(e){ui(n,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 r={};s.filter(e=>void 0!==e.pageid).forEach(e=>{r[e.title]=e.pageid});cd.g.watchedSections={};Object.keys(e).filter(e=>r[e]).forEach(t=>{cd.g.watchedSections[r[t]]=e[t].filter(p)});try{yield ue()}catch(e){if(e instanceof CdError){const{type:t,code:i,apiData:o}=e.data;if("internal"===t&&"sizeLimit"===i){const e=new OO.ui.Error(cd.sParse("ewsd-error-maxsize"),{recoverable:!1});n.showErrors(e)}else{const e=new OO.ui.Error(cd.sParse("ewsd-error-processing"),{recoverable:!0});n.showErrors(e)}console.warn(t,i,o)}else{const t=new OO.ui.Error(cd.sParse("error-javascript"),{recoverable:!1});n.showErrors(t);console.warn(e)}n.popPending();return}n.stackLayout.setItem(n.savedPanel);n.actions.setMode("saved");n.popPending()})));else if("close"===t)return new OO.ui.Process(o()((function*(){yield ci(n,"ewsd")})));return e.parent.prototype.getActionProcess.call(this,t)};const t=ce();ii();const n=new e;cd.g.windowManager.addWindows([n]);cd.g.windowManager.openWindow(n)}))).apply(this,arguments)}function pi(e){const t=$("<textarea>").val(e).appendTo(document.body).select(),n=document.execCommand("copy");t.remove();if(n)mw.notify(cd.s("copylink-copied"));else mw.notify(cd.s("copylink-error"),{type:"error"})}function gi(e){return bi.apply(this,arguments)}function bi(){return(bi=o()((function*(e){var t,n;if(e.isLinkBeingCopied)return;const i=e instanceof Comment_Comment,o=Xe(i?e.anchor:A(e.anchor)),s="[[".concat(cd.g.CURRENT_PAGE.name,"#").concat(o,"]]"),r=decodeURI(cd.g.CURRENT_PAGE.getUrl());e.isLinkBeingCopied=!0;const a=x(o),c="".concat(mw.config.get("wgServer")).concat(r,"#").concat(a),l=e=>{pi(e);v.close()};let u,d,h,m;if(i){let t,n,i;try{t=yield e.getDiffLink();n=yield e.getDiffLink(!0);h=yield e.generateDiffView()}catch(e){if(e instanceof CdError){const{type:t}=e.data;if("network"===t)i=cd.s("cld-diff-error-network");else i=cd.s("cld-diff-error")}else{i=cd.s("cld-diff-error-unknown");console.warn(e)}}u=ni({value:t||i,disabled:!t,label:cd.s("cld-diff"),copyCallback:l});d=ni({value:n||i,disabled:!n,label:cd.s("cld-shortdiff"),copyCallback:l});if(M("mediawiki.diff.styles")){e.isLinkBeingCopied=!1;return}yield mw.loader.using("mediawiki.diff.styles")}if(i)m=cd.s("cld-help-onlycd");const f=ni({value:s,disabled:!s,label:cd.s("cld-wikilink"),copyCallback:l,help:m}),p=ni({value:"[[#".concat(o,"]]"),label:cd.s("cld-currentpagewikilink"),copyCallback:l}),g=ni({value:c,label:cd.s("cld-link"),copyCallback:l,help:m}),b=$("<input>").addClass("cd-hidden"),y=$("<div>").append([null===(t=u)||void 0===t?void 0:t.$element,null===(n=d)||void 0===n?void 0:n.$element,h,f.$element,p.$element,g.$element]);y.children().first().prepend(b);const v=new OO.ui.MessageDialog({classes:["cd-copyLinkDialog"]});cd.g.windowManager.addWindows([v]);cd.g.windowManager.openWindow(v,{message:y,actions:[{label:cd.s("cld-close"),action:"close"}],size:i?"larger":"large"}).closed.then(()=>{e.isLinkBeingCopied=!1})}))).apply(this,arguments)}function yi(e){const t=e.map(e=>{let t=void 0!==e.headline?"".concat(cd.s("rd-headline"),": ").concat(e.headline,"\n\n"):"";t+="".concat(cd.s("rd-comment"),": ").concat(e.comment,"\n\n").concat(cd.s("rd-summary"),": ").concat(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:cd.s("rd-intro")}),o=new OO.ui.MessageDialog;cd.g.windowManager.addWindows([o]);cd.g.windowManager.openWindow(o,{message:i.$element,actions:[{label:cd.s("rd-close"),action:"close"}],size:"large"})}function vi(e,t){return wi.apply(this,arguments)}function wi(){return(wi=o()((function*(e,t){const n=$("<span>").addClass("cd-destructiveText").text(t?cd.s("deadanchor-comment-title"):cd.s("deadanchor-section-title"));let i=t?cd.s("deadanchor-comment-text"):cd.s("deadanchor-section-text");if(cd.g.CURRENT_PAGE.canHaveArchives()){i+=" "+cd.s("deadanchor-searchinarchive");if(yield OO.ui.confirm(i,{title:n})){let n;if(t)n=cd.util.formatDate(t);else n=e.replace(/_/g," ").replace(/"/g,"").trim();const i=cd.g.CURRENT_PAGE.getArchivePrefix(),o='"'.concat(n,'" prefix:').concat(i),s=mw.util.getUrl("Special:Search",{profile:"default",fulltext:"Search",search:o,cdcomment:t&&e});location.assign(mw.config.get("wgServer")+s)}}else OO.ui.alert(i,{title:n})}))).apply(this,arguments)}let Ei=Promise.resolve();var Ci={watch(e,t){const n=function(){var n=o()((function*(){try{yield ce()}catch(e){mw.notify(cd.s("section-watch-error-load"),{type:"error"});throw e}if(!cd.g.thisPageWatchedSections.includes(e))cd.g.thisPageWatchedSections.push(e);if(t&&cd.g.thisPageWatchedSections.includes(t))cd.g.thisPageWatchedSections.splice(cd.g.thisPageWatchedSections.indexOf(t),1);try{yield ue()}catch(e){if(e instanceof CdError){const{type:t,code:n}=e.data;if("internal"===t&&"sizeLimit"===n){const e=cd.util.wrap(cd.sParse("section-watch-error-maxsize"),{callbacks:{"cd-notification-editWatchedSections":()=>{mi()}}});mw.notify(e,{type:"error",autoHideSeconds:"long"})}else mw.notify(cd.s("section-watch-error-save"),{type:"error"})}else mw.notify(cd.s("section-watch-error-save"),{type:"error"});throw e}}));return function(){return n.apply(this,arguments)}}();Ei=Ei.then(n,n);return Ei},unwatch(e){const t=function(){var t=o()((function*(){try{yield ce()}catch(e){mw.notify(cd.s("section-watch-error-load"),{type:"error"});throw e}if(cd.g.thisPageWatchedSections.includes(e))cd.g.thisPageWatchedSections.splice(cd.g.thisPageWatchedSections.indexOf(e),1);if(!cd.g.thisPageWatchedSections.length)delete cd.g.watchedSections[mw.config.get("wgArticleId")];try{yield ue()}catch(e){mw.notify(cd.s("section-watch-error-save"),{type:"error"});throw e}}));return function(){return t.apply(this,arguments)}}();Ei=Ei.then(t,t);return Ei},getByAnchor(e){if(!cd.sections||!e)return null;else return cd.sections.find(t=>t.anchor===e)||null},getByHeadline:e=>cd.sections.filter(t=>t.headline===e),search({id:e,headline:t,anchor:n,parentTree:i,firstCommentAnchor:o},s){const r=[];cd.sections.some(s=>{var a;const c=s.id===e,l=s.headline===t,u=s.anchor===n;let d;if(i){d=j(s.getParentTree().map(e=>e.headline),i)}else d=.25;const h=1*l+1*d+1*((null===(a=s.comments[0])||void 0===a?void 0:a.anchor)===o)+.5*u+.001*c;if(h>=2)r.push({section:s,score:h});return h>=3.5});let a;r.forEach(e=>{if(!a||e.score>a.score)a=e});if(s)return a||null;else return a?a.section:null},adjust(){cd.sections.forEach((e,t)=>{e.isLastSection=t===cd.sections.length-1;if(e.isActionable){var n,i;const o=cd.sections.slice(t+1).find(t=>t.level===e.level);if(2===e.elements.length&&(null===(n=cd.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)}))||o&&o.headingNestingLevel!==e.headingNestingLevel)e.$heading.find(".cd-sectionLink-addSubsection").parent().remove();else e.addAddSubsectionButton();const s=e.elements[1]===e.lastElementInFirstChunk&&(null===(i=cd.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.sections[t+1]&&cd.sections[t+1].headingNestingLevel!==e.headingNestingLevel))e.addReplyButton()}});cd.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.$replyButtonLink)n.$replyButtonLink.on("mouseenter",e.replyButtonHoverHandler).on("mouseleave",e.replyButtonUnhoverHandler)})},addNewCommentsNotifications(e){$(".cd-refreshButtonContainer").remove();e.forEach((e,t)=>{if(!t||"string"==typeof t)return;const n=e.map(e=>e.author).filter(p),i=n.map(e=>e.getGender());let o;if(i.every(e=>"female"===e))o="female";else if(i.every(e=>"female"!==e))o="male";else o="unknown";const s=n.map(e=>e.name).join(", "),r=new OO.ui.ButtonWidget({label:cd.s("section-newcomments",e.length,n.length,s,o),framed:!1,classes:["cd-button","cd-sectionButton"]});r.on("click",()=>{un({commentAnchor:e[0].anchor})});let a;if(t.$addSubsectionButtonContainer&&!t.getChildren().length)a=t.$addSubsectionButtonContainer;else if(t.$replyButton)a=t.$replyButton.closest("ul, ol, dl");else a=t.$elements[t.$elements.length-1];$("<div>").addClass("cd-refreshButtonContainer").addClass("cd-sectionButtonContainer").append(r.$element).insertAfter(a)})},cleanUpWatched(){if(!cd.sections)return;const e=cd.g.thisPageWatchedSections.length;cd.g.originalThisPageWatchedSections=cd.g.thisPageWatchedSections.slice();cd.g.thisPageWatchedSections=cd.g.thisPageWatchedSections.filter(e=>cd.sections.some(t=>t.headline===e));cd.g.watchedSections[mw.config.get("wgArticleId")]=cd.g.thisPageWatchedSections;if(cd.g.thisPageWatchedSections.length!==e)ue()}};class Section_Section extends class{constructor(e,t){this.parser=e;this.headlineElement=this.parser.context.getElementByClassName(t,"mw-headline");if(!this.headlineElement)throw new CdError;this.anchor=this.headlineElement.getAttribute("id");this.parseHeadline();const n=t.tagName.match(/^H([1-6])$/);this.level=n&&Number(n[1]);const i=new TreeWalker(cd.g.rootElement,e=>!["STYLE","LINK"].includes(e.tagName)&&!e.classList.contains("cd-sectionButtonContainer"),!0,t);this.headingNestingLevel=0;for(;i.parentNode();)this.headingNestingLevel++;i.currentNode=t;const o=[t],s=new RegExp("^H[1-".concat(this.level,"]$"));let r,a,c=!1;for(;i.nextSibling()&&!s.test(i.currentNode.tagName);){if(void 0===this.lastElementInFirstChunk&&/^H[2-6]$/.test(i.currentNode.tagName)){c=!0;this.lastElementInFirstChunk=o[o.length-1]}o.push(i.currentNode)}this.lastElementInFirstChunk=this.lastElementInFirstChunk||o[o.length-1];if(o[1]){i.currentNode=o[o.length-1];for(;i.lastChild(););const e=i.currentNode;i.currentNode=o[1];do{if(i.currentNode.classList.contains("cd-commentPart"))r=i.currentNode}while(!r&&i.currentNode!==e&&i.nextNode());i.currentNode=e;do{if(i.currentNode.classList.contains("cd-commentPart"))a=i.currentNode}while(!a&&i.currentNode!==o[1]&&i.previousNode())}if(r){const e=Number(r.getAttribute("data-comment-id")),t=Number(a.getAttribute("data-comment-id"));this.comments=cd.comments.slice(e,t+1);if(c){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[0].followsHeading=!0}this.id=cd.sections.length;this.comments=this.comments||[];this.commentsInFirstChunk=this.commentsInFirstChunk||this.comments;this.elements=o}parseHeadline(){const e=["mw-headline-number",...cd.config.foreignElementsInHeadlinesClasses],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.sections.slice(0,this.id).reverse().find(e=>e.level<this.level)||null}getParentTree(){if(!this.cachedParentTree){this.cachedParentTree=[];let e=this;for(;e=e.getParent(!1);)this.cachedParentTree.push(e)}return this.cachedParentTree}}{constructor(e,t,n){super(e,t);this.elementPrototypes=cd.g.SECTION_ELEMENT_PROTOTYPES;this.$headline=$(this.headlineElement);this.sourcePage=cd.g.CURRENT_PAGE;this.editSectionElement=t.querySelector(".mw-editsection");if(this.editSectionElement){var i,o;this.closingBracketElement=this.editSectionElement.lastElementChild;if(!(null===(i=this.closingBracketElement)||void 0===i?void 0:null===(o=i.classList)||void 0===o?void 0:o.contains("mw-editsection-bracket")))this.closingBracketElement=null;const e=this.editSectionElement.querySelector("a[href]");if(e){this.editUrl=new mw.Uri(e.getAttribute("href"));if(this.editUrl){if(this.editUrl.query.section.startsWith("T-"))this.sourcePage=new Page_Page(this.editUrl.query.title)}}else console.error("Edit link not found.",this)}this.$heading=$(t);this.isActionable=cd.g.isPageActive&&!cd.g.closedDiscussionElements.some(e=>e.contains(t));if(this.isActionable)this.extendSectionMenu(n)}addReplyButton(){const e=this.elementPrototypes.replyButton.cloneNode(!0);e.firstChild.onclick=()=>{this.addReply()};const t="OL"===this.lastElementInFirstChunk.tagName&&1===this.lastElementInFirstChunk.childElementCount&&this.lastElementInFirstChunk.children[0].classList.contains("mw-empty-elt");let n,i=!1;if(this.lastElementInFirstChunk.classList.contains("cd-commentLevel")){const e=this.lastElementInFirstChunk.tagName;if("UL"===e||"OL"===e&&(1===this.lastElementInFirstChunk.querySelectorAll("ol > li").length||this.lastElementInFirstChunk.querySelectorAll("ol > li > .cd-signature").length>1))n="li";else if("DL"===e)n="dd";else{n="li";i=!0}}else{n="li";if(!t)i=!0}const o=document.createElement(n);o.className="cd-replyWrapper";o.appendChild(e);let s;if(i){s=document.createElement("ul");s.className="cd-commentLevel cd-sectionButtonContainer";s.appendChild(o);this.lastElementInFirstChunk.parentNode.insertBefore(s,this.lastElementInFirstChunk.nextElementSibling)}else this.lastElementInFirstChunk.appendChild(o);this.$replyButton=$(e);this.$replyButtonLink=$(e.firstChild);this.$replyWrapper=$(o);this.$replyContainer=s&&$(s)}addAddSubsectionButton(){if(2!==this.level)return;const e=this.elementPrototypes.addSubsectionButton.cloneNode(!0),t=e.querySelector(".oo-ui-labelElement-label");if(!t)return;t.innerHTML="";t.appendChild(document.createTextNode(cd.s("section-addsubsection-to",this.headline)));e.firstChild.onclick=()=>{this.addSubsection()};const n=document.createElement("div");n.className="cd-sectionButtonContainer cd-addSubsectionButtonContainer";n.style.display="none";n.appendChild(e);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)};e.firstChild.onmouseenter=()=>{clearTimeout(o);o=null};e.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=$(e);this.$addSubsectionButtonContainer=$(n)}extendSectionMenu(e){if(this.comments.length&&this.comments[0].isOpeningSection&&this.comments[0].openingSectionOfLevel===this.level&&(this.comments[0].isOwn||cd.settings.allowEditOthersComments)&&this.comments[0].isActionable)this.addMenuItem({label:cd.s("sm-editopeningcomment"),tooltip:cd.s("sm-editopeningcomment-tooltip"),func:()=>{this.comments[0].edit()},class:"cd-sectionLink-editOpeningComment"});if(this.level>=2&&6!==this.level)this.addMenuItem({label:cd.s("sm-addsubsection"),tooltip:cd.s("sm-addsubsection-tooltip"),func:()=>{this.addSubsection()},class:"cd-sectionLink-addSubsection"});if(2===this.level)this.addMenuItem({label:cd.s("sm-move"),tooltip:cd.s("sm-move-tooltip"),func:()=>{this.move()},class:"cd-sectionLink-moveSection"});if(e)e.then(()=>{this.isWatched=cd.g.thisPageWatchedSections.includes(this.headline);this.addMenuItem({label:cd.s("sm-unwatch"),tooltip:cd.s("sm-unwatch-tooltip"),func:()=>{this.unwatch()},class:"cd-sectionLink-unwatch",visible:this.isWatched});this.addMenuItem({label:cd.s("sm-watch"),tooltip:cd.s("sm-watch-tooltip"),func:()=>{this.watch()},class:"cd-sectionLink-watch",visible:!this.isWatched})},()=>{}).finally(()=>{if(this.headline)this.addMenuItem({label:cd.s("sm-copylink"),func:this.copyLink.bind(this),class:"cd-sectionLink-copyLink",tooltip:cd.s("sm-copylink-tooltip"),href:"".concat(cd.g.CURRENT_PAGE.getUrl(),"#").concat(this.anchor)});mw.hook("convenientDiscussions.sectionMenuExtended").fire(this)})}addReply(e){if(!this.addReplyForm)this.addReplyForm=e instanceof CommentForm_CommentForm?e:new CommentForm_CommentForm({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.addSubsectionForm){this.addSubsectionForm.$element.cdScrollIntoView("center");this.addSubsectionForm.headlineInput.focus()}else this.addSubsectionForm=e instanceof CommentForm_CommentForm?e:new CommentForm_CommentForm({mode:"addSubsection",target:this,dataToRestore:e})}move(){function e(){e.parent.call(this)}OO.inheritClass(e,OO.ui.ProcessDialog);e.static.name="moveSectionDialog";e.static.title=cd.s("msd-title");e.static.actions=[{action:"close",modes:["move","reload"],flags:["safe","close"],disabled:!0},{action:"move",modes:["move"],label:cd.s("msd-move"),flags:["primary","progressive"],disabled:!0},{action:"reload",modes:["reload"],label:cd.s("msd-reload"),flags:["primary","progressive"]}];e.prototype.onTitleInputChange=o()((function*(){let e=!0;try{yield this.titleInput.getValidity()}catch(t){e=!1}this.actions.setAbilities({move:e})}));e.prototype.loadSourcePage=o()((function*(){try{yield n.getSourcePage().getCode(!1)}catch(e){if(e instanceof CdError){const{type:t,code:n}=e.data;if("api"===t)if("missing"===n)throw[cd.sParse("msd-error-sourcepagedeleted"),!0];else throw[cd.sParse("error-api",n),!0];else if("network"===t)throw[cd.sParse("error-network"),!0]}else throw[cd.sParse("error-javascript"),!1]}try{n.locateInCode()}catch(e){if(e instanceof CdError){const{code:t}=e.data;let n;if("locateSection"===t)n=cd.sParse("error-locatesection");else n=cd.sParse("error-unknown");throw[n,!0]}else throw[cd.sParse("error-javascript"),!1]}return{page:n.getSourcePage(),sectionInCode:n.inCode,sectionWikilink:"".concat(n.getSourcePage().name,"#").concat(Xe(n.headline))}}));e.prototype.loadTargetPage=function(){var e=o()((function*(e){try{yield e.getCode()}catch(e){if(e instanceof CdError){const{type:t,code:n}=e.data;if("api"===t)if("invalid"===n)throw[cd.sParse("msd-error-invalidpagename"),!1];else throw[cd.sParse("error-api",n),!0];else if("network"===t)throw[cd.sParse("error-network"),!0]}else throw[cd.sParse("error-javascript"),!1]}e.analyzeNewTopicPlacement();return{page:e,sectionWikilink:"".concat(e.realName,"#").concat(Xe(n.headline))}}));return function(t){return e.apply(this,arguments)}}();e.prototype.editTargetPage=function(){var e=o()((function*(e,t){let i,o;if(cd.config.getMoveTargetPageCode&&this.keepLinkCheckbox.isSelected()){const t=cd.config.getMoveTargetPageCode(e.sectionWikilink,cd.g.CURRENT_USER_SIGNATURE);if(Array.isArray(t)){i=t[0]+"\n";o="\n"+t[1]}else{i=t;o=""}}else{i="";o=""}const s=tt(e.sectionInCode.code.slice(0,e.sectionInCode.relativeContentStartIndex)+i+e.sectionInCode.code.slice(e.sectionInCode.relativeContentStartIndex)+o);let r;if(t.page.areNewTopicsOnTop){if(void 0===t.page.firstSectionStartIndex)t.page.firstSectionStartIndex=t.page.code.length;r=tt(t.page.code.slice(0,t.page.firstSectionStartIndex))+s+t.page.code.slice(t.page.firstSectionStartIndex)}else r=t.page.code+(t.page.code?"\n\n":"")+s;const a=this.summaryEndingInput.getValue(),c=cd.s("es-move-from",e.sectionWikilink)+(a?cd.mws("colon-separator")+a:"");try{yield t.page.edit({text:r,summary:cd.util.buildEditSummary({text:c,section:n.headline}),tags:cd.config.tagName,baserevid:t.page.revisionId,starttimestamp:t.page.queryTimestamp})}catch(e){if(e instanceof CdError){const{type:t,details:n}=e.data;if("network"===t)throw[cd.sParse("msd-error-editingtargetpage")+" "+cd.sParse("error-network"),!0];else{let{code:e,message:t,logMessage:i}=n;if("editconflict"===e)t+=" "+cd.sParse("msd-error-editconflict-retry");console.warn(i);throw[cd.sParse("msd-error-editingtargetpage")+" "+t,!0]}}else{console.warn(e);throw[cd.sParse("msd-error-editingtargetpage")+" "+cd.sParse("error-javascript"),!0]}}}));return function(t,n){return e.apply(this,arguments)}}();e.prototype.editSourcePage=function(){var e=o()((function*(e,t){const i=Ve(e.sectionInCode.code)||cd.g.SIGN_CODE+"~";let o;if(cd.config.getMoveSourcePageCode&&this.keepLinkCheckbox.isSelected()){const n=cd.config.getMoveSourcePageCode(t.sectionWikilink,cd.g.CURRENT_USER_SIGNATURE,i);o=e.sectionInCode.code.slice(0,e.sectionInCode.relativeContentStartIndex)+n+"\n\n"}else o="";const s=e.page.code.slice(0,e.sectionInCode.startIndex)+o+e.page.code.slice(e.sectionInCode.endIndex),r=this.summaryEndingInput.getValue(),a=cd.s("es-move-to",t.sectionWikilink)+(r?cd.mws("colon-separator")+r:"");try{yield e.page.edit({text:s,summary:cd.util.buildEditSummary({text:a,section:n.headline}),tags:cd.config.tagName,baserevid:e.page.revisionId,starttimestamp:e.page.queryTimestamp})}catch(e){if(e instanceof CdError){const{type:t,details:n}=e.data;if("network"===t)throw[cd.sParse("msd-error-editingsourcepage")+" "+cd.sParse("error-network"),!1];else{let{message:e,logMessage:t}=n;console.warn(t);throw[cd.sParse("msd-error-editingsourcepage")+" "+e,!1]}}else{console.warn(e);throw[cd.sParse("msd-error-editingsourcepage")+" "+cd.sParse("error-javascript"),!1]}}}));return function(t,n){return e.apply(this,arguments)}}();e.prototype.abort=function(e,t){const n=cd.util.wrap(e,{callbacks:{"cd-message-reloadPage":()=>{this.close();un()}}}),i=new OO.ui.Error(n,{recoverable:t});this.showErrors(i);this.$errors.find(".oo-ui-buttonElement-button").on("click",()=>{if(t)cd.g.windowManager.updateWindowSize(this);else this.close()});this.actions.setAbilities({close:!0,move:t});cd.g.windowManager.updateWindowSize(this);this.popPending()};e.prototype.getBodyHeight=function(){return this.$errorItems?this.$errors.get(0).scrollHeight:this.$body.get(0).scrollHeight};e.prototype.initialize=function(){e.parent.prototype.initialize.apply(this,arguments);this.pushPending();const t=$("<div>").text(cd.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.reloadPanel=new OO.ui.PanelLayout({padded:!0,expanded:!1});this.stackLayout=new OO.ui.StackLayout({items:[this.loadingPanel,this.movePanel,this.reloadPanel]});this.$body.append(this.stackLayout.$element)};e.prototype.getSetupProcess=function(t){return e.parent.prototype.getSetupProcess.call(this,t).next(()=>{this.stackLayout.setItem(this.loadingPanel);this.actions.setMode("move")})};e.prototype.getReadyProcess=function(i){var s=this;return e.parent.prototype.getReadyProcess.call(this,i).next(o()((function*(){var e;try{yield Promise.all(t)}catch(e){s.abort(cd.sParse("cf-error-getpagecode"),!1);return}try{n.locateInCode()}catch(e){if(e instanceof CdError){const{data:t}=e.data,n="locateSection"===t?cd.sParse("error-locatesection"):cd.sParse("error-unknown");s.abort(n,!1)}else s.abort(cd.sParse("error-javascript"),!1);return}const i=n.inCode.code;s.titleInput=new mw.widgets.TitleInputWidget({$overlay:s.$overlay,excludeCurrentPage:!0,showMissing:!1,validate:()=>{const e=s.titleInput.getMWTitle(),t=e&&new Page_Page(e);return t&&t.name!==n.getSourcePage().name&&t.isProbablyTalkPage()}});s.titleField=new OO.ui.FieldLayout(s.titleInput,{label:cd.s("msd-targetpage"),align:"top"});s.titleInput.connect(s,{change:"onTitleInputChange"});s.titleInput.connect(s,{enter:()=>{if(!s.actions.get({actions:"move"})[0].isDisabled())s.executeAction("move")}});if(cd.config.getMoveSourcePageCode||cd.config.getMoveTargetPageCode)[s.keepLinkField,s.keepLinkCheckbox]=ei({value:"keepLink",selected:!0,label:cd.s("msd-keeplink")});const o=$("<div>"),r=i.slice(0,300)+(i.length>=300?"...":"");$("<pre>").addClass("cd-moveSectionDialog-code").text(r).appendTo(o);$("<p>").addClass("cd-moveSectionDialog-codeNote").text(cd.s("msd-bottom")).appendTo(o);s.summaryEndingInput=new OO.ui.TextInputWidget({maxLength:250});s.summaryEndingAutocomplete=new Autocomplete_Autocomplete({types:["mentions","wikilinks"],inputs:[s.summaryEndingInput]});s.summaryEndingField=new OO.ui.FieldLayout(s.summaryEndingInput,{label:cd.s("msd-summaryending"),align:"top"});s.movePanel.$element.append([s.titleField.$element,null===(e=s.keepLinkField)||void 0===e?void 0:e.$element,o,s.summaryEndingField.$element].filter(C));s.stackLayout.setItem(s.movePanel);s.titleInput.focus();s.actions.setAbilities({close:!0});s.$body.css("overflow","hidden");setTimeout(()=>{s.$body.css("overflow","")},500);cd.g.windowManager.updateWindowSize(s);s.popPending()})))};e.prototype.getActionProcess=function(t){var i=this;if("move"===t)return new OO.ui.Process(o()((function*(){i.pushPending();i.titleInput.$input.blur();let e,t,o=new Page_Page(i.titleInput.getMWTitle());if(o.name!==n.getSourcePage().name&&o.isProbablyTalkPage()){try{[e,t]=yield Promise.all([i.loadSourcePage(),i.loadTargetPage(o)]);yield i.editTargetPage(e,t);yield i.editSourcePage(e,t)}catch(e){i.abort(...e);return}i.reloadPanel.$element.append(cd.util.wrap(cd.sParse("msd-moved",t.sectionWikilink),{tagName:"div"}));i.stackLayout.setItem(i.reloadPanel);i.actions.setMode("reload");i.popPending()}else i.abort(cd.sParse("msd-error-wrongpage"),!1)})));else if("reload"===t)return new OO.ui.Process(()=>{this.close({action:t});un({sectionAnchor:n.anchor})});else if("close"===t)return new OO.ui.Process(()=>{this.close()});return e.parent.prototype.getActionProcess.call(this,t)};if(M("mediawiki.widgets"))return;const t=[this.getSourcePage().getCode(),mw.loader.using("mediawiki.widgets")],n=this,i=new e;cd.g.windowManager.addWindows([i]);cd.g.windowManager.openWindow(i)}updateWatchMenuItems(){if(this.isWatched){this.$heading.find(".cd-sectionLink-unwatch").parent().show();this.$heading.find(".cd-sectionLink-watch").parent().hide()}else{this.$heading.find(".cd-sectionLink-watch").parent().show();this.$heading.find(".cd-sectionLink-unwatch").parent().hide()}}watch(e=!1,t){const n=Section_Section.getByHeadline(this.headline);let i,o;if(!e){i=$(n.map(e=>e.$heading.find(".cd-sectionLink-watch").get(0)));if(i.hasClass("cd-link-pending"))return;else i.addClass("cd-link-pending")}if(t&&!Section_Section.getByHeadline(t).length)o=t;Section_Section.watch(this.headline,o).finally(()=>{if(i)i.removeClass("cd-link-pending")}).then(()=>{n.forEach(e=>{e.isWatched=!0;e.updateWatchMenuItems();e.updateTocLink()});if(!e){let e,t=cd.sParse("section-watch-success",this.headline);if($("#ca-watch").length){t+=" "+cd.sParse("section-watch-pagenotwatched");e="long"}mw.notify(cd.util.wrap(t),{autoHideSeconds:e})}},()=>{})}unwatch(e=!1){const t=Section_Section.getByHeadline(this.headline);let n;if(!e){n=$(t.map(e=>e.$heading.find(".cd-sectionLink-unwatch").get(0)));if(n.hasClass("cd-link-pending"))return;else n.addClass("cd-link-pending")}Section_Section.unwatch(this.headline).finally(()=>{if(n)n.removeClass("cd-link-pending")}).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.sParse("section-unwatch-success",this.headline);if(i){t+=" "+cd.sParse("section-unwatch-stillwatched",i);e="long"}mw.notify(cd.util.wrap(t),{autoHideSeconds:e})}},()=>{})}copyLink(e){e.preventDefault();gi(this)}locateInCode(){this.inCode=null;let e;this.searchInCode(this.getSourcePage().code).forEach(t=>{if(!e||t.score>e.score)e=t});if(!e)throw new CdError({type:"parse",code:"locateSection"});this.inCode=e}modifyCode({pageCode:e,action:t,commentForm:n}){if("replyInSection"===t){const[,e]=this.inCode.firstChunkCode.match(/\n([#*]) *\n+$/)||[];if(e)this.inCode.lastCommentIndentationChars=e;else{const e=this.comments[this.comments.length-1];if(e&&("ol"===n.containerListType||"mimic"===cd.config.indentationCharMode))try{e.locateInCode()}finally{if(e.inCode&&(!e.inCode.indentationChars.startsWith("#")||"ol"===n.containerListType))this.inCode.lastCommentIndentationChars=e.inCode.indentationChars}}}let i,o,s;if(!i&&n)({commentCode:i}=n.commentTextToCode("submit"));switch(t){case"replyInSection":s=e.slice(0,this.inCode.firstChunkContentEndIndex);o=s+i+e.slice(this.inCode.firstChunkContentEndIndex);break;case"addSubsection":s=tt(e.slice(0,this.inCode.contentEndIndex));o=s+i+e.slice(this.inCode.contentEndIndex).trim();break}return{newPageCode:o,codeBeforeInsertion:s,commentCode:i}}getClosestWatchedSection(e=!1){for(let t=e?this:this.getParent();t;t=t.getParent())if(t.isWatched)return t;return null}getCode(){var e=this;return o()((function*(){try{yield e.getSourcePage().getCode();e.locateInCode()}catch(e){if(e instanceof CdError)throw new CdError(Object.assign({},{message:cd.s("cf-error-getpagecode")},e.data));else throw e}}))()}addMenuItem({label:e,href:t,func:n,class:i,tooltip:o,visible:s=!0}){if(this.closingBracketElement){const r=document.createElement("span");r.className="cd-sectionLinkWrapper";if(!s)r.style.display="none";const a=document.createElement("a");a.textContent=e;if(t)a.href=t;if(n)a.onclick=n;a.className="cd-sectionLink";if(i)a.className+=" "+i;if(o)a.title=o;r.appendChild(a);this.editSectionElement.insertBefore(r,this.closingBracketElement)}}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()}searchInCode(e){const t=this.comments[0],n=Ke(this.headline),i=Ge(e),o=/^((=+)(.*)\2[ \t\x01\x02]*)\n/gm,s=[],r=[];let a,c=0;for(;a=o.exec(i);){const o=Ke(ze(a[3])),l=o===n;let u=3;const d=r.slice(-u).reverse(),h=cd.sections.slice(Math.max(0,this.id-u),this.id).reverse().map(e=>e.headline).every((e,t)=>Ke(e)===d[t]);r.push(o);const m=this.id===c;c++;const f=a[1],p=a[2],g="={1,".concat(p.length,"}"),b=e.slice(a.index),y=i.slice(a.index),v=y.match(new RegExp("("+mw.util.escapeRegExp(f)+"[^]*?\\n)"+g+"[^=].*=+[ \\t\\x01\\x02]*\\n"))||b.match(new RegExp("("+mw.util.escapeRegExp(f)+"[^]*$)")),w=y.match(new RegExp("("+mw.util.escapeRegExp(f)+"[^]*?\\n)\\n*={1,6}[^=].*=+[ \\t\\x01\\x02]*\n"))||b.match(new RegExp("("+mw.util.escapeRegExp(f)+"[^]*$)")),E=v&&b.substr(v.index,v[1].length),C=w&&b.substr(w.index,w[1].length);if(!E||!C){console.log("Couldn't read the \"".concat(o,'" section contents.'));continue}const _=Je(E);let T;if(_.length)T=Boolean(t)&&(_[0].timestamp===t.timestamp||_[0].author===t.author);else T=!this.comments.length;const A=1*l+1*T+.5*m+.25*h;if(A<=1)continue;const x=a.index,S=x+E.length,k=a.index+a[0].length,N=x+C.length,P=k-x;let O=N,I=S;cd.config.keepInSectionEnding.forEach(e=>{const t=C.match(e);if(t)O-=t[0].length-1;const n=E.match(e);if(n)I-=n[0].length-1});const F=C.match(/\n([#*] *\n+)$/);if(F)O-=F[1].length;s.push({hasHeadlineMatched:l,hasFirstCommentMatched:T,hasSectionIndexMatched:m,havePreviousHeadlinesMatched:h,score:A,startIndex:x,endIndex:S,code:E,contentStartIndex:k,contentEndIndex:I,relativeContentStartIndex:P,firstChunkEndIndex:N,firstChunkContentEndIndex:O,firstChunkCode:C});if(2.75===A)break}return s}getSourcePage(){return this.sourcePage}getBase(){if(this.level<=2)return this;else return cd.sections.slice(0,this.id).reverse().find(e=>2===e.level)||this}getChildren(e=!1){const t=[];let n=!1;cd.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}getTocItem(){return gn.getItem(this.anchor)||null}updateTocLink(){if(!cd.settings.modifyToc)return;const e=this.getTocItem();if(e)if(this.isWatched)e.$link.addClass("cd-toc-watched").attr("title",cd.s("toc-watched"));else e.$link.removeClass("cd-toc-watched").removeAttr("title")}}Object.assign(Section_Section,Ci);let _i=0;class CommentForm_CommentForm{constructor({mode:e,target:t,dataToRestore:n,preloadConfig:i,isNewTopicOnTop:o}){this.mode=e;this.setTargets(t);this.preloadConfig=i;this.isNewTopicOnTop=o;if(this.target instanceof Comment_Comment){var s;this.sectionHeadline=null===(s=this.target.getSection())||void 0===s?void 0:s.headline}else if(this.target instanceof Section_Section)this.sectionHeadline=this.target.headline;this.id=_i++;this.isSummaryAltered=n?n.isSummaryAltered:!1;if("addSection"===this.mode){var r;const e=cd.g.CURRENT_PAGE.title.replace(/\//g,"-");let t='<div class="cd-editnotice">'+"{{MediaWiki:Editnotice-".concat(cd.g.CURRENT_NAMESPACE_NUMBER,"}}")+'</div>\n<div class="cd-editnotice">'+"{{MediaWiki:Editnotice-".concat(cd.g.CURRENT_NAMESPACE_NUMBER,"-").concat(e,"}}")+"</div>\n";if(null===(r=this.preloadConfig)||void 0===r?void 0:r.editIntro)t='<div class="cd-editintro">{{'.concat(this.preloadConfig.editIntro,"}}</div>\n")+t;pe(t,{title:cd.g.CURRENT_PAGE.name}).then(e=>{const t=mw.config.get("wgFormattedNamespaces")[8];this.$messageArea.append(e.html).cdAddCloseButton().find('.cd-editnotice > a.new[title^="'.concat(t,':Editnotice-"]')).parent().remove();this.$messageArea.find(".mw-charinsert-item").each((e,t)=>{const n=$(t),i=n.data("mw-charinsert-start"),o=n.data("mw-charinsert-end");n.on("click",()=>{this.encapsulateSelection({pre:i,post:o})}).data("mw-charinsert-done",!0)});mw.hook("wikipage.content").fire(this.$messageArea)})}this.createContents(n);this.addEvents();this.initAutocomplete();D();this.addToPage();this.operations=[];cd.commentForms.push(this);L();Vn.updateCommentFormButton();if(n){this.originalComment=n.originalComment;this.originalHeadline=n.originalHeadline;if(n.lastFocused)this.lastFocused=new Date(n.lastFocused)}else{this.$element.cdScrollIntoView("center",!0,()=>{this[this.headlineInput?"headlineInput":"commentInput"].focus()});if("edit"===this.mode){const e=this.registerOperation({type:"load"});this.target.getCode(!0).then(()=>{let t=this.target.codeToText();if(this.target.inCode.inSmallFont)t="<small>".concat(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);this.commentInput.focus();this.preview()},t=>{if(t instanceof CdError){const n=Object.assign({},t.data,{cancel:!0,currentOperation:e});this.handleError(n)}else this.handleError({type:"javascript",logMessage:t,cancel:!0,currentOperation:e})})}else{var a;if(null===(a=this.preloadConfig)||void 0===a?void 0:a.commentTemplate){const e=this.registerOperation({type:"load",affectHeadline:!1}),t=new Page_Page(this.preloadConfig.commentTemplate);t.getCode().then(()=>{let n=t.code;const i=/<onlyinclude(?: [\w ]+(?:=[^<>]+?)?| ?\/?)>([^]*?)<\/onlyinclude(?: \w+)? ?>/g;let o,s;for(;o=i.exec(n);){if(void 0===s)s="";s+=o[1]}if(void 0!==s)n=s;n=n.replace(/<includeonly(?: [\w ]+(?:=[^<>]+?)?| ?\/?)>([^]*?)<\/includeonly(?: \w+)? ?>/g,"$1").replace(/<noinclude(?: [\w ]+(?:=[^<>]+?)?| ?\/?)>([^]*?)<\/noinclude(?: \w+)? ?>/g,"");n=n.trim();if(n.includes(cd.g.SIGN_CODE)||this.preloadConfig.omitSignature)this.omitSignatureCheckbox.setSelected(!0);this.commentInput.setValue(n);this.originalComment=n;this.closeOperation(e);this.preview()},t=>{if(t instanceof CdError){const n=Object.assign({},t.data,{cancel:!0,currentOperation:e});this.handleError(n)}else this.handleError({type:"javascript",logMessage:t,cancel:!0,currentOperation:e})})}else this.originalComment="";if(this.headlineInput){var c,l;this.headlineInput.setValue((null===(c=this.preloadConfig)||void 0===c?void 0:c.headline)||"");this.originalHeadline=(null===(l=this.preloadConfig)||void 0===l?void 0:l.headline)||""}if(!(this.target instanceof Page_Page))this.checkCode()}}mw.hook("convenientDiscussions.commentFormCreated").fire(this)}checkCode(){if(!this.checkCodeRequest)this.checkCodeRequest=this.target.getCode(this).catch(e=>{if(e instanceof CdError){const t=Object.assign({},e.data);this.handleError(t)}else this.handleError({type:"javascript",logMessage:e})});return this.checkCodeRequest}setTargets(e){this.target=e;if(this.target instanceof Comment_Comment){this.targetSection=this.target.getSection();this.targetComment=this.target}else if(this.target instanceof Section_Section){var t;this.targetSection=this.target;if("replyInSection"===this.mode&&!this.target.$replyButton)throw new CdError;if("addSubsection"===this.mode&&!this.targetSection.$heading.find(".cd-sectionLink-addSubsection").length)throw new CdError;if(null===(t=this.target.comments[0])||void 0===t?void 0:t.isOpeningSection)this.targetComment=this.target.comments[0]}this.targetPage=this.targetSection?this.targetSection.getSourcePage():cd.g.CURRENT_PAGE}addToolbar(e){const t=$("<div>").addClass("cd-toolbarPlaceholder").insertBefore(this.commentInput.$element);mw.loader.using(["ext.wikiEditor"].concat(e)).then(()=>{const e=this.commentInput.$input;e.wikiEditor("addModule",mw.loader.moduleRegistry["ext.wikiEditor"].packageExports["jquery.wikiEditor.toolbar.config.js"]);const n=mw.loader.moduleRegistry["ext.wikiEditor"].packageExports["jquery.wikiEditor.dialogs.config.js"];n.replaceIcons(e);e.wikiEditor("addModule",n.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=>{this.encapsulateSelection(e)},setContents:e=>{this.commentInput.select();q(this.commentInput,e)}});const i=mw.config.get("wgUserLanguage");e.wikiEditor("addToToolbar",{section:"main",group:"format",tools:{smaller:{label:cd.mws("wikieditor-toolbar-tool-small"),type:"button",icon:"/w/load.php?modules=oojs-ui.styles.icons-editing-styling&image=smaller&lang=".concat(i,"&skin=vector"),action:{type:"encapsulate",options:{pre:"<small>",peri:cd.mws("wikieditor-toolbar-tool-small-example"),post:"</small>"}}},quote:{label:"".concat(cd.s("cf-quote-tooltip")," ").concat(cd.mws("parentheses","Q".concat(cd.mws("comma-separator"),"Ctrl+Alt+Q"))),type:"button",icon:"/w/load.php?modules=oojs-ui.styles.icons-editing-advanced&image=quotes&lang=".concat(i,"&skin=vector"),action:{type:"callback",execute:()=>{this.quote()}}}}});e.wikiEditor("addToToolbar",{section:"advanced",group:"format",tools:{code:{label:cd.s("cf-code-tooltip"),type:"button",icon:"/w/load.php?modules=oojs-ui.styles.icons-editing-advanced&image=code&lang=".concat(i,"&skin=vector"),action:{type:"encapsulate",options:{pre:"<code><nowiki>",peri:cd.s("cf-code-placeholder"),post:"</".concat("nowiki></code>")}}},codeBlock:{label:cd.s("cf-codeblock-tooltip"),type:"button",icon:"/w/load.php?modules=oojs-ui.styles.icons-editing-advanced&image=markup&lang=".concat(i,"&skin=vector"),action:{type:"encapsulate",options:{pre:'<syntaxhighlight lang="">\n',peri:cd.s("cf-codeblock-placeholder"),post:"\n</syntaxhighlight>"}}},underline:{label:cd.s("cf-underline-tooltip"),type:"button",icon:"/w/load.php?modules=oojs-ui.styles.icons-editing-styling&image=underline&lang=".concat(i,"&skin=vector"),action:{type:"encapsulate",options:{pre:"<u>",peri:cd.s("cf-underline-placeholder"),post:"</u>"}}},strikethrough:{label:cd.s("cf-strikethrough-tooltip"),type:"button",icon:"/w/load.php?modules=oojs-ui.styles.icons-editing-styling&image=strikethrough&lang=".concat(i,"&skin=vector"),action:{type:"encapsulate",options:{pre:"<s>",peri:cd.s("cf-strikethrough-placeholder"),post:"</s>"}}}}});e.wikiEditor("addToToolbar",{section:"main",groups:{"convenient-discussions":{tools:{mention:{label:cd.s("cf-mention-tooltip"),type:"button",icon:"/w/load.php?modules=oojs-ui.styles.icons-user&image=userAvatar&lang=".concat(i,"&skin=vector"),action:{type:"callback",execute:()=>{}}}}}}});this.$element.find('.tool-button[rel="mention"]').off("click").on("click",e=>{this.mention(e.ctrlKey)});t.remove();this.$element.find('.tool[rel="link"] a, .tool[rel="file"] a').on("mouseup",()=>{D()}).on("click",()=>{L()});mw.hook("convenientDiscussions.commentFormToolbarReady").fire(this)})}addInsertButton(e,t){const n=[];e=I(e,/\\[+;\\]/g,n);let[,i,o]=e.match(/^(.*?)(?:\+(.*))?$/)||[];if(!i)return;o=o||"";const s=e=>e.replace(/\\([+;\\])/g,"$1");i=s(F(i,n));o=s(F(o,n));t=t?s(t):i+o;const r=$("<a>").text(t).addClass("cd-insertButtons-item").on("click",()=>{this.encapsulateSelection({pre:i,post:o})});this.$insertButtons.append(r," ")}createContents(e){var t,n,i;if(["addSection","addSubsection"].includes(this.mode))this.containerListType=null;else this.containerListType=this.target instanceof Comment_Comment?this.target.$elements.last().parent().prop("tagName").toLowerCase():this.target.$replyWrapper.parent().prop("tagName").toLowerCase();this.editingSectionOpeningComment="edit"===this.mode&&this.target.isOpeningSection;this.$element=$("<div>").addClass("cd-commentForm").addClass("cd-commentForm-".concat(this.mode)).attr("dir",cd.g.SITE_DIR);if("ol"===this.containerListType)this.$element.addClass("cd-commentForm-inNumberedList");if(this.editingSectionOpeningComment)this.$element.addClass("cd-commentForm-sectionOpeningComment");if("addSubsection"===this.mode)this.$element.addClass("cd-commentForm-addSubsection-".concat(this.target.level));this.$messageArea=$("<div>").addClass("cd-messageArea");if(["addSection","addSubsection"].includes(this.mode)&&!(null===(t=this.preloadConfig)||void 0===t?void 0:t.noHeadline)||this.editingSectionOpeningComment){if("addSubsection"===this.mode)this.headlineInputPurpose=cd.s("cf-headline-subsection",this.targetSection.headline);else if("edit"===this.mode&&this.targetSection.getParent())this.headlineInputPurpose=cd.s("cf-headline-subsection",this.targetSection.getParent().headline);else this.headlineInputPurpose=cd.s("cf-headline-topic");this.headlineInput=new OO.ui.TextInputWidget({value:e?e.headline:"",placeholder:this.headlineInputPurpose,classes:["cd-headlineInput"],tabIndex:String(this.id)+"11"})}let o,s=this.headlineInput?5:3;if("firefox"===$.client.profile().name)s-=1;if("replyInSection"===this.mode||"reply"===this.mode&&this.target.isOpeningSection)o=cd.s("cf-comment-placeholder-replytosection",this.targetSection.headline);else if("reply"===this.mode)this.target.requestAuthorGenderIfNeeded(()=>{this.commentInput.$input.attr("placeholder",S(cd.s("cf-comment-placeholder-replytocomment",this.target.author.name,this.target.author)))},!0);this.commentInput=new OO.ui.MultilineTextInputWidget({value:e?e.comment:"",placeholder:o,autosize:!0,rows:s,maxRows:30,classes:["cd-commentInput"],tabIndex:String(this.id)+"12"});this.$advanced=$("<div>").addClass("cd-commentFormAdvanced");this.summaryInput=new OO.ui.TextInputWidget({value:e?e.summary:"",maxLength:cd.g.SUMMARY_LENGTH_LIMIT,placeholder:cd.s("cf-summary-placeholder"),classes:["cd-summaryInput"],tabIndex:String(this.id)+"13"});this.summaryInput.$input.codePointLimit(cd.g.SUMMARY_LENGTH_LIMIT);mw.widgets.visibleCodePointLimit(this.summaryInput,cd.g.SUMMARY_LENGTH_LIMIT);this.updateAutoSummary(!e);this.$summaryPreview=$("<div>").addClass("cd-summaryPreview");if("edit"===this.mode)[this.minorField,this.minorCheckbox]=ei({value:"minor",selected:e?e.minor:!0,label:cd.s("cf-minor"),tabIndex:String(this.id)+"20"});const r=cd.settings.watchOnReply&&"edit"!==this.mode||$("#ca-unwatch").length||mw.user.options.get(mw.config.get("wgArticleId")?"watchdefault":"watchcreations");[this.watchField,this.watchCheckbox]=ei({value:"watch",selected:e?e.watch:r,label:cd.s("cf-watch"),tabIndex:String(this.id)+"21"});if(this.targetSection||"addSection"===this.mode){var a;const t="addSubsection"!==this.mode&&(this.targetSection&&this.targetSection.level<=2||"addSection"===this.mode),n=cd.s("cf-watchsection-"+(t?"topic":"subsection")),i=cd.settings.watchSectionOnReply&&"edit"!==this.mode||(null===(a=this.targetSection)||void 0===a?void 0:a.isWatched);[this.watchSectionField,this.watchSectionCheckbox]=ei({value:"watchSection",selected:e?e.watchSection:i,label:n,tabIndex:String(this.id)+"22",title:cd.s("cf-watchsection-tooltip")})}if(["addSection","addSubsection"].includes(this.mode))[this.omitSignatureField,this.omitSignatureCheckbox]=ei({value:"omitSignature",selected:e?e.omitSignature:!1,label:cd.s("cf-omitsignature"),tabIndex:String(this.id)+"25"});if("edit"===this.mode&&(this.target.isOpeningSection?1===this.targetSection.comments.length:!this.target.getChildren().length)){const t=e?e.delete:!1;[this.deleteField,this.deleteCheckbox]=ei({value:"delete",selected:t,label:cd.s("cf-delete"),tabIndex:String(this.id)+"26"})}this.settingsButton=new OO.ui.ButtonWidget({framed:!1,icon:"settings",label:cd.s("cf-settings-tooltip"),invisibleLabel:!0,title:cd.s("cf-settings-tooltip"),classes:["cd-button","cd-settingsButton"],tabIndex:String(this.id)+"27"});this.checkboxesLayout=new OO.ui.HorizontalLayout({classes:["cd-checkboxesContainer"],items:[this.minorField,this.watchField,this.watchSectionField,this.omitSignatureField,this.deleteField,this.settingsButton].filter(C)});this.$buttonsContainer=$("<div>").addClass("cd-buttonsContainer");this.$leftButtonsContainer=$("<div>").addClass("cd-leftButtonsContainer");this.$rightButtonsContainer=$("<div>").addClass("cd-rightButtonsContainer");let c;switch(this.mode){case"edit":c="save";break;case"addSection":c="addtopic";break;case"addSubsection":c="addsubsection";break;default:c="reply"}this.submitButtonLabelStandard=cd.s("cf-".concat(c));this.submitButtonLabelShort=cd.s("cf-".concat(c,"-short"));this.advancedButton=new OO.ui.ButtonWidget({label:cd.s("cf-advanced"),framed:!1,classes:["cd-button","cd-advancedButton"],tabIndex:String(this.id)+"30"});if(!cd.g.$popupsOverlay)cd.g.$popupsOverlay=$("<div>").addClass("cd-popupsOverlay").appendTo(document.body);this.helpPopupButton=new OO.ui.PopupButtonWidget({label:cd.s("cf-help"),framed:!1,classes:["cd-button"],popup:{head:!1,$content:cd.util.wrap(cd.sParse("cf-help-content",cd.config.mentionCharacter),{tagName:"div",targetBlank:!0}),padded:!0,align:"center",width:400},$overlay:cd.g.$popupsOverlay,tabIndex:String(this.id)+"31"});this.cancelButton=new OO.ui.ButtonWidget({label:cd.s("cf-cancel"),flags:"destructive",framed:!1,classes:["cd-button","cd-cancelButton"],tabIndex:String(this.id)+"32"});this.viewChangesButton=new OO.ui.ButtonWidget({label:cd.s("cf-viewchanges"),classes:["cd-viewChangesButton"],tabIndex:String(this.id)+"33"});this.previewButton=new OO.ui.ButtonWidget({label:cd.s("cf-preview"),classes:["cd-previewButton"],tabIndex:String(this.id)+"34"});if(cd.settings.autopreview)this.previewButton.$element.hide();this.submitButton=new OO.ui.ButtonWidget({label:this.submitButtonLabelStandard,flags:["progressive","primary"],classes:["cd-submitButton"],tabIndex:String(this.id)+"35"});if(null===(n=this.deleteCheckbox)||void 0===n?void 0:n.isSelected())this.updateFormOnDeleteCheckboxChange(!0);this.$advanced.append([this.summaryInput.$element,this.$summaryPreview,this.checkboxesLayout.$element]);this.$leftButtonsContainer.append([this.advancedButton.$element,this.helpPopupButton.$element]);this.$rightButtonsContainer.append([this.cancelButton.$element,this.viewChangesButton.$element,this.previewButton.$element,this.submitButton.$element]);this.$buttonsContainer.append(this.$leftButtonsContainer,this.$rightButtonsContainer);this.$element.append([this.$messageArea,null===(i=this.headlineInput)||void 0===i?void 0:i.$element,this.commentInput.$element,this.$advanced,this.$buttonsContainer].filter(C));if("edit"!==this.mode&&!cd.settings.alwaysExpandAdvanced)this.$advanced.hide();this.$previewArea=$("<div>").addClass("cd-previewArea");if(cd.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);const l=cd.config.customCommentFormModules.filter(e=>!e.checkFunc||e.checkFunc()).map(e=>e.name);mw.loader.using(l).then(()=>{mw.hook("convenientDiscussions.commentFormModulesReady").fire(this)});if(cd.settings.showToolbar)this.addToolbar(l);if(cd.settings.insertButtons.length){this.$insertButtons=$("<div>").addClass("cd-insertButtons").insertAfter(this.commentInput.$element);cd.settings.insertButtons.forEach(e=>{let t,n;if(Array.isArray(e)){t=e[0];n=e[1]}else t=e;this.addInsertButton(t,n)})}}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.g.$addSectionButtonContainer)cd.g.$addSectionButtonContainer.hide();if(!mw.config.get("wgArticleId"))cd.g.$root.empty();let e,t,n,i=!1;if("reply"===this.mode){i=!0;t=this.target.$elements.last();n=t.next();const o=n.children().first();if(n.is("li, dd")&&o.hasClass("cd-commentLevel"))n=o;if(n.is("ul")){i=!1;e="li"}else if(n.is("dl")){i=!1;e="dd"}else if(t.is("li"))if("ol"!==this.containerListType)e="li";else e="div";else if(t.is("dd"))e="dd"}else if("edit"===this.mode){const t=this.target.$elements.last();if(t.is("li"))e="li";else if(t.is("dd"))e="dd"}if(e)this.$outerWrapper=$("<".concat(e,">"));if("reply"===this.mode)if(i){this.$wrappingList=$("<ul>").addClass("cd-commentLevel");if(this.$outerWrapper)this.$wrappingList.appendTo(this.$outerWrapper);const e=$("<li>").appendTo(this.$wrappingList);this.$element.appendTo(e)}else this.$element.appendTo(this.$outerWrapper);else if("edit"===this.mode)if(this.$outerWrapper)this.$element.appendTo(this.$outerWrapper);this.$outermostElement=this.$outerWrapper||this.$wrappingList||this.$element;switch(this.mode){case"reply":if(n.is("ul, dl"))this.$outerWrapper.prependTo(n);else if(t.is("li, dd"))this.$outerWrapper.insertAfter(t);else this.$wrappingList.insertAfter(t);break;case"edit":{const e=this.$outerWrapper||this.$element;if(this.target.isOpeningSection)e.insertAfter(this.target.$elements.last());else e.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.sections[0])this.$element.insertBefore(cd.sections[0].$heading);else this.$element.appendTo(cd.g.$root);break;case"addSubsection":{const e=new RegExp("\\bcd-commentForm-addSubsection-[".concat(this.target.level,"-6]\\b"));let t,n=this.target.$elements.last();do{var o;t=n;n=n.next()}while(n.is(".cd-sectionButtonContainer:not(.cd-addTopicButtonContainer), .cd-commentForm-reply")||(null===(o=n.get(0))||void 0===o?void 0:o.className.match(e)));this.$element.insertAfter(t);break}}this.adjustLabels()}addEvents(){const e=()=>{hn()},t=()=>{this.preview()},n=[{pattern:new RegExp(cd.g.SIGN_CODE+"\\s*$"),message:cd.sParse("cf-reaction-signature",cd.g.SIGN_CODE),name:"signatureNotNeeded",type:"notice",checkFunc:()=>{var e;return!(null===(e=this.omitSignatureCheckbox)||void 0===e?void 0:e.isSelected())}},{pattern:/<pre/,message:cd.sParse("cf-reaction-pre"),name:"dontUsePre",type:"warning"}].concat(cd.config.customTextReactions);this.$element.on("keydown",e=>{if(e.ctrlKey&&!e.shiftKey&&!e.altKey&&13===e.keyCode)this.submit();if(!e.ctrlKey&&!e.shiftKey&&!e.altKey&&27===e.keyCode)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?void 0:t.headline))this.showMessage(cd.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.g.activeAutocompleteMenu)this.submit()})}this.commentInput.on("change",e=>{this.updateAutoSummary(!0,!0);n.forEach(({pattern:t,checkFunc:n,message:i,type:o,name:s})=>{if(t.test(e)&&("function"!=typeof n||n(this)))this.showMessage(i,{type:o,name:s});else this.hideMessage(s)})}).on("change",t).on("change",e);this.commentInput.$input.get(0).addEventListener("tribute-replaced",e=>{if(e.detail.instance.trigger===cd.config.mentionCharacter){var t;if("edit"===this.mode){const e=cd.util.wrap(cd.sParse("cf-reaction-mention-edit"),{targetBlank:!0});this.showMessage(e,{type:"notice",name:"mentionEdit"})}if(null===(t=this.omitSignatureCheckbox)||void 0===t?void 0:t.isSelected()){const e=cd.util.wrap(cd.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.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.settingsButton.on("click",()=>{di()});this.advancedButton.on("click",()=>{this.toggleAdvanced()});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=[];if(this.targetSection)e=this.targetSection.getBase().comments;else if("addSection"!==this.mode)cd.comments.some(t=>{if(t.getSection())return!0;else{e.push(t);return!1}});if("edit"===this.mode)e=e.filter(e=>e!==this.target);let t=e.map(e=>e.author.name).sort();if(this.targetComment&&"edit"!==this.mode)t.unshift(this.targetComment.author.name);t=t.filter(p);this.autocomplete=new Autocomplete_Autocomplete({types:["mentions","wikilinks","templates","tags","commentLinks"],inputs:[this.commentInput],comments:e,defaultUserNames:t});if(this.headlineInput)this.headlineAutocomplete=new Autocomplete_Autocomplete({types:["mentions","wikilinks","tags"],inputs:[this.headlineInput],comments:e,defaultUserNames:t});this.summaryAutocomplete=new Autocomplete_Autocomplete({types:["mentions","wikilinks"],inputs:[this.summaryInput],comments:e,defaultUserNames:t})}toggleAdvanced(){D();if(this.$advanced.is(":hidden")){this.$advanced.show();const e=this.summaryInput.getValue(),t=e.match(/^.+?\*\/ */);this.summaryInput.selectRange(t?t[0].length:0,e.length)}else{this.$advanced.hide();this.commentInput.focus()}L()}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.s("cf-preview"));this.viewChangesButton.setLabel(cd.s("cf-viewchanges"));this.cancelButton.setLabel(cd.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.s("cf-preview-short"));this.viewChangesButton.setLabel(cd.s("cf-viewchanges-short"));this.cancelButton.setLabel(cd.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,s,r;this.commentInput.setDisabled(!0);this.summaryInput.setDisabled(!0);if(t){var a;null===(a=this.headlineInput)||void 0===a||a.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===(s=this.omitSignatureCheckbox)||void 0===s||s.setDisabled(!0);null===(r=this.deleteCheckbox)||void 0===r||r.setDisabled(!0)}}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,s,r,a;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===(s=this.omitSignatureCheckbox)||void 0===s||s.setDisabled(!1);null===(r=this.deleteCheckbox)||void 0===r||r.setDisabled(!1);if(null===(a=this.deleteCheckbox)||void 0===a?void 0:a.isSelected())this.updateFormOnDeleteCheckboxChange(!0)}}showMessage(e,{type:t="notice",name:n,isRaw:i=!1}={}){if(this.isDestroyed||n&&this.$messageArea.children(".cd-message-".concat(n)).length)return;let o;if(i)o=e;else{const i=e instanceof $?e:cd.util.wrap(e),s=["cd-message"];if(n)s.push("cd-message-".concat(n));o=new OO.ui.MessageWidget({type:t,inline:!0,label:i,classes:s}).$element}this.$messageArea.append(o).cdAddCloseButton().cdScrollIntoView("top")}hideMessage(e){const t=this.$messageArea.children(".cd-message-".concat(e));if(t.length)t.remove()}abort({message:e,messageType:t="error",isRawMessage:n=!1,logMessage:i,cancel:o=!1,currentOperation:s}){if(s)this.closeOperation(s);if(!this.isDestroyed){if(i)console.warn(i);if(o){fn([e,{type:"error",autoHideSeconds:"long"}]);this.cancel(!1)}else{if(!s||"preview"!==s.type||!s.isAuto)this.showMessage(e,{type:t,isRaw:n});this.$messageArea.cdScrollIntoView("top")}}}handleError({type:e,code:t,details:n,apiData:i,message:s,messageType:r,logMessage:a,cancel:c=!1,isRawMessage:l=!1,currentOperation:u}){var d=this;return o()((function*(){switch(e){case"parse":{let e;switch(t){case"locateComment":if(d.targetSection)e=d.targetSection.editUrl?d.targetSection.editUrl.toString():cd.g.CURRENT_PAGE.getUrl({action:"edit"});else e=cd.g.CURRENT_PAGE.getUrl({action:"edit",section:0});s=cd.sParse("error-locatecomment",e);break;case"locateSection":e=cd.g.CURRENT_PAGE.getUrl({action:"edit"});s=cd.sParse("error-locatesection",e);break;case"numberedList-list":s=cd.sParse("cf-error-numberedlist")+" "+cd.sParse("cf-error-numberedlist-list");break;case"numberedList-table":s=cd.sParse("cf-error-numberedlist")+" "+cd.sParse("cf-error-numberedlist-table");break;case"findPlace":s=cd.sParse("cf-error-findplace");break;case"findPlace-unexpectedHeading":s=cd.sParse("cf-error-findplace-unexpectedheading");break;case"delete-repliesToComment":s=cd.sParse("cf-error-delete-repliestocomment");break;case"delete-repliesInSection":s=cd.sParse("cf-error-delete-repliesinsection");break;case"commentLinks-commentNotFound":s=cd.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(yield d.confirmClose()){d.forget();location.assign(e)}}}));return function(e){return t.apply(this,arguments)}}();s=cd.util.wrap(s,{callbacks:{"cd-message-reloadPage":(h=o()((function*(){if(yield d.confirmClose())d.reloadPage()})),function(){return h.apply(this,arguments)}),"cd-message-editSection":i,"cd-message-editPage":i}});break}case"api":switch(t){case"missing":s=cd.sParse("cf-error-pagedoesntexist");break;case"error":{const{code:e,info:t}=i.error;switch(e){case"missingtitle":s=cd.sParse("cf-error-pagedoesntexist");break;default:s=yield ye(e,t)}break}}(s=cd.util.wrap(s)).find(".mw-parser-output").css("display","inline");a=a||[t,i];break;case"network":case"javascript":s=(s?s+" ":"")+cd.sParse("error-".concat(e))}var h;d.abort({message:s,messageType:r,isRawMessage:l,logMessage:a,cancel:c,currentOperation:u})}))()}addIndentationChars(e,t){return t+(t&&!/^[:*#]/.test(e)&&cd.config.spaceAfterIndentationChars?" ":"")+e}commentTextToCode(e){var t,n;let i,o=!1;switch(this.mode){case"reply":i=this.target.inCode.replyIndentationChars;o=!0;break;case"edit":i=this.target.inCode.indentationChars;o=Boolean(i);break;case"replyInSection":i=cd.config.defaultIndentationChar;if(this.target.inCode.lastCommentIndentationChars)if("#"===this.target.inCode.lastCommentIndentationChars[0])i="#";else if("mimic"===cd.config.indentationCharMode)i=this.target.inCode.lastCommentIndentationChars[0];o=!0;break;default:i=""}const s="preview"===e||["addSection","addSubsection"].includes(this.mode)||"edit"===this.mode&&!i,r=i.replace(/\*/g,":");let a,c=this.commentInput.getValue();if(cd.config.preTransformCode)c=cd.config.preTransformCode(c,this);c=c.trim();({code:c,hidden:a}=et(c));let l,u=!1;if(!this.headlineInput)c=c.replace(/^<small>([^]*)<\/small>$/i,(e,t)=>{u=!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?void 0:t.isSelected())l="";else l="edit"===this.mode?this.target.inCode.signatureCode:cd.g.CURRENT_USER_SIGNATURE;if(l&&("edit"!==this.mode||!/^[ \t]*\n/.test(l))&&/\n[:*#].*$/.test(c))c+="\n";if(!s){c=c.replace(/\n([:*#]+)/g,(e,t)=>"\n"+r+t);if(o&&(/^[:*#]/m.test(c)||c.includes("\x03"))){if("#"===r)throw new CdError({type:"parse",code:"numberedList-list"});if(r.includes("#")&&c.includes("\x03"))throw new CdError({type:"parse",code:"numberedList-table"});c=c.replace(/\n(?!:)/g,()=>"\n"+r+(cd.config.spaceAfterIndentationChars?" ":""))}}if(o){c=c.replace(/^ +/gm,"");const e=cd.config.paragraphTemplates.length?"$1{{".concat(cd.config.paragraphTemplates[0],"}}"):"$1<br><br>";c=c.replace(/^((?![:*#= ]).*)\n\n(?![:*#=])/gm,e)}const d=new RegExp("^(?:\\x01.+?\\x02|\\[\\[".concat(cd.g.FILE_PREFIX_PATTERN,".+\\]\\]) *$"),"i"),h=new RegExp("(?:<".concat(cd.g.PNIE_PATTERN,"(?: [\\w ]+?=[^<>]+?| ?\\/?)>|<\\/").concat(cd.g.PNIE_PATTERN,">|\\x04) *$"),"i"),m=new RegExp("^(?:<\\/".concat(cd.g.PNIE_PATTERN,">|<").concat(cd.g.PNIE_PATTERN,"|\\|)"),"i"),f=/^(=+).*\1[ \t]*$/;c=c.replace(/^((?![:*# ]).+)\n(?![\n:*# \x03])(?=(.*))/gm,(e,t,n)=>t+(d.test(t)||d.test(n)||!o&&(f.test(t)||f.test(n))||h.test(t)||m.test(n)?"":"<br>")+(o?"":"\n"));if(!(null===(n=this.omitSignatureCheckbox)||void 0===n?void 0:n.isSelected()))c=c.replace(/\s*~{3,}$/,"");if(!s&&/^(#|.*\x03)/.test(c))i=r;if(this.headlineInput){let e;if("addSection"===this.mode)e=2;else if("addSubsection"===this.mode)e=this.target.level+1;else e=this.target.inCode.headingLevel;const t="=".repeat(e);if(this.editingSectionOpeningComment&&/^\n/.test(this.target.inCode.code))c="\n"+c;c="".concat(t," ").concat(this.headlineInput.getValue().trim()," ").concat(t,"\n").concat(c)}if("preview"===e&&l)l='<span class="cd-commentForm-signature">'.concat(l,"</span>");if(/(?:^|\n) .*$/.test(c))c+="\n";if(!c||c.endsWith("\n")||c.endsWith(" "))l=l.trimLeft();if(u&&!this.headlineInput){var p;const e=/^[:*#]/.test(c)||!cd.config.spaceAfterIndentationChars?"":" ",t=r+e,n=/^[:*# ]/.test(c)?"\n".concat(t):"";if((null===(p=cd.config.smallDivTemplates)||void 0===p?void 0:p[0])&&!/^[:*#]/m.test(c)){const e=c.replace(/\|/g,"{{!}}")+l;c="{{".concat(cd.config.smallDivTemplates[0],"|1=").concat(e,"}}")}else c="<small>".concat(n).concat(c,"</small> ").concat(l)}else c+=l;if("edit"!==this.mode)c+="\n";if("submit"===e){c=this.addIndentationChars(c,i);if(o&&"edit"===this.mode&&/^[:*]/.test(this.target.inCode.code)&&!/^[:*]/.test(c))c=" "+c;if("addSubsection"===this.mode)c+="\n"}let g;if("preview"===e&&o&&this.commentInput.getValue().trim()){c=c.replace(/^(?=(.?))/gm,(e,t)=>":"+(";"===t?" ":""));g=!0}else g=!1;c=F(c,a);if(cd.config.postTransformCode)c=cd.config.postTransformCode(c,this);return{commentCode:c,imitateList:g}}prepareNewPageCode(e,t){var n;const i=null===(n=this.deleteCheckbox)||void 0===n?void 0:n.isSelected();if(!(this.target instanceof Page_Page))this.target.locateInCode();let{newPageCode:o,codeBeforeInsertion:s,commentCode:r}=this.target.modifyCode({pageCode:e,action:this.mode,doDelete:i,commentForm:this});if("submit"===t&&!i)Je(s,!0);const a=/\[\[#(\d{12}_[^|\]]+)/g,c=[];let l;for(;l=a.exec(r);)c.push(l[1]);c.forEach(e=>{const t=Comment_Comment.getByAnchor(e);if(t){const n=t.locateInCode(o),i=cd.config.getAnchorCode(e);if(n.code.includes(i))return;let s=this.addIndentationChars(n.code,n.indentationChars);const r=s.match(/^[:*#]* */)[0].length;s=s.slice(0,r)+i+s.slice(r);const a=(n.headingCode||"")+s+n.signatureDirtyCode;({newPageCode:o}=t.modifyCode({pageCode:o,thisInCode:n,action:"edit",commentCode:a}))}else if(!$("#"+e).length)throw new CdError({type:"parse",code:"commentLinks-commentNotFound",details:{anchor:e}})});return o}tryPrepareNewPageCode(e){var t=this;return o()((function*(){try{yield t.targetPage.getCode(0===mw.config.get("wgArticleId"))}catch(e){if(e instanceof CdError){const n=Object.assign({},{message:cd.sParse("cf-error-getpagecode")},e.data);t.handleError(n)}else t.handleError({type:"javascript",logMessage:e});return}let n;try{n=t.prepareNewPageCode(t.targetPage.code,e)}catch(e){if(e instanceof CdError)t.handleError(e.data);else t.handleError({type:"javascript",logMessage:e});return}return n}))()}registerOperation(e){this.operations.push(e);e.isClosed=!1;if("preview"!==e.type||!e.isAuto){this.$messageArea.empty();this.pushPending(["load","submit"].includes(e.type),e.affectHeadline)}return e}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=function(e,t){for(let n=e.length-1;n>=0;n--)if(t(e[n]))return n;return null}(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){if(this.operations.includes(e))this.operations.splice(this.operations.indexOf(e),1);if("preview"!==e.type||!e.isAuto)this.popPending("submit"===e.type,e.affectHeadline)}isBeingSubmitted(){return this.operations.some(e=>"submit"===e.type&&!e.isClosed)}preview(e=!0,t=!0,n){var i=this;return o()((function*(){var o;if(i.operations.some(e=>!e.isClosed&&"load"===e.type)||!(i.target instanceof Page_Page)&&!i.target.inCode&&i.checkCodeRequest&&"resolved"===(yield function(e){return B.apply(this,arguments)}(i.checkCodeRequest))||i.isBeingSubmitted()||t&&!cd.settings.autopreview){if(n)i.closeOperation(n);return}const s=n||i.registerOperation({type:"preview",isAuto:t});if(t){const t=Date.now()-i.lastPreviewTimestamp<1e3;if(t||i.operations.some(e=>!e.isClosed&&"preview"===e.type&&e!==s)){if(i.previewTimeout)i.unregisterOperation(s);else{s.isDelayed=!0;i.previewTimeout=setTimeout(()=>{i.previewTimeout=null;i.preview(e,!0,s)},t?1e3-(Date.now()-i.lastPreviewTimestamp):100)}return}i.lastPreviewTimestamp=Date.now()}if(i.closeOperationIfNecessary(s))return;if(!(i.target instanceof Page_Page||i.target.inCode)){yield i.checkCode();if(!i.target.inCode)i.closeOperation(s);if(s.isClosed)return}const r=!i.commentInput.getValue().trim()&&!(null===(o=i.headlineInput)||void 0===o?void 0:o.getValue().trim());if(r&&!e){i.closeOperation(s);return}const{commentCode:a,imitateList:c}=i.commentTextToCode("preview");let l,u;try{({html:l,parsedSummary:u}=yield pe(a,{title:i.targetPage.name,summary:cd.util.buildEditSummary({text:i.summaryInput.getValue()})}))}catch(e){if(e instanceof CdError){const t=Object.assign({},e.data,{message:cd.sParse("cf-error-preview"),currentOperation:s});i.handleError(t)}else i.handleError({type:"javascript",logMessage:e,currentOperation:s});return}if(!i.closeOperationIfNecessary(s)){if(l){var d;if(t&&r||(null===(d=i.deleteCheckbox)||void 0===d?void 0:d.isSelected()))i.$previewArea.empty();else{const e=$("<div>").addClass("cd-previewArea-label").text(cd.s("cf-block-preview"));i.$previewArea.html(l).prepend(e).cdAddCloseButton();if(c)i.$previewArea.addClass("cd-previewArea-indentedComment");else i.$previewArea.removeClass("cd-previewArea-indentedComment");mw.hook("convenientDiscussions.previewReady").fire(i.$previewArea);if(!t)mw.hook("wikipage.content").fire(i.$previewArea)}const e=$("<span>").addClass("comment").append(u);i.$summaryPreview.empty();if(u){const t=$("<span>").text(cd.mws("colon-separator")),n=$("<span>").text(cd.s("cf-summary-preview"));i.$summaryPreview.append(n,t,e)}}if(cd.settings.autopreview&&i.previewButton.$element.is(":visible")){i.previewButton.$element.hide();i.viewChangesButton.$element.show();i.adjustLabels()}if(!t){i.commentInput.focus();i.$previewArea.cdScrollIntoView(i.$previewArea.hasClass("cd-previewArea-above")?"top":"bottom")}i.closeOperation(s)}}))()}viewChanges(){var e=this;return o()((function*(){var t;if(e.isBeingSubmitted())return;const n=e.registerOperation({type:"viewChanges"}),i=yield e.tryPrepareNewPageCode("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",toslots:"main","totext-main":i,prop:"diff",formatversion:2};if(mw.config.get("wgArticleId"))t.fromrev=e.targetPage.revisionId;else t.fromslots="main",t["fromtext-main"]="";o=yield cd.g.api.post(t).catch(T)}catch(t){if(t instanceof CdError){const i=Object.assign({},t.data,{message:cd.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 s=null===(t=o.compare)||void 0===t?void 0:t.body;if(s){s=cd.util.wrapDiffBody(s);const t=$("<div>").addClass("cd-previewArea-label").text(cd.s("cf-block-viewchanges"));e.$previewArea.html(s).prepend(t).cdAddCloseButton()}else{e.$previewArea.empty();if(void 0!==s)e.showMessage(cd.sParse("cf-notice-nochanges"))}if(cd.settings.autopreview){e.viewChangesButton.$element.hide();e.previewButton.$element.show();e.adjustLabels()}e.$previewArea.cdScrollIntoView(e.$previewArea.hasClass("cd-previewArea-above")?"top":"bottom");e.commentInput.focus();e.closeOperation(n)}))()}reloadPage(e,t){var n=this;return o()((function*(){n.forget();try{yield un(e)}catch(e){if(e instanceof CdError){const i=Object.assign({},e.data,{message:cd.sParse("error-reloadpage-saved"),cancel:!0,currentOperation:t});n.handleError(i)}else n.handleError({type:"javascript",logMessage:e,cancel:!0,currentOperation:t});cn()}}))()}runChecks({doDelete:e}){var t=this;return o()((function*(){var n,i;const s=[{condition:!e&&""===(null===(n=t.headlineInput)||void 0===n?void 0:n.getValue()),confirmation:(u=o()((function*(){const e=cd.s("cf-confirm-noheadline-"+(t.headlineInputPurpose===cd.s("cf-headline-topic")?"topic":"subsection"));return yield OO.ui.confirm(e+" "+cd.s("cf-confirm-noheadline-question"))})),function(){return u.apply(this,arguments)})},{condition:!e&&!t.commentInput.getValue().trim()&&!(null===(i=cd.config.noConfirmPostEmptyCommentPageRegexp)||void 0===i?void 0:i.test(cd.g.CURRENT_PAGE.name)),confirmation:(l=o()((function*(){return yield OO.ui.confirm(cd.s("cf-confirm-empty"))})),function(){return l.apply(this,arguments)})},{condition:!e&&t.commentInput.getValue().trim().length>cd.config.longCommentThreshold,confirmation:(c=o()((function*(){return yield OO.ui.confirm(cd.s("cf-confirm-long",cd.config.longCommentThreshold))})),function(){return c.apply(this,arguments)})},{condition:!e&&/^==[^=]/m.test(t.commentInput.getValue())&&"edit"!==t.mode,confirmation:(a=o()((function*(){return yield OO.ui.confirm(cd.s("cf-confirm-secondlevelheading"))})),function(){return a.apply(this,arguments)})},{condition:e,confirmation:(r=o()((function*(){return yield ri("cf-confirm-delete")})),function(){return r.apply(this,arguments)})}];var r,a,c,l,u;for(const e of s)if(e.condition&&!(yield e.confirmation())){t.commentInput.focus();return!1}return!0}))()}tryEditPage(e,t,n){var i=this;return o()((function*(){let o;try{var s;o=yield i.targetPage.edit({text:t,summary:cd.util.buildEditSummary({text:i.summaryInput.getValue()}),tags:cd.config.tagName,baserevid:e.revisionId,starttimestamp:e.queryTimestamp,minor:null===(s=i.minorCheckbox)||void 0===s?void 0:s.isSelected(),watchlist:i.watchCheckbox.isSelected()?"watch":"unwatch"})}catch(e){if(e instanceof CdError){const{type:t,details:o}=e.data;if("network"===t)i.handleError({type:t,message:cd.sParse("cf-error-couldntedit"),currentOperation:n});else{let e,{code:s,message:r,isRawMessage:a,logMessage:c}=o;if("editconflict"===s){r+=" "+cd.sParse("cf-notice-editconflict-retrying");e="notice";i.submit()}i.handleError({type:t,message:r,messageType:e,isRawMessage:a,logMessage:c,currentOperation:n})}}else i.handleError({type:"javascript",logMessage:e,currentOperation:n});return null}return o}))()}submit(){var e=this;return o()((function*(){var t;if(e.operations.some(e=>!e.isClosed&&"load"===e.type))return;const n=null===(t=e.deleteCheckbox)||void 0===t?void 0:t.isSelected();if(!(yield e.runChecks({doDelete:n})))return;const i=e.registerOperation({type:"submit"});if(cd.commentForms.some(t=>t!==e&&t.isBeingSubmitted())){e.handleError({type:"ui",message:cd.sParse("cf-error-othersubmitted"),currentOperation:i});return}const o=yield e.tryPrepareNewPageCode("submit");if(void 0===o){e.closeOperation(i);return}const s=yield e.tryEditPage(e.targetPage,o,i);if(!s)return;const r={didSubmitCommentForm:!0};if(!mw.config.get("wgArticleId")){mw.config.set("wgArticleId",e.targetPage.pageId);r.wasPageCreated=!0}if(e.watchSectionCheckbox)if(e.watchSectionCheckbox.isSelected()){const t=e.editingSectionOpeningComment&&e.headlineInput.getValue()!==e.originalHeadline;if("addSection"===e.mode||"addSubsection"===e.mode||t){const n=ze(e.headlineInput.getValue());r.justWatchedSection=n;let i;if(t){i=ze(e.originalHeadline);r.justUnwatchedSection=i}Section_Section.watch(n,i).catch(()=>{})}else{const t=e.targetSection;if(t&&!t.isWatched){t.watch(!0);r.justWatchedSection=t.headline}}}else{const t=e.targetSection;if(null==t?void 0:t.isWatched){t.unwatch(!0);r.justUnwatchedSection=t.headline}}if(e.watchCheckbox.isSelected()&&$("#ca-watch").length)$("#ca-watch").attr("id","ca-unwatch");if(!e.watchCheckbox.isSelected()&&$("#ca-unwatch").length)$("#ca-unwatch").attr("id","ca-watch");if(!n)r.commentAnchor="edit"===e.mode?e.target.anchor:$e(new Date(s),cd.g.CURRENT_USER_NAME,!0);if(e.targetPage!==cd.g.CURRENT_PAGE)yield cd.g.CURRENT_PAGE.purge();e.reloadPage(r,i)}))()}confirmClose(){var e=this;return o()((function*(){return!e.isAltered()||(yield ri("cf-confirm-close"))}))()}cancel(e=!0){var t=this;return o()((function*(){if(!cd.util.isPageOverlayOn()&&!t.isBeingSubmitted())if(!e||(yield 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.g.$addSectionButtonContainer)cd.g.$addSectionButtonContainer.show()}else t.commentInput.focus()}))()}destroy(){this.$outermostElement.remove();this.operations.filter(e=>!e.isClosed).forEach(this.closeOperation.bind(this));this.forget();this.isDestroyed=!0}forget(){if("addSection"===this.mode)delete cd.g.addSectionForm;else delete this.target[CommentForm_CommentForm.modeToProperty(this.mode)+"Form"];if(cd.commentForms.includes(this))cd.commentForms.splice(cd.commentForms.indexOf(this),1);hn();Vn.updateCommentFormButton()}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?ze(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.g.USER_NAMESPACE_ALIASES_REGEXP.test(t)?n:e);if(e&&e.length<=cd.config.summaryCommentTextLengthLimit)o=": ".concat(e," (-)")}else if("addSubsection"===this.mode){const e=ze(this.headlineInput.getValue());if(e)o=": /* ".concat(e," */")}this.autoSummary=cd.util.buildEditSummary({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.s("es-reply");else{this.target.requestAuthorGenderIfNeeded(this.updateAutoSummaryBound);return this.target.isOwn?cd.s("es-addition"):S(cd.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 S(cd.s("es-".concat(e,"-").concat(t),n.author.name,n.author))})((null===(e=this.deleteCheckbox)||void 0===e?void 0:e.isSelected())?"delete":"edit");case"replyInSection":return cd.s("es-reply");case"addSection":var t;return(null===(t=this.preloadConfig)||void 0===t?void 0:t.summary)||cd.s("es-new-topic");case"addSubsection":return cd.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.s("cf-delete-button");this.submitButtonLabelShort=cd.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.s("cf-save");this.submitButtonLabelShort=cd.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=Autocomplete_Autocomplete.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);q(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().slice(t-1,t);if(t&&!/\s/.test(n))q(this.commentInput," ");this.autocomplete.tribute.showMenuForCollection(this.commentInput.$input.get(0),this.autocomplete.tribute.collection.findIndex(e=>e.trigger===cd.config.mentionCharacter))}quote(e=!0){const t=P()?document.activeElement.value.substring(document.activeElement.selectionStart,document.activeElement.selectionEnd):window.getSelection().toString();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),s=Math.max(n.to,n.from);if(!e&&o!==s){this.commentInput.selectRange(i);o=s=i}this.encapsulateSelection({pre:cd.config.quoteFormatting[0],peri:cd.s("cf-quote-placeholder"),post:cd.config.quoteFormatting[1],selection:t,trim:!0,leadingNewline:!0})}}encapsulateSelection({pre:e="",peri:t="",post:n="",selection:i,replace:o=!1,trim:s,leadingNewline:r}){const a=this.commentInput.getRange(),c=Math.min(a.from,a.to),l=this.commentInput.getValue(),u=r&&!/(^|\n)$/.test(l.slice(0,c))?"\n":"";let d;const h=!(i||t&&o);if(h){d=c+u.length+e.length;i=l.substring(a.from,a.to)}else i=i||"";if(s)i=i.trim();const[m]=i.match(/^ */),[f]=i.match(/ *$/),p=i||t,g=u+m+e+p.slice(m.length,p.length-f.length)+n+f;q(this.commentInput,g);if(h)this.commentInput.selectRange(d,d+t.length)}}Object.assign(CommentForm_CommentForm,Fe);var Ti={configureAndAddLayers(e){let t;if(e.length)t=cd.g.floatingElements.map(R);e.forEach(e=>{e.configureLayers({add:!1,update:!1,floatingRects:t})});e.forEach(e=>{e.addLayers()})},registerSeen(){const e=Comment_Comment.findInViewport();if(!e)return;const t=e=>{const t=e.isInViewport();if(t){e.registerSeen();return!1}else if(!1===t)return!0};cd.comments.slice(0,e.id).reverse().some(t);cd.comments.slice(e.id).some(t)},groupBySection(e){const t=new Map;e.forEach(e=>{let n;if(e instanceof Comment_Comment)n=e.getSection();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){const t=window.pageYOffset,n=t+window.innerHeight,i=e=>{e.getPositions();return Boolean(e.positions)},o=(e,t=0)=>_(cd.comments,t,"backward"===e).find(i)||null,s=o("forward"),r=o("backward",cd.comments.length-1);if(!s)return null;let a,c={top:s,bottom:r},l=c.top;const u=(e,t,n=!1)=>{if("forward"===e)return o(e,n?t.top.id:t.bottom.id);else if("backward"===e)return o(e,n?t.bottom.id:t.top.id);return null};for(let i=0;i<cd.comments.length;i++){if(l.isInViewport()){a=l;break}if(l.positions&&l===s&&n<l.positions.downplayedBottom||l===r&&t>l.positions.top){a=u(e,c,!0);break}if(c.top===c.bottom){a=u(e,c);break}if(l.positions)if(l===s)l=c.bottom;else{c[t>l.positions.top?"top":"bottom"]=l;if(c.bottom.id-c.top.id<=1){a=u(e,c);break}const i=c.top.positions.top,o=(t-i)/(c.bottom.positions.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);l=cd.comments[Math.round((c.bottom.id-c.top.id-1)*o+c.top.id+.5)]}else{l=cd.comments[c.top.id+1];c.top=l}}return a||null},highlightFocused(e){var t,n,i,o,s;if(cd.g.dontHandleScroll||cd.g.autoScrollInProgress||cd.util.isPageOverlayOn())return;const r=Array.from(null===(t=cd.g.NOTIFICATION_AREA)||void 0===t?void 0:t.querySelectorAll(".mw-notification")).some(e=>e.matches(":hover"))||(null===(n=cd.g.activeAutocompleteMenu)||void 0===n?void 0:n.matches(":hover"))||(null===(i=Vn.$element)||void 0===i?void 0:i.get(0).matches(":hover"))||$(document.body).children(".ui-widget-overlay").length||(null===(o=cd.g.$popupsOverlay)||void 0===o?void 0:null===(s=o.get(0).querySelector(".oo-ui-popupWidget:not(.oo-ui-element-hidden)"))||void 0===s?void 0:s.matches(":hover"));cd.comments.filter(e=>e.underlay).forEach(t=>{const n=t.getLayersContainerOffset();if(!r&&e.pageY>=t.layersTop+n.top&&e.pageY<=t.layersTop+t.layersHeight+n.top&&e.pageX>=t.layersLeft+n.left&&e.pageX<=t.layersLeft+t.layersWidth+n.left)t.highlightFocused();else t.unhighlightFocused()})},getByAnchor(e){if(!cd.comments||!e)return null;else return cd.comments.find(t=>t.anchor===e)||null}};let Ai,xi,Si,ki,Ni,Pi,Oi,Ii,Fi,Di;class Comment_Comment extends 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);n.reverse();n=this.parser.replaceListsWithItems(n,t.element);this.id=cd.comments.length;this.date=t.date||null;this.timestamp=t.timestampText;this.authorName=t.authorName;this.signatureElement=t.element;this.isOwn=this.authorName===cd.g.CURRENT_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.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 CdError;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()}addAttributes(){if(this.anchor&&!this.elements[0].getAttribute("id"))this.elements[0].setAttribute("id",this.anchor);this.highlightables[0].classList.add("cd-commentPart-first");this.highlightables[this.highlightables.length-1].classList.add("cd-commentPart-last");this.elements.forEach(e=>{e.classList.add("cd-commentPart");e.setAttribute("data-comment-id",String(this.id))})}setLevels(){const e={};e.top=this.parser.getLevelsUpTree(this.highlightables[0]);e.bottom=this.highlightables.length>1?this.parser.getLevelsUpTree(this.highlightables[this.highlightables.length-1]):e.top;this.level=Math.min(e.top.length,e.bottom.length);for(let t=0;t<this.level;t++){if(e.top[t])e.top[t].classList.add("cd-commentLevel","cd-commentLevel-".concat(t+1));if(e.bottom[t]&&e.bottom[t]!==e.top[t])e.bottom[t].classList.add("cd-commentLevel","cd-commentLevel-".concat(t+1))}}getSection(){if(void 0===this.cachedSection)this.cachedSection=cd.sections.slice().reverse().find(e=>e.comments.includes(this))||null;return this.cachedSection}getChildren(){if(this.id===cd.comments.length-1)return[];if(cd.g.pageHasOutdents){const e=new treeWalker_ElementsTreeWalker(this.elements[this.elements.length-1]);for(;e.nextNode()&&!e.currentNode.classList.contains("cd-commentPart");)if(e.currentNode.classList.contains("outdent-template"))return[cd.comments[this.id+1]]}const e=[];cd.comments.slice(this.id+1).some(t=>{if(t.getSection()===this.getSection()&&t.level>this.level){if(t.level===this.level+1||t.id===this.id+1)e.push(t)}else return!0});return e}}{constructor(e,t){super(e,t);this.elementPrototypes=cd.g.COMMENT_ELEMENT_PROTOTYPES;this.author=V.getUser(this.authorName);this.$signature=$(t.element);delete this.signatureElement;this.$timestamp=$(t.timestampElement);this.isActionable=cd.g.isPageActive&&!cd.g.closedDiscussionElements.some(e=>e.contains(this.elements[0]));this.highlightables.forEach(e=>{this.bindEvents(e)});this.isTarget=!1;this.isFocused=!1;this.isEditedSincePreviousVisit=null;this.isEdited=null;this.isDeleted=null;this.isFlashNewOnSightSet=!1}bindEvents(e){e.onmouseenter=this.highlightFocused.bind(this);e.onmouseleave=this.unhighlightFocused.bind(this);e.ontouchstart=this.highlightFocused.bind(this)}getPositions(e={}){if(void 0===e.considerFloating)e.considerFloating=!1;this.positions=null;if(this.editForm)return;let t=e.rectTop||this.highlightables[0].getBoundingClientRect(),n=e.rectBottom||(1===this.elements.length?t:this.highlightables[this.highlightables.length-1].getBoundingClientRect());if(0===t.left&&0===t.height)return;const i=window.pageYOffset+t.top,o=window.pageYOffset+n.bottom;if(e.considerFloating){const s=e.floatingRects||cd.g.floatingElements.map(R);let r=0,a=!1;s.forEach(e=>{const t=window.pageYOffset+e.outerTop,n=window.pageYOffset+e.outerBottom;if(o>t&&o<n+cd.g.REGULAR_LINE_HEIGHT)a=!0;if(o>t&&i<n+cd.g.REGULAR_LINE_HEIGHT)r++});const c=[];if(a)this.elements.forEach((e,t)=>{c[t]=e.style.overflow;e.style.overflow="hidden"});t=this.highlightables[0].getBoundingClientRect();n=1===this.elements.length?t:this.highlightables[this.highlightables.length-1].getBoundingClientRect();if(1===r)this.elements.forEach((e,t)=>{e.style.overflow=c[t]})}const s=window.pageXOffset+Math.min(t.left,n.left),r=window.pageXOffset+Math.max(t.right,n.right),a=o-i>window.innerHeight-200?i+(window.innerHeight-200):o;this.positions={top:i,bottom:o,left:s,right:r,downplayedBottom:a}}calculateLayersPositions(e={}){this.getPositions(Object.assign({},e,{considerFloating:!0}));if(!this.positions)return null;this.firstHighlightableWidth=this.highlightables[0].offsetWidth;return{layersTop:this.positions.top-e.layersContainerOffset.top,layersLeft:this.positions.left-cd.g.COMMENT_UNDERLAY_SIDE_MARGIN-e.layersContainerOffset.left,layersWidth:this.positions.right-this.positions.left+2*cd.g.COMMENT_UNDERLAY_SIDE_MARGIN,layersHeight:this.positions.bottom-this.positions.top}}hideMenu(e){if(e)e.preventDefault();this.overlay.style.display="none"}createLayers(){this.underlay=this.elementPrototypes.underlay.cloneNode(!0);nt.underlays.push(this.underlay);this.overlay=this.elementPrototypes.overlay.cloneNode(!0);this.overlayInnerWrapper=this.overlay.firstChild;this.overlayInnerWrapper.oncontextmenu=this.hideMenu.bind(this);let e;this.overlayInnerWrapper.onmousedown=t=>{if(1===t.which)e=setTimeout(this.hideMenu.bind(this),1e3)};this.overlayInnerWrapper.onmouseup=()=>{clearTimeout(e)};this.overlayGradient=this.overlayInnerWrapper.firstChild;this.overlayContent=this.overlayInnerWrapper.lastChild;if(this.getParent()){this.goToParentButton=this.elementPrototypes.goToParentButton.cloneNode(!0);this.goToParentButton.firstChild.onclick=()=>{this.goToParent()};this.overlayContent.appendChild(this.goToParentButton)}if(this.anchor){this.linkButton=this.elementPrototypes.linkButton.cloneNode(!0);this.linkButton.firstChild.onclick=this.copyLink.bind(this);this.overlayContent.appendChild(this.linkButton)}if(this.author.isRegistered()&&this.date&&!this.isOwn){if(!Ai){Ai=function(e){const t=Object.assign({},e);Object.keys(t).forEach(e=>{if(!t[e].thankUnixTime||t[e].thankUnixTime<Date.now()-60*cd.g.SECONDS_IN_A_DAY*1e3)delete t[e]});return t}(H("thanks"));U("thanks",Ai)}if(Object.keys(Ai).some(e=>this.anchor===Ai[e].anchor&&G(this.getText(),Ai[e].text)>.66))this.thankButton=this.elementPrototypes.thankedButton.cloneNode(!0);else{this.thankButton=this.elementPrototypes.thankButton.cloneNode(!0);this.thankButton.firstChild.onclick=()=>{this.thank()}}this.overlayContent.appendChild(this.thankButton)}if(this.isActionable){if(this.isOwn||cd.settings.allowEditOthersComments){this.editButton=this.elementPrototypes.editButton.cloneNode(!0);this.editButton.firstChild.onclick=()=>{if(!this.editButton.classList.contains("oo-ui-widget-disabled"))this.edit()};this.overlayContent.appendChild(this.editButton)}this.replyButton=this.elementPrototypes.replyButton.cloneNode(!0);this.replyButton.firstChild.onclick=()=>{if(this.replyForm)this.replyForm.cancel();else if(!this.replyButton.classList.contains("oo-ui-widget-disabled"))this.reply()};this.overlayContent.appendChild(this.replyButton)}this.updateLayersStyles();this.$underlay=$(this.underlay);this.$overlay=$(this.overlay);this.$overlayContent=$(this.overlayContent);this.$overlayGradient=$(this.overlayGradient);mw.hook("convenientDiscussions.commentLayersCreated").fire(this)}updateLayersStyles(){if(this.underlay){if(this.isNew)this.underlay.classList.add("cd-commentUnderlay-new");if(cd.settings.highlightOwnComments&&this.isOwn)this.underlay.classList.add("cd-commentUnderlay-own");if(this.isDeleted){this.underlay.classList.add("cd-commentUnderlay-deleted");if(this.replyButton){this.replyButton.classList.add("oo-ui-widget-disabled");this.replyButton.classList.remove("oo-ui-widget-enabled")}if(this.editButton){this.editButton.classList.add("oo-ui-widget-disabled");this.editButton.classList.remove("oo-ui-widget-enabled")}}else if(this.underlay.classList.contains("cd-commentUnderlay-deleted")){this.underlay.classList.remove("cd-commentUnderlay-deleted");if(this.replyButton){this.replyButton.classList.remove("oo-ui-widget-disabled");this.replyButton.classList.add("oo-ui-widget-enabled")}if(this.editButton){this.editButton.classList.remove("oo-ui-widget-disabled");this.editButton.classList.add("oo-ui-widget-enabled")}}}}configureLayers(e={}){if(this.editForm)return null;if(void 0===e.add)e.add=!0;if(void 0===e.update)e.update=!0;e.rectTop=this.highlightables[0].getBoundingClientRect();e.rectBottom=1===this.elements.length?e.rectTop:this.highlightables[this.highlightables.length-1].getBoundingClientRect();e.layersContainerOffset=this.getLayersContainerOffset();let t=!1;if(this.underlay){const n=Math.abs(window.pageYOffset+e.rectTop.top-e.layersContainerOffset.top-this.layersTop),i=Math.abs(e.rectBottom.bottom-e.rectTop.top-this.layersHeight);t=n>.5||i>.5||this.highlightables[0].offsetWidth!==this.firstHighlightableWidth}if(!this.underlay||t)Object.assign(this,this.calculateLayersPositions(e));if(void 0===this.layersLeft)return null;if(this.underlay){this.updateLayersStyles();if(t&&e.update)this.updateLayersPositions();return t}else{this.createLayers();if(e.add)this.addLayers();return!1}}addLayers(){if(this.underlay){this.updateLayersPositions();this.getLayersContainer().appendChild(this.underlay);this.getLayersContainer().appendChild(this.overlay)}}updateLayersPositions(){this.underlay.style.top=this.overlay.style.top=this.layersTop+"px";this.underlay.style.left=this.overlay.style.left=this.layersLeft+"px";this.underlay.style.width=this.overlay.style.width=this.layersWidth+"px";this.underlay.style.height=this.overlay.style.height=this.layersHeight+"px"}highlightFocused(){if(this.isFocused||cd.util.isPageOverlayOn())return;if(!this.configureLayers()&&this.underlay){this.underlay.classList.add("cd-commentUnderlay-focused");this.overlay.classList.add("cd-commentOverlay-focused");this.isFocused=!0}}unhighlightFocused(){if(this.isFocused){this.underlay.classList.remove("cd-commentUnderlay-focused");this.overlay.classList.remove("cd-commentOverlay-focused");this.overlay.style.display="";this.isFocused=!1}}getCurrentBackgroundColor(){let e=window.getComputedStyle(this.$underlay.get(0)).backgroundColor;if("rgba(0, 0, 0, 0)"===e&&this.backgroundColor)e=this.backgroundColor;return e}highlightTarget(){this.isTarget=!0;this.flash($(document.documentElement).css("--cd-comment-target-color"),1500,()=>{this.isTarget=!1})}flash(e,t,n){this.configureLayers();if(!this.$underlay){if(n)n();return}this.$elementsToAnimate=this.$underlay.add(this.$overlayGradient).add(this.$overlayContent).stop().css("background-image","none").css("background-color","");let i=this.getCurrentBackgroundColor();this.$elementsToAnimate.css("background-color",e);clearTimeout(this.unhighlightTimeout);this.unhighlightTimeout=setTimeout(()=>{if(this.isFocused)i=$(document.documentElement).css("--cd-comment-focused-color");else if(this.isNew&&!this.isOwn)i=$(document.documentElement).css("--cd-comment-new-color");if(i===e)i=this.backgroundColor||"rgba(0, 0, 0, 0)";const t=this;this.$elementsToAnimate.stop().css("background-image","none").css("background-color",e).animate({backgroundColor:i},400,"swing",(function(){if(this===t.$overlayContent.get(0)){if(n)n();t.$elementsToAnimate.css("background-image","").css("background-color","");delete t.$elementsToAnimate}}))},t)}flashNew(){this.flash($(document.documentElement).css("--cd-comment-new-color"),500);if(this.isEdited){const e=H("seenRenderedEdits"),t=mw.config.get("wgArticleId");e[t]=e[t]||{};e[t][this.anchor]={innerHtml:this.innerHtml,seenUnixTime:Date.now()};U("seenRenderedEdits",e)}}flashNewOnSight(){if(this.isInViewport())this.flashNew();else this.isFlashNewOnSightSet=!0}markAsEdited(e,t,n,i){var s=this;let r,a,c;switch(e){case"edited":default:this.isEdited=!0;r="comment-edited";break;case"editedSince":this.isEditedSincePreviousVisit=!0;r="comment-editedsince";break;case"deleted":this.isDeleted=!0;r="comment-deleted"}this.$elements.last().find(".cd-editMark").remove();if(!t){const t="deleted"===e?{}:{commentAnchor:this.anchor};a=$("<a>").text(cd.s("comment-edited-refresh")).on("click",()=>{un(t)})}if("deleted"!==e&&this.getSourcePage().name===cd.g.CURRENT_PAGE.name)c=$("<a>").text(cd.s("comment-edited-diff")).on("click",function(){var e=o()((function*(e){e.preventDefault();c.addClass("cd-link-pending");try{yield s.showDiff(n,i)}catch(e){let t=cd.s("comment-edited-diff-error");if(e instanceof CdError){const{type:n,message:i}=e.data;if(i)t=i;else if("network"===n)t+=" "+cd.sParse("error-network")}mw.notify(t,{type:"error"})}c.removeClass("cd-link-pending")}));return function(t){return e.apply(this,arguments)}}());const l=$("<span>").addClass("cd-editMark").append(cd.sParse(r));if(a)l.append(" ",a);else l.addClass("cd-editMark-newVersionRendered");if(c)l.append(a?cd.mws("dot-separator"):" ",c);let u,d=this.$elements.last();do{u=d;d=u.children().last()}while(d.length&&!b(d.get(0)));u.append(l);if(t)this.flashNewOnSight()}unmarkAsEdited(e){switch(e){case"edited":default:this.isEdited=!1;break;case"deleted":this.isDeleted=!1;this.updateLayersStyles()}this.$elements.last().find(".cd-editMark").remove();if("edited"===e)if(this.isFlashNewOnSightSet)this.isFlashNewOnSightSet=!1;else{const e=H("seenRenderedEdits"),t=mw.config.get("wgArticleId");e[t]=e[t]||{};delete e[t][this.anchor];U("seenRenderedEdits",e);this.flashNewOnSight()}}update(e,t){const n=Array.from(this.$elements).map(e=>e.tagName),i=t.hiddenElementData.some(e=>"reference"===e.type),o=!t.hiddenElementData.length||t.hiddenElementData.every((t,n)=>"templateStyles"!==t.type||"STYLE"===t.tagName||"STYLE"!==e.hiddenElementData[n].tagName);if(!i&&o&&j(n,t.elementTagNames)){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.hiddenElementData[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 s=this.getSection();if(s){var o;const e=s.headline;s.parseHeadline();if(s.isWatched&&s.headline!==e)s.watch(!0,e);null===(o=s.getTocItem())||void 0===o||o.replaceText(i)}}}else this.replaceElement(this.$elements.eq(i),e)});this.$elements.find(".autonumber").each((e,t)=>{$(t).text("[".concat(i,"]"));i++});this.$elements.attr("data-comment-id",this.id).first().attr("id",this.anchor);mw.hook("wikipage.content").add(this.$elements);delete this.cachedText;return!0}else return!1}scrollIntoView(e){(this.editForm?this.editForm.$element:this.$elements).cdScrollIntoView(e)}scrollToAndHighlightTarget(e=!0,t=!1){if(t)history.pushState(history.state,"","#"+this.anchor);(this.editForm?this.editForm.$element:this.$elements).cdScrollIntoView(this.isOpeningSection||this.editForm?"top":"center",e);this.highlightTarget()}replaceButton(e,t,n){this.overlayContent.insertBefore(t,e);e.remove();this[n+"Button"]=t}goToParent(){const e=this.getParent();if(!e){console.error("This comment has no parent.");return}e.scrollToAndHighlightTarget();const t=new OO.ui.ButtonWidget({label:cd.s("cm-gotochild"),icon:"downTriangle",title:cd.s("cm-gotochild-tooltip"),framed:!1,invisibleLabel:!0,classes:["cd-button","cd-commentButton","cd-commentButton-icon"]});t.on("click",()=>{e.goToChild()});e.configureLayers();if(e.goToChildButton)e.goToChildButton.$element.remove();e.$overlayContent.prepend(t.$element);e.goToChildButton=t;e.childToScrollBackTo=this}goToChild(){if(this.childToScrollBackTo)this.childToScrollBackTo.scrollToAndHighlightTarget();else console.error("This comment has no child from which the user had navigated earlier.")}copyLink(){var e=this;return o()((function*(){if(e.isLinkBeingCopied)return;const t=e.linkButton,n=e.elementPrototypes.pendingLinkButton.cloneNode(!0);e.replaceButton(e.linkButton,n,"link");yield gi(e);e.replaceButton(e.linkButton,t,"link")}))()}findAddingEdit(){var e=this;return o()((function*(){if(e.addingEdit)return e.addingEdit;const t=new Date(e.date.getTime()-2*cd.g.MILLISECONDS_IN_A_MINUTE).toISOString(),n=new Date(e.date.getTime()+2*cd.g.MILLISECONDS_IN_A_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}).catch(T),o=i.map(t=>cd.g.api.post({action:"compare",fromtitle:e.getSourcePage().getArchivedPage().name,fromrev:t.revid,torelative:"prev",prop:["diff"],formatversion:2}).catch(T)),s=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,a=e.getText(!1)+" "+e.$signature.get(0).innerText,c=[];for(let t=0;t<s.length;t++){var l,u;const n=null===(l=s[t])||void 0===l?void 0:null===(u=l.compare)||void 0===u?void 0:u.body;if(!n)continue;const o=i[t];let d,h="",m="",f=0;for(;d=r.exec(n);){const e=ze(Qe(d[1])),t=G(e,a);if(t>f)f=t;m+=e+"\n";h+=d[1]+"\n"}if(!h.trim())continue;o.diffBody=n;const p=new Date(o.timestamp).getTime(),g=e.date.getTime()+3e4,b=Math.abs(g-p);let y=Math.max(G(m,a),f);if(y<1&&h.includes("{{")){try{const e=(yield pe(h,{title:cd.g.CURRENT_PAGE.name})).html;h=$("<div>").append(e).cdGetText()}catch(e){throw new CdError({type:"parse"})}y=G(h,a)}c.push({revision:o,overlap:y,dateProximity:b})}let d;c.forEach(e=>{if(!d||e.overlap>d.overlap||d&&e.overlap===d.overlap&&e.dateProximity>d.dateProximity)d=e});if(!d)throw new CdError({type:"parse"});e.addingEdit=d.revision;return e.addingEdit}))()}getDiffLink(e){var t=this;return o()((function*(){const n=yield t.findAddingEdit();if(e)return"".concat(mw.config.get("wgServer"),"/?diff=").concat(n.revid);else{const e=decodeURI(cd.g.CURRENT_PAGE.getArchivedPage().getUrl({diff:n.revid}));return"".concat(mw.config.get("wgServer")).concat(e)}}))()}generateDiffView(){var e=this;return o()((function*(){const t=yield e.findAddingEdit(),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.mws("nextdiff")),o=cd.util.wrap(t.parsedcomment,{targetBlank:!0}).addClass("comment"),s=$("<div>").append([i,cd.sParse("cld-summary"),cd.mws("colon-separator"),o]),r=cd.util.wrapDiffBody(t.diffBody);return $("<div>").addClass("cd-diffView-diff").append(s,r)}))()}thankFail(e,t){const{type:n,code:i}=e.data;let o;switch(n){case"parse":{const e=this.getSourcePage().getArchivedPage().getUrl({action:"history"});o=cd.sParse("error-diffnotfound")+" "+cd.sParse("error-diffnotfound-history",e);break}case"api":default:if("noData"===i){const e=this.getSourcePage().getArchivedPage().getUrl({action:"history"});o=cd.sParse("error-diffnotfound")+" "+cd.sParse("error-diffnotfound-history",e)}else{o=cd.sParse("thank-error");console.warn(e)}break;case"network":o=cd.sParse("error-diffnotfound")+" "+cd.sParse("error-network")}mw.notify(cd.util.wrap(o,{targetBlank:!0}),{type:"error"});this.replaceButton(this.thankButton,t,"thank")}thank(){var e=this;return o()((function*(){if(M("mediawiki.diff.styles"))return;const t=e.thankButton,n=e.elementPrototypes.pendingThankButton.cloneNode(!0);e.replaceButton(e.thankButton,n,"thank");let i,o;if(cd.g.GENDER_AFFECTS_USER_STRING&&e.author.isRegistered())i=Pe([e.author]);try{[o]=yield Promise.all([e.findAddingEdit(),i,mw.loader.using("mediawiki.diff.styles")].filter(C))}catch(n){e.thankFail(n,t);return}const s=e.getSourcePage().getArchivedPage().getUrl({diff:o.revid}),r=cd.sParse("thank-confirm",e.author.name,e.author,s),a=cd.util.wrap(r,{tagName:"div",targetBlank:!0}),c=yield e.generateDiffView(),l=$("<div>").append(a,c);if(yield OO.ui.confirm(l,{size:"larger"})){try{yield cd.g.api.postWithEditToken(cd.g.api.assertCurrentUser({action:"thank",rev:o.revid,source:cd.config.scriptCodeName})).catch(T)}catch(n){e.thankFail(n,t);return}mw.notify(cd.s("thank-success"));const n=e.elementPrototypes.thankedButton.cloneNode(!0);e.replaceButton(e.thankButton,n,"thank");Ai[o.revid]={anchor:e.anchor,text:e.getText(),thankUnixTime:Date.now()};U("thanks",Ai)}else e.replaceButton(e.thankButton,t,"thank")}))()}locateInCode(e,t){if(!e)this.inCode=null;let n;this.searchInCode(e||this.getSourcePage().code,t).forEach(e=>{if(!n||e.score>n.score)n=e});if(!n)throw new CdError({type:"parse",code:"locateComment"});const i=this.adjustCommentCodeData(n);if(e)return i;else this.inCode=i}reply(e){if(!this.replyForm)this.replyForm=e instanceof CommentForm_CommentForm?e:new CommentForm_CommentForm({mode:"reply",target:this,dataToRestore:e})}edit(e){if(!this.editForm)this.editForm=e instanceof CommentForm_CommentForm?e:new CommentForm_CommentForm({mode:"edit",target:this,dataToRestore:e});this.$elements.addClass("cd-hidden");this.removeLayers()}codeToText(){if(!this.inCode){console.error("The Comment#inCode property should contain an object with the comment code data.");return}let e,{code:t,indentationChars:n}=this.inCode;({code:t,hidden:e}=et(t));let i=t;if(0===this.level){const e=new RegExp("^(?:\\x01.+?\\x02|\\[\\[".concat(cd.g.FILE_PREFIX_PATTERN,".+\\]\\]) *$"),"i"),t=new RegExp("(?:<".concat(cd.g.PNIE_PATTERN,"(?: [\\w ]+?=[^<>]+?| ?\\/?)>|<\\/").concat(cd.g.PNIE_PATTERN,">|\\x04) *$"),"i"),n=new RegExp("^(?:<\\/".concat(cd.g.PNIE_PATTERN,">|<").concat(cd.g.PNIE_PATTERN,"|\\|)"),"i"),o=/^(=+).*\1[ \t]*$/;i=i.replace(/^((?![:*# ]).+)\n(?![\n:*# \x03])(?=(.*))/gm,(i,s,r)=>s+(e.test(s)||e.test(r)||o.test(s)||o.test(r)||t.test(s)||n.test(r)?"\n":" "))}i=i.replace(/^(?![:*# ]).*<br[ \n]*\/?>.*$/gim,e=>e.replace(/<br[ \n]*\/?>\n? */gi,()=>"\n")).replace(/\n([:*#]*[:*])([ \t]*)/g,(e,t,i)=>{const o=t.slice(n.length);return"\n"+(t.length>=n.length?o+(t.length>n.length?i:""):t+i)});i=F(i,e);if(cd.config.paragraphTemplates.length){const e=cd.config.paragraphTemplates.map(y).join("|"),t="\\{\\{(?:".concat(e,")\\}\\}"),n=new RegExp(t,"g"),o=new RegExp("^(?![:*#]).*".concat(t),"gm");i=i.replace(o,e=>e.replace(n,"\n\n"))}return i.trim()}getCode(){var e=this;return o()((function*(){try{yield e.getSourcePage().getCode();e.locateInCode()}catch(e){if(e instanceof CdError)throw new CdError(Object.assign({},{message:cd.s("cf-error-getpagecode")},e.data));else throw e}}))()}registerSeen(e,t=!1){if(!1===this.isSeen){this.isSeen=!0;if(t)this.highlightTarget()}if(this.isFlashNewOnSightSet){this.isFlashNewOnSightSet=!1;this.flashNew()}const n=cd.comments.some(e=>e.isSeen||e.isFlashNewOnSightSet);if(e&&n){const n=cd.comments[this.id+("forward"===e?1:-1)];if(null==n?void 0:n.isInViewport())n.registerSeen(e,t)}}isInViewport(e=!1){const t=window.pageYOffset,n=t+window.innerHeight;this.getPositions();if(!this.positions)return null;else return e?this.positions.downplayedBottom>t&&this.positions.top<n:this.positions.top>=t&&this.positions.downplayedBottom<=n}removeLayers(){var e;if(this.underlay){null===(e=this.$elementsToAnimate)||void 0===e||e.stop();nt.underlays.splice(nt.underlays.indexOf(this.underlay),1);this.underlay.remove();this.underlay=null;this.$underlay=null;this.overlay.remove();this.overlay=null;this.$overlay=null}}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)}}getParent(){if(void 0===this.cachedParent&&0===this.id)this.cachedParent=null;if(void 0===this.cachedParent&&cd.g.pageHasOutdents){const e=new treeWalker_ElementsTreeWalker(this.elements[0]);for(;e.previousNode()&&!e.currentNode.classList.contains("cd-commentPart");)if(e.currentNode.classList.contains("outdent-template")){this.cachedParent=cd.comments[this.id-1];break}}if(void 0===this.cachedParent&&0===this.level)this.cachedParent=null;if(void 0===this.cachedParent)this.cachedParent=cd.comments.slice(0,this.id).reverse().find(e=>e.getSection()===this.getSection()&&e.level<this.level)||null;return this.cachedParent}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-editMark"];if(cd.config.unsignedClass)i.push(".".concat(cd.config.unsignedClass));const o=i.join(", ");n.find(o).remove();let s=n.cdGetText();if(e){if(cd.config.signatureEndingRegexp)s=s.replace(new RegExp(cd.config.signatureEndingRegexp.source+"$"),"");if(cd.config.signaturePrefixRegexp)s=s.replace(cd.config.signaturePrefixRegexp,"")}this.cachedText=s}return this.cachedText}adjustCommentBeginning({code:e,startIndex:t}){let n="",i=t;const o=e.match(/(^[^]*(?:^|\n))((=+)(.*?)\3[ \t\x01\x02]*\n)/);let s,r,a,c;if(o){s=o[2];r=t+o[1].length;a=o[3].length;c=o[4].trim();t+=o[0].length;e=e.slice(o[0].length);i=this.isOpeningSection?r:t}[cd.config.signatureEndingRegexp,cd.g.TIMEZONE_REGEXP].filter(C).filter(e=>null!==e).forEach(n=>{const o=new RegExp(n.source+"$","m"),s=/^(.+)\n/gm;let r,a;for(;r=s.exec(e);)if(o.test(ze(r[1]))){const t=r.index+r[0].length;if(t===e.length)break;else a=t}if(a){e=e.slice(a);t+=a;i+=a}});cd.g.BAD_COMMENT_BEGINNINGS.forEach(n=>{if("^"!==n.source[0])console.debug('Regexps in cd.config.customBadCommentBeginnings should have "^" as the first character.');const o=e.match(n);if(o){e=e.slice(o[0].length);i=t+o[0].lastIndexOf("\n")+1;t+=o[0].length}});if(this.level>0){const o=(e,o,s)=>{n=s;i=t+o.length;t+=e.length;return""};e=e.replace(new RegExp("^()".concat(cd.config.indentationCharsPattern)),o);if(""===n)e=e.replace(new RegExp("(^[^]*?(?:^|\n))".concat(cd.config.indentationCharsPattern,"(?![^]*\\n[^:*#])")),o)}return{code:e,startIndex:t,lineStartIndex:i,headingMatch:o,headingCode:s,headingStartIndex:r,headingLevel:a,headlineCode:c,indentationChars:n}}adjustCommentCodeData(e){var t;const n=Object.assign({},e),i=e=>{n.signatureDirtyCode=e+n.signatureDirtyCode;n.endIndex-=e.length;return""};if(this.isOwn&&cd.g.CURRENT_USER_SIGNATURE_PREFIX_REGEXP)n.code=n.code.replace(cd.g.CURRENT_USER_SIGNATURE_PREFIX_REGEXP,i);const o=new RegExp("(<".concat(cd.g.PIE_PATTERN,"(?: [\\w ]+?=[^<>]+?)?> *)+$"),"i");n.code=((e,t)=>{t.forEach(t=>{e=e.replace(t,i)});return e})(n.code,[cd.config.signaturePrefixRegexp,o,cd.config.signaturePrefixRegexp,o,new RegExp('<small class="'.concat(cd.config.unsignedClass,'">.*$')),/<!-- *Template:Unsigned.*$/,cd.config.signaturePrefixRegexp]);const s=[{start:/^<small>/,end:/<\/small>[ \u00A0\t]*$/}];if(null===(t=cd.config.smallDivTemplates)||void 0===t?void 0:t[0])s.push({start:new RegExp("^(?:\\{\\{(".concat(cd.config.smallDivTemplates.join("|"),")\\|(?: *1 *= *|(?![^{]*=)))"),"i"),end:/\}\}[ \u00A0\t]*$/});n.signatureCode=n.signatureDirtyCode;n.inSmallFont=!1;s.some(e=>{if(e.start.test(n.code)&&e.end.test(n.signatureCode)){n.inSmallFont=!0;n.code=n.code.replace(e.start,"");n.signatureCode=n.signatureCode.replace(e.end,"");return!0}});n.replyIndentationChars=n.indentationChars;if(!this.isOpeningSection){const e=(n.code+n.signatureDirtyCode).match(/\n([:*#]*[:*]).*$/);if(e){n.replyIndentationChars=e[1];if(n.replyIndentationChars.length<n.indentationChars.length){const e=n.indentationChars.slice(n.replyIndentationChars.length)+" ";n.code=e+n.code;n.indentationChars=n.indentationChars.slice(0,n.replyIndentationChars.length);n.startIndex-=e.length}}}n.replyIndentationChars+=cd.config.defaultIndentationChar;return n}searchInCode(e,t){const n=Je(e);let i=n.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}));const o=t?t.previousComments:cd.comments.slice(Math.max(0,this.id-2),this.id).reverse(),s=t?t.id:this.id;let r,a;if(t){var c;r=t.followsHeading;a=null===(c=t.section)||void 0===c?void 0:c.headline}else{var l;r=this.followsHeading;a=null===(l=this.getSection())||void 0===l?void 0:l.headline}i.forEach(i=>{i.code=e.slice(i.startIndex,i.endIndex);i.hasIdMatched=s===i.id;if(o.length){i.hasPreviousCommentsDataMatched=!1;i.hasPreviousCommentDataMatched=!1;for(let e=0;e<o.length;e++){const t=n[i.id-1-e];if(!t)break;i.hasPreviousCommentsDataMatched=t.timestamp===o[e].timestamp&&t.author.name===o[e].authorName;if(!1!==i.isPreviousCommentsDataEqual)i.isPreviousCommentsDataEqual=i.timestamp===t.timestamp&&i.author===t.author;if(0===e)i.hasPreviousCommentDataMatched=i.hasPreviousCommentsDataMatched;if(!i.hasPreviousCommentsDataMatched)break}}else{i.hasPreviousCommentsDataMatched=0===i.id;i.hasPreviousCommentDataMatched=0===i.id}i.isPreviousCommentsDataEqual=Boolean(i.isPreviousCommentsDataEqual);Object.assign(i,this.adjustCommentBeginning(i));i.hasHeadlineMatched=r?i.headingMatch&&a&&Ke(ze(i.headlineCode))===Ke(a):!i.headingMatch;const c=t?t.text:this.getText();i.overlap=G(c,ze(i.code));i.score=2*(i.overlap>.66||0!==s&&i.hasPreviousCommentsDataMatched&&!i.isPreviousCommentsDataEqual||0===s&&i.hasPreviousCommentsDataMatched&&i.hasHeadlineMatched)+i.overlap+1*i.hasHeadlineMatched+.5*i.hasPreviousCommentsDataMatched+1e-4*i.hasIdMatched});i=i.filter(e=>e.score>2.5);return i}modifyCode({pageCode:e,action:t,doDelete:n,commentForm:i,thisInCode:o,commentCode:s}){o=o||this.inCode;let r,a,c;if("reply"===t){r=o.endIndex;let t=Ge(e);if(cd.g.CLOSED_DISCUSSION_PAIR_REGEXP)t=t.replace(cd.g.CLOSED_DISCUSSION_PAIR_REGEXP,(e,t)=>"\x01".repeat(t.length)+" ".repeat(e.length-t.length-1)+"\x02");if(cd.g.CLOSED_DISCUSSION_SINGLE_REGEXP){let e;for(;e=cd.g.CLOSED_DISCUSSION_SINGLE_REGEXP.exec(t);)t=t.slice(0,e.index)+Ze(t.slice(e.index),null,e[1].length).code}let n=r+t.slice(r).match(/\n+(=+).*?\1[ \t\x01\x02]*\n|$/).index+1,i=e.slice(r,n);cd.config.keepInSectionEnding.forEach(e=>{const t=i.match(e);if(t)n-=t[0].length-1});const s=t.slice(r,n),a=o.replyIndentationChars.length-1,c=new RegExp("^([^]*?(?:"+mw.util.escapeRegExp(o.signatureCode)+"|"+cd.g.TIMESTAMP_REGEXP.source+".*"+(cd.g.UNSIGNED_TEMPLATES_PATTERN?"|".concat(cd.g.UNSIGNED_TEMPLATES_PATTERN,".*"):"")+"|(?:^|\\n)\\x01.+)\\n)\\n*(?:"+"[:*#\\x01]{0,".concat(a,"}(?![:*#\\n\\x01])")+(a>0?"|[:*#\\x01]{1,".concat(a,"}(?![:*\\n\\x01])"):"")+")");let[,l]=s.match(c)||[];if(void 0===l)throw new CdError({type:"parse",code:"findPlace"});if(s.slice(l.length).startsWith("|}\n"))l+="|}\n";const[,u]=l.match(/\n([:*#]{2,}|#[:*#]*).*\n$/)||[];if(u)o.replyIndentationChars=u.slice(0,o.replyIndentationChars.length).replace(/:$/,cd.config.defaultIndentationChar);r+=l.length}if(!s&&i&&!n)({commentCode:s}=i.commentTextToCode("submit"));switch(t){case"reply":c=e.slice(0,r);a=c+s+e.slice(r);break;case"edit":if(n){let t,n;if(this.isOpeningSection&&void 0!==o.headingStartIndex){this.getSection().locateInCode();if(Je(this.getSection().inCode.code).length>1)throw new CdError({type:"parse",code:"delete-repliesInSection"});else({startIndex:t,contentEndIndex:n}=this.getSection().inCode)}else{n=o.signatureEndIndex+1;const i=e.slice(o.endIndex);if(new RegExp("^.+\\n+[:*#]{".concat(o.indentationChars.length+1,",}")).exec(i))throw new CdError({type:"parse",code:"delete-repliesToComment"});else t=o.lineStartIndex}a=e.slice(0,t)+e.slice(n)}else{const t=o.lineStartIndex;c=e.slice(0,t);a=c+s+e.slice(o.signatureEndIndex)}}return{newPageCode:a,codeBeforeInsertion:c,commentCode:s}}getLayersContainer(){if(void 0===this.cachedLayersContainer){let e;const t=new TreeWalker(document.body,null,!0,this.elements[0]);for(;t.parentNode();){let n=t.currentNode.conveneintDiscussionsStyle;if(!n){n=window.getComputedStyle(t.currentNode);t.currentNode.conveneintDiscussionsStyle=n}if(["absolute","relative"].includes(n.position))e=t.currentNode;const i=n.backgroundColor;if(i.includes("rgb(")||"none"!==n.backgroundImage){if(i.includes("rgb("))this.backgroundColor=i;if(!e){e=t.currentNode;e.classList.add("cd-commentLayersContainerParent-relative")}}if(e)break}if(!e)e=document.body;e.classList.add("cd-commentLayersContainerParent");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;if(!nt.layersContainers.includes(n))nt.layersContainers.push(n)}return this.cachedLayersContainer}getLayersContainerOffset(){const e=this.getLayersContainer();let t=e.cdCachedLayersContainerTop,n=e.cdCachedLayersContainerLeft;if(void 0===t||e.cdCouldHaveMoved){let i,o=e;t=0;n=0;for(;i=o.offsetParent;){t+=i.offsetTop;n+=i.offsetLeft;o=i}e.cdCouldHaveMoved=!1;e.cdCachedLayersContainerTop=t;e.cdCachedLayersContainerLeft=n}return{top:t,left:n}}requestAuthorGenderIfNeeded(e,t=!1){if(cd.g.GENDER_AFFECTS_USER_STRING&&this.author.isRegistered()&&!this.author.getGender()){this.genderRequestCallbacks=this.genderRequestCallbacks||[];let t;if(!this.genderRequest){this.genderRequest=Pe([this.author]);t=e=>{console.warn("Couldn't get the gender of user ".concat(this.author.name,"."),e)}}if(!this.genderRequestCallbacks.includes(e)){this.genderRequest.then(e,t);this.genderRequestCallbacks.push(e)}}else if(t)setTimeout(e)}getSourcePage(){const e=this.getSection();return e?e.getSourcePage():cd.g.CURRENT_PAGE}showDiff(e,t){var n=this;return o()((function*(){var i,o,s,r;if(M("mediawiki.diff.styles"))return;let a=Math.min(mw.config.get("wgRevisionId"),e),c=Math.max(mw.config.get("wgRevisionId"),e);const l=cd.g.api.post({action:"query",revids:[a,c],prop:"revisions",rvslots:"main",rvprop:["ids","content"],redirects:!0,formatversion:2}).catch(T),u=cd.g.api.post({action:"compare",fromtitle:n.getSourcePage().name,fromrev:a,torev:c,prop:["diff"],formatversion:2}).catch(T);let[d,h]=yield Promise.all([l,u,mw.loader.using("mediawiki.diff.styles")]);const m=null===(i=d.query)||void 0===i?void 0:null===(o=i.pages)||void 0===o?void 0:null===(s=o[0])||void 0===s?void 0:s.revisions;if(!m)throw new CdError({type:"api",code:"noData"});const f=[[],[]];m.forEach((e,i)=>{const o=e.slots.main.content,s=n.locateInCode(o,t[i]),r=o.slice(0,s.lineStartIndex).match(/\n/g)||[],a=o.slice(s.lineStartIndex,s.signatureEndIndex).match(/\n/g)||[],c=r.length+1,l=c+a.length;for(let e=c;e<=l;e++)f[i].push(e)});const p=null==h?void 0:null===(r=h.compare)||void 0===r?void 0:r.body;if(!p)throw new CdError({type:"api",code:"noData"});const g=$(cd.util.wrapDiffBody(p));let b=[],y="";g.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+/);b[e]=Number((t||[])[0]);if(!b[e])throw new CdError({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(f[e].includes(b[e]))o=!0;b[e]++}if(o)y+=n.prop("outerHTML")});const v=$(cd.util.wrapDiffBody(y));if(!v.find(".diff-deletedline, .diff-addedline").length)throw new CdError({type:"parse",message:cd.s("comment-edited-diff-empty")});const w=$("<a>").attr("href",n.getSourcePage().getUrl({action:"history"})).attr("target","_blank").text(cd.s("comment-edited-history")),E=$("<div>").addClass("cd-commentDiffView-below").append(w),C=$("<div>").append(v,E);OO.ui.alert(C,{size:"larger"})}))()}}Object.assign(Comment_Comment,Ti);let Li=!0;function Bi(e){return Mi.apply(this,arguments)}function Mi(){return(Mi=o()((function*({dataRequest:e}){cd.g.api=cd.g.api||new mw.Api;const t=ce(!0).catch(e=>{console.warn("Couldn't load the settings from the server.",e)});e=e||Ht();try{yield Promise.all([t,e])}catch(e){throw["Couldn't load the messages required for the script.",e]}cd.g.nanoCss=Object(r.create)();cd.g.nanoCss.put(".cd-commentLink-innerWrapper",{"::before":{content:'"'.concat(cd.mws("parentheses-start"),'"')},"::after":{content:'"'.concat(cd.mws("parentheses-end"),'"')}});cd.g.PHP_CHAR_TO_UPPER_JSON=mw.loader.moduleRegistry["mediawiki.Title"].script.files["phpCharToUpper.json"];cd.g.CURRENT_PAGE=new Page_Page(cd.g.CURRENT_PAGE_NAME);cd.g.QQX_MODE="qqx"===mw.util.getParamValue("uselang");Ut();xi=cd.mws("colon-separator").trim();[Si]=cd.s("es-move-from").match(/^[^[$]+/)||[];[ki]=cd.s("es-move-to").match(/^[^[$]+/)||[];Ni="".concat(cd.s("lp-comment-tooltip")," ").concat(cd.mws("parentheses",cd.s("lp-comment-toyou")));Pi="".concat(cd.s("lp-comment-tooltip")," ").concat(cd.mws("parentheses",cd.s("lp-comment-watchedsection")));const n=$("<a>").text(cd.s("lp-comment")).attr("title",cd.s("lp-comment-tooltip")),i=$("<span>").addClass("cd-commentLink-innerWrapper").append(n);Ii=$("<span>").addClass("cd-commentLink").append(i).prepend(" ");Fi=Ii.clone().addClass("cd-commentLink-interesting");const o=y(cd.g.CURRENT_USER_NAME).replace(/ /g,"[ _]");Oi=new RegExp("(?:^|[^".concat(cd.g.LETTER_PATTERN,"])").concat(o,"(?![").concat(cd.g.LETTER_PATTERN,"])"))}))).apply(this,arguments)}function Ri(){mw.hook("wikipage.content").add(()=>{if(Di)Di.setFlags({progressive:!1})});const e=$("<div>").addClass("cd-watchlistMenu");$("<a>").attr("href",mw.util.getUrl(cd.config.scriptPageWikilink)).attr("target","_blank").addClass("cd-watchlistMenu-scriptPageLink").text(cd.s("script-name-short")).appendTo(e);Di=new OO.ui.ButtonWidget({framed:!1,icon:"speechBubble",label:cd.s("wl-button-switchinteresting-tooltip"),invisibleLabel:!0,title:cd.s("wl-button-switchinteresting-tooltip"),classes:["cd-watchlistMenu-button","cd-watchlistMenu-button-switchInteresting"],disabled:!cd.g.watchedSections});Di.on("click",()=>{!function(){const e=!$(".mw-changeslist").find("ul.special").length,t=cd.g.$content.find(".mw-changeslist .mw-collapsible:not(.mw-changeslist-legend)"),n=cd.g.$content.find(".mw-changeslist-line:not(.mw-collapsible)");if(Di.hasFlag("progressive")){if(e)n.filter("table").show();else n.not(":has(.cd-commentLink-interesting)").show();t.not(":has(.cd-commentLink-interesting)").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-interesting").find(".mw-enhancedchanges-arrow").click();t.not(":has(.cd-commentLink-interesting)").find(".mw-rcfilters-ui-highlights-enhanced-toplevel").hide();n.not(":has(.cd-commentLink-interesting)").hide()}Di.setFlags({progressive:!Di.hasFlag("progressive")})}()});Di.$element.appendTo(e);const t=new OO.ui.ButtonWidget({framed:!1,icon:"listBullet",label:cd.s("wl-button-editwatchedsections-tooltip"),invisibleLabel:!0,title:cd.s("wl-button-editwatchedsections-tooltip"),classes:["cd-watchlistMenu-button","cd-watchlistMenu-button-editWatchedSections"]});t.on("click",mi);t.$element.appendTo(e);const n=new OO.ui.ButtonWidget({framed:!1,icon:"settings",label:cd.s("wl-button-settings-tooltip"),invisibleLabel:!0,title:cd.s("wl-button-settings-tooltip"),classes:["cd-watchlistMenu-button","cd-watchlistMenu-button-scriptSettings"]});n.on("click",()=>{di()});n.$element.appendTo(e);cd.g.$content.find(".mw-rcfilters-ui-changesLimitAndDateButtonWidget").prepend(e);cd.g.$content.find("#mw-watchlist-options .mw-changeslist-legend").after(e)}function ji(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 Hi(e){return Si&&e.includes(": "+Si)||ki&&e.includes(": "+ki)}function $i(e){return e.includes("Archiving")}function Ui(e,t){if(!t)return!1;else return"ltr"===cd.g.SITE_DIR?e.includes("\u2192".concat(t).concat(xi))||e.endsWith("\u2192".concat(t)):e.includes("\u2190".concat(t).concat(xi))||e.endsWith("\u2190".concat(t))}function Yi(e){if("Watchlist"===mw.config.get("wgCanonicalSpecialPageName")&&!cd.g.$content.find(".cd-watchlistMenu").length){Kt();if(mw.user.options.get("wlenhancedfilters-disable"))Ri();else mw.hook("structuredChangeFilters.ui.initialized").add(()=>{Ri()});$(".mw-rcfilters-ui-filterWrapperWidget-showNewChanges a").on("click",o()((function*(){try{yield ce()}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 s=("TR"===e.tagName?e.parentNode:e).querySelector(".mw-changeslist-title");if(!s)return;if(!v(s.textContent,o))return;if(e.querySelector(".minoredit"))return;let r=null===(t=e.querySelector(".comment"))||void 0===t?void 0:t.textContent;r=r&&Y(r);if(r&&(w(r)||E(r)||Hi(r)))return;const a=e.querySelector(".mw-plusminus-pos");if(!a)return;if("STRONG"!==a.tagName){const e=a.textContent.match(/\d+/),t=e&&Number(e[0]);if(!t||t<cd.config.bytesToDeemComment)return}const c=null===(n=e.getAttribute("data-mw-ts"))||void 0===n?void 0:n.slice(0,12);if(!c)return;const l=ji(e);if(!l)return;const u=c+"_"+x(l),d=s.href;if(!d)return;let h;if(r&&Oi.test(" ".concat(r," "))){h=Fi.get(0).cloneNode(!0);h.lastChild.lastChild.title=Ni}else{let t=!1;if(r){var m;const n=e.querySelector(".mw-changeslist-diff-cur")||e.querySelector(".mw-changeslist-history"),i=null==n?void 0:null===(m=n.href)||void 0===m?void 0:m.match(/[&?]curid=(\d+)/),o=i&&Number(i[1]);if(o){var f;const e=(null===(f=cd.g.watchedSections)||void 0===f?void 0:f[o])||[];if(e.length){for(let n=0;n<e.length;n++)if(Ui(r,e[n])){t=!0;break}if(t){h=Fi.get(0).cloneNode(!0);h.lastChild.lastChild.title=Pi}}}}if(!t)h=Ii.get(0).cloneNode(!0)}h.lastChild.lastChild.href="".concat(d,"#").concat(u);const p=e.querySelector(".comment")||e.querySelector(".mw-usertoollinks");if(p)p.parentNode.insertBefore(h,p.nextSibling)})}function qi(e){const t=mw.user.options.get("timecorrection"),n=null==t?void 0:t.split("|"),i=n&&Number(n[1]);if(null==i||isNaN(i))return;const o=e.get(0).querySelector(".mw-contributions-list");Array.from(o.children).forEach(e=>{var t;const n=e.querySelector(".mw-contributions-title");if(!n)return;const o=n.textContent;if(!new Page_Page(o).isProbablyTalkPage())return;const s=n.href;if(!s)return;if(e.querySelector(".minoredit"))return;const r=null===(t=e.querySelector(".comment"))||void 0===t?void 0:t.textContent;if(r&&(w(r)||E(r)||Hi(r)))return;const a=e.querySelector(".mw-plusminus-pos");if(!a)return;if("STRONG"!==a.tagName){const e=a.textContent.match(/\d+/),t=e&&Number(e[0]);if(!t||t<cd.config.bytesToDeemComment)return}const c=e.querySelector(".mw-changeslist-date");if(!c)return;const{date:l}=Re(c.textContent,i)||{};if(!l)return;const u=$e(l,mw.config.get("wgRelevantUserName"));let d;if(r&&Oi.test(" ".concat(r," "))){d=Fi.get(0).cloneNode(!0);d.lastChild.lastChild.title=Ni}else d=Ii.get(0).cloneNode(!0);d.lastChild.lastChild.href="".concat(s,"#").concat(u);let h=e.querySelector(".comment");if(!h){h=n;h.nextSibling.textContent=h.nextSibling.textContent.replace(/^\s/,"")}h.parentNode.insertBefore(d,h.nextSibling)})}function Wi(e){const t=mw.user.options.get("timecorrection"),n=null==t?void 0:t.split("|"),i=n&&Number(n[1]);if(null==i||isNaN(i))return;const o=e.get(0).querySelector("#pagehistory"),s=Array.from(o.children),r=cd.g.CURRENT_PAGE.getUrl();s.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&&Y(n);if(n&&(w(n)||E(n)||Hi(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.config.bytesToDeemComment)return}const s=e.querySelector(".mw-changeslist-date");if(!s)return;const{date:a}=Re(s.textContent,i)||{};if(!a)return;const c=ji(e);if(!c)return;const l=$e(a,c);let u;if(n&&Oi.test(" ".concat(n," "))){u=Fi.get(0).cloneNode(!0);u.lastChild.lastChild.title=Ni}else{let e=!1;if(n){var d;const t=(null===(d=cd.g.watchedSections)||void 0===d?void 0:d[mw.config.get("wgArticleId")])||[];if(t.length){for(let i=0;i<t.length;i++)if(Ui(n,cd.g.thisPageWatchedSections[i])){e=!0;break}if(e){u=Fi.get(0).cloneNode(!0);u.lastChild.lastChild.title=Pi}}}if(!e)u=Ii.get(0).cloneNode(!0)}u.lastChild.lastChild.href="".concat(r,"#").concat(l);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(u,h.nextSibling)})}function Gi(){return Vi.apply(this,arguments)}function Vi(){return(Vi=o()((function*(){if(!Li)return;const e=mw.user.options.get("timecorrection"),t=null==e?void 0:e.split("|"),n=t&&Number(t[1]);if(null!=n&&!isNaN(n)){[document.querySelector(".diff-otitle"),document.querySelector(".diff-ntitle")].filter(e=>null!==e).forEach(e=>{var t;if(e.querySelector(".minoredit"))return;let i=null===(t=e.querySelector(".comment"))||void 0===t?void 0:t.textContent;i=i&&Y(i);if(i&&(w(i)||E(i)||Hi(i)||$i(i)))return;const o=e.querySelector("#mw-diff-otitle1 a, #mw-diff-ntitle1 a");if(!o)return;const{date:s}=Re(o.textContent,n)||{};if(!s)return;const r=ji(e);if(!r)return;const a=$e(s,r);let c=Comment_Comment.getByAnchor(a);if(!c){let e;for(let t=1;!c&&t<=5;t++){e=$e(new Date(s.getTime()-cd.g.MILLISECONDS_IN_A_MINUTE*t),r);c=Comment_Comment.getByAnchor(e)}}if(c){let t;if(i&&Oi.test(" ".concat(i," "))){t=Fi.get(0).cloneNode(!0);t.lastChild.lastChild.title=Ni}else{let e=!1;if(i&&cd.g.thisPageWatchedSections.length){for(let t=0;t<cd.g.thisPageWatchedSections.length;t++)if(Ui(i,cd.g.thisPageWatchedSections[t])){e=!0;break}if(e){t=Fi.get(0).cloneNode(!0);t.lastChild.lastChild.title=Pi}}if(!e)t=Ii.get(0).cloneNode(!0)}const n="#"+a;t.lastChild.lastChild.href=n;t.onclick=function(e){e.preventDefault();c.scrollToAndHighlightTarget(!1,!0)};const o=e.querySelector("#mw-diff-otitle3, #mw-diff-ntitle3");if(!o)return;o.appendChild(t)}});mw.hook("convenientDiscussions.commentLinksCreated").fire(cd);Li=!1}}))).apply(this,arguments)}function zi(e){return Ki.apply(this,arguments)}function Ki(){return(Ki=o()((function*(e){if(e.parent().length){if(["Recentchanges","Watchlist"].includes(mw.config.get("wgCanonicalSpecialPageName")))Yi(e);else if("Contributions"===mw.config.get("wgCanonicalSpecialPageName"))qi(e);else if("history"===mw.config.get("wgAction")&&cd.g.CURRENT_PAGE.isProbablyTalkPage())Wi(e);mw.hook("convenientDiscussions.commentLinksCreated").fire(cd)}}))).apply(this,arguments)}function Xi(){return(Xi=o()((function*({dataRequest:e}){try{yield Bi({dataRequest:e})}catch(e){console.warn(...e);return}if(cd.g.IS_DIFF_PAGE)mw.hook("convenientDiscussions.pageReady").add(Gi);else mw.hook("wikipage.content").add(zi)}))).apply(this,arguments)}var Ji=n(5),Qi={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("".concat(e,": ").concat(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 ".concat(e,": ").concat(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 ".concat(e));return}const t=this.timerAllRunsTotal[e]/this.timerRunCount[e];console.debug("".concat(e,": ").concat(t.toFixed(1)," average for ").concat(this.timerRunCount[e]," runs"))},incrementCounter(e){this.counters[e]++}},Zi={messages:{},contribsPage:null,localTimezoneOffset:null,customTalkNamespaces:mw.config.get("wgExtraSignatureNamespaces"),pageWhitelist:[],pageBlacklist:[],userNamespacesByGender:null,archivePaths:[],pagesWithoutArchives:[],idleFragments:[],defaultIndentationChar:":",spaceAfterIndentationChars:!0,indentationCharMode:"mimic",defaultSignaturePrefix:" ",signaturePrefixRegexp:/(?:\s+>+)?(?:[\xb7\u2022\-\u2013\u2014\u2015~/\u2192\u21d2\s]|&mdash;|&ndash;|&rarr;|&middot;|&nbsp;|&#32;|&rlm;)*\(?'*$/,signatureEndingRegexp:null,tagName:null,scriptCodeName:"convenient-discussions",optionsPrefix:"convenientDiscussions",scriptPageWikilink:"c:Special:MyLanguage/User:JWBTH/CD",unsignedTemplates:["unsigned","unsignedIP","unsigned2","unsignedIP2"],unsignedClass:"autosigned",pairQuoteTemplates:[[],[]],smallDivTemplates:[],paragraphTemplates:[],mentionCharacter:"@",mentionRequiresLeadingSpace:!0,quoteFormatting:["> ''","''\n"],elementsToExcludeClasses:[],templatesToExclude:[],commentAntipatterns:[],customBadCommentBeginnings:[],keepInSectionEnding:[/\n{2,}(?:<!--[^]*?-->\s*)+$/],signatureScanLimit:100,foreignElementsInHeadlinesClasses:[],customFloatingElementSelectors:[],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 convenientDiscussions.s("move-sourcepagecode",e,t,n)+"\n"},getMoveTargetPageCode:function(e,t){return convenientDiscussions.s("move-targetpagecode",e,t)+"\n"},getAnchorCode:function(e){return'<span id="'+e+"></span>"}},eo={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_FOCUSED_COLOR:"#eaf3ff",COMMENT_TARGET_COLOR:"#ffedb8",COMMENT_NEW_COLOR:"#e8ffd1",COMMENT_OWN_COLOR:"#f7ebff",COMMENT_DELETED_COLOR:"#fee7e6",COMMENT_UNDERLAY_SIDE_MARGIN:5,HIGHLIGHT_NEW_COMMENTS_INTERVAL:15,UPDATE_CHECK_INTERVAL:15,BACKGROUND_UPDATE_CHECK_INTERVAL:60,SECONDS_IN_A_DAY:86400,MILLISECONDS_IN_A_MINUTE:6e4,POPULAR_NOT_INLINE_ELEMENTS:["BLOCKQUOTE","DD","DIV","DL","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"],UNHIGHLIGHTABLE_ELEMENT_CLASSES:["mw-empty-elt","tleft","tright","floatleft","floatright"],BAD_COMMENT_BEGINNINGS:[/^<!--[^]*?--> *\n+/,/^(?:----+|<hr>) *\n+/,/^\{\|.*?\|\} *\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("~~")},to={wrap(e,t={}){const n=$(e instanceof $?e:$.parseHTML(e)).wrapAll("<".concat(t.tagName||"span",">")).parent();if(t){if(t.callbacks)Object.keys(t.callbacks).forEach(e=>{const i=n.find(".".concat(e));if(!i.find("a").length)i.wrapInner("<a>");i.find("a").on("click",t.callbacks[e])});if(t.targetBlank)n.find("a[href]").attr("target","_blank")}return n},buildEditSummary(e){if(void 0===e.addPostfix)e.addPostfix=!0;let t,n=(e.section?"/* ".concat(e.section," */ "):"")+e.text.trim();if(e.optionalText){let i=n+e.optionalText;if(cd.config.transformSummary)i=cd.config.transformSummary(i);if(i.length<=cd.g.SUMMARY_LENGTH_LIMIT){n=i;t=!0}}if(!t){if(cd.config.transformSummary)n=cd.config.transformSummary(n);if(n.length>cd.g.SUMMARY_LENGTH_LIMIT)n=n.slice(0,cd.g.SUMMARY_LENGTH_LIMIT-1)+"\u2026"}if(e.addPostfix)n+=cd.g.SUMMARY_POSTFIX;return n},isPageOverlayOn:()=>document.body.classList.contains("oo-ui-windowManager-modal-active")||ln(),wrapDiffBody:e=>'<table class="diff"><col class="diff-marker"><col class="diff-content"><col class="diff-marker"><col class="diff-content">'+e+"</table>"};if(0);function no(e,...t){if(!e)return null;const n="convenient-discussions-".concat(e);if(!cd.g.QQX_MODE&&"string"==typeof mw.messages.get(n)){let e={},i=t[t.length-1];if("object"==typeof i&&!i.options){e=i;t.splice(t.length-1)}const o=mw.message(n,...t);if(e.plain)return o.plain();else if(e.parse)return o.parse();else return o.text()}else{const e=t.length?": ".concat(t.join(", ")):"";return"(".concat(n).concat(e,")")}}function io(...e){return no(...e,{parse:!0})}function oo(e){return no(e,{plain:!0})}function so(...e){return mw.message(...e).parse()}function ro(e){if(-1===cd.g.CURRENT_NAMESPACE_NUMBER)return;const t=new mw.Uri;t.query.cdtalkpage=e?"1":"0";const n=$("<li>").attr("id",e?"footer-places-enablecd":"footer-places-disablecd");$("<a>").attr("href",t.toString()).addClass("noprint").text(cd.s(e?"footer-runcd":"footer-dontruncd")).appendTo(n);$("#footer-places").append(n)}function ao(){cd.debug.startTimer("start");cd.config=Object.assign(Zi,cd.config);!function(){const e=["es-","cf-autocomplete-commentlinktext","move-"];if(1)n(10);cd.strings={};Object.keys(cd.i18n.en).forEach(t=>{var n;const i=e.some(e=>t===e||e.endsWith("-")&&t.startsWith(e))?mw.config.get("wgContentLanguage"):mw.config.get("wgUserLanguage");cd.strings[t]=(null===(n=cd.i18n[i])||void 0===n?void 0:n[t])||cd.i18n.en[t]});Object.keys(cd.strings).forEach(e=>{mw.messages.set("convenient-discussions-".concat(e),cd.strings[e])})}();cd.g.SETTINGS_OPTION_NAME="userjs-convenientDiscussions-settings";cd.g.LOCAL_SETTINGS_OPTION_NAME="userjs-".concat(cd.config.optionsPrefix,"-localSettings");cd.g.VISITS_OPTION_NAME="userjs-".concat(cd.config.optionsPrefix,"-visits");const e="ru.wikipedia.org"===location.hostname?"watchedTopics":"watchedSections";cd.g.WATCHED_SECTIONS_OPTION_NAME="userjs-".concat(cd.config.optionsPrefix,"-").concat(e);cd.g.IS_DIFF_PAGE=mw.config.get("wgIsArticle")&&/[?&]diff=[^&]/.test(location.search);cd.g.CURRENT_PAGE_NAME=A(mw.config.get("wgPageName"));cd.g.CURRENT_PAGE_TITLE=A(mw.config.get("wgTitle"));cd.g.CURRENT_NAMESPACE_NUMBER=mw.config.get("wgNamespaceNumber");cd.g.CURRENT_USER_NAME=mw.config.get("wgUserName");cd.g.PAGE_WHITELIST_REGEXP=O(cd.config.pageWhitelist);cd.g.PAGE_BLACKLIST_REGEXP=O(cd.config.pageBlacklist);cd.g.SITE_DIR=document.body.classList.contains("sitedir-rtl")?"rtl":"ltr";cd.g.$content=$("#mw-content-text");const t=/[?&]cdtalkpage=(1|true|yes|y)(?=&|$)/.test(location.search);if(mw.config.get("wgIsArticle")&&!mw.config.get("wgIsRedirect"))if(!/[?&]cdtalkpage=(0|false|no|n)(?=&|$)/.test(location.search)&&(!cd.g.$content.find(".cd-notTalkPage").length||t)&&(v(cd.g.CURRENT_PAGE_NAME,cd.g.CURRENT_NAMESPACE_NUMBER)||$("#ca-addsection").length||cd.g.$content.find(".cd-talkPage").length||t)){cd.g.isFirstRun=!0;an();cd.debug.stopTimer("start");cd.debug.startTimer("loading data");let e;if("ready"===mw.loader.getState("mediawiki.api"))e=Ht();let t=mw.loader.using(["jquery.color","jquery.client","mediawiki.Title","mediawiki.api","mediawiki.cookie","mediawiki.jqueryMsg","mediawiki.notification","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"]);Promise.all([t,e].filter(C)).then(()=>{try{Lt({dataRequest:e})}catch(e){mw.notify(cd.s("error-processpage"),{type:"error"});cn();console.error(e)}},e=>{mw.notify(cd.s("error-loaddata"),{type:"error"});cn();console.error(e)});setTimeout(()=>{if(ln()){cn();console.warn("The loading overlay stays for more than 10 seconds; removing it.")}},1e4);cd.g.REGULAR_LINE_HEIGHT=parseFloat(window.getComputedStyle(cd.g.$content.get(0)).lineHeight);!function(){var e;cd.g.nanoCss=Object(r.create)();cd.g.nanoCss.put(":root",{"--cd-comment-focused-color":cd.g.COMMENT_FOCUSED_COLOR,"--cd-comment-target-color":cd.g.COMMENT_TARGET_COLOR,"--cd-comment-new-color":cd.g.COMMENT_NEW_COLOR,"--cd-comment-own-color":cd.g.COMMENT_OWN_COLOR,"--cd-comment-deleted-color":cd.g.COMMENT_DELETED_COLOR});const t=$(document.documentElement).css("--cd-comment-focused-color");cd.g.nanoCss.put(":root",{"--cd-comment-focused-transparent-color":g(t)});cd.g.nanoCss.put(".ltr .cd-commentOverlay-gradient",{backgroundImage:"linear-gradient(to left, var(--cd-comment-focused-color), var(--cd-comment-focused-transparent-color))"});cd.g.nanoCss.put(".rtl .cd-commentOverlay-gradient",{backgroundImage:"linear-gradient(to right, var(--cd-comment-focused-color), var(--cd-comment-focused-transparent-color))"});const n=$("#content").css("background-color")||"#fff";cd.g.nanoCss.put(".cd-messageArea .cd-closeButton",{backgroundColor:n});const i=$(".skin-timeless").length?"#eaecf0":$(document.body).add(".mw-page-container").last().css("background-color");cd.g.nanoCss.put("#cd-currentSection",{backgroundColor:g(i).replace("0)","0.8)"),width:(null===(e=$(".mw-body").get(0))||void 0===e?void 0:e.getBoundingClientRect().left)-18+"px"});cd.g.nanoCss.put("#cd-currentSection:hover",{backgroundColor:i})}();n(6);n(16);n(18);n(20);n(22);n(24);n(26);n(28);ro(!1)}else ro(!0);if(["Watchlist","Contributions","Recentchanges"].includes(mw.config.get("wgCanonicalSpecialPageName"))||"history"===mw.config.get("wgAction")&&v(cd.g.CURRENT_PAGE_NAME,cd.g.CURRENT_NAMESPACE_NUMBER)||cd.g.IS_DIFF_PAGE){let e;if("ready"===mw.loader.getState("mediawiki.api")){e=Ht();if(!cd.g.IS_DIFF_PAGE)be(!0).catch(e=>{console.warn(e)})}mw.loader.using(["user.options","mediawiki.Title","mediawiki.api","mediawiki.jqueryMsg","mediawiki.util","mediawiki.user","oojs","oojs-ui","oojs-ui.styles.icons-interactions","oojs-ui.styles.icons-editing-list","oojs-ui.styles.icons-alerts"]).then(()=>{!function(e){Xi.apply(this,arguments)}({dataRequest:e});n(6);n(30)},e=>{mw.notify(cd.s("error-loaddata"),{type:"error"});console.error(e)})}if("Search"===mw.config.get("wgCanonicalSpecialPageName"))!function(){const[,e]=location.search.match(/[?&]cdcomment=([^&]+)(?:&|$)/)||[];if(e)mw.loader.using("mediawiki.api").then(o()((function*(){yield Ht();$(".mw-search-result-heading").each((t,n)=>{const i=$("<a>").attr("href",$(n).find("a").first().attr("href")+"#"+e).text(cd.s("deadanchor-search-gotocomment")),o=$("<span>").text(cd.mws("parentheses-start")),s=$("<span>").text(cd.mws("parentheses-end")),r=$("<span>").addClass("cd-searchCommentLink").append(o,i,s);$(n).append(" ",r.clone())})})),console.error)}()}function co(){return new Promise((e,t)=>{if(Ji[location.hostname]){const n=e=>{t(["Convenient Discussions can't run: couldn't load the configuration.",e])};((t,i)=>{mw.loader.getScript(t).then(t=>{if(""===t)i();else e()},n)})(0?void 0:Ji[location.hostname],()=>{if(0);else n("Empty response.")})}else e()})}function lo(){const e=[mw.config.get("wgUserLanguage"),mw.config.get("wgContentLanguage")].filter(p).filter(e=>"en"!==e).map(e=>mw.loader.getScript("https://commons.wikimedia.org/w/index.php?title=User:Jack_who_built_the_house/convenientDiscussions-i18n/".concat(e,".js&action=raw&ctype=text/javascript")));return Promise.all(e).catch(()=>{})}function uo(){return(uo=o()((function*(){if(!/(^|\.)m\./.test(location.hostname)&&!$(".flow-board-page").length)if(!cd.isRunning){cd.isRunning=!0;if(0);cd.debug=Qi;cd.g=eo;cd.s=no;cd.sParse=io;cd.sPlain=oo;cd.mws=so;cd.util=to;cd.util.parseCommentAnchor=We;cd.util.formatDate=He;cd.util.setVisits=re;cd.debug.init();cd.debug.startTimer("total time");cd.debug.startTimer("loading config and strings");mw.hook("convenientDiscussions.launched").fire(cd);try{yield Promise.all([!cd.config&&co(),!cd.i18n&&(cd.getStringsPromise||lo())].filter(C))}catch(e){console.error(e);return}cd.debug.stopTimer("loading config and strings");ao()}else console.warn("One instance of Convenient Discussions is already running.")}))).apply(this,arguments)}$((function(){return uo.apply(this,arguments)}))}]);
//# sourceMappingURL=https://fallenlondon.wiki/w/index.php?title=MediaWiki:convenientDiscussions.js.map.json&action=raw&ctype=application/json
/*! </nowiki> */