wikiparser-node 1.36.0 → 1.37.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,31 +1,34 @@
1
- "use strict";(()=>{var eo=Object.create;var vt=Object.defineProperty,$d=Object.defineProperties,to=Object.getOwnPropertyDescriptor,Id=Object.getOwnPropertyDescriptors,Fd=Object.getOwnPropertyNames,Cn=Object.getOwnPropertySymbols,Rd=Object.getPrototypeOf,hi=Object.prototype.hasOwnProperty,ro=Object.prototype.propertyIsEnumerable;var no=(o,r)=>(r=Symbol[o])?r:Symbol.for("Symbol."+o),Yt=o=>{throw TypeError(o)};var wn=(o,r,e)=>r in o?vt(o,r,{enumerable:!0,configurable:!0,writable:!0,value:e}):o[r]=e,V=(o,r)=>{for(var e in r||(r={}))hi.call(r,e)&&wn(o,e,r[e]);if(Cn)for(var e of Cn(r))ro.call(r,e)&&wn(o,e,r[e]);return o},ge=(o,r)=>$d(o,Id(r)),Zs=(o,r)=>vt(o,"name",{value:r,configurable:!0});var bi=(o,r)=>{var e={};for(var t in o)hi.call(o,t)&&r.indexOf(t)<0&&(e[t]=o[t]);if(o!=null&&Cn)for(var t of Cn(o))r.indexOf(t)<0&&ro.call(o,t)&&(e[t]=o[t]);return e};var w=(o,r)=>()=>(o&&(r=o(o=0)),r);var io=(o,r)=>()=>(r||o((r={exports:{}}).exports,r),r.exports),Z=(o,r)=>{for(var e in r)vt(o,e,{get:r[e],enumerable:!0})},so=(o,r,e,t)=>{if(r&&typeof r=="object"||typeof r=="function")for(let n of Fd(r))!hi.call(o,n)&&n!==e&&vt(o,n,{get:()=>r[n],enumerable:!(t=to(r,n))||t.enumerable});return o};var Pd=(o,r,e)=>(e=o!=null?eo(Rd(o)):{},so(r||!o||!o.__esModule?vt(e,"default",{value:o,enumerable:!0}):e,o)),X=o=>so(vt({},"__esModule",{value:!0}),o);var B=o=>{var r;return[,,,eo((r=o==null?void 0:o[no("metadata")])!=null?r:null)]},oo=["class","method","getter","setter","accessor","field","value","get","set"],Ir=o=>o!==void 0&&typeof o!="function"?Yt("Function expected"):o,Bd=(o,r,e,t,n)=>({kind:oo[o],name:r,metadata:t,addInitializer:i=>e._?Yt("Already initialized"):n.push(Ir(i||null))}),Fr=(o,r)=>wn(r,no("metadata"),o[3]),R=(o,r,e,t)=>{for(var n=0,i=o[r>>1],s=i&&i.length;n<s;n++)r&1?i[n].call(e):t=i[n].call(e,t);return t},P=(o,r,e,t,n,i)=>{var s,a,l,p,g,d=r&7,u=!!(r&8),c=!!(r&16),f=d>3?o.length+1:d?u?1:2:0,h=oo[d+5],x=d>3&&(o[f-1]=[]),T=o[f]||(o[f]=[]),b=d&&(!c&&!u&&(n=n.prototype),d<5&&(d>3||!c)&&to(d<4?n:{get[e](){return m(this,i)},set[e](k){return C(this,i,k)}},e));d?c&&d<4&&Zs(i,(d>2?"set ":d>1?"get ":"")+e):Zs(n,e);for(var y=t.length-1;y>=0;y--)p=Bd(d,e,l={},o[3],T),d&&(p.static=u,p.private=c,g=p.access={has:c?k=>jd(n,k):k=>e in k},d^3&&(g.get=c?k=>(d^1?m:I)(k,n,d^4?i:b.get):k=>k[e]),d>2&&(g.set=c?(k,A)=>C(k,n,A,d^4?i:b.set):(k,A)=>k[e]=A)),a=(0,t[y])(d?d<4?c?i:b[h]:d>4?void 0:{get:b.get,set:b.set}:n,p),l._=1,d^4||a===void 0?Ir(a)&&(d>4?x.unshift(a):d?c?i=a:b[h]=a:n=a):typeof a!="object"||a===null?Yt("Object expected"):(Ir(s=a.get)&&(b.get=s),Ir(s=a.set)&&(b.set=s),Ir(s=a.init)&&x.unshift(s));return d||Fr(o,n),b&&vt(n,e,b),c?d^4?i:b:n},ce=(o,r,e)=>wn(o,typeof r!="symbol"?r+"":r,e),xi=(o,r,e)=>r.has(o)||Yt("Cannot "+e),jd=(o,r)=>Object(r)!==r?Yt('Cannot use the "in" operator on this value'):o.has(r),m=(o,r,e)=>(xi(o,r,"read from private field"),e?e.call(o):r.get(o)),S=(o,r,e)=>r.has(o)?Yt("Cannot add the same private member more than once"):r instanceof WeakSet?r.add(o):r.set(o,e),C=(o,r,e,t)=>(xi(o,r,"write to private field"),t?t.call(o,e):r.set(o,e),e),I=(o,r,e)=>(xi(o,r,"access private method"),e);var En=(o,r,e,t)=>({set _(n){C(o,r,n,e)},get _(){return m(o,r,t)}});var ao,Rr,yi=w(()=>{"use strict";ao=(()=>{let o={redirect:1,onlyinclude:1,noinclude:1,include:1,comment:1,ext:1,arg:2,"magic-word":2,template:2,heading:2,html:3,table:4,hr:5,"double-underscore":5,link:6,category:6,file:6,quote:7,"ext-link":8,"free-ext-link":9,"magic-link":9,list:10,dd:10,converter:11};return Object.setPrototypeOf(o,null),o})(),Rr=(()=>{let o=["arg-in-ext","bold-header","format-leakage","fostered-content","h1","illegal-attr","insecure-style","invalid-gallery","invalid-imagemap","invalid-invoke","invalid-isbn","invalid-json","invalid-url","lonely-apos","lonely-bracket","lonely-http","nested-link","no-arg","no-duplicate","no-ignored","obsolete-attr","obsolete-tag","parsing-order","pipe-like","syntax-like","table-layout","tag-like","unbalanced-header","unclosed-comment","unclosed-quote","unclosed-table","unescaped","unknown-page","unmatched-tag","unterminated-url","url-encoding","var-anchor","void-ext"];return Object.freeze(o),o})()});function ke(o,r,e){return e===1?o.replace(/\0(\d+)g\x7F/gu,(t,n)=>ke(String(r[n]),r,2)):e===2?o.replace(/\0(\d+)n\x7F/gu,(t,n)=>String(r[n])):o.replace(/\0(\d+)\x7F/gu,(t,n)=>r[n])}var Ie,lo,De,Me,Ue,Pr,go,re,Ee,Od,qd,Ln,Br,po,_d,Wd,bp,ae=w(()=>{"use strict";Ie=String.raw` \xA0\u1680\u2000-\u200A\u202F\u205F\u3000`,lo=String.raw`[^[\]<>"\0-\x1F\x7F${Ie}\uFFFD]`,De=String.raw`(?:\[[\da-f:.]+\]|${lo})`,Me=String.raw`(?:${lo}|\0\d+[cn!~]\x7F)*`,Ue=o=>o.trim().toLowerCase();Pr=(o,r)=>e=>e.replace(o,r),go=Pr(/[\0\x7F]|\r$/gmu,""),re=Pr(/\0\d+[cn]\x7F/gu,""),Ee=(o,r="")=>o.map(e=>typeof e=="string"?e:e.text()).join(r),Od={lt:"<",gt:">",lbrack:"[",rbrack:"]",lbrace:"{",rbrace:"}",nbsp:" ",amp:"&",quot:'"'},qd=Pr(/&(?:#(\d+|[Xx][\da-fA-F]+)|([lg]t|[LG]T|[lr]brac[ke]|nbsp|amp|AMP|quot|QUOT));/gu,(o,r,e)=>r?String.fromCodePoint(+((/^x/iu.test(r)?"0":"")+r)):Od[e.toLowerCase()]),Br=o=>(Ln!=null||(Ln=qd),Ln(o)),po=Pr(/&#(\d+|x[\da-f]+);/giu,(o,r)=>String.fromCodePoint(+((/^x/iu.test(r)?"0":"")+r))),_d={"&":"amp","<":"lt",">":"gt",'"':"quot","\n":"#10"},Wd=(o=/[&<>"{}[\]|]/gu)=>Pr(o,r=>`&${_d[r]};`),bp=Wd(/[&<>]/gu)});var uo=io((yp,Dd)=>{Dd.exports={ext:[],html:[["b","bdi","del","i","ins","u","font","big","small","sub","sup","h1","h2","h3","h4","h5","h6","cite","code","em","s","strike","strong","tt","var","div","center","blockquote","ol","ul","dl","table","caption","pre","ruby","rb","rp","rt","rtc","p","span","abbr","dfn","kbd","samp","data","time","mark","tr","td","th","q","bdo"],["li","dt","dd"],["br","wbr","hr","meta","link"]],namespaces:{"0":"","6":"File","10":"Template","14":"Category","828":"Module"},nsid:{"":0,file:6,template:10,category:14,module:828},functionHook:["msgnw"],variable:["!","=","pageid","articlepath","server","servername","scriptpath","stylepath"],parserFunction:[{msgnw:"msgnw",pageid:"pageid",articlepath:"articlepath",server:"server",servername:"servername",scriptpath:"scriptpath",stylepath:"stylepath","#language":"language","#special":"special","#speciale":"speciale","#tag":"tag","#formatdate":"formatdate","#dateformat":"formatdate","#invoke":"invoke","#while":"while","#dowhile":"dowhile","#loop":"loop","#forargs":"forargs","#fornumargs":"fornumargs","#if":"if","#ifeq":"ifeq","#switch":"switch","#ifexist":"ifexist","#ifexpr":"ifexpr","#iferror":"iferror","#time":"time","#timel":"timel","#expr":"expr","#rel2abs":"rel2abs","#titleparts":"titleparts","#categorytree":"categorytree","#urldecode":"urldecode","#choose":"choose","#var":"var","#varexists":"varexists","#var_final":"var_final","#vardefine":"vardefine","#vardefineecho":"vardefineecho","#widget":"widget","#related":"related","#regex":"regex","#regex_var":"regex_var","#regexquote":"regexquote","#regexall":"regexall","#len":"len","#pos":"pos","#rpos":"rpos","#sub":"sub","#count":"count","#rmatch":"rmatch","#rreplace":"rreplace","#replace":"replace","#rsplit":"rsplit","#explode":"explode","#tab":"tab","#seo":"seo","#babel":"babel","#translation":"translation","#commaseparatedlist":"commaseparatedlist","#coordinates":"coordinates","#lst":"lst","#lsth":"lsth","#lstx":"lstx","#assessment":"assessment","#mentor":"mentor","#property":"property","#target":"target","#section":"lst","#section-x":"lstx","#section-h":"lsth","#statements":"statements","#useliquidthreads":"useliquidthreads","#lqtpagelimit":"lqtpagelimit","#avatar":"avatar","#img":"img","#chart":"chart"},{"!":"!","=":"=","#FORMAL":"formal","#bcp47":"bcp47","#dir":"dir","#interwikilink":"interwikilink","#interlanguagelink":"interlanguagelink","#contentmodel":"contentmodel","#isbn":"isbn","#timef":"timef","#timefl":"timefl"},["msg","raw"],["subst","safesubst"]],doubleUnderscore:[[],[]],protocol:"bitcoin:|ftp://|ftps://|geo:|git://|gopher://|http://|https://|irc://|ircs://|magnet:|mailto:|matrix:|mms://|news:|nntp://|redis://|sftp://|sip:|sips:|sms:|ssh://|svn://|tel:|telnet://|urn:|wikipedia://|worldwind://|xmpp:",interwiki:[],img:{},redirection:["#redirect"],variants:[]}});var fo,jr,Ti,Nn=w(()=>{"use strict";fo=new Set(["alt","link","lang","page","caption"]),jr=new Set(["tiff","tif","png","gif","jpg","jpeg","webp","xcf","pdf","svg","djvu"]),Ti=uo()});function Be(o){let r=new Map,e=new WeakMap;return t=>{let n=typeof t=="string"?r:e;if(n.has(t)){let s=n.get(t);return s.lastIndex=0,s}let i=o(t);return n.set(t,i),i}}var At,$n,ki,Md,co,ze=w(()=>{"use strict";At=o=>decodeURIComponent(o.replace(/%(?![\da-f]{2})/giu,"%25"));$n=o=>{let r=[],e=0;for(let t of o.split(`
2
- `)){let n=e+t.length;r.push([t,e,n]),e=n+1}return r},ki=o=>o&&Number(o[1]),Md=(o,r)=>{var n;let e,t=i=>{e!=null||(e=$n(o));let s=e.findIndex(([,,a])=>i<=a)+1;return{line:s,column:i-e[s-1][1]+1}};for(let i of r){let{line:s,column:a,from:l,to:p}=i;l==null?s?(e!=null||(e=$n(o)),(n=i.column)!=null||(i.column=1),i.from=e[s-1][1]+(i.column-1)):(i.from=0,i.line=1,i.column=1):(!s||!a)&&Object.assign(i,t(l)),p!==void 0&&({line:i.endLine,column:i.endColumn}=t(p)),i.position=i.from}return r},co=(o,r)=>{if(r||o.trim())try{JSON.parse(o)}catch(e){let{message:t}=e,n=ki(/\bline (\d+)/u.exec(t)),i=ki(/\bcolumn (\d+)/u.exec(t)),s=ki(/\bposition (\d+)/u.exec(t));return Md(o,[{message:t,line:n,column:i,from:s,severity:"error"}])}return[]}});var Or,Zt,qr,_r,vi,W,se=w(()=>{"use strict";W=class{constructor(r,e){S(this,_r);S(this,Or);S(this,Zt);S(this,qr);C(this,Or,r),C(this,Zt,e)}get start(){return m(this,Zt)}get top(){return I(this,_r,vi).call(this).top}get left(){return I(this,_r,vi).call(this).left}};Or=new WeakMap,Zt=new WeakMap,qr=new WeakMap,_r=new WeakSet,vi=function(){var r;return(r=m(this,qr))!=null||C(this,qr,m(this,Or).getRootNode().posFromIndex(m(this,Zt))),m(this,qr)}});var Ud,zd,In,Ai,mo,j,F,me,er,O,Fn,Le,Rn,Pn,Bn,st,Ge,jn,je,ho,z=w(()=>{"use strict";ze();Se();se();D();Ud=new Set(["tr","td","th","caption"]),zd=new Set(["Template:!!","Template:!-"]),In=o=>{let r=o.childNodes.find(e=>e.text().trim());if(!r||r.type==="text"&&r.data.trim().startsWith("!")||r.is("magic-word")&&r.name==="!"||r.is("template")&&zd.has(r.name)||r.is("html")&&Ud.has(r.name))return!1;if(r.is("arg"))return r.length>1&&In(r.childNodes[1]);if(r.is("magic-word"))try{let e=r.getPossibleValues().map(In);return e.includes(2)?2:e.includes(1)&&1}catch(e){}return r.is("template")||r.is("magic-word")&&r.name==="invoke"?1:2},Ai=(o,r,e,t)=>({line:o+e-1,character:(e===1?r:0)+t}),mo=o=>(r,e,t,n,i="error")=>{let{start:s}=e,{top:a,left:l}=e instanceof W?e:new W(r,s),{offsetHeight:p,offsetWidth:g}=r,{startIndex:d,startLine:u,startCol:c}=o(r,s,a,l),{line:f,character:h}=Ai(u,c,p,g);return{rule:t,message:v.msg(n),severity:i,startIndex:d,endIndex:d+r.toString().length,startLine:u,endLine:f,startCol:c,endCol:h}},j=mo((o,r,e,t)=>{let n=o.getRelativeIndex(),{top:i,left:s}=o.parentNode.posFromIndex(n);return{startIndex:r+n,startLine:e+i,startCol:i?s:t+s}}),F=mo((o,r,e,t)=>({startIndex:r,startLine:e,startCol:t})),me=(o,r,e,t=0)=>({desc:v.msg(r),range:[o.startIndex+t,o.endIndex],text:e}),er=(o,r,e)=>({desc:v.msg(r),range:[o,o],text:e}),O=(o,r=0,e="")=>typeof o=="number"?{desc:v.msg("remove"),range:[o,o+r],text:e}:me(o,"remove",e,r),Fn=(o,r)=>me(o,"decode",At(r.text().replace(/%(?=21|3[ce]|5[bd]|7[b-d])/giu,"%25"))),Le=(o,r,e=0)=>({desc:v.msg("close"),range:[o+e,o],text:r}),Rn=o=>({desc:v.msg("open"),range:[o+1,o+2],text:""}),Pn=(o,r)=>me(o,"comment",`<!--${r}-->`),Bn=(o,r)=>me(o,"uppercase",r.toUpperCase()),st=(o,r=0)=>({desc:v.msg("whitespace"),range:[o,o+r],text:" "}),Ge=(o,r,e=1)=>({desc:v.msg("escape"),range:[o,o+e],text:r.repeat(e)}),jn=(o,r)=>({desc:v.msg("escape"),range:[o,o+r.length],text:r.replace(/\|/gu,"&#124;")}),je=(o,r,e,t)=>{if(o&&(t||v.viewOnly&&o[0]===oe.rev))return o[1];let n=r();return(t||v.viewOnly)&&e([oe.rev,n]),n},ho=(o,r)=>o==="ol"&&r==="type"?["1","a","A","i","I"]:o==="th"&&r==="scope"?["row","col","rowgroup","colgroup"]:r==="dir"?["ltr","rtl","auto"]:r==="aria-hidden"?["true","false"]:[]});var Gd,On,Si=w(()=>{"use strict";Gd=o=>{if(o.includes("#")){let r=o.indexOf("#"),e=o.slice(0,r),t=o.slice(r+1);return(n,i)=>(r===0||n===e)&&i===t}return r=>r===o},On=(o,r,e)=>{if(o=o.trim(),!o)return(()=>!0);let t=o.split(",").map(n=>n.trim()).filter(n=>n!=="").map(Gd);return(({type:n,name:i})=>t.some(s=>s(n,i)))}});var xo=io((Ip,bo)=>{bo.exports=function(o,r,e,t,n){var i,s;if(t===void 0)t=0;else if(t=t|0,t<0||t>=o.length)throw new RangeError("invalid lower bound");if(n===void 0)n=o.length-1;else if(n=n|0,n<t||n>=o.length)throw new RangeError("invalid upper bound");for(;t<=n;)if(i=t+(n-t>>>1),s=+e(o[i],r,i,o),s<0)t=i+1;else if(s>0)n=i-1;else return i;return~t}});var yo,To,ko=w(()=>{"use strict";yo=Pd(xo()),To=(o,r,e)=>{let t=(0,yo.default)(o,r,e);return t<0?~t:t}});var tr,qn=w(()=>{"use strict";z();tr=(o=!0)=>r=>{let e=new WeakMap;return function(...t){return je(e.get(this),()=>r.apply(this,t),n=>{e.set(this,n)},o)}}});var vo,Ao=w(()=>{"use strict";vo=o=>{class r extends o{get firstChild(){return this.childNodes[0]}get lastChild(){return this.childNodes[this.childNodes.length-1]}get offsetHeight(){return this.getDimension().height}get offsetWidth(){return this.getDimension().width}}return r}});var So,Co,Dr,rr,nr,Mr,ir,sr,Wr,Oe,Ci=w(()=>{"use strict";ze();ko();z();Se();qn();Ao();D();Co=[vo],So=[tr(!1)];Oe=class{constructor(){R(Wr,5,this);ce(this,"childNodes",[]);S(this,Dr);S(this,rr);S(this,nr);S(this,Mr);S(this,ir);S(this,sr,{})}get parentNode(){return m(this,Dr)}get nextSibling(){return m(this,rr)}get previousSibling(){return m(this,nr)}getChildNodes(){let{childNodes:r}=this;return Object.isFrozen(r)?[...r]:r}getAttribute(r){return r==="padding"?0:this[r]}setAttribute(r,e){switch(r){case"parentNode":C(this,Dr,e),e||(C(this,rr,void 0),C(this,nr,void 0));break;case"nextSibling":C(this,rr,e);break;case"previousSibling":C(this,nr,e);break;case"aIndex":v.viewOnly&&C(this,ir,[oe.rev,e]);break;default:this[r]=e}}getRootNode(){return je(m(this,Mr),()=>{var r,e;return(e=(r=this.parentNode)==null?void 0:r.getRootNode())!=null?e:this},r=>{let[,e]=r;e.type==="root"&&C(this,Mr,r)})}indexFromPos(r,e){{if(r<0||e<0)return;let t=this.getLines();if(r>=t.length)return;let[,n,i]=t[r],s=n+e;return s>i?void 0:s}}posFromIndex(r){{let{length:e}=String(this);if(r+=r<0?e:0,r>=0&&r<=e){let t=this.getLines(),n=To(t,r,([,,i],s)=>i-s);return{top:n,left:r-t[n][1]}}return}}getDimension(){{let r=this.getLines(),e=r[r.length-1];return{height:r.length,width:e[2]-e[1]}}}getGaps(r){return 0}getRelativeIndex(r){if(r===void 0){let{parentNode:e}=this;return e?e.getRelativeIndex(e.childNodes.indexOf(this)):0}return je(m(this,sr)[r],()=>{let{childNodes:e}=this,t=r+(r<0?e.length:0),n=this.getAttribute("padding");for(let i=0;i<t;i++)v.viewOnly&&(m(this,sr)[i]=[oe.rev,n]),n+=e[i].toString().length+this.getGaps(i);return n},e=>{m(this,sr)[r]=e})}getAbsoluteIndex(){return je(m(this,ir),()=>{let{parentNode:r}=this;return r?r.getAbsoluteIndex()+this.getRelativeIndex():0},r=>{C(this,ir,r)})}getBoundingClientRect(){this.lspError("AstNode.getBoundingClientRect")}is(r){return this.type===r}getLines(){return $n(String(this))}seal(r,e){}lspError(r){throw new Error(`${r} method is only available in the LSP version!`)}};Wr=B(null),Dr=new WeakMap,rr=new WeakMap,nr=new WeakMap,Mr=new WeakMap,ir=new WeakMap,sr=new WeakMap,P(Wr,1,"getLines",So,Oe),Oe=P(Wr,0,"AstNode",Co,Oe),R(Wr,1,Oe)});var wo,Eo=w(()=>{"use strict";Si();wo=o=>{var r,wi;{class t extends o{constructor(){super(...arguments);S(this,r)}getElementBy(s){let a=[...this.childNodes].reverse();for(;a.length>0;){let l=a.pop(),{type:p,childNodes:g}=l;if(p!=="text"){if(s(l))return l;for(let d=g.length-1;d>=0;d--)a.push(g[d])}}}querySelector(s){return this.getElementBy(I(this,r,wi).call(this,s))}getElementsBy(s){let a=[...this.childNodes].reverse(),l=[];for(;a.length>0;){let p=a.pop(),{type:g,childNodes:d}=p;if(g!=="text"){s(p)&&l.push(p);for(let u=d.length-1;u>=0;u--)a.push(d[u])}}return l}querySelectorAll(s){return this.getElementsBy(I(this,r,wi).call(this,s))}escape(){}}return r=new WeakSet,wi=function(s){return On(s,this)},t}}});var Lo,Ei,Hd,St,No=w(()=>{"use strict";ae();Se();Si();Ci();Eo();Lo=[wo];St=class extends(Hd=Oe){get length(){return this.childNodes.length}text(r){return Ee(this.childNodes,r)}removeAt(r){this.lspError("AstElement.removeAt")}insertAt(r,e=this.length){return _n(this,e,0,[r]),r}closest(r){let e=On(r,this),{parentNode:t}=this;for(;t;){if(e(t))return t;({parentNode:t}=t)}}isInside(r){var e;return((e=this.closest(`${r},ext`))==null?void 0:e.type)===r}append(...r){this.safeAppend(r)}safeAppend(r){for(let e of r)this.insertAt(e)}safeReplaceChildren(r){}setText(r,e=0){e+=e<0?this.length:0;let t=this.childNodes[e],{data:n}=t;return t.replaceData(r),n}toString(r,e=""){return this.childNodes.map(t=>t.toString(r)).join(e)}caretPositionFromIndex(r){this.lspError("AstElement.caretPositionFromIndex")}elementFromIndex(r){this.lspError("AstElement.elementFromIndex")}elementFromPoint(r,e){this.lspError("AstElement.elementFromPoint")}lint(r=this.getAbsoluteIndex(),e){{let t=[];for(let n=0,i=r+this.getAttribute("padding");n<this.length;n++){let s=this.childNodes[n];s.setAttribute("aIndex",i);let a=s.lint(i,e);a.length>0&&Array.prototype.push.apply(t,a),i+=s.toString().length+this.getGaps(n)}return t}}print(r={}){}json(r,e=1/0,t=this.getAbsoluteIndex()){}};Ei=B(Hd),St=P(Ei,0,"AstElement",Lo,St),R(Ei,1,St)});var Li,Io,Vd,Qd,Xd,Jd,$o,Kd,Wn,Fo,Ur,Ro=w(()=>{"use strict";ae();z();D();Ci();Li=String.raw`[${Ie}\t]*`,Io=String.raw`<(?:/[^\S\n]*)?([a-z]\w*)|\{+|\}+|\[{2,}|\[(?![^[]*?\])|((?:^|\])[^[]*?)\]+|\n={2,}`,Vd=new RegExp(String.raw`${Io}|\bhttps?[:/]/+|\b(?:rfc|pmid)(?=[-::]?${Li}\d)|\bisbn(?=[-::]?${Li}(?:\d(?:${Li}|-)){6})`,"giu"),Qd=new RegExp(Io,"giu"),Xd=new Set(["attr-value","ext-link-text","link-text"]),Jd={"[":/[[\]]/u,"{":/[{}]/u,"]":/[[\]](?=[^[\]]*$)/u,"}":/[{}](?=[^{}]*$)/u},$o=new Set(["html","head","style","title","body","a","audio","img","video","embed","iframe","object","canvas","script","col","colgroup","tbody","tfoot","thead","button","input","label","option","select","textarea"]),Kd=(()=>{try{return new RegExp(String.raw`[\p{L}\p{N}_]`,"u")}catch(o){return/\w/u}})(),Ur=class extends Oe{constructor(e){super();S(this,Wn);ce(this,"data","");this.data=e}get type(){return"text"}toString(e){var t;return e&&!((t=this.parentNode)!=null&&t.getAttribute("built"))?re(this.data):this.data}text(){return this.data}lint(e=this.getAbsoluteIndex(),t){var n,i,s;{if(t===!1)return[];let{data:a,parentNode:l,nextSibling:p,previousSibling:g}=this;if(!l)throw new Error("An isolated text node cannot be linted!");let{type:d,parentNode:u}=l;if(d==="attr-value"){let{name:_,tag:U}=u;if(U==="ref"&&(_==="name"||_==="follow")||_==="group"&&(U==="ref"||U==="references")||U==="choose"&&(_==="before"||_==="after"))return[]}if(t!=null||(t=l.isPlain()&&!Xd.has(d)?Vd:Qd),a.search(t)===-1)return[];t.lastIndex=0;let c=[],f=p==null?void 0:p.type,h=p==null?void 0:p.name,x=g==null?void 0:g.type,T=this.getRootNode(),b=T.toString(),{ext:y,html:k,variants:A}=T.getAttribute("config"),{top:N,left:E}=T.posFromIndex(e),{lintConfig:$}=v,H=$.rules["tag-like"],q=typeof H=="object"&&H[1]?new Set(Object.keys(H[1]).filter(_=>_!=="invalid"&&_!=="disallowed")):new Set,K=new Set(["onlyinclude","noinclude","includeonly",...y,...k[0],...k[1],...k[2],...q,...$.getSeverity("tag-like","disallowed")?$o:[]]);for(let _=t.exec(a);_;_=t.exec(a)){let{index:U,0:M}=_,[,be,Jt]=_,bt=M==="["&&d==="ext-link-text";if(Jt&&Jt!=="]"){let{length:ie}=Jt;U+=ie,M=M.slice(ie)}else{if(M.startsWith("<")&&!K.has(be.toLowerCase())||bt&&(/&(?:rbrack|#93|#x5[Dd];);/u.test(a.slice(U+1))||p!=null&&p.is("ext")&&h==="nowiki"&&((n=p.innerText)!=null&&n.includes("]"))))continue;M.startsWith(`
3
- ==`)&&(U++,M=M.slice(1))}M=M.toLowerCase();let[Y]=M,xt=M==="rfc"||M==="pmid"||M==="isbn",$r=Y==="{",gi=Y==="}",Qs=Y==="[",pi=Y==="]",{length:it}=M;pi&&(U||it>1)&&t.lastIndex--;let Kt=e+U,yt=Kt+it,fe,Pe,An,Sn,Tt=b[yt],ui=b[Kt-1],fi=$r||Qs,ci=M==="{"&&ui==="-"&&A.length>0,mi=M==="}"&&Tt==="-"&&A.length>0,Xs=Qs&&f==="free-ext-link"&&!a.slice(U+1).trim()||pi&&x==="free-ext-link"&&!a.slice(0,U).includes("]");if(xt)fe="lonely-http",M=M.toUpperCase(),Pe=$.getSeverity(fe,M);else if(Y==="<"){fe="tag-like";let ie;/^<\/?\s/u.test(M)||!/[\s/>]/u.test(Tt!=null?Tt:"")?ie="invalid":q.has(be)?ie=be:$o.has(be)&&!y.includes(be)&&(ie="disallowed"),Pe=$.getSeverity(fe,ie)}else if(Y==="=")fe="syntax-like",Pe=$.getSeverity(fe,"heading");else if(ci||mi)fe="lonely-bracket",Pe=$.getSeverity(fe,"converter"),ci&&U>0?(M="-{",U--,Kt--,it=2):mi&&U<a.length-1&&(M="}-",yt++,it=2);else if(Xs)fe="lonely-bracket",Pe=$.getSeverity(fe,"extLink");else if(fi||gi||pi)if(fe="lonely-bracket",it>1||$r&&Tt===Y||gi&&ui===Y)Pe=$.getSeverity(fe,"double");else{if(!bt){let ie=Jd[Y],we=fi?a.slice(U+1):a.slice(0,U);if($r&&((i=ie.exec(we))==null?void 0:i[0])==="}"||gi&&((s=ie.exec(we))==null?void 0:s[0])==="{")continue;if(!we.includes(Y)){let We=fi?"nextSibling":"previousSibling",$e=this[We];for(;$e&&($e.type!=="text"||!ie.test($e.data));)$e=$e[We];if($e&&ie.exec($e.data)[0]!==Y)continue}}Pe=$.getSeverity(fe,"single")}else fe="lonely-http",Pe=$.getSeverity(fe);if(!Pe)continue;let Js=this.posFromIndex(U),{line:Ks,character:Ys}=Ai(N,E,Js.top+1,Js.left);if(Y==="="){let ie=a.indexOf(`
4
- `,U),we=p,We;if(ie===-1){let $e=0;for(;we&&!(we.type==="text"&&($e=we.data.indexOf(`
5
- `),$e!==-1));)we=we.nextSibling;if(!we)continue;We=we.data.slice(0,$e)}else We=a.slice(U+it,ie);if(!/(?:^|[^=])=+\s*(?:\S\s*)?$/u.test(We))continue;ie===-1?(yt=we.getAbsoluteIndex()+We.length,{top:An,left:Sn}=T.posFromIndex(yt)):(yt+=We.length,it+=We.length)}let kt={rule:fe,message:v.msg(Y==="="?"header-like":"lonely",xt||Y==="h"||ci||mi?M:Y),severity:Pe,startIndex:Kt,endIndex:yt,startLine:Ks,endLine:An!=null?An:Ks,startCol:Ys,endCol:Sn!=null?Sn:Ys+it};if($.computeEditInfo)if(Y==="<")kt.suggestions=[Ge(Kt,"&lt;")];else if(Y==="h"&&d!=="link-text"&&Kd.test(ui||""))kt.suggestions=[st(Kt)];else if(bt){let ie=l.getAbsoluteIndex()+l.toString().length;kt.suggestions=[Ge(ie,"&#93;")]}else if(M==="]"&&Xs){let ie=e-g.toString().length;kt.suggestions=[er(ie,"left-bracket","[")]}else xt&&(kt.suggestions=[..._[0]===M?[]:[Bn(kt,M)],...Tt===":"||Tt===":"?[st(yt,1)]:[]]);c.push(kt)}return c}}replaceData(e){I(this,Wn,Fo).call(this,e)}splitText(e){this.lspError("AstText.splitText")}escape(){}print(){}};Wn=new WeakSet,Fo=function(e){this.setAttribute("data",e)}});var ve,ot=w(()=>{"use strict";ve=(o=!0,r=!0)=>e=>{class t extends e{text(){return""}lint(i){return o?[]:super.lint(i)}}return t}});var Q,xe=w(()=>{"use strict";Q=o=>{}});var zr,he,at=w(()=>{"use strict";G();he=class extends L{constructor(e,t,n,i,s){super(e,n,i,s);S(this,zr);C(this,zr,t)}get type(){return m(this,zr)}lint(e=this.getAbsoluteIndex()){return super.lint(e,!1)}};zr=new WeakMap});var pe,qe=w(()=>{"use strict";pe=({length:o})=>r=>{class e extends r{getAttribute(n){return n==="padding"?o:super.getAttribute(n)}}return e}});var or,ue,lt=w(()=>{"use strict";G();ue=class extends L{constructor(e,t,n,i,s){super(e,n,i,s);S(this,or);C(this,or,t)}get type(){return m(this,or)}set type(e){C(this,or,e)}getAttribute(e){var t;return e==="invalid"?this.type==="converter-flag"&&!!((t=this.parentNode)!=null&&t.isInvalidFlag(this)):super.getAttribute(e)}};or=new WeakMap});var Po,ar,He,dt,Dn,Bo,Ni,Yd,ye,lr=w(()=>{"use strict";z();Se();se();qe();xe();D();G();lt();Po=[Q,pe("[[")];ye=class extends(Yd=L){constructor(e,t,n,i=[],s="|"){super(void 0,n,i,{});S(this,Dn);S(this,ar,!0);S(this,He);S(this,dt);if(this.insertAt(new ue(e,"link-target",n,i,{})),t!==void 0){let a=new L(t,n,i,{});a.type="link-text",a.setAttribute("stage",10),this.insertAt(a)}C(this,He,s)}get link(){}get fragment(){}afterBuild(){C(this,dt,this.getTitle()),m(this,He).includes("\0")&&C(this,He,this.buildFromStr(m(this,He),0)),I(this,Dn,Bo).call(this),super.afterBuild()}setAttribute(e,t){e==="bracket"?C(this,ar,t):e==="title"?C(this,dt,t):super.setAttribute(e,t)}toString(e){let t=super.toString(e,m(this,He));return m(this,ar)?`[[${t}]]`:t}text(){let e=super.text("|");return m(this,ar)?`[[${e}]]`:e}getAttribute(e){return e==="title"?m(this,dt):super.getAttribute(e)}getGaps(e){return e===0?m(this,He).length:1}lint(e=this.getAbsoluteIndex(),t){{let n=super.lint(e,t),{childNodes:[i,s],type:a}=this,{encoded:l,fragment:p}=m(this,dt),{lintConfig:g}=v,{computeEditInfo:d,fix:u}=g,c=new W(this,e),f="unknown-page",h=g.getSeverity(f);if(h&&i.childNodes.some(({type:x})=>x==="template")&&n.push(j(i,c,f,"template-in-link",h)),f="url-encoding",h=g.getSeverity(f),h&&l){let x=j(i,c,f,"unnecessary-encoding",h);(d||u)&&(x.fix=Fn(x,i)),n.push(x)}if(f="pipe-like",h=g.getSeverity(f,"link"),h&&(a==="link"||a==="category")){let x=s==null?void 0:s.childNodes.findIndex(b=>b.type==="text"&&b.data.includes("|")),T=s==null?void 0:s.childNodes[x];if(T){let b=j(s,c,f,"pipe-in-link",h);if(d){let y=b.startIndex+s.getRelativeIndex(x);b.suggestions=[jn(y,T.data)]}n.push(b)}}if(f="no-ignored",h=g.getSeverity(f,"fragment"),h&&p!==void 0&&!jo(a)){let x=j(i,c,f,"useless-fragment",h);if(d||u){let T=i.childNodes.findIndex(y=>y.type==="text"&&y.data.includes("#")),b=i.childNodes[T];b&&(x.fix=O(x,i.getRelativeIndex(T)+b.data.indexOf("#")))}n.push(x)}return n}}getTitle(e,t){return this.normalizeTitle(this.firstChild.text(),0,{halfParsed:t,temporary:e,decode:!0,selfLink:!0})}print(){}json(e,t,n=this.getAbsoluteIndex()){}};Ni=B(Yd),ar=new WeakMap,He=new WeakMap,dt=new WeakMap,Dn=new WeakSet,Bo=function(){this.type!=="ext-inner"&&this.setAttribute("name",m(this,dt).title)},ye=P(Ni,0,"LinkBaseToken",Po,ye),R(Ni,1,ye)});var Oo,$i,Zd,le,gt=w(()=>{"use strict";xe();G();Oo=[Q];le=class extends(Zd=L){get innerText(){return this.firstChild.data}constructor(r="",e,t){super(r,e,t)}};$i=B(Zd),le=P($i,0,"NowikiBaseToken",Oo,le),R($i,1,le)});var qo,Ii,eg,de,Ct=w(()=>{"use strict";z();ot();D();gt();qo=[ve(!1)];de=class extends(eg=le){get type(){return"noinclude"}toString(r){return r?"":super.toString()}lint(r=this.getAbsoluteIndex()){{let{lintConfig:e}=v,t="no-ignored",n=e.getSeverity(t,"include");if(n){let{innerText:i}=this,s=/^<(includeonly|(?:no|only)include)\s+(?:[^\s>/]|\/(?!>))[^>]*>$/iu.exec(i);if(s){let a=F(this,{start:r},t,"useless-attribute",n),{computeEditInfo:l}=e,p=s[1].length+1,g=i.endsWith("/>")?2:1;return a.startIndex+=p,a.startCol+=p,a.endIndex-=g,a.endCol-=g,l&&(a.suggestions=[O(a)]),[a]}}return[]}}};Ii=B(eg),de=P(Ii,0,"NoincludeToken",qo,de),R(Ii,1,de)});var Mn,_o=w(()=>{"use strict";z();D();lr();Ct();Mn=class extends ye{get type(){return"redirect-target"}constructor(r,e,t,n){super(r,void 0,t,n),e!==void 0&&this.insertAt(new de(e,t,n))}getTitle(){return this.normalizeTitle(this.firstChild.toString(),0,{halfParsed:!0,decode:!0,page:""})}lint(r=this.getAbsoluteIndex()){{let e=super.lint(r,!1),t="no-ignored",{lintConfig:n}=v,i=n.getSeverity(t,"redirect");if(i&&this.length===2){let s=j(this.lastChild,{start:r},t,"useless-link-text",i);s.startIndex--,s.startCol--,(n.computeEditInfo||n.fix)&&(s.fix=O(s)),e.push(s)}return e}}}});var Wo,Et,Gr,Fi,tg,wt,Do=w(()=>{"use strict";ot();xe();G();at();_o();Wo=[ve(!1,!1),Q];wt=class extends(tg=L){constructor(e,t,n,i,s,a,l=[]){super(void 0,a,l);S(this,Et);S(this,Gr);C(this,Et,e),C(this,Gr,s),this.append(new he(t,"redirect-syntax",a,l),new Mn(n,i==null?void 0:i.slice(1),a,l))}get type(){return"redirect"}getAttribute(e){return e==="padding"?m(this,Et).length:super.getAttribute(e)}toString(e){return m(this,Et)+super.toString(e)+m(this,Gr)}lint(e=this.getAbsoluteIndex()){{let t=e+m(this,Et).length+this.firstChild.toString().length;return this.lastChild.setAttribute("aIndex",t),this.lastChild.lint(t)}}print(){}};Fi=B(tg),Et=new WeakMap,Gr=new WeakMap,wt=P(Fi,0,"RedirectToken",Wo,wt),R(Fi,1,wt)});var Mo={};Z(Mo,{parseRedirect:()=>rg});var rg,Uo=w(()=>{"use strict";D();Do();rg=(o,r,e)=>{var n;(n=r.regexRedirect)!=null||(r.regexRedirect=new RegExp(String.raw`^(\s*)((?:${r.redirection.join("|")})\s*(?::\s*)?)\[\[([^\n|\]]+)(\|.*?)?\]\](\s*)`,"iu"));let t=r.regexRedirect.exec(o);return t&&v.normalizeTitle(t[3],0,!1,r,{halfParsed:!0,temporary:!0,decode:!0,page:""}).valid?(o=`\0${e.length}o${o.slice(t[0].length)}`,new wt(...t.slice(1),r,e),o):!1}});var zo,Ri,ng,Lt,Go=w(()=>{"use strict";qe();xe();G();zo=[Q,pe("<onlyinclude>")];Lt=class extends(ng=L){get type(){return"onlyinclude"}toString(r){return`<onlyinclude>${super.toString(r)}</onlyinclude>`}isPlain(){return!0}print(){}};Ri=B(ng),Lt=P(Ri,0,"OnlyincludeToken",zo,Lt),R(Ri,1,Lt)});var pt,Hr=w(()=>{"use strict";pt=(o=1)=>r=>{class e extends r{getGaps(){return o}}return e}});var Ho,Nt,ut,Pi,ig,Fe,Un=w(()=>{"use strict";Hr();xe();G();Ho=[pt(),Q];Fe=class extends(ig=L){constructor(e,t,n,i,s,a=[]){super(void 0,s);S(this,Nt);S(this,ut);ce(this,"closed");this.setAttribute("name",e.toLowerCase()),C(this,Nt,[e,i||e]),this.closed=i!=="",C(this,ut,i===void 0),this.append(t,n);let l=typeof t=="string"?-1:a.indexOf(t);a.splice(l===-1?1/0:l,0,this)}get innerText(){return m(this,ut)?void 0:this.lastChild.text()}get selfClosing(){return m(this,ut)}toString(e){let{firstChild:t,lastChild:n}=this,[i,s]=m(this,Nt);return m(this,ut)?`<${i}${t.toString(e)}/>`:`<${i}${t.toString(e)}>${n.toString(e)}${this.closed?`</${s}>`:""}`}text(){let[e,t]=m(this,Nt);return m(this,ut)?`<${e}${this.firstChild.text()}/>`:`<${e}${super.text(">")}${this.closed?`</${t}>`:""}`}getAttribute(e){return e==="padding"?m(this,Nt)[0].length+1:super.getAttribute(e)}print(){}json(e,t,n=this.getAbsoluteIndex()){}};Pi=B(ig),Nt=new WeakMap,ut=new WeakMap,Fe=P(Pi,0,"TagPairToken",Ho,Fe),R(Pi,1,Fe)});var Vo,Bi,sg,$t,Qo=w(()=>{"use strict";z();se();ot();D();Un();Vo=[ve(!1)];$t=class extends(sg=Fe){get type(){return"include"}constructor(r,e="",t,n,i,s){super(r,e,t!=null?t:"",t===void 0||n!=null?n:"",i,s)}toString(r){return r?"":super.toString()}lint(r=this.getAbsoluteIndex()){{let e=[],{firstChild:t,closed:n,name:i}=this,s=new W(this,r),a=["no-ignored","unclosed-comment"],{lintConfig:l}=v,{computeEditInfo:p}=l,g=a.map(d=>l.getSeverity(d,"include"));if(g[0]&&t.data.trim()){let d=j(t,s,a[0],"useless-attribute",g[0]);p&&(d.suggestions=[O(d)]),e.push(d)}if(g[1]&&!n){let d=F(this,s,a[1],v.msg("unclosed",`<${i}>`),g[1]);p&&(d.suggestions=[Le(d.endIndex,`</${i}>`)]),e.push(d)}return e}}};Bi=B(sg),$t=P(Bi,0,"IncludeToken",Vo,$t),R(Bi,1,$t)});var dr,zn=w(()=>{"use strict";dr=(o=0)=>r=>{var e,Xo;{class n extends r{constructor(){super(...arguments);S(this,e)}hasAttr(a){this.lspError("AttributesParent.hasAttr")}getAttr(a){return I(this,e,Xo).call(this).getAttr(a)}}return e=new WeakSet,Xo=function(){return this.childNodes[o]},n}}});var ne,Jo,Ko,Gn,Oi,Yo,Hn,ra,na,ia,ji,Zo,ea,ta,It,sa,oa,aa,la,da,qi=w(()=>{"use strict";ne=new Set(["align"]),Jo=new Set(["cite"]),Ko=new Set(["cite","datetime"]),Gn=new Set(["width"]),Oi=new Set(["axis","align","bgcolor","height","width","valign"]),Yo=new Set([...Oi,"abbr","headers","scope","rowspan","colspan"]),Hn=new Set(["type"]),ra=new Set(["summary","align","bgcolor","cellpadding","cellspacing","frame","rules","width"]),na=new Set(["clear"]),ia=new Set(["bgcolor","align","valign"]),ji=new Set(["id","qid","forcemathmode","type","display"]),Zo=new Set(["enclose","inline","lang","line","linelinks","style","class","id","dir","copy","highlight","start"]),ea=new Set(["weight"]),ta=new Set(["width","height","zoom","latitude","longitude","align","mapstyle","lang","alt","text"]),It=new Set,sa=new Set(["id","class","style","lang","dir","title","tabindex","aria-describedby","aria-flowto","aria-hidden","aria-label","aria-labelledby","aria-level","aria-owns","role","about","property","resource","datatype","typeof","itemid","itemprop","itemref","itemscope","itemtype"]),oa={div:ne,h1:ne,h2:ne,h3:ne,h4:ne,h5:ne,h6:ne,blockquote:Jo,q:Jo,p:ne,br:na,pre:Gn,ins:Ko,del:Ko,ul:Hn,ol:new Set(["type","start","reversed"]),li:new Set(["type","value"]),table:new Set([...ra,"border"]),caption:ne,tr:ia,td:Yo,th:Yo,font:new Set(["size","color","face"]),hr:Gn,data:new Set(["value"]),time:new Set(["datetime"]),meta:new Set(["itemprop","content"]),link:new Set(["itemprop","href","title"]),gallery:Hn,poem:ne,categorytree:ne,combooption:ne,img:new Set(["alt","src","width","height","loading","srcset"])},aa={pre:new Set(["format"]),gallery:new Set(["mode","showfilename","caption","perrow","widths","heights","showthumbnails"]),poem:new Set(["compact"]),categorytree:new Set(["hideroot","onlyroot","depth","mode","hideprefix","namespaces","showcount","notranslations"]),combooption:new Set(["name","for","inline"]),nowiki:It,indicator:new Set(["name"]),langconvert:new Set(["from","to"]),ref:new Set(["group","name","follow","dir","details"]),references:new Set(["group","responsive"]),charinsert:new Set(["label"]),choose:new Set(["uncached","before","after"]),option:ea,choicetemplate:ea,imagemap:It,inputbox:It,templatestyles:new Set(["src","wrapper"]),dynamicpagelist:It,poll:new Set(["id","show-results-before-voting"]),score:new Set(["line_width_inches","lang","override_midi","raw","note-language","override_audio","override_ogg","sound","vorbis"]),seo:new Set(["title","title_mode","title_separator","keywords","description","robots","google_bot","image","image_width","image_height","image_alt","type","site_name","locale","section","author","published_time","twitter_site"]),tab:new Set(["nested","name","index","class","block","inline","openname","closename","collapsed","dropdown","style","bgcolor","container","id","title"]),tabs:new Set(["plain","class","container","id","title","style"]),combobox:new Set(["placeholder","value","id","class","text","dropdown","style"]),math:new Set([...ji,"chem"]),chem:ji,ce:ji,hiero:It,phonos:new Set(["ipa","class","text","lang","wikibase","file"]),section:new Set(["begin","end"]),source:Zo,syntaxhighlight:Zo,templatedata:It,timeline:new Set(["method","font"]),quiz:new Set(["display","shuffleanswers","points","shuffle","case"]),languages:It,mapframe:new Set([...ta,"frameless"]),maplink:new Set([...ta,"class"]),rss:new Set(["template","templatename","max","highlight","filter","filterout","reverse","date","item-max-length"]),"page-collection":new Set(["lang","name","description","end-date"])},la={table:ra,td:new Set([...Oi,"scope"]),th:Oi,br:na,caption:ne,div:ne,hr:Gn,h1:ne,h2:ne,h3:ne,h4:ne,h5:ne,h6:ne,li:Hn,p:ne,pre:Gn,tr:ia,ul:Hn},da={dynamicpagelist:["category","notcategory","namespace","count","offset","imagewidth","imageheight","imagesperrow","mode","gallerycaption","galleryshowfilesize","galleryshowfilename","order","ordermethod","redirects","stablepages","qualitypages","suppresserrors","addfirstcategorydate","shownamespace","ignoresubpages","googlehack","nofollow"],inputbox:["preloadparams[]","type","width","preload","preloadtitle","page","editintro","useve","usedt","summary","nosummary","minor","break","default","placeholder","bgcolor","buttonlabel","searchbuttonlabel","fulltextbutton","namespaces","labeltext","hidden","id","inline","prefix","dir","searchengine","searchtype","searchfilter","tour","arialabel"]}});var og,ag,lg,dg,Vr,gr,Te,Ve,Ft,ga,_i,pr,pa=w(()=>{"use strict";z();ae();qi();se();D();G();lt();og=/expression|(?:accelerator|-o-link(?:-source)?|-o-replace)\s*:|(?:url|src|image(?:-set)?)\s*\(|attr\s*\([^)]+[\s,]url/u,ag=/(?:^|\s|\*\/)(?:java|vb)script(?:\W|$)/iu,lg=new Set(["ext","arg","magic-word","template"]),dg=new Set(["about","property","resource","datatype","typeof","itemid","itemprop","itemref","itemscope","itemtype"]),pr=class extends L{constructor(e,t,n,i,s,a="",l,p=[]){let g=new ue(n,"attr-key",s,p),d;if(n==="title"||t==="img"&&n==="alt")d=new L(l,s,p,{}),d.type="attr-value",d.setAttribute("stage",10);else if(t==="gallery"&&n==="caption"||t==="ref"&&n==="details"||(t==="mapframe"||t==="maplink")&&n==="text"||t==="choose"&&(n==="before"||n==="after")){let u=ge(V({},s),{excludes:[...s.excludes,"heading","html","table","hr","list"]});d=new L(l,u,p,{}),d.type="attr-value",d.setAttribute("stage",1)}else d=new ue(l,"attr-value",s,p,{});super(void 0,s,p);S(this,Ft);S(this,Vr);S(this,gr);S(this,Te);S(this,Ve);C(this,Vr,e),this.append(g,d),C(this,Te,a),C(this,Ve,[...i]),C(this,gr,t),this.setAttribute("name",Ue(re(n)))}get type(){return m(this,Vr)}get tag(){return m(this,gr)}get balanced(){return!m(this,Te)||m(this,Ve)[0]===m(this,Ve)[1]}afterBuild(){m(this,Te).includes("\0")&&C(this,Te,this.buildFromStr(m(this,Te),0)),this.parentNode&&C(this,gr,this.parentNode.name),I(this,Ft,ga).call(this),super.afterBuild()}toString(e){let[t="",n=""]=m(this,Ve);return m(this,Te)?super.toString(e,m(this,Te)+t)+n:this.firstChild.toString(e)}text(){return m(this,Te)?`${super.text(`${m(this,Te).trim()}"`)}"`:this.firstChild.text()}getGaps(){var e,t;return m(this,Te)?m(this,Te).length+((t=(e=m(this,Ve)[0])==null?void 0:e.length)!=null?t:0):0}lint(e=this.getAbsoluteIndex(),t){var n;{let i=super.lint(e,t),{balanced:s,firstChild:a,lastChild:l,name:p,tag:g}=this,d=new W(this,e),u=["unclosed-quote","obsolete-attr"],{lintConfig:c}=v,f=u.map(x=>c.getSeverity(x,p));if(f[0]&&!s){let x=j(l,d,u[0],"unclosed-quotes",f[0]);x.startIndex--,x.startCol--,c.computeEditInfo&&(x.suggestions=[Le(x.endIndex,m(this,Ve)[0])]),i.push(x)}let h=I(this,Ft,_i).call(this,e,d);return h&&i.push(h),f[1]&&((n=la[g])!=null&&n.has(p))&&i.push(j(a,d,u[1],"obsolete-attribute",f[1])),i}}getValue(){return m(this,Te)?this.lastChild.text().trim():this.type==="ext-attr"||""}escape(){}getAttribute(e){return e==="invalid"?I(this,Ft,_i).call(this):super.getAttribute(e)}print(){}json(e,t,n=this.getAbsoluteIndex()){}};Vr=new WeakMap,gr=new WeakMap,Te=new WeakMap,Ve=new WeakMap,Ft=new WeakSet,ga=function(){this.setAttribute("name",Ue(this.firstChild.text()))},_i=function(e,t){let{firstChild:n,lastChild:i,type:s,name:a,tag:l,parentNode:p}=this,g=!i.childNodes.some(({type:b})=>lg.has(b)),d=this.getValue(),u=aa[l],c=oa[l],{length:f}=this.toString(),h="illegal-attr",x,T;if({lintConfig:x}=v,{computeEditInfo:T}=x,!(u!=null&&u.has(a))&&!(c!=null&&c.has(a))&&(s==="ext-attr"?u||c:!/\{\{[^{]+\}\}/u.test(a))&&(s==="ext-attr"&&!c||!/^(?:xmlns:[\w:.-]+|data-(?!ooui|mw|parsoid)[^:]*)$/u.test(a)&&(l==="meta"||l==="link"||!sa.has(a)))||(a==="itemtype"||a==="itemid"||a==="itemref")&&!(p!=null&&p.hasAttr("itemscope"))){if(e===void 0)return!0;{let b=x.getSeverity(h,"unknown");if(b){let y=j(n,t,h,"illegal-attribute-name",b);return T&&(y.suggestions=[O(e,f)]),y}}}else if(a==="style"&&typeof d=="string"&&og.test(d)){if(e===void 0)return!0;{h="insecure-style";let b=x.getSeverity(h);return b&&j(i,t,h,"insecure-style",b)}}else if(a==="tabindex"&&typeof d=="string"&&d!=="0"){if(e===void 0)return!0;{let b=x.getSeverity(h,"tabindex");if(b){let y=j(i,t,h,"nonzero-tabindex",b);return T&&(y.suggestions=[O(e,f),me(y,"0 tabindex","0")]),y}}}else if(typeof d=="string"&&((/^xmlns:[\w:.-]+$/u.test(a)||dg.has(a))&&ag.test(d)||g&&(a==="href"||l==="img"&&a==="src")&&!new RegExp(String.raw`^(?:${this.getAttribute("config").protocol}|//)\S+$`,"iu").test(d))){if(e===void 0)return!0;{let b=x.getSeverity(h,"value");return b&&j(i,t,h,"illegal-attribute-value",b)}}else if(g&&s!=="ext-attr"){let b=ho(l,a),y=String(d).toLowerCase();if(b.length>0&&b.every(k=>k!==y)){if(e===void 0)return!0;{let k=x.getSeverity(h,"value");return k&&j(i,t,h,"illegal-attribute-value",k)}}}return!1}});var ua,gg,pg,Qr,Xr,Wi,ft,Vn=w(()=>{"use strict";z();ae();se();D();G();lt();pa();ua=o=>o.slice(0,-1),gg=o=>`${ua(o)}-dirty`,pg=(()=>{try{return new RegExp(String.raw`[\p{L}\p{N}]`,"u")}catch(o){return/[^\W_]/u}})(),ft=class extends L{constructor(e,t,n,i,s=[]){super(void 0,i,s,{});S(this,Xr);S(this,Qr);if(C(this,Qr,t),this.setAttribute("name",n),e){let a=/([^\s/](?:(?!\0\d+~\x7F)[^\s/=])*)(?:((?:\s(?:\s|\0\d+[cn]\x7F)*)?(?:=|\0\d+~\x7F)(?:\s|\0\d+[cn]\x7F)*)(?:(["'])([\s\S]*?)(\3|$)|(\S*)))?/gu,l="",p=a.exec(e),g=0,d=()=>{l&&(super.insertAt(new ue(l,gg(t),i,s,{})),l="")};for(;p;){let{index:u,0:c,1:f,2:h,3:x,4:T,5:b,6:y}=p;if(l+=e.slice(g,u),/^(?:[\w:]|\0\d+t\x7F)(?:[\w:.-]|\0\d+t\x7F)*$/u.test(re(f).trim())){let k=T!=null?T:y,A=[x,b],N=new pr(ua(t),n,f,A,i,h,k,s);d(),super.insertAt(N)}else l+=c;({lastIndex:g}=a),p=a.exec(e)}l+=e.slice(g),d()}}get type(){return m(this,Qr)}afterBuild(){let{parentNode:e}=this;e!=null&&e.is("td")&&this.setAttribute("name",e.subtype),super.afterBuild()}getAttrTokens(e){return this.childNodes.filter(t=>t instanceof pr&&(!e||t.name===Ue(e)))}hasAttr(e){return this.getAttrTokens(e).length>0}getAttrToken(e){{let t=this.getAttrTokens(e);return t[t.length-1]}}getAttr(e){var t;return(t=this.getAttrToken(e))==null?void 0:t.getValue()}lint(e=this.getAbsoluteIndex(),t){{let n=super.lint(e,t),{parentNode:i,childNodes:s}=this,a=new Map,l=new Set,p=new W(this,e),g=["no-ignored","no-duplicate"],{lintConfig:d}=v,{computeEditInfo:u,fix:c}=d,f=["closingTag","invalidAttributes","nonWordAttributes"].map(x=>d.getSeverity(g[0],x));if(f[0]&&I(this,Xr,Wi).call(this)){let x=F(this,p,g[0],"attributes-of-closing-tag",f[0]);if(u){let T=i.getAbsoluteIndex();x.suggestions=[O(x),Rn(T)]}n.push(x)}for(let x of s)if(x instanceof pr){let{name:T}=x;a.has(T)?(l.add(T),a.get(T).push(x)):a.set(T,[x])}else{let T=x.text().trim(),b=f[pg.test(T)?1:2];if(T&&b){let y=j(x,p,g[0],"invalid-attribute",b);u&&(y.suggestions=[O(y,0," ")]),n.push(y)}}let h=d.getSeverity(g[1],"attribute");if(h&&l.size>0)for(let x of l){let T=a.get(x).map(b=>{let y=b.getValue();return[b,y===!0?"":y]});Array.prototype.push.apply(n,T.map(([b,y],k)=>{let A=j(b,p,g[1],v.msg("duplicate-attribute",x),h);if(u||c){let N=O(A);!y||T.slice(0,k).some(([,E])=>E===y)?A.fix=N:u&&(A.suggestions=[N])}return A}))}return n}}escape(){}getAttribute(e){return e==="invalid"?I(this,Xr,Wi).call(this):super.getAttribute(e)}print(){}};Qr=new WeakMap,Xr=new WeakSet,Wi=function(){let{parentNode:e}=this;return(e==null?void 0:e.type)==="html"&&e.closing&&this.text().trim()!==""}});var fa={};Z(fa,{PreToken:()=>Di});var Di,ca=w(()=>{"use strict";G();Ct();Di=class extends L{get type(){return"ext-inner"}constructor(r,e,t=[]){if(r){let n=/<nowiki>/giu,i=/<\/nowiki>/giu,{length:s}=n.source,a=n.exec(r);a&&(i.lastIndex=a.index+s);let l=i.exec(r),p=0,g="";for(;a&&l;)new de(a[0],e,t,!0),new de(l[0],e,t,!0),g+=`${r.slice(p,a.index)}\0${t.length-1}n${r.slice(a.index+s,l.index)}\0${t.length}n`,p=l.index+s+1,n.lastIndex=p,a=n.exec(r),a&&(i.lastIndex=a.index+s),l=i.exec(r);r=g+r.slice(p)}super(r,e,t,{}),this.setAttribute("stage",10)}isPlain(){return!0}lint(r=this.getAbsoluteIndex()){return super.lint(r,/<\s*\/\s*(pre)\b/giu)}}});var ct,Qn=w(()=>{"use strict";G();ct=class extends L{get type(){return"ext-inner"}toString(r){return super.toString(r,`
1
+ "use strict";(()=>{var ro=Object.create;var At=Object.defineProperty,Wd=Object.defineProperties,no=Object.getOwnPropertyDescriptor,Dd=Object.getOwnPropertyDescriptors,Md=Object.getOwnPropertyNames,En=Object.getOwnPropertySymbols,Ud=Object.getPrototypeOf,xi=Object.prototype.hasOwnProperty,io=Object.prototype.propertyIsEnumerable;var so=(o,t)=>(t=Symbol[o])?t:Symbol.for("Symbol."+o),Zt=o=>{throw TypeError(o)};var Ln=(o,t,e)=>t in o?At(o,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):o[t]=e,V=(o,t)=>{for(var e in t||(t={}))xi.call(t,e)&&Ln(o,e,t[e]);if(En)for(var e of En(t))io.call(t,e)&&Ln(o,e,t[e]);return o},ge=(o,t)=>Wd(o,Dd(t)),to=(o,t)=>At(o,"name",{value:t,configurable:!0});var Nn=(o,t)=>{var e={};for(var r in o)xi.call(o,r)&&t.indexOf(r)<0&&(e[r]=o[r]);if(o!=null&&En)for(var r of En(o))t.indexOf(r)<0&&io.call(o,r)&&(e[r]=o[r]);return e};var w=(o,t)=>()=>(o&&(t=o(o=0)),t);var oo=(o,t)=>()=>(t||o((t={exports:{}}).exports,t),t.exports),Z=(o,t)=>{for(var e in t)At(o,e,{get:t[e],enumerable:!0})},ao=(o,t,e,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let n of Md(t))!xi.call(o,n)&&n!==e&&At(o,n,{get:()=>t[n],enumerable:!(r=no(t,n))||r.enumerable});return o};var zd=(o,t,e)=>(e=o!=null?ro(Ud(o)):{},ao(t||!o||!o.__esModule?At(e,"default",{value:o,enumerable:!0}):e,o)),J=o=>ao(At({},"__esModule",{value:!0}),o);var B=o=>{var t;return[,,,ro((t=o==null?void 0:o[so("metadata")])!=null?t:null)]},lo=["class","method","getter","setter","accessor","field","value","get","set"],Ir=o=>o!==void 0&&typeof o!="function"?Zt("Function expected"):o,Gd=(o,t,e,r,n)=>({kind:lo[o],name:t,metadata:r,addInitializer:i=>e._?Zt("Already initialized"):n.push(Ir(i||null))}),Fr=(o,t)=>Ln(t,so("metadata"),o[3]),R=(o,t,e,r)=>{for(var n=0,i=o[t>>1],s=i&&i.length;n<s;n++)t&1?i[n].call(e):r=i[n].call(e,r);return r},P=(o,t,e,r,n,i)=>{var s,a,l,p,g,d=t&7,f=!!(t&8),c=!!(t&16),u=d>3?o.length+1:d?f?1:2:0,x=lo[d+5],h=d>3&&(o[u-1]=[]),T=o[u]||(o[u]=[]),b=d&&(!c&&!f&&(n=n.prototype),d<5&&(d>3||!c)&&no(d<4?n:{get[e](){return m(this,i)},set[e](k){return C(this,i,k)}},e));d?c&&d<4&&to(i,(d>2?"set ":d>1?"get ":"")+e):to(n,e);for(var y=r.length-1;y>=0;y--)p=Gd(d,e,l={},o[3],T),d&&(p.static=f,p.private=c,g=p.access={has:c?k=>Hd(n,k):k=>e in k},d^3&&(g.get=c?k=>(d^1?m:I)(k,n,d^4?i:b.get):k=>k[e]),d>2&&(g.set=c?(k,A)=>C(k,n,A,d^4?i:b.set):(k,A)=>k[e]=A)),a=(0,r[y])(d?d<4?c?i:b[x]:d>4?void 0:{get:b.get,set:b.set}:n,p),l._=1,d^4||a===void 0?Ir(a)&&(d>4?h.unshift(a):d?c?i=a:b[x]=a:n=a):typeof a!="object"||a===null?Zt("Object expected"):(Ir(s=a.get)&&(b.get=s),Ir(s=a.set)&&(b.set=s),Ir(s=a.init)&&h.unshift(s));return d||Fr(o,n),b&&At(n,e,b),c?d^4?i:b:n},ce=(o,t,e)=>Ln(o,typeof t!="symbol"?t+"":t,e),yi=(o,t,e)=>t.has(o)||Zt("Cannot "+e),Hd=(o,t)=>Object(t)!==t?Zt('Cannot use the "in" operator on this value'):o.has(t),m=(o,t,e)=>(yi(o,t,"read from private field"),e?e.call(o):t.get(o)),S=(o,t,e)=>t.has(o)?Zt("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(o):t.set(o,e),C=(o,t,e,r)=>(yi(o,t,"write to private field"),r?r.call(o,e):t.set(o,e),e),I=(o,t,e)=>(yi(o,t,"access private method"),e);var $n=(o,t,e,r)=>({set _(n){C(o,t,n,e)},get _(){return m(o,t,r)}});var go,Rr,Ti=w(()=>{"use strict";go=(()=>{let o={redirect:1,onlyinclude:1,noinclude:1,include:1,comment:1,ext:1,arg:2,"magic-word":2,template:2,heading:2,html:3,table:4,hr:5,"double-underscore":5,link:6,category:6,file:6,quote:7,"ext-link":8,"free-ext-link":9,"magic-link":9,list:10,dd:10,converter:11};return Object.setPrototypeOf(o,null),o})(),Rr=(()=>{let o=["arg-in-ext","bold-header","format-leakage","fostered-content","h1","illegal-attr","insecure-style","invalid-gallery","invalid-imagemap","invalid-invoke","invalid-isbn","invalid-json","invalid-url","lonely-apos","lonely-bracket","lonely-http","nested-link","no-arg","no-duplicate","no-ignored","obsolete-attr","obsolete-tag","parsing-order","pipe-like","syntax-like","table-layout","tag-like","unbalanced-header","unclosed-comment","unclosed-quote","unclosed-table","unescaped","unknown-page","unmatched-tag","unterminated-url","url-encoding","var-anchor","void-ext"];return Object.freeze(o),o})()});function ke(o,t,e){return e===1?o.replace(/\0(\d+)g\x7F/gu,(r,n)=>ke(String(t[n]),t,2)):e===2?o.replace(/\0(\d+)n\x7F/gu,(r,n)=>String(t[n])):o.replace(/\0(\d+)\x7F/gu,(r,n)=>t[n])}var Ie,po,De,Me,Ue,Pr,uo,re,Ee,Vd,Qd,In,Br,fo,Jd,Xd,Lp,ae=w(()=>{"use strict";Ie=String.raw` \xA0\u1680\u2000-\u200A\u202F\u205F\u3000`,po=String.raw`[^[\]<>"\0-\x1F\x7F${Ie}\uFFFD]`,De=String.raw`(?:\[[\da-f:.]+\]|${po})`,Me=String.raw`(?:${po}|\0\d+[cn!~]\x7F)*`,Ue=o=>o.trim().toLowerCase();Pr=(o,t)=>e=>e.replace(o,t),uo=Pr(/[\0\x7F]|\r$/gmu,""),re=Pr(/\0\d+[cn]\x7F/gu,""),Ee=(o,t="")=>o.map(e=>typeof e=="string"?e:e.text()).join(t),Vd={lt:"<",gt:">",lbrack:"[",rbrack:"]",lbrace:"{",rbrace:"}",nbsp:" ",amp:"&",quot:'"'},Qd=Pr(/&(?:#(\d+|[Xx][\da-fA-F]+)|([lg]t|[LG]T|[lr]brac[ke]|nbsp|amp|AMP|quot|QUOT));/gu,(o,t,e)=>t?String.fromCodePoint(+((/^x/iu.test(t)?"0":"")+t)):Vd[e.toLowerCase()]),Br=o=>(In!=null||(In=Qd),In(o)),fo=Pr(/&#(\d+|x[\da-f]+);/giu,(o,t)=>String.fromCodePoint(+((/^x/iu.test(t)?"0":"")+t))),Jd={"&":"amp","<":"lt",">":"gt",'"':"quot","\n":"#10"},Xd=(o=/[&<>"{}[\]|]/gu)=>Pr(o,t=>`&${Jd[t]};`),Lp=Xd(/[&<>]/gu)});var co=oo(($p,Kd)=>{Kd.exports={ext:[],html:[["b","bdi","del","i","ins","u","font","big","small","sub","sup","h1","h2","h3","h4","h5","h6","cite","code","em","s","strike","strong","tt","var","div","center","blockquote","ol","ul","dl","table","caption","pre","ruby","rb","rp","rt","rtc","p","span","abbr","dfn","kbd","samp","data","time","mark","tr","td","th","q","bdo"],["li","dt","dd"],["br","wbr","hr","meta","link"]],namespaces:{"0":"","6":"File","10":"Template","14":"Category","828":"Module"},nsid:{"":0,file:6,template:10,category:14,module:828},functionHook:["msgnw"],variable:["!","=","pageid","articlepath","server","servername","scriptpath","stylepath"],parserFunction:[{msgnw:"msgnw",pageid:"pageid",articlepath:"articlepath",server:"server",servername:"servername",scriptpath:"scriptpath",stylepath:"stylepath","#language":"language","#special":"special","#speciale":"speciale","#tag":"tag","#formatdate":"formatdate","#dateformat":"formatdate","#invoke":"invoke","#while":"while","#dowhile":"dowhile","#loop":"loop","#forargs":"forargs","#fornumargs":"fornumargs","#if":"if","#ifeq":"ifeq","#switch":"switch","#ifexist":"ifexist","#ifexpr":"ifexpr","#iferror":"iferror","#time":"time","#timel":"timel","#expr":"expr","#rel2abs":"rel2abs","#titleparts":"titleparts","#categorytree":"categorytree","#urldecode":"urldecode","#choose":"choose","#var":"var","#varexists":"varexists","#var_final":"var_final","#vardefine":"vardefine","#vardefineecho":"vardefineecho","#widget":"widget","#related":"related","#regex":"regex","#regex_var":"regex_var","#regexquote":"regexquote","#regexall":"regexall","#len":"len","#pos":"pos","#rpos":"rpos","#sub":"sub","#count":"count","#rmatch":"rmatch","#rreplace":"rreplace","#replace":"replace","#rsplit":"rsplit","#explode":"explode","#tab":"tab","#seo":"seo","#babel":"babel","#translation":"translation","#commaseparatedlist":"commaseparatedlist","#coordinates":"coordinates","#lst":"lst","#lsth":"lsth","#lstx":"lstx","#assessment":"assessment","#mentor":"mentor","#property":"property","#target":"target","#section":"lst","#section-x":"lstx","#section-h":"lsth","#statements":"statements","#useliquidthreads":"useliquidthreads","#lqtpagelimit":"lqtpagelimit","#avatar":"avatar","#img":"img","#chart":"chart"},{"!":"!","=":"=","#FORMAL":"formal","#bcp47":"bcp47","#dir":"dir","#interwikilink":"interwikilink","#interlanguagelink":"interlanguagelink","#contentmodel":"contentmodel","#isbn":"isbn","#timef":"timef","#timefl":"timefl"},["msg","raw"],["subst","safesubst"]],doubleUnderscore:[[],[]],protocol:"bitcoin:|ftp://|ftps://|geo:|git://|gopher://|http://|https://|irc://|ircs://|magnet:|mailto:|matrix:|mms://|news:|nntp://|redis://|sftp://|sip:|sips:|sms:|ssh://|svn://|tel:|telnet://|urn:|wikipedia://|worldwind://|xmpp:",interwiki:[],img:{},redirection:["#redirect"],variants:[]}});var mo,jr,ho,ki,Or=w(()=>{"use strict";mo=new Set(["alt","link","lang","page","caption"]),jr=new Set(["tiff","tif","png","gif","jpg","jpeg","webp","xcf","pdf","svg","djvu"]),ho=["templatedata","mapframe","maplink"],ki=co()});var bo,Yd,qr,xo,yo,To,ko=w(()=>{"use strict";bo={'"':'"',"\\":"\\","/":"/",b:"\b",f:"\f",n:`
2
+ `,r:"\r",t:" "},Yd=new Set([" "," ",`
3
+ `,"\r"]),qr=o=>o===""?"end of input":o==='"'?`'"'`:JSON.stringify(o),xo=o=>{let t,e,r,n,i=(h,T,b)=>{T===void 0?h.from=t-1:(h.from=T,h.to=b!=null?b:t-1)},s=(h,T,b)=>{let y={message:h,severity:"warning"};i(y,T,b),n.push(y)},a=(h,T,b)=>{let y={warnings:n,message:h,severity:"error"};throw i(y,T,b),y},l=h=>(h&&h!==e&&a(`Expected ${qr(h)} instead of ${qr(e)}`),e=r.charAt(t),t++,e),p=()=>{let h="",T=t-1;if(e==="-"&&(h="-",l()),e==="0")h+=e,l(),e>="0"&&e<="9"&&a("Bad number");else if(e>="1"&&e<="9")for(;e>="0"&&e<="9";)h+=e,l();else a("No number after minus sign");if(e!=="."&&e!=="e"&&e!=="E"){let y=Number(h);Number.isSafeInteger(y)||s("Not a safe integer",T);return}if(e===".")for(h+=".",l(),(e<"0"||e>"9")&&a("Unterminated fractional number");e>="0"&&e<="9";)h+=e,l();if(e==="e"||e==="E")for(h+=e,l(),(e==="-"||e==="+")&&(h+=e,l());e>="0"&&e<="9";)h+=e,l();let b=Number(h);Number.isFinite(b)||a("Bad number")},g=()=>{let h="";if(e==='"')for(;l();){if(e==='"')return l(),h;let T=t-1;if(e==="\\")if(l(),e==="u"){let b=0,y=0;for(;b<4;b++){let k=parseInt(l(),16);if(!isFinite(k))break;y=y*16+k}b<4&&a("Bad unicode escape",T),h+=String.fromCharCode(y)}else typeof bo[e]=="string"?h+=bo[e]:a("Bad escaped character",T,t);else e<" "?a("Bad control character",T,t):h+=e}else a(`Expected '"' instead of ${JSON.stringify(e)}`);return a("Unterminated string")},d=()=>{for(;e;){for(;e&&Yd.has(e);)l();if(o&&e==="/"){let h=r.charAt(t);if(h==="/"){for(l(),l();e&&e!==`
4
+ `&&e!=="\r";)l();continue}else if(h==="*"){for(l(),l();e&&!(e==="*"&&r.charAt(t)==="/");)l();e==="*"&&(l(),l());continue}}break}},f=()=>{switch(e){case"t":l(),l("r"),l("u"),l("e");return;case"f":l(),l("a"),l("l"),l("s"),l("e");return;case"n":l(),l("u"),l("l"),l("l");return;default:a(`Unexpected ${JSON.stringify(e)}`)}},c=()=>{if(l(),d(),e==="]"){l();return}else if(o&&e===","){l(),d(),l("]");return}let h;for(;e;){if(e==="]"){if(o){l();return}a("Trailing comma in array",h,h+1)}if(x(),d(),e==="]"){l();return}else e===","?(h=t-1,l(),d()):a(`Expected "," or "]" instead of ${qr(e)}`)}a("Unterminated array")},u=()=>{let h=new Set;if(l(),d(),e==="}"){l();return}else if(o&&e===","){l(),d(),l("}");return}let T;for(;e;){if(e==="}"){if(o){l();return}a("Trailing comma in object",T,T+1)}T=t;let b=g(),y=t-2;if(d(),l(":"),h.has(b)?s(`Duplicate key ${qr(b)}`,T,y):h.add(b),x(),d(),e==="}"){l();return}else e===","?(T=t-1,l(),d()):a(`Expected "," or "}" instead of ${qr(e)}`)}a(`Expected '"'`)},x=()=>{switch(d(),e){case"":return;case"{":return u();case"[":return c();case'"':return g();case"-":return p();default:return e>="0"&&e<="9"?p():f()}};return h=>{if(r=h,n=[],t=0,e=" ",x(),d(),e)a("Syntax error");else if(n.length>0)throw{warnings:n}}},yo=xo(),To=xo(!0)});function Be(o){let t=new Map,e=new WeakMap;return r=>{let n=typeof r=="string"?t:e;if(n.has(r)){let s=n.get(r);return s.lastIndex=0,s}let i=o(r);return n.set(r,i),i}}var St,Fn,vi,vo,Zd,Ao,So,Co,ze=w(()=>{"use strict";ko();St=o=>decodeURIComponent(o.replace(/%(?![\da-f]{2})/giu,"%25"));Fn=o=>{let t=[],e=0;for(let r of o.split(`
5
+ `)){let n=e+r.length;t.push([r,e,n]),e=n+1}return t},vi=o=>o&&Number(o[1]),vo=(o,t)=>{var n;let e,r=i=>{e!=null||(e=Fn(o));let s=e.findIndex(([,,a])=>i<=a)+1;return{line:s,column:i-e[s-1][1]+1}};for(let i of t){let{line:s,column:a,from:l,to:p}=i;l==null?s?(e!=null||(e=Fn(o)),(n=i.column)!=null||(i.column=1),i.from=e[s-1][1]+(i.column-1)):(i.from=0,i.line=1,i.column=1):(!s||!a)&&Object.assign(i,r(l)),p!==void 0&&({line:i.endLine,column:i.endColumn}=r(p)),i.position=i.from}return t},Zd=(o,t)=>{if(t||o.trim())try{JSON.parse(o)}catch(e){let{message:r}=e,n=vi(/\bline (\d+)/u.exec(r)),i=vi(/\bcolumn (\d+)/u.exec(r)),s=vi(/\bposition (\d+)/u.exec(r));return vo(o,[{message:r,line:n,column:i,from:s,severity:"error"}])}return[]},Ao=(o,t)=>{try{t(o)}catch(r){if(!(r instanceof Error)){let e=r,{warnings:n}=e,i=Nn(e,["warnings"]);return i.message&&n.push(i),vo(o,n)}}return[]},So=o=>{var e;if(!o.trim())return[];let t=Ao(o,yo);return((e=t[t.length-1])==null?void 0:e.severity)==="error"?t:[...t,...Zd(o)]},Co=o=>o.trim()?Ao(o,To):[]});var _r,er,Wr,Dr,Ai,W,oe=w(()=>{"use strict";W=class{constructor(t,e){S(this,Dr);S(this,_r);S(this,er);S(this,Wr);C(this,_r,t),C(this,er,e)}get start(){return m(this,er)}get top(){return I(this,Dr,Ai).call(this).top}get left(){return I(this,Dr,Ai).call(this).left}};_r=new WeakMap,er=new WeakMap,Wr=new WeakMap,Dr=new WeakSet,Ai=function(){var t;return(t=m(this,Wr))!=null||C(this,Wr,m(this,_r).getRootNode().posFromIndex(m(this,er))),m(this,Wr)}});var eg,tg,Rn,Si,wo,j,F,me,tr,O,Pn,Le,Bn,jn,On,ot,Ge,qn,je,Eo,z=w(()=>{"use strict";ze();Se();oe();D();eg=new Set(["tr","td","th","caption"]),tg=new Set(["Template:!!","Template:!-"]),Rn=o=>{let t=o.childNodes.find(e=>e.text().trim());if(!t||t.type==="text"&&t.data.trim().startsWith("!")||t.is("magic-word")&&t.name==="!"||t.is("template")&&tg.has(t.name)||t.is("html")&&eg.has(t.name))return!1;if(t.is("arg"))return t.length>1&&Rn(t.childNodes[1]);if(t.is("magic-word"))try{let e=t.getPossibleValues().map(Rn);return e.includes(2)?2:e.includes(1)&&1}catch(e){}return t.is("template")||t.is("magic-word")&&t.name==="invoke"?1:2},Si=(o,t,e,r)=>({line:o+e-1,character:(e===1?t:0)+r}),wo=o=>(t,e,r,n,i="error")=>{let{start:s}=e,{top:a,left:l}=e instanceof W?e:new W(t,s),{offsetHeight:p,offsetWidth:g}=t,{startIndex:d,startLine:f,startCol:c}=o(t,s,a,l),{line:u,character:x}=Si(f,c,p,g);return{rule:r,message:v.msg(n),severity:i,startIndex:d,endIndex:d+t.toString().length,startLine:f,endLine:u,startCol:c,endCol:x}},j=wo((o,t,e,r)=>{let n=o.getRelativeIndex(),{top:i,left:s}=o.parentNode.posFromIndex(n);return{startIndex:t+n,startLine:e+i,startCol:i?s:r+s}}),F=wo((o,t,e,r)=>({startIndex:t,startLine:e,startCol:r})),me=(o,t,e,r=0)=>({desc:v.msg(t),range:[o.startIndex+r,o.endIndex],text:e}),tr=(o,t,e)=>({desc:v.msg(t),range:[o,o],text:e}),O=(o,t=0,e="")=>typeof o=="number"?{desc:v.msg("remove"),range:[o,o+t],text:e}:me(o,"remove",e,t),Pn=(o,t)=>me(o,"decode",St(t.text().replace(/%(?=21|3[ce]|5[bd]|7[b-d])/giu,"%25"))),Le=(o,t,e=0)=>({desc:v.msg("close"),range:[o+e,o],text:t}),Bn=o=>({desc:v.msg("open"),range:[o+1,o+2],text:""}),jn=(o,t)=>me(o,"comment",`<!--${t}-->`),On=(o,t)=>me(o,"uppercase",t.toUpperCase()),ot=(o,t=0)=>({desc:v.msg("whitespace"),range:[o,o+t],text:" "}),Ge=(o,t,e=1)=>({desc:v.msg("escape"),range:[o,o+e],text:t.repeat(e)}),qn=(o,t)=>({desc:v.msg("escape"),range:[o,o+t.length],text:t.replace(/\|/gu,"&#124;")}),je=(o,t,e,r)=>{if(o&&(r||v.viewOnly&&o[0]===ne.rev))return o[1];let n=t();return(r||v.viewOnly)&&e([ne.rev,n]),n},Eo=(o,t)=>o==="ol"&&t==="type"?["1","a","A","i","I"]:o==="th"&&t==="scope"?["row","col","rowgroup","colgroup"]:t==="dir"?["ltr","rtl","auto"]:t==="aria-hidden"?["true","false"]:[]});var rg,_n,Ci=w(()=>{"use strict";rg=o=>{if(o.includes("#")){let t=o.indexOf("#"),e=o.slice(0,t),r=o.slice(t+1);return(n,i)=>(t===0||n===e)&&i===r}return t=>t===o},_n=(o,t,e)=>{if(o=o.trim(),!o)return(()=>!0);let r=o.split(",").map(n=>n.trim()).filter(n=>n!=="").map(rg);return(({type:n,name:i})=>r.some(s=>s(n,i)))}});var No=oo((zp,Lo)=>{Lo.exports=function(o,t,e,r,n){var i,s;if(r===void 0)r=0;else if(r=r|0,r<0||r>=o.length)throw new RangeError("invalid lower bound");if(n===void 0)n=o.length-1;else if(n=n|0,n<r||n>=o.length)throw new RangeError("invalid upper bound");for(;r<=n;)if(i=r+(n-r>>>1),s=+e(o[i],t,i,o),s<0)r=i+1;else if(s>0)n=i-1;else return i;return~r}});var $o,Io,Fo=w(()=>{"use strict";$o=zd(No()),Io=(o,t,e)=>{let r=(0,$o.default)(o,t,e);return r<0?~r:r}});var rr,Wn=w(()=>{"use strict";z();rr=(o=!0)=>t=>{let e=new WeakMap;return function(...r){return je(e.get(this),()=>t.apply(this,r),n=>{e.set(this,n)},o)}}});var Ro,Po=w(()=>{"use strict";Ro=o=>{class t extends o{get firstChild(){return this.childNodes[0]}get lastChild(){return this.childNodes[this.childNodes.length-1]}get offsetHeight(){return this.getDimension().height}get offsetWidth(){return this.getDimension().width}}return t}});var Bo,jo,Ur,nr,ir,zr,He,sr,Mr,Oe,wi=w(()=>{"use strict";ze();Fo();z();Se();Wn();Po();D();jo=[Ro],Bo=[rr(!1)];Oe=class{constructor(){R(Mr,5,this);ce(this,"childNodes",[]);S(this,Ur);S(this,nr);S(this,ir);S(this,zr);S(this,He);S(this,sr,{})}get parentNode(){return m(this,Ur)}get nextSibling(){return m(this,nr)}get previousSibling(){return m(this,ir)}getChildNodes(){let{childNodes:t}=this;return Object.isFrozen(t)?[...t]:t}getAttribute(t){return t==="padding"?0:this[t]}setAttribute(t,e){switch(t){case"parentNode":C(this,Ur,e),e||(C(this,nr,void 0),C(this,ir,void 0));break;case"nextSibling":C(this,nr,e);break;case"previousSibling":C(this,ir,e);break;case"aIndex":v.viewOnly&&C(this,He,[ne.rev,e]);break;default:this[t]=e}}getRootNode(){return je(m(this,zr),()=>{var t,e;return(e=(t=this.parentNode)==null?void 0:t.getRootNode())!=null?e:this},t=>{let[,e]=t;e.type==="root"&&C(this,zr,t)})}indexFromPos(t,e){{if(t<0||e<0)return;let r=this.getLines();if(t>=r.length)return;let[,n,i]=r[t],s=n+e;return s>i?void 0:s}}posFromIndex(t){{let{length:e}=String(this);if(t+=t<0?e:0,t>=0&&t<=e){let r=this.getLines(),n=Io(r,t,([,,i],s)=>i-s);return{top:n,left:t-r[n][1]}}return}}getDimension(){{let t=this.getLines(),e=t[t.length-1];return{height:t.length,width:e[2]-e[1]}}}getGaps(t){return 0}getRelativeIndex(t){if(t===void 0){let{parentNode:e}=this;return e?e.getRelativeIndex(e.childNodes.indexOf(this)):0}return je(m(this,sr)[t],()=>{var s;let{childNodes:e}=this,r=((s=m(this,He))==null?void 0:s[0])===ne.rev&&m(this,He)[1],n=t+(t<0?e.length:0),i=this.getAttribute("padding");for(let a=0;a<n;a++)v.viewOnly&&(m(this,sr)[a]=[ne.rev,i],r!==!1&&C(e[a],He,[ne.rev,r+i])),i+=e[a].toString().length+this.getGaps(a);return i},e=>{m(this,sr)[t]=e})}getAbsoluteIndex(){return je(m(this,He),()=>{let{parentNode:t}=this;return t?t.getAbsoluteIndex()+this.getRelativeIndex():0},t=>{C(this,He,t)})}getBoundingClientRect(){this.lspError("AstNode.getBoundingClientRect")}is(t){return this.type===t}getLines(){return Fn(String(this))}seal(t,e){}lspError(t){throw new Error(`${t} method is only available in the LSP version!`)}};Mr=B(null),Ur=new WeakMap,nr=new WeakMap,ir=new WeakMap,zr=new WeakMap,He=new WeakMap,sr=new WeakMap,P(Mr,1,"getLines",Bo,Oe),Oe=P(Mr,0,"AstNode",jo,Oe),R(Mr,1,Oe)});var Oo,qo=w(()=>{"use strict";Ci();Oo=o=>{var t,Ei;{class r extends o{constructor(){super(...arguments);S(this,t)}getElementBy(s){let a=[...this.childNodes].reverse();for(;a.length>0;){let l=a.pop(),{type:p,childNodes:g}=l;if(p!=="text"){if(s(l))return l;for(let d=g.length-1;d>=0;d--)a.push(g[d])}}}querySelector(s){return this.getElementBy(I(this,t,Ei).call(this,s))}getElementsBy(s){let a=[...this.childNodes].reverse(),l=[];for(;a.length>0;){let p=a.pop(),{type:g,childNodes:d}=p;if(g!=="text"){s(p)&&l.push(p);for(let f=d.length-1;f>=0;f--)a.push(d[f])}}return l}querySelectorAll(s){return this.getElementsBy(I(this,t,Ei).call(this,s))}escape(){}}return t=new WeakSet,Ei=function(s){return _n(s,this)},r}}});var _o,Li,ng,Ct,Wo=w(()=>{"use strict";ae();Se();Ci();wi();qo();_o=[Oo];Ct=class extends(ng=Oe){get length(){return this.childNodes.length}text(t){return Ee(this.childNodes,t)}removeAt(t){this.lspError("AstElement.removeAt")}insertAt(t,e=this.length){return Dn(this,e,0,[t]),t}closest(t){let e=_n(t,this),{parentNode:r}=this;for(;r;){if(e(r))return r;({parentNode:r}=r)}}isInside(t){var e;return((e=this.closest(`${t},ext`))==null?void 0:e.type)===t}append(...t){this.safeAppend(t)}safeAppend(t){for(let e of t)this.insertAt(e)}safeReplaceChildren(t){}setText(t,e=0){e+=e<0?this.length:0;let r=this.childNodes[e],{data:n}=r;return r.replaceData(t),n}toString(t,e=""){return this.childNodes.map(r=>r.toString(t)).join(e)}caretPositionFromIndex(t){this.lspError("AstElement.caretPositionFromIndex")}elementFromIndex(t){this.lspError("AstElement.elementFromIndex")}elementFromPoint(t,e){this.lspError("AstElement.elementFromPoint")}lint(t=this.getAbsoluteIndex(),e){{let r=[];for(let n=0,i=t+this.getAttribute("padding");n<this.length;n++){let s=this.childNodes[n];s.setAttribute("aIndex",i);let a=s.lint(i,e);a.length>0&&Array.prototype.push.apply(r,a),i+=s.toString().length+this.getGaps(n)}return r}}print(t={}){}json(t,e=1/0,r=this.getAbsoluteIndex()){}};Li=B(ng),Ct=P(Li,0,"AstElement",_o,Ct),R(Li,1,Ct)});var Ni,Mo,ig,sg,og,ag,Do,lg,Mn,Uo,Gr,zo=w(()=>{"use strict";ae();z();D();wi();Ni=String.raw`[${Ie}\t]*`,Mo=String.raw`<(?:/[^\S\n]*)?([a-z]\w*)|\{+|\}+|\[{2,}|\[(?![^[]*?\])|((?:^|\])[^[]*?)\]+|\n={2,}`,ig=new RegExp(String.raw`${Mo}|\bhttps?[:/]/+|\b(?:rfc|pmid)(?=[-::]?${Ni}\d)|\bisbn(?=[-::]?${Ni}(?:\d(?:${Ni}|-)){6})`,"giu"),sg=new RegExp(Mo,"giu"),og=new Set(["attr-value","ext-link-text","link-text"]),ag={"[":/[[\]]/u,"{":/[{}]/u,"]":/[[\]](?=[^[\]]*$)/u,"}":/[{}](?=[^{}]*$)/u},Do=new Set(["html","head","style","title","body","a","audio","img","video","embed","iframe","object","canvas","script","col","colgroup","tbody","tfoot","thead","button","input","label","option","select","textarea"]),lg=(()=>{try{return new RegExp(String.raw`[\p{L}\p{N}_]`,"u")}catch(o){return/\w/u}})(),Gr=class extends Oe{constructor(e){super();S(this,Mn);ce(this,"data","");this.data=e}get type(){return"text"}toString(e){var r;return e&&!((r=this.parentNode)!=null&&r.getAttribute("built"))?re(this.data):this.data}text(){return this.data}lint(e=this.getAbsoluteIndex(),r){var n,i,s;{if(r===!1)return[];let{data:a,parentNode:l,nextSibling:p,previousSibling:g}=this;if(!l)throw new Error("An isolated text node cannot be linted!");let{type:d,parentNode:f}=l;if(d==="attr-value"){let{name:_,tag:U}=f;if(U==="ref"&&(_==="name"||_==="follow")||_==="group"&&(U==="ref"||U==="references")||U==="choose"&&(_==="before"||_==="after"))return[]}if(r!=null||(r=l.isPlain()&&!og.has(d)?ig:sg),a.search(r)===-1)return[];r.lastIndex=0;let c=[],u=p==null?void 0:p.type,x=p==null?void 0:p.name,h=g==null?void 0:g.type,T=this.getRootNode(),b=T.toString(),{ext:y,html:k,variants:A}=T.getAttribute("config"),{top:N,left:E}=T.posFromIndex(e),{lintConfig:$}=v,H=$.rules["tag-like"],q=typeof H=="object"&&H[1]?new Set(Object.keys(H[1]).filter(_=>_!=="invalid"&&_!=="disallowed")):new Set,K=new Set(["onlyinclude","noinclude","includeonly",...y,...k[0],...k[1],...k[2],...q,...$.getSeverity("tag-like","disallowed")?Do:[]]);for(let _=r.exec(a);_;_=r.exec(a)){let{index:U,0:M}=_,[,be,Kt]=_,xt=M==="["&&d==="ext-link-text";if(Kt&&Kt!=="]"){let{length:se}=Kt;U+=se,M=M.slice(se)}else{if(M.startsWith("<")&&!K.has(be.toLowerCase())||xt&&(/&(?:rbrack|#93|#x5[Dd];);/u.test(a.slice(U+1))||p!=null&&p.is("ext")&&x==="nowiki"&&((n=p.innerText)!=null&&n.includes("]"))))continue;M.startsWith(`
6
+ ==`)&&(U++,M=M.slice(1))}M=M.toLowerCase();let[Y]=M,yt=M==="rfc"||M==="pmid"||M==="isbn",$r=Y==="{",ui=Y==="}",Xs=Y==="[",fi=Y==="]",{length:st}=M;fi&&(U||st>1)&&r.lastIndex--;let Yt=e+U,Tt=Yt+st,fe,Pe,Cn,wn,kt=b[Tt],ci=b[Yt-1],mi=$r||Xs,hi=M==="{"&&ci==="-"&&A.length>0,bi=M==="}"&&kt==="-"&&A.length>0,Ks=Xs&&u==="free-ext-link"&&!a.slice(U+1).trim()||fi&&h==="free-ext-link"&&!a.slice(0,U).includes("]");if(yt)fe="lonely-http",M=M.toUpperCase(),Pe=$.getSeverity(fe,M);else if(Y==="<"){fe="tag-like";let se;/^<\/?\s/u.test(M)||!/[\s/>]/u.test(kt!=null?kt:"")?se="invalid":q.has(be)?se=be:Do.has(be)&&!y.includes(be)&&(se="disallowed"),Pe=$.getSeverity(fe,se)}else if(Y==="=")fe="syntax-like",Pe=$.getSeverity(fe,"heading");else if(hi||bi)fe="lonely-bracket",Pe=$.getSeverity(fe,"converter"),hi&&U>0?(M="-{",U--,Yt--,st=2):bi&&U<a.length-1&&(M="}-",Tt++,st=2);else if(Ks)fe="lonely-bracket",Pe=$.getSeverity(fe,"extLink");else if(mi||ui||fi)if(fe="lonely-bracket",st>1||$r&&kt===Y||ui&&ci===Y)Pe=$.getSeverity(fe,"double");else{if(!xt){let se=ag[Y],we=mi?a.slice(U+1):a.slice(0,U);if($r&&((i=se.exec(we))==null?void 0:i[0])==="}"||ui&&((s=se.exec(we))==null?void 0:s[0])==="{")continue;if(!we.includes(Y)){let We=mi?"nextSibling":"previousSibling",$e=this[We];for(;$e&&($e.type!=="text"||!se.test($e.data));)$e=$e[We];if($e&&se.exec($e.data)[0]!==Y)continue}}Pe=$.getSeverity(fe,"single")}else fe="lonely-http",Pe=$.getSeverity(fe);if(!Pe)continue;let Ys=this.posFromIndex(U),{line:Zs,character:eo}=Si(N,E,Ys.top+1,Ys.left);if(Y==="="){let se=a.indexOf(`
7
+ `,U),we=p,We;if(se===-1){let $e=0;for(;we&&!(we.type==="text"&&($e=we.data.indexOf(`
8
+ `),$e!==-1));)we=we.nextSibling;if(!we)continue;We=we.data.slice(0,$e)}else We=a.slice(U+st,se);if(!/(?:^|[^=])=+\s*(?:\S\s*)?$/u.test(We))continue;se===-1?(Tt=we.getAbsoluteIndex()+We.length,{top:Cn,left:wn}=T.posFromIndex(Tt)):(Tt+=We.length,st+=We.length)}let vt={rule:fe,message:v.msg(Y==="="?"header-like":"lonely",yt||Y==="h"||hi||bi?M:Y),severity:Pe,startIndex:Yt,endIndex:Tt,startLine:Zs,endLine:Cn!=null?Cn:Zs,startCol:eo,endCol:wn!=null?wn:eo+st};if($.computeEditInfo)if(Y==="<")vt.suggestions=[Ge(Yt,"&lt;")];else if(Y==="h"&&d!=="link-text"&&lg.test(ci||""))vt.suggestions=[ot(Yt)];else if(xt){let se=l.getAbsoluteIndex()+l.toString().length;vt.suggestions=[Ge(se,"&#93;")]}else if(M==="]"&&Ks){let se=e-g.toString().length;vt.suggestions=[tr(se,"left-bracket","[")]}else yt&&(vt.suggestions=[..._[0]===M?[]:[On(vt,M)],...kt===":"||kt===":"?[ot(Tt,1)]:[]]);c.push(vt)}return c}}replaceData(e){I(this,Mn,Uo).call(this,e)}splitText(e){this.lspError("AstText.splitText")}escape(){}print(){}};Mn=new WeakSet,Uo=function(e){this.setAttribute("data",e)}});var ve,at=w(()=>{"use strict";ve=(o=!0,t=!0)=>e=>{class r extends e{text(){return""}lint(i){return o?[]:super.lint(i)}}return r}});var Q,xe=w(()=>{"use strict";Q=o=>{}});var Hr,he,lt=w(()=>{"use strict";G();he=class extends L{constructor(e,r,n,i,s){super(e,n,i,s);S(this,Hr);C(this,Hr,r)}get type(){return m(this,Hr)}lint(e=this.getAbsoluteIndex()){return super.lint(e,!1)}};Hr=new WeakMap});var pe,qe=w(()=>{"use strict";pe=({length:o})=>t=>{class e extends t{getAttribute(n){return n==="padding"?o:super.getAttribute(n)}}return e}});var or,ue,dt=w(()=>{"use strict";G();ue=class extends L{constructor(e,r,n,i,s){super(e,n,i,s);S(this,or);C(this,or,r)}get type(){return m(this,or)}set type(e){C(this,or,e)}getAttribute(e){var r;return e==="invalid"?this.type==="converter-flag"&&!!((r=this.parentNode)!=null&&r.isInvalidFlag(this)):super.getAttribute(e)}};or=new WeakMap});var Go,ar,Ve,gt,Un,Ho,$i,dg,ye,lr=w(()=>{"use strict";z();Se();oe();qe();xe();D();G();dt();Go=[Q,pe("[[")];ye=class extends(dg=L){constructor(e,r,n,i=[],s="|"){super(void 0,n,i,{});S(this,Un);S(this,ar,!0);S(this,Ve);S(this,gt);if(this.insertAt(new ue(e,"link-target",n,i,{})),r!==void 0){let a=new L(r,n,i,{});a.type="link-text",a.setAttribute("stage",10),this.insertAt(a)}C(this,Ve,s)}get link(){}get fragment(){}afterBuild(){C(this,gt,this.getTitle()),m(this,Ve).includes("\0")&&C(this,Ve,this.buildFromStr(m(this,Ve),0)),I(this,Un,Ho).call(this),super.afterBuild()}setAttribute(e,r){e==="bracket"?C(this,ar,r):e==="title"?C(this,gt,r):super.setAttribute(e,r)}toString(e){let r=super.toString(e,m(this,Ve));return m(this,ar)?`[[${r}]]`:r}text(){let e=super.text("|");return m(this,ar)?`[[${e}]]`:e}getAttribute(e){return e==="title"?m(this,gt):super.getAttribute(e)}getGaps(e){return e===0?m(this,Ve).length:1}lint(e=this.getAbsoluteIndex(),r){{let n=super.lint(e,r),{childNodes:[i,s],type:a}=this,{encoded:l,fragment:p}=m(this,gt),{lintConfig:g}=v,{computeEditInfo:d,fix:f}=g,c=new W(this,e),u="unknown-page",x=g.getSeverity(u);if(x&&i.childNodes.some(({type:h})=>h==="template")&&n.push(j(i,c,u,"template-in-link",x)),u="url-encoding",x=g.getSeverity(u),x&&l){let h=j(i,c,u,"unnecessary-encoding",x);(d||f)&&(h.fix=Pn(h,i)),n.push(h)}if(u="pipe-like",x=g.getSeverity(u,"link"),x&&(a==="link"||a==="category")){let h=s==null?void 0:s.childNodes.findIndex(b=>b.type==="text"&&b.data.includes("|")),T=s==null?void 0:s.childNodes[h];if(T){let b=j(s,c,u,"pipe-in-link",x);if(d){let y=b.startIndex+s.getRelativeIndex(h);b.suggestions=[qn(y,T.data)]}n.push(b)}}if(u="no-ignored",x=g.getSeverity(u,"fragment"),x&&p!==void 0&&!Vo(a)){let h=j(i,c,u,"useless-fragment",x);if(d||f){let T=i.childNodes.findIndex(y=>y.type==="text"&&y.data.includes("#")),b=i.childNodes[T];b&&(h.fix=O(h,i.getRelativeIndex(T)+b.data.indexOf("#")))}n.push(h)}return n}}getTitle(e,r){return this.normalizeTitle(this.firstChild.text(),0,{halfParsed:r,temporary:e,decode:!0,selfLink:!0})}print(){}json(e,r,n=this.getAbsoluteIndex()){}};$i=B(dg),ar=new WeakMap,Ve=new WeakMap,gt=new WeakMap,Un=new WeakSet,Ho=function(){this.type!=="ext-inner"&&this.setAttribute("name",m(this,gt).title)},ye=P($i,0,"LinkBaseToken",Go,ye),R($i,1,ye)});var Qo,Ii,gg,le,pt=w(()=>{"use strict";xe();G();Qo=[Q];le=class extends(gg=L){get innerText(){return this.firstChild.data}constructor(t="",e,r){super(t,e,r)}};Ii=B(gg),le=P(Ii,0,"NowikiBaseToken",Qo,le),R(Ii,1,le)});var Jo,Fi,pg,de,wt=w(()=>{"use strict";z();at();D();pt();Jo=[ve(!1)];de=class extends(pg=le){get type(){return"noinclude"}toString(t){return t?"":super.toString()}lint(t=this.getAbsoluteIndex()){{let{lintConfig:e}=v,r="no-ignored",n=e.getSeverity(r,"include");if(n){let{innerText:i}=this,s=/^<(includeonly|(?:no|only)include)\s+(?:[^\s>/]|\/(?!>))[^>]*>$/iu.exec(i);if(s){let a=F(this,{start:t},r,"useless-attribute",n),{computeEditInfo:l}=e,p=s[1].length+1,g=i.endsWith("/>")?2:1;return a.startIndex+=p,a.startCol+=p,a.endIndex-=g,a.endCol-=g,l&&(a.suggestions=[O(a)]),[a]}}return[]}}};Fi=B(pg),de=P(Fi,0,"NoincludeToken",Jo,de),R(Fi,1,de)});var zn,Xo=w(()=>{"use strict";z();D();lr();wt();zn=class extends ye{get type(){return"redirect-target"}constructor(t,e,r,n){super(t,void 0,r,n),e!==void 0&&this.insertAt(new de(e,r,n))}getTitle(){return this.normalizeTitle(this.firstChild.toString(),0,{halfParsed:!0,decode:!0,page:""})}lint(t=this.getAbsoluteIndex()){{let e=super.lint(t,!1),r="no-ignored",{lintConfig:n}=v,i=n.getSeverity(r,"redirect");if(i&&this.length===2){let s=j(this.lastChild,{start:t},r,"useless-link-text",i);s.startIndex--,s.startCol--,(n.computeEditInfo||n.fix)&&(s.fix=O(s)),e.push(s)}return e}}}});var Ko,Lt,Vr,Ri,ug,Et,Yo=w(()=>{"use strict";at();xe();G();lt();Xo();Ko=[ve(!1,!1),Q];Et=class extends(ug=L){constructor(e,r,n,i,s,a,l=[]){super(void 0,a,l);S(this,Lt);S(this,Vr);C(this,Lt,e),C(this,Vr,s),this.append(new he(r,"redirect-syntax",a,l),new zn(n,i==null?void 0:i.slice(1),a,l))}get type(){return"redirect"}getAttribute(e){return e==="padding"?m(this,Lt).length:super.getAttribute(e)}toString(e){return m(this,Lt)+super.toString(e)+m(this,Vr)}lint(e=this.getAbsoluteIndex()){{let r=e+m(this,Lt).length+this.firstChild.toString().length;return this.lastChild.setAttribute("aIndex",r),this.lastChild.lint(r)}}print(){}};Ri=B(ug),Lt=new WeakMap,Vr=new WeakMap,Et=P(Ri,0,"RedirectToken",Ko,Et),R(Ri,1,Et)});var Zo={};Z(Zo,{parseRedirect:()=>fg});var fg,ea=w(()=>{"use strict";D();Yo();fg=(o,t,e)=>{var n;(n=t.regexRedirect)!=null||(t.regexRedirect=new RegExp(String.raw`^(\s*)((?:${t.redirection.join("|")})\s*(?::\s*)?)\[\[([^\n|\]]+)(\|.*?)?\]\](\s*)`,"iu"));let r=t.regexRedirect.exec(o);return r&&v.normalizeTitle(r[3],0,!1,t,{halfParsed:!0,temporary:!0,decode:!0,page:""}).valid?(o=`\0${e.length}o${o.slice(r[0].length)}`,new Et(...r.slice(1),t,e),o):!1}});var ta,Pi,cg,Nt,ra=w(()=>{"use strict";qe();xe();G();ta=[Q,pe("<onlyinclude>")];Nt=class extends(cg=L){get type(){return"onlyinclude"}toString(t){return`<onlyinclude>${super.toString(t)}</onlyinclude>`}isPlain(){return!0}print(){}};Pi=B(cg),Nt=P(Pi,0,"OnlyincludeToken",ta,Nt),R(Pi,1,Nt)});var ut,Qr=w(()=>{"use strict";ut=(o=1)=>t=>{class e extends t{getGaps(){return o}}return e}});var na,$t,ft,Bi,mg,Fe,Gn=w(()=>{"use strict";Qr();xe();G();na=[ut(),Q];Fe=class extends(mg=L){constructor(e,r,n,i,s,a=[]){super(void 0,s);S(this,$t);S(this,ft);ce(this,"closed");this.setAttribute("name",e.toLowerCase()),C(this,$t,[e,i||e]),this.closed=i!=="",C(this,ft,i===void 0),this.append(r,n);let l=typeof r=="string"?-1:a.indexOf(r);a.splice(l===-1?1/0:l,0,this)}get innerText(){return m(this,ft)?void 0:this.lastChild.text()}get selfClosing(){return m(this,ft)}toString(e){let{firstChild:r,lastChild:n}=this,[i,s]=m(this,$t);return m(this,ft)?`<${i}${r.toString(e)}/>`:`<${i}${r.toString(e)}>${n.toString(e)}${this.closed?`</${s}>`:""}`}text(){let[e,r]=m(this,$t);return m(this,ft)?`<${e}${this.firstChild.text()}/>`:`<${e}${super.text(">")}${this.closed?`</${r}>`:""}`}getAttribute(e){return e==="padding"?m(this,$t)[0].length+1:super.getAttribute(e)}print(){}json(e,r,n=this.getAbsoluteIndex()){}};Bi=B(mg),$t=new WeakMap,ft=new WeakMap,Fe=P(Bi,0,"TagPairToken",na,Fe),R(Bi,1,Fe)});var ia,ji,hg,It,sa=w(()=>{"use strict";z();oe();at();D();Gn();ia=[ve(!1)];It=class extends(hg=Fe){get type(){return"include"}constructor(t,e="",r,n,i,s){super(t,e,r!=null?r:"",r===void 0||n!=null?n:"",i,s)}toString(t){return t?"":super.toString()}lint(t=this.getAbsoluteIndex()){{let e=[],{firstChild:r,closed:n,name:i}=this,s=new W(this,t),a=["no-ignored","unclosed-comment"],{lintConfig:l}=v,{computeEditInfo:p}=l,g=a.map(d=>l.getSeverity(d,"include"));if(g[0]&&r.data.trim()){let d=j(r,s,a[0],"useless-attribute",g[0]);p&&(d.suggestions=[O(d)]),e.push(d)}if(g[1]&&!n){let d=F(this,s,a[1],v.msg("unclosed",`<${i}>`),g[1]);p&&(d.suggestions=[Le(d.endIndex,`</${i}>`)]),e.push(d)}return e}}};ji=B(hg),It=P(ji,0,"IncludeToken",ia,It),R(ji,1,It)});var dr,Hn=w(()=>{"use strict";dr=(o=0)=>t=>{var e,oa;{class n extends t{constructor(){super(...arguments);S(this,e)}hasAttr(a){this.lspError("AttributesParent.hasAttr")}getAttr(a){return I(this,e,oa).call(this).getAttr(a)}}return e=new WeakSet,oa=function(){return this.childNodes[o]},n}}});var ie,aa,la,Vn,qi,da,Qn,fa,ca,ma,Oi,ga,pa,ua,Ft,ha,ba,xa,ya,Ta,_i=w(()=>{"use strict";ie=new Set(["align"]),aa=new Set(["cite"]),la=new Set(["cite","datetime"]),Vn=new Set(["width"]),qi=new Set(["axis","align","bgcolor","height","width","valign"]),da=new Set([...qi,"abbr","headers","scope","rowspan","colspan"]),Qn=new Set(["type"]),fa=new Set(["summary","align","bgcolor","cellpadding","cellspacing","frame","rules","width"]),ca=new Set(["clear"]),ma=new Set(["bgcolor","align","valign"]),Oi=new Set(["id","qid","forcemathmode","type","display"]),ga=new Set(["enclose","inline","lang","line","linelinks","style","class","id","dir","copy","highlight","start"]),pa=new Set(["weight"]),ua=new Set(["width","height","zoom","latitude","longitude","align","mapstyle","lang","alt","text"]),Ft=new Set,ha=new Set(["id","class","style","lang","dir","title","tabindex","aria-describedby","aria-flowto","aria-hidden","aria-label","aria-labelledby","aria-level","aria-owns","role","about","property","resource","datatype","typeof","itemid","itemprop","itemref","itemscope","itemtype"]),ba={div:ie,h1:ie,h2:ie,h3:ie,h4:ie,h5:ie,h6:ie,blockquote:aa,q:aa,p:ie,br:ca,pre:Vn,ins:la,del:la,ul:Qn,ol:new Set(["type","start","reversed"]),li:new Set(["type","value"]),table:new Set([...fa,"border"]),caption:ie,tr:ma,td:da,th:da,font:new Set(["size","color","face"]),hr:Vn,data:new Set(["value"]),time:new Set(["datetime"]),meta:new Set(["itemprop","content"]),link:new Set(["itemprop","href","title"]),gallery:Qn,poem:ie,categorytree:ie,combooption:ie,img:new Set(["alt","src","width","height","loading","srcset"])},xa={pre:new Set(["format"]),gallery:new Set(["mode","showfilename","caption","perrow","widths","heights","showthumbnails"]),poem:new Set(["compact"]),categorytree:new Set(["hideroot","onlyroot","depth","mode","hideprefix","namespaces","showcount","notranslations"]),combooption:new Set(["name","for","inline"]),nowiki:Ft,indicator:new Set(["name"]),langconvert:new Set(["from","to"]),ref:new Set(["group","name","follow","dir","details"]),references:new Set(["group","responsive"]),charinsert:new Set(["label"]),choose:new Set(["uncached","before","after"]),option:pa,choicetemplate:pa,imagemap:Ft,inputbox:Ft,templatestyles:new Set(["src","wrapper"]),dynamicpagelist:Ft,poll:new Set(["id","show-results-before-voting"]),score:new Set(["line_width_inches","lang","override_midi","raw","note-language","override_audio","override_ogg","sound","vorbis"]),seo:new Set(["title","title_mode","title_separator","keywords","description","robots","google_bot","image","image_width","image_height","image_alt","type","site_name","locale","section","author","published_time","twitter_site"]),tab:new Set(["nested","name","index","class","block","inline","openname","closename","collapsed","dropdown","style","bgcolor","container","id","title"]),tabs:new Set(["plain","class","container","id","title","style"]),combobox:new Set(["placeholder","value","id","class","text","dropdown","style"]),math:new Set([...Oi,"chem"]),chem:Oi,ce:Oi,hiero:Ft,phonos:new Set(["ipa","class","text","lang","wikibase","file"]),section:new Set(["begin","end"]),source:ga,syntaxhighlight:ga,templatedata:Ft,timeline:new Set(["method","font"]),quiz:new Set(["display","shuffleanswers","points","shuffle","case"]),languages:Ft,mapframe:new Set([...ua,"frameless"]),maplink:new Set([...ua,"class"]),rss:new Set(["template","templatename","max","highlight","filter","filterout","reverse","date","item-max-length"]),"page-collection":new Set(["lang","name","description","end-date"])},ya={table:fa,td:new Set([...qi,"scope"]),th:qi,br:ca,caption:ie,div:ie,hr:Vn,h1:ie,h2:ie,h3:ie,h4:ie,h5:ie,h6:ie,li:Qn,p:ie,pre:Vn,tr:ma,ul:Qn},Ta={dynamicpagelist:["category","notcategory","namespace","count","offset","imagewidth","imageheight","imagesperrow","mode","gallerycaption","galleryshowfilesize","galleryshowfilename","order","ordermethod","redirects","stablepages","qualitypages","suppresserrors","addfirstcategorydate","shownamespace","ignoresubpages","googlehack","nofollow"],inputbox:["preloadparams[]","type","width","preload","preloadtitle","page","editintro","useve","usedt","summary","nosummary","minor","break","default","placeholder","bgcolor","buttonlabel","searchbuttonlabel","fulltextbutton","namespaces","labeltext","hidden","id","inline","prefix","dir","searchengine","searchtype","searchfilter","tour","arialabel"]}});var bg,xg,yg,Tg,Jr,gr,Te,Qe,Rt,ka,Wi,pr,va=w(()=>{"use strict";z();ae();_i();oe();D();G();dt();bg=/expression|(?:accelerator|-o-link(?:-source)?|-o-replace)\s*:|(?:url|src|image(?:-set)?)\s*\(|attr\s*\([^)]+[\s,]url/u,xg=/(?:^|\s|\*\/)(?:java|vb)script(?:\W|$)/iu,yg=new Set(["ext","arg","magic-word","template"]),Tg=new Set(["about","property","resource","datatype","typeof","itemid","itemprop","itemref","itemscope","itemtype"]),pr=class extends L{constructor(e,r,n,i,s,a="",l,p=[]){let g=new ue(n,"attr-key",s,p),d;if(n==="title"||r==="img"&&n==="alt")d=new L(l,s,p,{}),d.type="attr-value",d.setAttribute("stage",10);else if(r==="gallery"&&n==="caption"||r==="ref"&&n==="details"||(r==="mapframe"||r==="maplink")&&n==="text"||r==="choose"&&(n==="before"||n==="after")){let f=ge(V({},s),{excludes:[...s.excludes,"heading","html","table","hr","list"]});d=new L(l,f,p,{}),d.type="attr-value",d.setAttribute("stage",1)}else d=new ue(l,"attr-value",s,p,{});super(void 0,s,p);S(this,Rt);S(this,Jr);S(this,gr);S(this,Te);S(this,Qe);C(this,Jr,e),this.append(g,d),C(this,Te,a),C(this,Qe,[...i]),C(this,gr,r),this.setAttribute("name",Ue(re(n)))}get type(){return m(this,Jr)}get tag(){return m(this,gr)}get balanced(){return!m(this,Te)||m(this,Qe)[0]===m(this,Qe)[1]}afterBuild(){m(this,Te).includes("\0")&&C(this,Te,this.buildFromStr(m(this,Te),0)),this.parentNode&&C(this,gr,this.parentNode.name),I(this,Rt,ka).call(this),super.afterBuild()}toString(e){let[r="",n=""]=m(this,Qe);return m(this,Te)?super.toString(e,m(this,Te)+r)+n:this.firstChild.toString(e)}text(){return m(this,Te)?`${super.text(`${m(this,Te).trim()}"`)}"`:this.firstChild.text()}getGaps(){var e,r;return m(this,Te)?m(this,Te).length+((r=(e=m(this,Qe)[0])==null?void 0:e.length)!=null?r:0):0}lint(e=this.getAbsoluteIndex(),r){var n;{let i=super.lint(e,r),{balanced:s,firstChild:a,lastChild:l,name:p,tag:g}=this,d=new W(this,e),f=["unclosed-quote","obsolete-attr"],{lintConfig:c}=v,u=f.map(h=>c.getSeverity(h,p));if(u[0]&&!s){let h=j(l,d,f[0],"unclosed-quotes",u[0]);h.startIndex--,h.startCol--,c.computeEditInfo&&(h.suggestions=[Le(h.endIndex,m(this,Qe)[0])]),i.push(h)}let x=I(this,Rt,Wi).call(this,e,d);return x&&i.push(x),u[1]&&((n=ya[g])!=null&&n.has(p))&&i.push(j(a,d,f[1],"obsolete-attribute",u[1])),i}}getValue(){return m(this,Te)?this.lastChild.text().trim():this.type==="ext-attr"||""}escape(){}getAttribute(e){return e==="invalid"?I(this,Rt,Wi).call(this):super.getAttribute(e)}print(){}json(e,r,n=this.getAbsoluteIndex()){}};Jr=new WeakMap,gr=new WeakMap,Te=new WeakMap,Qe=new WeakMap,Rt=new WeakSet,ka=function(){this.setAttribute("name",Ue(this.firstChild.text()))},Wi=function(e,r){let{firstChild:n,lastChild:i,type:s,name:a,tag:l,parentNode:p}=this,g=!i.childNodes.some(({type:b})=>yg.has(b)),d=this.getValue(),f=xa[l],c=ba[l],{length:u}=this.toString(),x="illegal-attr",h,T;if({lintConfig:h}=v,{computeEditInfo:T}=h,!(f!=null&&f.has(a))&&!(c!=null&&c.has(a))&&(s==="ext-attr"?f||c:!/\{\{[^{]+\}\}/u.test(a))&&(s==="ext-attr"&&!c||!/^(?:xmlns:[\w:.-]+|data-(?!ooui|mw|parsoid)[^:]*)$/u.test(a)&&(l==="meta"||l==="link"||!ha.has(a)))||(a==="itemtype"||a==="itemid"||a==="itemref")&&!(p!=null&&p.hasAttr("itemscope"))){if(e===void 0)return!0;{let b=h.getSeverity(x,"unknown");if(b){let y=j(n,r,x,"illegal-attribute-name",b);return T&&(y.suggestions=[O(e,u)]),y}}}else if(a==="style"&&typeof d=="string"&&bg.test(d)){if(e===void 0)return!0;{x="insecure-style";let b=h.getSeverity(x);return b&&j(i,r,x,"insecure-style",b)}}else if(a==="tabindex"&&typeof d=="string"&&d!=="0"){if(e===void 0)return!0;{let b=h.getSeverity(x,"tabindex");if(b){let y=j(i,r,x,"nonzero-tabindex",b);return T&&(y.suggestions=[O(e,u),me(y,"0 tabindex","0")]),y}}}else if(typeof d=="string"&&((/^xmlns:[\w:.-]+$/u.test(a)||Tg.has(a))&&xg.test(d)||g&&(a==="href"||l==="img"&&a==="src")&&!new RegExp(String.raw`^(?:${this.getAttribute("config").protocol}|//)\S+$`,"iu").test(d))){if(e===void 0)return!0;{let b=h.getSeverity(x,"value");return b&&j(i,r,x,"illegal-attribute-value",b)}}else if(g&&s!=="ext-attr"){let b=Eo(l,a),y=String(d).toLowerCase();if(b.length>0&&b.every(k=>k!==y)){if(e===void 0)return!0;{let k=h.getSeverity(x,"value");return k&&j(i,r,x,"illegal-attribute-value",k)}}}return!1}});var Aa,kg,vg,Xr,Kr,Di,ct,Jn=w(()=>{"use strict";z();ae();oe();D();G();dt();va();Aa=o=>o.slice(0,-1),kg=o=>`${Aa(o)}-dirty`,vg=(()=>{try{return new RegExp(String.raw`[\p{L}\p{N}]`,"u")}catch(o){return/[^\W_]/u}})(),ct=class extends L{constructor(e,r,n,i,s=[]){super(void 0,i,s,{});S(this,Kr);S(this,Xr);if(C(this,Xr,r),this.setAttribute("name",n),e){let a=/([^\s/](?:(?!\0\d+~\x7F)[^\s/=])*)(?:((?:\s(?:\s|\0\d+[cn]\x7F)*)?(?:=|\0\d+~\x7F)(?:\s|\0\d+[cn]\x7F)*)(?:(["'])([\s\S]*?)(\3|$)|(\S*)))?/gu,l="",p=a.exec(e),g=0,d=()=>{l&&(super.insertAt(new ue(l,kg(r),i,s,{})),l="")};for(;p;){let{index:f,0:c,1:u,2:x,3:h,4:T,5:b,6:y}=p;if(l+=e.slice(g,f),/^(?:[\w:]|\0\d+t\x7F)(?:[\w:.-]|\0\d+t\x7F)*$/u.test(re(u).trim())){let k=T!=null?T:y,A=[h,b],N=new pr(Aa(r),n,u,A,i,x,k,s);d(),super.insertAt(N)}else l+=c;({lastIndex:g}=a),p=a.exec(e)}l+=e.slice(g),d()}}get type(){return m(this,Xr)}afterBuild(){let{parentNode:e}=this;e!=null&&e.is("td")&&this.setAttribute("name",e.subtype),super.afterBuild()}getAttrTokens(e){return this.childNodes.filter(r=>r instanceof pr&&(!e||r.name===Ue(e)))}hasAttr(e){return this.getAttrTokens(e).length>0}getAttrToken(e){{let r=this.getAttrTokens(e);return r[r.length-1]}}getAttr(e){var r;return(r=this.getAttrToken(e))==null?void 0:r.getValue()}lint(e=this.getAbsoluteIndex(),r){{let n=super.lint(e,r),{parentNode:i,childNodes:s}=this,a=new Map,l=new Set,p=new W(this,e),g=["no-ignored","no-duplicate"],{lintConfig:d}=v,{computeEditInfo:f,fix:c}=d,u=["closingTag","invalidAttributes","nonWordAttributes"].map(h=>d.getSeverity(g[0],h));if(u[0]&&I(this,Kr,Di).call(this)){let h=F(this,p,g[0],"attributes-of-closing-tag",u[0]);if(f){let T=i.getAbsoluteIndex();h.suggestions=[O(h),Bn(T)]}n.push(h)}for(let h of s)if(h instanceof pr){let{name:T}=h;a.has(T)?(l.add(T),a.get(T).push(h)):a.set(T,[h])}else{let T=h.text().trim(),b=u[vg.test(T)?1:2];if(T&&b){let y=j(h,p,g[0],"invalid-attribute",b);f&&(y.suggestions=[O(y,0," ")]),n.push(y)}}let x=d.getSeverity(g[1],"attribute");if(x&&l.size>0)for(let h of l){let T=a.get(h).map(b=>{let y=b.getValue();return[b,y===!0?"":y]});Array.prototype.push.apply(n,T.map(([b,y],k)=>{let A=j(b,p,g[1],v.msg("duplicate-attribute",h),x);if(f||c){let N=O(A);!y||T.slice(0,k).some(([,E])=>E===y)?A.fix=N:f&&(A.suggestions=[N])}return A}))}return n}}escape(){}getAttribute(e){return e==="invalid"?I(this,Kr,Di).call(this):super.getAttribute(e)}print(){}};Xr=new WeakMap,Kr=new WeakSet,Di=function(){let{parentNode:e}=this;return(e==null?void 0:e.type)==="html"&&e.closing&&this.text().trim()!==""}});var Sa={};Z(Sa,{PreToken:()=>Mi});var Mi,Ca=w(()=>{"use strict";G();wt();Mi=class extends L{get type(){return"ext-inner"}constructor(t,e,r=[]){if(t){let n=/<nowiki>/giu,i=/<\/nowiki>/giu,{length:s}=n.source,a=n.exec(t);a&&(i.lastIndex=a.index+s);let l=i.exec(t),p=0,g="";for(;a&&l;)new de(a[0],e,r,!0),new de(l[0],e,r,!0),g+=`${t.slice(p,a.index)}\0${r.length-1}n${t.slice(a.index+s,l.index)}\0${r.length}n`,p=l.index+s+1,n.lastIndex=p,a=n.exec(t),a&&(i.lastIndex=a.index+s),l=i.exec(t);t=g+t.slice(p)}super(t,e,r,{}),this.setAttribute("stage",10)}isPlain(){return!0}lint(t=this.getAbsoluteIndex()){return super.lint(t,/<\s*\/\s*(pre)\b/giu)}}});var mt,Xn=w(()=>{"use strict";G();mt=class extends L{get type(){return"ext-inner"}toString(t){return super.toString(t,`
6
9
  `)}text(){return super.text(`
7
10
  `).replace(/\n\s*\n/gu,`
8
- `)}getGaps(){return 1}print(){}}});var Xn,ma=w(()=>{"use strict";z();qi();D();G();Xn=class extends L{get type(){return"param-line"}constructor(r,e,t,n,i){super(e,t,n,i),this.setAttribute("name",r)}lint(r=this.getAbsoluteIndex()){{let e="no-ignored",{lintConfig:t}=v,{name:n,childNodes:i}=this,s=t.getSeverity(e,n);if(!s)return[];let a=v.msg("invalid-parameter",n);if(i.some(({type:u})=>u==="ext"))return[F(this,{start:r},e,a,s)];let l=i.filter(({type:u})=>u!=="comment"&&u!=="include"&&u!=="noinclude"),p=n==="inputbox",g=p?l.findIndex(({type:u})=>u!=="text"):-1,d=l.slice(0,g===-1?void 0:g).map(String).join("").trim();if(d){p&&(d=d.toLowerCase());let u=d.indexOf("="),c=d.slice(0,u===-1?void 0:u).trim(),f=da[n];if(u===-1?g===-1||!f.some(h=>h.startsWith(c)):!f.includes(c)){let h=F(this,{start:r},e,a,s);return t.computeEditInfo&&(h.suggestions=[O(h)]),[h]}}return super.lint(r,!1)}}}});var ha={};Z(ha,{ParamTagToken:()=>Jr});var Jr,Mi=w(()=>{"use strict";Kr();Qn();ma();Jr=class extends ct{constructor(r,e,t,n,i=[],s){super(void 0,n,i,{}),t&&this.safeAppend(t.split(`
9
- `).map(a=>s?a:Rt(a,n,i,e)).map(a=>new Xn(r,a,n,i,{}))),i.splice(i.indexOf(this),1),i.push(this)}}});var ba,Yr,Zr,zi,Ui,ug,Qe,Gi=w(()=>{"use strict";z();Se();se();xe();D();G();at();ba=[Q];Qe=class extends(ug=L){constructor(e,t,n,i=[]){super(void 0,n,i);S(this,Zr);S(this,Yr);C(this,Yr,e);let s=new L(t[0],n,i);s.type="heading-title",s.setAttribute("stage",2);let a=new he(t[1],"heading-trail",n,i);this.append(s,a)}get type(){return"heading"}get level(){return m(this,Yr)}toString(e){let t=I(this,Zr,zi).call(this);return t+this.firstChild.toString(e)+t+this.lastChild.toString(e)}text(){let e=I(this,Zr,zi).call(this);return e+this.firstChild.text()+e}getAttribute(e){return e==="invalid"?this.inHtmlAttrs()===2:e==="padding"?this.level:super.getAttribute(e)}getGaps(){return this.level}lint(e=this.getAbsoluteIndex(),t){{let n=super.lint(e,t),{firstChild:i,level:s}=this,a=i.toString(),l=a.startsWith("="),p=l||a.endsWith("="),g=new W(this,e),d=this.inHtmlAttrs(),u=["h1","unbalanced-header","format-leakage"],{lintConfig:c}=v,{computeEditInfo:f,fix:h}=c,x=u.map(T=>c.getSeverity(T,"apostrophe"));if(x[0]&&this.level===1){let T=j(i,g,u[0],"<h1>",x[0]);f&&!p&&(T.suggestions=[me(T,"h2",`=${a}=`)]),n.push(T)}if(x[1]&&p){let T=v.msg("unbalanced-in-section-header",'"="'),b=j(i,g,u[1],T,x[1]);if(!(!f||a==="="))if(l){let[y]=/^=+/u.exec(a),k=s+y.length;b.suggestions=[{desc:`h${s}`,range:[b.startIndex,b.startIndex+y.length],text:""}],k<7&&b.suggestions.push({desc:`h${k}`,range:[b.endIndex,b.endIndex],text:y})}else{let y=/[^=](=+)$/u.exec(a)[1],k=s+y.length;b.suggestions=[{desc:`h${s}`,range:[b.endIndex-y.length,b.endIndex],text:""}],k<7&&b.suggestions.push({desc:`h${k}`,range:[b.startIndex,b.startIndex],text:y})}n.push(b)}if(d){let T="parsing-order",b=c.getSeverity(T,d===2?"heading":"templateInTable");b&&n.push(F(this,g,T,"header-in-html",b))}if(x[2]){let T=this.getRootNode().toString(),b=i.childNodes.filter(Jn("quote")),y=b.filter(({bold:A})=>A),k=b.filter(({italic:A})=>A);if(y.length%2){let A=j(y[y.length-1],ge(V({},g),{start:e+s,left:g.left+s}),u[2],v.msg("unbalanced-in-section-header","bold-apostrophes"),x[2]);if(f||h){let N=e+s+a.length,E=O(A);T.slice(A.endIndex,N).trim()?f&&(A.suggestions=[E,Le(N,"'''")]):y.length===1&&k.length===0?A.fix=E:f&&(A.suggestions=[E])}n.push(A)}if(k.length%2){let A=j(k[k.length-1],{start:e+s},u[2],v.msg("unbalanced-in-section-header","italic-apostrophes"),x[2]);if(f||h){let N=e+s+a.length;T.slice(A.endIndex,N).trim()?f&&(A.suggestions=[Le(N,"''")]):k.length===1&&y.length===0?A.fix=O(A):f&&(A.suggestions=[O(A)])}n.push(A)}}return n}}print(){}json(e,t,n=this.getAbsoluteIndex()){}};Ui=B(ug),Yr=new WeakMap,Zr=new WeakSet,zi=function(){return"=".repeat(this.level)},Qe=P(Ui,0,"HeadingToken",ba,Qe),R(Ui,1,Qe)});var fg,Kn,xa=w(()=>{"use strict";ae();z();D();G();fg=new RegExp(`https?://${De}${Me}$`,"iu"),Kn=class extends L{get type(){return"parameter"}get anon(){return this.firstChild.length===0}get duplicated(){}constructor(r,e,t,n=[]){super(void 0,t,n);let i=new L(typeof r=="number"?void 0:r,t,n,{}),s=new L(e,t,n);i.type="parameter-key",i.setAttribute("stage",2),s.type="parameter-value",s.setAttribute("stage",2),this.append(i,s)}trimName(r,e=!0){let t=(typeof r=="string"?r:r.toString(!0)).replace(/^[ \t\n\0\v]+|([^ \t\n\0\v])[ \t\n\0\v]+$/gu,"$1");return this.setAttribute("name",t),t}afterBuild(){if(!this.anon){let{parentNode:r,firstChild:e}=this,t=this.trimName(e);r&&r.getArgs(t,!1,!1).add(this)}super.afterBuild()}toString(r){return this.anon?this.lastChild.toString(r):super.toString(r,"=")}text(){return this.anon?this.lastChild.text():super.text("=")}getGaps(){return this.anon?0:1}lint(r=this.getAbsoluteIndex(),e){var t;{let n=super.lint(r,e),i="unescaped",{lintConfig:s}=v,a=s.getSeverity(i);if(a){let{firstChild:l}=this,p=(t=fg.exec(l.text()))==null?void 0:t[0];try{if(p&&new URL(p).search){let g=j(l,{start:r},i,"unescaped-query",a);g.startIndex=g.endIndex,g.startLine=g.endLine,g.startCol=g.endCol,g.endIndex++,g.endCol++,(s.computeEditInfo||s.fix)&&(g.fix=Ge(g.startIndex,"{{=}}")),n.push(g)}}catch(g){}}return n}}print(){}json(r,e,t=this.getAbsoluteIndex()){}}});var ya,en,Pt,ur,Bt,tn,fr,jt,Vi,Ta,Hi,cg,mt,ka=w(()=>{"use strict";ae();z();Se();se();Hr();xe();D();G();xa();lt();at();ya=[Q,pt()];mt=class extends(cg=L){constructor(e,t,n,i=[]){var T,b;let s,a=/^(?:\s|\0\d+[cn]\x7F)*\0(\d+)h\x7F(?:\s|\0\d+[cn]\x7F)*/u.exec(e);a&&(s=Number(a[1]),e=e.replace(`\0${s}h`,i[s].toString().replace(/^\n/u,"")));super(void 0,n,i,{});S(this,jt);ce(this,"modifier","");S(this,en,"template");S(this,Pt,":");S(this,ur,!1);S(this,Bt,new Map);S(this,tn,0);S(this,fr);let{parserFunction:l,variable:p,functionHook:g}=n,d=(T=/^(?:\s|\0\d+[cn]\x7F)*\0\d+s\x7F/u.exec(e))==null?void 0:T[0];if(d)this.setAttribute("modifier",d),e=e.slice(d.length);else if(e.includes(":")){let[y,...k]=e.split(":"),[A]=/^(?:\s|\0\d+[cn]\x7F)*/u.exec((b=k[0])!=null?b:"");this.setModifier(`${y}:${A}`)&&(e=k.join(":").slice(A.length))}let u=e.search(/[::]/u),c=e[u]===":",f=u!==-1;if(f||t.length===0&&!m(this,ur)){let y=f?e.slice(0,u):e,k=f&&e.slice(u+1),A=re(y),N=f?A.slice(A.search(/\S/u))+(c?":":""):A.trim(),[,E,$]=va(N,l),H=!("functionHook"in n)||g.includes($),q=p.includes($);if(f?$&&H:q){this.setAttribute("name",$),C(this,en,"magic-word"),c&&C(this,Pt,":");let K=new he(y,"magic-word-name",n,i);if(super.insertAt(K),k!==!1&&t.unshift([k]),this.name==="invoke")for(let _=0;_<2;_++){let U=t.shift();if(!U)break;let M=new ue(U.join("="),`invoke-${_?"function":"module"}`,n,i);super.insertAt(M)}}}if(this.type==="template"){let y=re(e).trim();if(!this.normalizeTitle(y,10,{halfParsed:!0,temporary:!0}).valid)throw i.pop(),new SyntaxError("Invalid template name");let k=new ue(e,"template-name",n,i,{});super.insertAt(k)}typeof s=="number"&&(i[s]=void 0);let h=this.isTemplate(),x=1;for(let y=0;y<t.length;y++){let k=t[y];h||this.name==="switch"&&y>0||this.name==="tag"&&y>1||(k[0]=k.join("="),k.length=1),k.length===1&&(k.unshift(x),x++),this.insertAt(new Kn(...k,n,i))}this.seal("modifier")}get type(){return m(this,en)}get module(){}get function(){}setModifier(e){let[,,t,n]=this.getAttribute("config").parserFunction,i=re(e).trim();if(e&&!i.endsWith(":"))return!1;let s=i.slice(0,-1).toLowerCase(),a=t.includes(s),l=n.includes(s);return(m(this,ur)?a:l||!e)||(oe.running||this.length>1)&&(a||l||!e)?(this.setAttribute("modifier",e),C(this,ur,a),!!e):!1}isTemplate(){return this.type==="template"||this.name==="invoke"}afterBuild(){this.modifier.includes("\0")&&this.setAttribute("modifier",this.buildFromStr(this.modifier,0)),super.afterBuild(),this.isTemplate()&&this.type==="template"&&(C(this,fr,I(this,jt,Vi).call(this)),this.setAttribute("name",m(this,fr).title))}toString(e){let{childNodes:t,length:n,firstChild:i,modifier:s,type:a}=this;return`{{${s}${a==="magic-word"?i.toString(e)+(n===1?"":m(this,Pt))+t.slice(1).map(l=>l.toString(e)).join("|"):super.toString(e,"|")}}}`}text(){let{childNodes:e,length:t,firstChild:n,modifier:i,type:s,name:a}=this;return s==="magic-word"&&a==="vardefine"?"":`{{${i}${s==="magic-word"?n.text()+(t===1?"":m(this,Pt))+Ee(e.slice(1),"|"):super.text("|")}}}`}getAttribute(e){switch(e){case"padding":return this.modifier.length+2;case"title":return m(this,fr);case"colon":return m(this,Pt);default:return super.getAttribute(e)}}lint(e=this.getAbsoluteIndex(),t){{let n=super.lint(e,t);if(!this.isTemplate())return n;let{type:i,childNodes:s,length:a}=this,l=new W(this,e),{lintConfig:p}=v,{computeEditInfo:g}=p,d=i==="magic-word",u="no-ignored",c=p.getSeverity(u,"fragment");if(d&&!I(this,jt,Vi).call(this).valid)u="invalid-invoke",c=p.getSeverity(u,"name"),c&&n.push(j(s[1],l,u,"illegal-module",c));else if(c){let f=s[d?1:0],h=f.childNodes.findIndex(T=>T.type==="text"&&Br(T.data).includes("#")),x=f.childNodes[h];if(x){let T=j(f,l,u,"useless-fragment",c);g&&(T.suggestions=[O(T,f.getRelativeIndex(h)+x.data.indexOf("#"))]),n.push(T)}}if(u="invalid-invoke",c=p.getSeverity(u,"function"),c&&d&&a===2)return n.push(F(this,l,u,"missing-function",c)),n;if(u="no-duplicate",c=p.getSeverity(u,"parameter"),c){let f=this.getDuplicatedArgs().filter(([,x])=>!x[0].querySelector("ext")),h="duplicate-parameter";for(let[,x]of f)Array.prototype.push.apply(n,x.map(T=>{let b=j(T,l,u,h,c);return g&&(b.suggestions=[O(b,-1)]),b}))}return n}}insertAt(e,t=this.length){return super.insertAt(e,t),e.anon?I(this,jt,Ta).call(this,e):e.name&&this.getArgs(e.name,!1,!1).add(e),e}getArgs(e,t,n=!0,i=!0){let s=String(e).replace(/^[ \t\n\0\v]+|([^ \t\n\0\v])[ \t\n\0\v]+$/gu,"$1"),a;return m(this,Bt).has(s)?a=m(this,Bt).get(s):(a=new Set,m(this,Bt).set(s,a)),a}getDuplicatedArgs(){return[...m(this,Bt)].filter(([,{size:e}])=>e>1).map(([e,t])=>[e,[...t]])}getPossibleValues(){let{type:e,name:t,childNodes:n}=this;if(e==="template")throw new Error("TranscludeToken.getPossibleValues method is only for specific magic words!");let i,s;switch(t){case"if":case"ifexist":case"ifexpr":case"iferror":i=2;break;case"ifeq":i=3;break;case"switch":{let a=n.slice(2),l=a[a.length-1];s=[...a.filter(({anon:p})=>!p),...l!=null&&l.anon?[l]:[]].map(({lastChild:p})=>p);break}default:throw new Error("TranscludeToken.getPossibleValues method is only for specific magic words!")}s!=null||(s=n.slice(i,i+2).map(({lastChild:a})=>a));for(let a=0;a<s.length;){let{length:l,0:p}=s[a].childNodes.filter(g=>g.text().trim());if(l===0)s.splice(a,1);else if(l>1||!p.is("magic-word"))a++;else try{let g=p.getPossibleValues();Array.prototype.splice.apply(s,[a,1,...g]),a+=g.length}catch(g){a++}}return s}print(){}};Hi=B(cg),en=new WeakMap,Pt=new WeakMap,ur=new WeakMap,Bt=new WeakMap,tn=new WeakMap,fr=new WeakMap,jt=new WeakSet,Vi=function(){let e=this.type==="template";return this.normalizeTitle((e?"":"Module:")+re(this.childNodes[e?0:1].text()),10,V({temporary:!0},!e&&{page:""}))},Ta=function(e,t){C(this,tn,m(this,tn)+1);let n;n=m(this,tn)-1;let i=e,s=String(n+1);i.setAttribute("name",s),this.getArgs(s,!1,!1).add(i)},mt=P(Hi,0,"TranscludeToken",ya,mt),R(Hi,1,mt)});var Aa,Qi,mg,Ot,Sa=w(()=>{"use strict";ot();xe();G();Aa=[ve(),Q];Ot=class extends(mg=L){get type(){return"hidden"}getAttribute(r){return r==="invalid"||super.getAttribute(r)}};Qi=B(mg),Ot=P(Qi,0,"HiddenToken",Aa,Ot),R(Qi,1,Ot)});var Ca,Ji,hg,Xi,bg,qt,wa=w(()=>{"use strict";ae();z();se();qe();Hr();xe();D();G();lt();Sa();Ca=[Q,pe("{{{"),pt()];qt=class extends(bg=L){constructor(e,t,n=[]){super(void 0,t,n,{});S(this,Ji);for(let i=0;i<e.length;i++){let s=e[i];if(i===0){let a=new ue(s,"arg-name",t,n,{});super.insertAt(a)}else if(i>1){let a=new Ot(s,t,n);super.insertAt(a)}else{let a=new L(s,t,n);a.type="arg-default",a.setAttribute("stage",2),super.insertAt(a)}}}get type(){return"arg"}get default(){}toString(e){return`{{{${super.toString(e,"|")}}}}`}text(){return`{{{${Ee(this.childNodes.slice(0,2),"|")}}}}`}afterBuild(){super.afterBuild()}lint(e=this.getAbsoluteIndex(),t){{let[n,i,...s]=this.childNodes;n.setAttribute("aIndex",e+3);let a=n.lint(e+3,t);if(i){let f=e+4+n.toString().length;i.setAttribute("aIndex",f);let h=i.lint(f,t);h.length>0&&Array.prototype.push.apply(a,h)}let l=["no-ignored","no-arg"],{lintConfig:p}=v,{computeEditInfo:g}=p,d=new W(this,e),u=l.map(f=>p.getSeverity(f,"arg"));if(u[0]&&s.length>0&&Array.prototype.push.apply(a,s.map(f=>{let h=j(f,d,l[0],"invisible-triple-braces",u[0]);return h.startIndex--,h.startCol--,g&&(h.suggestions=[O(h),Ge(h.startIndex,"{{!}}")]),h})),u[1]&&!this.getAttribute("include")){let f=F(this,d,l[1],"unexpected-argument",u[1]);g&&i&&(f.suggestions=[me(f,"expand",i.text())]),a.push(f)}let c=this.closest("ext");if(c){let f="arg-in-ext",h=p.getSeverity(f,c.name);h&&a.push(F(this,d,f,"argument-in-ext",h))}return a}}print(){}json(e,t,n=this.getAbsoluteIndex()){}};Xi=B(bg),Ji=new WeakSet,hg=function(){},qt=P(Xi,0,"ArgToken",Ca,qt),R(Xi,1,qt)});var Ra={};Z(Ra,{parseBraces:()=>rn});var xg,Ea,Ki,La,Na,$a,Fa,Ia,rn,Yn=w(()=>{"use strict";ze();ae();Gi();ka();wa();xg={"=":String.raw`\n(?!(?:[^\S\n]|\0\d+[cn]\x7F)*\n)`,"{":String.raw`\}{2,}|\|`,"-":String.raw`\}-`,"[":String.raw`\]\]`},Ea=String.raw`\[(?!\[)`,Ki=String.raw`\n(?![=\0])`,La=String.raw`|\{{2,}`,Na=new Map([["!","!"],["!!","+"],["(!","{"],["!)","}"],["!-","-"],["=","~"],["server","m"]]),$a=Be(o=>new RegExp(o,"gmu"));Fa=new RegExp(String.raw`\{\{((?:[^\n{}[]|${Ea}|${Ki})*)\}\}(?!\})`+"|"+String.raw`\[\[(?:[^\n[\]{]|${Ki})*\]\]`+"|"+String.raw`-\{(?:[^\n{}[]|${Ea}|${Ki})*\}-`,"gu");Ia=o=>{let r=Ue(re(o));return Na.has(r)?Na.get(r):/^(?:filepath|(?:full|canonical)urle?):./u.test(r)?"m":/^#vardefine:./u.test(r)?"n":"t"},rn=(o,r,e)=>{var f,h,x,T,b;let t=String.raw`${r.excludes.includes("heading")?"":String.raw`^((?:\0\d+[cno]\x7F)*)={1,6}|`}\[\[|-\{(?!\{)`,[,,,n]=r.parserFunction,i=[],s=[],a=(y,k,A,N)=>{k[k.length-1].push(ke(y.slice(A,N),s))},l;do l!==void 0&&(o=l),l=o.replace(Fa,(y,k,A)=>{if(k!==void 0||typeof A=="string")try{let{length:N}=e,E=(k!=null?k:A).split("|");return new mt(ke(E[0],s),E.slice(1).map($=>{let H=$.indexOf("=");return(H===-1?[$]:[$.slice(0,H),$.slice(H+1)]).map(q=>ke(q,s))}),r,e),`\0${N}${Ia(E[0])}`}catch(N){if(!(N instanceof SyntaxError)||N.message!=="Invalid template name")throw N}return s.push(ke(y,s)),`\0${s.length-1}`});while(l!==o);o=l;let p=o.lastIndexOf("}}")-o.length,g=p+o.length!==-1,d=$a(t+(g?La:"")),u=d.exec(o),c;for(;u||c!==void 0&&c<=o.length&&((h=(f=i[i.length-1])==null?void 0:f[0])!=null&&h.startsWith("="));){if(u!=null&&u[1]){let[,{length:U}]=u;u[0]=u[0].slice(U),u.index+=U}let{0:y,index:k}=u!=null?u:{0:`
10
- `,index:o.length},A=(x=i.pop())!=null?x:{},{0:N,index:E,parts:$,findEqual:H,pos:q}=A,K=y==="="&&H;if(y==="]]"||y==="}-")c=k+2;else if(y===`
11
+ `)}getGaps(){return 1}print(){}}});var Kn,wa=w(()=>{"use strict";z();_i();D();G();Kn=class extends L{get type(){return"param-line"}constructor(t,e,r,n,i){super(e,r,n,i),this.setAttribute("name",t)}lint(t=this.getAbsoluteIndex()){{let e="no-ignored",{lintConfig:r}=v,{name:n,childNodes:i}=this,s=r.getSeverity(e,n);if(!s)return[];let a=v.msg("invalid-parameter",n);if(i.some(({type:f})=>f==="ext"))return[F(this,{start:t},e,a,s)];let l=i.filter(({type:f})=>f!=="comment"&&f!=="include"&&f!=="noinclude"),p=n==="inputbox",g=p?l.findIndex(({type:f})=>f!=="text"):-1,d=l.slice(0,g===-1?void 0:g).map(String).join("").trim();if(d){p&&(d=d.toLowerCase());let f=d.indexOf("="),c=d.slice(0,f===-1?void 0:f).trim(),u=Ta[n];if(f===-1?g===-1||!u.some(x=>x.startsWith(c)):!u.includes(c)){let x=F(this,{start:t},e,a,s);return r.computeEditInfo&&(x.suggestions=[O(x)]),[x]}}return super.lint(t,!1)}}}});var Ea={};Z(Ea,{ParamTagToken:()=>Yr});var Yr,Ui=w(()=>{"use strict";Zr();Xn();wa();Yr=class extends mt{constructor(t,e,r,n,i=[],s){super(void 0,n,i,{}),r&&this.safeAppend(r.split(`
12
+ `).map(a=>s?a:Pt(a,n,i,e)).map(a=>new Kn(t,a,n,i,{}))),i.splice(i.indexOf(this),1),i.push(this)}}});var La,en,tn,Gi,zi,Ag,Je,Hi=w(()=>{"use strict";z();Se();oe();xe();D();G();lt();La=[Q];Je=class extends(Ag=L){constructor(e,r,n,i=[]){super(void 0,n,i);S(this,tn);S(this,en);C(this,en,e);let s=new L(r[0],n,i);s.type="heading-title",s.setAttribute("stage",2);let a=new he(r[1],"heading-trail",n,i);this.append(s,a)}get type(){return"heading"}get level(){return m(this,en)}toString(e){let r=I(this,tn,Gi).call(this);return r+this.firstChild.toString(e)+r+this.lastChild.toString(e)}text(){let e=I(this,tn,Gi).call(this);return e+this.firstChild.text()+e}getAttribute(e){return e==="invalid"?this.inHtmlAttrs()===2:e==="padding"?this.level:super.getAttribute(e)}getGaps(){return this.level}lint(e=this.getAbsoluteIndex(),r){{let n=super.lint(e,r),{firstChild:i,level:s}=this,a=i.toString(),l=a.startsWith("="),p=l||a.endsWith("="),g=new W(this,e),d=this.inHtmlAttrs(),f=["h1","unbalanced-header","format-leakage"],{lintConfig:c}=v,{computeEditInfo:u,fix:x}=c,h=f.map(T=>c.getSeverity(T,"apostrophe"));if(h[0]&&this.level===1){let T=j(i,g,f[0],"<h1>",h[0]);u&&!p&&(T.suggestions=[me(T,"h2",`=${a}=`)]),n.push(T)}if(h[1]&&p){let T=v.msg("unbalanced-in-section-header",'"="'),b=j(i,g,f[1],T,h[1]);if(!(!u||a==="="))if(l){let[y]=/^=+/u.exec(a),k=s+y.length;b.suggestions=[{desc:`h${s}`,range:[b.startIndex,b.startIndex+y.length],text:""}],k<7&&b.suggestions.push({desc:`h${k}`,range:[b.endIndex,b.endIndex],text:y})}else{let y=/[^=](=+)$/u.exec(a)[1],k=s+y.length;b.suggestions=[{desc:`h${s}`,range:[b.endIndex-y.length,b.endIndex],text:""}],k<7&&b.suggestions.push({desc:`h${k}`,range:[b.startIndex,b.startIndex],text:y})}n.push(b)}if(d){let T="parsing-order",b=c.getSeverity(T,d===2?"heading":"templateInTable");b&&n.push(F(this,g,T,"header-in-html",b))}if(h[2]){let T=this.getRootNode().toString(),b=i.childNodes.filter(Yn("quote")),y=b.filter(({bold:A})=>A),k=b.filter(({italic:A})=>A);if(y.length%2){let A=j(y[y.length-1],ge(V({},g),{start:e+s,left:g.left+s}),f[2],v.msg("unbalanced-in-section-header","bold-apostrophes"),h[2]);if(u||x){let N=e+s+a.length,E=O(A);T.slice(A.endIndex,N).trim()?u&&(A.suggestions=[E,Le(N,"'''")]):y.length===1&&k.length===0?A.fix=E:u&&(A.suggestions=[E])}n.push(A)}if(k.length%2){let A=j(k[k.length-1],{start:e+s},f[2],v.msg("unbalanced-in-section-header","italic-apostrophes"),h[2]);if(u||x){let N=e+s+a.length;T.slice(A.endIndex,N).trim()?u&&(A.suggestions=[Le(N,"''")]):k.length===1&&y.length===0?A.fix=O(A):u&&(A.suggestions=[O(A)])}n.push(A)}}return n}}print(){}json(e,r,n=this.getAbsoluteIndex()){}};zi=B(Ag),en=new WeakMap,tn=new WeakSet,Gi=function(){return"=".repeat(this.level)},Je=P(zi,0,"HeadingToken",La,Je),R(zi,1,Je)});var Sg,Zn,Na=w(()=>{"use strict";ae();z();D();G();Sg=new RegExp(`https?://${De}${Me}$`,"iu"),Zn=class extends L{get type(){return"parameter"}get anon(){return this.firstChild.length===0}get duplicated(){}constructor(t,e,r,n=[]){super(void 0,r,n);let i=new L(typeof t=="number"?void 0:t,r,n,{}),s=new L(e,r,n);i.type="parameter-key",i.setAttribute("stage",2),s.type="parameter-value",s.setAttribute("stage",2),this.append(i,s)}trimName(t,e=!0){let r=(typeof t=="string"?t:t.toString(!0)).replace(/^[ \t\n\0\v]+|([^ \t\n\0\v])[ \t\n\0\v]+$/gu,"$1");return this.setAttribute("name",r),r}afterBuild(){if(!this.anon){let{parentNode:t,firstChild:e}=this,r=this.trimName(e);t&&t.getArgs(r,!1,!1).add(this)}super.afterBuild()}toString(t){return this.anon?this.lastChild.toString(t):super.toString(t,"=")}text(){return this.anon?this.lastChild.text():super.text("=")}getGaps(){return this.anon?0:1}lint(t=this.getAbsoluteIndex(),e){var r;{let n=super.lint(t,e),i="unescaped",{lintConfig:s}=v,a=s.getSeverity(i);if(a){let{firstChild:l}=this,p=(r=Sg.exec(l.text()))==null?void 0:r[0];try{if(p&&new URL(p).search){let g=j(l,{start:t},i,"unescaped-query",a);g.startIndex=g.endIndex,g.startLine=g.endLine,g.startCol=g.endCol,g.endIndex++,g.endCol++,(s.computeEditInfo||s.fix)&&(g.fix=Ge(g.startIndex,"{{=}}")),n.push(g)}}catch(g){}}return n}}print(){}json(t,e,r=this.getAbsoluteIndex()){}}});var $a,rn,Bt,ur,jt,nn,fr,Ot,Qi,Ia,Vi,Cg,ht,Fa=w(()=>{"use strict";ae();z();Se();oe();Qr();xe();D();G();Na();dt();lt();$a=[Q,ut()];ht=class extends(Cg=L){constructor(e,r,n,i=[]){var T,b;let s,a=/^(?:\s|\0\d+[cn]\x7F)*\0(\d+)h\x7F(?:\s|\0\d+[cn]\x7F)*/u.exec(e);a&&(s=Number(a[1]),e=e.replace(`\0${s}h`,i[s].toString().replace(/^\n/u,"")));super(void 0,n,i,{});S(this,Ot);ce(this,"modifier","");S(this,rn,"template");S(this,Bt,":");S(this,ur,!1);S(this,jt,new Map);S(this,nn,0);S(this,fr);let{parserFunction:l,variable:p,functionHook:g}=n,d=(T=/^(?:\s|\0\d+[cn]\x7F)*\0\d+s\x7F/u.exec(e))==null?void 0:T[0];if(d)this.setAttribute("modifier",d),e=e.slice(d.length);else if(e.includes(":")){let[y,...k]=e.split(":"),[A]=/^(?:\s|\0\d+[cn]\x7F)*/u.exec((b=k[0])!=null?b:"");this.setModifier(`${y}:${A}`)&&(e=k.join(":").slice(A.length))}let f=e.search(/[::]/u),c=e[f]===":",u=f!==-1;if(u||r.length===0&&!m(this,ur)){let y=u?e.slice(0,f):e,k=u&&e.slice(f+1),A=re(y),N=u?A.slice(A.search(/\S/u))+(c?":":""):A.trim(),[,E,$]=Ra(N,l),H=!("functionHook"in n)||g.includes($),q=p.includes($);if(u?$&&H:q){this.setAttribute("name",$),C(this,rn,"magic-word"),c&&C(this,Bt,":");let K=new he(y,"magic-word-name",n,i);if(super.insertAt(K),k!==!1&&r.unshift([k]),this.name==="invoke")for(let _=0;_<2;_++){let U=r.shift();if(!U)break;let M=new ue(U.join("="),`invoke-${_?"function":"module"}`,n,i);super.insertAt(M)}}}if(this.type==="template"){let y=re(e).trim();if(!this.normalizeTitle(y,10,{halfParsed:!0,temporary:!0}).valid)throw i.pop(),new SyntaxError("Invalid template name");let k=new ue(e,"template-name",n,i,{});super.insertAt(k)}typeof s=="number"&&(i[s]=void 0);let x=this.isTemplate(),h=1;for(let y=0;y<r.length;y++){let k=r[y];x||this.name==="switch"&&y>0||this.name==="tag"&&y>1||(k[0]=k.join("="),k.length=1),k.length===1&&(k.unshift(h),h++),this.insertAt(new Zn(...k,n,i))}this.seal("modifier")}get type(){return m(this,rn)}get module(){}get function(){}setModifier(e){let[,,r,n]=this.getAttribute("config").parserFunction,i=re(e).trim();if(e&&!i.endsWith(":"))return!1;let s=i.slice(0,-1).toLowerCase(),a=r.includes(s),l=n.includes(s);return(m(this,ur)?a:l||!e)||(ne.running||this.length>1)&&(a||l||!e)?(this.setAttribute("modifier",e),C(this,ur,a),!!e):!1}isTemplate(){return this.type==="template"||this.name==="invoke"}afterBuild(){this.modifier.includes("\0")&&this.setAttribute("modifier",this.buildFromStr(this.modifier,0)),super.afterBuild(),this.isTemplate()&&this.type==="template"&&(C(this,fr,I(this,Ot,Qi).call(this)),this.setAttribute("name",m(this,fr).title))}toString(e){let{childNodes:r,length:n,firstChild:i,modifier:s,type:a}=this;return`{{${s}${a==="magic-word"?i.toString(e)+(n===1?"":m(this,Bt))+r.slice(1).map(l=>l.toString(e)).join("|"):super.toString(e,"|")}}}`}text(){let{childNodes:e,length:r,firstChild:n,modifier:i,type:s,name:a}=this;return s==="magic-word"&&a==="vardefine"?"":`{{${i}${s==="magic-word"?n.text()+(r===1?"":m(this,Bt))+Ee(e.slice(1),"|"):super.text("|")}}}`}getAttribute(e){switch(e){case"padding":return this.modifier.length+2;case"title":return m(this,fr);case"colon":return m(this,Bt);default:return super.getAttribute(e)}}lint(e=this.getAbsoluteIndex(),r){{let n=super.lint(e,r);if(!this.isTemplate())return n;let{type:i,childNodes:s,length:a}=this,l=new W(this,e),{lintConfig:p}=v,{computeEditInfo:g}=p,d=i==="magic-word",f="no-ignored",c=p.getSeverity(f,"fragment");if(d&&!I(this,Ot,Qi).call(this).valid)f="invalid-invoke",c=p.getSeverity(f,"name"),c&&n.push(j(s[1],l,f,"illegal-module",c));else if(c){let u=s[d?1:0],x=u.childNodes.findIndex(T=>T.type==="text"&&Br(T.data).includes("#")),h=u.childNodes[x];if(h){let T=j(u,l,f,"useless-fragment",c);g&&(T.suggestions=[O(T,u.getRelativeIndex(x)+h.data.indexOf("#"))]),n.push(T)}}if(f="invalid-invoke",c=p.getSeverity(f,"function"),c&&d&&a===2)return n.push(F(this,l,f,"missing-function",c)),n;if(f="no-duplicate",c=p.getSeverity(f,"parameter"),c){let u=this.getDuplicatedArgs().filter(([,h])=>!h[0].querySelector("ext")),x="duplicate-parameter";for(let[,h]of u)Array.prototype.push.apply(n,h.map(T=>{let b=j(T,l,f,x,c);return g&&(b.suggestions=[O(b,-1)]),b}))}return n}}insertAt(e,r=this.length){return super.insertAt(e,r),e.anon?I(this,Ot,Ia).call(this,e):e.name&&this.getArgs(e.name,!1,!1).add(e),e}getArgs(e,r,n=!0,i=!0){let s=String(e).replace(/^[ \t\n\0\v]+|([^ \t\n\0\v])[ \t\n\0\v]+$/gu,"$1"),a;return m(this,jt).has(s)?a=m(this,jt).get(s):(a=new Set,m(this,jt).set(s,a)),a}getDuplicatedArgs(){return[...m(this,jt)].filter(([,{size:e}])=>e>1).map(([e,r])=>[e,[...r]])}getPossibleValues(){let{type:e,name:r,childNodes:n}=this;if(e==="template")throw new Error("TranscludeToken.getPossibleValues method is only for specific magic words!");let i,s;switch(r){case"if":case"ifexist":case"ifexpr":case"iferror":i=2;break;case"ifeq":i=3;break;case"switch":{let a=n.slice(2),l=a[a.length-1];s=[...a.filter(({anon:p})=>!p),...l!=null&&l.anon?[l]:[]].map(({lastChild:p})=>p);break}default:throw new Error("TranscludeToken.getPossibleValues method is only for specific magic words!")}s!=null||(s=n.slice(i,i+2).map(({lastChild:a})=>a));for(let a=0;a<s.length;){let{length:l,0:p}=s[a].childNodes.filter(g=>g.text().trim());if(l===0)s.splice(a,1);else if(l>1||!p.is("magic-word"))a++;else try{let g=p.getPossibleValues();Array.prototype.splice.apply(s,[a,1,...g]),a+=g.length}catch(g){a++}}return s}print(){}};Vi=B(Cg),rn=new WeakMap,Bt=new WeakMap,ur=new WeakMap,jt=new WeakMap,nn=new WeakMap,fr=new WeakMap,Ot=new WeakSet,Qi=function(){let e=this.type==="template";return this.normalizeTitle((e?"":"Module:")+re(this.childNodes[e?0:1].text()),10,V({temporary:!0},!e&&{page:""}))},Ia=function(e,r){C(this,nn,m(this,nn)+1);let n;n=m(this,nn)-1;let i=e,s=String(n+1);i.setAttribute("name",s),this.getArgs(s,!1,!1).add(i)},ht=P(Vi,0,"TranscludeToken",$a,ht),R(Vi,1,ht)});var Pa,Ji,wg,qt,Ba=w(()=>{"use strict";at();xe();G();Pa=[ve(),Q];qt=class extends(wg=L){get type(){return"hidden"}getAttribute(t){return t==="invalid"||super.getAttribute(t)}};Ji=B(wg),qt=P(Ji,0,"HiddenToken",Pa,qt),R(Ji,1,qt)});var ja,Ki,Eg,Xi,Lg,_t,Oa=w(()=>{"use strict";ae();z();oe();qe();Qr();xe();D();G();dt();Ba();ja=[Q,pe("{{{"),ut()];_t=class extends(Lg=L){constructor(e,r,n=[]){super(void 0,r,n,{});S(this,Ki);for(let i=0;i<e.length;i++){let s=e[i];if(i===0){let a=new ue(s,"arg-name",r,n,{});super.insertAt(a)}else if(i>1){let a=new qt(s,r,n);super.insertAt(a)}else{let a=new L(s,r,n);a.type="arg-default",a.setAttribute("stage",2),super.insertAt(a)}}}get type(){return"arg"}get default(){}toString(e){return`{{{${super.toString(e,"|")}}}}`}text(){return`{{{${Ee(this.childNodes.slice(0,2),"|")}}}}`}afterBuild(){super.afterBuild()}lint(e=this.getAbsoluteIndex(),r){{let[n,i,...s]=this.childNodes;n.setAttribute("aIndex",e+3);let a=n.lint(e+3,r);if(i){let u=e+4+n.toString().length;i.setAttribute("aIndex",u);let x=i.lint(u,r);x.length>0&&Array.prototype.push.apply(a,x)}let l=["no-ignored","no-arg"],{lintConfig:p}=v,{computeEditInfo:g}=p,d=new W(this,e),f=l.map(u=>p.getSeverity(u,"arg"));if(f[0]&&s.length>0&&Array.prototype.push.apply(a,s.map(u=>{let x=j(u,d,l[0],"invisible-triple-braces",f[0]);return x.startIndex--,x.startCol--,g&&(x.suggestions=[O(x),Ge(x.startIndex,"{{!}}")]),x})),f[1]&&!this.getAttribute("include")){let u=F(this,d,l[1],"unexpected-argument",f[1]);g&&i&&(u.suggestions=[me(u,"expand",i.text())]),a.push(u)}let c=this.closest("ext");if(c){let u="arg-in-ext",x=p.getSeverity(u,c.name);x&&a.push(F(this,d,u,"argument-in-ext",x))}return a}}print(){}json(e,r,n=this.getAbsoluteIndex()){}};Xi=B(Lg),Ki=new WeakSet,Eg=function(){},_t=P(Xi,0,"ArgToken",ja,_t),R(Xi,1,_t)});var za={};Z(za,{parseBraces:()=>sn});var Ng,qa,Yi,_a,Wa,Da,Ua,Ma,sn,ei=w(()=>{"use strict";ze();ae();Hi();Fa();Oa();Ng={"=":String.raw`\n(?!(?:[^\S\n]|\0\d+[cn]\x7F)*\n)`,"{":String.raw`\}{2,}|\|`,"-":String.raw`\}-`,"[":String.raw`\]\]`},qa=String.raw`\[(?!\[)`,Yi=String.raw`\n(?![=\0])`,_a=String.raw`|\{{2,}`,Wa=new Map([["!","!"],["!!","+"],["(!","{"],["!)","}"],["!-","-"],["=","~"],["server","m"]]),Da=Be(o=>new RegExp(o,"gmu"));Ua=new RegExp(String.raw`\{\{((?:[^\n{}[]|${qa}|${Yi})*)\}\}(?!\})`+"|"+String.raw`\[\[(?:[^\n[\]{]|${Yi})*\]\]`+"|"+String.raw`-\{(?:[^\n{}[]|${qa}|${Yi})*\}-`,"gu");Ma=o=>{let t=Ue(re(o));return Wa.has(t)?Wa.get(t):/^(?:filepath|(?:full|canonical)urle?):./u.test(t)?"m":/^#vardefine:./u.test(t)?"n":"t"},sn=(o,t,e)=>{var u,x,h,T,b;let r=String.raw`${t.excludes.includes("heading")?"":String.raw`^((?:\0\d+[cno]\x7F)*)={1,6}|`}\[\[|-\{(?!\{)`,[,,,n]=t.parserFunction,i=[],s=[],a=(y,k,A,N)=>{k[k.length-1].push(ke(y.slice(A,N),s))},l;do l!==void 0&&(o=l),l=o.replace(Ua,(y,k,A)=>{if(k!==void 0||typeof A=="string")try{let{length:N}=e,E=(k!=null?k:A).split("|");return new ht(ke(E[0],s),E.slice(1).map($=>{let H=$.indexOf("=");return(H===-1?[$]:[$.slice(0,H),$.slice(H+1)]).map(q=>ke(q,s))}),t,e),`\0${N}${Ma(E[0])}`}catch(N){if(!(N instanceof SyntaxError)||N.message!=="Invalid template name")throw N}return s.push(ke(y,s)),`\0${s.length-1}`});while(l!==o);o=l;let p=o.lastIndexOf("}}")-o.length,g=p+o.length!==-1,d=Da(r+(g?_a:"")),f=d.exec(o),c;for(;f||c!==void 0&&c<=o.length&&((x=(u=i[i.length-1])==null?void 0:u[0])!=null&&x.startsWith("="));){if(f!=null&&f[1]){let[,{length:U}]=f;f[0]=f[0].slice(U),f.index+=U}let{0:y,index:k}=f!=null?f:{0:`
13
+ `,index:o.length},A=(h=i.pop())!=null?h:{},{0:N,index:E,parts:$,findEqual:H,pos:q}=A,K=y==="="&&H;if(y==="]]"||y==="}-")c=k+2;else if(y===`
11
14
  `){c=k+1;let{pos:U,findEqual:M}=(T=i[i.length-1])!=null?T:{};if(U===void 0||M||re(o.slice(U,E))!==""){let be=/^(={1,6})(.+)\1((?:\s|\0\d+[cn]\x7F)*)$/u.exec(o.slice(E,k));be&&(be[2]=ke(be[2],s),be[2].includes(`
12
- `)||(o=`${o.slice(0,E)}\0${e.length}h${o.slice(k)}`,c=E+4+String(e.length).length,new Qe(be[1].length,be.slice(2),r,e)))}}else if(y==="|"||K)c=k+1,a(o,$,q,k),y==="|"&&$.push([]),A.pos=c,A.findEqual=y==="|",i.push(A);else if(y.startsWith("}}")){let U=y.slice(0,Math.min(N.length,3)),M=N.length-U.length,{length:be}=e;c=k+U.length,a(o,$,q,k);let Jt=!1,bt="t";if(U.length===3){let Y=$.map($r=>$r.join("=")),xt=Y.length>1&&re(Y[1]).trim();new qt(Y,r,e),xt&&xt.endsWith(":")&&n.includes(xt.slice(0,-1).toLowerCase())&&(bt="s")}else try{new mt($[0][0],$.slice(1),r,e),bt=Ia($[0][0])}catch(Y){if(!(Y instanceof SyntaxError&&Y.message==="Invalid template name"))throw Y;Jt=!0}Jt||(o=`${o.slice(0,E+M)}\0${be}${bt}${o.slice(c)}`,c=E+M+3+String(be).length,M>1?i.push({0:N.slice(0,M),index:E,pos:E+M,parts:[[]]}):M===1&&o[E-1]==="-"&&i.push({0:"-{",index:E-1,pos:E+1,parts:[[]]}))}else c=k+y.length,y.startsWith("{")&&(u.pos=c,u.parts=[[]]),i.push(..."0"in A?[A]:[],u);let _=i[i.length-1];if(g&&p+o.length<c)for(g=!1;(b=_==null?void 0:_[0])!=null&&b.startsWith("{");)i.pop(),_=i[i.length-1];d=$a(t+(g?La:"")+(_?`|${xg[_[0][0]]}${_.findEqual?"|=":""}`:"")),d.lastIndex=c,u=d.exec(o)}return ke(o,s)}});var Pa={};Z(Pa,{InputboxToken:()=>Yi});var Yi,Ba=w(()=>{"use strict";Kr();Yn();Mi();Yi=class extends Jr{constructor(r,e,t,n,i=[]){let s=Symbol("InputboxToken"),a=n.excludes.includes("heading")?n:ge(V({},n),{excludes:[...n.excludes,"heading"]}),{length:l}=i;i.push(s),t&&(t=Rt(t,a,i,e)),t&&(t=rn(t,a,i)),i.splice(l,1),super(r,e,t,a,i,{})}}});var Zn={};Z(Zn,{NestedToken:()=>Zi});var yg,Tg,nn,cr,Zi,ei=w(()=>{"use strict";z();se();Kr();Yn();D();G();es();Ct();yg=new Set(["comment","include","arg","template","magic-word"]),Tg=[!1,!0].map(o=>{let r=o?"includeonly":"noinclude";return new RegExp(String.raw`^(?:<${r}(?:\s[^>]*)?/?>|</${r}\s*>)$`,"iu")}),Zi=class extends L{constructor(e,t,n,i,s=[]){if(typeof t=="boolean"){let a=Symbol("NestedToken"),{length:l}=s;s.push(a),e&&(e=Rt(e,i,s,t)),e&&(e=rn(e,i,s)),s.splice(l,1)}else e&&(e=e.replace(t,(a,l,p,g,d)=>{let u=`\0${s.length+1}e`;return new Xe(l,p,g,d,i,!1,s),u}));e&&(e=e.replace(/(^|\0\d+.\x7F)([^\0]+)(?=$|\0\d+.\x7F)/gu,(a,l,p)=>(new de(p,i,s),`${l}\0${s.length}n`)));super(e,i,s);S(this,nn);S(this,cr);C(this,nn,[...n]),C(this,cr,t)}get type(){return"ext-inner"}lint(e=this.getAbsoluteIndex(),t){{let n=super.lint(e,t),i="no-ignored",{lintConfig:s}=v,a=s.getSeverity(i,this.name);if(!a)return n;let l=new W(this,e),p=typeof m(this,cr)=="boolean"?Tg[m(this,cr)?1:0]:/^<!--[\s\S]*-->$/u;return[...n,...this.childNodes.filter(g=>{let{type:d,name:u}=g;if(d==="ext")return!m(this,nn).includes(u);if(yg.has(d))return!1;let c=g.toString().trim();return c&&!p.test(c)}).map(g=>{let d=j(g,l,i,v.msg("invalid-content",this.name),a);return s.computeEditInfo&&(d.suggestions=[O(d),Pn(d,g.toString())]),d})]}}};nn=new WeakMap,cr=new WeakMap});function ts(o,r,e,t,n){r=re(r).trim();let i=r.replace(o==="link"?/\0\d+[tq]\x7F/gu:/\0\d+t\x7F/gu,"").trim();switch(o){case"width":return!i&&!!r||/^(?:\d+x?|\d*x\d+)(?:\s*px)?$/u.test(i);case"link":{let s=t==="gallery-image";if(i){if(kg(e.protocol).test(i))return vg(e.protocol).test(i)?r:s;i.startsWith("[[")&&i.endsWith("]]")&&(i=i.slice(2,-2))}else return r;let a=v.normalizeTitle(i,0,!1,e,{halfParsed:n,decode:!0,selfLink:!0,page:""});return a.valid?a:s}case"lang":return(t==="svg"||t==="svgz")&&!/[^a-z\d-]/u.test(i);case"alt":case"class":case"manualthumb":return!0;case"page":return(t==="djvu"||t==="djv"||t==="pdf")&&Number(i)>0;default:return!!i&&!isNaN(i)}}var kg,vg,Ag,Sg,ja,Ne,ti,Oa,rs,Cg,_t,qa=w(()=>{"use strict";ze();ae();z();Nn();Se();xe();D();G();kg=Be(o=>new RegExp(String.raw`^(?:${o}|//|\0\d+m\x7F)`,"iu")),vg=Be(o=>new RegExp(String.raw`^(?:(?:${o}|//)${De}|\0\d+m\x7F)${Me}$`,"iu")),Ag=Be(o=>new RegExp(String.raw`^(\s*(?!\s))${o.replace("$1","(.*)")}${o.endsWith("$1")?`(?=$|
13
- )`:""}(\s*)$`,"u")),Sg=o=>{if(o)o.startsWith("//")&&(o=`https:${o}`);else return o;return new URL(o).href};ja=[Q];_t=class extends(Cg=L){constructor(e,t,n,i,s){var r=(...bm)=>(super(...bm),S(this,ti),S(this,Ne,""),this);let a,l=Object.entries(i.img).map(([g,d])=>[g,d,Ag(g)]),p=l.find(([,g,d])=>(a=d.exec(e),a&&(a.length!==4||ts(g,a[2],i,g==="link"?n:t,!0)!==!1)));if(p&&a){a.length===3?(r(void 0,i,s),C(this,Ne,e)):(r(a[2],i,s,{}),C(this,Ne,a[1]+p[0]+a[3])),this.setAttribute("name",p[1]),p[1]==="alt"&&this.setAttribute("stage",10);return}r(e,i.excludes.includes("list")?i:ge(V({},i),{excludes:[...i.excludes,"list"]}),s),this.setAttribute("name","caption"),this.setAttribute("stage",7)}get type(){return"image-parameter"}get thumb(){return this.name==="manualthumb"?this.normalizeTitle(`File:${super.text().trim()}`,6,{page:""}):void 0}get link(){{if(this.name!=="link")return;let e=super.text().trim();return oe.run(()=>{var s;let t=this.getAttribute("config"),n=new L(e,t);if(n.parseOnce(0,this.getAttribute("include")).parseOnce(),/^\0\d+m\x7F/u.test(n.firstChild.toString()))return e;let i=ts("link",e,t,(s=this.parentNode)==null?void 0:s.type);return i===!0?void 0:i},v)}}afterBuild(){var e;(e=this.parentNode)!=null&&e.is("gallery-image")&&!fo.has(this.name)&&this.setAttribute("name","invalid"),super.afterBuild()}toString(e){return m(this,Ne)?m(this,Ne).replace("$1",super.toString(e)):super.toString(e)}text(){return m(this,Ne)?m(this,Ne).replace("$1",super.text()).trim():super.text().trim()}isPlain(){return this.name==="caption"||this.name==="alt"}getAttribute(e){return e==="invalid"?this.name==="invalid":e==="padding"?Math.max(0,m(this,Ne).indexOf("$1")):super.getAttribute(e)}lint(e=this.getAbsoluteIndex(),t){var n;{let i=super.lint(e,t),{lintConfig:s}=v,{computeEditInfo:a,fix:l}=s,{link:p,name:g}=this,d=g==="width"&&this.getValue();if(g==="invalid"||d&&d.endsWith("px")){let u="invalid-gallery",c=s.getSeverity(u,"parameter");if(c){let f=F(this,{start:e},u,"invalid-image-parameter",c);(a||l)&&(f.fix=d?O(f,0,d):O(f,-1)),i.push(f)}}else if(g==="link"){if(p===void 0){let u="invalid-gallery",c=s.getSeverity(u,"link");if(c){let f=F(this,{start:e},u,"invalid-gallery-link",c);if(a){let h=super.toString(),x=h.indexOf("|"),T=h.slice(0,x).trim();x!==-1&&!/[<{]/u.test(T)&&typeof ts("link",T,this.getAttribute("config"),(n=this.parentNode)==null?void 0:n.type)=="string"&&(f.suggestions=[st(e+this.getRelativeIndex(0)+x)])}i.push(f)}}else if(typeof p=="string"){let u="invalid-url",c=s.getSeverity(u);if(c&&!this.querySelector("magic-word"))try{Sg(p)}catch(f){i.push(F(this,{start:e},u,"invalid-url",c))}}else if(p.encoded){let u="url-encoding",c=s.getSeverity(u,"file");if(c){let f=F(this,{start:e},u,"unnecessary-encoding",c);(a||l)&&(f.fix=Fn(f,this)),i.push(f)}}}else if(g==="manualthumb"){let u="invalid-gallery",c=s.getSeverity(u,"thumb");if(c&&!this.querySelector("arg,magic-word,template")){let{valid:f,ns:h,extension:x}=this.thumb;(!f||h!==6||!jr.has(x))&&i.push(F(this,{start:e},u,"invalid-thumb",c))}}return i}}getValue(){return this.name==="invalid"?this.text():I(this,ti,Oa).call(this)||super.text()}print(){}};rs=B(Cg),Ne=new WeakMap,ti=new WeakSet,Oa=function(){return m(this,Ne)&&!m(this,Ne).includes("$1")},_t=P(rs,0,"ImageParameterToken",ja,_t),R(rs,1,_t)});var _a,wg,Eg,Wa,Da,Lg,Ma,mr,ns=w(()=>{"use strict";z();Nn();se();D();lr();qa();_a=new Map([["manualthumb","Thumb"],["frameless","Frameless"],["framed","Frame"],["thumbnail","Thumb"]]),wg=new Set(["arg"]),Eg=new Set(["template","magic-word"]),Wa=new Set(["left","right","center","none"]),Da=new Set(["baseline","sub","super","top","text-top","middle","bottom","text-bottom"]),Lg=o=>{if(o===void 0)return[];let r=/-\{|\}-|\|/gu,e=[],t=r.exec(o),n=0,i=0;for(;t;){let{0:s,index:a}=t;s!=="|"?n+=s==="-{"?1:-1:n===0&&(e.push(o.slice(i,a)),{lastIndex:i}=r),t=r.exec(o)}return e.push(o.slice(i)),e},Ma=(o,r)=>o.filter(({childNodes:e})=>!e.some(t=>t.text().trim()&&r.has(t.type))),mr=class extends ye{get type(){return"file"}get extension(){}constructor(r,e,t,n=[],i="|",s){super(r,void 0,t,n,i);let{extension:a}=this.getTitle(!0,!0);this.safeAppend(Lg(e).map(l=>new _t(l,a,s,t,n)))}lint(r=this.getAbsoluteIndex(),e){var t;{let n=super.lint(r,e),i=Ma(this.getAllArgs(),wg),s=[...new Set(i.map(({name:E})=>E))],a=s.filter(E=>_a.has(E)),l=s.filter(E=>Wa.has(E)),p=s.filter(E=>Da.has(E)),[g]=a,d=g==="framed"||g==="manualthumb",u=new W(this,r),{lintConfig:c}=v,{computeEditInfo:f,fix:h}=c,{ns:x,extension:T}=this.getAttribute("title"),{firstChild:b}=this,y="nested-link",k=c.getSeverity(y,"file");if(k&&jr.has(T)&&this.isInside("ext-link-text")&&((t=this.getValue("link"))==null?void 0:t.trim())!==""){let E=F(this,u,y,"link-in-extlink",k);if(f||h){let $=this.getArg("link");if($){let H=r+$.getRelativeIndex();E.fix={desc:v.msg("delink"),range:[H,H+$.toString().length],text:"link="}}else E.fix=er(E.endIndex-2,"delink","|link=")}n.push(E)}if(y="invalid-gallery",k=c.getSeverity(y,"extension"),k&&x===6&&!T&&!b.querySelector("arg,magic-word,template")&&n.push(F(this,u,y,"missing-extension",k)),k=c.getSeverity(y,"parameter"),k&&d)for(let E of i.filter(({name:$})=>$==="width")){let $=j(E,u,y,"invalid-image-parameter",k);(f||h)&&($.fix=O($,-1)),n.push($)}if(i.length===s.length&&a.length<2&&l.length<2&&p.length<2)return n;y="no-duplicate";let A=["unknownImageParameter","imageParameter"].map(E=>c.getSeverity(y,E)),N=(E,$,H,q=!0)=>E.map(K=>{if(k=A[Number(typeof q=="function"?q(K):q)],!k)return!1;let _=j(K,u,y,v.msg(`${$}-image-parameter`,H),k);return f&&(_.suggestions=[O(_,-1)]),_}).filter(K=>K!==!1);for(let E of s){if(E==="invalid"||E==="width"&&d)continue;let $=E==="caption",H=i.filter(({name:q})=>q===E);if($&&(H=[...H.slice(0,-1).filter(q=>q.text()),...H.slice(-1)]),H.length>1){let q=!$||!T||jr.has(T);if($&&q){let K=Ma(H,Eg);q=K.length>1&&(_=>K.includes(_))}Array.prototype.push.apply(n,N(H,"duplicate",E,q))}}return a.length>1&&Array.prototype.push.apply(n,N(i.filter(({name:E})=>_a.has(E)),"conflicting","frame")),l.length>1&&Array.prototype.push.apply(n,N(i.filter(({name:E})=>Wa.has(E)),"conflicting","horizontal-alignment")),p.length>1&&Array.prototype.push.apply(n,N(i.filter(({name:E})=>Da.has(E)),"conflicting","vertical-alignment")),n}}getAllArgs(){return this.childNodes.slice(1)}getArgs(r){return this.getAllArgs().filter(({name:e})=>r===e)}getArg(r){{let e=this.getArgs(r);return e[r==="manualthumb"?0:e.length-1]}}getValue(r){var e;return(e=this.getArg(r))==null?void 0:e.getValue()}json(r,e,t=this.getAbsoluteIndex()){}}});var Ua,sn,ss,is,Ng,Je,os=w(()=>{"use strict";z();qe();D();G();ns();Ua=[pe("")];Je=class extends(Ng=mr){constructor(e,t,n,i,s=[]){let a;if(n!==void 0){let{length:p}=s;a=new L(n,i,s);for(let g=0;g<10;g++)a.parseOnce();s.splice(p,1)}let l=`${e}-image`;super(t,a==null?void 0:a.firstChild.toString(),i,s,void 0,l);S(this,sn);ce(this,"privateType","imagemap-image");this.setAttribute("bracket",!1),this.privateType=l,this.seal("privateType",!0)}get type(){return this.privateType}getTitle(e){let t=this.type==="imagemap-image";return this.normalizeTitle(this.firstChild.toString(),t?0:6,{halfParsed:!0,temporary:e,decode:!t,page:""})}lint(e=this.getAbsoluteIndex(),t){{let n=super.lint(e,t),i="invalid-gallery",{lintConfig:s}=v,a=s.getSeverity(i,"image");if(a&&I(this,sn,ss).call(this)){let l=F(this,{start:e},i,"invalid-gallery",a);s.computeEditInfo&&(l.suggestions=[er(e,"prefix","File:")]),n.push(l)}return n}}getAttribute(e){return e==="invalid"?I(this,sn,ss).call(this):super.getAttribute(e)}};is=B(Ng),sn=new WeakSet,ss=function(){return this.getAttribute("title").ns!==6},Je=P(is,0,"GalleryImageToken",Ua,Je),R(is,1,Je)});var Wt,as=w(()=>{"use strict";Ct();Wt=class extends de{}});var Ga={};Z(Ga,{GalleryToken:()=>ls});var on,za,$g,ls,Ha=w(()=>{"use strict";z();D();Qn();os();as();ls=class extends ct{constructor(e,t,n=[]){var i;super(void 0,t,n,{});S(this,on);for(let s of(i=e==null?void 0:e.split(`
14
- `))!=null?i:[]){let a=/^([^|]+)(?:\|(.*))?/u.exec(s);if(!a){super.insertAt(s.trim()?new Wt(s,t,n):s);continue}let[,l,p]=a;I(this,on,za).call(this,l)?super.insertAt(new Je("gallery",l,p,t,n)):super.insertAt(new Wt(s,t,n))}}get widths(){}get heights(){}lint(e=this.getAbsoluteIndex(),t){{let{top:n,left:i}=this.getRootNode().posFromIndex(e),s=[],a="no-ignored",{lintConfig:l}=v,p=["Image","NoImage","Comment"].map(g=>l.getSeverity(a,`gallery${g}`));for(let g=0;g<this.length;g++){let d=this.childNodes[g],u=d.toString(),{length:c}=u,f=u.trim(),{type:h}=d,x=n+g,T=g?0:i;if(d.setAttribute("aIndex",e),h==="noinclude"&&f&&!/^<!--.*-->$/u.test(f)){let[b]=p;if(f.startsWith("|")?[,b]=p:(f.startsWith("<!--")||f.endsWith("-->"))&&([,,b]=p),b){let y=e+c,k={rule:a,message:v.msg("invalid-content","gallery"),severity:b,startIndex:e,endIndex:y,startLine:x,endLine:x,startCol:T,endCol:T+c};l.computeEditInfo&&(k.suggestions=[O(k),Pn(k,u)]),s.push(k)}}else if(h!=="noinclude"&&h!=="text"){let b=d.lint(e,t);b.length>0&&Array.prototype.push.apply(s,b)}e+=c+1}return s}}json(e,t,n=this.getAbsoluteIndex()){}};on=new WeakSet,za=function(e){return this.normalizeTitle(e,6,{halfParsed:!0,temporary:!0,decode:!0,page:""}).valid},$g=function(e){}});var hr,ds=w(()=>{"use strict";ze();z();D();lr();hr=class extends ye{get type(){return"link"}get innerText(){return this.length>1?this.lastChild.text():At(this.firstChild.text().replace(/^\s*:?/u,""))}lint(r=this.getAbsoluteIndex(),e){{let t=super.lint(r,e),n="nested-link",{lintConfig:i}=v,s=i.getSeverity(n);if(s&&this.isInside("ext-link-text")){let a=F(this,{start:r},n,"link-in-extlink",s);(i.computeEditInfo||i.fix)&&(a.fix=me(a,"delink",this.innerText)),t.push(a)}return t}}}});var Ig,Fg,an,ln,gs,Ke,ri=w(()=>{"use strict";z();ae();se();D();G();Ig=String.raw`(?:[${Ie}\t]|&nbsp;|&#0*160;|&#[xX]0*[aA]0;)`,Fg=new RegExp(`${Ig}+`,"gu"),Ke=class extends L{constructor(e,t="free-ext-link",n=v.getConfig(),i){super(e,n,i,{});S(this,ln);S(this,an);C(this,an,t)}get type(){return m(this,an)}get innerText(){let e=new Map([["!","|"],["=","="]]),t=Ee(this.childNodes.map(n=>{let{type:i}=n,s=String(n.name);return i==="magic-word"&&e.has(s)?e.get(s):n}));return this.type==="magic-link"&&(t=t.replace(Fg," ")),t}get link(){let{innerText:e}=this;return this.type==="magic-link"?e.startsWith("ISBN")?`ISBN ${e.slice(5).replace(/[- ]/gu,"").replace(/x$/u,"X")}`:e:po(e).replace(/\n/gu,"%0A")}lint(e=this.getAbsoluteIndex(),t){{let n=super.lint(e,t),i=new W(this,e),{lintConfig:s}=v,{type:a,childNodes:l}=this;if(a==="magic-link"){let u="invalid-isbn",c=s.getSeverity(u);return c&&I(this,ln,gs).call(this)&&n.push(F(this,i,u,"invalid-isbn",c)),n}let p="invalid-url",g=s.getSeverity(p);if(g&&!this.querySelector("magic-word"))try{this.getUrl()}catch(u){n.push(F(this,i,p,"invalid-url",g))}let d=a==="ext-link-url";if(p="unterminated-url",g=s.getSeverity(p,d?"pipe":"punctuation"),g){let u=d?/\|/u:/[,;。:!?()]+/u,c=l.find(f=>f.type==="text"&&u.test(f.data));if(c){let{data:f}=c,h=j(c,i,p,v.msg("in-url",d?'"|"':"full-width-punctuation"),g);if(s.computeEditInfo){let{index:x,0:T}=u.exec(f),b=h.startIndex+x;h.suggestions=d?[st(b,1)]:[st(b),{desc:v.msg("encode"),range:[b,b+T.length],text:encodeURI(T)}]}n.push(h)}}return n}}getUrl(e){this.lspError("MagicLinkToken.getUrl")}getAttribute(e){return e==="invalid"?I(this,ln,gs).call(this):super.getAttribute(e)}};an=new WeakMap,ln=new WeakSet,gs=function(){if(this.type==="magic-link"){let{link:e}=this;if(e.startsWith("ISBN")){let t=[...e.slice(5)].map(n=>n==="X"?10:Number(n));return t.length===10?t.reduce((n,i,s)=>n+i*(10-s),0)%11!==0:t.length===13&&(t[12]===10||t.reduce((n,i,s)=>n+i*(s%2?3:1),0)%10!==0)}}return!1}});var Va,Dt,ps,Rg,Ye,us=w(()=>{"use strict";z();qe();D();G();ri();Va=[pe("[")];Ye=class extends(Rg=L){constructor(e,t="",n="",i,s=[]){super(void 0,i,s,{});S(this,Dt);let a=e&&/^\0\d+f\x7F$/u.test(e)?s[Number(e.slice(1,-2))]:new Ke(e,"ext-link-url",i,s);if(this.insertAt(a),C(this,Dt,t),n){let l=new L(n,i,s,{});l.type="ext-link-text",l.setAttribute("stage",10),this.insertAt(l)}}get type(){return"ext-link"}toString(e){return this.length===1?`[${super.toString(e)}${m(this,Dt)}]`:`[${super.toString(e,m(this,Dt))}]`}text(){return`[${super.text(" ")}]`}getGaps(){return m(this,Dt).length}lint(e=this.getAbsoluteIndex(),t){{let n=super.lint(e,t),i="var-anchor",s=v.lintConfig.getSeverity(i,"extLink");return s&&this.length===1&&this.isInside("heading-title")&&n.push(F(this,{start:e},i,"variable-anchor",s)),n}}print(){}};ps=B(Rg),Dt=new WeakMap,Ye=P(ps,0,"ExtLinkToken",Va,Ye),R(ps,1,Ye)});var dn,Qa=w(()=>{"use strict";G();Ct();ds();us();dn=class extends L{get type(){return"imagemap-link"}constructor(r,e,t,n,i=[]){super(void 0,n,i),this.append(r,e.length===2?new hr(...e,n,i):new Ye(...e,n,i),new de(t,n,i))}}});var Xa={};Z(Xa,{ImagemapToken:()=>fs});var fs,Ja=w(()=>{"use strict";z();Se();se();D();Qn();as();os();Qa();fs=class extends ct{get image(){return this.childNodes.find(Jn("imagemap-image"))}constructor(r,e=v.getConfig(),t=[]){if(super(void 0,e,t,{}),!r)return;let n=r.split(`
15
- `),i=new Set(e.protocol.split("|")),s=!0,a=!1;for(let l of n){let p=l.trim();if(!(a||!p||p.startsWith("#"))){if(s){let g=l.indexOf("|"),d=g===-1?l:l.slice(0,g),u=this.normalizeTitle(d,0,{halfParsed:!0,temporary:!0,page:""});if(u.valid&&u.ns===6){let c=new Je("imagemap",d,g===-1?void 0:l.slice(g+1),e,t);super.insertAt(c),s=!1;continue}else a=!0}else if(l.trim().split(/[\t ]/u,1)[0]==="desc"){super.insertAt(l);continue}else if(l.includes("[")){let g=l.indexOf("["),d=l.slice(g),u=/^\[\[([^|]+)(?:\|([^\]]*))?\]\][\w\s]*$/u.exec(d);if(u){if(this.normalizeTitle(u[1],0,{halfParsed:!0,temporary:!0,selfLink:!0,page:""}).valid){super.insertAt(new dn(l.slice(0,g),u.slice(1),d.slice(d.indexOf("]]")+2),e,t));continue}}else if(d.startsWith("[//")||i.has(d.slice(1,d.indexOf(":")+1))||i.has(d.slice(1,d.indexOf("//")+2))){let c=/^\[([^\]\s]+)(?:(\s+(?!\s))([^\]]*))?\][\w\s]*$/u.exec(d);if(c){super.insertAt(new dn(l.slice(0,g),c.slice(1),d.slice(d.indexOf("]")+1),e,t));continue}}}}super.insertAt(new Wt(l,e,t))}}lint(r=this.getAbsoluteIndex(),e){{let t=super.lint(r,e),n=new W(this,r),{childNodes:i,image:s}=this,a="invalid-imagemap",{lintConfig:l}=v,p=l.getSeverity(a,s?"link":"image");return p&&(s?Array.prototype.push.apply(t,i.filter(g=>{let d=g.toString().trim();return g.is("noinclude")&&d&&!d.startsWith("#")}).map(g=>{let d=j(g,n,a,"invalid-imagemap-link",p);return l.computeEditInfo&&(d.suggestions=[O(d,-1),me(d,"comment","# ")]),d})):t.push(F(this,n,a,"imagemap-without-image",p))),t}}getAttribute(r){return r==="invalid"?!this.image:super.getAttribute(r)}}});var Ka,cs,Pg,Ze,ms=w(()=>{"use strict";z();ot();qe();D();gt();Ka=[ve(!1),pe("<!--")];Ze=class extends(Pg=le){constructor(e,t,n,i){super(e,n,i);ce(this,"closed");this.closed=t}get type(){return"comment"}lint(e=this.getAbsoluteIndex()){{if(this.closed)return[];let t="unclosed-comment",{lintConfig:n}=v,i=n.getSeverity(t);if(!i)return[];let s=F(this,{start:e},t,"unclosed-comment",i);return n.computeEditInfo&&(s.suggestions=[Le(s.endIndex,"-->")]),[s]}}toString(e){return e?"":`<!--${this.innerText}${this.closed?"-->":""}`}print(){}};cs=B(Pg),Ze=P(cs,0,"CommentToken",Ka,Ze),R(cs,1,Ze)});var Ya={};Z(Ya,{CommentedToken:()=>hs});var hs,Za=w(()=>{"use strict";G();ms();hs=class extends L{get type(){return"ext-inner"}constructor(r,e,t=[]){if(super(void 0,e,t,{AstText:":",CommentToken:":"}),r){let n=r.indexOf("<!--"),i=n!==-1&&r.indexOf("-->",n+4),s=0;for(;i!==!1&&i!==-1;)n>s&&this.insertAt(r.slice(s,n)),this.insertAt(new Ze(r.slice(n+4,i),!0,e,t)),s=i+3,n=r.indexOf("<!--",s),i=n!==-1&&r.indexOf("-->",n+4);s<r.length&&this.insertAt(r.slice(s))}}lint(r=this.getAbsoluteIndex()){return super.lint(r,new RegExp(String.raw`<\s*(?:\/\s*)?(${this.name})\b`,"giu"))}}});var tl={};Z(tl,{CategorytreeToken:()=>br});var el,bs,Bg,br,rl=w(()=>{"use strict";z();qe();D();lr();el=[pe("")];br=class extends(Bg=ye){get type(){return"ext-inner"}constructor(r,e,t,n=[]){super(r,e,t,n),this.setAttribute("bracket",!1)}getTitle(){let r=this.firstChild.toString().trim(),e={halfParsed:!0},t=this.normalizeTitle(r,14,e);return t.valid&&t.ns===14?t:this.normalizeTitle(`Category:${r}`,0,e)}lint(r=this.getAbsoluteIndex()){{let e="no-ignored",t=v.lintConfig.getSeverity(e,"categorytree");if(t){let{link:n}=this;if(!n.valid||n.ns!==14)return[F(this,{start:r},e,"invalid-category",t)]}return super.lint(r,!1)}}};bs=B(Bg),br=P(bs,0,"CategorytreeToken",el,br),R(bs,1,br)});var nl={};Z(nl,{NowikiToken:()=>xs});var jg,Og,gn,ys,xs,il=w(()=>{"use strict";ze();z();se();D();gt();jg=Be(o=>new RegExp(String.raw`<\s*(?:/\s*)${o==="nowiki"?"":"?"}(${o})\b`,"giu")),Og=new Set(["languages","section","templatestyles"]),xs=class extends le{constructor(){super(...arguments);S(this,gn)}get type(){return"ext-inner"}lint(e=this.getAbsoluteIndex()){{let{name:t,innerText:n}=this,{lintConfig:i}=v,s="void-ext",a=i.getSeverity(s,t);if(a&&I(this,gn,ys).call(this)){let l=F(this,{start:e},s,v.msg("nothing-in",t),a);return i.computeEditInfo&&(l.suggestions=[O(l)]),[l]}{s="invalid-json";let l=i.getSeverity(s);if(t==="templatedata"&&l)return co(n).map(({message:p,from:g,to:d=g,line:u,endLine:c=u,column:f,endColumn:h=f})=>{a=l;let x=new W(this,e);return{rule:s,message:p,severity:a,startIndex:e+g,endIndex:e+d,startLine:x.top+u-1,endLine:x.top+c-1,startCol:(u>1?0:x.left)+f-1,endCol:(c>1?0:x.left)+h-1}}).filter(p=>p!==!1)}return super.lint(e,jg(t))}}getAttribute(e){return e==="invalid"?I(this,gn,ys).call(this):super.getAttribute(e)}};gn=new WeakSet,ys=function(){let{name:e,firstChild:{data:t}}=this;return Og.has(e)&&!!t}});var sl,Ts,qg,Xe,es=w(()=>{"use strict";z();se();D();zn();G();Un();Vn();sl=[dr()];Xe=class extends(qg=Fe){get type(){return"ext"}constructor(r,e,t,n,i=v.getConfig(),s=!1,a=[]){let l=r.toLowerCase(),p=new ft(!e||/^\s/u.test(e)?e:` ${e}`,"ext-attrs",l,i,a),g=ge(V({},i),{ext:i.ext.filter(u=>u!==l),excludes:[...i.excludes],inExt:!0}),d;switch(l){case"pre":if(p.getAttr("format")!=="wikitext"){let{PreToken:u}=(ca(),X(fa));d=new u(t,g,a);break}case"indicator":case"poem":case"ref":case"option":case"combooption":case"tab":case"tabs":case"poll":case"seo":case"langconvert":case"phonos":l==="poem"?g.excludes.push("heading"):l==="tab"&&(g.ext=g.ext.filter(u=>u!=="tabs")),d=new L(t,g,a);break;case"dynamicpagelist":{let{ParamTagToken:u}=(Mi(),X(ha));d=new u(l,s,t,g,a);break}case"inputbox":{let{InputboxToken:u}=(Ba(),X(Pa));d=new u(l,s,t,g,a);break}case"references":{let{NestedToken:u}=(ei(),X(Zn));g.excludes.push("heading"),d=new u(t,s,["ref"],g,a);break}case"choose":{let{NestedToken:u}=(ei(),X(Zn));d=new u(t,/<(option|choicetemplate)(\s[^>]*?)?(?:\/>|>([\s\S]*?)<\/(\1)>)/gu,["option","choicetemplate"],g,a);break}case"combobox":{let{NestedToken:u}=(ei(),X(Zn));d=new u(t,/<(combooption)(\s[^>]*?)?(?:\/>|>([\s\S]*?)<\/(combooption\s*)>)/giu,["combooption"],g,a);break}case"gallery":{let{GalleryToken:u}=(Ha(),X(Ga));d=new u(t,g,a);break}case"imagemap":{let{ImagemapToken:u}=(Ja(),X(Xa));d=new u(t,g,a);break}case"hiero":{let{CommentedToken:u}=(Za(),X(Ya));d=new u(t,g,a);break}case"categorytree":{let{CategorytreeToken:u}=(rl(),X(tl));d=new u(t,void 0,g,a);break}default:{let{NowikiToken:u}=(il(),X(nl));d=new u(t,g,a)}}d.setAttribute("name",l),d.type==="plain"&&(d.type="ext-inner"),super(r,p,d,n,i,a),this.seal("closed",!0)}lint(r=this.getAbsoluteIndex(),e){{let t=super.lint(r,e),{lintConfig:n}=v,i=new W(this,r);if(this.name!=="nowiki"){let s=this.inHtmlAttrs(),a="parsing-order",l=s&&n.getSeverity(a,s===2?"ext":"templateInTable");l&&t.push(F(this,i,a,"ext-in-html",l))}if(this.name==="ref"){let s="var-anchor",a=n.getSeverity(s,"ref");a&&this.closest("heading-title")&&t.push(F(this,i,s,"variable-anchor",a)),s="nested-link",a=n.getSeverity(s,"ref"),a&&this.closest("link-text,ext-link-text")&&t.push(F(this,i,s,"ref-in-link",a))}return t}}};Ts=B(qg),Xe=P(Ts,0,"ExtToken",sl,Xe),R(Ts,1,Xe)});var ht,Mt,et,xr,ks=w(()=>{"use strict";z();Se();G();D();xr=class extends L{constructor(e,t,n,i,s){super(void 0,i,s);S(this,ht);S(this,Mt);S(this,et);this.insertAt(t),C(this,ht,n),C(this,Mt,e)}get closing(){return m(this,ht)}toString(e){return`<${m(this,ht)?"/":""}${m(this,Mt)}${super.toString(e)}${this.selfClosing?"/":""}>`}text(e=""){let{closing:t}=this;return`<${t&&!e?"/":""}${m(this,Mt)}${t?"":super.text()}${e}>`}getAttribute(e){return e==="padding"?m(this,Mt).length+(m(this,ht)?2:1):super.getAttribute(e)}findMatchingTag(){return je(m(this,et),()=>{let{type:e,name:t,parentNode:n,closing:i,selfClosing:s}=this,a=!1,l=!1;if(e==="html"){let[,f,h]=this.getAttribute("config").html;a=h.includes(t),l=f.includes(t)}if(a||l&&s)return this;if(!n)return;let{childNodes:p}=n,g=p.indexOf(this),d=i?p.slice(0,g).reverse():p.slice(g+1),u=[this],{rev:c}=oe;for(let f of d)if(!(!f.is(e)||e==="html"&&(f.name!==t||l&&f.selfClosing)))if(m(f,ht)===i){if(e==="tvar")return;u.push(f)}else{let h=u.pop();if(h===this)return f;v.viewOnly&&(C(h,et,[c,f]),C(f,et,[c,h]))}if(v.viewOnly)for(let f of u)C(f,et,[c,void 0])},e=>{C(this,et,e),e[1]&&e[1]!==this&&C(e[1],et,[oe.rev,this])})}print(){}json(e,t,n=this.getAbsoluteIndex()){}};ht=new WeakMap,Mt=new WeakMap,et=new WeakMap});var ol,vs,_g,_e,al=w(()=>{"use strict";ot();xe();ks();at();ol=[ve(),Q];_e=class extends(_g=xr){get type(){return"tvar"}constructor(r,e,t,n,i){let s=new he(e,"tvar-name",n,i);super(r,s,t,n,i)}};vs=B(_g),_e=P(vs,0,"TvarToken",ol,_e),R(vs,1,_e)});var ll={};Z(ll,{TranslateToken:()=>As});var Ss,Wg,As,dl=w(()=>{"use strict";G();Un();at();al();As=class extends Fe{constructor(e,t,n,i=[]){let s=new he(e,"translate-attr",n,i);t=t==null?void 0:t.replace(/<tvar(\|[^>]+)>([\s\S]*?)<\/>/gu,(l,p,g)=>(new _e("tvar",p,!1,n,i),new _e("","",!0,n,i),`\0${i.length-2}n${g}\0${i.length}n`)).replace(/<(tvar)(\s+name\s*=(?:\s*(?:(["'])[\s\S]*?\3|[^"'\s>]+))?\s*)>([\s\S]*?)<\/(tvar)(\s*)>/giu,(l,p,g,d,u,c,f)=>(new _e(p,g,!1,n,i),new _e(c,f,!0,n,i),`\0${i.length-2}n${u}\0${i.length}n`));let a=new L(t,n,i);a.type="translate-inner";super("translate",s,a,"translate",n,i);S(this,Ss);this.seal("closed",!0)}get type(){return"translate"}get selfClosing(){return!1}toString(e){return e?this.lastChild.toString(!0):super.toString()}text(){return this.lastChild.text()}print(){}};Ss=new WeakSet,Wg=function(){}});var ul={};Z(ul,{parseCommentAndExt:()=>Rt});var pl,Dg,Cs,Mg,gl,Rt,Kr=w(()=>{"use strict";ze();ae();Go();Ct();Qo();es();ms();pl="<onlyinclude>",Dg="</onlyinclude>",{length:Cs}=pl,Mg=[!1,!0].map(o=>{let r=o?"includeonly":"(?:no|only)include",e=o?"noinclude":"includeonly";return Be(t=>new RegExp(String.raw`<!--[\s\S]*?(?:-->|$)|<${r}(?:\s[^>]*)?/?>|</${r}\s*>|<(${t})(\s[^>]*?)?(?:/>|>([\s\S]*?)</(${"\\1"}\s*)>)|<(${e})(\s[^>]*?)?(?:/>|>([\s\S]*?)(?:</(${e}\s*)>|$))`,"giu"))}),gl=o=>{let r=o.indexOf(pl);return{i:r,j:o.indexOf(Dg,r+Cs)}},Rt=(o,r,e,t)=>{if(t){let{i:l,j:p}=gl(o);if(l!==-1&&p!==-1){let g="",d=u=>{new de(u,r,e),g+=`\0${e.length-1}n`};for(;l!==-1&&p!==-1;){let u=`\0${e.length}g`;new Lt(o.slice(l+Cs,p),r,e),l>0&&d(o.slice(0,l)),g+=u,o=o.slice(p+Cs+1),{i:l,j:p}=gl(o)}return o&&d(o),g}}let{ext:n}=r,i=n,s=r;if(n.includes("translate")){let{TranslateToken:l}=(dl(),X(ll)),p=[];i=n.filter(g=>g!=="translate"&&g!=="tvar"),s=ge(V({},r),{ext:i}),o=o.replace(/<nowiki>[\s\S]*?<\/nowiki>/giu,g=>(p.push(g),`\0${p.length-1}`)).replace(/<translate( nowrap)?>([\s\S]*?)<\/translate>/gu,(g,d,u)=>{let c=e.length;return new l(d,u&&ke(u,p),s,e),`\0${c}g`}),o=ke(o,p)}let a=Mg[t?1:0](i.join("|"));return a.lastIndex=0,a.test(o)?o.replace(a,(l,p,g,d,u,c,f,h,x)=>{let T=e.length,b="n";if(p)b="e",new Xe(p,g,d,u,s,c,e);else if(l.startsWith("<!--")){b="c";let y=l.endsWith("-->");new Ze(ke(l,e,1).slice(4,y?-3:void 0),y,r,e)}else c?new $t(c,f&&ke(f,e,1),h&&ke(h,e,1),x,r,e):new de(l,r,e,!0);return`\0${T}${b}`}):o}});var Ug,zg,Gg,fl,pn,ws,Hg,Ut,cl=w(()=>{"use strict";z();se();zn();D();ks();Ug=new Set(["if","ifeq","ifexpr","ifexist","iferror","switch"]),zg=new Set(["b","big","center","cite","code","del","dfn","em","font","i","ins","kbd","mark","pre","q","s","samp","small","strike","strong","sub","sup","tt","u","var"]),Gg=new Set(["strike","big","center","font","tt"]);fl=[dr()];Ut=class extends(Hg=xr){constructor(e,t,n,i,s,a){super(e,t,n,s,a);S(this,pn);this.setAttribute("name",e.toLowerCase()),C(this,pn,i)}get type(){return"html"}get selfClosing(){return m(this,pn)}text(){let{closing:e,selfClosing:t,name:n}=this,[,,i]=this.getAttribute("config").html;return i.includes(n)?e&&n!=="br"?"":super.text("/"):super.text(t&&!e?"/":"")}lint(e=this.getAbsoluteIndex(),t){{let n=super.lint(e,t),{name:i,parentNode:s,closing:a,selfClosing:l}=this,p=new W(this,e),{lintConfig:g}=v,{computeEditInfo:d,fix:u}=g,c=this.inTableAttrs(),f="h1",h=g.getSeverity(f,"html");if(h&&i==="h1"&&!a){let A=F(this,p,f,"<h1>",h);d&&(A.suggestions=[{desc:"h2",range:[e+2,e+3],text:"2"}]),n.push(A)}if(f="parsing-order",h=c&&g.getSeverity(f,c===2?"html":"templateInTable"),h){let A=F(this,p,f,"html-in-table",h);d&&c===2&&(A.suggestions=[O(A)]),n.push(A)}if(f="obsolete-tag",h=g.getSeverity(f,i),h&&Gg.has(i)&&n.push(F(this,p,f,"obsolete-tag",h)),f="bold-header",h=g.getSeverity(f,i),h&&(i==="b"||i==="strong")&&this.isInside("heading-title")){let A=F(this,p,f,"bold-in-header",h);d&&(A.suggestions=[O(A)]),n.push(A)}let[,x,T]=this.getAttribute("config").html,b=T.includes(i),y=x.includes(i),k=!b&&!y;if(f="unmatched-tag",a&&(l||b)||l&&k){if(h=g.getSeverity(f,a?"both":"selfClosing"),h){let A=F(this,p,f,a?"closing-and-self-closing":"invalid-self-closing",h);if(d||u){let N=Rn(e),E={desc:v.msg("no-self-closing"),range:[A.endIndex-2,A.endIndex-1],text:""};y?d&&(A.suggestions=[N,E]):a?A.fix=b?N:E:d&&(A.suggestions=[E,Le(A.endIndex,`></${i}>`,-2)])}n.push(A)}}else if(!this.findMatchingTag()){let A=F(this,p,f,a?"unmatched-closing":"unclosed-tag"),N=this.closest("magic-word");if(N&&Ug.has(N.name))h=g.getSeverity(f,"conditional");else if(a)h=g.getSeverity(f,"closing"),A.suggestions=[O(A)];else{h=g.getSeverity(f,"opening");let E=s==null?void 0:s.childNodes;zg.has(i)&&(E!=null&&E.slice(0,E.indexOf(this)).some($=>$.is("html")&&$.name===i&&!$.findMatchingTag())&&(A.suggestions=[Le(e+1,"/")]),this.isInside("heading-title")&&(A.rule="format-leakage",h=g.getSeverity("format-leakage",i)))}h&&(A.severity=h,n.push(A))}return n}}getAttribute(e){return e==="invalid"?this.inTableAttrs()===2:super.getAttribute(e)}json(e,t,n=this.getAbsoluteIndex()){}};ws=B(Hg),pn=new WeakMap,Ut=P(ws,0,"HtmlToken",fl,Ut),R(ws,1,Ut)});var ml={};Z(ml,{parseHtml:()=>Qg});var Vg,Qg,hl=w(()=>{"use strict";Vn();cl();Vg=/^(\/?)([a-z][^\s/>]*)((?:\s|\/(?!>))[^>]*?)?(\/?>)([^<]*)$/iu,Qg=(o,r,e)=>{var s;let{html:t}=r;(s=r.htmlElements)!=null||(r.htmlElements=new Set([...t[0],...t[1],...t[2]]));let n=o.split("<"),i=n.shift();for(let a of n){let l=Vg.exec(a),p=l==null?void 0:l[2],g=p==null?void 0:p.toLowerCase();if(!l||!r.htmlElements.has(g)){i+=`<${a}`;continue}let[,d,,u="",c,f]=l,{length:h}=e,x=new ft(u,"html-attrs",g,r,e),T=x.hasAttr("itemprop");if(g==="meta"&&!(T&&x.hasAttr("content"))||g==="link"&&!(T&&x.hasAttr("href"))){i+=`<${a}`,e.length=h;continue}i+=`\0${e.length}x${f}`,new Ut(p,x,d==="/",c==="/>",r,e)}return i}});var bl,Es,Xg,tt,Ls=w(()=>{"use strict";zn();G();at();Vn();bl=[dr(1)];tt=class extends(Xg=L){constructor(r,e,t,n,i,s=[],a){super(void 0,i,s,a),this.append(new he(e,"table-syntax",i,s),new ft(n,"table-attrs",t,i,s))}escape(){}};Es=B(Xg),tt=P(Es,0,"TableBaseToken",bl,tt),R(Es,1,tt)});var xl,yl,Re,Ns,yr,un,zt,$s=w(()=>{"use strict";z();se();qn();D();G();Ls();zt=class extends(yl=tt,xl=[tr(!1)],yl){constructor(e,t,n,i=[]){var p;let s=/\||\0\d+!\x7F/u.exec(t!=null?t:""),a=s?t.slice(0,s.index):"";/\[\[|-\{/u.test(a)&&(s=null,a="");super(/^(?:\n[^\S\n]*(?:[|!]|\|\+|\{\{\s*!\s*\}\}\+?)|(?:\||\{\{\s*!\s*\}\}){2}|!!|\{\{\s*!!\s*\}\})$/u,e,"td",a,n,i);R(Ns,5,this);S(this,yr);S(this,Re,"");s&&([En(this,Re)._]=s);let l=new L(t==null?void 0:t.slice(((p=s==null?void 0:s.index)!=null?p:NaN)+m(this,Re).length),n,i);l.type="td-inner",l.setAttribute("stage",4),this.insertAt(l)}get type(){return"td"}get rowspan(){return this.getAttr("rowspan")}get colspan(){return this.getAttr("colspan")}get subtype(){return I(this,yr,un).call(this).subtype}afterBuild(){m(this,Re).includes("\0")&&C(this,Re,this.buildFromStr(m(this,Re),0)),super.afterBuild()}toString(e){let[t,n,i]=this.childNodes;return t.toString(e)+n.toString(e)+m(this,Re)+i.toString(e)}text(){let[e,t,n]=this.childNodes;return e.text()+t.text()+m(this,Re)+n.text()}getGaps(e){return e===1?m(this,Re).length:0}lint(e=this.getAbsoluteIndex(),t){{let n=super.lint(e,t),i=new W(this,e+this.getRelativeIndex(this.length-1)),s="pipe-like",{lintConfig:a}=v,{computeEditInfo:l,fix:p}=a,g=["td","double"].map(d=>a.getSeverity(s,d));for(let d of this.lastChild.childNodes)if(d.type==="text"){let{data:u}=d;if(u.includes("|")){let c=u.includes("||"),f=g[c?1:0];if(f){let h=j(d,i,s,"pipe-in-table",f);if(l||p)if(c){let x={caption:"|+",td:"|",th:"!"}[this.subtype];h.fix=me(h,"newline",u.replace(/\|\|/gu,`
16
- ${x}`))}else l&&(h.suggestions=[jn(h.startIndex,u)]);n.push(h)}}}return n}}isIndependent(){return this.firstChild.text().startsWith(`
17
- `)}getAttr(e){{let t=super.getAttr(e);return e==="rowspan"||e==="colspan"?parseInt(t)||1:t}}escape(){}print(){}json(e,t,n=this.getAbsoluteIndex()){}};Ns=B(yl),Re=new WeakMap,yr=new WeakSet,un=function(){var a;let e=this.firstChild.text(),t=e.slice(-1),n="td";if(t==="!"?n="th":t==="+"&&(n="caption"),this.isIndependent())return{subtype:n};let{previousSibling:i}=this;return V({},I(a=i,yr,un).call(a))},un=P(Ns,17,"#getSyntax",xl,yr,un),Fr(Ns,zt)});var Tr,Is=w(()=>{"use strict";z();D();Ls();$s();Tr=class extends tt{lint(r=this.getAbsoluteIndex(),e){{let t=super.lint(r,e),n=this.childNodes.find(({type:l})=>l==="table-inter");if(!n)return t;let i=In(n),s="fostered-content",a=i&&v.lintConfig.getSeverity(s,i===2?void 0:"transclusion");if(a){let l=j(n,{start:r},s,"content-outside-table",a);l.startIndex++,l.startLine++,l.startCol=0,t.push(l)}return t}}getRowCount(){return Number(this.childNodes.some(r=>r instanceof zt&&r.isIndependent()&&!r.firstChild.text().endsWith("+")))}}});var Rs,Tl,kl,Fs,kr,vl=w(()=>{"use strict";z();Se();se();qn();D();Is();at();Rs=class extends Array{},kr=class extends(kl=Tr,Tl=[tr(!1)],kl){constructor(e,t,n,i){super(/^(?:\{\||\{\{\{\s*!\s*\}\}|\{\{\s*\(!\s*\}\})$/u,e,"table",t,n,i,{});R(Fs,5,this)}get type(){return"table"}get closed(){return this.lastChild.is("table-syntax")}lint(e=this.getAbsoluteIndex(),t){{let n=super.lint(e,t),i=new W(this,e),s=["unclosed-table","table-layout"],a=s.map(l=>v.lintConfig.getSeverity(l));if(a[0]&&!this.closed&&n.push(j(this.firstChild,i,s[0],"unclosed-table",a[0])),a[1]){let l=this.getLayout(),{length:p}=l;if(p>1){let g=1,d=1/0,u=0;for(;u<p;u++){let c=l[u],f=c.length;if(f<g)break;f<d&&(d=f);let h=c.indexOf(c[f-1])+1;if(h>d)break;h>g&&(g=h)}if(u<p){let c=this.getNthRow(u),f=j(c,i,s[1],"inconsistent-table",a[1]);f.startIndex++,f.startLine++,f.startCol=0,n.push(f)}}}return n}}close(e=`
18
- |}`,t){oe.run(()=>{let n=new he(t?e:void 0,"table-syntax",this.getAttribute("config"),this.getAttribute("accum"));super.insertAt(n)})}getLayout(e){{let t=this.getAllRows(),{length:n}=t,i=Rs.from(Sl(n,()=>[]));for(let s=0;s<i.length;s++){let a=i[s],l=0,p=0,g;for(let d of t[s].childNodes.slice(2))if(d.is("td")){if(d.isIndependent()&&(g=d.subtype!=="caption"),g){let u={row:s,column:l},{rowspan:c,colspan:f}=d;for(l++;a[p];)p++;for(let h=s;h<Math.min(s+c,n);h++)for(let x=p;x<p+f;x++)i[h][x]=u;p+=f}}else if(Al(d))break}return i}}getAllRows(){return[...super.getRowCount()?[this]:[],...this.childNodes.slice(1).filter(e=>e.is("tr")&&e.getRowCount()>0)]}getNthRow(e,t,n){{let i=super.getRowCount();if(e===0&&i)return this;i&&e--;for(let s of this.childNodes.slice(2)){let{type:a}=s;if(a==="tr"&&s.getRowCount()&&(e--,e<0))return s}return}}json(e,t,n=this.getAbsoluteIndex()){}};Fs=B(kl),P(Fs,1,"getLayout",Tl,kr),Fr(Fs,kr)});var ni,Cl=w(()=>{"use strict";Is();ni=class extends Tr{get type(){return"tr"}constructor(r,e,t,n){super(/^\n[^\S\n]*(?:\|-+|\{\{\s*!\s*\}\}-+|\{\{\s*!-\s*\}\}-*)$/u,r,"tr",e,t,n)}}});var vr,Ps=w(()=>{"use strict";gt();vr=class extends le{get indent(){}json(r,e,t=this.getAbsoluteIndex()){}}});var Ar,Bs=w(()=>{"use strict";Ps();Ar=class extends vr{get type(){return"dd"}}});var El={};Z(El,{parseTable:()=>Kg});var Jg,wl,Kg,Ll=w(()=>{"use strict";G();vl();Cl();$s();Bs();Jg=o=>o.lastChild.constructor!==L,wl=(o,r)=>o.is("td")?r.pop():o,Kg=({firstChild:{data:o},type:r,name:e},t,n)=>{let i=[],s=o.split(`
19
- `),a=r==="root"||r==="parameter-value"||r==="ext-inner"&&e==="poem"?"":`
20
- ${s.shift()}`,l,p=(g,d)=>{if(!d){a+=g;return}let{lastChild:u}=d;if(Jg(d)){let c=new L(g,t,n);c.type="table-inter",c.setAttribute("stage",3),d.insertAt(c)}else u.setText(u.toString()+g)};for(let g of s){l=i.pop();let[d]=/^(?:\s|\0\d+[cno]\x7F)*/u.exec(g),u=g.slice(d.length),c=/^(:*)((?:\s|\0\d+[cn]\x7F)*)(\{\||\{(?:\0\d+[cn]\x7F)*\0\d+!\x7F|\0\d+\{\x7F)(.*)$/u.exec(u);if(c){for(;l&&!l.is("td");)l=i.pop();let[,y,k,A,N]=c;y&&new Ar(y,t,n),p(`
21
- ${d}${y&&`\0${n.length-1}d`}${k}\0${n.length}b`,l),i.push(...l?[l]:[],new kr(A,N,t,n));continue}else if(!l){a+=`
22
- ${g}`;continue}let f=/^(?:(\|\}|\0\d+!\x7F\}|\0\d+\}\x7F)|(\|-+|\0\d+!\x7F-+|\0\d+-\x7F-*)(?!-)|(!|(?:\||\0\d+!\x7F)\+?))(.*)$/u.exec(u);if(!f){p(`
23
- ${g}`,l),i.push(l);continue}let[,h,x,T,b]=f;if(h){for(;!l.is("table");)l=i.pop();l.close(`
24
- ${d}${h}`,!0),p(b,i[i.length-1])}else if(x){l=wl(l,i),l.is("tr")&&(l=i.pop());let y=new ni(`
25
- ${d}${x}`,b,t,n);i.push(l,y),l.insertAt(y)}else{l=wl(l,i);let y=T==="!"?/!!|(?:\||\0\d+!\x7F){2}|\0\d+\+\x7F/gu:/(?:\||\0\d+!\x7F){2}|\0\d+\+\x7F/gu,k=y.exec(b),A=0,N=`
26
- ${d}${T}`,E=$=>{let H=new zt(N,b.slice(A,k==null?void 0:k.index),t,n);return $.insertAt(H),H};for(;k;)E(l),{lastIndex:A}=y,[N]=k,k=y.exec(b);i.push(l,E(l))}}return a.slice(1)}});var fn,Nl=w(()=>{"use strict";fn=o=>!/^_{2}.+_{2}$/u.test(o)});var ii,$l=w(()=>{"use strict";gt();ii=class extends le{get type(){return"hr"}}});var Il,cn,js,Yg,Gt,Fl=w(()=>{"use strict";ot();qe();gt();Il=[ve(),pe("__")];Gt=class extends(Yg=le){constructor(e,t,n,i,s){var g,d;super(e,i,s);S(this,cn);let a=e.toLowerCase(),[,,l,p]=i.doubleUnderscore;this.setAttribute("name",(d=t?(g=p==null?void 0:p[e])==null?void 0:g.toLowerCase():l==null?void 0:l[a])!=null?d:a),C(this,cn,n)}get type(){return"double-underscore"}toString(){let e=m(this,cn)?"__":"__";return e+this.innerText+e}print(){}};js=B(Yg),cn=new WeakMap,Gt=P(js,0,"DoubleUnderscoreToken",Il,Gt),R(js,1,Gt)});var Rl={};Z(Rl,{parseHrAndDoubleUnderscore:()=>Zg});var Zg,Pl=w(()=>{"use strict";Nl();$l();Fl();Gi();Zg=({firstChild:{data:o},type:r,name:e},t,n)=>{var p,g,d;let[i,s,a]=t.doubleUnderscore,l=[...i,...s];return(p=t.insensitiveDoubleUnderscore)!=null||(t.insensitiveDoubleUnderscore=new Set(i.filter(fn))),(g=t.sensitiveDoubleUnderscore)!=null||(t.sensitiveDoubleUnderscore=new Set(s.filter(fn))),(d=t.regexHrAndDoubleUnderscore)!=null||(t.regexHrAndDoubleUnderscore=new RegExp(String.raw`^((?:\0\d+[cno]\x7F)*)(-{4,})|__(${l.filter(fn).join("|")})__|_{2}(${l.filter(u=>!fn(u)).map(u=>u.slice(2,-2)).join("|")})_{2}`,"gimu")),r!=="root"&&(r!=="ext-inner"||e!=="poem")&&(o=`\0${o}`),o=o.replace(t.regexHrAndDoubleUnderscore,(u,c,f,h,x)=>{var A;if(f)return new ii(f,t,n),`${c}\0${n.length-1}r`;let T=h!=null?h:x,b=t.sensitiveDoubleUnderscore.has(T),y=T.toLowerCase(),k=t.insensitiveDoubleUnderscore.has(y);return b||k?(new Gt(T,b,!!x,t,n),`\0${n.length-1}${k&&((A=a==null?void 0:a[y])!=null?A:y)==="toc"?"u":"n"}`):u}),t.excludes.includes("heading")||(o=o.replace(/^((?:\0\d+[cn]\x7F)*)(={1,6})(.+)\2((?:\s|\0\d+[cn]\x7F)*)$/gmu,(u,c,f,h,x)=>{let T=`${c}\0${n.length}h`;return new Qe(f.length,[h,x],t,n),T})),r==="root"||r==="ext-inner"&&e==="poem"?o:o.slice(1)}});var Sr,si,Bl=w(()=>{"use strict";z();se();D();gt();si=class extends le{constructor(e,t,n,i){super(e,n,i);S(this,Sr);C(this,Sr,t)}get type(){return"quote"}get bold(){return this.innerText.length!==2}get italic(){return this.innerText.length!==3}get closing(){return V(V({},this.bold?{bold:m(this,Sr).bold}:void 0),this.italic?{italic:m(this,Sr).italic}:void 0)}text(){let{parentNode:e,innerText:t}=this;return e!=null&&e.is("image-parameter")&&e.name!=="caption"?"":t}lint(e=this.getAbsoluteIndex()){{let{previousSibling:t,bold:n,closing:i}=this,s=(t==null?void 0:t.type)==="text"?t.data:void 0,a=[],l=new W(this,e),p=["lonely-apos","bold-header"],{lintConfig:g}=v,{computeEditInfo:d}=g,u=[void 0,"word"].map(f=>g.getSeverity(p[0],f)),c=g.getSeverity(p[1]);if(s!=null&&s.endsWith("'")){let f=u[(i.bold||i.italic)&&/[a-z\d]'$/iu.test(s)?1:0];if(f){let h=F(this,l,p[0],v.msg("lonely","'"),f),{startLine:x,startCol:T}=h,[,{length:b}]=/(?:^|[^'])('+)$/u.exec(s),y=e-b,k=ge(V({},h),{startIndex:y,endIndex:e,endLine:x,startCol:T-b,endCol:T});d&&n&&(k.suggestions=[Ge(y,"&apos;",b),O(k)]),a.push(k)}}if(c&&n&&this.isInside("heading-title")){let f=F(this,l,p[1],"bold-in-header",c);d&&(f.suggestions=[O(f)]),a.push(f)}return a}}json(e,t,n=this.getAbsoluteIndex()){}};Sr=new WeakMap});var jl={};Z(jl,{parseQuotes:()=>Os});var Os,qs=w(()=>{"use strict";Bl();Os=(o,r,e,t)=>{var c;let n=o.split(/('{2,})/u),{length:i}=n;if(i===1)return o;let s=0,a=0,l,p,g;for(let f=1;f<i;f+=2){let h=n[f].length;switch(h){case 2:a++;break;case 4:n[f-1]+="'",n[f]="'''";case 3:if(s++,l!==void 0)break;n[f-1].endsWith(" ")?p===void 0&&g===void 0&&(g=f):n[f-1].slice(-2,-1)===" "?l=f:p!=null||(p=f);break;default:n[f-1]+="'".repeat(h-5),n[f]="'''''",a++,s++}}if(a%2===1&&s%2===1){let f=(c=l!=null?l:p)!=null?c:g;f!==void 0&&(n[f]="''",n[f-1]+="'")}let d=!1,u=!1;for(let f=1;f<i;f+=2){let h=n[f].length,x=h!==2,T=h!==3,b=new si(n[f],{bold:x&&!!d,italic:T&&!!u},r,e);x&&(d=!d&&b),T&&(u=!u&&b),n[f]=`\0${e.length-1}q`}return n.join("")}});var Ol={};Z(Ol,{parseExternalLinks:()=>_s});var _s,Ws=w(()=>{"use strict";ae();us();ri();_s=(o,r,e,t)=>{var n;return(n=r.regexExternalLinks)!=null||(r.regexExternalLinks=new RegExp(String.raw`\[((?:\0\d+[cn]\x7F)*(?:\0\d+f\x7F|(?:(?:${r.protocol}|//)${De}|\0\d+m\x7F)${Me}(?=[[\]<>"\t${Ie}]|\0\d)))([${Ie}]*(?![${Ie}]))([^\]\x01-\x08\x0A-\x1F\uFFFD]*)\]`,"giu")),o.replace(r.regexExternalLinks,(i,s,a,l)=>{let{length:p}=e,g=/&[lg]t;/u.exec(s);return g&&(a="",l=s.slice(g.index)+a+l,s=s.slice(0,g.index)),t?(new Ke(s,"ext-link-url",r,e),`[\0${p}f${a}${l}]`):(new Ye(s,a,l,r,e),`\0${p}w`)})}});var oi,ql=w(()=>{"use strict";lr();oi=class extends ye{get type(){return"category"}get sortkey(){}json(r,e,t=this.getAbsoluteIndex()){}}});var Wl={};Z(Wl,{parseLinks:()=>_l});var ep,_l,Dl=w(()=>{"use strict";ae();D();qs();Ws();ds();ns();ql();ep=/^((?:(?!\0\d+!\x7F)[^\n[\]{}|])+)(\||\0\d+!\x7F)([\s\S]*)$/u,_l=(o,r,e,t,n)=>{var l;(l=r.regexLinks)!=null||(r.regexLinks=new RegExp(String.raw`^\s*(?:${r.protocol}|//)`,"iu"));let i=r.inExt?/^((?:(?!\0\d+!\x7F)[^\n[\]{}|])+)(?:(\||\0\d+!\x7F)([\s\S]*?[^\]]))?\]\]([\s\S]*)$/u:/^((?:(?!\0\d+!\x7F)[^\n[\]{}|])*)(?:(\||\0\d+!\x7F)([\s\S]*?[^\]])?)?\]\]([\s\S]*)$/u,s=o.split("[["),a=s.shift();for(let p=0;p<s.length;p++){let g=!1,d,u,c,f,h=s[p],x=i.exec(h);if(x)[,d,u,c,f]=x,f.startsWith("]")&&(c!=null&&c.includes("["))&&(c+="]",f=f.slice(1));else{let N=ep.exec(h);N&&(g=!0,[,d,u,c]=N)}if(d===void 0||r.regexLinks.test(d)||/\0\d+[exhbru]\x7F/u.test(d)){a+=`[[${h}`;continue}let T=re(d).trim(),b=T.startsWith(":");if(b&&g){a+=`[[${h}`;continue}else!T&&c&&!c.includes(`
27
- `)&&(T=re(c).trim());let{ns:y,valid:k}=v.normalizeTitle(T,0,!1,r,{halfParsed:!0,temporary:!0,decode:!0,selfLink:!0,page:t});if(k){if(g){if(y!==6){a+=`[[${h}`;continue}let N=!1;for(p++;p<s.length;p++){let E=s[p],$=E.split("]]");if($.length>2){N=!0,c+=`[[${$[0]}]]${$[1]}`,f=$.slice(2).join("]]");break}else if($.length===2)c+=`[[${$[0]}]]${$[1]}`;else{c+=`[[${E}`;break}}if(c=_l(c,r,e,t,n),!N){a+=`[[${d}${u}${c}`;continue}}}else{a+=`[[${h}`;continue}c&&(c=Os(c,r,e,n));let A=hr;b||(y===6?(c&&(c=_s(c,r,e,!0)),A=mr):y===14&&(A=oi)),c===void 0&&u&&(c=""),a+=`\0${e.length}l${f}`,new A(d,c,r,e,u)}return a}});var Hl={};Z(Hl,{parseMagicLinks:()=>tp});var Gl,Ml,Ul,zl,tp,Vl=w(()=>{"use strict";ae();ri();Gl=String.raw`[${Ie}\t]|&nbsp;|&#0*160;|&#x0*a0;`,Ml=`(?:${Gl})+`,Ul=`(?:${Gl}|-)`,zl=String.raw`(?:RFC|PMID)${Ml}\d+\b|ISBN${Ml}(?:97[89]${Ul}?)?(?:\d${Ul}?){9}[\dx]\b`,tp=(o,r,e)=>{if(!r.regexMagicLinks)try{r.regexMagicLinks=new RegExp(String.raw`(^|[^\p{L}\p{N}_])(?:(?:${r.protocol})(${De}${Me})|${zl})`,"giu")}catch(t){r.regexMagicLinks=new RegExp(String.raw`(^|\W)(?:(?:${r.protocol})(${De}${Me})|${zl})`,"giu")}return o.replace(r.regexMagicLinks,(t,n,i)=>{let s=n?t.slice(n.length):t;if(i){let a="",l=/&(?:[lg]t|nbsp|#x0*(?:3[ce]|a0)|#0*(?:6[02]|160));/iu.exec(s);l&&(a=s.slice(l.index),s=s.slice(0,l.index));let p=s.includes("(")?/[^,;\\.:!?][,;\\.:!?]+$/u:/[^,;\\.:!?)][,;\\.:!?)]+$/u,g=p.exec(s);if(g){let d=1;g[0][1]===";"&&/&(?:[a-z]+|#x[\da-f]+|#\d+)$/iu.test(s.slice(0,g.index))&&(d=2),a=s.slice(g.index+d)+a,s=s.slice(0,g.index+d)}return a.length>=i.length?t:(new Ke(s,void 0,r,e),`${n}\0${e.length-1}w${a}`)}else if(!/^(?:RFC|PMID|ISBN)/u.test(s))return t;return new Ke(s,"magic-link",r,e),`${n}\0${e.length-1}i`})}});var Ql,Xl=w(()=>{"use strict";Ql=(o,r)=>o.startsWith(r)?r.length:[...r].findIndex((e,t)=>e!==o[t])});var rp,ai,Jl=w(()=>{"use strict";z();D();Ps();rp=new Set(["link","category","file"]),ai=class extends vr{get type(){return"list"}lint(r=this.getAbsoluteIndex()){var e;{let t="syntax-like",n=v.lintConfig.getSeverity(t,"redirect"),{innerText:i}=this;if(n&&i==="#"){let{nextSibling:s}=this;if((s==null?void 0:s.type)==="text"&&rp.has((e=s.nextSibling)==null?void 0:e.type)&&new RegExp(String.raw`^(?:${this.getAttribute("config").redirection.join("|")})\s*(?::\s*)?$`,"iu").test(`#${s.data}`)){let l=F(s,{start:r+1},t,"redirect-like",n);return l.startIndex--,l.startCol--,l.endIndex+=2,l.endCol+=2,[l]}}return[]}}}});var Kl={};Z(Kl,{parseList:()=>np});var np,Yl=w(()=>{"use strict";Xl();Jl();Bs();np=(o,r,e,t)=>{let n=/^((?:\0\d+[cno]\x7F)*)([;:*#]+)(\s*)/u.exec(o);if(!n)return r.lastPrefix="",o;let[i,s,a,l]=n,p=a.replace(/;/gu,":"),g=Ql(p,r.lastPrefix),d=((g>1?a.slice(g-1):a)+l).split(/(?=;)/u),u=d[0].startsWith(";"),c=d.length-(u?0:1);if(g>1){let q=a.slice(0,g-1);if(u){let K=q.split(/(?=;)/u);d.unshift(...K),c+=q.includes(";")?K.length:0}else d[0]=q+d[0]}r.lastPrefix=p;let f=s+d.map((q,K)=>`\0${t.length+K}d`).join("")+o.slice(i.length);for(let q of d)new ai(q,e,t);if(!c)return f;let[h,,x]=e.html,T=/:+|-\{|\0\d+[xq]\x7F/gu,b=T,y=b.exec(f),k=0,A=!1,N=!1,E=0,$=(q,K)=>(new Ar(q,e,t),`${f.slice(0,K)}\0${t.length-1}d${f.slice(K+q.length)}`),H=q=>{q?k&&k--:k++};for(;y&&c;){let{0:q,index:K}=y;if(q==="-{"){if(!E){let{lastIndex:_}=b;b=/-\{|\}-/gu,b.lastIndex=_}E++}else if(q==="}-"){if(E--,!E){let{lastIndex:_}=b;b=T,b.lastIndex=_}}else if(q.endsWith("x")){let{name:_,closing:U,selfClosing:M}=t[Number(q.slice(1,-2))];(h.includes(_)||!M&&!x.includes(_))&&H(U)}else if(q.endsWith("q")){let{bold:_,italic:U}=t[Number(q.slice(1,-2))];_&&(H(A),A=!A),U&&(H(N),N=!N)}else if(k===0){if(q.length>=c)return $(q.slice(0,c),K);c-=q.length,b.lastIndex=K+4+String(t.length).length,f=$(q,K)}y=b.exec(f)}return f}});var Zl,ed,rt,Ds,ip,Ht,td=w(()=>{"use strict";z();se();Hr();xe();D();G();lt();Zl=new Set(["A","T","R","D","-","H","N"]);ed=[pt(),Q];Ht=class extends(ip=L){constructor(e,t,n=[]){super(void 0,t,n,{});S(this,rt);this.safeAppend(e.map(i=>new ue(i,"converter-flag",t,n)))}get type(){return"converter-flags"}afterBuild(){C(this,rt,this.childNodes.map(e=>e.text().trim())),super.afterBuild()}toString(e){return super.toString(e,";")}text(){return super.text(";")}getUnknownFlags(){return new Set(m(this,rt).filter(e=>/\{{3}[^{}]+\}{3}/u.test(e)))}getVariantFlags(){let e=new Set(this.getAttribute("config").variants);return new Set(m(this,rt).filter(t=>e.has(t)))}isInvalidFlag(e,t,n,i){return!!e&&!t.has(e)&&!n.has(e)&&(t.size>0||!i.has(e))}lint(e=this.getAbsoluteIndex(),t){{let n=this.getVariantFlags(),i=this.getUnknownFlags(),s=new Set(m(this,rt).filter(h=>Zl.has(h))),a=m(this,rt).filter(h=>!h).length,l=m(this,rt).length-i.size-a,{lintConfig:p}=v,{computeEditInfo:g,fix:d}=p,u=super.lint(e,t);if(n.size===l||s.size===l)return u;let c="no-ignored",f=p.getSeverity(c,"conversionFlag");if(f){let h=new W(this,e);for(let x=0;x<this.length;x++){let T=this.childNodes[x],b=T.text().trim();if(this.isInvalidFlag(b,n,i,s)){let y=j(T,h,c,"invalid-conversion-flag",f);(g||d)&&(n.size===0&&Zl.has(b.toUpperCase())?y.fix=Bn(y,b):g&&(y.suggestions=[O(y,x&&-1)])),u.push(y)}}}return u}}print(){}};Ds=B(ip),rt=new WeakMap,Ht=P(Ds,0,"ConverterFlagsToken",ed,Ht),R(Ds,1,Ht)});var Ms,rd,Us,sp,nt,nd=w(()=>{"use strict";xe();D();G();lt();Ms=(o,r,e,t)=>{let n=new L(o,e,t);return n.type=`converter-rule-${r}`,n.setAttribute("stage",11),n};rd=[Q];nt=class extends(sp=L){get type(){return"converter-rule"}get variant(){}constructor(r,e=!0,t=v.getConfig(),n=[]){super(void 0,t,n,{});let i=r.indexOf(":"),s=r.slice(0,i).indexOf("=>"),a=s===-1?r.slice(0,i):r.slice(s+2,i);e&&t.variants.includes(a.trim().toLowerCase())?(super.insertAt(new ue(a,"converter-rule-variant",t,n)),super.insertAt(Ms(r.slice(i+1),"to",t,n)),s!==-1&&super.insertAt(Ms(r.slice(0,s),"from",t,n),0)):super.insertAt(Ms(r,"to",t,n))}toString(r){let{childNodes:e,firstChild:t,lastChild:n}=this;return e.length===3?`${t.toString(r)}=>${e[1].toString(r)}:${n.toString(r)}`:super.toString(r,":")}text(){let{childNodes:r,firstChild:e,lastChild:t}=this;return r.length===3?`${e.text()}=>${r[1].text()}:${t.text()}`:super.text(":")}getGaps(r){return r===0&&this.length===3?2:1}print(){}json(r,e,t=this.getAbsoluteIndex()){}};Us=B(sp),nt=P(Us,0,"ConverterRuleToken",rd,nt),R(Us,1,nt)});var id,zs,op,Vt,sd=w(()=>{"use strict";ae();qe();xe();G();td();nd();id=[Q,pe("-{")];Vt=class extends(op=L){get type(){return"converter"}constructor(r,e,t,n=[]){super(void 0,t,n),this.insertAt(new Ht(r,t,n));let[i]=e,s=i.includes(":"),a=new nt(i,s,t,n);(s?a.length===1:e.length===2&&!re(e[1]).trim())?this.insertAt(new nt(e.join(";"),!1,t,n)):this.safeAppend([a,...e.slice(1).map(l=>new nt(l,!0,t,n))])}toString(r){let[e,...t]=this.childNodes;return`-{${e.toString(r)}${e.length>0?"|":""}${t.map(n=>n.toString(r)).join(";")}}-`}text(){let[r,...e]=this.childNodes;return`-{${r.text()}|${Ee(e,";")}}-`}getGaps(r){return r||this.firstChild.length>0?1:0}print(){}};zs=B(op),Vt=P(zs,0,"ConverterToken",id,Vt),R(zs,1,Vt)});var od={};Z(od,{parseConverter:()=>ap});var ap,ad=w(()=>{"use strict";sd();ap=(o,r,e)=>{var l;(l=r.regexConverter)!=null||(r.regexConverter=new RegExp(String.raw`;(?=(?:[^;]*?=>)?\s*(?:${r.variants.join("|")})\s*:|(?:\s|\0\d+[cn]\x7F)*$)`,"iu"));let t=/-\{/gu,n=/-\{|\}-/gu,i=[],s=t,a=s.exec(o);for(;a;){let{0:p,index:g}=a;if(p==="}-"){let d=i.pop(),{length:u}=e,c=o.slice(d.index+2,g),f=c.indexOf("|"),[h,x]=f===-1?[[],c]:[c.slice(0,f).split(";"),c.slice(f+1)],T=x.replace(/(&[#a-z\d]+);/giu,"$1"),b=T.split(r.regexConverter).map(y=>y.replace(/\x01/gu,";"));new Vt(h,b,r,e),o=`${o.slice(0,d.index)}\0${u}v${o.slice(g+2)}`,i.length===0&&(s=t),s.lastIndex=d.index+3+String(u).length}else i.push(a),s=n,s.lastIndex=g+2;a=s.exec(o)}return o}});var li={};Z(li,{Token:()=>L});var lp,mn,Ce,ee,te,Cr,wr,hn,Er,J,ld,dd,gd,pd,ud,fd,cd,md,hd,bd,xd,yd,Gs,L,G=w(()=>{"use strict";ae();z();Se();D();No();Ro();lp=["category","html-attr#id,ext-attr#id,table-attr#id"],Gs=class Gs extends St{constructor(e,t=v.getConfig(),n=[],i){super();S(this,J);S(this,mn,"plain");S(this,Ce,0);S(this,ee);S(this,te);S(this,Cr);S(this,wr,!1);S(this,hn);S(this,Er);typeof e=="string"&&this.insertAt(e),C(this,ee,t),C(this,te,n),n.push(this)}get type(){return m(this,mn)}set type(e){C(this,mn,e)}get pageName(){return m(this.getRootNode(),Er)}set pageName(e){if(e){let t=this.normalizeTitle(e,0,{temporary:!0,page:""});C(this,Er,t.valid?t.title:void 0)}else C(this,Er,e===""?"":void 0)}parseOnce(e=m(this,Ce),t=!1,n){if(e<m(this,Ce)||this.length!==1||!this.isPlain())return this;if(m(this,Ce)>=11)return this;switch(e){case 0:if(this.type==="root"){m(this,te).pop();let i=I(this,J,ld).call(this);t&&(t=!i)}C(this,Cr,t),I(this,J,dd).call(this,t);break;case 1:I(this,J,gd).call(this);break;case 2:I(this,J,pd).call(this);break;case 3:I(this,J,ud).call(this);break;case 4:I(this,J,fd).call(this);break;case 5:I(this,J,cd).call(this,n);break;case 6:I(this,J,md).call(this,n);break;case 7:I(this,J,hd).call(this);break;case 8:I(this,J,bd).call(this);break;case 9:I(this,J,xd).call(this);break;case 10:I(this,J,yd).call(this)}if(this.type==="root")for(let i of m(this,te))i==null||i.parseOnce(e,t,n);return En(this,Ce)._++,this}buildFromStr(e,t){let n=e.split(/[\0\x7F]/u).map((i,s)=>{if(s%2===0)return i&&new Ur(i);let a=Number(i.slice(0,-1));return m(this,te)[a]}).filter(i=>i!=="");return t===0?n.map(String).join(""):t===1?Ee(n):n}build(){C(this,Ce,11);let{length:e,firstChild:t}=this,n=t==null?void 0:t.toString();if(e===1&&t.type==="text"&&n.includes("\0")&&(_n(this,0,1,this.buildFromStr(n)),this.type==="root"))for(let i of m(this,te))i==null||i.build()}afterBuild(){if(this.type==="root")for(let e of m(this,te))e==null||e.afterBuild();C(this,wr,!0)}parse(e=11,t,n){for(e=Math.min(e,11);m(this,Ce)<e;)this.parseOnce(m(this,Ce),t,n);return e&&(this.build(),this.afterBuild()),this}isPlain(){return this.constructor===Gs}getAttribute(e){var t;switch(e){case"config":return m(this,ee);case"include":return(t=m(this,Cr))!=null?t:!!m(this.getRootNode(),Cr);case"accum":return m(this,te);case"built":return m(this,wr);case"stage":return m(this,Ce);default:return super.getAttribute(e)}}setAttribute(e,t){e==="stage"?(m(this,Ce)===0&&this.type==="root"&&m(this,te).shift(),C(this,Ce,t)):super.setAttribute(e,t)}insertAt(e,t=this.length){let n=typeof e=="string"?new Ur(e):e,{length:i}=this;t+=t<0?i:0,super.insertAt(n,t);let{type:s}=n;return s==="root"&&(n.type="plain"),n}normalizeTitle(e,t=0,n){return v.normalizeTitle(e,t,this.getAttribute("include"),m(this,ee),V({page:this.pageName},n))}inTableAttrs(){var e;return this.isInside("table-attrs")&&((e=this.closest("table-attrs,arg,parameter"))!=null&&e.is("table-attrs")?2:1)}inHtmlAttrs(){return this.isInside("html-attrs")?2:this.inTableAttrs()}lint(e=this.getAbsoluteIndex(),t){var n;{let{lintConfig:i}=v,{computeEditInfo:s,fix:a,ignoreDisables:l,configurationComment:p}=i,g=super.lint(e,t);if(this.type==="root"){let d=new Map,u="no-duplicate",c=["category","id"].map(x=>i.getSeverity(u,x)),f=this.toString(),h=lp.filter((x,T)=>c[T]).join();if(h){for(let x of this.querySelectorAll(h)){let T;if(x.is("category"))T=x.name;else{let b=x.getValue();b&&b!==!0&&(T=`#${b}`)}if(T){let b=d.get(T);b?b.add(x):d.set(T,new Set([x]))}}for(let[x,T]of d)if(T.size>1&&!x.startsWith("#mw-customcollapsible-")){let b=!x.startsWith("#"),y=`duplicate-${b?"category":"id"}`,k=c[b?0:1];g.push(...[...T].map(A=>{let N=F(A,{start:A.getAbsoluteIndex()},u,y,k);return s&&b&&(N.suggestions=[O(N)]),N}))}}if(!l){let x=new RegExp(String.raw`<!--\s*${p}-(disable(?:(?:-next)?-line)?|enable)(\s[\sa-z,-]*)?-->`,"gu"),T=[],b=x.exec(f);for(;b;){let{1:y,index:k}=b,A=(n=b[2])==null?void 0:n.trim(),N;(y==="disable-line"||y==="disable-next-line")&&(N=this.posFromIndex(k).top+(y==="disable-line"?0:1)),T.push({line:N,from:y==="disable"?x.lastIndex:void 0,to:y==="enable"?x.lastIndex:void 0,rules:A?new Set(A.split(",").map(E=>E.trim())):void 0}),b=x.exec(f)}g=g.filter(({rule:y,startLine:k,startIndex:A})=>{let N={pos:0};for(let{line:E,from:$,to:H,rules:q}of T){if(E&&E>k+1)break;if(q&&!q.has(y))continue;if(E===k)return!1;$<=A&&$>N.pos?(N.pos=$,N.type="from"):H<=A&&H>N.pos&&(N.pos=H,N.type="to")}return N.type!=="from"})}if(a&&g.some(({fix:x})=>x)){let x=g.map(({fix:y})=>y).filter(y=>y!==void 0).sort(({range:[y,k]},{range:[A,N]})=>k===N?A-y:N-k),T=1/0,b=f;for(let{range:[y,k],text:A}of x)k<=T&&(b=b.slice(0,y)+A+b.slice(k),T=y);Object.assign(g,{output:b})}if(!s)for(let x of g)delete x.fix,delete x.suggestions}return g}}toString(e,t){return e?super.toString(!0,t):je(m(this,hn),()=>super.toString(!1,t),n=>{let i=this.getRootNode();i.type==="root"&&m(i,wr)&&C(this,hn,n)})}};mn=new WeakMap,Ce=new WeakMap,ee=new WeakMap,te=new WeakMap,Cr=new WeakMap,wr=new WeakMap,hn=new WeakMap,Er=new WeakMap,J=new WeakSet,ld=function(){let{parseRedirect:e}=(Uo(),X(Mo)),t=this.firstChild.toString(),n=e(t,m(this,ee),m(this,te));return n!==!1&&this.setText(n),!!n},dd=function(e){let{parseCommentAndExt:t}=(Kr(),X(ul));this.setText(t(this.firstChild.toString(),m(this,ee),m(this,te),e))},gd=function(){let{parseBraces:e}=(Yn(),X(Ra)),t=this.type==="root"?this.firstChild.toString():`\0${this.firstChild.toString()}`,n=e(t,m(this,ee),m(this,te));this.setText(this.type==="root"?n:n.slice(1))},pd=function(){if(m(this,ee).excludes.includes("html"))return;let{parseHtml:e}=(hl(),X(ml));this.setText(e(this.firstChild.toString(),m(this,ee),m(this,te)))},ud=function(){if(m(this,ee).excludes.includes("table"))return;let{parseTable:e}=(Ll(),X(El));this.setText(e(this,m(this,ee),m(this,te)))},fd=function(){if(m(this,ee).excludes.includes("hr"))return;let{parseHrAndDoubleUnderscore:e}=(Pl(),X(Rl));this.setText(e(this,m(this,ee),m(this,te)))},cd=function(e){let{parseLinks:t}=(Dl(),X(Wl));this.setText(t(this.firstChild.toString(),m(this,ee),m(this,te),this.pageName,e))},md=function(e){let{parseQuotes:t}=(qs(),X(jl)),n=this.firstChild.toString().split(`
28
- `);for(let i=0;i<n.length;i++)n[i]=t(n[i],m(this,ee),m(this,te),e);this.setText(n.join(`
29
- `))},hd=function(){let{parseExternalLinks:e}=(Ws(),X(Ol));this.setText(e(this.firstChild.toString(),m(this,ee),m(this,te)))},bd=function(){let{parseMagicLinks:e}=(Vl(),X(Hl));this.setText(e(this.firstChild.toString(),m(this,ee),m(this,te)))},xd=function(){if(m(this,ee).excludes.includes("list"))return;let{parseList:e}=(Yl(),X(Kl)),{firstChild:t,type:n,name:i}=this,s=t.toString().split(`
15
+ `)||(o=`${o.slice(0,E)}\0${e.length}h${o.slice(k)}`,c=E+4+String(e.length).length,new Je(be[1].length,be.slice(2),t,e)))}}else if(y==="|"||K)c=k+1,a(o,$,q,k),y==="|"&&$.push([]),A.pos=c,A.findEqual=y==="|",i.push(A);else if(y.startsWith("}}")){let U=y.slice(0,Math.min(N.length,3)),M=N.length-U.length,{length:be}=e;c=k+U.length,a(o,$,q,k);let Kt=!1,xt="t";if(U.length===3){let Y=$.map($r=>$r.join("=")),yt=Y.length>1&&re(Y[1]).trim();new _t(Y,t,e),yt&&yt.endsWith(":")&&n.includes(yt.slice(0,-1).toLowerCase())&&(xt="s")}else try{new ht($[0][0],$.slice(1),t,e),xt=Ma($[0][0])}catch(Y){if(!(Y instanceof SyntaxError&&Y.message==="Invalid template name"))throw Y;Kt=!0}Kt||(o=`${o.slice(0,E+M)}\0${be}${xt}${o.slice(c)}`,c=E+M+3+String(be).length,M>1?i.push({0:N.slice(0,M),index:E,pos:E+M,parts:[[]]}):M===1&&o[E-1]==="-"&&i.push({0:"-{",index:E-1,pos:E+1,parts:[[]]}))}else c=k+y.length,y.startsWith("{")&&(f.pos=c,f.parts=[[]]),i.push(..."0"in A?[A]:[],f);let _=i[i.length-1];if(g&&p+o.length<c)for(g=!1;(b=_==null?void 0:_[0])!=null&&b.startsWith("{");)i.pop(),_=i[i.length-1];d=Da(r+(g?_a:"")+(_?`|${Ng[_[0][0]]}${_.findEqual?"|=":""}`:"")),d.lastIndex=c,f=d.exec(o)}return ke(o,s)}});var Ga={};Z(Ga,{InputboxToken:()=>Zi});var Zi,Ha=w(()=>{"use strict";Zr();ei();Ui();Zi=class extends Yr{constructor(t,e,r,n,i=[]){let s=Symbol("InputboxToken"),a=n.excludes.includes("heading")?n:ge(V({},n),{excludes:[...n.excludes,"heading"]}),{length:l}=i;i.push(s),r&&(r=Pt(r,a,i,e)),r&&(r=sn(r,a,i)),i.splice(l,1),super(t,e,r,a,i,{})}}});var ti={};Z(ti,{NestedToken:()=>es});var $g,Ig,on,cr,es,ri=w(()=>{"use strict";z();oe();Zr();ei();D();G();ts();wt();$g=new Set(["comment","include","arg","template","magic-word"]),Ig=[!1,!0].map(o=>{let t=o?"includeonly":"noinclude";return new RegExp(String.raw`^(?:<${t}(?:\s[^>]*)?/?>|</${t}\s*>)$`,"iu")}),es=class extends L{constructor(e,r,n,i,s=[]){if(typeof r=="boolean"){let a=Symbol("NestedToken"),{length:l}=s;s.push(a),e&&(e=Pt(e,i,s,r)),e&&(e=sn(e,i,s)),s.splice(l,1)}else e&&(e=e.replace(r,(a,l,p,g,d)=>{let f=`\0${s.length+1}e`;return new Xe(l,p,g,d,i,!1,s),f}));e&&(e=e.replace(/(^|\0\d+.\x7F)([^\0]+)(?=$|\0\d+.\x7F)/gu,(a,l,p)=>(new de(p,i,s),`${l}\0${s.length}n`)));super(e,i,s);S(this,on);S(this,cr);C(this,on,[...n]),C(this,cr,r)}get type(){return"ext-inner"}lint(e=this.getAbsoluteIndex(),r){{let n=super.lint(e,r),i="no-ignored",{lintConfig:s}=v,a=s.getSeverity(i,this.name);if(!a)return n;let l=new W(this,e),p=typeof m(this,cr)=="boolean"?Ig[m(this,cr)?1:0]:/^<!--[\s\S]*-->$/u;return[...n,...this.childNodes.filter(g=>{let{type:d,name:f}=g;if(d==="ext")return!m(this,on).includes(f);if($g.has(d))return!1;let c=g.toString().trim();return c&&!p.test(c)}).map(g=>{let d=j(g,l,i,v.msg("invalid-content",this.name),a);return s.computeEditInfo&&(d.suggestions=[O(d),jn(d,g.toString())]),d})]}}};on=new WeakMap,cr=new WeakMap});function rs(o,t,e,r,n){t=re(t).trim();let i=t.replace(o==="link"?/\0\d+[tq]\x7F/gu:/\0\d+t\x7F/gu,"").trim();switch(o){case"width":return!i&&!!t||/^(?:\d+x?|\d*x\d+)(?:\s*px)?$/u.test(i);case"link":{let s=r==="gallery-image";if(i){if(Fg(e.protocol).test(i))return Rg(e.protocol).test(i)?t:s;i.startsWith("[[")&&i.endsWith("]]")&&(i=i.slice(2,-2))}else return t;let a=v.normalizeTitle(i,0,!1,e,{halfParsed:n,decode:!0,selfLink:!0,page:""});return a.valid?a:s}case"lang":return(r==="svg"||r==="svgz")&&!/[^a-z\d-]/u.test(i);case"alt":case"class":case"manualthumb":return!0;case"page":return(r==="djvu"||r==="djv"||r==="pdf")&&Number(i)>0;default:return!!i&&!isNaN(i)}}var Fg,Rg,Pg,Bg,Va,Ne,ni,Qa,ns,jg,Wt,Ja=w(()=>{"use strict";ze();ae();z();Or();Se();xe();D();G();Fg=Be(o=>new RegExp(String.raw`^(?:${o}|//|\0\d+m\x7F)`,"iu")),Rg=Be(o=>new RegExp(String.raw`^(?:(?:${o}|//)${De}|\0\d+m\x7F)${Me}$`,"iu")),Pg=Be(o=>new RegExp(String.raw`^(\s*(?!\s))${o.replace("$1","(.*)")}${o.endsWith("$1")?`(?=$|
16
+ )`:""}(\s*)$`,"u")),Bg=o=>{if(o)o.startsWith("//")&&(o=`https:${o}`);else return o;return new URL(o).href};Va=[Q];Wt=class extends(jg=L){constructor(e,r,n,i,s){var t=(...$m)=>(super(...$m),S(this,ni),S(this,Ne,""),this);let a,l=Object.entries(i.img).map(([g,d])=>[g,d,Pg(g)]),p=l.find(([,g,d])=>(a=d.exec(e),a&&(a.length!==4||rs(g,a[2],i,g==="link"?n:r,!0)!==!1)));if(p&&a){a.length===3?(t(void 0,i,s),C(this,Ne,e)):(t(a[2],i,s,{}),C(this,Ne,a[1]+p[0]+a[3])),this.setAttribute("name",p[1]),p[1]==="alt"&&this.setAttribute("stage",10);return}t(e,i.excludes.includes("list")?i:ge(V({},i),{excludes:[...i.excludes,"list"]}),s),this.setAttribute("name","caption"),this.setAttribute("stage",7)}get type(){return"image-parameter"}get thumb(){return this.name==="manualthumb"?this.normalizeTitle(`File:${super.text().trim()}`,6,{page:""}):void 0}get link(){{if(this.name!=="link")return;let e=super.text().trim();return ne.run(()=>{var s;let r=this.getAttribute("config"),n=new L(e,r);if(n.parseOnce(0,this.getAttribute("include")).parseOnce(),/^\0\d+m\x7F/u.test(n.firstChild.toString()))return e;let i=rs("link",e,r,(s=this.parentNode)==null?void 0:s.type);return i===!0?void 0:i},v)}}afterBuild(){var e;(e=this.parentNode)!=null&&e.is("gallery-image")&&!mo.has(this.name)&&this.setAttribute("name","invalid"),super.afterBuild()}toString(e){return m(this,Ne)?m(this,Ne).replace("$1",super.toString(e)):super.toString(e)}text(){return m(this,Ne)?m(this,Ne).replace("$1",super.text()).trim():super.text().trim()}isPlain(){return this.name==="caption"||this.name==="alt"}getAttribute(e){return e==="invalid"?this.name==="invalid":e==="padding"?Math.max(0,m(this,Ne).indexOf("$1")):super.getAttribute(e)}lint(e=this.getAbsoluteIndex(),r){var n;{let i=super.lint(e,r),{lintConfig:s}=v,{computeEditInfo:a,fix:l}=s,{link:p,name:g}=this,d=g==="width"&&this.getValue();if(g==="invalid"||d&&d.endsWith("px")){let f="invalid-gallery",c=s.getSeverity(f,"parameter");if(c){let u=F(this,{start:e},f,"invalid-image-parameter",c);(a||l)&&(u.fix=d?O(u,0,d):O(u,-1)),i.push(u)}}else if(g==="link"){if(p===void 0){let f="invalid-gallery",c=s.getSeverity(f,"link");if(c){let u=F(this,{start:e},f,"invalid-gallery-link",c);if(a){let x=super.toString(),h=x.indexOf("|"),T=x.slice(0,h).trim();h!==-1&&!/[<{]/u.test(T)&&typeof rs("link",T,this.getAttribute("config"),(n=this.parentNode)==null?void 0:n.type)=="string"&&(u.suggestions=[ot(e+this.getRelativeIndex(0)+h)])}i.push(u)}}else if(typeof p=="string"){let f="invalid-url",c=s.getSeverity(f);if(c&&!this.querySelector("magic-word"))try{Bg(p)}catch(u){i.push(F(this,{start:e},f,"invalid-url",c))}}else if(p.encoded){let f="url-encoding",c=s.getSeverity(f,"file");if(c){let u=F(this,{start:e},f,"unnecessary-encoding",c);(a||l)&&(u.fix=Pn(u,this)),i.push(u)}}}else if(g==="manualthumb"){let f="invalid-gallery",c=s.getSeverity(f,"thumb");if(c&&!this.querySelector("arg,magic-word,template")){let{valid:u,ns:x,extension:h}=this.thumb;(!u||x!==6||!jr.has(h))&&i.push(F(this,{start:e},f,"invalid-thumb",c))}}return i}}getValue(){return this.name==="invalid"?this.text():I(this,ni,Qa).call(this)||super.text()}print(){}};ns=B(jg),Ne=new WeakMap,ni=new WeakSet,Qa=function(){return m(this,Ne)&&!m(this,Ne).includes("$1")},Wt=P(ns,0,"ImageParameterToken",Va,Wt),R(ns,1,Wt)});var Xa,Og,qg,Ka,Ya,_g,Za,mr,is=w(()=>{"use strict";z();Or();oe();D();lr();Ja();Xa=new Map([["manualthumb","Thumb"],["frameless","Frameless"],["framed","Frame"],["thumbnail","Thumb"]]),Og=new Set(["arg"]),qg=new Set(["template","magic-word"]),Ka=new Set(["left","right","center","none"]),Ya=new Set(["baseline","sub","super","top","text-top","middle","bottom","text-bottom"]),_g=o=>{if(o===void 0)return[];let t=/-\{|\}-|\|/gu,e=[],r=t.exec(o),n=0,i=0;for(;r;){let{0:s,index:a}=r;s!=="|"?n+=s==="-{"?1:-1:n===0&&(e.push(o.slice(i,a)),{lastIndex:i}=t),r=t.exec(o)}return e.push(o.slice(i)),e},Za=(o,t)=>o.filter(({childNodes:e})=>!e.some(r=>r.text().trim()&&t.has(r.type))),mr=class extends ye{get type(){return"file"}get extension(){}constructor(t,e,r,n=[],i="|",s){super(t,void 0,r,n,i);let{extension:a}=this.getTitle(!0,!0);this.safeAppend(_g(e).map(l=>new Wt(l,a,s,r,n)))}lint(t=this.getAbsoluteIndex(),e){var r;{let n=super.lint(t,e),i=Za(this.getAllArgs(),Og),s=[...new Set(i.map(({name:E})=>E))],a=s.filter(E=>Xa.has(E)),l=s.filter(E=>Ka.has(E)),p=s.filter(E=>Ya.has(E)),[g]=a,d=g==="framed"||g==="manualthumb",f=new W(this,t),{lintConfig:c}=v,{computeEditInfo:u,fix:x}=c,{ns:h,extension:T}=this.getAttribute("title"),{firstChild:b}=this,y="nested-link",k=c.getSeverity(y,"file");if(k&&jr.has(T)&&this.isInside("ext-link-text")&&((r=this.getValue("link"))==null?void 0:r.trim())!==""){let E=F(this,f,y,"link-in-extlink",k);if(u||x){let $=this.getArg("link");if($){let H=t+$.getRelativeIndex();E.fix={desc:v.msg("delink"),range:[H,H+$.toString().length],text:"link="}}else E.fix=tr(E.endIndex-2,"delink","|link=")}n.push(E)}if(y="invalid-gallery",k=c.getSeverity(y,"extension"),k&&h===6&&!T&&!b.querySelector("arg,magic-word,template")&&n.push(F(this,f,y,"missing-extension",k)),k=c.getSeverity(y,"parameter"),k&&d)for(let E of i.filter(({name:$})=>$==="width")){let $=j(E,f,y,"invalid-image-parameter",k);(u||x)&&($.fix=O($,-1)),n.push($)}if(i.length===s.length&&a.length<2&&l.length<2&&p.length<2)return n;y="no-duplicate";let A=["unknownImageParameter","imageParameter"].map(E=>c.getSeverity(y,E)),N=(E,$,H,q=!0)=>E.map(K=>{if(k=A[Number(typeof q=="function"?q(K):q)],!k)return!1;let _=j(K,f,y,v.msg(`${$}-image-parameter`,H),k);return u&&(_.suggestions=[O(_,-1)]),_}).filter(K=>K!==!1);for(let E of s){if(E==="invalid"||E==="width"&&d)continue;let $=E==="caption",H=i.filter(({name:q})=>q===E);if($&&(H=[...H.slice(0,-1).filter(q=>q.text()),...H.slice(-1)]),H.length>1){let q=!$||!T||jr.has(T);if($&&q){let K=Za(H,qg);q=K.length>1&&(_=>K.includes(_))}Array.prototype.push.apply(n,N(H,"duplicate",E,q))}}return a.length>1&&Array.prototype.push.apply(n,N(i.filter(({name:E})=>Xa.has(E)),"conflicting","frame")),l.length>1&&Array.prototype.push.apply(n,N(i.filter(({name:E})=>Ka.has(E)),"conflicting","horizontal-alignment")),p.length>1&&Array.prototype.push.apply(n,N(i.filter(({name:E})=>Ya.has(E)),"conflicting","vertical-alignment")),n}}getAllArgs(){return this.childNodes.slice(1)}getArgs(t){return this.getAllArgs().filter(({name:e})=>t===e)}getArg(t){{let e=this.getArgs(t);return e[t==="manualthumb"?0:e.length-1]}}getValue(t){var e;return(e=this.getArg(t))==null?void 0:e.getValue()}json(t,e,r=this.getAbsoluteIndex()){}}});var el,an,os,ss,Wg,Ke,as=w(()=>{"use strict";z();qe();D();G();is();el=[pe("")];Ke=class extends(Wg=mr){constructor(e,r,n,i,s=[]){let a;if(n!==void 0){let{length:p}=s;a=new L(n,i,s);for(let g=0;g<10;g++)a.parseOnce();s.splice(p,1)}let l=`${e}-image`;super(r,a==null?void 0:a.firstChild.toString(),i,s,void 0,l);S(this,an);ce(this,"privateType","imagemap-image");this.setAttribute("bracket",!1),this.privateType=l,this.seal("privateType",!0)}get type(){return this.privateType}getTitle(e){let r=this.type==="imagemap-image";return this.normalizeTitle(this.firstChild.toString(),r?0:6,{halfParsed:!0,temporary:e,decode:!r,page:""})}lint(e=this.getAbsoluteIndex(),r){{let n=super.lint(e,r),i="invalid-gallery",{lintConfig:s}=v,a=s.getSeverity(i,"image");if(a&&I(this,an,os).call(this)){let l=F(this,{start:e},i,"invalid-gallery",a);s.computeEditInfo&&(l.suggestions=[tr(e,"prefix","File:")]),n.push(l)}return n}}getAttribute(e){return e==="invalid"?I(this,an,os).call(this):super.getAttribute(e)}};ss=B(Wg),an=new WeakSet,os=function(){return this.getAttribute("title").ns!==6},Ke=P(ss,0,"GalleryImageToken",el,Ke),R(ss,1,Ke)});var Dt,ls=w(()=>{"use strict";wt();Dt=class extends de{}});var rl={};Z(rl,{GalleryToken:()=>ds});var ln,tl,Dg,ds,nl=w(()=>{"use strict";z();D();Xn();as();ls();ds=class extends mt{constructor(e,r,n=[]){var i;super(void 0,r,n,{});S(this,ln);for(let s of(i=e==null?void 0:e.split(`
17
+ `))!=null?i:[]){let a=/^([^|]+)(?:\|(.*))?/u.exec(s);if(!a){super.insertAt(s.trim()?new Dt(s,r,n):s);continue}let[,l,p]=a;I(this,ln,tl).call(this,l)?super.insertAt(new Ke("gallery",l,p,r,n)):super.insertAt(new Dt(s,r,n))}}get widths(){}get heights(){}lint(e=this.getAbsoluteIndex(),r){{let{top:n,left:i}=this.getRootNode().posFromIndex(e),s=[],a="no-ignored",{lintConfig:l}=v,p=["Image","NoImage","Comment"].map(g=>l.getSeverity(a,`gallery${g}`));for(let g=0;g<this.length;g++){let d=this.childNodes[g],f=d.toString(),{length:c}=f,u=f.trim(),{type:x}=d,h=n+g,T=g?0:i;if(d.setAttribute("aIndex",e),x==="noinclude"&&u&&!/^<!--.*-->$/u.test(u)){let[b]=p;if(u.startsWith("|")?[,b]=p:(u.startsWith("<!--")||u.endsWith("-->"))&&([,,b]=p),b){let y=e+c,k={rule:a,message:v.msg("invalid-content","gallery"),severity:b,startIndex:e,endIndex:y,startLine:h,endLine:h,startCol:T,endCol:T+c};l.computeEditInfo&&(k.suggestions=[O(k),jn(k,f)]),s.push(k)}}else if(x!=="noinclude"&&x!=="text"){let b=d.lint(e,r);b.length>0&&Array.prototype.push.apply(s,b)}e+=c+1}return s}}json(e,r,n=this.getAbsoluteIndex()){}};ln=new WeakSet,tl=function(e){return this.normalizeTitle(e,6,{halfParsed:!0,temporary:!0,decode:!0,page:""}).valid},Dg=function(e){}});var hr,gs=w(()=>{"use strict";ze();z();D();lr();hr=class extends ye{get type(){return"link"}get innerText(){return this.length>1?this.lastChild.text():St(this.firstChild.text().replace(/^\s*:?/u,""))}lint(t=this.getAbsoluteIndex(),e){{let r=super.lint(t,e),n="nested-link",{lintConfig:i}=v,s=i.getSeverity(n);if(s&&this.isInside("ext-link-text")){let a=F(this,{start:t},n,"link-in-extlink",s);(i.computeEditInfo||i.fix)&&(a.fix=me(a,"delink",this.innerText)),r.push(a)}return r}}}});var Mg,Ug,dn,gn,ps,Ye,ii=w(()=>{"use strict";z();ae();oe();D();G();Mg=String.raw`(?:[${Ie}\t]|&nbsp;|&#0*160;|&#[xX]0*[aA]0;)`,Ug=new RegExp(`${Mg}+`,"gu"),Ye=class extends L{constructor(e,r="free-ext-link",n=v.getConfig(),i){super(e,n,i,{});S(this,gn);S(this,dn);C(this,dn,r)}get type(){return m(this,dn)}get innerText(){let e=new Map([["!","|"],["=","="]]),r=Ee(this.childNodes.map(n=>{let{type:i}=n,s=String(n.name);return i==="magic-word"&&e.has(s)?e.get(s):n}));return this.type==="magic-link"&&(r=r.replace(Ug," ")),r}get link(){let{innerText:e}=this;return this.type==="magic-link"?e.startsWith("ISBN")?`ISBN ${e.slice(5).replace(/[- ]/gu,"").replace(/x$/u,"X")}`:e:fo(e).replace(/\n/gu,"%0A")}lint(e=this.getAbsoluteIndex(),r){{let n=super.lint(e,r),i=new W(this,e),{lintConfig:s}=v,{type:a,childNodes:l}=this;if(a==="magic-link"){let f="invalid-isbn",c=s.getSeverity(f);return c&&I(this,gn,ps).call(this)&&n.push(F(this,i,f,"invalid-isbn",c)),n}let p="invalid-url",g=s.getSeverity(p);if(g&&!this.querySelector("magic-word"))try{this.getUrl()}catch(f){n.push(F(this,i,p,"invalid-url",g))}let d=a==="ext-link-url";if(p="unterminated-url",g=s.getSeverity(p,d?"pipe":"punctuation"),g){let f=d?/\|/u:/[,;。:!?()]+/u,c=l.find(u=>u.type==="text"&&f.test(u.data));if(c){let{data:u}=c,x=j(c,i,p,v.msg("in-url",d?'"|"':"full-width-punctuation"),g);if(s.computeEditInfo){let{index:h,0:T}=f.exec(u),b=x.startIndex+h;x.suggestions=d?[ot(b,1)]:[ot(b),{desc:v.msg("encode"),range:[b,b+T.length],text:encodeURI(T)}]}n.push(x)}}return n}}getUrl(e){this.lspError("MagicLinkToken.getUrl")}getAttribute(e){return e==="invalid"?I(this,gn,ps).call(this):super.getAttribute(e)}};dn=new WeakMap,gn=new WeakSet,ps=function(){if(this.type==="magic-link"){let{link:e}=this;if(e.startsWith("ISBN")){let r=[...e.slice(5)].map(n=>n==="X"?10:Number(n));return r.length===10?r.reduce((n,i,s)=>n+i*(10-s),0)%11!==0:r.length===13&&(r[12]===10||r.reduce((n,i,s)=>n+i*(s%2?3:1),0)%10!==0)}}return!1}});var il,Mt,us,zg,Ze,fs=w(()=>{"use strict";z();qe();D();G();ii();il=[pe("[")];Ze=class extends(zg=L){constructor(e,r="",n="",i,s=[]){super(void 0,i,s,{});S(this,Mt);let a=e&&/^\0\d+f\x7F$/u.test(e)?s[Number(e.slice(1,-2))]:new Ye(e,"ext-link-url",i,s);if(this.insertAt(a),C(this,Mt,r),n){let l=new L(n,i,s,{});l.type="ext-link-text",l.setAttribute("stage",10),this.insertAt(l)}}get type(){return"ext-link"}toString(e){return this.length===1?`[${super.toString(e)}${m(this,Mt)}]`:`[${super.toString(e,m(this,Mt))}]`}text(){return`[${super.text(" ")}]`}getGaps(){return m(this,Mt).length}lint(e=this.getAbsoluteIndex(),r){{let n=super.lint(e,r),i="var-anchor",s=v.lintConfig.getSeverity(i,"extLink");return s&&this.length===1&&this.isInside("heading-title")&&n.push(F(this,{start:e},i,"variable-anchor",s)),n}}print(){}};us=B(zg),Mt=new WeakMap,Ze=P(us,0,"ExtLinkToken",il,Ze),R(us,1,Ze)});var pn,sl=w(()=>{"use strict";G();wt();gs();fs();pn=class extends L{get type(){return"imagemap-link"}constructor(t,e,r,n,i=[]){super(void 0,n,i),this.append(t,e.length===2?new hr(...e,n,i):new Ze(...e,n,i),new de(r,n,i))}}});var ol={};Z(ol,{ImagemapToken:()=>cs});var cs,al=w(()=>{"use strict";z();Se();oe();D();Xn();ls();as();sl();cs=class extends mt{get image(){return this.childNodes.find(Yn("imagemap-image"))}constructor(t,e=v.getConfig(),r=[]){if(super(void 0,e,r,{}),!t)return;let n=t.split(`
18
+ `),i=new Set(e.protocol.split("|")),s=!0,a=!1;for(let l of n){let p=l.trim();if(!(a||!p||p.startsWith("#"))){if(s){let g=l.indexOf("|"),d=g===-1?l:l.slice(0,g),f=this.normalizeTitle(d,0,{halfParsed:!0,temporary:!0,page:""});if(f.valid&&f.ns===6){let c=new Ke("imagemap",d,g===-1?void 0:l.slice(g+1),e,r);super.insertAt(c),s=!1;continue}else a=!0}else if(l.trim().split(/[\t ]/u,1)[0]==="desc"){super.insertAt(l);continue}else if(l.includes("[")){let g=l.indexOf("["),d=l.slice(g),f=/^\[\[([^|]+)(?:\|([^\]]*))?\]\][\w\s]*$/u.exec(d);if(f){if(this.normalizeTitle(f[1],0,{halfParsed:!0,temporary:!0,selfLink:!0,page:""}).valid){super.insertAt(new pn(l.slice(0,g),f.slice(1),d.slice(d.indexOf("]]")+2),e,r));continue}}else if(d.startsWith("[//")||i.has(d.slice(1,d.indexOf(":")+1))||i.has(d.slice(1,d.indexOf("//")+2))){let c=/^\[([^\]\s]+)(?:(\s+(?!\s))([^\]]*))?\][\w\s]*$/u.exec(d);if(c){super.insertAt(new pn(l.slice(0,g),c.slice(1),d.slice(d.indexOf("]")+1),e,r));continue}}}}super.insertAt(new Dt(l,e,r))}}lint(t=this.getAbsoluteIndex(),e){{let r=super.lint(t,e),n=new W(this,t),{childNodes:i,image:s}=this,a="invalid-imagemap",{lintConfig:l}=v,p=l.getSeverity(a,s?"link":"image");return p&&(s?Array.prototype.push.apply(r,i.filter(g=>{let d=g.toString().trim();return g.is("noinclude")&&d&&!d.startsWith("#")}).map(g=>{let d=j(g,n,a,"invalid-imagemap-link",p);return l.computeEditInfo&&(d.suggestions=[O(d,-1),me(d,"comment","# ")]),d})):r.push(F(this,n,a,"imagemap-without-image",p))),r}}getAttribute(t){return t==="invalid"?!this.image:super.getAttribute(t)}}});var ll,ms,Gg,et,hs=w(()=>{"use strict";z();at();qe();D();pt();ll=[ve(!1),pe("<!--")];et=class extends(Gg=le){constructor(e,r,n,i){super(e,n,i);ce(this,"closed");this.closed=r}get type(){return"comment"}lint(e=this.getAbsoluteIndex()){{if(this.closed)return[];let r="unclosed-comment",{lintConfig:n}=v,i=n.getSeverity(r);if(!i)return[];let s=F(this,{start:e},r,"unclosed-comment",i);return n.computeEditInfo&&(s.suggestions=[Le(s.endIndex,"-->")]),[s]}}toString(e){return e?"":`<!--${this.innerText}${this.closed?"-->":""}`}print(){}};ms=B(Gg),et=P(ms,0,"CommentToken",ll,et),R(ms,1,et)});var dl={};Z(dl,{CommentedToken:()=>bs});var bs,gl=w(()=>{"use strict";G();hs();bs=class extends L{get type(){return"ext-inner"}constructor(t,e,r=[]){if(super(void 0,e,r,{AstText:":",CommentToken:":"}),t){let n=t.indexOf("<!--"),i=n!==-1&&t.indexOf("-->",n+4),s=0;for(;i!==!1&&i!==-1;)n>s&&this.insertAt(t.slice(s,n)),this.insertAt(new et(t.slice(n+4,i),!0,e,r)),s=i+3,n=t.indexOf("<!--",s),i=n!==-1&&t.indexOf("-->",n+4);s<t.length&&this.insertAt(t.slice(s))}}lint(t=this.getAbsoluteIndex()){return super.lint(t,new RegExp(String.raw`<\s*(?:\/\s*)?(${this.name})\b`,"giu"))}}});var ul={};Z(ul,{CategorytreeToken:()=>br});var pl,xs,Hg,br,fl=w(()=>{"use strict";z();qe();D();lr();pl=[pe("")];br=class extends(Hg=ye){get type(){return"ext-inner"}constructor(t,e,r,n=[]){super(t,e,r,n),this.setAttribute("bracket",!1)}getTitle(){let t=this.firstChild.toString().trim(),e={halfParsed:!0},r=this.normalizeTitle(t,14,e);return r.valid&&r.ns===14?r:this.normalizeTitle(`Category:${t}`,0,e)}lint(t=this.getAbsoluteIndex()){{let e="no-ignored",r=v.lintConfig.getSeverity(e,"categorytree");if(r){let{link:n}=this;if(!n.valid||n.ns!==14)return[F(this,{start:t},e,"invalid-category",r)]}return super.lint(t,!1)}}};xs=B(Hg),br=P(xs,0,"CategorytreeToken",pl,br),R(xs,1,br)});var cl={};Z(cl,{NowikiToken:()=>ys});var Vg,Qg,un,Ts,ys,ml=w(()=>{"use strict";ze();Or();z();oe();D();pt();Vg=Be(o=>new RegExp(String.raw`<\s*(?:/\s*)${o==="nowiki"?"":"?"}(${o})\b`,"giu")),Qg=new Set(["languages","section","templatestyles"]),ys=class extends le{constructor(){super(...arguments);S(this,un)}get type(){return"ext-inner"}lint(e=this.getAbsoluteIndex()){{let{name:r,innerText:n}=this,{lintConfig:i}=v,s="void-ext",a=i.getSeverity(s,r);if(a&&I(this,un,Ts).call(this)){let l=F(this,{start:e},s,v.msg("nothing-in",r),a);return i.computeEditInfo&&(l.suggestions=[O(l)]),[l]}{s="invalid-json";let l=i.getSeverity(s),p=i.getSeverity(s,"duplicate");if(ho.includes(r)&&(l||p))return(r==="templatedata"?So:Co)(n).map(({message:g,from:d,to:f=d,line:c,endLine:u=c,column:x,endColumn:h=x,severity:T})=>{if(a=T==="warning"?p:l,!a)return!1;let b=new W(this,e);return{rule:s,message:g,severity:a,startIndex:e+d,endIndex:e+f,startLine:b.top+c-1,endLine:b.top+u-1,startCol:(c>1?0:b.left)+x-1,endCol:(u>1?0:b.left)+h-1}}).filter(g=>g!==!1)}return super.lint(e,Vg(r))}}getAttribute(e){return e==="invalid"?I(this,un,Ts).call(this):super.getAttribute(e)}};un=new WeakSet,Ts=function(){let{name:e,firstChild:{data:r}}=this;return Qg.has(e)&&!!r}});var hl,ks,Jg,Xe,ts=w(()=>{"use strict";z();oe();D();Hn();G();Gn();Jn();hl=[dr()];Xe=class extends(Jg=Fe){get type(){return"ext"}constructor(t,e,r,n,i=v.getConfig(),s=!1,a=[]){let l=t.toLowerCase(),p=new ct(!e||/^\s/u.test(e)?e:` ${e}`,"ext-attrs",l,i,a),g=ge(V({},i),{ext:i.ext.filter(f=>f!==l),excludes:[...i.excludes],inExt:!0}),d;switch(l){case"pre":if(p.getAttr("format")!=="wikitext"){let{PreToken:f}=(Ca(),J(Sa));d=new f(r,g,a);break}case"indicator":case"poem":case"ref":case"option":case"combooption":case"tab":case"tabs":case"poll":case"seo":case"langconvert":case"phonos":l==="poem"?g.excludes.push("heading"):l==="tab"&&(g.ext=g.ext.filter(f=>f!=="tabs")),d=new L(r,g,a);break;case"dynamicpagelist":{let{ParamTagToken:f}=(Ui(),J(Ea));d=new f(l,s,r,g,a);break}case"inputbox":{let{InputboxToken:f}=(Ha(),J(Ga));d=new f(l,s,r,g,a);break}case"references":{let{NestedToken:f}=(ri(),J(ti));g.excludes.push("heading"),d=new f(r,s,["ref"],g,a);break}case"choose":{let{NestedToken:f}=(ri(),J(ti));d=new f(r,/<(option|choicetemplate)(\s[^>]*?)?(?:\/>|>([\s\S]*?)<\/(\1)>)/gu,["option","choicetemplate"],g,a);break}case"combobox":{let{NestedToken:f}=(ri(),J(ti));d=new f(r,/<(combooption)(\s[^>]*?)?(?:\/>|>([\s\S]*?)<\/(combooption\s*)>)/giu,["combooption"],g,a);break}case"gallery":{let{GalleryToken:f}=(nl(),J(rl));d=new f(r,g,a);break}case"imagemap":{let{ImagemapToken:f}=(al(),J(ol));d=new f(r,g,a);break}case"hiero":{let{CommentedToken:f}=(gl(),J(dl));d=new f(r,g,a);break}case"categorytree":{let{CategorytreeToken:f}=(fl(),J(ul));d=new f(r,void 0,g,a);break}default:{let{NowikiToken:f}=(ml(),J(cl));d=new f(r,g,a)}}d.setAttribute("name",l),d.type==="plain"&&(d.type="ext-inner"),super(t,p,d,n,i,a),this.seal("closed",!0)}lint(t=this.getAbsoluteIndex(),e){{let r=super.lint(t,e),{lintConfig:n}=v,i=new W(this,t);if(this.name!=="nowiki"){let s=this.inHtmlAttrs(),a="parsing-order",l=s&&n.getSeverity(a,s===2?"ext":"templateInTable");l&&r.push(F(this,i,a,"ext-in-html",l))}if(this.name==="ref"){let s="var-anchor",a=n.getSeverity(s,"ref");a&&this.closest("heading-title")&&r.push(F(this,i,s,"variable-anchor",a)),s="nested-link",a=n.getSeverity(s,"ref"),a&&this.closest("link-text,ext-link-text")&&r.push(F(this,i,s,"ref-in-link",a))}return r}}};ks=B(Jg),Xe=P(ks,0,"ExtToken",hl,Xe),R(ks,1,Xe)});var bt,Ut,tt,xr,vs=w(()=>{"use strict";z();Se();G();D();xr=class extends L{constructor(e,r,n,i,s){super(void 0,i,s);S(this,bt);S(this,Ut);S(this,tt);this.insertAt(r),C(this,bt,n),C(this,Ut,e)}get closing(){return m(this,bt)}toString(e){return`<${m(this,bt)?"/":""}${m(this,Ut)}${super.toString(e)}${this.selfClosing?"/":""}>`}text(e=""){let{closing:r}=this;return`<${r&&!e?"/":""}${m(this,Ut)}${r?"":super.text()}${e}>`}getAttribute(e){return e==="padding"?m(this,Ut).length+(m(this,bt)?2:1):super.getAttribute(e)}findMatchingTag(){return je(m(this,tt),()=>{let{type:e,name:r,parentNode:n,closing:i,selfClosing:s}=this,a=!1,l=!1;if(e==="html"){let[,u,x]=this.getAttribute("config").html;a=x.includes(r),l=u.includes(r)}if(a||l&&s)return this;if(!n)return;let{childNodes:p}=n,g=p.indexOf(this),d=i?p.slice(0,g).reverse():p.slice(g+1),f=[this],{rev:c}=ne;for(let u of d)if(!(!u.is(e)||e==="html"&&(u.name!==r||l&&u.selfClosing)))if(m(u,bt)===i){if(e==="tvar")return;f.push(u)}else{let x=f.pop();if(x===this)return u;v.viewOnly&&(C(x,tt,[c,u]),C(u,tt,[c,x]))}if(v.viewOnly)for(let u of f)C(u,tt,[c,void 0])},e=>{C(this,tt,e),e[1]&&e[1]!==this&&C(e[1],tt,[ne.rev,this])})}print(){}json(e,r,n=this.getAbsoluteIndex()){}};bt=new WeakMap,Ut=new WeakMap,tt=new WeakMap});var bl,As,Xg,_e,xl=w(()=>{"use strict";at();xe();vs();lt();bl=[ve(),Q];_e=class extends(Xg=xr){get type(){return"tvar"}constructor(t,e,r,n,i){let s=new he(e,"tvar-name",n,i);super(t,s,r,n,i)}};As=B(Xg),_e=P(As,0,"TvarToken",bl,_e),R(As,1,_e)});var yl={};Z(yl,{TranslateToken:()=>Ss});var Cs,Kg,Ss,Tl=w(()=>{"use strict";G();Gn();lt();xl();Ss=class extends Fe{constructor(e,r,n,i=[]){let s=new he(e,"translate-attr",n,i);r=r==null?void 0:r.replace(/<tvar(\|[^>]+)>([\s\S]*?)<\/>/gu,(l,p,g)=>(new _e("tvar",p,!1,n,i),new _e("","",!0,n,i),`\0${i.length-2}n${g}\0${i.length}n`)).replace(/<(tvar)(\s+name\s*=(?:\s*(?:(["'])[\s\S]*?\3|[^"'\s>]+))?\s*)>([\s\S]*?)<\/(tvar)(\s*)>/giu,(l,p,g,d,f,c,u)=>(new _e(p,g,!1,n,i),new _e(c,u,!0,n,i),`\0${i.length-2}n${f}\0${i.length}n`));let a=new L(r,n,i);a.type="translate-inner";super("translate",s,a,"translate",n,i);S(this,Cs);this.seal("closed",!0)}get type(){return"translate"}get selfClosing(){return!1}toString(e){return e?this.lastChild.toString(!0):super.toString()}text(){return this.lastChild.text()}print(){}};Cs=new WeakSet,Kg=function(){}});var Al={};Z(Al,{parseCommentAndExt:()=>Pt});var vl,Yg,ws,Zg,kl,Pt,Zr=w(()=>{"use strict";ze();ae();ra();wt();sa();ts();hs();vl="<onlyinclude>",Yg="</onlyinclude>",{length:ws}=vl,Zg=[!1,!0].map(o=>{let t=o?"includeonly":"(?:no|only)include",e=o?"noinclude":"includeonly";return Be(r=>new RegExp(String.raw`<!--[\s\S]*?(?:-->|$)|<${t}(?:\s[^>]*)?/?>|</${t}\s*>|<(${r})(\s[^>]*?)?(?:/>|>([\s\S]*?)</(${"\\1"}\s*)>)|<(${e})(\s[^>]*?)?(?:/>|>([\s\S]*?)(?:</(${e}\s*)>|$))`,"giu"))}),kl=o=>{let t=o.indexOf(vl);return{i:t,j:o.indexOf(Yg,t+ws)}},Pt=(o,t,e,r)=>{if(r){let{i:l,j:p}=kl(o);if(l!==-1&&p!==-1){let g="",d=f=>{new de(f,t,e),g+=`\0${e.length-1}n`};for(;l!==-1&&p!==-1;){let f=`\0${e.length}g`;new Nt(o.slice(l+ws,p),t,e),l>0&&d(o.slice(0,l)),g+=f,o=o.slice(p+ws+1),{i:l,j:p}=kl(o)}return o&&d(o),g}}let{ext:n}=t,i=n,s=t;if(n.includes("translate")){let{TranslateToken:l}=(Tl(),J(yl)),p=[];i=n.filter(g=>g!=="translate"&&g!=="tvar"),s=ge(V({},t),{ext:i}),o=o.replace(/<nowiki>[\s\S]*?<\/nowiki>/giu,g=>(p.push(g),`\0${p.length-1}`)).replace(/<translate( nowrap)?>([\s\S]*?)<\/translate>/gu,(g,d,f)=>{let c=e.length;return new l(d,f&&ke(f,p),s,e),`\0${c}g`}),o=ke(o,p)}let a=Zg[r?1:0](i.join("|"));return a.lastIndex=0,a.test(o)?o.replace(a,(l,p,g,d,f,c,u,x,h)=>{let T=e.length,b="n";if(p)b="e",new Xe(p,g,d,f,s,c,e);else if(l.startsWith("<!--")){b="c";let y=l.endsWith("-->");new et(ke(l,e,1).slice(4,y?-3:void 0),y,t,e)}else c?new It(c,u&&ke(u,e,1),x&&ke(x,e,1),h,t,e):new de(l,t,e,!0);return`\0${T}${b}`}):o}});var ep,tp,rp,Sl,fn,Es,np,zt,Cl=w(()=>{"use strict";z();oe();Hn();D();vs();ep=new Set(["if","ifeq","ifexpr","ifexist","iferror","switch"]),tp=new Set(["b","big","center","cite","code","del","dfn","em","font","i","ins","kbd","mark","pre","q","s","samp","small","strike","strong","sub","sup","tt","u","var"]),rp=new Set(["strike","big","center","font","tt"]);Sl=[dr()];zt=class extends(np=xr){constructor(e,r,n,i,s,a){super(e,r,n,s,a);S(this,fn);this.setAttribute("name",e.toLowerCase()),C(this,fn,i)}get type(){return"html"}get selfClosing(){return m(this,fn)}text(){let{closing:e,selfClosing:r,name:n}=this,[,,i]=this.getAttribute("config").html;return i.includes(n)?e&&n!=="br"?"":super.text("/"):super.text(r&&!e?"/":"")}lint(e=this.getAbsoluteIndex(),r){{let n=super.lint(e,r),{name:i,parentNode:s,closing:a,selfClosing:l}=this,p=new W(this,e),{lintConfig:g}=v,{computeEditInfo:d,fix:f}=g,c=this.inTableAttrs(),u="h1",x=g.getSeverity(u,"html");if(x&&i==="h1"&&!a){let A=F(this,p,u,"<h1>",x);d&&(A.suggestions=[{desc:"h2",range:[e+2,e+3],text:"2"}]),n.push(A)}if(u="parsing-order",x=c&&g.getSeverity(u,c===2?"html":"templateInTable"),x){let A=F(this,p,u,"html-in-table",x);d&&c===2&&(A.suggestions=[O(A)]),n.push(A)}if(u="obsolete-tag",x=g.getSeverity(u,i),x&&rp.has(i)&&n.push(F(this,p,u,"obsolete-tag",x)),u="bold-header",x=g.getSeverity(u,i),x&&(i==="b"||i==="strong")&&this.isInside("heading-title")){let A=F(this,p,u,"bold-in-header",x);d&&(A.suggestions=[O(A)]),n.push(A)}let[,h,T]=this.getAttribute("config").html,b=T.includes(i),y=h.includes(i),k=!b&&!y;if(u="unmatched-tag",a&&(l||b)||l&&k){if(x=g.getSeverity(u,a?"both":"selfClosing"),x){let A=F(this,p,u,a?"closing-and-self-closing":"invalid-self-closing",x);if(d||f){let N=Bn(e),E={desc:v.msg("no-self-closing"),range:[A.endIndex-2,A.endIndex-1],text:""};y?d&&(A.suggestions=[N,E]):a?A.fix=b?N:E:d&&(A.suggestions=[E,Le(A.endIndex,`></${i}>`,-2)])}n.push(A)}}else if(!this.findMatchingTag()){let A=F(this,p,u,a?"unmatched-closing":"unclosed-tag"),N=this.closest("magic-word");if(N&&ep.has(N.name))x=g.getSeverity(u,"conditional");else if(a)x=g.getSeverity(u,"closing"),A.suggestions=[O(A)];else{x=g.getSeverity(u,"opening");let E=s==null?void 0:s.childNodes;tp.has(i)&&(E!=null&&E.slice(0,E.indexOf(this)).some($=>$.is("html")&&$.name===i&&!$.findMatchingTag())&&(A.suggestions=[Le(e+1,"/")]),this.isInside("heading-title")&&(A.rule="format-leakage",x=g.getSeverity("format-leakage",i)))}x&&(A.severity=x,n.push(A))}return n}}getAttribute(e){return e==="invalid"?this.inTableAttrs()===2:super.getAttribute(e)}json(e,r,n=this.getAbsoluteIndex()){}};Es=B(np),fn=new WeakMap,zt=P(Es,0,"HtmlToken",Sl,zt),R(Es,1,zt)});var wl={};Z(wl,{parseHtml:()=>sp});var ip,sp,El=w(()=>{"use strict";Jn();Cl();ip=/^(\/?)([a-z][^\s/>]*)((?:\s|\/(?!>))[^>]*?)?(\/?>)([^<]*)$/iu,sp=(o,t,e)=>{var s;let{html:r}=t;(s=t.htmlElements)!=null||(t.htmlElements=new Set([...r[0],...r[1],...r[2]]));let n=o.split("<"),i=n.shift();for(let a of n){let l=ip.exec(a),p=l==null?void 0:l[2],g=p==null?void 0:p.toLowerCase();if(!l||!t.htmlElements.has(g)){i+=`<${a}`;continue}let[,d,,f="",c,u]=l,{length:x}=e,h=new ct(f,"html-attrs",g,t,e),T=h.hasAttr("itemprop");if(g==="meta"&&!(T&&h.hasAttr("content"))||g==="link"&&!(T&&h.hasAttr("href"))){i+=`<${a}`,e.length=x;continue}i+=`\0${e.length}x${u}`,new zt(p,h,d==="/",c==="/>",t,e)}return i}});var Ll,Ls,op,rt,Ns=w(()=>{"use strict";Hn();G();lt();Jn();Ll=[dr(1)];rt=class extends(op=L){constructor(t,e,r,n,i,s=[],a){super(void 0,i,s,a),this.append(new he(e,"table-syntax",i,s),new ct(n,"table-attrs",r,i,s))}escape(){}};Ls=B(op),rt=P(Ls,0,"TableBaseToken",Ll,rt),R(Ls,1,rt)});var Nl,$l,Re,$s,yr,cn,Gt,Is=w(()=>{"use strict";z();oe();Wn();D();G();Ns();Gt=class extends($l=rt,Nl=[rr(!1)],$l){constructor(e,r,n,i=[]){var p;let s=/\||\0\d+!\x7F/u.exec(r!=null?r:""),a=s?r.slice(0,s.index):"";/\[\[|-\{/u.test(a)&&(s=null,a="");super(/^(?:\n[^\S\n]*(?:[|!]|\|\+|\{\{\s*!\s*\}\}\+?)|(?:\||\{\{\s*!\s*\}\}){2}|!!|\{\{\s*!!\s*\}\})$/u,e,"td",a,n,i);R($s,5,this);S(this,yr);S(this,Re,"");s&&([$n(this,Re)._]=s);let l=new L(r==null?void 0:r.slice(((p=s==null?void 0:s.index)!=null?p:NaN)+m(this,Re).length),n,i);l.type="td-inner",l.setAttribute("stage",4),this.insertAt(l)}get type(){return"td"}get rowspan(){return this.getAttr("rowspan")}get colspan(){return this.getAttr("colspan")}get subtype(){return I(this,yr,cn).call(this).subtype}afterBuild(){m(this,Re).includes("\0")&&C(this,Re,this.buildFromStr(m(this,Re),0)),super.afterBuild()}toString(e){let[r,n,i]=this.childNodes;return r.toString(e)+n.toString(e)+m(this,Re)+i.toString(e)}text(){let[e,r,n]=this.childNodes;return e.text()+r.text()+m(this,Re)+n.text()}getGaps(e){return e===1?m(this,Re).length:0}lint(e=this.getAbsoluteIndex(),r){{let n=super.lint(e,r),i=new W(this,e+this.getRelativeIndex(this.length-1)),s="pipe-like",{lintConfig:a}=v,{computeEditInfo:l,fix:p}=a,g=["td","double"].map(d=>a.getSeverity(s,d));for(let d of this.lastChild.childNodes)if(d.type==="text"){let{data:f}=d;if(f.includes("|")){let c=f.includes("||"),u=g[c?1:0];if(u){let x=j(d,i,s,"pipe-in-table",u);if(l||p)if(c){let h={caption:"|+",td:"|",th:"!"}[this.subtype];x.fix=me(x,"newline",f.replace(/\|\|/gu,`
19
+ ${h}`))}else l&&(x.suggestions=[qn(x.startIndex,f)]);n.push(x)}}}return n}}isIndependent(){return this.firstChild.text().startsWith(`
20
+ `)}getAttr(e){{let r=super.getAttr(e);return e==="rowspan"||e==="colspan"?parseInt(r)||1:r}}escape(){}print(){}json(e,r,n=this.getAbsoluteIndex()){}};$s=B($l),Re=new WeakMap,yr=new WeakSet,cn=function(){var a;let e=this.firstChild.text(),r=e.slice(-1),n="td";if(r==="!"?n="th":r==="+"&&(n="caption"),this.isIndependent())return{subtype:n};let{previousSibling:i}=this;return V({},I(a=i,yr,cn).call(a))},cn=P($s,17,"#getSyntax",Nl,yr,cn),Fr($s,Gt)});var Tr,Fs=w(()=>{"use strict";z();D();Ns();Is();Tr=class extends rt{lint(t=this.getAbsoluteIndex(),e){{let r=super.lint(t,e),n=this.childNodes.find(({type:l})=>l==="table-inter");if(!n)return r;let i=Rn(n),s="fostered-content",a=i&&v.lintConfig.getSeverity(s,i===2?void 0:"transclusion");if(a){let l=j(n,{start:t},s,"content-outside-table",a);l.startIndex++,l.startLine++,l.startCol=0,r.push(l)}return r}}getRowCount(){return Number(this.childNodes.some(t=>t instanceof Gt&&t.isIndependent()&&!t.firstChild.text().endsWith("+")))}}});var Ps,Il,Fl,Rs,kr,Rl=w(()=>{"use strict";z();Se();oe();Wn();D();Fs();lt();Ps=class extends Array{},kr=class extends(Fl=Tr,Il=[rr(!1)],Fl){constructor(e,r,n,i){super(/^(?:\{\||\{\{\{\s*!\s*\}\}|\{\{\s*\(!\s*\}\})$/u,e,"table",r,n,i,{});R(Rs,5,this)}get type(){return"table"}get closed(){return this.lastChild.is("table-syntax")}lint(e=this.getAbsoluteIndex(),r){{let n=super.lint(e,r),i=new W(this,e),s=["unclosed-table","table-layout"],a=s.map(l=>v.lintConfig.getSeverity(l));if(a[0]&&!this.closed&&n.push(j(this.firstChild,i,s[0],"unclosed-table",a[0])),a[1]){let l=this.getLayout(),{length:p}=l;if(p>1){let g=1,d=1/0,f=0;for(;f<p;f++){let c=l[f],u=c.length;if(u<g)break;u<d&&(d=u);let x=c.indexOf(c[u-1])+1;if(x>d)break;x>g&&(g=x)}if(f<p){let c=this.getNthRow(f),u=j(c,i,s[1],"inconsistent-table",a[1]);u.startIndex++,u.startLine++,u.startCol=0,n.push(u)}}}return n}}close(e=`
21
+ |}`,r){ne.run(()=>{let n=new he(r?e:void 0,"table-syntax",this.getAttribute("config"),this.getAttribute("accum"));super.insertAt(n)})}getLayout(e){{let r=this.getAllRows(),{length:n}=r,i=Ps.from(Bl(n,()=>[]));for(let s=0;s<i.length;s++){let a=i[s],l=0,p=0,g;for(let d of r[s].childNodes.slice(2))if(d.is("td")){if(d.isIndependent()&&(g=d.subtype!=="caption"),g){let f={row:s,column:l},{rowspan:c,colspan:u}=d;for(l++;a[p];)p++;for(let x=s;x<Math.min(s+c,n);x++)for(let h=p;h<p+u;h++)i[x][h]=f;p+=u}}else if(Pl(d))break}return i}}getAllRows(){return[...super.getRowCount()?[this]:[],...this.childNodes.slice(1).filter(e=>e.is("tr")&&e.getRowCount()>0)]}getNthRow(e,r,n){{let i=super.getRowCount();if(e===0&&i)return this;i&&e--;for(let s of this.childNodes.slice(2)){let{type:a}=s;if(a==="tr"&&s.getRowCount()&&(e--,e<0))return s}return}}json(e,r,n=this.getAbsoluteIndex()){}};Rs=B(Fl),P(Rs,1,"getLayout",Il,kr),Fr(Rs,kr)});var si,jl=w(()=>{"use strict";Fs();si=class extends Tr{get type(){return"tr"}constructor(t,e,r,n){super(/^\n[^\S\n]*(?:\|-+|\{\{\s*!\s*\}\}-+|\{\{\s*!-\s*\}\}-*)$/u,t,"tr",e,r,n)}}});var vr,Bs=w(()=>{"use strict";pt();vr=class extends le{get indent(){}json(t,e,r=this.getAbsoluteIndex()){}}});var Ar,js=w(()=>{"use strict";Bs();Ar=class extends vr{get type(){return"dd"}}});var ql={};Z(ql,{parseTable:()=>lp});var ap,Ol,lp,_l=w(()=>{"use strict";G();Rl();jl();Is();js();ap=o=>o.lastChild.constructor!==L,Ol=(o,t)=>o.is("td")?t.pop():o,lp=({firstChild:{data:o},type:t,name:e},r,n)=>{let i=[],s=o.split(`
22
+ `),a=t==="root"||t==="parameter-value"||t==="ext-inner"&&e==="poem"?"":`
23
+ ${s.shift()}`,l,p=(g,d)=>{if(!d){a+=g;return}let{lastChild:f}=d;if(ap(d)){let c=new L(g,r,n);c.type="table-inter",c.setAttribute("stage",3),d.insertAt(c)}else f.setText(f.toString()+g)};for(let g of s){l=i.pop();let[d]=/^(?:\s|\0\d+[cno]\x7F)*/u.exec(g),f=g.slice(d.length),c=/^(:*)((?:\s|\0\d+[cn]\x7F)*)(\{\||\{(?:\0\d+[cn]\x7F)*\0\d+!\x7F|\0\d+\{\x7F)(.*)$/u.exec(f);if(c){for(;l&&!l.is("td");)l=i.pop();let[,y,k,A,N]=c;y&&new Ar(y,r,n),p(`
24
+ ${d}${y&&`\0${n.length-1}d`}${k}\0${n.length}b`,l),i.push(...l?[l]:[],new kr(A,N,r,n));continue}else if(!l){a+=`
25
+ ${g}`;continue}let u=/^(?:(\|\}|\0\d+!\x7F\}|\0\d+\}\x7F)|(\|-+|\0\d+!\x7F-+|\0\d+-\x7F-*)(?!-)|(!|(?:\||\0\d+!\x7F)\+?))(.*)$/u.exec(f);if(!u){p(`
26
+ ${g}`,l),i.push(l);continue}let[,x,h,T,b]=u;if(x){for(;!l.is("table");)l=i.pop();l.close(`
27
+ ${d}${x}`,!0),p(b,i[i.length-1])}else if(h){l=Ol(l,i),l.is("tr")&&(l=i.pop());let y=new si(`
28
+ ${d}${h}`,b,r,n);i.push(l,y),l.insertAt(y)}else{l=Ol(l,i);let y=T==="!"?/!!|(?:\||\0\d+!\x7F){2}|\0\d+\+\x7F/gu:/(?:\||\0\d+!\x7F){2}|\0\d+\+\x7F/gu,k=y.exec(b),A=0,N=`
29
+ ${d}${T}`,E=$=>{let H=new Gt(N,b.slice(A,k==null?void 0:k.index),r,n);return $.insertAt(H),H};for(;k;)E(l),{lastIndex:A}=y,[N]=k,k=y.exec(b);i.push(l,E(l))}}return a.slice(1)}});var mn,Wl=w(()=>{"use strict";mn=o=>!/^_{2}.+_{2}$/u.test(o)});var oi,Dl=w(()=>{"use strict";pt();oi=class extends le{get type(){return"hr"}}});var Ml,hn,Os,dp,Ht,Ul=w(()=>{"use strict";at();qe();pt();Ml=[ve(),pe("__")];Ht=class extends(dp=le){constructor(e,r,n,i,s){var g,d;super(e,i,s);S(this,hn);let a=e.toLowerCase(),[,,l,p]=i.doubleUnderscore;this.setAttribute("name",(d=r?(g=p==null?void 0:p[e])==null?void 0:g.toLowerCase():l==null?void 0:l[a])!=null?d:a),C(this,hn,n)}get type(){return"double-underscore"}toString(){let e=m(this,hn)?"__":"__";return e+this.innerText+e}print(){}};Os=B(dp),hn=new WeakMap,Ht=P(Os,0,"DoubleUnderscoreToken",Ml,Ht),R(Os,1,Ht)});var zl={};Z(zl,{parseHrAndDoubleUnderscore:()=>gp});var gp,Gl=w(()=>{"use strict";Wl();Dl();Ul();Hi();gp=({firstChild:{data:o},type:t,name:e},r,n)=>{var p,g,d;let[i,s,a]=r.doubleUnderscore,l=[...i,...s];return(p=r.insensitiveDoubleUnderscore)!=null||(r.insensitiveDoubleUnderscore=new Set(i.filter(mn))),(g=r.sensitiveDoubleUnderscore)!=null||(r.sensitiveDoubleUnderscore=new Set(s.filter(mn))),(d=r.regexHrAndDoubleUnderscore)!=null||(r.regexHrAndDoubleUnderscore=new RegExp(String.raw`^((?:\0\d+[cno]\x7F)*)(-{4,})|__(${l.filter(mn).join("|")})__|_{2}(${l.filter(f=>!mn(f)).map(f=>f.slice(2,-2)).join("|")})_{2}`,"gimu")),t!=="root"&&(t!=="ext-inner"||e!=="poem")&&(o=`\0${o}`),o=o.replace(r.regexHrAndDoubleUnderscore,(f,c,u,x,h)=>{var A;if(u)return new oi(u,r,n),`${c}\0${n.length-1}r`;let T=x!=null?x:h,b=r.sensitiveDoubleUnderscore.has(T),y=T.toLowerCase(),k=r.insensitiveDoubleUnderscore.has(y);return b||k?(new Ht(T,b,!!h,r,n),`\0${n.length-1}${k&&((A=a==null?void 0:a[y])!=null?A:y)==="toc"?"u":"n"}`):f}),r.excludes.includes("heading")||(o=o.replace(/^((?:\0\d+[cn]\x7F)*)(={1,6})(.+)\2((?:\s|\0\d+[cn]\x7F)*)$/gmu,(f,c,u,x,h)=>{let T=`${c}\0${n.length}h`;return new Je(u.length,[x,h],r,n),T})),t==="root"||t==="ext-inner"&&e==="poem"?o:o.slice(1)}});var Sr,ai,Hl=w(()=>{"use strict";z();oe();D();pt();ai=class extends le{constructor(e,r,n,i){super(e,n,i);S(this,Sr);C(this,Sr,r)}get type(){return"quote"}get bold(){return this.innerText.length!==2}get italic(){return this.innerText.length!==3}get closing(){return V(V({},this.bold?{bold:m(this,Sr).bold}:void 0),this.italic?{italic:m(this,Sr).italic}:void 0)}text(){let{parentNode:e,innerText:r}=this;return e!=null&&e.is("image-parameter")&&e.name!=="caption"?"":r}lint(e=this.getAbsoluteIndex()){{let{previousSibling:r,bold:n,closing:i}=this,s=(r==null?void 0:r.type)==="text"?r.data:void 0,a=[],l=new W(this,e),p=["lonely-apos","bold-header"],{lintConfig:g}=v,{computeEditInfo:d}=g,f=[void 0,"word"].map(u=>g.getSeverity(p[0],u)),c=g.getSeverity(p[1]);if(s!=null&&s.endsWith("'")){let u=f[(i.bold||i.italic)&&/[a-z\d]'$/iu.test(s)?1:0];if(u){let x=F(this,l,p[0],v.msg("lonely","'"),u),{startLine:h,startCol:T}=x,[,{length:b}]=/(?:^|[^'])('+)$/u.exec(s),y=e-b,k=ge(V({},x),{startIndex:y,endIndex:e,endLine:h,startCol:T-b,endCol:T});d&&n&&(k.suggestions=[Ge(y,"&apos;",b),O(k)]),a.push(k)}}if(c&&n&&this.isInside("heading-title")){let u=F(this,l,p[1],"bold-in-header",c);d&&(u.suggestions=[O(u)]),a.push(u)}return a}}json(e,r,n=this.getAbsoluteIndex()){}};Sr=new WeakMap});var Vl={};Z(Vl,{parseQuotes:()=>qs});var qs,_s=w(()=>{"use strict";Hl();qs=(o,t,e,r)=>{var c;let n=o.split(/('{2,})/u),{length:i}=n;if(i===1)return o;let s=0,a=0,l,p,g;for(let u=1;u<i;u+=2){let x=n[u].length;switch(x){case 2:a++;break;case 4:n[u-1]+="'",n[u]="'''";case 3:if(s++,l!==void 0)break;n[u-1].endsWith(" ")?p===void 0&&g===void 0&&(g=u):n[u-1].slice(-2,-1)===" "?l=u:p!=null||(p=u);break;default:n[u-1]+="'".repeat(x-5),n[u]="'''''",a++,s++}}if(a%2===1&&s%2===1){let u=(c=l!=null?l:p)!=null?c:g;u!==void 0&&(n[u]="''",n[u-1]+="'")}let d=!1,f=!1;for(let u=1;u<i;u+=2){let x=n[u].length,h=x!==2,T=x!==3,b=new ai(n[u],{bold:h&&!!d,italic:T&&!!f},t,e);h&&(d=!d&&b),T&&(f=!f&&b),n[u]=`\0${e.length-1}q`}return n.join("")}});var Ql={};Z(Ql,{parseExternalLinks:()=>Ws});var Ws,Ds=w(()=>{"use strict";ae();fs();ii();Ws=(o,t,e,r)=>{var n;return(n=t.regexExternalLinks)!=null||(t.regexExternalLinks=new RegExp(String.raw`\[((?:\0\d+[cn]\x7F)*(?:\0\d+f\x7F|(?:(?:${t.protocol}|//)${De}|\0\d+m\x7F)${Me}(?=[[\]<>"\t${Ie}]|\0\d)))([${Ie}]*(?![${Ie}]))([^\]\x01-\x08\x0A-\x1F\uFFFD]*)\]`,"giu")),o.replace(t.regexExternalLinks,(i,s,a,l)=>{let{length:p}=e,g=/&[lg]t;/u.exec(s);return g&&(a="",l=s.slice(g.index)+a+l,s=s.slice(0,g.index)),r?(new Ye(s,"ext-link-url",t,e),`[\0${p}f${a}${l}]`):(new Ze(s,a,l,t,e),`\0${p}w`)})}});var li,Jl=w(()=>{"use strict";lr();li=class extends ye{get type(){return"category"}get sortkey(){}json(t,e,r=this.getAbsoluteIndex()){}}});var Kl={};Z(Kl,{parseLinks:()=>Xl});var pp,Xl,Yl=w(()=>{"use strict";ae();D();_s();Ds();gs();is();Jl();pp=/^((?:(?!\0\d+!\x7F)[^\n[\]{}|])+)(\||\0\d+!\x7F)([\s\S]*)$/u,Xl=(o,t,e,r,n)=>{var l;(l=t.regexLinks)!=null||(t.regexLinks=new RegExp(String.raw`^\s*(?:${t.protocol}|//)`,"iu"));let i=t.inExt?/^((?:(?!\0\d+!\x7F)[^\n[\]{}|])+)(?:(\||\0\d+!\x7F)([\s\S]*?[^\]]))?\]\]([\s\S]*)$/u:/^((?:(?!\0\d+!\x7F)[^\n[\]{}|])*)(?:(\||\0\d+!\x7F)([\s\S]*?[^\]])?)?\]\]([\s\S]*)$/u,s=o.split("[["),a=s.shift();for(let p=0;p<s.length;p++){let g=!1,d,f,c,u,x=s[p],h=i.exec(x);if(h)[,d,f,c,u]=h,u.startsWith("]")&&(c!=null&&c.includes("["))&&(c+="]",u=u.slice(1));else{let N=pp.exec(x);N&&(g=!0,[,d,f,c]=N)}if(d===void 0||t.regexLinks.test(d)||/\0\d+[exhbru]\x7F/u.test(d)){a+=`[[${x}`;continue}let T=re(d).trim(),b=T.startsWith(":");if(b&&g){a+=`[[${x}`;continue}else!T&&c&&!c.includes(`
30
+ `)&&(T=re(c).trim());let{ns:y,valid:k}=v.normalizeTitle(T,0,!1,t,{halfParsed:!0,temporary:!0,decode:!0,selfLink:!0,page:r});if(k){if(g){if(y!==6){a+=`[[${x}`;continue}let N=!1;for(p++;p<s.length;p++){let E=s[p],$=E.split("]]");if($.length>2){N=!0,c+=`[[${$[0]}]]${$[1]}`,u=$.slice(2).join("]]");break}else if($.length===2)c+=`[[${$[0]}]]${$[1]}`;else{c+=`[[${E}`;break}}if(c=Xl(c,t,e,r,n),!N){a+=`[[${d}${f}${c}`;continue}}}else{a+=`[[${x}`;continue}c&&(c=qs(c,t,e,n));let A=hr;b||(y===6?(c&&(c=Ws(c,t,e,!0)),A=mr):y===14&&(A=li)),c===void 0&&f&&(c=""),a+=`\0${e.length}l${u}`,new A(d,c,t,e,f)}return a}});var nd={};Z(nd,{parseMagicLinks:()=>up});var rd,Zl,ed,td,up,id=w(()=>{"use strict";ae();ii();rd=String.raw`[${Ie}\t]|&nbsp;|&#0*160;|&#x0*a0;`,Zl=`(?:${rd})+`,ed=`(?:${rd}|-)`,td=String.raw`(?:RFC|PMID)${Zl}\d+\b|ISBN${Zl}(?:97[89]${ed}?)?(?:\d${ed}?){9}[\dx]\b`,up=(o,t,e)=>{if(!t.regexMagicLinks)try{t.regexMagicLinks=new RegExp(String.raw`(^|[^\p{L}\p{N}_])(?:(?:${t.protocol})(${De}${Me})|${td})`,"giu")}catch(r){t.regexMagicLinks=new RegExp(String.raw`(^|\W)(?:(?:${t.protocol})(${De}${Me})|${td})`,"giu")}return o.replace(t.regexMagicLinks,(r,n,i)=>{let s=n?r.slice(n.length):r;if(i){let a="",l=/&(?:[lg]t|nbsp|#x0*(?:3[ce]|a0)|#0*(?:6[02]|160));/iu.exec(s);l&&(a=s.slice(l.index),s=s.slice(0,l.index));let p=s.includes("(")?/[^,;\\.:!?][,;\\.:!?]+$/u:/[^,;\\.:!?)][,;\\.:!?)]+$/u,g=p.exec(s);if(g){let d=1;g[0][1]===";"&&/&(?:[a-z]+|#x[\da-f]+|#\d+)$/iu.test(s.slice(0,g.index))&&(d=2),a=s.slice(g.index+d)+a,s=s.slice(0,g.index+d)}return a.length>=i.length?r:(new Ye(s,void 0,t,e),`${n}\0${e.length-1}w${a}`)}else if(!/^(?:RFC|PMID|ISBN)/u.test(s))return r;return new Ye(s,"magic-link",t,e),`${n}\0${e.length-1}i`})}});var sd,od=w(()=>{"use strict";sd=(o,t)=>o.startsWith(t)?t.length:[...t].findIndex((e,r)=>e!==o[r])});var fp,di,ad=w(()=>{"use strict";z();D();Bs();fp=new Set(["link","category","file"]),di=class extends vr{get type(){return"list"}lint(t=this.getAbsoluteIndex()){var e;{let r="syntax-like",n=v.lintConfig.getSeverity(r,"redirect"),{innerText:i}=this;if(n&&i==="#"){let{nextSibling:s}=this;if((s==null?void 0:s.type)==="text"&&fp.has((e=s.nextSibling)==null?void 0:e.type)&&new RegExp(String.raw`^(?:${this.getAttribute("config").redirection.join("|")})\s*(?::\s*)?$`,"iu").test(`#${s.data}`)){let l=F(s,{start:t+1},r,"redirect-like",n);return l.startIndex--,l.startCol--,l.endIndex+=2,l.endCol+=2,[l]}}return[]}}}});var ld={};Z(ld,{parseList:()=>cp});var cp,dd=w(()=>{"use strict";od();ad();js();cp=(o,t,e,r)=>{let n=/^((?:\0\d+[cno]\x7F)*)([;:*#]+)(\s*)/u.exec(o);if(!n)return t.lastPrefix="",o;let[i,s,a,l]=n,p=a.replace(/;/gu,":"),g=sd(p,t.lastPrefix),d=((g>1?a.slice(g-1):a)+l).split(/(?=;)/u),f=d[0].startsWith(";"),c=d.length-(f?0:1);if(g>1){let q=a.slice(0,g-1);if(f){let K=q.split(/(?=;)/u);d.unshift(...K),c+=q.includes(";")?K.length:0}else d[0]=q+d[0]}t.lastPrefix=p;let u=s+d.map((q,K)=>`\0${r.length+K}d`).join("")+o.slice(i.length);for(let q of d)new di(q,e,r);if(!c)return u;let[x,,h]=e.html,T=/:+|-\{|\0\d+[xq]\x7F/gu,b=T,y=b.exec(u),k=0,A=!1,N=!1,E=0,$=(q,K)=>(new Ar(q,e,r),`${u.slice(0,K)}\0${r.length-1}d${u.slice(K+q.length)}`),H=q=>{q?k&&k--:k++};for(;y&&c;){let{0:q,index:K}=y;if(q==="-{"){if(!E){let{lastIndex:_}=b;b=/-\{|\}-/gu,b.lastIndex=_}E++}else if(q==="}-"){if(E--,!E){let{lastIndex:_}=b;b=T,b.lastIndex=_}}else if(q.endsWith("x")){let{name:_,closing:U,selfClosing:M}=r[Number(q.slice(1,-2))];(x.includes(_)||!M&&!h.includes(_))&&H(U)}else if(q.endsWith("q")){let{bold:_,italic:U}=r[Number(q.slice(1,-2))];_&&(H(A),A=!A),U&&(H(N),N=!N)}else if(k===0){if(q.length>=c)return $(q.slice(0,c),K);c-=q.length,b.lastIndex=K+4+String(r.length).length,u=$(q,K)}y=b.exec(u)}return u}});var Ms,gd,nt,Us,mp,Vt,pd=w(()=>{"use strict";z();oe();Qr();xe();D();G();dt();Ms=new Set(["A","T","R","D","-","H","N"]);gd=[ut(),Q];Vt=class extends(mp=L){constructor(e,r,n=[]){super(void 0,r,n,{});S(this,nt);this.safeAppend(e.map(i=>new ue(i,"converter-flag",r,n)))}get type(){return"converter-flags"}afterBuild(){C(this,nt,this.childNodes.map(e=>e.text().trim())),super.afterBuild()}toString(e){return super.toString(e,";")}text(){return super.text(";")}getUnknownFlags(){return new Set(m(this,nt).filter(e=>/\{{3}[^{}]+\}{3}/u.test(e)))}getVariantFlags(){let e=new Set(this.getAttribute("config").variants);return new Set(m(this,nt).filter(r=>e.has(r)))}isInvalidFlag(e,r,n){return!!e&&!r.has(e)&&!n.has(e)&&(r.size>0||!Ms.has(e))}lint(e=this.getAbsoluteIndex(),r){{let n=this.getVariantFlags(),i=this.getUnknownFlags(),s=m(this,nt).filter(u=>!u).length,a=m(this,nt).length-i.size-s,{lintConfig:l}=v,{computeEditInfo:p,fix:g}=l,d=super.lint(e,r);if(n.size===a||m(this,nt).filter(u=>Ms.has(u)).length===a)return d;let f="no-ignored",c=l.getSeverity(f,"conversionFlag");if(c){let u=new W(this,e);for(let x=0;x<this.length;x++){let h=this.childNodes[x],T=h.text().trim();if(this.isInvalidFlag(T,n,i)){let b=j(h,u,f,"invalid-conversion-flag",c);(p||g)&&(n.size===0&&Ms.has(T.toUpperCase())?b.fix=On(b,T):p&&(b.suggestions=[O(b,x&&-1)])),d.push(b)}}}return d}}print(){}};Us=B(mp),nt=new WeakMap,Vt=P(Us,0,"ConverterFlagsToken",gd,Vt),R(Us,1,Vt)});var zs,ud,Gs,hp,it,fd=w(()=>{"use strict";xe();D();G();dt();zs=(o,t,e,r)=>{let n=new L(o,e,r);return n.type=`converter-rule-${t}`,n.setAttribute("stage",11),n};ud=[Q];it=class extends(hp=L){get type(){return"converter-rule"}get variant(){}constructor(t,e=!0,r=v.getConfig(),n=[]){super(void 0,r,n,{});let i=t.indexOf(":"),s=t.slice(0,i).indexOf("=>"),a=s===-1?t.slice(0,i):t.slice(s+2,i);e&&r.variants.includes(a.trim().toLowerCase())?(super.insertAt(new ue(a,"converter-rule-variant",r,n)),super.insertAt(zs(t.slice(i+1),"to",r,n)),s!==-1&&super.insertAt(zs(t.slice(0,s),"from",r,n),0)):super.insertAt(zs(t,"to",r,n))}toString(t){let{childNodes:e,firstChild:r,lastChild:n}=this;return e.length===3?`${r.toString(t)}=>${e[1].toString(t)}:${n.toString(t)}`:super.toString(t,":")}text(){let{childNodes:t,firstChild:e,lastChild:r}=this;return t.length===3?`${e.text()}=>${t[1].text()}:${r.text()}`:super.text(":")}getGaps(t){return t===0&&this.length===3?2:1}print(){}json(t,e,r=this.getAbsoluteIndex()){}};Gs=B(hp),it=P(Gs,0,"ConverterRuleToken",ud,it),R(Gs,1,it)});var cd,Hs,bp,Qt,md=w(()=>{"use strict";ae();qe();xe();G();pd();fd();cd=[Q,pe("-{")];Qt=class extends(bp=L){get type(){return"converter"}constructor(t,e,r,n=[]){super(void 0,r,n),this.insertAt(new Vt(t,r,n));let[i]=e,s=i.includes(":"),a=new it(i,s,r,n);(s?a.length===1:e.length===2&&!re(e[1]).trim())?this.insertAt(new it(e.join(";"),!1,r,n)):this.safeAppend([a,...e.slice(1).map(l=>new it(l,!0,r,n))])}toString(t){let[e,...r]=this.childNodes;return`-{${e.toString(t)}${e.length>0?"|":""}${r.map(n=>n.toString(t)).join(";")}}-`}text(){let[t,...e]=this.childNodes;return`-{${t.text()}|${Ee(e,";")}}-`}getGaps(t){return t||this.firstChild.length>0?1:0}print(){}};Hs=B(bp),Qt=P(Hs,0,"ConverterToken",cd,Qt),R(Hs,1,Qt)});var hd={};Z(hd,{parseConverter:()=>xp});var xp,bd=w(()=>{"use strict";md();xp=(o,t,e)=>{var l;(l=t.regexConverter)!=null||(t.regexConverter=new RegExp(String.raw`;(?=(?:[^;]*?=>)?\s*(?:${t.variants.join("|")})\s*:|(?:\s|\0\d+[cn]\x7F)*$)`,"iu"));let r=/-\{/gu,n=/-\{|\}-/gu,i=[],s=r,a=s.exec(o);for(;a;){let{0:p,index:g}=a;if(p==="}-"){let d=i.pop(),{length:f}=e,c=o.slice(d.index+2,g),u=c.indexOf("|"),[x,h]=u===-1?[[],c]:[c.slice(0,u).split(";"),c.slice(u+1)],T=h.replace(/(&[#a-z\d]+);/giu,"$1"),b=T.split(t.regexConverter).map(y=>y.replace(/\x01/gu,";"));new Qt(x,b,t,e),o=`${o.slice(0,d.index)}\0${f}v${o.slice(g+2)}`,i.length===0&&(s=r),s.lastIndex=d.index+3+String(f).length}else i.push(a),s=n,s.lastIndex=g+2;a=s.exec(o)}return o}});var gi={};Z(gi,{Token:()=>L});var yp,bn,Ce,ee,te,Cr,wr,xn,Er,X,xd,yd,Td,kd,vd,Ad,Sd,Cd,wd,Ed,Ld,Nd,Vs,L,G=w(()=>{"use strict";ae();z();Se();D();Wo();zo();yp=["category","html-attr#id,ext-attr#id,table-attr#id"],Vs=class Vs extends Ct{constructor(e,r=v.getConfig(),n=[],i){super();S(this,X);S(this,bn,"plain");S(this,Ce,0);S(this,ee);S(this,te);S(this,Cr);S(this,wr,!1);S(this,xn);S(this,Er);typeof e=="string"&&this.insertAt(e),C(this,ee,r),C(this,te,n),n.push(this)}get type(){return m(this,bn)}set type(e){C(this,bn,e)}get pageName(){return m(this.getRootNode(),Er)}set pageName(e){if(e){let r=this.normalizeTitle(e,0,{temporary:!0,page:""});C(this,Er,r.valid?r.title:void 0)}else C(this,Er,e===""?"":void 0)}parseOnce(e=m(this,Ce),r=!1,n){if(e<m(this,Ce)||this.length!==1||!this.isPlain())return this;if(m(this,Ce)>=11)return this;switch(e){case 0:if(this.type==="root"){m(this,te).pop();let i=I(this,X,xd).call(this);r&&(r=!i)}C(this,Cr,r),I(this,X,yd).call(this,r);break;case 1:I(this,X,Td).call(this);break;case 2:I(this,X,kd).call(this);break;case 3:I(this,X,vd).call(this);break;case 4:I(this,X,Ad).call(this);break;case 5:I(this,X,Sd).call(this,n);break;case 6:I(this,X,Cd).call(this,n);break;case 7:I(this,X,wd).call(this);break;case 8:I(this,X,Ed).call(this);break;case 9:I(this,X,Ld).call(this);break;case 10:I(this,X,Nd).call(this)}if(this.type==="root")for(let i of m(this,te))i==null||i.parseOnce(e,r,n);return $n(this,Ce)._++,this}buildFromStr(e,r){let n=e.split(/[\0\x7F]/u).map((i,s)=>{if(s%2===0)return i&&new Gr(i);let a=Number(i.slice(0,-1));return m(this,te)[a]}).filter(i=>i!=="");return r===0?n.map(String).join(""):r===1?Ee(n):n}build(){C(this,Ce,11);let{length:e,firstChild:r}=this,n=r==null?void 0:r.toString();if(e===1&&r.type==="text"&&n.includes("\0")&&(Dn(this,0,1,this.buildFromStr(n)),this.type==="root"))for(let i of m(this,te))i==null||i.build()}afterBuild(){if(this.type==="root")for(let e of m(this,te))e==null||e.afterBuild();C(this,wr,!0)}parse(e=11,r,n){for(e=Math.min(e,11);m(this,Ce)<e;)this.parseOnce(m(this,Ce),r,n);return e&&(this.build(),this.afterBuild()),this}isPlain(){return this.constructor===Vs}getAttribute(e){var r;switch(e){case"config":return m(this,ee);case"include":return(r=m(this,Cr))!=null?r:!!m(this.getRootNode(),Cr);case"accum":return m(this,te);case"built":return m(this,wr);case"stage":return m(this,Ce);default:return super.getAttribute(e)}}setAttribute(e,r){e==="stage"?(m(this,Ce)===0&&this.type==="root"&&m(this,te).shift(),C(this,Ce,r)):super.setAttribute(e,r)}insertAt(e,r=this.length){let n=typeof e=="string"?new Gr(e):e,{length:i}=this;r+=r<0?i:0,super.insertAt(n,r);let{type:s}=n;return s==="root"&&(n.type="plain"),n}normalizeTitle(e,r=0,n){return v.normalizeTitle(e,r,this.getAttribute("include"),m(this,ee),V({page:this.pageName},n))}inTableAttrs(){var e;return this.isInside("table-attrs")&&((e=this.closest("table-attrs,arg,parameter"))!=null&&e.is("table-attrs")?2:1)}inHtmlAttrs(){return this.isInside("html-attrs")?2:this.inTableAttrs()}lint(e=this.getAbsoluteIndex(),r){var n;{let{lintConfig:i}=v,{computeEditInfo:s,fix:a,ignoreDisables:l,configurationComment:p}=i,g=super.lint(e,r);if(this.type==="root"){let d=new Map,f="no-duplicate",c=["category","id"].map(h=>i.getSeverity(f,h)),u=this.toString(),x=yp.filter((h,T)=>c[T]).join();if(x){for(let h of this.querySelectorAll(x)){let T;if(h.is("category"))T=h.name;else{let b=h.getValue();b&&b!==!0&&(T=`#${b}`)}if(T){let b=d.get(T);b?b.add(h):d.set(T,new Set([h]))}}for(let[h,T]of d)if(T.size>1&&!h.startsWith("#mw-customcollapsible-")){let b=!h.startsWith("#"),y=`duplicate-${b?"category":"id"}`,k=c[b?0:1];g.push(...[...T].map(A=>{let N=F(A,{start:A.getAbsoluteIndex()},f,y,k);return s&&b&&(N.suggestions=[O(N)]),N}))}}if(!l){let h=new RegExp(String.raw`<!--\s*${p}-(disable(?:(?:-next)?-line)?|enable)(\s[\sa-z,-]*)?-->`,"gu"),T=[],b=h.exec(u);for(;b;){let{1:y,index:k}=b,A=(n=b[2])==null?void 0:n.trim(),N;(y==="disable-line"||y==="disable-next-line")&&(N=this.posFromIndex(k).top+(y==="disable-line"?0:1)),T.push({line:N,from:y==="disable"?h.lastIndex:void 0,to:y==="enable"?h.lastIndex:void 0,rules:A?new Set(A.split(",").map(E=>E.trim())):void 0}),b=h.exec(u)}g=g.filter(({rule:y,startLine:k,startIndex:A})=>{let N={pos:0};for(let{line:E,from:$,to:H,rules:q}of T){if(E&&E>k+1)break;if(q&&!q.has(y))continue;if(E===k)return!1;$<=A&&$>N.pos?(N.pos=$,N.type="from"):H<=A&&H>N.pos&&(N.pos=H,N.type="to")}return N.type!=="from"})}if(a&&g.some(({fix:h})=>h)){let h=g.map(({fix:y})=>y).filter(y=>y!==void 0).sort(({range:[y,k]},{range:[A,N]})=>k===N?A-y:N-k),T=1/0,b=u;for(let{range:[y,k],text:A}of h)k<=T&&(b=b.slice(0,y)+A+b.slice(k),T=y);Object.assign(g,{output:b})}if(!s)for(let h of g)delete h.fix,delete h.suggestions}return g}}toString(e,r){return e?super.toString(!0,r):je(m(this,xn),()=>super.toString(!1,r),n=>{let i=this.getRootNode();i.type==="root"&&m(i,wr)&&C(this,xn,n)})}};bn=new WeakMap,Ce=new WeakMap,ee=new WeakMap,te=new WeakMap,Cr=new WeakMap,wr=new WeakMap,xn=new WeakMap,Er=new WeakMap,X=new WeakSet,xd=function(){let{parseRedirect:e}=(ea(),J(Zo)),r=this.firstChild.toString(),n=e(r,m(this,ee),m(this,te));return n!==!1&&this.setText(n),!!n},yd=function(e){let{parseCommentAndExt:r}=(Zr(),J(Al));this.setText(r(this.firstChild.toString(),m(this,ee),m(this,te),e))},Td=function(){let{parseBraces:e}=(ei(),J(za)),r=this.type==="root"?this.firstChild.toString():`\0${this.firstChild.toString()}`,n=e(r,m(this,ee),m(this,te));this.setText(this.type==="root"?n:n.slice(1))},kd=function(){if(m(this,ee).excludes.includes("html"))return;let{parseHtml:e}=(El(),J(wl));this.setText(e(this.firstChild.toString(),m(this,ee),m(this,te)))},vd=function(){if(m(this,ee).excludes.includes("table"))return;let{parseTable:e}=(_l(),J(ql));this.setText(e(this,m(this,ee),m(this,te)))},Ad=function(){if(m(this,ee).excludes.includes("hr"))return;let{parseHrAndDoubleUnderscore:e}=(Gl(),J(zl));this.setText(e(this,m(this,ee),m(this,te)))},Sd=function(e){let{parseLinks:r}=(Yl(),J(Kl));this.setText(r(this.firstChild.toString(),m(this,ee),m(this,te),this.pageName,e))},Cd=function(e){let{parseQuotes:r}=(_s(),J(Vl)),n=this.firstChild.toString().split(`
31
+ `);for(let i=0;i<n.length;i++)n[i]=r(n[i],m(this,ee),m(this,te),e);this.setText(n.join(`
32
+ `))},wd=function(){let{parseExternalLinks:e}=(Ds(),J(Ql));this.setText(e(this.firstChild.toString(),m(this,ee),m(this,te)))},Ed=function(){let{parseMagicLinks:e}=(id(),J(nd));this.setText(e(this.firstChild.toString(),m(this,ee),m(this,te)))},Ld=function(){if(m(this,ee).excludes.includes("list"))return;let{parseList:e}=(dd(),J(ld)),{firstChild:r,type:n,name:i}=this,s=r.toString().split(`
30
33
  `),a={lastPrefix:""},l=n==="root"||n==="ext-inner"&&i==="poem"?0:1;for(;l<s.length;l++)s[l]=e(s[l],a,m(this,ee),m(this,te));this.setText(s.join(`
31
- `))},yd=function(){if(m(this,ee).variants.length>0){let{parseConverter:e}=(ad(),X(od));this.setText(e(this.firstChild.toString(),m(this,ee),m(this,te)))}};L=Gs});var oe,Jn,Al,jo,_n,va,Sl,Se=w(()=>{"use strict";oe={running:!1,run(o,r){let{running:e}=this;this.running=!0;let t=r==null?void 0:r.internal;r&&(r.internal=!0);let n=()=>{this.running=e,r&&(r.internal=t)};try{let{Token:i}=(G(),X(li)),s=o();return s instanceof i&&!s.getAttribute("built")&&s.afterBuild(),n(),s}catch(i){throw n(),i}},internal(o,r){let{internal:e}=r;r.internal=!0;let t=o();return r.internal=e,t},rev:0},Jn=o=>r=>r.type===o,Al=({type:o})=>o==="tr"||o==="table-syntax",jo=o=>o==="redirect-target"||o==="link",_n=(o,r,e,t=[])=>{var s,a;let n=o.getChildNodes(),i;n.length===e?(i=n,n=t):i=Array.prototype.splice.apply(n,[r,e,...t]);for(let l=0;l<t.length;l++){let p=t[l];p.setAttribute("parentNode",o),p.setAttribute("nextSibling",n[r+l+1]),p.setAttribute("previousSibling",n[r+l-1])}return(s=n[r-1])==null||s.setAttribute("nextSibling",n[r]),(a=n[r+t.length])==null||a.setAttribute("previousSibling",n[r+t.length-1]),n===t&&o.setAttribute("childNodes",n),i},va=(o,r)=>{let e=o.toLowerCase(),[t,n]=r,i=Object.prototype.hasOwnProperty.call(n,o);return[e,i,i?n[o]:Object.prototype.hasOwnProperty.call(t,e)&&t[e]]},Sl=(o,r)=>Array.from({length:o},(e,t)=>r(t))});var bn,dp,Td,kd,gp,vd,pp,Hs,Lr,xn,Ad=w(()=>{"use strict";yi();bn=new Map([[0,!1],[1,"warning"],[2,"error"],[!1,!1],["off",!1],["warning","warning"],["error","error"]]),dp={"arg-in-ext":1,"bold-header":[1,{}],"format-leakage":[1,{}],"fostered-content":[1,{}],h1:[1,{}],"illegal-attr":[2,{}],"insecure-style":2,"invalid-gallery":[2,{parameter:1}],"invalid-imagemap":[2,{}],"invalid-invoke":[2,{}],"invalid-isbn":2,"invalid-json":[2,{duplicate:1}],"invalid-url":1,"lonely-apos":[1,{}],"lonely-bracket":[1,{extLink:2}],"lonely-http":[1,{}],"nested-link":[2,{}],"no-arg":1,"no-duplicate":[2,{category:1,id:1,unknownImageParameter:1}],"no-ignored":[2,{fragment:1,galleryComment:1,galleryNoImage:1,include:1,nonWordAttributes:1,redirect:1}],"obsolete-attr":1,"obsolete-tag":1,"parsing-order":[2,{templateInTable:1}],"pipe-like":[1,{double:2}],"syntax-like":[2,{}],"table-layout":1,"tag-like":[2,{disallowed:1,invalid:1}],"unbalanced-header":2,"unclosed-comment":[1,{}],"unclosed-quote":1,"unclosed-table":2,unescaped:2,"unknown-page":1,"unmatched-tag":[1,{both:2,selfClosing:2}],"unterminated-url":[1,{}],"url-encoding":[1,{}],"var-anchor":[1,{}],"void-ext":[2,{}]},Td={configurationComment:"lint",ignoreDisables:!1,fix:!0,computeEditInfo:!0},kd=o=>bn.has(o),gp=o=>kd(o)||Array.isArray(o)&&kd(o[0])&&(o.length===1||typeof o[1]=="object"),vd=(o,r,e)=>{if(!Rr.includes(r))throw new RangeError(`Unknown lint rule: ${r}`);if(e===void 0)return!1;if(gp(e))return o[r]=e,!0;throw new RangeError(`Invalid lint config for ${r}: ${JSON.stringify(e)}`)},pp=typeof structuredClone=="function"?structuredClone:o=>JSON.parse(JSON.stringify(o)),Hs=class{constructor(r){if(Object.assign(this,pp(dp)),!!r)for(let[e,t]of Object.entries(r))vd(this,e,t)}getSeverity(r,e){var n,i;let t=this[r];return typeof t!="object"?bn.get(t):e&&(i=bn.get((n=t[1])==null?void 0:n[e]))!=null?i:bn.get(t[0])}},xn=class{constructor(r){S(this,Lr);if(Object.assign(this,Td),r&&!("rules"in r)&&Object.keys(r).some(t=>Rr.includes(t)))this.rules=r;else{let e=r!=null?r:{},{rules:t}=e,n=bi(e,["rules"]);this.rules=t;for(let[i,s]of Object.entries(n))s!==void 0&&Object.prototype.hasOwnProperty.call(Td,i)&&(this[i]=s)}}get rules(){return m(this,Lr)}set rules(r){C(this,Lr,new Proxy(new Hs(r),{set:vd,deleteProperty(){return!1}}))}getSeverity(r,e){return m(this,Lr).getSeverity(r,e)}};Lr=new WeakMap});var Sd,Tn,kn,Qt,Nr,Xt,di,Cd,yn,wd=w(()=>{"use strict";ze();ae();Sd=o=>{let[,{length:r},e]=/^((?:\.\.\/)*)([\s\S]*)/u.exec(o);return[r/3,e]},yn=class{constructor(r,e,t,{temporary:n,decode:i,selfLink:s,page:a}={}){S(this,di);S(this,Tn);S(this,kn);S(this,Qt);S(this,Nr);S(this,Xt);ce(this,"page");ce(this,"valid");ce(this,"encoded",!1);this.page=a;let l=r.trim(),p=l.startsWith("../");if(i&&r.includes("%"))try{let c=/%(?!21|3[ce]|5[bd]|7[b-d])[\da-f]{2}/iu.test(r);r=At(r),this.encoded=c}catch(c){}if(r=Br(r).replace(/[_ ]+/gu," ").trim(),p||a&&l.startsWith("/"))C(this,Nr,0);else{let c=e;r.startsWith(":")&&(c=0,r=r.slice(1).trim());let f=r.split(":");if(f.length>1){let h=Ue(f[0]),x=Object.prototype.hasOwnProperty.call(t.nsid,h)&&t.nsid[h];x&&(c=x,r=f.slice(1).join(":").trim())}C(this,Nr,c)}let g=r.indexOf("#");if(g!==-1){let c=r.slice(g).trim().slice(1);if(c.includes("%"))try{c=At(c)}catch(f){}C(this,Xt,c.replace(/ /gu,"_")),r=r.slice(0,g).trim()}let[d,u]=p?Sd(r):[0,r];this.valid=!!(r||s&&this.ns===0&&m(this,Xt)!==void 0)&&Br(r)===r&&(d===0||a===void 0||a.split("/",d+1).length>d)&&!/^:|\0\d+[eh!+-]\x7F|[<>[\]{}|\n]|%[\da-f]{2}|(?:^|\/)\.{1,2}(?:$|\/)/iu.test(u),this.main=r,C(this,kn,t.namespaces),C(this,Qt,t.articlePath||"/wiki/$1"),m(this,Qt).includes("$1")||C(this,Qt,m(this,Qt)+`${m(this,Qt).endsWith("/")?"":"/"}$1`)}get ns(){return m(this,Nr)}get fragment(){return m(this,Xt)}get main(){return m(this,Tn)}set main(r){r=r.replace(/_/gu," ").trim(),C(this,Tn,r&&r[0].toUpperCase()+r.slice(1))}get prefix(){let r=m(this,kn)[this.ns];return r+(r&&":")}get title(){return this.getRedirection()[1]}get extension(){let{main:r}=this,e=r.lastIndexOf(".");return e===-1?void 0:r.slice(e+1).toLowerCase()}getRedirection(){let{prefix:r}=this,e=r;return I(this,di,Cd).call(this,e)}setFragment(r){C(this,Xt,r)}getUrl(r){throw new Error("Title.getUrl method is only available in the LSP version!")}};Tn=new WeakMap,kn=new WeakMap,Qt=new WeakMap,Nr=new WeakMap,Xt=new WeakMap,di=new WeakSet,Cd=function(r){var t,n;let e=(r+this.main).replace(/ /gu,"_");if(e.startsWith("/"))e=((t=this.page)!=null?t:"")+e.replace(/(.)\/$/u,"$1");else if(e.startsWith("../")&&((n=this.page)!=null&&n.includes("/"))){let[i,s]=Sd(e),a=this.page.split("/");a.length>i&&(e=a.slice(0,-i).join("/")+(s&&"/")+s)}return[!1,e]}});var Vs,Ed,Ld,fp,vn,Nd,cp,v,D=w(()=>{yi();Se();Nn();ae();Ad();wd();Vs=!0,Ed=new xn,fp=(o,r,e)=>typeof o=="string"?[!!r,e,o]:[!!o,r,e],vn={config:Ti,get rules(){return Rr},get i18n(){return V(V({},void 0),Ld)},set i18n(o){Ld=o},get lintConfig(){return Ed},set lintConfig(o){Ed=new xn(o)},get viewOnly(){return Vs},set viewOnly(o){Vs&&!o&&oe.rev++,Vs=o},internal:!1,getConfig(o){let r=o!=null?o:this.config,{doubleUnderscore:e,ext:t,parserFunction:n,variable:i}=r;for(let s=0;s<2;s++)e.length>s+2&&e[s].length===0&&(e[s]=Object.keys(e[s+2]));return t.includes("translate")&&!i.includes("translationlanguage")&&(i.push("translationlanguage"),n[1].TRANSLATIONLANGUAGE="translationlanguage"),ge(V(V({},Ti),r),{excludes:[]})},msg(o,r=""){var e;return o&&((e=this.i18n[o])!=null?e:o).replace("$1",this.msg(r))},normalizeTitle(o,r=0,e,t=vn.getConfig(),n){let i;if(n!=null&&n.halfParsed)i=new yn(o,r,t,n);else{let{Token:s}=(G(),X(li));i=oe.run(()=>{let a=new s(o,t);a.type="root",a.pageName=n==null?void 0:n.page,a.parseOnce(0,e).parseOnce();let l=new yn(a.firstChild.toString(),r,t,n);a.build();for(let p of["main","fragment"]){let g=l[p];if(g!=null&&g.includes("\0")){let d=a.buildFromStr(g,1);p==="main"?l.main=d:l.setFragment(d)}}return l},this)}return i},parse(o,r,e,t,n){o=go(o);let i,s,a,l;typeof r=="string"?(i=!!e,s=t,a=n,l=r):(i=!!r,s=e,a=t,l=n),s!=null||(s=11),a!=null||(a=this.getConfig());let p;typeof s!="number"&&(p=Array.isArray(s)?s:[s],s=Math.max(...p.map(u=>ao[u]||11)));let{Token:g}=(G(),X(li));return oe.run(()=>{let u=new g(o,a);return u.type="root",u.pageName=l,u.parse(s,i)})},parseWithRef(o,r,e,t=r.getAttribute("include")){return this.parse(o,t,e,r.getAttribute("config"),r.pageName)},createLanguageService(o={}){},lint(o,r,e,t){{let[n,i,s]=fp(r,e,t);return oe.internal(()=>this.parse(o,n,void 0,i,s).lint(),this)}},print(o,r,e,t){}},Nd={},cp=new Set(["lintConfig","normalizeTitle","parse","createLanguageService"]);for(let o of Object.keys(vn))cp.has(o)||(Nd[o]={enumerable:!1});Object.defineProperties(vn,Nd);Object.assign(typeof globalThis=="object"?globalThis:self,{Parser:vn});v=vn});D();})();
34
+ `))},Nd=function(){if(m(this,ee).variants.length>0){let{parseConverter:e}=(bd(),J(hd));this.setText(e(this.firstChild.toString(),m(this,ee),m(this,te)))}};L=Vs});var ne,Yn,Pl,Vo,Dn,Ra,Bl,Se=w(()=>{"use strict";ne={running:!1,run(o,t){let{running:e}=this;this.running=!0;let r=t==null?void 0:t.internal;t&&(t.internal=!0);let n=()=>{this.running=e,t&&(t.internal=r)};try{let{Token:i}=(G(),J(gi)),s=o();return s instanceof i&&!s.getAttribute("built")&&s.afterBuild(),n(),s}catch(i){throw n(),i}},internal(o,t){let{internal:e}=t;t.internal=!0;let r=o();return t.internal=e,r},rev:0},Yn=o=>t=>t.type===o,Pl=({type:o})=>o==="tr"||o==="table-syntax",Vo=o=>o==="redirect-target"||o==="link",Dn=(o,t,e,r=[])=>{var s,a;let n=o.getChildNodes(),i;n.length===e?(i=n,n=r):i=Array.prototype.splice.apply(n,[t,e,...r]);for(let l=0;l<r.length;l++){let p=r[l];p.setAttribute("parentNode",o),p.setAttribute("nextSibling",n[t+l+1]),p.setAttribute("previousSibling",n[t+l-1])}return(s=n[t-1])==null||s.setAttribute("nextSibling",n[t]),(a=n[t+r.length])==null||a.setAttribute("previousSibling",n[t+r.length-1]),n===r&&o.setAttribute("childNodes",n),i},Ra=(o,t)=>{let e=o.toLowerCase(),[r,n]=t,i=Object.prototype.hasOwnProperty.call(n,o);return[e,i,i?n[o]:Object.prototype.hasOwnProperty.call(r,e)&&r[e]]},Bl=(o,t)=>Array.from({length:o},(e,r)=>t(r))});var yn,Tp,$d,Id,kp,Fd,vp,Qs,Lr,Tn,Rd=w(()=>{"use strict";Ti();yn=new Map([[0,!1],[1,"warning"],[2,"error"],[!1,!1],["off",!1],["warning","warning"],["error","error"]]),Tp={"arg-in-ext":1,"bold-header":[1,{}],"format-leakage":[1,{}],"fostered-content":[1,{}],h1:[1,{}],"illegal-attr":[2,{}],"insecure-style":2,"invalid-gallery":[2,{parameter:1}],"invalid-imagemap":[2,{}],"invalid-invoke":[2,{}],"invalid-isbn":2,"invalid-json":[2,{duplicate:1}],"invalid-url":1,"lonely-apos":[1,{}],"lonely-bracket":[1,{extLink:2}],"lonely-http":[1,{}],"nested-link":[2,{}],"no-arg":1,"no-duplicate":[2,{category:1,id:1,unknownImageParameter:1}],"no-ignored":[2,{fragment:1,galleryComment:1,galleryNoImage:1,include:1,nonWordAttributes:1,redirect:1}],"obsolete-attr":1,"obsolete-tag":1,"parsing-order":[2,{templateInTable:1}],"pipe-like":[1,{double:2}],"syntax-like":[2,{}],"table-layout":1,"tag-like":[2,{disallowed:1,invalid:1}],"unbalanced-header":2,"unclosed-comment":[1,{}],"unclosed-quote":1,"unclosed-table":2,unescaped:2,"unknown-page":1,"unmatched-tag":[1,{both:2,selfClosing:2}],"unterminated-url":[1,{}],"url-encoding":[1,{}],"var-anchor":[1,{}],"void-ext":[2,{}]},$d={configurationComment:"lint",ignoreDisables:!1,fix:!0,computeEditInfo:!0},Id=o=>yn.has(o),kp=o=>Id(o)||Array.isArray(o)&&Id(o[0])&&(o.length===1||typeof o[1]=="object"),Fd=(o,t,e)=>{if(!Rr.includes(t))throw new RangeError(`Unknown lint rule: ${t}`);if(e===void 0)return!1;if(kp(e))return o[t]=e,!0;throw new RangeError(`Invalid lint config for ${t}: ${JSON.stringify(e)}`)},vp=typeof structuredClone=="function"?structuredClone:o=>JSON.parse(JSON.stringify(o)),Qs=class{constructor(t){if(Object.assign(this,vp(Tp)),!!t)for(let[e,r]of Object.entries(t))Fd(this,e,r)}getSeverity(t,e){var n,i;let r=this[t];return typeof r!="object"?yn.get(r):e&&(i=yn.get((n=r[1])==null?void 0:n[e]))!=null?i:yn.get(r[0])}},Tn=class{constructor(t){S(this,Lr);if(Object.assign(this,$d),t&&!("rules"in t)&&Object.keys(t).some(r=>Rr.includes(r)))this.rules=t;else{let e=t!=null?t:{},{rules:r}=e,n=Nn(e,["rules"]);this.rules=r;for(let[i,s]of Object.entries(n))s!==void 0&&Object.prototype.hasOwnProperty.call($d,i)&&(this[i]=s)}}get rules(){return m(this,Lr)}set rules(t){C(this,Lr,new Proxy(new Qs(t),{set:Fd,deleteProperty(){return!1}}))}getSeverity(t,e){return m(this,Lr).getSeverity(t,e)}};Lr=new WeakMap});var Pd,vn,An,Jt,Nr,Xt,pi,Bd,kn,jd=w(()=>{"use strict";ze();ae();Pd=o=>{let[,{length:t},e]=/^((?:\.\.\/)*)([\s\S]*)/u.exec(o);return[t/3,e]},kn=class{constructor(t,e,r,{temporary:n,decode:i,selfLink:s,page:a}={}){S(this,pi);S(this,vn);S(this,An);S(this,Jt);S(this,Nr);S(this,Xt);ce(this,"page");ce(this,"valid");ce(this,"encoded",!1);this.page=a;let l=t.trim(),p=l.startsWith("../");if(i&&t.includes("%"))try{let c=/%(?!21|3[ce]|5[bd]|7[b-d])[\da-f]{2}/iu.test(t);t=St(t),this.encoded=c}catch(c){}if(t=Br(t).replace(/[_ ]+/gu," ").trim(),p||a&&l.startsWith("/"))C(this,Nr,0);else{let c=e;t.startsWith(":")&&(c=0,t=t.slice(1).trim());let u=t.split(":");if(u.length>1){let x=Ue(u[0]),h=Object.prototype.hasOwnProperty.call(r.nsid,x)&&r.nsid[x];h&&(c=h,t=u.slice(1).join(":").trim())}C(this,Nr,c)}let g=t.indexOf("#");if(g!==-1){let c=t.slice(g).trim().slice(1);if(c.includes("%"))try{c=St(c)}catch(u){}C(this,Xt,c.replace(/ /gu,"_")),t=t.slice(0,g).trim()}let[d,f]=p?Pd(t):[0,t];this.valid=!!(t||s&&this.ns===0&&m(this,Xt)!==void 0)&&Br(t)===t&&(d===0||a===void 0||a.split("/",d+1).length>d)&&!/^:|\0\d+[eh!+-]\x7F|[<>[\]{}|\n]|%[\da-f]{2}|(?:^|\/)\.{1,2}(?:$|\/)/iu.test(f),this.main=t,C(this,An,r.namespaces),C(this,Jt,r.articlePath||"/wiki/$1"),m(this,Jt).includes("$1")||C(this,Jt,m(this,Jt)+`${m(this,Jt).endsWith("/")?"":"/"}$1`)}get ns(){return m(this,Nr)}get fragment(){return m(this,Xt)}get main(){return m(this,vn)}set main(t){t=t.replace(/_/gu," ").trim(),C(this,vn,t&&t[0].toUpperCase()+t.slice(1))}get prefix(){let t=m(this,An)[this.ns];return t+(t&&":")}get title(){return this.getRedirection()[1]}get extension(){let{main:t}=this,e=t.lastIndexOf(".");return e===-1?void 0:t.slice(e+1).toLowerCase()}getRedirection(){let{prefix:t}=this,e=t;return I(this,pi,Bd).call(this,e)}setFragment(t){C(this,Xt,t)}getUrl(t){throw new Error("Title.getUrl method is only available in the LSP version!")}};vn=new WeakMap,An=new WeakMap,Jt=new WeakMap,Nr=new WeakMap,Xt=new WeakMap,pi=new WeakSet,Bd=function(t){var r,n;let e=(t+this.main).replace(/ /gu,"_");if(e.startsWith("/"))e=((r=this.page)!=null?r:"")+e.replace(/(.)\/$/u,"$1");else if(e.startsWith("../")&&((n=this.page)!=null&&n.includes("/"))){let[i,s]=Pd(e),a=this.page.split("/");a.length>i&&(e=a.slice(0,-i).join("/")+(s&&"/")+s)}return[!1,e]}});var Js,Od,qd,Sp,Sn,_d,Cp,v,D=w(()=>{Ti();Se();Or();ae();Rd();jd();Js=!0,Od=new Tn,Sp=(o,t,e)=>typeof o=="string"?[!!t,e,o]:[!!o,t,e],Sn={config:ki,get rules(){return Rr},get i18n(){return V(V({},void 0),qd)},set i18n(o){qd=o},get lintConfig(){return Od},set lintConfig(o){Od=new Tn(o)},get viewOnly(){return Js},set viewOnly(o){Js&&!o&&ne.rev++,Js=o},internal:!1,getConfig(o){let t=o!=null?o:this.config,{doubleUnderscore:e,ext:r,parserFunction:n,variable:i}=t;for(let s=0;s<2;s++)e.length>s+2&&e[s].length===0&&(e[s]=Object.keys(e[s+2]));return r.includes("translate")&&!i.includes("translationlanguage")&&(i.push("translationlanguage"),n[1].TRANSLATIONLANGUAGE="translationlanguage"),ge(V(V({},ki),t),{excludes:[]})},msg(o,t=""){var e;return o&&((e=this.i18n[o])!=null?e:o).replace("$1",this.msg(t))},normalizeTitle(o,t=0,e,r=Sn.getConfig(),n){let i;if(n!=null&&n.halfParsed)i=new kn(o,t,r,n);else{let{Token:s}=(G(),J(gi));i=ne.run(()=>{let a=new s(o,r);a.type="root",a.pageName=n==null?void 0:n.page,a.parseOnce(0,e).parseOnce();let l=new kn(a.firstChild.toString(),t,r,n);a.build();for(let p of["main","fragment"]){let g=l[p];if(g!=null&&g.includes("\0")){let d=a.buildFromStr(g,1);p==="main"?l.main=d:l.setFragment(d)}}return l},this)}return i},parse(o,t,e,r,n){o=uo(o);let i,s,a,l;typeof t=="string"?(i=!!e,s=r,a=n,l=t):(i=!!t,s=e,a=r,l=n),s!=null||(s=11),a!=null||(a=this.getConfig());let p;typeof s!="number"&&(p=Array.isArray(s)?s:[s],s=Math.max(...p.map(f=>go[f]||11)));let{Token:g}=(G(),J(gi));return ne.run(()=>{let f=new g(o,a);return f.type="root",f.pageName=l,f.parse(s,i)})},parseWithRef(o,t,e,r=t.getAttribute("include")){return this.parse(o,r,e,t.getAttribute("config"),t.pageName)},createLanguageService(o={}){},lint(o,t,e,r){{let[n,i,s]=Sp(t,e,r);return ne.internal(()=>this.parse(o,n,void 0,i,s).lint(),this)}},print(o,t,e,r){}},_d={},Cp=new Set(["lintConfig","normalizeTitle","parse","createLanguageService"]);for(let o of Object.keys(Sn))Cp.has(o)||(_d[o]={enumerable:!1});Object.defineProperties(Sn,_d);Object.assign(typeof globalThis=="object"?globalThis:self,{Parser:Sn});v=Sn});D();})();