wikiparser-node 1.13.8 → 1.14.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.
- package/bundle/bundle.min.js +31 -31
- package/config/default.json +63 -2
- package/config/enwiki.json +2 -0
- package/config/minimum.json +37 -3
- package/config/moegirl.json +0 -1
- package/config/zhwiki.json +2 -0
- package/dist/addon/transclude.js +10 -1
- package/dist/base.d.ts +2 -3
- package/dist/lib/text.js +32 -36
- package/dist/parser/braces.js +2 -2
- package/dist/parser/commentAndExt.js +14 -9
- package/dist/parser/hrAndDoubleUnderscore.js +5 -3
- package/dist/parser/html.js +4 -2
- package/dist/parser/table.js +9 -5
- package/dist/src/arg.js +3 -11
- package/dist/src/attribute.js +8 -24
- package/dist/src/attributes.js +20 -10
- package/dist/src/converterFlags.js +2 -8
- package/dist/src/gallery.js +2 -10
- package/dist/src/heading.js +41 -7
- package/dist/src/html.js +47 -27
- package/dist/src/imageParameter.js +4 -2
- package/dist/src/imagemap.js +8 -1
- package/dist/src/index.d.ts +1 -1
- package/dist/src/index.js +12 -24
- package/dist/src/link/base.js +8 -4
- package/dist/src/link/file.js +6 -2
- package/dist/src/link/galleryImage.js +3 -1
- package/dist/src/link/redirectTarget.js +1 -1
- package/dist/src/magicLink.js +3 -17
- package/dist/src/nested.js +2 -10
- package/dist/src/nowiki/comment.js +1 -1
- package/dist/src/nowiki/index.js +1 -1
- package/dist/src/nowiki/quote.js +10 -8
- package/dist/src/paramTag/index.js +1 -7
- package/dist/src/parameter.js +1 -1
- package/dist/src/table/td.js +1 -0
- package/dist/src/tagPair/include.js +2 -14
- package/dist/src/transclude.js +6 -1
- package/extensions/dist/base.js +1 -1
- package/extensions/dist/codejar.js +1 -1
- package/extensions/dist/lint.js +2 -2
- package/i18n/zh-hans.json +1 -1
- package/i18n/zh-hant.json +1 -1
- package/package.json +3 -3
package/bundle/bundle.min.js
CHANGED
|
@@ -1,38 +1,38 @@
|
|
|
1
|
-
"use strict";(()=>{var zn=Object.create;var De=Object.defineProperty;var Wn=Object.getOwnPropertyDescriptor;var ho=Object.getOwnPropertyNames;var mo=Object.getPrototypeOf,fo=Object.prototype.hasOwnProperty;var Un=(a,r)=>(r=Symbol[a])?r:Symbol.for("Symbol."+a),dt=a=>{throw TypeError(a)};var Dn=(a,r,e)=>r in a?De(a,r,{enumerable:!0,configurable:!0,writable:!0,value:e}):a[r]=e;var Gn=(a,r)=>De(a,"name",{value:r,configurable:!0});var b=(a,r)=>()=>(a&&(r=a(a=0)),r);var Hn=(a,r)=>()=>(r||a((r={exports:{}}).exports,r),r.exports),se=(a,r)=>{for(var e in r)De(a,e,{get:r[e],enumerable:!0})},Vn=(a,r,e,t)=>{if(r&&typeof r=="object"||typeof r=="function")for(let n of ho(r))!fo.call(a,n)&&n!==e&&De(a,n,{get:()=>r[n],enumerable:!(t=Wn(r,n))||t.enumerable});return a};var xo=(a,r,e)=>(e=a!=null?zn(mo(a)):{},Vn(r||!a||!a.__esModule?De(e,"default",{value:a,enumerable:!0}):e,a)),Z=a=>Vn(De({},"__esModule",{value:!0}),a);var le=a=>{var r;return[,,,zn((r=a==null?void 0:a[Un("metadata")])!=null?r:null)]},Xn=["class","method","getter","setter","accessor","field","value","get","set"],Mt=a=>a!==void 0&&typeof a!="function"?dt("Function expected"):a,bo=(a,r,e,t,n)=>({kind:Xn[a],name:r,metadata:t,addInitializer:i=>e._?dt("Already initialized"):n.push(Mt(i||null))}),To=(a,r)=>Dn(r,Un("metadata"),a[3]),de=(a,r,e,t)=>{for(var n=0,i=a[r>>1],s=i&&i.length;n<s;n++)r&1?i[n].call(e):t=i[n].call(e,t);return t},ge=(a,r,e,t,n,i)=>{var s,o,l,p,g,d=r&7,c=!!(r&8),h=!!(r&16),m=d>3?a.length+1:d?c?1:2:0,k=Xn[d+5],x=d>3&&(a[m-1]=[]),A=a[m]||(a[m]=[]),S=d&&(!h&&!c&&(n=n.prototype),d<5&&(d>3||!h)&&Wn(d<4?n:{get[e](){return u(this,i)},set[e](w){return v(this,i,w)}},e));d?h&&d<4&&Gn(i,(d>2?"set ":d>1?"get ":"")+e):Gn(n,e);for(var C=t.length-1;C>=0;C--)p=bo(d,e,l={},a[3],A),d&&(p.static=c,p.private=h,g=p.access={has:h?w=>yo(n,w):w=>e in w},d^3&&(g.get=h?w=>(d^1?u:F)(w,n,d^4?i:S.get):w=>w[e]),d>2&&(g.set=h?(w,L)=>v(w,n,L,d^4?i:S.set):(w,L)=>w[e]=L)),o=(0,t[C])(d?d<4?h?i:S[k]:d>4?void 0:{get:S.get,set:S.set}:n,p),l._=1,d^4||o===void 0?Mt(o)&&(d>4?x.unshift(o):d?h?i=o:S[k]=o:n=o):typeof o!="object"||o===null?dt("Object expected"):(Mt(s=o.get)&&(S.get=s),Mt(s=o.set)&&(S.set=s),Mt(s=o.init)&&x.unshift(s));return d||To(a,n),S&&De(n,e,S),h?d^4?i:S:n},X=(a,r,e)=>Dn(a,typeof r!="symbol"?r+"":r,e),Zr=(a,r,e)=>r.has(a)||dt("Cannot "+e),yo=(a,r)=>Object(r)!==r?dt('Cannot use the "in" operator on this value'):a.has(r),u=(a,r,e)=>(Zr(a,r,"read from private field"),e?e.call(a):r.get(a)),T=(a,r,e)=>r.has(a)?dt("Cannot add the same private member more than once"):r instanceof WeakSet?r.add(a):r.set(a,e),v=(a,r,e,t)=>(Zr(a,r,"write to private field"),t?t.call(a,e):r.set(a,e),e),F=(a,r,e)=>(Zr(a,r,"access private method"),e);var dr=(a,r,e,t)=>({set _(n){v(a,r,n,e)},get _(){return u(a,r,t)}});var Jr,Qn,Zn=b(()=>{"use strict";Jr={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};Object.setPrototypeOf(Jr,null);Qn=["bold-header","format-leakage","fostered-content","h1","illegal-attr","insecure-style","invalid-gallery","invalid-imagemap","invalid-invoke","invalid-isbn","lonely-apos","lonely-bracket","lonely-http","nested-link","no-arg","no-duplicate","no-ignored","obsolete-attr","obsolete-tag","parsing-order","pipe-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"]});var ii=Hn((La,ni)=>{"use strict";var Yr=Object.defineProperty,ko=Object.getOwnPropertyDescriptor,vo=Object.getOwnPropertyNames,Ao=Object.prototype.hasOwnProperty,wo=(a,r)=>{for(var e in r)Yr(a,e,{get:r[e],enumerable:!0})},So=(a,r,e,t)=>{if(r&&typeof r=="object"||typeof r=="function")for(let n of vo(r))!Ao.call(a,n)&&n!==e&&Yr(a,n,{get:()=>r[n],enumerable:!(t=ko(r,n))||t.enumerable});return a},Co=a=>So(Yr({},"__esModule",{value:!0}),a),Kn={};wo(Kn,{CDN:()=>Yn,getObject:()=>Po,loadScript:()=>Ro,normalizeTitle:()=>Lo,numToHex:()=>Io,parseVersion:()=>jo,rawurldecode:()=>ri,setObject:()=>Bo,splitColors:()=>Fo});ni.exports=Co(Kn);var Yn="https://testingcf.jsdelivr.net",ei=String.raw`#(?:[\da-f]{3,4}|(?:[\da-f]{2}){3,4})(?![\p{L}\d_])`,Be=String.raw`(?:\d*\.)?\d+%?`,Jn=String.raw`(?:\d*\.)?\d+(?:deg|grad|rad|turn)?`,ti=String.raw`rgba?\(\s*(?:${String.raw`${new Array(3).fill(Be).join(String.raw`\s+`)}(?:\s*\/\s*${Be})?`}|${String.raw`${new Array(3).fill(Be).join(String.raw`\s*,\s*`)}(?:\s*,\s*${Be})?`})\s*\)`,$o=String.raw`hsla?\(\s*(?:${String.raw`${Jn}\s+${Be}\s+${Be}(?:\s*\/\s*${Be})?`}|${String.raw`${Jn}${String.raw`\s*,\s*(?:\d*\.)?\d+%`.repeat(2)}(?:\s*,\s*${Be})?`})\s*\)`,No=new RegExp(String.raw`(^|[^\p{L}\d_])(${ei}|${ti}|${$o})`,"giu"),Eo=new RegExp(String.raw`(^|[^\p{L}\d_])(${ei}|${ti})`,"giu"),Kr;typeof document=="object"&&(Kr=document.createElement("span"));var ri=a=>decodeURIComponent(a.replace(/%(?![\da-f]{2})/giu,"%25")),Lo=a=>{let r=ri(a);return/[<>[\]|{}]/u.test(r)?r:(Kr.innerHTML=r,Kr.textContent)},Io=a=>Math.round(a*255).toString(16).padStart(2,"0"),Fo=(a,r=!0)=>{let e=[],t=r?No:Eo;t.lastIndex=0;let n=t.exec(a),i=0;for(;n;){let s=n.index+n[1].length;s>i&&e.push([a.slice(i,s),i,s,!1]),{lastIndex:i}=t,e.push([n[2],s,i,!0]),n=t.exec(a)}return a.length>i&&e.push([a.slice(i),i,a.length,!1]),e},Ro=(a,r,e)=>new Promise(t=>{let n=`${Yn}/${a}`,i=globalThis;for(let s of r.split("."))i=i==null?void 0:i[s];if(i)t();else if(e&&typeof define=="function"&&"amd"in define){let s=globalThis.require;s.config({paths:{[r]:n}}),s([r],o=>{Object.assign(globalThis,{[r]:o}),t()})}else{let s=document.createElement("script");s.src=n,s.onload=()=>{t()},document.head.append(s)}}),Po=a=>JSON.parse(String(localStorage.getItem(a))),Bo=(a,r)=>{localStorage.setItem(a,JSON.stringify(r))},jo=a=>a.split(".",3).map(Number)});var gr,si,Ae,we,He,oi,te,ai,pe,qo,Gt,li,di,_o,Oo,gt,Ne,J=b(()=>{"use strict";gr=xo(ii()),si=String.raw`[^[\]<>"\0-\x1F\x7F\p{Zs}\uFFFD]`,Ae=String.raw`(?:\[[\da-f:.]+\]|${si})`,we=String.raw`(?:${si}|\0\d+[cn!~]\x7F)*`,He=(a,r)=>e=>e.replace(a,r),oi=He(/[\0\x7F]|\r$/gmu,""),te=He(/\0\d+[cn]\x7F/gu,""),ai=He(/[\\{}()|.?*+^$[\]]/gu,String.raw`\$&`),pe=(a,r="")=>a.map(e=>typeof e=="string"?e:e.text()).join(r),qo={lt:"<",gt:">",lbrack:"[",rbrack:"]",lbrace:"{",rbrace:"}",nbsp:" ",amp:"&",quot:'"'},Gt=He(/&(?:#(\d+|[Xx][\da-fA-F]+)|([lLgG][tT]|[lr]brac[ke]|nbsp|amp|AMP|quot|QUOT));/gu,(a,r,e)=>r?String.fromCodePoint(+((/^x/iu.test(r)?"0":"")+r)):qo[e.toLowerCase()]),li=He(/&#(\d+|x[\da-f]+);/giu,(a,r)=>String.fromCodePoint(+((/^x/iu.test(r)?"0":"")+r))),di=He(/\n/gu,String.raw`\n`),_o={"&":"amp","<":"lt",">":"gt",'"':"quot","\n":"#10"},Oo=a=>He(a,r=>`&${_o[r]};`),gt=Oo(/[&<>]/gu),Ne=(a,r={})=>{let{pre:e="",post:t="",sep:n=""}=r;return e+a.map(i=>i.print()).join(n)+t}});var gi=Hn((Fa,Mo)=>{Mo.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","828":"Module"},nsid:{file:6,category:14},parserFunction:[{"#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","#regex":"regex","#related":"related","#cscore":"cscore"},["!","=","#FORMAL","#timef","#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:|worldwind://|xmpp:",interwiki:[],img:{},redirection:["#redirect"],variants:[]}});var en,Se=b(()=>{"use strict";en=gi()});var Ve,E,Q=b(()=>{"use strict";E=class{constructor(r,e){T(this,Ve);X(this,"token");X(this,"start");this.token=r,this.start=e}get top(){var r;return(r=u(this,Ve))!=null||v(this,Ve,this.getPosition()),u(this,Ve).top}get left(){var r;return(r=u(this,Ve))!=null||v(this,Ve,this.getPosition()),u(this,Ve).left}getPosition(){return this.token.getRootNode().posFromIndex(this.start)}};Ve=new WeakMap});var pi,$,N,_=b(()=>{"use strict";Q();R();pi=a=>(r,e,t,n,i="error")=>{let{start:s}=e,{top:o,left:l}=e instanceof E?e:new E(r,s),{offsetHeight:p,offsetWidth:g}=r,{startIndex:d,startLine:c,startCol:h}=a(r,s,o,l);return{rule:t,message:f.msg(n),severity:i,startIndex:d,endIndex:d+r.toString().length,startLine:c,endLine:c+p-1,startCol:h,endCol:p===1?h+g:g}},$=pi((a,r,e,t)=>{let n=a.getRelativeIndex(),{top:i,left:s}=a.parentNode.posFromIndex(n);return{startIndex:r+n,startLine:e+i,startCol:i?s:t+s}}),N=pi((a,r,e,t)=>({startIndex:r,startLine:e,startCol:t}))});var pr,ui=b(()=>{"use strict";pr=(a,r,e)=>({type:t,name:n})=>a.split(",").some(i=>{let[s,...o]=i.trim().split("#");return(!s||s===t)&&o.every(l=>l===n)})});var ci,hi,zt,pt,ur,ut,tn=b(()=>{"use strict";ci=a=>{let r=a.split(`
|
|
2
|
-
`),e=r.length;return{height:e,width:r[e-1].length}},
|
|
3
|
-
`);return r>=0&&e>=0&&r<=t.length-1&&e<=t[r].length?t.slice(0,r).reduce((n,i)=>n+i.length+1,0)+e:void 0}posFromIndex(r){let e=String(this);if(r>=-e.length&&r<=e.length){let{height:t,width:n}=
|
|
4
|
-
`),qn=lr.length+C-1,_n=lr[lr.length-1],On=lr.length===1?w+_n.length:_n.length,Ot={rule:Do[I],message:f.msg('lonely "$1"',I==="h"?ee:I),severity:Vr,startIndex:ke,endIndex:Pe,startLine:qn,endLine:qn,startCol:On,endCol:On+xe};if(I==="<")Ot.suggestions=[{desc:"escape",range:[ke,ke+1],text:"<"}];else if(I==="h"&&!(l==="ext-link-text"||l==="link-text")&&/[\p{L}\d_]/u.test(lt||""))Ot.suggestions=[{desc:"whitespace",range:[ke,ke],text:" "}];else if(I==="["&&l==="ext-link-text"){let ae=i.getAbsoluteIndex()+i.toString().length;Ot.suggestions=[{desc:"escape",range:[ae,ae+1],text:"]"}]}else if(I==="]"&&k==="free-ext-link"&&Vr==="error"){let ae=e-o.toString().length;Ot.fix={range:[ae,ae],text:"["}}c.push(Ot)}return c}replaceData(e){F(this,hr,xi).call(this,e)}print(){return gt(this.data)}};hr=new WeakSet,xi=function(e){this.setAttribute("data",e)}});var ue,Xe=b(()=>{"use strict";be();ue=(a=!0,r=!0)=>(e,t)=>{class n extends e{text(){return""}lint(s){return a?[]:super.lint(s)}}return mr(n,e),n}});var Ut,ce,ct=b(()=>{"use strict";P();ce=class extends y{constructor(e,t,n,i,s,o){super(e,i,s,o);T(this,Ut);v(this,Ut,n)}get type(){return u(this,Ut)}lint(e=this.getAbsoluteIndex()){return super.lint(e,!1)}};Ut=new WeakMap});var ht,G,Ee=b(()=>{"use strict";P();G=class extends y{constructor(e,t,n,i,s){super(e,n,i,s);T(this,ht);v(this,ht,t)}get type(){return u(this,ht)}set type(e){v(this,ht,e)}};ht=new WeakMap});var Vo,Qe,Te,qe,Ce,Ht=b(()=>{"use strict";_();Se();Q();R();P();Ee();Vo=a=>a==="redirect-target"||a==="link",Ce=class extends y{constructor(e,t,n=f.getConfig(),i=[],s="|"){super(void 0,n,i,{});T(this,Qe,!0);T(this,Te);T(this,qe);if(this.insertAt(new G(e,"link-target",n,i,{})),t!==void 0){let o=new y(t,n,i,{});o.type="link-text",o.setAttribute("stage",10),this.insertAt(o)}v(this,Te,s)}afterBuild(){v(this,qe,this.getTitle()),u(this,Te).includes("\0")&&v(this,Te,this.buildFromStr(u(this,Te),0)),this.setAttribute("name",u(this,qe).title),super.afterBuild()}setAttribute(e,t){e==="bracket"?v(this,Qe,t):e==="title"?v(this,qe,t):super.setAttribute(e,t)}toString(e){let t=super.toString(e,u(this,Te));return u(this,Qe)?`[[${t}]]`:t}text(){let e=super.text("|");return u(this,Qe)?`[[${e}]]`:e}getAttribute(e){return e==="title"?u(this,qe):e==="padding"?2:super.getAttribute(e)}getGaps(e){return e===0?u(this,Te).length:1}lint(e=this.getAbsoluteIndex(),t){let n=super.lint(e,t),{childNodes:[i,s],type:o}=this,{encoded:l,fragment:p}=u(this,qe),g=new E(this,e);if(i.childNodes.some(({type:d})=>d==="template")&&n.push($(i,g,"unknown-page","template in an internal link target","warning")),l&&n.push($(i,g,"url-encoding","unnecessary URL encoding in an internal link")),o==="link"||o==="category"){let d=s==null?void 0:s.childNodes.find(c=>c.type==="text"&&c.data.includes("|"));if(d){let c=$(s,g,"pipe-like",'additional "|" in the link text',"warning"),h=c.startIndex+d.getRelativeIndex();c.suggestions=[{desc:"escape",range:[h,h+d.data.length],text:d.data.replace(/\|/gu,"|")}],n.push(c)}}if(p!==void 0&&!Vo(o)){let d=$(i,g,"no-ignored","useless fragment"),c=i.childNodes.find(h=>h.type==="text"&&h.data.includes("#"));c&&(d.fix={range:[d.startIndex+c.getRelativeIndex()+c.data.indexOf("#"),d.endIndex],text:""}),n.push(d)}return n}getTitle(e){return this.normalizeTitle(this.firstChild.toString(!0),0,e,!0,!0)}print(){return super.print(u(this,Qe)?{pre:"[[",post:"]]",sep:u(this,Te)}:{sep:u(this,Te)})}};Qe=new WeakMap,Te=new WeakMap,qe=new WeakMap});var re,_e=b(()=>{"use strict";P();re=class extends y{get innerText(){return this.firstChild.data}constructor(r="",e,t){super(r,e,t)}}});var Ti,on,Xo,U,Oe=b(()=>{"use strict";Xe();_e();Ti=[ue()];U=class extends(Xo=re){get type(){return"noinclude"}toString(r){return r?"":super.toString()}};on=le(Xo),U=ge(on,0,"NoincludeToken",Ti,U),de(on,1,U)});var fr,yi=b(()=>{"use strict";_();R();Ht();Oe();fr=class extends Ce{get type(){return"redirect-target"}constructor(r,e,t=f.getConfig(),n=[]){super(r,void 0,t,n),e!==void 0&&this.insertAt(new U(e,t,n))}getTitle(){return this.normalizeTitle(this.firstChild.toString(),0,!0,!0)}lint(r=this.getAbsoluteIndex()){let e=super.lint(r,!1);if(this.length===2){let t=$(this.lastChild,{start:r},"no-ignored","useless link text");t.startIndex--,t.startCol--,t.fix={range:[t.startIndex,t.endIndex],text:""},e.push(t)}return e}}});var ki,Me,mt,an,Qo,Ze,vi=b(()=>{"use strict";Xe();R();P();ct();yi();ki=[ue(!1,!1)];Ze=class extends(Qo=y){constructor(e,t,n,i,s,o=f.getConfig(),l=[]){super(void 0,o,l);T(this,Me);T(this,mt);v(this,Me,e),v(this,mt,s);let p=new RegExp(String.raw`^(?:${o.redirection.join("|")})\s*(?::\s*)?$`,"iu");this.append(new ce(t,p,"redirect-syntax",o,l,{}),new fr(n,i==null?void 0:i.slice(1),o,l))}get type(){return"redirect"}getAttribute(e){return e==="padding"?u(this,Me).length:super.getAttribute(e)}toString(e){return u(this,Me)+super.toString(e)+u(this,mt)}lint(e=this.getAbsoluteIndex()){return this.lastChild.lint(e+u(this,Me).length+this.firstChild.toString().length)}print(){return super.print({pre:u(this,Me),post:u(this,mt)})}};an=le(Qo),Me=new WeakMap,mt=new WeakMap,Ze=ge(an,0,"RedirectToken",ki,Ze),de(an,1,Ze)});var Ai={};se(Ai,{parseRedirect:()=>Zo});var Zo,wi=b(()=>{"use strict";R();vi();Zo=(a,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(a);return t&&f.normalizeTitle(t[3],0,!1,r,!0,!0).valid?(a=`\0${e.length}o\x7F${a.slice(t[0].length)}`,new Ze(...t.slice(1),r,e),a):!1}});var xr,Si=b(()=>{"use strict";P();xr=class extends y{get type(){return"onlyinclude"}toString(r){return`<onlyinclude>${super.toString(r)}</onlyinclude>`}getAttribute(r){return r==="padding"?13:r==="plain"||super.getAttribute(r)}print(){return super.print({pre:'<span class="wpb-ext"><onlyinclude></span>',post:'<span class="wpb-ext"></onlyinclude></span>'})}}});var Ge,ft,ln=b(()=>{"use strict";P();ft=class extends y{constructor(e,t,n,i,s,o=[]){super(void 0,s);T(this,Ge);X(this,"closed");X(this,"selfClosing");this.setAttribute("name",e.toLowerCase()),v(this,Ge,[e,i||e]),this.closed=i!=="",this.selfClosing=i===void 0,this.append(t,n);let l=typeof t=="string"?-1:o.indexOf(t);o.splice(l===-1?1/0:l,0,this)}get innerText(){return this.selfClosing?void 0:this.lastChild.text()}toString(e){let{selfClosing:t,firstChild:n,lastChild:i}=this,[s,o]=u(this,Ge);return t?`<${s}${n.toString(e)}/>`:`<${s}${n.toString(e)}>${i.toString(e)}${this.closed?`</${o}>`:""}`}text(){let[e,t]=u(this,Ge);return this.selfClosing?`<${e}${this.firstChild.text()}/>`:`<${e}${super.text(">")}${this.closed?`</${t}>`:""}`}getAttribute(e){return e==="padding"?u(this,Ge)[0].length+1:super.getAttribute(e)}getGaps(){return 1}print(){let[e,t]=u(this,Ge);return super.print(this.selfClosing?{pre:`<${e}`,post:"/>"}:{pre:`<${e}`,sep:">",post:this.closed?`</${t}>`:""})}};Ge=new WeakMap});var Ci,dn,Jo,Je,$i=b(()=>{"use strict";_();Q();Xe();R();ln();Ci=[ue(!1)];Je=class extends(Jo=ft){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 E(this,r);if(t.data.trim()){let o=$(t,s,"no-ignored","useless attribute","warning");o.suggestions=[{desc:"remove",range:[o.startIndex,o.endIndex],text:""}],e.push(o)}if(!n){let o=N(this,s,"unclosed-comment",f.msg("unclosed $1",`<${i}>`));o.suggestions=[{desc:"close",range:[o.endIndex,o.endIndex],text:`</${i}>`}],e.push(o)}return e}};dn=le(Jo),Je=ge(dn,0,"IncludeToken",Ci,Je),de(dn,1,Je)});var V,Ni,Ei,Tr,gn,Li,xt,Ii,Fi,Ri,br,Pi,Bi,ji,qi,_i=b(()=>{"use strict";V=new Set(["align"]),Ni=new Set(["cite"]),Ei=new Set(["cite","datetime"]),Tr=new Set(["width"]),gn=new Set(["axis","align","bgcolor","height","width","valign"]),Li=new Set([...gn,"abbr","headers","scope","rowspan","colspan"]),xt=new Set(["type"]),Ii=new Set(["summary","align","bgcolor","cellpadding","cellspacing","frame","rules","width"]),Fi=new Set(["clear"]),Ri=new Set(["bgcolor","align","valign"]),br=new Set,Pi=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"]),Bi={div:V,h1:V,h2:V,h3:V,h4:V,h5:V,h6:V,blockquote:Ni,q:Ni,p:V,br:Fi,pre:Tr,ins:Ei,del:Ei,ul:xt,ol:new Set(["type","start","reversed"]),li:new Set(["type","value"]),table:new Set([...Ii,"border"]),caption:V,tr:Ri,td:Li,th:Li,img:new Set(["alt","src","width","height","srcset"]),font:new Set(["size","color","face"]),hr:Tr,data:new Set(["value"]),time:new Set(["datetime"]),meta:new Set(["itemprop","content"]),link:new Set(["itemprop","href","title"]),gallery:xt,poem:V,categorytree:V,combooption:V},ji={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:br,indicator:new Set(["name"]),langconvert:new Set(["from","to"]),ref:new Set(["group","name","extends","follow","dir"]),references:new Set(["group","responsive"]),charinsert:new Set(["label"]),choose:new Set(["uncached","before","after"]),option:new Set(["weight"]),imagemap:br,inputbox:br,templatestyles:new Set(["src","wrapper"]),dynamicpagelist:br,poll:new Set(["id","show-results-before-voting"]),sm2:xt,flashmp3:xt,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"])},qi={table:Ii,td:new Set([...gn,"scope"]),th:gn,br:Fi,caption:V,div:V,hr:Tr,h1:V,h2:V,h3:V,h4:V,h5:V,h6:V,li:xt,p:V,pre:Tr,tr:Ri,ul:xt}});var Ko,Vt,bt,Y,$e,Tt,Oi=b(()=>{"use strict";_();J();Se();_i();Q();R();P();Ee();Ko=/expression|(?:accelerator|-o-link(?:-source)?|-o-replace)\s*:|(?:url|image(?:-set)?)\s*\(|attr\s*\([^)]+[\s,]url/u,Tt=class extends y{constructor(e,t,n,i="",s,o=[],l=f.getConfig(),p=[]){let g=new G(n,"attr-key",l,p),d;if(n==="title"||t==="img"&&n==="alt")d=new y(s,l,p,{}),d.type="attr-value",d.setAttribute("stage",10);else if(t==="gallery"&&n==="caption"||t==="choose"&&(n==="before"||n==="after")){let c={...l,excludes:[...l.excludes,"heading","html","table","hr","list"]};d=new y(s,c,p,{}),d.type="attr-value",d.setAttribute("stage",1)}else d=new G(s,"attr-value",l,p,{});super(void 0,l,p);T(this,Vt);T(this,bt);T(this,Y);T(this,$e);v(this,Vt,e),this.append(g,d),v(this,Y,i),v(this,$e,[...o]),v(this,bt,t),this.setAttribute("name",te(n).trim().toLowerCase())}get type(){return u(this,Vt)}get tag(){return u(this,bt)}get balanced(){return!u(this,Y)||u(this,$e)[0]===u(this,$e)[1]}afterBuild(){u(this,Y).includes("\0")&&v(this,Y,this.buildFromStr(u(this,Y),0)),this.parentNode&&v(this,bt,this.parentNode.name),this.setAttribute("name",this.firstChild.toString(!0).trim().toLowerCase()),super.afterBuild()}toString(e){let[t="",n=""]=u(this,$e);return u(this,Y)?super.toString(e,u(this,Y)+t)+n:this.firstChild.toString(e)}text(){return u(this,Y)?`${super.text(`${u(this,Y).trim()}"`)}"`:this.firstChild.text()}getGaps(){var e,t;return u(this,Y)?u(this,Y).length+((t=(e=u(this,$e)[0])==null?void 0:e.length)!=null?t:0):0}lint(e=this.getAbsoluteIndex(),t){var k;let n=super.lint(e,t),{balanced:i,firstChild:s,lastChild:o,type:l,name:p,tag:g}=this,d=this.getValue(),c=new E(this,e);if(!i){let x=$(o,c,"unclosed-quote",f.msg("unclosed $1","quotes"),"warning");x.startIndex--,x.startCol--;let A={range:[x.endIndex,x.endIndex],text:u(this,$e)[0]};o.childNodes.some(({type:S,data:C})=>S==="text"&&/\s/u.test(C))?x.suggestions=[{desc:"close",...A}]:x.fix=A,n.push(x)}let h=ji[g],m=Bi[g];if(!(h!=null&&h.has(p))&&!(m!=null&&m.has(p))&&(l==="ext-attr"?h||m:!/\{\{[^{]+\}\}/u.test(p))&&(l==="ext-attr"&&!m||!/^(?:xmlns:[\w:.-]+|data-(?!ooui|mw|parsoid)[^:]*)$/u.test(p)&&(g==="meta"||g==="link"||!Pi.has(p))))n.push($(s,c,"illegal-attr","illegal attribute name"));else if((k=qi[g])!=null&&k.has(p))n.push($(s,c,"obsolete-attr","obsolete attribute","warning"));else if(p==="style"&&typeof d=="string"&&Ko.test(d))n.push($(o,c,"insecure-style","insecure style"));else if(p==="tabindex"&&typeof d=="string"&&d!=="0"){let x=$(o,c,"illegal-attr","nonzero tabindex");x.suggestions=[{desc:"remove",range:[e,x.endIndex],text:""},{desc:"0 tabindex",range:[x.startIndex,x.endIndex],text:"0"}],n.push(x)}return n}getValue(){return u(this,Y)?this.lastChild.text().trim():this.type==="ext-attr"||""}print(){let[e="",t=""]=u(this,$e);return u(this,Y)?super.print({sep:gt(u(this,Y))+e,post:t}):super.print()}};Vt=new WeakMap,bt=new WeakMap,Y=new WeakMap,$e=new WeakMap});var Mi,Yo,Xt,ze,yr=b(()=>{"use strict";_();J();Q();R();P();Ee();Oi();Mi=a=>a.slice(0,-1),Yo=a=>`${Mi(a)}-dirty`,ze=class extends y{constructor(e,t,n,i=f.getConfig(),s=[]){super(void 0,i,s,{});T(this,Xt);if(v(this,Xt,t),this.setAttribute("name",n),e){let o=/([^\s/](?:(?!\0\d+~\x7F)[^\s/=])*)(?:((?:\s(?:\s|\0\d+[cn]\x7F)*)?(?:=|\0\d+~\x7F)(?:\s|\0\d+[cn]\x7F)*)(?:(["'])(.*?)(\3|$)|(\S*)))?/gsu,l="",p=o.exec(e),g=0,d=()=>{l&&(super.insertAt(new G(l,Yo(t),i,s,{})),l="")};for(;p;){let{index:c,0:h,1:m,2:k,3:x,4:A,5:S,6:C}=p;if(l+=e.slice(g,c),/^(?:[\w:]|\0\d+t\x7F)(?:[\w:.-]|\0\d+t\x7F)*$/u.test(te(m).trim())){let w=A!=null?A:C,L=[x,S],B=new Tt(Mi(t),n,m,k,w,L,i,s);d(),super.insertAt(B)}else l+=h;({lastIndex:g}=o),p=o.exec(e)}l+=e.slice(g),d()}}get type(){return u(this,Xt)}afterBuild(){let{parentNode:e}=this;(e==null?void 0:e.type)==="td"&&e.subtype==="caption"&&this.setAttribute("name","caption"),super.afterBuild()}getAttrTokens(e){return this.childNodes.filter(t=>t instanceof Tt&&(!e||t.name===e.toLowerCase().trim()))}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,o=new Map,l=new Set,p=new E(this,e);if((i==null?void 0:i.type)==="html"&&i.closing&&this.text().trim()){let g=N(this,p,"no-ignored","attributes of a closing tag");g.fix={range:[e,g.endIndex],text:""},n.push(g)}for(let g of s)if(g instanceof Tt){let{name:d}=g;o.has(d)?(l.add(d),o.get(d).push(g)):o.set(d,[g])}else{let d=g.text().trim();if(d){let c=$(g,p,"no-ignored","containing invalid attribute",/[\p{L}\d]/u.test(d)?"error":"warning");c.suggestions=[{desc:"remove",range:[c.startIndex,c.endIndex],text:" "}],n.push(c)}}if(l.size>0)for(let g of l)n.push(...o.get(g).map(d=>$(d,p,"no-duplicate",f.msg("duplicated $1 attribute",g))));return n}print(){return this.toString()?`<span class="wpb-${this.type}">${this.childNodes.map(e=>e.print(e instanceof G?{class:e.toString().trim()&&"attr-dirty"}:void 0)).join("")}</span>`:""}};Xt=new WeakMap});var kr,Gi=b(()=>{"use strict";Se();R();P();Oe();kr=class extends y{get type(){return"ext-inner"}constructor(r,e=f.getConfig(),t=[]){if(r){let n=/<nowiki>/giu,i=/<\/nowiki>/giu,{length:s}=n.source,o=n.exec(r);o&&(i.lastIndex=o.index+s);let l=i.exec(r),p=0,g="";for(;o&&l;)new U(o[0],e,t),new U(l[0],e,t),g+=`${r.slice(p,o.index)}\0${t.length-1}n\x7F${r.slice(o.index+s,l.index)}\0${t.length}n\x7F`,p=l.index+s+1,n.lastIndex=p,o=n.exec(r),o&&(i.lastIndex=o.index+s),l=i.exec(r);r=g+r.slice(p)}super(r,e,t,{}),this.setAttribute("stage",10)}getAttribute(r){return r==="plain"||super.getAttribute(r)}lint(r=this.getAbsoluteIndex()){return super.lint(r,/<\s*\/\s*(pre)\b/giu)}}});var yt,pn=b(()=>{"use strict";_();Q();Qt();R();P();Ee();yt=class extends y{get type(){return"ext-inner"}constructor(r,e,t=f.getConfig(),n=[],i){if(super(void 0,t,n,{}),e){let s=G;this.append(...e.split(`
|
|
5
|
-
`).map(o=>i?o:
|
|
1
|
+
"use strict";(()=>{var Dn=Object.create;var Ve=Object.defineProperty;var Hn=Object.getOwnPropertyDescriptor;var ko=Object.getOwnPropertyNames;var vo=Object.getPrototypeOf,Ao=Object.prototype.hasOwnProperty;var Vn=(a,r)=>(r=Symbol[a])?r:Symbol.for("Symbol."+a),pt=a=>{throw TypeError(a)};var Xn=(a,r,e)=>r in a?Ve(a,r,{enumerable:!0,configurable:!0,writable:!0,value:e}):a[r]=e;var Wn=(a,r)=>Ve(a,"name",{value:r,configurable:!0});var y=(a,r)=>()=>(a&&(r=a(a=0)),r);var Qn=(a,r)=>()=>(r||a((r={exports:{}}).exports,r),r.exports),oe=(a,r)=>{for(var e in r)Ve(a,e,{get:r[e],enumerable:!0})},Zn=(a,r,e,t)=>{if(r&&typeof r=="object"||typeof r=="function")for(let n of ko(r))!Ao.call(a,n)&&n!==e&&Ve(a,n,{get:()=>r[n],enumerable:!(t=Hn(r,n))||t.enumerable});return a};var wo=(a,r,e)=>(e=a!=null?Dn(vo(a)):{},Zn(r||!a||!a.__esModule?Ve(e,"default",{value:a,enumerable:!0}):e,a)),K=a=>Zn(Ve({},"__esModule",{value:!0}),a);var ge=a=>{var r;return[,,,Dn((r=a==null?void 0:a[Vn("metadata")])!=null?r:null)]},Jn=["class","method","getter","setter","accessor","field","value","get","set"],Gt=a=>a!==void 0&&typeof a!="function"?pt("Function expected"):a,So=(a,r,e,t,n)=>({kind:Jn[a],name:r,metadata:t,addInitializer:i=>e._?pt("Already initialized"):n.push(Gt(i||null))}),Co=(a,r)=>Xn(r,Vn("metadata"),a[3]),pe=(a,r,e,t)=>{for(var n=0,i=a[r>>1],s=i&&i.length;n<s;n++)r&1?i[n].call(e):t=i[n].call(e,t);return t},ue=(a,r,e,t,n,i)=>{var s,o,l,p,g,d=r&7,c=!!(r&8),h=!!(r&16),m=d>3?a.length+1:d?c?1:2:0,f=Jn[d+5],x=d>3&&(a[m-1]=[]),T=a[m]||(a[m]=[]),w=d&&(!h&&!c&&(n=n.prototype),d<5&&(d>3||!h)&&Hn(d<4?n:{get[e](){return u(this,i)},set[e](C){return A(this,i,C)}},e));d?h&&d<4&&Wn(i,(d>2?"set ":d>1?"get ":"")+e):Wn(n,e);for(var S=t.length-1;S>=0;S--)p=So(d,e,l={},a[3],T),d&&(p.static=c,p.private=h,g=p.access={has:h?C=>$o(n,C):C=>e in C},d^3&&(g.get=h?C=>(d^1?u:L)(C,n,d^4?i:w.get):C=>C[e]),d>2&&(g.set=h?(C,E)=>A(C,n,E,d^4?i:w.set):(C,E)=>C[e]=E)),o=(0,t[S])(d?d<4?h?i:w[f]:d>4?void 0:{get:w.get,set:w.set}:n,p),l._=1,d^4||o===void 0?Gt(o)&&(d>4?x.unshift(o):d?h?i=o:w[f]=o:n=o):typeof o!="object"||o===null?pt("Object expected"):(Gt(s=o.get)&&(w.get=s),Gt(s=o.set)&&(w.set=s),Gt(s=o.init)&&x.unshift(s));return d||Co(a,n),w&&Ve(n,e,w),h?d^4?i:w:n},V=(a,r,e)=>Xn(a,typeof r!="symbol"?r+"":r,e),Jr=(a,r,e)=>r.has(a)||pt("Cannot "+e),$o=(a,r)=>Object(r)!==r?pt('Cannot use the "in" operator on this value'):a.has(r),u=(a,r,e)=>(Jr(a,r,"read from private field"),e?e.call(a):r.get(a)),k=(a,r,e)=>r.has(a)?pt("Cannot add the same private member more than once"):r instanceof WeakSet?r.add(a):r.set(a,e),A=(a,r,e,t)=>(Jr(a,r,"write to private field"),t?t.call(a,e):r.set(a,e),e),L=(a,r,e)=>(Jr(a,r,"access private method"),e);var pr=(a,r,e,t)=>({set _(n){A(a,r,n,e)},get _(){return u(a,r,t)}});var Kr,Kn,Yn=y(()=>{"use strict";Kr={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};Object.setPrototypeOf(Kr,null);Kn=["bold-header","format-leakage","fostered-content","h1","illegal-attr","insecure-style","invalid-gallery","invalid-imagemap","invalid-invoke","invalid-isbn","lonely-apos","lonely-bracket","lonely-http","nested-link","no-arg","no-duplicate","no-ignored","obsolete-attr","obsolete-tag","parsing-order","pipe-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"]});var ai=Qn((Ma,oi)=>{"use strict";var en=Object.defineProperty,No=Object.getOwnPropertyDescriptor,Eo=Object.getOwnPropertyNames,Io=Object.prototype.hasOwnProperty,Lo=(a,r)=>{for(var e in r)en(a,e,{get:r[e],enumerable:!0})},Fo=(a,r,e,t)=>{if(r&&typeof r=="object"||typeof r=="function")for(let n of Eo(r))!Io.call(a,n)&&n!==e&&en(a,n,{get:()=>r[n],enumerable:!(t=No(r,n))||t.enumerable});return a},Ro=a=>Fo(en({},"__esModule",{value:!0}),a),ti={};Lo(ti,{CDN:()=>ri,getObject:()=>Go,loadScript:()=>Mo,normalizeTitle:()=>qo,numToHex:()=>_o,parseVersion:()=>zo,rawurldecode:()=>si,setObject:()=>Uo,splitColors:()=>Oo});oi.exports=Ro(ti);var ri="https://testingcf.jsdelivr.net",ni=String.raw`#(?:[\da-f]{3,4}|(?:[\da-f]{2}){3,4})(?![\p{L}\d_])`,Be=String.raw`(?:\d*\.)?\d+%?`,ei=String.raw`(?:\d*\.)?\d+(?:deg|grad|rad|turn)?`,ii=String.raw`rgba?\(\s*(?:${String.raw`${new Array(3).fill(Be).join(String.raw`\s+`)}(?:\s*\/\s*${Be})?`}|${String.raw`${new Array(3).fill(Be).join(String.raw`\s*,\s*`)}(?:\s*,\s*${Be})?`})\s*\)`,Po=String.raw`hsla?\(\s*(?:${String.raw`${ei}\s+${Be}\s+${Be}(?:\s*\/\s*${Be})?`}|${String.raw`${ei}${String.raw`\s*,\s*(?:\d*\.)?\d+%`.repeat(2)}(?:\s*,\s*${Be})?`})\s*\)`,Bo=new RegExp(String.raw`(^|[^\p{L}\d_])(${ni}|${ii}|${Po})`,"giu"),jo=new RegExp(String.raw`(^|[^\p{L}\d_])(${ni}|${ii})`,"giu"),Yr;typeof document=="object"&&(Yr=document.createElement("span"));var si=a=>decodeURIComponent(a.replace(/%(?![\da-f]{2})/giu,"%25")),qo=a=>{let r=si(a);return/[<>[\]|{}]/u.test(r)?r:(Yr.innerHTML=r,Yr.textContent)},_o=a=>Math.round(a*255).toString(16).padStart(2,"0"),Oo=(a,r=!0)=>{let e=[],t=r?Bo:jo;t.lastIndex=0;let n=t.exec(a),i=0;for(;n;){let s=n.index+n[1].length;s>i&&e.push([a.slice(i,s),i,s,!1]),{lastIndex:i}=t,e.push([n[2],s,i,!0]),n=t.exec(a)}return a.length>i&&e.push([a.slice(i),i,a.length,!1]),e},Mo=(a,r,e)=>new Promise(t=>{let n=`${ri}/${a}`,i=globalThis;for(let s of r.split("."))i=i==null?void 0:i[s];if(i)t();else if(e&&typeof define=="function"&&"amd"in define){let s=globalThis.require;s.config({paths:{[r]:n}}),s([r],o=>{Object.assign(globalThis,{[r]:o}),t()})}else{let s=document.createElement("script");s.src=n,s.onload=()=>{t()},document.head.append(s)}}),Go=a=>JSON.parse(String(localStorage.getItem(a))),Uo=(a,r)=>{localStorage.setItem(a,JSON.stringify(r))},zo=a=>a.split(".",3).map(Number)});var je,li,Ae,we,Xe,di,ne,gi,ce,Wo,Ut,pi,ui,Do,Ho,ut,Ne,X=y(()=>{"use strict";je=wo(ai()),li=String.raw`[^[\]<>"\0-\x1F\x7F\p{Zs}\uFFFD]`,Ae=String.raw`(?:\[[\da-f:.]+\]|${li})`,we=String.raw`(?:${li}|\0\d+[cn!~]\x7F)*`,Xe=(a,r)=>e=>e.replace(a,r),di=Xe(/[\0\x7F]|\r$/gmu,""),ne=Xe(/\0\d+[cn]\x7F/gu,""),gi=Xe(/[\\{}()|.?*+^$[\]]/gu,String.raw`\$&`),ce=(a,r="")=>a.map(e=>typeof e=="string"?e:e.text()).join(r),Wo={lt:"<",gt:">",lbrack:"[",rbrack:"]",lbrace:"{",rbrace:"}",nbsp:" ",amp:"&",quot:'"'},Ut=Xe(/&(?:#(\d+|[Xx][\da-fA-F]+)|([lLgG][tT]|[lr]brac[ke]|nbsp|amp|AMP|quot|QUOT));/gu,(a,r,e)=>r?String.fromCodePoint(+((/^x/iu.test(r)?"0":"")+r)):Wo[e.toLowerCase()]),pi=Xe(/&#(\d+|x[\da-f]+);/giu,(a,r)=>String.fromCodePoint(+((/^x/iu.test(r)?"0":"")+r))),ui=Xe(/\n/gu,String.raw`\n`),Do={"&":"amp","<":"lt",">":"gt",'"':"quot","\n":"#10"},Ho=a=>Xe(a,r=>`&${Do[r]};`),ut=Ho(/[&<>]/gu),Ne=(a,r={})=>{let{pre:e="",post:t="",sep:n=""}=r;return e+a.map(i=>i.print()).join(n)+t}});var ci=Qn((Ua,Vo)=>{Vo.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},parserFunction:[{"#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","#cscore":"cscore","#regex":"regex","#regex_var":"regex_var","#regexquote":"regexquote","#regexall":"regexall","#len":"len","#pos":"pos","#rpos":"rpos","#sub":"sub","#count":"count","#replace":"replace","#explode":"explode","#tab":"tab","#seo":"seo","#babel":"babel","#commaseparatedlist":"commaseparatedlist","#coordinates":"coordinates","#lst":"lst","#lsth":"lsth","#lstx":"lstx","#assessment":"assessment","#mentor":"mentor","#property":"property","#target":"target","#section":"section","#section-x":"section-x","#section-h":"section-h","#statements":"statements"},["!","=","#FORMAL","#bcp47","#dir","#interwikilink","#interlanguagelink","#timef","#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:|worldwind://|xmpp:",interwiki:[],img:{},redirection:["#redirect"],variants:[]}});var tn,Se=y(()=>{"use strict";tn=ci()});var Qe,I,Q=y(()=>{"use strict";I=class{constructor(r,e){k(this,Qe);V(this,"token");V(this,"start");this.token=r,this.start=e}get top(){var r;return(r=u(this,Qe))!=null||A(this,Qe,this.getPosition()),u(this,Qe).top}get left(){var r;return(r=u(this,Qe))!=null||A(this,Qe,this.getPosition()),u(this,Qe).left}getPosition(){return this.token.getRootNode().posFromIndex(this.start)}};Qe=new WeakMap});var hi,$,N,j=y(()=>{"use strict";Q();F();hi=a=>(r,e,t,n,i="error")=>{let{start:s}=e,{top:o,left:l}=e instanceof I?e:new I(r,s),{offsetHeight:p,offsetWidth:g}=r,{startIndex:d,startLine:c,startCol:h}=a(r,s,o,l);return{rule:t,message:b.msg(n),severity:i,startIndex:d,endIndex:d+r.toString().length,startLine:c,endLine:c+p-1,startCol:h,endCol:p===1?h+g:g}},$=hi((a,r,e,t)=>{let n=a.getRelativeIndex(),{top:i,left:s}=a.parentNode.posFromIndex(n);return{startIndex:r+n,startLine:e+i,startCol:i?s:t+s}}),N=hi((a,r,e,t)=>({startIndex:r,startLine:e,startCol:t}))});var ur,mi=y(()=>{"use strict";ur=(a,r,e)=>({type:t,name:n})=>a.split(",").some(i=>{let[s,...o]=i.trim().split("#");return(!s||s===t)&&o.every(l=>l===n)})});var fi,xi,zt,ct,cr,ht,rn=y(()=>{"use strict";fi=a=>{let r=a.split(`
|
|
2
|
+
`),e=r.length;return{height:e,width:r[e-1].length}},xi=(a,r)=>r.childNodes.slice(0,a).reduce((e,t,n)=>e+t.toString().length+r.getGaps(n),0)+r.getAttribute("padding"),ht=class{constructor(){k(this,ct);V(this,"childNodes",[]);k(this,zt)}get firstChild(){return this.childNodes[0]}get lastChild(){return this.childNodes[this.childNodes.length-1]}get parentNode(){return u(this,zt)}get nextSibling(){var e;let r=(e=this.parentNode)==null?void 0:e.childNodes;return r&&r[r.indexOf(this)+1]}get previousSibling(){var e;let r=(e=this.parentNode)==null?void 0:e.childNodes;return r&&r[r.indexOf(this)-1]}get offsetHeight(){return L(this,ct,cr).call(this).height}get offsetWidth(){return L(this,ct,cr).call(this).width}getAttribute(r){return r==="padding"?0:this[r]}setAttribute(r,e){r==="parentNode"?A(this,zt,e):this[r]=e}getRootNode(){let{parentNode:r}=this;for(;r!=null&&r.parentNode;)({parentNode:r}=r);return r!=null?r:this}indexFromPos(r,e){let t=String(this).split(`
|
|
3
|
+
`);return r>=0&&e>=0&&r<=t.length-1&&e<=t[r].length?t.slice(0,r).reduce((n,i)=>n+i.length+1,0)+e:void 0}posFromIndex(r){let e=String(this);if(r>=-e.length&&r<=e.length){let{height:t,width:n}=fi(e.slice(0,r));return{top:t-1,left:n}}}getGaps(r){return 0}getRelativeIndex(r){if(r===void 0){let{parentNode:e}=this;return e?xi(e.childNodes.indexOf(this),e):0}return xi(r,this)}getAbsoluteIndex(){let{parentNode:r}=this;return r?r.getAbsoluteIndex()+this.getRelativeIndex():0}getBoundingClientRect(){return{...L(this,ct,cr).call(this),...this.getRootNode().posFromIndex(this.getAbsoluteIndex())}}seal(r,e){Object.defineProperty(this,r,{enumerable:!e&&!!this[r],configurable:!0})}is(r){return this.type===r}};zt=new WeakMap,ct=new WeakSet,cr=function(){return fi(String(this))}});var qe,nn,sn,hr,bi=y(()=>{"use strict";X();Te();mi();rn();hr=class extends ht{constructor(){super(...arguments);k(this,qe)}get length(){return this.childNodes.length}text(e){return ce(this.childNodes,e)}normalize(){let e=[...this.childNodes],t=n=>{e.splice(n,1)};for(let n=e.length-1;n>=0;n--){let{type:i,data:s}=e[n];i!=="text"||this.getGaps(n-1)||s===""&&t(n)}this.setAttribute("childNodes",e)}removeAt(e){return on(this,e,1)[0]}insertAt(e,t=this.length){return on(this,t,0,[e]),e}closest(e){let t=ur(e,this),{parentNode:n}=this;for(;n;){if(t(n))return n;({parentNode:n}=n)}}querySelector(e){let t=ur(e,this);return L(this,qe,nn).call(this,t)}querySelectorAll(e){let t=ur(e,this);return L(this,qe,sn).call(this,t)}append(...e){for(let t of e)this.insertAt(t)}replaceChildren(...e){for(let t=this.length-1;t>=0;t--)this.removeAt(t);this.append(...e)}setText(e,t=0){t+=t<0?this.length:0;let n=this.childNodes[t],{data:i}=n;return n.replaceData(e),i}toString(e,t=""){return this.childNodes.map(n=>n.toString(e)).join(t)}lint(e=this.getAbsoluteIndex(),t){let n=[];for(let i=0,s=e+this.getAttribute("padding");i<this.length;i++){let o=this.childNodes[i];n.push(...o.lint(s,t)),s+=o.toString().length+this.getGaps(i)}return n}print(e={}){let t=e.class;return this.toString()?`${t===""?"":`<span class="wpb-${t!=null?t:this.type}">`}${Ne(this.childNodes,e)}${t===""?"":"</span>"}`:""}json(e,t=this.getAbsoluteIndex()){let n={...this,type:this.type,range:[t,t+this.toString().length],childNodes:[]};for(let i=0,s=t+this.getAttribute("padding");i<this.length;i++){let o=this.childNodes[i],{length:l}=o.toString();n.childNodes.push(o.type==="text"?{data:o.data,range:[s,s+l]}:o.json(void 0,s)),s+=l+this.getGaps(i)}return n}};qe=new WeakSet,nn=function(e){var t;for(let n of this.childNodes){if(n.type==="text")continue;if(e(n))return n;let i=L(t=n,qe,nn).call(t,e);if(i)return i}},sn=function(e){var n;let t=[];for(let i of this.childNodes)i.type!=="text"&&(e(i)&&t.push(i),t.push(...L(n=i,qe,sn).call(n,e)));return t}});var an,Ti,Xo,Qo,Zo,Jo,Ko,Yo,ea,mr,yi,Wt,ki=y(()=>{"use strict";X();F();rn();an=String.raw`[\p{Zs}\t]*`,Ti=String.raw`<\s*(?:/\s*)?([a-z]\w*)|\{+|\}+|\[{2,}|\[(?![^[]*?\])|((?:^|\])[^[]*?)\]+|(?:rfc|pmid)(?=[-::]?${an}\d)|isbn(?=[-::]?${an}(?:\d(?:${an}|-)){6})`,Xo=new RegExp(String.raw`${Ti}|https?[:/]/+`,"giu"),Qo=new RegExp(Ti,"giu"),Zo=new RegExp(String.raw`^https?://${Ae}${we}\.(?:gif|png|jpg|jpeg)$`,"iu"),Jo=new Set(["attr-value","ext-link-text","link-text"]),Ko={"[":/[[\]]/u,"{":/[{}]/u,"]":/[[\]](?=[^[\]]*$)/u,"}":/[{}](?=[^{}]*$)/u},Yo={"<":"tag-like","[":"lonely-bracket","{":"lonely-bracket","]":"lonely-bracket","}":"lonely-bracket",h:"lonely-http",r:"lonely-http",p:"lonely-http",i:"lonely-http"},ea=["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"],Wt=class extends ht{constructor(e){super();k(this,mr);V(this,"data","");Object.defineProperties(this,{childNodes:{enumerable:!1,configurable:!1},data:{value:e}})}get type(){return"text"}toString(e){var t;return e&&!((t=this.parentNode)!=null&&t.getAttribute("built"))?ne(this.data):this.data}text(){return this.data}lint(e=this.getAbsoluteIndex(),t){var H,B,Y;if(t===!1)return[];let{data:n,parentNode:i,nextSibling:s,previousSibling:o}=this;if(!i)throw new Error("An isolated text node cannot be linted!");let{type:l,name:p,parentNode:g}=i,d=!1;if(l==="attr-value"){let{type:G,name:Z,tag:W}=g;if(G!=="ext-attr")d=!0;else if(W==="choose"&&(Z==="before"||Z==="after"))return[]}if(t!=null||(t=l==="free-ext-link"||l==="ext-link-url"||l==="ext-link-text"||l==="image-parameter"&&p==="link"||d?Qo:Xo),n.search(t)===-1)return[];t.lastIndex=0;let c=[],h=s==null?void 0:s.type,m=s==null?void 0:s.name,f=o==null?void 0:o.type,x=this.getRootNode(),T=x.toString(),{ext:w,html:S}=x.getAttribute("config"),{top:C,left:E}=x.posFromIndex(e),O=new Set(["onlyinclude","noinclude","includeonly",w,S,ea].flat(2));for(let G=t.exec(n);G;G=t.exec(n)){let[,Z,W]=G,{index:J}=G,se=G[0].toLowerCase();if(W&&W!=="]"){let{length:le}=W;J+=le,se=se.slice(le)}let{0:R,length:ve}=se,ee=R==="r"||R==="p"||R==="i";if(R==="<"&&!O.has(Z.toLowerCase())||R==="["&&l==="ext-link-text"&&(/&(?:rbrack|#93|#x5[Dd];);/u.test(n.slice(J+1))||s!=null&&s.is("ext")&&m==="nowiki"&&((H=s.innerText)!=null&&H.includes("]")))||R==="h"&&J===0&&l==="ext-link-text"&&Zo.test(n)||ee&&(!i.getAttribute("plain")||Jo.has(l)))continue;R==="]"&&(J||ve>1)&&t.lastIndex--;let de=e+J,De=de+ve,Pe=T[De],dr=T[de-1],Xr=ve>1&&!(R==="<"&&!/[\s/>]/u.test(Pe!=null?Pe:"")||d&&(R==="["||R==="]")||ee&&l==="parameter-value")||R==="{"&&(Pe===R||dr==="-")||R==="}"&&(dr===R||Pe==="-")||R==="["&&(Pe===R||l==="ext-link-text"||h==="free-ext-link"&&!n.slice(J+1).trim())||R==="]"&&(dr===R||f==="free-ext-link"&&!n.slice(0,J).includes("]"))?"error":"warning",Qr=R==="{"||R==="[";if(Xr==="warning"&&(Qr||(R==="]"||R==="}"))){let le=Ko[R],Zr=Qr?n.slice(J+1):n.slice(0,J);if(R==="{"&&((B=le.exec(Zr))==null?void 0:B[0])==="}"||R==="}"&&((Y=le.exec(Zr))==null?void 0:Y[0])==="{")continue;if(!Zr.includes(R)){let zn=Qr?"nextSibling":"previousSibling",He=this[zn];for(;He&&(He.type!=="text"||!le.test(He.data));)He=He[zn];if(He&&le.exec(He.data)[0]!==R)continue}}ee&&(se=se.toUpperCase());let gr=n.slice(0,J).split(`
|
|
4
|
+
`),Mn=gr.length+C-1,Gn=gr[gr.length-1],Un=gr.length===1?E+Gn.length:Gn.length,gt={rule:Yo[R],message:b.msg('lonely "$1"',ee||R==="h"?se:R),severity:Xr,startIndex:de,endIndex:De,startLine:Mn,endLine:Mn,startCol:Un,endCol:Un+ve};if(R==="<")gt.suggestions=[{desc:"escape",range:[de,de+1],text:"<"}];else if(R==="h"&&!(l==="ext-link-text"||l==="link-text")&&/[\p{L}\d_]/u.test(dr||""))gt.suggestions=[{desc:"whitespace",range:[de,de],text:" "}];else if(R==="["&&l==="ext-link-text"){let le=i.getAbsoluteIndex()+i.toString().length;gt.suggestions=[{desc:"escape",range:[le,le+1],text:"]"}]}else if(R==="]"&&f==="free-ext-link"&&Xr==="error"){let le=e-o.toString().length;gt.fix={range:[le,le],text:"[",desc:"left bracket"}}else ee&&(gt.suggestions=[...G[0]===se?[]:[{desc:"uppercase",range:[de,De],text:se}],...Pe===":"||Pe==="\uFF1A"?[{desc:"whitespace",range:[De,De+1],text:" "}]:[]]);c.push(gt)}return c}replaceData(e){L(this,mr,yi).call(this,e)}print(){return ut(this.data)}};mr=new WeakSet,yi=function(e){this.setAttribute("data",e)}});var he,Ze=y(()=>{"use strict";Te();he=(a=!0,r=!0)=>(e,t)=>{class n extends e{text(){return""}lint(s){return a?[]:super.lint(s)}}return fr(n,e),n}});var Dt,me,mt=y(()=>{"use strict";P();me=class extends v{constructor(e,t,n,i,s,o){super(e,i,s,o);k(this,Dt);A(this,Dt,n)}get type(){return u(this,Dt)}lint(e=this.getAbsoluteIndex()){return super.lint(e,!1)}};Dt=new WeakMap});var ft,M,Ee=y(()=>{"use strict";P();M=class extends v{constructor(e,t,n,i,s){super(e,n,i,s);k(this,ft);A(this,ft,t)}get type(){return u(this,ft)}set type(e){A(this,ft,e)}};ft=new WeakMap});var ta,Je,ye,_e,Ce,Vt=y(()=>{"use strict";j();Se();X();Q();F();P();Ee();ta=a=>a==="redirect-target"||a==="link",Ce=class extends v{constructor(e,t,n=b.getConfig(),i=[],s="|"){super(void 0,n,i,{});k(this,Je,!0);k(this,ye);k(this,_e);if(this.insertAt(new M(e,"link-target",n,i,{})),t!==void 0){let o=new v(t,n,i,{});o.type="link-text",o.setAttribute("stage",10),this.insertAt(o)}A(this,ye,s)}afterBuild(){A(this,_e,this.getTitle()),u(this,ye).includes("\0")&&A(this,ye,this.buildFromStr(u(this,ye),0)),this.setAttribute("name",u(this,_e).title),super.afterBuild()}setAttribute(e,t){e==="bracket"?A(this,Je,t):e==="title"?A(this,_e,t):super.setAttribute(e,t)}toString(e){let t=super.toString(e,u(this,ye));return u(this,Je)?`[[${t}]]`:t}text(){let e=super.text("|");return u(this,Je)?`[[${e}]]`:e}getAttribute(e){return e==="title"?u(this,_e):e==="padding"?2:super.getAttribute(e)}getGaps(e){return e===0?u(this,ye).length:1}lint(e=this.getAbsoluteIndex(),t){let n=super.lint(e,t),{childNodes:[i,s],type:o}=this,{encoded:l,fragment:p}=u(this,_e),g=new I(this,e);if(i.childNodes.some(({type:d})=>d==="template")&&n.push($(i,g,"unknown-page","template in an internal link target","warning")),l){let d=$(i,g,"url-encoding","unnecessary URL encoding in an internal link");d.suggestions=[{desc:"decode",range:[d.startIndex,d.endIndex],text:(0,je.rawurldecode)(i.text())}],n.push(d)}if(o==="link"||o==="category"){let d=s==null?void 0:s.childNodes.find(c=>c.type==="text"&&c.data.includes("|"));if(d){let c=$(s,g,"pipe-like",'additional "|" in the link text',"warning"),h=c.startIndex+d.getRelativeIndex();c.suggestions=[{desc:"escape",range:[h,h+d.data.length],text:d.data.replace(/\|/gu,"|")}],n.push(c)}}if(p!==void 0&&!ta(o)){let d=$(i,g,"no-ignored","useless fragment"),c=i.childNodes.find(h=>h.type==="text"&&h.data.includes("#"));c&&(d.fix={range:[d.startIndex+c.getRelativeIndex()+c.data.indexOf("#"),d.endIndex],text:"",desc:"remove"}),n.push(d)}return n}getTitle(e){return this.normalizeTitle(this.firstChild.toString(!0),0,e,!0,!0)}print(){return super.print(u(this,Je)?{pre:"[[",post:"]]",sep:u(this,ye)}:{sep:u(this,ye)})}};Je=new WeakMap,ye=new WeakMap,_e=new WeakMap});var ie,Oe=y(()=>{"use strict";P();ie=class extends v{get innerText(){return this.firstChild.data}constructor(r="",e,t){super(r,e,t)}}});var vi,ln,ra,z,Me=y(()=>{"use strict";Ze();Oe();vi=[he()];z=class extends(ra=ie){get type(){return"noinclude"}toString(r){return r?"":super.toString()}};ln=ge(ra),z=ue(ln,0,"NoincludeToken",vi,z),pe(ln,1,z)});var xr,Ai=y(()=>{"use strict";j();F();Vt();Me();xr=class extends Ce{get type(){return"redirect-target"}constructor(r,e,t=b.getConfig(),n=[]){super(r,void 0,t,n),e!==void 0&&this.insertAt(new z(e,t,n))}getTitle(){return this.normalizeTitle(this.firstChild.toString(),0,!0,!0)}lint(r=this.getAbsoluteIndex()){let e=super.lint(r,!1);if(this.length===2){let t=$(this.lastChild,{start:r},"no-ignored","useless link text");t.startIndex--,t.startCol--,t.fix={range:[t.startIndex,t.endIndex],text:"",desc:"remove"},e.push(t)}return e}}});var wi,Ge,xt,dn,na,Ke,Si=y(()=>{"use strict";Ze();F();P();mt();Ai();wi=[he(!1,!1)];Ke=class extends(na=v){constructor(e,t,n,i,s,o=b.getConfig(),l=[]){super(void 0,o,l);k(this,Ge);k(this,xt);A(this,Ge,e),A(this,xt,s);let p=new RegExp(String.raw`^(?:${o.redirection.join("|")})\s*(?::\s*)?$`,"iu");this.append(new me(t,p,"redirect-syntax",o,l,{}),new xr(n,i==null?void 0:i.slice(1),o,l))}get type(){return"redirect"}getAttribute(e){return e==="padding"?u(this,Ge).length:super.getAttribute(e)}toString(e){return u(this,Ge)+super.toString(e)+u(this,xt)}lint(e=this.getAbsoluteIndex()){return this.lastChild.lint(e+u(this,Ge).length+this.firstChild.toString().length)}print(){return super.print({pre:u(this,Ge),post:u(this,xt)})}};dn=ge(na),Ge=new WeakMap,xt=new WeakMap,Ke=ue(dn,0,"RedirectToken",wi,Ke),pe(dn,1,Ke)});var Ci={};oe(Ci,{parseRedirect:()=>ia});var ia,$i=y(()=>{"use strict";F();Si();ia=(a,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(a);return t&&b.normalizeTitle(t[3],0,!1,r,!0,!0).valid?(a=`\0${e.length}o\x7F${a.slice(t[0].length)}`,new Ke(...t.slice(1),r,e),a):!1}});var br,Ni=y(()=>{"use strict";P();br=class extends v{get type(){return"onlyinclude"}toString(r){return`<onlyinclude>${super.toString(r)}</onlyinclude>`}getAttribute(r){return r==="padding"?13:r==="plain"||super.getAttribute(r)}print(){return super.print({pre:'<span class="wpb-ext"><onlyinclude></span>',post:'<span class="wpb-ext"></onlyinclude></span>'})}}});var Ue,bt,gn=y(()=>{"use strict";P();bt=class extends v{constructor(e,t,n,i,s,o=[]){super(void 0,s);k(this,Ue);V(this,"closed");V(this,"selfClosing");this.setAttribute("name",e.toLowerCase()),A(this,Ue,[e,i||e]),this.closed=i!=="",this.selfClosing=i===void 0,this.append(t,n);let l=typeof t=="string"?-1:o.indexOf(t);o.splice(l===-1?1/0:l,0,this)}get innerText(){return this.selfClosing?void 0:this.lastChild.text()}toString(e){let{selfClosing:t,firstChild:n,lastChild:i}=this,[s,o]=u(this,Ue);return t?`<${s}${n.toString(e)}/>`:`<${s}${n.toString(e)}>${i.toString(e)}${this.closed?`</${o}>`:""}`}text(){let[e,t]=u(this,Ue);return this.selfClosing?`<${e}${this.firstChild.text()}/>`:`<${e}${super.text(">")}${this.closed?`</${t}>`:""}`}getAttribute(e){return e==="padding"?u(this,Ue)[0].length+1:super.getAttribute(e)}getGaps(){return 1}print(){let[e,t]=u(this,Ue);return super.print(this.selfClosing?{pre:`<${e}`,post:"/>"}:{pre:`<${e}`,sep:">",post:this.closed?`</${t}>`:""})}};Ue=new WeakMap});var Ei,pn,sa,Ye,Ii=y(()=>{"use strict";j();Q();Ze();F();gn();Ei=[he(!1)];Ye=class extends(sa=bt){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 I(this,r);if(t.data.trim()){let o=$(t,s,"no-ignored","useless attribute","warning");o.suggestions=[{desc:"remove",range:[o.startIndex,o.endIndex],text:""}],e.push(o)}if(!n){let o=N(this,s,"unclosed-comment",b.msg("unclosed $1",`<${i}>`));o.suggestions=[{desc:"close",range:[o.endIndex,o.endIndex],text:`</${i}>`}],e.push(o)}return e}};pn=ge(sa),Ye=ue(pn,0,"IncludeToken",Ei,Ye),pe(pn,1,Ye)});var D,Li,Fi,yr,un,Ri,Tt,Pi,Bi,ji,Tr,qi,_i,Oi,Mi,Gi=y(()=>{"use strict";D=new Set(["align"]),Li=new Set(["cite"]),Fi=new Set(["cite","datetime"]),yr=new Set(["width"]),un=new Set(["axis","align","bgcolor","height","width","valign"]),Ri=new Set([...un,"abbr","headers","scope","rowspan","colspan"]),Tt=new Set(["type"]),Pi=new Set(["summary","align","bgcolor","cellpadding","cellspacing","frame","rules","width"]),Bi=new Set(["clear"]),ji=new Set(["bgcolor","align","valign"]),Tr=new Set,qi=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"]),_i={div:D,h1:D,h2:D,h3:D,h4:D,h5:D,h6:D,blockquote:Li,q:Li,p:D,br:Bi,pre:yr,ins:Fi,del:Fi,ul:Tt,ol:new Set(["type","start","reversed"]),li:new Set(["type","value"]),table:new Set([...Pi,"border"]),caption:D,tr:ji,td:Ri,th:Ri,img:new Set(["alt","src","width","height","srcset"]),font:new Set(["size","color","face"]),hr:yr,data:new Set(["value"]),time:new Set(["datetime"]),meta:new Set(["itemprop","content"]),link:new Set(["itemprop","href","title"]),gallery:Tt,poem:D,categorytree:D,combooption:D},Oi={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:Tr,indicator:new Set(["name"]),langconvert:new Set(["from","to"]),ref:new Set(["group","name","extends","follow","dir"]),references:new Set(["group","responsive"]),charinsert:new Set(["label"]),choose:new Set(["uncached","before","after"]),option:new Set(["weight"]),imagemap:Tr,inputbox:Tr,templatestyles:new Set(["src","wrapper"]),dynamicpagelist:Tr,poll:new Set(["id","show-results-before-voting"]),sm2:Tt,flashmp3:Tt,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"])},Mi={table:Pi,td:new Set([...un,"scope"]),th:un,br:Bi,caption:D,div:D,hr:yr,h1:D,h2:D,h3:D,h4:D,h5:D,h6:D,li:Tt,p:D,pre:yr,tr:ji,ul:Tt}});var oa,Xt,yt,re,$e,kt,Ui=y(()=>{"use strict";j();X();Se();Gi();Q();F();P();Ee();oa=/expression|(?:accelerator|-o-link(?:-source)?|-o-replace)\s*:|(?:url|image(?:-set)?)\s*\(|attr\s*\([^)]+[\s,]url/u,kt=class extends v{constructor(e,t,n,i="",s,o=[],l=b.getConfig(),p=[]){let g=new M(n,"attr-key",l,p),d;if(n==="title"||t==="img"&&n==="alt")d=new v(s,l,p,{}),d.type="attr-value",d.setAttribute("stage",10);else if(t==="gallery"&&n==="caption"||t==="choose"&&(n==="before"||n==="after")){let c={...l,excludes:[...l.excludes,"heading","html","table","hr","list"]};d=new v(s,c,p,{}),d.type="attr-value",d.setAttribute("stage",1)}else d=new M(s,"attr-value",l,p,{});super(void 0,l,p);k(this,Xt);k(this,yt);k(this,re);k(this,$e);A(this,Xt,e),this.append(g,d),A(this,re,i),A(this,$e,[...o]),A(this,yt,t),this.setAttribute("name",ne(n).trim().toLowerCase())}get type(){return u(this,Xt)}get tag(){return u(this,yt)}get balanced(){return!u(this,re)||u(this,$e)[0]===u(this,$e)[1]}afterBuild(){u(this,re).includes("\0")&&A(this,re,this.buildFromStr(u(this,re),0)),this.parentNode&&A(this,yt,this.parentNode.name),this.setAttribute("name",this.firstChild.toString(!0).trim().toLowerCase()),super.afterBuild()}toString(e){let[t="",n=""]=u(this,$e);return u(this,re)?super.toString(e,u(this,re)+t)+n:this.firstChild.toString(e)}text(){return u(this,re)?`${super.text(`${u(this,re).trim()}"`)}"`:this.firstChild.text()}getGaps(){var e,t;return u(this,re)?u(this,re).length+((t=(e=u(this,$e)[0])==null?void 0:e.length)!=null?t:0):0}lint(e=this.getAbsoluteIndex(),t){var x;let n=super.lint(e,t),{balanced:i,firstChild:s,lastChild:o,type:l,name:p,tag:g}=this,d=this.getValue(),c=new I(this,e);if(!i){let T=$(o,c,"unclosed-quote",b.msg("unclosed $1","quotes"),"warning");T.startIndex--,T.startCol--,T.suggestions=[{range:[T.endIndex,T.endIndex],text:u(this,$e)[0],desc:"close"}],n.push(T)}let h=Oi[g],m=_i[g],{length:f}=this.toString();if(!(h!=null&&h.has(p))&&!(m!=null&&m.has(p))&&(l==="ext-attr"?h||m:!/\{\{[^{]+\}\}/u.test(p))&&(l==="ext-attr"&&!m||!/^(?:xmlns:[\w:.-]+|data-(?!ooui|mw|parsoid)[^:]*)$/u.test(p)&&(g==="meta"||g==="link"||!qi.has(p))))n.push({...$(s,c,"illegal-attr","illegal attribute name"),suggestions:[{desc:"remove",range:[e,e+f],text:""}]});else if((x=Mi[g])!=null&&x.has(p))n.push($(s,c,"obsolete-attr","obsolete attribute","warning"));else if(p==="style"&&typeof d=="string"&&oa.test(d))n.push($(o,c,"insecure-style","insecure style"));else if(p==="tabindex"&&typeof d=="string"&&d!=="0"){let T=$(o,c,"illegal-attr","nonzero tabindex");T.suggestions=[{desc:"remove",range:[e,e+f],text:""},{desc:"0 tabindex",range:[T.startIndex,T.endIndex],text:"0"}],n.push(T)}return n}getValue(){return u(this,re)?this.lastChild.text().trim():this.type==="ext-attr"||""}print(){let[e="",t=""]=u(this,$e);return u(this,re)?super.print({sep:ut(u(this,re))+e,post:t}):super.print()}};Xt=new WeakMap,yt=new WeakMap,re=new WeakMap,$e=new WeakMap});var zi,aa,Qt,ze,kr=y(()=>{"use strict";j();X();Q();F();P();Ee();Ui();zi=a=>a.slice(0,-1),aa=a=>`${zi(a)}-dirty`,ze=class extends v{constructor(e,t,n,i=b.getConfig(),s=[]){super(void 0,i,s,{});k(this,Qt);if(A(this,Qt,t),this.setAttribute("name",n),e){let o=/([^\s/](?:(?!\0\d+~\x7F)[^\s/=])*)(?:((?:\s(?:\s|\0\d+[cn]\x7F)*)?(?:=|\0\d+~\x7F)(?:\s|\0\d+[cn]\x7F)*)(?:(["'])(.*?)(\3|$)|(\S*)))?/gsu,l="",p=o.exec(e),g=0,d=()=>{l&&(super.insertAt(new M(l,aa(t),i,s,{})),l="")};for(;p;){let{index:c,0:h,1:m,2:f,3:x,4:T,5:w,6:S}=p;if(l+=e.slice(g,c),/^(?:[\w:]|\0\d+t\x7F)(?:[\w:.-]|\0\d+t\x7F)*$/u.test(ne(m).trim())){let C=T!=null?T:S,E=[x,w],O=new kt(zi(t),n,m,f,C,E,i,s);d(),super.insertAt(O)}else l+=h;({lastIndex:g}=o),p=o.exec(e)}l+=e.slice(g),d()}}get type(){return u(this,Qt)}afterBuild(){let{parentNode:e}=this;(e==null?void 0:e.type)==="td"&&e.subtype==="caption"&&this.setAttribute("name","caption"),super.afterBuild()}getAttrTokens(e){return this.childNodes.filter(t=>t instanceof kt&&(!e||t.name===e.toLowerCase().trim()))}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,o=new Map,l=new Set,p=new I(this,e);if((i==null?void 0:i.type)==="html"&&i.closing&&this.text().trim()){let g=N(this,p,"no-ignored","attributes of a closing tag"),d=i.getAbsoluteIndex();g.suggestions=[{desc:"remove",range:[e,g.endIndex],text:""},{desc:"open",range:[d+1,d+2],text:""}],n.push(g)}for(let g of s)if(g instanceof kt){let{name:d}=g;o.has(d)?(l.add(d),o.get(d).push(g)):o.set(d,[g])}else{let d=g.text().trim();if(d){let c=$(g,p,"no-ignored","containing invalid attribute",/[\p{L}\d]/u.test(d)?"error":"warning");c.suggestions=[{desc:"remove",range:[c.startIndex,c.endIndex],text:" "}],n.push(c)}}if(l.size>0)for(let g of l){let d=o.get(g).map(c=>{let h=c.getValue();return[c,h===!0?"":h]});n.push(...d.map(([c,h],m)=>{let f=$(c,p,"no-duplicate",b.msg("duplicated $1 attribute",g)),x={desc:"remove",range:[f.startIndex,f.endIndex],text:""};return!h||d.slice(0,m).some(([,T])=>T===h)?f.fix=x:f.suggestions=[x],f}))}return n}print(){return this.toString()?`<span class="wpb-${this.type}">${this.childNodes.map(e=>e.print(e instanceof M?{class:e.toString().trim()&&"attr-dirty"}:void 0)).join("")}</span>`:""}};Qt=new WeakMap});var vr,Wi=y(()=>{"use strict";Se();F();P();Me();vr=class extends v{get type(){return"ext-inner"}constructor(r,e=b.getConfig(),t=[]){if(r){let n=/<nowiki>/giu,i=/<\/nowiki>/giu,{length:s}=n.source,o=n.exec(r);o&&(i.lastIndex=o.index+s);let l=i.exec(r),p=0,g="";for(;o&&l;)new z(o[0],e,t),new z(l[0],e,t),g+=`${r.slice(p,o.index)}\0${t.length-1}n\x7F${r.slice(o.index+s,l.index)}\0${t.length}n\x7F`,p=l.index+s+1,n.lastIndex=p,o=n.exec(r),o&&(i.lastIndex=o.index+s),l=i.exec(r);r=g+r.slice(p)}super(r,e,t,{}),this.setAttribute("stage",10)}getAttribute(r){return r==="plain"||super.getAttribute(r)}lint(r=this.getAbsoluteIndex()){return super.lint(r,/<\s*\/\s*(pre)\b/giu)}}});var vt,cn=y(()=>{"use strict";j();Q();Zt();F();P();Ee();vt=class extends v{get type(){return"ext-inner"}constructor(r,e,t=b.getConfig(),n=[],i){if(super(void 0,t,n,{}),e){let s=M;this.append(...e.split(`
|
|
5
|
+
`).map(o=>i?o:et(o,t,n,r)).map(o=>new s(o,"param-line",t,n,{})))}n.splice(n.indexOf(this),1),n.push(this)}toString(r){return super.toString(r,`
|
|
6
6
|
`)}text(){return super.text(`
|
|
7
|
-
`)}getGaps(){return 1}lint(r=this.getAbsoluteIndex()){let e=new
|
|
8
|
-
`})}}});var Zt,kt,vr,vt,un=b(()=>{"use strict";_();be();Q();R();P();ct();vt=class extends y{constructor(e,t,n=f.getConfig(),i=[]){super(void 0,n,i);T(this,kt);T(this,Zt);v(this,Zt,e);let s=new y(t[0],n,i);s.type="heading-title",s.setAttribute("stage",2);let o=new ce(t[1],/^\s*$/u,"heading-trail",n,i,{});this.append(s,o)}get type(){return"heading"}get level(){return u(this,Zt)}toString(e){let t=u(this,kt,vr);return t+this.firstChild.toString(e)+t+this.lastChild.toString(e)}text(){let e=u(this,kt,vr);return e+this.firstChild.text()+e}getAttribute(e){return 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,o=i.toString(),l=i.childNodes.filter(At("quote")),p=l.filter(({bold:c})=>c),g=l.filter(({italic:c})=>c),d=new E(this,e);return this.level===1&&n.push($(i,d,"h1","<h1>")),(o.startsWith("=")||o.endsWith("="))&&n.push($(i,d,"unbalanced-header",f.msg("unbalanced $1 in a section header",'"="'))),this.closest("html-attrs,table-attrs")&&n.push(N(this,d,"parsing-order","section header in a HTML tag")),p.length%2&&n.push($(p[p.length-1],{...d,start:e+s,left:d.left+s},"format-leakage",f.msg("unbalanced $1 in a section header","bold apostrophes"))),g.length%2&&n.push($(g[g.length-1],{start:e+s},"format-leakage",f.msg("unbalanced $1 in a section header","italic apostrophes"))),n}print(){let e=u(this,kt,vr);return super.print({pre:e,sep:e})}json(){let e=super.json();return e.level=this.level,e}};Zt=new WeakMap,kt=new WeakSet,vr=function(){return"=".repeat(this.level)}});var ea,Ar,zi=b(()=>{"use strict";J();_();R();P();ea=new RegExp(`https?://${Ae}${we}$`,"iu"),Ar=class extends y{get type(){return"parameter"}get anon(){return this.firstChild.length===0}constructor(r,e,t=f.getConfig(),n=[]){super(void 0,t,n);let i=new y(typeof r=="number"?void 0:r,t,n,{}),s=new y(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 s;let t=super.lint(r,e),{firstChild:n}=this,i=(s=ea.exec(n.text()))==null?void 0:s[0];if(i&&new URL(i).search){let o=$(n,{start:r},"unescaped","unescaped query string in an anonymous parameter");o.startIndex=o.endIndex,o.startLine=o.endLine,o.startCol=o.endCol,o.endIndex++,o.endCol++,o.fix={range:[o.startIndex,o.endIndex],text:"{{=}}"},t.push(o)}return t}print(){return super.print({sep:this.anon?"":"="})}json(){let r=super.json();return r.anon=this.anon,r}}});var ta,Kt,Ye,et,tt,cn,Wi,Jt,Ui=b(()=>{"use strict";J();_();be();Se();Q();R();P();zi();Ee();ct();ta=new Set(["pageid","articlepath","server","servername","scriptpath","stylepath"]),Jt=class extends y{constructor(e,t,n=f.getConfig(),i=[]){var m,k;let s,o=/^(?:\s|\0\d+[cn]\x7F)*\0(\d+)h\x7F(?:\s|\0\d+[cn]\x7F)*/u.exec(e);o&&(s=Number(o[1]),e=e.replace(`\0${s}h\x7F`,i[s].toString().replace(/^\n/u,"")));super(void 0,n,i,{});T(this,tt);X(this,"modifier","");T(this,Kt,"template");T(this,Ye,!1);T(this,et,new Map);let{parserFunction:[l,p]}=n,g=(m=/^(?:\s|\0\d+[cn]\x7F)*\0\d+s\x7F/u.exec(e))==null?void 0:m[0];if(g)this.setAttribute("modifier",g),e=e.slice(g.length);else if(e.includes(":")){let[x,...A]=e.split(":"),[S]=/^(?:\s|\0\d+[cn]\x7F)*/u.exec((k=A[0])!=null?k:"");this.setModifier(`${x}:${S}`)&&(e=A.join(":").slice(S.length))}let d=e.includes(":");if(d||t.length===0&&!u(this,Ye)){let[x,...A]=e.split(":"),S=te(x),C=S[A.length>0?"trimStart":"trim"](),w=C.toLowerCase(),L=Object.prototype.hasOwnProperty.call(l,w)&&l[w],B=p.includes(C);if(B||ta.has(L)||d&&L){this.setAttribute("name",L||w.replace(/^#/u,"")),v(this,Kt,"magic-word");let q=new RegExp(String.raw`^\s*${C}\s*$`,B?"u":"iu"),D=new ce(x,q,"magic-word-name",n,i,{});if(super.insertAt(D),A.length>0&&t.unshift([A.join(":")]),this.name==="invoke")for(let H=0;H<2;H++){let ne=t.shift();if(!ne)break;let ee=new G(ne.join("="),`invoke-${H?"function":"module"}`,n,i);super.insertAt(ee)}}}if(this.type==="template"){let x=te(e).trim();if(!this.normalizeTitle(x,10,!0).valid)throw i.pop(),new SyntaxError("Invalid template name");let A=new G(e,"template-name",n,i,{});super.insertAt(A)}typeof s=="number"&&(i[s]=void 0);let c=this.isTemplate(),h=1;for(let[x,A]of t.entries())!c&&!(this.name==="switch"&&x>0)&&(A[0]=A.join("="),A.length=1),A.length===1&&(A.unshift(h),h++),this.insertAt(new Ar(...A,n,i));this.seal("modifier")}get type(){return u(this,Kt)}setModifier(e){let{parserFunction:[,,t,n]}=this.getAttribute("config"),i=te(e).trim();if(e&&!i.endsWith(":"))return!1;let s=i.slice(0,-1).toLowerCase(),o=t.includes(s),l=n.includes(s);return u(this,Ye)&&o||!u(this,Ye)&&(l||e==="")||(ye.running||this.length>1)&&(o||l||e==="")?(this.setAttribute("modifier",e),v(this,Ye,o),!!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"&&this.setAttribute("name",F(this,tt,cn).call(this).title)}toString(e){return`{{${this.modifier}${this.type==="magic-word"?`${this.firstChild.toString(e)}${this.length===1?"":":"}${this.childNodes.slice(1).map(t=>t.toString(e)).join("|")}`:super.toString(e,"|")}}}`}text(){let{childNodes:e,length:t,firstChild:n,modifier:i,type:s,name:o}=this;return s==="magic-word"&&o==="vardefine"?"":`{{${i}${s==="magic-word"?n.text()+(t===1?"":":")+pe(e.slice(1),"|"):super.text("|")}}}`}getAttribute(e){switch(e){case"padding":return this.modifier.length+2;default:return super.getAttribute(e)}}getGaps(){return 1}lint(e=this.getAbsoluteIndex(),t){let n=super.lint(e,t);if(!this.isTemplate())return n;let{type:i,childNodes:s,length:o}=this,l=new E(this,e),p=i==="magic-word";if(p&&!F(this,tt,cn).call(this).valid)n.push($(s[1],l,"invalid-invoke","illegal module name"));else{let d=s[p?1:0],c=d.childNodes.find(h=>h.type==="text"&&Gt(h.data).includes("#"));if(c){let h=$(d,l,"no-ignored","useless fragment");h.fix={range:[h.startIndex+c.getRelativeIndex()+c.data.indexOf("#"),h.endIndex],text:""},n.push(h)}}if(p&&o===2)return n.push(N(this,l,"invalid-invoke","missing module function")),n;let g=this.getDuplicatedArgs().filter(([,d])=>!d[0].querySelector("ext"));return g.length>0&&n.push(...g.flatMap(([,d])=>d).map(d=>$(d,l,"no-duplicate","duplicated parameter"))),n}insertAt(e,t=this.length){return super.insertAt(e,t),e.anon?F(this,tt,Wi).call(this,e):e.name&&this.getArgs(e.name,!1,!1).add(e),e}getAllArgs(){return this.childNodes.filter(At("parameter"))}getAnonArgs(){return this.getAllArgs().filter(({anon:e})=>e)}getArgs(e,t,n=!0){let i=String(e).replace(/^[ \t\n\0\v]+|([^ \t\n\0\v])[ \t\n\0\v]+$/gu,"$1"),s;return u(this,et).has(i)?s=u(this,et).get(i):(s=new Set(this.getAllArgs().filter(({name:o})=>i===o)),u(this,et).set(i,s)),s}getDuplicatedArgs(){return[...u(this,et)].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;switch(t){case"if":case"ifexist":case"ifexpr":case"iferror":i=2;break;case"ifeq":i=3;break;default:throw new Error("TranscludeToken.getPossibleValues method is only for specific magic words!")}let s=n.slice(i,i+2).map(({childNodes:[,o]})=>o);for(let o=0;o<s.length;){let{length:l,0:p}=s[o].childNodes.filter(g=>g.text().trim());if(l===0)s.splice(o,1);else if(l>1||p.type!=="magic-word")o++;else try{let g=p.getPossibleValues();s.splice(o,1,...g),o+=g.length}catch(g){o++}}return s}print(){let{childNodes:e,length:t,firstChild:n,modifier:i,type:s}=this;return`<span class="wpb-${s}">{{${gt(i)}${s==="magic-word"?n.print()+(t===1?"":":")+Ne(e.slice(1),{sep:"|"}):Ne(e,{sep:"|"})}}}</span>`}};Kt=new WeakMap,Ye=new WeakMap,et=new WeakMap,tt=new WeakSet,cn=function(){let e=this.type==="template",t=this.childNodes[e?0:1];return this.normalizeTitle(t.toString(!0),e?10:828)},Wi=function(e){let t=this.getAnonArgs(),n=typeof e!="number";for(let i=n?t.indexOf(e):e-1;i<t.length;i++){let s=t[i],{name:o}=s,l=String(i+1);o!==l&&(s.setAttribute("name",l),this.getArgs(l,!1,!1).add(s))}}});var Di,hn,ra,rt,Hi=b(()=>{"use strict";Xe();P();Di=[ue()];rt=class extends(ra=y){get type(){return"hidden"}};hn=le(ra),rt=ge(hn,0,"HiddenToken",Di,rt),de(hn,1,rt)});var Sr,Vi,wr,Xi=b(()=>{"use strict";J();_();Q();R();P();Ee();Hi();wr=class extends y{constructor(e,t=f.getConfig(),n=[]){super(void 0,t,n,{});T(this,Sr);for(let[i,s]of e.entries())if(i===0){let o=new G(s,"arg-name",t,n,{});super.insertAt(o)}else if(i>1){let o=new rt(s,t,n);super.insertAt(o)}else{let o=new y(s,t,n);o.type="arg-default",o.setAttribute("stage",2),super.insertAt(o)}}get type(){return"arg"}get default(){var e,t;return(t=(e=this.childNodes[1])==null?void 0:e.text())!=null?t:!1}toString(e){return`{{{${super.toString(e,"|")}}}}`}text(){return`{{{${pe(this.childNodes.slice(0,2),"|")}}}}`}getAttribute(e){return e==="padding"?3:super.getAttribute(e)}getGaps(){return 1}afterBuild(){F(this,Sr,Vi).call(this),super.afterBuild()}lint(e=this.getAbsoluteIndex(),t){let{childNodes:[n,i,...s]}=this;if(!this.getAttribute("include")){let l=N(this,{start:e},"no-arg","unexpected template argument");return i&&(l.fix={range:[e,l.endIndex],text:i.text()}),[l]}let o=n.lint(e+3,t);if(i&&o.push(...i.lint(e+4+n.toString().length,t)),s.length>0){let l=new E(this,e);o.push(...s.map(p=>{let g=$(p,l,"no-ignored","invisible content inside triple braces");return g.startIndex--,g.startCol--,g.suggestions=[{desc:"remove",range:[g.startIndex,g.endIndex],text:""},{desc:"escape",range:[g.startIndex,g.startIndex+1],text:"{{!}}"}],g}))}return o}print(){return super.print({pre:"{{{",post:"}}}",sep:"|"})}};Sr=new WeakSet,Vi=function(){this.setAttribute("name",this.firstChild.toString(!0).trim())}});var Qi={};se(Qi,{parseBraces:()=>Yt});var na,mn,ia,Yt,Cr=b(()=>{"use strict";J();un();Ui();Xi();na={"=":String.raw`\n(?!(?:[^\S\n]|\0\d+[cn]\x7F)*\n)`,"{":String.raw`\}{2,}|\|`,"-":String.raw`\}-`,"[":String.raw`\]\]`},mn=new Map([["!","!"],["!!","+"],["(!","{"],["!)","}"],["!-","-"],["=","~"],["server","m"]]),ia=/\{\{\s*([^\s\0<>[\]{}|_#&%:.]+)\s*\}\}(?!\})/gu,Yt=(a,r,e)=>{var c,h,m,k,x,A;let t=String.raw`${(c=r.excludes)!=null&&c.includes("heading")?"":String.raw`^((?:\0\d+[cno]\x7F)*)={1,6}|`}\[\[|-\{(?!\{)`,n=String.raw`|\{{2,}`,{parserFunction:[,,,i]}=r,s=[];a=a.replace(ia,(S,C)=>{var w;return new Jt(S.slice(2,-2),[],r,e),`\0${e.length-2}${(w=mn.get(C.toLowerCase()))!=null?w:"t"}\x7F`});let o=a.lastIndexOf("}}")-a.length,l=o+a.length!==-1,p=new RegExp(t+(l?n:""),"gmu"),g=p.exec(a),d;for(;g||d!==void 0&&d<=a.length&&((m=(h=s[s.length-1])==null?void 0:h[0])!=null&&m.startsWith("="));){if(g!=null&&g[1]){let[,{length:W}]=g;g[0]=g[0].slice(W),g.index+=W}let{0:S,index:C}=g!=null?g:{0:`
|
|
9
|
-
`,index:a.length},
|
|
10
|
-
`){
|
|
11
|
-
)`:""}(\s*)$`,"u")]),l=o.find(([,g,d])=>(s=d.exec(e),s&&(s.length!==4||
|
|
12
|
-
`))!=null?i:[]){let o=/^([^|]+)(?:\|(.*))?/u.exec(s);if(!o){super.insertAt(s.trim()?new
|
|
7
|
+
`)}getGaps(){return 1}lint(r=this.getAbsoluteIndex()){let e=new I(this,r),t=b.msg("invalid parameter of <$1>",this.name),n=[];for(let i of this.childNodes){let s=i.childNodes.filter(({type:o})=>o!=="comment"&&o!=="include"&&o!=="noinclude");if(s.some(({type:o})=>o==="ext"))n.push($(i,e,"no-ignored",t));else{let o=s.findIndex(({type:p})=>p!=="text"),l=s.slice(0,o===-1?void 0:o).map(String).join("");if(l&&!(o===-1?/^[a-z]+(?:\[\])?\s*=/iu:/^[a-z]+(?:\[\])?\s*(?:=|$)/iu).test(l)){let p=$(i,e,"no-ignored",t);p.suggestions=[{desc:"remove",range:[p.startIndex,p.endIndex],text:""}],n.push(p)}else n.push(...i.lint(r,!1))}r+=i.toString().length+1}return n}print(){return super.print({sep:`
|
|
8
|
+
`})}}});var Jt,At,Ar,wt,hn=y(()=>{"use strict";j();Te();Q();F();P();mt();wt=class extends v{constructor(e,t,n=b.getConfig(),i=[]){super(void 0,n,i);k(this,At);k(this,Jt);A(this,Jt,e);let s=new v(t[0],n,i);s.type="heading-title",s.setAttribute("stage",2);let o=new me(t[1],/^\s*$/u,"heading-trail",n,i,{});this.append(s,o)}get type(){return"heading"}get level(){return u(this,Jt)}toString(e){let t=u(this,At,Ar);return t+this.firstChild.toString(e)+t+this.lastChild.toString(e)}text(){let e=u(this,At,Ar);return e+this.firstChild.text()+e}getAttribute(e){return 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,o=i.toString(),l=o.startsWith("="),p=l||o.endsWith("="),g=i.childNodes.filter(St("quote")),d=g.filter(({bold:f})=>f),c=g.filter(({italic:f})=>f),h=new I(this,e);if(this.level===1){let f=$(i,h,"h1","<h1>");p||(f.suggestions=[{desc:"h2",range:[f.startIndex,f.endIndex],text:`=${o}=`}]),n.push(f)}if(p){let f=$(i,h,"unbalanced-header",b.msg("unbalanced $1 in a section header",'"="'));if(o!=="=")if(l){let[x]=/^=+/u.exec(o);f.suggestions=[{desc:`h${s}`,range:[f.startIndex,f.startIndex+x.length],text:""},{desc:`h${s+x.length}`,range:[f.endIndex,f.endIndex],text:x}]}else{let x=/[^=](=+)$/u.exec(o)[1];f.suggestions=[{desc:`h${s}`,range:[f.endIndex-x.length,f.endIndex],text:""},{desc:`h${s+x.length}`,range:[f.startIndex,f.startIndex],text:x}]}n.push(f)}this.closest("html-attrs,table-attrs")&&n.push(N(this,h,"parsing-order","section header in a HTML tag"));let m=this.getRootNode().toString();if(d.length%2){let f=$(d[d.length-1],{...h,start:e+s,left:h.left+s},"format-leakage",b.msg("unbalanced $1 in a section header","bold apostrophes")),x=e+s+o.length;m.slice(f.endIndex,x).trim()?f.suggestions=[{desc:"close",range:[x,x],text:"'''"}]:f.fix={desc:"remove",range:[f.startIndex,f.endIndex],text:""},n.push(f)}if(c.length%2){let f=$(c[c.length-1],{start:e+s},"format-leakage",b.msg("unbalanced $1 in a section header","italic apostrophes")),x=e+s+o.length;f.fix=m.slice(f.endIndex,x).trim()?{desc:"close",range:[x,x],text:"''"}:{desc:"remove",range:[f.startIndex,f.endIndex],text:""},n.push(f)}return n}print(){let e=u(this,At,Ar);return super.print({pre:e,sep:e})}json(){let e=super.json();return e.level=this.level,e}};Jt=new WeakMap,At=new WeakSet,Ar=function(){return"=".repeat(this.level)}});var la,wr,Di=y(()=>{"use strict";X();j();F();P();la=new RegExp(`https?://${Ae}${we}$`,"iu"),wr=class extends v{get type(){return"parameter"}get anon(){return this.firstChild.length===0}constructor(r,e,t=b.getConfig(),n=[]){super(void 0,t,n);let i=new v(typeof r=="number"?void 0:r,t,n,{}),s=new v(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 s;let t=super.lint(r,e),{firstChild:n}=this,i=(s=la.exec(n.text()))==null?void 0:s[0];if(i&&new URL(i).search){let o=$(n,{start:r},"unescaped","unescaped query string in an anonymous parameter");o.startIndex=o.endIndex,o.startLine=o.endLine,o.startCol=o.endCol,o.endIndex++,o.endCol++,o.fix={range:[o.startIndex,o.endIndex],text:"{{=}}",desc:"escape"},t.push(o)}return t}print(){return super.print({sep:this.anon?"":"="})}json(){let r=super.json();return r.anon=this.anon,r}}});var da,Yt,tt,rt,nt,mn,Hi,Kt,Vi=y(()=>{"use strict";X();j();Te();Se();Q();F();P();Di();Ee();mt();da=new Set(["pageid","articlepath","server","servername","scriptpath","stylepath"]),Kt=class extends v{constructor(e,t,n=b.getConfig(),i=[]){var m,f;let s,o=/^(?:\s|\0\d+[cn]\x7F)*\0(\d+)h\x7F(?:\s|\0\d+[cn]\x7F)*/u.exec(e);o&&(s=Number(o[1]),e=e.replace(`\0${s}h\x7F`,i[s].toString().replace(/^\n/u,"")));super(void 0,n,i,{});k(this,nt);V(this,"modifier","");k(this,Yt,"template");k(this,tt,!1);k(this,rt,new Map);let{parserFunction:[l,p]}=n,g=(m=/^(?:\s|\0\d+[cn]\x7F)*\0\d+s\x7F/u.exec(e))==null?void 0:m[0];if(g)this.setAttribute("modifier",g),e=e.slice(g.length);else if(e.includes(":")){let[x,...T]=e.split(":"),[w]=/^(?:\s|\0\d+[cn]\x7F)*/u.exec((f=T[0])!=null?f:"");this.setModifier(`${x}:${w}`)&&(e=T.join(":").slice(w.length))}let d=e.includes(":");if(d||t.length===0&&!u(this,tt)){let[x,...T]=e.split(":"),w=ne(x),S=w[T.length>0?"trimStart":"trim"](),C=S.toLowerCase(),E=Object.prototype.hasOwnProperty.call(l,C)&&l[C],O=p.includes(S);if(O||da.has(E)||d&&E){this.setAttribute("name",E||C.replace(/^#/u,"")),A(this,Yt,"magic-word");let B=new RegExp(String.raw`^\s*${S}\s*$`,O?"u":"iu"),Y=new me(x,B,"magic-word-name",n,i,{});if(super.insertAt(Y),T.length>0&&t.unshift([T.join(":")]),this.name==="invoke")for(let G=0;G<2;G++){let Z=t.shift();if(!Z)break;let W=new M(Z.join("="),`invoke-${G?"function":"module"}`,n,i);super.insertAt(W)}}}if(this.type==="template"){let x=ne(e).trim();if(!this.normalizeTitle(x,10,!0).valid)throw i.pop(),new SyntaxError("Invalid template name");let T=new M(e,"template-name",n,i,{});super.insertAt(T)}typeof s=="number"&&(i[s]=void 0);let c=this.isTemplate(),h=1;for(let[x,T]of t.entries())!c&&!(this.name==="switch"&&x>0)&&(T[0]=T.join("="),T.length=1),T.length===1&&(T.unshift(h),h++),this.insertAt(new wr(...T,n,i));this.seal("modifier")}get type(){return u(this,Yt)}setModifier(e){let{parserFunction:[,,t,n]}=this.getAttribute("config"),i=ne(e).trim();if(e&&!i.endsWith(":"))return!1;let s=i.slice(0,-1).toLowerCase(),o=t.includes(s),l=n.includes(s);return u(this,tt)&&o||!u(this,tt)&&(l||e==="")||(ke.running||this.length>1)&&(o||l||e==="")?(this.setAttribute("modifier",e),A(this,tt,o),!!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"&&this.setAttribute("name",L(this,nt,mn).call(this).title)}toString(e){return`{{${this.modifier}${this.type==="magic-word"?`${this.firstChild.toString(e)}${this.length===1?"":":"}${this.childNodes.slice(1).map(t=>t.toString(e)).join("|")}`:super.toString(e,"|")}}}`}text(){let{childNodes:e,length:t,firstChild:n,modifier:i,type:s,name:o}=this;return s==="magic-word"&&o==="vardefine"?"":`{{${i}${s==="magic-word"?n.text()+(t===1?"":":")+ce(e.slice(1),"|"):super.text("|")}}}`}getAttribute(e){switch(e){case"padding":return this.modifier.length+2;default:return super.getAttribute(e)}}getGaps(){return 1}lint(e=this.getAbsoluteIndex(),t){let n=super.lint(e,t);if(!this.isTemplate())return n;let{type:i,childNodes:s,length:o}=this,l=new I(this,e),p=i==="magic-word";if(p&&!L(this,nt,mn).call(this).valid)n.push($(s[1],l,"invalid-invoke","illegal module name"));else{let d=s[p?1:0],c=d.childNodes.find(h=>h.type==="text"&&Ut(h.data).includes("#"));if(c){let h=$(d,l,"no-ignored","useless fragment");h.fix={range:[h.startIndex+c.getRelativeIndex()+c.data.indexOf("#"),h.endIndex],text:"",desc:"remove"},n.push(h)}}if(p&&o===2)return n.push(N(this,l,"invalid-invoke","missing module function")),n;let g=this.getDuplicatedArgs().filter(([,d])=>!d[0].querySelector("ext"));return g.length>0&&n.push(...g.flatMap(([,d])=>d).map(d=>{let c=$(d,l,"no-duplicate","duplicated parameter");return c.suggestions=[{desc:"remove",range:[c.startIndex-1,c.endIndex],text:""}],c})),n}insertAt(e,t=this.length){return super.insertAt(e,t),e.anon?L(this,nt,Hi).call(this,e):e.name&&this.getArgs(e.name,!1,!1).add(e),e}getAllArgs(){return this.childNodes.filter(St("parameter"))}getAnonArgs(){return this.getAllArgs().filter(({anon:e})=>e)}getArgs(e,t,n=!0){let i=String(e).replace(/^[ \t\n\0\v]+|([^ \t\n\0\v])[ \t\n\0\v]+$/gu,"$1"),s;return u(this,rt).has(i)?s=u(this,rt).get(i):(s=new Set(this.getAllArgs().filter(({name:o})=>i===o)),u(this,rt).set(i,s)),s}getDuplicatedArgs(){return[...u(this,rt)].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;switch(t){case"if":case"ifexist":case"ifexpr":case"iferror":i=2;break;case"ifeq":i=3;break;default:throw new Error("TranscludeToken.getPossibleValues method is only for specific magic words!")}let s=n.slice(i,i+2).map(({childNodes:[,o]})=>o);for(let o=0;o<s.length;){let{length:l,0:p}=s[o].childNodes.filter(g=>g.text().trim());if(l===0)s.splice(o,1);else if(l>1||p.type!=="magic-word")o++;else try{let g=p.getPossibleValues();s.splice(o,1,...g),o+=g.length}catch(g){o++}}return s}print(){let{childNodes:e,length:t,firstChild:n,modifier:i,type:s}=this;return`<span class="wpb-${s}">{{${ut(i)}${s==="magic-word"?n.print()+(t===1?"":":")+Ne(e.slice(1),{sep:"|"}):Ne(e,{sep:"|"})}}}</span>`}};Yt=new WeakMap,tt=new WeakMap,rt=new WeakMap,nt=new WeakSet,mn=function(){let e=this.type==="template",t=this.childNodes[e?0:1];return this.normalizeTitle(t.toString(!0),e?10:828)},Hi=function(e){let t=this.getAnonArgs(),n=typeof e!="number";for(let i=n?t.indexOf(e):e-1;i<t.length;i++){let s=t[i],{name:o}=s,l=String(i+1);o!==l&&(s.setAttribute("name",l),this.getArgs(l,!1,!1).add(s))}}});var Xi,fn,ga,it,Qi=y(()=>{"use strict";Ze();P();Xi=[he()];it=class extends(ga=v){get type(){return"hidden"}};fn=ge(ga),it=ue(fn,0,"HiddenToken",Xi,it),pe(fn,1,it)});var Cr,Zi,Sr,Ji=y(()=>{"use strict";X();j();Q();F();P();Ee();Qi();Sr=class extends v{constructor(e,t=b.getConfig(),n=[]){super(void 0,t,n,{});k(this,Cr);for(let[i,s]of e.entries())if(i===0){let o=new M(s,"arg-name",t,n,{});super.insertAt(o)}else if(i>1){let o=new it(s,t,n);super.insertAt(o)}else{let o=new v(s,t,n);o.type="arg-default",o.setAttribute("stage",2),super.insertAt(o)}}get type(){return"arg"}get default(){var e,t;return(t=(e=this.childNodes[1])==null?void 0:e.text())!=null?t:!1}toString(e){return`{{{${super.toString(e,"|")}}}}`}text(){return`{{{${ce(this.childNodes.slice(0,2),"|")}}}}`}getAttribute(e){return e==="padding"?3:super.getAttribute(e)}getGaps(){return 1}afterBuild(){L(this,Cr,Zi).call(this),super.afterBuild()}lint(e=this.getAbsoluteIndex(),t){let{childNodes:[n,i,...s]}=this;if(!this.getAttribute("include")){let l=N(this,{start:e},"no-arg","unexpected template argument");return i&&(l.suggestions=[{range:[e,l.endIndex],text:i.text(),desc:"expand"}]),[l]}let o=n.lint(e+3,t);if(i&&o.push(...i.lint(e+4+n.toString().length,t)),s.length>0){let l=new I(this,e);o.push(...s.map(p=>{let g=$(p,l,"no-ignored","invisible content inside triple braces");return g.startIndex--,g.startCol--,g.suggestions=[{desc:"remove",range:[g.startIndex,g.endIndex],text:""},{desc:"escape",range:[g.startIndex,g.startIndex+1],text:"{{!}}"}],g}))}return o}print(){return super.print({pre:"{{{",post:"}}}",sep:"|"})}};Cr=new WeakSet,Zi=function(){this.setAttribute("name",this.firstChild.toString(!0).trim())}});var Yi={};oe(Yi,{parseBraces:()=>er});var pa,Ki,xn,ua,er,$r=y(()=>{"use strict";X();hn();Vi();Ji();pa={"=":String.raw`\n(?!(?:[^\S\n]|\0\d+[cn]\x7F)*\n)`,"{":String.raw`\}{2,}|\|`,"-":String.raw`\}-`,"[":String.raw`\]\]`},Ki=String.raw`|\{{2,}`,xn=new Map([["!","!"],["!!","+"],["(!","{"],["!)","}"],["!-","-"],["=","~"],["server","m"]]),ua=/\{\{\s*([^\s\0<>[\]{}|_#&%:.]+)\s*\}\}(?!\})/gu,er=(a,r,e)=>{var d,c,h,m,f,x;let t=String.raw`${(d=r.excludes)!=null&&d.includes("heading")?"":String.raw`^((?:\0\d+[cno]\x7F)*)={1,6}|`}\[\[|-\{(?!\{)`,{parserFunction:[,,,n]}=r,i=[];a=a.replace(ua,(T,w)=>{var S;return new Kt(T.slice(2,-2),[],r,e),`\0${e.length-2}${(S=xn.get(w.toLowerCase()))!=null?S:"t"}\x7F`});let s=a.lastIndexOf("}}")-a.length,o=s+a.length!==-1,l=new RegExp(t+(o?Ki:""),"gmu"),p=l.exec(a),g;for(;p||g!==void 0&&g<=a.length&&((h=(c=i[i.length-1])==null?void 0:c[0])!=null&&h.startsWith("="));){if(p!=null&&p[1]){let[,{length:W}]=p;p[0]=p[0].slice(W),p.index+=W}let{0:T,index:w}=p!=null?p:{0:`
|
|
9
|
+
`,index:a.length},S=(m=i.pop())!=null?m:{},{0:C,index:E,parts:O,findEqual:H,pos:B}=S,Y=T==="="&&H,G=W=>{O[O.length-1].push(W.slice(B,w))};if(T==="]]"||T==="}-")g=w+2;else if(T===`
|
|
10
|
+
`){g=w+1;let{pos:W,findEqual:J}=(f=i[i.length-1])!=null?f:{};if(W===void 0||J||ne(a.slice(W,E))!==""){let se=/^(={1,6})(.+)\1((?:\s|\0\d+[cn]\x7F)*)$/u.exec(a.slice(E,w));se&&(a=`${a.slice(0,E)}\0${e.length}h\x7F${a.slice(w)}`,g=E+4+String(e.length).length,new wt(se[1].length,se.slice(2),r,e))}}else if(T==="|"||Y)g=w+1,G(a),T==="|"&&O.push([]),S.pos=g,S.findEqual=T==="|",i.push(S);else if(T.startsWith("}}")){let W=T.slice(0,Math.min(C.length,3)),J=C.length-W.length,{length:se}=e;g=w+W.length,G(a);let R=!1,ve="t";if(W.length===3){let ee=O.map(De=>De.join("=")),de=ee.length>1&&ne(ee[1]).trim();new Sr(ee,r,e),de&&de.endsWith(":")&&n.includes(de.slice(0,-1).toLowerCase())&&(ve="s")}else try{new Kt(O[0][0],O.slice(1),r,e);let ee=ne(O[0][0]).trim();xn.has(ee.toLowerCase())?ve=xn.get(ee.toLowerCase()):/^(?:filepath|(?:full|canonical)urle?):./iu.test(ee)?ve="m":/^#vardefine:./iu.test(ee)&&(ve="n")}catch(ee){if(ee instanceof SyntaxError&&ee.message==="Invalid template name")R=!0;else throw ee}R||(a=`${a.slice(0,E+J)}\0${se}${ve}\x7F${a.slice(g)}`,g=E+J+3+String(se).length,J>1?i.push({0:C.slice(0,J),index:E,pos:E+J,parts:[[]]}):J===1&&a[E-1]==="-"&&i.push({0:"-{",index:E-1,pos:E+1,parts:[[]]}))}else g=w+T.length,T.startsWith("{")&&(p.pos=g,p.parts=[[]]),i.push(..."0"in S?[S]:[],p);let Z=i[i.length-1];if(o&&s+a.length<g)for(o=!1;(x=Z==null?void 0:Z[0])!=null&&x.startsWith("{");)i.pop(),Z=i[i.length-1];l=new RegExp(t+(o?Ki:"")+(Z?`|${pa[Z[0][0]]}${Z.findEqual?"|=":""}`:""),"gmu"),l.lastIndex=g,p=l.exec(a)}return a}});var Nr,es=y(()=>{"use strict";Zt();$r();F();cn();Nr=class extends vt{constructor(r,e,t=b.getConfig(),n=[]){let i=Symbol("InputboxToken"),{length:s}=n;n.push(i),e&&(e=et(e,t,n,r)),e&&(e=er(e,t,n)),n.splice(s,1),super(r,e,t,n,{})}}});function ts(a,r,e,t,n){r=r.trim();let i=r.replace(a==="link"?/\0\d+[tq]\x7F/gu:/\0\d+t\x7F/gu,"").trim();switch(a){case"width":return!i&&!!r||/^(?:\d+x?|\d*x\d+)(?:\s*px)?$/u.test(i);case"link":{if(!i)return r;let s=new RegExp(String.raw`^(?:${e.protocol}|//|\0\d+m\x7F)`,"iu"),o=new RegExp(String.raw`^(?:(?:${e.protocol}|//)${Ae}|\0\d+m\x7F)${we}$`,"iu");if(s.test(i))return o.test(i)&&r;i.startsWith("[[")&&i.endsWith("]]")&&(i=i.slice(2,-2));let l=b.normalizeTitle(i,0,!1,e,t,!0,!0);return l.valid&&l}case"lang":return(n==="svg"||n==="svgz")&&!/[^a-z\d-]/u.test(i);case"alt":case"class":case"manualthumb":return!0;case"page":return(n==="djvu"||n==="djv"||n==="pdf")&&Number(i)>0;default:return!!i&&!isNaN(i)}}var ca,ae,Ir,rs,Er,ns=y(()=>{"use strict";X();j();F();P();ca=new Set(["alt","link","lang","page","caption"]);Er=class extends v{constructor(e,t,n=b.getConfig(),i){var r=(...Pg)=>(super(...Pg),k(this,Ir),k(this,ae,""),this);var p;let s,o=Object.entries(n.img).map(([g,d])=>[g,d,new RegExp(String.raw`^(\s*(?!\s))${g.replace("$1","(.*)")}${g.endsWith("$1")?`(?=$|
|
|
11
|
+
)`:""}(\s*)$`,"u")]),l=o.find(([,g,d])=>(s=d.exec(e),s&&(s.length!==4||ts(g,s[2],n,!0,t)!==!1)));if(l&&s){s.length===3?(r(void 0,n,i),A(this,ae,e)):(r(s[2],n,i,{}),A(this,ae,s[1]+l[0]+s[3])),this.setAttribute("name",l[1]);return}r(e,{...n,excludes:[...(p=n.excludes)!=null?p:[],"list"]},i),this.setAttribute("name","caption"),this.setAttribute("stage",7)}get type(){return"image-parameter"}get link(){return this.name==="link"?ts("link",super.text(),this.getAttribute("config")):void 0}afterBuild(){var e;((e=this.parentNode)==null?void 0:e.type)==="gallery-image"&&!ca.has(this.name)&&this.setAttribute("name","invalid"),super.afterBuild()}toString(e){return u(this,ae)?u(this,ae).replace("$1",super.toString(e)):super.toString(e)}text(){return u(this,ae)?u(this,ae).replace("$1",super.text()).trim():super.text().trim()}getAttribute(e){return e==="plain"?this.name==="caption":e==="padding"?Math.max(0,u(this,ae).indexOf("$1")):super.getAttribute(e)}lint(e=this.getAbsoluteIndex(),t){let n=super.lint(e,t),{link:i,name:s}=this;if(s==="invalid"){let o=N(this,{start:e},"invalid-gallery","invalid image parameter");o.fix={range:[e-1,o.endIndex],text:"",desc:"remove"},n.push(o)}else if(typeof i=="object"&&i.encoded){let o=N(this,{start:e},"url-encoding","unnecessary URL encoding in an internal link");o.suggestions=[{desc:"decode",range:[e,o.endIndex],text:(0,je.rawurldecode)(this.text())}],n.push(o)}return n}getValue(){return this.name==="invalid"?this.text():L(this,Ir,rs).call(this)||super.text()}print(){return u(this,ae)?`<span class="wpb-image-parameter">${u(this,ae).replace("$1",`<span class="wpb-image-caption">${Ne(this.childNodes)}</span>`)}</span>`:super.print({class:"image-caption"})}};ae=new WeakMap,Ir=new WeakSet,rs=function(){return u(this,ae)&&!u(this,ae).includes("$1")}});var is,ss,os,ha,Ct,bn=y(()=>{"use strict";X();j();Q();F();Vt();ns();is=new Map([["manualthumb","Thumb"],["frameless","Frameless"],["framed","Frame"],["thumbnail","Thumb"]]),ss=new Set(["left","right","center","none"]),os=new Set(["baseline","sub","super","top","text-top","middle","bottom","text-bottom"]),ha=(a,r,e,t)=>{if(t===void 0)return[];let n=new RegExp(`${[a,r,e].map(gi).join("|")}`,"gu"),i=[],s=n.exec(t),o=0,l=0;for(;s;){let{0:p,index:g}=s;p!==e?o+=p===a?1:-1:o===0&&(i.push(t.slice(l,g)),{lastIndex:l}=n),s=n.exec(t)}return i.push(t.slice(l)),i},Ct=class extends Ce{get type(){return"file"}get extension(){return this.getTitle().extension}constructor(r,e,t=b.getConfig(),n=[],i="|"){super(r,void 0,t,n,i);let{extension:s}=this.getTitle(!0);this.append(...ha("-{","}-","|",e).map(o=>new Er(o,s,t,n)))}lint(r=this.getAbsoluteIndex(),e){var h;let t=super.lint(r,e),n=this.getAllArgs().filter(({childNodes:m})=>{let f=m.filter(x=>x.text().trim());return f.length!==1||f[0].type!=="arg"}),i=[...new Set(n.map(({name:m})=>m))],s=i.filter(m=>is.has(m)),o=i.filter(m=>ss.has(m)),l=i.filter(m=>os.has(m)),[p]=s,g=p==="framed"||p==="manualthumb",d=new I(this,r);if(this.closest("ext-link-text")&&((h=this.getValue("link"))==null?void 0:h.trim())!==""&&t.push(N(this,d,"nested-link","internal link in an external link")),g)for(let m of n.filter(({name:f})=>f==="width")){let f=$(m,d,"invalid-gallery","invalid image parameter");f.fix={range:[f.startIndex-1,f.endIndex],text:"",desc:"remove"},t.push(f)}if(n.length===i.length&&s.length<2&&o.length<2&&l.length<2)return t;let c=(m,f)=>x=>{let T=$(x,d,"no-duplicate",b.msg(`${m} image $1 parameter`,f));return T.suggestions=[{desc:"remove",range:[T.startIndex-1,T.endIndex],text:""}],T};for(let m of i){if(m==="invalid"||m==="width"&&g)continue;let f=n.filter(({name:x})=>x===m);m==="caption"&&(f=[...f.slice(0,-1).filter(x=>x.text()),...f.slice(-1)]),f.length>1&&t.push(...f.map(c("duplicated",m)))}return s.length>1&&t.push(...n.filter(({name:m})=>is.has(m)).map(c("conflicting","frame"))),o.length>1&&t.push(...n.filter(({name:m})=>ss.has(m)).map(c("conflicting","horizontal-alignment"))),l.length>1&&t.push(...n.filter(({name:m})=>os.has(m)).map(c("conflicting","vertical-alignment"))),t}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()}}});var $t,Tn=y(()=>{"use strict";j();Se();F();P();bn();$t=class extends Ct{constructor(e,t,n,i=b.getConfig(),s=[]){let o;if(n!==void 0){let{length:l}=s;o=new v(n,i,s);for(let p=1;p<11;p++)o.parseOnce();s.splice(l,1)}super(t,o==null?void 0:o.toString(),i,s);V(this,"privateType","imagemap-image");this.setAttribute("bracket",!1),this.privateType=`${e}-image`,this.seal("privateType",!0)}get type(){return this.privateType}getTitle(){let e=this.type==="imagemap-image";return this.normalizeTitle(this.firstChild.toString(),e?0:6,!0,!e)}getAttribute(e){return e==="padding"?0:super.getAttribute(e)}lint(e=this.getAbsoluteIndex(),t){let n=super.lint(e,t),{ns:i,interwiki:s}=this.getAttribute("title");if(s||i!==6){let o=N(this,{start:e},"invalid-gallery","invalid gallery image");o.suggestions=[{desc:"prefix",range:[e,e],text:"File:"}],n.push(o)}return n}}});var Fr,as,Lr,ls=y(()=>{"use strict";F();P();Tn();Me();Lr=class extends v{constructor(e,t=b.getConfig(),n=[]){var i;super(void 0,t,n,{});k(this,Fr);for(let s of(i=e==null?void 0:e.split(`
|
|
12
|
+
`))!=null?i:[]){let o=/^([^|]+)(?:\|(.*))?/u.exec(s);if(!o){super.insertAt(s.trim()?new z(s,t,n):s);continue}let[,l,p]=o;L(this,Fr,as).call(this,l)?super.insertAt(new $t("gallery",l,p,t,n)):super.insertAt(new z(s,t,n))}}get type(){return"ext-inner"}toString(e){return super.toString(e,`
|
|
13
13
|
`)}text(){return super.text(`
|
|
14
14
|
`).replace(/\n\s*\n/gu,`
|
|
15
|
-
`)}getGaps(){return 1}lint(e=this.getAbsoluteIndex(),t){let{top:n,left:i}=this.getRootNode().posFromIndex(e),s=[];for(let[o,l]of this.childNodes.entries()){let p=l.toString(),{length:g}=p,d=p.trim(),c=n+o,h=o?0:i;if(l.type==="noinclude"&&d&&!/^<!--.*-->$/u.test(d)){let m=e+g;s.push({rule:"no-ignored",message:
|
|
16
|
-
`})}};
|
|
17
|
-
`),i=new Set(e.protocol.split("|")),s=
|
|
15
|
+
`)}getGaps(){return 1}lint(e=this.getAbsoluteIndex(),t){let{top:n,left:i}=this.getRootNode().posFromIndex(e),s=[];for(let[o,l]of this.childNodes.entries()){let p=l.toString(),{length:g}=p,d=p.trim(),c=n+o,h=o?0:i;if(l.type==="noinclude"&&d&&!/^<!--.*-->$/u.test(d)){let m=e+g;s.push({rule:"no-ignored",message:b.msg("invalid content in <$1>","gallery"),severity:d.startsWith("|")?"warning":"error",startIndex:e,endIndex:m,startLine:c,endLine:c,startCol:h,endCol:h+g,suggestions:[{desc:"remove",range:[e,m],text:""},{desc:"comment",range:[e,m],text:`<!--${p}-->`}]})}else l.type!=="noinclude"&&l.type!=="text"&&s.push(...l.lint(e,t));e+=g+1}return s}print(){return super.print({sep:`
|
|
16
|
+
`})}};Fr=new WeakSet,as=function(e){return this.normalizeTitle(e,6,!0,!0).valid}});var Nt,yn=y(()=>{"use strict";j();Vt();Nt=class extends Ce{get type(){return"link"}lint(r=this.getAbsoluteIndex(),e){let t=super.lint(r,e);return this.closest("ext-link-text")&&t.push(N(this,{start:r},"nested-link","internal link in an external link")),t}}});var ma,fa,tr,Ie,Rr=y(()=>{"use strict";j();X();Q();F();P();ma=String.raw`(?:[\p{Zs}\t]| |�*160;|&#[xX]0*[aA]0;)`,fa=new RegExp(`${ma}+`,"gu"),Ie=class extends v{constructor(e,t="free-ext-link",n=b.getConfig(),i){super(e,n,i,{});k(this,tr);A(this,tr,t)}get type(){return u(this,tr)}get innerText(){let e=new Map([["!","|"],["=","="]]),t=ce(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(fa," ")),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:pi(e)}lint(e=this.getAbsoluteIndex(),t){let n=super.lint(e,t),i=new I(this,e);if(this.type==="magic-link"){let{link:p}=this;if(p.startsWith("ISBN")){let g=[...p.slice(5)].map(d=>d==="X"?10:Number(d));(g.length===10&&g.reduce((d,c,h)=>d+c*(10-h),0)%11||g.length===13&&(g[12]===10||g.reduce((d,c,h)=>d+c*(h%2?3:1),0)%10))&&n.push(N(this,i,"invalid-isbn","invalid ISBN"))}return n}let s=this.type==="ext-link-url",o=s?/\|/u:/[,;。:!?()]+/u,l=this.childNodes.find(p=>p.type==="text"&&o.test(p.data));if(l){let{data:p}=l,g=$(l,i,"unterminated-url",b.msg("$1 in URL",s?'"|"':"full-width punctuation"),"warning"),{index:d,0:c}=o.exec(p),h=g.startIndex+d;g.suggestions=s?[{desc:"whitespace",range:[h,h+1],text:" "}]:[{desc:"whitespace",range:[h,h],text:" "},{desc:"escape",range:[h,h+c.length],text:encodeURI(c)}],n.push(g)}return n}};tr=new WeakMap});var Le,Et,kn=y(()=>{"use strict";Se();j();F();P();Rr();Et=class extends v{constructor(e,t="",n="",i=b.getConfig(),s=[]){super(void 0,i,s,{});k(this,Le);let o=e&&/^\0\d+f\x7F$/u.test(e)?s[Number(e.slice(1,-2))]:new Ie(e,"ext-link-url",i,s);if(this.insertAt(o),A(this,Le,t),n){let l=new v(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)}${u(this,Le)}]`:`[${super.toString(e,u(this,Le))}]`}text(){return`[${super.text(" ")}]`}getAttribute(e){return e==="padding"?1:super.getAttribute(e)}getGaps(){return u(this,Le).length}lint(e=this.getAbsoluteIndex(),t){let n=super.lint(e,t);return this.length===1&&this.closest("heading-title")&&n.push(N(this,{start:e},"var-anchor","variable anchor in a section header")),n}print(){return super.print(this.length===1?{pre:"[",post:`${u(this,Le)}]`}:{pre:"[",sep:u(this,Le),post:"]"})}};Le=new WeakMap});var rr,ds=y(()=>{"use strict";F();P();Me();yn();kn();rr=class extends v{get type(){return"imagemap-link"}constructor(r,e,t,n=b.getConfig(),i=[]){super(void 0,n,i),this.append(r,e.length===2?new Nt(...e,n,i):new Et(...e,n,i),new z(t,n,i))}}});var Pr,gs=y(()=>{"use strict";j();Te();Q();F();P();Me();Tn();ds();Pr=class extends v{get type(){return"ext-inner"}get image(){return this.childNodes.find(St("imagemap-image"))}constructor(r,e=b.getConfig(),t=[]){if(super(void 0,e,t,{}),!r)return;let n=r.split(`
|
|
17
|
+
`),i=new Set(e.protocol.split("|")),s=z,o=!0,l=!1;for(let p of n){let g=p.trim();if(!(l||!g||g.startsWith("#"))){if(o){let[d,...c]=p.split("|"),h=this.normalizeTitle(d,0,!0);if(h.valid&&!h.interwiki&&h.ns===6){let m=new $t("imagemap",d,c.length>0?c.join("|"):void 0,e,t);super.insertAt(m),o=!1;continue}else l=!0}else if(p.trim().split(/[\t ]/u)[0]==="desc"){super.insertAt(p);continue}else if(p.includes("[")){let d=p.indexOf("["),c=p.slice(d),h=/^\[\[([^|]+)(?:\|([^\]]+))?\]\][\w\s]*$/u.exec(c);if(h){if(this.normalizeTitle(h[1],0,!0,!1,!0).valid){super.insertAt(new rr(p.slice(0,d),h.slice(1),c.slice(c.indexOf("]]")+2),e,t));continue}}else if(i.has(c.slice(1,c.indexOf(":")+1))||i.has(c.slice(1,c.indexOf("//")+2))){let m=/^\[([^\]\s]+)(?:(\s+(?!\s))([^\]]*))?\][\w\s]*$/u.exec(c);if(m){super.insertAt(new rr(p.slice(0,d),m.slice(1),c.slice(c.indexOf("]")+1),e,t));continue}}}}super.insertAt(new s(p,e,t))}}toString(r){return super.toString(r,`
|
|
18
18
|
`)}text(){return super.text(`
|
|
19
19
|
`).replace(/\n{2,}/gu,`
|
|
20
|
-
`)}getGaps(){return 1}lint(r=this.getAbsoluteIndex(),e){let t=super.lint(r,e),n=new
|
|
21
|
-
`})}}});var Pr,as=b(()=>{"use strict";_();R();_e();Pr=class extends re{get type(){return"ext-inner"}lint(r=this.getAbsoluteIndex()){let{name:e,firstChild:{data:t}}=this;if((e==="templatestyles"||e==="section")&&t){let n=N(this,{start:r},"void-ext",f.msg("nothing should be in <$1>",e));return n.fix={range:[r,n.endIndex],text:""},[n]}return super.lint(r,new RegExp(String.raw`<\s*(?:/\s*)${e==="nowiki"?"":"?"}(${e})\b`,"giu"))}}});var Br={};se(Br,{NestedToken:()=>yn});var da,rr,Nt,yn,jr=b(()=>{"use strict";_();Q();Qt();Cr();R();P();kn();Oe();da=new Set(["comment","include","arg","template","magic-word"]),yn=class extends y{constructor(e,t,n,i=f.getConfig(),s=[]){if(typeof t=="boolean"){let o=Symbol("InputboxToken"),{length:l}=s;s.push(o),e&&(e=Ke(e,i,s,t)),e&&(e=Yt(e,i,s)),s.splice(l,1)}else e&&(e=e.replace(t,(o,l,p,g,d)=>{let c=`\0${s.length+1}e\x7F`;return new Et(l,p,g,d,i,!1,s),c}));e&&(e=e.replace(/(^|\0\d+.\x7F)([^\0]+)(?=$|\0\d+.\x7F)/gu,(o,l,p)=>(new U(p,i,s),`${l}\0${s.length}n\x7F`)));super(e,i,s);T(this,rr);T(this,Nt);v(this,rr,[...n]),v(this,Nt,t)}get type(){return"ext-inner"}lint(e=this.getAbsoluteIndex(),t){let n=new E(this,e),i=u(this,Nt)?"includeonly":"noinclude",s=typeof u(this,Nt)=="boolean"?new RegExp(String.raw`^(?:<${i}(?:\s[^>]*)?/?>|</${i}\s*>)$`,"iu"):/^<!--.*-->$/su;return[...super.lint(e,t),...this.childNodes.filter(o=>{if(o.type==="ext")return!u(this,rr).includes(o.name);if(da.has(o.type))return!1;let l=o.toString().trim();return l&&!s.test(l)}).map(o=>{let l=$(o,n,"no-ignored",f.msg("invalid content in <$1>",this.name));return l.suggestions=[{desc:"remove",range:[l.startIndex,l.endIndex],text:""},{desc:"comment",range:[l.startIndex,l.endIndex],text:`<!--${o.toString()}-->`}],l})]}};rr=new WeakMap,Nt=new WeakMap});var ls,Et,kn=b(()=>{"use strict";_();Q();R();P();ln();yr();Gi();pn();Zi();is();os();as();ls=(a,r)=>{let e=new Set(a);return e.delete(r),[...e]},Et=class extends ft{get type(){return"ext"}constructor(r,e,t,n,i=f.getConfig(),s=!1,o=[]){var c;let l=r.toLowerCase(),p=new ze(!e||e.trimStart()!==e?e:` ${e}`,"ext-attrs",l,i,o),g={...i,ext:ls(i.ext,l),excludes:[...(c=i.excludes)!=null?c:[]]},d;switch(g.inExt=!0,l){case"tab":g.ext=ls(g.ext,"tabs");case"indicator":case"poem":case"ref":case"option":case"combooption":case"tabs":case"poll":case"seo":l==="poem"&&g.excludes.push("heading"),d=new y(t,g,o);break;case"pre":d=new kr(t,g,o);break;case"dynamicpagelist":d=new yt(s,t,g,o);break;case"inputbox":g.excludes.push("heading"),d=new $r(s,t,g,o);break;case"references":{let{NestedToken:h}=(jr(),Z(Br));g.excludes.push("heading"),d=new h(t,s,["ref"],g,o);break}case"choose":{let{NestedToken:h}=(jr(),Z(Br));d=new h(t,/<(option|choicetemplate)(\s[^>]*?)?(?:\/>|>(.*?)<\/(\1)>)/gsu,["option","choicetemplate"],g,o);break}case"combobox":{let{NestedToken:h}=(jr(),Z(Br));d=new h(t,/<(combooption)(\s[^>]*?)?(?:\/>|>(.*?)<\/(combooption\s*)>)/gisu,["combooption"],g,o);break}case"gallery":d=new Lr(t,g,o);break;case"imagemap":d=new Rr(t,g,o);break;default:d=new Pr(t,g,o)}d.setAttribute("name",l),d.type==="plain"&&(d.type="ext-inner"),super(r,p,d,n,i,o),this.seal("closed",!0)}lint(r=this.getAbsoluteIndex(),e){let t=super.lint(r,e),n=new E(this,r);return this.name!=="nowiki"&&this.closest("html-attrs,table-attrs")&&t.push(N(this,n,"parsing-order","extension tag in HTML tag attributes")),this.name==="ref"&&this.closest("heading-title")&&t.push(N(this,n,"var-anchor","variable anchor in a section header")),t}}});var ds,vn,ga,nt,gs=b(()=>{"use strict";_();Xe();R();_e();ds=[ue(!1)];nt=class extends(ga=re){constructor(e,t=!0,n,i){super(e,n,i);X(this,"closed");this.closed=t}get type(){return"comment"}getAttribute(e){return e==="padding"?4:super.getAttribute(e)}lint(e=this.getAbsoluteIndex()){if(this.closed)return[];let t=N(this,{start:e},"unclosed-comment",f.msg("unclosed $1","HTML comment"));return t.fix={range:[t.endIndex,t.endIndex],text:"-->"},[t]}toString(e){return e?"":`<!--${this.innerText}${this.closed?"-->":""}`}print(){return super.print({pre:"<!--",post:this.closed?"-->":""})}};vn=le(ga),nt=ge(vn,0,"CommentToken",ds,nt),de(vn,1,nt)});var ps={};se(ps,{parseCommentAndExt:()=>Ke});var Ke,Qt=b(()=>{"use strict";Si();Oe();$i();kn();gs();Ke=(a,r,e,t)=>{let n="<onlyinclude>",i="</onlyinclude>",{length:s}=n,o=()=>{let c=a.indexOf(n);return{i:c,j:a.indexOf(i,c+s)}};if(t){let{i:c,j:h}=o();if(c!==-1&&h!==-1){let m="",k=x=>{new U(x,r,e),m+=`\0${e.length-1}n\x7F`};for(;c!==-1&&h!==-1;){let x=`\0${e.length}e\x7F`;new xr(a.slice(c+s,h),r,e),c>0&&k(a.slice(0,c)),m+=x,a=a.slice(h+s+1),{i:c,j:h}=o()}return a&&k(a),m}}let l=r.ext.join("|"),p=t?"includeonly":"(?:no|only)include",g=t?"noinclude":"includeonly",d=new RegExp(String.raw`<!--.*?(?:-->|$)|<${p}(?:\s[^>]*)?/?>|</${p}\s*>|<(${l})(\s[^>]*?)?(?:/>|>(.*?)</(\1\s*)>)|<(${g})(\s[^>]*?)?(?:/>|>(.*?)(?:</(${g}\s*)>|$))`,"gisu");return a.replace(d,(c,h,m,k,x,A,S,C,w)=>{let L=e.length,B="n";if(h)B="e",new Et(h,m,k,x,r,A,e);else if(c.startsWith("<!--")){B="c";let j=c.endsWith("-->");new nt(c.slice(4,j?-3:void 0),j,r,e)}else A?new Je(A,S,C,w,r,e):new U(c,r,e);return`\0${L}${B}\x7F`})}});var pa,ua,ca,Lt,he,We,qr,us=b(()=>{"use strict";_();J();Q();P();pa=new Set(["if","ifeq","ifexpr","ifexist","iferror","switch"]),ua=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"]),ca=new Set(["strike","big","center","font","tt"]),qr=class extends y{constructor(e,t,n,i,s,o){super(void 0,s,o);T(this,Lt);T(this,he);T(this,We);this.insertAt(t),this.setAttribute("name",e.toLowerCase()),v(this,Lt,n),v(this,he,i),v(this,We,e)}get type(){return"html"}get selfClosing(){return u(this,he)}get closing(){return u(this,Lt)}toString(e){return`<${this.closing?"/":""}${u(this,We)}${super.toString(e)}${u(this,he)?"/":""}>`}text(){let{closing:e}=this,t=u(this,We)+(e?"":super.text());return`<${e?"/":""}${t}${u(this,he)?"/":""}>`}getAttribute(e){return e==="padding"?u(this,We).length+(this.closing?2:1):super.getAttribute(e)}lint(e=this.getAbsoluteIndex(),t){var s;let n=super.lint(e,t),i=new E(this,e);this.name==="h1"&&!this.closing&&n.push(N(this,i,"h1","<h1>")),this.closest("table-attrs")&&n.push(N(this,i,"parsing-order","HTML tag in table attributes"));try{this.findMatchingTag()}catch(o){if(o instanceof SyntaxError){let{message:l}=o,p=l.split(":")[0].toLowerCase(),g=N(this,i,"unmatched-tag",p);if(p==="unclosed tag"&&!this.closest("heading-title"))if(ua.has(this.name)){let d=(s=this.parentNode)==null?void 0:s.childNodes,c=d==null?void 0:d.indexOf(this);d!=null&&d.slice(0,c).some(({type:h,name:m})=>h==="html"&&m===this.name)||(g.severity="warning")}else g.severity="warning";else if(p==="unmatched closing tag"){let d=this.closest("magic-word");d&&pa.has(d.name)?g.severity="warning":g.suggestions=[{desc:"remove",range:[e,g.endIndex],text:""}]}else if(p==="tag that is both closing and self-closing"){let{html:[,,d]}=this.getAttribute("config");d.includes(this.name)&&(g.fix={range:[e+1,e+2],text:""})}n.push(g)}}return ca.has(this.name)&&n.push(N(this,i,"obsolete-tag","obsolete HTML tag","warning")),(this.name==="b"||this.name==="strong")&&this.closest("heading-title")&&n.push(N(this,i,"bold-header","bold in section header","warning")),n}findMatchingTag(){let{html:[e,t,n]}=this.getAttribute("config"),{name:i,parentNode:s,closing:o}=this,l=di(this.toString());if(o&&(u(this,he)||n.includes(i)))throw new SyntaxError(`Tag that is both closing and self-closing: ${l}`);if(n.includes(i)||u(this,he)&&t.includes(i))return this;if(u(this,he)&&e.includes(i))throw new SyntaxError(`Invalid self-closing tag: ${l}`);if(!s)return;let{childNodes:p}=s,g=p.indexOf(this),d=(o?p.slice(0,g).reverse():p.slice(g+1)).filter(h=>h.type==="html"&&h.name===i),c=o?-1:1;for(let h of d)if(u(h,Lt)?c--:c++,c===0)return h;throw new SyntaxError(`${o?"Unmatched closing":"Unclosed"} tag: ${l}`)}print(){return super.print({pre:`<${this.closing?"/":""}${u(this,We)}`,post:`${u(this,he)?"/":""}>`})}json(){let e=super.json();return Object.assign(e,{closing:this.closing,selfClosing:u(this,he)}),e}};Lt=new WeakMap,he=new WeakMap,We=new WeakMap});var cs={};se(cs,{parseHtml:()=>ha});var ha,hs=b(()=>{"use strict";yr();us();ha=(a,r,e)=>{let t=/^(\/?)([a-z][^\s/>]*)((?:\s|\/(?!>))[^>]*?)?(\/?>)([^<]*)$/iu,{html:n}=r,i=new Set([...n[0],...n[1],...n[2]]),s=a.split("<"),o=s.shift();for(let l of s){let p=t.exec(l),g=p==null?void 0:p[2],d=g==null?void 0:g.toLowerCase();if(!p||!i.has(d)){o+=`<${l}`;continue}let[,c,,h="",m,k]=p,{length:x}=e,A=new ze(h,"html-attrs",d,r,e),S=A.getAttr("itemprop");if(d==="meta"&&(S===void 0||A.getAttr("content")===void 0)||d==="link"&&(S===void 0||A.getAttr("href")===void 0)){o+=`<${l}`,e.length=x;continue}o+=`\0${e.length}x\x7F${k}`,new qr(g,A,c==="/",m==="/>",r,e)}return o}});var ms,xs=b(()=>{"use strict";be();ms=(a=0)=>(r,e)=>{var n,fs;class t extends r{constructor(){super(...arguments);T(this,n)}getAttr(l){return u(this,n,fs).getAttr(l)}}return n=new WeakSet,fs=function(){return this.childNodes[a]},mr(t,r),t}});var It,An=b(()=>{"use strict";xs();R();P();ct();yr();It=class extends ms(1)(y){constructor(r,e,t,n,i=f.getConfig(),s=[],o){super(void 0,i,s,o),this.append(new ce(e,r,"table-syntax",i,s,{}),new ze(n,"table-attrs",t,i,s))}}});var me,nr,st,wn,bs,it,Sn=b(()=>{"use strict";_();Se();be();Q();R();P();An();it=class extends It{constructor(e,t,n=f.getConfig(),i=[]){var p;let s=/\||\0\d+!\x7F/u.exec(t!=null?t:""),o=s?t.slice(0,s.index):"";/\[\[|-\{/u.test(o)&&(s=null,o="");super(/^(?:\n[^\S\n]*(?:[|!]|\|\+|\{\{\s*!\s*\}\}\+?)|(?:\||\{\{\s*!\s*\}\}){2}|!!|\{\{\s*!!\s*\}\})$/u,e,"td",o,n,i);T(this,st);T(this,me,"");T(this,nr);s&&([dr(this,me)._]=s);let l=new y(t==null?void 0:t.slice(((p=s==null?void 0:s.index)!=null?p:NaN)+u(this,me).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 F(this,st,wn).call(this).subtype}afterBuild(){u(this,me).includes("\0")&&v(this,me,this.buildFromStr(u(this,me),0)),super.afterBuild()}toString(e){let{childNodes:[t,n,i]}=this;return t.toString(e)+n.toString(e)+u(this,me)+i.toString(e)}text(){let{childNodes:[e,t,n]}=this;return e.text()+t.text()+u(this,me)+n.text()}getGaps(e){return e===1?u(this,me).length:0}lint(e=this.getAbsoluteIndex(),t){let n=super.lint(e,t),i=new E(this,e+this.getRelativeIndex(this.length-1));for(let s of this.lastChild.childNodes)if(s.type==="text"){let{data:o}=s;if(o.includes("|")){let l=o.includes("||"),p=$(s,i,"pipe-like",'additional "|" in a table cell',l?"error":"warning");if(l){let g={caption:"|+",td:"|",th:"!"}[this.subtype];p.fix={range:[p.startIndex,p.endIndex],text:o.replace(/\|\|/gu,`
|
|
22
|
-
${g}`)}}else p.suggestions=[{desc:"escape",range:[p.startIndex,p.endIndex],text:o.replace(/\|/gu,"|")}];n.push(p)}}return n}isIndependent(){return this.firstChild.text().startsWith(`
|
|
23
|
-
`)}getAttr(e){let t=super.getAttr(e);return e==="rowspan"||e==="colspan"?parseInt(t)||1:t}print(){let{childNodes:[e,t,n]}=this;return`<span class="wpb-td">${e.print()}${t.print()}${u(this,
|
|
24
|
-
|}`,e){let t=this.getAttribute("config"),n=this.getAttribute("accum"),i=e?[r]:
|
|
20
|
+
`)}getGaps(){return 1}lint(r=this.getAbsoluteIndex(),e){let t=super.lint(r,e),n=new I(this,r);return this.image?t.push(...this.childNodes.filter(i=>{let s=i.toString().trim();return i.type==="noinclude"&&s&&!s.startsWith("#")}).map(i=>{let s=$(i,n,"invalid-imagemap","invalid link in <imagemap>");return s.suggestions=[{desc:"remove",range:[s.startIndex-1,s.endIndex],text:""},{desc:"comment",range:[s.startIndex,s.startIndex],text:"# "}],s})):t.push(N(this,n,"invalid-imagemap","<imagemap> without an image")),t}print(){return super.print({sep:`
|
|
21
|
+
`})}}});var Br,ps=y(()=>{"use strict";j();F();Oe();Br=class extends ie{get type(){return"ext-inner"}lint(r=this.getAbsoluteIndex()){let{name:e,firstChild:{data:t}}=this;if((e==="templatestyles"||e==="section")&&t){let n=N(this,{start:r},"void-ext",b.msg("nothing should be in <$1>",e));return n.fix={range:[r,n.endIndex],text:"",desc:"empty"},[n]}return super.lint(r,new RegExp(String.raw`<\s*(?:/\s*)${e==="nowiki"?"":"?"}(${e})\b`,"giu"))}}});var jr={};oe(jr,{NestedToken:()=>vn});var xa,nr,It,vn,qr=y(()=>{"use strict";j();Q();Zt();$r();F();P();An();Me();xa=new Set(["comment","include","arg","template","magic-word"]),vn=class extends v{constructor(e,t,n,i=b.getConfig(),s=[]){if(typeof t=="boolean"){let o=Symbol("InputboxToken"),{length:l}=s;s.push(o),e&&(e=et(e,i,s,t)),e&&(e=er(e,i,s)),s.splice(l,1)}else e&&(e=e.replace(t,(o,l,p,g,d)=>{let c=`\0${s.length+1}e\x7F`;return new Lt(l,p,g,d,i,!1,s),c}));e&&(e=e.replace(/(^|\0\d+.\x7F)([^\0]+)(?=$|\0\d+.\x7F)/gu,(o,l,p)=>(new z(p,i,s),`${l}\0${s.length}n\x7F`)));super(e,i,s);k(this,nr);k(this,It);A(this,nr,[...n]),A(this,It,t)}get type(){return"ext-inner"}lint(e=this.getAbsoluteIndex(),t){let n=new I(this,e),i=u(this,It)?"includeonly":"noinclude",s=typeof u(this,It)=="boolean"?new RegExp(String.raw`^(?:<${i}(?:\s[^>]*)?/?>|</${i}\s*>)$`,"iu"):/^<!--.*-->$/su;return[...super.lint(e,t),...this.childNodes.filter(o=>{if(o.type==="ext")return!u(this,nr).includes(o.name);if(xa.has(o.type))return!1;let l=o.toString().trim();return l&&!s.test(l)}).map(o=>{let l=$(o,n,"no-ignored",b.msg("invalid content in <$1>",this.name));return l.suggestions=[{desc:"remove",range:[l.startIndex,l.endIndex],text:""},{desc:"comment",range:[l.startIndex,l.endIndex],text:`<!--${o.toString()}-->`}],l})]}};nr=new WeakMap,It=new WeakMap});var us,Lt,An=y(()=>{"use strict";j();Q();F();P();gn();kr();Wi();cn();es();ls();gs();ps();us=(a,r)=>{let e=new Set(a);return e.delete(r),[...e]},Lt=class extends bt{get type(){return"ext"}constructor(r,e,t,n,i=b.getConfig(),s=!1,o=[]){var c;let l=r.toLowerCase(),p=new ze(!e||e.trimStart()!==e?e:` ${e}`,"ext-attrs",l,i,o),g={...i,ext:us(i.ext,l),excludes:[...(c=i.excludes)!=null?c:[]]},d;switch(g.inExt=!0,l){case"tab":g.ext=us(g.ext,"tabs");case"indicator":case"poem":case"ref":case"option":case"combooption":case"tabs":case"poll":case"seo":l==="poem"&&g.excludes.push("heading"),d=new v(t,g,o);break;case"pre":d=new vr(t,g,o);break;case"dynamicpagelist":d=new vt(s,t,g,o);break;case"inputbox":g.excludes.push("heading"),d=new Nr(s,t,g,o);break;case"references":{let{NestedToken:h}=(qr(),K(jr));g.excludes.push("heading"),d=new h(t,s,["ref"],g,o);break}case"choose":{let{NestedToken:h}=(qr(),K(jr));d=new h(t,/<(option|choicetemplate)(\s[^>]*?)?(?:\/>|>(.*?)<\/(\1)>)/gsu,["option","choicetemplate"],g,o);break}case"combobox":{let{NestedToken:h}=(qr(),K(jr));d=new h(t,/<(combooption)(\s[^>]*?)?(?:\/>|>(.*?)<\/(combooption\s*)>)/gisu,["combooption"],g,o);break}case"gallery":d=new Lr(t,g,o);break;case"imagemap":d=new Pr(t,g,o);break;default:d=new Br(t,g,o)}d.setAttribute("name",l),d.type==="plain"&&(d.type="ext-inner"),super(r,p,d,n,i,o),this.seal("closed",!0)}lint(r=this.getAbsoluteIndex(),e){let t=super.lint(r,e),n=new I(this,r);return this.name!=="nowiki"&&this.closest("html-attrs,table-attrs")&&t.push(N(this,n,"parsing-order","extension tag in HTML tag attributes")),this.name==="ref"&&this.closest("heading-title")&&t.push(N(this,n,"var-anchor","variable anchor in a section header")),t}}});var cs,wn,ba,st,hs=y(()=>{"use strict";j();Ze();F();Oe();cs=[he(!1)];st=class extends(ba=ie){constructor(e,t=!0,n,i){super(e,n,i);V(this,"closed");this.closed=t}get type(){return"comment"}getAttribute(e){return e==="padding"?4:super.getAttribute(e)}lint(e=this.getAbsoluteIndex()){if(this.closed)return[];let t=N(this,{start:e},"unclosed-comment",b.msg("unclosed $1","HTML comment"));return t.suggestions=[{range:[t.endIndex,t.endIndex],text:"-->",desc:"close"}],[t]}toString(e){return e?"":`<!--${this.innerText}${this.closed?"-->":""}`}print(){return super.print({pre:"<!--",post:this.closed?"-->":""})}};wn=ge(ba),st=ue(wn,0,"CommentToken",cs,st),pe(wn,1,st)});var xs={};oe(xs,{parseCommentAndExt:()=>et});var fs,Ta,Sn,ms,et,Zt=y(()=>{"use strict";Ni();Me();Ii();An();hs();fs="<onlyinclude>",Ta="</onlyinclude>",{length:Sn}=fs,ms=a=>{let r=a.indexOf(fs);return{i:r,j:a.indexOf(Ta,r+Sn)}},et=(a,r,e,t)=>{if(t){let{i:l,j:p}=ms(a);if(l!==-1&&p!==-1){let g="",d=c=>{new z(c,r,e),g+=`\0${e.length-1}n\x7F`};for(;l!==-1&&p!==-1;){let c=`\0${e.length}e\x7F`;new br(a.slice(l+Sn,p),r,e),l>0&&d(a.slice(0,l)),g+=c,a=a.slice(p+Sn+1),{i:l,j:p}=ms(a)}return a&&d(a),g}}let n=r.ext.join("|"),i=t?"includeonly":"(?:no|only)include",s=t?"noinclude":"includeonly",o=new RegExp(String.raw`<!--.*?(?:-->|$)|<${i}(?:\s[^>]*)?/?>|</${i}\s*>|<(${n})(\s[^>]*?)?(?:/>|>(.*?)</(\1\s*)>)|<(${s})(\s[^>]*?)?(?:/>|>(.*?)(?:</(${s}\s*)>|$))`,"gisu");return a.replace(o,(l,p,g,d,c,h,m,f,x)=>{let T=e.length,w="n";if(p)w="e",new Lt(p,g,d,c,r,h,e);else if(l.startsWith("<!--")){w="c";let S=l.endsWith("-->");new st(l.slice(4,S?-3:void 0),S,r,e)}else h?new Ye(h,m,f,x,r,e):new z(l,r,e);return`\0${T}${w}\x7F`})}});var ya,ka,va,Ft,fe,We,_r,bs=y(()=>{"use strict";j();X();Q();P();ya=new Set(["if","ifeq","ifexpr","ifexist","iferror","switch"]),ka=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"]),va=new Set(["strike","big","center","font","tt"]),_r=class extends v{constructor(e,t,n,i,s,o){super(void 0,s,o);k(this,Ft);k(this,fe);k(this,We);this.insertAt(t),this.setAttribute("name",e.toLowerCase()),A(this,Ft,n),A(this,fe,i),A(this,We,e)}get type(){return"html"}get selfClosing(){return u(this,fe)}get closing(){return u(this,Ft)}toString(e){return`<${this.closing?"/":""}${u(this,We)}${super.toString(e)}${u(this,fe)?"/":""}>`}text(){let{closing:e}=this,t=u(this,We)+(e?"":super.text());return`<${e?"/":""}${t}${u(this,fe)?"/":""}>`}getAttribute(e){return e==="padding"?u(this,We).length+(this.closing?2:1):super.getAttribute(e)}lint(e=this.getAbsoluteIndex(),t){var s;let n=super.lint(e,t),i=new I(this,e);if(this.name==="h1"&&!this.closing&&n.push({...N(this,i,"h1","<h1>"),suggestions:[{desc:"h2",range:[e+2,e+3],text:"2"}]}),this.closest("table-attrs")){let o=N(this,i,"parsing-order","HTML tag in table attributes");o.fix={desc:"remove",range:[e,o.endIndex],text:""},n.push(o)}try{this.findMatchingTag()}catch(o){if(o instanceof SyntaxError){let{message:l}=o,p=l.split(":")[0].toLowerCase(),g=N(this,i,"unmatched-tag",p),d={desc:"no self-closing",range:[g.endIndex-2,g.endIndex-1],text:""};switch(p){case"unclosed tag":{let c=(s=this.parentNode)==null?void 0:s.childNodes;ka.has(this.name)&&(c!=null&&c.slice(0,c.indexOf(this)).some(({type:h,name:m})=>h==="html"&&m===this.name))?g.suggestions=[{desc:"close",range:[e+1,e+1],text:"/"}]:this.closest("heading-title")||(g.severity="warning");break}case"unmatched closing tag":{let c=this.closest("magic-word");c&&ya.has(c.name)?g.severity="warning":g.suggestions=[{desc:"remove",range:[e,g.endIndex],text:""}];break}case"tag that is both closing and self-closing":{let{html:[c,,h]}=this.getAttribute("config"),m={desc:"open",range:[e+1,e+2],text:""};h.includes(this.name)?g.fix=m:c.includes(this.name)?g.fix=d:g.suggestions=[m,d];break}case"invalid self-closing tag":g.suggestions=[d,{desc:"close",range:[g.endIndex-2,g.endIndex],text:`></${this.name}>`}]}n.push(g)}}return va.has(this.name)&&n.push(N(this,i,"obsolete-tag","obsolete HTML tag","warning")),(this.name==="b"||this.name==="strong")&&this.closest("heading-title")&&n.push(N(this,i,"bold-header","bold in section header","warning")),n}findMatchingTag(){let{html:[e,t,n]}=this.getAttribute("config"),{name:i,parentNode:s,closing:o}=this,l=ui(this.toString());if(o&&(u(this,fe)||n.includes(i)))throw new SyntaxError(`Tag that is both closing and self-closing: ${l}`);if(n.includes(i)||u(this,fe)&&t.includes(i))return this;if(u(this,fe)&&e.includes(i))throw new SyntaxError(`Invalid self-closing tag: ${l}`);if(!s)return;let{childNodes:p}=s,g=p.indexOf(this),d=(o?p.slice(0,g).reverse():p.slice(g+1)).filter(h=>h.type==="html"&&h.name===i),c=o?-1:1;for(let h of d)if(u(h,Ft)?c--:c++,c===0)return h;throw new SyntaxError(`${o?"Unmatched closing":"Unclosed"} tag: ${l}`)}print(){return super.print({pre:`<${this.closing?"/":""}${u(this,We)}`,post:`${u(this,fe)?"/":""}>`})}json(){let e=super.json();return Object.assign(e,{closing:this.closing,selfClosing:u(this,fe)}),e}};Ft=new WeakMap,fe=new WeakMap,We=new WeakMap});var Ts={};oe(Ts,{parseHtml:()=>wa});var Aa,wa,ys=y(()=>{"use strict";kr();bs();Aa=/^(\/?)([a-z][^\s/>]*)((?:\s|\/(?!>))[^>]*?)?(\/?>)([^<]*)$/iu,wa=(a,r,e)=>{var i;(i=r.htmlElements)!=null||(r.htmlElements=new Set(r.html.flat()));let t=a.split("<"),n=t.shift();for(let s of t){let o=Aa.exec(s),l=o==null?void 0:o[2],p=l==null?void 0:l.toLowerCase();if(!o||!r.htmlElements.has(p)){n+=`<${s}`;continue}let[,g,,d="",c,h]=o,{length:m}=e,f=new ze(d,"html-attrs",p,r,e),x=f.getAttr("itemprop");if(p==="meta"&&(x===void 0||f.getAttr("content")===void 0)||p==="link"&&(x===void 0||f.getAttr("href")===void 0)){n+=`<${s}`,e.length=m;continue}n+=`\0${e.length}x\x7F${h}`,new _r(l,f,g==="/",c==="/>",r,e)}return n}});var ks,As=y(()=>{"use strict";Te();ks=(a=0)=>(r,e)=>{var n,vs;class t extends r{constructor(){super(...arguments);k(this,n)}getAttr(l){return u(this,n,vs).getAttr(l)}}return n=new WeakSet,vs=function(){return this.childNodes[a]},fr(t,r),t}});var Rt,Cn=y(()=>{"use strict";As();F();P();mt();kr();Rt=class extends ks(1)(v){constructor(r,e,t,n,i=b.getConfig(),s=[],o){super(void 0,i,s,o),this.append(new me(e,r,"table-syntax",i,s,{}),new ze(n,"table-attrs",t,i,s))}}});var xe,ir,at,$n,ws,ot,Nn=y(()=>{"use strict";j();Se();Te();Q();F();P();Cn();ot=class extends Rt{constructor(e,t,n=b.getConfig(),i=[]){var p;let s=/\||\0\d+!\x7F/u.exec(t!=null?t:""),o=s?t.slice(0,s.index):"";/\[\[|-\{/u.test(o)&&(s=null,o="");super(/^(?:\n[^\S\n]*(?:[|!]|\|\+|\{\{\s*!\s*\}\}\+?)|(?:\||\{\{\s*!\s*\}\}){2}|!!|\{\{\s*!!\s*\}\})$/u,e,"td",o,n,i);k(this,at);k(this,xe,"");k(this,ir);s&&([pr(this,xe)._]=s);let l=new v(t==null?void 0:t.slice(((p=s==null?void 0:s.index)!=null?p:NaN)+u(this,xe).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 L(this,at,$n).call(this).subtype}afterBuild(){u(this,xe).includes("\0")&&A(this,xe,this.buildFromStr(u(this,xe),0)),super.afterBuild()}toString(e){let{childNodes:[t,n,i]}=this;return t.toString(e)+n.toString(e)+u(this,xe)+i.toString(e)}text(){let{childNodes:[e,t,n]}=this;return e.text()+t.text()+u(this,xe)+n.text()}getGaps(e){return e===1?u(this,xe).length:0}lint(e=this.getAbsoluteIndex(),t){let n=super.lint(e,t),i=new I(this,e+this.getRelativeIndex(this.length-1));for(let s of this.lastChild.childNodes)if(s.type==="text"){let{data:o}=s;if(o.includes("|")){let l=o.includes("||"),p=$(s,i,"pipe-like",'additional "|" in a table cell',l?"error":"warning");if(l){let g={caption:"|+",td:"|",th:"!"}[this.subtype];p.fix={range:[p.startIndex,p.endIndex],text:o.replace(/\|\|/gu,`
|
|
22
|
+
${g}`),desc:"newline"}}else p.suggestions=[{desc:"escape",range:[p.startIndex,p.endIndex],text:o.replace(/\|/gu,"|")}];n.push(p)}}return n}isIndependent(){return this.firstChild.text().startsWith(`
|
|
23
|
+
`)}getAttr(e){let t=super.getAttr(e);return e==="rowspan"||e==="colspan"?parseInt(t)||1:t}print(){let{childNodes:[e,t,n]}=this;return`<span class="wpb-td">${e.print()}${t.print()}${u(this,xe)}${n.print()}</span>`}json(){let e=super.json();return e.subtype=this.subtype,e}};xe=new WeakMap,ir=new WeakMap,at=new WeakSet,$n=function(){var t;let{rev:e}=ke;return(t=u(this,ir))!=null||A(this,ir,[e,L(this,at,ws).call(this)]),u(this,ir)[1]},ws=function(){var o;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{...L(o=i,at,$n).call(o)}}});var Pt,En=y(()=>{"use strict";j();Cn();Nn();Pt=class extends Rt{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=n.childNodes.find(l=>l.text().trim()),s=/^\s*(?:!|\{\{\s*![!-]?\s*\}\})/u;if(!i||s.test(i.toString())||i.is("arg")&&s.test(i.default||""))return t;if(i.is("magic-word"))try{if(i.getPossibleValues().every(l=>s.test(l.text())))return t}catch(l){}let o=$(n,{start:r},"fostered-content","content to be moved out from the table");return o.severity=i.type==="template"?"warning":"error",o.startIndex++,o.startLine++,o.startCol=0,t.push(o),t}getRowCount(){return Number(this.childNodes.some(r=>r instanceof ot&&r.isIndependent()&&!r.firstChild.text().endsWith("+")))}getNthCol(r,e){let t=0;for(let n of this.childNodes.slice(2))if(n instanceof ot&&(n.isIndependent()&&(t=+(n.subtype!=="caption")),r-=t,r<0))return n}}});var Sa,Ca,In,Or,Ss=y(()=>{"use strict";j();Te();Q();F();En();mt();Sa=/^\n[^\S\n]*(?:\|\}|\{\{\s*!\s*\}\}\}|\{\{\s*!\)\s*\}\})$/u,Ca=({type:a})=>a==="tr"||a==="table-syntax",In=class extends Array{},Or=class extends Pt{get type(){return"table"}get closed(){return this.lastChild.type==="table-syntax"}constructor(r,e,t,n){super(/^(?:\{\||\{\{\{\s*!\s*\}\}|\{\{\s*\(!\s*\}\})$/u,r,"table",e,t,n,{})}lint(r=this.getAbsoluteIndex(),e){let t=super.lint(r,e),n=new I(this,r);this.closed||t.push($(this.firstChild,n,"unclosed-table",b.msg("unclosed $1","table")));let i=this.getLayout(),{length:s}=i;if(s>1){let o=1,l=1/0,p=0;for(;p<s;p++){let g=i[p],d=g.length;if(d<o)break;d<l&&(l=d);let c=g.indexOf(g[d-1])+1;if(c>l)break;c>o&&(o=c)}if(p<s){let g=$(this.getNthRow(p),n,"table-layout","inconsistent table layout","warning");g.startIndex++,g.startLine++,g.startCol=0,t.push(g)}}return t}close(r=`
|
|
24
|
+
|}`,e){let t=this.getAttribute("config"),n=this.getAttribute("accum"),i=e?[r]:b.parse(r,this.getAttribute("include"),2,t).childNodes;ke.run(()=>{let s=new me(void 0,Sa,"table-syntax",t,n,{});super.insertAt(s)}),this.lastChild.replaceChildren(...i)}getLayout(r){let e=this.getAllRows(),{length:t}=e,n=new In(...Cs(t,()=>[]));for(let[i,s]of n.entries()){let o=0,l=0,p;for(let g of e[i].childNodes.slice(2))if(g.type==="td"){if(g.isIndependent()&&(p=g.subtype!=="caption"),p){let d={row:i,column:o},{rowspan:c,colspan:h}=g;for(o++;s[l];)l++;for(let m=i;m<Math.min(i+c,t);m++)for(let f=l;f<l+h;f++)n[m][f]=d;l+=h}}else if(Ca(g))break}return n}getAllRows(){return[...super.getRowCount()?[this]:[],...this.childNodes.slice(1).filter(r=>r.type==="tr"&&r.getRowCount()>0)]}getNthCell(r){var t;let e=r;return e&&((t=this.getNthRow(e.row,!1,!1))==null?void 0:t.getNthCol(e.column))}getNthRow(r,e,t){let n=super.getRowCount();if(r===0&&n)return this;n&&r--;for(let i of this.childNodes.slice(2))if(i.type==="tr"&&i.getRowCount()&&(r--,r<0))return i}json(){let r=super.json();return r.closed=this.closed,r}}});var Mr,$s=y(()=>{"use strict";En();Mr=class extends Pt{get type(){return"tr"}constructor(r,e,t,n){super(/^\n[^\S\n]*(?:\|-+|\{\{\s*!\s*\}\}-+|\{\{\s*!-\s*\}\}-*)$/u,r,"tr",e,t,n,{})}}});var Bt,Ln=y(()=>{"use strict";Oe();Bt=class extends ie{}});var jt,Fn=y(()=>{"use strict";Ln();jt=class extends Bt{get type(){return"dd"}}});var Es={};oe(Es,{parseTable:()=>Na});var $a,Ns,Na,Is=y(()=>{"use strict";P();Ss();$s();Nn();Fn();$a=a=>a.lastChild.constructor!==v,Ns=(a,r)=>a.type==="td"?r.pop():a,Na=({firstChild:{data:a},type:r,name:e},t,n)=>{let i=[],s=a.split(`
|
|
25
25
|
`),o=r==="root"||r==="parameter-value"||r==="ext-inner"&&e==="poem"?"":`
|
|
26
|
-
${s.shift()}`,l,p=(d
|
|
27
|
-
${
|
|
28
|
-
${
|
|
29
|
-
${
|
|
30
|
-
${
|
|
31
|
-
${
|
|
32
|
-
${c}${S}`,q=D=>{let H=new it(j,C.slice(B,L==null?void 0:L.index),t,n);return D.insertAt(H),H};for(;L;)q(l),{lastIndex:B}=w,[j]=L,L=w.exec(C);i.push(l,q(l))}}return o.slice(1)}});var Mr,ws=b(()=>{"use strict";_e();Mr=class extends re{get type(){return"hr"}}});var Ss,Ln,Ta,ot,Cs=b(()=>{"use strict";Xe();R();_e();Ss=[ue()];ot=class extends(Ta=re){get type(){return"double-underscore"}constructor(r,e,t=f.getConfig(),n){super(r,t,n)}getAttribute(r){return r==="padding"?2:super.getAttribute(r)}toString(){return`__${this.innerText}__`}print(){return super.print({pre:"__",post:"__"})}};Ln=le(Ta),ot=ge(Ln,0,"DoubleUnderscoreToken",Ss,ot),de(Ln,1,ot)});var $s={};se($s,{parseHrAndDoubleUnderscore:()=>ya});var ya,Ns=b(()=>{"use strict";ws();Cs();un();ya=({firstChild:{data:a},type:r,name:e},t,n)=>{var l;let{doubleUnderscore:i}=t,s=new Set(i[0]),o=new Set(i[1]);return(l=t.regexHrAndDoubleUnderscore)!=null||(t.regexHrAndDoubleUnderscore=new RegExp(`__(${[...s,...o].join("|")})__`,"giu")),r!=="root"&&(r!=="ext-inner"||e!=="poem")&&(a=`\0${a}`),a=a.replace(/^((?:\0\d+[cno]\x7F)*)(-{4,})/gmu,(p,g,d)=>(new Mr(d,t,n),`${g}\0${n.length-1}r\x7F`)).replace(t.regexHrAndDoubleUnderscore,(p,g)=>{var m,k;let d=o.has(g),c=g.toLowerCase(),h=s.has(c);return d||h?(new ot(g,d,t,n),`\0${n.length-1}${h&&((k=(m=i[2])==null?void 0:m[c])!=null?k:c)==="toc"?"u":"n"}\x7F`):p}).replace(/^((?:\0\d+[cn]\x7F)*)(={1,6})(.+)\2((?:\s|\0\d+[cn]\x7F)*)$/gmu,(p,g,d,c,h)=>{let m=`${g}\0${n.length}h\x7F`;return new vt(d.length,[c,h],t,n),m}),r==="root"||r==="ext-inner"&&e==="poem"?a:a.slice(1)}});var Gr,Es=b(()=>{"use strict";_();Q();R();_e();Gr=class extends re{get type(){return"quote"}get bold(){return this.innerText.length!==2}get italic(){return this.innerText.length!==3}text(){let{parentNode:r,innerText:e}=this;return(r==null?void 0:r.type)==="image-parameter"&&r.name!=="caption"?"":e}lint(r=this.getAbsoluteIndex()){let{previousSibling:e,nextSibling:t,bold:n}=this,i=f.msg('lonely "$1"',"'"),s=[],o=new E(this,r),l,p=(g,d,c)=>({desc:"escape",range:[g,d],text:"'".repeat(c)});if((e==null?void 0:e.type)==="text"&&e.data.endsWith("'")){l=N(this,o,"lonely-apos",i);let{startIndex:g,startLine:d,startCol:c}=l,[,{length:h}]=/(?:^|[^'])('+)$/u.exec(e.data),m=r-h;s.push({...l,startIndex:m,endIndex:g,startCol:c-h,endLine:d,endCol:c,suggestions:[p(m,g,h)]})}if((t==null?void 0:t.type)==="text"&&t.data.startsWith("'")){l!=null||(l=N(this,o,"lonely-apos",i));let{endIndex:g,endLine:d,endCol:c}=l,[{length:h}]=/^'+/u.exec(t.data),m=g+h;s.push({...l,startIndex:g,endIndex:m,startLine:d,startCol:c,endCol:c+h,suggestions:[p(g,m,h)]})}return n&&this.closest("heading-title")&&s.push(N(this,o,"bold-header","bold in section header","warning")),s}json(){let r=super.json();return Object.assign(r,{bold:this.bold,italic:this.italic}),r}}});var Ls={};se(Ls,{parseQuotes:()=>In});var In,Fn=b(()=>{"use strict";Es();In=(a,r,e)=>{var g;let t=a.split(/('{2,})/u),{length:n}=t;if(n===1)return a;let i=0,s=0,o,l,p;for(let d=1;d<n;d+=2){let c=t[d].length;switch(c){case 2:s++;break;case 4:t[d-1]+="'",t[d]="'''";case 3:if(i++,o!==void 0)break;t[d-1].endsWith(" ")?l===void 0&&p===void 0&&(p=d):t[d-1].slice(-2,-1)===" "?o=d:l!=null||(l=d);break;default:t[d-1]+="'".repeat(c-5),t[d]="'''''",s++,i++}}if(s%2===1&&i%2===1){let d=(g=o!=null?o:l)!=null?g:p;d!==void 0&&(t[d]="''",t[d-1]+="'")}for(let d=1;d<n;d+=2)new Gr(t[d],r,e),t[d]=`\0${e.length-1}q\x7F`;return t.join("")}});var Is={};se(Is,{parseExternalLinks:()=>Rn});var Rn,Pn=b(()=>{"use strict";J();Tn();Fr();Rn=(a,r,e,t)=>{var n;return(n=r.regexExternalLinks)!=null||(r.regexExternalLinks=new RegExp(String.raw`\[(\0\d+f\x7F|(?:(?:${r.protocol}|//)${Ae}|\0\d+m\x7F)${we}(?=[[\]<>"\t\p{Zs}]|\0\d))(\p{Zs}*(?!\p{Zs}))([^\]\x01-\x08\x0A-\x1F\uFFFD]*)\]`,"giu")),a.replace(r.regexExternalLinks,(i,s,o,l)=>{let{length:p}=e,g=/&[lg]t;/u.exec(s);return g&&(s=s.slice(0,g.index),o="",l=s.slice(g.index)+o+l),t?(new Le(s,"ext-link-url",r,e),`[\0${p}f\x7F${o}${l}]`):(new $t(s,o,l,r,e),`\0${p}w\x7F`)})}});var zr,Fs=b(()=>{"use strict";Ht();zr=class extends Ce{get type(){return"category"}}});var Ps={};se(Ps,{parseLinks:()=>Rs});var ka,Rs,Bs=b(()=>{"use strict";R();Fn();Pn();bn();fn();Fs();ka=/^((?:(?!\0\d+!\x7F)[^\n[\]{}|])+)(\||\0\d+!\x7F)(.*)$/su,Rs=(a,r,e)=>{var s;(s=r.regexLinks)!=null||(r.regexLinks=new RegExp(String.raw`^\s*(?:${r.protocol}|//)`,"iu"));let t=r.inExt?/^((?:(?!\0\d+!\x7F)[^\n[\]{}|])+)(?:(\||\0\d+!\x7F)(.*?[^\]]))?\]\](.*)$/su:/^((?:(?!\0\d+!\x7F)[^\n[\]{}|])+)(?:(\||\0\d+!\x7F)(.*?[^\]])?)?\]\](.*)$/su,n=a.split("[["),i=n.shift();for(let o=0;o<n.length;o++){let l=!1,p,g,d,c,h=n[o],m=t.exec(h);if(m)[,p,g,d,c]=m,c.startsWith("]")&&(d!=null&&d.includes("["))&&(d+="]",c=c.slice(1));else{let L=ka.exec(h);L&&(l=!0,[,p,g,d]=L)}if(p===void 0||r.regexLinks.test(p)||/\0\d+[exhbru]\x7F/u.test(p)){i+=`[[${h}`;continue}let k=p.trim().startsWith(":");if(k&&l){i+=`[[${h}`;continue}let x=f.normalizeTitle(p,0,!1,r,!0,!0,!0),{ns:A,valid:S,interwiki:C}=x;if(S){if(l){if(C||A!==6){i+=`[[${h}`;continue}let L=!1;for(o++;o<n.length;o++){let B=n[o],j=B.split("]]");if(j.length>2){L=!0,d+=`[[${j[0]}]]${j[1]}`,c=j.slice(2).join("]]");break}else if(j.length===2)d+=`[[${j[0]}]]${j[1]}`;else{d+=`[[${B}`;break}}if(d=Rs(d,r,e),!L){i+=`[[${p}${g}${d}`;continue}}}else{i+=`[[${h}`;continue}d&&(d=In(d,r,e));let w=Ct;k||(!C&&A===6?(d&&(d=Rn(d,r,e,!0)),w=wt):!C&&A===14&&(w=zr)),d===void 0&&g&&(d=""),i+=`\0${e.length}l\x7F${c}`,new w(p,d,r,e,g)}return i}});var Os={};se(Os,{parseMagicLinks:()=>Aa});var _s,js,qs,va,Aa,Ms=b(()=>{"use strict";J();Fr();_s=String.raw`[\p{Zs}\t]| |�*160;|�*a0;`,js=`(?:${_s})+`,qs=`(?:${_s}|-)`,va=String.raw`(?:RFC|PMID)${js}\d+\b|ISBN${js}(?:97[89]${qs}?)?(?:\d${qs}?){9}[\dx]\b`,Aa=(a,r,e)=>{var t;return(t=r.regexMagicLinks)!=null||(r.regexMagicLinks=new RegExp(String.raw`(^|[^\p{L}\d_])(?:(?:${r.protocol})(${Ae}${we})|${va})`,"giu")),a.replace(r.regexMagicLinks,(n,i,s)=>{let o=i?n.slice(i.length):n;if(s){let l="",p=/&(?:lt|gt|nbsp|#x0*(?:3[ce]|a0)|#0*(?:6[02]|160));/iu.exec(o);p&&(l=o.slice(p.index),o=o.slice(0,p.index));let g=o.includes("(")?/[^,;\\.:!?][,;\\.:!?]+$/u:/[^,;\\.:!?)][,;\\.:!?)]+$/u,d=g.exec(o);if(d){let c=1;d[0][1]===";"&&/&(?:[a-z]+|#x[\da-f]+|#\d+)$/iu.test(o.slice(0,d.index))&&(c=2),l=o.slice(d.index+c)+l,o=o.slice(0,d.index+c)}return l.length>=s.length?n:(new Le(o,void 0,r,e),`${i}\0${e.length-1}w\x7F${l}`)}else if(!/^(?:RFC|PMID|ISBN)/u.test(o))return n;return new Le(o,"magic-link",r,e),`${i}\0${e.length-1}i\x7F`})}});var Gs,zs=b(()=>{"use strict";Gs=(a,r)=>a.startsWith(r)?r.length:[...r].findIndex((e,t)=>e!==a[t])});var Wr,Ws=b(()=>{"use strict";Nn();Wr=class extends Rt{get type(){return"list"}}});var Us={};se(Us,{parseList:()=>wa});var wa,Ds=b(()=>{"use strict";zs();Ws();En();wa=(a,r,e,t)=>{let n=/^((?:\0\d+[cno]\x7F)*)([;:*#]+\s*)/u.exec(a);if(!n)return r.lastPrefix="",a;let[i,s,o]=n,l=o.replace(/;/gu,":"),p=Gs(l,r.lastPrefix),g=(p>1?o.slice(p-1):o).split(/(?=;)/u),d=g[0].startsWith(";"),c=g.length-(d?0:1);if(p>1){let q=o.slice(0,p-1);d?g.unshift(q):g[0]=q+g[0]}r.lastPrefix=l;let h=s+g.map((q,D)=>`\0${t.length+D}d\x7F`).join("")+a.slice(i.length);for(let q of g)new Wr(q,e,t);if(!c)return h;let{html:[m]}=e,k=/:+|-\{|\0\d+[xq]\x7F/gu,x=k,A=x.exec(h),S=0,C=!1,w=!1,L=0,B=(q,D)=>(new Pt(q,e,t),`${h.slice(0,D)}\0${t.length-1}d\x7F${h.slice(D+q.length)}`),j=q=>{q?S&&S--:S++};for(;A&&c;){let{0:q,index:D}=A;if(q==="-{"){if(!L){let{lastIndex:H}=x;x=/-\{|\}-/gu,x.lastIndex=H}L++}else if(q==="}-"){if(L--,!L){let{lastIndex:H}=x;x=k,x.lastIndex=H}}else if(q.endsWith("x\x7F")){let{name:H,closing:ne,selfClosing:ee}=t[Number(q.slice(1,-2))];(!ee||m.includes(H))&&j(ne)}else if(q.endsWith("q\x7F")){let{bold:H,italic:ne}=t[Number(q.slice(1,-2))];H&&(j(C),C=!C),ne&&(j(w),w=!w)}else if(S===0){if(q.length>=c)return B(q.slice(0,c),D);c-=q.length,x.lastIndex=D+4+String(t.length).length,h=B(q,D)}A=x.exec(h)}return h}});var Hs,Fe,Ur,Vs=b(()=>{"use strict";_();Q();R();P();Ee();Hs=new Set(["A","T","R","D","-","H","N"]),Ur=class extends y{constructor(e,t=f.getConfig(),n=[]){super(void 0,t,n,{});T(this,Fe);this.append(...e.map(i=>new G(i,"converter-flag",t,n)))}get type(){return"converter-flags"}afterBuild(){v(this,Fe,this.childNodes.map(e=>e.text().trim())),super.afterBuild()}toString(e){return super.toString(e,";")}text(){return super.text(";")}getGaps(){return 1}getUnknownFlags(){return new Set(u(this,Fe).filter(e=>/\{{3}[^{}]+\}{3}/u.test(e)))}getVariantFlags(){let e=new Set(this.getAttribute("config").variants);return new Set(u(this,Fe).filter(t=>e.has(t)))}lint(e=this.getAbsoluteIndex(),t){let n=this.getVariantFlags(),i=this.getUnknownFlags(),s=new Set(u(this,Fe).filter(d=>Hs.has(d))),o=u(this,Fe).filter(d=>!d).length,l=u(this,Fe).length-i.size-o,p=super.lint(e,t);if(n.size===l||s.size===l)return p;let g=new E(this,e);for(let[d,c]of this.childNodes.entries()){let h=c.text().trim();if(h&&!n.has(h)&&!i.has(h)&&(n.size>0||!s.has(h))){let m=$(c,g,"no-ignored","invalid conversion flag");n.size===0&&Hs.has(h.toUpperCase())?m.fix={range:[m.startIndex,m.endIndex],text:h.toUpperCase()}:m.suggestions=[{desc:"remove",range:[m.startIndex-(d&&1),m.endIndex],text:""}],p.push(m)}}return p}print(){return super.print({sep:";"})}};Fe=new WeakMap});var Bt,Xs=b(()=>{"use strict";R();P();Ee();Bt=class extends y{get type(){return"converter-rule"}constructor(r,e=!0,t=f.getConfig(),n=[]){super(void 0,t,n);let i=r.indexOf(":"),s=r.slice(0,i).indexOf("=>"),o=s===-1?r.slice(0,i):r.slice(s+2,i);e&&t.variants.includes(o.trim())?(super.insertAt(new G(o,"converter-rule-variant",t,n)),super.insertAt(new G(r.slice(i+1),"converter-rule-to",t,n)),s!==-1&&super.insertAt(new G(r.slice(0,s),"converter-rule-from",t,n),0)):super.insertAt(new G(r,"converter-rule-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(){let{childNodes:r}=this;if(r.length===3){let[e,t,n]=r;return`<span class="wpb-converter-rule">${e.print()}=>${t.print()}:${n.print()}</span>`}return super.print({sep:":"})}}});var Dr,Qs=b(()=>{"use strict";J();R();P();Vs();Xs();Dr=class extends y{get type(){return"converter"}constructor(r,e,t=f.getConfig(),n=[]){super(void 0,t,n),this.append(new Ur(r,t,n));let[i]=e,s=i.includes(":"),o=new Bt(i,s,t,n);s&&o.length===1||!s&&e.length===2&&!te(e[1]).trim()?this.insertAt(new Bt(e.join(";"),!1,t,n)):this.append(o,...e.slice(1).map(l=>new Bt(l,!0,t,n)))}toString(r){let{childNodes:[e,...t]}=this;return`-{${e.toString(r)}${e.length>0?"|":""}${t.map(n=>n.toString(r)).join(";")}}-`}text(){let{childNodes:[r,...e]}=this;return`-{${r.text()}|${pe(e,";")}}-`}getAttribute(r){return r==="padding"?2:super.getAttribute(r)}getGaps(r){return r||this.firstChild.length>0?1:0}print(){let{childNodes:[r,...e]}=this;return`<span class="wpb-converter">-{${r.print()}${r.length>0?"|":""}${Ne(e,{sep:";"})}}-</span>`}}});var Zs={};se(Zs,{parseConverter:()=>Sa});var Sa,Js=b(()=>{"use strict";Qs();Sa=(a,r,e)=>{var l;(l=r.regexConverter)!=null||(r.regexConverter=new RegExp(String.raw`;(?=(?:[^;]*?=>)?\s*(?:${r.variants.join("|")})\s*:|(?:\s|\0\d+[cn]\x7F)*$)`,"u"));let t=/-\{/gu,n=/-\{|\}-/gu,i=[],s=t,o=s.exec(a);for(;o;){let{0:p,index:g}=o;if(p==="}-"){let d=i.pop(),{length:c}=e,h=a.slice(d.index+2,g),m=h.indexOf("|"),[k,x]=m===-1?[[],h]:[h.slice(0,m).split(";"),h.slice(m+1)],A=x.replace(/(&[#a-z\d]+);/giu,"$1"),S=A.split(r.regexConverter).map(C=>C.replace(/\x01/gu,";"));new Dr(k,S,r,e),a=`${a.slice(0,d.index)}\0${c}v\x7F${a.slice(g+2)}`,i.length===0&&(s=t),s.lastIndex=d.index+3+String(c).length}else i.push(o),s=n,s.lastIndex=g+2;o=s.exec(a)}return a}});var Hr={};se(Hr,{Token:()=>y});var ir,fe,O,z,at,jt,sr,M,Ks,Ys,eo,to,ro,no,io,so,oo,ao,lo,go,Bn,y,P=b(()=>{"use strict";J();Se();be();_();R();mi();bi();Bn=class Bn extends cr{constructor(e,t=f.getConfig(),n=[],i){super();T(this,M);T(this,ir,"plain");T(this,fe,0);T(this,O);T(this,z);T(this,at);T(this,jt,!1);T(this,sr);typeof e=="string"&&this.insertAt(e),v(this,O,t),v(this,z,n),n.push(this)}get type(){return u(this,ir)}set type(e){v(this,ir,e)}parseOnce(e=u(this,fe),t=!1){if(e<u(this,fe)||this.length===0||!this.getAttribute("plain"))return this;if(u(this,fe)>=11)return this;switch(e){case 0:if(this.type==="root"){u(this,z).pop();let n=F(this,M,Ks).call(this);t&&(t=!n)}v(this,at,t),F(this,M,Ys).call(this,t);break;case 1:F(this,M,eo).call(this);break;case 2:F(this,M,to).call(this);break;case 3:F(this,M,ro).call(this);break;case 4:F(this,M,no).call(this);break;case 5:F(this,M,io).call(this);break;case 6:F(this,M,so).call(this);break;case 7:F(this,M,oo).call(this);break;case 8:F(this,M,ao).call(this);break;case 9:F(this,M,lo).call(this);break;case 10:F(this,M,go).call(this)}if(this.type==="root")for(let n of u(this,z))n==null||n.parseOnce(e,t);return dr(this,fe)._++,this}buildFromStr(e,t){let n=e.split(/[\0\x7F]/u).map((i,s)=>{if(s%2===0)return new Wt(i);if(isNaN(i.slice(-1)))return u(this,z)[Number(i.slice(0,-1))];throw new Error(`Failed to build! Unrecognized token: ${i}`)});return t===0?n.map(String).join(""):t===1?pe(n):n}build(){v(this,fe,11);let{length:e,firstChild:t}=this,n=t==null?void 0:t.toString();if(e===1&&t.type==="text"&&n.includes("\0")&&(this.replaceChildren(...this.buildFromStr(n)),this.normalize(),this.type==="root"))for(let i of u(this,z))i==null||i.build()}afterBuild(){if(this.type==="root")for(let e of u(this,z))e==null||e.afterBuild();v(this,jt,!0)}parse(e=11,t){for(e=Math.min(e,11);u(this,fe)<e;)this.parseOnce(u(this,fe),t);return e&&(this.build(),this.afterBuild()),this}getAttribute(e){var t;switch(e){case"plain":return this.constructor===Bn;case"config":return u(this,O);case"include":return(t=u(this,at))!=null?t:!!u(this.getRootNode(),at);case"accum":return u(this,z);case"built":return u(this,jt);default:return super.getAttribute(e)}}setAttribute(e,t){switch(e){case"stage":u(this,fe)===0&&this.type==="root"&&u(this,z).shift(),v(this,fe,t);break;default:super.setAttribute(e,t)}}insertAt(e,t=this.length){let n=typeof e=="string"?new Wt(e):e;return super.insertAt(n,t),n.type==="root"&&(n.type="plain"),n}normalizeTitle(e,t=0,n,i,s){return f.normalizeTitle(e,t,u(this,at),u(this,O),n,i,s)}lint(e=this.getAbsoluteIndex(),t){var i;let n=super.lint(e,t);if(this.type==="root"){let s=new Map,o="category,html-attr#id,ext-attr#id,table-attr#id,ext-attr#name";for(let m of this.querySelectorAll(o)){let k;if(m.type==="category")k=m.name;else{let A=m.getValue(),S=m.parentNode;if(m.name==="id")k=`#${A===!0?"":A}`;else if(m.tag==="ref"&&A!==!0&&A&&S.parentNode.innerText){let C=S.getAttr("group");k=`${typeof C=="string"&&C||" "}#${A}`}else continue}let x=s.get(k);x?x.add(m):s.set(k,new Set([m]))}for(let[m,k]of s)if(k.size>1&&!m.startsWith("#mw-customcollapsible-")){let x=!m.includes("#"),A=`duplicated ${x?"category":"id/name"}`,S=m.startsWith("#")?"warning":"error";n.push(...[...k].map(C=>{let w=N(C,{start:C.getAbsoluteIndex()},"no-duplicate",A,S);return x&&(w.suggestions=[{desc:"remove",range:[w.startIndex,w.endIndex],text:""}]),w}))}let l=/<!--\s*lint-(disable(?:(?:-next)?-line)?|enable)(\s[\sa-z,-]*)?-->/gu,p=this.toString(),g=[],d=l.exec(p),c=0,h=0;for(;d;){let{1:m,index:k}=d,x=(i=d[2])==null?void 0:i.trim();h+=p.slice(c,k).split(`
|
|
33
|
-
`).length-1,c=
|
|
34
|
-
`);for(let i=0;i<t.length;i++)t[i]=e(t[i],u(this,
|
|
35
|
-
`))},
|
|
36
|
-
`),n={lastPrefix:""},i=this.type==="root"||this.type==="ext-inner"&&this.name==="poem"?0:1;for(;i<t.length;i++)t[i]=e(t[i],n,u(this,
|
|
37
|
-
`))},
|
|
26
|
+
${s.shift()}`,l,p=(g,d)=>{if(!d){o+=g;return}let{lastChild:c}=d;if($a(d)){let h=new v(g,t,n);h.type="table-inter",h.setAttribute("stage",3),d.insertAt(h)}else c.setText(c.toString()+g)};for(let g of s){l=i.pop();let[d]=/^(?:\s|\0\d+[cno]\x7F)*/u.exec(g),c=g.slice(d.length),h=/^(:*)((?:\s|\0\d+[cn]\x7F)*)(\{\||\{(?:\0\d+[cn]\x7F)*\0\d+!\x7F|\0\d+\{\x7F)(.*)$/u.exec(c);if(h){for(;l&&l.type!=="td";)l=i.pop();let[,S,C,E,O]=h;S&&new jt(S,t,n),p(`
|
|
27
|
+
${d}${S&&`\0${n.length-1}d\x7F`}${C}\0${n.length}b\x7F`,l),i.push(...l?[l]:[],new Or(E,O,t,n));continue}else if(!l){o+=`
|
|
28
|
+
${g}`;continue}let m=/^(?:(\|\}|\0\d+!\x7F\}|\0\d+\}\x7F)|(\|-+|\0\d+!\x7F-+|\0\d+-\x7F-*)(?!-)|(!|(?:\||\0\d+!\x7F)\+?))(.*)$/u.exec(c);if(!m){p(`
|
|
29
|
+
${g}`,l),i.push(l);continue}let[,f,x,T,w]=m;if(f){for(;l.type!=="table";)l=i.pop();l.close(`
|
|
30
|
+
${d}${f}`,!0),p(w,i[i.length-1])}else if(x){l=Ns(l,i),l.type==="tr"&&(l=i.pop());let S=new Mr(`
|
|
31
|
+
${d}${x}`,w,t,n);i.push(l,S),l.insertAt(S)}else{l=Ns(l,i);let S=T==="!"?/!!|(?:\||\0\d+!\x7F){2}|\0\d+\+\x7F/gu:/(?:\||\0\d+!\x7F){2}|\0\d+\+\x7F/gu,C=S.exec(w),E=0,O=`
|
|
32
|
+
${d}${T}`,H=B=>{let Y=new ot(O,w.slice(E,C==null?void 0:C.index),t,n);return B.insertAt(Y),Y};for(;C;)H(l),{lastIndex:E}=S,[O]=C,C=S.exec(w);i.push(l,H(l))}}return o.slice(1)}});var Gr,Ls=y(()=>{"use strict";Oe();Gr=class extends ie{get type(){return"hr"}}});var Fs,Rn,Ea,lt,Rs=y(()=>{"use strict";Ze();F();Oe();Fs=[he()];lt=class extends(Ea=ie){get type(){return"double-underscore"}constructor(r,e,t=b.getConfig(),n){super(r,t,n)}getAttribute(r){return r==="padding"?2:super.getAttribute(r)}toString(){return`__${this.innerText}__`}print(){return super.print({pre:"__",post:"__"})}};Rn=ge(Ea),lt=ue(Rn,0,"DoubleUnderscoreToken",Fs,lt),pe(Rn,1,lt)});var Ps={};oe(Ps,{parseHrAndDoubleUnderscore:()=>Ia});var Ia,Bs=y(()=>{"use strict";Ls();Rs();hn();Ia=({firstChild:{data:a},type:r,name:e},t,n)=>{var l,p,g;let{doubleUnderscore:[i,s,o]}=t;return(l=t.insensitiveDoubleUnderscore)!=null||(t.insensitiveDoubleUnderscore=new Set(i)),(p=t.sensitiveDoubleUnderscore)!=null||(t.sensitiveDoubleUnderscore=new Set(s)),(g=t.regexHrAndDoubleUnderscore)!=null||(t.regexHrAndDoubleUnderscore=new RegExp(`__(${[...i,...s].join("|")})__`,"giu")),r!=="root"&&(r!=="ext-inner"||e!=="poem")&&(a=`\0${a}`),a=a.replace(/^((?:\0\d+[cno]\x7F)*)(-{4,})/gmu,(d,c,h)=>(new Gr(h,t,n),`${c}\0${n.length-1}r\x7F`)).replace(t.regexHrAndDoubleUnderscore,(d,c)=>{var x;let h=t.sensitiveDoubleUnderscore.has(c),m=c.toLowerCase(),f=t.insensitiveDoubleUnderscore.has(m);return h||f?(new lt(c,h,t,n),`\0${n.length-1}${f&&((x=o==null?void 0:o[m])!=null?x:m)==="toc"?"u":"n"}\x7F`):d}).replace(/^((?:\0\d+[cn]\x7F)*)(={1,6})(.+)\2((?:\s|\0\d+[cn]\x7F)*)$/gmu,(d,c,h,m,f)=>{let x=`${c}\0${n.length}h\x7F`;return new wt(h.length,[m,f],t,n),x}),r==="root"||r==="ext-inner"&&e==="poem"?a:a.slice(1)}});var Ur,js=y(()=>{"use strict";j();Q();F();Oe();Ur=class extends ie{get type(){return"quote"}get bold(){return this.innerText.length!==2}get italic(){return this.innerText.length!==3}text(){let{parentNode:r,innerText:e}=this;return(r==null?void 0:r.type)==="image-parameter"&&r.name!=="caption"?"":e}lint(r=this.getAbsoluteIndex()){let{previousSibling:e,nextSibling:t,bold:n}=this,i=b.msg('lonely "$1"',"'"),s=[],o=new I(this,r),l,p=(g,d,c)=>[{desc:"escape",range:[g,d],text:"'".repeat(c)},{desc:"remove",range:[g,d],text:""}];if((e==null?void 0:e.type)==="text"&&e.data.endsWith("'")){l=N(this,o,"lonely-apos",i);let{startIndex:g,startLine:d,startCol:c}=l,[,{length:h}]=/(?:^|[^'])('+)$/u.exec(e.data),m=r-h;s.push({...l,startIndex:m,endIndex:g,startCol:c-h,endLine:d,endCol:c,suggestions:p(m,g,h)})}if((t==null?void 0:t.type)==="text"&&t.data.startsWith("'")){l!=null||(l=N(this,o,"lonely-apos",i));let{endIndex:g,endLine:d,endCol:c}=l,[{length:h}]=/^'+/u.exec(t.data),m=g+h;s.push({...l,startIndex:g,endIndex:m,startLine:d,startCol:c,endCol:c+h,suggestions:p(g,m,h)})}return n&&this.closest("heading-title")&&s.push({...N(this,o,"bold-header","bold in section header","warning"),suggestions:[{desc:"remove",range:[r,r+3],text:""}]}),s}json(){let r=super.json();return Object.assign(r,{bold:this.bold,italic:this.italic}),r}}});var qs={};oe(qs,{parseQuotes:()=>Pn});var Pn,Bn=y(()=>{"use strict";js();Pn=(a,r,e)=>{var g;let t=a.split(/('{2,})/u),{length:n}=t;if(n===1)return a;let i=0,s=0,o,l,p;for(let d=1;d<n;d+=2){let c=t[d].length;switch(c){case 2:s++;break;case 4:t[d-1]+="'",t[d]="'''";case 3:if(i++,o!==void 0)break;t[d-1].endsWith(" ")?l===void 0&&p===void 0&&(p=d):t[d-1].slice(-2,-1)===" "?o=d:l!=null||(l=d);break;default:t[d-1]+="'".repeat(c-5),t[d]="'''''",s++,i++}}if(s%2===1&&i%2===1){let d=(g=o!=null?o:l)!=null?g:p;d!==void 0&&(t[d]="''",t[d-1]+="'")}for(let d=1;d<n;d+=2)new Ur(t[d],r,e),t[d]=`\0${e.length-1}q\x7F`;return t.join("")}});var _s={};oe(_s,{parseExternalLinks:()=>jn});var jn,qn=y(()=>{"use strict";X();kn();Rr();jn=(a,r,e,t)=>{var n;return(n=r.regexExternalLinks)!=null||(r.regexExternalLinks=new RegExp(String.raw`\[(\0\d+f\x7F|(?:(?:${r.protocol}|//)${Ae}|\0\d+m\x7F)${we}(?=[[\]<>"\t\p{Zs}]|\0\d))(\p{Zs}*(?!\p{Zs}))([^\]\x01-\x08\x0A-\x1F\uFFFD]*)\]`,"giu")),a.replace(r.regexExternalLinks,(i,s,o,l)=>{let{length:p}=e,g=/&[lg]t;/u.exec(s);return g&&(s=s.slice(0,g.index),o="",l=s.slice(g.index)+o+l),t?(new Ie(s,"ext-link-url",r,e),`[\0${p}f\x7F${o}${l}]`):(new Et(s,o,l,r,e),`\0${p}w\x7F`)})}});var zr,Os=y(()=>{"use strict";Vt();zr=class extends Ce{get type(){return"category"}}});var Gs={};oe(Gs,{parseLinks:()=>Ms});var La,Ms,Us=y(()=>{"use strict";F();Bn();qn();yn();bn();Os();La=/^((?:(?!\0\d+!\x7F)[^\n[\]{}|])+)(\||\0\d+!\x7F)(.*)$/su,Ms=(a,r,e)=>{var s;(s=r.regexLinks)!=null||(r.regexLinks=new RegExp(String.raw`^\s*(?:${r.protocol}|//)`,"iu"));let t=r.inExt?/^((?:(?!\0\d+!\x7F)[^\n[\]{}|])+)(?:(\||\0\d+!\x7F)(.*?[^\]]))?\]\](.*)$/su:/^((?:(?!\0\d+!\x7F)[^\n[\]{}|])+)(?:(\||\0\d+!\x7F)(.*?[^\]])?)?\]\](.*)$/su,n=a.split("[["),i=n.shift();for(let o=0;o<n.length;o++){let l=!1,p,g,d,c,h=n[o],m=t.exec(h);if(m)[,p,g,d,c]=m,c.startsWith("]")&&(d!=null&&d.includes("["))&&(d+="]",c=c.slice(1));else{let E=La.exec(h);E&&(l=!0,[,p,g,d]=E)}if(p===void 0||r.regexLinks.test(p)||/\0\d+[exhbru]\x7F/u.test(p)){i+=`[[${h}`;continue}let f=p.trim().startsWith(":");if(f&&l){i+=`[[${h}`;continue}let x=b.normalizeTitle(p,0,!1,r,!0,!0,!0),{ns:T,valid:w,interwiki:S}=x;if(w){if(l){if(S||T!==6){i+=`[[${h}`;continue}let E=!1;for(o++;o<n.length;o++){let O=n[o],H=O.split("]]");if(H.length>2){E=!0,d+=`[[${H[0]}]]${H[1]}`,c=H.slice(2).join("]]");break}else if(H.length===2)d+=`[[${H[0]}]]${H[1]}`;else{d+=`[[${O}`;break}}if(d=Ms(d,r,e),!E){i+=`[[${p}${g}${d}`;continue}}}else{i+=`[[${h}`;continue}d&&(d=Pn(d,r,e));let C=Nt;f||(!S&&T===6?(d&&(d=jn(d,r,e,!0)),C=Ct):!S&&T===14&&(C=zr)),d===void 0&&g&&(d=""),i+=`\0${e.length}l\x7F${c}`,new C(p,d,r,e,g)}return i}});var Hs={};oe(Hs,{parseMagicLinks:()=>Ra});var Ds,zs,Ws,Fa,Ra,Vs=y(()=>{"use strict";X();Rr();Ds=String.raw`[\p{Zs}\t]| |�*160;|�*a0;`,zs=`(?:${Ds})+`,Ws=`(?:${Ds}|-)`,Fa=String.raw`(?:RFC|PMID)${zs}\d+\b|ISBN${zs}(?:97[89]${Ws}?)?(?:\d${Ws}?){9}[\dx]\b`,Ra=(a,r,e)=>{var t;return(t=r.regexMagicLinks)!=null||(r.regexMagicLinks=new RegExp(String.raw`(^|[^\p{L}\d_])(?:(?:${r.protocol})(${Ae}${we})|${Fa})`,"giu")),a.replace(r.regexMagicLinks,(n,i,s)=>{let o=i?n.slice(i.length):n;if(s){let l="",p=/&(?:lt|gt|nbsp|#x0*(?:3[ce]|a0)|#0*(?:6[02]|160));/iu.exec(o);p&&(l=o.slice(p.index),o=o.slice(0,p.index));let g=o.includes("(")?/[^,;\\.:!?][,;\\.:!?]+$/u:/[^,;\\.:!?)][,;\\.:!?)]+$/u,d=g.exec(o);if(d){let c=1;d[0][1]===";"&&/&(?:[a-z]+|#x[\da-f]+|#\d+)$/iu.test(o.slice(0,d.index))&&(c=2),l=o.slice(d.index+c)+l,o=o.slice(0,d.index+c)}return l.length>=s.length?n:(new Ie(o,void 0,r,e),`${i}\0${e.length-1}w\x7F${l}`)}else if(!/^(?:RFC|PMID|ISBN)/u.test(o))return n;return new Ie(o,"magic-link",r,e),`${i}\0${e.length-1}i\x7F`})}});var Xs,Qs=y(()=>{"use strict";Xs=(a,r)=>a.startsWith(r)?r.length:[...r].findIndex((e,t)=>e!==a[t])});var Wr,Zs=y(()=>{"use strict";Ln();Wr=class extends Bt{get type(){return"list"}}});var Js={};oe(Js,{parseList:()=>Pa});var Pa,Ks=y(()=>{"use strict";Qs();Zs();Fn();Pa=(a,r,e,t)=>{let n=/^((?:\0\d+[cno]\x7F)*)([;:*#]+\s*)/u.exec(a);if(!n)return r.lastPrefix="",a;let[i,s,o]=n,l=o.replace(/;/gu,":"),p=Xs(l,r.lastPrefix),g=(p>1?o.slice(p-1):o).split(/(?=;)/u),d=g[0].startsWith(";"),c=g.length-(d?0:1);if(p>1){let B=o.slice(0,p-1);d?g.unshift(B):g[0]=B+g[0]}r.lastPrefix=l;let h=s+g.map((B,Y)=>`\0${t.length+Y}d\x7F`).join("")+a.slice(i.length);for(let B of g)new Wr(B,e,t);if(!c)return h;let{html:[m]}=e,f=/:+|-\{|\0\d+[xq]\x7F/gu,x=f,T=x.exec(h),w=0,S=!1,C=!1,E=0,O=(B,Y)=>(new jt(B,e,t),`${h.slice(0,Y)}\0${t.length-1}d\x7F${h.slice(Y+B.length)}`),H=B=>{B?w&&w--:w++};for(;T&&c;){let{0:B,index:Y}=T;if(B==="-{"){if(!E){let{lastIndex:G}=x;x=/-\{|\}-/gu,x.lastIndex=G}E++}else if(B==="}-"){if(E--,!E){let{lastIndex:G}=x;x=f,x.lastIndex=G}}else if(B.endsWith("x\x7F")){let{name:G,closing:Z,selfClosing:W}=t[Number(B.slice(1,-2))];(!W||m.includes(G))&&H(Z)}else if(B.endsWith("q\x7F")){let{bold:G,italic:Z}=t[Number(B.slice(1,-2))];G&&(H(S),S=!S),Z&&(H(C),C=!C)}else if(w===0){if(B.length>=c)return O(B.slice(0,c),Y);c-=B.length,x.lastIndex=Y+4+String(t.length).length,h=O(B,Y)}T=x.exec(h)}return h}});var Ys,Fe,Dr,eo=y(()=>{"use strict";j();Q();F();P();Ee();Ys=new Set(["A","T","R","D","-","H","N"]),Dr=class extends v{constructor(e,t=b.getConfig(),n=[]){super(void 0,t,n,{});k(this,Fe);this.append(...e.map(i=>new M(i,"converter-flag",t,n)))}get type(){return"converter-flags"}afterBuild(){A(this,Fe,this.childNodes.map(e=>e.text().trim())),super.afterBuild()}toString(e){return super.toString(e,";")}text(){return super.text(";")}getGaps(){return 1}getUnknownFlags(){return new Set(u(this,Fe).filter(e=>/\{{3}[^{}]+\}{3}/u.test(e)))}getVariantFlags(){let e=new Set(this.getAttribute("config").variants);return new Set(u(this,Fe).filter(t=>e.has(t)))}lint(e=this.getAbsoluteIndex(),t){let n=this.getVariantFlags(),i=this.getUnknownFlags(),s=new Set(u(this,Fe).filter(d=>Ys.has(d))),o=u(this,Fe).filter(d=>!d).length,l=u(this,Fe).length-i.size-o,p=super.lint(e,t);if(n.size===l||s.size===l)return p;let g=new I(this,e);for(let[d,c]of this.childNodes.entries()){let h=c.text().trim();if(h&&!n.has(h)&&!i.has(h)&&(n.size>0||!s.has(h))){let m=$(c,g,"no-ignored","invalid conversion flag");n.size===0&&Ys.has(h.toUpperCase())?m.fix={range:[m.startIndex,m.endIndex],text:h.toUpperCase(),desc:"uppercase"}:m.suggestions=[{desc:"remove",range:[m.startIndex-(d&&1),m.endIndex],text:""}],p.push(m)}}return p}print(){return super.print({sep:";"})}};Fe=new WeakMap});var qt,to=y(()=>{"use strict";F();P();Ee();qt=class extends v{get type(){return"converter-rule"}constructor(r,e=!0,t=b.getConfig(),n=[]){super(void 0,t,n);let i=r.indexOf(":"),s=r.slice(0,i).indexOf("=>"),o=s===-1?r.slice(0,i):r.slice(s+2,i);e&&t.variants.includes(o.trim())?(super.insertAt(new M(o,"converter-rule-variant",t,n)),super.insertAt(new M(r.slice(i+1),"converter-rule-to",t,n)),s!==-1&&super.insertAt(new M(r.slice(0,s),"converter-rule-from",t,n),0)):super.insertAt(new M(r,"converter-rule-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(){let{childNodes:r}=this;if(r.length===3){let[e,t,n]=r;return`<span class="wpb-converter-rule">${e.print()}=>${t.print()}:${n.print()}</span>`}return super.print({sep:":"})}}});var Hr,ro=y(()=>{"use strict";X();F();P();eo();to();Hr=class extends v{get type(){return"converter"}constructor(r,e,t=b.getConfig(),n=[]){super(void 0,t,n),this.append(new Dr(r,t,n));let[i]=e,s=i.includes(":"),o=new qt(i,s,t,n);s&&o.length===1||!s&&e.length===2&&!ne(e[1]).trim()?this.insertAt(new qt(e.join(";"),!1,t,n)):this.append(o,...e.slice(1).map(l=>new qt(l,!0,t,n)))}toString(r){let{childNodes:[e,...t]}=this;return`-{${e.toString(r)}${e.length>0?"|":""}${t.map(n=>n.toString(r)).join(";")}}-`}text(){let{childNodes:[r,...e]}=this;return`-{${r.text()}|${ce(e,";")}}-`}getAttribute(r){return r==="padding"?2:super.getAttribute(r)}getGaps(r){return r||this.firstChild.length>0?1:0}print(){let{childNodes:[r,...e]}=this;return`<span class="wpb-converter">-{${r.print()}${r.length>0?"|":""}${Ne(e,{sep:";"})}}-</span>`}}});var no={};oe(no,{parseConverter:()=>Ba});var Ba,io=y(()=>{"use strict";ro();Ba=(a,r,e)=>{var l;(l=r.regexConverter)!=null||(r.regexConverter=new RegExp(String.raw`;(?=(?:[^;]*?=>)?\s*(?:${r.variants.join("|")})\s*:|(?:\s|\0\d+[cn]\x7F)*$)`,"u"));let t=/-\{/gu,n=/-\{|\}-/gu,i=[],s=t,o=s.exec(a);for(;o;){let{0:p,index:g}=o;if(p==="}-"){let d=i.pop(),{length:c}=e,h=a.slice(d.index+2,g),m=h.indexOf("|"),[f,x]=m===-1?[[],h]:[h.slice(0,m).split(";"),h.slice(m+1)],T=x.replace(/(&[#a-z\d]+);/giu,"$1"),w=T.split(r.regexConverter).map(S=>S.replace(/\x01/gu,";"));new Hr(f,w,r,e),a=`${a.slice(0,d.index)}\0${c}v\x7F${a.slice(g+2)}`,i.length===0&&(s=t),s.lastIndex=d.index+3+String(c).length}else i.push(o),s=n,s.lastIndex=g+2;o=s.exec(a)}return a}});var Vr={};oe(Vr,{Token:()=>v});var sr,be,q,U,dt,_t,or,_,so,oo,ao,lo,go,po,uo,co,ho,mo,fo,xo,_n,v,P=y(()=>{"use strict";X();Se();Te();j();F();bi();ki();_n=class _n extends hr{constructor(e,t=b.getConfig(),n=[],i){super();k(this,_);k(this,sr,"plain");k(this,be,0);k(this,q);k(this,U);k(this,dt);k(this,_t,!1);k(this,or);typeof e=="string"&&this.insertAt(e),A(this,q,t),A(this,U,n),n.push(this)}get type(){return u(this,sr)}set type(e){A(this,sr,e)}parseOnce(e=u(this,be),t=!1){if(e<u(this,be)||this.length===0||!this.getAttribute("plain"))return this;if(u(this,be)>=11)return this;switch(e){case 0:if(this.type==="root"){u(this,U).pop();let n=L(this,_,so).call(this);t&&(t=!n)}A(this,dt,t),L(this,_,oo).call(this,t);break;case 1:L(this,_,ao).call(this);break;case 2:L(this,_,lo).call(this);break;case 3:L(this,_,go).call(this);break;case 4:L(this,_,po).call(this);break;case 5:L(this,_,uo).call(this);break;case 6:L(this,_,co).call(this);break;case 7:L(this,_,ho).call(this);break;case 8:L(this,_,mo).call(this);break;case 9:L(this,_,fo).call(this);break;case 10:L(this,_,xo).call(this)}if(this.type==="root")for(let n of u(this,U))n==null||n.parseOnce(e,t);return pr(this,be)._++,this}buildFromStr(e,t){let n=e.split(/[\0\x7F]/u).map((i,s)=>{if(s%2===0)return new Wt(i);if(isNaN(i.slice(-1)))return u(this,U)[Number(i.slice(0,-1))];throw new Error(`Failed to build! Unrecognized token: ${i}`)});return t===0?n.map(String).join(""):t===1?ce(n):n}build(){A(this,be,11);let{length:e,firstChild:t}=this,n=t==null?void 0:t.toString();if(e===1&&t.type==="text"&&n.includes("\0")&&(this.replaceChildren(...this.buildFromStr(n)),this.normalize(),this.type==="root"))for(let i of u(this,U))i==null||i.build()}afterBuild(){if(this.type==="root")for(let e of u(this,U))e==null||e.afterBuild();A(this,_t,!0)}parse(e=11,t){for(e=Math.min(e,11);u(this,be)<e;)this.parseOnce(u(this,be),t);return e&&(this.build(),this.afterBuild()),this}getAttribute(e){var t;switch(e){case"plain":return this.constructor===_n;case"config":return u(this,q);case"include":return(t=u(this,dt))!=null?t:!!u(this.getRootNode(),dt);case"accum":return u(this,U);case"built":return u(this,_t);default:return super.getAttribute(e)}}setAttribute(e,t){switch(e){case"stage":u(this,be)===0&&this.type==="root"&&u(this,U).shift(),A(this,be,t);break;default:super.setAttribute(e,t)}}insertAt(e,t=this.length){let n=typeof e=="string"?new Wt(e):e;return super.insertAt(n,t),n.type==="root"&&(n.type="plain"),n}normalizeTitle(e,t=0,n,i,s){return b.normalizeTitle(e,t,u(this,dt),u(this,q),n,i,s)}lint(e=this.getAbsoluteIndex(),t){var i;let n=super.lint(e,t);if(this.type==="root"){let s=new Map,o="category,html-attr#id,ext-attr#id,table-attr#id";for(let m of this.querySelectorAll(o)){let f;if(m.type==="category")f=m.name;else{let x=m.getValue();x&&x!==!0&&(f=`#${x}`)}if(f){let x=s.get(f);x?x.add(m):s.set(f,new Set([m]))}}for(let[m,f]of s)if(f.size>1&&!m.startsWith("#mw-customcollapsible-")){let x=!m.startsWith("#"),T=`duplicated ${x?"category":"id"}`,w=x?"error":"warning";n.push(...[...f].map(S=>{let C=N(S,{start:S.getAbsoluteIndex()},"no-duplicate",T,w);return x&&(C.suggestions=[{desc:"remove",range:[C.startIndex,C.endIndex],text:""}]),C}))}let l=/<!--\s*lint-(disable(?:(?:-next)?-line)?|enable)(\s[\sa-z,-]*)?-->/gu,p=this.toString(),g=[],d=l.exec(p),c=0,h=0;for(;d;){let{1:m,index:f}=d,x=(i=d[2])==null?void 0:i.trim();h+=p.slice(c,f).split(`
|
|
33
|
+
`).length-1,c=f,g.push({line:h+(m==="disable-line"?0:1),from:m==="disable"?l.lastIndex:void 0,to:m==="enable"?l.lastIndex:void 0,rules:x?new Set(x.split(",").map(T=>T.trim())):void 0}),d=l.exec(p)}n=n.filter(({rule:m,startLine:f,startIndex:x})=>{let T={pos:0};for(let{line:w,from:S,to:C,rules:E}of g){if(w>f+1)break;if(E&&!E.has(m))continue;if(w===f&&S===void 0&&C===void 0)return!1;S<=x&&S>T.pos?(T.pos=S,T.type="from"):C<=x&&C>T.pos&&(T.pos=C,T.type="to")}return T.type!=="from"})}return n}toString(e,t){var s;let{rev:n}=ke,i=this.getRootNode();return!e&&i.type==="root"&&u(i,_t)?((s=u(this,or))!=null||A(this,or,[n,super.toString(!1,t)]),u(this,or)[1]):super.toString(e,t)}};sr=new WeakMap,be=new WeakMap,q=new WeakMap,U=new WeakMap,dt=new WeakMap,_t=new WeakMap,or=new WeakMap,_=new WeakSet,so=function(){let{parseRedirect:e}=($i(),K(Ci)),t=this.firstChild.toString(),n=e(t,u(this,q),u(this,U));return n&&this.setText(n),!!n},oo=function(e){let{parseCommentAndExt:t}=(Zt(),K(xs));this.setText(t(this.firstChild.toString(),u(this,q),u(this,U),e))},ao=function(){let{parseBraces:e}=($r(),K(Yi)),t=this.type==="root"?this.firstChild.toString():`\0${this.firstChild.toString()}`,n=e(t,u(this,q),u(this,U));this.setText(this.type==="root"?n:n.slice(1))},lo=function(){var t;if((t=u(this,q).excludes)!=null&&t.includes("html"))return;let{parseHtml:e}=(ys(),K(Ts));this.setText(e(this.firstChild.toString(),u(this,q),u(this,U)))},go=function(){var t;if((t=u(this,q).excludes)!=null&&t.includes("table"))return;let{parseTable:e}=(Is(),K(Es));this.setText(e(this,u(this,q),u(this,U)))},po=function(){var t;if((t=u(this,q).excludes)!=null&&t.includes("hr"))return;let{parseHrAndDoubleUnderscore:e}=(Bs(),K(Ps));this.setText(e(this,u(this,q),u(this,U)))},uo=function(){let{parseLinks:e}=(Us(),K(Gs));this.setText(e(this.firstChild.toString(),u(this,q),u(this,U)))},co=function(){var n;if((n=u(this,q).excludes)!=null&&n.includes("quote"))return;let{parseQuotes:e}=(Bn(),K(qs)),t=this.firstChild.toString().split(`
|
|
34
|
+
`);for(let i=0;i<t.length;i++)t[i]=e(t[i],u(this,q),u(this,U));this.setText(t.join(`
|
|
35
|
+
`))},ho=function(){var t;if((t=u(this,q).excludes)!=null&&t.includes("extLink"))return;let{parseExternalLinks:e}=(qn(),K(_s));this.setText(e(this.firstChild.toString(),u(this,q),u(this,U)))},mo=function(){var t;if((t=u(this,q).excludes)!=null&&t.includes("magicLink"))return;let{parseMagicLinks:e}=(Vs(),K(Hs));this.setText(e(this.firstChild.toString(),u(this,q),u(this,U)))},fo=function(){var s;if((s=u(this,q).excludes)!=null&&s.includes("list"))return;let{parseList:e}=(Ks(),K(Js)),t=this.firstChild.toString().split(`
|
|
36
|
+
`),n={lastPrefix:""},i=this.type==="root"||this.type==="ext-inner"&&this.name==="poem"?0:1;for(;i<t.length;i++)t[i]=e(t[i],n,u(this,q),u(this,U));this.setText(t.join(`
|
|
37
|
+
`))},xo=function(){if(u(this,q).variants.length>0){let{parseConverter:e}=(io(),K(no));this.setText(e(this.firstChild.toString(),u(this,q),u(this,U)))}};v=_n});var ke,St,on,Cs,fr,Te=y(()=>{"use strict";ke={running:!1,run(a){let{running:r}=this;this.running=!0;try{let{Token:e}=(P(),K(Vr)),t=a();return t instanceof e&&!t.getAttribute("built")&&t.afterBuild(),this.running=r,t}catch(e){throw this.running=r,e}},rev:0},St=a=>r=>r.type===a,on=(a,r,e,t=[])=>{let n=[...a.childNodes],i=n.splice(r,e,...t);a.setAttribute("childNodes",n);for(let s of t)s.setAttribute("parentNode",a);return i},Cs=(a,r)=>new Array(a).fill(void 0).map((e,t)=>r(t)),fr=(a,r)=>{Object.defineProperty(a,"name",{value:r.name})}});var bo={};oe(bo,{Title:()=>On});var ar,lr,Ot,Re,On,To=y(()=>{"use strict";X();On=class{constructor(r,e,t,n,i){k(this,ar);k(this,lr);k(this,Ot);k(this,Re);V(this,"interwiki","");V(this,"valid");V(this,"encoded",!1);let s=r.trim().startsWith("../");if(n&&r.includes("%"))try{let l=/%(?!21|3[ce]|5[bd]|7[b-d])[\da-f]{2}/iu.test(r);r=(0,je.rawurldecode)(r),this.encoded=l}catch(l){}if(r=Ut(r).replace(/[_ ]+/gu," ").trim(),s)A(this,Ot,0);else{let l=e;r.startsWith(":")&&(l=0,r=r.slice(1).trim());let p=r.split(":");if(p.length>1){let g=p[0].trim().toLowerCase(),d=Object.prototype.hasOwnProperty.call(t.nsid,g)&&t.nsid[g];d&&(l=d,r=p.slice(1).join(":").trim())}A(this,Ot,l)}let o=r.indexOf("#");if(o!==-1){let l=r.slice(o+1).trimEnd();if(l.includes("%"))try{l=(0,je.rawurldecode)(l)}catch(p){}A(this,Re,l.replace(/ /gu,"_")),r=r.slice(0,o).trim()}this.valid=!!(r||this.interwiki||i&&this.ns===0&&u(this,Re)!==void 0)&&Ut(r)===r&&!/^:|\0\d+[eh!+-]\x7F|[<>[\]{}|\n]|%[\da-f]{2}|(?:^|\/)\.{1,2}(?:$|\/)/iu.test(s?/^(?:\.\.\/)+(.*)/u.exec(r)[1]:r),this.main=r,Object.defineProperties(this,{encoded:{enumerable:!1,writable:!1}}),A(this,lr,t.namespaces)}get ns(){return u(this,Ot)}get fragment(){return u(this,Re)}get main(){return u(this,ar)}set main(r){r=r.replace(/_/gu," ").trim(),A(this,ar,r&&r[0].toUpperCase()+r.slice(1))}get prefix(){let r=u(this,lr)[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()}toString(r){return`${r?this.title.replace(/_/gu," "):this.title}${u(this,Re)===void 0?"":`#${u(this,Re)}`}`}getRedirection(){return[!1,(this.interwiki+(this.interwiki&&":")+this.prefix+this.main).replace(/ /gu,"_")]}setFragment(r){A(this,Re,r)}};ar=new WeakMap,lr=new WeakMap,Ot=new WeakMap,Re=new WeakMap});var Mt,yo,ja,b,F=y(()=>{Yn();Te();Se();X();Mt={config:tn,i18n:void 0,rules:Kn,getConfig(){let{doubleUnderscore:a}=this.config;return a.length>2&&a[0].length===0&&(a[0]=Object.keys(a[2])),{...tn,...this.config,excludes:[]}},msg(a,r=""){var e,t;return a&&((t=(e=this.i18n)==null?void 0:e[a])!=null?t:a).replace("$1",this.msg(r))},normalizeTitle(a,r=0,e,t=Mt.getConfig(),n,i=!1,s=!1){let{Title:o}=(To(),K(bo)),l;if(n)l=new o(a,r,t,i,s);else{let{Token:p}=(P(),K(Vr));l=ke.run(()=>{let g=new p(a,t);g.type="root",g.parseOnce(0,e).parseOnce();let d=new o(g.toString(),r,t,i,s);for(let c of["main","fragment"]){let h=d[c];if(h!=null&&h.includes("\0")){let m=g.buildFromStr(h,1);c==="main"?d.main=m:d.setFragment(m)}}return d})}return l},parse(a,r,e=11,t=Mt.getConfig()){if(a=di(a),typeof e!="number"){let s=Array.isArray(e)?e:[e];e=Math.max(...s.map(o=>Kr[o]||11))}let{Token:n}=(P(),K(Vr));return ke.run(()=>{let s=new n(a,t);return s.type="root",s.parse(e,r)})}},yo={},ja=new Set(["normalizeTitle","parse"]);for(let a in Mt)ja.has(a)||(yo[a]={enumerable:!1});Object.defineProperties(Mt,yo);Object.assign(globalThis,{Parser:Mt});b=Mt});F();})();
|
|
38
38
|
//# sourceMappingURL=bundle.min.js.map
|